...
Run Format

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 "fmt"
     7  import "math"
     8  import "cmd/internal/obj"
     9  import "cmd/internal/objabi"
    10  import "cmd/compile/internal/types"
    11  
    12  var _ = fmt.Println   // in case not otherwise used
    13  var _ = math.MinInt8  // in case not otherwise used
    14  var _ = obj.ANOP      // in case not otherwise used
    15  var _ = objabi.GOROOT // in case not otherwise used
    16  var _ = types.TypeMem // in case not otherwise used
    17  
    18  func rewriteValuePPC64(v *Value) bool {
    19  	switch v.Op {
    20  	case OpAbs:
    21  		return rewriteValuePPC64_OpAbs_0(v)
    22  	case OpAdd16:
    23  		return rewriteValuePPC64_OpAdd16_0(v)
    24  	case OpAdd32:
    25  		return rewriteValuePPC64_OpAdd32_0(v)
    26  	case OpAdd32F:
    27  		return rewriteValuePPC64_OpAdd32F_0(v)
    28  	case OpAdd64:
    29  		return rewriteValuePPC64_OpAdd64_0(v)
    30  	case OpAdd64F:
    31  		return rewriteValuePPC64_OpAdd64F_0(v)
    32  	case OpAdd8:
    33  		return rewriteValuePPC64_OpAdd8_0(v)
    34  	case OpAddPtr:
    35  		return rewriteValuePPC64_OpAddPtr_0(v)
    36  	case OpAddr:
    37  		return rewriteValuePPC64_OpAddr_0(v)
    38  	case OpAnd16:
    39  		return rewriteValuePPC64_OpAnd16_0(v)
    40  	case OpAnd32:
    41  		return rewriteValuePPC64_OpAnd32_0(v)
    42  	case OpAnd64:
    43  		return rewriteValuePPC64_OpAnd64_0(v)
    44  	case OpAnd8:
    45  		return rewriteValuePPC64_OpAnd8_0(v)
    46  	case OpAndB:
    47  		return rewriteValuePPC64_OpAndB_0(v)
    48  	case OpAtomicAdd32:
    49  		return rewriteValuePPC64_OpAtomicAdd32_0(v)
    50  	case OpAtomicAdd64:
    51  		return rewriteValuePPC64_OpAtomicAdd64_0(v)
    52  	case OpAtomicAnd8:
    53  		return rewriteValuePPC64_OpAtomicAnd8_0(v)
    54  	case OpAtomicCompareAndSwap32:
    55  		return rewriteValuePPC64_OpAtomicCompareAndSwap32_0(v)
    56  	case OpAtomicCompareAndSwap64:
    57  		return rewriteValuePPC64_OpAtomicCompareAndSwap64_0(v)
    58  	case OpAtomicCompareAndSwapRel32:
    59  		return rewriteValuePPC64_OpAtomicCompareAndSwapRel32_0(v)
    60  	case OpAtomicExchange32:
    61  		return rewriteValuePPC64_OpAtomicExchange32_0(v)
    62  	case OpAtomicExchange64:
    63  		return rewriteValuePPC64_OpAtomicExchange64_0(v)
    64  	case OpAtomicLoad32:
    65  		return rewriteValuePPC64_OpAtomicLoad32_0(v)
    66  	case OpAtomicLoad64:
    67  		return rewriteValuePPC64_OpAtomicLoad64_0(v)
    68  	case OpAtomicLoadAcq32:
    69  		return rewriteValuePPC64_OpAtomicLoadAcq32_0(v)
    70  	case OpAtomicLoadPtr:
    71  		return rewriteValuePPC64_OpAtomicLoadPtr_0(v)
    72  	case OpAtomicOr8:
    73  		return rewriteValuePPC64_OpAtomicOr8_0(v)
    74  	case OpAtomicStore32:
    75  		return rewriteValuePPC64_OpAtomicStore32_0(v)
    76  	case OpAtomicStore64:
    77  		return rewriteValuePPC64_OpAtomicStore64_0(v)
    78  	case OpAtomicStoreRel32:
    79  		return rewriteValuePPC64_OpAtomicStoreRel32_0(v)
    80  	case OpAvg64u:
    81  		return rewriteValuePPC64_OpAvg64u_0(v)
    82  	case OpBitLen32:
    83  		return rewriteValuePPC64_OpBitLen32_0(v)
    84  	case OpBitLen64:
    85  		return rewriteValuePPC64_OpBitLen64_0(v)
    86  	case OpCeil:
    87  		return rewriteValuePPC64_OpCeil_0(v)
    88  	case OpClosureCall:
    89  		return rewriteValuePPC64_OpClosureCall_0(v)
    90  	case OpCom16:
    91  		return rewriteValuePPC64_OpCom16_0(v)
    92  	case OpCom32:
    93  		return rewriteValuePPC64_OpCom32_0(v)
    94  	case OpCom64:
    95  		return rewriteValuePPC64_OpCom64_0(v)
    96  	case OpCom8:
    97  		return rewriteValuePPC64_OpCom8_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 OpFloor:
   185  		return rewriteValuePPC64_OpFloor_0(v)
   186  	case OpGeq16:
   187  		return rewriteValuePPC64_OpGeq16_0(v)
   188  	case OpGeq16U:
   189  		return rewriteValuePPC64_OpGeq16U_0(v)
   190  	case OpGeq32:
   191  		return rewriteValuePPC64_OpGeq32_0(v)
   192  	case OpGeq32F:
   193  		return rewriteValuePPC64_OpGeq32F_0(v)
   194  	case OpGeq32U:
   195  		return rewriteValuePPC64_OpGeq32U_0(v)
   196  	case OpGeq64:
   197  		return rewriteValuePPC64_OpGeq64_0(v)
   198  	case OpGeq64F:
   199  		return rewriteValuePPC64_OpGeq64F_0(v)
   200  	case OpGeq64U:
   201  		return rewriteValuePPC64_OpGeq64U_0(v)
   202  	case OpGeq8:
   203  		return rewriteValuePPC64_OpGeq8_0(v)
   204  	case OpGeq8U:
   205  		return rewriteValuePPC64_OpGeq8U_0(v)
   206  	case OpGetCallerPC:
   207  		return rewriteValuePPC64_OpGetCallerPC_0(v)
   208  	case OpGetCallerSP:
   209  		return rewriteValuePPC64_OpGetCallerSP_0(v)
   210  	case OpGetClosurePtr:
   211  		return rewriteValuePPC64_OpGetClosurePtr_0(v)
   212  	case OpGreater16:
   213  		return rewriteValuePPC64_OpGreater16_0(v)
   214  	case OpGreater16U:
   215  		return rewriteValuePPC64_OpGreater16U_0(v)
   216  	case OpGreater32:
   217  		return rewriteValuePPC64_OpGreater32_0(v)
   218  	case OpGreater32F:
   219  		return rewriteValuePPC64_OpGreater32F_0(v)
   220  	case OpGreater32U:
   221  		return rewriteValuePPC64_OpGreater32U_0(v)
   222  	case OpGreater64:
   223  		return rewriteValuePPC64_OpGreater64_0(v)
   224  	case OpGreater64F:
   225  		return rewriteValuePPC64_OpGreater64F_0(v)
   226  	case OpGreater64U:
   227  		return rewriteValuePPC64_OpGreater64U_0(v)
   228  	case OpGreater8:
   229  		return rewriteValuePPC64_OpGreater8_0(v)
   230  	case OpGreater8U:
   231  		return rewriteValuePPC64_OpGreater8U_0(v)
   232  	case OpHmul32:
   233  		return rewriteValuePPC64_OpHmul32_0(v)
   234  	case OpHmul32u:
   235  		return rewriteValuePPC64_OpHmul32u_0(v)
   236  	case OpHmul64:
   237  		return rewriteValuePPC64_OpHmul64_0(v)
   238  	case OpHmul64u:
   239  		return rewriteValuePPC64_OpHmul64u_0(v)
   240  	case OpInterCall:
   241  		return rewriteValuePPC64_OpInterCall_0(v)
   242  	case OpIsInBounds:
   243  		return rewriteValuePPC64_OpIsInBounds_0(v)
   244  	case OpIsNonNil:
   245  		return rewriteValuePPC64_OpIsNonNil_0(v)
   246  	case OpIsSliceInBounds:
   247  		return rewriteValuePPC64_OpIsSliceInBounds_0(v)
   248  	case OpLeq16:
   249  		return rewriteValuePPC64_OpLeq16_0(v)
   250  	case OpLeq16U:
   251  		return rewriteValuePPC64_OpLeq16U_0(v)
   252  	case OpLeq32:
   253  		return rewriteValuePPC64_OpLeq32_0(v)
   254  	case OpLeq32F:
   255  		return rewriteValuePPC64_OpLeq32F_0(v)
   256  	case OpLeq32U:
   257  		return rewriteValuePPC64_OpLeq32U_0(v)
   258  	case OpLeq64:
   259  		return rewriteValuePPC64_OpLeq64_0(v)
   260  	case OpLeq64F:
   261  		return rewriteValuePPC64_OpLeq64F_0(v)
   262  	case OpLeq64U:
   263  		return rewriteValuePPC64_OpLeq64U_0(v)
   264  	case OpLeq8:
   265  		return rewriteValuePPC64_OpLeq8_0(v)
   266  	case OpLeq8U:
   267  		return rewriteValuePPC64_OpLeq8U_0(v)
   268  	case OpLess16:
   269  		return rewriteValuePPC64_OpLess16_0(v)
   270  	case OpLess16U:
   271  		return rewriteValuePPC64_OpLess16U_0(v)
   272  	case OpLess32:
   273  		return rewriteValuePPC64_OpLess32_0(v)
   274  	case OpLess32F:
   275  		return rewriteValuePPC64_OpLess32F_0(v)
   276  	case OpLess32U:
   277  		return rewriteValuePPC64_OpLess32U_0(v)
   278  	case OpLess64:
   279  		return rewriteValuePPC64_OpLess64_0(v)
   280  	case OpLess64F:
   281  		return rewriteValuePPC64_OpLess64F_0(v)
   282  	case OpLess64U:
   283  		return rewriteValuePPC64_OpLess64U_0(v)
   284  	case OpLess8:
   285  		return rewriteValuePPC64_OpLess8_0(v)
   286  	case OpLess8U:
   287  		return rewriteValuePPC64_OpLess8U_0(v)
   288  	case OpLoad:
   289  		return rewriteValuePPC64_OpLoad_0(v)
   290  	case OpLocalAddr:
   291  		return rewriteValuePPC64_OpLocalAddr_0(v)
   292  	case OpLsh16x16:
   293  		return rewriteValuePPC64_OpLsh16x16_0(v)
   294  	case OpLsh16x32:
   295  		return rewriteValuePPC64_OpLsh16x32_0(v)
   296  	case OpLsh16x64:
   297  		return rewriteValuePPC64_OpLsh16x64_0(v)
   298  	case OpLsh16x8:
   299  		return rewriteValuePPC64_OpLsh16x8_0(v)
   300  	case OpLsh32x16:
   301  		return rewriteValuePPC64_OpLsh32x16_0(v)
   302  	case OpLsh32x32:
   303  		return rewriteValuePPC64_OpLsh32x32_0(v)
   304  	case OpLsh32x64:
   305  		return rewriteValuePPC64_OpLsh32x64_0(v)
   306  	case OpLsh32x8:
   307  		return rewriteValuePPC64_OpLsh32x8_0(v)
   308  	case OpLsh64x16:
   309  		return rewriteValuePPC64_OpLsh64x16_0(v)
   310  	case OpLsh64x32:
   311  		return rewriteValuePPC64_OpLsh64x32_0(v)
   312  	case OpLsh64x64:
   313  		return rewriteValuePPC64_OpLsh64x64_0(v)
   314  	case OpLsh64x8:
   315  		return rewriteValuePPC64_OpLsh64x8_0(v)
   316  	case OpLsh8x16:
   317  		return rewriteValuePPC64_OpLsh8x16_0(v)
   318  	case OpLsh8x32:
   319  		return rewriteValuePPC64_OpLsh8x32_0(v)
   320  	case OpLsh8x64:
   321  		return rewriteValuePPC64_OpLsh8x64_0(v)
   322  	case OpLsh8x8:
   323  		return rewriteValuePPC64_OpLsh8x8_0(v)
   324  	case OpMod16:
   325  		return rewriteValuePPC64_OpMod16_0(v)
   326  	case OpMod16u:
   327  		return rewriteValuePPC64_OpMod16u_0(v)
   328  	case OpMod32:
   329  		return rewriteValuePPC64_OpMod32_0(v)
   330  	case OpMod32u:
   331  		return rewriteValuePPC64_OpMod32u_0(v)
   332  	case OpMod64:
   333  		return rewriteValuePPC64_OpMod64_0(v)
   334  	case OpMod64u:
   335  		return rewriteValuePPC64_OpMod64u_0(v)
   336  	case OpMod8:
   337  		return rewriteValuePPC64_OpMod8_0(v)
   338  	case OpMod8u:
   339  		return rewriteValuePPC64_OpMod8u_0(v)
   340  	case OpMove:
   341  		return rewriteValuePPC64_OpMove_0(v) || rewriteValuePPC64_OpMove_10(v)
   342  	case OpMul16:
   343  		return rewriteValuePPC64_OpMul16_0(v)
   344  	case OpMul32:
   345  		return rewriteValuePPC64_OpMul32_0(v)
   346  	case OpMul32F:
   347  		return rewriteValuePPC64_OpMul32F_0(v)
   348  	case OpMul64:
   349  		return rewriteValuePPC64_OpMul64_0(v)
   350  	case OpMul64F:
   351  		return rewriteValuePPC64_OpMul64F_0(v)
   352  	case OpMul64uhilo:
   353  		return rewriteValuePPC64_OpMul64uhilo_0(v)
   354  	case OpMul8:
   355  		return rewriteValuePPC64_OpMul8_0(v)
   356  	case OpNeg16:
   357  		return rewriteValuePPC64_OpNeg16_0(v)
   358  	case OpNeg32:
   359  		return rewriteValuePPC64_OpNeg32_0(v)
   360  	case OpNeg32F:
   361  		return rewriteValuePPC64_OpNeg32F_0(v)
   362  	case OpNeg64:
   363  		return rewriteValuePPC64_OpNeg64_0(v)
   364  	case OpNeg64F:
   365  		return rewriteValuePPC64_OpNeg64F_0(v)
   366  	case OpNeg8:
   367  		return rewriteValuePPC64_OpNeg8_0(v)
   368  	case OpNeq16:
   369  		return rewriteValuePPC64_OpNeq16_0(v)
   370  	case OpNeq32:
   371  		return rewriteValuePPC64_OpNeq32_0(v)
   372  	case OpNeq32F:
   373  		return rewriteValuePPC64_OpNeq32F_0(v)
   374  	case OpNeq64:
   375  		return rewriteValuePPC64_OpNeq64_0(v)
   376  	case OpNeq64F:
   377  		return rewriteValuePPC64_OpNeq64F_0(v)
   378  	case OpNeq8:
   379  		return rewriteValuePPC64_OpNeq8_0(v)
   380  	case OpNeqB:
   381  		return rewriteValuePPC64_OpNeqB_0(v)
   382  	case OpNeqPtr:
   383  		return rewriteValuePPC64_OpNeqPtr_0(v)
   384  	case OpNilCheck:
   385  		return rewriteValuePPC64_OpNilCheck_0(v)
   386  	case OpNot:
   387  		return rewriteValuePPC64_OpNot_0(v)
   388  	case OpOffPtr:
   389  		return rewriteValuePPC64_OpOffPtr_0(v)
   390  	case OpOr16:
   391  		return rewriteValuePPC64_OpOr16_0(v)
   392  	case OpOr32:
   393  		return rewriteValuePPC64_OpOr32_0(v)
   394  	case OpOr64:
   395  		return rewriteValuePPC64_OpOr64_0(v)
   396  	case OpOr8:
   397  		return rewriteValuePPC64_OpOr8_0(v)
   398  	case OpOrB:
   399  		return rewriteValuePPC64_OpOrB_0(v)
   400  	case OpPPC64ADD:
   401  		return rewriteValuePPC64_OpPPC64ADD_0(v)
   402  	case OpPPC64ADDconst:
   403  		return rewriteValuePPC64_OpPPC64ADDconst_0(v)
   404  	case OpPPC64AND:
   405  		return rewriteValuePPC64_OpPPC64AND_0(v) || rewriteValuePPC64_OpPPC64AND_10(v)
   406  	case OpPPC64ANDconst:
   407  		return rewriteValuePPC64_OpPPC64ANDconst_0(v) || rewriteValuePPC64_OpPPC64ANDconst_10(v)
   408  	case OpPPC64CMP:
   409  		return rewriteValuePPC64_OpPPC64CMP_0(v)
   410  	case OpPPC64CMPU:
   411  		return rewriteValuePPC64_OpPPC64CMPU_0(v)
   412  	case OpPPC64CMPUconst:
   413  		return rewriteValuePPC64_OpPPC64CMPUconst_0(v)
   414  	case OpPPC64CMPW:
   415  		return rewriteValuePPC64_OpPPC64CMPW_0(v)
   416  	case OpPPC64CMPWU:
   417  		return rewriteValuePPC64_OpPPC64CMPWU_0(v)
   418  	case OpPPC64CMPWUconst:
   419  		return rewriteValuePPC64_OpPPC64CMPWUconst_0(v)
   420  	case OpPPC64CMPWconst:
   421  		return rewriteValuePPC64_OpPPC64CMPWconst_0(v)
   422  	case OpPPC64CMPconst:
   423  		return rewriteValuePPC64_OpPPC64CMPconst_0(v)
   424  	case OpPPC64Equal:
   425  		return rewriteValuePPC64_OpPPC64Equal_0(v)
   426  	case OpPPC64FABS:
   427  		return rewriteValuePPC64_OpPPC64FABS_0(v)
   428  	case OpPPC64FADD:
   429  		return rewriteValuePPC64_OpPPC64FADD_0(v)
   430  	case OpPPC64FADDS:
   431  		return rewriteValuePPC64_OpPPC64FADDS_0(v)
   432  	case OpPPC64FCEIL:
   433  		return rewriteValuePPC64_OpPPC64FCEIL_0(v)
   434  	case OpPPC64FFLOOR:
   435  		return rewriteValuePPC64_OpPPC64FFLOOR_0(v)
   436  	case OpPPC64FMOVDload:
   437  		return rewriteValuePPC64_OpPPC64FMOVDload_0(v)
   438  	case OpPPC64FMOVDstore:
   439  		return rewriteValuePPC64_OpPPC64FMOVDstore_0(v)
   440  	case OpPPC64FMOVSload:
   441  		return rewriteValuePPC64_OpPPC64FMOVSload_0(v)
   442  	case OpPPC64FMOVSstore:
   443  		return rewriteValuePPC64_OpPPC64FMOVSstore_0(v)
   444  	case OpPPC64FNEG:
   445  		return rewriteValuePPC64_OpPPC64FNEG_0(v)
   446  	case OpPPC64FSQRT:
   447  		return rewriteValuePPC64_OpPPC64FSQRT_0(v)
   448  	case OpPPC64FSUB:
   449  		return rewriteValuePPC64_OpPPC64FSUB_0(v)
   450  	case OpPPC64FSUBS:
   451  		return rewriteValuePPC64_OpPPC64FSUBS_0(v)
   452  	case OpPPC64FTRUNC:
   453  		return rewriteValuePPC64_OpPPC64FTRUNC_0(v)
   454  	case OpPPC64GreaterEqual:
   455  		return rewriteValuePPC64_OpPPC64GreaterEqual_0(v)
   456  	case OpPPC64GreaterThan:
   457  		return rewriteValuePPC64_OpPPC64GreaterThan_0(v)
   458  	case OpPPC64LessEqual:
   459  		return rewriteValuePPC64_OpPPC64LessEqual_0(v)
   460  	case OpPPC64LessThan:
   461  		return rewriteValuePPC64_OpPPC64LessThan_0(v)
   462  	case OpPPC64MFVSRD:
   463  		return rewriteValuePPC64_OpPPC64MFVSRD_0(v)
   464  	case OpPPC64MOVBZload:
   465  		return rewriteValuePPC64_OpPPC64MOVBZload_0(v)
   466  	case OpPPC64MOVBZloadidx:
   467  		return rewriteValuePPC64_OpPPC64MOVBZloadidx_0(v)
   468  	case OpPPC64MOVBZreg:
   469  		return rewriteValuePPC64_OpPPC64MOVBZreg_0(v) || rewriteValuePPC64_OpPPC64MOVBZreg_10(v)
   470  	case OpPPC64MOVBreg:
   471  		return rewriteValuePPC64_OpPPC64MOVBreg_0(v) || rewriteValuePPC64_OpPPC64MOVBreg_10(v)
   472  	case OpPPC64MOVBstore:
   473  		return rewriteValuePPC64_OpPPC64MOVBstore_0(v) || rewriteValuePPC64_OpPPC64MOVBstore_10(v) || rewriteValuePPC64_OpPPC64MOVBstore_20(v)
   474  	case OpPPC64MOVBstoreidx:
   475  		return rewriteValuePPC64_OpPPC64MOVBstoreidx_0(v) || rewriteValuePPC64_OpPPC64MOVBstoreidx_10(v)
   476  	case OpPPC64MOVBstorezero:
   477  		return rewriteValuePPC64_OpPPC64MOVBstorezero_0(v)
   478  	case OpPPC64MOVDload:
   479  		return rewriteValuePPC64_OpPPC64MOVDload_0(v)
   480  	case OpPPC64MOVDloadidx:
   481  		return rewriteValuePPC64_OpPPC64MOVDloadidx_0(v)
   482  	case OpPPC64MOVDstore:
   483  		return rewriteValuePPC64_OpPPC64MOVDstore_0(v)
   484  	case OpPPC64MOVDstoreidx:
   485  		return rewriteValuePPC64_OpPPC64MOVDstoreidx_0(v)
   486  	case OpPPC64MOVDstorezero:
   487  		return rewriteValuePPC64_OpPPC64MOVDstorezero_0(v)
   488  	case OpPPC64MOVHBRstore:
   489  		return rewriteValuePPC64_OpPPC64MOVHBRstore_0(v)
   490  	case OpPPC64MOVHZload:
   491  		return rewriteValuePPC64_OpPPC64MOVHZload_0(v)
   492  	case OpPPC64MOVHZloadidx:
   493  		return rewriteValuePPC64_OpPPC64MOVHZloadidx_0(v)
   494  	case OpPPC64MOVHZreg:
   495  		return rewriteValuePPC64_OpPPC64MOVHZreg_0(v) || rewriteValuePPC64_OpPPC64MOVHZreg_10(v)
   496  	case OpPPC64MOVHload:
   497  		return rewriteValuePPC64_OpPPC64MOVHload_0(v)
   498  	case OpPPC64MOVHloadidx:
   499  		return rewriteValuePPC64_OpPPC64MOVHloadidx_0(v)
   500  	case OpPPC64MOVHreg:
   501  		return rewriteValuePPC64_OpPPC64MOVHreg_0(v) || rewriteValuePPC64_OpPPC64MOVHreg_10(v)
   502  	case OpPPC64MOVHstore:
   503  		return rewriteValuePPC64_OpPPC64MOVHstore_0(v)
   504  	case OpPPC64MOVHstoreidx:
   505  		return rewriteValuePPC64_OpPPC64MOVHstoreidx_0(v)
   506  	case OpPPC64MOVHstorezero:
   507  		return rewriteValuePPC64_OpPPC64MOVHstorezero_0(v)
   508  	case OpPPC64MOVWBRstore:
   509  		return rewriteValuePPC64_OpPPC64MOVWBRstore_0(v)
   510  	case OpPPC64MOVWZload:
   511  		return rewriteValuePPC64_OpPPC64MOVWZload_0(v)
   512  	case OpPPC64MOVWZloadidx:
   513  		return rewriteValuePPC64_OpPPC64MOVWZloadidx_0(v)
   514  	case OpPPC64MOVWZreg:
   515  		return rewriteValuePPC64_OpPPC64MOVWZreg_0(v) || rewriteValuePPC64_OpPPC64MOVWZreg_10(v) || rewriteValuePPC64_OpPPC64MOVWZreg_20(v)
   516  	case OpPPC64MOVWload:
   517  		return rewriteValuePPC64_OpPPC64MOVWload_0(v)
   518  	case OpPPC64MOVWloadidx:
   519  		return rewriteValuePPC64_OpPPC64MOVWloadidx_0(v)
   520  	case OpPPC64MOVWreg:
   521  		return rewriteValuePPC64_OpPPC64MOVWreg_0(v) || rewriteValuePPC64_OpPPC64MOVWreg_10(v)
   522  	case OpPPC64MOVWstore:
   523  		return rewriteValuePPC64_OpPPC64MOVWstore_0(v)
   524  	case OpPPC64MOVWstoreidx:
   525  		return rewriteValuePPC64_OpPPC64MOVWstoreidx_0(v)
   526  	case OpPPC64MOVWstorezero:
   527  		return rewriteValuePPC64_OpPPC64MOVWstorezero_0(v)
   528  	case OpPPC64MTVSRD:
   529  		return rewriteValuePPC64_OpPPC64MTVSRD_0(v)
   530  	case OpPPC64MaskIfNotCarry:
   531  		return rewriteValuePPC64_OpPPC64MaskIfNotCarry_0(v)
   532  	case OpPPC64NotEqual:
   533  		return rewriteValuePPC64_OpPPC64NotEqual_0(v)
   534  	case OpPPC64OR:
   535  		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)
   536  	case OpPPC64ORN:
   537  		return rewriteValuePPC64_OpPPC64ORN_0(v)
   538  	case OpPPC64ORconst:
   539  		return rewriteValuePPC64_OpPPC64ORconst_0(v)
   540  	case OpPPC64SUB:
   541  		return rewriteValuePPC64_OpPPC64SUB_0(v)
   542  	case OpPPC64XOR:
   543  		return rewriteValuePPC64_OpPPC64XOR_0(v) || rewriteValuePPC64_OpPPC64XOR_10(v)
   544  	case OpPPC64XORconst:
   545  		return rewriteValuePPC64_OpPPC64XORconst_0(v)
   546  	case OpPopCount16:
   547  		return rewriteValuePPC64_OpPopCount16_0(v)
   548  	case OpPopCount32:
   549  		return rewriteValuePPC64_OpPopCount32_0(v)
   550  	case OpPopCount64:
   551  		return rewriteValuePPC64_OpPopCount64_0(v)
   552  	case OpPopCount8:
   553  		return rewriteValuePPC64_OpPopCount8_0(v)
   554  	case OpRound:
   555  		return rewriteValuePPC64_OpRound_0(v)
   556  	case OpRound32F:
   557  		return rewriteValuePPC64_OpRound32F_0(v)
   558  	case OpRound64F:
   559  		return rewriteValuePPC64_OpRound64F_0(v)
   560  	case OpRsh16Ux16:
   561  		return rewriteValuePPC64_OpRsh16Ux16_0(v)
   562  	case OpRsh16Ux32:
   563  		return rewriteValuePPC64_OpRsh16Ux32_0(v)
   564  	case OpRsh16Ux64:
   565  		return rewriteValuePPC64_OpRsh16Ux64_0(v)
   566  	case OpRsh16Ux8:
   567  		return rewriteValuePPC64_OpRsh16Ux8_0(v)
   568  	case OpRsh16x16:
   569  		return rewriteValuePPC64_OpRsh16x16_0(v)
   570  	case OpRsh16x32:
   571  		return rewriteValuePPC64_OpRsh16x32_0(v)
   572  	case OpRsh16x64:
   573  		return rewriteValuePPC64_OpRsh16x64_0(v)
   574  	case OpRsh16x8:
   575  		return rewriteValuePPC64_OpRsh16x8_0(v)
   576  	case OpRsh32Ux16:
   577  		return rewriteValuePPC64_OpRsh32Ux16_0(v)
   578  	case OpRsh32Ux32:
   579  		return rewriteValuePPC64_OpRsh32Ux32_0(v)
   580  	case OpRsh32Ux64:
   581  		return rewriteValuePPC64_OpRsh32Ux64_0(v) || rewriteValuePPC64_OpRsh32Ux64_10(v)
   582  	case OpRsh32Ux8:
   583  		return rewriteValuePPC64_OpRsh32Ux8_0(v)
   584  	case OpRsh32x16:
   585  		return rewriteValuePPC64_OpRsh32x16_0(v)
   586  	case OpRsh32x32:
   587  		return rewriteValuePPC64_OpRsh32x32_0(v)
   588  	case OpRsh32x64:
   589  		return rewriteValuePPC64_OpRsh32x64_0(v) || rewriteValuePPC64_OpRsh32x64_10(v)
   590  	case OpRsh32x8:
   591  		return rewriteValuePPC64_OpRsh32x8_0(v)
   592  	case OpRsh64Ux16:
   593  		return rewriteValuePPC64_OpRsh64Ux16_0(v)
   594  	case OpRsh64Ux32:
   595  		return rewriteValuePPC64_OpRsh64Ux32_0(v)
   596  	case OpRsh64Ux64:
   597  		return rewriteValuePPC64_OpRsh64Ux64_0(v) || rewriteValuePPC64_OpRsh64Ux64_10(v)
   598  	case OpRsh64Ux8:
   599  		return rewriteValuePPC64_OpRsh64Ux8_0(v)
   600  	case OpRsh64x16:
   601  		return rewriteValuePPC64_OpRsh64x16_0(v)
   602  	case OpRsh64x32:
   603  		return rewriteValuePPC64_OpRsh64x32_0(v)
   604  	case OpRsh64x64:
   605  		return rewriteValuePPC64_OpRsh64x64_0(v) || rewriteValuePPC64_OpRsh64x64_10(v)
   606  	case OpRsh64x8:
   607  		return rewriteValuePPC64_OpRsh64x8_0(v)
   608  	case OpRsh8Ux16:
   609  		return rewriteValuePPC64_OpRsh8Ux16_0(v)
   610  	case OpRsh8Ux32:
   611  		return rewriteValuePPC64_OpRsh8Ux32_0(v)
   612  	case OpRsh8Ux64:
   613  		return rewriteValuePPC64_OpRsh8Ux64_0(v)
   614  	case OpRsh8Ux8:
   615  		return rewriteValuePPC64_OpRsh8Ux8_0(v)
   616  	case OpRsh8x16:
   617  		return rewriteValuePPC64_OpRsh8x16_0(v)
   618  	case OpRsh8x32:
   619  		return rewriteValuePPC64_OpRsh8x32_0(v)
   620  	case OpRsh8x64:
   621  		return rewriteValuePPC64_OpRsh8x64_0(v)
   622  	case OpRsh8x8:
   623  		return rewriteValuePPC64_OpRsh8x8_0(v)
   624  	case OpSignExt16to32:
   625  		return rewriteValuePPC64_OpSignExt16to32_0(v)
   626  	case OpSignExt16to64:
   627  		return rewriteValuePPC64_OpSignExt16to64_0(v)
   628  	case OpSignExt32to64:
   629  		return rewriteValuePPC64_OpSignExt32to64_0(v)
   630  	case OpSignExt8to16:
   631  		return rewriteValuePPC64_OpSignExt8to16_0(v)
   632  	case OpSignExt8to32:
   633  		return rewriteValuePPC64_OpSignExt8to32_0(v)
   634  	case OpSignExt8to64:
   635  		return rewriteValuePPC64_OpSignExt8to64_0(v)
   636  	case OpSlicemask:
   637  		return rewriteValuePPC64_OpSlicemask_0(v)
   638  	case OpSqrt:
   639  		return rewriteValuePPC64_OpSqrt_0(v)
   640  	case OpStaticCall:
   641  		return rewriteValuePPC64_OpStaticCall_0(v)
   642  	case OpStore:
   643  		return rewriteValuePPC64_OpStore_0(v)
   644  	case OpSub16:
   645  		return rewriteValuePPC64_OpSub16_0(v)
   646  	case OpSub32:
   647  		return rewriteValuePPC64_OpSub32_0(v)
   648  	case OpSub32F:
   649  		return rewriteValuePPC64_OpSub32F_0(v)
   650  	case OpSub64:
   651  		return rewriteValuePPC64_OpSub64_0(v)
   652  	case OpSub64F:
   653  		return rewriteValuePPC64_OpSub64F_0(v)
   654  	case OpSub8:
   655  		return rewriteValuePPC64_OpSub8_0(v)
   656  	case OpSubPtr:
   657  		return rewriteValuePPC64_OpSubPtr_0(v)
   658  	case OpTrunc:
   659  		return rewriteValuePPC64_OpTrunc_0(v)
   660  	case OpTrunc16to8:
   661  		return rewriteValuePPC64_OpTrunc16to8_0(v)
   662  	case OpTrunc32to16:
   663  		return rewriteValuePPC64_OpTrunc32to16_0(v)
   664  	case OpTrunc32to8:
   665  		return rewriteValuePPC64_OpTrunc32to8_0(v)
   666  	case OpTrunc64to16:
   667  		return rewriteValuePPC64_OpTrunc64to16_0(v)
   668  	case OpTrunc64to32:
   669  		return rewriteValuePPC64_OpTrunc64to32_0(v)
   670  	case OpTrunc64to8:
   671  		return rewriteValuePPC64_OpTrunc64to8_0(v)
   672  	case OpWB:
   673  		return rewriteValuePPC64_OpWB_0(v)
   674  	case OpXor16:
   675  		return rewriteValuePPC64_OpXor16_0(v)
   676  	case OpXor32:
   677  		return rewriteValuePPC64_OpXor32_0(v)
   678  	case OpXor64:
   679  		return rewriteValuePPC64_OpXor64_0(v)
   680  	case OpXor8:
   681  		return rewriteValuePPC64_OpXor8_0(v)
   682  	case OpZero:
   683  		return rewriteValuePPC64_OpZero_0(v) || rewriteValuePPC64_OpZero_10(v)
   684  	case OpZeroExt16to32:
   685  		return rewriteValuePPC64_OpZeroExt16to32_0(v)
   686  	case OpZeroExt16to64:
   687  		return rewriteValuePPC64_OpZeroExt16to64_0(v)
   688  	case OpZeroExt32to64:
   689  		return rewriteValuePPC64_OpZeroExt32to64_0(v)
   690  	case OpZeroExt8to16:
   691  		return rewriteValuePPC64_OpZeroExt8to16_0(v)
   692  	case OpZeroExt8to32:
   693  		return rewriteValuePPC64_OpZeroExt8to32_0(v)
   694  	case OpZeroExt8to64:
   695  		return rewriteValuePPC64_OpZeroExt8to64_0(v)
   696  	}
   697  	return false
   698  }
   699  func rewriteValuePPC64_OpAbs_0(v *Value) bool {
   700  	// match: (Abs x)
   701  	// cond:
   702  	// result: (FABS x)
   703  	for {
   704  		x := v.Args[0]
   705  		v.reset(OpPPC64FABS)
   706  		v.AddArg(x)
   707  		return true
   708  	}
   709  }
   710  func rewriteValuePPC64_OpAdd16_0(v *Value) bool {
   711  	// match: (Add16 x y)
   712  	// cond:
   713  	// result: (ADD x y)
   714  	for {
   715  		_ = v.Args[1]
   716  		x := v.Args[0]
   717  		y := v.Args[1]
   718  		v.reset(OpPPC64ADD)
   719  		v.AddArg(x)
   720  		v.AddArg(y)
   721  		return true
   722  	}
   723  }
   724  func rewriteValuePPC64_OpAdd32_0(v *Value) bool {
   725  	// match: (Add32 x y)
   726  	// cond:
   727  	// result: (ADD x y)
   728  	for {
   729  		_ = v.Args[1]
   730  		x := v.Args[0]
   731  		y := v.Args[1]
   732  		v.reset(OpPPC64ADD)
   733  		v.AddArg(x)
   734  		v.AddArg(y)
   735  		return true
   736  	}
   737  }
   738  func rewriteValuePPC64_OpAdd32F_0(v *Value) bool {
   739  	// match: (Add32F x y)
   740  	// cond:
   741  	// result: (FADDS x y)
   742  	for {
   743  		_ = v.Args[1]
   744  		x := v.Args[0]
   745  		y := v.Args[1]
   746  		v.reset(OpPPC64FADDS)
   747  		v.AddArg(x)
   748  		v.AddArg(y)
   749  		return true
   750  	}
   751  }
   752  func rewriteValuePPC64_OpAdd64_0(v *Value) bool {
   753  	// match: (Add64 x y)
   754  	// cond:
   755  	// result: (ADD x y)
   756  	for {
   757  		_ = v.Args[1]
   758  		x := v.Args[0]
   759  		y := v.Args[1]
   760  		v.reset(OpPPC64ADD)
   761  		v.AddArg(x)
   762  		v.AddArg(y)
   763  		return true
   764  	}
   765  }
   766  func rewriteValuePPC64_OpAdd64F_0(v *Value) bool {
   767  	// match: (Add64F x y)
   768  	// cond:
   769  	// result: (FADD x y)
   770  	for {
   771  		_ = v.Args[1]
   772  		x := v.Args[0]
   773  		y := v.Args[1]
   774  		v.reset(OpPPC64FADD)
   775  		v.AddArg(x)
   776  		v.AddArg(y)
   777  		return true
   778  	}
   779  }
   780  func rewriteValuePPC64_OpAdd8_0(v *Value) bool {
   781  	// match: (Add8 x y)
   782  	// cond:
   783  	// result: (ADD x y)
   784  	for {
   785  		_ = v.Args[1]
   786  		x := v.Args[0]
   787  		y := v.Args[1]
   788  		v.reset(OpPPC64ADD)
   789  		v.AddArg(x)
   790  		v.AddArg(y)
   791  		return true
   792  	}
   793  }
   794  func rewriteValuePPC64_OpAddPtr_0(v *Value) bool {
   795  	// match: (AddPtr x y)
   796  	// cond:
   797  	// result: (ADD x y)
   798  	for {
   799  		_ = v.Args[1]
   800  		x := v.Args[0]
   801  		y := v.Args[1]
   802  		v.reset(OpPPC64ADD)
   803  		v.AddArg(x)
   804  		v.AddArg(y)
   805  		return true
   806  	}
   807  }
   808  func rewriteValuePPC64_OpAddr_0(v *Value) bool {
   809  	// match: (Addr {sym} base)
   810  	// cond:
   811  	// result: (MOVDaddr {sym} base)
   812  	for {
   813  		sym := v.Aux
   814  		base := v.Args[0]
   815  		v.reset(OpPPC64MOVDaddr)
   816  		v.Aux = sym
   817  		v.AddArg(base)
   818  		return true
   819  	}
   820  }
   821  func rewriteValuePPC64_OpAnd16_0(v *Value) bool {
   822  	// match: (And16 x y)
   823  	// cond:
   824  	// result: (AND x y)
   825  	for {
   826  		_ = v.Args[1]
   827  		x := v.Args[0]
   828  		y := v.Args[1]
   829  		v.reset(OpPPC64AND)
   830  		v.AddArg(x)
   831  		v.AddArg(y)
   832  		return true
   833  	}
   834  }
   835  func rewriteValuePPC64_OpAnd32_0(v *Value) bool {
   836  	// match: (And32 x y)
   837  	// cond:
   838  	// result: (AND x y)
   839  	for {
   840  		_ = v.Args[1]
   841  		x := v.Args[0]
   842  		y := v.Args[1]
   843  		v.reset(OpPPC64AND)
   844  		v.AddArg(x)
   845  		v.AddArg(y)
   846  		return true
   847  	}
   848  }
   849  func rewriteValuePPC64_OpAnd64_0(v *Value) bool {
   850  	// match: (And64 x y)
   851  	// cond:
   852  	// result: (AND x y)
   853  	for {
   854  		_ = v.Args[1]
   855  		x := v.Args[0]
   856  		y := v.Args[1]
   857  		v.reset(OpPPC64AND)
   858  		v.AddArg(x)
   859  		v.AddArg(y)
   860  		return true
   861  	}
   862  }
   863  func rewriteValuePPC64_OpAnd8_0(v *Value) bool {
   864  	// match: (And8 x y)
   865  	// cond:
   866  	// result: (AND x y)
   867  	for {
   868  		_ = v.Args[1]
   869  		x := v.Args[0]
   870  		y := v.Args[1]
   871  		v.reset(OpPPC64AND)
   872  		v.AddArg(x)
   873  		v.AddArg(y)
   874  		return true
   875  	}
   876  }
   877  func rewriteValuePPC64_OpAndB_0(v *Value) bool {
   878  	// match: (AndB x y)
   879  	// cond:
   880  	// result: (AND x y)
   881  	for {
   882  		_ = v.Args[1]
   883  		x := v.Args[0]
   884  		y := v.Args[1]
   885  		v.reset(OpPPC64AND)
   886  		v.AddArg(x)
   887  		v.AddArg(y)
   888  		return true
   889  	}
   890  }
   891  func rewriteValuePPC64_OpAtomicAdd32_0(v *Value) bool {
   892  	// match: (AtomicAdd32 ptr val mem)
   893  	// cond:
   894  	// result: (LoweredAtomicAdd32 ptr val mem)
   895  	for {
   896  		_ = v.Args[2]
   897  		ptr := v.Args[0]
   898  		val := v.Args[1]
   899  		mem := v.Args[2]
   900  		v.reset(OpPPC64LoweredAtomicAdd32)
   901  		v.AddArg(ptr)
   902  		v.AddArg(val)
   903  		v.AddArg(mem)
   904  		return true
   905  	}
   906  }
   907  func rewriteValuePPC64_OpAtomicAdd64_0(v *Value) bool {
   908  	// match: (AtomicAdd64 ptr val mem)
   909  	// cond:
   910  	// result: (LoweredAtomicAdd64 ptr val mem)
   911  	for {
   912  		_ = v.Args[2]
   913  		ptr := v.Args[0]
   914  		val := v.Args[1]
   915  		mem := v.Args[2]
   916  		v.reset(OpPPC64LoweredAtomicAdd64)
   917  		v.AddArg(ptr)
   918  		v.AddArg(val)
   919  		v.AddArg(mem)
   920  		return true
   921  	}
   922  }
   923  func rewriteValuePPC64_OpAtomicAnd8_0(v *Value) bool {
   924  	// match: (AtomicAnd8 ptr val mem)
   925  	// cond:
   926  	// result: (LoweredAtomicAnd8 ptr val mem)
   927  	for {
   928  		_ = v.Args[2]
   929  		ptr := v.Args[0]
   930  		val := v.Args[1]
   931  		mem := v.Args[2]
   932  		v.reset(OpPPC64LoweredAtomicAnd8)
   933  		v.AddArg(ptr)
   934  		v.AddArg(val)
   935  		v.AddArg(mem)
   936  		return true
   937  	}
   938  }
   939  func rewriteValuePPC64_OpAtomicCompareAndSwap32_0(v *Value) bool {
   940  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
   941  	// cond:
   942  	// result: (LoweredAtomicCas32 [1] ptr old new_ mem)
   943  	for {
   944  		_ = v.Args[3]
   945  		ptr := v.Args[0]
   946  		old := v.Args[1]
   947  		new_ := v.Args[2]
   948  		mem := v.Args[3]
   949  		v.reset(OpPPC64LoweredAtomicCas32)
   950  		v.AuxInt = 1
   951  		v.AddArg(ptr)
   952  		v.AddArg(old)
   953  		v.AddArg(new_)
   954  		v.AddArg(mem)
   955  		return true
   956  	}
   957  }
   958  func rewriteValuePPC64_OpAtomicCompareAndSwap64_0(v *Value) bool {
   959  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
   960  	// cond:
   961  	// result: (LoweredAtomicCas64 [1] ptr old new_ mem)
   962  	for {
   963  		_ = v.Args[3]
   964  		ptr := v.Args[0]
   965  		old := v.Args[1]
   966  		new_ := v.Args[2]
   967  		mem := v.Args[3]
   968  		v.reset(OpPPC64LoweredAtomicCas64)
   969  		v.AuxInt = 1
   970  		v.AddArg(ptr)
   971  		v.AddArg(old)
   972  		v.AddArg(new_)
   973  		v.AddArg(mem)
   974  		return true
   975  	}
   976  }
   977  func rewriteValuePPC64_OpAtomicCompareAndSwapRel32_0(v *Value) bool {
   978  	// match: (AtomicCompareAndSwapRel32 ptr old new_ mem)
   979  	// cond:
   980  	// result: (LoweredAtomicCas32 [0] ptr old new_ mem)
   981  	for {
   982  		_ = v.Args[3]
   983  		ptr := v.Args[0]
   984  		old := v.Args[1]
   985  		new_ := v.Args[2]
   986  		mem := v.Args[3]
   987  		v.reset(OpPPC64LoweredAtomicCas32)
   988  		v.AuxInt = 0
   989  		v.AddArg(ptr)
   990  		v.AddArg(old)
   991  		v.AddArg(new_)
   992  		v.AddArg(mem)
   993  		return true
   994  	}
   995  }
   996  func rewriteValuePPC64_OpAtomicExchange32_0(v *Value) bool {
   997  	// match: (AtomicExchange32 ptr val mem)
   998  	// cond:
   999  	// result: (LoweredAtomicExchange32 ptr val mem)
  1000  	for {
  1001  		_ = v.Args[2]
  1002  		ptr := v.Args[0]
  1003  		val := v.Args[1]
  1004  		mem := v.Args[2]
  1005  		v.reset(OpPPC64LoweredAtomicExchange32)
  1006  		v.AddArg(ptr)
  1007  		v.AddArg(val)
  1008  		v.AddArg(mem)
  1009  		return true
  1010  	}
  1011  }
  1012  func rewriteValuePPC64_OpAtomicExchange64_0(v *Value) bool {
  1013  	// match: (AtomicExchange64 ptr val mem)
  1014  	// cond:
  1015  	// result: (LoweredAtomicExchange64 ptr val mem)
  1016  	for {
  1017  		_ = v.Args[2]
  1018  		ptr := v.Args[0]
  1019  		val := v.Args[1]
  1020  		mem := v.Args[2]
  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  	// cond:
  1031  	// result: (LoweredAtomicLoad32 [1] ptr mem)
  1032  	for {
  1033  		_ = v.Args[1]
  1034  		ptr := v.Args[0]
  1035  		mem := v.Args[1]
  1036  		v.reset(OpPPC64LoweredAtomicLoad32)
  1037  		v.AuxInt = 1
  1038  		v.AddArg(ptr)
  1039  		v.AddArg(mem)
  1040  		return true
  1041  	}
  1042  }
  1043  func rewriteValuePPC64_OpAtomicLoad64_0(v *Value) bool {
  1044  	// match: (AtomicLoad64 ptr mem)
  1045  	// cond:
  1046  	// result: (LoweredAtomicLoad64 [1] ptr mem)
  1047  	for {
  1048  		_ = v.Args[1]
  1049  		ptr := v.Args[0]
  1050  		mem := v.Args[1]
  1051  		v.reset(OpPPC64LoweredAtomicLoad64)
  1052  		v.AuxInt = 1
  1053  		v.AddArg(ptr)
  1054  		v.AddArg(mem)
  1055  		return true
  1056  	}
  1057  }
  1058  func rewriteValuePPC64_OpAtomicLoadAcq32_0(v *Value) bool {
  1059  	// match: (AtomicLoadAcq32 ptr mem)
  1060  	// cond:
  1061  	// result: (LoweredAtomicLoad32 [0] ptr mem)
  1062  	for {
  1063  		_ = v.Args[1]
  1064  		ptr := v.Args[0]
  1065  		mem := v.Args[1]
  1066  		v.reset(OpPPC64LoweredAtomicLoad32)
  1067  		v.AuxInt = 0
  1068  		v.AddArg(ptr)
  1069  		v.AddArg(mem)
  1070  		return true
  1071  	}
  1072  }
  1073  func rewriteValuePPC64_OpAtomicLoadPtr_0(v *Value) bool {
  1074  	// match: (AtomicLoadPtr ptr mem)
  1075  	// cond:
  1076  	// result: (LoweredAtomicLoadPtr [1] ptr mem)
  1077  	for {
  1078  		_ = v.Args[1]
  1079  		ptr := v.Args[0]
  1080  		mem := v.Args[1]
  1081  		v.reset(OpPPC64LoweredAtomicLoadPtr)
  1082  		v.AuxInt = 1
  1083  		v.AddArg(ptr)
  1084  		v.AddArg(mem)
  1085  		return true
  1086  	}
  1087  }
  1088  func rewriteValuePPC64_OpAtomicOr8_0(v *Value) bool {
  1089  	// match: (AtomicOr8 ptr val mem)
  1090  	// cond:
  1091  	// result: (LoweredAtomicOr8 ptr val mem)
  1092  	for {
  1093  		_ = v.Args[2]
  1094  		ptr := v.Args[0]
  1095  		val := v.Args[1]
  1096  		mem := v.Args[2]
  1097  		v.reset(OpPPC64LoweredAtomicOr8)
  1098  		v.AddArg(ptr)
  1099  		v.AddArg(val)
  1100  		v.AddArg(mem)
  1101  		return true
  1102  	}
  1103  }
  1104  func rewriteValuePPC64_OpAtomicStore32_0(v *Value) bool {
  1105  	// match: (AtomicStore32 ptr val mem)
  1106  	// cond:
  1107  	// result: (LoweredAtomicStore32 [1] ptr val mem)
  1108  	for {
  1109  		_ = v.Args[2]
  1110  		ptr := v.Args[0]
  1111  		val := v.Args[1]
  1112  		mem := v.Args[2]
  1113  		v.reset(OpPPC64LoweredAtomicStore32)
  1114  		v.AuxInt = 1
  1115  		v.AddArg(ptr)
  1116  		v.AddArg(val)
  1117  		v.AddArg(mem)
  1118  		return true
  1119  	}
  1120  }
  1121  func rewriteValuePPC64_OpAtomicStore64_0(v *Value) bool {
  1122  	// match: (AtomicStore64 ptr val mem)
  1123  	// cond:
  1124  	// result: (LoweredAtomicStore64 [1] ptr val mem)
  1125  	for {
  1126  		_ = v.Args[2]
  1127  		ptr := v.Args[0]
  1128  		val := v.Args[1]
  1129  		mem := v.Args[2]
  1130  		v.reset(OpPPC64LoweredAtomicStore64)
  1131  		v.AuxInt = 1
  1132  		v.AddArg(ptr)
  1133  		v.AddArg(val)
  1134  		v.AddArg(mem)
  1135  		return true
  1136  	}
  1137  }
  1138  func rewriteValuePPC64_OpAtomicStoreRel32_0(v *Value) bool {
  1139  	// match: (AtomicStoreRel32 ptr val mem)
  1140  	// cond:
  1141  	// result: (LoweredAtomicStore32 [0] ptr val mem)
  1142  	for {
  1143  		_ = v.Args[2]
  1144  		ptr := v.Args[0]
  1145  		val := v.Args[1]
  1146  		mem := v.Args[2]
  1147  		v.reset(OpPPC64LoweredAtomicStore32)
  1148  		v.AuxInt = 0
  1149  		v.AddArg(ptr)
  1150  		v.AddArg(val)
  1151  		v.AddArg(mem)
  1152  		return true
  1153  	}
  1154  }
  1155  func rewriteValuePPC64_OpAvg64u_0(v *Value) bool {
  1156  	b := v.Block
  1157  	_ = b
  1158  	// match: (Avg64u <t> x y)
  1159  	// cond:
  1160  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1161  	for {
  1162  		t := v.Type
  1163  		_ = v.Args[1]
  1164  		x := v.Args[0]
  1165  		y := v.Args[1]
  1166  		v.reset(OpPPC64ADD)
  1167  		v0 := b.NewValue0(v.Pos, OpPPC64SRDconst, t)
  1168  		v0.AuxInt = 1
  1169  		v1 := b.NewValue0(v.Pos, OpPPC64SUB, t)
  1170  		v1.AddArg(x)
  1171  		v1.AddArg(y)
  1172  		v0.AddArg(v1)
  1173  		v.AddArg(v0)
  1174  		v.AddArg(y)
  1175  		return true
  1176  	}
  1177  }
  1178  func rewriteValuePPC64_OpBitLen32_0(v *Value) bool {
  1179  	b := v.Block
  1180  	_ = b
  1181  	typ := &b.Func.Config.Types
  1182  	_ = typ
  1183  	// match: (BitLen32 x)
  1184  	// cond:
  1185  	// result: (SUB (MOVDconst [32]) (CNTLZW <typ.Int> x))
  1186  	for {
  1187  		x := v.Args[0]
  1188  		v.reset(OpPPC64SUB)
  1189  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  1190  		v0.AuxInt = 32
  1191  		v.AddArg(v0)
  1192  		v1 := b.NewValue0(v.Pos, OpPPC64CNTLZW, typ.Int)
  1193  		v1.AddArg(x)
  1194  		v.AddArg(v1)
  1195  		return true
  1196  	}
  1197  }
  1198  func rewriteValuePPC64_OpBitLen64_0(v *Value) bool {
  1199  	b := v.Block
  1200  	_ = b
  1201  	typ := &b.Func.Config.Types
  1202  	_ = typ
  1203  	// match: (BitLen64 x)
  1204  	// cond:
  1205  	// result: (SUB (MOVDconst [64]) (CNTLZD <typ.Int> x))
  1206  	for {
  1207  		x := v.Args[0]
  1208  		v.reset(OpPPC64SUB)
  1209  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  1210  		v0.AuxInt = 64
  1211  		v.AddArg(v0)
  1212  		v1 := b.NewValue0(v.Pos, OpPPC64CNTLZD, typ.Int)
  1213  		v1.AddArg(x)
  1214  		v.AddArg(v1)
  1215  		return true
  1216  	}
  1217  }
  1218  func rewriteValuePPC64_OpCeil_0(v *Value) bool {
  1219  	// match: (Ceil x)
  1220  	// cond:
  1221  	// result: (FCEIL x)
  1222  	for {
  1223  		x := v.Args[0]
  1224  		v.reset(OpPPC64FCEIL)
  1225  		v.AddArg(x)
  1226  		return true
  1227  	}
  1228  }
  1229  func rewriteValuePPC64_OpClosureCall_0(v *Value) bool {
  1230  	// match: (ClosureCall [argwid] entry closure mem)
  1231  	// cond:
  1232  	// result: (CALLclosure [argwid] entry closure mem)
  1233  	for {
  1234  		argwid := v.AuxInt
  1235  		_ = v.Args[2]
  1236  		entry := v.Args[0]
  1237  		closure := v.Args[1]
  1238  		mem := v.Args[2]
  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  	// cond:
  1250  	// result: (NOR x x)
  1251  	for {
  1252  		x := v.Args[0]
  1253  		v.reset(OpPPC64NOR)
  1254  		v.AddArg(x)
  1255  		v.AddArg(x)
  1256  		return true
  1257  	}
  1258  }
  1259  func rewriteValuePPC64_OpCom32_0(v *Value) bool {
  1260  	// match: (Com32 x)
  1261  	// cond:
  1262  	// result: (NOR x x)
  1263  	for {
  1264  		x := v.Args[0]
  1265  		v.reset(OpPPC64NOR)
  1266  		v.AddArg(x)
  1267  		v.AddArg(x)
  1268  		return true
  1269  	}
  1270  }
  1271  func rewriteValuePPC64_OpCom64_0(v *Value) bool {
  1272  	// match: (Com64 x)
  1273  	// cond:
  1274  	// result: (NOR x x)
  1275  	for {
  1276  		x := v.Args[0]
  1277  		v.reset(OpPPC64NOR)
  1278  		v.AddArg(x)
  1279  		v.AddArg(x)
  1280  		return true
  1281  	}
  1282  }
  1283  func rewriteValuePPC64_OpCom8_0(v *Value) bool {
  1284  	// match: (Com8 x)
  1285  	// cond:
  1286  	// result: (NOR x x)
  1287  	for {
  1288  		x := v.Args[0]
  1289  		v.reset(OpPPC64NOR)
  1290  		v.AddArg(x)
  1291  		v.AddArg(x)
  1292  		return true
  1293  	}
  1294  }
  1295  func rewriteValuePPC64_OpConst16_0(v *Value) bool {
  1296  	// match: (Const16 [val])
  1297  	// cond:
  1298  	// result: (MOVDconst [val])
  1299  	for {
  1300  		val := v.AuxInt
  1301  		v.reset(OpPPC64MOVDconst)
  1302  		v.AuxInt = val
  1303  		return true
  1304  	}
  1305  }
  1306  func rewriteValuePPC64_OpConst32_0(v *Value) bool {
  1307  	// match: (Const32 [val])
  1308  	// cond:
  1309  	// result: (MOVDconst [val])
  1310  	for {
  1311  		val := v.AuxInt
  1312  		v.reset(OpPPC64MOVDconst)
  1313  		v.AuxInt = val
  1314  		return true
  1315  	}
  1316  }
  1317  func rewriteValuePPC64_OpConst32F_0(v *Value) bool {
  1318  	// match: (Const32F [val])
  1319  	// cond:
  1320  	// result: (FMOVSconst [val])
  1321  	for {
  1322  		val := v.AuxInt
  1323  		v.reset(OpPPC64FMOVSconst)
  1324  		v.AuxInt = val
  1325  		return true
  1326  	}
  1327  }
  1328  func rewriteValuePPC64_OpConst64_0(v *Value) bool {
  1329  	// match: (Const64 [val])
  1330  	// cond:
  1331  	// result: (MOVDconst [val])
  1332  	for {
  1333  		val := v.AuxInt
  1334  		v.reset(OpPPC64MOVDconst)
  1335  		v.AuxInt = val
  1336  		return true
  1337  	}
  1338  }
  1339  func rewriteValuePPC64_OpConst64F_0(v *Value) bool {
  1340  	// match: (Const64F [val])
  1341  	// cond:
  1342  	// result: (FMOVDconst [val])
  1343  	for {
  1344  		val := v.AuxInt
  1345  		v.reset(OpPPC64FMOVDconst)
  1346  		v.AuxInt = val
  1347  		return true
  1348  	}
  1349  }
  1350  func rewriteValuePPC64_OpConst8_0(v *Value) bool {
  1351  	// match: (Const8 [val])
  1352  	// cond:
  1353  	// result: (MOVDconst [val])
  1354  	for {
  1355  		val := v.AuxInt
  1356  		v.reset(OpPPC64MOVDconst)
  1357  		v.AuxInt = val
  1358  		return true
  1359  	}
  1360  }
  1361  func rewriteValuePPC64_OpConstBool_0(v *Value) bool {
  1362  	// match: (ConstBool [b])
  1363  	// cond:
  1364  	// result: (MOVDconst [b])
  1365  	for {
  1366  		b := v.AuxInt
  1367  		v.reset(OpPPC64MOVDconst)
  1368  		v.AuxInt = b
  1369  		return true
  1370  	}
  1371  }
  1372  func rewriteValuePPC64_OpConstNil_0(v *Value) bool {
  1373  	// match: (ConstNil)
  1374  	// cond:
  1375  	// result: (MOVDconst [0])
  1376  	for {
  1377  		v.reset(OpPPC64MOVDconst)
  1378  		v.AuxInt = 0
  1379  		return true
  1380  	}
  1381  }
  1382  func rewriteValuePPC64_OpCopysign_0(v *Value) bool {
  1383  	// match: (Copysign x y)
  1384  	// cond:
  1385  	// result: (FCPSGN y x)
  1386  	for {
  1387  		_ = v.Args[1]
  1388  		x := v.Args[0]
  1389  		y := v.Args[1]
  1390  		v.reset(OpPPC64FCPSGN)
  1391  		v.AddArg(y)
  1392  		v.AddArg(x)
  1393  		return true
  1394  	}
  1395  }
  1396  func rewriteValuePPC64_OpCtz16_0(v *Value) bool {
  1397  	b := v.Block
  1398  	_ = b
  1399  	typ := &b.Func.Config.Types
  1400  	_ = typ
  1401  	// match: (Ctz16 x)
  1402  	// cond:
  1403  	// result: (POPCNTW (MOVHZreg (ANDN <typ.Int16> (ADDconst <typ.Int16> [-1] x) x)))
  1404  	for {
  1405  		x := v.Args[0]
  1406  		v.reset(OpPPC64POPCNTW)
  1407  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
  1408  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int16)
  1409  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int16)
  1410  		v2.AuxInt = -1
  1411  		v2.AddArg(x)
  1412  		v1.AddArg(v2)
  1413  		v1.AddArg(x)
  1414  		v0.AddArg(v1)
  1415  		v.AddArg(v0)
  1416  		return true
  1417  	}
  1418  }
  1419  func rewriteValuePPC64_OpCtz32_0(v *Value) bool {
  1420  	b := v.Block
  1421  	_ = b
  1422  	typ := &b.Func.Config.Types
  1423  	_ = typ
  1424  	// match: (Ctz32 x)
  1425  	// cond:
  1426  	// result: (POPCNTW (MOVWZreg (ANDN <typ.Int> (ADDconst <typ.Int> [-1] x) x)))
  1427  	for {
  1428  		x := v.Args[0]
  1429  		v.reset(OpPPC64POPCNTW)
  1430  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
  1431  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int)
  1432  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int)
  1433  		v2.AuxInt = -1
  1434  		v2.AddArg(x)
  1435  		v1.AddArg(v2)
  1436  		v1.AddArg(x)
  1437  		v0.AddArg(v1)
  1438  		v.AddArg(v0)
  1439  		return true
  1440  	}
  1441  }
  1442  func rewriteValuePPC64_OpCtz32NonZero_0(v *Value) bool {
  1443  	// match: (Ctz32NonZero x)
  1444  	// cond:
  1445  	// result: (Ctz32 x)
  1446  	for {
  1447  		x := v.Args[0]
  1448  		v.reset(OpCtz32)
  1449  		v.AddArg(x)
  1450  		return true
  1451  	}
  1452  }
  1453  func rewriteValuePPC64_OpCtz64_0(v *Value) bool {
  1454  	b := v.Block
  1455  	_ = b
  1456  	typ := &b.Func.Config.Types
  1457  	_ = typ
  1458  	// match: (Ctz64 x)
  1459  	// cond:
  1460  	// result: (POPCNTD (ANDN <typ.Int64> (ADDconst <typ.Int64> [-1] x) x))
  1461  	for {
  1462  		x := v.Args[0]
  1463  		v.reset(OpPPC64POPCNTD)
  1464  		v0 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int64)
  1465  		v1 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int64)
  1466  		v1.AuxInt = -1
  1467  		v1.AddArg(x)
  1468  		v0.AddArg(v1)
  1469  		v0.AddArg(x)
  1470  		v.AddArg(v0)
  1471  		return true
  1472  	}
  1473  }
  1474  func rewriteValuePPC64_OpCtz64NonZero_0(v *Value) bool {
  1475  	// match: (Ctz64NonZero x)
  1476  	// cond:
  1477  	// result: (Ctz64 x)
  1478  	for {
  1479  		x := v.Args[0]
  1480  		v.reset(OpCtz64)
  1481  		v.AddArg(x)
  1482  		return true
  1483  	}
  1484  }
  1485  func rewriteValuePPC64_OpCtz8_0(v *Value) bool {
  1486  	b := v.Block
  1487  	_ = b
  1488  	typ := &b.Func.Config.Types
  1489  	_ = typ
  1490  	// match: (Ctz8 x)
  1491  	// cond:
  1492  	// result: (POPCNTB (MOVBZreg (ANDN <typ.UInt8> (ADDconst <typ.UInt8> [-1] x) x)))
  1493  	for {
  1494  		x := v.Args[0]
  1495  		v.reset(OpPPC64POPCNTB)
  1496  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  1497  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.UInt8)
  1498  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.UInt8)
  1499  		v2.AuxInt = -1
  1500  		v2.AddArg(x)
  1501  		v1.AddArg(v2)
  1502  		v1.AddArg(x)
  1503  		v0.AddArg(v1)
  1504  		v.AddArg(v0)
  1505  		return true
  1506  	}
  1507  }
  1508  func rewriteValuePPC64_OpCvt32Fto32_0(v *Value) bool {
  1509  	b := v.Block
  1510  	_ = b
  1511  	typ := &b.Func.Config.Types
  1512  	_ = typ
  1513  	// match: (Cvt32Fto32 x)
  1514  	// cond:
  1515  	// result: (MFVSRD (FCTIWZ x))
  1516  	for {
  1517  		x := v.Args[0]
  1518  		v.reset(OpPPC64MFVSRD)
  1519  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, typ.Float64)
  1520  		v0.AddArg(x)
  1521  		v.AddArg(v0)
  1522  		return true
  1523  	}
  1524  }
  1525  func rewriteValuePPC64_OpCvt32Fto64_0(v *Value) bool {
  1526  	b := v.Block
  1527  	_ = b
  1528  	typ := &b.Func.Config.Types
  1529  	_ = typ
  1530  	// match: (Cvt32Fto64 x)
  1531  	// cond:
  1532  	// result: (MFVSRD (FCTIDZ x))
  1533  	for {
  1534  		x := v.Args[0]
  1535  		v.reset(OpPPC64MFVSRD)
  1536  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, typ.Float64)
  1537  		v0.AddArg(x)
  1538  		v.AddArg(v0)
  1539  		return true
  1540  	}
  1541  }
  1542  func rewriteValuePPC64_OpCvt32Fto64F_0(v *Value) bool {
  1543  	// match: (Cvt32Fto64F x)
  1544  	// cond:
  1545  	// result: x
  1546  	for {
  1547  		x := v.Args[0]
  1548  		v.reset(OpCopy)
  1549  		v.Type = x.Type
  1550  		v.AddArg(x)
  1551  		return true
  1552  	}
  1553  }
  1554  func rewriteValuePPC64_OpCvt32to32F_0(v *Value) bool {
  1555  	b := v.Block
  1556  	_ = b
  1557  	typ := &b.Func.Config.Types
  1558  	_ = typ
  1559  	// match: (Cvt32to32F x)
  1560  	// cond:
  1561  	// result: (FCFIDS (MTVSRD (SignExt32to64 x)))
  1562  	for {
  1563  		x := v.Args[0]
  1564  		v.reset(OpPPC64FCFIDS)
  1565  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1566  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1567  		v1.AddArg(x)
  1568  		v0.AddArg(v1)
  1569  		v.AddArg(v0)
  1570  		return true
  1571  	}
  1572  }
  1573  func rewriteValuePPC64_OpCvt32to64F_0(v *Value) bool {
  1574  	b := v.Block
  1575  	_ = b
  1576  	typ := &b.Func.Config.Types
  1577  	_ = typ
  1578  	// match: (Cvt32to64F x)
  1579  	// cond:
  1580  	// result: (FCFID (MTVSRD (SignExt32to64 x)))
  1581  	for {
  1582  		x := v.Args[0]
  1583  		v.reset(OpPPC64FCFID)
  1584  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1585  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1586  		v1.AddArg(x)
  1587  		v0.AddArg(v1)
  1588  		v.AddArg(v0)
  1589  		return true
  1590  	}
  1591  }
  1592  func rewriteValuePPC64_OpCvt64Fto32_0(v *Value) bool {
  1593  	b := v.Block
  1594  	_ = b
  1595  	typ := &b.Func.Config.Types
  1596  	_ = typ
  1597  	// match: (Cvt64Fto32 x)
  1598  	// cond:
  1599  	// result: (MFVSRD (FCTIWZ x))
  1600  	for {
  1601  		x := v.Args[0]
  1602  		v.reset(OpPPC64MFVSRD)
  1603  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, typ.Float64)
  1604  		v0.AddArg(x)
  1605  		v.AddArg(v0)
  1606  		return true
  1607  	}
  1608  }
  1609  func rewriteValuePPC64_OpCvt64Fto32F_0(v *Value) bool {
  1610  	// match: (Cvt64Fto32F x)
  1611  	// cond:
  1612  	// result: (FRSP x)
  1613  	for {
  1614  		x := v.Args[0]
  1615  		v.reset(OpPPC64FRSP)
  1616  		v.AddArg(x)
  1617  		return true
  1618  	}
  1619  }
  1620  func rewriteValuePPC64_OpCvt64Fto64_0(v *Value) bool {
  1621  	b := v.Block
  1622  	_ = b
  1623  	typ := &b.Func.Config.Types
  1624  	_ = typ
  1625  	// match: (Cvt64Fto64 x)
  1626  	// cond:
  1627  	// result: (MFVSRD (FCTIDZ x))
  1628  	for {
  1629  		x := v.Args[0]
  1630  		v.reset(OpPPC64MFVSRD)
  1631  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, typ.Float64)
  1632  		v0.AddArg(x)
  1633  		v.AddArg(v0)
  1634  		return true
  1635  	}
  1636  }
  1637  func rewriteValuePPC64_OpCvt64to32F_0(v *Value) bool {
  1638  	b := v.Block
  1639  	_ = b
  1640  	typ := &b.Func.Config.Types
  1641  	_ = typ
  1642  	// match: (Cvt64to32F x)
  1643  	// cond:
  1644  	// result: (FCFIDS (MTVSRD x))
  1645  	for {
  1646  		x := v.Args[0]
  1647  		v.reset(OpPPC64FCFIDS)
  1648  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1649  		v0.AddArg(x)
  1650  		v.AddArg(v0)
  1651  		return true
  1652  	}
  1653  }
  1654  func rewriteValuePPC64_OpCvt64to64F_0(v *Value) bool {
  1655  	b := v.Block
  1656  	_ = b
  1657  	typ := &b.Func.Config.Types
  1658  	_ = typ
  1659  	// match: (Cvt64to64F x)
  1660  	// cond:
  1661  	// result: (FCFID (MTVSRD x))
  1662  	for {
  1663  		x := v.Args[0]
  1664  		v.reset(OpPPC64FCFID)
  1665  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1666  		v0.AddArg(x)
  1667  		v.AddArg(v0)
  1668  		return true
  1669  	}
  1670  }
  1671  func rewriteValuePPC64_OpDiv16_0(v *Value) bool {
  1672  	b := v.Block
  1673  	_ = b
  1674  	typ := &b.Func.Config.Types
  1675  	_ = typ
  1676  	// match: (Div16 x y)
  1677  	// cond:
  1678  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
  1679  	for {
  1680  		_ = v.Args[1]
  1681  		x := v.Args[0]
  1682  		y := v.Args[1]
  1683  		v.reset(OpPPC64DIVW)
  1684  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1685  		v0.AddArg(x)
  1686  		v.AddArg(v0)
  1687  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1688  		v1.AddArg(y)
  1689  		v.AddArg(v1)
  1690  		return true
  1691  	}
  1692  }
  1693  func rewriteValuePPC64_OpDiv16u_0(v *Value) bool {
  1694  	b := v.Block
  1695  	_ = b
  1696  	typ := &b.Func.Config.Types
  1697  	_ = typ
  1698  	// match: (Div16u x y)
  1699  	// cond:
  1700  	// result: (DIVWU (ZeroExt16to32 x) (ZeroExt16to32 y))
  1701  	for {
  1702  		_ = v.Args[1]
  1703  		x := v.Args[0]
  1704  		y := v.Args[1]
  1705  		v.reset(OpPPC64DIVWU)
  1706  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1707  		v0.AddArg(x)
  1708  		v.AddArg(v0)
  1709  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1710  		v1.AddArg(y)
  1711  		v.AddArg(v1)
  1712  		return true
  1713  	}
  1714  }
  1715  func rewriteValuePPC64_OpDiv32_0(v *Value) bool {
  1716  	// match: (Div32 x y)
  1717  	// cond:
  1718  	// result: (DIVW x y)
  1719  	for {
  1720  		_ = v.Args[1]
  1721  		x := v.Args[0]
  1722  		y := v.Args[1]
  1723  		v.reset(OpPPC64DIVW)
  1724  		v.AddArg(x)
  1725  		v.AddArg(y)
  1726  		return true
  1727  	}
  1728  }
  1729  func rewriteValuePPC64_OpDiv32F_0(v *Value) bool {
  1730  	// match: (Div32F x y)
  1731  	// cond:
  1732  	// result: (FDIVS x y)
  1733  	for {
  1734  		_ = v.Args[1]
  1735  		x := v.Args[0]
  1736  		y := v.Args[1]
  1737  		v.reset(OpPPC64FDIVS)
  1738  		v.AddArg(x)
  1739  		v.AddArg(y)
  1740  		return true
  1741  	}
  1742  }
  1743  func rewriteValuePPC64_OpDiv32u_0(v *Value) bool {
  1744  	// match: (Div32u x y)
  1745  	// cond:
  1746  	// result: (DIVWU x y)
  1747  	for {
  1748  		_ = v.Args[1]
  1749  		x := v.Args[0]
  1750  		y := v.Args[1]
  1751  		v.reset(OpPPC64DIVWU)
  1752  		v.AddArg(x)
  1753  		v.AddArg(y)
  1754  		return true
  1755  	}
  1756  }
  1757  func rewriteValuePPC64_OpDiv64_0(v *Value) bool {
  1758  	// match: (Div64 x y)
  1759  	// cond:
  1760  	// result: (DIVD x y)
  1761  	for {
  1762  		_ = v.Args[1]
  1763  		x := v.Args[0]
  1764  		y := v.Args[1]
  1765  		v.reset(OpPPC64DIVD)
  1766  		v.AddArg(x)
  1767  		v.AddArg(y)
  1768  		return true
  1769  	}
  1770  }
  1771  func rewriteValuePPC64_OpDiv64F_0(v *Value) bool {
  1772  	// match: (Div64F x y)
  1773  	// cond:
  1774  	// result: (FDIV x y)
  1775  	for {
  1776  		_ = v.Args[1]
  1777  		x := v.Args[0]
  1778  		y := v.Args[1]
  1779  		v.reset(OpPPC64FDIV)
  1780  		v.AddArg(x)
  1781  		v.AddArg(y)
  1782  		return true
  1783  	}
  1784  }
  1785  func rewriteValuePPC64_OpDiv64u_0(v *Value) bool {
  1786  	// match: (Div64u x y)
  1787  	// cond:
  1788  	// result: (DIVDU x y)
  1789  	for {
  1790  		_ = v.Args[1]
  1791  		x := v.Args[0]
  1792  		y := v.Args[1]
  1793  		v.reset(OpPPC64DIVDU)
  1794  		v.AddArg(x)
  1795  		v.AddArg(y)
  1796  		return true
  1797  	}
  1798  }
  1799  func rewriteValuePPC64_OpDiv8_0(v *Value) bool {
  1800  	b := v.Block
  1801  	_ = b
  1802  	typ := &b.Func.Config.Types
  1803  	_ = typ
  1804  	// match: (Div8 x y)
  1805  	// cond:
  1806  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
  1807  	for {
  1808  		_ = v.Args[1]
  1809  		x := v.Args[0]
  1810  		y := v.Args[1]
  1811  		v.reset(OpPPC64DIVW)
  1812  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1813  		v0.AddArg(x)
  1814  		v.AddArg(v0)
  1815  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1816  		v1.AddArg(y)
  1817  		v.AddArg(v1)
  1818  		return true
  1819  	}
  1820  }
  1821  func rewriteValuePPC64_OpDiv8u_0(v *Value) bool {
  1822  	b := v.Block
  1823  	_ = b
  1824  	typ := &b.Func.Config.Types
  1825  	_ = typ
  1826  	// match: (Div8u x y)
  1827  	// cond:
  1828  	// result: (DIVWU (ZeroExt8to32 x) (ZeroExt8to32 y))
  1829  	for {
  1830  		_ = v.Args[1]
  1831  		x := v.Args[0]
  1832  		y := v.Args[1]
  1833  		v.reset(OpPPC64DIVWU)
  1834  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1835  		v0.AddArg(x)
  1836  		v.AddArg(v0)
  1837  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1838  		v1.AddArg(y)
  1839  		v.AddArg(v1)
  1840  		return true
  1841  	}
  1842  }
  1843  func rewriteValuePPC64_OpEq16_0(v *Value) bool {
  1844  	b := v.Block
  1845  	_ = b
  1846  	typ := &b.Func.Config.Types
  1847  	_ = typ
  1848  	// match: (Eq16 x y)
  1849  	// cond: isSigned(x.Type) && isSigned(y.Type)
  1850  	// result: (Equal (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  1851  	for {
  1852  		_ = v.Args[1]
  1853  		x := v.Args[0]
  1854  		y := v.Args[1]
  1855  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  1856  			break
  1857  		}
  1858  		v.reset(OpPPC64Equal)
  1859  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1860  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1861  		v1.AddArg(x)
  1862  		v0.AddArg(v1)
  1863  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1864  		v2.AddArg(y)
  1865  		v0.AddArg(v2)
  1866  		v.AddArg(v0)
  1867  		return true
  1868  	}
  1869  	// match: (Eq16 x y)
  1870  	// cond:
  1871  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  1872  	for {
  1873  		_ = v.Args[1]
  1874  		x := v.Args[0]
  1875  		y := v.Args[1]
  1876  		v.reset(OpPPC64Equal)
  1877  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1878  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1879  		v1.AddArg(x)
  1880  		v0.AddArg(v1)
  1881  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1882  		v2.AddArg(y)
  1883  		v0.AddArg(v2)
  1884  		v.AddArg(v0)
  1885  		return true
  1886  	}
  1887  }
  1888  func rewriteValuePPC64_OpEq32_0(v *Value) bool {
  1889  	b := v.Block
  1890  	_ = b
  1891  	// match: (Eq32 x y)
  1892  	// cond:
  1893  	// result: (Equal (CMPW x y))
  1894  	for {
  1895  		_ = v.Args[1]
  1896  		x := v.Args[0]
  1897  		y := v.Args[1]
  1898  		v.reset(OpPPC64Equal)
  1899  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1900  		v0.AddArg(x)
  1901  		v0.AddArg(y)
  1902  		v.AddArg(v0)
  1903  		return true
  1904  	}
  1905  }
  1906  func rewriteValuePPC64_OpEq32F_0(v *Value) bool {
  1907  	b := v.Block
  1908  	_ = b
  1909  	// match: (Eq32F x y)
  1910  	// cond:
  1911  	// result: (Equal (FCMPU x y))
  1912  	for {
  1913  		_ = v.Args[1]
  1914  		x := v.Args[0]
  1915  		y := v.Args[1]
  1916  		v.reset(OpPPC64Equal)
  1917  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1918  		v0.AddArg(x)
  1919  		v0.AddArg(y)
  1920  		v.AddArg(v0)
  1921  		return true
  1922  	}
  1923  }
  1924  func rewriteValuePPC64_OpEq64_0(v *Value) bool {
  1925  	b := v.Block
  1926  	_ = b
  1927  	// match: (Eq64 x y)
  1928  	// cond:
  1929  	// result: (Equal (CMP x y))
  1930  	for {
  1931  		_ = v.Args[1]
  1932  		x := v.Args[0]
  1933  		y := v.Args[1]
  1934  		v.reset(OpPPC64Equal)
  1935  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  1936  		v0.AddArg(x)
  1937  		v0.AddArg(y)
  1938  		v.AddArg(v0)
  1939  		return true
  1940  	}
  1941  }
  1942  func rewriteValuePPC64_OpEq64F_0(v *Value) bool {
  1943  	b := v.Block
  1944  	_ = b
  1945  	// match: (Eq64F x y)
  1946  	// cond:
  1947  	// result: (Equal (FCMPU x y))
  1948  	for {
  1949  		_ = v.Args[1]
  1950  		x := v.Args[0]
  1951  		y := v.Args[1]
  1952  		v.reset(OpPPC64Equal)
  1953  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1954  		v0.AddArg(x)
  1955  		v0.AddArg(y)
  1956  		v.AddArg(v0)
  1957  		return true
  1958  	}
  1959  }
  1960  func rewriteValuePPC64_OpEq8_0(v *Value) bool {
  1961  	b := v.Block
  1962  	_ = b
  1963  	typ := &b.Func.Config.Types
  1964  	_ = typ
  1965  	// match: (Eq8 x y)
  1966  	// cond: isSigned(x.Type) && isSigned(y.Type)
  1967  	// result: (Equal (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  1968  	for {
  1969  		_ = v.Args[1]
  1970  		x := v.Args[0]
  1971  		y := v.Args[1]
  1972  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  1973  			break
  1974  		}
  1975  		v.reset(OpPPC64Equal)
  1976  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1977  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1978  		v1.AddArg(x)
  1979  		v0.AddArg(v1)
  1980  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1981  		v2.AddArg(y)
  1982  		v0.AddArg(v2)
  1983  		v.AddArg(v0)
  1984  		return true
  1985  	}
  1986  	// match: (Eq8 x y)
  1987  	// cond:
  1988  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  1989  	for {
  1990  		_ = v.Args[1]
  1991  		x := v.Args[0]
  1992  		y := v.Args[1]
  1993  		v.reset(OpPPC64Equal)
  1994  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1995  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1996  		v1.AddArg(x)
  1997  		v0.AddArg(v1)
  1998  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1999  		v2.AddArg(y)
  2000  		v0.AddArg(v2)
  2001  		v.AddArg(v0)
  2002  		return true
  2003  	}
  2004  }
  2005  func rewriteValuePPC64_OpEqB_0(v *Value) bool {
  2006  	b := v.Block
  2007  	_ = b
  2008  	typ := &b.Func.Config.Types
  2009  	_ = typ
  2010  	// match: (EqB x y)
  2011  	// cond:
  2012  	// result: (ANDconst [1] (EQV x y))
  2013  	for {
  2014  		_ = v.Args[1]
  2015  		x := v.Args[0]
  2016  		y := v.Args[1]
  2017  		v.reset(OpPPC64ANDconst)
  2018  		v.AuxInt = 1
  2019  		v0 := b.NewValue0(v.Pos, OpPPC64EQV, typ.Int64)
  2020  		v0.AddArg(x)
  2021  		v0.AddArg(y)
  2022  		v.AddArg(v0)
  2023  		return true
  2024  	}
  2025  }
  2026  func rewriteValuePPC64_OpEqPtr_0(v *Value) bool {
  2027  	b := v.Block
  2028  	_ = b
  2029  	// match: (EqPtr x y)
  2030  	// cond:
  2031  	// result: (Equal (CMP x y))
  2032  	for {
  2033  		_ = v.Args[1]
  2034  		x := v.Args[0]
  2035  		y := v.Args[1]
  2036  		v.reset(OpPPC64Equal)
  2037  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2038  		v0.AddArg(x)
  2039  		v0.AddArg(y)
  2040  		v.AddArg(v0)
  2041  		return true
  2042  	}
  2043  }
  2044  func rewriteValuePPC64_OpFloor_0(v *Value) bool {
  2045  	// match: (Floor x)
  2046  	// cond:
  2047  	// result: (FFLOOR x)
  2048  	for {
  2049  		x := v.Args[0]
  2050  		v.reset(OpPPC64FFLOOR)
  2051  		v.AddArg(x)
  2052  		return true
  2053  	}
  2054  }
  2055  func rewriteValuePPC64_OpGeq16_0(v *Value) bool {
  2056  	b := v.Block
  2057  	_ = b
  2058  	typ := &b.Func.Config.Types
  2059  	_ = typ
  2060  	// match: (Geq16 x y)
  2061  	// cond:
  2062  	// result: (GreaterEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2063  	for {
  2064  		_ = v.Args[1]
  2065  		x := v.Args[0]
  2066  		y := v.Args[1]
  2067  		v.reset(OpPPC64GreaterEqual)
  2068  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2069  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2070  		v1.AddArg(x)
  2071  		v0.AddArg(v1)
  2072  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2073  		v2.AddArg(y)
  2074  		v0.AddArg(v2)
  2075  		v.AddArg(v0)
  2076  		return true
  2077  	}
  2078  }
  2079  func rewriteValuePPC64_OpGeq16U_0(v *Value) bool {
  2080  	b := v.Block
  2081  	_ = b
  2082  	typ := &b.Func.Config.Types
  2083  	_ = typ
  2084  	// match: (Geq16U x y)
  2085  	// cond:
  2086  	// result: (GreaterEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2087  	for {
  2088  		_ = v.Args[1]
  2089  		x := v.Args[0]
  2090  		y := v.Args[1]
  2091  		v.reset(OpPPC64GreaterEqual)
  2092  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2093  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2094  		v1.AddArg(x)
  2095  		v0.AddArg(v1)
  2096  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2097  		v2.AddArg(y)
  2098  		v0.AddArg(v2)
  2099  		v.AddArg(v0)
  2100  		return true
  2101  	}
  2102  }
  2103  func rewriteValuePPC64_OpGeq32_0(v *Value) bool {
  2104  	b := v.Block
  2105  	_ = b
  2106  	// match: (Geq32 x y)
  2107  	// cond:
  2108  	// result: (GreaterEqual (CMPW x y))
  2109  	for {
  2110  		_ = v.Args[1]
  2111  		x := v.Args[0]
  2112  		y := v.Args[1]
  2113  		v.reset(OpPPC64GreaterEqual)
  2114  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2115  		v0.AddArg(x)
  2116  		v0.AddArg(y)
  2117  		v.AddArg(v0)
  2118  		return true
  2119  	}
  2120  }
  2121  func rewriteValuePPC64_OpGeq32F_0(v *Value) bool {
  2122  	b := v.Block
  2123  	_ = b
  2124  	// match: (Geq32F x y)
  2125  	// cond:
  2126  	// result: (FGreaterEqual (FCMPU x y))
  2127  	for {
  2128  		_ = v.Args[1]
  2129  		x := v.Args[0]
  2130  		y := v.Args[1]
  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_OpGeq32U_0(v *Value) bool {
  2140  	b := v.Block
  2141  	_ = b
  2142  	// match: (Geq32U x y)
  2143  	// cond:
  2144  	// result: (GreaterEqual (CMPWU x y))
  2145  	for {
  2146  		_ = v.Args[1]
  2147  		x := v.Args[0]
  2148  		y := v.Args[1]
  2149  		v.reset(OpPPC64GreaterEqual)
  2150  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2151  		v0.AddArg(x)
  2152  		v0.AddArg(y)
  2153  		v.AddArg(v0)
  2154  		return true
  2155  	}
  2156  }
  2157  func rewriteValuePPC64_OpGeq64_0(v *Value) bool {
  2158  	b := v.Block
  2159  	_ = b
  2160  	// match: (Geq64 x y)
  2161  	// cond:
  2162  	// result: (GreaterEqual (CMP x y))
  2163  	for {
  2164  		_ = v.Args[1]
  2165  		x := v.Args[0]
  2166  		y := v.Args[1]
  2167  		v.reset(OpPPC64GreaterEqual)
  2168  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2169  		v0.AddArg(x)
  2170  		v0.AddArg(y)
  2171  		v.AddArg(v0)
  2172  		return true
  2173  	}
  2174  }
  2175  func rewriteValuePPC64_OpGeq64F_0(v *Value) bool {
  2176  	b := v.Block
  2177  	_ = b
  2178  	// match: (Geq64F x y)
  2179  	// cond:
  2180  	// result: (FGreaterEqual (FCMPU x y))
  2181  	for {
  2182  		_ = v.Args[1]
  2183  		x := v.Args[0]
  2184  		y := v.Args[1]
  2185  		v.reset(OpPPC64FGreaterEqual)
  2186  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2187  		v0.AddArg(x)
  2188  		v0.AddArg(y)
  2189  		v.AddArg(v0)
  2190  		return true
  2191  	}
  2192  }
  2193  func rewriteValuePPC64_OpGeq64U_0(v *Value) bool {
  2194  	b := v.Block
  2195  	_ = b
  2196  	// match: (Geq64U x y)
  2197  	// cond:
  2198  	// result: (GreaterEqual (CMPU x y))
  2199  	for {
  2200  		_ = v.Args[1]
  2201  		x := v.Args[0]
  2202  		y := v.Args[1]
  2203  		v.reset(OpPPC64GreaterEqual)
  2204  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2205  		v0.AddArg(x)
  2206  		v0.AddArg(y)
  2207  		v.AddArg(v0)
  2208  		return true
  2209  	}
  2210  }
  2211  func rewriteValuePPC64_OpGeq8_0(v *Value) bool {
  2212  	b := v.Block
  2213  	_ = b
  2214  	typ := &b.Func.Config.Types
  2215  	_ = typ
  2216  	// match: (Geq8 x y)
  2217  	// cond:
  2218  	// result: (GreaterEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2219  	for {
  2220  		_ = v.Args[1]
  2221  		x := v.Args[0]
  2222  		y := v.Args[1]
  2223  		v.reset(OpPPC64GreaterEqual)
  2224  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2225  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2226  		v1.AddArg(x)
  2227  		v0.AddArg(v1)
  2228  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2229  		v2.AddArg(y)
  2230  		v0.AddArg(v2)
  2231  		v.AddArg(v0)
  2232  		return true
  2233  	}
  2234  }
  2235  func rewriteValuePPC64_OpGeq8U_0(v *Value) bool {
  2236  	b := v.Block
  2237  	_ = b
  2238  	typ := &b.Func.Config.Types
  2239  	_ = typ
  2240  	// match: (Geq8U x y)
  2241  	// cond:
  2242  	// result: (GreaterEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2243  	for {
  2244  		_ = v.Args[1]
  2245  		x := v.Args[0]
  2246  		y := v.Args[1]
  2247  		v.reset(OpPPC64GreaterEqual)
  2248  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2249  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2250  		v1.AddArg(x)
  2251  		v0.AddArg(v1)
  2252  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2253  		v2.AddArg(y)
  2254  		v0.AddArg(v2)
  2255  		v.AddArg(v0)
  2256  		return true
  2257  	}
  2258  }
  2259  func rewriteValuePPC64_OpGetCallerPC_0(v *Value) bool {
  2260  	// match: (GetCallerPC)
  2261  	// cond:
  2262  	// result: (LoweredGetCallerPC)
  2263  	for {
  2264  		v.reset(OpPPC64LoweredGetCallerPC)
  2265  		return true
  2266  	}
  2267  }
  2268  func rewriteValuePPC64_OpGetCallerSP_0(v *Value) bool {
  2269  	// match: (GetCallerSP)
  2270  	// cond:
  2271  	// result: (LoweredGetCallerSP)
  2272  	for {
  2273  		v.reset(OpPPC64LoweredGetCallerSP)
  2274  		return true
  2275  	}
  2276  }
  2277  func rewriteValuePPC64_OpGetClosurePtr_0(v *Value) bool {
  2278  	// match: (GetClosurePtr)
  2279  	// cond:
  2280  	// result: (LoweredGetClosurePtr)
  2281  	for {
  2282  		v.reset(OpPPC64LoweredGetClosurePtr)
  2283  		return true
  2284  	}
  2285  }
  2286  func rewriteValuePPC64_OpGreater16_0(v *Value) bool {
  2287  	b := v.Block
  2288  	_ = b
  2289  	typ := &b.Func.Config.Types
  2290  	_ = typ
  2291  	// match: (Greater16 x y)
  2292  	// cond:
  2293  	// result: (GreaterThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2294  	for {
  2295  		_ = v.Args[1]
  2296  		x := v.Args[0]
  2297  		y := v.Args[1]
  2298  		v.reset(OpPPC64GreaterThan)
  2299  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2300  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2301  		v1.AddArg(x)
  2302  		v0.AddArg(v1)
  2303  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2304  		v2.AddArg(y)
  2305  		v0.AddArg(v2)
  2306  		v.AddArg(v0)
  2307  		return true
  2308  	}
  2309  }
  2310  func rewriteValuePPC64_OpGreater16U_0(v *Value) bool {
  2311  	b := v.Block
  2312  	_ = b
  2313  	typ := &b.Func.Config.Types
  2314  	_ = typ
  2315  	// match: (Greater16U x y)
  2316  	// cond:
  2317  	// result: (GreaterThan (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2318  	for {
  2319  		_ = v.Args[1]
  2320  		x := v.Args[0]
  2321  		y := v.Args[1]
  2322  		v.reset(OpPPC64GreaterThan)
  2323  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2324  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2325  		v1.AddArg(x)
  2326  		v0.AddArg(v1)
  2327  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2328  		v2.AddArg(y)
  2329  		v0.AddArg(v2)
  2330  		v.AddArg(v0)
  2331  		return true
  2332  	}
  2333  }
  2334  func rewriteValuePPC64_OpGreater32_0(v *Value) bool {
  2335  	b := v.Block
  2336  	_ = b
  2337  	// match: (Greater32 x y)
  2338  	// cond:
  2339  	// result: (GreaterThan (CMPW x y))
  2340  	for {
  2341  		_ = v.Args[1]
  2342  		x := v.Args[0]
  2343  		y := v.Args[1]
  2344  		v.reset(OpPPC64GreaterThan)
  2345  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2346  		v0.AddArg(x)
  2347  		v0.AddArg(y)
  2348  		v.AddArg(v0)
  2349  		return true
  2350  	}
  2351  }
  2352  func rewriteValuePPC64_OpGreater32F_0(v *Value) bool {
  2353  	b := v.Block
  2354  	_ = b
  2355  	// match: (Greater32F x y)
  2356  	// cond:
  2357  	// result: (FGreaterThan (FCMPU x y))
  2358  	for {
  2359  		_ = v.Args[1]
  2360  		x := v.Args[0]
  2361  		y := v.Args[1]
  2362  		v.reset(OpPPC64FGreaterThan)
  2363  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2364  		v0.AddArg(x)
  2365  		v0.AddArg(y)
  2366  		v.AddArg(v0)
  2367  		return true
  2368  	}
  2369  }
  2370  func rewriteValuePPC64_OpGreater32U_0(v *Value) bool {
  2371  	b := v.Block
  2372  	_ = b
  2373  	// match: (Greater32U x y)
  2374  	// cond:
  2375  	// result: (GreaterThan (CMPWU x y))
  2376  	for {
  2377  		_ = v.Args[1]
  2378  		x := v.Args[0]
  2379  		y := v.Args[1]
  2380  		v.reset(OpPPC64GreaterThan)
  2381  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2382  		v0.AddArg(x)
  2383  		v0.AddArg(y)
  2384  		v.AddArg(v0)
  2385  		return true
  2386  	}
  2387  }
  2388  func rewriteValuePPC64_OpGreater64_0(v *Value) bool {
  2389  	b := v.Block
  2390  	_ = b
  2391  	// match: (Greater64 x y)
  2392  	// cond:
  2393  	// result: (GreaterThan (CMP x y))
  2394  	for {
  2395  		_ = v.Args[1]
  2396  		x := v.Args[0]
  2397  		y := v.Args[1]
  2398  		v.reset(OpPPC64GreaterThan)
  2399  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2400  		v0.AddArg(x)
  2401  		v0.AddArg(y)
  2402  		v.AddArg(v0)
  2403  		return true
  2404  	}
  2405  }
  2406  func rewriteValuePPC64_OpGreater64F_0(v *Value) bool {
  2407  	b := v.Block
  2408  	_ = b
  2409  	// match: (Greater64F x y)
  2410  	// cond:
  2411  	// result: (FGreaterThan (FCMPU x y))
  2412  	for {
  2413  		_ = v.Args[1]
  2414  		x := v.Args[0]
  2415  		y := v.Args[1]
  2416  		v.reset(OpPPC64FGreaterThan)
  2417  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2418  		v0.AddArg(x)
  2419  		v0.AddArg(y)
  2420  		v.AddArg(v0)
  2421  		return true
  2422  	}
  2423  }
  2424  func rewriteValuePPC64_OpGreater64U_0(v *Value) bool {
  2425  	b := v.Block
  2426  	_ = b
  2427  	// match: (Greater64U x y)
  2428  	// cond:
  2429  	// result: (GreaterThan (CMPU x y))
  2430  	for {
  2431  		_ = v.Args[1]
  2432  		x := v.Args[0]
  2433  		y := v.Args[1]
  2434  		v.reset(OpPPC64GreaterThan)
  2435  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2436  		v0.AddArg(x)
  2437  		v0.AddArg(y)
  2438  		v.AddArg(v0)
  2439  		return true
  2440  	}
  2441  }
  2442  func rewriteValuePPC64_OpGreater8_0(v *Value) bool {
  2443  	b := v.Block
  2444  	_ = b
  2445  	typ := &b.Func.Config.Types
  2446  	_ = typ
  2447  	// match: (Greater8 x y)
  2448  	// cond:
  2449  	// result: (GreaterThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2450  	for {
  2451  		_ = v.Args[1]
  2452  		x := v.Args[0]
  2453  		y := v.Args[1]
  2454  		v.reset(OpPPC64GreaterThan)
  2455  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2456  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2457  		v1.AddArg(x)
  2458  		v0.AddArg(v1)
  2459  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2460  		v2.AddArg(y)
  2461  		v0.AddArg(v2)
  2462  		v.AddArg(v0)
  2463  		return true
  2464  	}
  2465  }
  2466  func rewriteValuePPC64_OpGreater8U_0(v *Value) bool {
  2467  	b := v.Block
  2468  	_ = b
  2469  	typ := &b.Func.Config.Types
  2470  	_ = typ
  2471  	// match: (Greater8U x y)
  2472  	// cond:
  2473  	// result: (GreaterThan (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2474  	for {
  2475  		_ = v.Args[1]
  2476  		x := v.Args[0]
  2477  		y := v.Args[1]
  2478  		v.reset(OpPPC64GreaterThan)
  2479  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2480  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2481  		v1.AddArg(x)
  2482  		v0.AddArg(v1)
  2483  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2484  		v2.AddArg(y)
  2485  		v0.AddArg(v2)
  2486  		v.AddArg(v0)
  2487  		return true
  2488  	}
  2489  }
  2490  func rewriteValuePPC64_OpHmul32_0(v *Value) bool {
  2491  	// match: (Hmul32 x y)
  2492  	// cond:
  2493  	// result: (MULHW x y)
  2494  	for {
  2495  		_ = v.Args[1]
  2496  		x := v.Args[0]
  2497  		y := v.Args[1]
  2498  		v.reset(OpPPC64MULHW)
  2499  		v.AddArg(x)
  2500  		v.AddArg(y)
  2501  		return true
  2502  	}
  2503  }
  2504  func rewriteValuePPC64_OpHmul32u_0(v *Value) bool {
  2505  	// match: (Hmul32u x y)
  2506  	// cond:
  2507  	// result: (MULHWU x y)
  2508  	for {
  2509  		_ = v.Args[1]
  2510  		x := v.Args[0]
  2511  		y := v.Args[1]
  2512  		v.reset(OpPPC64MULHWU)
  2513  		v.AddArg(x)
  2514  		v.AddArg(y)
  2515  		return true
  2516  	}
  2517  }
  2518  func rewriteValuePPC64_OpHmul64_0(v *Value) bool {
  2519  	// match: (Hmul64 x y)
  2520  	// cond:
  2521  	// result: (MULHD x y)
  2522  	for {
  2523  		_ = v.Args[1]
  2524  		x := v.Args[0]
  2525  		y := v.Args[1]
  2526  		v.reset(OpPPC64MULHD)
  2527  		v.AddArg(x)
  2528  		v.AddArg(y)
  2529  		return true
  2530  	}
  2531  }
  2532  func rewriteValuePPC64_OpHmul64u_0(v *Value) bool {
  2533  	// match: (Hmul64u x y)
  2534  	// cond:
  2535  	// result: (MULHDU x y)
  2536  	for {
  2537  		_ = v.Args[1]
  2538  		x := v.Args[0]
  2539  		y := v.Args[1]
  2540  		v.reset(OpPPC64MULHDU)
  2541  		v.AddArg(x)
  2542  		v.AddArg(y)
  2543  		return true
  2544  	}
  2545  }
  2546  func rewriteValuePPC64_OpInterCall_0(v *Value) bool {
  2547  	// match: (InterCall [argwid] entry mem)
  2548  	// cond:
  2549  	// result: (CALLinter [argwid] entry mem)
  2550  	for {
  2551  		argwid := v.AuxInt
  2552  		_ = v.Args[1]
  2553  		entry := v.Args[0]
  2554  		mem := v.Args[1]
  2555  		v.reset(OpPPC64CALLinter)
  2556  		v.AuxInt = argwid
  2557  		v.AddArg(entry)
  2558  		v.AddArg(mem)
  2559  		return true
  2560  	}
  2561  }
  2562  func rewriteValuePPC64_OpIsInBounds_0(v *Value) bool {
  2563  	b := v.Block
  2564  	_ = b
  2565  	// match: (IsInBounds idx len)
  2566  	// cond:
  2567  	// result: (LessThan (CMPU idx len))
  2568  	for {
  2569  		_ = v.Args[1]
  2570  		idx := v.Args[0]
  2571  		len := v.Args[1]
  2572  		v.reset(OpPPC64LessThan)
  2573  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2574  		v0.AddArg(idx)
  2575  		v0.AddArg(len)
  2576  		v.AddArg(v0)
  2577  		return true
  2578  	}
  2579  }
  2580  func rewriteValuePPC64_OpIsNonNil_0(v *Value) bool {
  2581  	b := v.Block
  2582  	_ = b
  2583  	// match: (IsNonNil ptr)
  2584  	// cond:
  2585  	// result: (NotEqual (CMPconst [0] ptr))
  2586  	for {
  2587  		ptr := v.Args[0]
  2588  		v.reset(OpPPC64NotEqual)
  2589  		v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, types.TypeFlags)
  2590  		v0.AuxInt = 0
  2591  		v0.AddArg(ptr)
  2592  		v.AddArg(v0)
  2593  		return true
  2594  	}
  2595  }
  2596  func rewriteValuePPC64_OpIsSliceInBounds_0(v *Value) bool {
  2597  	b := v.Block
  2598  	_ = b
  2599  	// match: (IsSliceInBounds idx len)
  2600  	// cond:
  2601  	// result: (LessEqual (CMPU idx len))
  2602  	for {
  2603  		_ = v.Args[1]
  2604  		idx := v.Args[0]
  2605  		len := v.Args[1]
  2606  		v.reset(OpPPC64LessEqual)
  2607  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2608  		v0.AddArg(idx)
  2609  		v0.AddArg(len)
  2610  		v.AddArg(v0)
  2611  		return true
  2612  	}
  2613  }
  2614  func rewriteValuePPC64_OpLeq16_0(v *Value) bool {
  2615  	b := v.Block
  2616  	_ = b
  2617  	typ := &b.Func.Config.Types
  2618  	_ = typ
  2619  	// match: (Leq16 x y)
  2620  	// cond:
  2621  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2622  	for {
  2623  		_ = v.Args[1]
  2624  		x := v.Args[0]
  2625  		y := v.Args[1]
  2626  		v.reset(OpPPC64LessEqual)
  2627  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2628  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2629  		v1.AddArg(x)
  2630  		v0.AddArg(v1)
  2631  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2632  		v2.AddArg(y)
  2633  		v0.AddArg(v2)
  2634  		v.AddArg(v0)
  2635  		return true
  2636  	}
  2637  }
  2638  func rewriteValuePPC64_OpLeq16U_0(v *Value) bool {
  2639  	b := v.Block
  2640  	_ = b
  2641  	typ := &b.Func.Config.Types
  2642  	_ = typ
  2643  	// match: (Leq16U x y)
  2644  	// cond:
  2645  	// result: (LessEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2646  	for {
  2647  		_ = v.Args[1]
  2648  		x := v.Args[0]
  2649  		y := v.Args[1]
  2650  		v.reset(OpPPC64LessEqual)
  2651  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2652  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2653  		v1.AddArg(x)
  2654  		v0.AddArg(v1)
  2655  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2656  		v2.AddArg(y)
  2657  		v0.AddArg(v2)
  2658  		v.AddArg(v0)
  2659  		return true
  2660  	}
  2661  }
  2662  func rewriteValuePPC64_OpLeq32_0(v *Value) bool {
  2663  	b := v.Block
  2664  	_ = b
  2665  	// match: (Leq32 x y)
  2666  	// cond:
  2667  	// result: (LessEqual (CMPW x y))
  2668  	for {
  2669  		_ = v.Args[1]
  2670  		x := v.Args[0]
  2671  		y := v.Args[1]
  2672  		v.reset(OpPPC64LessEqual)
  2673  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2674  		v0.AddArg(x)
  2675  		v0.AddArg(y)
  2676  		v.AddArg(v0)
  2677  		return true
  2678  	}
  2679  }
  2680  func rewriteValuePPC64_OpLeq32F_0(v *Value) bool {
  2681  	b := v.Block
  2682  	_ = b
  2683  	// match: (Leq32F x y)
  2684  	// cond:
  2685  	// result: (FLessEqual (FCMPU x y))
  2686  	for {
  2687  		_ = v.Args[1]
  2688  		x := v.Args[0]
  2689  		y := v.Args[1]
  2690  		v.reset(OpPPC64FLessEqual)
  2691  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2692  		v0.AddArg(x)
  2693  		v0.AddArg(y)
  2694  		v.AddArg(v0)
  2695  		return true
  2696  	}
  2697  }
  2698  func rewriteValuePPC64_OpLeq32U_0(v *Value) bool {
  2699  	b := v.Block
  2700  	_ = b
  2701  	// match: (Leq32U x y)
  2702  	// cond:
  2703  	// result: (LessEqual (CMPWU x y))
  2704  	for {
  2705  		_ = v.Args[1]
  2706  		x := v.Args[0]
  2707  		y := v.Args[1]
  2708  		v.reset(OpPPC64LessEqual)
  2709  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2710  		v0.AddArg(x)
  2711  		v0.AddArg(y)
  2712  		v.AddArg(v0)
  2713  		return true
  2714  	}
  2715  }
  2716  func rewriteValuePPC64_OpLeq64_0(v *Value) bool {
  2717  	b := v.Block
  2718  	_ = b
  2719  	// match: (Leq64 x y)
  2720  	// cond:
  2721  	// result: (LessEqual (CMP x y))
  2722  	for {
  2723  		_ = v.Args[1]
  2724  		x := v.Args[0]
  2725  		y := v.Args[1]
  2726  		v.reset(OpPPC64LessEqual)
  2727  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2728  		v0.AddArg(x)
  2729  		v0.AddArg(y)
  2730  		v.AddArg(v0)
  2731  		return true
  2732  	}
  2733  }
  2734  func rewriteValuePPC64_OpLeq64F_0(v *Value) bool {
  2735  	b := v.Block
  2736  	_ = b
  2737  	// match: (Leq64F x y)
  2738  	// cond:
  2739  	// result: (FLessEqual (FCMPU x y))
  2740  	for {
  2741  		_ = v.Args[1]
  2742  		x := v.Args[0]
  2743  		y := v.Args[1]
  2744  		v.reset(OpPPC64FLessEqual)
  2745  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2746  		v0.AddArg(x)
  2747  		v0.AddArg(y)
  2748  		v.AddArg(v0)
  2749  		return true
  2750  	}
  2751  }
  2752  func rewriteValuePPC64_OpLeq64U_0(v *Value) bool {
  2753  	b := v.Block
  2754  	_ = b
  2755  	// match: (Leq64U x y)
  2756  	// cond:
  2757  	// result: (LessEqual (CMPU x y))
  2758  	for {
  2759  		_ = v.Args[1]
  2760  		x := v.Args[0]
  2761  		y := v.Args[1]
  2762  		v.reset(OpPPC64LessEqual)
  2763  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2764  		v0.AddArg(x)
  2765  		v0.AddArg(y)
  2766  		v.AddArg(v0)
  2767  		return true
  2768  	}
  2769  }
  2770  func rewriteValuePPC64_OpLeq8_0(v *Value) bool {
  2771  	b := v.Block
  2772  	_ = b
  2773  	typ := &b.Func.Config.Types
  2774  	_ = typ
  2775  	// match: (Leq8 x y)
  2776  	// cond:
  2777  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2778  	for {
  2779  		_ = v.Args[1]
  2780  		x := v.Args[0]
  2781  		y := v.Args[1]
  2782  		v.reset(OpPPC64LessEqual)
  2783  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2784  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2785  		v1.AddArg(x)
  2786  		v0.AddArg(v1)
  2787  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2788  		v2.AddArg(y)
  2789  		v0.AddArg(v2)
  2790  		v.AddArg(v0)
  2791  		return true
  2792  	}
  2793  }
  2794  func rewriteValuePPC64_OpLeq8U_0(v *Value) bool {
  2795  	b := v.Block
  2796  	_ = b
  2797  	typ := &b.Func.Config.Types
  2798  	_ = typ
  2799  	// match: (Leq8U x y)
  2800  	// cond:
  2801  	// result: (LessEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2802  	for {
  2803  		_ = v.Args[1]
  2804  		x := v.Args[0]
  2805  		y := v.Args[1]
  2806  		v.reset(OpPPC64LessEqual)
  2807  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2808  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2809  		v1.AddArg(x)
  2810  		v0.AddArg(v1)
  2811  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2812  		v2.AddArg(y)
  2813  		v0.AddArg(v2)
  2814  		v.AddArg(v0)
  2815  		return true
  2816  	}
  2817  }
  2818  func rewriteValuePPC64_OpLess16_0(v *Value) bool {
  2819  	b := v.Block
  2820  	_ = b
  2821  	typ := &b.Func.Config.Types
  2822  	_ = typ
  2823  	// match: (Less16 x y)
  2824  	// cond:
  2825  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2826  	for {
  2827  		_ = v.Args[1]
  2828  		x := v.Args[0]
  2829  		y := v.Args[1]
  2830  		v.reset(OpPPC64LessThan)
  2831  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2832  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2833  		v1.AddArg(x)
  2834  		v0.AddArg(v1)
  2835  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2836  		v2.AddArg(y)
  2837  		v0.AddArg(v2)
  2838  		v.AddArg(v0)
  2839  		return true
  2840  	}
  2841  }
  2842  func rewriteValuePPC64_OpLess16U_0(v *Value) bool {
  2843  	b := v.Block
  2844  	_ = b
  2845  	typ := &b.Func.Config.Types
  2846  	_ = typ
  2847  	// match: (Less16U x y)
  2848  	// cond:
  2849  	// result: (LessThan (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2850  	for {
  2851  		_ = v.Args[1]
  2852  		x := v.Args[0]
  2853  		y := v.Args[1]
  2854  		v.reset(OpPPC64LessThan)
  2855  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2856  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2857  		v1.AddArg(x)
  2858  		v0.AddArg(v1)
  2859  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2860  		v2.AddArg(y)
  2861  		v0.AddArg(v2)
  2862  		v.AddArg(v0)
  2863  		return true
  2864  	}
  2865  }
  2866  func rewriteValuePPC64_OpLess32_0(v *Value) bool {
  2867  	b := v.Block
  2868  	_ = b
  2869  	// match: (Less32 x y)
  2870  	// cond:
  2871  	// result: (LessThan (CMPW x y))
  2872  	for {
  2873  		_ = v.Args[1]
  2874  		x := v.Args[0]
  2875  		y := v.Args[1]
  2876  		v.reset(OpPPC64LessThan)
  2877  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2878  		v0.AddArg(x)
  2879  		v0.AddArg(y)
  2880  		v.AddArg(v0)
  2881  		return true
  2882  	}
  2883  }
  2884  func rewriteValuePPC64_OpLess32F_0(v *Value) bool {
  2885  	b := v.Block
  2886  	_ = b
  2887  	// match: (Less32F x y)
  2888  	// cond:
  2889  	// result: (FLessThan (FCMPU x y))
  2890  	for {
  2891  		_ = v.Args[1]
  2892  		x := v.Args[0]
  2893  		y := v.Args[1]
  2894  		v.reset(OpPPC64FLessThan)
  2895  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2896  		v0.AddArg(x)
  2897  		v0.AddArg(y)
  2898  		v.AddArg(v0)
  2899  		return true
  2900  	}
  2901  }
  2902  func rewriteValuePPC64_OpLess32U_0(v *Value) bool {
  2903  	b := v.Block
  2904  	_ = b
  2905  	// match: (Less32U x y)
  2906  	// cond:
  2907  	// result: (LessThan (CMPWU x y))
  2908  	for {
  2909  		_ = v.Args[1]
  2910  		x := v.Args[0]
  2911  		y := v.Args[1]
  2912  		v.reset(OpPPC64LessThan)
  2913  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2914  		v0.AddArg(x)
  2915  		v0.AddArg(y)
  2916  		v.AddArg(v0)
  2917  		return true
  2918  	}
  2919  }
  2920  func rewriteValuePPC64_OpLess64_0(v *Value) bool {
  2921  	b := v.Block
  2922  	_ = b
  2923  	// match: (Less64 x y)
  2924  	// cond:
  2925  	// result: (LessThan (CMP x y))
  2926  	for {
  2927  		_ = v.Args[1]
  2928  		x := v.Args[0]
  2929  		y := v.Args[1]
  2930  		v.reset(OpPPC64LessThan)
  2931  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2932  		v0.AddArg(x)
  2933  		v0.AddArg(y)
  2934  		v.AddArg(v0)
  2935  		return true
  2936  	}
  2937  }
  2938  func rewriteValuePPC64_OpLess64F_0(v *Value) bool {
  2939  	b := v.Block
  2940  	_ = b
  2941  	// match: (Less64F x y)
  2942  	// cond:
  2943  	// result: (FLessThan (FCMPU x y))
  2944  	for {
  2945  		_ = v.Args[1]
  2946  		x := v.Args[0]
  2947  		y := v.Args[1]
  2948  		v.reset(OpPPC64FLessThan)
  2949  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2950  		v0.AddArg(x)
  2951  		v0.AddArg(y)
  2952  		v.AddArg(v0)
  2953  		return true
  2954  	}
  2955  }
  2956  func rewriteValuePPC64_OpLess64U_0(v *Value) bool {
  2957  	b := v.Block
  2958  	_ = b
  2959  	// match: (Less64U x y)
  2960  	// cond:
  2961  	// result: (LessThan (CMPU x y))
  2962  	for {
  2963  		_ = v.Args[1]
  2964  		x := v.Args[0]
  2965  		y := v.Args[1]
  2966  		v.reset(OpPPC64LessThan)
  2967  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2968  		v0.AddArg(x)
  2969  		v0.AddArg(y)
  2970  		v.AddArg(v0)
  2971  		return true
  2972  	}
  2973  }
  2974  func rewriteValuePPC64_OpLess8_0(v *Value) bool {
  2975  	b := v.Block
  2976  	_ = b
  2977  	typ := &b.Func.Config.Types
  2978  	_ = typ
  2979  	// match: (Less8 x y)
  2980  	// cond:
  2981  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2982  	for {
  2983  		_ = v.Args[1]
  2984  		x := v.Args[0]
  2985  		y := v.Args[1]
  2986  		v.reset(OpPPC64LessThan)
  2987  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2988  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2989  		v1.AddArg(x)
  2990  		v0.AddArg(v1)
  2991  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2992  		v2.AddArg(y)
  2993  		v0.AddArg(v2)
  2994  		v.AddArg(v0)
  2995  		return true
  2996  	}
  2997  }
  2998  func rewriteValuePPC64_OpLess8U_0(v *Value) bool {
  2999  	b := v.Block
  3000  	_ = b
  3001  	typ := &b.Func.Config.Types
  3002  	_ = typ
  3003  	// match: (Less8U x y)
  3004  	// cond:
  3005  	// result: (LessThan (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  3006  	for {
  3007  		_ = v.Args[1]
  3008  		x := v.Args[0]
  3009  		y := v.Args[1]
  3010  		v.reset(OpPPC64LessThan)
  3011  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  3012  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  3013  		v1.AddArg(x)
  3014  		v0.AddArg(v1)
  3015  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  3016  		v2.AddArg(y)
  3017  		v0.AddArg(v2)
  3018  		v.AddArg(v0)
  3019  		return true
  3020  	}
  3021  }
  3022  func rewriteValuePPC64_OpLoad_0(v *Value) bool {
  3023  	b := v.Block
  3024  	_ = b
  3025  	typ := &b.Func.Config.Types
  3026  	_ = typ
  3027  	// match: (Load <t> ptr mem)
  3028  	// cond: (is64BitInt(t) || isPtr(t))
  3029  	// result: (MOVDload ptr mem)
  3030  	for {
  3031  		t := v.Type
  3032  		_ = v.Args[1]
  3033  		ptr := v.Args[0]
  3034  		mem := v.Args[1]
  3035  		if !(is64BitInt(t) || isPtr(t)) {
  3036  			break
  3037  		}
  3038  		v.reset(OpPPC64MOVDload)
  3039  		v.AddArg(ptr)
  3040  		v.AddArg(mem)
  3041  		return true
  3042  	}
  3043  	// match: (Load <t> ptr mem)
  3044  	// cond: is32BitInt(t) && isSigned(t)
  3045  	// result: (MOVWload ptr mem)
  3046  	for {
  3047  		t := v.Type
  3048  		_ = v.Args[1]
  3049  		ptr := v.Args[0]
  3050  		mem := v.Args[1]
  3051  		if !(is32BitInt(t) && isSigned(t)) {
  3052  			break
  3053  		}
  3054  		v.reset(OpPPC64MOVWload)
  3055  		v.AddArg(ptr)
  3056  		v.AddArg(mem)
  3057  		return true
  3058  	}
  3059  	// match: (Load <t> ptr mem)
  3060  	// cond: is32BitInt(t) && !isSigned(t)
  3061  	// result: (MOVWZload ptr mem)
  3062  	for {
  3063  		t := v.Type
  3064  		_ = v.Args[1]
  3065  		ptr := v.Args[0]
  3066  		mem := v.Args[1]
  3067  		if !(is32BitInt(t) && !isSigned(t)) {
  3068  			break
  3069  		}
  3070  		v.reset(OpPPC64MOVWZload)
  3071  		v.AddArg(ptr)
  3072  		v.AddArg(mem)
  3073  		return true
  3074  	}
  3075  	// match: (Load <t> ptr mem)
  3076  	// cond: is16BitInt(t) && isSigned(t)
  3077  	// result: (MOVHload ptr mem)
  3078  	for {
  3079  		t := v.Type
  3080  		_ = v.Args[1]
  3081  		ptr := v.Args[0]
  3082  		mem := v.Args[1]
  3083  		if !(is16BitInt(t) && isSigned(t)) {
  3084  			break
  3085  		}
  3086  		v.reset(OpPPC64MOVHload)
  3087  		v.AddArg(ptr)
  3088  		v.AddArg(mem)
  3089  		return true
  3090  	}
  3091  	// match: (Load <t> ptr mem)
  3092  	// cond: is16BitInt(t) && !isSigned(t)
  3093  	// result: (MOVHZload ptr mem)
  3094  	for {
  3095  		t := v.Type
  3096  		_ = v.Args[1]
  3097  		ptr := v.Args[0]
  3098  		mem := v.Args[1]
  3099  		if !(is16BitInt(t) && !isSigned(t)) {
  3100  			break
  3101  		}
  3102  		v.reset(OpPPC64MOVHZload)
  3103  		v.AddArg(ptr)
  3104  		v.AddArg(mem)
  3105  		return true
  3106  	}
  3107  	// match: (Load <t> ptr mem)
  3108  	// cond: t.IsBoolean()
  3109  	// result: (MOVBZload ptr mem)
  3110  	for {
  3111  		t := v.Type
  3112  		_ = v.Args[1]
  3113  		ptr := v.Args[0]
  3114  		mem := v.Args[1]
  3115  		if !(t.IsBoolean()) {
  3116  			break
  3117  		}
  3118  		v.reset(OpPPC64MOVBZload)
  3119  		v.AddArg(ptr)
  3120  		v.AddArg(mem)
  3121  		return true
  3122  	}
  3123  	// match: (Load <t> ptr mem)
  3124  	// cond: is8BitInt(t) && isSigned(t)
  3125  	// result: (MOVBreg (MOVBZload ptr mem))
  3126  	for {
  3127  		t := v.Type
  3128  		_ = v.Args[1]
  3129  		ptr := v.Args[0]
  3130  		mem := v.Args[1]
  3131  		if !(is8BitInt(t) && isSigned(t)) {
  3132  			break
  3133  		}
  3134  		v.reset(OpPPC64MOVBreg)
  3135  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  3136  		v0.AddArg(ptr)
  3137  		v0.AddArg(mem)
  3138  		v.AddArg(v0)
  3139  		return true
  3140  	}
  3141  	// match: (Load <t> ptr mem)
  3142  	// cond: is8BitInt(t) && !isSigned(t)
  3143  	// result: (MOVBZload ptr mem)
  3144  	for {
  3145  		t := v.Type
  3146  		_ = v.Args[1]
  3147  		ptr := v.Args[0]
  3148  		mem := v.Args[1]
  3149  		if !(is8BitInt(t) && !isSigned(t)) {
  3150  			break
  3151  		}
  3152  		v.reset(OpPPC64MOVBZload)
  3153  		v.AddArg(ptr)
  3154  		v.AddArg(mem)
  3155  		return true
  3156  	}
  3157  	// match: (Load <t> ptr mem)
  3158  	// cond: is32BitFloat(t)
  3159  	// result: (FMOVSload ptr mem)
  3160  	for {
  3161  		t := v.Type
  3162  		_ = v.Args[1]
  3163  		ptr := v.Args[0]
  3164  		mem := v.Args[1]
  3165  		if !(is32BitFloat(t)) {
  3166  			break
  3167  		}
  3168  		v.reset(OpPPC64FMOVSload)
  3169  		v.AddArg(ptr)
  3170  		v.AddArg(mem)
  3171  		return true
  3172  	}
  3173  	// match: (Load <t> ptr mem)
  3174  	// cond: is64BitFloat(t)
  3175  	// result: (FMOVDload ptr mem)
  3176  	for {
  3177  		t := v.Type
  3178  		_ = v.Args[1]
  3179  		ptr := v.Args[0]
  3180  		mem := v.Args[1]
  3181  		if !(is64BitFloat(t)) {
  3182  			break
  3183  		}
  3184  		v.reset(OpPPC64FMOVDload)
  3185  		v.AddArg(ptr)
  3186  		v.AddArg(mem)
  3187  		return true
  3188  	}
  3189  	return false
  3190  }
  3191  func rewriteValuePPC64_OpLocalAddr_0(v *Value) bool {
  3192  	// match: (LocalAddr {sym} base _)
  3193  	// cond:
  3194  	// result: (MOVDaddr {sym} base)
  3195  	for {
  3196  		sym := v.Aux
  3197  		_ = v.Args[1]
  3198  		base := v.Args[0]
  3199  		v.reset(OpPPC64MOVDaddr)
  3200  		v.Aux = sym
  3201  		v.AddArg(base)
  3202  		return true
  3203  	}
  3204  }
  3205  func rewriteValuePPC64_OpLsh16x16_0(v *Value) bool {
  3206  	b := v.Block
  3207  	_ = b
  3208  	typ := &b.Func.Config.Types
  3209  	_ = typ
  3210  	// match: (Lsh16x16 x y)
  3211  	// cond: shiftIsBounded(v)
  3212  	// result: (SLW x y)
  3213  	for {
  3214  		_ = v.Args[1]
  3215  		x := v.Args[0]
  3216  		y := v.Args[1]
  3217  		if !(shiftIsBounded(v)) {
  3218  			break
  3219  		}
  3220  		v.reset(OpPPC64SLW)
  3221  		v.AddArg(x)
  3222  		v.AddArg(y)
  3223  		return true
  3224  	}
  3225  	// match: (Lsh16x16 x y)
  3226  	// cond:
  3227  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] (ZeroExt16to64 y)))))
  3228  	for {
  3229  		_ = v.Args[1]
  3230  		x := v.Args[0]
  3231  		y := v.Args[1]
  3232  		v.reset(OpPPC64SLW)
  3233  		v.AddArg(x)
  3234  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3235  		v0.AddArg(y)
  3236  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3237  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3238  		v2.AuxInt = -16
  3239  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3240  		v3.AddArg(y)
  3241  		v2.AddArg(v3)
  3242  		v1.AddArg(v2)
  3243  		v0.AddArg(v1)
  3244  		v.AddArg(v0)
  3245  		return true
  3246  	}
  3247  }
  3248  func rewriteValuePPC64_OpLsh16x32_0(v *Value) bool {
  3249  	b := v.Block
  3250  	_ = b
  3251  	typ := &b.Func.Config.Types
  3252  	_ = typ
  3253  	// match: (Lsh16x32 x (Const64 [c]))
  3254  	// cond: uint32(c) < 16
  3255  	// result: (SLWconst x [c])
  3256  	for {
  3257  		_ = v.Args[1]
  3258  		x := v.Args[0]
  3259  		v_1 := v.Args[1]
  3260  		if v_1.Op != OpConst64 {
  3261  			break
  3262  		}
  3263  		c := v_1.AuxInt
  3264  		if !(uint32(c) < 16) {
  3265  			break
  3266  		}
  3267  		v.reset(OpPPC64SLWconst)
  3268  		v.AuxInt = c
  3269  		v.AddArg(x)
  3270  		return true
  3271  	}
  3272  	// match: (Lsh16x32 x (MOVDconst [c]))
  3273  	// cond: uint32(c) < 16
  3274  	// result: (SLWconst x [c])
  3275  	for {
  3276  		_ = v.Args[1]
  3277  		x := v.Args[0]
  3278  		v_1 := v.Args[1]
  3279  		if v_1.Op != OpPPC64MOVDconst {
  3280  			break
  3281  		}
  3282  		c := v_1.AuxInt
  3283  		if !(uint32(c) < 16) {
  3284  			break
  3285  		}
  3286  		v.reset(OpPPC64SLWconst)
  3287  		v.AuxInt = c
  3288  		v.AddArg(x)
  3289  		return true
  3290  	}
  3291  	// match: (Lsh16x32 x y)
  3292  	// cond: shiftIsBounded(v)
  3293  	// result: (SLW x y)
  3294  	for {
  3295  		_ = v.Args[1]
  3296  		x := v.Args[0]
  3297  		y := v.Args[1]
  3298  		if !(shiftIsBounded(v)) {
  3299  			break
  3300  		}
  3301  		v.reset(OpPPC64SLW)
  3302  		v.AddArg(x)
  3303  		v.AddArg(y)
  3304  		return true
  3305  	}
  3306  	// match: (Lsh16x32 x y)
  3307  	// cond:
  3308  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] (ZeroExt32to64 y)))))
  3309  	for {
  3310  		_ = v.Args[1]
  3311  		x := v.Args[0]
  3312  		y := v.Args[1]
  3313  		v.reset(OpPPC64SLW)
  3314  		v.AddArg(x)
  3315  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3316  		v0.AddArg(y)
  3317  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3318  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3319  		v2.AuxInt = -16
  3320  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3321  		v3.AddArg(y)
  3322  		v2.AddArg(v3)
  3323  		v1.AddArg(v2)
  3324  		v0.AddArg(v1)
  3325  		v.AddArg(v0)
  3326  		return true
  3327  	}
  3328  }
  3329  func rewriteValuePPC64_OpLsh16x64_0(v *Value) bool {
  3330  	b := v.Block
  3331  	_ = b
  3332  	typ := &b.Func.Config.Types
  3333  	_ = typ
  3334  	// match: (Lsh16x64 x (Const64 [c]))
  3335  	// cond: uint64(c) < 16
  3336  	// result: (SLWconst x [c])
  3337  	for {
  3338  		_ = v.Args[1]
  3339  		x := v.Args[0]
  3340  		v_1 := v.Args[1]
  3341  		if v_1.Op != OpConst64 {
  3342  			break
  3343  		}
  3344  		c := v_1.AuxInt
  3345  		if !(uint64(c) < 16) {
  3346  			break
  3347  		}
  3348  		v.reset(OpPPC64SLWconst)
  3349  		v.AuxInt = c
  3350  		v.AddArg(x)
  3351  		return true
  3352  	}
  3353  	// match: (Lsh16x64 _ (Const64 [c]))
  3354  	// cond: uint64(c) >= 16
  3355  	// result: (MOVDconst [0])
  3356  	for {
  3357  		_ = v.Args[1]
  3358  		v_1 := v.Args[1]
  3359  		if v_1.Op != OpConst64 {
  3360  			break
  3361  		}
  3362  		c := v_1.AuxInt
  3363  		if !(uint64(c) >= 16) {
  3364  			break
  3365  		}
  3366  		v.reset(OpPPC64MOVDconst)
  3367  		v.AuxInt = 0
  3368  		return true
  3369  	}
  3370  	// match: (Lsh16x64 x (MOVDconst [c]))
  3371  	// cond: uint64(c) < 16
  3372  	// result: (SLWconst x [c])
  3373  	for {
  3374  		_ = v.Args[1]
  3375  		x := v.Args[0]
  3376  		v_1 := v.Args[1]
  3377  		if v_1.Op != OpPPC64MOVDconst {
  3378  			break
  3379  		}
  3380  		c := v_1.AuxInt
  3381  		if !(uint64(c) < 16) {
  3382  			break
  3383  		}
  3384  		v.reset(OpPPC64SLWconst)
  3385  		v.AuxInt = c
  3386  		v.AddArg(x)
  3387  		return true
  3388  	}
  3389  	// match: (Lsh16x64 x y)
  3390  	// cond: shiftIsBounded(v)
  3391  	// result: (SLW x y)
  3392  	for {
  3393  		_ = v.Args[1]
  3394  		x := v.Args[0]
  3395  		y := v.Args[1]
  3396  		if !(shiftIsBounded(v)) {
  3397  			break
  3398  		}
  3399  		v.reset(OpPPC64SLW)
  3400  		v.AddArg(x)
  3401  		v.AddArg(y)
  3402  		return true
  3403  	}
  3404  	// match: (Lsh16x64 x y)
  3405  	// cond:
  3406  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] y))))
  3407  	for {
  3408  		_ = v.Args[1]
  3409  		x := v.Args[0]
  3410  		y := v.Args[1]
  3411  		v.reset(OpPPC64SLW)
  3412  		v.AddArg(x)
  3413  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3414  		v0.AddArg(y)
  3415  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3416  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3417  		v2.AuxInt = -16
  3418  		v2.AddArg(y)
  3419  		v1.AddArg(v2)
  3420  		v0.AddArg(v1)
  3421  		v.AddArg(v0)
  3422  		return true
  3423  	}
  3424  }
  3425  func rewriteValuePPC64_OpLsh16x8_0(v *Value) bool {
  3426  	b := v.Block
  3427  	_ = b
  3428  	typ := &b.Func.Config.Types
  3429  	_ = typ
  3430  	// match: (Lsh16x8 x y)
  3431  	// cond: shiftIsBounded(v)
  3432  	// result: (SLW x y)
  3433  	for {
  3434  		_ = v.Args[1]
  3435  		x := v.Args[0]
  3436  		y := v.Args[1]
  3437  		if !(shiftIsBounded(v)) {
  3438  			break
  3439  		}
  3440  		v.reset(OpPPC64SLW)
  3441  		v.AddArg(x)
  3442  		v.AddArg(y)
  3443  		return true
  3444  	}
  3445  	// match: (Lsh16x8 x y)
  3446  	// cond:
  3447  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-16] (ZeroExt8to64 y)))))
  3448  	for {
  3449  		_ = v.Args[1]
  3450  		x := v.Args[0]
  3451  		y := v.Args[1]
  3452  		v.reset(OpPPC64SLW)
  3453  		v.AddArg(x)
  3454  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3455  		v0.AddArg(y)
  3456  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3457  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3458  		v2.AuxInt = -16
  3459  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3460  		v3.AddArg(y)
  3461  		v2.AddArg(v3)
  3462  		v1.AddArg(v2)
  3463  		v0.AddArg(v1)
  3464  		v.AddArg(v0)
  3465  		return true
  3466  	}
  3467  }
  3468  func rewriteValuePPC64_OpLsh32x16_0(v *Value) bool {
  3469  	b := v.Block
  3470  	_ = b
  3471  	typ := &b.Func.Config.Types
  3472  	_ = typ
  3473  	// match: (Lsh32x16 x y)
  3474  	// cond: shiftIsBounded(v)
  3475  	// result: (SLW x y)
  3476  	for {
  3477  		_ = v.Args[1]
  3478  		x := v.Args[0]
  3479  		y := v.Args[1]
  3480  		if !(shiftIsBounded(v)) {
  3481  			break
  3482  		}
  3483  		v.reset(OpPPC64SLW)
  3484  		v.AddArg(x)
  3485  		v.AddArg(y)
  3486  		return true
  3487  	}
  3488  	// match: (Lsh32x16 x y)
  3489  	// cond:
  3490  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] (ZeroExt16to64 y)))))
  3491  	for {
  3492  		_ = v.Args[1]
  3493  		x := v.Args[0]
  3494  		y := v.Args[1]
  3495  		v.reset(OpPPC64SLW)
  3496  		v.AddArg(x)
  3497  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3498  		v0.AddArg(y)
  3499  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3500  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3501  		v2.AuxInt = -32
  3502  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3503  		v3.AddArg(y)
  3504  		v2.AddArg(v3)
  3505  		v1.AddArg(v2)
  3506  		v0.AddArg(v1)
  3507  		v.AddArg(v0)
  3508  		return true
  3509  	}
  3510  }
  3511  func rewriteValuePPC64_OpLsh32x32_0(v *Value) bool {
  3512  	b := v.Block
  3513  	_ = b
  3514  	typ := &b.Func.Config.Types
  3515  	_ = typ
  3516  	// match: (Lsh32x32 x (Const64 [c]))
  3517  	// cond: uint32(c) < 32
  3518  	// result: (SLWconst x [c])
  3519  	for {
  3520  		_ = v.Args[1]
  3521  		x := v.Args[0]
  3522  		v_1 := v.Args[1]
  3523  		if v_1.Op != OpConst64 {
  3524  			break
  3525  		}
  3526  		c := v_1.AuxInt
  3527  		if !(uint32(c) < 32) {
  3528  			break
  3529  		}
  3530  		v.reset(OpPPC64SLWconst)
  3531  		v.AuxInt = c
  3532  		v.AddArg(x)
  3533  		return true
  3534  	}
  3535  	// match: (Lsh32x32 x (MOVDconst [c]))
  3536  	// cond: uint32(c) < 32
  3537  	// result: (SLWconst x [c])
  3538  	for {
  3539  		_ = v.Args[1]
  3540  		x := v.Args[0]
  3541  		v_1 := v.Args[1]
  3542  		if v_1.Op != OpPPC64MOVDconst {
  3543  			break
  3544  		}
  3545  		c := v_1.AuxInt
  3546  		if !(uint32(c) < 32) {
  3547  			break
  3548  		}
  3549  		v.reset(OpPPC64SLWconst)
  3550  		v.AuxInt = c
  3551  		v.AddArg(x)
  3552  		return true
  3553  	}
  3554  	// match: (Lsh32x32 x y)
  3555  	// cond: shiftIsBounded(v)
  3556  	// result: (SLW x y)
  3557  	for {
  3558  		_ = v.Args[1]
  3559  		x := v.Args[0]
  3560  		y := v.Args[1]
  3561  		if !(shiftIsBounded(v)) {
  3562  			break
  3563  		}
  3564  		v.reset(OpPPC64SLW)
  3565  		v.AddArg(x)
  3566  		v.AddArg(y)
  3567  		return true
  3568  	}
  3569  	// match: (Lsh32x32 x y)
  3570  	// cond:
  3571  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] (ZeroExt32to64 y)))))
  3572  	for {
  3573  		_ = v.Args[1]
  3574  		x := v.Args[0]
  3575  		y := v.Args[1]
  3576  		v.reset(OpPPC64SLW)
  3577  		v.AddArg(x)
  3578  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3579  		v0.AddArg(y)
  3580  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3581  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3582  		v2.AuxInt = -32
  3583  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3584  		v3.AddArg(y)
  3585  		v2.AddArg(v3)
  3586  		v1.AddArg(v2)
  3587  		v0.AddArg(v1)
  3588  		v.AddArg(v0)
  3589  		return true
  3590  	}
  3591  }
  3592  func rewriteValuePPC64_OpLsh32x64_0(v *Value) bool {
  3593  	b := v.Block
  3594  	_ = b
  3595  	typ := &b.Func.Config.Types
  3596  	_ = typ
  3597  	// match: (Lsh32x64 x (Const64 [c]))
  3598  	// cond: uint64(c) < 32
  3599  	// result: (SLWconst x [c])
  3600  	for {
  3601  		_ = v.Args[1]
  3602  		x := v.Args[0]
  3603  		v_1 := v.Args[1]
  3604  		if v_1.Op != OpConst64 {
  3605  			break
  3606  		}
  3607  		c := v_1.AuxInt
  3608  		if !(uint64(c) < 32) {
  3609  			break
  3610  		}
  3611  		v.reset(OpPPC64SLWconst)
  3612  		v.AuxInt = c
  3613  		v.AddArg(x)
  3614  		return true
  3615  	}
  3616  	// match: (Lsh32x64 _ (Const64 [c]))
  3617  	// cond: uint64(c) >= 32
  3618  	// result: (MOVDconst [0])
  3619  	for {
  3620  		_ = v.Args[1]
  3621  		v_1 := v.Args[1]
  3622  		if v_1.Op != OpConst64 {
  3623  			break
  3624  		}
  3625  		c := v_1.AuxInt
  3626  		if !(uint64(c) >= 32) {
  3627  			break
  3628  		}
  3629  		v.reset(OpPPC64MOVDconst)
  3630  		v.AuxInt = 0
  3631  		return true
  3632  	}
  3633  	// match: (Lsh32x64 x (MOVDconst [c]))
  3634  	// cond: uint64(c) < 32
  3635  	// result: (SLWconst x [c])
  3636  	for {
  3637  		_ = v.Args[1]
  3638  		x := v.Args[0]
  3639  		v_1 := v.Args[1]
  3640  		if v_1.Op != OpPPC64MOVDconst {
  3641  			break
  3642  		}
  3643  		c := v_1.AuxInt
  3644  		if !(uint64(c) < 32) {
  3645  			break
  3646  		}
  3647  		v.reset(OpPPC64SLWconst)
  3648  		v.AuxInt = c
  3649  		v.AddArg(x)
  3650  		return true
  3651  	}
  3652  	// match: (Lsh32x64 x y)
  3653  	// cond: shiftIsBounded(v)
  3654  	// result: (SLW x y)
  3655  	for {
  3656  		_ = v.Args[1]
  3657  		x := v.Args[0]
  3658  		y := v.Args[1]
  3659  		if !(shiftIsBounded(v)) {
  3660  			break
  3661  		}
  3662  		v.reset(OpPPC64SLW)
  3663  		v.AddArg(x)
  3664  		v.AddArg(y)
  3665  		return true
  3666  	}
  3667  	// match: (Lsh32x64 x (AND y (MOVDconst [31])))
  3668  	// cond:
  3669  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  3670  	for {
  3671  		_ = v.Args[1]
  3672  		x := v.Args[0]
  3673  		v_1 := v.Args[1]
  3674  		if v_1.Op != OpPPC64AND {
  3675  			break
  3676  		}
  3677  		_ = v_1.Args[1]
  3678  		y := v_1.Args[0]
  3679  		v_1_1 := v_1.Args[1]
  3680  		if v_1_1.Op != OpPPC64MOVDconst {
  3681  			break
  3682  		}
  3683  		if v_1_1.AuxInt != 31 {
  3684  			break
  3685  		}
  3686  		v.reset(OpPPC64SLW)
  3687  		v.AddArg(x)
  3688  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  3689  		v0.AuxInt = 31
  3690  		v0.AddArg(y)
  3691  		v.AddArg(v0)
  3692  		return true
  3693  	}
  3694  	// match: (Lsh32x64 x (AND (MOVDconst [31]) y))
  3695  	// cond:
  3696  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  3697  	for {
  3698  		_ = v.Args[1]
  3699  		x := v.Args[0]
  3700  		v_1 := v.Args[1]
  3701  		if v_1.Op != OpPPC64AND {
  3702  			break
  3703  		}
  3704  		_ = v_1.Args[1]
  3705  		v_1_0 := v_1.Args[0]
  3706  		if v_1_0.Op != OpPPC64MOVDconst {
  3707  			break
  3708  		}
  3709  		if v_1_0.AuxInt != 31 {
  3710  			break
  3711  		}
  3712  		y := v_1.Args[1]
  3713  		v.reset(OpPPC64SLW)
  3714  		v.AddArg(x)
  3715  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  3716  		v0.AuxInt = 31
  3717  		v0.AddArg(y)
  3718  		v.AddArg(v0)
  3719  		return true
  3720  	}
  3721  	// match: (Lsh32x64 x (ANDconst <typ.Int32> [31] y))
  3722  	// cond:
  3723  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  3724  	for {
  3725  		_ = v.Args[1]
  3726  		x := v.Args[0]
  3727  		v_1 := v.Args[1]
  3728  		if v_1.Op != OpPPC64ANDconst {
  3729  			break
  3730  		}
  3731  		if v_1.Type != typ.Int32 {
  3732  			break
  3733  		}
  3734  		if v_1.AuxInt != 31 {
  3735  			break
  3736  		}
  3737  		y := v_1.Args[0]
  3738  		v.reset(OpPPC64SLW)
  3739  		v.AddArg(x)
  3740  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  3741  		v0.AuxInt = 31
  3742  		v0.AddArg(y)
  3743  		v.AddArg(v0)
  3744  		return true
  3745  	}
  3746  	// match: (Lsh32x64 x y)
  3747  	// cond:
  3748  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] y))))
  3749  	for {
  3750  		_ = v.Args[1]
  3751  		x := v.Args[0]
  3752  		y := v.Args[1]
  3753  		v.reset(OpPPC64SLW)
  3754  		v.AddArg(x)
  3755  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3756  		v0.AddArg(y)
  3757  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3758  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3759  		v2.AuxInt = -32
  3760  		v2.AddArg(y)
  3761  		v1.AddArg(v2)
  3762  		v0.AddArg(v1)
  3763  		v.AddArg(v0)
  3764  		return true
  3765  	}
  3766  }
  3767  func rewriteValuePPC64_OpLsh32x8_0(v *Value) bool {
  3768  	b := v.Block
  3769  	_ = b
  3770  	typ := &b.Func.Config.Types
  3771  	_ = typ
  3772  	// match: (Lsh32x8 x y)
  3773  	// cond: shiftIsBounded(v)
  3774  	// result: (SLW x y)
  3775  	for {
  3776  		_ = v.Args[1]
  3777  		x := v.Args[0]
  3778  		y := v.Args[1]
  3779  		if !(shiftIsBounded(v)) {
  3780  			break
  3781  		}
  3782  		v.reset(OpPPC64SLW)
  3783  		v.AddArg(x)
  3784  		v.AddArg(y)
  3785  		return true
  3786  	}
  3787  	// match: (Lsh32x8 x y)
  3788  	// cond:
  3789  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-32] (ZeroExt8to64 y)))))
  3790  	for {
  3791  		_ = v.Args[1]
  3792  		x := v.Args[0]
  3793  		y := v.Args[1]
  3794  		v.reset(OpPPC64SLW)
  3795  		v.AddArg(x)
  3796  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3797  		v0.AddArg(y)
  3798  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3799  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3800  		v2.AuxInt = -32
  3801  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3802  		v3.AddArg(y)
  3803  		v2.AddArg(v3)
  3804  		v1.AddArg(v2)
  3805  		v0.AddArg(v1)
  3806  		v.AddArg(v0)
  3807  		return true
  3808  	}
  3809  }
  3810  func rewriteValuePPC64_OpLsh64x16_0(v *Value) bool {
  3811  	b := v.Block
  3812  	_ = b
  3813  	typ := &b.Func.Config.Types
  3814  	_ = typ
  3815  	// match: (Lsh64x16 x y)
  3816  	// cond: shiftIsBounded(v)
  3817  	// result: (SLD x y)
  3818  	for {
  3819  		_ = v.Args[1]
  3820  		x := v.Args[0]
  3821  		y := v.Args[1]
  3822  		if !(shiftIsBounded(v)) {
  3823  			break
  3824  		}
  3825  		v.reset(OpPPC64SLD)
  3826  		v.AddArg(x)
  3827  		v.AddArg(y)
  3828  		return true
  3829  	}
  3830  	// match: (Lsh64x16 x y)
  3831  	// cond:
  3832  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] (ZeroExt16to64 y)))))
  3833  	for {
  3834  		_ = v.Args[1]
  3835  		x := v.Args[0]
  3836  		y := v.Args[1]
  3837  		v.reset(OpPPC64SLD)
  3838  		v.AddArg(x)
  3839  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3840  		v0.AddArg(y)
  3841  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3842  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3843  		v2.AuxInt = -64
  3844  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3845  		v3.AddArg(y)
  3846  		v2.AddArg(v3)
  3847  		v1.AddArg(v2)
  3848  		v0.AddArg(v1)
  3849  		v.AddArg(v0)
  3850  		return true
  3851  	}
  3852  }
  3853  func rewriteValuePPC64_OpLsh64x32_0(v *Value) bool {
  3854  	b := v.Block
  3855  	_ = b
  3856  	typ := &b.Func.Config.Types
  3857  	_ = typ
  3858  	// match: (Lsh64x32 x (Const64 [c]))
  3859  	// cond: uint32(c) < 64
  3860  	// result: (SLDconst x [c])
  3861  	for {
  3862  		_ = v.Args[1]
  3863  		x := v.Args[0]
  3864  		v_1 := v.Args[1]
  3865  		if v_1.Op != OpConst64 {
  3866  			break
  3867  		}
  3868  		c := v_1.AuxInt
  3869  		if !(uint32(c) < 64) {
  3870  			break
  3871  		}
  3872  		v.reset(OpPPC64SLDconst)
  3873  		v.AuxInt = c
  3874  		v.AddArg(x)
  3875  		return true
  3876  	}
  3877  	// match: (Lsh64x32 x (MOVDconst [c]))
  3878  	// cond: uint32(c) < 64
  3879  	// result: (SLDconst x [c])
  3880  	for {
  3881  		_ = v.Args[1]
  3882  		x := v.Args[0]
  3883  		v_1 := v.Args[1]
  3884  		if v_1.Op != OpPPC64MOVDconst {
  3885  			break
  3886  		}
  3887  		c := v_1.AuxInt
  3888  		if !(uint32(c) < 64) {
  3889  			break
  3890  		}
  3891  		v.reset(OpPPC64SLDconst)
  3892  		v.AuxInt = c
  3893  		v.AddArg(x)
  3894  		return true
  3895  	}
  3896  	// match: (Lsh64x32 x y)
  3897  	// cond: shiftIsBounded(v)
  3898  	// result: (SLD x y)
  3899  	for {
  3900  		_ = v.Args[1]
  3901  		x := v.Args[0]
  3902  		y := v.Args[1]
  3903  		if !(shiftIsBounded(v)) {
  3904  			break
  3905  		}
  3906  		v.reset(OpPPC64SLD)
  3907  		v.AddArg(x)
  3908  		v.AddArg(y)
  3909  		return true
  3910  	}
  3911  	// match: (Lsh64x32 x y)
  3912  	// cond:
  3913  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] (ZeroExt32to64 y)))))
  3914  	for {
  3915  		_ = v.Args[1]
  3916  		x := v.Args[0]
  3917  		y := v.Args[1]
  3918  		v.reset(OpPPC64SLD)
  3919  		v.AddArg(x)
  3920  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  3921  		v0.AddArg(y)
  3922  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  3923  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  3924  		v2.AuxInt = -64
  3925  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  3926  		v3.AddArg(y)
  3927  		v2.AddArg(v3)
  3928  		v1.AddArg(v2)
  3929  		v0.AddArg(v1)
  3930  		v.AddArg(v0)
  3931  		return true
  3932  	}
  3933  }
  3934  func rewriteValuePPC64_OpLsh64x64_0(v *Value) bool {
  3935  	b := v.Block
  3936  	_ = b
  3937  	typ := &b.Func.Config.Types
  3938  	_ = typ
  3939  	// match: (Lsh64x64 x (Const64 [c]))
  3940  	// cond: uint64(c) < 64
  3941  	// result: (SLDconst x [c])
  3942  	for {
  3943  		_ = v.Args[1]
  3944  		x := v.Args[0]
  3945  		v_1 := v.Args[1]
  3946  		if v_1.Op != OpConst64 {
  3947  			break
  3948  		}
  3949  		c := v_1.AuxInt
  3950  		if !(uint64(c) < 64) {
  3951  			break
  3952  		}
  3953  		v.reset(OpPPC64SLDconst)
  3954  		v.AuxInt = c
  3955  		v.AddArg(x)
  3956  		return true
  3957  	}
  3958  	// match: (Lsh64x64 _ (Const64 [c]))
  3959  	// cond: uint64(c) >= 64
  3960  	// result: (MOVDconst [0])
  3961  	for {
  3962  		_ = v.Args[1]
  3963  		v_1 := v.Args[1]
  3964  		if v_1.Op != OpConst64 {
  3965  			break
  3966  		}
  3967  		c := v_1.AuxInt
  3968  		if !(uint64(c) >= 64) {
  3969  			break
  3970  		}
  3971  		v.reset(OpPPC64MOVDconst)
  3972  		v.AuxInt = 0
  3973  		return true
  3974  	}
  3975  	// match: (Lsh64x64 x (MOVDconst [c]))
  3976  	// cond: uint64(c) < 64
  3977  	// result: (SLDconst x [c])
  3978  	for {
  3979  		_ = v.Args[1]
  3980  		x := v.Args[0]
  3981  		v_1 := v.Args[1]
  3982  		if v_1.Op != OpPPC64MOVDconst {
  3983  			break
  3984  		}
  3985  		c := v_1.AuxInt
  3986  		if !(uint64(c) < 64) {
  3987  			break
  3988  		}
  3989  		v.reset(OpPPC64SLDconst)
  3990  		v.AuxInt = c
  3991  		v.AddArg(x)
  3992  		return true
  3993  	}
  3994  	// match: (Lsh64x64 x y)
  3995  	// cond: shiftIsBounded(v)
  3996  	// result: (SLD x y)
  3997  	for {
  3998  		_ = v.Args[1]
  3999  		x := v.Args[0]
  4000  		y := v.Args[1]
  4001  		if !(shiftIsBounded(v)) {
  4002  			break
  4003  		}
  4004  		v.reset(OpPPC64SLD)
  4005  		v.AddArg(x)
  4006  		v.AddArg(y)
  4007  		return true
  4008  	}
  4009  	// match: (Lsh64x64 x (AND y (MOVDconst [63])))
  4010  	// cond:
  4011  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  4012  	for {
  4013  		_ = v.Args[1]
  4014  		x := v.Args[0]
  4015  		v_1 := v.Args[1]
  4016  		if v_1.Op != OpPPC64AND {
  4017  			break
  4018  		}
  4019  		_ = v_1.Args[1]
  4020  		y := v_1.Args[0]
  4021  		v_1_1 := v_1.Args[1]
  4022  		if v_1_1.Op != OpPPC64MOVDconst {
  4023  			break
  4024  		}
  4025  		if v_1_1.AuxInt != 63 {
  4026  			break
  4027  		}
  4028  		v.reset(OpPPC64SLD)
  4029  		v.AddArg(x)
  4030  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  4031  		v0.AuxInt = 63
  4032  		v0.AddArg(y)
  4033  		v.AddArg(v0)
  4034  		return true
  4035  	}
  4036  	// match: (Lsh64x64 x (AND (MOVDconst [63]) y))
  4037  	// cond:
  4038  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  4039  	for {
  4040  		_ = v.Args[1]
  4041  		x := v.Args[0]
  4042  		v_1 := v.Args[1]
  4043  		if v_1.Op != OpPPC64AND {
  4044  			break
  4045  		}
  4046  		_ = v_1.Args[1]
  4047  		v_1_0 := v_1.Args[0]
  4048  		if v_1_0.Op != OpPPC64MOVDconst {
  4049  			break
  4050  		}
  4051  		if v_1_0.AuxInt != 63 {
  4052  			break
  4053  		}
  4054  		y := v_1.Args[1]
  4055  		v.reset(OpPPC64SLD)
  4056  		v.AddArg(x)
  4057  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  4058  		v0.AuxInt = 63
  4059  		v0.AddArg(y)
  4060  		v.AddArg(v0)
  4061  		return true
  4062  	}
  4063  	// match: (Lsh64x64 x (ANDconst <typ.Int64> [63] y))
  4064  	// cond:
  4065  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  4066  	for {
  4067  		_ = v.Args[1]
  4068  		x := v.Args[0]
  4069  		v_1 := v.Args[1]
  4070  		if v_1.Op != OpPPC64ANDconst {
  4071  			break
  4072  		}
  4073  		if v_1.Type != typ.Int64 {
  4074  			break
  4075  		}
  4076  		if v_1.AuxInt != 63 {
  4077  			break
  4078  		}
  4079  		y := v_1.Args[0]
  4080  		v.reset(OpPPC64SLD)
  4081  		v.AddArg(x)
  4082  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  4083  		v0.AuxInt = 63
  4084  		v0.AddArg(y)
  4085  		v.AddArg(v0)
  4086  		return true
  4087  	}
  4088  	// match: (Lsh64x64 x y)
  4089  	// cond:
  4090  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] y))))
  4091  	for {
  4092  		_ = v.Args[1]
  4093  		x := v.Args[0]
  4094  		y := v.Args[1]
  4095  		v.reset(OpPPC64SLD)
  4096  		v.AddArg(x)
  4097  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4098  		v0.AddArg(y)
  4099  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4100  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4101  		v2.AuxInt = -64
  4102  		v2.AddArg(y)
  4103  		v1.AddArg(v2)
  4104  		v0.AddArg(v1)
  4105  		v.AddArg(v0)
  4106  		return true
  4107  	}
  4108  }
  4109  func rewriteValuePPC64_OpLsh64x8_0(v *Value) bool {
  4110  	b := v.Block
  4111  	_ = b
  4112  	typ := &b.Func.Config.Types
  4113  	_ = typ
  4114  	// match: (Lsh64x8 x y)
  4115  	// cond: shiftIsBounded(v)
  4116  	// result: (SLD x y)
  4117  	for {
  4118  		_ = v.Args[1]
  4119  		x := v.Args[0]
  4120  		y := v.Args[1]
  4121  		if !(shiftIsBounded(v)) {
  4122  			break
  4123  		}
  4124  		v.reset(OpPPC64SLD)
  4125  		v.AddArg(x)
  4126  		v.AddArg(y)
  4127  		return true
  4128  	}
  4129  	// match: (Lsh64x8 x y)
  4130  	// cond:
  4131  	// result: (SLD x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-64] (ZeroExt8to64 y)))))
  4132  	for {
  4133  		_ = v.Args[1]
  4134  		x := v.Args[0]
  4135  		y := v.Args[1]
  4136  		v.reset(OpPPC64SLD)
  4137  		v.AddArg(x)
  4138  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4139  		v0.AddArg(y)
  4140  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4141  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4142  		v2.AuxInt = -64
  4143  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4144  		v3.AddArg(y)
  4145  		v2.AddArg(v3)
  4146  		v1.AddArg(v2)
  4147  		v0.AddArg(v1)
  4148  		v.AddArg(v0)
  4149  		return true
  4150  	}
  4151  }
  4152  func rewriteValuePPC64_OpLsh8x16_0(v *Value) bool {
  4153  	b := v.Block
  4154  	_ = b
  4155  	typ := &b.Func.Config.Types
  4156  	_ = typ
  4157  	// match: (Lsh8x16 x y)
  4158  	// cond: shiftIsBounded(v)
  4159  	// result: (SLW x y)
  4160  	for {
  4161  		_ = v.Args[1]
  4162  		x := v.Args[0]
  4163  		y := v.Args[1]
  4164  		if !(shiftIsBounded(v)) {
  4165  			break
  4166  		}
  4167  		v.reset(OpPPC64SLW)
  4168  		v.AddArg(x)
  4169  		v.AddArg(y)
  4170  		return true
  4171  	}
  4172  	// match: (Lsh8x16 x y)
  4173  	// cond:
  4174  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] (ZeroExt16to64 y)))))
  4175  	for {
  4176  		_ = v.Args[1]
  4177  		x := v.Args[0]
  4178  		y := v.Args[1]
  4179  		v.reset(OpPPC64SLW)
  4180  		v.AddArg(x)
  4181  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4182  		v0.AddArg(y)
  4183  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4184  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4185  		v2.AuxInt = -8
  4186  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  4187  		v3.AddArg(y)
  4188  		v2.AddArg(v3)
  4189  		v1.AddArg(v2)
  4190  		v0.AddArg(v1)
  4191  		v.AddArg(v0)
  4192  		return true
  4193  	}
  4194  }
  4195  func rewriteValuePPC64_OpLsh8x32_0(v *Value) bool {
  4196  	b := v.Block
  4197  	_ = b
  4198  	typ := &b.Func.Config.Types
  4199  	_ = typ
  4200  	// match: (Lsh8x32 x (Const64 [c]))
  4201  	// cond: uint32(c) < 8
  4202  	// result: (SLWconst x [c])
  4203  	for {
  4204  		_ = v.Args[1]
  4205  		x := v.Args[0]
  4206  		v_1 := v.Args[1]
  4207  		if v_1.Op != OpConst64 {
  4208  			break
  4209  		}
  4210  		c := v_1.AuxInt
  4211  		if !(uint32(c) < 8) {
  4212  			break
  4213  		}
  4214  		v.reset(OpPPC64SLWconst)
  4215  		v.AuxInt = c
  4216  		v.AddArg(x)
  4217  		return true
  4218  	}
  4219  	// match: (Lsh8x32 x (MOVDconst [c]))
  4220  	// cond: uint32(c) < 8
  4221  	// result: (SLWconst x [c])
  4222  	for {
  4223  		_ = v.Args[1]
  4224  		x := v.Args[0]
  4225  		v_1 := v.Args[1]
  4226  		if v_1.Op != OpPPC64MOVDconst {
  4227  			break
  4228  		}
  4229  		c := v_1.AuxInt
  4230  		if !(uint32(c) < 8) {
  4231  			break
  4232  		}
  4233  		v.reset(OpPPC64SLWconst)
  4234  		v.AuxInt = c
  4235  		v.AddArg(x)
  4236  		return true
  4237  	}
  4238  	// match: (Lsh8x32 x y)
  4239  	// cond: shiftIsBounded(v)
  4240  	// result: (SLW x y)
  4241  	for {
  4242  		_ = v.Args[1]
  4243  		x := v.Args[0]
  4244  		y := v.Args[1]
  4245  		if !(shiftIsBounded(v)) {
  4246  			break
  4247  		}
  4248  		v.reset(OpPPC64SLW)
  4249  		v.AddArg(x)
  4250  		v.AddArg(y)
  4251  		return true
  4252  	}
  4253  	// match: (Lsh8x32 x y)
  4254  	// cond:
  4255  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] (ZeroExt32to64 y)))))
  4256  	for {
  4257  		_ = v.Args[1]
  4258  		x := v.Args[0]
  4259  		y := v.Args[1]
  4260  		v.reset(OpPPC64SLW)
  4261  		v.AddArg(x)
  4262  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4263  		v0.AddArg(y)
  4264  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4265  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4266  		v2.AuxInt = -8
  4267  		v3 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  4268  		v3.AddArg(y)
  4269  		v2.AddArg(v3)
  4270  		v1.AddArg(v2)
  4271  		v0.AddArg(v1)
  4272  		v.AddArg(v0)
  4273  		return true
  4274  	}
  4275  }
  4276  func rewriteValuePPC64_OpLsh8x64_0(v *Value) bool {
  4277  	b := v.Block
  4278  	_ = b
  4279  	typ := &b.Func.Config.Types
  4280  	_ = typ
  4281  	// match: (Lsh8x64 x (Const64 [c]))
  4282  	// cond: uint64(c) < 8
  4283  	// result: (SLWconst x [c])
  4284  	for {
  4285  		_ = v.Args[1]
  4286  		x := v.Args[0]
  4287  		v_1 := v.Args[1]
  4288  		if v_1.Op != OpConst64 {
  4289  			break
  4290  		}
  4291  		c := v_1.AuxInt
  4292  		if !(uint64(c) < 8) {
  4293  			break
  4294  		}
  4295  		v.reset(OpPPC64SLWconst)
  4296  		v.AuxInt = c
  4297  		v.AddArg(x)
  4298  		return true
  4299  	}
  4300  	// match: (Lsh8x64 _ (Const64 [c]))
  4301  	// cond: uint64(c) >= 8
  4302  	// result: (MOVDconst [0])
  4303  	for {
  4304  		_ = v.Args[1]
  4305  		v_1 := v.Args[1]
  4306  		if v_1.Op != OpConst64 {
  4307  			break
  4308  		}
  4309  		c := v_1.AuxInt
  4310  		if !(uint64(c) >= 8) {
  4311  			break
  4312  		}
  4313  		v.reset(OpPPC64MOVDconst)
  4314  		v.AuxInt = 0
  4315  		return true
  4316  	}
  4317  	// match: (Lsh8x64 x (MOVDconst [c]))
  4318  	// cond: uint64(c) < 8
  4319  	// result: (SLWconst x [c])
  4320  	for {
  4321  		_ = v.Args[1]
  4322  		x := v.Args[0]
  4323  		v_1 := v.Args[1]
  4324  		if v_1.Op != OpPPC64MOVDconst {
  4325  			break
  4326  		}
  4327  		c := v_1.AuxInt
  4328  		if !(uint64(c) < 8) {
  4329  			break
  4330  		}
  4331  		v.reset(OpPPC64SLWconst)
  4332  		v.AuxInt = c
  4333  		v.AddArg(x)
  4334  		return true
  4335  	}
  4336  	// match: (Lsh8x64 x y)
  4337  	// cond: shiftIsBounded(v)
  4338  	// result: (SLW x y)
  4339  	for {
  4340  		_ = v.Args[1]
  4341  		x := v.Args[0]
  4342  		y := v.Args[1]
  4343  		if !(shiftIsBounded(v)) {
  4344  			break
  4345  		}
  4346  		v.reset(OpPPC64SLW)
  4347  		v.AddArg(x)
  4348  		v.AddArg(y)
  4349  		return true
  4350  	}
  4351  	// match: (Lsh8x64 x y)
  4352  	// cond:
  4353  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] y))))
  4354  	for {
  4355  		_ = v.Args[1]
  4356  		x := v.Args[0]
  4357  		y := v.Args[1]
  4358  		v.reset(OpPPC64SLW)
  4359  		v.AddArg(x)
  4360  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4361  		v0.AddArg(y)
  4362  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4363  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4364  		v2.AuxInt = -8
  4365  		v2.AddArg(y)
  4366  		v1.AddArg(v2)
  4367  		v0.AddArg(v1)
  4368  		v.AddArg(v0)
  4369  		return true
  4370  	}
  4371  }
  4372  func rewriteValuePPC64_OpLsh8x8_0(v *Value) bool {
  4373  	b := v.Block
  4374  	_ = b
  4375  	typ := &b.Func.Config.Types
  4376  	_ = typ
  4377  	// match: (Lsh8x8 x y)
  4378  	// cond: shiftIsBounded(v)
  4379  	// result: (SLW x y)
  4380  	for {
  4381  		_ = v.Args[1]
  4382  		x := v.Args[0]
  4383  		y := v.Args[1]
  4384  		if !(shiftIsBounded(v)) {
  4385  			break
  4386  		}
  4387  		v.reset(OpPPC64SLW)
  4388  		v.AddArg(x)
  4389  		v.AddArg(y)
  4390  		return true
  4391  	}
  4392  	// match: (Lsh8x8 x y)
  4393  	// cond:
  4394  	// result: (SLW x (ORN y <typ.Int64> (MaskIfNotCarry (ADDconstForCarry [-8] (ZeroExt8to64 y)))))
  4395  	for {
  4396  		_ = v.Args[1]
  4397  		x := v.Args[0]
  4398  		y := v.Args[1]
  4399  		v.reset(OpPPC64SLW)
  4400  		v.AddArg(x)
  4401  		v0 := b.NewValue0(v.Pos, OpPPC64ORN, typ.Int64)
  4402  		v0.AddArg(y)
  4403  		v1 := b.NewValue0(v.Pos, OpPPC64MaskIfNotCarry, typ.Int64)
  4404  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconstForCarry, types.TypeFlags)
  4405  		v2.AuxInt = -8
  4406  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  4407  		v3.AddArg(y)
  4408  		v2.AddArg(v3)
  4409  		v1.AddArg(v2)
  4410  		v0.AddArg(v1)
  4411  		v.AddArg(v0)
  4412  		return true
  4413  	}
  4414  }
  4415  func rewriteValuePPC64_OpMod16_0(v *Value) bool {
  4416  	b := v.Block
  4417  	_ = b
  4418  	typ := &b.Func.Config.Types
  4419  	_ = typ
  4420  	// match: (Mod16 x y)
  4421  	// cond:
  4422  	// result: (Mod32 (SignExt16to32 x) (SignExt16to32 y))
  4423  	for {
  4424  		_ = v.Args[1]
  4425  		x := v.Args[0]
  4426  		y := v.Args[1]
  4427  		v.reset(OpMod32)
  4428  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4429  		v0.AddArg(x)
  4430  		v.AddArg(v0)
  4431  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  4432  		v1.AddArg(y)
  4433  		v.AddArg(v1)
  4434  		return true
  4435  	}
  4436  }
  4437  func rewriteValuePPC64_OpMod16u_0(v *Value) bool {
  4438  	b := v.Block
  4439  	_ = b
  4440  	typ := &b.Func.Config.Types
  4441  	_ = typ
  4442  	// match: (Mod16u x y)
  4443  	// cond:
  4444  	// result: (Mod32u (ZeroExt16to32 x) (ZeroExt16to32 y))
  4445  	for {
  4446  		_ = v.Args[1]
  4447  		x := v.Args[0]
  4448  		y := v.Args[1]
  4449  		v.reset(OpMod32u)
  4450  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4451  		v0.AddArg(x)
  4452  		v.AddArg(v0)
  4453  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  4454  		v1.AddArg(y)
  4455  		v.AddArg(v1)
  4456  		return true
  4457  	}
  4458  }
  4459  func rewriteValuePPC64_OpMod32_0(v *Value) bool {
  4460  	b := v.Block
  4461  	_ = b
  4462  	typ := &b.Func.Config.Types
  4463  	_ = typ
  4464  	// match: (Mod32 x y)
  4465  	// cond:
  4466  	// result: (SUB x (MULLW y (DIVW x y)))
  4467  	for {
  4468  		_ = v.Args[1]
  4469  		x := v.Args[0]
  4470  		y := v.Args[1]
  4471  		v.reset(OpPPC64SUB)
  4472  		v.AddArg(x)
  4473  		v0 := b.NewValue0(v.Pos, OpPPC64MULLW, typ.Int32)
  4474  		v0.AddArg(y)
  4475  		v1 := b.NewValue0(v.Pos, OpPPC64DIVW, typ.Int32)
  4476  		v1.AddArg(x)
  4477  		v1.AddArg(y)
  4478  		v0.AddArg(v1)
  4479  		v.AddArg(v0)
  4480  		return true
  4481  	}
  4482  }
  4483  func rewriteValuePPC64_OpMod32u_0(v *Value) bool {
  4484  	b := v.Block
  4485  	_ = b
  4486  	typ := &b.Func.Config.Types
  4487  	_ = typ
  4488  	// match: (Mod32u x y)
  4489  	// cond:
  4490  	// result: (SUB x (MULLW y (DIVWU x y)))
  4491  	for {
  4492  		_ = v.Args[1]
  4493  		x := v.Args[0]
  4494  		y := v.Args[1]
  4495  		v.reset(OpPPC64SUB)
  4496  		v.AddArg(x)
  4497  		v0 := b.NewValue0(v.Pos, OpPPC64MULLW, typ.Int32)
  4498  		v0.AddArg(y)
  4499  		v1 := b.NewValue0(v.Pos, OpPPC64DIVWU, typ.Int32)
  4500  		v1.AddArg(x)
  4501  		v1.AddArg(y)
  4502  		v0.AddArg(v1)
  4503  		v.AddArg(v0)
  4504  		return true
  4505  	}
  4506  }
  4507  func rewriteValuePPC64_OpMod64_0(v *Value) bool {
  4508  	b := v.Block
  4509  	_ = b
  4510  	typ := &b.Func.Config.Types
  4511  	_ = typ
  4512  	// match: (Mod64 x y)
  4513  	// cond:
  4514  	// result: (SUB x (MULLD y (DIVD x y)))
  4515  	for {
  4516  		_ = v.Args[1]
  4517  		x := v.Args[0]
  4518  		y := v.Args[1]
  4519  		v.reset(OpPPC64SUB)
  4520  		v.AddArg(x)
  4521  		v0 := b.NewValue0(v.Pos, OpPPC64MULLD, typ.Int64)
  4522  		v0.AddArg(y)
  4523  		v1 := b.NewValue0(v.Pos, OpPPC64DIVD, typ.Int64)
  4524  		v1.AddArg(x)
  4525  		v1.AddArg(y)
  4526  		v0.AddArg(v1)
  4527  		v.AddArg(v0)
  4528  		return true
  4529  	}
  4530  }
  4531  func rewriteValuePPC64_OpMod64u_0(v *Value) bool {
  4532  	b := v.Block
  4533  	_ = b
  4534  	typ := &b.Func.Config.Types
  4535  	_ = typ
  4536  	// match: (Mod64u x y)
  4537  	// cond:
  4538  	// result: (SUB x (MULLD y (DIVDU x y)))
  4539  	for {
  4540  		_ = v.Args[1]
  4541  		x := v.Args[0]
  4542  		y := v.Args[1]
  4543  		v.reset(OpPPC64SUB)
  4544  		v.AddArg(x)
  4545  		v0 := b.NewValue0(v.Pos, OpPPC64MULLD, typ.Int64)
  4546  		v0.AddArg(y)
  4547  		v1 := b.NewValue0(v.Pos, OpPPC64DIVDU, typ.Int64)
  4548  		v1.AddArg(x)
  4549  		v1.AddArg(y)
  4550  		v0.AddArg(v1)
  4551  		v.AddArg(v0)
  4552  		return true
  4553  	}
  4554  }
  4555  func rewriteValuePPC64_OpMod8_0(v *Value) bool {
  4556  	b := v.Block
  4557  	_ = b
  4558  	typ := &b.Func.Config.Types
  4559  	_ = typ
  4560  	// match: (Mod8 x y)
  4561  	// cond:
  4562  	// result: (Mod32 (SignExt8to32 x) (SignExt8to32 y))
  4563  	for {
  4564  		_ = v.Args[1]
  4565  		x := v.Args[0]
  4566  		y := v.Args[1]
  4567  		v.reset(OpMod32)
  4568  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  4569  		v0.AddArg(x)
  4570  		v.AddArg(v0)
  4571  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  4572  		v1.AddArg(y)
  4573  		v.AddArg(v1)
  4574  		return true
  4575  	}
  4576  }
  4577  func rewriteValuePPC64_OpMod8u_0(v *Value) bool {
  4578  	b := v.Block
  4579  	_ = b
  4580  	typ := &b.Func.Config.Types
  4581  	_ = typ
  4582  	// match: (Mod8u x y)
  4583  	// cond:
  4584  	// result: (Mod32u (ZeroExt8to32 x) (ZeroExt8to32 y))
  4585  	for {
  4586  		_ = v.Args[1]
  4587  		x := v.Args[0]
  4588  		y := v.Args[1]
  4589  		v.reset(OpMod32u)
  4590  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  4591  		v0.AddArg(x)
  4592  		v.AddArg(v0)
  4593  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  4594  		v1.AddArg(y)
  4595  		v.AddArg(v1)
  4596  		return true
  4597  	}
  4598  }
  4599  func rewriteValuePPC64_OpMove_0(v *Value) bool {
  4600  	b := v.Block
  4601  	_ = b
  4602  	typ := &b.Func.Config.Types
  4603  	_ = typ
  4604  	// match: (Move [0] _ _ mem)
  4605  	// cond:
  4606  	// result: mem
  4607  	for {
  4608  		if v.AuxInt != 0 {
  4609  			break
  4610  		}
  4611  		_ = v.Args[2]
  4612  		mem := v.Args[2]
  4613  		v.reset(OpCopy)
  4614  		v.Type = mem.Type
  4615  		v.AddArg(mem)
  4616  		return true
  4617  	}
  4618  	// match: (Move [1] dst src mem)
  4619  	// cond:
  4620  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  4621  	for {
  4622  		if v.AuxInt != 1 {
  4623  			break
  4624  		}
  4625  		_ = v.Args[2]
  4626  		dst := v.Args[0]
  4627  		src := v.Args[1]
  4628  		mem := v.Args[2]
  4629  		v.reset(OpPPC64MOVBstore)
  4630  		v.AddArg(dst)
  4631  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4632  		v0.AddArg(src)
  4633  		v0.AddArg(mem)
  4634  		v.AddArg(v0)
  4635  		v.AddArg(mem)
  4636  		return true
  4637  	}
  4638  	// match: (Move [2] dst src mem)
  4639  	// cond:
  4640  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  4641  	for {
  4642  		if v.AuxInt != 2 {
  4643  			break
  4644  		}
  4645  		_ = v.Args[2]
  4646  		dst := v.Args[0]
  4647  		src := v.Args[1]
  4648  		mem := v.Args[2]
  4649  		v.reset(OpPPC64MOVHstore)
  4650  		v.AddArg(dst)
  4651  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  4652  		v0.AddArg(src)
  4653  		v0.AddArg(mem)
  4654  		v.AddArg(v0)
  4655  		v.AddArg(mem)
  4656  		return true
  4657  	}
  4658  	// match: (Move [4] dst src mem)
  4659  	// cond:
  4660  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  4661  	for {
  4662  		if v.AuxInt != 4 {
  4663  			break
  4664  		}
  4665  		_ = v.Args[2]
  4666  		dst := v.Args[0]
  4667  		src := v.Args[1]
  4668  		mem := v.Args[2]
  4669  		v.reset(OpPPC64MOVWstore)
  4670  		v.AddArg(dst)
  4671  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4672  		v0.AddArg(src)
  4673  		v0.AddArg(mem)
  4674  		v.AddArg(v0)
  4675  		v.AddArg(mem)
  4676  		return true
  4677  	}
  4678  	// match: (Move [8] {t} dst src mem)
  4679  	// cond: t.(*types.Type).Alignment()%4 == 0
  4680  	// result: (MOVDstore dst (MOVDload src mem) mem)
  4681  	for {
  4682  		if v.AuxInt != 8 {
  4683  			break
  4684  		}
  4685  		t := v.Aux
  4686  		_ = v.Args[2]
  4687  		dst := v.Args[0]
  4688  		src := v.Args[1]
  4689  		mem := v.Args[2]
  4690  		if !(t.(*types.Type).Alignment()%4 == 0) {
  4691  			break
  4692  		}
  4693  		v.reset(OpPPC64MOVDstore)
  4694  		v.AddArg(dst)
  4695  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDload, typ.Int64)
  4696  		v0.AddArg(src)
  4697  		v0.AddArg(mem)
  4698  		v.AddArg(v0)
  4699  		v.AddArg(mem)
  4700  		return true
  4701  	}
  4702  	// match: (Move [8] dst src mem)
  4703  	// cond:
  4704  	// result: (MOVWstore [4] dst (MOVWZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  4705  	for {
  4706  		if v.AuxInt != 8 {
  4707  			break
  4708  		}
  4709  		_ = v.Args[2]
  4710  		dst := v.Args[0]
  4711  		src := v.Args[1]
  4712  		mem := v.Args[2]
  4713  		v.reset(OpPPC64MOVWstore)
  4714  		v.AuxInt = 4
  4715  		v.AddArg(dst)
  4716  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4717  		v0.AuxInt = 4
  4718  		v0.AddArg(src)
  4719  		v0.AddArg(mem)
  4720  		v.AddArg(v0)
  4721  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4722  		v1.AddArg(dst)
  4723  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4724  		v2.AddArg(src)
  4725  		v2.AddArg(mem)
  4726  		v1.AddArg(v2)
  4727  		v1.AddArg(mem)
  4728  		v.AddArg(v1)
  4729  		return true
  4730  	}
  4731  	// match: (Move [3] dst src mem)
  4732  	// cond:
  4733  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHload src mem) mem))
  4734  	for {
  4735  		if v.AuxInt != 3 {
  4736  			break
  4737  		}
  4738  		_ = v.Args[2]
  4739  		dst := v.Args[0]
  4740  		src := v.Args[1]
  4741  		mem := v.Args[2]
  4742  		v.reset(OpPPC64MOVBstore)
  4743  		v.AuxInt = 2
  4744  		v.AddArg(dst)
  4745  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4746  		v0.AuxInt = 2
  4747  		v0.AddArg(src)
  4748  		v0.AddArg(mem)
  4749  		v.AddArg(v0)
  4750  		v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, types.TypeMem)
  4751  		v1.AddArg(dst)
  4752  		v2 := b.NewValue0(v.Pos, OpPPC64MOVHload, typ.Int16)
  4753  		v2.AddArg(src)
  4754  		v2.AddArg(mem)
  4755  		v1.AddArg(v2)
  4756  		v1.AddArg(mem)
  4757  		v.AddArg(v1)
  4758  		return true
  4759  	}
  4760  	// match: (Move [5] dst src mem)
  4761  	// cond:
  4762  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  4763  	for {
  4764  		if v.AuxInt != 5 {
  4765  			break
  4766  		}
  4767  		_ = v.Args[2]
  4768  		dst := v.Args[0]
  4769  		src := v.Args[1]
  4770  		mem := v.Args[2]
  4771  		v.reset(OpPPC64MOVBstore)
  4772  		v.AuxInt = 4
  4773  		v.AddArg(dst)
  4774  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4775  		v0.AuxInt = 4
  4776  		v0.AddArg(src)
  4777  		v0.AddArg(mem)
  4778  		v.AddArg(v0)
  4779  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4780  		v1.AddArg(dst)
  4781  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4782  		v2.AddArg(src)
  4783  		v2.AddArg(mem)
  4784  		v1.AddArg(v2)
  4785  		v1.AddArg(mem)
  4786  		v.AddArg(v1)
  4787  		return true
  4788  	}
  4789  	// match: (Move [6] dst src mem)
  4790  	// cond:
  4791  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  4792  	for {
  4793  		if v.AuxInt != 6 {
  4794  			break
  4795  		}
  4796  		_ = v.Args[2]
  4797  		dst := v.Args[0]
  4798  		src := v.Args[1]
  4799  		mem := v.Args[2]
  4800  		v.reset(OpPPC64MOVHstore)
  4801  		v.AuxInt = 4
  4802  		v.AddArg(dst)
  4803  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  4804  		v0.AuxInt = 4
  4805  		v0.AddArg(src)
  4806  		v0.AddArg(mem)
  4807  		v.AddArg(v0)
  4808  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4809  		v1.AddArg(dst)
  4810  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4811  		v2.AddArg(src)
  4812  		v2.AddArg(mem)
  4813  		v1.AddArg(v2)
  4814  		v1.AddArg(mem)
  4815  		v.AddArg(v1)
  4816  		return true
  4817  	}
  4818  	// match: (Move [7] dst src mem)
  4819  	// cond:
  4820  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  4821  	for {
  4822  		if v.AuxInt != 7 {
  4823  			break
  4824  		}
  4825  		_ = v.Args[2]
  4826  		dst := v.Args[0]
  4827  		src := v.Args[1]
  4828  		mem := v.Args[2]
  4829  		v.reset(OpPPC64MOVBstore)
  4830  		v.AuxInt = 6
  4831  		v.AddArg(dst)
  4832  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  4833  		v0.AuxInt = 6
  4834  		v0.AddArg(src)
  4835  		v0.AddArg(mem)
  4836  		v.AddArg(v0)
  4837  		v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, types.TypeMem)
  4838  		v1.AuxInt = 4
  4839  		v1.AddArg(dst)
  4840  		v2 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  4841  		v2.AuxInt = 4
  4842  		v2.AddArg(src)
  4843  		v2.AddArg(mem)
  4844  		v1.AddArg(v2)
  4845  		v3 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  4846  		v3.AddArg(dst)
  4847  		v4 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  4848  		v4.AddArg(src)
  4849  		v4.AddArg(mem)
  4850  		v3.AddArg(v4)
  4851  		v3.AddArg(mem)
  4852  		v1.AddArg(v3)
  4853  		v.AddArg(v1)
  4854  		return true
  4855  	}
  4856  	return false
  4857  }
  4858  func rewriteValuePPC64_OpMove_10(v *Value) bool {
  4859  	// match: (Move [s] dst src mem)
  4860  	// cond: s > 8
  4861  	// result: (LoweredMove [s] dst src mem)
  4862  	for {
  4863  		s := v.AuxInt
  4864  		_ = v.Args[2]
  4865  		dst := v.Args[0]
  4866  		src := v.Args[1]
  4867  		mem := v.Args[2]
  4868  		if !(s > 8) {
  4869  			break
  4870  		}
  4871  		v.reset(OpPPC64LoweredMove)
  4872  		v.AuxInt = s
  4873  		v.AddArg(dst)
  4874  		v.AddArg(src)
  4875  		v.AddArg(mem)
  4876  		return true
  4877  	}
  4878  	return false
  4879  }
  4880  func rewriteValuePPC64_OpMul16_0(v *Value) bool {
  4881  	// match: (Mul16 x y)
  4882  	// cond:
  4883  	// result: (MULLW x y)
  4884  	for {
  4885  		_ = v.Args[1]
  4886  		x := v.Args[0]
  4887  		y := v.Args[1]
  4888  		v.reset(OpPPC64MULLW)
  4889  		v.AddArg(x)
  4890  		v.AddArg(y)
  4891  		return true
  4892  	}
  4893  }
  4894  func rewriteValuePPC64_OpMul32_0(v *Value) bool {
  4895  	// match: (Mul32 x y)
  4896  	// cond:
  4897  	// result: (MULLW x y)
  4898  	for {
  4899  		_ = v.Args[1]
  4900  		x := v.Args[0]
  4901  		y := v.Args[1]
  4902  		v.reset(OpPPC64MULLW)
  4903  		v.AddArg(x)
  4904  		v.AddArg(y)
  4905  		return true
  4906  	}
  4907  }
  4908  func rewriteValuePPC64_OpMul32F_0(v *Value) bool {
  4909  	// match: (Mul32F x y)
  4910  	// cond:
  4911  	// result: (FMULS x y)
  4912  	for {
  4913  		_ = v.Args[1]
  4914  		x := v.Args[0]
  4915  		y := v.Args[1]
  4916  		v.reset(OpPPC64FMULS)
  4917  		v.AddArg(x)
  4918  		v.AddArg(y)
  4919  		return true
  4920  	}
  4921  }
  4922  func rewriteValuePPC64_OpMul64_0(v *Value) bool {
  4923  	// match: (Mul64 x y)
  4924  	// cond:
  4925  	// result: (MULLD x y)
  4926  	for {
  4927  		_ = v.Args[1]
  4928  		x := v.Args[0]
  4929  		y := v.Args[1]
  4930  		v.reset(OpPPC64MULLD)
  4931  		v.AddArg(x)
  4932  		v.AddArg(y)
  4933  		return true
  4934  	}
  4935  }
  4936  func rewriteValuePPC64_OpMul64F_0(v *Value) bool {
  4937  	// match: (Mul64F x y)
  4938  	// cond:
  4939  	// result: (FMUL x y)
  4940  	for {
  4941  		_ = v.Args[1]
  4942  		x := v.Args[0]
  4943  		y := v.Args[1]
  4944  		v.reset(OpPPC64FMUL)
  4945  		v.AddArg(x)
  4946  		v.AddArg(y)
  4947  		return true
  4948  	}
  4949  }
  4950  func rewriteValuePPC64_OpMul64uhilo_0(v *Value) bool {
  4951  	// match: (Mul64uhilo x y)
  4952  	// cond:
  4953  	// result: (LoweredMuluhilo x y)
  4954  	for {
  4955  		_ = v.Args[1]
  4956  		x := v.Args[0]
  4957  		y := v.Args[1]
  4958  		v.reset(OpPPC64LoweredMuluhilo)
  4959  		v.AddArg(x)
  4960  		v.AddArg(y)
  4961  		return true
  4962  	}
  4963  }
  4964  func rewriteValuePPC64_OpMul8_0(v *Value) bool {
  4965  	// match: (Mul8 x y)
  4966  	// cond:
  4967  	// result: (MULLW x y)
  4968  	for {
  4969  		_ = v.Args[1]
  4970  		x := v.Args[0]
  4971  		y := v.Args[1]
  4972  		v.reset(OpPPC64MULLW)
  4973  		v.AddArg(x)
  4974  		v.AddArg(y)
  4975  		return true
  4976  	}
  4977  }
  4978  func rewriteValuePPC64_OpNeg16_0(v *Value) bool {
  4979  	// match: (Neg16 x)
  4980  	// cond:
  4981  	// result: (NEG x)
  4982  	for {
  4983  		x := v.Args[0]
  4984  		v.reset(OpPPC64NEG)
  4985  		v.AddArg(x)
  4986  		return true
  4987  	}
  4988  }
  4989  func rewriteValuePPC64_OpNeg32_0(v *Value) bool {
  4990  	// match: (Neg32 x)
  4991  	// cond:
  4992  	// result: (NEG x)
  4993  	for {
  4994  		x := v.Args[0]
  4995  		v.reset(OpPPC64NEG)
  4996  		v.AddArg(x)
  4997  		return true
  4998  	}
  4999  }
  5000  func rewriteValuePPC64_OpNeg32F_0(v *Value) bool {
  5001  	// match: (Neg32F x)
  5002  	// cond:
  5003  	// result: (FNEG x)
  5004  	for {
  5005  		x := v.Args[0]
  5006  		v.reset(OpPPC64FNEG)
  5007  		v.AddArg(x)
  5008  		return true
  5009  	}
  5010  }
  5011  func rewriteValuePPC64_OpNeg64_0(v *Value) bool {
  5012  	// match: (Neg64 x)
  5013  	// cond:
  5014  	// result: (NEG x)
  5015  	for {
  5016  		x := v.Args[0]
  5017  		v.reset(OpPPC64NEG)
  5018  		v.AddArg(x)
  5019  		return true
  5020  	}
  5021  }
  5022  func rewriteValuePPC64_OpNeg64F_0(v *Value) bool {
  5023  	// match: (Neg64F x)
  5024  	// cond:
  5025  	// result: (FNEG x)
  5026  	for {
  5027  		x := v.Args[0]
  5028  		v.reset(OpPPC64FNEG)
  5029  		v.AddArg(x)
  5030  		return true
  5031  	}
  5032  }
  5033  func rewriteValuePPC64_OpNeg8_0(v *Value) bool {
  5034  	// match: (Neg8 x)
  5035  	// cond:
  5036  	// result: (NEG x)
  5037  	for {
  5038  		x := v.Args[0]
  5039  		v.reset(OpPPC64NEG)
  5040  		v.AddArg(x)
  5041  		return true
  5042  	}
  5043  }
  5044  func rewriteValuePPC64_OpNeq16_0(v *Value) bool {
  5045  	b := v.Block
  5046  	_ = b
  5047  	typ := &b.Func.Config.Types
  5048  	_ = typ
  5049  	// match: (Neq16 x y)
  5050  	// cond: isSigned(x.Type) && isSigned(y.Type)
  5051  	// result: (NotEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  5052  	for {
  5053  		_ = v.Args[1]
  5054  		x := v.Args[0]
  5055  		y := v.Args[1]
  5056  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  5057  			break
  5058  		}
  5059  		v.reset(OpPPC64NotEqual)
  5060  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  5061  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  5062  		v1.AddArg(x)
  5063  		v0.AddArg(v1)
  5064  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  5065  		v2.AddArg(y)
  5066  		v0.AddArg(v2)
  5067  		v.AddArg(v0)
  5068  		return true
  5069  	}
  5070  	// match: (Neq16 x y)
  5071  	// cond:
  5072  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  5073  	for {
  5074  		_ = v.Args[1]
  5075  		x := v.Args[0]
  5076  		y := v.Args[1]
  5077  		v.reset(OpPPC64NotEqual)
  5078  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  5079  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  5080  		v1.AddArg(x)
  5081  		v0.AddArg(v1)
  5082  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  5083  		v2.AddArg(y)
  5084  		v0.AddArg(v2)
  5085  		v.AddArg(v0)
  5086  		return true
  5087  	}
  5088  }
  5089  func rewriteValuePPC64_OpNeq32_0(v *Value) bool {
  5090  	b := v.Block
  5091  	_ = b
  5092  	// match: (Neq32 x y)
  5093  	// cond:
  5094  	// result: (NotEqual (CMPW x y))
  5095  	for {
  5096  		_ = v.Args[1]
  5097  		x := v.Args[0]
  5098  		y := v.Args[1]
  5099  		v.reset(OpPPC64NotEqual)
  5100  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  5101  		v0.AddArg(x)
  5102  		v0.AddArg(y)
  5103  		v.AddArg(v0)
  5104  		return true
  5105  	}
  5106  }
  5107  func rewriteValuePPC64_OpNeq32F_0(v *Value) bool {
  5108  	b := v.Block
  5109  	_ = b
  5110  	// match: (Neq32F x y)
  5111  	// cond:
  5112  	// result: (NotEqual (FCMPU x y))
  5113  	for {
  5114  		_ = v.Args[1]
  5115  		x := v.Args[0]
  5116  		y := v.Args[1]
  5117  		v.reset(OpPPC64NotEqual)
  5118  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  5119  		v0.AddArg(x)
  5120  		v0.AddArg(y)
  5121  		v.AddArg(v0)
  5122  		return true
  5123  	}
  5124  }
  5125  func rewriteValuePPC64_OpNeq64_0(v *Value) bool {
  5126  	b := v.Block
  5127  	_ = b
  5128  	// match: (Neq64 x y)
  5129  	// cond:
  5130  	// result: (NotEqual (CMP x y))
  5131  	for {
  5132  		_ = v.Args[1]
  5133  		x := v.Args[0]
  5134  		y := v.Args[1]
  5135  		v.reset(OpPPC64NotEqual)
  5136  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  5137  		v0.AddArg(x)
  5138  		v0.AddArg(y)
  5139  		v.AddArg(v0)
  5140  		return true
  5141  	}
  5142  }
  5143  func rewriteValuePPC64_OpNeq64F_0(v *Value) bool {
  5144  	b := v.Block
  5145  	_ = b
  5146  	// match: (Neq64F x y)
  5147  	// cond:
  5148  	// result: (NotEqual (FCMPU x y))
  5149  	for {
  5150  		_ = v.Args[1]
  5151  		x := v.Args[0]
  5152  		y := v.Args[1]
  5153  		v.reset(OpPPC64NotEqual)
  5154  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  5155  		v0.AddArg(x)
  5156  		v0.AddArg(y)
  5157  		v.AddArg(v0)
  5158  		return true
  5159  	}
  5160  }
  5161  func rewriteValuePPC64_OpNeq8_0(v *Value) bool {
  5162  	b := v.Block
  5163  	_ = b
  5164  	typ := &b.Func.Config.Types
  5165  	_ = typ
  5166  	// match: (Neq8 x y)
  5167  	// cond: isSigned(x.Type) && isSigned(y.Type)
  5168  	// result: (NotEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  5169  	for {
  5170  		_ = v.Args[1]
  5171  		x := v.Args[0]
  5172  		y := v.Args[1]
  5173  		if !(isSigned(x.Type) && isSigned(y.Type)) {
  5174  			break
  5175  		}
  5176  		v.reset(OpPPC64NotEqual)
  5177  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  5178  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  5179  		v1.AddArg(x)
  5180  		v0.AddArg(v1)
  5181  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  5182  		v2.AddArg(y)
  5183  		v0.AddArg(v2)
  5184  		v.AddArg(v0)
  5185  		return true
  5186  	}
  5187  	// match: (Neq8 x y)
  5188  	// cond:
  5189  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  5190  	for {
  5191  		_ = v.Args[1]
  5192  		x := v.Args[0]
  5193  		y := v.Args[1]
  5194  		v.reset(OpPPC64NotEqual)
  5195  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  5196  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  5197  		v1.AddArg(x)
  5198  		v0.AddArg(v1)
  5199  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  5200  		v2.AddArg(y)
  5201  		v0.AddArg(v2)
  5202  		v.AddArg(v0)
  5203  		return true
  5204  	}
  5205  }
  5206  func rewriteValuePPC64_OpNeqB_0(v *Value) bool {
  5207  	// match: (NeqB x y)
  5208  	// cond:
  5209  	// result: (XOR x y)
  5210  	for {
  5211  		_ = v.Args[1]
  5212  		x := v.Args[0]
  5213  		y := v.Args[1]
  5214  		v.reset(OpPPC64XOR)
  5215  		v.AddArg(x)
  5216  		v.AddArg(y)
  5217  		return true
  5218  	}
  5219  }
  5220  func rewriteValuePPC64_OpNeqPtr_0(v *Value) bool {
  5221  	b := v.Block
  5222  	_ = b
  5223  	// match: (NeqPtr x y)
  5224  	// cond:
  5225  	// result: (NotEqual (CMP x y))
  5226  	for {
  5227  		_ = v.Args[1]
  5228  		x := v.Args[0]
  5229  		y := v.Args[1]
  5230  		v.reset(OpPPC64NotEqual)
  5231  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  5232  		v0.AddArg(x)
  5233  		v0.AddArg(y)
  5234  		v.AddArg(v0)
  5235  		return true
  5236  	}
  5237  }
  5238  func rewriteValuePPC64_OpNilCheck_0(v *Value) bool {
  5239  	// match: (NilCheck ptr mem)
  5240  	// cond:
  5241  	// result: (LoweredNilCheck ptr mem)
  5242  	for {
  5243  		_ = v.Args[1]
  5244  		ptr := v.Args[0]
  5245  		mem := v.Args[1]
  5246  		v.reset(OpPPC64LoweredNilCheck)
  5247  		v.AddArg(ptr)
  5248  		v.AddArg(mem)
  5249  		return true
  5250  	}
  5251  }
  5252  func rewriteValuePPC64_OpNot_0(v *Value) bool {
  5253  	// match: (Not x)
  5254  	// cond:
  5255  	// result: (XORconst [1] x)
  5256  	for {
  5257  		x := v.Args[0]
  5258  		v.reset(OpPPC64XORconst)
  5259  		v.AuxInt = 1
  5260  		v.AddArg(x)
  5261  		return true
  5262  	}
  5263  }
  5264  func rewriteValuePPC64_OpOffPtr_0(v *Value) bool {
  5265  	b := v.Block
  5266  	_ = b
  5267  	typ := &b.Func.Config.Types
  5268  	_ = typ
  5269  	// match: (OffPtr [off] ptr)
  5270  	// cond:
  5271  	// result: (ADD (MOVDconst <typ.Int64> [off]) ptr)
  5272  	for {
  5273  		off := v.AuxInt
  5274  		ptr := v.Args[0]
  5275  		v.reset(OpPPC64ADD)
  5276  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5277  		v0.AuxInt = off
  5278  		v.AddArg(v0)
  5279  		v.AddArg(ptr)
  5280  		return true
  5281  	}
  5282  }
  5283  func rewriteValuePPC64_OpOr16_0(v *Value) bool {
  5284  	// match: (Or16 x y)
  5285  	// cond:
  5286  	// result: (OR x y)
  5287  	for {
  5288  		_ = v.Args[1]
  5289  		x := v.Args[0]
  5290  		y := v.Args[1]
  5291  		v.reset(OpPPC64OR)
  5292  		v.AddArg(x)
  5293  		v.AddArg(y)
  5294  		return true
  5295  	}
  5296  }
  5297  func rewriteValuePPC64_OpOr32_0(v *Value) bool {
  5298  	// match: (Or32 x y)
  5299  	// cond:
  5300  	// result: (OR x y)
  5301  	for {
  5302  		_ = v.Args[1]
  5303  		x := v.Args[0]
  5304  		y := v.Args[1]
  5305  		v.reset(OpPPC64OR)
  5306  		v.AddArg(x)
  5307  		v.AddArg(y)
  5308  		return true
  5309  	}
  5310  }
  5311  func rewriteValuePPC64_OpOr64_0(v *Value) bool {
  5312  	// match: (Or64 x y)
  5313  	// cond:
  5314  	// result: (OR x y)
  5315  	for {
  5316  		_ = v.Args[1]
  5317  		x := v.Args[0]
  5318  		y := v.Args[1]
  5319  		v.reset(OpPPC64OR)
  5320  		v.AddArg(x)
  5321  		v.AddArg(y)
  5322  		return true
  5323  	}
  5324  }
  5325  func rewriteValuePPC64_OpOr8_0(v *Value) bool {
  5326  	// match: (Or8 x y)
  5327  	// cond:
  5328  	// result: (OR x y)
  5329  	for {
  5330  		_ = v.Args[1]
  5331  		x := v.Args[0]
  5332  		y := v.Args[1]
  5333  		v.reset(OpPPC64OR)
  5334  		v.AddArg(x)
  5335  		v.AddArg(y)
  5336  		return true
  5337  	}
  5338  }
  5339  func rewriteValuePPC64_OpOrB_0(v *Value) bool {
  5340  	// match: (OrB x y)
  5341  	// cond:
  5342  	// result: (OR x y)
  5343  	for {
  5344  		_ = v.Args[1]
  5345  		x := v.Args[0]
  5346  		y := v.Args[1]
  5347  		v.reset(OpPPC64OR)
  5348  		v.AddArg(x)
  5349  		v.AddArg(y)
  5350  		return true
  5351  	}
  5352  }
  5353  func rewriteValuePPC64_OpPPC64ADD_0(v *Value) bool {
  5354  	b := v.Block
  5355  	_ = b
  5356  	typ := &b.Func.Config.Types
  5357  	_ = typ
  5358  	// match: (ADD (SLDconst x [c]) (SRDconst x [d]))
  5359  	// cond: d == 64-c
  5360  	// result: (ROTLconst [c] x)
  5361  	for {
  5362  		_ = v.Args[1]
  5363  		v_0 := v.Args[0]
  5364  		if v_0.Op != OpPPC64SLDconst {
  5365  			break
  5366  		}
  5367  		c := v_0.AuxInt
  5368  		x := v_0.Args[0]
  5369  		v_1 := v.Args[1]
  5370  		if v_1.Op != OpPPC64SRDconst {
  5371  			break
  5372  		}
  5373  		d := v_1.AuxInt
  5374  		if x != v_1.Args[0] {
  5375  			break
  5376  		}
  5377  		if !(d == 64-c) {
  5378  			break
  5379  		}
  5380  		v.reset(OpPPC64ROTLconst)
  5381  		v.AuxInt = c
  5382  		v.AddArg(x)
  5383  		return true
  5384  	}
  5385  	// match: (ADD (SRDconst x [d]) (SLDconst x [c]))
  5386  	// cond: d == 64-c
  5387  	// result: (ROTLconst [c] x)
  5388  	for {
  5389  		_ = v.Args[1]
  5390  		v_0 := v.Args[0]
  5391  		if v_0.Op != OpPPC64SRDconst {
  5392  			break
  5393  		}
  5394  		d := v_0.AuxInt
  5395  		x := v_0.Args[0]
  5396  		v_1 := v.Args[1]
  5397  		if v_1.Op != OpPPC64SLDconst {
  5398  			break
  5399  		}
  5400  		c := v_1.AuxInt
  5401  		if x != v_1.Args[0] {
  5402  			break
  5403  		}
  5404  		if !(d == 64-c) {
  5405  			break
  5406  		}
  5407  		v.reset(OpPPC64ROTLconst)
  5408  		v.AuxInt = c
  5409  		v.AddArg(x)
  5410  		return true
  5411  	}
  5412  	// match: (ADD (SLWconst x [c]) (SRWconst x [d]))
  5413  	// cond: d == 32-c
  5414  	// result: (ROTLWconst [c] x)
  5415  	for {
  5416  		_ = v.Args[1]
  5417  		v_0 := v.Args[0]
  5418  		if v_0.Op != OpPPC64SLWconst {
  5419  			break
  5420  		}
  5421  		c := v_0.AuxInt
  5422  		x := v_0.Args[0]
  5423  		v_1 := v.Args[1]
  5424  		if v_1.Op != OpPPC64SRWconst {
  5425  			break
  5426  		}
  5427  		d := v_1.AuxInt
  5428  		if x != v_1.Args[0] {
  5429  			break
  5430  		}
  5431  		if !(d == 32-c) {
  5432  			break
  5433  		}
  5434  		v.reset(OpPPC64ROTLWconst)
  5435  		v.AuxInt = c
  5436  		v.AddArg(x)
  5437  		return true
  5438  	}
  5439  	// match: (ADD (SRWconst x [d]) (SLWconst x [c]))
  5440  	// cond: d == 32-c
  5441  	// result: (ROTLWconst [c] x)
  5442  	for {
  5443  		_ = v.Args[1]
  5444  		v_0 := v.Args[0]
  5445  		if v_0.Op != OpPPC64SRWconst {
  5446  			break
  5447  		}
  5448  		d := v_0.AuxInt
  5449  		x := v_0.Args[0]
  5450  		v_1 := v.Args[1]
  5451  		if v_1.Op != OpPPC64SLWconst {
  5452  			break
  5453  		}
  5454  		c := v_1.AuxInt
  5455  		if x != v_1.Args[0] {
  5456  			break
  5457  		}
  5458  		if !(d == 32-c) {
  5459  			break
  5460  		}
  5461  		v.reset(OpPPC64ROTLWconst)
  5462  		v.AuxInt = c
  5463  		v.AddArg(x)
  5464  		return true
  5465  	}
  5466  	// match: (ADD (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
  5467  	// cond:
  5468  	// result: (ROTL x y)
  5469  	for {
  5470  		_ = v.Args[1]
  5471  		v_0 := v.Args[0]
  5472  		if v_0.Op != OpPPC64SLD {
  5473  			break
  5474  		}
  5475  		_ = v_0.Args[1]
  5476  		x := v_0.Args[0]
  5477  		v_0_1 := v_0.Args[1]
  5478  		if v_0_1.Op != OpPPC64ANDconst {
  5479  			break
  5480  		}
  5481  		if v_0_1.Type != typ.Int64 {
  5482  			break
  5483  		}
  5484  		if v_0_1.AuxInt != 63 {
  5485  			break
  5486  		}
  5487  		y := v_0_1.Args[0]
  5488  		v_1 := v.Args[1]
  5489  		if v_1.Op != OpPPC64SRD {
  5490  			break
  5491  		}
  5492  		_ = v_1.Args[1]
  5493  		if x != v_1.Args[0] {
  5494  			break
  5495  		}
  5496  		v_1_1 := v_1.Args[1]
  5497  		if v_1_1.Op != OpPPC64SUB {
  5498  			break
  5499  		}
  5500  		if v_1_1.Type != typ.UInt {
  5501  			break
  5502  		}
  5503  		_ = v_1_1.Args[1]
  5504  		v_1_1_0 := v_1_1.Args[0]
  5505  		if v_1_1_0.Op != OpPPC64MOVDconst {
  5506  			break
  5507  		}
  5508  		if v_1_1_0.AuxInt != 64 {
  5509  			break
  5510  		}
  5511  		v_1_1_1 := v_1_1.Args[1]
  5512  		if v_1_1_1.Op != OpPPC64ANDconst {
  5513  			break
  5514  		}
  5515  		if v_1_1_1.Type != typ.UInt {
  5516  			break
  5517  		}
  5518  		if v_1_1_1.AuxInt != 63 {
  5519  			break
  5520  		}
  5521  		if y != v_1_1_1.Args[0] {
  5522  			break
  5523  		}
  5524  		v.reset(OpPPC64ROTL)
  5525  		v.AddArg(x)
  5526  		v.AddArg(y)
  5527  		return true
  5528  	}
  5529  	// match: (ADD (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))) (SLD x (ANDconst <typ.Int64> [63] y)))
  5530  	// cond:
  5531  	// result: (ROTL x y)
  5532  	for {
  5533  		_ = v.Args[1]
  5534  		v_0 := v.Args[0]
  5535  		if v_0.Op != OpPPC64SRD {
  5536  			break
  5537  		}
  5538  		_ = v_0.Args[1]
  5539  		x := v_0.Args[0]
  5540  		v_0_1 := v_0.Args[1]
  5541  		if v_0_1.Op != OpPPC64SUB {
  5542  			break
  5543  		}
  5544  		if v_0_1.Type != typ.UInt {
  5545  			break
  5546  		}
  5547  		_ = v_0_1.Args[1]
  5548  		v_0_1_0 := v_0_1.Args[0]
  5549  		if v_0_1_0.Op != OpPPC64MOVDconst {
  5550  			break
  5551  		}
  5552  		if v_0_1_0.AuxInt != 64 {
  5553  			break
  5554  		}
  5555  		v_0_1_1 := v_0_1.Args[1]
  5556  		if v_0_1_1.Op != OpPPC64ANDconst {
  5557  			break
  5558  		}
  5559  		if v_0_1_1.Type != typ.UInt {
  5560  			break
  5561  		}
  5562  		if v_0_1_1.AuxInt != 63 {
  5563  			break
  5564  		}
  5565  		y := v_0_1_1.Args[0]
  5566  		v_1 := v.Args[1]
  5567  		if v_1.Op != OpPPC64SLD {
  5568  			break
  5569  		}
  5570  		_ = v_1.Args[1]
  5571  		if x != v_1.Args[0] {
  5572  			break
  5573  		}
  5574  		v_1_1 := v_1.Args[1]
  5575  		if v_1_1.Op != OpPPC64ANDconst {
  5576  			break
  5577  		}
  5578  		if v_1_1.Type != typ.Int64 {
  5579  			break
  5580  		}
  5581  		if v_1_1.AuxInt != 63 {
  5582  			break
  5583  		}
  5584  		if y != v_1_1.Args[0] {
  5585  			break
  5586  		}
  5587  		v.reset(OpPPC64ROTL)
  5588  		v.AddArg(x)
  5589  		v.AddArg(y)
  5590  		return true
  5591  	}
  5592  	// match: (ADD (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
  5593  	// cond:
  5594  	// result: (ROTLW x y)
  5595  	for {
  5596  		_ = v.Args[1]
  5597  		v_0 := v.Args[0]
  5598  		if v_0.Op != OpPPC64SLW {
  5599  			break
  5600  		}
  5601  		_ = v_0.Args[1]
  5602  		x := v_0.Args[0]
  5603  		v_0_1 := v_0.Args[1]
  5604  		if v_0_1.Op != OpPPC64ANDconst {
  5605  			break
  5606  		}
  5607  		if v_0_1.Type != typ.Int32 {
  5608  			break
  5609  		}
  5610  		if v_0_1.AuxInt != 31 {
  5611  			break
  5612  		}
  5613  		y := v_0_1.Args[0]
  5614  		v_1 := v.Args[1]
  5615  		if v_1.Op != OpPPC64SRW {
  5616  			break
  5617  		}
  5618  		_ = v_1.Args[1]
  5619  		if x != v_1.Args[0] {
  5620  			break
  5621  		}
  5622  		v_1_1 := v_1.Args[1]
  5623  		if v_1_1.Op != OpPPC64SUB {
  5624  			break
  5625  		}
  5626  		if v_1_1.Type != typ.UInt {
  5627  			break
  5628  		}
  5629  		_ = v_1_1.Args[1]
  5630  		v_1_1_0 := v_1_1.Args[0]
  5631  		if v_1_1_0.Op != OpPPC64MOVDconst {
  5632  			break
  5633  		}
  5634  		if v_1_1_0.AuxInt != 32 {
  5635  			break
  5636  		}
  5637  		v_1_1_1 := v_1_1.Args[1]
  5638  		if v_1_1_1.Op != OpPPC64ANDconst {
  5639  			break
  5640  		}
  5641  		if v_1_1_1.Type != typ.UInt {
  5642  			break
  5643  		}
  5644  		if v_1_1_1.AuxInt != 31 {
  5645  			break
  5646  		}
  5647  		if y != v_1_1_1.Args[0] {
  5648  			break
  5649  		}
  5650  		v.reset(OpPPC64ROTLW)
  5651  		v.AddArg(x)
  5652  		v.AddArg(y)
  5653  		return true
  5654  	}
  5655  	// match: (ADD (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))) (SLW x (ANDconst <typ.Int32> [31] y)))
  5656  	// cond:
  5657  	// result: (ROTLW x y)
  5658  	for {
  5659  		_ = v.Args[1]
  5660  		v_0 := v.Args[0]
  5661  		if v_0.Op != OpPPC64SRW {
  5662  			break
  5663  		}
  5664  		_ = v_0.Args[1]
  5665  		x := v_0.Args[0]
  5666  		v_0_1 := v_0.Args[1]
  5667  		if v_0_1.Op != OpPPC64SUB {
  5668  			break
  5669  		}
  5670  		if v_0_1.Type != typ.UInt {
  5671  			break
  5672  		}
  5673  		_ = v_0_1.Args[1]
  5674  		v_0_1_0 := v_0_1.Args[0]
  5675  		if v_0_1_0.Op != OpPPC64MOVDconst {
  5676  			break
  5677  		}
  5678  		if v_0_1_0.AuxInt != 32 {
  5679  			break
  5680  		}
  5681  		v_0_1_1 := v_0_1.Args[1]
  5682  		if v_0_1_1.Op != OpPPC64ANDconst {
  5683  			break
  5684  		}
  5685  		if v_0_1_1.Type != typ.UInt {
  5686  			break
  5687  		}
  5688  		if v_0_1_1.AuxInt != 31 {
  5689  			break
  5690  		}
  5691  		y := v_0_1_1.Args[0]
  5692  		v_1 := v.Args[1]
  5693  		if v_1.Op != OpPPC64SLW {
  5694  			break
  5695  		}
  5696  		_ = v_1.Args[1]
  5697  		if x != v_1.Args[0] {
  5698  			break
  5699  		}
  5700  		v_1_1 := v_1.Args[1]
  5701  		if v_1_1.Op != OpPPC64ANDconst {
  5702  			break
  5703  		}
  5704  		if v_1_1.Type != typ.Int32 {
  5705  			break
  5706  		}
  5707  		if v_1_1.AuxInt != 31 {
  5708  			break
  5709  		}
  5710  		if y != v_1_1.Args[0] {
  5711  			break
  5712  		}
  5713  		v.reset(OpPPC64ROTLW)
  5714  		v.AddArg(x)
  5715  		v.AddArg(y)
  5716  		return true
  5717  	}
  5718  	// match: (ADD x (MOVDconst [c]))
  5719  	// cond: is32Bit(c)
  5720  	// result: (ADDconst [c] x)
  5721  	for {
  5722  		_ = v.Args[1]
  5723  		x := v.Args[0]
  5724  		v_1 := v.Args[1]
  5725  		if v_1.Op != OpPPC64MOVDconst {
  5726  			break
  5727  		}
  5728  		c := v_1.AuxInt
  5729  		if !(is32Bit(c)) {
  5730  			break
  5731  		}
  5732  		v.reset(OpPPC64ADDconst)
  5733  		v.AuxInt = c
  5734  		v.AddArg(x)
  5735  		return true
  5736  	}
  5737  	// match: (ADD (MOVDconst [c]) x)
  5738  	// cond: is32Bit(c)
  5739  	// result: (ADDconst [c] x)
  5740  	for {
  5741  		_ = v.Args[1]
  5742  		v_0 := v.Args[0]
  5743  		if v_0.Op != OpPPC64MOVDconst {
  5744  			break
  5745  		}
  5746  		c := v_0.AuxInt
  5747  		x := v.Args[1]
  5748  		if !(is32Bit(c)) {
  5749  			break
  5750  		}
  5751  		v.reset(OpPPC64ADDconst)
  5752  		v.AuxInt = c
  5753  		v.AddArg(x)
  5754  		return true
  5755  	}
  5756  	return false
  5757  }
  5758  func rewriteValuePPC64_OpPPC64ADDconst_0(v *Value) bool {
  5759  	// match: (ADDconst [c] (ADDconst [d] x))
  5760  	// cond: is32Bit(c+d)
  5761  	// result: (ADDconst [c+d] x)
  5762  	for {
  5763  		c := v.AuxInt
  5764  		v_0 := v.Args[0]
  5765  		if v_0.Op != OpPPC64ADDconst {
  5766  			break
  5767  		}
  5768  		d := v_0.AuxInt
  5769  		x := v_0.Args[0]
  5770  		if !(is32Bit(c + d)) {
  5771  			break
  5772  		}
  5773  		v.reset(OpPPC64ADDconst)
  5774  		v.AuxInt = c + d
  5775  		v.AddArg(x)
  5776  		return true
  5777  	}
  5778  	// match: (ADDconst [0] x)
  5779  	// cond:
  5780  	// result: x
  5781  	for {
  5782  		if v.AuxInt != 0 {
  5783  			break
  5784  		}
  5785  		x := v.Args[0]
  5786  		v.reset(OpCopy)
  5787  		v.Type = x.Type
  5788  		v.AddArg(x)
  5789  		return true
  5790  	}
  5791  	// match: (ADDconst [c] (MOVDaddr [d] {sym} x))
  5792  	// cond:
  5793  	// result: (MOVDaddr [c+d] {sym} x)
  5794  	for {
  5795  		c := v.AuxInt
  5796  		v_0 := v.Args[0]
  5797  		if v_0.Op != OpPPC64MOVDaddr {
  5798  			break
  5799  		}
  5800  		d := v_0.AuxInt
  5801  		sym := v_0.Aux
  5802  		x := v_0.Args[0]
  5803  		v.reset(OpPPC64MOVDaddr)
  5804  		v.AuxInt = c + d
  5805  		v.Aux = sym
  5806  		v.AddArg(x)
  5807  		return true
  5808  	}
  5809  	return false
  5810  }
  5811  func rewriteValuePPC64_OpPPC64AND_0(v *Value) bool {
  5812  	// match: (AND x (NOR y y))
  5813  	// cond:
  5814  	// result: (ANDN x y)
  5815  	for {
  5816  		_ = v.Args[1]
  5817  		x := v.Args[0]
  5818  		v_1 := v.Args[1]
  5819  		if v_1.Op != OpPPC64NOR {
  5820  			break
  5821  		}
  5822  		_ = v_1.Args[1]
  5823  		y := v_1.Args[0]
  5824  		if y != v_1.Args[1] {
  5825  			break
  5826  		}
  5827  		v.reset(OpPPC64ANDN)
  5828  		v.AddArg(x)
  5829  		v.AddArg(y)
  5830  		return true
  5831  	}
  5832  	// match: (AND (NOR y y) x)
  5833  	// cond:
  5834  	// result: (ANDN x y)
  5835  	for {
  5836  		_ = v.Args[1]
  5837  		v_0 := v.Args[0]
  5838  		if v_0.Op != OpPPC64NOR {
  5839  			break
  5840  		}
  5841  		_ = v_0.Args[1]
  5842  		y := v_0.Args[0]
  5843  		if y != v_0.Args[1] {
  5844  			break
  5845  		}
  5846  		x := v.Args[1]
  5847  		v.reset(OpPPC64ANDN)
  5848  		v.AddArg(x)
  5849  		v.AddArg(y)
  5850  		return true
  5851  	}
  5852  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  5853  	// cond:
  5854  	// result: (MOVDconst [c&d])
  5855  	for {
  5856  		_ = v.Args[1]
  5857  		v_0 := v.Args[0]
  5858  		if v_0.Op != OpPPC64MOVDconst {
  5859  			break
  5860  		}
  5861  		c := v_0.AuxInt
  5862  		v_1 := v.Args[1]
  5863  		if v_1.Op != OpPPC64MOVDconst {
  5864  			break
  5865  		}
  5866  		d := v_1.AuxInt
  5867  		v.reset(OpPPC64MOVDconst)
  5868  		v.AuxInt = c & d
  5869  		return true
  5870  	}
  5871  	// match: (AND (MOVDconst [d]) (MOVDconst [c]))
  5872  	// cond:
  5873  	// result: (MOVDconst [c&d])
  5874  	for {
  5875  		_ = v.Args[1]
  5876  		v_0 := v.Args[0]
  5877  		if v_0.Op != OpPPC64MOVDconst {
  5878  			break
  5879  		}
  5880  		d := v_0.AuxInt
  5881  		v_1 := v.Args[1]
  5882  		if v_1.Op != OpPPC64MOVDconst {
  5883  			break
  5884  		}
  5885  		c := v_1.AuxInt
  5886  		v.reset(OpPPC64MOVDconst)
  5887  		v.AuxInt = c & d
  5888  		return true
  5889  	}
  5890  	// match: (AND x (MOVDconst [c]))
  5891  	// cond: isU16Bit(c)
  5892  	// result: (ANDconst [c] x)
  5893  	for {
  5894  		_ = v.Args[1]
  5895  		x := v.Args[0]
  5896  		v_1 := v.Args[1]
  5897  		if v_1.Op != OpPPC64MOVDconst {
  5898  			break
  5899  		}
  5900  		c := v_1.AuxInt
  5901  		if !(isU16Bit(c)) {
  5902  			break
  5903  		}
  5904  		v.reset(OpPPC64ANDconst)
  5905  		v.AuxInt = c
  5906  		v.AddArg(x)
  5907  		return true
  5908  	}
  5909  	// match: (AND (MOVDconst [c]) x)
  5910  	// cond: isU16Bit(c)
  5911  	// result: (ANDconst [c] x)
  5912  	for {
  5913  		_ = v.Args[1]
  5914  		v_0 := v.Args[0]
  5915  		if v_0.Op != OpPPC64MOVDconst {
  5916  			break
  5917  		}
  5918  		c := v_0.AuxInt
  5919  		x := v.Args[1]
  5920  		if !(isU16Bit(c)) {
  5921  			break
  5922  		}
  5923  		v.reset(OpPPC64ANDconst)
  5924  		v.AuxInt = c
  5925  		v.AddArg(x)
  5926  		return true
  5927  	}
  5928  	// match: (AND (MOVDconst [c]) y:(MOVWZreg _))
  5929  	// cond: c&0xFFFFFFFF == 0xFFFFFFFF
  5930  	// result: y
  5931  	for {
  5932  		_ = v.Args[1]
  5933  		v_0 := v.Args[0]
  5934  		if v_0.Op != OpPPC64MOVDconst {
  5935  			break
  5936  		}
  5937  		c := v_0.AuxInt
  5938  		y := v.Args[1]
  5939  		if y.Op != OpPPC64MOVWZreg {
  5940  			break
  5941  		}
  5942  		if !(c&0xFFFFFFFF == 0xFFFFFFFF) {
  5943  			break
  5944  		}
  5945  		v.reset(OpCopy)
  5946  		v.Type = y.Type
  5947  		v.AddArg(y)
  5948  		return true
  5949  	}
  5950  	// match: (AND y:(MOVWZreg _) (MOVDconst [c]))
  5951  	// cond: c&0xFFFFFFFF == 0xFFFFFFFF
  5952  	// result: y
  5953  	for {
  5954  		_ = v.Args[1]
  5955  		y := v.Args[0]
  5956  		if y.Op != OpPPC64MOVWZreg {
  5957  			break
  5958  		}
  5959  		v_1 := v.Args[1]
  5960  		if v_1.Op != OpPPC64MOVDconst {
  5961  			break
  5962  		}
  5963  		c := v_1.AuxInt
  5964  		if !(c&0xFFFFFFFF == 0xFFFFFFFF) {
  5965  			break
  5966  		}
  5967  		v.reset(OpCopy)
  5968  		v.Type = y.Type
  5969  		v.AddArg(y)
  5970  		return true
  5971  	}
  5972  	// match: (AND (MOVDconst [0xFFFFFFFF]) y:(MOVWreg x))
  5973  	// cond:
  5974  	// result: (MOVWZreg x)
  5975  	for {
  5976  		_ = v.Args[1]
  5977  		v_0 := v.Args[0]
  5978  		if v_0.Op != OpPPC64MOVDconst {
  5979  			break
  5980  		}
  5981  		if v_0.AuxInt != 0xFFFFFFFF {
  5982  			break
  5983  		}
  5984  		y := v.Args[1]
  5985  		if y.Op != OpPPC64MOVWreg {
  5986  			break
  5987  		}
  5988  		x := y.Args[0]
  5989  		v.reset(OpPPC64MOVWZreg)
  5990  		v.AddArg(x)
  5991  		return true
  5992  	}
  5993  	// match: (AND y:(MOVWreg x) (MOVDconst [0xFFFFFFFF]))
  5994  	// cond:
  5995  	// result: (MOVWZreg x)
  5996  	for {
  5997  		_ = v.Args[1]
  5998  		y := v.Args[0]
  5999  		if y.Op != OpPPC64MOVWreg {
  6000  			break
  6001  		}
  6002  		x := y.Args[0]
  6003  		v_1 := v.Args[1]
  6004  		if v_1.Op != OpPPC64MOVDconst {
  6005  			break
  6006  		}
  6007  		if v_1.AuxInt != 0xFFFFFFFF {
  6008  			break
  6009  		}
  6010  		v.reset(OpPPC64MOVWZreg)
  6011  		v.AddArg(x)
  6012  		return true
  6013  	}
  6014  	return false
  6015  }
  6016  func rewriteValuePPC64_OpPPC64AND_10(v *Value) bool {
  6017  	// match: (AND (MOVDconst [c]) x:(MOVBZload _ _))
  6018  	// cond:
  6019  	// result: (ANDconst [c&0xFF] x)
  6020  	for {
  6021  		_ = v.Args[1]
  6022  		v_0 := v.Args[0]
  6023  		if v_0.Op != OpPPC64MOVDconst {
  6024  			break
  6025  		}
  6026  		c := v_0.AuxInt
  6027  		x := v.Args[1]
  6028  		if x.Op != OpPPC64MOVBZload {
  6029  			break
  6030  		}
  6031  		_ = x.Args[1]
  6032  		v.reset(OpPPC64ANDconst)
  6033  		v.AuxInt = c & 0xFF
  6034  		v.AddArg(x)
  6035  		return true
  6036  	}
  6037  	// match: (AND x:(MOVBZload _ _) (MOVDconst [c]))
  6038  	// cond:
  6039  	// result: (ANDconst [c&0xFF] x)
  6040  	for {
  6041  		_ = v.Args[1]
  6042  		x := v.Args[0]
  6043  		if x.Op != OpPPC64MOVBZload {
  6044  			break
  6045  		}
  6046  		_ = x.Args[1]
  6047  		v_1 := v.Args[1]
  6048  		if v_1.Op != OpPPC64MOVDconst {
  6049  			break
  6050  		}
  6051  		c := v_1.AuxInt
  6052  		v.reset(OpPPC64ANDconst)
  6053  		v.AuxInt = c & 0xFF
  6054  		v.AddArg(x)
  6055  		return true
  6056  	}
  6057  	// match: (AND x:(MOVBZload _ _) (MOVDconst [c]))
  6058  	// cond:
  6059  	// result: (ANDconst [c&0xFF] x)
  6060  	for {
  6061  		_ = v.Args[1]
  6062  		x := v.Args[0]
  6063  		if x.Op != OpPPC64MOVBZload {
  6064  			break
  6065  		}
  6066  		_ = x.Args[1]
  6067  		v_1 := v.Args[1]
  6068  		if v_1.Op != OpPPC64MOVDconst {
  6069  			break
  6070  		}
  6071  		c := v_1.AuxInt
  6072  		v.reset(OpPPC64ANDconst)
  6073  		v.AuxInt = c & 0xFF
  6074  		v.AddArg(x)
  6075  		return true
  6076  	}
  6077  	// match: (AND (MOVDconst [c]) x:(MOVBZload _ _))
  6078  	// cond:
  6079  	// result: (ANDconst [c&0xFF] x)
  6080  	for {
  6081  		_ = v.Args[1]
  6082  		v_0 := v.Args[0]
  6083  		if v_0.Op != OpPPC64MOVDconst {
  6084  			break
  6085  		}
  6086  		c := v_0.AuxInt
  6087  		x := v.Args[1]
  6088  		if x.Op != OpPPC64MOVBZload {
  6089  			break
  6090  		}
  6091  		_ = x.Args[1]
  6092  		v.reset(OpPPC64ANDconst)
  6093  		v.AuxInt = c & 0xFF
  6094  		v.AddArg(x)
  6095  		return true
  6096  	}
  6097  	return false
  6098  }
  6099  func rewriteValuePPC64_OpPPC64ANDconst_0(v *Value) bool {
  6100  	// match: (ANDconst [c] (ANDconst [d] x))
  6101  	// cond:
  6102  	// result: (ANDconst [c&d] x)
  6103  	for {
  6104  		c := v.AuxInt
  6105  		v_0 := v.Args[0]
  6106  		if v_0.Op != OpPPC64ANDconst {
  6107  			break
  6108  		}
  6109  		d := v_0.AuxInt
  6110  		x := v_0.Args[0]
  6111  		v.reset(OpPPC64ANDconst)
  6112  		v.AuxInt = c & d
  6113  		v.AddArg(x)
  6114  		return true
  6115  	}
  6116  	// match: (ANDconst [-1] x)
  6117  	// cond:
  6118  	// result: x
  6119  	for {
  6120  		if v.AuxInt != -1 {
  6121  			break
  6122  		}
  6123  		x := v.Args[0]
  6124  		v.reset(OpCopy)
  6125  		v.Type = x.Type
  6126  		v.AddArg(x)
  6127  		return true
  6128  	}
  6129  	// match: (ANDconst [0] _)
  6130  	// cond:
  6131  	// result: (MOVDconst [0])
  6132  	for {
  6133  		if v.AuxInt != 0 {
  6134  			break
  6135  		}
  6136  		v.reset(OpPPC64MOVDconst)
  6137  		v.AuxInt = 0
  6138  		return true
  6139  	}
  6140  	// match: (ANDconst [c] y:(MOVBZreg _))
  6141  	// cond: c&0xFF == 0xFF
  6142  	// result: y
  6143  	for {
  6144  		c := v.AuxInt
  6145  		y := v.Args[0]
  6146  		if y.Op != OpPPC64MOVBZreg {
  6147  			break
  6148  		}
  6149  		if !(c&0xFF == 0xFF) {
  6150  			break
  6151  		}
  6152  		v.reset(OpCopy)
  6153  		v.Type = y.Type
  6154  		v.AddArg(y)
  6155  		return true
  6156  	}
  6157  	// match: (ANDconst [0xFF] y:(MOVBreg _))
  6158  	// cond:
  6159  	// result: y
  6160  	for {
  6161  		if v.AuxInt != 0xFF {
  6162  			break
  6163  		}
  6164  		y := v.Args[0]
  6165  		if y.Op != OpPPC64MOVBreg {
  6166  			break
  6167  		}
  6168  		v.reset(OpCopy)
  6169  		v.Type = y.Type
  6170  		v.AddArg(y)
  6171  		return true
  6172  	}
  6173  	// match: (ANDconst [c] y:(MOVHZreg _))
  6174  	// cond: c&0xFFFF == 0xFFFF
  6175  	// result: y
  6176  	for {
  6177  		c := v.AuxInt
  6178  		y := v.Args[0]
  6179  		if y.Op != OpPPC64MOVHZreg {
  6180  			break
  6181  		}
  6182  		if !(c&0xFFFF == 0xFFFF) {
  6183  			break
  6184  		}
  6185  		v.reset(OpCopy)
  6186  		v.Type = y.Type
  6187  		v.AddArg(y)
  6188  		return true
  6189  	}
  6190  	// match: (ANDconst [0xFFFF] y:(MOVHreg _))
  6191  	// cond:
  6192  	// result: y
  6193  	for {
  6194  		if v.AuxInt != 0xFFFF {
  6195  			break
  6196  		}
  6197  		y := v.Args[0]
  6198  		if y.Op != OpPPC64MOVHreg {
  6199  			break
  6200  		}
  6201  		v.reset(OpCopy)
  6202  		v.Type = y.Type
  6203  		v.AddArg(y)
  6204  		return true
  6205  	}
  6206  	// match: (ANDconst [c] (MOVBreg x))
  6207  	// cond:
  6208  	// result: (ANDconst [c&0xFF] x)
  6209  	for {
  6210  		c := v.AuxInt
  6211  		v_0 := v.Args[0]
  6212  		if v_0.Op != OpPPC64MOVBreg {
  6213  			break
  6214  		}
  6215  		x := v_0.Args[0]
  6216  		v.reset(OpPPC64ANDconst)
  6217  		v.AuxInt = c & 0xFF
  6218  		v.AddArg(x)
  6219  		return true
  6220  	}
  6221  	// match: (ANDconst [c] (MOVBZreg x))
  6222  	// cond:
  6223  	// result: (ANDconst [c&0xFF] x)
  6224  	for {
  6225  		c := v.AuxInt
  6226  		v_0 := v.Args[0]
  6227  		if v_0.Op != OpPPC64MOVBZreg {
  6228  			break
  6229  		}
  6230  		x := v_0.Args[0]
  6231  		v.reset(OpPPC64ANDconst)
  6232  		v.AuxInt = c & 0xFF
  6233  		v.AddArg(x)
  6234  		return true
  6235  	}
  6236  	// match: (ANDconst [c] (MOVHreg x))
  6237  	// cond:
  6238  	// result: (ANDconst [c&0xFFFF] x)
  6239  	for {
  6240  		c := v.AuxInt
  6241  		v_0 := v.Args[0]
  6242  		if v_0.Op != OpPPC64MOVHreg {
  6243  			break
  6244  		}
  6245  		x := v_0.Args[0]
  6246  		v.reset(OpPPC64ANDconst)
  6247  		v.AuxInt = c & 0xFFFF
  6248  		v.AddArg(x)
  6249  		return true
  6250  	}
  6251  	return false
  6252  }
  6253  func rewriteValuePPC64_OpPPC64ANDconst_10(v *Value) bool {
  6254  	// match: (ANDconst [c] (MOVHZreg x))
  6255  	// cond:
  6256  	// result: (ANDconst [c&0xFFFF] x)
  6257  	for {
  6258  		c := v.AuxInt
  6259  		v_0 := v.Args[0]
  6260  		if v_0.Op != OpPPC64MOVHZreg {
  6261  			break
  6262  		}
  6263  		x := v_0.Args[0]
  6264  		v.reset(OpPPC64ANDconst)
  6265  		v.AuxInt = c & 0xFFFF
  6266  		v.AddArg(x)
  6267  		return true
  6268  	}
  6269  	// match: (ANDconst [c] (MOVWreg x))
  6270  	// cond:
  6271  	// result: (ANDconst [c&0xFFFFFFFF] x)
  6272  	for {
  6273  		c := v.AuxInt
  6274  		v_0 := v.Args[0]
  6275  		if v_0.Op != OpPPC64MOVWreg {
  6276  			break
  6277  		}
  6278  		x := v_0.Args[0]
  6279  		v.reset(OpPPC64ANDconst)
  6280  		v.AuxInt = c & 0xFFFFFFFF
  6281  		v.AddArg(x)
  6282  		return true
  6283  	}
  6284  	// match: (ANDconst [c] (MOVWZreg x))
  6285  	// cond:
  6286  	// result: (ANDconst [c&0xFFFFFFFF] x)
  6287  	for {
  6288  		c := v.AuxInt
  6289  		v_0 := v.Args[0]
  6290  		if v_0.Op != OpPPC64MOVWZreg {
  6291  			break
  6292  		}
  6293  		x := v_0.Args[0]
  6294  		v.reset(OpPPC64ANDconst)
  6295  		v.AuxInt = c & 0xFFFFFFFF
  6296  		v.AddArg(x)
  6297  		return true
  6298  	}
  6299  	return false
  6300  }
  6301  func rewriteValuePPC64_OpPPC64CMP_0(v *Value) bool {
  6302  	b := v.Block
  6303  	_ = b
  6304  	// match: (CMP x (MOVDconst [c]))
  6305  	// cond: is16Bit(c)
  6306  	// result: (CMPconst x [c])
  6307  	for {
  6308  		_ = v.Args[1]
  6309  		x := v.Args[0]
  6310  		v_1 := v.Args[1]
  6311  		if v_1.Op != OpPPC64MOVDconst {
  6312  			break
  6313  		}
  6314  		c := v_1.AuxInt
  6315  		if !(is16Bit(c)) {
  6316  			break
  6317  		}
  6318  		v.reset(OpPPC64CMPconst)
  6319  		v.AuxInt = c
  6320  		v.AddArg(x)
  6321  		return true
  6322  	}
  6323  	// match: (CMP (MOVDconst [c]) y)
  6324  	// cond: is16Bit(c)
  6325  	// result: (InvertFlags (CMPconst y [c]))
  6326  	for {
  6327  		_ = v.Args[1]
  6328  		v_0 := v.Args[0]
  6329  		if v_0.Op != OpPPC64MOVDconst {
  6330  			break
  6331  		}
  6332  		c := v_0.AuxInt
  6333  		y := v.Args[1]
  6334  		if !(is16Bit(c)) {
  6335  			break
  6336  		}
  6337  		v.reset(OpPPC64InvertFlags)
  6338  		v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, types.TypeFlags)
  6339  		v0.AuxInt = c
  6340  		v0.AddArg(y)
  6341  		v.AddArg(v0)
  6342  		return true
  6343  	}
  6344  	return false
  6345  }
  6346  func rewriteValuePPC64_OpPPC64CMPU_0(v *Value) bool {
  6347  	b := v.Block
  6348  	_ = b
  6349  	// match: (CMPU x (MOVDconst [c]))
  6350  	// cond: isU16Bit(c)
  6351  	// result: (CMPUconst x [c])
  6352  	for {
  6353  		_ = v.Args[1]
  6354  		x := v.Args[0]
  6355  		v_1 := v.Args[1]
  6356  		if v_1.Op != OpPPC64MOVDconst {
  6357  			break
  6358  		}
  6359  		c := v_1.AuxInt
  6360  		if !(isU16Bit(c)) {
  6361  			break
  6362  		}
  6363  		v.reset(OpPPC64CMPUconst)
  6364  		v.AuxInt = c
  6365  		v.AddArg(x)
  6366  		return true
  6367  	}
  6368  	// match: (CMPU (MOVDconst [c]) y)
  6369  	// cond: isU16Bit(c)
  6370  	// result: (InvertFlags (CMPUconst y [c]))
  6371  	for {
  6372  		_ = v.Args[1]
  6373  		v_0 := v.Args[0]
  6374  		if v_0.Op != OpPPC64MOVDconst {
  6375  			break
  6376  		}
  6377  		c := v_0.AuxInt
  6378  		y := v.Args[1]
  6379  		if !(isU16Bit(c)) {
  6380  			break
  6381  		}
  6382  		v.reset(OpPPC64InvertFlags)
  6383  		v0 := b.NewValue0(v.Pos, OpPPC64CMPUconst, types.TypeFlags)
  6384  		v0.AuxInt = c
  6385  		v0.AddArg(y)
  6386  		v.AddArg(v0)
  6387  		return true
  6388  	}
  6389  	return false
  6390  }
  6391  func rewriteValuePPC64_OpPPC64CMPUconst_0(v *Value) bool {
  6392  	// match: (CMPUconst (MOVDconst [x]) [y])
  6393  	// cond: x==y
  6394  	// result: (FlagEQ)
  6395  	for {
  6396  		y := v.AuxInt
  6397  		v_0 := v.Args[0]
  6398  		if v_0.Op != OpPPC64MOVDconst {
  6399  			break
  6400  		}
  6401  		x := v_0.AuxInt
  6402  		if !(x == y) {
  6403  			break
  6404  		}
  6405  		v.reset(OpPPC64FlagEQ)
  6406  		return true
  6407  	}
  6408  	// match: (CMPUconst (MOVDconst [x]) [y])
  6409  	// cond: uint64(x)<uint64(y)
  6410  	// result: (FlagLT)
  6411  	for {
  6412  		y := v.AuxInt
  6413  		v_0 := v.Args[0]
  6414  		if v_0.Op != OpPPC64MOVDconst {
  6415  			break
  6416  		}
  6417  		x := v_0.AuxInt
  6418  		if !(uint64(x) < uint64(y)) {
  6419  			break
  6420  		}
  6421  		v.reset(OpPPC64FlagLT)
  6422  		return true
  6423  	}
  6424  	// match: (CMPUconst (MOVDconst [x]) [y])
  6425  	// cond: uint64(x)>uint64(y)
  6426  	// result: (FlagGT)
  6427  	for {
  6428  		y := v.AuxInt
  6429  		v_0 := v.Args[0]
  6430  		if v_0.Op != OpPPC64MOVDconst {
  6431  			break
  6432  		}
  6433  		x := v_0.AuxInt
  6434  		if !(uint64(x) > uint64(y)) {
  6435  			break
  6436  		}
  6437  		v.reset(OpPPC64FlagGT)
  6438  		return true
  6439  	}
  6440  	return false
  6441  }
  6442  func rewriteValuePPC64_OpPPC64CMPW_0(v *Value) bool {
  6443  	b := v.Block
  6444  	_ = b
  6445  	// match: (CMPW x (MOVWreg y))
  6446  	// cond:
  6447  	// result: (CMPW x y)
  6448  	for {
  6449  		_ = v.Args[1]
  6450  		x := v.Args[0]
  6451  		v_1 := v.Args[1]
  6452  		if v_1.Op != OpPPC64MOVWreg {
  6453  			break
  6454  		}
  6455  		y := v_1.Args[0]
  6456  		v.reset(OpPPC64CMPW)
  6457  		v.AddArg(x)
  6458  		v.AddArg(y)
  6459  		return true
  6460  	}
  6461  	// match: (CMPW (MOVWreg x) y)
  6462  	// cond:
  6463  	// result: (CMPW x y)
  6464  	for {
  6465  		_ = v.Args[1]
  6466  		v_0 := v.Args[0]
  6467  		if v_0.Op != OpPPC64MOVWreg {
  6468  			break
  6469  		}
  6470  		x := v_0.Args[0]
  6471  		y := v.Args[1]
  6472  		v.reset(OpPPC64CMPW)
  6473  		v.AddArg(x)
  6474  		v.AddArg(y)
  6475  		return true
  6476  	}
  6477  	// match: (CMPW x (MOVDconst [c]))
  6478  	// cond: is16Bit(c)
  6479  	// result: (CMPWconst x [c])
  6480  	for {
  6481  		_ = v.Args[1]
  6482  		x := v.Args[0]
  6483  		v_1 := v.Args[1]
  6484  		if v_1.Op != OpPPC64MOVDconst {
  6485  			break
  6486  		}
  6487  		c := v_1.AuxInt
  6488  		if !(is16Bit(c)) {
  6489  			break
  6490  		}
  6491  		v.reset(OpPPC64CMPWconst)
  6492  		v.AuxInt = c
  6493  		v.AddArg(x)
  6494  		return true
  6495  	}
  6496  	// match: (CMPW (MOVDconst [c]) y)
  6497  	// cond: is16Bit(c)
  6498  	// result: (InvertFlags (CMPWconst y [c]))
  6499  	for {
  6500  		_ = v.Args[1]
  6501  		v_0 := v.Args[0]
  6502  		if v_0.Op != OpPPC64MOVDconst {
  6503  			break
  6504  		}
  6505  		c := v_0.AuxInt
  6506  		y := v.Args[1]
  6507  		if !(is16Bit(c)) {
  6508  			break
  6509  		}
  6510  		v.reset(OpPPC64InvertFlags)
  6511  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
  6512  		v0.AuxInt = c
  6513  		v0.AddArg(y)
  6514  		v.AddArg(v0)
  6515  		return true
  6516  	}
  6517  	return false
  6518  }
  6519  func rewriteValuePPC64_OpPPC64CMPWU_0(v *Value) bool {
  6520  	b := v.Block
  6521  	_ = b
  6522  	// match: (CMPWU x (MOVWZreg y))
  6523  	// cond:
  6524  	// result: (CMPWU x y)
  6525  	for {
  6526  		_ = v.Args[1]
  6527  		x := v.Args[0]
  6528  		v_1 := v.Args[1]
  6529  		if v_1.Op != OpPPC64MOVWZreg {
  6530  			break
  6531  		}
  6532  		y := v_1.Args[0]
  6533  		v.reset(OpPPC64CMPWU)
  6534  		v.AddArg(x)
  6535  		v.AddArg(y)
  6536  		return true
  6537  	}
  6538  	// match: (CMPWU (MOVWZreg x) y)
  6539  	// cond:
  6540  	// result: (CMPWU x y)
  6541  	for {
  6542  		_ = v.Args[1]
  6543  		v_0 := v.Args[0]
  6544  		if v_0.Op != OpPPC64MOVWZreg {
  6545  			break
  6546  		}
  6547  		x := v_0.Args[0]
  6548  		y := v.Args[1]
  6549  		v.reset(OpPPC64CMPWU)
  6550  		v.AddArg(x)
  6551  		v.AddArg(y)
  6552  		return true
  6553  	}
  6554  	// match: (CMPWU x (MOVDconst [c]))
  6555  	// cond: isU16Bit(c)
  6556  	// result: (CMPWUconst x [c])
  6557  	for {
  6558  		_ = v.Args[1]
  6559  		x := v.Args[0]
  6560  		v_1 := v.Args[1]
  6561  		if v_1.Op != OpPPC64MOVDconst {
  6562  			break
  6563  		}
  6564  		c := v_1.AuxInt
  6565  		if !(isU16Bit(c)) {
  6566  			break
  6567  		}
  6568  		v.reset(OpPPC64CMPWUconst)
  6569  		v.AuxInt = c
  6570  		v.AddArg(x)
  6571  		return true
  6572  	}
  6573  	// match: (CMPWU (MOVDconst [c]) y)
  6574  	// cond: isU16Bit(c)
  6575  	// result: (InvertFlags (CMPWUconst y [c]))
  6576  	for {
  6577  		_ = v.Args[1]
  6578  		v_0 := v.Args[0]
  6579  		if v_0.Op != OpPPC64MOVDconst {
  6580  			break
  6581  		}
  6582  		c := v_0.AuxInt
  6583  		y := v.Args[1]
  6584  		if !(isU16Bit(c)) {
  6585  			break
  6586  		}
  6587  		v.reset(OpPPC64InvertFlags)
  6588  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWUconst, types.TypeFlags)
  6589  		v0.AuxInt = c
  6590  		v0.AddArg(y)
  6591  		v.AddArg(v0)
  6592  		return true
  6593  	}
  6594  	return false
  6595  }
  6596  func rewriteValuePPC64_OpPPC64CMPWUconst_0(v *Value) bool {
  6597  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6598  	// cond: int32(x)==int32(y)
  6599  	// result: (FlagEQ)
  6600  	for {
  6601  		y := v.AuxInt
  6602  		v_0 := v.Args[0]
  6603  		if v_0.Op != OpPPC64MOVDconst {
  6604  			break
  6605  		}
  6606  		x := v_0.AuxInt
  6607  		if !(int32(x) == int32(y)) {
  6608  			break
  6609  		}
  6610  		v.reset(OpPPC64FlagEQ)
  6611  		return true
  6612  	}
  6613  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6614  	// cond: uint32(x)<uint32(y)
  6615  	// result: (FlagLT)
  6616  	for {
  6617  		y := v.AuxInt
  6618  		v_0 := v.Args[0]
  6619  		if v_0.Op != OpPPC64MOVDconst {
  6620  			break
  6621  		}
  6622  		x := v_0.AuxInt
  6623  		if !(uint32(x) < uint32(y)) {
  6624  			break
  6625  		}
  6626  		v.reset(OpPPC64FlagLT)
  6627  		return true
  6628  	}
  6629  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6630  	// cond: uint32(x)>uint32(y)
  6631  	// result: (FlagGT)
  6632  	for {
  6633  		y := v.AuxInt
  6634  		v_0 := v.Args[0]
  6635  		if v_0.Op != OpPPC64MOVDconst {
  6636  			break
  6637  		}
  6638  		x := v_0.AuxInt
  6639  		if !(uint32(x) > uint32(y)) {
  6640  			break
  6641  		}
  6642  		v.reset(OpPPC64FlagGT)
  6643  		return true
  6644  	}
  6645  	return false
  6646  }
  6647  func rewriteValuePPC64_OpPPC64CMPWconst_0(v *Value) bool {
  6648  	// match: (CMPWconst (MOVDconst [x]) [y])
  6649  	// cond: int32(x)==int32(y)
  6650  	// result: (FlagEQ)
  6651  	for {
  6652  		y := v.AuxInt
  6653  		v_0 := v.Args[0]
  6654  		if v_0.Op != OpPPC64MOVDconst {
  6655  			break
  6656  		}
  6657  		x := v_0.AuxInt
  6658  		if !(int32(x) == int32(y)) {
  6659  			break
  6660  		}
  6661  		v.reset(OpPPC64FlagEQ)
  6662  		return true
  6663  	}
  6664  	// match: (CMPWconst (MOVDconst [x]) [y])
  6665  	// cond: int32(x)<int32(y)
  6666  	// result: (FlagLT)
  6667  	for {
  6668  		y := v.AuxInt
  6669  		v_0 := v.Args[0]
  6670  		if v_0.Op != OpPPC64MOVDconst {
  6671  			break
  6672  		}
  6673  		x := v_0.AuxInt
  6674  		if !(int32(x) < int32(y)) {
  6675  			break
  6676  		}
  6677  		v.reset(OpPPC64FlagLT)
  6678  		return true
  6679  	}
  6680  	// match: (CMPWconst (MOVDconst [x]) [y])
  6681  	// cond: int32(x)>int32(y)
  6682  	// result: (FlagGT)
  6683  	for {
  6684  		y := v.AuxInt
  6685  		v_0 := v.Args[0]
  6686  		if v_0.Op != OpPPC64MOVDconst {
  6687  			break
  6688  		}
  6689  		x := v_0.AuxInt
  6690  		if !(int32(x) > int32(y)) {
  6691  			break
  6692  		}
  6693  		v.reset(OpPPC64FlagGT)
  6694  		return true
  6695  	}
  6696  	return false
  6697  }
  6698  func rewriteValuePPC64_OpPPC64CMPconst_0(v *Value) bool {
  6699  	// match: (CMPconst (MOVDconst [x]) [y])
  6700  	// cond: x==y
  6701  	// result: (FlagEQ)
  6702  	for {
  6703  		y := v.AuxInt
  6704  		v_0 := v.Args[0]
  6705  		if v_0.Op != OpPPC64MOVDconst {
  6706  			break
  6707  		}
  6708  		x := v_0.AuxInt
  6709  		if !(x == y) {
  6710  			break
  6711  		}
  6712  		v.reset(OpPPC64FlagEQ)
  6713  		return true
  6714  	}
  6715  	// match: (CMPconst (MOVDconst [x]) [y])
  6716  	// cond: x<y
  6717  	// result: (FlagLT)
  6718  	for {
  6719  		y := v.AuxInt
  6720  		v_0 := v.Args[0]
  6721  		if v_0.Op != OpPPC64MOVDconst {
  6722  			break
  6723  		}
  6724  		x := v_0.AuxInt
  6725  		if !(x < y) {
  6726  			break
  6727  		}
  6728  		v.reset(OpPPC64FlagLT)
  6729  		return true
  6730  	}
  6731  	// match: (CMPconst (MOVDconst [x]) [y])
  6732  	// cond: x>y
  6733  	// result: (FlagGT)
  6734  	for {
  6735  		y := v.AuxInt
  6736  		v_0 := v.Args[0]
  6737  		if v_0.Op != OpPPC64MOVDconst {
  6738  			break
  6739  		}
  6740  		x := v_0.AuxInt
  6741  		if !(x > y) {
  6742  			break
  6743  		}
  6744  		v.reset(OpPPC64FlagGT)
  6745  		return true
  6746  	}
  6747  	return false
  6748  }
  6749  func rewriteValuePPC64_OpPPC64Equal_0(v *Value) bool {
  6750  	// match: (Equal (FlagEQ))
  6751  	// cond:
  6752  	// result: (MOVDconst [1])
  6753  	for {
  6754  		v_0 := v.Args[0]
  6755  		if v_0.Op != OpPPC64FlagEQ {
  6756  			break
  6757  		}
  6758  		v.reset(OpPPC64MOVDconst)
  6759  		v.AuxInt = 1
  6760  		return true
  6761  	}
  6762  	// match: (Equal (FlagLT))
  6763  	// cond:
  6764  	// result: (MOVDconst [0])
  6765  	for {
  6766  		v_0 := v.Args[0]
  6767  		if v_0.Op != OpPPC64FlagLT {
  6768  			break
  6769  		}
  6770  		v.reset(OpPPC64MOVDconst)
  6771  		v.AuxInt = 0
  6772  		return true
  6773  	}
  6774  	// match: (Equal (FlagGT))
  6775  	// cond:
  6776  	// result: (MOVDconst [0])
  6777  	for {
  6778  		v_0 := v.Args[0]
  6779  		if v_0.Op != OpPPC64FlagGT {
  6780  			break
  6781  		}
  6782  		v.reset(OpPPC64MOVDconst)
  6783  		v.AuxInt = 0
  6784  		return true
  6785  	}
  6786  	// match: (Equal (InvertFlags x))
  6787  	// cond:
  6788  	// result: (Equal x)
  6789  	for {
  6790  		v_0 := v.Args[0]
  6791  		if v_0.Op != OpPPC64InvertFlags {
  6792  			break
  6793  		}
  6794  		x := v_0.Args[0]
  6795  		v.reset(OpPPC64Equal)
  6796  		v.AddArg(x)
  6797  		return true
  6798  	}
  6799  	return false
  6800  }
  6801  func rewriteValuePPC64_OpPPC64FABS_0(v *Value) bool {
  6802  	// match: (FABS (FMOVDconst [x]))
  6803  	// cond:
  6804  	// result: (FMOVDconst [auxFrom64F(math.Abs(auxTo64F(x)))])
  6805  	for {
  6806  		v_0 := v.Args[0]
  6807  		if v_0.Op != OpPPC64FMOVDconst {
  6808  			break
  6809  		}
  6810  		x := v_0.AuxInt
  6811  		v.reset(OpPPC64FMOVDconst)
  6812  		v.AuxInt = auxFrom64F(math.Abs(auxTo64F(x)))
  6813  		return true
  6814  	}
  6815  	return false
  6816  }
  6817  func rewriteValuePPC64_OpPPC64FADD_0(v *Value) bool {
  6818  	// match: (FADD (FMUL x y) z)
  6819  	// cond:
  6820  	// result: (FMADD x y z)
  6821  	for {
  6822  		_ = v.Args[1]
  6823  		v_0 := v.Args[0]
  6824  		if v_0.Op != OpPPC64FMUL {
  6825  			break
  6826  		}
  6827  		_ = v_0.Args[1]
  6828  		x := v_0.Args[0]
  6829  		y := v_0.Args[1]
  6830  		z := v.Args[1]
  6831  		v.reset(OpPPC64FMADD)
  6832  		v.AddArg(x)
  6833  		v.AddArg(y)
  6834  		v.AddArg(z)
  6835  		return true
  6836  	}
  6837  	// match: (FADD z (FMUL x y))
  6838  	// cond:
  6839  	// result: (FMADD x y z)
  6840  	for {
  6841  		_ = v.Args[1]
  6842  		z := v.Args[0]
  6843  		v_1 := v.Args[1]
  6844  		if v_1.Op != OpPPC64FMUL {
  6845  			break
  6846  		}
  6847  		_ = v_1.Args[1]
  6848  		x := v_1.Args[0]
  6849  		y := v_1.Args[1]
  6850  		v.reset(OpPPC64FMADD)
  6851  		v.AddArg(x)
  6852  		v.AddArg(y)
  6853  		v.AddArg(z)
  6854  		return true
  6855  	}
  6856  	return false
  6857  }
  6858  func rewriteValuePPC64_OpPPC64FADDS_0(v *Value) bool {
  6859  	// match: (FADDS (FMULS x y) z)
  6860  	// cond:
  6861  	// result: (FMADDS x y z)
  6862  	for {
  6863  		_ = v.Args[1]
  6864  		v_0 := v.Args[0]
  6865  		if v_0.Op != OpPPC64FMULS {
  6866  			break
  6867  		}
  6868  		_ = v_0.Args[1]
  6869  		x := v_0.Args[0]
  6870  		y := v_0.Args[1]
  6871  		z := v.Args[1]
  6872  		v.reset(OpPPC64FMADDS)
  6873  		v.AddArg(x)
  6874  		v.AddArg(y)
  6875  		v.AddArg(z)
  6876  		return true
  6877  	}
  6878  	// match: (FADDS z (FMULS x y))
  6879  	// cond:
  6880  	// result: (FMADDS x y z)
  6881  	for {
  6882  		_ = v.Args[1]
  6883  		z := v.Args[0]
  6884  		v_1 := v.Args[1]
  6885  		if v_1.Op != OpPPC64FMULS {
  6886  			break
  6887  		}
  6888  		_ = v_1.Args[1]
  6889  		x := v_1.Args[0]
  6890  		y := v_1.Args[1]
  6891  		v.reset(OpPPC64FMADDS)
  6892  		v.AddArg(x)
  6893  		v.AddArg(y)
  6894  		v.AddArg(z)
  6895  		return true
  6896  	}
  6897  	return false
  6898  }
  6899  func rewriteValuePPC64_OpPPC64FCEIL_0(v *Value) bool {
  6900  	// match: (FCEIL (FMOVDconst [x]))
  6901  	// cond:
  6902  	// result: (FMOVDconst [auxFrom64F(math.Ceil(auxTo64F(x)))])
  6903  	for {
  6904  		v_0 := v.Args[0]
  6905  		if v_0.Op != OpPPC64FMOVDconst {
  6906  			break
  6907  		}
  6908  		x := v_0.AuxInt
  6909  		v.reset(OpPPC64FMOVDconst)
  6910  		v.AuxInt = auxFrom64F(math.Ceil(auxTo64F(x)))
  6911  		return true
  6912  	}
  6913  	return false
  6914  }
  6915  func rewriteValuePPC64_OpPPC64FFLOOR_0(v *Value) bool {
  6916  	// match: (FFLOOR (FMOVDconst [x]))
  6917  	// cond:
  6918  	// result: (FMOVDconst [auxFrom64F(math.Floor(auxTo64F(x)))])
  6919  	for {
  6920  		v_0 := v.Args[0]
  6921  		if v_0.Op != OpPPC64FMOVDconst {
  6922  			break
  6923  		}
  6924  		x := v_0.AuxInt
  6925  		v.reset(OpPPC64FMOVDconst)
  6926  		v.AuxInt = auxFrom64F(math.Floor(auxTo64F(x)))
  6927  		return true
  6928  	}
  6929  	return false
  6930  }
  6931  func rewriteValuePPC64_OpPPC64FMOVDload_0(v *Value) bool {
  6932  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr x _))
  6933  	// cond:
  6934  	// result: (MTVSRD x)
  6935  	for {
  6936  		off := v.AuxInt
  6937  		sym := v.Aux
  6938  		_ = v.Args[1]
  6939  		ptr := v.Args[0]
  6940  		v_1 := v.Args[1]
  6941  		if v_1.Op != OpPPC64MOVDstore {
  6942  			break
  6943  		}
  6944  		if v_1.AuxInt != off {
  6945  			break
  6946  		}
  6947  		if v_1.Aux != sym {
  6948  			break
  6949  		}
  6950  		_ = v_1.Args[2]
  6951  		if ptr != v_1.Args[0] {
  6952  			break
  6953  		}
  6954  		x := v_1.Args[1]
  6955  		v.reset(OpPPC64MTVSRD)
  6956  		v.AddArg(x)
  6957  		return true
  6958  	}
  6959  	// match: (FMOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  6960  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  6961  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6962  	for {
  6963  		off1 := v.AuxInt
  6964  		sym1 := v.Aux
  6965  		_ = v.Args[1]
  6966  		p := v.Args[0]
  6967  		if p.Op != OpPPC64MOVDaddr {
  6968  			break
  6969  		}
  6970  		off2 := p.AuxInt
  6971  		sym2 := p.Aux
  6972  		ptr := p.Args[0]
  6973  		mem := v.Args[1]
  6974  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  6975  			break
  6976  		}
  6977  		v.reset(OpPPC64FMOVDload)
  6978  		v.AuxInt = off1 + off2
  6979  		v.Aux = mergeSym(sym1, sym2)
  6980  		v.AddArg(ptr)
  6981  		v.AddArg(mem)
  6982  		return true
  6983  	}
  6984  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6985  	// cond: is16Bit(off1+off2)
  6986  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  6987  	for {
  6988  		off1 := v.AuxInt
  6989  		sym := v.Aux
  6990  		_ = v.Args[1]
  6991  		v_0 := v.Args[0]
  6992  		if v_0.Op != OpPPC64ADDconst {
  6993  			break
  6994  		}
  6995  		off2 := v_0.AuxInt
  6996  		ptr := v_0.Args[0]
  6997  		mem := v.Args[1]
  6998  		if !(is16Bit(off1 + off2)) {
  6999  			break
  7000  		}
  7001  		v.reset(OpPPC64FMOVDload)
  7002  		v.AuxInt = off1 + off2
  7003  		v.Aux = sym
  7004  		v.AddArg(ptr)
  7005  		v.AddArg(mem)
  7006  		return true
  7007  	}
  7008  	return false
  7009  }
  7010  func rewriteValuePPC64_OpPPC64FMOVDstore_0(v *Value) bool {
  7011  	// match: (FMOVDstore [off] {sym} ptr (MTVSRD x) mem)
  7012  	// cond:
  7013  	// result: (MOVDstore [off] {sym} ptr x mem)
  7014  	for {
  7015  		off := v.AuxInt
  7016  		sym := v.Aux
  7017  		_ = v.Args[2]
  7018  		ptr := v.Args[0]
  7019  		v_1 := v.Args[1]
  7020  		if v_1.Op != OpPPC64MTVSRD {
  7021  			break
  7022  		}
  7023  		x := v_1.Args[0]
  7024  		mem := v.Args[2]
  7025  		v.reset(OpPPC64MOVDstore)
  7026  		v.AuxInt = off
  7027  		v.Aux = sym
  7028  		v.AddArg(ptr)
  7029  		v.AddArg(x)
  7030  		v.AddArg(mem)
  7031  		return true
  7032  	}
  7033  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7034  	// cond: is16Bit(off1+off2)
  7035  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  7036  	for {
  7037  		off1 := v.AuxInt
  7038  		sym := v.Aux
  7039  		_ = v.Args[2]
  7040  		v_0 := v.Args[0]
  7041  		if v_0.Op != OpPPC64ADDconst {
  7042  			break
  7043  		}
  7044  		off2 := v_0.AuxInt
  7045  		ptr := v_0.Args[0]
  7046  		val := v.Args[1]
  7047  		mem := v.Args[2]
  7048  		if !(is16Bit(off1 + off2)) {
  7049  			break
  7050  		}
  7051  		v.reset(OpPPC64FMOVDstore)
  7052  		v.AuxInt = off1 + off2
  7053  		v.Aux = sym
  7054  		v.AddArg(ptr)
  7055  		v.AddArg(val)
  7056  		v.AddArg(mem)
  7057  		return true
  7058  	}
  7059  	// match: (FMOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  7060  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  7061  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7062  	for {
  7063  		off1 := v.AuxInt
  7064  		sym1 := v.Aux
  7065  		_ = v.Args[2]
  7066  		p := v.Args[0]
  7067  		if p.Op != OpPPC64MOVDaddr {
  7068  			break
  7069  		}
  7070  		off2 := p.AuxInt
  7071  		sym2 := p.Aux
  7072  		ptr := p.Args[0]
  7073  		val := v.Args[1]
  7074  		mem := v.Args[2]
  7075  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  7076  			break
  7077  		}
  7078  		v.reset(OpPPC64FMOVDstore)
  7079  		v.AuxInt = off1 + off2
  7080  		v.Aux = mergeSym(sym1, sym2)
  7081  		v.AddArg(ptr)
  7082  		v.AddArg(val)
  7083  		v.AddArg(mem)
  7084  		return true
  7085  	}
  7086  	return false
  7087  }
  7088  func rewriteValuePPC64_OpPPC64FMOVSload_0(v *Value) bool {
  7089  	// match: (FMOVSload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  7090  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  7091  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7092  	for {
  7093  		off1 := v.AuxInt
  7094  		sym1 := v.Aux
  7095  		_ = v.Args[1]
  7096  		p := v.Args[0]
  7097  		if p.Op != OpPPC64MOVDaddr {
  7098  			break
  7099  		}
  7100  		off2 := p.AuxInt
  7101  		sym2 := p.Aux
  7102  		ptr := p.Args[0]
  7103  		mem := v.Args[1]
  7104  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  7105  			break
  7106  		}
  7107  		v.reset(OpPPC64FMOVSload)
  7108  		v.AuxInt = off1 + off2
  7109  		v.Aux = mergeSym(sym1, sym2)
  7110  		v.AddArg(ptr)
  7111  		v.AddArg(mem)
  7112  		return true
  7113  	}
  7114  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  7115  	// cond: is16Bit(off1+off2)
  7116  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  7117  	for {
  7118  		off1 := v.AuxInt
  7119  		sym := v.Aux
  7120  		_ = v.Args[1]
  7121  		v_0 := v.Args[0]
  7122  		if v_0.Op != OpPPC64ADDconst {
  7123  			break
  7124  		}
  7125  		off2 := v_0.AuxInt
  7126  		ptr := v_0.Args[0]
  7127  		mem := v.Args[1]
  7128  		if !(is16Bit(off1 + off2)) {
  7129  			break
  7130  		}
  7131  		v.reset(OpPPC64FMOVSload)
  7132  		v.AuxInt = off1 + off2
  7133  		v.Aux = sym
  7134  		v.AddArg(ptr)
  7135  		v.AddArg(mem)
  7136  		return true
  7137  	}
  7138  	return false
  7139  }
  7140  func rewriteValuePPC64_OpPPC64FMOVSstore_0(v *Value) bool {
  7141  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7142  	// cond: is16Bit(off1+off2)
  7143  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  7144  	for {
  7145  		off1 := v.AuxInt
  7146  		sym := v.Aux
  7147  		_ = v.Args[2]
  7148  		v_0 := v.Args[0]
  7149  		if v_0.Op != OpPPC64ADDconst {
  7150  			break
  7151  		}
  7152  		off2 := v_0.AuxInt
  7153  		ptr := v_0.Args[0]
  7154  		val := v.Args[1]
  7155  		mem := v.Args[2]
  7156  		if !(is16Bit(off1 + off2)) {
  7157  			break
  7158  		}
  7159  		v.reset(OpPPC64FMOVSstore)
  7160  		v.AuxInt = off1 + off2
  7161  		v.Aux = sym
  7162  		v.AddArg(ptr)
  7163  		v.AddArg(val)
  7164  		v.AddArg(mem)
  7165  		return true
  7166  	}
  7167  	// match: (FMOVSstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  7168  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  7169  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7170  	for {
  7171  		off1 := v.AuxInt
  7172  		sym1 := v.Aux
  7173  		_ = v.Args[2]
  7174  		p := v.Args[0]
  7175  		if p.Op != OpPPC64MOVDaddr {
  7176  			break
  7177  		}
  7178  		off2 := p.AuxInt
  7179  		sym2 := p.Aux
  7180  		ptr := p.Args[0]
  7181  		val := v.Args[1]
  7182  		mem := v.Args[2]
  7183  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  7184  			break
  7185  		}
  7186  		v.reset(OpPPC64FMOVSstore)
  7187  		v.AuxInt = off1 + off2
  7188  		v.Aux = mergeSym(sym1, sym2)
  7189  		v.AddArg(ptr)
  7190  		v.AddArg(val)
  7191  		v.AddArg(mem)
  7192  		return true
  7193  	}
  7194  	return false
  7195  }
  7196  func rewriteValuePPC64_OpPPC64FNEG_0(v *Value) bool {
  7197  	// match: (FNEG (FABS x))
  7198  	// cond:
  7199  	// result: (FNABS x)
  7200  	for {
  7201  		v_0 := v.Args[0]
  7202  		if v_0.Op != OpPPC64FABS {
  7203  			break
  7204  		}
  7205  		x := v_0.Args[0]
  7206  		v.reset(OpPPC64FNABS)
  7207  		v.AddArg(x)
  7208  		return true
  7209  	}
  7210  	// match: (FNEG (FNABS x))
  7211  	// cond:
  7212  	// result: (FABS x)
  7213  	for {
  7214  		v_0 := v.Args[0]
  7215  		if v_0.Op != OpPPC64FNABS {
  7216  			break
  7217  		}
  7218  		x := v_0.Args[0]
  7219  		v.reset(OpPPC64FABS)
  7220  		v.AddArg(x)
  7221  		return true
  7222  	}
  7223  	return false
  7224  }
  7225  func rewriteValuePPC64_OpPPC64FSQRT_0(v *Value) bool {
  7226  	// match: (FSQRT (FMOVDconst [x]))
  7227  	// cond:
  7228  	// result: (FMOVDconst [auxFrom64F(math.Sqrt(auxTo64F(x)))])
  7229  	for {
  7230  		v_0 := v.Args[0]
  7231  		if v_0.Op != OpPPC64FMOVDconst {
  7232  			break
  7233  		}
  7234  		x := v_0.AuxInt
  7235  		v.reset(OpPPC64FMOVDconst)
  7236  		v.AuxInt = auxFrom64F(math.Sqrt(auxTo64F(x)))
  7237  		return true
  7238  	}
  7239  	return false
  7240  }
  7241  func rewriteValuePPC64_OpPPC64FSUB_0(v *Value) bool {
  7242  	// match: (FSUB (FMUL x y) z)
  7243  	// cond:
  7244  	// result: (FMSUB x y z)
  7245  	for {
  7246  		_ = v.Args[1]
  7247  		v_0 := v.Args[0]
  7248  		if v_0.Op != OpPPC64FMUL {
  7249  			break
  7250  		}
  7251  		_ = v_0.Args[1]
  7252  		x := v_0.Args[0]
  7253  		y := v_0.Args[1]
  7254  		z := v.Args[1]
  7255  		v.reset(OpPPC64FMSUB)
  7256  		v.AddArg(x)
  7257  		v.AddArg(y)
  7258  		v.AddArg(z)
  7259  		return true
  7260  	}
  7261  	return false
  7262  }
  7263  func rewriteValuePPC64_OpPPC64FSUBS_0(v *Value) bool {
  7264  	// match: (FSUBS (FMULS x y) z)
  7265  	// cond:
  7266  	// result: (FMSUBS x y z)
  7267  	for {
  7268  		_ = v.Args[1]
  7269  		v_0 := v.Args[0]
  7270  		if v_0.Op != OpPPC64FMULS {
  7271  			break
  7272  		}
  7273  		_ = v_0.Args[1]
  7274  		x := v_0.Args[0]
  7275  		y := v_0.Args[1]
  7276  		z := v.Args[1]
  7277  		v.reset(OpPPC64FMSUBS)
  7278  		v.AddArg(x)
  7279  		v.AddArg(y)
  7280  		v.AddArg(z)
  7281  		return true
  7282  	}
  7283  	return false
  7284  }
  7285  func rewriteValuePPC64_OpPPC64FTRUNC_0(v *Value) bool {
  7286  	// match: (FTRUNC (FMOVDconst [x]))
  7287  	// cond:
  7288  	// result: (FMOVDconst [auxFrom64F(math.Trunc(auxTo64F(x)))])
  7289  	for {
  7290  		v_0 := v.Args[0]
  7291  		if v_0.Op != OpPPC64FMOVDconst {
  7292  			break
  7293  		}
  7294  		x := v_0.AuxInt
  7295  		v.reset(OpPPC64FMOVDconst)
  7296  		v.AuxInt = auxFrom64F(math.Trunc(auxTo64F(x)))
  7297  		return true
  7298  	}
  7299  	return false
  7300  }
  7301  func rewriteValuePPC64_OpPPC64GreaterEqual_0(v *Value) bool {
  7302  	// match: (GreaterEqual (FlagEQ))
  7303  	// cond:
  7304  	// result: (MOVDconst [1])
  7305  	for {
  7306  		v_0 := v.Args[0]
  7307  		if v_0.Op != OpPPC64FlagEQ {
  7308  			break
  7309  		}
  7310  		v.reset(OpPPC64MOVDconst)
  7311  		v.AuxInt = 1
  7312  		return true
  7313  	}
  7314  	// match: (GreaterEqual (FlagLT))
  7315  	// cond:
  7316  	// result: (MOVDconst [0])
  7317  	for {
  7318  		v_0 := v.Args[0]
  7319  		if v_0.Op != OpPPC64FlagLT {
  7320  			break
  7321  		}
  7322  		v.reset(OpPPC64MOVDconst)
  7323  		v.AuxInt = 0
  7324  		return true
  7325  	}
  7326  	// match: (GreaterEqual (FlagGT))
  7327  	// cond:
  7328  	// result: (MOVDconst [1])
  7329  	for {
  7330  		v_0 := v.Args[0]
  7331  		if v_0.Op != OpPPC64FlagGT {
  7332  			break
  7333  		}
  7334  		v.reset(OpPPC64MOVDconst)
  7335  		v.AuxInt = 1
  7336  		return true
  7337  	}
  7338  	// match: (GreaterEqual (InvertFlags x))
  7339  	// cond:
  7340  	// result: (LessEqual x)
  7341  	for {
  7342  		v_0 := v.Args[0]
  7343  		if v_0.Op != OpPPC64InvertFlags {
  7344  			break
  7345  		}
  7346  		x := v_0.Args[0]
  7347  		v.reset(OpPPC64LessEqual)
  7348  		v.AddArg(x)
  7349  		return true
  7350  	}
  7351  	return false
  7352  }
  7353  func rewriteValuePPC64_OpPPC64GreaterThan_0(v *Value) bool {
  7354  	// match: (GreaterThan (FlagEQ))
  7355  	// cond:
  7356  	// result: (MOVDconst [0])
  7357  	for {
  7358  		v_0 := v.Args[0]
  7359  		if v_0.Op != OpPPC64FlagEQ {
  7360  			break
  7361  		}
  7362  		v.reset(OpPPC64MOVDconst)
  7363  		v.AuxInt = 0
  7364  		return true
  7365  	}
  7366  	// match: (GreaterThan (FlagLT))
  7367  	// cond:
  7368  	// result: (MOVDconst [0])
  7369  	for {
  7370  		v_0 := v.Args[0]
  7371  		if v_0.Op != OpPPC64FlagLT {
  7372  			break
  7373  		}
  7374  		v.reset(OpPPC64MOVDconst)
  7375  		v.AuxInt = 0
  7376  		return true
  7377  	}
  7378  	// match: (GreaterThan (FlagGT))
  7379  	// cond:
  7380  	// result: (MOVDconst [1])
  7381  	for {
  7382  		v_0 := v.Args[0]
  7383  		if v_0.Op != OpPPC64FlagGT {
  7384  			break
  7385  		}
  7386  		v.reset(OpPPC64MOVDconst)
  7387  		v.AuxInt = 1
  7388  		return true
  7389  	}
  7390  	// match: (GreaterThan (InvertFlags x))
  7391  	// cond:
  7392  	// result: (LessThan x)
  7393  	for {
  7394  		v_0 := v.Args[0]
  7395  		if v_0.Op != OpPPC64InvertFlags {
  7396  			break
  7397  		}
  7398  		x := v_0.Args[0]
  7399  		v.reset(OpPPC64LessThan)
  7400  		v.AddArg(x)
  7401  		return true
  7402  	}
  7403  	return false
  7404  }
  7405  func rewriteValuePPC64_OpPPC64LessEqual_0(v *Value) bool {
  7406  	// match: (LessEqual (FlagEQ))
  7407  	// cond:
  7408  	// result: (MOVDconst [1])
  7409  	for {
  7410  		v_0 := v.Args[0]
  7411  		if v_0.Op != OpPPC64FlagEQ {
  7412  			break
  7413  		}
  7414  		v.reset(OpPPC64MOVDconst)
  7415  		v.AuxInt = 1
  7416  		return true
  7417  	}
  7418  	// match: (LessEqual (FlagLT))
  7419  	// cond:
  7420  	// result: (MOVDconst [1])
  7421  	for {
  7422  		v_0 := v.Args[0]
  7423  		if v_0.Op != OpPPC64FlagLT {
  7424  			break
  7425  		}
  7426  		v.reset(OpPPC64MOVDconst)
  7427  		v.AuxInt = 1
  7428  		return true
  7429  	}
  7430  	// match: (LessEqual (FlagGT))
  7431  	// cond:
  7432  	// result: (MOVDconst [0])
  7433  	for {
  7434  		v_0 := v.Args[0]
  7435  		if v_0.Op != OpPPC64FlagGT {
  7436  			break
  7437  		}
  7438  		v.reset(OpPPC64MOVDconst)
  7439  		v.AuxInt = 0
  7440  		return true
  7441  	}
  7442  	// match: (LessEqual (InvertFlags x))
  7443  	// cond:
  7444  	// result: (GreaterEqual x)
  7445  	for {
  7446  		v_0 := v.Args[0]
  7447  		if v_0.Op != OpPPC64InvertFlags {
  7448  			break
  7449  		}
  7450  		x := v_0.Args[0]
  7451  		v.reset(OpPPC64GreaterEqual)
  7452  		v.AddArg(x)
  7453  		return true
  7454  	}
  7455  	return false
  7456  }
  7457  func rewriteValuePPC64_OpPPC64LessThan_0(v *Value) bool {
  7458  	// match: (LessThan (FlagEQ))
  7459  	// cond:
  7460  	// result: (MOVDconst [0])
  7461  	for {
  7462  		v_0 := v.Args[0]
  7463  		if v_0.Op != OpPPC64FlagEQ {
  7464  			break
  7465  		}
  7466  		v.reset(OpPPC64MOVDconst)
  7467  		v.AuxInt = 0
  7468  		return true
  7469  	}
  7470  	// match: (LessThan (FlagLT))
  7471  	// cond:
  7472  	// result: (MOVDconst [1])
  7473  	for {
  7474  		v_0 := v.Args[0]
  7475  		if v_0.Op != OpPPC64FlagLT {
  7476  			break
  7477  		}
  7478  		v.reset(OpPPC64MOVDconst)
  7479  		v.AuxInt = 1
  7480  		return true
  7481  	}
  7482  	// match: (LessThan (FlagGT))
  7483  	// cond:
  7484  	// result: (MOVDconst [0])
  7485  	for {
  7486  		v_0 := v.Args[0]
  7487  		if v_0.Op != OpPPC64FlagGT {
  7488  			break
  7489  		}
  7490  		v.reset(OpPPC64MOVDconst)
  7491  		v.AuxInt = 0
  7492  		return true
  7493  	}
  7494  	// match: (LessThan (InvertFlags x))
  7495  	// cond:
  7496  	// result: (GreaterThan x)
  7497  	for {
  7498  		v_0 := v.Args[0]
  7499  		if v_0.Op != OpPPC64InvertFlags {
  7500  			break
  7501  		}
  7502  		x := v_0.Args[0]
  7503  		v.reset(OpPPC64GreaterThan)
  7504  		v.AddArg(x)
  7505  		return true
  7506  	}
  7507  	return false
  7508  }
  7509  func rewriteValuePPC64_OpPPC64MFVSRD_0(v *Value) bool {
  7510  	b := v.Block
  7511  	_ = b
  7512  	typ := &b.Func.Config.Types
  7513  	_ = typ
  7514  	// match: (MFVSRD (FMOVDconst [c]))
  7515  	// cond:
  7516  	// result: (MOVDconst [c])
  7517  	for {
  7518  		v_0 := v.Args[0]
  7519  		if v_0.Op != OpPPC64FMOVDconst {
  7520  			break
  7521  		}
  7522  		c := v_0.AuxInt
  7523  		v.reset(OpPPC64MOVDconst)
  7524  		v.AuxInt = c
  7525  		return true
  7526  	}
  7527  	// match: (MFVSRD x:(FMOVDload [off] {sym} ptr mem))
  7528  	// cond: x.Uses == 1 && clobber(x)
  7529  	// result: @x.Block (MOVDload [off] {sym} ptr mem)
  7530  	for {
  7531  		x := v.Args[0]
  7532  		if x.Op != OpPPC64FMOVDload {
  7533  			break
  7534  		}
  7535  		off := x.AuxInt
  7536  		sym := x.Aux
  7537  		_ = x.Args[1]
  7538  		ptr := x.Args[0]
  7539  		mem := x.Args[1]
  7540  		if !(x.Uses == 1 && clobber(x)) {
  7541  			break
  7542  		}
  7543  		b = x.Block
  7544  		v0 := b.NewValue0(x.Pos, OpPPC64MOVDload, typ.Int64)
  7545  		v.reset(OpCopy)
  7546  		v.AddArg(v0)
  7547  		v0.AuxInt = off
  7548  		v0.Aux = sym
  7549  		v0.AddArg(ptr)
  7550  		v0.AddArg(mem)
  7551  		return true
  7552  	}
  7553  	return false
  7554  }
  7555  func rewriteValuePPC64_OpPPC64MOVBZload_0(v *Value) bool {
  7556  	// match: (MOVBZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  7557  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  7558  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  7559  	for {
  7560  		off1 := v.AuxInt
  7561  		sym1 := v.Aux
  7562  		_ = v.Args[1]
  7563  		p := v.Args[0]
  7564  		if p.Op != OpPPC64MOVDaddr {
  7565  			break
  7566  		}
  7567  		off2 := p.AuxInt
  7568  		sym2 := p.Aux
  7569  		ptr := p.Args[0]
  7570  		mem := v.Args[1]
  7571  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  7572  			break
  7573  		}
  7574  		v.reset(OpPPC64MOVBZload)
  7575  		v.AuxInt = off1 + off2
  7576  		v.Aux = mergeSym(sym1, sym2)
  7577  		v.AddArg(ptr)
  7578  		v.AddArg(mem)
  7579  		return true
  7580  	}
  7581  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] x) mem)
  7582  	// cond: is16Bit(off1+off2)
  7583  	// result: (MOVBZload [off1+off2] {sym} x mem)
  7584  	for {
  7585  		off1 := v.AuxInt
  7586  		sym := v.Aux
  7587  		_ = v.Args[1]
  7588  		v_0 := v.Args[0]
  7589  		if v_0.Op != OpPPC64ADDconst {
  7590  			break
  7591  		}
  7592  		off2 := v_0.AuxInt
  7593  		x := v_0.Args[0]
  7594  		mem := v.Args[1]
  7595  		if !(is16Bit(off1 + off2)) {
  7596  			break
  7597  		}
  7598  		v.reset(OpPPC64MOVBZload)
  7599  		v.AuxInt = off1 + off2
  7600  		v.Aux = sym
  7601  		v.AddArg(x)
  7602  		v.AddArg(mem)
  7603  		return true
  7604  	}
  7605  	// match: (MOVBZload [0] {sym} p:(ADD ptr idx) mem)
  7606  	// cond: sym == nil && p.Uses == 1
  7607  	// result: (MOVBZloadidx ptr idx mem)
  7608  	for {
  7609  		if v.AuxInt != 0 {
  7610  			break
  7611  		}
  7612  		sym := v.Aux
  7613  		_ = v.Args[1]
  7614  		p := v.Args[0]
  7615  		if p.Op != OpPPC64ADD {
  7616  			break
  7617  		}
  7618  		_ = p.Args[1]
  7619  		ptr := p.Args[0]
  7620  		idx := p.Args[1]
  7621  		mem := v.Args[1]
  7622  		if !(sym == nil && p.Uses == 1) {
  7623  			break
  7624  		}
  7625  		v.reset(OpPPC64MOVBZloadidx)
  7626  		v.AddArg(ptr)
  7627  		v.AddArg(idx)
  7628  		v.AddArg(mem)
  7629  		return true
  7630  	}
  7631  	return false
  7632  }
  7633  func rewriteValuePPC64_OpPPC64MOVBZloadidx_0(v *Value) bool {
  7634  	// match: (MOVBZloadidx ptr (MOVDconst [c]) mem)
  7635  	// cond: is16Bit(c)
  7636  	// result: (MOVBZload [c] ptr mem)
  7637  	for {
  7638  		_ = v.Args[2]
  7639  		ptr := v.Args[0]
  7640  		v_1 := v.Args[1]
  7641  		if v_1.Op != OpPPC64MOVDconst {
  7642  			break
  7643  		}
  7644  		c := v_1.AuxInt
  7645  		mem := v.Args[2]
  7646  		if !(is16Bit(c)) {
  7647  			break
  7648  		}
  7649  		v.reset(OpPPC64MOVBZload)
  7650  		v.AuxInt = c
  7651  		v.AddArg(ptr)
  7652  		v.AddArg(mem)
  7653  		return true
  7654  	}
  7655  	// match: (MOVBZloadidx (MOVDconst [c]) ptr mem)
  7656  	// cond: is16Bit(c)
  7657  	// result: (MOVBZload [c] ptr mem)
  7658  	for {
  7659  		_ = v.Args[2]
  7660  		v_0 := v.Args[0]
  7661  		if v_0.Op != OpPPC64MOVDconst {
  7662  			break
  7663  		}
  7664  		c := v_0.AuxInt
  7665  		ptr := v.Args[1]
  7666  		mem := v.Args[2]
  7667  		if !(is16Bit(c)) {
  7668  			break
  7669  		}
  7670  		v.reset(OpPPC64MOVBZload)
  7671  		v.AuxInt = c
  7672  		v.AddArg(ptr)
  7673  		v.AddArg(mem)
  7674  		return true
  7675  	}
  7676  	return false
  7677  }
  7678  func rewriteValuePPC64_OpPPC64MOVBZreg_0(v *Value) bool {
  7679  	b := v.Block
  7680  	_ = b
  7681  	typ := &b.Func.Config.Types
  7682  	_ = typ
  7683  	// match: (MOVBZreg y:(ANDconst [c] _))
  7684  	// cond: uint64(c) <= 0xFF
  7685  	// result: y
  7686  	for {
  7687  		y := v.Args[0]
  7688  		if y.Op != OpPPC64ANDconst {
  7689  			break
  7690  		}
  7691  		c := y.AuxInt
  7692  		if !(uint64(c) <= 0xFF) {
  7693  			break
  7694  		}
  7695  		v.reset(OpCopy)
  7696  		v.Type = y.Type
  7697  		v.AddArg(y)
  7698  		return true
  7699  	}
  7700  	// match: (MOVBZreg (SRWconst [c] (MOVBZreg x)))
  7701  	// cond:
  7702  	// result: (SRWconst [c] (MOVBZreg x))
  7703  	for {
  7704  		v_0 := v.Args[0]
  7705  		if v_0.Op != OpPPC64SRWconst {
  7706  			break
  7707  		}
  7708  		c := v_0.AuxInt
  7709  		v_0_0 := v_0.Args[0]
  7710  		if v_0_0.Op != OpPPC64MOVBZreg {
  7711  			break
  7712  		}
  7713  		x := v_0_0.Args[0]
  7714  		v.reset(OpPPC64SRWconst)
  7715  		v.AuxInt = c
  7716  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  7717  		v0.AddArg(x)
  7718  		v.AddArg(v0)
  7719  		return true
  7720  	}
  7721  	// match: (MOVBZreg (SRWconst [c] x))
  7722  	// cond: sizeof(x.Type) == 8
  7723  	// result: (SRWconst [c] x)
  7724  	for {
  7725  		v_0 := v.Args[0]
  7726  		if v_0.Op != OpPPC64SRWconst {
  7727  			break
  7728  		}
  7729  		c := v_0.AuxInt
  7730  		x := v_0.Args[0]
  7731  		if !(sizeof(x.Type) == 8) {
  7732  			break
  7733  		}
  7734  		v.reset(OpPPC64SRWconst)
  7735  		v.AuxInt = c
  7736  		v.AddArg(x)
  7737  		return true
  7738  	}
  7739  	// match: (MOVBZreg (SRDconst [c] x))
  7740  	// cond: c>=56
  7741  	// result: (SRDconst [c] x)
  7742  	for {
  7743  		v_0 := v.Args[0]
  7744  		if v_0.Op != OpPPC64SRDconst {
  7745  			break
  7746  		}
  7747  		c := v_0.AuxInt
  7748  		x := v_0.Args[0]
  7749  		if !(c >= 56) {
  7750  			break
  7751  		}
  7752  		v.reset(OpPPC64SRDconst)
  7753  		v.AuxInt = c
  7754  		v.AddArg(x)
  7755  		return true
  7756  	}
  7757  	// match: (MOVBZreg (SRWconst [c] x))
  7758  	// cond: c>=24
  7759  	// result: (SRWconst [c] x)
  7760  	for {
  7761  		v_0 := v.Args[0]
  7762  		if v_0.Op != OpPPC64SRWconst {
  7763  			break
  7764  		}
  7765  		c := v_0.AuxInt
  7766  		x := v_0.Args[0]
  7767  		if !(c >= 24) {
  7768  			break
  7769  		}
  7770  		v.reset(OpPPC64SRWconst)
  7771  		v.AuxInt = c
  7772  		v.AddArg(x)
  7773  		return true
  7774  	}
  7775  	// match: (MOVBZreg y:(MOVBZreg _))
  7776  	// cond:
  7777  	// result: y
  7778  	for {
  7779  		y := v.Args[0]
  7780  		if y.Op != OpPPC64MOVBZreg {
  7781  			break
  7782  		}
  7783  		v.reset(OpCopy)
  7784  		v.Type = y.Type
  7785  		v.AddArg(y)
  7786  		return true
  7787  	}
  7788  	// match: (MOVBZreg (MOVBreg x))
  7789  	// cond:
  7790  	// result: (MOVBZreg x)
  7791  	for {
  7792  		v_0 := v.Args[0]
  7793  		if v_0.Op != OpPPC64MOVBreg {
  7794  			break
  7795  		}
  7796  		x := v_0.Args[0]
  7797  		v.reset(OpPPC64MOVBZreg)
  7798  		v.AddArg(x)
  7799  		return true
  7800  	}
  7801  	// match: (MOVBZreg x:(MOVBZload _ _))
  7802  	// cond:
  7803  	// result: x
  7804  	for {
  7805  		x := v.Args[0]
  7806  		if x.Op != OpPPC64MOVBZload {
  7807  			break
  7808  		}
  7809  		_ = x.Args[1]
  7810  		v.reset(OpCopy)
  7811  		v.Type = x.Type
  7812  		v.AddArg(x)
  7813  		return true
  7814  	}
  7815  	// match: (MOVBZreg x:(MOVBZloadidx _ _ _))
  7816  	// cond:
  7817  	// result: x
  7818  	for {
  7819  		x := v.Args[0]
  7820  		if x.Op != OpPPC64MOVBZloadidx {
  7821  			break
  7822  		}
  7823  		_ = x.Args[2]
  7824  		v.reset(OpCopy)
  7825  		v.Type = x.Type
  7826  		v.AddArg(x)
  7827  		return true
  7828  	}
  7829  	// match: (MOVBZreg x:(Arg <t>))
  7830  	// cond: is8BitInt(t) && !isSigned(t)
  7831  	// result: x
  7832  	for {
  7833  		x := v.Args[0]
  7834  		if x.Op != OpArg {
  7835  			break
  7836  		}
  7837  		t := x.Type
  7838  		if !(is8BitInt(t) && !isSigned(t)) {
  7839  			break
  7840  		}
  7841  		v.reset(OpCopy)
  7842  		v.Type = x.Type
  7843  		v.AddArg(x)
  7844  		return true
  7845  	}
  7846  	return false
  7847  }
  7848  func rewriteValuePPC64_OpPPC64MOVBZreg_10(v *Value) bool {
  7849  	// match: (MOVBZreg (MOVDconst [c]))
  7850  	// cond:
  7851  	// result: (MOVDconst [int64(uint8(c))])
  7852  	for {
  7853  		v_0 := v.Args[0]
  7854  		if v_0.Op != OpPPC64MOVDconst {
  7855  			break
  7856  		}
  7857  		c := v_0.AuxInt
  7858  		v.reset(OpPPC64MOVDconst)
  7859  		v.AuxInt = int64(uint8(c))
  7860  		return true
  7861  	}
  7862  	return false
  7863  }
  7864  func rewriteValuePPC64_OpPPC64MOVBreg_0(v *Value) bool {
  7865  	b := v.Block
  7866  	_ = b
  7867  	typ := &b.Func.Config.Types
  7868  	_ = typ
  7869  	// match: (MOVBreg y:(ANDconst [c] _))
  7870  	// cond: uint64(c) <= 0x7F
  7871  	// result: y
  7872  	for {
  7873  		y := v.Args[0]
  7874  		if y.Op != OpPPC64ANDconst {
  7875  			break
  7876  		}
  7877  		c := y.AuxInt
  7878  		if !(uint64(c) <= 0x7F) {
  7879  			break
  7880  		}
  7881  		v.reset(OpCopy)
  7882  		v.Type = y.Type
  7883  		v.AddArg(y)
  7884  		return true
  7885  	}
  7886  	// match: (MOVBreg (SRAWconst [c] (MOVBreg x)))
  7887  	// cond:
  7888  	// result: (SRAWconst [c] (MOVBreg x))
  7889  	for {
  7890  		v_0 := v.Args[0]
  7891  		if v_0.Op != OpPPC64SRAWconst {
  7892  			break
  7893  		}
  7894  		c := v_0.AuxInt
  7895  		v_0_0 := v_0.Args[0]
  7896  		if v_0_0.Op != OpPPC64MOVBreg {
  7897  			break
  7898  		}
  7899  		x := v_0_0.Args[0]
  7900  		v.reset(OpPPC64SRAWconst)
  7901  		v.AuxInt = c
  7902  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
  7903  		v0.AddArg(x)
  7904  		v.AddArg(v0)
  7905  		return true
  7906  	}
  7907  	// match: (MOVBreg (SRAWconst [c] x))
  7908  	// cond: sizeof(x.Type) == 8
  7909  	// result: (SRAWconst [c] x)
  7910  	for {
  7911  		v_0 := v.Args[0]
  7912  		if v_0.Op != OpPPC64SRAWconst {
  7913  			break
  7914  		}
  7915  		c := v_0.AuxInt
  7916  		x := v_0.Args[0]
  7917  		if !(sizeof(x.Type) == 8) {
  7918  			break
  7919  		}
  7920  		v.reset(OpPPC64SRAWconst)
  7921  		v.AuxInt = c
  7922  		v.AddArg(x)
  7923  		return true
  7924  	}
  7925  	// match: (MOVBreg (SRDconst [c] x))
  7926  	// cond: c>56
  7927  	// result: (SRDconst [c] x)
  7928  	for {
  7929  		v_0 := v.Args[0]
  7930  		if v_0.Op != OpPPC64SRDconst {
  7931  			break
  7932  		}
  7933  		c := v_0.AuxInt
  7934  		x := v_0.Args[0]
  7935  		if !(c > 56) {
  7936  			break
  7937  		}
  7938  		v.reset(OpPPC64SRDconst)
  7939  		v.AuxInt = c
  7940  		v.AddArg(x)
  7941  		return true
  7942  	}
  7943  	// match: (MOVBreg (SRDconst [c] x))
  7944  	// cond: c==56
  7945  	// result: (SRADconst [c] x)
  7946  	for {
  7947  		v_0 := v.Args[0]
  7948  		if v_0.Op != OpPPC64SRDconst {
  7949  			break
  7950  		}
  7951  		c := v_0.AuxInt
  7952  		x := v_0.Args[0]
  7953  		if !(c == 56) {
  7954  			break
  7955  		}
  7956  		v.reset(OpPPC64SRADconst)
  7957  		v.AuxInt = c
  7958  		v.AddArg(x)
  7959  		return true
  7960  	}
  7961  	// match: (MOVBreg (SRWconst [c] x))
  7962  	// cond: c>24
  7963  	// result: (SRWconst [c] x)
  7964  	for {
  7965  		v_0 := v.Args[0]
  7966  		if v_0.Op != OpPPC64SRWconst {
  7967  			break
  7968  		}
  7969  		c := v_0.AuxInt
  7970  		x := v_0.Args[0]
  7971  		if !(c > 24) {
  7972  			break
  7973  		}
  7974  		v.reset(OpPPC64SRWconst)
  7975  		v.AuxInt = c
  7976  		v.AddArg(x)
  7977  		return true
  7978  	}
  7979  	// match: (MOVBreg (SRWconst [c] x))
  7980  	// cond: c==24
  7981  	// result: (SRAWconst [c] x)
  7982  	for {
  7983  		v_0 := v.Args[0]
  7984  		if v_0.Op != OpPPC64SRWconst {
  7985  			break
  7986  		}
  7987  		c := v_0.AuxInt
  7988  		x := v_0.Args[0]
  7989  		if !(c == 24) {
  7990  			break
  7991  		}
  7992  		v.reset(OpPPC64SRAWconst)
  7993  		v.AuxInt = c
  7994  		v.AddArg(x)
  7995  		return true
  7996  	}
  7997  	// match: (MOVBreg y:(MOVBreg _))
  7998  	// cond:
  7999  	// result: y
  8000  	for {
  8001  		y := v.Args[0]
  8002  		if y.Op != OpPPC64MOVBreg {
  8003  			break
  8004  		}
  8005  		v.reset(OpCopy)
  8006  		v.Type = y.Type
  8007  		v.AddArg(y)
  8008  		return true
  8009  	}
  8010  	// match: (MOVBreg (MOVBZreg x))
  8011  	// cond:
  8012  	// result: (MOVBreg x)
  8013  	for {
  8014  		v_0 := v.Args[0]
  8015  		if v_0.Op != OpPPC64MOVBZreg {
  8016  			break
  8017  		}
  8018  		x := v_0.Args[0]
  8019  		v.reset(OpPPC64MOVBreg)
  8020  		v.AddArg(x)
  8021  		return true
  8022  	}
  8023  	// match: (MOVBreg x:(Arg <t>))
  8024  	// cond: is8BitInt(t) && isSigned(t)
  8025  	// result: x
  8026  	for {
  8027  		x := v.Args[0]
  8028  		if x.Op != OpArg {
  8029  			break
  8030  		}
  8031  		t := x.Type
  8032  		if !(is8BitInt(t) && isSigned(t)) {
  8033  			break
  8034  		}
  8035  		v.reset(OpCopy)
  8036  		v.Type = x.Type
  8037  		v.AddArg(x)
  8038  		return true
  8039  	}
  8040  	return false
  8041  }
  8042  func rewriteValuePPC64_OpPPC64MOVBreg_10(v *Value) bool {
  8043  	// match: (MOVBreg (MOVDconst [c]))
  8044  	// cond:
  8045  	// result: (MOVDconst [int64(int8(c))])
  8046  	for {
  8047  		v_0 := v.Args[0]
  8048  		if v_0.Op != OpPPC64MOVDconst {
  8049  			break
  8050  		}
  8051  		c := v_0.AuxInt
  8052  		v.reset(OpPPC64MOVDconst)
  8053  		v.AuxInt = int64(int8(c))
  8054  		return true
  8055  	}
  8056  	return false
  8057  }
  8058  func rewriteValuePPC64_OpPPC64MOVBstore_0(v *Value) bool {
  8059  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] x) val mem)
  8060  	// cond: is16Bit(off1+off2)
  8061  	// result: (MOVBstore [off1+off2] {sym} x val mem)
  8062  	for {
  8063  		off1 := v.AuxInt
  8064  		sym := v.Aux
  8065  		_ = v.Args[2]
  8066  		v_0 := v.Args[0]
  8067  		if v_0.Op != OpPPC64ADDconst {
  8068  			break
  8069  		}
  8070  		off2 := v_0.AuxInt
  8071  		x := v_0.Args[0]
  8072  		val := v.Args[1]
  8073  		mem := v.Args[2]
  8074  		if !(is16Bit(off1 + off2)) {
  8075  			break
  8076  		}
  8077  		v.reset(OpPPC64MOVBstore)
  8078  		v.AuxInt = off1 + off2
  8079  		v.Aux = sym
  8080  		v.AddArg(x)
  8081  		v.AddArg(val)
  8082  		v.AddArg(mem)
  8083  		return true
  8084  	}
  8085  	// match: (MOVBstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  8086  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  8087  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8088  	for {
  8089  		off1 := v.AuxInt
  8090  		sym1 := v.Aux
  8091  		_ = v.Args[2]
  8092  		p := v.Args[0]
  8093  		if p.Op != OpPPC64MOVDaddr {
  8094  			break
  8095  		}
  8096  		off2 := p.AuxInt
  8097  		sym2 := p.Aux
  8098  		ptr := p.Args[0]
  8099  		val := v.Args[1]
  8100  		mem := v.Args[2]
  8101  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  8102  			break
  8103  		}
  8104  		v.reset(OpPPC64MOVBstore)
  8105  		v.AuxInt = off1 + off2
  8106  		v.Aux = mergeSym(sym1, sym2)
  8107  		v.AddArg(ptr)
  8108  		v.AddArg(val)
  8109  		v.AddArg(mem)
  8110  		return true
  8111  	}
  8112  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [0]) mem)
  8113  	// cond:
  8114  	// result: (MOVBstorezero [off] {sym} ptr mem)
  8115  	for {
  8116  		off := v.AuxInt
  8117  		sym := v.Aux
  8118  		_ = v.Args[2]
  8119  		ptr := v.Args[0]
  8120  		v_1 := v.Args[1]
  8121  		if v_1.Op != OpPPC64MOVDconst {
  8122  			break
  8123  		}
  8124  		if v_1.AuxInt != 0 {
  8125  			break
  8126  		}
  8127  		mem := v.Args[2]
  8128  		v.reset(OpPPC64MOVBstorezero)
  8129  		v.AuxInt = off
  8130  		v.Aux = sym
  8131  		v.AddArg(ptr)
  8132  		v.AddArg(mem)
  8133  		return true
  8134  	}
  8135  	// match: (MOVBstore [off] {sym} p:(ADD ptr idx) val mem)
  8136  	// cond: off == 0 && sym == nil && p.Uses == 1
  8137  	// result: (MOVBstoreidx ptr idx val mem)
  8138  	for {
  8139  		off := v.AuxInt
  8140  		sym := v.Aux
  8141  		_ = v.Args[2]
  8142  		p := v.Args[0]
  8143  		if p.Op != OpPPC64ADD {
  8144  			break
  8145  		}
  8146  		_ = p.Args[1]
  8147  		ptr := p.Args[0]
  8148  		idx := p.Args[1]
  8149  		val := v.Args[1]
  8150  		mem := v.Args[2]
  8151  		if !(off == 0 && sym == nil && p.Uses == 1) {
  8152  			break
  8153  		}
  8154  		v.reset(OpPPC64MOVBstoreidx)
  8155  		v.AddArg(ptr)
  8156  		v.AddArg(idx)
  8157  		v.AddArg(val)
  8158  		v.AddArg(mem)
  8159  		return true
  8160  	}
  8161  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8162  	// cond:
  8163  	// result: (MOVBstore [off] {sym} ptr x mem)
  8164  	for {
  8165  		off := v.AuxInt
  8166  		sym := v.Aux
  8167  		_ = v.Args[2]
  8168  		ptr := v.Args[0]
  8169  		v_1 := v.Args[1]
  8170  		if v_1.Op != OpPPC64MOVBreg {
  8171  			break
  8172  		}
  8173  		x := v_1.Args[0]
  8174  		mem := v.Args[2]
  8175  		v.reset(OpPPC64MOVBstore)
  8176  		v.AuxInt = off
  8177  		v.Aux = sym
  8178  		v.AddArg(ptr)
  8179  		v.AddArg(x)
  8180  		v.AddArg(mem)
  8181  		return true
  8182  	}
  8183  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8184  	// cond:
  8185  	// result: (MOVBstore [off] {sym} ptr x mem)
  8186  	for {
  8187  		off := v.AuxInt
  8188  		sym := v.Aux
  8189  		_ = v.Args[2]
  8190  		ptr := v.Args[0]
  8191  		v_1 := v.Args[1]
  8192  		if v_1.Op != OpPPC64MOVBZreg {
  8193  			break
  8194  		}
  8195  		x := v_1.Args[0]
  8196  		mem := v.Args[2]
  8197  		v.reset(OpPPC64MOVBstore)
  8198  		v.AuxInt = off
  8199  		v.Aux = sym
  8200  		v.AddArg(ptr)
  8201  		v.AddArg(x)
  8202  		v.AddArg(mem)
  8203  		return true
  8204  	}
  8205  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  8206  	// cond:
  8207  	// result: (MOVBstore [off] {sym} ptr x mem)
  8208  	for {
  8209  		off := v.AuxInt
  8210  		sym := v.Aux
  8211  		_ = v.Args[2]
  8212  		ptr := v.Args[0]
  8213  		v_1 := v.Args[1]
  8214  		if v_1.Op != OpPPC64MOVHreg {
  8215  			break
  8216  		}
  8217  		x := v_1.Args[0]
  8218  		mem := v.Args[2]
  8219  		v.reset(OpPPC64MOVBstore)
  8220  		v.AuxInt = off
  8221  		v.Aux = sym
  8222  		v.AddArg(ptr)
  8223  		v.AddArg(x)
  8224  		v.AddArg(mem)
  8225  		return true
  8226  	}
  8227  	// match: (MOVBstore [off] {sym} ptr (MOVHZreg x) mem)
  8228  	// cond:
  8229  	// result: (MOVBstore [off] {sym} ptr x mem)
  8230  	for {
  8231  		off := v.AuxInt
  8232  		sym := v.Aux
  8233  		_ = v.Args[2]
  8234  		ptr := v.Args[0]
  8235  		v_1 := v.Args[1]
  8236  		if v_1.Op != OpPPC64MOVHZreg {
  8237  			break
  8238  		}
  8239  		x := v_1.Args[0]
  8240  		mem := v.Args[2]
  8241  		v.reset(OpPPC64MOVBstore)
  8242  		v.AuxInt = off
  8243  		v.Aux = sym
  8244  		v.AddArg(ptr)
  8245  		v.AddArg(x)
  8246  		v.AddArg(mem)
  8247  		return true
  8248  	}
  8249  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  8250  	// cond:
  8251  	// result: (MOVBstore [off] {sym} ptr x mem)
  8252  	for {
  8253  		off := v.AuxInt
  8254  		sym := v.Aux
  8255  		_ = v.Args[2]
  8256  		ptr := v.Args[0]
  8257  		v_1 := v.Args[1]
  8258  		if v_1.Op != OpPPC64MOVWreg {
  8259  			break
  8260  		}
  8261  		x := v_1.Args[0]
  8262  		mem := v.Args[2]
  8263  		v.reset(OpPPC64MOVBstore)
  8264  		v.AuxInt = off
  8265  		v.Aux = sym
  8266  		v.AddArg(ptr)
  8267  		v.AddArg(x)
  8268  		v.AddArg(mem)
  8269  		return true
  8270  	}
  8271  	// match: (MOVBstore [off] {sym} ptr (MOVWZreg x) mem)
  8272  	// cond:
  8273  	// result: (MOVBstore [off] {sym} ptr x mem)
  8274  	for {
  8275  		off := v.AuxInt
  8276  		sym := v.Aux
  8277  		_ = v.Args[2]
  8278  		ptr := v.Args[0]
  8279  		v_1 := v.Args[1]
  8280  		if v_1.Op != OpPPC64MOVWZreg {
  8281  			break
  8282  		}
  8283  		x := v_1.Args[0]
  8284  		mem := v.Args[2]
  8285  		v.reset(OpPPC64MOVBstore)
  8286  		v.AuxInt = off
  8287  		v.Aux = sym
  8288  		v.AddArg(ptr)
  8289  		v.AddArg(x)
  8290  		v.AddArg(mem)
  8291  		return true
  8292  	}
  8293  	return false
  8294  }
  8295  func rewriteValuePPC64_OpPPC64MOVBstore_10(v *Value) bool {
  8296  	b := v.Block
  8297  	_ = b
  8298  	config := b.Func.Config
  8299  	_ = config
  8300  	typ := &b.Func.Config.Types
  8301  	_ = typ
  8302  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHreg x) [c]) mem)
  8303  	// cond: c <= 8
  8304  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8305  	for {
  8306  		off := v.AuxInt
  8307  		sym := v.Aux
  8308  		_ = v.Args[2]
  8309  		ptr := v.Args[0]
  8310  		v_1 := v.Args[1]
  8311  		if v_1.Op != OpPPC64SRWconst {
  8312  			break
  8313  		}
  8314  		c := v_1.AuxInt
  8315  		v_1_0 := v_1.Args[0]
  8316  		if v_1_0.Op != OpPPC64MOVHreg {
  8317  			break
  8318  		}
  8319  		x := v_1_0.Args[0]
  8320  		mem := v.Args[2]
  8321  		if !(c <= 8) {
  8322  			break
  8323  		}
  8324  		v.reset(OpPPC64MOVBstore)
  8325  		v.AuxInt = off
  8326  		v.Aux = sym
  8327  		v.AddArg(ptr)
  8328  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8329  		v0.AuxInt = c
  8330  		v0.AddArg(x)
  8331  		v.AddArg(v0)
  8332  		v.AddArg(mem)
  8333  		return true
  8334  	}
  8335  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHZreg x) [c]) mem)
  8336  	// cond: c <= 8
  8337  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8338  	for {
  8339  		off := v.AuxInt
  8340  		sym := v.Aux
  8341  		_ = v.Args[2]
  8342  		ptr := v.Args[0]
  8343  		v_1 := v.Args[1]
  8344  		if v_1.Op != OpPPC64SRWconst {
  8345  			break
  8346  		}
  8347  		c := v_1.AuxInt
  8348  		v_1_0 := v_1.Args[0]
  8349  		if v_1_0.Op != OpPPC64MOVHZreg {
  8350  			break
  8351  		}
  8352  		x := v_1_0.Args[0]
  8353  		mem := v.Args[2]
  8354  		if !(c <= 8) {
  8355  			break
  8356  		}
  8357  		v.reset(OpPPC64MOVBstore)
  8358  		v.AuxInt = off
  8359  		v.Aux = sym
  8360  		v.AddArg(ptr)
  8361  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8362  		v0.AuxInt = c
  8363  		v0.AddArg(x)
  8364  		v.AddArg(v0)
  8365  		v.AddArg(mem)
  8366  		return true
  8367  	}
  8368  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWreg x) [c]) mem)
  8369  	// cond: c <= 24
  8370  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8371  	for {
  8372  		off := v.AuxInt
  8373  		sym := v.Aux
  8374  		_ = v.Args[2]
  8375  		ptr := v.Args[0]
  8376  		v_1 := v.Args[1]
  8377  		if v_1.Op != OpPPC64SRWconst {
  8378  			break
  8379  		}
  8380  		c := v_1.AuxInt
  8381  		v_1_0 := v_1.Args[0]
  8382  		if v_1_0.Op != OpPPC64MOVWreg {
  8383  			break
  8384  		}
  8385  		x := v_1_0.Args[0]
  8386  		mem := v.Args[2]
  8387  		if !(c <= 24) {
  8388  			break
  8389  		}
  8390  		v.reset(OpPPC64MOVBstore)
  8391  		v.AuxInt = off
  8392  		v.Aux = sym
  8393  		v.AddArg(ptr)
  8394  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8395  		v0.AuxInt = c
  8396  		v0.AddArg(x)
  8397  		v.AddArg(v0)
  8398  		v.AddArg(mem)
  8399  		return true
  8400  	}
  8401  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWZreg x) [c]) mem)
  8402  	// cond: c <= 24
  8403  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8404  	for {
  8405  		off := v.AuxInt
  8406  		sym := v.Aux
  8407  		_ = v.Args[2]
  8408  		ptr := v.Args[0]
  8409  		v_1 := v.Args[1]
  8410  		if v_1.Op != OpPPC64SRWconst {
  8411  			break
  8412  		}
  8413  		c := v_1.AuxInt
  8414  		v_1_0 := v_1.Args[0]
  8415  		if v_1_0.Op != OpPPC64MOVWZreg {
  8416  			break
  8417  		}
  8418  		x := v_1_0.Args[0]
  8419  		mem := v.Args[2]
  8420  		if !(c <= 24) {
  8421  			break
  8422  		}
  8423  		v.reset(OpPPC64MOVBstore)
  8424  		v.AuxInt = off
  8425  		v.Aux = sym
  8426  		v.AddArg(ptr)
  8427  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8428  		v0.AuxInt = c
  8429  		v0.AddArg(x)
  8430  		v.AddArg(v0)
  8431  		v.AddArg(mem)
  8432  		return true
  8433  	}
  8434  	// match: (MOVBstore [i1] {s} p (SRWconst w [24]) x0:(MOVBstore [i0] {s} p (SRWconst w [16]) mem))
  8435  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8436  	// result: (MOVHstore [i0] {s} p (SRWconst <typ.UInt16> w [16]) mem)
  8437  	for {
  8438  		i1 := v.AuxInt
  8439  		s := v.Aux
  8440  		_ = v.Args[2]
  8441  		p := v.Args[0]
  8442  		v_1 := v.Args[1]
  8443  		if v_1.Op != OpPPC64SRWconst {
  8444  			break
  8445  		}
  8446  		if v_1.AuxInt != 24 {
  8447  			break
  8448  		}
  8449  		w := v_1.Args[0]
  8450  		x0 := v.Args[2]
  8451  		if x0.Op != OpPPC64MOVBstore {
  8452  			break
  8453  		}
  8454  		i0 := x0.AuxInt
  8455  		if x0.Aux != s {
  8456  			break
  8457  		}
  8458  		_ = x0.Args[2]
  8459  		if p != x0.Args[0] {
  8460  			break
  8461  		}
  8462  		x0_1 := x0.Args[1]
  8463  		if x0_1.Op != OpPPC64SRWconst {
  8464  			break
  8465  		}
  8466  		if x0_1.AuxInt != 16 {
  8467  			break
  8468  		}
  8469  		if w != x0_1.Args[0] {
  8470  			break
  8471  		}
  8472  		mem := x0.Args[2]
  8473  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8474  			break
  8475  		}
  8476  		v.reset(OpPPC64MOVHstore)
  8477  		v.AuxInt = i0
  8478  		v.Aux = s
  8479  		v.AddArg(p)
  8480  		v0 := b.NewValue0(x0.Pos, OpPPC64SRWconst, typ.UInt16)
  8481  		v0.AuxInt = 16
  8482  		v0.AddArg(w)
  8483  		v.AddArg(v0)
  8484  		v.AddArg(mem)
  8485  		return true
  8486  	}
  8487  	// match: (MOVBstore [i1] {s} p (SRDconst w [24]) x0:(MOVBstore [i0] {s} p (SRDconst w [16]) mem))
  8488  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8489  	// result: (MOVHstore [i0] {s} p (SRWconst <typ.UInt16> w [16]) mem)
  8490  	for {
  8491  		i1 := v.AuxInt
  8492  		s := v.Aux
  8493  		_ = v.Args[2]
  8494  		p := v.Args[0]
  8495  		v_1 := v.Args[1]
  8496  		if v_1.Op != OpPPC64SRDconst {
  8497  			break
  8498  		}
  8499  		if v_1.AuxInt != 24 {
  8500  			break
  8501  		}
  8502  		w := v_1.Args[0]
  8503  		x0 := v.Args[2]
  8504  		if x0.Op != OpPPC64MOVBstore {
  8505  			break
  8506  		}
  8507  		i0 := x0.AuxInt
  8508  		if x0.Aux != s {
  8509  			break
  8510  		}
  8511  		_ = x0.Args[2]
  8512  		if p != x0.Args[0] {
  8513  			break
  8514  		}
  8515  		x0_1 := x0.Args[1]
  8516  		if x0_1.Op != OpPPC64SRDconst {
  8517  			break
  8518  		}
  8519  		if x0_1.AuxInt != 16 {
  8520  			break
  8521  		}
  8522  		if w != x0_1.Args[0] {
  8523  			break
  8524  		}
  8525  		mem := x0.Args[2]
  8526  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8527  			break
  8528  		}
  8529  		v.reset(OpPPC64MOVHstore)
  8530  		v.AuxInt = i0
  8531  		v.Aux = s
  8532  		v.AddArg(p)
  8533  		v0 := b.NewValue0(x0.Pos, OpPPC64SRWconst, typ.UInt16)
  8534  		v0.AuxInt = 16
  8535  		v0.AddArg(w)
  8536  		v.AddArg(v0)
  8537  		v.AddArg(mem)
  8538  		return true
  8539  	}
  8540  	// match: (MOVBstore [i1] {s} p (SRWconst w [8]) x0:(MOVBstore [i0] {s} p w mem))
  8541  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8542  	// result: (MOVHstore [i0] {s} p w mem)
  8543  	for {
  8544  		i1 := v.AuxInt
  8545  		s := v.Aux
  8546  		_ = v.Args[2]
  8547  		p := v.Args[0]
  8548  		v_1 := v.Args[1]
  8549  		if v_1.Op != OpPPC64SRWconst {
  8550  			break
  8551  		}
  8552  		if v_1.AuxInt != 8 {
  8553  			break
  8554  		}
  8555  		w := v_1.Args[0]
  8556  		x0 := v.Args[2]
  8557  		if x0.Op != OpPPC64MOVBstore {
  8558  			break
  8559  		}
  8560  		i0 := x0.AuxInt
  8561  		if x0.Aux != s {
  8562  			break
  8563  		}
  8564  		_ = x0.Args[2]
  8565  		if p != x0.Args[0] {
  8566  			break
  8567  		}
  8568  		if w != x0.Args[1] {
  8569  			break
  8570  		}
  8571  		mem := x0.Args[2]
  8572  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8573  			break
  8574  		}
  8575  		v.reset(OpPPC64MOVHstore)
  8576  		v.AuxInt = i0
  8577  		v.Aux = s
  8578  		v.AddArg(p)
  8579  		v.AddArg(w)
  8580  		v.AddArg(mem)
  8581  		return true
  8582  	}
  8583  	// match: (MOVBstore [i1] {s} p (SRDconst w [8]) x0:(MOVBstore [i0] {s} p w mem))
  8584  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8585  	// result: (MOVHstore [i0] {s} p w mem)
  8586  	for {
  8587  		i1 := v.AuxInt
  8588  		s := v.Aux
  8589  		_ = v.Args[2]
  8590  		p := v.Args[0]
  8591  		v_1 := v.Args[1]
  8592  		if v_1.Op != OpPPC64SRDconst {
  8593  			break
  8594  		}
  8595  		if v_1.AuxInt != 8 {
  8596  			break
  8597  		}
  8598  		w := v_1.Args[0]
  8599  		x0 := v.Args[2]
  8600  		if x0.Op != OpPPC64MOVBstore {
  8601  			break
  8602  		}
  8603  		i0 := x0.AuxInt
  8604  		if x0.Aux != s {
  8605  			break
  8606  		}
  8607  		_ = x0.Args[2]
  8608  		if p != x0.Args[0] {
  8609  			break
  8610  		}
  8611  		if w != x0.Args[1] {
  8612  			break
  8613  		}
  8614  		mem := x0.Args[2]
  8615  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8616  			break
  8617  		}
  8618  		v.reset(OpPPC64MOVHstore)
  8619  		v.AuxInt = i0
  8620  		v.Aux = s
  8621  		v.AddArg(p)
  8622  		v.AddArg(w)
  8623  		v.AddArg(mem)
  8624  		return true
  8625  	}
  8626  	// 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))))
  8627  	// 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)
  8628  	// result: (MOVWBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  8629  	for {
  8630  		i3 := v.AuxInt
  8631  		s := v.Aux
  8632  		_ = v.Args[2]
  8633  		p := v.Args[0]
  8634  		w := v.Args[1]
  8635  		x0 := v.Args[2]
  8636  		if x0.Op != OpPPC64MOVBstore {
  8637  			break
  8638  		}
  8639  		i2 := x0.AuxInt
  8640  		if x0.Aux != s {
  8641  			break
  8642  		}
  8643  		_ = x0.Args[2]
  8644  		if p != x0.Args[0] {
  8645  			break
  8646  		}
  8647  		x0_1 := x0.Args[1]
  8648  		if x0_1.Op != OpPPC64SRWconst {
  8649  			break
  8650  		}
  8651  		if x0_1.AuxInt != 8 {
  8652  			break
  8653  		}
  8654  		if w != x0_1.Args[0] {
  8655  			break
  8656  		}
  8657  		x1 := x0.Args[2]
  8658  		if x1.Op != OpPPC64MOVBstore {
  8659  			break
  8660  		}
  8661  		i1 := x1.AuxInt
  8662  		if x1.Aux != s {
  8663  			break
  8664  		}
  8665  		_ = x1.Args[2]
  8666  		if p != x1.Args[0] {
  8667  			break
  8668  		}
  8669  		x1_1 := x1.Args[1]
  8670  		if x1_1.Op != OpPPC64SRWconst {
  8671  			break
  8672  		}
  8673  		if x1_1.AuxInt != 16 {
  8674  			break
  8675  		}
  8676  		if w != x1_1.Args[0] {
  8677  			break
  8678  		}
  8679  		x2 := x1.Args[2]
  8680  		if x2.Op != OpPPC64MOVBstore {
  8681  			break
  8682  		}
  8683  		i0 := x2.AuxInt
  8684  		if x2.Aux != s {
  8685  			break
  8686  		}
  8687  		_ = x2.Args[2]
  8688  		if p != x2.Args[0] {
  8689  			break
  8690  		}
  8691  		x2_1 := x2.Args[1]
  8692  		if x2_1.Op != OpPPC64SRWconst {
  8693  			break
  8694  		}
  8695  		if x2_1.AuxInt != 24 {
  8696  			break
  8697  		}
  8698  		if w != x2_1.Args[0] {
  8699  			break
  8700  		}
  8701  		mem := x2.Args[2]
  8702  		if !(!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)) {
  8703  			break
  8704  		}
  8705  		v.reset(OpPPC64MOVWBRstore)
  8706  		v0 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  8707  		v0.AuxInt = i0
  8708  		v0.Aux = s
  8709  		v0.AddArg(p)
  8710  		v.AddArg(v0)
  8711  		v.AddArg(w)
  8712  		v.AddArg(mem)
  8713  		return true
  8714  	}
  8715  	// match: (MOVBstore [i1] {s} p w x0:(MOVBstore [i0] {s} p (SRWconst w [8]) mem))
  8716  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  8717  	// result: (MOVHBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  8718  	for {
  8719  		i1 := v.AuxInt
  8720  		s := v.Aux
  8721  		_ = v.Args[2]
  8722  		p := v.Args[0]
  8723  		w := v.Args[1]
  8724  		x0 := v.Args[2]
  8725  		if x0.Op != OpPPC64MOVBstore {
  8726  			break
  8727  		}
  8728  		i0 := x0.AuxInt
  8729  		if x0.Aux != s {
  8730  			break
  8731  		}
  8732  		_ = x0.Args[2]
  8733  		if p != x0.Args[0] {
  8734  			break
  8735  		}
  8736  		x0_1 := x0.Args[1]
  8737  		if x0_1.Op != OpPPC64SRWconst {
  8738  			break
  8739  		}
  8740  		if x0_1.AuxInt != 8 {
  8741  			break
  8742  		}
  8743  		if w != x0_1.Args[0] {
  8744  			break
  8745  		}
  8746  		mem := x0.Args[2]
  8747  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  8748  			break
  8749  		}
  8750  		v.reset(OpPPC64MOVHBRstore)
  8751  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  8752  		v0.AuxInt = i0
  8753  		v0.Aux = s
  8754  		v0.AddArg(p)
  8755  		v.AddArg(v0)
  8756  		v.AddArg(w)
  8757  		v.AddArg(mem)
  8758  		return true
  8759  	}
  8760  	return false
  8761  }
  8762  func rewriteValuePPC64_OpPPC64MOVBstore_20(v *Value) bool {
  8763  	b := v.Block
  8764  	_ = b
  8765  	config := b.Func.Config
  8766  	_ = config
  8767  	typ := &b.Func.Config.Types
  8768  	_ = typ
  8769  	// 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)))))
  8770  	// 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)
  8771  	// result: (MOVDstore [i0] {s} p w mem)
  8772  	for {
  8773  		i7 := v.AuxInt
  8774  		s := v.Aux
  8775  		_ = v.Args[2]
  8776  		p := v.Args[0]
  8777  		v_1 := v.Args[1]
  8778  		if v_1.Op != OpPPC64SRDconst {
  8779  			break
  8780  		}
  8781  		if v_1.AuxInt != 56 {
  8782  			break
  8783  		}
  8784  		w := v_1.Args[0]
  8785  		x0 := v.Args[2]
  8786  		if x0.Op != OpPPC64MOVBstore {
  8787  			break
  8788  		}
  8789  		i6 := x0.AuxInt
  8790  		if x0.Aux != s {
  8791  			break
  8792  		}
  8793  		_ = x0.Args[2]
  8794  		if p != x0.Args[0] {
  8795  			break
  8796  		}
  8797  		x0_1 := x0.Args[1]
  8798  		if x0_1.Op != OpPPC64SRDconst {
  8799  			break
  8800  		}
  8801  		if x0_1.AuxInt != 48 {
  8802  			break
  8803  		}
  8804  		if w != x0_1.Args[0] {
  8805  			break
  8806  		}
  8807  		x1 := x0.Args[2]
  8808  		if x1.Op != OpPPC64MOVBstore {
  8809  			break
  8810  		}
  8811  		i5 := x1.AuxInt
  8812  		if x1.Aux != s {
  8813  			break
  8814  		}
  8815  		_ = x1.Args[2]
  8816  		if p != x1.Args[0] {
  8817  			break
  8818  		}
  8819  		x1_1 := x1.Args[1]
  8820  		if x1_1.Op != OpPPC64SRDconst {
  8821  			break
  8822  		}
  8823  		if x1_1.AuxInt != 40 {
  8824  			break
  8825  		}
  8826  		if w != x1_1.Args[0] {
  8827  			break
  8828  		}
  8829  		x2 := x1.Args[2]
  8830  		if x2.Op != OpPPC64MOVBstore {
  8831  			break
  8832  		}
  8833  		i4 := x2.AuxInt
  8834  		if x2.Aux != s {
  8835  			break
  8836  		}
  8837  		_ = x2.Args[2]
  8838  		if p != x2.Args[0] {
  8839  			break
  8840  		}
  8841  		x2_1 := x2.Args[1]
  8842  		if x2_1.Op != OpPPC64SRDconst {
  8843  			break
  8844  		}
  8845  		if x2_1.AuxInt != 32 {
  8846  			break
  8847  		}
  8848  		if w != x2_1.Args[0] {
  8849  			break
  8850  		}
  8851  		x3 := x2.Args[2]
  8852  		if x3.Op != OpPPC64MOVWstore {
  8853  			break
  8854  		}
  8855  		i0 := x3.AuxInt
  8856  		if x3.Aux != s {
  8857  			break
  8858  		}
  8859  		_ = x3.Args[2]
  8860  		if p != x3.Args[0] {
  8861  			break
  8862  		}
  8863  		if w != x3.Args[1] {
  8864  			break
  8865  		}
  8866  		mem := x3.Args[2]
  8867  		if !(!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)) {
  8868  			break
  8869  		}
  8870  		v.reset(OpPPC64MOVDstore)
  8871  		v.AuxInt = i0
  8872  		v.Aux = s
  8873  		v.AddArg(p)
  8874  		v.AddArg(w)
  8875  		v.AddArg(mem)
  8876  		return true
  8877  	}
  8878  	// 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))))))))
  8879  	// 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)
  8880  	// result: (MOVDBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  8881  	for {
  8882  		i7 := v.AuxInt
  8883  		s := v.Aux
  8884  		_ = v.Args[2]
  8885  		p := v.Args[0]
  8886  		w := v.Args[1]
  8887  		x0 := v.Args[2]
  8888  		if x0.Op != OpPPC64MOVBstore {
  8889  			break
  8890  		}
  8891  		i6 := x0.AuxInt
  8892  		if x0.Aux != s {
  8893  			break
  8894  		}
  8895  		_ = x0.Args[2]
  8896  		if p != x0.Args[0] {
  8897  			break
  8898  		}
  8899  		x0_1 := x0.Args[1]
  8900  		if x0_1.Op != OpPPC64SRDconst {
  8901  			break
  8902  		}
  8903  		if x0_1.AuxInt != 8 {
  8904  			break
  8905  		}
  8906  		if w != x0_1.Args[0] {
  8907  			break
  8908  		}
  8909  		x1 := x0.Args[2]
  8910  		if x1.Op != OpPPC64MOVBstore {
  8911  			break
  8912  		}
  8913  		i5 := x1.AuxInt
  8914  		if x1.Aux != s {
  8915  			break
  8916  		}
  8917  		_ = x1.Args[2]
  8918  		if p != x1.Args[0] {
  8919  			break
  8920  		}
  8921  		x1_1 := x1.Args[1]
  8922  		if x1_1.Op != OpPPC64SRDconst {
  8923  			break
  8924  		}
  8925  		if x1_1.AuxInt != 16 {
  8926  			break
  8927  		}
  8928  		if w != x1_1.Args[0] {
  8929  			break
  8930  		}
  8931  		x2 := x1.Args[2]
  8932  		if x2.Op != OpPPC64MOVBstore {
  8933  			break
  8934  		}
  8935  		i4 := x2.AuxInt
  8936  		if x2.Aux != s {
  8937  			break
  8938  		}
  8939  		_ = x2.Args[2]
  8940  		if p != x2.Args[0] {
  8941  			break
  8942  		}
  8943  		x2_1 := x2.Args[1]
  8944  		if x2_1.Op != OpPPC64SRDconst {
  8945  			break
  8946  		}
  8947  		if x2_1.AuxInt != 24 {
  8948  			break
  8949  		}
  8950  		if w != x2_1.Args[0] {
  8951  			break
  8952  		}
  8953  		x3 := x2.Args[2]
  8954  		if x3.Op != OpPPC64MOVBstore {
  8955  			break
  8956  		}
  8957  		i3 := x3.AuxInt
  8958  		if x3.Aux != s {
  8959  			break
  8960  		}
  8961  		_ = x3.Args[2]
  8962  		if p != x3.Args[0] {
  8963  			break
  8964  		}
  8965  		x3_1 := x3.Args[1]
  8966  		if x3_1.Op != OpPPC64SRDconst {
  8967  			break
  8968  		}
  8969  		if x3_1.AuxInt != 32 {
  8970  			break
  8971  		}
  8972  		if w != x3_1.Args[0] {
  8973  			break
  8974  		}
  8975  		x4 := x3.Args[2]
  8976  		if x4.Op != OpPPC64MOVBstore {
  8977  			break
  8978  		}
  8979  		i2 := x4.AuxInt
  8980  		if x4.Aux != s {
  8981  			break
  8982  		}
  8983  		_ = x4.Args[2]
  8984  		if p != x4.Args[0] {
  8985  			break
  8986  		}
  8987  		x4_1 := x4.Args[1]
  8988  		if x4_1.Op != OpPPC64SRDconst {
  8989  			break
  8990  		}
  8991  		if x4_1.AuxInt != 40 {
  8992  			break
  8993  		}
  8994  		if w != x4_1.Args[0] {
  8995  			break
  8996  		}
  8997  		x5 := x4.Args[2]
  8998  		if x5.Op != OpPPC64MOVBstore {
  8999  			break
  9000  		}
  9001  		i1 := x5.AuxInt
  9002  		if x5.Aux != s {
  9003  			break
  9004  		}
  9005  		_ = x5.Args[2]
  9006  		if p != x5.Args[0] {
  9007  			break
  9008  		}
  9009  		x5_1 := x5.Args[1]
  9010  		if x5_1.Op != OpPPC64SRDconst {
  9011  			break
  9012  		}
  9013  		if x5_1.AuxInt != 48 {
  9014  			break
  9015  		}
  9016  		if w != x5_1.Args[0] {
  9017  			break
  9018  		}
  9019  		x6 := x5.Args[2]
  9020  		if x6.Op != OpPPC64MOVBstore {
  9021  			break
  9022  		}
  9023  		i0 := x6.AuxInt
  9024  		if x6.Aux != s {
  9025  			break
  9026  		}
  9027  		_ = x6.Args[2]
  9028  		if p != x6.Args[0] {
  9029  			break
  9030  		}
  9031  		x6_1 := x6.Args[1]
  9032  		if x6_1.Op != OpPPC64SRDconst {
  9033  			break
  9034  		}
  9035  		if x6_1.AuxInt != 56 {
  9036  			break
  9037  		}
  9038  		if w != x6_1.Args[0] {
  9039  			break
  9040  		}
  9041  		mem := x6.Args[2]
  9042  		if !(!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)) {
  9043  			break
  9044  		}
  9045  		v.reset(OpPPC64MOVDBRstore)
  9046  		v0 := b.NewValue0(x6.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  9047  		v0.AuxInt = i0
  9048  		v0.Aux = s
  9049  		v0.AddArg(p)
  9050  		v.AddArg(v0)
  9051  		v.AddArg(w)
  9052  		v.AddArg(mem)
  9053  		return true
  9054  	}
  9055  	return false
  9056  }
  9057  func rewriteValuePPC64_OpPPC64MOVBstoreidx_0(v *Value) bool {
  9058  	b := v.Block
  9059  	_ = b
  9060  	typ := &b.Func.Config.Types
  9061  	_ = typ
  9062  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  9063  	// cond: is16Bit(c)
  9064  	// result: (MOVBstore [c] ptr val mem)
  9065  	for {
  9066  		_ = v.Args[3]
  9067  		ptr := v.Args[0]
  9068  		v_1 := v.Args[1]
  9069  		if v_1.Op != OpPPC64MOVDconst {
  9070  			break
  9071  		}
  9072  		c := v_1.AuxInt
  9073  		val := v.Args[2]
  9074  		mem := v.Args[3]
  9075  		if !(is16Bit(c)) {
  9076  			break
  9077  		}
  9078  		v.reset(OpPPC64MOVBstore)
  9079  		v.AuxInt = c
  9080  		v.AddArg(ptr)
  9081  		v.AddArg(val)
  9082  		v.AddArg(mem)
  9083  		return true
  9084  	}
  9085  	// match: (MOVBstoreidx (MOVDconst [c]) ptr val mem)
  9086  	// cond: is16Bit(c)
  9087  	// result: (MOVBstore [c] ptr val mem)
  9088  	for {
  9089  		_ = v.Args[3]
  9090  		v_0 := v.Args[0]
  9091  		if v_0.Op != OpPPC64MOVDconst {
  9092  			break
  9093  		}
  9094  		c := v_0.AuxInt
  9095  		ptr := v.Args[1]
  9096  		val := v.Args[2]
  9097  		mem := v.Args[3]
  9098  		if !(is16Bit(c)) {
  9099  			break
  9100  		}
  9101  		v.reset(OpPPC64MOVBstore)
  9102  		v.AuxInt = c
  9103  		v.AddArg(ptr)
  9104  		v.AddArg(val)
  9105  		v.AddArg(mem)
  9106  		return true
  9107  	}
  9108  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVBreg x) mem)
  9109  	// cond:
  9110  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9111  	for {
  9112  		off := v.AuxInt
  9113  		sym := v.Aux
  9114  		_ = v.Args[3]
  9115  		ptr := v.Args[0]
  9116  		idx := v.Args[1]
  9117  		v_2 := v.Args[2]
  9118  		if v_2.Op != OpPPC64MOVBreg {
  9119  			break
  9120  		}
  9121  		x := v_2.Args[0]
  9122  		mem := v.Args[3]
  9123  		v.reset(OpPPC64MOVBstoreidx)
  9124  		v.AuxInt = off
  9125  		v.Aux = sym
  9126  		v.AddArg(ptr)
  9127  		v.AddArg(idx)
  9128  		v.AddArg(x)
  9129  		v.AddArg(mem)
  9130  		return true
  9131  	}
  9132  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVBZreg x) mem)
  9133  	// cond:
  9134  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9135  	for {
  9136  		off := v.AuxInt
  9137  		sym := v.Aux
  9138  		_ = v.Args[3]
  9139  		ptr := v.Args[0]
  9140  		idx := v.Args[1]
  9141  		v_2 := v.Args[2]
  9142  		if v_2.Op != OpPPC64MOVBZreg {
  9143  			break
  9144  		}
  9145  		x := v_2.Args[0]
  9146  		mem := v.Args[3]
  9147  		v.reset(OpPPC64MOVBstoreidx)
  9148  		v.AuxInt = off
  9149  		v.Aux = sym
  9150  		v.AddArg(ptr)
  9151  		v.AddArg(idx)
  9152  		v.AddArg(x)
  9153  		v.AddArg(mem)
  9154  		return true
  9155  	}
  9156  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVHreg x) mem)
  9157  	// cond:
  9158  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9159  	for {
  9160  		off := v.AuxInt
  9161  		sym := v.Aux
  9162  		_ = v.Args[3]
  9163  		ptr := v.Args[0]
  9164  		idx := v.Args[1]
  9165  		v_2 := v.Args[2]
  9166  		if v_2.Op != OpPPC64MOVHreg {
  9167  			break
  9168  		}
  9169  		x := v_2.Args[0]
  9170  		mem := v.Args[3]
  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 (MOVHZreg x) mem)
  9181  	// cond:
  9182  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9183  	for {
  9184  		off := v.AuxInt
  9185  		sym := v.Aux
  9186  		_ = v.Args[3]
  9187  		ptr := v.Args[0]
  9188  		idx := v.Args[1]
  9189  		v_2 := v.Args[2]
  9190  		if v_2.Op != OpPPC64MOVHZreg {
  9191  			break
  9192  		}
  9193  		x := v_2.Args[0]
  9194  		mem := v.Args[3]
  9195  		v.reset(OpPPC64MOVBstoreidx)
  9196  		v.AuxInt = off
  9197  		v.Aux = sym
  9198  		v.AddArg(ptr)
  9199  		v.AddArg(idx)
  9200  		v.AddArg(x)
  9201  		v.AddArg(mem)
  9202  		return true
  9203  	}
  9204  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVWreg x) mem)
  9205  	// cond:
  9206  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9207  	for {
  9208  		off := v.AuxInt
  9209  		sym := v.Aux
  9210  		_ = v.Args[3]
  9211  		ptr := v.Args[0]
  9212  		idx := v.Args[1]
  9213  		v_2 := v.Args[2]
  9214  		if v_2.Op != OpPPC64MOVWreg {
  9215  			break
  9216  		}
  9217  		x := v_2.Args[0]
  9218  		mem := v.Args[3]
  9219  		v.reset(OpPPC64MOVBstoreidx)
  9220  		v.AuxInt = off
  9221  		v.Aux = sym
  9222  		v.AddArg(ptr)
  9223  		v.AddArg(idx)
  9224  		v.AddArg(x)
  9225  		v.AddArg(mem)
  9226  		return true
  9227  	}
  9228  	// match: (MOVBstoreidx [off] {sym} ptr idx (MOVWZreg x) mem)
  9229  	// cond:
  9230  	// result: (MOVBstoreidx [off] {sym} ptr idx x mem)
  9231  	for {
  9232  		off := v.AuxInt
  9233  		sym := v.Aux
  9234  		_ = v.Args[3]
  9235  		ptr := v.Args[0]
  9236  		idx := v.Args[1]
  9237  		v_2 := v.Args[2]
  9238  		if v_2.Op != OpPPC64MOVWZreg {
  9239  			break
  9240  		}
  9241  		x := v_2.Args[0]
  9242  		mem := v.Args[3]
  9243  		v.reset(OpPPC64MOVBstoreidx)
  9244  		v.AuxInt = off
  9245  		v.Aux = sym
  9246  		v.AddArg(ptr)
  9247  		v.AddArg(idx)
  9248  		v.AddArg(x)
  9249  		v.AddArg(mem)
  9250  		return true
  9251  	}
  9252  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVHreg x) [c]) mem)
  9253  	// cond: c <= 8
  9254  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9255  	for {
  9256  		off := v.AuxInt
  9257  		sym := v.Aux
  9258  		_ = v.Args[3]
  9259  		ptr := v.Args[0]
  9260  		idx := v.Args[1]
  9261  		v_2 := v.Args[2]
  9262  		if v_2.Op != OpPPC64SRWconst {
  9263  			break
  9264  		}
  9265  		c := v_2.AuxInt
  9266  		v_2_0 := v_2.Args[0]
  9267  		if v_2_0.Op != OpPPC64MOVHreg {
  9268  			break
  9269  		}
  9270  		x := v_2_0.Args[0]
  9271  		mem := v.Args[3]
  9272  		if !(c <= 8) {
  9273  			break
  9274  		}
  9275  		v.reset(OpPPC64MOVBstoreidx)
  9276  		v.AuxInt = off
  9277  		v.Aux = sym
  9278  		v.AddArg(ptr)
  9279  		v.AddArg(idx)
  9280  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9281  		v0.AuxInt = c
  9282  		v0.AddArg(x)
  9283  		v.AddArg(v0)
  9284  		v.AddArg(mem)
  9285  		return true
  9286  	}
  9287  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVHZreg x) [c]) mem)
  9288  	// cond: c <= 8
  9289  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9290  	for {
  9291  		off := v.AuxInt
  9292  		sym := v.Aux
  9293  		_ = v.Args[3]
  9294  		ptr := v.Args[0]
  9295  		idx := v.Args[1]
  9296  		v_2 := v.Args[2]
  9297  		if v_2.Op != OpPPC64SRWconst {
  9298  			break
  9299  		}
  9300  		c := v_2.AuxInt
  9301  		v_2_0 := v_2.Args[0]
  9302  		if v_2_0.Op != OpPPC64MOVHZreg {
  9303  			break
  9304  		}
  9305  		x := v_2_0.Args[0]
  9306  		mem := v.Args[3]
  9307  		if !(c <= 8) {
  9308  			break
  9309  		}
  9310  		v.reset(OpPPC64MOVBstoreidx)
  9311  		v.AuxInt = off
  9312  		v.Aux = sym
  9313  		v.AddArg(ptr)
  9314  		v.AddArg(idx)
  9315  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9316  		v0.AuxInt = c
  9317  		v0.AddArg(x)
  9318  		v.AddArg(v0)
  9319  		v.AddArg(mem)
  9320  		return true
  9321  	}
  9322  	return false
  9323  }
  9324  func rewriteValuePPC64_OpPPC64MOVBstoreidx_10(v *Value) bool {
  9325  	b := v.Block
  9326  	_ = b
  9327  	typ := &b.Func.Config.Types
  9328  	_ = typ
  9329  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVWreg x) [c]) mem)
  9330  	// cond: c <= 24
  9331  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9332  	for {
  9333  		off := v.AuxInt
  9334  		sym := v.Aux
  9335  		_ = v.Args[3]
  9336  		ptr := v.Args[0]
  9337  		idx := v.Args[1]
  9338  		v_2 := v.Args[2]
  9339  		if v_2.Op != OpPPC64SRWconst {
  9340  			break
  9341  		}
  9342  		c := v_2.AuxInt
  9343  		v_2_0 := v_2.Args[0]
  9344  		if v_2_0.Op != OpPPC64MOVWreg {
  9345  			break
  9346  		}
  9347  		x := v_2_0.Args[0]
  9348  		mem := v.Args[3]
  9349  		if !(c <= 24) {
  9350  			break
  9351  		}
  9352  		v.reset(OpPPC64MOVBstoreidx)
  9353  		v.AuxInt = off
  9354  		v.Aux = sym
  9355  		v.AddArg(ptr)
  9356  		v.AddArg(idx)
  9357  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9358  		v0.AuxInt = c
  9359  		v0.AddArg(x)
  9360  		v.AddArg(v0)
  9361  		v.AddArg(mem)
  9362  		return true
  9363  	}
  9364  	// match: (MOVBstoreidx [off] {sym} ptr idx (SRWconst (MOVWZreg x) [c]) mem)
  9365  	// cond: c <= 24
  9366  	// result: (MOVBstoreidx [off] {sym} ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  9367  	for {
  9368  		off := v.AuxInt
  9369  		sym := v.Aux
  9370  		_ = v.Args[3]
  9371  		ptr := v.Args[0]
  9372  		idx := v.Args[1]
  9373  		v_2 := v.Args[2]
  9374  		if v_2.Op != OpPPC64SRWconst {
  9375  			break
  9376  		}
  9377  		c := v_2.AuxInt
  9378  		v_2_0 := v_2.Args[0]
  9379  		if v_2_0.Op != OpPPC64MOVWZreg {
  9380  			break
  9381  		}
  9382  		x := v_2_0.Args[0]
  9383  		mem := v.Args[3]
  9384  		if !(c <= 24) {
  9385  			break
  9386  		}
  9387  		v.reset(OpPPC64MOVBstoreidx)
  9388  		v.AuxInt = off
  9389  		v.Aux = sym
  9390  		v.AddArg(ptr)
  9391  		v.AddArg(idx)
  9392  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  9393  		v0.AuxInt = c
  9394  		v0.AddArg(x)
  9395  		v.AddArg(v0)
  9396  		v.AddArg(mem)
  9397  		return true
  9398  	}
  9399  	return false
  9400  }
  9401  func rewriteValuePPC64_OpPPC64MOVBstorezero_0(v *Value) bool {
  9402  	// match: (MOVBstorezero [off1] {sym} (ADDconst [off2] x) mem)
  9403  	// cond: is16Bit(off1+off2)
  9404  	// result: (MOVBstorezero [off1+off2] {sym} x mem)
  9405  	for {
  9406  		off1 := v.AuxInt
  9407  		sym := v.Aux
  9408  		_ = v.Args[1]
  9409  		v_0 := v.Args[0]
  9410  		if v_0.Op != OpPPC64ADDconst {
  9411  			break
  9412  		}
  9413  		off2 := v_0.AuxInt
  9414  		x := v_0.Args[0]
  9415  		mem := v.Args[1]
  9416  		if !(is16Bit(off1 + off2)) {
  9417  			break
  9418  		}
  9419  		v.reset(OpPPC64MOVBstorezero)
  9420  		v.AuxInt = off1 + off2
  9421  		v.Aux = sym
  9422  		v.AddArg(x)
  9423  		v.AddArg(mem)
  9424  		return true
  9425  	}
  9426  	// match: (MOVBstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  9427  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
  9428  	// result: (MOVBstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
  9429  	for {
  9430  		off1 := v.AuxInt
  9431  		sym1 := v.Aux
  9432  		_ = v.Args[1]
  9433  		p := v.Args[0]
  9434  		if p.Op != OpPPC64MOVDaddr {
  9435  			break
  9436  		}
  9437  		off2 := p.AuxInt
  9438  		sym2 := p.Aux
  9439  		x := p.Args[0]
  9440  		mem := v.Args[1]
  9441  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
  9442  			break
  9443  		}
  9444  		v.reset(OpPPC64MOVBstorezero)
  9445  		v.AuxInt = off1 + off2
  9446  		v.Aux = mergeSym(sym1, sym2)
  9447  		v.AddArg(x)
  9448  		v.AddArg(mem)
  9449  		return true
  9450  	}
  9451  	return false
  9452  }
  9453  func rewriteValuePPC64_OpPPC64MOVDload_0(v *Value) bool {
  9454  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr x _))
  9455  	// cond:
  9456  	// result: (MFVSRD x)
  9457  	for {
  9458  		off := v.AuxInt
  9459  		sym := v.Aux
  9460  		_ = v.Args[1]
  9461  		ptr := v.Args[0]
  9462  		v_1 := v.Args[1]
  9463  		if v_1.Op != OpPPC64FMOVDstore {
  9464  			break
  9465  		}
  9466  		if v_1.AuxInt != off {
  9467  			break
  9468  		}
  9469  		if v_1.Aux != sym {
  9470  			break
  9471  		}
  9472  		_ = v_1.Args[2]
  9473  		if ptr != v_1.Args[0] {
  9474  			break
  9475  		}
  9476  		x := v_1.Args[1]
  9477  		v.reset(OpPPC64MFVSRD)
  9478  		v.AddArg(x)
  9479  		return true
  9480  	}
  9481  	// match: (MOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  9482  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  9483  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9484  	for {
  9485  		off1 := v.AuxInt
  9486  		sym1 := v.Aux
  9487  		_ = v.Args[1]
  9488  		p := v.Args[0]
  9489  		if p.Op != OpPPC64MOVDaddr {
  9490  			break
  9491  		}
  9492  		off2 := p.AuxInt
  9493  		sym2 := p.Aux
  9494  		ptr := p.Args[0]
  9495  		mem := v.Args[1]
  9496  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  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)
  9508  	// result: (MOVDload [off1+off2] {sym} x mem)
  9509  	for {
  9510  		off1 := v.AuxInt
  9511  		sym := v.Aux
  9512  		_ = 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  		mem := v.Args[1]
  9520  		if !(is16Bit(off1 + off2)) {
  9521  			break
  9522  		}
  9523  		v.reset(OpPPC64MOVDload)
  9524  		v.AuxInt = off1 + off2
  9525  		v.Aux = sym
  9526  		v.AddArg(x)
  9527  		v.AddArg(mem)
  9528  		return true
  9529  	}
  9530  	// match: (MOVDload [0] {sym} p:(ADD ptr idx) mem)
  9531  	// cond: sym == nil && p.Uses == 1
  9532  	// result: (MOVDloadidx ptr idx mem)
  9533  	for {
  9534  		if v.AuxInt != 0 {
  9535  			break
  9536  		}
  9537  		sym := v.Aux
  9538  		_ = v.Args[1]
  9539  		p := v.Args[0]
  9540  		if p.Op != OpPPC64ADD {
  9541  			break
  9542  		}
  9543  		_ = p.Args[1]
  9544  		ptr := p.Args[0]
  9545  		idx := p.Args[1]
  9546  		mem := v.Args[1]
  9547  		if !(sym == nil && p.Uses == 1) {
  9548  			break
  9549  		}
  9550  		v.reset(OpPPC64MOVDloadidx)
  9551  		v.AddArg(ptr)
  9552  		v.AddArg(idx)
  9553  		v.AddArg(mem)
  9554  		return true
  9555  	}
  9556  	return false
  9557  }
  9558  func rewriteValuePPC64_OpPPC64MOVDloadidx_0(v *Value) bool {
  9559  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  9560  	// cond: is16Bit(c)
  9561  	// result: (MOVDload [c] ptr mem)
  9562  	for {
  9563  		_ = v.Args[2]
  9564  		ptr := v.Args[0]
  9565  		v_1 := v.Args[1]
  9566  		if v_1.Op != OpPPC64MOVDconst {
  9567  			break
  9568  		}
  9569  		c := v_1.AuxInt
  9570  		mem := v.Args[2]
  9571  		if !(is16Bit(c)) {
  9572  			break
  9573  		}
  9574  		v.reset(OpPPC64MOVDload)
  9575  		v.AuxInt = c
  9576  		v.AddArg(ptr)
  9577  		v.AddArg(mem)
  9578  		return true
  9579  	}
  9580  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  9581  	// cond: is16Bit(c)
  9582  	// result: (MOVDload [c] ptr mem)
  9583  	for {
  9584  		_ = v.Args[2]
  9585  		v_0 := v.Args[0]
  9586  		if v_0.Op != OpPPC64MOVDconst {
  9587  			break
  9588  		}
  9589  		c := v_0.AuxInt
  9590  		ptr := v.Args[1]
  9591  		mem := v.Args[2]
  9592  		if !(is16Bit(c)) {
  9593  			break
  9594  		}
  9595  		v.reset(OpPPC64MOVDload)
  9596  		v.AuxInt = c
  9597  		v.AddArg(ptr)
  9598  		v.AddArg(mem)
  9599  		return true
  9600  	}
  9601  	return false
  9602  }
  9603  func rewriteValuePPC64_OpPPC64MOVDstore_0(v *Value) bool {
  9604  	// match: (MOVDstore [off] {sym} ptr (MFVSRD x) mem)
  9605  	// cond:
  9606  	// result: (FMOVDstore [off] {sym} ptr x mem)
  9607  	for {
  9608  		off := v.AuxInt
  9609  		sym := v.Aux
  9610  		_ = v.Args[2]
  9611  		ptr := v.Args[0]
  9612  		v_1 := v.Args[1]
  9613  		if v_1.Op != OpPPC64MFVSRD {
  9614  			break
  9615  		}
  9616  		x := v_1.Args[0]
  9617  		mem := v.Args[2]
  9618  		v.reset(OpPPC64FMOVDstore)
  9619  		v.AuxInt = off
  9620  		v.Aux = sym
  9621  		v.AddArg(ptr)
  9622  		v.AddArg(x)
  9623  		v.AddArg(mem)
  9624  		return true
  9625  	}
  9626  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] x) val mem)
  9627  	// cond: is16Bit(off1+off2)
  9628  	// result: (MOVDstore [off1+off2] {sym} x val mem)
  9629  	for {
  9630  		off1 := v.AuxInt
  9631  		sym := v.Aux
  9632  		_ = v.Args[2]
  9633  		v_0 := v.Args[0]
  9634  		if v_0.Op != OpPPC64ADDconst {
  9635  			break
  9636  		}
  9637  		off2 := v_0.AuxInt
  9638  		x := v_0.Args[0]
  9639  		val := v.Args[1]
  9640  		mem := v.Args[2]
  9641  		if !(is16Bit(off1 + off2)) {
  9642  			break
  9643  		}
  9644  		v.reset(OpPPC64MOVDstore)
  9645  		v.AuxInt = off1 + off2
  9646  		v.Aux = sym
  9647  		v.AddArg(x)
  9648  		v.AddArg(val)
  9649  		v.AddArg(mem)
  9650  		return true
  9651  	}
  9652  	// match: (MOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  9653  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  9654  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9655  	for {
  9656  		off1 := v.AuxInt
  9657  		sym1 := v.Aux
  9658  		_ = v.Args[2]
  9659  		p := v.Args[0]
  9660  		if p.Op != OpPPC64MOVDaddr {
  9661  			break
  9662  		}
  9663  		off2 := p.AuxInt
  9664  		sym2 := p.Aux
  9665  		ptr := p.Args[0]
  9666  		val := v.Args[1]
  9667  		mem := v.Args[2]
  9668  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  9669  			break
  9670  		}
  9671  		v.reset(OpPPC64MOVDstore)
  9672  		v.AuxInt = off1 + off2
  9673  		v.Aux = mergeSym(sym1, sym2)
  9674  		v.AddArg(ptr)
  9675  		v.AddArg(val)
  9676  		v.AddArg(mem)
  9677  		return true
  9678  	}
  9679  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [0]) mem)
  9680  	// cond:
  9681  	// result: (MOVDstorezero [off] {sym} ptr mem)
  9682  	for {
  9683  		off := v.AuxInt
  9684  		sym := v.Aux
  9685  		_ = v.Args[2]
  9686  		ptr := v.Args[0]
  9687  		v_1 := v.Args[1]
  9688  		if v_1.Op != OpPPC64MOVDconst {
  9689  			break
  9690  		}
  9691  		if v_1.AuxInt != 0 {
  9692  			break
  9693  		}
  9694  		mem := v.Args[2]
  9695  		v.reset(OpPPC64MOVDstorezero)
  9696  		v.AuxInt = off
  9697  		v.Aux = sym
  9698  		v.AddArg(ptr)
  9699  		v.AddArg(mem)
  9700  		return true
  9701  	}
  9702  	// match: (MOVDstore [off] {sym} p:(ADD ptr idx) val mem)
  9703  	// cond: off == 0 && sym == nil && p.Uses == 1
  9704  	// result: (MOVDstoreidx ptr idx val mem)
  9705  	for {
  9706  		off := v.AuxInt
  9707  		sym := v.Aux
  9708  		_ = v.Args[2]
  9709  		p := v.Args[0]
  9710  		if p.Op != OpPPC64ADD {
  9711  			break
  9712  		}
  9713  		_ = p.Args[1]
  9714  		ptr := p.Args[0]
  9715  		idx := p.Args[1]
  9716  		val := v.Args[1]
  9717  		mem := v.Args[2]
  9718  		if !(off == 0 && sym == nil && p.Uses == 1) {
  9719  			break
  9720  		}
  9721  		v.reset(OpPPC64MOVDstoreidx)
  9722  		v.AddArg(ptr)
  9723  		v.AddArg(idx)
  9724  		v.AddArg(val)
  9725  		v.AddArg(mem)
  9726  		return true
  9727  	}
  9728  	return false
  9729  }
  9730  func rewriteValuePPC64_OpPPC64MOVDstoreidx_0(v *Value) bool {
  9731  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  9732  	// cond: is16Bit(c)
  9733  	// result: (MOVDstore [c] ptr val mem)
  9734  	for {
  9735  		_ = v.Args[3]
  9736  		ptr := v.Args[0]
  9737  		v_1 := v.Args[1]
  9738  		if v_1.Op != OpPPC64MOVDconst {
  9739  			break
  9740  		}
  9741  		c := v_1.AuxInt
  9742  		val := v.Args[2]
  9743  		mem := v.Args[3]
  9744  		if !(is16Bit(c)) {
  9745  			break
  9746  		}
  9747  		v.reset(OpPPC64MOVDstore)
  9748  		v.AuxInt = c
  9749  		v.AddArg(ptr)
  9750  		v.AddArg(val)
  9751  		v.AddArg(mem)
  9752  		return true
  9753  	}
  9754  	// match: (MOVDstoreidx (MOVDconst [c]) ptr val mem)
  9755  	// cond: is16Bit(c)
  9756  	// result: (MOVDstore [c] ptr val mem)
  9757  	for {
  9758  		_ = v.Args[3]
  9759  		v_0 := v.Args[0]
  9760  		if v_0.Op != OpPPC64MOVDconst {
  9761  			break
  9762  		}
  9763  		c := v_0.AuxInt
  9764  		ptr := v.Args[1]
  9765  		val := v.Args[2]
  9766  		mem := v.Args[3]
  9767  		if !(is16Bit(c)) {
  9768  			break
  9769  		}
  9770  		v.reset(OpPPC64MOVDstore)
  9771  		v.AuxInt = c
  9772  		v.AddArg(ptr)
  9773  		v.AddArg(val)
  9774  		v.AddArg(mem)
  9775  		return true
  9776  	}
  9777  	return false
  9778  }
  9779  func rewriteValuePPC64_OpPPC64MOVDstorezero_0(v *Value) bool {
  9780  	// match: (MOVDstorezero [off1] {sym} (ADDconst [off2] x) mem)
  9781  	// cond: is16Bit(off1+off2)
  9782  	// result: (MOVDstorezero [off1+off2] {sym} x mem)
  9783  	for {
  9784  		off1 := v.AuxInt
  9785  		sym := v.Aux
  9786  		_ = v.Args[1]
  9787  		v_0 := v.Args[0]
  9788  		if v_0.Op != OpPPC64ADDconst {
  9789  			break
  9790  		}
  9791  		off2 := v_0.AuxInt
  9792  		x := v_0.Args[0]
  9793  		mem := v.Args[1]
  9794  		if !(is16Bit(off1 + off2)) {
  9795  			break
  9796  		}
  9797  		v.reset(OpPPC64MOVDstorezero)
  9798  		v.AuxInt = off1 + off2
  9799  		v.Aux = sym
  9800  		v.AddArg(x)
  9801  		v.AddArg(mem)
  9802  		return true
  9803  	}
  9804  	// match: (MOVDstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  9805  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
  9806  	// result: (MOVDstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
  9807  	for {
  9808  		off1 := v.AuxInt
  9809  		sym1 := v.Aux
  9810  		_ = v.Args[1]
  9811  		p := v.Args[0]
  9812  		if p.Op != OpPPC64MOVDaddr {
  9813  			break
  9814  		}
  9815  		off2 := p.AuxInt
  9816  		sym2 := p.Aux
  9817  		x := p.Args[0]
  9818  		mem := v.Args[1]
  9819  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
  9820  			break
  9821  		}
  9822  		v.reset(OpPPC64MOVDstorezero)
  9823  		v.AuxInt = off1 + off2
  9824  		v.Aux = mergeSym(sym1, sym2)
  9825  		v.AddArg(x)
  9826  		v.AddArg(mem)
  9827  		return true
  9828  	}
  9829  	return false
  9830  }
  9831  func rewriteValuePPC64_OpPPC64MOVHBRstore_0(v *Value) bool {
  9832  	// match: (MOVHBRstore {sym} ptr (MOVHreg x) mem)
  9833  	// cond:
  9834  	// result: (MOVHBRstore {sym} ptr x mem)
  9835  	for {
  9836  		sym := v.Aux
  9837  		_ = v.Args[2]
  9838  		ptr := v.Args[0]
  9839  		v_1 := v.Args[1]
  9840  		if v_1.Op != OpPPC64MOVHreg {
  9841  			break
  9842  		}
  9843  		x := v_1.Args[0]
  9844  		mem := v.Args[2]
  9845  		v.reset(OpPPC64MOVHBRstore)
  9846  		v.Aux = sym
  9847  		v.AddArg(ptr)
  9848  		v.AddArg(x)
  9849  		v.AddArg(mem)
  9850  		return true
  9851  	}
  9852  	// match: (MOVHBRstore {sym} ptr (MOVHZreg x) mem)
  9853  	// cond:
  9854  	// result: (MOVHBRstore {sym} ptr x mem)
  9855  	for {
  9856  		sym := v.Aux
  9857  		_ = v.Args[2]
  9858  		ptr := v.Args[0]
  9859  		v_1 := v.Args[1]
  9860  		if v_1.Op != OpPPC64MOVHZreg {
  9861  			break
  9862  		}
  9863  		x := v_1.Args[0]
  9864  		mem := v.Args[2]
  9865  		v.reset(OpPPC64MOVHBRstore)
  9866  		v.Aux = sym
  9867  		v.AddArg(ptr)
  9868  		v.AddArg(x)
  9869  		v.AddArg(mem)
  9870  		return true
  9871  	}
  9872  	// match: (MOVHBRstore {sym} ptr (MOVWreg x) mem)
  9873  	// cond:
  9874  	// result: (MOVHBRstore {sym} ptr x mem)
  9875  	for {
  9876  		sym := v.Aux
  9877  		_ = v.Args[2]
  9878  		ptr := v.Args[0]
  9879  		v_1 := v.Args[1]
  9880  		if v_1.Op != OpPPC64MOVWreg {
  9881  			break
  9882  		}
  9883  		x := v_1.Args[0]
  9884  		mem := v.Args[2]
  9885  		v.reset(OpPPC64MOVHBRstore)
  9886  		v.Aux = sym
  9887  		v.AddArg(ptr)
  9888  		v.AddArg(x)
  9889  		v.AddArg(mem)
  9890  		return true
  9891  	}
  9892  	// match: (MOVHBRstore {sym} ptr (MOVWZreg x) mem)
  9893  	// cond:
  9894  	// result: (MOVHBRstore {sym} ptr x mem)
  9895  	for {
  9896  		sym := v.Aux
  9897  		_ = v.Args[2]
  9898  		ptr := v.Args[0]
  9899  		v_1 := v.Args[1]
  9900  		if v_1.Op != OpPPC64MOVWZreg {
  9901  			break
  9902  		}
  9903  		x := v_1.Args[0]
  9904  		mem := v.Args[2]
  9905  		v.reset(OpPPC64MOVHBRstore)
  9906  		v.Aux = sym
  9907  		v.AddArg(ptr)
  9908  		v.AddArg(x)
  9909  		v.AddArg(mem)
  9910  		return true
  9911  	}
  9912  	return false
  9913  }
  9914  func rewriteValuePPC64_OpPPC64MOVHZload_0(v *Value) bool {
  9915  	// match: (MOVHZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  9916  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
  9917  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9918  	for {
  9919  		off1 := v.AuxInt
  9920  		sym1 := v.Aux
  9921  		_ = v.Args[1]
  9922  		p := v.Args[0]
  9923  		if p.Op != OpPPC64MOVDaddr {
  9924  			break
  9925  		}
  9926  		off2 := p.AuxInt
  9927  		sym2 := p.Aux
  9928  		ptr := p.Args[0]
  9929  		mem := v.Args[1]
  9930  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
  9931  			break
  9932  		}
  9933  		v.reset(OpPPC64MOVHZload)
  9934  		v.AuxInt = off1 + off2
  9935  		v.Aux = mergeSym(sym1, sym2)
  9936  		v.AddArg(ptr)
  9937  		v.AddArg(mem)
  9938  		return true
  9939  	}
  9940  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] x) mem)
  9941  	// cond: is16Bit(off1+off2)
  9942  	// result: (MOVHZload [off1+off2] {sym} x mem)
  9943  	for {
  9944  		off1 := v.AuxInt
  9945  		sym := v.Aux
  9946  		_ = v.Args[1]
  9947  		v_0 := v.Args[0]
  9948  		if v_0.Op != OpPPC64ADDconst {
  9949  			break
  9950  		}
  9951  		off2 := v_0.AuxInt
  9952  		x := v_0.Args[0]
  9953  		mem := v.Args[1]
  9954  		if !(is16Bit(off1 + off2)) {
  9955  			break
  9956  		}
  9957  		v.reset(OpPPC64MOVHZload)
  9958  		v.AuxInt = off1 + off2
  9959  		v.Aux = sym
  9960  		v.AddArg(x)
  9961  		v.AddArg(mem)
  9962  		return true
  9963  	}
  9964  	// match: (MOVHZload [0] {sym} p:(ADD ptr idx) mem)
  9965  	// cond: sym == nil && p.Uses == 1
  9966  	// result: (MOVHZloadidx ptr idx mem)
  9967  	for {
  9968  		if v.AuxInt != 0 {
  9969  			break
  9970  		}
  9971  		sym := v.Aux
  9972  		_ = v.Args[1]
  9973  		p := v.Args[0]
  9974  		if p.Op != OpPPC64ADD {
  9975  			break
  9976  		}
  9977  		_ = p.Args[1]
  9978  		ptr := p.Args[0]
  9979  		idx := p.Args[1]
  9980  		mem := v.Args[1]
  9981  		if !(sym == nil && p.Uses == 1) {
  9982  			break
  9983  		}
  9984  		v.reset(OpPPC64MOVHZloadidx)
  9985  		v.AddArg(ptr)
  9986  		v.AddArg(idx)
  9987  		v.AddArg(mem)
  9988  		return true
  9989  	}
  9990  	return false
  9991  }
  9992  func rewriteValuePPC64_OpPPC64MOVHZloadidx_0(v *Value) bool {
  9993  	// match: (MOVHZloadidx ptr (MOVDconst [c]) mem)
  9994  	// cond: is16Bit(c)
  9995  	// result: (MOVHZload [c] ptr mem)
  9996  	for {
  9997  		_ = v.Args[2]
  9998  		ptr := v.Args[0]
  9999  		v_1 := v.Args[1]
 10000  		if v_1.Op != OpPPC64MOVDconst {
 10001  			break
 10002  		}
 10003  		c := v_1.AuxInt
 10004  		mem := v.Args[2]
 10005  		if !(is16Bit(c)) {
 10006  			break
 10007  		}
 10008  		v.reset(OpPPC64MOVHZload)
 10009  		v.AuxInt = c
 10010  		v.AddArg(ptr)
 10011  		v.AddArg(mem)
 10012  		return true
 10013  	}
 10014  	// match: (MOVHZloadidx (MOVDconst [c]) ptr mem)
 10015  	// cond: is16Bit(c)
 10016  	// result: (MOVHZload [c] ptr mem)
 10017  	for {
 10018  		_ = v.Args[2]
 10019  		v_0 := v.Args[0]
 10020  		if v_0.Op != OpPPC64MOVDconst {
 10021  			break
 10022  		}
 10023  		c := v_0.AuxInt
 10024  		ptr := v.Args[1]
 10025  		mem := v.Args[2]
 10026  		if !(is16Bit(c)) {
 10027  			break
 10028  		}
 10029  		v.reset(OpPPC64MOVHZload)
 10030  		v.AuxInt = c
 10031  		v.AddArg(ptr)
 10032  		v.AddArg(mem)
 10033  		return true
 10034  	}
 10035  	return false
 10036  }
 10037  func rewriteValuePPC64_OpPPC64MOVHZreg_0(v *Value) bool {
 10038  	b := v.Block
 10039  	_ = b
 10040  	typ := &b.Func.Config.Types
 10041  	_ = typ
 10042  	// match: (MOVHZreg y:(ANDconst [c] _))
 10043  	// cond: uint64(c) <= 0xFFFF
 10044  	// result: y
 10045  	for {
 10046  		y := v.Args[0]
 10047  		if y.Op != OpPPC64ANDconst {
 10048  			break
 10049  		}
 10050  		c := y.AuxInt
 10051  		if !(uint64(c) <= 0xFFFF) {
 10052  			break
 10053  		}
 10054  		v.reset(OpCopy)
 10055  		v.Type = y.Type
 10056  		v.AddArg(y)
 10057  		return true
 10058  	}
 10059  	// match: (MOVHZreg (SRWconst [c] (MOVBZreg x)))
 10060  	// cond:
 10061  	// result: (SRWconst [c] (MOVBZreg x))
 10062  	for {
 10063  		v_0 := v.Args[0]
 10064  		if v_0.Op != OpPPC64SRWconst {
 10065  			break
 10066  		}
 10067  		c := v_0.AuxInt
 10068  		v_0_0 := v_0.Args[0]
 10069  		if v_0_0.Op != OpPPC64MOVBZreg {
 10070  			break
 10071  		}
 10072  		x := v_0_0.Args[0]
 10073  		v.reset(OpPPC64SRWconst)
 10074  		v.AuxInt = c
 10075  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 10076  		v0.AddArg(x)
 10077  		v.AddArg(v0)
 10078  		return true
 10079  	}
 10080  	// match: (MOVHZreg (SRWconst [c] (MOVHZreg x)))
 10081  	// cond:
 10082  	// result: (SRWconst [c] (MOVHZreg x))
 10083  	for {
 10084  		v_0 := v.Args[0]
 10085  		if v_0.Op != OpPPC64SRWconst {
 10086  			break
 10087  		}
 10088  		c := v_0.AuxInt
 10089  		v_0_0 := v_0.Args[0]
 10090  		if v_0_0.Op != OpPPC64MOVHZreg {
 10091  			break
 10092  		}
 10093  		x := v_0_0.Args[0]
 10094  		v.reset(OpPPC64SRWconst)
 10095  		v.AuxInt = c
 10096  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 10097  		v0.AddArg(x)
 10098  		v.AddArg(v0)
 10099  		return true
 10100  	}
 10101  	// match: (MOVHZreg (SRWconst [c] x))
 10102  	// cond: sizeof(x.Type) <= 16
 10103  	// result: (SRWconst [c] x)
 10104  	for {
 10105  		v_0 := v.Args[0]
 10106  		if v_0.Op != OpPPC64SRWconst {
 10107  			break
 10108  		}
 10109  		c := v_0.AuxInt
 10110  		x := v_0.Args[0]
 10111  		if !(sizeof(x.Type) <= 16) {
 10112  			break
 10113  		}
 10114  		v.reset(OpPPC64SRWconst)
 10115  		v.AuxInt = c
 10116  		v.AddArg(x)
 10117  		return true
 10118  	}
 10119  	// match: (MOVHZreg (SRDconst [c] x))
 10120  	// cond: c>=48
 10121  	// result: (SRDconst [c] x)
 10122  	for {
 10123  		v_0 := v.Args[0]
 10124  		if v_0.Op != OpPPC64SRDconst {
 10125  			break
 10126  		}
 10127  		c := v_0.AuxInt
 10128  		x := v_0.Args[0]
 10129  		if !(c >= 48) {
 10130  			break
 10131  		}
 10132  		v.reset(OpPPC64SRDconst)
 10133  		v.AuxInt = c
 10134  		v.AddArg(x)
 10135  		return true
 10136  	}
 10137  	// match: (MOVHZreg (SRWconst [c] x))
 10138  	// cond: c>=16
 10139  	// result: (SRWconst [c] x)
 10140  	for {
 10141  		v_0 := v.Args[0]
 10142  		if v_0.Op != OpPPC64SRWconst {
 10143  			break
 10144  		}
 10145  		c := v_0.AuxInt
 10146  		x := v_0.Args[0]
 10147  		if !(c >= 16) {
 10148  			break
 10149  		}
 10150  		v.reset(OpPPC64SRWconst)
 10151  		v.AuxInt = c
 10152  		v.AddArg(x)
 10153  		return true
 10154  	}
 10155  	// match: (MOVHZreg y:(MOVHZreg _))
 10156  	// cond:
 10157  	// result: y
 10158  	for {
 10159  		y := v.Args[0]
 10160  		if y.Op != OpPPC64MOVHZreg {
 10161  			break
 10162  		}
 10163  		v.reset(OpCopy)
 10164  		v.Type = y.Type
 10165  		v.AddArg(y)
 10166  		return true
 10167  	}
 10168  	// match: (MOVHZreg y:(MOVBZreg _))
 10169  	// cond:
 10170  	// result: y
 10171  	for {
 10172  		y := v.Args[0]
 10173  		if y.Op != OpPPC64MOVBZreg {
 10174  			break
 10175  		}
 10176  		v.reset(OpCopy)
 10177  		v.Type = y.Type
 10178  		v.AddArg(y)
 10179  		return true
 10180  	}
 10181  	// match: (MOVHZreg y:(MOVHBRload _ _))
 10182  	// cond:
 10183  	// result: y
 10184  	for {
 10185  		y := v.Args[0]
 10186  		if y.Op != OpPPC64MOVHBRload {
 10187  			break
 10188  		}
 10189  		_ = y.Args[1]
 10190  		v.reset(OpCopy)
 10191  		v.Type = y.Type
 10192  		v.AddArg(y)
 10193  		return true
 10194  	}
 10195  	// match: (MOVHZreg y:(MOVHreg x))
 10196  	// cond:
 10197  	// result: (MOVHZreg x)
 10198  	for {
 10199  		y := v.Args[0]
 10200  		if y.Op != OpPPC64MOVHreg {
 10201  			break
 10202  		}
 10203  		x := y.Args[0]
 10204  		v.reset(OpPPC64MOVHZreg)
 10205  		v.AddArg(x)
 10206  		return true
 10207  	}
 10208  	return false
 10209  }
 10210  func rewriteValuePPC64_OpPPC64MOVHZreg_10(v *Value) bool {
 10211  	// match: (MOVHZreg x:(MOVBZload _ _))
 10212  	// cond:
 10213  	// result: x
 10214  	for {
 10215  		x := v.Args[0]
 10216  		if x.Op != OpPPC64MOVBZload {
 10217  			break
 10218  		}
 10219  		_ = x.Args[1]
 10220  		v.reset(OpCopy)
 10221  		v.Type = x.Type
 10222  		v.AddArg(x)
 10223  		return true
 10224  	}
 10225  	// match: (MOVHZreg x:(MOVBZloadidx _ _ _))
 10226  	// cond:
 10227  	// result: x
 10228  	for {
 10229  		x := v.Args[0]
 10230  		if x.Op != OpPPC64MOVBZloadidx {
 10231  			break
 10232  		}
 10233  		_ = x.Args[2]
 10234  		v.reset(OpCopy)
 10235  		v.Type = x.Type
 10236  		v.AddArg(x)
 10237  		return true
 10238  	}
 10239  	// match: (MOVHZreg x:(MOVHZload _ _))
 10240  	// cond:
 10241  	// result: x
 10242  	for {
 10243  		x := v.Args[0]
 10244  		if x.Op != OpPPC64MOVHZload {
 10245  			break
 10246  		}
 10247  		_ = x.Args[1]
 10248  		v.reset(OpCopy)
 10249  		v.Type = x.Type
 10250  		v.AddArg(x)
 10251  		return true
 10252  	}
 10253  	// match: (MOVHZreg x:(MOVHZloadidx _ _ _))
 10254  	// cond:
 10255  	// result: x
 10256  	for {
 10257  		x := v.Args[0]
 10258  		if x.Op != OpPPC64MOVHZloadidx {
 10259  			break
 10260  		}
 10261  		_ = x.Args[2]
 10262  		v.reset(OpCopy)
 10263  		v.Type = x.Type
 10264  		v.AddArg(x)
 10265  		return true
 10266  	}
 10267  	// match: (MOVHZreg x:(Arg <t>))
 10268  	// cond: (is8BitInt(t) || is16BitInt(t)) && !isSigned(t)
 10269  	// result: x
 10270  	for {
 10271  		x := v.Args[0]
 10272  		if x.Op != OpArg {
 10273  			break
 10274  		}
 10275  		t := x.Type
 10276  		if !((is8BitInt(t) || is16BitInt(t)) && !isSigned(t)) {
 10277  			break
 10278  		}
 10279  		v.reset(OpCopy)
 10280  		v.Type = x.Type
 10281  		v.AddArg(x)
 10282  		return true
 10283  	}
 10284  	// match: (MOVHZreg (MOVDconst [c]))
 10285  	// cond:
 10286  	// result: (MOVDconst [int64(uint16(c))])
 10287  	for {
 10288  		v_0 := v.Args[0]
 10289  		if v_0.Op != OpPPC64MOVDconst {
 10290  			break
 10291  		}
 10292  		c := v_0.AuxInt
 10293  		v.reset(OpPPC64MOVDconst)
 10294  		v.AuxInt = int64(uint16(c))
 10295  		return true
 10296  	}
 10297  	return false
 10298  }
 10299  func rewriteValuePPC64_OpPPC64MOVHload_0(v *Value) bool {
 10300  	// match: (MOVHload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 10301  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 10302  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10303  	for {
 10304  		off1 := v.AuxInt
 10305  		sym1 := v.Aux
 10306  		_ = v.Args[1]
 10307  		p := v.Args[0]
 10308  		if p.Op != OpPPC64MOVDaddr {
 10309  			break
 10310  		}
 10311  		off2 := p.AuxInt
 10312  		sym2 := p.Aux
 10313  		ptr := p.Args[0]
 10314  		mem := v.Args[1]
 10315  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 10316  			break
 10317  		}
 10318  		v.reset(OpPPC64MOVHload)
 10319  		v.AuxInt = off1 + off2
 10320  		v.Aux = mergeSym(sym1, sym2)
 10321  		v.AddArg(ptr)
 10322  		v.AddArg(mem)
 10323  		return true
 10324  	}
 10325  	// match: (MOVHload [off1] {sym} (ADDconst [off2] x) mem)
 10326  	// cond: is16Bit(off1+off2)
 10327  	// result: (MOVHload [off1+off2] {sym} x mem)
 10328  	for {
 10329  		off1 := v.AuxInt
 10330  		sym := v.Aux
 10331  		_ = v.Args[1]
 10332  		v_0 := v.Args[0]
 10333  		if v_0.Op != OpPPC64ADDconst {
 10334  			break
 10335  		}
 10336  		off2 := v_0.AuxInt
 10337  		x := v_0.Args[0]
 10338  		mem := v.Args[1]
 10339  		if !(is16Bit(off1 + off2)) {
 10340  			break
 10341  		}
 10342  		v.reset(OpPPC64MOVHload)
 10343  		v.AuxInt = off1 + off2
 10344  		v.Aux = sym
 10345  		v.AddArg(x)
 10346  		v.AddArg(mem)
 10347  		return true
 10348  	}
 10349  	// match: (MOVHload [0] {sym} p:(ADD ptr idx) mem)
 10350  	// cond: sym == nil && p.Uses == 1
 10351  	// result: (MOVHloadidx ptr idx mem)
 10352  	for {
 10353  		if v.AuxInt != 0 {
 10354  			break
 10355  		}
 10356  		sym := v.Aux
 10357  		_ = v.Args[1]
 10358  		p := v.Args[0]
 10359  		if p.Op != OpPPC64ADD {
 10360  			break
 10361  		}
 10362  		_ = p.Args[1]
 10363  		ptr := p.Args[0]
 10364  		idx := p.Args[1]
 10365  		mem := v.Args[1]
 10366  		if !(sym == nil && p.Uses == 1) {
 10367  			break
 10368  		}
 10369  		v.reset(OpPPC64MOVHloadidx)
 10370  		v.AddArg(ptr)
 10371  		v.AddArg(idx)
 10372  		v.AddArg(mem)
 10373  		return true
 10374  	}
 10375  	return false
 10376  }
 10377  func rewriteValuePPC64_OpPPC64MOVHloadidx_0(v *Value) bool {
 10378  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
 10379  	// cond: is16Bit(c)
 10380  	// result: (MOVHload [c] ptr mem)
 10381  	for {
 10382  		_ = v.Args[2]
 10383  		ptr := v.Args[0]
 10384  		v_1 := v.Args[1]
 10385  		if v_1.Op != OpPPC64MOVDconst {
 10386  			break
 10387  		}
 10388  		c := v_1.AuxInt
 10389  		mem := v.Args[2]
 10390  		if !(is16Bit(c)) {
 10391  			break
 10392  		}
 10393  		v.reset(OpPPC64MOVHload)
 10394  		v.AuxInt = c
 10395  		v.AddArg(ptr)
 10396  		v.AddArg(mem)
 10397  		return true
 10398  	}
 10399  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
 10400  	// cond: is16Bit(c)
 10401  	// result: (MOVHload [c] ptr mem)
 10402  	for {
 10403  		_ = v.Args[2]
 10404  		v_0 := v.Args[0]
 10405  		if v_0.Op != OpPPC64MOVDconst {
 10406  			break
 10407  		}
 10408  		c := v_0.AuxInt
 10409  		ptr := v.Args[1]
 10410  		mem := v.Args[2]
 10411  		if !(is16Bit(c)) {
 10412  			break
 10413  		}
 10414  		v.reset(OpPPC64MOVHload)
 10415  		v.AuxInt = c
 10416  		v.AddArg(ptr)
 10417  		v.AddArg(mem)
 10418  		return true
 10419  	}
 10420  	return false
 10421  }
 10422  func rewriteValuePPC64_OpPPC64MOVHreg_0(v *Value) bool {
 10423  	b := v.Block
 10424  	_ = b
 10425  	typ := &b.Func.Config.Types
 10426  	_ = typ
 10427  	// match: (MOVHreg y:(ANDconst [c] _))
 10428  	// cond: uint64(c) <= 0x7FFF
 10429  	// result: y
 10430  	for {
 10431  		y := v.Args[0]
 10432  		if y.Op != OpPPC64ANDconst {
 10433  			break
 10434  		}
 10435  		c := y.AuxInt
 10436  		if !(uint64(c) <= 0x7FFF) {
 10437  			break
 10438  		}
 10439  		v.reset(OpCopy)
 10440  		v.Type = y.Type
 10441  		v.AddArg(y)
 10442  		return true
 10443  	}
 10444  	// match: (MOVHreg (SRAWconst [c] (MOVBreg x)))
 10445  	// cond:
 10446  	// result: (SRAWconst [c] (MOVBreg x))
 10447  	for {
 10448  		v_0 := v.Args[0]
 10449  		if v_0.Op != OpPPC64SRAWconst {
 10450  			break
 10451  		}
 10452  		c := v_0.AuxInt
 10453  		v_0_0 := v_0.Args[0]
 10454  		if v_0_0.Op != OpPPC64MOVBreg {
 10455  			break
 10456  		}
 10457  		x := v_0_0.Args[0]
 10458  		v.reset(OpPPC64SRAWconst)
 10459  		v.AuxInt = c
 10460  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 10461  		v0.AddArg(x)
 10462  		v.AddArg(v0)
 10463  		return true
 10464  	}
 10465  	// match: (MOVHreg (SRAWconst [c] (MOVHreg x)))
 10466  	// cond:
 10467  	// result: (SRAWconst [c] (MOVHreg x))
 10468  	for {
 10469  		v_0 := v.Args[0]
 10470  		if v_0.Op != OpPPC64SRAWconst {
 10471  			break
 10472  		}
 10473  		c := v_0.AuxInt
 10474  		v_0_0 := v_0.Args[0]
 10475  		if v_0_0.Op != OpPPC64MOVHreg {
 10476  			break
 10477  		}
 10478  		x := v_0_0.Args[0]
 10479  		v.reset(OpPPC64SRAWconst)
 10480  		v.AuxInt = c
 10481  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 10482  		v0.AddArg(x)
 10483  		v.AddArg(v0)
 10484  		return true
 10485  	}
 10486  	// match: (MOVHreg (SRAWconst [c] x))
 10487  	// cond: sizeof(x.Type) <= 16
 10488  	// result: (SRAWconst [c] x)
 10489  	for {
 10490  		v_0 := v.Args[0]
 10491  		if v_0.Op != OpPPC64SRAWconst {
 10492  			break
 10493  		}
 10494  		c := v_0.AuxInt
 10495  		x := v_0.Args[0]
 10496  		if !(sizeof(x.Type) <= 16) {
 10497  			break
 10498  		}
 10499  		v.reset(OpPPC64SRAWconst)
 10500  		v.AuxInt = c
 10501  		v.AddArg(x)
 10502  		return true
 10503  	}
 10504  	// match: (MOVHreg (SRDconst [c] x))
 10505  	// cond: c>48
 10506  	// result: (SRDconst [c] x)
 10507  	for {
 10508  		v_0 := v.Args[0]
 10509  		if v_0.Op != OpPPC64SRDconst {
 10510  			break
 10511  		}
 10512  		c := v_0.AuxInt
 10513  		x := v_0.Args[0]
 10514  		if !(c > 48) {
 10515  			break
 10516  		}
 10517  		v.reset(OpPPC64SRDconst)
 10518  		v.AuxInt = c
 10519  		v.AddArg(x)
 10520  		return true
 10521  	}
 10522  	// match: (MOVHreg (SRDconst [c] x))
 10523  	// cond: c==48
 10524  	// result: (SRADconst [c] x)
 10525  	for {
 10526  		v_0 := v.Args[0]
 10527  		if v_0.Op != OpPPC64SRDconst {
 10528  			break
 10529  		}
 10530  		c := v_0.AuxInt
 10531  		x := v_0.Args[0]
 10532  		if !(c == 48) {
 10533  			break
 10534  		}
 10535  		v.reset(OpPPC64SRADconst)
 10536  		v.AuxInt = c
 10537  		v.AddArg(x)
 10538  		return true
 10539  	}
 10540  	// match: (MOVHreg (SRWconst [c] x))
 10541  	// cond: c>16
 10542  	// result: (SRWconst [c] x)
 10543  	for {
 10544  		v_0 := v.Args[0]
 10545  		if v_0.Op != OpPPC64SRWconst {
 10546  			break
 10547  		}
 10548  		c := v_0.AuxInt
 10549  		x := v_0.Args[0]
 10550  		if !(c > 16) {
 10551  			break
 10552  		}
 10553  		v.reset(OpPPC64SRWconst)
 10554  		v.AuxInt = c
 10555  		v.AddArg(x)
 10556  		return true
 10557  	}
 10558  	// match: (MOVHreg (SRWconst [c] x))
 10559  	// cond: c==16
 10560  	// result: (SRAWconst [c] x)
 10561  	for {
 10562  		v_0 := v.Args[0]
 10563  		if v_0.Op != OpPPC64SRWconst {
 10564  			break
 10565  		}
 10566  		c := v_0.AuxInt
 10567  		x := v_0.Args[0]
 10568  		if !(c == 16) {
 10569  			break
 10570  		}
 10571  		v.reset(OpPPC64SRAWconst)
 10572  		v.AuxInt = c
 10573  		v.AddArg(x)
 10574  		return true
 10575  	}
 10576  	// match: (MOVHreg y:(MOVHreg _))
 10577  	// cond:
 10578  	// result: y
 10579  	for {
 10580  		y := v.Args[0]
 10581  		if y.Op != OpPPC64MOVHreg {
 10582  			break
 10583  		}
 10584  		v.reset(OpCopy)
 10585  		v.Type = y.Type
 10586  		v.AddArg(y)
 10587  		return true
 10588  	}
 10589  	// match: (MOVHreg y:(MOVBreg _))
 10590  	// cond:
 10591  	// result: y
 10592  	for {
 10593  		y := v.Args[0]
 10594  		if y.Op != OpPPC64MOVBreg {
 10595  			break
 10596  		}
 10597  		v.reset(OpCopy)
 10598  		v.Type = y.Type
 10599  		v.AddArg(y)
 10600  		return true
 10601  	}
 10602  	return false
 10603  }
 10604  func rewriteValuePPC64_OpPPC64MOVHreg_10(v *Value) bool {
 10605  	// match: (MOVHreg y:(MOVHZreg x))
 10606  	// cond:
 10607  	// result: (MOVHreg x)
 10608  	for {
 10609  		y := v.Args[0]
 10610  		if y.Op != OpPPC64MOVHZreg {
 10611  			break
 10612  		}
 10613  		x := y.Args[0]
 10614  		v.reset(OpPPC64MOVHreg)
 10615  		v.AddArg(x)
 10616  		return true
 10617  	}
 10618  	// match: (MOVHreg x:(MOVHload _ _))
 10619  	// cond:
 10620  	// result: x
 10621  	for {
 10622  		x := v.Args[0]
 10623  		if x.Op != OpPPC64MOVHload {
 10624  			break
 10625  		}
 10626  		_ = x.Args[1]
 10627  		v.reset(OpCopy)
 10628  		v.Type = x.Type
 10629  		v.AddArg(x)
 10630  		return true
 10631  	}
 10632  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
 10633  	// cond:
 10634  	// result: x
 10635  	for {
 10636  		x := v.Args[0]
 10637  		if x.Op != OpPPC64MOVHloadidx {
 10638  			break
 10639  		}
 10640  		_ = x.Args[2]
 10641  		v.reset(OpCopy)
 10642  		v.Type = x.Type
 10643  		v.AddArg(x)
 10644  		return true
 10645  	}
 10646  	// match: (MOVHreg x:(Arg <t>))
 10647  	// cond: (is8BitInt(t) || is16BitInt(t)) && isSigned(t)
 10648  	// result: x
 10649  	for {
 10650  		x := v.Args[0]
 10651  		if x.Op != OpArg {
 10652  			break
 10653  		}
 10654  		t := x.Type
 10655  		if !((is8BitInt(t) || is16BitInt(t)) && isSigned(t)) {
 10656  			break
 10657  		}
 10658  		v.reset(OpCopy)
 10659  		v.Type = x.Type
 10660  		v.AddArg(x)
 10661  		return true
 10662  	}
 10663  	// match: (MOVHreg (MOVDconst [c]))
 10664  	// cond:
 10665  	// result: (MOVDconst [int64(int16(c))])
 10666  	for {
 10667  		v_0 := v.Args[0]
 10668  		if v_0.Op != OpPPC64MOVDconst {
 10669  			break
 10670  		}
 10671  		c := v_0.AuxInt
 10672  		v.reset(OpPPC64MOVDconst)
 10673  		v.AuxInt = int64(int16(c))
 10674  		return true
 10675  	}
 10676  	return false
 10677  }
 10678  func rewriteValuePPC64_OpPPC64MOVHstore_0(v *Value) bool {
 10679  	b := v.Block
 10680  	_ = b
 10681  	config := b.Func.Config
 10682  	_ = config
 10683  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] x) val mem)
 10684  	// cond: is16Bit(off1+off2)
 10685  	// result: (MOVHstore [off1+off2] {sym} x val mem)
 10686  	for {
 10687  		off1 := v.AuxInt
 10688  		sym := v.Aux
 10689  		_ = v.Args[2]
 10690  		v_0 := v.Args[0]
 10691  		if v_0.Op != OpPPC64ADDconst {
 10692  			break
 10693  		}
 10694  		off2 := v_0.AuxInt
 10695  		x := v_0.Args[0]
 10696  		val := v.Args[1]
 10697  		mem := v.Args[2]
 10698  		if !(is16Bit(off1 + off2)) {
 10699  			break
 10700  		}
 10701  		v.reset(OpPPC64MOVHstore)
 10702  		v.AuxInt = off1 + off2
 10703  		v.Aux = sym
 10704  		v.AddArg(x)
 10705  		v.AddArg(val)
 10706  		v.AddArg(mem)
 10707  		return true
 10708  	}
 10709  	// match: (MOVHstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
 10710  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 10711  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 10712  	for {
 10713  		off1 := v.AuxInt
 10714  		sym1 := v.Aux
 10715  		_ = v.Args[2]
 10716  		p := v.Args[0]
 10717  		if p.Op != OpPPC64MOVDaddr {
 10718  			break
 10719  		}
 10720  		off2 := p.AuxInt
 10721  		sym2 := p.Aux
 10722  		ptr := p.Args[0]
 10723  		val := v.Args[1]
 10724  		mem := v.Args[2]
 10725  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 10726  			break
 10727  		}
 10728  		v.reset(OpPPC64MOVHstore)
 10729  		v.AuxInt = off1 + off2
 10730  		v.Aux = mergeSym(sym1, sym2)
 10731  		v.AddArg(ptr)
 10732  		v.AddArg(val)
 10733  		v.AddArg(mem)
 10734  		return true
 10735  	}
 10736  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [0]) mem)
 10737  	// cond:
 10738  	// result: (MOVHstorezero [off] {sym} ptr mem)
 10739  	for {
 10740  		off := v.AuxInt
 10741  		sym := v.Aux
 10742  		_ = v.Args[2]
 10743  		ptr := v.Args[0]
 10744  		v_1 := v.Args[1]
 10745  		if v_1.Op != OpPPC64MOVDconst {
 10746  			break
 10747  		}
 10748  		if v_1.AuxInt != 0 {
 10749  			break
 10750  		}
 10751  		mem := v.Args[2]
 10752  		v.reset(OpPPC64MOVHstorezero)
 10753  		v.AuxInt = off
 10754  		v.Aux = sym
 10755  		v.AddArg(ptr)
 10756  		v.AddArg(mem)
 10757  		return true
 10758  	}
 10759  	// match: (MOVHstore [off] {sym} p:(ADD ptr idx) val mem)
 10760  	// cond: off == 0 && sym == nil && p.Uses == 1
 10761  	// result: (MOVHstoreidx ptr idx val mem)
 10762  	for {
 10763  		off := v.AuxInt
 10764  		sym := v.Aux
 10765  		_ = v.Args[2]
 10766  		p := v.Args[0]
 10767  		if p.Op != OpPPC64ADD {
 10768  			break
 10769  		}
 10770  		_ = p.Args[1]
 10771  		ptr := p.Args[0]
 10772  		idx := p.Args[1]
 10773  		val := v.Args[1]
 10774  		mem := v.Args[2]
 10775  		if !(off == 0 && sym == nil && p.Uses == 1) {
 10776  			break
 10777  		}
 10778  		v.reset(OpPPC64MOVHstoreidx)
 10779  		v.AddArg(ptr)
 10780  		v.AddArg(idx)
 10781  		v.AddArg(val)
 10782  		v.AddArg(mem)
 10783  		return true
 10784  	}
 10785  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10786  	// cond:
 10787  	// result: (MOVHstore [off] {sym} ptr x mem)
 10788  	for {
 10789  		off := v.AuxInt
 10790  		sym := v.Aux
 10791  		_ = v.Args[2]
 10792  		ptr := v.Args[0]
 10793  		v_1 := v.Args[1]
 10794  		if v_1.Op != OpPPC64MOVHreg {
 10795  			break
 10796  		}
 10797  		x := v_1.Args[0]
 10798  		mem := v.Args[2]
 10799  		v.reset(OpPPC64MOVHstore)
 10800  		v.AuxInt = off
 10801  		v.Aux = sym
 10802  		v.AddArg(ptr)
 10803  		v.AddArg(x)
 10804  		v.AddArg(mem)
 10805  		return true
 10806  	}
 10807  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
 10808  	// cond:
 10809  	// result: (MOVHstore [off] {sym} ptr x mem)
 10810  	for {
 10811  		off := v.AuxInt
 10812  		sym := v.Aux
 10813  		_ = v.Args[2]
 10814  		ptr := v.Args[0]
 10815  		v_1 := v.Args[1]
 10816  		if v_1.Op != OpPPC64MOVHZreg {
 10817  			break
 10818  		}
 10819  		x := v_1.Args[0]
 10820  		mem := v.Args[2]
 10821  		v.reset(OpPPC64MOVHstore)
 10822  		v.AuxInt = off
 10823  		v.Aux = sym
 10824  		v.AddArg(ptr)
 10825  		v.AddArg(x)
 10826  		v.AddArg(mem)
 10827  		return true
 10828  	}
 10829  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
 10830  	// cond:
 10831  	// result: (MOVHstore [off] {sym} ptr x mem)
 10832  	for {
 10833  		off := v.AuxInt
 10834  		sym := v.Aux
 10835  		_ = v.Args[2]
 10836  		ptr := v.Args[0]
 10837  		v_1 := v.Args[1]
 10838  		if v_1.Op != OpPPC64MOVWreg {
 10839  			break
 10840  		}
 10841  		x := v_1.Args[0]
 10842  		mem := v.Args[2]
 10843  		v.reset(OpPPC64MOVHstore)
 10844  		v.AuxInt = off
 10845  		v.Aux = sym
 10846  		v.AddArg(ptr)
 10847  		v.AddArg(x)
 10848  		v.AddArg(mem)
 10849  		return true
 10850  	}
 10851  	// match: (MOVHstore [off] {sym} ptr (MOVWZreg x) mem)
 10852  	// cond:
 10853  	// result: (MOVHstore [off] {sym} ptr x mem)
 10854  	for {
 10855  		off := v.AuxInt
 10856  		sym := v.Aux
 10857  		_ = v.Args[2]
 10858  		ptr := v.Args[0]
 10859  		v_1 := v.Args[1]
 10860  		if v_1.Op != OpPPC64MOVWZreg {
 10861  			break
 10862  		}
 10863  		x := v_1.Args[0]
 10864  		mem := v.Args[2]
 10865  		v.reset(OpPPC64MOVHstore)
 10866  		v.AuxInt = off
 10867  		v.Aux = sym
 10868  		v.AddArg(ptr)
 10869  		v.AddArg(x)
 10870  		v.AddArg(mem)
 10871  		return true
 10872  	}
 10873  	// match: (MOVHstore [i1] {s} p (SRWconst w [16]) x0:(MOVHstore [i0] {s} p w mem))
 10874  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)
 10875  	// result: (MOVWstore [i0] {s} p w mem)
 10876  	for {
 10877  		i1 := v.AuxInt
 10878  		s := v.Aux
 10879  		_ = v.Args[2]
 10880  		p := v.Args[0]
 10881  		v_1 := v.Args[1]
 10882  		if v_1.Op != OpPPC64SRWconst {
 10883  			break
 10884  		}
 10885  		if v_1.AuxInt != 16 {
 10886  			break
 10887  		}
 10888  		w := v_1.Args[0]
 10889  		x0 := v.Args[2]
 10890  		if x0.Op != OpPPC64MOVHstore {
 10891  			break
 10892  		}
 10893  		i0 := x0.AuxInt
 10894  		if x0.Aux != s {
 10895  			break
 10896  		}
 10897  		_ = x0.Args[2]
 10898  		if p != x0.Args[0] {
 10899  			break
 10900  		}
 10901  		if w != x0.Args[1] {
 10902  			break
 10903  		}
 10904  		mem := x0.Args[2]
 10905  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)) {
 10906  			break
 10907  		}
 10908  		v.reset(OpPPC64MOVWstore)
 10909  		v.AuxInt = i0
 10910  		v.Aux = s
 10911  		v.AddArg(p)
 10912  		v.AddArg(w)
 10913  		v.AddArg(mem)
 10914  		return true
 10915  	}
 10916  	// match: (MOVHstore [i1] {s} p (SRDconst w [16]) x0:(MOVHstore [i0] {s} p w mem))
 10917  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)
 10918  	// result: (MOVWstore [i0] {s} p w mem)
 10919  	for {
 10920  		i1 := v.AuxInt
 10921  		s := v.Aux
 10922  		_ = v.Args[2]
 10923  		p := v.Args[0]
 10924  		v_1 := v.Args[1]
 10925  		if v_1.Op != OpPPC64SRDconst {
 10926  			break
 10927  		}
 10928  		if v_1.AuxInt != 16 {
 10929  			break
 10930  		}
 10931  		w := v_1.Args[0]
 10932  		x0 := v.Args[2]
 10933  		if x0.Op != OpPPC64MOVHstore {
 10934  			break
 10935  		}
 10936  		i0 := x0.AuxInt
 10937  		if x0.Aux != s {
 10938  			break
 10939  		}
 10940  		_ = x0.Args[2]
 10941  		if p != x0.Args[0] {
 10942  			break
 10943  		}
 10944  		if w != x0.Args[1] {
 10945  			break
 10946  		}
 10947  		mem := x0.Args[2]
 10948  		if !(!config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)) {
 10949  			break
 10950  		}
 10951  		v.reset(OpPPC64MOVWstore)
 10952  		v.AuxInt = i0
 10953  		v.Aux = s
 10954  		v.AddArg(p)
 10955  		v.AddArg(w)
 10956  		v.AddArg(mem)
 10957  		return true
 10958  	}
 10959  	return false
 10960  }
 10961  func rewriteValuePPC64_OpPPC64MOVHstoreidx_0(v *Value) bool {
 10962  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10963  	// cond: is16Bit(c)
 10964  	// result: (MOVHstore [c] ptr val mem)
 10965  	for {
 10966  		_ = v.Args[3]
 10967  		ptr := v.Args[0]
 10968  		v_1 := v.Args[1]
 10969  		if v_1.Op != OpPPC64MOVDconst {
 10970  			break
 10971  		}
 10972  		c := v_1.AuxInt
 10973  		val := v.Args[2]
 10974  		mem := v.Args[3]
 10975  		if !(is16Bit(c)) {
 10976  			break
 10977  		}
 10978  		v.reset(OpPPC64MOVHstore)
 10979  		v.AuxInt = c
 10980  		v.AddArg(ptr)
 10981  		v.AddArg(val)
 10982  		v.AddArg(mem)
 10983  		return true
 10984  	}
 10985  	// match: (MOVHstoreidx (MOVDconst [c]) ptr val mem)
 10986  	// cond: is16Bit(c)
 10987  	// result: (MOVHstore [c] ptr val mem)
 10988  	for {
 10989  		_ = v.Args[3]
 10990  		v_0 := v.Args[0]
 10991  		if v_0.Op != OpPPC64MOVDconst {
 10992  			break
 10993  		}
 10994  		c := v_0.AuxInt
 10995  		ptr := v.Args[1]
 10996  		val := v.Args[2]
 10997  		mem := v.Args[3]
 10998  		if !(is16Bit(c)) {
 10999  			break
 11000  		}
 11001  		v.reset(OpPPC64MOVHstore)
 11002  		v.AuxInt = c
 11003  		v.AddArg(ptr)
 11004  		v.AddArg(val)
 11005  		v.AddArg(mem)
 11006  		return true
 11007  	}
 11008  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVHreg x) mem)
 11009  	// cond:
 11010  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 11011  	for {
 11012  		off := v.AuxInt
 11013  		sym := v.Aux
 11014  		_ = v.Args[3]
 11015  		ptr := v.Args[0]
 11016  		idx := v.Args[1]
 11017  		v_2 := v.Args[2]
 11018  		if v_2.Op != OpPPC64MOVHreg {
 11019  			break
 11020  		}
 11021  		x := v_2.Args[0]
 11022  		mem := v.Args[3]
 11023  		v.reset(OpPPC64MOVHstoreidx)
 11024  		v.AuxInt = off
 11025  		v.Aux = sym
 11026  		v.AddArg(ptr)
 11027  		v.AddArg(idx)
 11028  		v.AddArg(x)
 11029  		v.AddArg(mem)
 11030  		return true
 11031  	}
 11032  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVHZreg x) mem)
 11033  	// cond:
 11034  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 11035  	for {
 11036  		off := v.AuxInt
 11037  		sym := v.Aux
 11038  		_ = v.Args[3]
 11039  		ptr := v.Args[0]
 11040  		idx := v.Args[1]
 11041  		v_2 := v.Args[2]
 11042  		if v_2.Op != OpPPC64MOVHZreg {
 11043  			break
 11044  		}
 11045  		x := v_2.Args[0]
 11046  		mem := v.Args[3]
 11047  		v.reset(OpPPC64MOVHstoreidx)
 11048  		v.AuxInt = off
 11049  		v.Aux = sym
 11050  		v.AddArg(ptr)
 11051  		v.AddArg(idx)
 11052  		v.AddArg(x)
 11053  		v.AddArg(mem)
 11054  		return true
 11055  	}
 11056  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVWreg x) mem)
 11057  	// cond:
 11058  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 11059  	for {
 11060  		off := v.AuxInt
 11061  		sym := v.Aux
 11062  		_ = v.Args[3]
 11063  		ptr := v.Args[0]
 11064  		idx := v.Args[1]
 11065  		v_2 := v.Args[2]
 11066  		if v_2.Op != OpPPC64MOVWreg {
 11067  			break
 11068  		}
 11069  		x := v_2.Args[0]
 11070  		mem := v.Args[3]
 11071  		v.reset(OpPPC64MOVHstoreidx)
 11072  		v.AuxInt = off
 11073  		v.Aux = sym
 11074  		v.AddArg(ptr)
 11075  		v.AddArg(idx)
 11076  		v.AddArg(x)
 11077  		v.AddArg(mem)
 11078  		return true
 11079  	}
 11080  	// match: (MOVHstoreidx [off] {sym} ptr idx (MOVWZreg x) mem)
 11081  	// cond:
 11082  	// result: (MOVHstoreidx [off] {sym} ptr idx x mem)
 11083  	for {
 11084  		off := v.AuxInt
 11085  		sym := v.Aux
 11086  		_ = v.Args[3]
 11087  		ptr := v.Args[0]
 11088  		idx := v.Args[1]
 11089  		v_2 := v.Args[2]
 11090  		if v_2.Op != OpPPC64MOVWZreg {
 11091  			break
 11092  		}
 11093  		x := v_2.Args[0]
 11094  		mem := v.Args[3]
 11095  		v.reset(OpPPC64MOVHstoreidx)
 11096  		v.AuxInt = off
 11097  		v.Aux = sym
 11098  		v.AddArg(ptr)
 11099  		v.AddArg(idx)
 11100  		v.AddArg(x)
 11101  		v.AddArg(mem)
 11102  		return true
 11103  	}
 11104  	return false
 11105  }
 11106  func rewriteValuePPC64_OpPPC64MOVHstorezero_0(v *Value) bool {
 11107  	// match: (MOVHstorezero [off1] {sym} (ADDconst [off2] x) mem)
 11108  	// cond: is16Bit(off1+off2)
 11109  	// result: (MOVHstorezero [off1+off2] {sym} x mem)
 11110  	for {
 11111  		off1 := v.AuxInt
 11112  		sym := v.Aux
 11113  		_ = v.Args[1]
 11114  		v_0 := v.Args[0]
 11115  		if v_0.Op != OpPPC64ADDconst {
 11116  			break
 11117  		}
 11118  		off2 := v_0.AuxInt
 11119  		x := v_0.Args[0]
 11120  		mem := v.Args[1]
 11121  		if !(is16Bit(off1 + off2)) {
 11122  			break
 11123  		}
 11124  		v.reset(OpPPC64MOVHstorezero)
 11125  		v.AuxInt = off1 + off2
 11126  		v.Aux = sym
 11127  		v.AddArg(x)
 11128  		v.AddArg(mem)
 11129  		return true
 11130  	}
 11131  	// match: (MOVHstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 11132  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
 11133  	// result: (MOVHstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
 11134  	for {
 11135  		off1 := v.AuxInt
 11136  		sym1 := v.Aux
 11137  		_ = v.Args[1]
 11138  		p := v.Args[0]
 11139  		if p.Op != OpPPC64MOVDaddr {
 11140  			break
 11141  		}
 11142  		off2 := p.AuxInt
 11143  		sym2 := p.Aux
 11144  		x := p.Args[0]
 11145  		mem := v.Args[1]
 11146  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
 11147  			break
 11148  		}
 11149  		v.reset(OpPPC64MOVHstorezero)
 11150  		v.AuxInt = off1 + off2
 11151  		v.Aux = mergeSym(sym1, sym2)
 11152  		v.AddArg(x)
 11153  		v.AddArg(mem)
 11154  		return true
 11155  	}
 11156  	return false
 11157  }
 11158  func rewriteValuePPC64_OpPPC64MOVWBRstore_0(v *Value) bool {
 11159  	// match: (MOVWBRstore {sym} ptr (MOVWreg x) mem)
 11160  	// cond:
 11161  	// result: (MOVWBRstore {sym} ptr x mem)
 11162  	for {
 11163  		sym := v.Aux
 11164  		_ = v.Args[2]
 11165  		ptr := v.Args[0]
 11166  		v_1 := v.Args[1]
 11167  		if v_1.Op != OpPPC64MOVWreg {
 11168  			break
 11169  		}
 11170  		x := v_1.Args[0]
 11171  		mem := v.Args[2]
 11172  		v.reset(OpPPC64MOVWBRstore)
 11173  		v.Aux = sym
 11174  		v.AddArg(ptr)
 11175  		v.AddArg(x)
 11176  		v.AddArg(mem)
 11177  		return true
 11178  	}
 11179  	// match: (MOVWBRstore {sym} ptr (MOVWZreg x) mem)
 11180  	// cond:
 11181  	// result: (MOVWBRstore {sym} ptr x mem)
 11182  	for {
 11183  		sym := v.Aux
 11184  		_ = v.Args[2]
 11185  		ptr := v.Args[0]
 11186  		v_1 := v.Args[1]
 11187  		if v_1.Op != OpPPC64MOVWZreg {
 11188  			break
 11189  		}
 11190  		x := v_1.Args[0]
 11191  		mem := v.Args[2]
 11192  		v.reset(OpPPC64MOVWBRstore)
 11193  		v.Aux = sym
 11194  		v.AddArg(ptr)
 11195  		v.AddArg(x)
 11196  		v.AddArg(mem)
 11197  		return true
 11198  	}
 11199  	return false
 11200  }
 11201  func rewriteValuePPC64_OpPPC64MOVWZload_0(v *Value) bool {
 11202  	// match: (MOVWZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 11203  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 11204  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11205  	for {
 11206  		off1 := v.AuxInt
 11207  		sym1 := v.Aux
 11208  		_ = v.Args[1]
 11209  		p := v.Args[0]
 11210  		if p.Op != OpPPC64MOVDaddr {
 11211  			break
 11212  		}
 11213  		off2 := p.AuxInt
 11214  		sym2 := p.Aux
 11215  		ptr := p.Args[0]
 11216  		mem := v.Args[1]
 11217  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 11218  			break
 11219  		}
 11220  		v.reset(OpPPC64MOVWZload)
 11221  		v.AuxInt = off1 + off2
 11222  		v.Aux = mergeSym(sym1, sym2)
 11223  		v.AddArg(ptr)
 11224  		v.AddArg(mem)
 11225  		return true
 11226  	}
 11227  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] x) mem)
 11228  	// cond: is16Bit(off1+off2)
 11229  	// result: (MOVWZload [off1+off2] {sym} x mem)
 11230  	for {
 11231  		off1 := v.AuxInt
 11232  		sym := v.Aux
 11233  		_ = v.Args[1]
 11234  		v_0 := v.Args[0]
 11235  		if v_0.Op != OpPPC64ADDconst {
 11236  			break
 11237  		}
 11238  		off2 := v_0.AuxInt
 11239  		x := v_0.Args[0]
 11240  		mem := v.Args[1]
 11241  		if !(is16Bit(off1 + off2)) {
 11242  			break
 11243  		}
 11244  		v.reset(OpPPC64MOVWZload)
 11245  		v.AuxInt = off1 + off2
 11246  		v.Aux = sym
 11247  		v.AddArg(x)
 11248  		v.AddArg(mem)
 11249  		return true
 11250  	}
 11251  	// match: (MOVWZload [0] {sym} p:(ADD ptr idx) mem)
 11252  	// cond: sym == nil && p.Uses == 1
 11253  	// result: (MOVWZloadidx ptr idx mem)
 11254  	for {
 11255  		if v.AuxInt != 0 {
 11256  			break
 11257  		}
 11258  		sym := v.Aux
 11259  		_ = v.Args[1]
 11260  		p := v.Args[0]
 11261  		if p.Op != OpPPC64ADD {
 11262  			break
 11263  		}
 11264  		_ = p.Args[1]
 11265  		ptr := p.Args[0]
 11266  		idx := p.Args[1]
 11267  		mem := v.Args[1]
 11268  		if !(sym == nil && p.Uses == 1) {
 11269  			break
 11270  		}
 11271  		v.reset(OpPPC64MOVWZloadidx)
 11272  		v.AddArg(ptr)
 11273  		v.AddArg(idx)
 11274  		v.AddArg(mem)
 11275  		return true
 11276  	}
 11277  	return false
 11278  }
 11279  func rewriteValuePPC64_OpPPC64MOVWZloadidx_0(v *Value) bool {
 11280  	// match: (MOVWZloadidx ptr (MOVDconst [c]) mem)
 11281  	// cond: is16Bit(c)
 11282  	// result: (MOVWZload [c] ptr mem)
 11283  	for {
 11284  		_ = v.Args[2]
 11285  		ptr := v.Args[0]
 11286  		v_1 := v.Args[1]
 11287  		if v_1.Op != OpPPC64MOVDconst {
 11288  			break
 11289  		}
 11290  		c := v_1.AuxInt
 11291  		mem := v.Args[2]
 11292  		if !(is16Bit(c)) {
 11293  			break
 11294  		}
 11295  		v.reset(OpPPC64MOVWZload)
 11296  		v.AuxInt = c
 11297  		v.AddArg(ptr)
 11298  		v.AddArg(mem)
 11299  		return true
 11300  	}
 11301  	// match: (MOVWZloadidx (MOVDconst [c]) ptr mem)
 11302  	// cond: is16Bit(c)
 11303  	// result: (MOVWZload [c] ptr mem)
 11304  	for {
 11305  		_ = v.Args[2]
 11306  		v_0 := v.Args[0]
 11307  		if v_0.Op != OpPPC64MOVDconst {
 11308  			break
 11309  		}
 11310  		c := v_0.AuxInt
 11311  		ptr := v.Args[1]
 11312  		mem := v.Args[2]
 11313  		if !(is16Bit(c)) {
 11314  			break
 11315  		}
 11316  		v.reset(OpPPC64MOVWZload)
 11317  		v.AuxInt = c
 11318  		v.AddArg(ptr)
 11319  		v.AddArg(mem)
 11320  		return true
 11321  	}
 11322  	return false
 11323  }
 11324  func rewriteValuePPC64_OpPPC64MOVWZreg_0(v *Value) bool {
 11325  	b := v.Block
 11326  	_ = b
 11327  	typ := &b.Func.Config.Types
 11328  	_ = typ
 11329  	// match: (MOVWZreg y:(ANDconst [c] _))
 11330  	// cond: uint64(c) <= 0xFFFFFFFF
 11331  	// result: y
 11332  	for {
 11333  		y := v.Args[0]
 11334  		if y.Op != OpPPC64ANDconst {
 11335  			break
 11336  		}
 11337  		c := y.AuxInt
 11338  		if !(uint64(c) <= 0xFFFFFFFF) {
 11339  			break
 11340  		}
 11341  		v.reset(OpCopy)
 11342  		v.Type = y.Type
 11343  		v.AddArg(y)
 11344  		return true
 11345  	}
 11346  	// match: (MOVWZreg y:(AND (MOVDconst [c]) _))
 11347  	// cond: uint64(c) <= 0xFFFFFFFF
 11348  	// result: y
 11349  	for {
 11350  		y := v.Args[0]
 11351  		if y.Op != OpPPC64AND {
 11352  			break
 11353  		}
 11354  		_ = y.Args[1]
 11355  		y_0 := y.Args[0]
 11356  		if y_0.Op != OpPPC64MOVDconst {
 11357  			break
 11358  		}
 11359  		c := y_0.AuxInt
 11360  		if !(uint64(c) <= 0xFFFFFFFF) {
 11361  			break
 11362  		}
 11363  		v.reset(OpCopy)
 11364  		v.Type = y.Type
 11365  		v.AddArg(y)
 11366  		return true
 11367  	}
 11368  	// match: (MOVWZreg y:(AND _ (MOVDconst [c])))
 11369  	// cond: uint64(c) <= 0xFFFFFFFF
 11370  	// result: y
 11371  	for {
 11372  		y := v.Args[0]
 11373  		if y.Op != OpPPC64AND {
 11374  			break
 11375  		}
 11376  		_ = y.Args[1]
 11377  		y_1 := y.Args[1]
 11378  		if y_1.Op != OpPPC64MOVDconst {
 11379  			break
 11380  		}
 11381  		c := y_1.AuxInt
 11382  		if !(uint64(c) <= 0xFFFFFFFF) {
 11383  			break
 11384  		}
 11385  		v.reset(OpCopy)
 11386  		v.Type = y.Type
 11387  		v.AddArg(y)
 11388  		return true
 11389  	}
 11390  	// match: (MOVWZreg (SRWconst [c] (MOVBZreg x)))
 11391  	// cond:
 11392  	// result: (SRWconst [c] (MOVBZreg x))
 11393  	for {
 11394  		v_0 := v.Args[0]
 11395  		if v_0.Op != OpPPC64SRWconst {
 11396  			break
 11397  		}
 11398  		c := v_0.AuxInt
 11399  		v_0_0 := v_0.Args[0]
 11400  		if v_0_0.Op != OpPPC64MOVBZreg {
 11401  			break
 11402  		}
 11403  		x := v_0_0.Args[0]
 11404  		v.reset(OpPPC64SRWconst)
 11405  		v.AuxInt = c
 11406  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 11407  		v0.AddArg(x)
 11408  		v.AddArg(v0)
 11409  		return true
 11410  	}
 11411  	// match: (MOVWZreg (SRWconst [c] (MOVHZreg x)))
 11412  	// cond:
 11413  	// result: (SRWconst [c] (MOVHZreg x))
 11414  	for {
 11415  		v_0 := v.Args[0]
 11416  		if v_0.Op != OpPPC64SRWconst {
 11417  			break
 11418  		}
 11419  		c := v_0.AuxInt
 11420  		v_0_0 := v_0.Args[0]
 11421  		if v_0_0.Op != OpPPC64MOVHZreg {
 11422  			break
 11423  		}
 11424  		x := v_0_0.Args[0]
 11425  		v.reset(OpPPC64SRWconst)
 11426  		v.AuxInt = c
 11427  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 11428  		v0.AddArg(x)
 11429  		v.AddArg(v0)
 11430  		return true
 11431  	}
 11432  	// match: (MOVWZreg (SRWconst [c] (MOVWZreg x)))
 11433  	// cond:
 11434  	// result: (SRWconst [c] (MOVWZreg x))
 11435  	for {
 11436  		v_0 := v.Args[0]
 11437  		if v_0.Op != OpPPC64SRWconst {
 11438  			break
 11439  		}
 11440  		c := v_0.AuxInt
 11441  		v_0_0 := v_0.Args[0]
 11442  		if v_0_0.Op != OpPPC64MOVWZreg {
 11443  			break
 11444  		}
 11445  		x := v_0_0.Args[0]
 11446  		v.reset(OpPPC64SRWconst)
 11447  		v.AuxInt = c
 11448  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
 11449  		v0.AddArg(x)
 11450  		v.AddArg(v0)
 11451  		return true
 11452  	}
 11453  	// match: (MOVWZreg (SRWconst [c] x))
 11454  	// cond: sizeof(x.Type) <= 32
 11455  	// result: (SRWconst [c] x)
 11456  	for {
 11457  		v_0 := v.Args[0]
 11458  		if v_0.Op != OpPPC64SRWconst {
 11459  			break
 11460  		}
 11461  		c := v_0.AuxInt
 11462  		x := v_0.Args[0]
 11463  		if !(sizeof(x.Type) <= 32) {
 11464  			break
 11465  		}
 11466  		v.reset(OpPPC64SRWconst)
 11467  		v.AuxInt = c
 11468  		v.AddArg(x)
 11469  		return true
 11470  	}
 11471  	// match: (MOVWZreg (SRDconst [c] x))
 11472  	// cond: c>=32
 11473  	// result: (SRDconst [c] x)
 11474  	for {
 11475  		v_0 := v.Args[0]
 11476  		if v_0.Op != OpPPC64SRDconst {
 11477  			break
 11478  		}
 11479  		c := v_0.AuxInt
 11480  		x := v_0.Args[0]
 11481  		if !(c >= 32) {
 11482  			break
 11483  		}
 11484  		v.reset(OpPPC64SRDconst)
 11485  		v.AuxInt = c
 11486  		v.AddArg(x)
 11487  		return true
 11488  	}
 11489  	// match: (MOVWZreg y:(MOVWZreg _))
 11490  	// cond:
 11491  	// result: y
 11492  	for {
 11493  		y := v.Args[0]
 11494  		if y.Op != OpPPC64MOVWZreg {
 11495  			break
 11496  		}
 11497  		v.reset(OpCopy)
 11498  		v.Type = y.Type
 11499  		v.AddArg(y)
 11500  		return true
 11501  	}
 11502  	// match: (MOVWZreg y:(MOVHZreg _))
 11503  	// cond:
 11504  	// result: y
 11505  	for {
 11506  		y := v.Args[0]
 11507  		if y.Op != OpPPC64MOVHZreg {
 11508  			break
 11509  		}
 11510  		v.reset(OpCopy)
 11511  		v.Type = y.Type
 11512  		v.AddArg(y)
 11513  		return true
 11514  	}
 11515  	return false
 11516  }
 11517  func rewriteValuePPC64_OpPPC64MOVWZreg_10(v *Value) bool {
 11518  	// match: (MOVWZreg y:(MOVBZreg _))
 11519  	// cond:
 11520  	// result: y
 11521  	for {
 11522  		y := v.Args[0]
 11523  		if y.Op != OpPPC64MOVBZreg {
 11524  			break
 11525  		}
 11526  		v.reset(OpCopy)
 11527  		v.Type = y.Type
 11528  		v.AddArg(y)
 11529  		return true
 11530  	}
 11531  	// match: (MOVWZreg y:(MOVHBRload _ _))
 11532  	// cond:
 11533  	// result: y
 11534  	for {
 11535  		y := v.Args[0]
 11536  		if y.Op != OpPPC64MOVHBRload {
 11537  			break
 11538  		}
 11539  		_ = y.Args[1]
 11540  		v.reset(OpCopy)
 11541  		v.Type = y.Type
 11542  		v.AddArg(y)
 11543  		return true
 11544  	}
 11545  	// match: (MOVWZreg y:(MOVWBRload _ _))
 11546  	// cond:
 11547  	// result: y
 11548  	for {
 11549  		y := v.Args[0]
 11550  		if y.Op != OpPPC64MOVWBRload {
 11551  			break
 11552  		}
 11553  		_ = y.Args[1]
 11554  		v.reset(OpCopy)
 11555  		v.Type = y.Type
 11556  		v.AddArg(y)
 11557  		return true
 11558  	}
 11559  	// match: (MOVWZreg y:(MOVWreg x))
 11560  	// cond:
 11561  	// result: (MOVWZreg x)
 11562  	for {
 11563  		y := v.Args[0]
 11564  		if y.Op != OpPPC64MOVWreg {
 11565  			break
 11566  		}
 11567  		x := y.Args[0]
 11568  		v.reset(OpPPC64MOVWZreg)
 11569  		v.AddArg(x)
 11570  		return true
 11571  	}
 11572  	// match: (MOVWZreg x:(MOVBZload _ _))
 11573  	// cond:
 11574  	// result: x
 11575  	for {
 11576  		x := v.Args[0]
 11577  		if x.Op != OpPPC64MOVBZload {
 11578  			break
 11579  		}
 11580  		_ = x.Args[1]
 11581  		v.reset(OpCopy)
 11582  		v.Type = x.Type
 11583  		v.AddArg(x)
 11584  		return true
 11585  	}
 11586  	// match: (MOVWZreg x:(MOVBZloadidx _ _ _))
 11587  	// cond:
 11588  	// result: x
 11589  	for {
 11590  		x := v.Args[0]
 11591  		if x.Op != OpPPC64MOVBZloadidx {
 11592  			break
 11593  		}
 11594  		_ = x.Args[2]
 11595  		v.reset(OpCopy)
 11596  		v.Type = x.Type
 11597  		v.AddArg(x)
 11598  		return true
 11599  	}
 11600  	// match: (MOVWZreg x:(MOVHZload _ _))
 11601  	// cond:
 11602  	// result: x
 11603  	for {
 11604  		x := v.Args[0]
 11605  		if x.Op != OpPPC64MOVHZload {
 11606  			break
 11607  		}
 11608  		_ = x.Args[1]
 11609  		v.reset(OpCopy)
 11610  		v.Type = x.Type
 11611  		v.AddArg(x)
 11612  		return true
 11613  	}
 11614  	// match: (MOVWZreg x:(MOVHZloadidx _ _ _))
 11615  	// cond:
 11616  	// result: x
 11617  	for {
 11618  		x := v.Args[0]
 11619  		if x.Op != OpPPC64MOVHZloadidx {
 11620  			break
 11621  		}
 11622  		_ = x.Args[2]
 11623  		v.reset(OpCopy)
 11624  		v.Type = x.Type
 11625  		v.AddArg(x)
 11626  		return true
 11627  	}
 11628  	// match: (MOVWZreg x:(MOVWZload _ _))
 11629  	// cond:
 11630  	// result: x
 11631  	for {
 11632  		x := v.Args[0]
 11633  		if x.Op != OpPPC64MOVWZload {
 11634  			break
 11635  		}
 11636  		_ = x.Args[1]
 11637  		v.reset(OpCopy)
 11638  		v.Type = x.Type
 11639  		v.AddArg(x)
 11640  		return true
 11641  	}
 11642  	// match: (MOVWZreg x:(MOVWZloadidx _ _ _))
 11643  	// cond:
 11644  	// result: x
 11645  	for {
 11646  		x := v.Args[0]
 11647  		if x.Op != OpPPC64MOVWZloadidx {
 11648  			break
 11649  		}
 11650  		_ = x.Args[2]
 11651  		v.reset(OpCopy)
 11652  		v.Type = x.Type
 11653  		v.AddArg(x)
 11654  		return true
 11655  	}
 11656  	return false
 11657  }
 11658  func rewriteValuePPC64_OpPPC64MOVWZreg_20(v *Value) bool {
 11659  	// match: (MOVWZreg x:(Arg <t>))
 11660  	// cond: (is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)
 11661  	// result: x
 11662  	for {
 11663  		x := v.Args[0]
 11664  		if x.Op != OpArg {
 11665  			break
 11666  		}
 11667  		t := x.Type
 11668  		if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)) {
 11669  			break
 11670  		}
 11671  		v.reset(OpCopy)
 11672  		v.Type = x.Type
 11673  		v.AddArg(x)
 11674  		return true
 11675  	}
 11676  	// match: (MOVWZreg (MOVDconst [c]))
 11677  	// cond:
 11678  	// result: (MOVDconst [int64(uint32(c))])
 11679  	for {
 11680  		v_0 := v.Args[0]
 11681  		if v_0.Op != OpPPC64MOVDconst {
 11682  			break
 11683  		}
 11684  		c := v_0.AuxInt
 11685  		v.reset(OpPPC64MOVDconst)
 11686  		v.AuxInt = int64(uint32(c))
 11687  		return true
 11688  	}
 11689  	return false
 11690  }
 11691  func rewriteValuePPC64_OpPPC64MOVWload_0(v *Value) bool {
 11692  	// match: (MOVWload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 11693  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 11694  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 11695  	for {
 11696  		off1 := v.AuxInt
 11697  		sym1 := v.Aux
 11698  		_ = v.Args[1]
 11699  		p := v.Args[0]
 11700  		if p.Op != OpPPC64MOVDaddr {
 11701  			break
 11702  		}
 11703  		off2 := p.AuxInt
 11704  		sym2 := p.Aux
 11705  		ptr := p.Args[0]
 11706  		mem := v.Args[1]
 11707  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 11708  			break
 11709  		}
 11710  		v.reset(OpPPC64MOVWload)
 11711  		v.AuxInt = off1 + off2
 11712  		v.Aux = mergeSym(sym1, sym2)
 11713  		v.AddArg(ptr)
 11714  		v.AddArg(mem)
 11715  		return true
 11716  	}
 11717  	// match: (MOVWload [off1] {sym} (ADDconst [off2] x) mem)
 11718  	// cond: is16Bit(off1+off2)
 11719  	// result: (MOVWload [off1+off2] {sym} x mem)
 11720  	for {
 11721  		off1 := v.AuxInt
 11722  		sym := v.Aux
 11723  		_ = v.Args[1]
 11724  		v_0 := v.Args[0]
 11725  		if v_0.Op != OpPPC64ADDconst {
 11726  			break
 11727  		}
 11728  		off2 := v_0.AuxInt
 11729  		x := v_0.Args[0]
 11730  		mem := v.Args[1]
 11731  		if !(is16Bit(off1 + off2)) {
 11732  			break
 11733  		}
 11734  		v.reset(OpPPC64MOVWload)
 11735  		v.AuxInt = off1 + off2
 11736  		v.Aux = sym
 11737  		v.AddArg(x)
 11738  		v.AddArg(mem)
 11739  		return true
 11740  	}
 11741  	// match: (MOVWload [0] {sym} p:(ADD ptr idx) mem)
 11742  	// cond: sym == nil && p.Uses == 1
 11743  	// result: (MOVWloadidx ptr idx mem)
 11744  	for {
 11745  		if v.AuxInt != 0 {
 11746  			break
 11747  		}
 11748  		sym := v.Aux
 11749  		_ = v.Args[1]
 11750  		p := v.Args[0]
 11751  		if p.Op != OpPPC64ADD {
 11752  			break
 11753  		}
 11754  		_ = p.Args[1]
 11755  		ptr := p.Args[0]
 11756  		idx := p.Args[1]
 11757  		mem := v.Args[1]
 11758  		if !(sym == nil && p.Uses == 1) {
 11759  			break
 11760  		}
 11761  		v.reset(OpPPC64MOVWloadidx)
 11762  		v.AddArg(ptr)
 11763  		v.AddArg(idx)
 11764  		v.AddArg(mem)
 11765  		return true
 11766  	}
 11767  	return false
 11768  }
 11769  func rewriteValuePPC64_OpPPC64MOVWloadidx_0(v *Value) bool {
 11770  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 11771  	// cond: is16Bit(c)
 11772  	// result: (MOVWload [c] ptr mem)
 11773  	for {
 11774  		_ = v.Args[2]
 11775  		ptr := v.Args[0]
 11776  		v_1 := v.Args[1]
 11777  		if v_1.Op != OpPPC64MOVDconst {
 11778  			break
 11779  		}
 11780  		c := v_1.AuxInt
 11781  		mem := v.Args[2]
 11782  		if !(is16Bit(c)) {
 11783  			break
 11784  		}
 11785  		v.reset(OpPPC64MOVWload)
 11786  		v.AuxInt = c
 11787  		v.AddArg(ptr)
 11788  		v.AddArg(mem)
 11789  		return true
 11790  	}
 11791  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 11792  	// cond: is16Bit(c)
 11793  	// result: (MOVWload [c] ptr mem)
 11794  	for {
 11795  		_ = v.Args[2]
 11796  		v_0 := v.Args[0]
 11797  		if v_0.Op != OpPPC64MOVDconst {
 11798  			break
 11799  		}
 11800  		c := v_0.AuxInt
 11801  		ptr := v.Args[1]
 11802  		mem := v.Args[2]
 11803  		if !(is16Bit(c)) {
 11804  			break
 11805  		}
 11806  		v.reset(OpPPC64MOVWload)
 11807  		v.AuxInt = c
 11808  		v.AddArg(ptr)
 11809  		v.AddArg(mem)
 11810  		return true
 11811  	}
 11812  	return false
 11813  }
 11814  func rewriteValuePPC64_OpPPC64MOVWreg_0(v *Value) bool {
 11815  	b := v.Block
 11816  	_ = b
 11817  	typ := &b.Func.Config.Types
 11818  	_ = typ
 11819  	// match: (MOVWreg y:(ANDconst [c] _))
 11820  	// cond: uint64(c) <= 0xFFFF
 11821  	// result: y
 11822  	for {
 11823  		y := v.Args[0]
 11824  		if y.Op != OpPPC64ANDconst {
 11825  			break
 11826  		}
 11827  		c := y.AuxInt
 11828  		if !(uint64(c) <= 0xFFFF) {
 11829  			break
 11830  		}
 11831  		v.reset(OpCopy)
 11832  		v.Type = y.Type
 11833  		v.AddArg(y)
 11834  		return true
 11835  	}
 11836  	// match: (MOVWreg y:(AND (MOVDconst [c]) _))
 11837  	// cond: uint64(c) <= 0x7FFFFFFF
 11838  	// result: y
 11839  	for {
 11840  		y := v.Args[0]
 11841  		if y.Op != OpPPC64AND {
 11842  			break
 11843  		}
 11844  		_ = y.Args[1]
 11845  		y_0 := y.Args[0]
 11846  		if y_0.Op != OpPPC64MOVDconst {
 11847  			break
 11848  		}
 11849  		c := y_0.AuxInt
 11850  		if !(uint64(c) <= 0x7FFFFFFF) {
 11851  			break
 11852  		}
 11853  		v.reset(OpCopy)
 11854  		v.Type = y.Type
 11855  		v.AddArg(y)
 11856  		return true
 11857  	}
 11858  	// match: (MOVWreg y:(AND _ (MOVDconst [c])))
 11859  	// cond: uint64(c) <= 0x7FFFFFFF
 11860  	// result: y
 11861  	for {
 11862  		y := v.Args[0]
 11863  		if y.Op != OpPPC64AND {
 11864  			break
 11865  		}
 11866  		_ = y.Args[1]
 11867  		y_1 := y.Args[1]
 11868  		if y_1.Op != OpPPC64MOVDconst {
 11869  			break
 11870  		}
 11871  		c := y_1.AuxInt
 11872  		if !(uint64(c) <= 0x7FFFFFFF) {
 11873  			break
 11874  		}
 11875  		v.reset(OpCopy)
 11876  		v.Type = y.Type
 11877  		v.AddArg(y)
 11878  		return true
 11879  	}
 11880  	// match: (MOVWreg (SRAWconst [c] (MOVBreg x)))
 11881  	// cond:
 11882  	// result: (SRAWconst [c] (MOVBreg x))
 11883  	for {
 11884  		v_0 := v.Args[0]
 11885  		if v_0.Op != OpPPC64SRAWconst {
 11886  			break
 11887  		}
 11888  		c := v_0.AuxInt
 11889  		v_0_0 := v_0.Args[0]
 11890  		if v_0_0.Op != OpPPC64MOVBreg {
 11891  			break
 11892  		}
 11893  		x := v_0_0.Args[0]
 11894  		v.reset(OpPPC64SRAWconst)
 11895  		v.AuxInt = c
 11896  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 11897  		v0.AddArg(x)
 11898  		v.AddArg(v0)
 11899  		return true
 11900  	}
 11901  	// match: (MOVWreg (SRAWconst [c] (MOVHreg x)))
 11902  	// cond:
 11903  	// result: (SRAWconst [c] (MOVHreg x))
 11904  	for {
 11905  		v_0 := v.Args[0]
 11906  		if v_0.Op != OpPPC64SRAWconst {
 11907  			break
 11908  		}
 11909  		c := v_0.AuxInt
 11910  		v_0_0 := v_0.Args[0]
 11911  		if v_0_0.Op != OpPPC64MOVHreg {
 11912  			break
 11913  		}
 11914  		x := v_0_0.Args[0]
 11915  		v.reset(OpPPC64SRAWconst)
 11916  		v.AuxInt = c
 11917  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 11918  		v0.AddArg(x)
 11919  		v.AddArg(v0)
 11920  		return true
 11921  	}
 11922  	// match: (MOVWreg (SRAWconst [c] (MOVWreg x)))
 11923  	// cond:
 11924  	// result: (SRAWconst [c] (MOVWreg x))
 11925  	for {
 11926  		v_0 := v.Args[0]
 11927  		if v_0.Op != OpPPC64SRAWconst {
 11928  			break
 11929  		}
 11930  		c := v_0.AuxInt
 11931  		v_0_0 := v_0.Args[0]
 11932  		if v_0_0.Op != OpPPC64MOVWreg {
 11933  			break
 11934  		}
 11935  		x := v_0_0.Args[0]
 11936  		v.reset(OpPPC64SRAWconst)
 11937  		v.AuxInt = c
 11938  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWreg, typ.Int64)
 11939  		v0.AddArg(x)
 11940  		v.AddArg(v0)
 11941  		return true
 11942  	}
 11943  	// match: (MOVWreg (SRAWconst [c] x))
 11944  	// cond: sizeof(x.Type) <= 32
 11945  	// result: (SRAWconst [c] x)
 11946  	for {
 11947  		v_0 := v.Args[0]
 11948  		if v_0.Op != OpPPC64SRAWconst {
 11949  			break
 11950  		}
 11951  		c := v_0.AuxInt
 11952  		x := v_0.Args[0]
 11953  		if !(sizeof(x.Type) <= 32) {
 11954  			break
 11955  		}
 11956  		v.reset(OpPPC64SRAWconst)
 11957  		v.AuxInt = c
 11958  		v.AddArg(x)
 11959  		return true
 11960  	}
 11961  	// match: (MOVWreg (SRDconst [c] x))
 11962  	// cond: c>32
 11963  	// result: (SRDconst [c] x)
 11964  	for {
 11965  		v_0 := v.Args[0]
 11966  		if v_0.Op != OpPPC64SRDconst {
 11967  			break
 11968  		}
 11969  		c := v_0.AuxInt
 11970  		x := v_0.Args[0]
 11971  		if !(c > 32) {
 11972  			break
 11973  		}
 11974  		v.reset(OpPPC64SRDconst)
 11975  		v.AuxInt = c
 11976  		v.AddArg(x)
 11977  		return true
 11978  	}
 11979  	// match: (MOVWreg (SRDconst [c] x))
 11980  	// cond: c==32
 11981  	// result: (SRADconst [c] x)
 11982  	for {
 11983  		v_0 := v.Args[0]
 11984  		if v_0.Op != OpPPC64SRDconst {
 11985  			break
 11986  		}
 11987  		c := v_0.AuxInt
 11988  		x := v_0.Args[0]
 11989  		if !(c == 32) {
 11990  			break
 11991  		}
 11992  		v.reset(OpPPC64SRADconst)
 11993  		v.AuxInt = c
 11994  		v.AddArg(x)
 11995  		return true
 11996  	}
 11997  	// match: (MOVWreg y:(MOVWreg _))
 11998  	// cond:
 11999  	// result: y
 12000  	for {
 12001  		y := v.Args[0]
 12002  		if y.Op != OpPPC64MOVWreg {
 12003  			break
 12004  		}
 12005  		v.reset(OpCopy)
 12006  		v.Type = y.Type
 12007  		v.AddArg(y)
 12008  		return true
 12009  	}
 12010  	return false
 12011  }
 12012  func rewriteValuePPC64_OpPPC64MOVWreg_10(v *Value) bool {
 12013  	// match: (MOVWreg y:(MOVHreg _))
 12014  	// cond:
 12015  	// result: y
 12016  	for {
 12017  		y := v.Args[0]
 12018  		if y.Op != OpPPC64MOVHreg {
 12019  			break
 12020  		}
 12021  		v.reset(OpCopy)
 12022  		v.Type = y.Type
 12023  		v.AddArg(y)
 12024  		return true
 12025  	}
 12026  	// match: (MOVWreg y:(MOVBreg _))
 12027  	// cond:
 12028  	// result: y
 12029  	for {
 12030  		y := v.Args[0]
 12031  		if y.Op != OpPPC64MOVBreg {
 12032  			break
 12033  		}
 12034  		v.reset(OpCopy)
 12035  		v.Type = y.Type
 12036  		v.AddArg(y)
 12037  		return true
 12038  	}
 12039  	// match: (MOVWreg y:(MOVWZreg x))
 12040  	// cond:
 12041  	// result: (MOVWreg x)
 12042  	for {
 12043  		y := v.Args[0]
 12044  		if y.Op != OpPPC64MOVWZreg {
 12045  			break
 12046  		}
 12047  		x := y.Args[0]
 12048  		v.reset(OpPPC64MOVWreg)
 12049  		v.AddArg(x)
 12050  		return true
 12051  	}
 12052  	// match: (MOVWreg x:(MOVHload _ _))
 12053  	// cond:
 12054  	// result: x
 12055  	for {
 12056  		x := v.Args[0]
 12057  		if x.Op != OpPPC64MOVHload {
 12058  			break
 12059  		}
 12060  		_ = x.Args[1]
 12061  		v.reset(OpCopy)
 12062  		v.Type = x.Type
 12063  		v.AddArg(x)
 12064  		return true
 12065  	}
 12066  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
 12067  	// cond:
 12068  	// result: x
 12069  	for {
 12070  		x := v.Args[0]
 12071  		if x.Op != OpPPC64MOVHloadidx {
 12072  			break
 12073  		}
 12074  		_ = x.Args[2]
 12075  		v.reset(OpCopy)
 12076  		v.Type = x.Type
 12077  		v.AddArg(x)
 12078  		return true
 12079  	}
 12080  	// match: (MOVWreg x:(MOVWload _ _))
 12081  	// cond:
 12082  	// result: x
 12083  	for {
 12084  		x := v.Args[0]
 12085  		if x.Op != OpPPC64MOVWload {
 12086  			break
 12087  		}
 12088  		_ = x.Args[1]
 12089  		v.reset(OpCopy)
 12090  		v.Type = x.Type
 12091  		v.AddArg(x)
 12092  		return true
 12093  	}
 12094  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
 12095  	// cond:
 12096  	// result: x
 12097  	for {
 12098  		x := v.Args[0]
 12099  		if x.Op != OpPPC64MOVWloadidx {
 12100  			break
 12101  		}
 12102  		_ = x.Args[2]
 12103  		v.reset(OpCopy)
 12104  		v.Type = x.Type
 12105  		v.AddArg(x)
 12106  		return true
 12107  	}
 12108  	// match: (MOVWreg x:(Arg <t>))
 12109  	// cond: (is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)
 12110  	// result: x
 12111  	for {
 12112  		x := v.Args[0]
 12113  		if x.Op != OpArg {
 12114  			break
 12115  		}
 12116  		t := x.Type
 12117  		if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)) {
 12118  			break
 12119  		}
 12120  		v.reset(OpCopy)
 12121  		v.Type = x.Type
 12122  		v.AddArg(x)
 12123  		return true
 12124  	}
 12125  	// match: (MOVWreg (MOVDconst [c]))
 12126  	// cond:
 12127  	// result: (MOVDconst [int64(int32(c))])
 12128  	for {
 12129  		v_0 := v.Args[0]
 12130  		if v_0.Op != OpPPC64MOVDconst {
 12131  			break
 12132  		}
 12133  		c := v_0.AuxInt
 12134  		v.reset(OpPPC64MOVDconst)
 12135  		v.AuxInt = int64(int32(c))
 12136  		return true
 12137  	}
 12138  	return false
 12139  }
 12140  func rewriteValuePPC64_OpPPC64MOVWstore_0(v *Value) bool {
 12141  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] x) val mem)
 12142  	// cond: is16Bit(off1+off2)
 12143  	// result: (MOVWstore [off1+off2] {sym} x val mem)
 12144  	for {
 12145  		off1 := v.AuxInt
 12146  		sym := v.Aux
 12147  		_ = v.Args[2]
 12148  		v_0 := v.Args[0]
 12149  		if v_0.Op != OpPPC64ADDconst {
 12150  			break
 12151  		}
 12152  		off2 := v_0.AuxInt
 12153  		x := v_0.Args[0]
 12154  		val := v.Args[1]
 12155  		mem := v.Args[2]
 12156  		if !(is16Bit(off1 + off2)) {
 12157  			break
 12158  		}
 12159  		v.reset(OpPPC64MOVWstore)
 12160  		v.AuxInt = off1 + off2
 12161  		v.Aux = sym
 12162  		v.AddArg(x)
 12163  		v.AddArg(val)
 12164  		v.AddArg(mem)
 12165  		return true
 12166  	}
 12167  	// match: (MOVWstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
 12168  	// cond: canMergeSym(sym1,sym2) && (ptr.Op != OpSB || p.Uses == 1)
 12169  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 12170  	for {
 12171  		off1 := v.AuxInt
 12172  		sym1 := v.Aux
 12173  		_ = v.Args[2]
 12174  		p := v.Args[0]
 12175  		if p.Op != OpPPC64MOVDaddr {
 12176  			break
 12177  		}
 12178  		off2 := p.AuxInt
 12179  		sym2 := p.Aux
 12180  		ptr := p.Args[0]
 12181  		val := v.Args[1]
 12182  		mem := v.Args[2]
 12183  		if !(canMergeSym(sym1, sym2) && (ptr.Op != OpSB || p.Uses == 1)) {
 12184  			break
 12185  		}
 12186  		v.reset(OpPPC64MOVWstore)
 12187  		v.AuxInt = off1 + off2
 12188  		v.Aux = mergeSym(sym1, sym2)
 12189  		v.AddArg(ptr)
 12190  		v.AddArg(val)
 12191  		v.AddArg(mem)
 12192  		return true
 12193  	}
 12194  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [0]) mem)
 12195  	// cond:
 12196  	// result: (MOVWstorezero [off] {sym} ptr mem)
 12197  	for {
 12198  		off := v.AuxInt
 12199  		sym := v.Aux
 12200  		_ = v.Args[2]
 12201  		ptr := v.Args[0]
 12202  		v_1 := v.Args[1]
 12203  		if v_1.Op != OpPPC64MOVDconst {
 12204  			break
 12205  		}
 12206  		if v_1.AuxInt != 0 {
 12207  			break
 12208  		}
 12209  		mem := v.Args[2]
 12210  		v.reset(OpPPC64MOVWstorezero)
 12211  		v.AuxInt = off
 12212  		v.Aux = sym
 12213  		v.AddArg(ptr)
 12214  		v.AddArg(mem)
 12215  		return true
 12216  	}
 12217  	// match: (MOVWstore [off] {sym} p:(ADD ptr idx) val mem)
 12218  	// cond: off == 0 && sym == nil && p.Uses == 1
 12219  	// result: (MOVWstoreidx ptr idx val mem)
 12220  	for {
 12221  		off := v.AuxInt
 12222  		sym := v.Aux
 12223  		_ = v.Args[2]
 12224  		p := v.Args[0]
 12225  		if p.Op != OpPPC64ADD {
 12226  			break
 12227  		}
 12228  		_ = p.Args[1]
 12229  		ptr := p.Args[0]
 12230  		idx := p.Args[1]
 12231  		val := v.Args[1]
 12232  		mem := v.Args[2]
 12233  		if !(off == 0 && sym == nil && p.Uses == 1) {
 12234  			break
 12235  		}
 12236  		v.reset(OpPPC64MOVWstoreidx)
 12237  		v.AddArg(ptr)
 12238  		v.AddArg(idx)
 12239  		v.AddArg(val)
 12240  		v.AddArg(mem)
 12241  		return true
 12242  	}
 12243  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 12244  	// cond:
 12245  	// result: (MOVWstore [off] {sym} ptr x mem)
 12246  	for {
 12247  		off := v.AuxInt
 12248  		sym := v.Aux
 12249  		_ = v.Args[2]
 12250  		ptr := v.Args[0]
 12251  		v_1 := v.Args[1]
 12252  		if v_1.Op != OpPPC64MOVWreg {
 12253  			break
 12254  		}
 12255  		x := v_1.Args[0]
 12256  		mem := v.Args[2]
 12257  		v.reset(OpPPC64MOVWstore)
 12258  		v.AuxInt = off
 12259  		v.Aux = sym
 12260  		v.AddArg(ptr)
 12261  		v.AddArg(x)
 12262  		v.AddArg(mem)
 12263  		return true
 12264  	}
 12265  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 12266  	// cond:
 12267  	// result: (MOVWstore [off] {sym} ptr x mem)
 12268  	for {
 12269  		off := v.AuxInt
 12270  		sym := v.Aux
 12271  		_ = v.Args[2]
 12272  		ptr := v.Args[0]
 12273  		v_1 := v.Args[1]
 12274  		if v_1.Op != OpPPC64MOVWZreg {
 12275  			break
 12276  		}
 12277  		x := v_1.Args[0]
 12278  		mem := v.Args[2]
 12279  		v.reset(OpPPC64MOVWstore)
 12280  		v.AuxInt = off
 12281  		v.Aux = sym
 12282  		v.AddArg(ptr)
 12283  		v.AddArg(x)
 12284  		v.AddArg(mem)
 12285  		return true
 12286  	}
 12287  	return false
 12288  }
 12289  func rewriteValuePPC64_OpPPC64MOVWstoreidx_0(v *Value) bool {
 12290  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 12291  	// cond: is16Bit(c)
 12292  	// result: (MOVWstore [c] ptr val mem)
 12293  	for {
 12294  		_ = v.Args[3]
 12295  		ptr := v.Args[0]
 12296  		v_1 := v.Args[1]
 12297  		if v_1.Op != OpPPC64MOVDconst {
 12298  			break
 12299  		}
 12300  		c := v_1.AuxInt
 12301  		val := v.Args[2]
 12302  		mem := v.Args[3]
 12303  		if !(is16Bit(c)) {
 12304  			break
 12305  		}
 12306  		v.reset(OpPPC64MOVWstore)
 12307  		v.AuxInt = c
 12308  		v.AddArg(ptr)
 12309  		v.AddArg(val)
 12310  		v.AddArg(mem)
 12311  		return true
 12312  	}
 12313  	// match: (MOVWstoreidx (MOVDconst [c]) ptr val mem)
 12314  	// cond: is16Bit(c)
 12315  	// result: (MOVWstore [c] ptr val mem)
 12316  	for {
 12317  		_ = v.Args[3]
 12318  		v_0 := v.Args[0]
 12319  		if v_0.Op != OpPPC64MOVDconst {
 12320  			break
 12321  		}
 12322  		c := v_0.AuxInt
 12323  		ptr := v.Args[1]
 12324  		val := v.Args[2]
 12325  		mem := v.Args[3]
 12326  		if !(is16Bit(c)) {
 12327  			break
 12328  		}
 12329  		v.reset(OpPPC64MOVWstore)
 12330  		v.AuxInt = c
 12331  		v.AddArg(ptr)
 12332  		v.AddArg(val)
 12333  		v.AddArg(mem)
 12334  		return true
 12335  	}
 12336  	// match: (MOVWstoreidx [off] {sym} ptr idx (MOVWreg x) mem)
 12337  	// cond:
 12338  	// result: (MOVWstoreidx [off] {sym} ptr idx x mem)
 12339  	for {
 12340  		off := v.AuxInt
 12341  		sym := v.Aux
 12342  		_ = v.Args[3]
 12343  		ptr := v.Args[0]
 12344  		idx := v.Args[1]
 12345  		v_2 := v.Args[2]
 12346  		if v_2.Op != OpPPC64MOVWreg {
 12347  			break
 12348  		}
 12349  		x := v_2.Args[0]
 12350  		mem := v.Args[3]
 12351  		v.reset(OpPPC64MOVWstoreidx)
 12352  		v.AuxInt = off
 12353  		v.Aux = sym
 12354  		v.AddArg(ptr)
 12355  		v.AddArg(idx)
 12356  		v.AddArg(x)
 12357  		v.AddArg(mem)
 12358  		return true
 12359  	}
 12360  	// match: (MOVWstoreidx [off] {sym} ptr idx (MOVWZreg x) mem)
 12361  	// cond:
 12362  	// result: (MOVWstoreidx [off] {sym} ptr idx x mem)
 12363  	for {
 12364  		off := v.AuxInt
 12365  		sym := v.Aux
 12366  		_ = v.Args[3]
 12367  		ptr := v.Args[0]
 12368  		idx := v.Args[1]
 12369  		v_2 := v.Args[2]
 12370  		if v_2.Op != OpPPC64MOVWZreg {
 12371  			break
 12372  		}
 12373  		x := v_2.Args[0]
 12374  		mem := v.Args[3]
 12375  		v.reset(OpPPC64MOVWstoreidx)
 12376  		v.AuxInt = off
 12377  		v.Aux = sym
 12378  		v.AddArg(ptr)
 12379  		v.AddArg(idx)
 12380  		v.AddArg(x)
 12381  		v.AddArg(mem)
 12382  		return true
 12383  	}
 12384  	return false
 12385  }
 12386  func rewriteValuePPC64_OpPPC64MOVWstorezero_0(v *Value) bool {
 12387  	// match: (MOVWstorezero [off1] {sym} (ADDconst [off2] x) mem)
 12388  	// cond: is16Bit(off1+off2)
 12389  	// result: (MOVWstorezero [off1+off2] {sym} x mem)
 12390  	for {
 12391  		off1 := v.AuxInt
 12392  		sym := v.Aux
 12393  		_ = v.Args[1]
 12394  		v_0 := v.Args[0]
 12395  		if v_0.Op != OpPPC64ADDconst {
 12396  			break
 12397  		}
 12398  		off2 := v_0.AuxInt
 12399  		x := v_0.Args[0]
 12400  		mem := v.Args[1]
 12401  		if !(is16Bit(off1 + off2)) {
 12402  			break
 12403  		}
 12404  		v.reset(OpPPC64MOVWstorezero)
 12405  		v.AuxInt = off1 + off2
 12406  		v.Aux = sym
 12407  		v.AddArg(x)
 12408  		v.AddArg(mem)
 12409  		return true
 12410  	}
 12411  	// match: (MOVWstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 12412  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
 12413  	// result: (MOVWstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
 12414  	for {
 12415  		off1 := v.AuxInt
 12416  		sym1 := v.Aux
 12417  		_ = v.Args[1]
 12418  		p := v.Args[0]
 12419  		if p.Op != OpPPC64MOVDaddr {
 12420  			break
 12421  		}
 12422  		off2 := p.AuxInt
 12423  		sym2 := p.Aux
 12424  		x := p.Args[0]
 12425  		mem := v.Args[1]
 12426  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
 12427  			break
 12428  		}
 12429  		v.reset(OpPPC64MOVWstorezero)
 12430  		v.AuxInt = off1 + off2
 12431  		v.Aux = mergeSym(sym1, sym2)
 12432  		v.AddArg(x)
 12433  		v.AddArg(mem)
 12434  		return true
 12435  	}
 12436  	return false
 12437  }
 12438  func rewriteValuePPC64_OpPPC64MTVSRD_0(v *Value) bool {
 12439  	b := v.Block
 12440  	_ = b
 12441  	typ := &b.Func.Config.Types
 12442  	_ = typ
 12443  	// match: (MTVSRD (MOVDconst [c]))
 12444  	// cond:
 12445  	// result: (FMOVDconst [c])
 12446  	for {
 12447  		v_0 := v.Args[0]
 12448  		if v_0.Op != OpPPC64MOVDconst {
 12449  			break
 12450  		}
 12451  		c := v_0.AuxInt
 12452  		v.reset(OpPPC64FMOVDconst)
 12453  		v.AuxInt = c
 12454  		return true
 12455  	}
 12456  	// match: (MTVSRD x:(MOVDload [off] {sym} ptr mem))
 12457  	// cond: x.Uses == 1 && clobber(x)
 12458  	// result: @x.Block (FMOVDload [off] {sym} ptr mem)
 12459  	for {
 12460  		x := v.Args[0]
 12461  		if x.Op != OpPPC64MOVDload {
 12462  			break
 12463  		}
 12464  		off := x.AuxInt
 12465  		sym := x.Aux
 12466  		_ = x.Args[1]
 12467  		ptr := x.Args[0]
 12468  		mem := x.Args[1]
 12469  		if !(x.Uses == 1 && clobber(x)) {
 12470  			break
 12471  		}
 12472  		b = x.Block
 12473  		v0 := b.NewValue0(x.Pos, OpPPC64FMOVDload, typ.Float64)
 12474  		v.reset(OpCopy)
 12475  		v.AddArg(v0)
 12476  		v0.AuxInt = off
 12477  		v0.Aux = sym
 12478  		v0.AddArg(ptr)
 12479  		v0.AddArg(mem)
 12480  		return true
 12481  	}
 12482  	return false
 12483  }
 12484  func rewriteValuePPC64_OpPPC64MaskIfNotCarry_0(v *Value) bool {
 12485  	// match: (MaskIfNotCarry (ADDconstForCarry [c] (ANDconst [d] _)))
 12486  	// cond: c < 0 && d > 0 && c + d < 0
 12487  	// result: (MOVDconst [-1])
 12488  	for {
 12489  		v_0 := v.Args[0]
 12490  		if v_0.Op != OpPPC64ADDconstForCarry {
 12491  			break
 12492  		}
 12493  		c := v_0.AuxInt
 12494  		v_0_0 := v_0.Args[0]
 12495  		if v_0_0.Op != OpPPC64ANDconst {
 12496  			break
 12497  		}
 12498  		d := v_0_0.AuxInt
 12499  		if !(c < 0 && d > 0 && c+d < 0) {
 12500  			break
 12501  		}
 12502  		v.reset(OpPPC64MOVDconst)
 12503  		v.AuxInt = -1
 12504  		return true
 12505  	}
 12506  	return false
 12507  }
 12508  func rewriteValuePPC64_OpPPC64NotEqual_0(v *Value) bool {
 12509  	// match: (NotEqual (FlagEQ))
 12510  	// cond:
 12511  	// result: (MOVDconst [0])
 12512  	for {
 12513  		v_0 := v.Args[0]
 12514  		if v_0.Op != OpPPC64FlagEQ {
 12515  			break
 12516  		}
 12517  		v.reset(OpPPC64MOVDconst)
 12518  		v.AuxInt = 0
 12519  		return true
 12520  	}
 12521  	// match: (NotEqual (FlagLT))
 12522  	// cond:
 12523  	// result: (MOVDconst [1])
 12524  	for {
 12525  		v_0 := v.Args[0]
 12526  		if v_0.Op != OpPPC64FlagLT {
 12527  			break
 12528  		}
 12529  		v.reset(OpPPC64MOVDconst)
 12530  		v.AuxInt = 1
 12531  		return true
 12532  	}
 12533  	// match: (NotEqual (FlagGT))
 12534  	// cond:
 12535  	// result: (MOVDconst [1])
 12536  	for {
 12537  		v_0 := v.Args[0]
 12538  		if v_0.Op != OpPPC64FlagGT {
 12539  			break
 12540  		}
 12541  		v.reset(OpPPC64MOVDconst)
 12542  		v.AuxInt = 1
 12543  		return true
 12544  	}
 12545  	// match: (NotEqual (InvertFlags x))
 12546  	// cond:
 12547  	// result: (NotEqual x)
 12548  	for {
 12549  		v_0 := v.Args[0]
 12550  		if v_0.Op != OpPPC64InvertFlags {
 12551  			break
 12552  		}
 12553  		x := v_0.Args[0]
 12554  		v.reset(OpPPC64NotEqual)
 12555  		v.AddArg(x)
 12556  		return true
 12557  	}
 12558  	return false
 12559  }
 12560  func rewriteValuePPC64_OpPPC64OR_0(v *Value) bool {
 12561  	b := v.Block
 12562  	_ = b
 12563  	typ := &b.Func.Config.Types
 12564  	_ = typ
 12565  	// match: (OR (SLDconst x [c]) (SRDconst x [d]))
 12566  	// cond: d == 64-c
 12567  	// result: (ROTLconst [c] x)
 12568  	for {
 12569  		_ = v.Args[1]
 12570  		v_0 := v.Args[0]
 12571  		if v_0.Op != OpPPC64SLDconst {
 12572  			break
 12573  		}
 12574  		c := v_0.AuxInt
 12575  		x := v_0.Args[0]
 12576  		v_1 := v.Args[1]
 12577  		if v_1.Op != OpPPC64SRDconst {
 12578  			break
 12579  		}
 12580  		d := v_1.AuxInt
 12581  		if x != v_1.Args[0] {
 12582  			break
 12583  		}
 12584  		if !(d == 64-c) {
 12585  			break
 12586  		}
 12587  		v.reset(OpPPC64ROTLconst)
 12588  		v.AuxInt = c
 12589  		v.AddArg(x)
 12590  		return true
 12591  	}
 12592  	// match: (OR (SRDconst x [d]) (SLDconst x [c]))
 12593  	// cond: d == 64-c
 12594  	// result: (ROTLconst [c] x)
 12595  	for {
 12596  		_ = v.Args[1]
 12597  		v_0 := v.Args[0]
 12598  		if v_0.Op != OpPPC64SRDconst {
 12599  			break
 12600  		}
 12601  		d := v_0.AuxInt
 12602  		x := v_0.Args[0]
 12603  		v_1 := v.Args[1]
 12604  		if v_1.Op != OpPPC64SLDconst {
 12605  			break
 12606  		}
 12607  		c := v_1.AuxInt
 12608  		if x != v_1.Args[0] {
 12609  			break
 12610  		}
 12611  		if !(d == 64-c) {
 12612  			break
 12613  		}
 12614  		v.reset(OpPPC64ROTLconst)
 12615  		v.AuxInt = c
 12616  		v.AddArg(x)
 12617  		return true
 12618  	}
 12619  	// match: (OR (SLWconst x [c]) (SRWconst x [d]))
 12620  	// cond: d == 32-c
 12621  	// result: (ROTLWconst [c] x)
 12622  	for {
 12623  		_ = v.Args[1]
 12624  		v_0 := v.Args[0]
 12625  		if v_0.Op != OpPPC64SLWconst {
 12626  			break
 12627  		}
 12628  		c := v_0.AuxInt
 12629  		x := v_0.Args[0]
 12630  		v_1 := v.Args[1]
 12631  		if v_1.Op != OpPPC64SRWconst {
 12632  			break
 12633  		}
 12634  		d := v_1.AuxInt
 12635  		if x != v_1.Args[0] {
 12636  			break
 12637  		}
 12638  		if !(d == 32-c) {
 12639  			break
 12640  		}
 12641  		v.reset(OpPPC64ROTLWconst)
 12642  		v.AuxInt = c
 12643  		v.AddArg(x)
 12644  		return true
 12645  	}
 12646  	// match: (OR (SRWconst x [d]) (SLWconst x [c]))
 12647  	// cond: d == 32-c
 12648  	// result: (ROTLWconst [c] x)
 12649  	for {
 12650  		_ = v.Args[1]
 12651  		v_0 := v.Args[0]
 12652  		if v_0.Op != OpPPC64SRWconst {
 12653  			break
 12654  		}
 12655  		d := v_0.AuxInt
 12656  		x := v_0.Args[0]
 12657  		v_1 := v.Args[1]
 12658  		if v_1.Op != OpPPC64SLWconst {
 12659  			break
 12660  		}
 12661  		c := v_1.AuxInt
 12662  		if x != v_1.Args[0] {
 12663  			break
 12664  		}
 12665  		if !(d == 32-c) {
 12666  			break
 12667  		}
 12668  		v.reset(OpPPC64ROTLWconst)
 12669  		v.AuxInt = c
 12670  		v.AddArg(x)
 12671  		return true
 12672  	}
 12673  	// match: (OR (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
 12674  	// cond:
 12675  	// result: (ROTL x y)
 12676  	for {
 12677  		_ = v.Args[1]
 12678  		v_0 := v.Args[0]
 12679  		if v_0.Op != OpPPC64SLD {
 12680  			break
 12681  		}
 12682  		_ = v_0.Args[1]
 12683  		x := v_0.Args[0]
 12684  		v_0_1 := v_0.Args[1]
 12685  		if v_0_1.Op != OpPPC64ANDconst {
 12686  			break
 12687  		}
 12688  		if v_0_1.Type != typ.Int64 {
 12689  			break
 12690  		}
 12691  		if v_0_1.AuxInt != 63 {
 12692  			break
 12693  		}
 12694  		y := v_0_1.Args[0]
 12695  		v_1 := v.Args[1]
 12696  		if v_1.Op != OpPPC64SRD {
 12697  			break
 12698  		}
 12699  		_ = v_1.Args[1]
 12700  		if x != v_1.Args[0] {
 12701  			break
 12702  		}
 12703  		v_1_1 := v_1.Args[1]
 12704  		if v_1_1.Op != OpPPC64SUB {
 12705  			break
 12706  		}
 12707  		if v_1_1.Type != typ.UInt {
 12708  			break
 12709  		}
 12710  		_ = v_1_1.Args[1]
 12711  		v_1_1_0 := v_1_1.Args[0]
 12712  		if v_1_1_0.Op != OpPPC64MOVDconst {
 12713  			break
 12714  		}
 12715  		if v_1_1_0.AuxInt != 64 {
 12716  			break
 12717  		}
 12718  		v_1_1_1 := v_1_1.Args[1]
 12719  		if v_1_1_1.Op != OpPPC64ANDconst {
 12720  			break
 12721  		}
 12722  		if v_1_1_1.Type != typ.UInt {
 12723  			break
 12724  		}
 12725  		if v_1_1_1.AuxInt != 63 {
 12726  			break
 12727  		}
 12728  		if y != v_1_1_1.Args[0] {
 12729  			break
 12730  		}
 12731  		v.reset(OpPPC64ROTL)
 12732  		v.AddArg(x)
 12733  		v.AddArg(y)
 12734  		return true
 12735  	}
 12736  	// match: (OR (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))) (SLD x (ANDconst <typ.Int64> [63] y)))
 12737  	// cond:
 12738  	// result: (ROTL x y)
 12739  	for {
 12740  		_ = v.Args[1]
 12741  		v_0 := v.Args[0]
 12742  		if v_0.Op != OpPPC64SRD {
 12743  			break
 12744  		}
 12745  		_ = v_0.Args[1]
 12746  		x := v_0.Args[0]
 12747  		v_0_1 := v_0.Args[1]
 12748  		if v_0_1.Op != OpPPC64SUB {
 12749  			break
 12750  		}
 12751  		if v_0_1.Type != typ.UInt {
 12752  			break
 12753  		}
 12754  		_ = v_0_1.Args[1]
 12755  		v_0_1_0 := v_0_1.Args[0]
 12756  		if v_0_1_0.Op != OpPPC64MOVDconst {
 12757  			break
 12758  		}
 12759  		if v_0_1_0.AuxInt != 64 {
 12760  			break
 12761  		}
 12762  		v_0_1_1 := v_0_1.Args[1]
 12763  		if v_0_1_1.Op != OpPPC64ANDconst {
 12764  			break
 12765  		}
 12766  		if v_0_1_1.Type != typ.UInt {
 12767  			break
 12768  		}
 12769  		if v_0_1_1.AuxInt != 63 {
 12770  			break
 12771  		}
 12772  		y := v_0_1_1.Args[0]
 12773  		v_1 := v.Args[1]
 12774  		if v_1.Op != OpPPC64SLD {
 12775  			break
 12776  		}
 12777  		_ = v_1.Args[1]
 12778  		if x != v_1.Args[0] {
 12779  			break
 12780  		}
 12781  		v_1_1 := v_1.Args[1]
 12782  		if v_1_1.Op != OpPPC64ANDconst {
 12783  			break
 12784  		}
 12785  		if v_1_1.Type != typ.Int64 {
 12786  			break
 12787  		}
 12788  		if v_1_1.AuxInt != 63 {
 12789  			break
 12790  		}
 12791  		if y != v_1_1.Args[0] {
 12792  			break
 12793  		}
 12794  		v.reset(OpPPC64ROTL)
 12795  		v.AddArg(x)
 12796  		v.AddArg(y)
 12797  		return true
 12798  	}
 12799  	// match: (OR (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
 12800  	// cond:
 12801  	// result: (ROTLW x y)
 12802  	for {
 12803  		_ = v.Args[1]
 12804  		v_0 := v.Args[0]
 12805  		if v_0.Op != OpPPC64SLW {
 12806  			break
 12807  		}
 12808  		_ = v_0.Args[1]
 12809  		x := v_0.Args[0]
 12810  		v_0_1 := v_0.Args[1]
 12811  		if v_0_1.Op != OpPPC64ANDconst {
 12812  			break
 12813  		}
 12814  		if v_0_1.Type != typ.Int32 {
 12815  			break
 12816  		}
 12817  		if v_0_1.AuxInt != 31 {
 12818  			break
 12819  		}
 12820  		y := v_0_1.Args[0]
 12821  		v_1 := v.Args[1]
 12822  		if v_1.Op != OpPPC64SRW {
 12823  			break
 12824  		}
 12825  		_ = v_1.Args[1]
 12826  		if x != v_1.Args[0] {
 12827  			break
 12828  		}
 12829  		v_1_1 := v_1.Args[1]
 12830  		if v_1_1.Op != OpPPC64SUB {
 12831  			break
 12832  		}
 12833  		if v_1_1.Type != typ.UInt {
 12834  			break
 12835  		}
 12836  		_ = v_1_1.Args[1]
 12837  		v_1_1_0 := v_1_1.Args[0]
 12838  		if v_1_1_0.Op != OpPPC64MOVDconst {
 12839  			break
 12840  		}
 12841  		if v_1_1_0.AuxInt != 32 {
 12842  			break
 12843  		}
 12844  		v_1_1_1 := v_1_1.Args[1]
 12845  		if v_1_1_1.Op != OpPPC64ANDconst {
 12846  			break
 12847  		}
 12848  		if v_1_1_1.Type != typ.UInt {
 12849  			break
 12850  		}
 12851  		if v_1_1_1.AuxInt != 31 {
 12852  			break
 12853  		}
 12854  		if y != v_1_1_1.Args[0] {
 12855  			break
 12856  		}
 12857  		v.reset(OpPPC64ROTLW)
 12858  		v.AddArg(x)
 12859  		v.AddArg(y)
 12860  		return true
 12861  	}
 12862  	// match: (OR (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))) (SLW x (ANDconst <typ.Int32> [31] y)))
 12863  	// cond:
 12864  	// result: (ROTLW x y)
 12865  	for {
 12866  		_ = v.Args[1]
 12867  		v_0 := v.Args[0]
 12868  		if v_0.Op != OpPPC64SRW {
 12869  			break
 12870  		}
 12871  		_ = v_0.Args[1]
 12872  		x := v_0.Args[0]
 12873  		v_0_1 := v_0.Args[1]
 12874  		if v_0_1.Op != OpPPC64SUB {
 12875  			break
 12876  		}
 12877  		if v_0_1.Type != typ.UInt {
 12878  			break
 12879  		}
 12880  		_ = v_0_1.Args[1]
 12881  		v_0_1_0 := v_0_1.Args[0]
 12882  		if v_0_1_0.Op != OpPPC64MOVDconst {
 12883  			break
 12884  		}
 12885  		if v_0_1_0.AuxInt != 32 {
 12886  			break
 12887  		}
 12888  		v_0_1_1 := v_0_1.Args[1]
 12889  		if v_0_1_1.Op != OpPPC64ANDconst {
 12890  			break
 12891  		}
 12892  		if v_0_1_1.Type != typ.UInt {
 12893  			break
 12894  		}
 12895  		if v_0_1_1.AuxInt != 31 {
 12896  			break
 12897  		}
 12898  		y := v_0_1_1.Args[0]
 12899  		v_1 := v.Args[1]
 12900  		if v_1.Op != OpPPC64SLW {
 12901  			break
 12902  		}
 12903  		_ = v_1.Args[1]
 12904  		if x != v_1.Args[0] {
 12905  			break
 12906  		}
 12907  		v_1_1 := v_1.Args[1]
 12908  		if v_1_1.Op != OpPPC64ANDconst {
 12909  			break
 12910  		}
 12911  		if v_1_1.Type != typ.Int32 {
 12912  			break
 12913  		}
 12914  		if v_1_1.AuxInt != 31 {
 12915  			break
 12916  		}
 12917  		if y != v_1_1.Args[0] {
 12918  			break
 12919  		}
 12920  		v.reset(OpPPC64ROTLW)
 12921  		v.AddArg(x)
 12922  		v.AddArg(y)
 12923  		return true
 12924  	}
 12925  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 12926  	// cond:
 12927  	// result: (MOVDconst [c|d])
 12928  	for {
 12929  		_ = v.Args[1]
 12930  		v_0 := v.Args[0]
 12931  		if v_0.Op != OpPPC64MOVDconst {
 12932  			break
 12933  		}
 12934  		c := v_0.AuxInt
 12935  		v_1 := v.Args[1]
 12936  		if v_1.Op != OpPPC64MOVDconst {
 12937  			break
 12938  		}
 12939  		d := v_1.AuxInt
 12940  		v.reset(OpPPC64MOVDconst)
 12941  		v.AuxInt = c | d
 12942  		return true
 12943  	}
 12944  	// match: (OR (MOVDconst [d]) (MOVDconst [c]))
 12945  	// cond:
 12946  	// result: (MOVDconst [c|d])
 12947  	for {
 12948  		_ = v.Args[1]
 12949  		v_0 := v.Args[0]
 12950  		if v_0.Op != OpPPC64MOVDconst {
 12951  			break
 12952  		}
 12953  		d := v_0.AuxInt
 12954  		v_1 := v.Args[1]
 12955  		if v_1.Op != OpPPC64MOVDconst {
 12956  			break
 12957  		}
 12958  		c := v_1.AuxInt
 12959  		v.reset(OpPPC64MOVDconst)
 12960  		v.AuxInt = c | d
 12961  		return true
 12962  	}
 12963  	return false
 12964  }
 12965  func rewriteValuePPC64_OpPPC64OR_10(v *Value) bool {
 12966  	b := v.Block
 12967  	_ = b
 12968  	config := b.Func.Config
 12969  	_ = config
 12970  	typ := &b.Func.Config.Types
 12971  	_ = typ
 12972  	// match: (OR x (MOVDconst [c]))
 12973  	// cond: isU32Bit(c)
 12974  	// result: (ORconst [c] x)
 12975  	for {
 12976  		_ = v.Args[1]
 12977  		x := v.Args[0]
 12978  		v_1 := v.Args[1]
 12979  		if v_1.Op != OpPPC64MOVDconst {
 12980  			break
 12981  		}
 12982  		c := v_1.AuxInt
 12983  		if !(isU32Bit(c)) {
 12984  			break
 12985  		}
 12986  		v.reset(OpPPC64ORconst)
 12987  		v.AuxInt = c
 12988  		v.AddArg(x)
 12989  		return true
 12990  	}
 12991  	// match: (OR (MOVDconst [c]) x)
 12992  	// cond: isU32Bit(c)
 12993  	// result: (ORconst [c] x)
 12994  	for {
 12995  		_ = v.Args[1]
 12996  		v_0 := v.Args[0]
 12997  		if v_0.Op != OpPPC64MOVDconst {
 12998  			break
 12999  		}
 13000  		c := v_0.AuxInt
 13001  		x := v.Args[1]
 13002  		if !(isU32Bit(c)) {
 13003  			break
 13004  		}
 13005  		v.reset(OpPPC64ORconst)
 13006  		v.AuxInt = c
 13007  		v.AddArg(x)
 13008  		return true
 13009  	}
 13010  	// match: (OR <t> x0:(MOVBZload [i0] {s} p mem) o1:(SLWconst x1:(MOVBZload [i1] {s} p mem) [8]))
 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) (MOVHZload <t> {s} [i0] p mem)
 13013  	for {
 13014  		t := v.Type
 13015  		_ = v.Args[1]
 13016  		x0 := v.Args[0]
 13017  		if x0.Op != OpPPC64MOVBZload {
 13018  			break
 13019  		}
 13020  		i0 := x0.AuxInt
 13021  		s := x0.Aux
 13022  		_ = x0.Args[1]
 13023  		p := x0.Args[0]
 13024  		mem := x0.Args[1]
 13025  		o1 := v.Args[1]
 13026  		if o1.Op != OpPPC64SLWconst {
 13027  			break
 13028  		}
 13029  		if o1.AuxInt != 8 {
 13030  			break
 13031  		}
 13032  		x1 := o1.Args[0]
 13033  		if x1.Op != OpPPC64MOVBZload {
 13034  			break
 13035  		}
 13036  		i1 := x1.AuxInt
 13037  		if x1.Aux != s {
 13038  			break
 13039  		}
 13040  		_ = x1.Args[1]
 13041  		if p != x1.Args[0] {
 13042  			break
 13043  		}
 13044  		if mem != x1.Args[1] {
 13045  			break
 13046  		}
 13047  		if !(!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)) {
 13048  			break
 13049  		}
 13050  		b = mergePoint(b, x0, x1)
 13051  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
 13052  		v.reset(OpCopy)
 13053  		v.AddArg(v0)
 13054  		v0.AuxInt = i0
 13055  		v0.Aux = s
 13056  		v0.AddArg(p)
 13057  		v0.AddArg(mem)
 13058  		return true
 13059  	}
 13060  	// match: (OR <t> o1:(SLWconst x1:(MOVBZload [i1] {s} p mem) [8]) x0:(MOVBZload [i0] {s} p mem))
 13061  	// 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)
 13062  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 13063  	for {
 13064  		t := v.Type
 13065  		_ = v.Args[1]
 13066  		o1 := v.Args[0]
 13067  		if o1.Op != OpPPC64SLWconst {
 13068  			break
 13069  		}
 13070  		if o1.AuxInt != 8 {
 13071  			break
 13072  		}
 13073  		x1 := o1.Args[0]
 13074  		if x1.Op != OpPPC64MOVBZload {
 13075  			break
 13076  		}
 13077  		i1 := x1.AuxInt
 13078  		s := x1.Aux
 13079  		_ = x1.Args[1]
 13080  		p := x1.Args[0]
 13081  		mem := x1.Args[1]
 13082  		x0 := v.Args[1]
 13083  		if x0.Op != OpPPC64MOVBZload {
 13084  			break
 13085  		}
 13086  		i0 := x0.AuxInt
 13087  		if x0.Aux != s {
 13088  			break
 13089  		}
 13090  		_ = x0.Args[1]
 13091  		if p != x0.Args[0] {
 13092  			break
 13093  		}
 13094  		if mem != x0.Args[1] {
 13095  			break
 13096  		}
 13097  		if !(!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)) {
 13098  			break
 13099  		}
 13100  		b = mergePoint(b, x0, x1)
 13101  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHZload, t)
 13102  		v.reset(OpCopy)
 13103  		v.AddArg(v0)
 13104  		v0.AuxInt = i0
 13105  		v0.Aux = s
 13106  		v0.AddArg(p)
 13107  		v0.AddArg(mem)
 13108  		return true
 13109  	}
 13110  	// match: (OR <t> x0:(MOVBZload [i0] {s} p mem) o1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [8]))
 13111  	// 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)
 13112  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 13113  	for {
 13114  		t := v.Type
 13115  		_ = v.Args[1]
 13116  		x0 := v.Args[0]
 13117  		if x0.Op != OpPPC64MOVBZload {
 13118  			break
 13119  		}
 13120  		i0 := x0.AuxInt
 13121  		s := x0.Aux
 13122  		_ = x0.Args[1]
 13123  		p := x0.Args[0]
 13124  		mem := x0.Args[1]
 13125  		o1 := v.Args[1]
 13126  		if o1.Op != OpPPC64SLDconst {
 13127  			break
 13128  		}
 13129  		if o1.AuxInt != 8 {
 13130  			break
 13131  		}
 13132  		x1 := o1.Args[0]
 13133  		if x1.Op != OpPPC64MOVBZload {
 13134  			break
 13135  		}
 13136  		i1 := x1.AuxInt
 13137  		if x1.Aux != s {
 13138  			break
 13139  		}
 13140  		_ = x1.Args[1]
 13141  		if p != x1.Args[0] {
 13142  			break
 13143  		}
 13144  		if mem != x1.Args[1] {
 13145  			break
 13146  		}
 13147  		if !(!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)) {
 13148  			break
 13149  		}
 13150  		b = mergePoint(b, x0, x1)
 13151  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
 13152  		v.reset(OpCopy)
 13153  		v.AddArg(v0)
 13154  		v0.AuxInt = i0
 13155  		v0.Aux = s
 13156  		v0.AddArg(p)
 13157  		v0.AddArg(mem)
 13158  		return true
 13159  	}
 13160  	// match: (OR <t> o1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [8]) x0:(MOVBZload [i0] {s} p mem))
 13161  	// 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)
 13162  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 13163  	for {
 13164  		t := v.Type
 13165  		_ = v.Args[1]
 13166  		o1 := v.Args[0]
 13167  		if o1.Op != OpPPC64SLDconst {
 13168  			break
 13169  		}
 13170  		if o1.AuxInt != 8 {
 13171  			break
 13172  		}
 13173  		x1 := o1.Args[0]
 13174  		if x1.Op != OpPPC64MOVBZload {
 13175  			break
 13176  		}
 13177  		i1 := x1.AuxInt
 13178  		s := x1.Aux
 13179  		_ = x1.Args[1]
 13180  		p := x1.Args[0]
 13181  		mem := x1.Args[1]
 13182  		x0 := v.Args[1]
 13183  		if x0.Op != OpPPC64MOVBZload {
 13184  			break
 13185  		}
 13186  		i0 := x0.AuxInt
 13187  		if x0.Aux != s {
 13188  			break
 13189  		}
 13190  		_ = x0.Args[1]
 13191  		if p != x0.Args[0] {
 13192  			break
 13193  		}
 13194  		if mem != x0.Args[1] {
 13195  			break
 13196  		}
 13197  		if !(!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)) {
 13198  			break
 13199  		}
 13200  		b = mergePoint(b, x0, x1)
 13201  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHZload, t)
 13202  		v.reset(OpCopy)
 13203  		v.AddArg(v0)
 13204  		v0.AuxInt = i0
 13205  		v0.Aux = s
 13206  		v0.AddArg(p)
 13207  		v0.AddArg(mem)
 13208  		return true
 13209  	}
 13210  	// match: (OR <t> x0:(MOVBZload [i1] {s} p mem) o1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [8]))
 13211  	// 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)
 13212  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 13213  	for {
 13214  		t := v.Type
 13215  		_ = v.Args[1]
 13216  		x0 := v.Args[0]
 13217  		if x0.Op != OpPPC64MOVBZload {
 13218  			break
 13219  		}
 13220  		i1 := x0.AuxInt
 13221  		s := x0.Aux
 13222  		_ = x0.Args[1]
 13223  		p := x0.Args[0]
 13224  		mem := x0.Args[1]
 13225  		o1 := v.Args[1]
 13226  		if o1.Op != OpPPC64SLWconst {
 13227  			break
 13228  		}
 13229  		if o1.AuxInt != 8 {
 13230  			break
 13231  		}
 13232  		x1 := o1.Args[0]
 13233  		if x1.Op != OpPPC64MOVBZload {
 13234  			break
 13235  		}
 13236  		i0 := x1.AuxInt
 13237  		if x1.Aux != s {
 13238  			break
 13239  		}
 13240  		_ = x1.Args[1]
 13241  		if p != x1.Args[0] {
 13242  			break
 13243  		}
 13244  		if mem != x1.Args[1] {
 13245  			break
 13246  		}
 13247  		if !(!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)) {
 13248  			break
 13249  		}
 13250  		b = mergePoint(b, x0, x1)
 13251  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 13252  		v.reset(OpCopy)
 13253  		v.AddArg(v0)
 13254  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13255  		v1.AuxInt = i0
 13256  		v1.Aux = s
 13257  		v1.AddArg(p)
 13258  		v0.AddArg(v1)
 13259  		v0.AddArg(mem)
 13260  		return true
 13261  	}
 13262  	// match: (OR <t> o1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [8]) x0:(MOVBZload [i1] {s} p mem))
 13263  	// 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)
 13264  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 13265  	for {
 13266  		t := v.Type
 13267  		_ = v.Args[1]
 13268  		o1 := v.Args[0]
 13269  		if o1.Op != OpPPC64SLWconst {
 13270  			break
 13271  		}
 13272  		if o1.AuxInt != 8 {
 13273  			break
 13274  		}
 13275  		x1 := o1.Args[0]
 13276  		if x1.Op != OpPPC64MOVBZload {
 13277  			break
 13278  		}
 13279  		i0 := x1.AuxInt
 13280  		s := x1.Aux
 13281  		_ = x1.Args[1]
 13282  		p := x1.Args[0]
 13283  		mem := x1.Args[1]
 13284  		x0 := v.Args[1]
 13285  		if x0.Op != OpPPC64MOVBZload {
 13286  			break
 13287  		}
 13288  		i1 := x0.AuxInt
 13289  		if x0.Aux != s {
 13290  			break
 13291  		}
 13292  		_ = x0.Args[1]
 13293  		if p != x0.Args[0] {
 13294  			break
 13295  		}
 13296  		if mem != x0.Args[1] {
 13297  			break
 13298  		}
 13299  		if !(!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)) {
 13300  			break
 13301  		}
 13302  		b = mergePoint(b, x0, x1)
 13303  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHBRload, t)
 13304  		v.reset(OpCopy)
 13305  		v.AddArg(v0)
 13306  		v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13307  		v1.AuxInt = i0
 13308  		v1.Aux = s
 13309  		v1.AddArg(p)
 13310  		v0.AddArg(v1)
 13311  		v0.AddArg(mem)
 13312  		return true
 13313  	}
 13314  	// match: (OR <t> x0:(MOVBZload [i1] {s} p mem) o1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [8]))
 13315  	// 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)
 13316  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 13317  	for {
 13318  		t := v.Type
 13319  		_ = v.Args[1]
 13320  		x0 := v.Args[0]
 13321  		if x0.Op != OpPPC64MOVBZload {
 13322  			break
 13323  		}
 13324  		i1 := x0.AuxInt
 13325  		s := x0.Aux
 13326  		_ = x0.Args[1]
 13327  		p := x0.Args[0]
 13328  		mem := x0.Args[1]
 13329  		o1 := v.Args[1]
 13330  		if o1.Op != OpPPC64SLDconst {
 13331  			break
 13332  		}
 13333  		if o1.AuxInt != 8 {
 13334  			break
 13335  		}
 13336  		x1 := o1.Args[0]
 13337  		if x1.Op != OpPPC64MOVBZload {
 13338  			break
 13339  		}
 13340  		i0 := x1.AuxInt
 13341  		if x1.Aux != s {
 13342  			break
 13343  		}
 13344  		_ = x1.Args[1]
 13345  		if p != x1.Args[0] {
 13346  			break
 13347  		}
 13348  		if mem != x1.Args[1] {
 13349  			break
 13350  		}
 13351  		if !(!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)) {
 13352  			break
 13353  		}
 13354  		b = mergePoint(b, x0, x1)
 13355  		v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 13356  		v.reset(OpCopy)
 13357  		v.AddArg(v0)
 13358  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13359  		v1.AuxInt = i0
 13360  		v1.Aux = s
 13361  		v1.AddArg(p)
 13362  		v0.AddArg(v1)
 13363  		v0.AddArg(mem)
 13364  		return true
 13365  	}
 13366  	// match: (OR <t> o1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [8]) x0:(MOVBZload [i1] {s} p mem))
 13367  	// 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)
 13368  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 13369  	for {
 13370  		t := v.Type
 13371  		_ = v.Args[1]
 13372  		o1 := v.Args[0]
 13373  		if o1.Op != OpPPC64SLDconst {
 13374  			break
 13375  		}
 13376  		if o1.AuxInt != 8 {
 13377  			break
 13378  		}
 13379  		x1 := o1.Args[0]
 13380  		if x1.Op != OpPPC64MOVBZload {
 13381  			break
 13382  		}
 13383  		i0 := x1.AuxInt
 13384  		s := x1.Aux
 13385  		_ = x1.Args[1]
 13386  		p := x1.Args[0]
 13387  		mem := x1.Args[1]
 13388  		x0 := v.Args[1]
 13389  		if x0.Op != OpPPC64MOVBZload {
 13390  			break
 13391  		}
 13392  		i1 := x0.AuxInt
 13393  		if x0.Aux != s {
 13394  			break
 13395  		}
 13396  		_ = x0.Args[1]
 13397  		if p != x0.Args[0] {
 13398  			break
 13399  		}
 13400  		if mem != x0.Args[1] {
 13401  			break
 13402  		}
 13403  		if !(!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)) {
 13404  			break
 13405  		}
 13406  		b = mergePoint(b, x0, x1)
 13407  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVHBRload, t)
 13408  		v.reset(OpCopy)
 13409  		v.AddArg(v0)
 13410  		v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13411  		v1.AuxInt = i0
 13412  		v1.Aux = s
 13413  		v1.AddArg(p)
 13414  		v0.AddArg(v1)
 13415  		v0.AddArg(mem)
 13416  		return true
 13417  	}
 13418  	return false
 13419  }
 13420  func rewriteValuePPC64_OpPPC64OR_20(v *Value) bool {
 13421  	b := v.Block
 13422  	_ = b
 13423  	config := b.Func.Config
 13424  	_ = config
 13425  	typ := &b.Func.Config.Types
 13426  	_ = typ
 13427  	// match: (OR <t> s0:(SLWconst x0:(MOVBZload [i1] {s} p mem) [n1]) s1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [n2]))
 13428  	// 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)
 13429  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 13430  	for {
 13431  		t := v.Type
 13432  		_ = v.Args[1]
 13433  		s0 := v.Args[0]
 13434  		if s0.Op != OpPPC64SLWconst {
 13435  			break
 13436  		}
 13437  		n1 := s0.AuxInt
 13438  		x0 := s0.Args[0]
 13439  		if x0.Op != OpPPC64MOVBZload {
 13440  			break
 13441  		}
 13442  		i1 := x0.AuxInt
 13443  		s := x0.Aux
 13444  		_ = x0.Args[1]
 13445  		p := x0.Args[0]
 13446  		mem := x0.Args[1]
 13447  		s1 := v.Args[1]
 13448  		if s1.Op != OpPPC64SLWconst {
 13449  			break
 13450  		}
 13451  		n2 := s1.AuxInt
 13452  		x1 := s1.Args[0]
 13453  		if x1.Op != OpPPC64MOVBZload {
 13454  			break
 13455  		}
 13456  		i0 := x1.AuxInt
 13457  		if x1.Aux != s {
 13458  			break
 13459  		}
 13460  		_ = x1.Args[1]
 13461  		if p != x1.Args[0] {
 13462  			break
 13463  		}
 13464  		if mem != x1.Args[1] {
 13465  			break
 13466  		}
 13467  		if !(!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)) {
 13468  			break
 13469  		}
 13470  		b = mergePoint(b, x0, x1)
 13471  		v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
 13472  		v.reset(OpCopy)
 13473  		v.AddArg(v0)
 13474  		v0.AuxInt = n1
 13475  		v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 13476  		v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13477  		v2.AuxInt = i0
 13478  		v2.Aux = s
 13479  		v2.AddArg(p)
 13480  		v1.AddArg(v2)
 13481  		v1.AddArg(mem)
 13482  		v0.AddArg(v1)
 13483  		return true
 13484