Source file src/cmd/compile/internal/ssarewrite/rewriteppc64/rewritePPC64.go

     1  // Code generated from _gen/PPC64.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewriteppc64
     4  
     5  import "internal/buildcfg"
     6  import "math"
     7  import "cmd/compile/internal/types"
     8  import "cmd/compile/internal/ssa/block"
     9  import "cmd/compile/internal/ssa/ssaop"
    10  import "cmd/compile/internal/ssa"
    11  
    12  func RewriteValue(v *ssa.Value) bool {
    13  	switch v.Op {
    14  	case ssaop.OpAbs:
    15  		v.Op = ssaop.OpPPC64FABS
    16  		return true
    17  	case ssaop.OpAdd16:
    18  		v.Op = ssaop.OpPPC64ADD
    19  		return true
    20  	case ssaop.OpAdd32:
    21  		v.Op = ssaop.OpPPC64ADD
    22  		return true
    23  	case ssaop.OpAdd32F:
    24  		v.Op = ssaop.OpPPC64FADDS
    25  		return true
    26  	case ssaop.OpAdd64:
    27  		v.Op = ssaop.OpPPC64ADD
    28  		return true
    29  	case ssaop.OpAdd64F:
    30  		v.Op = ssaop.OpPPC64FADD
    31  		return true
    32  	case ssaop.OpAdd8:
    33  		v.Op = ssaop.OpPPC64ADD
    34  		return true
    35  	case ssaop.OpAddPtr:
    36  		v.Op = ssaop.OpPPC64ADD
    37  		return true
    38  	case ssaop.OpAddr:
    39  		return rewriteValue_OpAddr(v)
    40  	case ssaop.OpAnd16:
    41  		v.Op = ssaop.OpPPC64AND
    42  		return true
    43  	case ssaop.OpAnd32:
    44  		v.Op = ssaop.OpPPC64AND
    45  		return true
    46  	case ssaop.OpAnd64:
    47  		v.Op = ssaop.OpPPC64AND
    48  		return true
    49  	case ssaop.OpAnd8:
    50  		v.Op = ssaop.OpPPC64AND
    51  		return true
    52  	case ssaop.OpAndB:
    53  		v.Op = ssaop.OpPPC64AND
    54  		return true
    55  	case ssaop.OpAtomicAdd32:
    56  		v.Op = ssaop.OpPPC64LoweredAtomicAdd32
    57  		return true
    58  	case ssaop.OpAtomicAdd64:
    59  		v.Op = ssaop.OpPPC64LoweredAtomicAdd64
    60  		return true
    61  	case ssaop.OpAtomicAnd32:
    62  		v.Op = ssaop.OpPPC64LoweredAtomicAnd32
    63  		return true
    64  	case ssaop.OpAtomicAnd8:
    65  		v.Op = ssaop.OpPPC64LoweredAtomicAnd8
    66  		return true
    67  	case ssaop.OpAtomicCompareAndSwap32:
    68  		return rewriteValue_OpAtomicCompareAndSwap32(v)
    69  	case ssaop.OpAtomicCompareAndSwap64:
    70  		return rewriteValue_OpAtomicCompareAndSwap64(v)
    71  	case ssaop.OpAtomicCompareAndSwapRel32:
    72  		return rewriteValue_OpAtomicCompareAndSwapRel32(v)
    73  	case ssaop.OpAtomicExchange32:
    74  		v.Op = ssaop.OpPPC64LoweredAtomicExchange32
    75  		return true
    76  	case ssaop.OpAtomicExchange64:
    77  		v.Op = ssaop.OpPPC64LoweredAtomicExchange64
    78  		return true
    79  	case ssaop.OpAtomicExchange8:
    80  		v.Op = ssaop.OpPPC64LoweredAtomicExchange8
    81  		return true
    82  	case ssaop.OpAtomicLoad32:
    83  		return rewriteValue_OpAtomicLoad32(v)
    84  	case ssaop.OpAtomicLoad64:
    85  		return rewriteValue_OpAtomicLoad64(v)
    86  	case ssaop.OpAtomicLoad8:
    87  		return rewriteValue_OpAtomicLoad8(v)
    88  	case ssaop.OpAtomicLoadAcq32:
    89  		return rewriteValue_OpAtomicLoadAcq32(v)
    90  	case ssaop.OpAtomicLoadAcq64:
    91  		return rewriteValue_OpAtomicLoadAcq64(v)
    92  	case ssaop.OpAtomicLoadPtr:
    93  		return rewriteValue_OpAtomicLoadPtr(v)
    94  	case ssaop.OpAtomicOr32:
    95  		v.Op = ssaop.OpPPC64LoweredAtomicOr32
    96  		return true
    97  	case ssaop.OpAtomicOr8:
    98  		v.Op = ssaop.OpPPC64LoweredAtomicOr8
    99  		return true
   100  	case ssaop.OpAtomicStore32:
   101  		return rewriteValue_OpAtomicStore32(v)
   102  	case ssaop.OpAtomicStore64:
   103  		return rewriteValue_OpAtomicStore64(v)
   104  	case ssaop.OpAtomicStore8:
   105  		return rewriteValue_OpAtomicStore8(v)
   106  	case ssaop.OpAtomicStoreRel32:
   107  		return rewriteValue_OpAtomicStoreRel32(v)
   108  	case ssaop.OpAtomicStoreRel64:
   109  		return rewriteValue_OpAtomicStoreRel64(v)
   110  	case ssaop.OpAvg64u:
   111  		return rewriteValue_OpAvg64u(v)
   112  	case ssaop.OpBitLen16:
   113  		return rewriteValue_OpBitLen16(v)
   114  	case ssaop.OpBitLen32:
   115  		return rewriteValue_OpBitLen32(v)
   116  	case ssaop.OpBitLen64:
   117  		return rewriteValue_OpBitLen64(v)
   118  	case ssaop.OpBitLen8:
   119  		return rewriteValue_OpBitLen8(v)
   120  	case ssaop.OpBswap16:
   121  		return rewriteValue_OpBswap16(v)
   122  	case ssaop.OpBswap32:
   123  		return rewriteValue_OpBswap32(v)
   124  	case ssaop.OpBswap64:
   125  		return rewriteValue_OpBswap64(v)
   126  	case ssaop.OpCeil:
   127  		v.Op = ssaop.OpPPC64FCEIL
   128  		return true
   129  	case ssaop.OpClosureCall:
   130  		v.Op = ssaop.OpPPC64CALLclosure
   131  		return true
   132  	case ssaop.OpCom16:
   133  		return rewriteValue_OpCom16(v)
   134  	case ssaop.OpCom32:
   135  		return rewriteValue_OpCom32(v)
   136  	case ssaop.OpCom64:
   137  		return rewriteValue_OpCom64(v)
   138  	case ssaop.OpCom8:
   139  		return rewriteValue_OpCom8(v)
   140  	case ssaop.OpCondSelect:
   141  		return rewriteValue_OpCondSelect(v)
   142  	case ssaop.OpConst16:
   143  		return rewriteValue_OpConst16(v)
   144  	case ssaop.OpConst32:
   145  		return rewriteValue_OpConst32(v)
   146  	case ssaop.OpConst32F:
   147  		v.Op = ssaop.OpPPC64FMOVSconst
   148  		return true
   149  	case ssaop.OpConst64:
   150  		return rewriteValue_OpConst64(v)
   151  	case ssaop.OpConst64F:
   152  		v.Op = ssaop.OpPPC64FMOVDconst
   153  		return true
   154  	case ssaop.OpConst8:
   155  		return rewriteValue_OpConst8(v)
   156  	case ssaop.OpConstBool:
   157  		return rewriteValue_OpConstBool(v)
   158  	case ssaop.OpConstNil:
   159  		return rewriteValue_OpConstNil(v)
   160  	case ssaop.OpCopysign:
   161  		return rewriteValue_OpCopysign(v)
   162  	case ssaop.OpCtz16:
   163  		return rewriteValue_OpCtz16(v)
   164  	case ssaop.OpCtz16NonZero:
   165  		v.Op = ssaop.OpCtz64
   166  		return true
   167  	case ssaop.OpCtz32:
   168  		return rewriteValue_OpCtz32(v)
   169  	case ssaop.OpCtz32NonZero:
   170  		v.Op = ssaop.OpCtz64
   171  		return true
   172  	case ssaop.OpCtz64:
   173  		return rewriteValue_OpCtz64(v)
   174  	case ssaop.OpCtz64NonZero:
   175  		v.Op = ssaop.OpCtz64
   176  		return true
   177  	case ssaop.OpCtz8:
   178  		return rewriteValue_OpCtz8(v)
   179  	case ssaop.OpCtz8NonZero:
   180  		v.Op = ssaop.OpCtz64
   181  		return true
   182  	case ssaop.OpCvt32Fto32:
   183  		return rewriteValue_OpCvt32Fto32(v)
   184  	case ssaop.OpCvt32Fto64:
   185  		return rewriteValue_OpCvt32Fto64(v)
   186  	case ssaop.OpCvt32Fto64F:
   187  		v.Op = ssaop.OpCopy
   188  		return true
   189  	case ssaop.OpCvt32to32F:
   190  		return rewriteValue_OpCvt32to32F(v)
   191  	case ssaop.OpCvt32to64F:
   192  		return rewriteValue_OpCvt32to64F(v)
   193  	case ssaop.OpCvt64Fto32:
   194  		return rewriteValue_OpCvt64Fto32(v)
   195  	case ssaop.OpCvt64Fto32F:
   196  		v.Op = ssaop.OpPPC64FRSP
   197  		return true
   198  	case ssaop.OpCvt64Fto64:
   199  		return rewriteValue_OpCvt64Fto64(v)
   200  	case ssaop.OpCvt64to32F:
   201  		return rewriteValue_OpCvt64to32F(v)
   202  	case ssaop.OpCvt64to64F:
   203  		return rewriteValue_OpCvt64to64F(v)
   204  	case ssaop.OpCvtBoolToUint8:
   205  		v.Op = ssaop.OpCopy
   206  		return true
   207  	case ssaop.OpDiv16:
   208  		return rewriteValue_OpDiv16(v)
   209  	case ssaop.OpDiv16u:
   210  		return rewriteValue_OpDiv16u(v)
   211  	case ssaop.OpDiv32:
   212  		return rewriteValue_OpDiv32(v)
   213  	case ssaop.OpDiv32F:
   214  		v.Op = ssaop.OpPPC64FDIVS
   215  		return true
   216  	case ssaop.OpDiv32u:
   217  		v.Op = ssaop.OpPPC64DIVWU
   218  		return true
   219  	case ssaop.OpDiv64:
   220  		return rewriteValue_OpDiv64(v)
   221  	case ssaop.OpDiv64F:
   222  		v.Op = ssaop.OpPPC64FDIV
   223  		return true
   224  	case ssaop.OpDiv64u:
   225  		v.Op = ssaop.OpPPC64DIVDU
   226  		return true
   227  	case ssaop.OpDiv8:
   228  		return rewriteValue_OpDiv8(v)
   229  	case ssaop.OpDiv8u:
   230  		return rewriteValue_OpDiv8u(v)
   231  	case ssaop.OpEq16:
   232  		return rewriteValue_OpEq16(v)
   233  	case ssaop.OpEq32:
   234  		return rewriteValue_OpEq32(v)
   235  	case ssaop.OpEq32F:
   236  		return rewriteValue_OpEq32F(v)
   237  	case ssaop.OpEq64:
   238  		return rewriteValue_OpEq64(v)
   239  	case ssaop.OpEq64F:
   240  		return rewriteValue_OpEq64F(v)
   241  	case ssaop.OpEq8:
   242  		return rewriteValue_OpEq8(v)
   243  	case ssaop.OpEqB:
   244  		return rewriteValue_OpEqB(v)
   245  	case ssaop.OpEqPtr:
   246  		return rewriteValue_OpEqPtr(v)
   247  	case ssaop.OpFMA:
   248  		v.Op = ssaop.OpPPC64FMADD
   249  		return true
   250  	case ssaop.OpFloor:
   251  		v.Op = ssaop.OpPPC64FFLOOR
   252  		return true
   253  	case ssaop.OpGetCallerPC:
   254  		v.Op = ssaop.OpPPC64LoweredGetCallerPC
   255  		return true
   256  	case ssaop.OpGetCallerSP:
   257  		v.Op = ssaop.OpPPC64LoweredGetCallerSP
   258  		return true
   259  	case ssaop.OpGetClosurePtr:
   260  		v.Op = ssaop.OpPPC64LoweredGetClosurePtr
   261  		return true
   262  	case ssaop.OpHmul32:
   263  		v.Op = ssaop.OpPPC64MULHW
   264  		return true
   265  	case ssaop.OpHmul32u:
   266  		v.Op = ssaop.OpPPC64MULHWU
   267  		return true
   268  	case ssaop.OpHmul64:
   269  		v.Op = ssaop.OpPPC64MULHD
   270  		return true
   271  	case ssaop.OpHmul64u:
   272  		v.Op = ssaop.OpPPC64MULHDU
   273  		return true
   274  	case ssaop.OpInterCall:
   275  		v.Op = ssaop.OpPPC64CALLinter
   276  		return true
   277  	case ssaop.OpIsInBounds:
   278  		return rewriteValue_OpIsInBounds(v)
   279  	case ssaop.OpIsNonNil:
   280  		return rewriteValue_OpIsNonNil(v)
   281  	case ssaop.OpIsSliceInBounds:
   282  		return rewriteValue_OpIsSliceInBounds(v)
   283  	case ssaop.OpLeq16:
   284  		return rewriteValue_OpLeq16(v)
   285  	case ssaop.OpLeq16U:
   286  		return rewriteValue_OpLeq16U(v)
   287  	case ssaop.OpLeq32:
   288  		return rewriteValue_OpLeq32(v)
   289  	case ssaop.OpLeq32F:
   290  		return rewriteValue_OpLeq32F(v)
   291  	case ssaop.OpLeq32U:
   292  		return rewriteValue_OpLeq32U(v)
   293  	case ssaop.OpLeq64:
   294  		return rewriteValue_OpLeq64(v)
   295  	case ssaop.OpLeq64F:
   296  		return rewriteValue_OpLeq64F(v)
   297  	case ssaop.OpLeq64U:
   298  		return rewriteValue_OpLeq64U(v)
   299  	case ssaop.OpLeq8:
   300  		return rewriteValue_OpLeq8(v)
   301  	case ssaop.OpLeq8U:
   302  		return rewriteValue_OpLeq8U(v)
   303  	case ssaop.OpLess16:
   304  		return rewriteValue_OpLess16(v)
   305  	case ssaop.OpLess16U:
   306  		return rewriteValue_OpLess16U(v)
   307  	case ssaop.OpLess32:
   308  		return rewriteValue_OpLess32(v)
   309  	case ssaop.OpLess32F:
   310  		return rewriteValue_OpLess32F(v)
   311  	case ssaop.OpLess32U:
   312  		return rewriteValue_OpLess32U(v)
   313  	case ssaop.OpLess64:
   314  		return rewriteValue_OpLess64(v)
   315  	case ssaop.OpLess64F:
   316  		return rewriteValue_OpLess64F(v)
   317  	case ssaop.OpLess64U:
   318  		return rewriteValue_OpLess64U(v)
   319  	case ssaop.OpLess8:
   320  		return rewriteValue_OpLess8(v)
   321  	case ssaop.OpLess8U:
   322  		return rewriteValue_OpLess8U(v)
   323  	case ssaop.OpLoad:
   324  		return rewriteValue_OpLoad(v)
   325  	case ssaop.OpLocalAddr:
   326  		return rewriteValue_OpLocalAddr(v)
   327  	case ssaop.OpLsh16x16:
   328  		return rewriteValue_OpLsh16x16(v)
   329  	case ssaop.OpLsh16x32:
   330  		return rewriteValue_OpLsh16x32(v)
   331  	case ssaop.OpLsh16x64:
   332  		return rewriteValue_OpLsh16x64(v)
   333  	case ssaop.OpLsh16x8:
   334  		return rewriteValue_OpLsh16x8(v)
   335  	case ssaop.OpLsh32x16:
   336  		return rewriteValue_OpLsh32x16(v)
   337  	case ssaop.OpLsh32x32:
   338  		return rewriteValue_OpLsh32x32(v)
   339  	case ssaop.OpLsh32x64:
   340  		return rewriteValue_OpLsh32x64(v)
   341  	case ssaop.OpLsh32x8:
   342  		return rewriteValue_OpLsh32x8(v)
   343  	case ssaop.OpLsh64x16:
   344  		return rewriteValue_OpLsh64x16(v)
   345  	case ssaop.OpLsh64x32:
   346  		return rewriteValue_OpLsh64x32(v)
   347  	case ssaop.OpLsh64x64:
   348  		return rewriteValue_OpLsh64x64(v)
   349  	case ssaop.OpLsh64x8:
   350  		return rewriteValue_OpLsh64x8(v)
   351  	case ssaop.OpLsh8x16:
   352  		return rewriteValue_OpLsh8x16(v)
   353  	case ssaop.OpLsh8x32:
   354  		return rewriteValue_OpLsh8x32(v)
   355  	case ssaop.OpLsh8x64:
   356  		return rewriteValue_OpLsh8x64(v)
   357  	case ssaop.OpLsh8x8:
   358  		return rewriteValue_OpLsh8x8(v)
   359  	case ssaop.OpMax32F:
   360  		return rewriteValue_OpMax32F(v)
   361  	case ssaop.OpMax64F:
   362  		return rewriteValue_OpMax64F(v)
   363  	case ssaop.OpMin32F:
   364  		return rewriteValue_OpMin32F(v)
   365  	case ssaop.OpMin64F:
   366  		return rewriteValue_OpMin64F(v)
   367  	case ssaop.OpMod16:
   368  		return rewriteValue_OpMod16(v)
   369  	case ssaop.OpMod16u:
   370  		return rewriteValue_OpMod16u(v)
   371  	case ssaop.OpMod32:
   372  		return rewriteValue_OpMod32(v)
   373  	case ssaop.OpMod32u:
   374  		return rewriteValue_OpMod32u(v)
   375  	case ssaop.OpMod64:
   376  		return rewriteValue_OpMod64(v)
   377  	case ssaop.OpMod64u:
   378  		return rewriteValue_OpMod64u(v)
   379  	case ssaop.OpMod8:
   380  		return rewriteValue_OpMod8(v)
   381  	case ssaop.OpMod8u:
   382  		return rewriteValue_OpMod8u(v)
   383  	case ssaop.OpMove:
   384  		return rewriteValue_OpMove(v)
   385  	case ssaop.OpMul16:
   386  		v.Op = ssaop.OpPPC64MULLW
   387  		return true
   388  	case ssaop.OpMul32:
   389  		v.Op = ssaop.OpPPC64MULLW
   390  		return true
   391  	case ssaop.OpMul32F:
   392  		v.Op = ssaop.OpPPC64FMULS
   393  		return true
   394  	case ssaop.OpMul64:
   395  		v.Op = ssaop.OpPPC64MULLD
   396  		return true
   397  	case ssaop.OpMul64F:
   398  		v.Op = ssaop.OpPPC64FMUL
   399  		return true
   400  	case ssaop.OpMul8:
   401  		v.Op = ssaop.OpPPC64MULLW
   402  		return true
   403  	case ssaop.OpNeg16:
   404  		v.Op = ssaop.OpPPC64NEG
   405  		return true
   406  	case ssaop.OpNeg32:
   407  		v.Op = ssaop.OpPPC64NEG
   408  		return true
   409  	case ssaop.OpNeg32F:
   410  		v.Op = ssaop.OpPPC64FNEG
   411  		return true
   412  	case ssaop.OpNeg64:
   413  		v.Op = ssaop.OpPPC64NEG
   414  		return true
   415  	case ssaop.OpNeg64F:
   416  		v.Op = ssaop.OpPPC64FNEG
   417  		return true
   418  	case ssaop.OpNeg8:
   419  		v.Op = ssaop.OpPPC64NEG
   420  		return true
   421  	case ssaop.OpNeq16:
   422  		return rewriteValue_OpNeq16(v)
   423  	case ssaop.OpNeq32:
   424  		return rewriteValue_OpNeq32(v)
   425  	case ssaop.OpNeq32F:
   426  		return rewriteValue_OpNeq32F(v)
   427  	case ssaop.OpNeq64:
   428  		return rewriteValue_OpNeq64(v)
   429  	case ssaop.OpNeq64F:
   430  		return rewriteValue_OpNeq64F(v)
   431  	case ssaop.OpNeq8:
   432  		return rewriteValue_OpNeq8(v)
   433  	case ssaop.OpNeqB:
   434  		v.Op = ssaop.OpPPC64XOR
   435  		return true
   436  	case ssaop.OpNeqPtr:
   437  		return rewriteValue_OpNeqPtr(v)
   438  	case ssaop.OpNilCheck:
   439  		v.Op = ssaop.OpPPC64LoweredNilCheck
   440  		return true
   441  	case ssaop.OpNot:
   442  		return rewriteValue_OpNot(v)
   443  	case ssaop.OpOffPtr:
   444  		return rewriteValue_OpOffPtr(v)
   445  	case ssaop.OpOr16:
   446  		v.Op = ssaop.OpPPC64OR
   447  		return true
   448  	case ssaop.OpOr32:
   449  		v.Op = ssaop.OpPPC64OR
   450  		return true
   451  	case ssaop.OpOr64:
   452  		v.Op = ssaop.OpPPC64OR
   453  		return true
   454  	case ssaop.OpOr8:
   455  		v.Op = ssaop.OpPPC64OR
   456  		return true
   457  	case ssaop.OpOrB:
   458  		v.Op = ssaop.OpPPC64OR
   459  		return true
   460  	case ssaop.OpPPC64ADD:
   461  		return rewriteValue_OpPPC64ADD(v)
   462  	case ssaop.OpPPC64ADDC:
   463  		return rewriteValue_OpPPC64ADDC(v)
   464  	case ssaop.OpPPC64ADDE:
   465  		return rewriteValue_OpPPC64ADDE(v)
   466  	case ssaop.OpPPC64ADDconst:
   467  		return rewriteValue_OpPPC64ADDconst(v)
   468  	case ssaop.OpPPC64AND:
   469  		return rewriteValue_OpPPC64AND(v)
   470  	case ssaop.OpPPC64ANDN:
   471  		return rewriteValue_OpPPC64ANDN(v)
   472  	case ssaop.OpPPC64ANDconst:
   473  		return rewriteValue_OpPPC64ANDconst(v)
   474  	case ssaop.OpPPC64BRD:
   475  		return rewriteValue_OpPPC64BRD(v)
   476  	case ssaop.OpPPC64BRH:
   477  		return rewriteValue_OpPPC64BRH(v)
   478  	case ssaop.OpPPC64BRW:
   479  		return rewriteValue_OpPPC64BRW(v)
   480  	case ssaop.OpPPC64CLRLSLDI:
   481  		return rewriteValue_OpPPC64CLRLSLDI(v)
   482  	case ssaop.OpPPC64CMP:
   483  		return rewriteValue_OpPPC64CMP(v)
   484  	case ssaop.OpPPC64CMPU:
   485  		return rewriteValue_OpPPC64CMPU(v)
   486  	case ssaop.OpPPC64CMPUconst:
   487  		return rewriteValue_OpPPC64CMPUconst(v)
   488  	case ssaop.OpPPC64CMPW:
   489  		return rewriteValue_OpPPC64CMPW(v)
   490  	case ssaop.OpPPC64CMPWU:
   491  		return rewriteValue_OpPPC64CMPWU(v)
   492  	case ssaop.OpPPC64CMPWUconst:
   493  		return rewriteValue_OpPPC64CMPWUconst(v)
   494  	case ssaop.OpPPC64CMPWconst:
   495  		return rewriteValue_OpPPC64CMPWconst(v)
   496  	case ssaop.OpPPC64CMPconst:
   497  		return rewriteValue_OpPPC64CMPconst(v)
   498  	case ssaop.OpPPC64Equal:
   499  		return rewriteValue_OpPPC64Equal(v)
   500  	case ssaop.OpPPC64FABS:
   501  		return rewriteValue_OpPPC64FABS(v)
   502  	case ssaop.OpPPC64FADD:
   503  		return rewriteValue_OpPPC64FADD(v)
   504  	case ssaop.OpPPC64FADDS:
   505  		return rewriteValue_OpPPC64FADDS(v)
   506  	case ssaop.OpPPC64FCEIL:
   507  		return rewriteValue_OpPPC64FCEIL(v)
   508  	case ssaop.OpPPC64FFLOOR:
   509  		return rewriteValue_OpPPC64FFLOOR(v)
   510  	case ssaop.OpPPC64FGreaterEqual:
   511  		return rewriteValue_OpPPC64FGreaterEqual(v)
   512  	case ssaop.OpPPC64FGreaterThan:
   513  		return rewriteValue_OpPPC64FGreaterThan(v)
   514  	case ssaop.OpPPC64FLessEqual:
   515  		return rewriteValue_OpPPC64FLessEqual(v)
   516  	case ssaop.OpPPC64FLessThan:
   517  		return rewriteValue_OpPPC64FLessThan(v)
   518  	case ssaop.OpPPC64FMOVDload:
   519  		return rewriteValue_OpPPC64FMOVDload(v)
   520  	case ssaop.OpPPC64FMOVDstore:
   521  		return rewriteValue_OpPPC64FMOVDstore(v)
   522  	case ssaop.OpPPC64FMOVSload:
   523  		return rewriteValue_OpPPC64FMOVSload(v)
   524  	case ssaop.OpPPC64FMOVSstore:
   525  		return rewriteValue_OpPPC64FMOVSstore(v)
   526  	case ssaop.OpPPC64FNEG:
   527  		return rewriteValue_OpPPC64FNEG(v)
   528  	case ssaop.OpPPC64FSQRT:
   529  		return rewriteValue_OpPPC64FSQRT(v)
   530  	case ssaop.OpPPC64FSUB:
   531  		return rewriteValue_OpPPC64FSUB(v)
   532  	case ssaop.OpPPC64FSUBS:
   533  		return rewriteValue_OpPPC64FSUBS(v)
   534  	case ssaop.OpPPC64FTRUNC:
   535  		return rewriteValue_OpPPC64FTRUNC(v)
   536  	case ssaop.OpPPC64GreaterEqual:
   537  		return rewriteValue_OpPPC64GreaterEqual(v)
   538  	case ssaop.OpPPC64GreaterThan:
   539  		return rewriteValue_OpPPC64GreaterThan(v)
   540  	case ssaop.OpPPC64ISEL:
   541  		return rewriteValue_OpPPC64ISEL(v)
   542  	case ssaop.OpPPC64LessEqual:
   543  		return rewriteValue_OpPPC64LessEqual(v)
   544  	case ssaop.OpPPC64LessThan:
   545  		return rewriteValue_OpPPC64LessThan(v)
   546  	case ssaop.OpPPC64LoweredPanicBoundsCR:
   547  		return rewriteValue_OpPPC64LoweredPanicBoundsCR(v)
   548  	case ssaop.OpPPC64LoweredPanicBoundsRC:
   549  		return rewriteValue_OpPPC64LoweredPanicBoundsRC(v)
   550  	case ssaop.OpPPC64LoweredPanicBoundsRR:
   551  		return rewriteValue_OpPPC64LoweredPanicBoundsRR(v)
   552  	case ssaop.OpPPC64MFVSRD:
   553  		return rewriteValue_OpPPC64MFVSRD(v)
   554  	case ssaop.OpPPC64MOVBZload:
   555  		return rewriteValue_OpPPC64MOVBZload(v)
   556  	case ssaop.OpPPC64MOVBZloadidx:
   557  		return rewriteValue_OpPPC64MOVBZloadidx(v)
   558  	case ssaop.OpPPC64MOVBZreg:
   559  		return rewriteValue_OpPPC64MOVBZreg(v)
   560  	case ssaop.OpPPC64MOVBreg:
   561  		return rewriteValue_OpPPC64MOVBreg(v)
   562  	case ssaop.OpPPC64MOVBstore:
   563  		return rewriteValue_OpPPC64MOVBstore(v)
   564  	case ssaop.OpPPC64MOVBstoreidx:
   565  		return rewriteValue_OpPPC64MOVBstoreidx(v)
   566  	case ssaop.OpPPC64MOVBstorezero:
   567  		return rewriteValue_OpPPC64MOVBstorezero(v)
   568  	case ssaop.OpPPC64MOVDaddr:
   569  		return rewriteValue_OpPPC64MOVDaddr(v)
   570  	case ssaop.OpPPC64MOVDload:
   571  		return rewriteValue_OpPPC64MOVDload(v)
   572  	case ssaop.OpPPC64MOVDloadidx:
   573  		return rewriteValue_OpPPC64MOVDloadidx(v)
   574  	case ssaop.OpPPC64MOVDstore:
   575  		return rewriteValue_OpPPC64MOVDstore(v)
   576  	case ssaop.OpPPC64MOVDstoreidx:
   577  		return rewriteValue_OpPPC64MOVDstoreidx(v)
   578  	case ssaop.OpPPC64MOVDstorezero:
   579  		return rewriteValue_OpPPC64MOVDstorezero(v)
   580  	case ssaop.OpPPC64MOVHBRstore:
   581  		return rewriteValue_OpPPC64MOVHBRstore(v)
   582  	case ssaop.OpPPC64MOVHZload:
   583  		return rewriteValue_OpPPC64MOVHZload(v)
   584  	case ssaop.OpPPC64MOVHZloadidx:
   585  		return rewriteValue_OpPPC64MOVHZloadidx(v)
   586  	case ssaop.OpPPC64MOVHZreg:
   587  		return rewriteValue_OpPPC64MOVHZreg(v)
   588  	case ssaop.OpPPC64MOVHload:
   589  		return rewriteValue_OpPPC64MOVHload(v)
   590  	case ssaop.OpPPC64MOVHloadidx:
   591  		return rewriteValue_OpPPC64MOVHloadidx(v)
   592  	case ssaop.OpPPC64MOVHreg:
   593  		return rewriteValue_OpPPC64MOVHreg(v)
   594  	case ssaop.OpPPC64MOVHstore:
   595  		return rewriteValue_OpPPC64MOVHstore(v)
   596  	case ssaop.OpPPC64MOVHstoreidx:
   597  		return rewriteValue_OpPPC64MOVHstoreidx(v)
   598  	case ssaop.OpPPC64MOVHstorezero:
   599  		return rewriteValue_OpPPC64MOVHstorezero(v)
   600  	case ssaop.OpPPC64MOVWBRstore:
   601  		return rewriteValue_OpPPC64MOVWBRstore(v)
   602  	case ssaop.OpPPC64MOVWZload:
   603  		return rewriteValue_OpPPC64MOVWZload(v)
   604  	case ssaop.OpPPC64MOVWZloadidx:
   605  		return rewriteValue_OpPPC64MOVWZloadidx(v)
   606  	case ssaop.OpPPC64MOVWZreg:
   607  		return rewriteValue_OpPPC64MOVWZreg(v)
   608  	case ssaop.OpPPC64MOVWload:
   609  		return rewriteValue_OpPPC64MOVWload(v)
   610  	case ssaop.OpPPC64MOVWloadidx:
   611  		return rewriteValue_OpPPC64MOVWloadidx(v)
   612  	case ssaop.OpPPC64MOVWreg:
   613  		return rewriteValue_OpPPC64MOVWreg(v)
   614  	case ssaop.OpPPC64MOVWstore:
   615  		return rewriteValue_OpPPC64MOVWstore(v)
   616  	case ssaop.OpPPC64MOVWstoreidx:
   617  		return rewriteValue_OpPPC64MOVWstoreidx(v)
   618  	case ssaop.OpPPC64MOVWstorezero:
   619  		return rewriteValue_OpPPC64MOVWstorezero(v)
   620  	case ssaop.OpPPC64MTVSRD:
   621  		return rewriteValue_OpPPC64MTVSRD(v)
   622  	case ssaop.OpPPC64MULLD:
   623  		return rewriteValue_OpPPC64MULLD(v)
   624  	case ssaop.OpPPC64MULLW:
   625  		return rewriteValue_OpPPC64MULLW(v)
   626  	case ssaop.OpPPC64NEG:
   627  		return rewriteValue_OpPPC64NEG(v)
   628  	case ssaop.OpPPC64NOR:
   629  		return rewriteValue_OpPPC64NOR(v)
   630  	case ssaop.OpPPC64NotEqual:
   631  		return rewriteValue_OpPPC64NotEqual(v)
   632  	case ssaop.OpPPC64OR:
   633  		return rewriteValue_OpPPC64OR(v)
   634  	case ssaop.OpPPC64ORN:
   635  		return rewriteValue_OpPPC64ORN(v)
   636  	case ssaop.OpPPC64ORconst:
   637  		return rewriteValue_OpPPC64ORconst(v)
   638  	case ssaop.OpPPC64RLWINM:
   639  		return rewriteValue_OpPPC64RLWINM(v)
   640  	case ssaop.OpPPC64ROTL:
   641  		return rewriteValue_OpPPC64ROTL(v)
   642  	case ssaop.OpPPC64ROTLW:
   643  		return rewriteValue_OpPPC64ROTLW(v)
   644  	case ssaop.OpPPC64ROTLWconst:
   645  		return rewriteValue_OpPPC64ROTLWconst(v)
   646  	case ssaop.OpPPC64SETBC:
   647  		return rewriteValue_OpPPC64SETBC(v)
   648  	case ssaop.OpPPC64SETBCR:
   649  		return rewriteValue_OpPPC64SETBCR(v)
   650  	case ssaop.OpPPC64SLD:
   651  		return rewriteValue_OpPPC64SLD(v)
   652  	case ssaop.OpPPC64SLDconst:
   653  		return rewriteValue_OpPPC64SLDconst(v)
   654  	case ssaop.OpPPC64SLW:
   655  		return rewriteValue_OpPPC64SLW(v)
   656  	case ssaop.OpPPC64SLWconst:
   657  		return rewriteValue_OpPPC64SLWconst(v)
   658  	case ssaop.OpPPC64SRAD:
   659  		return rewriteValue_OpPPC64SRAD(v)
   660  	case ssaop.OpPPC64SRAW:
   661  		return rewriteValue_OpPPC64SRAW(v)
   662  	case ssaop.OpPPC64SRD:
   663  		return rewriteValue_OpPPC64SRD(v)
   664  	case ssaop.OpPPC64SRW:
   665  		return rewriteValue_OpPPC64SRW(v)
   666  	case ssaop.OpPPC64SRWconst:
   667  		return rewriteValue_OpPPC64SRWconst(v)
   668  	case ssaop.OpPPC64SUB:
   669  		return rewriteValue_OpPPC64SUB(v)
   670  	case ssaop.OpPPC64SUBE:
   671  		return rewriteValue_OpPPC64SUBE(v)
   672  	case ssaop.OpPPC64SUBFCconst:
   673  		return rewriteValue_OpPPC64SUBFCconst(v)
   674  	case ssaop.OpPPC64XOR:
   675  		return rewriteValue_OpPPC64XOR(v)
   676  	case ssaop.OpPPC64XORconst:
   677  		return rewriteValue_OpPPC64XORconst(v)
   678  	case ssaop.OpPanicBounds:
   679  		v.Op = ssaop.OpPPC64LoweredPanicBoundsRR
   680  		return true
   681  	case ssaop.OpPopCount16:
   682  		return rewriteValue_OpPopCount16(v)
   683  	case ssaop.OpPopCount32:
   684  		return rewriteValue_OpPopCount32(v)
   685  	case ssaop.OpPopCount64:
   686  		v.Op = ssaop.OpPPC64POPCNTD
   687  		return true
   688  	case ssaop.OpPopCount8:
   689  		return rewriteValue_OpPopCount8(v)
   690  	case ssaop.OpPrefetchCache:
   691  		return rewriteValue_OpPrefetchCache(v)
   692  	case ssaop.OpPrefetchCacheStreamed:
   693  		return rewriteValue_OpPrefetchCacheStreamed(v)
   694  	case ssaop.OpPubBarrier:
   695  		v.Op = ssaop.OpPPC64LoweredPubBarrier
   696  		return true
   697  	case ssaop.OpRotateLeft16:
   698  		return rewriteValue_OpRotateLeft16(v)
   699  	case ssaop.OpRotateLeft32:
   700  		v.Op = ssaop.OpPPC64ROTLW
   701  		return true
   702  	case ssaop.OpRotateLeft64:
   703  		v.Op = ssaop.OpPPC64ROTL
   704  		return true
   705  	case ssaop.OpRotateLeft8:
   706  		return rewriteValue_OpRotateLeft8(v)
   707  	case ssaop.OpRound:
   708  		v.Op = ssaop.OpPPC64FROUND
   709  		return true
   710  	case ssaop.OpRound32F:
   711  		v.Op = ssaop.OpPPC64LoweredRound32F
   712  		return true
   713  	case ssaop.OpRound64F:
   714  		v.Op = ssaop.OpPPC64LoweredRound64F
   715  		return true
   716  	case ssaop.OpRsh16Ux16:
   717  		return rewriteValue_OpRsh16Ux16(v)
   718  	case ssaop.OpRsh16Ux32:
   719  		return rewriteValue_OpRsh16Ux32(v)
   720  	case ssaop.OpRsh16Ux64:
   721  		return rewriteValue_OpRsh16Ux64(v)
   722  	case ssaop.OpRsh16Ux8:
   723  		return rewriteValue_OpRsh16Ux8(v)
   724  	case ssaop.OpRsh16x16:
   725  		return rewriteValue_OpRsh16x16(v)
   726  	case ssaop.OpRsh16x32:
   727  		return rewriteValue_OpRsh16x32(v)
   728  	case ssaop.OpRsh16x64:
   729  		return rewriteValue_OpRsh16x64(v)
   730  	case ssaop.OpRsh16x8:
   731  		return rewriteValue_OpRsh16x8(v)
   732  	case ssaop.OpRsh32Ux16:
   733  		return rewriteValue_OpRsh32Ux16(v)
   734  	case ssaop.OpRsh32Ux32:
   735  		return rewriteValue_OpRsh32Ux32(v)
   736  	case ssaop.OpRsh32Ux64:
   737  		return rewriteValue_OpRsh32Ux64(v)
   738  	case ssaop.OpRsh32Ux8:
   739  		return rewriteValue_OpRsh32Ux8(v)
   740  	case ssaop.OpRsh32x16:
   741  		return rewriteValue_OpRsh32x16(v)
   742  	case ssaop.OpRsh32x32:
   743  		return rewriteValue_OpRsh32x32(v)
   744  	case ssaop.OpRsh32x64:
   745  		return rewriteValue_OpRsh32x64(v)
   746  	case ssaop.OpRsh32x8:
   747  		return rewriteValue_OpRsh32x8(v)
   748  	case ssaop.OpRsh64Ux16:
   749  		return rewriteValue_OpRsh64Ux16(v)
   750  	case ssaop.OpRsh64Ux32:
   751  		return rewriteValue_OpRsh64Ux32(v)
   752  	case ssaop.OpRsh64Ux64:
   753  		return rewriteValue_OpRsh64Ux64(v)
   754  	case ssaop.OpRsh64Ux8:
   755  		return rewriteValue_OpRsh64Ux8(v)
   756  	case ssaop.OpRsh64x16:
   757  		return rewriteValue_OpRsh64x16(v)
   758  	case ssaop.OpRsh64x32:
   759  		return rewriteValue_OpRsh64x32(v)
   760  	case ssaop.OpRsh64x64:
   761  		return rewriteValue_OpRsh64x64(v)
   762  	case ssaop.OpRsh64x8:
   763  		return rewriteValue_OpRsh64x8(v)
   764  	case ssaop.OpRsh8Ux16:
   765  		return rewriteValue_OpRsh8Ux16(v)
   766  	case ssaop.OpRsh8Ux32:
   767  		return rewriteValue_OpRsh8Ux32(v)
   768  	case ssaop.OpRsh8Ux64:
   769  		return rewriteValue_OpRsh8Ux64(v)
   770  	case ssaop.OpRsh8Ux8:
   771  		return rewriteValue_OpRsh8Ux8(v)
   772  	case ssaop.OpRsh8x16:
   773  		return rewriteValue_OpRsh8x16(v)
   774  	case ssaop.OpRsh8x32:
   775  		return rewriteValue_OpRsh8x32(v)
   776  	case ssaop.OpRsh8x64:
   777  		return rewriteValue_OpRsh8x64(v)
   778  	case ssaop.OpRsh8x8:
   779  		return rewriteValue_OpRsh8x8(v)
   780  	case ssaop.OpSelect0:
   781  		return rewriteValue_OpSelect0(v)
   782  	case ssaop.OpSelect1:
   783  		return rewriteValue_OpSelect1(v)
   784  	case ssaop.OpSelectN:
   785  		return rewriteValue_OpSelectN(v)
   786  	case ssaop.OpSignExt16to32:
   787  		v.Op = ssaop.OpPPC64MOVHreg
   788  		return true
   789  	case ssaop.OpSignExt16to64:
   790  		v.Op = ssaop.OpPPC64MOVHreg
   791  		return true
   792  	case ssaop.OpSignExt32to64:
   793  		v.Op = ssaop.OpPPC64MOVWreg
   794  		return true
   795  	case ssaop.OpSignExt8to16:
   796  		v.Op = ssaop.OpPPC64MOVBreg
   797  		return true
   798  	case ssaop.OpSignExt8to32:
   799  		v.Op = ssaop.OpPPC64MOVBreg
   800  		return true
   801  	case ssaop.OpSignExt8to64:
   802  		v.Op = ssaop.OpPPC64MOVBreg
   803  		return true
   804  	case ssaop.OpSlicemask:
   805  		return rewriteValue_OpSlicemask(v)
   806  	case ssaop.OpSqrt:
   807  		v.Op = ssaop.OpPPC64FSQRT
   808  		return true
   809  	case ssaop.OpSqrt32:
   810  		v.Op = ssaop.OpPPC64FSQRTS
   811  		return true
   812  	case ssaop.OpStaticCall:
   813  		v.Op = ssaop.OpPPC64CALLstatic
   814  		return true
   815  	case ssaop.OpStore:
   816  		return rewriteValue_OpStore(v)
   817  	case ssaop.OpSub16:
   818  		v.Op = ssaop.OpPPC64SUB
   819  		return true
   820  	case ssaop.OpSub32:
   821  		v.Op = ssaop.OpPPC64SUB
   822  		return true
   823  	case ssaop.OpSub32F:
   824  		v.Op = ssaop.OpPPC64FSUBS
   825  		return true
   826  	case ssaop.OpSub64:
   827  		v.Op = ssaop.OpPPC64SUB
   828  		return true
   829  	case ssaop.OpSub64F:
   830  		v.Op = ssaop.OpPPC64FSUB
   831  		return true
   832  	case ssaop.OpSub8:
   833  		v.Op = ssaop.OpPPC64SUB
   834  		return true
   835  	case ssaop.OpSubPtr:
   836  		v.Op = ssaop.OpPPC64SUB
   837  		return true
   838  	case ssaop.OpTailCall:
   839  		v.Op = ssaop.OpPPC64CALLtail
   840  		return true
   841  	case ssaop.OpTailCallInter:
   842  		v.Op = ssaop.OpPPC64CALLtailinter
   843  		return true
   844  	case ssaop.OpTrunc:
   845  		v.Op = ssaop.OpPPC64FTRUNC
   846  		return true
   847  	case ssaop.OpTrunc16to8:
   848  		return rewriteValue_OpTrunc16to8(v)
   849  	case ssaop.OpTrunc32to16:
   850  		return rewriteValue_OpTrunc32to16(v)
   851  	case ssaop.OpTrunc32to8:
   852  		return rewriteValue_OpTrunc32to8(v)
   853  	case ssaop.OpTrunc64to16:
   854  		return rewriteValue_OpTrunc64to16(v)
   855  	case ssaop.OpTrunc64to32:
   856  		return rewriteValue_OpTrunc64to32(v)
   857  	case ssaop.OpTrunc64to8:
   858  		return rewriteValue_OpTrunc64to8(v)
   859  	case ssaop.OpWB:
   860  		v.Op = ssaop.OpPPC64LoweredWB
   861  		return true
   862  	case ssaop.OpXor16:
   863  		v.Op = ssaop.OpPPC64XOR
   864  		return true
   865  	case ssaop.OpXor32:
   866  		v.Op = ssaop.OpPPC64XOR
   867  		return true
   868  	case ssaop.OpXor64:
   869  		v.Op = ssaop.OpPPC64XOR
   870  		return true
   871  	case ssaop.OpXor8:
   872  		v.Op = ssaop.OpPPC64XOR
   873  		return true
   874  	case ssaop.OpZero:
   875  		return rewriteValue_OpZero(v)
   876  	case ssaop.OpZeroExt16to32:
   877  		v.Op = ssaop.OpPPC64MOVHZreg
   878  		return true
   879  	case ssaop.OpZeroExt16to64:
   880  		v.Op = ssaop.OpPPC64MOVHZreg
   881  		return true
   882  	case ssaop.OpZeroExt32to64:
   883  		v.Op = ssaop.OpPPC64MOVWZreg
   884  		return true
   885  	case ssaop.OpZeroExt8to16:
   886  		v.Op = ssaop.OpPPC64MOVBZreg
   887  		return true
   888  	case ssaop.OpZeroExt8to32:
   889  		v.Op = ssaop.OpPPC64MOVBZreg
   890  		return true
   891  	case ssaop.OpZeroExt8to64:
   892  		v.Op = ssaop.OpPPC64MOVBZreg
   893  		return true
   894  	}
   895  	return false
   896  }
   897  func rewriteValue_OpAddr(v *ssa.Value) bool {
   898  	v_0 := v.Args[0]
   899  	// match: (Addr {sym} base)
   900  	// result: (MOVDaddr {sym} [0] base)
   901  	for {
   902  		sym := ssa.AuxToSym(v.Aux)
   903  		base := v_0
   904  		v.Reset(ssaop.OpPPC64MOVDaddr)
   905  		v.AuxInt = ssa.Int32ToAuxInt(0)
   906  		v.Aux = ssa.SymToAux(sym)
   907  		v.AddArg(base)
   908  		return true
   909  	}
   910  }
   911  func rewriteValue_OpAtomicCompareAndSwap32(v *ssa.Value) bool {
   912  	v_3 := v.Args[3]
   913  	v_2 := v.Args[2]
   914  	v_1 := v.Args[1]
   915  	v_0 := v.Args[0]
   916  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
   917  	// result: (LoweredAtomicCas32 [1] ptr old new_ mem)
   918  	for {
   919  		ptr := v_0
   920  		old := v_1
   921  		new_ := v_2
   922  		mem := v_3
   923  		v.Reset(ssaop.OpPPC64LoweredAtomicCas32)
   924  		v.AuxInt = ssa.Int64ToAuxInt(1)
   925  		v.AddArg4(ptr, old, new_, mem)
   926  		return true
   927  	}
   928  }
   929  func rewriteValue_OpAtomicCompareAndSwap64(v *ssa.Value) bool {
   930  	v_3 := v.Args[3]
   931  	v_2 := v.Args[2]
   932  	v_1 := v.Args[1]
   933  	v_0 := v.Args[0]
   934  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
   935  	// result: (LoweredAtomicCas64 [1] ptr old new_ mem)
   936  	for {
   937  		ptr := v_0
   938  		old := v_1
   939  		new_ := v_2
   940  		mem := v_3
   941  		v.Reset(ssaop.OpPPC64LoweredAtomicCas64)
   942  		v.AuxInt = ssa.Int64ToAuxInt(1)
   943  		v.AddArg4(ptr, old, new_, mem)
   944  		return true
   945  	}
   946  }
   947  func rewriteValue_OpAtomicCompareAndSwapRel32(v *ssa.Value) bool {
   948  	v_3 := v.Args[3]
   949  	v_2 := v.Args[2]
   950  	v_1 := v.Args[1]
   951  	v_0 := v.Args[0]
   952  	// match: (AtomicCompareAndSwapRel32 ptr old new_ mem)
   953  	// result: (LoweredAtomicCas32 [0] ptr old new_ mem)
   954  	for {
   955  		ptr := v_0
   956  		old := v_1
   957  		new_ := v_2
   958  		mem := v_3
   959  		v.Reset(ssaop.OpPPC64LoweredAtomicCas32)
   960  		v.AuxInt = ssa.Int64ToAuxInt(0)
   961  		v.AddArg4(ptr, old, new_, mem)
   962  		return true
   963  	}
   964  }
   965  func rewriteValue_OpAtomicLoad32(v *ssa.Value) bool {
   966  	v_1 := v.Args[1]
   967  	v_0 := v.Args[0]
   968  	// match: (AtomicLoad32 ptr mem)
   969  	// result: (LoweredAtomicLoad32 [1] ptr mem)
   970  	for {
   971  		ptr := v_0
   972  		mem := v_1
   973  		v.Reset(ssaop.OpPPC64LoweredAtomicLoad32)
   974  		v.AuxInt = ssa.Int64ToAuxInt(1)
   975  		v.AddArg2(ptr, mem)
   976  		return true
   977  	}
   978  }
   979  func rewriteValue_OpAtomicLoad64(v *ssa.Value) bool {
   980  	v_1 := v.Args[1]
   981  	v_0 := v.Args[0]
   982  	// match: (AtomicLoad64 ptr mem)
   983  	// result: (LoweredAtomicLoad64 [1] ptr mem)
   984  	for {
   985  		ptr := v_0
   986  		mem := v_1
   987  		v.Reset(ssaop.OpPPC64LoweredAtomicLoad64)
   988  		v.AuxInt = ssa.Int64ToAuxInt(1)
   989  		v.AddArg2(ptr, mem)
   990  		return true
   991  	}
   992  }
   993  func rewriteValue_OpAtomicLoad8(v *ssa.Value) bool {
   994  	v_1 := v.Args[1]
   995  	v_0 := v.Args[0]
   996  	// match: (AtomicLoad8 ptr mem)
   997  	// result: (LoweredAtomicLoad8 [1] ptr mem)
   998  	for {
   999  		ptr := v_0
  1000  		mem := v_1
  1001  		v.Reset(ssaop.OpPPC64LoweredAtomicLoad8)
  1002  		v.AuxInt = ssa.Int64ToAuxInt(1)
  1003  		v.AddArg2(ptr, mem)
  1004  		return true
  1005  	}
  1006  }
  1007  func rewriteValue_OpAtomicLoadAcq32(v *ssa.Value) bool {
  1008  	v_1 := v.Args[1]
  1009  	v_0 := v.Args[0]
  1010  	// match: (AtomicLoadAcq32 ptr mem)
  1011  	// result: (LoweredAtomicLoad32 [0] ptr mem)
  1012  	for {
  1013  		ptr := v_0
  1014  		mem := v_1
  1015  		v.Reset(ssaop.OpPPC64LoweredAtomicLoad32)
  1016  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1017  		v.AddArg2(ptr, mem)
  1018  		return true
  1019  	}
  1020  }
  1021  func rewriteValue_OpAtomicLoadAcq64(v *ssa.Value) bool {
  1022  	v_1 := v.Args[1]
  1023  	v_0 := v.Args[0]
  1024  	// match: (AtomicLoadAcq64 ptr mem)
  1025  	// result: (LoweredAtomicLoad64 [0] ptr mem)
  1026  	for {
  1027  		ptr := v_0
  1028  		mem := v_1
  1029  		v.Reset(ssaop.OpPPC64LoweredAtomicLoad64)
  1030  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1031  		v.AddArg2(ptr, mem)
  1032  		return true
  1033  	}
  1034  }
  1035  func rewriteValue_OpAtomicLoadPtr(v *ssa.Value) bool {
  1036  	v_1 := v.Args[1]
  1037  	v_0 := v.Args[0]
  1038  	// match: (AtomicLoadPtr ptr mem)
  1039  	// result: (LoweredAtomicLoadPtr [1] ptr mem)
  1040  	for {
  1041  		ptr := v_0
  1042  		mem := v_1
  1043  		v.Reset(ssaop.OpPPC64LoweredAtomicLoadPtr)
  1044  		v.AuxInt = ssa.Int64ToAuxInt(1)
  1045  		v.AddArg2(ptr, mem)
  1046  		return true
  1047  	}
  1048  }
  1049  func rewriteValue_OpAtomicStore32(v *ssa.Value) bool {
  1050  	v_2 := v.Args[2]
  1051  	v_1 := v.Args[1]
  1052  	v_0 := v.Args[0]
  1053  	// match: (AtomicStore32 ptr val mem)
  1054  	// result: (LoweredAtomicStore32 [1] ptr val mem)
  1055  	for {
  1056  		ptr := v_0
  1057  		val := v_1
  1058  		mem := v_2
  1059  		v.Reset(ssaop.OpPPC64LoweredAtomicStore32)
  1060  		v.AuxInt = ssa.Int64ToAuxInt(1)
  1061  		v.AddArg3(ptr, val, mem)
  1062  		return true
  1063  	}
  1064  }
  1065  func rewriteValue_OpAtomicStore64(v *ssa.Value) bool {
  1066  	v_2 := v.Args[2]
  1067  	v_1 := v.Args[1]
  1068  	v_0 := v.Args[0]
  1069  	// match: (AtomicStore64 ptr val mem)
  1070  	// result: (LoweredAtomicStore64 [1] ptr val mem)
  1071  	for {
  1072  		ptr := v_0
  1073  		val := v_1
  1074  		mem := v_2
  1075  		v.Reset(ssaop.OpPPC64LoweredAtomicStore64)
  1076  		v.AuxInt = ssa.Int64ToAuxInt(1)
  1077  		v.AddArg3(ptr, val, mem)
  1078  		return true
  1079  	}
  1080  }
  1081  func rewriteValue_OpAtomicStore8(v *ssa.Value) bool {
  1082  	v_2 := v.Args[2]
  1083  	v_1 := v.Args[1]
  1084  	v_0 := v.Args[0]
  1085  	// match: (AtomicStore8 ptr val mem)
  1086  	// result: (LoweredAtomicStore8 [1] ptr val mem)
  1087  	for {
  1088  		ptr := v_0
  1089  		val := v_1
  1090  		mem := v_2
  1091  		v.Reset(ssaop.OpPPC64LoweredAtomicStore8)
  1092  		v.AuxInt = ssa.Int64ToAuxInt(1)
  1093  		v.AddArg3(ptr, val, mem)
  1094  		return true
  1095  	}
  1096  }
  1097  func rewriteValue_OpAtomicStoreRel32(v *ssa.Value) bool {
  1098  	v_2 := v.Args[2]
  1099  	v_1 := v.Args[1]
  1100  	v_0 := v.Args[0]
  1101  	// match: (AtomicStoreRel32 ptr val mem)
  1102  	// result: (LoweredAtomicStore32 [0] ptr val mem)
  1103  	for {
  1104  		ptr := v_0
  1105  		val := v_1
  1106  		mem := v_2
  1107  		v.Reset(ssaop.OpPPC64LoweredAtomicStore32)
  1108  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1109  		v.AddArg3(ptr, val, mem)
  1110  		return true
  1111  	}
  1112  }
  1113  func rewriteValue_OpAtomicStoreRel64(v *ssa.Value) bool {
  1114  	v_2 := v.Args[2]
  1115  	v_1 := v.Args[1]
  1116  	v_0 := v.Args[0]
  1117  	// match: (AtomicStoreRel64 ptr val mem)
  1118  	// result: (LoweredAtomicStore64 [0] ptr val mem)
  1119  	for {
  1120  		ptr := v_0
  1121  		val := v_1
  1122  		mem := v_2
  1123  		v.Reset(ssaop.OpPPC64LoweredAtomicStore64)
  1124  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1125  		v.AddArg3(ptr, val, mem)
  1126  		return true
  1127  	}
  1128  }
  1129  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
  1130  	v_1 := v.Args[1]
  1131  	v_0 := v.Args[0]
  1132  	b := v.Block
  1133  	// match: (Avg64u <t> x y)
  1134  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1135  	for {
  1136  		t := v.Type
  1137  		x := v_0
  1138  		y := v_1
  1139  		v.Reset(ssaop.OpPPC64ADD)
  1140  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRDconst, t)
  1141  		v0.AuxInt = ssa.Int64ToAuxInt(1)
  1142  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SUB, t)
  1143  		v1.AddArg2(x, y)
  1144  		v0.AddArg(v1)
  1145  		v.AddArg2(v0, y)
  1146  		return true
  1147  	}
  1148  }
  1149  func rewriteValue_OpBitLen16(v *ssa.Value) bool {
  1150  	v_0 := v.Args[0]
  1151  	b := v.Block
  1152  	typ := &b.Func.Config.Types
  1153  	// match: (BitLen16 x)
  1154  	// result: (BitLen64 (ZeroExt16to64 x))
  1155  	for {
  1156  		x := v_0
  1157  		v.Reset(ssaop.OpBitLen64)
  1158  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1159  		v0.AddArg(x)
  1160  		v.AddArg(v0)
  1161  		return true
  1162  	}
  1163  }
  1164  func rewriteValue_OpBitLen32(v *ssa.Value) bool {
  1165  	v_0 := v.Args[0]
  1166  	b := v.Block
  1167  	typ := &b.Func.Config.Types
  1168  	// match: (BitLen32 x)
  1169  	// result: (SUBFCconst [32] (CNTLZW <typ.Int> x))
  1170  	for {
  1171  		x := v_0
  1172  		v.Reset(ssaop.OpPPC64SUBFCconst)
  1173  		v.AuxInt = ssa.Int64ToAuxInt(32)
  1174  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CNTLZW, typ.Int)
  1175  		v0.AddArg(x)
  1176  		v.AddArg(v0)
  1177  		return true
  1178  	}
  1179  }
  1180  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
  1181  	v_0 := v.Args[0]
  1182  	b := v.Block
  1183  	typ := &b.Func.Config.Types
  1184  	// match: (BitLen64 x)
  1185  	// result: (SUBFCconst [64] (CNTLZD <typ.Int> x))
  1186  	for {
  1187  		x := v_0
  1188  		v.Reset(ssaop.OpPPC64SUBFCconst)
  1189  		v.AuxInt = ssa.Int64ToAuxInt(64)
  1190  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CNTLZD, typ.Int)
  1191  		v0.AddArg(x)
  1192  		v.AddArg(v0)
  1193  		return true
  1194  	}
  1195  }
  1196  func rewriteValue_OpBitLen8(v *ssa.Value) bool {
  1197  	v_0 := v.Args[0]
  1198  	b := v.Block
  1199  	typ := &b.Func.Config.Types
  1200  	// match: (BitLen8 x)
  1201  	// result: (BitLen64 (ZeroExt8to64 x))
  1202  	for {
  1203  		x := v_0
  1204  		v.Reset(ssaop.OpBitLen64)
  1205  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1206  		v0.AddArg(x)
  1207  		v.AddArg(v0)
  1208  		return true
  1209  	}
  1210  }
  1211  func rewriteValue_OpBswap16(v *ssa.Value) bool {
  1212  	v_0 := v.Args[0]
  1213  	b := v.Block
  1214  	typ := &b.Func.Config.Types
  1215  	// match: (Bswap16 x)
  1216  	// cond: buildcfg.GOPPC64>=10
  1217  	// result: (BRH x)
  1218  	for {
  1219  		x := v_0
  1220  		if !(buildcfg.GOPPC64 >= 10) {
  1221  			break
  1222  		}
  1223  		v.Reset(ssaop.OpPPC64BRH)
  1224  		v.AddArg(x)
  1225  		return true
  1226  	}
  1227  	// match: (Bswap16 x:(MOVHZload [off] {sym} ptr mem))
  1228  	// result: @x.Block (MOVHBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
  1229  	for {
  1230  		x := v_0
  1231  		if x.Op != ssaop.OpPPC64MOVHZload {
  1232  			break
  1233  		}
  1234  		off := ssa.AuxIntToInt32(x.AuxInt)
  1235  		sym := ssa.AuxToSym(x.Aux)
  1236  		mem := x.Args[1]
  1237  		ptr := x.Args[0]
  1238  		b = x.Block
  1239  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVHBRload, typ.UInt16)
  1240  		v.CopyOf(v0)
  1241  		v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  1242  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  1243  		v1.Aux = ssa.SymToAux(sym)
  1244  		v1.AddArg(ptr)
  1245  		v0.AddArg2(v1, mem)
  1246  		return true
  1247  	}
  1248  	// match: (Bswap16 x:(MOVHZloadidx ptr idx mem))
  1249  	// result: @x.Block (MOVHBRloadidx ptr idx mem)
  1250  	for {
  1251  		x := v_0
  1252  		if x.Op != ssaop.OpPPC64MOVHZloadidx {
  1253  			break
  1254  		}
  1255  		mem := x.Args[2]
  1256  		ptr := x.Args[0]
  1257  		idx := x.Args[1]
  1258  		b = x.Block
  1259  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHBRloadidx, typ.Int16)
  1260  		v.CopyOf(v0)
  1261  		v0.AddArg3(ptr, idx, mem)
  1262  		return true
  1263  	}
  1264  	return false
  1265  }
  1266  func rewriteValue_OpBswap32(v *ssa.Value) bool {
  1267  	v_0 := v.Args[0]
  1268  	b := v.Block
  1269  	typ := &b.Func.Config.Types
  1270  	// match: (Bswap32 x)
  1271  	// cond: buildcfg.GOPPC64>=10
  1272  	// result: (BRW x)
  1273  	for {
  1274  		x := v_0
  1275  		if !(buildcfg.GOPPC64 >= 10) {
  1276  			break
  1277  		}
  1278  		v.Reset(ssaop.OpPPC64BRW)
  1279  		v.AddArg(x)
  1280  		return true
  1281  	}
  1282  	// match: (Bswap32 x:(MOVWZload [off] {sym} ptr mem))
  1283  	// result: @x.Block (MOVWBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
  1284  	for {
  1285  		x := v_0
  1286  		if x.Op != ssaop.OpPPC64MOVWZload {
  1287  			break
  1288  		}
  1289  		off := ssa.AuxIntToInt32(x.AuxInt)
  1290  		sym := ssa.AuxToSym(x.Aux)
  1291  		mem := x.Args[1]
  1292  		ptr := x.Args[0]
  1293  		b = x.Block
  1294  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVWBRload, typ.UInt32)
  1295  		v.CopyOf(v0)
  1296  		v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  1297  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  1298  		v1.Aux = ssa.SymToAux(sym)
  1299  		v1.AddArg(ptr)
  1300  		v0.AddArg2(v1, mem)
  1301  		return true
  1302  	}
  1303  	// match: (Bswap32 x:(MOVWZloadidx ptr idx mem))
  1304  	// result: @x.Block (MOVWBRloadidx ptr idx mem)
  1305  	for {
  1306  		x := v_0
  1307  		if x.Op != ssaop.OpPPC64MOVWZloadidx {
  1308  			break
  1309  		}
  1310  		mem := x.Args[2]
  1311  		ptr := x.Args[0]
  1312  		idx := x.Args[1]
  1313  		b = x.Block
  1314  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWBRloadidx, typ.Int32)
  1315  		v.CopyOf(v0)
  1316  		v0.AddArg3(ptr, idx, mem)
  1317  		return true
  1318  	}
  1319  	return false
  1320  }
  1321  func rewriteValue_OpBswap64(v *ssa.Value) bool {
  1322  	v_0 := v.Args[0]
  1323  	b := v.Block
  1324  	typ := &b.Func.Config.Types
  1325  	// match: (Bswap64 x)
  1326  	// cond: buildcfg.GOPPC64>=10
  1327  	// result: (BRD x)
  1328  	for {
  1329  		x := v_0
  1330  		if !(buildcfg.GOPPC64 >= 10) {
  1331  			break
  1332  		}
  1333  		v.Reset(ssaop.OpPPC64BRD)
  1334  		v.AddArg(x)
  1335  		return true
  1336  	}
  1337  	// match: (Bswap64 x:(MOVDload [off] {sym} ptr mem))
  1338  	// result: @x.Block (MOVDBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
  1339  	for {
  1340  		x := v_0
  1341  		if x.Op != ssaop.OpPPC64MOVDload {
  1342  			break
  1343  		}
  1344  		off := ssa.AuxIntToInt32(x.AuxInt)
  1345  		sym := ssa.AuxToSym(x.Aux)
  1346  		mem := x.Args[1]
  1347  		ptr := x.Args[0]
  1348  		b = x.Block
  1349  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDBRload, typ.UInt64)
  1350  		v.CopyOf(v0)
  1351  		v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  1352  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  1353  		v1.Aux = ssa.SymToAux(sym)
  1354  		v1.AddArg(ptr)
  1355  		v0.AddArg2(v1, mem)
  1356  		return true
  1357  	}
  1358  	// match: (Bswap64 x:(MOVDloadidx ptr idx mem))
  1359  	// result: @x.Block (MOVDBRloadidx ptr idx mem)
  1360  	for {
  1361  		x := v_0
  1362  		if x.Op != ssaop.OpPPC64MOVDloadidx {
  1363  			break
  1364  		}
  1365  		mem := x.Args[2]
  1366  		ptr := x.Args[0]
  1367  		idx := x.Args[1]
  1368  		b = x.Block
  1369  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDBRloadidx, typ.Int64)
  1370  		v.CopyOf(v0)
  1371  		v0.AddArg3(ptr, idx, mem)
  1372  		return true
  1373  	}
  1374  	return false
  1375  }
  1376  func rewriteValue_OpCom16(v *ssa.Value) bool {
  1377  	v_0 := v.Args[0]
  1378  	// match: (Com16 x)
  1379  	// result: (NOR x x)
  1380  	for {
  1381  		x := v_0
  1382  		v.Reset(ssaop.OpPPC64NOR)
  1383  		v.AddArg2(x, x)
  1384  		return true
  1385  	}
  1386  }
  1387  func rewriteValue_OpCom32(v *ssa.Value) bool {
  1388  	v_0 := v.Args[0]
  1389  	// match: (Com32 x)
  1390  	// result: (NOR x x)
  1391  	for {
  1392  		x := v_0
  1393  		v.Reset(ssaop.OpPPC64NOR)
  1394  		v.AddArg2(x, x)
  1395  		return true
  1396  	}
  1397  }
  1398  func rewriteValue_OpCom64(v *ssa.Value) bool {
  1399  	v_0 := v.Args[0]
  1400  	// match: (Com64 x)
  1401  	// result: (NOR x x)
  1402  	for {
  1403  		x := v_0
  1404  		v.Reset(ssaop.OpPPC64NOR)
  1405  		v.AddArg2(x, x)
  1406  		return true
  1407  	}
  1408  }
  1409  func rewriteValue_OpCom8(v *ssa.Value) bool {
  1410  	v_0 := v.Args[0]
  1411  	// match: (Com8 x)
  1412  	// result: (NOR x x)
  1413  	for {
  1414  		x := v_0
  1415  		v.Reset(ssaop.OpPPC64NOR)
  1416  		v.AddArg2(x, x)
  1417  		return true
  1418  	}
  1419  }
  1420  func rewriteValue_OpCondSelect(v *ssa.Value) bool {
  1421  	v_2 := v.Args[2]
  1422  	v_1 := v.Args[1]
  1423  	v_0 := v.Args[0]
  1424  	b := v.Block
  1425  	typ := &b.Func.Config.Types
  1426  	// match: (CondSelect x y (SETBC [a] cmp))
  1427  	// result: (ISEL [a] x y cmp)
  1428  	for {
  1429  		x := v_0
  1430  		y := v_1
  1431  		if v_2.Op != ssaop.OpPPC64SETBC {
  1432  			break
  1433  		}
  1434  		a := ssa.AuxIntToInt32(v_2.AuxInt)
  1435  		cmp := v_2.Args[0]
  1436  		v.Reset(ssaop.OpPPC64ISEL)
  1437  		v.AuxInt = ssa.Int32ToAuxInt(a)
  1438  		v.AddArg3(x, y, cmp)
  1439  		return true
  1440  	}
  1441  	// match: (CondSelect x y (SETBCR [a] cmp))
  1442  	// result: (ISEL [a+4] x y cmp)
  1443  	for {
  1444  		x := v_0
  1445  		y := v_1
  1446  		if v_2.Op != ssaop.OpPPC64SETBCR {
  1447  			break
  1448  		}
  1449  		a := ssa.AuxIntToInt32(v_2.AuxInt)
  1450  		cmp := v_2.Args[0]
  1451  		v.Reset(ssaop.OpPPC64ISEL)
  1452  		v.AuxInt = ssa.Int32ToAuxInt(a + 4)
  1453  		v.AddArg3(x, y, cmp)
  1454  		return true
  1455  	}
  1456  	// match: (CondSelect x y bool)
  1457  	// cond: ssa.FlagArg(bool) == nil
  1458  	// result: (ISEL [6] x y (CMPconst [0] (ANDconst [1] bool)))
  1459  	for {
  1460  		x := v_0
  1461  		y := v_1
  1462  		bool := v_2
  1463  		if !(ssa.FlagArg(bool) == nil) {
  1464  			break
  1465  		}
  1466  		v.Reset(ssaop.OpPPC64ISEL)
  1467  		v.AuxInt = ssa.Int32ToAuxInt(6)
  1468  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  1469  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1470  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  1471  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1472  		v1.AddArg(bool)
  1473  		v0.AddArg(v1)
  1474  		v.AddArg3(x, y, v0)
  1475  		return true
  1476  	}
  1477  	return false
  1478  }
  1479  func rewriteValue_OpConst16(v *ssa.Value) bool {
  1480  	// match: (Const16 [val])
  1481  	// result: (MOVDconst [int64(val)])
  1482  	for {
  1483  		val := ssa.AuxIntToInt16(v.AuxInt)
  1484  		v.Reset(ssaop.OpPPC64MOVDconst)
  1485  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1486  		return true
  1487  	}
  1488  }
  1489  func rewriteValue_OpConst32(v *ssa.Value) bool {
  1490  	// match: (Const32 [val])
  1491  	// result: (MOVDconst [int64(val)])
  1492  	for {
  1493  		val := ssa.AuxIntToInt32(v.AuxInt)
  1494  		v.Reset(ssaop.OpPPC64MOVDconst)
  1495  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1496  		return true
  1497  	}
  1498  }
  1499  func rewriteValue_OpConst64(v *ssa.Value) bool {
  1500  	// match: (Const64 [val])
  1501  	// result: (MOVDconst [int64(val)])
  1502  	for {
  1503  		val := ssa.AuxIntToInt64(v.AuxInt)
  1504  		v.Reset(ssaop.OpPPC64MOVDconst)
  1505  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1506  		return true
  1507  	}
  1508  }
  1509  func rewriteValue_OpConst8(v *ssa.Value) bool {
  1510  	// match: (Const8 [val])
  1511  	// result: (MOVDconst [int64(val)])
  1512  	for {
  1513  		val := ssa.AuxIntToInt8(v.AuxInt)
  1514  		v.Reset(ssaop.OpPPC64MOVDconst)
  1515  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1516  		return true
  1517  	}
  1518  }
  1519  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  1520  	// match: (ConstBool [t])
  1521  	// result: (MOVDconst [ssa.B2i(t)])
  1522  	for {
  1523  		t := ssa.AuxIntToBool(v.AuxInt)
  1524  		v.Reset(ssaop.OpPPC64MOVDconst)
  1525  		v.AuxInt = ssa.Int64ToAuxInt(ssa.B2i(t))
  1526  		return true
  1527  	}
  1528  }
  1529  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  1530  	// match: (ConstNil)
  1531  	// result: (MOVDconst [0])
  1532  	for {
  1533  		v.Reset(ssaop.OpPPC64MOVDconst)
  1534  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1535  		return true
  1536  	}
  1537  }
  1538  func rewriteValue_OpCopysign(v *ssa.Value) bool {
  1539  	v_1 := v.Args[1]
  1540  	v_0 := v.Args[0]
  1541  	// match: (Copysign x y)
  1542  	// result: (FCPSGN y x)
  1543  	for {
  1544  		x := v_0
  1545  		y := v_1
  1546  		v.Reset(ssaop.OpPPC64FCPSGN)
  1547  		v.AddArg2(y, x)
  1548  		return true
  1549  	}
  1550  }
  1551  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  1552  	v_0 := v.Args[0]
  1553  	b := v.Block
  1554  	typ := &b.Func.Config.Types
  1555  	// match: (Ctz16 x)
  1556  	// cond: buildcfg.GOPPC64 <= 8
  1557  	// result: (POPCNTW (MOVHZreg (ANDN <typ.Int16> (ADDconst <typ.Int16> [-1] x) x)))
  1558  	for {
  1559  		x := v_0
  1560  		if !(buildcfg.GOPPC64 <= 8) {
  1561  			break
  1562  		}
  1563  		v.Reset(ssaop.OpPPC64POPCNTW)
  1564  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
  1565  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.Int16)
  1566  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.Int16)
  1567  		v2.AuxInt = ssa.Int64ToAuxInt(-1)
  1568  		v2.AddArg(x)
  1569  		v1.AddArg2(v2, x)
  1570  		v0.AddArg(v1)
  1571  		v.AddArg(v0)
  1572  		return true
  1573  	}
  1574  	// match: (Ctz16 x)
  1575  	// cond: buildcfg.GOPPC64 >= 9
  1576  	// result: (CNTTZD (OR <typ.UInt64> x (MOVDconst [1<<16])))
  1577  	for {
  1578  		x := v_0
  1579  		if !(buildcfg.GOPPC64 >= 9) {
  1580  			break
  1581  		}
  1582  		v.Reset(ssaop.OpPPC64CNTTZD)
  1583  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, typ.UInt64)
  1584  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  1585  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 16)
  1586  		v0.AddArg2(x, v1)
  1587  		v.AddArg(v0)
  1588  		return true
  1589  	}
  1590  	return false
  1591  }
  1592  func rewriteValue_OpCtz32(v *ssa.Value) bool {
  1593  	v_0 := v.Args[0]
  1594  	b := v.Block
  1595  	typ := &b.Func.Config.Types
  1596  	// match: (Ctz32 x)
  1597  	// cond: buildcfg.GOPPC64 <= 8
  1598  	// result: (POPCNTW (MOVWZreg (ANDN <typ.Int> (ADDconst <typ.Int> [-1] x) x)))
  1599  	for {
  1600  		x := v_0
  1601  		if !(buildcfg.GOPPC64 <= 8) {
  1602  			break
  1603  		}
  1604  		v.Reset(ssaop.OpPPC64POPCNTW)
  1605  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZreg, typ.Int64)
  1606  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.Int)
  1607  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.Int)
  1608  		v2.AuxInt = ssa.Int64ToAuxInt(-1)
  1609  		v2.AddArg(x)
  1610  		v1.AddArg2(v2, x)
  1611  		v0.AddArg(v1)
  1612  		v.AddArg(v0)
  1613  		return true
  1614  	}
  1615  	// match: (Ctz32 x)
  1616  	// cond: buildcfg.GOPPC64 >= 9
  1617  	// result: (CNTTZW (MOVWZreg x))
  1618  	for {
  1619  		x := v_0
  1620  		if !(buildcfg.GOPPC64 >= 9) {
  1621  			break
  1622  		}
  1623  		v.Reset(ssaop.OpPPC64CNTTZW)
  1624  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZreg, typ.Int64)
  1625  		v0.AddArg(x)
  1626  		v.AddArg(v0)
  1627  		return true
  1628  	}
  1629  	return false
  1630  }
  1631  func rewriteValue_OpCtz64(v *ssa.Value) bool {
  1632  	v_0 := v.Args[0]
  1633  	b := v.Block
  1634  	typ := &b.Func.Config.Types
  1635  	// match: (Ctz64 x)
  1636  	// cond: buildcfg.GOPPC64 <= 8
  1637  	// result: (POPCNTD (ANDN <typ.Int64> (ADDconst <typ.Int64> [-1] x) x))
  1638  	for {
  1639  		x := v_0
  1640  		if !(buildcfg.GOPPC64 <= 8) {
  1641  			break
  1642  		}
  1643  		v.Reset(ssaop.OpPPC64POPCNTD)
  1644  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.Int64)
  1645  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.Int64)
  1646  		v1.AuxInt = ssa.Int64ToAuxInt(-1)
  1647  		v1.AddArg(x)
  1648  		v0.AddArg2(v1, x)
  1649  		v.AddArg(v0)
  1650  		return true
  1651  	}
  1652  	// match: (Ctz64 x)
  1653  	// cond: buildcfg.GOPPC64 >= 9
  1654  	// result: (CNTTZD x)
  1655  	for {
  1656  		x := v_0
  1657  		if !(buildcfg.GOPPC64 >= 9) {
  1658  			break
  1659  		}
  1660  		v.Reset(ssaop.OpPPC64CNTTZD)
  1661  		v.AddArg(x)
  1662  		return true
  1663  	}
  1664  	return false
  1665  }
  1666  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  1667  	v_0 := v.Args[0]
  1668  	b := v.Block
  1669  	typ := &b.Func.Config.Types
  1670  	// match: (Ctz8 x)
  1671  	// cond: buildcfg.GOPPC64 <= 8
  1672  	// result: (POPCNTB (MOVBZreg (ANDN <typ.UInt8> (ADDconst <typ.UInt8> [-1] x) x)))
  1673  	for {
  1674  		x := v_0
  1675  		if !(buildcfg.GOPPC64 <= 8) {
  1676  			break
  1677  		}
  1678  		v.Reset(ssaop.OpPPC64POPCNTB)
  1679  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  1680  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDN, typ.UInt8)
  1681  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDconst, typ.UInt8)
  1682  		v2.AuxInt = ssa.Int64ToAuxInt(-1)
  1683  		v2.AddArg(x)
  1684  		v1.AddArg2(v2, x)
  1685  		v0.AddArg(v1)
  1686  		v.AddArg(v0)
  1687  		return true
  1688  	}
  1689  	// match: (Ctz8 x)
  1690  	// cond: buildcfg.GOPPC64 >= 9
  1691  	// result: (CNTTZD (OR <typ.UInt64> x (MOVDconst [1<<8])))
  1692  	for {
  1693  		x := v_0
  1694  		if !(buildcfg.GOPPC64 >= 9) {
  1695  			break
  1696  		}
  1697  		v.Reset(ssaop.OpPPC64CNTTZD)
  1698  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, typ.UInt64)
  1699  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  1700  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 8)
  1701  		v0.AddArg2(x, v1)
  1702  		v.AddArg(v0)
  1703  		return true
  1704  	}
  1705  	return false
  1706  }
  1707  func rewriteValue_OpCvt32Fto32(v *ssa.Value) bool {
  1708  	v_0 := v.Args[0]
  1709  	b := v.Block
  1710  	typ := &b.Func.Config.Types
  1711  	// match: (Cvt32Fto32 x)
  1712  	// result: (MFVSRD (FCTIWZ x))
  1713  	for {
  1714  		x := v_0
  1715  		v.Reset(ssaop.OpPPC64MFVSRD)
  1716  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIWZ, typ.Float64)
  1717  		v0.AddArg(x)
  1718  		v.AddArg(v0)
  1719  		return true
  1720  	}
  1721  }
  1722  func rewriteValue_OpCvt32Fto64(v *ssa.Value) bool {
  1723  	v_0 := v.Args[0]
  1724  	b := v.Block
  1725  	typ := &b.Func.Config.Types
  1726  	// match: (Cvt32Fto64 x)
  1727  	// result: (MFVSRD (FCTIDZ x))
  1728  	for {
  1729  		x := v_0
  1730  		v.Reset(ssaop.OpPPC64MFVSRD)
  1731  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIDZ, typ.Float64)
  1732  		v0.AddArg(x)
  1733  		v.AddArg(v0)
  1734  		return true
  1735  	}
  1736  }
  1737  func rewriteValue_OpCvt32to32F(v *ssa.Value) bool {
  1738  	v_0 := v.Args[0]
  1739  	b := v.Block
  1740  	typ := &b.Func.Config.Types
  1741  	// match: (Cvt32to32F x)
  1742  	// result: (FCFIDS (MTVSRD (SignExt32to64 x)))
  1743  	for {
  1744  		x := v_0
  1745  		v.Reset(ssaop.OpPPC64FCFIDS)
  1746  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)
  1747  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1748  		v1.AddArg(x)
  1749  		v0.AddArg(v1)
  1750  		v.AddArg(v0)
  1751  		return true
  1752  	}
  1753  }
  1754  func rewriteValue_OpCvt32to64F(v *ssa.Value) bool {
  1755  	v_0 := v.Args[0]
  1756  	b := v.Block
  1757  	typ := &b.Func.Config.Types
  1758  	// match: (Cvt32to64F x)
  1759  	// result: (FCFID (MTVSRD (SignExt32to64 x)))
  1760  	for {
  1761  		x := v_0
  1762  		v.Reset(ssaop.OpPPC64FCFID)
  1763  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)
  1764  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1765  		v1.AddArg(x)
  1766  		v0.AddArg(v1)
  1767  		v.AddArg(v0)
  1768  		return true
  1769  	}
  1770  }
  1771  func rewriteValue_OpCvt64Fto32(v *ssa.Value) bool {
  1772  	v_0 := v.Args[0]
  1773  	b := v.Block
  1774  	typ := &b.Func.Config.Types
  1775  	// match: (Cvt64Fto32 x)
  1776  	// result: (MFVSRD (FCTIWZ x))
  1777  	for {
  1778  		x := v_0
  1779  		v.Reset(ssaop.OpPPC64MFVSRD)
  1780  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIWZ, typ.Float64)
  1781  		v0.AddArg(x)
  1782  		v.AddArg(v0)
  1783  		return true
  1784  	}
  1785  }
  1786  func rewriteValue_OpCvt64Fto64(v *ssa.Value) bool {
  1787  	v_0 := v.Args[0]
  1788  	b := v.Block
  1789  	typ := &b.Func.Config.Types
  1790  	// match: (Cvt64Fto64 x)
  1791  	// result: (MFVSRD (FCTIDZ x))
  1792  	for {
  1793  		x := v_0
  1794  		v.Reset(ssaop.OpPPC64MFVSRD)
  1795  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCTIDZ, typ.Float64)
  1796  		v0.AddArg(x)
  1797  		v.AddArg(v0)
  1798  		return true
  1799  	}
  1800  }
  1801  func rewriteValue_OpCvt64to32F(v *ssa.Value) bool {
  1802  	v_0 := v.Args[0]
  1803  	b := v.Block
  1804  	typ := &b.Func.Config.Types
  1805  	// match: (Cvt64to32F x)
  1806  	// result: (FCFIDS (MTVSRD x))
  1807  	for {
  1808  		x := v_0
  1809  		v.Reset(ssaop.OpPPC64FCFIDS)
  1810  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)
  1811  		v0.AddArg(x)
  1812  		v.AddArg(v0)
  1813  		return true
  1814  	}
  1815  }
  1816  func rewriteValue_OpCvt64to64F(v *ssa.Value) bool {
  1817  	v_0 := v.Args[0]
  1818  	b := v.Block
  1819  	typ := &b.Func.Config.Types
  1820  	// match: (Cvt64to64F x)
  1821  	// result: (FCFID (MTVSRD x))
  1822  	for {
  1823  		x := v_0
  1824  		v.Reset(ssaop.OpPPC64FCFID)
  1825  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MTVSRD, typ.Float64)
  1826  		v0.AddArg(x)
  1827  		v.AddArg(v0)
  1828  		return true
  1829  	}
  1830  }
  1831  func rewriteValue_OpDiv16(v *ssa.Value) bool {
  1832  	v_1 := v.Args[1]
  1833  	v_0 := v.Args[0]
  1834  	b := v.Block
  1835  	typ := &b.Func.Config.Types
  1836  	// match: (Div16 [false] x y)
  1837  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
  1838  	for {
  1839  		if ssa.AuxIntToBool(v.AuxInt) != false {
  1840  			break
  1841  		}
  1842  		x := v_0
  1843  		y := v_1
  1844  		v.Reset(ssaop.OpPPC64DIVW)
  1845  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  1846  		v0.AddArg(x)
  1847  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  1848  		v1.AddArg(y)
  1849  		v.AddArg2(v0, v1)
  1850  		return true
  1851  	}
  1852  	return false
  1853  }
  1854  func rewriteValue_OpDiv16u(v *ssa.Value) bool {
  1855  	v_1 := v.Args[1]
  1856  	v_0 := v.Args[0]
  1857  	b := v.Block
  1858  	typ := &b.Func.Config.Types
  1859  	// match: (Div16u x y)
  1860  	// result: (DIVWU (ZeroExt16to32 x) (ZeroExt16to32 y))
  1861  	for {
  1862  		x := v_0
  1863  		y := v_1
  1864  		v.Reset(ssaop.OpPPC64DIVWU)
  1865  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  1866  		v0.AddArg(x)
  1867  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  1868  		v1.AddArg(y)
  1869  		v.AddArg2(v0, v1)
  1870  		return true
  1871  	}
  1872  }
  1873  func rewriteValue_OpDiv32(v *ssa.Value) bool {
  1874  	v_1 := v.Args[1]
  1875  	v_0 := v.Args[0]
  1876  	// match: (Div32 [false] x y)
  1877  	// result: (DIVW x y)
  1878  	for {
  1879  		if ssa.AuxIntToBool(v.AuxInt) != false {
  1880  			break
  1881  		}
  1882  		x := v_0
  1883  		y := v_1
  1884  		v.Reset(ssaop.OpPPC64DIVW)
  1885  		v.AddArg2(x, y)
  1886  		return true
  1887  	}
  1888  	return false
  1889  }
  1890  func rewriteValue_OpDiv64(v *ssa.Value) bool {
  1891  	v_1 := v.Args[1]
  1892  	v_0 := v.Args[0]
  1893  	// match: (Div64 [false] x y)
  1894  	// result: (DIVD x y)
  1895  	for {
  1896  		if ssa.AuxIntToBool(v.AuxInt) != false {
  1897  			break
  1898  		}
  1899  		x := v_0
  1900  		y := v_1
  1901  		v.Reset(ssaop.OpPPC64DIVD)
  1902  		v.AddArg2(x, y)
  1903  		return true
  1904  	}
  1905  	return false
  1906  }
  1907  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  1908  	v_1 := v.Args[1]
  1909  	v_0 := v.Args[0]
  1910  	b := v.Block
  1911  	typ := &b.Func.Config.Types
  1912  	// match: (Div8 x y)
  1913  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
  1914  	for {
  1915  		x := v_0
  1916  		y := v_1
  1917  		v.Reset(ssaop.OpPPC64DIVW)
  1918  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  1919  		v0.AddArg(x)
  1920  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  1921  		v1.AddArg(y)
  1922  		v.AddArg2(v0, v1)
  1923  		return true
  1924  	}
  1925  }
  1926  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  1927  	v_1 := v.Args[1]
  1928  	v_0 := v.Args[0]
  1929  	b := v.Block
  1930  	typ := &b.Func.Config.Types
  1931  	// match: (Div8u x y)
  1932  	// result: (DIVWU (ZeroExt8to32 x) (ZeroExt8to32 y))
  1933  	for {
  1934  		x := v_0
  1935  		y := v_1
  1936  		v.Reset(ssaop.OpPPC64DIVWU)
  1937  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  1938  		v0.AddArg(x)
  1939  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  1940  		v1.AddArg(y)
  1941  		v.AddArg2(v0, v1)
  1942  		return true
  1943  	}
  1944  }
  1945  func rewriteValue_OpEq16(v *ssa.Value) bool {
  1946  	v_1 := v.Args[1]
  1947  	v_0 := v.Args[0]
  1948  	b := v.Block
  1949  	typ := &b.Func.Config.Types
  1950  	// match: (Eq16 x y)
  1951  	// cond: x.Type.IsSigned() && y.Type.IsSigned()
  1952  	// result: (Equal (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  1953  	for {
  1954  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1955  			x := v_0
  1956  			y := v_1
  1957  			if !(x.Type.IsSigned() && y.Type.IsSigned()) {
  1958  				continue
  1959  			}
  1960  			v.Reset(ssaop.OpPPC64Equal)
  1961  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  1962  			v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  1963  			v1.AddArg(x)
  1964  			v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  1965  			v2.AddArg(y)
  1966  			v0.AddArg2(v1, v2)
  1967  			v.AddArg(v0)
  1968  			return true
  1969  		}
  1970  		break
  1971  	}
  1972  	// match: (Eq16 x y)
  1973  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  1974  	for {
  1975  		x := v_0
  1976  		y := v_1
  1977  		v.Reset(ssaop.OpPPC64Equal)
  1978  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  1979  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  1980  		v1.AddArg(x)
  1981  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  1982  		v2.AddArg(y)
  1983  		v0.AddArg2(v1, v2)
  1984  		v.AddArg(v0)
  1985  		return true
  1986  	}
  1987  }
  1988  func rewriteValue_OpEq32(v *ssa.Value) bool {
  1989  	v_1 := v.Args[1]
  1990  	v_0 := v.Args[0]
  1991  	b := v.Block
  1992  	// match: (Eq32 x y)
  1993  	// result: (Equal (CMPW x y))
  1994  	for {
  1995  		x := v_0
  1996  		y := v_1
  1997  		v.Reset(ssaop.OpPPC64Equal)
  1998  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  1999  		v0.AddArg2(x, y)
  2000  		v.AddArg(v0)
  2001  		return true
  2002  	}
  2003  }
  2004  func rewriteValue_OpEq32F(v *ssa.Value) bool {
  2005  	v_1 := v.Args[1]
  2006  	v_0 := v.Args[0]
  2007  	b := v.Block
  2008  	// match: (Eq32F x y)
  2009  	// result: (Equal (FCMPU x y))
  2010  	for {
  2011  		x := v_0
  2012  		y := v_1
  2013  		v.Reset(ssaop.OpPPC64Equal)
  2014  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  2015  		v0.AddArg2(x, y)
  2016  		v.AddArg(v0)
  2017  		return true
  2018  	}
  2019  }
  2020  func rewriteValue_OpEq64(v *ssa.Value) bool {
  2021  	v_1 := v.Args[1]
  2022  	v_0 := v.Args[0]
  2023  	b := v.Block
  2024  	// match: (Eq64 x y)
  2025  	// result: (Equal (CMP x y))
  2026  	for {
  2027  		x := v_0
  2028  		y := v_1
  2029  		v.Reset(ssaop.OpPPC64Equal)
  2030  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  2031  		v0.AddArg2(x, y)
  2032  		v.AddArg(v0)
  2033  		return true
  2034  	}
  2035  }
  2036  func rewriteValue_OpEq64F(v *ssa.Value) bool {
  2037  	v_1 := v.Args[1]
  2038  	v_0 := v.Args[0]
  2039  	b := v.Block
  2040  	// match: (Eq64F x y)
  2041  	// result: (Equal (FCMPU x y))
  2042  	for {
  2043  		x := v_0
  2044  		y := v_1
  2045  		v.Reset(ssaop.OpPPC64Equal)
  2046  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  2047  		v0.AddArg2(x, y)
  2048  		v.AddArg(v0)
  2049  		return true
  2050  	}
  2051  }
  2052  func rewriteValue_OpEq8(v *ssa.Value) bool {
  2053  	v_1 := v.Args[1]
  2054  	v_0 := v.Args[0]
  2055  	b := v.Block
  2056  	typ := &b.Func.Config.Types
  2057  	// match: (Eq8 x y)
  2058  	// cond: x.Type.IsSigned() && y.Type.IsSigned()
  2059  	// result: (Equal (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2060  	for {
  2061  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2062  			x := v_0
  2063  			y := v_1
  2064  			if !(x.Type.IsSigned() && y.Type.IsSigned()) {
  2065  				continue
  2066  			}
  2067  			v.Reset(ssaop.OpPPC64Equal)
  2068  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2069  			v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2070  			v1.AddArg(x)
  2071  			v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2072  			v2.AddArg(y)
  2073  			v0.AddArg2(v1, v2)
  2074  			v.AddArg(v0)
  2075  			return true
  2076  		}
  2077  		break
  2078  	}
  2079  	// match: (Eq8 x y)
  2080  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2081  	for {
  2082  		x := v_0
  2083  		y := v_1
  2084  		v.Reset(ssaop.OpPPC64Equal)
  2085  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2086  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2087  		v1.AddArg(x)
  2088  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2089  		v2.AddArg(y)
  2090  		v0.AddArg2(v1, v2)
  2091  		v.AddArg(v0)
  2092  		return true
  2093  	}
  2094  }
  2095  func rewriteValue_OpEqB(v *ssa.Value) bool {
  2096  	v_1 := v.Args[1]
  2097  	v_0 := v.Args[0]
  2098  	b := v.Block
  2099  	typ := &b.Func.Config.Types
  2100  	// match: (EqB x y)
  2101  	// result: (ANDconst [1] (EQV x y))
  2102  	for {
  2103  		x := v_0
  2104  		y := v_1
  2105  		v.Reset(ssaop.OpPPC64ANDconst)
  2106  		v.AuxInt = ssa.Int64ToAuxInt(1)
  2107  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64EQV, typ.Int64)
  2108  		v0.AddArg2(x, y)
  2109  		v.AddArg(v0)
  2110  		return true
  2111  	}
  2112  }
  2113  func rewriteValue_OpEqPtr(v *ssa.Value) bool {
  2114  	v_1 := v.Args[1]
  2115  	v_0 := v.Args[0]
  2116  	b := v.Block
  2117  	// match: (EqPtr x y)
  2118  	// result: (Equal (CMP x y))
  2119  	for {
  2120  		x := v_0
  2121  		y := v_1
  2122  		v.Reset(ssaop.OpPPC64Equal)
  2123  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  2124  		v0.AddArg2(x, y)
  2125  		v.AddArg(v0)
  2126  		return true
  2127  	}
  2128  }
  2129  func rewriteValue_OpIsInBounds(v *ssa.Value) bool {
  2130  	v_1 := v.Args[1]
  2131  	v_0 := v.Args[0]
  2132  	b := v.Block
  2133  	// match: (IsInBounds idx len)
  2134  	// result: (LessThan (CMPU idx len))
  2135  	for {
  2136  		idx := v_0
  2137  		len := v_1
  2138  		v.Reset(ssaop.OpPPC64LessThan)
  2139  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPU, types.TypeFlags)
  2140  		v0.AddArg2(idx, len)
  2141  		v.AddArg(v0)
  2142  		return true
  2143  	}
  2144  }
  2145  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  2146  	v_0 := v.Args[0]
  2147  	b := v.Block
  2148  	// match: (IsNonNil ptr)
  2149  	// result: (NotEqual (CMPconst [0] ptr))
  2150  	for {
  2151  		ptr := v_0
  2152  		v.Reset(ssaop.OpPPC64NotEqual)
  2153  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  2154  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2155  		v0.AddArg(ptr)
  2156  		v.AddArg(v0)
  2157  		return true
  2158  	}
  2159  }
  2160  func rewriteValue_OpIsSliceInBounds(v *ssa.Value) bool {
  2161  	v_1 := v.Args[1]
  2162  	v_0 := v.Args[0]
  2163  	b := v.Block
  2164  	// match: (IsSliceInBounds idx len)
  2165  	// result: (LessEqual (CMPU idx len))
  2166  	for {
  2167  		idx := v_0
  2168  		len := v_1
  2169  		v.Reset(ssaop.OpPPC64LessEqual)
  2170  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPU, types.TypeFlags)
  2171  		v0.AddArg2(idx, len)
  2172  		v.AddArg(v0)
  2173  		return true
  2174  	}
  2175  }
  2176  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  2177  	v_1 := v.Args[1]
  2178  	v_0 := v.Args[0]
  2179  	b := v.Block
  2180  	typ := &b.Func.Config.Types
  2181  	// match: (Leq16 x y)
  2182  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2183  	for {
  2184  		x := v_0
  2185  		y := v_1
  2186  		v.Reset(ssaop.OpPPC64LessEqual)
  2187  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2188  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  2189  		v1.AddArg(x)
  2190  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  2191  		v2.AddArg(y)
  2192  		v0.AddArg2(v1, v2)
  2193  		v.AddArg(v0)
  2194  		return true
  2195  	}
  2196  }
  2197  func rewriteValue_OpLeq16U(v *ssa.Value) bool {
  2198  	v_1 := v.Args[1]
  2199  	v_0 := v.Args[0]
  2200  	b := v.Block
  2201  	typ := &b.Func.Config.Types
  2202  	// match: (Leq16U x y)
  2203  	// result: (LessEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2204  	for {
  2205  		x := v_0
  2206  		y := v_1
  2207  		v.Reset(ssaop.OpPPC64LessEqual)
  2208  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  2209  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  2210  		v1.AddArg(x)
  2211  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  2212  		v2.AddArg(y)
  2213  		v0.AddArg2(v1, v2)
  2214  		v.AddArg(v0)
  2215  		return true
  2216  	}
  2217  }
  2218  func rewriteValue_OpLeq32(v *ssa.Value) bool {
  2219  	v_1 := v.Args[1]
  2220  	v_0 := v.Args[0]
  2221  	b := v.Block
  2222  	// match: (Leq32 x y)
  2223  	// result: (LessEqual (CMPW x y))
  2224  	for {
  2225  		x := v_0
  2226  		y := v_1
  2227  		v.Reset(ssaop.OpPPC64LessEqual)
  2228  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2229  		v0.AddArg2(x, y)
  2230  		v.AddArg(v0)
  2231  		return true
  2232  	}
  2233  }
  2234  func rewriteValue_OpLeq32F(v *ssa.Value) bool {
  2235  	v_1 := v.Args[1]
  2236  	v_0 := v.Args[0]
  2237  	b := v.Block
  2238  	// match: (Leq32F x y)
  2239  	// result: (FLessEqual (FCMPU x y))
  2240  	for {
  2241  		x := v_0
  2242  		y := v_1
  2243  		v.Reset(ssaop.OpPPC64FLessEqual)
  2244  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  2245  		v0.AddArg2(x, y)
  2246  		v.AddArg(v0)
  2247  		return true
  2248  	}
  2249  }
  2250  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  2251  	v_1 := v.Args[1]
  2252  	v_0 := v.Args[0]
  2253  	b := v.Block
  2254  	// match: (Leq32U x y)
  2255  	// result: (LessEqual (CMPWU x y))
  2256  	for {
  2257  		x := v_0
  2258  		y := v_1
  2259  		v.Reset(ssaop.OpPPC64LessEqual)
  2260  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  2261  		v0.AddArg2(x, y)
  2262  		v.AddArg(v0)
  2263  		return true
  2264  	}
  2265  }
  2266  func rewriteValue_OpLeq64(v *ssa.Value) bool {
  2267  	v_1 := v.Args[1]
  2268  	v_0 := v.Args[0]
  2269  	b := v.Block
  2270  	// match: (Leq64 x y)
  2271  	// result: (LessEqual (CMP x y))
  2272  	for {
  2273  		x := v_0
  2274  		y := v_1
  2275  		v.Reset(ssaop.OpPPC64LessEqual)
  2276  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  2277  		v0.AddArg2(x, y)
  2278  		v.AddArg(v0)
  2279  		return true
  2280  	}
  2281  }
  2282  func rewriteValue_OpLeq64F(v *ssa.Value) bool {
  2283  	v_1 := v.Args[1]
  2284  	v_0 := v.Args[0]
  2285  	b := v.Block
  2286  	// match: (Leq64F x y)
  2287  	// result: (FLessEqual (FCMPU x y))
  2288  	for {
  2289  		x := v_0
  2290  		y := v_1
  2291  		v.Reset(ssaop.OpPPC64FLessEqual)
  2292  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  2293  		v0.AddArg2(x, y)
  2294  		v.AddArg(v0)
  2295  		return true
  2296  	}
  2297  }
  2298  func rewriteValue_OpLeq64U(v *ssa.Value) bool {
  2299  	v_1 := v.Args[1]
  2300  	v_0 := v.Args[0]
  2301  	b := v.Block
  2302  	// match: (Leq64U x y)
  2303  	// result: (LessEqual (CMPU x y))
  2304  	for {
  2305  		x := v_0
  2306  		y := v_1
  2307  		v.Reset(ssaop.OpPPC64LessEqual)
  2308  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPU, types.TypeFlags)
  2309  		v0.AddArg2(x, y)
  2310  		v.AddArg(v0)
  2311  		return true
  2312  	}
  2313  }
  2314  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  2315  	v_1 := v.Args[1]
  2316  	v_0 := v.Args[0]
  2317  	b := v.Block
  2318  	typ := &b.Func.Config.Types
  2319  	// match: (Leq8 x y)
  2320  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2321  	for {
  2322  		x := v_0
  2323  		y := v_1
  2324  		v.Reset(ssaop.OpPPC64LessEqual)
  2325  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2326  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2327  		v1.AddArg(x)
  2328  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2329  		v2.AddArg(y)
  2330  		v0.AddArg2(v1, v2)
  2331  		v.AddArg(v0)
  2332  		return true
  2333  	}
  2334  }
  2335  func rewriteValue_OpLeq8U(v *ssa.Value) bool {
  2336  	v_1 := v.Args[1]
  2337  	v_0 := v.Args[0]
  2338  	b := v.Block
  2339  	typ := &b.Func.Config.Types
  2340  	// match: (Leq8U x y)
  2341  	// result: (LessEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2342  	for {
  2343  		x := v_0
  2344  		y := v_1
  2345  		v.Reset(ssaop.OpPPC64LessEqual)
  2346  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  2347  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2348  		v1.AddArg(x)
  2349  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2350  		v2.AddArg(y)
  2351  		v0.AddArg2(v1, v2)
  2352  		v.AddArg(v0)
  2353  		return true
  2354  	}
  2355  }
  2356  func rewriteValue_OpLess16(v *ssa.Value) bool {
  2357  	v_1 := v.Args[1]
  2358  	v_0 := v.Args[0]
  2359  	b := v.Block
  2360  	typ := &b.Func.Config.Types
  2361  	// match: (Less16 x y)
  2362  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2363  	for {
  2364  		x := v_0
  2365  		y := v_1
  2366  		v.Reset(ssaop.OpPPC64LessThan)
  2367  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2368  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  2369  		v1.AddArg(x)
  2370  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  2371  		v2.AddArg(y)
  2372  		v0.AddArg2(v1, v2)
  2373  		v.AddArg(v0)
  2374  		return true
  2375  	}
  2376  }
  2377  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  2378  	v_1 := v.Args[1]
  2379  	v_0 := v.Args[0]
  2380  	b := v.Block
  2381  	typ := &b.Func.Config.Types
  2382  	// match: (Less16U x y)
  2383  	// result: (LessThan (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2384  	for {
  2385  		x := v_0
  2386  		y := v_1
  2387  		v.Reset(ssaop.OpPPC64LessThan)
  2388  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  2389  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  2390  		v1.AddArg(x)
  2391  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  2392  		v2.AddArg(y)
  2393  		v0.AddArg2(v1, v2)
  2394  		v.AddArg(v0)
  2395  		return true
  2396  	}
  2397  }
  2398  func rewriteValue_OpLess32(v *ssa.Value) bool {
  2399  	v_1 := v.Args[1]
  2400  	v_0 := v.Args[0]
  2401  	b := v.Block
  2402  	// match: (Less32 x y)
  2403  	// result: (LessThan (CMPW x y))
  2404  	for {
  2405  		x := v_0
  2406  		y := v_1
  2407  		v.Reset(ssaop.OpPPC64LessThan)
  2408  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2409  		v0.AddArg2(x, y)
  2410  		v.AddArg(v0)
  2411  		return true
  2412  	}
  2413  }
  2414  func rewriteValue_OpLess32F(v *ssa.Value) bool {
  2415  	v_1 := v.Args[1]
  2416  	v_0 := v.Args[0]
  2417  	b := v.Block
  2418  	// match: (Less32F x y)
  2419  	// result: (FLessThan (FCMPU x y))
  2420  	for {
  2421  		x := v_0
  2422  		y := v_1
  2423  		v.Reset(ssaop.OpPPC64FLessThan)
  2424  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  2425  		v0.AddArg2(x, y)
  2426  		v.AddArg(v0)
  2427  		return true
  2428  	}
  2429  }
  2430  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  2431  	v_1 := v.Args[1]
  2432  	v_0 := v.Args[0]
  2433  	b := v.Block
  2434  	// match: (Less32U x y)
  2435  	// result: (LessThan (CMPWU x y))
  2436  	for {
  2437  		x := v_0
  2438  		y := v_1
  2439  		v.Reset(ssaop.OpPPC64LessThan)
  2440  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  2441  		v0.AddArg2(x, y)
  2442  		v.AddArg(v0)
  2443  		return true
  2444  	}
  2445  }
  2446  func rewriteValue_OpLess64(v *ssa.Value) bool {
  2447  	v_1 := v.Args[1]
  2448  	v_0 := v.Args[0]
  2449  	b := v.Block
  2450  	// match: (Less64 x y)
  2451  	// result: (LessThan (CMP x y))
  2452  	for {
  2453  		x := v_0
  2454  		y := v_1
  2455  		v.Reset(ssaop.OpPPC64LessThan)
  2456  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  2457  		v0.AddArg2(x, y)
  2458  		v.AddArg(v0)
  2459  		return true
  2460  	}
  2461  }
  2462  func rewriteValue_OpLess64F(v *ssa.Value) bool {
  2463  	v_1 := v.Args[1]
  2464  	v_0 := v.Args[0]
  2465  	b := v.Block
  2466  	// match: (Less64F x y)
  2467  	// result: (FLessThan (FCMPU x y))
  2468  	for {
  2469  		x := v_0
  2470  		y := v_1
  2471  		v.Reset(ssaop.OpPPC64FLessThan)
  2472  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  2473  		v0.AddArg2(x, y)
  2474  		v.AddArg(v0)
  2475  		return true
  2476  	}
  2477  }
  2478  func rewriteValue_OpLess64U(v *ssa.Value) bool {
  2479  	v_1 := v.Args[1]
  2480  	v_0 := v.Args[0]
  2481  	b := v.Block
  2482  	// match: (Less64U x y)
  2483  	// result: (LessThan (CMPU x y))
  2484  	for {
  2485  		x := v_0
  2486  		y := v_1
  2487  		v.Reset(ssaop.OpPPC64LessThan)
  2488  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPU, types.TypeFlags)
  2489  		v0.AddArg2(x, y)
  2490  		v.AddArg(v0)
  2491  		return true
  2492  	}
  2493  }
  2494  func rewriteValue_OpLess8(v *ssa.Value) bool {
  2495  	v_1 := v.Args[1]
  2496  	v_0 := v.Args[0]
  2497  	b := v.Block
  2498  	typ := &b.Func.Config.Types
  2499  	// match: (Less8 x y)
  2500  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2501  	for {
  2502  		x := v_0
  2503  		y := v_1
  2504  		v.Reset(ssaop.OpPPC64LessThan)
  2505  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  2506  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2507  		v1.AddArg(x)
  2508  		v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  2509  		v2.AddArg(y)
  2510  		v0.AddArg2(v1, v2)
  2511  		v.AddArg(v0)
  2512  		return true
  2513  	}
  2514  }
  2515  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  2516  	v_1 := v.Args[1]
  2517  	v_0 := v.Args[0]
  2518  	b := v.Block
  2519  	typ := &b.Func.Config.Types
  2520  	// match: (Less8U x y)
  2521  	// result: (LessThan (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2522  	for {
  2523  		x := v_0
  2524  		y := v_1
  2525  		v.Reset(ssaop.OpPPC64LessThan)
  2526  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  2527  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2528  		v1.AddArg(x)
  2529  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  2530  		v2.AddArg(y)
  2531  		v0.AddArg2(v1, v2)
  2532  		v.AddArg(v0)
  2533  		return true
  2534  	}
  2535  }
  2536  func rewriteValue_OpLoad(v *ssa.Value) bool {
  2537  	v_1 := v.Args[1]
  2538  	v_0 := v.Args[0]
  2539  	b := v.Block
  2540  	typ := &b.Func.Config.Types
  2541  	// match: (Load <t> ptr mem)
  2542  	// cond: (ssa.Is64BitInt(t) ||ssa.IsPtr(t))
  2543  	// result: (MOVDload ptr mem)
  2544  	for {
  2545  		t := v.Type
  2546  		ptr := v_0
  2547  		mem := v_1
  2548  		if !(ssa.Is64BitInt(t) || ssa.IsPtr(t)) {
  2549  			break
  2550  		}
  2551  		v.Reset(ssaop.OpPPC64MOVDload)
  2552  		v.AddArg2(ptr, mem)
  2553  		return true
  2554  	}
  2555  	// match: (Load <t> ptr mem)
  2556  	// cond: ssa.Is32BitInt(t) && t.IsSigned()
  2557  	// result: (MOVWload ptr mem)
  2558  	for {
  2559  		t := v.Type
  2560  		ptr := v_0
  2561  		mem := v_1
  2562  		if !(ssa.Is32BitInt(t) && t.IsSigned()) {
  2563  			break
  2564  		}
  2565  		v.Reset(ssaop.OpPPC64MOVWload)
  2566  		v.AddArg2(ptr, mem)
  2567  		return true
  2568  	}
  2569  	// match: (Load <t> ptr mem)
  2570  	// cond: ssa.Is32BitInt(t) && !t.IsSigned()
  2571  	// result: (MOVWZload ptr mem)
  2572  	for {
  2573  		t := v.Type
  2574  		ptr := v_0
  2575  		mem := v_1
  2576  		if !(ssa.Is32BitInt(t) && !t.IsSigned()) {
  2577  			break
  2578  		}
  2579  		v.Reset(ssaop.OpPPC64MOVWZload)
  2580  		v.AddArg2(ptr, mem)
  2581  		return true
  2582  	}
  2583  	// match: (Load <t> ptr mem)
  2584  	// cond: ssa.Is16BitInt(t) && t.IsSigned()
  2585  	// result: (MOVHload ptr mem)
  2586  	for {
  2587  		t := v.Type
  2588  		ptr := v_0
  2589  		mem := v_1
  2590  		if !(ssa.Is16BitInt(t) && t.IsSigned()) {
  2591  			break
  2592  		}
  2593  		v.Reset(ssaop.OpPPC64MOVHload)
  2594  		v.AddArg2(ptr, mem)
  2595  		return true
  2596  	}
  2597  	// match: (Load <t> ptr mem)
  2598  	// cond: ssa.Is16BitInt(t) && !t.IsSigned()
  2599  	// result: (MOVHZload ptr mem)
  2600  	for {
  2601  		t := v.Type
  2602  		ptr := v_0
  2603  		mem := v_1
  2604  		if !(ssa.Is16BitInt(t) && !t.IsSigned()) {
  2605  			break
  2606  		}
  2607  		v.Reset(ssaop.OpPPC64MOVHZload)
  2608  		v.AddArg2(ptr, mem)
  2609  		return true
  2610  	}
  2611  	// match: (Load <t> ptr mem)
  2612  	// cond: t.IsBoolean()
  2613  	// result: (MOVBZload ptr mem)
  2614  	for {
  2615  		t := v.Type
  2616  		ptr := v_0
  2617  		mem := v_1
  2618  		if !(t.IsBoolean()) {
  2619  			break
  2620  		}
  2621  		v.Reset(ssaop.OpPPC64MOVBZload)
  2622  		v.AddArg2(ptr, mem)
  2623  		return true
  2624  	}
  2625  	// match: (Load <t> ptr mem)
  2626  	// cond: ssa.Is8BitInt(t) && t.IsSigned()
  2627  	// result: (MOVBreg (MOVBZload ptr mem))
  2628  	for {
  2629  		t := v.Type
  2630  		ptr := v_0
  2631  		mem := v_1
  2632  		if !(ssa.Is8BitInt(t) && t.IsSigned()) {
  2633  			break
  2634  		}
  2635  		v.Reset(ssaop.OpPPC64MOVBreg)
  2636  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZload, typ.UInt8)
  2637  		v0.AddArg2(ptr, mem)
  2638  		v.AddArg(v0)
  2639  		return true
  2640  	}
  2641  	// match: (Load <t> ptr mem)
  2642  	// cond: ssa.Is8BitInt(t) && !t.IsSigned()
  2643  	// result: (MOVBZload ptr mem)
  2644  	for {
  2645  		t := v.Type
  2646  		ptr := v_0
  2647  		mem := v_1
  2648  		if !(ssa.Is8BitInt(t) && !t.IsSigned()) {
  2649  			break
  2650  		}
  2651  		v.Reset(ssaop.OpPPC64MOVBZload)
  2652  		v.AddArg2(ptr, mem)
  2653  		return true
  2654  	}
  2655  	// match: (Load <t> ptr mem)
  2656  	// cond: ssa.Is32BitFloat(t)
  2657  	// result: (FMOVSload ptr mem)
  2658  	for {
  2659  		t := v.Type
  2660  		ptr := v_0
  2661  		mem := v_1
  2662  		if !(ssa.Is32BitFloat(t)) {
  2663  			break
  2664  		}
  2665  		v.Reset(ssaop.OpPPC64FMOVSload)
  2666  		v.AddArg2(ptr, mem)
  2667  		return true
  2668  	}
  2669  	// match: (Load <t> ptr mem)
  2670  	// cond: ssa.Is64BitFloat(t)
  2671  	// result: (FMOVDload ptr mem)
  2672  	for {
  2673  		t := v.Type
  2674  		ptr := v_0
  2675  		mem := v_1
  2676  		if !(ssa.Is64BitFloat(t)) {
  2677  			break
  2678  		}
  2679  		v.Reset(ssaop.OpPPC64FMOVDload)
  2680  		v.AddArg2(ptr, mem)
  2681  		return true
  2682  	}
  2683  	return false
  2684  }
  2685  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  2686  	v_1 := v.Args[1]
  2687  	v_0 := v.Args[0]
  2688  	b := v.Block
  2689  	typ := &b.Func.Config.Types
  2690  	// match: (LocalAddr <t> {sym} base mem)
  2691  	// cond: t.Elem().HasPointers()
  2692  	// result: (MOVDaddr {sym} (SPanchored base mem))
  2693  	for {
  2694  		t := v.Type
  2695  		sym := ssa.AuxToSym(v.Aux)
  2696  		base := v_0
  2697  		mem := v_1
  2698  		if !(t.Elem().HasPointers()) {
  2699  			break
  2700  		}
  2701  		v.Reset(ssaop.OpPPC64MOVDaddr)
  2702  		v.Aux = ssa.SymToAux(sym)
  2703  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  2704  		v0.AddArg2(base, mem)
  2705  		v.AddArg(v0)
  2706  		return true
  2707  	}
  2708  	// match: (LocalAddr <t> {sym} base _)
  2709  	// cond: !t.Elem().HasPointers()
  2710  	// result: (MOVDaddr {sym} base)
  2711  	for {
  2712  		t := v.Type
  2713  		sym := ssa.AuxToSym(v.Aux)
  2714  		base := v_0
  2715  		if !(!t.Elem().HasPointers()) {
  2716  			break
  2717  		}
  2718  		v.Reset(ssaop.OpPPC64MOVDaddr)
  2719  		v.Aux = ssa.SymToAux(sym)
  2720  		v.AddArg(base)
  2721  		return true
  2722  	}
  2723  	return false
  2724  }
  2725  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  2726  	v_1 := v.Args[1]
  2727  	v_0 := v.Args[0]
  2728  	b := v.Block
  2729  	typ := &b.Func.Config.Types
  2730  	// match: (Lsh16x16 x y)
  2731  	// cond: ssa.ShiftIsBounded(v)
  2732  	// result: (SLD x y)
  2733  	for {
  2734  		x := v_0
  2735  		y := v_1
  2736  		if !(ssa.ShiftIsBounded(v)) {
  2737  			break
  2738  		}
  2739  		v.Reset(ssaop.OpPPC64SLD)
  2740  		v.AddArg2(x, y)
  2741  		return true
  2742  	}
  2743  	// match: (Lsh16x16 <t> x y)
  2744  	// result: (ISEL [2] (SLD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFF0] y)))
  2745  	for {
  2746  		t := v.Type
  2747  		x := v_0
  2748  		y := v_1
  2749  		v.Reset(ssaop.OpPPC64ISEL)
  2750  		v.AuxInt = ssa.Int32ToAuxInt(2)
  2751  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  2752  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
  2753  		v1.AddArg(x)
  2754  		v0.AddArg2(v1, y)
  2755  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  2756  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  2757  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  2758  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  2759  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  2760  		v4.AuxInt = ssa.Int64ToAuxInt(0xFFF0)
  2761  		v4.AddArg(y)
  2762  		v3.AddArg(v4)
  2763  		v.AddArg3(v0, v2, v3)
  2764  		return true
  2765  	}
  2766  }
  2767  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  2768  	v_1 := v.Args[1]
  2769  	v_0 := v.Args[0]
  2770  	b := v.Block
  2771  	typ := &b.Func.Config.Types
  2772  	// match: (Lsh16x32 x y)
  2773  	// cond: ssa.ShiftIsBounded(v)
  2774  	// result: (SLD x y)
  2775  	for {
  2776  		x := v_0
  2777  		y := v_1
  2778  		if !(ssa.ShiftIsBounded(v)) {
  2779  			break
  2780  		}
  2781  		v.Reset(ssaop.OpPPC64SLD)
  2782  		v.AddArg2(x, y)
  2783  		return true
  2784  	}
  2785  	// match: (Lsh16x32 <t> x y)
  2786  	// result: (ISEL [0] (SLD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [16]))
  2787  	for {
  2788  		t := v.Type
  2789  		x := v_0
  2790  		y := v_1
  2791  		v.Reset(ssaop.OpPPC64ISEL)
  2792  		v.AuxInt = ssa.Int32ToAuxInt(0)
  2793  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  2794  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
  2795  		v1.AddArg(x)
  2796  		v0.AddArg2(v1, y)
  2797  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  2798  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  2799  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
  2800  		v3.AuxInt = ssa.Int32ToAuxInt(16)
  2801  		v3.AddArg(y)
  2802  		v.AddArg3(v0, v2, v3)
  2803  		return true
  2804  	}
  2805  }
  2806  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
  2807  	v_1 := v.Args[1]
  2808  	v_0 := v.Args[0]
  2809  	b := v.Block
  2810  	typ := &b.Func.Config.Types
  2811  	// match: (Lsh16x64 x (MOVDconst [c]))
  2812  	// cond: uint64(c) < 16
  2813  	// result: (SLWconst x [c])
  2814  	for {
  2815  		x := v_0
  2816  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  2817  			break
  2818  		}
  2819  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2820  		if !(uint64(c) < 16) {
  2821  			break
  2822  		}
  2823  		v.Reset(ssaop.OpPPC64SLWconst)
  2824  		v.AuxInt = ssa.Int64ToAuxInt(c)
  2825  		v.AddArg(x)
  2826  		return true
  2827  	}
  2828  	// match: (Lsh16x64 x y)
  2829  	// cond: ssa.ShiftIsBounded(v)
  2830  	// result: (SLD x y)
  2831  	for {
  2832  		x := v_0
  2833  		y := v_1
  2834  		if !(ssa.ShiftIsBounded(v)) {
  2835  			break
  2836  		}
  2837  		v.Reset(ssaop.OpPPC64SLD)
  2838  		v.AddArg2(x, y)
  2839  		return true
  2840  	}
  2841  	// match: (Lsh16x64 <t> x y)
  2842  	// result: (ISEL [0] (SLD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [16]))
  2843  	for {
  2844  		t := v.Type
  2845  		x := v_0
  2846  		y := v_1
  2847  		v.Reset(ssaop.OpPPC64ISEL)
  2848  		v.AuxInt = ssa.Int32ToAuxInt(0)
  2849  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  2850  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
  2851  		v1.AddArg(x)
  2852  		v0.AddArg2(v1, y)
  2853  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  2854  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  2855  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
  2856  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  2857  		v3.AddArg(y)
  2858  		v.AddArg3(v0, v2, v3)
  2859  		return true
  2860  	}
  2861  }
  2862  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  2863  	v_1 := v.Args[1]
  2864  	v_0 := v.Args[0]
  2865  	b := v.Block
  2866  	typ := &b.Func.Config.Types
  2867  	// match: (Lsh16x8 x y)
  2868  	// cond: ssa.ShiftIsBounded(v)
  2869  	// result: (SLD x y)
  2870  	for {
  2871  		x := v_0
  2872  		y := v_1
  2873  		if !(ssa.ShiftIsBounded(v)) {
  2874  			break
  2875  		}
  2876  		v.Reset(ssaop.OpPPC64SLD)
  2877  		v.AddArg2(x, y)
  2878  		return true
  2879  	}
  2880  	// match: (Lsh16x8 <t> x y)
  2881  	// result: (ISEL [2] (SLD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00F0] y)))
  2882  	for {
  2883  		t := v.Type
  2884  		x := v_0
  2885  		y := v_1
  2886  		v.Reset(ssaop.OpPPC64ISEL)
  2887  		v.AuxInt = ssa.Int32ToAuxInt(2)
  2888  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  2889  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
  2890  		v1.AddArg(x)
  2891  		v0.AddArg2(v1, y)
  2892  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  2893  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  2894  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  2895  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  2896  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  2897  		v4.AuxInt = ssa.Int64ToAuxInt(0x00F0)
  2898  		v4.AddArg(y)
  2899  		v3.AddArg(v4)
  2900  		v.AddArg3(v0, v2, v3)
  2901  		return true
  2902  	}
  2903  }
  2904  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  2905  	v_1 := v.Args[1]
  2906  	v_0 := v.Args[0]
  2907  	b := v.Block
  2908  	typ := &b.Func.Config.Types
  2909  	// match: (Lsh32x16 x y)
  2910  	// cond: ssa.ShiftIsBounded(v)
  2911  	// result: (SLW x y)
  2912  	for {
  2913  		x := v_0
  2914  		y := v_1
  2915  		if !(ssa.ShiftIsBounded(v)) {
  2916  			break
  2917  		}
  2918  		v.Reset(ssaop.OpPPC64SLW)
  2919  		v.AddArg2(x, y)
  2920  		return true
  2921  	}
  2922  	// match: (Lsh32x16 <t> x y)
  2923  	// result: (ISEL [2] (SLW <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFE0] y)))
  2924  	for {
  2925  		t := v.Type
  2926  		x := v_0
  2927  		y := v_1
  2928  		v.Reset(ssaop.OpPPC64ISEL)
  2929  		v.AuxInt = ssa.Int32ToAuxInt(2)
  2930  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLW, t)
  2931  		v0.AddArg2(x, y)
  2932  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  2933  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2934  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  2935  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  2936  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  2937  		v3.AuxInt = ssa.Int64ToAuxInt(0xFFE0)
  2938  		v3.AddArg(y)
  2939  		v2.AddArg(v3)
  2940  		v.AddArg3(v0, v1, v2)
  2941  		return true
  2942  	}
  2943  }
  2944  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  2945  	v_1 := v.Args[1]
  2946  	v_0 := v.Args[0]
  2947  	b := v.Block
  2948  	typ := &b.Func.Config.Types
  2949  	// match: (Lsh32x32 x y)
  2950  	// cond: ssa.ShiftIsBounded(v)
  2951  	// result: (SLW x y)
  2952  	for {
  2953  		x := v_0
  2954  		y := v_1
  2955  		if !(ssa.ShiftIsBounded(v)) {
  2956  			break
  2957  		}
  2958  		v.Reset(ssaop.OpPPC64SLW)
  2959  		v.AddArg2(x, y)
  2960  		return true
  2961  	}
  2962  	// match: (Lsh32x32 <t> x y)
  2963  	// result: (ISEL [0] (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [32]))
  2964  	for {
  2965  		t := v.Type
  2966  		x := v_0
  2967  		y := v_1
  2968  		v.Reset(ssaop.OpPPC64ISEL)
  2969  		v.AuxInt = ssa.Int32ToAuxInt(0)
  2970  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLW, t)
  2971  		v0.AddArg2(x, y)
  2972  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  2973  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2974  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
  2975  		v2.AuxInt = ssa.Int32ToAuxInt(32)
  2976  		v2.AddArg(y)
  2977  		v.AddArg3(v0, v1, v2)
  2978  		return true
  2979  	}
  2980  }
  2981  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
  2982  	v_1 := v.Args[1]
  2983  	v_0 := v.Args[0]
  2984  	b := v.Block
  2985  	typ := &b.Func.Config.Types
  2986  	// match: (Lsh32x64 x (MOVDconst [c]))
  2987  	// cond: uint64(c) < 32
  2988  	// result: (SLWconst x [c])
  2989  	for {
  2990  		x := v_0
  2991  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  2992  			break
  2993  		}
  2994  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2995  		if !(uint64(c) < 32) {
  2996  			break
  2997  		}
  2998  		v.Reset(ssaop.OpPPC64SLWconst)
  2999  		v.AuxInt = ssa.Int64ToAuxInt(c)
  3000  		v.AddArg(x)
  3001  		return true
  3002  	}
  3003  	// match: (Lsh32x64 x y)
  3004  	// cond: ssa.ShiftIsBounded(v)
  3005  	// result: (SLW x y)
  3006  	for {
  3007  		x := v_0
  3008  		y := v_1
  3009  		if !(ssa.ShiftIsBounded(v)) {
  3010  			break
  3011  		}
  3012  		v.Reset(ssaop.OpPPC64SLW)
  3013  		v.AddArg2(x, y)
  3014  		return true
  3015  	}
  3016  	// match: (Lsh32x64 <t> x y)
  3017  	// result: (ISEL [0] (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [32]))
  3018  	for {
  3019  		t := v.Type
  3020  		x := v_0
  3021  		y := v_1
  3022  		v.Reset(ssaop.OpPPC64ISEL)
  3023  		v.AuxInt = ssa.Int32ToAuxInt(0)
  3024  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLW, t)
  3025  		v0.AddArg2(x, y)
  3026  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3027  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3028  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
  3029  		v2.AuxInt = ssa.Int64ToAuxInt(32)
  3030  		v2.AddArg(y)
  3031  		v.AddArg3(v0, v1, v2)
  3032  		return true
  3033  	}
  3034  }
  3035  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  3036  	v_1 := v.Args[1]
  3037  	v_0 := v.Args[0]
  3038  	b := v.Block
  3039  	typ := &b.Func.Config.Types
  3040  	// match: (Lsh32x8 x y)
  3041  	// cond: ssa.ShiftIsBounded(v)
  3042  	// result: (SLW x y)
  3043  	for {
  3044  		x := v_0
  3045  		y := v_1
  3046  		if !(ssa.ShiftIsBounded(v)) {
  3047  			break
  3048  		}
  3049  		v.Reset(ssaop.OpPPC64SLW)
  3050  		v.AddArg2(x, y)
  3051  		return true
  3052  	}
  3053  	// match: (Lsh32x8 <t> x y)
  3054  	// result: (ISEL [2] (SLW <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00E0] y)))
  3055  	for {
  3056  		t := v.Type
  3057  		x := v_0
  3058  		y := v_1
  3059  		v.Reset(ssaop.OpPPC64ISEL)
  3060  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3061  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLW, t)
  3062  		v0.AddArg2(x, y)
  3063  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3064  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3065  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  3066  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3067  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  3068  		v3.AuxInt = ssa.Int64ToAuxInt(0x00E0)
  3069  		v3.AddArg(y)
  3070  		v2.AddArg(v3)
  3071  		v.AddArg3(v0, v1, v2)
  3072  		return true
  3073  	}
  3074  }
  3075  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
  3076  	v_1 := v.Args[1]
  3077  	v_0 := v.Args[0]
  3078  	b := v.Block
  3079  	typ := &b.Func.Config.Types
  3080  	// match: (Lsh64x16 x y)
  3081  	// cond: ssa.ShiftIsBounded(v)
  3082  	// result: (SLD x y)
  3083  	for {
  3084  		x := v_0
  3085  		y := v_1
  3086  		if !(ssa.ShiftIsBounded(v)) {
  3087  			break
  3088  		}
  3089  		v.Reset(ssaop.OpPPC64SLD)
  3090  		v.AddArg2(x, y)
  3091  		return true
  3092  	}
  3093  	// match: (Lsh64x16 <t> x y)
  3094  	// result: (ISEL [2] (SLD <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFC0] y)))
  3095  	for {
  3096  		t := v.Type
  3097  		x := v_0
  3098  		y := v_1
  3099  		v.Reset(ssaop.OpPPC64ISEL)
  3100  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3101  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3102  		v0.AddArg2(x, y)
  3103  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3104  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3105  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  3106  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3107  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  3108  		v3.AuxInt = ssa.Int64ToAuxInt(0xFFC0)
  3109  		v3.AddArg(y)
  3110  		v2.AddArg(v3)
  3111  		v.AddArg3(v0, v1, v2)
  3112  		return true
  3113  	}
  3114  }
  3115  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
  3116  	v_1 := v.Args[1]
  3117  	v_0 := v.Args[0]
  3118  	b := v.Block
  3119  	typ := &b.Func.Config.Types
  3120  	// match: (Lsh64x32 x y)
  3121  	// cond: ssa.ShiftIsBounded(v)
  3122  	// result: (SLD x y)
  3123  	for {
  3124  		x := v_0
  3125  		y := v_1
  3126  		if !(ssa.ShiftIsBounded(v)) {
  3127  			break
  3128  		}
  3129  		v.Reset(ssaop.OpPPC64SLD)
  3130  		v.AddArg2(x, y)
  3131  		return true
  3132  	}
  3133  	// match: (Lsh64x32 <t> x y)
  3134  	// result: (ISEL [0] (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3135  	for {
  3136  		t := v.Type
  3137  		x := v_0
  3138  		y := v_1
  3139  		v.Reset(ssaop.OpPPC64ISEL)
  3140  		v.AuxInt = ssa.Int32ToAuxInt(0)
  3141  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3142  		v0.AddArg2(x, y)
  3143  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3144  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3145  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
  3146  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3147  		v2.AddArg(y)
  3148  		v.AddArg3(v0, v1, v2)
  3149  		return true
  3150  	}
  3151  }
  3152  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  3153  	v_1 := v.Args[1]
  3154  	v_0 := v.Args[0]
  3155  	b := v.Block
  3156  	typ := &b.Func.Config.Types
  3157  	// match: (Lsh64x64 x (MOVDconst [c]))
  3158  	// cond: uint64(c) < 64
  3159  	// result: (SLDconst x [c])
  3160  	for {
  3161  		x := v_0
  3162  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  3163  			break
  3164  		}
  3165  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3166  		if !(uint64(c) < 64) {
  3167  			break
  3168  		}
  3169  		v.Reset(ssaop.OpPPC64SLDconst)
  3170  		v.AuxInt = ssa.Int64ToAuxInt(c)
  3171  		v.AddArg(x)
  3172  		return true
  3173  	}
  3174  	// match: (Lsh64x64 x y)
  3175  	// cond: ssa.ShiftIsBounded(v)
  3176  	// result: (SLD x y)
  3177  	for {
  3178  		x := v_0
  3179  		y := v_1
  3180  		if !(ssa.ShiftIsBounded(v)) {
  3181  			break
  3182  		}
  3183  		v.Reset(ssaop.OpPPC64SLD)
  3184  		v.AddArg2(x, y)
  3185  		return true
  3186  	}
  3187  	// match: (Lsh64x64 <t> x y)
  3188  	// result: (ISEL [0] (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3189  	for {
  3190  		t := v.Type
  3191  		x := v_0
  3192  		y := v_1
  3193  		v.Reset(ssaop.OpPPC64ISEL)
  3194  		v.AuxInt = ssa.Int32ToAuxInt(0)
  3195  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3196  		v0.AddArg2(x, y)
  3197  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3198  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3199  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
  3200  		v2.AuxInt = ssa.Int64ToAuxInt(64)
  3201  		v2.AddArg(y)
  3202  		v.AddArg3(v0, v1, v2)
  3203  		return true
  3204  	}
  3205  }
  3206  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  3207  	v_1 := v.Args[1]
  3208  	v_0 := v.Args[0]
  3209  	b := v.Block
  3210  	typ := &b.Func.Config.Types
  3211  	// match: (Lsh64x8 x y)
  3212  	// cond: ssa.ShiftIsBounded(v)
  3213  	// result: (SLD x y)
  3214  	for {
  3215  		x := v_0
  3216  		y := v_1
  3217  		if !(ssa.ShiftIsBounded(v)) {
  3218  			break
  3219  		}
  3220  		v.Reset(ssaop.OpPPC64SLD)
  3221  		v.AddArg2(x, y)
  3222  		return true
  3223  	}
  3224  	// match: (Lsh64x8 <t> x y)
  3225  	// result: (ISEL [2] (SLD <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00C0] y)))
  3226  	for {
  3227  		t := v.Type
  3228  		x := v_0
  3229  		y := v_1
  3230  		v.Reset(ssaop.OpPPC64ISEL)
  3231  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3232  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3233  		v0.AddArg2(x, y)
  3234  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3235  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3236  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  3237  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3238  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  3239  		v3.AuxInt = ssa.Int64ToAuxInt(0x00C0)
  3240  		v3.AddArg(y)
  3241  		v2.AddArg(v3)
  3242  		v.AddArg3(v0, v1, v2)
  3243  		return true
  3244  	}
  3245  }
  3246  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  3247  	v_1 := v.Args[1]
  3248  	v_0 := v.Args[0]
  3249  	b := v.Block
  3250  	typ := &b.Func.Config.Types
  3251  	// match: (Lsh8x16 x y)
  3252  	// cond: ssa.ShiftIsBounded(v)
  3253  	// result: (SLD x y)
  3254  	for {
  3255  		x := v_0
  3256  		y := v_1
  3257  		if !(ssa.ShiftIsBounded(v)) {
  3258  			break
  3259  		}
  3260  		v.Reset(ssaop.OpPPC64SLD)
  3261  		v.AddArg2(x, y)
  3262  		return true
  3263  	}
  3264  	// match: (Lsh8x16 <t> x y)
  3265  	// result: (ISEL [2] (SLD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFF8] y)))
  3266  	for {
  3267  		t := v.Type
  3268  		x := v_0
  3269  		y := v_1
  3270  		v.Reset(ssaop.OpPPC64ISEL)
  3271  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3272  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3273  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  3274  		v1.AddArg(x)
  3275  		v0.AddArg2(v1, y)
  3276  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3277  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3278  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  3279  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  3280  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  3281  		v4.AuxInt = ssa.Int64ToAuxInt(0xFFF8)
  3282  		v4.AddArg(y)
  3283  		v3.AddArg(v4)
  3284  		v.AddArg3(v0, v2, v3)
  3285  		return true
  3286  	}
  3287  }
  3288  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  3289  	v_1 := v.Args[1]
  3290  	v_0 := v.Args[0]
  3291  	b := v.Block
  3292  	typ := &b.Func.Config.Types
  3293  	// match: (Lsh8x32 x y)
  3294  	// cond: ssa.ShiftIsBounded(v)
  3295  	// result: (SLD x y)
  3296  	for {
  3297  		x := v_0
  3298  		y := v_1
  3299  		if !(ssa.ShiftIsBounded(v)) {
  3300  			break
  3301  		}
  3302  		v.Reset(ssaop.OpPPC64SLD)
  3303  		v.AddArg2(x, y)
  3304  		return true
  3305  	}
  3306  	// match: (Lsh8x32 <t> x y)
  3307  	// result: (ISEL [0] (SLD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [8]))
  3308  	for {
  3309  		t := v.Type
  3310  		x := v_0
  3311  		y := v_1
  3312  		v.Reset(ssaop.OpPPC64ISEL)
  3313  		v.AuxInt = ssa.Int32ToAuxInt(0)
  3314  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3315  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  3316  		v1.AddArg(x)
  3317  		v0.AddArg2(v1, y)
  3318  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3319  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3320  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
  3321  		v3.AuxInt = ssa.Int32ToAuxInt(8)
  3322  		v3.AddArg(y)
  3323  		v.AddArg3(v0, v2, v3)
  3324  		return true
  3325  	}
  3326  }
  3327  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  3328  	v_1 := v.Args[1]
  3329  	v_0 := v.Args[0]
  3330  	b := v.Block
  3331  	typ := &b.Func.Config.Types
  3332  	// match: (Lsh8x64 x (MOVDconst [c]))
  3333  	// cond: uint64(c) < 8
  3334  	// result: (SLWconst x [c])
  3335  	for {
  3336  		x := v_0
  3337  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  3338  			break
  3339  		}
  3340  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3341  		if !(uint64(c) < 8) {
  3342  			break
  3343  		}
  3344  		v.Reset(ssaop.OpPPC64SLWconst)
  3345  		v.AuxInt = ssa.Int64ToAuxInt(c)
  3346  		v.AddArg(x)
  3347  		return true
  3348  	}
  3349  	// match: (Lsh8x64 x y)
  3350  	// cond: ssa.ShiftIsBounded(v)
  3351  	// result: (SLD x y)
  3352  	for {
  3353  		x := v_0
  3354  		y := v_1
  3355  		if !(ssa.ShiftIsBounded(v)) {
  3356  			break
  3357  		}
  3358  		v.Reset(ssaop.OpPPC64SLD)
  3359  		v.AddArg2(x, y)
  3360  		return true
  3361  	}
  3362  	// match: (Lsh8x64 <t> x y)
  3363  	// result: (ISEL [0] (SLD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [8]))
  3364  	for {
  3365  		t := v.Type
  3366  		x := v_0
  3367  		y := v_1
  3368  		v.Reset(ssaop.OpPPC64ISEL)
  3369  		v.AuxInt = ssa.Int32ToAuxInt(0)
  3370  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3371  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  3372  		v1.AddArg(x)
  3373  		v0.AddArg2(v1, y)
  3374  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3375  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3376  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
  3377  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  3378  		v3.AddArg(y)
  3379  		v.AddArg3(v0, v2, v3)
  3380  		return true
  3381  	}
  3382  }
  3383  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  3384  	v_1 := v.Args[1]
  3385  	v_0 := v.Args[0]
  3386  	b := v.Block
  3387  	typ := &b.Func.Config.Types
  3388  	// match: (Lsh8x8 x y)
  3389  	// cond: ssa.ShiftIsBounded(v)
  3390  	// result: (SLD x y)
  3391  	for {
  3392  		x := v_0
  3393  		y := v_1
  3394  		if !(ssa.ShiftIsBounded(v)) {
  3395  			break
  3396  		}
  3397  		v.Reset(ssaop.OpPPC64SLD)
  3398  		v.AddArg2(x, y)
  3399  		return true
  3400  	}
  3401  	// match: (Lsh8x8 <t> x y)
  3402  	// result: (ISEL [2] (SLD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00F8] y)))
  3403  	for {
  3404  		t := v.Type
  3405  		x := v_0
  3406  		y := v_1
  3407  		v.Reset(ssaop.OpPPC64ISEL)
  3408  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3409  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SLD, t)
  3410  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  3411  		v1.AddArg(x)
  3412  		v0.AddArg2(v1, y)
  3413  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  3414  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  3415  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  3416  		v3.AuxInt = ssa.Int64ToAuxInt(0)
  3417  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
  3418  		v4.AuxInt = ssa.Int64ToAuxInt(0x00F8)
  3419  		v4.AddArg(y)
  3420  		v3.AddArg(v4)
  3421  		v.AddArg3(v0, v2, v3)
  3422  		return true
  3423  	}
  3424  }
  3425  func rewriteValue_OpMax32F(v *ssa.Value) bool {
  3426  	v_1 := v.Args[1]
  3427  	v_0 := v.Args[0]
  3428  	// match: (Max32F x y)
  3429  	// cond: buildcfg.GOPPC64 >= 9
  3430  	// result: (XSMAXJDP x y)
  3431  	for {
  3432  		x := v_0
  3433  		y := v_1
  3434  		if !(buildcfg.GOPPC64 >= 9) {
  3435  			break
  3436  		}
  3437  		v.Reset(ssaop.OpPPC64XSMAXJDP)
  3438  		v.AddArg2(x, y)
  3439  		return true
  3440  	}
  3441  	return false
  3442  }
  3443  func rewriteValue_OpMax64F(v *ssa.Value) bool {
  3444  	v_1 := v.Args[1]
  3445  	v_0 := v.Args[0]
  3446  	// match: (Max64F x y)
  3447  	// cond: buildcfg.GOPPC64 >= 9
  3448  	// result: (XSMAXJDP x y)
  3449  	for {
  3450  		x := v_0
  3451  		y := v_1
  3452  		if !(buildcfg.GOPPC64 >= 9) {
  3453  			break
  3454  		}
  3455  		v.Reset(ssaop.OpPPC64XSMAXJDP)
  3456  		v.AddArg2(x, y)
  3457  		return true
  3458  	}
  3459  	return false
  3460  }
  3461  func rewriteValue_OpMin32F(v *ssa.Value) bool {
  3462  	v_1 := v.Args[1]
  3463  	v_0 := v.Args[0]
  3464  	// match: (Min32F x y)
  3465  	// cond: buildcfg.GOPPC64 >= 9
  3466  	// result: (XSMINJDP x y)
  3467  	for {
  3468  		x := v_0
  3469  		y := v_1
  3470  		if !(buildcfg.GOPPC64 >= 9) {
  3471  			break
  3472  		}
  3473  		v.Reset(ssaop.OpPPC64XSMINJDP)
  3474  		v.AddArg2(x, y)
  3475  		return true
  3476  	}
  3477  	return false
  3478  }
  3479  func rewriteValue_OpMin64F(v *ssa.Value) bool {
  3480  	v_1 := v.Args[1]
  3481  	v_0 := v.Args[0]
  3482  	// match: (Min64F x y)
  3483  	// cond: buildcfg.GOPPC64 >= 9
  3484  	// result: (XSMINJDP x y)
  3485  	for {
  3486  		x := v_0
  3487  		y := v_1
  3488  		if !(buildcfg.GOPPC64 >= 9) {
  3489  			break
  3490  		}
  3491  		v.Reset(ssaop.OpPPC64XSMINJDP)
  3492  		v.AddArg2(x, y)
  3493  		return true
  3494  	}
  3495  	return false
  3496  }
  3497  func rewriteValue_OpMod16(v *ssa.Value) bool {
  3498  	v_1 := v.Args[1]
  3499  	v_0 := v.Args[0]
  3500  	b := v.Block
  3501  	typ := &b.Func.Config.Types
  3502  	// match: (Mod16 x y)
  3503  	// result: (Mod32 (SignExt16to32 x) (SignExt16to32 y))
  3504  	for {
  3505  		x := v_0
  3506  		y := v_1
  3507  		v.Reset(ssaop.OpMod32)
  3508  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  3509  		v0.AddArg(x)
  3510  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  3511  		v1.AddArg(y)
  3512  		v.AddArg2(v0, v1)
  3513  		return true
  3514  	}
  3515  }
  3516  func rewriteValue_OpMod16u(v *ssa.Value) bool {
  3517  	v_1 := v.Args[1]
  3518  	v_0 := v.Args[0]
  3519  	b := v.Block
  3520  	typ := &b.Func.Config.Types
  3521  	// match: (Mod16u x y)
  3522  	// result: (Mod32u (ZeroExt16to32 x) (ZeroExt16to32 y))
  3523  	for {
  3524  		x := v_0
  3525  		y := v_1
  3526  		v.Reset(ssaop.OpMod32u)
  3527  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  3528  		v0.AddArg(x)
  3529  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  3530  		v1.AddArg(y)
  3531  		v.AddArg2(v0, v1)
  3532  		return true
  3533  	}
  3534  }
  3535  func rewriteValue_OpMod32(v *ssa.Value) bool {
  3536  	v_1 := v.Args[1]
  3537  	v_0 := v.Args[0]
  3538  	b := v.Block
  3539  	typ := &b.Func.Config.Types
  3540  	// match: (Mod32 x y)
  3541  	// cond: buildcfg.GOPPC64 >= 9
  3542  	// result: (MODSW x y)
  3543  	for {
  3544  		x := v_0
  3545  		y := v_1
  3546  		if !(buildcfg.GOPPC64 >= 9) {
  3547  			break
  3548  		}
  3549  		v.Reset(ssaop.OpPPC64MODSW)
  3550  		v.AddArg2(x, y)
  3551  		return true
  3552  	}
  3553  	// match: (Mod32 x y)
  3554  	// cond: buildcfg.GOPPC64 <= 8
  3555  	// result: (SUB x (MULLW y (DIVW x y)))
  3556  	for {
  3557  		x := v_0
  3558  		y := v_1
  3559  		if !(buildcfg.GOPPC64 <= 8) {
  3560  			break
  3561  		}
  3562  		v.Reset(ssaop.OpPPC64SUB)
  3563  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MULLW, typ.Int32)
  3564  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64DIVW, typ.Int32)
  3565  		v1.AddArg2(x, y)
  3566  		v0.AddArg2(y, v1)
  3567  		v.AddArg2(x, v0)
  3568  		return true
  3569  	}
  3570  	return false
  3571  }
  3572  func rewriteValue_OpMod32u(v *ssa.Value) bool {
  3573  	v_1 := v.Args[1]
  3574  	v_0 := v.Args[0]
  3575  	b := v.Block
  3576  	typ := &b.Func.Config.Types
  3577  	// match: (Mod32u x y)
  3578  	// cond: buildcfg.GOPPC64 >= 9
  3579  	// result: (MODUW x y)
  3580  	for {
  3581  		x := v_0
  3582  		y := v_1
  3583  		if !(buildcfg.GOPPC64 >= 9) {
  3584  			break
  3585  		}
  3586  		v.Reset(ssaop.OpPPC64MODUW)
  3587  		v.AddArg2(x, y)
  3588  		return true
  3589  	}
  3590  	// match: (Mod32u x y)
  3591  	// cond: buildcfg.GOPPC64 <= 8
  3592  	// result: (SUB x (MULLW y (DIVWU x y)))
  3593  	for {
  3594  		x := v_0
  3595  		y := v_1
  3596  		if !(buildcfg.GOPPC64 <= 8) {
  3597  			break
  3598  		}
  3599  		v.Reset(ssaop.OpPPC64SUB)
  3600  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MULLW, typ.Int32)
  3601  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64DIVWU, typ.Int32)
  3602  		v1.AddArg2(x, y)
  3603  		v0.AddArg2(y, v1)
  3604  		v.AddArg2(x, v0)
  3605  		return true
  3606  	}
  3607  	return false
  3608  }
  3609  func rewriteValue_OpMod64(v *ssa.Value) bool {
  3610  	v_1 := v.Args[1]
  3611  	v_0 := v.Args[0]
  3612  	b := v.Block
  3613  	typ := &b.Func.Config.Types
  3614  	// match: (Mod64 x y)
  3615  	// cond: buildcfg.GOPPC64 >=9
  3616  	// result: (MODSD x y)
  3617  	for {
  3618  		x := v_0
  3619  		y := v_1
  3620  		if !(buildcfg.GOPPC64 >= 9) {
  3621  			break
  3622  		}
  3623  		v.Reset(ssaop.OpPPC64MODSD)
  3624  		v.AddArg2(x, y)
  3625  		return true
  3626  	}
  3627  	// match: (Mod64 x y)
  3628  	// cond: buildcfg.GOPPC64 <=8
  3629  	// result: (SUB x (MULLD y (DIVD x y)))
  3630  	for {
  3631  		x := v_0
  3632  		y := v_1
  3633  		if !(buildcfg.GOPPC64 <= 8) {
  3634  			break
  3635  		}
  3636  		v.Reset(ssaop.OpPPC64SUB)
  3637  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MULLD, typ.Int64)
  3638  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64DIVD, typ.Int64)
  3639  		v1.AddArg2(x, y)
  3640  		v0.AddArg2(y, v1)
  3641  		v.AddArg2(x, v0)
  3642  		return true
  3643  	}
  3644  	return false
  3645  }
  3646  func rewriteValue_OpMod64u(v *ssa.Value) bool {
  3647  	v_1 := v.Args[1]
  3648  	v_0 := v.Args[0]
  3649  	b := v.Block
  3650  	typ := &b.Func.Config.Types
  3651  	// match: (Mod64u x y)
  3652  	// cond: buildcfg.GOPPC64 >= 9
  3653  	// result: (MODUD x y)
  3654  	for {
  3655  		x := v_0
  3656  		y := v_1
  3657  		if !(buildcfg.GOPPC64 >= 9) {
  3658  			break
  3659  		}
  3660  		v.Reset(ssaop.OpPPC64MODUD)
  3661  		v.AddArg2(x, y)
  3662  		return true
  3663  	}
  3664  	// match: (Mod64u x y)
  3665  	// cond: buildcfg.GOPPC64 <= 8
  3666  	// result: (SUB x (MULLD y (DIVDU x y)))
  3667  	for {
  3668  		x := v_0
  3669  		y := v_1
  3670  		if !(buildcfg.GOPPC64 <= 8) {
  3671  			break
  3672  		}
  3673  		v.Reset(ssaop.OpPPC64SUB)
  3674  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MULLD, typ.Int64)
  3675  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64DIVDU, typ.Int64)
  3676  		v1.AddArg2(x, y)
  3677  		v0.AddArg2(y, v1)
  3678  		v.AddArg2(x, v0)
  3679  		return true
  3680  	}
  3681  	return false
  3682  }
  3683  func rewriteValue_OpMod8(v *ssa.Value) bool {
  3684  	v_1 := v.Args[1]
  3685  	v_0 := v.Args[0]
  3686  	b := v.Block
  3687  	typ := &b.Func.Config.Types
  3688  	// match: (Mod8 x y)
  3689  	// result: (Mod32 (SignExt8to32 x) (SignExt8to32 y))
  3690  	for {
  3691  		x := v_0
  3692  		y := v_1
  3693  		v.Reset(ssaop.OpMod32)
  3694  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  3695  		v0.AddArg(x)
  3696  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  3697  		v1.AddArg(y)
  3698  		v.AddArg2(v0, v1)
  3699  		return true
  3700  	}
  3701  }
  3702  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  3703  	v_1 := v.Args[1]
  3704  	v_0 := v.Args[0]
  3705  	b := v.Block
  3706  	typ := &b.Func.Config.Types
  3707  	// match: (Mod8u x y)
  3708  	// result: (Mod32u (ZeroExt8to32 x) (ZeroExt8to32 y))
  3709  	for {
  3710  		x := v_0
  3711  		y := v_1
  3712  		v.Reset(ssaop.OpMod32u)
  3713  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  3714  		v0.AddArg(x)
  3715  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  3716  		v1.AddArg(y)
  3717  		v.AddArg2(v0, v1)
  3718  		return true
  3719  	}
  3720  }
  3721  func rewriteValue_OpMove(v *ssa.Value) bool {
  3722  	v_2 := v.Args[2]
  3723  	v_1 := v.Args[1]
  3724  	v_0 := v.Args[0]
  3725  	b := v.Block
  3726  	typ := &b.Func.Config.Types
  3727  	// match: (Move [0] _ _ mem)
  3728  	// result: mem
  3729  	for {
  3730  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  3731  			break
  3732  		}
  3733  		mem := v_2
  3734  		v.CopyOf(mem)
  3735  		return true
  3736  	}
  3737  	// match: (Move [1] dst src mem)
  3738  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3739  	for {
  3740  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  3741  			break
  3742  		}
  3743  		dst := v_0
  3744  		src := v_1
  3745  		mem := v_2
  3746  		v.Reset(ssaop.OpPPC64MOVBstore)
  3747  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZload, typ.UInt8)
  3748  		v0.AddArg2(src, mem)
  3749  		v.AddArg3(dst, v0, mem)
  3750  		return true
  3751  	}
  3752  	// match: (Move [2] dst src mem)
  3753  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3754  	for {
  3755  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  3756  			break
  3757  		}
  3758  		dst := v_0
  3759  		src := v_1
  3760  		mem := v_2
  3761  		v.Reset(ssaop.OpPPC64MOVHstore)
  3762  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZload, typ.UInt16)
  3763  		v0.AddArg2(src, mem)
  3764  		v.AddArg3(dst, v0, mem)
  3765  		return true
  3766  	}
  3767  	// match: (Move [4] dst src mem)
  3768  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3769  	for {
  3770  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  3771  			break
  3772  		}
  3773  		dst := v_0
  3774  		src := v_1
  3775  		mem := v_2
  3776  		v.Reset(ssaop.OpPPC64MOVWstore)
  3777  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZload, typ.UInt32)
  3778  		v0.AddArg2(src, mem)
  3779  		v.AddArg3(dst, v0, mem)
  3780  		return true
  3781  	}
  3782  	// match: (Move [8] {t} dst src mem)
  3783  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3784  	for {
  3785  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  3786  			break
  3787  		}
  3788  		dst := v_0
  3789  		src := v_1
  3790  		mem := v_2
  3791  		v.Reset(ssaop.OpPPC64MOVDstore)
  3792  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDload, typ.Int64)
  3793  		v0.AddArg2(src, mem)
  3794  		v.AddArg3(dst, v0, mem)
  3795  		return true
  3796  	}
  3797  	// match: (Move [3] dst src mem)
  3798  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHload src mem) mem))
  3799  	for {
  3800  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  3801  			break
  3802  		}
  3803  		dst := v_0
  3804  		src := v_1
  3805  		mem := v_2
  3806  		v.Reset(ssaop.OpPPC64MOVBstore)
  3807  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3808  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZload, typ.UInt8)
  3809  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  3810  		v0.AddArg2(src, mem)
  3811  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHstore, types.TypeMem)
  3812  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHload, typ.Int16)
  3813  		v2.AddArg2(src, mem)
  3814  		v1.AddArg3(dst, v2, mem)
  3815  		v.AddArg3(dst, v0, v1)
  3816  		return true
  3817  	}
  3818  	// match: (Move [5] dst src mem)
  3819  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3820  	for {
  3821  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  3822  			break
  3823  		}
  3824  		dst := v_0
  3825  		src := v_1
  3826  		mem := v_2
  3827  		v.Reset(ssaop.OpPPC64MOVBstore)
  3828  		v.AuxInt = ssa.Int32ToAuxInt(4)
  3829  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZload, typ.UInt8)
  3830  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  3831  		v0.AddArg2(src, mem)
  3832  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWstore, types.TypeMem)
  3833  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZload, typ.UInt32)
  3834  		v2.AddArg2(src, mem)
  3835  		v1.AddArg3(dst, v2, mem)
  3836  		v.AddArg3(dst, v0, v1)
  3837  		return true
  3838  	}
  3839  	// match: (Move [6] dst src mem)
  3840  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3841  	for {
  3842  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  3843  			break
  3844  		}
  3845  		dst := v_0
  3846  		src := v_1
  3847  		mem := v_2
  3848  		v.Reset(ssaop.OpPPC64MOVHstore)
  3849  		v.AuxInt = ssa.Int32ToAuxInt(4)
  3850  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZload, typ.UInt16)
  3851  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  3852  		v0.AddArg2(src, mem)
  3853  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWstore, types.TypeMem)
  3854  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZload, typ.UInt32)
  3855  		v2.AddArg2(src, mem)
  3856  		v1.AddArg3(dst, v2, mem)
  3857  		v.AddArg3(dst, v0, v1)
  3858  		return true
  3859  	}
  3860  	// match: (Move [7] dst src mem)
  3861  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3862  	for {
  3863  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  3864  			break
  3865  		}
  3866  		dst := v_0
  3867  		src := v_1
  3868  		mem := v_2
  3869  		v.Reset(ssaop.OpPPC64MOVBstore)
  3870  		v.AuxInt = ssa.Int32ToAuxInt(6)
  3871  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZload, typ.UInt8)
  3872  		v0.AuxInt = ssa.Int32ToAuxInt(6)
  3873  		v0.AddArg2(src, mem)
  3874  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHstore, types.TypeMem)
  3875  		v1.AuxInt = ssa.Int32ToAuxInt(4)
  3876  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZload, typ.UInt16)
  3877  		v2.AuxInt = ssa.Int32ToAuxInt(4)
  3878  		v2.AddArg2(src, mem)
  3879  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWstore, types.TypeMem)
  3880  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZload, typ.UInt32)
  3881  		v4.AddArg2(src, mem)
  3882  		v3.AddArg3(dst, v4, mem)
  3883  		v1.AddArg3(dst, v2, v3)
  3884  		v.AddArg3(dst, v0, v1)
  3885  		return true
  3886  	}
  3887  	// match: (Move [s] dst src mem)
  3888  	// cond: s > 8 && buildcfg.GOPPC64 <= 8 && ssa.LogLargeCopyValue(v, s)
  3889  	// result: (LoweredMove [s] dst src mem)
  3890  	for {
  3891  		s := ssa.AuxIntToInt64(v.AuxInt)
  3892  		dst := v_0
  3893  		src := v_1
  3894  		mem := v_2
  3895  		if !(s > 8 && buildcfg.GOPPC64 <= 8 && ssa.LogLargeCopyValue(v, s)) {
  3896  			break
  3897  		}
  3898  		v.Reset(ssaop.OpPPC64LoweredMove)
  3899  		v.AuxInt = ssa.Int64ToAuxInt(s)
  3900  		v.AddArg3(dst, src, mem)
  3901  		return true
  3902  	}
  3903  	// match: (Move [s] dst src mem)
  3904  	// cond: s > 8 && s <= 64 && buildcfg.GOPPC64 >= 9
  3905  	// result: (LoweredQuadMoveShort [s] dst src mem)
  3906  	for {
  3907  		s := ssa.AuxIntToInt64(v.AuxInt)
  3908  		dst := v_0
  3909  		src := v_1
  3910  		mem := v_2
  3911  		if !(s > 8 && s <= 64 && buildcfg.GOPPC64 >= 9) {
  3912  			break
  3913  		}
  3914  		v.Reset(ssaop.OpPPC64LoweredQuadMoveShort)
  3915  		v.AuxInt = ssa.Int64ToAuxInt(s)
  3916  		v.AddArg3(dst, src, mem)
  3917  		return true
  3918  	}
  3919  	// match: (Move [s] dst src mem)
  3920  	// cond: s > 8 && buildcfg.GOPPC64 >= 9 && ssa.LogLargeCopyValue(v, s)
  3921  	// result: (LoweredQuadMove [s] dst src mem)
  3922  	for {
  3923  		s := ssa.AuxIntToInt64(v.AuxInt)
  3924  		dst := v_0
  3925  		src := v_1
  3926  		mem := v_2
  3927  		if !(s > 8 && buildcfg.GOPPC64 >= 9 && ssa.LogLargeCopyValue(v, s)) {
  3928  			break
  3929  		}
  3930  		v.Reset(ssaop.OpPPC64LoweredQuadMove)
  3931  		v.AuxInt = ssa.Int64ToAuxInt(s)
  3932  		v.AddArg3(dst, src, mem)
  3933  		return true
  3934  	}
  3935  	return false
  3936  }
  3937  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  3938  	v_1 := v.Args[1]
  3939  	v_0 := v.Args[0]
  3940  	b := v.Block
  3941  	typ := &b.Func.Config.Types
  3942  	// match: (Neq16 x y)
  3943  	// cond: x.Type.IsSigned() && y.Type.IsSigned()
  3944  	// result: (NotEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  3945  	for {
  3946  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3947  			x := v_0
  3948  			y := v_1
  3949  			if !(x.Type.IsSigned() && y.Type.IsSigned()) {
  3950  				continue
  3951  			}
  3952  			v.Reset(ssaop.OpPPC64NotEqual)
  3953  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  3954  			v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  3955  			v1.AddArg(x)
  3956  			v2 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
  3957  			v2.AddArg(y)
  3958  			v0.AddArg2(v1, v2)
  3959  			v.AddArg(v0)
  3960  			return true
  3961  		}
  3962  		break
  3963  	}
  3964  	// match: (Neq16 x y)
  3965  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  3966  	for {
  3967  		x := v_0
  3968  		y := v_1
  3969  		v.Reset(ssaop.OpPPC64NotEqual)
  3970  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  3971  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  3972  		v1.AddArg(x)
  3973  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
  3974  		v2.AddArg(y)
  3975  		v0.AddArg2(v1, v2)
  3976  		v.AddArg(v0)
  3977  		return true
  3978  	}
  3979  }
  3980  func rewriteValue_OpNeq32(v *ssa.Value) bool {
  3981  	v_1 := v.Args[1]
  3982  	v_0 := v.Args[0]
  3983  	b := v.Block
  3984  	// match: (Neq32 x y)
  3985  	// result: (NotEqual (CMPW x y))
  3986  	for {
  3987  		x := v_0
  3988  		y := v_1
  3989  		v.Reset(ssaop.OpPPC64NotEqual)
  3990  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  3991  		v0.AddArg2(x, y)
  3992  		v.AddArg(v0)
  3993  		return true
  3994  	}
  3995  }
  3996  func rewriteValue_OpNeq32F(v *ssa.Value) bool {
  3997  	v_1 := v.Args[1]
  3998  	v_0 := v.Args[0]
  3999  	b := v.Block
  4000  	// match: (Neq32F x y)
  4001  	// result: (NotEqual (FCMPU x y))
  4002  	for {
  4003  		x := v_0
  4004  		y := v_1
  4005  		v.Reset(ssaop.OpPPC64NotEqual)
  4006  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  4007  		v0.AddArg2(x, y)
  4008  		v.AddArg(v0)
  4009  		return true
  4010  	}
  4011  }
  4012  func rewriteValue_OpNeq64(v *ssa.Value) bool {
  4013  	v_1 := v.Args[1]
  4014  	v_0 := v.Args[0]
  4015  	b := v.Block
  4016  	// match: (Neq64 x y)
  4017  	// result: (NotEqual (CMP x y))
  4018  	for {
  4019  		x := v_0
  4020  		y := v_1
  4021  		v.Reset(ssaop.OpPPC64NotEqual)
  4022  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  4023  		v0.AddArg2(x, y)
  4024  		v.AddArg(v0)
  4025  		return true
  4026  	}
  4027  }
  4028  func rewriteValue_OpNeq64F(v *ssa.Value) bool {
  4029  	v_1 := v.Args[1]
  4030  	v_0 := v.Args[0]
  4031  	b := v.Block
  4032  	// match: (Neq64F x y)
  4033  	// result: (NotEqual (FCMPU x y))
  4034  	for {
  4035  		x := v_0
  4036  		y := v_1
  4037  		v.Reset(ssaop.OpPPC64NotEqual)
  4038  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64FCMPU, types.TypeFlags)
  4039  		v0.AddArg2(x, y)
  4040  		v.AddArg(v0)
  4041  		return true
  4042  	}
  4043  }
  4044  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  4045  	v_1 := v.Args[1]
  4046  	v_0 := v.Args[0]
  4047  	b := v.Block
  4048  	typ := &b.Func.Config.Types
  4049  	// match: (Neq8 x y)
  4050  	// cond: x.Type.IsSigned() && y.Type.IsSigned()
  4051  	// result: (NotEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  4052  	for {
  4053  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4054  			x := v_0
  4055  			y := v_1
  4056  			if !(x.Type.IsSigned() && y.Type.IsSigned()) {
  4057  				continue
  4058  			}
  4059  			v.Reset(ssaop.OpPPC64NotEqual)
  4060  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  4061  			v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  4062  			v1.AddArg(x)
  4063  			v2 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
  4064  			v2.AddArg(y)
  4065  			v0.AddArg2(v1, v2)
  4066  			v.AddArg(v0)
  4067  			return true
  4068  		}
  4069  		break
  4070  	}
  4071  	// match: (Neq8 x y)
  4072  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  4073  	for {
  4074  		x := v_0
  4075  		y := v_1
  4076  		v.Reset(ssaop.OpPPC64NotEqual)
  4077  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  4078  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  4079  		v1.AddArg(x)
  4080  		v2 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
  4081  		v2.AddArg(y)
  4082  		v0.AddArg2(v1, v2)
  4083  		v.AddArg(v0)
  4084  		return true
  4085  	}
  4086  }
  4087  func rewriteValue_OpNeqPtr(v *ssa.Value) bool {
  4088  	v_1 := v.Args[1]
  4089  	v_0 := v.Args[0]
  4090  	b := v.Block
  4091  	// match: (NeqPtr x y)
  4092  	// result: (NotEqual (CMP x y))
  4093  	for {
  4094  		x := v_0
  4095  		y := v_1
  4096  		v.Reset(ssaop.OpPPC64NotEqual)
  4097  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  4098  		v0.AddArg2(x, y)
  4099  		v.AddArg(v0)
  4100  		return true
  4101  	}
  4102  }
  4103  func rewriteValue_OpNot(v *ssa.Value) bool {
  4104  	v_0 := v.Args[0]
  4105  	// match: (Not x)
  4106  	// result: (XORconst [1] x)
  4107  	for {
  4108  		x := v_0
  4109  		v.Reset(ssaop.OpPPC64XORconst)
  4110  		v.AuxInt = ssa.Int64ToAuxInt(1)
  4111  		v.AddArg(x)
  4112  		return true
  4113  	}
  4114  }
  4115  func rewriteValue_OpOffPtr(v *ssa.Value) bool {
  4116  	v_0 := v.Args[0]
  4117  	b := v.Block
  4118  	typ := &b.Func.Config.Types
  4119  	// match: (OffPtr [off] ptr)
  4120  	// result: (ADD (MOVDconst <typ.Int64> [off]) ptr)
  4121  	for {
  4122  		off := ssa.AuxIntToInt64(v.AuxInt)
  4123  		ptr := v_0
  4124  		v.Reset(ssaop.OpPPC64ADD)
  4125  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
  4126  		v0.AuxInt = ssa.Int64ToAuxInt(off)
  4127  		v.AddArg2(v0, ptr)
  4128  		return true
  4129  	}
  4130  }
  4131  func rewriteValue_OpPPC64ADD(v *ssa.Value) bool {
  4132  	v_1 := v.Args[1]
  4133  	v_0 := v.Args[0]
  4134  	b := v.Block
  4135  	// match: (ADD z l:(MULLD x y))
  4136  	// cond: buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)
  4137  	// result: (MADDLD x y z )
  4138  	for {
  4139  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4140  			z := v_0
  4141  			l := v_1
  4142  			if l.Op != ssaop.OpPPC64MULLD {
  4143  				continue
  4144  			}
  4145  			y := l.Args[1]
  4146  			x := l.Args[0]
  4147  			if !(buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)) {
  4148  				continue
  4149  			}
  4150  			v.Reset(ssaop.OpPPC64MADDLD)
  4151  			v.AddArg3(x, y, z)
  4152  			return true
  4153  		}
  4154  		break
  4155  	}
  4156  	// match: (ADD z l:(MULLDconst <mt> [x] y))
  4157  	// cond: buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)
  4158  	// result: (MADDLD (MOVDconst <mt> [int64(x)]) y z )
  4159  	for {
  4160  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4161  			z := v_0
  4162  			l := v_1
  4163  			if l.Op != ssaop.OpPPC64MULLDconst {
  4164  				continue
  4165  			}
  4166  			mt := l.Type
  4167  			x := ssa.AuxIntToInt32(l.AuxInt)
  4168  			y := l.Args[0]
  4169  			if !(buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)) {
  4170  				continue
  4171  			}
  4172  			v.Reset(ssaop.OpPPC64MADDLD)
  4173  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, mt)
  4174  			v0.AuxInt = ssa.Int64ToAuxInt(int64(x))
  4175  			v.AddArg3(v0, y, z)
  4176  			return true
  4177  		}
  4178  		break
  4179  	}
  4180  	// match: (ADD x (MOVDconst <t> [c]))
  4181  	// cond: ssa.Is32Bit(c) && !t.IsPtr()
  4182  	// result: (ADDconst [c] x)
  4183  	for {
  4184  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4185  			x := v_0
  4186  			if v_1.Op != ssaop.OpPPC64MOVDconst {
  4187  				continue
  4188  			}
  4189  			t := v_1.Type
  4190  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  4191  			if !(ssa.Is32Bit(c) && !t.IsPtr()) {
  4192  				continue
  4193  			}
  4194  			v.Reset(ssaop.OpPPC64ADDconst)
  4195  			v.AuxInt = ssa.Int64ToAuxInt(c)
  4196  			v.AddArg(x)
  4197  			return true
  4198  		}
  4199  		break
  4200  	}
  4201  	return false
  4202  }
  4203  func rewriteValue_OpPPC64ADDC(v *ssa.Value) bool {
  4204  	v_1 := v.Args[1]
  4205  	v_0 := v.Args[0]
  4206  	// match: (ADDC x (MOVDconst [y]))
  4207  	// cond: ssa.Is16Bit(y)
  4208  	// result: (ADDCconst [y] x)
  4209  	for {
  4210  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4211  			x := v_0
  4212  			if v_1.Op != ssaop.OpPPC64MOVDconst {
  4213  				continue
  4214  			}
  4215  			y := ssa.AuxIntToInt64(v_1.AuxInt)
  4216  			if !(ssa.Is16Bit(y)) {
  4217  				continue
  4218  			}
  4219  			v.Reset(ssaop.OpPPC64ADDCconst)
  4220  			v.AuxInt = ssa.Int64ToAuxInt(y)
  4221  			v.AddArg(x)
  4222  			return true
  4223  		}
  4224  		break
  4225  	}
  4226  	return false
  4227  }
  4228  func rewriteValue_OpPPC64ADDE(v *ssa.Value) bool {
  4229  	v_2 := v.Args[2]
  4230  	v_1 := v.Args[1]
  4231  	v_0 := v.Args[0]
  4232  	b := v.Block
  4233  	typ := &b.Func.Config.Types
  4234  	// match: (ADDE x y (Select1 <typ.UInt64> (ADDCconst (MOVDconst [0]) [-1])))
  4235  	// result: (ADDC x y)
  4236  	for {
  4237  		x := v_0
  4238  		y := v_1
  4239  		if v_2.Op != ssaop.OpSelect1 || v_2.Type != typ.UInt64 {
  4240  			break
  4241  		}
  4242  		v_2_0 := v_2.Args[0]
  4243  		if v_2_0.Op != ssaop.OpPPC64ADDCconst || ssa.AuxIntToInt64(v_2_0.AuxInt) != -1 {
  4244  			break
  4245  		}
  4246  		v_2_0_0 := v_2_0.Args[0]
  4247  		if v_2_0_0.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_2_0_0.AuxInt) != 0 {
  4248  			break
  4249  		}
  4250  		v.Reset(ssaop.OpPPC64ADDC)
  4251  		v.AddArg2(x, y)
  4252  		return true
  4253  	}
  4254  	// match: (ADDE (MOVDconst [0]) y c)
  4255  	// result: (ADDZE y c)
  4256  	for {
  4257  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4258  			if v_0.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  4259  				continue
  4260  			}
  4261  			y := v_1
  4262  			c := v_2
  4263  			v.Reset(ssaop.OpPPC64ADDZE)
  4264  			v.AddArg2(y, c)
  4265  			return true
  4266  		}
  4267  		break
  4268  	}
  4269  	return false
  4270  }
  4271  func rewriteValue_OpPPC64ADDconst(v *ssa.Value) bool {
  4272  	v_0 := v.Args[0]
  4273  	b := v.Block
  4274  	// match: (ADDconst <at> [z] l:(MULLD x y))
  4275  	// cond: buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)
  4276  	// result: (MADDLD x y (MOVDconst <at> [int64(z)]))
  4277  	for {
  4278  		at := v.Type
  4279  		z := ssa.AuxIntToInt64(v.AuxInt)
  4280  		l := v_0
  4281  		if l.Op != ssaop.OpPPC64MULLD {
  4282  			break
  4283  		}
  4284  		y := l.Args[1]
  4285  		x := l.Args[0]
  4286  		if !(buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)) {
  4287  			break
  4288  		}
  4289  		v.Reset(ssaop.OpPPC64MADDLD)
  4290  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, at)
  4291  		v0.AuxInt = ssa.Int64ToAuxInt(int64(z))
  4292  		v.AddArg3(x, y, v0)
  4293  		return true
  4294  	}
  4295  	// match: (ADDconst <at> [z] l:(MULLDconst <mt> [x] y))
  4296  	// cond: buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)
  4297  	// result: (MADDLD (MOVDconst <mt> [int64(x)]) y (MOVDconst <at> [int64(z)]))
  4298  	for {
  4299  		at := v.Type
  4300  		z := ssa.AuxIntToInt64(v.AuxInt)
  4301  		l := v_0
  4302  		if l.Op != ssaop.OpPPC64MULLDconst {
  4303  			break
  4304  		}
  4305  		mt := l.Type
  4306  		x := ssa.AuxIntToInt32(l.AuxInt)
  4307  		y := l.Args[0]
  4308  		if !(buildcfg.GOPPC64 >= 9 && l.Uses == 1 && ssa.Clobber(l)) {
  4309  			break
  4310  		}
  4311  		v.Reset(ssaop.OpPPC64MADDLD)
  4312  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, mt)
  4313  		v0.AuxInt = ssa.Int64ToAuxInt(int64(x))
  4314  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, at)
  4315  		v1.AuxInt = ssa.Int64ToAuxInt(int64(z))
  4316  		v.AddArg3(v0, y, v1)
  4317  		return true
  4318  	}
  4319  	// match: (ADDconst [c] (ADDconst [d] x))
  4320  	// cond: ssa.Is32Bit(c+d)
  4321  	// result: (ADDconst [c+d] x)
  4322  	for {
  4323  		c := ssa.AuxIntToInt64(v.AuxInt)
  4324  		if v_0.Op != ssaop.OpPPC64ADDconst {
  4325  			break
  4326  		}
  4327  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  4328  		x := v_0.Args[0]
  4329  		if !(ssa.Is32Bit(c + d)) {
  4330  			break
  4331  		}
  4332  		v.Reset(ssaop.OpPPC64ADDconst)
  4333  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  4334  		v.AddArg(x)
  4335  		return true
  4336  	}
  4337  	// match: (ADDconst [0] x)
  4338  	// result: x
  4339  	for {
  4340  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  4341  			break
  4342  		}
  4343  		x := v_0
  4344  		v.CopyOf(x)
  4345  		return true
  4346  	}
  4347  	// match: (ADDconst [c] (MOVDaddr [d] {sym} x))
  4348  	// cond: ssa.Is32Bit(c+int64(d))
  4349  	// result: (MOVDaddr [int32(c+int64(d))] {sym} x)
  4350  	for {
  4351  		c := ssa.AuxIntToInt64(v.AuxInt)
  4352  		if v_0.Op != ssaop.OpPPC64MOVDaddr {
  4353  			break
  4354  		}
  4355  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  4356  		sym := ssa.AuxToSym(v_0.Aux)
  4357  		x := v_0.Args[0]
  4358  		if !(ssa.Is32Bit(c + int64(d))) {
  4359  			break
  4360  		}
  4361  		v.Reset(ssaop.OpPPC64MOVDaddr)
  4362  		v.AuxInt = ssa.Int32ToAuxInt(int32(c + int64(d)))
  4363  		v.Aux = ssa.SymToAux(sym)
  4364  		v.AddArg(x)
  4365  		return true
  4366  	}
  4367  	// match: (ADDconst [c] x:(SP))
  4368  	// cond: ssa.Is32Bit(c)
  4369  	// result: (MOVDaddr [int32(c)] x)
  4370  	for {
  4371  		c := ssa.AuxIntToInt64(v.AuxInt)
  4372  		x := v_0
  4373  		if x.Op != ssaop.OpSP || !(ssa.Is32Bit(c)) {
  4374  			break
  4375  		}
  4376  		v.Reset(ssaop.OpPPC64MOVDaddr)
  4377  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  4378  		v.AddArg(x)
  4379  		return true
  4380  	}
  4381  	// match: (ADDconst [c] (SUBFCconst [d] x))
  4382  	// cond: ssa.Is32Bit(c+d)
  4383  	// result: (SUBFCconst [c+d] x)
  4384  	for {
  4385  		c := ssa.AuxIntToInt64(v.AuxInt)
  4386  		if v_0.Op != ssaop.OpPPC64SUBFCconst {
  4387  			break
  4388  		}
  4389  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  4390  		x := v_0.Args[0]
  4391  		if !(ssa.Is32Bit(c + d)) {
  4392  			break
  4393  		}
  4394  		v.Reset(ssaop.OpPPC64SUBFCconst)
  4395  		v.AuxInt = ssa.Int64ToAuxInt(c + d)
  4396  		v.AddArg(x)
  4397  		return true
  4398  	}
  4399  	return false
  4400  }
  4401  func rewriteValue_OpPPC64AND(v *ssa.Value) bool {
  4402  	v_1 := v.Args[1]
  4403  	v_0 := v.Args[0]
  4404  	// match: (AND <t> x (MOVDconst [m]))
  4405  	// cond: t.IsUnsigned() && t.Size() == 1 && m != int64(uint8(m))
  4406  	// result: (ANDconst [int64(uint8(m))] x)
  4407  	for {
  4408  		t := v.Type
  4409  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4410  			x := v_0
  4411  			if v_1.Op != ssaop.OpPPC64MOVDconst {
  4412  				continue
  4413  			}
  4414  			m := ssa.AuxIntToInt64(v_1.AuxInt)
  4415  			if !(t.IsUnsigned() && t.Size() == 1 && m != int64(uint8(m))) {
  4416  				continue
  4417  			}
  4418  			v.Reset(ssaop.OpPPC64ANDconst)
  4419  			v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(m)))
  4420  			v.AddArg(x)
  4421  			return true
  4422  		}
  4423  		break
  4424  	}
  4425  	// match: (AND <t> x (MOVDconst [m]))
  4426  	// cond: t.IsUnsigned() && t.Size() == 2 && m != int64(uint16(m))
  4427  	// result: (ANDconst [int64(uint16(m))] x)
  4428  	for {
  4429  		t := v.Type
  4430  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4431  			x := v_0
  4432  			if v_1.Op != ssaop.OpPPC64MOVDconst {
  4433  				continue
  4434  			}
  4435  			m := ssa.AuxIntToInt64(v_1.AuxInt)
  4436  			if !(t.IsUnsigned() && t.Size() == 2 && m != int64(uint16(m))) {
  4437  				continue
  4438  			}
  4439  			v.Reset(ssaop.OpPPC64ANDconst)
  4440  			v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(m)))
  4441  			v.AddArg(x)
  4442  			return true
  4443  		}
  4444  		break
  4445  	}
  4446  	// match: (AND (MOVDconst [m]) (ROTLWconst [r] x))
  4447  	// cond: ssa.IsPPC64WordRotateMask(m)
  4448  	// result: (RLWINM [ssa.EncodePPC64RotateMask(r,m,32)] x)
  4449  	for {
  4450  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4451  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4452  				continue
  4453  			}
  4454  			m := ssa.AuxIntToInt64(v_0.AuxInt)
  4455  			if v_1.Op != ssaop.OpPPC64ROTLWconst {
  4456  				continue
  4457  			}
  4458  			r := ssa.AuxIntToInt64(v_1.AuxInt)
  4459  			x := v_1.Args[0]
  4460  			if !(ssa.IsPPC64WordRotateMask(m)) {
  4461  				continue
  4462  			}
  4463  			v.Reset(ssaop.OpPPC64RLWINM)
  4464  			v.AuxInt = ssa.Int64ToAuxInt(ssa.EncodePPC64RotateMask(r, m, 32))
  4465  			v.AddArg(x)
  4466  			return true
  4467  		}
  4468  		break
  4469  	}
  4470  	// match: (AND (MOVDconst [m]) (ROTLW x r))
  4471  	// cond: ssa.IsPPC64WordRotateMask(m)
  4472  	// result: (RLWNM [ssa.EncodePPC64RotateMask(0,m,32)] x r)
  4473  	for {
  4474  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4475  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4476  				continue
  4477  			}
  4478  			m := ssa.AuxIntToInt64(v_0.AuxInt)
  4479  			if v_1.Op != ssaop.OpPPC64ROTLW {
  4480  				continue
  4481  			}
  4482  			r := v_1.Args[1]
  4483  			x := v_1.Args[0]
  4484  			if !(ssa.IsPPC64WordRotateMask(m)) {
  4485  				continue
  4486  			}
  4487  			v.Reset(ssaop.OpPPC64RLWNM)
  4488  			v.AuxInt = ssa.Int64ToAuxInt(ssa.EncodePPC64RotateMask(0, m, 32))
  4489  			v.AddArg2(x, r)
  4490  			return true
  4491  		}
  4492  		break
  4493  	}
  4494  	// match: (AND (MOVDconst [m]) (SRWconst x [s]))
  4495  	// cond: ssa.MergePPC64RShiftMask(m,s,32) == 0
  4496  	// result: (MOVDconst [0])
  4497  	for {
  4498  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4499  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4500  				continue
  4501  			}
  4502  			m := ssa.AuxIntToInt64(v_0.AuxInt)
  4503  			if v_1.Op != ssaop.OpPPC64SRWconst {
  4504  				continue
  4505  			}
  4506  			s := ssa.AuxIntToInt64(v_1.AuxInt)
  4507  			if !(ssa.MergePPC64RShiftMask(m, s, 32) == 0) {
  4508  				continue
  4509  			}
  4510  			v.Reset(ssaop.OpPPC64MOVDconst)
  4511  			v.AuxInt = ssa.Int64ToAuxInt(0)
  4512  			return true
  4513  		}
  4514  		break
  4515  	}
  4516  	// match: (AND (MOVDconst [m]) (SRWconst x [s]))
  4517  	// cond: ssa.MergePPC64AndSrwi(m,s) != 0
  4518  	// result: (RLWINM [ssa.MergePPC64AndSrwi(m,s)] x)
  4519  	for {
  4520  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4521  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4522  				continue
  4523  			}
  4524  			m := ssa.AuxIntToInt64(v_0.AuxInt)
  4525  			if v_1.Op != ssaop.OpPPC64SRWconst {
  4526  				continue
  4527  			}
  4528  			s := ssa.AuxIntToInt64(v_1.AuxInt)
  4529  			x := v_1.Args[0]
  4530  			if !(ssa.MergePPC64AndSrwi(m, s) != 0) {
  4531  				continue
  4532  			}
  4533  			v.Reset(ssaop.OpPPC64RLWINM)
  4534  			v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64AndSrwi(m, s))
  4535  			v.AddArg(x)
  4536  			return true
  4537  		}
  4538  		break
  4539  	}
  4540  	// match: (AND (MOVDconst [m]) (SRDconst x [s]))
  4541  	// cond: mergePPC64AndSrdi(m,s) != 0
  4542  	// result: (RLWINM [mergePPC64AndSrdi(m,s)] x)
  4543  	for {
  4544  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4545  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4546  				continue
  4547  			}
  4548  			m := ssa.AuxIntToInt64(v_0.AuxInt)
  4549  			if v_1.Op != ssaop.OpPPC64SRDconst {
  4550  				continue
  4551  			}
  4552  			s := ssa.AuxIntToInt64(v_1.AuxInt)
  4553  			x := v_1.Args[0]
  4554  			if !(mergePPC64AndSrdi(m, s) != 0) {
  4555  				continue
  4556  			}
  4557  			v.Reset(ssaop.OpPPC64RLWINM)
  4558  			v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndSrdi(m, s))
  4559  			v.AddArg(x)
  4560  			return true
  4561  		}
  4562  		break
  4563  	}
  4564  	// match: (AND (MOVDconst [m]) (SLDconst x [s]))
  4565  	// cond: mergePPC64AndSldi(m,s) != 0
  4566  	// result: (RLWINM [mergePPC64AndSldi(m,s)] x)
  4567  	for {
  4568  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4569  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4570  				continue
  4571  			}
  4572  			m := ssa.AuxIntToInt64(v_0.AuxInt)
  4573  			if v_1.Op != ssaop.OpPPC64SLDconst {
  4574  				continue
  4575  			}
  4576  			s := ssa.AuxIntToInt64(v_1.AuxInt)
  4577  			x := v_1.Args[0]
  4578  			if !(mergePPC64AndSldi(m, s) != 0) {
  4579  				continue
  4580  			}
  4581  			v.Reset(ssaop.OpPPC64RLWINM)
  4582  			v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndSldi(m, s))
  4583  			v.AddArg(x)
  4584  			return true
  4585  		}
  4586  		break
  4587  	}
  4588  	// match: (AND x (NOR y y))
  4589  	// result: (ANDN x y)
  4590  	for {
  4591  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4592  			x := v_0
  4593  			if v_1.Op != ssaop.OpPPC64NOR {
  4594  				continue
  4595  			}
  4596  			y := v_1.Args[1]
  4597  			if y != v_1.Args[0] {
  4598  				continue
  4599  			}
  4600  			v.Reset(ssaop.OpPPC64ANDN)
  4601  			v.AddArg2(x, y)
  4602  			return true
  4603  		}
  4604  		break
  4605  	}
  4606  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  4607  	// result: (MOVDconst [c&d])
  4608  	for {
  4609  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4610  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4611  				continue
  4612  			}
  4613  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  4614  			if v_1.Op != ssaop.OpPPC64MOVDconst {
  4615  				continue
  4616  			}
  4617  			d := ssa.AuxIntToInt64(v_1.AuxInt)
  4618  			v.Reset(ssaop.OpPPC64MOVDconst)
  4619  			v.AuxInt = ssa.Int64ToAuxInt(c & d)
  4620  			return true
  4621  		}
  4622  		break
  4623  	}
  4624  	// match: (AND x (MOVDconst [-1]))
  4625  	// result: x
  4626  	for {
  4627  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4628  			x := v_0
  4629  			if v_1.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
  4630  				continue
  4631  			}
  4632  			v.CopyOf(x)
  4633  			return true
  4634  		}
  4635  		break
  4636  	}
  4637  	// match: (AND x (MOVDconst [c]))
  4638  	// cond: isU16Bit(c)
  4639  	// result: (ANDconst [c] x)
  4640  	for {
  4641  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4642  			x := v_0
  4643  			if v_1.Op != ssaop.OpPPC64MOVDconst {
  4644  				continue
  4645  			}
  4646  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  4647  			if !(isU16Bit(c)) {
  4648  				continue
  4649  			}
  4650  			v.Reset(ssaop.OpPPC64ANDconst)
  4651  			v.AuxInt = ssa.Int64ToAuxInt(c)
  4652  			v.AddArg(x)
  4653  			return true
  4654  		}
  4655  		break
  4656  	}
  4657  	// match: (AND (MOVDconst [c]) y:(MOVWZreg _))
  4658  	// cond: c&0xFFFFFFFF == 0xFFFFFFFF
  4659  	// result: y
  4660  	for {
  4661  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4662  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4663  				continue
  4664  			}
  4665  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  4666  			y := v_1
  4667  			if y.Op != ssaop.OpPPC64MOVWZreg || !(c&0xFFFFFFFF == 0xFFFFFFFF) {
  4668  				continue
  4669  			}
  4670  			v.CopyOf(y)
  4671  			return true
  4672  		}
  4673  		break
  4674  	}
  4675  	// match: (AND (MOVDconst [0xFFFFFFFF]) y:(MOVWreg x))
  4676  	// result: (MOVWZreg x)
  4677  	for {
  4678  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4679  			if v_0.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0xFFFFFFFF {
  4680  				continue
  4681  			}
  4682  			y := v_1
  4683  			if y.Op != ssaop.OpPPC64MOVWreg {
  4684  				continue
  4685  			}
  4686  			x := y.Args[0]
  4687  			v.Reset(ssaop.OpPPC64MOVWZreg)
  4688  			v.AddArg(x)
  4689  			return true
  4690  		}
  4691  		break
  4692  	}
  4693  	// match: (AND (MOVDconst [c]) x:(MOVBZload _ _))
  4694  	// result: (ANDconst [c&0xFF] x)
  4695  	for {
  4696  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4697  			if v_0.Op != ssaop.OpPPC64MOVDconst {
  4698  				continue
  4699  			}
  4700  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  4701  			x := v_1
  4702  			if x.Op != ssaop.OpPPC64MOVBZload {
  4703  				continue
  4704  			}
  4705  			v.Reset(ssaop.OpPPC64ANDconst)
  4706  			v.AuxInt = ssa.Int64ToAuxInt(c & 0xFF)
  4707  			v.AddArg(x)
  4708  			return true
  4709  		}
  4710  		break
  4711  	}
  4712  	return false
  4713  }
  4714  func rewriteValue_OpPPC64ANDN(v *ssa.Value) bool {
  4715  	v_1 := v.Args[1]
  4716  	v_0 := v.Args[0]
  4717  	// match: (ANDN (MOVDconst [c]) (MOVDconst [d]))
  4718  	// result: (MOVDconst [c&^d])
  4719  	for {
  4720  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  4721  			break
  4722  		}
  4723  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  4724  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  4725  			break
  4726  		}
  4727  		d := ssa.AuxIntToInt64(v_1.AuxInt)
  4728  		v.Reset(ssaop.OpPPC64MOVDconst)
  4729  		v.AuxInt = ssa.Int64ToAuxInt(c &^ d)
  4730  		return true
  4731  	}
  4732  	return false
  4733  }
  4734  func rewriteValue_OpPPC64ANDconst(v *ssa.Value) bool {
  4735  	v_0 := v.Args[0]
  4736  	// match: (ANDconst [m] (ROTLWconst [r] x))
  4737  	// cond: ssa.IsPPC64WordRotateMask(m)
  4738  	// result: (RLWINM [ssa.EncodePPC64RotateMask(r,m,32)] x)
  4739  	for {
  4740  		m := ssa.AuxIntToInt64(v.AuxInt)
  4741  		if v_0.Op != ssaop.OpPPC64ROTLWconst {
  4742  			break
  4743  		}
  4744  		r := ssa.AuxIntToInt64(v_0.AuxInt)
  4745  		x := v_0.Args[0]
  4746  		if !(ssa.IsPPC64WordRotateMask(m)) {
  4747  			break
  4748  		}
  4749  		v.Reset(ssaop.OpPPC64RLWINM)
  4750  		v.AuxInt = ssa.Int64ToAuxInt(ssa.EncodePPC64RotateMask(r, m, 32))
  4751  		v.AddArg(x)
  4752  		return true
  4753  	}
  4754  	// match: (ANDconst [m] (ROTLW x r))
  4755  	// cond: ssa.IsPPC64WordRotateMask(m)
  4756  	// result: (RLWNM [ssa.EncodePPC64RotateMask(0,m,32)] x r)
  4757  	for {
  4758  		m := ssa.AuxIntToInt64(v.AuxInt)
  4759  		if v_0.Op != ssaop.OpPPC64ROTLW {
  4760  			break
  4761  		}
  4762  		r := v_0.Args[1]
  4763  		x := v_0.Args[0]
  4764  		if !(ssa.IsPPC64WordRotateMask(m)) {
  4765  			break
  4766  		}
  4767  		v.Reset(ssaop.OpPPC64RLWNM)
  4768  		v.AuxInt = ssa.Int64ToAuxInt(ssa.EncodePPC64RotateMask(0, m, 32))
  4769  		v.AddArg2(x, r)
  4770  		return true
  4771  	}
  4772  	// match: (ANDconst [m] (SRWconst x [s]))
  4773  	// cond: ssa.MergePPC64RShiftMask(m,s,32) == 0
  4774  	// result: (MOVDconst [0])
  4775  	for {
  4776  		m := ssa.AuxIntToInt64(v.AuxInt)
  4777  		if v_0.Op != ssaop.OpPPC64SRWconst {
  4778  			break
  4779  		}
  4780  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  4781  		if !(ssa.MergePPC64RShiftMask(m, s, 32) == 0) {
  4782  			break
  4783  		}
  4784  		v.Reset(ssaop.OpPPC64MOVDconst)
  4785  		v.AuxInt = ssa.Int64ToAuxInt(0)
  4786  		return true
  4787  	}
  4788  	// match: (ANDconst [m] (SRWconst x [s]))
  4789  	// cond: ssa.MergePPC64AndSrwi(m,s) != 0
  4790  	// result: (RLWINM [ssa.MergePPC64AndSrwi(m,s)] x)
  4791  	for {
  4792  		m := ssa.AuxIntToInt64(v.AuxInt)
  4793  		if v_0.Op != ssaop.OpPPC64SRWconst {
  4794  			break
  4795  		}
  4796  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  4797  		x := v_0.Args[0]
  4798  		if !(ssa.MergePPC64AndSrwi(m, s) != 0) {
  4799  			break
  4800  		}
  4801  		v.Reset(ssaop.OpPPC64RLWINM)
  4802  		v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64AndSrwi(m, s))
  4803  		v.AddArg(x)
  4804  		return true
  4805  	}
  4806  	// match: (ANDconst [m] (SRDconst x [s]))
  4807  	// cond: mergePPC64AndSrdi(m,s) != 0
  4808  	// result: (RLWINM [mergePPC64AndSrdi(m,s)] x)
  4809  	for {
  4810  		m := ssa.AuxIntToInt64(v.AuxInt)
  4811  		if v_0.Op != ssaop.OpPPC64SRDconst {
  4812  			break
  4813  		}
  4814  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  4815  		x := v_0.Args[0]
  4816  		if !(mergePPC64AndSrdi(m, s) != 0) {
  4817  			break
  4818  		}
  4819  		v.Reset(ssaop.OpPPC64RLWINM)
  4820  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndSrdi(m, s))
  4821  		v.AddArg(x)
  4822  		return true
  4823  	}
  4824  	// match: (ANDconst [m] (SLDconst x [s]))
  4825  	// cond: mergePPC64AndSldi(m,s) != 0
  4826  	// result: (RLWINM [mergePPC64AndSldi(m,s)] x)
  4827  	for {
  4828  		m := ssa.AuxIntToInt64(v.AuxInt)
  4829  		if v_0.Op != ssaop.OpPPC64SLDconst {
  4830  			break
  4831  		}
  4832  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  4833  		x := v_0.Args[0]
  4834  		if !(mergePPC64AndSldi(m, s) != 0) {
  4835  			break
  4836  		}
  4837  		v.Reset(ssaop.OpPPC64RLWINM)
  4838  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndSldi(m, s))
  4839  		v.AddArg(x)
  4840  		return true
  4841  	}
  4842  	// match: (ANDconst [c] (ANDconst [d] x))
  4843  	// result: (ANDconst [c&d] x)
  4844  	for {
  4845  		c := ssa.AuxIntToInt64(v.AuxInt)
  4846  		if v_0.Op != ssaop.OpPPC64ANDconst {
  4847  			break
  4848  		}
  4849  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  4850  		x := v_0.Args[0]
  4851  		v.Reset(ssaop.OpPPC64ANDconst)
  4852  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  4853  		v.AddArg(x)
  4854  		return true
  4855  	}
  4856  	// match: (ANDconst [-1] x)
  4857  	// result: x
  4858  	for {
  4859  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  4860  			break
  4861  		}
  4862  		x := v_0
  4863  		v.CopyOf(x)
  4864  		return true
  4865  	}
  4866  	// match: (ANDconst [0] _)
  4867  	// result: (MOVDconst [0])
  4868  	for {
  4869  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  4870  			break
  4871  		}
  4872  		v.Reset(ssaop.OpPPC64MOVDconst)
  4873  		v.AuxInt = ssa.Int64ToAuxInt(0)
  4874  		return true
  4875  	}
  4876  	// match: (ANDconst [c] y:(MOVBZreg _))
  4877  	// cond: c&0xFF == 0xFF
  4878  	// result: y
  4879  	for {
  4880  		c := ssa.AuxIntToInt64(v.AuxInt)
  4881  		y := v_0
  4882  		if y.Op != ssaop.OpPPC64MOVBZreg || !(c&0xFF == 0xFF) {
  4883  			break
  4884  		}
  4885  		v.CopyOf(y)
  4886  		return true
  4887  	}
  4888  	// match: (ANDconst [0xFF] (MOVBreg x))
  4889  	// result: (MOVBZreg x)
  4890  	for {
  4891  		if ssa.AuxIntToInt64(v.AuxInt) != 0xFF || v_0.Op != ssaop.OpPPC64MOVBreg {
  4892  			break
  4893  		}
  4894  		x := v_0.Args[0]
  4895  		v.Reset(ssaop.OpPPC64MOVBZreg)
  4896  		v.AddArg(x)
  4897  		return true
  4898  	}
  4899  	// match: (ANDconst [c] y:(MOVHZreg _))
  4900  	// cond: c&0xFFFF == 0xFFFF
  4901  	// result: y
  4902  	for {
  4903  		c := ssa.AuxIntToInt64(v.AuxInt)
  4904  		y := v_0
  4905  		if y.Op != ssaop.OpPPC64MOVHZreg || !(c&0xFFFF == 0xFFFF) {
  4906  			break
  4907  		}
  4908  		v.CopyOf(y)
  4909  		return true
  4910  	}
  4911  	// match: (ANDconst [0xFFFF] (MOVHreg x))
  4912  	// result: (MOVHZreg x)
  4913  	for {
  4914  		if ssa.AuxIntToInt64(v.AuxInt) != 0xFFFF || v_0.Op != ssaop.OpPPC64MOVHreg {
  4915  			break
  4916  		}
  4917  		x := v_0.Args[0]
  4918  		v.Reset(ssaop.OpPPC64MOVHZreg)
  4919  		v.AddArg(x)
  4920  		return true
  4921  	}
  4922  	// match: (ANDconst [c] (MOVBZreg x))
  4923  	// result: (ANDconst [c&0xFF] x)
  4924  	for {
  4925  		c := ssa.AuxIntToInt64(v.AuxInt)
  4926  		if v_0.Op != ssaop.OpPPC64MOVBZreg {
  4927  			break
  4928  		}
  4929  		x := v_0.Args[0]
  4930  		v.Reset(ssaop.OpPPC64ANDconst)
  4931  		v.AuxInt = ssa.Int64ToAuxInt(c & 0xFF)
  4932  		v.AddArg(x)
  4933  		return true
  4934  	}
  4935  	// match: (ANDconst [c] (MOVHZreg x))
  4936  	// result: (ANDconst [c&0xFFFF] x)
  4937  	for {
  4938  		c := ssa.AuxIntToInt64(v.AuxInt)
  4939  		if v_0.Op != ssaop.OpPPC64MOVHZreg {
  4940  			break
  4941  		}
  4942  		x := v_0.Args[0]
  4943  		v.Reset(ssaop.OpPPC64ANDconst)
  4944  		v.AuxInt = ssa.Int64ToAuxInt(c & 0xFFFF)
  4945  		v.AddArg(x)
  4946  		return true
  4947  	}
  4948  	// match: (ANDconst [c] (MOVWZreg x))
  4949  	// result: (ANDconst [c&0xFFFFFFFF] x)
  4950  	for {
  4951  		c := ssa.AuxIntToInt64(v.AuxInt)
  4952  		if v_0.Op != ssaop.OpPPC64MOVWZreg {
  4953  			break
  4954  		}
  4955  		x := v_0.Args[0]
  4956  		v.Reset(ssaop.OpPPC64ANDconst)
  4957  		v.AuxInt = ssa.Int64ToAuxInt(c & 0xFFFFFFFF)
  4958  		v.AddArg(x)
  4959  		return true
  4960  	}
  4961  	// match: (ANDconst [m] (RLWINM [r] y))
  4962  	// cond: mergePPC64AndRlwinm(uint32(m),r) != 0
  4963  	// result: (RLWINM [mergePPC64AndRlwinm(uint32(m),r)] y)
  4964  	for {
  4965  		m := ssa.AuxIntToInt64(v.AuxInt)
  4966  		if v_0.Op != ssaop.OpPPC64RLWINM {
  4967  			break
  4968  		}
  4969  		r := ssa.AuxIntToInt64(v_0.AuxInt)
  4970  		y := v_0.Args[0]
  4971  		if !(mergePPC64AndRlwinm(uint32(m), r) != 0) {
  4972  			break
  4973  		}
  4974  		v.Reset(ssaop.OpPPC64RLWINM)
  4975  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndRlwinm(uint32(m), r))
  4976  		v.AddArg(y)
  4977  		return true
  4978  	}
  4979  	// match: (ANDconst [1] z:(SRADconst [63] x))
  4980  	// cond: z.Uses == 1
  4981  	// result: (SRDconst [63] x)
  4982  	for {
  4983  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  4984  			break
  4985  		}
  4986  		z := v_0
  4987  		if z.Op != ssaop.OpPPC64SRADconst || ssa.AuxIntToInt64(z.AuxInt) != 63 {
  4988  			break
  4989  		}
  4990  		x := z.Args[0]
  4991  		if !(z.Uses == 1) {
  4992  			break
  4993  		}
  4994  		v.Reset(ssaop.OpPPC64SRDconst)
  4995  		v.AuxInt = ssa.Int64ToAuxInt(63)
  4996  		v.AddArg(x)
  4997  		return true
  4998  	}
  4999  	return false
  5000  }
  5001  func rewriteValue_OpPPC64BRD(v *ssa.Value) bool {
  5002  	v_0 := v.Args[0]
  5003  	b := v.Block
  5004  	typ := &b.Func.Config.Types
  5005  	// match: (BRD x:(MOVDload [off] {sym} ptr mem))
  5006  	// cond: x.Uses == 1
  5007  	// result: @x.Block (MOVDBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
  5008  	for {
  5009  		x := v_0
  5010  		if x.Op != ssaop.OpPPC64MOVDload {
  5011  			break
  5012  		}
  5013  		off := ssa.AuxIntToInt32(x.AuxInt)
  5014  		sym := ssa.AuxToSym(x.Aux)
  5015  		mem := x.Args[1]
  5016  		ptr := x.Args[0]
  5017  		if !(x.Uses == 1) {
  5018  			break
  5019  		}
  5020  		b = x.Block
  5021  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDBRload, typ.UInt64)
  5022  		v.CopyOf(v0)
  5023  		v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  5024  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  5025  		v1.Aux = ssa.SymToAux(sym)
  5026  		v1.AddArg(ptr)
  5027  		v0.AddArg2(v1, mem)
  5028  		return true
  5029  	}
  5030  	// match: (BRD x:(MOVDloadidx ptr idx mem))
  5031  	// cond: x.Uses == 1
  5032  	// result: @x.Block (MOVDBRloadidx ptr idx mem)
  5033  	for {
  5034  		x := v_0
  5035  		if x.Op != ssaop.OpPPC64MOVDloadidx {
  5036  			break
  5037  		}
  5038  		mem := x.Args[2]
  5039  		ptr := x.Args[0]
  5040  		idx := x.Args[1]
  5041  		if !(x.Uses == 1) {
  5042  			break
  5043  		}
  5044  		b = x.Block
  5045  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDBRloadidx, typ.Int64)
  5046  		v.CopyOf(v0)
  5047  		v0.AddArg3(ptr, idx, mem)
  5048  		return true
  5049  	}
  5050  	return false
  5051  }
  5052  func rewriteValue_OpPPC64BRH(v *ssa.Value) bool {
  5053  	v_0 := v.Args[0]
  5054  	b := v.Block
  5055  	typ := &b.Func.Config.Types
  5056  	// match: (BRH x:(MOVHZload [off] {sym} ptr mem))
  5057  	// cond: x.Uses == 1
  5058  	// result: @x.Block (MOVHBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
  5059  	for {
  5060  		x := v_0
  5061  		if x.Op != ssaop.OpPPC64MOVHZload {
  5062  			break
  5063  		}
  5064  		off := ssa.AuxIntToInt32(x.AuxInt)
  5065  		sym := ssa.AuxToSym(x.Aux)
  5066  		mem := x.Args[1]
  5067  		ptr := x.Args[0]
  5068  		if !(x.Uses == 1) {
  5069  			break
  5070  		}
  5071  		b = x.Block
  5072  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVHBRload, typ.UInt16)
  5073  		v.CopyOf(v0)
  5074  		v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  5075  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  5076  		v1.Aux = ssa.SymToAux(sym)
  5077  		v1.AddArg(ptr)
  5078  		v0.AddArg2(v1, mem)
  5079  		return true
  5080  	}
  5081  	// match: (BRH x:(MOVHZloadidx ptr idx mem))
  5082  	// cond: x.Uses == 1
  5083  	// result: @x.Block (MOVHBRloadidx ptr idx mem)
  5084  	for {
  5085  		x := v_0
  5086  		if x.Op != ssaop.OpPPC64MOVHZloadidx {
  5087  			break
  5088  		}
  5089  		mem := x.Args[2]
  5090  		ptr := x.Args[0]
  5091  		idx := x.Args[1]
  5092  		if !(x.Uses == 1) {
  5093  			break
  5094  		}
  5095  		b = x.Block
  5096  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHBRloadidx, typ.Int16)
  5097  		v.CopyOf(v0)
  5098  		v0.AddArg3(ptr, idx, mem)
  5099  		return true
  5100  	}
  5101  	return false
  5102  }
  5103  func rewriteValue_OpPPC64BRW(v *ssa.Value) bool {
  5104  	v_0 := v.Args[0]
  5105  	b := v.Block
  5106  	typ := &b.Func.Config.Types
  5107  	// match: (BRW x:(MOVWZload [off] {sym} ptr mem))
  5108  	// cond: x.Uses == 1
  5109  	// result: @x.Block (MOVWBRload (MOVDaddr <ptr.Type> [off] {sym} ptr) mem)
  5110  	for {
  5111  		x := v_0
  5112  		if x.Op != ssaop.OpPPC64MOVWZload {
  5113  			break
  5114  		}
  5115  		off := ssa.AuxIntToInt32(x.AuxInt)
  5116  		sym := ssa.AuxToSym(x.Aux)
  5117  		mem := x.Args[1]
  5118  		ptr := x.Args[0]
  5119  		if !(x.Uses == 1) {
  5120  			break
  5121  		}
  5122  		b = x.Block
  5123  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVWBRload, typ.UInt32)
  5124  		v.CopyOf(v0)
  5125  		v1 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  5126  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  5127  		v1.Aux = ssa.SymToAux(sym)
  5128  		v1.AddArg(ptr)
  5129  		v0.AddArg2(v1, mem)
  5130  		return true
  5131  	}
  5132  	// match: (BRW x:(MOVWZloadidx ptr idx mem))
  5133  	// cond: x.Uses == 1
  5134  	// result: @x.Block (MOVWBRloadidx ptr idx mem)
  5135  	for {
  5136  		x := v_0
  5137  		if x.Op != ssaop.OpPPC64MOVWZloadidx {
  5138  			break
  5139  		}
  5140  		mem := x.Args[2]
  5141  		ptr := x.Args[0]
  5142  		idx := x.Args[1]
  5143  		if !(x.Uses == 1) {
  5144  			break
  5145  		}
  5146  		b = x.Block
  5147  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWBRloadidx, typ.Int32)
  5148  		v.CopyOf(v0)
  5149  		v0.AddArg3(ptr, idx, mem)
  5150  		return true
  5151  	}
  5152  	return false
  5153  }
  5154  func rewriteValue_OpPPC64CLRLSLDI(v *ssa.Value) bool {
  5155  	v_0 := v.Args[0]
  5156  	// match: (CLRLSLDI [c] (SRWconst [s] x))
  5157  	// cond: ssa.MergePPC64ClrlsldiSrw(int64(c),s) != 0
  5158  	// result: (RLWINM [ssa.MergePPC64ClrlsldiSrw(int64(c),s)] x)
  5159  	for {
  5160  		c := ssa.AuxIntToInt32(v.AuxInt)
  5161  		if v_0.Op != ssaop.OpPPC64SRWconst {
  5162  			break
  5163  		}
  5164  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  5165  		x := v_0.Args[0]
  5166  		if !(ssa.MergePPC64ClrlsldiSrw(int64(c), s) != 0) {
  5167  			break
  5168  		}
  5169  		v.Reset(ssaop.OpPPC64RLWINM)
  5170  		v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64ClrlsldiSrw(int64(c), s))
  5171  		v.AddArg(x)
  5172  		return true
  5173  	}
  5174  	// match: (CLRLSLDI [c] (SRDconst [s] x))
  5175  	// cond: mergePPC64ClrlsldiSrd(int64(c),s) != 0
  5176  	// result: (RLWINM [mergePPC64ClrlsldiSrd(int64(c),s)] x)
  5177  	for {
  5178  		c := ssa.AuxIntToInt32(v.AuxInt)
  5179  		if v_0.Op != ssaop.OpPPC64SRDconst {
  5180  			break
  5181  		}
  5182  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  5183  		x := v_0.Args[0]
  5184  		if !(mergePPC64ClrlsldiSrd(int64(c), s) != 0) {
  5185  			break
  5186  		}
  5187  		v.Reset(ssaop.OpPPC64RLWINM)
  5188  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64ClrlsldiSrd(int64(c), s))
  5189  		v.AddArg(x)
  5190  		return true
  5191  	}
  5192  	// match: (CLRLSLDI [c] i:(RLWINM [s] x))
  5193  	// cond: ssa.MergePPC64ClrlsldiRlwinm(c,s) != 0
  5194  	// result: (RLWINM [ssa.MergePPC64ClrlsldiRlwinm(c,s)] x)
  5195  	for {
  5196  		c := ssa.AuxIntToInt32(v.AuxInt)
  5197  		i := v_0
  5198  		if i.Op != ssaop.OpPPC64RLWINM {
  5199  			break
  5200  		}
  5201  		s := ssa.AuxIntToInt64(i.AuxInt)
  5202  		x := i.Args[0]
  5203  		if !(ssa.MergePPC64ClrlsldiRlwinm(c, s) != 0) {
  5204  			break
  5205  		}
  5206  		v.Reset(ssaop.OpPPC64RLWINM)
  5207  		v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64ClrlsldiRlwinm(c, s))
  5208  		v.AddArg(x)
  5209  		return true
  5210  	}
  5211  	return false
  5212  }
  5213  func rewriteValue_OpPPC64CMP(v *ssa.Value) bool {
  5214  	v_1 := v.Args[1]
  5215  	v_0 := v.Args[0]
  5216  	b := v.Block
  5217  	// match: (CMP x (MOVDconst [c]))
  5218  	// cond: ssa.Is16Bit(c)
  5219  	// result: (CMPconst x [c])
  5220  	for {
  5221  		x := v_0
  5222  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  5223  			break
  5224  		}
  5225  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5226  		if !(ssa.Is16Bit(c)) {
  5227  			break
  5228  		}
  5229  		v.Reset(ssaop.OpPPC64CMPconst)
  5230  		v.AuxInt = ssa.Int64ToAuxInt(c)
  5231  		v.AddArg(x)
  5232  		return true
  5233  	}
  5234  	// match: (CMP (MOVDconst [c]) y)
  5235  	// cond: ssa.Is16Bit(c)
  5236  	// result: (InvertFlags (CMPconst y [c]))
  5237  	for {
  5238  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5239  			break
  5240  		}
  5241  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5242  		y := v_1
  5243  		if !(ssa.Is16Bit(c)) {
  5244  			break
  5245  		}
  5246  		v.Reset(ssaop.OpPPC64InvertFlags)
  5247  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
  5248  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5249  		v0.AddArg(y)
  5250  		v.AddArg(v0)
  5251  		return true
  5252  	}
  5253  	// match: (CMP x y)
  5254  	// cond: ssa.CanonLessThan(x,y)
  5255  	// result: (InvertFlags (CMP y x))
  5256  	for {
  5257  		x := v_0
  5258  		y := v_1
  5259  		if !(ssa.CanonLessThan(x, y)) {
  5260  			break
  5261  		}
  5262  		v.Reset(ssaop.OpPPC64InvertFlags)
  5263  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMP, types.TypeFlags)
  5264  		v0.AddArg2(y, x)
  5265  		v.AddArg(v0)
  5266  		return true
  5267  	}
  5268  	return false
  5269  }
  5270  func rewriteValue_OpPPC64CMPU(v *ssa.Value) bool {
  5271  	v_1 := v.Args[1]
  5272  	v_0 := v.Args[0]
  5273  	b := v.Block
  5274  	// match: (CMPU x (MOVDconst [c]))
  5275  	// cond: isU16Bit(c)
  5276  	// result: (CMPUconst x [c])
  5277  	for {
  5278  		x := v_0
  5279  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  5280  			break
  5281  		}
  5282  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5283  		if !(isU16Bit(c)) {
  5284  			break
  5285  		}
  5286  		v.Reset(ssaop.OpPPC64CMPUconst)
  5287  		v.AuxInt = ssa.Int64ToAuxInt(c)
  5288  		v.AddArg(x)
  5289  		return true
  5290  	}
  5291  	// match: (CMPU (MOVDconst [c]) y)
  5292  	// cond: isU16Bit(c)
  5293  	// result: (InvertFlags (CMPUconst y [c]))
  5294  	for {
  5295  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5296  			break
  5297  		}
  5298  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5299  		y := v_1
  5300  		if !(isU16Bit(c)) {
  5301  			break
  5302  		}
  5303  		v.Reset(ssaop.OpPPC64InvertFlags)
  5304  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
  5305  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5306  		v0.AddArg(y)
  5307  		v.AddArg(v0)
  5308  		return true
  5309  	}
  5310  	// match: (CMPU x y)
  5311  	// cond: ssa.CanonLessThan(x,y)
  5312  	// result: (InvertFlags (CMPU y x))
  5313  	for {
  5314  		x := v_0
  5315  		y := v_1
  5316  		if !(ssa.CanonLessThan(x, y)) {
  5317  			break
  5318  		}
  5319  		v.Reset(ssaop.OpPPC64InvertFlags)
  5320  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPU, types.TypeFlags)
  5321  		v0.AddArg2(y, x)
  5322  		v.AddArg(v0)
  5323  		return true
  5324  	}
  5325  	return false
  5326  }
  5327  func rewriteValue_OpPPC64CMPUconst(v *ssa.Value) bool {
  5328  	v_0 := v.Args[0]
  5329  	// match: (CMPUconst [d] (ANDconst z [c]))
  5330  	// cond: uint64(d) > uint64(c)
  5331  	// result: (FlagLT)
  5332  	for {
  5333  		d := ssa.AuxIntToInt64(v.AuxInt)
  5334  		if v_0.Op != ssaop.OpPPC64ANDconst {
  5335  			break
  5336  		}
  5337  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5338  		if !(uint64(d) > uint64(c)) {
  5339  			break
  5340  		}
  5341  		v.Reset(ssaop.OpPPC64FlagLT)
  5342  		return true
  5343  	}
  5344  	// match: (CMPUconst (MOVDconst [x]) [y])
  5345  	// cond: x==y
  5346  	// result: (FlagEQ)
  5347  	for {
  5348  		y := ssa.AuxIntToInt64(v.AuxInt)
  5349  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5350  			break
  5351  		}
  5352  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5353  		if !(x == y) {
  5354  			break
  5355  		}
  5356  		v.Reset(ssaop.OpPPC64FlagEQ)
  5357  		return true
  5358  	}
  5359  	// match: (CMPUconst (MOVDconst [x]) [y])
  5360  	// cond: uint64(x)<uint64(y)
  5361  	// result: (FlagLT)
  5362  	for {
  5363  		y := ssa.AuxIntToInt64(v.AuxInt)
  5364  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5365  			break
  5366  		}
  5367  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5368  		if !(uint64(x) < uint64(y)) {
  5369  			break
  5370  		}
  5371  		v.Reset(ssaop.OpPPC64FlagLT)
  5372  		return true
  5373  	}
  5374  	// match: (CMPUconst (MOVDconst [x]) [y])
  5375  	// cond: uint64(x)>uint64(y)
  5376  	// result: (FlagGT)
  5377  	for {
  5378  		y := ssa.AuxIntToInt64(v.AuxInt)
  5379  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5380  			break
  5381  		}
  5382  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5383  		if !(uint64(x) > uint64(y)) {
  5384  			break
  5385  		}
  5386  		v.Reset(ssaop.OpPPC64FlagGT)
  5387  		return true
  5388  	}
  5389  	// match: (CMPUconst [0] a:(ANDconst [n] z))
  5390  	// result: (CMPconst [0] a)
  5391  	for {
  5392  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  5393  			break
  5394  		}
  5395  		a := v_0
  5396  		if a.Op != ssaop.OpPPC64ANDconst {
  5397  			break
  5398  		}
  5399  		v.Reset(ssaop.OpPPC64CMPconst)
  5400  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5401  		v.AddArg(a)
  5402  		return true
  5403  	}
  5404  	return false
  5405  }
  5406  func rewriteValue_OpPPC64CMPW(v *ssa.Value) bool {
  5407  	v_1 := v.Args[1]
  5408  	v_0 := v.Args[0]
  5409  	b := v.Block
  5410  	// match: (CMPW x (MOVWreg y))
  5411  	// result: (CMPW x y)
  5412  	for {
  5413  		x := v_0
  5414  		if v_1.Op != ssaop.OpPPC64MOVWreg {
  5415  			break
  5416  		}
  5417  		y := v_1.Args[0]
  5418  		v.Reset(ssaop.OpPPC64CMPW)
  5419  		v.AddArg2(x, y)
  5420  		return true
  5421  	}
  5422  	// match: (CMPW (MOVWreg x) y)
  5423  	// result: (CMPW x y)
  5424  	for {
  5425  		if v_0.Op != ssaop.OpPPC64MOVWreg {
  5426  			break
  5427  		}
  5428  		x := v_0.Args[0]
  5429  		y := v_1
  5430  		v.Reset(ssaop.OpPPC64CMPW)
  5431  		v.AddArg2(x, y)
  5432  		return true
  5433  	}
  5434  	// match: (CMPW x (MOVDconst [c]))
  5435  	// cond: ssa.Is16Bit(c)
  5436  	// result: (CMPWconst x [int32(c)])
  5437  	for {
  5438  		x := v_0
  5439  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  5440  			break
  5441  		}
  5442  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5443  		if !(ssa.Is16Bit(c)) {
  5444  			break
  5445  		}
  5446  		v.Reset(ssaop.OpPPC64CMPWconst)
  5447  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5448  		v.AddArg(x)
  5449  		return true
  5450  	}
  5451  	// match: (CMPW (MOVDconst [c]) y)
  5452  	// cond: ssa.Is16Bit(c)
  5453  	// result: (InvertFlags (CMPWconst y [int32(c)]))
  5454  	for {
  5455  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5456  			break
  5457  		}
  5458  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5459  		y := v_1
  5460  		if !(ssa.Is16Bit(c)) {
  5461  			break
  5462  		}
  5463  		v.Reset(ssaop.OpPPC64InvertFlags)
  5464  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWconst, types.TypeFlags)
  5465  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5466  		v0.AddArg(y)
  5467  		v.AddArg(v0)
  5468  		return true
  5469  	}
  5470  	// match: (CMPW x y)
  5471  	// cond: ssa.CanonLessThan(x,y)
  5472  	// result: (InvertFlags (CMPW y x))
  5473  	for {
  5474  		x := v_0
  5475  		y := v_1
  5476  		if !(ssa.CanonLessThan(x, y)) {
  5477  			break
  5478  		}
  5479  		v.Reset(ssaop.OpPPC64InvertFlags)
  5480  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPW, types.TypeFlags)
  5481  		v0.AddArg2(y, x)
  5482  		v.AddArg(v0)
  5483  		return true
  5484  	}
  5485  	return false
  5486  }
  5487  func rewriteValue_OpPPC64CMPWU(v *ssa.Value) bool {
  5488  	v_1 := v.Args[1]
  5489  	v_0 := v.Args[0]
  5490  	b := v.Block
  5491  	// match: (CMPWU x (MOVWZreg y))
  5492  	// result: (CMPWU x y)
  5493  	for {
  5494  		x := v_0
  5495  		if v_1.Op != ssaop.OpPPC64MOVWZreg {
  5496  			break
  5497  		}
  5498  		y := v_1.Args[0]
  5499  		v.Reset(ssaop.OpPPC64CMPWU)
  5500  		v.AddArg2(x, y)
  5501  		return true
  5502  	}
  5503  	// match: (CMPWU (MOVWZreg x) y)
  5504  	// result: (CMPWU x y)
  5505  	for {
  5506  		if v_0.Op != ssaop.OpPPC64MOVWZreg {
  5507  			break
  5508  		}
  5509  		x := v_0.Args[0]
  5510  		y := v_1
  5511  		v.Reset(ssaop.OpPPC64CMPWU)
  5512  		v.AddArg2(x, y)
  5513  		return true
  5514  	}
  5515  	// match: (CMPWU x (MOVDconst [c]))
  5516  	// cond: isU16Bit(c)
  5517  	// result: (CMPWUconst x [int32(c)])
  5518  	for {
  5519  		x := v_0
  5520  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  5521  			break
  5522  		}
  5523  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  5524  		if !(isU16Bit(c)) {
  5525  			break
  5526  		}
  5527  		v.Reset(ssaop.OpPPC64CMPWUconst)
  5528  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5529  		v.AddArg(x)
  5530  		return true
  5531  	}
  5532  	// match: (CMPWU (MOVDconst [c]) y)
  5533  	// cond: isU16Bit(c)
  5534  	// result: (InvertFlags (CMPWUconst y [int32(c)]))
  5535  	for {
  5536  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5537  			break
  5538  		}
  5539  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5540  		y := v_1
  5541  		if !(isU16Bit(c)) {
  5542  			break
  5543  		}
  5544  		v.Reset(ssaop.OpPPC64InvertFlags)
  5545  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
  5546  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5547  		v0.AddArg(y)
  5548  		v.AddArg(v0)
  5549  		return true
  5550  	}
  5551  	// match: (CMPWU x y)
  5552  	// cond: ssa.CanonLessThan(x,y)
  5553  	// result: (InvertFlags (CMPWU y x))
  5554  	for {
  5555  		x := v_0
  5556  		y := v_1
  5557  		if !(ssa.CanonLessThan(x, y)) {
  5558  			break
  5559  		}
  5560  		v.Reset(ssaop.OpPPC64InvertFlags)
  5561  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWU, types.TypeFlags)
  5562  		v0.AddArg2(y, x)
  5563  		v.AddArg(v0)
  5564  		return true
  5565  	}
  5566  	return false
  5567  }
  5568  func rewriteValue_OpPPC64CMPWUconst(v *ssa.Value) bool {
  5569  	v_0 := v.Args[0]
  5570  	// match: (CMPWUconst [d] (ANDconst z [c]))
  5571  	// cond: uint64(d) > uint64(c)
  5572  	// result: (FlagLT)
  5573  	for {
  5574  		d := ssa.AuxIntToInt32(v.AuxInt)
  5575  		if v_0.Op != ssaop.OpPPC64ANDconst {
  5576  			break
  5577  		}
  5578  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  5579  		if !(uint64(d) > uint64(c)) {
  5580  			break
  5581  		}
  5582  		v.Reset(ssaop.OpPPC64FlagLT)
  5583  		return true
  5584  	}
  5585  	// match: (CMPWUconst (MOVDconst [x]) [y])
  5586  	// cond: int32(x)==int32(y)
  5587  	// result: (FlagEQ)
  5588  	for {
  5589  		y := ssa.AuxIntToInt32(v.AuxInt)
  5590  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5591  			break
  5592  		}
  5593  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5594  		if !(int32(x) == int32(y)) {
  5595  			break
  5596  		}
  5597  		v.Reset(ssaop.OpPPC64FlagEQ)
  5598  		return true
  5599  	}
  5600  	// match: (CMPWUconst (MOVDconst [x]) [y])
  5601  	// cond: uint32(x)<uint32(y)
  5602  	// result: (FlagLT)
  5603  	for {
  5604  		y := ssa.AuxIntToInt32(v.AuxInt)
  5605  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5606  			break
  5607  		}
  5608  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5609  		if !(uint32(x) < uint32(y)) {
  5610  			break
  5611  		}
  5612  		v.Reset(ssaop.OpPPC64FlagLT)
  5613  		return true
  5614  	}
  5615  	// match: (CMPWUconst (MOVDconst [x]) [y])
  5616  	// cond: uint32(x)>uint32(y)
  5617  	// result: (FlagGT)
  5618  	for {
  5619  		y := ssa.AuxIntToInt32(v.AuxInt)
  5620  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5621  			break
  5622  		}
  5623  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5624  		if !(uint32(x) > uint32(y)) {
  5625  			break
  5626  		}
  5627  		v.Reset(ssaop.OpPPC64FlagGT)
  5628  		return true
  5629  	}
  5630  	// match: (CMPWUconst [0] a:(ANDconst [n] z))
  5631  	// result: (CMPconst [0] a)
  5632  	for {
  5633  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  5634  			break
  5635  		}
  5636  		a := v_0
  5637  		if a.Op != ssaop.OpPPC64ANDconst {
  5638  			break
  5639  		}
  5640  		v.Reset(ssaop.OpPPC64CMPconst)
  5641  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5642  		v.AddArg(a)
  5643  		return true
  5644  	}
  5645  	return false
  5646  }
  5647  func rewriteValue_OpPPC64CMPWconst(v *ssa.Value) bool {
  5648  	v_0 := v.Args[0]
  5649  	// match: (CMPWconst (MOVDconst [x]) [y])
  5650  	// cond: int32(x)==int32(y)
  5651  	// result: (FlagEQ)
  5652  	for {
  5653  		y := ssa.AuxIntToInt32(v.AuxInt)
  5654  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5655  			break
  5656  		}
  5657  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5658  		if !(int32(x) == int32(y)) {
  5659  			break
  5660  		}
  5661  		v.Reset(ssaop.OpPPC64FlagEQ)
  5662  		return true
  5663  	}
  5664  	// match: (CMPWconst (MOVDconst [x]) [y])
  5665  	// cond: int32(x)<int32(y)
  5666  	// result: (FlagLT)
  5667  	for {
  5668  		y := ssa.AuxIntToInt32(v.AuxInt)
  5669  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5670  			break
  5671  		}
  5672  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5673  		if !(int32(x) < int32(y)) {
  5674  			break
  5675  		}
  5676  		v.Reset(ssaop.OpPPC64FlagLT)
  5677  		return true
  5678  	}
  5679  	// match: (CMPWconst (MOVDconst [x]) [y])
  5680  	// cond: int32(x)>int32(y)
  5681  	// result: (FlagGT)
  5682  	for {
  5683  		y := ssa.AuxIntToInt32(v.AuxInt)
  5684  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5685  			break
  5686  		}
  5687  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5688  		if !(int32(x) > int32(y)) {
  5689  			break
  5690  		}
  5691  		v.Reset(ssaop.OpPPC64FlagGT)
  5692  		return true
  5693  	}
  5694  	// match: (CMPWconst [0] a:(ANDconst [n] z))
  5695  	// result: (CMPconst [0] a)
  5696  	for {
  5697  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  5698  			break
  5699  		}
  5700  		a := v_0
  5701  		if a.Op != ssaop.OpPPC64ANDconst {
  5702  			break
  5703  		}
  5704  		v.Reset(ssaop.OpPPC64CMPconst)
  5705  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5706  		v.AddArg(a)
  5707  		return true
  5708  	}
  5709  	return false
  5710  }
  5711  func rewriteValue_OpPPC64CMPconst(v *ssa.Value) bool {
  5712  	v_0 := v.Args[0]
  5713  	// match: (CMPconst (MOVDconst [x]) [y])
  5714  	// cond: x==y
  5715  	// result: (FlagEQ)
  5716  	for {
  5717  		y := ssa.AuxIntToInt64(v.AuxInt)
  5718  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5719  			break
  5720  		}
  5721  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5722  		if !(x == y) {
  5723  			break
  5724  		}
  5725  		v.Reset(ssaop.OpPPC64FlagEQ)
  5726  		return true
  5727  	}
  5728  	// match: (CMPconst (MOVDconst [x]) [y])
  5729  	// cond: x<y
  5730  	// result: (FlagLT)
  5731  	for {
  5732  		y := ssa.AuxIntToInt64(v.AuxInt)
  5733  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5734  			break
  5735  		}
  5736  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5737  		if !(x < y) {
  5738  			break
  5739  		}
  5740  		v.Reset(ssaop.OpPPC64FlagLT)
  5741  		return true
  5742  	}
  5743  	// match: (CMPconst (MOVDconst [x]) [y])
  5744  	// cond: x>y
  5745  	// result: (FlagGT)
  5746  	for {
  5747  		y := ssa.AuxIntToInt64(v.AuxInt)
  5748  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  5749  			break
  5750  		}
  5751  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5752  		if !(x > y) {
  5753  			break
  5754  		}
  5755  		v.Reset(ssaop.OpPPC64FlagGT)
  5756  		return true
  5757  	}
  5758  	return false
  5759  }
  5760  func rewriteValue_OpPPC64Equal(v *ssa.Value) bool {
  5761  	v_0 := v.Args[0]
  5762  	// match: (Equal (FlagEQ))
  5763  	// result: (MOVDconst [1])
  5764  	for {
  5765  		if v_0.Op != ssaop.OpPPC64FlagEQ {
  5766  			break
  5767  		}
  5768  		v.Reset(ssaop.OpPPC64MOVDconst)
  5769  		v.AuxInt = ssa.Int64ToAuxInt(1)
  5770  		return true
  5771  	}
  5772  	// match: (Equal (FlagLT))
  5773  	// result: (MOVDconst [0])
  5774  	for {
  5775  		if v_0.Op != ssaop.OpPPC64FlagLT {
  5776  			break
  5777  		}
  5778  		v.Reset(ssaop.OpPPC64MOVDconst)
  5779  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5780  		return true
  5781  	}
  5782  	// match: (Equal (FlagGT))
  5783  	// result: (MOVDconst [0])
  5784  	for {
  5785  		if v_0.Op != ssaop.OpPPC64FlagGT {
  5786  			break
  5787  		}
  5788  		v.Reset(ssaop.OpPPC64MOVDconst)
  5789  		v.AuxInt = ssa.Int64ToAuxInt(0)
  5790  		return true
  5791  	}
  5792  	// match: (Equal (InvertFlags x))
  5793  	// result: (Equal x)
  5794  	for {
  5795  		if v_0.Op != ssaop.OpPPC64InvertFlags {
  5796  			break
  5797  		}
  5798  		x := v_0.Args[0]
  5799  		v.Reset(ssaop.OpPPC64Equal)
  5800  		v.AddArg(x)
  5801  		return true
  5802  	}
  5803  	// match: (Equal cmp)
  5804  	// result: (SETBC [2] cmp)
  5805  	for {
  5806  		cmp := v_0
  5807  		v.Reset(ssaop.OpPPC64SETBC)
  5808  		v.AuxInt = ssa.Int32ToAuxInt(2)
  5809  		v.AddArg(cmp)
  5810  		return true
  5811  	}
  5812  }
  5813  func rewriteValue_OpPPC64FABS(v *ssa.Value) bool {
  5814  	v_0 := v.Args[0]
  5815  	// match: (FABS (FMOVDconst [x]))
  5816  	// result: (FMOVDconst [math.Abs(x)])
  5817  	for {
  5818  		if v_0.Op != ssaop.OpPPC64FMOVDconst {
  5819  			break
  5820  		}
  5821  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5822  		v.Reset(ssaop.OpPPC64FMOVDconst)
  5823  		v.AuxInt = ssa.Float64ToAuxInt(math.Abs(x))
  5824  		return true
  5825  	}
  5826  	return false
  5827  }
  5828  func rewriteValue_OpPPC64FADD(v *ssa.Value) bool {
  5829  	v_1 := v.Args[1]
  5830  	v_0 := v.Args[0]
  5831  	// match: (FADD (FMUL x y) z)
  5832  	// cond: x.Block.Func.UseFMA(v)
  5833  	// result: (FMADD x y z)
  5834  	for {
  5835  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5836  			if v_0.Op != ssaop.OpPPC64FMUL {
  5837  				continue
  5838  			}
  5839  			_ = v_0.Args[1]
  5840  			v_0_0 := v_0.Args[0]
  5841  			v_0_1 := v_0.Args[1]
  5842  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  5843  				x := v_0_0
  5844  				y := v_0_1
  5845  				z := v_1
  5846  				if !(x.Block.Func.UseFMA(v)) {
  5847  					continue
  5848  				}
  5849  				v.Reset(ssaop.OpPPC64FMADD)
  5850  				v.AddArg3(x, y, z)
  5851  				return true
  5852  			}
  5853  		}
  5854  		break
  5855  	}
  5856  	return false
  5857  }
  5858  func rewriteValue_OpPPC64FADDS(v *ssa.Value) bool {
  5859  	v_1 := v.Args[1]
  5860  	v_0 := v.Args[0]
  5861  	// match: (FADDS (FMULS x y) z)
  5862  	// cond: x.Block.Func.UseFMA(v)
  5863  	// result: (FMADDS x y z)
  5864  	for {
  5865  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5866  			if v_0.Op != ssaop.OpPPC64FMULS {
  5867  				continue
  5868  			}
  5869  			_ = v_0.Args[1]
  5870  			v_0_0 := v_0.Args[0]
  5871  			v_0_1 := v_0.Args[1]
  5872  			for _i1 := 0; _i1 <= 1; _i1, v_0_0, v_0_1 = _i1+1, v_0_1, v_0_0 {
  5873  				x := v_0_0
  5874  				y := v_0_1
  5875  				z := v_1
  5876  				if !(x.Block.Func.UseFMA(v)) {
  5877  					continue
  5878  				}
  5879  				v.Reset(ssaop.OpPPC64FMADDS)
  5880  				v.AddArg3(x, y, z)
  5881  				return true
  5882  			}
  5883  		}
  5884  		break
  5885  	}
  5886  	return false
  5887  }
  5888  func rewriteValue_OpPPC64FCEIL(v *ssa.Value) bool {
  5889  	v_0 := v.Args[0]
  5890  	// match: (FCEIL (FMOVDconst [x]))
  5891  	// result: (FMOVDconst [math.Ceil(x)])
  5892  	for {
  5893  		if v_0.Op != ssaop.OpPPC64FMOVDconst {
  5894  			break
  5895  		}
  5896  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5897  		v.Reset(ssaop.OpPPC64FMOVDconst)
  5898  		v.AuxInt = ssa.Float64ToAuxInt(math.Ceil(x))
  5899  		return true
  5900  	}
  5901  	return false
  5902  }
  5903  func rewriteValue_OpPPC64FFLOOR(v *ssa.Value) bool {
  5904  	v_0 := v.Args[0]
  5905  	// match: (FFLOOR (FMOVDconst [x]))
  5906  	// result: (FMOVDconst [math.Floor(x)])
  5907  	for {
  5908  		if v_0.Op != ssaop.OpPPC64FMOVDconst {
  5909  			break
  5910  		}
  5911  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5912  		v.Reset(ssaop.OpPPC64FMOVDconst)
  5913  		v.AuxInt = ssa.Float64ToAuxInt(math.Floor(x))
  5914  		return true
  5915  	}
  5916  	return false
  5917  }
  5918  func rewriteValue_OpPPC64FGreaterEqual(v *ssa.Value) bool {
  5919  	v_0 := v.Args[0]
  5920  	b := v.Block
  5921  	typ := &b.Func.Config.Types
  5922  	// match: (FGreaterEqual cmp)
  5923  	// result: (OR (SETBC [2] cmp) (SETBC [1] cmp))
  5924  	for {
  5925  		cmp := v_0
  5926  		v.Reset(ssaop.OpPPC64OR)
  5927  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SETBC, typ.Int32)
  5928  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  5929  		v0.AddArg(cmp)
  5930  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SETBC, typ.Int32)
  5931  		v1.AuxInt = ssa.Int32ToAuxInt(1)
  5932  		v1.AddArg(cmp)
  5933  		v.AddArg2(v0, v1)
  5934  		return true
  5935  	}
  5936  }
  5937  func rewriteValue_OpPPC64FGreaterThan(v *ssa.Value) bool {
  5938  	v_0 := v.Args[0]
  5939  	// match: (FGreaterThan cmp)
  5940  	// result: (SETBC [1] cmp)
  5941  	for {
  5942  		cmp := v_0
  5943  		v.Reset(ssaop.OpPPC64SETBC)
  5944  		v.AuxInt = ssa.Int32ToAuxInt(1)
  5945  		v.AddArg(cmp)
  5946  		return true
  5947  	}
  5948  }
  5949  func rewriteValue_OpPPC64FLessEqual(v *ssa.Value) bool {
  5950  	v_0 := v.Args[0]
  5951  	b := v.Block
  5952  	typ := &b.Func.Config.Types
  5953  	// match: (FLessEqual cmp)
  5954  	// result: (OR (SETBC [2] cmp) (SETBC [0] cmp))
  5955  	for {
  5956  		cmp := v_0
  5957  		v.Reset(ssaop.OpPPC64OR)
  5958  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SETBC, typ.Int32)
  5959  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  5960  		v0.AddArg(cmp)
  5961  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SETBC, typ.Int32)
  5962  		v1.AuxInt = ssa.Int32ToAuxInt(0)
  5963  		v1.AddArg(cmp)
  5964  		v.AddArg2(v0, v1)
  5965  		return true
  5966  	}
  5967  }
  5968  func rewriteValue_OpPPC64FLessThan(v *ssa.Value) bool {
  5969  	v_0 := v.Args[0]
  5970  	// match: (FLessThan cmp)
  5971  	// result: (SETBC [0] cmp)
  5972  	for {
  5973  		cmp := v_0
  5974  		v.Reset(ssaop.OpPPC64SETBC)
  5975  		v.AuxInt = ssa.Int32ToAuxInt(0)
  5976  		v.AddArg(cmp)
  5977  		return true
  5978  	}
  5979  }
  5980  func rewriteValue_OpPPC64FMOVDload(v *ssa.Value) bool {
  5981  	v_1 := v.Args[1]
  5982  	v_0 := v.Args[0]
  5983  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr x _))
  5984  	// result: (MTVSRD x)
  5985  	for {
  5986  		off := ssa.AuxIntToInt32(v.AuxInt)
  5987  		sym := ssa.AuxToSym(v.Aux)
  5988  		ptr := v_0
  5989  		if v_1.Op != ssaop.OpPPC64MOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  5990  			break
  5991  		}
  5992  		x := v_1.Args[1]
  5993  		if ptr != v_1.Args[0] {
  5994  			break
  5995  		}
  5996  		v.Reset(ssaop.OpPPC64MTVSRD)
  5997  		v.AddArg(x)
  5998  		return true
  5999  	}
  6000  	// match: (FMOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  6001  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  6002  	// result: (FMOVDload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
  6003  	for {
  6004  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6005  		sym1 := ssa.AuxToSym(v.Aux)
  6006  		p := v_0
  6007  		if p.Op != ssaop.OpPPC64MOVDaddr {
  6008  			break
  6009  		}
  6010  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  6011  		sym2 := ssa.AuxToSym(p.Aux)
  6012  		ptr := p.Args[0]
  6013  		mem := v_1
  6014  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  6015  			break
  6016  		}
  6017  		v.Reset(ssaop.OpPPC64FMOVDload)
  6018  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6019  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  6020  		v.AddArg2(ptr, mem)
  6021  		return true
  6022  	}
  6023  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  6024  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  6025  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  6026  	for {
  6027  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6028  		sym := ssa.AuxToSym(v.Aux)
  6029  		if v_0.Op != ssaop.OpPPC64ADDconst {
  6030  			break
  6031  		}
  6032  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6033  		ptr := v_0.Args[0]
  6034  		mem := v_1
  6035  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  6036  			break
  6037  		}
  6038  		v.Reset(ssaop.OpPPC64FMOVDload)
  6039  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  6040  		v.Aux = ssa.SymToAux(sym)
  6041  		v.AddArg2(ptr, mem)
  6042  		return true
  6043  	}
  6044  	return false
  6045  }
  6046  func rewriteValue_OpPPC64FMOVDstore(v *ssa.Value) bool {
  6047  	v_2 := v.Args[2]
  6048  	v_1 := v.Args[1]
  6049  	v_0 := v.Args[0]
  6050  	// match: (FMOVDstore [off] {sym} ptr (MTVSRD x) mem)
  6051  	// result: (MOVDstore [off] {sym} ptr x mem)
  6052  	for {
  6053  		off := ssa.AuxIntToInt32(v.AuxInt)
  6054  		sym := ssa.AuxToSym(v.Aux)
  6055  		ptr := v_0
  6056  		if v_1.Op != ssaop.OpPPC64MTVSRD {
  6057  			break
  6058  		}
  6059  		x := v_1.Args[0]
  6060  		mem := v_2
  6061  		v.Reset(ssaop.OpPPC64MOVDstore)
  6062  		v.AuxInt = ssa.Int32ToAuxInt(off)
  6063  		v.Aux = ssa.SymToAux(sym)
  6064  		v.AddArg3(ptr, x, mem)
  6065  		return true
  6066  	}
  6067  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6068  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  6069  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  6070  	for {
  6071  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6072  		sym := ssa.AuxToSym(v.Aux)
  6073  		if v_0.Op != ssaop.OpPPC64ADDconst {
  6074  			break
  6075  		}
  6076  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6077  		ptr := v_0.Args[0]
  6078  		val := v_1
  6079  		mem := v_2
  6080  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  6081  			break
  6082  		}
  6083  		v.Reset(ssaop.OpPPC64FMOVDstore)
  6084  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  6085  		v.Aux = ssa.SymToAux(sym)
  6086  		v.AddArg3(ptr, val, mem)
  6087  		return true
  6088  	}
  6089  	// match: (FMOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  6090  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  6091  	// result: (FMOVDstore [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  6092  	for {
  6093  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6094  		sym1 := ssa.AuxToSym(v.Aux)
  6095  		p := v_0
  6096  		if p.Op != ssaop.OpPPC64MOVDaddr {
  6097  			break
  6098  		}
  6099  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  6100  		sym2 := ssa.AuxToSym(p.Aux)
  6101  		ptr := p.Args[0]
  6102  		val := v_1
  6103  		mem := v_2
  6104  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  6105  			break
  6106  		}
  6107  		v.Reset(ssaop.OpPPC64FMOVDstore)
  6108  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6109  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  6110  		v.AddArg3(ptr, val, mem)
  6111  		return true
  6112  	}
  6113  	return false
  6114  }
  6115  func rewriteValue_OpPPC64FMOVSload(v *ssa.Value) bool {
  6116  	v_1 := v.Args[1]
  6117  	v_0 := v.Args[0]
  6118  	// match: (FMOVSload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  6119  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  6120  	// result: (FMOVSload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
  6121  	for {
  6122  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6123  		sym1 := ssa.AuxToSym(v.Aux)
  6124  		p := v_0
  6125  		if p.Op != ssaop.OpPPC64MOVDaddr {
  6126  			break
  6127  		}
  6128  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  6129  		sym2 := ssa.AuxToSym(p.Aux)
  6130  		ptr := p.Args[0]
  6131  		mem := v_1
  6132  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  6133  			break
  6134  		}
  6135  		v.Reset(ssaop.OpPPC64FMOVSload)
  6136  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6137  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  6138  		v.AddArg2(ptr, mem)
  6139  		return true
  6140  	}
  6141  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  6142  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  6143  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  6144  	for {
  6145  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6146  		sym := ssa.AuxToSym(v.Aux)
  6147  		if v_0.Op != ssaop.OpPPC64ADDconst {
  6148  			break
  6149  		}
  6150  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6151  		ptr := v_0.Args[0]
  6152  		mem := v_1
  6153  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  6154  			break
  6155  		}
  6156  		v.Reset(ssaop.OpPPC64FMOVSload)
  6157  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  6158  		v.Aux = ssa.SymToAux(sym)
  6159  		v.AddArg2(ptr, mem)
  6160  		return true
  6161  	}
  6162  	return false
  6163  }
  6164  func rewriteValue_OpPPC64FMOVSstore(v *ssa.Value) bool {
  6165  	v_2 := v.Args[2]
  6166  	v_1 := v.Args[1]
  6167  	v_0 := v.Args[0]
  6168  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  6169  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  6170  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  6171  	for {
  6172  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6173  		sym := ssa.AuxToSym(v.Aux)
  6174  		if v_0.Op != ssaop.OpPPC64ADDconst {
  6175  			break
  6176  		}
  6177  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6178  		ptr := v_0.Args[0]
  6179  		val := v_1
  6180  		mem := v_2
  6181  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  6182  			break
  6183  		}
  6184  		v.Reset(ssaop.OpPPC64FMOVSstore)
  6185  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  6186  		v.Aux = ssa.SymToAux(sym)
  6187  		v.AddArg3(ptr, val, mem)
  6188  		return true
  6189  	}
  6190  	// match: (FMOVSstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  6191  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  6192  	// result: (FMOVSstore [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  6193  	for {
  6194  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6195  		sym1 := ssa.AuxToSym(v.Aux)
  6196  		p := v_0
  6197  		if p.Op != ssaop.OpPPC64MOVDaddr {
  6198  			break
  6199  		}
  6200  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  6201  		sym2 := ssa.AuxToSym(p.Aux)
  6202  		ptr := p.Args[0]
  6203  		val := v_1
  6204  		mem := v_2
  6205  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  6206  			break
  6207  		}
  6208  		v.Reset(ssaop.OpPPC64FMOVSstore)
  6209  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6210  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  6211  		v.AddArg3(ptr, val, mem)
  6212  		return true
  6213  	}
  6214  	return false
  6215  }
  6216  func rewriteValue_OpPPC64FNEG(v *ssa.Value) bool {
  6217  	v_0 := v.Args[0]
  6218  	// match: (FNEG (FABS x))
  6219  	// result: (FNABS x)
  6220  	for {
  6221  		if v_0.Op != ssaop.OpPPC64FABS {
  6222  			break
  6223  		}
  6224  		x := v_0.Args[0]
  6225  		v.Reset(ssaop.OpPPC64FNABS)
  6226  		v.AddArg(x)
  6227  		return true
  6228  	}
  6229  	// match: (FNEG (FNABS x))
  6230  	// result: (FABS x)
  6231  	for {
  6232  		if v_0.Op != ssaop.OpPPC64FNABS {
  6233  			break
  6234  		}
  6235  		x := v_0.Args[0]
  6236  		v.Reset(ssaop.OpPPC64FABS)
  6237  		v.AddArg(x)
  6238  		return true
  6239  	}
  6240  	return false
  6241  }
  6242  func rewriteValue_OpPPC64FSQRT(v *ssa.Value) bool {
  6243  	v_0 := v.Args[0]
  6244  	// match: (FSQRT (FMOVDconst [x]))
  6245  	// cond: x >= 0
  6246  	// result: (FMOVDconst [math.Sqrt(x)])
  6247  	for {
  6248  		if v_0.Op != ssaop.OpPPC64FMOVDconst {
  6249  			break
  6250  		}
  6251  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  6252  		if !(x >= 0) {
  6253  			break
  6254  		}
  6255  		v.Reset(ssaop.OpPPC64FMOVDconst)
  6256  		v.AuxInt = ssa.Float64ToAuxInt(math.Sqrt(x))
  6257  		return true
  6258  	}
  6259  	return false
  6260  }
  6261  func rewriteValue_OpPPC64FSUB(v *ssa.Value) bool {
  6262  	v_1 := v.Args[1]
  6263  	v_0 := v.Args[0]
  6264  	// match: (FSUB (FMUL x y) z)
  6265  	// cond: x.Block.Func.UseFMA(v)
  6266  	// result: (FMSUB x y z)
  6267  	for {
  6268  		if v_0.Op != ssaop.OpPPC64FMUL {
  6269  			break
  6270  		}
  6271  		_ = v_0.Args[1]
  6272  		v_0_0 := v_0.Args[0]
  6273  		v_0_1 := v_0.Args[1]
  6274  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6275  			x := v_0_0
  6276  			y := v_0_1
  6277  			z := v_1
  6278  			if !(x.Block.Func.UseFMA(v)) {
  6279  				continue
  6280  			}
  6281  			v.Reset(ssaop.OpPPC64FMSUB)
  6282  			v.AddArg3(x, y, z)
  6283  			return true
  6284  		}
  6285  		break
  6286  	}
  6287  	return false
  6288  }
  6289  func rewriteValue_OpPPC64FSUBS(v *ssa.Value) bool {
  6290  	v_1 := v.Args[1]
  6291  	v_0 := v.Args[0]
  6292  	// match: (FSUBS (FMULS x y) z)
  6293  	// cond: x.Block.Func.UseFMA(v)
  6294  	// result: (FMSUBS x y z)
  6295  	for {
  6296  		if v_0.Op != ssaop.OpPPC64FMULS {
  6297  			break
  6298  		}
  6299  		_ = v_0.Args[1]
  6300  		v_0_0 := v_0.Args[0]
  6301  		v_0_1 := v_0.Args[1]
  6302  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6303  			x := v_0_0
  6304  			y := v_0_1
  6305  			z := v_1
  6306  			if !(x.Block.Func.UseFMA(v)) {
  6307  				continue
  6308  			}
  6309  			v.Reset(ssaop.OpPPC64FMSUBS)
  6310  			v.AddArg3(x, y, z)
  6311  			return true
  6312  		}
  6313  		break
  6314  	}
  6315  	return false
  6316  }
  6317  func rewriteValue_OpPPC64FTRUNC(v *ssa.Value) bool {
  6318  	v_0 := v.Args[0]
  6319  	// match: (FTRUNC (FMOVDconst [x]))
  6320  	// result: (FMOVDconst [math.Trunc(x)])
  6321  	for {
  6322  		if v_0.Op != ssaop.OpPPC64FMOVDconst {
  6323  			break
  6324  		}
  6325  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  6326  		v.Reset(ssaop.OpPPC64FMOVDconst)
  6327  		v.AuxInt = ssa.Float64ToAuxInt(math.Trunc(x))
  6328  		return true
  6329  	}
  6330  	return false
  6331  }
  6332  func rewriteValue_OpPPC64GreaterEqual(v *ssa.Value) bool {
  6333  	v_0 := v.Args[0]
  6334  	// match: (GreaterEqual (FlagEQ))
  6335  	// result: (MOVDconst [1])
  6336  	for {
  6337  		if v_0.Op != ssaop.OpPPC64FlagEQ {
  6338  			break
  6339  		}
  6340  		v.Reset(ssaop.OpPPC64MOVDconst)
  6341  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6342  		return true
  6343  	}
  6344  	// match: (GreaterEqual (FlagLT))
  6345  	// result: (MOVDconst [0])
  6346  	for {
  6347  		if v_0.Op != ssaop.OpPPC64FlagLT {
  6348  			break
  6349  		}
  6350  		v.Reset(ssaop.OpPPC64MOVDconst)
  6351  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6352  		return true
  6353  	}
  6354  	// match: (GreaterEqual (FlagGT))
  6355  	// result: (MOVDconst [1])
  6356  	for {
  6357  		if v_0.Op != ssaop.OpPPC64FlagGT {
  6358  			break
  6359  		}
  6360  		v.Reset(ssaop.OpPPC64MOVDconst)
  6361  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6362  		return true
  6363  	}
  6364  	// match: (GreaterEqual (InvertFlags x))
  6365  	// result: (LessEqual x)
  6366  	for {
  6367  		if v_0.Op != ssaop.OpPPC64InvertFlags {
  6368  			break
  6369  		}
  6370  		x := v_0.Args[0]
  6371  		v.Reset(ssaop.OpPPC64LessEqual)
  6372  		v.AddArg(x)
  6373  		return true
  6374  	}
  6375  	// match: (GreaterEqual cmp)
  6376  	// result: (SETBCR [0] cmp)
  6377  	for {
  6378  		cmp := v_0
  6379  		v.Reset(ssaop.OpPPC64SETBCR)
  6380  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6381  		v.AddArg(cmp)
  6382  		return true
  6383  	}
  6384  }
  6385  func rewriteValue_OpPPC64GreaterThan(v *ssa.Value) bool {
  6386  	v_0 := v.Args[0]
  6387  	// match: (GreaterThan (FlagEQ))
  6388  	// result: (MOVDconst [0])
  6389  	for {
  6390  		if v_0.Op != ssaop.OpPPC64FlagEQ {
  6391  			break
  6392  		}
  6393  		v.Reset(ssaop.OpPPC64MOVDconst)
  6394  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6395  		return true
  6396  	}
  6397  	// match: (GreaterThan (FlagLT))
  6398  	// result: (MOVDconst [0])
  6399  	for {
  6400  		if v_0.Op != ssaop.OpPPC64FlagLT {
  6401  			break
  6402  		}
  6403  		v.Reset(ssaop.OpPPC64MOVDconst)
  6404  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6405  		return true
  6406  	}
  6407  	// match: (GreaterThan (FlagGT))
  6408  	// result: (MOVDconst [1])
  6409  	for {
  6410  		if v_0.Op != ssaop.OpPPC64FlagGT {
  6411  			break
  6412  		}
  6413  		v.Reset(ssaop.OpPPC64MOVDconst)
  6414  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6415  		return true
  6416  	}
  6417  	// match: (GreaterThan (InvertFlags x))
  6418  	// result: (LessThan x)
  6419  	for {
  6420  		if v_0.Op != ssaop.OpPPC64InvertFlags {
  6421  			break
  6422  		}
  6423  		x := v_0.Args[0]
  6424  		v.Reset(ssaop.OpPPC64LessThan)
  6425  		v.AddArg(x)
  6426  		return true
  6427  	}
  6428  	// match: (GreaterThan cmp)
  6429  	// result: (SETBC [1] cmp)
  6430  	for {
  6431  		cmp := v_0
  6432  		v.Reset(ssaop.OpPPC64SETBC)
  6433  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6434  		v.AddArg(cmp)
  6435  		return true
  6436  	}
  6437  }
  6438  func rewriteValue_OpPPC64ISEL(v *ssa.Value) bool {
  6439  	v_2 := v.Args[2]
  6440  	v_1 := v.Args[1]
  6441  	v_0 := v.Args[0]
  6442  	// match: (ISEL [6] x y (CMPconst [0] (ANDconst [1] (SETBC [c] cmp))))
  6443  	// result: (ISEL [c] x y cmp)
  6444  	for {
  6445  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6446  			break
  6447  		}
  6448  		x := v_0
  6449  		y := v_1
  6450  		if v_2.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_2.AuxInt) != 0 {
  6451  			break
  6452  		}
  6453  		v_2_0 := v_2.Args[0]
  6454  		if v_2_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_2_0.AuxInt) != 1 {
  6455  			break
  6456  		}
  6457  		v_2_0_0 := v_2_0.Args[0]
  6458  		if v_2_0_0.Op != ssaop.OpPPC64SETBC {
  6459  			break
  6460  		}
  6461  		c := ssa.AuxIntToInt32(v_2_0_0.AuxInt)
  6462  		cmp := v_2_0_0.Args[0]
  6463  		v.Reset(ssaop.OpPPC64ISEL)
  6464  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6465  		v.AddArg3(x, y, cmp)
  6466  		return true
  6467  	}
  6468  	// match: (ISEL [6] x y (CMPconst [0] (SETBC [c] cmp)))
  6469  	// result: (ISEL [c] x y cmp)
  6470  	for {
  6471  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6472  			break
  6473  		}
  6474  		x := v_0
  6475  		y := v_1
  6476  		if v_2.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_2.AuxInt) != 0 {
  6477  			break
  6478  		}
  6479  		v_2_0 := v_2.Args[0]
  6480  		if v_2_0.Op != ssaop.OpPPC64SETBC {
  6481  			break
  6482  		}
  6483  		c := ssa.AuxIntToInt32(v_2_0.AuxInt)
  6484  		cmp := v_2_0.Args[0]
  6485  		v.Reset(ssaop.OpPPC64ISEL)
  6486  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6487  		v.AddArg3(x, y, cmp)
  6488  		return true
  6489  	}
  6490  	// match: (ISEL [6] x y (CMPWconst [0] (SETBC [c] cmp)))
  6491  	// result: (ISEL [c] x y cmp)
  6492  	for {
  6493  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6494  			break
  6495  		}
  6496  		x := v_0
  6497  		y := v_1
  6498  		if v_2.Op != ssaop.OpPPC64CMPWconst || ssa.AuxIntToInt32(v_2.AuxInt) != 0 {
  6499  			break
  6500  		}
  6501  		v_2_0 := v_2.Args[0]
  6502  		if v_2_0.Op != ssaop.OpPPC64SETBC {
  6503  			break
  6504  		}
  6505  		c := ssa.AuxIntToInt32(v_2_0.AuxInt)
  6506  		cmp := v_2_0.Args[0]
  6507  		v.Reset(ssaop.OpPPC64ISEL)
  6508  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6509  		v.AddArg3(x, y, cmp)
  6510  		return true
  6511  	}
  6512  	// match: (ISEL [6] x y (CMPconst [0] (SETBCR [c] cmp)))
  6513  	// result: (ISEL [c+4] x y cmp)
  6514  	for {
  6515  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6516  			break
  6517  		}
  6518  		x := v_0
  6519  		y := v_1
  6520  		if v_2.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_2.AuxInt) != 0 {
  6521  			break
  6522  		}
  6523  		v_2_0 := v_2.Args[0]
  6524  		if v_2_0.Op != ssaop.OpPPC64SETBCR {
  6525  			break
  6526  		}
  6527  		c := ssa.AuxIntToInt32(v_2_0.AuxInt)
  6528  		cmp := v_2_0.Args[0]
  6529  		v.Reset(ssaop.OpPPC64ISEL)
  6530  		v.AuxInt = ssa.Int32ToAuxInt(c + 4)
  6531  		v.AddArg3(x, y, cmp)
  6532  		return true
  6533  	}
  6534  	// match: (ISEL [6] x y (CMPWconst [0] (SETBCR [c] cmp)))
  6535  	// result: (ISEL [c+4] x y cmp)
  6536  	for {
  6537  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6538  			break
  6539  		}
  6540  		x := v_0
  6541  		y := v_1
  6542  		if v_2.Op != ssaop.OpPPC64CMPWconst || ssa.AuxIntToInt32(v_2.AuxInt) != 0 {
  6543  			break
  6544  		}
  6545  		v_2_0 := v_2.Args[0]
  6546  		if v_2_0.Op != ssaop.OpPPC64SETBCR {
  6547  			break
  6548  		}
  6549  		c := ssa.AuxIntToInt32(v_2_0.AuxInt)
  6550  		cmp := v_2_0.Args[0]
  6551  		v.Reset(ssaop.OpPPC64ISEL)
  6552  		v.AuxInt = ssa.Int32ToAuxInt(c + 4)
  6553  		v.AddArg3(x, y, cmp)
  6554  		return true
  6555  	}
  6556  	// match: (ISEL [2] x _ (FlagEQ))
  6557  	// result: x
  6558  	for {
  6559  		if ssa.AuxIntToInt32(v.AuxInt) != 2 {
  6560  			break
  6561  		}
  6562  		x := v_0
  6563  		if v_2.Op != ssaop.OpPPC64FlagEQ {
  6564  			break
  6565  		}
  6566  		v.CopyOf(x)
  6567  		return true
  6568  	}
  6569  	// match: (ISEL [2] _ y (FlagLT))
  6570  	// result: y
  6571  	for {
  6572  		if ssa.AuxIntToInt32(v.AuxInt) != 2 {
  6573  			break
  6574  		}
  6575  		y := v_1
  6576  		if v_2.Op != ssaop.OpPPC64FlagLT {
  6577  			break
  6578  		}
  6579  		v.CopyOf(y)
  6580  		return true
  6581  	}
  6582  	// match: (ISEL [2] _ y (FlagGT))
  6583  	// result: y
  6584  	for {
  6585  		if ssa.AuxIntToInt32(v.AuxInt) != 2 {
  6586  			break
  6587  		}
  6588  		y := v_1
  6589  		if v_2.Op != ssaop.OpPPC64FlagGT {
  6590  			break
  6591  		}
  6592  		v.CopyOf(y)
  6593  		return true
  6594  	}
  6595  	// match: (ISEL [6] _ y (FlagEQ))
  6596  	// result: y
  6597  	for {
  6598  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6599  			break
  6600  		}
  6601  		y := v_1
  6602  		if v_2.Op != ssaop.OpPPC64FlagEQ {
  6603  			break
  6604  		}
  6605  		v.CopyOf(y)
  6606  		return true
  6607  	}
  6608  	// match: (ISEL [6] x _ (FlagLT))
  6609  	// result: x
  6610  	for {
  6611  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6612  			break
  6613  		}
  6614  		x := v_0
  6615  		if v_2.Op != ssaop.OpPPC64FlagLT {
  6616  			break
  6617  		}
  6618  		v.CopyOf(x)
  6619  		return true
  6620  	}
  6621  	// match: (ISEL [6] x _ (FlagGT))
  6622  	// result: x
  6623  	for {
  6624  		if ssa.AuxIntToInt32(v.AuxInt) != 6 {
  6625  			break
  6626  		}
  6627  		x := v_0
  6628  		if v_2.Op != ssaop.OpPPC64FlagGT {
  6629  			break
  6630  		}
  6631  		v.CopyOf(x)
  6632  		return true
  6633  	}
  6634  	// match: (ISEL [0] _ y (FlagEQ))
  6635  	// result: y
  6636  	for {
  6637  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  6638  			break
  6639  		}
  6640  		y := v_1
  6641  		if v_2.Op != ssaop.OpPPC64FlagEQ {
  6642  			break
  6643  		}
  6644  		v.CopyOf(y)
  6645  		return true
  6646  	}
  6647  	// match: (ISEL [0] _ y (FlagGT))
  6648  	// result: y
  6649  	for {
  6650  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  6651  			break
  6652  		}
  6653  		y := v_1
  6654  		if v_2.Op != ssaop.OpPPC64FlagGT {
  6655  			break
  6656  		}
  6657  		v.CopyOf(y)
  6658  		return true
  6659  	}
  6660  	// match: (ISEL [0] x _ (FlagLT))
  6661  	// result: x
  6662  	for {
  6663  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  6664  			break
  6665  		}
  6666  		x := v_0
  6667  		if v_2.Op != ssaop.OpPPC64FlagLT {
  6668  			break
  6669  		}
  6670  		v.CopyOf(x)
  6671  		return true
  6672  	}
  6673  	// match: (ISEL [5] _ x (FlagEQ))
  6674  	// result: x
  6675  	for {
  6676  		if ssa.AuxIntToInt32(v.AuxInt) != 5 {
  6677  			break
  6678  		}
  6679  		x := v_1
  6680  		if v_2.Op != ssaop.OpPPC64FlagEQ {
  6681  			break
  6682  		}
  6683  		v.CopyOf(x)
  6684  		return true
  6685  	}
  6686  	// match: (ISEL [5] _ x (FlagLT))
  6687  	// result: x
  6688  	for {
  6689  		if ssa.AuxIntToInt32(v.AuxInt) != 5 {
  6690  			break
  6691  		}
  6692  		x := v_1
  6693  		if v_2.Op != ssaop.OpPPC64FlagLT {
  6694  			break
  6695  		}
  6696  		v.CopyOf(x)
  6697  		return true
  6698  	}
  6699  	// match: (ISEL [5] y _ (FlagGT))
  6700  	// result: y
  6701  	for {
  6702  		if ssa.AuxIntToInt32(v.AuxInt) != 5 {
  6703  			break
  6704  		}
  6705  		y := v_0
  6706  		if v_2.Op != ssaop.OpPPC64FlagGT {
  6707  			break
  6708  		}
  6709  		v.CopyOf(y)
  6710  		return true
  6711  	}
  6712  	// match: (ISEL [1] _ y (FlagEQ))
  6713  	// result: y
  6714  	for {
  6715  		if ssa.AuxIntToInt32(v.AuxInt) != 1 {
  6716  			break
  6717  		}
  6718  		y := v_1
  6719  		if v_2.Op != ssaop.OpPPC64FlagEQ {
  6720  			break
  6721  		}
  6722  		v.CopyOf(y)
  6723  		return true
  6724  	}
  6725  	// match: (ISEL [1] _ y (FlagLT))
  6726  	// result: y
  6727  	for {
  6728  		if ssa.AuxIntToInt32(v.AuxInt) != 1 {
  6729  			break
  6730  		}
  6731  		y := v_1
  6732  		if v_2.Op != ssaop.OpPPC64FlagLT {
  6733  			break
  6734  		}
  6735  		v.CopyOf(y)
  6736  		return true
  6737  	}
  6738  	// match: (ISEL [1] x _ (FlagGT))
  6739  	// result: x
  6740  	for {
  6741  		if ssa.AuxIntToInt32(v.AuxInt) != 1 {
  6742  			break
  6743  		}
  6744  		x := v_0
  6745  		if v_2.Op != ssaop.OpPPC64FlagGT {
  6746  			break
  6747  		}
  6748  		v.CopyOf(x)
  6749  		return true
  6750  	}
  6751  	// match: (ISEL [4] x _ (FlagEQ))
  6752  	// result: x
  6753  	for {
  6754  		if ssa.AuxIntToInt32(v.AuxInt) != 4 {
  6755  			break
  6756  		}
  6757  		x := v_0
  6758  		if v_2.Op != ssaop.OpPPC64FlagEQ {
  6759  			break
  6760  		}
  6761  		v.CopyOf(x)
  6762  		return true
  6763  	}
  6764  	// match: (ISEL [4] x _ (FlagGT))
  6765  	// result: x
  6766  	for {
  6767  		if ssa.AuxIntToInt32(v.AuxInt) != 4 {
  6768  			break
  6769  		}
  6770  		x := v_0
  6771  		if v_2.Op != ssaop.OpPPC64FlagGT {
  6772  			break
  6773  		}
  6774  		v.CopyOf(x)
  6775  		return true
  6776  	}
  6777  	// match: (ISEL [4] _ y (FlagLT))
  6778  	// result: y
  6779  	for {
  6780  		if ssa.AuxIntToInt32(v.AuxInt) != 4 {
  6781  			break
  6782  		}
  6783  		y := v_1
  6784  		if v_2.Op != ssaop.OpPPC64FlagLT {
  6785  			break
  6786  		}
  6787  		v.CopyOf(y)
  6788  		return true
  6789  	}
  6790  	// match: (ISEL [n] x y (InvertFlags bool))
  6791  	// cond: n%4 == 0
  6792  	// result: (ISEL [n+1] x y bool)
  6793  	for {
  6794  		n := ssa.AuxIntToInt32(v.AuxInt)
  6795  		x := v_0
  6796  		y := v_1
  6797  		if v_2.Op != ssaop.OpPPC64InvertFlags {
  6798  			break
  6799  		}
  6800  		bool := v_2.Args[0]
  6801  		if !(n%4 == 0) {
  6802  			break
  6803  		}
  6804  		v.Reset(ssaop.OpPPC64ISEL)
  6805  		v.AuxInt = ssa.Int32ToAuxInt(n + 1)
  6806  		v.AddArg3(x, y, bool)
  6807  		return true
  6808  	}
  6809  	// match: (ISEL [n] x y (InvertFlags bool))
  6810  	// cond: n%4 == 1
  6811  	// result: (ISEL [n-1] x y bool)
  6812  	for {
  6813  		n := ssa.AuxIntToInt32(v.AuxInt)
  6814  		x := v_0
  6815  		y := v_1
  6816  		if v_2.Op != ssaop.OpPPC64InvertFlags {
  6817  			break
  6818  		}
  6819  		bool := v_2.Args[0]
  6820  		if !(n%4 == 1) {
  6821  			break
  6822  		}
  6823  		v.Reset(ssaop.OpPPC64ISEL)
  6824  		v.AuxInt = ssa.Int32ToAuxInt(n - 1)
  6825  		v.AddArg3(x, y, bool)
  6826  		return true
  6827  	}
  6828  	// match: (ISEL [n] x y (InvertFlags bool))
  6829  	// cond: n%4 == 2
  6830  	// result: (ISEL [n] x y bool)
  6831  	for {
  6832  		n := ssa.AuxIntToInt32(v.AuxInt)
  6833  		x := v_0
  6834  		y := v_1
  6835  		if v_2.Op != ssaop.OpPPC64InvertFlags {
  6836  			break
  6837  		}
  6838  		bool := v_2.Args[0]
  6839  		if !(n%4 == 2) {
  6840  			break
  6841  		}
  6842  		v.Reset(ssaop.OpPPC64ISEL)
  6843  		v.AuxInt = ssa.Int32ToAuxInt(n)
  6844  		v.AddArg3(x, y, bool)
  6845  		return true
  6846  	}
  6847  	return false
  6848  }
  6849  func rewriteValue_OpPPC64LessEqual(v *ssa.Value) bool {
  6850  	v_0 := v.Args[0]
  6851  	// match: (LessEqual (FlagEQ))
  6852  	// result: (MOVDconst [1])
  6853  	for {
  6854  		if v_0.Op != ssaop.OpPPC64FlagEQ {
  6855  			break
  6856  		}
  6857  		v.Reset(ssaop.OpPPC64MOVDconst)
  6858  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6859  		return true
  6860  	}
  6861  	// match: (LessEqual (FlagLT))
  6862  	// result: (MOVDconst [1])
  6863  	for {
  6864  		if v_0.Op != ssaop.OpPPC64FlagLT {
  6865  			break
  6866  		}
  6867  		v.Reset(ssaop.OpPPC64MOVDconst)
  6868  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6869  		return true
  6870  	}
  6871  	// match: (LessEqual (FlagGT))
  6872  	// result: (MOVDconst [0])
  6873  	for {
  6874  		if v_0.Op != ssaop.OpPPC64FlagGT {
  6875  			break
  6876  		}
  6877  		v.Reset(ssaop.OpPPC64MOVDconst)
  6878  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6879  		return true
  6880  	}
  6881  	// match: (LessEqual (InvertFlags x))
  6882  	// result: (GreaterEqual x)
  6883  	for {
  6884  		if v_0.Op != ssaop.OpPPC64InvertFlags {
  6885  			break
  6886  		}
  6887  		x := v_0.Args[0]
  6888  		v.Reset(ssaop.OpPPC64GreaterEqual)
  6889  		v.AddArg(x)
  6890  		return true
  6891  	}
  6892  	// match: (LessEqual cmp)
  6893  	// result: (SETBCR [1] cmp)
  6894  	for {
  6895  		cmp := v_0
  6896  		v.Reset(ssaop.OpPPC64SETBCR)
  6897  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6898  		v.AddArg(cmp)
  6899  		return true
  6900  	}
  6901  }
  6902  func rewriteValue_OpPPC64LessThan(v *ssa.Value) bool {
  6903  	v_0 := v.Args[0]
  6904  	// match: (LessThan (FlagEQ))
  6905  	// result: (MOVDconst [0])
  6906  	for {
  6907  		if v_0.Op != ssaop.OpPPC64FlagEQ {
  6908  			break
  6909  		}
  6910  		v.Reset(ssaop.OpPPC64MOVDconst)
  6911  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6912  		return true
  6913  	}
  6914  	// match: (LessThan (FlagLT))
  6915  	// result: (MOVDconst [1])
  6916  	for {
  6917  		if v_0.Op != ssaop.OpPPC64FlagLT {
  6918  			break
  6919  		}
  6920  		v.Reset(ssaop.OpPPC64MOVDconst)
  6921  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6922  		return true
  6923  	}
  6924  	// match: (LessThan (FlagGT))
  6925  	// result: (MOVDconst [0])
  6926  	for {
  6927  		if v_0.Op != ssaop.OpPPC64FlagGT {
  6928  			break
  6929  		}
  6930  		v.Reset(ssaop.OpPPC64MOVDconst)
  6931  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6932  		return true
  6933  	}
  6934  	// match: (LessThan (InvertFlags x))
  6935  	// result: (GreaterThan x)
  6936  	for {
  6937  		if v_0.Op != ssaop.OpPPC64InvertFlags {
  6938  			break
  6939  		}
  6940  		x := v_0.Args[0]
  6941  		v.Reset(ssaop.OpPPC64GreaterThan)
  6942  		v.AddArg(x)
  6943  		return true
  6944  	}
  6945  	// match: (LessThan cmp)
  6946  	// result: (SETBC [0] cmp)
  6947  	for {
  6948  		cmp := v_0
  6949  		v.Reset(ssaop.OpPPC64SETBC)
  6950  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6951  		v.AddArg(cmp)
  6952  		return true
  6953  	}
  6954  }
  6955  func rewriteValue_OpPPC64LoweredPanicBoundsCR(v *ssa.Value) bool {
  6956  	v_1 := v.Args[1]
  6957  	v_0 := v.Args[0]
  6958  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  6959  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  6960  	for {
  6961  		kind := ssa.AuxIntToInt64(v.AuxInt)
  6962  		p := ssa.AuxToPanicBoundsC(v.Aux)
  6963  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  6964  			break
  6965  		}
  6966  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6967  		mem := v_1
  6968  		v.Reset(ssaop.OpPPC64LoweredPanicBoundsCC)
  6969  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  6970  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: p.C, Cy: c})
  6971  		v.AddArg(mem)
  6972  		return true
  6973  	}
  6974  	return false
  6975  }
  6976  func rewriteValue_OpPPC64LoweredPanicBoundsRC(v *ssa.Value) bool {
  6977  	v_1 := v.Args[1]
  6978  	v_0 := v.Args[0]
  6979  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  6980  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  6981  	for {
  6982  		kind := ssa.AuxIntToInt64(v.AuxInt)
  6983  		p := ssa.AuxToPanicBoundsC(v.Aux)
  6984  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  6985  			break
  6986  		}
  6987  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6988  		mem := v_1
  6989  		v.Reset(ssaop.OpPPC64LoweredPanicBoundsCC)
  6990  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  6991  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: c, Cy: p.C})
  6992  		v.AddArg(mem)
  6993  		return true
  6994  	}
  6995  	return false
  6996  }
  6997  func rewriteValue_OpPPC64LoweredPanicBoundsRR(v *ssa.Value) bool {
  6998  	v_2 := v.Args[2]
  6999  	v_1 := v.Args[1]
  7000  	v_0 := v.Args[0]
  7001  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  7002  	// result: (LoweredPanicBoundsRC [kind] x {ssa.PanicBoundsC{C:c}} mem)
  7003  	for {
  7004  		kind := ssa.AuxIntToInt64(v.AuxInt)
  7005  		x := v_0
  7006  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  7007  			break
  7008  		}
  7009  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7010  		mem := v_2
  7011  		v.Reset(ssaop.OpPPC64LoweredPanicBoundsRC)
  7012  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  7013  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  7014  		v.AddArg2(x, mem)
  7015  		return true
  7016  	}
  7017  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  7018  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:c}} y mem)
  7019  	for {
  7020  		kind := ssa.AuxIntToInt64(v.AuxInt)
  7021  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  7022  			break
  7023  		}
  7024  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7025  		y := v_1
  7026  		mem := v_2
  7027  		v.Reset(ssaop.OpPPC64LoweredPanicBoundsCR)
  7028  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  7029  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  7030  		v.AddArg2(y, mem)
  7031  		return true
  7032  	}
  7033  	return false
  7034  }
  7035  func rewriteValue_OpPPC64MFVSRD(v *ssa.Value) bool {
  7036  	v_0 := v.Args[0]
  7037  	b := v.Block
  7038  	typ := &b.Func.Config.Types
  7039  	// match: (MFVSRD (FMOVDconst [c]))
  7040  	// result: (MOVDconst [int64(math.Float64bits(c))])
  7041  	for {
  7042  		if v_0.Op != ssaop.OpPPC64FMOVDconst {
  7043  			break
  7044  		}
  7045  		c := ssa.AuxIntToFloat64(v_0.AuxInt)
  7046  		v.Reset(ssaop.OpPPC64MOVDconst)
  7047  		v.AuxInt = ssa.Int64ToAuxInt(int64(math.Float64bits(c)))
  7048  		return true
  7049  	}
  7050  	// match: (MFVSRD x:(FMOVDload [off] {sym} ptr mem))
  7051  	// cond: x.Uses == 1 && ssa.Clobber(x)
  7052  	// result: @x.Block (MOVDload [off] {sym} ptr mem)
  7053  	for {
  7054  		x := v_0
  7055  		if x.Op != ssaop.OpPPC64FMOVDload {
  7056  			break
  7057  		}
  7058  		off := ssa.AuxIntToInt32(x.AuxInt)
  7059  		sym := ssa.AuxToSym(x.Aux)
  7060  		mem := x.Args[1]
  7061  		ptr := x.Args[0]
  7062  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  7063  			break
  7064  		}
  7065  		b = x.Block
  7066  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64MOVDload, typ.Int64)
  7067  		v.CopyOf(v0)
  7068  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  7069  		v0.Aux = ssa.SymToAux(sym)
  7070  		v0.AddArg2(ptr, mem)
  7071  		return true
  7072  	}
  7073  	return false
  7074  }
  7075  func rewriteValue_OpPPC64MOVBZload(v *ssa.Value) bool {
  7076  	v_1 := v.Args[1]
  7077  	v_0 := v.Args[0]
  7078  	// match: (MOVBZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  7079  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  7080  	// result: (MOVBZload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
  7081  	for {
  7082  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7083  		sym1 := ssa.AuxToSym(v.Aux)
  7084  		p := v_0
  7085  		if p.Op != ssaop.OpPPC64MOVDaddr {
  7086  			break
  7087  		}
  7088  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  7089  		sym2 := ssa.AuxToSym(p.Aux)
  7090  		ptr := p.Args[0]
  7091  		mem := v_1
  7092  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  7093  			break
  7094  		}
  7095  		v.Reset(ssaop.OpPPC64MOVBZload)
  7096  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7097  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7098  		v.AddArg2(ptr, mem)
  7099  		return true
  7100  	}
  7101  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] x) mem)
  7102  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  7103  	// result: (MOVBZload [off1+int32(off2)] {sym} x mem)
  7104  	for {
  7105  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7106  		sym := ssa.AuxToSym(v.Aux)
  7107  		if v_0.Op != ssaop.OpPPC64ADDconst {
  7108  			break
  7109  		}
  7110  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  7111  		x := v_0.Args[0]
  7112  		mem := v_1
  7113  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  7114  			break
  7115  		}
  7116  		v.Reset(ssaop.OpPPC64MOVBZload)
  7117  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  7118  		v.Aux = ssa.SymToAux(sym)
  7119  		v.AddArg2(x, mem)
  7120  		return true
  7121  	}
  7122  	// match: (MOVBZload [0] {sym} p:(ADD ptr idx) mem)
  7123  	// cond: sym == nil && p.Uses == 1
  7124  	// result: (MOVBZloadidx ptr idx mem)
  7125  	for {
  7126  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  7127  			break
  7128  		}
  7129  		sym := ssa.AuxToSym(v.Aux)
  7130  		p := v_0
  7131  		if p.Op != ssaop.OpPPC64ADD {
  7132  			break
  7133  		}
  7134  		idx := p.Args[1]
  7135  		ptr := p.Args[0]
  7136  		mem := v_1
  7137  		if !(sym == nil && p.Uses == 1) {
  7138  			break
  7139  		}
  7140  		v.Reset(ssaop.OpPPC64MOVBZloadidx)
  7141  		v.AddArg3(ptr, idx, mem)
  7142  		return true
  7143  	}
  7144  	return false
  7145  }
  7146  func rewriteValue_OpPPC64MOVBZloadidx(v *ssa.Value) bool {
  7147  	v_2 := v.Args[2]
  7148  	v_1 := v.Args[1]
  7149  	v_0 := v.Args[0]
  7150  	// match: (MOVBZloadidx ptr (MOVDconst [c]) mem)
  7151  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  7152  	// result: (MOVBZload [int32(c)] ptr mem)
  7153  	for {
  7154  		ptr := v_0
  7155  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  7156  			break
  7157  		}
  7158  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  7159  		mem := v_2
  7160  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  7161  			break
  7162  		}
  7163  		v.Reset(ssaop.OpPPC64MOVBZload)
  7164  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  7165  		v.AddArg2(ptr, mem)
  7166  		return true
  7167  	}
  7168  	// match: (MOVBZloadidx (MOVDconst [c]) ptr mem)
  7169  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  7170  	// result: (MOVBZload [int32(c)] ptr mem)
  7171  	for {
  7172  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  7173  			break
  7174  		}
  7175  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7176  		ptr := v_1
  7177  		mem := v_2
  7178  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  7179  			break
  7180  		}
  7181  		v.Reset(ssaop.OpPPC64MOVBZload)
  7182  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  7183  		v.AddArg2(ptr, mem)
  7184  		return true
  7185  	}
  7186  	return false
  7187  }
  7188  func rewriteValue_OpPPC64MOVBZreg(v *ssa.Value) bool {
  7189  	v_0 := v.Args[0]
  7190  	b := v.Block
  7191  	typ := &b.Func.Config.Types
  7192  	// match: (MOVBZreg y:(ANDconst [c] _))
  7193  	// cond: uint64(c) <= 0xFF
  7194  	// result: y
  7195  	for {
  7196  		y := v_0
  7197  		if y.Op != ssaop.OpPPC64ANDconst {
  7198  			break
  7199  		}
  7200  		c := ssa.AuxIntToInt64(y.AuxInt)
  7201  		if !(uint64(c) <= 0xFF) {
  7202  			break
  7203  		}
  7204  		v.CopyOf(y)
  7205  		return true
  7206  	}
  7207  	// match: (MOVBZreg (SRWconst [c] (MOVBZreg x)))
  7208  	// result: (SRWconst [c] (MOVBZreg x))
  7209  	for {
  7210  		if v_0.Op != ssaop.OpPPC64SRWconst {
  7211  			break
  7212  		}
  7213  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7214  		v_0_0 := v_0.Args[0]
  7215  		if v_0_0.Op != ssaop.OpPPC64MOVBZreg {
  7216  			break
  7217  		}
  7218  		x := v_0_0.Args[0]
  7219  		v.Reset(ssaop.OpPPC64SRWconst)
  7220  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7221  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  7222  		v0.AddArg(x)
  7223  		v.AddArg(v0)
  7224  		return true
  7225  	}
  7226  	// match: (MOVBZreg (SRWconst [c] x))
  7227  	// cond: x.Type.Size() == 8
  7228  	// result: (SRWconst [c] x)
  7229  	for {
  7230  		if v_0.Op != ssaop.OpPPC64SRWconst {
  7231  			break
  7232  		}
  7233  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7234  		x := v_0.Args[0]
  7235  		if !(x.Type.Size() == 8) {
  7236  			break
  7237  		}
  7238  		v.Reset(ssaop.OpPPC64SRWconst)
  7239  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7240  		v.AddArg(x)
  7241  		return true
  7242  	}
  7243  	// match: (MOVBZreg (SRDconst [c] x))
  7244  	// cond: c>=56
  7245  	// result: (SRDconst [c] x)
  7246  	for {
  7247  		if v_0.Op != ssaop.OpPPC64SRDconst {
  7248  			break
  7249  		}
  7250  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7251  		x := v_0.Args[0]
  7252  		if !(c >= 56) {
  7253  			break
  7254  		}
  7255  		v.Reset(ssaop.OpPPC64SRDconst)
  7256  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7257  		v.AddArg(x)
  7258  		return true
  7259  	}
  7260  	// match: (MOVBZreg (SRWconst [c] x))
  7261  	// cond: c>=24
  7262  	// result: (SRWconst [c] x)
  7263  	for {
  7264  		if v_0.Op != ssaop.OpPPC64SRWconst {
  7265  			break
  7266  		}
  7267  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7268  		x := v_0.Args[0]
  7269  		if !(c >= 24) {
  7270  			break
  7271  		}
  7272  		v.Reset(ssaop.OpPPC64SRWconst)
  7273  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7274  		v.AddArg(x)
  7275  		return true
  7276  	}
  7277  	// match: (MOVBZreg y:(MOVBZreg _))
  7278  	// result: y
  7279  	for {
  7280  		y := v_0
  7281  		if y.Op != ssaop.OpPPC64MOVBZreg {
  7282  			break
  7283  		}
  7284  		v.CopyOf(y)
  7285  		return true
  7286  	}
  7287  	// match: (MOVBZreg (MOVBreg x))
  7288  	// result: (MOVBZreg x)
  7289  	for {
  7290  		if v_0.Op != ssaop.OpPPC64MOVBreg {
  7291  			break
  7292  		}
  7293  		x := v_0.Args[0]
  7294  		v.Reset(ssaop.OpPPC64MOVBZreg)
  7295  		v.AddArg(x)
  7296  		return true
  7297  	}
  7298  	// match: (MOVBZreg (SRWconst x [s]))
  7299  	// cond: ssa.MergePPC64AndSrwi(0xFF,s) != 0
  7300  	// result: (RLWINM [ssa.MergePPC64AndSrwi(0xFF,s)] x)
  7301  	for {
  7302  		if v_0.Op != ssaop.OpPPC64SRWconst {
  7303  			break
  7304  		}
  7305  		s := ssa.AuxIntToInt64(v_0.AuxInt)
  7306  		x := v_0.Args[0]
  7307  		if !(ssa.MergePPC64AndSrwi(0xFF, s) != 0) {
  7308  			break
  7309  		}
  7310  		v.Reset(ssaop.OpPPC64RLWINM)
  7311  		v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64AndSrwi(0xFF, s))
  7312  		v.AddArg(x)
  7313  		return true
  7314  	}
  7315  	// match: (MOVBZreg (RLWINM [r] y))
  7316  	// cond: mergePPC64AndRlwinm(0xFF,r) != 0
  7317  	// result: (RLWINM [mergePPC64AndRlwinm(0xFF,r)] y)
  7318  	for {
  7319  		if v_0.Op != ssaop.OpPPC64RLWINM {
  7320  			break
  7321  		}
  7322  		r := ssa.AuxIntToInt64(v_0.AuxInt)
  7323  		y := v_0.Args[0]
  7324  		if !(mergePPC64AndRlwinm(0xFF, r) != 0) {
  7325  			break
  7326  		}
  7327  		v.Reset(ssaop.OpPPC64RLWINM)
  7328  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndRlwinm(0xFF, r))
  7329  		v.AddArg(y)
  7330  		return true
  7331  	}
  7332  	// match: (MOVBZreg (OR <t> x (MOVWZreg y)))
  7333  	// result: (MOVBZreg (OR <t> x y))
  7334  	for {
  7335  		if v_0.Op != ssaop.OpPPC64OR {
  7336  			break
  7337  		}
  7338  		t := v_0.Type
  7339  		_ = v_0.Args[1]
  7340  		v_0_0 := v_0.Args[0]
  7341  		v_0_1 := v_0.Args[1]
  7342  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7343  			x := v_0_0
  7344  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
  7345  				continue
  7346  			}
  7347  			y := v_0_1.Args[0]
  7348  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7349  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, t)
  7350  			v0.AddArg2(x, y)
  7351  			v.AddArg(v0)
  7352  			return true
  7353  		}
  7354  		break
  7355  	}
  7356  	// match: (MOVBZreg (XOR <t> x (MOVWZreg y)))
  7357  	// result: (MOVBZreg (XOR <t> x y))
  7358  	for {
  7359  		if v_0.Op != ssaop.OpPPC64XOR {
  7360  			break
  7361  		}
  7362  		t := v_0.Type
  7363  		_ = v_0.Args[1]
  7364  		v_0_0 := v_0.Args[0]
  7365  		v_0_1 := v_0.Args[1]
  7366  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7367  			x := v_0_0
  7368  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
  7369  				continue
  7370  			}
  7371  			y := v_0_1.Args[0]
  7372  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7373  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64XOR, t)
  7374  			v0.AddArg2(x, y)
  7375  			v.AddArg(v0)
  7376  			return true
  7377  		}
  7378  		break
  7379  	}
  7380  	// match: (MOVBZreg (AND <t> x (MOVWZreg y)))
  7381  	// result: (MOVBZreg (AND <t> x y))
  7382  	for {
  7383  		if v_0.Op != ssaop.OpPPC64AND {
  7384  			break
  7385  		}
  7386  		t := v_0.Type
  7387  		_ = v_0.Args[1]
  7388  		v_0_0 := v_0.Args[0]
  7389  		v_0_1 := v_0.Args[1]
  7390  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7391  			x := v_0_0
  7392  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
  7393  				continue
  7394  			}
  7395  			y := v_0_1.Args[0]
  7396  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7397  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64AND, t)
  7398  			v0.AddArg2(x, y)
  7399  			v.AddArg(v0)
  7400  			return true
  7401  		}
  7402  		break
  7403  	}
  7404  	// match: (MOVBZreg (OR <t> x (MOVHZreg y)))
  7405  	// result: (MOVBZreg (OR <t> x y))
  7406  	for {
  7407  		if v_0.Op != ssaop.OpPPC64OR {
  7408  			break
  7409  		}
  7410  		t := v_0.Type
  7411  		_ = v_0.Args[1]
  7412  		v_0_0 := v_0.Args[0]
  7413  		v_0_1 := v_0.Args[1]
  7414  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7415  			x := v_0_0
  7416  			if v_0_1.Op != ssaop.OpPPC64MOVHZreg {
  7417  				continue
  7418  			}
  7419  			y := v_0_1.Args[0]
  7420  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7421  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, t)
  7422  			v0.AddArg2(x, y)
  7423  			v.AddArg(v0)
  7424  			return true
  7425  		}
  7426  		break
  7427  	}
  7428  	// match: (MOVBZreg (XOR <t> x (MOVHZreg y)))
  7429  	// result: (MOVBZreg (XOR <t> x y))
  7430  	for {
  7431  		if v_0.Op != ssaop.OpPPC64XOR {
  7432  			break
  7433  		}
  7434  		t := v_0.Type
  7435  		_ = v_0.Args[1]
  7436  		v_0_0 := v_0.Args[0]
  7437  		v_0_1 := v_0.Args[1]
  7438  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7439  			x := v_0_0
  7440  			if v_0_1.Op != ssaop.OpPPC64MOVHZreg {
  7441  				continue
  7442  			}
  7443  			y := v_0_1.Args[0]
  7444  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7445  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64XOR, t)
  7446  			v0.AddArg2(x, y)
  7447  			v.AddArg(v0)
  7448  			return true
  7449  		}
  7450  		break
  7451  	}
  7452  	// match: (MOVBZreg (AND <t> x (MOVHZreg y)))
  7453  	// result: (MOVBZreg (AND <t> x y))
  7454  	for {
  7455  		if v_0.Op != ssaop.OpPPC64AND {
  7456  			break
  7457  		}
  7458  		t := v_0.Type
  7459  		_ = v_0.Args[1]
  7460  		v_0_0 := v_0.Args[0]
  7461  		v_0_1 := v_0.Args[1]
  7462  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7463  			x := v_0_0
  7464  			if v_0_1.Op != ssaop.OpPPC64MOVHZreg {
  7465  				continue
  7466  			}
  7467  			y := v_0_1.Args[0]
  7468  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7469  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64AND, t)
  7470  			v0.AddArg2(x, y)
  7471  			v.AddArg(v0)
  7472  			return true
  7473  		}
  7474  		break
  7475  	}
  7476  	// match: (MOVBZreg (OR <t> x (MOVBZreg y)))
  7477  	// result: (MOVBZreg (OR <t> x y))
  7478  	for {
  7479  		if v_0.Op != ssaop.OpPPC64OR {
  7480  			break
  7481  		}
  7482  		t := v_0.Type
  7483  		_ = v_0.Args[1]
  7484  		v_0_0 := v_0.Args[0]
  7485  		v_0_1 := v_0.Args[1]
  7486  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7487  			x := v_0_0
  7488  			if v_0_1.Op != ssaop.OpPPC64MOVBZreg {
  7489  				continue
  7490  			}
  7491  			y := v_0_1.Args[0]
  7492  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7493  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, t)
  7494  			v0.AddArg2(x, y)
  7495  			v.AddArg(v0)
  7496  			return true
  7497  		}
  7498  		break
  7499  	}
  7500  	// match: (MOVBZreg (XOR <t> x (MOVBZreg y)))
  7501  	// result: (MOVBZreg (XOR <t> x y))
  7502  	for {
  7503  		if v_0.Op != ssaop.OpPPC64XOR {
  7504  			break
  7505  		}
  7506  		t := v_0.Type
  7507  		_ = v_0.Args[1]
  7508  		v_0_0 := v_0.Args[0]
  7509  		v_0_1 := v_0.Args[1]
  7510  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7511  			x := v_0_0
  7512  			if v_0_1.Op != ssaop.OpPPC64MOVBZreg {
  7513  				continue
  7514  			}
  7515  			y := v_0_1.Args[0]
  7516  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7517  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64XOR, t)
  7518  			v0.AddArg2(x, y)
  7519  			v.AddArg(v0)
  7520  			return true
  7521  		}
  7522  		break
  7523  	}
  7524  	// match: (MOVBZreg (AND <t> x (MOVBZreg y)))
  7525  	// result: (MOVBZreg (AND <t> x y))
  7526  	for {
  7527  		if v_0.Op != ssaop.OpPPC64AND {
  7528  			break
  7529  		}
  7530  		t := v_0.Type
  7531  		_ = v_0.Args[1]
  7532  		v_0_0 := v_0.Args[0]
  7533  		v_0_1 := v_0.Args[1]
  7534  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7535  			x := v_0_0
  7536  			if v_0_1.Op != ssaop.OpPPC64MOVBZreg {
  7537  				continue
  7538  			}
  7539  			y := v_0_1.Args[0]
  7540  			v.Reset(ssaop.OpPPC64MOVBZreg)
  7541  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64AND, t)
  7542  			v0.AddArg2(x, y)
  7543  			v.AddArg(v0)
  7544  			return true
  7545  		}
  7546  		break
  7547  	}
  7548  	// match: (MOVBZreg z:(ANDconst [c] (MOVBZload ptr x)))
  7549  	// result: z
  7550  	for {
  7551  		z := v_0
  7552  		if z.Op != ssaop.OpPPC64ANDconst {
  7553  			break
  7554  		}
  7555  		z_0 := z.Args[0]
  7556  		if z_0.Op != ssaop.OpPPC64MOVBZload {
  7557  			break
  7558  		}
  7559  		v.CopyOf(z)
  7560  		return true
  7561  	}
  7562  	// match: (MOVBZreg z:(AND y (MOVBZload ptr x)))
  7563  	// result: z
  7564  	for {
  7565  		z := v_0
  7566  		if z.Op != ssaop.OpPPC64AND {
  7567  			break
  7568  		}
  7569  		_ = z.Args[1]
  7570  		z_0 := z.Args[0]
  7571  		z_1 := z.Args[1]
  7572  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
  7573  			if z_1.Op != ssaop.OpPPC64MOVBZload {
  7574  				continue
  7575  			}
  7576  			v.CopyOf(z)
  7577  			return true
  7578  		}
  7579  		break
  7580  	}
  7581  	// match: (MOVBZreg x:(MOVBZload _ _))
  7582  	// result: x
  7583  	for {
  7584  		x := v_0
  7585  		if x.Op != ssaop.OpPPC64MOVBZload {
  7586  			break
  7587  		}
  7588  		v.CopyOf(x)
  7589  		return true
  7590  	}
  7591  	// match: (MOVBZreg x:(MOVBZloadidx _ _ _))
  7592  	// result: x
  7593  	for {
  7594  		x := v_0
  7595  		if x.Op != ssaop.OpPPC64MOVBZloadidx {
  7596  			break
  7597  		}
  7598  		v.CopyOf(x)
  7599  		return true
  7600  	}
  7601  	// match: (MOVBZreg x:(Select0 (LoweredAtomicLoad8 _ _)))
  7602  	// result: x
  7603  	for {
  7604  		x := v_0
  7605  		if x.Op != ssaop.OpSelect0 {
  7606  			break
  7607  		}
  7608  		x_0 := x.Args[0]
  7609  		if x_0.Op != ssaop.OpPPC64LoweredAtomicLoad8 {
  7610  			break
  7611  		}
  7612  		v.CopyOf(x)
  7613  		return true
  7614  	}
  7615  	// match: (MOVBZreg x:(Arg <t>))
  7616  	// cond: ssa.Is8BitInt(t) && !t.IsSigned()
  7617  	// result: x
  7618  	for {
  7619  		x := v_0
  7620  		if x.Op != ssaop.OpArg {
  7621  			break
  7622  		}
  7623  		t := x.Type
  7624  		if !(ssa.Is8BitInt(t) && !t.IsSigned()) {
  7625  			break
  7626  		}
  7627  		v.CopyOf(x)
  7628  		return true
  7629  	}
  7630  	// match: (MOVBZreg (MOVDconst [c]))
  7631  	// result: (MOVDconst [int64(uint8(c))])
  7632  	for {
  7633  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  7634  			break
  7635  		}
  7636  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7637  		v.Reset(ssaop.OpPPC64MOVDconst)
  7638  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(c)))
  7639  		return true
  7640  	}
  7641  	return false
  7642  }
  7643  func rewriteValue_OpPPC64MOVBreg(v *ssa.Value) bool {
  7644  	v_0 := v.Args[0]
  7645  	b := v.Block
  7646  	typ := &b.Func.Config.Types
  7647  	// match: (MOVBreg y:(ANDconst [c] _))
  7648  	// cond: uint64(c) <= 0x7F
  7649  	// result: y
  7650  	for {
  7651  		y := v_0
  7652  		if y.Op != ssaop.OpPPC64ANDconst {
  7653  			break
  7654  		}
  7655  		c := ssa.AuxIntToInt64(y.AuxInt)
  7656  		if !(uint64(c) <= 0x7F) {
  7657  			break
  7658  		}
  7659  		v.CopyOf(y)
  7660  		return true
  7661  	}
  7662  	// match: (MOVBreg (SRAWconst [c] (MOVBreg x)))
  7663  	// result: (SRAWconst [c] (MOVBreg x))
  7664  	for {
  7665  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  7666  			break
  7667  		}
  7668  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7669  		v_0_0 := v_0.Args[0]
  7670  		if v_0_0.Op != ssaop.OpPPC64MOVBreg {
  7671  			break
  7672  		}
  7673  		x := v_0_0.Args[0]
  7674  		v.Reset(ssaop.OpPPC64SRAWconst)
  7675  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7676  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
  7677  		v0.AddArg(x)
  7678  		v.AddArg(v0)
  7679  		return true
  7680  	}
  7681  	// match: (MOVBreg (SRAWconst [c] x))
  7682  	// cond: x.Type.Size() == 8
  7683  	// result: (SRAWconst [c] x)
  7684  	for {
  7685  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  7686  			break
  7687  		}
  7688  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7689  		x := v_0.Args[0]
  7690  		if !(x.Type.Size() == 8) {
  7691  			break
  7692  		}
  7693  		v.Reset(ssaop.OpPPC64SRAWconst)
  7694  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7695  		v.AddArg(x)
  7696  		return true
  7697  	}
  7698  	// match: (MOVBreg (SRDconst [c] x))
  7699  	// cond: c>56
  7700  	// result: (SRDconst [c] x)
  7701  	for {
  7702  		if v_0.Op != ssaop.OpPPC64SRDconst {
  7703  			break
  7704  		}
  7705  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7706  		x := v_0.Args[0]
  7707  		if !(c > 56) {
  7708  			break
  7709  		}
  7710  		v.Reset(ssaop.OpPPC64SRDconst)
  7711  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7712  		v.AddArg(x)
  7713  		return true
  7714  	}
  7715  	// match: (MOVBreg (SRDconst [c] x))
  7716  	// cond: c==56
  7717  	// result: (SRADconst [c] x)
  7718  	for {
  7719  		if v_0.Op != ssaop.OpPPC64SRDconst {
  7720  			break
  7721  		}
  7722  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7723  		x := v_0.Args[0]
  7724  		if !(c == 56) {
  7725  			break
  7726  		}
  7727  		v.Reset(ssaop.OpPPC64SRADconst)
  7728  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7729  		v.AddArg(x)
  7730  		return true
  7731  	}
  7732  	// match: (MOVBreg (SRADconst [c] x))
  7733  	// cond: c>=56
  7734  	// result: (SRADconst [c] x)
  7735  	for {
  7736  		if v_0.Op != ssaop.OpPPC64SRADconst {
  7737  			break
  7738  		}
  7739  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7740  		x := v_0.Args[0]
  7741  		if !(c >= 56) {
  7742  			break
  7743  		}
  7744  		v.Reset(ssaop.OpPPC64SRADconst)
  7745  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7746  		v.AddArg(x)
  7747  		return true
  7748  	}
  7749  	// match: (MOVBreg (SRWconst [c] x))
  7750  	// cond: c>24
  7751  	// result: (SRWconst [c] x)
  7752  	for {
  7753  		if v_0.Op != ssaop.OpPPC64SRWconst {
  7754  			break
  7755  		}
  7756  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7757  		x := v_0.Args[0]
  7758  		if !(c > 24) {
  7759  			break
  7760  		}
  7761  		v.Reset(ssaop.OpPPC64SRWconst)
  7762  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7763  		v.AddArg(x)
  7764  		return true
  7765  	}
  7766  	// match: (MOVBreg (SRWconst [c] x))
  7767  	// cond: c==24
  7768  	// result: (SRAWconst [c] x)
  7769  	for {
  7770  		if v_0.Op != ssaop.OpPPC64SRWconst {
  7771  			break
  7772  		}
  7773  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7774  		x := v_0.Args[0]
  7775  		if !(c == 24) {
  7776  			break
  7777  		}
  7778  		v.Reset(ssaop.OpPPC64SRAWconst)
  7779  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7780  		v.AddArg(x)
  7781  		return true
  7782  	}
  7783  	// match: (MOVBreg (SRAWconst [c] x))
  7784  	// cond: c>=24
  7785  	// result: (SRAWconst [c] x)
  7786  	for {
  7787  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  7788  			break
  7789  		}
  7790  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7791  		x := v_0.Args[0]
  7792  		if !(c >= 24) {
  7793  			break
  7794  		}
  7795  		v.Reset(ssaop.OpPPC64SRAWconst)
  7796  		v.AuxInt = ssa.Int64ToAuxInt(c)
  7797  		v.AddArg(x)
  7798  		return true
  7799  	}
  7800  	// match: (MOVBreg y:(MOVBreg _))
  7801  	// result: y
  7802  	for {
  7803  		y := v_0
  7804  		if y.Op != ssaop.OpPPC64MOVBreg {
  7805  			break
  7806  		}
  7807  		v.CopyOf(y)
  7808  		return true
  7809  	}
  7810  	// match: (MOVBreg (MOVBZreg x))
  7811  	// result: (MOVBreg x)
  7812  	for {
  7813  		if v_0.Op != ssaop.OpPPC64MOVBZreg {
  7814  			break
  7815  		}
  7816  		x := v_0.Args[0]
  7817  		v.Reset(ssaop.OpPPC64MOVBreg)
  7818  		v.AddArg(x)
  7819  		return true
  7820  	}
  7821  	// match: (MOVBreg x:(Arg <t>))
  7822  	// cond: ssa.Is8BitInt(t) && t.IsSigned()
  7823  	// result: x
  7824  	for {
  7825  		x := v_0
  7826  		if x.Op != ssaop.OpArg {
  7827  			break
  7828  		}
  7829  		t := x.Type
  7830  		if !(ssa.Is8BitInt(t) && t.IsSigned()) {
  7831  			break
  7832  		}
  7833  		v.CopyOf(x)
  7834  		return true
  7835  	}
  7836  	// match: (MOVBreg (MOVDconst [c]))
  7837  	// result: (MOVDconst [int64(int8(c))])
  7838  	for {
  7839  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  7840  			break
  7841  		}
  7842  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  7843  		v.Reset(ssaop.OpPPC64MOVDconst)
  7844  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(c)))
  7845  		return true
  7846  	}
  7847  	return false
  7848  }
  7849  func rewriteValue_OpPPC64MOVBstore(v *ssa.Value) bool {
  7850  	v_2 := v.Args[2]
  7851  	v_1 := v.Args[1]
  7852  	v_0 := v.Args[0]
  7853  	b := v.Block
  7854  	typ := &b.Func.Config.Types
  7855  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] x) val mem)
  7856  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  7857  	// result: (MOVBstore [off1+int32(off2)] {sym} x val mem)
  7858  	for {
  7859  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7860  		sym := ssa.AuxToSym(v.Aux)
  7861  		if v_0.Op != ssaop.OpPPC64ADDconst {
  7862  			break
  7863  		}
  7864  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  7865  		x := v_0.Args[0]
  7866  		val := v_1
  7867  		mem := v_2
  7868  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  7869  			break
  7870  		}
  7871  		v.Reset(ssaop.OpPPC64MOVBstore)
  7872  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  7873  		v.Aux = ssa.SymToAux(sym)
  7874  		v.AddArg3(x, val, mem)
  7875  		return true
  7876  	}
  7877  	// match: (MOVBstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  7878  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  7879  	// result: (MOVBstore [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  7880  	for {
  7881  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7882  		sym1 := ssa.AuxToSym(v.Aux)
  7883  		p := v_0
  7884  		if p.Op != ssaop.OpPPC64MOVDaddr {
  7885  			break
  7886  		}
  7887  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  7888  		sym2 := ssa.AuxToSym(p.Aux)
  7889  		ptr := p.Args[0]
  7890  		val := v_1
  7891  		mem := v_2
  7892  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  7893  			break
  7894  		}
  7895  		v.Reset(ssaop.OpPPC64MOVBstore)
  7896  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7897  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7898  		v.AddArg3(ptr, val, mem)
  7899  		return true
  7900  	}
  7901  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [0]) mem)
  7902  	// result: (MOVBstorezero [off] {sym} ptr mem)
  7903  	for {
  7904  		off := ssa.AuxIntToInt32(v.AuxInt)
  7905  		sym := ssa.AuxToSym(v.Aux)
  7906  		ptr := v_0
  7907  		if v_1.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  7908  			break
  7909  		}
  7910  		mem := v_2
  7911  		v.Reset(ssaop.OpPPC64MOVBstorezero)
  7912  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7913  		v.Aux = ssa.SymToAux(sym)
  7914  		v.AddArg2(ptr, mem)
  7915  		return true
  7916  	}
  7917  	// match: (MOVBstore [0] {sym} p:(ADD ptr idx) val mem)
  7918  	// cond: sym == nil && p.Uses == 1
  7919  	// result: (MOVBstoreidx ptr idx val mem)
  7920  	for {
  7921  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  7922  			break
  7923  		}
  7924  		sym := ssa.AuxToSym(v.Aux)
  7925  		p := v_0
  7926  		if p.Op != ssaop.OpPPC64ADD {
  7927  			break
  7928  		}
  7929  		idx := p.Args[1]
  7930  		ptr := p.Args[0]
  7931  		val := v_1
  7932  		mem := v_2
  7933  		if !(sym == nil && p.Uses == 1) {
  7934  			break
  7935  		}
  7936  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  7937  		v.AddArg4(ptr, idx, val, mem)
  7938  		return true
  7939  	}
  7940  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  7941  	// result: (MOVBstore [off] {sym} ptr x mem)
  7942  	for {
  7943  		off := ssa.AuxIntToInt32(v.AuxInt)
  7944  		sym := ssa.AuxToSym(v.Aux)
  7945  		ptr := v_0
  7946  		if v_1.Op != ssaop.OpPPC64MOVBreg {
  7947  			break
  7948  		}
  7949  		x := v_1.Args[0]
  7950  		mem := v_2
  7951  		v.Reset(ssaop.OpPPC64MOVBstore)
  7952  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7953  		v.Aux = ssa.SymToAux(sym)
  7954  		v.AddArg3(ptr, x, mem)
  7955  		return true
  7956  	}
  7957  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  7958  	// result: (MOVBstore [off] {sym} ptr x mem)
  7959  	for {
  7960  		off := ssa.AuxIntToInt32(v.AuxInt)
  7961  		sym := ssa.AuxToSym(v.Aux)
  7962  		ptr := v_0
  7963  		if v_1.Op != ssaop.OpPPC64MOVBZreg {
  7964  			break
  7965  		}
  7966  		x := v_1.Args[0]
  7967  		mem := v_2
  7968  		v.Reset(ssaop.OpPPC64MOVBstore)
  7969  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7970  		v.Aux = ssa.SymToAux(sym)
  7971  		v.AddArg3(ptr, x, mem)
  7972  		return true
  7973  	}
  7974  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  7975  	// result: (MOVBstore [off] {sym} ptr x mem)
  7976  	for {
  7977  		off := ssa.AuxIntToInt32(v.AuxInt)
  7978  		sym := ssa.AuxToSym(v.Aux)
  7979  		ptr := v_0
  7980  		if v_1.Op != ssaop.OpPPC64MOVHreg {
  7981  			break
  7982  		}
  7983  		x := v_1.Args[0]
  7984  		mem := v_2
  7985  		v.Reset(ssaop.OpPPC64MOVBstore)
  7986  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7987  		v.Aux = ssa.SymToAux(sym)
  7988  		v.AddArg3(ptr, x, mem)
  7989  		return true
  7990  	}
  7991  	// match: (MOVBstore [off] {sym} ptr (MOVHZreg x) mem)
  7992  	// result: (MOVBstore [off] {sym} ptr x mem)
  7993  	for {
  7994  		off := ssa.AuxIntToInt32(v.AuxInt)
  7995  		sym := ssa.AuxToSym(v.Aux)
  7996  		ptr := v_0
  7997  		if v_1.Op != ssaop.OpPPC64MOVHZreg {
  7998  			break
  7999  		}
  8000  		x := v_1.Args[0]
  8001  		mem := v_2
  8002  		v.Reset(ssaop.OpPPC64MOVBstore)
  8003  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8004  		v.Aux = ssa.SymToAux(sym)
  8005  		v.AddArg3(ptr, x, mem)
  8006  		return true
  8007  	}
  8008  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  8009  	// result: (MOVBstore [off] {sym} ptr x mem)
  8010  	for {
  8011  		off := ssa.AuxIntToInt32(v.AuxInt)
  8012  		sym := ssa.AuxToSym(v.Aux)
  8013  		ptr := v_0
  8014  		if v_1.Op != ssaop.OpPPC64MOVWreg {
  8015  			break
  8016  		}
  8017  		x := v_1.Args[0]
  8018  		mem := v_2
  8019  		v.Reset(ssaop.OpPPC64MOVBstore)
  8020  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8021  		v.Aux = ssa.SymToAux(sym)
  8022  		v.AddArg3(ptr, x, mem)
  8023  		return true
  8024  	}
  8025  	// match: (MOVBstore [off] {sym} ptr (MOVWZreg x) mem)
  8026  	// result: (MOVBstore [off] {sym} ptr x mem)
  8027  	for {
  8028  		off := ssa.AuxIntToInt32(v.AuxInt)
  8029  		sym := ssa.AuxToSym(v.Aux)
  8030  		ptr := v_0
  8031  		if v_1.Op != ssaop.OpPPC64MOVWZreg {
  8032  			break
  8033  		}
  8034  		x := v_1.Args[0]
  8035  		mem := v_2
  8036  		v.Reset(ssaop.OpPPC64MOVBstore)
  8037  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8038  		v.Aux = ssa.SymToAux(sym)
  8039  		v.AddArg3(ptr, x, mem)
  8040  		return true
  8041  	}
  8042  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHreg x) [c]) mem)
  8043  	// cond: c <= 8
  8044  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8045  	for {
  8046  		off := ssa.AuxIntToInt32(v.AuxInt)
  8047  		sym := ssa.AuxToSym(v.Aux)
  8048  		ptr := v_0
  8049  		if v_1.Op != ssaop.OpPPC64SRWconst {
  8050  			break
  8051  		}
  8052  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8053  		v_1_0 := v_1.Args[0]
  8054  		if v_1_0.Op != ssaop.OpPPC64MOVHreg {
  8055  			break
  8056  		}
  8057  		x := v_1_0.Args[0]
  8058  		mem := v_2
  8059  		if !(c <= 8) {
  8060  			break
  8061  		}
  8062  		v.Reset(ssaop.OpPPC64MOVBstore)
  8063  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8064  		v.Aux = ssa.SymToAux(sym)
  8065  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8066  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8067  		v0.AddArg(x)
  8068  		v.AddArg3(ptr, v0, mem)
  8069  		return true
  8070  	}
  8071  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHZreg x) [c]) mem)
  8072  	// cond: c <= 8
  8073  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8074  	for {
  8075  		off := ssa.AuxIntToInt32(v.AuxInt)
  8076  		sym := ssa.AuxToSym(v.Aux)
  8077  		ptr := v_0
  8078  		if v_1.Op != ssaop.OpPPC64SRWconst {
  8079  			break
  8080  		}
  8081  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8082  		v_1_0 := v_1.Args[0]
  8083  		if v_1_0.Op != ssaop.OpPPC64MOVHZreg {
  8084  			break
  8085  		}
  8086  		x := v_1_0.Args[0]
  8087  		mem := v_2
  8088  		if !(c <= 8) {
  8089  			break
  8090  		}
  8091  		v.Reset(ssaop.OpPPC64MOVBstore)
  8092  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8093  		v.Aux = ssa.SymToAux(sym)
  8094  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8095  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8096  		v0.AddArg(x)
  8097  		v.AddArg3(ptr, v0, mem)
  8098  		return true
  8099  	}
  8100  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWreg x) [c]) mem)
  8101  	// cond: c <= 24
  8102  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8103  	for {
  8104  		off := ssa.AuxIntToInt32(v.AuxInt)
  8105  		sym := ssa.AuxToSym(v.Aux)
  8106  		ptr := v_0
  8107  		if v_1.Op != ssaop.OpPPC64SRWconst {
  8108  			break
  8109  		}
  8110  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8111  		v_1_0 := v_1.Args[0]
  8112  		if v_1_0.Op != ssaop.OpPPC64MOVWreg {
  8113  			break
  8114  		}
  8115  		x := v_1_0.Args[0]
  8116  		mem := v_2
  8117  		if !(c <= 24) {
  8118  			break
  8119  		}
  8120  		v.Reset(ssaop.OpPPC64MOVBstore)
  8121  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8122  		v.Aux = ssa.SymToAux(sym)
  8123  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8124  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8125  		v0.AddArg(x)
  8126  		v.AddArg3(ptr, v0, mem)
  8127  		return true
  8128  	}
  8129  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWZreg x) [c]) mem)
  8130  	// cond: c <= 24
  8131  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  8132  	for {
  8133  		off := ssa.AuxIntToInt32(v.AuxInt)
  8134  		sym := ssa.AuxToSym(v.Aux)
  8135  		ptr := v_0
  8136  		if v_1.Op != ssaop.OpPPC64SRWconst {
  8137  			break
  8138  		}
  8139  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8140  		v_1_0 := v_1.Args[0]
  8141  		if v_1_0.Op != ssaop.OpPPC64MOVWZreg {
  8142  			break
  8143  		}
  8144  		x := v_1_0.Args[0]
  8145  		mem := v_2
  8146  		if !(c <= 24) {
  8147  			break
  8148  		}
  8149  		v.Reset(ssaop.OpPPC64MOVBstore)
  8150  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8151  		v.Aux = ssa.SymToAux(sym)
  8152  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8153  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8154  		v0.AddArg(x)
  8155  		v.AddArg3(ptr, v0, mem)
  8156  		return true
  8157  	}
  8158  	return false
  8159  }
  8160  func rewriteValue_OpPPC64MOVBstoreidx(v *ssa.Value) bool {
  8161  	v_3 := v.Args[3]
  8162  	v_2 := v.Args[2]
  8163  	v_1 := v.Args[1]
  8164  	v_0 := v.Args[0]
  8165  	b := v.Block
  8166  	typ := &b.Func.Config.Types
  8167  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  8168  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  8169  	// result: (MOVBstore [int32(c)] ptr val mem)
  8170  	for {
  8171  		ptr := v_0
  8172  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  8173  			break
  8174  		}
  8175  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8176  		val := v_2
  8177  		mem := v_3
  8178  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  8179  			break
  8180  		}
  8181  		v.Reset(ssaop.OpPPC64MOVBstore)
  8182  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8183  		v.AddArg3(ptr, val, mem)
  8184  		return true
  8185  	}
  8186  	// match: (MOVBstoreidx (MOVDconst [c]) ptr val mem)
  8187  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  8188  	// result: (MOVBstore [int32(c)] ptr val mem)
  8189  	for {
  8190  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  8191  			break
  8192  		}
  8193  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8194  		ptr := v_1
  8195  		val := v_2
  8196  		mem := v_3
  8197  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  8198  			break
  8199  		}
  8200  		v.Reset(ssaop.OpPPC64MOVBstore)
  8201  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8202  		v.AddArg3(ptr, val, mem)
  8203  		return true
  8204  	}
  8205  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  8206  	// result: (MOVBstoreidx ptr idx x mem)
  8207  	for {
  8208  		ptr := v_0
  8209  		idx := v_1
  8210  		if v_2.Op != ssaop.OpPPC64MOVBreg {
  8211  			break
  8212  		}
  8213  		x := v_2.Args[0]
  8214  		mem := v_3
  8215  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8216  		v.AddArg4(ptr, idx, x, mem)
  8217  		return true
  8218  	}
  8219  	// match: (MOVBstoreidx ptr idx (MOVBZreg x) mem)
  8220  	// result: (MOVBstoreidx ptr idx x mem)
  8221  	for {
  8222  		ptr := v_0
  8223  		idx := v_1
  8224  		if v_2.Op != ssaop.OpPPC64MOVBZreg {
  8225  			break
  8226  		}
  8227  		x := v_2.Args[0]
  8228  		mem := v_3
  8229  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8230  		v.AddArg4(ptr, idx, x, mem)
  8231  		return true
  8232  	}
  8233  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  8234  	// result: (MOVBstoreidx ptr idx x mem)
  8235  	for {
  8236  		ptr := v_0
  8237  		idx := v_1
  8238  		if v_2.Op != ssaop.OpPPC64MOVHreg {
  8239  			break
  8240  		}
  8241  		x := v_2.Args[0]
  8242  		mem := v_3
  8243  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8244  		v.AddArg4(ptr, idx, x, mem)
  8245  		return true
  8246  	}
  8247  	// match: (MOVBstoreidx ptr idx (MOVHZreg x) mem)
  8248  	// result: (MOVBstoreidx ptr idx x mem)
  8249  	for {
  8250  		ptr := v_0
  8251  		idx := v_1
  8252  		if v_2.Op != ssaop.OpPPC64MOVHZreg {
  8253  			break
  8254  		}
  8255  		x := v_2.Args[0]
  8256  		mem := v_3
  8257  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8258  		v.AddArg4(ptr, idx, x, mem)
  8259  		return true
  8260  	}
  8261  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  8262  	// result: (MOVBstoreidx ptr idx x mem)
  8263  	for {
  8264  		ptr := v_0
  8265  		idx := v_1
  8266  		if v_2.Op != ssaop.OpPPC64MOVWreg {
  8267  			break
  8268  		}
  8269  		x := v_2.Args[0]
  8270  		mem := v_3
  8271  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8272  		v.AddArg4(ptr, idx, x, mem)
  8273  		return true
  8274  	}
  8275  	// match: (MOVBstoreidx ptr idx (MOVWZreg x) mem)
  8276  	// result: (MOVBstoreidx ptr idx x mem)
  8277  	for {
  8278  		ptr := v_0
  8279  		idx := v_1
  8280  		if v_2.Op != ssaop.OpPPC64MOVWZreg {
  8281  			break
  8282  		}
  8283  		x := v_2.Args[0]
  8284  		mem := v_3
  8285  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8286  		v.AddArg4(ptr, idx, x, mem)
  8287  		return true
  8288  	}
  8289  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVHreg x) [c]) mem)
  8290  	// cond: c <= 8
  8291  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8292  	for {
  8293  		ptr := v_0
  8294  		idx := v_1
  8295  		if v_2.Op != ssaop.OpPPC64SRWconst {
  8296  			break
  8297  		}
  8298  		c := ssa.AuxIntToInt64(v_2.AuxInt)
  8299  		v_2_0 := v_2.Args[0]
  8300  		if v_2_0.Op != ssaop.OpPPC64MOVHreg {
  8301  			break
  8302  		}
  8303  		x := v_2_0.Args[0]
  8304  		mem := v_3
  8305  		if !(c <= 8) {
  8306  			break
  8307  		}
  8308  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8309  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8310  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8311  		v0.AddArg(x)
  8312  		v.AddArg4(ptr, idx, v0, mem)
  8313  		return true
  8314  	}
  8315  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVHZreg x) [c]) mem)
  8316  	// cond: c <= 8
  8317  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8318  	for {
  8319  		ptr := v_0
  8320  		idx := v_1
  8321  		if v_2.Op != ssaop.OpPPC64SRWconst {
  8322  			break
  8323  		}
  8324  		c := ssa.AuxIntToInt64(v_2.AuxInt)
  8325  		v_2_0 := v_2.Args[0]
  8326  		if v_2_0.Op != ssaop.OpPPC64MOVHZreg {
  8327  			break
  8328  		}
  8329  		x := v_2_0.Args[0]
  8330  		mem := v_3
  8331  		if !(c <= 8) {
  8332  			break
  8333  		}
  8334  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8335  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8336  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8337  		v0.AddArg(x)
  8338  		v.AddArg4(ptr, idx, v0, mem)
  8339  		return true
  8340  	}
  8341  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVWreg x) [c]) mem)
  8342  	// cond: c <= 24
  8343  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8344  	for {
  8345  		ptr := v_0
  8346  		idx := v_1
  8347  		if v_2.Op != ssaop.OpPPC64SRWconst {
  8348  			break
  8349  		}
  8350  		c := ssa.AuxIntToInt64(v_2.AuxInt)
  8351  		v_2_0 := v_2.Args[0]
  8352  		if v_2_0.Op != ssaop.OpPPC64MOVWreg {
  8353  			break
  8354  		}
  8355  		x := v_2_0.Args[0]
  8356  		mem := v_3
  8357  		if !(c <= 24) {
  8358  			break
  8359  		}
  8360  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8361  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8362  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8363  		v0.AddArg(x)
  8364  		v.AddArg4(ptr, idx, v0, mem)
  8365  		return true
  8366  	}
  8367  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVWZreg x) [c]) mem)
  8368  	// cond: c <= 24
  8369  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8370  	for {
  8371  		ptr := v_0
  8372  		idx := v_1
  8373  		if v_2.Op != ssaop.OpPPC64SRWconst {
  8374  			break
  8375  		}
  8376  		c := ssa.AuxIntToInt64(v_2.AuxInt)
  8377  		v_2_0 := v_2.Args[0]
  8378  		if v_2_0.Op != ssaop.OpPPC64MOVWZreg {
  8379  			break
  8380  		}
  8381  		x := v_2_0.Args[0]
  8382  		mem := v_3
  8383  		if !(c <= 24) {
  8384  			break
  8385  		}
  8386  		v.Reset(ssaop.OpPPC64MOVBstoreidx)
  8387  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRWconst, typ.UInt32)
  8388  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  8389  		v0.AddArg(x)
  8390  		v.AddArg4(ptr, idx, v0, mem)
  8391  		return true
  8392  	}
  8393  	return false
  8394  }
  8395  func rewriteValue_OpPPC64MOVBstorezero(v *ssa.Value) bool {
  8396  	v_1 := v.Args[1]
  8397  	v_0 := v.Args[0]
  8398  	// match: (MOVBstorezero [off1] {sym} (ADDconst [off2] x) mem)
  8399  	// cond: ((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1)+off2)))
  8400  	// result: (MOVBstorezero [off1+int32(off2)] {sym} x mem)
  8401  	for {
  8402  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8403  		sym := ssa.AuxToSym(v.Aux)
  8404  		if v_0.Op != ssaop.OpPPC64ADDconst {
  8405  			break
  8406  		}
  8407  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  8408  		x := v_0.Args[0]
  8409  		mem := v_1
  8410  		if !((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1) + off2))) {
  8411  			break
  8412  		}
  8413  		v.Reset(ssaop.OpPPC64MOVBstorezero)
  8414  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  8415  		v.Aux = ssa.SymToAux(sym)
  8416  		v.AddArg2(x, mem)
  8417  		return true
  8418  	}
  8419  	// match: (MOVBstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  8420  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  8421  	// result: (MOVBstorezero [off1+off2] {ssa.MergeSym(sym1,sym2)} x mem)
  8422  	for {
  8423  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8424  		sym1 := ssa.AuxToSym(v.Aux)
  8425  		p := v_0
  8426  		if p.Op != ssaop.OpPPC64MOVDaddr {
  8427  			break
  8428  		}
  8429  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  8430  		sym2 := ssa.AuxToSym(p.Aux)
  8431  		x := p.Args[0]
  8432  		mem := v_1
  8433  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  8434  			break
  8435  		}
  8436  		v.Reset(ssaop.OpPPC64MOVBstorezero)
  8437  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8438  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8439  		v.AddArg2(x, mem)
  8440  		return true
  8441  	}
  8442  	return false
  8443  }
  8444  func rewriteValue_OpPPC64MOVDaddr(v *ssa.Value) bool {
  8445  	v_0 := v.Args[0]
  8446  	// match: (MOVDaddr {sym} [n] p:(ADD x y))
  8447  	// cond: sym == nil && n == 0
  8448  	// result: p
  8449  	for {
  8450  		n := ssa.AuxIntToInt32(v.AuxInt)
  8451  		sym := ssa.AuxToSym(v.Aux)
  8452  		p := v_0
  8453  		if p.Op != ssaop.OpPPC64ADD {
  8454  			break
  8455  		}
  8456  		if !(sym == nil && n == 0) {
  8457  			break
  8458  		}
  8459  		v.CopyOf(p)
  8460  		return true
  8461  	}
  8462  	// match: (MOVDaddr {sym} [n] ptr)
  8463  	// cond: sym == nil && n == 0 && (ptr.Op == ssaop.OpArgIntReg || ptr.Op == ssaop.OpPhi)
  8464  	// result: ptr
  8465  	for {
  8466  		n := ssa.AuxIntToInt32(v.AuxInt)
  8467  		sym := ssa.AuxToSym(v.Aux)
  8468  		ptr := v_0
  8469  		if !(sym == nil && n == 0 && (ptr.Op == ssaop.OpArgIntReg || ptr.Op == ssaop.OpPhi)) {
  8470  			break
  8471  		}
  8472  		v.CopyOf(ptr)
  8473  		return true
  8474  	}
  8475  	return false
  8476  }
  8477  func rewriteValue_OpPPC64MOVDload(v *ssa.Value) bool {
  8478  	v_1 := v.Args[1]
  8479  	v_0 := v.Args[0]
  8480  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr x _))
  8481  	// result: (MFVSRD x)
  8482  	for {
  8483  		off := ssa.AuxIntToInt32(v.AuxInt)
  8484  		sym := ssa.AuxToSym(v.Aux)
  8485  		ptr := v_0
  8486  		if v_1.Op != ssaop.OpPPC64FMOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  8487  			break
  8488  		}
  8489  		x := v_1.Args[1]
  8490  		if ptr != v_1.Args[0] {
  8491  			break
  8492  		}
  8493  		v.Reset(ssaop.OpPPC64MFVSRD)
  8494  		v.AddArg(x)
  8495  		return true
  8496  	}
  8497  	// match: (MOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  8498  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  8499  	// result: (MOVDload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
  8500  	for {
  8501  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8502  		sym1 := ssa.AuxToSym(v.Aux)
  8503  		p := v_0
  8504  		if p.Op != ssaop.OpPPC64MOVDaddr {
  8505  			break
  8506  		}
  8507  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  8508  		sym2 := ssa.AuxToSym(p.Aux)
  8509  		ptr := p.Args[0]
  8510  		mem := v_1
  8511  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  8512  			break
  8513  		}
  8514  		v.Reset(ssaop.OpPPC64MOVDload)
  8515  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8516  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8517  		v.AddArg2(ptr, mem)
  8518  		return true
  8519  	}
  8520  	// match: (MOVDload [off1] {sym} (ADDconst [off2] x) mem)
  8521  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  8522  	// result: (MOVDload [off1+int32(off2)] {sym} x mem)
  8523  	for {
  8524  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8525  		sym := ssa.AuxToSym(v.Aux)
  8526  		if v_0.Op != ssaop.OpPPC64ADDconst {
  8527  			break
  8528  		}
  8529  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  8530  		x := v_0.Args[0]
  8531  		mem := v_1
  8532  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  8533  			break
  8534  		}
  8535  		v.Reset(ssaop.OpPPC64MOVDload)
  8536  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  8537  		v.Aux = ssa.SymToAux(sym)
  8538  		v.AddArg2(x, mem)
  8539  		return true
  8540  	}
  8541  	// match: (MOVDload [0] {sym} p:(ADD ptr idx) mem)
  8542  	// cond: sym == nil && p.Uses == 1
  8543  	// result: (MOVDloadidx ptr idx mem)
  8544  	for {
  8545  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  8546  			break
  8547  		}
  8548  		sym := ssa.AuxToSym(v.Aux)
  8549  		p := v_0
  8550  		if p.Op != ssaop.OpPPC64ADD {
  8551  			break
  8552  		}
  8553  		idx := p.Args[1]
  8554  		ptr := p.Args[0]
  8555  		mem := v_1
  8556  		if !(sym == nil && p.Uses == 1) {
  8557  			break
  8558  		}
  8559  		v.Reset(ssaop.OpPPC64MOVDloadidx)
  8560  		v.AddArg3(ptr, idx, mem)
  8561  		return true
  8562  	}
  8563  	return false
  8564  }
  8565  func rewriteValue_OpPPC64MOVDloadidx(v *ssa.Value) bool {
  8566  	v_2 := v.Args[2]
  8567  	v_1 := v.Args[1]
  8568  	v_0 := v.Args[0]
  8569  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  8570  	// cond: ((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  8571  	// result: (MOVDload [int32(c)] ptr mem)
  8572  	for {
  8573  		ptr := v_0
  8574  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  8575  			break
  8576  		}
  8577  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8578  		mem := v_2
  8579  		if !((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  8580  			break
  8581  		}
  8582  		v.Reset(ssaop.OpPPC64MOVDload)
  8583  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8584  		v.AddArg2(ptr, mem)
  8585  		return true
  8586  	}
  8587  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  8588  	// cond: ((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  8589  	// result: (MOVDload [int32(c)] ptr mem)
  8590  	for {
  8591  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  8592  			break
  8593  		}
  8594  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8595  		ptr := v_1
  8596  		mem := v_2
  8597  		if !((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  8598  			break
  8599  		}
  8600  		v.Reset(ssaop.OpPPC64MOVDload)
  8601  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8602  		v.AddArg2(ptr, mem)
  8603  		return true
  8604  	}
  8605  	return false
  8606  }
  8607  func rewriteValue_OpPPC64MOVDstore(v *ssa.Value) bool {
  8608  	v_2 := v.Args[2]
  8609  	v_1 := v.Args[1]
  8610  	v_0 := v.Args[0]
  8611  	b := v.Block
  8612  	// match: (MOVDstore [off] {sym} ptr (MFVSRD x) mem)
  8613  	// result: (FMOVDstore [off] {sym} ptr x mem)
  8614  	for {
  8615  		off := ssa.AuxIntToInt32(v.AuxInt)
  8616  		sym := ssa.AuxToSym(v.Aux)
  8617  		ptr := v_0
  8618  		if v_1.Op != ssaop.OpPPC64MFVSRD {
  8619  			break
  8620  		}
  8621  		x := v_1.Args[0]
  8622  		mem := v_2
  8623  		v.Reset(ssaop.OpPPC64FMOVDstore)
  8624  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8625  		v.Aux = ssa.SymToAux(sym)
  8626  		v.AddArg3(ptr, x, mem)
  8627  		return true
  8628  	}
  8629  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] x) val mem)
  8630  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  8631  	// result: (MOVDstore [off1+int32(off2)] {sym} x val mem)
  8632  	for {
  8633  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8634  		sym := ssa.AuxToSym(v.Aux)
  8635  		if v_0.Op != ssaop.OpPPC64ADDconst {
  8636  			break
  8637  		}
  8638  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  8639  		x := v_0.Args[0]
  8640  		val := v_1
  8641  		mem := v_2
  8642  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  8643  			break
  8644  		}
  8645  		v.Reset(ssaop.OpPPC64MOVDstore)
  8646  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  8647  		v.Aux = ssa.SymToAux(sym)
  8648  		v.AddArg3(x, val, mem)
  8649  		return true
  8650  	}
  8651  	// match: (MOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  8652  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  8653  	// result: (MOVDstore [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  8654  	for {
  8655  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8656  		sym1 := ssa.AuxToSym(v.Aux)
  8657  		p := v_0
  8658  		if p.Op != ssaop.OpPPC64MOVDaddr {
  8659  			break
  8660  		}
  8661  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  8662  		sym2 := ssa.AuxToSym(p.Aux)
  8663  		ptr := p.Args[0]
  8664  		val := v_1
  8665  		mem := v_2
  8666  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  8667  			break
  8668  		}
  8669  		v.Reset(ssaop.OpPPC64MOVDstore)
  8670  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8671  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8672  		v.AddArg3(ptr, val, mem)
  8673  		return true
  8674  	}
  8675  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [0]) mem)
  8676  	// result: (MOVDstorezero [off] {sym} ptr mem)
  8677  	for {
  8678  		off := ssa.AuxIntToInt32(v.AuxInt)
  8679  		sym := ssa.AuxToSym(v.Aux)
  8680  		ptr := v_0
  8681  		if v_1.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  8682  			break
  8683  		}
  8684  		mem := v_2
  8685  		v.Reset(ssaop.OpPPC64MOVDstorezero)
  8686  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8687  		v.Aux = ssa.SymToAux(sym)
  8688  		v.AddArg2(ptr, mem)
  8689  		return true
  8690  	}
  8691  	// match: (MOVDstore [0] {sym} p:(ADD ptr idx) val mem)
  8692  	// cond: sym == nil && p.Uses == 1
  8693  	// result: (MOVDstoreidx ptr idx val mem)
  8694  	for {
  8695  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  8696  			break
  8697  		}
  8698  		sym := ssa.AuxToSym(v.Aux)
  8699  		p := v_0
  8700  		if p.Op != ssaop.OpPPC64ADD {
  8701  			break
  8702  		}
  8703  		idx := p.Args[1]
  8704  		ptr := p.Args[0]
  8705  		val := v_1
  8706  		mem := v_2
  8707  		if !(sym == nil && p.Uses == 1) {
  8708  			break
  8709  		}
  8710  		v.Reset(ssaop.OpPPC64MOVDstoreidx)
  8711  		v.AddArg4(ptr, idx, val, mem)
  8712  		return true
  8713  	}
  8714  	// match: (MOVDstore [off] {sym} ptr r:(BRD val) mem)
  8715  	// cond: r.Uses == 1
  8716  	// result: (MOVDBRstore (MOVDaddr <ptr.Type> [off] {sym} ptr) val mem)
  8717  	for {
  8718  		off := ssa.AuxIntToInt32(v.AuxInt)
  8719  		sym := ssa.AuxToSym(v.Aux)
  8720  		ptr := v_0
  8721  		r := v_1
  8722  		if r.Op != ssaop.OpPPC64BRD {
  8723  			break
  8724  		}
  8725  		val := r.Args[0]
  8726  		mem := v_2
  8727  		if !(r.Uses == 1) {
  8728  			break
  8729  		}
  8730  		v.Reset(ssaop.OpPPC64MOVDBRstore)
  8731  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  8732  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  8733  		v0.Aux = ssa.SymToAux(sym)
  8734  		v0.AddArg(ptr)
  8735  		v.AddArg3(v0, val, mem)
  8736  		return true
  8737  	}
  8738  	// match: (MOVDstore [off] {sym} ptr (Bswap64 val) mem)
  8739  	// result: (MOVDBRstore (MOVDaddr <ptr.Type> [off] {sym} ptr) val mem)
  8740  	for {
  8741  		off := ssa.AuxIntToInt32(v.AuxInt)
  8742  		sym := ssa.AuxToSym(v.Aux)
  8743  		ptr := v_0
  8744  		if v_1.Op != ssaop.OpBswap64 {
  8745  			break
  8746  		}
  8747  		val := v_1.Args[0]
  8748  		mem := v_2
  8749  		v.Reset(ssaop.OpPPC64MOVDBRstore)
  8750  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
  8751  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  8752  		v0.Aux = ssa.SymToAux(sym)
  8753  		v0.AddArg(ptr)
  8754  		v.AddArg3(v0, val, mem)
  8755  		return true
  8756  	}
  8757  	return false
  8758  }
  8759  func rewriteValue_OpPPC64MOVDstoreidx(v *ssa.Value) bool {
  8760  	v_3 := v.Args[3]
  8761  	v_2 := v.Args[2]
  8762  	v_1 := v.Args[1]
  8763  	v_0 := v.Args[0]
  8764  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  8765  	// cond: ((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  8766  	// result: (MOVDstore [int32(c)] ptr val mem)
  8767  	for {
  8768  		ptr := v_0
  8769  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  8770  			break
  8771  		}
  8772  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8773  		val := v_2
  8774  		mem := v_3
  8775  		if !((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  8776  			break
  8777  		}
  8778  		v.Reset(ssaop.OpPPC64MOVDstore)
  8779  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8780  		v.AddArg3(ptr, val, mem)
  8781  		return true
  8782  	}
  8783  	// match: (MOVDstoreidx (MOVDconst [c]) ptr val mem)
  8784  	// cond: ((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  8785  	// result: (MOVDstore [int32(c)] ptr val mem)
  8786  	for {
  8787  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  8788  			break
  8789  		}
  8790  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8791  		ptr := v_1
  8792  		val := v_2
  8793  		mem := v_3
  8794  		if !((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  8795  			break
  8796  		}
  8797  		v.Reset(ssaop.OpPPC64MOVDstore)
  8798  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8799  		v.AddArg3(ptr, val, mem)
  8800  		return true
  8801  	}
  8802  	// match: (MOVDstoreidx ptr idx r:(BRD val) mem)
  8803  	// cond: r.Uses == 1
  8804  	// result: (MOVDBRstoreidx ptr idx val mem)
  8805  	for {
  8806  		ptr := v_0
  8807  		idx := v_1
  8808  		r := v_2
  8809  		if r.Op != ssaop.OpPPC64BRD {
  8810  			break
  8811  		}
  8812  		val := r.Args[0]
  8813  		mem := v_3
  8814  		if !(r.Uses == 1) {
  8815  			break
  8816  		}
  8817  		v.Reset(ssaop.OpPPC64MOVDBRstoreidx)
  8818  		v.AddArg4(ptr, idx, val, mem)
  8819  		return true
  8820  	}
  8821  	// match: (MOVDstoreidx ptr idx (Bswap64 val) mem)
  8822  	// result: (MOVDBRstoreidx ptr idx val mem)
  8823  	for {
  8824  		ptr := v_0
  8825  		idx := v_1
  8826  		if v_2.Op != ssaop.OpBswap64 {
  8827  			break
  8828  		}
  8829  		val := v_2.Args[0]
  8830  		mem := v_3
  8831  		v.Reset(ssaop.OpPPC64MOVDBRstoreidx)
  8832  		v.AddArg4(ptr, idx, val, mem)
  8833  		return true
  8834  	}
  8835  	return false
  8836  }
  8837  func rewriteValue_OpPPC64MOVDstorezero(v *ssa.Value) bool {
  8838  	v_1 := v.Args[1]
  8839  	v_0 := v.Args[0]
  8840  	// match: (MOVDstorezero [off1] {sym} (ADDconst [off2] x) mem)
  8841  	// cond: ((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1)+off2)))
  8842  	// result: (MOVDstorezero [off1+int32(off2)] {sym} x mem)
  8843  	for {
  8844  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8845  		sym := ssa.AuxToSym(v.Aux)
  8846  		if v_0.Op != ssaop.OpPPC64ADDconst {
  8847  			break
  8848  		}
  8849  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  8850  		x := v_0.Args[0]
  8851  		mem := v_1
  8852  		if !((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1) + off2))) {
  8853  			break
  8854  		}
  8855  		v.Reset(ssaop.OpPPC64MOVDstorezero)
  8856  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  8857  		v.Aux = ssa.SymToAux(sym)
  8858  		v.AddArg2(x, mem)
  8859  		return true
  8860  	}
  8861  	// match: (MOVDstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  8862  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  8863  	// result: (MOVDstorezero [off1+off2] {ssa.MergeSym(sym1,sym2)} x mem)
  8864  	for {
  8865  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8866  		sym1 := ssa.AuxToSym(v.Aux)
  8867  		p := v_0
  8868  		if p.Op != ssaop.OpPPC64MOVDaddr {
  8869  			break
  8870  		}
  8871  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  8872  		sym2 := ssa.AuxToSym(p.Aux)
  8873  		x := p.Args[0]
  8874  		mem := v_1
  8875  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  8876  			break
  8877  		}
  8878  		v.Reset(ssaop.OpPPC64MOVDstorezero)
  8879  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8880  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8881  		v.AddArg2(x, mem)
  8882  		return true
  8883  	}
  8884  	return false
  8885  }
  8886  func rewriteValue_OpPPC64MOVHBRstore(v *ssa.Value) bool {
  8887  	v_2 := v.Args[2]
  8888  	v_1 := v.Args[1]
  8889  	v_0 := v.Args[0]
  8890  	// match: (MOVHBRstore ptr (MOVHreg x) mem)
  8891  	// result: (MOVHBRstore ptr x mem)
  8892  	for {
  8893  		ptr := v_0
  8894  		if v_1.Op != ssaop.OpPPC64MOVHreg {
  8895  			break
  8896  		}
  8897  		x := v_1.Args[0]
  8898  		mem := v_2
  8899  		v.Reset(ssaop.OpPPC64MOVHBRstore)
  8900  		v.AddArg3(ptr, x, mem)
  8901  		return true
  8902  	}
  8903  	// match: (MOVHBRstore ptr (MOVHZreg x) mem)
  8904  	// result: (MOVHBRstore ptr x mem)
  8905  	for {
  8906  		ptr := v_0
  8907  		if v_1.Op != ssaop.OpPPC64MOVHZreg {
  8908  			break
  8909  		}
  8910  		x := v_1.Args[0]
  8911  		mem := v_2
  8912  		v.Reset(ssaop.OpPPC64MOVHBRstore)
  8913  		v.AddArg3(ptr, x, mem)
  8914  		return true
  8915  	}
  8916  	// match: (MOVHBRstore ptr (MOVWreg x) mem)
  8917  	// result: (MOVHBRstore ptr x mem)
  8918  	for {
  8919  		ptr := v_0
  8920  		if v_1.Op != ssaop.OpPPC64MOVWreg {
  8921  			break
  8922  		}
  8923  		x := v_1.Args[0]
  8924  		mem := v_2
  8925  		v.Reset(ssaop.OpPPC64MOVHBRstore)
  8926  		v.AddArg3(ptr, x, mem)
  8927  		return true
  8928  	}
  8929  	// match: (MOVHBRstore ptr (MOVWZreg x) mem)
  8930  	// result: (MOVHBRstore ptr x mem)
  8931  	for {
  8932  		ptr := v_0
  8933  		if v_1.Op != ssaop.OpPPC64MOVWZreg {
  8934  			break
  8935  		}
  8936  		x := v_1.Args[0]
  8937  		mem := v_2
  8938  		v.Reset(ssaop.OpPPC64MOVHBRstore)
  8939  		v.AddArg3(ptr, x, mem)
  8940  		return true
  8941  	}
  8942  	return false
  8943  }
  8944  func rewriteValue_OpPPC64MOVHZload(v *ssa.Value) bool {
  8945  	v_1 := v.Args[1]
  8946  	v_0 := v.Args[0]
  8947  	// match: (MOVHZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  8948  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  8949  	// result: (MOVHZload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
  8950  	for {
  8951  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8952  		sym1 := ssa.AuxToSym(v.Aux)
  8953  		p := v_0
  8954  		if p.Op != ssaop.OpPPC64MOVDaddr {
  8955  			break
  8956  		}
  8957  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  8958  		sym2 := ssa.AuxToSym(p.Aux)
  8959  		ptr := p.Args[0]
  8960  		mem := v_1
  8961  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  8962  			break
  8963  		}
  8964  		v.Reset(ssaop.OpPPC64MOVHZload)
  8965  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8966  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8967  		v.AddArg2(ptr, mem)
  8968  		return true
  8969  	}
  8970  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] x) mem)
  8971  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  8972  	// result: (MOVHZload [off1+int32(off2)] {sym} x mem)
  8973  	for {
  8974  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8975  		sym := ssa.AuxToSym(v.Aux)
  8976  		if v_0.Op != ssaop.OpPPC64ADDconst {
  8977  			break
  8978  		}
  8979  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  8980  		x := v_0.Args[0]
  8981  		mem := v_1
  8982  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  8983  			break
  8984  		}
  8985  		v.Reset(ssaop.OpPPC64MOVHZload)
  8986  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  8987  		v.Aux = ssa.SymToAux(sym)
  8988  		v.AddArg2(x, mem)
  8989  		return true
  8990  	}
  8991  	// match: (MOVHZload [0] {sym} p:(ADD ptr idx) mem)
  8992  	// cond: sym == nil && p.Uses == 1
  8993  	// result: (MOVHZloadidx ptr idx mem)
  8994  	for {
  8995  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  8996  			break
  8997  		}
  8998  		sym := ssa.AuxToSym(v.Aux)
  8999  		p := v_0
  9000  		if p.Op != ssaop.OpPPC64ADD {
  9001  			break
  9002  		}
  9003  		idx := p.Args[1]
  9004  		ptr := p.Args[0]
  9005  		mem := v_1
  9006  		if !(sym == nil && p.Uses == 1) {
  9007  			break
  9008  		}
  9009  		v.Reset(ssaop.OpPPC64MOVHZloadidx)
  9010  		v.AddArg3(ptr, idx, mem)
  9011  		return true
  9012  	}
  9013  	return false
  9014  }
  9015  func rewriteValue_OpPPC64MOVHZloadidx(v *ssa.Value) bool {
  9016  	v_2 := v.Args[2]
  9017  	v_1 := v.Args[1]
  9018  	v_0 := v.Args[0]
  9019  	// match: (MOVHZloadidx ptr (MOVDconst [c]) mem)
  9020  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  9021  	// result: (MOVHZload [int32(c)] ptr mem)
  9022  	for {
  9023  		ptr := v_0
  9024  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  9025  			break
  9026  		}
  9027  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9028  		mem := v_2
  9029  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  9030  			break
  9031  		}
  9032  		v.Reset(ssaop.OpPPC64MOVHZload)
  9033  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  9034  		v.AddArg2(ptr, mem)
  9035  		return true
  9036  	}
  9037  	// match: (MOVHZloadidx (MOVDconst [c]) ptr mem)
  9038  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  9039  	// result: (MOVHZload [int32(c)] ptr mem)
  9040  	for {
  9041  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  9042  			break
  9043  		}
  9044  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9045  		ptr := v_1
  9046  		mem := v_2
  9047  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  9048  			break
  9049  		}
  9050  		v.Reset(ssaop.OpPPC64MOVHZload)
  9051  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  9052  		v.AddArg2(ptr, mem)
  9053  		return true
  9054  	}
  9055  	return false
  9056  }
  9057  func rewriteValue_OpPPC64MOVHZreg(v *ssa.Value) bool {
  9058  	v_0 := v.Args[0]
  9059  	b := v.Block
  9060  	typ := &b.Func.Config.Types
  9061  	// match: (MOVHZreg y:(ANDconst [c] _))
  9062  	// cond: uint64(c) <= 0xFFFF
  9063  	// result: y
  9064  	for {
  9065  		y := v_0
  9066  		if y.Op != ssaop.OpPPC64ANDconst {
  9067  			break
  9068  		}
  9069  		c := ssa.AuxIntToInt64(y.AuxInt)
  9070  		if !(uint64(c) <= 0xFFFF) {
  9071  			break
  9072  		}
  9073  		v.CopyOf(y)
  9074  		return true
  9075  	}
  9076  	// match: (MOVHZreg (SRWconst [c] (MOVBZreg x)))
  9077  	// result: (SRWconst [c] (MOVBZreg x))
  9078  	for {
  9079  		if v_0.Op != ssaop.OpPPC64SRWconst {
  9080  			break
  9081  		}
  9082  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9083  		v_0_0 := v_0.Args[0]
  9084  		if v_0_0.Op != ssaop.OpPPC64MOVBZreg {
  9085  			break
  9086  		}
  9087  		x := v_0_0.Args[0]
  9088  		v.Reset(ssaop.OpPPC64SRWconst)
  9089  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9090  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
  9091  		v0.AddArg(x)
  9092  		v.AddArg(v0)
  9093  		return true
  9094  	}
  9095  	// match: (MOVHZreg (SRWconst [c] (MOVHZreg x)))
  9096  	// result: (SRWconst [c] (MOVHZreg x))
  9097  	for {
  9098  		if v_0.Op != ssaop.OpPPC64SRWconst {
  9099  			break
  9100  		}
  9101  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9102  		v_0_0 := v_0.Args[0]
  9103  		if v_0_0.Op != ssaop.OpPPC64MOVHZreg {
  9104  			break
  9105  		}
  9106  		x := v_0_0.Args[0]
  9107  		v.Reset(ssaop.OpPPC64SRWconst)
  9108  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9109  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
  9110  		v0.AddArg(x)
  9111  		v.AddArg(v0)
  9112  		return true
  9113  	}
  9114  	// match: (MOVHZreg (SRWconst [c] x))
  9115  	// cond: x.Type.Size() <= 16
  9116  	// result: (SRWconst [c] x)
  9117  	for {
  9118  		if v_0.Op != ssaop.OpPPC64SRWconst {
  9119  			break
  9120  		}
  9121  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9122  		x := v_0.Args[0]
  9123  		if !(x.Type.Size() <= 16) {
  9124  			break
  9125  		}
  9126  		v.Reset(ssaop.OpPPC64SRWconst)
  9127  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9128  		v.AddArg(x)
  9129  		return true
  9130  	}
  9131  	// match: (MOVHZreg (SRDconst [c] x))
  9132  	// cond: c>=48
  9133  	// result: (SRDconst [c] x)
  9134  	for {
  9135  		if v_0.Op != ssaop.OpPPC64SRDconst {
  9136  			break
  9137  		}
  9138  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9139  		x := v_0.Args[0]
  9140  		if !(c >= 48) {
  9141  			break
  9142  		}
  9143  		v.Reset(ssaop.OpPPC64SRDconst)
  9144  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9145  		v.AddArg(x)
  9146  		return true
  9147  	}
  9148  	// match: (MOVHZreg (SRWconst [c] x))
  9149  	// cond: c>=16
  9150  	// result: (SRWconst [c] x)
  9151  	for {
  9152  		if v_0.Op != ssaop.OpPPC64SRWconst {
  9153  			break
  9154  		}
  9155  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9156  		x := v_0.Args[0]
  9157  		if !(c >= 16) {
  9158  			break
  9159  		}
  9160  		v.Reset(ssaop.OpPPC64SRWconst)
  9161  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9162  		v.AddArg(x)
  9163  		return true
  9164  	}
  9165  	// match: (MOVHZreg (RLWINM [r] y))
  9166  	// cond: mergePPC64AndRlwinm(0xFFFF,r) != 0
  9167  	// result: (RLWINM [mergePPC64AndRlwinm(0xFFFF,r)] y)
  9168  	for {
  9169  		if v_0.Op != ssaop.OpPPC64RLWINM {
  9170  			break
  9171  		}
  9172  		r := ssa.AuxIntToInt64(v_0.AuxInt)
  9173  		y := v_0.Args[0]
  9174  		if !(mergePPC64AndRlwinm(0xFFFF, r) != 0) {
  9175  			break
  9176  		}
  9177  		v.Reset(ssaop.OpPPC64RLWINM)
  9178  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64AndRlwinm(0xFFFF, r))
  9179  		v.AddArg(y)
  9180  		return true
  9181  	}
  9182  	// match: (MOVHZreg y:(MOVHZreg _))
  9183  	// result: y
  9184  	for {
  9185  		y := v_0
  9186  		if y.Op != ssaop.OpPPC64MOVHZreg {
  9187  			break
  9188  		}
  9189  		v.CopyOf(y)
  9190  		return true
  9191  	}
  9192  	// match: (MOVHZreg y:(MOVBZreg _))
  9193  	// result: y
  9194  	for {
  9195  		y := v_0
  9196  		if y.Op != ssaop.OpPPC64MOVBZreg {
  9197  			break
  9198  		}
  9199  		v.CopyOf(y)
  9200  		return true
  9201  	}
  9202  	// match: (MOVHZreg y:(MOVHBRload _ _))
  9203  	// result: y
  9204  	for {
  9205  		y := v_0
  9206  		if y.Op != ssaop.OpPPC64MOVHBRload {
  9207  			break
  9208  		}
  9209  		v.CopyOf(y)
  9210  		return true
  9211  	}
  9212  	// match: (MOVHZreg y:(MOVHreg x))
  9213  	// result: (MOVHZreg x)
  9214  	for {
  9215  		y := v_0
  9216  		if y.Op != ssaop.OpPPC64MOVHreg {
  9217  			break
  9218  		}
  9219  		x := y.Args[0]
  9220  		v.Reset(ssaop.OpPPC64MOVHZreg)
  9221  		v.AddArg(x)
  9222  		return true
  9223  	}
  9224  	// match: (MOVHZreg (OR <t> x (MOVWZreg y)))
  9225  	// result: (MOVHZreg (OR <t> x y))
  9226  	for {
  9227  		if v_0.Op != ssaop.OpPPC64OR {
  9228  			break
  9229  		}
  9230  		t := v_0.Type
  9231  		_ = v_0.Args[1]
  9232  		v_0_0 := v_0.Args[0]
  9233  		v_0_1 := v_0.Args[1]
  9234  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9235  			x := v_0_0
  9236  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
  9237  				continue
  9238  			}
  9239  			y := v_0_1.Args[0]
  9240  			v.Reset(ssaop.OpPPC64MOVHZreg)
  9241  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, t)
  9242  			v0.AddArg2(x, y)
  9243  			v.AddArg(v0)
  9244  			return true
  9245  		}
  9246  		break
  9247  	}
  9248  	// match: (MOVHZreg (XOR <t> x (MOVWZreg y)))
  9249  	// result: (MOVHZreg (XOR <t> x y))
  9250  	for {
  9251  		if v_0.Op != ssaop.OpPPC64XOR {
  9252  			break
  9253  		}
  9254  		t := v_0.Type
  9255  		_ = v_0.Args[1]
  9256  		v_0_0 := v_0.Args[0]
  9257  		v_0_1 := v_0.Args[1]
  9258  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9259  			x := v_0_0
  9260  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
  9261  				continue
  9262  			}
  9263  			y := v_0_1.Args[0]
  9264  			v.Reset(ssaop.OpPPC64MOVHZreg)
  9265  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64XOR, t)
  9266  			v0.AddArg2(x, y)
  9267  			v.AddArg(v0)
  9268  			return true
  9269  		}
  9270  		break
  9271  	}
  9272  	// match: (MOVHZreg (AND <t> x (MOVWZreg y)))
  9273  	// result: (MOVHZreg (AND <t> x y))
  9274  	for {
  9275  		if v_0.Op != ssaop.OpPPC64AND {
  9276  			break
  9277  		}
  9278  		t := v_0.Type
  9279  		_ = v_0.Args[1]
  9280  		v_0_0 := v_0.Args[0]
  9281  		v_0_1 := v_0.Args[1]
  9282  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9283  			x := v_0_0
  9284  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
  9285  				continue
  9286  			}
  9287  			y := v_0_1.Args[0]
  9288  			v.Reset(ssaop.OpPPC64MOVHZreg)
  9289  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64AND, t)
  9290  			v0.AddArg2(x, y)
  9291  			v.AddArg(v0)
  9292  			return true
  9293  		}
  9294  		break
  9295  	}
  9296  	// match: (MOVHZreg (OR <t> x (MOVHZreg y)))
  9297  	// result: (MOVHZreg (OR <t> x y))
  9298  	for {
  9299  		if v_0.Op != ssaop.OpPPC64OR {
  9300  			break
  9301  		}
  9302  		t := v_0.Type
  9303  		_ = v_0.Args[1]
  9304  		v_0_0 := v_0.Args[0]
  9305  		v_0_1 := v_0.Args[1]
  9306  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9307  			x := v_0_0
  9308  			if v_0_1.Op != ssaop.OpPPC64MOVHZreg {
  9309  				continue
  9310  			}
  9311  			y := v_0_1.Args[0]
  9312  			v.Reset(ssaop.OpPPC64MOVHZreg)
  9313  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, t)
  9314  			v0.AddArg2(x, y)
  9315  			v.AddArg(v0)
  9316  			return true
  9317  		}
  9318  		break
  9319  	}
  9320  	// match: (MOVHZreg (XOR <t> x (MOVHZreg y)))
  9321  	// result: (MOVHZreg (XOR <t> x y))
  9322  	for {
  9323  		if v_0.Op != ssaop.OpPPC64XOR {
  9324  			break
  9325  		}
  9326  		t := v_0.Type
  9327  		_ = v_0.Args[1]
  9328  		v_0_0 := v_0.Args[0]
  9329  		v_0_1 := v_0.Args[1]
  9330  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9331  			x := v_0_0
  9332  			if v_0_1.Op != ssaop.OpPPC64MOVHZreg {
  9333  				continue
  9334  			}
  9335  			y := v_0_1.Args[0]
  9336  			v.Reset(ssaop.OpPPC64MOVHZreg)
  9337  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64XOR, t)
  9338  			v0.AddArg2(x, y)
  9339  			v.AddArg(v0)
  9340  			return true
  9341  		}
  9342  		break
  9343  	}
  9344  	// match: (MOVHZreg (AND <t> x (MOVHZreg y)))
  9345  	// result: (MOVHZreg (AND <t> x y))
  9346  	for {
  9347  		if v_0.Op != ssaop.OpPPC64AND {
  9348  			break
  9349  		}
  9350  		t := v_0.Type
  9351  		_ = v_0.Args[1]
  9352  		v_0_0 := v_0.Args[0]
  9353  		v_0_1 := v_0.Args[1]
  9354  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9355  			x := v_0_0
  9356  			if v_0_1.Op != ssaop.OpPPC64MOVHZreg {
  9357  				continue
  9358  			}
  9359  			y := v_0_1.Args[0]
  9360  			v.Reset(ssaop.OpPPC64MOVHZreg)
  9361  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64AND, t)
  9362  			v0.AddArg2(x, y)
  9363  			v.AddArg(v0)
  9364  			return true
  9365  		}
  9366  		break
  9367  	}
  9368  	// match: (MOVHZreg z:(ANDconst [c] (MOVBZload ptr x)))
  9369  	// result: z
  9370  	for {
  9371  		z := v_0
  9372  		if z.Op != ssaop.OpPPC64ANDconst {
  9373  			break
  9374  		}
  9375  		z_0 := z.Args[0]
  9376  		if z_0.Op != ssaop.OpPPC64MOVBZload {
  9377  			break
  9378  		}
  9379  		v.CopyOf(z)
  9380  		return true
  9381  	}
  9382  	// match: (MOVHZreg z:(AND y (MOVHZload ptr x)))
  9383  	// result: z
  9384  	for {
  9385  		z := v_0
  9386  		if z.Op != ssaop.OpPPC64AND {
  9387  			break
  9388  		}
  9389  		_ = z.Args[1]
  9390  		z_0 := z.Args[0]
  9391  		z_1 := z.Args[1]
  9392  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
  9393  			if z_1.Op != ssaop.OpPPC64MOVHZload {
  9394  				continue
  9395  			}
  9396  			v.CopyOf(z)
  9397  			return true
  9398  		}
  9399  		break
  9400  	}
  9401  	// match: (MOVHZreg z:(ANDconst [c] (MOVHZload ptr x)))
  9402  	// result: z
  9403  	for {
  9404  		z := v_0
  9405  		if z.Op != ssaop.OpPPC64ANDconst {
  9406  			break
  9407  		}
  9408  		z_0 := z.Args[0]
  9409  		if z_0.Op != ssaop.OpPPC64MOVHZload {
  9410  			break
  9411  		}
  9412  		v.CopyOf(z)
  9413  		return true
  9414  	}
  9415  	// match: (MOVHZreg x:(MOVBZload _ _))
  9416  	// result: x
  9417  	for {
  9418  		x := v_0
  9419  		if x.Op != ssaop.OpPPC64MOVBZload {
  9420  			break
  9421  		}
  9422  		v.CopyOf(x)
  9423  		return true
  9424  	}
  9425  	// match: (MOVHZreg x:(MOVBZloadidx _ _ _))
  9426  	// result: x
  9427  	for {
  9428  		x := v_0
  9429  		if x.Op != ssaop.OpPPC64MOVBZloadidx {
  9430  			break
  9431  		}
  9432  		v.CopyOf(x)
  9433  		return true
  9434  	}
  9435  	// match: (MOVHZreg x:(MOVHZload _ _))
  9436  	// result: x
  9437  	for {
  9438  		x := v_0
  9439  		if x.Op != ssaop.OpPPC64MOVHZload {
  9440  			break
  9441  		}
  9442  		v.CopyOf(x)
  9443  		return true
  9444  	}
  9445  	// match: (MOVHZreg x:(MOVHZloadidx _ _ _))
  9446  	// result: x
  9447  	for {
  9448  		x := v_0
  9449  		if x.Op != ssaop.OpPPC64MOVHZloadidx {
  9450  			break
  9451  		}
  9452  		v.CopyOf(x)
  9453  		return true
  9454  	}
  9455  	// match: (MOVHZreg x:(Arg <t>))
  9456  	// cond: (ssa.Is8BitInt(t) || ssa.Is16BitInt(t)) && !t.IsSigned()
  9457  	// result: x
  9458  	for {
  9459  		x := v_0
  9460  		if x.Op != ssaop.OpArg {
  9461  			break
  9462  		}
  9463  		t := x.Type
  9464  		if !((ssa.Is8BitInt(t) || ssa.Is16BitInt(t)) && !t.IsSigned()) {
  9465  			break
  9466  		}
  9467  		v.CopyOf(x)
  9468  		return true
  9469  	}
  9470  	// match: (MOVHZreg (MOVDconst [c]))
  9471  	// result: (MOVDconst [int64(uint16(c))])
  9472  	for {
  9473  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  9474  			break
  9475  		}
  9476  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9477  		v.Reset(ssaop.OpPPC64MOVDconst)
  9478  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(c)))
  9479  		return true
  9480  	}
  9481  	return false
  9482  }
  9483  func rewriteValue_OpPPC64MOVHload(v *ssa.Value) bool {
  9484  	v_1 := v.Args[1]
  9485  	v_0 := v.Args[0]
  9486  	// match: (MOVHload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  9487  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  9488  	// result: (MOVHload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
  9489  	for {
  9490  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9491  		sym1 := ssa.AuxToSym(v.Aux)
  9492  		p := v_0
  9493  		if p.Op != ssaop.OpPPC64MOVDaddr {
  9494  			break
  9495  		}
  9496  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  9497  		sym2 := ssa.AuxToSym(p.Aux)
  9498  		ptr := p.Args[0]
  9499  		mem := v_1
  9500  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  9501  			break
  9502  		}
  9503  		v.Reset(ssaop.OpPPC64MOVHload)
  9504  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9505  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9506  		v.AddArg2(ptr, mem)
  9507  		return true
  9508  	}
  9509  	// match: (MOVHload [off1] {sym} (ADDconst [off2] x) mem)
  9510  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  9511  	// result: (MOVHload [off1+int32(off2)] {sym} x mem)
  9512  	for {
  9513  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9514  		sym := ssa.AuxToSym(v.Aux)
  9515  		if v_0.Op != ssaop.OpPPC64ADDconst {
  9516  			break
  9517  		}
  9518  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  9519  		x := v_0.Args[0]
  9520  		mem := v_1
  9521  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  9522  			break
  9523  		}
  9524  		v.Reset(ssaop.OpPPC64MOVHload)
  9525  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  9526  		v.Aux = ssa.SymToAux(sym)
  9527  		v.AddArg2(x, mem)
  9528  		return true
  9529  	}
  9530  	// match: (MOVHload [0] {sym} p:(ADD ptr idx) mem)
  9531  	// cond: sym == nil && p.Uses == 1
  9532  	// result: (MOVHloadidx ptr idx mem)
  9533  	for {
  9534  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  9535  			break
  9536  		}
  9537  		sym := ssa.AuxToSym(v.Aux)
  9538  		p := v_0
  9539  		if p.Op != ssaop.OpPPC64ADD {
  9540  			break
  9541  		}
  9542  		idx := p.Args[1]
  9543  		ptr := p.Args[0]
  9544  		mem := v_1
  9545  		if !(sym == nil && p.Uses == 1) {
  9546  			break
  9547  		}
  9548  		v.Reset(ssaop.OpPPC64MOVHloadidx)
  9549  		v.AddArg3(ptr, idx, mem)
  9550  		return true
  9551  	}
  9552  	return false
  9553  }
  9554  func rewriteValue_OpPPC64MOVHloadidx(v *ssa.Value) bool {
  9555  	v_2 := v.Args[2]
  9556  	v_1 := v.Args[1]
  9557  	v_0 := v.Args[0]
  9558  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
  9559  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  9560  	// result: (MOVHload [int32(c)] ptr mem)
  9561  	for {
  9562  		ptr := v_0
  9563  		if v_1.Op != ssaop.OpPPC64MOVDconst {
  9564  			break
  9565  		}
  9566  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9567  		mem := v_2
  9568  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  9569  			break
  9570  		}
  9571  		v.Reset(ssaop.OpPPC64MOVHload)
  9572  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  9573  		v.AddArg2(ptr, mem)
  9574  		return true
  9575  	}
  9576  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
  9577  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
  9578  	// result: (MOVHload [int32(c)] ptr mem)
  9579  	for {
  9580  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  9581  			break
  9582  		}
  9583  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9584  		ptr := v_1
  9585  		mem := v_2
  9586  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
  9587  			break
  9588  		}
  9589  		v.Reset(ssaop.OpPPC64MOVHload)
  9590  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  9591  		v.AddArg2(ptr, mem)
  9592  		return true
  9593  	}
  9594  	return false
  9595  }
  9596  func rewriteValue_OpPPC64MOVHreg(v *ssa.Value) bool {
  9597  	v_0 := v.Args[0]
  9598  	b := v.Block
  9599  	typ := &b.Func.Config.Types
  9600  	// match: (MOVHreg y:(ANDconst [c] _))
  9601  	// cond: uint64(c) <= 0x7FFF
  9602  	// result: y
  9603  	for {
  9604  		y := v_0
  9605  		if y.Op != ssaop.OpPPC64ANDconst {
  9606  			break
  9607  		}
  9608  		c := ssa.AuxIntToInt64(y.AuxInt)
  9609  		if !(uint64(c) <= 0x7FFF) {
  9610  			break
  9611  		}
  9612  		v.CopyOf(y)
  9613  		return true
  9614  	}
  9615  	// match: (MOVHreg (SRAWconst [c] (MOVBreg x)))
  9616  	// result: (SRAWconst [c] (MOVBreg x))
  9617  	for {
  9618  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  9619  			break
  9620  		}
  9621  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9622  		v_0_0 := v_0.Args[0]
  9623  		if v_0_0.Op != ssaop.OpPPC64MOVBreg {
  9624  			break
  9625  		}
  9626  		x := v_0_0.Args[0]
  9627  		v.Reset(ssaop.OpPPC64SRAWconst)
  9628  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9629  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
  9630  		v0.AddArg(x)
  9631  		v.AddArg(v0)
  9632  		return true
  9633  	}
  9634  	// match: (MOVHreg (SRAWconst [c] (MOVHreg x)))
  9635  	// result: (SRAWconst [c] (MOVHreg x))
  9636  	for {
  9637  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  9638  			break
  9639  		}
  9640  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9641  		v_0_0 := v_0.Args[0]
  9642  		if v_0_0.Op != ssaop.OpPPC64MOVHreg {
  9643  			break
  9644  		}
  9645  		x := v_0_0.Args[0]
  9646  		v.Reset(ssaop.OpPPC64SRAWconst)
  9647  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9648  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
  9649  		v0.AddArg(x)
  9650  		v.AddArg(v0)
  9651  		return true
  9652  	}
  9653  	// match: (MOVHreg (SRAWconst [c] x))
  9654  	// cond: x.Type.Size() <= 16
  9655  	// result: (SRAWconst [c] x)
  9656  	for {
  9657  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  9658  			break
  9659  		}
  9660  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9661  		x := v_0.Args[0]
  9662  		if !(x.Type.Size() <= 16) {
  9663  			break
  9664  		}
  9665  		v.Reset(ssaop.OpPPC64SRAWconst)
  9666  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9667  		v.AddArg(x)
  9668  		return true
  9669  	}
  9670  	// match: (MOVHreg (SRDconst [c] x))
  9671  	// cond: c>48
  9672  	// result: (SRDconst [c] x)
  9673  	for {
  9674  		if v_0.Op != ssaop.OpPPC64SRDconst {
  9675  			break
  9676  		}
  9677  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9678  		x := v_0.Args[0]
  9679  		if !(c > 48) {
  9680  			break
  9681  		}
  9682  		v.Reset(ssaop.OpPPC64SRDconst)
  9683  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9684  		v.AddArg(x)
  9685  		return true
  9686  	}
  9687  	// match: (MOVHreg (SRDconst [c] x))
  9688  	// cond: c==48
  9689  	// result: (SRADconst [c] x)
  9690  	for {
  9691  		if v_0.Op != ssaop.OpPPC64SRDconst {
  9692  			break
  9693  		}
  9694  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9695  		x := v_0.Args[0]
  9696  		if !(c == 48) {
  9697  			break
  9698  		}
  9699  		v.Reset(ssaop.OpPPC64SRADconst)
  9700  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9701  		v.AddArg(x)
  9702  		return true
  9703  	}
  9704  	// match: (MOVHreg (SRADconst [c] x))
  9705  	// cond: c>=48
  9706  	// result: (SRADconst [c] x)
  9707  	for {
  9708  		if v_0.Op != ssaop.OpPPC64SRADconst {
  9709  			break
  9710  		}
  9711  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9712  		x := v_0.Args[0]
  9713  		if !(c >= 48) {
  9714  			break
  9715  		}
  9716  		v.Reset(ssaop.OpPPC64SRADconst)
  9717  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9718  		v.AddArg(x)
  9719  		return true
  9720  	}
  9721  	// match: (MOVHreg (SRWconst [c] x))
  9722  	// cond: c>16
  9723  	// result: (SRWconst [c] x)
  9724  	for {
  9725  		if v_0.Op != ssaop.OpPPC64SRWconst {
  9726  			break
  9727  		}
  9728  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9729  		x := v_0.Args[0]
  9730  		if !(c > 16) {
  9731  			break
  9732  		}
  9733  		v.Reset(ssaop.OpPPC64SRWconst)
  9734  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9735  		v.AddArg(x)
  9736  		return true
  9737  	}
  9738  	// match: (MOVHreg (SRAWconst [c] x))
  9739  	// cond: c>=16
  9740  	// result: (SRAWconst [c] x)
  9741  	for {
  9742  		if v_0.Op != ssaop.OpPPC64SRAWconst {
  9743  			break
  9744  		}
  9745  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9746  		x := v_0.Args[0]
  9747  		if !(c >= 16) {
  9748  			break
  9749  		}
  9750  		v.Reset(ssaop.OpPPC64SRAWconst)
  9751  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9752  		v.AddArg(x)
  9753  		return true
  9754  	}
  9755  	// match: (MOVHreg (SRWconst [c] x))
  9756  	// cond: c==16
  9757  	// result: (SRAWconst [c] x)
  9758  	for {
  9759  		if v_0.Op != ssaop.OpPPC64SRWconst {
  9760  			break
  9761  		}
  9762  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9763  		x := v_0.Args[0]
  9764  		if !(c == 16) {
  9765  			break
  9766  		}
  9767  		v.Reset(ssaop.OpPPC64SRAWconst)
  9768  		v.AuxInt = ssa.Int64ToAuxInt(c)
  9769  		v.AddArg(x)
  9770  		return true
  9771  	}
  9772  	// match: (MOVHreg y:(MOVHreg _))
  9773  	// result: y
  9774  	for {
  9775  		y := v_0
  9776  		if y.Op != ssaop.OpPPC64MOVHreg {
  9777  			break
  9778  		}
  9779  		v.CopyOf(y)
  9780  		return true
  9781  	}
  9782  	// match: (MOVHreg y:(MOVBreg _))
  9783  	// result: y
  9784  	for {
  9785  		y := v_0
  9786  		if y.Op != ssaop.OpPPC64MOVBreg {
  9787  			break
  9788  		}
  9789  		v.CopyOf(y)
  9790  		return true
  9791  	}
  9792  	// match: (MOVHreg y:(MOVHZreg x))
  9793  	// result: (MOVHreg x)
  9794  	for {
  9795  		y := v_0
  9796  		if y.Op != ssaop.OpPPC64MOVHZreg {
  9797  			break
  9798  		}
  9799  		x := y.Args[0]
  9800  		v.Reset(ssaop.OpPPC64MOVHreg)
  9801  		v.AddArg(x)
  9802  		return true
  9803  	}
  9804  	// match: (MOVHreg x:(MOVHload _ _))
  9805  	// result: x
  9806  	for {
  9807  		x := v_0
  9808  		if x.Op != ssaop.OpPPC64MOVHload {
  9809  			break
  9810  		}
  9811  		v.CopyOf(x)
  9812  		return true
  9813  	}
  9814  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
  9815  	// result: x
  9816  	for {
  9817  		x := v_0
  9818  		if x.Op != ssaop.OpPPC64MOVHloadidx {
  9819  			break
  9820  		}
  9821  		v.CopyOf(x)
  9822  		return true
  9823  	}
  9824  	// match: (MOVHreg x:(Arg <t>))
  9825  	// cond: (ssa.Is8BitInt(t) || ssa.Is16BitInt(t)) && t.IsSigned()
  9826  	// result: x
  9827  	for {
  9828  		x := v_0
  9829  		if x.Op != ssaop.OpArg {
  9830  			break
  9831  		}
  9832  		t := x.Type
  9833  		if !((ssa.Is8BitInt(t) || ssa.Is16BitInt(t)) && t.IsSigned()) {
  9834  			break
  9835  		}
  9836  		v.CopyOf(x)
  9837  		return true
  9838  	}
  9839  	// match: (MOVHreg (MOVDconst [c]))
  9840  	// result: (MOVDconst [int64(int16(c))])
  9841  	for {
  9842  		if v_0.Op != ssaop.OpPPC64MOVDconst {
  9843  			break
  9844  		}
  9845  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9846  		v.Reset(ssaop.OpPPC64MOVDconst)
  9847  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(c)))
  9848  		return true
  9849  	}
  9850  	return false
  9851  }
  9852  func rewriteValue_OpPPC64MOVHstore(v *ssa.Value) bool {
  9853  	v_2 := v.Args[2]
  9854  	v_1 := v.Args[1]
  9855  	v_0 := v.Args[0]
  9856  	b := v.Block
  9857  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] x) val mem)
  9858  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
  9859  	// result: (MOVHstore [off1+int32(off2)] {sym} x val mem)
  9860  	for {
  9861  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9862  		sym := ssa.AuxToSym(v.Aux)
  9863  		if v_0.Op != ssaop.OpPPC64ADDconst {
  9864  			break
  9865  		}
  9866  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  9867  		x := v_0.Args[0]
  9868  		val := v_1
  9869  		mem := v_2
  9870  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
  9871  			break
  9872  		}
  9873  		v.Reset(ssaop.OpPPC64MOVHstore)
  9874  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
  9875  		v.Aux = ssa.SymToAux(sym)
  9876  		v.AddArg3(x, val, mem)
  9877  		return true
  9878  	}
  9879  	// match: (MOVHstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  9880  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
  9881  	// result: (MOVHstore [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr val mem)
  9882  	for {
  9883  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9884  		sym1 := ssa.AuxToSym(v.Aux)
  9885  		p := v_0
  9886  		if p.Op != ssaop.OpPPC64MOVDaddr {
  9887  			break
  9888  		}
  9889  		off2 := ssa.AuxIntToInt32(p.AuxInt)
  9890  		sym2 := ssa.AuxToSym(p.Aux)
  9891  		ptr := p.Args[0]
  9892  		val := v_1
  9893  		mem := v_2
  9894  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
  9895  			break
  9896  		}
  9897  		v.Reset(ssaop.OpPPC64MOVHstore)
  9898  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9899  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9900  		v.AddArg3(ptr, val, mem)
  9901  		return true
  9902  	}
  9903  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [0]) mem)
  9904  	// result: (MOVHstorezero [off] {sym} ptr mem)
  9905  	for {
  9906  		off := ssa.AuxIntToInt32(v.AuxInt)
  9907  		sym := ssa.AuxToSym(v.Aux)
  9908  		ptr := v_0
  9909  		if v_1.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  9910  			break
  9911  		}
  9912  		mem := v_2
  9913  		v.Reset(ssaop.OpPPC64MOVHstorezero)
  9914  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9915  		v.Aux = ssa.SymToAux(sym)
  9916  		v.AddArg2(ptr, mem)
  9917  		return true
  9918  	}
  9919  	// match: (MOVHstore [0] {sym} p:(ADD ptr idx) val mem)
  9920  	// cond: sym == nil && p.Uses == 1
  9921  	// result: (MOVHstoreidx ptr idx val mem)
  9922  	for {
  9923  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  9924  			break
  9925  		}
  9926  		sym := ssa.AuxToSym(v.Aux)
  9927  		p := v_0
  9928  		if p.Op != ssaop.OpPPC64ADD {
  9929  			break
  9930  		}
  9931  		idx := p.Args[1]
  9932  		ptr := p.Args[0]
  9933  		val := v_1
  9934  		mem := v_2
  9935  		if !(sym == nil && p.Uses == 1) {
  9936  			break
  9937  		}
  9938  		v.Reset(ssaop.OpPPC64MOVHstoreidx)
  9939  		v.AddArg4(ptr, idx, val, mem)
  9940  		return true
  9941  	}
  9942  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  9943  	// result: (MOVHstore [off] {sym} ptr x mem)
  9944  	for {
  9945  		off := ssa.AuxIntToInt32(v.AuxInt)
  9946  		sym := ssa.AuxToSym(v.Aux)
  9947  		ptr := v_0
  9948  		if v_1.Op != ssaop.OpPPC64MOVHreg {
  9949  			break
  9950  		}
  9951  		x := v_1.Args[0]
  9952  		mem := v_2
  9953  		v.Reset(ssaop.OpPPC64MOVHstore)
  9954  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9955  		v.Aux = ssa.SymToAux(sym)
  9956  		v.AddArg3(ptr, x, mem)
  9957  		return true
  9958  	}
  9959  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
  9960  	// result: (MOVHstore [off] {sym} ptr x mem)
  9961  	for {
  9962  		off := ssa.AuxIntToInt32(v.AuxInt)
  9963  		sym := ssa.AuxToSym(v.Aux)
  9964  		ptr := v_0
  9965  		if v_1.Op != ssaop.OpPPC64MOVHZreg {
  9966  			break
  9967  		}
  9968  		x := v_1.Args[0]
  9969  		mem := v_2
  9970  		v.Reset(ssaop.OpPPC64MOVHstore)
  9971  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9972  		v.Aux = ssa.SymToAux(sym)
  9973  		v.AddArg3(ptr, x, mem)
  9974  		return true
  9975  	}
  9976  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  9977  	// result: (MOVHstore [off] {sym} ptr x mem)
  9978  	for {
  9979  		off := ssa.AuxIntToInt32(v.AuxInt)
  9980  		sym := ssa.AuxToSym(v.Aux)
  9981  		ptr := v_0
  9982  		if v_1.Op != ssaop.OpPPC64MOVWreg {
  9983  			break
  9984  		}
  9985  		x := v_1.Args[0]
  9986  		mem := v_2
  9987  		v.Reset(ssaop.OpPPC64MOVHstore)
  9988  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9989  		v.Aux = ssa.SymToAux(sym)
  9990  		v.AddArg3(ptr, x, mem)
  9991  		return true
  9992  	}
  9993  	// match: (MOVHstore [off] {sym} ptr (MOVWZreg x) mem)
  9994  	// result: (MOVHstore [off] {sym} ptr x mem)
  9995  	for {
  9996  		off := ssa.AuxIntToInt32(v.AuxInt)
  9997  		sym := ssa.AuxToSym(v.Aux)
  9998  		ptr := v_0
  9999  		if v_1.Op != ssaop.OpPPC64MOVWZreg {
 10000  			break
 10001  		}
 10002  		x := v_1.Args[0]
 10003  		mem := v_2
 10004  		v.Reset(ssaop.OpPPC64MOVHstore)
 10005  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10006  		v.Aux = ssa.SymToAux(sym)
 10007  		v.AddArg3(ptr, x, mem)
 10008  		return true
 10009  	}
 10010  	// match: (MOVHstore [off] {sym} ptr r:(BRH val) mem)
 10011  	// cond: r.Uses == 1
 10012  	// result: (MOVHBRstore (MOVDaddr <ptr.Type> [off] {sym} ptr) val mem)
 10013  	for {
 10014  		off := ssa.AuxIntToInt32(v.AuxInt)
 10015  		sym := ssa.AuxToSym(v.Aux)
 10016  		ptr := v_0
 10017  		r := v_1
 10018  		if r.Op != ssaop.OpPPC64BRH {
 10019  			break
 10020  		}
 10021  		val := r.Args[0]
 10022  		mem := v_2
 10023  		if !(r.Uses == 1) {
 10024  			break
 10025  		}
 10026  		v.Reset(ssaop.OpPPC64MOVHBRstore)
 10027  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
 10028  		v0.AuxInt = ssa.Int32ToAuxInt(off)
 10029  		v0.Aux = ssa.SymToAux(sym)
 10030  		v0.AddArg(ptr)
 10031  		v.AddArg3(v0, val, mem)
 10032  		return true
 10033  	}
 10034  	// match: (MOVHstore [off] {sym} ptr (Bswap16 val) mem)
 10035  	// result: (MOVHBRstore (MOVDaddr <ptr.Type> [off] {sym} ptr) val mem)
 10036  	for {
 10037  		off := ssa.AuxIntToInt32(v.AuxInt)
 10038  		sym := ssa.AuxToSym(v.Aux)
 10039  		ptr := v_0
 10040  		if v_1.Op != ssaop.OpBswap16 {
 10041  			break
 10042  		}
 10043  		val := v_1.Args[0]
 10044  		mem := v_2
 10045  		v.Reset(ssaop.OpPPC64MOVHBRstore)
 10046  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
 10047  		v0.AuxInt = ssa.Int32ToAuxInt(off)
 10048  		v0.Aux = ssa.SymToAux(sym)
 10049  		v0.AddArg(ptr)
 10050  		v.AddArg3(v0, val, mem)
 10051  		return true
 10052  	}
 10053  	return false
 10054  }
 10055  func rewriteValue_OpPPC64MOVHstoreidx(v *ssa.Value) bool {
 10056  	v_3 := v.Args[3]
 10057  	v_2 := v.Args[2]
 10058  	v_1 := v.Args[1]
 10059  	v_0 := v.Args[0]
 10060  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
 10061  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 10062  	// result: (MOVHstore [int32(c)] ptr val mem)
 10063  	for {
 10064  		ptr := v_0
 10065  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 10066  			break
 10067  		}
 10068  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10069  		val := v_2
 10070  		mem := v_3
 10071  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 10072  			break
 10073  		}
 10074  		v.Reset(ssaop.OpPPC64MOVHstore)
 10075  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10076  		v.AddArg3(ptr, val, mem)
 10077  		return true
 10078  	}
 10079  	// match: (MOVHstoreidx (MOVDconst [c]) ptr val mem)
 10080  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 10081  	// result: (MOVHstore [int32(c)] ptr val mem)
 10082  	for {
 10083  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 10084  			break
 10085  		}
 10086  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10087  		ptr := v_1
 10088  		val := v_2
 10089  		mem := v_3
 10090  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 10091  			break
 10092  		}
 10093  		v.Reset(ssaop.OpPPC64MOVHstore)
 10094  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10095  		v.AddArg3(ptr, val, mem)
 10096  		return true
 10097  	}
 10098  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
 10099  	// result: (MOVHstoreidx ptr idx x mem)
 10100  	for {
 10101  		ptr := v_0
 10102  		idx := v_1
 10103  		if v_2.Op != ssaop.OpPPC64MOVHreg {
 10104  			break
 10105  		}
 10106  		x := v_2.Args[0]
 10107  		mem := v_3
 10108  		v.Reset(ssaop.OpPPC64MOVHstoreidx)
 10109  		v.AddArg4(ptr, idx, x, mem)
 10110  		return true
 10111  	}
 10112  	// match: (MOVHstoreidx ptr idx (MOVHZreg x) mem)
 10113  	// result: (MOVHstoreidx ptr idx x mem)
 10114  	for {
 10115  		ptr := v_0
 10116  		idx := v_1
 10117  		if v_2.Op != ssaop.OpPPC64MOVHZreg {
 10118  			break
 10119  		}
 10120  		x := v_2.Args[0]
 10121  		mem := v_3
 10122  		v.Reset(ssaop.OpPPC64MOVHstoreidx)
 10123  		v.AddArg4(ptr, idx, x, mem)
 10124  		return true
 10125  	}
 10126  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
 10127  	// result: (MOVHstoreidx ptr idx x mem)
 10128  	for {
 10129  		ptr := v_0
 10130  		idx := v_1
 10131  		if v_2.Op != ssaop.OpPPC64MOVWreg {
 10132  			break
 10133  		}
 10134  		x := v_2.Args[0]
 10135  		mem := v_3
 10136  		v.Reset(ssaop.OpPPC64MOVHstoreidx)
 10137  		v.AddArg4(ptr, idx, x, mem)
 10138  		return true
 10139  	}
 10140  	// match: (MOVHstoreidx ptr idx (MOVWZreg x) mem)
 10141  	// result: (MOVHstoreidx ptr idx x mem)
 10142  	for {
 10143  		ptr := v_0
 10144  		idx := v_1
 10145  		if v_2.Op != ssaop.OpPPC64MOVWZreg {
 10146  			break
 10147  		}
 10148  		x := v_2.Args[0]
 10149  		mem := v_3
 10150  		v.Reset(ssaop.OpPPC64MOVHstoreidx)
 10151  		v.AddArg4(ptr, idx, x, mem)
 10152  		return true
 10153  	}
 10154  	// match: (MOVHstoreidx ptr idx r:(BRH val) mem)
 10155  	// cond: r.Uses == 1
 10156  	// result: (MOVHBRstoreidx ptr idx val mem)
 10157  	for {
 10158  		ptr := v_0
 10159  		idx := v_1
 10160  		r := v_2
 10161  		if r.Op != ssaop.OpPPC64BRH {
 10162  			break
 10163  		}
 10164  		val := r.Args[0]
 10165  		mem := v_3
 10166  		if !(r.Uses == 1) {
 10167  			break
 10168  		}
 10169  		v.Reset(ssaop.OpPPC64MOVHBRstoreidx)
 10170  		v.AddArg4(ptr, idx, val, mem)
 10171  		return true
 10172  	}
 10173  	// match: (MOVHstoreidx ptr idx (Bswap16 val) mem)
 10174  	// result: (MOVHBRstoreidx ptr idx val mem)
 10175  	for {
 10176  		ptr := v_0
 10177  		idx := v_1
 10178  		if v_2.Op != ssaop.OpBswap16 {
 10179  			break
 10180  		}
 10181  		val := v_2.Args[0]
 10182  		mem := v_3
 10183  		v.Reset(ssaop.OpPPC64MOVHBRstoreidx)
 10184  		v.AddArg4(ptr, idx, val, mem)
 10185  		return true
 10186  	}
 10187  	return false
 10188  }
 10189  func rewriteValue_OpPPC64MOVHstorezero(v *ssa.Value) bool {
 10190  	v_1 := v.Args[1]
 10191  	v_0 := v.Args[0]
 10192  	// match: (MOVHstorezero [off1] {sym} (ADDconst [off2] x) mem)
 10193  	// cond: ((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1)+off2)))
 10194  	// result: (MOVHstorezero [off1+int32(off2)] {sym} x mem)
 10195  	for {
 10196  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10197  		sym := ssa.AuxToSym(v.Aux)
 10198  		if v_0.Op != ssaop.OpPPC64ADDconst {
 10199  			break
 10200  		}
 10201  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
 10202  		x := v_0.Args[0]
 10203  		mem := v_1
 10204  		if !((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1) + off2))) {
 10205  			break
 10206  		}
 10207  		v.Reset(ssaop.OpPPC64MOVHstorezero)
 10208  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
 10209  		v.Aux = ssa.SymToAux(sym)
 10210  		v.AddArg2(x, mem)
 10211  		return true
 10212  	}
 10213  	// match: (MOVHstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 10214  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
 10215  	// result: (MOVHstorezero [off1+off2] {ssa.MergeSym(sym1,sym2)} x mem)
 10216  	for {
 10217  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10218  		sym1 := ssa.AuxToSym(v.Aux)
 10219  		p := v_0
 10220  		if p.Op != ssaop.OpPPC64MOVDaddr {
 10221  			break
 10222  		}
 10223  		off2 := ssa.AuxIntToInt32(p.AuxInt)
 10224  		sym2 := ssa.AuxToSym(p.Aux)
 10225  		x := p.Args[0]
 10226  		mem := v_1
 10227  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
 10228  			break
 10229  		}
 10230  		v.Reset(ssaop.OpPPC64MOVHstorezero)
 10231  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10232  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10233  		v.AddArg2(x, mem)
 10234  		return true
 10235  	}
 10236  	return false
 10237  }
 10238  func rewriteValue_OpPPC64MOVWBRstore(v *ssa.Value) bool {
 10239  	v_2 := v.Args[2]
 10240  	v_1 := v.Args[1]
 10241  	v_0 := v.Args[0]
 10242  	// match: (MOVWBRstore ptr (MOVWreg x) mem)
 10243  	// result: (MOVWBRstore ptr x mem)
 10244  	for {
 10245  		ptr := v_0
 10246  		if v_1.Op != ssaop.OpPPC64MOVWreg {
 10247  			break
 10248  		}
 10249  		x := v_1.Args[0]
 10250  		mem := v_2
 10251  		v.Reset(ssaop.OpPPC64MOVWBRstore)
 10252  		v.AddArg3(ptr, x, mem)
 10253  		return true
 10254  	}
 10255  	// match: (MOVWBRstore ptr (MOVWZreg x) mem)
 10256  	// result: (MOVWBRstore ptr x mem)
 10257  	for {
 10258  		ptr := v_0
 10259  		if v_1.Op != ssaop.OpPPC64MOVWZreg {
 10260  			break
 10261  		}
 10262  		x := v_1.Args[0]
 10263  		mem := v_2
 10264  		v.Reset(ssaop.OpPPC64MOVWBRstore)
 10265  		v.AddArg3(ptr, x, mem)
 10266  		return true
 10267  	}
 10268  	return false
 10269  }
 10270  func rewriteValue_OpPPC64MOVWZload(v *ssa.Value) bool {
 10271  	v_1 := v.Args[1]
 10272  	v_0 := v.Args[0]
 10273  	// match: (MOVWZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 10274  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
 10275  	// result: (MOVWZload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
 10276  	for {
 10277  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10278  		sym1 := ssa.AuxToSym(v.Aux)
 10279  		p := v_0
 10280  		if p.Op != ssaop.OpPPC64MOVDaddr {
 10281  			break
 10282  		}
 10283  		off2 := ssa.AuxIntToInt32(p.AuxInt)
 10284  		sym2 := ssa.AuxToSym(p.Aux)
 10285  		ptr := p.Args[0]
 10286  		mem := v_1
 10287  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
 10288  			break
 10289  		}
 10290  		v.Reset(ssaop.OpPPC64MOVWZload)
 10291  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10292  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10293  		v.AddArg2(ptr, mem)
 10294  		return true
 10295  	}
 10296  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] x) mem)
 10297  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
 10298  	// result: (MOVWZload [off1+int32(off2)] {sym} x mem)
 10299  	for {
 10300  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10301  		sym := ssa.AuxToSym(v.Aux)
 10302  		if v_0.Op != ssaop.OpPPC64ADDconst {
 10303  			break
 10304  		}
 10305  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
 10306  		x := v_0.Args[0]
 10307  		mem := v_1
 10308  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
 10309  			break
 10310  		}
 10311  		v.Reset(ssaop.OpPPC64MOVWZload)
 10312  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
 10313  		v.Aux = ssa.SymToAux(sym)
 10314  		v.AddArg2(x, mem)
 10315  		return true
 10316  	}
 10317  	// match: (MOVWZload [0] {sym} p:(ADD ptr idx) mem)
 10318  	// cond: sym == nil && p.Uses == 1
 10319  	// result: (MOVWZloadidx ptr idx mem)
 10320  	for {
 10321  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
 10322  			break
 10323  		}
 10324  		sym := ssa.AuxToSym(v.Aux)
 10325  		p := v_0
 10326  		if p.Op != ssaop.OpPPC64ADD {
 10327  			break
 10328  		}
 10329  		idx := p.Args[1]
 10330  		ptr := p.Args[0]
 10331  		mem := v_1
 10332  		if !(sym == nil && p.Uses == 1) {
 10333  			break
 10334  		}
 10335  		v.Reset(ssaop.OpPPC64MOVWZloadidx)
 10336  		v.AddArg3(ptr, idx, mem)
 10337  		return true
 10338  	}
 10339  	return false
 10340  }
 10341  func rewriteValue_OpPPC64MOVWZloadidx(v *ssa.Value) bool {
 10342  	v_2 := v.Args[2]
 10343  	v_1 := v.Args[1]
 10344  	v_0 := v.Args[0]
 10345  	// match: (MOVWZloadidx ptr (MOVDconst [c]) mem)
 10346  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 10347  	// result: (MOVWZload [int32(c)] ptr mem)
 10348  	for {
 10349  		ptr := v_0
 10350  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 10351  			break
 10352  		}
 10353  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10354  		mem := v_2
 10355  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 10356  			break
 10357  		}
 10358  		v.Reset(ssaop.OpPPC64MOVWZload)
 10359  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10360  		v.AddArg2(ptr, mem)
 10361  		return true
 10362  	}
 10363  	// match: (MOVWZloadidx (MOVDconst [c]) ptr mem)
 10364  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 10365  	// result: (MOVWZload [int32(c)] ptr mem)
 10366  	for {
 10367  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 10368  			break
 10369  		}
 10370  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10371  		ptr := v_1
 10372  		mem := v_2
 10373  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 10374  			break
 10375  		}
 10376  		v.Reset(ssaop.OpPPC64MOVWZload)
 10377  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10378  		v.AddArg2(ptr, mem)
 10379  		return true
 10380  	}
 10381  	return false
 10382  }
 10383  func rewriteValue_OpPPC64MOVWZreg(v *ssa.Value) bool {
 10384  	v_0 := v.Args[0]
 10385  	b := v.Block
 10386  	typ := &b.Func.Config.Types
 10387  	// match: (MOVWZreg y:(ANDconst [c] _))
 10388  	// cond: uint64(c) <= 0xFFFFFFFF
 10389  	// result: y
 10390  	for {
 10391  		y := v_0
 10392  		if y.Op != ssaop.OpPPC64ANDconst {
 10393  			break
 10394  		}
 10395  		c := ssa.AuxIntToInt64(y.AuxInt)
 10396  		if !(uint64(c) <= 0xFFFFFFFF) {
 10397  			break
 10398  		}
 10399  		v.CopyOf(y)
 10400  		return true
 10401  	}
 10402  	// match: (MOVWZreg y:(AND (MOVDconst [c]) _))
 10403  	// cond: uint64(c) <= 0xFFFFFFFF
 10404  	// result: y
 10405  	for {
 10406  		y := v_0
 10407  		if y.Op != ssaop.OpPPC64AND {
 10408  			break
 10409  		}
 10410  		y_0 := y.Args[0]
 10411  		y_1 := y.Args[1]
 10412  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
 10413  			if y_0.Op != ssaop.OpPPC64MOVDconst {
 10414  				continue
 10415  			}
 10416  			c := ssa.AuxIntToInt64(y_0.AuxInt)
 10417  			if !(uint64(c) <= 0xFFFFFFFF) {
 10418  				continue
 10419  			}
 10420  			v.CopyOf(y)
 10421  			return true
 10422  		}
 10423  		break
 10424  	}
 10425  	// match: (MOVWZreg (SRWconst [c] (MOVBZreg x)))
 10426  	// result: (SRWconst [c] (MOVBZreg x))
 10427  	for {
 10428  		if v_0.Op != ssaop.OpPPC64SRWconst {
 10429  			break
 10430  		}
 10431  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10432  		v_0_0 := v_0.Args[0]
 10433  		if v_0_0.Op != ssaop.OpPPC64MOVBZreg {
 10434  			break
 10435  		}
 10436  		x := v_0_0.Args[0]
 10437  		v.Reset(ssaop.OpPPC64SRWconst)
 10438  		v.AuxInt = ssa.Int64ToAuxInt(c)
 10439  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 10440  		v0.AddArg(x)
 10441  		v.AddArg(v0)
 10442  		return true
 10443  	}
 10444  	// match: (MOVWZreg (SRWconst [c] (MOVHZreg x)))
 10445  	// result: (SRWconst [c] (MOVHZreg x))
 10446  	for {
 10447  		if v_0.Op != ssaop.OpPPC64SRWconst {
 10448  			break
 10449  		}
 10450  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10451  		v_0_0 := v_0.Args[0]
 10452  		if v_0_0.Op != ssaop.OpPPC64MOVHZreg {
 10453  			break
 10454  		}
 10455  		x := v_0_0.Args[0]
 10456  		v.Reset(ssaop.OpPPC64SRWconst)
 10457  		v.AuxInt = ssa.Int64ToAuxInt(c)
 10458  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 10459  		v0.AddArg(x)
 10460  		v.AddArg(v0)
 10461  		return true
 10462  	}
 10463  	// match: (MOVWZreg (SRWconst [c] (MOVWZreg x)))
 10464  	// result: (SRWconst [c] (MOVWZreg x))
 10465  	for {
 10466  		if v_0.Op != ssaop.OpPPC64SRWconst {
 10467  			break
 10468  		}
 10469  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10470  		v_0_0 := v_0.Args[0]
 10471  		if v_0_0.Op != ssaop.OpPPC64MOVWZreg {
 10472  			break
 10473  		}
 10474  		x := v_0_0.Args[0]
 10475  		v.Reset(ssaop.OpPPC64SRWconst)
 10476  		v.AuxInt = ssa.Int64ToAuxInt(c)
 10477  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZreg, typ.Int64)
 10478  		v0.AddArg(x)
 10479  		v.AddArg(v0)
 10480  		return true
 10481  	}
 10482  	// match: (MOVWZreg (SRWconst [c] x))
 10483  	// cond: x.Type.Size() <= 32
 10484  	// result: (SRWconst [c] x)
 10485  	for {
 10486  		if v_0.Op != ssaop.OpPPC64SRWconst {
 10487  			break
 10488  		}
 10489  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10490  		x := v_0.Args[0]
 10491  		if !(x.Type.Size() <= 32) {
 10492  			break
 10493  		}
 10494  		v.Reset(ssaop.OpPPC64SRWconst)
 10495  		v.AuxInt = ssa.Int64ToAuxInt(c)
 10496  		v.AddArg(x)
 10497  		return true
 10498  	}
 10499  	// match: (MOVWZreg (SRDconst [c] x))
 10500  	// cond: c>=32
 10501  	// result: (SRDconst [c] x)
 10502  	for {
 10503  		if v_0.Op != ssaop.OpPPC64SRDconst {
 10504  			break
 10505  		}
 10506  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10507  		x := v_0.Args[0]
 10508  		if !(c >= 32) {
 10509  			break
 10510  		}
 10511  		v.Reset(ssaop.OpPPC64SRDconst)
 10512  		v.AuxInt = ssa.Int64ToAuxInt(c)
 10513  		v.AddArg(x)
 10514  		return true
 10515  	}
 10516  	// match: (MOVWZreg (RLWINM [r] y))
 10517  	// cond: mergePPC64MovwzregRlwinm(r) != 0
 10518  	// result: (RLWINM [mergePPC64MovwzregRlwinm(r)] y)
 10519  	for {
 10520  		if v_0.Op != ssaop.OpPPC64RLWINM {
 10521  			break
 10522  		}
 10523  		r := ssa.AuxIntToInt64(v_0.AuxInt)
 10524  		y := v_0.Args[0]
 10525  		if !(mergePPC64MovwzregRlwinm(r) != 0) {
 10526  			break
 10527  		}
 10528  		v.Reset(ssaop.OpPPC64RLWINM)
 10529  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64MovwzregRlwinm(r))
 10530  		v.AddArg(y)
 10531  		return true
 10532  	}
 10533  	// match: (MOVWZreg w:(SLWconst u))
 10534  	// result: w
 10535  	for {
 10536  		w := v_0
 10537  		if w.Op != ssaop.OpPPC64SLWconst {
 10538  			break
 10539  		}
 10540  		v.CopyOf(w)
 10541  		return true
 10542  	}
 10543  	// match: (MOVWZreg y:(MOVWZreg _))
 10544  	// result: y
 10545  	for {
 10546  		y := v_0
 10547  		if y.Op != ssaop.OpPPC64MOVWZreg {
 10548  			break
 10549  		}
 10550  		v.CopyOf(y)
 10551  		return true
 10552  	}
 10553  	// match: (MOVWZreg y:(MOVHZreg _))
 10554  	// result: y
 10555  	for {
 10556  		y := v_0
 10557  		if y.Op != ssaop.OpPPC64MOVHZreg {
 10558  			break
 10559  		}
 10560  		v.CopyOf(y)
 10561  		return true
 10562  	}
 10563  	// match: (MOVWZreg y:(MOVBZreg _))
 10564  	// result: y
 10565  	for {
 10566  		y := v_0
 10567  		if y.Op != ssaop.OpPPC64MOVBZreg {
 10568  			break
 10569  		}
 10570  		v.CopyOf(y)
 10571  		return true
 10572  	}
 10573  	// match: (MOVWZreg y:(MOVHBRload _ _))
 10574  	// result: y
 10575  	for {
 10576  		y := v_0
 10577  		if y.Op != ssaop.OpPPC64MOVHBRload {
 10578  			break
 10579  		}
 10580  		v.CopyOf(y)
 10581  		return true
 10582  	}
 10583  	// match: (MOVWZreg y:(MOVWBRload _ _))
 10584  	// result: y
 10585  	for {
 10586  		y := v_0
 10587  		if y.Op != ssaop.OpPPC64MOVWBRload {
 10588  			break
 10589  		}
 10590  		v.CopyOf(y)
 10591  		return true
 10592  	}
 10593  	// match: (MOVWZreg y:(MOVWreg x))
 10594  	// result: (MOVWZreg x)
 10595  	for {
 10596  		y := v_0
 10597  		if y.Op != ssaop.OpPPC64MOVWreg {
 10598  			break
 10599  		}
 10600  		x := y.Args[0]
 10601  		v.Reset(ssaop.OpPPC64MOVWZreg)
 10602  		v.AddArg(x)
 10603  		return true
 10604  	}
 10605  	// match: (MOVWZreg (OR <t> x (MOVWZreg y)))
 10606  	// result: (MOVWZreg (OR <t> x y))
 10607  	for {
 10608  		if v_0.Op != ssaop.OpPPC64OR {
 10609  			break
 10610  		}
 10611  		t := v_0.Type
 10612  		_ = v_0.Args[1]
 10613  		v_0_0 := v_0.Args[0]
 10614  		v_0_1 := v_0.Args[1]
 10615  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 10616  			x := v_0_0
 10617  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
 10618  				continue
 10619  			}
 10620  			y := v_0_1.Args[0]
 10621  			v.Reset(ssaop.OpPPC64MOVWZreg)
 10622  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64OR, t)
 10623  			v0.AddArg2(x, y)
 10624  			v.AddArg(v0)
 10625  			return true
 10626  		}
 10627  		break
 10628  	}
 10629  	// match: (MOVWZreg (XOR <t> x (MOVWZreg y)))
 10630  	// result: (MOVWZreg (XOR <t> x y))
 10631  	for {
 10632  		if v_0.Op != ssaop.OpPPC64XOR {
 10633  			break
 10634  		}
 10635  		t := v_0.Type
 10636  		_ = v_0.Args[1]
 10637  		v_0_0 := v_0.Args[0]
 10638  		v_0_1 := v_0.Args[1]
 10639  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 10640  			x := v_0_0
 10641  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
 10642  				continue
 10643  			}
 10644  			y := v_0_1.Args[0]
 10645  			v.Reset(ssaop.OpPPC64MOVWZreg)
 10646  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64XOR, t)
 10647  			v0.AddArg2(x, y)
 10648  			v.AddArg(v0)
 10649  			return true
 10650  		}
 10651  		break
 10652  	}
 10653  	// match: (MOVWZreg (AND <t> x (MOVWZreg y)))
 10654  	// result: (MOVWZreg (AND <t> x y))
 10655  	for {
 10656  		if v_0.Op != ssaop.OpPPC64AND {
 10657  			break
 10658  		}
 10659  		t := v_0.Type
 10660  		_ = v_0.Args[1]
 10661  		v_0_0 := v_0.Args[0]
 10662  		v_0_1 := v_0.Args[1]
 10663  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 10664  			x := v_0_0
 10665  			if v_0_1.Op != ssaop.OpPPC64MOVWZreg {
 10666  				continue
 10667  			}
 10668  			y := v_0_1.Args[0]
 10669  			v.Reset(ssaop.OpPPC64MOVWZreg)
 10670  			v0 := b.NewValue0(v.Pos, ssaop.OpPPC64AND, t)
 10671  			v0.AddArg2(x, y)
 10672  			v.AddArg(v0)
 10673  			return true
 10674  		}
 10675  		break
 10676  	}
 10677  	// match: (MOVWZreg z:(ANDconst [c] (MOVBZload ptr x)))
 10678  	// result: z
 10679  	for {
 10680  		z := v_0
 10681  		if z.Op != ssaop.OpPPC64ANDconst {
 10682  			break
 10683  		}
 10684  		z_0 := z.Args[0]
 10685  		if z_0.Op != ssaop.OpPPC64MOVBZload {
 10686  			break
 10687  		}
 10688  		v.CopyOf(z)
 10689  		return true
 10690  	}
 10691  	// match: (MOVWZreg z:(AND y (MOVWZload ptr x)))
 10692  	// result: z
 10693  	for {
 10694  		z := v_0
 10695  		if z.Op != ssaop.OpPPC64AND {
 10696  			break
 10697  		}
 10698  		_ = z.Args[1]
 10699  		z_0 := z.Args[0]
 10700  		z_1 := z.Args[1]
 10701  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 10702  			if z_1.Op != ssaop.OpPPC64MOVWZload {
 10703  				continue
 10704  			}
 10705  			v.CopyOf(z)
 10706  			return true
 10707  		}
 10708  		break
 10709  	}
 10710  	// match: (MOVWZreg z:(ANDconst [c] (MOVHZload ptr x)))
 10711  	// result: z
 10712  	for {
 10713  		z := v_0
 10714  		if z.Op != ssaop.OpPPC64ANDconst {
 10715  			break
 10716  		}
 10717  		z_0 := z.Args[0]
 10718  		if z_0.Op != ssaop.OpPPC64MOVHZload {
 10719  			break
 10720  		}
 10721  		v.CopyOf(z)
 10722  		return true
 10723  	}
 10724  	// match: (MOVWZreg z:(ANDconst [c] (MOVWZload ptr x)))
 10725  	// result: z
 10726  	for {
 10727  		z := v_0
 10728  		if z.Op != ssaop.OpPPC64ANDconst {
 10729  			break
 10730  		}
 10731  		z_0 := z.Args[0]
 10732  		if z_0.Op != ssaop.OpPPC64MOVWZload {
 10733  			break
 10734  		}
 10735  		v.CopyOf(z)
 10736  		return true
 10737  	}
 10738  	// match: (MOVWZreg x:(MOVBZload _ _))
 10739  	// result: x
 10740  	for {
 10741  		x := v_0
 10742  		if x.Op != ssaop.OpPPC64MOVBZload {
 10743  			break
 10744  		}
 10745  		v.CopyOf(x)
 10746  		return true
 10747  	}
 10748  	// match: (MOVWZreg x:(MOVBZloadidx _ _ _))
 10749  	// result: x
 10750  	for {
 10751  		x := v_0
 10752  		if x.Op != ssaop.OpPPC64MOVBZloadidx {
 10753  			break
 10754  		}
 10755  		v.CopyOf(x)
 10756  		return true
 10757  	}
 10758  	// match: (MOVWZreg x:(MOVHZload _ _))
 10759  	// result: x
 10760  	for {
 10761  		x := v_0
 10762  		if x.Op != ssaop.OpPPC64MOVHZload {
 10763  			break
 10764  		}
 10765  		v.CopyOf(x)
 10766  		return true
 10767  	}
 10768  	// match: (MOVWZreg x:(MOVHZloadidx _ _ _))
 10769  	// result: x
 10770  	for {
 10771  		x := v_0
 10772  		if x.Op != ssaop.OpPPC64MOVHZloadidx {
 10773  			break
 10774  		}
 10775  		v.CopyOf(x)
 10776  		return true
 10777  	}
 10778  	// match: (MOVWZreg x:(MOVWZload _ _))
 10779  	// result: x
 10780  	for {
 10781  		x := v_0
 10782  		if x.Op != ssaop.OpPPC64MOVWZload {
 10783  			break
 10784  		}
 10785  		v.CopyOf(x)
 10786  		return true
 10787  	}
 10788  	// match: (MOVWZreg x:(MOVWZloadidx _ _ _))
 10789  	// result: x
 10790  	for {
 10791  		x := v_0
 10792  		if x.Op != ssaop.OpPPC64MOVWZloadidx {
 10793  			break
 10794  		}
 10795  		v.CopyOf(x)
 10796  		return true
 10797  	}
 10798  	// match: (MOVWZreg x:(Select0 (LoweredAtomicLoad32 _ _)))
 10799  	// result: x
 10800  	for {
 10801  		x := v_0
 10802  		if x.Op != ssaop.OpSelect0 {
 10803  			break
 10804  		}
 10805  		x_0 := x.Args[0]
 10806  		if x_0.Op != ssaop.OpPPC64LoweredAtomicLoad32 {
 10807  			break
 10808  		}
 10809  		v.CopyOf(x)
 10810  		return true
 10811  	}
 10812  	// match: (MOVWZreg x:(Arg <t>))
 10813  	// cond: (ssa.Is8BitInt(t) || ssa.Is16BitInt(t) || ssa.Is32BitInt(t)) && !t.IsSigned()
 10814  	// result: x
 10815  	for {
 10816  		x := v_0
 10817  		if x.Op != ssaop.OpArg {
 10818  			break
 10819  		}
 10820  		t := x.Type
 10821  		if !((ssa.Is8BitInt(t) || ssa.Is16BitInt(t) || ssa.Is32BitInt(t)) && !t.IsSigned()) {
 10822  			break
 10823  		}
 10824  		v.CopyOf(x)
 10825  		return true
 10826  	}
 10827  	// match: (MOVWZreg (MOVDconst [c]))
 10828  	// result: (MOVDconst [int64(uint32(c))])
 10829  	for {
 10830  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 10831  			break
 10832  		}
 10833  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10834  		v.Reset(ssaop.OpPPC64MOVDconst)
 10835  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint32(c)))
 10836  		return true
 10837  	}
 10838  	return false
 10839  }
 10840  func rewriteValue_OpPPC64MOVWload(v *ssa.Value) bool {
 10841  	v_1 := v.Args[1]
 10842  	v_0 := v.Args[0]
 10843  	// match: (MOVWload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 10844  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
 10845  	// result: (MOVWload [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr mem)
 10846  	for {
 10847  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10848  		sym1 := ssa.AuxToSym(v.Aux)
 10849  		p := v_0
 10850  		if p.Op != ssaop.OpPPC64MOVDaddr {
 10851  			break
 10852  		}
 10853  		off2 := ssa.AuxIntToInt32(p.AuxInt)
 10854  		sym2 := ssa.AuxToSym(p.Aux)
 10855  		ptr := p.Args[0]
 10856  		mem := v_1
 10857  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
 10858  			break
 10859  		}
 10860  		v.Reset(ssaop.OpPPC64MOVWload)
 10861  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10862  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10863  		v.AddArg2(ptr, mem)
 10864  		return true
 10865  	}
 10866  	// match: (MOVWload [off1] {sym} (ADDconst [off2] x) mem)
 10867  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
 10868  	// result: (MOVWload [off1+int32(off2)] {sym} x mem)
 10869  	for {
 10870  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10871  		sym := ssa.AuxToSym(v.Aux)
 10872  		if v_0.Op != ssaop.OpPPC64ADDconst {
 10873  			break
 10874  		}
 10875  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
 10876  		x := v_0.Args[0]
 10877  		mem := v_1
 10878  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
 10879  			break
 10880  		}
 10881  		v.Reset(ssaop.OpPPC64MOVWload)
 10882  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
 10883  		v.Aux = ssa.SymToAux(sym)
 10884  		v.AddArg2(x, mem)
 10885  		return true
 10886  	}
 10887  	// match: (MOVWload [0] {sym} p:(ADD ptr idx) mem)
 10888  	// cond: sym == nil && p.Uses == 1
 10889  	// result: (MOVWloadidx ptr idx mem)
 10890  	for {
 10891  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
 10892  			break
 10893  		}
 10894  		sym := ssa.AuxToSym(v.Aux)
 10895  		p := v_0
 10896  		if p.Op != ssaop.OpPPC64ADD {
 10897  			break
 10898  		}
 10899  		idx := p.Args[1]
 10900  		ptr := p.Args[0]
 10901  		mem := v_1
 10902  		if !(sym == nil && p.Uses == 1) {
 10903  			break
 10904  		}
 10905  		v.Reset(ssaop.OpPPC64MOVWloadidx)
 10906  		v.AddArg3(ptr, idx, mem)
 10907  		return true
 10908  	}
 10909  	return false
 10910  }
 10911  func rewriteValue_OpPPC64MOVWloadidx(v *ssa.Value) bool {
 10912  	v_2 := v.Args[2]
 10913  	v_1 := v.Args[1]
 10914  	v_0 := v.Args[0]
 10915  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 10916  	// cond: ((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 10917  	// result: (MOVWload [int32(c)] ptr mem)
 10918  	for {
 10919  		ptr := v_0
 10920  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 10921  			break
 10922  		}
 10923  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10924  		mem := v_2
 10925  		if !((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 10926  			break
 10927  		}
 10928  		v.Reset(ssaop.OpPPC64MOVWload)
 10929  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10930  		v.AddArg2(ptr, mem)
 10931  		return true
 10932  	}
 10933  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 10934  	// cond: ((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 10935  	// result: (MOVWload [int32(c)] ptr mem)
 10936  	for {
 10937  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 10938  			break
 10939  		}
 10940  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10941  		ptr := v_1
 10942  		mem := v_2
 10943  		if !((ssa.Is16Bit(c) && c%4 == 0) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 10944  			break
 10945  		}
 10946  		v.Reset(ssaop.OpPPC64MOVWload)
 10947  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10948  		v.AddArg2(ptr, mem)
 10949  		return true
 10950  	}
 10951  	return false
 10952  }
 10953  func rewriteValue_OpPPC64MOVWreg(v *ssa.Value) bool {
 10954  	v_0 := v.Args[0]
 10955  	b := v.Block
 10956  	typ := &b.Func.Config.Types
 10957  	// match: (MOVWreg y:(ANDconst [c] _))
 10958  	// cond: uint64(c) <= 0xFFFF
 10959  	// result: y
 10960  	for {
 10961  		y := v_0
 10962  		if y.Op != ssaop.OpPPC64ANDconst {
 10963  			break
 10964  		}
 10965  		c := ssa.AuxIntToInt64(y.AuxInt)
 10966  		if !(uint64(c) <= 0xFFFF) {
 10967  			break
 10968  		}
 10969  		v.CopyOf(y)
 10970  		return true
 10971  	}
 10972  	// match: (MOVWreg y:(AND (MOVDconst [c]) _))
 10973  	// cond: uint64(c) <= 0x7FFFFFFF
 10974  	// result: y
 10975  	for {
 10976  		y := v_0
 10977  		if y.Op != ssaop.OpPPC64AND {
 10978  			break
 10979  		}
 10980  		y_0 := y.Args[0]
 10981  		y_1 := y.Args[1]
 10982  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
 10983  			if y_0.Op != ssaop.OpPPC64MOVDconst {
 10984  				continue
 10985  			}
 10986  			c := ssa.AuxIntToInt64(y_0.AuxInt)
 10987  			if !(uint64(c) <= 0x7FFFFFFF) {
 10988  				continue
 10989  			}
 10990  			v.CopyOf(y)
 10991  			return true
 10992  		}
 10993  		break
 10994  	}
 10995  	// match: (MOVWreg (SRAWconst [c] (MOVBreg x)))
 10996  	// result: (SRAWconst [c] (MOVBreg x))
 10997  	for {
 10998  		if v_0.Op != ssaop.OpPPC64SRAWconst {
 10999  			break
 11000  		}
 11001  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11002  		v_0_0 := v_0.Args[0]
 11003  		if v_0_0.Op != ssaop.OpPPC64MOVBreg {
 11004  			break
 11005  		}
 11006  		x := v_0_0.Args[0]
 11007  		v.Reset(ssaop.OpPPC64SRAWconst)
 11008  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11009  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 11010  		v0.AddArg(x)
 11011  		v.AddArg(v0)
 11012  		return true
 11013  	}
 11014  	// match: (MOVWreg (SRAWconst [c] (MOVHreg x)))
 11015  	// result: (SRAWconst [c] (MOVHreg x))
 11016  	for {
 11017  		if v_0.Op != ssaop.OpPPC64SRAWconst {
 11018  			break
 11019  		}
 11020  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11021  		v_0_0 := v_0.Args[0]
 11022  		if v_0_0.Op != ssaop.OpPPC64MOVHreg {
 11023  			break
 11024  		}
 11025  		x := v_0_0.Args[0]
 11026  		v.Reset(ssaop.OpPPC64SRAWconst)
 11027  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11028  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 11029  		v0.AddArg(x)
 11030  		v.AddArg(v0)
 11031  		return true
 11032  	}
 11033  	// match: (MOVWreg (SRAWconst [c] (MOVWreg x)))
 11034  	// result: (SRAWconst [c] (MOVWreg x))
 11035  	for {
 11036  		if v_0.Op != ssaop.OpPPC64SRAWconst {
 11037  			break
 11038  		}
 11039  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11040  		v_0_0 := v_0.Args[0]
 11041  		if v_0_0.Op != ssaop.OpPPC64MOVWreg {
 11042  			break
 11043  		}
 11044  		x := v_0_0.Args[0]
 11045  		v.Reset(ssaop.OpPPC64SRAWconst)
 11046  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11047  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWreg, typ.Int64)
 11048  		v0.AddArg(x)
 11049  		v.AddArg(v0)
 11050  		return true
 11051  	}
 11052  	// match: (MOVWreg (SRAWconst [c] x))
 11053  	// cond: x.Type.Size() <= 32
 11054  	// result: (SRAWconst [c] x)
 11055  	for {
 11056  		if v_0.Op != ssaop.OpPPC64SRAWconst {
 11057  			break
 11058  		}
 11059  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11060  		x := v_0.Args[0]
 11061  		if !(x.Type.Size() <= 32) {
 11062  			break
 11063  		}
 11064  		v.Reset(ssaop.OpPPC64SRAWconst)
 11065  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11066  		v.AddArg(x)
 11067  		return true
 11068  	}
 11069  	// match: (MOVWreg (SRDconst [c] x))
 11070  	// cond: c>32
 11071  	// result: (SRDconst [c] x)
 11072  	for {
 11073  		if v_0.Op != ssaop.OpPPC64SRDconst {
 11074  			break
 11075  		}
 11076  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11077  		x := v_0.Args[0]
 11078  		if !(c > 32) {
 11079  			break
 11080  		}
 11081  		v.Reset(ssaop.OpPPC64SRDconst)
 11082  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11083  		v.AddArg(x)
 11084  		return true
 11085  	}
 11086  	// match: (MOVWreg (SRADconst [c] x))
 11087  	// cond: c>=32
 11088  	// result: (SRADconst [c] x)
 11089  	for {
 11090  		if v_0.Op != ssaop.OpPPC64SRADconst {
 11091  			break
 11092  		}
 11093  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11094  		x := v_0.Args[0]
 11095  		if !(c >= 32) {
 11096  			break
 11097  		}
 11098  		v.Reset(ssaop.OpPPC64SRADconst)
 11099  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11100  		v.AddArg(x)
 11101  		return true
 11102  	}
 11103  	// match: (MOVWreg (SRDconst [c] x))
 11104  	// cond: c==32
 11105  	// result: (SRADconst [c] x)
 11106  	for {
 11107  		if v_0.Op != ssaop.OpPPC64SRDconst {
 11108  			break
 11109  		}
 11110  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11111  		x := v_0.Args[0]
 11112  		if !(c == 32) {
 11113  			break
 11114  		}
 11115  		v.Reset(ssaop.OpPPC64SRADconst)
 11116  		v.AuxInt = ssa.Int64ToAuxInt(c)
 11117  		v.AddArg(x)
 11118  		return true
 11119  	}
 11120  	// match: (MOVWreg y:(MOVWreg _))
 11121  	// result: y
 11122  	for {
 11123  		y := v_0
 11124  		if y.Op != ssaop.OpPPC64MOVWreg {
 11125  			break
 11126  		}
 11127  		v.CopyOf(y)
 11128  		return true
 11129  	}
 11130  	// match: (MOVWreg y:(MOVHreg _))
 11131  	// result: y
 11132  	for {
 11133  		y := v_0
 11134  		if y.Op != ssaop.OpPPC64MOVHreg {
 11135  			break
 11136  		}
 11137  		v.CopyOf(y)
 11138  		return true
 11139  	}
 11140  	// match: (MOVWreg y:(MOVBreg _))
 11141  	// result: y
 11142  	for {
 11143  		y := v_0
 11144  		if y.Op != ssaop.OpPPC64MOVBreg {
 11145  			break
 11146  		}
 11147  		v.CopyOf(y)
 11148  		return true
 11149  	}
 11150  	// match: (MOVWreg y:(MOVWZreg x))
 11151  	// result: (MOVWreg x)
 11152  	for {
 11153  		y := v_0
 11154  		if y.Op != ssaop.OpPPC64MOVWZreg {
 11155  			break
 11156  		}
 11157  		x := y.Args[0]
 11158  		v.Reset(ssaop.OpPPC64MOVWreg)
 11159  		v.AddArg(x)
 11160  		return true
 11161  	}
 11162  	// match: (MOVWreg x:(MOVHload _ _))
 11163  	// result: x
 11164  	for {
 11165  		x := v_0
 11166  		if x.Op != ssaop.OpPPC64MOVHload {
 11167  			break
 11168  		}
 11169  		v.CopyOf(x)
 11170  		return true
 11171  	}
 11172  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
 11173  	// result: x
 11174  	for {
 11175  		x := v_0
 11176  		if x.Op != ssaop.OpPPC64MOVHloadidx {
 11177  			break
 11178  		}
 11179  		v.CopyOf(x)
 11180  		return true
 11181  	}
 11182  	// match: (MOVWreg x:(MOVWload _ _))
 11183  	// result: x
 11184  	for {
 11185  		x := v_0
 11186  		if x.Op != ssaop.OpPPC64MOVWload {
 11187  			break
 11188  		}
 11189  		v.CopyOf(x)
 11190  		return true
 11191  	}
 11192  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
 11193  	// result: x
 11194  	for {
 11195  		x := v_0
 11196  		if x.Op != ssaop.OpPPC64MOVWloadidx {
 11197  			break
 11198  		}
 11199  		v.CopyOf(x)
 11200  		return true
 11201  	}
 11202  	// match: (MOVWreg x:(Arg <t>))
 11203  	// cond: (ssa.Is8BitInt(t) || ssa.Is16BitInt(t) || ssa.Is32BitInt(t)) && t.IsSigned()
 11204  	// result: x
 11205  	for {
 11206  		x := v_0
 11207  		if x.Op != ssaop.OpArg {
 11208  			break
 11209  		}
 11210  		t := x.Type
 11211  		if !((ssa.Is8BitInt(t) || ssa.Is16BitInt(t) || ssa.Is32BitInt(t)) && t.IsSigned()) {
 11212  			break
 11213  		}
 11214  		v.CopyOf(x)
 11215  		return true
 11216  	}
 11217  	// match: (MOVWreg (MOVDconst [c]))
 11218  	// result: (MOVDconst [int64(int32(c))])
 11219  	for {
 11220  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 11221  			break
 11222  		}
 11223  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11224  		v.Reset(ssaop.OpPPC64MOVDconst)
 11225  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(c)))
 11226  		return true
 11227  	}
 11228  	return false
 11229  }
 11230  func rewriteValue_OpPPC64MOVWstore(v *ssa.Value) bool {
 11231  	v_2 := v.Args[2]
 11232  	v_1 := v.Args[1]
 11233  	v_0 := v.Args[0]
 11234  	b := v.Block
 11235  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] x) val mem)
 11236  	// cond: (ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)))
 11237  	// result: (MOVWstore [off1+int32(off2)] {sym} x val mem)
 11238  	for {
 11239  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11240  		sym := ssa.AuxToSym(v.Aux)
 11241  		if v_0.Op != ssaop.OpPPC64ADDconst {
 11242  			break
 11243  		}
 11244  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
 11245  		x := v_0.Args[0]
 11246  		val := v_1
 11247  		mem := v_2
 11248  		if !(ssa.Is16Bit(int64(off1)+off2) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2))) {
 11249  			break
 11250  		}
 11251  		v.Reset(ssaop.OpPPC64MOVWstore)
 11252  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
 11253  		v.Aux = ssa.SymToAux(sym)
 11254  		v.AddArg3(x, val, mem)
 11255  		return true
 11256  	}
 11257  	// match: (MOVWstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
 11258  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
 11259  	// result: (MOVWstore [off1+off2] {ssa.MergeSym(sym1,sym2)} ptr val mem)
 11260  	for {
 11261  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11262  		sym1 := ssa.AuxToSym(v.Aux)
 11263  		p := v_0
 11264  		if p.Op != ssaop.OpPPC64MOVDaddr {
 11265  			break
 11266  		}
 11267  		off2 := ssa.AuxIntToInt32(p.AuxInt)
 11268  		sym2 := ssa.AuxToSym(p.Aux)
 11269  		ptr := p.Args[0]
 11270  		val := v_1
 11271  		mem := v_2
 11272  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (ptr.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
 11273  			break
 11274  		}
 11275  		v.Reset(ssaop.OpPPC64MOVWstore)
 11276  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 11277  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 11278  		v.AddArg3(ptr, val, mem)
 11279  		return true
 11280  	}
 11281  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [0]) mem)
 11282  	// result: (MOVWstorezero [off] {sym} ptr mem)
 11283  	for {
 11284  		off := ssa.AuxIntToInt32(v.AuxInt)
 11285  		sym := ssa.AuxToSym(v.Aux)
 11286  		ptr := v_0
 11287  		if v_1.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
 11288  			break
 11289  		}
 11290  		mem := v_2
 11291  		v.Reset(ssaop.OpPPC64MOVWstorezero)
 11292  		v.AuxInt = ssa.Int32ToAuxInt(off)
 11293  		v.Aux = ssa.SymToAux(sym)
 11294  		v.AddArg2(ptr, mem)
 11295  		return true
 11296  	}
 11297  	// match: (MOVWstore [0] {sym} p:(ADD ptr idx) val mem)
 11298  	// cond: sym == nil && p.Uses == 1
 11299  	// result: (MOVWstoreidx ptr idx val mem)
 11300  	for {
 11301  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
 11302  			break
 11303  		}
 11304  		sym := ssa.AuxToSym(v.Aux)
 11305  		p := v_0
 11306  		if p.Op != ssaop.OpPPC64ADD {
 11307  			break
 11308  		}
 11309  		idx := p.Args[1]
 11310  		ptr := p.Args[0]
 11311  		val := v_1
 11312  		mem := v_2
 11313  		if !(sym == nil && p.Uses == 1) {
 11314  			break
 11315  		}
 11316  		v.Reset(ssaop.OpPPC64MOVWstoreidx)
 11317  		v.AddArg4(ptr, idx, val, mem)
 11318  		return true
 11319  	}
 11320  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 11321  	// result: (MOVWstore [off] {sym} ptr x mem)
 11322  	for {
 11323  		off := ssa.AuxIntToInt32(v.AuxInt)
 11324  		sym := ssa.AuxToSym(v.Aux)
 11325  		ptr := v_0
 11326  		if v_1.Op != ssaop.OpPPC64MOVWreg {
 11327  			break
 11328  		}
 11329  		x := v_1.Args[0]
 11330  		mem := v_2
 11331  		v.Reset(ssaop.OpPPC64MOVWstore)
 11332  		v.AuxInt = ssa.Int32ToAuxInt(off)
 11333  		v.Aux = ssa.SymToAux(sym)
 11334  		v.AddArg3(ptr, x, mem)
 11335  		return true
 11336  	}
 11337  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 11338  	// result: (MOVWstore [off] {sym} ptr x mem)
 11339  	for {
 11340  		off := ssa.AuxIntToInt32(v.AuxInt)
 11341  		sym := ssa.AuxToSym(v.Aux)
 11342  		ptr := v_0
 11343  		if v_1.Op != ssaop.OpPPC64MOVWZreg {
 11344  			break
 11345  		}
 11346  		x := v_1.Args[0]
 11347  		mem := v_2
 11348  		v.Reset(ssaop.OpPPC64MOVWstore)
 11349  		v.AuxInt = ssa.Int32ToAuxInt(off)
 11350  		v.Aux = ssa.SymToAux(sym)
 11351  		v.AddArg3(ptr, x, mem)
 11352  		return true
 11353  	}
 11354  	// match: (MOVWstore [off] {sym} ptr r:(BRW val) mem)
 11355  	// cond: r.Uses == 1
 11356  	// result: (MOVWBRstore (MOVDaddr <ptr.Type> [off] {sym} ptr) val mem)
 11357  	for {
 11358  		off := ssa.AuxIntToInt32(v.AuxInt)
 11359  		sym := ssa.AuxToSym(v.Aux)
 11360  		ptr := v_0
 11361  		r := v_1
 11362  		if r.Op != ssaop.OpPPC64BRW {
 11363  			break
 11364  		}
 11365  		val := r.Args[0]
 11366  		mem := v_2
 11367  		if !(r.Uses == 1) {
 11368  			break
 11369  		}
 11370  		v.Reset(ssaop.OpPPC64MOVWBRstore)
 11371  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
 11372  		v0.AuxInt = ssa.Int32ToAuxInt(off)
 11373  		v0.Aux = ssa.SymToAux(sym)
 11374  		v0.AddArg(ptr)
 11375  		v.AddArg3(v0, val, mem)
 11376  		return true
 11377  	}
 11378  	// match: (MOVWstore [off] {sym} ptr (Bswap32 val) mem)
 11379  	// result: (MOVWBRstore (MOVDaddr <ptr.Type> [off] {sym} ptr) val mem)
 11380  	for {
 11381  		off := ssa.AuxIntToInt32(v.AuxInt)
 11382  		sym := ssa.AuxToSym(v.Aux)
 11383  		ptr := v_0
 11384  		if v_1.Op != ssaop.OpBswap32 {
 11385  			break
 11386  		}
 11387  		val := v_1.Args[0]
 11388  		mem := v_2
 11389  		v.Reset(ssaop.OpPPC64MOVWBRstore)
 11390  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDaddr, ptr.Type)
 11391  		v0.AuxInt = ssa.Int32ToAuxInt(off)
 11392  		v0.Aux = ssa.SymToAux(sym)
 11393  		v0.AddArg(ptr)
 11394  		v.AddArg3(v0, val, mem)
 11395  		return true
 11396  	}
 11397  	return false
 11398  }
 11399  func rewriteValue_OpPPC64MOVWstoreidx(v *ssa.Value) bool {
 11400  	v_3 := v.Args[3]
 11401  	v_2 := v.Args[2]
 11402  	v_1 := v.Args[1]
 11403  	v_0 := v.Args[0]
 11404  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 11405  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 11406  	// result: (MOVWstore [int32(c)] ptr val mem)
 11407  	for {
 11408  		ptr := v_0
 11409  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 11410  			break
 11411  		}
 11412  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 11413  		val := v_2
 11414  		mem := v_3
 11415  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 11416  			break
 11417  		}
 11418  		v.Reset(ssaop.OpPPC64MOVWstore)
 11419  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 11420  		v.AddArg3(ptr, val, mem)
 11421  		return true
 11422  	}
 11423  	// match: (MOVWstoreidx (MOVDconst [c]) ptr val mem)
 11424  	// cond: (ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c)))
 11425  	// result: (MOVWstore [int32(c)] ptr val mem)
 11426  	for {
 11427  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 11428  			break
 11429  		}
 11430  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11431  		ptr := v_1
 11432  		val := v_2
 11433  		mem := v_3
 11434  		if !(ssa.Is16Bit(c) || (buildcfg.GOPPC64 >= 10 && ssa.Is32Bit(c))) {
 11435  			break
 11436  		}
 11437  		v.Reset(ssaop.OpPPC64MOVWstore)
 11438  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 11439  		v.AddArg3(ptr, val, mem)
 11440  		return true
 11441  	}
 11442  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 11443  	// result: (MOVWstoreidx ptr idx x mem)
 11444  	for {
 11445  		ptr := v_0
 11446  		idx := v_1
 11447  		if v_2.Op != ssaop.OpPPC64MOVWreg {
 11448  			break
 11449  		}
 11450  		x := v_2.Args[0]
 11451  		mem := v_3
 11452  		v.Reset(ssaop.OpPPC64MOVWstoreidx)
 11453  		v.AddArg4(ptr, idx, x, mem)
 11454  		return true
 11455  	}
 11456  	// match: (MOVWstoreidx ptr idx (MOVWZreg x) mem)
 11457  	// result: (MOVWstoreidx ptr idx x mem)
 11458  	for {
 11459  		ptr := v_0
 11460  		idx := v_1
 11461  		if v_2.Op != ssaop.OpPPC64MOVWZreg {
 11462  			break
 11463  		}
 11464  		x := v_2.Args[0]
 11465  		mem := v_3
 11466  		v.Reset(ssaop.OpPPC64MOVWstoreidx)
 11467  		v.AddArg4(ptr, idx, x, mem)
 11468  		return true
 11469  	}
 11470  	// match: (MOVWstoreidx ptr idx r:(BRW val) mem)
 11471  	// cond: r.Uses == 1
 11472  	// result: (MOVWBRstoreidx ptr idx val mem)
 11473  	for {
 11474  		ptr := v_0
 11475  		idx := v_1
 11476  		r := v_2
 11477  		if r.Op != ssaop.OpPPC64BRW {
 11478  			break
 11479  		}
 11480  		val := r.Args[0]
 11481  		mem := v_3
 11482  		if !(r.Uses == 1) {
 11483  			break
 11484  		}
 11485  		v.Reset(ssaop.OpPPC64MOVWBRstoreidx)
 11486  		v.AddArg4(ptr, idx, val, mem)
 11487  		return true
 11488  	}
 11489  	// match: (MOVWstoreidx ptr idx (Bswap32 val) mem)
 11490  	// result: (MOVWBRstoreidx ptr idx val mem)
 11491  	for {
 11492  		ptr := v_0
 11493  		idx := v_1
 11494  		if v_2.Op != ssaop.OpBswap32 {
 11495  			break
 11496  		}
 11497  		val := v_2.Args[0]
 11498  		mem := v_3
 11499  		v.Reset(ssaop.OpPPC64MOVWBRstoreidx)
 11500  		v.AddArg4(ptr, idx, val, mem)
 11501  		return true
 11502  	}
 11503  	return false
 11504  }
 11505  func rewriteValue_OpPPC64MOVWstorezero(v *ssa.Value) bool {
 11506  	v_1 := v.Args[1]
 11507  	v_0 := v.Args[0]
 11508  	// match: (MOVWstorezero [off1] {sym} (ADDconst [off2] x) mem)
 11509  	// cond: ((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1)+off2)))
 11510  	// result: (MOVWstorezero [off1+int32(off2)] {sym} x mem)
 11511  	for {
 11512  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11513  		sym := ssa.AuxToSym(v.Aux)
 11514  		if v_0.Op != ssaop.OpPPC64ADDconst {
 11515  			break
 11516  		}
 11517  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
 11518  		x := v_0.Args[0]
 11519  		mem := v_1
 11520  		if !((ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1)+off2)) || (ssa.Is16Bit(int64(off1) + off2))) {
 11521  			break
 11522  		}
 11523  		v.Reset(ssaop.OpPPC64MOVWstorezero)
 11524  		v.AuxInt = ssa.Int32ToAuxInt(off1 + int32(off2))
 11525  		v.Aux = ssa.SymToAux(sym)
 11526  		v.AddArg2(x, mem)
 11527  		return true
 11528  	}
 11529  	// match: (MOVWstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 11530  	// cond: ssa.CanMergeSym(sym1,sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))
 11531  	// result: (MOVWstorezero [off1+off2] {ssa.MergeSym(sym1,sym2)} x mem)
 11532  	for {
 11533  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11534  		sym1 := ssa.AuxToSym(v.Aux)
 11535  		p := v_0
 11536  		if p.Op != ssaop.OpPPC64MOVDaddr {
 11537  			break
 11538  		}
 11539  		off2 := ssa.AuxIntToInt32(p.AuxInt)
 11540  		sym2 := ssa.AuxToSym(p.Aux)
 11541  		x := p.Args[0]
 11542  		mem := v_1
 11543  		if !(ssa.CanMergeSym(sym1, sym2) && ((ssa.Is16Bit(int64(off1+off2)) && (x.Op != ssaop.OpSB || p.Uses == 1)) || (ssa.SupportsPPC64PCRel() && ssa.Is32Bit(int64(off1+off2))))) {
 11544  			break
 11545  		}
 11546  		v.Reset(ssaop.OpPPC64MOVWstorezero)
 11547  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 11548  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 11549  		v.AddArg2(x, mem)
 11550  		return true
 11551  	}
 11552  	return false
 11553  }
 11554  func rewriteValue_OpPPC64MTVSRD(v *ssa.Value) bool {
 11555  	v_0 := v.Args[0]
 11556  	b := v.Block
 11557  	typ := &b.Func.Config.Types
 11558  	// match: (MTVSRD (MOVDconst [c]))
 11559  	// cond: !math.IsNaN(math.Float64frombits(uint64(c)))
 11560  	// result: (FMOVDconst [math.Float64frombits(uint64(c))])
 11561  	for {
 11562  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 11563  			break
 11564  		}
 11565  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11566  		if !(!math.IsNaN(math.Float64frombits(uint64(c)))) {
 11567  			break
 11568  		}
 11569  		v.Reset(ssaop.OpPPC64FMOVDconst)
 11570  		v.AuxInt = ssa.Float64ToAuxInt(math.Float64frombits(uint64(c)))
 11571  		return true
 11572  	}
 11573  	// match: (MTVSRD x:(MOVDload [off] {sym} ptr mem))
 11574  	// cond: x.Uses == 1 && ssa.Clobber(x)
 11575  	// result: @x.Block (FMOVDload [off] {sym} ptr mem)
 11576  	for {
 11577  		x := v_0
 11578  		if x.Op != ssaop.OpPPC64MOVDload {
 11579  			break
 11580  		}
 11581  		off := ssa.AuxIntToInt32(x.AuxInt)
 11582  		sym := ssa.AuxToSym(x.Aux)
 11583  		mem := x.Args[1]
 11584  		ptr := x.Args[0]
 11585  		if !(x.Uses == 1 && ssa.Clobber(x)) {
 11586  			break
 11587  		}
 11588  		b = x.Block
 11589  		v0 := b.NewValue0(x.Pos, ssaop.OpPPC64FMOVDload, typ.Float64)
 11590  		v.CopyOf(v0)
 11591  		v0.AuxInt = ssa.Int32ToAuxInt(off)
 11592  		v0.Aux = ssa.SymToAux(sym)
 11593  		v0.AddArg2(ptr, mem)
 11594  		return true
 11595  	}
 11596  	return false
 11597  }
 11598  func rewriteValue_OpPPC64MULLD(v *ssa.Value) bool {
 11599  	v_1 := v.Args[1]
 11600  	v_0 := v.Args[0]
 11601  	// match: (MULLD x (MOVDconst [c]))
 11602  	// cond: ssa.Is16Bit(c)
 11603  	// result: (MULLDconst [int32(c)] x)
 11604  	for {
 11605  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11606  			x := v_0
 11607  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11608  				continue
 11609  			}
 11610  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11611  			if !(ssa.Is16Bit(c)) {
 11612  				continue
 11613  			}
 11614  			v.Reset(ssaop.OpPPC64MULLDconst)
 11615  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 11616  			v.AddArg(x)
 11617  			return true
 11618  		}
 11619  		break
 11620  	}
 11621  	return false
 11622  }
 11623  func rewriteValue_OpPPC64MULLW(v *ssa.Value) bool {
 11624  	v_1 := v.Args[1]
 11625  	v_0 := v.Args[0]
 11626  	// match: (MULLW x (MOVDconst [c]))
 11627  	// cond: ssa.Is16Bit(c)
 11628  	// result: (MULLWconst [int32(c)] x)
 11629  	for {
 11630  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11631  			x := v_0
 11632  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11633  				continue
 11634  			}
 11635  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11636  			if !(ssa.Is16Bit(c)) {
 11637  				continue
 11638  			}
 11639  			v.Reset(ssaop.OpPPC64MULLWconst)
 11640  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 11641  			v.AddArg(x)
 11642  			return true
 11643  		}
 11644  		break
 11645  	}
 11646  	return false
 11647  }
 11648  func rewriteValue_OpPPC64NEG(v *ssa.Value) bool {
 11649  	v_0 := v.Args[0]
 11650  	// match: (NEG (ADDconst [c] x))
 11651  	// cond: ssa.Is32Bit(-c)
 11652  	// result: (SUBFCconst [-c] x)
 11653  	for {
 11654  		if v_0.Op != ssaop.OpPPC64ADDconst {
 11655  			break
 11656  		}
 11657  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11658  		x := v_0.Args[0]
 11659  		if !(ssa.Is32Bit(-c)) {
 11660  			break
 11661  		}
 11662  		v.Reset(ssaop.OpPPC64SUBFCconst)
 11663  		v.AuxInt = ssa.Int64ToAuxInt(-c)
 11664  		v.AddArg(x)
 11665  		return true
 11666  	}
 11667  	// match: (NEG (SUBFCconst [c] x))
 11668  	// cond: ssa.Is32Bit(-c)
 11669  	// result: (ADDconst [-c] x)
 11670  	for {
 11671  		if v_0.Op != ssaop.OpPPC64SUBFCconst {
 11672  			break
 11673  		}
 11674  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11675  		x := v_0.Args[0]
 11676  		if !(ssa.Is32Bit(-c)) {
 11677  			break
 11678  		}
 11679  		v.Reset(ssaop.OpPPC64ADDconst)
 11680  		v.AuxInt = ssa.Int64ToAuxInt(-c)
 11681  		v.AddArg(x)
 11682  		return true
 11683  	}
 11684  	// match: (NEG (SUB x y))
 11685  	// result: (SUB y x)
 11686  	for {
 11687  		if v_0.Op != ssaop.OpPPC64SUB {
 11688  			break
 11689  		}
 11690  		y := v_0.Args[1]
 11691  		x := v_0.Args[0]
 11692  		v.Reset(ssaop.OpPPC64SUB)
 11693  		v.AddArg2(y, x)
 11694  		return true
 11695  	}
 11696  	// match: (NEG (NEG x))
 11697  	// result: x
 11698  	for {
 11699  		if v_0.Op != ssaop.OpPPC64NEG {
 11700  			break
 11701  		}
 11702  		x := v_0.Args[0]
 11703  		v.CopyOf(x)
 11704  		return true
 11705  	}
 11706  	return false
 11707  }
 11708  func rewriteValue_OpPPC64NOR(v *ssa.Value) bool {
 11709  	v_1 := v.Args[1]
 11710  	v_0 := v.Args[0]
 11711  	// match: (NOR (MOVDconst [c]) (MOVDconst [d]))
 11712  	// result: (MOVDconst [^(c|d)])
 11713  	for {
 11714  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11715  			if v_0.Op != ssaop.OpPPC64MOVDconst {
 11716  				continue
 11717  			}
 11718  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 11719  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11720  				continue
 11721  			}
 11722  			d := ssa.AuxIntToInt64(v_1.AuxInt)
 11723  			v.Reset(ssaop.OpPPC64MOVDconst)
 11724  			v.AuxInt = ssa.Int64ToAuxInt(^(c | d))
 11725  			return true
 11726  		}
 11727  		break
 11728  	}
 11729  	return false
 11730  }
 11731  func rewriteValue_OpPPC64NotEqual(v *ssa.Value) bool {
 11732  	v_0 := v.Args[0]
 11733  	// match: (NotEqual (FlagEQ))
 11734  	// result: (MOVDconst [0])
 11735  	for {
 11736  		if v_0.Op != ssaop.OpPPC64FlagEQ {
 11737  			break
 11738  		}
 11739  		v.Reset(ssaop.OpPPC64MOVDconst)
 11740  		v.AuxInt = ssa.Int64ToAuxInt(0)
 11741  		return true
 11742  	}
 11743  	// match: (NotEqual (FlagLT))
 11744  	// result: (MOVDconst [1])
 11745  	for {
 11746  		if v_0.Op != ssaop.OpPPC64FlagLT {
 11747  			break
 11748  		}
 11749  		v.Reset(ssaop.OpPPC64MOVDconst)
 11750  		v.AuxInt = ssa.Int64ToAuxInt(1)
 11751  		return true
 11752  	}
 11753  	// match: (NotEqual (FlagGT))
 11754  	// result: (MOVDconst [1])
 11755  	for {
 11756  		if v_0.Op != ssaop.OpPPC64FlagGT {
 11757  			break
 11758  		}
 11759  		v.Reset(ssaop.OpPPC64MOVDconst)
 11760  		v.AuxInt = ssa.Int64ToAuxInt(1)
 11761  		return true
 11762  	}
 11763  	// match: (NotEqual (InvertFlags x))
 11764  	// result: (NotEqual x)
 11765  	for {
 11766  		if v_0.Op != ssaop.OpPPC64InvertFlags {
 11767  			break
 11768  		}
 11769  		x := v_0.Args[0]
 11770  		v.Reset(ssaop.OpPPC64NotEqual)
 11771  		v.AddArg(x)
 11772  		return true
 11773  	}
 11774  	// match: (NotEqual cmp)
 11775  	// result: (SETBCR [2] cmp)
 11776  	for {
 11777  		cmp := v_0
 11778  		v.Reset(ssaop.OpPPC64SETBCR)
 11779  		v.AuxInt = ssa.Int32ToAuxInt(2)
 11780  		v.AddArg(cmp)
 11781  		return true
 11782  	}
 11783  }
 11784  func rewriteValue_OpPPC64OR(v *ssa.Value) bool {
 11785  	v_1 := v.Args[1]
 11786  	v_0 := v.Args[0]
 11787  	// match: (OR <t> x (MOVDconst [m]))
 11788  	// cond: t.IsUnsigned() && t.Size() == 1 && m != int64(uint8(m))
 11789  	// result: (ORconst [int64(uint8(m))] x)
 11790  	for {
 11791  		t := v.Type
 11792  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11793  			x := v_0
 11794  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11795  				continue
 11796  			}
 11797  			m := ssa.AuxIntToInt64(v_1.AuxInt)
 11798  			if !(t.IsUnsigned() && t.Size() == 1 && m != int64(uint8(m))) {
 11799  				continue
 11800  			}
 11801  			v.Reset(ssaop.OpPPC64ORconst)
 11802  			v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(m)))
 11803  			v.AddArg(x)
 11804  			return true
 11805  		}
 11806  		break
 11807  	}
 11808  	// match: (OR <t> x (MOVDconst [m]))
 11809  	// cond: t.IsUnsigned() && t.Size() == 2 && m != int64(uint16(m))
 11810  	// result: (ORconst [int64(uint16(m))] x)
 11811  	for {
 11812  		t := v.Type
 11813  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11814  			x := v_0
 11815  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11816  				continue
 11817  			}
 11818  			m := ssa.AuxIntToInt64(v_1.AuxInt)
 11819  			if !(t.IsUnsigned() && t.Size() == 2 && m != int64(uint16(m))) {
 11820  				continue
 11821  			}
 11822  			v.Reset(ssaop.OpPPC64ORconst)
 11823  			v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(m)))
 11824  			v.AddArg(x)
 11825  			return true
 11826  		}
 11827  		break
 11828  	}
 11829  	// match: (OR x (NOR y y))
 11830  	// result: (ORN x y)
 11831  	for {
 11832  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11833  			x := v_0
 11834  			if v_1.Op != ssaop.OpPPC64NOR {
 11835  				continue
 11836  			}
 11837  			y := v_1.Args[1]
 11838  			if y != v_1.Args[0] {
 11839  				continue
 11840  			}
 11841  			v.Reset(ssaop.OpPPC64ORN)
 11842  			v.AddArg2(x, y)
 11843  			return true
 11844  		}
 11845  		break
 11846  	}
 11847  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11848  	// result: (MOVDconst [c|d])
 11849  	for {
 11850  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11851  			if v_0.Op != ssaop.OpPPC64MOVDconst {
 11852  				continue
 11853  			}
 11854  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 11855  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11856  				continue
 11857  			}
 11858  			d := ssa.AuxIntToInt64(v_1.AuxInt)
 11859  			v.Reset(ssaop.OpPPC64MOVDconst)
 11860  			v.AuxInt = ssa.Int64ToAuxInt(c | d)
 11861  			return true
 11862  		}
 11863  		break
 11864  	}
 11865  	// match: (OR x (MOVDconst [c]))
 11866  	// cond: ssa.IsU32Bit(c)
 11867  	// result: (ORconst [c] x)
 11868  	for {
 11869  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11870  			x := v_0
 11871  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 11872  				continue
 11873  			}
 11874  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11875  			if !(ssa.IsU32Bit(c)) {
 11876  				continue
 11877  			}
 11878  			v.Reset(ssaop.OpPPC64ORconst)
 11879  			v.AuxInt = ssa.Int64ToAuxInt(c)
 11880  			v.AddArg(x)
 11881  			return true
 11882  		}
 11883  		break
 11884  	}
 11885  	return false
 11886  }
 11887  func rewriteValue_OpPPC64ORN(v *ssa.Value) bool {
 11888  	v_1 := v.Args[1]
 11889  	v_0 := v.Args[0]
 11890  	// match: (ORN x (MOVDconst [-1]))
 11891  	// result: x
 11892  	for {
 11893  		x := v_0
 11894  		if v_1.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
 11895  			break
 11896  		}
 11897  		v.CopyOf(x)
 11898  		return true
 11899  	}
 11900  	// match: (ORN (MOVDconst [c]) (MOVDconst [d]))
 11901  	// result: (MOVDconst [c|^d])
 11902  	for {
 11903  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 11904  			break
 11905  		}
 11906  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11907  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 11908  			break
 11909  		}
 11910  		d := ssa.AuxIntToInt64(v_1.AuxInt)
 11911  		v.Reset(ssaop.OpPPC64MOVDconst)
 11912  		v.AuxInt = ssa.Int64ToAuxInt(c | ^d)
 11913  		return true
 11914  	}
 11915  	return false
 11916  }
 11917  func rewriteValue_OpPPC64ORconst(v *ssa.Value) bool {
 11918  	v_0 := v.Args[0]
 11919  	// match: (ORconst [c] (ORconst [d] x))
 11920  	// result: (ORconst [c|d] x)
 11921  	for {
 11922  		c := ssa.AuxIntToInt64(v.AuxInt)
 11923  		if v_0.Op != ssaop.OpPPC64ORconst {
 11924  			break
 11925  		}
 11926  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 11927  		x := v_0.Args[0]
 11928  		v.Reset(ssaop.OpPPC64ORconst)
 11929  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
 11930  		v.AddArg(x)
 11931  		return true
 11932  	}
 11933  	// match: (ORconst [-1] _)
 11934  	// result: (MOVDconst [-1])
 11935  	for {
 11936  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
 11937  			break
 11938  		}
 11939  		v.Reset(ssaop.OpPPC64MOVDconst)
 11940  		v.AuxInt = ssa.Int64ToAuxInt(-1)
 11941  		return true
 11942  	}
 11943  	// match: (ORconst [0] x)
 11944  	// result: x
 11945  	for {
 11946  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11947  			break
 11948  		}
 11949  		x := v_0
 11950  		v.CopyOf(x)
 11951  		return true
 11952  	}
 11953  	return false
 11954  }
 11955  func rewriteValue_OpPPC64RLWINM(v *ssa.Value) bool {
 11956  	v_0 := v.Args[0]
 11957  	// match: (RLWINM [r] (MOVHZreg u))
 11958  	// cond: mergePPC64RlwinmAnd(r,0xFFFF) != 0
 11959  	// result: (RLWINM [mergePPC64RlwinmAnd(r,0xFFFF)] u)
 11960  	for {
 11961  		r := ssa.AuxIntToInt64(v.AuxInt)
 11962  		if v_0.Op != ssaop.OpPPC64MOVHZreg {
 11963  			break
 11964  		}
 11965  		u := v_0.Args[0]
 11966  		if !(mergePPC64RlwinmAnd(r, 0xFFFF) != 0) {
 11967  			break
 11968  		}
 11969  		v.Reset(ssaop.OpPPC64RLWINM)
 11970  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64RlwinmAnd(r, 0xFFFF))
 11971  		v.AddArg(u)
 11972  		return true
 11973  	}
 11974  	// match: (RLWINM [r] (ANDconst [a] u))
 11975  	// cond: mergePPC64RlwinmAnd(r,uint32(a)) != 0
 11976  	// result: (RLWINM [mergePPC64RlwinmAnd(r,uint32(a))] u)
 11977  	for {
 11978  		r := ssa.AuxIntToInt64(v.AuxInt)
 11979  		if v_0.Op != ssaop.OpPPC64ANDconst {
 11980  			break
 11981  		}
 11982  		a := ssa.AuxIntToInt64(v_0.AuxInt)
 11983  		u := v_0.Args[0]
 11984  		if !(mergePPC64RlwinmAnd(r, uint32(a)) != 0) {
 11985  			break
 11986  		}
 11987  		v.Reset(ssaop.OpPPC64RLWINM)
 11988  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64RlwinmAnd(r, uint32(a)))
 11989  		v.AddArg(u)
 11990  		return true
 11991  	}
 11992  	return false
 11993  }
 11994  func rewriteValue_OpPPC64ROTL(v *ssa.Value) bool {
 11995  	v_1 := v.Args[1]
 11996  	v_0 := v.Args[0]
 11997  	// match: (ROTL x (MOVDconst [c]))
 11998  	// result: (ROTLconst x [c&63])
 11999  	for {
 12000  		x := v_0
 12001  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12002  			break
 12003  		}
 12004  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12005  		v.Reset(ssaop.OpPPC64ROTLconst)
 12006  		v.AuxInt = ssa.Int64ToAuxInt(c & 63)
 12007  		v.AddArg(x)
 12008  		return true
 12009  	}
 12010  	return false
 12011  }
 12012  func rewriteValue_OpPPC64ROTLW(v *ssa.Value) bool {
 12013  	v_1 := v.Args[1]
 12014  	v_0 := v.Args[0]
 12015  	// match: (ROTLW x (MOVDconst [c]))
 12016  	// result: (ROTLWconst x [c&31])
 12017  	for {
 12018  		x := v_0
 12019  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12020  			break
 12021  		}
 12022  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12023  		v.Reset(ssaop.OpPPC64ROTLWconst)
 12024  		v.AuxInt = ssa.Int64ToAuxInt(c & 31)
 12025  		v.AddArg(x)
 12026  		return true
 12027  	}
 12028  	return false
 12029  }
 12030  func rewriteValue_OpPPC64ROTLWconst(v *ssa.Value) bool {
 12031  	v_0 := v.Args[0]
 12032  	// match: (ROTLWconst [r] (AND (MOVDconst [m]) x))
 12033  	// cond: ssa.IsPPC64WordRotateMask(m)
 12034  	// result: (RLWINM [ssa.EncodePPC64RotateMask(r,rotateLeft32(m,r),32)] x)
 12035  	for {
 12036  		r := ssa.AuxIntToInt64(v.AuxInt)
 12037  		if v_0.Op != ssaop.OpPPC64AND {
 12038  			break
 12039  		}
 12040  		_ = v_0.Args[1]
 12041  		v_0_0 := v_0.Args[0]
 12042  		v_0_1 := v_0.Args[1]
 12043  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 12044  			if v_0_0.Op != ssaop.OpPPC64MOVDconst {
 12045  				continue
 12046  			}
 12047  			m := ssa.AuxIntToInt64(v_0_0.AuxInt)
 12048  			x := v_0_1
 12049  			if !(ssa.IsPPC64WordRotateMask(m)) {
 12050  				continue
 12051  			}
 12052  			v.Reset(ssaop.OpPPC64RLWINM)
 12053  			v.AuxInt = ssa.Int64ToAuxInt(ssa.EncodePPC64RotateMask(r, rotateLeft32(m, r), 32))
 12054  			v.AddArg(x)
 12055  			return true
 12056  		}
 12057  		break
 12058  	}
 12059  	// match: (ROTLWconst [r] (ANDconst [m] x))
 12060  	// cond: ssa.IsPPC64WordRotateMask(m)
 12061  	// result: (RLWINM [ssa.EncodePPC64RotateMask(r,rotateLeft32(m,r),32)] x)
 12062  	for {
 12063  		r := ssa.AuxIntToInt64(v.AuxInt)
 12064  		if v_0.Op != ssaop.OpPPC64ANDconst {
 12065  			break
 12066  		}
 12067  		m := ssa.AuxIntToInt64(v_0.AuxInt)
 12068  		x := v_0.Args[0]
 12069  		if !(ssa.IsPPC64WordRotateMask(m)) {
 12070  			break
 12071  		}
 12072  		v.Reset(ssaop.OpPPC64RLWINM)
 12073  		v.AuxInt = ssa.Int64ToAuxInt(ssa.EncodePPC64RotateMask(r, rotateLeft32(m, r), 32))
 12074  		v.AddArg(x)
 12075  		return true
 12076  	}
 12077  	return false
 12078  }
 12079  func rewriteValue_OpPPC64SETBC(v *ssa.Value) bool {
 12080  	v_0 := v.Args[0]
 12081  	b := v.Block
 12082  	typ := &b.Func.Config.Types
 12083  	// match: (SETBC [0] (FlagLT))
 12084  	// result: (MOVDconst [1])
 12085  	for {
 12086  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64FlagLT {
 12087  			break
 12088  		}
 12089  		v.Reset(ssaop.OpPPC64MOVDconst)
 12090  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12091  		return true
 12092  	}
 12093  	// match: (SETBC [0] (FlagGT))
 12094  	// result: (MOVDconst [0])
 12095  	for {
 12096  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64FlagGT {
 12097  			break
 12098  		}
 12099  		v.Reset(ssaop.OpPPC64MOVDconst)
 12100  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12101  		return true
 12102  	}
 12103  	// match: (SETBC [0] (FlagEQ))
 12104  	// result: (MOVDconst [0])
 12105  	for {
 12106  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64FlagEQ {
 12107  			break
 12108  		}
 12109  		v.Reset(ssaop.OpPPC64MOVDconst)
 12110  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12111  		return true
 12112  	}
 12113  	// match: (SETBC [1] (FlagGT))
 12114  	// result: (MOVDconst [1])
 12115  	for {
 12116  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64FlagGT {
 12117  			break
 12118  		}
 12119  		v.Reset(ssaop.OpPPC64MOVDconst)
 12120  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12121  		return true
 12122  	}
 12123  	// match: (SETBC [1] (FlagLT))
 12124  	// result: (MOVDconst [0])
 12125  	for {
 12126  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64FlagLT {
 12127  			break
 12128  		}
 12129  		v.Reset(ssaop.OpPPC64MOVDconst)
 12130  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12131  		return true
 12132  	}
 12133  	// match: (SETBC [1] (FlagEQ))
 12134  	// result: (MOVDconst [0])
 12135  	for {
 12136  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64FlagEQ {
 12137  			break
 12138  		}
 12139  		v.Reset(ssaop.OpPPC64MOVDconst)
 12140  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12141  		return true
 12142  	}
 12143  	// match: (SETBC [2] (FlagEQ))
 12144  	// result: (MOVDconst [1])
 12145  	for {
 12146  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64FlagEQ {
 12147  			break
 12148  		}
 12149  		v.Reset(ssaop.OpPPC64MOVDconst)
 12150  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12151  		return true
 12152  	}
 12153  	// match: (SETBC [2] (FlagLT))
 12154  	// result: (MOVDconst [0])
 12155  	for {
 12156  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64FlagLT {
 12157  			break
 12158  		}
 12159  		v.Reset(ssaop.OpPPC64MOVDconst)
 12160  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12161  		return true
 12162  	}
 12163  	// match: (SETBC [2] (FlagGT))
 12164  	// result: (MOVDconst [0])
 12165  	for {
 12166  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64FlagGT {
 12167  			break
 12168  		}
 12169  		v.Reset(ssaop.OpPPC64MOVDconst)
 12170  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12171  		return true
 12172  	}
 12173  	// match: (SETBC [0] (InvertFlags bool))
 12174  	// result: (SETBC [1] bool)
 12175  	for {
 12176  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64InvertFlags {
 12177  			break
 12178  		}
 12179  		bool := v_0.Args[0]
 12180  		v.Reset(ssaop.OpPPC64SETBC)
 12181  		v.AuxInt = ssa.Int32ToAuxInt(1)
 12182  		v.AddArg(bool)
 12183  		return true
 12184  	}
 12185  	// match: (SETBC [1] (InvertFlags bool))
 12186  	// result: (SETBC [0] bool)
 12187  	for {
 12188  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64InvertFlags {
 12189  			break
 12190  		}
 12191  		bool := v_0.Args[0]
 12192  		v.Reset(ssaop.OpPPC64SETBC)
 12193  		v.AuxInt = ssa.Int32ToAuxInt(0)
 12194  		v.AddArg(bool)
 12195  		return true
 12196  	}
 12197  	// match: (SETBC [2] (InvertFlags bool))
 12198  	// result: (SETBC [2] bool)
 12199  	for {
 12200  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64InvertFlags {
 12201  			break
 12202  		}
 12203  		bool := v_0.Args[0]
 12204  		v.Reset(ssaop.OpPPC64SETBC)
 12205  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12206  		v.AddArg(bool)
 12207  		return true
 12208  	}
 12209  	// match: (SETBC [n] (InvertFlags bool))
 12210  	// result: (SETBCR [n] bool)
 12211  	for {
 12212  		n := ssa.AuxIntToInt32(v.AuxInt)
 12213  		if v_0.Op != ssaop.OpPPC64InvertFlags {
 12214  			break
 12215  		}
 12216  		bool := v_0.Args[0]
 12217  		v.Reset(ssaop.OpPPC64SETBCR)
 12218  		v.AuxInt = ssa.Int32ToAuxInt(n)
 12219  		v.AddArg(bool)
 12220  		return true
 12221  	}
 12222  	// match: (SETBC [2] (CMPconst [0] a:(ANDconst [1] _)))
 12223  	// result: (XORconst [1] a)
 12224  	for {
 12225  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12226  			break
 12227  		}
 12228  		a := v_0.Args[0]
 12229  		if a.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(a.AuxInt) != 1 {
 12230  			break
 12231  		}
 12232  		v.Reset(ssaop.OpPPC64XORconst)
 12233  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12234  		v.AddArg(a)
 12235  		return true
 12236  	}
 12237  	// match: (SETBC [2] (CMPconst [0] a:(AND y z)))
 12238  	// cond: a.Uses == 1
 12239  	// result: (SETBC [2] (Select1 <types.TypeFlags> (ANDCC y z )))
 12240  	for {
 12241  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12242  			break
 12243  		}
 12244  		a := v_0.Args[0]
 12245  		if a.Op != ssaop.OpPPC64AND {
 12246  			break
 12247  		}
 12248  		z := a.Args[1]
 12249  		y := a.Args[0]
 12250  		if !(a.Uses == 1) {
 12251  			break
 12252  		}
 12253  		v.Reset(ssaop.OpPPC64SETBC)
 12254  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12255  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 12256  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 12257  		v1.AddArg2(y, z)
 12258  		v0.AddArg(v1)
 12259  		v.AddArg(v0)
 12260  		return true
 12261  	}
 12262  	// match: (SETBC [2] (CMPconst [0] o:(OR y z)))
 12263  	// cond: o.Uses == 1
 12264  	// result: (SETBC [2] (Select1 <types.TypeFlags> (ORCC y z )))
 12265  	for {
 12266  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12267  			break
 12268  		}
 12269  		o := v_0.Args[0]
 12270  		if o.Op != ssaop.OpPPC64OR {
 12271  			break
 12272  		}
 12273  		z := o.Args[1]
 12274  		y := o.Args[0]
 12275  		if !(o.Uses == 1) {
 12276  			break
 12277  		}
 12278  		v.Reset(ssaop.OpPPC64SETBC)
 12279  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12280  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 12281  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 12282  		v1.AddArg2(y, z)
 12283  		v0.AddArg(v1)
 12284  		v.AddArg(v0)
 12285  		return true
 12286  	}
 12287  	// match: (SETBC [2] (CMPconst [0] a:(XOR y z)))
 12288  	// cond: a.Uses == 1
 12289  	// result: (SETBC [2] (Select1 <types.TypeFlags> (XORCC y z )))
 12290  	for {
 12291  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12292  			break
 12293  		}
 12294  		a := v_0.Args[0]
 12295  		if a.Op != ssaop.OpPPC64XOR {
 12296  			break
 12297  		}
 12298  		z := a.Args[1]
 12299  		y := a.Args[0]
 12300  		if !(a.Uses == 1) {
 12301  			break
 12302  		}
 12303  		v.Reset(ssaop.OpPPC64SETBC)
 12304  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12305  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 12306  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 12307  		v1.AddArg2(y, z)
 12308  		v0.AddArg(v1)
 12309  		v.AddArg(v0)
 12310  		return true
 12311  	}
 12312  	return false
 12313  }
 12314  func rewriteValue_OpPPC64SETBCR(v *ssa.Value) bool {
 12315  	v_0 := v.Args[0]
 12316  	b := v.Block
 12317  	typ := &b.Func.Config.Types
 12318  	// match: (SETBCR [0] (FlagLT))
 12319  	// result: (MOVDconst [0])
 12320  	for {
 12321  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64FlagLT {
 12322  			break
 12323  		}
 12324  		v.Reset(ssaop.OpPPC64MOVDconst)
 12325  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12326  		return true
 12327  	}
 12328  	// match: (SETBCR [0] (FlagGT))
 12329  	// result: (MOVDconst [1])
 12330  	for {
 12331  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64FlagGT {
 12332  			break
 12333  		}
 12334  		v.Reset(ssaop.OpPPC64MOVDconst)
 12335  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12336  		return true
 12337  	}
 12338  	// match: (SETBCR [0] (FlagEQ))
 12339  	// result: (MOVDconst [1])
 12340  	for {
 12341  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64FlagEQ {
 12342  			break
 12343  		}
 12344  		v.Reset(ssaop.OpPPC64MOVDconst)
 12345  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12346  		return true
 12347  	}
 12348  	// match: (SETBCR [1] (FlagGT))
 12349  	// result: (MOVDconst [0])
 12350  	for {
 12351  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64FlagGT {
 12352  			break
 12353  		}
 12354  		v.Reset(ssaop.OpPPC64MOVDconst)
 12355  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12356  		return true
 12357  	}
 12358  	// match: (SETBCR [1] (FlagLT))
 12359  	// result: (MOVDconst [1])
 12360  	for {
 12361  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64FlagLT {
 12362  			break
 12363  		}
 12364  		v.Reset(ssaop.OpPPC64MOVDconst)
 12365  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12366  		return true
 12367  	}
 12368  	// match: (SETBCR [1] (FlagEQ))
 12369  	// result: (MOVDconst [1])
 12370  	for {
 12371  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64FlagEQ {
 12372  			break
 12373  		}
 12374  		v.Reset(ssaop.OpPPC64MOVDconst)
 12375  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12376  		return true
 12377  	}
 12378  	// match: (SETBCR [2] (FlagEQ))
 12379  	// result: (MOVDconst [0])
 12380  	for {
 12381  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64FlagEQ {
 12382  			break
 12383  		}
 12384  		v.Reset(ssaop.OpPPC64MOVDconst)
 12385  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12386  		return true
 12387  	}
 12388  	// match: (SETBCR [2] (FlagLT))
 12389  	// result: (MOVDconst [1])
 12390  	for {
 12391  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64FlagLT {
 12392  			break
 12393  		}
 12394  		v.Reset(ssaop.OpPPC64MOVDconst)
 12395  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12396  		return true
 12397  	}
 12398  	// match: (SETBCR [2] (FlagGT))
 12399  	// result: (MOVDconst [1])
 12400  	for {
 12401  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64FlagGT {
 12402  			break
 12403  		}
 12404  		v.Reset(ssaop.OpPPC64MOVDconst)
 12405  		v.AuxInt = ssa.Int64ToAuxInt(1)
 12406  		return true
 12407  	}
 12408  	// match: (SETBCR [0] (InvertFlags bool))
 12409  	// result: (SETBCR [1] bool)
 12410  	for {
 12411  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || v_0.Op != ssaop.OpPPC64InvertFlags {
 12412  			break
 12413  		}
 12414  		bool := v_0.Args[0]
 12415  		v.Reset(ssaop.OpPPC64SETBCR)
 12416  		v.AuxInt = ssa.Int32ToAuxInt(1)
 12417  		v.AddArg(bool)
 12418  		return true
 12419  	}
 12420  	// match: (SETBCR [1] (InvertFlags bool))
 12421  	// result: (SETBCR [0] bool)
 12422  	for {
 12423  		if ssa.AuxIntToInt32(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64InvertFlags {
 12424  			break
 12425  		}
 12426  		bool := v_0.Args[0]
 12427  		v.Reset(ssaop.OpPPC64SETBCR)
 12428  		v.AuxInt = ssa.Int32ToAuxInt(0)
 12429  		v.AddArg(bool)
 12430  		return true
 12431  	}
 12432  	// match: (SETBCR [2] (InvertFlags bool))
 12433  	// result: (SETBCR [2] bool)
 12434  	for {
 12435  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64InvertFlags {
 12436  			break
 12437  		}
 12438  		bool := v_0.Args[0]
 12439  		v.Reset(ssaop.OpPPC64SETBCR)
 12440  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12441  		v.AddArg(bool)
 12442  		return true
 12443  	}
 12444  	// match: (SETBCR [n] (InvertFlags bool))
 12445  	// result: (SETBC [n] bool)
 12446  	for {
 12447  		n := ssa.AuxIntToInt32(v.AuxInt)
 12448  		if v_0.Op != ssaop.OpPPC64InvertFlags {
 12449  			break
 12450  		}
 12451  		bool := v_0.Args[0]
 12452  		v.Reset(ssaop.OpPPC64SETBC)
 12453  		v.AuxInt = ssa.Int32ToAuxInt(n)
 12454  		v.AddArg(bool)
 12455  		return true
 12456  	}
 12457  	// match: (SETBCR [2] (CMPconst [0] a:(ANDconst [1] _)))
 12458  	// result: a
 12459  	for {
 12460  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12461  			break
 12462  		}
 12463  		a := v_0.Args[0]
 12464  		if a.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(a.AuxInt) != 1 {
 12465  			break
 12466  		}
 12467  		v.CopyOf(a)
 12468  		return true
 12469  	}
 12470  	// match: (SETBCR [2] (CMPconst [0] a:(AND y z)))
 12471  	// cond: a.Uses == 1
 12472  	// result: (SETBCR [2] (Select1 <types.TypeFlags> (ANDCC y z )))
 12473  	for {
 12474  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12475  			break
 12476  		}
 12477  		a := v_0.Args[0]
 12478  		if a.Op != ssaop.OpPPC64AND {
 12479  			break
 12480  		}
 12481  		z := a.Args[1]
 12482  		y := a.Args[0]
 12483  		if !(a.Uses == 1) {
 12484  			break
 12485  		}
 12486  		v.Reset(ssaop.OpPPC64SETBCR)
 12487  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12488  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 12489  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 12490  		v1.AddArg2(y, z)
 12491  		v0.AddArg(v1)
 12492  		v.AddArg(v0)
 12493  		return true
 12494  	}
 12495  	// match: (SETBCR [2] (CMPconst [0] o:(OR y z)))
 12496  	// cond: o.Uses == 1
 12497  	// result: (SETBCR [2] (Select1 <types.TypeFlags> (ORCC y z )))
 12498  	for {
 12499  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12500  			break
 12501  		}
 12502  		o := v_0.Args[0]
 12503  		if o.Op != ssaop.OpPPC64OR {
 12504  			break
 12505  		}
 12506  		z := o.Args[1]
 12507  		y := o.Args[0]
 12508  		if !(o.Uses == 1) {
 12509  			break
 12510  		}
 12511  		v.Reset(ssaop.OpPPC64SETBCR)
 12512  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12513  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 12514  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 12515  		v1.AddArg2(y, z)
 12516  		v0.AddArg(v1)
 12517  		v.AddArg(v0)
 12518  		return true
 12519  	}
 12520  	// match: (SETBCR [2] (CMPconst [0] a:(XOR y z)))
 12521  	// cond: a.Uses == 1
 12522  	// result: (SETBCR [2] (Select1 <types.TypeFlags> (XORCC y z )))
 12523  	for {
 12524  		if ssa.AuxIntToInt32(v.AuxInt) != 2 || v_0.Op != ssaop.OpPPC64CMPconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 12525  			break
 12526  		}
 12527  		a := v_0.Args[0]
 12528  		if a.Op != ssaop.OpPPC64XOR {
 12529  			break
 12530  		}
 12531  		z := a.Args[1]
 12532  		y := a.Args[0]
 12533  		if !(a.Uses == 1) {
 12534  			break
 12535  		}
 12536  		v.Reset(ssaop.OpPPC64SETBCR)
 12537  		v.AuxInt = ssa.Int32ToAuxInt(2)
 12538  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 12539  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 12540  		v1.AddArg2(y, z)
 12541  		v0.AddArg(v1)
 12542  		v.AddArg(v0)
 12543  		return true
 12544  	}
 12545  	return false
 12546  }
 12547  func rewriteValue_OpPPC64SLD(v *ssa.Value) bool {
 12548  	v_1 := v.Args[1]
 12549  	v_0 := v.Args[0]
 12550  	// match: (SLD x (MOVDconst [c]))
 12551  	// result: (SLDconst [c&63 | (c>>6&1*63)] x)
 12552  	for {
 12553  		x := v_0
 12554  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12555  			break
 12556  		}
 12557  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12558  		v.Reset(ssaop.OpPPC64SLDconst)
 12559  		v.AuxInt = ssa.Int64ToAuxInt(c&63 | (c >> 6 & 1 * 63))
 12560  		v.AddArg(x)
 12561  		return true
 12562  	}
 12563  	return false
 12564  }
 12565  func rewriteValue_OpPPC64SLDconst(v *ssa.Value) bool {
 12566  	v_0 := v.Args[0]
 12567  	// match: (SLDconst [l] (SRWconst [r] x))
 12568  	// cond: ssa.MergePPC64SldiSrw(l,r) != 0
 12569  	// result: (RLWINM [ssa.MergePPC64SldiSrw(l,r)] x)
 12570  	for {
 12571  		l := ssa.AuxIntToInt64(v.AuxInt)
 12572  		if v_0.Op != ssaop.OpPPC64SRWconst {
 12573  			break
 12574  		}
 12575  		r := ssa.AuxIntToInt64(v_0.AuxInt)
 12576  		x := v_0.Args[0]
 12577  		if !(ssa.MergePPC64SldiSrw(l, r) != 0) {
 12578  			break
 12579  		}
 12580  		v.Reset(ssaop.OpPPC64RLWINM)
 12581  		v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64SldiSrw(l, r))
 12582  		v.AddArg(x)
 12583  		return true
 12584  	}
 12585  	// match: (SLDconst [s] (RLWINM [r] y))
 12586  	// cond: mergePPC64SldiRlwinm(s,r) != 0
 12587  	// result: (RLWINM [mergePPC64SldiRlwinm(s,r)] y)
 12588  	for {
 12589  		s := ssa.AuxIntToInt64(v.AuxInt)
 12590  		if v_0.Op != ssaop.OpPPC64RLWINM {
 12591  			break
 12592  		}
 12593  		r := ssa.AuxIntToInt64(v_0.AuxInt)
 12594  		y := v_0.Args[0]
 12595  		if !(mergePPC64SldiRlwinm(s, r) != 0) {
 12596  			break
 12597  		}
 12598  		v.Reset(ssaop.OpPPC64RLWINM)
 12599  		v.AuxInt = ssa.Int64ToAuxInt(mergePPC64SldiRlwinm(s, r))
 12600  		v.AddArg(y)
 12601  		return true
 12602  	}
 12603  	// match: (SLDconst [c] z:(MOVBZreg x))
 12604  	// cond: c < 8 && z.Uses == 1
 12605  	// result: (CLRLSLDI [ssa.NewPPC64ShiftAuxInt(c,56,63,64)] x)
 12606  	for {
 12607  		c := ssa.AuxIntToInt64(v.AuxInt)
 12608  		z := v_0
 12609  		if z.Op != ssaop.OpPPC64MOVBZreg {
 12610  			break
 12611  		}
 12612  		x := z.Args[0]
 12613  		if !(c < 8 && z.Uses == 1) {
 12614  			break
 12615  		}
 12616  		v.Reset(ssaop.OpPPC64CLRLSLDI)
 12617  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 56, 63, 64))
 12618  		v.AddArg(x)
 12619  		return true
 12620  	}
 12621  	// match: (SLDconst [c] z:(MOVHZreg x))
 12622  	// cond: c < 16 && z.Uses == 1
 12623  	// result: (CLRLSLDI [ssa.NewPPC64ShiftAuxInt(c,48,63,64)] x)
 12624  	for {
 12625  		c := ssa.AuxIntToInt64(v.AuxInt)
 12626  		z := v_0
 12627  		if z.Op != ssaop.OpPPC64MOVHZreg {
 12628  			break
 12629  		}
 12630  		x := z.Args[0]
 12631  		if !(c < 16 && z.Uses == 1) {
 12632  			break
 12633  		}
 12634  		v.Reset(ssaop.OpPPC64CLRLSLDI)
 12635  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 48, 63, 64))
 12636  		v.AddArg(x)
 12637  		return true
 12638  	}
 12639  	// match: (SLDconst [c] z:(MOVWZreg x))
 12640  	// cond: c < 32 && z.Uses == 1
 12641  	// result: (CLRLSLDI [ssa.NewPPC64ShiftAuxInt(c,32,63,64)] x)
 12642  	for {
 12643  		c := ssa.AuxIntToInt64(v.AuxInt)
 12644  		z := v_0
 12645  		if z.Op != ssaop.OpPPC64MOVWZreg {
 12646  			break
 12647  		}
 12648  		x := z.Args[0]
 12649  		if !(c < 32 && z.Uses == 1) {
 12650  			break
 12651  		}
 12652  		v.Reset(ssaop.OpPPC64CLRLSLDI)
 12653  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 32, 63, 64))
 12654  		v.AddArg(x)
 12655  		return true
 12656  	}
 12657  	// match: (SLDconst [c] z:(ANDconst [d] x))
 12658  	// cond: z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c <= (64-getPPC64ShiftMaskLength(d))
 12659  	// result: (CLRLSLDI [ssa.NewPPC64ShiftAuxInt(c,64-getPPC64ShiftMaskLength(d),63,64)] x)
 12660  	for {
 12661  		c := ssa.AuxIntToInt64(v.AuxInt)
 12662  		z := v_0
 12663  		if z.Op != ssaop.OpPPC64ANDconst {
 12664  			break
 12665  		}
 12666  		d := ssa.AuxIntToInt64(z.AuxInt)
 12667  		x := z.Args[0]
 12668  		if !(z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c <= (64-getPPC64ShiftMaskLength(d))) {
 12669  			break
 12670  		}
 12671  		v.Reset(ssaop.OpPPC64CLRLSLDI)
 12672  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 64-getPPC64ShiftMaskLength(d), 63, 64))
 12673  		v.AddArg(x)
 12674  		return true
 12675  	}
 12676  	// match: (SLDconst [c] z:(AND (MOVDconst [d]) x))
 12677  	// cond: z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c<=(64-getPPC64ShiftMaskLength(d))
 12678  	// result: (CLRLSLDI [ssa.NewPPC64ShiftAuxInt(c,64-getPPC64ShiftMaskLength(d),63,64)] x)
 12679  	for {
 12680  		c := ssa.AuxIntToInt64(v.AuxInt)
 12681  		z := v_0
 12682  		if z.Op != ssaop.OpPPC64AND {
 12683  			break
 12684  		}
 12685  		_ = z.Args[1]
 12686  		z_0 := z.Args[0]
 12687  		z_1 := z.Args[1]
 12688  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 12689  			if z_0.Op != ssaop.OpPPC64MOVDconst {
 12690  				continue
 12691  			}
 12692  			d := ssa.AuxIntToInt64(z_0.AuxInt)
 12693  			x := z_1
 12694  			if !(z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c <= (64-getPPC64ShiftMaskLength(d))) {
 12695  				continue
 12696  			}
 12697  			v.Reset(ssaop.OpPPC64CLRLSLDI)
 12698  			v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 64-getPPC64ShiftMaskLength(d), 63, 64))
 12699  			v.AddArg(x)
 12700  			return true
 12701  		}
 12702  		break
 12703  	}
 12704  	// match: (SLDconst [c] (ADD x x))
 12705  	// cond: c < 63
 12706  	// result: (SLDconst [c+1] x)
 12707  	for {
 12708  		c := ssa.AuxIntToInt64(v.AuxInt)
 12709  		if v_0.Op != ssaop.OpPPC64ADD {
 12710  			break
 12711  		}
 12712  		x := v_0.Args[1]
 12713  		if x != v_0.Args[0] || !(c < 63) {
 12714  			break
 12715  		}
 12716  		v.Reset(ssaop.OpPPC64SLDconst)
 12717  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
 12718  		v.AddArg(x)
 12719  		return true
 12720  	}
 12721  	// match: (SLDconst [c] z:(MOVWreg x))
 12722  	// cond: c < 32 && buildcfg.GOPPC64 >= 9
 12723  	// result: (EXTSWSLconst [c] x)
 12724  	for {
 12725  		c := ssa.AuxIntToInt64(v.AuxInt)
 12726  		z := v_0
 12727  		if z.Op != ssaop.OpPPC64MOVWreg {
 12728  			break
 12729  		}
 12730  		x := z.Args[0]
 12731  		if !(c < 32 && buildcfg.GOPPC64 >= 9) {
 12732  			break
 12733  		}
 12734  		v.Reset(ssaop.OpPPC64EXTSWSLconst)
 12735  		v.AuxInt = ssa.Int64ToAuxInt(c)
 12736  		v.AddArg(x)
 12737  		return true
 12738  	}
 12739  	return false
 12740  }
 12741  func rewriteValue_OpPPC64SLW(v *ssa.Value) bool {
 12742  	v_1 := v.Args[1]
 12743  	v_0 := v.Args[0]
 12744  	// match: (SLW x (MOVDconst [c]))
 12745  	// result: (SLWconst [c&31 | (c>>5&1*31)] x)
 12746  	for {
 12747  		x := v_0
 12748  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12749  			break
 12750  		}
 12751  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12752  		v.Reset(ssaop.OpPPC64SLWconst)
 12753  		v.AuxInt = ssa.Int64ToAuxInt(c&31 | (c >> 5 & 1 * 31))
 12754  		v.AddArg(x)
 12755  		return true
 12756  	}
 12757  	return false
 12758  }
 12759  func rewriteValue_OpPPC64SLWconst(v *ssa.Value) bool {
 12760  	v_0 := v.Args[0]
 12761  	// match: (SLWconst [s] (MOVWZreg w))
 12762  	// result: (SLWconst [s] w)
 12763  	for {
 12764  		s := ssa.AuxIntToInt64(v.AuxInt)
 12765  		if v_0.Op != ssaop.OpPPC64MOVWZreg {
 12766  			break
 12767  		}
 12768  		w := v_0.Args[0]
 12769  		v.Reset(ssaop.OpPPC64SLWconst)
 12770  		v.AuxInt = ssa.Int64ToAuxInt(s)
 12771  		v.AddArg(w)
 12772  		return true
 12773  	}
 12774  	// match: (SLWconst [c] z:(MOVBZreg x))
 12775  	// cond: z.Uses == 1 && c < 8
 12776  	// result: (CLRLSLWI [ssa.NewPPC64ShiftAuxInt(c,24,31,32)] x)
 12777  	for {
 12778  		c := ssa.AuxIntToInt64(v.AuxInt)
 12779  		z := v_0
 12780  		if z.Op != ssaop.OpPPC64MOVBZreg {
 12781  			break
 12782  		}
 12783  		x := z.Args[0]
 12784  		if !(z.Uses == 1 && c < 8) {
 12785  			break
 12786  		}
 12787  		v.Reset(ssaop.OpPPC64CLRLSLWI)
 12788  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 24, 31, 32))
 12789  		v.AddArg(x)
 12790  		return true
 12791  	}
 12792  	// match: (SLWconst [c] z:(MOVHZreg x))
 12793  	// cond: z.Uses == 1 && c < 16
 12794  	// result: (CLRLSLWI [ssa.NewPPC64ShiftAuxInt(c,16,31,32)] x)
 12795  	for {
 12796  		c := ssa.AuxIntToInt64(v.AuxInt)
 12797  		z := v_0
 12798  		if z.Op != ssaop.OpPPC64MOVHZreg {
 12799  			break
 12800  		}
 12801  		x := z.Args[0]
 12802  		if !(z.Uses == 1 && c < 16) {
 12803  			break
 12804  		}
 12805  		v.Reset(ssaop.OpPPC64CLRLSLWI)
 12806  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 16, 31, 32))
 12807  		v.AddArg(x)
 12808  		return true
 12809  	}
 12810  	// match: (SLWconst [c] z:(ANDconst [d] x))
 12811  	// cond: z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c<=(32-getPPC64ShiftMaskLength(d))
 12812  	// result: (CLRLSLWI [ssa.NewPPC64ShiftAuxInt(c,32-getPPC64ShiftMaskLength(d),31,32)] x)
 12813  	for {
 12814  		c := ssa.AuxIntToInt64(v.AuxInt)
 12815  		z := v_0
 12816  		if z.Op != ssaop.OpPPC64ANDconst {
 12817  			break
 12818  		}
 12819  		d := ssa.AuxIntToInt64(z.AuxInt)
 12820  		x := z.Args[0]
 12821  		if !(z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c <= (32-getPPC64ShiftMaskLength(d))) {
 12822  			break
 12823  		}
 12824  		v.Reset(ssaop.OpPPC64CLRLSLWI)
 12825  		v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 32-getPPC64ShiftMaskLength(d), 31, 32))
 12826  		v.AddArg(x)
 12827  		return true
 12828  	}
 12829  	// match: (SLWconst [c] z:(AND (MOVDconst [d]) x))
 12830  	// cond: z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c<=(32-getPPC64ShiftMaskLength(d))
 12831  	// result: (CLRLSLWI [ssa.NewPPC64ShiftAuxInt(c,32-getPPC64ShiftMaskLength(d),31,32)] x)
 12832  	for {
 12833  		c := ssa.AuxIntToInt64(v.AuxInt)
 12834  		z := v_0
 12835  		if z.Op != ssaop.OpPPC64AND {
 12836  			break
 12837  		}
 12838  		_ = z.Args[1]
 12839  		z_0 := z.Args[0]
 12840  		z_1 := z.Args[1]
 12841  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 12842  			if z_0.Op != ssaop.OpPPC64MOVDconst {
 12843  				continue
 12844  			}
 12845  			d := ssa.AuxIntToInt64(z_0.AuxInt)
 12846  			x := z_1
 12847  			if !(z.Uses == 1 && ssa.IsPPC64ValidShiftMask(d) && c <= (32-getPPC64ShiftMaskLength(d))) {
 12848  				continue
 12849  			}
 12850  			v.Reset(ssaop.OpPPC64CLRLSLWI)
 12851  			v.AuxInt = ssa.Int32ToAuxInt(ssa.NewPPC64ShiftAuxInt(c, 32-getPPC64ShiftMaskLength(d), 31, 32))
 12852  			v.AddArg(x)
 12853  			return true
 12854  		}
 12855  		break
 12856  	}
 12857  	// match: (SLWconst [c] (ADD x x))
 12858  	// cond: c < 31
 12859  	// result: (SLWconst [c+1] x)
 12860  	for {
 12861  		c := ssa.AuxIntToInt64(v.AuxInt)
 12862  		if v_0.Op != ssaop.OpPPC64ADD {
 12863  			break
 12864  		}
 12865  		x := v_0.Args[1]
 12866  		if x != v_0.Args[0] || !(c < 31) {
 12867  			break
 12868  		}
 12869  		v.Reset(ssaop.OpPPC64SLWconst)
 12870  		v.AuxInt = ssa.Int64ToAuxInt(c + 1)
 12871  		v.AddArg(x)
 12872  		return true
 12873  	}
 12874  	// match: (SLWconst [c] z:(MOVWreg x))
 12875  	// cond: c < 32 && buildcfg.GOPPC64 >= 9
 12876  	// result: (EXTSWSLconst [c] x)
 12877  	for {
 12878  		c := ssa.AuxIntToInt64(v.AuxInt)
 12879  		z := v_0
 12880  		if z.Op != ssaop.OpPPC64MOVWreg {
 12881  			break
 12882  		}
 12883  		x := z.Args[0]
 12884  		if !(c < 32 && buildcfg.GOPPC64 >= 9) {
 12885  			break
 12886  		}
 12887  		v.Reset(ssaop.OpPPC64EXTSWSLconst)
 12888  		v.AuxInt = ssa.Int64ToAuxInt(c)
 12889  		v.AddArg(x)
 12890  		return true
 12891  	}
 12892  	return false
 12893  }
 12894  func rewriteValue_OpPPC64SRAD(v *ssa.Value) bool {
 12895  	v_1 := v.Args[1]
 12896  	v_0 := v.Args[0]
 12897  	// match: (SRAD x (MOVDconst [c]))
 12898  	// result: (SRADconst [c&63 | (c>>6&1*63)] x)
 12899  	for {
 12900  		x := v_0
 12901  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12902  			break
 12903  		}
 12904  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12905  		v.Reset(ssaop.OpPPC64SRADconst)
 12906  		v.AuxInt = ssa.Int64ToAuxInt(c&63 | (c >> 6 & 1 * 63))
 12907  		v.AddArg(x)
 12908  		return true
 12909  	}
 12910  	return false
 12911  }
 12912  func rewriteValue_OpPPC64SRAW(v *ssa.Value) bool {
 12913  	v_1 := v.Args[1]
 12914  	v_0 := v.Args[0]
 12915  	// match: (SRAW x (MOVDconst [c]))
 12916  	// result: (SRAWconst [c&31 | (c>>5&1*31)] x)
 12917  	for {
 12918  		x := v_0
 12919  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12920  			break
 12921  		}
 12922  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12923  		v.Reset(ssaop.OpPPC64SRAWconst)
 12924  		v.AuxInt = ssa.Int64ToAuxInt(c&31 | (c >> 5 & 1 * 31))
 12925  		v.AddArg(x)
 12926  		return true
 12927  	}
 12928  	return false
 12929  }
 12930  func rewriteValue_OpPPC64SRD(v *ssa.Value) bool {
 12931  	v_1 := v.Args[1]
 12932  	v_0 := v.Args[0]
 12933  	// match: (SRD x (MOVDconst [c]))
 12934  	// result: (SRDconst [c&63 | (c>>6&1*63)] x)
 12935  	for {
 12936  		x := v_0
 12937  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12938  			break
 12939  		}
 12940  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12941  		v.Reset(ssaop.OpPPC64SRDconst)
 12942  		v.AuxInt = ssa.Int64ToAuxInt(c&63 | (c >> 6 & 1 * 63))
 12943  		v.AddArg(x)
 12944  		return true
 12945  	}
 12946  	return false
 12947  }
 12948  func rewriteValue_OpPPC64SRW(v *ssa.Value) bool {
 12949  	v_1 := v.Args[1]
 12950  	v_0 := v.Args[0]
 12951  	// match: (SRW x (MOVDconst [c]))
 12952  	// result: (SRWconst [c&31 | (c>>5&1*31)] x)
 12953  	for {
 12954  		x := v_0
 12955  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 12956  			break
 12957  		}
 12958  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12959  		v.Reset(ssaop.OpPPC64SRWconst)
 12960  		v.AuxInt = ssa.Int64ToAuxInt(c&31 | (c >> 5 & 1 * 31))
 12961  		v.AddArg(x)
 12962  		return true
 12963  	}
 12964  	return false
 12965  }
 12966  func rewriteValue_OpPPC64SRWconst(v *ssa.Value) bool {
 12967  	v_0 := v.Args[0]
 12968  	// match: (SRWconst (ANDconst [m] x) [s])
 12969  	// cond: ssa.MergePPC64RShiftMask(m>>uint(s),s,32) == 0
 12970  	// result: (MOVDconst [0])
 12971  	for {
 12972  		s := ssa.AuxIntToInt64(v.AuxInt)
 12973  		if v_0.Op != ssaop.OpPPC64ANDconst {
 12974  			break
 12975  		}
 12976  		m := ssa.AuxIntToInt64(v_0.AuxInt)
 12977  		if !(ssa.MergePPC64RShiftMask(m>>uint(s), s, 32) == 0) {
 12978  			break
 12979  		}
 12980  		v.Reset(ssaop.OpPPC64MOVDconst)
 12981  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12982  		return true
 12983  	}
 12984  	// match: (SRWconst (ANDconst [m] x) [s])
 12985  	// cond: ssa.MergePPC64AndSrwi(m>>uint(s),s) != 0
 12986  	// result: (RLWINM [ssa.MergePPC64AndSrwi(m>>uint(s),s)] x)
 12987  	for {
 12988  		s := ssa.AuxIntToInt64(v.AuxInt)
 12989  		if v_0.Op != ssaop.OpPPC64ANDconst {
 12990  			break
 12991  		}
 12992  		m := ssa.AuxIntToInt64(v_0.AuxInt)
 12993  		x := v_0.Args[0]
 12994  		if !(ssa.MergePPC64AndSrwi(m>>uint(s), s) != 0) {
 12995  			break
 12996  		}
 12997  		v.Reset(ssaop.OpPPC64RLWINM)
 12998  		v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64AndSrwi(m>>uint(s), s))
 12999  		v.AddArg(x)
 13000  		return true
 13001  	}
 13002  	// match: (SRWconst (AND (MOVDconst [m]) x) [s])
 13003  	// cond: ssa.MergePPC64RShiftMask(m>>uint(s),s,32) == 0
 13004  	// result: (MOVDconst [0])
 13005  	for {
 13006  		s := ssa.AuxIntToInt64(v.AuxInt)
 13007  		if v_0.Op != ssaop.OpPPC64AND {
 13008  			break
 13009  		}
 13010  		_ = v_0.Args[1]
 13011  		v_0_0 := v_0.Args[0]
 13012  		v_0_1 := v_0.Args[1]
 13013  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 13014  			if v_0_0.Op != ssaop.OpPPC64MOVDconst {
 13015  				continue
 13016  			}
 13017  			m := ssa.AuxIntToInt64(v_0_0.AuxInt)
 13018  			if !(ssa.MergePPC64RShiftMask(m>>uint(s), s, 32) == 0) {
 13019  				continue
 13020  			}
 13021  			v.Reset(ssaop.OpPPC64MOVDconst)
 13022  			v.AuxInt = ssa.Int64ToAuxInt(0)
 13023  			return true
 13024  		}
 13025  		break
 13026  	}
 13027  	// match: (SRWconst (AND (MOVDconst [m]) x) [s])
 13028  	// cond: ssa.MergePPC64AndSrwi(m>>uint(s),s) != 0
 13029  	// result: (RLWINM [ssa.MergePPC64AndSrwi(m>>uint(s),s)] x)
 13030  	for {
 13031  		s := ssa.AuxIntToInt64(v.AuxInt)
 13032  		if v_0.Op != ssaop.OpPPC64AND {
 13033  			break
 13034  		}
 13035  		_ = v_0.Args[1]
 13036  		v_0_0 := v_0.Args[0]
 13037  		v_0_1 := v_0.Args[1]
 13038  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 13039  			if v_0_0.Op != ssaop.OpPPC64MOVDconst {
 13040  				continue
 13041  			}
 13042  			m := ssa.AuxIntToInt64(v_0_0.AuxInt)
 13043  			x := v_0_1
 13044  			if !(ssa.MergePPC64AndSrwi(m>>uint(s), s) != 0) {
 13045  				continue
 13046  			}
 13047  			v.Reset(ssaop.OpPPC64RLWINM)
 13048  			v.AuxInt = ssa.Int64ToAuxInt(ssa.MergePPC64AndSrwi(m>>uint(s), s))
 13049  			v.AddArg(x)
 13050  			return true
 13051  		}
 13052  		break
 13053  	}
 13054  	return false
 13055  }
 13056  func rewriteValue_OpPPC64SUB(v *ssa.Value) bool {
 13057  	v_1 := v.Args[1]
 13058  	v_0 := v.Args[0]
 13059  	// match: (SUB x (MOVDconst [c]))
 13060  	// cond: ssa.Is32Bit(-c)
 13061  	// result: (ADDconst [-c] x)
 13062  	for {
 13063  		x := v_0
 13064  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13065  			break
 13066  		}
 13067  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13068  		if !(ssa.Is32Bit(-c)) {
 13069  			break
 13070  		}
 13071  		v.Reset(ssaop.OpPPC64ADDconst)
 13072  		v.AuxInt = ssa.Int64ToAuxInt(-c)
 13073  		v.AddArg(x)
 13074  		return true
 13075  	}
 13076  	// match: (SUB (MOVDconst [c]) x)
 13077  	// cond: ssa.Is32Bit(c)
 13078  	// result: (SUBFCconst [c] x)
 13079  	for {
 13080  		if v_0.Op != ssaop.OpPPC64MOVDconst {
 13081  			break
 13082  		}
 13083  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 13084  		x := v_1
 13085  		if !(ssa.Is32Bit(c)) {
 13086  			break
 13087  		}
 13088  		v.Reset(ssaop.OpPPC64SUBFCconst)
 13089  		v.AuxInt = ssa.Int64ToAuxInt(c)
 13090  		v.AddArg(x)
 13091  		return true
 13092  	}
 13093  	return false
 13094  }
 13095  func rewriteValue_OpPPC64SUBE(v *ssa.Value) bool {
 13096  	v_2 := v.Args[2]
 13097  	v_1 := v.Args[1]
 13098  	v_0 := v.Args[0]
 13099  	b := v.Block
 13100  	typ := &b.Func.Config.Types
 13101  	// match: (SUBE x y (Select1 <typ.UInt64> (SUBCconst (MOVDconst [0]) [0])))
 13102  	// result: (SUBC x y)
 13103  	for {
 13104  		x := v_0
 13105  		y := v_1
 13106  		if v_2.Op != ssaop.OpSelect1 || v_2.Type != typ.UInt64 {
 13107  			break
 13108  		}
 13109  		v_2_0 := v_2.Args[0]
 13110  		if v_2_0.Op != ssaop.OpPPC64SUBCconst || ssa.AuxIntToInt64(v_2_0.AuxInt) != 0 {
 13111  			break
 13112  		}
 13113  		v_2_0_0 := v_2_0.Args[0]
 13114  		if v_2_0_0.Op != ssaop.OpPPC64MOVDconst || ssa.AuxIntToInt64(v_2_0_0.AuxInt) != 0 {
 13115  			break
 13116  		}
 13117  		v.Reset(ssaop.OpPPC64SUBC)
 13118  		v.AddArg2(x, y)
 13119  		return true
 13120  	}
 13121  	return false
 13122  }
 13123  func rewriteValue_OpPPC64SUBFCconst(v *ssa.Value) bool {
 13124  	v_0 := v.Args[0]
 13125  	// match: (SUBFCconst [c] (NEG x))
 13126  	// result: (ADDconst [c] x)
 13127  	for {
 13128  		c := ssa.AuxIntToInt64(v.AuxInt)
 13129  		if v_0.Op != ssaop.OpPPC64NEG {
 13130  			break
 13131  		}
 13132  		x := v_0.Args[0]
 13133  		v.Reset(ssaop.OpPPC64ADDconst)
 13134  		v.AuxInt = ssa.Int64ToAuxInt(c)
 13135  		v.AddArg(x)
 13136  		return true
 13137  	}
 13138  	// match: (SUBFCconst [c] (SUBFCconst [d] x))
 13139  	// cond: ssa.Is32Bit(c-d)
 13140  	// result: (ADDconst [c-d] x)
 13141  	for {
 13142  		c := ssa.AuxIntToInt64(v.AuxInt)
 13143  		if v_0.Op != ssaop.OpPPC64SUBFCconst {
 13144  			break
 13145  		}
 13146  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 13147  		x := v_0.Args[0]
 13148  		if !(ssa.Is32Bit(c - d)) {
 13149  			break
 13150  		}
 13151  		v.Reset(ssaop.OpPPC64ADDconst)
 13152  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
 13153  		v.AddArg(x)
 13154  		return true
 13155  	}
 13156  	// match: (SUBFCconst [0] x)
 13157  	// result: (NEG x)
 13158  	for {
 13159  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 13160  			break
 13161  		}
 13162  		x := v_0
 13163  		v.Reset(ssaop.OpPPC64NEG)
 13164  		v.AddArg(x)
 13165  		return true
 13166  	}
 13167  	return false
 13168  }
 13169  func rewriteValue_OpPPC64XOR(v *ssa.Value) bool {
 13170  	v_1 := v.Args[1]
 13171  	v_0 := v.Args[0]
 13172  	// match: (XOR <t> x (MOVDconst [m]))
 13173  	// cond: t.IsUnsigned() && t.Size() == 1 && m != int64(uint8(m))
 13174  	// result: (XORconst [int64(uint8(m))] x)
 13175  	for {
 13176  		t := v.Type
 13177  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13178  			x := v_0
 13179  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 13180  				continue
 13181  			}
 13182  			m := ssa.AuxIntToInt64(v_1.AuxInt)
 13183  			if !(t.IsUnsigned() && t.Size() == 1 && m != int64(uint8(m))) {
 13184  				continue
 13185  			}
 13186  			v.Reset(ssaop.OpPPC64XORconst)
 13187  			v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(m)))
 13188  			v.AddArg(x)
 13189  			return true
 13190  		}
 13191  		break
 13192  	}
 13193  	// match: (XOR <t> x (MOVDconst [m]))
 13194  	// cond: t.IsUnsigned() && t.Size() == 2 && m != int64(uint16(m))
 13195  	// result: (XORconst [int64(uint16(m))] x)
 13196  	for {
 13197  		t := v.Type
 13198  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13199  			x := v_0
 13200  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 13201  				continue
 13202  			}
 13203  			m := ssa.AuxIntToInt64(v_1.AuxInt)
 13204  			if !(t.IsUnsigned() && t.Size() == 2 && m != int64(uint16(m))) {
 13205  				continue
 13206  			}
 13207  			v.Reset(ssaop.OpPPC64XORconst)
 13208  			v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(m)))
 13209  			v.AddArg(x)
 13210  			return true
 13211  		}
 13212  		break
 13213  	}
 13214  	// match: (XOR (MOVDconst [c]) (MOVDconst [d]))
 13215  	// result: (MOVDconst [c^d])
 13216  	for {
 13217  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13218  			if v_0.Op != ssaop.OpPPC64MOVDconst {
 13219  				continue
 13220  			}
 13221  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 13222  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 13223  				continue
 13224  			}
 13225  			d := ssa.AuxIntToInt64(v_1.AuxInt)
 13226  			v.Reset(ssaop.OpPPC64MOVDconst)
 13227  			v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
 13228  			return true
 13229  		}
 13230  		break
 13231  	}
 13232  	// match: (XOR x (MOVDconst [c]))
 13233  	// cond: ssa.IsU32Bit(c)
 13234  	// result: (XORconst [c] x)
 13235  	for {
 13236  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13237  			x := v_0
 13238  			if v_1.Op != ssaop.OpPPC64MOVDconst {
 13239  				continue
 13240  			}
 13241  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 13242  			if !(ssa.IsU32Bit(c)) {
 13243  				continue
 13244  			}
 13245  			v.Reset(ssaop.OpPPC64XORconst)
 13246  			v.AuxInt = ssa.Int64ToAuxInt(c)
 13247  			v.AddArg(x)
 13248  			return true
 13249  		}
 13250  		break
 13251  	}
 13252  	return false
 13253  }
 13254  func rewriteValue_OpPPC64XORconst(v *ssa.Value) bool {
 13255  	v_0 := v.Args[0]
 13256  	// match: (XORconst [c] (XORconst [d] x))
 13257  	// result: (XORconst [c^d] x)
 13258  	for {
 13259  		c := ssa.AuxIntToInt64(v.AuxInt)
 13260  		if v_0.Op != ssaop.OpPPC64XORconst {
 13261  			break
 13262  		}
 13263  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 13264  		x := v_0.Args[0]
 13265  		v.Reset(ssaop.OpPPC64XORconst)
 13266  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
 13267  		v.AddArg(x)
 13268  		return true
 13269  	}
 13270  	// match: (XORconst [0] x)
 13271  	// result: x
 13272  	for {
 13273  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 13274  			break
 13275  		}
 13276  		x := v_0
 13277  		v.CopyOf(x)
 13278  		return true
 13279  	}
 13280  	// match: (XORconst [1] (SETBCR [n] cmp))
 13281  	// result: (SETBC [n] cmp)
 13282  	for {
 13283  		if ssa.AuxIntToInt64(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64SETBCR {
 13284  			break
 13285  		}
 13286  		n := ssa.AuxIntToInt32(v_0.AuxInt)
 13287  		cmp := v_0.Args[0]
 13288  		v.Reset(ssaop.OpPPC64SETBC)
 13289  		v.AuxInt = ssa.Int32ToAuxInt(n)
 13290  		v.AddArg(cmp)
 13291  		return true
 13292  	}
 13293  	// match: (XORconst [1] (SETBC [n] cmp))
 13294  	// result: (SETBCR [n] cmp)
 13295  	for {
 13296  		if ssa.AuxIntToInt64(v.AuxInt) != 1 || v_0.Op != ssaop.OpPPC64SETBC {
 13297  			break
 13298  		}
 13299  		n := ssa.AuxIntToInt32(v_0.AuxInt)
 13300  		cmp := v_0.Args[0]
 13301  		v.Reset(ssaop.OpPPC64SETBCR)
 13302  		v.AuxInt = ssa.Int32ToAuxInt(n)
 13303  		v.AddArg(cmp)
 13304  		return true
 13305  	}
 13306  	return false
 13307  }
 13308  func rewriteValue_OpPopCount16(v *ssa.Value) bool {
 13309  	v_0 := v.Args[0]
 13310  	b := v.Block
 13311  	typ := &b.Func.Config.Types
 13312  	// match: (PopCount16 x)
 13313  	// result: (POPCNTW (MOVHZreg x))
 13314  	for {
 13315  		x := v_0
 13316  		v.Reset(ssaop.OpPPC64POPCNTW)
 13317  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13318  		v0.AddArg(x)
 13319  		v.AddArg(v0)
 13320  		return true
 13321  	}
 13322  }
 13323  func rewriteValue_OpPopCount32(v *ssa.Value) bool {
 13324  	v_0 := v.Args[0]
 13325  	b := v.Block
 13326  	typ := &b.Func.Config.Types
 13327  	// match: (PopCount32 x)
 13328  	// result: (POPCNTW (MOVWZreg x))
 13329  	for {
 13330  		x := v_0
 13331  		v.Reset(ssaop.OpPPC64POPCNTW)
 13332  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWZreg, typ.Int64)
 13333  		v0.AddArg(x)
 13334  		v.AddArg(v0)
 13335  		return true
 13336  	}
 13337  }
 13338  func rewriteValue_OpPopCount8(v *ssa.Value) bool {
 13339  	v_0 := v.Args[0]
 13340  	b := v.Block
 13341  	typ := &b.Func.Config.Types
 13342  	// match: (PopCount8 x)
 13343  	// result: (POPCNTB (MOVBZreg x))
 13344  	for {
 13345  		x := v_0
 13346  		v.Reset(ssaop.OpPPC64POPCNTB)
 13347  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 13348  		v0.AddArg(x)
 13349  		v.AddArg(v0)
 13350  		return true
 13351  	}
 13352  }
 13353  func rewriteValue_OpPrefetchCache(v *ssa.Value) bool {
 13354  	v_1 := v.Args[1]
 13355  	v_0 := v.Args[0]
 13356  	// match: (PrefetchCache ptr mem)
 13357  	// result: (DCBT ptr mem [0])
 13358  	for {
 13359  		ptr := v_0
 13360  		mem := v_1
 13361  		v.Reset(ssaop.OpPPC64DCBT)
 13362  		v.AuxInt = ssa.Int64ToAuxInt(0)
 13363  		v.AddArg2(ptr, mem)
 13364  		return true
 13365  	}
 13366  }
 13367  func rewriteValue_OpPrefetchCacheStreamed(v *ssa.Value) bool {
 13368  	v_1 := v.Args[1]
 13369  	v_0 := v.Args[0]
 13370  	// match: (PrefetchCacheStreamed ptr mem)
 13371  	// result: (DCBT ptr mem [16])
 13372  	for {
 13373  		ptr := v_0
 13374  		mem := v_1
 13375  		v.Reset(ssaop.OpPPC64DCBT)
 13376  		v.AuxInt = ssa.Int64ToAuxInt(16)
 13377  		v.AddArg2(ptr, mem)
 13378  		return true
 13379  	}
 13380  }
 13381  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
 13382  	v_1 := v.Args[1]
 13383  	v_0 := v.Args[0]
 13384  	b := v.Block
 13385  	typ := &b.Func.Config.Types
 13386  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 13387  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 13388  	for {
 13389  		t := v.Type
 13390  		x := v_0
 13391  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13392  			break
 13393  		}
 13394  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13395  		v.Reset(ssaop.OpOr16)
 13396  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh16x64, t)
 13397  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13398  		v1.AuxInt = ssa.Int64ToAuxInt(c & 15)
 13399  		v0.AddArg2(x, v1)
 13400  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux64, t)
 13401  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13402  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 15)
 13403  		v2.AddArg2(x, v3)
 13404  		v.AddArg2(v0, v2)
 13405  		return true
 13406  	}
 13407  	return false
 13408  }
 13409  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
 13410  	v_1 := v.Args[1]
 13411  	v_0 := v.Args[0]
 13412  	b := v.Block
 13413  	typ := &b.Func.Config.Types
 13414  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 13415  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 13416  	for {
 13417  		t := v.Type
 13418  		x := v_0
 13419  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13420  			break
 13421  		}
 13422  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13423  		v.Reset(ssaop.OpOr8)
 13424  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh8x64, t)
 13425  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13426  		v1.AuxInt = ssa.Int64ToAuxInt(c & 7)
 13427  		v0.AddArg2(x, v1)
 13428  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux64, t)
 13429  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13430  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 7)
 13431  		v2.AddArg2(x, v3)
 13432  		v.AddArg2(v0, v2)
 13433  		return true
 13434  	}
 13435  	return false
 13436  }
 13437  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
 13438  	v_1 := v.Args[1]
 13439  	v_0 := v.Args[0]
 13440  	b := v.Block
 13441  	typ := &b.Func.Config.Types
 13442  	// match: (Rsh16Ux16 x y)
 13443  	// cond: ssa.ShiftIsBounded(v)
 13444  	// result: (SRD (MOVHZreg x) y)
 13445  	for {
 13446  		x := v_0
 13447  		y := v_1
 13448  		if !(ssa.ShiftIsBounded(v)) {
 13449  			break
 13450  		}
 13451  		v.Reset(ssaop.OpPPC64SRD)
 13452  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13453  		v0.AddArg(x)
 13454  		v.AddArg2(v0, y)
 13455  		return true
 13456  	}
 13457  	// match: (Rsh16Ux16 <t> x y)
 13458  	// result: (ISEL [2] (SRD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFF0] y)))
 13459  	for {
 13460  		t := v.Type
 13461  		x := v_0
 13462  		y := v_1
 13463  		v.Reset(ssaop.OpPPC64ISEL)
 13464  		v.AuxInt = ssa.Int32ToAuxInt(2)
 13465  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 13466  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13467  		v1.AddArg(x)
 13468  		v0.AddArg2(v1, y)
 13469  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13470  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 13471  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 13472  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 13473  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 13474  		v4.AuxInt = ssa.Int64ToAuxInt(0xFFF0)
 13475  		v4.AddArg(y)
 13476  		v3.AddArg(v4)
 13477  		v.AddArg3(v0, v2, v3)
 13478  		return true
 13479  	}
 13480  }
 13481  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
 13482  	v_1 := v.Args[1]
 13483  	v_0 := v.Args[0]
 13484  	b := v.Block
 13485  	typ := &b.Func.Config.Types
 13486  	// match: (Rsh16Ux32 x y)
 13487  	// cond: ssa.ShiftIsBounded(v)
 13488  	// result: (SRD (MOVHZreg x) y)
 13489  	for {
 13490  		x := v_0
 13491  		y := v_1
 13492  		if !(ssa.ShiftIsBounded(v)) {
 13493  			break
 13494  		}
 13495  		v.Reset(ssaop.OpPPC64SRD)
 13496  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13497  		v0.AddArg(x)
 13498  		v.AddArg2(v0, y)
 13499  		return true
 13500  	}
 13501  	// match: (Rsh16Ux32 <t> x y)
 13502  	// result: (ISEL [0] (SRD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [16]))
 13503  	for {
 13504  		t := v.Type
 13505  		x := v_0
 13506  		y := v_1
 13507  		v.Reset(ssaop.OpPPC64ISEL)
 13508  		v.AuxInt = ssa.Int32ToAuxInt(0)
 13509  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 13510  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13511  		v1.AddArg(x)
 13512  		v0.AddArg2(v1, y)
 13513  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13514  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 13515  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 13516  		v3.AuxInt = ssa.Int32ToAuxInt(16)
 13517  		v3.AddArg(y)
 13518  		v.AddArg3(v0, v2, v3)
 13519  		return true
 13520  	}
 13521  }
 13522  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
 13523  	v_1 := v.Args[1]
 13524  	v_0 := v.Args[0]
 13525  	b := v.Block
 13526  	typ := &b.Func.Config.Types
 13527  	// match: (Rsh16Ux64 x (MOVDconst [c]))
 13528  	// cond: uint64(c) < 16
 13529  	// result: (SRWconst (ZeroExt16to32 x) [c])
 13530  	for {
 13531  		x := v_0
 13532  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13533  			break
 13534  		}
 13535  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13536  		if !(uint64(c) < 16) {
 13537  			break
 13538  		}
 13539  		v.Reset(ssaop.OpPPC64SRWconst)
 13540  		v.AuxInt = ssa.Int64ToAuxInt(c)
 13541  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to32, typ.UInt32)
 13542  		v0.AddArg(x)
 13543  		v.AddArg(v0)
 13544  		return true
 13545  	}
 13546  	// match: (Rsh16Ux64 x y)
 13547  	// cond: ssa.ShiftIsBounded(v)
 13548  	// result: (SRD (MOVHZreg x) y)
 13549  	for {
 13550  		x := v_0
 13551  		y := v_1
 13552  		if !(ssa.ShiftIsBounded(v)) {
 13553  			break
 13554  		}
 13555  		v.Reset(ssaop.OpPPC64SRD)
 13556  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13557  		v0.AddArg(x)
 13558  		v.AddArg2(v0, y)
 13559  		return true
 13560  	}
 13561  	// match: (Rsh16Ux64 <t> x y)
 13562  	// result: (ISEL [0] (SRD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [16]))
 13563  	for {
 13564  		t := v.Type
 13565  		x := v_0
 13566  		y := v_1
 13567  		v.Reset(ssaop.OpPPC64ISEL)
 13568  		v.AuxInt = ssa.Int32ToAuxInt(0)
 13569  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 13570  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13571  		v1.AddArg(x)
 13572  		v0.AddArg2(v1, y)
 13573  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13574  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 13575  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 13576  		v3.AuxInt = ssa.Int64ToAuxInt(16)
 13577  		v3.AddArg(y)
 13578  		v.AddArg3(v0, v2, v3)
 13579  		return true
 13580  	}
 13581  }
 13582  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
 13583  	v_1 := v.Args[1]
 13584  	v_0 := v.Args[0]
 13585  	b := v.Block
 13586  	typ := &b.Func.Config.Types
 13587  	// match: (Rsh16Ux8 x y)
 13588  	// cond: ssa.ShiftIsBounded(v)
 13589  	// result: (SRD (MOVHZreg x) y)
 13590  	for {
 13591  		x := v_0
 13592  		y := v_1
 13593  		if !(ssa.ShiftIsBounded(v)) {
 13594  			break
 13595  		}
 13596  		v.Reset(ssaop.OpPPC64SRD)
 13597  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13598  		v0.AddArg(x)
 13599  		v.AddArg2(v0, y)
 13600  		return true
 13601  	}
 13602  	// match: (Rsh16Ux8 <t> x y)
 13603  	// result: (ISEL [2] (SRD <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00F0] y)))
 13604  	for {
 13605  		t := v.Type
 13606  		x := v_0
 13607  		y := v_1
 13608  		v.Reset(ssaop.OpPPC64ISEL)
 13609  		v.AuxInt = ssa.Int32ToAuxInt(2)
 13610  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 13611  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHZreg, typ.Int64)
 13612  		v1.AddArg(x)
 13613  		v0.AddArg2(v1, y)
 13614  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13615  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 13616  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 13617  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 13618  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 13619  		v4.AuxInt = ssa.Int64ToAuxInt(0x00F0)
 13620  		v4.AddArg(y)
 13621  		v3.AddArg(v4)
 13622  		v.AddArg3(v0, v2, v3)
 13623  		return true
 13624  	}
 13625  }
 13626  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
 13627  	v_1 := v.Args[1]
 13628  	v_0 := v.Args[0]
 13629  	b := v.Block
 13630  	typ := &b.Func.Config.Types
 13631  	// match: (Rsh16x16 x y)
 13632  	// cond: ssa.ShiftIsBounded(v)
 13633  	// result: (SRAD (MOVHreg x) y)
 13634  	for {
 13635  		x := v_0
 13636  		y := v_1
 13637  		if !(ssa.ShiftIsBounded(v)) {
 13638  			break
 13639  		}
 13640  		v.Reset(ssaop.OpPPC64SRAD)
 13641  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13642  		v0.AddArg(x)
 13643  		v.AddArg2(v0, y)
 13644  		return true
 13645  	}
 13646  	// match: (Rsh16x16 <t> x y)
 13647  	// result: (ISEL [2] (SRAD <t> (MOVHreg x) y) (SRADconst <t> (MOVHreg x) [15]) (CMPconst [0] (ANDconst [0xFFF0] y)))
 13648  	for {
 13649  		t := v.Type
 13650  		x := v_0
 13651  		y := v_1
 13652  		v.Reset(ssaop.OpPPC64ISEL)
 13653  		v.AuxInt = ssa.Int32ToAuxInt(2)
 13654  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 13655  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13656  		v1.AddArg(x)
 13657  		v0.AddArg2(v1, y)
 13658  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 13659  		v2.AuxInt = ssa.Int64ToAuxInt(15)
 13660  		v2.AddArg(v1)
 13661  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 13662  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 13663  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 13664  		v4.AuxInt = ssa.Int64ToAuxInt(0xFFF0)
 13665  		v4.AddArg(y)
 13666  		v3.AddArg(v4)
 13667  		v.AddArg3(v0, v2, v3)
 13668  		return true
 13669  	}
 13670  }
 13671  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
 13672  	v_1 := v.Args[1]
 13673  	v_0 := v.Args[0]
 13674  	b := v.Block
 13675  	typ := &b.Func.Config.Types
 13676  	// match: (Rsh16x32 x y)
 13677  	// cond: ssa.ShiftIsBounded(v)
 13678  	// result: (SRAD (MOVHreg x) y)
 13679  	for {
 13680  		x := v_0
 13681  		y := v_1
 13682  		if !(ssa.ShiftIsBounded(v)) {
 13683  			break
 13684  		}
 13685  		v.Reset(ssaop.OpPPC64SRAD)
 13686  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13687  		v0.AddArg(x)
 13688  		v.AddArg2(v0, y)
 13689  		return true
 13690  	}
 13691  	// match: (Rsh16x32 <t> x y)
 13692  	// result: (ISEL [0] (SRAD <t> (MOVHreg x) y) (SRADconst <t> (MOVHreg x) [15]) (CMPWUconst y [16]))
 13693  	for {
 13694  		t := v.Type
 13695  		x := v_0
 13696  		y := v_1
 13697  		v.Reset(ssaop.OpPPC64ISEL)
 13698  		v.AuxInt = ssa.Int32ToAuxInt(0)
 13699  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 13700  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13701  		v1.AddArg(x)
 13702  		v0.AddArg2(v1, y)
 13703  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 13704  		v2.AuxInt = ssa.Int64ToAuxInt(15)
 13705  		v2.AddArg(v1)
 13706  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 13707  		v3.AuxInt = ssa.Int32ToAuxInt(16)
 13708  		v3.AddArg(y)
 13709  		v.AddArg3(v0, v2, v3)
 13710  		return true
 13711  	}
 13712  }
 13713  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
 13714  	v_1 := v.Args[1]
 13715  	v_0 := v.Args[0]
 13716  	b := v.Block
 13717  	typ := &b.Func.Config.Types
 13718  	// match: (Rsh16x64 x (MOVDconst [c]))
 13719  	// cond: uint64(c) >= 16
 13720  	// result: (SRAWconst (SignExt16to32 x) [63])
 13721  	for {
 13722  		x := v_0
 13723  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13724  			break
 13725  		}
 13726  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13727  		if !(uint64(c) >= 16) {
 13728  			break
 13729  		}
 13730  		v.Reset(ssaop.OpPPC64SRAWconst)
 13731  		v.AuxInt = ssa.Int64ToAuxInt(63)
 13732  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
 13733  		v0.AddArg(x)
 13734  		v.AddArg(v0)
 13735  		return true
 13736  	}
 13737  	// match: (Rsh16x64 x (MOVDconst [c]))
 13738  	// cond: uint64(c) < 16
 13739  	// result: (SRAWconst (SignExt16to32 x) [c])
 13740  	for {
 13741  		x := v_0
 13742  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13743  			break
 13744  		}
 13745  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13746  		if !(uint64(c) < 16) {
 13747  			break
 13748  		}
 13749  		v.Reset(ssaop.OpPPC64SRAWconst)
 13750  		v.AuxInt = ssa.Int64ToAuxInt(c)
 13751  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to32, typ.Int32)
 13752  		v0.AddArg(x)
 13753  		v.AddArg(v0)
 13754  		return true
 13755  	}
 13756  	// match: (Rsh16x64 x y)
 13757  	// cond: ssa.ShiftIsBounded(v)
 13758  	// result: (SRAD (MOVHreg x) y)
 13759  	for {
 13760  		x := v_0
 13761  		y := v_1
 13762  		if !(ssa.ShiftIsBounded(v)) {
 13763  			break
 13764  		}
 13765  		v.Reset(ssaop.OpPPC64SRAD)
 13766  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13767  		v0.AddArg(x)
 13768  		v.AddArg2(v0, y)
 13769  		return true
 13770  	}
 13771  	// match: (Rsh16x64 <t> x y)
 13772  	// result: (ISEL [0] (SRAD <t> (MOVHreg x) y) (SRADconst <t> (MOVHreg x) [15]) (CMPUconst y [16]))
 13773  	for {
 13774  		t := v.Type
 13775  		x := v_0
 13776  		y := v_1
 13777  		v.Reset(ssaop.OpPPC64ISEL)
 13778  		v.AuxInt = ssa.Int32ToAuxInt(0)
 13779  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 13780  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13781  		v1.AddArg(x)
 13782  		v0.AddArg2(v1, y)
 13783  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 13784  		v2.AuxInt = ssa.Int64ToAuxInt(15)
 13785  		v2.AddArg(v1)
 13786  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 13787  		v3.AuxInt = ssa.Int64ToAuxInt(16)
 13788  		v3.AddArg(y)
 13789  		v.AddArg3(v0, v2, v3)
 13790  		return true
 13791  	}
 13792  }
 13793  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
 13794  	v_1 := v.Args[1]
 13795  	v_0 := v.Args[0]
 13796  	b := v.Block
 13797  	typ := &b.Func.Config.Types
 13798  	// match: (Rsh16x8 x y)
 13799  	// cond: ssa.ShiftIsBounded(v)
 13800  	// result: (SRAD (MOVHreg x) y)
 13801  	for {
 13802  		x := v_0
 13803  		y := v_1
 13804  		if !(ssa.ShiftIsBounded(v)) {
 13805  			break
 13806  		}
 13807  		v.Reset(ssaop.OpPPC64SRAD)
 13808  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13809  		v0.AddArg(x)
 13810  		v.AddArg2(v0, y)
 13811  		return true
 13812  	}
 13813  	// match: (Rsh16x8 <t> x y)
 13814  	// result: (ISEL [2] (SRAD <t> (MOVHreg x) y) (SRADconst <t> (MOVHreg x) [15]) (CMPconst [0] (ANDconst [0x00F0] y)))
 13815  	for {
 13816  		t := v.Type
 13817  		x := v_0
 13818  		y := v_1
 13819  		v.Reset(ssaop.OpPPC64ISEL)
 13820  		v.AuxInt = ssa.Int32ToAuxInt(2)
 13821  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 13822  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHreg, typ.Int64)
 13823  		v1.AddArg(x)
 13824  		v0.AddArg2(v1, y)
 13825  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 13826  		v2.AuxInt = ssa.Int64ToAuxInt(15)
 13827  		v2.AddArg(v1)
 13828  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 13829  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 13830  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 13831  		v4.AuxInt = ssa.Int64ToAuxInt(0x00F0)
 13832  		v4.AddArg(y)
 13833  		v3.AddArg(v4)
 13834  		v.AddArg3(v0, v2, v3)
 13835  		return true
 13836  	}
 13837  }
 13838  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
 13839  	v_1 := v.Args[1]
 13840  	v_0 := v.Args[0]
 13841  	b := v.Block
 13842  	typ := &b.Func.Config.Types
 13843  	// match: (Rsh32Ux16 x y)
 13844  	// cond: ssa.ShiftIsBounded(v)
 13845  	// result: (SRW x y)
 13846  	for {
 13847  		x := v_0
 13848  		y := v_1
 13849  		if !(ssa.ShiftIsBounded(v)) {
 13850  			break
 13851  		}
 13852  		v.Reset(ssaop.OpPPC64SRW)
 13853  		v.AddArg2(x, y)
 13854  		return true
 13855  	}
 13856  	// match: (Rsh32Ux16 <t> x y)
 13857  	// result: (ISEL [2] (SRW <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFE0] y)))
 13858  	for {
 13859  		t := v.Type
 13860  		x := v_0
 13861  		y := v_1
 13862  		v.Reset(ssaop.OpPPC64ISEL)
 13863  		v.AuxInt = ssa.Int32ToAuxInt(2)
 13864  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRW, t)
 13865  		v0.AddArg2(x, y)
 13866  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13867  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 13868  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 13869  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 13870  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 13871  		v3.AuxInt = ssa.Int64ToAuxInt(0xFFE0)
 13872  		v3.AddArg(y)
 13873  		v2.AddArg(v3)
 13874  		v.AddArg3(v0, v1, v2)
 13875  		return true
 13876  	}
 13877  }
 13878  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
 13879  	v_1 := v.Args[1]
 13880  	v_0 := v.Args[0]
 13881  	b := v.Block
 13882  	typ := &b.Func.Config.Types
 13883  	// match: (Rsh32Ux32 x y)
 13884  	// cond: ssa.ShiftIsBounded(v)
 13885  	// result: (SRW x y)
 13886  	for {
 13887  		x := v_0
 13888  		y := v_1
 13889  		if !(ssa.ShiftIsBounded(v)) {
 13890  			break
 13891  		}
 13892  		v.Reset(ssaop.OpPPC64SRW)
 13893  		v.AddArg2(x, y)
 13894  		return true
 13895  	}
 13896  	// match: (Rsh32Ux32 <t> x y)
 13897  	// result: (ISEL [0] (SRW <t> x y) (MOVDconst [0]) (CMPWUconst y [32]))
 13898  	for {
 13899  		t := v.Type
 13900  		x := v_0
 13901  		y := v_1
 13902  		v.Reset(ssaop.OpPPC64ISEL)
 13903  		v.AuxInt = ssa.Int32ToAuxInt(0)
 13904  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRW, t)
 13905  		v0.AddArg2(x, y)
 13906  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13907  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 13908  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 13909  		v2.AuxInt = ssa.Int32ToAuxInt(32)
 13910  		v2.AddArg(y)
 13911  		v.AddArg3(v0, v1, v2)
 13912  		return true
 13913  	}
 13914  }
 13915  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
 13916  	v_1 := v.Args[1]
 13917  	v_0 := v.Args[0]
 13918  	b := v.Block
 13919  	typ := &b.Func.Config.Types
 13920  	// match: (Rsh32Ux64 x (MOVDconst [c]))
 13921  	// cond: uint64(c) < 32
 13922  	// result: (SRWconst x [c])
 13923  	for {
 13924  		x := v_0
 13925  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 13926  			break
 13927  		}
 13928  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13929  		if !(uint64(c) < 32) {
 13930  			break
 13931  		}
 13932  		v.Reset(ssaop.OpPPC64SRWconst)
 13933  		v.AuxInt = ssa.Int64ToAuxInt(c)
 13934  		v.AddArg(x)
 13935  		return true
 13936  	}
 13937  	// match: (Rsh32Ux64 x y)
 13938  	// cond: ssa.ShiftIsBounded(v)
 13939  	// result: (SRW x y)
 13940  	for {
 13941  		x := v_0
 13942  		y := v_1
 13943  		if !(ssa.ShiftIsBounded(v)) {
 13944  			break
 13945  		}
 13946  		v.Reset(ssaop.OpPPC64SRW)
 13947  		v.AddArg2(x, y)
 13948  		return true
 13949  	}
 13950  	// match: (Rsh32Ux64 <t> x y)
 13951  	// result: (ISEL [0] (SRW <t> x y) (MOVDconst [0]) (CMPUconst y [32]))
 13952  	for {
 13953  		t := v.Type
 13954  		x := v_0
 13955  		y := v_1
 13956  		v.Reset(ssaop.OpPPC64ISEL)
 13957  		v.AuxInt = ssa.Int32ToAuxInt(0)
 13958  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRW, t)
 13959  		v0.AddArg2(x, y)
 13960  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13961  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 13962  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 13963  		v2.AuxInt = ssa.Int64ToAuxInt(32)
 13964  		v2.AddArg(y)
 13965  		v.AddArg3(v0, v1, v2)
 13966  		return true
 13967  	}
 13968  }
 13969  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
 13970  	v_1 := v.Args[1]
 13971  	v_0 := v.Args[0]
 13972  	b := v.Block
 13973  	typ := &b.Func.Config.Types
 13974  	// match: (Rsh32Ux8 x y)
 13975  	// cond: ssa.ShiftIsBounded(v)
 13976  	// result: (SRW x y)
 13977  	for {
 13978  		x := v_0
 13979  		y := v_1
 13980  		if !(ssa.ShiftIsBounded(v)) {
 13981  			break
 13982  		}
 13983  		v.Reset(ssaop.OpPPC64SRW)
 13984  		v.AddArg2(x, y)
 13985  		return true
 13986  	}
 13987  	// match: (Rsh32Ux8 <t> x y)
 13988  	// result: (ISEL [2] (SRW <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00E0] y)))
 13989  	for {
 13990  		t := v.Type
 13991  		x := v_0
 13992  		y := v_1
 13993  		v.Reset(ssaop.OpPPC64ISEL)
 13994  		v.AuxInt = ssa.Int32ToAuxInt(2)
 13995  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRW, t)
 13996  		v0.AddArg2(x, y)
 13997  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 13998  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 13999  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14000  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14001  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14002  		v3.AuxInt = ssa.Int64ToAuxInt(0x00E0)
 14003  		v3.AddArg(y)
 14004  		v2.AddArg(v3)
 14005  		v.AddArg3(v0, v1, v2)
 14006  		return true
 14007  	}
 14008  }
 14009  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
 14010  	v_1 := v.Args[1]
 14011  	v_0 := v.Args[0]
 14012  	b := v.Block
 14013  	typ := &b.Func.Config.Types
 14014  	// match: (Rsh32x16 x y)
 14015  	// cond: ssa.ShiftIsBounded(v)
 14016  	// result: (SRAW x y)
 14017  	for {
 14018  		x := v_0
 14019  		y := v_1
 14020  		if !(ssa.ShiftIsBounded(v)) {
 14021  			break
 14022  		}
 14023  		v.Reset(ssaop.OpPPC64SRAW)
 14024  		v.AddArg2(x, y)
 14025  		return true
 14026  	}
 14027  	// match: (Rsh32x16 <t> x y)
 14028  	// result: (ISEL [2] (SRAW <t> x y) (SRAWconst <t> x [31]) (CMPconst [0] (ANDconst [0xFFE0] y)))
 14029  	for {
 14030  		t := v.Type
 14031  		x := v_0
 14032  		y := v_1
 14033  		v.Reset(ssaop.OpPPC64ISEL)
 14034  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14035  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAW, t)
 14036  		v0.AddArg2(x, y)
 14037  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAWconst, t)
 14038  		v1.AuxInt = ssa.Int64ToAuxInt(31)
 14039  		v1.AddArg(x)
 14040  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14041  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14042  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14043  		v3.AuxInt = ssa.Int64ToAuxInt(0xFFE0)
 14044  		v3.AddArg(y)
 14045  		v2.AddArg(v3)
 14046  		v.AddArg3(v0, v1, v2)
 14047  		return true
 14048  	}
 14049  }
 14050  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
 14051  	v_1 := v.Args[1]
 14052  	v_0 := v.Args[0]
 14053  	b := v.Block
 14054  	// match: (Rsh32x32 x y)
 14055  	// cond: ssa.ShiftIsBounded(v)
 14056  	// result: (SRAW x y)
 14057  	for {
 14058  		x := v_0
 14059  		y := v_1
 14060  		if !(ssa.ShiftIsBounded(v)) {
 14061  			break
 14062  		}
 14063  		v.Reset(ssaop.OpPPC64SRAW)
 14064  		v.AddArg2(x, y)
 14065  		return true
 14066  	}
 14067  	// match: (Rsh32x32 <t> x y)
 14068  	// result: (ISEL [0] (SRAW <t> x y) (SRAWconst <t> x [31]) (CMPWUconst y [32]))
 14069  	for {
 14070  		t := v.Type
 14071  		x := v_0
 14072  		y := v_1
 14073  		v.Reset(ssaop.OpPPC64ISEL)
 14074  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14075  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAW, t)
 14076  		v0.AddArg2(x, y)
 14077  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAWconst, t)
 14078  		v1.AuxInt = ssa.Int64ToAuxInt(31)
 14079  		v1.AddArg(x)
 14080  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 14081  		v2.AuxInt = ssa.Int32ToAuxInt(32)
 14082  		v2.AddArg(y)
 14083  		v.AddArg3(v0, v1, v2)
 14084  		return true
 14085  	}
 14086  }
 14087  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
 14088  	v_1 := v.Args[1]
 14089  	v_0 := v.Args[0]
 14090  	b := v.Block
 14091  	// match: (Rsh32x64 x (MOVDconst [c]))
 14092  	// cond: uint64(c) >= 32
 14093  	// result: (SRAWconst x [63])
 14094  	for {
 14095  		x := v_0
 14096  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14097  			break
 14098  		}
 14099  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14100  		if !(uint64(c) >= 32) {
 14101  			break
 14102  		}
 14103  		v.Reset(ssaop.OpPPC64SRAWconst)
 14104  		v.AuxInt = ssa.Int64ToAuxInt(63)
 14105  		v.AddArg(x)
 14106  		return true
 14107  	}
 14108  	// match: (Rsh32x64 x (MOVDconst [c]))
 14109  	// cond: uint64(c) < 32
 14110  	// result: (SRAWconst x [c])
 14111  	for {
 14112  		x := v_0
 14113  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14114  			break
 14115  		}
 14116  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14117  		if !(uint64(c) < 32) {
 14118  			break
 14119  		}
 14120  		v.Reset(ssaop.OpPPC64SRAWconst)
 14121  		v.AuxInt = ssa.Int64ToAuxInt(c)
 14122  		v.AddArg(x)
 14123  		return true
 14124  	}
 14125  	// match: (Rsh32x64 x y)
 14126  	// cond: ssa.ShiftIsBounded(v)
 14127  	// result: (SRAW x y)
 14128  	for {
 14129  		x := v_0
 14130  		y := v_1
 14131  		if !(ssa.ShiftIsBounded(v)) {
 14132  			break
 14133  		}
 14134  		v.Reset(ssaop.OpPPC64SRAW)
 14135  		v.AddArg2(x, y)
 14136  		return true
 14137  	}
 14138  	// match: (Rsh32x64 <t> x y)
 14139  	// result: (ISEL [0] (SRAW <t> x y) (SRAWconst <t> x [31]) (CMPUconst y [32]))
 14140  	for {
 14141  		t := v.Type
 14142  		x := v_0
 14143  		y := v_1
 14144  		v.Reset(ssaop.OpPPC64ISEL)
 14145  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14146  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAW, t)
 14147  		v0.AddArg2(x, y)
 14148  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAWconst, t)
 14149  		v1.AuxInt = ssa.Int64ToAuxInt(31)
 14150  		v1.AddArg(x)
 14151  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 14152  		v2.AuxInt = ssa.Int64ToAuxInt(32)
 14153  		v2.AddArg(y)
 14154  		v.AddArg3(v0, v1, v2)
 14155  		return true
 14156  	}
 14157  }
 14158  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
 14159  	v_1 := v.Args[1]
 14160  	v_0 := v.Args[0]
 14161  	b := v.Block
 14162  	typ := &b.Func.Config.Types
 14163  	// match: (Rsh32x8 x y)
 14164  	// cond: ssa.ShiftIsBounded(v)
 14165  	// result: (SRAW x y)
 14166  	for {
 14167  		x := v_0
 14168  		y := v_1
 14169  		if !(ssa.ShiftIsBounded(v)) {
 14170  			break
 14171  		}
 14172  		v.Reset(ssaop.OpPPC64SRAW)
 14173  		v.AddArg2(x, y)
 14174  		return true
 14175  	}
 14176  	// match: (Rsh32x8 <t> x y)
 14177  	// result: (ISEL [2] (SRAW <t> x y) (SRAWconst <t> x [31]) (CMPconst [0] (ANDconst [0x00E0] y)))
 14178  	for {
 14179  		t := v.Type
 14180  		x := v_0
 14181  		y := v_1
 14182  		v.Reset(ssaop.OpPPC64ISEL)
 14183  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14184  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAW, t)
 14185  		v0.AddArg2(x, y)
 14186  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAWconst, t)
 14187  		v1.AuxInt = ssa.Int64ToAuxInt(31)
 14188  		v1.AddArg(x)
 14189  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14190  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14191  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14192  		v3.AuxInt = ssa.Int64ToAuxInt(0x00E0)
 14193  		v3.AddArg(y)
 14194  		v2.AddArg(v3)
 14195  		v.AddArg3(v0, v1, v2)
 14196  		return true
 14197  	}
 14198  }
 14199  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
 14200  	v_1 := v.Args[1]
 14201  	v_0 := v.Args[0]
 14202  	b := v.Block
 14203  	typ := &b.Func.Config.Types
 14204  	// match: (Rsh64Ux16 x y)
 14205  	// cond: ssa.ShiftIsBounded(v)
 14206  	// result: (SRD x y)
 14207  	for {
 14208  		x := v_0
 14209  		y := v_1
 14210  		if !(ssa.ShiftIsBounded(v)) {
 14211  			break
 14212  		}
 14213  		v.Reset(ssaop.OpPPC64SRD)
 14214  		v.AddArg2(x, y)
 14215  		return true
 14216  	}
 14217  	// match: (Rsh64Ux16 <t> x y)
 14218  	// result: (ISEL [2] (SRD <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFC0] y)))
 14219  	for {
 14220  		t := v.Type
 14221  		x := v_0
 14222  		y := v_1
 14223  		v.Reset(ssaop.OpPPC64ISEL)
 14224  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14225  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14226  		v0.AddArg2(x, y)
 14227  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14228  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 14229  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14230  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14231  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14232  		v3.AuxInt = ssa.Int64ToAuxInt(0xFFC0)
 14233  		v3.AddArg(y)
 14234  		v2.AddArg(v3)
 14235  		v.AddArg3(v0, v1, v2)
 14236  		return true
 14237  	}
 14238  }
 14239  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
 14240  	v_1 := v.Args[1]
 14241  	v_0 := v.Args[0]
 14242  	b := v.Block
 14243  	typ := &b.Func.Config.Types
 14244  	// match: (Rsh64Ux32 x y)
 14245  	// cond: ssa.ShiftIsBounded(v)
 14246  	// result: (SRD x y)
 14247  	for {
 14248  		x := v_0
 14249  		y := v_1
 14250  		if !(ssa.ShiftIsBounded(v)) {
 14251  			break
 14252  		}
 14253  		v.Reset(ssaop.OpPPC64SRD)
 14254  		v.AddArg2(x, y)
 14255  		return true
 14256  	}
 14257  	// match: (Rsh64Ux32 <t> x y)
 14258  	// result: (ISEL [0] (SRD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
 14259  	for {
 14260  		t := v.Type
 14261  		x := v_0
 14262  		y := v_1
 14263  		v.Reset(ssaop.OpPPC64ISEL)
 14264  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14265  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14266  		v0.AddArg2(x, y)
 14267  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14268  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 14269  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 14270  		v2.AuxInt = ssa.Int32ToAuxInt(64)
 14271  		v2.AddArg(y)
 14272  		v.AddArg3(v0, v1, v2)
 14273  		return true
 14274  	}
 14275  }
 14276  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
 14277  	v_1 := v.Args[1]
 14278  	v_0 := v.Args[0]
 14279  	b := v.Block
 14280  	typ := &b.Func.Config.Types
 14281  	// match: (Rsh64Ux64 x (MOVDconst [c]))
 14282  	// cond: uint64(c) < 64
 14283  	// result: (SRDconst x [c])
 14284  	for {
 14285  		x := v_0
 14286  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14287  			break
 14288  		}
 14289  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14290  		if !(uint64(c) < 64) {
 14291  			break
 14292  		}
 14293  		v.Reset(ssaop.OpPPC64SRDconst)
 14294  		v.AuxInt = ssa.Int64ToAuxInt(c)
 14295  		v.AddArg(x)
 14296  		return true
 14297  	}
 14298  	// match: (Rsh64Ux64 x y)
 14299  	// cond: ssa.ShiftIsBounded(v)
 14300  	// result: (SRD x y)
 14301  	for {
 14302  		x := v_0
 14303  		y := v_1
 14304  		if !(ssa.ShiftIsBounded(v)) {
 14305  			break
 14306  		}
 14307  		v.Reset(ssaop.OpPPC64SRD)
 14308  		v.AddArg2(x, y)
 14309  		return true
 14310  	}
 14311  	// match: (Rsh64Ux64 <t> x y)
 14312  	// result: (ISEL [0] (SRD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
 14313  	for {
 14314  		t := v.Type
 14315  		x := v_0
 14316  		y := v_1
 14317  		v.Reset(ssaop.OpPPC64ISEL)
 14318  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14319  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14320  		v0.AddArg2(x, y)
 14321  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14322  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 14323  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 14324  		v2.AuxInt = ssa.Int64ToAuxInt(64)
 14325  		v2.AddArg(y)
 14326  		v.AddArg3(v0, v1, v2)
 14327  		return true
 14328  	}
 14329  }
 14330  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
 14331  	v_1 := v.Args[1]
 14332  	v_0 := v.Args[0]
 14333  	b := v.Block
 14334  	typ := &b.Func.Config.Types
 14335  	// match: (Rsh64Ux8 x y)
 14336  	// cond: ssa.ShiftIsBounded(v)
 14337  	// result: (SRD x y)
 14338  	for {
 14339  		x := v_0
 14340  		y := v_1
 14341  		if !(ssa.ShiftIsBounded(v)) {
 14342  			break
 14343  		}
 14344  		v.Reset(ssaop.OpPPC64SRD)
 14345  		v.AddArg2(x, y)
 14346  		return true
 14347  	}
 14348  	// match: (Rsh64Ux8 <t> x y)
 14349  	// result: (ISEL [2] (SRD <t> x y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00C0] y)))
 14350  	for {
 14351  		t := v.Type
 14352  		x := v_0
 14353  		y := v_1
 14354  		v.Reset(ssaop.OpPPC64ISEL)
 14355  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14356  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14357  		v0.AddArg2(x, y)
 14358  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14359  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 14360  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14361  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14362  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14363  		v3.AuxInt = ssa.Int64ToAuxInt(0x00C0)
 14364  		v3.AddArg(y)
 14365  		v2.AddArg(v3)
 14366  		v.AddArg3(v0, v1, v2)
 14367  		return true
 14368  	}
 14369  }
 14370  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
 14371  	v_1 := v.Args[1]
 14372  	v_0 := v.Args[0]
 14373  	b := v.Block
 14374  	typ := &b.Func.Config.Types
 14375  	// match: (Rsh64x16 x y)
 14376  	// cond: ssa.ShiftIsBounded(v)
 14377  	// result: (SRAD x y)
 14378  	for {
 14379  		x := v_0
 14380  		y := v_1
 14381  		if !(ssa.ShiftIsBounded(v)) {
 14382  			break
 14383  		}
 14384  		v.Reset(ssaop.OpPPC64SRAD)
 14385  		v.AddArg2(x, y)
 14386  		return true
 14387  	}
 14388  	// match: (Rsh64x16 <t> x y)
 14389  	// result: (ISEL [2] (SRAD <t> x y) (SRADconst <t> x [63]) (CMPconst [0] (ANDconst [0xFFC0] y)))
 14390  	for {
 14391  		t := v.Type
 14392  		x := v_0
 14393  		y := v_1
 14394  		v.Reset(ssaop.OpPPC64ISEL)
 14395  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14396  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14397  		v0.AddArg2(x, y)
 14398  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14399  		v1.AuxInt = ssa.Int64ToAuxInt(63)
 14400  		v1.AddArg(x)
 14401  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14402  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14403  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14404  		v3.AuxInt = ssa.Int64ToAuxInt(0xFFC0)
 14405  		v3.AddArg(y)
 14406  		v2.AddArg(v3)
 14407  		v.AddArg3(v0, v1, v2)
 14408  		return true
 14409  	}
 14410  }
 14411  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
 14412  	v_1 := v.Args[1]
 14413  	v_0 := v.Args[0]
 14414  	b := v.Block
 14415  	// match: (Rsh64x32 x y)
 14416  	// cond: ssa.ShiftIsBounded(v)
 14417  	// result: (SRAD x y)
 14418  	for {
 14419  		x := v_0
 14420  		y := v_1
 14421  		if !(ssa.ShiftIsBounded(v)) {
 14422  			break
 14423  		}
 14424  		v.Reset(ssaop.OpPPC64SRAD)
 14425  		v.AddArg2(x, y)
 14426  		return true
 14427  	}
 14428  	// match: (Rsh64x32 <t> x y)
 14429  	// result: (ISEL [0] (SRAD <t> x y) (SRADconst <t> x [63]) (CMPWUconst y [64]))
 14430  	for {
 14431  		t := v.Type
 14432  		x := v_0
 14433  		y := v_1
 14434  		v.Reset(ssaop.OpPPC64ISEL)
 14435  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14436  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14437  		v0.AddArg2(x, y)
 14438  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14439  		v1.AuxInt = ssa.Int64ToAuxInt(63)
 14440  		v1.AddArg(x)
 14441  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 14442  		v2.AuxInt = ssa.Int32ToAuxInt(64)
 14443  		v2.AddArg(y)
 14444  		v.AddArg3(v0, v1, v2)
 14445  		return true
 14446  	}
 14447  }
 14448  func rewriteValue_OpRsh64x64(v *ssa.Value) bool {
 14449  	v_1 := v.Args[1]
 14450  	v_0 := v.Args[0]
 14451  	b := v.Block
 14452  	// match: (Rsh64x64 x (MOVDconst [c]))
 14453  	// cond: uint64(c) >= 64
 14454  	// result: (SRADconst x [63])
 14455  	for {
 14456  		x := v_0
 14457  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14458  			break
 14459  		}
 14460  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14461  		if !(uint64(c) >= 64) {
 14462  			break
 14463  		}
 14464  		v.Reset(ssaop.OpPPC64SRADconst)
 14465  		v.AuxInt = ssa.Int64ToAuxInt(63)
 14466  		v.AddArg(x)
 14467  		return true
 14468  	}
 14469  	// match: (Rsh64x64 x (MOVDconst [c]))
 14470  	// cond: uint64(c) < 64
 14471  	// result: (SRADconst x [c])
 14472  	for {
 14473  		x := v_0
 14474  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14475  			break
 14476  		}
 14477  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14478  		if !(uint64(c) < 64) {
 14479  			break
 14480  		}
 14481  		v.Reset(ssaop.OpPPC64SRADconst)
 14482  		v.AuxInt = ssa.Int64ToAuxInt(c)
 14483  		v.AddArg(x)
 14484  		return true
 14485  	}
 14486  	// match: (Rsh64x64 x y)
 14487  	// cond: ssa.ShiftIsBounded(v)
 14488  	// result: (SRAD x y)
 14489  	for {
 14490  		x := v_0
 14491  		y := v_1
 14492  		if !(ssa.ShiftIsBounded(v)) {
 14493  			break
 14494  		}
 14495  		v.Reset(ssaop.OpPPC64SRAD)
 14496  		v.AddArg2(x, y)
 14497  		return true
 14498  	}
 14499  	// match: (Rsh64x64 <t> x y)
 14500  	// result: (ISEL [0] (SRAD <t> x y) (SRADconst <t> x [63]) (CMPUconst y [64]))
 14501  	for {
 14502  		t := v.Type
 14503  		x := v_0
 14504  		y := v_1
 14505  		v.Reset(ssaop.OpPPC64ISEL)
 14506  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14507  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14508  		v0.AddArg2(x, y)
 14509  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14510  		v1.AuxInt = ssa.Int64ToAuxInt(63)
 14511  		v1.AddArg(x)
 14512  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 14513  		v2.AuxInt = ssa.Int64ToAuxInt(64)
 14514  		v2.AddArg(y)
 14515  		v.AddArg3(v0, v1, v2)
 14516  		return true
 14517  	}
 14518  }
 14519  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
 14520  	v_1 := v.Args[1]
 14521  	v_0 := v.Args[0]
 14522  	b := v.Block
 14523  	typ := &b.Func.Config.Types
 14524  	// match: (Rsh64x8 x y)
 14525  	// cond: ssa.ShiftIsBounded(v)
 14526  	// result: (SRAD x y)
 14527  	for {
 14528  		x := v_0
 14529  		y := v_1
 14530  		if !(ssa.ShiftIsBounded(v)) {
 14531  			break
 14532  		}
 14533  		v.Reset(ssaop.OpPPC64SRAD)
 14534  		v.AddArg2(x, y)
 14535  		return true
 14536  	}
 14537  	// match: (Rsh64x8 <t> x y)
 14538  	// result: (ISEL [2] (SRAD <t> x y) (SRADconst <t> x [63]) (CMPconst [0] (ANDconst [0x00C0] y)))
 14539  	for {
 14540  		t := v.Type
 14541  		x := v_0
 14542  		y := v_1
 14543  		v.Reset(ssaop.OpPPC64ISEL)
 14544  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14545  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14546  		v0.AddArg2(x, y)
 14547  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14548  		v1.AuxInt = ssa.Int64ToAuxInt(63)
 14549  		v1.AddArg(x)
 14550  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14551  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14552  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14553  		v3.AuxInt = ssa.Int64ToAuxInt(0x00C0)
 14554  		v3.AddArg(y)
 14555  		v2.AddArg(v3)
 14556  		v.AddArg3(v0, v1, v2)
 14557  		return true
 14558  	}
 14559  }
 14560  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
 14561  	v_1 := v.Args[1]
 14562  	v_0 := v.Args[0]
 14563  	b := v.Block
 14564  	typ := &b.Func.Config.Types
 14565  	// match: (Rsh8Ux16 x y)
 14566  	// cond: ssa.ShiftIsBounded(v)
 14567  	// result: (SRD (MOVBZreg x) y)
 14568  	for {
 14569  		x := v_0
 14570  		y := v_1
 14571  		if !(ssa.ShiftIsBounded(v)) {
 14572  			break
 14573  		}
 14574  		v.Reset(ssaop.OpPPC64SRD)
 14575  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14576  		v0.AddArg(x)
 14577  		v.AddArg2(v0, y)
 14578  		return true
 14579  	}
 14580  	// match: (Rsh8Ux16 <t> x y)
 14581  	// result: (ISEL [2] (SRD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0xFFF8] y)))
 14582  	for {
 14583  		t := v.Type
 14584  		x := v_0
 14585  		y := v_1
 14586  		v.Reset(ssaop.OpPPC64ISEL)
 14587  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14588  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14589  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14590  		v1.AddArg(x)
 14591  		v0.AddArg2(v1, y)
 14592  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14593  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14594  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14595  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 14596  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14597  		v4.AuxInt = ssa.Int64ToAuxInt(0xFFF8)
 14598  		v4.AddArg(y)
 14599  		v3.AddArg(v4)
 14600  		v.AddArg3(v0, v2, v3)
 14601  		return true
 14602  	}
 14603  }
 14604  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
 14605  	v_1 := v.Args[1]
 14606  	v_0 := v.Args[0]
 14607  	b := v.Block
 14608  	typ := &b.Func.Config.Types
 14609  	// match: (Rsh8Ux32 x y)
 14610  	// cond: ssa.ShiftIsBounded(v)
 14611  	// result: (SRD (MOVBZreg x) y)
 14612  	for {
 14613  		x := v_0
 14614  		y := v_1
 14615  		if !(ssa.ShiftIsBounded(v)) {
 14616  			break
 14617  		}
 14618  		v.Reset(ssaop.OpPPC64SRD)
 14619  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14620  		v0.AddArg(x)
 14621  		v.AddArg2(v0, y)
 14622  		return true
 14623  	}
 14624  	// match: (Rsh8Ux32 <t> x y)
 14625  	// result: (ISEL [0] (SRD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [8]))
 14626  	for {
 14627  		t := v.Type
 14628  		x := v_0
 14629  		y := v_1
 14630  		v.Reset(ssaop.OpPPC64ISEL)
 14631  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14632  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14633  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14634  		v1.AddArg(x)
 14635  		v0.AddArg2(v1, y)
 14636  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14637  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14638  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 14639  		v3.AuxInt = ssa.Int32ToAuxInt(8)
 14640  		v3.AddArg(y)
 14641  		v.AddArg3(v0, v2, v3)
 14642  		return true
 14643  	}
 14644  }
 14645  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
 14646  	v_1 := v.Args[1]
 14647  	v_0 := v.Args[0]
 14648  	b := v.Block
 14649  	typ := &b.Func.Config.Types
 14650  	// match: (Rsh8Ux64 x (MOVDconst [c]))
 14651  	// cond: uint64(c) < 8
 14652  	// result: (SRWconst (ZeroExt8to32 x) [c])
 14653  	for {
 14654  		x := v_0
 14655  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14656  			break
 14657  		}
 14658  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14659  		if !(uint64(c) < 8) {
 14660  			break
 14661  		}
 14662  		v.Reset(ssaop.OpPPC64SRWconst)
 14663  		v.AuxInt = ssa.Int64ToAuxInt(c)
 14664  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to32, typ.UInt32)
 14665  		v0.AddArg(x)
 14666  		v.AddArg(v0)
 14667  		return true
 14668  	}
 14669  	// match: (Rsh8Ux64 x y)
 14670  	// cond: ssa.ShiftIsBounded(v)
 14671  	// result: (SRD (MOVBZreg x) y)
 14672  	for {
 14673  		x := v_0
 14674  		y := v_1
 14675  		if !(ssa.ShiftIsBounded(v)) {
 14676  			break
 14677  		}
 14678  		v.Reset(ssaop.OpPPC64SRD)
 14679  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14680  		v0.AddArg(x)
 14681  		v.AddArg2(v0, y)
 14682  		return true
 14683  	}
 14684  	// match: (Rsh8Ux64 <t> x y)
 14685  	// result: (ISEL [0] (SRD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [8]))
 14686  	for {
 14687  		t := v.Type
 14688  		x := v_0
 14689  		y := v_1
 14690  		v.Reset(ssaop.OpPPC64ISEL)
 14691  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14692  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14693  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14694  		v1.AddArg(x)
 14695  		v0.AddArg2(v1, y)
 14696  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14697  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14698  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 14699  		v3.AuxInt = ssa.Int64ToAuxInt(8)
 14700  		v3.AddArg(y)
 14701  		v.AddArg3(v0, v2, v3)
 14702  		return true
 14703  	}
 14704  }
 14705  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
 14706  	v_1 := v.Args[1]
 14707  	v_0 := v.Args[0]
 14708  	b := v.Block
 14709  	typ := &b.Func.Config.Types
 14710  	// match: (Rsh8Ux8 x y)
 14711  	// cond: ssa.ShiftIsBounded(v)
 14712  	// result: (SRD (MOVBZreg x) y)
 14713  	for {
 14714  		x := v_0
 14715  		y := v_1
 14716  		if !(ssa.ShiftIsBounded(v)) {
 14717  			break
 14718  		}
 14719  		v.Reset(ssaop.OpPPC64SRD)
 14720  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14721  		v0.AddArg(x)
 14722  		v.AddArg2(v0, y)
 14723  		return true
 14724  	}
 14725  	// match: (Rsh8Ux8 <t> x y)
 14726  	// result: (ISEL [2] (SRD <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPconst [0] (ANDconst [0x00F8] y)))
 14727  	for {
 14728  		t := v.Type
 14729  		x := v_0
 14730  		y := v_1
 14731  		v.Reset(ssaop.OpPPC64ISEL)
 14732  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14733  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRD, t)
 14734  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBZreg, typ.Int64)
 14735  		v1.AddArg(x)
 14736  		v0.AddArg2(v1, y)
 14737  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDconst, typ.Int64)
 14738  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14739  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14740  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 14741  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14742  		v4.AuxInt = ssa.Int64ToAuxInt(0x00F8)
 14743  		v4.AddArg(y)
 14744  		v3.AddArg(v4)
 14745  		v.AddArg3(v0, v2, v3)
 14746  		return true
 14747  	}
 14748  }
 14749  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
 14750  	v_1 := v.Args[1]
 14751  	v_0 := v.Args[0]
 14752  	b := v.Block
 14753  	typ := &b.Func.Config.Types
 14754  	// match: (Rsh8x16 x y)
 14755  	// cond: ssa.ShiftIsBounded(v)
 14756  	// result: (SRAD (MOVBreg x) y)
 14757  	for {
 14758  		x := v_0
 14759  		y := v_1
 14760  		if !(ssa.ShiftIsBounded(v)) {
 14761  			break
 14762  		}
 14763  		v.Reset(ssaop.OpPPC64SRAD)
 14764  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14765  		v0.AddArg(x)
 14766  		v.AddArg2(v0, y)
 14767  		return true
 14768  	}
 14769  	// match: (Rsh8x16 <t> x y)
 14770  	// result: (ISEL [2] (SRAD <t> (MOVBreg x) y) (SRADconst <t> (MOVBreg x) [7]) (CMPconst [0] (ANDconst [0xFFF8] y)))
 14771  	for {
 14772  		t := v.Type
 14773  		x := v_0
 14774  		y := v_1
 14775  		v.Reset(ssaop.OpPPC64ISEL)
 14776  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14777  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14778  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14779  		v1.AddArg(x)
 14780  		v0.AddArg2(v1, y)
 14781  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14782  		v2.AuxInt = ssa.Int64ToAuxInt(7)
 14783  		v2.AddArg(v1)
 14784  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14785  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 14786  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14787  		v4.AuxInt = ssa.Int64ToAuxInt(0xFFF8)
 14788  		v4.AddArg(y)
 14789  		v3.AddArg(v4)
 14790  		v.AddArg3(v0, v2, v3)
 14791  		return true
 14792  	}
 14793  }
 14794  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
 14795  	v_1 := v.Args[1]
 14796  	v_0 := v.Args[0]
 14797  	b := v.Block
 14798  	typ := &b.Func.Config.Types
 14799  	// match: (Rsh8x32 x y)
 14800  	// cond: ssa.ShiftIsBounded(v)
 14801  	// result: (SRAD (MOVBreg x) y)
 14802  	for {
 14803  		x := v_0
 14804  		y := v_1
 14805  		if !(ssa.ShiftIsBounded(v)) {
 14806  			break
 14807  		}
 14808  		v.Reset(ssaop.OpPPC64SRAD)
 14809  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14810  		v0.AddArg(x)
 14811  		v.AddArg2(v0, y)
 14812  		return true
 14813  	}
 14814  	// match: (Rsh8x32 <t> x y)
 14815  	// result: (ISEL [0] (SRAD <t> (MOVBreg x) y) (SRADconst <t> (MOVBreg x) [7]) (CMPWUconst y [8]))
 14816  	for {
 14817  		t := v.Type
 14818  		x := v_0
 14819  		y := v_1
 14820  		v.Reset(ssaop.OpPPC64ISEL)
 14821  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14822  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14823  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14824  		v1.AddArg(x)
 14825  		v0.AddArg2(v1, y)
 14826  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14827  		v2.AuxInt = ssa.Int64ToAuxInt(7)
 14828  		v2.AddArg(v1)
 14829  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPWUconst, types.TypeFlags)
 14830  		v3.AuxInt = ssa.Int32ToAuxInt(8)
 14831  		v3.AddArg(y)
 14832  		v.AddArg3(v0, v2, v3)
 14833  		return true
 14834  	}
 14835  }
 14836  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
 14837  	v_1 := v.Args[1]
 14838  	v_0 := v.Args[0]
 14839  	b := v.Block
 14840  	typ := &b.Func.Config.Types
 14841  	// match: (Rsh8x64 x (MOVDconst [c]))
 14842  	// cond: uint64(c) >= 8
 14843  	// result: (SRAWconst (SignExt8to32 x) [63])
 14844  	for {
 14845  		x := v_0
 14846  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14847  			break
 14848  		}
 14849  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14850  		if !(uint64(c) >= 8) {
 14851  			break
 14852  		}
 14853  		v.Reset(ssaop.OpPPC64SRAWconst)
 14854  		v.AuxInt = ssa.Int64ToAuxInt(63)
 14855  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
 14856  		v0.AddArg(x)
 14857  		v.AddArg(v0)
 14858  		return true
 14859  	}
 14860  	// match: (Rsh8x64 x (MOVDconst [c]))
 14861  	// cond: uint64(c) < 8
 14862  	// result: (SRAWconst (SignExt8to32 x) [c])
 14863  	for {
 14864  		x := v_0
 14865  		if v_1.Op != ssaop.OpPPC64MOVDconst {
 14866  			break
 14867  		}
 14868  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 14869  		if !(uint64(c) < 8) {
 14870  			break
 14871  		}
 14872  		v.Reset(ssaop.OpPPC64SRAWconst)
 14873  		v.AuxInt = ssa.Int64ToAuxInt(c)
 14874  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to32, typ.Int32)
 14875  		v0.AddArg(x)
 14876  		v.AddArg(v0)
 14877  		return true
 14878  	}
 14879  	// match: (Rsh8x64 x y)
 14880  	// cond: ssa.ShiftIsBounded(v)
 14881  	// result: (SRAD (MOVBreg x) y)
 14882  	for {
 14883  		x := v_0
 14884  		y := v_1
 14885  		if !(ssa.ShiftIsBounded(v)) {
 14886  			break
 14887  		}
 14888  		v.Reset(ssaop.OpPPC64SRAD)
 14889  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14890  		v0.AddArg(x)
 14891  		v.AddArg2(v0, y)
 14892  		return true
 14893  	}
 14894  	// match: (Rsh8x64 <t> x y)
 14895  	// result: (ISEL [0] (SRAD <t> (MOVBreg x) y) (SRADconst <t> (MOVBreg x) [7]) (CMPUconst y [8]))
 14896  	for {
 14897  		t := v.Type
 14898  		x := v_0
 14899  		y := v_1
 14900  		v.Reset(ssaop.OpPPC64ISEL)
 14901  		v.AuxInt = ssa.Int32ToAuxInt(0)
 14902  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14903  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14904  		v1.AddArg(x)
 14905  		v0.AddArg2(v1, y)
 14906  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14907  		v2.AuxInt = ssa.Int64ToAuxInt(7)
 14908  		v2.AddArg(v1)
 14909  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPUconst, types.TypeFlags)
 14910  		v3.AuxInt = ssa.Int64ToAuxInt(8)
 14911  		v3.AddArg(y)
 14912  		v.AddArg3(v0, v2, v3)
 14913  		return true
 14914  	}
 14915  }
 14916  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
 14917  	v_1 := v.Args[1]
 14918  	v_0 := v.Args[0]
 14919  	b := v.Block
 14920  	typ := &b.Func.Config.Types
 14921  	// match: (Rsh8x8 x y)
 14922  	// cond: ssa.ShiftIsBounded(v)
 14923  	// result: (SRAD (MOVBreg x) y)
 14924  	for {
 14925  		x := v_0
 14926  		y := v_1
 14927  		if !(ssa.ShiftIsBounded(v)) {
 14928  			break
 14929  		}
 14930  		v.Reset(ssaop.OpPPC64SRAD)
 14931  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14932  		v0.AddArg(x)
 14933  		v.AddArg2(v0, y)
 14934  		return true
 14935  	}
 14936  	// match: (Rsh8x8 <t> x y)
 14937  	// result: (ISEL [2] (SRAD <t> (MOVBreg x) y) (SRADconst <t> (MOVBreg x) [7]) (CMPconst [0] (ANDconst [0x00F8] y)))
 14938  	for {
 14939  		t := v.Type
 14940  		x := v_0
 14941  		y := v_1
 14942  		v.Reset(ssaop.OpPPC64ISEL)
 14943  		v.AuxInt = ssa.Int32ToAuxInt(2)
 14944  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SRAD, t)
 14945  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVBreg, typ.Int64)
 14946  		v1.AddArg(x)
 14947  		v0.AddArg2(v1, y)
 14948  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SRADconst, t)
 14949  		v2.AuxInt = ssa.Int64ToAuxInt(7)
 14950  		v2.AddArg(v1)
 14951  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 14952  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 14953  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 14954  		v4.AuxInt = ssa.Int64ToAuxInt(0x00F8)
 14955  		v4.AddArg(y)
 14956  		v3.AddArg(v4)
 14957  		v.AddArg3(v0, v2, v3)
 14958  		return true
 14959  	}
 14960  }
 14961  func rewriteValue_OpSelect0(v *ssa.Value) bool {
 14962  	v_0 := v.Args[0]
 14963  	b := v.Block
 14964  	typ := &b.Func.Config.Types
 14965  	// match: (Select0 (Mul64uhilo x y))
 14966  	// result: (MULHDU x y)
 14967  	for {
 14968  		if v_0.Op != ssaop.OpMul64uhilo {
 14969  			break
 14970  		}
 14971  		y := v_0.Args[1]
 14972  		x := v_0.Args[0]
 14973  		v.Reset(ssaop.OpPPC64MULHDU)
 14974  		v.AddArg2(x, y)
 14975  		return true
 14976  	}
 14977  	// match: (Select0 (Mul64uover x y))
 14978  	// result: (MULLD x y)
 14979  	for {
 14980  		if v_0.Op != ssaop.OpMul64uover {
 14981  			break
 14982  		}
 14983  		y := v_0.Args[1]
 14984  		x := v_0.Args[0]
 14985  		v.Reset(ssaop.OpPPC64MULLD)
 14986  		v.AddArg2(x, y)
 14987  		return true
 14988  	}
 14989  	// match: (Select0 (Add64carry x y c))
 14990  	// result: (Select0 <typ.UInt64> (ADDE x y (Select1 <typ.UInt64> (ADDCconst c [-1]))))
 14991  	for {
 14992  		if v_0.Op != ssaop.OpAdd64carry {
 14993  			break
 14994  		}
 14995  		c := v_0.Args[2]
 14996  		x := v_0.Args[0]
 14997  		y := v_0.Args[1]
 14998  		v.Reset(ssaop.OpSelect0)
 14999  		v.Type = typ.UInt64
 15000  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDE, types.NewTuple(typ.UInt64, typ.UInt64))
 15001  		v1 := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt64)
 15002  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDCconst, types.NewTuple(typ.UInt64, typ.UInt64))
 15003  		v2.AuxInt = ssa.Int64ToAuxInt(-1)
 15004  		v2.AddArg(c)
 15005  		v1.AddArg(v2)
 15006  		v0.AddArg3(x, y, v1)
 15007  		v.AddArg(v0)
 15008  		return true
 15009  	}
 15010  	// match: (Select0 (Sub64borrow x y c))
 15011  	// result: (Select0 <typ.UInt64> (SUBE x y (Select1 <typ.UInt64> (SUBCconst c [0]))))
 15012  	for {
 15013  		if v_0.Op != ssaop.OpSub64borrow {
 15014  			break
 15015  		}
 15016  		c := v_0.Args[2]
 15017  		x := v_0.Args[0]
 15018  		y := v_0.Args[1]
 15019  		v.Reset(ssaop.OpSelect0)
 15020  		v.Type = typ.UInt64
 15021  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SUBE, types.NewTuple(typ.UInt64, typ.UInt64))
 15022  		v1 := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt64)
 15023  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SUBCconst, types.NewTuple(typ.UInt64, typ.UInt64))
 15024  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 15025  		v2.AddArg(c)
 15026  		v1.AddArg(v2)
 15027  		v0.AddArg3(x, y, v1)
 15028  		v.AddArg(v0)
 15029  		return true
 15030  	}
 15031  	return false
 15032  }
 15033  func rewriteValue_OpSelect1(v *ssa.Value) bool {
 15034  	v_0 := v.Args[0]
 15035  	b := v.Block
 15036  	typ := &b.Func.Config.Types
 15037  	// match: (Select1 (Mul64uhilo x y))
 15038  	// result: (MULLD x y)
 15039  	for {
 15040  		if v_0.Op != ssaop.OpMul64uhilo {
 15041  			break
 15042  		}
 15043  		y := v_0.Args[1]
 15044  		x := v_0.Args[0]
 15045  		v.Reset(ssaop.OpPPC64MULLD)
 15046  		v.AddArg2(x, y)
 15047  		return true
 15048  	}
 15049  	// match: (Select1 (Mul64uover x y))
 15050  	// result: (SETBCR [2] (CMPconst [0] (MULHDU <x.Type> x y)))
 15051  	for {
 15052  		if v_0.Op != ssaop.OpMul64uover {
 15053  			break
 15054  		}
 15055  		y := v_0.Args[1]
 15056  		x := v_0.Args[0]
 15057  		v.Reset(ssaop.OpPPC64SETBCR)
 15058  		v.AuxInt = ssa.Int32ToAuxInt(2)
 15059  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 15060  		v0.AuxInt = ssa.Int64ToAuxInt(0)
 15061  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MULHDU, x.Type)
 15062  		v1.AddArg2(x, y)
 15063  		v0.AddArg(v1)
 15064  		v.AddArg(v0)
 15065  		return true
 15066  	}
 15067  	// match: (Select1 (Add64carry x y c))
 15068  	// result: (ADDZEzero (Select1 <typ.UInt64> (ADDE x y (Select1 <typ.UInt64> (ADDCconst c [-1])))))
 15069  	for {
 15070  		if v_0.Op != ssaop.OpAdd64carry {
 15071  			break
 15072  		}
 15073  		c := v_0.Args[2]
 15074  		x := v_0.Args[0]
 15075  		y := v_0.Args[1]
 15076  		v.Reset(ssaop.OpPPC64ADDZEzero)
 15077  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt64)
 15078  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDE, types.NewTuple(typ.UInt64, typ.UInt64))
 15079  		v2 := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt64)
 15080  		v3 := b.NewValue0(v.Pos, ssaop.OpPPC64ADDCconst, types.NewTuple(typ.UInt64, typ.UInt64))
 15081  		v3.AuxInt = ssa.Int64ToAuxInt(-1)
 15082  		v3.AddArg(c)
 15083  		v2.AddArg(v3)
 15084  		v1.AddArg3(x, y, v2)
 15085  		v0.AddArg(v1)
 15086  		v.AddArg(v0)
 15087  		return true
 15088  	}
 15089  	// match: (Select1 (ADDCconst n:(ADDZEzero x) [-1]))
 15090  	// cond: n.Uses <= 2
 15091  	// result: x
 15092  	for {
 15093  		if v_0.Op != ssaop.OpPPC64ADDCconst || ssa.AuxIntToInt64(v_0.AuxInt) != -1 {
 15094  			break
 15095  		}
 15096  		n := v_0.Args[0]
 15097  		if n.Op != ssaop.OpPPC64ADDZEzero {
 15098  			break
 15099  		}
 15100  		x := n.Args[0]
 15101  		if !(n.Uses <= 2) {
 15102  			break
 15103  		}
 15104  		v.CopyOf(x)
 15105  		return true
 15106  	}
 15107  	// match: (Select1 (Sub64borrow x y c))
 15108  	// result: (NEG (SUBZEzero (Select1 <typ.UInt64> (SUBE x y (Select1 <typ.UInt64> (SUBCconst c [0]))))))
 15109  	for {
 15110  		if v_0.Op != ssaop.OpSub64borrow {
 15111  			break
 15112  		}
 15113  		c := v_0.Args[2]
 15114  		x := v_0.Args[0]
 15115  		y := v_0.Args[1]
 15116  		v.Reset(ssaop.OpPPC64NEG)
 15117  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64SUBZEzero, typ.UInt64)
 15118  		v1 := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt64)
 15119  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64SUBE, types.NewTuple(typ.UInt64, typ.UInt64))
 15120  		v3 := b.NewValue0(v.Pos, ssaop.OpSelect1, typ.UInt64)
 15121  		v4 := b.NewValue0(v.Pos, ssaop.OpPPC64SUBCconst, types.NewTuple(typ.UInt64, typ.UInt64))
 15122  		v4.AuxInt = ssa.Int64ToAuxInt(0)
 15123  		v4.AddArg(c)
 15124  		v3.AddArg(v4)
 15125  		v2.AddArg3(x, y, v3)
 15126  		v1.AddArg(v2)
 15127  		v0.AddArg(v1)
 15128  		v.AddArg(v0)
 15129  		return true
 15130  	}
 15131  	// match: (Select1 (SUBCconst n:(NEG (SUBZEzero x)) [0]))
 15132  	// cond: n.Uses <= 2
 15133  	// result: x
 15134  	for {
 15135  		if v_0.Op != ssaop.OpPPC64SUBCconst || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15136  			break
 15137  		}
 15138  		n := v_0.Args[0]
 15139  		if n.Op != ssaop.OpPPC64NEG {
 15140  			break
 15141  		}
 15142  		n_0 := n.Args[0]
 15143  		if n_0.Op != ssaop.OpPPC64SUBZEzero {
 15144  			break
 15145  		}
 15146  		x := n_0.Args[0]
 15147  		if !(n.Uses <= 2) {
 15148  			break
 15149  		}
 15150  		v.CopyOf(x)
 15151  		return true
 15152  	}
 15153  	return false
 15154  }
 15155  func rewriteValue_OpSelectN(v *ssa.Value) bool {
 15156  	v_0 := v.Args[0]
 15157  	b := v.Block
 15158  	config := b.Func.Config
 15159  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 15160  	// cond: sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(s1, s2, s3, call)
 15161  	// result: (Move [sz] dst src mem)
 15162  	for {
 15163  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 15164  			break
 15165  		}
 15166  		call := v_0
 15167  		if call.Op != ssaop.OpPPC64CALLstatic || len(call.Args) != 1 {
 15168  			break
 15169  		}
 15170  		sym := ssa.AuxToCall(call.Aux)
 15171  		s1 := call.Args[0]
 15172  		if s1.Op != ssaop.OpPPC64MOVDstore {
 15173  			break
 15174  		}
 15175  		_ = s1.Args[2]
 15176  		s1_1 := s1.Args[1]
 15177  		if s1_1.Op != ssaop.OpPPC64MOVDconst {
 15178  			break
 15179  		}
 15180  		sz := ssa.AuxIntToInt64(s1_1.AuxInt)
 15181  		s2 := s1.Args[2]
 15182  		if s2.Op != ssaop.OpPPC64MOVDstore {
 15183  			break
 15184  		}
 15185  		_ = s2.Args[2]
 15186  		src := s2.Args[1]
 15187  		s3 := s2.Args[2]
 15188  		if s3.Op != ssaop.OpPPC64MOVDstore {
 15189  			break
 15190  		}
 15191  		mem := s3.Args[2]
 15192  		dst := s3.Args[1]
 15193  		if !(sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(s1, s2, s3, call)) {
 15194  			break
 15195  		}
 15196  		v.Reset(ssaop.OpMove)
 15197  		v.AuxInt = ssa.Int64ToAuxInt(sz)
 15198  		v.AddArg3(dst, src, mem)
 15199  		return true
 15200  	}
 15201  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 15202  	// cond: sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)
 15203  	// result: (Move [sz] dst src mem)
 15204  	for {
 15205  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 15206  			break
 15207  		}
 15208  		call := v_0
 15209  		if call.Op != ssaop.OpPPC64CALLstatic || len(call.Args) != 4 {
 15210  			break
 15211  		}
 15212  		sym := ssa.AuxToCall(call.Aux)
 15213  		mem := call.Args[3]
 15214  		dst := call.Args[0]
 15215  		src := call.Args[1]
 15216  		call_2 := call.Args[2]
 15217  		if call_2.Op != ssaop.OpPPC64MOVDconst {
 15218  			break
 15219  		}
 15220  		sz := ssa.AuxIntToInt64(call_2.AuxInt)
 15221  		if !(sz >= 0 && ssa.IsSameCall(sym, "runtime.memmove") && call.Uses == 1 && ssa.IsInlinableMemmove(dst, src, sz, config) && ssa.Clobber(call)) {
 15222  			break
 15223  		}
 15224  		v.Reset(ssaop.OpMove)
 15225  		v.AuxInt = ssa.Int64ToAuxInt(sz)
 15226  		v.AddArg3(dst, src, mem)
 15227  		return true
 15228  	}
 15229  	return false
 15230  }
 15231  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
 15232  	v_0 := v.Args[0]
 15233  	b := v.Block
 15234  	// match: (Slicemask <t> x)
 15235  	// result: (SRADconst (NEG <t> x) [63])
 15236  	for {
 15237  		t := v.Type
 15238  		x := v_0
 15239  		v.Reset(ssaop.OpPPC64SRADconst)
 15240  		v.AuxInt = ssa.Int64ToAuxInt(63)
 15241  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64NEG, t)
 15242  		v0.AddArg(x)
 15243  		v.AddArg(v0)
 15244  		return true
 15245  	}
 15246  }
 15247  func rewriteValue_OpStore(v *ssa.Value) bool {
 15248  	v_2 := v.Args[2]
 15249  	v_1 := v.Args[1]
 15250  	v_0 := v.Args[0]
 15251  	// match: (Store {t} ptr val mem)
 15252  	// cond: t.Size() == 8 && t.IsFloat()
 15253  	// result: (FMOVDstore ptr val mem)
 15254  	for {
 15255  		t := ssa.AuxToType(v.Aux)
 15256  		ptr := v_0
 15257  		val := v_1
 15258  		mem := v_2
 15259  		if !(t.Size() == 8 && t.IsFloat()) {
 15260  			break
 15261  		}
 15262  		v.Reset(ssaop.OpPPC64FMOVDstore)
 15263  		v.AddArg3(ptr, val, mem)
 15264  		return true
 15265  	}
 15266  	// match: (Store {t} ptr val mem)
 15267  	// cond: t.Size() == 4 && t.IsFloat()
 15268  	// result: (FMOVSstore ptr val mem)
 15269  	for {
 15270  		t := ssa.AuxToType(v.Aux)
 15271  		ptr := v_0
 15272  		val := v_1
 15273  		mem := v_2
 15274  		if !(t.Size() == 4 && t.IsFloat()) {
 15275  			break
 15276  		}
 15277  		v.Reset(ssaop.OpPPC64FMOVSstore)
 15278  		v.AddArg3(ptr, val, mem)
 15279  		return true
 15280  	}
 15281  	// match: (Store {t} ptr val mem)
 15282  	// cond: t.Size() == 8 && !t.IsFloat()
 15283  	// result: (MOVDstore ptr val mem)
 15284  	for {
 15285  		t := ssa.AuxToType(v.Aux)
 15286  		ptr := v_0
 15287  		val := v_1
 15288  		mem := v_2
 15289  		if !(t.Size() == 8 && !t.IsFloat()) {
 15290  			break
 15291  		}
 15292  		v.Reset(ssaop.OpPPC64MOVDstore)
 15293  		v.AddArg3(ptr, val, mem)
 15294  		return true
 15295  	}
 15296  	// match: (Store {t} ptr val mem)
 15297  	// cond: t.Size() == 4 && !t.IsFloat()
 15298  	// result: (MOVWstore ptr val mem)
 15299  	for {
 15300  		t := ssa.AuxToType(v.Aux)
 15301  		ptr := v_0
 15302  		val := v_1
 15303  		mem := v_2
 15304  		if !(t.Size() == 4 && !t.IsFloat()) {
 15305  			break
 15306  		}
 15307  		v.Reset(ssaop.OpPPC64MOVWstore)
 15308  		v.AddArg3(ptr, val, mem)
 15309  		return true
 15310  	}
 15311  	// match: (Store {t} ptr val mem)
 15312  	// cond: t.Size() == 2
 15313  	// result: (MOVHstore ptr val mem)
 15314  	for {
 15315  		t := ssa.AuxToType(v.Aux)
 15316  		ptr := v_0
 15317  		val := v_1
 15318  		mem := v_2
 15319  		if !(t.Size() == 2) {
 15320  			break
 15321  		}
 15322  		v.Reset(ssaop.OpPPC64MOVHstore)
 15323  		v.AddArg3(ptr, val, mem)
 15324  		return true
 15325  	}
 15326  	// match: (Store {t} ptr val mem)
 15327  	// cond: t.Size() == 1
 15328  	// result: (MOVBstore ptr val mem)
 15329  	for {
 15330  		t := ssa.AuxToType(v.Aux)
 15331  		ptr := v_0
 15332  		val := v_1
 15333  		mem := v_2
 15334  		if !(t.Size() == 1) {
 15335  			break
 15336  		}
 15337  		v.Reset(ssaop.OpPPC64MOVBstore)
 15338  		v.AddArg3(ptr, val, mem)
 15339  		return true
 15340  	}
 15341  	return false
 15342  }
 15343  func rewriteValue_OpTrunc16to8(v *ssa.Value) bool {
 15344  	v_0 := v.Args[0]
 15345  	// match: (Trunc16to8 <t> x)
 15346  	// cond: t.IsSigned()
 15347  	// result: (MOVBreg x)
 15348  	for {
 15349  		t := v.Type
 15350  		x := v_0
 15351  		if !(t.IsSigned()) {
 15352  			break
 15353  		}
 15354  		v.Reset(ssaop.OpPPC64MOVBreg)
 15355  		v.AddArg(x)
 15356  		return true
 15357  	}
 15358  	// match: (Trunc16to8 x)
 15359  	// result: (MOVBZreg x)
 15360  	for {
 15361  		x := v_0
 15362  		v.Reset(ssaop.OpPPC64MOVBZreg)
 15363  		v.AddArg(x)
 15364  		return true
 15365  	}
 15366  }
 15367  func rewriteValue_OpTrunc32to16(v *ssa.Value) bool {
 15368  	v_0 := v.Args[0]
 15369  	// match: (Trunc32to16 <t> x)
 15370  	// cond: t.IsSigned()
 15371  	// result: (MOVHreg x)
 15372  	for {
 15373  		t := v.Type
 15374  		x := v_0
 15375  		if !(t.IsSigned()) {
 15376  			break
 15377  		}
 15378  		v.Reset(ssaop.OpPPC64MOVHreg)
 15379  		v.AddArg(x)
 15380  		return true
 15381  	}
 15382  	// match: (Trunc32to16 x)
 15383  	// result: (MOVHZreg x)
 15384  	for {
 15385  		x := v_0
 15386  		v.Reset(ssaop.OpPPC64MOVHZreg)
 15387  		v.AddArg(x)
 15388  		return true
 15389  	}
 15390  }
 15391  func rewriteValue_OpTrunc32to8(v *ssa.Value) bool {
 15392  	v_0 := v.Args[0]
 15393  	// match: (Trunc32to8 <t> x)
 15394  	// cond: t.IsSigned()
 15395  	// result: (MOVBreg x)
 15396  	for {
 15397  		t := v.Type
 15398  		x := v_0
 15399  		if !(t.IsSigned()) {
 15400  			break
 15401  		}
 15402  		v.Reset(ssaop.OpPPC64MOVBreg)
 15403  		v.AddArg(x)
 15404  		return true
 15405  	}
 15406  	// match: (Trunc32to8 x)
 15407  	// result: (MOVBZreg x)
 15408  	for {
 15409  		x := v_0
 15410  		v.Reset(ssaop.OpPPC64MOVBZreg)
 15411  		v.AddArg(x)
 15412  		return true
 15413  	}
 15414  }
 15415  func rewriteValue_OpTrunc64to16(v *ssa.Value) bool {
 15416  	v_0 := v.Args[0]
 15417  	// match: (Trunc64to16 <t> x)
 15418  	// cond: t.IsSigned()
 15419  	// result: (MOVHreg x)
 15420  	for {
 15421  		t := v.Type
 15422  		x := v_0
 15423  		if !(t.IsSigned()) {
 15424  			break
 15425  		}
 15426  		v.Reset(ssaop.OpPPC64MOVHreg)
 15427  		v.AddArg(x)
 15428  		return true
 15429  	}
 15430  	// match: (Trunc64to16 x)
 15431  	// result: (MOVHZreg x)
 15432  	for {
 15433  		x := v_0
 15434  		v.Reset(ssaop.OpPPC64MOVHZreg)
 15435  		v.AddArg(x)
 15436  		return true
 15437  	}
 15438  }
 15439  func rewriteValue_OpTrunc64to32(v *ssa.Value) bool {
 15440  	v_0 := v.Args[0]
 15441  	// match: (Trunc64to32 <t> x)
 15442  	// cond: t.IsSigned()
 15443  	// result: (MOVWreg x)
 15444  	for {
 15445  		t := v.Type
 15446  		x := v_0
 15447  		if !(t.IsSigned()) {
 15448  			break
 15449  		}
 15450  		v.Reset(ssaop.OpPPC64MOVWreg)
 15451  		v.AddArg(x)
 15452  		return true
 15453  	}
 15454  	// match: (Trunc64to32 x)
 15455  	// result: (MOVWZreg x)
 15456  	for {
 15457  		x := v_0
 15458  		v.Reset(ssaop.OpPPC64MOVWZreg)
 15459  		v.AddArg(x)
 15460  		return true
 15461  	}
 15462  }
 15463  func rewriteValue_OpTrunc64to8(v *ssa.Value) bool {
 15464  	v_0 := v.Args[0]
 15465  	// match: (Trunc64to8 <t> x)
 15466  	// cond: t.IsSigned()
 15467  	// result: (MOVBreg x)
 15468  	for {
 15469  		t := v.Type
 15470  		x := v_0
 15471  		if !(t.IsSigned()) {
 15472  			break
 15473  		}
 15474  		v.Reset(ssaop.OpPPC64MOVBreg)
 15475  		v.AddArg(x)
 15476  		return true
 15477  	}
 15478  	// match: (Trunc64to8 x)
 15479  	// result: (MOVBZreg x)
 15480  	for {
 15481  		x := v_0
 15482  		v.Reset(ssaop.OpPPC64MOVBZreg)
 15483  		v.AddArg(x)
 15484  		return true
 15485  	}
 15486  }
 15487  func rewriteValue_OpZero(v *ssa.Value) bool {
 15488  	v_1 := v.Args[1]
 15489  	v_0 := v.Args[0]
 15490  	b := v.Block
 15491  	// match: (Zero [0] _ mem)
 15492  	// result: mem
 15493  	for {
 15494  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 15495  			break
 15496  		}
 15497  		mem := v_1
 15498  		v.CopyOf(mem)
 15499  		return true
 15500  	}
 15501  	// match: (Zero [1] destptr mem)
 15502  	// result: (MOVBstorezero destptr mem)
 15503  	for {
 15504  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
 15505  			break
 15506  		}
 15507  		destptr := v_0
 15508  		mem := v_1
 15509  		v.Reset(ssaop.OpPPC64MOVBstorezero)
 15510  		v.AddArg2(destptr, mem)
 15511  		return true
 15512  	}
 15513  	// match: (Zero [2] destptr mem)
 15514  	// result: (MOVHstorezero destptr mem)
 15515  	for {
 15516  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
 15517  			break
 15518  		}
 15519  		destptr := v_0
 15520  		mem := v_1
 15521  		v.Reset(ssaop.OpPPC64MOVHstorezero)
 15522  		v.AddArg2(destptr, mem)
 15523  		return true
 15524  	}
 15525  	// match: (Zero [3] destptr mem)
 15526  	// result: (MOVBstorezero [2] destptr (MOVHstorezero destptr mem))
 15527  	for {
 15528  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
 15529  			break
 15530  		}
 15531  		destptr := v_0
 15532  		mem := v_1
 15533  		v.Reset(ssaop.OpPPC64MOVBstorezero)
 15534  		v.AuxInt = ssa.Int32ToAuxInt(2)
 15535  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHstorezero, types.TypeMem)
 15536  		v0.AddArg2(destptr, mem)
 15537  		v.AddArg2(destptr, v0)
 15538  		return true
 15539  	}
 15540  	// match: (Zero [4] destptr mem)
 15541  	// result: (MOVWstorezero destptr mem)
 15542  	for {
 15543  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
 15544  			break
 15545  		}
 15546  		destptr := v_0
 15547  		mem := v_1
 15548  		v.Reset(ssaop.OpPPC64MOVWstorezero)
 15549  		v.AddArg2(destptr, mem)
 15550  		return true
 15551  	}
 15552  	// match: (Zero [5] destptr mem)
 15553  	// result: (MOVBstorezero [4] destptr (MOVWstorezero destptr mem))
 15554  	for {
 15555  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
 15556  			break
 15557  		}
 15558  		destptr := v_0
 15559  		mem := v_1
 15560  		v.Reset(ssaop.OpPPC64MOVBstorezero)
 15561  		v.AuxInt = ssa.Int32ToAuxInt(4)
 15562  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWstorezero, types.TypeMem)
 15563  		v0.AddArg2(destptr, mem)
 15564  		v.AddArg2(destptr, v0)
 15565  		return true
 15566  	}
 15567  	// match: (Zero [6] destptr mem)
 15568  	// result: (MOVHstorezero [4] destptr (MOVWstorezero destptr mem))
 15569  	for {
 15570  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
 15571  			break
 15572  		}
 15573  		destptr := v_0
 15574  		mem := v_1
 15575  		v.Reset(ssaop.OpPPC64MOVHstorezero)
 15576  		v.AuxInt = ssa.Int32ToAuxInt(4)
 15577  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWstorezero, types.TypeMem)
 15578  		v0.AddArg2(destptr, mem)
 15579  		v.AddArg2(destptr, v0)
 15580  		return true
 15581  	}
 15582  	// match: (Zero [7] destptr mem)
 15583  	// result: (MOVBstorezero [6] destptr (MOVHstorezero [4] destptr (MOVWstorezero destptr mem)))
 15584  	for {
 15585  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
 15586  			break
 15587  		}
 15588  		destptr := v_0
 15589  		mem := v_1
 15590  		v.Reset(ssaop.OpPPC64MOVBstorezero)
 15591  		v.AuxInt = ssa.Int32ToAuxInt(6)
 15592  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVHstorezero, types.TypeMem)
 15593  		v0.AuxInt = ssa.Int32ToAuxInt(4)
 15594  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVWstorezero, types.TypeMem)
 15595  		v1.AddArg2(destptr, mem)
 15596  		v0.AddArg2(destptr, v1)
 15597  		v.AddArg2(destptr, v0)
 15598  		return true
 15599  	}
 15600  	// match: (Zero [8] {t} destptr mem)
 15601  	// result: (MOVDstorezero destptr mem)
 15602  	for {
 15603  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
 15604  			break
 15605  		}
 15606  		destptr := v_0
 15607  		mem := v_1
 15608  		v.Reset(ssaop.OpPPC64MOVDstorezero)
 15609  		v.AddArg2(destptr, mem)
 15610  		return true
 15611  	}
 15612  	// match: (Zero [12] {t} destptr mem)
 15613  	// result: (MOVWstorezero [8] destptr (MOVDstorezero [0] destptr mem))
 15614  	for {
 15615  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
 15616  			break
 15617  		}
 15618  		destptr := v_0
 15619  		mem := v_1
 15620  		v.Reset(ssaop.OpPPC64MOVWstorezero)
 15621  		v.AuxInt = ssa.Int32ToAuxInt(8)
 15622  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15623  		v0.AuxInt = ssa.Int32ToAuxInt(0)
 15624  		v0.AddArg2(destptr, mem)
 15625  		v.AddArg2(destptr, v0)
 15626  		return true
 15627  	}
 15628  	// match: (Zero [16] {t} destptr mem)
 15629  	// result: (MOVDstorezero [8] destptr (MOVDstorezero [0] destptr mem))
 15630  	for {
 15631  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
 15632  			break
 15633  		}
 15634  		destptr := v_0
 15635  		mem := v_1
 15636  		v.Reset(ssaop.OpPPC64MOVDstorezero)
 15637  		v.AuxInt = ssa.Int32ToAuxInt(8)
 15638  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15639  		v0.AuxInt = ssa.Int32ToAuxInt(0)
 15640  		v0.AddArg2(destptr, mem)
 15641  		v.AddArg2(destptr, v0)
 15642  		return true
 15643  	}
 15644  	// match: (Zero [24] {t} destptr mem)
 15645  	// result: (MOVDstorezero [16] destptr (MOVDstorezero [8] destptr (MOVDstorezero [0] destptr mem)))
 15646  	for {
 15647  		if ssa.AuxIntToInt64(v.AuxInt) != 24 {
 15648  			break
 15649  		}
 15650  		destptr := v_0
 15651  		mem := v_1
 15652  		v.Reset(ssaop.OpPPC64MOVDstorezero)
 15653  		v.AuxInt = ssa.Int32ToAuxInt(16)
 15654  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15655  		v0.AuxInt = ssa.Int32ToAuxInt(8)
 15656  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15657  		v1.AuxInt = ssa.Int32ToAuxInt(0)
 15658  		v1.AddArg2(destptr, mem)
 15659  		v0.AddArg2(destptr, v1)
 15660  		v.AddArg2(destptr, v0)
 15661  		return true
 15662  	}
 15663  	// match: (Zero [32] {t} destptr mem)
 15664  	// result: (MOVDstorezero [24] destptr (MOVDstorezero [16] destptr (MOVDstorezero [8] destptr (MOVDstorezero [0] destptr mem))))
 15665  	for {
 15666  		if ssa.AuxIntToInt64(v.AuxInt) != 32 {
 15667  			break
 15668  		}
 15669  		destptr := v_0
 15670  		mem := v_1
 15671  		v.Reset(ssaop.OpPPC64MOVDstorezero)
 15672  		v.AuxInt = ssa.Int32ToAuxInt(24)
 15673  		v0 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15674  		v0.AuxInt = ssa.Int32ToAuxInt(16)
 15675  		v1 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15676  		v1.AuxInt = ssa.Int32ToAuxInt(8)
 15677  		v2 := b.NewValue0(v.Pos, ssaop.OpPPC64MOVDstorezero, types.TypeMem)
 15678  		v2.AuxInt = ssa.Int32ToAuxInt(0)
 15679  		v2.AddArg2(destptr, mem)
 15680  		v1.AddArg2(destptr, v2)
 15681  		v0.AddArg2(destptr, v1)
 15682  		v.AddArg2(destptr, v0)
 15683  		return true
 15684  	}
 15685  	// match: (Zero [s] ptr mem)
 15686  	// cond: buildcfg.GOPPC64 <= 8 && s < 64
 15687  	// result: (LoweredZeroShort [s] ptr mem)
 15688  	for {
 15689  		s := ssa.AuxIntToInt64(v.AuxInt)
 15690  		ptr := v_0
 15691  		mem := v_1
 15692  		if !(buildcfg.GOPPC64 <= 8 && s < 64) {
 15693  			break
 15694  		}
 15695  		v.Reset(ssaop.OpPPC64LoweredZeroShort)
 15696  		v.AuxInt = ssa.Int64ToAuxInt(s)
 15697  		v.AddArg2(ptr, mem)
 15698  		return true
 15699  	}
 15700  	// match: (Zero [s] ptr mem)
 15701  	// cond: buildcfg.GOPPC64 <= 8
 15702  	// result: (LoweredZero [s] ptr mem)
 15703  	for {
 15704  		s := ssa.AuxIntToInt64(v.AuxInt)
 15705  		ptr := v_0
 15706  		mem := v_1
 15707  		if !(buildcfg.GOPPC64 <= 8) {
 15708  			break
 15709  		}
 15710  		v.Reset(ssaop.OpPPC64LoweredZero)
 15711  		v.AuxInt = ssa.Int64ToAuxInt(s)
 15712  		v.AddArg2(ptr, mem)
 15713  		return true
 15714  	}
 15715  	// match: (Zero [s] ptr mem)
 15716  	// cond: s < 128 && buildcfg.GOPPC64 >= 9
 15717  	// result: (LoweredQuadZeroShort [s] ptr mem)
 15718  	for {
 15719  		s := ssa.AuxIntToInt64(v.AuxInt)
 15720  		ptr := v_0
 15721  		mem := v_1
 15722  		if !(s < 128 && buildcfg.GOPPC64 >= 9) {
 15723  			break
 15724  		}
 15725  		v.Reset(ssaop.OpPPC64LoweredQuadZeroShort)
 15726  		v.AuxInt = ssa.Int64ToAuxInt(s)
 15727  		v.AddArg2(ptr, mem)
 15728  		return true
 15729  	}
 15730  	// match: (Zero [s] ptr mem)
 15731  	// cond: buildcfg.GOPPC64 >= 9
 15732  	// result: (LoweredQuadZero [s] ptr mem)
 15733  	for {
 15734  		s := ssa.AuxIntToInt64(v.AuxInt)
 15735  		ptr := v_0
 15736  		mem := v_1
 15737  		if !(buildcfg.GOPPC64 >= 9) {
 15738  			break
 15739  		}
 15740  		v.Reset(ssaop.OpPPC64LoweredQuadZero)
 15741  		v.AuxInt = ssa.Int64ToAuxInt(s)
 15742  		v.AddArg2(ptr, mem)
 15743  		return true
 15744  	}
 15745  	return false
 15746  }
 15747  func RewriteBlock(b *ssa.Block) bool {
 15748  	typ := &b.Func.Config.Types
 15749  	switch b.Kind {
 15750  	case block.BlockPPC64EQ:
 15751  		// match: (EQ (FlagEQ) yes no)
 15752  		// result: (First yes no)
 15753  		for b.Controls[0].Op == ssaop.OpPPC64FlagEQ {
 15754  			b.Reset(block.BlockFirst)
 15755  			return true
 15756  		}
 15757  		// match: (EQ (FlagLT) yes no)
 15758  		// result: (First no yes)
 15759  		for b.Controls[0].Op == ssaop.OpPPC64FlagLT {
 15760  			b.Reset(block.BlockFirst)
 15761  			b.SwapSuccessors()
 15762  			return true
 15763  		}
 15764  		// match: (EQ (FlagGT) yes no)
 15765  		// result: (First no yes)
 15766  		for b.Controls[0].Op == ssaop.OpPPC64FlagGT {
 15767  			b.Reset(block.BlockFirst)
 15768  			b.SwapSuccessors()
 15769  			return true
 15770  		}
 15771  		// match: (EQ (InvertFlags cmp) yes no)
 15772  		// result: (EQ cmp yes no)
 15773  		for b.Controls[0].Op == ssaop.OpPPC64InvertFlags {
 15774  			v_0 := b.Controls[0]
 15775  			cmp := v_0.Args[0]
 15776  			b.ResetWithControl(block.BlockPPC64EQ, cmp)
 15777  			return true
 15778  		}
 15779  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 15780  		// cond: z.Uses == 1
 15781  		// result: (EQ (Select1 <types.TypeFlags> (ANDCC x y)) yes no)
 15782  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 15783  			v_0 := b.Controls[0]
 15784  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15785  				break
 15786  			}
 15787  			z := v_0.Args[0]
 15788  			if z.Op != ssaop.OpPPC64AND {
 15789  				break
 15790  			}
 15791  			_ = z.Args[1]
 15792  			z_0 := z.Args[0]
 15793  			z_1 := z.Args[1]
 15794  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 15795  				x := z_0
 15796  				y := z_1
 15797  				if !(z.Uses == 1) {
 15798  					continue
 15799  				}
 15800  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 15801  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 15802  				v1.AddArg2(x, y)
 15803  				v0.AddArg(v1)
 15804  				b.ResetWithControl(block.BlockPPC64EQ, v0)
 15805  				return true
 15806  			}
 15807  			break
 15808  		}
 15809  		// match: (EQ (CMPconst [0] z:(OR x y)) yes no)
 15810  		// cond: z.Uses == 1
 15811  		// result: (EQ (Select1 <types.TypeFlags> (ORCC x y)) yes no)
 15812  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 15813  			v_0 := b.Controls[0]
 15814  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15815  				break
 15816  			}
 15817  			z := v_0.Args[0]
 15818  			if z.Op != ssaop.OpPPC64OR {
 15819  				break
 15820  			}
 15821  			_ = z.Args[1]
 15822  			z_0 := z.Args[0]
 15823  			z_1 := z.Args[1]
 15824  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 15825  				x := z_0
 15826  				y := z_1
 15827  				if !(z.Uses == 1) {
 15828  					continue
 15829  				}
 15830  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 15831  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 15832  				v1.AddArg2(x, y)
 15833  				v0.AddArg(v1)
 15834  				b.ResetWithControl(block.BlockPPC64EQ, v0)
 15835  				return true
 15836  			}
 15837  			break
 15838  		}
 15839  		// match: (EQ (CMPconst [0] z:(XOR x y)) yes no)
 15840  		// cond: z.Uses == 1
 15841  		// result: (EQ (Select1 <types.TypeFlags> (XORCC x y)) yes no)
 15842  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 15843  			v_0 := b.Controls[0]
 15844  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15845  				break
 15846  			}
 15847  			z := v_0.Args[0]
 15848  			if z.Op != ssaop.OpPPC64XOR {
 15849  				break
 15850  			}
 15851  			_ = z.Args[1]
 15852  			z_0 := z.Args[0]
 15853  			z_1 := z.Args[1]
 15854  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 15855  				x := z_0
 15856  				y := z_1
 15857  				if !(z.Uses == 1) {
 15858  					continue
 15859  				}
 15860  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 15861  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 15862  				v1.AddArg2(x, y)
 15863  				v0.AddArg(v1)
 15864  				b.ResetWithControl(block.BlockPPC64EQ, v0)
 15865  				return true
 15866  			}
 15867  			break
 15868  		}
 15869  	case block.BlockPPC64GE:
 15870  		// match: (GE (FlagEQ) yes no)
 15871  		// result: (First yes no)
 15872  		for b.Controls[0].Op == ssaop.OpPPC64FlagEQ {
 15873  			b.Reset(block.BlockFirst)
 15874  			return true
 15875  		}
 15876  		// match: (GE (FlagLT) yes no)
 15877  		// result: (First no yes)
 15878  		for b.Controls[0].Op == ssaop.OpPPC64FlagLT {
 15879  			b.Reset(block.BlockFirst)
 15880  			b.SwapSuccessors()
 15881  			return true
 15882  		}
 15883  		// match: (GE (FlagGT) yes no)
 15884  		// result: (First yes no)
 15885  		for b.Controls[0].Op == ssaop.OpPPC64FlagGT {
 15886  			b.Reset(block.BlockFirst)
 15887  			return true
 15888  		}
 15889  		// match: (GE (InvertFlags cmp) yes no)
 15890  		// result: (LE cmp yes no)
 15891  		for b.Controls[0].Op == ssaop.OpPPC64InvertFlags {
 15892  			v_0 := b.Controls[0]
 15893  			cmp := v_0.Args[0]
 15894  			b.ResetWithControl(block.BlockPPC64LE, cmp)
 15895  			return true
 15896  		}
 15897  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 15898  		// cond: z.Uses == 1
 15899  		// result: (GE (Select1 <types.TypeFlags> (ANDCC x y)) yes no)
 15900  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 15901  			v_0 := b.Controls[0]
 15902  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15903  				break
 15904  			}
 15905  			z := v_0.Args[0]
 15906  			if z.Op != ssaop.OpPPC64AND {
 15907  				break
 15908  			}
 15909  			_ = z.Args[1]
 15910  			z_0 := z.Args[0]
 15911  			z_1 := z.Args[1]
 15912  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 15913  				x := z_0
 15914  				y := z_1
 15915  				if !(z.Uses == 1) {
 15916  					continue
 15917  				}
 15918  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 15919  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 15920  				v1.AddArg2(x, y)
 15921  				v0.AddArg(v1)
 15922  				b.ResetWithControl(block.BlockPPC64GE, v0)
 15923  				return true
 15924  			}
 15925  			break
 15926  		}
 15927  		// match: (GE (CMPconst [0] z:(OR x y)) yes no)
 15928  		// cond: z.Uses == 1
 15929  		// result: (GE (Select1 <types.TypeFlags> (ORCC x y)) yes no)
 15930  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 15931  			v_0 := b.Controls[0]
 15932  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15933  				break
 15934  			}
 15935  			z := v_0.Args[0]
 15936  			if z.Op != ssaop.OpPPC64OR {
 15937  				break
 15938  			}
 15939  			_ = z.Args[1]
 15940  			z_0 := z.Args[0]
 15941  			z_1 := z.Args[1]
 15942  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 15943  				x := z_0
 15944  				y := z_1
 15945  				if !(z.Uses == 1) {
 15946  					continue
 15947  				}
 15948  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 15949  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 15950  				v1.AddArg2(x, y)
 15951  				v0.AddArg(v1)
 15952  				b.ResetWithControl(block.BlockPPC64GE, v0)
 15953  				return true
 15954  			}
 15955  			break
 15956  		}
 15957  		// match: (GE (CMPconst [0] z:(XOR x y)) yes no)
 15958  		// cond: z.Uses == 1
 15959  		// result: (GE (Select1 <types.TypeFlags> (XORCC x y)) yes no)
 15960  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 15961  			v_0 := b.Controls[0]
 15962  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 15963  				break
 15964  			}
 15965  			z := v_0.Args[0]
 15966  			if z.Op != ssaop.OpPPC64XOR {
 15967  				break
 15968  			}
 15969  			_ = z.Args[1]
 15970  			z_0 := z.Args[0]
 15971  			z_1 := z.Args[1]
 15972  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 15973  				x := z_0
 15974  				y := z_1
 15975  				if !(z.Uses == 1) {
 15976  					continue
 15977  				}
 15978  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 15979  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 15980  				v1.AddArg2(x, y)
 15981  				v0.AddArg(v1)
 15982  				b.ResetWithControl(block.BlockPPC64GE, v0)
 15983  				return true
 15984  			}
 15985  			break
 15986  		}
 15987  	case block.BlockPPC64GT:
 15988  		// match: (GT (FlagEQ) yes no)
 15989  		// result: (First no yes)
 15990  		for b.Controls[0].Op == ssaop.OpPPC64FlagEQ {
 15991  			b.Reset(block.BlockFirst)
 15992  			b.SwapSuccessors()
 15993  			return true
 15994  		}
 15995  		// match: (GT (FlagLT) yes no)
 15996  		// result: (First no yes)
 15997  		for b.Controls[0].Op == ssaop.OpPPC64FlagLT {
 15998  			b.Reset(block.BlockFirst)
 15999  			b.SwapSuccessors()
 16000  			return true
 16001  		}
 16002  		// match: (GT (FlagGT) yes no)
 16003  		// result: (First yes no)
 16004  		for b.Controls[0].Op == ssaop.OpPPC64FlagGT {
 16005  			b.Reset(block.BlockFirst)
 16006  			return true
 16007  		}
 16008  		// match: (GT (InvertFlags cmp) yes no)
 16009  		// result: (LT cmp yes no)
 16010  		for b.Controls[0].Op == ssaop.OpPPC64InvertFlags {
 16011  			v_0 := b.Controls[0]
 16012  			cmp := v_0.Args[0]
 16013  			b.ResetWithControl(block.BlockPPC64LT, cmp)
 16014  			return true
 16015  		}
 16016  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 16017  		// cond: z.Uses == 1
 16018  		// result: (GT (Select1 <types.TypeFlags> (ANDCC x y)) yes no)
 16019  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16020  			v_0 := b.Controls[0]
 16021  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16022  				break
 16023  			}
 16024  			z := v_0.Args[0]
 16025  			if z.Op != ssaop.OpPPC64AND {
 16026  				break
 16027  			}
 16028  			_ = z.Args[1]
 16029  			z_0 := z.Args[0]
 16030  			z_1 := z.Args[1]
 16031  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16032  				x := z_0
 16033  				y := z_1
 16034  				if !(z.Uses == 1) {
 16035  					continue
 16036  				}
 16037  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16038  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 16039  				v1.AddArg2(x, y)
 16040  				v0.AddArg(v1)
 16041  				b.ResetWithControl(block.BlockPPC64GT, v0)
 16042  				return true
 16043  			}
 16044  			break
 16045  		}
 16046  		// match: (GT (CMPconst [0] z:(OR x y)) yes no)
 16047  		// cond: z.Uses == 1
 16048  		// result: (GT (Select1 <types.TypeFlags> (ORCC x y)) yes no)
 16049  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16050  			v_0 := b.Controls[0]
 16051  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16052  				break
 16053  			}
 16054  			z := v_0.Args[0]
 16055  			if z.Op != ssaop.OpPPC64OR {
 16056  				break
 16057  			}
 16058  			_ = z.Args[1]
 16059  			z_0 := z.Args[0]
 16060  			z_1 := z.Args[1]
 16061  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16062  				x := z_0
 16063  				y := z_1
 16064  				if !(z.Uses == 1) {
 16065  					continue
 16066  				}
 16067  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16068  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16069  				v1.AddArg2(x, y)
 16070  				v0.AddArg(v1)
 16071  				b.ResetWithControl(block.BlockPPC64GT, v0)
 16072  				return true
 16073  			}
 16074  			break
 16075  		}
 16076  		// match: (GT (CMPconst [0] z:(XOR x y)) yes no)
 16077  		// cond: z.Uses == 1
 16078  		// result: (GT (Select1 <types.TypeFlags> (XORCC x y)) yes no)
 16079  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16080  			v_0 := b.Controls[0]
 16081  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16082  				break
 16083  			}
 16084  			z := v_0.Args[0]
 16085  			if z.Op != ssaop.OpPPC64XOR {
 16086  				break
 16087  			}
 16088  			_ = z.Args[1]
 16089  			z_0 := z.Args[0]
 16090  			z_1 := z.Args[1]
 16091  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16092  				x := z_0
 16093  				y := z_1
 16094  				if !(z.Uses == 1) {
 16095  					continue
 16096  				}
 16097  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16098  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16099  				v1.AddArg2(x, y)
 16100  				v0.AddArg(v1)
 16101  				b.ResetWithControl(block.BlockPPC64GT, v0)
 16102  				return true
 16103  			}
 16104  			break
 16105  		}
 16106  	case block.BlockIf:
 16107  		// match: (If (Equal cc) yes no)
 16108  		// result: (EQ cc yes no)
 16109  		for b.Controls[0].Op == ssaop.OpPPC64Equal {
 16110  			v_0 := b.Controls[0]
 16111  			cc := v_0.Args[0]
 16112  			b.ResetWithControl(block.BlockPPC64EQ, cc)
 16113  			return true
 16114  		}
 16115  		// match: (If (NotEqual cc) yes no)
 16116  		// result: (NE cc yes no)
 16117  		for b.Controls[0].Op == ssaop.OpPPC64NotEqual {
 16118  			v_0 := b.Controls[0]
 16119  			cc := v_0.Args[0]
 16120  			b.ResetWithControl(block.BlockPPC64NE, cc)
 16121  			return true
 16122  		}
 16123  		// match: (If (LessThan cc) yes no)
 16124  		// result: (LT cc yes no)
 16125  		for b.Controls[0].Op == ssaop.OpPPC64LessThan {
 16126  			v_0 := b.Controls[0]
 16127  			cc := v_0.Args[0]
 16128  			b.ResetWithControl(block.BlockPPC64LT, cc)
 16129  			return true
 16130  		}
 16131  		// match: (If (LessEqual cc) yes no)
 16132  		// result: (LE cc yes no)
 16133  		for b.Controls[0].Op == ssaop.OpPPC64LessEqual {
 16134  			v_0 := b.Controls[0]
 16135  			cc := v_0.Args[0]
 16136  			b.ResetWithControl(block.BlockPPC64LE, cc)
 16137  			return true
 16138  		}
 16139  		// match: (If (GreaterThan cc) yes no)
 16140  		// result: (GT cc yes no)
 16141  		for b.Controls[0].Op == ssaop.OpPPC64GreaterThan {
 16142  			v_0 := b.Controls[0]
 16143  			cc := v_0.Args[0]
 16144  			b.ResetWithControl(block.BlockPPC64GT, cc)
 16145  			return true
 16146  		}
 16147  		// match: (If (GreaterEqual cc) yes no)
 16148  		// result: (GE cc yes no)
 16149  		for b.Controls[0].Op == ssaop.OpPPC64GreaterEqual {
 16150  			v_0 := b.Controls[0]
 16151  			cc := v_0.Args[0]
 16152  			b.ResetWithControl(block.BlockPPC64GE, cc)
 16153  			return true
 16154  		}
 16155  		// match: (If (FLessThan cc) yes no)
 16156  		// result: (FLT cc yes no)
 16157  		for b.Controls[0].Op == ssaop.OpPPC64FLessThan {
 16158  			v_0 := b.Controls[0]
 16159  			cc := v_0.Args[0]
 16160  			b.ResetWithControl(block.BlockPPC64FLT, cc)
 16161  			return true
 16162  		}
 16163  		// match: (If (FLessEqual cc) yes no)
 16164  		// result: (FLE cc yes no)
 16165  		for b.Controls[0].Op == ssaop.OpPPC64FLessEqual {
 16166  			v_0 := b.Controls[0]
 16167  			cc := v_0.Args[0]
 16168  			b.ResetWithControl(block.BlockPPC64FLE, cc)
 16169  			return true
 16170  		}
 16171  		// match: (If (FGreaterThan cc) yes no)
 16172  		// result: (FGT cc yes no)
 16173  		for b.Controls[0].Op == ssaop.OpPPC64FGreaterThan {
 16174  			v_0 := b.Controls[0]
 16175  			cc := v_0.Args[0]
 16176  			b.ResetWithControl(block.BlockPPC64FGT, cc)
 16177  			return true
 16178  		}
 16179  		// match: (If (FGreaterEqual cc) yes no)
 16180  		// result: (FGE cc yes no)
 16181  		for b.Controls[0].Op == ssaop.OpPPC64FGreaterEqual {
 16182  			v_0 := b.Controls[0]
 16183  			cc := v_0.Args[0]
 16184  			b.ResetWithControl(block.BlockPPC64FGE, cc)
 16185  			return true
 16186  		}
 16187  		// match: (If cond yes no)
 16188  		// result: (NE (CMPconst [0] (ANDconst [1] cond)) yes no)
 16189  		for {
 16190  			cond := b.Controls[0]
 16191  			v0 := b.NewValue0(cond.Pos, ssaop.OpPPC64CMPconst, types.TypeFlags)
 16192  			v0.AuxInt = ssa.Int64ToAuxInt(0)
 16193  			v1 := b.NewValue0(cond.Pos, ssaop.OpPPC64ANDconst, typ.Int)
 16194  			v1.AuxInt = ssa.Int64ToAuxInt(1)
 16195  			v1.AddArg(cond)
 16196  			v0.AddArg(v1)
 16197  			b.ResetWithControl(block.BlockPPC64NE, v0)
 16198  			return true
 16199  		}
 16200  	case block.BlockPPC64LE:
 16201  		// match: (LE (FlagEQ) yes no)
 16202  		// result: (First yes no)
 16203  		for b.Controls[0].Op == ssaop.OpPPC64FlagEQ {
 16204  			b.Reset(block.BlockFirst)
 16205  			return true
 16206  		}
 16207  		// match: (LE (FlagLT) yes no)
 16208  		// result: (First yes no)
 16209  		for b.Controls[0].Op == ssaop.OpPPC64FlagLT {
 16210  			b.Reset(block.BlockFirst)
 16211  			return true
 16212  		}
 16213  		// match: (LE (FlagGT) yes no)
 16214  		// result: (First no yes)
 16215  		for b.Controls[0].Op == ssaop.OpPPC64FlagGT {
 16216  			b.Reset(block.BlockFirst)
 16217  			b.SwapSuccessors()
 16218  			return true
 16219  		}
 16220  		// match: (LE (InvertFlags cmp) yes no)
 16221  		// result: (GE cmp yes no)
 16222  		for b.Controls[0].Op == ssaop.OpPPC64InvertFlags {
 16223  			v_0 := b.Controls[0]
 16224  			cmp := v_0.Args[0]
 16225  			b.ResetWithControl(block.BlockPPC64GE, cmp)
 16226  			return true
 16227  		}
 16228  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 16229  		// cond: z.Uses == 1
 16230  		// result: (LE (Select1 <types.TypeFlags> (ANDCC x y)) yes no)
 16231  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16232  			v_0 := b.Controls[0]
 16233  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16234  				break
 16235  			}
 16236  			z := v_0.Args[0]
 16237  			if z.Op != ssaop.OpPPC64AND {
 16238  				break
 16239  			}
 16240  			_ = z.Args[1]
 16241  			z_0 := z.Args[0]
 16242  			z_1 := z.Args[1]
 16243  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16244  				x := z_0
 16245  				y := z_1
 16246  				if !(z.Uses == 1) {
 16247  					continue
 16248  				}
 16249  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16250  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 16251  				v1.AddArg2(x, y)
 16252  				v0.AddArg(v1)
 16253  				b.ResetWithControl(block.BlockPPC64LE, v0)
 16254  				return true
 16255  			}
 16256  			break
 16257  		}
 16258  		// match: (LE (CMPconst [0] z:(OR x y)) yes no)
 16259  		// cond: z.Uses == 1
 16260  		// result: (LE (Select1 <types.TypeFlags> (ORCC x y)) yes no)
 16261  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16262  			v_0 := b.Controls[0]
 16263  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16264  				break
 16265  			}
 16266  			z := v_0.Args[0]
 16267  			if z.Op != ssaop.OpPPC64OR {
 16268  				break
 16269  			}
 16270  			_ = z.Args[1]
 16271  			z_0 := z.Args[0]
 16272  			z_1 := z.Args[1]
 16273  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16274  				x := z_0
 16275  				y := z_1
 16276  				if !(z.Uses == 1) {
 16277  					continue
 16278  				}
 16279  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16280  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16281  				v1.AddArg2(x, y)
 16282  				v0.AddArg(v1)
 16283  				b.ResetWithControl(block.BlockPPC64LE, v0)
 16284  				return true
 16285  			}
 16286  			break
 16287  		}
 16288  		// match: (LE (CMPconst [0] z:(XOR x y)) yes no)
 16289  		// cond: z.Uses == 1
 16290  		// result: (LE (Select1 <types.TypeFlags> (XORCC x y)) yes no)
 16291  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16292  			v_0 := b.Controls[0]
 16293  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16294  				break
 16295  			}
 16296  			z := v_0.Args[0]
 16297  			if z.Op != ssaop.OpPPC64XOR {
 16298  				break
 16299  			}
 16300  			_ = z.Args[1]
 16301  			z_0 := z.Args[0]
 16302  			z_1 := z.Args[1]
 16303  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16304  				x := z_0
 16305  				y := z_1
 16306  				if !(z.Uses == 1) {
 16307  					continue
 16308  				}
 16309  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16310  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16311  				v1.AddArg2(x, y)
 16312  				v0.AddArg(v1)
 16313  				b.ResetWithControl(block.BlockPPC64LE, v0)
 16314  				return true
 16315  			}
 16316  			break
 16317  		}
 16318  	case block.BlockPPC64LT:
 16319  		// match: (LT (FlagEQ) yes no)
 16320  		// result: (First no yes)
 16321  		for b.Controls[0].Op == ssaop.OpPPC64FlagEQ {
 16322  			b.Reset(block.BlockFirst)
 16323  			b.SwapSuccessors()
 16324  			return true
 16325  		}
 16326  		// match: (LT (FlagLT) yes no)
 16327  		// result: (First yes no)
 16328  		for b.Controls[0].Op == ssaop.OpPPC64FlagLT {
 16329  			b.Reset(block.BlockFirst)
 16330  			return true
 16331  		}
 16332  		// match: (LT (FlagGT) yes no)
 16333  		// result: (First no yes)
 16334  		for b.Controls[0].Op == ssaop.OpPPC64FlagGT {
 16335  			b.Reset(block.BlockFirst)
 16336  			b.SwapSuccessors()
 16337  			return true
 16338  		}
 16339  		// match: (LT (InvertFlags cmp) yes no)
 16340  		// result: (GT cmp yes no)
 16341  		for b.Controls[0].Op == ssaop.OpPPC64InvertFlags {
 16342  			v_0 := b.Controls[0]
 16343  			cmp := v_0.Args[0]
 16344  			b.ResetWithControl(block.BlockPPC64GT, cmp)
 16345  			return true
 16346  		}
 16347  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 16348  		// cond: z.Uses == 1
 16349  		// result: (LT (Select1 <types.TypeFlags> (ANDCC x y)) yes no)
 16350  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16351  			v_0 := b.Controls[0]
 16352  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16353  				break
 16354  			}
 16355  			z := v_0.Args[0]
 16356  			if z.Op != ssaop.OpPPC64AND {
 16357  				break
 16358  			}
 16359  			_ = z.Args[1]
 16360  			z_0 := z.Args[0]
 16361  			z_1 := z.Args[1]
 16362  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16363  				x := z_0
 16364  				y := z_1
 16365  				if !(z.Uses == 1) {
 16366  					continue
 16367  				}
 16368  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16369  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 16370  				v1.AddArg2(x, y)
 16371  				v0.AddArg(v1)
 16372  				b.ResetWithControl(block.BlockPPC64LT, v0)
 16373  				return true
 16374  			}
 16375  			break
 16376  		}
 16377  		// match: (LT (CMPconst [0] z:(OR x y)) yes no)
 16378  		// cond: z.Uses == 1
 16379  		// result: (LT (Select1 <types.TypeFlags> (ORCC x y)) yes no)
 16380  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16381  			v_0 := b.Controls[0]
 16382  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16383  				break
 16384  			}
 16385  			z := v_0.Args[0]
 16386  			if z.Op != ssaop.OpPPC64OR {
 16387  				break
 16388  			}
 16389  			_ = z.Args[1]
 16390  			z_0 := z.Args[0]
 16391  			z_1 := z.Args[1]
 16392  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16393  				x := z_0
 16394  				y := z_1
 16395  				if !(z.Uses == 1) {
 16396  					continue
 16397  				}
 16398  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16399  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16400  				v1.AddArg2(x, y)
 16401  				v0.AddArg(v1)
 16402  				b.ResetWithControl(block.BlockPPC64LT, v0)
 16403  				return true
 16404  			}
 16405  			break
 16406  		}
 16407  		// match: (LT (CMPconst [0] z:(XOR x y)) yes no)
 16408  		// cond: z.Uses == 1
 16409  		// result: (LT (Select1 <types.TypeFlags> (XORCC x y)) yes no)
 16410  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16411  			v_0 := b.Controls[0]
 16412  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16413  				break
 16414  			}
 16415  			z := v_0.Args[0]
 16416  			if z.Op != ssaop.OpPPC64XOR {
 16417  				break
 16418  			}
 16419  			_ = z.Args[1]
 16420  			z_0 := z.Args[0]
 16421  			z_1 := z.Args[1]
 16422  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16423  				x := z_0
 16424  				y := z_1
 16425  				if !(z.Uses == 1) {
 16426  					continue
 16427  				}
 16428  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16429  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16430  				v1.AddArg2(x, y)
 16431  				v0.AddArg(v1)
 16432  				b.ResetWithControl(block.BlockPPC64LT, v0)
 16433  				return true
 16434  			}
 16435  			break
 16436  		}
 16437  	case block.BlockPPC64NE:
 16438  		// match: (NE (CMPconst [0] (ANDconst [1] (Equal cc))) yes no)
 16439  		// result: (EQ cc yes no)
 16440  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16441  			v_0 := b.Controls[0]
 16442  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16443  				break
 16444  			}
 16445  			v_0_0 := v_0.Args[0]
 16446  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16447  				break
 16448  			}
 16449  			v_0_0_0 := v_0_0.Args[0]
 16450  			if v_0_0_0.Op != ssaop.OpPPC64Equal {
 16451  				break
 16452  			}
 16453  			cc := v_0_0_0.Args[0]
 16454  			b.ResetWithControl(block.BlockPPC64EQ, cc)
 16455  			return true
 16456  		}
 16457  		// match: (NE (CMPconst [0] (ANDconst [1] (NotEqual cc))) yes no)
 16458  		// result: (NE cc yes no)
 16459  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16460  			v_0 := b.Controls[0]
 16461  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16462  				break
 16463  			}
 16464  			v_0_0 := v_0.Args[0]
 16465  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16466  				break
 16467  			}
 16468  			v_0_0_0 := v_0_0.Args[0]
 16469  			if v_0_0_0.Op != ssaop.OpPPC64NotEqual {
 16470  				break
 16471  			}
 16472  			cc := v_0_0_0.Args[0]
 16473  			b.ResetWithControl(block.BlockPPC64NE, cc)
 16474  			return true
 16475  		}
 16476  		// match: (NE (CMPconst [0] (ANDconst [1] (LessThan cc))) yes no)
 16477  		// result: (LT cc yes no)
 16478  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16479  			v_0 := b.Controls[0]
 16480  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16481  				break
 16482  			}
 16483  			v_0_0 := v_0.Args[0]
 16484  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16485  				break
 16486  			}
 16487  			v_0_0_0 := v_0_0.Args[0]
 16488  			if v_0_0_0.Op != ssaop.OpPPC64LessThan {
 16489  				break
 16490  			}
 16491  			cc := v_0_0_0.Args[0]
 16492  			b.ResetWithControl(block.BlockPPC64LT, cc)
 16493  			return true
 16494  		}
 16495  		// match: (NE (CMPconst [0] (ANDconst [1] (LessEqual cc))) yes no)
 16496  		// result: (LE cc yes no)
 16497  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16498  			v_0 := b.Controls[0]
 16499  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16500  				break
 16501  			}
 16502  			v_0_0 := v_0.Args[0]
 16503  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16504  				break
 16505  			}
 16506  			v_0_0_0 := v_0_0.Args[0]
 16507  			if v_0_0_0.Op != ssaop.OpPPC64LessEqual {
 16508  				break
 16509  			}
 16510  			cc := v_0_0_0.Args[0]
 16511  			b.ResetWithControl(block.BlockPPC64LE, cc)
 16512  			return true
 16513  		}
 16514  		// match: (NE (CMPconst [0] (ANDconst [1] (GreaterThan cc))) yes no)
 16515  		// result: (GT cc yes no)
 16516  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16517  			v_0 := b.Controls[0]
 16518  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16519  				break
 16520  			}
 16521  			v_0_0 := v_0.Args[0]
 16522  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16523  				break
 16524  			}
 16525  			v_0_0_0 := v_0_0.Args[0]
 16526  			if v_0_0_0.Op != ssaop.OpPPC64GreaterThan {
 16527  				break
 16528  			}
 16529  			cc := v_0_0_0.Args[0]
 16530  			b.ResetWithControl(block.BlockPPC64GT, cc)
 16531  			return true
 16532  		}
 16533  		// match: (NE (CMPconst [0] (ANDconst [1] (GreaterEqual cc))) yes no)
 16534  		// result: (GE cc yes no)
 16535  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16536  			v_0 := b.Controls[0]
 16537  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16538  				break
 16539  			}
 16540  			v_0_0 := v_0.Args[0]
 16541  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16542  				break
 16543  			}
 16544  			v_0_0_0 := v_0_0.Args[0]
 16545  			if v_0_0_0.Op != ssaop.OpPPC64GreaterEqual {
 16546  				break
 16547  			}
 16548  			cc := v_0_0_0.Args[0]
 16549  			b.ResetWithControl(block.BlockPPC64GE, cc)
 16550  			return true
 16551  		}
 16552  		// match: (NE (CMPconst [0] (ANDconst [1] (FLessThan cc))) yes no)
 16553  		// result: (FLT cc yes no)
 16554  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16555  			v_0 := b.Controls[0]
 16556  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16557  				break
 16558  			}
 16559  			v_0_0 := v_0.Args[0]
 16560  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16561  				break
 16562  			}
 16563  			v_0_0_0 := v_0_0.Args[0]
 16564  			if v_0_0_0.Op != ssaop.OpPPC64FLessThan {
 16565  				break
 16566  			}
 16567  			cc := v_0_0_0.Args[0]
 16568  			b.ResetWithControl(block.BlockPPC64FLT, cc)
 16569  			return true
 16570  		}
 16571  		// match: (NE (CMPconst [0] (ANDconst [1] (FLessEqual cc))) yes no)
 16572  		// result: (FLE cc yes no)
 16573  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16574  			v_0 := b.Controls[0]
 16575  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16576  				break
 16577  			}
 16578  			v_0_0 := v_0.Args[0]
 16579  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16580  				break
 16581  			}
 16582  			v_0_0_0 := v_0_0.Args[0]
 16583  			if v_0_0_0.Op != ssaop.OpPPC64FLessEqual {
 16584  				break
 16585  			}
 16586  			cc := v_0_0_0.Args[0]
 16587  			b.ResetWithControl(block.BlockPPC64FLE, cc)
 16588  			return true
 16589  		}
 16590  		// match: (NE (CMPconst [0] (ANDconst [1] (FGreaterThan cc))) yes no)
 16591  		// result: (FGT cc yes no)
 16592  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16593  			v_0 := b.Controls[0]
 16594  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16595  				break
 16596  			}
 16597  			v_0_0 := v_0.Args[0]
 16598  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16599  				break
 16600  			}
 16601  			v_0_0_0 := v_0_0.Args[0]
 16602  			if v_0_0_0.Op != ssaop.OpPPC64FGreaterThan {
 16603  				break
 16604  			}
 16605  			cc := v_0_0_0.Args[0]
 16606  			b.ResetWithControl(block.BlockPPC64FGT, cc)
 16607  			return true
 16608  		}
 16609  		// match: (NE (CMPconst [0] (ANDconst [1] (FGreaterEqual cc))) yes no)
 16610  		// result: (FGE cc yes no)
 16611  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16612  			v_0 := b.Controls[0]
 16613  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16614  				break
 16615  			}
 16616  			v_0_0 := v_0.Args[0]
 16617  			if v_0_0.Op != ssaop.OpPPC64ANDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 1 {
 16618  				break
 16619  			}
 16620  			v_0_0_0 := v_0_0.Args[0]
 16621  			if v_0_0_0.Op != ssaop.OpPPC64FGreaterEqual {
 16622  				break
 16623  			}
 16624  			cc := v_0_0_0.Args[0]
 16625  			b.ResetWithControl(block.BlockPPC64FGE, cc)
 16626  			return true
 16627  		}
 16628  		// match: (NE (FlagEQ) yes no)
 16629  		// result: (First no yes)
 16630  		for b.Controls[0].Op == ssaop.OpPPC64FlagEQ {
 16631  			b.Reset(block.BlockFirst)
 16632  			b.SwapSuccessors()
 16633  			return true
 16634  		}
 16635  		// match: (NE (FlagLT) yes no)
 16636  		// result: (First yes no)
 16637  		for b.Controls[0].Op == ssaop.OpPPC64FlagLT {
 16638  			b.Reset(block.BlockFirst)
 16639  			return true
 16640  		}
 16641  		// match: (NE (FlagGT) yes no)
 16642  		// result: (First yes no)
 16643  		for b.Controls[0].Op == ssaop.OpPPC64FlagGT {
 16644  			b.Reset(block.BlockFirst)
 16645  			return true
 16646  		}
 16647  		// match: (NE (InvertFlags cmp) yes no)
 16648  		// result: (NE cmp yes no)
 16649  		for b.Controls[0].Op == ssaop.OpPPC64InvertFlags {
 16650  			v_0 := b.Controls[0]
 16651  			cmp := v_0.Args[0]
 16652  			b.ResetWithControl(block.BlockPPC64NE, cmp)
 16653  			return true
 16654  		}
 16655  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 16656  		// cond: z.Uses == 1
 16657  		// result: (NE (Select1 <types.TypeFlags> (ANDCC x y)) yes no)
 16658  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16659  			v_0 := b.Controls[0]
 16660  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16661  				break
 16662  			}
 16663  			z := v_0.Args[0]
 16664  			if z.Op != ssaop.OpPPC64AND {
 16665  				break
 16666  			}
 16667  			_ = z.Args[1]
 16668  			z_0 := z.Args[0]
 16669  			z_1 := z.Args[1]
 16670  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16671  				x := z_0
 16672  				y := z_1
 16673  				if !(z.Uses == 1) {
 16674  					continue
 16675  				}
 16676  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16677  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ANDCC, types.NewTuple(typ.Int64, types.TypeFlags))
 16678  				v1.AddArg2(x, y)
 16679  				v0.AddArg(v1)
 16680  				b.ResetWithControl(block.BlockPPC64NE, v0)
 16681  				return true
 16682  			}
 16683  			break
 16684  		}
 16685  		// match: (NE (CMPconst [0] z:(OR x y)) yes no)
 16686  		// cond: z.Uses == 1
 16687  		// result: (NE (Select1 <types.TypeFlags> (ORCC x y)) yes no)
 16688  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16689  			v_0 := b.Controls[0]
 16690  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16691  				break
 16692  			}
 16693  			z := v_0.Args[0]
 16694  			if z.Op != ssaop.OpPPC64OR {
 16695  				break
 16696  			}
 16697  			_ = z.Args[1]
 16698  			z_0 := z.Args[0]
 16699  			z_1 := z.Args[1]
 16700  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16701  				x := z_0
 16702  				y := z_1
 16703  				if !(z.Uses == 1) {
 16704  					continue
 16705  				}
 16706  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16707  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64ORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16708  				v1.AddArg2(x, y)
 16709  				v0.AddArg(v1)
 16710  				b.ResetWithControl(block.BlockPPC64NE, v0)
 16711  				return true
 16712  			}
 16713  			break
 16714  		}
 16715  		// match: (NE (CMPconst [0] z:(XOR x y)) yes no)
 16716  		// cond: z.Uses == 1
 16717  		// result: (NE (Select1 <types.TypeFlags> (XORCC x y)) yes no)
 16718  		for b.Controls[0].Op == ssaop.OpPPC64CMPconst {
 16719  			v_0 := b.Controls[0]
 16720  			if ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
 16721  				break
 16722  			}
 16723  			z := v_0.Args[0]
 16724  			if z.Op != ssaop.OpPPC64XOR {
 16725  				break
 16726  			}
 16727  			_ = z.Args[1]
 16728  			z_0 := z.Args[0]
 16729  			z_1 := z.Args[1]
 16730  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 16731  				x := z_0
 16732  				y := z_1
 16733  				if !(z.Uses == 1) {
 16734  					continue
 16735  				}
 16736  				v0 := b.NewValue0(v_0.Pos, ssaop.OpSelect1, types.TypeFlags)
 16737  				v1 := b.NewValue0(v_0.Pos, ssaop.OpPPC64XORCC, types.NewTuple(typ.Int, types.TypeFlags))
 16738  				v1.AddArg2(x, y)
 16739  				v0.AddArg(v1)
 16740  				b.ResetWithControl(block.BlockPPC64NE, v0)
 16741  				return true
 16742  			}
 16743  			break
 16744  		}
 16745  	}
 16746  	return false
 16747  }
 16748  

View as plain text