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

     1  // Code generated from gen/PPC64.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "internal/buildcfg"
     7  import "math"
     8  import "cmd/compile/internal/types"
     9  
    10  func rewriteValuePPC64(v *Value) bool {
    11  	switch v.Op {
    12  	case OpAbs:
    13  		v.Op = OpPPC64FABS
    14  		return true
    15  	case OpAdd16:
    16  		v.Op = OpPPC64ADD
    17  		return true
    18  	case OpAdd32:
    19  		v.Op = OpPPC64ADD
    20  		return true
    21  	case OpAdd32F:
    22  		v.Op = OpPPC64FADDS
    23  		return true
    24  	case OpAdd64:
    25  		v.Op = OpPPC64ADD
    26  		return true
    27  	case OpAdd64F:
    28  		v.Op = OpPPC64FADD
    29  		return true
    30  	case OpAdd64carry:
    31  		v.Op = OpPPC64LoweredAdd64Carry
    32  		return true
    33  	case OpAdd8:
    34  		v.Op = OpPPC64ADD
    35  		return true
    36  	case OpAddPtr:
    37  		v.Op = OpPPC64ADD
    38  		return true
    39  	case OpAddr:
    40  		return rewriteValuePPC64_OpAddr(v)
    41  	case OpAnd16:
    42  		v.Op = OpPPC64AND
    43  		return true
    44  	case OpAnd32:
    45  		v.Op = OpPPC64AND
    46  		return true
    47  	case OpAnd64:
    48  		v.Op = OpPPC64AND
    49  		return true
    50  	case OpAnd8:
    51  		v.Op = OpPPC64AND
    52  		return true
    53  	case OpAndB:
    54  		v.Op = OpPPC64AND
    55  		return true
    56  	case OpAtomicAdd32:
    57  		v.Op = OpPPC64LoweredAtomicAdd32
    58  		return true
    59  	case OpAtomicAdd64:
    60  		v.Op = OpPPC64LoweredAtomicAdd64
    61  		return true
    62  	case OpAtomicAnd32:
    63  		v.Op = OpPPC64LoweredAtomicAnd32
    64  		return true
    65  	case OpAtomicAnd8:
    66  		v.Op = OpPPC64LoweredAtomicAnd8
    67  		return true
    68  	case OpAtomicCompareAndSwap32:
    69  		return rewriteValuePPC64_OpAtomicCompareAndSwap32(v)
    70  	case OpAtomicCompareAndSwap64:
    71  		return rewriteValuePPC64_OpAtomicCompareAndSwap64(v)
    72  	case OpAtomicCompareAndSwapRel32:
    73  		return rewriteValuePPC64_OpAtomicCompareAndSwapRel32(v)
    74  	case OpAtomicExchange32:
    75  		v.Op = OpPPC64LoweredAtomicExchange32
    76  		return true
    77  	case OpAtomicExchange64:
    78  		v.Op = OpPPC64LoweredAtomicExchange64
    79  		return true
    80  	case OpAtomicLoad32:
    81  		return rewriteValuePPC64_OpAtomicLoad32(v)
    82  	case OpAtomicLoad64:
    83  		return rewriteValuePPC64_OpAtomicLoad64(v)
    84  	case OpAtomicLoad8:
    85  		return rewriteValuePPC64_OpAtomicLoad8(v)
    86  	case OpAtomicLoadAcq32:
    87  		return rewriteValuePPC64_OpAtomicLoadAcq32(v)
    88  	case OpAtomicLoadAcq64:
    89  		return rewriteValuePPC64_OpAtomicLoadAcq64(v)
    90  	case OpAtomicLoadPtr:
    91  		return rewriteValuePPC64_OpAtomicLoadPtr(v)
    92  	case OpAtomicOr32:
    93  		v.Op = OpPPC64LoweredAtomicOr32
    94  		return true
    95  	case OpAtomicOr8:
    96  		v.Op = OpPPC64LoweredAtomicOr8
    97  		return true
    98  	case OpAtomicStore32:
    99  		return rewriteValuePPC64_OpAtomicStore32(v)
   100  	case OpAtomicStore64:
   101  		return rewriteValuePPC64_OpAtomicStore64(v)
   102  	case OpAtomicStore8:
   103  		return rewriteValuePPC64_OpAtomicStore8(v)
   104  	case OpAtomicStoreRel32:
   105  		return rewriteValuePPC64_OpAtomicStoreRel32(v)
   106  	case OpAtomicStoreRel64:
   107  		return rewriteValuePPC64_OpAtomicStoreRel64(v)
   108  	case OpAvg64u:
   109  		return rewriteValuePPC64_OpAvg64u(v)
   110  	case OpBitLen32:
   111  		return rewriteValuePPC64_OpBitLen32(v)
   112  	case OpBitLen64:
   113  		return rewriteValuePPC64_OpBitLen64(v)
   114  	case OpCeil:
   115  		v.Op = OpPPC64FCEIL
   116  		return true
   117  	case OpClosureCall:
   118  		v.Op = OpPPC64CALLclosure
   119  		return true
   120  	case OpCom16:
   121  		return rewriteValuePPC64_OpCom16(v)
   122  	case OpCom32:
   123  		return rewriteValuePPC64_OpCom32(v)
   124  	case OpCom64:
   125  		return rewriteValuePPC64_OpCom64(v)
   126  	case OpCom8:
   127  		return rewriteValuePPC64_OpCom8(v)
   128  	case OpCondSelect:
   129  		return rewriteValuePPC64_OpCondSelect(v)
   130  	case OpConst16:
   131  		return rewriteValuePPC64_OpConst16(v)
   132  	case OpConst32:
   133  		return rewriteValuePPC64_OpConst32(v)
   134  	case OpConst32F:
   135  		v.Op = OpPPC64FMOVSconst
   136  		return true
   137  	case OpConst64:
   138  		return rewriteValuePPC64_OpConst64(v)
   139  	case OpConst64F:
   140  		v.Op = OpPPC64FMOVDconst
   141  		return true
   142  	case OpConst8:
   143  		return rewriteValuePPC64_OpConst8(v)
   144  	case OpConstBool:
   145  		return rewriteValuePPC64_OpConstBool(v)
   146  	case OpConstNil:
   147  		return rewriteValuePPC64_OpConstNil(v)
   148  	case OpCopysign:
   149  		return rewriteValuePPC64_OpCopysign(v)
   150  	case OpCtz16:
   151  		return rewriteValuePPC64_OpCtz16(v)
   152  	case OpCtz32:
   153  		return rewriteValuePPC64_OpCtz32(v)
   154  	case OpCtz32NonZero:
   155  		v.Op = OpCtz32
   156  		return true
   157  	case OpCtz64:
   158  		return rewriteValuePPC64_OpCtz64(v)
   159  	case OpCtz64NonZero:
   160  		v.Op = OpCtz64
   161  		return true
   162  	case OpCtz8:
   163  		return rewriteValuePPC64_OpCtz8(v)
   164  	case OpCvt32Fto32:
   165  		return rewriteValuePPC64_OpCvt32Fto32(v)
   166  	case OpCvt32Fto64:
   167  		return rewriteValuePPC64_OpCvt32Fto64(v)
   168  	case OpCvt32Fto64F:
   169  		v.Op = OpCopy
   170  		return true
   171  	case OpCvt32to32F:
   172  		return rewriteValuePPC64_OpCvt32to32F(v)
   173  	case OpCvt32to64F:
   174  		return rewriteValuePPC64_OpCvt32to64F(v)
   175  	case OpCvt64Fto32:
   176  		return rewriteValuePPC64_OpCvt64Fto32(v)
   177  	case OpCvt64Fto32F:
   178  		v.Op = OpPPC64FRSP
   179  		return true
   180  	case OpCvt64Fto64:
   181  		return rewriteValuePPC64_OpCvt64Fto64(v)
   182  	case OpCvt64to32F:
   183  		return rewriteValuePPC64_OpCvt64to32F(v)
   184  	case OpCvt64to64F:
   185  		return rewriteValuePPC64_OpCvt64to64F(v)
   186  	case OpCvtBoolToUint8:
   187  		v.Op = OpCopy
   188  		return true
   189  	case OpDiv16:
   190  		return rewriteValuePPC64_OpDiv16(v)
   191  	case OpDiv16u:
   192  		return rewriteValuePPC64_OpDiv16u(v)
   193  	case OpDiv32:
   194  		return rewriteValuePPC64_OpDiv32(v)
   195  	case OpDiv32F:
   196  		v.Op = OpPPC64FDIVS
   197  		return true
   198  	case OpDiv32u:
   199  		v.Op = OpPPC64DIVWU
   200  		return true
   201  	case OpDiv64:
   202  		return rewriteValuePPC64_OpDiv64(v)
   203  	case OpDiv64F:
   204  		v.Op = OpPPC64FDIV
   205  		return true
   206  	case OpDiv64u:
   207  		v.Op = OpPPC64DIVDU
   208  		return true
   209  	case OpDiv8:
   210  		return rewriteValuePPC64_OpDiv8(v)
   211  	case OpDiv8u:
   212  		return rewriteValuePPC64_OpDiv8u(v)
   213  	case OpEq16:
   214  		return rewriteValuePPC64_OpEq16(v)
   215  	case OpEq32:
   216  		return rewriteValuePPC64_OpEq32(v)
   217  	case OpEq32F:
   218  		return rewriteValuePPC64_OpEq32F(v)
   219  	case OpEq64:
   220  		return rewriteValuePPC64_OpEq64(v)
   221  	case OpEq64F:
   222  		return rewriteValuePPC64_OpEq64F(v)
   223  	case OpEq8:
   224  		return rewriteValuePPC64_OpEq8(v)
   225  	case OpEqB:
   226  		return rewriteValuePPC64_OpEqB(v)
   227  	case OpEqPtr:
   228  		return rewriteValuePPC64_OpEqPtr(v)
   229  	case OpFMA:
   230  		v.Op = OpPPC64FMADD
   231  		return true
   232  	case OpFloor:
   233  		v.Op = OpPPC64FFLOOR
   234  		return true
   235  	case OpGetCallerPC:
   236  		v.Op = OpPPC64LoweredGetCallerPC
   237  		return true
   238  	case OpGetCallerSP:
   239  		v.Op = OpPPC64LoweredGetCallerSP
   240  		return true
   241  	case OpGetClosurePtr:
   242  		v.Op = OpPPC64LoweredGetClosurePtr
   243  		return true
   244  	case OpHmul32:
   245  		v.Op = OpPPC64MULHW
   246  		return true
   247  	case OpHmul32u:
   248  		v.Op = OpPPC64MULHWU
   249  		return true
   250  	case OpHmul64:
   251  		v.Op = OpPPC64MULHD
   252  		return true
   253  	case OpHmul64u:
   254  		v.Op = OpPPC64MULHDU
   255  		return true
   256  	case OpInterCall:
   257  		v.Op = OpPPC64CALLinter
   258  		return true
   259  	case OpIsInBounds:
   260  		return rewriteValuePPC64_OpIsInBounds(v)
   261  	case OpIsNonNil:
   262  		return rewriteValuePPC64_OpIsNonNil(v)
   263  	case OpIsSliceInBounds:
   264  		return rewriteValuePPC64_OpIsSliceInBounds(v)
   265  	case OpLeq16:
   266  		return rewriteValuePPC64_OpLeq16(v)
   267  	case OpLeq16U:
   268  		return rewriteValuePPC64_OpLeq16U(v)
   269  	case OpLeq32:
   270  		return rewriteValuePPC64_OpLeq32(v)
   271  	case OpLeq32F:
   272  		return rewriteValuePPC64_OpLeq32F(v)
   273  	case OpLeq32U:
   274  		return rewriteValuePPC64_OpLeq32U(v)
   275  	case OpLeq64:
   276  		return rewriteValuePPC64_OpLeq64(v)
   277  	case OpLeq64F:
   278  		return rewriteValuePPC64_OpLeq64F(v)
   279  	case OpLeq64U:
   280  		return rewriteValuePPC64_OpLeq64U(v)
   281  	case OpLeq8:
   282  		return rewriteValuePPC64_OpLeq8(v)
   283  	case OpLeq8U:
   284  		return rewriteValuePPC64_OpLeq8U(v)
   285  	case OpLess16:
   286  		return rewriteValuePPC64_OpLess16(v)
   287  	case OpLess16U:
   288  		return rewriteValuePPC64_OpLess16U(v)
   289  	case OpLess32:
   290  		return rewriteValuePPC64_OpLess32(v)
   291  	case OpLess32F:
   292  		return rewriteValuePPC64_OpLess32F(v)
   293  	case OpLess32U:
   294  		return rewriteValuePPC64_OpLess32U(v)
   295  	case OpLess64:
   296  		return rewriteValuePPC64_OpLess64(v)
   297  	case OpLess64F:
   298  		return rewriteValuePPC64_OpLess64F(v)
   299  	case OpLess64U:
   300  		return rewriteValuePPC64_OpLess64U(v)
   301  	case OpLess8:
   302  		return rewriteValuePPC64_OpLess8(v)
   303  	case OpLess8U:
   304  		return rewriteValuePPC64_OpLess8U(v)
   305  	case OpLoad:
   306  		return rewriteValuePPC64_OpLoad(v)
   307  	case OpLocalAddr:
   308  		return rewriteValuePPC64_OpLocalAddr(v)
   309  	case OpLsh16x16:
   310  		return rewriteValuePPC64_OpLsh16x16(v)
   311  	case OpLsh16x32:
   312  		return rewriteValuePPC64_OpLsh16x32(v)
   313  	case OpLsh16x64:
   314  		return rewriteValuePPC64_OpLsh16x64(v)
   315  	case OpLsh16x8:
   316  		return rewriteValuePPC64_OpLsh16x8(v)
   317  	case OpLsh32x16:
   318  		return rewriteValuePPC64_OpLsh32x16(v)
   319  	case OpLsh32x32:
   320  		return rewriteValuePPC64_OpLsh32x32(v)
   321  	case OpLsh32x64:
   322  		return rewriteValuePPC64_OpLsh32x64(v)
   323  	case OpLsh32x8:
   324  		return rewriteValuePPC64_OpLsh32x8(v)
   325  	case OpLsh64x16:
   326  		return rewriteValuePPC64_OpLsh64x16(v)
   327  	case OpLsh64x32:
   328  		return rewriteValuePPC64_OpLsh64x32(v)
   329  	case OpLsh64x64:
   330  		return rewriteValuePPC64_OpLsh64x64(v)
   331  	case OpLsh64x8:
   332  		return rewriteValuePPC64_OpLsh64x8(v)
   333  	case OpLsh8x16:
   334  		return rewriteValuePPC64_OpLsh8x16(v)
   335  	case OpLsh8x32:
   336  		return rewriteValuePPC64_OpLsh8x32(v)
   337  	case OpLsh8x64:
   338  		return rewriteValuePPC64_OpLsh8x64(v)
   339  	case OpLsh8x8:
   340  		return rewriteValuePPC64_OpLsh8x8(v)
   341  	case OpMod16:
   342  		return rewriteValuePPC64_OpMod16(v)
   343  	case OpMod16u:
   344  		return rewriteValuePPC64_OpMod16u(v)
   345  	case OpMod32:
   346  		return rewriteValuePPC64_OpMod32(v)
   347  	case OpMod32u:
   348  		return rewriteValuePPC64_OpMod32u(v)
   349  	case OpMod64:
   350  		return rewriteValuePPC64_OpMod64(v)
   351  	case OpMod64u:
   352  		return rewriteValuePPC64_OpMod64u(v)
   353  	case OpMod8:
   354  		return rewriteValuePPC64_OpMod8(v)
   355  	case OpMod8u:
   356  		return rewriteValuePPC64_OpMod8u(v)
   357  	case OpMove:
   358  		return rewriteValuePPC64_OpMove(v)
   359  	case OpMul16:
   360  		v.Op = OpPPC64MULLW
   361  		return true
   362  	case OpMul32:
   363  		v.Op = OpPPC64MULLW
   364  		return true
   365  	case OpMul32F:
   366  		v.Op = OpPPC64FMULS
   367  		return true
   368  	case OpMul64:
   369  		v.Op = OpPPC64MULLD
   370  		return true
   371  	case OpMul64F:
   372  		v.Op = OpPPC64FMUL
   373  		return true
   374  	case OpMul64uhilo:
   375  		v.Op = OpPPC64LoweredMuluhilo
   376  		return true
   377  	case OpMul8:
   378  		v.Op = OpPPC64MULLW
   379  		return true
   380  	case OpNeg16:
   381  		v.Op = OpPPC64NEG
   382  		return true
   383  	case OpNeg32:
   384  		v.Op = OpPPC64NEG
   385  		return true
   386  	case OpNeg32F:
   387  		v.Op = OpPPC64FNEG
   388  		return true
   389  	case OpNeg64:
   390  		v.Op = OpPPC64NEG
   391  		return true
   392  	case OpNeg64F:
   393  		v.Op = OpPPC64FNEG
   394  		return true
   395  	case OpNeg8:
   396  		v.Op = OpPPC64NEG
   397  		return true
   398  	case OpNeq16:
   399  		return rewriteValuePPC64_OpNeq16(v)
   400  	case OpNeq32:
   401  		return rewriteValuePPC64_OpNeq32(v)
   402  	case OpNeq32F:
   403  		return rewriteValuePPC64_OpNeq32F(v)
   404  	case OpNeq64:
   405  		return rewriteValuePPC64_OpNeq64(v)
   406  	case OpNeq64F:
   407  		return rewriteValuePPC64_OpNeq64F(v)
   408  	case OpNeq8:
   409  		return rewriteValuePPC64_OpNeq8(v)
   410  	case OpNeqB:
   411  		v.Op = OpPPC64XOR
   412  		return true
   413  	case OpNeqPtr:
   414  		return rewriteValuePPC64_OpNeqPtr(v)
   415  	case OpNilCheck:
   416  		v.Op = OpPPC64LoweredNilCheck
   417  		return true
   418  	case OpNot:
   419  		return rewriteValuePPC64_OpNot(v)
   420  	case OpOffPtr:
   421  		return rewriteValuePPC64_OpOffPtr(v)
   422  	case OpOr16:
   423  		v.Op = OpPPC64OR
   424  		return true
   425  	case OpOr32:
   426  		v.Op = OpPPC64OR
   427  		return true
   428  	case OpOr64:
   429  		v.Op = OpPPC64OR
   430  		return true
   431  	case OpOr8:
   432  		v.Op = OpPPC64OR
   433  		return true
   434  	case OpOrB:
   435  		v.Op = OpPPC64OR
   436  		return true
   437  	case OpPPC64ADD:
   438  		return rewriteValuePPC64_OpPPC64ADD(v)
   439  	case OpPPC64ADDconst:
   440  		return rewriteValuePPC64_OpPPC64ADDconst(v)
   441  	case OpPPC64AND:
   442  		return rewriteValuePPC64_OpPPC64AND(v)
   443  	case OpPPC64ANDN:
   444  		return rewriteValuePPC64_OpPPC64ANDN(v)
   445  	case OpPPC64ANDconst:
   446  		return rewriteValuePPC64_OpPPC64ANDconst(v)
   447  	case OpPPC64CLRLSLDI:
   448  		return rewriteValuePPC64_OpPPC64CLRLSLDI(v)
   449  	case OpPPC64CMP:
   450  		return rewriteValuePPC64_OpPPC64CMP(v)
   451  	case OpPPC64CMPU:
   452  		return rewriteValuePPC64_OpPPC64CMPU(v)
   453  	case OpPPC64CMPUconst:
   454  		return rewriteValuePPC64_OpPPC64CMPUconst(v)
   455  	case OpPPC64CMPW:
   456  		return rewriteValuePPC64_OpPPC64CMPW(v)
   457  	case OpPPC64CMPWU:
   458  		return rewriteValuePPC64_OpPPC64CMPWU(v)
   459  	case OpPPC64CMPWUconst:
   460  		return rewriteValuePPC64_OpPPC64CMPWUconst(v)
   461  	case OpPPC64CMPWconst:
   462  		return rewriteValuePPC64_OpPPC64CMPWconst(v)
   463  	case OpPPC64CMPconst:
   464  		return rewriteValuePPC64_OpPPC64CMPconst(v)
   465  	case OpPPC64Equal:
   466  		return rewriteValuePPC64_OpPPC64Equal(v)
   467  	case OpPPC64FABS:
   468  		return rewriteValuePPC64_OpPPC64FABS(v)
   469  	case OpPPC64FADD:
   470  		return rewriteValuePPC64_OpPPC64FADD(v)
   471  	case OpPPC64FADDS:
   472  		return rewriteValuePPC64_OpPPC64FADDS(v)
   473  	case OpPPC64FCEIL:
   474  		return rewriteValuePPC64_OpPPC64FCEIL(v)
   475  	case OpPPC64FFLOOR:
   476  		return rewriteValuePPC64_OpPPC64FFLOOR(v)
   477  	case OpPPC64FGreaterEqual:
   478  		return rewriteValuePPC64_OpPPC64FGreaterEqual(v)
   479  	case OpPPC64FGreaterThan:
   480  		return rewriteValuePPC64_OpPPC64FGreaterThan(v)
   481  	case OpPPC64FLessEqual:
   482  		return rewriteValuePPC64_OpPPC64FLessEqual(v)
   483  	case OpPPC64FLessThan:
   484  		return rewriteValuePPC64_OpPPC64FLessThan(v)
   485  	case OpPPC64FMOVDload:
   486  		return rewriteValuePPC64_OpPPC64FMOVDload(v)
   487  	case OpPPC64FMOVDstore:
   488  		return rewriteValuePPC64_OpPPC64FMOVDstore(v)
   489  	case OpPPC64FMOVSload:
   490  		return rewriteValuePPC64_OpPPC64FMOVSload(v)
   491  	case OpPPC64FMOVSstore:
   492  		return rewriteValuePPC64_OpPPC64FMOVSstore(v)
   493  	case OpPPC64FNEG:
   494  		return rewriteValuePPC64_OpPPC64FNEG(v)
   495  	case OpPPC64FSQRT:
   496  		return rewriteValuePPC64_OpPPC64FSQRT(v)
   497  	case OpPPC64FSUB:
   498  		return rewriteValuePPC64_OpPPC64FSUB(v)
   499  	case OpPPC64FSUBS:
   500  		return rewriteValuePPC64_OpPPC64FSUBS(v)
   501  	case OpPPC64FTRUNC:
   502  		return rewriteValuePPC64_OpPPC64FTRUNC(v)
   503  	case OpPPC64GreaterEqual:
   504  		return rewriteValuePPC64_OpPPC64GreaterEqual(v)
   505  	case OpPPC64GreaterThan:
   506  		return rewriteValuePPC64_OpPPC64GreaterThan(v)
   507  	case OpPPC64ISEL:
   508  		return rewriteValuePPC64_OpPPC64ISEL(v)
   509  	case OpPPC64ISELB:
   510  		return rewriteValuePPC64_OpPPC64ISELB(v)
   511  	case OpPPC64LessEqual:
   512  		return rewriteValuePPC64_OpPPC64LessEqual(v)
   513  	case OpPPC64LessThan:
   514  		return rewriteValuePPC64_OpPPC64LessThan(v)
   515  	case OpPPC64MFVSRD:
   516  		return rewriteValuePPC64_OpPPC64MFVSRD(v)
   517  	case OpPPC64MOVBZload:
   518  		return rewriteValuePPC64_OpPPC64MOVBZload(v)
   519  	case OpPPC64MOVBZloadidx:
   520  		return rewriteValuePPC64_OpPPC64MOVBZloadidx(v)
   521  	case OpPPC64MOVBZreg:
   522  		return rewriteValuePPC64_OpPPC64MOVBZreg(v)
   523  	case OpPPC64MOVBreg:
   524  		return rewriteValuePPC64_OpPPC64MOVBreg(v)
   525  	case OpPPC64MOVBstore:
   526  		return rewriteValuePPC64_OpPPC64MOVBstore(v)
   527  	case OpPPC64MOVBstoreidx:
   528  		return rewriteValuePPC64_OpPPC64MOVBstoreidx(v)
   529  	case OpPPC64MOVBstorezero:
   530  		return rewriteValuePPC64_OpPPC64MOVBstorezero(v)
   531  	case OpPPC64MOVDload:
   532  		return rewriteValuePPC64_OpPPC64MOVDload(v)
   533  	case OpPPC64MOVDloadidx:
   534  		return rewriteValuePPC64_OpPPC64MOVDloadidx(v)
   535  	case OpPPC64MOVDstore:
   536  		return rewriteValuePPC64_OpPPC64MOVDstore(v)
   537  	case OpPPC64MOVDstoreidx:
   538  		return rewriteValuePPC64_OpPPC64MOVDstoreidx(v)
   539  	case OpPPC64MOVDstorezero:
   540  		return rewriteValuePPC64_OpPPC64MOVDstorezero(v)
   541  	case OpPPC64MOVHBRstore:
   542  		return rewriteValuePPC64_OpPPC64MOVHBRstore(v)
   543  	case OpPPC64MOVHZload:
   544  		return rewriteValuePPC64_OpPPC64MOVHZload(v)
   545  	case OpPPC64MOVHZloadidx:
   546  		return rewriteValuePPC64_OpPPC64MOVHZloadidx(v)
   547  	case OpPPC64MOVHZreg:
   548  		return rewriteValuePPC64_OpPPC64MOVHZreg(v)
   549  	case OpPPC64MOVHload:
   550  		return rewriteValuePPC64_OpPPC64MOVHload(v)
   551  	case OpPPC64MOVHloadidx:
   552  		return rewriteValuePPC64_OpPPC64MOVHloadidx(v)
   553  	case OpPPC64MOVHreg:
   554  		return rewriteValuePPC64_OpPPC64MOVHreg(v)
   555  	case OpPPC64MOVHstore:
   556  		return rewriteValuePPC64_OpPPC64MOVHstore(v)
   557  	case OpPPC64MOVHstoreidx:
   558  		return rewriteValuePPC64_OpPPC64MOVHstoreidx(v)
   559  	case OpPPC64MOVHstorezero:
   560  		return rewriteValuePPC64_OpPPC64MOVHstorezero(v)
   561  	case OpPPC64MOVWBRstore:
   562  		return rewriteValuePPC64_OpPPC64MOVWBRstore(v)
   563  	case OpPPC64MOVWZload:
   564  		return rewriteValuePPC64_OpPPC64MOVWZload(v)
   565  	case OpPPC64MOVWZloadidx:
   566  		return rewriteValuePPC64_OpPPC64MOVWZloadidx(v)
   567  	case OpPPC64MOVWZreg:
   568  		return rewriteValuePPC64_OpPPC64MOVWZreg(v)
   569  	case OpPPC64MOVWload:
   570  		return rewriteValuePPC64_OpPPC64MOVWload(v)
   571  	case OpPPC64MOVWloadidx:
   572  		return rewriteValuePPC64_OpPPC64MOVWloadidx(v)
   573  	case OpPPC64MOVWreg:
   574  		return rewriteValuePPC64_OpPPC64MOVWreg(v)
   575  	case OpPPC64MOVWstore:
   576  		return rewriteValuePPC64_OpPPC64MOVWstore(v)
   577  	case OpPPC64MOVWstoreidx:
   578  		return rewriteValuePPC64_OpPPC64MOVWstoreidx(v)
   579  	case OpPPC64MOVWstorezero:
   580  		return rewriteValuePPC64_OpPPC64MOVWstorezero(v)
   581  	case OpPPC64MTVSRD:
   582  		return rewriteValuePPC64_OpPPC64MTVSRD(v)
   583  	case OpPPC64MULLD:
   584  		return rewriteValuePPC64_OpPPC64MULLD(v)
   585  	case OpPPC64MULLW:
   586  		return rewriteValuePPC64_OpPPC64MULLW(v)
   587  	case OpPPC64NEG:
   588  		return rewriteValuePPC64_OpPPC64NEG(v)
   589  	case OpPPC64NOR:
   590  		return rewriteValuePPC64_OpPPC64NOR(v)
   591  	case OpPPC64NotEqual:
   592  		return rewriteValuePPC64_OpPPC64NotEqual(v)
   593  	case OpPPC64OR:
   594  		return rewriteValuePPC64_OpPPC64OR(v)
   595  	case OpPPC64ORN:
   596  		return rewriteValuePPC64_OpPPC64ORN(v)
   597  	case OpPPC64ORconst:
   598  		return rewriteValuePPC64_OpPPC64ORconst(v)
   599  	case OpPPC64ROTL:
   600  		return rewriteValuePPC64_OpPPC64ROTL(v)
   601  	case OpPPC64ROTLW:
   602  		return rewriteValuePPC64_OpPPC64ROTLW(v)
   603  	case OpPPC64ROTLWconst:
   604  		return rewriteValuePPC64_OpPPC64ROTLWconst(v)
   605  	case OpPPC64SLD:
   606  		return rewriteValuePPC64_OpPPC64SLD(v)
   607  	case OpPPC64SLDconst:
   608  		return rewriteValuePPC64_OpPPC64SLDconst(v)
   609  	case OpPPC64SLW:
   610  		return rewriteValuePPC64_OpPPC64SLW(v)
   611  	case OpPPC64SLWconst:
   612  		return rewriteValuePPC64_OpPPC64SLWconst(v)
   613  	case OpPPC64SRAD:
   614  		return rewriteValuePPC64_OpPPC64SRAD(v)
   615  	case OpPPC64SRAW:
   616  		return rewriteValuePPC64_OpPPC64SRAW(v)
   617  	case OpPPC64SRD:
   618  		return rewriteValuePPC64_OpPPC64SRD(v)
   619  	case OpPPC64SRW:
   620  		return rewriteValuePPC64_OpPPC64SRW(v)
   621  	case OpPPC64SRWconst:
   622  		return rewriteValuePPC64_OpPPC64SRWconst(v)
   623  	case OpPPC64SUB:
   624  		return rewriteValuePPC64_OpPPC64SUB(v)
   625  	case OpPPC64SUBFCconst:
   626  		return rewriteValuePPC64_OpPPC64SUBFCconst(v)
   627  	case OpPPC64XOR:
   628  		return rewriteValuePPC64_OpPPC64XOR(v)
   629  	case OpPPC64XORconst:
   630  		return rewriteValuePPC64_OpPPC64XORconst(v)
   631  	case OpPanicBounds:
   632  		return rewriteValuePPC64_OpPanicBounds(v)
   633  	case OpPopCount16:
   634  		return rewriteValuePPC64_OpPopCount16(v)
   635  	case OpPopCount32:
   636  		return rewriteValuePPC64_OpPopCount32(v)
   637  	case OpPopCount64:
   638  		v.Op = OpPPC64POPCNTD
   639  		return true
   640  	case OpPopCount8:
   641  		return rewriteValuePPC64_OpPopCount8(v)
   642  	case OpPrefetchCache:
   643  		return rewriteValuePPC64_OpPrefetchCache(v)
   644  	case OpPrefetchCacheStreamed:
   645  		return rewriteValuePPC64_OpPrefetchCacheStreamed(v)
   646  	case OpRotateLeft16:
   647  		return rewriteValuePPC64_OpRotateLeft16(v)
   648  	case OpRotateLeft32:
   649  		return rewriteValuePPC64_OpRotateLeft32(v)
   650  	case OpRotateLeft64:
   651  		return rewriteValuePPC64_OpRotateLeft64(v)
   652  	case OpRotateLeft8:
   653  		return rewriteValuePPC64_OpRotateLeft8(v)
   654  	case OpRound:
   655  		v.Op = OpPPC64FROUND
   656  		return true
   657  	case OpRound32F:
   658  		v.Op = OpPPC64LoweredRound32F
   659  		return true
   660  	case OpRound64F:
   661  		v.Op = OpPPC64LoweredRound64F
   662  		return true
   663  	case OpRsh16Ux16:
   664  		return rewriteValuePPC64_OpRsh16Ux16(v)
   665  	case OpRsh16Ux32:
   666  		return rewriteValuePPC64_OpRsh16Ux32(v)
   667  	case OpRsh16Ux64:
   668  		return rewriteValuePPC64_OpRsh16Ux64(v)
   669  	case OpRsh16Ux8:
   670  		return rewriteValuePPC64_OpRsh16Ux8(v)
   671  	case OpRsh16x16:
   672  		return rewriteValuePPC64_OpRsh16x16(v)
   673  	case OpRsh16x32:
   674  		return rewriteValuePPC64_OpRsh16x32(v)
   675  	case OpRsh16x64:
   676  		return rewriteValuePPC64_OpRsh16x64(v)
   677  	case OpRsh16x8:
   678  		return rewriteValuePPC64_OpRsh16x8(v)
   679  	case OpRsh32Ux16:
   680  		return rewriteValuePPC64_OpRsh32Ux16(v)
   681  	case OpRsh32Ux32:
   682  		return rewriteValuePPC64_OpRsh32Ux32(v)
   683  	case OpRsh32Ux64:
   684  		return rewriteValuePPC64_OpRsh32Ux64(v)
   685  	case OpRsh32Ux8:
   686  		return rewriteValuePPC64_OpRsh32Ux8(v)
   687  	case OpRsh32x16:
   688  		return rewriteValuePPC64_OpRsh32x16(v)
   689  	case OpRsh32x32:
   690  		return rewriteValuePPC64_OpRsh32x32(v)
   691  	case OpRsh32x64:
   692  		return rewriteValuePPC64_OpRsh32x64(v)
   693  	case OpRsh32x8:
   694  		return rewriteValuePPC64_OpRsh32x8(v)
   695  	case OpRsh64Ux16:
   696  		return rewriteValuePPC64_OpRsh64Ux16(v)
   697  	case OpRsh64Ux32:
   698  		return rewriteValuePPC64_OpRsh64Ux32(v)
   699  	case OpRsh64Ux64:
   700  		return rewriteValuePPC64_OpRsh64Ux64(v)
   701  	case OpRsh64Ux8:
   702  		return rewriteValuePPC64_OpRsh64Ux8(v)
   703  	case OpRsh64x16:
   704  		return rewriteValuePPC64_OpRsh64x16(v)
   705  	case OpRsh64x32:
   706  		return rewriteValuePPC64_OpRsh64x32(v)
   707  	case OpRsh64x64:
   708  		return rewriteValuePPC64_OpRsh64x64(v)
   709  	case OpRsh64x8:
   710  		return rewriteValuePPC64_OpRsh64x8(v)
   711  	case OpRsh8Ux16:
   712  		return rewriteValuePPC64_OpRsh8Ux16(v)
   713  	case OpRsh8Ux32:
   714  		return rewriteValuePPC64_OpRsh8Ux32(v)
   715  	case OpRsh8Ux64:
   716  		return rewriteValuePPC64_OpRsh8Ux64(v)
   717  	case OpRsh8Ux8:
   718  		return rewriteValuePPC64_OpRsh8Ux8(v)
   719  	case OpRsh8x16:
   720  		return rewriteValuePPC64_OpRsh8x16(v)
   721  	case OpRsh8x32:
   722  		return rewriteValuePPC64_OpRsh8x32(v)
   723  	case OpRsh8x64:
   724  		return rewriteValuePPC64_OpRsh8x64(v)
   725  	case OpRsh8x8:
   726  		return rewriteValuePPC64_OpRsh8x8(v)
   727  	case OpSelectN:
   728  		return rewriteValuePPC64_OpSelectN(v)
   729  	case OpSignExt16to32:
   730  		v.Op = OpPPC64MOVHreg
   731  		return true
   732  	case OpSignExt16to64:
   733  		v.Op = OpPPC64MOVHreg
   734  		return true
   735  	case OpSignExt32to64:
   736  		v.Op = OpPPC64MOVWreg
   737  		return true
   738  	case OpSignExt8to16:
   739  		v.Op = OpPPC64MOVBreg
   740  		return true
   741  	case OpSignExt8to32:
   742  		v.Op = OpPPC64MOVBreg
   743  		return true
   744  	case OpSignExt8to64:
   745  		v.Op = OpPPC64MOVBreg
   746  		return true
   747  	case OpSlicemask:
   748  		return rewriteValuePPC64_OpSlicemask(v)
   749  	case OpSqrt:
   750  		v.Op = OpPPC64FSQRT
   751  		return true
   752  	case OpSqrt32:
   753  		v.Op = OpPPC64FSQRTS
   754  		return true
   755  	case OpStaticCall:
   756  		v.Op = OpPPC64CALLstatic
   757  		return true
   758  	case OpStore:
   759  		return rewriteValuePPC64_OpStore(v)
   760  	case OpSub16:
   761  		v.Op = OpPPC64SUB
   762  		return true
   763  	case OpSub32:
   764  		v.Op = OpPPC64SUB
   765  		return true
   766  	case OpSub32F:
   767  		v.Op = OpPPC64FSUBS
   768  		return true
   769  	case OpSub64:
   770  		v.Op = OpPPC64SUB
   771  		return true
   772  	case OpSub64F:
   773  		v.Op = OpPPC64FSUB
   774  		return true
   775  	case OpSub8:
   776  		v.Op = OpPPC64SUB
   777  		return true
   778  	case OpSubPtr:
   779  		v.Op = OpPPC64SUB
   780  		return true
   781  	case OpTailCall:
   782  		v.Op = OpPPC64CALLtail
   783  		return true
   784  	case OpTrunc:
   785  		v.Op = OpPPC64FTRUNC
   786  		return true
   787  	case OpTrunc16to8:
   788  		return rewriteValuePPC64_OpTrunc16to8(v)
   789  	case OpTrunc32to16:
   790  		return rewriteValuePPC64_OpTrunc32to16(v)
   791  	case OpTrunc32to8:
   792  		return rewriteValuePPC64_OpTrunc32to8(v)
   793  	case OpTrunc64to16:
   794  		return rewriteValuePPC64_OpTrunc64to16(v)
   795  	case OpTrunc64to32:
   796  		return rewriteValuePPC64_OpTrunc64to32(v)
   797  	case OpTrunc64to8:
   798  		return rewriteValuePPC64_OpTrunc64to8(v)
   799  	case OpWB:
   800  		v.Op = OpPPC64LoweredWB
   801  		return true
   802  	case OpXor16:
   803  		v.Op = OpPPC64XOR
   804  		return true
   805  	case OpXor32:
   806  		v.Op = OpPPC64XOR
   807  		return true
   808  	case OpXor64:
   809  		v.Op = OpPPC64XOR
   810  		return true
   811  	case OpXor8:
   812  		v.Op = OpPPC64XOR
   813  		return true
   814  	case OpZero:
   815  		return rewriteValuePPC64_OpZero(v)
   816  	case OpZeroExt16to32:
   817  		v.Op = OpPPC64MOVHZreg
   818  		return true
   819  	case OpZeroExt16to64:
   820  		v.Op = OpPPC64MOVHZreg
   821  		return true
   822  	case OpZeroExt32to64:
   823  		v.Op = OpPPC64MOVWZreg
   824  		return true
   825  	case OpZeroExt8to16:
   826  		v.Op = OpPPC64MOVBZreg
   827  		return true
   828  	case OpZeroExt8to32:
   829  		v.Op = OpPPC64MOVBZreg
   830  		return true
   831  	case OpZeroExt8to64:
   832  		v.Op = OpPPC64MOVBZreg
   833  		return true
   834  	}
   835  	return false
   836  }
   837  func rewriteValuePPC64_OpAddr(v *Value) bool {
   838  	v_0 := v.Args[0]
   839  	// match: (Addr {sym} base)
   840  	// result: (MOVDaddr {sym} [0] base)
   841  	for {
   842  		sym := auxToSym(v.Aux)
   843  		base := v_0
   844  		v.reset(OpPPC64MOVDaddr)
   845  		v.AuxInt = int32ToAuxInt(0)
   846  		v.Aux = symToAux(sym)
   847  		v.AddArg(base)
   848  		return true
   849  	}
   850  }
   851  func rewriteValuePPC64_OpAtomicCompareAndSwap32(v *Value) bool {
   852  	v_3 := v.Args[3]
   853  	v_2 := v.Args[2]
   854  	v_1 := v.Args[1]
   855  	v_0 := v.Args[0]
   856  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
   857  	// result: (LoweredAtomicCas32 [1] ptr old new_ mem)
   858  	for {
   859  		ptr := v_0
   860  		old := v_1
   861  		new_ := v_2
   862  		mem := v_3
   863  		v.reset(OpPPC64LoweredAtomicCas32)
   864  		v.AuxInt = int64ToAuxInt(1)
   865  		v.AddArg4(ptr, old, new_, mem)
   866  		return true
   867  	}
   868  }
   869  func rewriteValuePPC64_OpAtomicCompareAndSwap64(v *Value) bool {
   870  	v_3 := v.Args[3]
   871  	v_2 := v.Args[2]
   872  	v_1 := v.Args[1]
   873  	v_0 := v.Args[0]
   874  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
   875  	// result: (LoweredAtomicCas64 [1] ptr old new_ mem)
   876  	for {
   877  		ptr := v_0
   878  		old := v_1
   879  		new_ := v_2
   880  		mem := v_3
   881  		v.reset(OpPPC64LoweredAtomicCas64)
   882  		v.AuxInt = int64ToAuxInt(1)
   883  		v.AddArg4(ptr, old, new_, mem)
   884  		return true
   885  	}
   886  }
   887  func rewriteValuePPC64_OpAtomicCompareAndSwapRel32(v *Value) bool {
   888  	v_3 := v.Args[3]
   889  	v_2 := v.Args[2]
   890  	v_1 := v.Args[1]
   891  	v_0 := v.Args[0]
   892  	// match: (AtomicCompareAndSwapRel32 ptr old new_ mem)
   893  	// result: (LoweredAtomicCas32 [0] ptr old new_ mem)
   894  	for {
   895  		ptr := v_0
   896  		old := v_1
   897  		new_ := v_2
   898  		mem := v_3
   899  		v.reset(OpPPC64LoweredAtomicCas32)
   900  		v.AuxInt = int64ToAuxInt(0)
   901  		v.AddArg4(ptr, old, new_, mem)
   902  		return true
   903  	}
   904  }
   905  func rewriteValuePPC64_OpAtomicLoad32(v *Value) bool {
   906  	v_1 := v.Args[1]
   907  	v_0 := v.Args[0]
   908  	// match: (AtomicLoad32 ptr mem)
   909  	// result: (LoweredAtomicLoad32 [1] ptr mem)
   910  	for {
   911  		ptr := v_0
   912  		mem := v_1
   913  		v.reset(OpPPC64LoweredAtomicLoad32)
   914  		v.AuxInt = int64ToAuxInt(1)
   915  		v.AddArg2(ptr, mem)
   916  		return true
   917  	}
   918  }
   919  func rewriteValuePPC64_OpAtomicLoad64(v *Value) bool {
   920  	v_1 := v.Args[1]
   921  	v_0 := v.Args[0]
   922  	// match: (AtomicLoad64 ptr mem)
   923  	// result: (LoweredAtomicLoad64 [1] ptr mem)
   924  	for {
   925  		ptr := v_0
   926  		mem := v_1
   927  		v.reset(OpPPC64LoweredAtomicLoad64)
   928  		v.AuxInt = int64ToAuxInt(1)
   929  		v.AddArg2(ptr, mem)
   930  		return true
   931  	}
   932  }
   933  func rewriteValuePPC64_OpAtomicLoad8(v *Value) bool {
   934  	v_1 := v.Args[1]
   935  	v_0 := v.Args[0]
   936  	// match: (AtomicLoad8 ptr mem)
   937  	// result: (LoweredAtomicLoad8 [1] ptr mem)
   938  	for {
   939  		ptr := v_0
   940  		mem := v_1
   941  		v.reset(OpPPC64LoweredAtomicLoad8)
   942  		v.AuxInt = int64ToAuxInt(1)
   943  		v.AddArg2(ptr, mem)
   944  		return true
   945  	}
   946  }
   947  func rewriteValuePPC64_OpAtomicLoadAcq32(v *Value) bool {
   948  	v_1 := v.Args[1]
   949  	v_0 := v.Args[0]
   950  	// match: (AtomicLoadAcq32 ptr mem)
   951  	// result: (LoweredAtomicLoad32 [0] ptr mem)
   952  	for {
   953  		ptr := v_0
   954  		mem := v_1
   955  		v.reset(OpPPC64LoweredAtomicLoad32)
   956  		v.AuxInt = int64ToAuxInt(0)
   957  		v.AddArg2(ptr, mem)
   958  		return true
   959  	}
   960  }
   961  func rewriteValuePPC64_OpAtomicLoadAcq64(v *Value) bool {
   962  	v_1 := v.Args[1]
   963  	v_0 := v.Args[0]
   964  	// match: (AtomicLoadAcq64 ptr mem)
   965  	// result: (LoweredAtomicLoad64 [0] ptr mem)
   966  	for {
   967  		ptr := v_0
   968  		mem := v_1
   969  		v.reset(OpPPC64LoweredAtomicLoad64)
   970  		v.AuxInt = int64ToAuxInt(0)
   971  		v.AddArg2(ptr, mem)
   972  		return true
   973  	}
   974  }
   975  func rewriteValuePPC64_OpAtomicLoadPtr(v *Value) bool {
   976  	v_1 := v.Args[1]
   977  	v_0 := v.Args[0]
   978  	// match: (AtomicLoadPtr ptr mem)
   979  	// result: (LoweredAtomicLoadPtr [1] ptr mem)
   980  	for {
   981  		ptr := v_0
   982  		mem := v_1
   983  		v.reset(OpPPC64LoweredAtomicLoadPtr)
   984  		v.AuxInt = int64ToAuxInt(1)
   985  		v.AddArg2(ptr, mem)
   986  		return true
   987  	}
   988  }
   989  func rewriteValuePPC64_OpAtomicStore32(v *Value) bool {
   990  	v_2 := v.Args[2]
   991  	v_1 := v.Args[1]
   992  	v_0 := v.Args[0]
   993  	// match: (AtomicStore32 ptr val mem)
   994  	// result: (LoweredAtomicStore32 [1] ptr val mem)
   995  	for {
   996  		ptr := v_0
   997  		val := v_1
   998  		mem := v_2
   999  		v.reset(OpPPC64LoweredAtomicStore32)
  1000  		v.AuxInt = int64ToAuxInt(1)
  1001  		v.AddArg3(ptr, val, mem)
  1002  		return true
  1003  	}
  1004  }
  1005  func rewriteValuePPC64_OpAtomicStore64(v *Value) bool {
  1006  	v_2 := v.Args[2]
  1007  	v_1 := v.Args[1]
  1008  	v_0 := v.Args[0]
  1009  	// match: (AtomicStore64 ptr val mem)
  1010  	// result: (LoweredAtomicStore64 [1] ptr val mem)
  1011  	for {
  1012  		ptr := v_0
  1013  		val := v_1
  1014  		mem := v_2
  1015  		v.reset(OpPPC64LoweredAtomicStore64)
  1016  		v.AuxInt = int64ToAuxInt(1)
  1017  		v.AddArg3(ptr, val, mem)
  1018  		return true
  1019  	}
  1020  }
  1021  func rewriteValuePPC64_OpAtomicStore8(v *Value) bool {
  1022  	v_2 := v.Args[2]
  1023  	v_1 := v.Args[1]
  1024  	v_0 := v.Args[0]
  1025  	// match: (AtomicStore8 ptr val mem)
  1026  	// result: (LoweredAtomicStore8 [1] ptr val mem)
  1027  	for {
  1028  		ptr := v_0
  1029  		val := v_1
  1030  		mem := v_2
  1031  		v.reset(OpPPC64LoweredAtomicStore8)
  1032  		v.AuxInt = int64ToAuxInt(1)
  1033  		v.AddArg3(ptr, val, mem)
  1034  		return true
  1035  	}
  1036  }
  1037  func rewriteValuePPC64_OpAtomicStoreRel32(v *Value) bool {
  1038  	v_2 := v.Args[2]
  1039  	v_1 := v.Args[1]
  1040  	v_0 := v.Args[0]
  1041  	// match: (AtomicStoreRel32 ptr val mem)
  1042  	// result: (LoweredAtomicStore32 [0] ptr val mem)
  1043  	for {
  1044  		ptr := v_0
  1045  		val := v_1
  1046  		mem := v_2
  1047  		v.reset(OpPPC64LoweredAtomicStore32)
  1048  		v.AuxInt = int64ToAuxInt(0)
  1049  		v.AddArg3(ptr, val, mem)
  1050  		return true
  1051  	}
  1052  }
  1053  func rewriteValuePPC64_OpAtomicStoreRel64(v *Value) bool {
  1054  	v_2 := v.Args[2]
  1055  	v_1 := v.Args[1]
  1056  	v_0 := v.Args[0]
  1057  	// match: (AtomicStoreRel64 ptr val mem)
  1058  	// result: (LoweredAtomicStore64 [0] ptr val mem)
  1059  	for {
  1060  		ptr := v_0
  1061  		val := v_1
  1062  		mem := v_2
  1063  		v.reset(OpPPC64LoweredAtomicStore64)
  1064  		v.AuxInt = int64ToAuxInt(0)
  1065  		v.AddArg3(ptr, val, mem)
  1066  		return true
  1067  	}
  1068  }
  1069  func rewriteValuePPC64_OpAvg64u(v *Value) bool {
  1070  	v_1 := v.Args[1]
  1071  	v_0 := v.Args[0]
  1072  	b := v.Block
  1073  	// match: (Avg64u <t> x y)
  1074  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1075  	for {
  1076  		t := v.Type
  1077  		x := v_0
  1078  		y := v_1
  1079  		v.reset(OpPPC64ADD)
  1080  		v0 := b.NewValue0(v.Pos, OpPPC64SRDconst, t)
  1081  		v0.AuxInt = int64ToAuxInt(1)
  1082  		v1 := b.NewValue0(v.Pos, OpPPC64SUB, t)
  1083  		v1.AddArg2(x, y)
  1084  		v0.AddArg(v1)
  1085  		v.AddArg2(v0, y)
  1086  		return true
  1087  	}
  1088  }
  1089  func rewriteValuePPC64_OpBitLen32(v *Value) bool {
  1090  	v_0 := v.Args[0]
  1091  	b := v.Block
  1092  	typ := &b.Func.Config.Types
  1093  	// match: (BitLen32 x)
  1094  	// result: (SUBFCconst [32] (CNTLZW <typ.Int> x))
  1095  	for {
  1096  		x := v_0
  1097  		v.reset(OpPPC64SUBFCconst)
  1098  		v.AuxInt = int64ToAuxInt(32)
  1099  		v0 := b.NewValue0(v.Pos, OpPPC64CNTLZW, typ.Int)
  1100  		v0.AddArg(x)
  1101  		v.AddArg(v0)
  1102  		return true
  1103  	}
  1104  }
  1105  func rewriteValuePPC64_OpBitLen64(v *Value) bool {
  1106  	v_0 := v.Args[0]
  1107  	b := v.Block
  1108  	typ := &b.Func.Config.Types
  1109  	// match: (BitLen64 x)
  1110  	// result: (SUBFCconst [64] (CNTLZD <typ.Int> x))
  1111  	for {
  1112  		x := v_0
  1113  		v.reset(OpPPC64SUBFCconst)
  1114  		v.AuxInt = int64ToAuxInt(64)
  1115  		v0 := b.NewValue0(v.Pos, OpPPC64CNTLZD, typ.Int)
  1116  		v0.AddArg(x)
  1117  		v.AddArg(v0)
  1118  		return true
  1119  	}
  1120  }
  1121  func rewriteValuePPC64_OpCom16(v *Value) bool {
  1122  	v_0 := v.Args[0]
  1123  	// match: (Com16 x)
  1124  	// result: (NOR x x)
  1125  	for {
  1126  		x := v_0
  1127  		v.reset(OpPPC64NOR)
  1128  		v.AddArg2(x, x)
  1129  		return true
  1130  	}
  1131  }
  1132  func rewriteValuePPC64_OpCom32(v *Value) bool {
  1133  	v_0 := v.Args[0]
  1134  	// match: (Com32 x)
  1135  	// result: (NOR x x)
  1136  	for {
  1137  		x := v_0
  1138  		v.reset(OpPPC64NOR)
  1139  		v.AddArg2(x, x)
  1140  		return true
  1141  	}
  1142  }
  1143  func rewriteValuePPC64_OpCom64(v *Value) bool {
  1144  	v_0 := v.Args[0]
  1145  	// match: (Com64 x)
  1146  	// result: (NOR x x)
  1147  	for {
  1148  		x := v_0
  1149  		v.reset(OpPPC64NOR)
  1150  		v.AddArg2(x, x)
  1151  		return true
  1152  	}
  1153  }
  1154  func rewriteValuePPC64_OpCom8(v *Value) bool {
  1155  	v_0 := v.Args[0]
  1156  	// match: (Com8 x)
  1157  	// result: (NOR x x)
  1158  	for {
  1159  		x := v_0
  1160  		v.reset(OpPPC64NOR)
  1161  		v.AddArg2(x, x)
  1162  		return true
  1163  	}
  1164  }
  1165  func rewriteValuePPC64_OpCondSelect(v *Value) bool {
  1166  	v_2 := v.Args[2]
  1167  	v_1 := v.Args[1]
  1168  	v_0 := v.Args[0]
  1169  	b := v.Block
  1170  	// match: (CondSelect x y bool)
  1171  	// cond: flagArg(bool) == nil
  1172  	// result: (ISEL [6] x y (CMPWconst [0] bool))
  1173  	for {
  1174  		x := v_0
  1175  		y := v_1
  1176  		bool := v_2
  1177  		if !(flagArg(bool) == nil) {
  1178  			break
  1179  		}
  1180  		v.reset(OpPPC64ISEL)
  1181  		v.AuxInt = int32ToAuxInt(6)
  1182  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
  1183  		v0.AuxInt = int32ToAuxInt(0)
  1184  		v0.AddArg(bool)
  1185  		v.AddArg3(x, y, v0)
  1186  		return true
  1187  	}
  1188  	return false
  1189  }
  1190  func rewriteValuePPC64_OpConst16(v *Value) bool {
  1191  	// match: (Const16 [val])
  1192  	// result: (MOVDconst [int64(val)])
  1193  	for {
  1194  		val := auxIntToInt16(v.AuxInt)
  1195  		v.reset(OpPPC64MOVDconst)
  1196  		v.AuxInt = int64ToAuxInt(int64(val))
  1197  		return true
  1198  	}
  1199  }
  1200  func rewriteValuePPC64_OpConst32(v *Value) bool {
  1201  	// match: (Const32 [val])
  1202  	// result: (MOVDconst [int64(val)])
  1203  	for {
  1204  		val := auxIntToInt32(v.AuxInt)
  1205  		v.reset(OpPPC64MOVDconst)
  1206  		v.AuxInt = int64ToAuxInt(int64(val))
  1207  		return true
  1208  	}
  1209  }
  1210  func rewriteValuePPC64_OpConst64(v *Value) bool {
  1211  	// match: (Const64 [val])
  1212  	// result: (MOVDconst [int64(val)])
  1213  	for {
  1214  		val := auxIntToInt64(v.AuxInt)
  1215  		v.reset(OpPPC64MOVDconst)
  1216  		v.AuxInt = int64ToAuxInt(int64(val))
  1217  		return true
  1218  	}
  1219  }
  1220  func rewriteValuePPC64_OpConst8(v *Value) bool {
  1221  	// match: (Const8 [val])
  1222  	// result: (MOVDconst [int64(val)])
  1223  	for {
  1224  		val := auxIntToInt8(v.AuxInt)
  1225  		v.reset(OpPPC64MOVDconst)
  1226  		v.AuxInt = int64ToAuxInt(int64(val))
  1227  		return true
  1228  	}
  1229  }
  1230  func rewriteValuePPC64_OpConstBool(v *Value) bool {
  1231  	// match: (ConstBool [t])
  1232  	// result: (MOVDconst [b2i(t)])
  1233  	for {
  1234  		t := auxIntToBool(v.AuxInt)
  1235  		v.reset(OpPPC64MOVDconst)
  1236  		v.AuxInt = int64ToAuxInt(b2i(t))
  1237  		return true
  1238  	}
  1239  }
  1240  func rewriteValuePPC64_OpConstNil(v *Value) bool {
  1241  	// match: (ConstNil)
  1242  	// result: (MOVDconst [0])
  1243  	for {
  1244  		v.reset(OpPPC64MOVDconst)
  1245  		v.AuxInt = int64ToAuxInt(0)
  1246  		return true
  1247  	}
  1248  }
  1249  func rewriteValuePPC64_OpCopysign(v *Value) bool {
  1250  	v_1 := v.Args[1]
  1251  	v_0 := v.Args[0]
  1252  	// match: (Copysign x y)
  1253  	// result: (FCPSGN y x)
  1254  	for {
  1255  		x := v_0
  1256  		y := v_1
  1257  		v.reset(OpPPC64FCPSGN)
  1258  		v.AddArg2(y, x)
  1259  		return true
  1260  	}
  1261  }
  1262  func rewriteValuePPC64_OpCtz16(v *Value) bool {
  1263  	v_0 := v.Args[0]
  1264  	b := v.Block
  1265  	typ := &b.Func.Config.Types
  1266  	// match: (Ctz16 x)
  1267  	// result: (POPCNTW (MOVHZreg (ANDN <typ.Int16> (ADDconst <typ.Int16> [-1] x) x)))
  1268  	for {
  1269  		x := v_0
  1270  		v.reset(OpPPC64POPCNTW)
  1271  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
  1272  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int16)
  1273  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int16)
  1274  		v2.AuxInt = int64ToAuxInt(-1)
  1275  		v2.AddArg(x)
  1276  		v1.AddArg2(v2, x)
  1277  		v0.AddArg(v1)
  1278  		v.AddArg(v0)
  1279  		return true
  1280  	}
  1281  }
  1282  func rewriteValuePPC64_OpCtz32(v *Value) bool {
  1283  	v_0 := v.Args[0]
  1284  	b := v.Block
  1285  	typ := &b.Func.Config.Types
  1286  	// match: (Ctz32 x)
  1287  	// cond: buildcfg.GOPPC64<=8
  1288  	// result: (POPCNTW (MOVWZreg (ANDN <typ.Int> (ADDconst <typ.Int> [-1] x) x)))
  1289  	for {
  1290  		x := v_0
  1291  		if !(buildcfg.GOPPC64 <= 8) {
  1292  			break
  1293  		}
  1294  		v.reset(OpPPC64POPCNTW)
  1295  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
  1296  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int)
  1297  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int)
  1298  		v2.AuxInt = int64ToAuxInt(-1)
  1299  		v2.AddArg(x)
  1300  		v1.AddArg2(v2, x)
  1301  		v0.AddArg(v1)
  1302  		v.AddArg(v0)
  1303  		return true
  1304  	}
  1305  	// match: (Ctz32 x)
  1306  	// result: (CNTTZW (MOVWZreg x))
  1307  	for {
  1308  		x := v_0
  1309  		v.reset(OpPPC64CNTTZW)
  1310  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
  1311  		v0.AddArg(x)
  1312  		v.AddArg(v0)
  1313  		return true
  1314  	}
  1315  }
  1316  func rewriteValuePPC64_OpCtz64(v *Value) bool {
  1317  	v_0 := v.Args[0]
  1318  	b := v.Block
  1319  	typ := &b.Func.Config.Types
  1320  	// match: (Ctz64 x)
  1321  	// cond: buildcfg.GOPPC64<=8
  1322  	// result: (POPCNTD (ANDN <typ.Int64> (ADDconst <typ.Int64> [-1] x) x))
  1323  	for {
  1324  		x := v_0
  1325  		if !(buildcfg.GOPPC64 <= 8) {
  1326  			break
  1327  		}
  1328  		v.reset(OpPPC64POPCNTD)
  1329  		v0 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.Int64)
  1330  		v1 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.Int64)
  1331  		v1.AuxInt = int64ToAuxInt(-1)
  1332  		v1.AddArg(x)
  1333  		v0.AddArg2(v1, x)
  1334  		v.AddArg(v0)
  1335  		return true
  1336  	}
  1337  	// match: (Ctz64 x)
  1338  	// result: (CNTTZD x)
  1339  	for {
  1340  		x := v_0
  1341  		v.reset(OpPPC64CNTTZD)
  1342  		v.AddArg(x)
  1343  		return true
  1344  	}
  1345  }
  1346  func rewriteValuePPC64_OpCtz8(v *Value) bool {
  1347  	v_0 := v.Args[0]
  1348  	b := v.Block
  1349  	typ := &b.Func.Config.Types
  1350  	// match: (Ctz8 x)
  1351  	// result: (POPCNTB (MOVBZreg (ANDN <typ.UInt8> (ADDconst <typ.UInt8> [-1] x) x)))
  1352  	for {
  1353  		x := v_0
  1354  		v.reset(OpPPC64POPCNTB)
  1355  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  1356  		v1 := b.NewValue0(v.Pos, OpPPC64ANDN, typ.UInt8)
  1357  		v2 := b.NewValue0(v.Pos, OpPPC64ADDconst, typ.UInt8)
  1358  		v2.AuxInt = int64ToAuxInt(-1)
  1359  		v2.AddArg(x)
  1360  		v1.AddArg2(v2, x)
  1361  		v0.AddArg(v1)
  1362  		v.AddArg(v0)
  1363  		return true
  1364  	}
  1365  }
  1366  func rewriteValuePPC64_OpCvt32Fto32(v *Value) bool {
  1367  	v_0 := v.Args[0]
  1368  	b := v.Block
  1369  	typ := &b.Func.Config.Types
  1370  	// match: (Cvt32Fto32 x)
  1371  	// result: (MFVSRD (FCTIWZ x))
  1372  	for {
  1373  		x := v_0
  1374  		v.reset(OpPPC64MFVSRD)
  1375  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, typ.Float64)
  1376  		v0.AddArg(x)
  1377  		v.AddArg(v0)
  1378  		return true
  1379  	}
  1380  }
  1381  func rewriteValuePPC64_OpCvt32Fto64(v *Value) bool {
  1382  	v_0 := v.Args[0]
  1383  	b := v.Block
  1384  	typ := &b.Func.Config.Types
  1385  	// match: (Cvt32Fto64 x)
  1386  	// result: (MFVSRD (FCTIDZ x))
  1387  	for {
  1388  		x := v_0
  1389  		v.reset(OpPPC64MFVSRD)
  1390  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, typ.Float64)
  1391  		v0.AddArg(x)
  1392  		v.AddArg(v0)
  1393  		return true
  1394  	}
  1395  }
  1396  func rewriteValuePPC64_OpCvt32to32F(v *Value) bool {
  1397  	v_0 := v.Args[0]
  1398  	b := v.Block
  1399  	typ := &b.Func.Config.Types
  1400  	// match: (Cvt32to32F x)
  1401  	// result: (FCFIDS (MTVSRD (SignExt32to64 x)))
  1402  	for {
  1403  		x := v_0
  1404  		v.reset(OpPPC64FCFIDS)
  1405  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1406  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1407  		v1.AddArg(x)
  1408  		v0.AddArg(v1)
  1409  		v.AddArg(v0)
  1410  		return true
  1411  	}
  1412  }
  1413  func rewriteValuePPC64_OpCvt32to64F(v *Value) bool {
  1414  	v_0 := v.Args[0]
  1415  	b := v.Block
  1416  	typ := &b.Func.Config.Types
  1417  	// match: (Cvt32to64F x)
  1418  	// result: (FCFID (MTVSRD (SignExt32to64 x)))
  1419  	for {
  1420  		x := v_0
  1421  		v.reset(OpPPC64FCFID)
  1422  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1423  		v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
  1424  		v1.AddArg(x)
  1425  		v0.AddArg(v1)
  1426  		v.AddArg(v0)
  1427  		return true
  1428  	}
  1429  }
  1430  func rewriteValuePPC64_OpCvt64Fto32(v *Value) bool {
  1431  	v_0 := v.Args[0]
  1432  	b := v.Block
  1433  	typ := &b.Func.Config.Types
  1434  	// match: (Cvt64Fto32 x)
  1435  	// result: (MFVSRD (FCTIWZ x))
  1436  	for {
  1437  		x := v_0
  1438  		v.reset(OpPPC64MFVSRD)
  1439  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIWZ, typ.Float64)
  1440  		v0.AddArg(x)
  1441  		v.AddArg(v0)
  1442  		return true
  1443  	}
  1444  }
  1445  func rewriteValuePPC64_OpCvt64Fto64(v *Value) bool {
  1446  	v_0 := v.Args[0]
  1447  	b := v.Block
  1448  	typ := &b.Func.Config.Types
  1449  	// match: (Cvt64Fto64 x)
  1450  	// result: (MFVSRD (FCTIDZ x))
  1451  	for {
  1452  		x := v_0
  1453  		v.reset(OpPPC64MFVSRD)
  1454  		v0 := b.NewValue0(v.Pos, OpPPC64FCTIDZ, typ.Float64)
  1455  		v0.AddArg(x)
  1456  		v.AddArg(v0)
  1457  		return true
  1458  	}
  1459  }
  1460  func rewriteValuePPC64_OpCvt64to32F(v *Value) bool {
  1461  	v_0 := v.Args[0]
  1462  	b := v.Block
  1463  	typ := &b.Func.Config.Types
  1464  	// match: (Cvt64to32F x)
  1465  	// result: (FCFIDS (MTVSRD x))
  1466  	for {
  1467  		x := v_0
  1468  		v.reset(OpPPC64FCFIDS)
  1469  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1470  		v0.AddArg(x)
  1471  		v.AddArg(v0)
  1472  		return true
  1473  	}
  1474  }
  1475  func rewriteValuePPC64_OpCvt64to64F(v *Value) bool {
  1476  	v_0 := v.Args[0]
  1477  	b := v.Block
  1478  	typ := &b.Func.Config.Types
  1479  	// match: (Cvt64to64F x)
  1480  	// result: (FCFID (MTVSRD x))
  1481  	for {
  1482  		x := v_0
  1483  		v.reset(OpPPC64FCFID)
  1484  		v0 := b.NewValue0(v.Pos, OpPPC64MTVSRD, typ.Float64)
  1485  		v0.AddArg(x)
  1486  		v.AddArg(v0)
  1487  		return true
  1488  	}
  1489  }
  1490  func rewriteValuePPC64_OpDiv16(v *Value) bool {
  1491  	v_1 := v.Args[1]
  1492  	v_0 := v.Args[0]
  1493  	b := v.Block
  1494  	typ := &b.Func.Config.Types
  1495  	// match: (Div16 [false] x y)
  1496  	// result: (DIVW (SignExt16to32 x) (SignExt16to32 y))
  1497  	for {
  1498  		if auxIntToBool(v.AuxInt) != false {
  1499  			break
  1500  		}
  1501  		x := v_0
  1502  		y := v_1
  1503  		v.reset(OpPPC64DIVW)
  1504  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1505  		v0.AddArg(x)
  1506  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1507  		v1.AddArg(y)
  1508  		v.AddArg2(v0, v1)
  1509  		return true
  1510  	}
  1511  	return false
  1512  }
  1513  func rewriteValuePPC64_OpDiv16u(v *Value) bool {
  1514  	v_1 := v.Args[1]
  1515  	v_0 := v.Args[0]
  1516  	b := v.Block
  1517  	typ := &b.Func.Config.Types
  1518  	// match: (Div16u x y)
  1519  	// result: (DIVWU (ZeroExt16to32 x) (ZeroExt16to32 y))
  1520  	for {
  1521  		x := v_0
  1522  		y := v_1
  1523  		v.reset(OpPPC64DIVWU)
  1524  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1525  		v0.AddArg(x)
  1526  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1527  		v1.AddArg(y)
  1528  		v.AddArg2(v0, v1)
  1529  		return true
  1530  	}
  1531  }
  1532  func rewriteValuePPC64_OpDiv32(v *Value) bool {
  1533  	v_1 := v.Args[1]
  1534  	v_0 := v.Args[0]
  1535  	// match: (Div32 [false] x y)
  1536  	// result: (DIVW x y)
  1537  	for {
  1538  		if auxIntToBool(v.AuxInt) != false {
  1539  			break
  1540  		}
  1541  		x := v_0
  1542  		y := v_1
  1543  		v.reset(OpPPC64DIVW)
  1544  		v.AddArg2(x, y)
  1545  		return true
  1546  	}
  1547  	return false
  1548  }
  1549  func rewriteValuePPC64_OpDiv64(v *Value) bool {
  1550  	v_1 := v.Args[1]
  1551  	v_0 := v.Args[0]
  1552  	// match: (Div64 [false] x y)
  1553  	// result: (DIVD x y)
  1554  	for {
  1555  		if auxIntToBool(v.AuxInt) != false {
  1556  			break
  1557  		}
  1558  		x := v_0
  1559  		y := v_1
  1560  		v.reset(OpPPC64DIVD)
  1561  		v.AddArg2(x, y)
  1562  		return true
  1563  	}
  1564  	return false
  1565  }
  1566  func rewriteValuePPC64_OpDiv8(v *Value) bool {
  1567  	v_1 := v.Args[1]
  1568  	v_0 := v.Args[0]
  1569  	b := v.Block
  1570  	typ := &b.Func.Config.Types
  1571  	// match: (Div8 x y)
  1572  	// result: (DIVW (SignExt8to32 x) (SignExt8to32 y))
  1573  	for {
  1574  		x := v_0
  1575  		y := v_1
  1576  		v.reset(OpPPC64DIVW)
  1577  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1578  		v0.AddArg(x)
  1579  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1580  		v1.AddArg(y)
  1581  		v.AddArg2(v0, v1)
  1582  		return true
  1583  	}
  1584  }
  1585  func rewriteValuePPC64_OpDiv8u(v *Value) bool {
  1586  	v_1 := v.Args[1]
  1587  	v_0 := v.Args[0]
  1588  	b := v.Block
  1589  	typ := &b.Func.Config.Types
  1590  	// match: (Div8u x y)
  1591  	// result: (DIVWU (ZeroExt8to32 x) (ZeroExt8to32 y))
  1592  	for {
  1593  		x := v_0
  1594  		y := v_1
  1595  		v.reset(OpPPC64DIVWU)
  1596  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1597  		v0.AddArg(x)
  1598  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1599  		v1.AddArg(y)
  1600  		v.AddArg2(v0, v1)
  1601  		return true
  1602  	}
  1603  }
  1604  func rewriteValuePPC64_OpEq16(v *Value) bool {
  1605  	v_1 := v.Args[1]
  1606  	v_0 := v.Args[0]
  1607  	b := v.Block
  1608  	typ := &b.Func.Config.Types
  1609  	// match: (Eq16 x y)
  1610  	// cond: isSigned(x.Type) && isSigned(y.Type)
  1611  	// result: (Equal (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  1612  	for {
  1613  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1614  			x := v_0
  1615  			y := v_1
  1616  			if !(isSigned(x.Type) && isSigned(y.Type)) {
  1617  				continue
  1618  			}
  1619  			v.reset(OpPPC64Equal)
  1620  			v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1621  			v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1622  			v1.AddArg(x)
  1623  			v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1624  			v2.AddArg(y)
  1625  			v0.AddArg2(v1, v2)
  1626  			v.AddArg(v0)
  1627  			return true
  1628  		}
  1629  		break
  1630  	}
  1631  	// match: (Eq16 x y)
  1632  	// result: (Equal (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  1633  	for {
  1634  		x := v_0
  1635  		y := v_1
  1636  		v.reset(OpPPC64Equal)
  1637  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1638  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1639  		v1.AddArg(x)
  1640  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1641  		v2.AddArg(y)
  1642  		v0.AddArg2(v1, v2)
  1643  		v.AddArg(v0)
  1644  		return true
  1645  	}
  1646  }
  1647  func rewriteValuePPC64_OpEq32(v *Value) bool {
  1648  	v_1 := v.Args[1]
  1649  	v_0 := v.Args[0]
  1650  	b := v.Block
  1651  	// match: (Eq32 x y)
  1652  	// result: (Equal (CMPW x y))
  1653  	for {
  1654  		x := v_0
  1655  		y := v_1
  1656  		v.reset(OpPPC64Equal)
  1657  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1658  		v0.AddArg2(x, y)
  1659  		v.AddArg(v0)
  1660  		return true
  1661  	}
  1662  }
  1663  func rewriteValuePPC64_OpEq32F(v *Value) bool {
  1664  	v_1 := v.Args[1]
  1665  	v_0 := v.Args[0]
  1666  	b := v.Block
  1667  	// match: (Eq32F x y)
  1668  	// result: (Equal (FCMPU x y))
  1669  	for {
  1670  		x := v_0
  1671  		y := v_1
  1672  		v.reset(OpPPC64Equal)
  1673  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1674  		v0.AddArg2(x, y)
  1675  		v.AddArg(v0)
  1676  		return true
  1677  	}
  1678  }
  1679  func rewriteValuePPC64_OpEq64(v *Value) bool {
  1680  	v_1 := v.Args[1]
  1681  	v_0 := v.Args[0]
  1682  	b := v.Block
  1683  	// match: (Eq64 x y)
  1684  	// result: (Equal (CMP x y))
  1685  	for {
  1686  		x := v_0
  1687  		y := v_1
  1688  		v.reset(OpPPC64Equal)
  1689  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  1690  		v0.AddArg2(x, y)
  1691  		v.AddArg(v0)
  1692  		return true
  1693  	}
  1694  }
  1695  func rewriteValuePPC64_OpEq64F(v *Value) bool {
  1696  	v_1 := v.Args[1]
  1697  	v_0 := v.Args[0]
  1698  	b := v.Block
  1699  	// match: (Eq64F x y)
  1700  	// result: (Equal (FCMPU x y))
  1701  	for {
  1702  		x := v_0
  1703  		y := v_1
  1704  		v.reset(OpPPC64Equal)
  1705  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1706  		v0.AddArg2(x, y)
  1707  		v.AddArg(v0)
  1708  		return true
  1709  	}
  1710  }
  1711  func rewriteValuePPC64_OpEq8(v *Value) bool {
  1712  	v_1 := v.Args[1]
  1713  	v_0 := v.Args[0]
  1714  	b := v.Block
  1715  	typ := &b.Func.Config.Types
  1716  	// match: (Eq8 x y)
  1717  	// cond: isSigned(x.Type) && isSigned(y.Type)
  1718  	// result: (Equal (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  1719  	for {
  1720  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1721  			x := v_0
  1722  			y := v_1
  1723  			if !(isSigned(x.Type) && isSigned(y.Type)) {
  1724  				continue
  1725  			}
  1726  			v.reset(OpPPC64Equal)
  1727  			v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1728  			v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1729  			v1.AddArg(x)
  1730  			v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1731  			v2.AddArg(y)
  1732  			v0.AddArg2(v1, v2)
  1733  			v.AddArg(v0)
  1734  			return true
  1735  		}
  1736  		break
  1737  	}
  1738  	// match: (Eq8 x y)
  1739  	// result: (Equal (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  1740  	for {
  1741  		x := v_0
  1742  		y := v_1
  1743  		v.reset(OpPPC64Equal)
  1744  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1745  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1746  		v1.AddArg(x)
  1747  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  1748  		v2.AddArg(y)
  1749  		v0.AddArg2(v1, v2)
  1750  		v.AddArg(v0)
  1751  		return true
  1752  	}
  1753  }
  1754  func rewriteValuePPC64_OpEqB(v *Value) bool {
  1755  	v_1 := v.Args[1]
  1756  	v_0 := v.Args[0]
  1757  	b := v.Block
  1758  	typ := &b.Func.Config.Types
  1759  	// match: (EqB x y)
  1760  	// result: (ANDconst [1] (EQV x y))
  1761  	for {
  1762  		x := v_0
  1763  		y := v_1
  1764  		v.reset(OpPPC64ANDconst)
  1765  		v.AuxInt = int64ToAuxInt(1)
  1766  		v0 := b.NewValue0(v.Pos, OpPPC64EQV, typ.Int64)
  1767  		v0.AddArg2(x, y)
  1768  		v.AddArg(v0)
  1769  		return true
  1770  	}
  1771  }
  1772  func rewriteValuePPC64_OpEqPtr(v *Value) bool {
  1773  	v_1 := v.Args[1]
  1774  	v_0 := v.Args[0]
  1775  	b := v.Block
  1776  	// match: (EqPtr x y)
  1777  	// result: (Equal (CMP x y))
  1778  	for {
  1779  		x := v_0
  1780  		y := v_1
  1781  		v.reset(OpPPC64Equal)
  1782  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  1783  		v0.AddArg2(x, y)
  1784  		v.AddArg(v0)
  1785  		return true
  1786  	}
  1787  }
  1788  func rewriteValuePPC64_OpIsInBounds(v *Value) bool {
  1789  	v_1 := v.Args[1]
  1790  	v_0 := v.Args[0]
  1791  	b := v.Block
  1792  	// match: (IsInBounds idx len)
  1793  	// result: (LessThan (CMPU idx len))
  1794  	for {
  1795  		idx := v_0
  1796  		len := v_1
  1797  		v.reset(OpPPC64LessThan)
  1798  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  1799  		v0.AddArg2(idx, len)
  1800  		v.AddArg(v0)
  1801  		return true
  1802  	}
  1803  }
  1804  func rewriteValuePPC64_OpIsNonNil(v *Value) bool {
  1805  	v_0 := v.Args[0]
  1806  	b := v.Block
  1807  	// match: (IsNonNil ptr)
  1808  	// result: (NotEqual (CMPconst [0] ptr))
  1809  	for {
  1810  		ptr := v_0
  1811  		v.reset(OpPPC64NotEqual)
  1812  		v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, types.TypeFlags)
  1813  		v0.AuxInt = int64ToAuxInt(0)
  1814  		v0.AddArg(ptr)
  1815  		v.AddArg(v0)
  1816  		return true
  1817  	}
  1818  }
  1819  func rewriteValuePPC64_OpIsSliceInBounds(v *Value) bool {
  1820  	v_1 := v.Args[1]
  1821  	v_0 := v.Args[0]
  1822  	b := v.Block
  1823  	// match: (IsSliceInBounds idx len)
  1824  	// result: (LessEqual (CMPU idx len))
  1825  	for {
  1826  		idx := v_0
  1827  		len := v_1
  1828  		v.reset(OpPPC64LessEqual)
  1829  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  1830  		v0.AddArg2(idx, len)
  1831  		v.AddArg(v0)
  1832  		return true
  1833  	}
  1834  }
  1835  func rewriteValuePPC64_OpLeq16(v *Value) bool {
  1836  	v_1 := v.Args[1]
  1837  	v_0 := v.Args[0]
  1838  	b := v.Block
  1839  	typ := &b.Func.Config.Types
  1840  	// match: (Leq16 x y)
  1841  	// result: (LessEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  1842  	for {
  1843  		x := v_0
  1844  		y := v_1
  1845  		v.reset(OpPPC64LessEqual)
  1846  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1847  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1848  		v1.AddArg(x)
  1849  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  1850  		v2.AddArg(y)
  1851  		v0.AddArg2(v1, v2)
  1852  		v.AddArg(v0)
  1853  		return true
  1854  	}
  1855  }
  1856  func rewriteValuePPC64_OpLeq16U(v *Value) bool {
  1857  	v_1 := v.Args[1]
  1858  	v_0 := v.Args[0]
  1859  	b := v.Block
  1860  	typ := &b.Func.Config.Types
  1861  	// match: (Leq16U x y)
  1862  	// result: (LessEqual (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  1863  	for {
  1864  		x := v_0
  1865  		y := v_1
  1866  		v.reset(OpPPC64LessEqual)
  1867  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  1868  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1869  		v1.AddArg(x)
  1870  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  1871  		v2.AddArg(y)
  1872  		v0.AddArg2(v1, v2)
  1873  		v.AddArg(v0)
  1874  		return true
  1875  	}
  1876  }
  1877  func rewriteValuePPC64_OpLeq32(v *Value) bool {
  1878  	v_1 := v.Args[1]
  1879  	v_0 := v.Args[0]
  1880  	b := v.Block
  1881  	// match: (Leq32 x y)
  1882  	// result: (LessEqual (CMPW x y))
  1883  	for {
  1884  		x := v_0
  1885  		y := v_1
  1886  		v.reset(OpPPC64LessEqual)
  1887  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1888  		v0.AddArg2(x, y)
  1889  		v.AddArg(v0)
  1890  		return true
  1891  	}
  1892  }
  1893  func rewriteValuePPC64_OpLeq32F(v *Value) bool {
  1894  	v_1 := v.Args[1]
  1895  	v_0 := v.Args[0]
  1896  	b := v.Block
  1897  	// match: (Leq32F x y)
  1898  	// result: (FLessEqual (FCMPU x y))
  1899  	for {
  1900  		x := v_0
  1901  		y := v_1
  1902  		v.reset(OpPPC64FLessEqual)
  1903  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1904  		v0.AddArg2(x, y)
  1905  		v.AddArg(v0)
  1906  		return true
  1907  	}
  1908  }
  1909  func rewriteValuePPC64_OpLeq32U(v *Value) bool {
  1910  	v_1 := v.Args[1]
  1911  	v_0 := v.Args[0]
  1912  	b := v.Block
  1913  	// match: (Leq32U x y)
  1914  	// result: (LessEqual (CMPWU x y))
  1915  	for {
  1916  		x := v_0
  1917  		y := v_1
  1918  		v.reset(OpPPC64LessEqual)
  1919  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  1920  		v0.AddArg2(x, y)
  1921  		v.AddArg(v0)
  1922  		return true
  1923  	}
  1924  }
  1925  func rewriteValuePPC64_OpLeq64(v *Value) bool {
  1926  	v_1 := v.Args[1]
  1927  	v_0 := v.Args[0]
  1928  	b := v.Block
  1929  	// match: (Leq64 x y)
  1930  	// result: (LessEqual (CMP x y))
  1931  	for {
  1932  		x := v_0
  1933  		y := v_1
  1934  		v.reset(OpPPC64LessEqual)
  1935  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  1936  		v0.AddArg2(x, y)
  1937  		v.AddArg(v0)
  1938  		return true
  1939  	}
  1940  }
  1941  func rewriteValuePPC64_OpLeq64F(v *Value) bool {
  1942  	v_1 := v.Args[1]
  1943  	v_0 := v.Args[0]
  1944  	b := v.Block
  1945  	// match: (Leq64F x y)
  1946  	// result: (FLessEqual (FCMPU x y))
  1947  	for {
  1948  		x := v_0
  1949  		y := v_1
  1950  		v.reset(OpPPC64FLessEqual)
  1951  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  1952  		v0.AddArg2(x, y)
  1953  		v.AddArg(v0)
  1954  		return true
  1955  	}
  1956  }
  1957  func rewriteValuePPC64_OpLeq64U(v *Value) bool {
  1958  	v_1 := v.Args[1]
  1959  	v_0 := v.Args[0]
  1960  	b := v.Block
  1961  	// match: (Leq64U x y)
  1962  	// result: (LessEqual (CMPU x y))
  1963  	for {
  1964  		x := v_0
  1965  		y := v_1
  1966  		v.reset(OpPPC64LessEqual)
  1967  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  1968  		v0.AddArg2(x, y)
  1969  		v.AddArg(v0)
  1970  		return true
  1971  	}
  1972  }
  1973  func rewriteValuePPC64_OpLeq8(v *Value) bool {
  1974  	v_1 := v.Args[1]
  1975  	v_0 := v.Args[0]
  1976  	b := v.Block
  1977  	typ := &b.Func.Config.Types
  1978  	// match: (Leq8 x y)
  1979  	// result: (LessEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  1980  	for {
  1981  		x := v_0
  1982  		y := v_1
  1983  		v.reset(OpPPC64LessEqual)
  1984  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  1985  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1986  		v1.AddArg(x)
  1987  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  1988  		v2.AddArg(y)
  1989  		v0.AddArg2(v1, v2)
  1990  		v.AddArg(v0)
  1991  		return true
  1992  	}
  1993  }
  1994  func rewriteValuePPC64_OpLeq8U(v *Value) bool {
  1995  	v_1 := v.Args[1]
  1996  	v_0 := v.Args[0]
  1997  	b := v.Block
  1998  	typ := &b.Func.Config.Types
  1999  	// match: (Leq8U x y)
  2000  	// result: (LessEqual (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2001  	for {
  2002  		x := v_0
  2003  		y := v_1
  2004  		v.reset(OpPPC64LessEqual)
  2005  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2006  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2007  		v1.AddArg(x)
  2008  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2009  		v2.AddArg(y)
  2010  		v0.AddArg2(v1, v2)
  2011  		v.AddArg(v0)
  2012  		return true
  2013  	}
  2014  }
  2015  func rewriteValuePPC64_OpLess16(v *Value) bool {
  2016  	v_1 := v.Args[1]
  2017  	v_0 := v.Args[0]
  2018  	b := v.Block
  2019  	typ := &b.Func.Config.Types
  2020  	// match: (Less16 x y)
  2021  	// result: (LessThan (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  2022  	for {
  2023  		x := v_0
  2024  		y := v_1
  2025  		v.reset(OpPPC64LessThan)
  2026  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2027  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2028  		v1.AddArg(x)
  2029  		v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  2030  		v2.AddArg(y)
  2031  		v0.AddArg2(v1, v2)
  2032  		v.AddArg(v0)
  2033  		return true
  2034  	}
  2035  }
  2036  func rewriteValuePPC64_OpLess16U(v *Value) bool {
  2037  	v_1 := v.Args[1]
  2038  	v_0 := v.Args[0]
  2039  	b := v.Block
  2040  	typ := &b.Func.Config.Types
  2041  	// match: (Less16U x y)
  2042  	// result: (LessThan (CMPWU (ZeroExt16to32 x) (ZeroExt16to32 y)))
  2043  	for {
  2044  		x := v_0
  2045  		y := v_1
  2046  		v.reset(OpPPC64LessThan)
  2047  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2048  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2049  		v1.AddArg(x)
  2050  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  2051  		v2.AddArg(y)
  2052  		v0.AddArg2(v1, v2)
  2053  		v.AddArg(v0)
  2054  		return true
  2055  	}
  2056  }
  2057  func rewriteValuePPC64_OpLess32(v *Value) bool {
  2058  	v_1 := v.Args[1]
  2059  	v_0 := v.Args[0]
  2060  	b := v.Block
  2061  	// match: (Less32 x y)
  2062  	// result: (LessThan (CMPW x y))
  2063  	for {
  2064  		x := v_0
  2065  		y := v_1
  2066  		v.reset(OpPPC64LessThan)
  2067  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2068  		v0.AddArg2(x, y)
  2069  		v.AddArg(v0)
  2070  		return true
  2071  	}
  2072  }
  2073  func rewriteValuePPC64_OpLess32F(v *Value) bool {
  2074  	v_1 := v.Args[1]
  2075  	v_0 := v.Args[0]
  2076  	b := v.Block
  2077  	// match: (Less32F x y)
  2078  	// result: (FLessThan (FCMPU x y))
  2079  	for {
  2080  		x := v_0
  2081  		y := v_1
  2082  		v.reset(OpPPC64FLessThan)
  2083  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2084  		v0.AddArg2(x, y)
  2085  		v.AddArg(v0)
  2086  		return true
  2087  	}
  2088  }
  2089  func rewriteValuePPC64_OpLess32U(v *Value) bool {
  2090  	v_1 := v.Args[1]
  2091  	v_0 := v.Args[0]
  2092  	b := v.Block
  2093  	// match: (Less32U x y)
  2094  	// result: (LessThan (CMPWU x y))
  2095  	for {
  2096  		x := v_0
  2097  		y := v_1
  2098  		v.reset(OpPPC64LessThan)
  2099  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2100  		v0.AddArg2(x, y)
  2101  		v.AddArg(v0)
  2102  		return true
  2103  	}
  2104  }
  2105  func rewriteValuePPC64_OpLess64(v *Value) bool {
  2106  	v_1 := v.Args[1]
  2107  	v_0 := v.Args[0]
  2108  	b := v.Block
  2109  	// match: (Less64 x y)
  2110  	// result: (LessThan (CMP x y))
  2111  	for {
  2112  		x := v_0
  2113  		y := v_1
  2114  		v.reset(OpPPC64LessThan)
  2115  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  2116  		v0.AddArg2(x, y)
  2117  		v.AddArg(v0)
  2118  		return true
  2119  	}
  2120  }
  2121  func rewriteValuePPC64_OpLess64F(v *Value) bool {
  2122  	v_1 := v.Args[1]
  2123  	v_0 := v.Args[0]
  2124  	b := v.Block
  2125  	// match: (Less64F x y)
  2126  	// result: (FLessThan (FCMPU x y))
  2127  	for {
  2128  		x := v_0
  2129  		y := v_1
  2130  		v.reset(OpPPC64FLessThan)
  2131  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  2132  		v0.AddArg2(x, y)
  2133  		v.AddArg(v0)
  2134  		return true
  2135  	}
  2136  }
  2137  func rewriteValuePPC64_OpLess64U(v *Value) bool {
  2138  	v_1 := v.Args[1]
  2139  	v_0 := v.Args[0]
  2140  	b := v.Block
  2141  	// match: (Less64U x y)
  2142  	// result: (LessThan (CMPU x y))
  2143  	for {
  2144  		x := v_0
  2145  		y := v_1
  2146  		v.reset(OpPPC64LessThan)
  2147  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2148  		v0.AddArg2(x, y)
  2149  		v.AddArg(v0)
  2150  		return true
  2151  	}
  2152  }
  2153  func rewriteValuePPC64_OpLess8(v *Value) bool {
  2154  	v_1 := v.Args[1]
  2155  	v_0 := v.Args[0]
  2156  	b := v.Block
  2157  	typ := &b.Func.Config.Types
  2158  	// match: (Less8 x y)
  2159  	// result: (LessThan (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  2160  	for {
  2161  		x := v_0
  2162  		y := v_1
  2163  		v.reset(OpPPC64LessThan)
  2164  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  2165  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2166  		v1.AddArg(x)
  2167  		v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  2168  		v2.AddArg(y)
  2169  		v0.AddArg2(v1, v2)
  2170  		v.AddArg(v0)
  2171  		return true
  2172  	}
  2173  }
  2174  func rewriteValuePPC64_OpLess8U(v *Value) bool {
  2175  	v_1 := v.Args[1]
  2176  	v_0 := v.Args[0]
  2177  	b := v.Block
  2178  	typ := &b.Func.Config.Types
  2179  	// match: (Less8U x y)
  2180  	// result: (LessThan (CMPWU (ZeroExt8to32 x) (ZeroExt8to32 y)))
  2181  	for {
  2182  		x := v_0
  2183  		y := v_1
  2184  		v.reset(OpPPC64LessThan)
  2185  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  2186  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2187  		v1.AddArg(x)
  2188  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  2189  		v2.AddArg(y)
  2190  		v0.AddArg2(v1, v2)
  2191  		v.AddArg(v0)
  2192  		return true
  2193  	}
  2194  }
  2195  func rewriteValuePPC64_OpLoad(v *Value) bool {
  2196  	v_1 := v.Args[1]
  2197  	v_0 := v.Args[0]
  2198  	b := v.Block
  2199  	typ := &b.Func.Config.Types
  2200  	// match: (Load <t> ptr mem)
  2201  	// cond: (is64BitInt(t) || isPtr(t))
  2202  	// result: (MOVDload ptr mem)
  2203  	for {
  2204  		t := v.Type
  2205  		ptr := v_0
  2206  		mem := v_1
  2207  		if !(is64BitInt(t) || isPtr(t)) {
  2208  			break
  2209  		}
  2210  		v.reset(OpPPC64MOVDload)
  2211  		v.AddArg2(ptr, mem)
  2212  		return true
  2213  	}
  2214  	// match: (Load <t> ptr mem)
  2215  	// cond: is32BitInt(t) && isSigned(t)
  2216  	// result: (MOVWload ptr mem)
  2217  	for {
  2218  		t := v.Type
  2219  		ptr := v_0
  2220  		mem := v_1
  2221  		if !(is32BitInt(t) && isSigned(t)) {
  2222  			break
  2223  		}
  2224  		v.reset(OpPPC64MOVWload)
  2225  		v.AddArg2(ptr, mem)
  2226  		return true
  2227  	}
  2228  	// match: (Load <t> ptr mem)
  2229  	// cond: is32BitInt(t) && !isSigned(t)
  2230  	// result: (MOVWZload ptr mem)
  2231  	for {
  2232  		t := v.Type
  2233  		ptr := v_0
  2234  		mem := v_1
  2235  		if !(is32BitInt(t) && !isSigned(t)) {
  2236  			break
  2237  		}
  2238  		v.reset(OpPPC64MOVWZload)
  2239  		v.AddArg2(ptr, mem)
  2240  		return true
  2241  	}
  2242  	// match: (Load <t> ptr mem)
  2243  	// cond: is16BitInt(t) && isSigned(t)
  2244  	// result: (MOVHload ptr mem)
  2245  	for {
  2246  		t := v.Type
  2247  		ptr := v_0
  2248  		mem := v_1
  2249  		if !(is16BitInt(t) && isSigned(t)) {
  2250  			break
  2251  		}
  2252  		v.reset(OpPPC64MOVHload)
  2253  		v.AddArg2(ptr, mem)
  2254  		return true
  2255  	}
  2256  	// match: (Load <t> ptr mem)
  2257  	// cond: is16BitInt(t) && !isSigned(t)
  2258  	// result: (MOVHZload ptr mem)
  2259  	for {
  2260  		t := v.Type
  2261  		ptr := v_0
  2262  		mem := v_1
  2263  		if !(is16BitInt(t) && !isSigned(t)) {
  2264  			break
  2265  		}
  2266  		v.reset(OpPPC64MOVHZload)
  2267  		v.AddArg2(ptr, mem)
  2268  		return true
  2269  	}
  2270  	// match: (Load <t> ptr mem)
  2271  	// cond: t.IsBoolean()
  2272  	// result: (MOVBZload ptr mem)
  2273  	for {
  2274  		t := v.Type
  2275  		ptr := v_0
  2276  		mem := v_1
  2277  		if !(t.IsBoolean()) {
  2278  			break
  2279  		}
  2280  		v.reset(OpPPC64MOVBZload)
  2281  		v.AddArg2(ptr, mem)
  2282  		return true
  2283  	}
  2284  	// match: (Load <t> ptr mem)
  2285  	// cond: is8BitInt(t) && isSigned(t)
  2286  	// result: (MOVBreg (MOVBZload ptr mem))
  2287  	for {
  2288  		t := v.Type
  2289  		ptr := v_0
  2290  		mem := v_1
  2291  		if !(is8BitInt(t) && isSigned(t)) {
  2292  			break
  2293  		}
  2294  		v.reset(OpPPC64MOVBreg)
  2295  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  2296  		v0.AddArg2(ptr, mem)
  2297  		v.AddArg(v0)
  2298  		return true
  2299  	}
  2300  	// match: (Load <t> ptr mem)
  2301  	// cond: is8BitInt(t) && !isSigned(t)
  2302  	// result: (MOVBZload ptr mem)
  2303  	for {
  2304  		t := v.Type
  2305  		ptr := v_0
  2306  		mem := v_1
  2307  		if !(is8BitInt(t) && !isSigned(t)) {
  2308  			break
  2309  		}
  2310  		v.reset(OpPPC64MOVBZload)
  2311  		v.AddArg2(ptr, mem)
  2312  		return true
  2313  	}
  2314  	// match: (Load <t> ptr mem)
  2315  	// cond: is32BitFloat(t)
  2316  	// result: (FMOVSload ptr mem)
  2317  	for {
  2318  		t := v.Type
  2319  		ptr := v_0
  2320  		mem := v_1
  2321  		if !(is32BitFloat(t)) {
  2322  			break
  2323  		}
  2324  		v.reset(OpPPC64FMOVSload)
  2325  		v.AddArg2(ptr, mem)
  2326  		return true
  2327  	}
  2328  	// match: (Load <t> ptr mem)
  2329  	// cond: is64BitFloat(t)
  2330  	// result: (FMOVDload ptr mem)
  2331  	for {
  2332  		t := v.Type
  2333  		ptr := v_0
  2334  		mem := v_1
  2335  		if !(is64BitFloat(t)) {
  2336  			break
  2337  		}
  2338  		v.reset(OpPPC64FMOVDload)
  2339  		v.AddArg2(ptr, mem)
  2340  		return true
  2341  	}
  2342  	return false
  2343  }
  2344  func rewriteValuePPC64_OpLocalAddr(v *Value) bool {
  2345  	v_0 := v.Args[0]
  2346  	// match: (LocalAddr {sym} base _)
  2347  	// result: (MOVDaddr {sym} base)
  2348  	for {
  2349  		sym := auxToSym(v.Aux)
  2350  		base := v_0
  2351  		v.reset(OpPPC64MOVDaddr)
  2352  		v.Aux = symToAux(sym)
  2353  		v.AddArg(base)
  2354  		return true
  2355  	}
  2356  }
  2357  func rewriteValuePPC64_OpLsh16x16(v *Value) bool {
  2358  	v_1 := v.Args[1]
  2359  	v_0 := v.Args[0]
  2360  	b := v.Block
  2361  	typ := &b.Func.Config.Types
  2362  	// match: (Lsh16x16 x y)
  2363  	// cond: shiftIsBounded(v)
  2364  	// result: (SLW x y)
  2365  	for {
  2366  		x := v_0
  2367  		y := v_1
  2368  		if !(shiftIsBounded(v)) {
  2369  			break
  2370  		}
  2371  		v.reset(OpPPC64SLW)
  2372  		v.AddArg2(x, y)
  2373  		return true
  2374  	}
  2375  	// match: (Lsh16x16 x y)
  2376  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [16]))))
  2377  	for {
  2378  		x := v_0
  2379  		y := v_1
  2380  		v.reset(OpPPC64SLW)
  2381  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2382  		v0.AuxInt = int32ToAuxInt(0)
  2383  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2384  		v1.AuxInt = int64ToAuxInt(-1)
  2385  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2386  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2387  		v3.AddArg(y)
  2388  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2389  		v4.AuxInt = int64ToAuxInt(16)
  2390  		v2.AddArg2(v3, v4)
  2391  		v0.AddArg3(y, v1, v2)
  2392  		v.AddArg2(x, v0)
  2393  		return true
  2394  	}
  2395  }
  2396  func rewriteValuePPC64_OpLsh16x32(v *Value) bool {
  2397  	v_1 := v.Args[1]
  2398  	v_0 := v.Args[0]
  2399  	b := v.Block
  2400  	typ := &b.Func.Config.Types
  2401  	// match: (Lsh16x32 x (MOVDconst [c]))
  2402  	// cond: uint32(c) < 16
  2403  	// result: (SLWconst x [c&31])
  2404  	for {
  2405  		x := v_0
  2406  		if v_1.Op != OpPPC64MOVDconst {
  2407  			break
  2408  		}
  2409  		c := auxIntToInt64(v_1.AuxInt)
  2410  		if !(uint32(c) < 16) {
  2411  			break
  2412  		}
  2413  		v.reset(OpPPC64SLWconst)
  2414  		v.AuxInt = int64ToAuxInt(c & 31)
  2415  		v.AddArg(x)
  2416  		return true
  2417  	}
  2418  	// match: (Lsh16x32 x y)
  2419  	// cond: shiftIsBounded(v)
  2420  	// result: (SLW x y)
  2421  	for {
  2422  		x := v_0
  2423  		y := v_1
  2424  		if !(shiftIsBounded(v)) {
  2425  			break
  2426  		}
  2427  		v.reset(OpPPC64SLW)
  2428  		v.AddArg2(x, y)
  2429  		return true
  2430  	}
  2431  	// match: (Lsh16x32 x y)
  2432  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [16]))))
  2433  	for {
  2434  		x := v_0
  2435  		y := v_1
  2436  		v.reset(OpPPC64SLW)
  2437  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2438  		v0.AuxInt = int32ToAuxInt(0)
  2439  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2440  		v1.AuxInt = int64ToAuxInt(-1)
  2441  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2442  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2443  		v3.AuxInt = int64ToAuxInt(16)
  2444  		v2.AddArg2(y, v3)
  2445  		v0.AddArg3(y, v1, v2)
  2446  		v.AddArg2(x, v0)
  2447  		return true
  2448  	}
  2449  }
  2450  func rewriteValuePPC64_OpLsh16x64(v *Value) bool {
  2451  	v_1 := v.Args[1]
  2452  	v_0 := v.Args[0]
  2453  	b := v.Block
  2454  	typ := &b.Func.Config.Types
  2455  	// match: (Lsh16x64 _ (MOVDconst [c]))
  2456  	// cond: uint64(c) >= 16
  2457  	// result: (MOVDconst [0])
  2458  	for {
  2459  		if v_1.Op != OpPPC64MOVDconst {
  2460  			break
  2461  		}
  2462  		c := auxIntToInt64(v_1.AuxInt)
  2463  		if !(uint64(c) >= 16) {
  2464  			break
  2465  		}
  2466  		v.reset(OpPPC64MOVDconst)
  2467  		v.AuxInt = int64ToAuxInt(0)
  2468  		return true
  2469  	}
  2470  	// match: (Lsh16x64 x (MOVDconst [c]))
  2471  	// cond: uint64(c) < 16
  2472  	// result: (SLWconst x [c])
  2473  	for {
  2474  		x := v_0
  2475  		if v_1.Op != OpPPC64MOVDconst {
  2476  			break
  2477  		}
  2478  		c := auxIntToInt64(v_1.AuxInt)
  2479  		if !(uint64(c) < 16) {
  2480  			break
  2481  		}
  2482  		v.reset(OpPPC64SLWconst)
  2483  		v.AuxInt = int64ToAuxInt(c)
  2484  		v.AddArg(x)
  2485  		return true
  2486  	}
  2487  	// match: (Lsh16x64 x y)
  2488  	// cond: shiftIsBounded(v)
  2489  	// result: (SLW x y)
  2490  	for {
  2491  		x := v_0
  2492  		y := v_1
  2493  		if !(shiftIsBounded(v)) {
  2494  			break
  2495  		}
  2496  		v.reset(OpPPC64SLW)
  2497  		v.AddArg2(x, y)
  2498  		return true
  2499  	}
  2500  	// match: (Lsh16x64 x y)
  2501  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [16]))))
  2502  	for {
  2503  		x := v_0
  2504  		y := v_1
  2505  		v.reset(OpPPC64SLW)
  2506  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2507  		v0.AuxInt = int32ToAuxInt(0)
  2508  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2509  		v1.AuxInt = int64ToAuxInt(-1)
  2510  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2511  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2512  		v3.AuxInt = int64ToAuxInt(16)
  2513  		v2.AddArg2(y, v3)
  2514  		v0.AddArg3(y, v1, v2)
  2515  		v.AddArg2(x, v0)
  2516  		return true
  2517  	}
  2518  }
  2519  func rewriteValuePPC64_OpLsh16x8(v *Value) bool {
  2520  	v_1 := v.Args[1]
  2521  	v_0 := v.Args[0]
  2522  	b := v.Block
  2523  	typ := &b.Func.Config.Types
  2524  	// match: (Lsh16x8 x y)
  2525  	// cond: shiftIsBounded(v)
  2526  	// result: (SLW x y)
  2527  	for {
  2528  		x := v_0
  2529  		y := v_1
  2530  		if !(shiftIsBounded(v)) {
  2531  			break
  2532  		}
  2533  		v.reset(OpPPC64SLW)
  2534  		v.AddArg2(x, y)
  2535  		return true
  2536  	}
  2537  	// match: (Lsh16x8 x y)
  2538  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [16]))))
  2539  	for {
  2540  		x := v_0
  2541  		y := v_1
  2542  		v.reset(OpPPC64SLW)
  2543  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2544  		v0.AuxInt = int32ToAuxInt(0)
  2545  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2546  		v1.AuxInt = int64ToAuxInt(-1)
  2547  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2548  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2549  		v3.AddArg(y)
  2550  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2551  		v4.AuxInt = int64ToAuxInt(16)
  2552  		v2.AddArg2(v3, v4)
  2553  		v0.AddArg3(y, v1, v2)
  2554  		v.AddArg2(x, v0)
  2555  		return true
  2556  	}
  2557  }
  2558  func rewriteValuePPC64_OpLsh32x16(v *Value) bool {
  2559  	v_1 := v.Args[1]
  2560  	v_0 := v.Args[0]
  2561  	b := v.Block
  2562  	typ := &b.Func.Config.Types
  2563  	// match: (Lsh32x16 x y)
  2564  	// cond: shiftIsBounded(v)
  2565  	// result: (SLW x y)
  2566  	for {
  2567  		x := v_0
  2568  		y := v_1
  2569  		if !(shiftIsBounded(v)) {
  2570  			break
  2571  		}
  2572  		v.reset(OpPPC64SLW)
  2573  		v.AddArg2(x, y)
  2574  		return true
  2575  	}
  2576  	// match: (Lsh32x16 x y)
  2577  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [32]))))
  2578  	for {
  2579  		x := v_0
  2580  		y := v_1
  2581  		v.reset(OpPPC64SLW)
  2582  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2583  		v0.AuxInt = int32ToAuxInt(0)
  2584  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2585  		v1.AuxInt = int64ToAuxInt(-1)
  2586  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2587  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2588  		v3.AddArg(y)
  2589  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2590  		v4.AuxInt = int64ToAuxInt(32)
  2591  		v2.AddArg2(v3, v4)
  2592  		v0.AddArg3(y, v1, v2)
  2593  		v.AddArg2(x, v0)
  2594  		return true
  2595  	}
  2596  }
  2597  func rewriteValuePPC64_OpLsh32x32(v *Value) bool {
  2598  	v_1 := v.Args[1]
  2599  	v_0 := v.Args[0]
  2600  	b := v.Block
  2601  	typ := &b.Func.Config.Types
  2602  	// match: (Lsh32x32 x (MOVDconst [c]))
  2603  	// cond: uint32(c) < 32
  2604  	// result: (SLWconst x [c&31])
  2605  	for {
  2606  		x := v_0
  2607  		if v_1.Op != OpPPC64MOVDconst {
  2608  			break
  2609  		}
  2610  		c := auxIntToInt64(v_1.AuxInt)
  2611  		if !(uint32(c) < 32) {
  2612  			break
  2613  		}
  2614  		v.reset(OpPPC64SLWconst)
  2615  		v.AuxInt = int64ToAuxInt(c & 31)
  2616  		v.AddArg(x)
  2617  		return true
  2618  	}
  2619  	// match: (Lsh32x32 x y)
  2620  	// cond: shiftIsBounded(v)
  2621  	// result: (SLW x y)
  2622  	for {
  2623  		x := v_0
  2624  		y := v_1
  2625  		if !(shiftIsBounded(v)) {
  2626  			break
  2627  		}
  2628  		v.reset(OpPPC64SLW)
  2629  		v.AddArg2(x, y)
  2630  		return true
  2631  	}
  2632  	// match: (Lsh32x32 x y)
  2633  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [32]))))
  2634  	for {
  2635  		x := v_0
  2636  		y := v_1
  2637  		v.reset(OpPPC64SLW)
  2638  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2639  		v0.AuxInt = int32ToAuxInt(0)
  2640  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2641  		v1.AuxInt = int64ToAuxInt(-1)
  2642  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2643  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2644  		v3.AuxInt = int64ToAuxInt(32)
  2645  		v2.AddArg2(y, v3)
  2646  		v0.AddArg3(y, v1, v2)
  2647  		v.AddArg2(x, v0)
  2648  		return true
  2649  	}
  2650  }
  2651  func rewriteValuePPC64_OpLsh32x64(v *Value) bool {
  2652  	v_1 := v.Args[1]
  2653  	v_0 := v.Args[0]
  2654  	b := v.Block
  2655  	typ := &b.Func.Config.Types
  2656  	// match: (Lsh32x64 _ (MOVDconst [c]))
  2657  	// cond: uint64(c) >= 32
  2658  	// result: (MOVDconst [0])
  2659  	for {
  2660  		if v_1.Op != OpPPC64MOVDconst {
  2661  			break
  2662  		}
  2663  		c := auxIntToInt64(v_1.AuxInt)
  2664  		if !(uint64(c) >= 32) {
  2665  			break
  2666  		}
  2667  		v.reset(OpPPC64MOVDconst)
  2668  		v.AuxInt = int64ToAuxInt(0)
  2669  		return true
  2670  	}
  2671  	// match: (Lsh32x64 x (MOVDconst [c]))
  2672  	// cond: uint64(c) < 32
  2673  	// result: (SLWconst x [c])
  2674  	for {
  2675  		x := v_0
  2676  		if v_1.Op != OpPPC64MOVDconst {
  2677  			break
  2678  		}
  2679  		c := auxIntToInt64(v_1.AuxInt)
  2680  		if !(uint64(c) < 32) {
  2681  			break
  2682  		}
  2683  		v.reset(OpPPC64SLWconst)
  2684  		v.AuxInt = int64ToAuxInt(c)
  2685  		v.AddArg(x)
  2686  		return true
  2687  	}
  2688  	// match: (Lsh32x64 x y)
  2689  	// cond: shiftIsBounded(v)
  2690  	// result: (SLW x y)
  2691  	for {
  2692  		x := v_0
  2693  		y := v_1
  2694  		if !(shiftIsBounded(v)) {
  2695  			break
  2696  		}
  2697  		v.reset(OpPPC64SLW)
  2698  		v.AddArg2(x, y)
  2699  		return true
  2700  	}
  2701  	// match: (Lsh32x64 x (AND y (MOVDconst [31])))
  2702  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  2703  	for {
  2704  		x := v_0
  2705  		if v_1.Op != OpPPC64AND {
  2706  			break
  2707  		}
  2708  		_ = v_1.Args[1]
  2709  		v_1_0 := v_1.Args[0]
  2710  		v_1_1 := v_1.Args[1]
  2711  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
  2712  			y := v_1_0
  2713  			if v_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1.AuxInt) != 31 {
  2714  				continue
  2715  			}
  2716  			v.reset(OpPPC64SLW)
  2717  			v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  2718  			v0.AuxInt = int64ToAuxInt(31)
  2719  			v0.AddArg(y)
  2720  			v.AddArg2(x, v0)
  2721  			return true
  2722  		}
  2723  		break
  2724  	}
  2725  	// match: (Lsh32x64 x (ANDconst <typ.Int32> [31] y))
  2726  	// result: (SLW x (ANDconst <typ.Int32> [31] y))
  2727  	for {
  2728  		x := v_0
  2729  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.Int32 || auxIntToInt64(v_1.AuxInt) != 31 {
  2730  			break
  2731  		}
  2732  		y := v_1.Args[0]
  2733  		v.reset(OpPPC64SLW)
  2734  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
  2735  		v0.AuxInt = int64ToAuxInt(31)
  2736  		v0.AddArg(y)
  2737  		v.AddArg2(x, v0)
  2738  		return true
  2739  	}
  2740  	// match: (Lsh32x64 x y)
  2741  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [32]))))
  2742  	for {
  2743  		x := v_0
  2744  		y := v_1
  2745  		v.reset(OpPPC64SLW)
  2746  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2747  		v0.AuxInt = int32ToAuxInt(0)
  2748  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2749  		v1.AuxInt = int64ToAuxInt(-1)
  2750  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2751  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2752  		v3.AuxInt = int64ToAuxInt(32)
  2753  		v2.AddArg2(y, v3)
  2754  		v0.AddArg3(y, v1, v2)
  2755  		v.AddArg2(x, v0)
  2756  		return true
  2757  	}
  2758  }
  2759  func rewriteValuePPC64_OpLsh32x8(v *Value) bool {
  2760  	v_1 := v.Args[1]
  2761  	v_0 := v.Args[0]
  2762  	b := v.Block
  2763  	typ := &b.Func.Config.Types
  2764  	// match: (Lsh32x8 x y)
  2765  	// cond: shiftIsBounded(v)
  2766  	// result: (SLW x y)
  2767  	for {
  2768  		x := v_0
  2769  		y := v_1
  2770  		if !(shiftIsBounded(v)) {
  2771  			break
  2772  		}
  2773  		v.reset(OpPPC64SLW)
  2774  		v.AddArg2(x, y)
  2775  		return true
  2776  	}
  2777  	// match: (Lsh32x8 x y)
  2778  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [32]))))
  2779  	for {
  2780  		x := v_0
  2781  		y := v_1
  2782  		v.reset(OpPPC64SLW)
  2783  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2784  		v0.AuxInt = int32ToAuxInt(0)
  2785  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2786  		v1.AuxInt = int64ToAuxInt(-1)
  2787  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2788  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  2789  		v3.AddArg(y)
  2790  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2791  		v4.AuxInt = int64ToAuxInt(32)
  2792  		v2.AddArg2(v3, v4)
  2793  		v0.AddArg3(y, v1, v2)
  2794  		v.AddArg2(x, v0)
  2795  		return true
  2796  	}
  2797  }
  2798  func rewriteValuePPC64_OpLsh64x16(v *Value) bool {
  2799  	v_1 := v.Args[1]
  2800  	v_0 := v.Args[0]
  2801  	b := v.Block
  2802  	typ := &b.Func.Config.Types
  2803  	// match: (Lsh64x16 x y)
  2804  	// cond: shiftIsBounded(v)
  2805  	// result: (SLD x y)
  2806  	for {
  2807  		x := v_0
  2808  		y := v_1
  2809  		if !(shiftIsBounded(v)) {
  2810  			break
  2811  		}
  2812  		v.reset(OpPPC64SLD)
  2813  		v.AddArg2(x, y)
  2814  		return true
  2815  	}
  2816  	// match: (Lsh64x16 x y)
  2817  	// result: (SLD x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [64]))))
  2818  	for {
  2819  		x := v_0
  2820  		y := v_1
  2821  		v.reset(OpPPC64SLD)
  2822  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2823  		v0.AuxInt = int32ToAuxInt(0)
  2824  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2825  		v1.AuxInt = int64ToAuxInt(-1)
  2826  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2827  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  2828  		v3.AddArg(y)
  2829  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2830  		v4.AuxInt = int64ToAuxInt(64)
  2831  		v2.AddArg2(v3, v4)
  2832  		v0.AddArg3(y, v1, v2)
  2833  		v.AddArg2(x, v0)
  2834  		return true
  2835  	}
  2836  }
  2837  func rewriteValuePPC64_OpLsh64x32(v *Value) bool {
  2838  	v_1 := v.Args[1]
  2839  	v_0 := v.Args[0]
  2840  	b := v.Block
  2841  	typ := &b.Func.Config.Types
  2842  	// match: (Lsh64x32 x (MOVDconst [c]))
  2843  	// cond: uint32(c) < 64
  2844  	// result: (SLDconst x [c&63])
  2845  	for {
  2846  		x := v_0
  2847  		if v_1.Op != OpPPC64MOVDconst {
  2848  			break
  2849  		}
  2850  		c := auxIntToInt64(v_1.AuxInt)
  2851  		if !(uint32(c) < 64) {
  2852  			break
  2853  		}
  2854  		v.reset(OpPPC64SLDconst)
  2855  		v.AuxInt = int64ToAuxInt(c & 63)
  2856  		v.AddArg(x)
  2857  		return true
  2858  	}
  2859  	// match: (Lsh64x32 x y)
  2860  	// cond: shiftIsBounded(v)
  2861  	// result: (SLD x y)
  2862  	for {
  2863  		x := v_0
  2864  		y := v_1
  2865  		if !(shiftIsBounded(v)) {
  2866  			break
  2867  		}
  2868  		v.reset(OpPPC64SLD)
  2869  		v.AddArg2(x, y)
  2870  		return true
  2871  	}
  2872  	// match: (Lsh64x32 x y)
  2873  	// result: (SLD x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [64]))))
  2874  	for {
  2875  		x := v_0
  2876  		y := v_1
  2877  		v.reset(OpPPC64SLD)
  2878  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2879  		v0.AuxInt = int32ToAuxInt(0)
  2880  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2881  		v1.AuxInt = int64ToAuxInt(-1)
  2882  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2883  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2884  		v3.AuxInt = int64ToAuxInt(64)
  2885  		v2.AddArg2(y, v3)
  2886  		v0.AddArg3(y, v1, v2)
  2887  		v.AddArg2(x, v0)
  2888  		return true
  2889  	}
  2890  }
  2891  func rewriteValuePPC64_OpLsh64x64(v *Value) bool {
  2892  	v_1 := v.Args[1]
  2893  	v_0 := v.Args[0]
  2894  	b := v.Block
  2895  	typ := &b.Func.Config.Types
  2896  	// match: (Lsh64x64 _ (MOVDconst [c]))
  2897  	// cond: uint64(c) >= 64
  2898  	// result: (MOVDconst [0])
  2899  	for {
  2900  		if v_1.Op != OpPPC64MOVDconst {
  2901  			break
  2902  		}
  2903  		c := auxIntToInt64(v_1.AuxInt)
  2904  		if !(uint64(c) >= 64) {
  2905  			break
  2906  		}
  2907  		v.reset(OpPPC64MOVDconst)
  2908  		v.AuxInt = int64ToAuxInt(0)
  2909  		return true
  2910  	}
  2911  	// match: (Lsh64x64 x (MOVDconst [c]))
  2912  	// cond: uint64(c) < 64
  2913  	// result: (SLDconst x [c])
  2914  	for {
  2915  		x := v_0
  2916  		if v_1.Op != OpPPC64MOVDconst {
  2917  			break
  2918  		}
  2919  		c := auxIntToInt64(v_1.AuxInt)
  2920  		if !(uint64(c) < 64) {
  2921  			break
  2922  		}
  2923  		v.reset(OpPPC64SLDconst)
  2924  		v.AuxInt = int64ToAuxInt(c)
  2925  		v.AddArg(x)
  2926  		return true
  2927  	}
  2928  	// match: (Lsh64x64 x y)
  2929  	// cond: shiftIsBounded(v)
  2930  	// result: (SLD x y)
  2931  	for {
  2932  		x := v_0
  2933  		y := v_1
  2934  		if !(shiftIsBounded(v)) {
  2935  			break
  2936  		}
  2937  		v.reset(OpPPC64SLD)
  2938  		v.AddArg2(x, y)
  2939  		return true
  2940  	}
  2941  	// match: (Lsh64x64 x (AND y (MOVDconst [63])))
  2942  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  2943  	for {
  2944  		x := v_0
  2945  		if v_1.Op != OpPPC64AND {
  2946  			break
  2947  		}
  2948  		_ = v_1.Args[1]
  2949  		v_1_0 := v_1.Args[0]
  2950  		v_1_1 := v_1.Args[1]
  2951  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
  2952  			y := v_1_0
  2953  			if v_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1.AuxInt) != 63 {
  2954  				continue
  2955  			}
  2956  			v.reset(OpPPC64SLD)
  2957  			v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  2958  			v0.AuxInt = int64ToAuxInt(63)
  2959  			v0.AddArg(y)
  2960  			v.AddArg2(x, v0)
  2961  			return true
  2962  		}
  2963  		break
  2964  	}
  2965  	// match: (Lsh64x64 x (ANDconst <typ.Int64> [63] y))
  2966  	// result: (SLD x (ANDconst <typ.Int64> [63] y))
  2967  	for {
  2968  		x := v_0
  2969  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.Int64 || auxIntToInt64(v_1.AuxInt) != 63 {
  2970  			break
  2971  		}
  2972  		y := v_1.Args[0]
  2973  		v.reset(OpPPC64SLD)
  2974  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
  2975  		v0.AuxInt = int64ToAuxInt(63)
  2976  		v0.AddArg(y)
  2977  		v.AddArg2(x, v0)
  2978  		return true
  2979  	}
  2980  	// match: (Lsh64x64 x y)
  2981  	// result: (SLD x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [64]))))
  2982  	for {
  2983  		x := v_0
  2984  		y := v_1
  2985  		v.reset(OpPPC64SLD)
  2986  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  2987  		v0.AuxInt = int32ToAuxInt(0)
  2988  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2989  		v1.AuxInt = int64ToAuxInt(-1)
  2990  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  2991  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  2992  		v3.AuxInt = int64ToAuxInt(64)
  2993  		v2.AddArg2(y, v3)
  2994  		v0.AddArg3(y, v1, v2)
  2995  		v.AddArg2(x, v0)
  2996  		return true
  2997  	}
  2998  }
  2999  func rewriteValuePPC64_OpLsh64x8(v *Value) bool {
  3000  	v_1 := v.Args[1]
  3001  	v_0 := v.Args[0]
  3002  	b := v.Block
  3003  	typ := &b.Func.Config.Types
  3004  	// match: (Lsh64x8 x y)
  3005  	// cond: shiftIsBounded(v)
  3006  	// result: (SLD x y)
  3007  	for {
  3008  		x := v_0
  3009  		y := v_1
  3010  		if !(shiftIsBounded(v)) {
  3011  			break
  3012  		}
  3013  		v.reset(OpPPC64SLD)
  3014  		v.AddArg2(x, y)
  3015  		return true
  3016  	}
  3017  	// match: (Lsh64x8 x y)
  3018  	// result: (SLD x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [64]))))
  3019  	for {
  3020  		x := v_0
  3021  		y := v_1
  3022  		v.reset(OpPPC64SLD)
  3023  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  3024  		v0.AuxInt = int32ToAuxInt(0)
  3025  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3026  		v1.AuxInt = int64ToAuxInt(-1)
  3027  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  3028  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3029  		v3.AddArg(y)
  3030  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3031  		v4.AuxInt = int64ToAuxInt(64)
  3032  		v2.AddArg2(v3, v4)
  3033  		v0.AddArg3(y, v1, v2)
  3034  		v.AddArg2(x, v0)
  3035  		return true
  3036  	}
  3037  }
  3038  func rewriteValuePPC64_OpLsh8x16(v *Value) bool {
  3039  	v_1 := v.Args[1]
  3040  	v_0 := v.Args[0]
  3041  	b := v.Block
  3042  	typ := &b.Func.Config.Types
  3043  	// match: (Lsh8x16 x y)
  3044  	// cond: shiftIsBounded(v)
  3045  	// result: (SLW x y)
  3046  	for {
  3047  		x := v_0
  3048  		y := v_1
  3049  		if !(shiftIsBounded(v)) {
  3050  			break
  3051  		}
  3052  		v.reset(OpPPC64SLW)
  3053  		v.AddArg2(x, y)
  3054  		return true
  3055  	}
  3056  	// match: (Lsh8x16 x y)
  3057  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [8]))))
  3058  	for {
  3059  		x := v_0
  3060  		y := v_1
  3061  		v.reset(OpPPC64SLW)
  3062  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  3063  		v0.AuxInt = int32ToAuxInt(0)
  3064  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3065  		v1.AuxInt = int64ToAuxInt(-1)
  3066  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  3067  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  3068  		v3.AddArg(y)
  3069  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3070  		v4.AuxInt = int64ToAuxInt(8)
  3071  		v2.AddArg2(v3, v4)
  3072  		v0.AddArg3(y, v1, v2)
  3073  		v.AddArg2(x, v0)
  3074  		return true
  3075  	}
  3076  }
  3077  func rewriteValuePPC64_OpLsh8x32(v *Value) bool {
  3078  	v_1 := v.Args[1]
  3079  	v_0 := v.Args[0]
  3080  	b := v.Block
  3081  	typ := &b.Func.Config.Types
  3082  	// match: (Lsh8x32 x (MOVDconst [c]))
  3083  	// cond: uint32(c) < 8
  3084  	// result: (SLWconst x [c&7])
  3085  	for {
  3086  		x := v_0
  3087  		if v_1.Op != OpPPC64MOVDconst {
  3088  			break
  3089  		}
  3090  		c := auxIntToInt64(v_1.AuxInt)
  3091  		if !(uint32(c) < 8) {
  3092  			break
  3093  		}
  3094  		v.reset(OpPPC64SLWconst)
  3095  		v.AuxInt = int64ToAuxInt(c & 7)
  3096  		v.AddArg(x)
  3097  		return true
  3098  	}
  3099  	// match: (Lsh8x32 x y)
  3100  	// cond: shiftIsBounded(v)
  3101  	// result: (SLW x y)
  3102  	for {
  3103  		x := v_0
  3104  		y := v_1
  3105  		if !(shiftIsBounded(v)) {
  3106  			break
  3107  		}
  3108  		v.reset(OpPPC64SLW)
  3109  		v.AddArg2(x, y)
  3110  		return true
  3111  	}
  3112  	// match: (Lsh8x32 x y)
  3113  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [8]))))
  3114  	for {
  3115  		x := v_0
  3116  		y := v_1
  3117  		v.reset(OpPPC64SLW)
  3118  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  3119  		v0.AuxInt = int32ToAuxInt(0)
  3120  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3121  		v1.AuxInt = int64ToAuxInt(-1)
  3122  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  3123  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3124  		v3.AuxInt = int64ToAuxInt(8)
  3125  		v2.AddArg2(y, v3)
  3126  		v0.AddArg3(y, v1, v2)
  3127  		v.AddArg2(x, v0)
  3128  		return true
  3129  	}
  3130  }
  3131  func rewriteValuePPC64_OpLsh8x64(v *Value) bool {
  3132  	v_1 := v.Args[1]
  3133  	v_0 := v.Args[0]
  3134  	b := v.Block
  3135  	typ := &b.Func.Config.Types
  3136  	// match: (Lsh8x64 _ (MOVDconst [c]))
  3137  	// cond: uint64(c) >= 8
  3138  	// result: (MOVDconst [0])
  3139  	for {
  3140  		if v_1.Op != OpPPC64MOVDconst {
  3141  			break
  3142  		}
  3143  		c := auxIntToInt64(v_1.AuxInt)
  3144  		if !(uint64(c) >= 8) {
  3145  			break
  3146  		}
  3147  		v.reset(OpPPC64MOVDconst)
  3148  		v.AuxInt = int64ToAuxInt(0)
  3149  		return true
  3150  	}
  3151  	// match: (Lsh8x64 x (MOVDconst [c]))
  3152  	// cond: uint64(c) < 8
  3153  	// result: (SLWconst x [c])
  3154  	for {
  3155  		x := v_0
  3156  		if v_1.Op != OpPPC64MOVDconst {
  3157  			break
  3158  		}
  3159  		c := auxIntToInt64(v_1.AuxInt)
  3160  		if !(uint64(c) < 8) {
  3161  			break
  3162  		}
  3163  		v.reset(OpPPC64SLWconst)
  3164  		v.AuxInt = int64ToAuxInt(c)
  3165  		v.AddArg(x)
  3166  		return true
  3167  	}
  3168  	// match: (Lsh8x64 x y)
  3169  	// cond: shiftIsBounded(v)
  3170  	// result: (SLW x y)
  3171  	for {
  3172  		x := v_0
  3173  		y := v_1
  3174  		if !(shiftIsBounded(v)) {
  3175  			break
  3176  		}
  3177  		v.reset(OpPPC64SLW)
  3178  		v.AddArg2(x, y)
  3179  		return true
  3180  	}
  3181  	// match: (Lsh8x64 x y)
  3182  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [8]))))
  3183  	for {
  3184  		x := v_0
  3185  		y := v_1
  3186  		v.reset(OpPPC64SLW)
  3187  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  3188  		v0.AuxInt = int32ToAuxInt(0)
  3189  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3190  		v1.AuxInt = int64ToAuxInt(-1)
  3191  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  3192  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3193  		v3.AuxInt = int64ToAuxInt(8)
  3194  		v2.AddArg2(y, v3)
  3195  		v0.AddArg3(y, v1, v2)
  3196  		v.AddArg2(x, v0)
  3197  		return true
  3198  	}
  3199  }
  3200  func rewriteValuePPC64_OpLsh8x8(v *Value) bool {
  3201  	v_1 := v.Args[1]
  3202  	v_0 := v.Args[0]
  3203  	b := v.Block
  3204  	typ := &b.Func.Config.Types
  3205  	// match: (Lsh8x8 x y)
  3206  	// cond: shiftIsBounded(v)
  3207  	// result: (SLW x y)
  3208  	for {
  3209  		x := v_0
  3210  		y := v_1
  3211  		if !(shiftIsBounded(v)) {
  3212  			break
  3213  		}
  3214  		v.reset(OpPPC64SLW)
  3215  		v.AddArg2(x, y)
  3216  		return true
  3217  	}
  3218  	// match: (Lsh8x8 x y)
  3219  	// result: (SLW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [8]))))
  3220  	for {
  3221  		x := v_0
  3222  		y := v_1
  3223  		v.reset(OpPPC64SLW)
  3224  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
  3225  		v0.AuxInt = int32ToAuxInt(0)
  3226  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3227  		v1.AuxInt = int64ToAuxInt(-1)
  3228  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  3229  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  3230  		v3.AddArg(y)
  3231  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3232  		v4.AuxInt = int64ToAuxInt(8)
  3233  		v2.AddArg2(v3, v4)
  3234  		v0.AddArg3(y, v1, v2)
  3235  		v.AddArg2(x, v0)
  3236  		return true
  3237  	}
  3238  }
  3239  func rewriteValuePPC64_OpMod16(v *Value) bool {
  3240  	v_1 := v.Args[1]
  3241  	v_0 := v.Args[0]
  3242  	b := v.Block
  3243  	typ := &b.Func.Config.Types
  3244  	// match: (Mod16 x y)
  3245  	// result: (Mod32 (SignExt16to32 x) (SignExt16to32 y))
  3246  	for {
  3247  		x := v_0
  3248  		y := v_1
  3249  		v.reset(OpMod32)
  3250  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  3251  		v0.AddArg(x)
  3252  		v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  3253  		v1.AddArg(y)
  3254  		v.AddArg2(v0, v1)
  3255  		return true
  3256  	}
  3257  }
  3258  func rewriteValuePPC64_OpMod16u(v *Value) bool {
  3259  	v_1 := v.Args[1]
  3260  	v_0 := v.Args[0]
  3261  	b := v.Block
  3262  	typ := &b.Func.Config.Types
  3263  	// match: (Mod16u x y)
  3264  	// result: (Mod32u (ZeroExt16to32 x) (ZeroExt16to32 y))
  3265  	for {
  3266  		x := v_0
  3267  		y := v_1
  3268  		v.reset(OpMod32u)
  3269  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  3270  		v0.AddArg(x)
  3271  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  3272  		v1.AddArg(y)
  3273  		v.AddArg2(v0, v1)
  3274  		return true
  3275  	}
  3276  }
  3277  func rewriteValuePPC64_OpMod32(v *Value) bool {
  3278  	v_1 := v.Args[1]
  3279  	v_0 := v.Args[0]
  3280  	b := v.Block
  3281  	typ := &b.Func.Config.Types
  3282  	// match: (Mod32 x y)
  3283  	// cond: buildcfg.GOPPC64 >= 9
  3284  	// result: (MODSW x y)
  3285  	for {
  3286  		x := v_0
  3287  		y := v_1
  3288  		if !(buildcfg.GOPPC64 >= 9) {
  3289  			break
  3290  		}
  3291  		v.reset(OpPPC64MODSW)
  3292  		v.AddArg2(x, y)
  3293  		return true
  3294  	}
  3295  	// match: (Mod32 x y)
  3296  	// cond: buildcfg.GOPPC64 <= 8
  3297  	// result: (SUB x (MULLW y (DIVW x y)))
  3298  	for {
  3299  		x := v_0
  3300  		y := v_1
  3301  		if !(buildcfg.GOPPC64 <= 8) {
  3302  			break
  3303  		}
  3304  		v.reset(OpPPC64SUB)
  3305  		v0 := b.NewValue0(v.Pos, OpPPC64MULLW, typ.Int32)
  3306  		v1 := b.NewValue0(v.Pos, OpPPC64DIVW, typ.Int32)
  3307  		v1.AddArg2(x, y)
  3308  		v0.AddArg2(y, v1)
  3309  		v.AddArg2(x, v0)
  3310  		return true
  3311  	}
  3312  	return false
  3313  }
  3314  func rewriteValuePPC64_OpMod32u(v *Value) bool {
  3315  	v_1 := v.Args[1]
  3316  	v_0 := v.Args[0]
  3317  	b := v.Block
  3318  	typ := &b.Func.Config.Types
  3319  	// match: (Mod32u x y)
  3320  	// cond: buildcfg.GOPPC64 >= 9
  3321  	// result: (MODUW x y)
  3322  	for {
  3323  		x := v_0
  3324  		y := v_1
  3325  		if !(buildcfg.GOPPC64 >= 9) {
  3326  			break
  3327  		}
  3328  		v.reset(OpPPC64MODUW)
  3329  		v.AddArg2(x, y)
  3330  		return true
  3331  	}
  3332  	// match: (Mod32u x y)
  3333  	// cond: buildcfg.GOPPC64 <= 8
  3334  	// result: (SUB x (MULLW y (DIVWU x y)))
  3335  	for {
  3336  		x := v_0
  3337  		y := v_1
  3338  		if !(buildcfg.GOPPC64 <= 8) {
  3339  			break
  3340  		}
  3341  		v.reset(OpPPC64SUB)
  3342  		v0 := b.NewValue0(v.Pos, OpPPC64MULLW, typ.Int32)
  3343  		v1 := b.NewValue0(v.Pos, OpPPC64DIVWU, typ.Int32)
  3344  		v1.AddArg2(x, y)
  3345  		v0.AddArg2(y, v1)
  3346  		v.AddArg2(x, v0)
  3347  		return true
  3348  	}
  3349  	return false
  3350  }
  3351  func rewriteValuePPC64_OpMod64(v *Value) bool {
  3352  	v_1 := v.Args[1]
  3353  	v_0 := v.Args[0]
  3354  	b := v.Block
  3355  	typ := &b.Func.Config.Types
  3356  	// match: (Mod64 x y)
  3357  	// cond: buildcfg.GOPPC64 >=9
  3358  	// result: (MODSD x y)
  3359  	for {
  3360  		x := v_0
  3361  		y := v_1
  3362  		if !(buildcfg.GOPPC64 >= 9) {
  3363  			break
  3364  		}
  3365  		v.reset(OpPPC64MODSD)
  3366  		v.AddArg2(x, y)
  3367  		return true
  3368  	}
  3369  	// match: (Mod64 x y)
  3370  	// cond: buildcfg.GOPPC64 <=8
  3371  	// result: (SUB x (MULLD y (DIVD x y)))
  3372  	for {
  3373  		x := v_0
  3374  		y := v_1
  3375  		if !(buildcfg.GOPPC64 <= 8) {
  3376  			break
  3377  		}
  3378  		v.reset(OpPPC64SUB)
  3379  		v0 := b.NewValue0(v.Pos, OpPPC64MULLD, typ.Int64)
  3380  		v1 := b.NewValue0(v.Pos, OpPPC64DIVD, typ.Int64)
  3381  		v1.AddArg2(x, y)
  3382  		v0.AddArg2(y, v1)
  3383  		v.AddArg2(x, v0)
  3384  		return true
  3385  	}
  3386  	return false
  3387  }
  3388  func rewriteValuePPC64_OpMod64u(v *Value) bool {
  3389  	v_1 := v.Args[1]
  3390  	v_0 := v.Args[0]
  3391  	b := v.Block
  3392  	typ := &b.Func.Config.Types
  3393  	// match: (Mod64u x y)
  3394  	// cond: buildcfg.GOPPC64 >= 9
  3395  	// result: (MODUD x y)
  3396  	for {
  3397  		x := v_0
  3398  		y := v_1
  3399  		if !(buildcfg.GOPPC64 >= 9) {
  3400  			break
  3401  		}
  3402  		v.reset(OpPPC64MODUD)
  3403  		v.AddArg2(x, y)
  3404  		return true
  3405  	}
  3406  	// match: (Mod64u x y)
  3407  	// cond: buildcfg.GOPPC64 <= 8
  3408  	// result: (SUB x (MULLD y (DIVDU x y)))
  3409  	for {
  3410  		x := v_0
  3411  		y := v_1
  3412  		if !(buildcfg.GOPPC64 <= 8) {
  3413  			break
  3414  		}
  3415  		v.reset(OpPPC64SUB)
  3416  		v0 := b.NewValue0(v.Pos, OpPPC64MULLD, typ.Int64)
  3417  		v1 := b.NewValue0(v.Pos, OpPPC64DIVDU, typ.Int64)
  3418  		v1.AddArg2(x, y)
  3419  		v0.AddArg2(y, v1)
  3420  		v.AddArg2(x, v0)
  3421  		return true
  3422  	}
  3423  	return false
  3424  }
  3425  func rewriteValuePPC64_OpMod8(v *Value) bool {
  3426  	v_1 := v.Args[1]
  3427  	v_0 := v.Args[0]
  3428  	b := v.Block
  3429  	typ := &b.Func.Config.Types
  3430  	// match: (Mod8 x y)
  3431  	// result: (Mod32 (SignExt8to32 x) (SignExt8to32 y))
  3432  	for {
  3433  		x := v_0
  3434  		y := v_1
  3435  		v.reset(OpMod32)
  3436  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  3437  		v0.AddArg(x)
  3438  		v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  3439  		v1.AddArg(y)
  3440  		v.AddArg2(v0, v1)
  3441  		return true
  3442  	}
  3443  }
  3444  func rewriteValuePPC64_OpMod8u(v *Value) bool {
  3445  	v_1 := v.Args[1]
  3446  	v_0 := v.Args[0]
  3447  	b := v.Block
  3448  	typ := &b.Func.Config.Types
  3449  	// match: (Mod8u x y)
  3450  	// result: (Mod32u (ZeroExt8to32 x) (ZeroExt8to32 y))
  3451  	for {
  3452  		x := v_0
  3453  		y := v_1
  3454  		v.reset(OpMod32u)
  3455  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  3456  		v0.AddArg(x)
  3457  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  3458  		v1.AddArg(y)
  3459  		v.AddArg2(v0, v1)
  3460  		return true
  3461  	}
  3462  }
  3463  func rewriteValuePPC64_OpMove(v *Value) bool {
  3464  	v_2 := v.Args[2]
  3465  	v_1 := v.Args[1]
  3466  	v_0 := v.Args[0]
  3467  	b := v.Block
  3468  	typ := &b.Func.Config.Types
  3469  	// match: (Move [0] _ _ mem)
  3470  	// result: mem
  3471  	for {
  3472  		if auxIntToInt64(v.AuxInt) != 0 {
  3473  			break
  3474  		}
  3475  		mem := v_2
  3476  		v.copyOf(mem)
  3477  		return true
  3478  	}
  3479  	// match: (Move [1] dst src mem)
  3480  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3481  	for {
  3482  		if auxIntToInt64(v.AuxInt) != 1 {
  3483  			break
  3484  		}
  3485  		dst := v_0
  3486  		src := v_1
  3487  		mem := v_2
  3488  		v.reset(OpPPC64MOVBstore)
  3489  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  3490  		v0.AddArg2(src, mem)
  3491  		v.AddArg3(dst, v0, mem)
  3492  		return true
  3493  	}
  3494  	// match: (Move [2] dst src mem)
  3495  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3496  	for {
  3497  		if auxIntToInt64(v.AuxInt) != 2 {
  3498  			break
  3499  		}
  3500  		dst := v_0
  3501  		src := v_1
  3502  		mem := v_2
  3503  		v.reset(OpPPC64MOVHstore)
  3504  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  3505  		v0.AddArg2(src, mem)
  3506  		v.AddArg3(dst, v0, mem)
  3507  		return true
  3508  	}
  3509  	// match: (Move [4] dst src mem)
  3510  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3511  	for {
  3512  		if auxIntToInt64(v.AuxInt) != 4 {
  3513  			break
  3514  		}
  3515  		dst := v_0
  3516  		src := v_1
  3517  		mem := v_2
  3518  		v.reset(OpPPC64MOVWstore)
  3519  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  3520  		v0.AddArg2(src, mem)
  3521  		v.AddArg3(dst, v0, mem)
  3522  		return true
  3523  	}
  3524  	// match: (Move [8] {t} dst src mem)
  3525  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3526  	for {
  3527  		if auxIntToInt64(v.AuxInt) != 8 {
  3528  			break
  3529  		}
  3530  		dst := v_0
  3531  		src := v_1
  3532  		mem := v_2
  3533  		v.reset(OpPPC64MOVDstore)
  3534  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDload, typ.Int64)
  3535  		v0.AddArg2(src, mem)
  3536  		v.AddArg3(dst, v0, mem)
  3537  		return true
  3538  	}
  3539  	// match: (Move [3] dst src mem)
  3540  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHload src mem) mem))
  3541  	for {
  3542  		if auxIntToInt64(v.AuxInt) != 3 {
  3543  			break
  3544  		}
  3545  		dst := v_0
  3546  		src := v_1
  3547  		mem := v_2
  3548  		v.reset(OpPPC64MOVBstore)
  3549  		v.AuxInt = int32ToAuxInt(2)
  3550  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  3551  		v0.AuxInt = int32ToAuxInt(2)
  3552  		v0.AddArg2(src, mem)
  3553  		v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, types.TypeMem)
  3554  		v2 := b.NewValue0(v.Pos, OpPPC64MOVHload, typ.Int16)
  3555  		v2.AddArg2(src, mem)
  3556  		v1.AddArg3(dst, v2, mem)
  3557  		v.AddArg3(dst, v0, v1)
  3558  		return true
  3559  	}
  3560  	// match: (Move [5] dst src mem)
  3561  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3562  	for {
  3563  		if auxIntToInt64(v.AuxInt) != 5 {
  3564  			break
  3565  		}
  3566  		dst := v_0
  3567  		src := v_1
  3568  		mem := v_2
  3569  		v.reset(OpPPC64MOVBstore)
  3570  		v.AuxInt = int32ToAuxInt(4)
  3571  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  3572  		v0.AuxInt = int32ToAuxInt(4)
  3573  		v0.AddArg2(src, mem)
  3574  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  3575  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  3576  		v2.AddArg2(src, mem)
  3577  		v1.AddArg3(dst, v2, mem)
  3578  		v.AddArg3(dst, v0, v1)
  3579  		return true
  3580  	}
  3581  	// match: (Move [6] dst src mem)
  3582  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3583  	for {
  3584  		if auxIntToInt64(v.AuxInt) != 6 {
  3585  			break
  3586  		}
  3587  		dst := v_0
  3588  		src := v_1
  3589  		mem := v_2
  3590  		v.reset(OpPPC64MOVHstore)
  3591  		v.AuxInt = int32ToAuxInt(4)
  3592  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  3593  		v0.AuxInt = int32ToAuxInt(4)
  3594  		v0.AddArg2(src, mem)
  3595  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  3596  		v2 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  3597  		v2.AddArg2(src, mem)
  3598  		v1.AddArg3(dst, v2, mem)
  3599  		v.AddArg3(dst, v0, v1)
  3600  		return true
  3601  	}
  3602  	// match: (Move [7] dst src mem)
  3603  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3604  	for {
  3605  		if auxIntToInt64(v.AuxInt) != 7 {
  3606  			break
  3607  		}
  3608  		dst := v_0
  3609  		src := v_1
  3610  		mem := v_2
  3611  		v.reset(OpPPC64MOVBstore)
  3612  		v.AuxInt = int32ToAuxInt(6)
  3613  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZload, typ.UInt8)
  3614  		v0.AuxInt = int32ToAuxInt(6)
  3615  		v0.AddArg2(src, mem)
  3616  		v1 := b.NewValue0(v.Pos, OpPPC64MOVHstore, types.TypeMem)
  3617  		v1.AuxInt = int32ToAuxInt(4)
  3618  		v2 := b.NewValue0(v.Pos, OpPPC64MOVHZload, typ.UInt16)
  3619  		v2.AuxInt = int32ToAuxInt(4)
  3620  		v2.AddArg2(src, mem)
  3621  		v3 := b.NewValue0(v.Pos, OpPPC64MOVWstore, types.TypeMem)
  3622  		v4 := b.NewValue0(v.Pos, OpPPC64MOVWZload, typ.UInt32)
  3623  		v4.AddArg2(src, mem)
  3624  		v3.AddArg3(dst, v4, mem)
  3625  		v1.AddArg3(dst, v2, v3)
  3626  		v.AddArg3(dst, v0, v1)
  3627  		return true
  3628  	}
  3629  	// match: (Move [s] dst src mem)
  3630  	// cond: s > 8 && buildcfg.GOPPC64 <= 8 && logLargeCopy(v, s)
  3631  	// result: (LoweredMove [s] dst src mem)
  3632  	for {
  3633  		s := auxIntToInt64(v.AuxInt)
  3634  		dst := v_0
  3635  		src := v_1
  3636  		mem := v_2
  3637  		if !(s > 8 && buildcfg.GOPPC64 <= 8 && logLargeCopy(v, s)) {
  3638  			break
  3639  		}
  3640  		v.reset(OpPPC64LoweredMove)
  3641  		v.AuxInt = int64ToAuxInt(s)
  3642  		v.AddArg3(dst, src, mem)
  3643  		return true
  3644  	}
  3645  	// match: (Move [s] dst src mem)
  3646  	// cond: s > 8 && s <= 64 && buildcfg.GOPPC64 >= 9
  3647  	// result: (LoweredQuadMoveShort [s] dst src mem)
  3648  	for {
  3649  		s := auxIntToInt64(v.AuxInt)
  3650  		dst := v_0
  3651  		src := v_1
  3652  		mem := v_2
  3653  		if !(s > 8 && s <= 64 && buildcfg.GOPPC64 >= 9) {
  3654  			break
  3655  		}
  3656  		v.reset(OpPPC64LoweredQuadMoveShort)
  3657  		v.AuxInt = int64ToAuxInt(s)
  3658  		v.AddArg3(dst, src, mem)
  3659  		return true
  3660  	}
  3661  	// match: (Move [s] dst src mem)
  3662  	// cond: s > 8 && buildcfg.GOPPC64 >= 9 && logLargeCopy(v, s)
  3663  	// result: (LoweredQuadMove [s] dst src mem)
  3664  	for {
  3665  		s := auxIntToInt64(v.AuxInt)
  3666  		dst := v_0
  3667  		src := v_1
  3668  		mem := v_2
  3669  		if !(s > 8 && buildcfg.GOPPC64 >= 9 && logLargeCopy(v, s)) {
  3670  			break
  3671  		}
  3672  		v.reset(OpPPC64LoweredQuadMove)
  3673  		v.AuxInt = int64ToAuxInt(s)
  3674  		v.AddArg3(dst, src, mem)
  3675  		return true
  3676  	}
  3677  	return false
  3678  }
  3679  func rewriteValuePPC64_OpNeq16(v *Value) bool {
  3680  	v_1 := v.Args[1]
  3681  	v_0 := v.Args[0]
  3682  	b := v.Block
  3683  	typ := &b.Func.Config.Types
  3684  	// match: (Neq16 x y)
  3685  	// cond: isSigned(x.Type) && isSigned(y.Type)
  3686  	// result: (NotEqual (CMPW (SignExt16to32 x) (SignExt16to32 y)))
  3687  	for {
  3688  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3689  			x := v_0
  3690  			y := v_1
  3691  			if !(isSigned(x.Type) && isSigned(y.Type)) {
  3692  				continue
  3693  			}
  3694  			v.reset(OpPPC64NotEqual)
  3695  			v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  3696  			v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  3697  			v1.AddArg(x)
  3698  			v2 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
  3699  			v2.AddArg(y)
  3700  			v0.AddArg2(v1, v2)
  3701  			v.AddArg(v0)
  3702  			return true
  3703  		}
  3704  		break
  3705  	}
  3706  	// match: (Neq16 x y)
  3707  	// result: (NotEqual (CMPW (ZeroExt16to32 x) (ZeroExt16to32 y)))
  3708  	for {
  3709  		x := v_0
  3710  		y := v_1
  3711  		v.reset(OpPPC64NotEqual)
  3712  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  3713  		v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  3714  		v1.AddArg(x)
  3715  		v2 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
  3716  		v2.AddArg(y)
  3717  		v0.AddArg2(v1, v2)
  3718  		v.AddArg(v0)
  3719  		return true
  3720  	}
  3721  }
  3722  func rewriteValuePPC64_OpNeq32(v *Value) bool {
  3723  	v_1 := v.Args[1]
  3724  	v_0 := v.Args[0]
  3725  	b := v.Block
  3726  	// match: (Neq32 x y)
  3727  	// result: (NotEqual (CMPW x y))
  3728  	for {
  3729  		x := v_0
  3730  		y := v_1
  3731  		v.reset(OpPPC64NotEqual)
  3732  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  3733  		v0.AddArg2(x, y)
  3734  		v.AddArg(v0)
  3735  		return true
  3736  	}
  3737  }
  3738  func rewriteValuePPC64_OpNeq32F(v *Value) bool {
  3739  	v_1 := v.Args[1]
  3740  	v_0 := v.Args[0]
  3741  	b := v.Block
  3742  	// match: (Neq32F x y)
  3743  	// result: (NotEqual (FCMPU x y))
  3744  	for {
  3745  		x := v_0
  3746  		y := v_1
  3747  		v.reset(OpPPC64NotEqual)
  3748  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  3749  		v0.AddArg2(x, y)
  3750  		v.AddArg(v0)
  3751  		return true
  3752  	}
  3753  }
  3754  func rewriteValuePPC64_OpNeq64(v *Value) bool {
  3755  	v_1 := v.Args[1]
  3756  	v_0 := v.Args[0]
  3757  	b := v.Block
  3758  	// match: (Neq64 x y)
  3759  	// result: (NotEqual (CMP x y))
  3760  	for {
  3761  		x := v_0
  3762  		y := v_1
  3763  		v.reset(OpPPC64NotEqual)
  3764  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  3765  		v0.AddArg2(x, y)
  3766  		v.AddArg(v0)
  3767  		return true
  3768  	}
  3769  }
  3770  func rewriteValuePPC64_OpNeq64F(v *Value) bool {
  3771  	v_1 := v.Args[1]
  3772  	v_0 := v.Args[0]
  3773  	b := v.Block
  3774  	// match: (Neq64F x y)
  3775  	// result: (NotEqual (FCMPU x y))
  3776  	for {
  3777  		x := v_0
  3778  		y := v_1
  3779  		v.reset(OpPPC64NotEqual)
  3780  		v0 := b.NewValue0(v.Pos, OpPPC64FCMPU, types.TypeFlags)
  3781  		v0.AddArg2(x, y)
  3782  		v.AddArg(v0)
  3783  		return true
  3784  	}
  3785  }
  3786  func rewriteValuePPC64_OpNeq8(v *Value) bool {
  3787  	v_1 := v.Args[1]
  3788  	v_0 := v.Args[0]
  3789  	b := v.Block
  3790  	typ := &b.Func.Config.Types
  3791  	// match: (Neq8 x y)
  3792  	// cond: isSigned(x.Type) && isSigned(y.Type)
  3793  	// result: (NotEqual (CMPW (SignExt8to32 x) (SignExt8to32 y)))
  3794  	for {
  3795  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3796  			x := v_0
  3797  			y := v_1
  3798  			if !(isSigned(x.Type) && isSigned(y.Type)) {
  3799  				continue
  3800  			}
  3801  			v.reset(OpPPC64NotEqual)
  3802  			v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  3803  			v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  3804  			v1.AddArg(x)
  3805  			v2 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
  3806  			v2.AddArg(y)
  3807  			v0.AddArg2(v1, v2)
  3808  			v.AddArg(v0)
  3809  			return true
  3810  		}
  3811  		break
  3812  	}
  3813  	// match: (Neq8 x y)
  3814  	// result: (NotEqual (CMPW (ZeroExt8to32 x) (ZeroExt8to32 y)))
  3815  	for {
  3816  		x := v_0
  3817  		y := v_1
  3818  		v.reset(OpPPC64NotEqual)
  3819  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  3820  		v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  3821  		v1.AddArg(x)
  3822  		v2 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
  3823  		v2.AddArg(y)
  3824  		v0.AddArg2(v1, v2)
  3825  		v.AddArg(v0)
  3826  		return true
  3827  	}
  3828  }
  3829  func rewriteValuePPC64_OpNeqPtr(v *Value) bool {
  3830  	v_1 := v.Args[1]
  3831  	v_0 := v.Args[0]
  3832  	b := v.Block
  3833  	// match: (NeqPtr x y)
  3834  	// result: (NotEqual (CMP x y))
  3835  	for {
  3836  		x := v_0
  3837  		y := v_1
  3838  		v.reset(OpPPC64NotEqual)
  3839  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  3840  		v0.AddArg2(x, y)
  3841  		v.AddArg(v0)
  3842  		return true
  3843  	}
  3844  }
  3845  func rewriteValuePPC64_OpNot(v *Value) bool {
  3846  	v_0 := v.Args[0]
  3847  	// match: (Not x)
  3848  	// result: (XORconst [1] x)
  3849  	for {
  3850  		x := v_0
  3851  		v.reset(OpPPC64XORconst)
  3852  		v.AuxInt = int64ToAuxInt(1)
  3853  		v.AddArg(x)
  3854  		return true
  3855  	}
  3856  }
  3857  func rewriteValuePPC64_OpOffPtr(v *Value) bool {
  3858  	v_0 := v.Args[0]
  3859  	b := v.Block
  3860  	typ := &b.Func.Config.Types
  3861  	// match: (OffPtr [off] ptr)
  3862  	// result: (ADD (MOVDconst <typ.Int64> [off]) ptr)
  3863  	for {
  3864  		off := auxIntToInt64(v.AuxInt)
  3865  		ptr := v_0
  3866  		v.reset(OpPPC64ADD)
  3867  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  3868  		v0.AuxInt = int64ToAuxInt(off)
  3869  		v.AddArg2(v0, ptr)
  3870  		return true
  3871  	}
  3872  }
  3873  func rewriteValuePPC64_OpPPC64ADD(v *Value) bool {
  3874  	v_1 := v.Args[1]
  3875  	v_0 := v.Args[0]
  3876  	b := v.Block
  3877  	typ := &b.Func.Config.Types
  3878  	// match: (ADD l:(MULLD x y) z)
  3879  	// cond: buildcfg.GOPPC64 >= 9 && l.Uses == 1 && clobber(l)
  3880  	// result: (MADDLD x y z)
  3881  	for {
  3882  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3883  			l := v_0
  3884  			if l.Op != OpPPC64MULLD {
  3885  				continue
  3886  			}
  3887  			y := l.Args[1]
  3888  			x := l.Args[0]
  3889  			z := v_1
  3890  			if !(buildcfg.GOPPC64 >= 9 && l.Uses == 1 && clobber(l)) {
  3891  				continue
  3892  			}
  3893  			v.reset(OpPPC64MADDLD)
  3894  			v.AddArg3(x, y, z)
  3895  			return true
  3896  		}
  3897  		break
  3898  	}
  3899  	// match: (ADD (SLDconst x [c]) (SRDconst x [d]))
  3900  	// cond: d == 64-c
  3901  	// result: (ROTLconst [c] x)
  3902  	for {
  3903  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3904  			if v_0.Op != OpPPC64SLDconst {
  3905  				continue
  3906  			}
  3907  			c := auxIntToInt64(v_0.AuxInt)
  3908  			x := v_0.Args[0]
  3909  			if v_1.Op != OpPPC64SRDconst {
  3910  				continue
  3911  			}
  3912  			d := auxIntToInt64(v_1.AuxInt)
  3913  			if x != v_1.Args[0] || !(d == 64-c) {
  3914  				continue
  3915  			}
  3916  			v.reset(OpPPC64ROTLconst)
  3917  			v.AuxInt = int64ToAuxInt(c)
  3918  			v.AddArg(x)
  3919  			return true
  3920  		}
  3921  		break
  3922  	}
  3923  	// match: (ADD (SLWconst x [c]) (SRWconst x [d]))
  3924  	// cond: d == 32-c
  3925  	// result: (ROTLWconst [c] x)
  3926  	for {
  3927  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3928  			if v_0.Op != OpPPC64SLWconst {
  3929  				continue
  3930  			}
  3931  			c := auxIntToInt64(v_0.AuxInt)
  3932  			x := v_0.Args[0]
  3933  			if v_1.Op != OpPPC64SRWconst {
  3934  				continue
  3935  			}
  3936  			d := auxIntToInt64(v_1.AuxInt)
  3937  			if x != v_1.Args[0] || !(d == 32-c) {
  3938  				continue
  3939  			}
  3940  			v.reset(OpPPC64ROTLWconst)
  3941  			v.AuxInt = int64ToAuxInt(c)
  3942  			v.AddArg(x)
  3943  			return true
  3944  		}
  3945  		break
  3946  	}
  3947  	// match: (ADD (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
  3948  	// result: (ROTL x y)
  3949  	for {
  3950  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3951  			if v_0.Op != OpPPC64SLD {
  3952  				continue
  3953  			}
  3954  			_ = v_0.Args[1]
  3955  			x := v_0.Args[0]
  3956  			v_0_1 := v_0.Args[1]
  3957  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || auxIntToInt64(v_0_1.AuxInt) != 63 {
  3958  				continue
  3959  			}
  3960  			y := v_0_1.Args[0]
  3961  			if v_1.Op != OpPPC64SRD {
  3962  				continue
  3963  			}
  3964  			_ = v_1.Args[1]
  3965  			if x != v_1.Args[0] {
  3966  				continue
  3967  			}
  3968  			v_1_1 := v_1.Args[1]
  3969  			if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
  3970  				continue
  3971  			}
  3972  			_ = v_1_1.Args[1]
  3973  			v_1_1_0 := v_1_1.Args[0]
  3974  			if v_1_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_0.AuxInt) != 64 {
  3975  				continue
  3976  			}
  3977  			v_1_1_1 := v_1_1.Args[1]
  3978  			if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || auxIntToInt64(v_1_1_1.AuxInt) != 63 || y != v_1_1_1.Args[0] {
  3979  				continue
  3980  			}
  3981  			v.reset(OpPPC64ROTL)
  3982  			v.AddArg2(x, y)
  3983  			return true
  3984  		}
  3985  		break
  3986  	}
  3987  	// match: (ADD (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y))))
  3988  	// result: (ROTL x y)
  3989  	for {
  3990  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3991  			if v_0.Op != OpPPC64SLD {
  3992  				continue
  3993  			}
  3994  			_ = v_0.Args[1]
  3995  			x := v_0.Args[0]
  3996  			v_0_1 := v_0.Args[1]
  3997  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || auxIntToInt64(v_0_1.AuxInt) != 63 {
  3998  				continue
  3999  			}
  4000  			y := v_0_1.Args[0]
  4001  			if v_1.Op != OpPPC64SRD {
  4002  				continue
  4003  			}
  4004  			_ = v_1.Args[1]
  4005  			if x != v_1.Args[0] {
  4006  				continue
  4007  			}
  4008  			v_1_1 := v_1.Args[1]
  4009  			if v_1_1.Op != OpPPC64SUBFCconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 64 {
  4010  				continue
  4011  			}
  4012  			v_1_1_0 := v_1_1.Args[0]
  4013  			if v_1_1_0.Op != OpPPC64ANDconst || v_1_1_0.Type != typ.UInt || auxIntToInt64(v_1_1_0.AuxInt) != 63 || y != v_1_1_0.Args[0] {
  4014  				continue
  4015  			}
  4016  			v.reset(OpPPC64ROTL)
  4017  			v.AddArg2(x, y)
  4018  			return true
  4019  		}
  4020  		break
  4021  	}
  4022  	// match: (ADD (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y))))
  4023  	// result: (ROTLW x y)
  4024  	for {
  4025  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4026  			if v_0.Op != OpPPC64SLW {
  4027  				continue
  4028  			}
  4029  			_ = v_0.Args[1]
  4030  			x := v_0.Args[0]
  4031  			v_0_1 := v_0.Args[1]
  4032  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || auxIntToInt64(v_0_1.AuxInt) != 31 {
  4033  				continue
  4034  			}
  4035  			y := v_0_1.Args[0]
  4036  			if v_1.Op != OpPPC64SRW {
  4037  				continue
  4038  			}
  4039  			_ = v_1.Args[1]
  4040  			if x != v_1.Args[0] {
  4041  				continue
  4042  			}
  4043  			v_1_1 := v_1.Args[1]
  4044  			if v_1_1.Op != OpPPC64SUBFCconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 32 {
  4045  				continue
  4046  			}
  4047  			v_1_1_0 := v_1_1.Args[0]
  4048  			if v_1_1_0.Op != OpPPC64ANDconst || v_1_1_0.Type != typ.UInt || auxIntToInt64(v_1_1_0.AuxInt) != 31 || y != v_1_1_0.Args[0] {
  4049  				continue
  4050  			}
  4051  			v.reset(OpPPC64ROTLW)
  4052  			v.AddArg2(x, y)
  4053  			return true
  4054  		}
  4055  		break
  4056  	}
  4057  	// match: (ADD (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
  4058  	// result: (ROTLW x y)
  4059  	for {
  4060  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4061  			if v_0.Op != OpPPC64SLW {
  4062  				continue
  4063  			}
  4064  			_ = v_0.Args[1]
  4065  			x := v_0.Args[0]
  4066  			v_0_1 := v_0.Args[1]
  4067  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || auxIntToInt64(v_0_1.AuxInt) != 31 {
  4068  				continue
  4069  			}
  4070  			y := v_0_1.Args[0]
  4071  			if v_1.Op != OpPPC64SRW {
  4072  				continue
  4073  			}
  4074  			_ = v_1.Args[1]
  4075  			if x != v_1.Args[0] {
  4076  				continue
  4077  			}
  4078  			v_1_1 := v_1.Args[1]
  4079  			if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
  4080  				continue
  4081  			}
  4082  			_ = v_1_1.Args[1]
  4083  			v_1_1_0 := v_1_1.Args[0]
  4084  			if v_1_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_0.AuxInt) != 32 {
  4085  				continue
  4086  			}
  4087  			v_1_1_1 := v_1_1.Args[1]
  4088  			if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || auxIntToInt64(v_1_1_1.AuxInt) != 31 || y != v_1_1_1.Args[0] {
  4089  				continue
  4090  			}
  4091  			v.reset(OpPPC64ROTLW)
  4092  			v.AddArg2(x, y)
  4093  			return true
  4094  		}
  4095  		break
  4096  	}
  4097  	// match: (ADD x (MOVDconst [c]))
  4098  	// cond: is32Bit(c)
  4099  	// result: (ADDconst [c] x)
  4100  	for {
  4101  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4102  			x := v_0
  4103  			if v_1.Op != OpPPC64MOVDconst {
  4104  				continue
  4105  			}
  4106  			c := auxIntToInt64(v_1.AuxInt)
  4107  			if !(is32Bit(c)) {
  4108  				continue
  4109  			}
  4110  			v.reset(OpPPC64ADDconst)
  4111  			v.AuxInt = int64ToAuxInt(c)
  4112  			v.AddArg(x)
  4113  			return true
  4114  		}
  4115  		break
  4116  	}
  4117  	return false
  4118  }
  4119  func rewriteValuePPC64_OpPPC64ADDconst(v *Value) bool {
  4120  	v_0 := v.Args[0]
  4121  	// match: (ADDconst [c] (ADDconst [d] x))
  4122  	// cond: is32Bit(c+d)
  4123  	// result: (ADDconst [c+d] x)
  4124  	for {
  4125  		c := auxIntToInt64(v.AuxInt)
  4126  		if v_0.Op != OpPPC64ADDconst {
  4127  			break
  4128  		}
  4129  		d := auxIntToInt64(v_0.AuxInt)
  4130  		x := v_0.Args[0]
  4131  		if !(is32Bit(c + d)) {
  4132  			break
  4133  		}
  4134  		v.reset(OpPPC64ADDconst)
  4135  		v.AuxInt = int64ToAuxInt(c + d)
  4136  		v.AddArg(x)
  4137  		return true
  4138  	}
  4139  	// match: (ADDconst [0] x)
  4140  	// result: x
  4141  	for {
  4142  		if auxIntToInt64(v.AuxInt) != 0 {
  4143  			break
  4144  		}
  4145  		x := v_0
  4146  		v.copyOf(x)
  4147  		return true
  4148  	}
  4149  	// match: (ADDconst [c] (MOVDaddr [d] {sym} x))
  4150  	// cond: is32Bit(c+int64(d))
  4151  	// result: (MOVDaddr [int32(c+int64(d))] {sym} x)
  4152  	for {
  4153  		c := auxIntToInt64(v.AuxInt)
  4154  		if v_0.Op != OpPPC64MOVDaddr {
  4155  			break
  4156  		}
  4157  		d := auxIntToInt32(v_0.AuxInt)
  4158  		sym := auxToSym(v_0.Aux)
  4159  		x := v_0.Args[0]
  4160  		if !(is32Bit(c + int64(d))) {
  4161  			break
  4162  		}
  4163  		v.reset(OpPPC64MOVDaddr)
  4164  		v.AuxInt = int32ToAuxInt(int32(c + int64(d)))
  4165  		v.Aux = symToAux(sym)
  4166  		v.AddArg(x)
  4167  		return true
  4168  	}
  4169  	// match: (ADDconst [c] x:(SP))
  4170  	// cond: is32Bit(c)
  4171  	// result: (MOVDaddr [int32(c)] x)
  4172  	for {
  4173  		c := auxIntToInt64(v.AuxInt)
  4174  		x := v_0
  4175  		if x.Op != OpSP || !(is32Bit(c)) {
  4176  			break
  4177  		}
  4178  		v.reset(OpPPC64MOVDaddr)
  4179  		v.AuxInt = int32ToAuxInt(int32(c))
  4180  		v.AddArg(x)
  4181  		return true
  4182  	}
  4183  	// match: (ADDconst [c] (SUBFCconst [d] x))
  4184  	// cond: is32Bit(c+d)
  4185  	// result: (SUBFCconst [c+d] x)
  4186  	for {
  4187  		c := auxIntToInt64(v.AuxInt)
  4188  		if v_0.Op != OpPPC64SUBFCconst {
  4189  			break
  4190  		}
  4191  		d := auxIntToInt64(v_0.AuxInt)
  4192  		x := v_0.Args[0]
  4193  		if !(is32Bit(c + d)) {
  4194  			break
  4195  		}
  4196  		v.reset(OpPPC64SUBFCconst)
  4197  		v.AuxInt = int64ToAuxInt(c + d)
  4198  		v.AddArg(x)
  4199  		return true
  4200  	}
  4201  	return false
  4202  }
  4203  func rewriteValuePPC64_OpPPC64AND(v *Value) bool {
  4204  	v_1 := v.Args[1]
  4205  	v_0 := v.Args[0]
  4206  	// match: (AND (MOVDconst [m]) (ROTLWconst [r] x))
  4207  	// cond: isPPC64WordRotateMask(m)
  4208  	// result: (RLWINM [encodePPC64RotateMask(r,m,32)] x)
  4209  	for {
  4210  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4211  			if v_0.Op != OpPPC64MOVDconst {
  4212  				continue
  4213  			}
  4214  			m := auxIntToInt64(v_0.AuxInt)
  4215  			if v_1.Op != OpPPC64ROTLWconst {
  4216  				continue
  4217  			}
  4218  			r := auxIntToInt64(v_1.AuxInt)
  4219  			x := v_1.Args[0]
  4220  			if !(isPPC64WordRotateMask(m)) {
  4221  				continue
  4222  			}
  4223  			v.reset(OpPPC64RLWINM)
  4224  			v.AuxInt = int64ToAuxInt(encodePPC64RotateMask(r, m, 32))
  4225  			v.AddArg(x)
  4226  			return true
  4227  		}
  4228  		break
  4229  	}
  4230  	// match: (AND (MOVDconst [m]) (ROTLW x r))
  4231  	// cond: isPPC64WordRotateMask(m)
  4232  	// result: (RLWNM [encodePPC64RotateMask(0,m,32)] x r)
  4233  	for {
  4234  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4235  			if v_0.Op != OpPPC64MOVDconst {
  4236  				continue
  4237  			}
  4238  			m := auxIntToInt64(v_0.AuxInt)
  4239  			if v_1.Op != OpPPC64ROTLW {
  4240  				continue
  4241  			}
  4242  			r := v_1.Args[1]
  4243  			x := v_1.Args[0]
  4244  			if !(isPPC64WordRotateMask(m)) {
  4245  				continue
  4246  			}
  4247  			v.reset(OpPPC64RLWNM)
  4248  			v.AuxInt = int64ToAuxInt(encodePPC64RotateMask(0, m, 32))
  4249  			v.AddArg2(x, r)
  4250  			return true
  4251  		}
  4252  		break
  4253  	}
  4254  	// match: (AND (MOVDconst [m]) (SRWconst x [s]))
  4255  	// cond: mergePPC64RShiftMask(m,s,32) == 0
  4256  	// result: (MOVDconst [0])
  4257  	for {
  4258  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4259  			if v_0.Op != OpPPC64MOVDconst {
  4260  				continue
  4261  			}
  4262  			m := auxIntToInt64(v_0.AuxInt)
  4263  			if v_1.Op != OpPPC64SRWconst {
  4264  				continue
  4265  			}
  4266  			s := auxIntToInt64(v_1.AuxInt)
  4267  			if !(mergePPC64RShiftMask(m, s, 32) == 0) {
  4268  				continue
  4269  			}
  4270  			v.reset(OpPPC64MOVDconst)
  4271  			v.AuxInt = int64ToAuxInt(0)
  4272  			return true
  4273  		}
  4274  		break
  4275  	}
  4276  	// match: (AND (MOVDconst [m]) (SRWconst x [s]))
  4277  	// cond: mergePPC64AndSrwi(m,s) != 0
  4278  	// result: (RLWINM [mergePPC64AndSrwi(m,s)] x)
  4279  	for {
  4280  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4281  			if v_0.Op != OpPPC64MOVDconst {
  4282  				continue
  4283  			}
  4284  			m := auxIntToInt64(v_0.AuxInt)
  4285  			if v_1.Op != OpPPC64SRWconst {
  4286  				continue
  4287  			}
  4288  			s := auxIntToInt64(v_1.AuxInt)
  4289  			x := v_1.Args[0]
  4290  			if !(mergePPC64AndSrwi(m, s) != 0) {
  4291  				continue
  4292  			}
  4293  			v.reset(OpPPC64RLWINM)
  4294  			v.AuxInt = int64ToAuxInt(mergePPC64AndSrwi(m, s))
  4295  			v.AddArg(x)
  4296  			return true
  4297  		}
  4298  		break
  4299  	}
  4300  	// match: (AND x (NOR y y))
  4301  	// result: (ANDN x y)
  4302  	for {
  4303  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4304  			x := v_0
  4305  			if v_1.Op != OpPPC64NOR {
  4306  				continue
  4307  			}
  4308  			y := v_1.Args[1]
  4309  			if y != v_1.Args[0] {
  4310  				continue
  4311  			}
  4312  			v.reset(OpPPC64ANDN)
  4313  			v.AddArg2(x, y)
  4314  			return true
  4315  		}
  4316  		break
  4317  	}
  4318  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  4319  	// result: (MOVDconst [c&d])
  4320  	for {
  4321  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4322  			if v_0.Op != OpPPC64MOVDconst {
  4323  				continue
  4324  			}
  4325  			c := auxIntToInt64(v_0.AuxInt)
  4326  			if v_1.Op != OpPPC64MOVDconst {
  4327  				continue
  4328  			}
  4329  			d := auxIntToInt64(v_1.AuxInt)
  4330  			v.reset(OpPPC64MOVDconst)
  4331  			v.AuxInt = int64ToAuxInt(c & d)
  4332  			return true
  4333  		}
  4334  		break
  4335  	}
  4336  	// match: (AND x (MOVDconst [c]))
  4337  	// cond: isU16Bit(c)
  4338  	// result: (ANDconst [c] x)
  4339  	for {
  4340  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4341  			x := v_0
  4342  			if v_1.Op != OpPPC64MOVDconst {
  4343  				continue
  4344  			}
  4345  			c := auxIntToInt64(v_1.AuxInt)
  4346  			if !(isU16Bit(c)) {
  4347  				continue
  4348  			}
  4349  			v.reset(OpPPC64ANDconst)
  4350  			v.AuxInt = int64ToAuxInt(c)
  4351  			v.AddArg(x)
  4352  			return true
  4353  		}
  4354  		break
  4355  	}
  4356  	// match: (AND (MOVDconst [c]) y:(MOVWZreg _))
  4357  	// cond: c&0xFFFFFFFF == 0xFFFFFFFF
  4358  	// result: y
  4359  	for {
  4360  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4361  			if v_0.Op != OpPPC64MOVDconst {
  4362  				continue
  4363  			}
  4364  			c := auxIntToInt64(v_0.AuxInt)
  4365  			y := v_1
  4366  			if y.Op != OpPPC64MOVWZreg || !(c&0xFFFFFFFF == 0xFFFFFFFF) {
  4367  				continue
  4368  			}
  4369  			v.copyOf(y)
  4370  			return true
  4371  		}
  4372  		break
  4373  	}
  4374  	// match: (AND (MOVDconst [0xFFFFFFFF]) y:(MOVWreg x))
  4375  	// result: (MOVWZreg x)
  4376  	for {
  4377  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4378  			if v_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0.AuxInt) != 0xFFFFFFFF {
  4379  				continue
  4380  			}
  4381  			y := v_1
  4382  			if y.Op != OpPPC64MOVWreg {
  4383  				continue
  4384  			}
  4385  			x := y.Args[0]
  4386  			v.reset(OpPPC64MOVWZreg)
  4387  			v.AddArg(x)
  4388  			return true
  4389  		}
  4390  		break
  4391  	}
  4392  	// match: (AND (MOVDconst [c]) x:(MOVBZload _ _))
  4393  	// result: (ANDconst [c&0xFF] x)
  4394  	for {
  4395  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  4396  			if v_0.Op != OpPPC64MOVDconst {
  4397  				continue
  4398  			}
  4399  			c := auxIntToInt64(v_0.AuxInt)
  4400  			x := v_1
  4401  			if x.Op != OpPPC64MOVBZload {
  4402  				continue
  4403  			}
  4404  			v.reset(OpPPC64ANDconst)
  4405  			v.AuxInt = int64ToAuxInt(c & 0xFF)
  4406  			v.AddArg(x)
  4407  			return true
  4408  		}
  4409  		break
  4410  	}
  4411  	return false
  4412  }
  4413  func rewriteValuePPC64_OpPPC64ANDN(v *Value) bool {
  4414  	v_1 := v.Args[1]
  4415  	v_0 := v.Args[0]
  4416  	// match: (ANDN (MOVDconst [c]) (MOVDconst [d]))
  4417  	// result: (MOVDconst [c&^d])
  4418  	for {
  4419  		if v_0.Op != OpPPC64MOVDconst {
  4420  			break
  4421  		}
  4422  		c := auxIntToInt64(v_0.AuxInt)
  4423  		if v_1.Op != OpPPC64MOVDconst {
  4424  			break
  4425  		}
  4426  		d := auxIntToInt64(v_1.AuxInt)
  4427  		v.reset(OpPPC64MOVDconst)
  4428  		v.AuxInt = int64ToAuxInt(c &^ d)
  4429  		return true
  4430  	}
  4431  	return false
  4432  }
  4433  func rewriteValuePPC64_OpPPC64ANDconst(v *Value) bool {
  4434  	v_0 := v.Args[0]
  4435  	// match: (ANDconst [m] (ROTLWconst [r] x))
  4436  	// cond: isPPC64WordRotateMask(m)
  4437  	// result: (RLWINM [encodePPC64RotateMask(r,m,32)] x)
  4438  	for {
  4439  		m := auxIntToInt64(v.AuxInt)
  4440  		if v_0.Op != OpPPC64ROTLWconst {
  4441  			break
  4442  		}
  4443  		r := auxIntToInt64(v_0.AuxInt)
  4444  		x := v_0.Args[0]
  4445  		if !(isPPC64WordRotateMask(m)) {
  4446  			break
  4447  		}
  4448  		v.reset(OpPPC64RLWINM)
  4449  		v.AuxInt = int64ToAuxInt(encodePPC64RotateMask(r, m, 32))
  4450  		v.AddArg(x)
  4451  		return true
  4452  	}
  4453  	// match: (ANDconst [m] (ROTLW x r))
  4454  	// cond: isPPC64WordRotateMask(m)
  4455  	// result: (RLWNM [encodePPC64RotateMask(0,m,32)] x r)
  4456  	for {
  4457  		m := auxIntToInt64(v.AuxInt)
  4458  		if v_0.Op != OpPPC64ROTLW {
  4459  			break
  4460  		}
  4461  		r := v_0.Args[1]
  4462  		x := v_0.Args[0]
  4463  		if !(isPPC64WordRotateMask(m)) {
  4464  			break
  4465  		}
  4466  		v.reset(OpPPC64RLWNM)
  4467  		v.AuxInt = int64ToAuxInt(encodePPC64RotateMask(0, m, 32))
  4468  		v.AddArg2(x, r)
  4469  		return true
  4470  	}
  4471  	// match: (ANDconst [m] (SRWconst x [s]))
  4472  	// cond: mergePPC64RShiftMask(m,s,32) == 0
  4473  	// result: (MOVDconst [0])
  4474  	for {
  4475  		m := auxIntToInt64(v.AuxInt)
  4476  		if v_0.Op != OpPPC64SRWconst {
  4477  			break
  4478  		}
  4479  		s := auxIntToInt64(v_0.AuxInt)
  4480  		if !(mergePPC64RShiftMask(m, s, 32) == 0) {
  4481  			break
  4482  		}
  4483  		v.reset(OpPPC64MOVDconst)
  4484  		v.AuxInt = int64ToAuxInt(0)
  4485  		return true
  4486  	}
  4487  	// match: (ANDconst [m] (SRWconst x [s]))
  4488  	// cond: mergePPC64AndSrwi(m,s) != 0
  4489  	// result: (RLWINM [mergePPC64AndSrwi(m,s)] x)
  4490  	for {
  4491  		m := auxIntToInt64(v.AuxInt)
  4492  		if v_0.Op != OpPPC64SRWconst {
  4493  			break
  4494  		}
  4495  		s := auxIntToInt64(v_0.AuxInt)
  4496  		x := v_0.Args[0]
  4497  		if !(mergePPC64AndSrwi(m, s) != 0) {
  4498  			break
  4499  		}
  4500  		v.reset(OpPPC64RLWINM)
  4501  		v.AuxInt = int64ToAuxInt(mergePPC64AndSrwi(m, s))
  4502  		v.AddArg(x)
  4503  		return true
  4504  	}
  4505  	// match: (ANDconst [c] (ANDconst [d] x))
  4506  	// result: (ANDconst [c&d] x)
  4507  	for {
  4508  		c := auxIntToInt64(v.AuxInt)
  4509  		if v_0.Op != OpPPC64ANDconst {
  4510  			break
  4511  		}
  4512  		d := auxIntToInt64(v_0.AuxInt)
  4513  		x := v_0.Args[0]
  4514  		v.reset(OpPPC64ANDconst)
  4515  		v.AuxInt = int64ToAuxInt(c & d)
  4516  		v.AddArg(x)
  4517  		return true
  4518  	}
  4519  	// match: (ANDconst [-1] x)
  4520  	// result: x
  4521  	for {
  4522  		if auxIntToInt64(v.AuxInt) != -1 {
  4523  			break
  4524  		}
  4525  		x := v_0
  4526  		v.copyOf(x)
  4527  		return true
  4528  	}
  4529  	// match: (ANDconst [0] _)
  4530  	// result: (MOVDconst [0])
  4531  	for {
  4532  		if auxIntToInt64(v.AuxInt) != 0 {
  4533  			break
  4534  		}
  4535  		v.reset(OpPPC64MOVDconst)
  4536  		v.AuxInt = int64ToAuxInt(0)
  4537  		return true
  4538  	}
  4539  	// match: (ANDconst [c] y:(MOVBZreg _))
  4540  	// cond: c&0xFF == 0xFF
  4541  	// result: y
  4542  	for {
  4543  		c := auxIntToInt64(v.AuxInt)
  4544  		y := v_0
  4545  		if y.Op != OpPPC64MOVBZreg || !(c&0xFF == 0xFF) {
  4546  			break
  4547  		}
  4548  		v.copyOf(y)
  4549  		return true
  4550  	}
  4551  	// match: (ANDconst [0xFF] y:(MOVBreg _))
  4552  	// result: y
  4553  	for {
  4554  		if auxIntToInt64(v.AuxInt) != 0xFF {
  4555  			break
  4556  		}
  4557  		y := v_0
  4558  		if y.Op != OpPPC64MOVBreg {
  4559  			break
  4560  		}
  4561  		v.copyOf(y)
  4562  		return true
  4563  	}
  4564  	// match: (ANDconst [c] y:(MOVHZreg _))
  4565  	// cond: c&0xFFFF == 0xFFFF
  4566  	// result: y
  4567  	for {
  4568  		c := auxIntToInt64(v.AuxInt)
  4569  		y := v_0
  4570  		if y.Op != OpPPC64MOVHZreg || !(c&0xFFFF == 0xFFFF) {
  4571  			break
  4572  		}
  4573  		v.copyOf(y)
  4574  		return true
  4575  	}
  4576  	// match: (ANDconst [0xFFFF] y:(MOVHreg _))
  4577  	// result: y
  4578  	for {
  4579  		if auxIntToInt64(v.AuxInt) != 0xFFFF {
  4580  			break
  4581  		}
  4582  		y := v_0
  4583  		if y.Op != OpPPC64MOVHreg {
  4584  			break
  4585  		}
  4586  		v.copyOf(y)
  4587  		return true
  4588  	}
  4589  	// match: (ANDconst [c] (MOVBreg x))
  4590  	// result: (ANDconst [c&0xFF] x)
  4591  	for {
  4592  		c := auxIntToInt64(v.AuxInt)
  4593  		if v_0.Op != OpPPC64MOVBreg {
  4594  			break
  4595  		}
  4596  		x := v_0.Args[0]
  4597  		v.reset(OpPPC64ANDconst)
  4598  		v.AuxInt = int64ToAuxInt(c & 0xFF)
  4599  		v.AddArg(x)
  4600  		return true
  4601  	}
  4602  	// match: (ANDconst [c] (MOVBZreg x))
  4603  	// result: (ANDconst [c&0xFF] x)
  4604  	for {
  4605  		c := auxIntToInt64(v.AuxInt)
  4606  		if v_0.Op != OpPPC64MOVBZreg {
  4607  			break
  4608  		}
  4609  		x := v_0.Args[0]
  4610  		v.reset(OpPPC64ANDconst)
  4611  		v.AuxInt = int64ToAuxInt(c & 0xFF)
  4612  		v.AddArg(x)
  4613  		return true
  4614  	}
  4615  	// match: (ANDconst [c] (MOVHreg x))
  4616  	// result: (ANDconst [c&0xFFFF] x)
  4617  	for {
  4618  		c := auxIntToInt64(v.AuxInt)
  4619  		if v_0.Op != OpPPC64MOVHreg {
  4620  			break
  4621  		}
  4622  		x := v_0.Args[0]
  4623  		v.reset(OpPPC64ANDconst)
  4624  		v.AuxInt = int64ToAuxInt(c & 0xFFFF)
  4625  		v.AddArg(x)
  4626  		return true
  4627  	}
  4628  	// match: (ANDconst [c] (MOVHZreg x))
  4629  	// result: (ANDconst [c&0xFFFF] x)
  4630  	for {
  4631  		c := auxIntToInt64(v.AuxInt)
  4632  		if v_0.Op != OpPPC64MOVHZreg {
  4633  			break
  4634  		}
  4635  		x := v_0.Args[0]
  4636  		v.reset(OpPPC64ANDconst)
  4637  		v.AuxInt = int64ToAuxInt(c & 0xFFFF)
  4638  		v.AddArg(x)
  4639  		return true
  4640  	}
  4641  	// match: (ANDconst [c] (MOVWreg x))
  4642  	// result: (ANDconst [c&0xFFFFFFFF] x)
  4643  	for {
  4644  		c := auxIntToInt64(v.AuxInt)
  4645  		if v_0.Op != OpPPC64MOVWreg {
  4646  			break
  4647  		}
  4648  		x := v_0.Args[0]
  4649  		v.reset(OpPPC64ANDconst)
  4650  		v.AuxInt = int64ToAuxInt(c & 0xFFFFFFFF)
  4651  		v.AddArg(x)
  4652  		return true
  4653  	}
  4654  	// match: (ANDconst [c] (MOVWZreg x))
  4655  	// result: (ANDconst [c&0xFFFFFFFF] x)
  4656  	for {
  4657  		c := auxIntToInt64(v.AuxInt)
  4658  		if v_0.Op != OpPPC64MOVWZreg {
  4659  			break
  4660  		}
  4661  		x := v_0.Args[0]
  4662  		v.reset(OpPPC64ANDconst)
  4663  		v.AuxInt = int64ToAuxInt(c & 0xFFFFFFFF)
  4664  		v.AddArg(x)
  4665  		return true
  4666  	}
  4667  	return false
  4668  }
  4669  func rewriteValuePPC64_OpPPC64CLRLSLDI(v *Value) bool {
  4670  	v_0 := v.Args[0]
  4671  	// match: (CLRLSLDI [c] (SRWconst [s] x))
  4672  	// cond: mergePPC64ClrlsldiSrw(int64(c),s) != 0
  4673  	// result: (RLWINM [mergePPC64ClrlsldiSrw(int64(c),s)] x)
  4674  	for {
  4675  		c := auxIntToInt32(v.AuxInt)
  4676  		if v_0.Op != OpPPC64SRWconst {
  4677  			break
  4678  		}
  4679  		s := auxIntToInt64(v_0.AuxInt)
  4680  		x := v_0.Args[0]
  4681  		if !(mergePPC64ClrlsldiSrw(int64(c), s) != 0) {
  4682  			break
  4683  		}
  4684  		v.reset(OpPPC64RLWINM)
  4685  		v.AuxInt = int64ToAuxInt(mergePPC64ClrlsldiSrw(int64(c), s))
  4686  		v.AddArg(x)
  4687  		return true
  4688  	}
  4689  	// match: (CLRLSLDI [c] i:(RLWINM [s] x))
  4690  	// cond: mergePPC64ClrlsldiRlwinm(c,s) != 0
  4691  	// result: (RLWINM [mergePPC64ClrlsldiRlwinm(c,s)] x)
  4692  	for {
  4693  		c := auxIntToInt32(v.AuxInt)
  4694  		i := v_0
  4695  		if i.Op != OpPPC64RLWINM {
  4696  			break
  4697  		}
  4698  		s := auxIntToInt64(i.AuxInt)
  4699  		x := i.Args[0]
  4700  		if !(mergePPC64ClrlsldiRlwinm(c, s) != 0) {
  4701  			break
  4702  		}
  4703  		v.reset(OpPPC64RLWINM)
  4704  		v.AuxInt = int64ToAuxInt(mergePPC64ClrlsldiRlwinm(c, s))
  4705  		v.AddArg(x)
  4706  		return true
  4707  	}
  4708  	return false
  4709  }
  4710  func rewriteValuePPC64_OpPPC64CMP(v *Value) bool {
  4711  	v_1 := v.Args[1]
  4712  	v_0 := v.Args[0]
  4713  	b := v.Block
  4714  	// match: (CMP x (MOVDconst [c]))
  4715  	// cond: is16Bit(c)
  4716  	// result: (CMPconst x [c])
  4717  	for {
  4718  		x := v_0
  4719  		if v_1.Op != OpPPC64MOVDconst {
  4720  			break
  4721  		}
  4722  		c := auxIntToInt64(v_1.AuxInt)
  4723  		if !(is16Bit(c)) {
  4724  			break
  4725  		}
  4726  		v.reset(OpPPC64CMPconst)
  4727  		v.AuxInt = int64ToAuxInt(c)
  4728  		v.AddArg(x)
  4729  		return true
  4730  	}
  4731  	// match: (CMP (MOVDconst [c]) y)
  4732  	// cond: is16Bit(c)
  4733  	// result: (InvertFlags (CMPconst y [c]))
  4734  	for {
  4735  		if v_0.Op != OpPPC64MOVDconst {
  4736  			break
  4737  		}
  4738  		c := auxIntToInt64(v_0.AuxInt)
  4739  		y := v_1
  4740  		if !(is16Bit(c)) {
  4741  			break
  4742  		}
  4743  		v.reset(OpPPC64InvertFlags)
  4744  		v0 := b.NewValue0(v.Pos, OpPPC64CMPconst, types.TypeFlags)
  4745  		v0.AuxInt = int64ToAuxInt(c)
  4746  		v0.AddArg(y)
  4747  		v.AddArg(v0)
  4748  		return true
  4749  	}
  4750  	// match: (CMP x y)
  4751  	// cond: canonLessThan(x,y)
  4752  	// result: (InvertFlags (CMP y x))
  4753  	for {
  4754  		x := v_0
  4755  		y := v_1
  4756  		if !(canonLessThan(x, y)) {
  4757  			break
  4758  		}
  4759  		v.reset(OpPPC64InvertFlags)
  4760  		v0 := b.NewValue0(v.Pos, OpPPC64CMP, types.TypeFlags)
  4761  		v0.AddArg2(y, x)
  4762  		v.AddArg(v0)
  4763  		return true
  4764  	}
  4765  	return false
  4766  }
  4767  func rewriteValuePPC64_OpPPC64CMPU(v *Value) bool {
  4768  	v_1 := v.Args[1]
  4769  	v_0 := v.Args[0]
  4770  	b := v.Block
  4771  	// match: (CMPU x (MOVDconst [c]))
  4772  	// cond: isU16Bit(c)
  4773  	// result: (CMPUconst x [c])
  4774  	for {
  4775  		x := v_0
  4776  		if v_1.Op != OpPPC64MOVDconst {
  4777  			break
  4778  		}
  4779  		c := auxIntToInt64(v_1.AuxInt)
  4780  		if !(isU16Bit(c)) {
  4781  			break
  4782  		}
  4783  		v.reset(OpPPC64CMPUconst)
  4784  		v.AuxInt = int64ToAuxInt(c)
  4785  		v.AddArg(x)
  4786  		return true
  4787  	}
  4788  	// match: (CMPU (MOVDconst [c]) y)
  4789  	// cond: isU16Bit(c)
  4790  	// result: (InvertFlags (CMPUconst y [c]))
  4791  	for {
  4792  		if v_0.Op != OpPPC64MOVDconst {
  4793  			break
  4794  		}
  4795  		c := auxIntToInt64(v_0.AuxInt)
  4796  		y := v_1
  4797  		if !(isU16Bit(c)) {
  4798  			break
  4799  		}
  4800  		v.reset(OpPPC64InvertFlags)
  4801  		v0 := b.NewValue0(v.Pos, OpPPC64CMPUconst, types.TypeFlags)
  4802  		v0.AuxInt = int64ToAuxInt(c)
  4803  		v0.AddArg(y)
  4804  		v.AddArg(v0)
  4805  		return true
  4806  	}
  4807  	// match: (CMPU x y)
  4808  	// cond: canonLessThan(x,y)
  4809  	// result: (InvertFlags (CMPU y x))
  4810  	for {
  4811  		x := v_0
  4812  		y := v_1
  4813  		if !(canonLessThan(x, y)) {
  4814  			break
  4815  		}
  4816  		v.reset(OpPPC64InvertFlags)
  4817  		v0 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
  4818  		v0.AddArg2(y, x)
  4819  		v.AddArg(v0)
  4820  		return true
  4821  	}
  4822  	return false
  4823  }
  4824  func rewriteValuePPC64_OpPPC64CMPUconst(v *Value) bool {
  4825  	v_0 := v.Args[0]
  4826  	// match: (CMPUconst (MOVDconst [x]) [y])
  4827  	// cond: x==y
  4828  	// result: (FlagEQ)
  4829  	for {
  4830  		y := auxIntToInt64(v.AuxInt)
  4831  		if v_0.Op != OpPPC64MOVDconst {
  4832  			break
  4833  		}
  4834  		x := auxIntToInt64(v_0.AuxInt)
  4835  		if !(x == y) {
  4836  			break
  4837  		}
  4838  		v.reset(OpPPC64FlagEQ)
  4839  		return true
  4840  	}
  4841  	// match: (CMPUconst (MOVDconst [x]) [y])
  4842  	// cond: uint64(x)<uint64(y)
  4843  	// result: (FlagLT)
  4844  	for {
  4845  		y := auxIntToInt64(v.AuxInt)
  4846  		if v_0.Op != OpPPC64MOVDconst {
  4847  			break
  4848  		}
  4849  		x := auxIntToInt64(v_0.AuxInt)
  4850  		if !(uint64(x) < uint64(y)) {
  4851  			break
  4852  		}
  4853  		v.reset(OpPPC64FlagLT)
  4854  		return true
  4855  	}
  4856  	// match: (CMPUconst (MOVDconst [x]) [y])
  4857  	// cond: uint64(x)>uint64(y)
  4858  	// result: (FlagGT)
  4859  	for {
  4860  		y := auxIntToInt64(v.AuxInt)
  4861  		if v_0.Op != OpPPC64MOVDconst {
  4862  			break
  4863  		}
  4864  		x := auxIntToInt64(v_0.AuxInt)
  4865  		if !(uint64(x) > uint64(y)) {
  4866  			break
  4867  		}
  4868  		v.reset(OpPPC64FlagGT)
  4869  		return true
  4870  	}
  4871  	return false
  4872  }
  4873  func rewriteValuePPC64_OpPPC64CMPW(v *Value) bool {
  4874  	v_1 := v.Args[1]
  4875  	v_0 := v.Args[0]
  4876  	b := v.Block
  4877  	// match: (CMPW x (MOVWreg y))
  4878  	// result: (CMPW x y)
  4879  	for {
  4880  		x := v_0
  4881  		if v_1.Op != OpPPC64MOVWreg {
  4882  			break
  4883  		}
  4884  		y := v_1.Args[0]
  4885  		v.reset(OpPPC64CMPW)
  4886  		v.AddArg2(x, y)
  4887  		return true
  4888  	}
  4889  	// match: (CMPW (MOVWreg x) y)
  4890  	// result: (CMPW x y)
  4891  	for {
  4892  		if v_0.Op != OpPPC64MOVWreg {
  4893  			break
  4894  		}
  4895  		x := v_0.Args[0]
  4896  		y := v_1
  4897  		v.reset(OpPPC64CMPW)
  4898  		v.AddArg2(x, y)
  4899  		return true
  4900  	}
  4901  	// match: (CMPW x (MOVDconst [c]))
  4902  	// cond: is16Bit(c)
  4903  	// result: (CMPWconst x [int32(c)])
  4904  	for {
  4905  		x := v_0
  4906  		if v_1.Op != OpPPC64MOVDconst {
  4907  			break
  4908  		}
  4909  		c := auxIntToInt64(v_1.AuxInt)
  4910  		if !(is16Bit(c)) {
  4911  			break
  4912  		}
  4913  		v.reset(OpPPC64CMPWconst)
  4914  		v.AuxInt = int32ToAuxInt(int32(c))
  4915  		v.AddArg(x)
  4916  		return true
  4917  	}
  4918  	// match: (CMPW (MOVDconst [c]) y)
  4919  	// cond: is16Bit(c)
  4920  	// result: (InvertFlags (CMPWconst y [int32(c)]))
  4921  	for {
  4922  		if v_0.Op != OpPPC64MOVDconst {
  4923  			break
  4924  		}
  4925  		c := auxIntToInt64(v_0.AuxInt)
  4926  		y := v_1
  4927  		if !(is16Bit(c)) {
  4928  			break
  4929  		}
  4930  		v.reset(OpPPC64InvertFlags)
  4931  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
  4932  		v0.AuxInt = int32ToAuxInt(int32(c))
  4933  		v0.AddArg(y)
  4934  		v.AddArg(v0)
  4935  		return true
  4936  	}
  4937  	// match: (CMPW x y)
  4938  	// cond: canonLessThan(x,y)
  4939  	// result: (InvertFlags (CMPW y x))
  4940  	for {
  4941  		x := v_0
  4942  		y := v_1
  4943  		if !(canonLessThan(x, y)) {
  4944  			break
  4945  		}
  4946  		v.reset(OpPPC64InvertFlags)
  4947  		v0 := b.NewValue0(v.Pos, OpPPC64CMPW, types.TypeFlags)
  4948  		v0.AddArg2(y, x)
  4949  		v.AddArg(v0)
  4950  		return true
  4951  	}
  4952  	return false
  4953  }
  4954  func rewriteValuePPC64_OpPPC64CMPWU(v *Value) bool {
  4955  	v_1 := v.Args[1]
  4956  	v_0 := v.Args[0]
  4957  	b := v.Block
  4958  	// match: (CMPWU x (MOVWZreg y))
  4959  	// result: (CMPWU x y)
  4960  	for {
  4961  		x := v_0
  4962  		if v_1.Op != OpPPC64MOVWZreg {
  4963  			break
  4964  		}
  4965  		y := v_1.Args[0]
  4966  		v.reset(OpPPC64CMPWU)
  4967  		v.AddArg2(x, y)
  4968  		return true
  4969  	}
  4970  	// match: (CMPWU (MOVWZreg x) y)
  4971  	// result: (CMPWU x y)
  4972  	for {
  4973  		if v_0.Op != OpPPC64MOVWZreg {
  4974  			break
  4975  		}
  4976  		x := v_0.Args[0]
  4977  		y := v_1
  4978  		v.reset(OpPPC64CMPWU)
  4979  		v.AddArg2(x, y)
  4980  		return true
  4981  	}
  4982  	// match: (CMPWU x (MOVDconst [c]))
  4983  	// cond: isU16Bit(c)
  4984  	// result: (CMPWUconst x [int32(c)])
  4985  	for {
  4986  		x := v_0
  4987  		if v_1.Op != OpPPC64MOVDconst {
  4988  			break
  4989  		}
  4990  		c := auxIntToInt64(v_1.AuxInt)
  4991  		if !(isU16Bit(c)) {
  4992  			break
  4993  		}
  4994  		v.reset(OpPPC64CMPWUconst)
  4995  		v.AuxInt = int32ToAuxInt(int32(c))
  4996  		v.AddArg(x)
  4997  		return true
  4998  	}
  4999  	// match: (CMPWU (MOVDconst [c]) y)
  5000  	// cond: isU16Bit(c)
  5001  	// result: (InvertFlags (CMPWUconst y [int32(c)]))
  5002  	for {
  5003  		if v_0.Op != OpPPC64MOVDconst {
  5004  			break
  5005  		}
  5006  		c := auxIntToInt64(v_0.AuxInt)
  5007  		y := v_1
  5008  		if !(isU16Bit(c)) {
  5009  			break
  5010  		}
  5011  		v.reset(OpPPC64InvertFlags)
  5012  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWUconst, types.TypeFlags)
  5013  		v0.AuxInt = int32ToAuxInt(int32(c))
  5014  		v0.AddArg(y)
  5015  		v.AddArg(v0)
  5016  		return true
  5017  	}
  5018  	// match: (CMPWU x y)
  5019  	// cond: canonLessThan(x,y)
  5020  	// result: (InvertFlags (CMPWU y x))
  5021  	for {
  5022  		x := v_0
  5023  		y := v_1
  5024  		if !(canonLessThan(x, y)) {
  5025  			break
  5026  		}
  5027  		v.reset(OpPPC64InvertFlags)
  5028  		v0 := b.NewValue0(v.Pos, OpPPC64CMPWU, types.TypeFlags)
  5029  		v0.AddArg2(y, x)
  5030  		v.AddArg(v0)
  5031  		return true
  5032  	}
  5033  	return false
  5034  }
  5035  func rewriteValuePPC64_OpPPC64CMPWUconst(v *Value) bool {
  5036  	v_0 := v.Args[0]
  5037  	// match: (CMPWUconst (MOVDconst [x]) [y])
  5038  	// cond: int32(x)==int32(y)
  5039  	// result: (FlagEQ)
  5040  	for {
  5041  		y := auxIntToInt32(v.AuxInt)
  5042  		if v_0.Op != OpPPC64MOVDconst {
  5043  			break
  5044  		}
  5045  		x := auxIntToInt64(v_0.AuxInt)
  5046  		if !(int32(x) == int32(y)) {
  5047  			break
  5048  		}
  5049  		v.reset(OpPPC64FlagEQ)
  5050  		return true
  5051  	}
  5052  	// match: (CMPWUconst (MOVDconst [x]) [y])
  5053  	// cond: uint32(x)<uint32(y)
  5054  	// result: (FlagLT)
  5055  	for {
  5056  		y := auxIntToInt32(v.AuxInt)
  5057  		if v_0.Op != OpPPC64MOVDconst {
  5058  			break
  5059  		}
  5060  		x := auxIntToInt64(v_0.AuxInt)
  5061  		if !(uint32(x) < uint32(y)) {
  5062  			break
  5063  		}
  5064  		v.reset(OpPPC64FlagLT)
  5065  		return true
  5066  	}
  5067  	// match: (CMPWUconst (MOVDconst [x]) [y])
  5068  	// cond: uint32(x)>uint32(y)
  5069  	// result: (FlagGT)
  5070  	for {
  5071  		y := auxIntToInt32(v.AuxInt)
  5072  		if v_0.Op != OpPPC64MOVDconst {
  5073  			break
  5074  		}
  5075  		x := auxIntToInt64(v_0.AuxInt)
  5076  		if !(uint32(x) > uint32(y)) {
  5077  			break
  5078  		}
  5079  		v.reset(OpPPC64FlagGT)
  5080  		return true
  5081  	}
  5082  	return false
  5083  }
  5084  func rewriteValuePPC64_OpPPC64CMPWconst(v *Value) bool {
  5085  	v_0 := v.Args[0]
  5086  	// match: (CMPWconst (MOVDconst [x]) [y])
  5087  	// cond: int32(x)==int32(y)
  5088  	// result: (FlagEQ)
  5089  	for {
  5090  		y := auxIntToInt32(v.AuxInt)
  5091  		if v_0.Op != OpPPC64MOVDconst {
  5092  			break
  5093  		}
  5094  		x := auxIntToInt64(v_0.AuxInt)
  5095  		if !(int32(x) == int32(y)) {
  5096  			break
  5097  		}
  5098  		v.reset(OpPPC64FlagEQ)
  5099  		return true
  5100  	}
  5101  	// match: (CMPWconst (MOVDconst [x]) [y])
  5102  	// cond: int32(x)<int32(y)
  5103  	// result: (FlagLT)
  5104  	for {
  5105  		y := auxIntToInt32(v.AuxInt)
  5106  		if v_0.Op != OpPPC64MOVDconst {
  5107  			break
  5108  		}
  5109  		x := auxIntToInt64(v_0.AuxInt)
  5110  		if !(int32(x) < int32(y)) {
  5111  			break
  5112  		}
  5113  		v.reset(OpPPC64FlagLT)
  5114  		return true
  5115  	}
  5116  	// match: (CMPWconst (MOVDconst [x]) [y])
  5117  	// cond: int32(x)>int32(y)
  5118  	// result: (FlagGT)
  5119  	for {
  5120  		y := auxIntToInt32(v.AuxInt)
  5121  		if v_0.Op != OpPPC64MOVDconst {
  5122  			break
  5123  		}
  5124  		x := auxIntToInt64(v_0.AuxInt)
  5125  		if !(int32(x) > int32(y)) {
  5126  			break
  5127  		}
  5128  		v.reset(OpPPC64FlagGT)
  5129  		return true
  5130  	}
  5131  	return false
  5132  }
  5133  func rewriteValuePPC64_OpPPC64CMPconst(v *Value) bool {
  5134  	v_0 := v.Args[0]
  5135  	// match: (CMPconst (MOVDconst [x]) [y])
  5136  	// cond: x==y
  5137  	// result: (FlagEQ)
  5138  	for {
  5139  		y := auxIntToInt64(v.AuxInt)
  5140  		if v_0.Op != OpPPC64MOVDconst {
  5141  			break
  5142  		}
  5143  		x := auxIntToInt64(v_0.AuxInt)
  5144  		if !(x == y) {
  5145  			break
  5146  		}
  5147  		v.reset(OpPPC64FlagEQ)
  5148  		return true
  5149  	}
  5150  	// match: (CMPconst (MOVDconst [x]) [y])
  5151  	// cond: x<y
  5152  	// result: (FlagLT)
  5153  	for {
  5154  		y := auxIntToInt64(v.AuxInt)
  5155  		if v_0.Op != OpPPC64MOVDconst {
  5156  			break
  5157  		}
  5158  		x := auxIntToInt64(v_0.AuxInt)
  5159  		if !(x < y) {
  5160  			break
  5161  		}
  5162  		v.reset(OpPPC64FlagLT)
  5163  		return true
  5164  	}
  5165  	// match: (CMPconst (MOVDconst [x]) [y])
  5166  	// cond: x>y
  5167  	// result: (FlagGT)
  5168  	for {
  5169  		y := auxIntToInt64(v.AuxInt)
  5170  		if v_0.Op != OpPPC64MOVDconst {
  5171  			break
  5172  		}
  5173  		x := auxIntToInt64(v_0.AuxInt)
  5174  		if !(x > y) {
  5175  			break
  5176  		}
  5177  		v.reset(OpPPC64FlagGT)
  5178  		return true
  5179  	}
  5180  	return false
  5181  }
  5182  func rewriteValuePPC64_OpPPC64Equal(v *Value) bool {
  5183  	v_0 := v.Args[0]
  5184  	b := v.Block
  5185  	typ := &b.Func.Config.Types
  5186  	// match: (Equal (FlagEQ))
  5187  	// result: (MOVDconst [1])
  5188  	for {
  5189  		if v_0.Op != OpPPC64FlagEQ {
  5190  			break
  5191  		}
  5192  		v.reset(OpPPC64MOVDconst)
  5193  		v.AuxInt = int64ToAuxInt(1)
  5194  		return true
  5195  	}
  5196  	// match: (Equal (FlagLT))
  5197  	// result: (MOVDconst [0])
  5198  	for {
  5199  		if v_0.Op != OpPPC64FlagLT {
  5200  			break
  5201  		}
  5202  		v.reset(OpPPC64MOVDconst)
  5203  		v.AuxInt = int64ToAuxInt(0)
  5204  		return true
  5205  	}
  5206  	// match: (Equal (FlagGT))
  5207  	// result: (MOVDconst [0])
  5208  	for {
  5209  		if v_0.Op != OpPPC64FlagGT {
  5210  			break
  5211  		}
  5212  		v.reset(OpPPC64MOVDconst)
  5213  		v.AuxInt = int64ToAuxInt(0)
  5214  		return true
  5215  	}
  5216  	// match: (Equal (InvertFlags x))
  5217  	// result: (Equal x)
  5218  	for {
  5219  		if v_0.Op != OpPPC64InvertFlags {
  5220  			break
  5221  		}
  5222  		x := v_0.Args[0]
  5223  		v.reset(OpPPC64Equal)
  5224  		v.AddArg(x)
  5225  		return true
  5226  	}
  5227  	// match: (Equal cmp)
  5228  	// result: (ISELB [2] (MOVDconst [1]) cmp)
  5229  	for {
  5230  		cmp := v_0
  5231  		v.reset(OpPPC64ISELB)
  5232  		v.AuxInt = int32ToAuxInt(2)
  5233  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5234  		v0.AuxInt = int64ToAuxInt(1)
  5235  		v.AddArg2(v0, cmp)
  5236  		return true
  5237  	}
  5238  }
  5239  func rewriteValuePPC64_OpPPC64FABS(v *Value) bool {
  5240  	v_0 := v.Args[0]
  5241  	// match: (FABS (FMOVDconst [x]))
  5242  	// result: (FMOVDconst [math.Abs(x)])
  5243  	for {
  5244  		if v_0.Op != OpPPC64FMOVDconst {
  5245  			break
  5246  		}
  5247  		x := auxIntToFloat64(v_0.AuxInt)
  5248  		v.reset(OpPPC64FMOVDconst)
  5249  		v.AuxInt = float64ToAuxInt(math.Abs(x))
  5250  		return true
  5251  	}
  5252  	return false
  5253  }
  5254  func rewriteValuePPC64_OpPPC64FADD(v *Value) bool {
  5255  	v_1 := v.Args[1]
  5256  	v_0 := v.Args[0]
  5257  	// match: (FADD (FMUL x y) z)
  5258  	// result: (FMADD x y z)
  5259  	for {
  5260  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5261  			if v_0.Op != OpPPC64FMUL {
  5262  				continue
  5263  			}
  5264  			y := v_0.Args[1]
  5265  			x := v_0.Args[0]
  5266  			z := v_1
  5267  			v.reset(OpPPC64FMADD)
  5268  			v.AddArg3(x, y, z)
  5269  			return true
  5270  		}
  5271  		break
  5272  	}
  5273  	return false
  5274  }
  5275  func rewriteValuePPC64_OpPPC64FADDS(v *Value) bool {
  5276  	v_1 := v.Args[1]
  5277  	v_0 := v.Args[0]
  5278  	// match: (FADDS (FMULS x y) z)
  5279  	// result: (FMADDS x y z)
  5280  	for {
  5281  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5282  			if v_0.Op != OpPPC64FMULS {
  5283  				continue
  5284  			}
  5285  			y := v_0.Args[1]
  5286  			x := v_0.Args[0]
  5287  			z := v_1
  5288  			v.reset(OpPPC64FMADDS)
  5289  			v.AddArg3(x, y, z)
  5290  			return true
  5291  		}
  5292  		break
  5293  	}
  5294  	return false
  5295  }
  5296  func rewriteValuePPC64_OpPPC64FCEIL(v *Value) bool {
  5297  	v_0 := v.Args[0]
  5298  	// match: (FCEIL (FMOVDconst [x]))
  5299  	// result: (FMOVDconst [math.Ceil(x)])
  5300  	for {
  5301  		if v_0.Op != OpPPC64FMOVDconst {
  5302  			break
  5303  		}
  5304  		x := auxIntToFloat64(v_0.AuxInt)
  5305  		v.reset(OpPPC64FMOVDconst)
  5306  		v.AuxInt = float64ToAuxInt(math.Ceil(x))
  5307  		return true
  5308  	}
  5309  	return false
  5310  }
  5311  func rewriteValuePPC64_OpPPC64FFLOOR(v *Value) bool {
  5312  	v_0 := v.Args[0]
  5313  	// match: (FFLOOR (FMOVDconst [x]))
  5314  	// result: (FMOVDconst [math.Floor(x)])
  5315  	for {
  5316  		if v_0.Op != OpPPC64FMOVDconst {
  5317  			break
  5318  		}
  5319  		x := auxIntToFloat64(v_0.AuxInt)
  5320  		v.reset(OpPPC64FMOVDconst)
  5321  		v.AuxInt = float64ToAuxInt(math.Floor(x))
  5322  		return true
  5323  	}
  5324  	return false
  5325  }
  5326  func rewriteValuePPC64_OpPPC64FGreaterEqual(v *Value) bool {
  5327  	v_0 := v.Args[0]
  5328  	b := v.Block
  5329  	typ := &b.Func.Config.Types
  5330  	// match: (FGreaterEqual cmp)
  5331  	// result: (ISEL [2] (MOVDconst [1]) (ISELB [1] (MOVDconst [1]) cmp) cmp)
  5332  	for {
  5333  		cmp := v_0
  5334  		v.reset(OpPPC64ISEL)
  5335  		v.AuxInt = int32ToAuxInt(2)
  5336  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5337  		v0.AuxInt = int64ToAuxInt(1)
  5338  		v1 := b.NewValue0(v.Pos, OpPPC64ISELB, typ.Int32)
  5339  		v1.AuxInt = int32ToAuxInt(1)
  5340  		v1.AddArg2(v0, cmp)
  5341  		v.AddArg3(v0, v1, cmp)
  5342  		return true
  5343  	}
  5344  }
  5345  func rewriteValuePPC64_OpPPC64FGreaterThan(v *Value) bool {
  5346  	v_0 := v.Args[0]
  5347  	b := v.Block
  5348  	typ := &b.Func.Config.Types
  5349  	// match: (FGreaterThan cmp)
  5350  	// result: (ISELB [1] (MOVDconst [1]) cmp)
  5351  	for {
  5352  		cmp := v_0
  5353  		v.reset(OpPPC64ISELB)
  5354  		v.AuxInt = int32ToAuxInt(1)
  5355  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5356  		v0.AuxInt = int64ToAuxInt(1)
  5357  		v.AddArg2(v0, cmp)
  5358  		return true
  5359  	}
  5360  }
  5361  func rewriteValuePPC64_OpPPC64FLessEqual(v *Value) bool {
  5362  	v_0 := v.Args[0]
  5363  	b := v.Block
  5364  	typ := &b.Func.Config.Types
  5365  	// match: (FLessEqual cmp)
  5366  	// result: (ISEL [2] (MOVDconst [1]) (ISELB [0] (MOVDconst [1]) cmp) cmp)
  5367  	for {
  5368  		cmp := v_0
  5369  		v.reset(OpPPC64ISEL)
  5370  		v.AuxInt = int32ToAuxInt(2)
  5371  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5372  		v0.AuxInt = int64ToAuxInt(1)
  5373  		v1 := b.NewValue0(v.Pos, OpPPC64ISELB, typ.Int32)
  5374  		v1.AuxInt = int32ToAuxInt(0)
  5375  		v1.AddArg2(v0, cmp)
  5376  		v.AddArg3(v0, v1, cmp)
  5377  		return true
  5378  	}
  5379  }
  5380  func rewriteValuePPC64_OpPPC64FLessThan(v *Value) bool {
  5381  	v_0 := v.Args[0]
  5382  	b := v.Block
  5383  	typ := &b.Func.Config.Types
  5384  	// match: (FLessThan cmp)
  5385  	// result: (ISELB [0] (MOVDconst [1]) cmp)
  5386  	for {
  5387  		cmp := v_0
  5388  		v.reset(OpPPC64ISELB)
  5389  		v.AuxInt = int32ToAuxInt(0)
  5390  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5391  		v0.AuxInt = int64ToAuxInt(1)
  5392  		v.AddArg2(v0, cmp)
  5393  		return true
  5394  	}
  5395  }
  5396  func rewriteValuePPC64_OpPPC64FMOVDload(v *Value) bool {
  5397  	v_1 := v.Args[1]
  5398  	v_0 := v.Args[0]
  5399  	// match: (FMOVDload [off] {sym} ptr (MOVDstore [off] {sym} ptr x _))
  5400  	// result: (MTVSRD x)
  5401  	for {
  5402  		off := auxIntToInt32(v.AuxInt)
  5403  		sym := auxToSym(v.Aux)
  5404  		ptr := v_0
  5405  		if v_1.Op != OpPPC64MOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  5406  			break
  5407  		}
  5408  		x := v_1.Args[1]
  5409  		if ptr != v_1.Args[0] {
  5410  			break
  5411  		}
  5412  		v.reset(OpPPC64MTVSRD)
  5413  		v.AddArg(x)
  5414  		return true
  5415  	}
  5416  	// match: (FMOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  5417  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  5418  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5419  	for {
  5420  		off1 := auxIntToInt32(v.AuxInt)
  5421  		sym1 := auxToSym(v.Aux)
  5422  		p := v_0
  5423  		if p.Op != OpPPC64MOVDaddr {
  5424  			break
  5425  		}
  5426  		off2 := auxIntToInt32(p.AuxInt)
  5427  		sym2 := auxToSym(p.Aux)
  5428  		ptr := p.Args[0]
  5429  		mem := v_1
  5430  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  5431  			break
  5432  		}
  5433  		v.reset(OpPPC64FMOVDload)
  5434  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5435  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5436  		v.AddArg2(ptr, mem)
  5437  		return true
  5438  	}
  5439  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  5440  	// cond: is16Bit(int64(off1)+off2)
  5441  	// result: (FMOVDload [off1+int32(off2)] {sym} ptr mem)
  5442  	for {
  5443  		off1 := auxIntToInt32(v.AuxInt)
  5444  		sym := auxToSym(v.Aux)
  5445  		if v_0.Op != OpPPC64ADDconst {
  5446  			break
  5447  		}
  5448  		off2 := auxIntToInt64(v_0.AuxInt)
  5449  		ptr := v_0.Args[0]
  5450  		mem := v_1
  5451  		if !(is16Bit(int64(off1) + off2)) {
  5452  			break
  5453  		}
  5454  		v.reset(OpPPC64FMOVDload)
  5455  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5456  		v.Aux = symToAux(sym)
  5457  		v.AddArg2(ptr, mem)
  5458  		return true
  5459  	}
  5460  	return false
  5461  }
  5462  func rewriteValuePPC64_OpPPC64FMOVDstore(v *Value) bool {
  5463  	v_2 := v.Args[2]
  5464  	v_1 := v.Args[1]
  5465  	v_0 := v.Args[0]
  5466  	// match: (FMOVDstore [off] {sym} ptr (MTVSRD x) mem)
  5467  	// result: (MOVDstore [off] {sym} ptr x mem)
  5468  	for {
  5469  		off := auxIntToInt32(v.AuxInt)
  5470  		sym := auxToSym(v.Aux)
  5471  		ptr := v_0
  5472  		if v_1.Op != OpPPC64MTVSRD {
  5473  			break
  5474  		}
  5475  		x := v_1.Args[0]
  5476  		mem := v_2
  5477  		v.reset(OpPPC64MOVDstore)
  5478  		v.AuxInt = int32ToAuxInt(off)
  5479  		v.Aux = symToAux(sym)
  5480  		v.AddArg3(ptr, x, mem)
  5481  		return true
  5482  	}
  5483  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5484  	// cond: is16Bit(int64(off1)+off2)
  5485  	// result: (FMOVDstore [off1+int32(off2)] {sym} ptr val mem)
  5486  	for {
  5487  		off1 := auxIntToInt32(v.AuxInt)
  5488  		sym := auxToSym(v.Aux)
  5489  		if v_0.Op != OpPPC64ADDconst {
  5490  			break
  5491  		}
  5492  		off2 := auxIntToInt64(v_0.AuxInt)
  5493  		ptr := v_0.Args[0]
  5494  		val := v_1
  5495  		mem := v_2
  5496  		if !(is16Bit(int64(off1) + off2)) {
  5497  			break
  5498  		}
  5499  		v.reset(OpPPC64FMOVDstore)
  5500  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5501  		v.Aux = symToAux(sym)
  5502  		v.AddArg3(ptr, val, mem)
  5503  		return true
  5504  	}
  5505  	// match: (FMOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  5506  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  5507  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5508  	for {
  5509  		off1 := auxIntToInt32(v.AuxInt)
  5510  		sym1 := auxToSym(v.Aux)
  5511  		p := v_0
  5512  		if p.Op != OpPPC64MOVDaddr {
  5513  			break
  5514  		}
  5515  		off2 := auxIntToInt32(p.AuxInt)
  5516  		sym2 := auxToSym(p.Aux)
  5517  		ptr := p.Args[0]
  5518  		val := v_1
  5519  		mem := v_2
  5520  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  5521  			break
  5522  		}
  5523  		v.reset(OpPPC64FMOVDstore)
  5524  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5525  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5526  		v.AddArg3(ptr, val, mem)
  5527  		return true
  5528  	}
  5529  	return false
  5530  }
  5531  func rewriteValuePPC64_OpPPC64FMOVSload(v *Value) bool {
  5532  	v_1 := v.Args[1]
  5533  	v_0 := v.Args[0]
  5534  	// match: (FMOVSload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  5535  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  5536  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  5537  	for {
  5538  		off1 := auxIntToInt32(v.AuxInt)
  5539  		sym1 := auxToSym(v.Aux)
  5540  		p := v_0
  5541  		if p.Op != OpPPC64MOVDaddr {
  5542  			break
  5543  		}
  5544  		off2 := auxIntToInt32(p.AuxInt)
  5545  		sym2 := auxToSym(p.Aux)
  5546  		ptr := p.Args[0]
  5547  		mem := v_1
  5548  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  5549  			break
  5550  		}
  5551  		v.reset(OpPPC64FMOVSload)
  5552  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5553  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5554  		v.AddArg2(ptr, mem)
  5555  		return true
  5556  	}
  5557  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  5558  	// cond: is16Bit(int64(off1)+off2)
  5559  	// result: (FMOVSload [off1+int32(off2)] {sym} ptr mem)
  5560  	for {
  5561  		off1 := auxIntToInt32(v.AuxInt)
  5562  		sym := auxToSym(v.Aux)
  5563  		if v_0.Op != OpPPC64ADDconst {
  5564  			break
  5565  		}
  5566  		off2 := auxIntToInt64(v_0.AuxInt)
  5567  		ptr := v_0.Args[0]
  5568  		mem := v_1
  5569  		if !(is16Bit(int64(off1) + off2)) {
  5570  			break
  5571  		}
  5572  		v.reset(OpPPC64FMOVSload)
  5573  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5574  		v.Aux = symToAux(sym)
  5575  		v.AddArg2(ptr, mem)
  5576  		return true
  5577  	}
  5578  	return false
  5579  }
  5580  func rewriteValuePPC64_OpPPC64FMOVSstore(v *Value) bool {
  5581  	v_2 := v.Args[2]
  5582  	v_1 := v.Args[1]
  5583  	v_0 := v.Args[0]
  5584  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  5585  	// cond: is16Bit(int64(off1)+off2)
  5586  	// result: (FMOVSstore [off1+int32(off2)] {sym} ptr val mem)
  5587  	for {
  5588  		off1 := auxIntToInt32(v.AuxInt)
  5589  		sym := auxToSym(v.Aux)
  5590  		if v_0.Op != OpPPC64ADDconst {
  5591  			break
  5592  		}
  5593  		off2 := auxIntToInt64(v_0.AuxInt)
  5594  		ptr := v_0.Args[0]
  5595  		val := v_1
  5596  		mem := v_2
  5597  		if !(is16Bit(int64(off1) + off2)) {
  5598  			break
  5599  		}
  5600  		v.reset(OpPPC64FMOVSstore)
  5601  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  5602  		v.Aux = symToAux(sym)
  5603  		v.AddArg3(ptr, val, mem)
  5604  		return true
  5605  	}
  5606  	// match: (FMOVSstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  5607  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  5608  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  5609  	for {
  5610  		off1 := auxIntToInt32(v.AuxInt)
  5611  		sym1 := auxToSym(v.Aux)
  5612  		p := v_0
  5613  		if p.Op != OpPPC64MOVDaddr {
  5614  			break
  5615  		}
  5616  		off2 := auxIntToInt32(p.AuxInt)
  5617  		sym2 := auxToSym(p.Aux)
  5618  		ptr := p.Args[0]
  5619  		val := v_1
  5620  		mem := v_2
  5621  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  5622  			break
  5623  		}
  5624  		v.reset(OpPPC64FMOVSstore)
  5625  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5626  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5627  		v.AddArg3(ptr, val, mem)
  5628  		return true
  5629  	}
  5630  	return false
  5631  }
  5632  func rewriteValuePPC64_OpPPC64FNEG(v *Value) bool {
  5633  	v_0 := v.Args[0]
  5634  	// match: (FNEG (FABS x))
  5635  	// result: (FNABS x)
  5636  	for {
  5637  		if v_0.Op != OpPPC64FABS {
  5638  			break
  5639  		}
  5640  		x := v_0.Args[0]
  5641  		v.reset(OpPPC64FNABS)
  5642  		v.AddArg(x)
  5643  		return true
  5644  	}
  5645  	// match: (FNEG (FNABS x))
  5646  	// result: (FABS x)
  5647  	for {
  5648  		if v_0.Op != OpPPC64FNABS {
  5649  			break
  5650  		}
  5651  		x := v_0.Args[0]
  5652  		v.reset(OpPPC64FABS)
  5653  		v.AddArg(x)
  5654  		return true
  5655  	}
  5656  	return false
  5657  }
  5658  func rewriteValuePPC64_OpPPC64FSQRT(v *Value) bool {
  5659  	v_0 := v.Args[0]
  5660  	// match: (FSQRT (FMOVDconst [x]))
  5661  	// cond: x >= 0
  5662  	// result: (FMOVDconst [math.Sqrt(x)])
  5663  	for {
  5664  		if v_0.Op != OpPPC64FMOVDconst {
  5665  			break
  5666  		}
  5667  		x := auxIntToFloat64(v_0.AuxInt)
  5668  		if !(x >= 0) {
  5669  			break
  5670  		}
  5671  		v.reset(OpPPC64FMOVDconst)
  5672  		v.AuxInt = float64ToAuxInt(math.Sqrt(x))
  5673  		return true
  5674  	}
  5675  	return false
  5676  }
  5677  func rewriteValuePPC64_OpPPC64FSUB(v *Value) bool {
  5678  	v_1 := v.Args[1]
  5679  	v_0 := v.Args[0]
  5680  	// match: (FSUB (FMUL x y) z)
  5681  	// result: (FMSUB x y z)
  5682  	for {
  5683  		if v_0.Op != OpPPC64FMUL {
  5684  			break
  5685  		}
  5686  		y := v_0.Args[1]
  5687  		x := v_0.Args[0]
  5688  		z := v_1
  5689  		v.reset(OpPPC64FMSUB)
  5690  		v.AddArg3(x, y, z)
  5691  		return true
  5692  	}
  5693  	return false
  5694  }
  5695  func rewriteValuePPC64_OpPPC64FSUBS(v *Value) bool {
  5696  	v_1 := v.Args[1]
  5697  	v_0 := v.Args[0]
  5698  	// match: (FSUBS (FMULS x y) z)
  5699  	// result: (FMSUBS x y z)
  5700  	for {
  5701  		if v_0.Op != OpPPC64FMULS {
  5702  			break
  5703  		}
  5704  		y := v_0.Args[1]
  5705  		x := v_0.Args[0]
  5706  		z := v_1
  5707  		v.reset(OpPPC64FMSUBS)
  5708  		v.AddArg3(x, y, z)
  5709  		return true
  5710  	}
  5711  	return false
  5712  }
  5713  func rewriteValuePPC64_OpPPC64FTRUNC(v *Value) bool {
  5714  	v_0 := v.Args[0]
  5715  	// match: (FTRUNC (FMOVDconst [x]))
  5716  	// result: (FMOVDconst [math.Trunc(x)])
  5717  	for {
  5718  		if v_0.Op != OpPPC64FMOVDconst {
  5719  			break
  5720  		}
  5721  		x := auxIntToFloat64(v_0.AuxInt)
  5722  		v.reset(OpPPC64FMOVDconst)
  5723  		v.AuxInt = float64ToAuxInt(math.Trunc(x))
  5724  		return true
  5725  	}
  5726  	return false
  5727  }
  5728  func rewriteValuePPC64_OpPPC64GreaterEqual(v *Value) bool {
  5729  	v_0 := v.Args[0]
  5730  	b := v.Block
  5731  	typ := &b.Func.Config.Types
  5732  	// match: (GreaterEqual (FlagEQ))
  5733  	// result: (MOVDconst [1])
  5734  	for {
  5735  		if v_0.Op != OpPPC64FlagEQ {
  5736  			break
  5737  		}
  5738  		v.reset(OpPPC64MOVDconst)
  5739  		v.AuxInt = int64ToAuxInt(1)
  5740  		return true
  5741  	}
  5742  	// match: (GreaterEqual (FlagLT))
  5743  	// result: (MOVDconst [0])
  5744  	for {
  5745  		if v_0.Op != OpPPC64FlagLT {
  5746  			break
  5747  		}
  5748  		v.reset(OpPPC64MOVDconst)
  5749  		v.AuxInt = int64ToAuxInt(0)
  5750  		return true
  5751  	}
  5752  	// match: (GreaterEqual (FlagGT))
  5753  	// result: (MOVDconst [1])
  5754  	for {
  5755  		if v_0.Op != OpPPC64FlagGT {
  5756  			break
  5757  		}
  5758  		v.reset(OpPPC64MOVDconst)
  5759  		v.AuxInt = int64ToAuxInt(1)
  5760  		return true
  5761  	}
  5762  	// match: (GreaterEqual (InvertFlags x))
  5763  	// result: (LessEqual x)
  5764  	for {
  5765  		if v_0.Op != OpPPC64InvertFlags {
  5766  			break
  5767  		}
  5768  		x := v_0.Args[0]
  5769  		v.reset(OpPPC64LessEqual)
  5770  		v.AddArg(x)
  5771  		return true
  5772  	}
  5773  	// match: (GreaterEqual cmp)
  5774  	// result: (ISELB [4] (MOVDconst [1]) cmp)
  5775  	for {
  5776  		cmp := v_0
  5777  		v.reset(OpPPC64ISELB)
  5778  		v.AuxInt = int32ToAuxInt(4)
  5779  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5780  		v0.AuxInt = int64ToAuxInt(1)
  5781  		v.AddArg2(v0, cmp)
  5782  		return true
  5783  	}
  5784  }
  5785  func rewriteValuePPC64_OpPPC64GreaterThan(v *Value) bool {
  5786  	v_0 := v.Args[0]
  5787  	b := v.Block
  5788  	typ := &b.Func.Config.Types
  5789  	// match: (GreaterThan (FlagEQ))
  5790  	// result: (MOVDconst [0])
  5791  	for {
  5792  		if v_0.Op != OpPPC64FlagEQ {
  5793  			break
  5794  		}
  5795  		v.reset(OpPPC64MOVDconst)
  5796  		v.AuxInt = int64ToAuxInt(0)
  5797  		return true
  5798  	}
  5799  	// match: (GreaterThan (FlagLT))
  5800  	// result: (MOVDconst [0])
  5801  	for {
  5802  		if v_0.Op != OpPPC64FlagLT {
  5803  			break
  5804  		}
  5805  		v.reset(OpPPC64MOVDconst)
  5806  		v.AuxInt = int64ToAuxInt(0)
  5807  		return true
  5808  	}
  5809  	// match: (GreaterThan (FlagGT))
  5810  	// result: (MOVDconst [1])
  5811  	for {
  5812  		if v_0.Op != OpPPC64FlagGT {
  5813  			break
  5814  		}
  5815  		v.reset(OpPPC64MOVDconst)
  5816  		v.AuxInt = int64ToAuxInt(1)
  5817  		return true
  5818  	}
  5819  	// match: (GreaterThan (InvertFlags x))
  5820  	// result: (LessThan x)
  5821  	for {
  5822  		if v_0.Op != OpPPC64InvertFlags {
  5823  			break
  5824  		}
  5825  		x := v_0.Args[0]
  5826  		v.reset(OpPPC64LessThan)
  5827  		v.AddArg(x)
  5828  		return true
  5829  	}
  5830  	// match: (GreaterThan cmp)
  5831  	// result: (ISELB [1] (MOVDconst [1]) cmp)
  5832  	for {
  5833  		cmp := v_0
  5834  		v.reset(OpPPC64ISELB)
  5835  		v.AuxInt = int32ToAuxInt(1)
  5836  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  5837  		v0.AuxInt = int64ToAuxInt(1)
  5838  		v.AddArg2(v0, cmp)
  5839  		return true
  5840  	}
  5841  }
  5842  func rewriteValuePPC64_OpPPC64ISEL(v *Value) bool {
  5843  	v_2 := v.Args[2]
  5844  	v_1 := v.Args[1]
  5845  	v_0 := v.Args[0]
  5846  	// match: (ISEL [0] (ANDconst [d] y) (MOVDconst [-1]) (CMPU (ANDconst [d] y) (MOVDconst [c])))
  5847  	// cond: c >= d
  5848  	// result: (ANDconst [d] y)
  5849  	for {
  5850  		if auxIntToInt32(v.AuxInt) != 0 || v_0.Op != OpPPC64ANDconst {
  5851  			break
  5852  		}
  5853  		d := auxIntToInt64(v_0.AuxInt)
  5854  		y := v_0.Args[0]
  5855  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 || v_2.Op != OpPPC64CMPU {
  5856  			break
  5857  		}
  5858  		_ = v_2.Args[1]
  5859  		v_2_0 := v_2.Args[0]
  5860  		if v_2_0.Op != OpPPC64ANDconst || auxIntToInt64(v_2_0.AuxInt) != d || y != v_2_0.Args[0] {
  5861  			break
  5862  		}
  5863  		v_2_1 := v_2.Args[1]
  5864  		if v_2_1.Op != OpPPC64MOVDconst {
  5865  			break
  5866  		}
  5867  		c := auxIntToInt64(v_2_1.AuxInt)
  5868  		if !(c >= d) {
  5869  			break
  5870  		}
  5871  		v.reset(OpPPC64ANDconst)
  5872  		v.AuxInt = int64ToAuxInt(d)
  5873  		v.AddArg(y)
  5874  		return true
  5875  	}
  5876  	// match: (ISEL [0] (ANDconst [d] y) (MOVDconst [-1]) (CMPUconst [c] (ANDconst [d] y)))
  5877  	// cond: c >= d
  5878  	// result: (ANDconst [d] y)
  5879  	for {
  5880  		if auxIntToInt32(v.AuxInt) != 0 || v_0.Op != OpPPC64ANDconst {
  5881  			break
  5882  		}
  5883  		d := auxIntToInt64(v_0.AuxInt)
  5884  		y := v_0.Args[0]
  5885  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 || v_2.Op != OpPPC64CMPUconst {
  5886  			break
  5887  		}
  5888  		c := auxIntToInt64(v_2.AuxInt)
  5889  		v_2_0 := v_2.Args[0]
  5890  		if v_2_0.Op != OpPPC64ANDconst || auxIntToInt64(v_2_0.AuxInt) != d || y != v_2_0.Args[0] || !(c >= d) {
  5891  			break
  5892  		}
  5893  		v.reset(OpPPC64ANDconst)
  5894  		v.AuxInt = int64ToAuxInt(d)
  5895  		v.AddArg(y)
  5896  		return true
  5897  	}
  5898  	// match: (ISEL [6] x y (CMPWconst [0] (ISELB [c] one cmp)))
  5899  	// result: (ISEL [c] x y cmp)
  5900  	for {
  5901  		if auxIntToInt32(v.AuxInt) != 6 {
  5902  			break
  5903  		}
  5904  		x := v_0
  5905  		y := v_1
  5906  		if v_2.Op != OpPPC64CMPWconst || auxIntToInt32(v_2.AuxInt) != 0 {
  5907  			break
  5908  		}
  5909  		v_2_0 := v_2.Args[0]
  5910  		if v_2_0.Op != OpPPC64ISELB {
  5911  			break
  5912  		}
  5913  		c := auxIntToInt32(v_2_0.AuxInt)
  5914  		cmp := v_2_0.Args[1]
  5915  		v.reset(OpPPC64ISEL)
  5916  		v.AuxInt = int32ToAuxInt(c)
  5917  		v.AddArg3(x, y, cmp)
  5918  		return true
  5919  	}
  5920  	// match: (ISEL [2] x _ (FlagEQ))
  5921  	// result: x
  5922  	for {
  5923  		if auxIntToInt32(v.AuxInt) != 2 {
  5924  			break
  5925  		}
  5926  		x := v_0
  5927  		if v_2.Op != OpPPC64FlagEQ {
  5928  			break
  5929  		}
  5930  		v.copyOf(x)
  5931  		return true
  5932  	}
  5933  	// match: (ISEL [2] _ y (FlagLT))
  5934  	// result: y
  5935  	for {
  5936  		if auxIntToInt32(v.AuxInt) != 2 {
  5937  			break
  5938  		}
  5939  		y := v_1
  5940  		if v_2.Op != OpPPC64FlagLT {
  5941  			break
  5942  		}
  5943  		v.copyOf(y)
  5944  		return true
  5945  	}
  5946  	// match: (ISEL [2] _ y (FlagGT))
  5947  	// result: y
  5948  	for {
  5949  		if auxIntToInt32(v.AuxInt) != 2 {
  5950  			break
  5951  		}
  5952  		y := v_1
  5953  		if v_2.Op != OpPPC64FlagGT {
  5954  			break
  5955  		}
  5956  		v.copyOf(y)
  5957  		return true
  5958  	}
  5959  	// match: (ISEL [6] _ y (FlagEQ))
  5960  	// result: y
  5961  	for {
  5962  		if auxIntToInt32(v.AuxInt) != 6 {
  5963  			break
  5964  		}
  5965  		y := v_1
  5966  		if v_2.Op != OpPPC64FlagEQ {
  5967  			break
  5968  		}
  5969  		v.copyOf(y)
  5970  		return true
  5971  	}
  5972  	// match: (ISEL [6] x _ (FlagLT))
  5973  	// result: x
  5974  	for {
  5975  		if auxIntToInt32(v.AuxInt) != 6 {
  5976  			break
  5977  		}
  5978  		x := v_0
  5979  		if v_2.Op != OpPPC64FlagLT {
  5980  			break
  5981  		}
  5982  		v.copyOf(x)
  5983  		return true
  5984  	}
  5985  	// match: (ISEL [6] x _ (FlagGT))
  5986  	// result: x
  5987  	for {
  5988  		if auxIntToInt32(v.AuxInt) != 6 {
  5989  			break
  5990  		}
  5991  		x := v_0
  5992  		if v_2.Op != OpPPC64FlagGT {
  5993  			break
  5994  		}
  5995  		v.copyOf(x)
  5996  		return true
  5997  	}
  5998  	// match: (ISEL [0] _ y (FlagEQ))
  5999  	// result: y
  6000  	for {
  6001  		if auxIntToInt32(v.AuxInt) != 0 {
  6002  			break
  6003  		}
  6004  		y := v_1
  6005  		if v_2.Op != OpPPC64FlagEQ {
  6006  			break
  6007  		}
  6008  		v.copyOf(y)
  6009  		return true
  6010  	}
  6011  	// match: (ISEL [0] _ y (FlagGT))
  6012  	// result: y
  6013  	for {
  6014  		if auxIntToInt32(v.AuxInt) != 0 {
  6015  			break
  6016  		}
  6017  		y := v_1
  6018  		if v_2.Op != OpPPC64FlagGT {
  6019  			break
  6020  		}
  6021  		v.copyOf(y)
  6022  		return true
  6023  	}
  6024  	// match: (ISEL [0] x _ (FlagLT))
  6025  	// result: x
  6026  	for {
  6027  		if auxIntToInt32(v.AuxInt) != 0 {
  6028  			break
  6029  		}
  6030  		x := v_0
  6031  		if v_2.Op != OpPPC64FlagLT {
  6032  			break
  6033  		}
  6034  		v.copyOf(x)
  6035  		return true
  6036  	}
  6037  	// match: (ISEL [5] _ x (FlagEQ))
  6038  	// result: x
  6039  	for {
  6040  		if auxIntToInt32(v.AuxInt) != 5 {
  6041  			break
  6042  		}
  6043  		x := v_1
  6044  		if v_2.Op != OpPPC64FlagEQ {
  6045  			break
  6046  		}
  6047  		v.copyOf(x)
  6048  		return true
  6049  	}
  6050  	// match: (ISEL [5] _ x (FlagLT))
  6051  	// result: x
  6052  	for {
  6053  		if auxIntToInt32(v.AuxInt) != 5 {
  6054  			break
  6055  		}
  6056  		x := v_1
  6057  		if v_2.Op != OpPPC64FlagLT {
  6058  			break
  6059  		}
  6060  		v.copyOf(x)
  6061  		return true
  6062  	}
  6063  	// match: (ISEL [5] y _ (FlagGT))
  6064  	// result: y
  6065  	for {
  6066  		if auxIntToInt32(v.AuxInt) != 5 {
  6067  			break
  6068  		}
  6069  		y := v_0
  6070  		if v_2.Op != OpPPC64FlagGT {
  6071  			break
  6072  		}
  6073  		v.copyOf(y)
  6074  		return true
  6075  	}
  6076  	// match: (ISEL [1] _ y (FlagEQ))
  6077  	// result: y
  6078  	for {
  6079  		if auxIntToInt32(v.AuxInt) != 1 {
  6080  			break
  6081  		}
  6082  		y := v_1
  6083  		if v_2.Op != OpPPC64FlagEQ {
  6084  			break
  6085  		}
  6086  		v.copyOf(y)
  6087  		return true
  6088  	}
  6089  	// match: (ISEL [1] _ y (FlagLT))
  6090  	// result: y
  6091  	for {
  6092  		if auxIntToInt32(v.AuxInt) != 1 {
  6093  			break
  6094  		}
  6095  		y := v_1
  6096  		if v_2.Op != OpPPC64FlagLT {
  6097  			break
  6098  		}
  6099  		v.copyOf(y)
  6100  		return true
  6101  	}
  6102  	// match: (ISEL [1] x _ (FlagGT))
  6103  	// result: x
  6104  	for {
  6105  		if auxIntToInt32(v.AuxInt) != 1 {
  6106  			break
  6107  		}
  6108  		x := v_0
  6109  		if v_2.Op != OpPPC64FlagGT {
  6110  			break
  6111  		}
  6112  		v.copyOf(x)
  6113  		return true
  6114  	}
  6115  	// match: (ISEL [4] x _ (FlagEQ))
  6116  	// result: x
  6117  	for {
  6118  		if auxIntToInt32(v.AuxInt) != 4 {
  6119  			break
  6120  		}
  6121  		x := v_0
  6122  		if v_2.Op != OpPPC64FlagEQ {
  6123  			break
  6124  		}
  6125  		v.copyOf(x)
  6126  		return true
  6127  	}
  6128  	// match: (ISEL [4] x _ (FlagGT))
  6129  	// result: x
  6130  	for {
  6131  		if auxIntToInt32(v.AuxInt) != 4 {
  6132  			break
  6133  		}
  6134  		x := v_0
  6135  		if v_2.Op != OpPPC64FlagGT {
  6136  			break
  6137  		}
  6138  		v.copyOf(x)
  6139  		return true
  6140  	}
  6141  	// match: (ISEL [4] _ y (FlagLT))
  6142  	// result: y
  6143  	for {
  6144  		if auxIntToInt32(v.AuxInt) != 4 {
  6145  			break
  6146  		}
  6147  		y := v_1
  6148  		if v_2.Op != OpPPC64FlagLT {
  6149  			break
  6150  		}
  6151  		v.copyOf(y)
  6152  		return true
  6153  	}
  6154  	// match: (ISEL [n] x y (InvertFlags bool))
  6155  	// cond: n%4 == 0
  6156  	// result: (ISEL [n+1] x y bool)
  6157  	for {
  6158  		n := auxIntToInt32(v.AuxInt)
  6159  		x := v_0
  6160  		y := v_1
  6161  		if v_2.Op != OpPPC64InvertFlags {
  6162  			break
  6163  		}
  6164  		bool := v_2.Args[0]
  6165  		if !(n%4 == 0) {
  6166  			break
  6167  		}
  6168  		v.reset(OpPPC64ISEL)
  6169  		v.AuxInt = int32ToAuxInt(n + 1)
  6170  		v.AddArg3(x, y, bool)
  6171  		return true
  6172  	}
  6173  	// match: (ISEL [n] x y (InvertFlags bool))
  6174  	// cond: n%4 == 1
  6175  	// result: (ISEL [n-1] x y bool)
  6176  	for {
  6177  		n := auxIntToInt32(v.AuxInt)
  6178  		x := v_0
  6179  		y := v_1
  6180  		if v_2.Op != OpPPC64InvertFlags {
  6181  			break
  6182  		}
  6183  		bool := v_2.Args[0]
  6184  		if !(n%4 == 1) {
  6185  			break
  6186  		}
  6187  		v.reset(OpPPC64ISEL)
  6188  		v.AuxInt = int32ToAuxInt(n - 1)
  6189  		v.AddArg3(x, y, bool)
  6190  		return true
  6191  	}
  6192  	// match: (ISEL [n] x y (InvertFlags bool))
  6193  	// cond: n%4 == 2
  6194  	// result: (ISEL [n] x y bool)
  6195  	for {
  6196  		n := auxIntToInt32(v.AuxInt)
  6197  		x := v_0
  6198  		y := v_1
  6199  		if v_2.Op != OpPPC64InvertFlags {
  6200  			break
  6201  		}
  6202  		bool := v_2.Args[0]
  6203  		if !(n%4 == 2) {
  6204  			break
  6205  		}
  6206  		v.reset(OpPPC64ISEL)
  6207  		v.AuxInt = int32ToAuxInt(n)
  6208  		v.AddArg3(x, y, bool)
  6209  		return true
  6210  	}
  6211  	return false
  6212  }
  6213  func rewriteValuePPC64_OpPPC64ISELB(v *Value) bool {
  6214  	v_1 := v.Args[1]
  6215  	v_0 := v.Args[0]
  6216  	b := v.Block
  6217  	typ := &b.Func.Config.Types
  6218  	// match: (ISELB [0] _ (FlagLT))
  6219  	// result: (MOVDconst [1])
  6220  	for {
  6221  		if auxIntToInt32(v.AuxInt) != 0 || v_1.Op != OpPPC64FlagLT {
  6222  			break
  6223  		}
  6224  		v.reset(OpPPC64MOVDconst)
  6225  		v.AuxInt = int64ToAuxInt(1)
  6226  		return true
  6227  	}
  6228  	// match: (ISELB [0] _ (FlagGT))
  6229  	// result: (MOVDconst [0])
  6230  	for {
  6231  		if auxIntToInt32(v.AuxInt) != 0 || v_1.Op != OpPPC64FlagGT {
  6232  			break
  6233  		}
  6234  		v.reset(OpPPC64MOVDconst)
  6235  		v.AuxInt = int64ToAuxInt(0)
  6236  		return true
  6237  	}
  6238  	// match: (ISELB [0] _ (FlagEQ))
  6239  	// result: (MOVDconst [0])
  6240  	for {
  6241  		if auxIntToInt32(v.AuxInt) != 0 || v_1.Op != OpPPC64FlagEQ {
  6242  			break
  6243  		}
  6244  		v.reset(OpPPC64MOVDconst)
  6245  		v.AuxInt = int64ToAuxInt(0)
  6246  		return true
  6247  	}
  6248  	// match: (ISELB [1] _ (FlagGT))
  6249  	// result: (MOVDconst [1])
  6250  	for {
  6251  		if auxIntToInt32(v.AuxInt) != 1 || v_1.Op != OpPPC64FlagGT {
  6252  			break
  6253  		}
  6254  		v.reset(OpPPC64MOVDconst)
  6255  		v.AuxInt = int64ToAuxInt(1)
  6256  		return true
  6257  	}
  6258  	// match: (ISELB [1] _ (FlagLT))
  6259  	// result: (MOVDconst [0])
  6260  	for {
  6261  		if auxIntToInt32(v.AuxInt) != 1 || v_1.Op != OpPPC64FlagLT {
  6262  			break
  6263  		}
  6264  		v.reset(OpPPC64MOVDconst)
  6265  		v.AuxInt = int64ToAuxInt(0)
  6266  		return true
  6267  	}
  6268  	// match: (ISELB [1] _ (FlagEQ))
  6269  	// result: (MOVDconst [0])
  6270  	for {
  6271  		if auxIntToInt32(v.AuxInt) != 1 || v_1.Op != OpPPC64FlagEQ {
  6272  			break
  6273  		}
  6274  		v.reset(OpPPC64MOVDconst)
  6275  		v.AuxInt = int64ToAuxInt(0)
  6276  		return true
  6277  	}
  6278  	// match: (ISELB [2] _ (FlagEQ))
  6279  	// result: (MOVDconst [1])
  6280  	for {
  6281  		if auxIntToInt32(v.AuxInt) != 2 || v_1.Op != OpPPC64FlagEQ {
  6282  			break
  6283  		}
  6284  		v.reset(OpPPC64MOVDconst)
  6285  		v.AuxInt = int64ToAuxInt(1)
  6286  		return true
  6287  	}
  6288  	// match: (ISELB [2] _ (FlagLT))
  6289  	// result: (MOVDconst [0])
  6290  	for {
  6291  		if auxIntToInt32(v.AuxInt) != 2 || v_1.Op != OpPPC64FlagLT {
  6292  			break
  6293  		}
  6294  		v.reset(OpPPC64MOVDconst)
  6295  		v.AuxInt = int64ToAuxInt(0)
  6296  		return true
  6297  	}
  6298  	// match: (ISELB [2] _ (FlagGT))
  6299  	// result: (MOVDconst [0])
  6300  	for {
  6301  		if auxIntToInt32(v.AuxInt) != 2 || v_1.Op != OpPPC64FlagGT {
  6302  			break
  6303  		}
  6304  		v.reset(OpPPC64MOVDconst)
  6305  		v.AuxInt = int64ToAuxInt(0)
  6306  		return true
  6307  	}
  6308  	// match: (ISELB [4] _ (FlagLT))
  6309  	// result: (MOVDconst [0])
  6310  	for {
  6311  		if auxIntToInt32(v.AuxInt) != 4 || v_1.Op != OpPPC64FlagLT {
  6312  			break
  6313  		}
  6314  		v.reset(OpPPC64MOVDconst)
  6315  		v.AuxInt = int64ToAuxInt(0)
  6316  		return true
  6317  	}
  6318  	// match: (ISELB [4] _ (FlagGT))
  6319  	// result: (MOVDconst [1])
  6320  	for {
  6321  		if auxIntToInt32(v.AuxInt) != 4 || v_1.Op != OpPPC64FlagGT {
  6322  			break
  6323  		}
  6324  		v.reset(OpPPC64MOVDconst)
  6325  		v.AuxInt = int64ToAuxInt(1)
  6326  		return true
  6327  	}
  6328  	// match: (ISELB [4] _ (FlagEQ))
  6329  	// result: (MOVDconst [1])
  6330  	for {
  6331  		if auxIntToInt32(v.AuxInt) != 4 || v_1.Op != OpPPC64FlagEQ {
  6332  			break
  6333  		}
  6334  		v.reset(OpPPC64MOVDconst)
  6335  		v.AuxInt = int64ToAuxInt(1)
  6336  		return true
  6337  	}
  6338  	// match: (ISELB [5] _ (FlagGT))
  6339  	// result: (MOVDconst [0])
  6340  	for {
  6341  		if auxIntToInt32(v.AuxInt) != 5 || v_1.Op != OpPPC64FlagGT {
  6342  			break
  6343  		}
  6344  		v.reset(OpPPC64MOVDconst)
  6345  		v.AuxInt = int64ToAuxInt(0)
  6346  		return true
  6347  	}
  6348  	// match: (ISELB [5] _ (FlagLT))
  6349  	// result: (MOVDconst [1])
  6350  	for {
  6351  		if auxIntToInt32(v.AuxInt) != 5 || v_1.Op != OpPPC64FlagLT {
  6352  			break
  6353  		}
  6354  		v.reset(OpPPC64MOVDconst)
  6355  		v.AuxInt = int64ToAuxInt(1)
  6356  		return true
  6357  	}
  6358  	// match: (ISELB [5] _ (FlagEQ))
  6359  	// result: (MOVDconst [1])
  6360  	for {
  6361  		if auxIntToInt32(v.AuxInt) != 5 || v_1.Op != OpPPC64FlagEQ {
  6362  			break
  6363  		}
  6364  		v.reset(OpPPC64MOVDconst)
  6365  		v.AuxInt = int64ToAuxInt(1)
  6366  		return true
  6367  	}
  6368  	// match: (ISELB [6] _ (FlagEQ))
  6369  	// result: (MOVDconst [0])
  6370  	for {
  6371  		if auxIntToInt32(v.AuxInt) != 6 || v_1.Op != OpPPC64FlagEQ {
  6372  			break
  6373  		}
  6374  		v.reset(OpPPC64MOVDconst)
  6375  		v.AuxInt = int64ToAuxInt(0)
  6376  		return true
  6377  	}
  6378  	// match: (ISELB [6] _ (FlagLT))
  6379  	// result: (MOVDconst [1])
  6380  	for {
  6381  		if auxIntToInt32(v.AuxInt) != 6 || v_1.Op != OpPPC64FlagLT {
  6382  			break
  6383  		}
  6384  		v.reset(OpPPC64MOVDconst)
  6385  		v.AuxInt = int64ToAuxInt(1)
  6386  		return true
  6387  	}
  6388  	// match: (ISELB [6] _ (FlagGT))
  6389  	// result: (MOVDconst [1])
  6390  	for {
  6391  		if auxIntToInt32(v.AuxInt) != 6 || v_1.Op != OpPPC64FlagGT {
  6392  			break
  6393  		}
  6394  		v.reset(OpPPC64MOVDconst)
  6395  		v.AuxInt = int64ToAuxInt(1)
  6396  		return true
  6397  	}
  6398  	// match: (ISELB [n] (MOVDconst [1]) (InvertFlags bool))
  6399  	// cond: n%4 == 0
  6400  	// result: (ISELB [n+1] (MOVDconst [1]) bool)
  6401  	for {
  6402  		n := auxIntToInt32(v.AuxInt)
  6403  		if v_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpPPC64InvertFlags {
  6404  			break
  6405  		}
  6406  		bool := v_1.Args[0]
  6407  		if !(n%4 == 0) {
  6408  			break
  6409  		}
  6410  		v.reset(OpPPC64ISELB)
  6411  		v.AuxInt = int32ToAuxInt(n + 1)
  6412  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6413  		v0.AuxInt = int64ToAuxInt(1)
  6414  		v.AddArg2(v0, bool)
  6415  		return true
  6416  	}
  6417  	// match: (ISELB [n] (MOVDconst [1]) (InvertFlags bool))
  6418  	// cond: n%4 == 1
  6419  	// result: (ISELB [n-1] (MOVDconst [1]) bool)
  6420  	for {
  6421  		n := auxIntToInt32(v.AuxInt)
  6422  		if v_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpPPC64InvertFlags {
  6423  			break
  6424  		}
  6425  		bool := v_1.Args[0]
  6426  		if !(n%4 == 1) {
  6427  			break
  6428  		}
  6429  		v.reset(OpPPC64ISELB)
  6430  		v.AuxInt = int32ToAuxInt(n - 1)
  6431  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6432  		v0.AuxInt = int64ToAuxInt(1)
  6433  		v.AddArg2(v0, bool)
  6434  		return true
  6435  	}
  6436  	// match: (ISELB [n] (MOVDconst [1]) (InvertFlags bool))
  6437  	// cond: n%4 == 2
  6438  	// result: (ISELB [n] (MOVDconst [1]) bool)
  6439  	for {
  6440  		n := auxIntToInt32(v.AuxInt)
  6441  		if v_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0.AuxInt) != 1 || v_1.Op != OpPPC64InvertFlags {
  6442  			break
  6443  		}
  6444  		bool := v_1.Args[0]
  6445  		if !(n%4 == 2) {
  6446  			break
  6447  		}
  6448  		v.reset(OpPPC64ISELB)
  6449  		v.AuxInt = int32ToAuxInt(n)
  6450  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6451  		v0.AuxInt = int64ToAuxInt(1)
  6452  		v.AddArg2(v0, bool)
  6453  		return true
  6454  	}
  6455  	return false
  6456  }
  6457  func rewriteValuePPC64_OpPPC64LessEqual(v *Value) bool {
  6458  	v_0 := v.Args[0]
  6459  	b := v.Block
  6460  	typ := &b.Func.Config.Types
  6461  	// match: (LessEqual (FlagEQ))
  6462  	// result: (MOVDconst [1])
  6463  	for {
  6464  		if v_0.Op != OpPPC64FlagEQ {
  6465  			break
  6466  		}
  6467  		v.reset(OpPPC64MOVDconst)
  6468  		v.AuxInt = int64ToAuxInt(1)
  6469  		return true
  6470  	}
  6471  	// match: (LessEqual (FlagLT))
  6472  	// result: (MOVDconst [1])
  6473  	for {
  6474  		if v_0.Op != OpPPC64FlagLT {
  6475  			break
  6476  		}
  6477  		v.reset(OpPPC64MOVDconst)
  6478  		v.AuxInt = int64ToAuxInt(1)
  6479  		return true
  6480  	}
  6481  	// match: (LessEqual (FlagGT))
  6482  	// result: (MOVDconst [0])
  6483  	for {
  6484  		if v_0.Op != OpPPC64FlagGT {
  6485  			break
  6486  		}
  6487  		v.reset(OpPPC64MOVDconst)
  6488  		v.AuxInt = int64ToAuxInt(0)
  6489  		return true
  6490  	}
  6491  	// match: (LessEqual (InvertFlags x))
  6492  	// result: (GreaterEqual x)
  6493  	for {
  6494  		if v_0.Op != OpPPC64InvertFlags {
  6495  			break
  6496  		}
  6497  		x := v_0.Args[0]
  6498  		v.reset(OpPPC64GreaterEqual)
  6499  		v.AddArg(x)
  6500  		return true
  6501  	}
  6502  	// match: (LessEqual cmp)
  6503  	// result: (ISELB [5] (MOVDconst [1]) cmp)
  6504  	for {
  6505  		cmp := v_0
  6506  		v.reset(OpPPC64ISELB)
  6507  		v.AuxInt = int32ToAuxInt(5)
  6508  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6509  		v0.AuxInt = int64ToAuxInt(1)
  6510  		v.AddArg2(v0, cmp)
  6511  		return true
  6512  	}
  6513  }
  6514  func rewriteValuePPC64_OpPPC64LessThan(v *Value) bool {
  6515  	v_0 := v.Args[0]
  6516  	b := v.Block
  6517  	typ := &b.Func.Config.Types
  6518  	// match: (LessThan (FlagEQ))
  6519  	// result: (MOVDconst [0])
  6520  	for {
  6521  		if v_0.Op != OpPPC64FlagEQ {
  6522  			break
  6523  		}
  6524  		v.reset(OpPPC64MOVDconst)
  6525  		v.AuxInt = int64ToAuxInt(0)
  6526  		return true
  6527  	}
  6528  	// match: (LessThan (FlagLT))
  6529  	// result: (MOVDconst [1])
  6530  	for {
  6531  		if v_0.Op != OpPPC64FlagLT {
  6532  			break
  6533  		}
  6534  		v.reset(OpPPC64MOVDconst)
  6535  		v.AuxInt = int64ToAuxInt(1)
  6536  		return true
  6537  	}
  6538  	// match: (LessThan (FlagGT))
  6539  	// result: (MOVDconst [0])
  6540  	for {
  6541  		if v_0.Op != OpPPC64FlagGT {
  6542  			break
  6543  		}
  6544  		v.reset(OpPPC64MOVDconst)
  6545  		v.AuxInt = int64ToAuxInt(0)
  6546  		return true
  6547  	}
  6548  	// match: (LessThan (InvertFlags x))
  6549  	// result: (GreaterThan x)
  6550  	for {
  6551  		if v_0.Op != OpPPC64InvertFlags {
  6552  			break
  6553  		}
  6554  		x := v_0.Args[0]
  6555  		v.reset(OpPPC64GreaterThan)
  6556  		v.AddArg(x)
  6557  		return true
  6558  	}
  6559  	// match: (LessThan cmp)
  6560  	// result: (ISELB [0] (MOVDconst [1]) cmp)
  6561  	for {
  6562  		cmp := v_0
  6563  		v.reset(OpPPC64ISELB)
  6564  		v.AuxInt = int32ToAuxInt(0)
  6565  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
  6566  		v0.AuxInt = int64ToAuxInt(1)
  6567  		v.AddArg2(v0, cmp)
  6568  		return true
  6569  	}
  6570  }
  6571  func rewriteValuePPC64_OpPPC64MFVSRD(v *Value) bool {
  6572  	v_0 := v.Args[0]
  6573  	b := v.Block
  6574  	typ := &b.Func.Config.Types
  6575  	// match: (MFVSRD (FMOVDconst [c]))
  6576  	// result: (MOVDconst [int64(math.Float64bits(c))])
  6577  	for {
  6578  		if v_0.Op != OpPPC64FMOVDconst {
  6579  			break
  6580  		}
  6581  		c := auxIntToFloat64(v_0.AuxInt)
  6582  		v.reset(OpPPC64MOVDconst)
  6583  		v.AuxInt = int64ToAuxInt(int64(math.Float64bits(c)))
  6584  		return true
  6585  	}
  6586  	// match: (MFVSRD x:(FMOVDload [off] {sym} ptr mem))
  6587  	// cond: x.Uses == 1 && clobber(x)
  6588  	// result: @x.Block (MOVDload [off] {sym} ptr mem)
  6589  	for {
  6590  		x := v_0
  6591  		if x.Op != OpPPC64FMOVDload {
  6592  			break
  6593  		}
  6594  		off := auxIntToInt32(x.AuxInt)
  6595  		sym := auxToSym(x.Aux)
  6596  		mem := x.Args[1]
  6597  		ptr := x.Args[0]
  6598  		if !(x.Uses == 1 && clobber(x)) {
  6599  			break
  6600  		}
  6601  		b = x.Block
  6602  		v0 := b.NewValue0(x.Pos, OpPPC64MOVDload, typ.Int64)
  6603  		v.copyOf(v0)
  6604  		v0.AuxInt = int32ToAuxInt(off)
  6605  		v0.Aux = symToAux(sym)
  6606  		v0.AddArg2(ptr, mem)
  6607  		return true
  6608  	}
  6609  	return false
  6610  }
  6611  func rewriteValuePPC64_OpPPC64MOVBZload(v *Value) bool {
  6612  	v_1 := v.Args[1]
  6613  	v_0 := v.Args[0]
  6614  	// match: (MOVBZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  6615  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  6616  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  6617  	for {
  6618  		off1 := auxIntToInt32(v.AuxInt)
  6619  		sym1 := auxToSym(v.Aux)
  6620  		p := v_0
  6621  		if p.Op != OpPPC64MOVDaddr {
  6622  			break
  6623  		}
  6624  		off2 := auxIntToInt32(p.AuxInt)
  6625  		sym2 := auxToSym(p.Aux)
  6626  		ptr := p.Args[0]
  6627  		mem := v_1
  6628  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  6629  			break
  6630  		}
  6631  		v.reset(OpPPC64MOVBZload)
  6632  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6633  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6634  		v.AddArg2(ptr, mem)
  6635  		return true
  6636  	}
  6637  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] x) mem)
  6638  	// cond: is16Bit(int64(off1)+off2)
  6639  	// result: (MOVBZload [off1+int32(off2)] {sym} x mem)
  6640  	for {
  6641  		off1 := auxIntToInt32(v.AuxInt)
  6642  		sym := auxToSym(v.Aux)
  6643  		if v_0.Op != OpPPC64ADDconst {
  6644  			break
  6645  		}
  6646  		off2 := auxIntToInt64(v_0.AuxInt)
  6647  		x := v_0.Args[0]
  6648  		mem := v_1
  6649  		if !(is16Bit(int64(off1) + off2)) {
  6650  			break
  6651  		}
  6652  		v.reset(OpPPC64MOVBZload)
  6653  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  6654  		v.Aux = symToAux(sym)
  6655  		v.AddArg2(x, mem)
  6656  		return true
  6657  	}
  6658  	// match: (MOVBZload [0] {sym} p:(ADD ptr idx) mem)
  6659  	// cond: sym == nil && p.Uses == 1
  6660  	// result: (MOVBZloadidx ptr idx mem)
  6661  	for {
  6662  		if auxIntToInt32(v.AuxInt) != 0 {
  6663  			break
  6664  		}
  6665  		sym := auxToSym(v.Aux)
  6666  		p := v_0
  6667  		if p.Op != OpPPC64ADD {
  6668  			break
  6669  		}
  6670  		idx := p.Args[1]
  6671  		ptr := p.Args[0]
  6672  		mem := v_1
  6673  		if !(sym == nil && p.Uses == 1) {
  6674  			break
  6675  		}
  6676  		v.reset(OpPPC64MOVBZloadidx)
  6677  		v.AddArg3(ptr, idx, mem)
  6678  		return true
  6679  	}
  6680  	return false
  6681  }
  6682  func rewriteValuePPC64_OpPPC64MOVBZloadidx(v *Value) bool {
  6683  	v_2 := v.Args[2]
  6684  	v_1 := v.Args[1]
  6685  	v_0 := v.Args[0]
  6686  	// match: (MOVBZloadidx ptr (MOVDconst [c]) mem)
  6687  	// cond: is16Bit(c)
  6688  	// result: (MOVBZload [int32(c)] ptr mem)
  6689  	for {
  6690  		ptr := v_0
  6691  		if v_1.Op != OpPPC64MOVDconst {
  6692  			break
  6693  		}
  6694  		c := auxIntToInt64(v_1.AuxInt)
  6695  		mem := v_2
  6696  		if !(is16Bit(c)) {
  6697  			break
  6698  		}
  6699  		v.reset(OpPPC64MOVBZload)
  6700  		v.AuxInt = int32ToAuxInt(int32(c))
  6701  		v.AddArg2(ptr, mem)
  6702  		return true
  6703  	}
  6704  	// match: (MOVBZloadidx (MOVDconst [c]) ptr mem)
  6705  	// cond: is16Bit(c)
  6706  	// result: (MOVBZload [int32(c)] ptr mem)
  6707  	for {
  6708  		if v_0.Op != OpPPC64MOVDconst {
  6709  			break
  6710  		}
  6711  		c := auxIntToInt64(v_0.AuxInt)
  6712  		ptr := v_1
  6713  		mem := v_2
  6714  		if !(is16Bit(c)) {
  6715  			break
  6716  		}
  6717  		v.reset(OpPPC64MOVBZload)
  6718  		v.AuxInt = int32ToAuxInt(int32(c))
  6719  		v.AddArg2(ptr, mem)
  6720  		return true
  6721  	}
  6722  	return false
  6723  }
  6724  func rewriteValuePPC64_OpPPC64MOVBZreg(v *Value) bool {
  6725  	v_0 := v.Args[0]
  6726  	b := v.Block
  6727  	typ := &b.Func.Config.Types
  6728  	// match: (MOVBZreg y:(ANDconst [c] _))
  6729  	// cond: uint64(c) <= 0xFF
  6730  	// result: y
  6731  	for {
  6732  		y := v_0
  6733  		if y.Op != OpPPC64ANDconst {
  6734  			break
  6735  		}
  6736  		c := auxIntToInt64(y.AuxInt)
  6737  		if !(uint64(c) <= 0xFF) {
  6738  			break
  6739  		}
  6740  		v.copyOf(y)
  6741  		return true
  6742  	}
  6743  	// match: (MOVBZreg (SRWconst [c] (MOVBZreg x)))
  6744  	// result: (SRWconst [c] (MOVBZreg x))
  6745  	for {
  6746  		if v_0.Op != OpPPC64SRWconst {
  6747  			break
  6748  		}
  6749  		c := auxIntToInt64(v_0.AuxInt)
  6750  		v_0_0 := v_0.Args[0]
  6751  		if v_0_0.Op != OpPPC64MOVBZreg {
  6752  			break
  6753  		}
  6754  		x := v_0_0.Args[0]
  6755  		v.reset(OpPPC64SRWconst)
  6756  		v.AuxInt = int64ToAuxInt(c)
  6757  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  6758  		v0.AddArg(x)
  6759  		v.AddArg(v0)
  6760  		return true
  6761  	}
  6762  	// match: (MOVBZreg (SRWconst [c] x))
  6763  	// cond: sizeof(x.Type) == 8
  6764  	// result: (SRWconst [c] x)
  6765  	for {
  6766  		if v_0.Op != OpPPC64SRWconst {
  6767  			break
  6768  		}
  6769  		c := auxIntToInt64(v_0.AuxInt)
  6770  		x := v_0.Args[0]
  6771  		if !(sizeof(x.Type) == 8) {
  6772  			break
  6773  		}
  6774  		v.reset(OpPPC64SRWconst)
  6775  		v.AuxInt = int64ToAuxInt(c)
  6776  		v.AddArg(x)
  6777  		return true
  6778  	}
  6779  	// match: (MOVBZreg (SRDconst [c] x))
  6780  	// cond: c>=56
  6781  	// result: (SRDconst [c] x)
  6782  	for {
  6783  		if v_0.Op != OpPPC64SRDconst {
  6784  			break
  6785  		}
  6786  		c := auxIntToInt64(v_0.AuxInt)
  6787  		x := v_0.Args[0]
  6788  		if !(c >= 56) {
  6789  			break
  6790  		}
  6791  		v.reset(OpPPC64SRDconst)
  6792  		v.AuxInt = int64ToAuxInt(c)
  6793  		v.AddArg(x)
  6794  		return true
  6795  	}
  6796  	// match: (MOVBZreg (SRWconst [c] x))
  6797  	// cond: c>=24
  6798  	// result: (SRWconst [c] x)
  6799  	for {
  6800  		if v_0.Op != OpPPC64SRWconst {
  6801  			break
  6802  		}
  6803  		c := auxIntToInt64(v_0.AuxInt)
  6804  		x := v_0.Args[0]
  6805  		if !(c >= 24) {
  6806  			break
  6807  		}
  6808  		v.reset(OpPPC64SRWconst)
  6809  		v.AuxInt = int64ToAuxInt(c)
  6810  		v.AddArg(x)
  6811  		return true
  6812  	}
  6813  	// match: (MOVBZreg y:(MOVBZreg _))
  6814  	// result: y
  6815  	for {
  6816  		y := v_0
  6817  		if y.Op != OpPPC64MOVBZreg {
  6818  			break
  6819  		}
  6820  		v.copyOf(y)
  6821  		return true
  6822  	}
  6823  	// match: (MOVBZreg (MOVBreg x))
  6824  	// result: (MOVBZreg x)
  6825  	for {
  6826  		if v_0.Op != OpPPC64MOVBreg {
  6827  			break
  6828  		}
  6829  		x := v_0.Args[0]
  6830  		v.reset(OpPPC64MOVBZreg)
  6831  		v.AddArg(x)
  6832  		return true
  6833  	}
  6834  	// match: (MOVBZreg (OR <t> x (MOVWZreg y)))
  6835  	// result: (MOVBZreg (OR <t> x y))
  6836  	for {
  6837  		if v_0.Op != OpPPC64OR {
  6838  			break
  6839  		}
  6840  		t := v_0.Type
  6841  		_ = v_0.Args[1]
  6842  		v_0_0 := v_0.Args[0]
  6843  		v_0_1 := v_0.Args[1]
  6844  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6845  			x := v_0_0
  6846  			if v_0_1.Op != OpPPC64MOVWZreg {
  6847  				continue
  6848  			}
  6849  			y := v_0_1.Args[0]
  6850  			v.reset(OpPPC64MOVBZreg)
  6851  			v0 := b.NewValue0(v.Pos, OpPPC64OR, t)
  6852  			v0.AddArg2(x, y)
  6853  			v.AddArg(v0)
  6854  			return true
  6855  		}
  6856  		break
  6857  	}
  6858  	// match: (MOVBZreg (XOR <t> x (MOVWZreg y)))
  6859  	// result: (MOVBZreg (XOR <t> x y))
  6860  	for {
  6861  		if v_0.Op != OpPPC64XOR {
  6862  			break
  6863  		}
  6864  		t := v_0.Type
  6865  		_ = v_0.Args[1]
  6866  		v_0_0 := v_0.Args[0]
  6867  		v_0_1 := v_0.Args[1]
  6868  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6869  			x := v_0_0
  6870  			if v_0_1.Op != OpPPC64MOVWZreg {
  6871  				continue
  6872  			}
  6873  			y := v_0_1.Args[0]
  6874  			v.reset(OpPPC64MOVBZreg)
  6875  			v0 := b.NewValue0(v.Pos, OpPPC64XOR, t)
  6876  			v0.AddArg2(x, y)
  6877  			v.AddArg(v0)
  6878  			return true
  6879  		}
  6880  		break
  6881  	}
  6882  	// match: (MOVBZreg (AND <t> x (MOVWZreg y)))
  6883  	// result: (MOVBZreg (AND <t> x y))
  6884  	for {
  6885  		if v_0.Op != OpPPC64AND {
  6886  			break
  6887  		}
  6888  		t := v_0.Type
  6889  		_ = v_0.Args[1]
  6890  		v_0_0 := v_0.Args[0]
  6891  		v_0_1 := v_0.Args[1]
  6892  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6893  			x := v_0_0
  6894  			if v_0_1.Op != OpPPC64MOVWZreg {
  6895  				continue
  6896  			}
  6897  			y := v_0_1.Args[0]
  6898  			v.reset(OpPPC64MOVBZreg)
  6899  			v0 := b.NewValue0(v.Pos, OpPPC64AND, t)
  6900  			v0.AddArg2(x, y)
  6901  			v.AddArg(v0)
  6902  			return true
  6903  		}
  6904  		break
  6905  	}
  6906  	// match: (MOVBZreg (OR <t> x (MOVHZreg y)))
  6907  	// result: (MOVBZreg (OR <t> x y))
  6908  	for {
  6909  		if v_0.Op != OpPPC64OR {
  6910  			break
  6911  		}
  6912  		t := v_0.Type
  6913  		_ = v_0.Args[1]
  6914  		v_0_0 := v_0.Args[0]
  6915  		v_0_1 := v_0.Args[1]
  6916  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6917  			x := v_0_0
  6918  			if v_0_1.Op != OpPPC64MOVHZreg {
  6919  				continue
  6920  			}
  6921  			y := v_0_1.Args[0]
  6922  			v.reset(OpPPC64MOVBZreg)
  6923  			v0 := b.NewValue0(v.Pos, OpPPC64OR, t)
  6924  			v0.AddArg2(x, y)
  6925  			v.AddArg(v0)
  6926  			return true
  6927  		}
  6928  		break
  6929  	}
  6930  	// match: (MOVBZreg (XOR <t> x (MOVHZreg y)))
  6931  	// result: (MOVBZreg (XOR <t> x y))
  6932  	for {
  6933  		if v_0.Op != OpPPC64XOR {
  6934  			break
  6935  		}
  6936  		t := v_0.Type
  6937  		_ = v_0.Args[1]
  6938  		v_0_0 := v_0.Args[0]
  6939  		v_0_1 := v_0.Args[1]
  6940  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6941  			x := v_0_0
  6942  			if v_0_1.Op != OpPPC64MOVHZreg {
  6943  				continue
  6944  			}
  6945  			y := v_0_1.Args[0]
  6946  			v.reset(OpPPC64MOVBZreg)
  6947  			v0 := b.NewValue0(v.Pos, OpPPC64XOR, t)
  6948  			v0.AddArg2(x, y)
  6949  			v.AddArg(v0)
  6950  			return true
  6951  		}
  6952  		break
  6953  	}
  6954  	// match: (MOVBZreg (AND <t> x (MOVHZreg y)))
  6955  	// result: (MOVBZreg (AND <t> x y))
  6956  	for {
  6957  		if v_0.Op != OpPPC64AND {
  6958  			break
  6959  		}
  6960  		t := v_0.Type
  6961  		_ = v_0.Args[1]
  6962  		v_0_0 := v_0.Args[0]
  6963  		v_0_1 := v_0.Args[1]
  6964  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6965  			x := v_0_0
  6966  			if v_0_1.Op != OpPPC64MOVHZreg {
  6967  				continue
  6968  			}
  6969  			y := v_0_1.Args[0]
  6970  			v.reset(OpPPC64MOVBZreg)
  6971  			v0 := b.NewValue0(v.Pos, OpPPC64AND, t)
  6972  			v0.AddArg2(x, y)
  6973  			v.AddArg(v0)
  6974  			return true
  6975  		}
  6976  		break
  6977  	}
  6978  	// match: (MOVBZreg (OR <t> x (MOVBZreg y)))
  6979  	// result: (MOVBZreg (OR <t> x y))
  6980  	for {
  6981  		if v_0.Op != OpPPC64OR {
  6982  			break
  6983  		}
  6984  		t := v_0.Type
  6985  		_ = v_0.Args[1]
  6986  		v_0_0 := v_0.Args[0]
  6987  		v_0_1 := v_0.Args[1]
  6988  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  6989  			x := v_0_0
  6990  			if v_0_1.Op != OpPPC64MOVBZreg {
  6991  				continue
  6992  			}
  6993  			y := v_0_1.Args[0]
  6994  			v.reset(OpPPC64MOVBZreg)
  6995  			v0 := b.NewValue0(v.Pos, OpPPC64OR, t)
  6996  			v0.AddArg2(x, y)
  6997  			v.AddArg(v0)
  6998  			return true
  6999  		}
  7000  		break
  7001  	}
  7002  	// match: (MOVBZreg (XOR <t> x (MOVBZreg y)))
  7003  	// result: (MOVBZreg (XOR <t> x y))
  7004  	for {
  7005  		if v_0.Op != OpPPC64XOR {
  7006  			break
  7007  		}
  7008  		t := v_0.Type
  7009  		_ = v_0.Args[1]
  7010  		v_0_0 := v_0.Args[0]
  7011  		v_0_1 := v_0.Args[1]
  7012  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7013  			x := v_0_0
  7014  			if v_0_1.Op != OpPPC64MOVBZreg {
  7015  				continue
  7016  			}
  7017  			y := v_0_1.Args[0]
  7018  			v.reset(OpPPC64MOVBZreg)
  7019  			v0 := b.NewValue0(v.Pos, OpPPC64XOR, t)
  7020  			v0.AddArg2(x, y)
  7021  			v.AddArg(v0)
  7022  			return true
  7023  		}
  7024  		break
  7025  	}
  7026  	// match: (MOVBZreg (AND <t> x (MOVBZreg y)))
  7027  	// result: (MOVBZreg (AND <t> x y))
  7028  	for {
  7029  		if v_0.Op != OpPPC64AND {
  7030  			break
  7031  		}
  7032  		t := v_0.Type
  7033  		_ = v_0.Args[1]
  7034  		v_0_0 := v_0.Args[0]
  7035  		v_0_1 := v_0.Args[1]
  7036  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7037  			x := v_0_0
  7038  			if v_0_1.Op != OpPPC64MOVBZreg {
  7039  				continue
  7040  			}
  7041  			y := v_0_1.Args[0]
  7042  			v.reset(OpPPC64MOVBZreg)
  7043  			v0 := b.NewValue0(v.Pos, OpPPC64AND, t)
  7044  			v0.AddArg2(x, y)
  7045  			v.AddArg(v0)
  7046  			return true
  7047  		}
  7048  		break
  7049  	}
  7050  	// match: (MOVBZreg z:(ANDconst [c] (MOVBZload ptr x)))
  7051  	// result: z
  7052  	for {
  7053  		z := v_0
  7054  		if z.Op != OpPPC64ANDconst {
  7055  			break
  7056  		}
  7057  		z_0 := z.Args[0]
  7058  		if z_0.Op != OpPPC64MOVBZload {
  7059  			break
  7060  		}
  7061  		v.copyOf(z)
  7062  		return true
  7063  	}
  7064  	// match: (MOVBZreg z:(AND y (MOVBZload ptr x)))
  7065  	// result: z
  7066  	for {
  7067  		z := v_0
  7068  		if z.Op != OpPPC64AND {
  7069  			break
  7070  		}
  7071  		_ = z.Args[1]
  7072  		z_0 := z.Args[0]
  7073  		z_1 := z.Args[1]
  7074  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
  7075  			if z_1.Op != OpPPC64MOVBZload {
  7076  				continue
  7077  			}
  7078  			v.copyOf(z)
  7079  			return true
  7080  		}
  7081  		break
  7082  	}
  7083  	// match: (MOVBZreg x:(MOVBZload _ _))
  7084  	// result: x
  7085  	for {
  7086  		x := v_0
  7087  		if x.Op != OpPPC64MOVBZload {
  7088  			break
  7089  		}
  7090  		v.copyOf(x)
  7091  		return true
  7092  	}
  7093  	// match: (MOVBZreg x:(MOVBZloadidx _ _ _))
  7094  	// result: x
  7095  	for {
  7096  		x := v_0
  7097  		if x.Op != OpPPC64MOVBZloadidx {
  7098  			break
  7099  		}
  7100  		v.copyOf(x)
  7101  		return true
  7102  	}
  7103  	// match: (MOVBZreg x:(Select0 (LoweredAtomicLoad8 _ _)))
  7104  	// result: x
  7105  	for {
  7106  		x := v_0
  7107  		if x.Op != OpSelect0 {
  7108  			break
  7109  		}
  7110  		x_0 := x.Args[0]
  7111  		if x_0.Op != OpPPC64LoweredAtomicLoad8 {
  7112  			break
  7113  		}
  7114  		v.copyOf(x)
  7115  		return true
  7116  	}
  7117  	// match: (MOVBZreg x:(Arg <t>))
  7118  	// cond: is8BitInt(t) && !isSigned(t)
  7119  	// result: x
  7120  	for {
  7121  		x := v_0
  7122  		if x.Op != OpArg {
  7123  			break
  7124  		}
  7125  		t := x.Type
  7126  		if !(is8BitInt(t) && !isSigned(t)) {
  7127  			break
  7128  		}
  7129  		v.copyOf(x)
  7130  		return true
  7131  	}
  7132  	// match: (MOVBZreg (MOVDconst [c]))
  7133  	// result: (MOVDconst [int64(uint8(c))])
  7134  	for {
  7135  		if v_0.Op != OpPPC64MOVDconst {
  7136  			break
  7137  		}
  7138  		c := auxIntToInt64(v_0.AuxInt)
  7139  		v.reset(OpPPC64MOVDconst)
  7140  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  7141  		return true
  7142  	}
  7143  	return false
  7144  }
  7145  func rewriteValuePPC64_OpPPC64MOVBreg(v *Value) bool {
  7146  	v_0 := v.Args[0]
  7147  	b := v.Block
  7148  	typ := &b.Func.Config.Types
  7149  	// match: (MOVBreg y:(ANDconst [c] _))
  7150  	// cond: uint64(c) <= 0x7F
  7151  	// result: y
  7152  	for {
  7153  		y := v_0
  7154  		if y.Op != OpPPC64ANDconst {
  7155  			break
  7156  		}
  7157  		c := auxIntToInt64(y.AuxInt)
  7158  		if !(uint64(c) <= 0x7F) {
  7159  			break
  7160  		}
  7161  		v.copyOf(y)
  7162  		return true
  7163  	}
  7164  	// match: (MOVBreg (SRAWconst [c] (MOVBreg x)))
  7165  	// result: (SRAWconst [c] (MOVBreg x))
  7166  	for {
  7167  		if v_0.Op != OpPPC64SRAWconst {
  7168  			break
  7169  		}
  7170  		c := auxIntToInt64(v_0.AuxInt)
  7171  		v_0_0 := v_0.Args[0]
  7172  		if v_0_0.Op != OpPPC64MOVBreg {
  7173  			break
  7174  		}
  7175  		x := v_0_0.Args[0]
  7176  		v.reset(OpPPC64SRAWconst)
  7177  		v.AuxInt = int64ToAuxInt(c)
  7178  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
  7179  		v0.AddArg(x)
  7180  		v.AddArg(v0)
  7181  		return true
  7182  	}
  7183  	// match: (MOVBreg (SRAWconst [c] x))
  7184  	// cond: sizeof(x.Type) == 8
  7185  	// result: (SRAWconst [c] x)
  7186  	for {
  7187  		if v_0.Op != OpPPC64SRAWconst {
  7188  			break
  7189  		}
  7190  		c := auxIntToInt64(v_0.AuxInt)
  7191  		x := v_0.Args[0]
  7192  		if !(sizeof(x.Type) == 8) {
  7193  			break
  7194  		}
  7195  		v.reset(OpPPC64SRAWconst)
  7196  		v.AuxInt = int64ToAuxInt(c)
  7197  		v.AddArg(x)
  7198  		return true
  7199  	}
  7200  	// match: (MOVBreg (SRDconst [c] x))
  7201  	// cond: c>56
  7202  	// result: (SRDconst [c] x)
  7203  	for {
  7204  		if v_0.Op != OpPPC64SRDconst {
  7205  			break
  7206  		}
  7207  		c := auxIntToInt64(v_0.AuxInt)
  7208  		x := v_0.Args[0]
  7209  		if !(c > 56) {
  7210  			break
  7211  		}
  7212  		v.reset(OpPPC64SRDconst)
  7213  		v.AuxInt = int64ToAuxInt(c)
  7214  		v.AddArg(x)
  7215  		return true
  7216  	}
  7217  	// match: (MOVBreg (SRDconst [c] x))
  7218  	// cond: c==56
  7219  	// result: (SRADconst [c] x)
  7220  	for {
  7221  		if v_0.Op != OpPPC64SRDconst {
  7222  			break
  7223  		}
  7224  		c := auxIntToInt64(v_0.AuxInt)
  7225  		x := v_0.Args[0]
  7226  		if !(c == 56) {
  7227  			break
  7228  		}
  7229  		v.reset(OpPPC64SRADconst)
  7230  		v.AuxInt = int64ToAuxInt(c)
  7231  		v.AddArg(x)
  7232  		return true
  7233  	}
  7234  	// match: (MOVBreg (SRADconst [c] x))
  7235  	// cond: c>=56
  7236  	// result: (SRADconst [c] x)
  7237  	for {
  7238  		if v_0.Op != OpPPC64SRADconst {
  7239  			break
  7240  		}
  7241  		c := auxIntToInt64(v_0.AuxInt)
  7242  		x := v_0.Args[0]
  7243  		if !(c >= 56) {
  7244  			break
  7245  		}
  7246  		v.reset(OpPPC64SRADconst)
  7247  		v.AuxInt = int64ToAuxInt(c)
  7248  		v.AddArg(x)
  7249  		return true
  7250  	}
  7251  	// match: (MOVBreg (SRWconst [c] x))
  7252  	// cond: c>24
  7253  	// result: (SRWconst [c] x)
  7254  	for {
  7255  		if v_0.Op != OpPPC64SRWconst {
  7256  			break
  7257  		}
  7258  		c := auxIntToInt64(v_0.AuxInt)
  7259  		x := v_0.Args[0]
  7260  		if !(c > 24) {
  7261  			break
  7262  		}
  7263  		v.reset(OpPPC64SRWconst)
  7264  		v.AuxInt = int64ToAuxInt(c)
  7265  		v.AddArg(x)
  7266  		return true
  7267  	}
  7268  	// match: (MOVBreg (SRWconst [c] x))
  7269  	// cond: c==24
  7270  	// result: (SRAWconst [c] x)
  7271  	for {
  7272  		if v_0.Op != OpPPC64SRWconst {
  7273  			break
  7274  		}
  7275  		c := auxIntToInt64(v_0.AuxInt)
  7276  		x := v_0.Args[0]
  7277  		if !(c == 24) {
  7278  			break
  7279  		}
  7280  		v.reset(OpPPC64SRAWconst)
  7281  		v.AuxInt = int64ToAuxInt(c)
  7282  		v.AddArg(x)
  7283  		return true
  7284  	}
  7285  	// match: (MOVBreg (SRAWconst [c] x))
  7286  	// cond: c>=24
  7287  	// result: (SRAWconst [c] x)
  7288  	for {
  7289  		if v_0.Op != OpPPC64SRAWconst {
  7290  			break
  7291  		}
  7292  		c := auxIntToInt64(v_0.AuxInt)
  7293  		x := v_0.Args[0]
  7294  		if !(c >= 24) {
  7295  			break
  7296  		}
  7297  		v.reset(OpPPC64SRAWconst)
  7298  		v.AuxInt = int64ToAuxInt(c)
  7299  		v.AddArg(x)
  7300  		return true
  7301  	}
  7302  	// match: (MOVBreg y:(MOVBreg _))
  7303  	// result: y
  7304  	for {
  7305  		y := v_0
  7306  		if y.Op != OpPPC64MOVBreg {
  7307  			break
  7308  		}
  7309  		v.copyOf(y)
  7310  		return true
  7311  	}
  7312  	// match: (MOVBreg (MOVBZreg x))
  7313  	// result: (MOVBreg x)
  7314  	for {
  7315  		if v_0.Op != OpPPC64MOVBZreg {
  7316  			break
  7317  		}
  7318  		x := v_0.Args[0]
  7319  		v.reset(OpPPC64MOVBreg)
  7320  		v.AddArg(x)
  7321  		return true
  7322  	}
  7323  	// match: (MOVBreg x:(Arg <t>))
  7324  	// cond: is8BitInt(t) && isSigned(t)
  7325  	// result: x
  7326  	for {
  7327  		x := v_0
  7328  		if x.Op != OpArg {
  7329  			break
  7330  		}
  7331  		t := x.Type
  7332  		if !(is8BitInt(t) && isSigned(t)) {
  7333  			break
  7334  		}
  7335  		v.copyOf(x)
  7336  		return true
  7337  	}
  7338  	// match: (MOVBreg (MOVDconst [c]))
  7339  	// result: (MOVDconst [int64(int8(c))])
  7340  	for {
  7341  		if v_0.Op != OpPPC64MOVDconst {
  7342  			break
  7343  		}
  7344  		c := auxIntToInt64(v_0.AuxInt)
  7345  		v.reset(OpPPC64MOVDconst)
  7346  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  7347  		return true
  7348  	}
  7349  	return false
  7350  }
  7351  func rewriteValuePPC64_OpPPC64MOVBstore(v *Value) bool {
  7352  	v_2 := v.Args[2]
  7353  	v_1 := v.Args[1]
  7354  	v_0 := v.Args[0]
  7355  	b := v.Block
  7356  	config := b.Func.Config
  7357  	typ := &b.Func.Config.Types
  7358  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] x) val mem)
  7359  	// cond: is16Bit(int64(off1)+off2)
  7360  	// result: (MOVBstore [off1+int32(off2)] {sym} x val mem)
  7361  	for {
  7362  		off1 := auxIntToInt32(v.AuxInt)
  7363  		sym := auxToSym(v.Aux)
  7364  		if v_0.Op != OpPPC64ADDconst {
  7365  			break
  7366  		}
  7367  		off2 := auxIntToInt64(v_0.AuxInt)
  7368  		x := v_0.Args[0]
  7369  		val := v_1
  7370  		mem := v_2
  7371  		if !(is16Bit(int64(off1) + off2)) {
  7372  			break
  7373  		}
  7374  		v.reset(OpPPC64MOVBstore)
  7375  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  7376  		v.Aux = symToAux(sym)
  7377  		v.AddArg3(x, val, mem)
  7378  		return true
  7379  	}
  7380  	// match: (MOVBstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  7381  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  7382  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  7383  	for {
  7384  		off1 := auxIntToInt32(v.AuxInt)
  7385  		sym1 := auxToSym(v.Aux)
  7386  		p := v_0
  7387  		if p.Op != OpPPC64MOVDaddr {
  7388  			break
  7389  		}
  7390  		off2 := auxIntToInt32(p.AuxInt)
  7391  		sym2 := auxToSym(p.Aux)
  7392  		ptr := p.Args[0]
  7393  		val := v_1
  7394  		mem := v_2
  7395  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  7396  			break
  7397  		}
  7398  		v.reset(OpPPC64MOVBstore)
  7399  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7400  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7401  		v.AddArg3(ptr, val, mem)
  7402  		return true
  7403  	}
  7404  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [0]) mem)
  7405  	// result: (MOVBstorezero [off] {sym} ptr mem)
  7406  	for {
  7407  		off := auxIntToInt32(v.AuxInt)
  7408  		sym := auxToSym(v.Aux)
  7409  		ptr := v_0
  7410  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  7411  			break
  7412  		}
  7413  		mem := v_2
  7414  		v.reset(OpPPC64MOVBstorezero)
  7415  		v.AuxInt = int32ToAuxInt(off)
  7416  		v.Aux = symToAux(sym)
  7417  		v.AddArg2(ptr, mem)
  7418  		return true
  7419  	}
  7420  	// match: (MOVBstore [0] {sym} p:(ADD ptr idx) val mem)
  7421  	// cond: sym == nil && p.Uses == 1
  7422  	// result: (MOVBstoreidx ptr idx val mem)
  7423  	for {
  7424  		if auxIntToInt32(v.AuxInt) != 0 {
  7425  			break
  7426  		}
  7427  		sym := auxToSym(v.Aux)
  7428  		p := v_0
  7429  		if p.Op != OpPPC64ADD {
  7430  			break
  7431  		}
  7432  		idx := p.Args[1]
  7433  		ptr := p.Args[0]
  7434  		val := v_1
  7435  		mem := v_2
  7436  		if !(sym == nil && p.Uses == 1) {
  7437  			break
  7438  		}
  7439  		v.reset(OpPPC64MOVBstoreidx)
  7440  		v.AddArg4(ptr, idx, val, mem)
  7441  		return true
  7442  	}
  7443  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  7444  	// result: (MOVBstore [off] {sym} ptr x mem)
  7445  	for {
  7446  		off := auxIntToInt32(v.AuxInt)
  7447  		sym := auxToSym(v.Aux)
  7448  		ptr := v_0
  7449  		if v_1.Op != OpPPC64MOVBreg {
  7450  			break
  7451  		}
  7452  		x := v_1.Args[0]
  7453  		mem := v_2
  7454  		v.reset(OpPPC64MOVBstore)
  7455  		v.AuxInt = int32ToAuxInt(off)
  7456  		v.Aux = symToAux(sym)
  7457  		v.AddArg3(ptr, x, mem)
  7458  		return true
  7459  	}
  7460  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  7461  	// result: (MOVBstore [off] {sym} ptr x mem)
  7462  	for {
  7463  		off := auxIntToInt32(v.AuxInt)
  7464  		sym := auxToSym(v.Aux)
  7465  		ptr := v_0
  7466  		if v_1.Op != OpPPC64MOVBZreg {
  7467  			break
  7468  		}
  7469  		x := v_1.Args[0]
  7470  		mem := v_2
  7471  		v.reset(OpPPC64MOVBstore)
  7472  		v.AuxInt = int32ToAuxInt(off)
  7473  		v.Aux = symToAux(sym)
  7474  		v.AddArg3(ptr, x, mem)
  7475  		return true
  7476  	}
  7477  	// match: (MOVBstore [off] {sym} ptr (MOVHreg x) mem)
  7478  	// result: (MOVBstore [off] {sym} ptr x mem)
  7479  	for {
  7480  		off := auxIntToInt32(v.AuxInt)
  7481  		sym := auxToSym(v.Aux)
  7482  		ptr := v_0
  7483  		if v_1.Op != OpPPC64MOVHreg {
  7484  			break
  7485  		}
  7486  		x := v_1.Args[0]
  7487  		mem := v_2
  7488  		v.reset(OpPPC64MOVBstore)
  7489  		v.AuxInt = int32ToAuxInt(off)
  7490  		v.Aux = symToAux(sym)
  7491  		v.AddArg3(ptr, x, mem)
  7492  		return true
  7493  	}
  7494  	// match: (MOVBstore [off] {sym} ptr (MOVHZreg x) mem)
  7495  	// result: (MOVBstore [off] {sym} ptr x mem)
  7496  	for {
  7497  		off := auxIntToInt32(v.AuxInt)
  7498  		sym := auxToSym(v.Aux)
  7499  		ptr := v_0
  7500  		if v_1.Op != OpPPC64MOVHZreg {
  7501  			break
  7502  		}
  7503  		x := v_1.Args[0]
  7504  		mem := v_2
  7505  		v.reset(OpPPC64MOVBstore)
  7506  		v.AuxInt = int32ToAuxInt(off)
  7507  		v.Aux = symToAux(sym)
  7508  		v.AddArg3(ptr, x, mem)
  7509  		return true
  7510  	}
  7511  	// match: (MOVBstore [off] {sym} ptr (MOVWreg x) mem)
  7512  	// result: (MOVBstore [off] {sym} ptr x mem)
  7513  	for {
  7514  		off := auxIntToInt32(v.AuxInt)
  7515  		sym := auxToSym(v.Aux)
  7516  		ptr := v_0
  7517  		if v_1.Op != OpPPC64MOVWreg {
  7518  			break
  7519  		}
  7520  		x := v_1.Args[0]
  7521  		mem := v_2
  7522  		v.reset(OpPPC64MOVBstore)
  7523  		v.AuxInt = int32ToAuxInt(off)
  7524  		v.Aux = symToAux(sym)
  7525  		v.AddArg3(ptr, x, mem)
  7526  		return true
  7527  	}
  7528  	// match: (MOVBstore [off] {sym} ptr (MOVWZreg x) mem)
  7529  	// result: (MOVBstore [off] {sym} ptr x mem)
  7530  	for {
  7531  		off := auxIntToInt32(v.AuxInt)
  7532  		sym := auxToSym(v.Aux)
  7533  		ptr := v_0
  7534  		if v_1.Op != OpPPC64MOVWZreg {
  7535  			break
  7536  		}
  7537  		x := v_1.Args[0]
  7538  		mem := v_2
  7539  		v.reset(OpPPC64MOVBstore)
  7540  		v.AuxInt = int32ToAuxInt(off)
  7541  		v.Aux = symToAux(sym)
  7542  		v.AddArg3(ptr, x, mem)
  7543  		return true
  7544  	}
  7545  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHreg x) [c]) mem)
  7546  	// cond: c <= 8
  7547  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  7548  	for {
  7549  		off := auxIntToInt32(v.AuxInt)
  7550  		sym := auxToSym(v.Aux)
  7551  		ptr := v_0
  7552  		if v_1.Op != OpPPC64SRWconst {
  7553  			break
  7554  		}
  7555  		c := auxIntToInt64(v_1.AuxInt)
  7556  		v_1_0 := v_1.Args[0]
  7557  		if v_1_0.Op != OpPPC64MOVHreg {
  7558  			break
  7559  		}
  7560  		x := v_1_0.Args[0]
  7561  		mem := v_2
  7562  		if !(c <= 8) {
  7563  			break
  7564  		}
  7565  		v.reset(OpPPC64MOVBstore)
  7566  		v.AuxInt = int32ToAuxInt(off)
  7567  		v.Aux = symToAux(sym)
  7568  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  7569  		v0.AuxInt = int64ToAuxInt(c)
  7570  		v0.AddArg(x)
  7571  		v.AddArg3(ptr, v0, mem)
  7572  		return true
  7573  	}
  7574  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVHZreg x) [c]) mem)
  7575  	// cond: c <= 8
  7576  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  7577  	for {
  7578  		off := auxIntToInt32(v.AuxInt)
  7579  		sym := auxToSym(v.Aux)
  7580  		ptr := v_0
  7581  		if v_1.Op != OpPPC64SRWconst {
  7582  			break
  7583  		}
  7584  		c := auxIntToInt64(v_1.AuxInt)
  7585  		v_1_0 := v_1.Args[0]
  7586  		if v_1_0.Op != OpPPC64MOVHZreg {
  7587  			break
  7588  		}
  7589  		x := v_1_0.Args[0]
  7590  		mem := v_2
  7591  		if !(c <= 8) {
  7592  			break
  7593  		}
  7594  		v.reset(OpPPC64MOVBstore)
  7595  		v.AuxInt = int32ToAuxInt(off)
  7596  		v.Aux = symToAux(sym)
  7597  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  7598  		v0.AuxInt = int64ToAuxInt(c)
  7599  		v0.AddArg(x)
  7600  		v.AddArg3(ptr, v0, mem)
  7601  		return true
  7602  	}
  7603  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWreg x) [c]) mem)
  7604  	// cond: c <= 24
  7605  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  7606  	for {
  7607  		off := auxIntToInt32(v.AuxInt)
  7608  		sym := auxToSym(v.Aux)
  7609  		ptr := v_0
  7610  		if v_1.Op != OpPPC64SRWconst {
  7611  			break
  7612  		}
  7613  		c := auxIntToInt64(v_1.AuxInt)
  7614  		v_1_0 := v_1.Args[0]
  7615  		if v_1_0.Op != OpPPC64MOVWreg {
  7616  			break
  7617  		}
  7618  		x := v_1_0.Args[0]
  7619  		mem := v_2
  7620  		if !(c <= 24) {
  7621  			break
  7622  		}
  7623  		v.reset(OpPPC64MOVBstore)
  7624  		v.AuxInt = int32ToAuxInt(off)
  7625  		v.Aux = symToAux(sym)
  7626  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  7627  		v0.AuxInt = int64ToAuxInt(c)
  7628  		v0.AddArg(x)
  7629  		v.AddArg3(ptr, v0, mem)
  7630  		return true
  7631  	}
  7632  	// match: (MOVBstore [off] {sym} ptr (SRWconst (MOVWZreg x) [c]) mem)
  7633  	// cond: c <= 24
  7634  	// result: (MOVBstore [off] {sym} ptr (SRWconst <typ.UInt32> x [c]) mem)
  7635  	for {
  7636  		off := auxIntToInt32(v.AuxInt)
  7637  		sym := auxToSym(v.Aux)
  7638  		ptr := v_0
  7639  		if v_1.Op != OpPPC64SRWconst {
  7640  			break
  7641  		}
  7642  		c := auxIntToInt64(v_1.AuxInt)
  7643  		v_1_0 := v_1.Args[0]
  7644  		if v_1_0.Op != OpPPC64MOVWZreg {
  7645  			break
  7646  		}
  7647  		x := v_1_0.Args[0]
  7648  		mem := v_2
  7649  		if !(c <= 24) {
  7650  			break
  7651  		}
  7652  		v.reset(OpPPC64MOVBstore)
  7653  		v.AuxInt = int32ToAuxInt(off)
  7654  		v.Aux = symToAux(sym)
  7655  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  7656  		v0.AuxInt = int64ToAuxInt(c)
  7657  		v0.AddArg(x)
  7658  		v.AddArg3(ptr, v0, mem)
  7659  		return true
  7660  	}
  7661  	// match: (MOVBstore [i1] {s} p (SRWconst w [24]) x0:(MOVBstore [i0] {s} p (SRWconst w [16]) mem))
  7662  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  7663  	// result: (MOVHstore [i0] {s} p (SRWconst <typ.UInt16> w [16]) mem)
  7664  	for {
  7665  		i1 := auxIntToInt32(v.AuxInt)
  7666  		s := auxToSym(v.Aux)
  7667  		p := v_0
  7668  		if v_1.Op != OpPPC64SRWconst || auxIntToInt64(v_1.AuxInt) != 24 {
  7669  			break
  7670  		}
  7671  		w := v_1.Args[0]
  7672  		x0 := v_2
  7673  		if x0.Op != OpPPC64MOVBstore {
  7674  			break
  7675  		}
  7676  		i0 := auxIntToInt32(x0.AuxInt)
  7677  		if auxToSym(x0.Aux) != s {
  7678  			break
  7679  		}
  7680  		mem := x0.Args[2]
  7681  		if p != x0.Args[0] {
  7682  			break
  7683  		}
  7684  		x0_1 := x0.Args[1]
  7685  		if x0_1.Op != OpPPC64SRWconst || auxIntToInt64(x0_1.AuxInt) != 16 || w != x0_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  7686  			break
  7687  		}
  7688  		v.reset(OpPPC64MOVHstore)
  7689  		v.AuxInt = int32ToAuxInt(i0)
  7690  		v.Aux = symToAux(s)
  7691  		v0 := b.NewValue0(x0.Pos, OpPPC64SRWconst, typ.UInt16)
  7692  		v0.AuxInt = int64ToAuxInt(16)
  7693  		v0.AddArg(w)
  7694  		v.AddArg3(p, v0, mem)
  7695  		return true
  7696  	}
  7697  	// match: (MOVBstore [i1] {s} p (SRDconst w [24]) x0:(MOVBstore [i0] {s} p (SRDconst w [16]) mem))
  7698  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  7699  	// result: (MOVHstore [i0] {s} p (SRWconst <typ.UInt16> w [16]) mem)
  7700  	for {
  7701  		i1 := auxIntToInt32(v.AuxInt)
  7702  		s := auxToSym(v.Aux)
  7703  		p := v_0
  7704  		if v_1.Op != OpPPC64SRDconst || auxIntToInt64(v_1.AuxInt) != 24 {
  7705  			break
  7706  		}
  7707  		w := v_1.Args[0]
  7708  		x0 := v_2
  7709  		if x0.Op != OpPPC64MOVBstore {
  7710  			break
  7711  		}
  7712  		i0 := auxIntToInt32(x0.AuxInt)
  7713  		if auxToSym(x0.Aux) != s {
  7714  			break
  7715  		}
  7716  		mem := x0.Args[2]
  7717  		if p != x0.Args[0] {
  7718  			break
  7719  		}
  7720  		x0_1 := x0.Args[1]
  7721  		if x0_1.Op != OpPPC64SRDconst || auxIntToInt64(x0_1.AuxInt) != 16 || w != x0_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  7722  			break
  7723  		}
  7724  		v.reset(OpPPC64MOVHstore)
  7725  		v.AuxInt = int32ToAuxInt(i0)
  7726  		v.Aux = symToAux(s)
  7727  		v0 := b.NewValue0(x0.Pos, OpPPC64SRWconst, typ.UInt16)
  7728  		v0.AuxInt = int64ToAuxInt(16)
  7729  		v0.AddArg(w)
  7730  		v.AddArg3(p, v0, mem)
  7731  		return true
  7732  	}
  7733  	// match: (MOVBstore [i1] {s} p (SRWconst w [8]) x0:(MOVBstore [i0] {s} p w mem))
  7734  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  7735  	// result: (MOVHstore [i0] {s} p w mem)
  7736  	for {
  7737  		i1 := auxIntToInt32(v.AuxInt)
  7738  		s := auxToSym(v.Aux)
  7739  		p := v_0
  7740  		if v_1.Op != OpPPC64SRWconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7741  			break
  7742  		}
  7743  		w := v_1.Args[0]
  7744  		x0 := v_2
  7745  		if x0.Op != OpPPC64MOVBstore {
  7746  			break
  7747  		}
  7748  		i0 := auxIntToInt32(x0.AuxInt)
  7749  		if auxToSym(x0.Aux) != s {
  7750  			break
  7751  		}
  7752  		mem := x0.Args[2]
  7753  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  7754  			break
  7755  		}
  7756  		v.reset(OpPPC64MOVHstore)
  7757  		v.AuxInt = int32ToAuxInt(i0)
  7758  		v.Aux = symToAux(s)
  7759  		v.AddArg3(p, w, mem)
  7760  		return true
  7761  	}
  7762  	// match: (MOVBstore [i1] {s} p (SRDconst w [8]) x0:(MOVBstore [i0] {s} p w mem))
  7763  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  7764  	// result: (MOVHstore [i0] {s} p w mem)
  7765  	for {
  7766  		i1 := auxIntToInt32(v.AuxInt)
  7767  		s := auxToSym(v.Aux)
  7768  		p := v_0
  7769  		if v_1.Op != OpPPC64SRDconst || auxIntToInt64(v_1.AuxInt) != 8 {
  7770  			break
  7771  		}
  7772  		w := v_1.Args[0]
  7773  		x0 := v_2
  7774  		if x0.Op != OpPPC64MOVBstore {
  7775  			break
  7776  		}
  7777  		i0 := auxIntToInt32(x0.AuxInt)
  7778  		if auxToSym(x0.Aux) != s {
  7779  			break
  7780  		}
  7781  		mem := x0.Args[2]
  7782  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  7783  			break
  7784  		}
  7785  		v.reset(OpPPC64MOVHstore)
  7786  		v.AuxInt = int32ToAuxInt(i0)
  7787  		v.Aux = symToAux(s)
  7788  		v.AddArg3(p, w, mem)
  7789  		return true
  7790  	}
  7791  	// match: (MOVBstore [i3] {s} p w x0:(MOVBstore [i2] {s} p (SRWconst w [8]) x1:(MOVBstore [i1] {s} p (SRWconst w [16]) x2:(MOVBstore [i0] {s} p (SRWconst w [24]) mem))))
  7792  	// cond: !config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && clobber(x0, x1, x2)
  7793  	// result: (MOVWBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  7794  	for {
  7795  		i3 := auxIntToInt32(v.AuxInt)
  7796  		s := auxToSym(v.Aux)
  7797  		p := v_0
  7798  		w := v_1
  7799  		x0 := v_2
  7800  		if x0.Op != OpPPC64MOVBstore {
  7801  			break
  7802  		}
  7803  		i2 := auxIntToInt32(x0.AuxInt)
  7804  		if auxToSym(x0.Aux) != s {
  7805  			break
  7806  		}
  7807  		_ = x0.Args[2]
  7808  		if p != x0.Args[0] {
  7809  			break
  7810  		}
  7811  		x0_1 := x0.Args[1]
  7812  		if x0_1.Op != OpPPC64SRWconst || auxIntToInt64(x0_1.AuxInt) != 8 || w != x0_1.Args[0] {
  7813  			break
  7814  		}
  7815  		x1 := x0.Args[2]
  7816  		if x1.Op != OpPPC64MOVBstore {
  7817  			break
  7818  		}
  7819  		i1 := auxIntToInt32(x1.AuxInt)
  7820  		if auxToSym(x1.Aux) != s {
  7821  			break
  7822  		}
  7823  		_ = x1.Args[2]
  7824  		if p != x1.Args[0] {
  7825  			break
  7826  		}
  7827  		x1_1 := x1.Args[1]
  7828  		if x1_1.Op != OpPPC64SRWconst || auxIntToInt64(x1_1.AuxInt) != 16 || w != x1_1.Args[0] {
  7829  			break
  7830  		}
  7831  		x2 := x1.Args[2]
  7832  		if x2.Op != OpPPC64MOVBstore {
  7833  			break
  7834  		}
  7835  		i0 := auxIntToInt32(x2.AuxInt)
  7836  		if auxToSym(x2.Aux) != s {
  7837  			break
  7838  		}
  7839  		mem := x2.Args[2]
  7840  		if p != x2.Args[0] {
  7841  			break
  7842  		}
  7843  		x2_1 := x2.Args[1]
  7844  		if x2_1.Op != OpPPC64SRWconst || auxIntToInt64(x2_1.AuxInt) != 24 || w != x2_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && clobber(x0, x1, x2)) {
  7845  			break
  7846  		}
  7847  		v.reset(OpPPC64MOVWBRstore)
  7848  		v0 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  7849  		v0.AuxInt = int32ToAuxInt(i0)
  7850  		v0.Aux = symToAux(s)
  7851  		v0.AddArg(p)
  7852  		v.AddArg3(v0, w, mem)
  7853  		return true
  7854  	}
  7855  	// match: (MOVBstore [i1] {s} p w x0:(MOVBstore [i0] {s} p (SRWconst w [8]) mem))
  7856  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)
  7857  	// result: (MOVHBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  7858  	for {
  7859  		i1 := auxIntToInt32(v.AuxInt)
  7860  		s := auxToSym(v.Aux)
  7861  		p := v_0
  7862  		w := v_1
  7863  		x0 := v_2
  7864  		if x0.Op != OpPPC64MOVBstore {
  7865  			break
  7866  		}
  7867  		i0 := auxIntToInt32(x0.AuxInt)
  7868  		if auxToSym(x0.Aux) != s {
  7869  			break
  7870  		}
  7871  		mem := x0.Args[2]
  7872  		if p != x0.Args[0] {
  7873  			break
  7874  		}
  7875  		x0_1 := x0.Args[1]
  7876  		if x0_1.Op != OpPPC64SRWconst || auxIntToInt64(x0_1.AuxInt) != 8 || w != x0_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+1 && clobber(x0)) {
  7877  			break
  7878  		}
  7879  		v.reset(OpPPC64MOVHBRstore)
  7880  		v0 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  7881  		v0.AuxInt = int32ToAuxInt(i0)
  7882  		v0.Aux = symToAux(s)
  7883  		v0.AddArg(p)
  7884  		v.AddArg3(v0, w, mem)
  7885  		return true
  7886  	}
  7887  	// match: (MOVBstore [i7] {s} p (SRDconst w [56]) x0:(MOVBstore [i6] {s} p (SRDconst w [48]) x1:(MOVBstore [i5] {s} p (SRDconst w [40]) x2:(MOVBstore [i4] {s} p (SRDconst w [32]) x3:(MOVWstore [i0] {s} p w mem)))))
  7888  	// cond: !config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0, x1, x2, x3)
  7889  	// result: (MOVDstore [i0] {s} p w mem)
  7890  	for {
  7891  		i7 := auxIntToInt32(v.AuxInt)
  7892  		s := auxToSym(v.Aux)
  7893  		p := v_0
  7894  		if v_1.Op != OpPPC64SRDconst || auxIntToInt64(v_1.AuxInt) != 56 {
  7895  			break
  7896  		}
  7897  		w := v_1.Args[0]
  7898  		x0 := v_2
  7899  		if x0.Op != OpPPC64MOVBstore {
  7900  			break
  7901  		}
  7902  		i6 := auxIntToInt32(x0.AuxInt)
  7903  		if auxToSym(x0.Aux) != s {
  7904  			break
  7905  		}
  7906  		_ = x0.Args[2]
  7907  		if p != x0.Args[0] {
  7908  			break
  7909  		}
  7910  		x0_1 := x0.Args[1]
  7911  		if x0_1.Op != OpPPC64SRDconst || auxIntToInt64(x0_1.AuxInt) != 48 || w != x0_1.Args[0] {
  7912  			break
  7913  		}
  7914  		x1 := x0.Args[2]
  7915  		if x1.Op != OpPPC64MOVBstore {
  7916  			break
  7917  		}
  7918  		i5 := auxIntToInt32(x1.AuxInt)
  7919  		if auxToSym(x1.Aux) != s {
  7920  			break
  7921  		}
  7922  		_ = x1.Args[2]
  7923  		if p != x1.Args[0] {
  7924  			break
  7925  		}
  7926  		x1_1 := x1.Args[1]
  7927  		if x1_1.Op != OpPPC64SRDconst || auxIntToInt64(x1_1.AuxInt) != 40 || w != x1_1.Args[0] {
  7928  			break
  7929  		}
  7930  		x2 := x1.Args[2]
  7931  		if x2.Op != OpPPC64MOVBstore {
  7932  			break
  7933  		}
  7934  		i4 := auxIntToInt32(x2.AuxInt)
  7935  		if auxToSym(x2.Aux) != s {
  7936  			break
  7937  		}
  7938  		_ = x2.Args[2]
  7939  		if p != x2.Args[0] {
  7940  			break
  7941  		}
  7942  		x2_1 := x2.Args[1]
  7943  		if x2_1.Op != OpPPC64SRDconst || auxIntToInt64(x2_1.AuxInt) != 32 || w != x2_1.Args[0] {
  7944  			break
  7945  		}
  7946  		x3 := x2.Args[2]
  7947  		if x3.Op != OpPPC64MOVWstore {
  7948  			break
  7949  		}
  7950  		i0 := auxIntToInt32(x3.AuxInt)
  7951  		if auxToSym(x3.Aux) != s {
  7952  			break
  7953  		}
  7954  		mem := x3.Args[2]
  7955  		if p != x3.Args[0] || w != x3.Args[1] || !(!config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0, x1, x2, x3)) {
  7956  			break
  7957  		}
  7958  		v.reset(OpPPC64MOVDstore)
  7959  		v.AuxInt = int32ToAuxInt(i0)
  7960  		v.Aux = symToAux(s)
  7961  		v.AddArg3(p, w, mem)
  7962  		return true
  7963  	}
  7964  	// match: (MOVBstore [i7] {s} p w x0:(MOVBstore [i6] {s} p (SRDconst w [8]) x1:(MOVBstore [i5] {s} p (SRDconst w [16]) x2:(MOVBstore [i4] {s} p (SRDconst w [24]) x3:(MOVBstore [i3] {s} p (SRDconst w [32]) x4:(MOVBstore [i2] {s} p (SRDconst w [40]) x5:(MOVBstore [i1] {s} p (SRDconst w [48]) x6:(MOVBstore [i0] {s} p (SRDconst w [56]) mem))))))))
  7965  	// cond: !config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0, x1, x2, x3, x4, x5, x6)
  7966  	// result: (MOVDBRstore (MOVDaddr <typ.Uintptr> [i0] {s} p) w mem)
  7967  	for {
  7968  		i7 := auxIntToInt32(v.AuxInt)
  7969  		s := auxToSym(v.Aux)
  7970  		p := v_0
  7971  		w := v_1
  7972  		x0 := v_2
  7973  		if x0.Op != OpPPC64MOVBstore {
  7974  			break
  7975  		}
  7976  		i6 := auxIntToInt32(x0.AuxInt)
  7977  		if auxToSym(x0.Aux) != s {
  7978  			break
  7979  		}
  7980  		_ = x0.Args[2]
  7981  		if p != x0.Args[0] {
  7982  			break
  7983  		}
  7984  		x0_1 := x0.Args[1]
  7985  		if x0_1.Op != OpPPC64SRDconst || auxIntToInt64(x0_1.AuxInt) != 8 || w != x0_1.Args[0] {
  7986  			break
  7987  		}
  7988  		x1 := x0.Args[2]
  7989  		if x1.Op != OpPPC64MOVBstore {
  7990  			break
  7991  		}
  7992  		i5 := auxIntToInt32(x1.AuxInt)
  7993  		if auxToSym(x1.Aux) != s {
  7994  			break
  7995  		}
  7996  		_ = x1.Args[2]
  7997  		if p != x1.Args[0] {
  7998  			break
  7999  		}
  8000  		x1_1 := x1.Args[1]
  8001  		if x1_1.Op != OpPPC64SRDconst || auxIntToInt64(x1_1.AuxInt) != 16 || w != x1_1.Args[0] {
  8002  			break
  8003  		}
  8004  		x2 := x1.Args[2]
  8005  		if x2.Op != OpPPC64MOVBstore {
  8006  			break
  8007  		}
  8008  		i4 := auxIntToInt32(x2.AuxInt)
  8009  		if auxToSym(x2.Aux) != s {
  8010  			break
  8011  		}
  8012  		_ = x2.Args[2]
  8013  		if p != x2.Args[0] {
  8014  			break
  8015  		}
  8016  		x2_1 := x2.Args[1]
  8017  		if x2_1.Op != OpPPC64SRDconst || auxIntToInt64(x2_1.AuxInt) != 24 || w != x2_1.Args[0] {
  8018  			break
  8019  		}
  8020  		x3 := x2.Args[2]
  8021  		if x3.Op != OpPPC64MOVBstore {
  8022  			break
  8023  		}
  8024  		i3 := auxIntToInt32(x3.AuxInt)
  8025  		if auxToSym(x3.Aux) != s {
  8026  			break
  8027  		}
  8028  		_ = x3.Args[2]
  8029  		if p != x3.Args[0] {
  8030  			break
  8031  		}
  8032  		x3_1 := x3.Args[1]
  8033  		if x3_1.Op != OpPPC64SRDconst || auxIntToInt64(x3_1.AuxInt) != 32 || w != x3_1.Args[0] {
  8034  			break
  8035  		}
  8036  		x4 := x3.Args[2]
  8037  		if x4.Op != OpPPC64MOVBstore {
  8038  			break
  8039  		}
  8040  		i2 := auxIntToInt32(x4.AuxInt)
  8041  		if auxToSym(x4.Aux) != s {
  8042  			break
  8043  		}
  8044  		_ = x4.Args[2]
  8045  		if p != x4.Args[0] {
  8046  			break
  8047  		}
  8048  		x4_1 := x4.Args[1]
  8049  		if x4_1.Op != OpPPC64SRDconst || auxIntToInt64(x4_1.AuxInt) != 40 || w != x4_1.Args[0] {
  8050  			break
  8051  		}
  8052  		x5 := x4.Args[2]
  8053  		if x5.Op != OpPPC64MOVBstore {
  8054  			break
  8055  		}
  8056  		i1 := auxIntToInt32(x5.AuxInt)
  8057  		if auxToSym(x5.Aux) != s {
  8058  			break
  8059  		}
  8060  		_ = x5.Args[2]
  8061  		if p != x5.Args[0] {
  8062  			break
  8063  		}
  8064  		x5_1 := x5.Args[1]
  8065  		if x5_1.Op != OpPPC64SRDconst || auxIntToInt64(x5_1.AuxInt) != 48 || w != x5_1.Args[0] {
  8066  			break
  8067  		}
  8068  		x6 := x5.Args[2]
  8069  		if x6.Op != OpPPC64MOVBstore {
  8070  			break
  8071  		}
  8072  		i0 := auxIntToInt32(x6.AuxInt)
  8073  		if auxToSym(x6.Aux) != s {
  8074  			break
  8075  		}
  8076  		mem := x6.Args[2]
  8077  		if p != x6.Args[0] {
  8078  			break
  8079  		}
  8080  		x6_1 := x6.Args[1]
  8081  		if x6_1.Op != OpPPC64SRDconst || auxIntToInt64(x6_1.AuxInt) != 56 || w != x6_1.Args[0] || !(!config.BigEndian && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && clobber(x0, x1, x2, x3, x4, x5, x6)) {
  8082  			break
  8083  		}
  8084  		v.reset(OpPPC64MOVDBRstore)
  8085  		v0 := b.NewValue0(x6.Pos, OpPPC64MOVDaddr, typ.Uintptr)
  8086  		v0.AuxInt = int32ToAuxInt(i0)
  8087  		v0.Aux = symToAux(s)
  8088  		v0.AddArg(p)
  8089  		v.AddArg3(v0, w, mem)
  8090  		return true
  8091  	}
  8092  	return false
  8093  }
  8094  func rewriteValuePPC64_OpPPC64MOVBstoreidx(v *Value) bool {
  8095  	v_3 := v.Args[3]
  8096  	v_2 := v.Args[2]
  8097  	v_1 := v.Args[1]
  8098  	v_0 := v.Args[0]
  8099  	b := v.Block
  8100  	typ := &b.Func.Config.Types
  8101  	// match: (MOVBstoreidx ptr (MOVDconst [c]) val mem)
  8102  	// cond: is16Bit(c)
  8103  	// result: (MOVBstore [int32(c)] ptr val mem)
  8104  	for {
  8105  		ptr := v_0
  8106  		if v_1.Op != OpPPC64MOVDconst {
  8107  			break
  8108  		}
  8109  		c := auxIntToInt64(v_1.AuxInt)
  8110  		val := v_2
  8111  		mem := v_3
  8112  		if !(is16Bit(c)) {
  8113  			break
  8114  		}
  8115  		v.reset(OpPPC64MOVBstore)
  8116  		v.AuxInt = int32ToAuxInt(int32(c))
  8117  		v.AddArg3(ptr, val, mem)
  8118  		return true
  8119  	}
  8120  	// match: (MOVBstoreidx (MOVDconst [c]) ptr val mem)
  8121  	// cond: is16Bit(c)
  8122  	// result: (MOVBstore [int32(c)] ptr val mem)
  8123  	for {
  8124  		if v_0.Op != OpPPC64MOVDconst {
  8125  			break
  8126  		}
  8127  		c := auxIntToInt64(v_0.AuxInt)
  8128  		ptr := v_1
  8129  		val := v_2
  8130  		mem := v_3
  8131  		if !(is16Bit(c)) {
  8132  			break
  8133  		}
  8134  		v.reset(OpPPC64MOVBstore)
  8135  		v.AuxInt = int32ToAuxInt(int32(c))
  8136  		v.AddArg3(ptr, val, mem)
  8137  		return true
  8138  	}
  8139  	// match: (MOVBstoreidx ptr idx (MOVBreg x) mem)
  8140  	// result: (MOVBstoreidx ptr idx x mem)
  8141  	for {
  8142  		ptr := v_0
  8143  		idx := v_1
  8144  		if v_2.Op != OpPPC64MOVBreg {
  8145  			break
  8146  		}
  8147  		x := v_2.Args[0]
  8148  		mem := v_3
  8149  		v.reset(OpPPC64MOVBstoreidx)
  8150  		v.AddArg4(ptr, idx, x, mem)
  8151  		return true
  8152  	}
  8153  	// match: (MOVBstoreidx ptr idx (MOVBZreg x) mem)
  8154  	// result: (MOVBstoreidx ptr idx x mem)
  8155  	for {
  8156  		ptr := v_0
  8157  		idx := v_1
  8158  		if v_2.Op != OpPPC64MOVBZreg {
  8159  			break
  8160  		}
  8161  		x := v_2.Args[0]
  8162  		mem := v_3
  8163  		v.reset(OpPPC64MOVBstoreidx)
  8164  		v.AddArg4(ptr, idx, x, mem)
  8165  		return true
  8166  	}
  8167  	// match: (MOVBstoreidx ptr idx (MOVHreg x) mem)
  8168  	// result: (MOVBstoreidx ptr idx x mem)
  8169  	for {
  8170  		ptr := v_0
  8171  		idx := v_1
  8172  		if v_2.Op != OpPPC64MOVHreg {
  8173  			break
  8174  		}
  8175  		x := v_2.Args[0]
  8176  		mem := v_3
  8177  		v.reset(OpPPC64MOVBstoreidx)
  8178  		v.AddArg4(ptr, idx, x, mem)
  8179  		return true
  8180  	}
  8181  	// match: (MOVBstoreidx ptr idx (MOVHZreg x) mem)
  8182  	// result: (MOVBstoreidx ptr idx x mem)
  8183  	for {
  8184  		ptr := v_0
  8185  		idx := v_1
  8186  		if v_2.Op != OpPPC64MOVHZreg {
  8187  			break
  8188  		}
  8189  		x := v_2.Args[0]
  8190  		mem := v_3
  8191  		v.reset(OpPPC64MOVBstoreidx)
  8192  		v.AddArg4(ptr, idx, x, mem)
  8193  		return true
  8194  	}
  8195  	// match: (MOVBstoreidx ptr idx (MOVWreg x) mem)
  8196  	// result: (MOVBstoreidx ptr idx x mem)
  8197  	for {
  8198  		ptr := v_0
  8199  		idx := v_1
  8200  		if v_2.Op != OpPPC64MOVWreg {
  8201  			break
  8202  		}
  8203  		x := v_2.Args[0]
  8204  		mem := v_3
  8205  		v.reset(OpPPC64MOVBstoreidx)
  8206  		v.AddArg4(ptr, idx, x, mem)
  8207  		return true
  8208  	}
  8209  	// match: (MOVBstoreidx ptr idx (MOVWZreg x) mem)
  8210  	// result: (MOVBstoreidx ptr idx x mem)
  8211  	for {
  8212  		ptr := v_0
  8213  		idx := v_1
  8214  		if v_2.Op != OpPPC64MOVWZreg {
  8215  			break
  8216  		}
  8217  		x := v_2.Args[0]
  8218  		mem := v_3
  8219  		v.reset(OpPPC64MOVBstoreidx)
  8220  		v.AddArg4(ptr, idx, x, mem)
  8221  		return true
  8222  	}
  8223  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVHreg x) [c]) mem)
  8224  	// cond: c <= 8
  8225  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8226  	for {
  8227  		ptr := v_0
  8228  		idx := v_1
  8229  		if v_2.Op != OpPPC64SRWconst {
  8230  			break
  8231  		}
  8232  		c := auxIntToInt64(v_2.AuxInt)
  8233  		v_2_0 := v_2.Args[0]
  8234  		if v_2_0.Op != OpPPC64MOVHreg {
  8235  			break
  8236  		}
  8237  		x := v_2_0.Args[0]
  8238  		mem := v_3
  8239  		if !(c <= 8) {
  8240  			break
  8241  		}
  8242  		v.reset(OpPPC64MOVBstoreidx)
  8243  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8244  		v0.AuxInt = int64ToAuxInt(c)
  8245  		v0.AddArg(x)
  8246  		v.AddArg4(ptr, idx, v0, mem)
  8247  		return true
  8248  	}
  8249  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVHZreg x) [c]) mem)
  8250  	// cond: c <= 8
  8251  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8252  	for {
  8253  		ptr := v_0
  8254  		idx := v_1
  8255  		if v_2.Op != OpPPC64SRWconst {
  8256  			break
  8257  		}
  8258  		c := auxIntToInt64(v_2.AuxInt)
  8259  		v_2_0 := v_2.Args[0]
  8260  		if v_2_0.Op != OpPPC64MOVHZreg {
  8261  			break
  8262  		}
  8263  		x := v_2_0.Args[0]
  8264  		mem := v_3
  8265  		if !(c <= 8) {
  8266  			break
  8267  		}
  8268  		v.reset(OpPPC64MOVBstoreidx)
  8269  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8270  		v0.AuxInt = int64ToAuxInt(c)
  8271  		v0.AddArg(x)
  8272  		v.AddArg4(ptr, idx, v0, mem)
  8273  		return true
  8274  	}
  8275  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVWreg x) [c]) mem)
  8276  	// cond: c <= 24
  8277  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8278  	for {
  8279  		ptr := v_0
  8280  		idx := v_1
  8281  		if v_2.Op != OpPPC64SRWconst {
  8282  			break
  8283  		}
  8284  		c := auxIntToInt64(v_2.AuxInt)
  8285  		v_2_0 := v_2.Args[0]
  8286  		if v_2_0.Op != OpPPC64MOVWreg {
  8287  			break
  8288  		}
  8289  		x := v_2_0.Args[0]
  8290  		mem := v_3
  8291  		if !(c <= 24) {
  8292  			break
  8293  		}
  8294  		v.reset(OpPPC64MOVBstoreidx)
  8295  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8296  		v0.AuxInt = int64ToAuxInt(c)
  8297  		v0.AddArg(x)
  8298  		v.AddArg4(ptr, idx, v0, mem)
  8299  		return true
  8300  	}
  8301  	// match: (MOVBstoreidx ptr idx (SRWconst (MOVWZreg x) [c]) mem)
  8302  	// cond: c <= 24
  8303  	// result: (MOVBstoreidx ptr idx (SRWconst <typ.UInt32> x [c]) mem)
  8304  	for {
  8305  		ptr := v_0
  8306  		idx := v_1
  8307  		if v_2.Op != OpPPC64SRWconst {
  8308  			break
  8309  		}
  8310  		c := auxIntToInt64(v_2.AuxInt)
  8311  		v_2_0 := v_2.Args[0]
  8312  		if v_2_0.Op != OpPPC64MOVWZreg {
  8313  			break
  8314  		}
  8315  		x := v_2_0.Args[0]
  8316  		mem := v_3
  8317  		if !(c <= 24) {
  8318  			break
  8319  		}
  8320  		v.reset(OpPPC64MOVBstoreidx)
  8321  		v0 := b.NewValue0(v.Pos, OpPPC64SRWconst, typ.UInt32)
  8322  		v0.AuxInt = int64ToAuxInt(c)
  8323  		v0.AddArg(x)
  8324  		v.AddArg4(ptr, idx, v0, mem)
  8325  		return true
  8326  	}
  8327  	return false
  8328  }
  8329  func rewriteValuePPC64_OpPPC64MOVBstorezero(v *Value) bool {
  8330  	v_1 := v.Args[1]
  8331  	v_0 := v.Args[0]
  8332  	// match: (MOVBstorezero [off1] {sym} (ADDconst [off2] x) mem)
  8333  	// cond: is16Bit(int64(off1)+off2)
  8334  	// result: (MOVBstorezero [off1+int32(off2)] {sym} x mem)
  8335  	for {
  8336  		off1 := auxIntToInt32(v.AuxInt)
  8337  		sym := auxToSym(v.Aux)
  8338  		if v_0.Op != OpPPC64ADDconst {
  8339  			break
  8340  		}
  8341  		off2 := auxIntToInt64(v_0.AuxInt)
  8342  		x := v_0.Args[0]
  8343  		mem := v_1
  8344  		if !(is16Bit(int64(off1) + off2)) {
  8345  			break
  8346  		}
  8347  		v.reset(OpPPC64MOVBstorezero)
  8348  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8349  		v.Aux = symToAux(sym)
  8350  		v.AddArg2(x, mem)
  8351  		return true
  8352  	}
  8353  	// match: (MOVBstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  8354  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
  8355  	// result: (MOVBstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
  8356  	for {
  8357  		off1 := auxIntToInt32(v.AuxInt)
  8358  		sym1 := auxToSym(v.Aux)
  8359  		p := v_0
  8360  		if p.Op != OpPPC64MOVDaddr {
  8361  			break
  8362  		}
  8363  		off2 := auxIntToInt32(p.AuxInt)
  8364  		sym2 := auxToSym(p.Aux)
  8365  		x := p.Args[0]
  8366  		mem := v_1
  8367  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
  8368  			break
  8369  		}
  8370  		v.reset(OpPPC64MOVBstorezero)
  8371  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8372  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8373  		v.AddArg2(x, mem)
  8374  		return true
  8375  	}
  8376  	return false
  8377  }
  8378  func rewriteValuePPC64_OpPPC64MOVDload(v *Value) bool {
  8379  	v_1 := v.Args[1]
  8380  	v_0 := v.Args[0]
  8381  	// match: (MOVDload [off] {sym} ptr (FMOVDstore [off] {sym} ptr x _))
  8382  	// result: (MFVSRD x)
  8383  	for {
  8384  		off := auxIntToInt32(v.AuxInt)
  8385  		sym := auxToSym(v.Aux)
  8386  		ptr := v_0
  8387  		if v_1.Op != OpPPC64FMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8388  			break
  8389  		}
  8390  		x := v_1.Args[1]
  8391  		if ptr != v_1.Args[0] {
  8392  			break
  8393  		}
  8394  		v.reset(OpPPC64MFVSRD)
  8395  		v.AddArg(x)
  8396  		return true
  8397  	}
  8398  	// match: (MOVDload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  8399  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  8400  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8401  	for {
  8402  		off1 := auxIntToInt32(v.AuxInt)
  8403  		sym1 := auxToSym(v.Aux)
  8404  		p := v_0
  8405  		if p.Op != OpPPC64MOVDaddr {
  8406  			break
  8407  		}
  8408  		off2 := auxIntToInt32(p.AuxInt)
  8409  		sym2 := auxToSym(p.Aux)
  8410  		ptr := p.Args[0]
  8411  		mem := v_1
  8412  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  8413  			break
  8414  		}
  8415  		v.reset(OpPPC64MOVDload)
  8416  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8417  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8418  		v.AddArg2(ptr, mem)
  8419  		return true
  8420  	}
  8421  	// match: (MOVDload [off1] {sym} (ADDconst [off2] x) mem)
  8422  	// cond: is16Bit(int64(off1)+off2)
  8423  	// result: (MOVDload [off1+int32(off2)] {sym} x mem)
  8424  	for {
  8425  		off1 := auxIntToInt32(v.AuxInt)
  8426  		sym := auxToSym(v.Aux)
  8427  		if v_0.Op != OpPPC64ADDconst {
  8428  			break
  8429  		}
  8430  		off2 := auxIntToInt64(v_0.AuxInt)
  8431  		x := v_0.Args[0]
  8432  		mem := v_1
  8433  		if !(is16Bit(int64(off1) + off2)) {
  8434  			break
  8435  		}
  8436  		v.reset(OpPPC64MOVDload)
  8437  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8438  		v.Aux = symToAux(sym)
  8439  		v.AddArg2(x, mem)
  8440  		return true
  8441  	}
  8442  	// match: (MOVDload [0] {sym} p:(ADD ptr idx) mem)
  8443  	// cond: sym == nil && p.Uses == 1
  8444  	// result: (MOVDloadidx ptr idx mem)
  8445  	for {
  8446  		if auxIntToInt32(v.AuxInt) != 0 {
  8447  			break
  8448  		}
  8449  		sym := auxToSym(v.Aux)
  8450  		p := v_0
  8451  		if p.Op != OpPPC64ADD {
  8452  			break
  8453  		}
  8454  		idx := p.Args[1]
  8455  		ptr := p.Args[0]
  8456  		mem := v_1
  8457  		if !(sym == nil && p.Uses == 1) {
  8458  			break
  8459  		}
  8460  		v.reset(OpPPC64MOVDloadidx)
  8461  		v.AddArg3(ptr, idx, mem)
  8462  		return true
  8463  	}
  8464  	return false
  8465  }
  8466  func rewriteValuePPC64_OpPPC64MOVDloadidx(v *Value) bool {
  8467  	v_2 := v.Args[2]
  8468  	v_1 := v.Args[1]
  8469  	v_0 := v.Args[0]
  8470  	// match: (MOVDloadidx ptr (MOVDconst [c]) mem)
  8471  	// cond: is16Bit(c) && c%4 == 0
  8472  	// result: (MOVDload [int32(c)] ptr mem)
  8473  	for {
  8474  		ptr := v_0
  8475  		if v_1.Op != OpPPC64MOVDconst {
  8476  			break
  8477  		}
  8478  		c := auxIntToInt64(v_1.AuxInt)
  8479  		mem := v_2
  8480  		if !(is16Bit(c) && c%4 == 0) {
  8481  			break
  8482  		}
  8483  		v.reset(OpPPC64MOVDload)
  8484  		v.AuxInt = int32ToAuxInt(int32(c))
  8485  		v.AddArg2(ptr, mem)
  8486  		return true
  8487  	}
  8488  	// match: (MOVDloadidx (MOVDconst [c]) ptr mem)
  8489  	// cond: is16Bit(c) && c%4 == 0
  8490  	// result: (MOVDload [int32(c)] ptr mem)
  8491  	for {
  8492  		if v_0.Op != OpPPC64MOVDconst {
  8493  			break
  8494  		}
  8495  		c := auxIntToInt64(v_0.AuxInt)
  8496  		ptr := v_1
  8497  		mem := v_2
  8498  		if !(is16Bit(c) && c%4 == 0) {
  8499  			break
  8500  		}
  8501  		v.reset(OpPPC64MOVDload)
  8502  		v.AuxInt = int32ToAuxInt(int32(c))
  8503  		v.AddArg2(ptr, mem)
  8504  		return true
  8505  	}
  8506  	return false
  8507  }
  8508  func rewriteValuePPC64_OpPPC64MOVDstore(v *Value) bool {
  8509  	v_2 := v.Args[2]
  8510  	v_1 := v.Args[1]
  8511  	v_0 := v.Args[0]
  8512  	// match: (MOVDstore [off] {sym} ptr (MFVSRD x) mem)
  8513  	// result: (FMOVDstore [off] {sym} ptr x mem)
  8514  	for {
  8515  		off := auxIntToInt32(v.AuxInt)
  8516  		sym := auxToSym(v.Aux)
  8517  		ptr := v_0
  8518  		if v_1.Op != OpPPC64MFVSRD {
  8519  			break
  8520  		}
  8521  		x := v_1.Args[0]
  8522  		mem := v_2
  8523  		v.reset(OpPPC64FMOVDstore)
  8524  		v.AuxInt = int32ToAuxInt(off)
  8525  		v.Aux = symToAux(sym)
  8526  		v.AddArg3(ptr, x, mem)
  8527  		return true
  8528  	}
  8529  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] x) val mem)
  8530  	// cond: is16Bit(int64(off1)+off2)
  8531  	// result: (MOVDstore [off1+int32(off2)] {sym} x val mem)
  8532  	for {
  8533  		off1 := auxIntToInt32(v.AuxInt)
  8534  		sym := auxToSym(v.Aux)
  8535  		if v_0.Op != OpPPC64ADDconst {
  8536  			break
  8537  		}
  8538  		off2 := auxIntToInt64(v_0.AuxInt)
  8539  		x := v_0.Args[0]
  8540  		val := v_1
  8541  		mem := v_2
  8542  		if !(is16Bit(int64(off1) + off2)) {
  8543  			break
  8544  		}
  8545  		v.reset(OpPPC64MOVDstore)
  8546  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8547  		v.Aux = symToAux(sym)
  8548  		v.AddArg3(x, val, mem)
  8549  		return true
  8550  	}
  8551  	// match: (MOVDstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  8552  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  8553  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  8554  	for {
  8555  		off1 := auxIntToInt32(v.AuxInt)
  8556  		sym1 := auxToSym(v.Aux)
  8557  		p := v_0
  8558  		if p.Op != OpPPC64MOVDaddr {
  8559  			break
  8560  		}
  8561  		off2 := auxIntToInt32(p.AuxInt)
  8562  		sym2 := auxToSym(p.Aux)
  8563  		ptr := p.Args[0]
  8564  		val := v_1
  8565  		mem := v_2
  8566  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  8567  			break
  8568  		}
  8569  		v.reset(OpPPC64MOVDstore)
  8570  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8571  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8572  		v.AddArg3(ptr, val, mem)
  8573  		return true
  8574  	}
  8575  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [0]) mem)
  8576  	// result: (MOVDstorezero [off] {sym} ptr mem)
  8577  	for {
  8578  		off := auxIntToInt32(v.AuxInt)
  8579  		sym := auxToSym(v.Aux)
  8580  		ptr := v_0
  8581  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  8582  			break
  8583  		}
  8584  		mem := v_2
  8585  		v.reset(OpPPC64MOVDstorezero)
  8586  		v.AuxInt = int32ToAuxInt(off)
  8587  		v.Aux = symToAux(sym)
  8588  		v.AddArg2(ptr, mem)
  8589  		return true
  8590  	}
  8591  	// match: (MOVDstore [0] {sym} p:(ADD ptr idx) val mem)
  8592  	// cond: sym == nil && p.Uses == 1
  8593  	// result: (MOVDstoreidx ptr idx val mem)
  8594  	for {
  8595  		if auxIntToInt32(v.AuxInt) != 0 {
  8596  			break
  8597  		}
  8598  		sym := auxToSym(v.Aux)
  8599  		p := v_0
  8600  		if p.Op != OpPPC64ADD {
  8601  			break
  8602  		}
  8603  		idx := p.Args[1]
  8604  		ptr := p.Args[0]
  8605  		val := v_1
  8606  		mem := v_2
  8607  		if !(sym == nil && p.Uses == 1) {
  8608  			break
  8609  		}
  8610  		v.reset(OpPPC64MOVDstoreidx)
  8611  		v.AddArg4(ptr, idx, val, mem)
  8612  		return true
  8613  	}
  8614  	return false
  8615  }
  8616  func rewriteValuePPC64_OpPPC64MOVDstoreidx(v *Value) bool {
  8617  	v_3 := v.Args[3]
  8618  	v_2 := v.Args[2]
  8619  	v_1 := v.Args[1]
  8620  	v_0 := v.Args[0]
  8621  	// match: (MOVDstoreidx ptr (MOVDconst [c]) val mem)
  8622  	// cond: is16Bit(c) && c%4 == 0
  8623  	// result: (MOVDstore [int32(c)] ptr val mem)
  8624  	for {
  8625  		ptr := v_0
  8626  		if v_1.Op != OpPPC64MOVDconst {
  8627  			break
  8628  		}
  8629  		c := auxIntToInt64(v_1.AuxInt)
  8630  		val := v_2
  8631  		mem := v_3
  8632  		if !(is16Bit(c) && c%4 == 0) {
  8633  			break
  8634  		}
  8635  		v.reset(OpPPC64MOVDstore)
  8636  		v.AuxInt = int32ToAuxInt(int32(c))
  8637  		v.AddArg3(ptr, val, mem)
  8638  		return true
  8639  	}
  8640  	// match: (MOVDstoreidx (MOVDconst [c]) ptr val mem)
  8641  	// cond: is16Bit(c) && c%4 == 0
  8642  	// result: (MOVDstore [int32(c)] ptr val mem)
  8643  	for {
  8644  		if v_0.Op != OpPPC64MOVDconst {
  8645  			break
  8646  		}
  8647  		c := auxIntToInt64(v_0.AuxInt)
  8648  		ptr := v_1
  8649  		val := v_2
  8650  		mem := v_3
  8651  		if !(is16Bit(c) && c%4 == 0) {
  8652  			break
  8653  		}
  8654  		v.reset(OpPPC64MOVDstore)
  8655  		v.AuxInt = int32ToAuxInt(int32(c))
  8656  		v.AddArg3(ptr, val, mem)
  8657  		return true
  8658  	}
  8659  	return false
  8660  }
  8661  func rewriteValuePPC64_OpPPC64MOVDstorezero(v *Value) bool {
  8662  	v_1 := v.Args[1]
  8663  	v_0 := v.Args[0]
  8664  	// match: (MOVDstorezero [off1] {sym} (ADDconst [off2] x) mem)
  8665  	// cond: is16Bit(int64(off1)+off2)
  8666  	// result: (MOVDstorezero [off1+int32(off2)] {sym} x mem)
  8667  	for {
  8668  		off1 := auxIntToInt32(v.AuxInt)
  8669  		sym := auxToSym(v.Aux)
  8670  		if v_0.Op != OpPPC64ADDconst {
  8671  			break
  8672  		}
  8673  		off2 := auxIntToInt64(v_0.AuxInt)
  8674  		x := v_0.Args[0]
  8675  		mem := v_1
  8676  		if !(is16Bit(int64(off1) + off2)) {
  8677  			break
  8678  		}
  8679  		v.reset(OpPPC64MOVDstorezero)
  8680  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8681  		v.Aux = symToAux(sym)
  8682  		v.AddArg2(x, mem)
  8683  		return true
  8684  	}
  8685  	// match: (MOVDstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
  8686  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
  8687  	// result: (MOVDstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
  8688  	for {
  8689  		off1 := auxIntToInt32(v.AuxInt)
  8690  		sym1 := auxToSym(v.Aux)
  8691  		p := v_0
  8692  		if p.Op != OpPPC64MOVDaddr {
  8693  			break
  8694  		}
  8695  		off2 := auxIntToInt32(p.AuxInt)
  8696  		sym2 := auxToSym(p.Aux)
  8697  		x := p.Args[0]
  8698  		mem := v_1
  8699  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
  8700  			break
  8701  		}
  8702  		v.reset(OpPPC64MOVDstorezero)
  8703  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8704  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8705  		v.AddArg2(x, mem)
  8706  		return true
  8707  	}
  8708  	return false
  8709  }
  8710  func rewriteValuePPC64_OpPPC64MOVHBRstore(v *Value) bool {
  8711  	v_2 := v.Args[2]
  8712  	v_1 := v.Args[1]
  8713  	v_0 := v.Args[0]
  8714  	// match: (MOVHBRstore {sym} ptr (MOVHreg x) mem)
  8715  	// result: (MOVHBRstore {sym} ptr x mem)
  8716  	for {
  8717  		sym := auxToSym(v.Aux)
  8718  		ptr := v_0
  8719  		if v_1.Op != OpPPC64MOVHreg {
  8720  			break
  8721  		}
  8722  		x := v_1.Args[0]
  8723  		mem := v_2
  8724  		v.reset(OpPPC64MOVHBRstore)
  8725  		v.Aux = symToAux(sym)
  8726  		v.AddArg3(ptr, x, mem)
  8727  		return true
  8728  	}
  8729  	// match: (MOVHBRstore {sym} ptr (MOVHZreg x) mem)
  8730  	// result: (MOVHBRstore {sym} ptr x mem)
  8731  	for {
  8732  		sym := auxToSym(v.Aux)
  8733  		ptr := v_0
  8734  		if v_1.Op != OpPPC64MOVHZreg {
  8735  			break
  8736  		}
  8737  		x := v_1.Args[0]
  8738  		mem := v_2
  8739  		v.reset(OpPPC64MOVHBRstore)
  8740  		v.Aux = symToAux(sym)
  8741  		v.AddArg3(ptr, x, mem)
  8742  		return true
  8743  	}
  8744  	// match: (MOVHBRstore {sym} ptr (MOVWreg x) mem)
  8745  	// result: (MOVHBRstore {sym} ptr x mem)
  8746  	for {
  8747  		sym := auxToSym(v.Aux)
  8748  		ptr := v_0
  8749  		if v_1.Op != OpPPC64MOVWreg {
  8750  			break
  8751  		}
  8752  		x := v_1.Args[0]
  8753  		mem := v_2
  8754  		v.reset(OpPPC64MOVHBRstore)
  8755  		v.Aux = symToAux(sym)
  8756  		v.AddArg3(ptr, x, mem)
  8757  		return true
  8758  	}
  8759  	// match: (MOVHBRstore {sym} ptr (MOVWZreg x) mem)
  8760  	// result: (MOVHBRstore {sym} ptr x mem)
  8761  	for {
  8762  		sym := auxToSym(v.Aux)
  8763  		ptr := v_0
  8764  		if v_1.Op != OpPPC64MOVWZreg {
  8765  			break
  8766  		}
  8767  		x := v_1.Args[0]
  8768  		mem := v_2
  8769  		v.reset(OpPPC64MOVHBRstore)
  8770  		v.Aux = symToAux(sym)
  8771  		v.AddArg3(ptr, x, mem)
  8772  		return true
  8773  	}
  8774  	return false
  8775  }
  8776  func rewriteValuePPC64_OpPPC64MOVHZload(v *Value) bool {
  8777  	v_1 := v.Args[1]
  8778  	v_0 := v.Args[0]
  8779  	// match: (MOVHZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  8780  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  8781  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  8782  	for {
  8783  		off1 := auxIntToInt32(v.AuxInt)
  8784  		sym1 := auxToSym(v.Aux)
  8785  		p := v_0
  8786  		if p.Op != OpPPC64MOVDaddr {
  8787  			break
  8788  		}
  8789  		off2 := auxIntToInt32(p.AuxInt)
  8790  		sym2 := auxToSym(p.Aux)
  8791  		ptr := p.Args[0]
  8792  		mem := v_1
  8793  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  8794  			break
  8795  		}
  8796  		v.reset(OpPPC64MOVHZload)
  8797  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8798  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8799  		v.AddArg2(ptr, mem)
  8800  		return true
  8801  	}
  8802  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] x) mem)
  8803  	// cond: is16Bit(int64(off1)+off2)
  8804  	// result: (MOVHZload [off1+int32(off2)] {sym} x mem)
  8805  	for {
  8806  		off1 := auxIntToInt32(v.AuxInt)
  8807  		sym := auxToSym(v.Aux)
  8808  		if v_0.Op != OpPPC64ADDconst {
  8809  			break
  8810  		}
  8811  		off2 := auxIntToInt64(v_0.AuxInt)
  8812  		x := v_0.Args[0]
  8813  		mem := v_1
  8814  		if !(is16Bit(int64(off1) + off2)) {
  8815  			break
  8816  		}
  8817  		v.reset(OpPPC64MOVHZload)
  8818  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  8819  		v.Aux = symToAux(sym)
  8820  		v.AddArg2(x, mem)
  8821  		return true
  8822  	}
  8823  	// match: (MOVHZload [0] {sym} p:(ADD ptr idx) mem)
  8824  	// cond: sym == nil && p.Uses == 1
  8825  	// result: (MOVHZloadidx ptr idx mem)
  8826  	for {
  8827  		if auxIntToInt32(v.AuxInt) != 0 {
  8828  			break
  8829  		}
  8830  		sym := auxToSym(v.Aux)
  8831  		p := v_0
  8832  		if p.Op != OpPPC64ADD {
  8833  			break
  8834  		}
  8835  		idx := p.Args[1]
  8836  		ptr := p.Args[0]
  8837  		mem := v_1
  8838  		if !(sym == nil && p.Uses == 1) {
  8839  			break
  8840  		}
  8841  		v.reset(OpPPC64MOVHZloadidx)
  8842  		v.AddArg3(ptr, idx, mem)
  8843  		return true
  8844  	}
  8845  	return false
  8846  }
  8847  func rewriteValuePPC64_OpPPC64MOVHZloadidx(v *Value) bool {
  8848  	v_2 := v.Args[2]
  8849  	v_1 := v.Args[1]
  8850  	v_0 := v.Args[0]
  8851  	// match: (MOVHZloadidx ptr (MOVDconst [c]) mem)
  8852  	// cond: is16Bit(c)
  8853  	// result: (MOVHZload [int32(c)] ptr mem)
  8854  	for {
  8855  		ptr := v_0
  8856  		if v_1.Op != OpPPC64MOVDconst {
  8857  			break
  8858  		}
  8859  		c := auxIntToInt64(v_1.AuxInt)
  8860  		mem := v_2
  8861  		if !(is16Bit(c)) {
  8862  			break
  8863  		}
  8864  		v.reset(OpPPC64MOVHZload)
  8865  		v.AuxInt = int32ToAuxInt(int32(c))
  8866  		v.AddArg2(ptr, mem)
  8867  		return true
  8868  	}
  8869  	// match: (MOVHZloadidx (MOVDconst [c]) ptr mem)
  8870  	// cond: is16Bit(c)
  8871  	// result: (MOVHZload [int32(c)] ptr mem)
  8872  	for {
  8873  		if v_0.Op != OpPPC64MOVDconst {
  8874  			break
  8875  		}
  8876  		c := auxIntToInt64(v_0.AuxInt)
  8877  		ptr := v_1
  8878  		mem := v_2
  8879  		if !(is16Bit(c)) {
  8880  			break
  8881  		}
  8882  		v.reset(OpPPC64MOVHZload)
  8883  		v.AuxInt = int32ToAuxInt(int32(c))
  8884  		v.AddArg2(ptr, mem)
  8885  		return true
  8886  	}
  8887  	return false
  8888  }
  8889  func rewriteValuePPC64_OpPPC64MOVHZreg(v *Value) bool {
  8890  	v_0 := v.Args[0]
  8891  	b := v.Block
  8892  	typ := &b.Func.Config.Types
  8893  	// match: (MOVHZreg y:(ANDconst [c] _))
  8894  	// cond: uint64(c) <= 0xFFFF
  8895  	// result: y
  8896  	for {
  8897  		y := v_0
  8898  		if y.Op != OpPPC64ANDconst {
  8899  			break
  8900  		}
  8901  		c := auxIntToInt64(y.AuxInt)
  8902  		if !(uint64(c) <= 0xFFFF) {
  8903  			break
  8904  		}
  8905  		v.copyOf(y)
  8906  		return true
  8907  	}
  8908  	// match: (MOVHZreg (SRWconst [c] (MOVBZreg x)))
  8909  	// result: (SRWconst [c] (MOVBZreg x))
  8910  	for {
  8911  		if v_0.Op != OpPPC64SRWconst {
  8912  			break
  8913  		}
  8914  		c := auxIntToInt64(v_0.AuxInt)
  8915  		v_0_0 := v_0.Args[0]
  8916  		if v_0_0.Op != OpPPC64MOVBZreg {
  8917  			break
  8918  		}
  8919  		x := v_0_0.Args[0]
  8920  		v.reset(OpPPC64SRWconst)
  8921  		v.AuxInt = int64ToAuxInt(c)
  8922  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
  8923  		v0.AddArg(x)
  8924  		v.AddArg(v0)
  8925  		return true
  8926  	}
  8927  	// match: (MOVHZreg (SRWconst [c] (MOVHZreg x)))
  8928  	// result: (SRWconst [c] (MOVHZreg x))
  8929  	for {
  8930  		if v_0.Op != OpPPC64SRWconst {
  8931  			break
  8932  		}
  8933  		c := auxIntToInt64(v_0.AuxInt)
  8934  		v_0_0 := v_0.Args[0]
  8935  		if v_0_0.Op != OpPPC64MOVHZreg {
  8936  			break
  8937  		}
  8938  		x := v_0_0.Args[0]
  8939  		v.reset(OpPPC64SRWconst)
  8940  		v.AuxInt = int64ToAuxInt(c)
  8941  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
  8942  		v0.AddArg(x)
  8943  		v.AddArg(v0)
  8944  		return true
  8945  	}
  8946  	// match: (MOVHZreg (SRWconst [c] x))
  8947  	// cond: sizeof(x.Type) <= 16
  8948  	// result: (SRWconst [c] x)
  8949  	for {
  8950  		if v_0.Op != OpPPC64SRWconst {
  8951  			break
  8952  		}
  8953  		c := auxIntToInt64(v_0.AuxInt)
  8954  		x := v_0.Args[0]
  8955  		if !(sizeof(x.Type) <= 16) {
  8956  			break
  8957  		}
  8958  		v.reset(OpPPC64SRWconst)
  8959  		v.AuxInt = int64ToAuxInt(c)
  8960  		v.AddArg(x)
  8961  		return true
  8962  	}
  8963  	// match: (MOVHZreg (SRDconst [c] x))
  8964  	// cond: c>=48
  8965  	// result: (SRDconst [c] x)
  8966  	for {
  8967  		if v_0.Op != OpPPC64SRDconst {
  8968  			break
  8969  		}
  8970  		c := auxIntToInt64(v_0.AuxInt)
  8971  		x := v_0.Args[0]
  8972  		if !(c >= 48) {
  8973  			break
  8974  		}
  8975  		v.reset(OpPPC64SRDconst)
  8976  		v.AuxInt = int64ToAuxInt(c)
  8977  		v.AddArg(x)
  8978  		return true
  8979  	}
  8980  	// match: (MOVHZreg (SRWconst [c] x))
  8981  	// cond: c>=16
  8982  	// result: (SRWconst [c] x)
  8983  	for {
  8984  		if v_0.Op != OpPPC64SRWconst {
  8985  			break
  8986  		}
  8987  		c := auxIntToInt64(v_0.AuxInt)
  8988  		x := v_0.Args[0]
  8989  		if !(c >= 16) {
  8990  			break
  8991  		}
  8992  		v.reset(OpPPC64SRWconst)
  8993  		v.AuxInt = int64ToAuxInt(c)
  8994  		v.AddArg(x)
  8995  		return true
  8996  	}
  8997  	// match: (MOVHZreg y:(MOVHZreg _))
  8998  	// result: y
  8999  	for {
  9000  		y := v_0
  9001  		if y.Op != OpPPC64MOVHZreg {
  9002  			break
  9003  		}
  9004  		v.copyOf(y)
  9005  		return true
  9006  	}
  9007  	// match: (MOVHZreg y:(MOVBZreg _))
  9008  	// result: y
  9009  	for {
  9010  		y := v_0
  9011  		if y.Op != OpPPC64MOVBZreg {
  9012  			break
  9013  		}
  9014  		v.copyOf(y)
  9015  		return true
  9016  	}
  9017  	// match: (MOVHZreg y:(MOVHBRload _ _))
  9018  	// result: y
  9019  	for {
  9020  		y := v_0
  9021  		if y.Op != OpPPC64MOVHBRload {
  9022  			break
  9023  		}
  9024  		v.copyOf(y)
  9025  		return true
  9026  	}
  9027  	// match: (MOVHZreg y:(MOVHreg x))
  9028  	// result: (MOVHZreg x)
  9029  	for {
  9030  		y := v_0
  9031  		if y.Op != OpPPC64MOVHreg {
  9032  			break
  9033  		}
  9034  		x := y.Args[0]
  9035  		v.reset(OpPPC64MOVHZreg)
  9036  		v.AddArg(x)
  9037  		return true
  9038  	}
  9039  	// match: (MOVHZreg (OR <t> x (MOVWZreg y)))
  9040  	// result: (MOVHZreg (OR <t> x y))
  9041  	for {
  9042  		if v_0.Op != OpPPC64OR {
  9043  			break
  9044  		}
  9045  		t := v_0.Type
  9046  		_ = v_0.Args[1]
  9047  		v_0_0 := v_0.Args[0]
  9048  		v_0_1 := v_0.Args[1]
  9049  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9050  			x := v_0_0
  9051  			if v_0_1.Op != OpPPC64MOVWZreg {
  9052  				continue
  9053  			}
  9054  			y := v_0_1.Args[0]
  9055  			v.reset(OpPPC64MOVHZreg)
  9056  			v0 := b.NewValue0(v.Pos, OpPPC64OR, t)
  9057  			v0.AddArg2(x, y)
  9058  			v.AddArg(v0)
  9059  			return true
  9060  		}
  9061  		break
  9062  	}
  9063  	// match: (MOVHZreg (XOR <t> x (MOVWZreg y)))
  9064  	// result: (MOVHZreg (XOR <t> x y))
  9065  	for {
  9066  		if v_0.Op != OpPPC64XOR {
  9067  			break
  9068  		}
  9069  		t := v_0.Type
  9070  		_ = v_0.Args[1]
  9071  		v_0_0 := v_0.Args[0]
  9072  		v_0_1 := v_0.Args[1]
  9073  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9074  			x := v_0_0
  9075  			if v_0_1.Op != OpPPC64MOVWZreg {
  9076  				continue
  9077  			}
  9078  			y := v_0_1.Args[0]
  9079  			v.reset(OpPPC64MOVHZreg)
  9080  			v0 := b.NewValue0(v.Pos, OpPPC64XOR, t)
  9081  			v0.AddArg2(x, y)
  9082  			v.AddArg(v0)
  9083  			return true
  9084  		}
  9085  		break
  9086  	}
  9087  	// match: (MOVHZreg (AND <t> x (MOVWZreg y)))
  9088  	// result: (MOVHZreg (AND <t> x y))
  9089  	for {
  9090  		if v_0.Op != OpPPC64AND {
  9091  			break
  9092  		}
  9093  		t := v_0.Type
  9094  		_ = v_0.Args[1]
  9095  		v_0_0 := v_0.Args[0]
  9096  		v_0_1 := v_0.Args[1]
  9097  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9098  			x := v_0_0
  9099  			if v_0_1.Op != OpPPC64MOVWZreg {
  9100  				continue
  9101  			}
  9102  			y := v_0_1.Args[0]
  9103  			v.reset(OpPPC64MOVHZreg)
  9104  			v0 := b.NewValue0(v.Pos, OpPPC64AND, t)
  9105  			v0.AddArg2(x, y)
  9106  			v.AddArg(v0)
  9107  			return true
  9108  		}
  9109  		break
  9110  	}
  9111  	// match: (MOVHZreg (OR <t> x (MOVHZreg y)))
  9112  	// result: (MOVHZreg (OR <t> x y))
  9113  	for {
  9114  		if v_0.Op != OpPPC64OR {
  9115  			break
  9116  		}
  9117  		t := v_0.Type
  9118  		_ = v_0.Args[1]
  9119  		v_0_0 := v_0.Args[0]
  9120  		v_0_1 := v_0.Args[1]
  9121  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9122  			x := v_0_0
  9123  			if v_0_1.Op != OpPPC64MOVHZreg {
  9124  				continue
  9125  			}
  9126  			y := v_0_1.Args[0]
  9127  			v.reset(OpPPC64MOVHZreg)
  9128  			v0 := b.NewValue0(v.Pos, OpPPC64OR, t)
  9129  			v0.AddArg2(x, y)
  9130  			v.AddArg(v0)
  9131  			return true
  9132  		}
  9133  		break
  9134  	}
  9135  	// match: (MOVHZreg (XOR <t> x (MOVHZreg y)))
  9136  	// result: (MOVHZreg (XOR <t> x y))
  9137  	for {
  9138  		if v_0.Op != OpPPC64XOR {
  9139  			break
  9140  		}
  9141  		t := v_0.Type
  9142  		_ = v_0.Args[1]
  9143  		v_0_0 := v_0.Args[0]
  9144  		v_0_1 := v_0.Args[1]
  9145  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9146  			x := v_0_0
  9147  			if v_0_1.Op != OpPPC64MOVHZreg {
  9148  				continue
  9149  			}
  9150  			y := v_0_1.Args[0]
  9151  			v.reset(OpPPC64MOVHZreg)
  9152  			v0 := b.NewValue0(v.Pos, OpPPC64XOR, t)
  9153  			v0.AddArg2(x, y)
  9154  			v.AddArg(v0)
  9155  			return true
  9156  		}
  9157  		break
  9158  	}
  9159  	// match: (MOVHZreg (AND <t> x (MOVHZreg y)))
  9160  	// result: (MOVHZreg (AND <t> x y))
  9161  	for {
  9162  		if v_0.Op != OpPPC64AND {
  9163  			break
  9164  		}
  9165  		t := v_0.Type
  9166  		_ = v_0.Args[1]
  9167  		v_0_0 := v_0.Args[0]
  9168  		v_0_1 := v_0.Args[1]
  9169  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  9170  			x := v_0_0
  9171  			if v_0_1.Op != OpPPC64MOVHZreg {
  9172  				continue
  9173  			}
  9174  			y := v_0_1.Args[0]
  9175  			v.reset(OpPPC64MOVHZreg)
  9176  			v0 := b.NewValue0(v.Pos, OpPPC64AND, t)
  9177  			v0.AddArg2(x, y)
  9178  			v.AddArg(v0)
  9179  			return true
  9180  		}
  9181  		break
  9182  	}
  9183  	// match: (MOVHZreg z:(ANDconst [c] (MOVBZload ptr x)))
  9184  	// result: z
  9185  	for {
  9186  		z := v_0
  9187  		if z.Op != OpPPC64ANDconst {
  9188  			break
  9189  		}
  9190  		z_0 := z.Args[0]
  9191  		if z_0.Op != OpPPC64MOVBZload {
  9192  			break
  9193  		}
  9194  		v.copyOf(z)
  9195  		return true
  9196  	}
  9197  	// match: (MOVHZreg z:(ANDconst [c] (MOVHZload ptr x)))
  9198  	// result: z
  9199  	for {
  9200  		z := v_0
  9201  		if z.Op != OpPPC64ANDconst {
  9202  			break
  9203  		}
  9204  		z_0 := z.Args[0]
  9205  		if z_0.Op != OpPPC64MOVHZload {
  9206  			break
  9207  		}
  9208  		v.copyOf(z)
  9209  		return true
  9210  	}
  9211  	// match: (MOVHZreg z:(AND y (MOVHZload ptr x)))
  9212  	// result: z
  9213  	for {
  9214  		z := v_0
  9215  		if z.Op != OpPPC64AND {
  9216  			break
  9217  		}
  9218  		_ = z.Args[1]
  9219  		z_0 := z.Args[0]
  9220  		z_1 := z.Args[1]
  9221  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
  9222  			if z_1.Op != OpPPC64MOVHZload {
  9223  				continue
  9224  			}
  9225  			v.copyOf(z)
  9226  			return true
  9227  		}
  9228  		break
  9229  	}
  9230  	// match: (MOVHZreg x:(MOVBZload _ _))
  9231  	// result: x
  9232  	for {
  9233  		x := v_0
  9234  		if x.Op != OpPPC64MOVBZload {
  9235  			break
  9236  		}
  9237  		v.copyOf(x)
  9238  		return true
  9239  	}
  9240  	// match: (MOVHZreg x:(MOVBZloadidx _ _ _))
  9241  	// result: x
  9242  	for {
  9243  		x := v_0
  9244  		if x.Op != OpPPC64MOVBZloadidx {
  9245  			break
  9246  		}
  9247  		v.copyOf(x)
  9248  		return true
  9249  	}
  9250  	// match: (MOVHZreg x:(MOVHZload _ _))
  9251  	// result: x
  9252  	for {
  9253  		x := v_0
  9254  		if x.Op != OpPPC64MOVHZload {
  9255  			break
  9256  		}
  9257  		v.copyOf(x)
  9258  		return true
  9259  	}
  9260  	// match: (MOVHZreg x:(MOVHZloadidx _ _ _))
  9261  	// result: x
  9262  	for {
  9263  		x := v_0
  9264  		if x.Op != OpPPC64MOVHZloadidx {
  9265  			break
  9266  		}
  9267  		v.copyOf(x)
  9268  		return true
  9269  	}
  9270  	// match: (MOVHZreg x:(Arg <t>))
  9271  	// cond: (is8BitInt(t) || is16BitInt(t)) && !isSigned(t)
  9272  	// result: x
  9273  	for {
  9274  		x := v_0
  9275  		if x.Op != OpArg {
  9276  			break
  9277  		}
  9278  		t := x.Type
  9279  		if !((is8BitInt(t) || is16BitInt(t)) && !isSigned(t)) {
  9280  			break
  9281  		}
  9282  		v.copyOf(x)
  9283  		return true
  9284  	}
  9285  	// match: (MOVHZreg (MOVDconst [c]))
  9286  	// result: (MOVDconst [int64(uint16(c))])
  9287  	for {
  9288  		if v_0.Op != OpPPC64MOVDconst {
  9289  			break
  9290  		}
  9291  		c := auxIntToInt64(v_0.AuxInt)
  9292  		v.reset(OpPPC64MOVDconst)
  9293  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9294  		return true
  9295  	}
  9296  	return false
  9297  }
  9298  func rewriteValuePPC64_OpPPC64MOVHload(v *Value) bool {
  9299  	v_1 := v.Args[1]
  9300  	v_0 := v.Args[0]
  9301  	// match: (MOVHload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
  9302  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  9303  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
  9304  	for {
  9305  		off1 := auxIntToInt32(v.AuxInt)
  9306  		sym1 := auxToSym(v.Aux)
  9307  		p := v_0
  9308  		if p.Op != OpPPC64MOVDaddr {
  9309  			break
  9310  		}
  9311  		off2 := auxIntToInt32(p.AuxInt)
  9312  		sym2 := auxToSym(p.Aux)
  9313  		ptr := p.Args[0]
  9314  		mem := v_1
  9315  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  9316  			break
  9317  		}
  9318  		v.reset(OpPPC64MOVHload)
  9319  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9320  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9321  		v.AddArg2(ptr, mem)
  9322  		return true
  9323  	}
  9324  	// match: (MOVHload [off1] {sym} (ADDconst [off2] x) mem)
  9325  	// cond: is16Bit(int64(off1)+off2)
  9326  	// result: (MOVHload [off1+int32(off2)] {sym} x mem)
  9327  	for {
  9328  		off1 := auxIntToInt32(v.AuxInt)
  9329  		sym := auxToSym(v.Aux)
  9330  		if v_0.Op != OpPPC64ADDconst {
  9331  			break
  9332  		}
  9333  		off2 := auxIntToInt64(v_0.AuxInt)
  9334  		x := v_0.Args[0]
  9335  		mem := v_1
  9336  		if !(is16Bit(int64(off1) + off2)) {
  9337  			break
  9338  		}
  9339  		v.reset(OpPPC64MOVHload)
  9340  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9341  		v.Aux = symToAux(sym)
  9342  		v.AddArg2(x, mem)
  9343  		return true
  9344  	}
  9345  	// match: (MOVHload [0] {sym} p:(ADD ptr idx) mem)
  9346  	// cond: sym == nil && p.Uses == 1
  9347  	// result: (MOVHloadidx ptr idx mem)
  9348  	for {
  9349  		if auxIntToInt32(v.AuxInt) != 0 {
  9350  			break
  9351  		}
  9352  		sym := auxToSym(v.Aux)
  9353  		p := v_0
  9354  		if p.Op != OpPPC64ADD {
  9355  			break
  9356  		}
  9357  		idx := p.Args[1]
  9358  		ptr := p.Args[0]
  9359  		mem := v_1
  9360  		if !(sym == nil && p.Uses == 1) {
  9361  			break
  9362  		}
  9363  		v.reset(OpPPC64MOVHloadidx)
  9364  		v.AddArg3(ptr, idx, mem)
  9365  		return true
  9366  	}
  9367  	return false
  9368  }
  9369  func rewriteValuePPC64_OpPPC64MOVHloadidx(v *Value) bool {
  9370  	v_2 := v.Args[2]
  9371  	v_1 := v.Args[1]
  9372  	v_0 := v.Args[0]
  9373  	// match: (MOVHloadidx ptr (MOVDconst [c]) mem)
  9374  	// cond: is16Bit(c)
  9375  	// result: (MOVHload [int32(c)] ptr mem)
  9376  	for {
  9377  		ptr := v_0
  9378  		if v_1.Op != OpPPC64MOVDconst {
  9379  			break
  9380  		}
  9381  		c := auxIntToInt64(v_1.AuxInt)
  9382  		mem := v_2
  9383  		if !(is16Bit(c)) {
  9384  			break
  9385  		}
  9386  		v.reset(OpPPC64MOVHload)
  9387  		v.AuxInt = int32ToAuxInt(int32(c))
  9388  		v.AddArg2(ptr, mem)
  9389  		return true
  9390  	}
  9391  	// match: (MOVHloadidx (MOVDconst [c]) ptr mem)
  9392  	// cond: is16Bit(c)
  9393  	// result: (MOVHload [int32(c)] ptr mem)
  9394  	for {
  9395  		if v_0.Op != OpPPC64MOVDconst {
  9396  			break
  9397  		}
  9398  		c := auxIntToInt64(v_0.AuxInt)
  9399  		ptr := v_1
  9400  		mem := v_2
  9401  		if !(is16Bit(c)) {
  9402  			break
  9403  		}
  9404  		v.reset(OpPPC64MOVHload)
  9405  		v.AuxInt = int32ToAuxInt(int32(c))
  9406  		v.AddArg2(ptr, mem)
  9407  		return true
  9408  	}
  9409  	return false
  9410  }
  9411  func rewriteValuePPC64_OpPPC64MOVHreg(v *Value) bool {
  9412  	v_0 := v.Args[0]
  9413  	b := v.Block
  9414  	typ := &b.Func.Config.Types
  9415  	// match: (MOVHreg y:(ANDconst [c] _))
  9416  	// cond: uint64(c) <= 0x7FFF
  9417  	// result: y
  9418  	for {
  9419  		y := v_0
  9420  		if y.Op != OpPPC64ANDconst {
  9421  			break
  9422  		}
  9423  		c := auxIntToInt64(y.AuxInt)
  9424  		if !(uint64(c) <= 0x7FFF) {
  9425  			break
  9426  		}
  9427  		v.copyOf(y)
  9428  		return true
  9429  	}
  9430  	// match: (MOVHreg (SRAWconst [c] (MOVBreg x)))
  9431  	// result: (SRAWconst [c] (MOVBreg x))
  9432  	for {
  9433  		if v_0.Op != OpPPC64SRAWconst {
  9434  			break
  9435  		}
  9436  		c := auxIntToInt64(v_0.AuxInt)
  9437  		v_0_0 := v_0.Args[0]
  9438  		if v_0_0.Op != OpPPC64MOVBreg {
  9439  			break
  9440  		}
  9441  		x := v_0_0.Args[0]
  9442  		v.reset(OpPPC64SRAWconst)
  9443  		v.AuxInt = int64ToAuxInt(c)
  9444  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
  9445  		v0.AddArg(x)
  9446  		v.AddArg(v0)
  9447  		return true
  9448  	}
  9449  	// match: (MOVHreg (SRAWconst [c] (MOVHreg x)))
  9450  	// result: (SRAWconst [c] (MOVHreg x))
  9451  	for {
  9452  		if v_0.Op != OpPPC64SRAWconst {
  9453  			break
  9454  		}
  9455  		c := auxIntToInt64(v_0.AuxInt)
  9456  		v_0_0 := v_0.Args[0]
  9457  		if v_0_0.Op != OpPPC64MOVHreg {
  9458  			break
  9459  		}
  9460  		x := v_0_0.Args[0]
  9461  		v.reset(OpPPC64SRAWconst)
  9462  		v.AuxInt = int64ToAuxInt(c)
  9463  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
  9464  		v0.AddArg(x)
  9465  		v.AddArg(v0)
  9466  		return true
  9467  	}
  9468  	// match: (MOVHreg (SRAWconst [c] x))
  9469  	// cond: sizeof(x.Type) <= 16
  9470  	// result: (SRAWconst [c] x)
  9471  	for {
  9472  		if v_0.Op != OpPPC64SRAWconst {
  9473  			break
  9474  		}
  9475  		c := auxIntToInt64(v_0.AuxInt)
  9476  		x := v_0.Args[0]
  9477  		if !(sizeof(x.Type) <= 16) {
  9478  			break
  9479  		}
  9480  		v.reset(OpPPC64SRAWconst)
  9481  		v.AuxInt = int64ToAuxInt(c)
  9482  		v.AddArg(x)
  9483  		return true
  9484  	}
  9485  	// match: (MOVHreg (SRDconst [c] x))
  9486  	// cond: c>48
  9487  	// result: (SRDconst [c] x)
  9488  	for {
  9489  		if v_0.Op != OpPPC64SRDconst {
  9490  			break
  9491  		}
  9492  		c := auxIntToInt64(v_0.AuxInt)
  9493  		x := v_0.Args[0]
  9494  		if !(c > 48) {
  9495  			break
  9496  		}
  9497  		v.reset(OpPPC64SRDconst)
  9498  		v.AuxInt = int64ToAuxInt(c)
  9499  		v.AddArg(x)
  9500  		return true
  9501  	}
  9502  	// match: (MOVHreg (SRDconst [c] x))
  9503  	// cond: c==48
  9504  	// result: (SRADconst [c] x)
  9505  	for {
  9506  		if v_0.Op != OpPPC64SRDconst {
  9507  			break
  9508  		}
  9509  		c := auxIntToInt64(v_0.AuxInt)
  9510  		x := v_0.Args[0]
  9511  		if !(c == 48) {
  9512  			break
  9513  		}
  9514  		v.reset(OpPPC64SRADconst)
  9515  		v.AuxInt = int64ToAuxInt(c)
  9516  		v.AddArg(x)
  9517  		return true
  9518  	}
  9519  	// match: (MOVHreg (SRADconst [c] x))
  9520  	// cond: c>=48
  9521  	// result: (SRADconst [c] x)
  9522  	for {
  9523  		if v_0.Op != OpPPC64SRADconst {
  9524  			break
  9525  		}
  9526  		c := auxIntToInt64(v_0.AuxInt)
  9527  		x := v_0.Args[0]
  9528  		if !(c >= 48) {
  9529  			break
  9530  		}
  9531  		v.reset(OpPPC64SRADconst)
  9532  		v.AuxInt = int64ToAuxInt(c)
  9533  		v.AddArg(x)
  9534  		return true
  9535  	}
  9536  	// match: (MOVHreg (SRWconst [c] x))
  9537  	// cond: c>16
  9538  	// result: (SRWconst [c] x)
  9539  	for {
  9540  		if v_0.Op != OpPPC64SRWconst {
  9541  			break
  9542  		}
  9543  		c := auxIntToInt64(v_0.AuxInt)
  9544  		x := v_0.Args[0]
  9545  		if !(c > 16) {
  9546  			break
  9547  		}
  9548  		v.reset(OpPPC64SRWconst)
  9549  		v.AuxInt = int64ToAuxInt(c)
  9550  		v.AddArg(x)
  9551  		return true
  9552  	}
  9553  	// match: (MOVHreg (SRAWconst [c] x))
  9554  	// cond: c>=16
  9555  	// result: (SRAWconst [c] x)
  9556  	for {
  9557  		if v_0.Op != OpPPC64SRAWconst {
  9558  			break
  9559  		}
  9560  		c := auxIntToInt64(v_0.AuxInt)
  9561  		x := v_0.Args[0]
  9562  		if !(c >= 16) {
  9563  			break
  9564  		}
  9565  		v.reset(OpPPC64SRAWconst)
  9566  		v.AuxInt = int64ToAuxInt(c)
  9567  		v.AddArg(x)
  9568  		return true
  9569  	}
  9570  	// match: (MOVHreg (SRWconst [c] x))
  9571  	// cond: c==16
  9572  	// result: (SRAWconst [c] x)
  9573  	for {
  9574  		if v_0.Op != OpPPC64SRWconst {
  9575  			break
  9576  		}
  9577  		c := auxIntToInt64(v_0.AuxInt)
  9578  		x := v_0.Args[0]
  9579  		if !(c == 16) {
  9580  			break
  9581  		}
  9582  		v.reset(OpPPC64SRAWconst)
  9583  		v.AuxInt = int64ToAuxInt(c)
  9584  		v.AddArg(x)
  9585  		return true
  9586  	}
  9587  	// match: (MOVHreg y:(MOVHreg _))
  9588  	// result: y
  9589  	for {
  9590  		y := v_0
  9591  		if y.Op != OpPPC64MOVHreg {
  9592  			break
  9593  		}
  9594  		v.copyOf(y)
  9595  		return true
  9596  	}
  9597  	// match: (MOVHreg y:(MOVBreg _))
  9598  	// result: y
  9599  	for {
  9600  		y := v_0
  9601  		if y.Op != OpPPC64MOVBreg {
  9602  			break
  9603  		}
  9604  		v.copyOf(y)
  9605  		return true
  9606  	}
  9607  	// match: (MOVHreg y:(MOVHZreg x))
  9608  	// result: (MOVHreg x)
  9609  	for {
  9610  		y := v_0
  9611  		if y.Op != OpPPC64MOVHZreg {
  9612  			break
  9613  		}
  9614  		x := y.Args[0]
  9615  		v.reset(OpPPC64MOVHreg)
  9616  		v.AddArg(x)
  9617  		return true
  9618  	}
  9619  	// match: (MOVHreg x:(MOVHload _ _))
  9620  	// result: x
  9621  	for {
  9622  		x := v_0
  9623  		if x.Op != OpPPC64MOVHload {
  9624  			break
  9625  		}
  9626  		v.copyOf(x)
  9627  		return true
  9628  	}
  9629  	// match: (MOVHreg x:(MOVHloadidx _ _ _))
  9630  	// result: x
  9631  	for {
  9632  		x := v_0
  9633  		if x.Op != OpPPC64MOVHloadidx {
  9634  			break
  9635  		}
  9636  		v.copyOf(x)
  9637  		return true
  9638  	}
  9639  	// match: (MOVHreg x:(Arg <t>))
  9640  	// cond: (is8BitInt(t) || is16BitInt(t)) && isSigned(t)
  9641  	// result: x
  9642  	for {
  9643  		x := v_0
  9644  		if x.Op != OpArg {
  9645  			break
  9646  		}
  9647  		t := x.Type
  9648  		if !((is8BitInt(t) || is16BitInt(t)) && isSigned(t)) {
  9649  			break
  9650  		}
  9651  		v.copyOf(x)
  9652  		return true
  9653  	}
  9654  	// match: (MOVHreg (MOVDconst [c]))
  9655  	// result: (MOVDconst [int64(int16(c))])
  9656  	for {
  9657  		if v_0.Op != OpPPC64MOVDconst {
  9658  			break
  9659  		}
  9660  		c := auxIntToInt64(v_0.AuxInt)
  9661  		v.reset(OpPPC64MOVDconst)
  9662  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
  9663  		return true
  9664  	}
  9665  	return false
  9666  }
  9667  func rewriteValuePPC64_OpPPC64MOVHstore(v *Value) bool {
  9668  	v_2 := v.Args[2]
  9669  	v_1 := v.Args[1]
  9670  	v_0 := v.Args[0]
  9671  	b := v.Block
  9672  	config := b.Func.Config
  9673  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] x) val mem)
  9674  	// cond: is16Bit(int64(off1)+off2)
  9675  	// result: (MOVHstore [off1+int32(off2)] {sym} x val mem)
  9676  	for {
  9677  		off1 := auxIntToInt32(v.AuxInt)
  9678  		sym := auxToSym(v.Aux)
  9679  		if v_0.Op != OpPPC64ADDconst {
  9680  			break
  9681  		}
  9682  		off2 := auxIntToInt64(v_0.AuxInt)
  9683  		x := v_0.Args[0]
  9684  		val := v_1
  9685  		mem := v_2
  9686  		if !(is16Bit(int64(off1) + off2)) {
  9687  			break
  9688  		}
  9689  		v.reset(OpPPC64MOVHstore)
  9690  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
  9691  		v.Aux = symToAux(sym)
  9692  		v.AddArg3(x, val, mem)
  9693  		return true
  9694  	}
  9695  	// match: (MOVHstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
  9696  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
  9697  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
  9698  	for {
  9699  		off1 := auxIntToInt32(v.AuxInt)
  9700  		sym1 := auxToSym(v.Aux)
  9701  		p := v_0
  9702  		if p.Op != OpPPC64MOVDaddr {
  9703  			break
  9704  		}
  9705  		off2 := auxIntToInt32(p.AuxInt)
  9706  		sym2 := auxToSym(p.Aux)
  9707  		ptr := p.Args[0]
  9708  		val := v_1
  9709  		mem := v_2
  9710  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
  9711  			break
  9712  		}
  9713  		v.reset(OpPPC64MOVHstore)
  9714  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9715  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9716  		v.AddArg3(ptr, val, mem)
  9717  		return true
  9718  	}
  9719  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [0]) mem)
  9720  	// result: (MOVHstorezero [off] {sym} ptr mem)
  9721  	for {
  9722  		off := auxIntToInt32(v.AuxInt)
  9723  		sym := auxToSym(v.Aux)
  9724  		ptr := v_0
  9725  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
  9726  			break
  9727  		}
  9728  		mem := v_2
  9729  		v.reset(OpPPC64MOVHstorezero)
  9730  		v.AuxInt = int32ToAuxInt(off)
  9731  		v.Aux = symToAux(sym)
  9732  		v.AddArg2(ptr, mem)
  9733  		return true
  9734  	}
  9735  	// match: (MOVHstore [0] {sym} p:(ADD ptr idx) val mem)
  9736  	// cond: sym == nil && p.Uses == 1
  9737  	// result: (MOVHstoreidx ptr idx val mem)
  9738  	for {
  9739  		if auxIntToInt32(v.AuxInt) != 0 {
  9740  			break
  9741  		}
  9742  		sym := auxToSym(v.Aux)
  9743  		p := v_0
  9744  		if p.Op != OpPPC64ADD {
  9745  			break
  9746  		}
  9747  		idx := p.Args[1]
  9748  		ptr := p.Args[0]
  9749  		val := v_1
  9750  		mem := v_2
  9751  		if !(sym == nil && p.Uses == 1) {
  9752  			break
  9753  		}
  9754  		v.reset(OpPPC64MOVHstoreidx)
  9755  		v.AddArg4(ptr, idx, val, mem)
  9756  		return true
  9757  	}
  9758  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  9759  	// result: (MOVHstore [off] {sym} ptr x mem)
  9760  	for {
  9761  		off := auxIntToInt32(v.AuxInt)
  9762  		sym := auxToSym(v.Aux)
  9763  		ptr := v_0
  9764  		if v_1.Op != OpPPC64MOVHreg {
  9765  			break
  9766  		}
  9767  		x := v_1.Args[0]
  9768  		mem := v_2
  9769  		v.reset(OpPPC64MOVHstore)
  9770  		v.AuxInt = int32ToAuxInt(off)
  9771  		v.Aux = symToAux(sym)
  9772  		v.AddArg3(ptr, x, mem)
  9773  		return true
  9774  	}
  9775  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
  9776  	// result: (MOVHstore [off] {sym} ptr x mem)
  9777  	for {
  9778  		off := auxIntToInt32(v.AuxInt)
  9779  		sym := auxToSym(v.Aux)
  9780  		ptr := v_0
  9781  		if v_1.Op != OpPPC64MOVHZreg {
  9782  			break
  9783  		}
  9784  		x := v_1.Args[0]
  9785  		mem := v_2
  9786  		v.reset(OpPPC64MOVHstore)
  9787  		v.AuxInt = int32ToAuxInt(off)
  9788  		v.Aux = symToAux(sym)
  9789  		v.AddArg3(ptr, x, mem)
  9790  		return true
  9791  	}
  9792  	// match: (MOVHstore [off] {sym} ptr (MOVWreg x) mem)
  9793  	// result: (MOVHstore [off] {sym} ptr x mem)
  9794  	for {
  9795  		off := auxIntToInt32(v.AuxInt)
  9796  		sym := auxToSym(v.Aux)
  9797  		ptr := v_0
  9798  		if v_1.Op != OpPPC64MOVWreg {
  9799  			break
  9800  		}
  9801  		x := v_1.Args[0]
  9802  		mem := v_2
  9803  		v.reset(OpPPC64MOVHstore)
  9804  		v.AuxInt = int32ToAuxInt(off)
  9805  		v.Aux = symToAux(sym)
  9806  		v.AddArg3(ptr, x, mem)
  9807  		return true
  9808  	}
  9809  	// match: (MOVHstore [off] {sym} ptr (MOVWZreg x) mem)
  9810  	// result: (MOVHstore [off] {sym} ptr x mem)
  9811  	for {
  9812  		off := auxIntToInt32(v.AuxInt)
  9813  		sym := auxToSym(v.Aux)
  9814  		ptr := v_0
  9815  		if v_1.Op != OpPPC64MOVWZreg {
  9816  			break
  9817  		}
  9818  		x := v_1.Args[0]
  9819  		mem := v_2
  9820  		v.reset(OpPPC64MOVHstore)
  9821  		v.AuxInt = int32ToAuxInt(off)
  9822  		v.Aux = symToAux(sym)
  9823  		v.AddArg3(ptr, x, mem)
  9824  		return true
  9825  	}
  9826  	// match: (MOVHstore [i1] {s} p (SRWconst w [16]) x0:(MOVHstore [i0] {s} p w mem))
  9827  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)
  9828  	// result: (MOVWstore [i0] {s} p w mem)
  9829  	for {
  9830  		i1 := auxIntToInt32(v.AuxInt)
  9831  		s := auxToSym(v.Aux)
  9832  		p := v_0
  9833  		if v_1.Op != OpPPC64SRWconst || auxIntToInt64(v_1.AuxInt) != 16 {
  9834  			break
  9835  		}
  9836  		w := v_1.Args[0]
  9837  		x0 := v_2
  9838  		if x0.Op != OpPPC64MOVHstore {
  9839  			break
  9840  		}
  9841  		i0 := auxIntToInt32(x0.AuxInt)
  9842  		if auxToSym(x0.Aux) != s {
  9843  			break
  9844  		}
  9845  		mem := x0.Args[2]
  9846  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)) {
  9847  			break
  9848  		}
  9849  		v.reset(OpPPC64MOVWstore)
  9850  		v.AuxInt = int32ToAuxInt(i0)
  9851  		v.Aux = symToAux(s)
  9852  		v.AddArg3(p, w, mem)
  9853  		return true
  9854  	}
  9855  	// match: (MOVHstore [i1] {s} p (SRDconst w [16]) x0:(MOVHstore [i0] {s} p w mem))
  9856  	// cond: !config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)
  9857  	// result: (MOVWstore [i0] {s} p w mem)
  9858  	for {
  9859  		i1 := auxIntToInt32(v.AuxInt)
  9860  		s := auxToSym(v.Aux)
  9861  		p := v_0
  9862  		if v_1.Op != OpPPC64SRDconst || auxIntToInt64(v_1.AuxInt) != 16 {
  9863  			break
  9864  		}
  9865  		w := v_1.Args[0]
  9866  		x0 := v_2
  9867  		if x0.Op != OpPPC64MOVHstore {
  9868  			break
  9869  		}
  9870  		i0 := auxIntToInt32(x0.AuxInt)
  9871  		if auxToSym(x0.Aux) != s {
  9872  			break
  9873  		}
  9874  		mem := x0.Args[2]
  9875  		if p != x0.Args[0] || w != x0.Args[1] || !(!config.BigEndian && x0.Uses == 1 && i1 == i0+2 && clobber(x0)) {
  9876  			break
  9877  		}
  9878  		v.reset(OpPPC64MOVWstore)
  9879  		v.AuxInt = int32ToAuxInt(i0)
  9880  		v.Aux = symToAux(s)
  9881  		v.AddArg3(p, w, mem)
  9882  		return true
  9883  	}
  9884  	return false
  9885  }
  9886  func rewriteValuePPC64_OpPPC64MOVHstoreidx(v *Value) bool {
  9887  	v_3 := v.Args[3]
  9888  	v_2 := v.Args[2]
  9889  	v_1 := v.Args[1]
  9890  	v_0 := v.Args[0]
  9891  	// match: (MOVHstoreidx ptr (MOVDconst [c]) val mem)
  9892  	// cond: is16Bit(c)
  9893  	// result: (MOVHstore [int32(c)] ptr val mem)
  9894  	for {
  9895  		ptr := v_0
  9896  		if v_1.Op != OpPPC64MOVDconst {
  9897  			break
  9898  		}
  9899  		c := auxIntToInt64(v_1.AuxInt)
  9900  		val := v_2
  9901  		mem := v_3
  9902  		if !(is16Bit(c)) {
  9903  			break
  9904  		}
  9905  		v.reset(OpPPC64MOVHstore)
  9906  		v.AuxInt = int32ToAuxInt(int32(c))
  9907  		v.AddArg3(ptr, val, mem)
  9908  		return true
  9909  	}
  9910  	// match: (MOVHstoreidx (MOVDconst [c]) ptr val mem)
  9911  	// cond: is16Bit(c)
  9912  	// result: (MOVHstore [int32(c)] ptr val mem)
  9913  	for {
  9914  		if v_0.Op != OpPPC64MOVDconst {
  9915  			break
  9916  		}
  9917  		c := auxIntToInt64(v_0.AuxInt)
  9918  		ptr := v_1
  9919  		val := v_2
  9920  		mem := v_3
  9921  		if !(is16Bit(c)) {
  9922  			break
  9923  		}
  9924  		v.reset(OpPPC64MOVHstore)
  9925  		v.AuxInt = int32ToAuxInt(int32(c))
  9926  		v.AddArg3(ptr, val, mem)
  9927  		return true
  9928  	}
  9929  	// match: (MOVHstoreidx ptr idx (MOVHreg x) mem)
  9930  	// result: (MOVHstoreidx ptr idx x mem)
  9931  	for {
  9932  		ptr := v_0
  9933  		idx := v_1
  9934  		if v_2.Op != OpPPC64MOVHreg {
  9935  			break
  9936  		}
  9937  		x := v_2.Args[0]
  9938  		mem := v_3
  9939  		v.reset(OpPPC64MOVHstoreidx)
  9940  		v.AddArg4(ptr, idx, x, mem)
  9941  		return true
  9942  	}
  9943  	// match: (MOVHstoreidx ptr idx (MOVHZreg x) mem)
  9944  	// result: (MOVHstoreidx ptr idx x mem)
  9945  	for {
  9946  		ptr := v_0
  9947  		idx := v_1
  9948  		if v_2.Op != OpPPC64MOVHZreg {
  9949  			break
  9950  		}
  9951  		x := v_2.Args[0]
  9952  		mem := v_3
  9953  		v.reset(OpPPC64MOVHstoreidx)
  9954  		v.AddArg4(ptr, idx, x, mem)
  9955  		return true
  9956  	}
  9957  	// match: (MOVHstoreidx ptr idx (MOVWreg x) mem)
  9958  	// result: (MOVHstoreidx ptr idx x mem)
  9959  	for {
  9960  		ptr := v_0
  9961  		idx := v_1
  9962  		if v_2.Op != OpPPC64MOVWreg {
  9963  			break
  9964  		}
  9965  		x := v_2.Args[0]
  9966  		mem := v_3
  9967  		v.reset(OpPPC64MOVHstoreidx)
  9968  		v.AddArg4(ptr, idx, x, mem)
  9969  		return true
  9970  	}
  9971  	// match: (MOVHstoreidx ptr idx (MOVWZreg x) mem)
  9972  	// result: (MOVHstoreidx ptr idx x mem)
  9973  	for {
  9974  		ptr := v_0
  9975  		idx := v_1
  9976  		if v_2.Op != OpPPC64MOVWZreg {
  9977  			break
  9978  		}
  9979  		x := v_2.Args[0]
  9980  		mem := v_3
  9981  		v.reset(OpPPC64MOVHstoreidx)
  9982  		v.AddArg4(ptr, idx, x, mem)
  9983  		return true
  9984  	}
  9985  	return false
  9986  }
  9987  func rewriteValuePPC64_OpPPC64MOVHstorezero(v *Value) bool {
  9988  	v_1 := v.Args[1]
  9989  	v_0 := v.Args[0]
  9990  	// match: (MOVHstorezero [off1] {sym} (ADDconst [off2] x) mem)
  9991  	// cond: is16Bit(int64(off1)+off2)
  9992  	// result: (MOVHstorezero [off1+int32(off2)] {sym} x mem)
  9993  	for {
  9994  		off1 := auxIntToInt32(v.AuxInt)
  9995  		sym := auxToSym(v.Aux)
  9996  		if v_0.Op != OpPPC64ADDconst {
  9997  			break
  9998  		}
  9999  		off2 := auxIntToInt64(v_0.AuxInt)
 10000  		x := v_0.Args[0]
 10001  		mem := v_1
 10002  		if !(is16Bit(int64(off1) + off2)) {
 10003  			break
 10004  		}
 10005  		v.reset(OpPPC64MOVHstorezero)
 10006  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10007  		v.Aux = symToAux(sym)
 10008  		v.AddArg2(x, mem)
 10009  		return true
 10010  	}
 10011  	// match: (MOVHstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 10012  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
 10013  	// result: (MOVHstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
 10014  	for {
 10015  		off1 := auxIntToInt32(v.AuxInt)
 10016  		sym1 := auxToSym(v.Aux)
 10017  		p := v_0
 10018  		if p.Op != OpPPC64MOVDaddr {
 10019  			break
 10020  		}
 10021  		off2 := auxIntToInt32(p.AuxInt)
 10022  		sym2 := auxToSym(p.Aux)
 10023  		x := p.Args[0]
 10024  		mem := v_1
 10025  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
 10026  			break
 10027  		}
 10028  		v.reset(OpPPC64MOVHstorezero)
 10029  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10030  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10031  		v.AddArg2(x, mem)
 10032  		return true
 10033  	}
 10034  	return false
 10035  }
 10036  func rewriteValuePPC64_OpPPC64MOVWBRstore(v *Value) bool {
 10037  	v_2 := v.Args[2]
 10038  	v_1 := v.Args[1]
 10039  	v_0 := v.Args[0]
 10040  	// match: (MOVWBRstore {sym} ptr (MOVWreg x) mem)
 10041  	// result: (MOVWBRstore {sym} ptr x mem)
 10042  	for {
 10043  		sym := auxToSym(v.Aux)
 10044  		ptr := v_0
 10045  		if v_1.Op != OpPPC64MOVWreg {
 10046  			break
 10047  		}
 10048  		x := v_1.Args[0]
 10049  		mem := v_2
 10050  		v.reset(OpPPC64MOVWBRstore)
 10051  		v.Aux = symToAux(sym)
 10052  		v.AddArg3(ptr, x, mem)
 10053  		return true
 10054  	}
 10055  	// match: (MOVWBRstore {sym} ptr (MOVWZreg x) mem)
 10056  	// result: (MOVWBRstore {sym} ptr x mem)
 10057  	for {
 10058  		sym := auxToSym(v.Aux)
 10059  		ptr := v_0
 10060  		if v_1.Op != OpPPC64MOVWZreg {
 10061  			break
 10062  		}
 10063  		x := v_1.Args[0]
 10064  		mem := v_2
 10065  		v.reset(OpPPC64MOVWBRstore)
 10066  		v.Aux = symToAux(sym)
 10067  		v.AddArg3(ptr, x, mem)
 10068  		return true
 10069  	}
 10070  	return false
 10071  }
 10072  func rewriteValuePPC64_OpPPC64MOVWZload(v *Value) bool {
 10073  	v_1 := v.Args[1]
 10074  	v_0 := v.Args[0]
 10075  	// match: (MOVWZload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 10076  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
 10077  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10078  	for {
 10079  		off1 := auxIntToInt32(v.AuxInt)
 10080  		sym1 := auxToSym(v.Aux)
 10081  		p := v_0
 10082  		if p.Op != OpPPC64MOVDaddr {
 10083  			break
 10084  		}
 10085  		off2 := auxIntToInt32(p.AuxInt)
 10086  		sym2 := auxToSym(p.Aux)
 10087  		ptr := p.Args[0]
 10088  		mem := v_1
 10089  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
 10090  			break
 10091  		}
 10092  		v.reset(OpPPC64MOVWZload)
 10093  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10094  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10095  		v.AddArg2(ptr, mem)
 10096  		return true
 10097  	}
 10098  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] x) mem)
 10099  	// cond: is16Bit(int64(off1)+off2)
 10100  	// result: (MOVWZload [off1+int32(off2)] {sym} x mem)
 10101  	for {
 10102  		off1 := auxIntToInt32(v.AuxInt)
 10103  		sym := auxToSym(v.Aux)
 10104  		if v_0.Op != OpPPC64ADDconst {
 10105  			break
 10106  		}
 10107  		off2 := auxIntToInt64(v_0.AuxInt)
 10108  		x := v_0.Args[0]
 10109  		mem := v_1
 10110  		if !(is16Bit(int64(off1) + off2)) {
 10111  			break
 10112  		}
 10113  		v.reset(OpPPC64MOVWZload)
 10114  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10115  		v.Aux = symToAux(sym)
 10116  		v.AddArg2(x, mem)
 10117  		return true
 10118  	}
 10119  	// match: (MOVWZload [0] {sym} p:(ADD ptr idx) mem)
 10120  	// cond: sym == nil && p.Uses == 1
 10121  	// result: (MOVWZloadidx ptr idx mem)
 10122  	for {
 10123  		if auxIntToInt32(v.AuxInt) != 0 {
 10124  			break
 10125  		}
 10126  		sym := auxToSym(v.Aux)
 10127  		p := v_0
 10128  		if p.Op != OpPPC64ADD {
 10129  			break
 10130  		}
 10131  		idx := p.Args[1]
 10132  		ptr := p.Args[0]
 10133  		mem := v_1
 10134  		if !(sym == nil && p.Uses == 1) {
 10135  			break
 10136  		}
 10137  		v.reset(OpPPC64MOVWZloadidx)
 10138  		v.AddArg3(ptr, idx, mem)
 10139  		return true
 10140  	}
 10141  	return false
 10142  }
 10143  func rewriteValuePPC64_OpPPC64MOVWZloadidx(v *Value) bool {
 10144  	v_2 := v.Args[2]
 10145  	v_1 := v.Args[1]
 10146  	v_0 := v.Args[0]
 10147  	// match: (MOVWZloadidx ptr (MOVDconst [c]) mem)
 10148  	// cond: is16Bit(c)
 10149  	// result: (MOVWZload [int32(c)] ptr mem)
 10150  	for {
 10151  		ptr := v_0
 10152  		if v_1.Op != OpPPC64MOVDconst {
 10153  			break
 10154  		}
 10155  		c := auxIntToInt64(v_1.AuxInt)
 10156  		mem := v_2
 10157  		if !(is16Bit(c)) {
 10158  			break
 10159  		}
 10160  		v.reset(OpPPC64MOVWZload)
 10161  		v.AuxInt = int32ToAuxInt(int32(c))
 10162  		v.AddArg2(ptr, mem)
 10163  		return true
 10164  	}
 10165  	// match: (MOVWZloadidx (MOVDconst [c]) ptr mem)
 10166  	// cond: is16Bit(c)
 10167  	// result: (MOVWZload [int32(c)] ptr mem)
 10168  	for {
 10169  		if v_0.Op != OpPPC64MOVDconst {
 10170  			break
 10171  		}
 10172  		c := auxIntToInt64(v_0.AuxInt)
 10173  		ptr := v_1
 10174  		mem := v_2
 10175  		if !(is16Bit(c)) {
 10176  			break
 10177  		}
 10178  		v.reset(OpPPC64MOVWZload)
 10179  		v.AuxInt = int32ToAuxInt(int32(c))
 10180  		v.AddArg2(ptr, mem)
 10181  		return true
 10182  	}
 10183  	return false
 10184  }
 10185  func rewriteValuePPC64_OpPPC64MOVWZreg(v *Value) bool {
 10186  	v_0 := v.Args[0]
 10187  	b := v.Block
 10188  	typ := &b.Func.Config.Types
 10189  	// match: (MOVWZreg y:(ANDconst [c] _))
 10190  	// cond: uint64(c) <= 0xFFFFFFFF
 10191  	// result: y
 10192  	for {
 10193  		y := v_0
 10194  		if y.Op != OpPPC64ANDconst {
 10195  			break
 10196  		}
 10197  		c := auxIntToInt64(y.AuxInt)
 10198  		if !(uint64(c) <= 0xFFFFFFFF) {
 10199  			break
 10200  		}
 10201  		v.copyOf(y)
 10202  		return true
 10203  	}
 10204  	// match: (MOVWZreg y:(AND (MOVDconst [c]) _))
 10205  	// cond: uint64(c) <= 0xFFFFFFFF
 10206  	// result: y
 10207  	for {
 10208  		y := v_0
 10209  		if y.Op != OpPPC64AND {
 10210  			break
 10211  		}
 10212  		y_0 := y.Args[0]
 10213  		y_1 := y.Args[1]
 10214  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
 10215  			if y_0.Op != OpPPC64MOVDconst {
 10216  				continue
 10217  			}
 10218  			c := auxIntToInt64(y_0.AuxInt)
 10219  			if !(uint64(c) <= 0xFFFFFFFF) {
 10220  				continue
 10221  			}
 10222  			v.copyOf(y)
 10223  			return true
 10224  		}
 10225  		break
 10226  	}
 10227  	// match: (MOVWZreg (SRWconst [c] (MOVBZreg x)))
 10228  	// result: (SRWconst [c] (MOVBZreg x))
 10229  	for {
 10230  		if v_0.Op != OpPPC64SRWconst {
 10231  			break
 10232  		}
 10233  		c := auxIntToInt64(v_0.AuxInt)
 10234  		v_0_0 := v_0.Args[0]
 10235  		if v_0_0.Op != OpPPC64MOVBZreg {
 10236  			break
 10237  		}
 10238  		x := v_0_0.Args[0]
 10239  		v.reset(OpPPC64SRWconst)
 10240  		v.AuxInt = int64ToAuxInt(c)
 10241  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 10242  		v0.AddArg(x)
 10243  		v.AddArg(v0)
 10244  		return true
 10245  	}
 10246  	// match: (MOVWZreg (SRWconst [c] (MOVHZreg x)))
 10247  	// result: (SRWconst [c] (MOVHZreg x))
 10248  	for {
 10249  		if v_0.Op != OpPPC64SRWconst {
 10250  			break
 10251  		}
 10252  		c := auxIntToInt64(v_0.AuxInt)
 10253  		v_0_0 := v_0.Args[0]
 10254  		if v_0_0.Op != OpPPC64MOVHZreg {
 10255  			break
 10256  		}
 10257  		x := v_0_0.Args[0]
 10258  		v.reset(OpPPC64SRWconst)
 10259  		v.AuxInt = int64ToAuxInt(c)
 10260  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 10261  		v0.AddArg(x)
 10262  		v.AddArg(v0)
 10263  		return true
 10264  	}
 10265  	// match: (MOVWZreg (SRWconst [c] (MOVWZreg x)))
 10266  	// result: (SRWconst [c] (MOVWZreg x))
 10267  	for {
 10268  		if v_0.Op != OpPPC64SRWconst {
 10269  			break
 10270  		}
 10271  		c := auxIntToInt64(v_0.AuxInt)
 10272  		v_0_0 := v_0.Args[0]
 10273  		if v_0_0.Op != OpPPC64MOVWZreg {
 10274  			break
 10275  		}
 10276  		x := v_0_0.Args[0]
 10277  		v.reset(OpPPC64SRWconst)
 10278  		v.AuxInt = int64ToAuxInt(c)
 10279  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
 10280  		v0.AddArg(x)
 10281  		v.AddArg(v0)
 10282  		return true
 10283  	}
 10284  	// match: (MOVWZreg (SRWconst [c] x))
 10285  	// cond: sizeof(x.Type) <= 32
 10286  	// result: (SRWconst [c] x)
 10287  	for {
 10288  		if v_0.Op != OpPPC64SRWconst {
 10289  			break
 10290  		}
 10291  		c := auxIntToInt64(v_0.AuxInt)
 10292  		x := v_0.Args[0]
 10293  		if !(sizeof(x.Type) <= 32) {
 10294  			break
 10295  		}
 10296  		v.reset(OpPPC64SRWconst)
 10297  		v.AuxInt = int64ToAuxInt(c)
 10298  		v.AddArg(x)
 10299  		return true
 10300  	}
 10301  	// match: (MOVWZreg (SRDconst [c] x))
 10302  	// cond: c>=32
 10303  	// result: (SRDconst [c] x)
 10304  	for {
 10305  		if v_0.Op != OpPPC64SRDconst {
 10306  			break
 10307  		}
 10308  		c := auxIntToInt64(v_0.AuxInt)
 10309  		x := v_0.Args[0]
 10310  		if !(c >= 32) {
 10311  			break
 10312  		}
 10313  		v.reset(OpPPC64SRDconst)
 10314  		v.AuxInt = int64ToAuxInt(c)
 10315  		v.AddArg(x)
 10316  		return true
 10317  	}
 10318  	// match: (MOVWZreg y:(MOVWZreg _))
 10319  	// result: y
 10320  	for {
 10321  		y := v_0
 10322  		if y.Op != OpPPC64MOVWZreg {
 10323  			break
 10324  		}
 10325  		v.copyOf(y)
 10326  		return true
 10327  	}
 10328  	// match: (MOVWZreg y:(MOVHZreg _))
 10329  	// result: y
 10330  	for {
 10331  		y := v_0
 10332  		if y.Op != OpPPC64MOVHZreg {
 10333  			break
 10334  		}
 10335  		v.copyOf(y)
 10336  		return true
 10337  	}
 10338  	// match: (MOVWZreg y:(MOVBZreg _))
 10339  	// result: y
 10340  	for {
 10341  		y := v_0
 10342  		if y.Op != OpPPC64MOVBZreg {
 10343  			break
 10344  		}
 10345  		v.copyOf(y)
 10346  		return true
 10347  	}
 10348  	// match: (MOVWZreg y:(MOVHBRload _ _))
 10349  	// result: y
 10350  	for {
 10351  		y := v_0
 10352  		if y.Op != OpPPC64MOVHBRload {
 10353  			break
 10354  		}
 10355  		v.copyOf(y)
 10356  		return true
 10357  	}
 10358  	// match: (MOVWZreg y:(MOVWBRload _ _))
 10359  	// result: y
 10360  	for {
 10361  		y := v_0
 10362  		if y.Op != OpPPC64MOVWBRload {
 10363  			break
 10364  		}
 10365  		v.copyOf(y)
 10366  		return true
 10367  	}
 10368  	// match: (MOVWZreg y:(MOVWreg x))
 10369  	// result: (MOVWZreg x)
 10370  	for {
 10371  		y := v_0
 10372  		if y.Op != OpPPC64MOVWreg {
 10373  			break
 10374  		}
 10375  		x := y.Args[0]
 10376  		v.reset(OpPPC64MOVWZreg)
 10377  		v.AddArg(x)
 10378  		return true
 10379  	}
 10380  	// match: (MOVWZreg (OR <t> x (MOVWZreg y)))
 10381  	// result: (MOVWZreg (OR <t> x y))
 10382  	for {
 10383  		if v_0.Op != OpPPC64OR {
 10384  			break
 10385  		}
 10386  		t := v_0.Type
 10387  		_ = v_0.Args[1]
 10388  		v_0_0 := v_0.Args[0]
 10389  		v_0_1 := v_0.Args[1]
 10390  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 10391  			x := v_0_0
 10392  			if v_0_1.Op != OpPPC64MOVWZreg {
 10393  				continue
 10394  			}
 10395  			y := v_0_1.Args[0]
 10396  			v.reset(OpPPC64MOVWZreg)
 10397  			v0 := b.NewValue0(v.Pos, OpPPC64OR, t)
 10398  			v0.AddArg2(x, y)
 10399  			v.AddArg(v0)
 10400  			return true
 10401  		}
 10402  		break
 10403  	}
 10404  	// match: (MOVWZreg (XOR <t> x (MOVWZreg y)))
 10405  	// result: (MOVWZreg (XOR <t> x y))
 10406  	for {
 10407  		if v_0.Op != OpPPC64XOR {
 10408  			break
 10409  		}
 10410  		t := v_0.Type
 10411  		_ = v_0.Args[1]
 10412  		v_0_0 := v_0.Args[0]
 10413  		v_0_1 := v_0.Args[1]
 10414  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 10415  			x := v_0_0
 10416  			if v_0_1.Op != OpPPC64MOVWZreg {
 10417  				continue
 10418  			}
 10419  			y := v_0_1.Args[0]
 10420  			v.reset(OpPPC64MOVWZreg)
 10421  			v0 := b.NewValue0(v.Pos, OpPPC64XOR, t)
 10422  			v0.AddArg2(x, y)
 10423  			v.AddArg(v0)
 10424  			return true
 10425  		}
 10426  		break
 10427  	}
 10428  	// match: (MOVWZreg (AND <t> x (MOVWZreg y)))
 10429  	// result: (MOVWZreg (AND <t> x y))
 10430  	for {
 10431  		if v_0.Op != OpPPC64AND {
 10432  			break
 10433  		}
 10434  		t := v_0.Type
 10435  		_ = v_0.Args[1]
 10436  		v_0_0 := v_0.Args[0]
 10437  		v_0_1 := v_0.Args[1]
 10438  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 10439  			x := v_0_0
 10440  			if v_0_1.Op != OpPPC64MOVWZreg {
 10441  				continue
 10442  			}
 10443  			y := v_0_1.Args[0]
 10444  			v.reset(OpPPC64MOVWZreg)
 10445  			v0 := b.NewValue0(v.Pos, OpPPC64AND, t)
 10446  			v0.AddArg2(x, y)
 10447  			v.AddArg(v0)
 10448  			return true
 10449  		}
 10450  		break
 10451  	}
 10452  	// match: (MOVWZreg z:(ANDconst [c] (MOVBZload ptr x)))
 10453  	// result: z
 10454  	for {
 10455  		z := v_0
 10456  		if z.Op != OpPPC64ANDconst {
 10457  			break
 10458  		}
 10459  		z_0 := z.Args[0]
 10460  		if z_0.Op != OpPPC64MOVBZload {
 10461  			break
 10462  		}
 10463  		v.copyOf(z)
 10464  		return true
 10465  	}
 10466  	// match: (MOVWZreg z:(ANDconst [c] (MOVHZload ptr x)))
 10467  	// result: z
 10468  	for {
 10469  		z := v_0
 10470  		if z.Op != OpPPC64ANDconst {
 10471  			break
 10472  		}
 10473  		z_0 := z.Args[0]
 10474  		if z_0.Op != OpPPC64MOVHZload {
 10475  			break
 10476  		}
 10477  		v.copyOf(z)
 10478  		return true
 10479  	}
 10480  	// match: (MOVWZreg z:(ANDconst [c] (MOVWZload ptr x)))
 10481  	// result: z
 10482  	for {
 10483  		z := v_0
 10484  		if z.Op != OpPPC64ANDconst {
 10485  			break
 10486  		}
 10487  		z_0 := z.Args[0]
 10488  		if z_0.Op != OpPPC64MOVWZload {
 10489  			break
 10490  		}
 10491  		v.copyOf(z)
 10492  		return true
 10493  	}
 10494  	// match: (MOVWZreg z:(AND y (MOVWZload ptr x)))
 10495  	// result: z
 10496  	for {
 10497  		z := v_0
 10498  		if z.Op != OpPPC64AND {
 10499  			break
 10500  		}
 10501  		_ = z.Args[1]
 10502  		z_0 := z.Args[0]
 10503  		z_1 := z.Args[1]
 10504  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 10505  			if z_1.Op != OpPPC64MOVWZload {
 10506  				continue
 10507  			}
 10508  			v.copyOf(z)
 10509  			return true
 10510  		}
 10511  		break
 10512  	}
 10513  	// match: (MOVWZreg x:(MOVBZload _ _))
 10514  	// result: x
 10515  	for {
 10516  		x := v_0
 10517  		if x.Op != OpPPC64MOVBZload {
 10518  			break
 10519  		}
 10520  		v.copyOf(x)
 10521  		return true
 10522  	}
 10523  	// match: (MOVWZreg x:(MOVBZloadidx _ _ _))
 10524  	// result: x
 10525  	for {
 10526  		x := v_0
 10527  		if x.Op != OpPPC64MOVBZloadidx {
 10528  			break
 10529  		}
 10530  		v.copyOf(x)
 10531  		return true
 10532  	}
 10533  	// match: (MOVWZreg x:(MOVHZload _ _))
 10534  	// result: x
 10535  	for {
 10536  		x := v_0
 10537  		if x.Op != OpPPC64MOVHZload {
 10538  			break
 10539  		}
 10540  		v.copyOf(x)
 10541  		return true
 10542  	}
 10543  	// match: (MOVWZreg x:(MOVHZloadidx _ _ _))
 10544  	// result: x
 10545  	for {
 10546  		x := v_0
 10547  		if x.Op != OpPPC64MOVHZloadidx {
 10548  			break
 10549  		}
 10550  		v.copyOf(x)
 10551  		return true
 10552  	}
 10553  	// match: (MOVWZreg x:(MOVWZload _ _))
 10554  	// result: x
 10555  	for {
 10556  		x := v_0
 10557  		if x.Op != OpPPC64MOVWZload {
 10558  			break
 10559  		}
 10560  		v.copyOf(x)
 10561  		return true
 10562  	}
 10563  	// match: (MOVWZreg x:(MOVWZloadidx _ _ _))
 10564  	// result: x
 10565  	for {
 10566  		x := v_0
 10567  		if x.Op != OpPPC64MOVWZloadidx {
 10568  			break
 10569  		}
 10570  		v.copyOf(x)
 10571  		return true
 10572  	}
 10573  	// match: (MOVWZreg x:(Select0 (LoweredAtomicLoad32 _ _)))
 10574  	// result: x
 10575  	for {
 10576  		x := v_0
 10577  		if x.Op != OpSelect0 {
 10578  			break
 10579  		}
 10580  		x_0 := x.Args[0]
 10581  		if x_0.Op != OpPPC64LoweredAtomicLoad32 {
 10582  			break
 10583  		}
 10584  		v.copyOf(x)
 10585  		return true
 10586  	}
 10587  	// match: (MOVWZreg x:(Arg <t>))
 10588  	// cond: (is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)
 10589  	// result: x
 10590  	for {
 10591  		x := v_0
 10592  		if x.Op != OpArg {
 10593  			break
 10594  		}
 10595  		t := x.Type
 10596  		if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && !isSigned(t)) {
 10597  			break
 10598  		}
 10599  		v.copyOf(x)
 10600  		return true
 10601  	}
 10602  	// match: (MOVWZreg (MOVDconst [c]))
 10603  	// result: (MOVDconst [int64(uint32(c))])
 10604  	for {
 10605  		if v_0.Op != OpPPC64MOVDconst {
 10606  			break
 10607  		}
 10608  		c := auxIntToInt64(v_0.AuxInt)
 10609  		v.reset(OpPPC64MOVDconst)
 10610  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10611  		return true
 10612  	}
 10613  	return false
 10614  }
 10615  func rewriteValuePPC64_OpPPC64MOVWload(v *Value) bool {
 10616  	v_1 := v.Args[1]
 10617  	v_0 := v.Args[0]
 10618  	// match: (MOVWload [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) mem)
 10619  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
 10620  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} ptr mem)
 10621  	for {
 10622  		off1 := auxIntToInt32(v.AuxInt)
 10623  		sym1 := auxToSym(v.Aux)
 10624  		p := v_0
 10625  		if p.Op != OpPPC64MOVDaddr {
 10626  			break
 10627  		}
 10628  		off2 := auxIntToInt32(p.AuxInt)
 10629  		sym2 := auxToSym(p.Aux)
 10630  		ptr := p.Args[0]
 10631  		mem := v_1
 10632  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
 10633  			break
 10634  		}
 10635  		v.reset(OpPPC64MOVWload)
 10636  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10637  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10638  		v.AddArg2(ptr, mem)
 10639  		return true
 10640  	}
 10641  	// match: (MOVWload [off1] {sym} (ADDconst [off2] x) mem)
 10642  	// cond: is16Bit(int64(off1)+off2)
 10643  	// result: (MOVWload [off1+int32(off2)] {sym} x mem)
 10644  	for {
 10645  		off1 := auxIntToInt32(v.AuxInt)
 10646  		sym := auxToSym(v.Aux)
 10647  		if v_0.Op != OpPPC64ADDconst {
 10648  			break
 10649  		}
 10650  		off2 := auxIntToInt64(v_0.AuxInt)
 10651  		x := v_0.Args[0]
 10652  		mem := v_1
 10653  		if !(is16Bit(int64(off1) + off2)) {
 10654  			break
 10655  		}
 10656  		v.reset(OpPPC64MOVWload)
 10657  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 10658  		v.Aux = symToAux(sym)
 10659  		v.AddArg2(x, mem)
 10660  		return true
 10661  	}
 10662  	// match: (MOVWload [0] {sym} p:(ADD ptr idx) mem)
 10663  	// cond: sym == nil && p.Uses == 1
 10664  	// result: (MOVWloadidx ptr idx mem)
 10665  	for {
 10666  		if auxIntToInt32(v.AuxInt) != 0 {
 10667  			break
 10668  		}
 10669  		sym := auxToSym(v.Aux)
 10670  		p := v_0
 10671  		if p.Op != OpPPC64ADD {
 10672  			break
 10673  		}
 10674  		idx := p.Args[1]
 10675  		ptr := p.Args[0]
 10676  		mem := v_1
 10677  		if !(sym == nil && p.Uses == 1) {
 10678  			break
 10679  		}
 10680  		v.reset(OpPPC64MOVWloadidx)
 10681  		v.AddArg3(ptr, idx, mem)
 10682  		return true
 10683  	}
 10684  	return false
 10685  }
 10686  func rewriteValuePPC64_OpPPC64MOVWloadidx(v *Value) bool {
 10687  	v_2 := v.Args[2]
 10688  	v_1 := v.Args[1]
 10689  	v_0 := v.Args[0]
 10690  	// match: (MOVWloadidx ptr (MOVDconst [c]) mem)
 10691  	// cond: is16Bit(c) && c%4 == 0
 10692  	// result: (MOVWload [int32(c)] ptr mem)
 10693  	for {
 10694  		ptr := v_0
 10695  		if v_1.Op != OpPPC64MOVDconst {
 10696  			break
 10697  		}
 10698  		c := auxIntToInt64(v_1.AuxInt)
 10699  		mem := v_2
 10700  		if !(is16Bit(c) && c%4 == 0) {
 10701  			break
 10702  		}
 10703  		v.reset(OpPPC64MOVWload)
 10704  		v.AuxInt = int32ToAuxInt(int32(c))
 10705  		v.AddArg2(ptr, mem)
 10706  		return true
 10707  	}
 10708  	// match: (MOVWloadidx (MOVDconst [c]) ptr mem)
 10709  	// cond: is16Bit(c) && c%4 == 0
 10710  	// result: (MOVWload [int32(c)] ptr mem)
 10711  	for {
 10712  		if v_0.Op != OpPPC64MOVDconst {
 10713  			break
 10714  		}
 10715  		c := auxIntToInt64(v_0.AuxInt)
 10716  		ptr := v_1
 10717  		mem := v_2
 10718  		if !(is16Bit(c) && c%4 == 0) {
 10719  			break
 10720  		}
 10721  		v.reset(OpPPC64MOVWload)
 10722  		v.AuxInt = int32ToAuxInt(int32(c))
 10723  		v.AddArg2(ptr, mem)
 10724  		return true
 10725  	}
 10726  	return false
 10727  }
 10728  func rewriteValuePPC64_OpPPC64MOVWreg(v *Value) bool {
 10729  	v_0 := v.Args[0]
 10730  	b := v.Block
 10731  	typ := &b.Func.Config.Types
 10732  	// match: (MOVWreg y:(ANDconst [c] _))
 10733  	// cond: uint64(c) <= 0xFFFF
 10734  	// result: y
 10735  	for {
 10736  		y := v_0
 10737  		if y.Op != OpPPC64ANDconst {
 10738  			break
 10739  		}
 10740  		c := auxIntToInt64(y.AuxInt)
 10741  		if !(uint64(c) <= 0xFFFF) {
 10742  			break
 10743  		}
 10744  		v.copyOf(y)
 10745  		return true
 10746  	}
 10747  	// match: (MOVWreg y:(AND (MOVDconst [c]) _))
 10748  	// cond: uint64(c) <= 0x7FFFFFFF
 10749  	// result: y
 10750  	for {
 10751  		y := v_0
 10752  		if y.Op != OpPPC64AND {
 10753  			break
 10754  		}
 10755  		y_0 := y.Args[0]
 10756  		y_1 := y.Args[1]
 10757  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
 10758  			if y_0.Op != OpPPC64MOVDconst {
 10759  				continue
 10760  			}
 10761  			c := auxIntToInt64(y_0.AuxInt)
 10762  			if !(uint64(c) <= 0x7FFFFFFF) {
 10763  				continue
 10764  			}
 10765  			v.copyOf(y)
 10766  			return true
 10767  		}
 10768  		break
 10769  	}
 10770  	// match: (MOVWreg (SRAWconst [c] (MOVBreg x)))
 10771  	// result: (SRAWconst [c] (MOVBreg x))
 10772  	for {
 10773  		if v_0.Op != OpPPC64SRAWconst {
 10774  			break
 10775  		}
 10776  		c := auxIntToInt64(v_0.AuxInt)
 10777  		v_0_0 := v_0.Args[0]
 10778  		if v_0_0.Op != OpPPC64MOVBreg {
 10779  			break
 10780  		}
 10781  		x := v_0_0.Args[0]
 10782  		v.reset(OpPPC64SRAWconst)
 10783  		v.AuxInt = int64ToAuxInt(c)
 10784  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 10785  		v0.AddArg(x)
 10786  		v.AddArg(v0)
 10787  		return true
 10788  	}
 10789  	// match: (MOVWreg (SRAWconst [c] (MOVHreg x)))
 10790  	// result: (SRAWconst [c] (MOVHreg x))
 10791  	for {
 10792  		if v_0.Op != OpPPC64SRAWconst {
 10793  			break
 10794  		}
 10795  		c := auxIntToInt64(v_0.AuxInt)
 10796  		v_0_0 := v_0.Args[0]
 10797  		if v_0_0.Op != OpPPC64MOVHreg {
 10798  			break
 10799  		}
 10800  		x := v_0_0.Args[0]
 10801  		v.reset(OpPPC64SRAWconst)
 10802  		v.AuxInt = int64ToAuxInt(c)
 10803  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 10804  		v0.AddArg(x)
 10805  		v.AddArg(v0)
 10806  		return true
 10807  	}
 10808  	// match: (MOVWreg (SRAWconst [c] (MOVWreg x)))
 10809  	// result: (SRAWconst [c] (MOVWreg x))
 10810  	for {
 10811  		if v_0.Op != OpPPC64SRAWconst {
 10812  			break
 10813  		}
 10814  		c := auxIntToInt64(v_0.AuxInt)
 10815  		v_0_0 := v_0.Args[0]
 10816  		if v_0_0.Op != OpPPC64MOVWreg {
 10817  			break
 10818  		}
 10819  		x := v_0_0.Args[0]
 10820  		v.reset(OpPPC64SRAWconst)
 10821  		v.AuxInt = int64ToAuxInt(c)
 10822  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWreg, typ.Int64)
 10823  		v0.AddArg(x)
 10824  		v.AddArg(v0)
 10825  		return true
 10826  	}
 10827  	// match: (MOVWreg (SRAWconst [c] x))
 10828  	// cond: sizeof(x.Type) <= 32
 10829  	// result: (SRAWconst [c] x)
 10830  	for {
 10831  		if v_0.Op != OpPPC64SRAWconst {
 10832  			break
 10833  		}
 10834  		c := auxIntToInt64(v_0.AuxInt)
 10835  		x := v_0.Args[0]
 10836  		if !(sizeof(x.Type) <= 32) {
 10837  			break
 10838  		}
 10839  		v.reset(OpPPC64SRAWconst)
 10840  		v.AuxInt = int64ToAuxInt(c)
 10841  		v.AddArg(x)
 10842  		return true
 10843  	}
 10844  	// match: (MOVWreg (SRDconst [c] x))
 10845  	// cond: c>32
 10846  	// result: (SRDconst [c] x)
 10847  	for {
 10848  		if v_0.Op != OpPPC64SRDconst {
 10849  			break
 10850  		}
 10851  		c := auxIntToInt64(v_0.AuxInt)
 10852  		x := v_0.Args[0]
 10853  		if !(c > 32) {
 10854  			break
 10855  		}
 10856  		v.reset(OpPPC64SRDconst)
 10857  		v.AuxInt = int64ToAuxInt(c)
 10858  		v.AddArg(x)
 10859  		return true
 10860  	}
 10861  	// match: (MOVWreg (SRADconst [c] x))
 10862  	// cond: c>=32
 10863  	// result: (SRADconst [c] x)
 10864  	for {
 10865  		if v_0.Op != OpPPC64SRADconst {
 10866  			break
 10867  		}
 10868  		c := auxIntToInt64(v_0.AuxInt)
 10869  		x := v_0.Args[0]
 10870  		if !(c >= 32) {
 10871  			break
 10872  		}
 10873  		v.reset(OpPPC64SRADconst)
 10874  		v.AuxInt = int64ToAuxInt(c)
 10875  		v.AddArg(x)
 10876  		return true
 10877  	}
 10878  	// match: (MOVWreg (SRDconst [c] x))
 10879  	// cond: c==32
 10880  	// result: (SRADconst [c] x)
 10881  	for {
 10882  		if v_0.Op != OpPPC64SRDconst {
 10883  			break
 10884  		}
 10885  		c := auxIntToInt64(v_0.AuxInt)
 10886  		x := v_0.Args[0]
 10887  		if !(c == 32) {
 10888  			break
 10889  		}
 10890  		v.reset(OpPPC64SRADconst)
 10891  		v.AuxInt = int64ToAuxInt(c)
 10892  		v.AddArg(x)
 10893  		return true
 10894  	}
 10895  	// match: (MOVWreg y:(MOVWreg _))
 10896  	// result: y
 10897  	for {
 10898  		y := v_0
 10899  		if y.Op != OpPPC64MOVWreg {
 10900  			break
 10901  		}
 10902  		v.copyOf(y)
 10903  		return true
 10904  	}
 10905  	// match: (MOVWreg y:(MOVHreg _))
 10906  	// result: y
 10907  	for {
 10908  		y := v_0
 10909  		if y.Op != OpPPC64MOVHreg {
 10910  			break
 10911  		}
 10912  		v.copyOf(y)
 10913  		return true
 10914  	}
 10915  	// match: (MOVWreg y:(MOVBreg _))
 10916  	// result: y
 10917  	for {
 10918  		y := v_0
 10919  		if y.Op != OpPPC64MOVBreg {
 10920  			break
 10921  		}
 10922  		v.copyOf(y)
 10923  		return true
 10924  	}
 10925  	// match: (MOVWreg y:(MOVWZreg x))
 10926  	// result: (MOVWreg x)
 10927  	for {
 10928  		y := v_0
 10929  		if y.Op != OpPPC64MOVWZreg {
 10930  			break
 10931  		}
 10932  		x := y.Args[0]
 10933  		v.reset(OpPPC64MOVWreg)
 10934  		v.AddArg(x)
 10935  		return true
 10936  	}
 10937  	// match: (MOVWreg x:(MOVHload _ _))
 10938  	// result: x
 10939  	for {
 10940  		x := v_0
 10941  		if x.Op != OpPPC64MOVHload {
 10942  			break
 10943  		}
 10944  		v.copyOf(x)
 10945  		return true
 10946  	}
 10947  	// match: (MOVWreg x:(MOVHloadidx _ _ _))
 10948  	// result: x
 10949  	for {
 10950  		x := v_0
 10951  		if x.Op != OpPPC64MOVHloadidx {
 10952  			break
 10953  		}
 10954  		v.copyOf(x)
 10955  		return true
 10956  	}
 10957  	// match: (MOVWreg x:(MOVWload _ _))
 10958  	// result: x
 10959  	for {
 10960  		x := v_0
 10961  		if x.Op != OpPPC64MOVWload {
 10962  			break
 10963  		}
 10964  		v.copyOf(x)
 10965  		return true
 10966  	}
 10967  	// match: (MOVWreg x:(MOVWloadidx _ _ _))
 10968  	// result: x
 10969  	for {
 10970  		x := v_0
 10971  		if x.Op != OpPPC64MOVWloadidx {
 10972  			break
 10973  		}
 10974  		v.copyOf(x)
 10975  		return true
 10976  	}
 10977  	// match: (MOVWreg x:(Arg <t>))
 10978  	// cond: (is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)
 10979  	// result: x
 10980  	for {
 10981  		x := v_0
 10982  		if x.Op != OpArg {
 10983  			break
 10984  		}
 10985  		t := x.Type
 10986  		if !((is8BitInt(t) || is16BitInt(t) || is32BitInt(t)) && isSigned(t)) {
 10987  			break
 10988  		}
 10989  		v.copyOf(x)
 10990  		return true
 10991  	}
 10992  	// match: (MOVWreg (MOVDconst [c]))
 10993  	// result: (MOVDconst [int64(int32(c))])
 10994  	for {
 10995  		if v_0.Op != OpPPC64MOVDconst {
 10996  			break
 10997  		}
 10998  		c := auxIntToInt64(v_0.AuxInt)
 10999  		v.reset(OpPPC64MOVDconst)
 11000  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 11001  		return true
 11002  	}
 11003  	return false
 11004  }
 11005  func rewriteValuePPC64_OpPPC64MOVWstore(v *Value) bool {
 11006  	v_2 := v.Args[2]
 11007  	v_1 := v.Args[1]
 11008  	v_0 := v.Args[0]
 11009  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] x) val mem)
 11010  	// cond: is16Bit(int64(off1)+off2)
 11011  	// result: (MOVWstore [off1+int32(off2)] {sym} x val mem)
 11012  	for {
 11013  		off1 := auxIntToInt32(v.AuxInt)
 11014  		sym := auxToSym(v.Aux)
 11015  		if v_0.Op != OpPPC64ADDconst {
 11016  			break
 11017  		}
 11018  		off2 := auxIntToInt64(v_0.AuxInt)
 11019  		x := v_0.Args[0]
 11020  		val := v_1
 11021  		mem := v_2
 11022  		if !(is16Bit(int64(off1) + off2)) {
 11023  			break
 11024  		}
 11025  		v.reset(OpPPC64MOVWstore)
 11026  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11027  		v.Aux = symToAux(sym)
 11028  		v.AddArg3(x, val, mem)
 11029  		return true
 11030  	}
 11031  	// match: (MOVWstore [off1] {sym1} p:(MOVDaddr [off2] {sym2} ptr) val mem)
 11032  	// cond: canMergeSym(sym1,sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)
 11033  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} ptr val mem)
 11034  	for {
 11035  		off1 := auxIntToInt32(v.AuxInt)
 11036  		sym1 := auxToSym(v.Aux)
 11037  		p := v_0
 11038  		if p.Op != OpPPC64MOVDaddr {
 11039  			break
 11040  		}
 11041  		off2 := auxIntToInt32(p.AuxInt)
 11042  		sym2 := auxToSym(p.Aux)
 11043  		ptr := p.Args[0]
 11044  		val := v_1
 11045  		mem := v_2
 11046  		if !(canMergeSym(sym1, sym2) && is16Bit(int64(off1+off2)) && (ptr.Op != OpSB || p.Uses == 1)) {
 11047  			break
 11048  		}
 11049  		v.reset(OpPPC64MOVWstore)
 11050  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11051  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11052  		v.AddArg3(ptr, val, mem)
 11053  		return true
 11054  	}
 11055  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [0]) mem)
 11056  	// result: (MOVWstorezero [off] {sym} ptr mem)
 11057  	for {
 11058  		off := auxIntToInt32(v.AuxInt)
 11059  		sym := auxToSym(v.Aux)
 11060  		ptr := v_0
 11061  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != 0 {
 11062  			break
 11063  		}
 11064  		mem := v_2
 11065  		v.reset(OpPPC64MOVWstorezero)
 11066  		v.AuxInt = int32ToAuxInt(off)
 11067  		v.Aux = symToAux(sym)
 11068  		v.AddArg2(ptr, mem)
 11069  		return true
 11070  	}
 11071  	// match: (MOVWstore [0] {sym} p:(ADD ptr idx) val mem)
 11072  	// cond: sym == nil && p.Uses == 1
 11073  	// result: (MOVWstoreidx ptr idx val mem)
 11074  	for {
 11075  		if auxIntToInt32(v.AuxInt) != 0 {
 11076  			break
 11077  		}
 11078  		sym := auxToSym(v.Aux)
 11079  		p := v_0
 11080  		if p.Op != OpPPC64ADD {
 11081  			break
 11082  		}
 11083  		idx := p.Args[1]
 11084  		ptr := p.Args[0]
 11085  		val := v_1
 11086  		mem := v_2
 11087  		if !(sym == nil && p.Uses == 1) {
 11088  			break
 11089  		}
 11090  		v.reset(OpPPC64MOVWstoreidx)
 11091  		v.AddArg4(ptr, idx, val, mem)
 11092  		return true
 11093  	}
 11094  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 11095  	// result: (MOVWstore [off] {sym} ptr x mem)
 11096  	for {
 11097  		off := auxIntToInt32(v.AuxInt)
 11098  		sym := auxToSym(v.Aux)
 11099  		ptr := v_0
 11100  		if v_1.Op != OpPPC64MOVWreg {
 11101  			break
 11102  		}
 11103  		x := v_1.Args[0]
 11104  		mem := v_2
 11105  		v.reset(OpPPC64MOVWstore)
 11106  		v.AuxInt = int32ToAuxInt(off)
 11107  		v.Aux = symToAux(sym)
 11108  		v.AddArg3(ptr, x, mem)
 11109  		return true
 11110  	}
 11111  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 11112  	// result: (MOVWstore [off] {sym} ptr x mem)
 11113  	for {
 11114  		off := auxIntToInt32(v.AuxInt)
 11115  		sym := auxToSym(v.Aux)
 11116  		ptr := v_0
 11117  		if v_1.Op != OpPPC64MOVWZreg {
 11118  			break
 11119  		}
 11120  		x := v_1.Args[0]
 11121  		mem := v_2
 11122  		v.reset(OpPPC64MOVWstore)
 11123  		v.AuxInt = int32ToAuxInt(off)
 11124  		v.Aux = symToAux(sym)
 11125  		v.AddArg3(ptr, x, mem)
 11126  		return true
 11127  	}
 11128  	return false
 11129  }
 11130  func rewriteValuePPC64_OpPPC64MOVWstoreidx(v *Value) bool {
 11131  	v_3 := v.Args[3]
 11132  	v_2 := v.Args[2]
 11133  	v_1 := v.Args[1]
 11134  	v_0 := v.Args[0]
 11135  	// match: (MOVWstoreidx ptr (MOVDconst [c]) val mem)
 11136  	// cond: is16Bit(c)
 11137  	// result: (MOVWstore [int32(c)] ptr val mem)
 11138  	for {
 11139  		ptr := v_0
 11140  		if v_1.Op != OpPPC64MOVDconst {
 11141  			break
 11142  		}
 11143  		c := auxIntToInt64(v_1.AuxInt)
 11144  		val := v_2
 11145  		mem := v_3
 11146  		if !(is16Bit(c)) {
 11147  			break
 11148  		}
 11149  		v.reset(OpPPC64MOVWstore)
 11150  		v.AuxInt = int32ToAuxInt(int32(c))
 11151  		v.AddArg3(ptr, val, mem)
 11152  		return true
 11153  	}
 11154  	// match: (MOVWstoreidx (MOVDconst [c]) ptr val mem)
 11155  	// cond: is16Bit(c)
 11156  	// result: (MOVWstore [int32(c)] ptr val mem)
 11157  	for {
 11158  		if v_0.Op != OpPPC64MOVDconst {
 11159  			break
 11160  		}
 11161  		c := auxIntToInt64(v_0.AuxInt)
 11162  		ptr := v_1
 11163  		val := v_2
 11164  		mem := v_3
 11165  		if !(is16Bit(c)) {
 11166  			break
 11167  		}
 11168  		v.reset(OpPPC64MOVWstore)
 11169  		v.AuxInt = int32ToAuxInt(int32(c))
 11170  		v.AddArg3(ptr, val, mem)
 11171  		return true
 11172  	}
 11173  	// match: (MOVWstoreidx ptr idx (MOVWreg x) mem)
 11174  	// result: (MOVWstoreidx ptr idx x mem)
 11175  	for {
 11176  		ptr := v_0
 11177  		idx := v_1
 11178  		if v_2.Op != OpPPC64MOVWreg {
 11179  			break
 11180  		}
 11181  		x := v_2.Args[0]
 11182  		mem := v_3
 11183  		v.reset(OpPPC64MOVWstoreidx)
 11184  		v.AddArg4(ptr, idx, x, mem)
 11185  		return true
 11186  	}
 11187  	// match: (MOVWstoreidx ptr idx (MOVWZreg x) mem)
 11188  	// result: (MOVWstoreidx ptr idx x mem)
 11189  	for {
 11190  		ptr := v_0
 11191  		idx := v_1
 11192  		if v_2.Op != OpPPC64MOVWZreg {
 11193  			break
 11194  		}
 11195  		x := v_2.Args[0]
 11196  		mem := v_3
 11197  		v.reset(OpPPC64MOVWstoreidx)
 11198  		v.AddArg4(ptr, idx, x, mem)
 11199  		return true
 11200  	}
 11201  	return false
 11202  }
 11203  func rewriteValuePPC64_OpPPC64MOVWstorezero(v *Value) bool {
 11204  	v_1 := v.Args[1]
 11205  	v_0 := v.Args[0]
 11206  	// match: (MOVWstorezero [off1] {sym} (ADDconst [off2] x) mem)
 11207  	// cond: is16Bit(int64(off1)+off2)
 11208  	// result: (MOVWstorezero [off1+int32(off2)] {sym} x mem)
 11209  	for {
 11210  		off1 := auxIntToInt32(v.AuxInt)
 11211  		sym := auxToSym(v.Aux)
 11212  		if v_0.Op != OpPPC64ADDconst {
 11213  			break
 11214  		}
 11215  		off2 := auxIntToInt64(v_0.AuxInt)
 11216  		x := v_0.Args[0]
 11217  		mem := v_1
 11218  		if !(is16Bit(int64(off1) + off2)) {
 11219  			break
 11220  		}
 11221  		v.reset(OpPPC64MOVWstorezero)
 11222  		v.AuxInt = int32ToAuxInt(off1 + int32(off2))
 11223  		v.Aux = symToAux(sym)
 11224  		v.AddArg2(x, mem)
 11225  		return true
 11226  	}
 11227  	// match: (MOVWstorezero [off1] {sym1} p:(MOVDaddr [off2] {sym2} x) mem)
 11228  	// cond: canMergeSym(sym1,sym2) && (x.Op != OpSB || p.Uses == 1)
 11229  	// result: (MOVWstorezero [off1+off2] {mergeSym(sym1,sym2)} x mem)
 11230  	for {
 11231  		off1 := auxIntToInt32(v.AuxInt)
 11232  		sym1 := auxToSym(v.Aux)
 11233  		p := v_0
 11234  		if p.Op != OpPPC64MOVDaddr {
 11235  			break
 11236  		}
 11237  		off2 := auxIntToInt32(p.AuxInt)
 11238  		sym2 := auxToSym(p.Aux)
 11239  		x := p.Args[0]
 11240  		mem := v_1
 11241  		if !(canMergeSym(sym1, sym2) && (x.Op != OpSB || p.Uses == 1)) {
 11242  			break
 11243  		}
 11244  		v.reset(OpPPC64MOVWstorezero)
 11245  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11246  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11247  		v.AddArg2(x, mem)
 11248  		return true
 11249  	}
 11250  	return false
 11251  }
 11252  func rewriteValuePPC64_OpPPC64MTVSRD(v *Value) bool {
 11253  	v_0 := v.Args[0]
 11254  	b := v.Block
 11255  	typ := &b.Func.Config.Types
 11256  	// match: (MTVSRD (MOVDconst [c]))
 11257  	// cond: !math.IsNaN(math.Float64frombits(uint64(c)))
 11258  	// result: (FMOVDconst [math.Float64frombits(uint64(c))])
 11259  	for {
 11260  		if v_0.Op != OpPPC64MOVDconst {
 11261  			break
 11262  		}
 11263  		c := auxIntToInt64(v_0.AuxInt)
 11264  		if !(!math.IsNaN(math.Float64frombits(uint64(c)))) {
 11265  			break
 11266  		}
 11267  		v.reset(OpPPC64FMOVDconst)
 11268  		v.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(c)))
 11269  		return true
 11270  	}
 11271  	// match: (MTVSRD x:(MOVDload [off] {sym} ptr mem))
 11272  	// cond: x.Uses == 1 && clobber(x)
 11273  	// result: @x.Block (FMOVDload [off] {sym} ptr mem)
 11274  	for {
 11275  		x := v_0
 11276  		if x.Op != OpPPC64MOVDload {
 11277  			break
 11278  		}
 11279  		off := auxIntToInt32(x.AuxInt)
 11280  		sym := auxToSym(x.Aux)
 11281  		mem := x.Args[1]
 11282  		ptr := x.Args[0]
 11283  		if !(x.Uses == 1 && clobber(x)) {
 11284  			break
 11285  		}
 11286  		b = x.Block
 11287  		v0 := b.NewValue0(x.Pos, OpPPC64FMOVDload, typ.Float64)
 11288  		v.copyOf(v0)
 11289  		v0.AuxInt = int32ToAuxInt(off)
 11290  		v0.Aux = symToAux(sym)
 11291  		v0.AddArg2(ptr, mem)
 11292  		return true
 11293  	}
 11294  	return false
 11295  }
 11296  func rewriteValuePPC64_OpPPC64MULLD(v *Value) bool {
 11297  	v_1 := v.Args[1]
 11298  	v_0 := v.Args[0]
 11299  	// match: (MULLD x (MOVDconst [c]))
 11300  	// cond: is16Bit(c)
 11301  	// result: (MULLDconst [int32(c)] x)
 11302  	for {
 11303  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11304  			x := v_0
 11305  			if v_1.Op != OpPPC64MOVDconst {
 11306  				continue
 11307  			}
 11308  			c := auxIntToInt64(v_1.AuxInt)
 11309  			if !(is16Bit(c)) {
 11310  				continue
 11311  			}
 11312  			v.reset(OpPPC64MULLDconst)
 11313  			v.AuxInt = int32ToAuxInt(int32(c))
 11314  			v.AddArg(x)
 11315  			return true
 11316  		}
 11317  		break
 11318  	}
 11319  	return false
 11320  }
 11321  func rewriteValuePPC64_OpPPC64MULLW(v *Value) bool {
 11322  	v_1 := v.Args[1]
 11323  	v_0 := v.Args[0]
 11324  	// match: (MULLW x (MOVDconst [c]))
 11325  	// cond: is16Bit(c)
 11326  	// result: (MULLWconst [int32(c)] x)
 11327  	for {
 11328  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11329  			x := v_0
 11330  			if v_1.Op != OpPPC64MOVDconst {
 11331  				continue
 11332  			}
 11333  			c := auxIntToInt64(v_1.AuxInt)
 11334  			if !(is16Bit(c)) {
 11335  				continue
 11336  			}
 11337  			v.reset(OpPPC64MULLWconst)
 11338  			v.AuxInt = int32ToAuxInt(int32(c))
 11339  			v.AddArg(x)
 11340  			return true
 11341  		}
 11342  		break
 11343  	}
 11344  	return false
 11345  }
 11346  func rewriteValuePPC64_OpPPC64NEG(v *Value) bool {
 11347  	v_0 := v.Args[0]
 11348  	// match: (NEG (ADDconst [c] x))
 11349  	// cond: is32Bit(-c)
 11350  	// result: (SUBFCconst [-c] x)
 11351  	for {
 11352  		if v_0.Op != OpPPC64ADDconst {
 11353  			break
 11354  		}
 11355  		c := auxIntToInt64(v_0.AuxInt)
 11356  		x := v_0.Args[0]
 11357  		if !(is32Bit(-c)) {
 11358  			break
 11359  		}
 11360  		v.reset(OpPPC64SUBFCconst)
 11361  		v.AuxInt = int64ToAuxInt(-c)
 11362  		v.AddArg(x)
 11363  		return true
 11364  	}
 11365  	// match: (NEG (SUBFCconst [c] x))
 11366  	// cond: is32Bit(-c)
 11367  	// result: (ADDconst [-c] x)
 11368  	for {
 11369  		if v_0.Op != OpPPC64SUBFCconst {
 11370  			break
 11371  		}
 11372  		c := auxIntToInt64(v_0.AuxInt)
 11373  		x := v_0.Args[0]
 11374  		if !(is32Bit(-c)) {
 11375  			break
 11376  		}
 11377  		v.reset(OpPPC64ADDconst)
 11378  		v.AuxInt = int64ToAuxInt(-c)
 11379  		v.AddArg(x)
 11380  		return true
 11381  	}
 11382  	// match: (NEG (SUB x y))
 11383  	// result: (SUB y x)
 11384  	for {
 11385  		if v_0.Op != OpPPC64SUB {
 11386  			break
 11387  		}
 11388  		y := v_0.Args[1]
 11389  		x := v_0.Args[0]
 11390  		v.reset(OpPPC64SUB)
 11391  		v.AddArg2(y, x)
 11392  		return true
 11393  	}
 11394  	// match: (NEG (NEG x))
 11395  	// result: x
 11396  	for {
 11397  		if v_0.Op != OpPPC64NEG {
 11398  			break
 11399  		}
 11400  		x := v_0.Args[0]
 11401  		v.copyOf(x)
 11402  		return true
 11403  	}
 11404  	return false
 11405  }
 11406  func rewriteValuePPC64_OpPPC64NOR(v *Value) bool {
 11407  	v_1 := v.Args[1]
 11408  	v_0 := v.Args[0]
 11409  	// match: (NOR (MOVDconst [c]) (MOVDconst [d]))
 11410  	// result: (MOVDconst [^(c|d)])
 11411  	for {
 11412  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11413  			if v_0.Op != OpPPC64MOVDconst {
 11414  				continue
 11415  			}
 11416  			c := auxIntToInt64(v_0.AuxInt)
 11417  			if v_1.Op != OpPPC64MOVDconst {
 11418  				continue
 11419  			}
 11420  			d := auxIntToInt64(v_1.AuxInt)
 11421  			v.reset(OpPPC64MOVDconst)
 11422  			v.AuxInt = int64ToAuxInt(^(c | d))
 11423  			return true
 11424  		}
 11425  		break
 11426  	}
 11427  	return false
 11428  }
 11429  func rewriteValuePPC64_OpPPC64NotEqual(v *Value) bool {
 11430  	v_0 := v.Args[0]
 11431  	b := v.Block
 11432  	typ := &b.Func.Config.Types
 11433  	// match: (NotEqual (FlagEQ))
 11434  	// result: (MOVDconst [0])
 11435  	for {
 11436  		if v_0.Op != OpPPC64FlagEQ {
 11437  			break
 11438  		}
 11439  		v.reset(OpPPC64MOVDconst)
 11440  		v.AuxInt = int64ToAuxInt(0)
 11441  		return true
 11442  	}
 11443  	// match: (NotEqual (FlagLT))
 11444  	// result: (MOVDconst [1])
 11445  	for {
 11446  		if v_0.Op != OpPPC64FlagLT {
 11447  			break
 11448  		}
 11449  		v.reset(OpPPC64MOVDconst)
 11450  		v.AuxInt = int64ToAuxInt(1)
 11451  		return true
 11452  	}
 11453  	// match: (NotEqual (FlagGT))
 11454  	// result: (MOVDconst [1])
 11455  	for {
 11456  		if v_0.Op != OpPPC64FlagGT {
 11457  			break
 11458  		}
 11459  		v.reset(OpPPC64MOVDconst)
 11460  		v.AuxInt = int64ToAuxInt(1)
 11461  		return true
 11462  	}
 11463  	// match: (NotEqual (InvertFlags x))
 11464  	// result: (NotEqual x)
 11465  	for {
 11466  		if v_0.Op != OpPPC64InvertFlags {
 11467  			break
 11468  		}
 11469  		x := v_0.Args[0]
 11470  		v.reset(OpPPC64NotEqual)
 11471  		v.AddArg(x)
 11472  		return true
 11473  	}
 11474  	// match: (NotEqual cmp)
 11475  	// result: (ISELB [6] (MOVDconst [1]) cmp)
 11476  	for {
 11477  		cmp := v_0
 11478  		v.reset(OpPPC64ISELB)
 11479  		v.AuxInt = int32ToAuxInt(6)
 11480  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 11481  		v0.AuxInt = int64ToAuxInt(1)
 11482  		v.AddArg2(v0, cmp)
 11483  		return true
 11484  	}
 11485  }
 11486  func rewriteValuePPC64_OpPPC64OR(v *Value) bool {
 11487  	v_1 := v.Args[1]
 11488  	v_0 := v.Args[0]
 11489  	b := v.Block
 11490  	config := b.Func.Config
 11491  	typ := &b.Func.Config.Types
 11492  	// match: ( OR (SLDconst x [c]) (SRDconst x [d]))
 11493  	// cond: d == 64-c
 11494  	// result: (ROTLconst [c] x)
 11495  	for {
 11496  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11497  			if v_0.Op != OpPPC64SLDconst {
 11498  				continue
 11499  			}
 11500  			c := auxIntToInt64(v_0.AuxInt)
 11501  			x := v_0.Args[0]
 11502  			if v_1.Op != OpPPC64SRDconst {
 11503  				continue
 11504  			}
 11505  			d := auxIntToInt64(v_1.AuxInt)
 11506  			if x != v_1.Args[0] || !(d == 64-c) {
 11507  				continue
 11508  			}
 11509  			v.reset(OpPPC64ROTLconst)
 11510  			v.AuxInt = int64ToAuxInt(c)
 11511  			v.AddArg(x)
 11512  			return true
 11513  		}
 11514  		break
 11515  	}
 11516  	// match: ( OR (SLWconst x [c]) (SRWconst x [d]))
 11517  	// cond: d == 32-c
 11518  	// result: (ROTLWconst [c] x)
 11519  	for {
 11520  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11521  			if v_0.Op != OpPPC64SLWconst {
 11522  				continue
 11523  			}
 11524  			c := auxIntToInt64(v_0.AuxInt)
 11525  			x := v_0.Args[0]
 11526  			if v_1.Op != OpPPC64SRWconst {
 11527  				continue
 11528  			}
 11529  			d := auxIntToInt64(v_1.AuxInt)
 11530  			if x != v_1.Args[0] || !(d == 32-c) {
 11531  				continue
 11532  			}
 11533  			v.reset(OpPPC64ROTLWconst)
 11534  			v.AuxInt = int64ToAuxInt(c)
 11535  			v.AddArg(x)
 11536  			return true
 11537  		}
 11538  		break
 11539  	}
 11540  	// match: ( OR (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
 11541  	// result: (ROTL x y)
 11542  	for {
 11543  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11544  			if v_0.Op != OpPPC64SLD {
 11545  				continue
 11546  			}
 11547  			_ = v_0.Args[1]
 11548  			x := v_0.Args[0]
 11549  			v_0_1 := v_0.Args[1]
 11550  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || auxIntToInt64(v_0_1.AuxInt) != 63 {
 11551  				continue
 11552  			}
 11553  			y := v_0_1.Args[0]
 11554  			if v_1.Op != OpPPC64SRD {
 11555  				continue
 11556  			}
 11557  			_ = v_1.Args[1]
 11558  			if x != v_1.Args[0] {
 11559  				continue
 11560  			}
 11561  			v_1_1 := v_1.Args[1]
 11562  			if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
 11563  				continue
 11564  			}
 11565  			_ = v_1_1.Args[1]
 11566  			v_1_1_0 := v_1_1.Args[0]
 11567  			if v_1_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_0.AuxInt) != 64 {
 11568  				continue
 11569  			}
 11570  			v_1_1_1 := v_1_1.Args[1]
 11571  			if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || auxIntToInt64(v_1_1_1.AuxInt) != 63 || y != v_1_1_1.Args[0] {
 11572  				continue
 11573  			}
 11574  			v.reset(OpPPC64ROTL)
 11575  			v.AddArg2(x, y)
 11576  			return true
 11577  		}
 11578  		break
 11579  	}
 11580  	// match: ( OR (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y))))
 11581  	// result: (ROTL x y)
 11582  	for {
 11583  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11584  			if v_0.Op != OpPPC64SLD {
 11585  				continue
 11586  			}
 11587  			_ = v_0.Args[1]
 11588  			x := v_0.Args[0]
 11589  			v_0_1 := v_0.Args[1]
 11590  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || auxIntToInt64(v_0_1.AuxInt) != 63 {
 11591  				continue
 11592  			}
 11593  			y := v_0_1.Args[0]
 11594  			if v_1.Op != OpPPC64SRD {
 11595  				continue
 11596  			}
 11597  			_ = v_1.Args[1]
 11598  			if x != v_1.Args[0] {
 11599  				continue
 11600  			}
 11601  			v_1_1 := v_1.Args[1]
 11602  			if v_1_1.Op != OpPPC64SUBFCconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 64 {
 11603  				continue
 11604  			}
 11605  			v_1_1_0 := v_1_1.Args[0]
 11606  			if v_1_1_0.Op != OpPPC64ANDconst || v_1_1_0.Type != typ.UInt || auxIntToInt64(v_1_1_0.AuxInt) != 63 || y != v_1_1_0.Args[0] {
 11607  				continue
 11608  			}
 11609  			v.reset(OpPPC64ROTL)
 11610  			v.AddArg2(x, y)
 11611  			return true
 11612  		}
 11613  		break
 11614  	}
 11615  	// match: ( OR (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y))))
 11616  	// result: (ROTLW x y)
 11617  	for {
 11618  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11619  			if v_0.Op != OpPPC64SLW {
 11620  				continue
 11621  			}
 11622  			_ = v_0.Args[1]
 11623  			x := v_0.Args[0]
 11624  			v_0_1 := v_0.Args[1]
 11625  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || auxIntToInt64(v_0_1.AuxInt) != 31 {
 11626  				continue
 11627  			}
 11628  			y := v_0_1.Args[0]
 11629  			if v_1.Op != OpPPC64SRW {
 11630  				continue
 11631  			}
 11632  			_ = v_1.Args[1]
 11633  			if x != v_1.Args[0] {
 11634  				continue
 11635  			}
 11636  			v_1_1 := v_1.Args[1]
 11637  			if v_1_1.Op != OpPPC64SUBFCconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 32 {
 11638  				continue
 11639  			}
 11640  			v_1_1_0 := v_1_1.Args[0]
 11641  			if v_1_1_0.Op != OpPPC64ANDconst || v_1_1_0.Type != typ.UInt || auxIntToInt64(v_1_1_0.AuxInt) != 31 || y != v_1_1_0.Args[0] {
 11642  				continue
 11643  			}
 11644  			v.reset(OpPPC64ROTLW)
 11645  			v.AddArg2(x, y)
 11646  			return true
 11647  		}
 11648  		break
 11649  	}
 11650  	// match: ( OR (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
 11651  	// result: (ROTLW x y)
 11652  	for {
 11653  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11654  			if v_0.Op != OpPPC64SLW {
 11655  				continue
 11656  			}
 11657  			_ = v_0.Args[1]
 11658  			x := v_0.Args[0]
 11659  			v_0_1 := v_0.Args[1]
 11660  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || auxIntToInt64(v_0_1.AuxInt) != 31 {
 11661  				continue
 11662  			}
 11663  			y := v_0_1.Args[0]
 11664  			if v_1.Op != OpPPC64SRW {
 11665  				continue
 11666  			}
 11667  			_ = v_1.Args[1]
 11668  			if x != v_1.Args[0] {
 11669  				continue
 11670  			}
 11671  			v_1_1 := v_1.Args[1]
 11672  			if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
 11673  				continue
 11674  			}
 11675  			_ = v_1_1.Args[1]
 11676  			v_1_1_0 := v_1_1.Args[0]
 11677  			if v_1_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_0.AuxInt) != 32 {
 11678  				continue
 11679  			}
 11680  			v_1_1_1 := v_1_1.Args[1]
 11681  			if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || auxIntToInt64(v_1_1_1.AuxInt) != 31 || y != v_1_1_1.Args[0] {
 11682  				continue
 11683  			}
 11684  			v.reset(OpPPC64ROTLW)
 11685  			v.AddArg2(x, y)
 11686  			return true
 11687  		}
 11688  		break
 11689  	}
 11690  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11691  	// result: (MOVDconst [c|d])
 11692  	for {
 11693  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11694  			if v_0.Op != OpPPC64MOVDconst {
 11695  				continue
 11696  			}
 11697  			c := auxIntToInt64(v_0.AuxInt)
 11698  			if v_1.Op != OpPPC64MOVDconst {
 11699  				continue
 11700  			}
 11701  			d := auxIntToInt64(v_1.AuxInt)
 11702  			v.reset(OpPPC64MOVDconst)
 11703  			v.AuxInt = int64ToAuxInt(c | d)
 11704  			return true
 11705  		}
 11706  		break
 11707  	}
 11708  	// match: (OR x (MOVDconst [c]))
 11709  	// cond: isU32Bit(c)
 11710  	// result: (ORconst [c] x)
 11711  	for {
 11712  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11713  			x := v_0
 11714  			if v_1.Op != OpPPC64MOVDconst {
 11715  				continue
 11716  			}
 11717  			c := auxIntToInt64(v_1.AuxInt)
 11718  			if !(isU32Bit(c)) {
 11719  				continue
 11720  			}
 11721  			v.reset(OpPPC64ORconst)
 11722  			v.AuxInt = int64ToAuxInt(c)
 11723  			v.AddArg(x)
 11724  			return true
 11725  		}
 11726  		break
 11727  	}
 11728  	// match: (OR <t> x0:(MOVBZload [i0] {s} p mem) o1:(SLWconst x1:(MOVBZload [i1] {s} p mem) [8]))
 11729  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)
 11730  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 11731  	for {
 11732  		t := v.Type
 11733  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11734  			x0 := v_0
 11735  			if x0.Op != OpPPC64MOVBZload {
 11736  				continue
 11737  			}
 11738  			i0 := auxIntToInt32(x0.AuxInt)
 11739  			s := auxToSym(x0.Aux)
 11740  			mem := x0.Args[1]
 11741  			p := x0.Args[0]
 11742  			o1 := v_1
 11743  			if o1.Op != OpPPC64SLWconst || auxIntToInt64(o1.AuxInt) != 8 {
 11744  				continue
 11745  			}
 11746  			x1 := o1.Args[0]
 11747  			if x1.Op != OpPPC64MOVBZload {
 11748  				continue
 11749  			}
 11750  			i1 := auxIntToInt32(x1.AuxInt)
 11751  			if auxToSym(x1.Aux) != s {
 11752  				continue
 11753  			}
 11754  			_ = x1.Args[1]
 11755  			if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)) {
 11756  				continue
 11757  			}
 11758  			b = mergePoint(b, x0, x1)
 11759  			v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
 11760  			v.copyOf(v0)
 11761  			v0.AuxInt = int32ToAuxInt(i0)
 11762  			v0.Aux = symToAux(s)
 11763  			v0.AddArg2(p, mem)
 11764  			return true
 11765  		}
 11766  		break
 11767  	}
 11768  	// match: (OR <t> x0:(MOVBZload [i0] {s} p mem) o1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [8]))
 11769  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)
 11770  	// result: @mergePoint(b,x0,x1) (MOVHZload <t> {s} [i0] p mem)
 11771  	for {
 11772  		t := v.Type
 11773  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11774  			x0 := v_0
 11775  			if x0.Op != OpPPC64MOVBZload {
 11776  				continue
 11777  			}
 11778  			i0 := auxIntToInt32(x0.AuxInt)
 11779  			s := auxToSym(x0.Aux)
 11780  			mem := x0.Args[1]
 11781  			p := x0.Args[0]
 11782  			o1 := v_1
 11783  			if o1.Op != OpPPC64SLDconst || auxIntToInt64(o1.AuxInt) != 8 {
 11784  				continue
 11785  			}
 11786  			x1 := o1.Args[0]
 11787  			if x1.Op != OpPPC64MOVBZload {
 11788  				continue
 11789  			}
 11790  			i1 := auxIntToInt32(x1.AuxInt)
 11791  			if auxToSym(x1.Aux) != s {
 11792  				continue
 11793  			}
 11794  			_ = x1.Args[1]
 11795  			if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)) {
 11796  				continue
 11797  			}
 11798  			b = mergePoint(b, x0, x1)
 11799  			v0 := b.NewValue0(x1.Pos, OpPPC64MOVHZload, t)
 11800  			v.copyOf(v0)
 11801  			v0.AuxInt = int32ToAuxInt(i0)
 11802  			v0.Aux = symToAux(s)
 11803  			v0.AddArg2(p, mem)
 11804  			return true
 11805  		}
 11806  		break
 11807  	}
 11808  	// match: (OR <t> x0:(MOVBZload [i1] {s} p mem) o1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [8]))
 11809  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)
 11810  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 11811  	for {
 11812  		t := v.Type
 11813  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11814  			x0 := v_0
 11815  			if x0.Op != OpPPC64MOVBZload {
 11816  				continue
 11817  			}
 11818  			i1 := auxIntToInt32(x0.AuxInt)
 11819  			s := auxToSym(x0.Aux)
 11820  			mem := x0.Args[1]
 11821  			p := x0.Args[0]
 11822  			o1 := v_1
 11823  			if o1.Op != OpPPC64SLWconst || auxIntToInt64(o1.AuxInt) != 8 {
 11824  				continue
 11825  			}
 11826  			x1 := o1.Args[0]
 11827  			if x1.Op != OpPPC64MOVBZload {
 11828  				continue
 11829  			}
 11830  			i0 := auxIntToInt32(x1.AuxInt)
 11831  			if auxToSym(x1.Aux) != s {
 11832  				continue
 11833  			}
 11834  			_ = x1.Args[1]
 11835  			if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)) {
 11836  				continue
 11837  			}
 11838  			b = mergePoint(b, x0, x1)
 11839  			v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 11840  			v.copyOf(v0)
 11841  			v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 11842  			v1.AuxInt = int32ToAuxInt(i0)
 11843  			v1.Aux = symToAux(s)
 11844  			v1.AddArg(p)
 11845  			v0.AddArg2(v1, mem)
 11846  			return true
 11847  		}
 11848  		break
 11849  	}
 11850  	// match: (OR <t> x0:(MOVBZload [i1] {s} p mem) o1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [8]))
 11851  	// cond: !config.BigEndian && i1 == i0+1 && x0.Uses ==1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)
 11852  	// result: @mergePoint(b,x0,x1) (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 11853  	for {
 11854  		t := v.Type
 11855  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11856  			x0 := v_0
 11857  			if x0.Op != OpPPC64MOVBZload {
 11858  				continue
 11859  			}
 11860  			i1 := auxIntToInt32(x0.AuxInt)
 11861  			s := auxToSym(x0.Aux)
 11862  			mem := x0.Args[1]
 11863  			p := x0.Args[0]
 11864  			o1 := v_1
 11865  			if o1.Op != OpPPC64SLDconst || auxIntToInt64(o1.AuxInt) != 8 {
 11866  				continue
 11867  			}
 11868  			x1 := o1.Args[0]
 11869  			if x1.Op != OpPPC64MOVBZload {
 11870  				continue
 11871  			}
 11872  			i0 := auxIntToInt32(x1.AuxInt)
 11873  			if auxToSym(x1.Aux) != s {
 11874  				continue
 11875  			}
 11876  			_ = x1.Args[1]
 11877  			if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && o1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, o1)) {
 11878  				continue
 11879  			}
 11880  			b = mergePoint(b, x0, x1)
 11881  			v0 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 11882  			v.copyOf(v0)
 11883  			v1 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 11884  			v1.AuxInt = int32ToAuxInt(i0)
 11885  			v1.Aux = symToAux(s)
 11886  			v1.AddArg(p)
 11887  			v0.AddArg2(v1, mem)
 11888  			return true
 11889  		}
 11890  		break
 11891  	}
 11892  	// match: (OR <t> s0:(SLWconst x0:(MOVBZload [i1] {s} p mem) [n1]) s1:(SLWconst x1:(MOVBZload [i0] {s} p mem) [n2]))
 11893  	// cond: !config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0, s1)
 11894  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 11895  	for {
 11896  		t := v.Type
 11897  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11898  			s0 := v_0
 11899  			if s0.Op != OpPPC64SLWconst {
 11900  				continue
 11901  			}
 11902  			n1 := auxIntToInt64(s0.AuxInt)
 11903  			x0 := s0.Args[0]
 11904  			if x0.Op != OpPPC64MOVBZload {
 11905  				continue
 11906  			}
 11907  			i1 := auxIntToInt32(x0.AuxInt)
 11908  			s := auxToSym(x0.Aux)
 11909  			mem := x0.Args[1]
 11910  			p := x0.Args[0]
 11911  			s1 := v_1
 11912  			if s1.Op != OpPPC64SLWconst {
 11913  				continue
 11914  			}
 11915  			n2 := auxIntToInt64(s1.AuxInt)
 11916  			x1 := s1.Args[0]
 11917  			if x1.Op != OpPPC64MOVBZload {
 11918  				continue
 11919  			}
 11920  			i0 := auxIntToInt32(x1.AuxInt)
 11921  			if auxToSym(x1.Aux) != s {
 11922  				continue
 11923  			}
 11924  			_ = x1.Args[1]
 11925  			if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0, s1)) {
 11926  				continue
 11927  			}
 11928  			b = mergePoint(b, x0, x1)
 11929  			v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
 11930  			v.copyOf(v0)
 11931  			v0.AuxInt = int64ToAuxInt(n1)
 11932  			v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 11933  			v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 11934  			v2.AuxInt = int32ToAuxInt(i0)
 11935  			v2.Aux = symToAux(s)
 11936  			v2.AddArg(p)
 11937  			v1.AddArg2(v2, mem)
 11938  			v0.AddArg(v1)
 11939  			return true
 11940  		}
 11941  		break
 11942  	}
 11943  	// match: (OR <t> s0:(SLDconst x0:(MOVBZload [i1] {s} p mem) [n1]) s1:(SLDconst x1:(MOVBZload [i0] {s} p mem) [n2]))
 11944  	// cond: !config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0, s1)
 11945  	// result: @mergePoint(b,x0,x1) (SLDconst <t> (MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [n1])
 11946  	for {
 11947  		t := v.Type
 11948  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11949  			s0 := v_0
 11950  			if s0.Op != OpPPC64SLDconst {
 11951  				continue
 11952  			}
 11953  			n1 := auxIntToInt64(s0.AuxInt)
 11954  			x0 := s0.Args[0]
 11955  			if x0.Op != OpPPC64MOVBZload {
 11956  				continue
 11957  			}
 11958  			i1 := auxIntToInt32(x0.AuxInt)
 11959  			s := auxToSym(x0.Aux)
 11960  			mem := x0.Args[1]
 11961  			p := x0.Args[0]
 11962  			s1 := v_1
 11963  			if s1.Op != OpPPC64SLDconst {
 11964  				continue
 11965  			}
 11966  			n2 := auxIntToInt64(s1.AuxInt)
 11967  			x1 := s1.Args[0]
 11968  			if x1.Op != OpPPC64MOVBZload {
 11969  				continue
 11970  			}
 11971  			i0 := auxIntToInt32(x1.AuxInt)
 11972  			if auxToSym(x1.Aux) != s {
 11973  				continue
 11974  			}
 11975  			_ = x1.Args[1]
 11976  			if p != x1.Args[0] || mem != x1.Args[1] || !(!config.BigEndian && i1 == i0+1 && n1%8 == 0 && n2 == n1+8 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0, s1)) {
 11977  				continue
 11978  			}
 11979  			b = mergePoint(b, x0, x1)
 11980  			v0 := b.NewValue0(x1.Pos, OpPPC64SLDconst, t)
 11981  			v.copyOf(v0)
 11982  			v0.AuxInt = int64ToAuxInt(n1)
 11983  			v1 := b.NewValue0(x1.Pos, OpPPC64MOVHBRload, t)
 11984  			v2 := b.NewValue0(x1.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 11985  			v2.AuxInt = int32ToAuxInt(i0)
 11986  			v2.Aux = symToAux(s)
 11987  			v2.AddArg(p)
 11988  			v1.AddArg2(v2, mem)
 11989  			v0.AddArg(v1)
 11990  			return true
 11991  		}
 11992  		break
 11993  	}
 11994  	// match: (OR <t> s1:(SLWconst x2:(MOVBZload [i3] {s} p mem) [24]) o0:(OR <t> s0:(SLWconst x1:(MOVBZload [i2] {s} p mem) [16]) x0:(MOVHZload [i0] {s} p mem)))
 11995  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses ==1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
 11996  	// result: @mergePoint(b,x0,x1,x2) (MOVWZload <t> {s} [i0] p mem)
 11997  	for {
 11998  		t := v.Type
 11999  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12000  			s1 := v_0
 12001  			if s1.Op != OpPPC64SLWconst || auxIntToInt64(s1.AuxInt) != 24 {
 12002  				continue
 12003  			}
 12004  			x2 := s1.Args[0]
 12005  			if x2.Op != OpPPC64MOVBZload {
 12006  				continue
 12007  			}
 12008  			i3 := auxIntToInt32(x2.AuxInt)
 12009  			s := auxToSym(x2.Aux)
 12010  			mem := x2.Args[1]
 12011  			p := x2.Args[0]
 12012  			o0 := v_1
 12013  			if o0.Op != OpPPC64OR || o0.Type != t {
 12014  				continue
 12015  			}
 12016  			_ = o0.Args[1]
 12017  			o0_0 := o0.Args[0]
 12018  			o0_1 := o0.Args[1]
 12019  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12020  				s0 := o0_0
 12021  				if s0.Op != OpPPC64SLWconst || auxIntToInt64(s0.AuxInt) != 16 {
 12022  					continue
 12023  				}
 12024  				x1 := s0.Args[0]
 12025  				if x1.Op != OpPPC64MOVBZload {
 12026  					continue
 12027  				}
 12028  				i2 := auxIntToInt32(x1.AuxInt)
 12029  				if auxToSym(x1.Aux) != s {
 12030  					continue
 12031  				}
 12032  				_ = x1.Args[1]
 12033  				if p != x1.Args[0] || mem != x1.Args[1] {
 12034  					continue
 12035  				}
 12036  				x0 := o0_1
 12037  				if x0.Op != OpPPC64MOVHZload {
 12038  					continue
 12039  				}
 12040  				i0 := auxIntToInt32(x0.AuxInt)
 12041  				if auxToSym(x0.Aux) != s {
 12042  					continue
 12043  				}
 12044  				_ = x0.Args[1]
 12045  				if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
 12046  					continue
 12047  				}
 12048  				b = mergePoint(b, x0, x1, x2)
 12049  				v0 := b.NewValue0(x0.Pos, OpPPC64MOVWZload, t)
 12050  				v.copyOf(v0)
 12051  				v0.AuxInt = int32ToAuxInt(i0)
 12052  				v0.Aux = symToAux(s)
 12053  				v0.AddArg2(p, mem)
 12054  				return true
 12055  			}
 12056  		}
 12057  		break
 12058  	}
 12059  	// match: (OR <t> s1:(SLDconst x2:(MOVBZload [i3] {s} p mem) [24]) o0:(OR <t> s0:(SLDconst x1:(MOVBZload [i2] {s} p mem) [16]) x0:(MOVHZload [i0] {s} p mem)))
 12060  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses ==1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
 12061  	// result: @mergePoint(b,x0,x1,x2) (MOVWZload <t> {s} [i0] p mem)
 12062  	for {
 12063  		t := v.Type
 12064  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12065  			s1 := v_0
 12066  			if s1.Op != OpPPC64SLDconst || auxIntToInt64(s1.AuxInt) != 24 {
 12067  				continue
 12068  			}
 12069  			x2 := s1.Args[0]
 12070  			if x2.Op != OpPPC64MOVBZload {
 12071  				continue
 12072  			}
 12073  			i3 := auxIntToInt32(x2.AuxInt)
 12074  			s := auxToSym(x2.Aux)
 12075  			mem := x2.Args[1]
 12076  			p := x2.Args[0]
 12077  			o0 := v_1
 12078  			if o0.Op != OpPPC64OR || o0.Type != t {
 12079  				continue
 12080  			}
 12081  			_ = o0.Args[1]
 12082  			o0_0 := o0.Args[0]
 12083  			o0_1 := o0.Args[1]
 12084  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12085  				s0 := o0_0
 12086  				if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 16 {
 12087  					continue
 12088  				}
 12089  				x1 := s0.Args[0]
 12090  				if x1.Op != OpPPC64MOVBZload {
 12091  					continue
 12092  				}
 12093  				i2 := auxIntToInt32(x1.AuxInt)
 12094  				if auxToSym(x1.Aux) != s {
 12095  					continue
 12096  				}
 12097  				_ = x1.Args[1]
 12098  				if p != x1.Args[0] || mem != x1.Args[1] {
 12099  					continue
 12100  				}
 12101  				x0 := o0_1
 12102  				if x0.Op != OpPPC64MOVHZload {
 12103  					continue
 12104  				}
 12105  				i0 := auxIntToInt32(x0.AuxInt)
 12106  				if auxToSym(x0.Aux) != s {
 12107  					continue
 12108  				}
 12109  				_ = x0.Args[1]
 12110  				if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
 12111  					continue
 12112  				}
 12113  				b = mergePoint(b, x0, x1, x2)
 12114  				v0 := b.NewValue0(x0.Pos, OpPPC64MOVWZload, t)
 12115  				v.copyOf(v0)
 12116  				v0.AuxInt = int32ToAuxInt(i0)
 12117  				v0.Aux = symToAux(s)
 12118  				v0.AddArg2(p, mem)
 12119  				return true
 12120  			}
 12121  		}
 12122  		break
 12123  	}
 12124  	// match: (OR <t> s1:(SLWconst x2:(MOVBZload [i0] {s} p mem) [24]) o0:(OR <t> s0:(SLWconst x1:(MOVBZload [i1] {s} p mem) [16]) x0:(MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i2] {s} p) mem)))
 12125  	// cond: !config.BigEndian && i1 == i0+1 && i2 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
 12126  	// result: @mergePoint(b,x0,x1,x2) (MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12127  	for {
 12128  		t := v.Type
 12129  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12130  			s1 := v_0
 12131  			if s1.Op != OpPPC64SLWconst || auxIntToInt64(s1.AuxInt) != 24 {
 12132  				continue
 12133  			}
 12134  			x2 := s1.Args[0]
 12135  			if x2.Op != OpPPC64MOVBZload {
 12136  				continue
 12137  			}
 12138  			i0 := auxIntToInt32(x2.AuxInt)
 12139  			s := auxToSym(x2.Aux)
 12140  			mem := x2.Args[1]
 12141  			p := x2.Args[0]
 12142  			o0 := v_1
 12143  			if o0.Op != OpPPC64OR || o0.Type != t {
 12144  				continue
 12145  			}
 12146  			_ = o0.Args[1]
 12147  			o0_0 := o0.Args[0]
 12148  			o0_1 := o0.Args[1]
 12149  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12150  				s0 := o0_0
 12151  				if s0.Op != OpPPC64SLWconst || auxIntToInt64(s0.AuxInt) != 16 {
 12152  					continue
 12153  				}
 12154  				x1 := s0.Args[0]
 12155  				if x1.Op != OpPPC64MOVBZload {
 12156  					continue
 12157  				}
 12158  				i1 := auxIntToInt32(x1.AuxInt)
 12159  				if auxToSym(x1.Aux) != s {
 12160  					continue
 12161  				}
 12162  				_ = x1.Args[1]
 12163  				if p != x1.Args[0] || mem != x1.Args[1] {
 12164  					continue
 12165  				}
 12166  				x0 := o0_1
 12167  				if x0.Op != OpPPC64MOVHBRload || x0.Type != t {
 12168  					continue
 12169  				}
 12170  				_ = x0.Args[1]
 12171  				x0_0 := x0.Args[0]
 12172  				if x0_0.Op != OpPPC64MOVDaddr || x0_0.Type != typ.Uintptr {
 12173  					continue
 12174  				}
 12175  				i2 := auxIntToInt32(x0_0.AuxInt)
 12176  				if auxToSym(x0_0.Aux) != s || p != x0_0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && i2 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
 12177  					continue
 12178  				}
 12179  				b = mergePoint(b, x0, x1, x2)
 12180  				v0 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
 12181  				v.copyOf(v0)
 12182  				v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12183  				v1.AuxInt = int32ToAuxInt(i0)
 12184  				v1.Aux = symToAux(s)
 12185  				v1.AddArg(p)
 12186  				v0.AddArg2(v1, mem)
 12187  				return true
 12188  			}
 12189  		}
 12190  		break
 12191  	}
 12192  	// match: (OR <t> s1:(SLDconst x2:(MOVBZload [i0] {s} p mem) [24]) o0:(OR <t> s0:(SLDconst x1:(MOVBZload [i1] {s} p mem) [16]) x0:(MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i2] {s} p) mem)))
 12193  	// cond: !config.BigEndian && i1 == i0+1 && i2 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
 12194  	// result: @mergePoint(b,x0,x1,x2) (MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12195  	for {
 12196  		t := v.Type
 12197  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12198  			s1 := v_0
 12199  			if s1.Op != OpPPC64SLDconst || auxIntToInt64(s1.AuxInt) != 24 {
 12200  				continue
 12201  			}
 12202  			x2 := s1.Args[0]
 12203  			if x2.Op != OpPPC64MOVBZload {
 12204  				continue
 12205  			}
 12206  			i0 := auxIntToInt32(x2.AuxInt)
 12207  			s := auxToSym(x2.Aux)
 12208  			mem := x2.Args[1]
 12209  			p := x2.Args[0]
 12210  			o0 := v_1
 12211  			if o0.Op != OpPPC64OR || o0.Type != t {
 12212  				continue
 12213  			}
 12214  			_ = o0.Args[1]
 12215  			o0_0 := o0.Args[0]
 12216  			o0_1 := o0.Args[1]
 12217  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12218  				s0 := o0_0
 12219  				if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 16 {
 12220  					continue
 12221  				}
 12222  				x1 := s0.Args[0]
 12223  				if x1.Op != OpPPC64MOVBZload {
 12224  					continue
 12225  				}
 12226  				i1 := auxIntToInt32(x1.AuxInt)
 12227  				if auxToSym(x1.Aux) != s {
 12228  					continue
 12229  				}
 12230  				_ = x1.Args[1]
 12231  				if p != x1.Args[0] || mem != x1.Args[1] {
 12232  					continue
 12233  				}
 12234  				x0 := o0_1
 12235  				if x0.Op != OpPPC64MOVHBRload || x0.Type != t {
 12236  					continue
 12237  				}
 12238  				_ = x0.Args[1]
 12239  				x0_0 := x0.Args[0]
 12240  				if x0_0.Op != OpPPC64MOVDaddr || x0_0.Type != typ.Uintptr {
 12241  					continue
 12242  				}
 12243  				i2 := auxIntToInt32(x0_0.AuxInt)
 12244  				if auxToSym(x0_0.Aux) != s || p != x0_0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && i2 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
 12245  					continue
 12246  				}
 12247  				b = mergePoint(b, x0, x1, x2)
 12248  				v0 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
 12249  				v.copyOf(v0)
 12250  				v1 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12251  				v1.AuxInt = int32ToAuxInt(i0)
 12252  				v1.Aux = symToAux(s)
 12253  				v1.AddArg(p)
 12254  				v0.AddArg2(v1, mem)
 12255  				return true
 12256  			}
 12257  		}
 12258  		break
 12259  	}
 12260  	// match: (OR <t> x0:(MOVBZload [i3] {s} p mem) o0:(OR <t> s0:(SLWconst x1:(MOVBZload [i2] {s} p mem) [8]) s1:(SLWconst x2:(MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [16])))
 12261  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
 12262  	// result: @mergePoint(b,x0,x1,x2) (MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12263  	for {
 12264  		t := v.Type
 12265  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12266  			x0 := v_0
 12267  			if x0.Op != OpPPC64MOVBZload {
 12268  				continue
 12269  			}
 12270  			i3 := auxIntToInt32(x0.AuxInt)
 12271  			s := auxToSym(x0.Aux)
 12272  			mem := x0.Args[1]
 12273  			p := x0.Args[0]
 12274  			o0 := v_1
 12275  			if o0.Op != OpPPC64OR || o0.Type != t {
 12276  				continue
 12277  			}
 12278  			_ = o0.Args[1]
 12279  			o0_0 := o0.Args[0]
 12280  			o0_1 := o0.Args[1]
 12281  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12282  				s0 := o0_0
 12283  				if s0.Op != OpPPC64SLWconst || auxIntToInt64(s0.AuxInt) != 8 {
 12284  					continue
 12285  				}
 12286  				x1 := s0.Args[0]
 12287  				if x1.Op != OpPPC64MOVBZload {
 12288  					continue
 12289  				}
 12290  				i2 := auxIntToInt32(x1.AuxInt)
 12291  				if auxToSym(x1.Aux) != s {
 12292  					continue
 12293  				}
 12294  				_ = x1.Args[1]
 12295  				if p != x1.Args[0] || mem != x1.Args[1] {
 12296  					continue
 12297  				}
 12298  				s1 := o0_1
 12299  				if s1.Op != OpPPC64SLWconst || auxIntToInt64(s1.AuxInt) != 16 {
 12300  					continue
 12301  				}
 12302  				x2 := s1.Args[0]
 12303  				if x2.Op != OpPPC64MOVHBRload || x2.Type != t {
 12304  					continue
 12305  				}
 12306  				_ = x2.Args[1]
 12307  				x2_0 := x2.Args[0]
 12308  				if x2_0.Op != OpPPC64MOVDaddr || x2_0.Type != typ.Uintptr {
 12309  					continue
 12310  				}
 12311  				i0 := auxIntToInt32(x2_0.AuxInt)
 12312  				if auxToSym(x2_0.Aux) != s || p != x2_0.Args[0] || mem != x2.Args[1] || !(!config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
 12313  					continue
 12314  				}
 12315  				b = mergePoint(b, x0, x1, x2)
 12316  				v0 := b.NewValue0(x2.Pos, OpPPC64MOVWBRload, t)
 12317  				v.copyOf(v0)
 12318  				v1 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12319  				v1.AuxInt = int32ToAuxInt(i0)
 12320  				v1.Aux = symToAux(s)
 12321  				v1.AddArg(p)
 12322  				v0.AddArg2(v1, mem)
 12323  				return true
 12324  			}
 12325  		}
 12326  		break
 12327  	}
 12328  	// match: (OR <t> x0:(MOVBZload [i3] {s} p mem) o0:(OR <t> s0:(SLDconst x1:(MOVBZload [i2] {s} p mem) [8]) s1:(SLDconst x2:(MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [16])))
 12329  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
 12330  	// result: @mergePoint(b,x0,x1,x2) (MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12331  	for {
 12332  		t := v.Type
 12333  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12334  			x0 := v_0
 12335  			if x0.Op != OpPPC64MOVBZload {
 12336  				continue
 12337  			}
 12338  			i3 := auxIntToInt32(x0.AuxInt)
 12339  			s := auxToSym(x0.Aux)
 12340  			mem := x0.Args[1]
 12341  			p := x0.Args[0]
 12342  			o0 := v_1
 12343  			if o0.Op != OpPPC64OR || o0.Type != t {
 12344  				continue
 12345  			}
 12346  			_ = o0.Args[1]
 12347  			o0_0 := o0.Args[0]
 12348  			o0_1 := o0.Args[1]
 12349  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12350  				s0 := o0_0
 12351  				if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 8 {
 12352  					continue
 12353  				}
 12354  				x1 := s0.Args[0]
 12355  				if x1.Op != OpPPC64MOVBZload {
 12356  					continue
 12357  				}
 12358  				i2 := auxIntToInt32(x1.AuxInt)
 12359  				if auxToSym(x1.Aux) != s {
 12360  					continue
 12361  				}
 12362  				_ = x1.Args[1]
 12363  				if p != x1.Args[0] || mem != x1.Args[1] {
 12364  					continue
 12365  				}
 12366  				s1 := o0_1
 12367  				if s1.Op != OpPPC64SLDconst || auxIntToInt64(s1.AuxInt) != 16 {
 12368  					continue
 12369  				}
 12370  				x2 := s1.Args[0]
 12371  				if x2.Op != OpPPC64MOVHBRload || x2.Type != t {
 12372  					continue
 12373  				}
 12374  				_ = x2.Args[1]
 12375  				x2_0 := x2.Args[0]
 12376  				if x2_0.Op != OpPPC64MOVDaddr || x2_0.Type != typ.Uintptr {
 12377  					continue
 12378  				}
 12379  				i0 := auxIntToInt32(x2_0.AuxInt)
 12380  				if auxToSym(x2_0.Aux) != s || p != x2_0.Args[0] || mem != x2.Args[1] || !(!config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
 12381  					continue
 12382  				}
 12383  				b = mergePoint(b, x0, x1, x2)
 12384  				v0 := b.NewValue0(x2.Pos, OpPPC64MOVWBRload, t)
 12385  				v.copyOf(v0)
 12386  				v1 := b.NewValue0(x2.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12387  				v1.AuxInt = int32ToAuxInt(i0)
 12388  				v1.Aux = symToAux(s)
 12389  				v1.AddArg(p)
 12390  				v0.AddArg2(v1, mem)
 12391  				return true
 12392  			}
 12393  		}
 12394  		break
 12395  	}
 12396  	// match: (OR <t> s2:(SLDconst x2:(MOVBZload [i3] {s} p mem) [32]) o0:(OR <t> s1:(SLDconst x1:(MOVBZload [i2] {s} p mem) [40]) s0:(SLDconst x0:(MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [48])))
 12397  	// cond: !config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, s2, o0)
 12398  	// result: @mergePoint(b,x0,x1,x2) (SLDconst <t> (MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [32])
 12399  	for {
 12400  		t := v.Type
 12401  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12402  			s2 := v_0
 12403  			if s2.Op != OpPPC64SLDconst || auxIntToInt64(s2.AuxInt) != 32 {
 12404  				continue
 12405  			}
 12406  			x2 := s2.Args[0]
 12407  			if x2.Op != OpPPC64MOVBZload {
 12408  				continue
 12409  			}
 12410  			i3 := auxIntToInt32(x2.AuxInt)
 12411  			s := auxToSym(x2.Aux)
 12412  			mem := x2.Args[1]
 12413  			p := x2.Args[0]
 12414  			o0 := v_1
 12415  			if o0.Op != OpPPC64OR || o0.Type != t {
 12416  				continue
 12417  			}
 12418  			_ = o0.Args[1]
 12419  			o0_0 := o0.Args[0]
 12420  			o0_1 := o0.Args[1]
 12421  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12422  				s1 := o0_0
 12423  				if s1.Op != OpPPC64SLDconst || auxIntToInt64(s1.AuxInt) != 40 {
 12424  					continue
 12425  				}
 12426  				x1 := s1.Args[0]
 12427  				if x1.Op != OpPPC64MOVBZload {
 12428  					continue
 12429  				}
 12430  				i2 := auxIntToInt32(x1.AuxInt)
 12431  				if auxToSym(x1.Aux) != s {
 12432  					continue
 12433  				}
 12434  				_ = x1.Args[1]
 12435  				if p != x1.Args[0] || mem != x1.Args[1] {
 12436  					continue
 12437  				}
 12438  				s0 := o0_1
 12439  				if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 48 {
 12440  					continue
 12441  				}
 12442  				x0 := s0.Args[0]
 12443  				if x0.Op != OpPPC64MOVHBRload || x0.Type != t {
 12444  					continue
 12445  				}
 12446  				_ = x0.Args[1]
 12447  				x0_0 := x0.Args[0]
 12448  				if x0_0.Op != OpPPC64MOVDaddr || x0_0.Type != typ.Uintptr {
 12449  					continue
 12450  				}
 12451  				i0 := auxIntToInt32(x0_0.AuxInt)
 12452  				if auxToSym(x0_0.Aux) != s || p != x0_0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, s2, o0)) {
 12453  					continue
 12454  				}
 12455  				b = mergePoint(b, x0, x1, x2)
 12456  				v0 := b.NewValue0(x0.Pos, OpPPC64SLDconst, t)
 12457  				v.copyOf(v0)
 12458  				v0.AuxInt = int64ToAuxInt(32)
 12459  				v1 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
 12460  				v2 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12461  				v2.AuxInt = int32ToAuxInt(i0)
 12462  				v2.Aux = symToAux(s)
 12463  				v2.AddArg(p)
 12464  				v1.AddArg2(v2, mem)
 12465  				v0.AddArg(v1)
 12466  				return true
 12467  			}
 12468  		}
 12469  		break
 12470  	}
 12471  	// match: (OR <t> s2:(SLDconst x2:(MOVBZload [i0] {s} p mem) [56]) o0:(OR <t> s1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [48]) s0:(SLDconst x0:(MOVHBRload <t> (MOVDaddr <typ.Uintptr> [i2] {s} p) mem) [32])))
 12472  	// cond: !config.BigEndian && i1 == i0+1 && i2 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, s2, o0)
 12473  	// result: @mergePoint(b,x0,x1,x2) (SLDconst <t> (MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [32])
 12474  	for {
 12475  		t := v.Type
 12476  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12477  			s2 := v_0
 12478  			if s2.Op != OpPPC64SLDconst || auxIntToInt64(s2.AuxInt) != 56 {
 12479  				continue
 12480  			}
 12481  			x2 := s2.Args[0]
 12482  			if x2.Op != OpPPC64MOVBZload {
 12483  				continue
 12484  			}
 12485  			i0 := auxIntToInt32(x2.AuxInt)
 12486  			s := auxToSym(x2.Aux)
 12487  			mem := x2.Args[1]
 12488  			p := x2.Args[0]
 12489  			o0 := v_1
 12490  			if o0.Op != OpPPC64OR || o0.Type != t {
 12491  				continue
 12492  			}
 12493  			_ = o0.Args[1]
 12494  			o0_0 := o0.Args[0]
 12495  			o0_1 := o0.Args[1]
 12496  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12497  				s1 := o0_0
 12498  				if s1.Op != OpPPC64SLDconst || auxIntToInt64(s1.AuxInt) != 48 {
 12499  					continue
 12500  				}
 12501  				x1 := s1.Args[0]
 12502  				if x1.Op != OpPPC64MOVBZload {
 12503  					continue
 12504  				}
 12505  				i1 := auxIntToInt32(x1.AuxInt)
 12506  				if auxToSym(x1.Aux) != s {
 12507  					continue
 12508  				}
 12509  				_ = x1.Args[1]
 12510  				if p != x1.Args[0] || mem != x1.Args[1] {
 12511  					continue
 12512  				}
 12513  				s0 := o0_1
 12514  				if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 32 {
 12515  					continue
 12516  				}
 12517  				x0 := s0.Args[0]
 12518  				if x0.Op != OpPPC64MOVHBRload || x0.Type != t {
 12519  					continue
 12520  				}
 12521  				_ = x0.Args[1]
 12522  				x0_0 := x0.Args[0]
 12523  				if x0_0.Op != OpPPC64MOVDaddr || x0_0.Type != typ.Uintptr {
 12524  					continue
 12525  				}
 12526  				i2 := auxIntToInt32(x0_0.AuxInt)
 12527  				if auxToSym(x0_0.Aux) != s || p != x0_0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i1 == i0+1 && i2 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && o0.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, s2, o0)) {
 12528  					continue
 12529  				}
 12530  				b = mergePoint(b, x0, x1, x2)
 12531  				v0 := b.NewValue0(x0.Pos, OpPPC64SLDconst, t)
 12532  				v.copyOf(v0)
 12533  				v0.AuxInt = int64ToAuxInt(32)
 12534  				v1 := b.NewValue0(x0.Pos, OpPPC64MOVWBRload, t)
 12535  				v2 := b.NewValue0(x0.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12536  				v2.AuxInt = int32ToAuxInt(i0)
 12537  				v2.Aux = symToAux(s)
 12538  				v2.AddArg(p)
 12539  				v1.AddArg2(v2, mem)
 12540  				v0.AddArg(v1)
 12541  				return true
 12542  			}
 12543  		}
 12544  		break
 12545  	}
 12546  	// match: (OR <t> s6:(SLDconst x7:(MOVBZload [i7] {s} p mem) [56]) o5:(OR <t> s5:(SLDconst x6:(MOVBZload [i6] {s} p mem) [48]) o4:(OR <t> s4:(SLDconst x5:(MOVBZload [i5] {s} p mem) [40]) o3:(OR <t> s3:(SLDconst x4:(MOVBZload [i4] {s} p mem) [32]) x0:(MOVWZload {s} [i0] p mem)))))
 12547  	// cond: !config.BigEndian && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && x0.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses ==1 && x7.Uses == 1 && o3.Uses == 1 && o4.Uses == 1 && o5.Uses == 1 && s3.Uses == 1 && s4.Uses == 1 && s5.Uses == 1 && s6.Uses == 1 && mergePoint(b, x0, x4, x5, x6, x7) != nil && clobber(x0, x4, x5, x6, x7, s3, s4, s5, s6, o3, o4, o5)
 12548  	// result: @mergePoint(b,x0,x4,x5,x6,x7) (MOVDload <t> {s} [i0] p mem)
 12549  	for {
 12550  		t := v.Type
 12551  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12552  			s6 := v_0
 12553  			if s6.Op != OpPPC64SLDconst || auxIntToInt64(s6.AuxInt) != 56 {
 12554  				continue
 12555  			}
 12556  			x7 := s6.Args[0]
 12557  			if x7.Op != OpPPC64MOVBZload {
 12558  				continue
 12559  			}
 12560  			i7 := auxIntToInt32(x7.AuxInt)
 12561  			s := auxToSym(x7.Aux)
 12562  			mem := x7.Args[1]
 12563  			p := x7.Args[0]
 12564  			o5 := v_1
 12565  			if o5.Op != OpPPC64OR || o5.Type != t {
 12566  				continue
 12567  			}
 12568  			_ = o5.Args[1]
 12569  			o5_0 := o5.Args[0]
 12570  			o5_1 := o5.Args[1]
 12571  			for _i1 := 0; _i1 <= 1; _i1, o5_0, o5_1 = _i1+1, o5_1, o5_0 {
 12572  				s5 := o5_0
 12573  				if s5.Op != OpPPC64SLDconst || auxIntToInt64(s5.AuxInt) != 48 {
 12574  					continue
 12575  				}
 12576  				x6 := s5.Args[0]
 12577  				if x6.Op != OpPPC64MOVBZload {
 12578  					continue
 12579  				}
 12580  				i6 := auxIntToInt32(x6.AuxInt)
 12581  				if auxToSym(x6.Aux) != s {
 12582  					continue
 12583  				}
 12584  				_ = x6.Args[1]
 12585  				if p != x6.Args[0] || mem != x6.Args[1] {
 12586  					continue
 12587  				}
 12588  				o4 := o5_1
 12589  				if o4.Op != OpPPC64OR || o4.Type != t {
 12590  					continue
 12591  				}
 12592  				_ = o4.Args[1]
 12593  				o4_0 := o4.Args[0]
 12594  				o4_1 := o4.Args[1]
 12595  				for _i2 := 0; _i2 <= 1; _i2, o4_0, o4_1 = _i2+1, o4_1, o4_0 {
 12596  					s4 := o4_0
 12597  					if s4.Op != OpPPC64SLDconst || auxIntToInt64(s4.AuxInt) != 40 {
 12598  						continue
 12599  					}
 12600  					x5 := s4.Args[0]
 12601  					if x5.Op != OpPPC64MOVBZload {
 12602  						continue
 12603  					}
 12604  					i5 := auxIntToInt32(x5.AuxInt)
 12605  					if auxToSym(x5.Aux) != s {
 12606  						continue
 12607  					}
 12608  					_ = x5.Args[1]
 12609  					if p != x5.Args[0] || mem != x5.Args[1] {
 12610  						continue
 12611  					}
 12612  					o3 := o4_1
 12613  					if o3.Op != OpPPC64OR || o3.Type != t {
 12614  						continue
 12615  					}
 12616  					_ = o3.Args[1]
 12617  					o3_0 := o3.Args[0]
 12618  					o3_1 := o3.Args[1]
 12619  					for _i3 := 0; _i3 <= 1; _i3, o3_0, o3_1 = _i3+1, o3_1, o3_0 {
 12620  						s3 := o3_0
 12621  						if s3.Op != OpPPC64SLDconst || auxIntToInt64(s3.AuxInt) != 32 {
 12622  							continue
 12623  						}
 12624  						x4 := s3.Args[0]
 12625  						if x4.Op != OpPPC64MOVBZload {
 12626  							continue
 12627  						}
 12628  						i4 := auxIntToInt32(x4.AuxInt)
 12629  						if auxToSym(x4.Aux) != s {
 12630  							continue
 12631  						}
 12632  						_ = x4.Args[1]
 12633  						if p != x4.Args[0] || mem != x4.Args[1] {
 12634  							continue
 12635  						}
 12636  						x0 := o3_1
 12637  						if x0.Op != OpPPC64MOVWZload {
 12638  							continue
 12639  						}
 12640  						i0 := auxIntToInt32(x0.AuxInt)
 12641  						if auxToSym(x0.Aux) != s {
 12642  							continue
 12643  						}
 12644  						_ = x0.Args[1]
 12645  						if p != x0.Args[0] || mem != x0.Args[1] || !(!config.BigEndian && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && x0.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && x7.Uses == 1 && o3.Uses == 1 && o4.Uses == 1 && o5.Uses == 1 && s3.Uses == 1 && s4.Uses == 1 && s5.Uses == 1 && s6.Uses == 1 && mergePoint(b, x0, x4, x5, x6, x7) != nil && clobber(x0, x4, x5, x6, x7, s3, s4, s5, s6, o3, o4, o5)) {
 12646  							continue
 12647  						}
 12648  						b = mergePoint(b, x0, x4, x5, x6, x7)
 12649  						v0 := b.NewValue0(x0.Pos, OpPPC64MOVDload, t)
 12650  						v.copyOf(v0)
 12651  						v0.AuxInt = int32ToAuxInt(i0)
 12652  						v0.Aux = symToAux(s)
 12653  						v0.AddArg2(p, mem)
 12654  						return true
 12655  					}
 12656  				}
 12657  			}
 12658  		}
 12659  		break
 12660  	}
 12661  	// match: (OR <t> s0:(SLDconst x0:(MOVBZload [i0] {s} p mem) [56]) o0:(OR <t> s1:(SLDconst x1:(MOVBZload [i1] {s} p mem) [48]) o1:(OR <t> s2:(SLDconst x2:(MOVBZload [i2] {s} p mem) [40]) o2:(OR <t> s3:(SLDconst x3:(MOVBZload [i3] {s} p mem) [32]) x4:(MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i4] p) mem)))))
 12662  	// cond: !config.BigEndian && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && i4 == i0+4 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && x4.Uses == 1 && o0.Uses == 1 && o1.Uses == 1 && o2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && mergePoint(b, x0, x1, x2, x3, x4) != nil && clobber(x0, x1, x2, x3, x4, o0, o1, o2, s0, s1, s2, s3)
 12663  	// result: @mergePoint(b,x0,x1,x2,x3,x4) (MOVDBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12664  	for {
 12665  		t := v.Type
 12666  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12667  			s0 := v_0
 12668  			if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 56 {
 12669  				continue
 12670  			}
 12671  			x0 := s0.Args[0]
 12672  			if x0.Op != OpPPC64MOVBZload {
 12673  				continue
 12674  			}
 12675  			i0 := auxIntToInt32(x0.AuxInt)
 12676  			s := auxToSym(x0.Aux)
 12677  			mem := x0.Args[1]
 12678  			p := x0.Args[0]
 12679  			o0 := v_1
 12680  			if o0.Op != OpPPC64OR || o0.Type != t {
 12681  				continue
 12682  			}
 12683  			_ = o0.Args[1]
 12684  			o0_0 := o0.Args[0]
 12685  			o0_1 := o0.Args[1]
 12686  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
 12687  				s1 := o0_0
 12688  				if s1.Op != OpPPC64SLDconst || auxIntToInt64(s1.AuxInt) != 48 {
 12689  					continue
 12690  				}
 12691  				x1 := s1.Args[0]
 12692  				if x1.Op != OpPPC64MOVBZload {
 12693  					continue
 12694  				}
 12695  				i1 := auxIntToInt32(x1.AuxInt)
 12696  				if auxToSym(x1.Aux) != s {
 12697  					continue
 12698  				}
 12699  				_ = x1.Args[1]
 12700  				if p != x1.Args[0] || mem != x1.Args[1] {
 12701  					continue
 12702  				}
 12703  				o1 := o0_1
 12704  				if o1.Op != OpPPC64OR || o1.Type != t {
 12705  					continue
 12706  				}
 12707  				_ = o1.Args[1]
 12708  				o1_0 := o1.Args[0]
 12709  				o1_1 := o1.Args[1]
 12710  				for _i2 := 0; _i2 <= 1; _i2, o1_0, o1_1 = _i2+1, o1_1, o1_0 {
 12711  					s2 := o1_0
 12712  					if s2.Op != OpPPC64SLDconst || auxIntToInt64(s2.AuxInt) != 40 {
 12713  						continue
 12714  					}
 12715  					x2 := s2.Args[0]
 12716  					if x2.Op != OpPPC64MOVBZload {
 12717  						continue
 12718  					}
 12719  					i2 := auxIntToInt32(x2.AuxInt)
 12720  					if auxToSym(x2.Aux) != s {
 12721  						continue
 12722  					}
 12723  					_ = x2.Args[1]
 12724  					if p != x2.Args[0] || mem != x2.Args[1] {
 12725  						continue
 12726  					}
 12727  					o2 := o1_1
 12728  					if o2.Op != OpPPC64OR || o2.Type != t {
 12729  						continue
 12730  					}
 12731  					_ = o2.Args[1]
 12732  					o2_0 := o2.Args[0]
 12733  					o2_1 := o2.Args[1]
 12734  					for _i3 := 0; _i3 <= 1; _i3, o2_0, o2_1 = _i3+1, o2_1, o2_0 {
 12735  						s3 := o2_0
 12736  						if s3.Op != OpPPC64SLDconst || auxIntToInt64(s3.AuxInt) != 32 {
 12737  							continue
 12738  						}
 12739  						x3 := s3.Args[0]
 12740  						if x3.Op != OpPPC64MOVBZload {
 12741  							continue
 12742  						}
 12743  						i3 := auxIntToInt32(x3.AuxInt)
 12744  						if auxToSym(x3.Aux) != s {
 12745  							continue
 12746  						}
 12747  						_ = x3.Args[1]
 12748  						if p != x3.Args[0] || mem != x3.Args[1] {
 12749  							continue
 12750  						}
 12751  						x4 := o2_1
 12752  						if x4.Op != OpPPC64MOVWBRload || x4.Type != t {
 12753  							continue
 12754  						}
 12755  						_ = x4.Args[1]
 12756  						x4_0 := x4.Args[0]
 12757  						if x4_0.Op != OpPPC64MOVDaddr || x4_0.Type != typ.Uintptr {
 12758  							continue
 12759  						}
 12760  						i4 := auxIntToInt32(x4_0.AuxInt)
 12761  						if p != x4_0.Args[0] || mem != x4.Args[1] || !(!config.BigEndian && i1 == i0+1 && i2 == i0+2 && i3 == i0+3 && i4 == i0+4 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && x4.Uses == 1 && o0.Uses == 1 && o1.Uses == 1 && o2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && mergePoint(b, x0, x1, x2, x3, x4) != nil && clobber(x0, x1, x2, x3, x4, o0, o1, o2, s0, s1, s2, s3)) {
 12762  							continue
 12763  						}
 12764  						b = mergePoint(b, x0, x1, x2, x3, x4)
 12765  						v0 := b.NewValue0(x4.Pos, OpPPC64MOVDBRload, t)
 12766  						v.copyOf(v0)
 12767  						v1 := b.NewValue0(x4.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12768  						v1.AuxInt = int32ToAuxInt(i0)
 12769  						v1.Aux = symToAux(s)
 12770  						v1.AddArg(p)
 12771  						v0.AddArg2(v1, mem)
 12772  						return true
 12773  					}
 12774  				}
 12775  			}
 12776  		}
 12777  		break
 12778  	}
 12779  	// match: (OR <t> x7:(MOVBZload [i7] {s} p mem) o5:(OR <t> s6:(SLDconst x6:(MOVBZload [i6] {s} p mem) [8]) o4:(OR <t> s5:(SLDconst x5:(MOVBZload [i5] {s} p mem) [16]) o3:(OR <t> s4:(SLDconst x4:(MOVBZload [i4] {s} p mem) [24]) s0:(SLWconst x3:(MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [32])))))
 12780  	// cond: !config.BigEndian && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && x7.Uses == 1 && o3.Uses == 1 && o4.Uses == 1 && o5.Uses == 1 && s0.Uses == 1 && s4.Uses == 1 && s5.Uses == 1 && s6.Uses == 1 && mergePoint(b, x3, x4, x5, x6, x7) != nil && clobber(x3, x4, x5, x6, x7, o3, o4, o5, s0, s4, s5, s6)
 12781  	// result: @mergePoint(b,x3,x4,x5,x6,x7) (MOVDBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12782  	for {
 12783  		t := v.Type
 12784  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12785  			x7 := v_0
 12786  			if x7.Op != OpPPC64MOVBZload {
 12787  				continue
 12788  			}
 12789  			i7 := auxIntToInt32(x7.AuxInt)
 12790  			s := auxToSym(x7.Aux)
 12791  			mem := x7.Args[1]
 12792  			p := x7.Args[0]
 12793  			o5 := v_1
 12794  			if o5.Op != OpPPC64OR || o5.Type != t {
 12795  				continue
 12796  			}
 12797  			_ = o5.Args[1]
 12798  			o5_0 := o5.Args[0]
 12799  			o5_1 := o5.Args[1]
 12800  			for _i1 := 0; _i1 <= 1; _i1, o5_0, o5_1 = _i1+1, o5_1, o5_0 {
 12801  				s6 := o5_0
 12802  				if s6.Op != OpPPC64SLDconst || auxIntToInt64(s6.AuxInt) != 8 {
 12803  					continue
 12804  				}
 12805  				x6 := s6.Args[0]
 12806  				if x6.Op != OpPPC64MOVBZload {
 12807  					continue
 12808  				}
 12809  				i6 := auxIntToInt32(x6.AuxInt)
 12810  				if auxToSym(x6.Aux) != s {
 12811  					continue
 12812  				}
 12813  				_ = x6.Args[1]
 12814  				if p != x6.Args[0] || mem != x6.Args[1] {
 12815  					continue
 12816  				}
 12817  				o4 := o5_1
 12818  				if o4.Op != OpPPC64OR || o4.Type != t {
 12819  					continue
 12820  				}
 12821  				_ = o4.Args[1]
 12822  				o4_0 := o4.Args[0]
 12823  				o4_1 := o4.Args[1]
 12824  				for _i2 := 0; _i2 <= 1; _i2, o4_0, o4_1 = _i2+1, o4_1, o4_0 {
 12825  					s5 := o4_0
 12826  					if s5.Op != OpPPC64SLDconst || auxIntToInt64(s5.AuxInt) != 16 {
 12827  						continue
 12828  					}
 12829  					x5 := s5.Args[0]
 12830  					if x5.Op != OpPPC64MOVBZload {
 12831  						continue
 12832  					}
 12833  					i5 := auxIntToInt32(x5.AuxInt)
 12834  					if auxToSym(x5.Aux) != s {
 12835  						continue
 12836  					}
 12837  					_ = x5.Args[1]
 12838  					if p != x5.Args[0] || mem != x5.Args[1] {
 12839  						continue
 12840  					}
 12841  					o3 := o4_1
 12842  					if o3.Op != OpPPC64OR || o3.Type != t {
 12843  						continue
 12844  					}
 12845  					_ = o3.Args[1]
 12846  					o3_0 := o3.Args[0]
 12847  					o3_1 := o3.Args[1]
 12848  					for _i3 := 0; _i3 <= 1; _i3, o3_0, o3_1 = _i3+1, o3_1, o3_0 {
 12849  						s4 := o3_0
 12850  						if s4.Op != OpPPC64SLDconst || auxIntToInt64(s4.AuxInt) != 24 {
 12851  							continue
 12852  						}
 12853  						x4 := s4.Args[0]
 12854  						if x4.Op != OpPPC64MOVBZload {
 12855  							continue
 12856  						}
 12857  						i4 := auxIntToInt32(x4.AuxInt)
 12858  						if auxToSym(x4.Aux) != s {
 12859  							continue
 12860  						}
 12861  						_ = x4.Args[1]
 12862  						if p != x4.Args[0] || mem != x4.Args[1] {
 12863  							continue
 12864  						}
 12865  						s0 := o3_1
 12866  						if s0.Op != OpPPC64SLWconst || auxIntToInt64(s0.AuxInt) != 32 {
 12867  							continue
 12868  						}
 12869  						x3 := s0.Args[0]
 12870  						if x3.Op != OpPPC64MOVWBRload || x3.Type != t {
 12871  							continue
 12872  						}
 12873  						_ = x3.Args[1]
 12874  						x3_0 := x3.Args[0]
 12875  						if x3_0.Op != OpPPC64MOVDaddr || x3_0.Type != typ.Uintptr {
 12876  							continue
 12877  						}
 12878  						i0 := auxIntToInt32(x3_0.AuxInt)
 12879  						if auxToSym(x3_0.Aux) != s || p != x3_0.Args[0] || mem != x3.Args[1] || !(!config.BigEndian && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && x7.Uses == 1 && o3.Uses == 1 && o4.Uses == 1 && o5.Uses == 1 && s0.Uses == 1 && s4.Uses == 1 && s5.Uses == 1 && s6.Uses == 1 && mergePoint(b, x3, x4, x5, x6, x7) != nil && clobber(x3, x4, x5, x6, x7, o3, o4, o5, s0, s4, s5, s6)) {
 12880  							continue
 12881  						}
 12882  						b = mergePoint(b, x3, x4, x5, x6, x7)
 12883  						v0 := b.NewValue0(x3.Pos, OpPPC64MOVDBRload, t)
 12884  						v.copyOf(v0)
 12885  						v1 := b.NewValue0(x3.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 12886  						v1.AuxInt = int32ToAuxInt(i0)
 12887  						v1.Aux = symToAux(s)
 12888  						v1.AddArg(p)
 12889  						v0.AddArg2(v1, mem)
 12890  						return true
 12891  					}
 12892  				}
 12893  			}
 12894  		}
 12895  		break
 12896  	}
 12897  	// match: (OR <t> x7:(MOVBZload [i7] {s} p mem) o5:(OR <t> s6:(SLDconst x6:(MOVBZload [i6] {s} p mem) [8]) o4:(OR <t> s5:(SLDconst x5:(MOVBZload [i5] {s} p mem) [16]) o3:(OR <t> s4:(SLDconst x4:(MOVBZload [i4] {s} p mem) [24]) s0:(SLDconst x3:(MOVWBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem) [32])))))
 12898  	// cond: !config.BigEndian && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && x7.Uses == 1 && o3.Uses == 1 && o4.Uses == 1 && o5.Uses == 1 && s0.Uses == 1 && s4.Uses == 1 && s5.Uses == 1 && s6.Uses == 1 && mergePoint(b, x3, x4, x5, x6, x7) != nil && clobber(x3, x4, x5, x6, x7, o3, o4, o5, s0, s4, s5, s6)
 12899  	// result: @mergePoint(b,x3,x4,x5,x6,x7) (MOVDBRload <t> (MOVDaddr <typ.Uintptr> [i0] {s} p) mem)
 12900  	for {
 12901  		t := v.Type
 12902  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12903  			x7 := v_0
 12904  			if x7.Op != OpPPC64MOVBZload {
 12905  				continue
 12906  			}
 12907  			i7 := auxIntToInt32(x7.AuxInt)
 12908  			s := auxToSym(x7.Aux)
 12909  			mem := x7.Args[1]
 12910  			p := x7.Args[0]
 12911  			o5 := v_1
 12912  			if o5.Op != OpPPC64OR || o5.Type != t {
 12913  				continue
 12914  			}
 12915  			_ = o5.Args[1]
 12916  			o5_0 := o5.Args[0]
 12917  			o5_1 := o5.Args[1]
 12918  			for _i1 := 0; _i1 <= 1; _i1, o5_0, o5_1 = _i1+1, o5_1, o5_0 {
 12919  				s6 := o5_0
 12920  				if s6.Op != OpPPC64SLDconst || auxIntToInt64(s6.AuxInt) != 8 {
 12921  					continue
 12922  				}
 12923  				x6 := s6.Args[0]
 12924  				if x6.Op != OpPPC64MOVBZload {
 12925  					continue
 12926  				}
 12927  				i6 := auxIntToInt32(x6.AuxInt)
 12928  				if auxToSym(x6.Aux) != s {
 12929  					continue
 12930  				}
 12931  				_ = x6.Args[1]
 12932  				if p != x6.Args[0] || mem != x6.Args[1] {
 12933  					continue
 12934  				}
 12935  				o4 := o5_1
 12936  				if o4.Op != OpPPC64OR || o4.Type != t {
 12937  					continue
 12938  				}
 12939  				_ = o4.Args[1]
 12940  				o4_0 := o4.Args[0]
 12941  				o4_1 := o4.Args[1]
 12942  				for _i2 := 0; _i2 <= 1; _i2, o4_0, o4_1 = _i2+1, o4_1, o4_0 {
 12943  					s5 := o4_0
 12944  					if s5.Op != OpPPC64SLDconst || auxIntToInt64(s5.AuxInt) != 16 {
 12945  						continue
 12946  					}
 12947  					x5 := s5.Args[0]
 12948  					if x5.Op != OpPPC64MOVBZload {
 12949  						continue
 12950  					}
 12951  					i5 := auxIntToInt32(x5.AuxInt)
 12952  					if auxToSym(x5.Aux) != s {
 12953  						continue
 12954  					}
 12955  					_ = x5.Args[1]
 12956  					if p != x5.Args[0] || mem != x5.Args[1] {
 12957  						continue
 12958  					}
 12959  					o3 := o4_1
 12960  					if o3.Op != OpPPC64OR || o3.Type != t {
 12961  						continue
 12962  					}
 12963  					_ = o3.Args[1]
 12964  					o3_0 := o3.Args[0]
 12965  					o3_1 := o3.Args[1]
 12966  					for _i3 := 0; _i3 <= 1; _i3, o3_0, o3_1 = _i3+1, o3_1, o3_0 {
 12967  						s4 := o3_0
 12968  						if s4.Op != OpPPC64SLDconst || auxIntToInt64(s4.AuxInt) != 24 {
 12969  							continue
 12970  						}
 12971  						x4 := s4.Args[0]
 12972  						if x4.Op != OpPPC64MOVBZload {
 12973  							continue
 12974  						}
 12975  						i4 := auxIntToInt32(x4.AuxInt)
 12976  						if auxToSym(x4.Aux) != s {
 12977  							continue
 12978  						}
 12979  						_ = x4.Args[1]
 12980  						if p != x4.Args[0] || mem != x4.Args[1] {
 12981  							continue
 12982  						}
 12983  						s0 := o3_1
 12984  						if s0.Op != OpPPC64SLDconst || auxIntToInt64(s0.AuxInt) != 32 {
 12985  							continue
 12986  						}
 12987  						x3 := s0.Args[0]
 12988  						if x3.Op != OpPPC64MOVWBRload || x3.Type != t {
 12989  							continue
 12990  						}
 12991  						_ = x3.Args[1]
 12992  						x3_0 := x3.Args[0]
 12993  						if x3_0.Op != OpPPC64MOVDaddr || x3_0.Type != typ.Uintptr {
 12994  							continue
 12995  						}
 12996  						i0 := auxIntToInt32(x3_0.AuxInt)
 12997  						if auxToSym(x3_0.Aux) != s || p != x3_0.Args[0] || mem != x3.Args[1] || !(!config.BigEndian && i4 == i0+4 && i5 == i0+5 && i6 == i0+6 && i7 == i0+7 && x3.Uses == 1 && x4.Uses == 1 && x5.Uses == 1 && x6.Uses == 1 && x7.Uses == 1 && o3.Uses == 1 && o4.Uses == 1 && o5.Uses == 1 && s0.Uses == 1 && s4.Uses == 1 && s5.Uses == 1 && s6.Uses == 1 && mergePoint(b, x3, x4, x5, x6, x7) != nil && clobber(x3, x4, x5, x6, x7, o3, o4, o5, s0, s4, s5, s6)) {
 12998  							continue
 12999  						}
 13000  						b = mergePoint(b, x3, x4, x5, x6, x7)
 13001  						v0 := b.NewValue0(x3.Pos, OpPPC64MOVDBRload, t)
 13002  						v.copyOf(v0)
 13003  						v1 := b.NewValue0(x3.Pos, OpPPC64MOVDaddr, typ.Uintptr)
 13004  						v1.AuxInt = int32ToAuxInt(i0)
 13005  						v1.Aux = symToAux(s)
 13006  						v1.AddArg(p)
 13007  						v0.AddArg2(v1, mem)
 13008  						return true
 13009  					}
 13010  				}
 13011  			}
 13012  		}
 13013  		break
 13014  	}
 13015  	return false
 13016  }
 13017  func rewriteValuePPC64_OpPPC64ORN(v *Value) bool {
 13018  	v_1 := v.Args[1]
 13019  	v_0 := v.Args[0]
 13020  	// match: (ORN x (MOVDconst [-1]))
 13021  	// result: x
 13022  	for {
 13023  		x := v_0
 13024  		if v_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1.AuxInt) != -1 {
 13025  			break
 13026  		}
 13027  		v.copyOf(x)
 13028  		return true
 13029  	}
 13030  	// match: (ORN (MOVDconst [c]) (MOVDconst [d]))
 13031  	// result: (MOVDconst [c|^d])
 13032  	for {
 13033  		if v_0.Op != OpPPC64MOVDconst {
 13034  			break
 13035  		}
 13036  		c := auxIntToInt64(v_0.AuxInt)
 13037  		if v_1.Op != OpPPC64MOVDconst {
 13038  			break
 13039  		}
 13040  		d := auxIntToInt64(v_1.AuxInt)
 13041  		v.reset(OpPPC64MOVDconst)
 13042  		v.AuxInt = int64ToAuxInt(c | ^d)
 13043  		return true
 13044  	}
 13045  	return false
 13046  }
 13047  func rewriteValuePPC64_OpPPC64ORconst(v *Value) bool {
 13048  	v_0 := v.Args[0]
 13049  	// match: (ORconst [c] (ORconst [d] x))
 13050  	// result: (ORconst [c|d] x)
 13051  	for {
 13052  		c := auxIntToInt64(v.AuxInt)
 13053  		if v_0.Op != OpPPC64ORconst {
 13054  			break
 13055  		}
 13056  		d := auxIntToInt64(v_0.AuxInt)
 13057  		x := v_0.Args[0]
 13058  		v.reset(OpPPC64ORconst)
 13059  		v.AuxInt = int64ToAuxInt(c | d)
 13060  		v.AddArg(x)
 13061  		return true
 13062  	}
 13063  	// match: (ORconst [-1] _)
 13064  	// result: (MOVDconst [-1])
 13065  	for {
 13066  		if auxIntToInt64(v.AuxInt) != -1 {
 13067  			break
 13068  		}
 13069  		v.reset(OpPPC64MOVDconst)
 13070  		v.AuxInt = int64ToAuxInt(-1)
 13071  		return true
 13072  	}
 13073  	// match: (ORconst [0] x)
 13074  	// result: x
 13075  	for {
 13076  		if auxIntToInt64(v.AuxInt) != 0 {
 13077  			break
 13078  		}
 13079  		x := v_0
 13080  		v.copyOf(x)
 13081  		return true
 13082  	}
 13083  	return false
 13084  }
 13085  func rewriteValuePPC64_OpPPC64ROTL(v *Value) bool {
 13086  	v_1 := v.Args[1]
 13087  	v_0 := v.Args[0]
 13088  	// match: (ROTL x (MOVDconst [c]))
 13089  	// result: (ROTLconst x [c&63])
 13090  	for {
 13091  		x := v_0
 13092  		if v_1.Op != OpPPC64MOVDconst {
 13093  			break
 13094  		}
 13095  		c := auxIntToInt64(v_1.AuxInt)
 13096  		v.reset(OpPPC64ROTLconst)
 13097  		v.AuxInt = int64ToAuxInt(c & 63)
 13098  		v.AddArg(x)
 13099  		return true
 13100  	}
 13101  	return false
 13102  }
 13103  func rewriteValuePPC64_OpPPC64ROTLW(v *Value) bool {
 13104  	v_1 := v.Args[1]
 13105  	v_0 := v.Args[0]
 13106  	// match: (ROTLW x (MOVDconst [c]))
 13107  	// result: (ROTLWconst x [c&31])
 13108  	for {
 13109  		x := v_0
 13110  		if v_1.Op != OpPPC64MOVDconst {
 13111  			break
 13112  		}
 13113  		c := auxIntToInt64(v_1.AuxInt)
 13114  		v.reset(OpPPC64ROTLWconst)
 13115  		v.AuxInt = int64ToAuxInt(c & 31)
 13116  		v.AddArg(x)
 13117  		return true
 13118  	}
 13119  	return false
 13120  }
 13121  func rewriteValuePPC64_OpPPC64ROTLWconst(v *Value) bool {
 13122  	v_0 := v.Args[0]
 13123  	// match: (ROTLWconst [r] (AND (MOVDconst [m]) x))
 13124  	// cond: isPPC64WordRotateMask(m)
 13125  	// result: (RLWINM [encodePPC64RotateMask(r,rotateLeft32(m,r),32)] x)
 13126  	for {
 13127  		r := auxIntToInt64(v.AuxInt)
 13128  		if v_0.Op != OpPPC64AND {
 13129  			break
 13130  		}
 13131  		_ = v_0.Args[1]
 13132  		v_0_0 := v_0.Args[0]
 13133  		v_0_1 := v_0.Args[1]
 13134  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 13135  			if v_0_0.Op != OpPPC64MOVDconst {
 13136  				continue
 13137  			}
 13138  			m := auxIntToInt64(v_0_0.AuxInt)
 13139  			x := v_0_1
 13140  			if !(isPPC64WordRotateMask(m)) {
 13141  				continue
 13142  			}
 13143  			v.reset(OpPPC64RLWINM)
 13144  			v.AuxInt = int64ToAuxInt(encodePPC64RotateMask(r, rotateLeft32(m, r), 32))
 13145  			v.AddArg(x)
 13146  			return true
 13147  		}
 13148  		break
 13149  	}
 13150  	// match: (ROTLWconst [r] (ANDconst [m] x))
 13151  	// cond: isPPC64WordRotateMask(m)
 13152  	// result: (RLWINM [encodePPC64RotateMask(r,rotateLeft32(m,r),32)] x)
 13153  	for {
 13154  		r := auxIntToInt64(v.AuxInt)
 13155  		if v_0.Op != OpPPC64ANDconst {
 13156  			break
 13157  		}
 13158  		m := auxIntToInt64(v_0.AuxInt)
 13159  		x := v_0.Args[0]
 13160  		if !(isPPC64WordRotateMask(m)) {
 13161  			break
 13162  		}
 13163  		v.reset(OpPPC64RLWINM)
 13164  		v.AuxInt = int64ToAuxInt(encodePPC64RotateMask(r, rotateLeft32(m, r), 32))
 13165  		v.AddArg(x)
 13166  		return true
 13167  	}
 13168  	return false
 13169  }
 13170  func rewriteValuePPC64_OpPPC64SLD(v *Value) bool {
 13171  	v_1 := v.Args[1]
 13172  	v_0 := v.Args[0]
 13173  	// match: (SLD x (MOVDconst [c]))
 13174  	// result: (SLDconst [c&63 | (c>>6&1*63)] x)
 13175  	for {
 13176  		x := v_0
 13177  		if v_1.Op != OpPPC64MOVDconst {
 13178  			break
 13179  		}
 13180  		c := auxIntToInt64(v_1.AuxInt)
 13181  		v.reset(OpPPC64SLDconst)
 13182  		v.AuxInt = int64ToAuxInt(c&63 | (c >> 6 & 1 * 63))
 13183  		v.AddArg(x)
 13184  		return true
 13185  	}
 13186  	return false
 13187  }
 13188  func rewriteValuePPC64_OpPPC64SLDconst(v *Value) bool {
 13189  	v_0 := v.Args[0]
 13190  	// match: (SLDconst [l] (SRWconst [r] x))
 13191  	// cond: mergePPC64SldiSrw(l,r) != 0
 13192  	// result: (RLWINM [mergePPC64SldiSrw(l,r)] x)
 13193  	for {
 13194  		l := auxIntToInt64(v.AuxInt)
 13195  		if v_0.Op != OpPPC64SRWconst {
 13196  			break
 13197  		}
 13198  		r := auxIntToInt64(v_0.AuxInt)
 13199  		x := v_0.Args[0]
 13200  		if !(mergePPC64SldiSrw(l, r) != 0) {
 13201  			break
 13202  		}
 13203  		v.reset(OpPPC64RLWINM)
 13204  		v.AuxInt = int64ToAuxInt(mergePPC64SldiSrw(l, r))
 13205  		v.AddArg(x)
 13206  		return true
 13207  	}
 13208  	// match: (SLDconst [c] z:(MOVBZreg x))
 13209  	// cond: c < 8 && z.Uses == 1
 13210  	// result: (CLRLSLDI [newPPC64ShiftAuxInt(c,56,63,64)] x)
 13211  	for {
 13212  		c := auxIntToInt64(v.AuxInt)
 13213  		z := v_0
 13214  		if z.Op != OpPPC64MOVBZreg {
 13215  			break
 13216  		}
 13217  		x := z.Args[0]
 13218  		if !(c < 8 && z.Uses == 1) {
 13219  			break
 13220  		}
 13221  		v.reset(OpPPC64CLRLSLDI)
 13222  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 56, 63, 64))
 13223  		v.AddArg(x)
 13224  		return true
 13225  	}
 13226  	// match: (SLDconst [c] z:(MOVHZreg x))
 13227  	// cond: c < 16 && z.Uses == 1
 13228  	// result: (CLRLSLDI [newPPC64ShiftAuxInt(c,48,63,64)] x)
 13229  	for {
 13230  		c := auxIntToInt64(v.AuxInt)
 13231  		z := v_0
 13232  		if z.Op != OpPPC64MOVHZreg {
 13233  			break
 13234  		}
 13235  		x := z.Args[0]
 13236  		if !(c < 16 && z.Uses == 1) {
 13237  			break
 13238  		}
 13239  		v.reset(OpPPC64CLRLSLDI)
 13240  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 48, 63, 64))
 13241  		v.AddArg(x)
 13242  		return true
 13243  	}
 13244  	// match: (SLDconst [c] z:(MOVWZreg x))
 13245  	// cond: c < 32 && z.Uses == 1
 13246  	// result: (CLRLSLDI [newPPC64ShiftAuxInt(c,32,63,64)] x)
 13247  	for {
 13248  		c := auxIntToInt64(v.AuxInt)
 13249  		z := v_0
 13250  		if z.Op != OpPPC64MOVWZreg {
 13251  			break
 13252  		}
 13253  		x := z.Args[0]
 13254  		if !(c < 32 && z.Uses == 1) {
 13255  			break
 13256  		}
 13257  		v.reset(OpPPC64CLRLSLDI)
 13258  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 32, 63, 64))
 13259  		v.AddArg(x)
 13260  		return true
 13261  	}
 13262  	// match: (SLDconst [c] z:(ANDconst [d] x))
 13263  	// cond: z.Uses == 1 && isPPC64ValidShiftMask(d) && c <= (64-getPPC64ShiftMaskLength(d))
 13264  	// result: (CLRLSLDI [newPPC64ShiftAuxInt(c,64-getPPC64ShiftMaskLength(d),63,64)] x)
 13265  	for {
 13266  		c := auxIntToInt64(v.AuxInt)
 13267  		z := v_0
 13268  		if z.Op != OpPPC64ANDconst {
 13269  			break
 13270  		}
 13271  		d := auxIntToInt64(z.AuxInt)
 13272  		x := z.Args[0]
 13273  		if !(z.Uses == 1 && isPPC64ValidShiftMask(d) && c <= (64-getPPC64ShiftMaskLength(d))) {
 13274  			break
 13275  		}
 13276  		v.reset(OpPPC64CLRLSLDI)
 13277  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 64-getPPC64ShiftMaskLength(d), 63, 64))
 13278  		v.AddArg(x)
 13279  		return true
 13280  	}
 13281  	// match: (SLDconst [c] z:(AND (MOVDconst [d]) x))
 13282  	// cond: z.Uses == 1 && isPPC64ValidShiftMask(d) && c<=(64-getPPC64ShiftMaskLength(d))
 13283  	// result: (CLRLSLDI [newPPC64ShiftAuxInt(c,64-getPPC64ShiftMaskLength(d),63,64)] x)
 13284  	for {
 13285  		c := auxIntToInt64(v.AuxInt)
 13286  		z := v_0
 13287  		if z.Op != OpPPC64AND {
 13288  			break
 13289  		}
 13290  		_ = z.Args[1]
 13291  		z_0 := z.Args[0]
 13292  		z_1 := z.Args[1]
 13293  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 13294  			if z_0.Op != OpPPC64MOVDconst {
 13295  				continue
 13296  			}
 13297  			d := auxIntToInt64(z_0.AuxInt)
 13298  			x := z_1
 13299  			if !(z.Uses == 1 && isPPC64ValidShiftMask(d) && c <= (64-getPPC64ShiftMaskLength(d))) {
 13300  				continue
 13301  			}
 13302  			v.reset(OpPPC64CLRLSLDI)
 13303  			v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 64-getPPC64ShiftMaskLength(d), 63, 64))
 13304  			v.AddArg(x)
 13305  			return true
 13306  		}
 13307  		break
 13308  	}
 13309  	// match: (SLDconst [c] z:(MOVWreg x))
 13310  	// cond: c < 32 && buildcfg.GOPPC64 >= 9
 13311  	// result: (EXTSWSLconst [c] x)
 13312  	for {
 13313  		c := auxIntToInt64(v.AuxInt)
 13314  		z := v_0
 13315  		if z.Op != OpPPC64MOVWreg {
 13316  			break
 13317  		}
 13318  		x := z.Args[0]
 13319  		if !(c < 32 && buildcfg.GOPPC64 >= 9) {
 13320  			break
 13321  		}
 13322  		v.reset(OpPPC64EXTSWSLconst)
 13323  		v.AuxInt = int64ToAuxInt(c)
 13324  		v.AddArg(x)
 13325  		return true
 13326  	}
 13327  	return false
 13328  }
 13329  func rewriteValuePPC64_OpPPC64SLW(v *Value) bool {
 13330  	v_1 := v.Args[1]
 13331  	v_0 := v.Args[0]
 13332  	// match: (SLW x (MOVDconst [c]))
 13333  	// result: (SLWconst [c&31 | (c>>5&1*31)] x)
 13334  	for {
 13335  		x := v_0
 13336  		if v_1.Op != OpPPC64MOVDconst {
 13337  			break
 13338  		}
 13339  		c := auxIntToInt64(v_1.AuxInt)
 13340  		v.reset(OpPPC64SLWconst)
 13341  		v.AuxInt = int64ToAuxInt(c&31 | (c >> 5 & 1 * 31))
 13342  		v.AddArg(x)
 13343  		return true
 13344  	}
 13345  	return false
 13346  }
 13347  func rewriteValuePPC64_OpPPC64SLWconst(v *Value) bool {
 13348  	v_0 := v.Args[0]
 13349  	// match: (SLWconst [c] z:(MOVBZreg x))
 13350  	// cond: z.Uses == 1 && c < 8
 13351  	// result: (CLRLSLWI [newPPC64ShiftAuxInt(c,24,31,32)] x)
 13352  	for {
 13353  		c := auxIntToInt64(v.AuxInt)
 13354  		z := v_0
 13355  		if z.Op != OpPPC64MOVBZreg {
 13356  			break
 13357  		}
 13358  		x := z.Args[0]
 13359  		if !(z.Uses == 1 && c < 8) {
 13360  			break
 13361  		}
 13362  		v.reset(OpPPC64CLRLSLWI)
 13363  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 24, 31, 32))
 13364  		v.AddArg(x)
 13365  		return true
 13366  	}
 13367  	// match: (SLWconst [c] z:(MOVHZreg x))
 13368  	// cond: z.Uses == 1 && c < 16
 13369  	// result: (CLRLSLWI [newPPC64ShiftAuxInt(c,16,31,32)] x)
 13370  	for {
 13371  		c := auxIntToInt64(v.AuxInt)
 13372  		z := v_0
 13373  		if z.Op != OpPPC64MOVHZreg {
 13374  			break
 13375  		}
 13376  		x := z.Args[0]
 13377  		if !(z.Uses == 1 && c < 16) {
 13378  			break
 13379  		}
 13380  		v.reset(OpPPC64CLRLSLWI)
 13381  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 16, 31, 32))
 13382  		v.AddArg(x)
 13383  		return true
 13384  	}
 13385  	// match: (SLWconst [c] z:(ANDconst [d] x))
 13386  	// cond: z.Uses == 1 && isPPC64ValidShiftMask(d) && c<=(32-getPPC64ShiftMaskLength(d))
 13387  	// result: (CLRLSLWI [newPPC64ShiftAuxInt(c,32-getPPC64ShiftMaskLength(d),31,32)] x)
 13388  	for {
 13389  		c := auxIntToInt64(v.AuxInt)
 13390  		z := v_0
 13391  		if z.Op != OpPPC64ANDconst {
 13392  			break
 13393  		}
 13394  		d := auxIntToInt64(z.AuxInt)
 13395  		x := z.Args[0]
 13396  		if !(z.Uses == 1 && isPPC64ValidShiftMask(d) && c <= (32-getPPC64ShiftMaskLength(d))) {
 13397  			break
 13398  		}
 13399  		v.reset(OpPPC64CLRLSLWI)
 13400  		v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 32-getPPC64ShiftMaskLength(d), 31, 32))
 13401  		v.AddArg(x)
 13402  		return true
 13403  	}
 13404  	// match: (SLWconst [c] z:(AND (MOVDconst [d]) x))
 13405  	// cond: z.Uses == 1 && isPPC64ValidShiftMask(d) && c<=(32-getPPC64ShiftMaskLength(d))
 13406  	// result: (CLRLSLWI [newPPC64ShiftAuxInt(c,32-getPPC64ShiftMaskLength(d),31,32)] x)
 13407  	for {
 13408  		c := auxIntToInt64(v.AuxInt)
 13409  		z := v_0
 13410  		if z.Op != OpPPC64AND {
 13411  			break
 13412  		}
 13413  		_ = z.Args[1]
 13414  		z_0 := z.Args[0]
 13415  		z_1 := z.Args[1]
 13416  		for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 13417  			if z_0.Op != OpPPC64MOVDconst {
 13418  				continue
 13419  			}
 13420  			d := auxIntToInt64(z_0.AuxInt)
 13421  			x := z_1
 13422  			if !(z.Uses == 1 && isPPC64ValidShiftMask(d) && c <= (32-getPPC64ShiftMaskLength(d))) {
 13423  				continue
 13424  			}
 13425  			v.reset(OpPPC64CLRLSLWI)
 13426  			v.AuxInt = int32ToAuxInt(newPPC64ShiftAuxInt(c, 32-getPPC64ShiftMaskLength(d), 31, 32))
 13427  			v.AddArg(x)
 13428  			return true
 13429  		}
 13430  		break
 13431  	}
 13432  	// match: (SLWconst [c] z:(MOVWreg x))
 13433  	// cond: c < 32 && buildcfg.GOPPC64 >= 9
 13434  	// result: (EXTSWSLconst [c] x)
 13435  	for {
 13436  		c := auxIntToInt64(v.AuxInt)
 13437  		z := v_0
 13438  		if z.Op != OpPPC64MOVWreg {
 13439  			break
 13440  		}
 13441  		x := z.Args[0]
 13442  		if !(c < 32 && buildcfg.GOPPC64 >= 9) {
 13443  			break
 13444  		}
 13445  		v.reset(OpPPC64EXTSWSLconst)
 13446  		v.AuxInt = int64ToAuxInt(c)
 13447  		v.AddArg(x)
 13448  		return true
 13449  	}
 13450  	return false
 13451  }
 13452  func rewriteValuePPC64_OpPPC64SRAD(v *Value) bool {
 13453  	v_1 := v.Args[1]
 13454  	v_0 := v.Args[0]
 13455  	// match: (SRAD x (MOVDconst [c]))
 13456  	// result: (SRADconst [c&63 | (c>>6&1*63)] x)
 13457  	for {
 13458  		x := v_0
 13459  		if v_1.Op != OpPPC64MOVDconst {
 13460  			break
 13461  		}
 13462  		c := auxIntToInt64(v_1.AuxInt)
 13463  		v.reset(OpPPC64SRADconst)
 13464  		v.AuxInt = int64ToAuxInt(c&63 | (c >> 6 & 1 * 63))
 13465  		v.AddArg(x)
 13466  		return true
 13467  	}
 13468  	return false
 13469  }
 13470  func rewriteValuePPC64_OpPPC64SRAW(v *Value) bool {
 13471  	v_1 := v.Args[1]
 13472  	v_0 := v.Args[0]
 13473  	// match: (SRAW x (MOVDconst [c]))
 13474  	// result: (SRAWconst [c&31 | (c>>5&1*31)] x)
 13475  	for {
 13476  		x := v_0
 13477  		if v_1.Op != OpPPC64MOVDconst {
 13478  			break
 13479  		}
 13480  		c := auxIntToInt64(v_1.AuxInt)
 13481  		v.reset(OpPPC64SRAWconst)
 13482  		v.AuxInt = int64ToAuxInt(c&31 | (c >> 5 & 1 * 31))
 13483  		v.AddArg(x)
 13484  		return true
 13485  	}
 13486  	return false
 13487  }
 13488  func rewriteValuePPC64_OpPPC64SRD(v *Value) bool {
 13489  	v_1 := v.Args[1]
 13490  	v_0 := v.Args[0]
 13491  	// match: (SRD x (MOVDconst [c]))
 13492  	// result: (SRDconst [c&63 | (c>>6&1*63)] x)
 13493  	for {
 13494  		x := v_0
 13495  		if v_1.Op != OpPPC64MOVDconst {
 13496  			break
 13497  		}
 13498  		c := auxIntToInt64(v_1.AuxInt)
 13499  		v.reset(OpPPC64SRDconst)
 13500  		v.AuxInt = int64ToAuxInt(c&63 | (c >> 6 & 1 * 63))
 13501  		v.AddArg(x)
 13502  		return true
 13503  	}
 13504  	return false
 13505  }
 13506  func rewriteValuePPC64_OpPPC64SRW(v *Value) bool {
 13507  	v_1 := v.Args[1]
 13508  	v_0 := v.Args[0]
 13509  	// match: (SRW x (MOVDconst [c]))
 13510  	// result: (SRWconst [c&31 | (c>>5&1*31)] x)
 13511  	for {
 13512  		x := v_0
 13513  		if v_1.Op != OpPPC64MOVDconst {
 13514  			break
 13515  		}
 13516  		c := auxIntToInt64(v_1.AuxInt)
 13517  		v.reset(OpPPC64SRWconst)
 13518  		v.AuxInt = int64ToAuxInt(c&31 | (c >> 5 & 1 * 31))
 13519  		v.AddArg(x)
 13520  		return true
 13521  	}
 13522  	return false
 13523  }
 13524  func rewriteValuePPC64_OpPPC64SRWconst(v *Value) bool {
 13525  	v_0 := v.Args[0]
 13526  	// match: (SRWconst (ANDconst [m] x) [s])
 13527  	// cond: mergePPC64RShiftMask(m>>uint(s),s,32) == 0
 13528  	// result: (MOVDconst [0])
 13529  	for {
 13530  		s := auxIntToInt64(v.AuxInt)
 13531  		if v_0.Op != OpPPC64ANDconst {
 13532  			break
 13533  		}
 13534  		m := auxIntToInt64(v_0.AuxInt)
 13535  		if !(mergePPC64RShiftMask(m>>uint(s), s, 32) == 0) {
 13536  			break
 13537  		}
 13538  		v.reset(OpPPC64MOVDconst)
 13539  		v.AuxInt = int64ToAuxInt(0)
 13540  		return true
 13541  	}
 13542  	// match: (SRWconst (ANDconst [m] x) [s])
 13543  	// cond: mergePPC64AndSrwi(m>>uint(s),s) != 0
 13544  	// result: (RLWINM [mergePPC64AndSrwi(m>>uint(s),s)] x)
 13545  	for {
 13546  		s := auxIntToInt64(v.AuxInt)
 13547  		if v_0.Op != OpPPC64ANDconst {
 13548  			break
 13549  		}
 13550  		m := auxIntToInt64(v_0.AuxInt)
 13551  		x := v_0.Args[0]
 13552  		if !(mergePPC64AndSrwi(m>>uint(s), s) != 0) {
 13553  			break
 13554  		}
 13555  		v.reset(OpPPC64RLWINM)
 13556  		v.AuxInt = int64ToAuxInt(mergePPC64AndSrwi(m>>uint(s), s))
 13557  		v.AddArg(x)
 13558  		return true
 13559  	}
 13560  	// match: (SRWconst (AND (MOVDconst [m]) x) [s])
 13561  	// cond: mergePPC64RShiftMask(m>>uint(s),s,32) == 0
 13562  	// result: (MOVDconst [0])
 13563  	for {
 13564  		s := auxIntToInt64(v.AuxInt)
 13565  		if v_0.Op != OpPPC64AND {
 13566  			break
 13567  		}
 13568  		_ = v_0.Args[1]
 13569  		v_0_0 := v_0.Args[0]
 13570  		v_0_1 := v_0.Args[1]
 13571  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 13572  			if v_0_0.Op != OpPPC64MOVDconst {
 13573  				continue
 13574  			}
 13575  			m := auxIntToInt64(v_0_0.AuxInt)
 13576  			if !(mergePPC64RShiftMask(m>>uint(s), s, 32) == 0) {
 13577  				continue
 13578  			}
 13579  			v.reset(OpPPC64MOVDconst)
 13580  			v.AuxInt = int64ToAuxInt(0)
 13581  			return true
 13582  		}
 13583  		break
 13584  	}
 13585  	// match: (SRWconst (AND (MOVDconst [m]) x) [s])
 13586  	// cond: mergePPC64AndSrwi(m>>uint(s),s) != 0
 13587  	// result: (RLWINM [mergePPC64AndSrwi(m>>uint(s),s)] x)
 13588  	for {
 13589  		s := auxIntToInt64(v.AuxInt)
 13590  		if v_0.Op != OpPPC64AND {
 13591  			break
 13592  		}
 13593  		_ = v_0.Args[1]
 13594  		v_0_0 := v_0.Args[0]
 13595  		v_0_1 := v_0.Args[1]
 13596  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 13597  			if v_0_0.Op != OpPPC64MOVDconst {
 13598  				continue
 13599  			}
 13600  			m := auxIntToInt64(v_0_0.AuxInt)
 13601  			x := v_0_1
 13602  			if !(mergePPC64AndSrwi(m>>uint(s), s) != 0) {
 13603  				continue
 13604  			}
 13605  			v.reset(OpPPC64RLWINM)
 13606  			v.AuxInt = int64ToAuxInt(mergePPC64AndSrwi(m>>uint(s), s))
 13607  			v.AddArg(x)
 13608  			return true
 13609  		}
 13610  		break
 13611  	}
 13612  	return false
 13613  }
 13614  func rewriteValuePPC64_OpPPC64SUB(v *Value) bool {
 13615  	v_1 := v.Args[1]
 13616  	v_0 := v.Args[0]
 13617  	// match: (SUB x (MOVDconst [c]))
 13618  	// cond: is32Bit(-c)
 13619  	// result: (ADDconst [-c] x)
 13620  	for {
 13621  		x := v_0
 13622  		if v_1.Op != OpPPC64MOVDconst {
 13623  			break
 13624  		}
 13625  		c := auxIntToInt64(v_1.AuxInt)
 13626  		if !(is32Bit(-c)) {
 13627  			break
 13628  		}
 13629  		v.reset(OpPPC64ADDconst)
 13630  		v.AuxInt = int64ToAuxInt(-c)
 13631  		v.AddArg(x)
 13632  		return true
 13633  	}
 13634  	// match: (SUB (MOVDconst [c]) x)
 13635  	// cond: is32Bit(c)
 13636  	// result: (SUBFCconst [c] x)
 13637  	for {
 13638  		if v_0.Op != OpPPC64MOVDconst {
 13639  			break
 13640  		}
 13641  		c := auxIntToInt64(v_0.AuxInt)
 13642  		x := v_1
 13643  		if !(is32Bit(c)) {
 13644  			break
 13645  		}
 13646  		v.reset(OpPPC64SUBFCconst)
 13647  		v.AuxInt = int64ToAuxInt(c)
 13648  		v.AddArg(x)
 13649  		return true
 13650  	}
 13651  	return false
 13652  }
 13653  func rewriteValuePPC64_OpPPC64SUBFCconst(v *Value) bool {
 13654  	v_0 := v.Args[0]
 13655  	// match: (SUBFCconst [c] (NEG x))
 13656  	// result: (ADDconst [c] x)
 13657  	for {
 13658  		c := auxIntToInt64(v.AuxInt)
 13659  		if v_0.Op != OpPPC64NEG {
 13660  			break
 13661  		}
 13662  		x := v_0.Args[0]
 13663  		v.reset(OpPPC64ADDconst)
 13664  		v.AuxInt = int64ToAuxInt(c)
 13665  		v.AddArg(x)
 13666  		return true
 13667  	}
 13668  	// match: (SUBFCconst [c] (SUBFCconst [d] x))
 13669  	// cond: is32Bit(c-d)
 13670  	// result: (ADDconst [c-d] x)
 13671  	for {
 13672  		c := auxIntToInt64(v.AuxInt)
 13673  		if v_0.Op != OpPPC64SUBFCconst {
 13674  			break
 13675  		}
 13676  		d := auxIntToInt64(v_0.AuxInt)
 13677  		x := v_0.Args[0]
 13678  		if !(is32Bit(c - d)) {
 13679  			break
 13680  		}
 13681  		v.reset(OpPPC64ADDconst)
 13682  		v.AuxInt = int64ToAuxInt(c - d)
 13683  		v.AddArg(x)
 13684  		return true
 13685  	}
 13686  	// match: (SUBFCconst [0] x)
 13687  	// result: (NEG x)
 13688  	for {
 13689  		if auxIntToInt64(v.AuxInt) != 0 {
 13690  			break
 13691  		}
 13692  		x := v_0
 13693  		v.reset(OpPPC64NEG)
 13694  		v.AddArg(x)
 13695  		return true
 13696  	}
 13697  	return false
 13698  }
 13699  func rewriteValuePPC64_OpPPC64XOR(v *Value) bool {
 13700  	v_1 := v.Args[1]
 13701  	v_0 := v.Args[0]
 13702  	b := v.Block
 13703  	typ := &b.Func.Config.Types
 13704  	// match: (XOR (SLDconst x [c]) (SRDconst x [d]))
 13705  	// cond: d == 64-c
 13706  	// result: (ROTLconst [c] x)
 13707  	for {
 13708  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13709  			if v_0.Op != OpPPC64SLDconst {
 13710  				continue
 13711  			}
 13712  			c := auxIntToInt64(v_0.AuxInt)
 13713  			x := v_0.Args[0]
 13714  			if v_1.Op != OpPPC64SRDconst {
 13715  				continue
 13716  			}
 13717  			d := auxIntToInt64(v_1.AuxInt)
 13718  			if x != v_1.Args[0] || !(d == 64-c) {
 13719  				continue
 13720  			}
 13721  			v.reset(OpPPC64ROTLconst)
 13722  			v.AuxInt = int64ToAuxInt(c)
 13723  			v.AddArg(x)
 13724  			return true
 13725  		}
 13726  		break
 13727  	}
 13728  	// match: (XOR (SLWconst x [c]) (SRWconst x [d]))
 13729  	// cond: d == 32-c
 13730  	// result: (ROTLWconst [c] x)
 13731  	for {
 13732  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13733  			if v_0.Op != OpPPC64SLWconst {
 13734  				continue
 13735  			}
 13736  			c := auxIntToInt64(v_0.AuxInt)
 13737  			x := v_0.Args[0]
 13738  			if v_1.Op != OpPPC64SRWconst {
 13739  				continue
 13740  			}
 13741  			d := auxIntToInt64(v_1.AuxInt)
 13742  			if x != v_1.Args[0] || !(d == 32-c) {
 13743  				continue
 13744  			}
 13745  			v.reset(OpPPC64ROTLWconst)
 13746  			v.AuxInt = int64ToAuxInt(c)
 13747  			v.AddArg(x)
 13748  			return true
 13749  		}
 13750  		break
 13751  	}
 13752  	// match: (XOR (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y))))
 13753  	// result: (ROTL x y)
 13754  	for {
 13755  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13756  			if v_0.Op != OpPPC64SLD {
 13757  				continue
 13758  			}
 13759  			_ = v_0.Args[1]
 13760  			x := v_0.Args[0]
 13761  			v_0_1 := v_0.Args[1]
 13762  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || auxIntToInt64(v_0_1.AuxInt) != 63 {
 13763  				continue
 13764  			}
 13765  			y := v_0_1.Args[0]
 13766  			if v_1.Op != OpPPC64SRD {
 13767  				continue
 13768  			}
 13769  			_ = v_1.Args[1]
 13770  			if x != v_1.Args[0] {
 13771  				continue
 13772  			}
 13773  			v_1_1 := v_1.Args[1]
 13774  			if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
 13775  				continue
 13776  			}
 13777  			_ = v_1_1.Args[1]
 13778  			v_1_1_0 := v_1_1.Args[0]
 13779  			if v_1_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_0.AuxInt) != 64 {
 13780  				continue
 13781  			}
 13782  			v_1_1_1 := v_1_1.Args[1]
 13783  			if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || auxIntToInt64(v_1_1_1.AuxInt) != 63 || y != v_1_1_1.Args[0] {
 13784  				continue
 13785  			}
 13786  			v.reset(OpPPC64ROTL)
 13787  			v.AddArg2(x, y)
 13788  			return true
 13789  		}
 13790  		break
 13791  	}
 13792  	// match: (XOR (SLD x (ANDconst <typ.Int64> [63] y)) (SRD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y))))
 13793  	// result: (ROTL x y)
 13794  	for {
 13795  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13796  			if v_0.Op != OpPPC64SLD {
 13797  				continue
 13798  			}
 13799  			_ = v_0.Args[1]
 13800  			x := v_0.Args[0]
 13801  			v_0_1 := v_0.Args[1]
 13802  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int64 || auxIntToInt64(v_0_1.AuxInt) != 63 {
 13803  				continue
 13804  			}
 13805  			y := v_0_1.Args[0]
 13806  			if v_1.Op != OpPPC64SRD {
 13807  				continue
 13808  			}
 13809  			_ = v_1.Args[1]
 13810  			if x != v_1.Args[0] {
 13811  				continue
 13812  			}
 13813  			v_1_1 := v_1.Args[1]
 13814  			if v_1_1.Op != OpPPC64SUBFCconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 64 {
 13815  				continue
 13816  			}
 13817  			v_1_1_0 := v_1_1.Args[0]
 13818  			if v_1_1_0.Op != OpPPC64ANDconst || v_1_1_0.Type != typ.UInt || auxIntToInt64(v_1_1_0.AuxInt) != 63 || y != v_1_1_0.Args[0] {
 13819  				continue
 13820  			}
 13821  			v.reset(OpPPC64ROTL)
 13822  			v.AddArg2(x, y)
 13823  			return true
 13824  		}
 13825  		break
 13826  	}
 13827  	// match: (XOR (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y))))
 13828  	// result: (ROTLW x y)
 13829  	for {
 13830  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13831  			if v_0.Op != OpPPC64SLW {
 13832  				continue
 13833  			}
 13834  			_ = v_0.Args[1]
 13835  			x := v_0.Args[0]
 13836  			v_0_1 := v_0.Args[1]
 13837  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || auxIntToInt64(v_0_1.AuxInt) != 31 {
 13838  				continue
 13839  			}
 13840  			y := v_0_1.Args[0]
 13841  			if v_1.Op != OpPPC64SRW {
 13842  				continue
 13843  			}
 13844  			_ = v_1.Args[1]
 13845  			if x != v_1.Args[0] {
 13846  				continue
 13847  			}
 13848  			v_1_1 := v_1.Args[1]
 13849  			if v_1_1.Op != OpPPC64SUBFCconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 32 {
 13850  				continue
 13851  			}
 13852  			v_1_1_0 := v_1_1.Args[0]
 13853  			if v_1_1_0.Op != OpPPC64ANDconst || v_1_1_0.Type != typ.UInt || auxIntToInt64(v_1_1_0.AuxInt) != 31 || y != v_1_1_0.Args[0] {
 13854  				continue
 13855  			}
 13856  			v.reset(OpPPC64ROTLW)
 13857  			v.AddArg2(x, y)
 13858  			return true
 13859  		}
 13860  		break
 13861  	}
 13862  	// match: (XOR (SLW x (ANDconst <typ.Int32> [31] y)) (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y))))
 13863  	// result: (ROTLW x y)
 13864  	for {
 13865  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13866  			if v_0.Op != OpPPC64SLW {
 13867  				continue
 13868  			}
 13869  			_ = v_0.Args[1]
 13870  			x := v_0.Args[0]
 13871  			v_0_1 := v_0.Args[1]
 13872  			if v_0_1.Op != OpPPC64ANDconst || v_0_1.Type != typ.Int32 || auxIntToInt64(v_0_1.AuxInt) != 31 {
 13873  				continue
 13874  			}
 13875  			y := v_0_1.Args[0]
 13876  			if v_1.Op != OpPPC64SRW {
 13877  				continue
 13878  			}
 13879  			_ = v_1.Args[1]
 13880  			if x != v_1.Args[0] {
 13881  				continue
 13882  			}
 13883  			v_1_1 := v_1.Args[1]
 13884  			if v_1_1.Op != OpPPC64SUB || v_1_1.Type != typ.UInt {
 13885  				continue
 13886  			}
 13887  			_ = v_1_1.Args[1]
 13888  			v_1_1_0 := v_1_1.Args[0]
 13889  			if v_1_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_0.AuxInt) != 32 {
 13890  				continue
 13891  			}
 13892  			v_1_1_1 := v_1_1.Args[1]
 13893  			if v_1_1_1.Op != OpPPC64ANDconst || v_1_1_1.Type != typ.UInt || auxIntToInt64(v_1_1_1.AuxInt) != 31 || y != v_1_1_1.Args[0] {
 13894  				continue
 13895  			}
 13896  			v.reset(OpPPC64ROTLW)
 13897  			v.AddArg2(x, y)
 13898  			return true
 13899  		}
 13900  		break
 13901  	}
 13902  	// match: (XOR (MOVDconst [c]) (MOVDconst [d]))
 13903  	// result: (MOVDconst [c^d])
 13904  	for {
 13905  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13906  			if v_0.Op != OpPPC64MOVDconst {
 13907  				continue
 13908  			}
 13909  			c := auxIntToInt64(v_0.AuxInt)
 13910  			if v_1.Op != OpPPC64MOVDconst {
 13911  				continue
 13912  			}
 13913  			d := auxIntToInt64(v_1.AuxInt)
 13914  			v.reset(OpPPC64MOVDconst)
 13915  			v.AuxInt = int64ToAuxInt(c ^ d)
 13916  			return true
 13917  		}
 13918  		break
 13919  	}
 13920  	// match: (XOR x (MOVDconst [c]))
 13921  	// cond: isU32Bit(c)
 13922  	// result: (XORconst [c] x)
 13923  	for {
 13924  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13925  			x := v_0
 13926  			if v_1.Op != OpPPC64MOVDconst {
 13927  				continue
 13928  			}
 13929  			c := auxIntToInt64(v_1.AuxInt)
 13930  			if !(isU32Bit(c)) {
 13931  				continue
 13932  			}
 13933  			v.reset(OpPPC64XORconst)
 13934  			v.AuxInt = int64ToAuxInt(c)
 13935  			v.AddArg(x)
 13936  			return true
 13937  		}
 13938  		break
 13939  	}
 13940  	return false
 13941  }
 13942  func rewriteValuePPC64_OpPPC64XORconst(v *Value) bool {
 13943  	v_0 := v.Args[0]
 13944  	b := v.Block
 13945  	typ := &b.Func.Config.Types
 13946  	// match: (XORconst [c] (XORconst [d] x))
 13947  	// result: (XORconst [c^d] x)
 13948  	for {
 13949  		c := auxIntToInt64(v.AuxInt)
 13950  		if v_0.Op != OpPPC64XORconst {
 13951  			break
 13952  		}
 13953  		d := auxIntToInt64(v_0.AuxInt)
 13954  		x := v_0.Args[0]
 13955  		v.reset(OpPPC64XORconst)
 13956  		v.AuxInt = int64ToAuxInt(c ^ d)
 13957  		v.AddArg(x)
 13958  		return true
 13959  	}
 13960  	// match: (XORconst [0] x)
 13961  	// result: x
 13962  	for {
 13963  		if auxIntToInt64(v.AuxInt) != 0 {
 13964  			break
 13965  		}
 13966  		x := v_0
 13967  		v.copyOf(x)
 13968  		return true
 13969  	}
 13970  	// match: (XORconst [1] (ISELB [6] (MOVDconst [1]) cmp))
 13971  	// result: (ISELB [2] (MOVDconst [1]) cmp)
 13972  	for {
 13973  		if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpPPC64ISELB || auxIntToInt32(v_0.AuxInt) != 6 {
 13974  			break
 13975  		}
 13976  		cmp := v_0.Args[1]
 13977  		v_0_0 := v_0.Args[0]
 13978  		if v_0_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0_0.AuxInt) != 1 {
 13979  			break
 13980  		}
 13981  		v.reset(OpPPC64ISELB)
 13982  		v.AuxInt = int32ToAuxInt(2)
 13983  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 13984  		v0.AuxInt = int64ToAuxInt(1)
 13985  		v.AddArg2(v0, cmp)
 13986  		return true
 13987  	}
 13988  	// match: (XORconst [1] (ISELB [5] (MOVDconst [1]) cmp))
 13989  	// result: (ISELB [1] (MOVDconst [1]) cmp)
 13990  	for {
 13991  		if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpPPC64ISELB || auxIntToInt32(v_0.AuxInt) != 5 {
 13992  			break
 13993  		}
 13994  		cmp := v_0.Args[1]
 13995  		v_0_0 := v_0.Args[0]
 13996  		if v_0_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0_0.AuxInt) != 1 {
 13997  			break
 13998  		}
 13999  		v.reset(OpPPC64ISELB)
 14000  		v.AuxInt = int32ToAuxInt(1)
 14001  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14002  		v0.AuxInt = int64ToAuxInt(1)
 14003  		v.AddArg2(v0, cmp)
 14004  		return true
 14005  	}
 14006  	// match: (XORconst [1] (ISELB [4] (MOVDconst [1]) cmp))
 14007  	// result: (ISELB [0] (MOVDconst [1]) cmp)
 14008  	for {
 14009  		if auxIntToInt64(v.AuxInt) != 1 || v_0.Op != OpPPC64ISELB || auxIntToInt32(v_0.AuxInt) != 4 {
 14010  			break
 14011  		}
 14012  		cmp := v_0.Args[1]
 14013  		v_0_0 := v_0.Args[0]
 14014  		if v_0_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_0_0.AuxInt) != 1 {
 14015  			break
 14016  		}
 14017  		v.reset(OpPPC64ISELB)
 14018  		v.AuxInt = int32ToAuxInt(0)
 14019  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14020  		v0.AuxInt = int64ToAuxInt(1)
 14021  		v.AddArg2(v0, cmp)
 14022  		return true
 14023  	}
 14024  	return false
 14025  }
 14026  func rewriteValuePPC64_OpPanicBounds(v *Value) bool {
 14027  	v_2 := v.Args[2]
 14028  	v_1 := v.Args[1]
 14029  	v_0 := v.Args[0]
 14030  	// match: (PanicBounds [kind] x y mem)
 14031  	// cond: boundsABI(kind) == 0
 14032  	// result: (LoweredPanicBoundsA [kind] x y mem)
 14033  	for {
 14034  		kind := auxIntToInt64(v.AuxInt)
 14035  		x := v_0
 14036  		y := v_1
 14037  		mem := v_2
 14038  		if !(boundsABI(kind) == 0) {
 14039  			break
 14040  		}
 14041  		v.reset(OpPPC64LoweredPanicBoundsA)
 14042  		v.AuxInt = int64ToAuxInt(kind)
 14043  		v.AddArg3(x, y, mem)
 14044  		return true
 14045  	}
 14046  	// match: (PanicBounds [kind] x y mem)
 14047  	// cond: boundsABI(kind) == 1
 14048  	// result: (LoweredPanicBoundsB [kind] x y mem)
 14049  	for {
 14050  		kind := auxIntToInt64(v.AuxInt)
 14051  		x := v_0
 14052  		y := v_1
 14053  		mem := v_2
 14054  		if !(boundsABI(kind) == 1) {
 14055  			break
 14056  		}
 14057  		v.reset(OpPPC64LoweredPanicBoundsB)
 14058  		v.AuxInt = int64ToAuxInt(kind)
 14059  		v.AddArg3(x, y, mem)
 14060  		return true
 14061  	}
 14062  	// match: (PanicBounds [kind] x y mem)
 14063  	// cond: boundsABI(kind) == 2
 14064  	// result: (LoweredPanicBoundsC [kind] x y mem)
 14065  	for {
 14066  		kind := auxIntToInt64(v.AuxInt)
 14067  		x := v_0
 14068  		y := v_1
 14069  		mem := v_2
 14070  		if !(boundsABI(kind) == 2) {
 14071  			break
 14072  		}
 14073  		v.reset(OpPPC64LoweredPanicBoundsC)
 14074  		v.AuxInt = int64ToAuxInt(kind)
 14075  		v.AddArg3(x, y, mem)
 14076  		return true
 14077  	}
 14078  	return false
 14079  }
 14080  func rewriteValuePPC64_OpPopCount16(v *Value) bool {
 14081  	v_0 := v.Args[0]
 14082  	b := v.Block
 14083  	typ := &b.Func.Config.Types
 14084  	// match: (PopCount16 x)
 14085  	// result: (POPCNTW (MOVHZreg x))
 14086  	for {
 14087  		x := v_0
 14088  		v.reset(OpPPC64POPCNTW)
 14089  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 14090  		v0.AddArg(x)
 14091  		v.AddArg(v0)
 14092  		return true
 14093  	}
 14094  }
 14095  func rewriteValuePPC64_OpPopCount32(v *Value) bool {
 14096  	v_0 := v.Args[0]
 14097  	b := v.Block
 14098  	typ := &b.Func.Config.Types
 14099  	// match: (PopCount32 x)
 14100  	// result: (POPCNTW (MOVWZreg x))
 14101  	for {
 14102  		x := v_0
 14103  		v.reset(OpPPC64POPCNTW)
 14104  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWZreg, typ.Int64)
 14105  		v0.AddArg(x)
 14106  		v.AddArg(v0)
 14107  		return true
 14108  	}
 14109  }
 14110  func rewriteValuePPC64_OpPopCount8(v *Value) bool {
 14111  	v_0 := v.Args[0]
 14112  	b := v.Block
 14113  	typ := &b.Func.Config.Types
 14114  	// match: (PopCount8 x)
 14115  	// result: (POPCNTB (MOVBZreg x))
 14116  	for {
 14117  		x := v_0
 14118  		v.reset(OpPPC64POPCNTB)
 14119  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 14120  		v0.AddArg(x)
 14121  		v.AddArg(v0)
 14122  		return true
 14123  	}
 14124  }
 14125  func rewriteValuePPC64_OpPrefetchCache(v *Value) bool {
 14126  	v_1 := v.Args[1]
 14127  	v_0 := v.Args[0]
 14128  	// match: (PrefetchCache ptr mem)
 14129  	// result: (DCBT ptr mem [0])
 14130  	for {
 14131  		ptr := v_0
 14132  		mem := v_1
 14133  		v.reset(OpPPC64DCBT)
 14134  		v.AuxInt = int64ToAuxInt(0)
 14135  		v.AddArg2(ptr, mem)
 14136  		return true
 14137  	}
 14138  }
 14139  func rewriteValuePPC64_OpPrefetchCacheStreamed(v *Value) bool {
 14140  	v_1 := v.Args[1]
 14141  	v_0 := v.Args[0]
 14142  	// match: (PrefetchCacheStreamed ptr mem)
 14143  	// result: (DCBT ptr mem [8])
 14144  	for {
 14145  		ptr := v_0
 14146  		mem := v_1
 14147  		v.reset(OpPPC64DCBT)
 14148  		v.AuxInt = int64ToAuxInt(8)
 14149  		v.AddArg2(ptr, mem)
 14150  		return true
 14151  	}
 14152  }
 14153  func rewriteValuePPC64_OpRotateLeft16(v *Value) bool {
 14154  	v_1 := v.Args[1]
 14155  	v_0 := v.Args[0]
 14156  	b := v.Block
 14157  	typ := &b.Func.Config.Types
 14158  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
 14159  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
 14160  	for {
 14161  		t := v.Type
 14162  		x := v_0
 14163  		if v_1.Op != OpPPC64MOVDconst {
 14164  			break
 14165  		}
 14166  		c := auxIntToInt64(v_1.AuxInt)
 14167  		v.reset(OpOr16)
 14168  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
 14169  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14170  		v1.AuxInt = int64ToAuxInt(c & 15)
 14171  		v0.AddArg2(x, v1)
 14172  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
 14173  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14174  		v3.AuxInt = int64ToAuxInt(-c & 15)
 14175  		v2.AddArg2(x, v3)
 14176  		v.AddArg2(v0, v2)
 14177  		return true
 14178  	}
 14179  	return false
 14180  }
 14181  func rewriteValuePPC64_OpRotateLeft32(v *Value) bool {
 14182  	v_1 := v.Args[1]
 14183  	v_0 := v.Args[0]
 14184  	// match: (RotateLeft32 x (MOVDconst [c]))
 14185  	// result: (ROTLWconst [c&31] x)
 14186  	for {
 14187  		x := v_0
 14188  		if v_1.Op != OpPPC64MOVDconst {
 14189  			break
 14190  		}
 14191  		c := auxIntToInt64(v_1.AuxInt)
 14192  		v.reset(OpPPC64ROTLWconst)
 14193  		v.AuxInt = int64ToAuxInt(c & 31)
 14194  		v.AddArg(x)
 14195  		return true
 14196  	}
 14197  	// match: (RotateLeft32 x y)
 14198  	// result: (ROTLW x y)
 14199  	for {
 14200  		x := v_0
 14201  		y := v_1
 14202  		v.reset(OpPPC64ROTLW)
 14203  		v.AddArg2(x, y)
 14204  		return true
 14205  	}
 14206  }
 14207  func rewriteValuePPC64_OpRotateLeft64(v *Value) bool {
 14208  	v_1 := v.Args[1]
 14209  	v_0 := v.Args[0]
 14210  	// match: (RotateLeft64 x (MOVDconst [c]))
 14211  	// result: (ROTLconst [c&63] x)
 14212  	for {
 14213  		x := v_0
 14214  		if v_1.Op != OpPPC64MOVDconst {
 14215  			break
 14216  		}
 14217  		c := auxIntToInt64(v_1.AuxInt)
 14218  		v.reset(OpPPC64ROTLconst)
 14219  		v.AuxInt = int64ToAuxInt(c & 63)
 14220  		v.AddArg(x)
 14221  		return true
 14222  	}
 14223  	// match: (RotateLeft64 x y)
 14224  	// result: (ROTL x y)
 14225  	for {
 14226  		x := v_0
 14227  		y := v_1
 14228  		v.reset(OpPPC64ROTL)
 14229  		v.AddArg2(x, y)
 14230  		return true
 14231  	}
 14232  }
 14233  func rewriteValuePPC64_OpRotateLeft8(v *Value) bool {
 14234  	v_1 := v.Args[1]
 14235  	v_0 := v.Args[0]
 14236  	b := v.Block
 14237  	typ := &b.Func.Config.Types
 14238  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
 14239  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
 14240  	for {
 14241  		t := v.Type
 14242  		x := v_0
 14243  		if v_1.Op != OpPPC64MOVDconst {
 14244  			break
 14245  		}
 14246  		c := auxIntToInt64(v_1.AuxInt)
 14247  		v.reset(OpOr8)
 14248  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
 14249  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14250  		v1.AuxInt = int64ToAuxInt(c & 7)
 14251  		v0.AddArg2(x, v1)
 14252  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
 14253  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14254  		v3.AuxInt = int64ToAuxInt(-c & 7)
 14255  		v2.AddArg2(x, v3)
 14256  		v.AddArg2(v0, v2)
 14257  		return true
 14258  	}
 14259  	return false
 14260  }
 14261  func rewriteValuePPC64_OpRsh16Ux16(v *Value) bool {
 14262  	v_1 := v.Args[1]
 14263  	v_0 := v.Args[0]
 14264  	b := v.Block
 14265  	typ := &b.Func.Config.Types
 14266  	// match: (Rsh16Ux16 x y)
 14267  	// cond: shiftIsBounded(v)
 14268  	// result: (SRW (MOVHZreg x) y)
 14269  	for {
 14270  		x := v_0
 14271  		y := v_1
 14272  		if !(shiftIsBounded(v)) {
 14273  			break
 14274  		}
 14275  		v.reset(OpPPC64SRW)
 14276  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 14277  		v0.AddArg(x)
 14278  		v.AddArg2(v0, y)
 14279  		return true
 14280  	}
 14281  	// match: (Rsh16Ux16 x y)
 14282  	// result: (SRW (ZeroExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [16]))))
 14283  	for {
 14284  		x := v_0
 14285  		y := v_1
 14286  		v.reset(OpPPC64SRW)
 14287  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 14288  		v0.AddArg(x)
 14289  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14290  		v1.AuxInt = int32ToAuxInt(0)
 14291  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14292  		v2.AuxInt = int64ToAuxInt(-1)
 14293  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14294  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 14295  		v4.AddArg(y)
 14296  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14297  		v5.AuxInt = int64ToAuxInt(16)
 14298  		v3.AddArg2(v4, v5)
 14299  		v1.AddArg3(y, v2, v3)
 14300  		v.AddArg2(v0, v1)
 14301  		return true
 14302  	}
 14303  }
 14304  func rewriteValuePPC64_OpRsh16Ux32(v *Value) bool {
 14305  	v_1 := v.Args[1]
 14306  	v_0 := v.Args[0]
 14307  	b := v.Block
 14308  	typ := &b.Func.Config.Types
 14309  	// match: (Rsh16Ux32 x (MOVDconst [c]))
 14310  	// cond: uint32(c) < 16
 14311  	// result: (SRWconst (ZeroExt16to32 x) [c&15])
 14312  	for {
 14313  		x := v_0
 14314  		if v_1.Op != OpPPC64MOVDconst {
 14315  			break
 14316  		}
 14317  		c := auxIntToInt64(v_1.AuxInt)
 14318  		if !(uint32(c) < 16) {
 14319  			break
 14320  		}
 14321  		v.reset(OpPPC64SRWconst)
 14322  		v.AuxInt = int64ToAuxInt(c & 15)
 14323  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 14324  		v0.AddArg(x)
 14325  		v.AddArg(v0)
 14326  		return true
 14327  	}
 14328  	// match: (Rsh16Ux32 x y)
 14329  	// cond: shiftIsBounded(v)
 14330  	// result: (SRW (MOVHZreg x) y)
 14331  	for {
 14332  		x := v_0
 14333  		y := v_1
 14334  		if !(shiftIsBounded(v)) {
 14335  			break
 14336  		}
 14337  		v.reset(OpPPC64SRW)
 14338  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 14339  		v0.AddArg(x)
 14340  		v.AddArg2(v0, y)
 14341  		return true
 14342  	}
 14343  	// match: (Rsh16Ux32 x y)
 14344  	// result: (SRW (ZeroExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [16]))))
 14345  	for {
 14346  		x := v_0
 14347  		y := v_1
 14348  		v.reset(OpPPC64SRW)
 14349  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 14350  		v0.AddArg(x)
 14351  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14352  		v1.AuxInt = int32ToAuxInt(0)
 14353  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14354  		v2.AuxInt = int64ToAuxInt(-1)
 14355  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14356  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14357  		v4.AuxInt = int64ToAuxInt(16)
 14358  		v3.AddArg2(y, v4)
 14359  		v1.AddArg3(y, v2, v3)
 14360  		v.AddArg2(v0, v1)
 14361  		return true
 14362  	}
 14363  }
 14364  func rewriteValuePPC64_OpRsh16Ux64(v *Value) bool {
 14365  	v_1 := v.Args[1]
 14366  	v_0 := v.Args[0]
 14367  	b := v.Block
 14368  	typ := &b.Func.Config.Types
 14369  	// match: (Rsh16Ux64 _ (MOVDconst [c]))
 14370  	// cond: uint64(c) >= 16
 14371  	// result: (MOVDconst [0])
 14372  	for {
 14373  		if v_1.Op != OpPPC64MOVDconst {
 14374  			break
 14375  		}
 14376  		c := auxIntToInt64(v_1.AuxInt)
 14377  		if !(uint64(c) >= 16) {
 14378  			break
 14379  		}
 14380  		v.reset(OpPPC64MOVDconst)
 14381  		v.AuxInt = int64ToAuxInt(0)
 14382  		return true
 14383  	}
 14384  	// match: (Rsh16Ux64 x (MOVDconst [c]))
 14385  	// cond: uint64(c) < 16
 14386  	// result: (SRWconst (ZeroExt16to32 x) [c])
 14387  	for {
 14388  		x := v_0
 14389  		if v_1.Op != OpPPC64MOVDconst {
 14390  			break
 14391  		}
 14392  		c := auxIntToInt64(v_1.AuxInt)
 14393  		if !(uint64(c) < 16) {
 14394  			break
 14395  		}
 14396  		v.reset(OpPPC64SRWconst)
 14397  		v.AuxInt = int64ToAuxInt(c)
 14398  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 14399  		v0.AddArg(x)
 14400  		v.AddArg(v0)
 14401  		return true
 14402  	}
 14403  	// match: (Rsh16Ux64 x y)
 14404  	// cond: shiftIsBounded(v)
 14405  	// result: (SRW (MOVHZreg x) y)
 14406  	for {
 14407  		x := v_0
 14408  		y := v_1
 14409  		if !(shiftIsBounded(v)) {
 14410  			break
 14411  		}
 14412  		v.reset(OpPPC64SRW)
 14413  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 14414  		v0.AddArg(x)
 14415  		v.AddArg2(v0, y)
 14416  		return true
 14417  	}
 14418  	// match: (Rsh16Ux64 x y)
 14419  	// result: (SRW (ZeroExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [16]))))
 14420  	for {
 14421  		x := v_0
 14422  		y := v_1
 14423  		v.reset(OpPPC64SRW)
 14424  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 14425  		v0.AddArg(x)
 14426  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14427  		v1.AuxInt = int32ToAuxInt(0)
 14428  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14429  		v2.AuxInt = int64ToAuxInt(-1)
 14430  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14431  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14432  		v4.AuxInt = int64ToAuxInt(16)
 14433  		v3.AddArg2(y, v4)
 14434  		v1.AddArg3(y, v2, v3)
 14435  		v.AddArg2(v0, v1)
 14436  		return true
 14437  	}
 14438  }
 14439  func rewriteValuePPC64_OpRsh16Ux8(v *Value) bool {
 14440  	v_1 := v.Args[1]
 14441  	v_0 := v.Args[0]
 14442  	b := v.Block
 14443  	typ := &b.Func.Config.Types
 14444  	// match: (Rsh16Ux8 x y)
 14445  	// cond: shiftIsBounded(v)
 14446  	// result: (SRW (MOVHZreg x) y)
 14447  	for {
 14448  		x := v_0
 14449  		y := v_1
 14450  		if !(shiftIsBounded(v)) {
 14451  			break
 14452  		}
 14453  		v.reset(OpPPC64SRW)
 14454  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHZreg, typ.Int64)
 14455  		v0.AddArg(x)
 14456  		v.AddArg2(v0, y)
 14457  		return true
 14458  	}
 14459  	// match: (Rsh16Ux8 x y)
 14460  	// result: (SRW (ZeroExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [16]))))
 14461  	for {
 14462  		x := v_0
 14463  		y := v_1
 14464  		v.reset(OpPPC64SRW)
 14465  		v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
 14466  		v0.AddArg(x)
 14467  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14468  		v1.AuxInt = int32ToAuxInt(0)
 14469  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14470  		v2.AuxInt = int64ToAuxInt(-1)
 14471  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14472  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 14473  		v4.AddArg(y)
 14474  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14475  		v5.AuxInt = int64ToAuxInt(16)
 14476  		v3.AddArg2(v4, v5)
 14477  		v1.AddArg3(y, v2, v3)
 14478  		v.AddArg2(v0, v1)
 14479  		return true
 14480  	}
 14481  }
 14482  func rewriteValuePPC64_OpRsh16x16(v *Value) bool {
 14483  	v_1 := v.Args[1]
 14484  	v_0 := v.Args[0]
 14485  	b := v.Block
 14486  	typ := &b.Func.Config.Types
 14487  	// match: (Rsh16x16 x y)
 14488  	// cond: shiftIsBounded(v)
 14489  	// result: (SRAW (MOVHreg x) y)
 14490  	for {
 14491  		x := v_0
 14492  		y := v_1
 14493  		if !(shiftIsBounded(v)) {
 14494  			break
 14495  		}
 14496  		v.reset(OpPPC64SRAW)
 14497  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 14498  		v0.AddArg(x)
 14499  		v.AddArg2(v0, y)
 14500  		return true
 14501  	}
 14502  	// match: (Rsh16x16 x y)
 14503  	// result: (SRAW (SignExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [16]))))
 14504  	for {
 14505  		x := v_0
 14506  		y := v_1
 14507  		v.reset(OpPPC64SRAW)
 14508  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14509  		v0.AddArg(x)
 14510  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14511  		v1.AuxInt = int32ToAuxInt(0)
 14512  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14513  		v2.AuxInt = int64ToAuxInt(-1)
 14514  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14515  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 14516  		v4.AddArg(y)
 14517  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14518  		v5.AuxInt = int64ToAuxInt(16)
 14519  		v3.AddArg2(v4, v5)
 14520  		v1.AddArg3(y, v2, v3)
 14521  		v.AddArg2(v0, v1)
 14522  		return true
 14523  	}
 14524  }
 14525  func rewriteValuePPC64_OpRsh16x32(v *Value) bool {
 14526  	v_1 := v.Args[1]
 14527  	v_0 := v.Args[0]
 14528  	b := v.Block
 14529  	typ := &b.Func.Config.Types
 14530  	// match: (Rsh16x32 x (MOVDconst [c]))
 14531  	// cond: uint32(c) < 16
 14532  	// result: (SRAWconst (SignExt16to32 x) [c&15])
 14533  	for {
 14534  		x := v_0
 14535  		if v_1.Op != OpPPC64MOVDconst {
 14536  			break
 14537  		}
 14538  		c := auxIntToInt64(v_1.AuxInt)
 14539  		if !(uint32(c) < 16) {
 14540  			break
 14541  		}
 14542  		v.reset(OpPPC64SRAWconst)
 14543  		v.AuxInt = int64ToAuxInt(c & 15)
 14544  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14545  		v0.AddArg(x)
 14546  		v.AddArg(v0)
 14547  		return true
 14548  	}
 14549  	// match: (Rsh16x32 x y)
 14550  	// cond: shiftIsBounded(v)
 14551  	// result: (SRAW (MOVHreg x) y)
 14552  	for {
 14553  		x := v_0
 14554  		y := v_1
 14555  		if !(shiftIsBounded(v)) {
 14556  			break
 14557  		}
 14558  		v.reset(OpPPC64SRAW)
 14559  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 14560  		v0.AddArg(x)
 14561  		v.AddArg2(v0, y)
 14562  		return true
 14563  	}
 14564  	// match: (Rsh16x32 x y)
 14565  	// result: (SRAW (SignExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [16]))))
 14566  	for {
 14567  		x := v_0
 14568  		y := v_1
 14569  		v.reset(OpPPC64SRAW)
 14570  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14571  		v0.AddArg(x)
 14572  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14573  		v1.AuxInt = int32ToAuxInt(0)
 14574  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14575  		v2.AuxInt = int64ToAuxInt(-1)
 14576  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14577  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14578  		v4.AuxInt = int64ToAuxInt(16)
 14579  		v3.AddArg2(y, v4)
 14580  		v1.AddArg3(y, v2, v3)
 14581  		v.AddArg2(v0, v1)
 14582  		return true
 14583  	}
 14584  }
 14585  func rewriteValuePPC64_OpRsh16x64(v *Value) bool {
 14586  	v_1 := v.Args[1]
 14587  	v_0 := v.Args[0]
 14588  	b := v.Block
 14589  	typ := &b.Func.Config.Types
 14590  	// match: (Rsh16x64 x (MOVDconst [c]))
 14591  	// cond: uint64(c) >= 16
 14592  	// result: (SRAWconst (SignExt16to32 x) [63])
 14593  	for {
 14594  		x := v_0
 14595  		if v_1.Op != OpPPC64MOVDconst {
 14596  			break
 14597  		}
 14598  		c := auxIntToInt64(v_1.AuxInt)
 14599  		if !(uint64(c) >= 16) {
 14600  			break
 14601  		}
 14602  		v.reset(OpPPC64SRAWconst)
 14603  		v.AuxInt = int64ToAuxInt(63)
 14604  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14605  		v0.AddArg(x)
 14606  		v.AddArg(v0)
 14607  		return true
 14608  	}
 14609  	// match: (Rsh16x64 x (MOVDconst [c]))
 14610  	// cond: uint64(c) < 16
 14611  	// result: (SRAWconst (SignExt16to32 x) [c])
 14612  	for {
 14613  		x := v_0
 14614  		if v_1.Op != OpPPC64MOVDconst {
 14615  			break
 14616  		}
 14617  		c := auxIntToInt64(v_1.AuxInt)
 14618  		if !(uint64(c) < 16) {
 14619  			break
 14620  		}
 14621  		v.reset(OpPPC64SRAWconst)
 14622  		v.AuxInt = int64ToAuxInt(c)
 14623  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14624  		v0.AddArg(x)
 14625  		v.AddArg(v0)
 14626  		return true
 14627  	}
 14628  	// match: (Rsh16x64 x y)
 14629  	// cond: shiftIsBounded(v)
 14630  	// result: (SRAW (MOVHreg x) y)
 14631  	for {
 14632  		x := v_0
 14633  		y := v_1
 14634  		if !(shiftIsBounded(v)) {
 14635  			break
 14636  		}
 14637  		v.reset(OpPPC64SRAW)
 14638  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 14639  		v0.AddArg(x)
 14640  		v.AddArg2(v0, y)
 14641  		return true
 14642  	}
 14643  	// match: (Rsh16x64 x y)
 14644  	// result: (SRAW (SignExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [16]))))
 14645  	for {
 14646  		x := v_0
 14647  		y := v_1
 14648  		v.reset(OpPPC64SRAW)
 14649  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14650  		v0.AddArg(x)
 14651  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14652  		v1.AuxInt = int32ToAuxInt(0)
 14653  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14654  		v2.AuxInt = int64ToAuxInt(-1)
 14655  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14656  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14657  		v4.AuxInt = int64ToAuxInt(16)
 14658  		v3.AddArg2(y, v4)
 14659  		v1.AddArg3(y, v2, v3)
 14660  		v.AddArg2(v0, v1)
 14661  		return true
 14662  	}
 14663  }
 14664  func rewriteValuePPC64_OpRsh16x8(v *Value) bool {
 14665  	v_1 := v.Args[1]
 14666  	v_0 := v.Args[0]
 14667  	b := v.Block
 14668  	typ := &b.Func.Config.Types
 14669  	// match: (Rsh16x8 x y)
 14670  	// cond: shiftIsBounded(v)
 14671  	// result: (SRAW (MOVHreg x) y)
 14672  	for {
 14673  		x := v_0
 14674  		y := v_1
 14675  		if !(shiftIsBounded(v)) {
 14676  			break
 14677  		}
 14678  		v.reset(OpPPC64SRAW)
 14679  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHreg, typ.Int64)
 14680  		v0.AddArg(x)
 14681  		v.AddArg2(v0, y)
 14682  		return true
 14683  	}
 14684  	// match: (Rsh16x8 x y)
 14685  	// result: (SRAW (SignExt16to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [16]))))
 14686  	for {
 14687  		x := v_0
 14688  		y := v_1
 14689  		v.reset(OpPPC64SRAW)
 14690  		v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
 14691  		v0.AddArg(x)
 14692  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14693  		v1.AuxInt = int32ToAuxInt(0)
 14694  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14695  		v2.AuxInt = int64ToAuxInt(-1)
 14696  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14697  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 14698  		v4.AddArg(y)
 14699  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14700  		v5.AuxInt = int64ToAuxInt(16)
 14701  		v3.AddArg2(v4, v5)
 14702  		v1.AddArg3(y, v2, v3)
 14703  		v.AddArg2(v0, v1)
 14704  		return true
 14705  	}
 14706  }
 14707  func rewriteValuePPC64_OpRsh32Ux16(v *Value) bool {
 14708  	v_1 := v.Args[1]
 14709  	v_0 := v.Args[0]
 14710  	b := v.Block
 14711  	typ := &b.Func.Config.Types
 14712  	// match: (Rsh32Ux16 x y)
 14713  	// cond: shiftIsBounded(v)
 14714  	// result: (SRW x y)
 14715  	for {
 14716  		x := v_0
 14717  		y := v_1
 14718  		if !(shiftIsBounded(v)) {
 14719  			break
 14720  		}
 14721  		v.reset(OpPPC64SRW)
 14722  		v.AddArg2(x, y)
 14723  		return true
 14724  	}
 14725  	// match: (Rsh32Ux16 x y)
 14726  	// result: (SRW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [32]))))
 14727  	for {
 14728  		x := v_0
 14729  		y := v_1
 14730  		v.reset(OpPPC64SRW)
 14731  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14732  		v0.AuxInt = int32ToAuxInt(0)
 14733  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14734  		v1.AuxInt = int64ToAuxInt(-1)
 14735  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14736  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 14737  		v3.AddArg(y)
 14738  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14739  		v4.AuxInt = int64ToAuxInt(32)
 14740  		v2.AddArg2(v3, v4)
 14741  		v0.AddArg3(y, v1, v2)
 14742  		v.AddArg2(x, v0)
 14743  		return true
 14744  	}
 14745  }
 14746  func rewriteValuePPC64_OpRsh32Ux32(v *Value) bool {
 14747  	v_1 := v.Args[1]
 14748  	v_0 := v.Args[0]
 14749  	b := v.Block
 14750  	typ := &b.Func.Config.Types
 14751  	// match: (Rsh32Ux32 x (MOVDconst [c]))
 14752  	// cond: uint32(c) < 32
 14753  	// result: (SRWconst x [c&31])
 14754  	for {
 14755  		x := v_0
 14756  		if v_1.Op != OpPPC64MOVDconst {
 14757  			break
 14758  		}
 14759  		c := auxIntToInt64(v_1.AuxInt)
 14760  		if !(uint32(c) < 32) {
 14761  			break
 14762  		}
 14763  		v.reset(OpPPC64SRWconst)
 14764  		v.AuxInt = int64ToAuxInt(c & 31)
 14765  		v.AddArg(x)
 14766  		return true
 14767  	}
 14768  	// match: (Rsh32Ux32 x y)
 14769  	// cond: shiftIsBounded(v)
 14770  	// result: (SRW x y)
 14771  	for {
 14772  		x := v_0
 14773  		y := v_1
 14774  		if !(shiftIsBounded(v)) {
 14775  			break
 14776  		}
 14777  		v.reset(OpPPC64SRW)
 14778  		v.AddArg2(x, y)
 14779  		return true
 14780  	}
 14781  	// match: (Rsh32Ux32 x y)
 14782  	// result: (SRW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [32]))))
 14783  	for {
 14784  		x := v_0
 14785  		y := v_1
 14786  		v.reset(OpPPC64SRW)
 14787  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 14788  		v0.AuxInt = int32ToAuxInt(0)
 14789  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14790  		v1.AuxInt = int64ToAuxInt(-1)
 14791  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 14792  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14793  		v3.AuxInt = int64ToAuxInt(32)
 14794  		v2.AddArg2(y, v3)
 14795  		v0.AddArg3(y, v1, v2)
 14796  		v.AddArg2(x, v0)
 14797  		return true
 14798  	}
 14799  }
 14800  func rewriteValuePPC64_OpRsh32Ux64(v *Value) bool {
 14801  	v_1 := v.Args[1]
 14802  	v_0 := v.Args[0]
 14803  	b := v.Block
 14804  	typ := &b.Func.Config.Types
 14805  	// match: (Rsh32Ux64 _ (MOVDconst [c]))
 14806  	// cond: uint64(c) >= 32
 14807  	// result: (MOVDconst [0])
 14808  	for {
 14809  		if v_1.Op != OpPPC64MOVDconst {
 14810  			break
 14811  		}
 14812  		c := auxIntToInt64(v_1.AuxInt)
 14813  		if !(uint64(c) >= 32) {
 14814  			break
 14815  		}
 14816  		v.reset(OpPPC64MOVDconst)
 14817  		v.AuxInt = int64ToAuxInt(0)
 14818  		return true
 14819  	}
 14820  	// match: (Rsh32Ux64 x (MOVDconst [c]))
 14821  	// cond: uint64(c) < 32
 14822  	// result: (SRWconst x [c])
 14823  	for {
 14824  		x := v_0
 14825  		if v_1.Op != OpPPC64MOVDconst {
 14826  			break
 14827  		}
 14828  		c := auxIntToInt64(v_1.AuxInt)
 14829  		if !(uint64(c) < 32) {
 14830  			break
 14831  		}
 14832  		v.reset(OpPPC64SRWconst)
 14833  		v.AuxInt = int64ToAuxInt(c)
 14834  		v.AddArg(x)
 14835  		return true
 14836  	}
 14837  	// match: (Rsh32Ux64 x y)
 14838  	// cond: shiftIsBounded(v)
 14839  	// result: (SRW x y)
 14840  	for {
 14841  		x := v_0
 14842  		y := v_1
 14843  		if !(shiftIsBounded(v)) {
 14844  			break
 14845  		}
 14846  		v.reset(OpPPC64SRW)
 14847  		v.AddArg2(x, y)
 14848  		return true
 14849  	}
 14850  	// match: (Rsh32Ux64 x (AND y (MOVDconst [31])))
 14851  	// result: (SRW x (ANDconst <typ.Int32> [31] y))
 14852  	for {
 14853  		x := v_0
 14854  		if v_1.Op != OpPPC64AND {
 14855  			break
 14856  		}
 14857  		_ = v_1.Args[1]
 14858  		v_1_0 := v_1.Args[0]
 14859  		v_1_1 := v_1.Args[1]
 14860  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 14861  			y := v_1_0
 14862  			if v_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1.AuxInt) != 31 {
 14863  				continue
 14864  			}
 14865  			v.reset(OpPPC64SRW)
 14866  			v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
 14867  			v0.AuxInt = int64ToAuxInt(31)
 14868  			v0.AddArg(y)
 14869  			v.AddArg2(x, v0)
 14870  			return true
 14871  		}
 14872  		break
 14873  	}
 14874  	// match: (Rsh32Ux64 x (ANDconst <typ.UInt> [31] y))
 14875  	// result: (SRW x (ANDconst <typ.UInt> [31] y))
 14876  	for {
 14877  		x := v_0
 14878  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 31 {
 14879  			break
 14880  		}
 14881  		y := v_1.Args[0]
 14882  		v.reset(OpPPC64SRW)
 14883  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 14884  		v0.AuxInt = int64ToAuxInt(31)
 14885  		v0.AddArg(y)
 14886  		v.AddArg2(x, v0)
 14887  		return true
 14888  	}
 14889  	// match: (Rsh32Ux64 x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y)))
 14890  	// result: (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y)))
 14891  	for {
 14892  		x := v_0
 14893  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 14894  			break
 14895  		}
 14896  		_ = v_1.Args[1]
 14897  		v_1_0 := v_1.Args[0]
 14898  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 32 {
 14899  			break
 14900  		}
 14901  		v_1_1 := v_1.Args[1]
 14902  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 31 {
 14903  			break
 14904  		}
 14905  		y := v_1_1.Args[0]
 14906  		v.reset(OpPPC64SRW)
 14907  		v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 14908  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14909  		v1.AuxInt = int64ToAuxInt(32)
 14910  		v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 14911  		v2.AuxInt = int64ToAuxInt(31)
 14912  		v2.AddArg(y)
 14913  		v0.AddArg2(v1, v2)
 14914  		v.AddArg2(x, v0)
 14915  		return true
 14916  	}
 14917  	// match: (Rsh32Ux64 x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y)))
 14918  	// result: (SRW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y)))
 14919  	for {
 14920  		x := v_0
 14921  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 32 {
 14922  			break
 14923  		}
 14924  		v_1_0 := v_1.Args[0]
 14925  		if v_1_0.Op != OpPPC64ANDconst || v_1_0.Type != typ.UInt || auxIntToInt64(v_1_0.AuxInt) != 31 {
 14926  			break
 14927  		}
 14928  		y := v_1_0.Args[0]
 14929  		v.reset(OpPPC64SRW)
 14930  		v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 14931  		v0.AuxInt = int64ToAuxInt(32)
 14932  		v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 14933  		v1.AuxInt = int64ToAuxInt(31)
 14934  		v1.AddArg(y)
 14935  		v0.AddArg(v1)
 14936  		v.AddArg2(x, v0)
 14937  		return true
 14938  	}
 14939  	// match: (Rsh32Ux64 x (SUB <typ.UInt> (MOVDconst [32]) (AND <typ.UInt> y (MOVDconst [31]))))
 14940  	// result: (SRW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y)))
 14941  	for {
 14942  		x := v_0
 14943  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 14944  			break
 14945  		}
 14946  		_ = v_1.Args[1]
 14947  		v_1_0 := v_1.Args[0]
 14948  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 32 {
 14949  			break
 14950  		}
 14951  		v_1_1 := v_1.Args[1]
 14952  		if v_1_1.Op != OpPPC64AND || v_1_1.Type != typ.UInt {
 14953  			break
 14954  		}
 14955  		_ = v_1_1.Args[1]
 14956  		v_1_1_0 := v_1_1.Args[0]
 14957  		v_1_1_1 := v_1_1.Args[1]
 14958  		for _i0 := 0; _i0 <= 1; _i0, v_1_1_0, v_1_1_1 = _i0+1, v_1_1_1, v_1_1_0 {
 14959  			y := v_1_1_0
 14960  			if v_1_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_1.AuxInt) != 31 {
 14961  				continue
 14962  			}
 14963  			v.reset(OpPPC64SRW)
 14964  			v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 14965  			v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 14966  			v1.AuxInt = int64ToAuxInt(32)
 14967  			v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 14968  			v2.AuxInt = int64ToAuxInt(31)
 14969  			v2.AddArg(y)
 14970  			v0.AddArg2(v1, v2)
 14971  			v.AddArg2(x, v0)
 14972  			return true
 14973  		}
 14974  		break
 14975  	}
 14976  	// match: (Rsh32Ux64 x (SUBFCconst <typ.UInt> [32] (AND <typ.UInt> y (MOVDconst [31]))))
 14977  	// result: (SRW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y)))
 14978  	for {
 14979  		x := v_0
 14980  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 32 {
 14981  			break
 14982  		}
 14983  		v_1_0 := v_1.Args[0]
 14984  		if v_1_0.Op != OpPPC64AND || v_1_0.Type != typ.UInt {
 14985  			break
 14986  		}
 14987  		_ = v_1_0.Args[1]
 14988  		v_1_0_0 := v_1_0.Args[0]
 14989  		v_1_0_1 := v_1_0.Args[1]
 14990  		for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
 14991  			y := v_1_0_0
 14992  			if v_1_0_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0_1.AuxInt) != 31 {
 14993  				continue
 14994  			}
 14995  			v.reset(OpPPC64SRW)
 14996  			v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 14997  			v0.AuxInt = int64ToAuxInt(32)
 14998  			v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 14999  			v1.AuxInt = int64ToAuxInt(31)
 15000  			v1.AddArg(y)
 15001  			v0.AddArg(v1)
 15002  			v.AddArg2(x, v0)
 15003  			return true
 15004  		}
 15005  		break
 15006  	}
 15007  	// match: (Rsh32Ux64 x y)
 15008  	// result: (SRW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [32]))))
 15009  	for {
 15010  		x := v_0
 15011  		y := v_1
 15012  		v.reset(OpPPC64SRW)
 15013  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15014  		v0.AuxInt = int32ToAuxInt(0)
 15015  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15016  		v1.AuxInt = int64ToAuxInt(-1)
 15017  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15018  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15019  		v3.AuxInt = int64ToAuxInt(32)
 15020  		v2.AddArg2(y, v3)
 15021  		v0.AddArg3(y, v1, v2)
 15022  		v.AddArg2(x, v0)
 15023  		return true
 15024  	}
 15025  }
 15026  func rewriteValuePPC64_OpRsh32Ux8(v *Value) bool {
 15027  	v_1 := v.Args[1]
 15028  	v_0 := v.Args[0]
 15029  	b := v.Block
 15030  	typ := &b.Func.Config.Types
 15031  	// match: (Rsh32Ux8 x y)
 15032  	// cond: shiftIsBounded(v)
 15033  	// result: (SRW x y)
 15034  	for {
 15035  		x := v_0
 15036  		y := v_1
 15037  		if !(shiftIsBounded(v)) {
 15038  			break
 15039  		}
 15040  		v.reset(OpPPC64SRW)
 15041  		v.AddArg2(x, y)
 15042  		return true
 15043  	}
 15044  	// match: (Rsh32Ux8 x y)
 15045  	// result: (SRW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [32]))))
 15046  	for {
 15047  		x := v_0
 15048  		y := v_1
 15049  		v.reset(OpPPC64SRW)
 15050  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15051  		v0.AuxInt = int32ToAuxInt(0)
 15052  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15053  		v1.AuxInt = int64ToAuxInt(-1)
 15054  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15055  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 15056  		v3.AddArg(y)
 15057  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15058  		v4.AuxInt = int64ToAuxInt(32)
 15059  		v2.AddArg2(v3, v4)
 15060  		v0.AddArg3(y, v1, v2)
 15061  		v.AddArg2(x, v0)
 15062  		return true
 15063  	}
 15064  }
 15065  func rewriteValuePPC64_OpRsh32x16(v *Value) bool {
 15066  	v_1 := v.Args[1]
 15067  	v_0 := v.Args[0]
 15068  	b := v.Block
 15069  	typ := &b.Func.Config.Types
 15070  	// match: (Rsh32x16 x y)
 15071  	// cond: shiftIsBounded(v)
 15072  	// result: (SRAW x y)
 15073  	for {
 15074  		x := v_0
 15075  		y := v_1
 15076  		if !(shiftIsBounded(v)) {
 15077  			break
 15078  		}
 15079  		v.reset(OpPPC64SRAW)
 15080  		v.AddArg2(x, y)
 15081  		return true
 15082  	}
 15083  	// match: (Rsh32x16 x y)
 15084  	// result: (SRAW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [32]))))
 15085  	for {
 15086  		x := v_0
 15087  		y := v_1
 15088  		v.reset(OpPPC64SRAW)
 15089  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15090  		v0.AuxInt = int32ToAuxInt(0)
 15091  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15092  		v1.AuxInt = int64ToAuxInt(-1)
 15093  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15094  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 15095  		v3.AddArg(y)
 15096  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15097  		v4.AuxInt = int64ToAuxInt(32)
 15098  		v2.AddArg2(v3, v4)
 15099  		v0.AddArg3(y, v1, v2)
 15100  		v.AddArg2(x, v0)
 15101  		return true
 15102  	}
 15103  }
 15104  func rewriteValuePPC64_OpRsh32x32(v *Value) bool {
 15105  	v_1 := v.Args[1]
 15106  	v_0 := v.Args[0]
 15107  	b := v.Block
 15108  	typ := &b.Func.Config.Types
 15109  	// match: (Rsh32x32 x (MOVDconst [c]))
 15110  	// cond: uint32(c) < 32
 15111  	// result: (SRAWconst x [c&31])
 15112  	for {
 15113  		x := v_0
 15114  		if v_1.Op != OpPPC64MOVDconst {
 15115  			break
 15116  		}
 15117  		c := auxIntToInt64(v_1.AuxInt)
 15118  		if !(uint32(c) < 32) {
 15119  			break
 15120  		}
 15121  		v.reset(OpPPC64SRAWconst)
 15122  		v.AuxInt = int64ToAuxInt(c & 31)
 15123  		v.AddArg(x)
 15124  		return true
 15125  	}
 15126  	// match: (Rsh32x32 x y)
 15127  	// cond: shiftIsBounded(v)
 15128  	// result: (SRAW x y)
 15129  	for {
 15130  		x := v_0
 15131  		y := v_1
 15132  		if !(shiftIsBounded(v)) {
 15133  			break
 15134  		}
 15135  		v.reset(OpPPC64SRAW)
 15136  		v.AddArg2(x, y)
 15137  		return true
 15138  	}
 15139  	// match: (Rsh32x32 x y)
 15140  	// result: (SRAW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [32]))))
 15141  	for {
 15142  		x := v_0
 15143  		y := v_1
 15144  		v.reset(OpPPC64SRAW)
 15145  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15146  		v0.AuxInt = int32ToAuxInt(0)
 15147  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15148  		v1.AuxInt = int64ToAuxInt(-1)
 15149  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15150  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15151  		v3.AuxInt = int64ToAuxInt(32)
 15152  		v2.AddArg2(y, v3)
 15153  		v0.AddArg3(y, v1, v2)
 15154  		v.AddArg2(x, v0)
 15155  		return true
 15156  	}
 15157  }
 15158  func rewriteValuePPC64_OpRsh32x64(v *Value) bool {
 15159  	v_1 := v.Args[1]
 15160  	v_0 := v.Args[0]
 15161  	b := v.Block
 15162  	typ := &b.Func.Config.Types
 15163  	// match: (Rsh32x64 x (MOVDconst [c]))
 15164  	// cond: uint64(c) >= 32
 15165  	// result: (SRAWconst x [63])
 15166  	for {
 15167  		x := v_0
 15168  		if v_1.Op != OpPPC64MOVDconst {
 15169  			break
 15170  		}
 15171  		c := auxIntToInt64(v_1.AuxInt)
 15172  		if !(uint64(c) >= 32) {
 15173  			break
 15174  		}
 15175  		v.reset(OpPPC64SRAWconst)
 15176  		v.AuxInt = int64ToAuxInt(63)
 15177  		v.AddArg(x)
 15178  		return true
 15179  	}
 15180  	// match: (Rsh32x64 x (MOVDconst [c]))
 15181  	// cond: uint64(c) < 32
 15182  	// result: (SRAWconst x [c])
 15183  	for {
 15184  		x := v_0
 15185  		if v_1.Op != OpPPC64MOVDconst {
 15186  			break
 15187  		}
 15188  		c := auxIntToInt64(v_1.AuxInt)
 15189  		if !(uint64(c) < 32) {
 15190  			break
 15191  		}
 15192  		v.reset(OpPPC64SRAWconst)
 15193  		v.AuxInt = int64ToAuxInt(c)
 15194  		v.AddArg(x)
 15195  		return true
 15196  	}
 15197  	// match: (Rsh32x64 x y)
 15198  	// cond: shiftIsBounded(v)
 15199  	// result: (SRAW x y)
 15200  	for {
 15201  		x := v_0
 15202  		y := v_1
 15203  		if !(shiftIsBounded(v)) {
 15204  			break
 15205  		}
 15206  		v.reset(OpPPC64SRAW)
 15207  		v.AddArg2(x, y)
 15208  		return true
 15209  	}
 15210  	// match: (Rsh32x64 x (AND y (MOVDconst [31])))
 15211  	// result: (SRAW x (ANDconst <typ.Int32> [31] y))
 15212  	for {
 15213  		x := v_0
 15214  		if v_1.Op != OpPPC64AND {
 15215  			break
 15216  		}
 15217  		_ = v_1.Args[1]
 15218  		v_1_0 := v_1.Args[0]
 15219  		v_1_1 := v_1.Args[1]
 15220  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 15221  			y := v_1_0
 15222  			if v_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1.AuxInt) != 31 {
 15223  				continue
 15224  			}
 15225  			v.reset(OpPPC64SRAW)
 15226  			v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int32)
 15227  			v0.AuxInt = int64ToAuxInt(31)
 15228  			v0.AddArg(y)
 15229  			v.AddArg2(x, v0)
 15230  			return true
 15231  		}
 15232  		break
 15233  	}
 15234  	// match: (Rsh32x64 x (ANDconst <typ.UInt> [31] y))
 15235  	// result: (SRAW x (ANDconst <typ.UInt> [31] y))
 15236  	for {
 15237  		x := v_0
 15238  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 31 {
 15239  			break
 15240  		}
 15241  		y := v_1.Args[0]
 15242  		v.reset(OpPPC64SRAW)
 15243  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15244  		v0.AuxInt = int64ToAuxInt(31)
 15245  		v0.AddArg(y)
 15246  		v.AddArg2(x, v0)
 15247  		return true
 15248  	}
 15249  	// match: (Rsh32x64 x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y)))
 15250  	// result: (SRAW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y)))
 15251  	for {
 15252  		x := v_0
 15253  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 15254  			break
 15255  		}
 15256  		_ = v_1.Args[1]
 15257  		v_1_0 := v_1.Args[0]
 15258  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 32 {
 15259  			break
 15260  		}
 15261  		v_1_1 := v_1.Args[1]
 15262  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 31 {
 15263  			break
 15264  		}
 15265  		y := v_1_1.Args[0]
 15266  		v.reset(OpPPC64SRAW)
 15267  		v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 15268  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15269  		v1.AuxInt = int64ToAuxInt(32)
 15270  		v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15271  		v2.AuxInt = int64ToAuxInt(31)
 15272  		v2.AddArg(y)
 15273  		v0.AddArg2(v1, v2)
 15274  		v.AddArg2(x, v0)
 15275  		return true
 15276  	}
 15277  	// match: (Rsh32x64 x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y)))
 15278  	// result: (SRAW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y)))
 15279  	for {
 15280  		x := v_0
 15281  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 32 {
 15282  			break
 15283  		}
 15284  		v_1_0 := v_1.Args[0]
 15285  		if v_1_0.Op != OpPPC64ANDconst || v_1_0.Type != typ.UInt || auxIntToInt64(v_1_0.AuxInt) != 31 {
 15286  			break
 15287  		}
 15288  		y := v_1_0.Args[0]
 15289  		v.reset(OpPPC64SRAW)
 15290  		v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 15291  		v0.AuxInt = int64ToAuxInt(32)
 15292  		v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15293  		v1.AuxInt = int64ToAuxInt(31)
 15294  		v1.AddArg(y)
 15295  		v0.AddArg(v1)
 15296  		v.AddArg2(x, v0)
 15297  		return true
 15298  	}
 15299  	// match: (Rsh32x64 x (SUB <typ.UInt> (MOVDconst [32]) (AND <typ.UInt> y (MOVDconst [31]))))
 15300  	// result: (SRAW x (SUB <typ.UInt> (MOVDconst [32]) (ANDconst <typ.UInt> [31] y)))
 15301  	for {
 15302  		x := v_0
 15303  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 15304  			break
 15305  		}
 15306  		_ = v_1.Args[1]
 15307  		v_1_0 := v_1.Args[0]
 15308  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 32 {
 15309  			break
 15310  		}
 15311  		v_1_1 := v_1.Args[1]
 15312  		if v_1_1.Op != OpPPC64AND || v_1_1.Type != typ.UInt {
 15313  			break
 15314  		}
 15315  		_ = v_1_1.Args[1]
 15316  		v_1_1_0 := v_1_1.Args[0]
 15317  		v_1_1_1 := v_1_1.Args[1]
 15318  		for _i0 := 0; _i0 <= 1; _i0, v_1_1_0, v_1_1_1 = _i0+1, v_1_1_1, v_1_1_0 {
 15319  			y := v_1_1_0
 15320  			if v_1_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_1.AuxInt) != 31 {
 15321  				continue
 15322  			}
 15323  			v.reset(OpPPC64SRAW)
 15324  			v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 15325  			v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15326  			v1.AuxInt = int64ToAuxInt(32)
 15327  			v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15328  			v2.AuxInt = int64ToAuxInt(31)
 15329  			v2.AddArg(y)
 15330  			v0.AddArg2(v1, v2)
 15331  			v.AddArg2(x, v0)
 15332  			return true
 15333  		}
 15334  		break
 15335  	}
 15336  	// match: (Rsh32x64 x (SUBFCconst <typ.UInt> [32] (AND <typ.UInt> y (MOVDconst [31]))))
 15337  	// result: (SRAW x (SUBFCconst <typ.UInt> [32] (ANDconst <typ.UInt> [31] y)))
 15338  	for {
 15339  		x := v_0
 15340  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 32 {
 15341  			break
 15342  		}
 15343  		v_1_0 := v_1.Args[0]
 15344  		if v_1_0.Op != OpPPC64AND || v_1_0.Type != typ.UInt {
 15345  			break
 15346  		}
 15347  		_ = v_1_0.Args[1]
 15348  		v_1_0_0 := v_1_0.Args[0]
 15349  		v_1_0_1 := v_1_0.Args[1]
 15350  		for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
 15351  			y := v_1_0_0
 15352  			if v_1_0_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0_1.AuxInt) != 31 {
 15353  				continue
 15354  			}
 15355  			v.reset(OpPPC64SRAW)
 15356  			v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 15357  			v0.AuxInt = int64ToAuxInt(32)
 15358  			v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15359  			v1.AuxInt = int64ToAuxInt(31)
 15360  			v1.AddArg(y)
 15361  			v0.AddArg(v1)
 15362  			v.AddArg2(x, v0)
 15363  			return true
 15364  		}
 15365  		break
 15366  	}
 15367  	// match: (Rsh32x64 x y)
 15368  	// result: (SRAW x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [32]))))
 15369  	for {
 15370  		x := v_0
 15371  		y := v_1
 15372  		v.reset(OpPPC64SRAW)
 15373  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15374  		v0.AuxInt = int32ToAuxInt(0)
 15375  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15376  		v1.AuxInt = int64ToAuxInt(-1)
 15377  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15378  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15379  		v3.AuxInt = int64ToAuxInt(32)
 15380  		v2.AddArg2(y, v3)
 15381  		v0.AddArg3(y, v1, v2)
 15382  		v.AddArg2(x, v0)
 15383  		return true
 15384  	}
 15385  }
 15386  func rewriteValuePPC64_OpRsh32x8(v *Value) bool {
 15387  	v_1 := v.Args[1]
 15388  	v_0 := v.Args[0]
 15389  	b := v.Block
 15390  	typ := &b.Func.Config.Types
 15391  	// match: (Rsh32x8 x y)
 15392  	// cond: shiftIsBounded(v)
 15393  	// result: (SRAW x y)
 15394  	for {
 15395  		x := v_0
 15396  		y := v_1
 15397  		if !(shiftIsBounded(v)) {
 15398  			break
 15399  		}
 15400  		v.reset(OpPPC64SRAW)
 15401  		v.AddArg2(x, y)
 15402  		return true
 15403  	}
 15404  	// match: (Rsh32x8 x y)
 15405  	// result: (SRAW x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [32]))))
 15406  	for {
 15407  		x := v_0
 15408  		y := v_1
 15409  		v.reset(OpPPC64SRAW)
 15410  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15411  		v0.AuxInt = int32ToAuxInt(0)
 15412  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15413  		v1.AuxInt = int64ToAuxInt(-1)
 15414  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15415  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 15416  		v3.AddArg(y)
 15417  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15418  		v4.AuxInt = int64ToAuxInt(32)
 15419  		v2.AddArg2(v3, v4)
 15420  		v0.AddArg3(y, v1, v2)
 15421  		v.AddArg2(x, v0)
 15422  		return true
 15423  	}
 15424  }
 15425  func rewriteValuePPC64_OpRsh64Ux16(v *Value) bool {
 15426  	v_1 := v.Args[1]
 15427  	v_0 := v.Args[0]
 15428  	b := v.Block
 15429  	typ := &b.Func.Config.Types
 15430  	// match: (Rsh64Ux16 x y)
 15431  	// cond: shiftIsBounded(v)
 15432  	// result: (SRD x y)
 15433  	for {
 15434  		x := v_0
 15435  		y := v_1
 15436  		if !(shiftIsBounded(v)) {
 15437  			break
 15438  		}
 15439  		v.reset(OpPPC64SRD)
 15440  		v.AddArg2(x, y)
 15441  		return true
 15442  	}
 15443  	// match: (Rsh64Ux16 x y)
 15444  	// result: (SRD x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [64]))))
 15445  	for {
 15446  		x := v_0
 15447  		y := v_1
 15448  		v.reset(OpPPC64SRD)
 15449  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15450  		v0.AuxInt = int32ToAuxInt(0)
 15451  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15452  		v1.AuxInt = int64ToAuxInt(-1)
 15453  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15454  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 15455  		v3.AddArg(y)
 15456  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15457  		v4.AuxInt = int64ToAuxInt(64)
 15458  		v2.AddArg2(v3, v4)
 15459  		v0.AddArg3(y, v1, v2)
 15460  		v.AddArg2(x, v0)
 15461  		return true
 15462  	}
 15463  }
 15464  func rewriteValuePPC64_OpRsh64Ux32(v *Value) bool {
 15465  	v_1 := v.Args[1]
 15466  	v_0 := v.Args[0]
 15467  	b := v.Block
 15468  	typ := &b.Func.Config.Types
 15469  	// match: (Rsh64Ux32 x (MOVDconst [c]))
 15470  	// cond: uint32(c) < 64
 15471  	// result: (SRDconst x [c&63])
 15472  	for {
 15473  		x := v_0
 15474  		if v_1.Op != OpPPC64MOVDconst {
 15475  			break
 15476  		}
 15477  		c := auxIntToInt64(v_1.AuxInt)
 15478  		if !(uint32(c) < 64) {
 15479  			break
 15480  		}
 15481  		v.reset(OpPPC64SRDconst)
 15482  		v.AuxInt = int64ToAuxInt(c & 63)
 15483  		v.AddArg(x)
 15484  		return true
 15485  	}
 15486  	// match: (Rsh64Ux32 x y)
 15487  	// cond: shiftIsBounded(v)
 15488  	// result: (SRD x y)
 15489  	for {
 15490  		x := v_0
 15491  		y := v_1
 15492  		if !(shiftIsBounded(v)) {
 15493  			break
 15494  		}
 15495  		v.reset(OpPPC64SRD)
 15496  		v.AddArg2(x, y)
 15497  		return true
 15498  	}
 15499  	// match: (Rsh64Ux32 x y)
 15500  	// result: (SRD x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [64]))))
 15501  	for {
 15502  		x := v_0
 15503  		y := v_1
 15504  		v.reset(OpPPC64SRD)
 15505  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15506  		v0.AuxInt = int32ToAuxInt(0)
 15507  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15508  		v1.AuxInt = int64ToAuxInt(-1)
 15509  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15510  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15511  		v3.AuxInt = int64ToAuxInt(64)
 15512  		v2.AddArg2(y, v3)
 15513  		v0.AddArg3(y, v1, v2)
 15514  		v.AddArg2(x, v0)
 15515  		return true
 15516  	}
 15517  }
 15518  func rewriteValuePPC64_OpRsh64Ux64(v *Value) bool {
 15519  	v_1 := v.Args[1]
 15520  	v_0 := v.Args[0]
 15521  	b := v.Block
 15522  	typ := &b.Func.Config.Types
 15523  	// match: (Rsh64Ux64 _ (MOVDconst [c]))
 15524  	// cond: uint64(c) >= 64
 15525  	// result: (MOVDconst [0])
 15526  	for {
 15527  		if v_1.Op != OpPPC64MOVDconst {
 15528  			break
 15529  		}
 15530  		c := auxIntToInt64(v_1.AuxInt)
 15531  		if !(uint64(c) >= 64) {
 15532  			break
 15533  		}
 15534  		v.reset(OpPPC64MOVDconst)
 15535  		v.AuxInt = int64ToAuxInt(0)
 15536  		return true
 15537  	}
 15538  	// match: (Rsh64Ux64 x (MOVDconst [c]))
 15539  	// cond: uint64(c) < 64
 15540  	// result: (SRDconst x [c])
 15541  	for {
 15542  		x := v_0
 15543  		if v_1.Op != OpPPC64MOVDconst {
 15544  			break
 15545  		}
 15546  		c := auxIntToInt64(v_1.AuxInt)
 15547  		if !(uint64(c) < 64) {
 15548  			break
 15549  		}
 15550  		v.reset(OpPPC64SRDconst)
 15551  		v.AuxInt = int64ToAuxInt(c)
 15552  		v.AddArg(x)
 15553  		return true
 15554  	}
 15555  	// match: (Rsh64Ux64 x y)
 15556  	// cond: shiftIsBounded(v)
 15557  	// result: (SRD x y)
 15558  	for {
 15559  		x := v_0
 15560  		y := v_1
 15561  		if !(shiftIsBounded(v)) {
 15562  			break
 15563  		}
 15564  		v.reset(OpPPC64SRD)
 15565  		v.AddArg2(x, y)
 15566  		return true
 15567  	}
 15568  	// match: (Rsh64Ux64 x (AND y (MOVDconst [63])))
 15569  	// result: (SRD x (ANDconst <typ.Int64> [63] y))
 15570  	for {
 15571  		x := v_0
 15572  		if v_1.Op != OpPPC64AND {
 15573  			break
 15574  		}
 15575  		_ = v_1.Args[1]
 15576  		v_1_0 := v_1.Args[0]
 15577  		v_1_1 := v_1.Args[1]
 15578  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 15579  			y := v_1_0
 15580  			if v_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1.AuxInt) != 63 {
 15581  				continue
 15582  			}
 15583  			v.reset(OpPPC64SRD)
 15584  			v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
 15585  			v0.AuxInt = int64ToAuxInt(63)
 15586  			v0.AddArg(y)
 15587  			v.AddArg2(x, v0)
 15588  			return true
 15589  		}
 15590  		break
 15591  	}
 15592  	// match: (Rsh64Ux64 x (ANDconst <typ.UInt> [63] y))
 15593  	// result: (SRD x (ANDconst <typ.UInt> [63] y))
 15594  	for {
 15595  		x := v_0
 15596  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 63 {
 15597  			break
 15598  		}
 15599  		y := v_1.Args[0]
 15600  		v.reset(OpPPC64SRD)
 15601  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15602  		v0.AuxInt = int64ToAuxInt(63)
 15603  		v0.AddArg(y)
 15604  		v.AddArg2(x, v0)
 15605  		return true
 15606  	}
 15607  	// match: (Rsh64Ux64 x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y)))
 15608  	// result: (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y)))
 15609  	for {
 15610  		x := v_0
 15611  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 15612  			break
 15613  		}
 15614  		_ = v_1.Args[1]
 15615  		v_1_0 := v_1.Args[0]
 15616  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 64 {
 15617  			break
 15618  		}
 15619  		v_1_1 := v_1.Args[1]
 15620  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 63 {
 15621  			break
 15622  		}
 15623  		y := v_1_1.Args[0]
 15624  		v.reset(OpPPC64SRD)
 15625  		v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 15626  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15627  		v1.AuxInt = int64ToAuxInt(64)
 15628  		v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15629  		v2.AuxInt = int64ToAuxInt(63)
 15630  		v2.AddArg(y)
 15631  		v0.AddArg2(v1, v2)
 15632  		v.AddArg2(x, v0)
 15633  		return true
 15634  	}
 15635  	// match: (Rsh64Ux64 x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y)))
 15636  	// result: (SRD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y)))
 15637  	for {
 15638  		x := v_0
 15639  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 64 {
 15640  			break
 15641  		}
 15642  		v_1_0 := v_1.Args[0]
 15643  		if v_1_0.Op != OpPPC64ANDconst || v_1_0.Type != typ.UInt || auxIntToInt64(v_1_0.AuxInt) != 63 {
 15644  			break
 15645  		}
 15646  		y := v_1_0.Args[0]
 15647  		v.reset(OpPPC64SRD)
 15648  		v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 15649  		v0.AuxInt = int64ToAuxInt(64)
 15650  		v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15651  		v1.AuxInt = int64ToAuxInt(63)
 15652  		v1.AddArg(y)
 15653  		v0.AddArg(v1)
 15654  		v.AddArg2(x, v0)
 15655  		return true
 15656  	}
 15657  	// match: (Rsh64Ux64 x (SUB <typ.UInt> (MOVDconst [64]) (AND <typ.UInt> y (MOVDconst [63]))))
 15658  	// result: (SRD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y)))
 15659  	for {
 15660  		x := v_0
 15661  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 15662  			break
 15663  		}
 15664  		_ = v_1.Args[1]
 15665  		v_1_0 := v_1.Args[0]
 15666  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 64 {
 15667  			break
 15668  		}
 15669  		v_1_1 := v_1.Args[1]
 15670  		if v_1_1.Op != OpPPC64AND || v_1_1.Type != typ.UInt {
 15671  			break
 15672  		}
 15673  		_ = v_1_1.Args[1]
 15674  		v_1_1_0 := v_1_1.Args[0]
 15675  		v_1_1_1 := v_1_1.Args[1]
 15676  		for _i0 := 0; _i0 <= 1; _i0, v_1_1_0, v_1_1_1 = _i0+1, v_1_1_1, v_1_1_0 {
 15677  			y := v_1_1_0
 15678  			if v_1_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_1.AuxInt) != 63 {
 15679  				continue
 15680  			}
 15681  			v.reset(OpPPC64SRD)
 15682  			v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 15683  			v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15684  			v1.AuxInt = int64ToAuxInt(64)
 15685  			v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15686  			v2.AuxInt = int64ToAuxInt(63)
 15687  			v2.AddArg(y)
 15688  			v0.AddArg2(v1, v2)
 15689  			v.AddArg2(x, v0)
 15690  			return true
 15691  		}
 15692  		break
 15693  	}
 15694  	// match: (Rsh64Ux64 x (SUBFCconst <typ.UInt> [64] (AND <typ.UInt> y (MOVDconst [63]))))
 15695  	// result: (SRD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y)))
 15696  	for {
 15697  		x := v_0
 15698  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 64 {
 15699  			break
 15700  		}
 15701  		v_1_0 := v_1.Args[0]
 15702  		if v_1_0.Op != OpPPC64AND || v_1_0.Type != typ.UInt {
 15703  			break
 15704  		}
 15705  		_ = v_1_0.Args[1]
 15706  		v_1_0_0 := v_1_0.Args[0]
 15707  		v_1_0_1 := v_1_0.Args[1]
 15708  		for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
 15709  			y := v_1_0_0
 15710  			if v_1_0_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0_1.AuxInt) != 63 {
 15711  				continue
 15712  			}
 15713  			v.reset(OpPPC64SRD)
 15714  			v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 15715  			v0.AuxInt = int64ToAuxInt(64)
 15716  			v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15717  			v1.AuxInt = int64ToAuxInt(63)
 15718  			v1.AddArg(y)
 15719  			v0.AddArg(v1)
 15720  			v.AddArg2(x, v0)
 15721  			return true
 15722  		}
 15723  		break
 15724  	}
 15725  	// match: (Rsh64Ux64 x y)
 15726  	// result: (SRD x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [64]))))
 15727  	for {
 15728  		x := v_0
 15729  		y := v_1
 15730  		v.reset(OpPPC64SRD)
 15731  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15732  		v0.AuxInt = int32ToAuxInt(0)
 15733  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15734  		v1.AuxInt = int64ToAuxInt(-1)
 15735  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15736  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15737  		v3.AuxInt = int64ToAuxInt(64)
 15738  		v2.AddArg2(y, v3)
 15739  		v0.AddArg3(y, v1, v2)
 15740  		v.AddArg2(x, v0)
 15741  		return true
 15742  	}
 15743  }
 15744  func rewriteValuePPC64_OpRsh64Ux8(v *Value) bool {
 15745  	v_1 := v.Args[1]
 15746  	v_0 := v.Args[0]
 15747  	b := v.Block
 15748  	typ := &b.Func.Config.Types
 15749  	// match: (Rsh64Ux8 x y)
 15750  	// cond: shiftIsBounded(v)
 15751  	// result: (SRD x y)
 15752  	for {
 15753  		x := v_0
 15754  		y := v_1
 15755  		if !(shiftIsBounded(v)) {
 15756  			break
 15757  		}
 15758  		v.reset(OpPPC64SRD)
 15759  		v.AddArg2(x, y)
 15760  		return true
 15761  	}
 15762  	// match: (Rsh64Ux8 x y)
 15763  	// result: (SRD x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [64]))))
 15764  	for {
 15765  		x := v_0
 15766  		y := v_1
 15767  		v.reset(OpPPC64SRD)
 15768  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15769  		v0.AuxInt = int32ToAuxInt(0)
 15770  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15771  		v1.AuxInt = int64ToAuxInt(-1)
 15772  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15773  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 15774  		v3.AddArg(y)
 15775  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15776  		v4.AuxInt = int64ToAuxInt(64)
 15777  		v2.AddArg2(v3, v4)
 15778  		v0.AddArg3(y, v1, v2)
 15779  		v.AddArg2(x, v0)
 15780  		return true
 15781  	}
 15782  }
 15783  func rewriteValuePPC64_OpRsh64x16(v *Value) bool {
 15784  	v_1 := v.Args[1]
 15785  	v_0 := v.Args[0]
 15786  	b := v.Block
 15787  	typ := &b.Func.Config.Types
 15788  	// match: (Rsh64x16 x y)
 15789  	// cond: shiftIsBounded(v)
 15790  	// result: (SRAD x y)
 15791  	for {
 15792  		x := v_0
 15793  		y := v_1
 15794  		if !(shiftIsBounded(v)) {
 15795  			break
 15796  		}
 15797  		v.reset(OpPPC64SRAD)
 15798  		v.AddArg2(x, y)
 15799  		return true
 15800  	}
 15801  	// match: (Rsh64x16 x y)
 15802  	// result: (SRAD x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [64]))))
 15803  	for {
 15804  		x := v_0
 15805  		y := v_1
 15806  		v.reset(OpPPC64SRAD)
 15807  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15808  		v0.AuxInt = int32ToAuxInt(0)
 15809  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15810  		v1.AuxInt = int64ToAuxInt(-1)
 15811  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15812  		v3 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 15813  		v3.AddArg(y)
 15814  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15815  		v4.AuxInt = int64ToAuxInt(64)
 15816  		v2.AddArg2(v3, v4)
 15817  		v0.AddArg3(y, v1, v2)
 15818  		v.AddArg2(x, v0)
 15819  		return true
 15820  	}
 15821  }
 15822  func rewriteValuePPC64_OpRsh64x32(v *Value) bool {
 15823  	v_1 := v.Args[1]
 15824  	v_0 := v.Args[0]
 15825  	b := v.Block
 15826  	typ := &b.Func.Config.Types
 15827  	// match: (Rsh64x32 x (MOVDconst [c]))
 15828  	// cond: uint32(c) < 64
 15829  	// result: (SRADconst x [c&63])
 15830  	for {
 15831  		x := v_0
 15832  		if v_1.Op != OpPPC64MOVDconst {
 15833  			break
 15834  		}
 15835  		c := auxIntToInt64(v_1.AuxInt)
 15836  		if !(uint32(c) < 64) {
 15837  			break
 15838  		}
 15839  		v.reset(OpPPC64SRADconst)
 15840  		v.AuxInt = int64ToAuxInt(c & 63)
 15841  		v.AddArg(x)
 15842  		return true
 15843  	}
 15844  	// match: (Rsh64x32 x y)
 15845  	// cond: shiftIsBounded(v)
 15846  	// result: (SRAD x y)
 15847  	for {
 15848  		x := v_0
 15849  		y := v_1
 15850  		if !(shiftIsBounded(v)) {
 15851  			break
 15852  		}
 15853  		v.reset(OpPPC64SRAD)
 15854  		v.AddArg2(x, y)
 15855  		return true
 15856  	}
 15857  	// match: (Rsh64x32 x y)
 15858  	// result: (SRAD x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [64]))))
 15859  	for {
 15860  		x := v_0
 15861  		y := v_1
 15862  		v.reset(OpPPC64SRAD)
 15863  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 15864  		v0.AuxInt = int32ToAuxInt(0)
 15865  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15866  		v1.AuxInt = int64ToAuxInt(-1)
 15867  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 15868  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15869  		v3.AuxInt = int64ToAuxInt(64)
 15870  		v2.AddArg2(y, v3)
 15871  		v0.AddArg3(y, v1, v2)
 15872  		v.AddArg2(x, v0)
 15873  		return true
 15874  	}
 15875  }
 15876  func rewriteValuePPC64_OpRsh64x64(v *Value) bool {
 15877  	v_1 := v.Args[1]
 15878  	v_0 := v.Args[0]
 15879  	b := v.Block
 15880  	typ := &b.Func.Config.Types
 15881  	// match: (Rsh64x64 x (MOVDconst [c]))
 15882  	// cond: uint64(c) >= 64
 15883  	// result: (SRADconst x [63])
 15884  	for {
 15885  		x := v_0
 15886  		if v_1.Op != OpPPC64MOVDconst {
 15887  			break
 15888  		}
 15889  		c := auxIntToInt64(v_1.AuxInt)
 15890  		if !(uint64(c) >= 64) {
 15891  			break
 15892  		}
 15893  		v.reset(OpPPC64SRADconst)
 15894  		v.AuxInt = int64ToAuxInt(63)
 15895  		v.AddArg(x)
 15896  		return true
 15897  	}
 15898  	// match: (Rsh64x64 x (MOVDconst [c]))
 15899  	// cond: uint64(c) < 64
 15900  	// result: (SRADconst x [c])
 15901  	for {
 15902  		x := v_0
 15903  		if v_1.Op != OpPPC64MOVDconst {
 15904  			break
 15905  		}
 15906  		c := auxIntToInt64(v_1.AuxInt)
 15907  		if !(uint64(c) < 64) {
 15908  			break
 15909  		}
 15910  		v.reset(OpPPC64SRADconst)
 15911  		v.AuxInt = int64ToAuxInt(c)
 15912  		v.AddArg(x)
 15913  		return true
 15914  	}
 15915  	// match: (Rsh64x64 x y)
 15916  	// cond: shiftIsBounded(v)
 15917  	// result: (SRAD x y)
 15918  	for {
 15919  		x := v_0
 15920  		y := v_1
 15921  		if !(shiftIsBounded(v)) {
 15922  			break
 15923  		}
 15924  		v.reset(OpPPC64SRAD)
 15925  		v.AddArg2(x, y)
 15926  		return true
 15927  	}
 15928  	// match: (Rsh64x64 x (AND y (MOVDconst [63])))
 15929  	// result: (SRAD x (ANDconst <typ.Int64> [63] y))
 15930  	for {
 15931  		x := v_0
 15932  		if v_1.Op != OpPPC64AND {
 15933  			break
 15934  		}
 15935  		_ = v_1.Args[1]
 15936  		v_1_0 := v_1.Args[0]
 15937  		v_1_1 := v_1.Args[1]
 15938  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 15939  			y := v_1_0
 15940  			if v_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1.AuxInt) != 63 {
 15941  				continue
 15942  			}
 15943  			v.reset(OpPPC64SRAD)
 15944  			v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.Int64)
 15945  			v0.AuxInt = int64ToAuxInt(63)
 15946  			v0.AddArg(y)
 15947  			v.AddArg2(x, v0)
 15948  			return true
 15949  		}
 15950  		break
 15951  	}
 15952  	// match: (Rsh64x64 x (ANDconst <typ.UInt> [63] y))
 15953  	// result: (SRAD x (ANDconst <typ.UInt> [63] y))
 15954  	for {
 15955  		x := v_0
 15956  		if v_1.Op != OpPPC64ANDconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 63 {
 15957  			break
 15958  		}
 15959  		y := v_1.Args[0]
 15960  		v.reset(OpPPC64SRAD)
 15961  		v0 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15962  		v0.AuxInt = int64ToAuxInt(63)
 15963  		v0.AddArg(y)
 15964  		v.AddArg2(x, v0)
 15965  		return true
 15966  	}
 15967  	// match: (Rsh64x64 x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y)))
 15968  	// result: (SRAD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y)))
 15969  	for {
 15970  		x := v_0
 15971  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 15972  			break
 15973  		}
 15974  		_ = v_1.Args[1]
 15975  		v_1_0 := v_1.Args[0]
 15976  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 64 {
 15977  			break
 15978  		}
 15979  		v_1_1 := v_1.Args[1]
 15980  		if v_1_1.Op != OpPPC64ANDconst || v_1_1.Type != typ.UInt || auxIntToInt64(v_1_1.AuxInt) != 63 {
 15981  			break
 15982  		}
 15983  		y := v_1_1.Args[0]
 15984  		v.reset(OpPPC64SRAD)
 15985  		v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 15986  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 15987  		v1.AuxInt = int64ToAuxInt(64)
 15988  		v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 15989  		v2.AuxInt = int64ToAuxInt(63)
 15990  		v2.AddArg(y)
 15991  		v0.AddArg2(v1, v2)
 15992  		v.AddArg2(x, v0)
 15993  		return true
 15994  	}
 15995  	// match: (Rsh64x64 x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y)))
 15996  	// result: (SRAD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y)))
 15997  	for {
 15998  		x := v_0
 15999  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 64 {
 16000  			break
 16001  		}
 16002  		v_1_0 := v_1.Args[0]
 16003  		if v_1_0.Op != OpPPC64ANDconst || v_1_0.Type != typ.UInt || auxIntToInt64(v_1_0.AuxInt) != 63 {
 16004  			break
 16005  		}
 16006  		y := v_1_0.Args[0]
 16007  		v.reset(OpPPC64SRAD)
 16008  		v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 16009  		v0.AuxInt = int64ToAuxInt(64)
 16010  		v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 16011  		v1.AuxInt = int64ToAuxInt(63)
 16012  		v1.AddArg(y)
 16013  		v0.AddArg(v1)
 16014  		v.AddArg2(x, v0)
 16015  		return true
 16016  	}
 16017  	// match: (Rsh64x64 x (SUB <typ.UInt> (MOVDconst [64]) (AND <typ.UInt> y (MOVDconst [63]))))
 16018  	// result: (SRAD x (SUB <typ.UInt> (MOVDconst [64]) (ANDconst <typ.UInt> [63] y)))
 16019  	for {
 16020  		x := v_0
 16021  		if v_1.Op != OpPPC64SUB || v_1.Type != typ.UInt {
 16022  			break
 16023  		}
 16024  		_ = v_1.Args[1]
 16025  		v_1_0 := v_1.Args[0]
 16026  		if v_1_0.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0.AuxInt) != 64 {
 16027  			break
 16028  		}
 16029  		v_1_1 := v_1.Args[1]
 16030  		if v_1_1.Op != OpPPC64AND || v_1_1.Type != typ.UInt {
 16031  			break
 16032  		}
 16033  		_ = v_1_1.Args[1]
 16034  		v_1_1_0 := v_1_1.Args[0]
 16035  		v_1_1_1 := v_1_1.Args[1]
 16036  		for _i0 := 0; _i0 <= 1; _i0, v_1_1_0, v_1_1_1 = _i0+1, v_1_1_1, v_1_1_0 {
 16037  			y := v_1_1_0
 16038  			if v_1_1_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_1_1.AuxInt) != 63 {
 16039  				continue
 16040  			}
 16041  			v.reset(OpPPC64SRAD)
 16042  			v0 := b.NewValue0(v.Pos, OpPPC64SUB, typ.UInt)
 16043  			v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16044  			v1.AuxInt = int64ToAuxInt(64)
 16045  			v2 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 16046  			v2.AuxInt = int64ToAuxInt(63)
 16047  			v2.AddArg(y)
 16048  			v0.AddArg2(v1, v2)
 16049  			v.AddArg2(x, v0)
 16050  			return true
 16051  		}
 16052  		break
 16053  	}
 16054  	// match: (Rsh64x64 x (SUBFCconst <typ.UInt> [64] (AND <typ.UInt> y (MOVDconst [63]))))
 16055  	// result: (SRAD x (SUBFCconst <typ.UInt> [64] (ANDconst <typ.UInt> [63] y)))
 16056  	for {
 16057  		x := v_0
 16058  		if v_1.Op != OpPPC64SUBFCconst || v_1.Type != typ.UInt || auxIntToInt64(v_1.AuxInt) != 64 {
 16059  			break
 16060  		}
 16061  		v_1_0 := v_1.Args[0]
 16062  		if v_1_0.Op != OpPPC64AND || v_1_0.Type != typ.UInt {
 16063  			break
 16064  		}
 16065  		_ = v_1_0.Args[1]
 16066  		v_1_0_0 := v_1_0.Args[0]
 16067  		v_1_0_1 := v_1_0.Args[1]
 16068  		for _i0 := 0; _i0 <= 1; _i0, v_1_0_0, v_1_0_1 = _i0+1, v_1_0_1, v_1_0_0 {
 16069  			y := v_1_0_0
 16070  			if v_1_0_1.Op != OpPPC64MOVDconst || auxIntToInt64(v_1_0_1.AuxInt) != 63 {
 16071  				continue
 16072  			}
 16073  			v.reset(OpPPC64SRAD)
 16074  			v0 := b.NewValue0(v.Pos, OpPPC64SUBFCconst, typ.UInt)
 16075  			v0.AuxInt = int64ToAuxInt(64)
 16076  			v1 := b.NewValue0(v.Pos, OpPPC64ANDconst, typ.UInt)
 16077  			v1.AuxInt = int64ToAuxInt(63)
 16078  			v1.AddArg(y)
 16079  			v0.AddArg(v1)
 16080  			v.AddArg2(x, v0)
 16081  			return true
 16082  		}
 16083  		break
 16084  	}
 16085  	// match: (Rsh64x64 x y)
 16086  	// result: (SRAD x (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [64]))))
 16087  	for {
 16088  		x := v_0
 16089  		y := v_1
 16090  		v.reset(OpPPC64SRAD)
 16091  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16092  		v0.AuxInt = int32ToAuxInt(0)
 16093  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16094  		v1.AuxInt = int64ToAuxInt(-1)
 16095  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16096  		v3 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16097  		v3.AuxInt = int64ToAuxInt(64)
 16098  		v2.AddArg2(y, v3)
 16099  		v0.AddArg3(y, v1, v2)
 16100  		v.AddArg2(x, v0)
 16101  		return true
 16102  	}
 16103  }
 16104  func rewriteValuePPC64_OpRsh64x8(v *Value) bool {
 16105  	v_1 := v.Args[1]
 16106  	v_0 := v.Args[0]
 16107  	b := v.Block
 16108  	typ := &b.Func.Config.Types
 16109  	// match: (Rsh64x8 x y)
 16110  	// cond: shiftIsBounded(v)
 16111  	// result: (SRAD x y)
 16112  	for {
 16113  		x := v_0
 16114  		y := v_1
 16115  		if !(shiftIsBounded(v)) {
 16116  			break
 16117  		}
 16118  		v.reset(OpPPC64SRAD)
 16119  		v.AddArg2(x, y)
 16120  		return true
 16121  	}
 16122  	// match: (Rsh64x8 x y)
 16123  	// result: (SRAD x (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [64]))))
 16124  	for {
 16125  		x := v_0
 16126  		y := v_1
 16127  		v.reset(OpPPC64SRAD)
 16128  		v0 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16129  		v0.AuxInt = int32ToAuxInt(0)
 16130  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16131  		v1.AuxInt = int64ToAuxInt(-1)
 16132  		v2 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16133  		v3 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 16134  		v3.AddArg(y)
 16135  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16136  		v4.AuxInt = int64ToAuxInt(64)
 16137  		v2.AddArg2(v3, v4)
 16138  		v0.AddArg3(y, v1, v2)
 16139  		v.AddArg2(x, v0)
 16140  		return true
 16141  	}
 16142  }
 16143  func rewriteValuePPC64_OpRsh8Ux16(v *Value) bool {
 16144  	v_1 := v.Args[1]
 16145  	v_0 := v.Args[0]
 16146  	b := v.Block
 16147  	typ := &b.Func.Config.Types
 16148  	// match: (Rsh8Ux16 x y)
 16149  	// cond: shiftIsBounded(v)
 16150  	// result: (SRW (MOVBZreg x) y)
 16151  	for {
 16152  		x := v_0
 16153  		y := v_1
 16154  		if !(shiftIsBounded(v)) {
 16155  			break
 16156  		}
 16157  		v.reset(OpPPC64SRW)
 16158  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 16159  		v0.AddArg(x)
 16160  		v.AddArg2(v0, y)
 16161  		return true
 16162  	}
 16163  	// match: (Rsh8Ux16 x y)
 16164  	// result: (SRW (ZeroExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [8]))))
 16165  	for {
 16166  		x := v_0
 16167  		y := v_1
 16168  		v.reset(OpPPC64SRW)
 16169  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 16170  		v0.AddArg(x)
 16171  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16172  		v1.AuxInt = int32ToAuxInt(0)
 16173  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16174  		v2.AuxInt = int64ToAuxInt(-1)
 16175  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16176  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 16177  		v4.AddArg(y)
 16178  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16179  		v5.AuxInt = int64ToAuxInt(8)
 16180  		v3.AddArg2(v4, v5)
 16181  		v1.AddArg3(y, v2, v3)
 16182  		v.AddArg2(v0, v1)
 16183  		return true
 16184  	}
 16185  }
 16186  func rewriteValuePPC64_OpRsh8Ux32(v *Value) bool {
 16187  	v_1 := v.Args[1]
 16188  	v_0 := v.Args[0]
 16189  	b := v.Block
 16190  	typ := &b.Func.Config.Types
 16191  	// match: (Rsh8Ux32 x (MOVDconst [c]))
 16192  	// cond: uint32(c) < 8
 16193  	// result: (SRWconst (ZeroExt8to32 x) [c&7])
 16194  	for {
 16195  		x := v_0
 16196  		if v_1.Op != OpPPC64MOVDconst {
 16197  			break
 16198  		}
 16199  		c := auxIntToInt64(v_1.AuxInt)
 16200  		if !(uint32(c) < 8) {
 16201  			break
 16202  		}
 16203  		v.reset(OpPPC64SRWconst)
 16204  		v.AuxInt = int64ToAuxInt(c & 7)
 16205  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 16206  		v0.AddArg(x)
 16207  		v.AddArg(v0)
 16208  		return true
 16209  	}
 16210  	// match: (Rsh8Ux32 x y)
 16211  	// cond: shiftIsBounded(v)
 16212  	// result: (SRW (MOVBZreg x) y)
 16213  	for {
 16214  		x := v_0
 16215  		y := v_1
 16216  		if !(shiftIsBounded(v)) {
 16217  			break
 16218  		}
 16219  		v.reset(OpPPC64SRW)
 16220  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 16221  		v0.AddArg(x)
 16222  		v.AddArg2(v0, y)
 16223  		return true
 16224  	}
 16225  	// match: (Rsh8Ux32 x y)
 16226  	// result: (SRW (ZeroExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [8]))))
 16227  	for {
 16228  		x := v_0
 16229  		y := v_1
 16230  		v.reset(OpPPC64SRW)
 16231  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 16232  		v0.AddArg(x)
 16233  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16234  		v1.AuxInt = int32ToAuxInt(0)
 16235  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16236  		v2.AuxInt = int64ToAuxInt(-1)
 16237  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16238  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16239  		v4.AuxInt = int64ToAuxInt(8)
 16240  		v3.AddArg2(y, v4)
 16241  		v1.AddArg3(y, v2, v3)
 16242  		v.AddArg2(v0, v1)
 16243  		return true
 16244  	}
 16245  }
 16246  func rewriteValuePPC64_OpRsh8Ux64(v *Value) bool {
 16247  	v_1 := v.Args[1]
 16248  	v_0 := v.Args[0]
 16249  	b := v.Block
 16250  	typ := &b.Func.Config.Types
 16251  	// match: (Rsh8Ux64 _ (MOVDconst [c]))
 16252  	// cond: uint64(c) >= 8
 16253  	// result: (MOVDconst [0])
 16254  	for {
 16255  		if v_1.Op != OpPPC64MOVDconst {
 16256  			break
 16257  		}
 16258  		c := auxIntToInt64(v_1.AuxInt)
 16259  		if !(uint64(c) >= 8) {
 16260  			break
 16261  		}
 16262  		v.reset(OpPPC64MOVDconst)
 16263  		v.AuxInt = int64ToAuxInt(0)
 16264  		return true
 16265  	}
 16266  	// match: (Rsh8Ux64 x (MOVDconst [c]))
 16267  	// cond: uint64(c) < 8
 16268  	// result: (SRWconst (ZeroExt8to32 x) [c])
 16269  	for {
 16270  		x := v_0
 16271  		if v_1.Op != OpPPC64MOVDconst {
 16272  			break
 16273  		}
 16274  		c := auxIntToInt64(v_1.AuxInt)
 16275  		if !(uint64(c) < 8) {
 16276  			break
 16277  		}
 16278  		v.reset(OpPPC64SRWconst)
 16279  		v.AuxInt = int64ToAuxInt(c)
 16280  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 16281  		v0.AddArg(x)
 16282  		v.AddArg(v0)
 16283  		return true
 16284  	}
 16285  	// match: (Rsh8Ux64 x y)
 16286  	// cond: shiftIsBounded(v)
 16287  	// result: (SRW (MOVBZreg x) y)
 16288  	for {
 16289  		x := v_0
 16290  		y := v_1
 16291  		if !(shiftIsBounded(v)) {
 16292  			break
 16293  		}
 16294  		v.reset(OpPPC64SRW)
 16295  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 16296  		v0.AddArg(x)
 16297  		v.AddArg2(v0, y)
 16298  		return true
 16299  	}
 16300  	// match: (Rsh8Ux64 x y)
 16301  	// result: (SRW (ZeroExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [8]))))
 16302  	for {
 16303  		x := v_0
 16304  		y := v_1
 16305  		v.reset(OpPPC64SRW)
 16306  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 16307  		v0.AddArg(x)
 16308  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16309  		v1.AuxInt = int32ToAuxInt(0)
 16310  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16311  		v2.AuxInt = int64ToAuxInt(-1)
 16312  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16313  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16314  		v4.AuxInt = int64ToAuxInt(8)
 16315  		v3.AddArg2(y, v4)
 16316  		v1.AddArg3(y, v2, v3)
 16317  		v.AddArg2(v0, v1)
 16318  		return true
 16319  	}
 16320  }
 16321  func rewriteValuePPC64_OpRsh8Ux8(v *Value) bool {
 16322  	v_1 := v.Args[1]
 16323  	v_0 := v.Args[0]
 16324  	b := v.Block
 16325  	typ := &b.Func.Config.Types
 16326  	// match: (Rsh8Ux8 x y)
 16327  	// cond: shiftIsBounded(v)
 16328  	// result: (SRW (MOVBZreg x) y)
 16329  	for {
 16330  		x := v_0
 16331  		y := v_1
 16332  		if !(shiftIsBounded(v)) {
 16333  			break
 16334  		}
 16335  		v.reset(OpPPC64SRW)
 16336  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBZreg, typ.Int64)
 16337  		v0.AddArg(x)
 16338  		v.AddArg2(v0, y)
 16339  		return true
 16340  	}
 16341  	// match: (Rsh8Ux8 x y)
 16342  	// result: (SRW (ZeroExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [8]))))
 16343  	for {
 16344  		x := v_0
 16345  		y := v_1
 16346  		v.reset(OpPPC64SRW)
 16347  		v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
 16348  		v0.AddArg(x)
 16349  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16350  		v1.AuxInt = int32ToAuxInt(0)
 16351  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16352  		v2.AuxInt = int64ToAuxInt(-1)
 16353  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16354  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 16355  		v4.AddArg(y)
 16356  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16357  		v5.AuxInt = int64ToAuxInt(8)
 16358  		v3.AddArg2(v4, v5)
 16359  		v1.AddArg3(y, v2, v3)
 16360  		v.AddArg2(v0, v1)
 16361  		return true
 16362  	}
 16363  }
 16364  func rewriteValuePPC64_OpRsh8x16(v *Value) bool {
 16365  	v_1 := v.Args[1]
 16366  	v_0 := v.Args[0]
 16367  	b := v.Block
 16368  	typ := &b.Func.Config.Types
 16369  	// match: (Rsh8x16 x y)
 16370  	// cond: shiftIsBounded(v)
 16371  	// result: (SRAW (MOVBreg x) y)
 16372  	for {
 16373  		x := v_0
 16374  		y := v_1
 16375  		if !(shiftIsBounded(v)) {
 16376  			break
 16377  		}
 16378  		v.reset(OpPPC64SRAW)
 16379  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 16380  		v0.AddArg(x)
 16381  		v.AddArg2(v0, y)
 16382  		return true
 16383  	}
 16384  	// match: (Rsh8x16 x y)
 16385  	// result: (SRAW (SignExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt16to64 y) (MOVDconst [8]))))
 16386  	for {
 16387  		x := v_0
 16388  		y := v_1
 16389  		v.reset(OpPPC64SRAW)
 16390  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16391  		v0.AddArg(x)
 16392  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16393  		v1.AuxInt = int32ToAuxInt(0)
 16394  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16395  		v2.AuxInt = int64ToAuxInt(-1)
 16396  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16397  		v4 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
 16398  		v4.AddArg(y)
 16399  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16400  		v5.AuxInt = int64ToAuxInt(8)
 16401  		v3.AddArg2(v4, v5)
 16402  		v1.AddArg3(y, v2, v3)
 16403  		v.AddArg2(v0, v1)
 16404  		return true
 16405  	}
 16406  }
 16407  func rewriteValuePPC64_OpRsh8x32(v *Value) bool {
 16408  	v_1 := v.Args[1]
 16409  	v_0 := v.Args[0]
 16410  	b := v.Block
 16411  	typ := &b.Func.Config.Types
 16412  	// match: (Rsh8x32 x (MOVDconst [c]))
 16413  	// cond: uint32(c) < 8
 16414  	// result: (SRAWconst (SignExt8to32 x) [c&7])
 16415  	for {
 16416  		x := v_0
 16417  		if v_1.Op != OpPPC64MOVDconst {
 16418  			break
 16419  		}
 16420  		c := auxIntToInt64(v_1.AuxInt)
 16421  		if !(uint32(c) < 8) {
 16422  			break
 16423  		}
 16424  		v.reset(OpPPC64SRAWconst)
 16425  		v.AuxInt = int64ToAuxInt(c & 7)
 16426  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16427  		v0.AddArg(x)
 16428  		v.AddArg(v0)
 16429  		return true
 16430  	}
 16431  	// match: (Rsh8x32 x y)
 16432  	// cond: shiftIsBounded(v)
 16433  	// result: (SRAW (MOVBreg x) y)
 16434  	for {
 16435  		x := v_0
 16436  		y := v_1
 16437  		if !(shiftIsBounded(v)) {
 16438  			break
 16439  		}
 16440  		v.reset(OpPPC64SRAW)
 16441  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 16442  		v0.AddArg(x)
 16443  		v.AddArg2(v0, y)
 16444  		return true
 16445  	}
 16446  	// match: (Rsh8x32 x y)
 16447  	// result: (SRAW (SignExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [8]))))
 16448  	for {
 16449  		x := v_0
 16450  		y := v_1
 16451  		v.reset(OpPPC64SRAW)
 16452  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16453  		v0.AddArg(x)
 16454  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16455  		v1.AuxInt = int32ToAuxInt(0)
 16456  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16457  		v2.AuxInt = int64ToAuxInt(-1)
 16458  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16459  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16460  		v4.AuxInt = int64ToAuxInt(8)
 16461  		v3.AddArg2(y, v4)
 16462  		v1.AddArg3(y, v2, v3)
 16463  		v.AddArg2(v0, v1)
 16464  		return true
 16465  	}
 16466  }
 16467  func rewriteValuePPC64_OpRsh8x64(v *Value) bool {
 16468  	v_1 := v.Args[1]
 16469  	v_0 := v.Args[0]
 16470  	b := v.Block
 16471  	typ := &b.Func.Config.Types
 16472  	// match: (Rsh8x64 x (MOVDconst [c]))
 16473  	// cond: uint64(c) >= 8
 16474  	// result: (SRAWconst (SignExt8to32 x) [63])
 16475  	for {
 16476  		x := v_0
 16477  		if v_1.Op != OpPPC64MOVDconst {
 16478  			break
 16479  		}
 16480  		c := auxIntToInt64(v_1.AuxInt)
 16481  		if !(uint64(c) >= 8) {
 16482  			break
 16483  		}
 16484  		v.reset(OpPPC64SRAWconst)
 16485  		v.AuxInt = int64ToAuxInt(63)
 16486  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16487  		v0.AddArg(x)
 16488  		v.AddArg(v0)
 16489  		return true
 16490  	}
 16491  	// match: (Rsh8x64 x (MOVDconst [c]))
 16492  	// cond: uint64(c) < 8
 16493  	// result: (SRAWconst (SignExt8to32 x) [c])
 16494  	for {
 16495  		x := v_0
 16496  		if v_1.Op != OpPPC64MOVDconst {
 16497  			break
 16498  		}
 16499  		c := auxIntToInt64(v_1.AuxInt)
 16500  		if !(uint64(c) < 8) {
 16501  			break
 16502  		}
 16503  		v.reset(OpPPC64SRAWconst)
 16504  		v.AuxInt = int64ToAuxInt(c)
 16505  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16506  		v0.AddArg(x)
 16507  		v.AddArg(v0)
 16508  		return true
 16509  	}
 16510  	// match: (Rsh8x64 x y)
 16511  	// cond: shiftIsBounded(v)
 16512  	// result: (SRAW (MOVBreg x) y)
 16513  	for {
 16514  		x := v_0
 16515  		y := v_1
 16516  		if !(shiftIsBounded(v)) {
 16517  			break
 16518  		}
 16519  		v.reset(OpPPC64SRAW)
 16520  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 16521  		v0.AddArg(x)
 16522  		v.AddArg2(v0, y)
 16523  		return true
 16524  	}
 16525  	// match: (Rsh8x64 x y)
 16526  	// result: (SRAW (SignExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU y (MOVDconst [8]))))
 16527  	for {
 16528  		x := v_0
 16529  		y := v_1
 16530  		v.reset(OpPPC64SRAW)
 16531  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16532  		v0.AddArg(x)
 16533  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16534  		v1.AuxInt = int32ToAuxInt(0)
 16535  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16536  		v2.AuxInt = int64ToAuxInt(-1)
 16537  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16538  		v4 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16539  		v4.AuxInt = int64ToAuxInt(8)
 16540  		v3.AddArg2(y, v4)
 16541  		v1.AddArg3(y, v2, v3)
 16542  		v.AddArg2(v0, v1)
 16543  		return true
 16544  	}
 16545  }
 16546  func rewriteValuePPC64_OpRsh8x8(v *Value) bool {
 16547  	v_1 := v.Args[1]
 16548  	v_0 := v.Args[0]
 16549  	b := v.Block
 16550  	typ := &b.Func.Config.Types
 16551  	// match: (Rsh8x8 x y)
 16552  	// cond: shiftIsBounded(v)
 16553  	// result: (SRAW (MOVBreg x) y)
 16554  	for {
 16555  		x := v_0
 16556  		y := v_1
 16557  		if !(shiftIsBounded(v)) {
 16558  			break
 16559  		}
 16560  		v.reset(OpPPC64SRAW)
 16561  		v0 := b.NewValue0(v.Pos, OpPPC64MOVBreg, typ.Int64)
 16562  		v0.AddArg(x)
 16563  		v.AddArg2(v0, y)
 16564  		return true
 16565  	}
 16566  	// match: (Rsh8x8 x y)
 16567  	// result: (SRAW (SignExt8to32 x) (ISEL [0] y (MOVDconst [-1]) (CMPU (ZeroExt8to64 y) (MOVDconst [8]))))
 16568  	for {
 16569  		x := v_0
 16570  		y := v_1
 16571  		v.reset(OpPPC64SRAW)
 16572  		v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
 16573  		v0.AddArg(x)
 16574  		v1 := b.NewValue0(v.Pos, OpPPC64ISEL, typ.Int32)
 16575  		v1.AuxInt = int32ToAuxInt(0)
 16576  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16577  		v2.AuxInt = int64ToAuxInt(-1)
 16578  		v3 := b.NewValue0(v.Pos, OpPPC64CMPU, types.TypeFlags)
 16579  		v4 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
 16580  		v4.AddArg(y)
 16581  		v5 := b.NewValue0(v.Pos, OpPPC64MOVDconst, typ.Int64)
 16582  		v5.AuxInt = int64ToAuxInt(8)
 16583  		v3.AddArg2(v4, v5)
 16584  		v1.AddArg3(y, v2, v3)
 16585  		v.AddArg2(v0, v1)
 16586  		return true
 16587  	}
 16588  }
 16589  func rewriteValuePPC64_OpSelectN(v *Value) bool {
 16590  	v_0 := v.Args[0]
 16591  	b := v.Block
 16592  	config := b.Func.Config
 16593  	// match: (SelectN [0] call:(CALLstatic {sym} s1:(MOVDstore _ (MOVDconst [sz]) s2:(MOVDstore _ src s3:(MOVDstore {t} _ dst mem)))))
 16594  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(s1, s2, s3, call)
 16595  	// result: (Move [sz] dst src mem)
 16596  	for {
 16597  		if auxIntToInt64(v.AuxInt) != 0 {
 16598  			break
 16599  		}
 16600  		call := v_0
 16601  		if call.Op != OpPPC64CALLstatic || len(call.Args) != 1 {
 16602  			break
 16603  		}
 16604  		sym := auxToCall(call.Aux)
 16605  		s1 := call.Args[0]
 16606  		if s1.Op != OpPPC64MOVDstore {
 16607  			break
 16608  		}
 16609  		_ = s1.Args[2]
 16610  		s1_1 := s1.Args[1]
 16611  		if s1_1.Op != OpPPC64MOVDconst {
 16612  			break
 16613  		}
 16614  		sz := auxIntToInt64(s1_1.AuxInt)
 16615  		s2 := s1.Args[2]
 16616  		if s2.Op != OpPPC64MOVDstore {
 16617  			break
 16618  		}
 16619  		_ = s2.Args[2]
 16620  		src := s2.Args[1]
 16621  		s3 := s2.Args[2]
 16622  		if s3.Op != OpPPC64MOVDstore {
 16623  			break
 16624  		}
 16625  		mem := s3.Args[2]
 16626  		dst := s3.Args[1]
 16627  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && s1.Uses == 1 && s2.Uses == 1 && s3.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(s1, s2, s3, call)) {
 16628  			break
 16629  		}
 16630  		v.reset(OpMove)
 16631  		v.AuxInt = int64ToAuxInt(sz)
 16632  		v.AddArg3(dst, src, mem)
 16633  		return true
 16634  	}
 16635  	// match: (SelectN [0] call:(CALLstatic {sym} dst src (MOVDconst [sz]) mem))
 16636  	// cond: sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)
 16637  	// result: (Move [sz] dst src mem)
 16638  	for {
 16639  		if auxIntToInt64(v.AuxInt) != 0 {
 16640  			break
 16641  		}
 16642  		call := v_0
 16643  		if call.Op != OpPPC64CALLstatic || len(call.Args) != 4 {
 16644  			break
 16645  		}
 16646  		sym := auxToCall(call.Aux)
 16647  		mem := call.Args[3]
 16648  		dst := call.Args[0]
 16649  		src := call.Args[1]
 16650  		call_2 := call.Args[2]
 16651  		if call_2.Op != OpPPC64MOVDconst {
 16652  			break
 16653  		}
 16654  		sz := auxIntToInt64(call_2.AuxInt)
 16655  		if !(sz >= 0 && isSameCall(sym, "runtime.memmove") && call.Uses == 1 && isInlinableMemmove(dst, src, sz, config) && clobber(call)) {
 16656  			break
 16657  		}
 16658  		v.reset(OpMove)
 16659  		v.AuxInt = int64ToAuxInt(sz)
 16660  		v.AddArg3(dst, src, mem)
 16661  		return true
 16662  	}
 16663  	return false
 16664  }
 16665  func rewriteValuePPC64_OpSlicemask(v *Value) bool {
 16666  	v_0 := v.Args[0]
 16667  	b := v.Block
 16668  	// match: (Slicemask <t> x)
 16669  	// result: (SRADconst (NEG <t> x) [63])
 16670  	for {
 16671  		t := v.Type
 16672  		x := v_0
 16673  		v.reset(OpPPC64SRADconst)
 16674  		v.AuxInt = int64ToAuxInt(63)
 16675  		v0 := b.NewValue0(v.Pos, OpPPC64NEG, t)
 16676  		v0.AddArg(x)
 16677  		v.AddArg(v0)
 16678  		return true
 16679  	}
 16680  }
 16681  func rewriteValuePPC64_OpStore(v *Value) bool {
 16682  	v_2 := v.Args[2]
 16683  	v_1 := v.Args[1]
 16684  	v_0 := v.Args[0]
 16685  	// match: (Store {t} ptr val mem)
 16686  	// cond: t.Size() == 8 && is64BitFloat(val.Type)
 16687  	// result: (FMOVDstore ptr val mem)
 16688  	for {
 16689  		t := auxToType(v.Aux)
 16690  		ptr := v_0
 16691  		val := v_1
 16692  		mem := v_2
 16693  		if !(t.Size() == 8 && is64BitFloat(val.Type)) {
 16694  			break
 16695  		}
 16696  		v.reset(OpPPC64FMOVDstore)
 16697  		v.AddArg3(ptr, val, mem)
 16698  		return true
 16699  	}
 16700  	// match: (Store {t} ptr val mem)
 16701  	// cond: t.Size() == 8 && is32BitFloat(val.Type)
 16702  	// result: (FMOVDstore ptr val mem)
 16703  	for {
 16704  		t := auxToType(v.Aux)
 16705  		ptr := v_0
 16706  		val := v_1
 16707  		mem := v_2
 16708  		if !(t.Size() == 8 && is32BitFloat(val.Type)) {
 16709  			break
 16710  		}
 16711  		v.reset(OpPPC64FMOVDstore)
 16712  		v.AddArg3(ptr, val, mem)
 16713  		return true
 16714  	}
 16715  	// match: (Store {t} ptr val mem)
 16716  	// cond: t.Size() == 4 && is32BitFloat(val.Type)
 16717  	// result: (FMOVSstore ptr val mem)
 16718  	for {
 16719  		t := auxToType(v.Aux)
 16720  		ptr := v_0
 16721  		val := v_1
 16722  		mem := v_2
 16723  		if !(t.Size() == 4 && is32BitFloat(val.Type)) {
 16724  			break
 16725  		}
 16726  		v.reset(OpPPC64FMOVSstore)
 16727  		v.AddArg3(ptr, val, mem)
 16728  		return true
 16729  	}
 16730  	// match: (Store {t} ptr val mem)
 16731  	// cond: t.Size() == 8 && !is64BitFloat(val.Type)
 16732  	// result: (MOVDstore ptr val mem)
 16733  	for {
 16734  		t := auxToType(v.Aux)
 16735  		ptr := v_0
 16736  		val := v_1
 16737  		mem := v_2
 16738  		if !(t.Size() == 8 && !is64BitFloat(val.Type)) {
 16739  			break
 16740  		}
 16741  		v.reset(OpPPC64MOVDstore)
 16742  		v.AddArg3(ptr, val, mem)
 16743  		return true
 16744  	}
 16745  	// match: (Store {t} ptr val mem)
 16746  	// cond: t.Size() == 4 && is32BitInt(val.Type)
 16747  	// result: (MOVWstore ptr val mem)
 16748  	for {
 16749  		t := auxToType(v.Aux)
 16750  		ptr := v_0
 16751  		val := v_1
 16752  		mem := v_2
 16753  		if !(t.Size() == 4 && is32BitInt(val.Type)) {
 16754  			break
 16755  		}
 16756  		v.reset(OpPPC64MOVWstore)
 16757  		v.AddArg3(ptr, val, mem)
 16758  		return true
 16759  	}
 16760  	// match: (Store {t} ptr val mem)
 16761  	// cond: t.Size() == 2
 16762  	// result: (MOVHstore ptr val mem)
 16763  	for {
 16764  		t := auxToType(v.Aux)
 16765  		ptr := v_0
 16766  		val := v_1
 16767  		mem := v_2
 16768  		if !(t.Size() == 2) {
 16769  			break
 16770  		}
 16771  		v.reset(OpPPC64MOVHstore)
 16772  		v.AddArg3(ptr, val, mem)
 16773  		return true
 16774  	}
 16775  	// match: (Store {t} ptr val mem)
 16776  	// cond: t.Size() == 1
 16777  	// result: (MOVBstore ptr val mem)
 16778  	for {
 16779  		t := auxToType(v.Aux)
 16780  		ptr := v_0
 16781  		val := v_1
 16782  		mem := v_2
 16783  		if !(t.Size() == 1) {
 16784  			break
 16785  		}
 16786  		v.reset(OpPPC64MOVBstore)
 16787  		v.AddArg3(ptr, val, mem)
 16788  		return true
 16789  	}
 16790  	return false
 16791  }
 16792  func rewriteValuePPC64_OpTrunc16to8(v *Value) bool {
 16793  	v_0 := v.Args[0]
 16794  	// match: (Trunc16to8 <t> x)
 16795  	// cond: isSigned(t)
 16796  	// result: (MOVBreg x)
 16797  	for {
 16798  		t := v.Type
 16799  		x := v_0
 16800  		if !(isSigned(t)) {
 16801  			break
 16802  		}
 16803  		v.reset(OpPPC64MOVBreg)
 16804  		v.AddArg(x)
 16805  		return true
 16806  	}
 16807  	// match: (Trunc16to8 x)
 16808  	// result: (MOVBZreg x)
 16809  	for {
 16810  		x := v_0
 16811  		v.reset(OpPPC64MOVBZreg)
 16812  		v.AddArg(x)
 16813  		return true
 16814  	}
 16815  }
 16816  func rewriteValuePPC64_OpTrunc32to16(v *Value) bool {
 16817  	v_0 := v.Args[0]
 16818  	// match: (Trunc32to16 <t> x)
 16819  	// cond: isSigned(t)
 16820  	// result: (MOVHreg x)
 16821  	for {
 16822  		t := v.Type
 16823  		x := v_0
 16824  		if !(isSigned(t)) {
 16825  			break
 16826  		}
 16827  		v.reset(OpPPC64MOVHreg)
 16828  		v.AddArg(x)
 16829  		return true
 16830  	}
 16831  	// match: (Trunc32to16 x)
 16832  	// result: (MOVHZreg x)
 16833  	for {
 16834  		x := v_0
 16835  		v.reset(OpPPC64MOVHZreg)
 16836  		v.AddArg(x)
 16837  		return true
 16838  	}
 16839  }
 16840  func rewriteValuePPC64_OpTrunc32to8(v *Value) bool {
 16841  	v_0 := v.Args[0]
 16842  	// match: (Trunc32to8 <t> x)
 16843  	// cond: isSigned(t)
 16844  	// result: (MOVBreg x)
 16845  	for {
 16846  		t := v.Type
 16847  		x := v_0
 16848  		if !(isSigned(t)) {
 16849  			break
 16850  		}
 16851  		v.reset(OpPPC64MOVBreg)
 16852  		v.AddArg(x)
 16853  		return true
 16854  	}
 16855  	// match: (Trunc32to8 x)
 16856  	// result: (MOVBZreg x)
 16857  	for {
 16858  		x := v_0
 16859  		v.reset(OpPPC64MOVBZreg)
 16860  		v.AddArg(x)
 16861  		return true
 16862  	}
 16863  }
 16864  func rewriteValuePPC64_OpTrunc64to16(v *Value) bool {
 16865  	v_0 := v.Args[0]
 16866  	// match: (Trunc64to16 <t> x)
 16867  	// cond: isSigned(t)
 16868  	// result: (MOVHreg x)
 16869  	for {
 16870  		t := v.Type
 16871  		x := v_0
 16872  		if !(isSigned(t)) {
 16873  			break
 16874  		}
 16875  		v.reset(OpPPC64MOVHreg)
 16876  		v.AddArg(x)
 16877  		return true
 16878  	}
 16879  	// match: (Trunc64to16 x)
 16880  	// result: (MOVHZreg x)
 16881  	for {
 16882  		x := v_0
 16883  		v.reset(OpPPC64MOVHZreg)
 16884  		v.AddArg(x)
 16885  		return true
 16886  	}
 16887  }
 16888  func rewriteValuePPC64_OpTrunc64to32(v *Value) bool {
 16889  	v_0 := v.Args[0]
 16890  	// match: (Trunc64to32 <t> x)
 16891  	// cond: isSigned(t)
 16892  	// result: (MOVWreg x)
 16893  	for {
 16894  		t := v.Type
 16895  		x := v_0
 16896  		if !(isSigned(t)) {
 16897  			break
 16898  		}
 16899  		v.reset(OpPPC64MOVWreg)
 16900  		v.AddArg(x)
 16901  		return true
 16902  	}
 16903  	// match: (Trunc64to32 x)
 16904  	// result: (MOVWZreg x)
 16905  	for {
 16906  		x := v_0
 16907  		v.reset(OpPPC64MOVWZreg)
 16908  		v.AddArg(x)
 16909  		return true
 16910  	}
 16911  }
 16912  func rewriteValuePPC64_OpTrunc64to8(v *Value) bool {
 16913  	v_0 := v.Args[0]
 16914  	// match: (Trunc64to8 <t> x)
 16915  	// cond: isSigned(t)
 16916  	// result: (MOVBreg x)
 16917  	for {
 16918  		t := v.Type
 16919  		x := v_0
 16920  		if !(isSigned(t)) {
 16921  			break
 16922  		}
 16923  		v.reset(OpPPC64MOVBreg)
 16924  		v.AddArg(x)
 16925  		return true
 16926  	}
 16927  	// match: (Trunc64to8 x)
 16928  	// result: (MOVBZreg x)
 16929  	for {
 16930  		x := v_0
 16931  		v.reset(OpPPC64MOVBZreg)
 16932  		v.AddArg(x)
 16933  		return true
 16934  	}
 16935  }
 16936  func rewriteValuePPC64_OpZero(v *Value) bool {
 16937  	v_1 := v.Args[1]
 16938  	v_0 := v.Args[0]
 16939  	b := v.Block
 16940  	// match: (Zero [0] _ mem)
 16941  	// result: mem
 16942  	for {
 16943  		if auxIntToInt64(v.AuxInt) != 0 {
 16944  			break
 16945  		}
 16946  		mem := v_1
 16947  		v.copyOf(mem)
 16948  		return true
 16949  	}
 16950  	// match: (Zero [1] destptr mem)
 16951  	// result: (MOVBstorezero destptr mem)
 16952  	for {
 16953  		if auxIntToInt64(v.AuxInt) != 1 {
 16954  			break
 16955  		}
 16956  		destptr := v_0
 16957  		mem := v_1
 16958  		v.reset(OpPPC64MOVBstorezero)
 16959  		v.AddArg2(destptr, mem)
 16960  		return true
 16961  	}
 16962  	// match: (Zero [2] destptr mem)
 16963  	// result: (MOVHstorezero destptr mem)
 16964  	for {
 16965  		if auxIntToInt64(v.AuxInt) != 2 {
 16966  			break
 16967  		}
 16968  		destptr := v_0
 16969  		mem := v_1
 16970  		v.reset(OpPPC64MOVHstorezero)
 16971  		v.AddArg2(destptr, mem)
 16972  		return true
 16973  	}
 16974  	// match: (Zero [3] destptr mem)
 16975  	// result: (MOVBstorezero [2] destptr (MOVHstorezero destptr mem))
 16976  	for {
 16977  		if auxIntToInt64(v.AuxInt) != 3 {
 16978  			break
 16979  		}
 16980  		destptr := v_0
 16981  		mem := v_1
 16982  		v.reset(OpPPC64MOVBstorezero)
 16983  		v.AuxInt = int32ToAuxInt(2)
 16984  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHstorezero, types.TypeMem)
 16985  		v0.AddArg2(destptr, mem)
 16986  		v.AddArg2(destptr, v0)
 16987  		return true
 16988  	}
 16989  	// match: (Zero [4] destptr mem)
 16990  	// result: (MOVWstorezero destptr mem)
 16991  	for {
 16992  		if auxIntToInt64(v.AuxInt) != 4 {
 16993  			break
 16994  		}
 16995  		destptr := v_0
 16996  		mem := v_1
 16997  		v.reset(OpPPC64MOVWstorezero)
 16998  		v.AddArg2(destptr, mem)
 16999  		return true
 17000  	}
 17001  	// match: (Zero [5] destptr mem)
 17002  	// result: (MOVBstorezero [4] destptr (MOVWstorezero destptr mem))
 17003  	for {
 17004  		if auxIntToInt64(v.AuxInt) != 5 {
 17005  			break
 17006  		}
 17007  		destptr := v_0
 17008  		mem := v_1
 17009  		v.reset(OpPPC64MOVBstorezero)
 17010  		v.AuxInt = int32ToAuxInt(4)
 17011  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWstorezero, types.TypeMem)
 17012  		v0.AddArg2(destptr, mem)
 17013  		v.AddArg2(destptr, v0)
 17014  		return true
 17015  	}
 17016  	// match: (Zero [6] destptr mem)
 17017  	// result: (MOVHstorezero [4] destptr (MOVWstorezero destptr mem))
 17018  	for {
 17019  		if auxIntToInt64(v.AuxInt) != 6 {
 17020  			break
 17021  		}
 17022  		destptr := v_0
 17023  		mem := v_1
 17024  		v.reset(OpPPC64MOVHstorezero)
 17025  		v.AuxInt = int32ToAuxInt(4)
 17026  		v0 := b.NewValue0(v.Pos, OpPPC64MOVWstorezero, types.TypeMem)
 17027  		v0.AddArg2(destptr, mem)
 17028  		v.AddArg2(destptr, v0)
 17029  		return true
 17030  	}
 17031  	// match: (Zero [7] destptr mem)
 17032  	// result: (MOVBstorezero [6] destptr (MOVHstorezero [4] destptr (MOVWstorezero destptr mem)))
 17033  	for {
 17034  		if auxIntToInt64(v.AuxInt) != 7 {
 17035  			break
 17036  		}
 17037  		destptr := v_0
 17038  		mem := v_1
 17039  		v.reset(OpPPC64MOVBstorezero)
 17040  		v.AuxInt = int32ToAuxInt(6)
 17041  		v0 := b.NewValue0(v.Pos, OpPPC64MOVHstorezero, types.TypeMem)
 17042  		v0.AuxInt = int32ToAuxInt(4)
 17043  		v1 := b.NewValue0(v.Pos, OpPPC64MOVWstorezero, types.TypeMem)
 17044  		v1.AddArg2(destptr, mem)
 17045  		v0.AddArg2(destptr, v1)
 17046  		v.AddArg2(destptr, v0)
 17047  		return true
 17048  	}
 17049  	// match: (Zero [8] {t} destptr mem)
 17050  	// result: (MOVDstorezero destptr mem)
 17051  	for {
 17052  		if auxIntToInt64(v.AuxInt) != 8 {
 17053  			break
 17054  		}
 17055  		destptr := v_0
 17056  		mem := v_1
 17057  		v.reset(OpPPC64MOVDstorezero)
 17058  		v.AddArg2(destptr, mem)
 17059  		return true
 17060  	}
 17061  	// match: (Zero [12] {t} destptr mem)
 17062  	// result: (MOVWstorezero [8] destptr (MOVDstorezero [0] destptr mem))
 17063  	for {
 17064  		if auxIntToInt64(v.AuxInt) != 12 {
 17065  			break
 17066  		}
 17067  		destptr := v_0
 17068  		mem := v_1
 17069  		v.reset(OpPPC64MOVWstorezero)
 17070  		v.AuxInt = int32ToAuxInt(8)
 17071  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17072  		v0.AuxInt = int32ToAuxInt(0)
 17073  		v0.AddArg2(destptr, mem)
 17074  		v.AddArg2(destptr, v0)
 17075  		return true
 17076  	}
 17077  	// match: (Zero [16] {t} destptr mem)
 17078  	// result: (MOVDstorezero [8] destptr (MOVDstorezero [0] destptr mem))
 17079  	for {
 17080  		if auxIntToInt64(v.AuxInt) != 16 {
 17081  			break
 17082  		}
 17083  		destptr := v_0
 17084  		mem := v_1
 17085  		v.reset(OpPPC64MOVDstorezero)
 17086  		v.AuxInt = int32ToAuxInt(8)
 17087  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17088  		v0.AuxInt = int32ToAuxInt(0)
 17089  		v0.AddArg2(destptr, mem)
 17090  		v.AddArg2(destptr, v0)
 17091  		return true
 17092  	}
 17093  	// match: (Zero [24] {t} destptr mem)
 17094  	// result: (MOVDstorezero [16] destptr (MOVDstorezero [8] destptr (MOVDstorezero [0] destptr mem)))
 17095  	for {
 17096  		if auxIntToInt64(v.AuxInt) != 24 {
 17097  			break
 17098  		}
 17099  		destptr := v_0
 17100  		mem := v_1
 17101  		v.reset(OpPPC64MOVDstorezero)
 17102  		v.AuxInt = int32ToAuxInt(16)
 17103  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17104  		v0.AuxInt = int32ToAuxInt(8)
 17105  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17106  		v1.AuxInt = int32ToAuxInt(0)
 17107  		v1.AddArg2(destptr, mem)
 17108  		v0.AddArg2(destptr, v1)
 17109  		v.AddArg2(destptr, v0)
 17110  		return true
 17111  	}
 17112  	// match: (Zero [32] {t} destptr mem)
 17113  	// result: (MOVDstorezero [24] destptr (MOVDstorezero [16] destptr (MOVDstorezero [8] destptr (MOVDstorezero [0] destptr mem))))
 17114  	for {
 17115  		if auxIntToInt64(v.AuxInt) != 32 {
 17116  			break
 17117  		}
 17118  		destptr := v_0
 17119  		mem := v_1
 17120  		v.reset(OpPPC64MOVDstorezero)
 17121  		v.AuxInt = int32ToAuxInt(24)
 17122  		v0 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17123  		v0.AuxInt = int32ToAuxInt(16)
 17124  		v1 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17125  		v1.AuxInt = int32ToAuxInt(8)
 17126  		v2 := b.NewValue0(v.Pos, OpPPC64MOVDstorezero, types.TypeMem)
 17127  		v2.AuxInt = int32ToAuxInt(0)
 17128  		v2.AddArg2(destptr, mem)
 17129  		v1.AddArg2(destptr, v2)
 17130  		v0.AddArg2(destptr, v1)
 17131  		v.AddArg2(destptr, v0)
 17132  		return true
 17133  	}
 17134  	// match: (Zero [s] ptr mem)
 17135  	// cond: buildcfg.GOPPC64 <= 8 && s < 64
 17136  	// result: (LoweredZeroShort [s] ptr mem)
 17137  	for {
 17138  		s := auxIntToInt64(v.AuxInt)
 17139  		ptr := v_0
 17140  		mem := v_1
 17141  		if !(buildcfg.GOPPC64 <= 8 && s < 64) {
 17142  			break
 17143  		}
 17144  		v.reset(OpPPC64LoweredZeroShort)
 17145  		v.AuxInt = int64ToAuxInt(s)
 17146  		v.AddArg2(ptr, mem)
 17147  		return true
 17148  	}
 17149  	// match: (Zero [s] ptr mem)
 17150  	// cond: buildcfg.GOPPC64 <= 8
 17151  	// result: (LoweredZero [s] ptr mem)
 17152  	for {
 17153  		s := auxIntToInt64(v.AuxInt)
 17154  		ptr := v_0
 17155  		mem := v_1
 17156  		if !(buildcfg.GOPPC64 <= 8) {
 17157  			break
 17158  		}
 17159  		v.reset(OpPPC64LoweredZero)
 17160  		v.AuxInt = int64ToAuxInt(s)
 17161  		v.AddArg2(ptr, mem)
 17162  		return true
 17163  	}
 17164  	// match: (Zero [s] ptr mem)
 17165  	// cond: s < 128 && buildcfg.GOPPC64 >= 9
 17166  	// result: (LoweredQuadZeroShort [s] ptr mem)
 17167  	for {
 17168  		s := auxIntToInt64(v.AuxInt)
 17169  		ptr := v_0
 17170  		mem := v_1
 17171  		if !(s < 128 && buildcfg.GOPPC64 >= 9) {
 17172  			break
 17173  		}
 17174  		v.reset(OpPPC64LoweredQuadZeroShort)
 17175  		v.AuxInt = int64ToAuxInt(s)
 17176  		v.AddArg2(ptr, mem)
 17177  		return true
 17178  	}
 17179  	// match: (Zero [s] ptr mem)
 17180  	// cond: buildcfg.GOPPC64 >= 9
 17181  	// result: (LoweredQuadZero [s] ptr mem)
 17182  	for {
 17183  		s := auxIntToInt64(v.AuxInt)
 17184  		ptr := v_0
 17185  		mem := v_1
 17186  		if !(buildcfg.GOPPC64 >= 9) {
 17187  			break
 17188  		}
 17189  		v.reset(OpPPC64LoweredQuadZero)
 17190  		v.AuxInt = int64ToAuxInt(s)
 17191  		v.AddArg2(ptr, mem)
 17192  		return true
 17193  	}
 17194  	return false
 17195  }
 17196  func rewriteBlockPPC64(b *Block) bool {
 17197  	switch b.Kind {
 17198  	case BlockPPC64EQ:
 17199  		// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
 17200  		// result: (EQ (ANDCCconst [c] x) yes no)
 17201  		for b.Controls[0].Op == OpPPC64CMPconst {
 17202  			v_0 := b.Controls[0]
 17203  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17204  				break
 17205  			}
 17206  			v_0_0 := v_0.Args[0]
 17207  			if v_0_0.Op != OpPPC64ANDconst {
 17208  				break
 17209  			}
 17210  			c := auxIntToInt64(v_0_0.AuxInt)
 17211  			x := v_0_0.Args[0]
 17212  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17213  			v0.AuxInt = int64ToAuxInt(c)
 17214  			v0.AddArg(x)
 17215  			b.resetWithControl(BlockPPC64EQ, v0)
 17216  			return true
 17217  		}
 17218  		// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
 17219  		// result: (EQ (ANDCCconst [c] x) yes no)
 17220  		for b.Controls[0].Op == OpPPC64CMPWconst {
 17221  			v_0 := b.Controls[0]
 17222  			if auxIntToInt32(v_0.AuxInt) != 0 {
 17223  				break
 17224  			}
 17225  			v_0_0 := v_0.Args[0]
 17226  			if v_0_0.Op != OpPPC64ANDconst {
 17227  				break
 17228  			}
 17229  			c := auxIntToInt64(v_0_0.AuxInt)
 17230  			x := v_0_0.Args[0]
 17231  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17232  			v0.AuxInt = int64ToAuxInt(c)
 17233  			v0.AddArg(x)
 17234  			b.resetWithControl(BlockPPC64EQ, v0)
 17235  			return true
 17236  		}
 17237  		// match: (EQ (FlagEQ) yes no)
 17238  		// result: (First yes no)
 17239  		for b.Controls[0].Op == OpPPC64FlagEQ {
 17240  			b.Reset(BlockFirst)
 17241  			return true
 17242  		}
 17243  		// match: (EQ (FlagLT) yes no)
 17244  		// result: (First no yes)
 17245  		for b.Controls[0].Op == OpPPC64FlagLT {
 17246  			b.Reset(BlockFirst)
 17247  			b.swapSuccessors()
 17248  			return true
 17249  		}
 17250  		// match: (EQ (FlagGT) yes no)
 17251  		// result: (First no yes)
 17252  		for b.Controls[0].Op == OpPPC64FlagGT {
 17253  			b.Reset(BlockFirst)
 17254  			b.swapSuccessors()
 17255  			return true
 17256  		}
 17257  		// match: (EQ (InvertFlags cmp) yes no)
 17258  		// result: (EQ cmp yes no)
 17259  		for b.Controls[0].Op == OpPPC64InvertFlags {
 17260  			v_0 := b.Controls[0]
 17261  			cmp := v_0.Args[0]
 17262  			b.resetWithControl(BlockPPC64EQ, cmp)
 17263  			return true
 17264  		}
 17265  		// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
 17266  		// result: (EQ (ANDCCconst [c] x) yes no)
 17267  		for b.Controls[0].Op == OpPPC64CMPconst {
 17268  			v_0 := b.Controls[0]
 17269  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17270  				break
 17271  			}
 17272  			v_0_0 := v_0.Args[0]
 17273  			if v_0_0.Op != OpPPC64ANDconst {
 17274  				break
 17275  			}
 17276  			c := auxIntToInt64(v_0_0.AuxInt)
 17277  			x := v_0_0.Args[0]
 17278  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17279  			v0.AuxInt = int64ToAuxInt(c)
 17280  			v0.AddArg(x)
 17281  			b.resetWithControl(BlockPPC64EQ, v0)
 17282  			return true
 17283  		}
 17284  		// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
 17285  		// result: (EQ (ANDCCconst [c] x) yes no)
 17286  		for b.Controls[0].Op == OpPPC64CMPWconst {
 17287  			v_0 := b.Controls[0]
 17288  			if auxIntToInt32(v_0.AuxInt) != 0 {
 17289  				break
 17290  			}
 17291  			v_0_0 := v_0.Args[0]
 17292  			if v_0_0.Op != OpPPC64ANDconst {
 17293  				break
 17294  			}
 17295  			c := auxIntToInt64(v_0_0.AuxInt)
 17296  			x := v_0_0.Args[0]
 17297  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17298  			v0.AuxInt = int64ToAuxInt(c)
 17299  			v0.AddArg(x)
 17300  			b.resetWithControl(BlockPPC64EQ, v0)
 17301  			return true
 17302  		}
 17303  		// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
 17304  		// cond: z.Uses == 1
 17305  		// result: (EQ (ANDCC x y) yes no)
 17306  		for b.Controls[0].Op == OpPPC64CMPconst {
 17307  			v_0 := b.Controls[0]
 17308  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17309  				break
 17310  			}
 17311  			z := v_0.Args[0]
 17312  			if z.Op != OpPPC64AND {
 17313  				break
 17314  			}
 17315  			_ = z.Args[1]
 17316  			z_0 := z.Args[0]
 17317  			z_1 := z.Args[1]
 17318  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17319  				x := z_0
 17320  				y := z_1
 17321  				if !(z.Uses == 1) {
 17322  					continue
 17323  				}
 17324  				v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
 17325  				v0.AddArg2(x, y)
 17326  				b.resetWithControl(BlockPPC64EQ, v0)
 17327  				return true
 17328  			}
 17329  			break
 17330  		}
 17331  		// match: (EQ (CMPconst [0] z:(OR x y)) yes no)
 17332  		// cond: z.Uses == 1
 17333  		// result: (EQ (ORCC x y) yes no)
 17334  		for b.Controls[0].Op == OpPPC64CMPconst {
 17335  			v_0 := b.Controls[0]
 17336  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17337  				break
 17338  			}
 17339  			z := v_0.Args[0]
 17340  			if z.Op != OpPPC64OR {
 17341  				break
 17342  			}
 17343  			_ = z.Args[1]
 17344  			z_0 := z.Args[0]
 17345  			z_1 := z.Args[1]
 17346  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17347  				x := z_0
 17348  				y := z_1
 17349  				if !(z.Uses == 1) {
 17350  					continue
 17351  				}
 17352  				v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
 17353  				v0.AddArg2(x, y)
 17354  				b.resetWithControl(BlockPPC64EQ, v0)
 17355  				return true
 17356  			}
 17357  			break
 17358  		}
 17359  		// match: (EQ (CMPconst [0] z:(XOR x y)) yes no)
 17360  		// cond: z.Uses == 1
 17361  		// result: (EQ (XORCC x y) yes no)
 17362  		for b.Controls[0].Op == OpPPC64CMPconst {
 17363  			v_0 := b.Controls[0]
 17364  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17365  				break
 17366  			}
 17367  			z := v_0.Args[0]
 17368  			if z.Op != OpPPC64XOR {
 17369  				break
 17370  			}
 17371  			_ = z.Args[1]
 17372  			z_0 := z.Args[0]
 17373  			z_1 := z.Args[1]
 17374  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17375  				x := z_0
 17376  				y := z_1
 17377  				if !(z.Uses == 1) {
 17378  					continue
 17379  				}
 17380  				v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
 17381  				v0.AddArg2(x, y)
 17382  				b.resetWithControl(BlockPPC64EQ, v0)
 17383  				return true
 17384  			}
 17385  			break
 17386  		}
 17387  	case BlockPPC64GE:
 17388  		// match: (GE (FlagEQ) yes no)
 17389  		// result: (First yes no)
 17390  		for b.Controls[0].Op == OpPPC64FlagEQ {
 17391  			b.Reset(BlockFirst)
 17392  			return true
 17393  		}
 17394  		// match: (GE (FlagLT) yes no)
 17395  		// result: (First no yes)
 17396  		for b.Controls[0].Op == OpPPC64FlagLT {
 17397  			b.Reset(BlockFirst)
 17398  			b.swapSuccessors()
 17399  			return true
 17400  		}
 17401  		// match: (GE (FlagGT) yes no)
 17402  		// result: (First yes no)
 17403  		for b.Controls[0].Op == OpPPC64FlagGT {
 17404  			b.Reset(BlockFirst)
 17405  			return true
 17406  		}
 17407  		// match: (GE (InvertFlags cmp) yes no)
 17408  		// result: (LE cmp yes no)
 17409  		for b.Controls[0].Op == OpPPC64InvertFlags {
 17410  			v_0 := b.Controls[0]
 17411  			cmp := v_0.Args[0]
 17412  			b.resetWithControl(BlockPPC64LE, cmp)
 17413  			return true
 17414  		}
 17415  		// match: (GE (CMPconst [0] (ANDconst [c] x)) yes no)
 17416  		// result: (GE (ANDCCconst [c] x) yes no)
 17417  		for b.Controls[0].Op == OpPPC64CMPconst {
 17418  			v_0 := b.Controls[0]
 17419  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17420  				break
 17421  			}
 17422  			v_0_0 := v_0.Args[0]
 17423  			if v_0_0.Op != OpPPC64ANDconst {
 17424  				break
 17425  			}
 17426  			c := auxIntToInt64(v_0_0.AuxInt)
 17427  			x := v_0_0.Args[0]
 17428  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17429  			v0.AuxInt = int64ToAuxInt(c)
 17430  			v0.AddArg(x)
 17431  			b.resetWithControl(BlockPPC64GE, v0)
 17432  			return true
 17433  		}
 17434  		// match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no)
 17435  		// result: (GE (ANDCCconst [c] x) yes no)
 17436  		for b.Controls[0].Op == OpPPC64CMPWconst {
 17437  			v_0 := b.Controls[0]
 17438  			if auxIntToInt32(v_0.AuxInt) != 0 {
 17439  				break
 17440  			}
 17441  			v_0_0 := v_0.Args[0]
 17442  			if v_0_0.Op != OpPPC64ANDconst {
 17443  				break
 17444  			}
 17445  			c := auxIntToInt64(v_0_0.AuxInt)
 17446  			x := v_0_0.Args[0]
 17447  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17448  			v0.AuxInt = int64ToAuxInt(c)
 17449  			v0.AddArg(x)
 17450  			b.resetWithControl(BlockPPC64GE, v0)
 17451  			return true
 17452  		}
 17453  		// match: (GE (CMPconst [0] z:(AND x y)) yes no)
 17454  		// cond: z.Uses == 1
 17455  		// result: (GE (ANDCC x y) yes no)
 17456  		for b.Controls[0].Op == OpPPC64CMPconst {
 17457  			v_0 := b.Controls[0]
 17458  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17459  				break
 17460  			}
 17461  			z := v_0.Args[0]
 17462  			if z.Op != OpPPC64AND {
 17463  				break
 17464  			}
 17465  			_ = z.Args[1]
 17466  			z_0 := z.Args[0]
 17467  			z_1 := z.Args[1]
 17468  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17469  				x := z_0
 17470  				y := z_1
 17471  				if !(z.Uses == 1) {
 17472  					continue
 17473  				}
 17474  				v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
 17475  				v0.AddArg2(x, y)
 17476  				b.resetWithControl(BlockPPC64GE, v0)
 17477  				return true
 17478  			}
 17479  			break
 17480  		}
 17481  		// match: (GE (CMPconst [0] z:(OR x y)) yes no)
 17482  		// cond: z.Uses == 1
 17483  		// result: (GE (ORCC x y) yes no)
 17484  		for b.Controls[0].Op == OpPPC64CMPconst {
 17485  			v_0 := b.Controls[0]
 17486  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17487  				break
 17488  			}
 17489  			z := v_0.Args[0]
 17490  			if z.Op != OpPPC64OR {
 17491  				break
 17492  			}
 17493  			_ = z.Args[1]
 17494  			z_0 := z.Args[0]
 17495  			z_1 := z.Args[1]
 17496  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17497  				x := z_0
 17498  				y := z_1
 17499  				if !(z.Uses == 1) {
 17500  					continue
 17501  				}
 17502  				v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
 17503  				v0.AddArg2(x, y)
 17504  				b.resetWithControl(BlockPPC64GE, v0)
 17505  				return true
 17506  			}
 17507  			break
 17508  		}
 17509  		// match: (GE (CMPconst [0] z:(XOR x y)) yes no)
 17510  		// cond: z.Uses == 1
 17511  		// result: (GE (XORCC x y) yes no)
 17512  		for b.Controls[0].Op == OpPPC64CMPconst {
 17513  			v_0 := b.Controls[0]
 17514  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17515  				break
 17516  			}
 17517  			z := v_0.Args[0]
 17518  			if z.Op != OpPPC64XOR {
 17519  				break
 17520  			}
 17521  			_ = z.Args[1]
 17522  			z_0 := z.Args[0]
 17523  			z_1 := z.Args[1]
 17524  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17525  				x := z_0
 17526  				y := z_1
 17527  				if !(z.Uses == 1) {
 17528  					continue
 17529  				}
 17530  				v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
 17531  				v0.AddArg2(x, y)
 17532  				b.resetWithControl(BlockPPC64GE, v0)
 17533  				return true
 17534  			}
 17535  			break
 17536  		}
 17537  	case BlockPPC64GT:
 17538  		// match: (GT (FlagEQ) yes no)
 17539  		// result: (First no yes)
 17540  		for b.Controls[0].Op == OpPPC64FlagEQ {
 17541  			b.Reset(BlockFirst)
 17542  			b.swapSuccessors()
 17543  			return true
 17544  		}
 17545  		// match: (GT (FlagLT) yes no)
 17546  		// result: (First no yes)
 17547  		for b.Controls[0].Op == OpPPC64FlagLT {
 17548  			b.Reset(BlockFirst)
 17549  			b.swapSuccessors()
 17550  			return true
 17551  		}
 17552  		// match: (GT (FlagGT) yes no)
 17553  		// result: (First yes no)
 17554  		for b.Controls[0].Op == OpPPC64FlagGT {
 17555  			b.Reset(BlockFirst)
 17556  			return true
 17557  		}
 17558  		// match: (GT (InvertFlags cmp) yes no)
 17559  		// result: (LT cmp yes no)
 17560  		for b.Controls[0].Op == OpPPC64InvertFlags {
 17561  			v_0 := b.Controls[0]
 17562  			cmp := v_0.Args[0]
 17563  			b.resetWithControl(BlockPPC64LT, cmp)
 17564  			return true
 17565  		}
 17566  		// match: (GT (CMPconst [0] (ANDconst [c] x)) yes no)
 17567  		// result: (GT (ANDCCconst [c] x) yes no)
 17568  		for b.Controls[0].Op == OpPPC64CMPconst {
 17569  			v_0 := b.Controls[0]
 17570  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17571  				break
 17572  			}
 17573  			v_0_0 := v_0.Args[0]
 17574  			if v_0_0.Op != OpPPC64ANDconst {
 17575  				break
 17576  			}
 17577  			c := auxIntToInt64(v_0_0.AuxInt)
 17578  			x := v_0_0.Args[0]
 17579  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17580  			v0.AuxInt = int64ToAuxInt(c)
 17581  			v0.AddArg(x)
 17582  			b.resetWithControl(BlockPPC64GT, v0)
 17583  			return true
 17584  		}
 17585  		// match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no)
 17586  		// result: (GT (ANDCCconst [c] x) yes no)
 17587  		for b.Controls[0].Op == OpPPC64CMPWconst {
 17588  			v_0 := b.Controls[0]
 17589  			if auxIntToInt32(v_0.AuxInt) != 0 {
 17590  				break
 17591  			}
 17592  			v_0_0 := v_0.Args[0]
 17593  			if v_0_0.Op != OpPPC64ANDconst {
 17594  				break
 17595  			}
 17596  			c := auxIntToInt64(v_0_0.AuxInt)
 17597  			x := v_0_0.Args[0]
 17598  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17599  			v0.AuxInt = int64ToAuxInt(c)
 17600  			v0.AddArg(x)
 17601  			b.resetWithControl(BlockPPC64GT, v0)
 17602  			return true
 17603  		}
 17604  		// match: (GT (CMPconst [0] z:(AND x y)) yes no)
 17605  		// cond: z.Uses == 1
 17606  		// result: (GT (ANDCC x y) yes no)
 17607  		for b.Controls[0].Op == OpPPC64CMPconst {
 17608  			v_0 := b.Controls[0]
 17609  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17610  				break
 17611  			}
 17612  			z := v_0.Args[0]
 17613  			if z.Op != OpPPC64AND {
 17614  				break
 17615  			}
 17616  			_ = z.Args[1]
 17617  			z_0 := z.Args[0]
 17618  			z_1 := z.Args[1]
 17619  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17620  				x := z_0
 17621  				y := z_1
 17622  				if !(z.Uses == 1) {
 17623  					continue
 17624  				}
 17625  				v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
 17626  				v0.AddArg2(x, y)
 17627  				b.resetWithControl(BlockPPC64GT, v0)
 17628  				return true
 17629  			}
 17630  			break
 17631  		}
 17632  		// match: (GT (CMPconst [0] z:(OR x y)) yes no)
 17633  		// cond: z.Uses == 1
 17634  		// result: (GT (ORCC x y) yes no)
 17635  		for b.Controls[0].Op == OpPPC64CMPconst {
 17636  			v_0 := b.Controls[0]
 17637  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17638  				break
 17639  			}
 17640  			z := v_0.Args[0]
 17641  			if z.Op != OpPPC64OR {
 17642  				break
 17643  			}
 17644  			_ = z.Args[1]
 17645  			z_0 := z.Args[0]
 17646  			z_1 := z.Args[1]
 17647  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17648  				x := z_0
 17649  				y := z_1
 17650  				if !(z.Uses == 1) {
 17651  					continue
 17652  				}
 17653  				v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
 17654  				v0.AddArg2(x, y)
 17655  				b.resetWithControl(BlockPPC64GT, v0)
 17656  				return true
 17657  			}
 17658  			break
 17659  		}
 17660  		// match: (GT (CMPconst [0] z:(XOR x y)) yes no)
 17661  		// cond: z.Uses == 1
 17662  		// result: (GT (XORCC x y) yes no)
 17663  		for b.Controls[0].Op == OpPPC64CMPconst {
 17664  			v_0 := b.Controls[0]
 17665  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17666  				break
 17667  			}
 17668  			z := v_0.Args[0]
 17669  			if z.Op != OpPPC64XOR {
 17670  				break
 17671  			}
 17672  			_ = z.Args[1]
 17673  			z_0 := z.Args[0]
 17674  			z_1 := z.Args[1]
 17675  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17676  				x := z_0
 17677  				y := z_1
 17678  				if !(z.Uses == 1) {
 17679  					continue
 17680  				}
 17681  				v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
 17682  				v0.AddArg2(x, y)
 17683  				b.resetWithControl(BlockPPC64GT, v0)
 17684  				return true
 17685  			}
 17686  			break
 17687  		}
 17688  	case BlockIf:
 17689  		// match: (If (Equal cc) yes no)
 17690  		// result: (EQ cc yes no)
 17691  		for b.Controls[0].Op == OpPPC64Equal {
 17692  			v_0 := b.Controls[0]
 17693  			cc := v_0.Args[0]
 17694  			b.resetWithControl(BlockPPC64EQ, cc)
 17695  			return true
 17696  		}
 17697  		// match: (If (NotEqual cc) yes no)
 17698  		// result: (NE cc yes no)
 17699  		for b.Controls[0].Op == OpPPC64NotEqual {
 17700  			v_0 := b.Controls[0]
 17701  			cc := v_0.Args[0]
 17702  			b.resetWithControl(BlockPPC64NE, cc)
 17703  			return true
 17704  		}
 17705  		// match: (If (LessThan cc) yes no)
 17706  		// result: (LT cc yes no)
 17707  		for b.Controls[0].Op == OpPPC64LessThan {
 17708  			v_0 := b.Controls[0]
 17709  			cc := v_0.Args[0]
 17710  			b.resetWithControl(BlockPPC64LT, cc)
 17711  			return true
 17712  		}
 17713  		// match: (If (LessEqual cc) yes no)
 17714  		// result: (LE cc yes no)
 17715  		for b.Controls[0].Op == OpPPC64LessEqual {
 17716  			v_0 := b.Controls[0]
 17717  			cc := v_0.Args[0]
 17718  			b.resetWithControl(BlockPPC64LE, cc)
 17719  			return true
 17720  		}
 17721  		// match: (If (GreaterThan cc) yes no)
 17722  		// result: (GT cc yes no)
 17723  		for b.Controls[0].Op == OpPPC64GreaterThan {
 17724  			v_0 := b.Controls[0]
 17725  			cc := v_0.Args[0]
 17726  			b.resetWithControl(BlockPPC64GT, cc)
 17727  			return true
 17728  		}
 17729  		// match: (If (GreaterEqual cc) yes no)
 17730  		// result: (GE cc yes no)
 17731  		for b.Controls[0].Op == OpPPC64GreaterEqual {
 17732  			v_0 := b.Controls[0]
 17733  			cc := v_0.Args[0]
 17734  			b.resetWithControl(BlockPPC64GE, cc)
 17735  			return true
 17736  		}
 17737  		// match: (If (FLessThan cc) yes no)
 17738  		// result: (FLT cc yes no)
 17739  		for b.Controls[0].Op == OpPPC64FLessThan {
 17740  			v_0 := b.Controls[0]
 17741  			cc := v_0.Args[0]
 17742  			b.resetWithControl(BlockPPC64FLT, cc)
 17743  			return true
 17744  		}
 17745  		// match: (If (FLessEqual cc) yes no)
 17746  		// result: (FLE cc yes no)
 17747  		for b.Controls[0].Op == OpPPC64FLessEqual {
 17748  			v_0 := b.Controls[0]
 17749  			cc := v_0.Args[0]
 17750  			b.resetWithControl(BlockPPC64FLE, cc)
 17751  			return true
 17752  		}
 17753  		// match: (If (FGreaterThan cc) yes no)
 17754  		// result: (FGT cc yes no)
 17755  		for b.Controls[0].Op == OpPPC64FGreaterThan {
 17756  			v_0 := b.Controls[0]
 17757  			cc := v_0.Args[0]
 17758  			b.resetWithControl(BlockPPC64FGT, cc)
 17759  			return true
 17760  		}
 17761  		// match: (If (FGreaterEqual cc) yes no)
 17762  		// result: (FGE cc yes no)
 17763  		for b.Controls[0].Op == OpPPC64FGreaterEqual {
 17764  			v_0 := b.Controls[0]
 17765  			cc := v_0.Args[0]
 17766  			b.resetWithControl(BlockPPC64FGE, cc)
 17767  			return true
 17768  		}
 17769  		// match: (If cond yes no)
 17770  		// result: (NE (CMPWconst [0] cond) yes no)
 17771  		for {
 17772  			cond := b.Controls[0]
 17773  			v0 := b.NewValue0(cond.Pos, OpPPC64CMPWconst, types.TypeFlags)
 17774  			v0.AuxInt = int32ToAuxInt(0)
 17775  			v0.AddArg(cond)
 17776  			b.resetWithControl(BlockPPC64NE, v0)
 17777  			return true
 17778  		}
 17779  	case BlockPPC64LE:
 17780  		// match: (LE (FlagEQ) yes no)
 17781  		// result: (First yes no)
 17782  		for b.Controls[0].Op == OpPPC64FlagEQ {
 17783  			b.Reset(BlockFirst)
 17784  			return true
 17785  		}
 17786  		// match: (LE (FlagLT) yes no)
 17787  		// result: (First yes no)
 17788  		for b.Controls[0].Op == OpPPC64FlagLT {
 17789  			b.Reset(BlockFirst)
 17790  			return true
 17791  		}
 17792  		// match: (LE (FlagGT) yes no)
 17793  		// result: (First no yes)
 17794  		for b.Controls[0].Op == OpPPC64FlagGT {
 17795  			b.Reset(BlockFirst)
 17796  			b.swapSuccessors()
 17797  			return true
 17798  		}
 17799  		// match: (LE (InvertFlags cmp) yes no)
 17800  		// result: (GE cmp yes no)
 17801  		for b.Controls[0].Op == OpPPC64InvertFlags {
 17802  			v_0 := b.Controls[0]
 17803  			cmp := v_0.Args[0]
 17804  			b.resetWithControl(BlockPPC64GE, cmp)
 17805  			return true
 17806  		}
 17807  		// match: (LE (CMPconst [0] (ANDconst [c] x)) yes no)
 17808  		// result: (LE (ANDCCconst [c] x) yes no)
 17809  		for b.Controls[0].Op == OpPPC64CMPconst {
 17810  			v_0 := b.Controls[0]
 17811  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17812  				break
 17813  			}
 17814  			v_0_0 := v_0.Args[0]
 17815  			if v_0_0.Op != OpPPC64ANDconst {
 17816  				break
 17817  			}
 17818  			c := auxIntToInt64(v_0_0.AuxInt)
 17819  			x := v_0_0.Args[0]
 17820  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17821  			v0.AuxInt = int64ToAuxInt(c)
 17822  			v0.AddArg(x)
 17823  			b.resetWithControl(BlockPPC64LE, v0)
 17824  			return true
 17825  		}
 17826  		// match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no)
 17827  		// result: (LE (ANDCCconst [c] x) yes no)
 17828  		for b.Controls[0].Op == OpPPC64CMPWconst {
 17829  			v_0 := b.Controls[0]
 17830  			if auxIntToInt32(v_0.AuxInt) != 0 {
 17831  				break
 17832  			}
 17833  			v_0_0 := v_0.Args[0]
 17834  			if v_0_0.Op != OpPPC64ANDconst {
 17835  				break
 17836  			}
 17837  			c := auxIntToInt64(v_0_0.AuxInt)
 17838  			x := v_0_0.Args[0]
 17839  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17840  			v0.AuxInt = int64ToAuxInt(c)
 17841  			v0.AddArg(x)
 17842  			b.resetWithControl(BlockPPC64LE, v0)
 17843  			return true
 17844  		}
 17845  		// match: (LE (CMPconst [0] z:(AND x y)) yes no)
 17846  		// cond: z.Uses == 1
 17847  		// result: (LE (ANDCC x y) yes no)
 17848  		for b.Controls[0].Op == OpPPC64CMPconst {
 17849  			v_0 := b.Controls[0]
 17850  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17851  				break
 17852  			}
 17853  			z := v_0.Args[0]
 17854  			if z.Op != OpPPC64AND {
 17855  				break
 17856  			}
 17857  			_ = z.Args[1]
 17858  			z_0 := z.Args[0]
 17859  			z_1 := z.Args[1]
 17860  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17861  				x := z_0
 17862  				y := z_1
 17863  				if !(z.Uses == 1) {
 17864  					continue
 17865  				}
 17866  				v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
 17867  				v0.AddArg2(x, y)
 17868  				b.resetWithControl(BlockPPC64LE, v0)
 17869  				return true
 17870  			}
 17871  			break
 17872  		}
 17873  		// match: (LE (CMPconst [0] z:(OR x y)) yes no)
 17874  		// cond: z.Uses == 1
 17875  		// result: (LE (ORCC x y) yes no)
 17876  		for b.Controls[0].Op == OpPPC64CMPconst {
 17877  			v_0 := b.Controls[0]
 17878  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17879  				break
 17880  			}
 17881  			z := v_0.Args[0]
 17882  			if z.Op != OpPPC64OR {
 17883  				break
 17884  			}
 17885  			_ = z.Args[1]
 17886  			z_0 := z.Args[0]
 17887  			z_1 := z.Args[1]
 17888  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17889  				x := z_0
 17890  				y := z_1
 17891  				if !(z.Uses == 1) {
 17892  					continue
 17893  				}
 17894  				v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
 17895  				v0.AddArg2(x, y)
 17896  				b.resetWithControl(BlockPPC64LE, v0)
 17897  				return true
 17898  			}
 17899  			break
 17900  		}
 17901  		// match: (LE (CMPconst [0] z:(XOR x y)) yes no)
 17902  		// cond: z.Uses == 1
 17903  		// result: (LE (XORCC x y) yes no)
 17904  		for b.Controls[0].Op == OpPPC64CMPconst {
 17905  			v_0 := b.Controls[0]
 17906  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17907  				break
 17908  			}
 17909  			z := v_0.Args[0]
 17910  			if z.Op != OpPPC64XOR {
 17911  				break
 17912  			}
 17913  			_ = z.Args[1]
 17914  			z_0 := z.Args[0]
 17915  			z_1 := z.Args[1]
 17916  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 17917  				x := z_0
 17918  				y := z_1
 17919  				if !(z.Uses == 1) {
 17920  					continue
 17921  				}
 17922  				v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
 17923  				v0.AddArg2(x, y)
 17924  				b.resetWithControl(BlockPPC64LE, v0)
 17925  				return true
 17926  			}
 17927  			break
 17928  		}
 17929  	case BlockPPC64LT:
 17930  		// match: (LT (FlagEQ) yes no)
 17931  		// result: (First no yes)
 17932  		for b.Controls[0].Op == OpPPC64FlagEQ {
 17933  			b.Reset(BlockFirst)
 17934  			b.swapSuccessors()
 17935  			return true
 17936  		}
 17937  		// match: (LT (FlagLT) yes no)
 17938  		// result: (First yes no)
 17939  		for b.Controls[0].Op == OpPPC64FlagLT {
 17940  			b.Reset(BlockFirst)
 17941  			return true
 17942  		}
 17943  		// match: (LT (FlagGT) yes no)
 17944  		// result: (First no yes)
 17945  		for b.Controls[0].Op == OpPPC64FlagGT {
 17946  			b.Reset(BlockFirst)
 17947  			b.swapSuccessors()
 17948  			return true
 17949  		}
 17950  		// match: (LT (InvertFlags cmp) yes no)
 17951  		// result: (GT cmp yes no)
 17952  		for b.Controls[0].Op == OpPPC64InvertFlags {
 17953  			v_0 := b.Controls[0]
 17954  			cmp := v_0.Args[0]
 17955  			b.resetWithControl(BlockPPC64GT, cmp)
 17956  			return true
 17957  		}
 17958  		// match: (LT (CMPconst [0] (ANDconst [c] x)) yes no)
 17959  		// result: (LT (ANDCCconst [c] x) yes no)
 17960  		for b.Controls[0].Op == OpPPC64CMPconst {
 17961  			v_0 := b.Controls[0]
 17962  			if auxIntToInt64(v_0.AuxInt) != 0 {
 17963  				break
 17964  			}
 17965  			v_0_0 := v_0.Args[0]
 17966  			if v_0_0.Op != OpPPC64ANDconst {
 17967  				break
 17968  			}
 17969  			c := auxIntToInt64(v_0_0.AuxInt)
 17970  			x := v_0_0.Args[0]
 17971  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17972  			v0.AuxInt = int64ToAuxInt(c)
 17973  			v0.AddArg(x)
 17974  			b.resetWithControl(BlockPPC64LT, v0)
 17975  			return true
 17976  		}
 17977  		// match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no)
 17978  		// result: (LT (ANDCCconst [c] x) yes no)
 17979  		for b.Controls[0].Op == OpPPC64CMPWconst {
 17980  			v_0 := b.Controls[0]
 17981  			if auxIntToInt32(v_0.AuxInt) != 0 {
 17982  				break
 17983  			}
 17984  			v_0_0 := v_0.Args[0]
 17985  			if v_0_0.Op != OpPPC64ANDconst {
 17986  				break
 17987  			}
 17988  			c := auxIntToInt64(v_0_0.AuxInt)
 17989  			x := v_0_0.Args[0]
 17990  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 17991  			v0.AuxInt = int64ToAuxInt(c)
 17992  			v0.AddArg(x)
 17993  			b.resetWithControl(BlockPPC64LT, v0)
 17994  			return true
 17995  		}
 17996  		// match: (LT (CMPconst [0] z:(AND x y)) yes no)
 17997  		// cond: z.Uses == 1
 17998  		// result: (LT (ANDCC x y) yes no)
 17999  		for b.Controls[0].Op == OpPPC64CMPconst {
 18000  			v_0 := b.Controls[0]
 18001  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18002  				break
 18003  			}
 18004  			z := v_0.Args[0]
 18005  			if z.Op != OpPPC64AND {
 18006  				break
 18007  			}
 18008  			_ = z.Args[1]
 18009  			z_0 := z.Args[0]
 18010  			z_1 := z.Args[1]
 18011  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 18012  				x := z_0
 18013  				y := z_1
 18014  				if !(z.Uses == 1) {
 18015  					continue
 18016  				}
 18017  				v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
 18018  				v0.AddArg2(x, y)
 18019  				b.resetWithControl(BlockPPC64LT, v0)
 18020  				return true
 18021  			}
 18022  			break
 18023  		}
 18024  		// match: (LT (CMPconst [0] z:(OR x y)) yes no)
 18025  		// cond: z.Uses == 1
 18026  		// result: (LT (ORCC x y) yes no)
 18027  		for b.Controls[0].Op == OpPPC64CMPconst {
 18028  			v_0 := b.Controls[0]
 18029  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18030  				break
 18031  			}
 18032  			z := v_0.Args[0]
 18033  			if z.Op != OpPPC64OR {
 18034  				break
 18035  			}
 18036  			_ = z.Args[1]
 18037  			z_0 := z.Args[0]
 18038  			z_1 := z.Args[1]
 18039  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 18040  				x := z_0
 18041  				y := z_1
 18042  				if !(z.Uses == 1) {
 18043  					continue
 18044  				}
 18045  				v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
 18046  				v0.AddArg2(x, y)
 18047  				b.resetWithControl(BlockPPC64LT, v0)
 18048  				return true
 18049  			}
 18050  			break
 18051  		}
 18052  		// match: (LT (CMPconst [0] z:(XOR x y)) yes no)
 18053  		// cond: z.Uses == 1
 18054  		// result: (LT (XORCC x y) yes no)
 18055  		for b.Controls[0].Op == OpPPC64CMPconst {
 18056  			v_0 := b.Controls[0]
 18057  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18058  				break
 18059  			}
 18060  			z := v_0.Args[0]
 18061  			if z.Op != OpPPC64XOR {
 18062  				break
 18063  			}
 18064  			_ = z.Args[1]
 18065  			z_0 := z.Args[0]
 18066  			z_1 := z.Args[1]
 18067  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 18068  				x := z_0
 18069  				y := z_1
 18070  				if !(z.Uses == 1) {
 18071  					continue
 18072  				}
 18073  				v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
 18074  				v0.AddArg2(x, y)
 18075  				b.resetWithControl(BlockPPC64LT, v0)
 18076  				return true
 18077  			}
 18078  			break
 18079  		}
 18080  	case BlockPPC64NE:
 18081  		// match: (NE (CMPWconst [0] (Equal cc)) yes no)
 18082  		// result: (EQ cc yes no)
 18083  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18084  			v_0 := b.Controls[0]
 18085  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18086  				break
 18087  			}
 18088  			v_0_0 := v_0.Args[0]
 18089  			if v_0_0.Op != OpPPC64Equal {
 18090  				break
 18091  			}
 18092  			cc := v_0_0.Args[0]
 18093  			b.resetWithControl(BlockPPC64EQ, cc)
 18094  			return true
 18095  		}
 18096  		// match: (NE (CMPWconst [0] (NotEqual cc)) yes no)
 18097  		// result: (NE cc yes no)
 18098  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18099  			v_0 := b.Controls[0]
 18100  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18101  				break
 18102  			}
 18103  			v_0_0 := v_0.Args[0]
 18104  			if v_0_0.Op != OpPPC64NotEqual {
 18105  				break
 18106  			}
 18107  			cc := v_0_0.Args[0]
 18108  			b.resetWithControl(BlockPPC64NE, cc)
 18109  			return true
 18110  		}
 18111  		// match: (NE (CMPWconst [0] (LessThan cc)) yes no)
 18112  		// result: (LT cc yes no)
 18113  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18114  			v_0 := b.Controls[0]
 18115  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18116  				break
 18117  			}
 18118  			v_0_0 := v_0.Args[0]
 18119  			if v_0_0.Op != OpPPC64LessThan {
 18120  				break
 18121  			}
 18122  			cc := v_0_0.Args[0]
 18123  			b.resetWithControl(BlockPPC64LT, cc)
 18124  			return true
 18125  		}
 18126  		// match: (NE (CMPWconst [0] (LessEqual cc)) yes no)
 18127  		// result: (LE cc yes no)
 18128  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18129  			v_0 := b.Controls[0]
 18130  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18131  				break
 18132  			}
 18133  			v_0_0 := v_0.Args[0]
 18134  			if v_0_0.Op != OpPPC64LessEqual {
 18135  				break
 18136  			}
 18137  			cc := v_0_0.Args[0]
 18138  			b.resetWithControl(BlockPPC64LE, cc)
 18139  			return true
 18140  		}
 18141  		// match: (NE (CMPWconst [0] (GreaterThan cc)) yes no)
 18142  		// result: (GT cc yes no)
 18143  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18144  			v_0 := b.Controls[0]
 18145  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18146  				break
 18147  			}
 18148  			v_0_0 := v_0.Args[0]
 18149  			if v_0_0.Op != OpPPC64GreaterThan {
 18150  				break
 18151  			}
 18152  			cc := v_0_0.Args[0]
 18153  			b.resetWithControl(BlockPPC64GT, cc)
 18154  			return true
 18155  		}
 18156  		// match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no)
 18157  		// result: (GE cc yes no)
 18158  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18159  			v_0 := b.Controls[0]
 18160  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18161  				break
 18162  			}
 18163  			v_0_0 := v_0.Args[0]
 18164  			if v_0_0.Op != OpPPC64GreaterEqual {
 18165  				break
 18166  			}
 18167  			cc := v_0_0.Args[0]
 18168  			b.resetWithControl(BlockPPC64GE, cc)
 18169  			return true
 18170  		}
 18171  		// match: (NE (CMPWconst [0] (FLessThan cc)) yes no)
 18172  		// result: (FLT cc yes no)
 18173  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18174  			v_0 := b.Controls[0]
 18175  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18176  				break
 18177  			}
 18178  			v_0_0 := v_0.Args[0]
 18179  			if v_0_0.Op != OpPPC64FLessThan {
 18180  				break
 18181  			}
 18182  			cc := v_0_0.Args[0]
 18183  			b.resetWithControl(BlockPPC64FLT, cc)
 18184  			return true
 18185  		}
 18186  		// match: (NE (CMPWconst [0] (FLessEqual cc)) yes no)
 18187  		// result: (FLE cc yes no)
 18188  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18189  			v_0 := b.Controls[0]
 18190  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18191  				break
 18192  			}
 18193  			v_0_0 := v_0.Args[0]
 18194  			if v_0_0.Op != OpPPC64FLessEqual {
 18195  				break
 18196  			}
 18197  			cc := v_0_0.Args[0]
 18198  			b.resetWithControl(BlockPPC64FLE, cc)
 18199  			return true
 18200  		}
 18201  		// match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no)
 18202  		// result: (FGT cc yes no)
 18203  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18204  			v_0 := b.Controls[0]
 18205  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18206  				break
 18207  			}
 18208  			v_0_0 := v_0.Args[0]
 18209  			if v_0_0.Op != OpPPC64FGreaterThan {
 18210  				break
 18211  			}
 18212  			cc := v_0_0.Args[0]
 18213  			b.resetWithControl(BlockPPC64FGT, cc)
 18214  			return true
 18215  		}
 18216  		// match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no)
 18217  		// result: (FGE cc yes no)
 18218  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18219  			v_0 := b.Controls[0]
 18220  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18221  				break
 18222  			}
 18223  			v_0_0 := v_0.Args[0]
 18224  			if v_0_0.Op != OpPPC64FGreaterEqual {
 18225  				break
 18226  			}
 18227  			cc := v_0_0.Args[0]
 18228  			b.resetWithControl(BlockPPC64FGE, cc)
 18229  			return true
 18230  		}
 18231  		// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
 18232  		// result: (NE (ANDCCconst [c] x) yes no)
 18233  		for b.Controls[0].Op == OpPPC64CMPconst {
 18234  			v_0 := b.Controls[0]
 18235  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18236  				break
 18237  			}
 18238  			v_0_0 := v_0.Args[0]
 18239  			if v_0_0.Op != OpPPC64ANDconst {
 18240  				break
 18241  			}
 18242  			c := auxIntToInt64(v_0_0.AuxInt)
 18243  			x := v_0_0.Args[0]
 18244  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 18245  			v0.AuxInt = int64ToAuxInt(c)
 18246  			v0.AddArg(x)
 18247  			b.resetWithControl(BlockPPC64NE, v0)
 18248  			return true
 18249  		}
 18250  		// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
 18251  		// result: (NE (ANDCCconst [c] x) yes no)
 18252  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18253  			v_0 := b.Controls[0]
 18254  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18255  				break
 18256  			}
 18257  			v_0_0 := v_0.Args[0]
 18258  			if v_0_0.Op != OpPPC64ANDconst {
 18259  				break
 18260  			}
 18261  			c := auxIntToInt64(v_0_0.AuxInt)
 18262  			x := v_0_0.Args[0]
 18263  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 18264  			v0.AuxInt = int64ToAuxInt(c)
 18265  			v0.AddArg(x)
 18266  			b.resetWithControl(BlockPPC64NE, v0)
 18267  			return true
 18268  		}
 18269  		// match: (NE (FlagEQ) yes no)
 18270  		// result: (First no yes)
 18271  		for b.Controls[0].Op == OpPPC64FlagEQ {
 18272  			b.Reset(BlockFirst)
 18273  			b.swapSuccessors()
 18274  			return true
 18275  		}
 18276  		// match: (NE (FlagLT) yes no)
 18277  		// result: (First yes no)
 18278  		for b.Controls[0].Op == OpPPC64FlagLT {
 18279  			b.Reset(BlockFirst)
 18280  			return true
 18281  		}
 18282  		// match: (NE (FlagGT) yes no)
 18283  		// result: (First yes no)
 18284  		for b.Controls[0].Op == OpPPC64FlagGT {
 18285  			b.Reset(BlockFirst)
 18286  			return true
 18287  		}
 18288  		// match: (NE (InvertFlags cmp) yes no)
 18289  		// result: (NE cmp yes no)
 18290  		for b.Controls[0].Op == OpPPC64InvertFlags {
 18291  			v_0 := b.Controls[0]
 18292  			cmp := v_0.Args[0]
 18293  			b.resetWithControl(BlockPPC64NE, cmp)
 18294  			return true
 18295  		}
 18296  		// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
 18297  		// result: (NE (ANDCCconst [c] x) yes no)
 18298  		for b.Controls[0].Op == OpPPC64CMPconst {
 18299  			v_0 := b.Controls[0]
 18300  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18301  				break
 18302  			}
 18303  			v_0_0 := v_0.Args[0]
 18304  			if v_0_0.Op != OpPPC64ANDconst {
 18305  				break
 18306  			}
 18307  			c := auxIntToInt64(v_0_0.AuxInt)
 18308  			x := v_0_0.Args[0]
 18309  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 18310  			v0.AuxInt = int64ToAuxInt(c)
 18311  			v0.AddArg(x)
 18312  			b.resetWithControl(BlockPPC64NE, v0)
 18313  			return true
 18314  		}
 18315  		// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
 18316  		// result: (NE (ANDCCconst [c] x) yes no)
 18317  		for b.Controls[0].Op == OpPPC64CMPWconst {
 18318  			v_0 := b.Controls[0]
 18319  			if auxIntToInt32(v_0.AuxInt) != 0 {
 18320  				break
 18321  			}
 18322  			v_0_0 := v_0.Args[0]
 18323  			if v_0_0.Op != OpPPC64ANDconst {
 18324  				break
 18325  			}
 18326  			c := auxIntToInt64(v_0_0.AuxInt)
 18327  			x := v_0_0.Args[0]
 18328  			v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCCconst, types.TypeFlags)
 18329  			v0.AuxInt = int64ToAuxInt(c)
 18330  			v0.AddArg(x)
 18331  			b.resetWithControl(BlockPPC64NE, v0)
 18332  			return true
 18333  		}
 18334  		// match: (NE (CMPconst [0] z:(AND x y)) yes no)
 18335  		// cond: z.Uses == 1
 18336  		// result: (NE (ANDCC x y) yes no)
 18337  		for b.Controls[0].Op == OpPPC64CMPconst {
 18338  			v_0 := b.Controls[0]
 18339  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18340  				break
 18341  			}
 18342  			z := v_0.Args[0]
 18343  			if z.Op != OpPPC64AND {
 18344  				break
 18345  			}
 18346  			_ = z.Args[1]
 18347  			z_0 := z.Args[0]
 18348  			z_1 := z.Args[1]
 18349  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 18350  				x := z_0
 18351  				y := z_1
 18352  				if !(z.Uses == 1) {
 18353  					continue
 18354  				}
 18355  				v0 := b.NewValue0(v_0.Pos, OpPPC64ANDCC, types.TypeFlags)
 18356  				v0.AddArg2(x, y)
 18357  				b.resetWithControl(BlockPPC64NE, v0)
 18358  				return true
 18359  			}
 18360  			break
 18361  		}
 18362  		// match: (NE (CMPconst [0] z:(OR x y)) yes no)
 18363  		// cond: z.Uses == 1
 18364  		// result: (NE (ORCC x y) yes no)
 18365  		for b.Controls[0].Op == OpPPC64CMPconst {
 18366  			v_0 := b.Controls[0]
 18367  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18368  				break
 18369  			}
 18370  			z := v_0.Args[0]
 18371  			if z.Op != OpPPC64OR {
 18372  				break
 18373  			}
 18374  			_ = z.Args[1]
 18375  			z_0 := z.Args[0]
 18376  			z_1 := z.Args[1]
 18377  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 18378  				x := z_0
 18379  				y := z_1
 18380  				if !(z.Uses == 1) {
 18381  					continue
 18382  				}
 18383  				v0 := b.NewValue0(v_0.Pos, OpPPC64ORCC, types.TypeFlags)
 18384  				v0.AddArg2(x, y)
 18385  				b.resetWithControl(BlockPPC64NE, v0)
 18386  				return true
 18387  			}
 18388  			break
 18389  		}
 18390  		// match: (NE (CMPconst [0] z:(XOR x y)) yes no)
 18391  		// cond: z.Uses == 1
 18392  		// result: (NE (XORCC x y) yes no)
 18393  		for b.Controls[0].Op == OpPPC64CMPconst {
 18394  			v_0 := b.Controls[0]
 18395  			if auxIntToInt64(v_0.AuxInt) != 0 {
 18396  				break
 18397  			}
 18398  			z := v_0.Args[0]
 18399  			if z.Op != OpPPC64XOR {
 18400  				break
 18401  			}
 18402  			_ = z.Args[1]
 18403  			z_0 := z.Args[0]
 18404  			z_1 := z.Args[1]
 18405  			for _i0 := 0; _i0 <= 1; _i0, z_0, z_1 = _i0+1, z_1, z_0 {
 18406  				x := z_0
 18407  				y := z_1
 18408  				if !(z.Uses == 1) {
 18409  					continue
 18410  				}
 18411  				v0 := b.NewValue0(v_0.Pos, OpPPC64XORCC, types.TypeFlags)
 18412  				v0.AddArg2(x, y)
 18413  				b.resetWithControl(BlockPPC64NE, v0)
 18414  				return true
 18415  			}
 18416  			break
 18417  		}
 18418  	}
 18419  	return false
 18420  }
 18421  

View as plain text