Black Lives Matter. Support the Equal Justice Initiative.

Source file src/cmd/compile/internal/ssa/rewritePPC64.go

Documentation: cmd/compile/internal/ssa

     1  // Code generated from gen/PPC64.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "math"
     7  import "cmd/internal/objabi"
     8  import "cmd/compile/internal/types"
     9  
    10  func rewriteValuePPC64(v *Value) bool {
    11  	switch v.Op {
    12  	case OpAbs:
    13  		return rewriteValuePPC64_OpAbs_0(v)
    14  	case OpAdd16:
    15  		return rewriteValuePPC64_OpAdd16_0(v)
    16  	case OpAdd32:
    17  		return rewriteValuePPC64_OpAdd32_0(v)
    18  	case OpAdd32F:
    19  		return rewriteValuePPC64_OpAdd32F_0(v)
    20  	case OpAdd64:
    21  		return rewriteValuePPC64_OpAdd64_0(v)
    22  	case OpAdd64F:
    23  		return rewriteValuePPC64_OpAdd64F_0(v)
    24  	case OpAdd64carry:
    25  		return rewriteValuePPC64_OpAdd64carry_0(v)
    26  	case OpAdd8:
    27  		return rewriteValuePPC64_OpAdd8_0(v)
    28  	case OpAddPtr:
    29  		return rewriteValuePPC64_OpAddPtr_0(v)
    30  	case OpAddr:
    31  		return rewriteValuePPC64_OpAddr_0(v)
    32  	case OpAnd16:
    33  		return rewriteValuePPC64_OpAnd16_0(v)
    34  	case OpAnd32:
    35  		return rewriteValuePPC64_OpAnd32_0(v)
    36  	case OpAnd64:
    37  		return rewriteValuePPC64_OpAnd64_0(v)
    38  	case OpAnd8:
    39  		return rewriteValuePPC64_OpAnd8_0(v)
    40  	case OpAndB:
    41  		return rewriteValuePPC64_OpAndB_0(v)
    42  	case OpAtomicAdd32:
    43  		return rewriteValuePPC64_OpAtomicAdd32_0(v)
    44  	case OpAtomicAdd64:
    45  		return rewriteValuePPC64_OpAtomicAdd64_0(v)
    46  	case OpAtomicAnd8:
    47  		return rewriteValuePPC64_OpAtomicAnd8_0(v)
    48  	case OpAtomicCompareAndSwap32:
    49  		return rewriteValuePPC64_OpAtomicCompareAndSwap32_0(v)
    50  	case OpAtomicCompareAndSwap64:
    51  		return rewriteValuePPC64_OpAtomicCompareAndSwap64_0(v)
    52  	case OpAtomicCompareAndSwapRel32:
    53  		return rewriteValuePPC64_OpAtomicCompareAndSwapRel32_0(v)
    54  	case OpAtomicExchange32:
    55  		return rewriteValuePPC64_OpAtomicExchange32_0(v)
    56  	case OpAtomicExchange64:
    57  		return rewriteValuePPC64_OpAtomicExchange64_0(v)
    58  	case OpAtomicLoad32:
    59  		return rewriteValuePPC64_OpAtomicLoad32_0(v)
    60  	case OpAtomicLoad64:
    61  		return rewriteValuePPC64_OpAtomicLoad64_0(v)
    62  	case OpAtomicLoad8:
    63  		return rewriteValuePPC64_OpAtomicLoad8_0(v)
    64  	case OpAtomicLoadAcq32:
    65  		return rewriteValuePPC64_OpAtomicLoadAcq32_0(v)
    66  	case OpAtomicLoadPtr:
    67  		return rewriteValuePPC64_OpAtomicLoadPtr_0(v)
    68  	case OpAtomicOr8:
    69  		return rewriteValuePPC64_OpAtomicOr8_0(v)
    70  	case OpAtomicStore32:
    71  		return rewriteValuePPC64_OpAtomicStore32_0(v)
    72  	case OpAtomicStore64:
    73  		return rewriteValuePPC64_OpAtomicStore64_0(v)
    74  	case OpAtomicStore8:
    75  		return rewriteValuePPC64_OpAtomicStore8_0(v)
    76  	case OpAtomicStoreRel32:
    77  		return rewriteValuePPC64_OpAtomicStoreRel32_0(v)
    78  	case OpAvg64u:
    79  		return rewriteValuePPC64_OpAvg64u_0(v)
    80  	case OpBitLen32:
    81  		return rewriteValuePPC64_OpBitLen32_0(v)
    82  	case OpBitLen64:
    83  		return rewriteValuePPC64_OpBitLen64_0(v)
    84  	case OpCeil:
    85  		return rewriteValuePPC64_OpCeil_0(v)
    86  	case OpClosureCall:
    87  		return rewriteValuePPC64_OpClosureCall_0(v)
    88  	case OpCom16:
    89  		return rewriteValuePPC64_OpCom16_0(v)
    90  	case OpCom32:
    91  		return rewriteValuePPC64_OpCom32_0(v)
    92  	case OpCom64:
    93  		return rewriteValuePPC64_OpCom64_0(v)
    94  	case OpCom8:
    95  		return rewriteValuePPC64_OpCom8_0(v)
    96  	case OpCondSelect:
    97  		return rewriteValuePPC64_OpCondSelect_0(v)
    98  	case OpConst16:
    99  		return rewriteValuePPC64_OpConst16_0(v)
   100  	case OpConst32:
   101  		return rewriteValuePPC64_OpConst32_0(v)
   102  	case OpConst32F:
   103  		return rewriteValuePPC64_OpConst32F_0(v)
   104  	case OpConst64:
   105  		return rewriteValuePPC64_OpConst64_0(v)
   106  	case OpConst64F:
   107  		return rewriteValuePPC64_OpConst64F_0(v)
   108  	case OpConst8:
   109  		return rewriteValuePPC64_OpConst8_0(v)
   110  	case OpConstBool:
   111  		return rewriteValuePPC64_OpConstBool_0(v)
   112  	case OpConstNil:
   113  		return rewriteValuePPC64_OpConstNil_0(v)
   114  	case OpCopysign:
   115  		return rewriteValuePPC64_OpCopysign_0(v)
   116  	case OpCtz16:
   117  		return rewriteValuePPC64_OpCtz16_0(v)
   118  	case OpCtz32:
   119  		return rewriteValuePPC64_OpCtz32_0(v)
   120  	case OpCtz32NonZero:
   121  		return rewriteValuePPC64_OpCtz32NonZero_0(v)
   122  	case OpCtz64:
   123  		return rewriteValuePPC64_OpCtz64_0(v)
   124  	case OpCtz64NonZero:
   125  		return rewriteValuePPC64_OpCtz64NonZero_0(v)
   126  	case OpCtz8:
   127  		return rewriteValuePPC64_OpCtz8_0(v)
   128  	case OpCvt32Fto32:
   129  		return rewriteValuePPC64_OpCvt32Fto32_0(v)
   130  	case OpCvt32Fto64:
   131  		return rewriteValuePPC64_OpCvt32Fto64_0(v)
   132  	case OpCvt32Fto64F:
   133  		return rewriteValuePPC64_OpCvt32Fto64F_0(v)
   134  	case OpCvt32to32F:
   135  		return rewriteValuePPC64_OpCvt32to32F_0(v)
   136  	case OpCvt32to64F:
   137  		return rewriteValuePPC64_OpCvt32to64F_0(v)
   138  	case OpCvt64Fto32:
   139  		return rewriteValuePPC64_OpCvt64Fto32_0(v)
   140  	case OpCvt64Fto32F:
   141  		return rewriteValuePPC64_OpCvt64Fto32F_0(v)
   142  	case OpCvt64Fto64:
   143  		return rewriteValuePPC64_OpCvt64Fto64_0(v)
   144  	case OpCvt64to32F:
   145  		return rewriteValuePPC64_OpCvt64to32F_0(v)
   146  	case OpCvt64to64F:
   147  		return rewriteValuePPC64_OpCvt64to64F_0(v)
   148  	case OpDiv16:
   149  		return rewriteValuePPC64_OpDiv16_0(v)
   150  	case OpDiv16u:
   151  		return rewriteValuePPC64_OpDiv16u_0(v)
   152  	case OpDiv32:
   153  		return rewriteValuePPC64_OpDiv32_0(v)
   154  	case OpDiv32F:
   155  		return rewriteValuePPC64_OpDiv32F_0(v)
   156  	case OpDiv32u:
   157  		return rewriteValuePPC64_OpDiv32u_0(v)
   158  	case OpDiv64:
   159  		return rewriteValuePPC64_OpDiv64_0(v)
   160  	case OpDiv64F:
   161  		return rewriteValuePPC64_OpDiv64F_0(v)
   162  	case OpDiv64u:
   163  		return rewriteValuePPC64_OpDiv64u_0(v)
   164  	case OpDiv8:
   165  		return rewriteValuePPC64_OpDiv8_0(v)
   166  	case OpDiv8u:
   167  		return rewriteValuePPC64_OpDiv8u_0(v)
   168  	case OpEq16:
   169  		return rewriteValuePPC64_OpEq16_0(v)
   170  	case OpEq32:
   171  		return rewriteValuePPC64_OpEq32_0(v)
   172  	case OpEq32F:
   173  		return rewriteValuePPC64_OpEq32F_0(v)
   174  	case OpEq64:
   175  		return rewriteValuePPC64_OpEq64_0(v)
   176  	case OpEq64F:
   177  		return rewriteValuePPC64_OpEq64F_0(v)
   178  	case OpEq8:
   179  		return rewriteValuePPC64_OpEq8_0(v)
   180  	case OpEqB:
   181  		return rewriteValuePPC64_OpEqB_0(v)
   182  	case OpEqPtr:
   183  		return rewriteValuePPC64_OpEqPtr_0(v)
   184  	case OpFMA:
   185  		return rewriteValuePPC64_OpFMA_0(v)
   186  	case OpFloor:
   187  		return rewriteValuePPC64_OpFloor_0(v)
   188  	case OpGeq16:
   189  		return rewriteValuePPC64_OpGeq16_0(v)
   190  	case OpGeq16U:
   191  		return rewriteValuePPC64_OpGeq16U_0(v)
   192  	case OpGeq32:
   193  		return rewriteValuePPC64_OpGeq32_0(v)
   194  	case OpGeq32F:
   195  		return rewriteValuePPC64_OpGeq32F_0(v)
   196  	case OpGeq32U:
   197  		return rewriteValuePPC64_OpGeq32U_0(v)
   198  	case OpGeq64:
   199  		return rewriteValuePPC64_OpGeq64_0(v)
   200  	case OpGeq64F:
   201  		return rewriteValuePPC64_OpGeq64F_0(v)
   202  	case OpGeq64U:
   203  		return rewriteValuePPC64_OpGeq64U_0(v)
   204  	case OpGeq8:
   205  		return rewriteValuePPC64_OpGeq8_0(v)
   206  	case OpGeq8U:
   207  		return rewriteValuePPC64_OpGeq8U_0(v)
   208  	case OpGetCallerPC:
   209  		return rewriteValuePPC64_OpGetCallerPC_0(v)
   210  	case OpGetCallerSP:
   211  		return rewriteValuePPC64_OpGetCallerSP_0(v)
   212  	case OpGetClosurePtr:
   213  		return rewriteValuePPC64_OpGetClosurePtr_0(v)
   214  	case OpGreater16:
   215  		return rewriteValuePPC64_OpGreater16_0(v)
   216  	case OpGreater16U:
   217  		return rewriteValuePPC64_OpGreater16U_0(v)
   218  	case OpGreater32:
   219  		return rewriteValuePPC64_OpGreater32_0(v)
   220  	case OpGreater32F:
   221  		return rewriteValuePPC64_OpGreater32F_0(v)
   222  	case OpGreater32U:
   223  		return rewriteValuePPC64_OpGreater32U_0(v)
   224  	case OpGreater64:
   225  		return rewriteValuePPC64_OpGreater64_0(v)
   226  	case OpGreater64F:
   227  		return rewriteValuePPC64_OpGreater64F_0(v)
   228  	case OpGreater64U:
   229  		return rewriteValuePPC64_OpGreater64U_0(v)
   230  	case OpGreater8:
   231  		return rewriteValuePPC64_OpGreater8_0(v)
   232  	case OpGreater8U:
   233  		return rewriteValuePPC64_OpGreater8U_0(v)
   234  	case OpHmul32:
   235  		return rewriteValuePPC64_OpHmul32_0(v)
   236  	case OpHmul32u:
   237  		return rewriteValuePPC64_OpHmul32u_0(v)
   238  	case OpHmul64:
   239  		return rewriteValuePPC64_OpHmul64_0(v)
   240  	case OpHmul64u:
   241  		return rewriteValuePPC64_OpHmul64u_0(v)
   242  	case OpInterCall:
   243  		return rewriteValuePPC64_OpInterCall_0(v)
   244  	case OpIsInBounds:
   245  		return rewriteValuePPC64_OpIsInBounds_0(v)
   246  	case OpIsNonNil:
   247  		return rewriteValuePPC64_OpIsNonNil_0(v)
   248  	case OpIsSliceInBounds:
   249  		return rewriteValuePPC64_OpIsSliceInBounds_0(v)
   250  	case OpLeq16:
   251  		return rewriteValuePPC64_OpLeq16_0(v)
   252  	case OpLeq16U:
   253  		return rewriteValuePPC64_OpLeq16U_0(v)
   254  	case OpLeq32:
   255  		return rewriteValuePPC64_OpLeq32_0(v)
   256  	case OpLeq32F:
   257  		return rewriteValuePPC64_OpLeq32F_0(v)
   258  	case OpLeq32U:
   259  		return rewriteValuePPC64_OpLeq32U_0(v)
   260  	case OpLeq64:
   261  		return rewriteValuePPC64_OpLeq64_0(v)
   262  	case OpLeq64F:
   263  		return rewriteValuePPC64_OpLeq64F_0(v)
   264  	case OpLeq64U:
   265  		return rewriteValuePPC64_OpLeq64U_0(v)
   266  	case OpLeq8:
   267  		return rewriteValuePPC64_OpLeq8_0(v)
   268  	case OpLeq8U:
   269  		return rewriteValuePPC64_OpLeq8U_0(v)
   270  	case OpLess16:
   271  		return rewriteValuePPC64_OpLess16_0(v)
   272  	case OpLess16U:
   273  		return rewriteValuePPC64_OpLess16U_0(v)
   274  	case OpLess32:
   275  		return rewriteValuePPC64_OpLess32_0(v)
   276  	case OpLess32F:
   277  		return rewriteValuePPC64_OpLess32F_0(v)
   278  	case OpLess32U:
   279  		return rewriteValuePPC64_OpLess32U_0(v)
   280  	case OpLess64:
   281  		return rewriteValuePPC64_OpLess64_0(v)
   282  	case OpLess64F:
   283  		return rewriteValuePPC64_OpLess64F_0(v)
   284  	case OpLess64U:
   285  		return rewriteValuePPC64_OpLess64U_0(v)
   286  	case OpLess8:
   287  		return rewriteValuePPC64_OpLess8_0(v)
   288  	case OpLess8U:
   289  		return rewriteValuePPC64_OpLess8U_0(v)
   290  	case OpLoad:
   291  		return rewriteValuePPC64_OpLoad_0(v)
   292  	case OpLocalAddr:
   293  		return rewriteValuePPC64_OpLocalAddr_0(v)
   294  	case OpLsh16x16:
   295  		return rewriteValuePPC64_OpLsh16x16_0(v)
   296  	case OpLsh16x32:
   297  		return rewriteValuePPC64_OpLsh16x32_0(v)
   298  	case OpLsh16x64:
   299  		return rewriteValuePPC64_OpLsh16x64_0(v)
   300  	case OpLsh16x8:
   301  		return rewriteValuePPC64_OpLsh16x8_0(v)
   302  	case OpLsh32x16:
   303  		return rewriteValuePPC64_OpLsh32x16_0(v)
   304  	case OpLsh32x32:
   305  		return rewriteValuePPC64_OpLsh32x32_0(v)
   306  	case OpLsh32x64:
   307  		return rewriteValuePPC64_OpLsh32x64_0(v)
   308  	case OpLsh32x8:
   309  		return rewriteValuePPC64_OpLsh32x8_0(v)
   310  	case OpLsh64x16:
   311  		return rewriteValuePPC64_OpLsh64x16_0(v)
   312  	case OpLsh64x32:
   313  		return rewriteValuePPC64_OpLsh64x32_0(v)
   314  	case OpLsh64x64:
   315  		return rewriteValuePPC64_OpLsh64x64_0(v)
   316  	case OpLsh64x8:
   317  		return rewriteValuePPC64_OpLsh64x8_0(v)
   318  	case OpLsh8x16:
   319  		return rewriteValuePPC64_OpLsh8x16_0(v)
   320  	case OpLsh8x32:
   321  		return rewriteValuePPC64_OpLsh8x32_0(v)
   322  	case OpLsh8x64:
   323  		return rewriteValuePPC64_OpLsh8x64_0(v)
   324  	case OpLsh8x8:
   325  		return rewriteValuePPC64_OpLsh8x8_0(v)
   326  	case OpMod16:
   327  		return rewriteValuePPC64_OpMod16_0(v)
   328  	case OpMod16u:
   329  		return rewriteValuePPC64_OpMod16u_0(v)
   330  	case OpMod32:
   331  		return rewriteValuePPC64_OpMod32_0(v)
   332  	case OpMod32u:
   333  		return rewriteValuePPC64_OpMod32u_0(v)
   334  	case OpMod64:
   335  		return rewriteValuePPC64_OpMod64_0(v)
   336  	case OpMod64u:
   337  		return rewriteValuePPC64_OpMod64u_0(v)
   338  	case OpMod8:
   339  		return rewriteValuePPC64_OpMod8_0(v)
   340  	case OpMod8u:
   341  		return rewriteValuePPC64_OpMod8u_0(v)
   342  	case OpMove:
   343  		return rewriteValuePPC64_OpMove_0(v) || rewriteValuePPC64_OpMove_10(v)
   344  	case OpMul16:
   345  		return rewriteValuePPC64_OpMul16_0(v)
   346  	case OpMul32:
   347  		return rewriteValuePPC64_OpMul32_0(v)
   348  	case OpMul32F:
   349  		return rewriteValuePPC64_OpMul32F_0(v)
   350  	case OpMul64:
   351  		return rewriteValuePPC64_OpMul64_0(v)
   352  	case OpMul64F:
   353  		return rewriteValuePPC64_OpMul64F_0(v)
   354  	case OpMul64uhilo:
   355  		return rewriteValuePPC64_OpMul64uhilo_0(v)
   356  	case OpMul8:
   357  		return rewriteValuePPC64_OpMul8_0(v)
   358  	case OpNeg16:
   359  		return rewriteValuePPC64_OpNeg16_0(v)
   360  	case OpNeg32:
   361  		return rewriteValuePPC64_OpNeg32_0(v)
   362  	case OpNeg32F:
   363  		return rewriteValuePPC64_OpNeg32F_0(v)
   364  	case OpNeg64:
   365  		return rewriteValuePPC64_OpNeg64_0(v)
   366  	case OpNeg64F:
   367  		return rewriteValuePPC64_OpNeg64F_0(v)
   368  	case OpNeg8:
   369  		return rewriteValuePPC64_OpNeg8_0(v)
   370  	case OpNeq16:
   371  		return rewriteValuePPC64_OpNeq16_0(v)
   372  	case OpNeq32:
   373  		return rewriteValuePPC64_OpNeq32_0(v)
   374  	case OpNeq32F:
   375  		return rewriteValuePPC64_OpNeq32F_0(v)
   376  	case OpNeq64:
   377  		return rewriteValuePPC64_OpNeq64_0(v)
   378  	case OpNeq64F:
   379  		return rewriteValuePPC64_OpNeq64F_0(v)
   380  	case OpNeq8:
   381  		return rewriteValuePPC64_OpNeq8_0(v)
   382  	case OpNeqB:
   383  		return rewriteValuePPC64_OpNeqB_0(v)
   384  	case OpNeqPtr:
   385  		return rewriteValuePPC64_OpNeqPtr_0(v)
   386  	case OpNilCheck:
   387  		return rewriteValuePPC64_OpNilCheck_0(v)
   388  	case OpNot:
   389  		return rewriteValuePPC64_OpNot_0(v)
   390  	case OpOffPtr:
   391  		return rewriteValuePPC64_OpOffPtr_0(v)
   392  	case OpOr16:
   393  		return rewriteValuePPC64_OpOr16_0(v)
   394  	case OpOr32:
   395  		return rewriteValuePPC64_OpOr32_0(v)
   396  	case OpOr64:
   397  		return rewriteValuePPC64_OpOr64_0(v)
   398  	case OpOr8:
   399  		return rewriteValuePPC64_OpOr8_0(v)
   400  	case OpOrB:
   401  		return rewriteValuePPC64_OpOrB_0(v)
   402  	case OpPPC64ADD:
   403  		return rewriteValuePPC64_OpPPC64ADD_0(v)
   404  	case OpPPC64ADDconst:
   405  		return rewriteValuePPC64_OpPPC64ADDconst_0(v)
   406  	case OpPPC64AND:
   407  		return rewriteValuePPC64_OpPPC64AND_0(v) || rewriteValuePPC64_OpPPC64AND_10(v)
   408  	case OpPPC64ANDconst:
   409  		return rewriteValuePPC64_OpPPC64ANDconst_0(v) || rewriteValuePPC64_OpPPC64ANDconst_10(v)
   410  	case OpPPC64CMP:
   411  		return rewriteValuePPC64_OpPPC64CMP_0(v)
   412  	case OpPPC64CMPU:
   413  		return rewriteValuePPC64_OpPPC64CMPU_0(v)
   414  	case OpPPC64CMPUconst:
   415  		return rewriteValuePPC64_OpPPC64CMPUconst_0(v)
   416  	case OpPPC64CMPW:
   417  		return rewriteValuePPC64_OpPPC64CMPW_0(v)
   418  	case OpPPC64CMPWU:
   419  		return rewriteValuePPC64_OpPPC64CMPWU_0(v)
   420  	case OpPPC64CMPWUconst:
   421  		return rewriteValuePPC64_OpPPC64CMPWUconst_0(v)
   422  	case OpPPC64CMPWconst:
   423  		return rewriteValuePPC64_OpPPC64CMPWconst_0(v)
   424  	case OpPPC64CMPconst:
   425  		return rewriteValuePPC64_OpPPC64CMPconst_0(v)
   426  	case OpPPC64Equal:
   427  		return rewriteValuePPC64_OpPPC64Equal_0(v)
   428  	case OpPPC64FABS:
   429  		return rewriteValuePPC64_OpPPC64FABS_0(v)
   430  	case OpPPC64FADD:
   431  		return rewriteValuePPC64_OpPPC64FADD_0(v)
   432  	case OpPPC64FADDS:
   433  		return rewriteValuePPC64_OpPPC64FADDS_0(v)
   434  	case OpPPC64FCEIL:
   435  		return rewriteValuePPC64_OpPPC64FCEIL_0(v)
   436  	case OpPPC64FFLOOR:
   437  		return rewriteValuePPC64_OpPPC64FFLOOR_0(v)
   438  	case OpPPC64FGreaterEqual:
   439  		return rewriteValuePPC64_OpPPC64FGreaterEqual_0(v)
   440  	case OpPPC64FGreaterThan:
   441  		return rewriteValuePPC64_OpPPC64FGreaterThan_0(v)
   442  	case OpPPC64FLessEqual:
   443  		return rewriteValuePPC64_OpPPC64FLessEqual_0(v)
   444  	case OpPPC64FLessThan:
   445  		return rewriteValuePPC64_OpPPC64FLessThan_0(v)
   446  	case OpPPC64FMOVDload:
   447  		return rewriteValuePPC64_OpPPC64FMOVDload_0(v)
   448  	case OpPPC64FMOVDstore:
   449  		return rewriteValuePPC64_OpPPC64FMOVDstore_0(v)
   450  	case OpPPC64FMOVSload:
   451  		return rewriteValuePPC64_OpPPC64FMOVSload_0(v)
   452  	case OpPPC64FMOVSstore:
   453  		return rewriteValuePPC64_OpPPC64FMOVSstore_0(v)
   454  	case OpPPC64FNEG:
   455  		return rewriteValuePPC64_OpPPC64FNEG_0(v)
   456  	case OpPPC64FSQRT:
   457  		return rewriteValuePPC64_OpPPC64FSQRT_0(v)
   458  	case OpPPC64FSUB:
   459  		return rewriteValuePPC64_OpPPC64FSUB_0(v)
   460  	case OpPPC64FSUBS:
   461  		return rewriteValuePPC64_OpPPC64FSUBS_0(v)
   462  	case OpPPC64FTRUNC:
   463  		return rewriteValuePPC64_OpPPC64FTRUNC_0(v)
   464  	case OpPPC64GreaterEqual:
   465  		return rewriteValuePPC64_OpPPC64GreaterEqual_0(v)
   466  	case OpPPC64GreaterThan:
   467  		return rewriteValuePPC64_OpPPC64GreaterThan_0(v)
   468  	case OpPPC64ISEL:
   469  		return rewriteValuePPC64_OpPPC64ISEL_0(v) || rewriteValuePPC64_OpPPC64ISEL_10(v) || rewriteValuePPC64_OpPPC64ISEL_20(v)
   470  	case OpPPC64ISELB:
   471  		return rewriteValuePPC64_OpPPC64ISELB_0(v) || rewriteValuePPC64_OpPPC64ISELB_10(v) || rewriteValuePPC64_OpPPC64ISELB_20(v)
   472  	case OpPPC64LessEqual:
   473  		return rewriteValuePPC64_OpPPC64LessEqual_0(v)
   474  	case OpPPC64LessThan:
   475  		return rewriteValuePPC64_OpPPC64LessThan_0(v)
   476  	case OpPPC64MFVSRD:
   477  		return rewriteValuePPC64_OpPPC64MFVSRD_0(v)
   478  	case OpPPC64MOVBZload:
   479  		return rewriteValuePPC64_OpPPC64MOVBZload_0(v)
   480  	case OpPPC64MOVBZloadidx:
   481  		return rewriteValuePPC64_OpPPC64MOVBZloadidx_0(v)
   482  	case OpPPC64MOVBZreg:
   483  		return rewriteValuePPC64_OpPPC64MOVBZreg_0(v) || rewriteValuePPC64_OpPPC64MOVBZreg_10(v)
   484  	case OpPPC64MOVBreg:
   485  		return rewriteValuePPC64_OpPPC64MOVBreg_0(v) || rewriteValuePPC64_OpPPC64MOVBreg_10(v)
   486  	case OpPPC64MOVBstore:
   487  		return rewriteValuePPC64_OpPPC64MOVBstore_0(v) || rewriteValuePPC64_OpPPC64MOVBstore_10(v) || rewriteValuePPC64_OpPPC64MOVBstore_20(v)
   488  	case OpPPC64MOVBstoreidx:
   489  		return rewriteValuePPC64_OpPPC64MOVBstoreidx_0(v) || rewriteValuePPC64_OpPPC64MOVBstoreidx_10(v)
   490  	case OpPPC64MOVBstorezero:
   491  		return rewriteValuePPC64_OpPPC64MOVBstorezero_0(v)
   492  	case OpPPC64MOVDload:
   493  		return rewriteValuePPC64_OpPPC64MOVDload_0(v)
   494  	case OpPPC64MOVDloadidx:
   495  		return rewriteValuePPC64_OpPPC64MOVDloadidx_0(v)
   496  	case OpPPC64MOVDstore:
   497  		return rewriteValuePPC64_OpPPC64MOVDstore_0(v)
   498  	case OpPPC64MOVDstoreidx:
   499  		return rewriteValuePPC64_OpPPC64MOVDstoreidx_0(v)
   500  	case OpPPC64MOVDstorezero:
   501  		return rewriteValuePPC64_OpPPC64MOVDstorezero_0(v)
   502  	case OpPPC64MOVHBRstore:
   503  		return rewriteValuePPC64_OpPPC64MOVHBRstore_0(v)
   504  	case OpPPC64MOVHZload:
   505  		return rewriteValuePPC64_OpPPC64MOVHZload_0(v)
   506  	case OpPPC64MOVHZloadidx:
   507  		return rewriteValuePPC64_OpPPC64MOVHZloadidx_0(v)
   508  	case OpPPC64MOVHZreg:
   509  		return rewriteValuePPC64_OpPPC64MOVHZreg_0(v) || rewriteValuePPC64_OpPPC64MOVHZreg_10(v)
   510  	case OpPPC64MOVHload:
   511  		return rewriteValuePPC64_OpPPC64MOVHload_0(v)
   512  	case OpPPC64MOVHloadidx:
   513  		return rewriteValuePPC64_OpPPC64MOVHloadidx_0(v)
   514  	case OpPPC64MOVHreg:
   515  		return rewriteValuePPC64_OpPPC64MOVHreg_0(v) || rewriteValuePPC64_OpPPC64MOVHreg_10(v)
   516  	case OpPPC64MOVHstore:
   517  		return rewriteValuePPC64_OpPPC64MOVHstore_0(v)
   518  	case OpPPC64MOVHstoreidx:
   519  		return rewriteValuePPC64_OpPPC64MOVHstoreidx_0(v)
   520  	case OpPPC64MOVHstorezero:
   521  		return rewriteValuePPC64_OpPPC64MOVHstorezero_0(v)
   522  	case OpPPC64MOVWBRstore:
   523  		return rewriteValuePPC64_OpPPC64MOVWBRstore_0(v)
   524  	case OpPPC64MOVWZload:
   525  		return rewriteValuePPC64_OpPPC64MOVWZload_0(v)
   526  	case OpPPC64MOVWZloadidx:
   527  		return rewriteValuePPC64_OpPPC64MOVWZloadidx_0(v)
   528  	case OpPPC64MOVWZreg:
   529  		return rewriteValuePPC64_OpPPC64MOVWZreg_0(v) || rewriteValuePPC64_OpPPC64MOVWZreg_10(v) || rewriteValuePPC64_OpPPC64MOVWZreg_20(v)
   530  	case OpPPC64MOVWload:
   531  		return rewriteValuePPC64_OpPPC64MOVWload_0(v)
   532  	case OpPPC64MOVWloadidx:
   533  		return rewriteValuePPC64_OpPPC64MOVWloadidx_0(v)
   534  	case OpPPC64MOVWreg:
   535  		return rewriteValuePPC64_OpPPC64MOVWreg_0(v) || rewriteValuePPC64_OpPPC64MOVWreg_10(v)
   536  	case OpPPC64MOVWstore:
   537  		return rewriteValuePPC64_OpPPC64MOVWstore_0(v)
   538  	case OpPPC64MOVWstoreidx:
   539  		return rewriteValuePPC64_OpPPC64MOVWstoreidx_0(v)
   540  	case OpPPC64MOVWstorezero:
   541  		return rewriteValuePPC64_OpPPC64MOVWstorezero_0(v)
   542  	case OpPPC64MTVSRD:
   543  		return rewriteValuePPC64_OpPPC64MTVSRD_0(v)
   544  	case OpPPC64MaskIfNotCarry:
   545  		return rewriteValuePPC64_OpPPC64MaskIfNotCarry_0(v)
   546  	case OpPPC64NotEqual:
   547  		return rewriteValuePPC64_OpPPC64NotEqual_0(v)
   548  	case OpPPC64OR:
   549  		return rewriteValuePPC64_OpPPC64OR_0(v) || rewriteValuePPC64_OpPPC64OR_10(v) || rewriteValuePPC64_OpPPC64OR_20(v) || rewriteValuePPC64_OpPPC64OR_30(v) || rewriteValuePPC64_OpPPC64OR_40(v) || rewriteValuePPC64_OpPPC64OR_50(v) || rewriteValuePPC64_OpPPC64OR_60(v) || rewriteValuePPC64_OpPPC64OR_70(v) || rewriteValuePPC64_OpPPC64OR_80(v) || rewriteValuePPC64_OpPPC64OR_90(v) || rewriteValuePPC64_OpPPC64OR_100(v) || rewriteValuePPC64_OpPPC64OR_110(v)
   550  	case OpPPC64ORN:
   551  		return rewriteValuePPC64_OpPPC64ORN_0(v)
   552  	case OpPPC64ORconst:
   553  		return rewriteValuePPC64_OpPPC64ORconst_0(v)
   554  	case OpPPC64ROTL:
   555  		return rewriteValuePPC64_OpPPC64ROTL_0(v)
   556  	case OpPPC64ROTLW:
   557  		return rewriteValuePPC64_OpPPC64ROTLW_0(v)
   558  	case OpPPC64SUB:
   559  		return rewriteValuePPC64_OpPPC64SUB_0(v)
   560  	case OpPPC64XOR:
   561  		return rewriteValuePPC64_OpPPC64XOR_0(v) || rewriteValuePPC64_OpPPC64XOR_10(v)
   562  	case OpPPC64XORconst:
   563  		return rewriteValuePPC64_OpPPC64XORconst_0(v)
   564  	case OpPanicBounds:
   565  		return rewriteValuePPC64_OpPanicBounds_0(v)
   566  	case OpPopCount16:
   567  		return rewriteValuePPC64_OpPopCount16_0(v)
   568  	case OpPopCount32:
   569  		return rewriteValuePPC64_OpPopCount32_0(v)
   570  	case OpPopCount64:
   571  		return rewriteValuePPC64_OpPopCount64_0(v)
   572  	case OpPopCount8:
   573  		return rewriteValuePPC64_OpPopCount8_0(v)
   574  	case OpRotateLeft16:
   575  		return rewriteValuePPC64_OpRotateLeft16_0(v)
   576  	case OpRotateLeft32:
   577  		return rewriteValuePPC64_OpRotateLeft32_0(v)
   578  	case OpRotateLeft64:
   579  		return rewriteValuePPC64_OpRotateLeft64_0(v)
   580  	case OpRotateLeft8:
   581  		return rewriteValuePPC64_OpRotateLeft8_0(v)
   582  	case OpRound:
   583  		return rewriteValuePPC64_OpRound_0(v)
   584  	case OpRound32F:
   585  		return rewriteValuePPC64_OpRound32F_0(v)
   586  	case OpRound64F:
   587  		return rewriteValuePPC64_OpRound64F_0(v)
   588  	case OpRsh16Ux16:
   589  		return rewriteValuePPC64_OpRsh16Ux16_0(v)
   590  	case OpRsh16Ux32:
   591  		return rewriteValuePPC64_OpRsh16Ux32_0(v)
   592  	case OpRsh16Ux64:
   593  		return rewriteValuePPC64_OpRsh16Ux64_0(v)
   594  	case OpRsh16Ux8:
   595  		return rewriteValuePPC64_OpRsh16Ux8_0(v)
   596  	case OpRsh16x16:
   597  		return rewriteValuePPC64_OpRsh16x16_0(v)
   598  	case OpRsh16x32:
   599  		return rewriteValuePPC64_OpRsh16x32_0(v)
   600  	case OpRsh16x64:
   601  		return rewriteValuePPC64_OpRsh16x64_0(v)
   602  	case OpRsh16x8:
   603  		return rewriteValuePPC64_OpRsh16x8_0(v)
   604  	case OpRsh32Ux16:
   605  		return rewriteValuePPC64_OpRsh32Ux16_0(v)
   606  	case OpRsh32Ux32:
   607  		return rewriteValuePPC64_OpRsh32Ux32_0(v)
   608  	case OpRsh32Ux64:
   609  		return rewriteValuePPC64_OpRsh32Ux64_0(v) || rewriteValuePPC64_OpRsh32Ux64_10(v)
   610  	case OpRsh32Ux8:
   611  		return rewriteValuePPC64_OpRsh32Ux8_0(v)
   612  	case OpRsh32x16:
   613  		return rewriteValuePPC64_OpRsh32x16_0(v)
   614  	case OpRsh32x32:
   615  		return rewriteValuePPC64_OpRsh32x32_0(v)
   616  	case OpRsh32x64:
   617  		return rewriteValuePPC64_OpRsh32x64_0(v) || rewriteValuePPC64_OpRsh32x64_10(v)
   618  	case OpRsh32x8:
   619  		return rewriteValuePPC64_OpRsh32x8_0(v)
   620  	case OpRsh64Ux16:
   621  		return rewriteValuePPC64_OpRsh64Ux16_0(v)
   622  	case OpRsh64Ux32:
   623  		return rewriteValuePPC64_OpRsh64Ux32_0(v)
   624  	case OpRsh64Ux64:
   625  		return rewriteValuePPC64_OpRsh64Ux64_0(v) || rewriteValuePPC64_OpRsh64Ux64_10(v)
   626  	case OpRsh64Ux8:
   627  		return rewriteValuePPC64_OpRsh64Ux8_0(v)
   628  	case OpRsh64x16:
   629  		return rewriteValuePPC64_OpRsh64x16_0(v)
   630  	case OpRsh64x32:
   631  		return rewriteValuePPC64_OpRsh64x32_0(v)
   632  	case OpRsh64x64:
   633  		return rewriteValuePPC64_OpRsh64x64_0(v) || rewriteValuePPC64_OpRsh64x64_10(v)
   634  	case OpRsh64x8:
   635  		return rewriteValuePPC64_OpRsh64x8_0(v)
   636  	case OpRsh8Ux16:
   637  		return rewriteValuePPC64_OpRsh8Ux16_0(v)
   638  	case OpRsh8Ux32:
   639  		return rewriteValuePPC64_OpRsh8Ux32_0(v)
   640  	case OpRsh8Ux64:
   641  		return rewriteValuePPC64_OpRsh8Ux64_0(v)
   642  	case OpRsh8Ux8:
   643  		return rewriteValuePPC64_OpRsh8Ux8_0(v)
   644  	case OpRsh8x16:
   645  		return rewriteValuePPC64_OpRsh8x16_0(v)
   646  	case OpRsh8x32:
   647  		return rewriteValuePPC64_OpRsh8x32_0(v)
   648  	case OpRsh8x64:
   649  		return rewriteValuePPC64_OpRsh8x64_0(v)
   650  	case OpRsh8x8:
   651  		return rewriteValuePPC64_OpRsh8x8_0(v)
   652  	case OpSignExt16to32:
   653  		return rewriteValuePPC64_OpSignExt16to32_0(v)
   654  	case OpSignExt16to64:
   655  		return rewriteValuePPC64_OpSignExt16to64_0(v)
   656  	case OpSignExt32to64:
   657  		return rewriteValuePPC64_OpSignExt32to64_0(v)
   658  	case OpSignExt8to16:
   659  		return rewriteValuePPC64_OpSignExt8to16_0(v)
   660  	case OpSignExt8to32:
   661  		return rewriteValuePPC64_OpSignExt8to32_0(v)
   662  	case OpSignExt8to64:
   663  		return rewriteValuePPC64_OpSignExt8to64_0(v)
   664  	case OpSlicemask:
   665  		return rewriteValuePPC64_OpSlicemask_0(v)
   666  	case OpSqrt:
   667  		return rewriteValuePPC64_OpSqrt_0(v)
   668  	case OpStaticCall:
   669  		return rewriteValuePPC64_OpStaticCall_0(v)
   670  	case OpStore:
   671  		return rewriteValuePPC64_OpStore_0(v)
   672  	case OpSub16:
   673  		return rewriteValuePPC64_OpSub16_0(v)
   674  	case OpSub32:
   675  		return rewriteValuePPC64_OpSub32_0(v)
   676  	case OpSub32F:
   677  		return rewriteValuePPC64_OpSub32F_0(v)
   678  	case OpSub64:
   679  		return rewriteValuePPC64_OpSub64_0(v)
   680  	case OpSub64F:
   681  		return rewriteValuePPC64_OpSub64F_0(v)
   682  	case OpSub8:
   683  		return rewriteValuePPC64_OpSub8_0(v)
   684  	case OpSubPtr:
   685  		return rewriteValuePPC64_OpSubPtr_0(v)
   686  	case OpTrunc:
   687  		return rewriteValuePPC64_OpTrunc_0(v)
   688  	case OpTrunc16to8:
   689  		return rewriteValuePPC64_OpTrunc16to8_0(v)
   690  	case OpTrunc32to16:
   691  		return rewriteValuePPC64_OpTrunc32to16_0(v)
   692  	case OpTrunc32to8:
   693  		return rewriteValuePPC64_OpTrunc32to8_0(v)
   694  	case OpTrunc64to16:
   695  		return rewriteValuePPC64_OpTrunc64to16_0(v)
   696  	case OpTrunc64to32:
   697  		return rewriteValuePPC64_OpTrunc64to32_0(v)
   698  	case OpTrunc64to8:
   699  		return rewriteValuePPC64_OpTrunc64to8_0(v)
   700  	case OpWB:
   701  		return rewriteValuePPC64_OpWB_0(v)
   702  	case OpXor16:
   703  		return rewriteValuePPC64_OpXor16_0(v)
   704  	case OpXor32:
   705  		return rewriteValuePPC64_OpXor32_0(v)
   706  	case OpXor64:
   707  		return rewriteValuePPC64_OpXor64_0(v)
   708  	case OpXor8:
   709  		return rewriteValuePPC64_OpXor8_0(v)
   710  	case OpZero:
   711  		return rewriteValuePPC64_OpZero_0(v) || rewriteValuePPC64_OpZero_10(v)
   712  	case OpZeroExt16to32:
   713  		return rewriteValuePPC64_OpZeroExt16to32_0(v)
   714  	case OpZeroExt16to64:
   715  		return rewriteValuePPC64_OpZeroExt16to64_0(v)
   716  	case OpZeroExt32to64:
   717  		return rewriteValuePPC64_OpZeroExt32to64_0(v)
   718  	case OpZeroExt8to16:
   719  		return rewriteValuePPC64_OpZeroExt8to16_0(v)
   720  	case OpZeroExt8to32:
   721  		return rewriteValuePPC64_OpZeroExt8to32_0(v)
   722  	case OpZeroExt8to64:
   723  		return rewriteValuePPC64_OpZeroExt8to64_0(v)
   724  	}
   725  	return false
   726  }
   727  func rewriteValuePPC64_OpAbs_0(v *Value) bool {
   728  	// match: (Abs x)
   729  	// result: (FABS x)
   730  	for {
   731  		x := v.Args[0]
   732  		v.reset(OpPPC64FABS)
   733  		v.AddArg(x)
   734  		return true
   735  	}
   736  }
   737  func rewriteValuePPC64_OpAdd16_0(v *Value) bool {
   738  	// match: (Add16 x y)
   739  	// result: (ADD x y)
   740  	for {
   741  		y := v.Args[1]
   742  		x := v.Args[0]
   743  		v.reset(OpPPC64ADD)
   744  		v.AddArg(x)
   745  		v.AddArg(y)
   746  		return true
   747  	}
   748  }
   749  func rewriteValuePPC64_OpAdd32_0(v *Value) bool {
   750  	// match: (Add32 x y)
   751  	// result: (ADD x y)
   752  	for {
   753  		y := v.Args[1]
   754  		x := v.Args[0]
   755  		v.reset(OpPPC64ADD)
   756  		v.AddArg(x)
   757  		v.AddArg(y)
   758  		return true
   759  	}
   760  }
   761  func rewriteValuePPC64_OpAdd32F_0(v *Value) bool {
   762  	// match: (Add32F x y)
   763  	// result: (FADDS x y)
   764  	for {
   765  		y := v.Args[1]
   766  		x := v.Args[0]
   767  		v.reset(OpPPC64FADDS)
   768  		v.AddArg(x)
   769  		v.AddArg(y)
   770  		return true
   771  	}
   772  }
   773  func rewriteValuePPC64_OpAdd64_0(v *Value) bool {
   774  	// match: (Add64 x y)
   775  	// result: (ADD x y)
   776  	for {
   777  		y := v.Args[1]
   778  		x := v.Args[0]
   779  		v.reset(OpPPC64ADD)
   780  		v.AddArg(x)
   781  		v.AddArg(y)
   782  		return true
   783  	}
   784  }
   785  func rewriteValuePPC64_OpAdd64F_0(v *Value) bool {
   786  	// match: (Add64F x y)
   787  	// result: (FADD x y)
   788  	for {
   789  		y := v.Args[1]
   790  		x := v.Args[0]
   791  		v.reset(OpPPC64FADD)
   792  		v.AddArg(x)
   793  		v.AddArg(y)
   794  		return true
   795  	}
   796  }
   797  func rewriteValuePPC64_OpAdd64carry_0(v *Value) bool {
   798  	// match: (Add64carry x y c)
   799  	// result: (LoweredAdd64Carry x y c)
   800  	for {
   801  		c := v.Args[2]
   802  		x := v.Args[0]
   803  		y := v.Args[1]
   804  		v.reset(OpPPC64LoweredAdd64Carry)
   805  		v.AddArg(x)
   806  		v.AddArg(y)
   807  		v.AddArg(c)
   808  		return true
   809  	}
   810  }
   811  func rewriteValuePPC64_OpAdd8_0(v *Value) bool {
   812  	// match: (Add8 x y)
   813  	// result: (ADD x y)
   814  	for {
   815  		y := v.Args[1]
   816  		x := v.Args[0]
   817  		v.reset(OpPPC64ADD)
   818  		v.AddArg(x)
   819  		v.AddArg(y)
   820  		return true
   821  	}
   822  }
   823  func rewriteValuePPC64_OpAddPtr_0(v *Value) bool {
   824  	// match: (AddPtr x y)
   825  	// result: (ADD x y)
   826  	for {
   827  		y := v.Args[1]
   828  		x := v.Args[0]
   829  		v.reset(OpPPC64ADD)
   830  		v.AddArg(x)
   831  		v.AddArg(y)
   832  		return true
   833  	}
   834  }
   835  func rewriteValuePPC64_OpAddr_0(v *Value) bool {
   836  	// match: (Addr {sym} base)
   837  	// result: (MOVDaddr {sym} base)
   838  	for {
   839  		sym := v.Aux
   840  		base := v.Args[0]
   841  		v.reset(OpPPC64MOVDaddr)
   842  		v.Aux = sym
   843  		v.AddArg(base)
   844  		return true
   845  	}
   846  }
   847  func rewriteValuePPC64_OpAnd16_0(v *Value) bool {
   848  	// match: (And16 x y)
   849  	// result: (AND x y)
   850  	for {
   851  		y := v.Args[1]
   852  		x := v.Args[0]
   853  		v.reset(OpPPC64AND)
   854  		v.AddArg(x)
   855  		v.AddArg(y)
   856  		return true
   857  	}
   858  }
   859  func rewriteValuePPC64_OpAnd32_0(v *Value) bool {
   860  	// match: (And32 x y)
   861  	// result: (AND x y)
   862  	for {
   863  		y := v.Args[1]
   864  		x := v.Args[0]
   865  		v.reset(OpPPC64AND)
   866  		v.AddArg(x)
   867  		v.AddArg(y)
   868  		return true
   869  	}
   870  }
   871  func rewriteValuePPC64_OpAnd64_0(v *Value) bool {
   872  	// match: (And64 x y)
   873  	// result: (AND x y)
   874  	for {
   875  		y := v.Args[1]
   876  		x := v.Args[0]
   877  		v.reset(OpPPC64AND)
   878  		v.AddArg(x)
   879  		v.AddArg(y)
   880  		return true
   881  	}
   882  }
   883  func rewriteValuePPC64_OpAnd8_0(v *Value) bool {
   884  	// match: (And8 x y)
   885  	// result: (AND x y)
   886  	for {
   887  		y := v.Args[1]
   888  		x := v.Args[0]
   889  		v.reset(OpPPC64AND)
   890  		v.AddArg(x)
   891  		v.AddArg(y)
   892  		return true
   893  	}
   894  }
   895  func rewriteValuePPC64_OpAndB_0(v *Value) bool {
   896  	// match: (AndB x y)
   897  	// result: (AND x y)
   898  	for {
   899  		y := v.Args[1]
   900  		x := v.Args[0]
   901  		v.reset(OpPPC64AND)
   902  		v.AddArg(x)
   903  		v.AddArg(y)
   904  		return true
   905  	}
   906  }
   907  func rewriteValuePPC64_OpAtomicAdd32_0(v *Value) bool {
   908  	// match: (AtomicAdd32 ptr val mem)
   909  	// result: (LoweredAtomicAdd32 ptr val mem)
   910  	for {
   911  		mem := v.Args[2]
   912  		ptr := v.Args[0]
   913  		val := v.Args[1]
   914  		v.reset(OpPPC64LoweredAtomicAdd32)
   915  		v.AddArg(ptr)
   916  		v.AddArg(val)
   917  		v.AddArg(mem)
   918  		return true
   919  	}
   920  }
   921  func rewriteValuePPC64_OpAtomicAdd64_0(v *Value) bool {
   922  	// match: (AtomicAdd64 ptr val mem)
   923  	// result: (LoweredAtomicAdd64 ptr val mem)
   924  	for {
   925  		mem := v.Args[2]
   926  		ptr := v.Args[0]
   927  		val := v.Args[1]
   928  		v.reset(OpPPC64LoweredAtomicAdd64)
   929  		v.AddArg(ptr)
   930  		v.AddArg(val)
   931  		v.AddArg(mem)
   932  		return true
   933  	}
   934  }
   935  func rewriteValuePPC64_OpAtomicAnd8_0(v *Value) bool {
   936  	// match: (AtomicAnd8 ptr val mem)
   937  	// result: (LoweredAtomicAnd8 ptr val mem)
   938  	for {
   939  		mem := v.Args[2]
   940  		ptr := v.Args[0]
   941  		val := v.Args[1]
   942  		v.reset(OpPPC64LoweredAtomicAnd8)
   943  		v.AddArg(ptr)
   944  		v.AddArg(val)
   945  		v.AddArg(mem)
   946  		return true
   947  	}
   948  }
   949  func rewriteValuePPC64_OpAtomicCompareAndSwap32_0(v *Value) bool {
   950  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
   951  	// result: (LoweredAtomicCas32 [1] ptr old new_ mem)
   952  	for {
   953  		mem := v.Args[3]
   954  		ptr := v.Args[0]
   955  		old := v.Args[1]
   956  		new_ := v.Args[2]
   957  		v.reset(OpPPC64LoweredAtomicCas32)
   958  		v.AuxInt = 1
   959  		v.AddArg(ptr)
   960  		v.AddArg(old)
   961  		v.AddArg(new_)
   962  		v.AddArg(mem)
   963  		return true
   964  	}
   965  }
   966  func rewriteValuePPC64_OpAtomicCompareAndSwap64_0(v *Value) bool {
   967  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
   968  	// result: (LoweredAtomicCas64 [1] ptr old new_ mem)
   969  	for {
   970  		mem := v.Args[3]
   971  		ptr := v.Args[0]
   972  		old := v.Args[1]
   973  		new_ := v.Args[2]
   974  		v.reset(OpPPC64LoweredAtomicCas64)
   975  		v.AuxInt = 1
   976  		v.AddArg(ptr)
   977  		v.AddArg(old)
   978  		v.AddArg(new_)
   979  		v.AddArg(mem)
   980  		return true
   981  	}
   982  }
   983  func rewriteValuePPC64_OpAtomicCompareAndSwapRel32_0(v *Value) bool {
   984  	// match: (AtomicCompareAndSwapRel32 ptr old new_ mem)
   985  	// result: (LoweredAtomicCas32 [0] ptr old new_ mem)
   986  	for {
   987  		mem := v.Args[3]
   988  		ptr := v.Args[0]
   989  		old := v.Args[1]
   990  		new_ := v.Args[2]
   991  		v.reset(OpPPC64LoweredAtomicCas32)
   992  		v.AuxInt = 0
   993  		v.AddArg(ptr)
   994  		v.AddArg(old)
   995  		v.AddArg(new_)
   996  		v.AddArg(mem)
   997  		return true
   998  	}
   999  }
  1000  func rewriteValuePPC64_OpAtomicExchange32_0(v *Value) bool {
  1001  	// match: (AtomicExchange32 ptr val mem)
  1002  	// result: (LoweredAtomicExchange32 ptr val mem)
  1003  	for {
  1004  		mem := v.Args[2]
  1005  		ptr := v.Args[0]
  1006  		val := v.Args[1]
  1007  		v.reset(OpPPC64LoweredAtomicExchange32)
  1008  		v.AddArg(ptr)
  1009  		v.AddArg(val)
  1010  		v.AddArg(mem)
  1011  		return true
  1012  	}
  1013  }
  1014  func rewriteValuePPC64_OpAtomicExchange64_0(v *Value) bool {
  1015  	// match: (AtomicExchange64 ptr val mem)
  1016  	// result: (LoweredAtomicExchange64 ptr val mem)
  1017  	for {
  1018  		mem := v.Args[2]
  1019  		ptr := v.Args[0]
  1020  		val := v.Args[1]
  1021  		v.reset(OpPPC64LoweredAtomicExchange64)
  1022  		v.AddArg(ptr)
  1023  		v.AddArg(val)
  1024  		v.AddArg(mem)
  1025  		return true
  1026  	}
  1027  }
  1028  func rewriteValuePPC64_OpAtomicLoad32_0(v *Value) bool {
  1029  	// match: (AtomicLoad32 ptr mem)
  1030  	// result: (LoweredAtomicLoad32 [1] ptr mem)
  1031  	for {
  1032  		mem := v.Args[1]
  1033  		ptr := v.Args[0]
  1034  		v.reset(OpPPC64LoweredAtomicLoad32)
  1035  		v.AuxInt = 1
  1036  		v.AddArg(ptr)
  1037  		v.AddArg(mem)
  1038  		return true
  1039  	}
  1040  }
  1041  func rewriteValuePPC64_OpAtomicLoad64_0(v *Value) bool {
  1042  	// match: (AtomicLoad64 ptr mem)
  1043  	// result: (LoweredAtomicLoad64 [1] ptr mem)
  1044  	for {
  1045  		mem := v.Args[1]
  1046  		ptr := v.Args[0]
  1047  		v.reset(OpPPC64LoweredAtomicLoad64)
  1048  		v.AuxInt = 1
  1049  		v.AddArg(ptr)
  1050  		v.AddArg(mem)
  1051  		return true
  1052  	}
  1053  }
  1054  func rewriteValuePPC64_OpAtomicLoad8_0(v *Value) bool {
  1055  	// match: (AtomicLoad8 ptr mem)
  1056  	// result: (LoweredAtomicLoad8 [1] ptr mem)
  1057  	for {
  1058  		mem := v.Args[1]
  1059  		ptr := v.Args[0]
  1060  		v.reset(OpPPC64LoweredAtomicLoad8)
  1061  		v.AuxInt = 1
  1062  		v.AddArg(ptr)
  1063  		v.AddArg(mem)
  1064  		return true
  1065  	}
  1066  }
  1067  func rewriteValuePPC64_OpAtomicLoadAcq32_0(v *Value) bool {
  1068  	// match: (AtomicLoadAcq32 ptr mem)
  1069  	// result: (LoweredAtomicLoad32 [0] ptr mem)
  1070  	for {
  1071  		mem := v.Args[1]
  1072  		ptr := v.Args[0]
  1073  		v.reset(OpPPC64LoweredAtomicLoad32)
  1074  		v.AuxInt = 0
  1075  		v.AddArg(ptr)
  1076  		v.AddArg(mem)
  1077  		return true
  1078  	}
  1079  }
  1080  func rewriteValuePPC64_OpAtomicLoadPtr_0(v *Value) bool {
  1081  	// match: (AtomicLoadPtr ptr mem)
  1082  	// result: (LoweredAtomicLoadPtr [1] ptr mem)
  1083  	for {
  1084  		mem := v.Args[1]
  1085  		ptr := v.Args[0]
  1086  		v.reset(OpPPC64LoweredAtomicLoadPtr)
  1087  		v.AuxInt = 1
  1088  		v.AddArg(ptr)
  1089  		v.AddArg(mem)
  1090  		return true
  1091  	}
  1092  }
  1093  func rewriteValuePPC64_OpAtomicOr8_0(v *Value) bool {
  1094  	// match: (AtomicOr8 ptr val mem)
  1095  	// result: (LoweredAtomicOr8 ptr val mem)
  1096  	for {
  1097  		mem := v.Args[2]
  1098  		ptr := v.Args[0]
  1099  		val := v.Args[1]
  1100  		v.reset(OpPPC64LoweredAtomicOr8)
  1101  		v.AddArg(ptr)
  1102  		v.AddArg(val)
  1103  		v.AddArg(mem)
  1104  		return true
  1105  	}
  1106  }
  1107  func rewriteValuePPC64_OpAtomicStore32_0(v *Value) bool {
  1108  	// match: (AtomicStore32 ptr val mem)
  1109  	// result: (LoweredAtomicStore32 [1] ptr val mem)
  1110  	for {
  1111  		mem := v.Args[2]
  1112  		ptr := v.Args[0]
  1113  		val := v.Args[1]
  1114  		v.reset(OpPPC64LoweredAtomicStore32)
  1115  		v.AuxInt = 1
  1116  		v.AddArg(ptr)
  1117  		v.AddArg(val)
  1118  		v.AddArg(mem)
  1119  		return true
  1120  	}
  1121  }
  1122  func rewriteValuePPC64_OpAtomicStore64_0(v *Value) bool {
  1123  	// match: (AtomicStore64 ptr val mem)
  1124  	// result: (LoweredAtomicStore64 [1] ptr val mem)
  1125  	for {
  1126  		mem := v.Args[2]
  1127  		ptr := v.Args[0]
  1128  		val := v.Args[1]
  1129  		v.reset(OpPPC64LoweredAtomicStore64)
  1130  		v.AuxInt = 1
  1131  		v.AddArg(ptr)
  1132  		v.AddArg(val)
  1133  		v.AddArg(mem)
  1134  		return true
  1135  	}
  1136  }
  1137  func rewriteValuePPC64_OpAtomicStore8_0(v *Value) bool {
  1138  	// match: (AtomicStore8 ptr val mem)
  1139  	// result: (LoweredAtomicStore8 [1] ptr val mem)
  1140  	for {
  1141  		mem := v.Args[2]
  1142  		ptr := v.Args[0]
  1143  		val := v.Args[1]
  1144  		v.reset(OpPPC64LoweredAtomicStore8)
  1145  		v.AuxInt = 1
  1146  		v.AddArg(ptr)
  1147  		v.AddArg(val)
  1148  		v.AddArg(mem)
  1149  		return true
  1150  	}
  1151  }
  1152  func rewriteValuePPC64_OpAtomicStoreRel32_0(v *Value) bool {
  1153  	// match: (AtomicStoreRel32 ptr val mem)
  1154  	// result: (LoweredAtomicStore32 [0] ptr val mem)
  1155  	for {
  1156  		mem := v.Args[2]
  1157  		ptr := v.Args[0]
  1158  		val := v.Args[1]
  1159  		v.reset(OpPPC64LoweredAtomicStore32)
  1160  		v.AuxInt = 0
  1161  		v.AddArg(ptr)
  1162  		v.AddArg(val)
  1163  		v.AddArg(mem)
  1164  		return true
  1165  	}
  1166  }
  1167  func rewriteValuePPC64_OpAvg64u_0(v *Value) bool {
  1168  	b := v.Block
  1169  	// match: (Avg64u <t> x y)
  1170  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1171  	for {
  1172  		t := v.Type
  1173  		y := v.Args[1]
  1174  		x := v.Args[0]
  1175  		v.reset(OpPPC64ADD)
  1176  		v0 := b.NewValue0(v.Pos, OpPPC64SRDconst, t)
  1177  		v0.AuxInt = 1
  1178  		v1 := b.NewValue0(v.Pos, OpPPC64SUB, t)
  1179  		v1.AddArg(x)
  1180  		v1.AddArg(y)
  1181  		v0.AddArg(v1)
  1182  		v.AddArg(v0)
  1183  		v.AddArg(y)
  1184  		return true
  1185  	}
  1186  }
  1187  func rewriteValuePPC64_OpBitLen32_0(v *Value) bool {
  1188  	b := v.Block
  1189  	typ := &b.Func.Config.Types
  1190  	// match: (BitLen32 x)
  1191  	// result: (SUB (MOVDconst [32]) (CNTLZW <typ.Int> x))
  1192  	for {
  1193  		x := v.Args[0]
  1194  		v.reset(OpPPC64SUB)
  1195  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  1196  		v0.AuxInt = 32
  1197  		v.AddArg(v0)
  1198  		v1 := b.NewValue0(v.Pos, OpPPC64CNTLZW, typ.Int)
  1199  		v1.AddArg(x)
  1200  		v.AddArg(v1)
  1201  		return true
  1202  	}
  1203  }
  1204  func rewriteValuePPC64_OpBitLen64_0(v *Value) bool {
  1205  	b := v.Block
  1206  	typ := &b.Func.Config.Types
  1207  	// match: (BitLen64 x)
  1208  	// result: (SUB (MOVDconst [64]) (CNTLZD <typ.Int> x))
  1209  	for {
  1210  		x := v.Args[0]
  1211  		v.reset(OpPPC64SUB)
  1212  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  1213  		v0.AuxInt = 64
  1214  		v.AddArg(v0)
  1215  		v1 := b.NewValue0(v.Pos, OpPPC64CNTLZD, typ.Int)
  1216  		v1.AddArg(x)
  1217  		v.AddArg(v1)
  1218  		return true
  1219  	}
  1220  }
  1221  func rewriteValuePPC64_OpCeil_0(v *Value) bool {
  1222  	// match: (Ceil x)
  1223  	// result: (FCEIL x)
  1224  	for {
  1225  		x := v.Args[0]
  1226  		v.reset(OpPPC64FCEIL)
  1227  		v.AddArg(x)
  1228  		return true
  1229  	}
  1230  }
  1231  func rewriteValuePPC64_OpClosureCall_0(v *Value) bool {
  1232  	// match: (ClosureCall [argwid] entry closure mem)
  1233  	// result: (CALLclosure [argwid] entry closure mem)
  1234  	for {
  1235  		argwid := v.AuxInt
  1236  		mem := v.Args[2]
  1237  		entry := v.Args[0]
  1238  		closure := v.Args[1]
  1239  		v.reset(OpPPC64CALLclosure)
  1240  		v.AuxInt = argwid
  1241  		v.AddArg(entry)
  1242  		v.AddArg(closure)
  1243  		v.AddArg(mem)
  1244  		return true
  1245  	}
  1246  }
  1247  func rewriteValuePPC64_OpCom16_0(v *Value) bool {
  1248  	// match: (Com16 x)
  1249  	// result: (NOR x x)
  1250  	for {
  1251  		x := v.Args[0]
  1252  		v.reset(OpPPC64NOR)
  1253  		v.AddArg(x)
  1254  		v.AddArg(x)
  1255  		return true
  1256  	}
  1257  }
  1258  func rewriteValuePPC64_OpCom32_0(v *Value) bool {
  1259  	// match: (Com32 x)
  1260  	// result: (NOR x x)
  1261  	for {
  1262  		x := v.Args[0]
  1263  		v.reset(OpPPC64NOR)
  1264  		v.AddArg(x)
  1265  		v.AddArg(x)
  1266  		return true
  1267  	}
  1268  }
  1269  func rewriteValuePPC64_OpCom64_0(v *Value) bool {
  1270  	// match: (Com64 x)
  1271  	// result: (NOR x x)
  1272  	for {
  1273  		x := v.Args[0]
  1274  		v.reset(OpPPC64NOR)
  1275  		v.AddArg(x)
  1276  		v.AddArg(x)
  1277  		return true
  1278  	}
  1279  }
  1280  func rewriteValuePPC64_OpCom8_0(v *Value) bool {
  1281  	// match: (Com8 x)
  1282  	// result: (NOR x x)
  1283  	for {
  1284  		x := v.Args[0]
  1285  		v.reset(OpPPC64NOR)
  1286  		v.AddArg(x)
  1287  		v.AddArg(x)
  1288  		return true
  1289  	}
  1290  }
  1291  func rewriteValuePPC64_OpCondSelect_0(v *Value) bool {
  1292  	b := v.Block
  1293  	// match: (CondSelect x y bool)
  1294  	// cond: flagArg(bool) != nil
  1295  	// result: (ISEL [2] x y bool)
  1296  	for {
  1297  		bool := v.Args[2]
  1298  		x := v.Args[0]
  1299  		y := v.Args[1]
  1300  		if !(flagArg(bool) != nil) {
  1301  			break
  1302  		}
  1303  		v.reset(OpPPC64ISEL)
  1304  		v.AuxInt = 2
  1305  		v.AddArg(x)
  1306  		v.AddArg(y)
  1307  		v.AddArg(bool)
  1308  		return true
  1309  	}
  1310  	// match: (CondSelect x y bool)
  1311  	// cond: flagArg(bool) == nil
  1312  	// result: (ISEL [2] x y (CMPWconst [0] bool))
  1313  	for {
  1314  		bool := v.Args[2]
  1315  		x := v.Args[0]
  1316  		y := v.Args[1]
  1317  		if !(flagArg(bool) == nil) {
  1318  			break
  1319  		}
  1320  		v.reset(OpPPC64ISEL)
  1321  		v.AuxInt = 2
  1322  		v.AddArg(x)
  1323  		v.AddArg(y)
  1324  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
  1325  		v0.AuxInt = 0
  1326  		v0.AddArg(bool)
  1327  		v.AddArg(v0)
  1328  		return true
  1329  	}
  1330  	return false
  1331  }
  1332  func rewriteValuePPC64_OpConst16_0(v *Value) bool {
  1333  	// match: (Const16 [val])
  1334  	// result: (MOVDconst [val])
  1335  	for {
  1336  		val := v.AuxInt
  1337  		v.reset(OpPPC64MOVDconst)
  1338  		v.AuxInt = val
  1339  		return true
  1340  	}
  1341  }
  1342  func rewriteValuePPC64_OpConst32_0(v *Value) bool {
  1343  	// match: (Const32 [val])
  1344  	// result: (MOVDconst [val])
  1345  	for {
  1346  		val := v.AuxInt
  1347  		v.reset(OpPPC64MOVDconst)
  1348  		v.AuxInt = val
  1349  		return true
  1350  	}
  1351  }
  1352  func rewriteValuePPC64_OpConst32F_0(v *Value) bool {
  1353  	// match: (Const32F [val])
  1354  	// result: (FMOVSconst [val])
  1355  	for {
  1356  		val := v.AuxInt
  1357  		v.reset(OpPPC64FMOVSconst)
  1358  		v.AuxInt = val
  1359  		return true
  1360  	}
  1361  }
  1362  func rewriteValuePPC64_OpConst64_0(v *Value) bool {
  1363  	// match: (Const64 [val])
  1364  	// result: (MOVDconst [val])
  1365  	for {
  1366  		val := v.AuxInt
  1367  		v.reset(OpPPC64MOVDconst)
  1368  		v.AuxInt = val
  1369  		return true
  1370  	}
  1371  }
  1372  func rewriteValuePPC64_OpConst64F_0(v *Value) bool {
  1373  	// match: (Const64F [val])
  1374  	// result: (FMOVDconst [val])
  1375  	for {
  1376  		val := v.AuxInt
  1377  		v.reset(OpPPC64FMOVDconst)
  1378  		v.AuxInt = val
  1379  		return true
  1380  	}
  1381  }
  1382  func rewriteValuePPC64_OpConst8_0(v *Value) bool {
  1383  	// match: (Const8 [val])
  1384  	// result: (MOVDconst [val])
  1385  	for {
  1386  		val := v.AuxInt
  1387  		v.reset(OpPPC64MOVDconst)
  1388  		v.AuxInt = val
  1389  		return true
  1390  	}
  1391  }
  1392  func rewriteValuePPC64_OpConstBool_0(v *Value) bool {
  1393  	// match: (ConstBool [b])
  1394  	// result: (MOVDconst [b])
  1395  	for {
  1396  		b := v.AuxInt
  1397  		v.reset(OpPPC64MOVDconst)
  1398  		v.AuxInt = b
  1399  		return true
  1400  	}
  1401  }
  1402  func rewriteValuePPC64_OpConstNil_0(v *Value) bool {
  1403  	// match: (ConstNil)
  1404  	// result: (MOVDconst [0])
  1405  	for {
  1406  		v.reset(OpPPC64MOVDconst)
  1407  		v.AuxInt = 0
  1408  		return true
  1409  	}
  1410  }
  1411  func rewriteValuePPC64_OpCopysign_0(v *Value) bool {
  1412  	// match: (Copysign x y)
  1413  	// result: (FCPSGN y x)
  1414  	for {
  1415  		y := v.Args[1]
  1416  		x := v.Args[0]
  1417  		v.reset(OpPPC64FCPSGN)
  1418  		v.AddArg(y)
  1419  		v.AddArg(x)
  1420  		return true
  1421  	}
  1422  }
  1423  func rewriteValuePPC64_OpCtz16_0(v *Value) bool {
  1424  	b := v.Block
  1425  	typ := &b.Func.Config.Types
  1426  	// match: (Ctz16 x)
  1427  	// result: (POPCNTW (MOVHZreg (ANDN <typ.Int16> (ADDconst <typ.Int16> [-1] x) x)))
  1428  	for {
  1429  		x := v.Args[0]
  1430  		v.reset(OpPPC64POPCNTW)
  1431  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
  1432  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int16)
  1433  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int16)
  1434  		v2.AuxInt = -1
  1435  		v2.AddArg(x)
  1436  		v1.AddArg(v2)
  1437  		v1.AddArg(x)
  1438  		v0.AddArg(v1)
  1439  		v.AddArg(v0)
  1440  		return true
  1441  	}
  1442  }
  1443  func rewriteValuePPC64_OpCtz32_0(v *Value) bool {
  1444  	b := v.Block
  1445  	typ := &b.Func.Config.Types
  1446  	// match: (Ctz32 x)
  1447  	// cond: objabi.GOPPC64<=8
  1448  	// result: (POPCNTW (MOVWZreg (ANDN <typ.Int> (ADDconst <typ.Int> [-1] x) x)))
  1449  	for {
  1450  		x := v.Args[0]
  1451  		if !(objabi.GOPPC64 <= 8) {
  1452  			break
  1453  		}
  1454  		v.reset(OpPPC64POPCNTW)
  1455  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
  1456  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int)
  1457  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int)
  1458  		v2.AuxInt = -1
  1459  		v2.AddArg(x)
  1460  		v1.AddArg(v2)
  1461  		v1.AddArg(x)
  1462  		v0.AddArg(v1)
  1463  		v.AddArg(v0)
  1464  		return true
  1465  	}
  1466  	// match: (Ctz32 x)
  1467  	// result: (CNTTZW (MOVWZreg x))
  1468  	for {
  1469  		x := v.Args[0]
  1470  		v.reset(OpPPC64CNTTZW)
  1471  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
  1472  		v0.AddArg(x)
  1473  		v.AddArg(v0)
  1474  		return true
  1475  	}
  1476  }
  1477  func rewriteValuePPC64_OpCtz32NonZero_0(v *Value) bool {
  1478  	// match: (Ctz32NonZero x)
  1479  	// result: (Ctz32 x)
  1480  	for {
  1481  		x := v.Args[0]
  1482  		v.reset(OpCtz32)
  1483  		v.AddArg(x)
  1484  		return true
  1485  	}
  1486  }
  1487  func rewriteValuePPC64_OpCtz64_0(v *Value) bool {
  1488  	b := v.Block
  1489  	typ := &b.Func.Config.Types
  1490  	// match: (Ctz64 x)
  1491  	// cond: objabi.GOPPC64<=8
  1492  	// result: (POPCNTD (ANDN <typ.Int64> (ADDconst <typ.Int64> [-1] x) x))
  1493  	for {
  1494  		x := v.Args[0]
  1495  		if !(objabi.GOPPC64 <= 8) {
  1496  			break
  1497  		}
  1498  		v.reset(OpPPC64POPCNTD)
  1499  		v0 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int64)
  1500  		v1 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int64)
  1501  		v1.AuxInt = -1
  1502  		v1.AddArg(x)
  1503  		v0.AddArg(v1)
  1504  		v0.AddArg(x)
  1505  		v.AddArg(v0)
  1506  		return true
  1507  	}
  1508  	// match: (Ctz64 x)
  1509  	// result: (CNTTZD x)
  1510  	for {
  1511  		x := v.Args[0]
  1512  		v.reset(OpPPC64CNTTZD)
  1513  		v.AddArg(x)
  1514  		return true
  1515  	}
  1516  }
  1517  func rewriteValuePPC64_OpCtz64NonZero_0(v *Value) bool {
  1518  	// match: (Ctz64NonZero x)
  1519  	// result: (Ctz64 x)
  1520  	for {
  1521  		x := v.Args[0]
  1522  		v.reset(OpCtz64)
  1523  		v.AddArg(x)
  1524  		return true
  1525  	}
  1526  }
  1527  func rewriteValuePPC64_OpCtz8_0(v *Value) bool {
  1528  	b := v.Block
  1529  	typ := &b.Func.Config.Types
  1530  	// match: (Ctz8 x)
  1531  	// result: (POPCNTB (MOVBZreg (ANDN <typ.UInt8> (ADDconst <typ.UInt8> [-1] x) x)))
  1532  	for {
  1533  		x := v.Args[0]
  1534  		v.reset(OpPPC64POPCNTB)
  1535  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  1536  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.UInt8)
  1537  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.UInt8)
  1538  		v2.AuxInt = -1
  1539  		v2.AddArg(x)
  1540  		v1.AddArg(v2)
  1541  		v1.AddArg(x)
  1542  		v0.AddArg(v1)
  1543  		v.AddArg(v0)
  1544  		return true
  1545  	}
  1546  }
  1547  func rewriteValuePPC64_OpCvt32Fto32_0(v *Value) bool {
  1548  	b := v.Block
  1549  	typ := &b.Func.Config.Types
  1550  	// match: (Cvt32Fto32 x)
  1551  	// result: (MFVSRD (FCTIWZ x))
  1552  	for {
  1553  		x := v.Args[0]
  1554  		v.reset(OpPPC64MFVSRD)
  1555  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, typ.Float64)
  1556  		v0.AddArg(x)
  1557  		v.AddArg(v0)
  1558  		return true
  1559  	}
  1560  }
  1561  func rewriteValuePPC64_OpCvt32Fto64_0(v *Value) bool {
  1562  	b := v.Block
  1563  	typ := &b.Func.Config.Types
  1564  	// match: (Cvt32Fto64 x)
  1565  	// result: (MFVSRD (FCTIDZ x))
  1566  	for {
  1567  		x := v.Args[0]
  1568  		v.reset(OpPPC64MFVSRD)
  1569  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, typ.Float64)
  1570  		v0.AddArg(x)
  1571  		v.AddArg(v0)
  1572  		return true
  1573  	}
  1574  }
  1575  func rewriteValuePPC64_OpCvt32Fto64F_0(v *Value) bool {
  1576  	// match: (Cvt32Fto64F x)
  1577  	// result: x
  1578  	for {
  1579  		x := v.Args[0]
  1580  		v.reset(OpCopy)
  1581  		v.Type = x.Type
  1582  		v.AddArg(x)
  1583  		return true
  1584  	}
  1585  }
  1586  func rewriteValuePPC64_OpCvt32to32F_0(v *Value) bool {
  1587  	b := v.Block
  1588  	typ := &b.Func.Config.Types
  1589  	// match: (Cvt32to32F x)
  1590  	// result: (FCFIDS (MTVSRD (SignExt32to64 x)))
  1591  	for {
  1592  		x := v.Args[0]
  1593  		v.reset(OpPPC64FCFIDS)
  1594  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1595  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1596  		v1.AddArg(x)
  1597  		v0.AddArg(v1)
  1598  		v.AddArg(v0)
  1599  		return true
  1600  	}
  1601  }
  1602  func rewriteValuePPC64_OpCvt32to64F_0(v *Value) bool {
  1603  	b := v.Block
  1604  	typ := &b.Func.Config.Types
  1605  	// match: (Cvt32to64F x)
  1606  	// result: (FCFID (MTVSRD (SignExt32to64 x)))
  1607  	for {
  1608  		x := v.Args[0]
  1609  		v.reset(OpPPC64FCFID)
  1610  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1611  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1612  		v1.AddArg(x)
  1613  		v0.AddArg(v1)
  1614  		v.AddArg(v0)
  1615  		return true
  1616  	}
  1617  }
  1618  func rewriteValuePPC64_OpCvt64Fto32_0(v *Value) bool {
  1619  	b := v.Block
  1620  	typ := &b.Func.Config.Types
  1621  	// match: (Cvt64Fto32 x)
  1622  	// result: (MFVSRD (FCTIWZ x))
  1623  	for {
  1624  		x := v.Args[0]
  1625  		v.reset(OpPPC64MFVSRD)
  1626  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, typ.Float64)
  1627  		v0.AddArg(x)
  1628  		v.AddArg(v0)
  1629  		return true
  1630  	}
  1631  }
  1632  func rewriteValuePPC64_OpCvt64Fto32F_0(v *Value) bool {
  1633  	// match: (Cvt64Fto32F x)
  1634  	// result: (FRSP x)
  1635  	for {
  1636  		x := v.Args[0]
  1637  		v.reset(OpPPC64FRSP)
  1638  		v.AddArg(x)
  1639  		return true
  1640  	}
  1641  }
  1642  func rewriteValuePPC64_OpCvt64Fto64_0(v *Value) bool {
  1643  	b := v.Block
  1644  	typ := &b.Func.Config.Types
  1645  	// match: (Cvt64Fto64 x)
  1646  	// result: (MFVSRD (FCTIDZ x))
  1647  	for {
  1648  		x := v.Args[0]
  1649  		v.reset(OpPPC64MFVSRD)
  1650  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, typ.Float64)
  1651  		v0.AddArg(x)
  1652  		v.AddArg(v0)
  1653  		return true
  1654  	}
  1655  }
  1656  func rewriteValuePPC64_OpCvt64to32F_0(v *Value) bool {
  1657  	b := v.Block
  1658  	typ := &b.Func.Config.Types
  1659  	// match: (Cvt64to32F x)
  1660  	// result: (FCFIDS (MTVSRD x))
  1661  	for {
  1662  		x := v.Args[0]
  1663  		v.reset(OpPPC64FCFIDS)
  1664  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1665  		v0.AddArg(x)
  1666  		v.AddArg(v0)
  1667  		return true
  1668  	}
  1669  }
  1670  func rewriteValuePPC64_OpCvt64to64F_0(v *Value) bool {
  1671  	b := v.Block
  1672  	typ := &b.Func.Config.Types
  1673  	// match: (Cvt64to64F x)
  1674  	// result: (FCFID (MTVSRD x))
  1675  	for {
  1676  		x := v.Args[0]
  1677  		v.reset(OpPPC64FCFID)
  1678  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1679  		v0.AddArg(x)
  1680  		v.AddArg(v0)
  1681  		return true
  1682  	}
  1683  }
  1684  func rewriteValuePPC64_OpDiv16_0(v *Value) bool {
  1685  	b := v.Block
  1686  	typ := &b.Func.Config.Types
  1687  	// match: (Div16 x y)
  1688  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
  1689  	for {
  1690  		y := v.Args[1]
  1691  		x := v.Args[0]
  1692  		v.reset(OpPPC64DIVW)
  1693  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1694  		v0.AddArg(x)
  1695  		v.AddArg(v0)
  1696  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1697  		v1.AddArg(y)
  1698  		v.AddArg(v1)
  1699  		return true
  1700  	}
  1701  }
  1702  func rewriteValuePPC64_OpDiv16u_0(v *Value) bool {
  1703  	b := v.Block
  1704  	typ := &b.Func.Config.Types
  1705  	// match: (Div16u x y)
  1706  	// result: (DIVWU (ZeroExt16to32 x) (ZeroExt16to32 y))
  1707  	for {
  1708  		y := v.Args[1]
  1709  		x := v.Args[0]
  1710  		v.reset(OpPPC64DIVWU)
  1711  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1712  		v0.AddArg(x)
  1713  		v.AddArg(v0)
  1714  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1715  		v1.AddArg(y)
  1716  		v.AddArg(v1)
  1717  		return true
  1718  	}
  1719  }
  1720  func rewriteValuePPC64_OpDiv32_0(v *Value) bool {
  1721  	// match: (Div32 x y)
  1722  	// result: (DIVW x y)
  1723  	for {
  1724  		y := v.Args[1]
  1725  		x := v.Args[0]
  1726  		v.reset(OpPPC64DIVW)
  1727  		v.AddArg(x)
  1728  		v.AddArg(y)
  1729  		return true
  1730  	}
  1731  }
  1732  func rewriteValuePPC64_OpDiv32F_0(v *Value) bool {
  1733  	// match: (Div32F x y)
  1734  	// result: (FDIVS x y)
  1735  	for {
  1736  		y := v.Args[1]
  1737  		x := v.Args[0]
  1738  		v.reset(OpPPC64FDIVS)
  1739  		v.AddArg(x)
  1740  		v.AddArg(y)
  1741  		return true
  1742  	}
  1743  }
  1744  func rewriteValuePPC64_OpDiv32u_0(v *Value) bool {
  1745  	// match: (Div32u x y)
  1746  	// result: (DIVWU x y)
  1747  	for {
  1748  		y := v.Args[1]
  1749  		x := v.Args[0]
  1750  		v.reset(OpPPC64DIVWU)
  1751  		v.AddArg(x)
  1752  		v.AddArg(y)
  1753  		return true
  1754  	}
  1755  }
  1756  func rewriteValuePPC64_OpDiv64_0(v *Value) bool {
  1757  	// match: (Div64 x y)
  1758  	// result: (DIVD x y)
  1759  	for {
  1760  		y := v.Args[1]
  1761  		x := v.Args[0]
  1762  		v.reset(OpPPC64DIVD)
  1763  		v.AddArg(x)
  1764  		v.AddArg(y)
  1765  		return true
  1766  	}
  1767  }
  1768  func rewriteValuePPC64_OpDiv64F_0(v *Value) bool {
  1769  	// match: (Div64F x y)
  1770  	// result: (FDIV x y)
  1771  	for {
  1772  		y := v.Args[1]
  1773  		x := v.Args[0]
  1774  		v.reset(OpPPC64FDIV)
  1775  		v.AddArg(x)
  1776  		v.AddArg(y)
  1777  		return true
  1778  	}
  1779  }
  1780  func rewriteValuePPC64_OpDiv64u_0(v *Value) bool {
  1781  	// match: (Div64u x y)
  1782  	// result: (DIVDU x y)
  1783  	for {
  1784  		y := v.Args[1]
  1785  		x := v.Args[0]
  1786  		v.reset(OpPPC64DIVDU)
  1787  		v.AddArg(x)
  1788  		v.AddArg(y)
  1789  		return true
  1790  	}
  1791  }
  1792  func rewriteValuePPC64_OpDiv8_0(v *Value) bool {
  1793  	b := v.Block
  1794  	typ := &b.Func.Config.Types
  1795  	// match: (Div8 x y)
  1796  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
  1797  	for {
  1798  		y := v.Args[1]
  1799  		x := v.Args[0]
  1800  		v.reset(OpPPC64DIVW)
  1801  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1802  		v0.AddArg(x)
  1803  		v.AddArg(v0)
  1804  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1805  		v1.AddArg(y)
  1806  		v.AddArg(v1)
  1807  		return true
  1808  	}
  1809  }
  1810  func rewriteValuePPC64_OpDiv8u_0(v *Value) bool {
  1811  	b := v.Block
  1812  	typ := &b.Func.Config.Types
  1813  	// match: (Div8u x y)
  1814  	// result: (DIVWU (ZeroExt8to32 x) (ZeroExt8to32 y))
  1815  	for {
  1816  		y := v.Args[1]
  1817  		x := v.Args[0]
  1818  		v.reset(OpPPC64DIVWU)
  1819  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1820  		v0.AddArg(x)
  1821  		v.AddArg(v0)
  1822  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1823  		v1.AddArg(y)
  1824  		v.AddArg(v1)
  1825  		return true
  1826  	}
  1827  }
  1828  func rewriteValuePPC64_OpEq16_0(v *Value) bool {
  1829  	b := v.Block
  1830  	typ := &b.Func.Config.Types
  1831  	// match: (Eq16 x y)
  1832  	// cond: isSigned(x.Type) && isSigned(y.Type)
  1833  	// result: (Equal (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  1834  	for {
  1835  		y := v.Args[1]
  1836  		x := v.Args[0]
  1837  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  1838  			break
  1839  		}
  1840  		v.reset(OpPPC64Equal)
  1841  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1842  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1843  		v1.AddArg(x)
  1844  		v0.AddArg(v1)
  1845  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1846  		v2.AddArg(y)
  1847  		v0.AddArg(v2)
  1848  		v.AddArg(v0)
  1849  		return true
  1850  	}
  1851  	// match: (Eq16 x y)
  1852  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  1853  	for {
  1854  		y := v.Args[1]
  1855  		x := v.Args[0]
  1856  		v.reset(OpPPC64Equal)
  1857  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1858  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1859  		v1.AddArg(x)
  1860  		v0.AddArg(v1)
  1861  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1862  		v2.AddArg(y)
  1863  		v0.AddArg(v2)
  1864  		v.AddArg(v0)
  1865  		return true
  1866  	}
  1867  }
  1868  func rewriteValuePPC64_OpEq32_0(v *Value) bool {
  1869  	b := v.Block
  1870  	// match: (Eq32 x y)
  1871  	// result: (Equal (CMPW x y))
  1872  	for {
  1873  		y := v.Args[1]
  1874  		x := v.Args[0]
  1875  		v.reset(OpPPC64Equal)
  1876  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1877  		v0.AddArg(x)
  1878  		v0.AddArg(y)
  1879  		v.AddArg(v0)
  1880  		return true
  1881  	}
  1882  }
  1883  func rewriteValuePPC64_OpEq32F_0(v *Value) bool {
  1884  	b := v.Block
  1885  	// match: (Eq32F x y)
  1886  	// result: (Equal (FCMPU x y))
  1887  	for {
  1888  		y := v.Args[1]
  1889  		x := v.Args[0]
  1890  		v.reset(OpPPC64Equal)
  1891  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1892  		v0.AddArg(x)
  1893  		v0.AddArg(y)
  1894  		v.AddArg(v0)
  1895  		return true
  1896  	}
  1897  }
  1898  func rewriteValuePPC64_OpEq64_0(v *Value) bool {
  1899  	b := v.Block
  1900  	// match: (Eq64 x y)
  1901  	// result: (Equal (CMP x y))
  1902  	for {
  1903  		y := v.Args[1]
  1904  		x := v.Args[0]
  1905  		v.reset(OpPPC64Equal)
  1906  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  1907  		v0.AddArg(x)
  1908  		v0.AddArg(y)
  1909  		v.AddArg(v0)
  1910  		return true
  1911  	}
  1912  }
  1913  func rewriteValuePPC64_OpEq64F_0(v *Value) bool {
  1914  	b := v.Block
  1915  	// match: (Eq64F x y)
  1916  	// result: (Equal (FCMPU x y))
  1917  	for {
  1918  		y := v.Args[1]
  1919  		x := v.Args[0]
  1920  		v.reset(OpPPC64Equal)
  1921  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1922  		v0.AddArg(x)
  1923  		v0.AddArg(y)
  1924  		v.AddArg(v0)
  1925  		return true
  1926  	}
  1927  }
  1928  func rewriteValuePPC64_OpEq8_0(v *Value) bool {
  1929  	b := v.Block
  1930  	typ := &b.Func.Config.Types
  1931  	// match: (Eq8 x y)
  1932  	// cond: isSigned(x.Type) && isSigned(y.Type)
  1933  	// result: (Equal (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  1934  	for {
  1935  		y := v.Args[1]
  1936  		x := v.Args[0]
  1937  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  1938  			break
  1939  		}
  1940  		v.reset(OpPPC64Equal)
  1941  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1942  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1943  		v1.AddArg(x)
  1944  		v0.AddArg(v1)
  1945  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1946  		v2.AddArg(y)
  1947  		v0.AddArg(v2)
  1948  		v.AddArg(v0)
  1949  		return true
  1950  	}
  1951  	// match: (Eq8 x y)
  1952  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  1953  	for {
  1954  		y := v.Args[1]
  1955  		x := v.Args[0]
  1956  		v.reset(OpPPC64Equal)
  1957  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1958  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1959  		v1.AddArg(x)
  1960  		v0.AddArg(v1)
  1961  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1962  		v2.AddArg(y)
  1963  		v0.AddArg(v2)
  1964  		v.AddArg(v0)
  1965  		return true
  1966  	}
  1967  }
  1968  func rewriteValuePPC64_OpEqB_0(v *Value) bool {
  1969  	b := v.Block
  1970  	typ := &b.Func.Config.Types
  1971  	// match: (EqB x y)
  1972  	// result: (ANDconst [1] (EQV x y))
  1973  	for {
  1974  		y := v.Args[1]
  1975  		x := v.Args[0]
  1976  		v.reset(OpPPC64ANDconst)
  1977  		v.AuxInt = 1
  1978  		v0 := b.NewValue0(v.Pos, OpPPC64EQV, typ.Int64)
  1979  		v0.AddArg(x)
  1980  		v0.AddArg(y)
  1981  		v.AddArg(v0)
  1982  		return true
  1983  	}
  1984  }
  1985  func rewriteValuePPC64_OpEqPtr_0(v *Value) bool {
  1986  	b := v.Block
  1987  	// match: (EqPtr x y)
  1988  	// result: (Equal (CMP x y))
  1989  	for {
  1990  		y := v.Args[1]
  1991  		x := v.Args[0]
  1992  		v.reset(OpPPC64Equal)
  1993  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  1994  		v0.AddArg(x)
  1995  		v0.AddArg(y)
  1996  		v.AddArg(v0)
  1997  		return true
  1998  	}
  1999  }
  2000  func rewriteValuePPC64_OpFMA_0(v *Value) bool {
  2001  	// match: (FMA x y z)
  2002  	// result: (FMADD x y z)
  2003  	for {
  2004  		z := v.Args[2]
  2005  		x := v.Args[0]
  2006  		y := v.Args[1]
  2007  		v.reset(OpPPC64FMADD)
  2008  		v.AddArg(x)
  2009  		v.AddArg(y)
  2010  		v.AddArg(z)
  2011  		return true
  2012  	}
  2013  }
  2014  func rewriteValuePPC64_OpFloor_0(v *Value) bool {
  2015  	// match: (Floor x)
  2016  	// result: (FFLOOR x)
  2017  	for {
  2018  		x := v.Args[0]
  2019  		v.reset(OpPPC64FFLOOR)
  2020  		v.AddArg(x)
  2021  		return true
  2022  	}
  2023  }
  2024  func rewriteValuePPC64_OpGeq16_0(v *Value) bool {
  2025  	b := v.Block
  2026  	typ := &b.Func.Config.Types
  2027  	// match: (Geq16 x y)
  2028  	// result: (GreaterEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2029  	for {
  2030  		y := v.Args[1]
  2031  		x := v.Args[0]
  2032  		v.reset(OpPPC64GreaterEqual)
  2033  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2034  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2035  		v1.AddArg(x)
  2036  		v0.AddArg(v1)
  2037  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2038  		v2.AddArg(y)
  2039  		v0.AddArg(v2)
  2040  		v.AddArg(v0)
  2041  		return true
  2042  	}
  2043  }
  2044  func rewriteValuePPC64_OpGeq16U_0(v *Value) bool {
  2045  	b := v.Block
  2046  	typ := &b.Func.Config.Types
  2047  	// match: (Geq16U x y)
  2048  	// result: (GreaterEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2049  	for {
  2050  		y := v.Args[1]
  2051  		x := v.Args[0]
  2052  		v.reset(OpPPC64GreaterEqual)
  2053  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2054  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2055  		v1.AddArg(x)
  2056  		v0.AddArg(v1)
  2057  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2058  		v2.AddArg(y)
  2059  		v0.AddArg(v2)
  2060  		v.AddArg(v0)
  2061  		return true
  2062  	}
  2063  }
  2064  func rewriteValuePPC64_OpGeq32_0(v *Value) bool {
  2065  	b := v.Block
  2066  	// match: (Geq32 x y)
  2067  	// result: (GreaterEqual (CMPW x y))
  2068  	for {
  2069  		y := v.Args[1]
  2070  		x := v.Args[0]
  2071  		v.reset(OpPPC64GreaterEqual)
  2072  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2073  		v0.AddArg(x)
  2074  		v0.AddArg(y)
  2075  		v.AddArg(v0)
  2076  		return true
  2077  	}
  2078  }
  2079  func rewriteValuePPC64_OpGeq32F_0(v *Value) bool {
  2080  	b := v.Block
  2081  	// match: (Geq32F x y)
  2082  	// result: (FGreaterEqual (FCMPU x y))
  2083  	for {
  2084  		y := v.Args[1]
  2085  		x := v.Args[0]
  2086  		v.reset(OpPPC64FGreaterEqual)
  2087  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2088  		v0.AddArg(x)
  2089  		v0.AddArg(y)
  2090  		v.AddArg(v0)
  2091  		return true
  2092  	}
  2093  }
  2094  func rewriteValuePPC64_OpGeq32U_0(v *Value) bool {
  2095  	b := v.Block
  2096  	// match: (Geq32U x y)
  2097  	// result: (GreaterEqual (CMPWU x y))
  2098  	for {
  2099  		y := v.Args[1]
  2100  		x := v.Args[0]
  2101  		v.reset(OpPPC64GreaterEqual)
  2102  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2103  		v0.AddArg(x)
  2104  		v0.AddArg(y)
  2105  		v.AddArg(v0)
  2106  		return true
  2107  	}
  2108  }
  2109  func rewriteValuePPC64_OpGeq64_0(v *Value) bool {
  2110  	b := v.Block
  2111  	// match: (Geq64 x y)
  2112  	// result: (GreaterEqual (CMP x y))
  2113  	for {
  2114  		y := v.Args[1]
  2115  		x := v.Args[0]
  2116  		v.reset(OpPPC64GreaterEqual)
  2117  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2118  		v0.AddArg(x)
  2119  		v0.AddArg(y)
  2120  		v.AddArg(v0)
  2121  		return true
  2122  	}
  2123  }
  2124  func rewriteValuePPC64_OpGeq64F_0(v *Value) bool {
  2125  	b := v.Block
  2126  	// match: (Geq64F x y)
  2127  	// result: (FGreaterEqual (FCMPU x y))
  2128  	for {
  2129  		y := v.Args[1]
  2130  		x := v.Args[0]
  2131  		v.reset(OpPPC64FGreaterEqual)
  2132  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2133  		v0.AddArg(x)
  2134  		v0.AddArg(y)
  2135  		v.AddArg(v0)
  2136  		return true
  2137  	}
  2138  }
  2139  func rewriteValuePPC64_OpGeq64U_0(v *Value) bool {
  2140  	b := v.Block
  2141  	// match: (Geq64U x y)
  2142  	// result: (GreaterEqual (CMPU x y))
  2143  	for {
  2144  		y := v.Args[1]
  2145  		x := v.Args[0]
  2146  		v.reset(OpPPC64GreaterEqual)
  2147  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2148  		v0.AddArg(x)
  2149  		v0.AddArg(y)
  2150  		v.AddArg(v0)
  2151  		return true
  2152  	}
  2153  }
  2154  func rewriteValuePPC64_OpGeq8_0(v *Value) bool {
  2155  	b := v.Block
  2156  	typ := &b.Func.Config.Types
  2157  	// match: (Geq8 x y)
  2158  	// result: (GreaterEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2159  	for {
  2160  		y := v.Args[1]
  2161  		x := v.Args[0]
  2162  		v.reset(OpPPC64GreaterEqual)
  2163  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2164  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2165  		v1.AddArg(x)
  2166  		v0.AddArg(v1)
  2167  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2168  		v2.AddArg(y)
  2169  		v0.AddArg(v2)
  2170  		v.AddArg(v0)
  2171  		return true
  2172  	}
  2173  }
  2174  func rewriteValuePPC64_OpGeq8U_0(v *Value) bool {
  2175  	b := v.Block
  2176  	typ := &b.Func.Config.Types
  2177  	// match: (Geq8U x y)
  2178  	// result: (GreaterEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2179  	for {
  2180  		y := v.Args[1]
  2181  		x := v.Args[0]
  2182  		v.reset(OpPPC64GreaterEqual)
  2183  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2184  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2185  		v1.AddArg(x)
  2186  		v0.AddArg(v1)
  2187  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2188  		v2.AddArg(y)
  2189  		v0.AddArg(v2)
  2190  		v.AddArg(v0)
  2191  		return true
  2192  	}
  2193  }
  2194  func rewriteValuePPC64_OpGetCallerPC_0(v *Value) bool {
  2195  	// match: (GetCallerPC)
  2196  	// result: (LoweredGetCallerPC)
  2197  	for {
  2198  		v.reset(OpPPC64LoweredGetCallerPC)
  2199  		return true
  2200  	}
  2201  }
  2202  func rewriteValuePPC64_OpGetCallerSP_0(v *Value) bool {
  2203  	// match: (GetCallerSP)
  2204  	// result: (LoweredGetCallerSP)
  2205  	for {
  2206  		v.reset(OpPPC64LoweredGetCallerSP)
  2207  		return true
  2208  	}
  2209  }
  2210  func rewriteValuePPC64_OpGetClosurePtr_0(v *Value) bool {
  2211  	// match: (GetClosurePtr)
  2212  	// result: (LoweredGetClosurePtr)
  2213  	for {
  2214  		v.reset(OpPPC64LoweredGetClosurePtr)
  2215  		return true
  2216  	}
  2217  }
  2218  func rewriteValuePPC64_OpGreater16_0(v *Value) bool {
  2219  	b := v.Block
  2220  	typ := &b.Func.Config.Types
  2221  	// match: (Greater16 x y)
  2222  	// result: (GreaterThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2223  	for {
  2224  		y := v.Args[1]
  2225  		x := v.Args[0]
  2226  		v.reset(OpPPC64GreaterThan)
  2227  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2228  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2229  		v1.AddArg(x)
  2230  		v0.AddArg(v1)
  2231  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2232  		v2.AddArg(y)
  2233  		v0.AddArg(v2)
  2234  		v.AddArg(v0)
  2235  		return true
  2236  	}
  2237  }
  2238  func rewriteValuePPC64_OpGreater16U_0(v *Value) bool {
  2239  	b := v.Block
  2240  	typ := &b.Func.Config.Types
  2241  	// match: (Greater16U x y)
  2242  	// result: (GreaterThan (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2243  	for {
  2244  		y := v.Args[1]
  2245  		x := v.Args[0]
  2246  		v.reset(OpPPC64GreaterThan)
  2247  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2248  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2249  		v1.AddArg(x)
  2250  		v0.AddArg(v1)
  2251  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2252  		v2.AddArg(y)
  2253  		v0.AddArg(v2)
  2254  		v.AddArg(v0)
  2255  		return true
  2256  	}
  2257  }
  2258  func rewriteValuePPC64_OpGreater32_0(v *Value) bool {
  2259  	b := v.Block
  2260  	// match: (Greater32 x y)
  2261  	// result: (GreaterThan (CMPW x y))
  2262  	for {
  2263  		y := v.Args[1]
  2264  		x := v.Args[0]
  2265  		v.reset(OpPPC64GreaterThan)
  2266  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2267  		v0.AddArg(x)
  2268  		v0.AddArg(y)
  2269  		v.AddArg(v0)
  2270  		return true
  2271  	}
  2272  }
  2273  func rewriteValuePPC64_OpGreater32F_0(v *Value) bool {
  2274  	b := v.Block
  2275  	// match: (Greater32F x y)
  2276  	// result: (FGreaterThan (FCMPU x y))
  2277  	for {
  2278  		y := v.Args[1]
  2279  		x := v.Args[0]
  2280  		v.reset(OpPPC64FGreaterThan)
  2281  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2282  		v0.AddArg(x)
  2283  		v0.AddArg(y)
  2284  		v.AddArg(v0)
  2285  		return true
  2286  	}
  2287  }
  2288  func rewriteValuePPC64_OpGreater32U_0(v *Value) bool {
  2289  	b := v.Block
  2290  	// match: (Greater32U x y)
  2291  	// result: (GreaterThan (CMPWU x y))
  2292  	for {
  2293  		y := v.Args[1]
  2294  		x := v.Args[0]
  2295  		v.reset(OpPPC64GreaterThan)
  2296  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2297  		v0.AddArg(x)
  2298  		v0.AddArg(y)
  2299  		v.AddArg(v0)
  2300  		return true
  2301  	}
  2302  }
  2303  func rewriteValuePPC64_OpGreater64_0(v *Value) bool {
  2304  	b := v.Block
  2305  	// match: (Greater64 x y)
  2306  	// result: (GreaterThan (CMP x y))
  2307  	for {
  2308  		y := v.Args[1]
  2309  		x := v.Args[0]
  2310  		v.reset(OpPPC64GreaterThan)
  2311  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2312  		v0.AddArg(x)
  2313  		v0.AddArg(y)
  2314  		v.AddArg(v0)
  2315  		return true
  2316  	}
  2317  }
  2318  func rewriteValuePPC64_OpGreater64F_0(v *Value) bool {
  2319  	b := v.Block
  2320  	// match: (Greater64F x y)
  2321  	// result: (FGreaterThan (FCMPU x y))
  2322  	for {
  2323  		y := v.Args[1]
  2324  		x := v.Args[0]
  2325  		v.reset(OpPPC64FGreaterThan)
  2326  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2327  		v0.AddArg(x)
  2328  		v0.AddArg(y)
  2329  		v.AddArg(v0)
  2330  		return true
  2331  	}
  2332  }
  2333  func rewriteValuePPC64_OpGreater64U_0(v *Value) bool {
  2334  	b := v.Block
  2335  	// match: (Greater64U x y)
  2336  	// result: (GreaterThan (CMPU x y))
  2337  	for {
  2338  		y := v.Args[1]
  2339  		x := v.Args[0]
  2340  		v.reset(OpPPC64GreaterThan)
  2341  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2342  		v0.AddArg(x)
  2343  		v0.AddArg(y)
  2344  		v.AddArg(v0)
  2345  		return true
  2346  	}
  2347  }
  2348  func rewriteValuePPC64_OpGreater8_0(v *Value) bool {
  2349  	b := v.Block
  2350  	typ := &b.Func.Config.Types
  2351  	// match: (Greater8 x y)
  2352  	// result: (GreaterThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2353  	for {
  2354  		y := v.Args[1]
  2355  		x := v.Args[0]
  2356  		v.reset(OpPPC64GreaterThan)
  2357  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2358  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2359  		v1.AddArg(x)
  2360  		v0.AddArg(v1)
  2361  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2362  		v2.AddArg(y)
  2363  		v0.AddArg(v2)
  2364  		v.AddArg(v0)
  2365  		return true
  2366  	}
  2367  }
  2368  func rewriteValuePPC64_OpGreater8U_0(v *Value) bool {
  2369  	b := v.Block
  2370  	typ := &b.Func.Config.Types
  2371  	// match: (Greater8U x y)
  2372  	// result: (GreaterThan (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2373  	for {
  2374  		y := v.Args[1]
  2375  		x := v.Args[0]
  2376  		v.reset(OpPPC64GreaterThan)
  2377  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2378  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2379  		v1.AddArg(x)
  2380  		v0.AddArg(v1)
  2381  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2382  		v2.AddArg(y)
  2383  		v0.AddArg(v2)
  2384  		v.AddArg(v0)
  2385  		return true
  2386  	}
  2387  }
  2388  func rewriteValuePPC64_OpHmul32_0(v *Value) bool {
  2389  	// match: (Hmul32 x y)
  2390  	// result: (MULHW x y)
  2391  	for {
  2392  		y := v.Args[1]
  2393  		x := v.Args[0]
  2394  		v.reset(OpPPC64MULHW)
  2395  		v.AddArg(x)
  2396  		v.AddArg(y)
  2397  		return true
  2398  	}
  2399  }
  2400  func rewriteValuePPC64_OpHmul32u_0(v *Value) bool {
  2401  	// match: (Hmul32u x y)
  2402  	// result: (MULHWU x y)
  2403  	for {
  2404  		y := v.Args[1]
  2405  		x := v.Args[0]
  2406  		v.reset(OpPPC64MULHWU)
  2407  		v.AddArg(x)
  2408  		v.AddArg(y)
  2409  		return true
  2410  	}
  2411  }
  2412  func rewriteValuePPC64_OpHmul64_0(v *Value) bool {
  2413  	// match: (Hmul64 x y)
  2414  	// result: (MULHD x y)
  2415  	for {
  2416  		y := v.Args[1]
  2417  		x := v.Args[0]
  2418  		v.reset(OpPPC64MULHD)
  2419  		v.AddArg(x)
  2420  		v.AddArg(y)
  2421  		return true
  2422  	}
  2423  }
  2424  func rewriteValuePPC64_OpHmul64u_0(v *Value) bool {
  2425  	// match: (Hmul64u x y)
  2426  	// result: (MULHDU x y)
  2427  	for {
  2428  		y := v.Args[1]
  2429  		x := v.Args[0]
  2430  		v.reset(OpPPC64MULHDU)
  2431  		v.AddArg(x)
  2432  		v.AddArg(y)
  2433  		return true
  2434  	}
  2435  }
  2436  func rewriteValuePPC64_OpInterCall_0(v *Value) bool {
  2437  	// match: (InterCall [argwid] entry mem)
  2438  	// result: (CALLinter [argwid] entry mem)
  2439  	for {
  2440  		argwid := v.AuxInt
  2441  		mem := v.Args[1]
  2442  		entry := v.Args[0]
  2443  		v.reset(OpPPC64CALLinter)
  2444  		v.AuxInt = argwid
  2445  		v.AddArg(entry)
  2446  		v.AddArg(mem)
  2447  		return true
  2448  	}
  2449  }
  2450  func rewriteValuePPC64_OpIsInBounds_0(v *Value) bool {
  2451  	b := v.Block
  2452  	// match: (IsInBounds idx len)
  2453  	// result: (LessThan (CMPU idx len))
  2454  	for {
  2455  		len := v.Args[1]
  2456  		idx := v.Args[0]
  2457  		v.reset(OpPPC64LessThan)
  2458  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2459  		v0.AddArg(idx)
  2460  		v0.AddArg(len)
  2461  		v.AddArg(v0)
  2462  		return true
  2463  	}
  2464  }
  2465  func rewriteValuePPC64_OpIsNonNil_0(v *Value) bool {
  2466  	b := v.Block
  2467  	// match: (IsNonNil ptr)
  2468  	// result: (NotEqual (CMPconst [0] ptr))
  2469  	for {
  2470  		ptr := v.Args[0]
  2471  		v.reset(OpPPC64NotEqual)
  2472  		v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, types.TypeFlags)
  2473  		v0.AuxInt = 0
  2474  		v0.AddArg(ptr)
  2475  		v.AddArg(v0)
  2476  		return true
  2477  	}
  2478  }
  2479  func rewriteValuePPC64_OpIsSliceInBounds_0(v *Value) bool {
  2480  	b := v.Block
  2481  	// match: (IsSliceInBounds idx len)
  2482  	// result: (LessEqual (CMPU idx len))
  2483  	for {
  2484  		len := v.Args[1]
  2485  		idx := v.Args[0]
  2486  		v.reset(OpPPC64LessEqual)
  2487  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2488  		v0.AddArg(idx)
  2489  		v0.AddArg(len)
  2490  		v.AddArg(v0)
  2491  		return true
  2492  	}
  2493  }
  2494  func rewriteValuePPC64_OpLeq16_0(v *Value) bool {
  2495  	b := v.Block
  2496  	typ := &b.Func.Config.Types
  2497  	// match: (Leq16 x y)
  2498  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2499  	for {
  2500  		y := v.Args[1]
  2501  		x := v.Args[0]
  2502  		v.reset(OpPPC64LessEqual)
  2503  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2504  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2505  		v1.AddArg(x)
  2506  		v0.AddArg(v1)
  2507  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2508  		v2.AddArg(y)
  2509  		v0.AddArg(v2)
  2510  		v.AddArg(v0)
  2511  		return true
  2512  	}
  2513  }
  2514  func rewriteValuePPC64_OpLeq16U_0(v *Value) bool {
  2515  	b := v.Block
  2516  	typ := &b.Func.Config.Types
  2517  	// match: (Leq16U x y)
  2518  	// result: (LessEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2519  	for {
  2520  		y := v.Args[1]
  2521  		x := v.Args[0]
  2522  		v.reset(OpPPC64LessEqual)
  2523  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2524  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2525  		v1.AddArg(x)
  2526  		v0.AddArg(v1)
  2527  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2528  		v2.AddArg(y)
  2529  		v0.AddArg(v2)
  2530  		v.AddArg(v0)
  2531  		return true
  2532  	}
  2533  }
  2534  func rewriteValuePPC64_OpLeq32_0(v *Value) bool {
  2535  	b := v.Block
  2536  	// match: (Leq32 x y)
  2537  	// result: (LessEqual (CMPW x y))
  2538  	for {
  2539  		y := v.Args[1]
  2540  		x := v.Args[0]
  2541  		v.reset(OpPPC64LessEqual)
  2542  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2543  		v0.AddArg(x)
  2544  		v0.AddArg(y)
  2545  		v.AddArg(v0)
  2546  		return true
  2547  	}
  2548  }
  2549  func rewriteValuePPC64_OpLeq32F_0(v *Value) bool {
  2550  	b := v.Block
  2551  	// match: (Leq32F x y)
  2552  	// result: (FLessEqual (FCMPU x y))
  2553  	for {
  2554  		y := v.Args[1]
  2555  		x := v.Args[0]
  2556  		v.reset(OpPPC64FLessEqual)
  2557  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2558  		v0.AddArg(x)
  2559  		v0.AddArg(y)
  2560  		v.AddArg(v0)
  2561  		return true
  2562  	}
  2563  }
  2564  func rewriteValuePPC64_OpLeq32U_0(v *Value) bool {
  2565  	b := v.Block
  2566  	// match: (Leq32U x y)
  2567  	// result: (LessEqual (CMPWU x y))
  2568  	for {
  2569  		y := v.Args[1]
  2570  		x := v.Args[0]
  2571  		v.reset(OpPPC64LessEqual)
  2572  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2573  		v0.AddArg(x)
  2574  		v0.AddArg(y)
  2575  		v.AddArg(v0)
  2576  		return true
  2577  	}
  2578  }
  2579  func rewriteValuePPC64_OpLeq64_0(v *Value) bool {
  2580  	b := v.Block
  2581  	// match: (Leq64 x y)
  2582  	// result: (LessEqual (CMP x y))
  2583  	for {
  2584  		y := v.Args[1]
  2585  		x := v.Args[0]
  2586  		v.reset(OpPPC64LessEqual)
  2587  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2588  		v0.AddArg(x)
  2589  		v0.AddArg(y)
  2590  		v.AddArg(v0)
  2591  		return true
  2592  	}
  2593  }
  2594  func rewriteValuePPC64_OpLeq64F_0(v *Value) bool {
  2595  	b := v.Block
  2596  	// match: (Leq64F x y)
  2597  	// result: (FLessEqual (FCMPU x y))
  2598  	for {
  2599  		y := v.Args[1]
  2600  		x := v.Args[0]
  2601  		v.reset(OpPPC64FLessEqual)
  2602  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2603  		v0.AddArg(x)
  2604  		v0.AddArg(y)
  2605  		v.AddArg(v0)
  2606  		return true
  2607  	}
  2608  }
  2609  func rewriteValuePPC64_OpLeq64U_0(v *Value) bool {
  2610  	b := v.Block
  2611  	// match: (Leq64U x y)
  2612  	// result: (LessEqual (CMPU x y))
  2613  	for {
  2614  		y := v.Args[1]
  2615  		x := v.Args[0]
  2616  		v.reset(OpPPC64LessEqual)
  2617  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2618  		v0.AddArg(x)
  2619  		v0.AddArg(y)
  2620  		v.AddArg(v0)
  2621  		return true
  2622  	}
  2623  }
  2624  func rewriteValuePPC64_OpLeq8_0(v *Value) bool {
  2625  	b := v.Block
  2626  	typ := &b.Func.Config.Types
  2627  	// match: (Leq8 x y)
  2628  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2629  	for {
  2630  		y := v.Args[1]
  2631  		x := v.Args[0]
  2632  		v.reset(OpPPC64LessEqual)
  2633  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2634  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2635  		v1.AddArg(x)
  2636  		v0.AddArg(v1)
  2637  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2638  		v2.AddArg(y)
  2639  		v0.AddArg(v2)
  2640  		v.AddArg(v0)
  2641  		return true
  2642  	}
  2643  }
  2644  func rewriteValuePPC64_OpLeq8U_0(v *Value) bool {
  2645  	b := v.Block
  2646  	typ := &b.Func.Config.Types
  2647  	// match: (Leq8U x y)
  2648  	// result: (LessEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2649  	for {
  2650  		y := v.Args[1]
  2651  		x := v.Args[0]
  2652  		v.reset(OpPPC64LessEqual)
  2653  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2654  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2655  		v1.AddArg(x)
  2656  		v0.AddArg(v1)
  2657  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2658  		v2.AddArg(y)
  2659  		v0.AddArg(v2)
  2660  		v.AddArg(v0)
  2661  		return true
  2662  	}
  2663  }
  2664  func rewriteValuePPC64_OpLess16_0(v *Value) bool {
  2665  	b := v.Block
  2666  	typ := &b.Func.Config.Types
  2667  	// match: (Less16 x y)
  2668  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2669  	for {
  2670  		y := v.Args[1]
  2671  		x := v.Args[0]
  2672  		v.reset(OpPPC64LessThan)
  2673  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2674  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2675  		v1.AddArg(x)
  2676  		v0.AddArg(v1)
  2677  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2678  		v2.AddArg(y)
  2679  		v0.AddArg(v2)
  2680  		v.AddArg(v0)
  2681  		return true
  2682  	}
  2683  }
  2684  func rewriteValuePPC64_OpLess16U_0(v *Value) bool {
  2685  	b := v.Block
  2686  	typ := &b.Func.Config.Types
  2687  	// match: (Less16U x y)
  2688  	// result: (LessThan (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2689  	for {
  2690  		y := v.Args[1]
  2691  		x := v.Args[0]
  2692  		v.reset(OpPPC64LessThan)
  2693  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2694  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2695  		v1.AddArg(x)
  2696  		v0.AddArg(v1)
  2697  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2698  		v2.AddArg(y)
  2699  		v0.AddArg(v2)
  2700  		v.AddArg(v0)
  2701  		return true
  2702  	}
  2703  }
  2704  func rewriteValuePPC64_OpLess32_0(v *Value) bool {
  2705  	b := v.Block
  2706  	// match: (Less32 x y)
  2707  	// result: (LessThan (CMPW x y))
  2708  	for {
  2709  		y := v.Args[1]
  2710  		x := v.Args[0]
  2711  		v.reset(OpPPC64LessThan)
  2712  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2713  		v0.AddArg(x)
  2714  		v0.AddArg(y)
  2715  		v.AddArg(v0)
  2716  		return true
  2717  	}
  2718  }
  2719  func rewriteValuePPC64_OpLess32F_0(v *Value) bool {
  2720  	b := v.Block
  2721  	// match: (Less32F x y)
  2722  	// result: (FLessThan (FCMPU x y))
  2723  	for {
  2724  		y := v.Args[1]
  2725  		x := v.Args[0]
  2726  		v.reset(OpPPC64FLessThan)
  2727  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2728  		v0.AddArg(x)
  2729  		v0.AddArg(y)
  2730  		v.AddArg(v0)
  2731  		return true
  2732  	}
  2733  }
  2734  func rewriteValuePPC64_OpLess32U_0(v *Value) bool {
  2735  	b := v.Block
  2736  	// match: (Less32U x y)
  2737  	// result: (LessThan (CMPWU x y))
  2738  	for {
  2739  		y := v.Args[1]
  2740  		x := v.Args[0]
  2741  		v.reset(OpPPC64LessThan)
  2742  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2743  		v0.AddArg(x)
  2744  		v0.AddArg(y)
  2745  		v.AddArg(v0)
  2746  		return true
  2747  	}
  2748  }
  2749  func rewriteValuePPC64_OpLess64_0(v *Value) bool {
  2750  	b := v.Block
  2751  	// match: (Less64 x y)
  2752  	// result: (LessThan (CMP x y))
  2753  	for {
  2754  		y := v.Args[1]
  2755  		x := v.Args[0]
  2756  		v.reset(OpPPC64LessThan)
  2757  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2758  		v0.AddArg(x)
  2759  		v0.AddArg(y)
  2760  		v.AddArg(v0)
  2761  		return true
  2762  	}
  2763  }
  2764  func rewriteValuePPC64_OpLess64F_0(v *Value) bool {
  2765  	b := v.Block
  2766  	// match: (Less64F x y)
  2767  	// result: (FLessThan (FCMPU x y))
  2768  	for {
  2769  		y := v.Args[1]
  2770  		x := v.Args[0]
  2771  		v.reset(OpPPC64FLessThan)
  2772  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2773  		v0.AddArg(x)
  2774  		v0.AddArg(y)
  2775  		v.AddArg(v0)
  2776  		return true
  2777  	}
  2778  }
  2779  func rewriteValuePPC64_OpLess64U_0(v *Value) bool {
  2780  	b := v.Block
  2781  	// match: (Less64U x y)
  2782  	// result: (LessThan (CMPU x y))
  2783  	for {
  2784  		y := v.Args[1]
  2785  		x := v.Args[0]
  2786  		v.reset(OpPPC64LessThan)
  2787  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2788  		v0.AddArg(x)
  2789  		v0.AddArg(y)
  2790  		v.AddArg(v0)
  2791  		return true
  2792  	}
  2793  }
  2794  func rewriteValuePPC64_OpLess8_0(v *Value) bool {
  2795  	b := v.Block
  2796  	typ := &b.Func.Config.Types
  2797  	// match: (Less8 x y)
  2798  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2799  	for {
  2800  		y := v.Args[1]
  2801  		x := v.Args[0]
  2802  		v.reset(OpPPC64LessThan)
  2803  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2804  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2805  		v1.AddArg(x)
  2806  		v0.AddArg(v1)
  2807  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2808  		v2.AddArg(y)
  2809  		v0.AddArg(v2)
  2810  		v.AddArg(v0)
  2811  		return true
  2812  	}
  2813  }
  2814  func rewriteValuePPC64_OpLess8U_0(v *Value) bool {
  2815  	b := v.Block
  2816  	typ := &b.Func.Config.Types
  2817  	// match: (Less8U x y)
  2818  	// result: (LessThan (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2819  	for {
  2820  		y := v.Args[1]
  2821  		x := v.Args[0]
  2822  		v.reset(OpPPC64LessThan)
  2823  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2824  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2825  		v1.AddArg(x)
  2826  		v0.AddArg(v1)
  2827  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2828  		v2.AddArg(y)
  2829  		v0.AddArg(v2)
  2830  		v.AddArg(v0)
  2831  		return true
  2832  	}
  2833  }
  2834  func rewriteValuePPC64_OpLoad_0(v *Value) bool {
  2835  	b := v.Block
  2836  	typ := &b.Func.Config.Types
  2837  	// match: (Load <t> ptr mem)
  2838  	// cond: (is64BitInt(t) || isPtr(t))
  2839  	// result: (MOVDload ptr mem)
  2840  	for {
  2841  		t := v.Type
  2842  		mem := v.Args[1]
  2843  		ptr := v.Args[0]
  2844  		if !(is64BitInt(t) || isPtr(t)) {
  2845  			break
  2846  		}
  2847  		v.reset(OpPPC64MOVDload)
  2848  		v.AddArg(ptr)
  2849  		v.AddArg(mem)
  2850  		return true
  2851  	}
  2852  	// match: (Load <t> ptr mem)
  2853  	// cond: is32BitInt(t) && isSigned(t)
  2854  	// result: (MOVWload ptr mem)
  2855  	for {
  2856  		t := v.Type
  2857  		mem := v.Args[1]
  2858  		ptr := v.Args[0]
  2859  		if !(is32BitInt(t) && isSigned(t)) {
  2860  			break
  2861  		}
  2862  		v.reset(OpPPC64MOVWload)
  2863  		v.AddArg(ptr)
  2864  		v.AddArg(mem)
  2865  		return true
  2866  	}
  2867  	// match: (Load <t> ptr mem)
  2868  	// cond: is32BitInt(t) && !isSigned(t)
  2869  	// result: (MOVWZload ptr mem)
  2870  	for {
  2871  		t := v.Type
  2872  		mem := v.Args[1]
  2873  		ptr := v.Args[0]
  2874  		if !(is32BitInt(t) && !isSigned(t)) {
  2875  			break
  2876  		}
  2877  		v.reset(OpPPC64MOVWZload)
  2878  		v.AddArg(ptr)
  2879  		v.AddArg(mem)
  2880  		return true
  2881  	}
  2882  	// match: (Load <t> ptr mem)
  2883  	// cond: is16BitInt(t) && isSigned(t)
  2884  	// result: (MOVHload ptr mem)
  2885  	for {
  2886  		t := v.Type
  2887  		mem := v.Args[1]
  2888  		ptr := v.Args[0]
  2889  		if !(is16BitInt(t) && isSigned(t)) {
  2890  			break
  2891  		}
  2892  		v.reset(OpPPC64MOVHload)
  2893  		v.AddArg(ptr)
  2894  		v.AddArg(mem)
  2895  		return true
  2896  	}
  2897  	// match: (Load <t> ptr mem)
  2898  	// cond: is16BitInt(t) && !isSigned(t)
  2899  	// result: (MOVHZload ptr mem)
  2900  	for {
  2901  		t := v.Type
  2902  		mem := v.Args[1]
  2903  		ptr := v.Args[0]
  2904  		if !(is16BitInt(t) && !isSigned(t)) {
  2905  			break
  2906  		}
  2907  		v.reset(OpPPC64MOVHZload)
  2908  		v.AddArg(ptr)
  2909  		v.AddArg(mem)
  2910  		return true
  2911  	}
  2912  	// match: (Load <t> ptr mem)
  2913  	// cond: t.IsBoolean()
  2914  	// result: (MOVBZload ptr mem)
  2915  	for {
  2916  		t := v.Type
  2917  		mem := v.Args[1]
  2918  		ptr := v.Args[0]
  2919  		if !(t.IsBoolean()) {
  2920  			break
  2921  		}
  2922  		v.reset(OpPPC64MOVBZload)
  2923  		v.AddArg(ptr)
  2924  		v.AddArg(mem)
  2925  		return true
  2926  	}
  2927  	// match: (Load <t> ptr mem)
  2928  	// cond: is8BitInt(t) && isSigned(t)
  2929  	// result: (MOVBreg (MOVBZload ptr mem))
  2930  	for {
  2931  		t := v.Type
  2932  		mem := v.Args[1]
  2933  		ptr := v.Args[0]
  2934  		if !(is8BitInt(t) && isSigned(t)) {
  2935  			break
  2936  		}
  2937  		v.reset(OpPPC64MOVBreg)
  2938  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  2939  		v0.AddArg(ptr)
  2940  		v0.AddArg(mem)
  2941  		v.AddArg(v0)
  2942  		return true
  2943  	}
  2944  	// match: (Load <t> ptr mem)
  2945  	// cond: is8BitInt(t) && !isSigned(t)
  2946  	// result: (MOVBZload ptr mem)
  2947  	for {
  2948  		t := v.Type
  2949  		mem := v.Args[1]
  2950  		ptr := v.Args[0]
  2951  		if !(is8BitInt(t) && !isSigned(t)) {
  2952  			break
  2953  		}
  2954  		v.reset(OpPPC64MOVBZload)
  2955  		v.AddArg(ptr)
  2956  		v.AddArg(mem)
  2957  		return true
  2958  	}
  2959  	// match: (Load <t> ptr mem)
  2960  	// cond: is32BitFloat(t)
  2961  	// result: (FMOVSload ptr mem)
  2962  	for {
  2963  		t := v.Type
  2964  		mem := v.Args[1]
  2965  		ptr := v.Args[0]
  2966  		if !(is32BitFloat(t)) {
  2967  			break
  2968  		}
  2969  		v.reset(OpPPC64FMOVSload)
  2970  		v.AddArg(ptr)
  2971  		v.AddArg(mem)
  2972  		return true
  2973  	}
  2974  	// match: (Load <t> ptr mem)
  2975  	// cond: is64BitFloat(t)
  2976  	// result: (FMOVDload ptr mem)
  2977  	for {
  2978  		t := v.Type
  2979  		mem := v.Args[1]
  2980  		ptr := v.Args[0]
  2981  		if !(is64BitFloat(t)) {
  2982  			break
  2983  		}
  2984  		v.reset(OpPPC64FMOVDload)
  2985  		v.AddArg(ptr)
  2986  		v.AddArg(mem)
  2987  		return true
  2988  	}
  2989  	return false
  2990  }
  2991  func rewriteValuePPC64_OpLocalAddr_0(v *Value) bool {
  2992  	// match: (LocalAddr {sym} base _)
  2993  	// result: (MOVDaddr {sym} base)
  2994  	for {
  2995  		sym := v.Aux
  2996  		_ = v.Args[1]
  2997  		base := v.Args[0]
  2998  		v.reset(OpPPC64MOVDaddr)
  2999  		v.Aux = sym
  3000  		v.AddArg(base)
  3001  		return true
  3002  	}
  3003  }
  3004  func rewriteValuePPC64_OpLsh16x16_0(v *Value) bool {
  3005  	b := v.Block
  3006  	typ := &b.Func.Config.Types
  3007  	// match: (Lsh16x16 x y)
  3008  	// cond: shiftIsBounded(v)
  3009  	// result: (SLW x y)
  3010  	for {
  3011  		y := v.Args[1]
  3012  		x := v.Args[0]
  3013  		if !(shiftIsBounded(v)) {
  3014  			break
  3015  		}
  3016  		v.reset(OpPPC64SLW)
  3017  		v.AddArg(x)
  3018  		v.AddArg(y)
  3019  		return true
  3020  	}
  3021  	// match: (Lsh16x16 x y)
  3022  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] (ZeroExt16to64 y)))))
  3023  	for {
  3024  		y := v.Args[1]
  3025  		x := v.Args[0]
  3026  		v.reset(OpPPC64SLW)
  3027  		v.AddArg(x)
  3028  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3029  		v0.AddArg(y)
  3030  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3031  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3032  		v2.AuxInt = -16
  3033  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3034  		v3.AddArg(y)
  3035  		v2.AddArg(v3)
  3036  		v1.AddArg(v2)
  3037  		v0.AddArg(v1)
  3038  		v.AddArg(v0)
  3039  		return true
  3040  	}
  3041  }
  3042  func rewriteValuePPC64_OpLsh16x32_0(v *Value) bool {
  3043  	b := v.Block
  3044  	typ := &b.Func.Config.Types
  3045  	// match: (Lsh16x32 x (Const64 [c]))
  3046  	// cond: uint32(c) < 16
  3047  	// result: (SLWconst x [c])
  3048  	for {
  3049  		_ = v.Args[1]
  3050  		x := v.Args[0]
  3051  		v_1 := v.Args[1]
  3052  		if v_1.Op != OpConst64 {
  3053  			break
  3054  		}
  3055  		c := v_1.AuxInt
  3056  		if !(uint32(c) < 16) {
  3057  			break
  3058  		}
  3059  		v.reset(OpPPC64SLWconst)
  3060  		v.AuxInt = c
  3061  		v.AddArg(x)
  3062  		return true
  3063  	}
  3064  	// match: (Lsh16x32 x (MOVDconst [c]))
  3065  	// cond: uint32(c) < 16
  3066  	// result: (SLWconst x [c])
  3067  	for {
  3068  		_ = v.Args[1]
  3069  		x := v.Args[0]
  3070  		v_1 := v.Args[1]
  3071  		if v_1.Op != OpPPC64MOVDconst {
  3072  			break
  3073  		}
  3074  		c := v_1.AuxInt
  3075  		if !(uint32(c) < 16) {
  3076  			break
  3077  		}
  3078  		v.reset(OpPPC64SLWconst)
  3079  		v.AuxInt = c
  3080  		v.AddArg(x)
  3081  		return true
  3082  	}
  3083  	// match: (Lsh16x32 x y)
  3084  	// cond: shiftIsBounded(v)
  3085  	// result: (SLW x y)
  3086  	for {
  3087  		y := v.Args[1]
  3088  		x := v.Args[0]
  3089  		if !(shiftIsBounded(v)) {
  3090  			break
  3091  		}
  3092  		v.reset(OpPPC64SLW)
  3093  		v.AddArg(x)
  3094  		v.AddArg(y)
  3095  		return true
  3096  	}
  3097  	// match: (Lsh16x32 x y)
  3098  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] (ZeroExt32to64 y)))))
  3099  	for {
  3100  		y := v.Args[1]
  3101  		x := v.Args[0]
  3102  		v.reset(OpPPC64SLW)
  3103  		v.AddArg(x)
  3104  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3105  		v0.AddArg(y)
  3106  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3107  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3108  		v2.AuxInt = -16
  3109  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3110  		v3.AddArg(y)
  3111  		v2.AddArg(v3)
  3112  		v1.AddArg(v2)
  3113  		v0.AddArg(v1)
  3114  		v.AddArg(v0)
  3115  		return true
  3116  	}
  3117  }
  3118  func rewriteValuePPC64_OpLsh16x64_0(v *Value) bool {
  3119  	b := v.Block
  3120  	typ := &b.Func.Config.Types
  3121  	// match: (Lsh16x64 x (Const64 [c]))
  3122  	// cond: uint64(c) < 16
  3123  	// result: (SLWconst x [c])
  3124  	for {
  3125  		_ = v.Args[1]
  3126  		x := v.Args[0]
  3127  		v_1 := v.Args[1]
  3128  		if v_1.Op != OpConst64 {
  3129  			break
  3130  		}
  3131  		c := v_1.AuxInt
  3132  		if !(uint64(c) < 16) {
  3133  			break
  3134  		}
  3135  		v.reset(OpPPC64SLWconst)
  3136  		v.AuxInt = c
  3137  		v.AddArg(x)
  3138  		return true
  3139  	}
  3140  	// match: (Lsh16x64 _ (Const64 [c]))
  3141  	// cond: uint64(c) >= 16
  3142  	// result: (MOVDconst [0])
  3143  	for {
  3144  		_ = v.Args[1]
  3145  		v_1 := v.Args[1]
  3146  		if v_1.Op != OpConst64 {
  3147  			break
  3148  		}
  3149  		c := v_1.AuxInt
  3150  		if !(uint64(c) >= 16) {
  3151  			break
  3152  		}
  3153  		v.reset(OpPPC64MOVDconst)
  3154  		v.AuxInt = 0
  3155  		return true
  3156  	}
  3157  	// match: (Lsh16x64 x (MOVDconst [c]))
  3158  	// cond: uint64(c) < 16
  3159  	// result: (SLWconst x [c])
  3160  	for {
  3161  		_ = v.Args[1]
  3162  		x := v.Args[0]
  3163  		v_1 := v.Args[1]
  3164  		if v_1.Op != OpPPC64MOVDconst {
  3165  			break
  3166  		}
  3167  		c := v_1.AuxInt
  3168  		if !(uint64(c) < 16) {
  3169  			break
  3170  		}
  3171  		v.reset(OpPPC64SLWconst)
  3172  		v.AuxInt = c
  3173  		v.AddArg(x)
  3174  		return true
  3175  	}
  3176  	// match: (Lsh16x64 x y)
  3177  	// cond: shiftIsBounded(v)
  3178  	// result: (SLW x y)
  3179  	for {
  3180  		y := v.Args[1]
  3181  		x := v.Args[0]
  3182  		if !(shiftIsBounded(v)) {
  3183  			break
  3184  		}
  3185  		v.reset(OpPPC64SLW)
  3186  		v.AddArg(x)
  3187  		v.AddArg(y)
  3188  		return true
  3189  	}
  3190  	// match: (Lsh16x64 x y)
  3191  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] y))))
  3192  	for {
  3193  		y := v.Args[1]
  3194  		x := v.Args[0]
  3195  		v.reset(OpPPC64SLW)
  3196  		v.AddArg(x)
  3197  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3198  		v0.AddArg(y)
  3199  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3200  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3201  		v2.AuxInt = -16
  3202  		v2.AddArg(y)
  3203  		v1.AddArg(v2)
  3204  		v0.AddArg(v1)
  3205  		v.AddArg(v0)
  3206  		return true
  3207  	}
  3208  }
  3209  func rewriteValuePPC64_OpLsh16x8_0(v *Value) bool {
  3210  	b := v.Block
  3211  	typ := &b.Func.Config.Types
  3212  	// match: (Lsh16x8 x y)
  3213  	// cond: shiftIsBounded(v)
  3214  	// result: (SLW x y)
  3215  	for {
  3216  		y := v.Args[1]
  3217  		x := v.Args[0]
  3218  		if !(shiftIsBounded(v)) {
  3219  			break
  3220  		}
  3221  		v.reset(OpPPC64SLW)
  3222  		v.AddArg(x)
  3223  		v.AddArg(y)
  3224  		return true
  3225  	}
  3226  	// match: (Lsh16x8 x y)
  3227  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] (ZeroExt8to64 y)))))
  3228  	for {
  3229  		y := v.Args[1]
  3230  		x := v.Args[0]
  3231  		v.reset(OpPPC64SLW)
  3232  		v.AddArg(x)
  3233  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3234  		v0.AddArg(y)
  3235  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3236  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3237  		v2.AuxInt = -16
  3238  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3239  		v3.AddArg(y)
  3240  		v2.AddArg(v3)
  3241  		v1.AddArg(v2)
  3242  		v0.AddArg(v1)
  3243  		v.AddArg(v0)
  3244  		return true
  3245  	}
  3246  }
  3247  func rewriteValuePPC64_OpLsh32x16_0(v *Value) bool {
  3248  	b := v.Block
  3249  	typ := &b.Func.Config.Types
  3250  	// match: (Lsh32x16 x y)
  3251  	// cond: shiftIsBounded(v)
  3252  	// result: (SLW x y)
  3253  	for {
  3254  		y := v.Args[1]
  3255  		x := v.Args[0]
  3256  		if !(shiftIsBounded(v)) {
  3257  			break
  3258  		}
  3259  		v.reset(OpPPC64SLW)
  3260  		v.AddArg(x)
  3261  		v.AddArg(y)
  3262  		return true
  3263  	}
  3264  	// match: (Lsh32x16 x y)
  3265  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] (ZeroExt16to64 y)))))
  3266  	for {
  3267  		y := v.Args[1]
  3268  		x := v.Args[0]
  3269  		v.reset(OpPPC64SLW)
  3270  		v.AddArg(x)
  3271  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3272  		v0.AddArg(y)
  3273  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3274  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3275  		v2.AuxInt = -32
  3276  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3277  		v3.AddArg(y)
  3278  		v2.AddArg(v3)
  3279  		v1.AddArg(v2)
  3280  		v0.AddArg(v1)
  3281  		v.AddArg(v0)
  3282  		return true
  3283  	}
  3284  }
  3285  func rewriteValuePPC64_OpLsh32x32_0(v *Value) bool {
  3286  	b := v.Block
  3287  	typ := &b.Func.Config.Types
  3288  	// match: (Lsh32x32 x (Const64 [c]))
  3289  	// cond: uint32(c) < 32
  3290  	// result: (SLWconst x [c])
  3291  	for {
  3292  		_ = v.Args[1]
  3293  		x := v.Args[0]
  3294  		v_1 := v.Args[1]
  3295  		if v_1.Op != OpConst64 {
  3296  			break
  3297  		}
  3298  		c := v_1.AuxInt
  3299  		if !(uint32(c) < 32) {
  3300  			break
  3301  		}
  3302  		v.reset(OpPPC64SLWconst)
  3303  		v.AuxInt = c
  3304  		v.AddArg(x)
  3305  		return true
  3306  	}
  3307  	// match: (Lsh32x32 x (MOVDconst [c]))
  3308  	// cond: uint32(c) < 32
  3309  	// result: (SLWconst x [c])
  3310  	for {
  3311  		_ = v.Args[1]
  3312  		x := v.Args[0]
  3313  		v_1 := v.Args[1]
  3314  		if v_1.Op != OpPPC64MOVDconst {
  3315  			break
  3316  		}
  3317  		c := v_1.AuxInt
  3318  		if !(uint32(c) < 32) {
  3319  			break
  3320  		}
  3321  		v.reset(OpPPC64SLWconst)
  3322  		v.AuxInt = c
  3323  		v.AddArg(x)
  3324  		return true
  3325  	}
  3326  	// match: (Lsh32x32 x y)
  3327  	// cond: shiftIsBounded(v)
  3328  	// result: (SLW x y)
  3329  	for {
  3330  		y := v.Args[1]
  3331  		x := v.Args[0]
  3332  		if !(shiftIsBounded(v)) {
  3333  			break
  3334  		}
  3335  		v.reset(OpPPC64SLW)
  3336  		v.AddArg(x)
  3337  		v.AddArg(y)
  3338  		return true
  3339  	}
  3340  	// match: (Lsh32x32 x y)
  3341  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] (ZeroExt32to64 y)))))
  3342  	for {
  3343  		y := v.Args[1]
  3344  		x := v.Args[0]
  3345  		v.reset(OpPPC64SLW)
  3346  		v.AddArg(x)
  3347  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3348  		v0.AddArg(y)
  3349  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3350  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3351  		v2.AuxInt = -32
  3352  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3353  		v3.AddArg(y)
  3354  		v2.AddArg(v3)
  3355  		v1.AddArg(v2)
  3356  		v0.AddArg(v1)
  3357  		v.AddArg(v0)
  3358  		return true
  3359  	}
  3360  }
  3361  func rewriteValuePPC64_OpLsh32x64_0(v *Value) bool {
  3362  	b := v.Block
  3363  	typ := &b.Func.Config.Types
  3364  	// match: (Lsh32x64 x (Const64 [c]))
  3365  	// cond: uint64(c) < 32
  3366  	// result: (SLWconst x [c])
  3367  	for {
  3368  		_ = v.Args[1]
  3369  		x := v.Args[0]
  3370  		v_1 := v.Args[1]
  3371  		if v_1.Op != OpConst64 {
  3372  			break
  3373  		}
  3374  		c := v_1.AuxInt
  3375  		if !(uint64(c) < 32) {
  3376  			break
  3377  		}
  3378  		v.reset(OpPPC64SLWconst)
  3379  		v.AuxInt = c
  3380  		v.AddArg(x)
  3381  		return true
  3382  	}
  3383  	// match: (Lsh32x64 _ (Const64 [c]))
  3384  	// cond: uint64(c) >= 32
  3385  	// result: (MOVDconst [0])
  3386  	for {
  3387  		_ = v.Args[1]
  3388  		v_1 := v.Args[1]
  3389  		if v_1.Op != OpConst64 {
  3390  			break
  3391  		}
  3392  		c := v_1.AuxInt
  3393  		if !(uint64(c) >= 32) {
  3394  			break
  3395  		}
  3396  		v.reset(OpPPC64MOVDconst)
  3397  		v.AuxInt = 0
  3398  		return true
  3399  	}
  3400  	// match: (Lsh32x64 x (MOVDconst [c]))
  3401  	// cond: uint64(c) < 32
  3402  	// result: (SLWconst x [c])
  3403  	for {
  3404  		_ = v.Args[1]
  3405  		x := v.Args[0]
  3406  		v_1 := v.Args[1]
  3407  		if v_1.Op != OpPPC64MOVDconst {
  3408  			break
  3409  		}
  3410  		c := v_1.AuxInt
  3411  		if !(uint64(c) < 32) {
  3412  			break
  3413  		}
  3414  		v.reset(OpPPC64SLWconst)
  3415  		v.AuxInt = c
  3416  		v.AddArg(x)
  3417  		return true
  3418  	}
  3419  	// match: (Lsh32x64 x y)
  3420  	// cond: shiftIsBounded(v)
  3421  	// result: (SLW x y)
  3422  	for {
  3423  		y := v.Args[1]
  3424  		x := v.Args[0]
  3425  		if !(shiftIsBounded(v)) {
  3426  			break
  3427  		}
  3428  		v.reset(OpPPC64SLW)
  3429  		v.AddArg(x)
  3430  		v.AddArg(y)
  3431  		return true
  3432  	}
  3433  	// match: (Lsh32x64 x (AND y (MOVDconst [31])))
  3434  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  3435  	for {
  3436  		_ = v.Args[1]
  3437  		x := v.Args[0]
  3438  		v_1 := v.Args[1]
  3439  		if v_1.Op != OpPPC64AND {
  3440  			break
  3441  		}
  3442  		_ = v_1.Args[1]
  3443  		y := v_1.Args[0]
  3444  		v_1_1 := v_1.Args[1]
  3445  		if v_1_1.Op != OpPPC64MOVDconst || v_1_1.AuxInt != 31 {
  3446  			break
  3447  		}
  3448  		v.reset(OpPPC64SLW)
  3449  		v.AddArg(x)
  3450  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  3451  		v0.AuxInt = 31
  3452  		v0.AddArg(y)
  3453  		v.AddArg(v0)
  3454  		return true
  3455  	}
  3456  	// match: (Lsh32x64 x (AND (MOVDconst [31]) y))
  3457  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  3458  	for {
  3459  		_ = v.Args[1]
  3460  		x := v.Args[0]
  3461  		v_1 := v.Args[1]
  3462  		if v_1.Op != OpPPC64AND {
  3463  			break
  3464  		}
  3465  		y := v_1.Args[1]
  3466  		v_1_0 := v_1.Args[0]
  3467  		if v_1_0.Op != OpPPC64MOVDconst || v_1_0.AuxInt != 31 {
  3468  			break
  3469  		}
  3470  		v.reset(OpPPC64SLW)
  3471  		v.AddArg(x)
  3472  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  3473  		v0.AuxInt = 31
  3474  		v0.AddArg(y)
  3475  		v.AddArg(v0)
  3476  		return true
  3477  	}
  3478  	// match: (Lsh32x64 x (ANDconst <typ.Int32> [31] y))
  3479  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  3480  	for {
  3481  		_ = v.Args[1]
  3482  		x := v.Args[0]
  3483  		v_1 := v.Args[1]
  3484  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.Int32 || v_1.AuxInt != 31 {
  3485  			break
  3486  		}
  3487  		y := v_1.Args[0]
  3488  		v.reset(OpPPC64SLW)
  3489  		v.AddArg(x)
  3490  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  3491  		v0.AuxInt = 31
  3492  		v0.AddArg(y)
  3493  		v.AddArg(v0)
  3494  		return true
  3495  	}
  3496  	// match: (Lsh32x64 x y)
  3497  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] y))))
  3498  	for {
  3499  		y := v.Args[1]
  3500  		x := v.Args[0]
  3501  		v.reset(OpPPC64SLW)
  3502  		v.AddArg(x)
  3503  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3504  		v0.AddArg(y)
  3505  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3506  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3507  		v2.AuxInt = -32
  3508  		v2.AddArg(y)
  3509  		v1.AddArg(v2)
  3510  		v0.AddArg(v1)
  3511  		v.AddArg(v0)
  3512  		return true
  3513  	}
  3514  }
  3515  func rewriteValuePPC64_OpLsh32x8_0(v *Value) bool {
  3516  	b := v.Block
  3517  	typ := &b.Func.Config.Types
  3518  	// match: (Lsh32x8 x y)
  3519  	// cond: shiftIsBounded(v)
  3520  	// result: (SLW x y)
  3521  	for {
  3522  		y := v.Args[1]
  3523  		x := v.Args[0]
  3524  		if !(shiftIsBounded(v)) {
  3525  			break
  3526  		}
  3527  		v.reset(OpPPC64SLW)
  3528  		v.AddArg(x)
  3529  		v.AddArg(y)
  3530  		return true
  3531  	}
  3532  	// match: (Lsh32x8 x y)
  3533  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] (ZeroExt8to64 y)))))
  3534  	for {
  3535  		y := v.Args[1]
  3536  		x := v.Args[0]
  3537  		v.reset(OpPPC64SLW)
  3538  		v.AddArg(x)
  3539  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3540  		v0.AddArg(y)
  3541  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3542  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3543  		v2.AuxInt = -32
  3544  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3545  		v3.AddArg(y)
  3546  		v2.AddArg(v3)
  3547  		v1.AddArg(v2)
  3548  		v0.AddArg(v1)
  3549  		v.AddArg(v0)
  3550  		return true
  3551  	}
  3552  }
  3553  func rewriteValuePPC64_OpLsh64x16_0(v *Value) bool {
  3554  	b := v.Block
  3555  	typ := &b.Func.Config.Types
  3556  	// match: (Lsh64x16 x y)
  3557  	// cond: shiftIsBounded(v)
  3558  	// result: (SLD x y)
  3559  	for {
  3560  		y := v.Args[1]
  3561  		x := v.Args[0]
  3562  		if !(shiftIsBounded(v)) {
  3563  			break
  3564  		}
  3565  		v.reset(OpPPC64SLD)
  3566  		v.AddArg(x)
  3567  		v.AddArg(y)
  3568  		return true
  3569  	}
  3570  	// match: (Lsh64x16 x y)
  3571  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] (ZeroExt16to64 y)))))
  3572  	for {
  3573  		y := v.Args[1]
  3574  		x := v.Args[0]
  3575  		v.reset(OpPPC64SLD)
  3576  		v.AddArg(x)
  3577  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3578  		v0.AddArg(y)
  3579  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3580  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3581  		v2.AuxInt = -64
  3582  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3583  		v3.AddArg(y)
  3584  		v2.AddArg(v3)
  3585  		v1.AddArg(v2)
  3586  		v0.AddArg(v1)
  3587  		v.AddArg(v0)
  3588  		return true
  3589  	}
  3590  }
  3591  func rewriteValuePPC64_OpLsh64x32_0(v *Value) bool {
  3592  	b := v.Block
  3593  	typ := &b.Func.Config.Types
  3594  	// match: (Lsh64x32 x (Const64 [c]))
  3595  	// cond: uint32(c) < 64
  3596  	// result: (SLDconst x [c])
  3597  	for {
  3598  		_ = v.Args[1]
  3599  		x := v.Args[0]
  3600  		v_1 := v.Args[1]
  3601  		if v_1.Op != OpConst64 {
  3602  			break
  3603  		}
  3604  		c := v_1.AuxInt
  3605  		if !(uint32(c) < 64) {
  3606  			break
  3607  		}
  3608  		v.reset(OpPPC64SLDconst)
  3609  		v.AuxInt = c
  3610  		v.AddArg(x)
  3611  		return true
  3612  	}
  3613  	// match: (Lsh64x32 x (MOVDconst [c]))
  3614  	// cond: uint32(c) < 64
  3615  	// result: (SLDconst x [c])
  3616  	for {
  3617  		_ = v.Args[1]
  3618  		x := v.Args[0]
  3619  		v_1 := v.Args[1]
  3620  		if v_1.Op != OpPPC64MOVDconst {
  3621  			break
  3622  		}
  3623  		c := v_1.AuxInt
  3624  		if !(uint32(c) < 64) {
  3625  			break
  3626  		}
  3627  		v.reset(OpPPC64SLDconst)
  3628  		v.AuxInt = c
  3629  		v.AddArg(x)
  3630  		return true
  3631  	}
  3632  	// match: (Lsh64x32 x y)
  3633  	// cond: shiftIsBounded(v)
  3634  	// result: (SLD x y)
  3635  	for {
  3636  		y := v.Args[1]
  3637  		x := v.Args[0]
  3638  		if !(shiftIsBounded(v)) {
  3639  			break
  3640  		}
  3641  		v.reset(OpPPC64SLD)
  3642  		v.AddArg(x)
  3643  		v.AddArg(y)
  3644  		return true
  3645  	}
  3646  	// match: (Lsh64x32 x y)
  3647  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] (ZeroExt32to64 y)))))
  3648  	for {
  3649  		y := v.Args[1]
  3650  		x := v.Args[0]
  3651  		v.reset(OpPPC64SLD)
  3652  		v.AddArg(x)
  3653  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3654  		v0.AddArg(y)
  3655  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3656  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3657  		v2.AuxInt = -64
  3658  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3659  		v3.AddArg(y)
  3660  		v2.AddArg(v3)
  3661  		v1.AddArg(v2)
  3662  		v0.AddArg(v1)
  3663  		v.AddArg(v0)
  3664  		return true
  3665  	}
  3666  }
  3667  func rewriteValuePPC64_OpLsh64x64_0(v *Value) bool {
  3668  	b := v.Block
  3669  	typ := &b.Func.Config.Types
  3670  	// match: (Lsh64x64 x (Const64 [c]))
  3671  	// cond: uint64(c) < 64
  3672  	// result: (SLDconst x [c])
  3673  	for {
  3674  		_ = v.Args[1]
  3675  		x := v.Args[0]
  3676  		v_1 := v.Args[1]
  3677  		if v_1.Op != OpConst64 {
  3678  			break
  3679  		}
  3680  		c := v_1.AuxInt
  3681  		if !(uint64(c) < 64) {
  3682  			break
  3683  		}
  3684  		v.reset(OpPPC64SLDconst)
  3685  		v.AuxInt = c
  3686  		v.AddArg(x)
  3687  		return true
  3688  	}
  3689  	// match: (Lsh64x64 _ (Const64 [c]))
  3690  	// cond: uint64(c) >= 64
  3691  	// result: (MOVDconst [0])
  3692  	for {
  3693  		_ = v.Args[1]
  3694  		v_1 := v.Args[1]
  3695  		if v_1.Op != OpConst64 {
  3696  			break
  3697  		}
  3698  		c := v_1.AuxInt
  3699  		if !(uint64(c) >= 64) {
  3700  			break
  3701  		}
  3702  		v.reset(OpPPC64MOVDconst)
  3703  		v.AuxInt = 0
  3704  		return true
  3705  	}
  3706  	// match: (Lsh64x64 x (MOVDconst [c]))
  3707  	// cond: uint64(c) < 64
  3708  	// result: (SLDconst x [c])
  3709  	for {
  3710  		_ = v.Args[1]
  3711  		x := v.Args[0]
  3712  		v_1 := v.Args[1]
  3713  		if v_1.Op != OpPPC64MOVDconst {
  3714  			break
  3715  		}
  3716  		c := v_1.AuxInt
  3717  		if !(uint64(c) < 64) {
  3718  			break
  3719  		}
  3720  		v.reset(OpPPC64SLDconst)
  3721  		v.AuxInt = c
  3722  		v.AddArg(x)
  3723  		return true
  3724  	}
  3725  	// match: (Lsh64x64 x y)
  3726  	// cond: shiftIsBounded(v)
  3727  	// result: (SLD x y)
  3728  	for {
  3729  		y := v.Args[1]
  3730  		x := v.Args[0]
  3731  		if !(shiftIsBounded(v)) {
  3732  			break
  3733  		}
  3734  		v.reset(OpPPC64SLD)
  3735  		v.AddArg(x)
  3736  		v.AddArg(y)
  3737  		return true
  3738  	}
  3739  	// match: (Lsh64x64 x (AND y (MOVDconst [63])))
  3740  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  3741  	for {
  3742  		_ = v.Args[1]
  3743  		x := v.Args[0]
  3744  		v_1 := v.Args[1]
  3745  		if v_1.Op != OpPPC64AND {
  3746  			break
  3747  		}
  3748  		_ = v_1.Args[1]
  3749  		y := v_1.Args[0]
  3750  		v_1_1 := v_1.Args[1]
  3751  		if v_1_1.Op != OpPPC64MOVDconst || v_1_1.AuxInt != 63 {
  3752  			break
  3753  		}
  3754  		v.reset(OpPPC64SLD)
  3755  		v.AddArg(x)
  3756  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  3757  		v0.AuxInt = 63
  3758  		v0.AddArg(y)
  3759  		v.AddArg(v0)
  3760  		return true
  3761  	}
  3762  	// match: (Lsh64x64 x (AND (MOVDconst [63]) y))
  3763  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  3764  	for {
  3765  		_ = v.Args[1]
  3766  		x := v.Args[0]
  3767  		v_1 := v.Args[1]
  3768  		if v_1.Op != OpPPC64AND {
  3769  			break
  3770  		}
  3771  		y := v_1.Args[1]
  3772  		v_1_0 := v_1.Args[0]
  3773  		if v_1_0.Op != OpPPC64MOVDconst || v_1_0.AuxInt != 63 {
  3774  			break
  3775  		}
  3776  		v.reset(OpPPC64SLD)
  3777  		v.AddArg(x)
  3778  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  3779  		v0.AuxInt = 63
  3780  		v0.AddArg(y)
  3781  		v.AddArg(v0)
  3782  		return true
  3783  	}
  3784  	// match: (Lsh64x64 x (ANDconst <typ.Int64> [63] y))
  3785  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  3786  	for {
  3787  		_ = v.Args[1]
  3788  		x := v.Args[0]
  3789  		v_1 := v.Args[1]
  3790  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.Int64 || v_1.AuxInt != 63 {
  3791  			break
  3792  		}
  3793  		y := v_1.Args[0]
  3794  		v.reset(OpPPC64SLD)
  3795  		v.AddArg(x)
  3796  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  3797  		v0.AuxInt = 63
  3798  		v0.AddArg(y)
  3799  		v.AddArg(v0)
  3800  		return true
  3801  	}
  3802  	// match: (Lsh64x64 x y)
  3803  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] y))))
  3804  	for {
  3805  		y := v.Args[1]
  3806  		x := v.Args[0]
  3807  		v.reset(OpPPC64SLD)
  3808  		v.AddArg(x)
  3809  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3810  		v0.AddArg(y)
  3811  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3812  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3813  		v2.AuxInt = -64
  3814  		v2.AddArg(y)
  3815  		v1.AddArg(v2)
  3816  		v0.AddArg(v1)
  3817  		v.AddArg(v0)
  3818  		return true
  3819  	}
  3820  }
  3821  func rewriteValuePPC64_OpLsh64x8_0(v *Value) bool {
  3822  	b := v.Block
  3823  	typ := &b.Func.Config.Types
  3824  	// match: (Lsh64x8 x y)
  3825  	// cond: shiftIsBounded(v)
  3826  	// result: (SLD x y)
  3827  	for {
  3828  		y := v.Args[1]
  3829  		x := v.Args[0]
  3830  		if !(shiftIsBounded(v)) {
  3831  			break
  3832  		}
  3833  		v.reset(OpPPC64SLD)
  3834  		v.AddArg(x)
  3835  		v.AddArg(y)
  3836  		return true
  3837  	}
  3838  	// match: (Lsh64x8 x y)
  3839  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] (ZeroExt8to64 y)))))
  3840  	for {
  3841  		y := v.Args[1]
  3842  		x := v.Args[0]
  3843  		v.reset(OpPPC64SLD)
  3844  		v.AddArg(x)
  3845  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3846  		v0.AddArg(y)
  3847  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3848  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3849  		v2.AuxInt = -64
  3850  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3851  		v3.AddArg(y)
  3852  		v2.AddArg(v3)
  3853  		v1.AddArg(v2)
  3854  		v0.AddArg(v1)
  3855  		v.AddArg(v0)
  3856  		return true
  3857  	}
  3858  }
  3859  func rewriteValuePPC64_OpLsh8x16_0(v *Value) bool {
  3860  	b := v.Block
  3861  	typ := &b.Func.Config.Types
  3862  	// match: (Lsh8x16 x y)
  3863  	// cond: shiftIsBounded(v)
  3864  	// result: (SLW x y)
  3865  	for {
  3866  		y := v.Args[1]
  3867  		x := v.Args[0]
  3868  		if !(shiftIsBounded(v)) {
  3869  			break
  3870  		}
  3871  		v.reset(OpPPC64SLW)
  3872  		v.AddArg(x)
  3873  		v.AddArg(y)
  3874  		return true
  3875  	}
  3876  	// match: (Lsh8x16 x y)
  3877  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] (ZeroExt16to64 y)))))
  3878  	for {
  3879  		y := v.Args[1]
  3880  		x := v.Args[0]
  3881  		v.reset(OpPPC64SLW)
  3882  		v.AddArg(x)
  3883  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3884  		v0.AddArg(y)
  3885  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3886  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3887  		v2.AuxInt = -8
  3888  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3889  		v3.AddArg(y)
  3890  		v2.AddArg(v3)
  3891  		v1.AddArg(v2)
  3892  		v0.AddArg(v1)
  3893  		v.AddArg(v0)
  3894  		return true
  3895  	}
  3896  }
  3897  func rewriteValuePPC64_OpLsh8x32_0(v *Value) bool {
  3898  	b := v.Block
  3899  	typ := &b.Func.Config.Types
  3900  	// match: (Lsh8x32 x (Const64 [c]))
  3901  	// cond: uint32(c) < 8
  3902  	// result: (SLWconst x [c])
  3903  	for {
  3904  		_ = v.Args[1]
  3905  		x := v.Args[0]
  3906  		v_1 := v.Args[1]
  3907  		if v_1.Op != OpConst64 {
  3908  			break
  3909  		}
  3910  		c := v_1.AuxInt
  3911  		if !(uint32(c) < 8) {
  3912  			break
  3913  		}
  3914  		v.reset(OpPPC64SLWconst)
  3915  		v.AuxInt = c
  3916  		v.AddArg(x)
  3917  		return true
  3918  	}
  3919  	// match: (Lsh8x32 x (MOVDconst [c]))
  3920  	// cond: uint32(c) < 8
  3921  	// result: (SLWconst x [c])
  3922  	for {
  3923  		_ = v.Args[1]
  3924  		x := v.Args[0]
  3925  		v_1 := v.Args[1]
  3926  		if v_1.Op != OpPPC64MOVDconst {
  3927  			break
  3928  		}
  3929  		c := v_1.AuxInt
  3930  		if !(uint32(c) < 8) {
  3931  			break
  3932  		}
  3933  		v.reset(OpPPC64SLWconst)
  3934  		v.AuxInt = c
  3935  		v.AddArg(x)
  3936  		return true
  3937  	}
  3938  	// match: (Lsh8x32 x y)
  3939  	// cond: shiftIsBounded(v)
  3940  	// result: (SLW x y)
  3941  	for {
  3942  		y := v.Args[1]
  3943  		x := v.Args[0]
  3944  		if !(shiftIsBounded(v)) {
  3945  			break
  3946  		}
  3947  		v.reset(OpPPC64SLW)
  3948  		v.AddArg(x)
  3949  		v.AddArg(y)
  3950  		return true
  3951  	}
  3952  	// match: (Lsh8x32 x y)
  3953  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] (ZeroExt32to64 y)))))
  3954  	for {
  3955  		y := v.Args[1]
  3956  		x := v.Args[0]
  3957  		v.reset(OpPPC64SLW)
  3958  		v.AddArg(x)
  3959  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3960  		v0.AddArg(y)
  3961  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3962  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3963  		v2.AuxInt = -8
  3964  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3965  		v3.AddArg(y)
  3966  		v2.AddArg(v3)
  3967  		v1.AddArg(v2)
  3968  		v0.AddArg(v1)
  3969  		v.AddArg(v0)
  3970  		return true
  3971  	}
  3972  }
  3973  func rewriteValuePPC64_OpLsh8x64_0(v *Value) bool {
  3974  	b := v.Block
  3975  	typ := &b.Func.Config.Types
  3976  	// match: (Lsh8x64 x (Const64 [c]))
  3977  	// cond: uint64(c) < 8
  3978  	// result: (SLWconst x [c])
  3979  	for {
  3980  		_ = v.Args[1]
  3981  		x := v.Args[0]
  3982  		v_1 := v.Args[1]
  3983  		if v_1.Op != OpConst64 {
  3984  			break
  3985  		}
  3986  		c := v_1.AuxInt
  3987  		if !(uint64(c) < 8) {
  3988  			break
  3989  		}
  3990  		v.reset(OpPPC64SLWconst)
  3991  		v.AuxInt = c
  3992  		v.AddArg(x)
  3993  		return true
  3994  	}
  3995  	// match: (Lsh8x64 _ (Const64 [c]))
  3996  	// cond: uint64(c) >= 8
  3997  	// result: (MOVDconst [0])
  3998  	for {
  3999  		_ = v.Args[1]
  4000  		v_1 := v.Args[1]
  4001  		if v_1.Op != OpConst64 {
  4002  			break
  4003  		}
  4004  		c := v_1.AuxInt
  4005  		if !(uint64(c) >= 8) {
  4006  			break
  4007  		}
  4008  		v.reset(OpPPC64MOVDconst)
  4009  		v.AuxInt = 0
  4010  		return true
  4011  	}
  4012  	// match: (Lsh8x64 x (MOVDconst [c]))
  4013  	// cond: uint64(c) < 8
  4014  	// result: (SLWconst x [c])
  4015  	for {
  4016  		_ = v.Args[1]
  4017  		x := v.Args[0]
  4018  		v_1 := v.Args[1]
  4019  		if v_1.Op != OpPPC64MOVDconst {
  4020  			break
  4021  		}
  4022  		c := v_1.AuxInt
  4023  		if !(uint64(c) < 8) {
  4024  			break
  4025  		}
  4026  		v.reset(OpPPC64SLWconst)
  4027  		v.AuxInt = c
  4028  		v.AddArg(x)
  4029  		return true
  4030  	}
  4031  	// match: (Lsh8x64 x y)
  4032  	// cond: shiftIsBounded(v)
  4033  	// result: (SLW x y)
  4034  	for {
  4035  		y := v.Args[1]
  4036  		x := v.Args[0]
  4037  		if !(shiftIsBounded(v)) {
  4038  			break
  4039  		}
  4040  		v.reset(OpPPC64SLW)
  4041  		v.AddArg(x)
  4042  		v.AddArg(y)
  4043  		return true
  4044  	}
  4045  	// match: (Lsh8x64 x y)
  4046  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] y))))
  4047  	for {
  4048  		y := v.Args[1]
  4049  		x := v.Args[0]
  4050  		v.reset(OpPPC64SLW)
  4051  		v.AddArg(x)
  4052  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4053  		v0.AddArg(y)
  4054  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4055  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4056  		v2.AuxInt = -8
  4057  		v2.AddArg(y)
  4058  		v1.AddArg(v2)
  4059  		v0.AddArg(v1)
  4060  		v.AddArg(v0)
  4061  		return true
  4062  	}
  4063  }
  4064  func rewriteValuePPC64_OpLsh8x8_0(v *Value) bool {
  4065  	b := v.Block
  4066  	typ := &b.Func.Config.Types
  4067  	// match: (Lsh8x8 x y)
  4068  	// cond: shiftIsBounded(v)
  4069  	// result: (SLW x y)
  4070  	for {
  4071  		y := v.Args[1]
  4072  		x := v.Args[0]
  4073  		if !(shiftIsBounded(v)) {
  4074  			break
  4075  		}
  4076  		v.reset(OpPPC64SLW)
  4077  		v.AddArg(x)
  4078  		v.AddArg(y)
  4079  		return true
  4080  	}
  4081  	// match: (Lsh8x8 x y)
  4082  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] (ZeroExt8to64 y)))))
  4083  	for {
  4084  		y := v.Args[1]
  4085  		x := v.Args[0]
  4086  		v.reset(OpPPC64SLW)
  4087  		v.AddArg(x)
  4088  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4089  		v0.AddArg(y)
  4090  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4091  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4092  		v2.AuxInt = -8
  4093  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4094  		v3.AddArg(y)
  4095  		v2.AddArg(v3)
  4096  		v1.AddArg(v2)
  4097  		v0.AddArg(v1)
  4098  		v.AddArg(v0)
  4099  		return true
  4100  	}
  4101  }
  4102  func rewriteValuePPC64_OpMod16_0(v *Value) bool {
  4103  	b := v.Block
  4104  	typ := &b.Func.Config.Types
  4105  	// match: (Mod16 x y)
  4106  	// result: (Mod32 (SignExt16to32 x) (SignExt16to32 y))
  4107  	for {
  4108  		y := v.Args[1]
  4109  		x := v.Args[0]
  4110  		v.reset(OpMod32)
  4111  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4112  		v0.AddArg(x)
  4113  		v.AddArg(v0)
  4114  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4115  		v1.AddArg(y)
  4116  		v.AddArg(v1)
  4117  		return true
  4118  	}
  4119  }
  4120  func rewriteValuePPC64_OpMod16u_0(v *Value) bool {
  4121  	b := v.Block
  4122  	typ := &b.Func.Config.Types
  4123  	// match: (Mod16u x y)
  4124  	// result: (Mod32u (ZeroExt16to32 x) (ZeroExt16to32 y))
  4125  	for {
  4126  		y := v.Args[1]
  4127  		x := v.Args[0]
  4128  		v.reset(OpMod32u)
  4129  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4130  		v0.AddArg(x)
  4131  		v.AddArg(v0)
  4132  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4133  		v1.AddArg(y)
  4134  		v.AddArg(v1)
  4135  		return true
  4136  	}
  4137  }
  4138  func rewriteValuePPC64_OpMod32_0(v *Value) bool {
  4139  	b := v.Block
  4140  	typ := &b.Func.Config.Types
  4141  	// match: (Mod32 x y)
  4142  	// result: (SUB x (MULLW y (DIVW x y)))
  4143  	for {
  4144  		y := v.Args[1]
  4145  		x := v.Args[0]
  4146  		v.reset(OpPPC64SUB)
  4147  		v.AddArg(x)
  4148  		v0 := b.NewValue0(v.Pos, OpPPC64MULLW, typ.Int32)
  4149  		v0.AddArg(y)
  4150  		v1 := b.NewValue0(v.Pos, OpPPC64DIVW, typ.Int32)
  4151  		v1.AddArg(x)
  4152  		v1.AddArg(y)
  4153  		v0.AddArg(v1)
  4154  		v.AddArg(v0)
  4155  		return true
  4156  	}
  4157  }
  4158  func rewriteValuePPC64_OpMod32u_0(v *Value) bool {
  4159  	b := v.Block
  4160  	typ := &b.Func.Config.Types
  4161  	// match: (Mod32u x y)
  4162  	// result: (SUB x (MULLW y (DIVWU x y)))
  4163  	for {
  4164  		y := v.Args[1]
  4165  		x := v.Args[0]
  4166  		v.reset(OpPPC64SUB)
  4167  		v.AddArg(x)
  4168  		v0 := b.NewValue0(v.Pos, OpPPC64MULLW, typ.Int32)
  4169  		v0.AddArg(y)
  4170  		v1 := b.NewValue0(v.Pos, OpPPC64DIVWU, typ.Int32)
  4171  		v1.AddArg(x)
  4172  		v1.AddArg(y)
  4173  		v0.AddArg(v1)
  4174  		v.AddArg(v0)
  4175  		return true
  4176  	}
  4177  }
  4178  func rewriteValuePPC64_OpMod64_0(v *Value) bool {
  4179  	b := v.Block
  4180  	typ := &b.Func.Config.Types
  4181  	// match: (Mod64 x y)
  4182  	// result: (SUB x (MULLD y (DIVD x y)))
  4183  	for {
  4184  		y := v.Args[1]
  4185  		x := v.Args[0]
  4186  		v.reset(OpPPC64SUB)
  4187  		v.AddArg(x)
  4188  		v0 := b.NewValue0(v.Pos, OpPPC64MULLD, typ.Int64)
  4189  		v0.AddArg(y)
  4190  		v1 := b.NewValue0(v.Pos, OpPPC64DIVD, typ.Int64)
  4191  		v1.AddArg(x)
  4192  		v1.AddArg(y)
  4193  		v0.AddArg(v1)
  4194  		v.AddArg(v0)
  4195  		return true
  4196  	}
  4197  }
  4198  func rewriteValuePPC64_OpMod64u_0(v *Value) bool {
  4199  	b := v.Block
  4200  	typ := &b.Func.Config.Types
  4201  	// match: (Mod64u x y)
  4202  	// result: (SUB x (MULLD y (DIVDU x y)))
  4203  	for {
  4204  		y := v.Args[1]
  4205  		x := v.Args[0]
  4206  		v.reset(OpPPC64SUB)
  4207  		v.AddArg(x)
  4208  		v0 := b.NewValue0(v.Pos, OpPPC64MULLD, typ.Int64)
  4209  		v0.AddArg(y)
  4210  		v1 := b.NewValue0(v.Pos, OpPPC64DIVDU, typ.Int64)
  4211  		v1.AddArg(x)
  4212  		v1.AddArg(y)
  4213  		v0.AddArg(v1)
  4214  		v.AddArg(v0)
  4215  		return true
  4216  	}
  4217  }
  4218  func rewriteValuePPC64_OpMod8_0(v *Value) bool {
  4219  	b := v.Block
  4220  	typ := &b.Func.Config.Types
  4221  	// match: (Mod8 x y)
  4222  	// result: (Mod32 (SignExt8to32 x) (SignExt8to32 y))
  4223  	for {
  4224  		y := v.Args[1]
  4225  		x := v.Args[0]
  4226  		v.reset(OpMod32)
  4227  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  4228  		v0.AddArg(x)
  4229  		v.AddArg(v0)
  4230  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  4231  		v1.AddArg(y)
  4232  		v.AddArg(v1)
  4233  		return true
  4234  	}
  4235  }
  4236  func rewriteValuePPC64_OpMod8u_0(v *Value) bool {
  4237  	b := v.Block
  4238  	typ := &b.Func.Config.Types
  4239  	// match: (Mod8u x y)
  4240  	// result: (Mod32u (ZeroExt8to32 x) (ZeroExt8to32 y))
  4241  	for {
  4242  		y := v.Args[1]
  4243  		x := v.Args[0]
  4244  		v.reset(OpMod32u)
  4245  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  4246  		v0.AddArg(x)
  4247  		v.AddArg(v0)
  4248  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  4249  		v1.AddArg(y)
  4250  		v.AddArg(v1)
  4251  		return true
  4252  	}
  4253  }
  4254  func rewriteValuePPC64_OpMove_0(v *Value) bool {
  4255  	b := v.Block
  4256  	typ := &b.Func.Config.Types
  4257  	// match: (Move [0] _ _ mem)
  4258  	// result: mem
  4259  	for {
  4260  		if v.AuxInt != 0 {
  4261  			break
  4262  		}
  4263  		mem := v.Args[2]
  4264  		v.reset(OpCopy)
  4265  		v.Type = mem.Type
  4266  		v.AddArg(mem)
  4267  		return true
  4268  	}
  4269  	// match: (Move [1] dst src mem)
  4270  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  4271  	for {
  4272  		if v.AuxInt != 1 {
  4273  			break
  4274  		}
  4275  		mem := v.Args[2]
  4276  		dst := v.Args[0]
  4277  		src := v.Args[1]
  4278  		v.reset(OpPPC64MOVBstore)
  4279  		v.AddArg(dst)
  4280  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4281  		v0.AddArg(src)
  4282  		v0.AddArg(mem)
  4283  		v.AddArg(v0)
  4284  		v.AddArg(mem)
  4285  		return true
  4286  	}
  4287  	// match: (Move [2] dst src mem)
  4288  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  4289  	for {
  4290  		if v.AuxInt != 2 {
  4291  			break
  4292  		}
  4293  		mem := v.Args[2]
  4294  		dst := v.Args[0]
  4295  		src := v.Args[1]
  4296  		v.reset(OpPPC64MOVHstore)
  4297  		v.AddArg(dst)
  4298  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  4299  		v0.AddArg(src)
  4300  		v0.AddArg(mem)
  4301  		v.AddArg(v0)
  4302  		v.AddArg(mem)
  4303  		return true
  4304  	}
  4305  	// match: (Move [4] dst src mem)
  4306  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  4307  	for {
  4308  		if v.AuxInt != 4 {
  4309  			break
  4310  		}
  4311  		mem := v.Args[2]
  4312  		dst := v.Args[0]
  4313  		src := v.Args[1]
  4314  		v.reset(OpPPC64MOVWstore)
  4315  		v.AddArg(dst)
  4316  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4317  		v0.AddArg(src)
  4318  		v0.AddArg(mem)
  4319  		v.AddArg(v0)
  4320  		v.AddArg(mem)
  4321  		return true
  4322  	}
  4323  	// match: (Move [8] {t} dst src mem)
  4324  	// cond: t.(*types.Type).Alignment()%4 == 0
  4325  	// result: (MOVDstore dst (MOVDload src mem) mem)
  4326  	for {
  4327  		if v.AuxInt != 8 {
  4328  			break
  4329  		}
  4330  		t := v.Aux
  4331  		mem := v.Args[2]
  4332  		dst := v.Args[0]
  4333  		src := v.Args[1]
  4334  		if !(t.(*types.Type).Alignment()%4 == 0) {
  4335  			break
  4336  		}
  4337  		v.reset(OpPPC64MOVDstore)
  4338  		v.AddArg(dst)
  4339  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDload, typ.Int64)
  4340  		v0.AddArg(src)
  4341  		v0.AddArg(mem)
  4342  		v.AddArg(v0)
  4343  		v.AddArg(mem)
  4344  		return true
  4345  	}
  4346  	// match: (Move [8] dst src mem)
  4347  	// result: (MOVWstore [4] dst (MOVWZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  4348  	for {
  4349  		if v.AuxInt != 8 {
  4350  			break
  4351  		}
  4352  		mem := v.Args[2]
  4353  		dst := v.Args[0]
  4354  		src := v.Args[1]
  4355  		v.reset(OpPPC64MOVWstore)
  4356  		v.AuxInt = 4
  4357  		v.AddArg(dst)
  4358  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4359  		v0.AuxInt = 4
  4360  		v0.AddArg(src)
  4361  		v0.AddArg(mem)
  4362  		v.AddArg(v0)
  4363  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4364  		v1.AddArg(dst)
  4365  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4366  		v2.AddArg(src)
  4367  		v2.AddArg(mem)
  4368  		v1.AddArg(v2)
  4369  		v1.AddArg(mem)
  4370  		v.AddArg(v1)
  4371  		return true
  4372  	}
  4373  	// match: (Move [3] dst src mem)
  4374  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHload src mem) mem))
  4375  	for {
  4376  		if v.AuxInt != 3 {
  4377  			break
  4378  		}
  4379  		mem := v.Args[2]
  4380  		dst := v.Args[0]
  4381  		src := v.Args[1]
  4382  		v.reset(OpPPC64MOVBstore)
  4383  		v.AuxInt = 2
  4384  		v.AddArg(dst)
  4385  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4386  		v0.AuxInt = 2
  4387  		v0.AddArg(src)
  4388  		v0.AddArg(mem)
  4389  		v.AddArg(v0)
  4390  		v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, types.TypeMem)
  4391  		v1.AddArg(dst)
  4392  		v2 := b.NewValue0(v.Pos, OpPPC64MOVHload, typ.Int16)
  4393  		v2.AddArg(src)
  4394  		v2.AddArg(mem)
  4395  		v1.AddArg(v2)
  4396  		v1.AddArg(mem)
  4397  		v.AddArg(v1)
  4398  		return true
  4399  	}
  4400  	// match: (Move [5] dst src mem)
  4401  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  4402  	for {
  4403  		if v.AuxInt != 5 {
  4404  			break
  4405  		}
  4406  		mem := v.Args[2]
  4407  		dst := v.Args[0]
  4408  		src := v.Args[1]
  4409  		v.reset(OpPPC64MOVBstore)
  4410  		v.AuxInt = 4
  4411  		v.AddArg(dst)
  4412  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4413  		v0.AuxInt = 4
  4414  		v0.AddArg(src)
  4415  		v0.AddArg(mem)
  4416  		v.AddArg(v0)
  4417  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4418  		v1.AddArg(dst)
  4419  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4420  		v2.AddArg(src)
  4421  		v2.AddArg(mem)
  4422  		v1.AddArg(v2)
  4423  		v1.AddArg(mem)
  4424  		v.AddArg(v1)
  4425  		return true
  4426  	}
  4427  	// match: (Move [6] dst src mem)
  4428  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  4429  	for {
  4430  		if v.AuxInt != 6 {
  4431  			break
  4432  		}
  4433  		mem := v.Args[2]
  4434  		dst := v.Args[0]
  4435  		src := v.Args[1]
  4436  		v.reset(OpPPC64MOVHstore)
  4437  		v.AuxInt = 4
  4438  		v.AddArg(dst)
  4439  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  4440  		v0.AuxInt = 4
  4441  		v0.AddArg(src)
  4442  		v0.AddArg(mem)
  4443  		v.AddArg(v0)
  4444  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4445  		v1.AddArg(dst)
  4446  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4447  		v2.AddArg(src)
  4448  		v2.AddArg(mem)
  4449  		v1.AddArg(v2)
  4450  		v1.AddArg(mem)
  4451  		v.AddArg(v1)
  4452  		return true
  4453  	}
  4454  	// match: (Move [7] dst src mem)
  4455  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  4456  	for {
  4457  		if v.AuxInt != 7 {
  4458  			break
  4459  		}
  4460  		mem := v.Args[2]
  4461  		dst := v.Args[0]
  4462  		src := v.Args[1]
  4463  		v.reset(OpPPC64MOVBstore)
  4464  		v.AuxInt = 6
  4465  		v.AddArg(dst)
  4466  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4467  		v0.AuxInt = 6
  4468  		v0.AddArg(src)
  4469  		v0.AddArg(mem)
  4470  		v.AddArg(v0)
  4471  		v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, types.TypeMem)
  4472  		v1.AuxInt = 4
  4473  		v1.AddArg(dst)
  4474  		v2 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  4475  		v2.AuxInt = 4
  4476  		v2.AddArg(src)
  4477  		v2.AddArg(mem)
  4478  		v1.AddArg(v2)
  4479  		v3 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4480  		v3.AddArg(dst)
  4481  		v4 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4482  		v4.AddArg(src)
  4483  		v4.AddArg(mem)
  4484  		v3.AddArg(v4)
  4485  		v3.AddArg(mem)
  4486  		v1.AddArg(v3)
  4487  		v.AddArg(v1)
  4488  		return true
  4489  	}
  4490  	return false
  4491  }
  4492  func rewriteValuePPC64_OpMove_10(v *Value) bool {
  4493  	// match: (Move [s] dst src mem)
  4494  	// cond: s > 8
  4495  	// result: (LoweredMove [s] dst src mem)
  4496  	for {
  4497  		s := v.AuxInt
  4498  		mem := v.Args[2]
  4499  		dst := v.Args[0]
  4500  		src := v.Args[1]
  4501  		if !(s > 8) {
  4502  			break
  4503  		}
  4504  		v.reset(OpPPC64LoweredMove)
  4505  		v.AuxInt = s
  4506  		v.AddArg(dst)
  4507  		v.AddArg(src)
  4508  		v.AddArg(mem)
  4509  		return true
  4510  	}
  4511  	return false
  4512  }
  4513  func rewriteValuePPC64_OpMul16_0(v *Value) bool {
  4514  	// match: (Mul16 x y)
  4515  	// result: (MULLW x y)
  4516  	for {
  4517  		y := v.Args[1]
  4518  		x := v.Args[0]
  4519  		v.reset(OpPPC64MULLW)
  4520  		v.AddArg(x)
  4521  		v.AddArg(y)
  4522  		return true
  4523  	}
  4524  }
  4525  func rewriteValuePPC64_OpMul32_0(v *Value) bool {
  4526  	// match: (Mul32 x y)
  4527  	// result: (MULLW x y)
  4528  	for {
  4529  		y := v.Args[1]
  4530  		x := v.Args[0]
  4531  		v.reset(OpPPC64MULLW)
  4532  		v.AddArg(x)
  4533  		v.AddArg(y)
  4534  		return true
  4535  	}
  4536  }
  4537  func rewriteValuePPC64_OpMul32F_0(v *Value) bool {
  4538  	// match: (Mul32F x y)
  4539  	// result: (FMULS x y)
  4540  	for {
  4541  		y := v.Args[1]
  4542  		x := v.Args[0]
  4543  		v.reset(OpPPC64FMULS)
  4544  		v.AddArg(x)
  4545  		v.AddArg(y)
  4546  		return true
  4547  	}
  4548  }
  4549  func rewriteValuePPC64_OpMul64_0(v *Value) bool {
  4550  	// match: (Mul64 x y)
  4551  	// result: (MULLD x y)
  4552  	for {
  4553  		y := v.Args[1]
  4554  		x := v.Args[0]
  4555  		v.reset(OpPPC64MULLD)
  4556  		v.AddArg(x)
  4557  		v.AddArg(y)
  4558  		return true
  4559  	}
  4560  }
  4561  func rewriteValuePPC64_OpMul64F_0(v *Value) bool {
  4562  	// match: (Mul64F x y)
  4563  	// result: (FMUL x y)
  4564  	for {
  4565  		y := v.Args[1]
  4566  		x := v.Args[0]
  4567  		v.reset(OpPPC64FMUL)
  4568  		v.AddArg(x)
  4569  		v.AddArg(y)
  4570  		return true
  4571  	}
  4572  }
  4573  func rewriteValuePPC64_OpMul64uhilo_0(v *Value) bool {
  4574  	// match: (Mul64uhilo x y)
  4575  	// result: (LoweredMuluhilo x y)
  4576  	for {
  4577  		y := v.Args[1]
  4578  		x := v.Args[0]
  4579  		v.reset(OpPPC64LoweredMuluhilo)
  4580  		v.AddArg(x)
  4581  		v.AddArg(y)
  4582  		return true
  4583  	}
  4584  }
  4585  func rewriteValuePPC64_OpMul8_0(v *Value) bool {
  4586  	// match: (Mul8 x y)
  4587  	// result: (MULLW x y)
  4588  	for {
  4589  		y := v.Args[1]
  4590  		x := v.Args[0]
  4591  		v.reset(OpPPC64MULLW)
  4592  		v.AddArg(x)
  4593  		v.AddArg(y)
  4594  		return true
  4595  	}
  4596  }
  4597  func rewriteValuePPC64_OpNeg16_0(v *Value) bool {
  4598  	// match: (Neg16 x)
  4599  	// result: (NEG x)
  4600  	for {
  4601  		x := v.Args[0]
  4602  		v.reset(OpPPC64NEG)
  4603  		v.AddArg(x)
  4604  		return true
  4605  	}
  4606  }
  4607  func rewriteValuePPC64_OpNeg32_0(v *Value) bool {
  4608  	// match: (Neg32 x)
  4609  	// result: (NEG x)
  4610  	for {
  4611  		x := v.Args[0]
  4612  		v.reset(OpPPC64NEG)
  4613  		v.AddArg(x)
  4614  		return true
  4615  	}
  4616  }
  4617  func rewriteValuePPC64_OpNeg32F_0(v *Value) bool {
  4618  	// match: (Neg32F x)
  4619  	// result: (FNEG x)
  4620  	for {
  4621  		x := v.Args[0]
  4622  		v.reset(OpPPC64FNEG)
  4623  		v.AddArg(x)
  4624  		return true
  4625  	}
  4626  }
  4627  func rewriteValuePPC64_OpNeg64_0(v *Value) bool {
  4628  	// match: (Neg64 x)
  4629  	// result: (NEG x)
  4630  	for {
  4631  		x := v.Args[0]
  4632  		v.reset(OpPPC64NEG)
  4633  		v.AddArg(x)
  4634  		return true
  4635  	}
  4636  }
  4637  func rewriteValuePPC64_OpNeg64F_0(v *Value) bool {
  4638  	// match: (Neg64F x)
  4639  	// result: (FNEG x)
  4640  	for {
  4641  		x := v.Args[0]
  4642  		v.reset(OpPPC64FNEG)
  4643  		v.AddArg(x)
  4644  		return true
  4645  	}
  4646  }
  4647  func rewriteValuePPC64_OpNeg8_0(v *Value) bool {
  4648  	// match: (Neg8 x)
  4649  	// result: (NEG x)
  4650  	for {
  4651  		x := v.Args[0]
  4652  		v.reset(OpPPC64NEG)
  4653  		v.AddArg(x)
  4654  		return true
  4655  	}
  4656  }
  4657  func rewriteValuePPC64_OpNeq16_0(v *Value) bool {
  4658  	b := v.Block
  4659  	typ := &b.Func.Config.Types
  4660  	// match: (Neq16 x y)
  4661  	// cond: isSigned(x.Type) && isSigned(y.Type)
  4662  	// result: (NotEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  4663  	for {
  4664  		y := v.Args[1]
  4665  		x := v.Args[0]
  4666  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  4667  			break
  4668  		}
  4669  		v.reset(OpPPC64NotEqual)
  4670  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  4671  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4672  		v1.AddArg(x)
  4673  		v0.AddArg(v1)
  4674  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4675  		v2.AddArg(y)
  4676  		v0.AddArg(v2)
  4677  		v.AddArg(v0)
  4678  		return true
  4679  	}
  4680  	// match: (Neq16 x y)
  4681  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  4682  	for {
  4683  		y := v.Args[1]
  4684  		x := v.Args[0]
  4685  		v.reset(OpPPC64NotEqual)
  4686  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  4687  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4688  		v1.AddArg(x)
  4689  		v0.AddArg(v1)
  4690  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4691  		v2.AddArg(y)
  4692  		v0.AddArg(v2)
  4693  		v.AddArg(v0)
  4694  		return true
  4695  	}
  4696  }
  4697  func rewriteValuePPC64_OpNeq32_0(v *Value) bool {
  4698  	b := v.Block
  4699  	// match: (Neq32 x y)
  4700  	// result: (NotEqual (CMPW x y))
  4701  	for {
  4702  		y := v.Args[1]
  4703  		x := v.Args[0]
  4704  		v.reset(OpPPC64NotEqual)
  4705  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  4706  		v0.AddArg(x)
  4707  		v0.AddArg(y)
  4708  		v.AddArg(v0)
  4709  		return true
  4710  	}
  4711  }
  4712  func rewriteValuePPC64_OpNeq32F_0(v *Value) bool {
  4713  	b := v.Block
  4714  	// match: (Neq32F x y)
  4715  	// result: (NotEqual (FCMPU x y))
  4716  	for {
  4717  		y := v.Args[1]
  4718  		x := v.Args[0]
  4719  		v.reset(OpPPC64NotEqual)
  4720  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  4721  		v0.AddArg(x)
  4722  		v0.AddArg(y)
  4723  		v.AddArg(v0)
  4724  		return true
  4725  	}
  4726  }
  4727  func rewriteValuePPC64_OpNeq64_0(v *Value) bool {
  4728  	b := v.Block
  4729  	// match: (Neq64 x y)
  4730  	// result: (NotEqual (CMP x y))
  4731  	for {
  4732  		y := v.Args[1]
  4733  		x := v.Args[0]
  4734  		v.reset(OpPPC64NotEqual)
  4735  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  4736  		v0.AddArg(x)
  4737  		v0.AddArg(y)
  4738  		v.AddArg(v0)
  4739  		return true
  4740  	}
  4741  }
  4742  func rewriteValuePPC64_OpNeq64F_0(v *Value) bool {
  4743  	b := v.Block
  4744  	// match: (Neq64F x y)
  4745  	// result: (NotEqual (FCMPU x y))
  4746  	for {
  4747  		y := v.Args[1]
  4748  		x := v.Args[0]
  4749  		v.reset(OpPPC64NotEqual)
  4750  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  4751  		v0.AddArg(x)
  4752  		v0.AddArg(y)
  4753  		v.AddArg(v0)
  4754  		return true
  4755  	}
  4756  }
  4757  func rewriteValuePPC64_OpNeq8_0(v *Value) bool {
  4758  	b := v.Block
  4759  	typ := &b.Func.Config.Types
  4760  	// match: (Neq8 x y)
  4761  	// cond: isSigned(x.Type) && isSigned(y.Type)
  4762  	// result: (NotEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  4763  	for {
  4764  		y := v.Args[1]
  4765  		x := v.Args[0]
  4766  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  4767  			break
  4768  		}
  4769  		v.reset(OpPPC64NotEqual)
  4770  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  4771  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  4772  		v1.AddArg(x)
  4773  		v0.AddArg(v1)
  4774  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  4775  		v2.AddArg(y)
  4776  		v0.AddArg(v2)
  4777  		v.AddArg(v0)
  4778  		return true
  4779  	}
  4780  	// match: (Neq8 x y)
  4781  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  4782  	for {
  4783  		y := v.Args[1]
  4784  		x := v.Args[0]
  4785  		v.reset(OpPPC64NotEqual)
  4786  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  4787  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  4788  		v1.AddArg(x)
  4789  		v0.AddArg(v1)
  4790  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  4791  		v2.AddArg(y)
  4792  		v0.AddArg(v2)
  4793  		v.AddArg(v0)
  4794  		return true
  4795  	}
  4796  }
  4797  func rewriteValuePPC64_OpNeqB_0(v *Value) bool {
  4798  	// match: (NeqB x y)
  4799  	// result: (XOR x y)
  4800  	for {
  4801  		y := v.Args[1]
  4802  		x := v.Args[0]
  4803  		v.reset(OpPPC64XOR)
  4804  		v.AddArg(x)
  4805  		v.AddArg(y)
  4806  		return true
  4807  	}
  4808  }
  4809  func rewriteValuePPC64_OpNeqPtr_0(v *Value) bool {
  4810  	b := v.Block
  4811  	// match: (NeqPtr x y)
  4812  	// result: (NotEqual (CMP x y))
  4813  	for {
  4814  		y := v.Args[1]
  4815  		x := v.Args[0]
  4816  		v.reset(OpPPC64NotEqual)
  4817  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  4818  		v0.AddArg(x)
  4819  		v0.AddArg(y)
  4820  		v.AddArg(v0)
  4821  		return true
  4822  	}
  4823  }
  4824  func rewriteValuePPC64_OpNilCheck_0(v *Value) bool {
  4825  	// match: (NilCheck ptr mem)
  4826  	// result: (LoweredNilCheck ptr mem)
  4827  	for {
  4828  		mem := v.Args[1]
  4829  		ptr := v.Args[0]
  4830  		v.reset(OpPPC64LoweredNilCheck)
  4831  		v.AddArg(ptr)
  4832  		v.AddArg(mem)
  4833  		return true
  4834  	}
  4835  }
  4836  func rewriteValuePPC64_OpNot_0(v *Value) bool {
  4837  	// match: (Not x)
  4838  	// result: (XORconst [1] x)
  4839  	for {
  4840  		x := v.Args[0]
  4841  		v.reset(OpPPC64XORconst)
  4842  		v.AuxInt = 1
  4843  		v.AddArg(x)
  4844  		return true
  4845  	}
  4846  }
  4847  func rewriteValuePPC64_OpOffPtr_0(v *Value) bool {
  4848  	b := v.Block
  4849  	typ := &b.Func.Config.Types
  4850  	// match: (OffPtr [off] ptr)
  4851  	// result: (ADD (MOVDconst <typ.Int64> [off]) ptr)
  4852  	for {
  4853  		off := v.AuxInt
  4854  		ptr := v.Args[0]
  4855  		v.reset(OpPPC64ADD)
  4856  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  4857  		v0.AuxInt = off
  4858  		v.AddArg(v0)
  4859  		v.AddArg(ptr)
  4860  		return true
  4861  	}
  4862  }
  4863  func rewriteValuePPC64_OpOr16_0(v *Value) bool {
  4864  	// match: (Or16 x y)
  4865  	// result: (OR x y)
  4866  	for {
  4867  		y := v.Args[1]
  4868  		x := v.Args[0]
  4869  		v.reset(OpPPC64OR)
  4870  		v.AddArg(x)
  4871  		v.AddArg(y)
  4872  		return true
  4873  	}
  4874  }
  4875  func rewriteValuePPC64_OpOr32_0(v *Value) bool {
  4876  	// match: (Or32 x y)
  4877  	// result: (OR x y)
  4878  	for {
  4879  		y := v.Args[1]
  4880  		x := v.Args[0]
  4881  		v.reset(OpPPC64OR)
  4882  		v.AddArg(x)
  4883  		v.AddArg(y)
  4884  		return true
  4885  	}
  4886  }
  4887  func rewriteValuePPC64_OpOr64_0(v *Value) bool {
  4888  	// match: (Or64 x y)
  4889  	// result: (OR x y)
  4890  	for {
  4891  		y := v.Args[1]
  4892  		x := v.Args[0]
  4893  		v.reset(OpPPC64OR)
  4894  		v.AddArg(x)
  4895  		v.AddArg(y)
  4896  		return true
  4897  	}
  4898  }
  4899  func rewriteValuePPC64_OpOr8_0(v *Value) bool {
  4900  	// match: (Or8 x y)
  4901  	// result: (OR x y)
  4902  	for {
  4903  		y := v.Args[1]
  4904  		x := v.Args[0]
  4905  		v.reset(OpPPC64OR)
  4906  		v.AddArg(x)
  4907  		v.AddArg(y)
  4908  		return true
  4909  	}
  4910  }
  4911  func rewriteValuePPC64_OpOrB_0(v *Value) bool {
  4912  	// match: (OrB x y)
  4913  	// result: (OR x y)
  4914  	for {
  4915  		y := v.Args[1]
  4916  		x := v.Args[0]
  4917  		v.reset(OpPPC64OR)
  4918  		v.AddArg(x)
  4919  		v.AddArg(y)
  4920  		return true
  4921  	}
  4922  }
  4923  func rewriteValuePPC64_OpPPC64ADD_0(v *Value) bool {
  4924  	b := v.Block
  4925  	typ := &b.Func.Config.Types
  4926  	// match: (ADD (SLDconst x [c]) (SRDconst x [d]))
  4927  	// cond: d == 64-c
  4928  	// result: (ROTLconst [c] x)
  4929  	for {
  4930  		_ = v.Args[1]
  4931  		v_0 := v.Args[0]
  4932  		if v_0.Op != OpPPC64SLDconst {
  4933  			break
  4934  		}
  4935  		c := v_0.AuxInt
  4936  		x := v_0.Args[0]
  4937  		v_1 := v.Args[1]
  4938  		if v_1.Op != OpPPC64SRDconst {
  4939  			break
  4940  		}
  4941  		d := v_1.AuxInt
  4942  		if x != v_1.Args[0] || !(d == 64-c) {
  4943  			break
  4944  		}
  4945  		v.reset(OpPPC64ROTLconst)
  4946  		v.AuxInt = c
  4947  		v.AddArg(x)
  4948  		return true
  4949  	}
  4950  	// match: (ADD (SRDconst x [d]) (SLDconst x [c]))
  4951  	// cond: d == 64-c
  4952  	// result: (ROTLconst [c] x)
  4953  	for {
  4954  		_ = v.Args[1]
  4955  		v_0 := v.Args[0]
  4956  		if v_0.Op != OpPPC64SRDconst {
  4957  			break
  4958  		}
  4959  		d := v_0.AuxInt
  4960  		x := v_0.Args[0]
  4961  		v_1 := v.Args[1]
  4962  		if v_1.Op != OpPPC64SLDconst {
  4963  			break
  4964  		}
  4965  		c := v_1.AuxInt
  4966  		if x != v_1.Args[0] || !(d == 64-c) {
  4967  			break
  4968  		}
  4969  		v.reset(OpPPC64ROTLconst)
  4970  		v.AuxInt = c
  4971  		v.AddArg(x)
  4972  		return true
  4973  	}
  4974  	// match: (ADD (SLWconst x [c]) (SRWconst x [d]))
  4975  	// cond: d == 32-c
  4976  	// result: (ROTLWconst [c] x)
  4977  	for {
  4978  		_ = v.Args[1]
  4979  		v_0 := v.Args[0]
  4980  		if v_0.Op != OpPPC64SLWconst {
  4981  			break
  4982  		}
  4983  		c := v_0.AuxInt
  4984  		x := v_0.Args[0]
  4985  		v_1 := v.Args[1]
  4986  		if v_1.Op != OpPPC64SRWconst {
  4987  			break
  4988  		}
  4989  		d := v_1.AuxInt
  4990  		if x != v_1.Args[0] || !(d == 32-c) {
  4991  			break
  4992  		}
  4993  		v.reset(OpPPC64ROTLWconst)
  4994  		v.AuxInt = c
  4995  		v.AddArg(x)
  4996  		return true
  4997  	}
  4998  	// match: (ADD (SRWconst x [d]) (SLWconst x [c]))
  4999  	// cond: d == 32-c
  5000  	// result: (ROTLWconst [c] x)
  5001  	for {
  5002  		_ = v.Args[1]
  5003  		v_0 := v.Args[0]
  5004  		if v_0.Op != OpPPC64SRWconst {
  5005  			break
  5006  		}
  5007  		d := v_0.AuxInt
  5008  		x := v_0.Args[0]
  5009  		v_1 := v.Args[1]
  5010  		if v_1.Op != OpPPC64SLWconst {
  5011  			break
  5012  		}
  5013  		c := v_1.AuxInt
  5014  		if x != v_1.Args[0] || !(d == 32-c) {
  5015  			break
  5016  		}
  5017  		v.reset(OpPPC64ROTLWconst)
  5018  		v.AuxInt = c
  5019  		v.AddArg(x)
  5020  		return true
  5021  	}
  5022  	// match: (ADD (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
  5023  	// result: (ROTL x y)
  5024  	for {
  5025  		_ = v.Args[1]
  5026  		v_0 := v.Args[0]
  5027  		if v_0.Op != OpPPC64SLD {
  5028  			break
  5029  		}
  5030  		_ = v_0.Args[1]
  5031  		x := v_0.Args[0]
  5032  		v_0_1 := v_0.Args[1]
  5033  		if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || v_0_1.AuxInt != 63 {
  5034  			break
  5035  		}
  5036  		y := v_0_1.Args[0]
  5037  		v_1 := v.Args[1]
  5038  		if v_1.Op != OpPPC64SRD {
  5039  			break
  5040  		}
  5041  		_ = v_1.Args[1]
  5042  		if x != v_1.Args[0] {
  5043  			break
  5044  		}
  5045  		v_1_1 := v_1.Args[1]
  5046  		if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
  5047  			break
  5048  		}
  5049  		_ = v_1_1.Args[1]
  5050  		v_1_1_0 := v_1_1.Args[0]
  5051  		if v_1_1_0.Op != OpPPC64MOVDconst || v_1_1_0.AuxInt != 64 {
  5052  			break
  5053  		}
  5054  		v_1_1_1 := v_1_1.Args[1]
  5055  		if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || v_1_1_1.AuxInt != 63 || y != v_1_1_1.Args[0] {
  5056  			break
  5057  		}
  5058  		v.reset(OpPPC64ROTL)
  5059  		v.AddArg(x)
  5060  		v.AddArg(y)
  5061  		return true
  5062  	}
  5063  	// match: (ADD (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))) (SLD x (ANDconst <typ.Int64> [63] y)))
  5064  	// result: (ROTL x y)
  5065  	for {
  5066  		_ = v.Args[1]
  5067  		v_0 := v.Args[0]
  5068  		if v_0.Op != OpPPC64SRD {
  5069  			break
  5070  		}
  5071  		_ = v_0.Args[1]
  5072  		x := v_0.Args[0]
  5073  		v_0_1 := v_0.Args[1]
  5074  		if v_0_1.Op != OpPPC64SUB || v_0_1.Type != typ.UInt {
  5075  			break
  5076  		}
  5077  		_ = v_0_1.Args[1]
  5078  		v_0_1_0 := v_0_1.Args[0]
  5079  		if v_0_1_0.Op != OpPPC64MOVDconst || v_0_1_0.AuxInt != 64 {
  5080  			break
  5081  		}
  5082  		v_0_1_1 := v_0_1.Args[1]
  5083  		if v_0_1_1.Op != OpPPC64ANDconst || v_0_1_1.Type != typ.UInt || v_0_1_1.AuxInt != 63 {
  5084  			break
  5085  		}
  5086  		y := v_0_1_1.Args[0]
  5087  		v_1 := v.Args[1]
  5088  		if v_1.Op != OpPPC64SLD {
  5089  			break
  5090  		}
  5091  		_ = v_1.Args[1]
  5092  		if x != v_1.Args[0] {
  5093  			break
  5094  		}
  5095  		v_1_1 := v_1.Args[1]
  5096  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.Int64 || v_1_1.AuxInt != 63 || y != v_1_1.Args[0] {
  5097  			break
  5098  		}
  5099  		v.reset(OpPPC64ROTL)
  5100  		v.AddArg(x)
  5101  		v.AddArg(y)
  5102  		return true
  5103  	}
  5104  	// match: (ADD (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
  5105  	// result: (ROTLW x y)
  5106  	for {
  5107  		_ = v.Args[1]
  5108  		v_0 := v.Args[0]
  5109  		if v_0.Op != OpPPC64SLW {
  5110  			break
  5111  		}
  5112  		_ = v_0.Args[1]
  5113  		x := v_0.Args[0]
  5114  		v_0_1 := v_0.Args[1]
  5115  		if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || v_0_1.AuxInt != 31 {
  5116  			break
  5117  		}
  5118  		y := v_0_1.Args[0]
  5119  		v_1 := v.Args[1]
  5120  		if v_1.Op != OpPPC64SRW {
  5121  			break
  5122  		}
  5123  		_ = v_1.Args[1]
  5124  		if x != v_1.Args[0] {
  5125  			break
  5126  		}
  5127  		v_1_1 := v_1.Args[1]
  5128  		if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
  5129  			break
  5130  		}
  5131  		_ = v_1_1.Args[1]
  5132  		v_1_1_0 := v_1_1.Args[0]
  5133  		if v_1_1_0.Op != OpPPC64MOVDconst || v_1_1_0.AuxInt != 32 {
  5134  			break
  5135  		}
  5136  		v_1_1_1 := v_1_1.Args[1]
  5137  		if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || v_1_1_1.AuxInt != 31 || y != v_1_1_1.Args[0] {
  5138  			break
  5139  		}
  5140  		v.reset(OpPPC64ROTLW)
  5141  		v.AddArg(x)
  5142  		v.AddArg(y)
  5143  		return true
  5144  	}
  5145  	// match: (ADD (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))) (SLW x (ANDconst <typ.Int32> [31] y)))
  5146  	// result: (ROTLW x y)
  5147  	for {
  5148  		_ = v.Args[1]
  5149  		v_0 := v.Args[0]
  5150  		if v_0.Op != OpPPC64SRW {
  5151  			break
  5152  		}
  5153  		_ = v_0.Args[1]
  5154  		x := v_0.Args[0]
  5155  		v_0_1 := v_0.Args[1]
  5156  		if v_0_1.Op != OpPPC64SUB || v_0_1.Type != typ.UInt {
  5157  			break
  5158  		}
  5159  		_ = v_0_1.Args[1]
  5160  		v_0_1_0 := v_0_1.Args[0]
  5161  		if v_0_1_0.Op != OpPPC64MOVDconst || v_0_1_0.AuxInt != 32 {
  5162  			break
  5163  		}
  5164  		v_0_1_1 := v_0_1.Args[1]
  5165  		if v_0_1_1.Op != OpPPC64ANDconst || v_0_1_1.Type != typ.UInt || v_0_1_1.AuxInt != 31 {
  5166  			break
  5167  		}
  5168  		y := v_0_1_1.Args[0]
  5169  		v_1 := v.Args[1]
  5170  		if v_1.Op != OpPPC64SLW {
  5171  			break
  5172  		}
  5173  		_ = v_1.Args[1]
  5174  		if x != v_1.Args[0] {
  5175  			break
  5176  		}
  5177  		v_1_1 := v_1.Args[1]
  5178  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.Int32 || v_1_1.AuxInt != 31 || y != v_1_1.Args[0] {
  5179  			break
  5180  		}
  5181  		v.reset(OpPPC64ROTLW)
  5182  		v.AddArg(x)
  5183  		v.AddArg(y)
  5184  		return true
  5185  	}
  5186  	// match: (ADD x (MOVDconst [c]))
  5187  	// cond: is32Bit(c)
  5188  	// result: (ADDconst [c] x)
  5189  	for {
  5190  		_ = v.Args[1]
  5191  		x := v.Args[0]
  5192  		v_1 := v.Args[1]
  5193  		if v_1.Op != OpPPC64MOVDconst {
  5194  			break
  5195  		}
  5196  		c := v_1.AuxInt
  5197  		if !(is32Bit(c)) {
  5198  			break
  5199  		}
  5200  		v.reset(OpPPC64ADDconst)
  5201  		v.AuxInt = c
  5202  		v.AddArg(x)
  5203  		return true
  5204  	}
  5205  	// match: (ADD (MOVDconst [c]) x)
  5206  	// cond: is32Bit(c)
  5207  	// result: (ADDconst [c] x)
  5208  	for {
  5209  		x := v.Args[1]
  5210  		v_0 := v.Args[0]
  5211  		if v_0.Op != OpPPC64MOVDconst {
  5212  			break
  5213  		}
  5214  		c := v_0.AuxInt
  5215  		if !(is32Bit(c)) {
  5216  			break
  5217  		}
  5218  		v.reset(OpPPC64ADDconst)
  5219  		v.AuxInt = c
  5220  		v.AddArg(x)
  5221  		return true
  5222  	}
  5223  	return false
  5224  }
  5225  func rewriteValuePPC64_OpPPC64ADDconst_0(v *Value) bool {
  5226  	// match: (ADDconst [c] (ADDconst [d] x))
  5227  	// cond: is32Bit(c+d)
  5228  	// result: (ADDconst [c+d] x)
  5229  	for {
  5230  		c := v.AuxInt
  5231  		v_0 := v.Args[0]
  5232  		if v_0.Op != OpPPC64ADDconst {
  5233  			break
  5234  		}
  5235  		d := v_0.AuxInt
  5236  		x := v_0.Args[0]
  5237  		if !(is32Bit(c + d)) {
  5238  			break
  5239  		}
  5240  		v.reset(OpPPC64ADDconst)
  5241  		v.AuxInt = c + d
  5242  		v.AddArg(x)
  5243  		return true
  5244  	}
  5245  	// match: (ADDconst [0] x)
  5246  	// result: x
  5247  	for {
  5248  		if v.AuxInt != 0 {
  5249  			break
  5250  		}
  5251  		x := v.Args[0]
  5252  		v.reset(OpCopy)
  5253  		v.Type = x.Type
  5254  		v.AddArg(x)
  5255  		return true
  5256  	}
  5257  	// match: (ADDconst [c] (MOVDaddr [d] {sym} x))
  5258  	// result: (MOVDaddr [c+d] {sym} x)
  5259  	for {
  5260  		c := v.AuxInt
  5261  		v_0 := v.Args[0]
  5262  		if v_0.Op != OpPPC64MOVDaddr {
  5263  			break
  5264  		}
  5265  		d := v_0.AuxInt
  5266  		sym := v_0.Aux
  5267  		x := v_0.Args[0]
  5268  		v.reset(OpPPC64MOVDaddr)
  5269  		v.AuxInt = c + d
  5270  		v.Aux = sym
  5271  		v.AddArg(x)
  5272  		return true
  5273  	}
  5274  	return false
  5275  }
  5276  func rewriteValuePPC64_OpPPC64AND_0(v *Value) bool {
  5277  	// match: (AND x (NOR y y))
  5278  	// result: (ANDN x y)
  5279  	for {
  5280  		_ = v.Args[1]
  5281  		x := v.Args[0]
  5282  		v_1 := v.Args[1]
  5283  		if v_1.Op != OpPPC64NOR {
  5284  			break
  5285  		}
  5286  		y := v_1.Args[1]
  5287  		if y != v_1.Args[0] {
  5288  			break
  5289  		}
  5290  		v.reset(OpPPC64ANDN)
  5291  		v.AddArg(x)
  5292  		v.AddArg(y)
  5293  		return true
  5294  	}
  5295  	// match: (AND (NOR y y) x)
  5296  	// result: (ANDN x y)
  5297  	for {
  5298  		x := v.Args[1]
  5299  		v_0 := v.Args[0]
  5300  		if v_0.Op != OpPPC64NOR {
  5301  			break
  5302  		}
  5303  		y := v_0.Args[1]
  5304  		if y != v_0.Args[0] {
  5305  			break
  5306  		}
  5307  		v.reset(OpPPC64ANDN)
  5308  		v.AddArg(x)
  5309  		v.AddArg(y)
  5310  		return true
  5311  	}
  5312  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  5313  	// result: (MOVDconst [c&d])
  5314  	for {
  5315  		_ = v.Args[1]
  5316  		v_0 := v.Args[0]
  5317  		if v_0.Op != OpPPC64MOVDconst {
  5318  			break
  5319  		}
  5320  		c := v_0.AuxInt
  5321  		v_1 := v.Args[1]
  5322  		if v_1.Op != OpPPC64MOVDconst {
  5323  			break
  5324  		}
  5325  		d := v_1.AuxInt
  5326  		v.reset(OpPPC64MOVDconst)
  5327  		v.AuxInt = c & d
  5328  		return true
  5329  	}
  5330  	// match: (AND (MOVDconst [d]) (MOVDconst [c]))
  5331  	// result: (MOVDconst [c&d])
  5332  	for {
  5333  		_ = v.Args[1]
  5334  		v_0 := v.Args[0]
  5335  		if v_0.Op != OpPPC64MOVDconst {
  5336  			break
  5337  		}
  5338  		d := v_0.AuxInt
  5339  		v_1 := v.Args[1]
  5340  		if v_1.Op != OpPPC64MOVDconst {
  5341  			break
  5342  		}
  5343  		c := v_1.AuxInt
  5344  		v.reset(OpPPC64MOVDconst)
  5345  		v.AuxInt = c & d
  5346  		return true
  5347  	}
  5348  	// match: (AND x (MOVDconst [c]))
  5349  	// cond: isU16Bit(c)
  5350  	// result: (ANDconst [c] x)
  5351  	for {
  5352  		_ = v.Args[1]
  5353  		x := v.Args[0]
  5354  		v_1 := v.Args[1]
  5355  		if v_1.Op != OpPPC64MOVDconst {
  5356  			break
  5357  		}
  5358  		c := v_1.AuxInt
  5359  		if !(isU16Bit(c)) {
  5360  			break
  5361  		}
  5362  		v.reset(OpPPC64ANDconst)
  5363  		v.AuxInt = c
  5364  		v.AddArg(x)
  5365  		return true
  5366  	}
  5367  	// match: (AND (MOVDconst [c]) x)
  5368  	// cond: isU16Bit(c)
  5369  	// result: (ANDconst [c] x)
  5370  	for {
  5371  		x := v.Args[1]
  5372  		v_0 := v.Args[0]
  5373  		if v_0.Op != OpPPC64MOVDconst {
  5374  			break
  5375  		}
  5376  		c := v_0.AuxInt
  5377  		if !(isU16Bit(c)) {
  5378  			break
  5379  		}
  5380  		v.reset(OpPPC64ANDconst)
  5381  		v.AuxInt = c
  5382  		v.AddArg(x)
  5383  		return true
  5384  	}
  5385  	// match: (AND (MOVDconst [c]) y:(MOVWZreg _))
  5386  	// cond: c&0xFFFFFFFF == 0xFFFFFFFF
  5387  	// result: y
  5388  	for {
  5389  		_ = v.Args[1]
  5390  		v_0 := v.Args[0]
  5391  		if v_0.Op != OpPPC64MOVDconst {
  5392  			break
  5393  		}
  5394  		c := v_0.AuxInt
  5395  		y := v.Args[1]
  5396  		if y.Op != OpPPC64MOVWZreg || !(c&0xFFFFFFFF == 0xFFFFFFFF) {
  5397  			break
  5398  		}
  5399  		v.reset(OpCopy)
  5400  		v.Type = y.Type
  5401  		v.AddArg(y)
  5402  		return true
  5403  	}
  5404  	// match: (AND y:(MOVWZreg _) (MOVDconst [c]))
  5405  	// cond: c&0xFFFFFFFF == 0xFFFFFFFF
  5406  	// result: y
  5407  	for {
  5408  		_ = v.Args[1]
  5409  		y := v.Args[0]
  5410  		if y.Op != OpPPC64MOVWZreg {
  5411  			break
  5412  		}
  5413  		v_1 := v.Args[1]
  5414  		if v_1.Op != OpPPC64MOVDconst {
  5415  			break
  5416  		}
  5417  		c := v_1.AuxInt
  5418  		if !(c&0xFFFFFFFF == 0xFFFFFFFF) {
  5419  			break
  5420  		}
  5421  		v.reset(OpCopy)
  5422  		v.Type = y.Type
  5423  		v.AddArg(y)
  5424  		return true
  5425  	}
  5426  	// match: (AND (MOVDconst [0xFFFFFFFF]) y:(MOVWreg x))
  5427  	// result: (MOVWZreg x)
  5428  	for {
  5429  		_ = v.Args[1]
  5430  		v_0 := v.Args[0]
  5431  		if v_0.Op != OpPPC64MOVDconst || v_0.AuxInt != 0xFFFFFFFF {
  5432  			break
  5433  		}
  5434  		y := v.Args[1]
  5435  		if y.Op != OpPPC64MOVWreg {
  5436  			break
  5437  		}
  5438  		x := y.Args[0]
  5439  		v.reset(OpPPC64MOVWZreg)
  5440  		v.AddArg(x)
  5441  		return true
  5442  	}
  5443  	// match: (AND y:(MOVWreg x) (MOVDconst [0xFFFFFFFF]))
  5444  	// result: (MOVWZreg x)
  5445  	for {
  5446  		_ = v.Args[1]
  5447  		y := v.Args[0]
  5448  		if y.Op != OpPPC64MOVWreg {
  5449  			break
  5450  		}
  5451  		x := y.Args[0]
  5452  		v_1 := v.Args[1]
  5453  		if v_1.Op != OpPPC64MOVDconst || v_1.AuxInt != 0xFFFFFFFF {
  5454  			break
  5455  		}
  5456  		v.reset(OpPPC64MOVWZreg)
  5457  		v.AddArg(x)
  5458  		return true
  5459  	}
  5460  	return false
  5461  }
  5462  func rewriteValuePPC64_OpPPC64AND_10(v *Value) bool {
  5463  	// match: (AND (MOVDconst [c]) x:(MOVBZload _ _))
  5464  	// result: (ANDconst [c&0xFF] x)
  5465  	for {
  5466  		_ = v.Args[1]
  5467  		v_0 := v.Args[0]
  5468  		if v_0.Op != OpPPC64MOVDconst {
  5469  			break
  5470  		}
  5471  		c := v_0.AuxInt
  5472  		x := v.Args[1]
  5473  		if x.Op != OpPPC64MOVBZload {
  5474  			break
  5475  		}
  5476  		_ = x.Args[1]
  5477  		v.reset(OpPPC64ANDconst)
  5478  		v.AuxInt = c & 0xFF
  5479  		v.AddArg(x)
  5480  		return true
  5481  	}
  5482  	// match: (AND x:(MOVBZload _ _) (MOVDconst [c]))
  5483  	// result: (ANDconst [c&0xFF] x)
  5484  	for {
  5485  		_ = v.Args[1]
  5486  		x := v.Args[0]
  5487  		if x.Op != OpPPC64MOVBZload {
  5488  			break
  5489  		}
  5490  		_ = x.Args[1]
  5491  		v_1 := v.Args[1]
  5492  		if v_1.Op != OpPPC64MOVDconst {
  5493  			break
  5494  		}
  5495  		c := v_1.AuxInt
  5496  		v.reset(OpPPC64ANDconst)
  5497  		v.AuxInt = c & 0xFF
  5498  		v.AddArg(x)
  5499  		return true
  5500  	}
  5501  	// match: (AND x:(MOVBZload _ _) (MOVDconst [c]))
  5502  	// result: (ANDconst [c&0xFF] x)
  5503  	for {
  5504  		_ = v.Args[1]
  5505  		x := v.Args[0]
  5506  		if x.Op != OpPPC64MOVBZload {
  5507  			break
  5508  		}
  5509  		_ = x.Args[1]
  5510  		v_1 := v.Args[1]
  5511  		if v_1.Op != OpPPC64MOVDconst {
  5512  			break
  5513  		}
  5514  		c := v_1.AuxInt
  5515  		v.reset(OpPPC64ANDconst)
  5516  		v.AuxInt = c & 0xFF
  5517  		v.AddArg(x)
  5518  		return true
  5519  	}
  5520  	// match: (AND (MOVDconst [c]) x:(MOVBZload _ _))
  5521  	// result: (ANDconst [c&0xFF] x)
  5522  	for {
  5523  		_ = v.Args[1]
  5524  		v_0 := v.Args[0]
  5525  		if v_0.Op != OpPPC64MOVDconst {
  5526  			break
  5527  		}
  5528  		c := v_0.AuxInt
  5529  		x := v.Args[1]
  5530  		if x.Op != OpPPC64MOVBZload {
  5531  			break
  5532  		}
  5533  		_ = x.Args[1]
  5534  		v.reset(OpPPC64ANDconst)
  5535  		v.AuxInt = c & 0xFF
  5536  		v.AddArg(x)
  5537  		return true
  5538  	}
  5539  	return false
  5540  }
  5541  func rewriteValuePPC64_OpPPC64ANDconst_0(v *Value) bool {
  5542  	// match: (ANDconst [c] (ANDconst [d] x))
  5543  	// result: (ANDconst [c&d] x)
  5544  	for {
  5545  		c := v.AuxInt
  5546  		v_0 := v.Args[0]
  5547  		if v_0.Op != OpPPC64ANDconst {
  5548  			break
  5549  		}
  5550  		d := v_0.AuxInt
  5551  		x := v_0.Args[0]
  5552  		v.reset(OpPPC64ANDconst)
  5553  		v.AuxInt = c & d
  5554  		v.AddArg(x)
  5555  		return true
  5556  	}
  5557  	// match: (ANDconst [-1] x)
  5558  	// result: x
  5559  	for {
  5560  		if v.AuxInt != -1 {
  5561  			break
  5562  		}
  5563  		x := v.Args[0]
  5564  		v.reset(OpCopy)
  5565  		v.Type = x.Type
  5566  		v.AddArg(x)
  5567  		return true
  5568  	}
  5569  	// match: (ANDconst [0] _)
  5570  	// result: (MOVDconst [0])
  5571  	for {
  5572  		if v.AuxInt != 0 {
  5573  			break
  5574  		}
  5575  		v.reset(OpPPC64MOVDconst)
  5576  		v.AuxInt = 0
  5577  		return true
  5578  	}
  5579  	// match: (ANDconst [c] y:(MOVBZreg _))
  5580  	// cond: c&0xFF == 0xFF
  5581  	// result: y
  5582  	for {
  5583  		c := v.AuxInt
  5584  		y := v.Args[0]
  5585  		if y.Op != OpPPC64MOVBZreg || !(c&0xFF == 0xFF) {
  5586  			break
  5587  		}
  5588  		v.reset(OpCopy)
  5589  		v.Type = y.Type
  5590  		v.AddArg(y)
  5591  		return true
  5592  	}
  5593  	// match: (ANDconst [0xFF] y:(MOVBreg _))
  5594  	// result: y
  5595  	for {
  5596  		if v.AuxInt != 0xFF {
  5597  			break
  5598  		}
  5599  		y := v.Args[0]
  5600  		if y.Op != OpPPC64MOVBreg {
  5601  			break
  5602  		}
  5603  		v.reset(OpCopy)
  5604  		v.Type = y.Type
  5605  		v.AddArg(y)
  5606  		return true
  5607  	}
  5608  	// match: (ANDconst [c] y:(MOVHZreg _))
  5609  	// cond: c&0xFFFF == 0xFFFF
  5610  	// result: y
  5611  	for {
  5612  		c := v.AuxInt
  5613  		y := v.Args[0]
  5614  		if y.Op != OpPPC64MOVHZreg || !(c&0xFFFF == 0xFFFF) {
  5615  			break
  5616  		}
  5617  		v.reset(OpCopy)
  5618  		v.Type = y.Type
  5619  		v.AddArg(y)
  5620  		return true
  5621  	}
  5622  	// match: (ANDconst [0xFFFF] y:(MOVHreg _))
  5623  	// result: y
  5624  	for {
  5625  		if v.AuxInt != 0xFFFF {
  5626  			break
  5627  		}
  5628  		y := v.Args[0]
  5629  		if y.Op != OpPPC64MOVHreg {
  5630  			break
  5631  		}
  5632  		v.reset(OpCopy)
  5633  		v.Type = y.Type
  5634  		v.AddArg(y)
  5635  		return true
  5636  	}
  5637  	// match: (ANDconst [c] (MOVBreg x))
  5638  	// result: (ANDconst [c&0xFF] x)
  5639  	for {
  5640  		c := v.AuxInt
  5641  		v_0 := v.Args[0]
  5642  		if v_0.Op != OpPPC64MOVBreg {
  5643  			break
  5644  		}
  5645  		x := v_0.Args[0]
  5646  		v.reset(OpPPC64ANDconst)
  5647  		v.AuxInt = c & 0xFF
  5648  		v.AddArg(x)
  5649  		return true
  5650  	}
  5651  	// match: (ANDconst [c] (MOVBZreg x))
  5652  	// result: (ANDconst [c&0xFF] x)
  5653  	for {
  5654  		c := v.AuxInt
  5655  		v_0 := v.Args[0]
  5656  		if v_0.Op != OpPPC64MOVBZreg {
  5657  			break
  5658  		}
  5659  		x := v_0.Args[0]
  5660  		v.reset(OpPPC64ANDconst)
  5661  		v.AuxInt = c & 0xFF
  5662  		v.AddArg(x)
  5663  		return true
  5664  	}
  5665  	// match: (ANDconst [c] (MOVHreg x))
  5666  	// result: (ANDconst [c&0xFFFF] x)
  5667  	for {
  5668  		c := v.AuxInt
  5669  		v_0 := v.Args[0]
  5670  		if v_0.Op != OpPPC64MOVHreg {
  5671  			break
  5672  		}
  5673  		x := v_0.Args[0]
  5674  		v.reset(OpPPC64ANDconst)
  5675  		v.AuxInt = c & 0xFFFF
  5676  		v.AddArg(x)
  5677  		return true
  5678  	}
  5679  	return false
  5680  }
  5681  func rewriteValuePPC64_OpPPC64ANDconst_10(v *Value) bool {
  5682  	// match: (ANDconst [c] (MOVHZreg x))
  5683  	// result: (ANDconst [c&0xFFFF] x)
  5684  	for {
  5685  		c := v.AuxInt
  5686  		v_0 := v.Args[0]
  5687  		if v_0.Op != OpPPC64MOVHZreg {
  5688  			break
  5689  		}
  5690  		x := v_0.Args[0]
  5691  		v.reset(OpPPC64ANDconst)
  5692  		v.AuxInt = c & 0xFFFF
  5693  		v.AddArg(x)
  5694  		return true
  5695  	}
  5696  	// match: (ANDconst [c] (MOVWreg x))
  5697  	// result: (ANDconst [c&0xFFFFFFFF] x)
  5698  	for {
  5699  		c := v.AuxInt
  5700  		v_0 := v.Args[0]
  5701  		if v_0.Op != OpPPC64MOVWreg {
  5702  			break
  5703  		}
  5704  		x := v_0.Args[0]
  5705  		v.reset(OpPPC64ANDconst)
  5706  		v.AuxInt = c & 0xFFFFFFFF
  5707  		v.AddArg(x)
  5708  		return true
  5709  	}
  5710  	// match: (ANDconst [c] (MOVWZreg x))
  5711  	// result: (ANDconst [c&0xFFFFFFFF] x)
  5712  	for {
  5713  		c := v.AuxInt
  5714  		v_0 := v.Args[0]
  5715  		if v_0.Op != OpPPC64MOVWZreg {
  5716  			break
  5717  		}
  5718  		x := v_0.Args[0]
  5719  		v.reset(OpPPC64ANDconst)
  5720  		v.AuxInt = c & 0xFFFFFFFF
  5721  		v.AddArg(x)
  5722  		return true
  5723  	}
  5724  	return false
  5725  }
  5726  func rewriteValuePPC64_OpPPC64CMP_0(v *Value) bool {
  5727  	b := v.Block
  5728  	// match: (CMP x (MOVDconst [c]))
  5729  	// cond: is16Bit(c)
  5730  	// result: (CMPconst x [c])
  5731  	for {
  5732  		_ = v.Args[1]
  5733  		x := v.Args[0]
  5734  		v_1 := v.Args[1]
  5735  		if v_1.Op != OpPPC64MOVDconst {
  5736  			break
  5737  		}
  5738  		c := v_1.AuxInt
  5739  		if !(is16Bit(c)) {
  5740  			break
  5741  		}
  5742  		v.reset(OpPPC64CMPconst)
  5743  		v.AuxInt = c
  5744  		v.AddArg(x)
  5745  		return true
  5746  	}
  5747  	// match: (CMP (MOVDconst [c]) y)
  5748  	// cond: is16Bit(c)
  5749  	// result: (InvertFlags (CMPconst y [c]))
  5750  	for {
  5751  		y := v.Args[1]
  5752  		v_0 := v.Args[0]
  5753  		if v_0.Op != OpPPC64MOVDconst {
  5754  			break
  5755  		}
  5756  		c := v_0.AuxInt
  5757  		if !(is16Bit(c)) {
  5758  			break
  5759  		}
  5760  		v.reset(OpPPC64InvertFlags)
  5761  		v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, types.TypeFlags)
  5762  		v0.AuxInt = c
  5763  		v0.AddArg(y)
  5764  		v.AddArg(v0)
  5765  		return true
  5766  	}
  5767  	return false
  5768  }
  5769  func rewriteValuePPC64_OpPPC64CMPU_0(v *Value) bool {
  5770  	b := v.Block
  5771  	// match: (CMPU x (MOVDconst [c]))
  5772  	// cond: isU16Bit(c)
  5773  	// result: (CMPUconst x [c])
  5774  	for {
  5775  		_ = v.Args[1]
  5776  		x := v.Args[0]
  5777  		v_1 := v.Args[1]
  5778  		if v_1.Op != OpPPC64MOVDconst {
  5779  			break
  5780  		}
  5781  		c := v_1.AuxInt
  5782  		if !(isU16Bit(c)) {
  5783  			break
  5784  		}
  5785  		v.reset(OpPPC64CMPUconst)
  5786  		v.AuxInt = c
  5787  		v.AddArg(x)
  5788  		return true
  5789  	}
  5790  	// match: (CMPU (MOVDconst [c]) y)
  5791  	// cond: isU16Bit(c)
  5792  	// result: (InvertFlags (CMPUconst y [c]))
  5793  	for {
  5794  		y := v.Args[1]
  5795  		v_0 := v.Args[0]
  5796  		if v_0.Op != OpPPC64MOVDconst {
  5797  			break
  5798  		}
  5799  		c := v_0.AuxInt
  5800  		if !(isU16Bit(c)) {
  5801  			break
  5802  		}
  5803  		v.reset(OpPPC64InvertFlags)
  5804  		v0 := b.NewValue0(v.Pos, OpPPC64CMPUconst, types.TypeFlags)
  5805  		v0.AuxInt = c
  5806  		v0.AddArg(y)
  5807  		v.AddArg(v0)
  5808  		return true
  5809  	}
  5810  	return false
  5811  }
  5812  func rewriteValuePPC64_OpPPC64CMPUconst_0(v *Value) bool {
  5813  	// match: (CMPUconst (MOVDconst [x]) [y])
  5814  	// cond: x==y
  5815  	// result: (FlagEQ)
  5816  	for {
  5817  		y := v.AuxInt
  5818  		v_0 := v.Args[0]
  5819  		if v_0.Op != OpPPC64MOVDconst {
  5820  			break
  5821  		}
  5822  		x := v_0.AuxInt
  5823  		if !(x == y) {
  5824  			break
  5825  		}
  5826  		v.reset(OpPPC64FlagEQ)
  5827  		return true
  5828  	}
  5829  	// match: (CMPUconst (MOVDconst [x]) [y])
  5830  	// cond: uint64(x)<uint64(y)
  5831  	// result: (FlagLT)
  5832  	for {
  5833  		y := v.AuxInt
  5834  		v_0 := v.Args[0]
  5835  		if v_0.Op != OpPPC64MOVDconst {
  5836  			break
  5837  		}
  5838  		x := v_0.AuxInt
  5839  		if !(uint64(x) < uint64(y)) {
  5840  			break
  5841  		}
  5842  		v.reset(OpPPC64FlagLT)
  5843  		return true
  5844  	}
  5845  	// match: (CMPUconst (MOVDconst [x]) [y])
  5846  	// cond: uint64(x)>uint64(y)
  5847  	// result: (FlagGT)
  5848  	for {
  5849  		y := v.AuxInt
  5850  		v_0 := v.Args[0]
  5851  		if v_0.Op != OpPPC64MOVDconst {
  5852  			break
  5853  		}
  5854  		x := v_0.AuxInt
  5855  		if !(uint64(x) > uint64(y)) {
  5856  			break
  5857  		}
  5858  		v.reset(OpPPC64FlagGT)
  5859  		return true
  5860  	}
  5861  	return false
  5862  }
  5863  func rewriteValuePPC64_OpPPC64CMPW_0(v *Value) bool {
  5864  	b := v.Block
  5865  	// match: (CMPW x (MOVWreg y))
  5866  	// result: (CMPW x y)
  5867  	for {
  5868  		_ = v.Args[1]
  5869  		x := v.Args[0]
  5870  		v_1 := v.Args[1]
  5871  		if v_1.Op != OpPPC64MOVWreg {
  5872  			break
  5873  		}
  5874  		y := v_1.Args[0]
  5875  		v.reset(OpPPC64CMPW)
  5876  		v.AddArg(x)
  5877  		v.AddArg(y)
  5878  		return true
  5879  	}
  5880  	// match: (CMPW (MOVWreg x) y)
  5881  	// result: (CMPW x y)
  5882  	for {
  5883  		y := v.Args[1]
  5884  		v_0 := v.Args[0]
  5885  		if v_0.Op != OpPPC64MOVWreg {
  5886  			break
  5887  		}
  5888  		x := v_0.Args[0]
  5889  		v.reset(OpPPC64CMPW)
  5890  		v.AddArg(x)
  5891  		v.AddArg(y)
  5892  		return true
  5893  	}
  5894  	// match: (CMPW x (MOVDconst [c]))
  5895  	// cond: is16Bit(c)
  5896  	// result: (CMPWconst x [c])
  5897  	for {
  5898  		_ = v.Args[1]
  5899  		x := v.Args[0]
  5900  		v_1 := v.Args[1]
  5901  		if v_1.Op != OpPPC64MOVDconst {
  5902  			break
  5903  		}
  5904  		c := v_1.AuxInt
  5905  		if !(is16Bit(c)) {
  5906  			break
  5907  		}
  5908  		v.reset(OpPPC64CMPWconst)
  5909  		v.AuxInt = c
  5910  		v.AddArg(x)
  5911  		return true
  5912  	}
  5913  	// match: (CMPW (MOVDconst [c]) y)
  5914  	// cond: is16Bit(c)
  5915  	// result: (InvertFlags (CMPWconst y [c]))
  5916  	for {
  5917  		y := v.Args[1]
  5918  		v_0 := v.Args[0]
  5919  		if v_0.Op != OpPPC64MOVDconst {
  5920  			break
  5921  		}
  5922  		c := v_0.AuxInt
  5923  		if !(is16Bit(c)) {
  5924  			break
  5925  		}
  5926  		v.reset(OpPPC64InvertFlags)
  5927  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
  5928  		v0.AuxInt = c
  5929  		v0.AddArg(y)
  5930  		v.AddArg(v0)
  5931  		return true
  5932  	}
  5933  	return false
  5934  }
  5935  func rewriteValuePPC64_OpPPC64CMPWU_0(v *Value) bool {
  5936  	b := v.Block
  5937  	// match: (CMPWU x (MOVWZreg y))
  5938  	// result: (CMPWU x y)
  5939  	for {
  5940  		_ = v.Args[1]
  5941  		x := v.Args[0]
  5942  		v_1 := v.Args[1]
  5943  		if v_1.Op != OpPPC64MOVWZreg {
  5944  			break
  5945  		}
  5946  		y := v_1.Args[0]
  5947  		v.reset(OpPPC64CMPWU)
  5948  		v.AddArg(x)
  5949  		v.AddArg(y)
  5950  		return true
  5951  	}
  5952  	// match: (CMPWU (MOVWZreg x) y)
  5953  	// result: (CMPWU x y)
  5954  	for {
  5955  		y := v.Args[1]
  5956  		v_0 := v.Args[0]
  5957  		if v_0.Op != OpPPC64MOVWZreg {
  5958  			break
  5959  		}
  5960  		x := v_0.Args[0]
  5961  		v.reset(OpPPC64CMPWU)
  5962  		v.AddArg(x)
  5963  		v.AddArg(y)
  5964  		return true
  5965  	}
  5966  	// match: (CMPWU x (MOVDconst [c]))
  5967  	// cond: isU16Bit(c)
  5968  	// result: (CMPWUconst x [c])
  5969  	for {
  5970  		_ = v.Args[1]
  5971  		x := v.Args[0]
  5972  		v_1 := v.Args[1]
  5973  		if v_1.Op != OpPPC64MOVDconst {
  5974  			break
  5975  		}
  5976  		c := v_1.AuxInt
  5977  		if !(isU16Bit(c)) {
  5978  			break
  5979  		}
  5980  		v.reset(OpPPC64CMPWUconst)
  5981  		v.AuxInt = c
  5982  		v.AddArg(x)
  5983  		return true
  5984  	}
  5985  	// match: (CMPWU (MOVDconst [c]) y)
  5986  	// cond: isU16Bit(c)
  5987  	// result: (InvertFlags (CMPWUconst y [c]))
  5988  	for {
  5989  		y := v.Args[1]
  5990  		v_0 := v.Args[0]
  5991  		if v_0.Op != OpPPC64MOVDconst {
  5992  			break
  5993  		}
  5994  		c := v_0.AuxInt
  5995  		if !(isU16Bit(c)) {
  5996  			break
  5997  		}
  5998  		v.reset(OpPPC64InvertFlags)
  5999  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWUconst, types.TypeFlags)
  6000  		v0.AuxInt = c
  6001  		v0.AddArg(y)
  6002  		v.AddArg(v0)
  6003  		return true
  6004  	}
  6005  	return false
  6006  }
  6007  func rewriteValuePPC64_OpPPC64CMPWUconst_0(v *Value) bool {
  6008  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6009  	// cond: int32(x)==int32(y)
  6010  	// result: (FlagEQ)
  6011  	for {
  6012  		y := v.AuxInt
  6013  		v_0 := v.Args[0]
  6014  		if v_0.Op != OpPPC64MOVDconst {
  6015  			break
  6016  		}
  6017  		x := v_0.AuxInt
  6018  		if !(int32(x) == int32(y)) {
  6019  			break
  6020  		}
  6021  		v.reset(OpPPC64FlagEQ)
  6022  		return true
  6023  	}
  6024  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6025  	// cond: uint32(x)<uint32(y)
  6026  	// result: (FlagLT)
  6027  	for {
  6028  		y := v.AuxInt
  6029  		v_0 := v.Args[0]
  6030  		if v_0.Op != OpPPC64MOVDconst {
  6031  			break
  6032  		}
  6033  		x := v_0.AuxInt
  6034  		if !(uint32(x) < uint32(y)) {
  6035  			break
  6036  		}
  6037  		v.reset(OpPPC64FlagLT)
  6038  		return true
  6039  	}
  6040  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6041  	// cond: uint32(x)>uint32(y)
  6042  	// result: (FlagGT)
  6043  	for {
  6044  		y := v.AuxInt
  6045  		v_0 := v.Args[0]
  6046  		if v_0.Op != OpPPC64MOVDconst {
  6047  			break
  6048  		}
  6049  		x := v_0.AuxInt
  6050  		if !(uint32(x) > uint32(y)) {
  6051  			break
  6052  		}
  6053  		v.reset(OpPPC64FlagGT)
  6054  		return true
  6055  	}
  6056  	return false
  6057  }
  6058  func rewriteValuePPC64_OpPPC64CMPWconst_0(v *Value) bool {
  6059  	// match: (CMPWconst (MOVDconst [x]) [y])
  6060  	// cond: int32(x)==int32(y)
  6061  	// result: (FlagEQ)
  6062  	for {
  6063  		y := v.AuxInt
  6064  		v_0 := v.Args[0]
  6065  		if v_0.Op != OpPPC64MOVDconst {
  6066  			break
  6067  		}
  6068  		x := v_0.AuxInt
  6069  		if !(int32(x) == int32(y)) {
  6070  			break
  6071  		}
  6072  		v.reset(OpPPC64FlagEQ)
  6073  		return true
  6074  	}
  6075  	// match: (CMPWconst (MOVDconst [x]) [y])
  6076  	// cond: int32(x)<int32(y)
  6077  	// result: (FlagLT)
  6078  	for {
  6079  		y := v.AuxInt
  6080  		v_0 := v.Args[0]
  6081  		if v_0.Op != OpPPC64MOVDconst {
  6082  			break
  6083  		}
  6084  		x := v_0.AuxInt
  6085  		if !(int32(x) < int32(y)) {
  6086  			break
  6087  		}
  6088  		v.reset(OpPPC64FlagLT)
  6089  		return true
  6090  	}
  6091  	// match: (CMPWconst (MOVDconst [x]) [y])
  6092  	// cond: int32(x)>int32(y)
  6093  	// result: (FlagGT)
  6094  	for {
  6095  		y := v.AuxInt
  6096  		v_0 := v.Args[0]
  6097  		if v_0.Op != OpPPC64MOVDconst {
  6098  			break
  6099  		}
  6100  		x := v_0.AuxInt
  6101  		if !(int32(x) > int32(y)) {
  6102  			break
  6103  		}
  6104  		v.reset(OpPPC64FlagGT)
  6105  		return true
  6106  	}
  6107  	return false
  6108  }
  6109  func rewriteValuePPC64_OpPPC64CMPconst_0(v *Value) bool {
  6110  	// match: (CMPconst (MOVDconst [x]) [y])
  6111  	// cond: x==y
  6112  	// result: (FlagEQ)
  6113  	for {
  6114  		y := v.AuxInt
  6115  		v_0 := v.Args[0]
  6116  		if v_0.Op != OpPPC64MOVDconst {
  6117  			break
  6118  		}
  6119  		x := v_0.AuxInt
  6120  		if !(x == y) {
  6121  			break
  6122  		}
  6123  		v.reset(OpPPC64FlagEQ)
  6124  		return true
  6125  	}
  6126  	// match: (CMPconst (MOVDconst [x]) [y])
  6127  	// cond: x<y
  6128  	// result: (FlagLT)
  6129  	for {
  6130  		y := v.AuxInt
  6131  		v_0 := v.Args[0]
  6132  		if v_0.Op != OpPPC64MOVDconst {
  6133  			break
  6134  		}
  6135  		x := v_0.AuxInt
  6136  		if !(x < y) {
  6137  			break
  6138  		}
  6139  		v.reset(OpPPC64FlagLT)
  6140  		return true
  6141  	}
  6142  	// match: (CMPconst (MOVDconst [x]) [y])
  6143  	// cond: x>y
  6144  	// result: (FlagGT)
  6145  	for {
  6146  		y := v.AuxInt
  6147  		v_0 := v.Args[0]
  6148  		if v_0.Op != OpPPC64MOVDconst {
  6149  			break
  6150  		}
  6151  		x := v_0.AuxInt
  6152  		if !(x > y) {
  6153  			break
  6154  		}
  6155  		v.reset(OpPPC64FlagGT)
  6156  		return true
  6157  	}
  6158  	return false
  6159  }
  6160  func rewriteValuePPC64_OpPPC64Equal_0(v *Value) bool {
  6161  	b := v.Block
  6162  	typ := &b.Func.Config.Types
  6163  	// match: (Equal (FlagEQ))
  6164  	// result: (MOVDconst [1])
  6165  	for {
  6166  		v_0 := v.Args[0]
  6167  		if v_0.Op != OpPPC64FlagEQ {
  6168  			break
  6169  		}
  6170  		v.reset(OpPPC64MOVDconst)
  6171  		v.AuxInt = 1
  6172  		return true
  6173  	}
  6174  	// match: (Equal (FlagLT))
  6175  	// result: (MOVDconst [0])
  6176  	for {
  6177  		v_0 := v.Args[0]
  6178  		if v_0.Op != OpPPC64FlagLT {
  6179  			break
  6180  		}
  6181  		v.reset(OpPPC64MOVDconst)
  6182  		v.AuxInt = 0
  6183  		return true
  6184  	}
  6185  	// match: (Equal (FlagGT))
  6186  	// result: (MOVDconst [0])
  6187  	for {
  6188  		v_0 := v.Args[0]
  6189  		if v_0.Op != OpPPC64FlagGT {
  6190  			break
  6191  		}
  6192  		v.reset(OpPPC64MOVDconst)
  6193  		v.AuxInt = 0
  6194  		return true
  6195  	}
  6196  	// match: (Equal (InvertFlags x))
  6197  	// result: (Equal x)
  6198  	for {
  6199  		v_0 := v.Args[0]
  6200  		if v_0.Op != OpPPC64InvertFlags {
  6201  			break
  6202  		}
  6203  		x := v_0.Args[0]
  6204  		v.reset(OpPPC64Equal)
  6205  		v.AddArg(x)
  6206  		return true
  6207  	}
  6208  	// match: (Equal cmp)
  6209  	// result: (ISELB [2] (MOVDconst [1]) cmp)
  6210  	for {
  6211  		cmp := v.Args[0]
  6212  		v.reset(OpPPC64ISELB)
  6213  		v.AuxInt = 2
  6214  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6215  		v0.AuxInt = 1
  6216  		v.AddArg(v0)
  6217  		v.AddArg(cmp)
  6218  		return true
  6219  	}
  6220  }
  6221  func rewriteValuePPC64_OpPPC64FABS_0(v *Value) bool {
  6222  	// match: (FABS (FMOVDconst [x]))
  6223  	// result: (FMOVDconst [auxFrom64F(math.Abs(auxTo64F(x)))])
  6224  	for {
  6225  		v_0 := v.Args[0]
  6226  		if v_0.Op != OpPPC64FMOVDconst {
  6227  			break
  6228  		}
  6229  		x := v_0.AuxInt
  6230  		v.reset(OpPPC64FMOVDconst)
  6231  		v.AuxInt = auxFrom64F(math.Abs(auxTo64F(x)))
  6232  		return true
  6233  	}
  6234  	return false
  6235  }
  6236  func rewriteValuePPC64_OpPPC64FADD_0(v *Value) bool {
  6237  	// match: (FADD (FMUL x y) z)
  6238  	// result: (FMADD x y z)
  6239  	for {
  6240  		z := v.Args[1]
  6241  		v_0 := v.Args[0]
  6242  		if v_0.Op != OpPPC64FMUL {
  6243  			break
  6244  		}
  6245  		y := v_0.Args[1]
  6246  		x := v_0.Args[0]
  6247  		v.reset(OpPPC64FMADD)
  6248  		v.AddArg(x)
  6249  		v.AddArg(y)
  6250  		v.AddArg(z)
  6251  		return true
  6252  	}
  6253  	// match: (FADD z (FMUL x y))
  6254  	// result: (FMADD x y z)
  6255  	for {
  6256  		_ = v.Args[1]
  6257  		z := v.Args[0]
  6258  		v_1 := v.Args[1]
  6259  		if v_1.Op != OpPPC64FMUL {
  6260  			break
  6261  		}
  6262  		y := v_1.Args[1]
  6263  		x := v_1.Args[0]
  6264  		v.reset(OpPPC64FMADD)
  6265  		v.AddArg(x)
  6266  		v.AddArg(y)
  6267  		v.AddArg(z)
  6268  		return true
  6269  	}
  6270  	return false
  6271  }
  6272  func rewriteValuePPC64_OpPPC64FADDS_0(v *Value) bool {
  6273  	// match: (FADDS (FMULS x y) z)
  6274  	// result: (FMADDS x y z)
  6275  	for {
  6276  		z := v.Args[1]
  6277  		v_0 := v.Args[0]
  6278  		if v_0.Op != OpPPC64FMULS {
  6279  			break
  6280  		}
  6281  		y := v_0.Args[1]
  6282  		x := v_0.Args[0]
  6283  		v.reset(OpPPC64FMADDS)
  6284  		v.AddArg(x)
  6285  		v.AddArg(y)
  6286  		v.AddArg(z)
  6287  		return true
  6288  	}
  6289  	// match: (FADDS z (FMULS x y))
  6290  	// result: (FMADDS x y z)
  6291  	for {
  6292  		_ = v.Args[1]
  6293  		z := v.Args[0]
  6294  		v_1 := v.Args[1]
  6295  		if v_1.Op != OpPPC64FMULS {
  6296  			break
  6297  		}
  6298  		y := v_1.Args[1]
  6299  		x := v_1.Args[0]
  6300  		v.reset(OpPPC64FMADDS)
  6301  		v.AddArg(x)
  6302  		v.AddArg(y)
  6303  		v.AddArg(z)
  6304  		return true
  6305  	}
  6306  	return false
  6307  }
  6308  func rewriteValuePPC64_OpPPC64FCEIL_0(v *Value) bool {
  6309  	// match: (FCEIL (FMOVDconst [x]))
  6310  	// result: (FMOVDconst [auxFrom64F(math.Ceil(auxTo64F(x)))])
  6311  	for {
  6312  		v_0 := v.Args[0]
  6313  		if v_0.Op != OpPPC64FMOVDconst {
  6314  			break
  6315  		}
  6316  		x := v_0.AuxInt
  6317  		v.reset(OpPPC64FMOVDconst)
  6318  		v.AuxInt = auxFrom64F(math.Ceil(auxTo64F(x)))
  6319  		return true
  6320  	}
  6321  	return false
  6322  }
  6323  func rewriteValuePPC64_OpPPC64FFLOOR_0(v *Value) bool {
  6324  	// match: (FFLOOR (FMOVDconst [x]))
  6325  	// result: (FMOVDconst [auxFrom64F(math.Floor(auxTo64F(x)))])
  6326  	for {
  6327  		v_0 := v.Args[0]
  6328  		if v_0.Op != OpPPC64FMOVDconst {
  6329  			break
  6330  		}
  6331  		x := v_0.AuxInt
  6332  		v.reset(OpPPC64FMOVDconst)
  6333  		v.AuxInt = auxFrom64F(math.Floor(auxTo64F(x)))
  6334  		return true
  6335  	}
  6336  	return false
  6337  }
  6338  func rewriteValuePPC64_OpPPC64FGreaterEqual_0(v *Value) bool {
  6339  	b := v.Block
  6340  	typ := &b.Func.Config.Types
  6341  	// match: (FGreaterEqual cmp)
  6342  	// result: (ISEL [2] (MOVDconst [1]) (ISELB [1] (MOVDconst [1]) cmp) cmp)
  6343  	for {
  6344  		cmp := v.Args[0]
  6345  		v.reset(OpPPC64ISEL)
  6346  		v.AuxInt = 2
  6347  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6348  		v0.AuxInt = 1
  6349  		v.AddArg(v0)
  6350  		v1 := b.NewValue0(v.Pos, OpPPC64ISELB, typ.Int32)
  6351  		v1.AuxInt = 1
  6352  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6353  		v2.AuxInt = 1
  6354  		v1.AddArg(v2)
  6355  		v1.AddArg(cmp)
  6356  		v.AddArg(v1)
  6357  		v.AddArg(cmp)
  6358  		return true
  6359  	}
  6360  }
  6361  func rewriteValuePPC64_OpPPC64FGreaterThan_0(v *Value) bool {
  6362  	b := v.Block
  6363  	typ := &b.Func.Config.Types
  6364  	// match: (FGreaterThan cmp)
  6365  	// result: (ISELB [1] (MOVDconst [1]) cmp)
  6366  	for {
  6367  		cmp := v.Args[0]
  6368  		v.reset(OpPPC64ISELB)
  6369  		v.AuxInt = 1
  6370  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6371  		v0.AuxInt = 1
  6372  		v.AddArg(v0)
  6373  		v.AddArg(cmp)
  6374  		return true
  6375  	}
  6376  }
  6377  func rewriteValuePPC64_OpPPC64FLessEqual_0(v *Value) bool {
  6378  	b := v.Block
  6379  	typ := &b.Func.Config.Types
  6380  	// match: (FLessEqual cmp)
  6381  	// result: (ISEL [2] (MOVDconst [1]) (ISELB [0] (MOVDconst [1]) cmp) cmp)
  6382  	for {
  6383  		cmp := v.Args[0]
  6384  		v.reset(OpPPC64ISEL)
  6385  		v.AuxInt = 2
  6386  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6387  		v0.AuxInt = 1
  6388  		v.AddArg(v0)
  6389  		v1 := b.NewValue0(v.Pos, OpPPC64ISELB, typ.Int32)
  6390  		v1.AuxInt = 0
  6391  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6392  		v2.AuxInt = 1
  6393  		v1.AddArg(v2)
  6394  		v1.AddArg(cmp)
  6395  		v.AddArg(v1)
  6396  		v.AddArg(cmp)
  6397  		return true
  6398  	}
  6399  }
  6400  func rewriteValuePPC64_OpPPC64FLessThan_0(v *Value) bool {
  6401  	b := v.Block
  6402  	typ := &b.Func.Config.Types
  6403  	// match: (FLessThan cmp)
  6404  	// result: (ISELB [0] (MOVDconst [1]) cmp)
  6405  	for {
  6406  		cmp := v.Args[0]
  6407  		v.reset(OpPPC64ISELB)
  6408  		v.AuxInt = 0
  6409  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6410  		v0.AuxInt = 1
  6411  		v.AddArg(v0)
  6412  		v.AddArg(cmp)
  6413  		return true
  6414  	}
  6415  }
  6416  func rewriteValuePPC64_OpPPC64FMOVDload_0(v *Value) bool {
  6417  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr x _))
  6418  	// result: (MTVSRD x)
  6419  	for {
  6420  		off := v.AuxInt
  6421  		sym := v.Aux
  6422  		_ = v.Args[1]
  6423  		ptr := v.Args[0]
  6424  		v_1 := v.Args[1]
  6425  		if v_1.Op != OpPPC64MOVDstore || v_1.AuxInt != off || v_1.Aux != sym {
  6426  			break
  6427  		}
  6428  		_ = v_1.Args[2]
  6429  		if ptr != v_1.Args[0] {
  6430  			break
  6431  		}
  6432  		x := v_1.Args[1]
  6433  		v.reset(OpPPC64MTVSRD)
  6434  		v.AddArg(x)
  6435  		return true
  6436  	}
  6437  	// match: (FMOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  6438  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  6439  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6440  	for {
  6441  		off1 := v.AuxInt
  6442  		sym1 := v.Aux
  6443  		mem := v.Args[1]
  6444  		p := v.Args[0]
  6445  		if p.Op != OpPPC64MOVDaddr {
  6446  			break
  6447  		}
  6448  		off2 := p.AuxInt
  6449  		sym2 := p.Aux
  6450  		ptr := p.Args[0]
  6451  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  6452  			break
  6453  		}
  6454  		v.reset(OpPPC64FMOVDload)
  6455  		v.AuxInt = off1 + off2
  6456  		v.Aux = mergeSym(sym1, sym2)
  6457  		v.AddArg(ptr)
  6458  		v.AddArg(mem)
  6459  		return true
  6460  	}
  6461  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6462  	// cond: is16Bit(off1+off2)
  6463  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  6464  	for {
  6465  		off1 := v.AuxInt
  6466  		sym := v.Aux
  6467  		mem := v.Args[1]
  6468  		v_0 := v.Args[0]
  6469  		if v_0.Op != OpPPC64ADDconst {
  6470  			break
  6471  		}
  6472  		off2 := v_0.AuxInt
  6473  		ptr := v_0.Args[0]
  6474  		if !(is16Bit(off1 + off2)) {
  6475  			break
  6476  		}
  6477  		v.reset(OpPPC64FMOVDload)
  6478  		v.AuxInt = off1 + off2
  6479  		v.Aux = sym
  6480  		v.AddArg(ptr)
  6481  		v.AddArg(mem)
  6482  		return true
  6483  	}
  6484  	return false
  6485  }
  6486  func rewriteValuePPC64_OpPPC64FMOVDstore_0(v *Value) bool {
  6487  	// match: (FMOVDstore [off] {sym} ptr (MTVSRD x) mem)
  6488  	// result: (MOVDstore [off] {sym} ptr x mem)
  6489  	for {
  6490  		off := v.AuxInt
  6491  		sym := v.Aux
  6492  		mem := v.Args[2]
  6493  		ptr := v.Args[0]
  6494  		v_1 := v.Args[1]
  6495  		if v_1.Op != OpPPC64MTVSRD {
  6496  			break
  6497  		}
  6498  		x := v_1.Args[0]
  6499  		v.reset(OpPPC64MOVDstore)
  6500  		v.AuxInt = off
  6501  		v.Aux = sym
  6502  		v.AddArg(ptr)
  6503  		v.AddArg(x)
  6504  		v.AddArg(mem)
  6505  		return true
  6506  	}
  6507  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6508  	// cond: is16Bit(off1+off2)
  6509  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  6510  	for {
  6511  		off1 := v.AuxInt
  6512  		sym := v.Aux
  6513  		mem := v.Args[2]
  6514  		v_0 := v.Args[0]
  6515  		if v_0.Op != OpPPC64ADDconst {
  6516  			break
  6517  		}
  6518  		off2 := v_0.AuxInt
  6519  		ptr := v_0.Args[0]
  6520  		val := v.Args[1]
  6521  		if !(is16Bit(off1 + off2)) {
  6522  			break
  6523  		}
  6524  		v.reset(OpPPC64FMOVDstore)
  6525  		v.AuxInt = off1 + off2
  6526  		v.Aux = sym
  6527  		v.AddArg(ptr)
  6528  		v.AddArg(val)
  6529  		v.AddArg(mem)
  6530  		return true
  6531  	}
  6532  	// match: (FMOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  6533  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  6534  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6535  	for {
  6536  		off1 := v.AuxInt
  6537  		sym1 := v.Aux
  6538  		mem := v.Args[2]
  6539  		p := v.Args[0]
  6540  		if p.Op != OpPPC64MOVDaddr {
  6541  			break
  6542  		}
  6543  		off2 := p.AuxInt
  6544  		sym2 := p.Aux
  6545  		ptr := p.Args[0]
  6546  		val := v.Args[1]
  6547  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  6548  			break
  6549  		}
  6550  		v.reset(OpPPC64FMOVDstore)
  6551  		v.AuxInt = off1 + off2
  6552  		v.Aux = mergeSym(sym1, sym2)
  6553  		v.AddArg(ptr)
  6554  		v.AddArg(val)
  6555  		v.AddArg(mem)
  6556  		return true
  6557  	}
  6558  	return false
  6559  }
  6560  func rewriteValuePPC64_OpPPC64FMOVSload_0(v *Value) bool {
  6561  	// match: (FMOVSload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  6562  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  6563  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6564  	for {
  6565  		off1 := v.AuxInt
  6566  		sym1 := v.Aux
  6567  		mem := v.Args[1]
  6568  		p := v.Args[0]
  6569  		if p.Op != OpPPC64MOVDaddr {
  6570  			break
  6571  		}
  6572  		off2 := p.AuxInt
  6573  		sym2 := p.Aux
  6574  		ptr := p.Args[0]
  6575  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  6576  			break
  6577  		}
  6578  		v.reset(OpPPC64FMOVSload)
  6579  		v.AuxInt = off1 + off2
  6580  		v.Aux = mergeSym(sym1, sym2)
  6581  		v.AddArg(ptr)
  6582  		v.AddArg(mem)
  6583  		return true
  6584  	}
  6585  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  6586  	// cond: is16Bit(off1+off2)
  6587  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  6588  	for {
  6589  		off1 := v.AuxInt
  6590  		sym := v.Aux
  6591  		mem := v.Args[1]
  6592  		v_0 := v.Args[0]
  6593  		if v_0.Op != OpPPC64ADDconst {
  6594  			break
  6595  		}
  6596  		off2 := v_0.AuxInt
  6597  		ptr := v_0.Args[0]
  6598  		if !(is16Bit(off1 + off2)) {
  6599  			break
  6600  		}
  6601  		v.reset(OpPPC64FMOVSload)
  6602  		v.AuxInt = off1 + off2
  6603  		v.Aux = sym
  6604  		v.AddArg(ptr)
  6605  		v.AddArg(mem)
  6606  		return true
  6607  	}
  6608  	return false
  6609  }
  6610  func rewriteValuePPC64_OpPPC64FMOVSstore_0(v *Value) bool {
  6611  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6612  	// cond: is16Bit(off1+off2)
  6613  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  6614  	for {
  6615  		off1 := v.AuxInt
  6616  		sym := v.Aux
  6617  		mem := v.Args[2]
  6618  		v_0 := v.Args[0]
  6619  		if v_0.Op != OpPPC64ADDconst {
  6620  			break
  6621  		}
  6622  		off2 := v_0.AuxInt
  6623  		ptr := v_0.Args[0]
  6624  		val := v.Args[1]
  6625  		if !(is16Bit(off1 + off2)) {
  6626  			break
  6627  		}
  6628  		v.reset(OpPPC64FMOVSstore)
  6629  		v.AuxInt = off1 + off2
  6630  		v.Aux = sym
  6631  		v.AddArg(ptr)
  6632  		v.AddArg(val)
  6633  		v.AddArg(mem)
  6634  		return true
  6635  	}
  6636  	// match: (FMOVSstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  6637  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  6638  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  6639  	for {
  6640  		off1 := v.AuxInt
  6641  		sym1 := v.Aux
  6642  		mem := v.Args[2]
  6643  		p := v.Args[0]
  6644  		if p.Op != OpPPC64MOVDaddr {
  6645  			break
  6646  		}
  6647  		off2 := p.AuxInt
  6648  		sym2 := p.Aux
  6649  		ptr := p.Args[0]
  6650  		val := v.Args[1]
  6651  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  6652  			break
  6653  		}
  6654  		v.reset(OpPPC64FMOVSstore)
  6655  		v.AuxInt = off1 + off2
  6656  		v.Aux = mergeSym(sym1, sym2)
  6657  		v.AddArg(ptr)
  6658  		v.AddArg(val)
  6659  		v.AddArg(mem)
  6660  		return true
  6661  	}
  6662  	return false
  6663  }
  6664  func rewriteValuePPC64_OpPPC64FNEG_0(v *Value) bool {
  6665  	// match: (FNEG (FABS x))
  6666  	// result: (FNABS x)
  6667  	for {
  6668  		v_0 := v.Args[0]
  6669  		if v_0.Op != OpPPC64FABS {
  6670  			break
  6671  		}
  6672  		x := v_0.Args[0]
  6673  		v.reset(OpPPC64FNABS)
  6674  		v.AddArg(x)
  6675  		return true
  6676  	}
  6677  	// match: (FNEG (FNABS x))
  6678  	// result: (FABS x)
  6679  	for {
  6680  		v_0 := v.Args[0]
  6681  		if v_0.Op != OpPPC64FNABS {
  6682  			break
  6683  		}
  6684  		x := v_0.Args[0]
  6685  		v.reset(OpPPC64FABS)
  6686  		v.AddArg(x)
  6687  		return true
  6688  	}
  6689  	return false
  6690  }
  6691  func rewriteValuePPC64_OpPPC64FSQRT_0(v *Value) bool {
  6692  	// match: (FSQRT (FMOVDconst [x]))
  6693  	// result: (FMOVDconst [auxFrom64F(math.Sqrt(auxTo64F(x)))])
  6694  	for {
  6695  		v_0 := v.Args[0]
  6696  		if v_0.Op != OpPPC64FMOVDconst {
  6697  			break
  6698  		}
  6699  		x := v_0.AuxInt
  6700  		v.reset(OpPPC64FMOVDconst)
  6701  		v.AuxInt = auxFrom64F(math.Sqrt(auxTo64F(x)))
  6702  		return true
  6703  	}
  6704  	return false
  6705  }
  6706  func rewriteValuePPC64_OpPPC64FSUB_0(v *Value) bool {
  6707  	// match: (FSUB (FMUL x y) z)
  6708  	// result: (FMSUB x y z)
  6709  	for {
  6710  		z := v.Args[1]
  6711  		v_0 := v.Args[0]
  6712  		if v_0.Op != OpPPC64FMUL {
  6713  			break
  6714  		}
  6715  		y := v_0.Args[1]
  6716  		x := v_0.Args[0]
  6717  		v.reset(OpPPC64FMSUB)
  6718  		v.AddArg(x)
  6719  		v.AddArg(y)
  6720  		v.AddArg(z)
  6721  		return true
  6722  	}
  6723  	return false
  6724  }
  6725  func rewriteValuePPC64_OpPPC64FSUBS_0(v *Value) bool {
  6726  	// match: (FSUBS (FMULS x y) z)
  6727  	// result: (FMSUBS x y z)
  6728  	for {
  6729  		z := v.Args[1]
  6730  		v_0 := v.Args[0]
  6731  		if v_0.Op != OpPPC64FMULS {
  6732  			break
  6733  		}
  6734  		y := v_0.Args[1]
  6735  		x := v_0.Args[0]
  6736  		v.reset(OpPPC64FMSUBS)
  6737  		v.AddArg(x)
  6738  		v.AddArg(y)
  6739  		v.AddArg(z)
  6740  		return true
  6741  	}
  6742  	return false
  6743  }
  6744  func rewriteValuePPC64_OpPPC64FTRUNC_0(v *Value) bool {
  6745  	// match: (FTRUNC (FMOVDconst [x]))
  6746  	// result: (FMOVDconst [auxFrom64F(math.Trunc(auxTo64F(x)))])
  6747  	for {
  6748  		v_0 := v.Args[0]
  6749  		if v_0.Op != OpPPC64FMOVDconst {
  6750  			break
  6751  		}
  6752  		x := v_0.AuxInt
  6753  		v.reset(OpPPC64FMOVDconst)
  6754  		v.AuxInt = auxFrom64F(math.Trunc(auxTo64F(x)))
  6755  		return true
  6756  	}
  6757  	return false
  6758  }
  6759  func rewriteValuePPC64_OpPPC64GreaterEqual_0(v *Value) bool {
  6760  	b := v.Block
  6761  	typ := &b.Func.Config.Types
  6762  	// match: (GreaterEqual (FlagEQ))
  6763  	// result: (MOVDconst [1])
  6764  	for {
  6765  		v_0 := v.Args[0]
  6766  		if v_0.Op != OpPPC64FlagEQ {
  6767  			break
  6768  		}
  6769  		v.reset(OpPPC64MOVDconst)
  6770  		v.AuxInt = 1
  6771  		return true
  6772  	}
  6773  	// match: (GreaterEqual (FlagLT))
  6774  	// result: (MOVDconst [0])
  6775  	for {
  6776  		v_0 := v.Args[0]
  6777  		if v_0.Op != OpPPC64FlagLT {
  6778  			break
  6779  		}
  6780  		v.reset(OpPPC64MOVDconst)
  6781  		v.AuxInt = 0
  6782  		return true
  6783  	}
  6784  	// match: (GreaterEqual (FlagGT))
  6785  	// result: (MOVDconst [1])
  6786  	for {
  6787  		v_0 := v.Args[0]
  6788  		if v_0.Op != OpPPC64FlagGT {
  6789  			break
  6790  		}
  6791  		v.reset(OpPPC64MOVDconst)
  6792  		v.AuxInt = 1
  6793  		return true
  6794  	}
  6795  	// match: (GreaterEqual (InvertFlags x))
  6796  	// result: (LessEqual x)
  6797  	for {
  6798  		v_0 := v.Args[0]
  6799  		if v_0.Op != OpPPC64InvertFlags {
  6800  			break
  6801  		}
  6802  		x := v_0.Args[0]
  6803  		v.reset(OpPPC64LessEqual)
  6804  		v.AddArg(x)
  6805  		return true
  6806  	}
  6807  	// match: (GreaterEqual cmp)
  6808  	// result: (ISELB [4] (MOVDconst [1]) cmp)
  6809  	for {
  6810  		cmp := v.Args[0]
  6811  		v.reset(OpPPC64ISELB)
  6812  		v.AuxInt = 4
  6813  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6814  		v0.AuxInt = 1
  6815  		v.AddArg(v0)
  6816  		v.AddArg(cmp)
  6817  		return true
  6818  	}
  6819  }
  6820  func rewriteValuePPC64_OpPPC64GreaterThan_0(v *Value) bool {
  6821  	b := v.Block
  6822  	typ := &b.Func.Config.Types
  6823  	// match: (GreaterThan (FlagEQ))
  6824  	// result: (MOVDconst [0])
  6825  	for {
  6826  		v_0 := v.Args[0]
  6827  		if v_0.Op != OpPPC64FlagEQ {
  6828  			break
  6829  		}
  6830  		v.reset(OpPPC64MOVDconst)
  6831  		v.AuxInt = 0
  6832  		return true
  6833  	}
  6834  	// match: (GreaterThan (FlagLT))
  6835  	// result: (MOVDconst [0])
  6836  	for {
  6837  		v_0 := v.Args[0]
  6838  		if v_0.Op != OpPPC64FlagLT {
  6839  			break
  6840  		}
  6841  		v.reset(OpPPC64MOVDconst)
  6842  		v.AuxInt = 0
  6843  		return true
  6844  	}
  6845  	// match: (GreaterThan (FlagGT))
  6846  	// result: (MOVDconst [1])
  6847  	for {
  6848  		v_0 := v.Args[0]
  6849  		if v_0.Op != OpPPC64FlagGT {
  6850  			break
  6851  		}
  6852  		v.reset(OpPPC64MOVDconst)
  6853  		v.AuxInt = 1
  6854  		return true
  6855  	}
  6856  	// match: (GreaterThan (InvertFlags x))
  6857  	// result: (LessThan x)
  6858  	for {
  6859  		v_0 := v.Args[0]
  6860  		if v_0.Op != OpPPC64InvertFlags {
  6861  			break
  6862  		}
  6863  		x := v_0.Args[0]
  6864  		v.reset(OpPPC64LessThan)
  6865  		v.AddArg(x)
  6866  		return true
  6867  	}
  6868  	// match: (GreaterThan cmp)
  6869  	// result: (ISELB [1] (MOVDconst [1]) cmp)
  6870  	for {
  6871  		cmp := v.Args[0]
  6872  		v.reset(OpPPC64ISELB)
  6873  		v.AuxInt = 1
  6874  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6875  		v0.AuxInt = 1
  6876  		v.AddArg(v0)
  6877  		v.AddArg(cmp)
  6878  		return true
  6879  	}
  6880  }
  6881  func rewriteValuePPC64_OpPPC64ISEL_0(v *Value) bool {
  6882  	// match: (ISEL [2] x _ (FlagEQ))
  6883  	// result: x
  6884  	for {
  6885  		if v.AuxInt != 2 {
  6886  			break
  6887  		}
  6888  		_ = v.Args[2]
  6889  		x := v.Args[0]
  6890  		v_2 := v.Args[2]
  6891  		if v_2.Op != OpPPC64FlagEQ {
  6892  			break
  6893  		}
  6894  		v.reset(OpCopy)
  6895  		v.Type = x.Type
  6896  		v.AddArg(x)
  6897  		return true
  6898  	}
  6899  	// match: (ISEL [2] _ y (FlagLT))
  6900  	// result: y
  6901  	for {
  6902  		if v.AuxInt != 2 {
  6903  			break
  6904  		}
  6905  		_ = v.Args[2]
  6906  		y := v.Args[1]
  6907  		v_2 := v.Args[2]
  6908  		if v_2.Op != OpPPC64FlagLT {
  6909  			break
  6910  		}
  6911  		v.reset(OpCopy)
  6912  		v.Type = y.Type
  6913  		v.AddArg(y)
  6914  		return true
  6915  	}
  6916  	// match: (ISEL [2] _ y (FlagGT))
  6917  	// result: y
  6918  	for {
  6919  		if v.AuxInt != 2 {
  6920  			break
  6921  		}
  6922  		_ = v.Args[2]
  6923  		y := v.Args[1]
  6924  		v_2 := v.Args[2]
  6925  		if v_2.Op != OpPPC64FlagGT {
  6926  			break
  6927  		}
  6928  		v.reset(OpCopy)
  6929  		v.Type = y.Type
  6930  		v.AddArg(y)
  6931  		return true
  6932  	}
  6933  	// match: (ISEL [6] _ y (FlagEQ))
  6934  	// result: y
  6935  	for {
  6936  		if v.AuxInt != 6 {
  6937  			break
  6938  		}
  6939  		_ = v.Args[2]
  6940  		y := v.Args[1]
  6941  		v_2 := v.Args[2]
  6942  		if v_2.Op != OpPPC64FlagEQ {
  6943  			break
  6944  		}
  6945  		v.reset(OpCopy)
  6946  		v.Type = y.Type
  6947  		v.AddArg(y)
  6948  		return true
  6949  	}
  6950  	// match: (ISEL [6] x _ (FlagLT))
  6951  	// result: x
  6952  	for {
  6953  		if v.AuxInt != 6 {
  6954  			break
  6955  		}
  6956  		_ = v.Args[2]
  6957  		x := v.Args[0]
  6958  		v_2 := v.Args[2]
  6959  		if v_2.Op != OpPPC64FlagLT {
  6960  			break
  6961  		}
  6962  		v.reset(OpCopy)
  6963  		v.Type = x.Type
  6964  		v.AddArg(x)
  6965  		return true
  6966  	}
  6967  	// match: (ISEL [6] x _ (FlagGT))
  6968  	// result: x
  6969  	for {
  6970  		if v.AuxInt != 6 {
  6971  			break
  6972  		}
  6973  		_ = v.Args[2]
  6974  		x := v.Args[0]
  6975  		v_2 := v.Args[2]
  6976  		if v_2.Op != OpPPC64FlagGT {
  6977  			break
  6978  		}
  6979  		v.reset(OpCopy)
  6980  		v.Type = x.Type
  6981  		v.AddArg(x)
  6982  		return true
  6983  	}
  6984  	// match: (ISEL [0] _ y (FlagEQ))
  6985  	// result: y
  6986  	for {
  6987  		if v.AuxInt != 0 {
  6988  			break
  6989  		}
  6990  		_ = v.Args[2]
  6991  		y := v.Args[1]
  6992  		v_2 := v.Args[2]
  6993  		if v_2.Op != OpPPC64FlagEQ {
  6994  			break
  6995  		}
  6996  		v.reset(OpCopy)
  6997  		v.Type = y.Type
  6998  		v.AddArg(y)
  6999  		return true
  7000  	}
  7001  	// match: (ISEL [0] _ y (FlagGT))
  7002  	// result: y
  7003  	for {
  7004  		if v.AuxInt != 0 {
  7005  			break
  7006  		}
  7007  		_ = v.Args[2]
  7008  		y := v.Args[1]
  7009  		v_2 := v.Args[2]
  7010  		if v_2.Op != OpPPC64FlagGT {
  7011  			break
  7012  		}
  7013  		v.reset(OpCopy)
  7014  		v.Type = y.Type
  7015  		v.AddArg(y)
  7016  		return true
  7017  	}
  7018  	// match: (ISEL [0] x _ (FlagLT))
  7019  	// result: x
  7020  	for {
  7021  		if v.AuxInt != 0 {
  7022  			break
  7023  		}
  7024  		_ = v.Args[2]
  7025  		x := v.Args[0]
  7026  		v_2 := v.Args[2]
  7027  		if v_2.Op != OpPPC64FlagLT {
  7028  			break
  7029  		}
  7030  		v.reset(OpCopy)
  7031  		v.Type = x.Type
  7032  		v.AddArg(x)
  7033  		return true
  7034  	}
  7035  	// match: (ISEL [5] _ x (FlagEQ))
  7036  	// result: x
  7037  	for {
  7038  		if v.AuxInt != 5 {
  7039  			break
  7040  		}
  7041  		_ = v.Args[2]
  7042  		x := v.Args[1]
  7043  		v_2 := v.Args[2]
  7044  		if v_2.Op != OpPPC64FlagEQ {
  7045  			break
  7046  		}
  7047  		v.reset(OpCopy)
  7048  		v.Type = x.Type
  7049  		v.AddArg(x)
  7050  		return true
  7051  	}
  7052  	return false
  7053  }
  7054  func rewriteValuePPC64_OpPPC64ISEL_10(v *Value) bool {
  7055  	// match: (ISEL [5] _ x (FlagLT))
  7056  	// result: x
  7057  	for {
  7058  		if v.AuxInt != 5 {
  7059  			break
  7060  		}
  7061  		_ = v.Args[2]
  7062  		x := v.Args[1]
  7063  		v_2 := v.Args[2]
  7064  		if v_2.Op != OpPPC64FlagLT {
  7065  			break
  7066  		}
  7067  		v.reset(OpCopy)
  7068  		v.Type = x.Type
  7069  		v.AddArg(x)
  7070  		return true
  7071  	}
  7072  	// match: (ISEL [5] y _ (FlagGT))
  7073  	// result: y
  7074  	for {
  7075  		if v.AuxInt != 5 {
  7076  			break
  7077  		}
  7078  		_ = v.Args[2]
  7079  		y := v.Args[0]
  7080  		v_2 := v.Args[2]
  7081  		if v_2.Op != OpPPC64FlagGT {
  7082  			break
  7083  		}
  7084  		v.reset(OpCopy)
  7085  		v.Type = y.Type
  7086  		v.AddArg(y)
  7087  		return true
  7088  	}
  7089  	// match: (ISEL [1] _ y (FlagEQ))
  7090  	// result: y
  7091  	for {
  7092  		if v.AuxInt != 1 {
  7093  			break
  7094  		}
  7095  		_ = v.Args[2]
  7096  		y := v.Args[1]
  7097  		v_2 := v.Args[2]
  7098  		if v_2.Op != OpPPC64FlagEQ {
  7099  			break
  7100  		}
  7101  		v.reset(OpCopy)
  7102  		v.Type = y.Type
  7103  		v.AddArg(y)
  7104  		return true
  7105  	}
  7106  	// match: (ISEL [1] _ y (FlagLT))
  7107  	// result: y
  7108  	for {
  7109  		if v.AuxInt != 1 {
  7110  			break
  7111  		}
  7112  		_ = v.Args[2]
  7113  		y := v.Args[1]
  7114  		v_2 := v.Args[2]
  7115  		if v_2.Op != OpPPC64FlagLT {
  7116  			break
  7117  		}
  7118  		v.reset(OpCopy)
  7119  		v.Type = y.Type
  7120  		v.AddArg(y)
  7121  		return true
  7122  	}
  7123  	// match: (ISEL [1] x _ (FlagGT))
  7124  	// result: x
  7125  	for {
  7126  		if v.AuxInt != 1 {
  7127  			break
  7128  		}
  7129  		_ = v.Args[2]
  7130  		x := v.Args[0]
  7131  		v_2 := v.Args[2]
  7132  		if v_2.Op != OpPPC64FlagGT {
  7133  			break
  7134  		}
  7135  		v.reset(OpCopy)
  7136  		v.Type = x.Type
  7137  		v.AddArg(x)
  7138  		return true
  7139  	}
  7140  	// match: (ISEL [4] x _ (FlagEQ))
  7141  	// result: x
  7142  	for {
  7143  		if v.AuxInt != 4 {
  7144  			break
  7145  		}
  7146  		_ = v.Args[2]
  7147  		x := v.Args[0]
  7148  		v_2 := v.Args[2]
  7149  		if v_2.Op != OpPPC64FlagEQ {
  7150  			break
  7151  		}
  7152  		v.reset(OpCopy)
  7153  		v.Type = x.Type
  7154  		v.AddArg(x)
  7155  		return true
  7156  	}
  7157  	// match: (ISEL [4] x _ (FlagGT))
  7158  	// result: x
  7159  	for {
  7160  		if v.AuxInt != 4 {
  7161  			break
  7162  		}
  7163  		_ = v.Args[2]
  7164  		x := v.Args[0]
  7165  		v_2 := v.Args[2]
  7166  		if v_2.Op != OpPPC64FlagGT {
  7167  			break
  7168  		}
  7169  		v.reset(OpCopy)
  7170  		v.Type = x.Type
  7171  		v.AddArg(x)
  7172  		return true
  7173  	}
  7174  	// match: (ISEL [4] _ y (FlagLT))
  7175  	// result: y
  7176  	for {
  7177  		if v.AuxInt != 4 {
  7178  			break
  7179  		}
  7180  		_ = v.Args[2]
  7181  		y := v.Args[1]
  7182  		v_2 := v.Args[2]
  7183  		if v_2.Op != OpPPC64FlagLT {
  7184  			break
  7185  		}
  7186  		v.reset(OpCopy)
  7187  		v.Type = y.Type
  7188  		v.AddArg(y)
  7189  		return true
  7190  	}
  7191  	// match: (ISEL [n] x y (InvertFlags bool))
  7192  	// cond: n%4 == 0
  7193  	// result: (ISEL [n+1] x y bool)
  7194  	for {
  7195  		n := v.AuxInt
  7196  		_ = v.Args[2]
  7197  		x := v.Args[0]
  7198  		y := v.Args[1]
  7199  		v_2 := v.Args[2]
  7200  		if v_2.Op != OpPPC64InvertFlags {
  7201  			break
  7202  		}
  7203  		bool := v_2.Args[0]
  7204  		if !(n%4 == 0) {
  7205  			break
  7206  		}
  7207  		v.reset(OpPPC64ISEL)
  7208  		v.AuxInt = n + 1
  7209  		v.AddArg(x)
  7210  		v.AddArg(y)
  7211  		v.AddArg(bool)
  7212  		return true
  7213  	}
  7214  	// match: (ISEL [n] x y (InvertFlags bool))
  7215  	// cond: n%4 == 1
  7216  	// result: (ISEL [n-1] x y bool)
  7217  	for {
  7218  		n := v.AuxInt
  7219  		_ = v.Args[2]
  7220  		x := v.Args[0]
  7221  		y := v.Args[1]
  7222  		v_2 := v.Args[2]
  7223  		if v_2.Op != OpPPC64InvertFlags {
  7224  			break
  7225  		}
  7226  		bool := v_2.Args[0]
  7227  		if !(n%4 == 1) {
  7228  			break
  7229  		}
  7230  		v.reset(OpPPC64ISEL)
  7231  		v.AuxInt = n - 1
  7232  		v.AddArg(x)
  7233  		v.AddArg(y)
  7234  		v.AddArg(bool)
  7235  		return true
  7236  	}
  7237  	return false
  7238  }
  7239  func rewriteValuePPC64_OpPPC64ISEL_20(v *Value) bool {
  7240  	// match: (ISEL [n] x y (InvertFlags bool))
  7241  	// cond: n%4 == 2
  7242  	// result: (ISEL [n] x y bool)
  7243  	for {
  7244  		n := v.AuxInt
  7245  		_ = v.Args[2]
  7246  		x := v.Args[0]
  7247  		y := v.Args[1]
  7248  		v_2 := v.Args[2]
  7249  		if v_2.Op != OpPPC64InvertFlags {
  7250  			break
  7251  		}
  7252  		bool := v_2.Args[0]
  7253  		if !(n%4 == 2) {
  7254  			break
  7255  		}
  7256  		v.reset(OpPPC64ISEL)
  7257  		v.AuxInt = n
  7258  		v.AddArg(x)
  7259  		v.AddArg(y)
  7260  		v.AddArg(bool)
  7261  		return true
  7262  	}
  7263  	return false
  7264  }
  7265  func rewriteValuePPC64_OpPPC64ISELB_0(v *Value) bool {
  7266  	// match: (ISELB [0] _ (FlagLT))
  7267  	// result: (MOVDconst [1])
  7268  	for {
  7269  		if v.AuxInt != 0 {
  7270  			break
  7271  		}
  7272  		_ = v.Args[1]
  7273  		v_1 := v.Args[1]
  7274  		if v_1.Op != OpPPC64FlagLT {
  7275  			break
  7276  		}
  7277  		v.reset(OpPPC64MOVDconst)
  7278  		v.AuxInt = 1
  7279  		return true
  7280  	}
  7281  	// match: (ISELB [0] _ (FlagGT))
  7282  	// result: (MOVDconst [0])
  7283  	for {
  7284  		if v.AuxInt != 0 {
  7285  			break
  7286  		}
  7287  		_ = v.Args[1]
  7288  		v_1 := v.Args[1]
  7289  		if v_1.Op != OpPPC64FlagGT {
  7290  			break
  7291  		}
  7292  		v.reset(OpPPC64MOVDconst)
  7293  		v.AuxInt = 0
  7294  		return true
  7295  	}
  7296  	// match: (ISELB [0] _ (FlagEQ))
  7297  	// result: (MOVDconst [0])
  7298  	for {
  7299  		if v.AuxInt != 0 {
  7300  			break
  7301  		}
  7302  		_ = v.Args[1]
  7303  		v_1 := v.Args[1]
  7304  		if v_1.Op != OpPPC64FlagEQ {
  7305  			break
  7306  		}
  7307  		v.reset(OpPPC64MOVDconst)
  7308  		v.AuxInt = 0
  7309  		return true
  7310  	}
  7311  	// match: (ISELB [1] _ (FlagGT))
  7312  	// result: (MOVDconst [1])
  7313  	for {
  7314  		if v.AuxInt != 1 {
  7315  			break
  7316  		}
  7317  		_ = v.Args[1]
  7318  		v_1 := v.Args[1]
  7319  		if v_1.Op != OpPPC64FlagGT {
  7320  			break
  7321  		}
  7322  		v.reset(OpPPC64MOVDconst)
  7323  		v.AuxInt = 1
  7324  		return true
  7325  	}
  7326  	// match: (ISELB [1] _ (FlagLT))
  7327  	// result: (MOVDconst [0])
  7328  	for {
  7329  		if v.AuxInt != 1 {
  7330  			break
  7331  		}
  7332  		_ = v.Args[1]
  7333  		v_1 := v.Args[1]
  7334  		if v_1.Op != OpPPC64FlagLT {
  7335  			break
  7336  		}
  7337  		v.reset(OpPPC64MOVDconst)
  7338  		v.AuxInt = 0
  7339  		return true
  7340  	}
  7341  	// match: (ISELB [1] _ (FlagEQ))
  7342  	// result: (MOVDconst [0])
  7343  	for {
  7344  		if v.AuxInt != 1 {
  7345  			break
  7346  		}
  7347  		_ = v.Args[1]
  7348  		v_1 := v.Args[1]
  7349  		if v_1.Op != OpPPC64FlagEQ {
  7350  			break
  7351  		}
  7352  		v.reset(OpPPC64MOVDconst)
  7353  		v.AuxInt = 0
  7354  		return true
  7355  	}
  7356  	// match: (ISELB [2] _ (FlagEQ))
  7357  	// result: (MOVDconst [1])
  7358  	for {
  7359  		if v.AuxInt != 2 {
  7360  			break
  7361  		}
  7362  		_ = v.Args[1]
  7363  		v_1 := v.Args[1]
  7364  		if v_1.Op != OpPPC64FlagEQ {
  7365  			break
  7366  		}
  7367  		v.reset(OpPPC64MOVDconst)
  7368  		v.AuxInt = 1
  7369  		return true
  7370  	}
  7371  	// match: (ISELB [2] _ (FlagLT))
  7372  	// result: (MOVDconst [0])
  7373  	for {
  7374  		if v.AuxInt != 2 {
  7375  			break
  7376  		}
  7377  		_ = v.Args[1]
  7378  		v_1 := v.Args[1]
  7379  		if v_1.Op != OpPPC64FlagLT {
  7380  			break
  7381  		}
  7382  		v.reset(OpPPC64MOVDconst)
  7383  		v.AuxInt = 0
  7384  		return true
  7385  	}
  7386  	// match: (ISELB [2] _ (FlagGT))
  7387  	// result: (MOVDconst [0])
  7388  	for {
  7389  		if v.AuxInt != 2 {
  7390  			break
  7391  		}
  7392  		_ = v.Args[1]
  7393  		v_1 := v.Args[1]
  7394  		if v_1.Op != OpPPC64FlagGT {
  7395  			break
  7396  		}
  7397  		v.reset(OpPPC64MOVDconst)
  7398  		v.AuxInt = 0
  7399  		return true
  7400  	}
  7401  	// match: (ISELB [4] _ (FlagLT))
  7402  	// result: (MOVDconst [0])
  7403  	for {
  7404  		if v.AuxInt != 4 {
  7405  			break
  7406  		}
  7407  		_ = v.Args[1]
  7408  		v_1 := v.Args[1]
  7409  		if v_1.Op != OpPPC64FlagLT {
  7410  			break
  7411  		}
  7412  		v.reset(OpPPC64MOVDconst)
  7413  		v.AuxInt = 0
  7414  		return true
  7415  	}
  7416  	return false
  7417  }
  7418  func rewriteValuePPC64_OpPPC64ISELB_10(v *Value) bool {
  7419  	b := v.Block
  7420  	typ := &b.Func.Config.Types
  7421  	// match: (ISELB [4] _ (FlagGT))
  7422  	// result: (MOVDconst [1])
  7423  	for {
  7424  		if v.AuxInt != 4 {
  7425  			break
  7426  		}
  7427  		_ = v.Args[1]
  7428  		v_1 := v.Args[1]
  7429  		if v_1.Op != OpPPC64FlagGT {
  7430  			break
  7431  		}
  7432  		v.reset(OpPPC64MOVDconst)
  7433  		v.AuxInt = 1
  7434  		return true
  7435  	}
  7436  	// match: (ISELB [4] _ (FlagEQ))
  7437  	// result: (MOVDconst [1])
  7438  	for {
  7439  		if v.AuxInt != 4 {
  7440  			break
  7441  		}
  7442  		_ = v.Args[1]
  7443  		v_1 := v.Args[1]
  7444  		if v_1.Op != OpPPC64FlagEQ {
  7445  			break
  7446  		}
  7447  		v.reset(OpPPC64MOVDconst)
  7448  		v.AuxInt = 1
  7449  		return true
  7450  	}
  7451  	// match: (ISELB [5] _ (FlagGT))
  7452  	// result: (MOVDconst [0])
  7453  	for {
  7454  		if v.AuxInt != 5 {
  7455  			break
  7456  		}
  7457  		_ = v.Args[1]
  7458  		v_1 := v.Args[1]
  7459  		if v_1.Op != OpPPC64FlagGT {
  7460  			break
  7461  		}
  7462  		v.reset(OpPPC64MOVDconst)
  7463  		v.AuxInt = 0
  7464  		return true
  7465  	}
  7466  	// match: (ISELB [5] _ (FlagLT))
  7467  	// result: (MOVDconst [1])
  7468  	for {
  7469  		if v.AuxInt != 5 {
  7470  			break
  7471  		}
  7472  		_ = v.Args[1]
  7473  		v_1 := v.Args[1]
  7474  		if v_1.Op != OpPPC64FlagLT {
  7475  			break
  7476  		}
  7477  		v.reset(OpPPC64MOVDconst)
  7478  		v.AuxInt = 1
  7479  		return true
  7480  	}
  7481  	// match: (ISELB [5] _ (FlagEQ))
  7482  	// result: (MOVDconst [1])
  7483  	for {
  7484  		if v.AuxInt != 5 {
  7485  			break
  7486  		}
  7487  		_ = v.Args[1]
  7488  		v_1 := v.Args[1]
  7489  		if v_1.Op != OpPPC64FlagEQ {
  7490  			break
  7491  		}
  7492  		v.reset(OpPPC64MOVDconst)
  7493  		v.AuxInt = 1
  7494  		return true
  7495  	}
  7496  	// match: (ISELB [6] _ (FlagEQ))
  7497  	// result: (MOVDconst [0])
  7498  	for {
  7499  		if v.AuxInt != 6 {
  7500  			break
  7501  		}
  7502  		_ = v.Args[1]
  7503  		v_1 := v.Args[1]
  7504  		if v_1.Op != OpPPC64FlagEQ {
  7505  			break
  7506  		}
  7507  		v.reset(OpPPC64MOVDconst)
  7508  		v.AuxInt = 0
  7509  		return true
  7510  	}
  7511  	// match: (ISELB [6] _ (FlagLT))
  7512  	// result: (MOVDconst [1])
  7513  	for {
  7514  		if v.AuxInt != 6 {
  7515  			break
  7516  		}
  7517  		_ = v.Args[1]
  7518  		v_1 := v.Args[1]
  7519  		if v_1.Op != OpPPC64FlagLT {
  7520  			break
  7521  		}
  7522  		v.reset(OpPPC64MOVDconst)
  7523  		v.AuxInt = 1
  7524  		return true
  7525  	}
  7526  	// match: (ISELB [6] _ (FlagGT))
  7527  	// result: (MOVDconst [1])
  7528  	for {
  7529  		if v.AuxInt != 6 {
  7530  			break
  7531  		}
  7532  		_ = v.Args[1]
  7533  		v_1 := v.Args[1]
  7534  		if v_1.Op != OpPPC64FlagGT {
  7535  			break
  7536  		}
  7537  		v.reset(OpPPC64MOVDconst)
  7538  		v.AuxInt = 1
  7539  		return true
  7540  	}
  7541  	// match: (ISELB [n] (MOVDconst [1]) (InvertFlags bool))
  7542  	// cond: n%4 == 0
  7543  	// result: (ISELB [n+1] (MOVDconst [1]) bool)
  7544  	for {
  7545  		n := v.AuxInt
  7546  		_ = v.Args[1]
  7547  		v_0 := v.Args[0]
  7548  		if v_0.Op != OpPPC64MOVDconst || v_0.AuxInt != 1 {
  7549  			break
  7550  		}
  7551  		v_1 := v.Args[1]
  7552  		if v_1.Op != OpPPC64InvertFlags {
  7553  			break
  7554  		}
  7555  		bool := v_1.Args[0]
  7556  		if !(n%4 == 0) {
  7557  			break
  7558  		}
  7559  		v.reset(OpPPC64ISELB)
  7560  		v.AuxInt = n + 1
  7561  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  7562  		v0.AuxInt = 1
  7563  		v.AddArg(v0)
  7564  		v.AddArg(bool)
  7565  		return true
  7566  	}
  7567  	// match: (ISELB [n] (MOVDconst [1]) (InvertFlags bool))
  7568  	// cond: n%4 == 1
  7569  	// result: (ISELB [n-1] (MOVDconst [1]) bool)
  7570  	for {
  7571  		n := v.AuxInt
  7572  		_ = v.Args[1]
  7573  		v_0 := v.Args[0]
  7574  		if v_0.Op != OpPPC64MOVDconst || v_0.AuxInt != 1 {
  7575  			break
  7576  		}
  7577  		v_1 := v.Args[1]
  7578  		if v_1.Op != OpPPC64InvertFlags {
  7579  			break
  7580  		}
  7581  		bool := v_1.Args[0]
  7582  		if !(n%4 == 1) {
  7583  			break
  7584  		}
  7585  		v.reset(OpPPC64ISELB)
  7586  		v.AuxInt = n - 1
  7587  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  7588  		v0.AuxInt = 1
  7589  		v.AddArg(v0)
  7590  		v.AddArg(bool)
  7591  		return true
  7592  	}
  7593  	return false
  7594  }
  7595  func rewriteValuePPC64_OpPPC64ISELB_20(v *Value) bool {
  7596  	b := v.Block
  7597  	typ := &b.Func.Config.Types
  7598  	// match: (ISELB [n] (MOVDconst [1]) (InvertFlags bool))
  7599  	// cond: n%4 == 2
  7600  	// result: (ISELB [n] (MOVDconst [1]) bool)
  7601  	for {
  7602  		n := v.AuxInt
  7603  		_ = v.Args[1]
  7604  		v_0 := v.Args[0]
  7605  		if v_0.Op != OpPPC64MOVDconst || v_0.AuxInt != 1 {
  7606  			break
  7607  		}
  7608  		v_1 := v.Args[1]
  7609  		if v_1.Op != OpPPC64InvertFlags {
  7610  			break
  7611  		}
  7612  		bool := v_1.Args[0]
  7613  		if !(n%4 == 2) {
  7614  			break
  7615  		}
  7616  		v.reset(OpPPC64ISELB)
  7617  		v.AuxInt = n
  7618  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  7619  		v0.AuxInt = 1
  7620  		v.AddArg(v0)
  7621  		v.AddArg(bool)
  7622  		return true
  7623  	}
  7624  	return false
  7625  }
  7626  func rewriteValuePPC64_OpPPC64LessEqual_0(v *Value) bool {
  7627  	b := v.Block
  7628  	typ := &b.Func.Config.Types
  7629  	// match: (LessEqual (FlagEQ))
  7630  	// result: (MOVDconst [1])
  7631  	for {
  7632  		v_0 := v.Args[0]
  7633  		if v_0.Op != OpPPC64FlagEQ {
  7634  			break
  7635  		}
  7636  		v.reset(OpPPC64MOVDconst)
  7637  		v.AuxInt = 1
  7638  		return true
  7639  	}
  7640  	// match: (LessEqual (FlagLT))
  7641  	// result: (MOVDconst [1])
  7642  	for {
  7643  		v_0 := v.Args[0]
  7644  		if v_0.Op != OpPPC64FlagLT {
  7645  			break
  7646  		}
  7647  		v.reset(OpPPC64MOVDconst)
  7648  		v.AuxInt = 1
  7649  		return true
  7650  	}
  7651  	// match: (LessEqual (FlagGT))
  7652  	// result: (MOVDconst [0])
  7653  	for {
  7654  		v_0 := v.Args[0]
  7655  		if v_0.Op != OpPPC64FlagGT {
  7656  			break
  7657  		}
  7658  		v.reset(OpPPC64MOVDconst)
  7659  		v.AuxInt = 0
  7660  		return true
  7661  	}
  7662  	// match: (LessEqual (InvertFlags x))
  7663  	// result: (GreaterEqual x)
  7664  	for {
  7665  		v_0 := v.Args[0]
  7666  		if v_0.Op != OpPPC64InvertFlags {
  7667  			break
  7668  		}
  7669  		x := v_0.Args[0]
  7670  		v.reset(OpPPC64GreaterEqual)
  7671  		v.AddArg(x)
  7672  		return true
  7673  	}
  7674  	// match: (LessEqual cmp)
  7675  	// result: (ISELB [5] (MOVDconst [1]) cmp)
  7676  	for {
  7677  		cmp := v.Args[0]
  7678  		v.reset(OpPPC64ISELB)
  7679  		v.AuxInt = 5
  7680  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  7681  		v0.AuxInt = 1
  7682  		v.AddArg(v0)
  7683  		v.AddArg(cmp)
  7684  		return true
  7685  	}
  7686  }
  7687  func rewriteValuePPC64_OpPPC64LessThan_0(v *Value) bool {
  7688  	b := v.Block
  7689  	typ := &b.Func.Config.Types
  7690  	// match: (LessThan (FlagEQ))
  7691  	// result: (MOVDconst [0])
  7692  	for {
  7693  		v_0 := v.Args[0]
  7694  		if v_0.Op != OpPPC64FlagEQ {
  7695  			break
  7696  		}
  7697  		v.reset(OpPPC64MOVDconst)
  7698  		v.AuxInt = 0
  7699  		return true
  7700  	}
  7701  	// match: (LessThan (FlagLT))
  7702  	// result: (MOVDconst [1])
  7703  	for {
  7704  		v_0 := v.Args[0]
  7705  		if v_0.Op != OpPPC64FlagLT {
  7706  			break
  7707  		}
  7708  		v.reset(OpPPC64MOVDconst)
  7709  		v.AuxInt = 1
  7710  		return true
  7711  	}
  7712  	// match: (LessThan (FlagGT))
  7713  	// result: (MOVDconst [0])
  7714  	for {
  7715  		v_0 := v.Args[0]
  7716  		if v_0.Op != OpPPC64FlagGT {
  7717  			break
  7718  		}
  7719  		v.reset(OpPPC64MOVDconst)
  7720  		v.AuxInt = 0
  7721  		return true
  7722  	}
  7723  	// match: (LessThan (InvertFlags x))
  7724  	// result: (GreaterThan x)
  7725  	for {
  7726  		v_0 := v.Args[0]
  7727  		if v_0.Op != OpPPC64InvertFlags {
  7728  			break
  7729  		}
  7730  		x := v_0.Args[0]
  7731  		v.reset(OpPPC64GreaterThan)
  7732  		v.AddArg(x)
  7733  		return true
  7734  	}
  7735  	// match: (LessThan cmp)
  7736  	// result: (ISELB [0] (MOVDconst [1]) cmp)
  7737  	for {
  7738  		cmp := v.Args[0]
  7739  		v.reset(OpPPC64ISELB)
  7740  		v.AuxInt = 0
  7741  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  7742  		v0.AuxInt = 1
  7743  		v.AddArg(v0)
  7744  		v.AddArg(cmp)
  7745  		return true
  7746  	}
  7747  }
  7748  func rewriteValuePPC64_OpPPC64MFVSRD_0(v *Value) bool {
  7749  	b := v.Block
  7750  	typ := &b.Func.Config.Types
  7751  	// match: (MFVSRD (FMOVDconst [c]))
  7752  	// result: (MOVDconst [c])
  7753  	for {
  7754  		v_0 := v.Args[0]
  7755  		if v_0.Op != OpPPC64FMOVDconst {
  7756  			break
  7757  		}
  7758  		c := v_0.AuxInt
  7759  		v.reset(OpPPC64MOVDconst)
  7760  		v.AuxInt = c
  7761  		return true
  7762  	}
  7763  	// match: (MFVSRD x:(FMOVDload [off] {sym} ptr mem))
  7764  	// cond: x.Uses == 1 && clobber(x)
  7765  	// result: @x.Block (MOVDload [off] {sym} ptr mem)
  7766  	for {
  7767  		x := v.Args[0]
  7768  		if x.Op != OpPPC64FMOVDload {
  7769  			break
  7770  		}
  7771  		off := x.AuxInt
  7772  		sym := x.Aux
  7773  		mem := x.Args[1]
  7774  		ptr := x.Args[0]
  7775  		if !(x.Uses == 1 && clobber(x)) {
  7776  			break
  7777  		}
  7778  		b = x.Block
  7779  		v0 := b.NewValue0(x.Pos, OpPPC64MOVDload, typ.Int64)
  7780  		v.reset(OpCopy)
  7781  		v.AddArg(v0)
  7782  		v0.AuxInt = off
  7783  		v0.Aux = sym
  7784  		v0.AddArg(ptr)
  7785  		v0.AddArg(mem)
  7786  		return true
  7787  	}
  7788  	return false
  7789  }
  7790  func rewriteValuePPC64_OpPPC64MOVBZload_0(v *Value) bool {
  7791  	// match: (MOVBZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  7792  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  7793  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7794  	for {
  7795  		off1 := v.AuxInt
  7796  		sym1 := v.Aux
  7797  		mem := v.Args[1]
  7798  		p := v.Args[0]
  7799  		if p.Op != OpPPC64MOVDaddr {
  7800  			break
  7801  		}
  7802  		off2 := p.AuxInt
  7803  		sym2 := p.Aux
  7804  		ptr := p.Args[0]
  7805  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  7806  			break
  7807  		}
  7808  		v.reset(OpPPC64MOVBZload)
  7809  		v.AuxInt = off1 + off2
  7810  		v.Aux = mergeSym(sym1, sym2)
  7811  		v.AddArg(ptr)
  7812  		v.AddArg(mem)
  7813  		return true
  7814  	}
  7815  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] x) mem)
  7816  	// cond: is16Bit(off1+off2)
  7817  	// result: (MOVBZload [off1+off2] {sym} x mem)
  7818  	for {
  7819  		off1 := v.AuxInt
  7820  		sym := v.Aux
  7821  		mem := v.Args[1]
  7822  		v_0 := v.Args[0]
  7823  		if v_0.Op != OpPPC64ADDconst {
  7824  			break
  7825  		}
  7826  		off2 := v_0.AuxInt
  7827  		x := v_0.Args[0]
  7828  		if !(is16Bit(off1 + off2)) {
  7829  			break
  7830  		}
  7831  		v.reset(OpPPC64MOVBZload)
  7832  		v.AuxInt = off1 + off2
  7833  		v.Aux = sym
  7834  		v.AddArg(x)
  7835  		v.AddArg(mem)
  7836  		return true
  7837  	}
  7838  	// match: (MOVBZload [0] {sym} p:(ADD ptr idx) mem)
  7839  	// cond: sym == nil && p.Uses == 1
  7840  	// result: (MOVBZloadidx ptr idx mem)
  7841  	for {
  7842  		if v.AuxInt != 0 {
  7843  			break
  7844  		}
  7845  		sym := v.Aux
  7846  		mem := v.Args[1]
  7847  		p := v.Args[0]
  7848  		if p.Op != OpPPC64ADD {
  7849  			break
  7850  		}
  7851  		idx := p.Args[1]
  7852  		ptr := p.Args[0]
  7853  		if !(sym == nil && p.Uses == 1) {
  7854  			break
  7855  		}
  7856  		v.reset(OpPPC64MOVBZloadidx)
  7857  		v.AddArg(ptr)
  7858  		v.AddArg(idx)
  7859  		v.AddArg(mem)
  7860  		return true
  7861  	}
  7862  	return false
  7863  }
  7864  func rewriteValuePPC64_OpPPC64MOVBZloadidx_0(v *Value) bool {
  7865  	// match: (MOVBZloadidx ptr (MOVDconst [c]) mem)
  7866  	// cond: is16Bit(c)
  7867  	// result: (MOVBZload [c] ptr mem)
  7868  	for {
  7869  		mem := v.Args[2]
  7870  		ptr := v.Args[0]
  7871  		v_1 := v.Args[1]
  7872  		if v_1.Op != OpPPC64MOVDconst {
  7873  			break
  7874  		}
  7875  		c := v_1.AuxInt
  7876  		if !(is16Bit(c)) {
  7877  			break
  7878  		}
  7879  		v.reset(OpPPC64MOVBZload)
  7880  		v.AuxInt = c
  7881  		v.AddArg(ptr)
  7882  		v.AddArg(mem)
  7883  		return true
  7884  	}
  7885  	// match: (MOVBZloadidx (MOVDconst [c]) ptr mem)
  7886  	// cond: is16Bit(c)
  7887  	// result: (MOVBZload [c] ptr mem)
  7888  	for {
  7889  		mem := v.Args[2]
  7890  		v_0 := v.Args[0]
  7891  		if v_0.Op != OpPPC64MOVDconst {
  7892  			break
  7893  		}
  7894  		c := v_0.AuxInt
  7895  		ptr := v.Args[1]
  7896  		if !(is16Bit(c)) {
  7897  			break
  7898  		}
  7899  		v.reset(OpPPC64MOVBZload)
  7900  		v.AuxInt = c
  7901  		v.AddArg(ptr)
  7902  		v.AddArg(mem)
  7903  		return true
  7904  	}
  7905  	return false
  7906  }
  7907  func rewriteValuePPC64_OpPPC64MOVBZreg_0(v *Value) bool {
  7908  	b := v.Block
  7909  	typ := &b.Func.Config.Types
  7910  	// match: (MOVBZreg y:(ANDconst [c] _))
  7911  	// cond: uint64(c) <= 0xFF
  7912  	// result: y
  7913  	for {
  7914  		y := v.Args[0]
  7915  		if y.Op != OpPPC64ANDconst {
  7916  			break
  7917  		}
  7918  		c := y.AuxInt
  7919  		if !(uint64(c) <= 0xFF) {
  7920  			break
  7921  		}
  7922  		v.reset(OpCopy)
  7923  		v.Type = y.Type
  7924  		v.AddArg(y)
  7925  		return true
  7926  	}
  7927  	// match: (MOVBZreg (SRWconst [c] (MOVBZreg x)))
  7928  	// result: (SRWconst [c] (MOVBZreg x))
  7929  	for {
  7930  		v_0 := v.Args[0]
  7931  		if v_0.Op != OpPPC64SRWconst {
  7932  			break
  7933  		}
  7934  		c := v_0.AuxInt
  7935  		v_0_0 := v_0.Args[0]
  7936  		if v_0_0.Op != OpPPC64MOVBZreg {
  7937  			break
  7938  		}
  7939  		x := v_0_0.Args[0]
  7940  		v.reset(OpPPC64SRWconst)
  7941  		v.AuxInt = c
  7942  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  7943  		v0.AddArg(x)
  7944  		v.AddArg(v0)
  7945  		return true
  7946  	}
  7947  	// match: (MOVBZreg (SRWconst [c] x))
  7948  	// cond: sizeof(x.Type) == 8
  7949  	// result: (SRWconst [c] x)
  7950  	for {
  7951  		v_0 := v.Args[0]
  7952  		if v_0.Op != OpPPC64SRWconst {
  7953  			break
  7954  		}
  7955  		c := v_0.AuxInt
  7956  		x := v_0.Args[0]
  7957  		if !(sizeof(x.Type) == 8) {
  7958  			break
  7959  		}
  7960  		v.reset(OpPPC64SRWconst)
  7961  		v.AuxInt = c
  7962  		v.AddArg(x)
  7963  		return true
  7964  	}
  7965  	// match: (MOVBZreg (SRDconst [c] x))
  7966  	// cond: c>=56
  7967  	// result: (SRDconst [c] x)
  7968  	for {
  7969  		v_0 := v.Args[0]
  7970  		if v_0.Op != OpPPC64SRDconst {
  7971  			break
  7972  		}
  7973  		c := v_0.AuxInt
  7974  		x := v_0.Args[0]
  7975  		if !(c >= 56) {
  7976  			break
  7977  		}
  7978  		v.reset(OpPPC64SRDconst)
  7979  		v.AuxInt = c
  7980  		v.AddArg(x)
  7981  		return true
  7982  	}
  7983  	// match: (MOVBZreg (SRWconst [c] x))
  7984  	// cond: c>=24
  7985  	// result: (SRWconst [c] x)
  7986  	for {
  7987  		v_0 := v.Args[0]
  7988  		if v_0.Op != OpPPC64SRWconst {
  7989  			break
  7990  		}
  7991  		c := v_0.AuxInt
  7992  		x := v_0.Args[0]
  7993  		if !(c >= 24) {
  7994  			break
  7995  		}
  7996  		v.reset(OpPPC64SRWconst)
  7997  		v.AuxInt = c
  7998  		v.AddArg(x)
  7999  		return true
  8000  	}
  8001  	// match: (MOVBZreg y:(MOVBZreg _))
  8002  	// result: y
  8003  	for {
  8004  		y := v.Args[0]
  8005  		if y.Op != OpPPC64MOVBZreg {
  8006  			break
  8007  		}
  8008  		v.reset(OpCopy)
  8009  		v.Type = y.Type
  8010  		v.AddArg(y)
  8011  		return true
  8012  	}
  8013  	// match: (MOVBZreg (MOVBreg x))
  8014  	// result: (MOVBZreg x)
  8015  	for {
  8016  		v_0 := v.Args[0]
  8017  		if v_0.Op != OpPPC64MOVBreg {
  8018  			break
  8019  		}
  8020  		x := v_0.Args[0]
  8021  		v.reset(OpPPC64MOVBZreg)
  8022  		v.AddArg(x)
  8023  		return true
  8024  	}
  8025  	// match: (MOVBZreg x:(MOVBZload _ _))
  8026  	// result: x
  8027  	for {
  8028  		x := v.Args[0]
  8029  		if x.Op != OpPPC64MOVBZload {
  8030  			break
  8031  		}
  8032  		_ = x.Args[1]
  8033  		v.reset(OpCopy)
  8034  		v.Type = x.Type
  8035  		v.AddArg(x)
  8036  		return true
  8037  	}
  8038  	// match: (MOVBZreg x:(MOVBZloadidx _ _ _))
  8039  	// result: x
  8040  	for {
  8041  		x := v.Args[0]
  8042  		if x.Op != OpPPC64MOVBZloadidx {
  8043  			break
  8044  		}
  8045  		_ = x.Args[2]
  8046  		v.reset(OpCopy)
  8047  		v.Type = x.Type
  8048  		v.AddArg(x)
  8049  		return true
  8050  	}
  8051  	// match: (MOVBZreg x:(Arg <t>))
  8052  	// cond: is8BitInt(t) && !isSigned(t)
  8053  	// result: x
  8054  	for {
  8055  		x := v.Args[0]
  8056  		if x.Op != OpArg {
  8057  			break
  8058  		}
  8059  		t := x.Type
  8060  		if !(is8BitInt(t) && !isSigned(t)) {
  8061  			break
  8062  		}
  8063  		v.reset(OpCopy)
  8064  		v.Type = x.Type
  8065  		v.AddArg(x)
  8066  		return true
  8067  	}
  8068  	return false
  8069  }
  8070  func rewriteValuePPC64_OpPPC64MOVBZreg_10(v *Value) bool {
  8071  	// match: (MOVBZreg (MOVDconst [c]))
  8072  	// result: (MOVDconst [int64(uint8(c))])
  8073  	for {
  8074  		v_0 := v.Args[0]
  8075  		if v_0.Op != OpPPC64MOVDconst {
  8076  			break
  8077  		}
  8078  		c := v_0.AuxInt
  8079  		v.reset(OpPPC64MOVDconst)
  8080  		v.AuxInt = int64(uint8(c))
  8081  		return true
  8082  	}
  8083  	return false
  8084  }
  8085  func rewriteValuePPC64_OpPPC64MOVBreg_0(v *Value) bool {
  8086  	b := v.Block
  8087  	typ := &b.Func.Config.Types
  8088  	// match: (MOVBreg y:(ANDconst [c] _))
  8089  	// cond: uint64(c) <= 0x7F
  8090  	// result: y
  8091  	for {
  8092  		y := v.Args[0]
  8093  		if y.Op != OpPPC64ANDconst {
  8094  			break
  8095  		}
  8096  		c := y.AuxInt
  8097  		if !(uint64(c) <= 0x7F) {
  8098  			break
  8099  		}
  8100  		v.reset(OpCopy)
  8101  		v.Type = y.Type
  8102  		v.AddArg(y)
  8103  		return true
  8104  	}
  8105  	// match: (MOVBreg (SRAWconst [c] (MOVBreg x)))
  8106  	// result: (SRAWconst [c] (MOVBreg x))
  8107  	for {
  8108  		v_0 := v.Args[0]
  8109  		if v_0.Op != OpPPC64SRAWconst {
  8110  			break
  8111  		}
  8112  		c := v_0.AuxInt
  8113  		v_0_0 := v_0.Args[0]
  8114  		if v_0_0.Op != OpPPC64MOVBreg {
  8115  			break
  8116  		}
  8117  		x := v_0_0.Args[0]
  8118  		v.reset(OpPPC64SRAWconst)
  8119  		v.AuxInt = c
  8120  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
  8121  		v0.AddArg(x)
  8122  		v.AddArg(v0)
  8123  		return true
  8124  	}
  8125  	// match: (MOVBreg (SRAWconst [c] x))
  8126  	// cond: sizeof(x.Type) == 8
  8127  	// result: (SRAWconst [c] x)
  8128  	for {
  8129  		v_0 := v.Args[0]
  8130  		if v_0.Op != OpPPC64SRAWconst {
  8131  			break
  8132  		}
  8133  		c := v_0.AuxInt
  8134  		x := v_0.Args[0]
  8135  		if !(sizeof(x.Type) == 8) {
  8136  			break
  8137  		}
  8138  		v.reset(OpPPC64SRAWconst)
  8139  		v.AuxInt = c
  8140  		v.AddArg(x)
  8141  		return true
  8142  	}
  8143  	// match: (MOVBreg (SRDconst [c] x))
  8144  	// cond: c>56
  8145  	// result: (SRDconst [c] x)
  8146  	for {
  8147  		v_0 := v.Args[0]
  8148  		if v_0.Op != OpPPC64SRDconst {
  8149  			break
  8150  		}
  8151  		c := v_0.AuxInt
  8152  		x := v_0.Args[0]
  8153  		if !(c > 56) {
  8154  			break
  8155  		}
  8156  		v.reset(OpPPC64SRDconst)
  8157  		v.AuxInt = c
  8158  		v.AddArg(x)
  8159  		return true
  8160  	}
  8161  	// match: (MOVBreg (SRDconst [c] x))
  8162  	// cond: c==56
  8163  	// result: (SRADconst [c] x)
  8164  	for {
  8165  		v_0 := v.Args[0]
  8166  		if v_0.Op != OpPPC64SRDconst {
  8167  			break
  8168  		}
  8169  		c := v_0.AuxInt
  8170  		x := v_0.Args[0]
  8171  		if !(c == 56) {
  8172  			break
  8173  		}
  8174  		v.reset(OpPPC64SRADconst)
  8175  		v.AuxInt = c
  8176  		v.AddArg(x)
  8177  		return true
  8178  	}
  8179  	// match: (MOVBreg (SRWconst [c] x))
  8180  	// cond: c>24
  8181  	// result: (SRWconst [c] x)
  8182  	for {
  8183  		v_0 := v.Args[0]
  8184  		if v_0.Op != OpPPC64SRWconst {
  8185  			break
  8186  		}
  8187  		c := v_0.AuxInt
  8188  		x := v_0.Args[0]
  8189  		if !(c > 24) {
  8190  			break
  8191  		}
  8192  		v.reset(OpPPC64SRWconst)
  8193  		v.AuxInt = c
  8194  		v.AddArg(x)
  8195  		return true
  8196  	}
  8197  	// match: (MOVBreg (SRWconst [c] x))
  8198  	// cond: c==24
  8199  	// result: (SRAWconst [c] x)
  8200  	for {
  8201  		v_0 := v.Args[0]
  8202  		if v_0.Op != OpPPC64SRWconst {
  8203  			break
  8204  		}
  8205  		c := v_0.AuxInt
  8206  		x := v_0.Args[0]
  8207  		if !(c == 24) {
  8208  			break
  8209  		}
  8210  		v.reset(OpPPC64SRAWconst)
  8211  		v.AuxInt = c
  8212  		v.AddArg(x)
  8213  		return true
  8214  	}
  8215  	// match: (MOVBreg y:(MOVBreg _))
  8216  	// result: y
  8217  	for {
  8218  		y := v.Args[0]
  8219  		if y.Op != OpPPC64MOVBreg {
  8220  			break
  8221  		}
  8222  		v.reset(OpCopy)
  8223  		v.Type = y.Type
  8224  		v.AddArg(y)
  8225  		return true
  8226  	}
  8227  	// match: (MOVBreg (MOVBZreg x))
  8228  	// result: (MOVBreg x)
  8229  	for {
  8230  		v_0 := v.Args[0]
  8231  		if v_0.Op != OpPPC64MOVBZreg {
  8232  			break
  8233  		}
  8234  		x := v_0.Args[0]
  8235  		v.reset(OpPPC64MOVBreg)
  8236  		v.AddArg(x)
  8237  		return true
  8238  	}
  8239  	// match: (MOVBreg x:(Arg <t>))
  8240  	// cond: is8BitInt(t) && isSigned(t)
  8241  	// result: x
  8242  	for {
  8243  		x := v.Args[0]
  8244  		if x.Op != OpArg {
  8245  			break
  8246  		}
  8247  		t := x.Type
  8248  		if !(is8BitInt(t) && isSigned(t)) {
  8249  			break
  8250  		}
  8251  		v.reset(OpCopy)
  8252  		v.Type = x.Type
  8253  		v.AddArg(x)
  8254  		return true
  8255  	}
  8256  	return false
  8257  }
  8258  func rewriteValuePPC64_OpPPC64MOVBreg_10(v *Value) bool {
  8259  	// match: (MOVBreg (MOVDconst [c]))
  8260  	// result: (MOVDconst [int64(int8(c))])
  8261  	for {
  8262  		v_0 := v.Args[0]
  8263  		if v_0.Op != OpPPC64MOVDconst {
  8264  			break
  8265  		}
  8266  		c := v_0.AuxInt
  8267  		v.reset(OpPPC64MOVDconst)
  8268  		v.AuxInt = int64(int8(c))
  8269  		return true
  8270  	}
  8271  	return false
  8272  }
  8273  func rewriteValuePPC64_OpPPC64MOVBstore_0(v *Value) bool {
  8274  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] x) val mem)
  8275  	// cond: is16Bit(off1+off2)
  8276  	// result: (MOVBstore [off1+off2] {sym} x val mem)
  8277  	for {
  8278  		off1 := v.AuxInt
  8279  		sym := v.Aux
  8280  		mem := v.Args[2]
  8281  		v_0 := v.Args[0]
  8282  		if v_0.Op != OpPPC64ADDconst {
  8283  			break
  8284  		}
  8285  		off2 := v_0.AuxInt
  8286  		x := v_0.Args[0]
  8287  		val := v.Args[1]
  8288  		if !(is16Bit(off1 + off2)) {
  8289  			break
  8290  		}
  8291  		v.reset(OpPPC64MOVBstore)
  8292  		v.AuxInt = off1 + off2
  8293  		v.Aux = sym
  8294  		v.AddArg(x)
  8295  		v.AddArg(val)
  8296  		v.AddArg(mem)
  8297  		return true
  8298  	}
  8299  	// match: (MOVBstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  8300  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  8301  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8302  	for {
  8303  		off1 := v.AuxInt
  8304  		sym1 := v.Aux
  8305  		mem := v.Args[2]
  8306  		p := v.Args[0]
  8307  		if p.Op != OpPPC64MOVDaddr {
  8308  			break
  8309  		}
  8310  		off2 := p.AuxInt
  8311  		sym2 := p.Aux
  8312  		ptr := p.Args[0]
  8313  		val := v.Args[1]
  8314  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  8315  			break
  8316  		}
  8317  		v.reset(OpPPC64MOVBstore)
  8318  		v.AuxInt = off1 + off2
  8319  		v.Aux = mergeSym(sym1, sym2)
  8320  		v.AddArg(ptr)
  8321  		v.AddArg(val)
  8322  		v.AddArg(mem)
  8323  		return true
  8324  	}
  8325  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [0]) mem)
  8326  	// result: (MOVBstorezero [off] {sym} ptr mem)
  8327  	for {
  8328  		off := v.AuxInt
  8329  		sym := v.Aux
  8330  		mem := v.Args[2]
  8331  		ptr := v.Args[0]
  8332  		v_1 := v.Args[1]
  8333  		if v_1.Op != OpPPC64MOVDconst || v_1.AuxInt != 0 {
  8334  			break
  8335  		}
  8336  		v.reset(OpPPC64MOVBstorezero)
  8337  		v.AuxInt = off
  8338  		v.Aux = sym
  8339  		v.AddArg(ptr)
  8340  		v.AddArg(mem)
  8341  		return true
  8342  	}
  8343  	// match: (MOVBstore [off] {sym} p:(ADD ptr idx) val mem)
  8344  	// cond: off == 0 && sym == nil && p.Uses == 1
  8345  	// result: (MOVBstoreidx ptr idx val mem)
  8346  	for {
  8347  		off := v.AuxInt
  8348  		sym := v.Aux
  8349  		mem := v.Args[2]
  8350  		p := v.Args[0]
  8351  		if p.Op != OpPPC64ADD {
  8352  			break
  8353  		}
  8354  		idx := p.Args[1]
  8355  		ptr := p.Args[0]
  8356  		val := v.Args[1]
  8357  		if !(off == 0 && sym == nil && p.Uses == 1) {
  8358  			break
  8359  		}
  8360  		v.reset(OpPPC64MOVBstoreidx)
  8361  		v.AddArg(ptr)
  8362  		v.AddArg(idx)
  8363  		v.AddArg(val)
  8364  		v.AddArg(mem)
  8365  		return true
  8366  	}
  8367  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8368  	// result: (MOVBstore [off] {sym} ptr x mem)
  8369  	for {
  8370  		off := v.AuxInt
  8371  		sym := v.Aux
  8372  		mem := v.Args[2]
  8373  		ptr := v.Args[0]
  8374  		v_1 := v.Args[1]
  8375  		if v_1.Op != OpPPC64MOVBreg {
  8376  			break
  8377  		}
  8378  		x := v_1.Args[0]
  8379  		v.reset(OpPPC64MOVBstore)
  8380  		v.AuxInt = off
  8381  		v.Aux = sym
  8382  		v.AddArg(ptr)
  8383  		v.AddArg(x)
  8384  		v.AddArg(mem)
  8385  		return true
  8386  	}
  8387  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8388  	// result: (MOVBstore [off] {sym} ptr x mem)
  8389  	for {
  8390  		off := v.AuxInt
  8391  		sym := v.Aux
  8392  		mem := v.Args[2]
  8393  		ptr := v.Args[0]
  8394  		v_1 := v.Args[1]
  8395  		if v_1.Op != OpPPC64MOVBZreg {
  8396  			break
  8397  		}
  8398  		x := v_1.Args[0]
  8399  		v.reset(OpPPC64MOVBstore)
  8400  		v.AuxInt = off
  8401  		v.Aux = sym
  8402  		v.AddArg(ptr)
  8403  		v.AddArg(x)
  8404  		v.AddArg(mem)
  8405  		return true
  8406  	}
  8407  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  8408  	// result: (MOVBstore [off] {sym} ptr x mem)
  8409  	for {
  8410  		off := v.AuxInt
  8411  		sym := v.Aux
  8412  		mem := v.Args[2]
  8413  		ptr := v.Args[0]
  8414  		v_1 := v.Args[1]
  8415  		if v_1.Op != OpPPC64MOVHreg {
  8416  			break
  8417  		}
  8418  		x := v_1.Args[0]
  8419  		v.reset(OpPPC64MOVBstore)
  8420  		v.AuxInt = off
  8421  		v.Aux = sym
  8422  		v.AddArg(ptr)
  8423  		v.AddArg(x)
  8424  		v.AddArg(mem)
  8425  		return true
  8426  	}
  8427  	// match: (MOVBstore [off] {sym} ptr (MOVHZreg x) mem)
  8428  	// result: (MOVBstore [off] {sym} ptr x mem)
  8429  	for {
  8430  		off := v.AuxInt
  8431  		sym := v.Aux
  8432  		mem := v.Args[2]
  8433  		ptr := v.Args[0]
  8434  		v_1 := v.Args[1]
  8435  		if v_1.Op != OpPPC64MOVHZreg {
  8436  			break
  8437  		}
  8438  		x := v_1.Args[0]
  8439  		v.reset(OpPPC64MOVBstore)
  8440  		v.AuxInt = off
  8441  		v.Aux = sym
  8442  		v.AddArg(ptr)
  8443  		v.AddArg(x)
  8444  		v.AddArg(mem)
  8445  		return true
  8446  	}
  8447  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  8448  	// result: (MOVBstore [off] {sym} ptr x mem)
  8449  	for {
  8450  		off := v.AuxInt
  8451  		sym := v.Aux
  8452  		mem := v.Args[2]
  8453  		ptr := v.Args[0]
  8454  		v_1 := v.Args[1]
  8455  		if v_1.Op != OpPPC64MOVWreg {
  8456  			break
  8457  		}
  8458  		x := v_1.Args[0]
  8459  		v.reset(OpPPC64MOVBstore)
  8460  		v.AuxInt = off
  8461  		v.Aux = sym
  8462  		v.AddArg(ptr)
  8463  		v.AddArg(x)
  8464  		v.AddArg(mem)
  8465  		return true
  8466  	}
  8467  	// match: (MOVBstore [off] {sym} ptr (MOVWZreg x) mem)
  8468  	// result: (MOVBstore [off] {sym} ptr x mem)
  8469  	for {
  8470  		off := v.AuxInt
  8471  		sym := v.Aux
  8472  		mem := v.Args[2]
  8473  		ptr := v.Args[0]
  8474  		v_1 := v.Args[1]
  8475  		if v_1.Op != OpPPC64MOVWZreg {
  8476  			break
  8477  		}
  8478  		x := v_1.Args[0]
  8479  		v.reset(OpPPC64MOVBstore)
  8480  		v.AuxInt = off
  8481  		v.Aux = sym
  8482  		v.AddArg(ptr)
  8483  		v.AddArg(x)
  8484  		v.AddArg(mem)
  8485  		return true
  8486  	}
  8487  	return false
  8488  }
  8489  func rewriteValuePPC64_OpPPC64MOVBstore_10(v *Value) bool {
  8490  	b := v.Block
  8491  	config := b.Func.Config
  8492  	typ := &b.Func.Config.Types
  8493  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHreg x) [c]) mem)
  8494  	// cond: c <= 8
  8495  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8496  	for {
  8497  		off := v.AuxInt
  8498  		sym := v.Aux
  8499  		mem := v.Args[2]
  8500  		ptr := v.Args[0]
  8501  		v_1 := v.Args[1]
  8502  		if v_1.Op != OpPPC64SRWconst {
  8503  			break
  8504  		}
  8505  		c := v_1.AuxInt
  8506  		v_1_0 := v_1.Args[0]
  8507  		if v_1_0.Op != OpPPC64MOVHreg {
  8508  			break
  8509  		}
  8510  		x := v_1_0.Args[0]
  8511  		if !(c <= 8) {
  8512  			break
  8513  		}
  8514  		v.reset(OpPPC64MOVBstore)
  8515  		v.AuxInt = off
  8516  		v.Aux = sym
  8517  		v.AddArg(ptr)
  8518  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8519  		v0.AuxInt = c
  8520  		v0.AddArg(x)
  8521  		v.AddArg(v0)
  8522  		v.AddArg(mem)
  8523  		return true
  8524  	}
  8525  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHZreg x) [c]) mem)
  8526  	// cond: c <= 8
  8527  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8528  	for {
  8529  		off := v.AuxInt
  8530  		sym := v.Aux
  8531  		mem := v.Args[2]
  8532  		ptr := v.Args[0]
  8533  		v_1 := v.Args[1]
  8534  		if v_1.Op != OpPPC64SRWconst {
  8535  			break
  8536  		}
  8537  		c := v_1.AuxInt
  8538  		v_1_0 := v_1.Args[0]
  8539  		if v_1_0.Op != OpPPC64MOVHZreg {
  8540  			break
  8541  		}
  8542  		x := v_1_0.Args[0]
  8543  		if !(c <= 8) {
  8544  			break
  8545  		}
  8546  		v.reset(OpPPC64MOVBstore)
  8547  		v.AuxInt = off
  8548  		v.Aux = sym
  8549  		v.AddArg(ptr)
  8550  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8551  		v0.AuxInt = c
  8552  		v0.AddArg(x)
  8553  		v.AddArg(v0)
  8554  		v.AddArg(mem)
  8555  		return true
  8556  	}
  8557  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWreg x) [c]) mem)
  8558  	// cond: c <= 24
  8559  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8560  	for {
  8561  		off := v.AuxInt
  8562  		sym := v.Aux
  8563  		mem := v.Args[2]
  8564  		ptr := v.Args[0]
  8565  		v_1 := v.Args[1]
  8566  		if v_1.Op != OpPPC64SRWconst {
  8567  			break
  8568  		}
  8569  		c := v_1.AuxInt
  8570  		v_1_0 := v_1.Args[0]
  8571  		if v_1_0.Op != OpPPC64MOVWreg {
  8572  			break
  8573  		}
  8574  		x := v_1_0.Args[0]
  8575  		if !(c <= 24) {
  8576  			break
  8577  		}
  8578  		v.reset(OpPPC64MOVBstore)
  8579  		v.AuxInt = off
  8580  		v.Aux = sym
  8581  		v.AddArg(ptr)
  8582  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8583  		v0.AuxInt = c
  8584  		v0.AddArg(x)
  8585  		v.AddArg(v0)
  8586  		v.AddArg(mem)
  8587  		return true
  8588  	}
  8589  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWZreg x) [c]) mem)
  8590  	// cond: c <= 24
  8591  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8592  	for {
  8593  		off := v.AuxInt
  8594  		sym := v.Aux
  8595  		mem := v.Args[2]
  8596  		ptr := v.Args[0]
  8597  		v_1 := v.Args[1]
  8598  		if v_1.Op != OpPPC64SRWconst {
  8599  			break
  8600  		}
  8601  		c := v_1.AuxInt
  8602  		v_1_0 := v_1.Args[0]
  8603  		if v_1_0.Op != OpPPC64MOVWZreg {
  8604  			break
  8605  		}
  8606  		x := v_1_0.Args[0]
  8607  		if !(c <= 24) {
  8608  			break
  8609  		}
  8610  		v.reset(OpPPC64MOVBstore)
  8611  		v.AuxInt = off
  8612  		v.Aux = sym
  8613  		v.AddArg(ptr)
  8614  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8615  		v0.AuxInt = c
  8616  		v0.AddArg(x)
  8617  		v.AddArg(v0)
  8618  		v.AddArg(mem)
  8619  		return true
  8620  	}
  8621  	// match: (MOVBstore [i1] {s} p (SRWconst w [24]) x0:(MOVBstore [i0] {s} p (SRWconst w [16]) mem))
  8622  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8623  	// result: (MOVHstore [i0] {s} p (SRWconst <typ.UInt16> w [16]) mem)
  8624  	for {
  8625  		i1 := v.AuxInt
  8626  		s := v.Aux
  8627  		_ = v.Args[2]
  8628  		p := v.Args[0]
  8629  		v_1 := v.Args[1]
  8630  		if v_1.Op != OpPPC64SRWconst || v_1.AuxInt != 24 {
  8631  			break
  8632  		}
  8633  		w := v_1.Args[0]
  8634  		x0 := v.Args[2]
  8635  		if x0.Op != OpPPC64MOVBstore {
  8636  			break
  8637  		}
  8638  		i0 := x0.AuxInt
  8639  		if x0.Aux != s {
  8640  			break
  8641  		}
  8642  		mem := x0.Args[2]
  8643  		if p != x0.Args[0] {
  8644  			break
  8645  		}
  8646  		x0_1 := x0.Args[1]
  8647  		if x0_1.Op != OpPPC64SRWconst || x0_1.AuxInt != 16 || w != x0_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8648  			break
  8649  		}
  8650  		v.reset(OpPPC64MOVHstore)
  8651  		v.AuxInt = i0
  8652  		v.Aux = s
  8653  		v.AddArg(p)
  8654  		v0 := b.NewValue0(x0.Pos, OpPPC64SRWconst, typ.UInt16)
  8655  		v0.AuxInt = 16
  8656  		v0.AddArg(w)
  8657  		v.AddArg(v0)
  8658  		v.AddArg(mem)
  8659  		return true
  8660  	}
  8661  	// match: (MOVBstore [i1] {s} p (SRDconst w [24]) x0:(MOVBstore [i0] {s} p (SRDconst w [16]) mem))
  8662  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8663  	// result: (MOVHstore [i0] {s} p (SRWconst <typ.UInt16> w [16]) mem)
  8664  	for {
  8665  		i1 := v.AuxInt
  8666  		s := v.Aux
  8667  		_ = v.Args[2]
  8668  		p := v.Args[0]
  8669  		v_1 := v.Args[1]
  8670  		if v_1.Op != OpPPC64SRDconst || v_1.AuxInt != 24 {
  8671  			break
  8672  		}
  8673  		w := v_1.Args[0]
  8674  		x0 := v.Args[2]
  8675  		if x0.Op != OpPPC64MOVBstore {
  8676  			break
  8677  		}
  8678  		i0 := x0.AuxInt
  8679  		if x0.Aux != s {
  8680  			break
  8681  		}
  8682  		mem := x0.Args[2]
  8683  		if p != x0.Args[0] {
  8684  			break
  8685  		}
  8686  		x0_1 := x0.Args[1]
  8687  		if x0_1.Op != OpPPC64SRDconst || x0_1.AuxInt != 16 || w != x0_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8688  			break
  8689  		}
  8690  		v.reset(OpPPC64MOVHstore)
  8691  		v.AuxInt = i0
  8692  		v.Aux = s
  8693  		v.AddArg(p)
  8694  		v0 := b.NewValue0(x0.Pos, OpPPC64SRWconst, typ.UInt16)
  8695  		v0.AuxInt = 16
  8696  		v0.AddArg(w)
  8697  		v.AddArg(v0)
  8698  		v.AddArg(mem)
  8699  		return true
  8700  	}
  8701  	// match: (MOVBstore [i1] {s} p (SRWconst w [8]) x0:(MOVBstore [i0] {s} p w mem))
  8702  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8703  	// result: (MOVHstore [i0] {s} p w mem)
  8704  	for {
  8705  		i1 := v.AuxInt
  8706  		s := v.Aux
  8707  		_ = v.Args[2]
  8708  		p := v.Args[0]
  8709  		v_1 := v.Args[1]
  8710  		if v_1.Op != OpPPC64SRWconst || v_1.AuxInt != 8 {
  8711  			break
  8712  		}
  8713  		w := v_1.Args[0]
  8714  		x0 := v.Args[2]
  8715  		if x0.Op != OpPPC64MOVBstore {
  8716  			break
  8717  		}
  8718  		i0 := x0.AuxInt
  8719  		if x0.Aux != s {
  8720  			break
  8721  		}
  8722  		mem := x0.Args[2]
  8723  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8724  			break
  8725  		}
  8726  		v.reset(OpPPC64MOVHstore)
  8727  		v.AuxInt = i0
  8728  		v.Aux = s
  8729  		v.AddArg(p)
  8730  		v.AddArg(w)
  8731  		v.AddArg(mem)
  8732  		return true
  8733  	}
  8734  	// match: (MOVBstore [i1] {s} p (SRDconst w [8]) x0:(MOVBstore [i0] {s} p w mem))
  8735  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8736  	// result: (MOVHstore [i0] {s} p w mem)
  8737  	for {
  8738  		i1 := v.AuxInt
  8739  		s := v.Aux
  8740  		_ = v.Args[2]
  8741  		p := v.Args[0]
  8742  		v_1 := v.Args[1]
  8743  		if v_1.Op != OpPPC64SRDconst || v_1.AuxInt != 8 {
  8744  			break
  8745  		}
  8746  		w := v_1.Args[0]
  8747  		x0 := v.Args[2]
  8748  		if x0.Op != OpPPC64MOVBstore {
  8749  			break
  8750  		}
  8751  		i0 := x0.AuxInt
  8752  		if x0.Aux != s {
  8753  			break
  8754  		}
  8755  		mem := x0.Args[2]
  8756  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8757  			break
  8758  		}
  8759  		v.reset(OpPPC64MOVHstore)
  8760  		v.AuxInt = i0
  8761  		v.Aux = s
  8762  		v.AddArg(p)
  8763  		v.AddArg(w)
  8764  		v.AddArg(mem)
  8765  		return true
  8766  	}
  8767  	// match: (MOVBstore [i3] {s} p w x0:(MOVBstore [i2] {s} p (SRWconst w [8]) x1:(MOVBstore [i1] {s} p (SRWconst w [16]) x2:(MOVBstore [i0] {s} p (SRWconst w [24]) mem))))
  8768  	// cond: !config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && clobber(x0) && clobber(x1) && clobber(x2)
  8769  	// result: (MOVWBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  8770  	for {
  8771  		i3 := v.AuxInt
  8772  		s := v.Aux
  8773  		_ = v.Args[2]
  8774  		p := v.Args[0]
  8775  		w := v.Args[1]
  8776  		x0 := v.Args[2]
  8777  		if x0.Op != OpPPC64MOVBstore {
  8778  			break
  8779  		}
  8780  		i2 := x0.AuxInt
  8781  		if x0.Aux != s {
  8782  			break
  8783  		}
  8784  		_ = x0.Args[2]
  8785  		if p != x0.Args[0] {
  8786  			break
  8787  		}
  8788  		x0_1 := x0.Args[1]
  8789  		if x0_1.Op != OpPPC64SRWconst || x0_1.AuxInt != 8 || w != x0_1.Args[0] {
  8790  			break
  8791  		}
  8792  		x1 := x0.Args[2]
  8793  		if x1.Op != OpPPC64MOVBstore {
  8794  			break
  8795  		}
  8796  		i1 := x1.AuxInt
  8797  		if x1.Aux != s {
  8798  			break
  8799  		}
  8800  		_ = x1.Args[2]
  8801  		if p != x1.Args[0] {
  8802  			break
  8803  		}
  8804  		x1_1 := x1.Args[1]
  8805  		if x1_1.Op != OpPPC64SRWconst || x1_1.AuxInt != 16 || w != x1_1.Args[0] {
  8806  			break
  8807  		}
  8808  		x2 := x1.Args[2]
  8809  		if x2.Op != OpPPC64MOVBstore {
  8810  			break
  8811  		}
  8812  		i0 := x2.AuxInt
  8813  		if x2.Aux != s {
  8814  			break
  8815  		}
  8816  		mem := x2.Args[2]
  8817  		if p != x2.Args[0] {
  8818  			break
  8819  		}
  8820  		x2_1 := x2.Args[1]
  8821  		if x2_1.Op != OpPPC64SRWconst || x2_1.AuxInt != 24 || w != x2_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && clobber(x0) && clobber(x1) && clobber(x2)) {
  8822  			break
  8823  		}
  8824  		v.reset(OpPPC64MOVWBRstore)
  8825  		v0 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  8826  		v0.AuxInt = i0
  8827  		v0.Aux = s
  8828  		v0.AddArg(p)
  8829  		v.AddArg(v0)
  8830  		v.AddArg(w)
  8831  		v.AddArg(mem)
  8832  		return true
  8833  	}
  8834  	// match: (MOVBstore [i1] {s} p w x0:(MOVBstore [i0] {s} p (SRWconst w [8]) mem))
  8835  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8836  	// result: (MOVHBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  8837  	for {
  8838  		i1 := v.AuxInt
  8839  		s := v.Aux
  8840  		_ = v.Args[2]
  8841  		p := v.Args[0]
  8842  		w := v.Args[1]
  8843  		x0 := v.Args[2]
  8844  		if x0.Op != OpPPC64MOVBstore {
  8845  			break
  8846  		}
  8847  		i0 := x0.AuxInt
  8848  		if x0.Aux != s {
  8849  			break
  8850  		}
  8851  		mem := x0.Args[2]
  8852  		if p != x0.Args[0] {
  8853  			break
  8854  		}
  8855  		x0_1 := x0.Args[1]
  8856  		if x0_1.Op != OpPPC64SRWconst || x0_1.AuxInt != 8 || w != x0_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8857  			break
  8858  		}
  8859  		v.reset(OpPPC64MOVHBRstore)
  8860  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  8861  		v0.AuxInt = i0
  8862  		v0.Aux = s
  8863  		v0.AddArg(p)
  8864  		v.AddArg(v0)
  8865  		v.AddArg(w)
  8866  		v.AddArg(mem)
  8867  		return true
  8868  	}
  8869  	return false
  8870  }
  8871  func rewriteValuePPC64_OpPPC64MOVBstore_20(v *Value) bool {
  8872  	b := v.Block
  8873  	config := b.Func.Config
  8874  	typ := &b.Func.Config.Types
  8875  	// match: (MOVBstore [i7] {s} p (SRDconst w [56]) x0:(MOVBstore [i6] {s} p (SRDconst w [48]) x1:(MOVBstore [i5] {s} p (SRDconst w [40]) x2:(MOVBstore [i4] {s} p (SRDconst w [32]) x3:(MOVWstore [i0] {s} p w mem)))))
  8876  	// cond: !config.BigEndian && i0%4 == 0 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0) && clobber(x1) && clobber(x2) && clobber(x3)
  8877  	// result: (MOVDstore [i0] {s} p w mem)
  8878  	for {
  8879  		i7 := v.AuxInt
  8880  		s := v.Aux
  8881  		_ = v.Args[2]
  8882  		p := v.Args[0]
  8883  		v_1 := v.Args[1]
  8884  		if v_1.Op != OpPPC64SRDconst || v_1.AuxInt != 56 {
  8885  			break
  8886  		}
  8887  		w := v_1.Args[0]
  8888  		x0 := v.Args[2]
  8889  		if x0.Op != OpPPC64MOVBstore {
  8890  			break
  8891  		}
  8892  		i6 := x0.AuxInt
  8893  		if x0.Aux != s {
  8894  			break
  8895  		}
  8896  		_ = x0.Args[2]
  8897  		if p != x0.Args[0] {
  8898  			break
  8899  		}
  8900  		x0_1 := x0.Args[1]
  8901  		if x0_1.Op != OpPPC64SRDconst || x0_1.AuxInt != 48 || w != x0_1.Args[0] {
  8902  			break
  8903  		}
  8904  		x1 := x0.Args[2]
  8905  		if x1.Op != OpPPC64MOVBstore {
  8906  			break
  8907  		}
  8908  		i5 := x1.AuxInt
  8909  		if x1.Aux != s {
  8910  			break
  8911  		}
  8912  		_ = x1.Args[2]
  8913  		if p != x1.Args[0] {
  8914  			break
  8915  		}
  8916  		x1_1 := x1.Args[1]
  8917  		if x1_1.Op != OpPPC64SRDconst || x1_1.AuxInt != 40 || w != x1_1.Args[0] {
  8918  			break
  8919  		}
  8920  		x2 := x1.Args[2]
  8921  		if x2.Op != OpPPC64MOVBstore {
  8922  			break
  8923  		}
  8924  		i4 := x2.AuxInt
  8925  		if x2.Aux != s {
  8926  			break
  8927  		}
  8928  		_ = x2.Args[2]
  8929  		if p != x2.Args[0] {
  8930  			break
  8931  		}
  8932  		x2_1 := x2.Args[1]
  8933  		if x2_1.Op != OpPPC64SRDconst || x2_1.AuxInt != 32 || w != x2_1.Args[0] {
  8934  			break
  8935  		}
  8936  		x3 := x2.Args[2]
  8937  		if x3.Op != OpPPC64MOVWstore {
  8938  			break
  8939  		}
  8940  		i0 := x3.AuxInt
  8941  		if x3.Aux != s {
  8942  			break
  8943  		}
  8944  		mem := x3.Args[2]
  8945  		if p != x3.Args[0] || w != x3.Args[1] || !(!config.BigEndian && i0%4 == 0 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0) && clobber(x1) && clobber(x2) && clobber(x3)) {
  8946  			break
  8947  		}
  8948  		v.reset(OpPPC64MOVDstore)
  8949  		v.AuxInt = i0
  8950  		v.Aux = s
  8951  		v.AddArg(p)
  8952  		v.AddArg(w)
  8953  		v.AddArg(mem)
  8954  		return true
  8955  	}
  8956  	// match: (MOVBstore [i7] {s} p w x0:(MOVBstore [i6] {s} p (SRDconst w [8]) x1:(MOVBstore [i5] {s} p (SRDconst w [16]) x2:(MOVBstore [i4] {s} p (SRDconst w [24]) x3:(MOVBstore [i3] {s} p (SRDconst w [32]) x4:(MOVBstore [i2] {s} p (SRDconst w [40]) x5:(MOVBstore [i1] {s} p (SRDconst w [48]) x6:(MOVBstore [i0] {s} p (SRDconst w [56]) mem))))))))
  8957  	// cond: !config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0) && clobber(x1) && clobber(x2) && clobber(x3) && clobber(x4) && clobber(x5) && clobber(x6)
  8958  	// result: (MOVDBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  8959  	for {
  8960  		i7 := v.AuxInt
  8961  		s := v.Aux
  8962  		_ = v.Args[2]
  8963  		p := v.Args[0]
  8964  		w := v.Args[1]
  8965  		x0 := v.Args[2]
  8966  		if x0.Op != OpPPC64MOVBstore {
  8967  			break
  8968  		}
  8969  		i6 := x0.AuxInt
  8970  		if x0.Aux != s {
  8971  			break
  8972  		}
  8973  		_ = x0.Args[2]
  8974  		if p != x0.Args[0] {
  8975  			break
  8976  		}
  8977  		x0_1 := x0.Args[1]
  8978  		if x0_1.Op != OpPPC64SRDconst || x0_1.AuxInt != 8 || w != x0_1.Args[0] {
  8979  			break
  8980  		}
  8981  		x1 := x0.Args[2]
  8982  		if x1.Op != OpPPC64MOVBstore {
  8983  			break
  8984  		}
  8985  		i5 := x1.AuxInt
  8986  		if x1.Aux != s {
  8987  			break
  8988  		}
  8989  		_ = x1.Args[2]
  8990  		if p != x1.Args[0] {
  8991  			break
  8992  		}
  8993  		x1_1 := x1.Args[1]
  8994  		if x1_1.Op != OpPPC64SRDconst || x1_1.AuxInt != 16 || w != x1_1.Args[0] {
  8995  			break
  8996  		}
  8997  		x2 := x1.Args[2]
  8998  		if x2.Op != OpPPC64MOVBstore {
  8999  			break
  9000  		}
  9001  		i4 := x2.AuxInt
  9002  		if x2.Aux != s {
  9003  			break
  9004  		}
  9005  		_ = x2.Args[2]
  9006  		if p != x2.Args[0] {
  9007  			break
  9008  		}
  9009  		x2_1 := x2.Args[1]
  9010  		if x2_1.Op != OpPPC64SRDconst || x2_1.AuxInt != 24 || w != x2_1.Args[0] {
  9011  			break
  9012  		}
  9013  		x3 := x2.Args[2]
  9014  		if x3.Op != OpPPC64MOVBstore {
  9015  			break
  9016  		}
  9017  		i3 := x3.AuxInt
  9018  		if x3.Aux != s {
  9019  			break
  9020  		}
  9021  		_ = x3.Args[2]
  9022  		if p != x3.Args[0] {
  9023  			break
  9024  		}
  9025  		x3_1 := x3.Args[1]
  9026  		if x3_1.Op != OpPPC64SRDconst || x3_1.AuxInt != 32 || w != x3_1.Args[0] {
  9027  			break
  9028  		}
  9029  		x4 := x3.Args[2]
  9030  		if x4.Op != OpPPC64MOVBstore {
  9031  			break
  9032  		}
  9033  		i2 := x4.AuxInt
  9034  		if x4.Aux != s {
  9035  			break
  9036  		}
  9037  		_ = x4.Args[2]
  9038  		if p != x4.Args[0] {
  9039  			break
  9040  		}
  9041  		x4_1 := x4.Args[1]
  9042  		if x4_1.Op != OpPPC64SRDconst || x4_1.AuxInt != 40 || w != x4_1.Args[0] {
  9043  			break
  9044  		}
  9045  		x5 := x4.Args[2]
  9046  		if x5.Op != OpPPC64MOVBstore {
  9047  			break
  9048  		}
  9049  		i1 := x5.AuxInt
  9050  		if x5.Aux != s {
  9051  			break
  9052  		}
  9053  		_ = x5.Args[2]
  9054  		if p != x5.Args[0] {
  9055  			break
  9056  		}
  9057  		x5_1 := x5.Args[1]
  9058  		if x5_1.Op != OpPPC64SRDconst || x5_1.AuxInt != 48 || w != x5_1.Args[0] {
  9059  			break
  9060  		}
  9061  		x6 := x5.Args[2]
  9062  		if x6.Op != OpPPC64MOVBstore {
  9063  			break
  9064  		}
  9065  		i0 := x6.AuxInt
  9066  		if x6.Aux != s {
  9067  			break
  9068  		}
  9069  		mem := x6.Args[2]
  9070  		if p != x6.Args[0] {
  9071  			break
  9072  		}
  9073  		x6_1 := x6.Args[1]
  9074  		if x6_1.Op != OpPPC64SRDconst || x6_1.AuxInt != 56 || w != x6_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0) && clobber(x1) && clobber(x2) && clobber(x3) && clobber(x4) && clobber(x5) && clobber(x6)) {
  9075  			break
  9076  		}
  9077  		v.reset(OpPPC64MOVDBRstore)
  9078  		v0 := b.NewValue0(x6.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  9079  		v0.AuxInt = i0
  9080  		v0.Aux = s
  9081  		v0.AddArg(p)
  9082  		v.AddArg(v0)
  9083  		v.AddArg(w)
  9084  		v.AddArg(mem)
  9085  		return true
  9086  	}
  9087  	return false
  9088  }
  9089  func rewriteValuePPC64_OpPPC64MOVBstoreidx_0(v *Value) bool {
  9090  	b := v.Block
  9091  	typ := &b.Func.Config.Types
  9092  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  9093  	// cond: is16Bit(c)
  9094  	// result: (MOVBstore [c] ptr val mem)
  9095  	for {
  9096  		mem := v.Args[3]
  9097  		ptr := v.Args[0]
  9098  		v_1 := v.Args[1]
  9099  		if v_1.Op != OpPPC64MOVDconst {
  9100  			break
  9101  		}
  9102  		c := v_1.AuxInt
  9103  		val := v.Args[2]
  9104  		if !(is16Bit(c)) {
  9105  			break
  9106  		}
  9107  		v.reset(OpPPC64MOVBstore)
  9108  		v.AuxInt = c
  9109  		v.AddArg(ptr)
  9110  		v.AddArg(val)
  9111  		v.AddArg(mem)
  9112  		return true
  9113  	}
  9114  	// match: (MOVBstoreidx (MOVDconst [c]) ptr val mem)
  9115  	// cond: is16Bit(c)
  9116  	// result: (MOVBstore [c] ptr val mem)
  9117  	for {
  9118  		mem := v.Args[3]
  9119  		v_0 := v.Args[0]
  9120  		if v_0.Op != OpPPC64MOVDconst {
  9121  			break
  9122  		}
  9123  		c := v_0.AuxInt
  9124  		ptr := v.Args[1]
  9125  		val := v.Args[2]
  9126  		if !(is16Bit(c)) {
  9127  			break
  9128  		}
  9129  		v.reset(OpPPC64MOVBstore)
  9130  		v.AuxInt = c
  9131  		v.AddArg(ptr)
  9132  		v.AddArg(val)
  9133  		v.AddArg(mem)
  9134  		return true
  9135  	}
  9136  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVBreg x) mem)
  9137  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9138  	for {
  9139  		off := v.AuxInt
  9140  		sym := v.Aux
  9141  		mem := v.Args[3]
  9142  		ptr := v.Args[0]
  9143  		idx := v.Args[1]
  9144  		v_2 := v.Args[2]
  9145  		if v_2.Op != OpPPC64MOVBreg {
  9146  			break
  9147  		}
  9148  		x := v_2.Args[0]
  9149  		v.reset(OpPPC64MOVBstoreidx)
  9150  		v.AuxInt = off
  9151  		v.Aux = sym
  9152  		v.AddArg(ptr)
  9153  		v.AddArg(idx)
  9154  		v.AddArg(x)
  9155  		v.AddArg(mem)
  9156  		return true
  9157  	}
  9158  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVBZreg x) mem)
  9159  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9160  	for {
  9161  		off := v.AuxInt
  9162  		sym := v.Aux
  9163  		mem := v.Args[3]
  9164  		ptr := v.Args[0]
  9165  		idx := v.Args[1]
  9166  		v_2 := v.Args[2]
  9167  		if v_2.Op != OpPPC64MOVBZreg {
  9168  			break
  9169  		}
  9170  		x := v_2.Args[0]
  9171  		v.reset(OpPPC64MOVBstoreidx)
  9172  		v.AuxInt = off
  9173  		v.Aux = sym
  9174  		v.AddArg(ptr)
  9175  		v.AddArg(idx)
  9176  		v.AddArg(x)
  9177  		v.AddArg(mem)
  9178  		return true
  9179  	}
  9180  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVHreg x) mem)
  9181  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9182  	for {
  9183  		off := v.AuxInt
  9184  		sym := v.Aux
  9185  		mem := v.Args[3]
  9186  		ptr := v.Args[0]
  9187  		idx := v.Args[1]
  9188  		v_2 := v.Args[2]
  9189  		if v_2.Op != OpPPC64MOVHreg {
  9190  			break
  9191  		}
  9192  		x := v_2.Args[0]
  9193  		v.reset(OpPPC64MOVBstoreidx)
  9194  		v.AuxInt = off
  9195  		v.Aux = sym
  9196  		v.AddArg(ptr)
  9197  		v.AddArg(idx)
  9198  		v.AddArg(x)
  9199  		v.AddArg(mem)
  9200  		return true
  9201  	}
  9202  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVHZreg x) mem)
  9203  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9204  	for {
  9205  		off := v.AuxInt
  9206  		sym := v.Aux
  9207  		mem := v.Args[3]
  9208  		ptr := v.Args[0]
  9209  		idx := v.Args[1]
  9210  		v_2 := v.Args[2]
  9211  		if v_2.Op != OpPPC64MOVHZreg {
  9212  			break
  9213  		}
  9214  		x := v_2.Args[0]
  9215  		v.reset(OpPPC64MOVBstoreidx)
  9216  		v.AuxInt = off
  9217  		v.Aux = sym
  9218  		v.AddArg(ptr)
  9219  		v.AddArg(idx)
  9220  		v.AddArg(x)
  9221  		v.AddArg(mem)
  9222  		return true
  9223  	}
  9224  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVWreg x) mem)
  9225  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9226  	for {
  9227  		off := v.AuxInt
  9228  		sym := v.Aux
  9229  		mem := v.Args[3]
  9230  		ptr := v.Args[0]
  9231  		idx := v.Args[1]
  9232  		v_2 := v.Args[2]
  9233  		if v_2.Op != OpPPC64MOVWreg {
  9234  			break
  9235  		}
  9236  		x := v_2.Args[0]
  9237  		v.reset(OpPPC64MOVBstoreidx)
  9238  		v.AuxInt = off
  9239  		v.Aux = sym
  9240  		v.AddArg(ptr)
  9241  		v.AddArg(idx)
  9242  		v.AddArg(x)
  9243  		v.AddArg(mem)
  9244  		return true
  9245  	}
  9246  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVWZreg x) mem)
  9247  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9248  	for {
  9249  		off := v.AuxInt
  9250  		sym := v.Aux
  9251  		mem := v.Args[3]
  9252  		ptr := v.Args[0]
  9253  		idx := v.Args[1]
  9254  		v_2 := v.Args[2]
  9255  		if v_2.Op != OpPPC64MOVWZreg {
  9256  			break
  9257  		}
  9258  		x := v_2.Args[0]
  9259  		v.reset(OpPPC64MOVBstoreidx)
  9260  		v.AuxInt = off
  9261  		v.Aux = sym
  9262  		v.AddArg(ptr)
  9263  		v.AddArg(idx)
  9264  		v.AddArg(x)
  9265  		v.AddArg(mem)
  9266  		return true
  9267  	}
  9268  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVHreg x) [c]) mem)
  9269  	// cond: c <= 8
  9270  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9271  	for {
  9272  		off := v.AuxInt
  9273  		sym := v.Aux
  9274  		mem := v.Args[3]
  9275  		ptr := v.Args[0]
  9276  		idx := v.Args[1]
  9277  		v_2 := v.Args[2]
  9278  		if v_2.Op != OpPPC64SRWconst {
  9279  			break
  9280  		}
  9281  		c := v_2.AuxInt
  9282  		v_2_0 := v_2.Args[0]
  9283  		if v_2_0.Op != OpPPC64MOVHreg {
  9284  			break
  9285  		}
  9286  		x := v_2_0.Args[0]
  9287  		if !(c <= 8) {
  9288  			break
  9289  		}
  9290  		v.reset(OpPPC64MOVBstoreidx)
  9291  		v.AuxInt = off
  9292  		v.Aux = sym
  9293  		v.AddArg(ptr)
  9294  		v.AddArg(idx)
  9295  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9296  		v0.AuxInt = c
  9297  		v0.AddArg(x)
  9298  		v.AddArg(v0)
  9299  		v.AddArg(mem)
  9300  		return true
  9301  	}
  9302  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVHZreg x) [c]) mem)
  9303  	// cond: c <= 8
  9304  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9305  	for {
  9306  		off := v.AuxInt
  9307  		sym := v.Aux
  9308  		mem := v.Args[3]
  9309  		ptr := v.Args[0]
  9310  		idx := v.Args[1]
  9311  		v_2 := v.Args[2]
  9312  		if v_2.Op != OpPPC64SRWconst {
  9313  			break
  9314  		}
  9315  		c := v_2.AuxInt
  9316  		v_2_0 := v_2.Args[0]
  9317  		if v_2_0.Op != OpPPC64MOVHZreg {
  9318  			break
  9319  		}
  9320  		x := v_2_0.Args[0]
  9321  		if !(c <= 8) {
  9322  			break
  9323  		}
  9324  		v.reset(OpPPC64MOVBstoreidx)
  9325  		v.AuxInt = off
  9326  		v.Aux = sym
  9327  		v.AddArg(ptr)
  9328  		v.AddArg(idx)
  9329  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9330  		v0.AuxInt = c
  9331  		v0.AddArg(x)
  9332  		v.AddArg(v0)
  9333  		v.AddArg(mem)
  9334  		return true
  9335  	}
  9336  	return false
  9337  }
  9338  func rewriteValuePPC64_OpPPC64MOVBstoreidx_10(v *Value) bool {
  9339  	b := v.Block
  9340  	typ := &b.Func.Config.Types
  9341  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVWreg x) [c]) mem)
  9342  	// cond: c <= 24
  9343  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9344  	for {
  9345  		off := v.AuxInt
  9346  		sym := v.Aux
  9347  		mem := v.Args[3]
  9348  		ptr := v.Args[0]
  9349  		idx := v.Args[1]
  9350  		v_2 := v.Args[2]
  9351  		if v_2.Op != OpPPC64SRWconst {
  9352  			break
  9353  		}
  9354  		c := v_2.AuxInt
  9355  		v_2_0 := v_2.Args[0]
  9356  		if v_2_0.Op != OpPPC64MOVWreg {
  9357  			break
  9358  		}
  9359  		x := v_2_0.Args[0]
  9360  		if !(c <= 24) {
  9361  			break
  9362  		}
  9363  		v.reset(OpPPC64MOVBstoreidx)
  9364  		v.AuxInt = off
  9365  		v.Aux = sym
  9366  		v.AddArg(ptr)
  9367  		v.AddArg(idx)
  9368  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9369  		v0.AuxInt = c
  9370  		v0.AddArg(x)
  9371  		v.AddArg(v0)
  9372  		v.AddArg(mem)
  9373  		return true
  9374  	}
  9375  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVWZreg x) [c]) mem)
  9376  	// cond: c <= 24
  9377  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9378  	for {
  9379  		off := v.AuxInt
  9380  		sym := v.Aux
  9381  		mem := v.Args[3]
  9382  		ptr := v.Args[0]
  9383  		idx := v.Args[1]
  9384  		v_2 := v.Args[2]
  9385  		if v_2.Op != OpPPC64SRWconst {
  9386  			break
  9387  		}
  9388  		c := v_2.AuxInt
  9389  		v_2_0 := v_2.Args[0]
  9390  		if v_2_0.Op != OpPPC64MOVWZreg {
  9391  			break
  9392  		}
  9393  		x := v_2_0.Args[0]
  9394  		if !(c <= 24) {
  9395  			break
  9396  		}
  9397  		v.reset(OpPPC64MOVBstoreidx)
  9398  		v.AuxInt = off
  9399  		v.Aux = sym
  9400  		v.AddArg(ptr)
  9401  		v.AddArg(idx)
  9402  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9403  		v0.AuxInt = c
  9404  		v0.AddArg(x)
  9405  		v.AddArg(v0)
  9406  		v.AddArg(mem)
  9407  		return true
  9408  	}
  9409  	return false
  9410  }
  9411  func rewriteValuePPC64_OpPPC64MOVBstorezero_0(v *Value) bool {
  9412  	// match: (MOVBstorezero [off1] {sym} (ADDconst [off2] x) mem)
  9413  	// cond: is16Bit(off1+off2)
  9414  	// result: (MOVBstorezero [off1+off2] {sym} x mem)
  9415  	for {
  9416  		off1 := v.AuxInt
  9417  		sym := v.Aux
  9418  		mem := v.Args[1]
  9419  		v_0 := v.Args[0]
  9420  		if v_0.Op != OpPPC64ADDconst {
  9421  			break
  9422  		}
  9423  		off2 := v_0.AuxInt
  9424  		x := v_0.Args[0]
  9425  		if !(is16Bit(off1 + off2)) {
  9426  			break
  9427  		}
  9428  		v.reset(OpPPC64MOVBstorezero)
  9429  		v.AuxInt = off1 + off2
  9430  		v.Aux = sym
  9431  		v.AddArg(x)
  9432  		v.AddArg(mem)
  9433  		return true
  9434  	}
  9435  	// match: (MOVBstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  9436  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
  9437  	// result: (MOVBstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
  9438  	for {
  9439  		off1 := v.AuxInt
  9440  		sym1 := v.Aux
  9441  		mem := v.Args[1]
  9442  		p := v.Args[0]
  9443  		if p.Op != OpPPC64MOVDaddr {
  9444  			break
  9445  		}
  9446  		off2 := p.AuxInt
  9447  		sym2 := p.Aux
  9448  		x := p.Args[0]
  9449  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
  9450  			break
  9451  		}
  9452  		v.reset(OpPPC64MOVBstorezero)
  9453  		v.AuxInt = off1 + off2
  9454  		v.Aux = mergeSym(sym1, sym2)
  9455  		v.AddArg(x)
  9456  		v.AddArg(mem)
  9457  		return true
  9458  	}
  9459  	return false
  9460  }
  9461  func rewriteValuePPC64_OpPPC64MOVDload_0(v *Value) bool {
  9462  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr x _))
  9463  	// result: (MFVSRD x)
  9464  	for {
  9465  		off := v.AuxInt
  9466  		sym := v.Aux
  9467  		_ = v.Args[1]
  9468  		ptr := v.Args[0]
  9469  		v_1 := v.Args[1]
  9470  		if v_1.Op != OpPPC64FMOVDstore || v_1.AuxInt != off || v_1.Aux != sym {
  9471  			break
  9472  		}
  9473  		_ = v_1.Args[2]
  9474  		if ptr != v_1.Args[0] {
  9475  			break
  9476  		}
  9477  		x := v_1.Args[1]
  9478  		v.reset(OpPPC64MFVSRD)
  9479  		v.AddArg(x)
  9480  		return true
  9481  	}
  9482  	// match: (MOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  9483  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0
  9484  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9485  	for {
  9486  		off1 := v.AuxInt
  9487  		sym1 := v.Aux
  9488  		mem := v.Args[1]
  9489  		p := v.Args[0]
  9490  		if p.Op != OpPPC64MOVDaddr {
  9491  			break
  9492  		}
  9493  		off2 := p.AuxInt
  9494  		sym2 := p.Aux
  9495  		ptr := p.Args[0]
  9496  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0) {
  9497  			break
  9498  		}
  9499  		v.reset(OpPPC64MOVDload)
  9500  		v.AuxInt = off1 + off2
  9501  		v.Aux = mergeSym(sym1, sym2)
  9502  		v.AddArg(ptr)
  9503  		v.AddArg(mem)
  9504  		return true
  9505  	}
  9506  	// match: (MOVDload [off1] {sym} (ADDconst [off2] x) mem)
  9507  	// cond: is16Bit(off1+off2) && (off1+off2)%4 == 0
  9508  	// result: (MOVDload [off1+off2] {sym} x mem)
  9509  	for {
  9510  		off1 := v.AuxInt
  9511  		sym := v.Aux
  9512  		mem := v.Args[1]
  9513  		v_0 := v.Args[0]
  9514  		if v_0.Op != OpPPC64ADDconst {
  9515  			break
  9516  		}
  9517  		off2 := v_0.AuxInt
  9518  		x := v_0.Args[0]
  9519  		if !(is16Bit(off1+off2) && (off1+off2)%4 == 0) {
  9520  			break
  9521  		}
  9522  		v.reset(OpPPC64MOVDload)
  9523  		v.AuxInt = off1 + off2
  9524  		v.Aux = sym
  9525  		v.AddArg(x)
  9526  		v.AddArg(mem)
  9527  		return true
  9528  	}
  9529  	// match: (MOVDload [0] {sym} p:(ADD ptr idx) mem)
  9530  	// cond: sym == nil && p.Uses == 1
  9531  	// result: (MOVDloadidx ptr idx mem)
  9532  	for {
  9533  		if v.AuxInt != 0 {
  9534  			break
  9535  		}
  9536  		sym := v.Aux
  9537  		mem := v.Args[1]
  9538  		p := v.Args[0]
  9539  		if p.Op != OpPPC64ADD {
  9540  			break
  9541  		}
  9542  		idx := p.Args[1]
  9543  		ptr := p.Args[0]
  9544  		if !(sym == nil && p.Uses == 1) {
  9545  			break
  9546  		}
  9547  		v.reset(OpPPC64MOVDloadidx)
  9548  		v.AddArg(ptr)
  9549  		v.AddArg(idx)
  9550  		v.AddArg(mem)
  9551  		return true
  9552  	}
  9553  	return false
  9554  }
  9555  func rewriteValuePPC64_OpPPC64MOVDloadidx_0(v *Value) bool {
  9556  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9557  	// cond: is16Bit(c) && c%4 == 0
  9558  	// result: (MOVDload [c] ptr mem)
  9559  	for {
  9560  		mem := v.Args[2]
  9561  		ptr := v.Args[0]
  9562  		v_1 := v.Args[1]
  9563  		if v_1.Op != OpPPC64MOVDconst {
  9564  			break
  9565  		}
  9566  		c := v_1.AuxInt
  9567  		if !(is16Bit(c) && c%4 == 0) {
  9568  			break
  9569  		}
  9570  		v.reset(OpPPC64MOVDload)
  9571  		v.AuxInt = c
  9572  		v.AddArg(ptr)
  9573  		v.AddArg(mem)
  9574  		return true
  9575  	}
  9576  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9577  	// cond: is16Bit(c) && c%4 == 0
  9578  	// result: (MOVDload [c] ptr mem)
  9579  	for {
  9580  		mem := v.Args[2]
  9581  		v_0 := v.Args[0]
  9582  		if v_0.Op != OpPPC64MOVDconst {
  9583  			break
  9584  		}
  9585  		c := v_0.AuxInt
  9586  		ptr := v.Args[1]
  9587  		if !(is16Bit(c) && c%4 == 0) {
  9588  			break
  9589  		}
  9590  		v.reset(OpPPC64MOVDload)
  9591  		v.AuxInt = c
  9592  		v.AddArg(ptr)
  9593  		v.AddArg(mem)
  9594  		return true
  9595  	}
  9596  	return false
  9597  }
  9598  func rewriteValuePPC64_OpPPC64MOVDstore_0(v *Value) bool {
  9599  	// match: (MOVDstore [off] {sym} ptr (MFVSRD x) mem)
  9600  	// result: (FMOVDstore [off] {sym} ptr x mem)
  9601  	for {
  9602  		off := v.AuxInt
  9603  		sym := v.Aux
  9604  		mem := v.Args[2]
  9605  		ptr := v.Args[0]
  9606  		v_1 := v.Args[1]
  9607  		if v_1.Op != OpPPC64MFVSRD {
  9608  			break
  9609  		}
  9610  		x := v_1.Args[0]
  9611  		v.reset(OpPPC64FMOVDstore)
  9612  		v.AuxInt = off
  9613  		v.Aux = sym
  9614  		v.AddArg(ptr)
  9615  		v.AddArg(x)
  9616  		v.AddArg(mem)
  9617  		return true
  9618  	}
  9619  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] x) val mem)
  9620  	// cond: is16Bit(off1+off2) && (off1+off2)%4 == 0
  9621  	// result: (MOVDstore [off1+off2] {sym} x val mem)
  9622  	for {
  9623  		off1 := v.AuxInt
  9624  		sym := v.Aux
  9625  		mem := v.Args[2]
  9626  		v_0 := v.Args[0]
  9627  		if v_0.Op != OpPPC64ADDconst {
  9628  			break
  9629  		}
  9630  		off2 := v_0.AuxInt
  9631  		x := v_0.Args[0]
  9632  		val := v.Args[1]
  9633  		if !(is16Bit(off1+off2) && (off1+off2)%4 == 0) {
  9634  			break
  9635  		}
  9636  		v.reset(OpPPC64MOVDstore)
  9637  		v.AuxInt = off1 + off2
  9638  		v.Aux = sym
  9639  		v.AddArg(x)
  9640  		v.AddArg(val)
  9641  		v.AddArg(mem)
  9642  		return true
  9643  	}
  9644  	// match: (MOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  9645  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0
  9646  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9647  	for {
  9648  		off1 := v.AuxInt
  9649  		sym1 := v.Aux
  9650  		mem := v.Args[2]
  9651  		p := v.Args[0]
  9652  		if p.Op != OpPPC64MOVDaddr {
  9653  			break
  9654  		}
  9655  		off2 := p.AuxInt
  9656  		sym2 := p.Aux
  9657  		ptr := p.Args[0]
  9658  		val := v.Args[1]
  9659  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0) {
  9660  			break
  9661  		}
  9662  		v.reset(OpPPC64MOVDstore)
  9663  		v.AuxInt = off1 + off2
  9664  		v.Aux = mergeSym(sym1, sym2)
  9665  		v.AddArg(ptr)
  9666  		v.AddArg(val)
  9667  		v.AddArg(mem)
  9668  		return true
  9669  	}
  9670  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [0]) mem)
  9671  	// result: (MOVDstorezero [off] {sym} ptr mem)
  9672  	for {
  9673  		off := v.AuxInt
  9674  		sym := v.Aux
  9675  		mem := v.Args[2]
  9676  		ptr := v.Args[0]
  9677  		v_1 := v.Args[1]
  9678  		if v_1.Op != OpPPC64MOVDconst || v_1.AuxInt != 0 {
  9679  			break
  9680  		}
  9681  		v.reset(OpPPC64MOVDstorezero)
  9682  		v.AuxInt = off
  9683  		v.Aux = sym
  9684  		v.AddArg(ptr)
  9685  		v.AddArg(mem)
  9686  		return true
  9687  	}
  9688  	// match: (MOVDstore [off] {sym} p:(ADD ptr idx) val mem)
  9689  	// cond: off == 0 && sym == nil && p.Uses == 1
  9690  	// result: (MOVDstoreidx ptr idx val mem)
  9691  	for {
  9692  		off := v.AuxInt
  9693  		sym := v.Aux
  9694  		mem := v.Args[2]
  9695  		p := v.Args[0]
  9696  		if p.Op != OpPPC64ADD {
  9697  			break
  9698  		}
  9699  		idx := p.Args[1]
  9700  		ptr := p.Args[0]
  9701  		val := v.Args[1]
  9702  		if !(off == 0 && sym == nil && p.Uses == 1) {
  9703  			break
  9704  		}
  9705  		v.reset(OpPPC64MOVDstoreidx)
  9706  		v.AddArg(ptr)
  9707  		v.AddArg(idx)
  9708  		v.AddArg(val)
  9709  		v.AddArg(mem)
  9710  		return true
  9711  	}
  9712  	return false
  9713  }
  9714  func rewriteValuePPC64_OpPPC64MOVDstoreidx_0(v *Value) bool {
  9715  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9716  	// cond: is16Bit(c) && c%4 == 0
  9717  	// result: (MOVDstore [c] ptr val mem)
  9718  	for {
  9719  		mem := v.Args[3]
  9720  		ptr := v.Args[0]
  9721  		v_1 := v.Args[1]
  9722  		if v_1.Op != OpPPC64MOVDconst {
  9723  			break
  9724  		}
  9725  		c := v_1.AuxInt
  9726  		val := v.Args[2]
  9727  		if !(is16Bit(c) && c%4 == 0) {
  9728  			break
  9729  		}
  9730  		v.reset(OpPPC64MOVDstore)
  9731  		v.AuxInt = c
  9732  		v.AddArg(ptr)
  9733  		v.AddArg(val)
  9734  		v.AddArg(mem)
  9735  		return true
  9736  	}
  9737  	// match: (MOVDstoreidx (MOVDconst [c]) ptr val mem)
  9738  	// cond: is16Bit(c) && c%4 == 0
  9739  	// result: (MOVDstore [c] ptr val mem)
  9740  	for {
  9741  		mem := v.Args[3]
  9742  		v_0 := v.Args[0]
  9743  		if v_0.Op != OpPPC64MOVDconst {
  9744  			break
  9745  		}
  9746  		c := v_0.AuxInt
  9747  		ptr := v.Args[1]
  9748  		val := v.Args[2]
  9749  		if !(is16Bit(c) && c%4 == 0) {
  9750  			break
  9751  		}
  9752  		v.reset(OpPPC64MOVDstore)
  9753  		v.AuxInt = c
  9754  		v.AddArg(ptr)
  9755  		v.AddArg(val)
  9756  		v.AddArg(mem)
  9757  		return true
  9758  	}
  9759  	return false
  9760  }
  9761  func rewriteValuePPC64_OpPPC64MOVDstorezero_0(v *Value) bool {
  9762  	// match: (MOVDstorezero [off1] {sym} (ADDconst [off2] x) mem)
  9763  	// cond: is16Bit(off1+off2) && (off1+off2)%4 == 0
  9764  	// result: (MOVDstorezero [off1+off2] {sym} x mem)
  9765  	for {
  9766  		off1 := v.AuxInt
  9767  		sym := v.Aux
  9768  		mem := v.Args[1]
  9769  		v_0 := v.Args[0]
  9770  		if v_0.Op != OpPPC64ADDconst {
  9771  			break
  9772  		}
  9773  		off2 := v_0.AuxInt
  9774  		x := v_0.Args[0]
  9775  		if !(is16Bit(off1+off2) && (off1+off2)%4 == 0) {
  9776  			break
  9777  		}
  9778  		v.reset(OpPPC64MOVDstorezero)
  9779  		v.AuxInt = off1 + off2
  9780  		v.Aux = sym
  9781  		v.AddArg(x)
  9782  		v.AddArg(mem)
  9783  		return true
  9784  	}
  9785  	// match: (MOVDstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  9786  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0
  9787  	// result: (MOVDstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
  9788  	for {
  9789  		off1 := v.AuxInt
  9790  		sym1 := v.Aux
  9791  		mem := v.Args[1]
  9792  		p := v.Args[0]
  9793  		if p.Op != OpPPC64MOVDaddr {
  9794  			break
  9795  		}
  9796  		off2 := p.AuxInt
  9797  		sym2 := p.Aux
  9798  		x := p.Args[0]
  9799  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0) {
  9800  			break
  9801  		}
  9802  		v.reset(OpPPC64MOVDstorezero)
  9803  		v.AuxInt = off1 + off2
  9804  		v.Aux = mergeSym(sym1, sym2)
  9805  		v.AddArg(x)
  9806  		v.AddArg(mem)
  9807  		return true
  9808  	}
  9809  	return false
  9810  }
  9811  func rewriteValuePPC64_OpPPC64MOVHBRstore_0(v *Value) bool {
  9812  	// match: (MOVHBRstore {sym} ptr (MOVHreg x) mem)
  9813  	// result: (MOVHBRstore {sym} ptr x mem)
  9814  	for {
  9815  		sym := v.Aux
  9816  		mem := v.Args[2]
  9817  		ptr := v.Args[0]
  9818  		v_1 := v.Args[1]
  9819  		if v_1.Op != OpPPC64MOVHreg {
  9820  			break
  9821  		}
  9822  		x := v_1.Args[0]
  9823  		v.reset(OpPPC64MOVHBRstore)
  9824  		v.Aux = sym
  9825  		v.AddArg(ptr)
  9826  		v.AddArg(x)
  9827  		v.AddArg(mem)
  9828  		return true
  9829  	}
  9830  	// match: (MOVHBRstore {sym} ptr (MOVHZreg x) mem)
  9831  	// result: (MOVHBRstore {sym} ptr x mem)
  9832  	for {
  9833  		sym := v.Aux
  9834  		mem := v.Args[2]
  9835  		ptr := v.Args[0]
  9836  		v_1 := v.Args[1]
  9837  		if v_1.Op != OpPPC64MOVHZreg {
  9838  			break
  9839  		}
  9840  		x := v_1.Args[0]
  9841  		v.reset(OpPPC64MOVHBRstore)
  9842  		v.Aux = sym
  9843  		v.AddArg(ptr)
  9844  		v.AddArg(x)
  9845  		v.AddArg(mem)
  9846  		return true
  9847  	}
  9848  	// match: (MOVHBRstore {sym} ptr (MOVWreg x) mem)
  9849  	// result: (MOVHBRstore {sym} ptr x mem)
  9850  	for {
  9851  		sym := v.Aux
  9852  		mem := v.Args[2]
  9853  		ptr := v.Args[0]
  9854  		v_1 := v.Args[1]
  9855  		if v_1.Op != OpPPC64MOVWreg {
  9856  			break
  9857  		}
  9858  		x := v_1.Args[0]
  9859  		v.reset(OpPPC64MOVHBRstore)
  9860  		v.Aux = sym
  9861  		v.AddArg(ptr)
  9862  		v.AddArg(x)
  9863  		v.AddArg(mem)
  9864  		return true
  9865  	}
  9866  	// match: (MOVHBRstore {sym} ptr (MOVWZreg x) mem)
  9867  	// result: (MOVHBRstore {sym} ptr x mem)
  9868  	for {
  9869  		sym := v.Aux
  9870  		mem := v.Args[2]
  9871  		ptr := v.Args[0]
  9872  		v_1 := v.Args[1]
  9873  		if v_1.Op != OpPPC64MOVWZreg {
  9874  			break
  9875  		}
  9876  		x := v_1.Args[0]
  9877  		v.reset(OpPPC64MOVHBRstore)
  9878  		v.Aux = sym
  9879  		v.AddArg(ptr)
  9880  		v.AddArg(x)
  9881  		v.AddArg(mem)
  9882  		return true
  9883  	}
  9884  	return false
  9885  }
  9886  func rewriteValuePPC64_OpPPC64MOVHZload_0(v *Value) bool {
  9887  	// match: (MOVHZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  9888  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  9889  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9890  	for {
  9891  		off1 := v.AuxInt
  9892  		sym1 := v.Aux
  9893  		mem := v.Args[1]
  9894  		p := v.Args[0]
  9895  		if p.Op != OpPPC64MOVDaddr {
  9896  			break
  9897  		}
  9898  		off2 := p.AuxInt
  9899  		sym2 := p.Aux
  9900  		ptr := p.Args[0]
  9901  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  9902  			break
  9903  		}
  9904  		v.reset(OpPPC64MOVHZload)
  9905  		v.AuxInt = off1 + off2
  9906  		v.Aux = mergeSym(sym1, sym2)
  9907  		v.AddArg(ptr)
  9908  		v.AddArg(mem)
  9909  		return true
  9910  	}
  9911  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] x) mem)
  9912  	// cond: is16Bit(off1+off2)
  9913  	// result: (MOVHZload [off1+off2] {sym} x mem)
  9914  	for {
  9915  		off1 := v.AuxInt
  9916  		sym := v.Aux
  9917  		mem := v.Args[1]
  9918  		v_0 := v.Args[0]
  9919  		if v_0.Op != OpPPC64ADDconst {
  9920  			break
  9921  		}
  9922  		off2 := v_0.AuxInt
  9923  		x := v_0.Args[0]
  9924  		if !(is16Bit(off1 + off2)) {
  9925  			break
  9926  		}
  9927  		v.reset(OpPPC64MOVHZload)
  9928  		v.AuxInt = off1 + off2
  9929  		v.Aux = sym
  9930  		v.AddArg(x)
  9931  		v.AddArg(mem)
  9932  		return true
  9933  	}
  9934  	// match: (MOVHZload [0] {sym} p:(ADD ptr idx) mem)
  9935  	// cond: sym == nil && p.Uses == 1
  9936  	// result: (MOVHZloadidx ptr idx mem)
  9937  	for {
  9938  		if v.AuxInt != 0 {
  9939  			break
  9940  		}
  9941  		sym := v.Aux
  9942  		mem := v.Args[1]
  9943  		p := v.Args[0]
  9944  		if p.Op != OpPPC64ADD {
  9945  			break
  9946  		}
  9947  		idx := p.Args[1]
  9948  		ptr := p.Args[0]
  9949  		if !(sym == nil && p.Uses == 1) {
  9950  			break
  9951  		}
  9952  		v.reset(OpPPC64MOVHZloadidx)
  9953  		v.AddArg(ptr)
  9954  		v.AddArg(idx)
  9955  		v.AddArg(mem)
  9956  		return true
  9957  	}
  9958  	return false
  9959  }
  9960  func rewriteValuePPC64_OpPPC64MOVHZloadidx_0(v *Value) bool {
  9961  	// match: (MOVHZloadidx ptr (MOVDconst [c]) mem)
  9962  	// cond: is16Bit(c)
  9963  	// result: (MOVHZload [c] ptr mem)
  9964  	for {
  9965  		mem := v.Args[2]
  9966  		ptr := v.Args[0]
  9967  		v_1 := v.Args[1]
  9968  		if v_1.Op != OpPPC64MOVDconst {
  9969  			break
  9970  		}
  9971  		c := v_1.AuxInt
  9972  		if !(is16Bit(c)) {
  9973  			break
  9974  		}
  9975  		v.reset(OpPPC64MOVHZload)
  9976  		v.AuxInt = c
  9977  		v.AddArg(ptr)
  9978  		v.AddArg(mem)
  9979  		return true
  9980  	}
  9981  	// match: (MOVHZloadidx (MOVDconst [c]) ptr mem)
  9982  	// cond: is16Bit(c)
  9983  	// result: (MOVHZload [c] ptr mem)
  9984  	for {
  9985  		mem := v.Args[2]
  9986  		v_0 := v.Args[0]
  9987  		if v_0.Op != OpPPC64MOVDconst {
  9988  			break
  9989  		}
  9990  		c := v_0.AuxInt
  9991  		ptr := v.Args[1]
  9992  		if !(is16Bit(c)) {
  9993  			break
  9994  		}
  9995  		v.reset(OpPPC64MOVHZload)
  9996  		v.AuxInt = c
  9997  		v.AddArg(ptr)
  9998  		v.AddArg(mem)
  9999  		return true
 10000  	}
 10001  	return false
 10002  }
 10003  func rewriteValuePPC64_OpPPC64MOVHZreg_0(v *Value) bool {
 10004  	b := v.Block
 10005  	typ := &b.Func.Config.Types
 10006  	// match: (MOVHZreg y:(ANDconst [c] _))
 10007  	// cond: uint64(c) <= 0xFFFF
 10008  	// result: y
 10009  	for {
 10010  		y := v.Args[0]
 10011  		if y.Op != OpPPC64ANDconst {
 10012  			break
 10013  		}
 10014  		c := y.AuxInt
 10015  		if !(uint64(c) <= 0xFFFF) {
 10016  			break
 10017  		}
 10018  		v.reset(OpCopy)
 10019  		v.Type = y.Type
 10020  		v.AddArg(y)
 10021  		return true
 10022  	}
 10023  	// match: (MOVHZreg (SRWconst [c] (MOVBZreg x)))
 10024  	// result: (SRWconst [c] (MOVBZreg x))
 10025  	for {
 10026  		v_0 := v.Args[0]
 10027  		if v_0.Op != OpPPC64SRWconst {
 10028  			break
 10029  		}
 10030  		c := v_0.AuxInt
 10031  		v_0_0 := v_0.Args[0]
 10032  		if v_0_0.Op != OpPPC64MOVBZreg {
 10033  			break
 10034  		}
 10035  		x := v_0_0.Args[0]
 10036  		v.reset(OpPPC64SRWconst)
 10037  		v.AuxInt = c
 10038  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 10039  		v0.AddArg(x)
 10040  		v.AddArg(v0)
 10041  		return true
 10042  	}
 10043  	// match: (MOVHZreg (SRWconst [c] (MOVHZreg x)))
 10044  	// result: (SRWconst [c] (MOVHZreg x))
 10045  	for {
 10046  		v_0 := v.Args[0]
 10047  		if v_0.Op != OpPPC64SRWconst {
 10048  			break
 10049  		}
 10050  		c := v_0.AuxInt
 10051  		v_0_0 := v_0.Args[0]
 10052  		if v_0_0.Op != OpPPC64MOVHZreg {
 10053  			break
 10054  		}
 10055  		x := v_0_0.Args[0]
 10056  		v.reset(OpPPC64SRWconst)
 10057  		v.AuxInt = c
 10058  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 10059  		v0.AddArg(x)
 10060  		v.AddArg(v0)
 10061  		return true
 10062  	}
 10063  	// match: (MOVHZreg (SRWconst [c] x))
 10064  	// cond: sizeof(x.Type) <= 16
 10065  	// result: (SRWconst [c] x)
 10066  	for {
 10067  		v_0 := v.Args[0]
 10068  		if v_0.Op != OpPPC64SRWconst {
 10069  			break
 10070  		}
 10071  		c := v_0.AuxInt
 10072  		x := v_0.Args[0]
 10073  		if !(sizeof(x.Type) <= 16) {
 10074  			break
 10075  		}
 10076  		v.reset(OpPPC64SRWconst)
 10077  		v.AuxInt = c
 10078  		v.AddArg(x)
 10079  		return true
 10080  	}
 10081  	// match: (MOVHZreg (SRDconst [c] x))
 10082  	// cond: c>=48
 10083  	// result: (SRDconst [c] x)
 10084  	for {
 10085  		v_0 := v.Args[0]
 10086  		if v_0.Op != OpPPC64SRDconst {
 10087  			break
 10088  		}
 10089  		c := v_0.AuxInt
 10090  		x := v_0.Args[0]
 10091  		if !(c >= 48) {
 10092  			break
 10093  		}
 10094  		v.reset(OpPPC64SRDconst)
 10095  		v.AuxInt = c
 10096  		v.AddArg(x)
 10097  		return true
 10098  	}
 10099  	// match: (MOVHZreg (SRWconst [c] x))
 10100  	// cond: c>=16
 10101  	// result: (SRWconst [c] x)
 10102  	for {
 10103  		v_0 := v.Args[0]
 10104  		if v_0.Op != OpPPC64SRWconst {
 10105  			break
 10106  		}
 10107  		c := v_0.AuxInt
 10108  		x := v_0.Args[0]
 10109  		if !(c >= 16) {
 10110  			break
 10111  		}
 10112  		v.reset(OpPPC64SRWconst)
 10113  		v.AuxInt = c
 10114  		v.AddArg(x)
 10115  		return true
 10116  	}
 10117  	// match: (MOVHZreg y:(MOVHZreg _))
 10118  	// result: y
 10119  	for {
 10120  		y := v.Args[0]
 10121  		if y.Op != OpPPC64MOVHZreg {
 10122  			break
 10123  		}
 10124  		v.reset(OpCopy)
 10125  		v.Type = y.Type
 10126  		v.AddArg(y)
 10127  		return true
 10128  	}
 10129  	// match: (MOVHZreg y:(MOVBZreg _))
 10130  	// result: y
 10131  	for {
 10132  		y := v.Args[0]
 10133  		if y.Op != OpPPC64MOVBZreg {
 10134  			break
 10135  		}
 10136  		v.reset(OpCopy)
 10137  		v.Type = y.Type
 10138  		v.AddArg(y)
 10139  		return true
 10140  	}
 10141  	// match: (MOVHZreg y:(MOVHBRload _ _))
 10142  	// result: y
 10143  	for {
 10144  		y := v.Args[0]
 10145  		if y.Op != OpPPC64MOVHBRload {
 10146  			break
 10147  		}
 10148  		_ = y.Args[1]
 10149  		v.reset(OpCopy)
 10150  		v.Type = y.Type
 10151  		v.AddArg(y)
 10152  		return true
 10153  	}
 10154  	// match: (MOVHZreg y:(MOVHreg x))
 10155  	// result: (MOVHZreg x)
 10156  	for {
 10157  		y := v.Args[0]
 10158  		if y.Op != OpPPC64MOVHreg {
 10159  			break
 10160  		}
 10161  		x := y.Args[0]
 10162  		v.reset(OpPPC64MOVHZreg)
 10163  		v.AddArg(x)
 10164  		return true
 10165  	}
 10166  	return false
 10167  }
 10168  func rewriteValuePPC64_OpPPC64MOVHZreg_10(v *Value) bool {
 10169  	// match: (MOVHZreg x:(MOVBZload _ _))
 10170  	// result: x
 10171  	for {
 10172  		x := v.Args[0]
 10173  		if x.Op != OpPPC64MOVBZload {
 10174  			break
 10175  		}
 10176  		_ = x.Args[1]
 10177  		v.reset(OpCopy)
 10178  		v.Type = x.Type
 10179  		v.AddArg(x)
 10180  		return true
 10181  	}
 10182  	// match: (MOVHZreg x:(MOVBZloadidx _ _ _))
 10183  	// result: x
 10184  	for {
 10185  		x := v.Args[0]
 10186  		if x.Op != OpPPC64MOVBZloadidx {
 10187  			break
 10188  		}
 10189  		_ = x.Args[2]
 10190  		v.reset(OpCopy)
 10191  		v.Type = x.Type
 10192  		v.AddArg(x)
 10193  		return true
 10194  	}
 10195  	// match: (MOVHZreg x:(MOVHZload _ _))
 10196  	// result: x
 10197  	for {
 10198  		x := v.Args[0]
 10199  		if x.Op != OpPPC64MOVHZload {
 10200  			break
 10201  		}
 10202  		_ = x.Args[1]
 10203  		v.reset(OpCopy)
 10204  		v.Type = x.Type
 10205  		v.AddArg(x)
 10206  		return true
 10207  	}
 10208  	// match: (MOVHZreg x:(MOVHZloadidx _ _ _))
 10209  	// result: x
 10210  	for {
 10211  		x := v.Args[0]
 10212  		if x.Op != OpPPC64MOVHZloadidx {
 10213  			break
 10214  		}
 10215  		_ = x.Args[2]
 10216  		v.reset(OpCopy)
 10217  		v.Type = x.Type
 10218  		v.AddArg(x)
 10219  		return true
 10220  	}
 10221  	// match: (MOVHZreg x:(Arg <t>))
 10222  	// cond: (is8BitInt(t) || is16BitInt(t)) && !isSigned(t)
 10223  	// result: x
 10224  	for {
 10225  		x := v.Args[0]
 10226  		if x.Op != OpArg {
 10227  			break
 10228  		}
 10229  		t := x.Type
 10230  		if !((is8BitInt(t) || is16BitInt(t)) && !isSigned(t)) {
 10231  			break
 10232  		}
 10233  		v.reset(OpCopy)
 10234  		v.Type = x.Type
 10235  		v.AddArg(x)
 10236  		return true
 10237  	}
 10238  	// match: (MOVHZreg (MOVDconst [c]))
 10239  	// result: (MOVDconst [int64(uint16(c))])
 10240  	for {
 10241  		v_0 := v.Args[0]
 10242  		if v_0.Op != OpPPC64MOVDconst {
 10243  			break
 10244  		}
 10245  		c := v_0.AuxInt
 10246  		v.reset(OpPPC64MOVDconst)
 10247  		v.AuxInt = int64(uint16(c))
 10248  		return true
 10249  	}
 10250  	return false
 10251  }
 10252  func rewriteValuePPC64_OpPPC64MOVHload_0(v *Value) bool {
 10253  	// match: (MOVHload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 10254  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 10255  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10256  	for {
 10257  		off1 := v.AuxInt
 10258  		sym1 := v.Aux
 10259  		mem := v.Args[1]
 10260  		p := v.Args[0]
 10261  		if p.Op != OpPPC64MOVDaddr {
 10262  			break
 10263  		}
 10264  		off2 := p.AuxInt
 10265  		sym2 := p.Aux
 10266  		ptr := p.Args[0]
 10267  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 10268  			break
 10269  		}
 10270  		v.reset(OpPPC64MOVHload)
 10271  		v.AuxInt = off1 + off2
 10272  		v.Aux = mergeSym(sym1, sym2)
 10273  		v.AddArg(ptr)
 10274  		v.AddArg(mem)
 10275  		return true
 10276  	}
 10277  	// match: (MOVHload [off1] {sym} (ADDconst [off2] x) mem)
 10278  	// cond: is16Bit(off1+off2)
 10279  	// result: (MOVHload [off1+off2] {sym} x mem)
 10280  	for {
 10281  		off1 := v.AuxInt
 10282  		sym := v.Aux
 10283  		mem := v.Args[1]
 10284  		v_0 := v.Args[0]
 10285  		if v_0.Op != OpPPC64ADDconst {
 10286  			break
 10287  		}
 10288  		off2 := v_0.AuxInt
 10289  		x := v_0.Args[0]
 10290  		if !(is16Bit(off1 + off2)) {
 10291  			break
 10292  		}
 10293  		v.reset(OpPPC64MOVHload)
 10294  		v.AuxInt = off1 + off2
 10295  		v.Aux = sym
 10296  		v.AddArg(x)
 10297  		v.AddArg(mem)
 10298  		return true
 10299  	}
 10300  	// match: (MOVHload [0] {sym} p:(ADD ptr idx) mem)
 10301  	// cond: sym == nil && p.Uses == 1
 10302  	// result: (MOVHloadidx ptr idx mem)
 10303  	for {
 10304  		if v.AuxInt != 0 {
 10305  			break
 10306  		}
 10307  		sym := v.Aux
 10308  		mem := v.Args[1]
 10309  		p := v.Args[0]
 10310  		if p.Op != OpPPC64ADD {
 10311  			break
 10312  		}
 10313  		idx := p.Args[1]
 10314  		ptr := p.Args[0]
 10315  		if !(sym == nil && p.Uses == 1) {
 10316  			break
 10317  		}
 10318  		v.reset(OpPPC64MOVHloadidx)
 10319  		v.AddArg(ptr)
 10320  		v.AddArg(idx)
 10321  		v.AddArg(mem)
 10322  		return true
 10323  	}
 10324  	return false
 10325  }
 10326  func rewriteValuePPC64_OpPPC64MOVHloadidx_0(v *Value) bool {
 10327  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 10328  	// cond: is16Bit(c)
 10329  	// result: (MOVHload [c] ptr mem)
 10330  	for {
 10331  		mem := v.Args[2]
 10332  		ptr := v.Args[0]
 10333  		v_1 := v.Args[1]
 10334  		if v_1.Op != OpPPC64MOVDconst {
 10335  			break
 10336  		}
 10337  		c := v_1.AuxInt
 10338  		if !(is16Bit(c)) {
 10339  			break
 10340  		}
 10341  		v.reset(OpPPC64MOVHload)
 10342  		v.AuxInt = c
 10343  		v.AddArg(ptr)
 10344  		v.AddArg(mem)
 10345  		return true
 10346  	}
 10347  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10348  	// cond: is16Bit(c)
 10349  	// result: (MOVHload [c] ptr mem)
 10350  	for {
 10351  		mem := v.Args[2]
 10352  		v_0 := v.Args[0]
 10353  		if v_0.Op != OpPPC64MOVDconst {
 10354  			break
 10355  		}
 10356  		c := v_0.AuxInt
 10357  		ptr := v.Args[1]
 10358  		if !(is16Bit(c)) {
 10359  			break
 10360  		}
 10361  		v.reset(OpPPC64MOVHload)
 10362  		v.AuxInt = c
 10363  		v.AddArg(ptr)
 10364  		v.AddArg(mem)
 10365  		return true
 10366  	}
 10367  	return false
 10368  }
 10369  func rewriteValuePPC64_OpPPC64MOVHreg_0(v *Value) bool {
 10370  	b := v.Block
 10371  	typ := &b.Func.Config.Types
 10372  	// match: (MOVHreg y:(ANDconst [c] _))
 10373  	// cond: uint64(c) <= 0x7FFF
 10374  	// result: y
 10375  	for {
 10376  		y := v.Args[0]
 10377  		if y.Op != OpPPC64ANDconst {
 10378  			break
 10379  		}
 10380  		c := y.AuxInt
 10381  		if !(uint64(c) <= 0x7FFF) {
 10382  			break
 10383  		}
 10384  		v.reset(OpCopy)
 10385  		v.Type = y.Type
 10386  		v.AddArg(y)
 10387  		return true
 10388  	}
 10389  	// match: (MOVHreg (SRAWconst [c] (MOVBreg x)))
 10390  	// result: (SRAWconst [c] (MOVBreg x))
 10391  	for {
 10392  		v_0 := v.Args[0]
 10393  		if v_0.Op != OpPPC64SRAWconst {
 10394  			break
 10395  		}
 10396  		c := v_0.AuxInt
 10397  		v_0_0 := v_0.Args[0]
 10398  		if v_0_0.Op != OpPPC64MOVBreg {
 10399  			break
 10400  		}
 10401  		x := v_0_0.Args[0]
 10402  		v.reset(OpPPC64SRAWconst)
 10403  		v.AuxInt = c
 10404  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 10405  		v0.AddArg(x)
 10406  		v.AddArg(v0)
 10407  		return true
 10408  	}
 10409  	// match: (MOVHreg (SRAWconst [c] (MOVHreg x)))
 10410  	// result: (SRAWconst [c] (MOVHreg x))
 10411  	for {
 10412  		v_0 := v.Args[0]
 10413  		if v_0.Op != OpPPC64SRAWconst {
 10414  			break
 10415  		}
 10416  		c := v_0.AuxInt
 10417  		v_0_0 := v_0.Args[0]
 10418  		if v_0_0.Op != OpPPC64MOVHreg {
 10419  			break
 10420  		}
 10421  		x := v_0_0.Args[0]
 10422  		v.reset(OpPPC64SRAWconst)
 10423  		v.AuxInt = c
 10424  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 10425  		v0.AddArg(x)
 10426  		v.AddArg(v0)
 10427  		return true
 10428  	}
 10429  	// match: (MOVHreg (SRAWconst [c] x))
 10430  	// cond: sizeof(x.Type) <= 16
 10431  	// result: (SRAWconst [c] x)
 10432  	for {
 10433  		v_0 := v.Args[0]
 10434  		if v_0.Op != OpPPC64SRAWconst {
 10435  			break
 10436  		}
 10437  		c := v_0.AuxInt
 10438  		x := v_0.Args[0]
 10439  		if !(sizeof(x.Type) <= 16) {
 10440  			break
 10441  		}
 10442  		v.reset(OpPPC64SRAWconst)
 10443  		v.AuxInt = c
 10444  		v.AddArg(x)
 10445  		return true
 10446  	}
 10447  	// match: (MOVHreg (SRDconst [c] x))
 10448  	// cond: c>48
 10449  	// result: (SRDconst [c] x)
 10450  	for {
 10451  		v_0 := v.Args[0]
 10452  		if v_0.Op != OpPPC64SRDconst {
 10453  			break
 10454  		}
 10455  		c := v_0.AuxInt
 10456  		x := v_0.Args[0]
 10457  		if !(c > 48) {
 10458  			break
 10459  		}
 10460  		v.reset(OpPPC64SRDconst)
 10461  		v.AuxInt = c
 10462  		v.AddArg(x)
 10463  		return true
 10464  	}
 10465  	// match: (MOVHreg (SRDconst [c] x))
 10466  	// cond: c==48
 10467  	// result: (SRADconst [c] x)
 10468  	for {
 10469  		v_0 := v.Args[0]
 10470  		if v_0.Op != OpPPC64SRDconst {
 10471  			break
 10472  		}
 10473  		c := v_0.AuxInt
 10474  		x := v_0.Args[0]
 10475  		if !(c == 48) {
 10476  			break
 10477  		}
 10478  		v.reset(OpPPC64SRADconst)
 10479  		v.AuxInt = c
 10480  		v.AddArg(x)
 10481  		return true
 10482  	}
 10483  	// match: (MOVHreg (SRWconst [c] x))
 10484  	// cond: c>16
 10485  	// result: (SRWconst [c] x)
 10486  	for {
 10487  		v_0 := v.Args[0]
 10488  		if v_0.Op != OpPPC64SRWconst {
 10489  			break
 10490  		}
 10491  		c := v_0.AuxInt
 10492  		x := v_0.Args[0]
 10493  		if !(c > 16) {
 10494  			break
 10495  		}
 10496  		v.reset(OpPPC64SRWconst)
 10497  		v.AuxInt = c
 10498  		v.AddArg(x)
 10499  		return true
 10500  	}
 10501  	// match: (MOVHreg (SRWconst [c] x))
 10502  	// cond: c==16
 10503  	// result: (SRAWconst [c] x)
 10504  	for {
 10505  		v_0 := v.Args[0]
 10506  		if v_0.Op != OpPPC64SRWconst {
 10507  			break
 10508  		}
 10509  		c := v_0.AuxInt
 10510  		x := v_0.Args[0]
 10511  		if !(c == 16) {
 10512  			break
 10513  		}
 10514  		v.reset(OpPPC64SRAWconst)
 10515  		v.AuxInt = c
 10516  		v.AddArg(x)
 10517  		return true
 10518  	}
 10519  	// match: (MOVHreg y:(MOVHreg _))
 10520  	// result: y
 10521  	for {
 10522  		y := v.Args[0]
 10523  		if y.Op != OpPPC64MOVHreg {
 10524  			break
 10525  		}
 10526  		v.reset(OpCopy)
 10527  		v.Type = y.Type
 10528  		v.AddArg(y)
 10529  		return true
 10530  	}
 10531  	// match: (MOVHreg y:(MOVBreg _))
 10532  	// result: y
 10533  	for {
 10534  		y := v.Args[0]
 10535  		if y.Op != OpPPC64MOVBreg {
 10536  			break
 10537  		}
 10538  		v.reset(OpCopy)
 10539  		v.Type = y.Type
 10540  		v.AddArg(y)
 10541  		return true
 10542  	}
 10543  	return false
 10544  }
 10545  func rewriteValuePPC64_OpPPC64MOVHreg_10(v *Value) bool {
 10546  	// match: (MOVHreg y:(MOVHZreg x))
 10547  	// result: (MOVHreg x)
 10548  	for {
 10549  		y := v.Args[0]
 10550  		if y.Op != OpPPC64MOVHZreg {
 10551  			break
 10552  		}
 10553  		x := y.Args[0]
 10554  		v.reset(OpPPC64MOVHreg)
 10555  		v.AddArg(x)
 10556  		return true
 10557  	}
 10558  	// match: (MOVHreg x:(MOVHload _ _))
 10559  	// result: x
 10560  	for {
 10561  		x := v.Args[0]
 10562  		if x.Op != OpPPC64MOVHload {
 10563  			break
 10564  		}
 10565  		_ = x.Args[1]
 10566  		v.reset(OpCopy)
 10567  		v.Type = x.Type
 10568  		v.AddArg(x)
 10569  		return true
 10570  	}
 10571  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
 10572  	// result: x
 10573  	for {
 10574  		x := v.Args[0]
 10575  		if x.Op != OpPPC64MOVHloadidx {
 10576  			break
 10577  		}
 10578  		_ = x.Args[2]
 10579  		v.reset(OpCopy)
 10580  		v.Type = x.Type
 10581  		v.AddArg(x)
 10582  		return true
 10583  	}
 10584  	// match: (MOVHreg x:(Arg <t>))
 10585  	// cond: (is8BitInt(t) || is16BitInt(t)) && isSigned(t)
 10586  	// result: x
 10587  	for {
 10588  		x := v.Args[0]
 10589  		if x.Op != OpArg {
 10590  			break
 10591  		}
 10592  		t := x.Type
 10593  		if !((is8BitInt(t) || is16BitInt(t)) && isSigned(t)) {
 10594  			break
 10595  		}
 10596  		v.reset(OpCopy)
 10597  		v.Type = x.Type
 10598  		v.AddArg(x)
 10599  		return true
 10600  	}
 10601  	// match: (MOVHreg (MOVDconst [c]))
 10602  	// result: (MOVDconst [int64(int16(c))])
 10603  	for {
 10604  		v_0 := v.Args[0]
 10605  		if v_0.Op != OpPPC64MOVDconst {
 10606  			break
 10607  		}
 10608  		c := v_0.AuxInt
 10609  		v.reset(OpPPC64MOVDconst)
 10610  		v.AuxInt = int64(int16(c))
 10611  		return true
 10612  	}
 10613  	return false
 10614  }
 10615  func rewriteValuePPC64_OpPPC64MOVHstore_0(v *Value) bool {
 10616  	b := v.Block
 10617  	config := b.Func.Config
 10618  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] x) val mem)
 10619  	// cond: is16Bit(off1+off2)
 10620  	// result: (MOVHstore [off1+off2] {sym} x val mem)
 10621  	for {
 10622  		off1 := v.AuxInt
 10623  		sym := v.Aux
 10624  		mem := v.Args[2]
 10625  		v_0 := v.Args[0]
 10626  		if v_0.Op != OpPPC64ADDconst {
 10627  			break
 10628  		}
 10629  		off2 := v_0.AuxInt
 10630  		x := v_0.Args[0]
 10631  		val := v.Args[1]
 10632  		if !(is16Bit(off1 + off2)) {
 10633  			break
 10634  		}
 10635  		v.reset(OpPPC64MOVHstore)
 10636  		v.AuxInt = off1 + off2
 10637  		v.Aux = sym
 10638  		v.AddArg(x)
 10639  		v.AddArg(val)
 10640  		v.AddArg(mem)
 10641  		return true
 10642  	}
 10643  	// match: (MOVHstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
 10644  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 10645  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10646  	for {
 10647  		off1 := v.AuxInt
 10648  		sym1 := v.Aux
 10649  		mem := v.Args[2]
 10650  		p := v.Args[0]
 10651  		if p.Op != OpPPC64MOVDaddr {
 10652  			break
 10653  		}
 10654  		off2 := p.AuxInt
 10655  		sym2 := p.Aux
 10656  		ptr := p.Args[0]
 10657  		val := v.Args[1]
 10658  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 10659  			break
 10660  		}
 10661  		v.reset(OpPPC64MOVHstore)
 10662  		v.AuxInt = off1 + off2
 10663  		v.Aux = mergeSym(sym1, sym2)
 10664  		v.AddArg(ptr)
 10665  		v.AddArg(val)
 10666  		v.AddArg(mem)
 10667  		return true
 10668  	}
 10669  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [0]) mem)
 10670  	// result: (MOVHstorezero [off] {sym} ptr mem)
 10671  	for {
 10672  		off := v.AuxInt
 10673  		sym := v.Aux
 10674  		mem := v.Args[2]
 10675  		ptr := v.Args[0]
 10676  		v_1 := v.Args[1]
 10677  		if v_1.Op != OpPPC64MOVDconst || v_1.AuxInt != 0 {
 10678  			break
 10679  		}
 10680  		v.reset(OpPPC64MOVHstorezero)
 10681  		v.AuxInt = off
 10682  		v.Aux = sym
 10683  		v.AddArg(ptr)
 10684  		v.AddArg(mem)
 10685  		return true
 10686  	}
 10687  	// match: (MOVHstore [off] {sym} p:(ADD ptr idx) val mem)
 10688  	// cond: off == 0 && sym == nil && p.Uses == 1
 10689  	// result: (MOVHstoreidx ptr idx val mem)
 10690  	for {
 10691  		off := v.AuxInt
 10692  		sym := v.Aux
 10693  		mem := v.Args[2]
 10694  		p := v.Args[0]
 10695  		if p.Op != OpPPC64ADD {
 10696  			break
 10697  		}
 10698  		idx := p.Args[1]
 10699  		ptr := p.Args[0]
 10700  		val := v.Args[1]
 10701  		if !(off == 0 && sym == nil && p.Uses == 1) {
 10702  			break
 10703  		}
 10704  		v.reset(OpPPC64MOVHstoreidx)
 10705  		v.AddArg(ptr)
 10706  		v.AddArg(idx)
 10707  		v.AddArg(val)
 10708  		v.AddArg(mem)
 10709  		return true
 10710  	}
 10711  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10712  	// result: (MOVHstore [off] {sym} ptr x mem)
 10713  	for {
 10714  		off := v.AuxInt
 10715  		sym := v.Aux
 10716  		mem := v.Args[2]
 10717  		ptr := v.Args[0]
 10718  		v_1 := v.Args[1]
 10719  		if v_1.Op != OpPPC64MOVHreg {
 10720  			break
 10721  		}
 10722  		x := v_1.Args[0]
 10723  		v.reset(OpPPC64MOVHstore)
 10724  		v.AuxInt = off
 10725  		v.Aux = sym
 10726  		v.AddArg(ptr)
 10727  		v.AddArg(x)
 10728  		v.AddArg(mem)
 10729  		return true
 10730  	}
 10731  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
 10732  	// result: (MOVHstore [off] {sym} ptr x mem)
 10733  	for {
 10734  		off := v.AuxInt
 10735  		sym := v.Aux
 10736  		mem := v.Args[2]
 10737  		ptr := v.Args[0]
 10738  		v_1 := v.Args[1]
 10739  		if v_1.Op != OpPPC64MOVHZreg {
 10740  			break
 10741  		}
 10742  		x := v_1.Args[0]
 10743  		v.reset(OpPPC64MOVHstore)
 10744  		v.AuxInt = off
 10745  		v.Aux = sym
 10746  		v.AddArg(ptr)
 10747  		v.AddArg(x)
 10748  		v.AddArg(mem)
 10749  		return true
 10750  	}
 10751  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10752  	// result: (MOVHstore [off] {sym} ptr x mem)
 10753  	for {
 10754  		off := v.AuxInt
 10755  		sym := v.Aux
 10756  		mem := v.Args[2]
 10757  		ptr := v.Args[0]
 10758  		v_1 := v.Args[1]
 10759  		if v_1.Op != OpPPC64MOVWreg {
 10760  			break
 10761  		}
 10762  		x := v_1.Args[0]
 10763  		v.reset(OpPPC64MOVHstore)
 10764  		v.AuxInt = off
 10765  		v.Aux = sym
 10766  		v.AddArg(ptr)
 10767  		v.AddArg(x)
 10768  		v.AddArg(mem)
 10769  		return true
 10770  	}
 10771  	// match: (MOVHstore [off] {sym} ptr (MOVWZreg x) mem)
 10772  	// result: (MOVHstore [off] {sym} ptr x mem)
 10773  	for {
 10774  		off := v.AuxInt
 10775  		sym := v.Aux
 10776  		mem := v.Args[2]
 10777  		ptr := v.Args[0]
 10778  		v_1 := v.Args[1]
 10779  		if v_1.Op != OpPPC64MOVWZreg {
 10780  			break
 10781  		}
 10782  		x := v_1.Args[0]
 10783  		v.reset(OpPPC64MOVHstore)
 10784  		v.AuxInt = off
 10785  		v.Aux = sym
 10786  		v.AddArg(ptr)
 10787  		v.AddArg(x)
 10788  		v.AddArg(mem)
 10789  		return true
 10790  	}
 10791  	// match: (MOVHstore [i1] {s} p (SRWconst w [16]) x0:(MOVHstore [i0] {s} p w mem))
 10792  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)
 10793  	// result: (MOVWstore [i0] {s} p w mem)
 10794  	for {
 10795  		i1 := v.AuxInt
 10796  		s := v.Aux
 10797  		_ = v.Args[2]
 10798  		p := v.Args[0]
 10799  		v_1 := v.Args[1]
 10800  		if v_1.Op != OpPPC64SRWconst || v_1.AuxInt != 16 {
 10801  			break
 10802  		}
 10803  		w := v_1.Args[0]
 10804  		x0 := v.Args[2]
 10805  		if x0.Op != OpPPC64MOVHstore {
 10806  			break
 10807  		}
 10808  		i0 := x0.AuxInt
 10809  		if x0.Aux != s {
 10810  			break
 10811  		}
 10812  		mem := x0.Args[2]
 10813  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)) {
 10814  			break
 10815  		}
 10816  		v.reset(OpPPC64MOVWstore)
 10817  		v.AuxInt = i0
 10818  		v.Aux = s
 10819  		v.AddArg(p)
 10820  		v.AddArg(w)
 10821  		v.AddArg(mem)
 10822  		return true
 10823  	}
 10824  	// match: (MOVHstore [i1] {s} p (SRDconst w [16]) x0:(MOVHstore [i0] {s} p w mem))
 10825  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)
 10826  	// result: (MOVWstore [i0] {s} p w mem)
 10827  	for {
 10828  		i1 := v.AuxInt
 10829  		s := v.Aux
 10830  		_ = v.Args[2]
 10831  		p := v.Args[0]
 10832  		v_1 := v.Args[1]
 10833  		if v_1.Op != OpPPC64SRDconst || v_1.AuxInt != 16 {
 10834  			break
 10835  		}
 10836  		w := v_1.Args[0]
 10837  		x0 := v.Args[2]
 10838  		if x0.Op != OpPPC64MOVHstore {
 10839  			break
 10840  		}
 10841  		i0 := x0.AuxInt
 10842  		if x0.Aux != s {
 10843  			break
 10844  		}
 10845  		mem := x0.Args[2]
 10846  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)) {
 10847  			break
 10848  		}
 10849  		v.reset(OpPPC64MOVWstore)
 10850  		v.AuxInt = i0
 10851  		v.Aux = s
 10852  		v.AddArg(p)
 10853  		v.AddArg(w)
 10854  		v.AddArg(mem)
 10855  		return true
 10856  	}
 10857  	return false
 10858  }
 10859  func rewriteValuePPC64_OpPPC64MOVHstoreidx_0(v *Value) bool {
 10860  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10861  	// cond: is16Bit(c)
 10862  	// result: (MOVHstore [c] ptr val mem)
 10863  	for {
 10864  		mem := v.Args[3]
 10865  		ptr := v.Args[0]
 10866  		v_1 := v.Args[1]
 10867  		if v_1.Op != OpPPC64MOVDconst {
 10868  			break
 10869  		}
 10870  		c := v_1.AuxInt
 10871  		val := v.Args[2]
 10872  		if !(is16Bit(c)) {
 10873  			break
 10874  		}
 10875  		v.reset(OpPPC64MOVHstore)
 10876  		v.AuxInt = c
 10877  		v.AddArg(ptr)
 10878  		v.AddArg(val)
 10879  		v.AddArg(mem)
 10880  		return true
 10881  	}
 10882  	// match: (MOVHstoreidx (MOVDconst [c]) ptr val mem)
 10883  	// cond: is16Bit(c)
 10884  	// result: (MOVHstore [c] ptr val mem)
 10885  	for {
 10886  		mem := v.Args[3]
 10887  		v_0 := v.Args[0]
 10888  		if v_0.Op != OpPPC64MOVDconst {
 10889  			break
 10890  		}
 10891  		c := v_0.AuxInt
 10892  		ptr := v.Args[1]
 10893  		val := v.Args[2]
 10894  		if !(is16Bit(c)) {
 10895  			break
 10896  		}
 10897  		v.reset(OpPPC64MOVHstore)
 10898  		v.AuxInt = c
 10899  		v.AddArg(ptr)
 10900  		v.AddArg(val)
 10901  		v.AddArg(mem)
 10902  		return true
 10903  	}
 10904  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVHreg x) mem)
 10905  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 10906  	for {
 10907  		off := v.AuxInt
 10908  		sym := v.Aux
 10909  		mem := v.Args[3]
 10910  		ptr := v.Args[0]
 10911  		idx := v.Args[1]
 10912  		v_2 := v.Args[2]
 10913  		if v_2.Op != OpPPC64MOVHreg {
 10914  			break
 10915  		}
 10916  		x := v_2.Args[0]
 10917  		v.reset(OpPPC64MOVHstoreidx)
 10918  		v.AuxInt = off
 10919  		v.Aux = sym
 10920  		v.AddArg(ptr)
 10921  		v.AddArg(idx)
 10922  		v.AddArg(x)
 10923  		v.AddArg(mem)
 10924  		return true
 10925  	}
 10926  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVHZreg x) mem)
 10927  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 10928  	for {
 10929  		off := v.AuxInt
 10930  		sym := v.Aux
 10931  		mem := v.Args[3]
 10932  		ptr := v.Args[0]
 10933  		idx := v.Args[1]
 10934  		v_2 := v.Args[2]
 10935  		if v_2.Op != OpPPC64MOVHZreg {
 10936  			break
 10937  		}
 10938  		x := v_2.Args[0]
 10939  		v.reset(OpPPC64MOVHstoreidx)
 10940  		v.AuxInt = off
 10941  		v.Aux = sym
 10942  		v.AddArg(ptr)
 10943  		v.AddArg(idx)
 10944  		v.AddArg(x)
 10945  		v.AddArg(mem)
 10946  		return true
 10947  	}
 10948  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVWreg x) mem)
 10949  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 10950  	for {
 10951  		off := v.AuxInt
 10952  		sym := v.Aux
 10953  		mem := v.Args[3]
 10954  		ptr := v.Args[0]
 10955  		idx := v.Args[1]
 10956  		v_2 := v.Args[2]
 10957  		if v_2.Op != OpPPC64MOVWreg {
 10958  			break
 10959  		}
 10960  		x := v_2.Args[0]
 10961  		v.reset(OpPPC64MOVHstoreidx)
 10962  		v.AuxInt = off
 10963  		v.Aux = sym
 10964  		v.AddArg(ptr)
 10965  		v.AddArg(idx)
 10966  		v.AddArg(x)
 10967  		v.AddArg(mem)
 10968  		return true
 10969  	}
 10970  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVWZreg x) mem)
 10971  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 10972  	for {
 10973  		off := v.AuxInt
 10974  		sym := v.Aux
 10975  		mem := v.Args[3]
 10976  		ptr := v.Args[0]
 10977  		idx := v.Args[1]
 10978  		v_2 := v.Args[2]
 10979  		if v_2.Op != OpPPC64MOVWZreg {
 10980  			break
 10981  		}
 10982  		x := v_2.Args[0]
 10983  		v.reset(OpPPC64MOVHstoreidx)
 10984  		v.AuxInt = off
 10985  		v.Aux = sym
 10986  		v.AddArg(ptr)
 10987  		v.AddArg(idx)
 10988  		v.AddArg(x)
 10989  		v.AddArg(mem)
 10990  		return true
 10991  	}
 10992  	return false
 10993  }
 10994  func rewriteValuePPC64_OpPPC64MOVHstorezero_0(v *Value) bool {
 10995  	// match: (MOVHstorezero [off1] {sym} (ADDconst [off2] x) mem)
 10996  	// cond: is16Bit(off1+off2)
 10997  	// result: (MOVHstorezero [off1+off2] {sym} x mem)
 10998  	for {
 10999  		off1 := v.AuxInt
 11000  		sym := v.Aux
 11001  		mem := v.Args[1]
 11002  		v_0 := v.Args[0]
 11003  		if v_0.Op != OpPPC64ADDconst {
 11004  			break
 11005  		}
 11006  		off2 := v_0.AuxInt
 11007  		x := v_0.Args[0]
 11008  		if !(is16Bit(off1 + off2)) {
 11009  			break
 11010  		}
 11011  		v.reset(OpPPC64MOVHstorezero)
 11012  		v.AuxInt = off1 + off2
 11013  		v.Aux = sym
 11014  		v.AddArg(x)
 11015  		v.AddArg(mem)
 11016  		return true
 11017  	}
 11018  	// match: (MOVHstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 11019  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
 11020  	// result: (MOVHstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
 11021  	for {
 11022  		off1 := v.AuxInt
 11023  		sym1 := v.Aux
 11024  		mem := v.Args[1]
 11025  		p := v.Args[0]
 11026  		if p.Op != OpPPC64MOVDaddr {
 11027  			break
 11028  		}
 11029  		off2 := p.AuxInt
 11030  		sym2 := p.Aux
 11031  		x := p.Args[0]
 11032  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
 11033  			break
 11034  		}
 11035  		v.reset(OpPPC64MOVHstorezero)
 11036  		v.AuxInt = off1 + off2
 11037  		v.Aux = mergeSym(sym1, sym2)
 11038  		v.AddArg(x)
 11039  		v.AddArg(mem)
 11040  		return true
 11041  	}
 11042  	return false
 11043  }
 11044  func rewriteValuePPC64_OpPPC64MOVWBRstore_0(v *Value) bool {
 11045  	// match: (MOVWBRstore {sym} ptr (MOVWreg x) mem)
 11046  	// result: (MOVWBRstore {sym} ptr x mem)
 11047  	for {
 11048  		sym := v.Aux
 11049  		mem := v.Args[2]
 11050  		ptr := v.Args[0]
 11051  		v_1 := v.Args[1]
 11052  		if v_1.Op != OpPPC64MOVWreg {
 11053  			break
 11054  		}
 11055  		x := v_1.Args[0]
 11056  		v.reset(OpPPC64MOVWBRstore)
 11057  		v.Aux = sym
 11058  		v.AddArg(ptr)
 11059  		v.AddArg(x)
 11060  		v.AddArg(mem)
 11061  		return true
 11062  	}
 11063  	// match: (MOVWBRstore {sym} ptr (MOVWZreg x) mem)
 11064  	// result: (MOVWBRstore {sym} ptr x mem)
 11065  	for {
 11066  		sym := v.Aux
 11067  		mem := v.Args[2]
 11068  		ptr := v.Args[0]
 11069  		v_1 := v.Args[1]
 11070  		if v_1.Op != OpPPC64MOVWZreg {
 11071  			break
 11072  		}
 11073  		x := v_1.Args[0]
 11074  		v.reset(OpPPC64MOVWBRstore)
 11075  		v.Aux = sym
 11076  		v.AddArg(ptr)
 11077  		v.AddArg(x)
 11078  		v.AddArg(mem)
 11079  		return true
 11080  	}
 11081  	return false
 11082  }
 11083  func rewriteValuePPC64_OpPPC64MOVWZload_0(v *Value) bool {
 11084  	// match: (MOVWZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 11085  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 11086  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11087  	for {
 11088  		off1 := v.AuxInt
 11089  		sym1 := v.Aux
 11090  		mem := v.Args[1]
 11091  		p := v.Args[0]
 11092  		if p.Op != OpPPC64MOVDaddr {
 11093  			break
 11094  		}
 11095  		off2 := p.AuxInt
 11096  		sym2 := p.Aux
 11097  		ptr := p.Args[0]
 11098  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 11099  			break
 11100  		}
 11101  		v.reset(OpPPC64MOVWZload)
 11102  		v.AuxInt = off1 + off2
 11103  		v.Aux = mergeSym(sym1, sym2)
 11104  		v.AddArg(ptr)
 11105  		v.AddArg(mem)
 11106  		return true
 11107  	}
 11108  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] x) mem)
 11109  	// cond: is16Bit(off1+off2)
 11110  	// result: (MOVWZload [off1+off2] {sym} x mem)
 11111  	for {
 11112  		off1 := v.AuxInt
 11113  		sym := v.Aux
 11114  		mem := v.Args[1]
 11115  		v_0 := v.Args[0]
 11116  		if v_0.Op != OpPPC64ADDconst {
 11117  			break
 11118  		}
 11119  		off2 := v_0.AuxInt
 11120  		x := v_0.Args[0]
 11121  		if !(is16Bit(off1 + off2)) {
 11122  			break
 11123  		}
 11124  		v.reset(OpPPC64MOVWZload)
 11125  		v.AuxInt = off1 + off2
 11126  		v.Aux = sym
 11127  		v.AddArg(x)
 11128  		v.AddArg(mem)
 11129  		return true
 11130  	}
 11131  	// match: (MOVWZload [0] {sym} p:(ADD ptr idx) mem)
 11132  	// cond: sym == nil && p.Uses == 1
 11133  	// result: (MOVWZloadidx ptr idx mem)
 11134  	for {
 11135  		if v.AuxInt != 0 {
 11136  			break
 11137  		}
 11138  		sym := v.Aux
 11139  		mem := v.Args[1]
 11140  		p := v.Args[0]
 11141  		if p.Op != OpPPC64ADD {
 11142  			break
 11143  		}
 11144  		idx := p.Args[1]
 11145  		ptr := p.Args[0]
 11146  		if !(sym == nil && p.Uses == 1) {
 11147  			break
 11148  		}
 11149  		v.reset(OpPPC64MOVWZloadidx)
 11150  		v.AddArg(ptr)
 11151  		v.AddArg(idx)
 11152  		v.AddArg(mem)
 11153  		return true
 11154  	}
 11155  	return false
 11156  }
 11157  func rewriteValuePPC64_OpPPC64MOVWZloadidx_0(v *Value) bool {
 11158  	// match: (MOVWZloadidx ptr (MOVDconst [c]) mem)
 11159  	// cond: is16Bit(c)
 11160  	// result: (MOVWZload [c] ptr mem)
 11161  	for {
 11162  		mem := v.Args[2]
 11163  		ptr := v.Args[0]
 11164  		v_1 := v.Args[1]
 11165  		if v_1.Op != OpPPC64MOVDconst {
 11166  			break
 11167  		}
 11168  		c := v_1.AuxInt
 11169  		if !(is16Bit(c)) {
 11170  			break
 11171  		}
 11172  		v.reset(OpPPC64MOVWZload)
 11173  		v.AuxInt = c
 11174  		v.AddArg(ptr)
 11175  		v.AddArg(mem)
 11176  		return true
 11177  	}
 11178  	// match: (MOVWZloadidx (MOVDconst [c]) ptr mem)
 11179  	// cond: is16Bit(c)
 11180  	// result: (MOVWZload [c] ptr mem)
 11181  	for {
 11182  		mem := v.Args[2]
 11183  		v_0 := v.Args[0]
 11184  		if v_0.Op != OpPPC64MOVDconst {
 11185  			break
 11186  		}
 11187  		c := v_0.AuxInt
 11188  		ptr := v.Args[1]
 11189  		if !(is16Bit(c)) {
 11190  			break
 11191  		}
 11192  		v.reset(OpPPC64MOVWZload)
 11193  		v.AuxInt = c
 11194  		v.AddArg(ptr)
 11195  		v.AddArg(mem)
 11196  		return true
 11197  	}
 11198  	return false
 11199  }
 11200  func rewriteValuePPC64_OpPPC64MOVWZreg_0(v *Value) bool {
 11201  	b := v.Block
 11202  	typ := &b.Func.Config.Types
 11203  	// match: (MOVWZreg y:(ANDconst [c] _))
 11204  	// cond: uint64(c) <= 0xFFFFFFFF
 11205  	// result: y
 11206  	for {
 11207  		y := v.Args[0]
 11208  		if y.Op != OpPPC64ANDconst {
 11209  			break
 11210  		}
 11211  		c := y.AuxInt
 11212  		if !(uint64(c) <= 0xFFFFFFFF) {
 11213  			break
 11214  		}
 11215  		v.reset(OpCopy)
 11216  		v.Type = y.Type
 11217  		v.AddArg(y)
 11218  		return true
 11219  	}
 11220  	// match: (MOVWZreg y:(AND (MOVDconst [c]) _))
 11221  	// cond: uint64(c) <= 0xFFFFFFFF
 11222  	// result: y
 11223  	for {
 11224  		y := v.Args[0]
 11225  		if y.Op != OpPPC64AND {
 11226  			break
 11227  		}
 11228  		_ = y.Args[1]
 11229  		y_0 := y.Args[0]
 11230  		if y_0.Op != OpPPC64MOVDconst {
 11231  			break
 11232  		}
 11233  		c := y_0.AuxInt
 11234  		if !(uint64(c) <= 0xFFFFFFFF) {
 11235  			break
 11236  		}
 11237  		v.reset(OpCopy)
 11238  		v.Type = y.Type
 11239  		v.AddArg(y)
 11240  		return true
 11241  	}
 11242  	// match: (MOVWZreg y:(AND _ (MOVDconst [c])))
 11243  	// cond: uint64(c) <= 0xFFFFFFFF
 11244  	// result: y
 11245  	for {
 11246  		y := v.Args[0]
 11247  		if y.Op != OpPPC64AND {
 11248  			break
 11249  		}
 11250  		_ = y.Args[1]
 11251  		y_1 := y.Args[1]
 11252  		if y_1.Op != OpPPC64MOVDconst {
 11253  			break
 11254  		}
 11255  		c := y_1.AuxInt
 11256  		if !(uint64(c) <= 0xFFFFFFFF) {
 11257  			break
 11258  		}
 11259  		v.reset(OpCopy)
 11260  		v.Type = y.Type
 11261  		v.AddArg(y)
 11262  		return true
 11263  	}
 11264  	// match: (MOVWZreg (SRWconst [c] (MOVBZreg x)))
 11265  	// result: (SRWconst [c] (MOVBZreg x))
 11266  	for {
 11267  		v_0 := v.Args[0]
 11268  		if v_0.Op != OpPPC64SRWconst {
 11269  			break
 11270  		}
 11271  		c := v_0.AuxInt
 11272  		v_0_0 := v_0.Args[0]
 11273  		if v_0_0.Op != OpPPC64MOVBZreg {
 11274  			break
 11275  		}
 11276  		x := v_0_0.Args[0]
 11277  		v.reset(OpPPC64SRWconst)
 11278  		v.AuxInt = c
 11279  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 11280  		v0.AddArg(x)
 11281  		v.AddArg(v0)
 11282  		return true
 11283  	}
 11284  	// match: (MOVWZreg (SRWconst [c] (MOVHZreg x)))
 11285  	// result: (SRWconst [c] (MOVHZreg x))
 11286  	for {
 11287  		v_0 := v.Args[0]
 11288  		if v_0.Op != OpPPC64SRWconst {
 11289  			break
 11290  		}
 11291  		c := v_0.AuxInt
 11292  		v_0_0 := v_0.Args[0]
 11293  		if v_0_0.Op != OpPPC64MOVHZreg {
 11294  			break
 11295  		}
 11296  		x := v_0_0.Args[0]
 11297  		v.reset(OpPPC64SRWconst)
 11298  		v.AuxInt = c
 11299  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 11300  		v0.AddArg(x)
 11301  		v.AddArg(v0)
 11302  		return true
 11303  	}
 11304  	// match: (MOVWZreg (SRWconst [c] (MOVWZreg x)))
 11305  	// result: (SRWconst [c] (MOVWZreg x))
 11306  	for {
 11307  		v_0 := v.Args[0]
 11308  		if v_0.Op != OpPPC64SRWconst {
 11309  			break
 11310  		}
 11311  		c := v_0.AuxInt
 11312  		v_0_0 := v_0.Args[0]
 11313  		if v_0_0.Op != OpPPC64MOVWZreg {
 11314  			break
 11315  		}
 11316  		x := v_0_0.Args[0]
 11317  		v.reset(OpPPC64SRWconst)
 11318  		v.AuxInt = c
 11319  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
 11320  		v0.AddArg(x)
 11321  		v.AddArg(v0)
 11322  		return true
 11323  	}
 11324  	// match: (MOVWZreg (SRWconst [c] x))
 11325  	// cond: sizeof(x.Type) <= 32
 11326  	// result: (SRWconst [c] x)
 11327  	for {
 11328  		v_0 := v.Args[0]
 11329  		if v_0.Op != OpPPC64SRWconst {
 11330  			break
 11331  		}
 11332  		c := v_0.AuxInt
 11333  		x := v_0.Args[0]
 11334  		if !(sizeof(x.Type) <= 32) {
 11335  			break
 11336  		}
 11337  		v.reset(OpPPC64SRWconst)
 11338  		v.AuxInt = c
 11339  		v.AddArg(x)
 11340  		return true
 11341  	}
 11342  	// match: (MOVWZreg (SRDconst [c] x))
 11343  	// cond: c>=32
 11344  	// result: (SRDconst [c] x)
 11345  	for {
 11346  		v_0 := v.Args[0]
 11347  		if v_0.Op != OpPPC64SRDconst {
 11348  			break
 11349  		}
 11350  		c := v_0.AuxInt
 11351  		x := v_0.Args[0]
 11352  		if !(c >= 32) {
 11353  			break
 11354  		}
 11355  		v.reset(OpPPC64SRDconst)
 11356  		v.AuxInt = c
 11357  		v.AddArg(x)
 11358  		return true
 11359  	}
 11360  	// match: (MOVWZreg y:(MOVWZreg _))
 11361  	// result: y
 11362  	for {
 11363  		y := v.Args[0]
 11364  		if y.Op != OpPPC64MOVWZreg {
 11365  			break
 11366  		}
 11367  		v.reset(OpCopy)
 11368  		v.Type = y.Type
 11369  		v.AddArg(y)
 11370  		return true
 11371  	}
 11372  	// match: (MOVWZreg y:(MOVHZreg _))
 11373  	// result: y
 11374  	for {
 11375  		y := v.Args[0]
 11376  		if y.Op != OpPPC64MOVHZreg {
 11377  			break
 11378  		}
 11379  		v.reset(OpCopy)
 11380  		v.Type = y.Type
 11381  		v.AddArg(y)
 11382  		return true
 11383  	}
 11384  	return false
 11385  }
 11386  func rewriteValuePPC64_OpPPC64MOVWZreg_10(v *Value) bool {
 11387  	// match: (MOVWZreg y:(MOVBZreg _))
 11388  	// result: y
 11389  	for {
 11390  		y := v.Args[0]
 11391  		if y.Op != OpPPC64MOVBZreg {
 11392  			break
 11393  		}
 11394  		v.reset(OpCopy)
 11395  		v.Type = y.Type
 11396  		v.AddArg(y)
 11397  		return true
 11398  	}
 11399  	// match: (MOVWZreg y:(MOVHBRload _ _))
 11400  	// result: y
 11401  	for {
 11402  		y := v.Args[0]
 11403  		if y.Op != OpPPC64MOVHBRload {
 11404  			break
 11405  		}
 11406  		_ = y.Args[1]
 11407  		v.reset(OpCopy)
 11408  		v.Type = y.Type
 11409  		v.AddArg(y)
 11410  		return true
 11411  	}
 11412  	// match: (MOVWZreg y:(MOVWBRload _ _))
 11413  	// result: y
 11414  	for {
 11415  		y := v.Args[0]
 11416  		if y.Op != OpPPC64MOVWBRload {
 11417  			break
 11418  		}
 11419  		_ = y.Args[1]
 11420  		v.reset(OpCopy)
 11421  		v.Type = y.Type
 11422  		v.AddArg(y)
 11423  		return true
 11424  	}
 11425  	// match: (MOVWZreg y:(MOVWreg x))
 11426  	// result: (MOVWZreg x)
 11427  	for {
 11428  		y := v.Args[0]
 11429  		if y.Op != OpPPC64MOVWreg {
 11430  			break
 11431  		}
 11432  		x := y.Args[0]
 11433  		v.reset(OpPPC64MOVWZreg)
 11434  		v.AddArg(x)
 11435  		return true
 11436  	}
 11437  	// match: (MOVWZreg x:(MOVBZload _ _))
 11438  	// result: x
 11439  	for {
 11440  		x := v.Args[0]
 11441  		if x.Op != OpPPC64MOVBZload {
 11442  			break
 11443  		}
 11444  		_ = x.Args[1]
 11445  		v.reset(OpCopy)
 11446  		v.Type = x.Type
 11447  		v.AddArg(x)
 11448  		return true
 11449  	}
 11450  	// match: (MOVWZreg x:(MOVBZloadidx _ _ _))
 11451  	// result: x
 11452  	for {
 11453  		x := v.Args[0]
 11454  		if x.Op != OpPPC64MOVBZloadidx {
 11455  			break
 11456  		}
 11457  		_ = x.Args[2]
 11458  		v.reset(OpCopy)
 11459  		v.Type = x.Type
 11460  		v.AddArg(x)
 11461  		return true
 11462  	}
 11463  	// match: (MOVWZreg x:(MOVHZload _ _))
 11464  	// result: x
 11465  	for {
 11466  		x := v.Args[0]
 11467  		if x.Op != OpPPC64MOVHZload {
 11468  			break
 11469  		}
 11470  		_ = x.Args[1]
 11471  		v.reset(OpCopy)
 11472  		v.Type = x.Type
 11473  		v.AddArg(x)
 11474  		return true
 11475  	}
 11476  	// match: (MOVWZreg x:(MOVHZloadidx _ _ _))
 11477  	// result: x
 11478  	for {
 11479  		x := v.Args[0]
 11480  		if x.Op != OpPPC64MOVHZloadidx {
 11481  			break
 11482  		}
 11483  		_ = x.Args[2]
 11484  		v.reset(OpCopy)
 11485  		v.Type = x.Type
 11486  		v.AddArg(x)
 11487  		return true
 11488  	}
 11489  	// match: (MOVWZreg x:(MOVWZload _ _))
 11490  	// result: x
 11491  	for {
 11492  		x := v.Args[0]
 11493  		if x.Op != OpPPC64MOVWZload {
 11494  			break
 11495  		}
 11496  		_ = x.Args[1]
 11497  		v.reset(OpCopy)
 11498  		v.Type = x.Type
 11499  		v.AddArg(x)
 11500  		return true
 11501  	}
 11502  	// match: (MOVWZreg x:(MOVWZloadidx _ _ _))
 11503  	// result: x
 11504  	for {
 11505  		x := v.Args[0]
 11506  		if x.Op != OpPPC64MOVWZloadidx {
 11507  			break
 11508  		}
 11509  		_ = x.Args[2]
 11510  		v.reset(OpCopy)
 11511  		v.Type = x.Type
 11512  		v.AddArg(x)
 11513  		return true
 11514  	}
 11515  	return false
 11516  }
 11517  func rewriteValuePPC64_OpPPC64MOVWZreg_20(v *Value) bool {
 11518  	// match: (MOVWZreg x:(Arg <t>))
 11519  	// cond: (is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)
 11520  	// result: x
 11521  	for {
 11522  		x := v.Args[0]
 11523  		if x.Op != OpArg {
 11524  			break
 11525  		}
 11526  		t := x.Type
 11527  		if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)) {
 11528  			break
 11529  		}
 11530  		v.reset(OpCopy)
 11531  		v.Type = x.Type
 11532  		v.AddArg(x)
 11533  		return true
 11534  	}
 11535  	// match: (MOVWZreg (MOVDconst [c]))
 11536  	// result: (MOVDconst [int64(uint32(c))])
 11537  	for {
 11538  		v_0 := v.Args[0]
 11539  		if v_0.Op != OpPPC64MOVDconst {
 11540  			break
 11541  		}
 11542  		c := v_0.AuxInt
 11543  		v.reset(OpPPC64MOVDconst)
 11544  		v.AuxInt = int64(uint32(c))
 11545  		return true
 11546  	}
 11547  	return false
 11548  }
 11549  func rewriteValuePPC64_OpPPC64MOVWload_0(v *Value) bool {
 11550  	// match: (MOVWload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 11551  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0
 11552  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11553  	for {
 11554  		off1 := v.AuxInt
 11555  		sym1 := v.Aux
 11556  		mem := v.Args[1]
 11557  		p := v.Args[0]
 11558  		if p.Op != OpPPC64MOVDaddr {
 11559  			break
 11560  		}
 11561  		off2 := p.AuxInt
 11562  		sym2 := p.Aux
 11563  		ptr := p.Args[0]
 11564  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1) && (off1+off2)%4 == 0) {
 11565  			break
 11566  		}
 11567  		v.reset(OpPPC64MOVWload)
 11568  		v.AuxInt = off1 + off2
 11569  		v.Aux = mergeSym(sym1, sym2)
 11570  		v.AddArg(ptr)
 11571  		v.AddArg(mem)
 11572  		return true
 11573  	}
 11574  	// match: (MOVWload [off1] {sym} (ADDconst [off2] x) mem)
 11575  	// cond: is16Bit(off1+off2) && (off1+off2)%4 == 0
 11576  	// result: (MOVWload [off1+off2] {sym} x mem)
 11577  	for {
 11578  		off1 := v.AuxInt
 11579  		sym := v.Aux
 11580  		mem := v.Args[1]
 11581  		v_0 := v.Args[0]
 11582  		if v_0.Op != OpPPC64ADDconst {
 11583  			break
 11584  		}
 11585  		off2 := v_0.AuxInt
 11586  		x := v_0.Args[0]
 11587  		if !(is16Bit(off1+off2) && (off1+off2)%4 == 0) {
 11588  			break
 11589  		}
 11590  		v.reset(OpPPC64MOVWload)
 11591  		v.AuxInt = off1 + off2
 11592  		v.Aux = sym
 11593  		v.AddArg(x)
 11594  		v.AddArg(mem)
 11595  		return true
 11596  	}
 11597  	// match: (MOVWload [0] {sym} p:(ADD ptr idx) mem)
 11598  	// cond: sym == nil && p.Uses == 1
 11599  	// result: (MOVWloadidx ptr idx mem)
 11600  	for {
 11601  		if v.AuxInt != 0 {
 11602  			break
 11603  		}
 11604  		sym := v.Aux
 11605  		mem := v.Args[1]
 11606  		p := v.Args[0]
 11607  		if p.Op != OpPPC64ADD {
 11608  			break
 11609  		}
 11610  		idx := p.Args[1]
 11611  		ptr := p.Args[0]
 11612  		if !(sym == nil && p.Uses == 1) {
 11613  			break
 11614  		}
 11615  		v.reset(OpPPC64MOVWloadidx)
 11616  		v.AddArg(ptr)
 11617  		v.AddArg(idx)
 11618  		v.AddArg(mem)
 11619  		return true
 11620  	}
 11621  	return false
 11622  }
 11623  func rewriteValuePPC64_OpPPC64MOVWloadidx_0(v *Value) bool {
 11624  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11625  	// cond: is16Bit(c) && c%4 == 0
 11626  	// result: (MOVWload [c] ptr mem)
 11627  	for {
 11628  		mem := v.Args[2]
 11629  		ptr := v.Args[0]
 11630  		v_1 := v.Args[1]
 11631  		if v_1.Op != OpPPC64MOVDconst {
 11632  			break
 11633  		}
 11634  		c := v_1.AuxInt
 11635  		if !(is16Bit(c) && c%4 == 0) {
 11636  			break
 11637  		}
 11638  		v.reset(OpPPC64MOVWload)
 11639  		v.AuxInt = c
 11640  		v.AddArg(ptr)
 11641  		v.AddArg(mem)
 11642  		return true
 11643  	}
 11644  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 11645  	// cond: is16Bit(c) && c%4 == 0
 11646  	// result: (MOVWload [c] ptr mem)
 11647  	for {
 11648  		mem := v.Args[2]
 11649  		v_0 := v.Args[0]
 11650  		if v_0.Op != OpPPC64MOVDconst {
 11651  			break
 11652  		}
 11653  		c := v_0.AuxInt
 11654  		ptr := v.Args[1]
 11655  		if !(is16Bit(c) && c%4 == 0) {
 11656  			break
 11657  		}
 11658  		v.reset(OpPPC64MOVWload)
 11659  		v.AuxInt = c
 11660  		v.AddArg(ptr)
 11661  		v.AddArg(mem)
 11662  		return true
 11663  	}
 11664  	return false
 11665  }
 11666  func rewriteValuePPC64_OpPPC64MOVWreg_0(v *Value) bool {
 11667  	b := v.Block
 11668  	typ := &b.Func.Config.Types
 11669  	// match: (MOVWreg y:(ANDconst [c] _))
 11670  	// cond: uint64(c) <= 0xFFFF
 11671  	// result: y
 11672  	for {
 11673  		y := v.Args[0]
 11674  		if y.Op != OpPPC64ANDconst {
 11675  			break
 11676  		}
 11677  		c := y.AuxInt
 11678  		if !(uint64(c) <= 0xFFFF) {
 11679  			break
 11680  		}
 11681  		v.reset(OpCopy)
 11682  		v.Type = y.Type
 11683  		v.AddArg(y)
 11684  		return true
 11685  	}
 11686  	// match: (MOVWreg y:(AND (MOVDconst [c]) _))
 11687  	// cond: uint64(c) <= 0x7FFFFFFF
 11688  	// result: y
 11689  	for {
 11690  		y := v.Args[0]
 11691  		if y.Op != OpPPC64AND {
 11692  			break
 11693  		}
 11694  		_ = y.Args[1]
 11695  		y_0 := y.Args[0]
 11696  		if y_0.Op != OpPPC64MOVDconst {
 11697  			break
 11698  		}
 11699  		c := y_0.AuxInt
 11700  		if !(uint64(c) <= 0x7FFFFFFF) {
 11701  			break
 11702  		}
 11703  		v.reset(OpCopy)
 11704  		v.Type = y.Type
 11705  		v.AddArg(y)
 11706  		return true
 11707  	}
 11708  	// match: (MOVWreg y:(AND _ (MOVDconst [c])))
 11709  	// cond: uint64(c) <= 0x7FFFFFFF
 11710  	// result: y
 11711  	for {
 11712  		y := v.Args[0]
 11713  		if y.Op != OpPPC64AND {
 11714  			break
 11715  		}
 11716  		_ = y.Args[1]
 11717  		y_1 := y.Args[1]
 11718  		if y_1.Op != OpPPC64MOVDconst {
 11719  			break
 11720  		}
 11721  		c := y_1.AuxInt
 11722  		if !(uint64(c) <= 0x7FFFFFFF) {
 11723  			break
 11724  		}
 11725  		v.reset(OpCopy)
 11726  		v.Type = y.Type
 11727  		v.AddArg(y)
 11728  		return true
 11729  	}
 11730  	// match: (MOVWreg (SRAWconst [c] (MOVBreg x)))
 11731  	// result: (SRAWconst [c] (MOVBreg x))
 11732  	for {
 11733  		v_0 := v.Args[0]
 11734  		if v_0.Op != OpPPC64SRAWconst {
 11735  			break
 11736  		}
 11737  		c := v_0.AuxInt
 11738  		v_0_0 := v_0.Args[0]
 11739  		if v_0_0.Op != OpPPC64MOVBreg {
 11740  			break
 11741  		}
 11742  		x := v_0_0.Args[0]
 11743  		v.reset(OpPPC64SRAWconst)
 11744  		v.AuxInt = c
 11745  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 11746  		v0.AddArg(x)
 11747  		v.AddArg(v0)
 11748  		return true
 11749  	}
 11750  	// match: (MOVWreg (SRAWconst [c] (MOVHreg x)))
 11751  	// result: (SRAWconst [c] (MOVHreg x))
 11752  	for {
 11753  		v_0 := v.Args[0]
 11754  		if v_0.Op != OpPPC64SRAWconst {
 11755  			break
 11756  		}
 11757  		c := v_0.AuxInt
 11758  		v_0_0 := v_0.Args[0]
 11759  		if v_0_0.Op != OpPPC64MOVHreg {
 11760  			break
 11761  		}
 11762  		x := v_0_0.Args[0]
 11763  		v.reset(OpPPC64SRAWconst)
 11764  		v.AuxInt = c
 11765  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 11766  		v0.AddArg(x)
 11767  		v.AddArg(v0)
 11768  		return true
 11769  	}
 11770  	// match: (MOVWreg (SRAWconst [c] (MOVWreg x)))
 11771  	// result: (SRAWconst [c] (MOVWreg x))
 11772  	for {
 11773  		v_0 := v.Args[0]
 11774  		if v_0.Op != OpPPC64SRAWconst {
 11775  			break
 11776  		}
 11777  		c := v_0.AuxInt
 11778  		v_0_0 := v_0.Args[0]
 11779  		if v_0_0.Op != OpPPC64MOVWreg {
 11780  			break
 11781  		}
 11782  		x := v_0_0.Args[0]
 11783  		v.reset(OpPPC64SRAWconst)
 11784  		v.AuxInt = c
 11785  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWreg, typ.Int64)
 11786  		v0.AddArg(x)
 11787  		v.AddArg(v0)
 11788  		return true
 11789  	}
 11790  	// match: (MOVWreg (SRAWconst [c] x))
 11791  	// cond: sizeof(x.Type) <= 32
 11792  	// result: (SRAWconst [c] x)
 11793  	for {
 11794  		v_0 := v.Args[0]
 11795  		if v_0.Op != OpPPC64SRAWconst {
 11796  			break
 11797  		}
 11798  		c := v_0.AuxInt
 11799  		x := v_0.Args[0]
 11800  		if !(sizeof(x.Type) <= 32) {
 11801  			break
 11802  		}
 11803  		v.reset(OpPPC64SRAWconst)
 11804  		v.AuxInt = c
 11805  		v.AddArg(x)
 11806  		return true
 11807  	}
 11808  	// match: (MOVWreg (SRDconst [c] x))
 11809  	// cond: c>32
 11810  	// result: (SRDconst [c] x)
 11811  	for {
 11812  		v_0 := v.Args[0]
 11813  		if v_0.Op != OpPPC64SRDconst {
 11814  			break
 11815  		}
 11816  		c := v_0.AuxInt
 11817  		x := v_0.Args[0]
 11818  		if !(c > 32) {
 11819  			break
 11820  		}
 11821  		v.reset(OpPPC64SRDconst)
 11822  		v.AuxInt = c
 11823  		v.AddArg(x)
 11824  		return true
 11825  	}
 11826  	// match: (MOVWreg (SRDconst [c] x))
 11827  	// cond: c==32
 11828  	// result: (SRADconst [c] x)
 11829  	for {
 11830  		v_0 := v.Args[0]
 11831  		if v_0.Op != OpPPC64SRDconst {
 11832  			break
 11833  		}
 11834  		c := v_0.AuxInt
 11835  		x := v_0.Args[0]
 11836  		if !(c == 32) {
 11837  			break
 11838  		}
 11839  		v.reset(OpPPC64SRADconst)
 11840  		v.AuxInt = c
 11841  		v.AddArg(x)
 11842  		return true
 11843  	}
 11844  	// match: (MOVWreg y:(MOVWreg _))
 11845  	// result: y
 11846  	for {
 11847  		y := v.Args[0]
 11848  		if y.Op != OpPPC64MOVWreg {
 11849  			break
 11850  		}
 11851  		v.reset(OpCopy)
 11852  		v.Type = y.Type
 11853  		v.AddArg(y)
 11854  		return true
 11855  	}
 11856  	return false
 11857  }
 11858  func rewriteValuePPC64_OpPPC64MOVWreg_10(v *Value) bool {
 11859  	// match: (MOVWreg y:(MOVHreg _))
 11860  	// result: y
 11861  	for {
 11862  		y := v.Args[0]
 11863  		if y.Op != OpPPC64MOVHreg {
 11864  			break
 11865  		}
 11866  		v.reset(OpCopy)
 11867  		v.Type = y.Type
 11868  		v.AddArg(y)
 11869  		return true
 11870  	}
 11871  	// match: (MOVWreg y:(MOVBreg _))
 11872  	// result: y
 11873  	for {
 11874  		y := v.Args[0]
 11875  		if y.Op != OpPPC64MOVBreg {
 11876  			break
 11877  		}
 11878  		v.reset(OpCopy)
 11879  		v.Type = y.Type
 11880  		v.AddArg(y)
 11881  		return true
 11882  	}
 11883  	// match: (MOVWreg y:(MOVWZreg x))
 11884  	// result: (MOVWreg x)
 11885  	for {
 11886  		y := v.Args[0]
 11887  		if y.Op != OpPPC64MOVWZreg {
 11888  			break
 11889  		}
 11890  		x := y.Args[0]
 11891  		v.reset(OpPPC64MOVWreg)
 11892  		v.AddArg(x)
 11893  		return true
 11894  	}
 11895  	// match: (MOVWreg x:(MOVHload _ _))
 11896  	// result: x
 11897  	for {
 11898  		x := v.Args[0]
 11899  		if x.Op != OpPPC64MOVHload {
 11900  			break
 11901  		}
 11902  		_ = x.Args[1]
 11903  		v.reset(OpCopy)
 11904  		v.Type = x.Type
 11905  		v.AddArg(x)
 11906  		return true
 11907  	}
 11908  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
 11909  	// result: x
 11910  	for {
 11911  		x := v.Args[0]
 11912  		if x.Op != OpPPC64MOVHloadidx {
 11913  			break
 11914  		}
 11915  		_ = x.Args[2]
 11916  		v.reset(OpCopy)
 11917  		v.Type = x.Type
 11918  		v.AddArg(x)
 11919  		return true
 11920  	}
 11921  	// match: (MOVWreg x:(MOVWload _ _))
 11922  	// result: x
 11923  	for {
 11924  		x := v.Args[0]
 11925  		if x.Op != OpPPC64MOVWload {
 11926  			break
 11927  		}
 11928  		_ = x.Args[1]
 11929  		v.reset(OpCopy)
 11930  		v.Type = x.Type
 11931  		v.AddArg(x)
 11932  		return true
 11933  	}
 11934  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
 11935  	// result: x
 11936  	for {
 11937  		x := v.Args[0]
 11938  		if x.Op != OpPPC64MOVWloadidx {
 11939  			break
 11940  		}
 11941  		_ = x.Args[2]
 11942  		v.reset(OpCopy)
 11943  		v.Type = x.Type
 11944  		v.AddArg(x)
 11945  		return true
 11946  	}
 11947  	// match: (MOVWreg x:(Arg <t>))
 11948  	// cond: (is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)
 11949  	// result: x
 11950  	for {
 11951  		x := v.Args[0]
 11952  		if x.Op != OpArg {
 11953  			break
 11954  		}
 11955  		t := x.Type
 11956  		if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)) {
 11957  			break
 11958  		}
 11959  		v.reset(OpCopy)
 11960  		v.Type = x.Type
 11961  		v.AddArg(x)
 11962  		return true
 11963  	}
 11964  	// match: (MOVWreg (MOVDconst [c]))
 11965  	// result: (MOVDconst [int64(int32(c))])
 11966  	for {
 11967  		v_0 := v.Args[0]
 11968  		if v_0.Op != OpPPC64MOVDconst {
 11969  			break
 11970  		}
 11971  		c := v_0.AuxInt
 11972  		v.reset(OpPPC64MOVDconst)
 11973  		v.AuxInt = int64(int32(c))
 11974  		return true
 11975  	}
 11976  	return false
 11977  }
 11978  func rewriteValuePPC64_OpPPC64MOVWstore_0(v *Value) bool {
 11979  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] x) val mem)
 11980  	// cond: is16Bit(off1+off2)
 11981  	// result: (MOVWstore [off1+off2] {sym} x val mem)
 11982  	for {
 11983  		off1 := v.AuxInt
 11984  		sym := v.Aux
 11985  		mem := v.Args[2]
 11986  		v_0 := v.Args[0]
 11987  		if v_0.Op != OpPPC64ADDconst {
 11988  			break
 11989  		}
 11990  		off2 := v_0.AuxInt
 11991  		x := v_0.Args[0]
 11992  		val := v.Args[1]
 11993  		if !(is16Bit(off1 + off2)) {
 11994  			break
 11995  		}
 11996  		v.reset(OpPPC64MOVWstore)
 11997  		v.AuxInt = off1 + off2
 11998  		v.Aux = sym
 11999  		v.AddArg(x)
 12000  		v.AddArg(val)
 12001  		v.AddArg(mem)
 12002  		return true
 12003  	}
 12004  	// match: (MOVWstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
 12005  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 12006  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 12007  	for {
 12008  		off1 := v.AuxInt
 12009  		sym1 := v.Aux
 12010  		mem := v.Args[2]
 12011  		p := v.Args[0]
 12012  		if p.Op != OpPPC64MOVDaddr {
 12013  			break
 12014  		}
 12015  		off2 := p.AuxInt
 12016  		sym2 := p.Aux
 12017  		ptr := p.Args[0]
 12018  		val := v.Args[1]
 12019  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 12020  			break
 12021  		}
 12022  		v.reset(OpPPC64MOVWstore)
 12023  		v.AuxInt = off1 + off2
 12024  		v.Aux = mergeSym(sym1, sym2)
 12025  		v.AddArg(ptr)
 12026  		v.AddArg(val)
 12027  		v.AddArg(mem)
 12028  		return true
 12029  	}
 12030  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [0]) mem)
 12031  	// result: (MOVWstorezero [off] {sym} ptr mem)
 12032  	for {
 12033  		off := v.AuxInt
 12034  		sym := v.Aux
 12035  		mem := v.Args[2]
 12036  		ptr := v.Args[0]
 12037  		v_1 := v.Args[1]
 12038  		if v_1.Op != OpPPC64MOVDconst || v_1.AuxInt != 0 {
 12039  			break
 12040  		}
 12041  		v.reset(OpPPC64MOVWstorezero)
 12042  		v.AuxInt = off
 12043  		v.Aux = sym
 12044  		v.AddArg(ptr)
 12045  		v.AddArg(mem)
 12046  		return true
 12047  	}
 12048  	// match: (MOVWstore [off] {sym} p:(ADD ptr idx) val mem)
 12049  	// cond: off == 0 && sym == nil && p.Uses == 1
 12050  	// result: (MOVWstoreidx ptr idx val mem)
 12051  	for {
 12052  		off := v.AuxInt
 12053  		sym := v.Aux
 12054  		mem := v.Args[2]
 12055  		p := v.Args[0]
 12056  		if p.Op != OpPPC64ADD {
 12057  			break
 12058  		}
 12059  		idx := p.Args[1]
 12060  		ptr := p.Args[0]
 12061  		val := v.Args[1]
 12062  		if !(off == 0 && sym == nil && p.Uses == 1) {
 12063  			break
 12064  		}
 12065  		v.reset(OpPPC64MOVWstoreidx)
 12066  		v.AddArg(ptr)
 12067  		v.AddArg(idx)
 12068  		v.AddArg(val)
 12069  		v.AddArg(mem)
 12070  		return true
 12071  	}
 12072  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 12073  	// result: (MOVWstore [off] {sym} ptr x mem)
 12074  	for {
 12075  		off := v.AuxInt
 12076  		sym := v.Aux
 12077  		mem := v.Args[2]
 12078  		ptr := v.Args[0]
 12079  		v_1 := v.Args[1]
 12080  		if v_1.Op != OpPPC64MOVWreg {
 12081  			break
 12082  		}
 12083  		x := v_1.Args[0]
 12084  		v.reset(OpPPC64MOVWstore)
 12085  		v.AuxInt = off
 12086  		v.Aux = sym
 12087  		v.AddArg(ptr)
 12088  		v.AddArg(x)
 12089  		v.AddArg(mem)
 12090  		return true
 12091  	}
 12092  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 12093  	// result: (MOVWstore [off] {sym} ptr x mem)
 12094  	for {
 12095  		off := v.AuxInt
 12096  		sym := v.Aux
 12097  		mem := v.Args[2]
 12098  		ptr := v.Args[0]
 12099  		v_1 := v.Args[1]
 12100  		if v_1.Op != OpPPC64MOVWZreg {
 12101  			break
 12102  		}
 12103  		x := v_1.Args[0]
 12104  		v.reset(OpPPC64MOVWstore)
 12105  		v.AuxInt = off
 12106  		v.Aux = sym
 12107  		v.AddArg(ptr)
 12108  		v.AddArg(x)
 12109  		v.AddArg(mem)
 12110  		return true
 12111  	}
 12112  	return false
 12113  }
 12114  func rewriteValuePPC64_OpPPC64MOVWstoreidx_0(v *Value) bool {
 12115  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 12116  	// cond: is16Bit(c)
 12117  	// result: (MOVWstore [c] ptr val mem)
 12118  	for {
 12119  		mem := v.Args[3]
 12120  		ptr := v.Args[0]
 12121  		v_1 := v.Args[1]
 12122  		if v_1.Op != OpPPC64MOVDconst {
 12123  			break
 12124  		}
 12125  		c := v_1.AuxInt
 12126  		val := v.Args[2]
 12127  		if !(is16Bit(c)) {
 12128  			break
 12129  		}
 12130  		v.reset(OpPPC64MOVWstore)
 12131  		v.AuxInt = c
 12132  		v.AddArg(ptr)
 12133  		v.AddArg(val)
 12134  		v.AddArg(mem)
 12135  		return true
 12136  	}
 12137  	// match: (MOVWstoreidx (MOVDconst [c]) ptr val mem)
 12138  	// cond: is16Bit(c)
 12139  	// result: (MOVWstore [c] ptr val mem)
 12140  	for {
 12141  		mem := v.Args[3]
 12142  		v_0 := v.Args[0]
 12143  		if v_0.Op != OpPPC64MOVDconst {
 12144  			break
 12145  		}
 12146  		c := v_0.AuxInt
 12147  		ptr := v.Args[1]
 12148  		val := v.Args[2]
 12149  		if !(is16Bit(c)) {
 12150  			break
 12151  		}
 12152  		v.reset(OpPPC64MOVWstore)
 12153  		v.AuxInt = c
 12154  		v.AddArg(ptr)
 12155  		v.AddArg(val)
 12156  		v.AddArg(mem)
 12157  		return true
 12158  	}
 12159  	// match: (MOVWstoreidx [off] {sym} ptr idx (MOVWreg x) mem)
 12160  	// result: (MOVWstoreidx [off] {sym} ptr idx x mem)
 12161  	for {
 12162  		off := v.AuxInt
 12163  		sym := v.Aux
 12164  		mem := v.Args[3]
 12165  		ptr := v.Args[0]
 12166  		idx := v.Args[1]
 12167  		v_2 := v.Args[2]
 12168  		if v_2.Op != OpPPC64MOVWreg {
 12169  			break
 12170  		}
 12171  		x := v_2.Args[0]
 12172  		v.reset(OpPPC64MOVWstoreidx)
 12173  		v.AuxInt = off
 12174  		v.Aux = sym
 12175  		v.AddArg(ptr)
 12176  		v.AddArg(idx)
 12177  		v.AddArg(x)
 12178  		v.AddArg(mem)
 12179  		return true
 12180  	}
 12181  	// match: (MOVWstoreidx [off] {sym} ptr idx (MOVWZreg x) mem)
 12182  	// result: (MOVWstoreidx [off] {sym} ptr idx x mem)
 12183  	for {
 12184  		off := v.AuxInt
 12185  		sym := v.Aux
 12186  		mem := v.Args[3]
 12187  		ptr := v.Args[0]
 12188  		idx := v.Args[1]
 12189  		v_2 := v.Args[2]
 12190  		if v_2.Op != OpPPC64MOVWZreg {
 12191  			break
 12192  		}
 12193  		x := v_2.Args[0]
 12194  		v.reset(OpPPC64MOVWstoreidx)
 12195  		v.AuxInt = off
 12196  		v.Aux = sym
 12197  		v.AddArg(ptr)
 12198  		v.AddArg(idx)
 12199  		v.AddArg(x)
 12200  		v.AddArg(mem)
 12201  		return true
 12202  	}
 12203  	return false
 12204  }
 12205  func rewriteValuePPC64_OpPPC64MOVWstorezero_0(v *Value) bool {
 12206  	// match: (MOVWstorezero [off1] {sym} (ADDconst [off2] x) mem)
 12207  	// cond: is16Bit(off1+off2)
 12208  	// result: (MOVWstorezero [off1+off2] {sym} x mem)
 12209  	for {
 12210  		off1 := v.AuxInt
 12211  		sym := v.Aux
 12212  		mem := v.Args[1]
 12213  		v_0 := v.Args[0]
 12214  		if v_0.Op != OpPPC64ADDconst {
 12215  			break
 12216  		}
 12217  		off2 := v_0.AuxInt
 12218  		x := v_0.Args[0]
 12219  		if !(is16Bit(off1 + off2)) {
 12220  			break
 12221  		}
 12222  		v.reset(OpPPC64MOVWstorezero)
 12223  		v.AuxInt = off1 + off2
 12224  		v.Aux = sym
 12225  		v.AddArg(x)
 12226  		v.AddArg(mem)
 12227  		return true
 12228  	}
 12229  	// match: (MOVWstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 12230  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
 12231  	// result: (MOVWstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
 12232  	for {
 12233  		off1 := v.AuxInt
 12234  		sym1 := v.Aux
 12235  		mem := v.Args[1]
 12236  		p := v.Args[0]
 12237  		if p.Op != OpPPC64MOVDaddr {
 12238  			break
 12239  		}
 12240  		off2 := p.AuxInt
 12241  		sym2 := p.Aux
 12242  		x := p.Args[0]
 12243  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
 12244  			break
 12245  		}
 12246  		v.reset(OpPPC64MOVWstorezero)
 12247  		v.AuxInt = off1 + off2
 12248  		v.Aux = mergeSym(sym1, sym2)
 12249  		v.AddArg(x)
 12250  		v.AddArg(mem)
 12251  		return true
 12252  	}
 12253  	return false
 12254  }
 12255  func rewriteValuePPC64_OpPPC64MTVSRD_0(v *Value) bool {
 12256  	b := v.Block
 12257  	typ := &b.Func.Config.Types
 12258  	// match: (MTVSRD (MOVDconst [c]))
 12259  	// result: (FMOVDconst [c])
 12260  	for {
 12261  		v_0 := v.Args[0]
 12262  		if v_0.Op != OpPPC64MOVDconst {
 12263  			break
 12264  		}
 12265  		c := v_0.AuxInt
 12266  		v.reset(OpPPC64FMOVDconst)
 12267  		v.AuxInt = c
 12268  		return true
 12269  	}
 12270  	// match: (MTVSRD x:(MOVDload [off] {sym} ptr mem))
 12271  	// cond: x.Uses == 1 && clobber(x)
 12272  	// result: @x.Block (FMOVDload [off] {sym} ptr mem)
 12273  	for {
 12274  		x := v.Args[0]
 12275  		if x.Op != OpPPC64MOVDload {
 12276  			break
 12277  		}
 12278  		off := x.AuxInt
 12279  		sym := x.Aux
 12280  		mem := x.Args[1]
 12281  		ptr := x.Args[0]
 12282  		if !(x.Uses == 1 && clobber(x)) {
 12283  			break
 12284  		}
 12285  		b = x.Block
 12286  		v0 := b.NewValue0(x.Pos, OpPPC64FMOVDload, typ.Float64)
 12287  		v.reset(OpCopy)
 12288  		v.AddArg(v0)
 12289  		v0.AuxInt = off
 12290  		v0.Aux = sym
 12291  		v0.AddArg(ptr)
 12292  		v0.AddArg(mem)
 12293  		return true
 12294  	}
 12295  	return false
 12296  }
 12297  func rewriteValuePPC64_OpPPC64MaskIfNotCarry_0(v *Value) bool {
 12298  	// match: (MaskIfNotCarry (ADDconstForCarry [c] (ANDconst [d] _)))
 12299  	// cond: c < 0 && d > 0 && c + d < 0
 12300  	// result: (MOVDconst [-1])
 12301  	for {
 12302  		v_0 := v.Args[0]
 12303  		if v_0.Op != OpPPC64ADDconstForCarry {
 12304  			break
 12305  		}
 12306  		c := v_0.AuxInt
 12307  		v_0_0 := v_0.Args[0]
 12308  		if v_0_0.Op != OpPPC64ANDconst {
 12309  			break
 12310  		}
 12311  		d := v_0_0.AuxInt
 12312  		if !(c < 0 && d > 0 && c+d < 0) {
 12313  			break
 12314  		}
 12315  		v.reset(OpPPC64MOVDconst)
 12316  		v.AuxInt = -1
 12317  		return true
 12318  	}
 12319  	return false
 12320  }
 12321  func rewriteValuePPC64_OpPPC64NotEqual_0(v *Value) bool {
 12322  	b := v.Block
 12323  	typ := &b.Func.Config.Types
 12324  	// match: (NotEqual (FlagEQ))
 12325  	// result: (MOVDconst [0])
 12326  	for {
 12327  		v_0 := v.Args[0]
 12328  		if v_0.Op != OpPPC64FlagEQ {
 12329  			break
 12330  		}
 12331  		v.reset(OpPPC64MOVDconst)
 12332  		v.AuxInt = 0
 12333  		return true
 12334  	}
 12335  	// match: (NotEqual (FlagLT))
 12336  	// result: (MOVDconst [1])
 12337  	for {
 12338  		v_0 := v.Args[0]
 12339  		if v_0.Op != OpPPC64FlagLT {
 12340  			break
 12341  		}
 12342  		v.reset(OpPPC64MOVDconst)
 12343  		v.AuxInt = 1
 12344  		return true
 12345  	}
 12346  	// match: (NotEqual (FlagGT))
 12347  	// result: (MOVDconst [1])
 12348  	for {
 12349  		v_0 := v.Args[0]
 12350  		if v_0.Op != OpPPC64FlagGT {
 12351  			break
 12352  		}
 12353  		v.reset(OpPPC64MOVDconst)
 12354  		v.AuxInt = 1
 12355  		return true
 12356  	}
 12357  	// match: (NotEqual (InvertFlags x))
 12358  	// result: (NotEqual x)
 12359  	for {
 12360  		v_0 := v.Args[0]
 12361  		if v_0.Op != OpPPC64InvertFlags {
 12362  			break
 12363  		}
 12364  		x := v_0.Args[0]
 12365  		v.reset(OpPPC64NotEqual)
 12366  		v.AddArg(x)
 12367  		return true
 12368  	}
 12369  	// match: (NotEqual cmp)
 12370  	// result: (ISELB [6] (MOVDconst [1]) cmp)
 12371  	for {
 12372  		cmp := v.Args[0]
 12373  		v.reset(OpPPC64ISELB)
 12374  		v.AuxInt = 6
 12375  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 12376  		v0.AuxInt = 1
 12377  		v.AddArg(v0)
 12378  		v.AddArg(cmp)
 12379  		return true
 12380  	}
 12381  }
 12382  func rewriteValuePPC64_OpPPC64OR_0(v *Value) bool {
 12383  	b := v.Block
 12384  	typ := &b.Func.Config.Types
 12385  	// match: (OR (SLDconst x [c]) (SRDconst x [d]))
 12386  	// cond: d == 64-c
 12387  	// result: (ROTLconst [c] x)
 12388  	for {
 12389  		_ = v.Args[1]
 12390  		v_0 := v.Args[0]
 12391  		if v_0.Op != OpPPC64SLDconst {
 12392  			break
 12393  		}
 12394  		c := v_0.AuxInt
 12395  		x := v_0.Args[0]
 12396  		v_1 := v.Args[1]
 12397  		if v_1.Op != OpPPC64SRDconst {
 12398  			break
 12399  		}
 12400  		d := v_1.AuxInt
 12401  		if x != v_1.Args[0] || !(d == 64-c) {
 12402  			break
 12403  		}
 12404  		v.reset(OpPPC64ROTLconst)
 12405  		v.AuxInt = c
 12406  		v.AddArg(x)
 12407  		return true
 12408  	}
 12409  	// match: (OR (SRDconst x [d]) (SLDconst x [c]))
 12410  	// cond: d == 64-c
 12411  	// result: (ROTLconst [c] x)
 12412  	for {
 12413  		_ = v.Args[1]
 12414  		v_0 := v.Args[0]
 12415  		if v_0.Op != OpPPC64SRDconst {
 12416  			break
 12417  		}
 12418  		d := v_0.AuxInt
 12419  		x := v_0.Args[0]
 12420  		v_1 := v.Args[1]
 12421  		if v_1.Op != OpPPC64SLDconst {
 12422  			break
 12423  		}
 12424  		c := v_1.AuxInt
 12425  		if x != v_1.Args[0] || !(d == 64-c) {
 12426  			break
 12427  		}
 12428  		v.reset(OpPPC64ROTLconst)
 12429  		v.AuxInt = c
 12430  		v.AddArg(x)
 12431  		return true
 12432  	}
 12433  	// match: (OR (SLWconst x [c]) (SRWconst x [d]))
 12434  	// cond: d == 32-c
 12435  	// result: (ROTLWconst [c] x)
 12436  	for {
 12437  		_ = v.Args[1]
 12438  		v_0 := v.Args[0]
 12439  		if v_0.Op != OpPPC64SLWconst {
 12440  			break
 12441  		}
 12442  		c := v_0.AuxInt
 12443  		x := v_0.Args[0]
 12444  		v_1 := v.Args[1]
 12445  		if v_1.Op != OpPPC64SRWconst {
 12446  			break
 12447  		}
 12448  		d := v_1.AuxInt
 12449  		if x != v_1.Args[0] || !(d == 32-c) {
 12450  			break
 12451  		}
 12452  		v.reset(OpPPC64ROTLWconst)
 12453  		v.AuxInt = c
 12454  		v.AddArg(x)
 12455  		return true
 12456  	}
 12457  	// match: (OR (SRWconst x [d]) (SLWconst x [c]))
 12458  	// cond: d == 32-c
 12459  	// result: (ROTLWconst [c] x)
 12460  	for {
 12461  		_ = v.Args[1]
 12462  		v_0 := v.Args[0]
 12463  		if v_0.Op != OpPPC64SRWconst {
 12464  			break
 12465  		}
 12466  		d := v_0.AuxInt
 12467  		x := v_0.Args[0]
 12468  		v_1 := v.Args[1]
 12469  		if v_1.Op != OpPPC64SLWconst {
 12470  			break
 12471  		}
 12472  		c := v_1.AuxInt
 12473  		if x != v_1.Args[0] || !(d == 32-c) {
 12474  			break
 12475  		}
 12476  		v.reset(OpPPC64ROTLWconst)
 12477  		v.AuxInt = c
 12478  		v.AddArg(x)
 12479  		return true
 12480  	}
 12481  	// match: (OR (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
 12482  	// result: (ROTL x y)
 12483  	for {
 12484  		_ = v.Args[1]
 12485  		v_0 := v.Args[0]
 12486  		if v_0.Op != OpPPC64SLD {
 12487  			break
 12488  		}
 12489  		_ = v_0.Args[1]
 12490  		x := v_0.Args[0]
 12491  		v_0_1 := v_0.Args[1]
 12492  		if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || v_0_1.AuxInt != 63 {
 12493  			break
 12494  		}
 12495  		y := v_0_1.Args[0]
 12496  		v_1 := v.Args[1]
 12497  		if v_1.Op != OpPPC64SRD {
 12498  			break
 12499  		}
 12500  		_ = v_1.Args[1]
 12501  		if x != v_1.Args[0] {
 12502  			break
 12503  		}
 12504  		v_1_1 := v_1.Args[1]
 12505  		if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
 12506  			break
 12507  		}
 12508  		_ = v_1_1.Args[1]
 12509  		v_1_1_0 := v_1_1.Args[0]
 12510  		if v_1_1_0.Op != OpPPC64MOVDconst || v_1_1_0.AuxInt != 64 {
 12511  			break
 12512  		}
 12513  		v_1_1_1 := v_1_1.Args[1]
 12514  		if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || v_1_1_1.AuxInt != 63 || y != v_1_1_1.Args[0] {
 12515  			break
 12516  		}
 12517  		v.reset(OpPPC64ROTL)
 12518  		v.AddArg(x)
 12519  		v.AddArg(y)
 12520  		return true
 12521  	}
 12522  	// match: (OR (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))) (SLD x (ANDconst <typ.Int64> [63] y)))
 12523  	// result: (ROTL x y)
 12524  	for {
 12525  		_ = v.Args[1]
 12526  		v_0 := v.Args[0]
 12527  		if v_0.Op != OpPPC64SRD {
 12528  			break
 12529  		}
 12530  		_ = v_0.Args[1]
 12531  		x := v_0.Args[0]
 12532  		v_0_1 := v_0.Args[1]
 12533  		if v_0_1.Op != OpPPC64SUB || v_0_1.Type != typ.UInt {
 12534  			break
 12535  		}
 12536  		_ = v_0_1.Args[1]
 12537  		v_0_1_0 := v_0_1.Args[0]
 12538  		if v_0_1_0.Op != OpPPC64MOVDconst || v_0_1_0.AuxInt != 64 {
 12539  			break
 12540  		}
 12541  		v_0_1_1 := v_0_1.Args[1]
 12542  		if v_0_1_1.Op != OpPPC64ANDconst || v_0_1_1.Type != typ.UInt || v_0_1_1.AuxInt != 63 {
 12543  			break
 12544  		}
 12545  		y := v_0_1_1.Args[0]
 12546  		v_1 := v.Args[1]
 12547  		if v_1.Op != OpPPC64SLD {
 12548  			break
 12549  		}
 12550  		_ = v_1.Args[1]
 12551  		if x != v_1.Args[0] {
 12552  			break
 12553  		}
 12554  		v_1_1 := v_1.Args[1]
 12555  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.Int64 || v_1_1.AuxInt != 63 || y != v_1_1.Args[0] {
 12556  			break
 12557  		}
 12558  		v.reset(OpPPC64ROTL)
 12559  		v.AddArg(x)
 12560  		v.AddArg(y)
 12561  		return true
 12562  	}
 12563  	// match: (OR (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
 12564  	// result: (ROTLW x y)
 12565  	for {
 12566  		_ = v.Args[1]
 12567  		v_0 := v.Args[0]
 12568  		if v_0.Op != OpPPC64SLW {
 12569  			break
 12570  		}
 12571  		_ = v_0.Args[1]
 12572  		x := v_0.Args[0]
 12573  		v_0_1 := v_0.Args[1]
 12574  		if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || v_0_1.AuxInt != 31 {
 12575  			break
 12576  		}
 12577  		y := v_0_1.Args[0]
 12578  		v_1 := v.Args[1]
 12579  		if v_1.Op != OpPPC64SRW {
 12580  			break
 12581  		}
 12582  		_ = v_1.Args[1]
 12583  		if x != v_1.Args[0] {
 12584  			break
 12585  		}
 12586  		v_1_1 := v_1.Args[1]
 12587  		if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
 12588  			break
 12589  		}
 12590  		_ = v_1_1.Args[1]
 12591  		v_1_1_0 := v_1_1.Args[0]
 12592  		if v_1_1_0.Op != OpPPC64MOVDconst || v_1_1_0.AuxInt != 32 {
 12593  			break
 12594  		}
 12595  		v_1_1_1 := v_1_1.Args[1]
 12596  		if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || v_1_1_1.AuxInt != 31 || y != v_1_1_1.Args[0] {
 12597  			break
 12598  		}
 12599  		v.reset(OpPPC64ROTLW)
 12600  		v.AddArg(x)
 12601  		v.AddArg(y)
 12602  		return true
 12603  	}
 12604  	// match: (OR (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))) (SLW x (ANDconst <typ.Int32> [31] y)))
 12605  	// result: (ROTLW x y)
 12606  	for {
 12607  		_ = v.Args[1]
 12608  		v_0 := v.Args[0]
 12609  		if v_0.Op != OpPPC64SRW {
 12610  			break
 12611  		}
 12612  		_ = v_0.Args[1]
 12613  		x := v_0.Args[0]
 12614  		v_0_1 := v_0.Args[1]
 12615  		if v_0_1.Op != OpPPC64SUB || v_0_1.Type != typ.UInt {
 12616  			break
 12617  		}
 12618  		_ = v_0_1.Args[1]
 12619  		v_0_1_0 := v_0_1.Args[0]
 12620  		if v_0_1_0.Op != OpPPC64MOVDconst || v_0_1_0.AuxInt != 32 {
 12621  			break
 12622  		}
 12623  		v_0_1_1 := v_0_1.Args[1]
 12624  		if v_0_1_1.Op != OpPPC64ANDconst || v_0_1_1.Type != typ.UInt || v_0_1_1.AuxInt != 31 {
 12625  			break
 12626  		}
 12627  		y := v_0_1_1.Args[0]
 12628  		v_1 := v.Args[1]
 12629  		if v_1.Op != OpPPC64SLW {
 12630  			break
 12631  		}
 12632  		_ = v_1.Args[1]
 12633  		if x != v_1.Args[0] {
 12634  			break
 12635  		}
 12636  		v_1_1 := v_1.Args[1]
 12637  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.Int32 || v_1_1.AuxInt != 31 || y != v_1_1.Args[0] {
 12638  			break
 12639  		}
 12640  		v.reset(OpPPC64ROTLW)
 12641  		v.AddArg(x)
 12642  		v.AddArg(y)
 12643  		return true
 12644  	}
 12645  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 12646  	// result: (MOVDconst [c|d])
 12647  	for {
 12648  		_ = v.Args[1]
 12649  		v_0 := v.Args[0]
 12650  		if v_0.Op != OpPPC64MOVDconst {
 12651  			break
 12652  		}
 12653  		c := v_0.AuxInt
 12654  		v_1 := v.Args[1]
 12655  		if v_1.Op != OpPPC64MOVDconst {
 12656  			break
 12657  		}
 12658  		d := v_1.AuxInt
 12659  		v.reset(OpPPC64MOVDconst)
 12660  		v.AuxInt = c | d
 12661  		return true
 12662  	}
 12663  	// match: (OR (MOVDconst [d]) (MOVDconst [c]))
 12664  	// result: (MOVDconst [c|d])
 12665  	for {
 12666  		_ = v.Args[1]
 12667  		v_0 := v.Args[0]
 12668  		if v_0.Op != OpPPC64MOVDconst {
 12669  			break
 12670  		}
 12671  		d := v_0.AuxInt
 12672  		v_1 := v.Args[1]
 12673  		if v_1.Op != OpPPC64MOVDconst {
 12674  			break
 12675  		}
 12676  		c := v_1.AuxInt
 12677  		v.reset(OpPPC64MOVDconst)
 12678  		v.AuxInt = c | d
 12679  		return true
 12680  	}
 12681  	return false
 12682  }
 12683  func rewriteValuePPC64_OpPPC64OR_10(v *Value) bool {
 12684  	b := v.Block
 12685  	config := b.Func.Config
 12686  	typ := &b.Func.Config.Types
 12687  	// match: (OR x (MOVDconst [c]))
 12688  	// cond: isU32Bit(c)
 12689  	// result: (ORconst [c] x)
 12690  	for {
 12691  		_ = v.Args[1]
 12692  		x := v.Args[0]
 12693  		v_1 := v.Args[1]
 12694  		if v_1.Op != OpPPC64MOVDconst {
 12695  			break
 12696  		}
 12697  		c := v_1.AuxInt
 12698  		if !(isU32Bit(c)) {
 12699  			break
 12700  		}
 12701  		v.reset(OpPPC64ORconst)
 12702  		v.AuxInt = c
 12703  		v.AddArg(x)
 12704  		return true
 12705  	}
 12706  	// match: (OR (MOVDconst [c]) x)
 12707  	// cond: isU32Bit(c)
 12708  	// result: (ORconst [c] x)
 12709  	for {
 12710  		x := v.Args[1]
 12711  		v_0 := v.Args[0]
 12712  		if v_0.Op != OpPPC64MOVDconst {
 12713  			break
 12714  		}
 12715  		c := v_0.AuxInt
 12716  		if !(isU32Bit(c)) {
 12717  			break
 12718  		}
 12719  		v.reset(OpPPC64ORconst)
 12720  		v.AuxInt = c
 12721  		v.AddArg(x)
 12722  		return true
 12723  	}
 12724  	// match: (OR <t> x0:(MOVBZload [i0] {s} p mem) o1:(SLWconst x1:(MOVBZload [i1] {s} p mem) [8]))
 12725  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12726  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 12727  	for {
 12728  		t := v.Type
 12729  		_ = v.Args[1]
 12730  		x0 := v.Args[0]
 12731  		if x0.Op != OpPPC64MOVBZload {
 12732  			break
 12733  		}
 12734  		i0 := x0.AuxInt
 12735  		s := x0.Aux
 12736  		mem := x0.Args[1]
 12737  		p := x0.Args[0]
 12738  		o1 := v.Args[1]
 12739  		if o1.Op != OpPPC64SLWconst || o1.AuxInt != 8 {
 12740  			break
 12741  		}
 12742  		x1 := o1.Args[0]
 12743  		if x1.Op != OpPPC64MOVBZload {
 12744  			break
 12745  		}
 12746  		i1 := x1.AuxInt
 12747  		if x1.Aux != s {
 12748  			break
 12749  		}
 12750  		_ = x1.Args[1]
 12751  		if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12752  			break
 12753  		}
 12754  		b = mergePoint(b, x0, x1)
 12755  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
 12756  		v.reset(OpCopy)
 12757  		v.AddArg(v0)
 12758  		v0.AuxInt = i0
 12759  		v0.Aux = s
 12760  		v0.AddArg(p)
 12761  		v0.AddArg(mem)
 12762  		return true
 12763  	}
 12764  	// match: (OR <t> o1:(SLWconst x1:(MOVBZload [i1] {s} p mem) [8]) x0:(MOVBZload [i0] {s} p mem))
 12765  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12766  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 12767  	for {
 12768  		t := v.Type
 12769  		_ = v.Args[1]
 12770  		o1 := v.Args[0]
 12771  		if o1.Op != OpPPC64SLWconst || o1.AuxInt != 8 {
 12772  			break
 12773  		}
 12774  		x1 := o1.Args[0]
 12775  		if x1.Op != OpPPC64MOVBZload {
 12776  			break
 12777  		}
 12778  		i1 := x1.AuxInt
 12779  		s := x1.Aux
 12780  		mem := x1.Args[1]
 12781  		p := x1.Args[0]
 12782  		x0 := v.Args[1]
 12783  		if x0.Op != OpPPC64MOVBZload {
 12784  			break
 12785  		}
 12786  		i0 := x0.AuxInt
 12787  		if x0.Aux != s {
 12788  			break
 12789  		}
 12790  		_ = x0.Args[1]
 12791  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12792  			break
 12793  		}
 12794  		b = mergePoint(b, x0, x1)
 12795  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHZload, t)
 12796  		v.reset(OpCopy)
 12797  		v.AddArg(v0)
 12798  		v0.AuxInt = i0
 12799  		v0.Aux = s
 12800  		v0.AddArg(p)
 12801  		v0.AddArg(mem)
 12802  		return true
 12803  	}
 12804  	// match: (OR <t> x0:(MOVBZload [i0] {s} p mem) o1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [8]))
 12805  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12806  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 12807  	for {
 12808  		t := v.Type
 12809  		_ = v.Args[1]
 12810  		x0 := v.Args[0]
 12811  		if x0.Op != OpPPC64MOVBZload {
 12812  			break
 12813  		}
 12814  		i0 := x0.AuxInt
 12815  		s := x0.Aux
 12816  		mem := x0.Args[1]
 12817  		p := x0.Args[0]
 12818  		o1 := v.Args[1]
 12819  		if o1.Op != OpPPC64SLDconst || o1.AuxInt != 8 {
 12820  			break
 12821  		}
 12822  		x1 := o1.Args[0]
 12823  		if x1.Op != OpPPC64MOVBZload {
 12824  			break
 12825  		}
 12826  		i1 := x1.AuxInt
 12827  		if x1.Aux != s {
 12828  			break
 12829  		}
 12830  		_ = x1.Args[1]
 12831  		if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12832  			break
 12833  		}
 12834  		b = mergePoint(b, x0, x1)
 12835  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
 12836  		v.reset(OpCopy)
 12837  		v.AddArg(v0)
 12838  		v0.AuxInt = i0
 12839  		v0.Aux = s
 12840  		v0.AddArg(p)
 12841  		v0.AddArg(mem)
 12842  		return true
 12843  	}
 12844  	// match: (OR <t> o1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [8]) x0:(MOVBZload [i0] {s} p mem))
 12845  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12846  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 12847  	for {
 12848  		t := v.Type
 12849  		_ = v.Args[1]
 12850  		o1 := v.Args[0]
 12851  		if o1.Op != OpPPC64SLDconst || o1.AuxInt != 8 {
 12852  			break
 12853  		}
 12854  		x1 := o1.Args[0]
 12855  		if x1.Op != OpPPC64MOVBZload {
 12856  			break
 12857  		}
 12858  		i1 := x1.AuxInt
 12859  		s := x1.Aux
 12860  		mem := x1.Args[1]
 12861  		p := x1.Args[0]
 12862  		x0 := v.Args[1]
 12863  		if x0.Op != OpPPC64MOVBZload {
 12864  			break
 12865  		}
 12866  		i0 := x0.AuxInt
 12867  		if x0.Aux != s {
 12868  			break
 12869  		}
 12870  		_ = x0.Args[1]
 12871  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12872  			break
 12873  		}
 12874  		b = mergePoint(b, x0, x1)
 12875  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHZload, t)
 12876  		v.reset(OpCopy)
 12877  		v.AddArg(v0)
 12878  		v0.AuxInt = i0
 12879  		v0.Aux = s
 12880  		v0.AddArg(p)
 12881  		v0.AddArg(mem)
 12882  		return true
 12883  	}
 12884  	// match: (OR <t> x0:(MOVBZload [i1] {s} p mem) o1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [8]))
 12885  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12886  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12887  	for {
 12888  		t := v.Type
 12889  		_ = v.Args[1]
 12890  		x0 := v.Args[0]
 12891  		if x0.Op != OpPPC64MOVBZload {
 12892  			break
 12893  		}
 12894  		i1 := x0.AuxInt
 12895  		s := x0.Aux
 12896  		mem := x0.Args[1]
 12897  		p := x0.Args[0]
 12898  		o1 := v.Args[1]
 12899  		if o1.Op != OpPPC64SLWconst || o1.AuxInt != 8 {
 12900  			break
 12901  		}
 12902  		x1 := o1.Args[0]
 12903  		if x1.Op != OpPPC64MOVBZload {
 12904  			break
 12905  		}
 12906  		i0 := x1.AuxInt
 12907  		if x1.Aux != s {
 12908  			break
 12909  		}
 12910  		_ = x1.Args[1]
 12911  		if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12912  			break
 12913  		}
 12914  		b = mergePoint(b, x0, x1)
 12915  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 12916  		v.reset(OpCopy)
 12917  		v.AddArg(v0)
 12918  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12919  		v1.AuxInt = i0
 12920  		v1.Aux = s
 12921  		v1.AddArg(p)
 12922  		v0.AddArg(v1)
 12923  		v0.AddArg(mem)
 12924  		return true
 12925  	}
 12926  	// match: (OR <t> o1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [8]) x0:(MOVBZload [i1] {s} p mem))
 12927  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12928  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12929  	for {
 12930  		t := v.Type
 12931  		_ = v.Args[1]
 12932  		o1 := v.Args[0]
 12933  		if o1.Op != OpPPC64SLWconst || o1.AuxInt != 8 {
 12934  			break
 12935  		}
 12936  		x1 := o1.Args[0]
 12937  		if x1.Op != OpPPC64MOVBZload {
 12938  			break
 12939  		}
 12940  		i0 := x1.AuxInt
 12941  		s := x1.Aux
 12942  		mem := x1.Args[1]
 12943  		p := x1.Args[0]
 12944  		x0 := v.Args[1]
 12945  		if x0.Op != OpPPC64MOVBZload {
 12946  			break
 12947  		}
 12948  		i1 := x0.AuxInt
 12949  		if x0.Aux != s {
 12950  			break
 12951  		}
 12952  		_ = x0.Args[1]
 12953  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12954  			break
 12955  		}
 12956  		b = mergePoint(b, x0, x1)
 12957  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHBRload, t)
 12958  		v.reset(OpCopy)
 12959  		v.AddArg(v0)
 12960  		v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12961  		v1.AuxInt = i0
 12962  		v1.Aux = s
 12963  		v1.AddArg(p)
 12964  		v0.AddArg(v1)
 12965  		v0.AddArg(mem)
 12966  		return true
 12967  	}
 12968  	// match: (OR <t> x0:(MOVBZload [i1] {s} p mem) o1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [8]))
 12969  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 12970  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12971  	for {
 12972  		t := v.Type
 12973  		_ = v.Args[1]
 12974  		x0 := v.Args[0]
 12975  		if x0.Op != OpPPC64MOVBZload {
 12976  			break
 12977  		}
 12978  		i1 := x0.AuxInt
 12979  		s := x0.Aux
 12980  		mem := x0.Args[1]
 12981  		p := x0.Args[0]
 12982  		o1 := v.Args[1]
 12983  		if o1.Op != OpPPC64SLDconst || o1.AuxInt != 8 {
 12984  			break
 12985  		}
 12986  		x1 := o1.Args[0]
 12987  		if x1.Op != OpPPC64MOVBZload {
 12988  			break
 12989  		}
 12990  		i0 := x1.AuxInt
 12991  		if x1.Aux != s {
 12992  			break
 12993  		}
 12994  		_ = x1.Args[1]
 12995  		if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 12996  			break
 12997  		}
 12998  		b = mergePoint(b, x0, x1)
 12999  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 13000  		v.reset(OpCopy)
 13001  		v.AddArg(v0)
 13002  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13003  		v1.AuxInt = i0
 13004  		v1.Aux = s
 13005  		v1.AddArg(p)
 13006  		v0.AddArg(v1)
 13007  		v0.AddArg(mem)
 13008  		return true
 13009  	}
 13010  	// match: (OR <t> o1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [8]) x0:(MOVBZload [i1] {s} p mem))
 13011  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)
 13012  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 13013  	for {
 13014  		t := v.Type
 13015  		_ = v.Args[1]
 13016  		o1 := v.Args[0]
 13017  		if o1.Op != OpPPC64SLDconst || o1.AuxInt != 8 {
 13018  			break
 13019  		}
 13020  		x1 := o1.Args[0]
 13021  		if x1.Op != OpPPC64MOVBZload {
 13022  			break
 13023  		}
 13024  		i0 := x1.AuxInt
 13025  		s := x1.Aux
 13026  		mem := x1.Args[1]
 13027  		p := x1.Args[0]
 13028  		x0 := v.Args[1]
 13029  		if x0.Op != OpPPC64MOVBZload {
 13030  			break
 13031  		}
 13032  		i1 := x0.AuxInt
 13033  		if x0.Aux != s {
 13034  			break
 13035  		}
 13036  		_ = x0.Args[1]
 13037  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(o1)) {
 13038  			break
 13039  		}
 13040  		b = mergePoint(b, x0, x1)
 13041  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHBRload, t)
 13042  		v.reset(OpCopy)
 13043  		v.AddArg(v0)
 13044  		v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13045  		v1.AuxInt = i0
 13046  		v1.Aux = s
 13047  		v1.AddArg(p)
 13048  		v0.AddArg(v1)
 13049  		v0.AddArg(mem)
 13050  		return true
 13051  	}
 13052  	return false
 13053  }
 13054  func rewriteValuePPC64_OpPPC64OR_20(v *Value) bool {
 13055  	b := v.Block
 13056  	config := b.Func.Config
 13057  	typ := &b.Func.Config.Types
 13058  	// match: (OR <t> s0:(SLWconst x0:(MOVBZload [i1] {s} p mem) [n1]) s1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [n2]))
 13059  	// cond: !config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)
 13060  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 13061  	for {
 13062  		t := v.Type
 13063  		_ = v.Args[1]
 13064  		s0 := v.Args[0]
 13065  		if s0.Op != OpPPC64SLWconst {
 13066  			break
 13067  		}
 13068  		n1 := s0.AuxInt
 13069  		x0 := s0.Args[0]
 13070  		if x0.Op != OpPPC64MOVBZload {
 13071  			break
 13072  		}
 13073  		i1 := x0.AuxInt
 13074  		s := x0.Aux
 13075  		mem := x0.Args[1]
 13076  		p := x0.Args[0]
 13077  		s1 := v.Args[1]
 13078  		if s1.Op != OpPPC64SLWconst {
 13079  			break
 13080  		}
 13081  		n2 := s1.AuxInt
 13082  		x1 := s1.Args[0]
 13083  		if x1.Op != OpPPC64MOVBZload {
 13084  			break
 13085  		}
 13086  		i0 := x1.AuxInt
 13087  		if x1.Aux != s {
 13088  			break
 13089  		}
 13090  		_ = x1.Args[1]
 13091  		if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)) {
 13092  			break
 13093  		}
 13094  		b = mergePoint(b, x0, x1)
 13095  		v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
 13096  		v.reset(OpCopy)
 13097  		v.AddArg(v0)
 13098  		v0.AuxInt = n1
 13099  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 13100  		v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13101  		v2.AuxInt = i0
 13102  		v2.Aux = s
 13103  		v2.AddArg(p)
 13104  		v1.AddArg(v2)
 13105  		v1.AddArg(mem)
 13106  		v0.AddArg(v1)
 13107  		return true
 13108  	}
 13109  	// match: (OR <t> s1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [n2]) s0:(SLWconst x0:(MOVBZload [i1] {s} p mem) [n1]))
 13110  	// cond: !config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)
 13111  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 13112  	for {
 13113  		t := v.Type
 13114  		_ = v.Args[1]
 13115  		s1 := v.Args[0]
 13116  		if s1.Op != OpPPC64SLWconst {
 13117  			break
 13118  		}
 13119  		n2 := s1.AuxInt
 13120  		x1 := s1.Args[0]
 13121  		if x1.Op != OpPPC64MOVBZload {
 13122  			break
 13123  		}
 13124  		i0 := x1.AuxInt
 13125  		s := x1.Aux
 13126  		mem := x1.Args[1]
 13127  		p := x1.Args[0]
 13128  		s0 := v.Args[1]
 13129  		if s0.Op != OpPPC64SLWconst {
 13130  			break
 13131  		}
 13132  		n1 := s0.AuxInt
 13133  		x0 := s0.Args[0]
 13134  		if x0.Op != OpPPC64MOVBZload {
 13135  			break
 13136  		}
 13137  		i1 := x0.AuxInt
 13138  		if x0.Aux != s {
 13139  			break
 13140  		}
 13141  		_ = x0.Args[1]
 13142  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)) {
 13143  			break
 13144  		}
 13145  		b = mergePoint(b, x0, x1)
 13146  		v0 := b.NewValue0(x0.Pos, OpPPC64SLDconst, t)
 13147  		v.reset(OpCopy)
 13148  		v.AddArg(v0)
 13149  		v0.AuxInt = n1
 13150  		v1 := b.NewValue0(x0.Pos, OpPPC64MOVHBRload, t)
 13151  		v2 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13152  		v2.AuxInt = i0
 13153  		v2.Aux = s
 13154  		v2.AddArg(p)
 13155  		v1.AddArg(v2)
 13156  		v1.AddArg(mem)
 13157  		v0.AddArg(v1)
 13158  		return true
 13159  	}
 13160  	// match: (OR <t> s0:(SLDconst x0:(MOVBZload [i1] {s} p mem) [n1]) s1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [n2]))
 13161  	// cond: !config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)
 13162  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 13163  	for {
 13164  		t := v.Type
 13165  		_ = v.Args[1]
 13166  		s0 := v.Args[0]
 13167  		if s0.Op != OpPPC64SLDconst {
 13168  			break
 13169  		}
 13170  		n1 := s0.AuxInt
 13171  		x0 := s0.Args[0]
 13172  		if x0.Op != OpPPC64MOVBZload {
 13173  			break
 13174  		}
 13175  		i1 := x0.AuxInt
 13176  		s := x0.Aux
 13177  		mem := x0.Args[1]
 13178  		p := x0.Args[0]
 13179  		s1 := v.Args[1]
 13180  		if s1.Op != OpPPC64SLDconst {
 13181  			break
 13182  		}
 13183  		n2 := s1.AuxInt
 13184  		x1 := s1.Args[0]
 13185  		if x1.Op != OpPPC64MOVBZload {
 13186  			break
 13187  		}
 13188  		i0 := x1.AuxInt
 13189  		if x1.Aux != s {
 13190  			break
 13191  		}
 13192  		_ = x1.Args[1]
 13193  		if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)) {
 13194  			break
 13195  		}
 13196  		b = mergePoint(b, x0, x1)
 13197  		v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
 13198  		v.reset(OpCopy)
 13199  		v.AddArg(v0)
 13200  		v0.AuxInt = n1
 13201  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 13202  		v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13203  		v2.AuxInt = i0
 13204  		v2.Aux = s
 13205  		v2.AddArg(p)
 13206  		v1.AddArg(v2)
 13207  		v1.AddArg(mem)
 13208  		v0.AddArg(v1)
 13209  		return true
 13210  	}
 13211  	// match: (OR <t> s1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [n2]) s0:(SLDconst x0:(MOVBZload [i1] {s} p mem) [n1]))
 13212  	// cond: !config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)
 13213  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 13214  	for {
 13215  		t := v.Type
 13216  		_ = v.Args[1]
 13217  		s1 := v.Args[0]
 13218  		if s1.Op != OpPPC64SLDconst {
 13219  			break
 13220  		}
 13221  		n2 := s1.AuxInt
 13222  		x1 := s1.Args[0]
 13223  		if x1.Op != OpPPC64MOVBZload {
 13224  			break
 13225  		}
 13226  		i0 := x1.AuxInt
 13227  		s := x1.Aux
 13228  		mem := x1.Args[1]
 13229  		p := x1.Args[0]
 13230  		s0 := v.Args[1]
 13231  		if s0.Op != OpPPC64SLDconst {
 13232  			break
 13233  		}
 13234  		n1 := s0.AuxInt
 13235  		x0 := s0.Args[0]
 13236  		if x0.Op != OpPPC64MOVBZload {
 13237  			break
 13238  		}
 13239  		i1 := x0.AuxInt
 13240  		if x0.Aux != s {
 13241  			break
 13242  		}
 13243  		_ = x0.Args[1]
 13244  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0) && clobber(x1) && clobber(s0) && clobber(s1)) {
 13245  			break
 13246  		}
 13247  		b = mergePoint(b, x0, x1)
 13248  		v0 := b.NewValue0(x0.Pos, OpPPC64SLDconst, t)
 13249  		v.reset(OpCopy)
 13250  		v.AddArg(v0)
 13251  		v0.AuxInt = n1
 13252  		v1 := b.NewValue0(x0.Pos, OpPPC64MOVHBRload, t)
 13253  		v2 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13254  		v2.AuxInt = i0
 13255  		v2.Aux = s
 13256  		v2.AddArg(p)
 13257  		v1.AddArg(v2)
 13258  		v1.AddArg(mem)
 13259  		v0.AddArg(v1)
 13260  		return true
 13261  	}
 13262  	// match: (OR <t> s1:(SLWconst x2:(MOVBZload [i3] {s} p mem) [24]) o0:(OR <t> s0:(SLWconst x1:(MOVBZload [i2] {s} p mem) [16]) x0:(MOVHZload [i0] {s} p mem)))
 13263  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses ==1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)
 13264  	// result: @mergePoint(b,x0,x1,x2) (MOVWZload <t> {s} [i0] p mem)
 13265  	for {
 13266  		t := v.Type
 13267  		_ = v.Args[1]
 13268  		s1 := v.Args[0]
 13269  		if s1.Op != OpPPC64SLWconst || s1.AuxInt != 24 {
 13270  			break
 13271  		}
 13272  		x2 := s1.Args[0]
 13273  		if x2.Op != OpPPC64MOVBZload {
 13274  			break
 13275  		}
 13276  		i3 := x2.AuxInt
 13277  		s := x2.Aux
 13278  		mem := x2.Args[1]
 13279  		p := x2.Args[0]
 13280  		o0 := v.Args[1]
 13281  		if o0.Op != OpPPC64OR || o0.Type != t {
 13282  			break
 13283  		}
 13284  		_ = o0.Args[1]
 13285  		s0 := o0.Args[0]
 13286  		if s0.Op != OpPPC64SLWconst || s0.AuxInt != 16 {
 13287  			break
 13288  		}
 13289  		x1 := s0.Args[0]
 13290  		if x1.Op != OpPPC64MOVBZload {
 13291  			break
 13292  		}
 13293  		i2 := x1.AuxInt
 13294  		if x1.Aux != s {
 13295  			break
 13296  		}
 13297  		_ = x1.Args[1]
 13298  		if p != x1.Args[0] || mem != x1.Args[1] {
 13299  			break
 13300  		}
 13301  		x0 := o0.Args[1]
 13302  		if x0.Op != OpPPC64MOVHZload {
 13303  			break
 13304  		}
 13305  		i0 := x0.AuxInt
 13306  		if x0.Aux != s {
 13307  			break
 13308  		}
 13309  		_ = x0.Args[1]
 13310  		if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)) {
 13311  			break
 13312  		}
 13313  		b = mergePoint(b, x0, x1, x2)
 13314  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVWZload, t)
 13315  		v.reset(OpCopy)
 13316  		v.AddArg(v0)
 13317  		v0.AuxInt = i0
 13318  		v0.Aux = s
 13319  		v0.AddArg(p)
 13320  		v0.AddArg(mem)
 13321  		return true
 13322  	}
 13323  	// match: (OR <t> s1:(SLWconst x2:(MOVBZload [i3] {s} p mem) [24]) o0:(OR <t> x0:(MOVHZload [i0] {s} p mem) s0:(SLWconst x1:(MOVBZload [i2] {s} p mem) [16])))
 13324  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses ==1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0) && clobber(x1) && clobber(x2) && clobber(s0) && clobber(s1) && clobber(o0)
 13325  	// result: @mergePoint(b,x0,x1,x2) (MOVWZload <t> {s} [i0] p mem)
 13326  	for {
 13327  		t := v.Type
 13328  		_ = v.Args[1]
 13329  		s1 := v.Args[0]
 13330  		if s1.Op != OpPPC64SLWconst || s1.AuxInt != 24 {
 13331  			break
 13332  		}
 13333  		x2 := s1.Args[0]