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

     1  // Code generated from _gen/S390X.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  import "cmd/internal/obj/s390x"
     8  
     9  func rewriteValueS390X(v *Value) bool {
    10  	switch v.Op {
    11  	case OpAdd16:
    12  		v.Op = OpS390XADDW
    13  		return true
    14  	case OpAdd32:
    15  		v.Op = OpS390XADDW
    16  		return true
    17  	case OpAdd32F:
    18  		return rewriteValueS390X_OpAdd32F(v)
    19  	case OpAdd64:
    20  		v.Op = OpS390XADD
    21  		return true
    22  	case OpAdd64F:
    23  		return rewriteValueS390X_OpAdd64F(v)
    24  	case OpAdd8:
    25  		v.Op = OpS390XADDW
    26  		return true
    27  	case OpAddPtr:
    28  		v.Op = OpS390XADD
    29  		return true
    30  	case OpAddr:
    31  		return rewriteValueS390X_OpAddr(v)
    32  	case OpAnd16:
    33  		v.Op = OpS390XANDW
    34  		return true
    35  	case OpAnd32:
    36  		v.Op = OpS390XANDW
    37  		return true
    38  	case OpAnd64:
    39  		v.Op = OpS390XAND
    40  		return true
    41  	case OpAnd8:
    42  		v.Op = OpS390XANDW
    43  		return true
    44  	case OpAndB:
    45  		v.Op = OpS390XANDW
    46  		return true
    47  	case OpAtomicAdd32:
    48  		return rewriteValueS390X_OpAtomicAdd32(v)
    49  	case OpAtomicAdd64:
    50  		return rewriteValueS390X_OpAtomicAdd64(v)
    51  	case OpAtomicAnd32:
    52  		v.Op = OpS390XLAN
    53  		return true
    54  	case OpAtomicAnd8:
    55  		return rewriteValueS390X_OpAtomicAnd8(v)
    56  	case OpAtomicCompareAndSwap32:
    57  		return rewriteValueS390X_OpAtomicCompareAndSwap32(v)
    58  	case OpAtomicCompareAndSwap64:
    59  		return rewriteValueS390X_OpAtomicCompareAndSwap64(v)
    60  	case OpAtomicExchange32:
    61  		return rewriteValueS390X_OpAtomicExchange32(v)
    62  	case OpAtomicExchange64:
    63  		return rewriteValueS390X_OpAtomicExchange64(v)
    64  	case OpAtomicLoad32:
    65  		return rewriteValueS390X_OpAtomicLoad32(v)
    66  	case OpAtomicLoad64:
    67  		return rewriteValueS390X_OpAtomicLoad64(v)
    68  	case OpAtomicLoad8:
    69  		return rewriteValueS390X_OpAtomicLoad8(v)
    70  	case OpAtomicLoadAcq32:
    71  		return rewriteValueS390X_OpAtomicLoadAcq32(v)
    72  	case OpAtomicLoadPtr:
    73  		return rewriteValueS390X_OpAtomicLoadPtr(v)
    74  	case OpAtomicOr32:
    75  		v.Op = OpS390XLAO
    76  		return true
    77  	case OpAtomicOr8:
    78  		return rewriteValueS390X_OpAtomicOr8(v)
    79  	case OpAtomicStore32:
    80  		return rewriteValueS390X_OpAtomicStore32(v)
    81  	case OpAtomicStore64:
    82  		return rewriteValueS390X_OpAtomicStore64(v)
    83  	case OpAtomicStore8:
    84  		return rewriteValueS390X_OpAtomicStore8(v)
    85  	case OpAtomicStorePtrNoWB:
    86  		return rewriteValueS390X_OpAtomicStorePtrNoWB(v)
    87  	case OpAtomicStoreRel32:
    88  		return rewriteValueS390X_OpAtomicStoreRel32(v)
    89  	case OpAvg64u:
    90  		return rewriteValueS390X_OpAvg64u(v)
    91  	case OpBitLen16:
    92  		return rewriteValueS390X_OpBitLen16(v)
    93  	case OpBitLen32:
    94  		return rewriteValueS390X_OpBitLen32(v)
    95  	case OpBitLen64:
    96  		return rewriteValueS390X_OpBitLen64(v)
    97  	case OpBitLen8:
    98  		return rewriteValueS390X_OpBitLen8(v)
    99  	case OpBswap16:
   100  		return rewriteValueS390X_OpBswap16(v)
   101  	case OpBswap32:
   102  		v.Op = OpS390XMOVWBR
   103  		return true
   104  	case OpBswap64:
   105  		v.Op = OpS390XMOVDBR
   106  		return true
   107  	case OpCeil:
   108  		return rewriteValueS390X_OpCeil(v)
   109  	case OpClosureCall:
   110  		v.Op = OpS390XCALLclosure
   111  		return true
   112  	case OpCom16:
   113  		v.Op = OpS390XNOTW
   114  		return true
   115  	case OpCom32:
   116  		v.Op = OpS390XNOTW
   117  		return true
   118  	case OpCom64:
   119  		v.Op = OpS390XNOT
   120  		return true
   121  	case OpCom8:
   122  		v.Op = OpS390XNOTW
   123  		return true
   124  	case OpConst16:
   125  		return rewriteValueS390X_OpConst16(v)
   126  	case OpConst32:
   127  		return rewriteValueS390X_OpConst32(v)
   128  	case OpConst32F:
   129  		v.Op = OpS390XFMOVSconst
   130  		return true
   131  	case OpConst64:
   132  		return rewriteValueS390X_OpConst64(v)
   133  	case OpConst64F:
   134  		v.Op = OpS390XFMOVDconst
   135  		return true
   136  	case OpConst8:
   137  		return rewriteValueS390X_OpConst8(v)
   138  	case OpConstBool:
   139  		return rewriteValueS390X_OpConstBool(v)
   140  	case OpConstNil:
   141  		return rewriteValueS390X_OpConstNil(v)
   142  	case OpCtz16:
   143  		return rewriteValueS390X_OpCtz16(v)
   144  	case OpCtz16NonZero:
   145  		v.Op = OpCtz64
   146  		return true
   147  	case OpCtz32:
   148  		return rewriteValueS390X_OpCtz32(v)
   149  	case OpCtz32NonZero:
   150  		v.Op = OpCtz64
   151  		return true
   152  	case OpCtz64:
   153  		return rewriteValueS390X_OpCtz64(v)
   154  	case OpCtz64NonZero:
   155  		v.Op = OpCtz64
   156  		return true
   157  	case OpCtz8:
   158  		return rewriteValueS390X_OpCtz8(v)
   159  	case OpCtz8NonZero:
   160  		v.Op = OpCtz64
   161  		return true
   162  	case OpCvt32Fto32:
   163  		v.Op = OpS390XCFEBRA
   164  		return true
   165  	case OpCvt32Fto32U:
   166  		v.Op = OpS390XCLFEBR
   167  		return true
   168  	case OpCvt32Fto64:
   169  		v.Op = OpS390XCGEBRA
   170  		return true
   171  	case OpCvt32Fto64F:
   172  		v.Op = OpS390XLDEBR
   173  		return true
   174  	case OpCvt32Fto64U:
   175  		v.Op = OpS390XCLGEBR
   176  		return true
   177  	case OpCvt32Uto32F:
   178  		v.Op = OpS390XCELFBR
   179  		return true
   180  	case OpCvt32Uto64F:
   181  		v.Op = OpS390XCDLFBR
   182  		return true
   183  	case OpCvt32to32F:
   184  		v.Op = OpS390XCEFBRA
   185  		return true
   186  	case OpCvt32to64F:
   187  		v.Op = OpS390XCDFBRA
   188  		return true
   189  	case OpCvt64Fto32:
   190  		v.Op = OpS390XCFDBRA
   191  		return true
   192  	case OpCvt64Fto32F:
   193  		v.Op = OpS390XLEDBR
   194  		return true
   195  	case OpCvt64Fto32U:
   196  		v.Op = OpS390XCLFDBR
   197  		return true
   198  	case OpCvt64Fto64:
   199  		v.Op = OpS390XCGDBRA
   200  		return true
   201  	case OpCvt64Fto64U:
   202  		v.Op = OpS390XCLGDBR
   203  		return true
   204  	case OpCvt64Uto32F:
   205  		v.Op = OpS390XCELGBR
   206  		return true
   207  	case OpCvt64Uto64F:
   208  		v.Op = OpS390XCDLGBR
   209  		return true
   210  	case OpCvt64to32F:
   211  		v.Op = OpS390XCEGBRA
   212  		return true
   213  	case OpCvt64to64F:
   214  		v.Op = OpS390XCDGBRA
   215  		return true
   216  	case OpCvtBoolToUint8:
   217  		v.Op = OpCopy
   218  		return true
   219  	case OpDiv16:
   220  		return rewriteValueS390X_OpDiv16(v)
   221  	case OpDiv16u:
   222  		return rewriteValueS390X_OpDiv16u(v)
   223  	case OpDiv32:
   224  		return rewriteValueS390X_OpDiv32(v)
   225  	case OpDiv32F:
   226  		v.Op = OpS390XFDIVS
   227  		return true
   228  	case OpDiv32u:
   229  		return rewriteValueS390X_OpDiv32u(v)
   230  	case OpDiv64:
   231  		return rewriteValueS390X_OpDiv64(v)
   232  	case OpDiv64F:
   233  		v.Op = OpS390XFDIV
   234  		return true
   235  	case OpDiv64u:
   236  		v.Op = OpS390XDIVDU
   237  		return true
   238  	case OpDiv8:
   239  		return rewriteValueS390X_OpDiv8(v)
   240  	case OpDiv8u:
   241  		return rewriteValueS390X_OpDiv8u(v)
   242  	case OpEq16:
   243  		return rewriteValueS390X_OpEq16(v)
   244  	case OpEq32:
   245  		return rewriteValueS390X_OpEq32(v)
   246  	case OpEq32F:
   247  		return rewriteValueS390X_OpEq32F(v)
   248  	case OpEq64:
   249  		return rewriteValueS390X_OpEq64(v)
   250  	case OpEq64F:
   251  		return rewriteValueS390X_OpEq64F(v)
   252  	case OpEq8:
   253  		return rewriteValueS390X_OpEq8(v)
   254  	case OpEqB:
   255  		return rewriteValueS390X_OpEqB(v)
   256  	case OpEqPtr:
   257  		return rewriteValueS390X_OpEqPtr(v)
   258  	case OpFMA:
   259  		return rewriteValueS390X_OpFMA(v)
   260  	case OpFloor:
   261  		return rewriteValueS390X_OpFloor(v)
   262  	case OpGetCallerPC:
   263  		v.Op = OpS390XLoweredGetCallerPC
   264  		return true
   265  	case OpGetCallerSP:
   266  		v.Op = OpS390XLoweredGetCallerSP
   267  		return true
   268  	case OpGetClosurePtr:
   269  		v.Op = OpS390XLoweredGetClosurePtr
   270  		return true
   271  	case OpGetG:
   272  		v.Op = OpS390XLoweredGetG
   273  		return true
   274  	case OpHmul32:
   275  		return rewriteValueS390X_OpHmul32(v)
   276  	case OpHmul32u:
   277  		return rewriteValueS390X_OpHmul32u(v)
   278  	case OpHmul64:
   279  		v.Op = OpS390XMULHD
   280  		return true
   281  	case OpHmul64u:
   282  		v.Op = OpS390XMULHDU
   283  		return true
   284  	case OpITab:
   285  		return rewriteValueS390X_OpITab(v)
   286  	case OpInterCall:
   287  		v.Op = OpS390XCALLinter
   288  		return true
   289  	case OpIsInBounds:
   290  		return rewriteValueS390X_OpIsInBounds(v)
   291  	case OpIsNonNil:
   292  		return rewriteValueS390X_OpIsNonNil(v)
   293  	case OpIsSliceInBounds:
   294  		return rewriteValueS390X_OpIsSliceInBounds(v)
   295  	case OpLeq16:
   296  		return rewriteValueS390X_OpLeq16(v)
   297  	case OpLeq16U:
   298  		return rewriteValueS390X_OpLeq16U(v)
   299  	case OpLeq32:
   300  		return rewriteValueS390X_OpLeq32(v)
   301  	case OpLeq32F:
   302  		return rewriteValueS390X_OpLeq32F(v)
   303  	case OpLeq32U:
   304  		return rewriteValueS390X_OpLeq32U(v)
   305  	case OpLeq64:
   306  		return rewriteValueS390X_OpLeq64(v)
   307  	case OpLeq64F:
   308  		return rewriteValueS390X_OpLeq64F(v)
   309  	case OpLeq64U:
   310  		return rewriteValueS390X_OpLeq64U(v)
   311  	case OpLeq8:
   312  		return rewriteValueS390X_OpLeq8(v)
   313  	case OpLeq8U:
   314  		return rewriteValueS390X_OpLeq8U(v)
   315  	case OpLess16:
   316  		return rewriteValueS390X_OpLess16(v)
   317  	case OpLess16U:
   318  		return rewriteValueS390X_OpLess16U(v)
   319  	case OpLess32:
   320  		return rewriteValueS390X_OpLess32(v)
   321  	case OpLess32F:
   322  		return rewriteValueS390X_OpLess32F(v)
   323  	case OpLess32U:
   324  		return rewriteValueS390X_OpLess32U(v)
   325  	case OpLess64:
   326  		return rewriteValueS390X_OpLess64(v)
   327  	case OpLess64F:
   328  		return rewriteValueS390X_OpLess64F(v)
   329  	case OpLess64U:
   330  		return rewriteValueS390X_OpLess64U(v)
   331  	case OpLess8:
   332  		return rewriteValueS390X_OpLess8(v)
   333  	case OpLess8U:
   334  		return rewriteValueS390X_OpLess8U(v)
   335  	case OpLoad:
   336  		return rewriteValueS390X_OpLoad(v)
   337  	case OpLocalAddr:
   338  		return rewriteValueS390X_OpLocalAddr(v)
   339  	case OpLsh16x16:
   340  		return rewriteValueS390X_OpLsh16x16(v)
   341  	case OpLsh16x32:
   342  		return rewriteValueS390X_OpLsh16x32(v)
   343  	case OpLsh16x64:
   344  		return rewriteValueS390X_OpLsh16x64(v)
   345  	case OpLsh16x8:
   346  		return rewriteValueS390X_OpLsh16x8(v)
   347  	case OpLsh32x16:
   348  		return rewriteValueS390X_OpLsh32x16(v)
   349  	case OpLsh32x32:
   350  		return rewriteValueS390X_OpLsh32x32(v)
   351  	case OpLsh32x64:
   352  		return rewriteValueS390X_OpLsh32x64(v)
   353  	case OpLsh32x8:
   354  		return rewriteValueS390X_OpLsh32x8(v)
   355  	case OpLsh64x16:
   356  		return rewriteValueS390X_OpLsh64x16(v)
   357  	case OpLsh64x32:
   358  		return rewriteValueS390X_OpLsh64x32(v)
   359  	case OpLsh64x64:
   360  		return rewriteValueS390X_OpLsh64x64(v)
   361  	case OpLsh64x8:
   362  		return rewriteValueS390X_OpLsh64x8(v)
   363  	case OpLsh8x16:
   364  		return rewriteValueS390X_OpLsh8x16(v)
   365  	case OpLsh8x32:
   366  		return rewriteValueS390X_OpLsh8x32(v)
   367  	case OpLsh8x64:
   368  		return rewriteValueS390X_OpLsh8x64(v)
   369  	case OpLsh8x8:
   370  		return rewriteValueS390X_OpLsh8x8(v)
   371  	case OpMod16:
   372  		return rewriteValueS390X_OpMod16(v)
   373  	case OpMod16u:
   374  		return rewriteValueS390X_OpMod16u(v)
   375  	case OpMod32:
   376  		return rewriteValueS390X_OpMod32(v)
   377  	case OpMod32u:
   378  		return rewriteValueS390X_OpMod32u(v)
   379  	case OpMod64:
   380  		return rewriteValueS390X_OpMod64(v)
   381  	case OpMod64u:
   382  		v.Op = OpS390XMODDU
   383  		return true
   384  	case OpMod8:
   385  		return rewriteValueS390X_OpMod8(v)
   386  	case OpMod8u:
   387  		return rewriteValueS390X_OpMod8u(v)
   388  	case OpMove:
   389  		return rewriteValueS390X_OpMove(v)
   390  	case OpMul16:
   391  		v.Op = OpS390XMULLW
   392  		return true
   393  	case OpMul32:
   394  		v.Op = OpS390XMULLW
   395  		return true
   396  	case OpMul32F:
   397  		v.Op = OpS390XFMULS
   398  		return true
   399  	case OpMul64:
   400  		v.Op = OpS390XMULLD
   401  		return true
   402  	case OpMul64F:
   403  		v.Op = OpS390XFMUL
   404  		return true
   405  	case OpMul64uhilo:
   406  		v.Op = OpS390XMLGR
   407  		return true
   408  	case OpMul8:
   409  		v.Op = OpS390XMULLW
   410  		return true
   411  	case OpNeg16:
   412  		v.Op = OpS390XNEGW
   413  		return true
   414  	case OpNeg32:
   415  		v.Op = OpS390XNEGW
   416  		return true
   417  	case OpNeg32F:
   418  		v.Op = OpS390XFNEGS
   419  		return true
   420  	case OpNeg64:
   421  		v.Op = OpS390XNEG
   422  		return true
   423  	case OpNeg64F:
   424  		v.Op = OpS390XFNEG
   425  		return true
   426  	case OpNeg8:
   427  		v.Op = OpS390XNEGW
   428  		return true
   429  	case OpNeq16:
   430  		return rewriteValueS390X_OpNeq16(v)
   431  	case OpNeq32:
   432  		return rewriteValueS390X_OpNeq32(v)
   433  	case OpNeq32F:
   434  		return rewriteValueS390X_OpNeq32F(v)
   435  	case OpNeq64:
   436  		return rewriteValueS390X_OpNeq64(v)
   437  	case OpNeq64F:
   438  		return rewriteValueS390X_OpNeq64F(v)
   439  	case OpNeq8:
   440  		return rewriteValueS390X_OpNeq8(v)
   441  	case OpNeqB:
   442  		return rewriteValueS390X_OpNeqB(v)
   443  	case OpNeqPtr:
   444  		return rewriteValueS390X_OpNeqPtr(v)
   445  	case OpNilCheck:
   446  		v.Op = OpS390XLoweredNilCheck
   447  		return true
   448  	case OpNot:
   449  		return rewriteValueS390X_OpNot(v)
   450  	case OpOffPtr:
   451  		return rewriteValueS390X_OpOffPtr(v)
   452  	case OpOr16:
   453  		v.Op = OpS390XORW
   454  		return true
   455  	case OpOr32:
   456  		v.Op = OpS390XORW
   457  		return true
   458  	case OpOr64:
   459  		v.Op = OpS390XOR
   460  		return true
   461  	case OpOr8:
   462  		v.Op = OpS390XORW
   463  		return true
   464  	case OpOrB:
   465  		v.Op = OpS390XORW
   466  		return true
   467  	case OpPanicBounds:
   468  		return rewriteValueS390X_OpPanicBounds(v)
   469  	case OpPopCount16:
   470  		return rewriteValueS390X_OpPopCount16(v)
   471  	case OpPopCount32:
   472  		return rewriteValueS390X_OpPopCount32(v)
   473  	case OpPopCount64:
   474  		return rewriteValueS390X_OpPopCount64(v)
   475  	case OpPopCount8:
   476  		return rewriteValueS390X_OpPopCount8(v)
   477  	case OpRotateLeft16:
   478  		return rewriteValueS390X_OpRotateLeft16(v)
   479  	case OpRotateLeft32:
   480  		v.Op = OpS390XRLL
   481  		return true
   482  	case OpRotateLeft64:
   483  		v.Op = OpS390XRLLG
   484  		return true
   485  	case OpRotateLeft8:
   486  		return rewriteValueS390X_OpRotateLeft8(v)
   487  	case OpRound:
   488  		return rewriteValueS390X_OpRound(v)
   489  	case OpRound32F:
   490  		v.Op = OpS390XLoweredRound32F
   491  		return true
   492  	case OpRound64F:
   493  		v.Op = OpS390XLoweredRound64F
   494  		return true
   495  	case OpRoundToEven:
   496  		return rewriteValueS390X_OpRoundToEven(v)
   497  	case OpRsh16Ux16:
   498  		return rewriteValueS390X_OpRsh16Ux16(v)
   499  	case OpRsh16Ux32:
   500  		return rewriteValueS390X_OpRsh16Ux32(v)
   501  	case OpRsh16Ux64:
   502  		return rewriteValueS390X_OpRsh16Ux64(v)
   503  	case OpRsh16Ux8:
   504  		return rewriteValueS390X_OpRsh16Ux8(v)
   505  	case OpRsh16x16:
   506  		return rewriteValueS390X_OpRsh16x16(v)
   507  	case OpRsh16x32:
   508  		return rewriteValueS390X_OpRsh16x32(v)
   509  	case OpRsh16x64:
   510  		return rewriteValueS390X_OpRsh16x64(v)
   511  	case OpRsh16x8:
   512  		return rewriteValueS390X_OpRsh16x8(v)
   513  	case OpRsh32Ux16:
   514  		return rewriteValueS390X_OpRsh32Ux16(v)
   515  	case OpRsh32Ux32:
   516  		return rewriteValueS390X_OpRsh32Ux32(v)
   517  	case OpRsh32Ux64:
   518  		return rewriteValueS390X_OpRsh32Ux64(v)
   519  	case OpRsh32Ux8:
   520  		return rewriteValueS390X_OpRsh32Ux8(v)
   521  	case OpRsh32x16:
   522  		return rewriteValueS390X_OpRsh32x16(v)
   523  	case OpRsh32x32:
   524  		return rewriteValueS390X_OpRsh32x32(v)
   525  	case OpRsh32x64:
   526  		return rewriteValueS390X_OpRsh32x64(v)
   527  	case OpRsh32x8:
   528  		return rewriteValueS390X_OpRsh32x8(v)
   529  	case OpRsh64Ux16:
   530  		return rewriteValueS390X_OpRsh64Ux16(v)
   531  	case OpRsh64Ux32:
   532  		return rewriteValueS390X_OpRsh64Ux32(v)
   533  	case OpRsh64Ux64:
   534  		return rewriteValueS390X_OpRsh64Ux64(v)
   535  	case OpRsh64Ux8:
   536  		return rewriteValueS390X_OpRsh64Ux8(v)
   537  	case OpRsh64x16:
   538  		return rewriteValueS390X_OpRsh64x16(v)
   539  	case OpRsh64x32:
   540  		return rewriteValueS390X_OpRsh64x32(v)
   541  	case OpRsh64x64:
   542  		return rewriteValueS390X_OpRsh64x64(v)
   543  	case OpRsh64x8:
   544  		return rewriteValueS390X_OpRsh64x8(v)
   545  	case OpRsh8Ux16:
   546  		return rewriteValueS390X_OpRsh8Ux16(v)
   547  	case OpRsh8Ux32:
   548  		return rewriteValueS390X_OpRsh8Ux32(v)
   549  	case OpRsh8Ux64:
   550  		return rewriteValueS390X_OpRsh8Ux64(v)
   551  	case OpRsh8Ux8:
   552  		return rewriteValueS390X_OpRsh8Ux8(v)
   553  	case OpRsh8x16:
   554  		return rewriteValueS390X_OpRsh8x16(v)
   555  	case OpRsh8x32:
   556  		return rewriteValueS390X_OpRsh8x32(v)
   557  	case OpRsh8x64:
   558  		return rewriteValueS390X_OpRsh8x64(v)
   559  	case OpRsh8x8:
   560  		return rewriteValueS390X_OpRsh8x8(v)
   561  	case OpS390XADD:
   562  		return rewriteValueS390X_OpS390XADD(v)
   563  	case OpS390XADDC:
   564  		return rewriteValueS390X_OpS390XADDC(v)
   565  	case OpS390XADDE:
   566  		return rewriteValueS390X_OpS390XADDE(v)
   567  	case OpS390XADDW:
   568  		return rewriteValueS390X_OpS390XADDW(v)
   569  	case OpS390XADDWconst:
   570  		return rewriteValueS390X_OpS390XADDWconst(v)
   571  	case OpS390XADDWload:
   572  		return rewriteValueS390X_OpS390XADDWload(v)
   573  	case OpS390XADDconst:
   574  		return rewriteValueS390X_OpS390XADDconst(v)
   575  	case OpS390XADDload:
   576  		return rewriteValueS390X_OpS390XADDload(v)
   577  	case OpS390XAND:
   578  		return rewriteValueS390X_OpS390XAND(v)
   579  	case OpS390XANDW:
   580  		return rewriteValueS390X_OpS390XANDW(v)
   581  	case OpS390XANDWconst:
   582  		return rewriteValueS390X_OpS390XANDWconst(v)
   583  	case OpS390XANDWload:
   584  		return rewriteValueS390X_OpS390XANDWload(v)
   585  	case OpS390XANDconst:
   586  		return rewriteValueS390X_OpS390XANDconst(v)
   587  	case OpS390XANDload:
   588  		return rewriteValueS390X_OpS390XANDload(v)
   589  	case OpS390XCMP:
   590  		return rewriteValueS390X_OpS390XCMP(v)
   591  	case OpS390XCMPU:
   592  		return rewriteValueS390X_OpS390XCMPU(v)
   593  	case OpS390XCMPUconst:
   594  		return rewriteValueS390X_OpS390XCMPUconst(v)
   595  	case OpS390XCMPW:
   596  		return rewriteValueS390X_OpS390XCMPW(v)
   597  	case OpS390XCMPWU:
   598  		return rewriteValueS390X_OpS390XCMPWU(v)
   599  	case OpS390XCMPWUconst:
   600  		return rewriteValueS390X_OpS390XCMPWUconst(v)
   601  	case OpS390XCMPWconst:
   602  		return rewriteValueS390X_OpS390XCMPWconst(v)
   603  	case OpS390XCMPconst:
   604  		return rewriteValueS390X_OpS390XCMPconst(v)
   605  	case OpS390XCPSDR:
   606  		return rewriteValueS390X_OpS390XCPSDR(v)
   607  	case OpS390XFCMP:
   608  		return rewriteValueS390X_OpS390XFCMP(v)
   609  	case OpS390XFCMPS:
   610  		return rewriteValueS390X_OpS390XFCMPS(v)
   611  	case OpS390XFMOVDload:
   612  		return rewriteValueS390X_OpS390XFMOVDload(v)
   613  	case OpS390XFMOVDstore:
   614  		return rewriteValueS390X_OpS390XFMOVDstore(v)
   615  	case OpS390XFMOVSload:
   616  		return rewriteValueS390X_OpS390XFMOVSload(v)
   617  	case OpS390XFMOVSstore:
   618  		return rewriteValueS390X_OpS390XFMOVSstore(v)
   619  	case OpS390XFNEG:
   620  		return rewriteValueS390X_OpS390XFNEG(v)
   621  	case OpS390XFNEGS:
   622  		return rewriteValueS390X_OpS390XFNEGS(v)
   623  	case OpS390XLDGR:
   624  		return rewriteValueS390X_OpS390XLDGR(v)
   625  	case OpS390XLEDBR:
   626  		return rewriteValueS390X_OpS390XLEDBR(v)
   627  	case OpS390XLGDR:
   628  		return rewriteValueS390X_OpS390XLGDR(v)
   629  	case OpS390XLOCGR:
   630  		return rewriteValueS390X_OpS390XLOCGR(v)
   631  	case OpS390XLTDBR:
   632  		return rewriteValueS390X_OpS390XLTDBR(v)
   633  	case OpS390XLTEBR:
   634  		return rewriteValueS390X_OpS390XLTEBR(v)
   635  	case OpS390XLoweredRound32F:
   636  		return rewriteValueS390X_OpS390XLoweredRound32F(v)
   637  	case OpS390XLoweredRound64F:
   638  		return rewriteValueS390X_OpS390XLoweredRound64F(v)
   639  	case OpS390XMOVBZload:
   640  		return rewriteValueS390X_OpS390XMOVBZload(v)
   641  	case OpS390XMOVBZreg:
   642  		return rewriteValueS390X_OpS390XMOVBZreg(v)
   643  	case OpS390XMOVBload:
   644  		return rewriteValueS390X_OpS390XMOVBload(v)
   645  	case OpS390XMOVBreg:
   646  		return rewriteValueS390X_OpS390XMOVBreg(v)
   647  	case OpS390XMOVBstore:
   648  		return rewriteValueS390X_OpS390XMOVBstore(v)
   649  	case OpS390XMOVBstoreconst:
   650  		return rewriteValueS390X_OpS390XMOVBstoreconst(v)
   651  	case OpS390XMOVDBR:
   652  		return rewriteValueS390X_OpS390XMOVDBR(v)
   653  	case OpS390XMOVDaddridx:
   654  		return rewriteValueS390X_OpS390XMOVDaddridx(v)
   655  	case OpS390XMOVDload:
   656  		return rewriteValueS390X_OpS390XMOVDload(v)
   657  	case OpS390XMOVDstore:
   658  		return rewriteValueS390X_OpS390XMOVDstore(v)
   659  	case OpS390XMOVDstoreconst:
   660  		return rewriteValueS390X_OpS390XMOVDstoreconst(v)
   661  	case OpS390XMOVDstoreidx:
   662  		return rewriteValueS390X_OpS390XMOVDstoreidx(v)
   663  	case OpS390XMOVHZload:
   664  		return rewriteValueS390X_OpS390XMOVHZload(v)
   665  	case OpS390XMOVHZreg:
   666  		return rewriteValueS390X_OpS390XMOVHZreg(v)
   667  	case OpS390XMOVHload:
   668  		return rewriteValueS390X_OpS390XMOVHload(v)
   669  	case OpS390XMOVHreg:
   670  		return rewriteValueS390X_OpS390XMOVHreg(v)
   671  	case OpS390XMOVHstore:
   672  		return rewriteValueS390X_OpS390XMOVHstore(v)
   673  	case OpS390XMOVHstoreconst:
   674  		return rewriteValueS390X_OpS390XMOVHstoreconst(v)
   675  	case OpS390XMOVHstoreidx:
   676  		return rewriteValueS390X_OpS390XMOVHstoreidx(v)
   677  	case OpS390XMOVWBR:
   678  		return rewriteValueS390X_OpS390XMOVWBR(v)
   679  	case OpS390XMOVWZload:
   680  		return rewriteValueS390X_OpS390XMOVWZload(v)
   681  	case OpS390XMOVWZreg:
   682  		return rewriteValueS390X_OpS390XMOVWZreg(v)
   683  	case OpS390XMOVWload:
   684  		return rewriteValueS390X_OpS390XMOVWload(v)
   685  	case OpS390XMOVWreg:
   686  		return rewriteValueS390X_OpS390XMOVWreg(v)
   687  	case OpS390XMOVWstore:
   688  		return rewriteValueS390X_OpS390XMOVWstore(v)
   689  	case OpS390XMOVWstoreconst:
   690  		return rewriteValueS390X_OpS390XMOVWstoreconst(v)
   691  	case OpS390XMOVWstoreidx:
   692  		return rewriteValueS390X_OpS390XMOVWstoreidx(v)
   693  	case OpS390XMULLD:
   694  		return rewriteValueS390X_OpS390XMULLD(v)
   695  	case OpS390XMULLDconst:
   696  		return rewriteValueS390X_OpS390XMULLDconst(v)
   697  	case OpS390XMULLDload:
   698  		return rewriteValueS390X_OpS390XMULLDload(v)
   699  	case OpS390XMULLW:
   700  		return rewriteValueS390X_OpS390XMULLW(v)
   701  	case OpS390XMULLWconst:
   702  		return rewriteValueS390X_OpS390XMULLWconst(v)
   703  	case OpS390XMULLWload:
   704  		return rewriteValueS390X_OpS390XMULLWload(v)
   705  	case OpS390XNEG:
   706  		return rewriteValueS390X_OpS390XNEG(v)
   707  	case OpS390XNEGW:
   708  		return rewriteValueS390X_OpS390XNEGW(v)
   709  	case OpS390XNOT:
   710  		return rewriteValueS390X_OpS390XNOT(v)
   711  	case OpS390XNOTW:
   712  		return rewriteValueS390X_OpS390XNOTW(v)
   713  	case OpS390XOR:
   714  		return rewriteValueS390X_OpS390XOR(v)
   715  	case OpS390XORW:
   716  		return rewriteValueS390X_OpS390XORW(v)
   717  	case OpS390XORWconst:
   718  		return rewriteValueS390X_OpS390XORWconst(v)
   719  	case OpS390XORWload:
   720  		return rewriteValueS390X_OpS390XORWload(v)
   721  	case OpS390XORconst:
   722  		return rewriteValueS390X_OpS390XORconst(v)
   723  	case OpS390XORload:
   724  		return rewriteValueS390X_OpS390XORload(v)
   725  	case OpS390XRISBGZ:
   726  		return rewriteValueS390X_OpS390XRISBGZ(v)
   727  	case OpS390XRLL:
   728  		return rewriteValueS390X_OpS390XRLL(v)
   729  	case OpS390XRLLG:
   730  		return rewriteValueS390X_OpS390XRLLG(v)
   731  	case OpS390XSLD:
   732  		return rewriteValueS390X_OpS390XSLD(v)
   733  	case OpS390XSLDconst:
   734  		return rewriteValueS390X_OpS390XSLDconst(v)
   735  	case OpS390XSLW:
   736  		return rewriteValueS390X_OpS390XSLW(v)
   737  	case OpS390XSLWconst:
   738  		return rewriteValueS390X_OpS390XSLWconst(v)
   739  	case OpS390XSRAD:
   740  		return rewriteValueS390X_OpS390XSRAD(v)
   741  	case OpS390XSRADconst:
   742  		return rewriteValueS390X_OpS390XSRADconst(v)
   743  	case OpS390XSRAW:
   744  		return rewriteValueS390X_OpS390XSRAW(v)
   745  	case OpS390XSRAWconst:
   746  		return rewriteValueS390X_OpS390XSRAWconst(v)
   747  	case OpS390XSRD:
   748  		return rewriteValueS390X_OpS390XSRD(v)
   749  	case OpS390XSRDconst:
   750  		return rewriteValueS390X_OpS390XSRDconst(v)
   751  	case OpS390XSRW:
   752  		return rewriteValueS390X_OpS390XSRW(v)
   753  	case OpS390XSRWconst:
   754  		return rewriteValueS390X_OpS390XSRWconst(v)
   755  	case OpS390XSTM2:
   756  		return rewriteValueS390X_OpS390XSTM2(v)
   757  	case OpS390XSTMG2:
   758  		return rewriteValueS390X_OpS390XSTMG2(v)
   759  	case OpS390XSUB:
   760  		return rewriteValueS390X_OpS390XSUB(v)
   761  	case OpS390XSUBE:
   762  		return rewriteValueS390X_OpS390XSUBE(v)
   763  	case OpS390XSUBW:
   764  		return rewriteValueS390X_OpS390XSUBW(v)
   765  	case OpS390XSUBWconst:
   766  		return rewriteValueS390X_OpS390XSUBWconst(v)
   767  	case OpS390XSUBWload:
   768  		return rewriteValueS390X_OpS390XSUBWload(v)
   769  	case OpS390XSUBconst:
   770  		return rewriteValueS390X_OpS390XSUBconst(v)
   771  	case OpS390XSUBload:
   772  		return rewriteValueS390X_OpS390XSUBload(v)
   773  	case OpS390XSumBytes2:
   774  		return rewriteValueS390X_OpS390XSumBytes2(v)
   775  	case OpS390XSumBytes4:
   776  		return rewriteValueS390X_OpS390XSumBytes4(v)
   777  	case OpS390XSumBytes8:
   778  		return rewriteValueS390X_OpS390XSumBytes8(v)
   779  	case OpS390XXOR:
   780  		return rewriteValueS390X_OpS390XXOR(v)
   781  	case OpS390XXORW:
   782  		return rewriteValueS390X_OpS390XXORW(v)
   783  	case OpS390XXORWconst:
   784  		return rewriteValueS390X_OpS390XXORWconst(v)
   785  	case OpS390XXORWload:
   786  		return rewriteValueS390X_OpS390XXORWload(v)
   787  	case OpS390XXORconst:
   788  		return rewriteValueS390X_OpS390XXORconst(v)
   789  	case OpS390XXORload:
   790  		return rewriteValueS390X_OpS390XXORload(v)
   791  	case OpSelect0:
   792  		return rewriteValueS390X_OpSelect0(v)
   793  	case OpSelect1:
   794  		return rewriteValueS390X_OpSelect1(v)
   795  	case OpSignExt16to32:
   796  		v.Op = OpS390XMOVHreg
   797  		return true
   798  	case OpSignExt16to64:
   799  		v.Op = OpS390XMOVHreg
   800  		return true
   801  	case OpSignExt32to64:
   802  		v.Op = OpS390XMOVWreg
   803  		return true
   804  	case OpSignExt8to16:
   805  		v.Op = OpS390XMOVBreg
   806  		return true
   807  	case OpSignExt8to32:
   808  		v.Op = OpS390XMOVBreg
   809  		return true
   810  	case OpSignExt8to64:
   811  		v.Op = OpS390XMOVBreg
   812  		return true
   813  	case OpSlicemask:
   814  		return rewriteValueS390X_OpSlicemask(v)
   815  	case OpSqrt:
   816  		v.Op = OpS390XFSQRT
   817  		return true
   818  	case OpSqrt32:
   819  		v.Op = OpS390XFSQRTS
   820  		return true
   821  	case OpStaticCall:
   822  		v.Op = OpS390XCALLstatic
   823  		return true
   824  	case OpStore:
   825  		return rewriteValueS390X_OpStore(v)
   826  	case OpSub16:
   827  		v.Op = OpS390XSUBW
   828  		return true
   829  	case OpSub32:
   830  		v.Op = OpS390XSUBW
   831  		return true
   832  	case OpSub32F:
   833  		return rewriteValueS390X_OpSub32F(v)
   834  	case OpSub64:
   835  		v.Op = OpS390XSUB
   836  		return true
   837  	case OpSub64F:
   838  		return rewriteValueS390X_OpSub64F(v)
   839  	case OpSub8:
   840  		v.Op = OpS390XSUBW
   841  		return true
   842  	case OpSubPtr:
   843  		v.Op = OpS390XSUB
   844  		return true
   845  	case OpTailCall:
   846  		v.Op = OpS390XCALLtail
   847  		return true
   848  	case OpTrunc:
   849  		return rewriteValueS390X_OpTrunc(v)
   850  	case OpTrunc16to8:
   851  		v.Op = OpCopy
   852  		return true
   853  	case OpTrunc32to16:
   854  		v.Op = OpCopy
   855  		return true
   856  	case OpTrunc32to8:
   857  		v.Op = OpCopy
   858  		return true
   859  	case OpTrunc64to16:
   860  		v.Op = OpCopy
   861  		return true
   862  	case OpTrunc64to32:
   863  		v.Op = OpCopy
   864  		return true
   865  	case OpTrunc64to8:
   866  		v.Op = OpCopy
   867  		return true
   868  	case OpWB:
   869  		v.Op = OpS390XLoweredWB
   870  		return true
   871  	case OpXor16:
   872  		v.Op = OpS390XXORW
   873  		return true
   874  	case OpXor32:
   875  		v.Op = OpS390XXORW
   876  		return true
   877  	case OpXor64:
   878  		v.Op = OpS390XXOR
   879  		return true
   880  	case OpXor8:
   881  		v.Op = OpS390XXORW
   882  		return true
   883  	case OpZero:
   884  		return rewriteValueS390X_OpZero(v)
   885  	case OpZeroExt16to32:
   886  		v.Op = OpS390XMOVHZreg
   887  		return true
   888  	case OpZeroExt16to64:
   889  		v.Op = OpS390XMOVHZreg
   890  		return true
   891  	case OpZeroExt32to64:
   892  		v.Op = OpS390XMOVWZreg
   893  		return true
   894  	case OpZeroExt8to16:
   895  		v.Op = OpS390XMOVBZreg
   896  		return true
   897  	case OpZeroExt8to32:
   898  		v.Op = OpS390XMOVBZreg
   899  		return true
   900  	case OpZeroExt8to64:
   901  		v.Op = OpS390XMOVBZreg
   902  		return true
   903  	}
   904  	return false
   905  }
   906  func rewriteValueS390X_OpAdd32F(v *Value) bool {
   907  	v_1 := v.Args[1]
   908  	v_0 := v.Args[0]
   909  	b := v.Block
   910  	typ := &b.Func.Config.Types
   911  	// match: (Add32F x y)
   912  	// result: (Select0 (FADDS x y))
   913  	for {
   914  		x := v_0
   915  		y := v_1
   916  		v.reset(OpSelect0)
   917  		v0 := b.NewValue0(v.Pos, OpS390XFADDS, types.NewTuple(typ.Float32, types.TypeFlags))
   918  		v0.AddArg2(x, y)
   919  		v.AddArg(v0)
   920  		return true
   921  	}
   922  }
   923  func rewriteValueS390X_OpAdd64F(v *Value) bool {
   924  	v_1 := v.Args[1]
   925  	v_0 := v.Args[0]
   926  	b := v.Block
   927  	typ := &b.Func.Config.Types
   928  	// match: (Add64F x y)
   929  	// result: (Select0 (FADD x y))
   930  	for {
   931  		x := v_0
   932  		y := v_1
   933  		v.reset(OpSelect0)
   934  		v0 := b.NewValue0(v.Pos, OpS390XFADD, types.NewTuple(typ.Float64, types.TypeFlags))
   935  		v0.AddArg2(x, y)
   936  		v.AddArg(v0)
   937  		return true
   938  	}
   939  }
   940  func rewriteValueS390X_OpAddr(v *Value) bool {
   941  	v_0 := v.Args[0]
   942  	// match: (Addr {sym} base)
   943  	// result: (MOVDaddr {sym} base)
   944  	for {
   945  		sym := auxToSym(v.Aux)
   946  		base := v_0
   947  		v.reset(OpS390XMOVDaddr)
   948  		v.Aux = symToAux(sym)
   949  		v.AddArg(base)
   950  		return true
   951  	}
   952  }
   953  func rewriteValueS390X_OpAtomicAdd32(v *Value) bool {
   954  	v_2 := v.Args[2]
   955  	v_1 := v.Args[1]
   956  	v_0 := v.Args[0]
   957  	b := v.Block
   958  	typ := &b.Func.Config.Types
   959  	// match: (AtomicAdd32 ptr val mem)
   960  	// result: (AddTupleFirst32 val (LAA ptr val mem))
   961  	for {
   962  		ptr := v_0
   963  		val := v_1
   964  		mem := v_2
   965  		v.reset(OpS390XAddTupleFirst32)
   966  		v0 := b.NewValue0(v.Pos, OpS390XLAA, types.NewTuple(typ.UInt32, types.TypeMem))
   967  		v0.AddArg3(ptr, val, mem)
   968  		v.AddArg2(val, v0)
   969  		return true
   970  	}
   971  }
   972  func rewriteValueS390X_OpAtomicAdd64(v *Value) bool {
   973  	v_2 := v.Args[2]
   974  	v_1 := v.Args[1]
   975  	v_0 := v.Args[0]
   976  	b := v.Block
   977  	typ := &b.Func.Config.Types
   978  	// match: (AtomicAdd64 ptr val mem)
   979  	// result: (AddTupleFirst64 val (LAAG ptr val mem))
   980  	for {
   981  		ptr := v_0
   982  		val := v_1
   983  		mem := v_2
   984  		v.reset(OpS390XAddTupleFirst64)
   985  		v0 := b.NewValue0(v.Pos, OpS390XLAAG, types.NewTuple(typ.UInt64, types.TypeMem))
   986  		v0.AddArg3(ptr, val, mem)
   987  		v.AddArg2(val, v0)
   988  		return true
   989  	}
   990  }
   991  func rewriteValueS390X_OpAtomicAnd8(v *Value) bool {
   992  	v_2 := v.Args[2]
   993  	v_1 := v.Args[1]
   994  	v_0 := v.Args[0]
   995  	b := v.Block
   996  	typ := &b.Func.Config.Types
   997  	// match: (AtomicAnd8 ptr val mem)
   998  	// result: (LANfloor ptr (RLL <typ.UInt32> (ORWconst <typ.UInt32> val [-1<<8]) (RXSBG <typ.UInt32> {s390x.NewRotateParams(59, 60, 3)} (MOVDconst [3<<3]) ptr)) mem)
   999  	for {
  1000  		ptr := v_0
  1001  		val := v_1
  1002  		mem := v_2
  1003  		v.reset(OpS390XLANfloor)
  1004  		v0 := b.NewValue0(v.Pos, OpS390XRLL, typ.UInt32)
  1005  		v1 := b.NewValue0(v.Pos, OpS390XORWconst, typ.UInt32)
  1006  		v1.AuxInt = int32ToAuxInt(-1 << 8)
  1007  		v1.AddArg(val)
  1008  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
  1009  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1010  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1011  		v3.AuxInt = int64ToAuxInt(3 << 3)
  1012  		v2.AddArg2(v3, ptr)
  1013  		v0.AddArg2(v1, v2)
  1014  		v.AddArg3(ptr, v0, mem)
  1015  		return true
  1016  	}
  1017  }
  1018  func rewriteValueS390X_OpAtomicCompareAndSwap32(v *Value) bool {
  1019  	v_3 := v.Args[3]
  1020  	v_2 := v.Args[2]
  1021  	v_1 := v.Args[1]
  1022  	v_0 := v.Args[0]
  1023  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
  1024  	// result: (LoweredAtomicCas32 ptr old new_ mem)
  1025  	for {
  1026  		ptr := v_0
  1027  		old := v_1
  1028  		new_ := v_2
  1029  		mem := v_3
  1030  		v.reset(OpS390XLoweredAtomicCas32)
  1031  		v.AddArg4(ptr, old, new_, mem)
  1032  		return true
  1033  	}
  1034  }
  1035  func rewriteValueS390X_OpAtomicCompareAndSwap64(v *Value) bool {
  1036  	v_3 := v.Args[3]
  1037  	v_2 := v.Args[2]
  1038  	v_1 := v.Args[1]
  1039  	v_0 := v.Args[0]
  1040  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
  1041  	// result: (LoweredAtomicCas64 ptr old new_ mem)
  1042  	for {
  1043  		ptr := v_0
  1044  		old := v_1
  1045  		new_ := v_2
  1046  		mem := v_3
  1047  		v.reset(OpS390XLoweredAtomicCas64)
  1048  		v.AddArg4(ptr, old, new_, mem)
  1049  		return true
  1050  	}
  1051  }
  1052  func rewriteValueS390X_OpAtomicExchange32(v *Value) bool {
  1053  	v_2 := v.Args[2]
  1054  	v_1 := v.Args[1]
  1055  	v_0 := v.Args[0]
  1056  	// match: (AtomicExchange32 ptr val mem)
  1057  	// result: (LoweredAtomicExchange32 ptr val mem)
  1058  	for {
  1059  		ptr := v_0
  1060  		val := v_1
  1061  		mem := v_2
  1062  		v.reset(OpS390XLoweredAtomicExchange32)
  1063  		v.AddArg3(ptr, val, mem)
  1064  		return true
  1065  	}
  1066  }
  1067  func rewriteValueS390X_OpAtomicExchange64(v *Value) bool {
  1068  	v_2 := v.Args[2]
  1069  	v_1 := v.Args[1]
  1070  	v_0 := v.Args[0]
  1071  	// match: (AtomicExchange64 ptr val mem)
  1072  	// result: (LoweredAtomicExchange64 ptr val mem)
  1073  	for {
  1074  		ptr := v_0
  1075  		val := v_1
  1076  		mem := v_2
  1077  		v.reset(OpS390XLoweredAtomicExchange64)
  1078  		v.AddArg3(ptr, val, mem)
  1079  		return true
  1080  	}
  1081  }
  1082  func rewriteValueS390X_OpAtomicLoad32(v *Value) bool {
  1083  	v_1 := v.Args[1]
  1084  	v_0 := v.Args[0]
  1085  	// match: (AtomicLoad32 ptr mem)
  1086  	// result: (MOVWZatomicload ptr mem)
  1087  	for {
  1088  		ptr := v_0
  1089  		mem := v_1
  1090  		v.reset(OpS390XMOVWZatomicload)
  1091  		v.AddArg2(ptr, mem)
  1092  		return true
  1093  	}
  1094  }
  1095  func rewriteValueS390X_OpAtomicLoad64(v *Value) bool {
  1096  	v_1 := v.Args[1]
  1097  	v_0 := v.Args[0]
  1098  	// match: (AtomicLoad64 ptr mem)
  1099  	// result: (MOVDatomicload ptr mem)
  1100  	for {
  1101  		ptr := v_0
  1102  		mem := v_1
  1103  		v.reset(OpS390XMOVDatomicload)
  1104  		v.AddArg2(ptr, mem)
  1105  		return true
  1106  	}
  1107  }
  1108  func rewriteValueS390X_OpAtomicLoad8(v *Value) bool {
  1109  	v_1 := v.Args[1]
  1110  	v_0 := v.Args[0]
  1111  	// match: (AtomicLoad8 ptr mem)
  1112  	// result: (MOVBZatomicload ptr mem)
  1113  	for {
  1114  		ptr := v_0
  1115  		mem := v_1
  1116  		v.reset(OpS390XMOVBZatomicload)
  1117  		v.AddArg2(ptr, mem)
  1118  		return true
  1119  	}
  1120  }
  1121  func rewriteValueS390X_OpAtomicLoadAcq32(v *Value) bool {
  1122  	v_1 := v.Args[1]
  1123  	v_0 := v.Args[0]
  1124  	// match: (AtomicLoadAcq32 ptr mem)
  1125  	// result: (MOVWZatomicload ptr mem)
  1126  	for {
  1127  		ptr := v_0
  1128  		mem := v_1
  1129  		v.reset(OpS390XMOVWZatomicload)
  1130  		v.AddArg2(ptr, mem)
  1131  		return true
  1132  	}
  1133  }
  1134  func rewriteValueS390X_OpAtomicLoadPtr(v *Value) bool {
  1135  	v_1 := v.Args[1]
  1136  	v_0 := v.Args[0]
  1137  	// match: (AtomicLoadPtr ptr mem)
  1138  	// result: (MOVDatomicload ptr mem)
  1139  	for {
  1140  		ptr := v_0
  1141  		mem := v_1
  1142  		v.reset(OpS390XMOVDatomicload)
  1143  		v.AddArg2(ptr, mem)
  1144  		return true
  1145  	}
  1146  }
  1147  func rewriteValueS390X_OpAtomicOr8(v *Value) bool {
  1148  	v_2 := v.Args[2]
  1149  	v_1 := v.Args[1]
  1150  	v_0 := v.Args[0]
  1151  	b := v.Block
  1152  	typ := &b.Func.Config.Types
  1153  	// match: (AtomicOr8 ptr val mem)
  1154  	// result: (LAOfloor ptr (SLW <typ.UInt32> (MOVBZreg <typ.UInt32> val) (RXSBG <typ.UInt32> {s390x.NewRotateParams(59, 60, 3)} (MOVDconst [3<<3]) ptr)) mem)
  1155  	for {
  1156  		ptr := v_0
  1157  		val := v_1
  1158  		mem := v_2
  1159  		v.reset(OpS390XLAOfloor)
  1160  		v0 := b.NewValue0(v.Pos, OpS390XSLW, typ.UInt32)
  1161  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt32)
  1162  		v1.AddArg(val)
  1163  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
  1164  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1165  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1166  		v3.AuxInt = int64ToAuxInt(3 << 3)
  1167  		v2.AddArg2(v3, ptr)
  1168  		v0.AddArg2(v1, v2)
  1169  		v.AddArg3(ptr, v0, mem)
  1170  		return true
  1171  	}
  1172  }
  1173  func rewriteValueS390X_OpAtomicStore32(v *Value) bool {
  1174  	v_2 := v.Args[2]
  1175  	v_1 := v.Args[1]
  1176  	v_0 := v.Args[0]
  1177  	b := v.Block
  1178  	// match: (AtomicStore32 ptr val mem)
  1179  	// result: (SYNC (MOVWatomicstore ptr val mem))
  1180  	for {
  1181  		ptr := v_0
  1182  		val := v_1
  1183  		mem := v_2
  1184  		v.reset(OpS390XSYNC)
  1185  		v0 := b.NewValue0(v.Pos, OpS390XMOVWatomicstore, types.TypeMem)
  1186  		v0.AddArg3(ptr, val, mem)
  1187  		v.AddArg(v0)
  1188  		return true
  1189  	}
  1190  }
  1191  func rewriteValueS390X_OpAtomicStore64(v *Value) bool {
  1192  	v_2 := v.Args[2]
  1193  	v_1 := v.Args[1]
  1194  	v_0 := v.Args[0]
  1195  	b := v.Block
  1196  	// match: (AtomicStore64 ptr val mem)
  1197  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1198  	for {
  1199  		ptr := v_0
  1200  		val := v_1
  1201  		mem := v_2
  1202  		v.reset(OpS390XSYNC)
  1203  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1204  		v0.AddArg3(ptr, val, mem)
  1205  		v.AddArg(v0)
  1206  		return true
  1207  	}
  1208  }
  1209  func rewriteValueS390X_OpAtomicStore8(v *Value) bool {
  1210  	v_2 := v.Args[2]
  1211  	v_1 := v.Args[1]
  1212  	v_0 := v.Args[0]
  1213  	b := v.Block
  1214  	// match: (AtomicStore8 ptr val mem)
  1215  	// result: (SYNC (MOVBatomicstore ptr val mem))
  1216  	for {
  1217  		ptr := v_0
  1218  		val := v_1
  1219  		mem := v_2
  1220  		v.reset(OpS390XSYNC)
  1221  		v0 := b.NewValue0(v.Pos, OpS390XMOVBatomicstore, types.TypeMem)
  1222  		v0.AddArg3(ptr, val, mem)
  1223  		v.AddArg(v0)
  1224  		return true
  1225  	}
  1226  }
  1227  func rewriteValueS390X_OpAtomicStorePtrNoWB(v *Value) bool {
  1228  	v_2 := v.Args[2]
  1229  	v_1 := v.Args[1]
  1230  	v_0 := v.Args[0]
  1231  	b := v.Block
  1232  	// match: (AtomicStorePtrNoWB ptr val mem)
  1233  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1234  	for {
  1235  		ptr := v_0
  1236  		val := v_1
  1237  		mem := v_2
  1238  		v.reset(OpS390XSYNC)
  1239  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1240  		v0.AddArg3(ptr, val, mem)
  1241  		v.AddArg(v0)
  1242  		return true
  1243  	}
  1244  }
  1245  func rewriteValueS390X_OpAtomicStoreRel32(v *Value) bool {
  1246  	v_2 := v.Args[2]
  1247  	v_1 := v.Args[1]
  1248  	v_0 := v.Args[0]
  1249  	// match: (AtomicStoreRel32 ptr val mem)
  1250  	// result: (MOVWatomicstore ptr val mem)
  1251  	for {
  1252  		ptr := v_0
  1253  		val := v_1
  1254  		mem := v_2
  1255  		v.reset(OpS390XMOVWatomicstore)
  1256  		v.AddArg3(ptr, val, mem)
  1257  		return true
  1258  	}
  1259  }
  1260  func rewriteValueS390X_OpAvg64u(v *Value) bool {
  1261  	v_1 := v.Args[1]
  1262  	v_0 := v.Args[0]
  1263  	b := v.Block
  1264  	// match: (Avg64u <t> x y)
  1265  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1266  	for {
  1267  		t := v.Type
  1268  		x := v_0
  1269  		y := v_1
  1270  		v.reset(OpS390XADD)
  1271  		v0 := b.NewValue0(v.Pos, OpS390XSRDconst, t)
  1272  		v0.AuxInt = uint8ToAuxInt(1)
  1273  		v1 := b.NewValue0(v.Pos, OpS390XSUB, t)
  1274  		v1.AddArg2(x, y)
  1275  		v0.AddArg(v1)
  1276  		v.AddArg2(v0, y)
  1277  		return true
  1278  	}
  1279  }
  1280  func rewriteValueS390X_OpBitLen16(v *Value) bool {
  1281  	v_0 := v.Args[0]
  1282  	b := v.Block
  1283  	typ := &b.Func.Config.Types
  1284  	// match: (BitLen16 x)
  1285  	// result: (BitLen64 (ZeroExt16to64 x))
  1286  	for {
  1287  		x := v_0
  1288  		v.reset(OpBitLen64)
  1289  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1290  		v0.AddArg(x)
  1291  		v.AddArg(v0)
  1292  		return true
  1293  	}
  1294  }
  1295  func rewriteValueS390X_OpBitLen32(v *Value) bool {
  1296  	v_0 := v.Args[0]
  1297  	b := v.Block
  1298  	typ := &b.Func.Config.Types
  1299  	// match: (BitLen32 x)
  1300  	// result: (BitLen64 (ZeroExt32to64 x))
  1301  	for {
  1302  		x := v_0
  1303  		v.reset(OpBitLen64)
  1304  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1305  		v0.AddArg(x)
  1306  		v.AddArg(v0)
  1307  		return true
  1308  	}
  1309  }
  1310  func rewriteValueS390X_OpBitLen64(v *Value) bool {
  1311  	v_0 := v.Args[0]
  1312  	b := v.Block
  1313  	typ := &b.Func.Config.Types
  1314  	// match: (BitLen64 x)
  1315  	// result: (SUB (MOVDconst [64]) (FLOGR x))
  1316  	for {
  1317  		x := v_0
  1318  		v.reset(OpS390XSUB)
  1319  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1320  		v0.AuxInt = int64ToAuxInt(64)
  1321  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1322  		v1.AddArg(x)
  1323  		v.AddArg2(v0, v1)
  1324  		return true
  1325  	}
  1326  }
  1327  func rewriteValueS390X_OpBitLen8(v *Value) bool {
  1328  	v_0 := v.Args[0]
  1329  	b := v.Block
  1330  	typ := &b.Func.Config.Types
  1331  	// match: (BitLen8 x)
  1332  	// result: (BitLen64 (ZeroExt8to64 x))
  1333  	for {
  1334  		x := v_0
  1335  		v.reset(OpBitLen64)
  1336  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1337  		v0.AddArg(x)
  1338  		v.AddArg(v0)
  1339  		return true
  1340  	}
  1341  }
  1342  func rewriteValueS390X_OpBswap16(v *Value) bool {
  1343  	v_0 := v.Args[0]
  1344  	b := v.Block
  1345  	typ := &b.Func.Config.Types
  1346  	// match: (Bswap16 x:(MOVHZload [off] {sym} ptr mem))
  1347  	// result: @x.Block (MOVHZreg (MOVHBRload [off] {sym} ptr mem))
  1348  	for {
  1349  		x := v_0
  1350  		if x.Op != OpS390XMOVHZload {
  1351  			break
  1352  		}
  1353  		off := auxIntToInt32(x.AuxInt)
  1354  		sym := auxToSym(x.Aux)
  1355  		mem := x.Args[1]
  1356  		ptr := x.Args[0]
  1357  		b = x.Block
  1358  		v0 := b.NewValue0(x.Pos, OpS390XMOVHZreg, typ.UInt64)
  1359  		v.copyOf(v0)
  1360  		v1 := b.NewValue0(x.Pos, OpS390XMOVHBRload, typ.UInt16)
  1361  		v1.AuxInt = int32ToAuxInt(off)
  1362  		v1.Aux = symToAux(sym)
  1363  		v1.AddArg2(ptr, mem)
  1364  		v0.AddArg(v1)
  1365  		return true
  1366  	}
  1367  	// match: (Bswap16 x:(MOVHZloadidx [off] {sym} ptr idx mem))
  1368  	// result: @x.Block (MOVHZreg (MOVHBRloadidx [off] {sym} ptr idx mem))
  1369  	for {
  1370  		x := v_0
  1371  		if x.Op != OpS390XMOVHZloadidx {
  1372  			break
  1373  		}
  1374  		off := auxIntToInt32(x.AuxInt)
  1375  		sym := auxToSym(x.Aux)
  1376  		mem := x.Args[2]
  1377  		ptr := x.Args[0]
  1378  		idx := x.Args[1]
  1379  		b = x.Block
  1380  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1381  		v.copyOf(v0)
  1382  		v1 := b.NewValue0(v.Pos, OpS390XMOVHBRloadidx, typ.Int16)
  1383  		v1.AuxInt = int32ToAuxInt(off)
  1384  		v1.Aux = symToAux(sym)
  1385  		v1.AddArg3(ptr, idx, mem)
  1386  		v0.AddArg(v1)
  1387  		return true
  1388  	}
  1389  	return false
  1390  }
  1391  func rewriteValueS390X_OpCeil(v *Value) bool {
  1392  	v_0 := v.Args[0]
  1393  	// match: (Ceil x)
  1394  	// result: (FIDBR [6] x)
  1395  	for {
  1396  		x := v_0
  1397  		v.reset(OpS390XFIDBR)
  1398  		v.AuxInt = int8ToAuxInt(6)
  1399  		v.AddArg(x)
  1400  		return true
  1401  	}
  1402  }
  1403  func rewriteValueS390X_OpConst16(v *Value) bool {
  1404  	// match: (Const16 [val])
  1405  	// result: (MOVDconst [int64(val)])
  1406  	for {
  1407  		val := auxIntToInt16(v.AuxInt)
  1408  		v.reset(OpS390XMOVDconst)
  1409  		v.AuxInt = int64ToAuxInt(int64(val))
  1410  		return true
  1411  	}
  1412  }
  1413  func rewriteValueS390X_OpConst32(v *Value) bool {
  1414  	// match: (Const32 [val])
  1415  	// result: (MOVDconst [int64(val)])
  1416  	for {
  1417  		val := auxIntToInt32(v.AuxInt)
  1418  		v.reset(OpS390XMOVDconst)
  1419  		v.AuxInt = int64ToAuxInt(int64(val))
  1420  		return true
  1421  	}
  1422  }
  1423  func rewriteValueS390X_OpConst64(v *Value) bool {
  1424  	// match: (Const64 [val])
  1425  	// result: (MOVDconst [int64(val)])
  1426  	for {
  1427  		val := auxIntToInt64(v.AuxInt)
  1428  		v.reset(OpS390XMOVDconst)
  1429  		v.AuxInt = int64ToAuxInt(int64(val))
  1430  		return true
  1431  	}
  1432  }
  1433  func rewriteValueS390X_OpConst8(v *Value) bool {
  1434  	// match: (Const8 [val])
  1435  	// result: (MOVDconst [int64(val)])
  1436  	for {
  1437  		val := auxIntToInt8(v.AuxInt)
  1438  		v.reset(OpS390XMOVDconst)
  1439  		v.AuxInt = int64ToAuxInt(int64(val))
  1440  		return true
  1441  	}
  1442  }
  1443  func rewriteValueS390X_OpConstBool(v *Value) bool {
  1444  	// match: (ConstBool [t])
  1445  	// result: (MOVDconst [b2i(t)])
  1446  	for {
  1447  		t := auxIntToBool(v.AuxInt)
  1448  		v.reset(OpS390XMOVDconst)
  1449  		v.AuxInt = int64ToAuxInt(b2i(t))
  1450  		return true
  1451  	}
  1452  }
  1453  func rewriteValueS390X_OpConstNil(v *Value) bool {
  1454  	// match: (ConstNil)
  1455  	// result: (MOVDconst [0])
  1456  	for {
  1457  		v.reset(OpS390XMOVDconst)
  1458  		v.AuxInt = int64ToAuxInt(0)
  1459  		return true
  1460  	}
  1461  }
  1462  func rewriteValueS390X_OpCtz16(v *Value) bool {
  1463  	v_0 := v.Args[0]
  1464  	b := v.Block
  1465  	typ := &b.Func.Config.Types
  1466  	// match: (Ctz16 x)
  1467  	// result: (Ctz64 (Or64 <typ.UInt64> x (MOVDconst [1<<16])))
  1468  	for {
  1469  		x := v_0
  1470  		v.reset(OpCtz64)
  1471  		v0 := b.NewValue0(v.Pos, OpOr64, typ.UInt64)
  1472  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1473  		v1.AuxInt = int64ToAuxInt(1 << 16)
  1474  		v0.AddArg2(x, v1)
  1475  		v.AddArg(v0)
  1476  		return true
  1477  	}
  1478  }
  1479  func rewriteValueS390X_OpCtz32(v *Value) bool {
  1480  	v_0 := v.Args[0]
  1481  	b := v.Block
  1482  	typ := &b.Func.Config.Types
  1483  	// match: (Ctz32 <t> x)
  1484  	// result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW <t> (SUBWconst <t> [1] x) (NOTW <t> x)))))
  1485  	for {
  1486  		t := v.Type
  1487  		x := v_0
  1488  		v.reset(OpS390XSUB)
  1489  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1490  		v0.AuxInt = int64ToAuxInt(64)
  1491  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1492  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1493  		v3 := b.NewValue0(v.Pos, OpS390XANDW, t)
  1494  		v4 := b.NewValue0(v.Pos, OpS390XSUBWconst, t)
  1495  		v4.AuxInt = int32ToAuxInt(1)
  1496  		v4.AddArg(x)
  1497  		v5 := b.NewValue0(v.Pos, OpS390XNOTW, t)
  1498  		v5.AddArg(x)
  1499  		v3.AddArg2(v4, v5)
  1500  		v2.AddArg(v3)
  1501  		v1.AddArg(v2)
  1502  		v.AddArg2(v0, v1)
  1503  		return true
  1504  	}
  1505  }
  1506  func rewriteValueS390X_OpCtz64(v *Value) bool {
  1507  	v_0 := v.Args[0]
  1508  	b := v.Block
  1509  	typ := &b.Func.Config.Types
  1510  	// match: (Ctz64 <t> x)
  1511  	// result: (SUB (MOVDconst [64]) (FLOGR (AND <t> (SUBconst <t> [1] x) (NOT <t> x))))
  1512  	for {
  1513  		t := v.Type
  1514  		x := v_0
  1515  		v.reset(OpS390XSUB)
  1516  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1517  		v0.AuxInt = int64ToAuxInt(64)
  1518  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1519  		v2 := b.NewValue0(v.Pos, OpS390XAND, t)
  1520  		v3 := b.NewValue0(v.Pos, OpS390XSUBconst, t)
  1521  		v3.AuxInt = int32ToAuxInt(1)
  1522  		v3.AddArg(x)
  1523  		v4 := b.NewValue0(v.Pos, OpS390XNOT, t)
  1524  		v4.AddArg(x)
  1525  		v2.AddArg2(v3, v4)
  1526  		v1.AddArg(v2)
  1527  		v.AddArg2(v0, v1)
  1528  		return true
  1529  	}
  1530  }
  1531  func rewriteValueS390X_OpCtz8(v *Value) bool {
  1532  	v_0 := v.Args[0]
  1533  	b := v.Block
  1534  	typ := &b.Func.Config.Types
  1535  	// match: (Ctz8 x)
  1536  	// result: (Ctz64 (Or64 <typ.UInt64> x (MOVDconst [1<<8])))
  1537  	for {
  1538  		x := v_0
  1539  		v.reset(OpCtz64)
  1540  		v0 := b.NewValue0(v.Pos, OpOr64, typ.UInt64)
  1541  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1542  		v1.AuxInt = int64ToAuxInt(1 << 8)
  1543  		v0.AddArg2(x, v1)
  1544  		v.AddArg(v0)
  1545  		return true
  1546  	}
  1547  }
  1548  func rewriteValueS390X_OpDiv16(v *Value) bool {
  1549  	v_1 := v.Args[1]
  1550  	v_0 := v.Args[0]
  1551  	b := v.Block
  1552  	typ := &b.Func.Config.Types
  1553  	// match: (Div16 x y)
  1554  	// result: (DIVW (MOVHreg x) (MOVHreg y))
  1555  	for {
  1556  		x := v_0
  1557  		y := v_1
  1558  		v.reset(OpS390XDIVW)
  1559  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1560  		v0.AddArg(x)
  1561  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1562  		v1.AddArg(y)
  1563  		v.AddArg2(v0, v1)
  1564  		return true
  1565  	}
  1566  }
  1567  func rewriteValueS390X_OpDiv16u(v *Value) bool {
  1568  	v_1 := v.Args[1]
  1569  	v_0 := v.Args[0]
  1570  	b := v.Block
  1571  	typ := &b.Func.Config.Types
  1572  	// match: (Div16u x y)
  1573  	// result: (DIVWU (MOVHZreg x) (MOVHZreg y))
  1574  	for {
  1575  		x := v_0
  1576  		y := v_1
  1577  		v.reset(OpS390XDIVWU)
  1578  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1579  		v0.AddArg(x)
  1580  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1581  		v1.AddArg(y)
  1582  		v.AddArg2(v0, v1)
  1583  		return true
  1584  	}
  1585  }
  1586  func rewriteValueS390X_OpDiv32(v *Value) bool {
  1587  	v_1 := v.Args[1]
  1588  	v_0 := v.Args[0]
  1589  	b := v.Block
  1590  	typ := &b.Func.Config.Types
  1591  	// match: (Div32 x y)
  1592  	// result: (DIVW (MOVWreg x) y)
  1593  	for {
  1594  		x := v_0
  1595  		y := v_1
  1596  		v.reset(OpS390XDIVW)
  1597  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1598  		v0.AddArg(x)
  1599  		v.AddArg2(v0, y)
  1600  		return true
  1601  	}
  1602  }
  1603  func rewriteValueS390X_OpDiv32u(v *Value) bool {
  1604  	v_1 := v.Args[1]
  1605  	v_0 := v.Args[0]
  1606  	b := v.Block
  1607  	typ := &b.Func.Config.Types
  1608  	// match: (Div32u x y)
  1609  	// result: (DIVWU (MOVWZreg x) y)
  1610  	for {
  1611  		x := v_0
  1612  		y := v_1
  1613  		v.reset(OpS390XDIVWU)
  1614  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1615  		v0.AddArg(x)
  1616  		v.AddArg2(v0, y)
  1617  		return true
  1618  	}
  1619  }
  1620  func rewriteValueS390X_OpDiv64(v *Value) bool {
  1621  	v_1 := v.Args[1]
  1622  	v_0 := v.Args[0]
  1623  	// match: (Div64 x y)
  1624  	// result: (DIVD x y)
  1625  	for {
  1626  		x := v_0
  1627  		y := v_1
  1628  		v.reset(OpS390XDIVD)
  1629  		v.AddArg2(x, y)
  1630  		return true
  1631  	}
  1632  }
  1633  func rewriteValueS390X_OpDiv8(v *Value) bool {
  1634  	v_1 := v.Args[1]
  1635  	v_0 := v.Args[0]
  1636  	b := v.Block
  1637  	typ := &b.Func.Config.Types
  1638  	// match: (Div8 x y)
  1639  	// result: (DIVW (MOVBreg x) (MOVBreg y))
  1640  	for {
  1641  		x := v_0
  1642  		y := v_1
  1643  		v.reset(OpS390XDIVW)
  1644  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1645  		v0.AddArg(x)
  1646  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1647  		v1.AddArg(y)
  1648  		v.AddArg2(v0, v1)
  1649  		return true
  1650  	}
  1651  }
  1652  func rewriteValueS390X_OpDiv8u(v *Value) bool {
  1653  	v_1 := v.Args[1]
  1654  	v_0 := v.Args[0]
  1655  	b := v.Block
  1656  	typ := &b.Func.Config.Types
  1657  	// match: (Div8u x y)
  1658  	// result: (DIVWU (MOVBZreg x) (MOVBZreg y))
  1659  	for {
  1660  		x := v_0
  1661  		y := v_1
  1662  		v.reset(OpS390XDIVWU)
  1663  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1664  		v0.AddArg(x)
  1665  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1666  		v1.AddArg(y)
  1667  		v.AddArg2(v0, v1)
  1668  		return true
  1669  	}
  1670  }
  1671  func rewriteValueS390X_OpEq16(v *Value) bool {
  1672  	v_1 := v.Args[1]
  1673  	v_0 := v.Args[0]
  1674  	b := v.Block
  1675  	typ := &b.Func.Config.Types
  1676  	// match: (Eq16 x y)
  1677  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1678  	for {
  1679  		x := v_0
  1680  		y := v_1
  1681  		v.reset(OpS390XLOCGR)
  1682  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1683  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1684  		v0.AuxInt = int64ToAuxInt(0)
  1685  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1686  		v1.AuxInt = int64ToAuxInt(1)
  1687  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1688  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1689  		v3.AddArg(x)
  1690  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1691  		v4.AddArg(y)
  1692  		v2.AddArg2(v3, v4)
  1693  		v.AddArg3(v0, v1, v2)
  1694  		return true
  1695  	}
  1696  }
  1697  func rewriteValueS390X_OpEq32(v *Value) bool {
  1698  	v_1 := v.Args[1]
  1699  	v_0 := v.Args[0]
  1700  	b := v.Block
  1701  	typ := &b.Func.Config.Types
  1702  	// match: (Eq32 x y)
  1703  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1704  	for {
  1705  		x := v_0
  1706  		y := v_1
  1707  		v.reset(OpS390XLOCGR)
  1708  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1709  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1710  		v0.AuxInt = int64ToAuxInt(0)
  1711  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1712  		v1.AuxInt = int64ToAuxInt(1)
  1713  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1714  		v2.AddArg2(x, y)
  1715  		v.AddArg3(v0, v1, v2)
  1716  		return true
  1717  	}
  1718  }
  1719  func rewriteValueS390X_OpEq32F(v *Value) bool {
  1720  	v_1 := v.Args[1]
  1721  	v_0 := v.Args[0]
  1722  	b := v.Block
  1723  	typ := &b.Func.Config.Types
  1724  	// match: (Eq32F x y)
  1725  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1726  	for {
  1727  		x := v_0
  1728  		y := v_1
  1729  		v.reset(OpS390XLOCGR)
  1730  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1731  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1732  		v0.AuxInt = int64ToAuxInt(0)
  1733  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1734  		v1.AuxInt = int64ToAuxInt(1)
  1735  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  1736  		v2.AddArg2(x, y)
  1737  		v.AddArg3(v0, v1, v2)
  1738  		return true
  1739  	}
  1740  }
  1741  func rewriteValueS390X_OpEq64(v *Value) bool {
  1742  	v_1 := v.Args[1]
  1743  	v_0 := v.Args[0]
  1744  	b := v.Block
  1745  	typ := &b.Func.Config.Types
  1746  	// match: (Eq64 x y)
  1747  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1748  	for {
  1749  		x := v_0
  1750  		y := v_1
  1751  		v.reset(OpS390XLOCGR)
  1752  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1753  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1754  		v0.AuxInt = int64ToAuxInt(0)
  1755  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1756  		v1.AuxInt = int64ToAuxInt(1)
  1757  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1758  		v2.AddArg2(x, y)
  1759  		v.AddArg3(v0, v1, v2)
  1760  		return true
  1761  	}
  1762  }
  1763  func rewriteValueS390X_OpEq64F(v *Value) bool {
  1764  	v_1 := v.Args[1]
  1765  	v_0 := v.Args[0]
  1766  	b := v.Block
  1767  	typ := &b.Func.Config.Types
  1768  	// match: (Eq64F x y)
  1769  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  1770  	for {
  1771  		x := v_0
  1772  		y := v_1
  1773  		v.reset(OpS390XLOCGR)
  1774  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1775  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1776  		v0.AuxInt = int64ToAuxInt(0)
  1777  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1778  		v1.AuxInt = int64ToAuxInt(1)
  1779  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  1780  		v2.AddArg2(x, y)
  1781  		v.AddArg3(v0, v1, v2)
  1782  		return true
  1783  	}
  1784  }
  1785  func rewriteValueS390X_OpEq8(v *Value) bool {
  1786  	v_1 := v.Args[1]
  1787  	v_0 := v.Args[0]
  1788  	b := v.Block
  1789  	typ := &b.Func.Config.Types
  1790  	// match: (Eq8 x y)
  1791  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1792  	for {
  1793  		x := v_0
  1794  		y := v_1
  1795  		v.reset(OpS390XLOCGR)
  1796  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1797  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1798  		v0.AuxInt = int64ToAuxInt(0)
  1799  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1800  		v1.AuxInt = int64ToAuxInt(1)
  1801  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1802  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1803  		v3.AddArg(x)
  1804  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1805  		v4.AddArg(y)
  1806  		v2.AddArg2(v3, v4)
  1807  		v.AddArg3(v0, v1, v2)
  1808  		return true
  1809  	}
  1810  }
  1811  func rewriteValueS390X_OpEqB(v *Value) bool {
  1812  	v_1 := v.Args[1]
  1813  	v_0 := v.Args[0]
  1814  	b := v.Block
  1815  	typ := &b.Func.Config.Types
  1816  	// match: (EqB x y)
  1817  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1818  	for {
  1819  		x := v_0
  1820  		y := v_1
  1821  		v.reset(OpS390XLOCGR)
  1822  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1823  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1824  		v0.AuxInt = int64ToAuxInt(0)
  1825  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1826  		v1.AuxInt = int64ToAuxInt(1)
  1827  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1828  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1829  		v3.AddArg(x)
  1830  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1831  		v4.AddArg(y)
  1832  		v2.AddArg2(v3, v4)
  1833  		v.AddArg3(v0, v1, v2)
  1834  		return true
  1835  	}
  1836  }
  1837  func rewriteValueS390X_OpEqPtr(v *Value) bool {
  1838  	v_1 := v.Args[1]
  1839  	v_0 := v.Args[0]
  1840  	b := v.Block
  1841  	typ := &b.Func.Config.Types
  1842  	// match: (EqPtr x y)
  1843  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1844  	for {
  1845  		x := v_0
  1846  		y := v_1
  1847  		v.reset(OpS390XLOCGR)
  1848  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1849  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1850  		v0.AuxInt = int64ToAuxInt(0)
  1851  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1852  		v1.AuxInt = int64ToAuxInt(1)
  1853  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1854  		v2.AddArg2(x, y)
  1855  		v.AddArg3(v0, v1, v2)
  1856  		return true
  1857  	}
  1858  }
  1859  func rewriteValueS390X_OpFMA(v *Value) bool {
  1860  	v_2 := v.Args[2]
  1861  	v_1 := v.Args[1]
  1862  	v_0 := v.Args[0]
  1863  	// match: (FMA x y z)
  1864  	// result: (FMADD z x y)
  1865  	for {
  1866  		x := v_0
  1867  		y := v_1
  1868  		z := v_2
  1869  		v.reset(OpS390XFMADD)
  1870  		v.AddArg3(z, x, y)
  1871  		return true
  1872  	}
  1873  }
  1874  func rewriteValueS390X_OpFloor(v *Value) bool {
  1875  	v_0 := v.Args[0]
  1876  	// match: (Floor x)
  1877  	// result: (FIDBR [7] x)
  1878  	for {
  1879  		x := v_0
  1880  		v.reset(OpS390XFIDBR)
  1881  		v.AuxInt = int8ToAuxInt(7)
  1882  		v.AddArg(x)
  1883  		return true
  1884  	}
  1885  }
  1886  func rewriteValueS390X_OpHmul32(v *Value) bool {
  1887  	v_1 := v.Args[1]
  1888  	v_0 := v.Args[0]
  1889  	b := v.Block
  1890  	typ := &b.Func.Config.Types
  1891  	// match: (Hmul32 x y)
  1892  	// result: (SRDconst [32] (MULLD (MOVWreg x) (MOVWreg y)))
  1893  	for {
  1894  		x := v_0
  1895  		y := v_1
  1896  		v.reset(OpS390XSRDconst)
  1897  		v.AuxInt = uint8ToAuxInt(32)
  1898  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1899  		v1 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1900  		v1.AddArg(x)
  1901  		v2 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1902  		v2.AddArg(y)
  1903  		v0.AddArg2(v1, v2)
  1904  		v.AddArg(v0)
  1905  		return true
  1906  	}
  1907  }
  1908  func rewriteValueS390X_OpHmul32u(v *Value) bool {
  1909  	v_1 := v.Args[1]
  1910  	v_0 := v.Args[0]
  1911  	b := v.Block
  1912  	typ := &b.Func.Config.Types
  1913  	// match: (Hmul32u x y)
  1914  	// result: (SRDconst [32] (MULLD (MOVWZreg x) (MOVWZreg y)))
  1915  	for {
  1916  		x := v_0
  1917  		y := v_1
  1918  		v.reset(OpS390XSRDconst)
  1919  		v.AuxInt = uint8ToAuxInt(32)
  1920  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1921  		v1 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1922  		v1.AddArg(x)
  1923  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1924  		v2.AddArg(y)
  1925  		v0.AddArg2(v1, v2)
  1926  		v.AddArg(v0)
  1927  		return true
  1928  	}
  1929  }
  1930  func rewriteValueS390X_OpITab(v *Value) bool {
  1931  	v_0 := v.Args[0]
  1932  	// match: (ITab (Load ptr mem))
  1933  	// result: (MOVDload ptr mem)
  1934  	for {
  1935  		if v_0.Op != OpLoad {
  1936  			break
  1937  		}
  1938  		mem := v_0.Args[1]
  1939  		ptr := v_0.Args[0]
  1940  		v.reset(OpS390XMOVDload)
  1941  		v.AddArg2(ptr, mem)
  1942  		return true
  1943  	}
  1944  	return false
  1945  }
  1946  func rewriteValueS390X_OpIsInBounds(v *Value) bool {
  1947  	v_1 := v.Args[1]
  1948  	v_0 := v.Args[0]
  1949  	b := v.Block
  1950  	typ := &b.Func.Config.Types
  1951  	// match: (IsInBounds idx len)
  1952  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1953  	for {
  1954  		idx := v_0
  1955  		len := v_1
  1956  		v.reset(OpS390XLOCGR)
  1957  		v.Aux = s390xCCMaskToAux(s390x.Less)
  1958  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1959  		v0.AuxInt = int64ToAuxInt(0)
  1960  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1961  		v1.AuxInt = int64ToAuxInt(1)
  1962  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  1963  		v2.AddArg2(idx, len)
  1964  		v.AddArg3(v0, v1, v2)
  1965  		return true
  1966  	}
  1967  }
  1968  func rewriteValueS390X_OpIsNonNil(v *Value) bool {
  1969  	v_0 := v.Args[0]
  1970  	b := v.Block
  1971  	typ := &b.Func.Config.Types
  1972  	// match: (IsNonNil p)
  1973  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPconst p [0]))
  1974  	for {
  1975  		p := v_0
  1976  		v.reset(OpS390XLOCGR)
  1977  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  1978  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1979  		v0.AuxInt = int64ToAuxInt(0)
  1980  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1981  		v1.AuxInt = int64ToAuxInt(1)
  1982  		v2 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  1983  		v2.AuxInt = int32ToAuxInt(0)
  1984  		v2.AddArg(p)
  1985  		v.AddArg3(v0, v1, v2)
  1986  		return true
  1987  	}
  1988  }
  1989  func rewriteValueS390X_OpIsSliceInBounds(v *Value) bool {
  1990  	v_1 := v.Args[1]
  1991  	v_0 := v.Args[0]
  1992  	b := v.Block
  1993  	typ := &b.Func.Config.Types
  1994  	// match: (IsSliceInBounds idx len)
  1995  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1996  	for {
  1997  		idx := v_0
  1998  		len := v_1
  1999  		v.reset(OpS390XLOCGR)
  2000  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2001  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2002  		v0.AuxInt = int64ToAuxInt(0)
  2003  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2004  		v1.AuxInt = int64ToAuxInt(1)
  2005  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2006  		v2.AddArg2(idx, len)
  2007  		v.AddArg3(v0, v1, v2)
  2008  		return true
  2009  	}
  2010  }
  2011  func rewriteValueS390X_OpLeq16(v *Value) bool {
  2012  	v_1 := v.Args[1]
  2013  	v_0 := v.Args[0]
  2014  	b := v.Block
  2015  	typ := &b.Func.Config.Types
  2016  	// match: (Leq16 x y)
  2017  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2018  	for {
  2019  		x := v_0
  2020  		y := v_1
  2021  		v.reset(OpS390XLOCGR)
  2022  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2023  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2024  		v0.AuxInt = int64ToAuxInt(0)
  2025  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2026  		v1.AuxInt = int64ToAuxInt(1)
  2027  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2028  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2029  		v3.AddArg(x)
  2030  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2031  		v4.AddArg(y)
  2032  		v2.AddArg2(v3, v4)
  2033  		v.AddArg3(v0, v1, v2)
  2034  		return true
  2035  	}
  2036  }
  2037  func rewriteValueS390X_OpLeq16U(v *Value) bool {
  2038  	v_1 := v.Args[1]
  2039  	v_0 := v.Args[0]
  2040  	b := v.Block
  2041  	typ := &b.Func.Config.Types
  2042  	// match: (Leq16U x y)
  2043  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2044  	for {
  2045  		x := v_0
  2046  		y := v_1
  2047  		v.reset(OpS390XLOCGR)
  2048  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2049  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2050  		v0.AuxInt = int64ToAuxInt(0)
  2051  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2052  		v1.AuxInt = int64ToAuxInt(1)
  2053  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2054  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2055  		v3.AddArg(x)
  2056  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2057  		v4.AddArg(y)
  2058  		v2.AddArg2(v3, v4)
  2059  		v.AddArg3(v0, v1, v2)
  2060  		return true
  2061  	}
  2062  }
  2063  func rewriteValueS390X_OpLeq32(v *Value) bool {
  2064  	v_1 := v.Args[1]
  2065  	v_0 := v.Args[0]
  2066  	b := v.Block
  2067  	typ := &b.Func.Config.Types
  2068  	// match: (Leq32 x y)
  2069  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2070  	for {
  2071  		x := v_0
  2072  		y := v_1
  2073  		v.reset(OpS390XLOCGR)
  2074  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2075  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2076  		v0.AuxInt = int64ToAuxInt(0)
  2077  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2078  		v1.AuxInt = int64ToAuxInt(1)
  2079  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2080  		v2.AddArg2(x, y)
  2081  		v.AddArg3(v0, v1, v2)
  2082  		return true
  2083  	}
  2084  }
  2085  func rewriteValueS390X_OpLeq32F(v *Value) bool {
  2086  	v_1 := v.Args[1]
  2087  	v_0 := v.Args[0]
  2088  	b := v.Block
  2089  	typ := &b.Func.Config.Types
  2090  	// match: (Leq32F x y)
  2091  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2092  	for {
  2093  		x := v_0
  2094  		y := v_1
  2095  		v.reset(OpS390XLOCGR)
  2096  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2097  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2098  		v0.AuxInt = int64ToAuxInt(0)
  2099  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2100  		v1.AuxInt = int64ToAuxInt(1)
  2101  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  2102  		v2.AddArg2(x, y)
  2103  		v.AddArg3(v0, v1, v2)
  2104  		return true
  2105  	}
  2106  }
  2107  func rewriteValueS390X_OpLeq32U(v *Value) bool {
  2108  	v_1 := v.Args[1]
  2109  	v_0 := v.Args[0]
  2110  	b := v.Block
  2111  	typ := &b.Func.Config.Types
  2112  	// match: (Leq32U x y)
  2113  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2114  	for {
  2115  		x := v_0
  2116  		y := v_1
  2117  		v.reset(OpS390XLOCGR)
  2118  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2119  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2120  		v0.AuxInt = int64ToAuxInt(0)
  2121  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2122  		v1.AuxInt = int64ToAuxInt(1)
  2123  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2124  		v2.AddArg2(x, y)
  2125  		v.AddArg3(v0, v1, v2)
  2126  		return true
  2127  	}
  2128  }
  2129  func rewriteValueS390X_OpLeq64(v *Value) bool {
  2130  	v_1 := v.Args[1]
  2131  	v_0 := v.Args[0]
  2132  	b := v.Block
  2133  	typ := &b.Func.Config.Types
  2134  	// match: (Leq64 x y)
  2135  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2136  	for {
  2137  		x := v_0
  2138  		y := v_1
  2139  		v.reset(OpS390XLOCGR)
  2140  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2141  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2142  		v0.AuxInt = int64ToAuxInt(0)
  2143  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2144  		v1.AuxInt = int64ToAuxInt(1)
  2145  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  2146  		v2.AddArg2(x, y)
  2147  		v.AddArg3(v0, v1, v2)
  2148  		return true
  2149  	}
  2150  }
  2151  func rewriteValueS390X_OpLeq64F(v *Value) bool {
  2152  	v_1 := v.Args[1]
  2153  	v_0 := v.Args[0]
  2154  	b := v.Block
  2155  	typ := &b.Func.Config.Types
  2156  	// match: (Leq64F x y)
  2157  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2158  	for {
  2159  		x := v_0
  2160  		y := v_1
  2161  		v.reset(OpS390XLOCGR)
  2162  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2163  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2164  		v0.AuxInt = int64ToAuxInt(0)
  2165  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2166  		v1.AuxInt = int64ToAuxInt(1)
  2167  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2168  		v2.AddArg2(x, y)
  2169  		v.AddArg3(v0, v1, v2)
  2170  		return true
  2171  	}
  2172  }
  2173  func rewriteValueS390X_OpLeq64U(v *Value) bool {
  2174  	v_1 := v.Args[1]
  2175  	v_0 := v.Args[0]
  2176  	b := v.Block
  2177  	typ := &b.Func.Config.Types
  2178  	// match: (Leq64U x y)
  2179  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2180  	for {
  2181  		x := v_0
  2182  		y := v_1
  2183  		v.reset(OpS390XLOCGR)
  2184  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2185  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2186  		v0.AuxInt = int64ToAuxInt(0)
  2187  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2188  		v1.AuxInt = int64ToAuxInt(1)
  2189  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2190  		v2.AddArg2(x, y)
  2191  		v.AddArg3(v0, v1, v2)
  2192  		return true
  2193  	}
  2194  }
  2195  func rewriteValueS390X_OpLeq8(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: (Leq8 x y)
  2201  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2202  	for {
  2203  		x := v_0
  2204  		y := v_1
  2205  		v.reset(OpS390XLOCGR)
  2206  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2207  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2208  		v0.AuxInt = int64ToAuxInt(0)
  2209  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2210  		v1.AuxInt = int64ToAuxInt(1)
  2211  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2212  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2213  		v3.AddArg(x)
  2214  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2215  		v4.AddArg(y)
  2216  		v2.AddArg2(v3, v4)
  2217  		v.AddArg3(v0, v1, v2)
  2218  		return true
  2219  	}
  2220  }
  2221  func rewriteValueS390X_OpLeq8U(v *Value) bool {
  2222  	v_1 := v.Args[1]
  2223  	v_0 := v.Args[0]
  2224  	b := v.Block
  2225  	typ := &b.Func.Config.Types
  2226  	// match: (Leq8U x y)
  2227  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2228  	for {
  2229  		x := v_0
  2230  		y := v_1
  2231  		v.reset(OpS390XLOCGR)
  2232  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2233  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2234  		v0.AuxInt = int64ToAuxInt(0)
  2235  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2236  		v1.AuxInt = int64ToAuxInt(1)
  2237  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2238  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2239  		v3.AddArg(x)
  2240  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2241  		v4.AddArg(y)
  2242  		v2.AddArg2(v3, v4)
  2243  		v.AddArg3(v0, v1, v2)
  2244  		return true
  2245  	}
  2246  }
  2247  func rewriteValueS390X_OpLess16(v *Value) bool {
  2248  	v_1 := v.Args[1]
  2249  	v_0 := v.Args[0]
  2250  	b := v.Block
  2251  	typ := &b.Func.Config.Types
  2252  	// match: (Less16 x y)
  2253  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2254  	for {
  2255  		x := v_0
  2256  		y := v_1
  2257  		v.reset(OpS390XLOCGR)
  2258  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2259  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2260  		v0.AuxInt = int64ToAuxInt(0)
  2261  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2262  		v1.AuxInt = int64ToAuxInt(1)
  2263  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2264  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2265  		v3.AddArg(x)
  2266  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2267  		v4.AddArg(y)
  2268  		v2.AddArg2(v3, v4)
  2269  		v.AddArg3(v0, v1, v2)
  2270  		return true
  2271  	}
  2272  }
  2273  func rewriteValueS390X_OpLess16U(v *Value) bool {
  2274  	v_1 := v.Args[1]
  2275  	v_0 := v.Args[0]
  2276  	b := v.Block
  2277  	typ := &b.Func.Config.Types
  2278  	// match: (Less16U x y)
  2279  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2280  	for {
  2281  		x := v_0
  2282  		y := v_1
  2283  		v.reset(OpS390XLOCGR)
  2284  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2285  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2286  		v0.AuxInt = int64ToAuxInt(0)
  2287  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2288  		v1.AuxInt = int64ToAuxInt(1)
  2289  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2290  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2291  		v3.AddArg(x)
  2292  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2293  		v4.AddArg(y)
  2294  		v2.AddArg2(v3, v4)
  2295  		v.AddArg3(v0, v1, v2)
  2296  		return true
  2297  	}
  2298  }
  2299  func rewriteValueS390X_OpLess32(v *Value) bool {
  2300  	v_1 := v.Args[1]
  2301  	v_0 := v.Args[0]
  2302  	b := v.Block
  2303  	typ := &b.Func.Config.Types
  2304  	// match: (Less32 x y)
  2305  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2306  	for {
  2307  		x := v_0
  2308  		y := v_1
  2309  		v.reset(OpS390XLOCGR)
  2310  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2311  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2312  		v0.AuxInt = int64ToAuxInt(0)
  2313  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2314  		v1.AuxInt = int64ToAuxInt(1)
  2315  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2316  		v2.AddArg2(x, y)
  2317  		v.AddArg3(v0, v1, v2)
  2318  		return true
  2319  	}
  2320  }
  2321  func rewriteValueS390X_OpLess32F(v *Value) bool {
  2322  	v_1 := v.Args[1]
  2323  	v_0 := v.Args[0]
  2324  	b := v.Block
  2325  	typ := &b.Func.Config.Types
  2326  	// match: (Less32F x y)
  2327  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2328  	for {
  2329  		x := v_0
  2330  		y := v_1
  2331  		v.reset(OpS390XLOCGR)
  2332  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2333  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2334  		v0.AuxInt = int64ToAuxInt(0)
  2335  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2336  		v1.AuxInt = int64ToAuxInt(1)
  2337  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  2338  		v2.AddArg2(x, y)
  2339  		v.AddArg3(v0, v1, v2)
  2340  		return true
  2341  	}
  2342  }
  2343  func rewriteValueS390X_OpLess32U(v *Value) bool {
  2344  	v_1 := v.Args[1]
  2345  	v_0 := v.Args[0]
  2346  	b := v.Block
  2347  	typ := &b.Func.Config.Types
  2348  	// match: (Less32U x y)
  2349  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2350  	for {
  2351  		x := v_0
  2352  		y := v_1
  2353  		v.reset(OpS390XLOCGR)
  2354  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2355  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2356  		v0.AuxInt = int64ToAuxInt(0)
  2357  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2358  		v1.AuxInt = int64ToAuxInt(1)
  2359  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2360  		v2.AddArg2(x, y)
  2361  		v.AddArg3(v0, v1, v2)
  2362  		return true
  2363  	}
  2364  }
  2365  func rewriteValueS390X_OpLess64(v *Value) bool {
  2366  	v_1 := v.Args[1]
  2367  	v_0 := v.Args[0]
  2368  	b := v.Block
  2369  	typ := &b.Func.Config.Types
  2370  	// match: (Less64 x y)
  2371  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2372  	for {
  2373  		x := v_0
  2374  		y := v_1
  2375  		v.reset(OpS390XLOCGR)
  2376  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2377  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2378  		v0.AuxInt = int64ToAuxInt(0)
  2379  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2380  		v1.AuxInt = int64ToAuxInt(1)
  2381  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  2382  		v2.AddArg2(x, y)
  2383  		v.AddArg3(v0, v1, v2)
  2384  		return true
  2385  	}
  2386  }
  2387  func rewriteValueS390X_OpLess64F(v *Value) bool {
  2388  	v_1 := v.Args[1]
  2389  	v_0 := v.Args[0]
  2390  	b := v.Block
  2391  	typ := &b.Func.Config.Types
  2392  	// match: (Less64F x y)
  2393  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2394  	for {
  2395  		x := v_0
  2396  		y := v_1
  2397  		v.reset(OpS390XLOCGR)
  2398  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2399  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2400  		v0.AuxInt = int64ToAuxInt(0)
  2401  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2402  		v1.AuxInt = int64ToAuxInt(1)
  2403  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2404  		v2.AddArg2(x, y)
  2405  		v.AddArg3(v0, v1, v2)
  2406  		return true
  2407  	}
  2408  }
  2409  func rewriteValueS390X_OpLess64U(v *Value) bool {
  2410  	v_1 := v.Args[1]
  2411  	v_0 := v.Args[0]
  2412  	b := v.Block
  2413  	typ := &b.Func.Config.Types
  2414  	// match: (Less64U x y)
  2415  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2416  	for {
  2417  		x := v_0
  2418  		y := v_1
  2419  		v.reset(OpS390XLOCGR)
  2420  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2421  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2422  		v0.AuxInt = int64ToAuxInt(0)
  2423  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2424  		v1.AuxInt = int64ToAuxInt(1)
  2425  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2426  		v2.AddArg2(x, y)
  2427  		v.AddArg3(v0, v1, v2)
  2428  		return true
  2429  	}
  2430  }
  2431  func rewriteValueS390X_OpLess8(v *Value) bool {
  2432  	v_1 := v.Args[1]
  2433  	v_0 := v.Args[0]
  2434  	b := v.Block
  2435  	typ := &b.Func.Config.Types
  2436  	// match: (Less8 x y)
  2437  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2438  	for {
  2439  		x := v_0
  2440  		y := v_1
  2441  		v.reset(OpS390XLOCGR)
  2442  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2443  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2444  		v0.AuxInt = int64ToAuxInt(0)
  2445  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2446  		v1.AuxInt = int64ToAuxInt(1)
  2447  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2448  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2449  		v3.AddArg(x)
  2450  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2451  		v4.AddArg(y)
  2452  		v2.AddArg2(v3, v4)
  2453  		v.AddArg3(v0, v1, v2)
  2454  		return true
  2455  	}
  2456  }
  2457  func rewriteValueS390X_OpLess8U(v *Value) bool {
  2458  	v_1 := v.Args[1]
  2459  	v_0 := v.Args[0]
  2460  	b := v.Block
  2461  	typ := &b.Func.Config.Types
  2462  	// match: (Less8U x y)
  2463  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2464  	for {
  2465  		x := v_0
  2466  		y := v_1
  2467  		v.reset(OpS390XLOCGR)
  2468  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2469  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2470  		v0.AuxInt = int64ToAuxInt(0)
  2471  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2472  		v1.AuxInt = int64ToAuxInt(1)
  2473  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2474  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2475  		v3.AddArg(x)
  2476  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2477  		v4.AddArg(y)
  2478  		v2.AddArg2(v3, v4)
  2479  		v.AddArg3(v0, v1, v2)
  2480  		return true
  2481  	}
  2482  }
  2483  func rewriteValueS390X_OpLoad(v *Value) bool {
  2484  	v_1 := v.Args[1]
  2485  	v_0 := v.Args[0]
  2486  	// match: (Load <t> ptr mem)
  2487  	// cond: (is64BitInt(t) || isPtr(t))
  2488  	// result: (MOVDload ptr mem)
  2489  	for {
  2490  		t := v.Type
  2491  		ptr := v_0
  2492  		mem := v_1
  2493  		if !(is64BitInt(t) || isPtr(t)) {
  2494  			break
  2495  		}
  2496  		v.reset(OpS390XMOVDload)
  2497  		v.AddArg2(ptr, mem)
  2498  		return true
  2499  	}
  2500  	// match: (Load <t> ptr mem)
  2501  	// cond: is32BitInt(t) && t.IsSigned()
  2502  	// result: (MOVWload ptr mem)
  2503  	for {
  2504  		t := v.Type
  2505  		ptr := v_0
  2506  		mem := v_1
  2507  		if !(is32BitInt(t) && t.IsSigned()) {
  2508  			break
  2509  		}
  2510  		v.reset(OpS390XMOVWload)
  2511  		v.AddArg2(ptr, mem)
  2512  		return true
  2513  	}
  2514  	// match: (Load <t> ptr mem)
  2515  	// cond: is32BitInt(t) && !t.IsSigned()
  2516  	// result: (MOVWZload ptr mem)
  2517  	for {
  2518  		t := v.Type
  2519  		ptr := v_0
  2520  		mem := v_1
  2521  		if !(is32BitInt(t) && !t.IsSigned()) {
  2522  			break
  2523  		}
  2524  		v.reset(OpS390XMOVWZload)
  2525  		v.AddArg2(ptr, mem)
  2526  		return true
  2527  	}
  2528  	// match: (Load <t> ptr mem)
  2529  	// cond: is16BitInt(t) && t.IsSigned()
  2530  	// result: (MOVHload ptr mem)
  2531  	for {
  2532  		t := v.Type
  2533  		ptr := v_0
  2534  		mem := v_1
  2535  		if !(is16BitInt(t) && t.IsSigned()) {
  2536  			break
  2537  		}
  2538  		v.reset(OpS390XMOVHload)
  2539  		v.AddArg2(ptr, mem)
  2540  		return true
  2541  	}
  2542  	// match: (Load <t> ptr mem)
  2543  	// cond: is16BitInt(t) && !t.IsSigned()
  2544  	// result: (MOVHZload ptr mem)
  2545  	for {
  2546  		t := v.Type
  2547  		ptr := v_0
  2548  		mem := v_1
  2549  		if !(is16BitInt(t) && !t.IsSigned()) {
  2550  			break
  2551  		}
  2552  		v.reset(OpS390XMOVHZload)
  2553  		v.AddArg2(ptr, mem)
  2554  		return true
  2555  	}
  2556  	// match: (Load <t> ptr mem)
  2557  	// cond: is8BitInt(t) && t.IsSigned()
  2558  	// result: (MOVBload ptr mem)
  2559  	for {
  2560  		t := v.Type
  2561  		ptr := v_0
  2562  		mem := v_1
  2563  		if !(is8BitInt(t) && t.IsSigned()) {
  2564  			break
  2565  		}
  2566  		v.reset(OpS390XMOVBload)
  2567  		v.AddArg2(ptr, mem)
  2568  		return true
  2569  	}
  2570  	// match: (Load <t> ptr mem)
  2571  	// cond: (t.IsBoolean() || (is8BitInt(t) && !t.IsSigned()))
  2572  	// result: (MOVBZload ptr mem)
  2573  	for {
  2574  		t := v.Type
  2575  		ptr := v_0
  2576  		mem := v_1
  2577  		if !(t.IsBoolean() || (is8BitInt(t) && !t.IsSigned())) {
  2578  			break
  2579  		}
  2580  		v.reset(OpS390XMOVBZload)
  2581  		v.AddArg2(ptr, mem)
  2582  		return true
  2583  	}
  2584  	// match: (Load <t> ptr mem)
  2585  	// cond: is32BitFloat(t)
  2586  	// result: (FMOVSload ptr mem)
  2587  	for {
  2588  		t := v.Type
  2589  		ptr := v_0
  2590  		mem := v_1
  2591  		if !(is32BitFloat(t)) {
  2592  			break
  2593  		}
  2594  		v.reset(OpS390XFMOVSload)
  2595  		v.AddArg2(ptr, mem)
  2596  		return true
  2597  	}
  2598  	// match: (Load <t> ptr mem)
  2599  	// cond: is64BitFloat(t)
  2600  	// result: (FMOVDload ptr mem)
  2601  	for {
  2602  		t := v.Type
  2603  		ptr := v_0
  2604  		mem := v_1
  2605  		if !(is64BitFloat(t)) {
  2606  			break
  2607  		}
  2608  		v.reset(OpS390XFMOVDload)
  2609  		v.AddArg2(ptr, mem)
  2610  		return true
  2611  	}
  2612  	return false
  2613  }
  2614  func rewriteValueS390X_OpLocalAddr(v *Value) bool {
  2615  	v_1 := v.Args[1]
  2616  	v_0 := v.Args[0]
  2617  	b := v.Block
  2618  	typ := &b.Func.Config.Types
  2619  	// match: (LocalAddr <t> {sym} base mem)
  2620  	// cond: t.Elem().HasPointers()
  2621  	// result: (MOVDaddr {sym} (SPanchored base mem))
  2622  	for {
  2623  		t := v.Type
  2624  		sym := auxToSym(v.Aux)
  2625  		base := v_0
  2626  		mem := v_1
  2627  		if !(t.Elem().HasPointers()) {
  2628  			break
  2629  		}
  2630  		v.reset(OpS390XMOVDaddr)
  2631  		v.Aux = symToAux(sym)
  2632  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  2633  		v0.AddArg2(base, mem)
  2634  		v.AddArg(v0)
  2635  		return true
  2636  	}
  2637  	// match: (LocalAddr <t> {sym} base _)
  2638  	// cond: !t.Elem().HasPointers()
  2639  	// result: (MOVDaddr {sym} base)
  2640  	for {
  2641  		t := v.Type
  2642  		sym := auxToSym(v.Aux)
  2643  		base := v_0
  2644  		if !(!t.Elem().HasPointers()) {
  2645  			break
  2646  		}
  2647  		v.reset(OpS390XMOVDaddr)
  2648  		v.Aux = symToAux(sym)
  2649  		v.AddArg(base)
  2650  		return true
  2651  	}
  2652  	return false
  2653  }
  2654  func rewriteValueS390X_OpLsh16x16(v *Value) bool {
  2655  	v_1 := v.Args[1]
  2656  	v_0 := v.Args[0]
  2657  	b := v.Block
  2658  	typ := &b.Func.Config.Types
  2659  	// match: (Lsh16x16 x y)
  2660  	// cond: shiftIsBounded(v)
  2661  	// result: (SLW x y)
  2662  	for {
  2663  		x := v_0
  2664  		y := v_1
  2665  		if !(shiftIsBounded(v)) {
  2666  			break
  2667  		}
  2668  		v.reset(OpS390XSLW)
  2669  		v.AddArg2(x, y)
  2670  		return true
  2671  	}
  2672  	// match: (Lsh16x16 <t> x y)
  2673  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2674  	for {
  2675  		t := v.Type
  2676  		x := v_0
  2677  		y := v_1
  2678  		v.reset(OpS390XLOCGR)
  2679  		v.Type = t
  2680  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2681  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2682  		v0.AddArg2(x, y)
  2683  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2684  		v1.AuxInt = int64ToAuxInt(0)
  2685  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2686  		v2.AuxInt = int32ToAuxInt(64)
  2687  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2688  		v3.AddArg(y)
  2689  		v2.AddArg(v3)
  2690  		v.AddArg3(v0, v1, v2)
  2691  		return true
  2692  	}
  2693  }
  2694  func rewriteValueS390X_OpLsh16x32(v *Value) bool {
  2695  	v_1 := v.Args[1]
  2696  	v_0 := v.Args[0]
  2697  	b := v.Block
  2698  	typ := &b.Func.Config.Types
  2699  	// match: (Lsh16x32 x y)
  2700  	// cond: shiftIsBounded(v)
  2701  	// result: (SLW x y)
  2702  	for {
  2703  		x := v_0
  2704  		y := v_1
  2705  		if !(shiftIsBounded(v)) {
  2706  			break
  2707  		}
  2708  		v.reset(OpS390XSLW)
  2709  		v.AddArg2(x, y)
  2710  		return true
  2711  	}
  2712  	// match: (Lsh16x32 <t> x y)
  2713  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2714  	for {
  2715  		t := v.Type
  2716  		x := v_0
  2717  		y := v_1
  2718  		v.reset(OpS390XLOCGR)
  2719  		v.Type = t
  2720  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2721  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2722  		v0.AddArg2(x, y)
  2723  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2724  		v1.AuxInt = int64ToAuxInt(0)
  2725  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2726  		v2.AuxInt = int32ToAuxInt(64)
  2727  		v2.AddArg(y)
  2728  		v.AddArg3(v0, v1, v2)
  2729  		return true
  2730  	}
  2731  }
  2732  func rewriteValueS390X_OpLsh16x64(v *Value) bool {
  2733  	v_1 := v.Args[1]
  2734  	v_0 := v.Args[0]
  2735  	b := v.Block
  2736  	typ := &b.Func.Config.Types
  2737  	// match: (Lsh16x64 x y)
  2738  	// cond: shiftIsBounded(v)
  2739  	// result: (SLW x y)
  2740  	for {
  2741  		x := v_0
  2742  		y := v_1
  2743  		if !(shiftIsBounded(v)) {
  2744  			break
  2745  		}
  2746  		v.reset(OpS390XSLW)
  2747  		v.AddArg2(x, y)
  2748  		return true
  2749  	}
  2750  	// match: (Lsh16x64 <t> x y)
  2751  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2752  	for {
  2753  		t := v.Type
  2754  		x := v_0
  2755  		y := v_1
  2756  		v.reset(OpS390XLOCGR)
  2757  		v.Type = t
  2758  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2759  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2760  		v0.AddArg2(x, y)
  2761  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2762  		v1.AuxInt = int64ToAuxInt(0)
  2763  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2764  		v2.AuxInt = int32ToAuxInt(64)
  2765  		v2.AddArg(y)
  2766  		v.AddArg3(v0, v1, v2)
  2767  		return true
  2768  	}
  2769  }
  2770  func rewriteValueS390X_OpLsh16x8(v *Value) bool {
  2771  	v_1 := v.Args[1]
  2772  	v_0 := v.Args[0]
  2773  	b := v.Block
  2774  	typ := &b.Func.Config.Types
  2775  	// match: (Lsh16x8 x y)
  2776  	// cond: shiftIsBounded(v)
  2777  	// result: (SLW x y)
  2778  	for {
  2779  		x := v_0
  2780  		y := v_1
  2781  		if !(shiftIsBounded(v)) {
  2782  			break
  2783  		}
  2784  		v.reset(OpS390XSLW)
  2785  		v.AddArg2(x, y)
  2786  		return true
  2787  	}
  2788  	// match: (Lsh16x8 <t> x y)
  2789  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2790  	for {
  2791  		t := v.Type
  2792  		x := v_0
  2793  		y := v_1
  2794  		v.reset(OpS390XLOCGR)
  2795  		v.Type = t
  2796  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2797  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2798  		v0.AddArg2(x, y)
  2799  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2800  		v1.AuxInt = int64ToAuxInt(0)
  2801  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2802  		v2.AuxInt = int32ToAuxInt(64)
  2803  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2804  		v3.AddArg(y)
  2805  		v2.AddArg(v3)
  2806  		v.AddArg3(v0, v1, v2)
  2807  		return true
  2808  	}
  2809  }
  2810  func rewriteValueS390X_OpLsh32x16(v *Value) bool {
  2811  	v_1 := v.Args[1]
  2812  	v_0 := v.Args[0]
  2813  	b := v.Block
  2814  	typ := &b.Func.Config.Types
  2815  	// match: (Lsh32x16 x y)
  2816  	// cond: shiftIsBounded(v)
  2817  	// result: (SLW x y)
  2818  	for {
  2819  		x := v_0
  2820  		y := v_1
  2821  		if !(shiftIsBounded(v)) {
  2822  			break
  2823  		}
  2824  		v.reset(OpS390XSLW)
  2825  		v.AddArg2(x, y)
  2826  		return true
  2827  	}
  2828  	// match: (Lsh32x16 <t> x y)
  2829  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2830  	for {
  2831  		t := v.Type
  2832  		x := v_0
  2833  		y := v_1
  2834  		v.reset(OpS390XLOCGR)
  2835  		v.Type = t
  2836  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2837  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2838  		v0.AddArg2(x, y)
  2839  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2840  		v1.AuxInt = int64ToAuxInt(0)
  2841  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2842  		v2.AuxInt = int32ToAuxInt(64)
  2843  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2844  		v3.AddArg(y)
  2845  		v2.AddArg(v3)
  2846  		v.AddArg3(v0, v1, v2)
  2847  		return true
  2848  	}
  2849  }
  2850  func rewriteValueS390X_OpLsh32x32(v *Value) bool {
  2851  	v_1 := v.Args[1]
  2852  	v_0 := v.Args[0]
  2853  	b := v.Block
  2854  	typ := &b.Func.Config.Types
  2855  	// match: (Lsh32x32 x y)
  2856  	// cond: shiftIsBounded(v)
  2857  	// result: (SLW x y)
  2858  	for {
  2859  		x := v_0
  2860  		y := v_1
  2861  		if !(shiftIsBounded(v)) {
  2862  			break
  2863  		}
  2864  		v.reset(OpS390XSLW)
  2865  		v.AddArg2(x, y)
  2866  		return true
  2867  	}
  2868  	// match: (Lsh32x32 <t> x y)
  2869  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2870  	for {
  2871  		t := v.Type
  2872  		x := v_0
  2873  		y := v_1
  2874  		v.reset(OpS390XLOCGR)
  2875  		v.Type = t
  2876  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2877  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2878  		v0.AddArg2(x, y)
  2879  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2880  		v1.AuxInt = int64ToAuxInt(0)
  2881  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2882  		v2.AuxInt = int32ToAuxInt(64)
  2883  		v2.AddArg(y)
  2884  		v.AddArg3(v0, v1, v2)
  2885  		return true
  2886  	}
  2887  }
  2888  func rewriteValueS390X_OpLsh32x64(v *Value) bool {
  2889  	v_1 := v.Args[1]
  2890  	v_0 := v.Args[0]
  2891  	b := v.Block
  2892  	typ := &b.Func.Config.Types
  2893  	// match: (Lsh32x64 x y)
  2894  	// cond: shiftIsBounded(v)
  2895  	// result: (SLW x y)
  2896  	for {
  2897  		x := v_0
  2898  		y := v_1
  2899  		if !(shiftIsBounded(v)) {
  2900  			break
  2901  		}
  2902  		v.reset(OpS390XSLW)
  2903  		v.AddArg2(x, y)
  2904  		return true
  2905  	}
  2906  	// match: (Lsh32x64 <t> x y)
  2907  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2908  	for {
  2909  		t := v.Type
  2910  		x := v_0
  2911  		y := v_1
  2912  		v.reset(OpS390XLOCGR)
  2913  		v.Type = t
  2914  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2915  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2916  		v0.AddArg2(x, y)
  2917  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2918  		v1.AuxInt = int64ToAuxInt(0)
  2919  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2920  		v2.AuxInt = int32ToAuxInt(64)
  2921  		v2.AddArg(y)
  2922  		v.AddArg3(v0, v1, v2)
  2923  		return true
  2924  	}
  2925  }
  2926  func rewriteValueS390X_OpLsh32x8(v *Value) bool {
  2927  	v_1 := v.Args[1]
  2928  	v_0 := v.Args[0]
  2929  	b := v.Block
  2930  	typ := &b.Func.Config.Types
  2931  	// match: (Lsh32x8 x y)
  2932  	// cond: shiftIsBounded(v)
  2933  	// result: (SLW x y)
  2934  	for {
  2935  		x := v_0
  2936  		y := v_1
  2937  		if !(shiftIsBounded(v)) {
  2938  			break
  2939  		}
  2940  		v.reset(OpS390XSLW)
  2941  		v.AddArg2(x, y)
  2942  		return true
  2943  	}
  2944  	// match: (Lsh32x8 <t> x y)
  2945  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2946  	for {
  2947  		t := v.Type
  2948  		x := v_0
  2949  		y := v_1
  2950  		v.reset(OpS390XLOCGR)
  2951  		v.Type = t
  2952  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2953  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2954  		v0.AddArg2(x, y)
  2955  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2956  		v1.AuxInt = int64ToAuxInt(0)
  2957  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2958  		v2.AuxInt = int32ToAuxInt(64)
  2959  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2960  		v3.AddArg(y)
  2961  		v2.AddArg(v3)
  2962  		v.AddArg3(v0, v1, v2)
  2963  		return true
  2964  	}
  2965  }
  2966  func rewriteValueS390X_OpLsh64x16(v *Value) bool {
  2967  	v_1 := v.Args[1]
  2968  	v_0 := v.Args[0]
  2969  	b := v.Block
  2970  	typ := &b.Func.Config.Types
  2971  	// match: (Lsh64x16 x y)
  2972  	// cond: shiftIsBounded(v)
  2973  	// result: (SLD x y)
  2974  	for {
  2975  		x := v_0
  2976  		y := v_1
  2977  		if !(shiftIsBounded(v)) {
  2978  			break
  2979  		}
  2980  		v.reset(OpS390XSLD)
  2981  		v.AddArg2(x, y)
  2982  		return true
  2983  	}
  2984  	// match: (Lsh64x16 <t> x y)
  2985  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2986  	for {
  2987  		t := v.Type
  2988  		x := v_0
  2989  		y := v_1
  2990  		v.reset(OpS390XLOCGR)
  2991  		v.Type = t
  2992  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2993  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2994  		v0.AddArg2(x, y)
  2995  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2996  		v1.AuxInt = int64ToAuxInt(0)
  2997  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2998  		v2.AuxInt = int32ToAuxInt(64)
  2999  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3000  		v3.AddArg(y)
  3001  		v2.AddArg(v3)
  3002  		v.AddArg3(v0, v1, v2)
  3003  		return true
  3004  	}
  3005  }
  3006  func rewriteValueS390X_OpLsh64x32(v *Value) bool {
  3007  	v_1 := v.Args[1]
  3008  	v_0 := v.Args[0]
  3009  	b := v.Block
  3010  	typ := &b.Func.Config.Types
  3011  	// match: (Lsh64x32 x y)
  3012  	// cond: shiftIsBounded(v)
  3013  	// result: (SLD x y)
  3014  	for {
  3015  		x := v_0
  3016  		y := v_1
  3017  		if !(shiftIsBounded(v)) {
  3018  			break
  3019  		}
  3020  		v.reset(OpS390XSLD)
  3021  		v.AddArg2(x, y)
  3022  		return true
  3023  	}
  3024  	// match: (Lsh64x32 <t> x y)
  3025  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3026  	for {
  3027  		t := v.Type
  3028  		x := v_0
  3029  		y := v_1
  3030  		v.reset(OpS390XLOCGR)
  3031  		v.Type = t
  3032  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3033  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3034  		v0.AddArg2(x, y)
  3035  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3036  		v1.AuxInt = int64ToAuxInt(0)
  3037  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3038  		v2.AuxInt = int32ToAuxInt(64)
  3039  		v2.AddArg(y)
  3040  		v.AddArg3(v0, v1, v2)
  3041  		return true
  3042  	}
  3043  }
  3044  func rewriteValueS390X_OpLsh64x64(v *Value) bool {
  3045  	v_1 := v.Args[1]
  3046  	v_0 := v.Args[0]
  3047  	b := v.Block
  3048  	typ := &b.Func.Config.Types
  3049  	// match: (Lsh64x64 x y)
  3050  	// cond: shiftIsBounded(v)
  3051  	// result: (SLD x y)
  3052  	for {
  3053  		x := v_0
  3054  		y := v_1
  3055  		if !(shiftIsBounded(v)) {
  3056  			break
  3057  		}
  3058  		v.reset(OpS390XSLD)
  3059  		v.AddArg2(x, y)
  3060  		return true
  3061  	}
  3062  	// match: (Lsh64x64 <t> x y)
  3063  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3064  	for {
  3065  		t := v.Type
  3066  		x := v_0
  3067  		y := v_1
  3068  		v.reset(OpS390XLOCGR)
  3069  		v.Type = t
  3070  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3071  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3072  		v0.AddArg2(x, y)
  3073  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3074  		v1.AuxInt = int64ToAuxInt(0)
  3075  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  3076  		v2.AuxInt = int32ToAuxInt(64)
  3077  		v2.AddArg(y)
  3078  		v.AddArg3(v0, v1, v2)
  3079  		return true
  3080  	}
  3081  }
  3082  func rewriteValueS390X_OpLsh64x8(v *Value) bool {
  3083  	v_1 := v.Args[1]
  3084  	v_0 := v.Args[0]
  3085  	b := v.Block
  3086  	typ := &b.Func.Config.Types
  3087  	// match: (Lsh64x8 x y)
  3088  	// cond: shiftIsBounded(v)
  3089  	// result: (SLD x y)
  3090  	for {
  3091  		x := v_0
  3092  		y := v_1
  3093  		if !(shiftIsBounded(v)) {
  3094  			break
  3095  		}
  3096  		v.reset(OpS390XSLD)
  3097  		v.AddArg2(x, y)
  3098  		return true
  3099  	}
  3100  	// match: (Lsh64x8 <t> x y)
  3101  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3102  	for {
  3103  		t := v.Type
  3104  		x := v_0
  3105  		y := v_1
  3106  		v.reset(OpS390XLOCGR)
  3107  		v.Type = t
  3108  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3109  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3110  		v0.AddArg2(x, y)
  3111  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3112  		v1.AuxInt = int64ToAuxInt(0)
  3113  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3114  		v2.AuxInt = int32ToAuxInt(64)
  3115  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3116  		v3.AddArg(y)
  3117  		v2.AddArg(v3)
  3118  		v.AddArg3(v0, v1, v2)
  3119  		return true
  3120  	}
  3121  }
  3122  func rewriteValueS390X_OpLsh8x16(v *Value) bool {
  3123  	v_1 := v.Args[1]
  3124  	v_0 := v.Args[0]
  3125  	b := v.Block
  3126  	typ := &b.Func.Config.Types
  3127  	// match: (Lsh8x16 x y)
  3128  	// cond: shiftIsBounded(v)
  3129  	// result: (SLW x y)
  3130  	for {
  3131  		x := v_0
  3132  		y := v_1
  3133  		if !(shiftIsBounded(v)) {
  3134  			break
  3135  		}
  3136  		v.reset(OpS390XSLW)
  3137  		v.AddArg2(x, y)
  3138  		return true
  3139  	}
  3140  	// match: (Lsh8x16 <t> x y)
  3141  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  3142  	for {
  3143  		t := v.Type
  3144  		x := v_0
  3145  		y := v_1
  3146  		v.reset(OpS390XLOCGR)
  3147  		v.Type = t
  3148  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3149  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3150  		v0.AddArg2(x, y)
  3151  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3152  		v1.AuxInt = int64ToAuxInt(0)
  3153  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3154  		v2.AuxInt = int32ToAuxInt(64)
  3155  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3156  		v3.AddArg(y)
  3157  		v2.AddArg(v3)
  3158  		v.AddArg3(v0, v1, v2)
  3159  		return true
  3160  	}
  3161  }
  3162  func rewriteValueS390X_OpLsh8x32(v *Value) bool {
  3163  	v_1 := v.Args[1]
  3164  	v_0 := v.Args[0]
  3165  	b := v.Block
  3166  	typ := &b.Func.Config.Types
  3167  	// match: (Lsh8x32 x y)
  3168  	// cond: shiftIsBounded(v)
  3169  	// result: (SLW x y)
  3170  	for {
  3171  		x := v_0
  3172  		y := v_1
  3173  		if !(shiftIsBounded(v)) {
  3174  			break
  3175  		}
  3176  		v.reset(OpS390XSLW)
  3177  		v.AddArg2(x, y)
  3178  		return true
  3179  	}
  3180  	// match: (Lsh8x32 <t> x y)
  3181  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3182  	for {
  3183  		t := v.Type
  3184  		x := v_0
  3185  		y := v_1
  3186  		v.reset(OpS390XLOCGR)
  3187  		v.Type = t
  3188  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3189  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3190  		v0.AddArg2(x, y)
  3191  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3192  		v1.AuxInt = int64ToAuxInt(0)
  3193  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3194  		v2.AuxInt = int32ToAuxInt(64)
  3195  		v2.AddArg(y)
  3196  		v.AddArg3(v0, v1, v2)
  3197  		return true
  3198  	}
  3199  }
  3200  func rewriteValueS390X_OpLsh8x64(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: (Lsh8x64 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(OpS390XSLW)
  3215  		v.AddArg2(x, y)
  3216  		return true
  3217  	}
  3218  	// match: (Lsh8x64 <t> x y)
  3219  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3220  	for {
  3221  		t := v.Type
  3222  		x := v_0
  3223  		y := v_1
  3224  		v.reset(OpS390XLOCGR)
  3225  		v.Type = t
  3226  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3227  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3228  		v0.AddArg2(x, y)
  3229  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3230  		v1.AuxInt = int64ToAuxInt(0)
  3231  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  3232  		v2.AuxInt = int32ToAuxInt(64)
  3233  		v2.AddArg(y)
  3234  		v.AddArg3(v0, v1, v2)
  3235  		return true
  3236  	}
  3237  }
  3238  func rewriteValueS390X_OpLsh8x8(v *Value) bool {
  3239  	v_1 := v.Args[1]
  3240  	v_0 := v.Args[0]
  3241  	b := v.Block
  3242  	typ := &b.Func.Config.Types
  3243  	// match: (Lsh8x8 x y)
  3244  	// cond: shiftIsBounded(v)
  3245  	// result: (SLW x y)
  3246  	for {
  3247  		x := v_0
  3248  		y := v_1
  3249  		if !(shiftIsBounded(v)) {
  3250  			break
  3251  		}
  3252  		v.reset(OpS390XSLW)
  3253  		v.AddArg2(x, y)
  3254  		return true
  3255  	}
  3256  	// match: (Lsh8x8 <t> x y)
  3257  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3258  	for {
  3259  		t := v.Type
  3260  		x := v_0
  3261  		y := v_1
  3262  		v.reset(OpS390XLOCGR)
  3263  		v.Type = t
  3264  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3265  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3266  		v0.AddArg2(x, y)
  3267  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3268  		v1.AuxInt = int64ToAuxInt(0)
  3269  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3270  		v2.AuxInt = int32ToAuxInt(64)
  3271  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3272  		v3.AddArg(y)
  3273  		v2.AddArg(v3)
  3274  		v.AddArg3(v0, v1, v2)
  3275  		return true
  3276  	}
  3277  }
  3278  func rewriteValueS390X_OpMod16(v *Value) bool {
  3279  	v_1 := v.Args[1]
  3280  	v_0 := v.Args[0]
  3281  	b := v.Block
  3282  	typ := &b.Func.Config.Types
  3283  	// match: (Mod16 x y)
  3284  	// result: (MODW (MOVHreg x) (MOVHreg y))
  3285  	for {
  3286  		x := v_0
  3287  		y := v_1
  3288  		v.reset(OpS390XMODW)
  3289  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3290  		v0.AddArg(x)
  3291  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3292  		v1.AddArg(y)
  3293  		v.AddArg2(v0, v1)
  3294  		return true
  3295  	}
  3296  }
  3297  func rewriteValueS390X_OpMod16u(v *Value) bool {
  3298  	v_1 := v.Args[1]
  3299  	v_0 := v.Args[0]
  3300  	b := v.Block
  3301  	typ := &b.Func.Config.Types
  3302  	// match: (Mod16u x y)
  3303  	// result: (MODWU (MOVHZreg x) (MOVHZreg y))
  3304  	for {
  3305  		x := v_0
  3306  		y := v_1
  3307  		v.reset(OpS390XMODWU)
  3308  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3309  		v0.AddArg(x)
  3310  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3311  		v1.AddArg(y)
  3312  		v.AddArg2(v0, v1)
  3313  		return true
  3314  	}
  3315  }
  3316  func rewriteValueS390X_OpMod32(v *Value) bool {
  3317  	v_1 := v.Args[1]
  3318  	v_0 := v.Args[0]
  3319  	b := v.Block
  3320  	typ := &b.Func.Config.Types
  3321  	// match: (Mod32 x y)
  3322  	// result: (MODW (MOVWreg x) y)
  3323  	for {
  3324  		x := v_0
  3325  		y := v_1
  3326  		v.reset(OpS390XMODW)
  3327  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  3328  		v0.AddArg(x)
  3329  		v.AddArg2(v0, y)
  3330  		return true
  3331  	}
  3332  }
  3333  func rewriteValueS390X_OpMod32u(v *Value) bool {
  3334  	v_1 := v.Args[1]
  3335  	v_0 := v.Args[0]
  3336  	b := v.Block
  3337  	typ := &b.Func.Config.Types
  3338  	// match: (Mod32u x y)
  3339  	// result: (MODWU (MOVWZreg x) y)
  3340  	for {
  3341  		x := v_0
  3342  		y := v_1
  3343  		v.reset(OpS390XMODWU)
  3344  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  3345  		v0.AddArg(x)
  3346  		v.AddArg2(v0, y)
  3347  		return true
  3348  	}
  3349  }
  3350  func rewriteValueS390X_OpMod64(v *Value) bool {
  3351  	v_1 := v.Args[1]
  3352  	v_0 := v.Args[0]
  3353  	// match: (Mod64 x y)
  3354  	// result: (MODD x y)
  3355  	for {
  3356  		x := v_0
  3357  		y := v_1
  3358  		v.reset(OpS390XMODD)
  3359  		v.AddArg2(x, y)
  3360  		return true
  3361  	}
  3362  }
  3363  func rewriteValueS390X_OpMod8(v *Value) bool {
  3364  	v_1 := v.Args[1]
  3365  	v_0 := v.Args[0]
  3366  	b := v.Block
  3367  	typ := &b.Func.Config.Types
  3368  	// match: (Mod8 x y)
  3369  	// result: (MODW (MOVBreg x) (MOVBreg y))
  3370  	for {
  3371  		x := v_0
  3372  		y := v_1
  3373  		v.reset(OpS390XMODW)
  3374  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3375  		v0.AddArg(x)
  3376  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3377  		v1.AddArg(y)
  3378  		v.AddArg2(v0, v1)
  3379  		return true
  3380  	}
  3381  }
  3382  func rewriteValueS390X_OpMod8u(v *Value) bool {
  3383  	v_1 := v.Args[1]
  3384  	v_0 := v.Args[0]
  3385  	b := v.Block
  3386  	typ := &b.Func.Config.Types
  3387  	// match: (Mod8u x y)
  3388  	// result: (MODWU (MOVBZreg x) (MOVBZreg y))
  3389  	for {
  3390  		x := v_0
  3391  		y := v_1
  3392  		v.reset(OpS390XMODWU)
  3393  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3394  		v0.AddArg(x)
  3395  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3396  		v1.AddArg(y)
  3397  		v.AddArg2(v0, v1)
  3398  		return true
  3399  	}
  3400  }
  3401  func rewriteValueS390X_OpMove(v *Value) bool {
  3402  	v_2 := v.Args[2]
  3403  	v_1 := v.Args[1]
  3404  	v_0 := v.Args[0]
  3405  	b := v.Block
  3406  	typ := &b.Func.Config.Types
  3407  	// match: (Move [0] _ _ mem)
  3408  	// result: mem
  3409  	for {
  3410  		if auxIntToInt64(v.AuxInt) != 0 {
  3411  			break
  3412  		}
  3413  		mem := v_2
  3414  		v.copyOf(mem)
  3415  		return true
  3416  	}
  3417  	// match: (Move [1] dst src mem)
  3418  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3419  	for {
  3420  		if auxIntToInt64(v.AuxInt) != 1 {
  3421  			break
  3422  		}
  3423  		dst := v_0
  3424  		src := v_1
  3425  		mem := v_2
  3426  		v.reset(OpS390XMOVBstore)
  3427  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3428  		v0.AddArg2(src, mem)
  3429  		v.AddArg3(dst, v0, mem)
  3430  		return true
  3431  	}
  3432  	// match: (Move [2] dst src mem)
  3433  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3434  	for {
  3435  		if auxIntToInt64(v.AuxInt) != 2 {
  3436  			break
  3437  		}
  3438  		dst := v_0
  3439  		src := v_1
  3440  		mem := v_2
  3441  		v.reset(OpS390XMOVHstore)
  3442  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3443  		v0.AddArg2(src, mem)
  3444  		v.AddArg3(dst, v0, mem)
  3445  		return true
  3446  	}
  3447  	// match: (Move [4] dst src mem)
  3448  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3449  	for {
  3450  		if auxIntToInt64(v.AuxInt) != 4 {
  3451  			break
  3452  		}
  3453  		dst := v_0
  3454  		src := v_1
  3455  		mem := v_2
  3456  		v.reset(OpS390XMOVWstore)
  3457  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3458  		v0.AddArg2(src, mem)
  3459  		v.AddArg3(dst, v0, mem)
  3460  		return true
  3461  	}
  3462  	// match: (Move [8] dst src mem)
  3463  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3464  	for {
  3465  		if auxIntToInt64(v.AuxInt) != 8 {
  3466  			break
  3467  		}
  3468  		dst := v_0
  3469  		src := v_1
  3470  		mem := v_2
  3471  		v.reset(OpS390XMOVDstore)
  3472  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3473  		v0.AddArg2(src, mem)
  3474  		v.AddArg3(dst, v0, mem)
  3475  		return true
  3476  	}
  3477  	// match: (Move [16] dst src mem)
  3478  	// result: (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
  3479  	for {
  3480  		if auxIntToInt64(v.AuxInt) != 16 {
  3481  			break
  3482  		}
  3483  		dst := v_0
  3484  		src := v_1
  3485  		mem := v_2
  3486  		v.reset(OpS390XMOVDstore)
  3487  		v.AuxInt = int32ToAuxInt(8)
  3488  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3489  		v0.AuxInt = int32ToAuxInt(8)
  3490  		v0.AddArg2(src, mem)
  3491  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3492  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3493  		v2.AddArg2(src, mem)
  3494  		v1.AddArg3(dst, v2, mem)
  3495  		v.AddArg3(dst, v0, v1)
  3496  		return true
  3497  	}
  3498  	// match: (Move [24] dst src mem)
  3499  	// result: (MOVDstore [16] dst (MOVDload [16] src mem) (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem)))
  3500  	for {
  3501  		if auxIntToInt64(v.AuxInt) != 24 {
  3502  			break
  3503  		}
  3504  		dst := v_0
  3505  		src := v_1
  3506  		mem := v_2
  3507  		v.reset(OpS390XMOVDstore)
  3508  		v.AuxInt = int32ToAuxInt(16)
  3509  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3510  		v0.AuxInt = int32ToAuxInt(16)
  3511  		v0.AddArg2(src, mem)
  3512  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3513  		v1.AuxInt = int32ToAuxInt(8)
  3514  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3515  		v2.AuxInt = int32ToAuxInt(8)
  3516  		v2.AddArg2(src, mem)
  3517  		v3 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3518  		v4 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3519  		v4.AddArg2(src, mem)
  3520  		v3.AddArg3(dst, v4, mem)
  3521  		v1.AddArg3(dst, v2, v3)
  3522  		v.AddArg3(dst, v0, v1)
  3523  		return true
  3524  	}
  3525  	// match: (Move [3] dst src mem)
  3526  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHZload src mem) mem))
  3527  	for {
  3528  		if auxIntToInt64(v.AuxInt) != 3 {
  3529  			break
  3530  		}
  3531  		dst := v_0
  3532  		src := v_1
  3533  		mem := v_2
  3534  		v.reset(OpS390XMOVBstore)
  3535  		v.AuxInt = int32ToAuxInt(2)
  3536  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3537  		v0.AuxInt = int32ToAuxInt(2)
  3538  		v0.AddArg2(src, mem)
  3539  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3540  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3541  		v2.AddArg2(src, mem)
  3542  		v1.AddArg3(dst, v2, mem)
  3543  		v.AddArg3(dst, v0, v1)
  3544  		return true
  3545  	}
  3546  	// match: (Move [5] dst src mem)
  3547  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3548  	for {
  3549  		if auxIntToInt64(v.AuxInt) != 5 {
  3550  			break
  3551  		}
  3552  		dst := v_0
  3553  		src := v_1
  3554  		mem := v_2
  3555  		v.reset(OpS390XMOVBstore)
  3556  		v.AuxInt = int32ToAuxInt(4)
  3557  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3558  		v0.AuxInt = int32ToAuxInt(4)
  3559  		v0.AddArg2(src, mem)
  3560  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3561  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3562  		v2.AddArg2(src, mem)
  3563  		v1.AddArg3(dst, v2, mem)
  3564  		v.AddArg3(dst, v0, v1)
  3565  		return true
  3566  	}
  3567  	// match: (Move [6] dst src mem)
  3568  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3569  	for {
  3570  		if auxIntToInt64(v.AuxInt) != 6 {
  3571  			break
  3572  		}
  3573  		dst := v_0
  3574  		src := v_1
  3575  		mem := v_2
  3576  		v.reset(OpS390XMOVHstore)
  3577  		v.AuxInt = int32ToAuxInt(4)
  3578  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3579  		v0.AuxInt = int32ToAuxInt(4)
  3580  		v0.AddArg2(src, mem)
  3581  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3582  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3583  		v2.AddArg2(src, mem)
  3584  		v1.AddArg3(dst, v2, mem)
  3585  		v.AddArg3(dst, v0, v1)
  3586  		return true
  3587  	}
  3588  	// match: (Move [7] dst src mem)
  3589  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3590  	for {
  3591  		if auxIntToInt64(v.AuxInt) != 7 {
  3592  			break
  3593  		}
  3594  		dst := v_0
  3595  		src := v_1
  3596  		mem := v_2
  3597  		v.reset(OpS390XMOVBstore)
  3598  		v.AuxInt = int32ToAuxInt(6)
  3599  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3600  		v0.AuxInt = int32ToAuxInt(6)
  3601  		v0.AddArg2(src, mem)
  3602  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3603  		v1.AuxInt = int32ToAuxInt(4)
  3604  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3605  		v2.AuxInt = int32ToAuxInt(4)
  3606  		v2.AddArg2(src, mem)
  3607  		v3 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3608  		v4 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3609  		v4.AddArg2(src, mem)
  3610  		v3.AddArg3(dst, v4, mem)
  3611  		v1.AddArg3(dst, v2, v3)
  3612  		v.AddArg3(dst, v0, v1)
  3613  		return true
  3614  	}
  3615  	// match: (Move [s] dst src mem)
  3616  	// cond: s > 0 && s <= 256 && logLargeCopy(v, s)
  3617  	// result: (MVC [makeValAndOff(int32(s), 0)] dst src mem)
  3618  	for {
  3619  		s := auxIntToInt64(v.AuxInt)
  3620  		dst := v_0
  3621  		src := v_1
  3622  		mem := v_2
  3623  		if !(s > 0 && s <= 256 && logLargeCopy(v, s)) {
  3624  			break
  3625  		}
  3626  		v.reset(OpS390XMVC)
  3627  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s), 0))
  3628  		v.AddArg3(dst, src, mem)
  3629  		return true
  3630  	}
  3631  	// match: (Move [s] dst src mem)
  3632  	// cond: s > 256 && s <= 512 && logLargeCopy(v, s)
  3633  	// result: (MVC [makeValAndOff(int32(s)-256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem))
  3634  	for {
  3635  		s := auxIntToInt64(v.AuxInt)
  3636  		dst := v_0
  3637  		src := v_1
  3638  		mem := v_2
  3639  		if !(s > 256 && s <= 512 && logLargeCopy(v, s)) {
  3640  			break
  3641  		}
  3642  		v.reset(OpS390XMVC)
  3643  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-256, 256))
  3644  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3645  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3646  		v0.AddArg3(dst, src, mem)
  3647  		v.AddArg3(dst, src, v0)
  3648  		return true
  3649  	}
  3650  	// match: (Move [s] dst src mem)
  3651  	// cond: s > 512 && s <= 768 && logLargeCopy(v, s)
  3652  	// result: (MVC [makeValAndOff(int32(s)-512, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem)))
  3653  	for {
  3654  		s := auxIntToInt64(v.AuxInt)
  3655  		dst := v_0
  3656  		src := v_1
  3657  		mem := v_2
  3658  		if !(s > 512 && s <= 768 && logLargeCopy(v, s)) {
  3659  			break
  3660  		}
  3661  		v.reset(OpS390XMVC)
  3662  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-512, 512))
  3663  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3664  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 256))
  3665  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3666  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3667  		v1.AddArg3(dst, src, mem)
  3668  		v0.AddArg3(dst, src, v1)
  3669  		v.AddArg3(dst, src, v0)
  3670  		return true
  3671  	}
  3672  	// match: (Move [s] dst src mem)
  3673  	// cond: s > 768 && s <= 1024 && logLargeCopy(v, s)
  3674  	// result: (MVC [makeValAndOff(int32(s)-768, 768)] dst src (MVC [makeValAndOff(256, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem))))
  3675  	for {
  3676  		s := auxIntToInt64(v.AuxInt)
  3677  		dst := v_0
  3678  		src := v_1
  3679  		mem := v_2
  3680  		if !(s > 768 && s <= 1024 && logLargeCopy(v, s)) {
  3681  			break
  3682  		}
  3683  		v.reset(OpS390XMVC)
  3684  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-768, 768))
  3685  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3686  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 512))
  3687  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3688  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 256))
  3689  		v2 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3690  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3691  		v2.AddArg3(dst, src, mem)
  3692  		v1.AddArg3(dst, src, v2)
  3693  		v0.AddArg3(dst, src, v1)
  3694  		v.AddArg3(dst, src, v0)
  3695  		return true
  3696  	}
  3697  	// match: (Move [s] dst src mem)
  3698  	// cond: s > 1024 && logLargeCopy(v, s)
  3699  	// result: (LoweredMove [s%256] dst src (ADD <src.Type> src (MOVDconst [(s/256)*256])) mem)
  3700  	for {
  3701  		s := auxIntToInt64(v.AuxInt)
  3702  		dst := v_0
  3703  		src := v_1
  3704  		mem := v_2
  3705  		if !(s > 1024 && logLargeCopy(v, s)) {
  3706  			break
  3707  		}
  3708  		v.reset(OpS390XLoweredMove)
  3709  		v.AuxInt = int64ToAuxInt(s % 256)
  3710  		v0 := b.NewValue0(v.Pos, OpS390XADD, src.Type)
  3711  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3712  		v1.AuxInt = int64ToAuxInt((s / 256) * 256)
  3713  		v0.AddArg2(src, v1)
  3714  		v.AddArg4(dst, src, v0, mem)
  3715  		return true
  3716  	}
  3717  	return false
  3718  }
  3719  func rewriteValueS390X_OpNeq16(v *Value) bool {
  3720  	v_1 := v.Args[1]
  3721  	v_0 := v.Args[0]
  3722  	b := v.Block
  3723  	typ := &b.Func.Config.Types
  3724  	// match: (Neq16 x y)
  3725  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  3726  	for {
  3727  		x := v_0
  3728  		y := v_1
  3729  		v.reset(OpS390XLOCGR)
  3730  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3731  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3732  		v0.AuxInt = int64ToAuxInt(0)
  3733  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3734  		v1.AuxInt = int64ToAuxInt(1)
  3735  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3736  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3737  		v3.AddArg(x)
  3738  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3739  		v4.AddArg(y)
  3740  		v2.AddArg2(v3, v4)
  3741  		v.AddArg3(v0, v1, v2)
  3742  		return true
  3743  	}
  3744  }
  3745  func rewriteValueS390X_OpNeq32(v *Value) bool {
  3746  	v_1 := v.Args[1]
  3747  	v_0 := v.Args[0]
  3748  	b := v.Block
  3749  	typ := &b.Func.Config.Types
  3750  	// match: (Neq32 x y)
  3751  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  3752  	for {
  3753  		x := v_0
  3754  		y := v_1
  3755  		v.reset(OpS390XLOCGR)
  3756  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3757  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3758  		v0.AuxInt = int64ToAuxInt(0)
  3759  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3760  		v1.AuxInt = int64ToAuxInt(1)
  3761  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3762  		v2.AddArg2(x, y)
  3763  		v.AddArg3(v0, v1, v2)
  3764  		return true
  3765  	}
  3766  }
  3767  func rewriteValueS390X_OpNeq32F(v *Value) bool {
  3768  	v_1 := v.Args[1]
  3769  	v_0 := v.Args[0]
  3770  	b := v.Block
  3771  	typ := &b.Func.Config.Types
  3772  	// match: (Neq32F x y)
  3773  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  3774  	for {
  3775  		x := v_0
  3776  		y := v_1
  3777  		v.reset(OpS390XLOCGR)
  3778  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3779  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3780  		v0.AuxInt = int64ToAuxInt(0)
  3781  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3782  		v1.AuxInt = int64ToAuxInt(1)
  3783  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  3784  		v2.AddArg2(x, y)
  3785  		v.AddArg3(v0, v1, v2)
  3786  		return true
  3787  	}
  3788  }
  3789  func rewriteValueS390X_OpNeq64(v *Value) bool {
  3790  	v_1 := v.Args[1]
  3791  	v_0 := v.Args[0]
  3792  	b := v.Block
  3793  	typ := &b.Func.Config.Types
  3794  	// match: (Neq64 x y)
  3795  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3796  	for {
  3797  		x := v_0
  3798  		y := v_1
  3799  		v.reset(OpS390XLOCGR)
  3800  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3801  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3802  		v0.AuxInt = int64ToAuxInt(0)
  3803  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3804  		v1.AuxInt = int64ToAuxInt(1)
  3805  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3806  		v2.AddArg2(x, y)
  3807  		v.AddArg3(v0, v1, v2)
  3808  		return true
  3809  	}
  3810  }
  3811  func rewriteValueS390X_OpNeq64F(v *Value) bool {
  3812  	v_1 := v.Args[1]
  3813  	v_0 := v.Args[0]
  3814  	b := v.Block
  3815  	typ := &b.Func.Config.Types
  3816  	// match: (Neq64F x y)
  3817  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  3818  	for {
  3819  		x := v_0
  3820  		y := v_1
  3821  		v.reset(OpS390XLOCGR)
  3822  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3823  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3824  		v0.AuxInt = int64ToAuxInt(0)
  3825  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3826  		v1.AuxInt = int64ToAuxInt(1)
  3827  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  3828  		v2.AddArg2(x, y)
  3829  		v.AddArg3(v0, v1, v2)
  3830  		return true
  3831  	}
  3832  }
  3833  func rewriteValueS390X_OpNeq8(v *Value) bool {
  3834  	v_1 := v.Args[1]
  3835  	v_0 := v.Args[0]
  3836  	b := v.Block
  3837  	typ := &b.Func.Config.Types
  3838  	// match: (Neq8 x y)
  3839  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3840  	for {
  3841  		x := v_0
  3842  		y := v_1
  3843  		v.reset(OpS390XLOCGR)
  3844  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3845  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3846  		v0.AuxInt = int64ToAuxInt(0)
  3847  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3848  		v1.AuxInt = int64ToAuxInt(1)
  3849  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3850  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3851  		v3.AddArg(x)
  3852  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3853  		v4.AddArg(y)
  3854  		v2.AddArg2(v3, v4)
  3855  		v.AddArg3(v0, v1, v2)
  3856  		return true
  3857  	}
  3858  }
  3859  func rewriteValueS390X_OpNeqB(v *Value) bool {
  3860  	v_1 := v.Args[1]
  3861  	v_0 := v.Args[0]
  3862  	b := v.Block
  3863  	typ := &b.Func.Config.Types
  3864  	// match: (NeqB x y)
  3865  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3866  	for {
  3867  		x := v_0
  3868  		y := v_1
  3869  		v.reset(OpS390XLOCGR)
  3870  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3871  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3872  		v0.AuxInt = int64ToAuxInt(0)
  3873  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3874  		v1.AuxInt = int64ToAuxInt(1)
  3875  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3876  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3877  		v3.AddArg(x)
  3878  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3879  		v4.AddArg(y)
  3880  		v2.AddArg2(v3, v4)
  3881  		v.AddArg3(v0, v1, v2)
  3882  		return true
  3883  	}
  3884  }
  3885  func rewriteValueS390X_OpNeqPtr(v *Value) bool {
  3886  	v_1 := v.Args[1]
  3887  	v_0 := v.Args[0]
  3888  	b := v.Block
  3889  	typ := &b.Func.Config.Types
  3890  	// match: (NeqPtr x y)
  3891  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3892  	for {
  3893  		x := v_0
  3894  		y := v_1
  3895  		v.reset(OpS390XLOCGR)
  3896  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3897  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3898  		v0.AuxInt = int64ToAuxInt(0)
  3899  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3900  		v1.AuxInt = int64ToAuxInt(1)
  3901  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3902  		v2.AddArg2(x, y)
  3903  		v.AddArg3(v0, v1, v2)
  3904  		return true
  3905  	}
  3906  }
  3907  func rewriteValueS390X_OpNot(v *Value) bool {
  3908  	v_0 := v.Args[0]
  3909  	// match: (Not x)
  3910  	// result: (XORWconst [1] x)
  3911  	for {
  3912  		x := v_0
  3913  		v.reset(OpS390XXORWconst)
  3914  		v.AuxInt = int32ToAuxInt(1)
  3915  		v.AddArg(x)
  3916  		return true
  3917  	}
  3918  }
  3919  func rewriteValueS390X_OpOffPtr(v *Value) bool {
  3920  	v_0 := v.Args[0]
  3921  	b := v.Block
  3922  	typ := &b.Func.Config.Types
  3923  	// match: (OffPtr [off] ptr:(SP))
  3924  	// result: (MOVDaddr [int32(off)] ptr)
  3925  	for {
  3926  		off := auxIntToInt64(v.AuxInt)
  3927  		ptr := v_0
  3928  		if ptr.Op != OpSP {
  3929  			break
  3930  		}
  3931  		v.reset(OpS390XMOVDaddr)
  3932  		v.AuxInt = int32ToAuxInt(int32(off))
  3933  		v.AddArg(ptr)
  3934  		return true
  3935  	}
  3936  	// match: (OffPtr [off] ptr)
  3937  	// cond: is32Bit(off)
  3938  	// result: (ADDconst [int32(off)] ptr)
  3939  	for {
  3940  		off := auxIntToInt64(v.AuxInt)
  3941  		ptr := v_0
  3942  		if !(is32Bit(off)) {
  3943  			break
  3944  		}
  3945  		v.reset(OpS390XADDconst)
  3946  		v.AuxInt = int32ToAuxInt(int32(off))
  3947  		v.AddArg(ptr)
  3948  		return true
  3949  	}
  3950  	// match: (OffPtr [off] ptr)
  3951  	// result: (ADD (MOVDconst [off]) ptr)
  3952  	for {
  3953  		off := auxIntToInt64(v.AuxInt)
  3954  		ptr := v_0
  3955  		v.reset(OpS390XADD)
  3956  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3957  		v0.AuxInt = int64ToAuxInt(off)
  3958  		v.AddArg2(v0, ptr)
  3959  		return true
  3960  	}
  3961  }
  3962  func rewriteValueS390X_OpPanicBounds(v *Value) bool {
  3963  	v_2 := v.Args[2]
  3964  	v_1 := v.Args[1]
  3965  	v_0 := v.Args[0]
  3966  	// match: (PanicBounds [kind] x y mem)
  3967  	// cond: boundsABI(kind) == 0
  3968  	// result: (LoweredPanicBoundsA [kind] x y mem)
  3969  	for {
  3970  		kind := auxIntToInt64(v.AuxInt)
  3971  		x := v_0
  3972  		y := v_1
  3973  		mem := v_2
  3974  		if !(boundsABI(kind) == 0) {
  3975  			break
  3976  		}
  3977  		v.reset(OpS390XLoweredPanicBoundsA)
  3978  		v.AuxInt = int64ToAuxInt(kind)
  3979  		v.AddArg3(x, y, mem)
  3980  		return true
  3981  	}
  3982  	// match: (PanicBounds [kind] x y mem)
  3983  	// cond: boundsABI(kind) == 1
  3984  	// result: (LoweredPanicBoundsB [kind] x y mem)
  3985  	for {
  3986  		kind := auxIntToInt64(v.AuxInt)
  3987  		x := v_0
  3988  		y := v_1
  3989  		mem := v_2
  3990  		if !(boundsABI(kind) == 1) {
  3991  			break
  3992  		}
  3993  		v.reset(OpS390XLoweredPanicBoundsB)
  3994  		v.AuxInt = int64ToAuxInt(kind)
  3995  		v.AddArg3(x, y, mem)
  3996  		return true
  3997  	}
  3998  	// match: (PanicBounds [kind] x y mem)
  3999  	// cond: boundsABI(kind) == 2
  4000  	// result: (LoweredPanicBoundsC [kind] x y mem)
  4001  	for {
  4002  		kind := auxIntToInt64(v.AuxInt)
  4003  		x := v_0
  4004  		y := v_1
  4005  		mem := v_2
  4006  		if !(boundsABI(kind) == 2) {
  4007  			break
  4008  		}
  4009  		v.reset(OpS390XLoweredPanicBoundsC)
  4010  		v.AuxInt = int64ToAuxInt(kind)
  4011  		v.AddArg3(x, y, mem)
  4012  		return true
  4013  	}
  4014  	return false
  4015  }
  4016  func rewriteValueS390X_OpPopCount16(v *Value) bool {
  4017  	v_0 := v.Args[0]
  4018  	b := v.Block
  4019  	typ := &b.Func.Config.Types
  4020  	// match: (PopCount16 x)
  4021  	// result: (MOVBZreg (SumBytes2 (POPCNT <typ.UInt16> x)))
  4022  	for {
  4023  		x := v_0
  4024  		v.reset(OpS390XMOVBZreg)
  4025  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes2, typ.UInt8)
  4026  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt16)
  4027  		v1.AddArg(x)
  4028  		v0.AddArg(v1)
  4029  		v.AddArg(v0)
  4030  		return true
  4031  	}
  4032  }
  4033  func rewriteValueS390X_OpPopCount32(v *Value) bool {
  4034  	v_0 := v.Args[0]
  4035  	b := v.Block
  4036  	typ := &b.Func.Config.Types
  4037  	// match: (PopCount32 x)
  4038  	// result: (MOVBZreg (SumBytes4 (POPCNT <typ.UInt32> x)))
  4039  	for {
  4040  		x := v_0
  4041  		v.reset(OpS390XMOVBZreg)
  4042  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes4, typ.UInt8)
  4043  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt32)
  4044  		v1.AddArg(x)
  4045  		v0.AddArg(v1)
  4046  		v.AddArg(v0)
  4047  		return true
  4048  	}
  4049  }
  4050  func rewriteValueS390X_OpPopCount64(v *Value) bool {
  4051  	v_0 := v.Args[0]
  4052  	b := v.Block
  4053  	typ := &b.Func.Config.Types
  4054  	// match: (PopCount64 x)
  4055  	// result: (MOVBZreg (SumBytes8 (POPCNT <typ.UInt64> x)))
  4056  	for {
  4057  		x := v_0
  4058  		v.reset(OpS390XMOVBZreg)
  4059  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes8, typ.UInt8)
  4060  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt64)
  4061  		v1.AddArg(x)
  4062  		v0.AddArg(v1)
  4063  		v.AddArg(v0)
  4064  		return true
  4065  	}
  4066  }
  4067  func rewriteValueS390X_OpPopCount8(v *Value) bool {
  4068  	v_0 := v.Args[0]
  4069  	b := v.Block
  4070  	typ := &b.Func.Config.Types
  4071  	// match: (PopCount8 x)
  4072  	// result: (POPCNT (MOVBZreg x))
  4073  	for {
  4074  		x := v_0
  4075  		v.reset(OpS390XPOPCNT)
  4076  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4077  		v0.AddArg(x)
  4078  		v.AddArg(v0)
  4079  		return true
  4080  	}
  4081  }
  4082  func rewriteValueS390X_OpRotateLeft16(v *Value) bool {
  4083  	v_1 := v.Args[1]
  4084  	v_0 := v.Args[0]
  4085  	b := v.Block
  4086  	typ := &b.Func.Config.Types
  4087  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
  4088  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
  4089  	for {
  4090  		t := v.Type
  4091  		x := v_0
  4092  		if v_1.Op != OpS390XMOVDconst {
  4093  			break
  4094  		}
  4095  		c := auxIntToInt64(v_1.AuxInt)
  4096  		v.reset(OpOr16)
  4097  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  4098  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4099  		v1.AuxInt = int64ToAuxInt(c & 15)
  4100  		v0.AddArg2(x, v1)
  4101  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  4102  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4103  		v3.AuxInt = int64ToAuxInt(-c & 15)
  4104  		v2.AddArg2(x, v3)
  4105  		v.AddArg2(v0, v2)
  4106  		return true
  4107  	}
  4108  	return false
  4109  }
  4110  func rewriteValueS390X_OpRotateLeft8(v *Value) bool {
  4111  	v_1 := v.Args[1]
  4112  	v_0 := v.Args[0]
  4113  	b := v.Block
  4114  	typ := &b.Func.Config.Types
  4115  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
  4116  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
  4117  	for {
  4118  		t := v.Type
  4119  		x := v_0
  4120  		if v_1.Op != OpS390XMOVDconst {
  4121  			break
  4122  		}
  4123  		c := auxIntToInt64(v_1.AuxInt)
  4124  		v.reset(OpOr8)
  4125  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
  4126  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4127  		v1.AuxInt = int64ToAuxInt(c & 7)
  4128  		v0.AddArg2(x, v1)
  4129  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  4130  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4131  		v3.AuxInt = int64ToAuxInt(-c & 7)
  4132  		v2.AddArg2(x, v3)
  4133  		v.AddArg2(v0, v2)
  4134  		return true
  4135  	}
  4136  	return false
  4137  }
  4138  func rewriteValueS390X_OpRound(v *Value) bool {
  4139  	v_0 := v.Args[0]
  4140  	// match: (Round x)
  4141  	// result: (FIDBR [1] x)
  4142  	for {
  4143  		x := v_0
  4144  		v.reset(OpS390XFIDBR)
  4145  		v.AuxInt = int8ToAuxInt(1)
  4146  		v.AddArg(x)
  4147  		return true
  4148  	}
  4149  }
  4150  func rewriteValueS390X_OpRoundToEven(v *Value) bool {
  4151  	v_0 := v.Args[0]
  4152  	// match: (RoundToEven x)
  4153  	// result: (FIDBR [4] x)
  4154  	for {
  4155  		x := v_0
  4156  		v.reset(OpS390XFIDBR)
  4157  		v.AuxInt = int8ToAuxInt(4)
  4158  		v.AddArg(x)
  4159  		return true
  4160  	}
  4161  }
  4162  func rewriteValueS390X_OpRsh16Ux16(v *Value) bool {
  4163  	v_1 := v.Args[1]
  4164  	v_0 := v.Args[0]
  4165  	b := v.Block
  4166  	typ := &b.Func.Config.Types
  4167  	// match: (Rsh16Ux16 x y)
  4168  	// cond: shiftIsBounded(v)
  4169  	// result: (SRW (MOVHZreg x) y)
  4170  	for {
  4171  		x := v_0
  4172  		y := v_1
  4173  		if !(shiftIsBounded(v)) {
  4174  			break
  4175  		}
  4176  		v.reset(OpS390XSRW)
  4177  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4178  		v0.AddArg(x)
  4179  		v.AddArg2(v0, y)
  4180  		return true
  4181  	}
  4182  	// match: (Rsh16Ux16 <t> x y)
  4183  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4184  	for {
  4185  		t := v.Type
  4186  		x := v_0
  4187  		y := v_1
  4188  		v.reset(OpS390XLOCGR)
  4189  		v.Type = t
  4190  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4191  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4192  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4193  		v1.AddArg(x)
  4194  		v0.AddArg2(v1, y)
  4195  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4196  		v2.AuxInt = int64ToAuxInt(0)
  4197  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4198  		v3.AuxInt = int32ToAuxInt(64)
  4199  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4200  		v4.AddArg(y)
  4201  		v3.AddArg(v4)
  4202  		v.AddArg3(v0, v2, v3)
  4203  		return true
  4204  	}
  4205  }
  4206  func rewriteValueS390X_OpRsh16Ux32(v *Value) bool {
  4207  	v_1 := v.Args[1]
  4208  	v_0 := v.Args[0]
  4209  	b := v.Block
  4210  	typ := &b.Func.Config.Types
  4211  	// match: (Rsh16Ux32 x y)
  4212  	// cond: shiftIsBounded(v)
  4213  	// result: (SRW (MOVHZreg x) y)
  4214  	for {
  4215  		x := v_0
  4216  		y := v_1
  4217  		if !(shiftIsBounded(v)) {
  4218  			break
  4219  		}
  4220  		v.reset(OpS390XSRW)
  4221  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4222  		v0.AddArg(x)
  4223  		v.AddArg2(v0, y)
  4224  		return true
  4225  	}
  4226  	// match: (Rsh16Ux32 <t> x y)
  4227  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4228  	for {
  4229  		t := v.Type
  4230  		x := v_0
  4231  		y := v_1
  4232  		v.reset(OpS390XLOCGR)
  4233  		v.Type = t
  4234  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4235  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4236  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4237  		v1.AddArg(x)
  4238  		v0.AddArg2(v1, y)
  4239  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4240  		v2.AuxInt = int64ToAuxInt(0)
  4241  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4242  		v3.AuxInt = int32ToAuxInt(64)
  4243  		v3.AddArg(y)
  4244  		v.AddArg3(v0, v2, v3)
  4245  		return true
  4246  	}
  4247  }
  4248  func rewriteValueS390X_OpRsh16Ux64(v *Value) bool {
  4249  	v_1 := v.Args[1]
  4250  	v_0 := v.Args[0]
  4251  	b := v.Block
  4252  	typ := &b.Func.Config.Types
  4253  	// match: (Rsh16Ux64 x y)
  4254  	// cond: shiftIsBounded(v)
  4255  	// result: (SRW (MOVHZreg x) y)
  4256  	for {
  4257  		x := v_0
  4258  		y := v_1
  4259  		if !(shiftIsBounded(v)) {
  4260  			break
  4261  		}
  4262  		v.reset(OpS390XSRW)
  4263  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4264  		v0.AddArg(x)
  4265  		v.AddArg2(v0, y)
  4266  		return true
  4267  	}
  4268  	// match: (Rsh16Ux64 <t> x y)
  4269  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  4270  	for {
  4271  		t := v.Type
  4272  		x := v_0
  4273  		y := v_1
  4274  		v.reset(OpS390XLOCGR)
  4275  		v.Type = t
  4276  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4277  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4278  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4279  		v1.AddArg(x)
  4280  		v0.AddArg2(v1, y)
  4281  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4282  		v2.AuxInt = int64ToAuxInt(0)
  4283  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4284  		v3.AuxInt = int32ToAuxInt(64)
  4285  		v3.AddArg(y)
  4286  		v.AddArg3(v0, v2, v3)
  4287  		return true
  4288  	}
  4289  }
  4290  func rewriteValueS390X_OpRsh16Ux8(v *Value) bool {
  4291  	v_1 := v.Args[1]
  4292  	v_0 := v.Args[0]
  4293  	b := v.Block
  4294  	typ := &b.Func.Config.Types
  4295  	// match: (Rsh16Ux8 x y)
  4296  	// cond: shiftIsBounded(v)
  4297  	// result: (SRW (MOVHZreg x) y)
  4298  	for {
  4299  		x := v_0
  4300  		y := v_1
  4301  		if !(shiftIsBounded(v)) {
  4302  			break
  4303  		}
  4304  		v.reset(OpS390XSRW)
  4305  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4306  		v0.AddArg(x)
  4307  		v.AddArg2(v0, y)
  4308  		return true
  4309  	}
  4310  	// match: (Rsh16Ux8 <t> x y)
  4311  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4312  	for {
  4313  		t := v.Type
  4314  		x := v_0
  4315  		y := v_1
  4316  		v.reset(OpS390XLOCGR)
  4317  		v.Type = t
  4318  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4319  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4320  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4321  		v1.AddArg(x)
  4322  		v0.AddArg2(v1, y)
  4323  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4324  		v2.AuxInt = int64ToAuxInt(0)
  4325  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4326  		v3.AuxInt = int32ToAuxInt(64)
  4327  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4328  		v4.AddArg(y)
  4329  		v3.AddArg(v4)
  4330  		v.AddArg3(v0, v2, v3)
  4331  		return true
  4332  	}
  4333  }
  4334  func rewriteValueS390X_OpRsh16x16(v *Value) bool {
  4335  	v_1 := v.Args[1]
  4336  	v_0 := v.Args[0]
  4337  	b := v.Block
  4338  	typ := &b.Func.Config.Types
  4339  	// match: (Rsh16x16 x y)
  4340  	// cond: shiftIsBounded(v)
  4341  	// result: (SRAW (MOVHreg x) y)
  4342  	for {
  4343  		x := v_0
  4344  		y := v_1
  4345  		if !(shiftIsBounded(v)) {
  4346  			break
  4347  		}
  4348  		v.reset(OpS390XSRAW)
  4349  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4350  		v0.AddArg(x)
  4351  		v.AddArg2(v0, y)
  4352  		return true
  4353  	}
  4354  	// match: (Rsh16x16 x y)
  4355  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4356  	for {
  4357  		x := v_0
  4358  		y := v_1
  4359  		v.reset(OpS390XSRAW)
  4360  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4361  		v0.AddArg(x)
  4362  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4363  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4364  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4365  		v2.AuxInt = int64ToAuxInt(63)
  4366  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4367  		v3.AuxInt = int32ToAuxInt(64)
  4368  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4369  		v4.AddArg(y)
  4370  		v3.AddArg(v4)
  4371  		v1.AddArg3(y, v2, v3)
  4372  		v.AddArg2(v0, v1)
  4373  		return true
  4374  	}
  4375  }
  4376  func rewriteValueS390X_OpRsh16x32(v *Value) bool {
  4377  	v_1 := v.Args[1]
  4378  	v_0 := v.Args[0]
  4379  	b := v.Block
  4380  	typ := &b.Func.Config.Types
  4381  	// match: (Rsh16x32 x y)
  4382  	// cond: shiftIsBounded(v)
  4383  	// result: (SRAW (MOVHreg x) y)
  4384  	for {
  4385  		x := v_0
  4386  		y := v_1
  4387  		if !(shiftIsBounded(v)) {
  4388  			break
  4389  		}
  4390  		v.reset(OpS390XSRAW)
  4391  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4392  		v0.AddArg(x)
  4393  		v.AddArg2(v0, y)
  4394  		return true
  4395  	}
  4396  	// match: (Rsh16x32 x y)
  4397  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4398  	for {
  4399  		x := v_0
  4400  		y := v_1
  4401  		v.reset(OpS390XSRAW)
  4402  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4403  		v0.AddArg(x)
  4404  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4405  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4406  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4407  		v2.AuxInt = int64ToAuxInt(63)
  4408  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4409  		v3.AuxInt = int32ToAuxInt(64)
  4410  		v3.AddArg(y)
  4411  		v1.AddArg3(y, v2, v3)
  4412  		v.AddArg2(v0, v1)
  4413  		return true
  4414  	}
  4415  }
  4416  func rewriteValueS390X_OpRsh16x64(v *Value) bool {
  4417  	v_1 := v.Args[1]
  4418  	v_0 := v.Args[0]
  4419  	b := v.Block
  4420  	typ := &b.Func.Config.Types
  4421  	// match: (Rsh16x64 x y)
  4422  	// cond: shiftIsBounded(v)
  4423  	// result: (SRAW (MOVHreg x) y)
  4424  	for {
  4425  		x := v_0
  4426  		y := v_1
  4427  		if !(shiftIsBounded(v)) {
  4428  			break
  4429  		}
  4430  		v.reset(OpS390XSRAW)
  4431  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4432  		v0.AddArg(x)
  4433  		v.AddArg2(v0, y)
  4434  		return true
  4435  	}
  4436  	// match: (Rsh16x64 x y)
  4437  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4438  	for {
  4439  		x := v_0
  4440  		y := v_1
  4441  		v.reset(OpS390XSRAW)
  4442  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4443  		v0.AddArg(x)
  4444  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4445  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4446  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4447  		v2.AuxInt = int64ToAuxInt(63)
  4448  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4449  		v3.AuxInt = int32ToAuxInt(64)
  4450  		v3.AddArg(y)
  4451  		v1.AddArg3(y, v2, v3)
  4452  		v.AddArg2(v0, v1)
  4453  		return true
  4454  	}
  4455  }
  4456  func rewriteValueS390X_OpRsh16x8(v *Value) bool {
  4457  	v_1 := v.Args[1]
  4458  	v_0 := v.Args[0]
  4459  	b := v.Block
  4460  	typ := &b.Func.Config.Types
  4461  	// match: (Rsh16x8 x y)
  4462  	// cond: shiftIsBounded(v)
  4463  	// result: (SRAW (MOVHreg x) y)
  4464  	for {
  4465  		x := v_0
  4466  		y := v_1
  4467  		if !(shiftIsBounded(v)) {
  4468  			break
  4469  		}
  4470  		v.reset(OpS390XSRAW)
  4471  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4472  		v0.AddArg(x)
  4473  		v.AddArg2(v0, y)
  4474  		return true
  4475  	}
  4476  	// match: (Rsh16x8 x y)
  4477  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4478  	for {
  4479  		x := v_0
  4480  		y := v_1
  4481  		v.reset(OpS390XSRAW)
  4482  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4483  		v0.AddArg(x)
  4484  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4485  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4486  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4487  		v2.AuxInt = int64ToAuxInt(63)
  4488  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4489  		v3.AuxInt = int32ToAuxInt(64)
  4490  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4491  		v4.AddArg(y)
  4492  		v3.AddArg(v4)
  4493  		v1.AddArg3(y, v2, v3)
  4494  		v.AddArg2(v0, v1)
  4495  		return true
  4496  	}
  4497  }
  4498  func rewriteValueS390X_OpRsh32Ux16(v *Value) bool {
  4499  	v_1 := v.Args[1]
  4500  	v_0 := v.Args[0]
  4501  	b := v.Block
  4502  	typ := &b.Func.Config.Types
  4503  	// match: (Rsh32Ux16 x y)
  4504  	// cond: shiftIsBounded(v)
  4505  	// result: (SRW x y)
  4506  	for {
  4507  		x := v_0
  4508  		y := v_1
  4509  		if !(shiftIsBounded(v)) {
  4510  			break
  4511  		}
  4512  		v.reset(OpS390XSRW)
  4513  		v.AddArg2(x, y)
  4514  		return true
  4515  	}
  4516  	// match: (Rsh32Ux16 <t> x y)
  4517  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4518  	for {
  4519  		t := v.Type
  4520  		x := v_0
  4521  		y := v_1
  4522  		v.reset(OpS390XLOCGR)
  4523  		v.Type = t
  4524  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4525  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4526  		v0.AddArg2(x, y)
  4527  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4528  		v1.AuxInt = int64ToAuxInt(0)
  4529  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4530  		v2.AuxInt = int32ToAuxInt(64)
  4531  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4532  		v3.AddArg(y)
  4533  		v2.AddArg(v3)
  4534  		v.AddArg3(v0, v1, v2)
  4535  		return true
  4536  	}
  4537  }
  4538  func rewriteValueS390X_OpRsh32Ux32(v *Value) bool {
  4539  	v_1 := v.Args[1]
  4540  	v_0 := v.Args[0]
  4541  	b := v.Block
  4542  	typ := &b.Func.Config.Types
  4543  	// match: (Rsh32Ux32 x y)
  4544  	// cond: shiftIsBounded(v)
  4545  	// result: (SRW x y)
  4546  	for {
  4547  		x := v_0
  4548  		y := v_1
  4549  		if !(shiftIsBounded(v)) {
  4550  			break
  4551  		}
  4552  		v.reset(OpS390XSRW)
  4553  		v.AddArg2(x, y)
  4554  		return true
  4555  	}
  4556  	// match: (Rsh32Ux32 <t> x y)
  4557  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4558  	for {
  4559  		t := v.Type
  4560  		x := v_0
  4561  		y := v_1
  4562  		v.reset(OpS390XLOCGR)
  4563  		v.Type = t
  4564  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4565  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4566  		v0.AddArg2(x, y)
  4567  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4568  		v1.AuxInt = int64ToAuxInt(0)
  4569  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4570  		v2.AuxInt = int32ToAuxInt(64)
  4571  		v2.AddArg(y)
  4572  		v.AddArg3(v0, v1, v2)
  4573  		return true
  4574  	}
  4575  }
  4576  func rewriteValueS390X_OpRsh32Ux64(v *Value) bool {
  4577  	v_1 := v.Args[1]
  4578  	v_0 := v.Args[0]
  4579  	b := v.Block
  4580  	typ := &b.Func.Config.Types
  4581  	// match: (Rsh32Ux64 x y)
  4582  	// cond: shiftIsBounded(v)
  4583  	// result: (SRW x y)
  4584  	for {
  4585  		x := v_0
  4586  		y := v_1
  4587  		if !(shiftIsBounded(v)) {
  4588  			break
  4589  		}
  4590  		v.reset(OpS390XSRW)
  4591  		v.AddArg2(x, y)
  4592  		return true
  4593  	}
  4594  	// match: (Rsh32Ux64 <t> x y)
  4595  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4596  	for {
  4597  		t := v.Type
  4598  		x := v_0
  4599  		y := v_1
  4600  		v.reset(OpS390XLOCGR)
  4601  		v.Type = t
  4602  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4603  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4604  		v0.AddArg2(x, y)
  4605  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4606  		v1.AuxInt = int64ToAuxInt(0)
  4607  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4608  		v2.AuxInt = int32ToAuxInt(64)
  4609  		v2.AddArg(y)
  4610  		v.AddArg3(v0, v1, v2)
  4611  		return true
  4612  	}
  4613  }
  4614  func rewriteValueS390X_OpRsh32Ux8(v *Value) bool {
  4615  	v_1 := v.Args[1]
  4616  	v_0 := v.Args[0]
  4617  	b := v.Block
  4618  	typ := &b.Func.Config.Types
  4619  	// match: (Rsh32Ux8 x y)
  4620  	// cond: shiftIsBounded(v)
  4621  	// result: (SRW x y)
  4622  	for {
  4623  		x := v_0
  4624  		y := v_1
  4625  		if !(shiftIsBounded(v)) {
  4626  			break
  4627  		}
  4628  		v.reset(OpS390XSRW)
  4629  		v.AddArg2(x, y)
  4630  		return true
  4631  	}
  4632  	// match: (Rsh32Ux8 <t> x y)
  4633  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4634  	for {
  4635  		t := v.Type
  4636  		x := v_0
  4637  		y := v_1
  4638  		v.reset(OpS390XLOCGR)
  4639  		v.Type = t
  4640  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4641  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4642  		v0.AddArg2(x, y)
  4643  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4644  		v1.AuxInt = int64ToAuxInt(0)
  4645  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4646  		v2.AuxInt = int32ToAuxInt(64)
  4647  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4648  		v3.AddArg(y)
  4649  		v2.AddArg(v3)
  4650  		v.AddArg3(v0, v1, v2)
  4651  		return true
  4652  	}
  4653  }
  4654  func rewriteValueS390X_OpRsh32x16(v *Value) bool {
  4655  	v_1 := v.Args[1]
  4656  	v_0 := v.Args[0]
  4657  	b := v.Block
  4658  	typ := &b.Func.Config.Types
  4659  	// match: (Rsh32x16 x y)
  4660  	// cond: shiftIsBounded(v)
  4661  	// result: (SRAW x y)
  4662  	for {
  4663  		x := v_0
  4664  		y := v_1
  4665  		if !(shiftIsBounded(v)) {
  4666  			break
  4667  		}
  4668  		v.reset(OpS390XSRAW)
  4669  		v.AddArg2(x, y)
  4670  		return true
  4671  	}
  4672  	// match: (Rsh32x16 x y)
  4673  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4674  	for {
  4675  		x := v_0
  4676  		y := v_1
  4677  		v.reset(OpS390XSRAW)
  4678  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4679  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4680  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4681  		v1.AuxInt = int64ToAuxInt(63)
  4682  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4683  		v2.AuxInt = int32ToAuxInt(64)
  4684  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4685  		v3.AddArg(y)
  4686  		v2.AddArg(v3)
  4687  		v0.AddArg3(y, v1, v2)
  4688  		v.AddArg2(x, v0)
  4689  		return true
  4690  	}
  4691  }
  4692  func rewriteValueS390X_OpRsh32x32(v *Value) bool {
  4693  	v_1 := v.Args[1]
  4694  	v_0 := v.Args[0]
  4695  	b := v.Block
  4696  	// match: (Rsh32x32 x y)
  4697  	// cond: shiftIsBounded(v)
  4698  	// result: (SRAW x y)
  4699  	for {
  4700  		x := v_0
  4701  		y := v_1
  4702  		if !(shiftIsBounded(v)) {
  4703  			break
  4704  		}
  4705  		v.reset(OpS390XSRAW)
  4706  		v.AddArg2(x, y)
  4707  		return true
  4708  	}
  4709  	// match: (Rsh32x32 x y)
  4710  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4711  	for {
  4712  		x := v_0
  4713  		y := v_1
  4714  		v.reset(OpS390XSRAW)
  4715  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4716  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4717  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4718  		v1.AuxInt = int64ToAuxInt(63)
  4719  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4720  		v2.AuxInt = int32ToAuxInt(64)
  4721  		v2.AddArg(y)
  4722  		v0.AddArg3(y, v1, v2)
  4723  		v.AddArg2(x, v0)
  4724  		return true
  4725  	}
  4726  }
  4727  func rewriteValueS390X_OpRsh32x64(v *Value) bool {
  4728  	v_1 := v.Args[1]
  4729  	v_0 := v.Args[0]
  4730  	b := v.Block
  4731  	// match: (Rsh32x64 x y)
  4732  	// cond: shiftIsBounded(v)
  4733  	// result: (SRAW x y)
  4734  	for {
  4735  		x := v_0
  4736  		y := v_1
  4737  		if !(shiftIsBounded(v)) {
  4738  			break
  4739  		}
  4740  		v.reset(OpS390XSRAW)
  4741  		v.AddArg2(x, y)
  4742  		return true
  4743  	}
  4744  	// match: (Rsh32x64 x y)
  4745  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4746  	for {
  4747  		x := v_0
  4748  		y := v_1
  4749  		v.reset(OpS390XSRAW)
  4750  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4751  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4752  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4753  		v1.AuxInt = int64ToAuxInt(63)
  4754  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4755  		v2.AuxInt = int32ToAuxInt(64)
  4756  		v2.AddArg(y)
  4757  		v0.AddArg3(y, v1, v2)
  4758  		v.AddArg2(x, v0)
  4759  		return true
  4760  	}
  4761  }
  4762  func rewriteValueS390X_OpRsh32x8(v *Value) bool {
  4763  	v_1 := v.Args[1]
  4764  	v_0 := v.Args[0]
  4765  	b := v.Block
  4766  	typ := &b.Func.Config.Types
  4767  	// match: (Rsh32x8 x y)
  4768  	// cond: shiftIsBounded(v)
  4769  	// result: (SRAW x y)
  4770  	for {
  4771  		x := v_0
  4772  		y := v_1
  4773  		if !(shiftIsBounded(v)) {
  4774  			break
  4775  		}
  4776  		v.reset(OpS390XSRAW)
  4777  		v.AddArg2(x, y)
  4778  		return true
  4779  	}
  4780  	// match: (Rsh32x8 x y)
  4781  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4782  	for {
  4783  		x := v_0
  4784  		y := v_1
  4785  		v.reset(OpS390XSRAW)
  4786  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4787  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4788  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4789  		v1.AuxInt = int64ToAuxInt(63)
  4790  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4791  		v2.AuxInt = int32ToAuxInt(64)
  4792  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4793  		v3.AddArg(y)
  4794  		v2.AddArg(v3)
  4795  		v0.AddArg3(y, v1, v2)
  4796  		v.AddArg2(x, v0)
  4797  		return true
  4798  	}
  4799  }
  4800  func rewriteValueS390X_OpRsh64Ux16(v *Value) bool {
  4801  	v_1 := v.Args[1]
  4802  	v_0 := v.Args[0]
  4803  	b := v.Block
  4804  	typ := &b.Func.Config.Types
  4805  	// match: (Rsh64Ux16 x y)
  4806  	// cond: shiftIsBounded(v)
  4807  	// result: (SRD x y)
  4808  	for {
  4809  		x := v_0
  4810  		y := v_1
  4811  		if !(shiftIsBounded(v)) {
  4812  			break
  4813  		}
  4814  		v.reset(OpS390XSRD)
  4815  		v.AddArg2(x, y)
  4816  		return true
  4817  	}
  4818  	// match: (Rsh64Ux16 <t> x y)
  4819  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4820  	for {
  4821  		t := v.Type
  4822  		x := v_0
  4823  		y := v_1
  4824  		v.reset(OpS390XLOCGR)
  4825  		v.Type = t
  4826  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4827  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4828  		v0.AddArg2(x, y)
  4829  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4830  		v1.AuxInt = int64ToAuxInt(0)
  4831  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4832  		v2.AuxInt = int32ToAuxInt(64)
  4833  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4834  		v3.AddArg(y)
  4835  		v2.AddArg(v3)
  4836  		v.AddArg3(v0, v1, v2)
  4837  		return true
  4838  	}
  4839  }
  4840  func rewriteValueS390X_OpRsh64Ux32(v *Value) bool {
  4841  	v_1 := v.Args[1]
  4842  	v_0 := v.Args[0]
  4843  	b := v.Block
  4844  	typ := &b.Func.Config.Types
  4845  	// match: (Rsh64Ux32 x y)
  4846  	// cond: shiftIsBounded(v)
  4847  	// result: (SRD x y)
  4848  	for {
  4849  		x := v_0
  4850  		y := v_1
  4851  		if !(shiftIsBounded(v)) {
  4852  			break
  4853  		}
  4854  		v.reset(OpS390XSRD)
  4855  		v.AddArg2(x, y)
  4856  		return true
  4857  	}
  4858  	// match: (Rsh64Ux32 <t> x y)
  4859  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4860  	for {
  4861  		t := v.Type
  4862  		x := v_0
  4863  		y := v_1
  4864  		v.reset(OpS390XLOCGR)
  4865  		v.Type = t
  4866  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4867  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4868  		v0.AddArg2(x, y)
  4869  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4870  		v1.AuxInt = int64ToAuxInt(0)
  4871  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4872  		v2.AuxInt = int32ToAuxInt(64)
  4873  		v2.AddArg(y)
  4874  		v.AddArg3(v0, v1, v2)
  4875  		return true
  4876  	}
  4877  }
  4878  func rewriteValueS390X_OpRsh64Ux64(v *Value) bool {
  4879  	v_1 := v.Args[1]
  4880  	v_0 := v.Args[0]
  4881  	b := v.Block
  4882  	typ := &b.Func.Config.Types
  4883  	// match: (Rsh64Ux64 x y)
  4884  	// cond: shiftIsBounded(v)
  4885  	// result: (SRD x y)
  4886  	for {
  4887  		x := v_0
  4888  		y := v_1
  4889  		if !(shiftIsBounded(v)) {
  4890  			break
  4891  		}
  4892  		v.reset(OpS390XSRD)
  4893  		v.AddArg2(x, y)
  4894  		return true
  4895  	}
  4896  	// match: (Rsh64Ux64 <t> x y)
  4897  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4898  	for {
  4899  		t := v.Type
  4900  		x := v_0
  4901  		y := v_1
  4902  		v.reset(OpS390XLOCGR)
  4903  		v.Type = t
  4904  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4905  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4906  		v0.AddArg2(x, y)
  4907  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4908  		v1.AuxInt = int64ToAuxInt(0)
  4909  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4910  		v2.AuxInt = int32ToAuxInt(64)
  4911  		v2.AddArg(y)
  4912  		v.AddArg3(v0, v1, v2)
  4913  		return true
  4914  	}
  4915  }
  4916  func rewriteValueS390X_OpRsh64Ux8(v *Value) bool {
  4917  	v_1 := v.Args[1]
  4918  	v_0 := v.Args[0]
  4919  	b := v.Block
  4920  	typ := &b.Func.Config.Types
  4921  	// match: (Rsh64Ux8 x y)
  4922  	// cond: shiftIsBounded(v)
  4923  	// result: (SRD x y)
  4924  	for {
  4925  		x := v_0
  4926  		y := v_1
  4927  		if !(shiftIsBounded(v)) {
  4928  			break
  4929  		}
  4930  		v.reset(OpS390XSRD)
  4931  		v.AddArg2(x, y)
  4932  		return true
  4933  	}
  4934  	// match: (Rsh64Ux8 <t> x y)
  4935  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4936  	for {
  4937  		t := v.Type
  4938  		x := v_0
  4939  		y := v_1
  4940  		v.reset(OpS390XLOCGR)
  4941  		v.Type = t
  4942  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4943  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4944  		v0.AddArg2(x, y)
  4945  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4946  		v1.AuxInt = int64ToAuxInt(0)
  4947  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4948  		v2.AuxInt = int32ToAuxInt(64)
  4949  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4950  		v3.AddArg(y)
  4951  		v2.AddArg(v3)
  4952  		v.AddArg3(v0, v1, v2)
  4953  		return true
  4954  	}
  4955  }
  4956  func rewriteValueS390X_OpRsh64x16(v *Value) bool {
  4957  	v_1 := v.Args[1]
  4958  	v_0 := v.Args[0]
  4959  	b := v.Block
  4960  	typ := &b.Func.Config.Types
  4961  	// match: (Rsh64x16 x y)
  4962  	// cond: shiftIsBounded(v)
  4963  	// result: (SRAD x y)
  4964  	for {
  4965  		x := v_0
  4966  		y := v_1
  4967  		if !(shiftIsBounded(v)) {
  4968  			break
  4969  		}
  4970  		v.reset(OpS390XSRAD)
  4971  		v.AddArg2(x, y)
  4972  		return true
  4973  	}
  4974  	// match: (Rsh64x16 x y)
  4975  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4976  	for {
  4977  		x := v_0
  4978  		y := v_1
  4979  		v.reset(OpS390XSRAD)
  4980  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4981  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4982  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4983  		v1.AuxInt = int64ToAuxInt(63)
  4984  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4985  		v2.AuxInt = int32ToAuxInt(64)
  4986  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4987  		v3.AddArg(y)
  4988  		v2.AddArg(v3)
  4989  		v0.AddArg3(y, v1, v2)
  4990  		v.AddArg2(x, v0)
  4991  		return true
  4992  	}
  4993  }
  4994  func rewriteValueS390X_OpRsh64x32(v *Value) bool {
  4995  	v_1 := v.Args[1]
  4996  	v_0 := v.Args[0]
  4997  	b := v.Block
  4998  	// match: (Rsh64x32 x y)
  4999  	// cond: shiftIsBounded(v)
  5000  	// result: (SRAD x y)
  5001  	for {
  5002  		x := v_0
  5003  		y := v_1
  5004  		if !(shiftIsBounded(v)) {
  5005  			break
  5006  		}
  5007  		v.reset(OpS390XSRAD)
  5008  		v.AddArg2(x, y)
  5009  		return true
  5010  	}
  5011  	// match: (Rsh64x32 x y)
  5012  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  5013  	for {
  5014  		x := v_0
  5015  		y := v_1
  5016  		v.reset(OpS390XSRAD)
  5017  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5018  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5019  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5020  		v1.AuxInt = int64ToAuxInt(63)
  5021  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5022  		v2.AuxInt = int32ToAuxInt(64)
  5023  		v2.AddArg(y)
  5024  		v0.AddArg3(y, v1, v2)
  5025  		v.AddArg2(x, v0)
  5026  		return true
  5027  	}
  5028  }
  5029  func rewriteValueS390X_OpRsh64x64(v *Value) bool {
  5030  	v_1 := v.Args[1]
  5031  	v_0 := v.Args[0]
  5032  	b := v.Block
  5033  	// match: (Rsh64x64 x y)
  5034  	// cond: shiftIsBounded(v)
  5035  	// result: (SRAD x y)
  5036  	for {
  5037  		x := v_0
  5038  		y := v_1
  5039  		if !(shiftIsBounded(v)) {
  5040  			break
  5041  		}
  5042  		v.reset(OpS390XSRAD)
  5043  		v.AddArg2(x, y)
  5044  		return true
  5045  	}
  5046  	// match: (Rsh64x64 x y)
  5047  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5048  	for {
  5049  		x := v_0
  5050  		y := v_1
  5051  		v.reset(OpS390XSRAD)
  5052  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5053  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5054  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5055  		v1.AuxInt = int64ToAuxInt(63)
  5056  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5057  		v2.AuxInt = int32ToAuxInt(64)
  5058  		v2.AddArg(y)
  5059  		v0.AddArg3(y, v1, v2)
  5060  		v.AddArg2(x, v0)
  5061  		return true
  5062  	}
  5063  }
  5064  func rewriteValueS390X_OpRsh64x8(v *Value) bool {
  5065  	v_1 := v.Args[1]
  5066  	v_0 := v.Args[0]
  5067  	b := v.Block
  5068  	typ := &b.Func.Config.Types
  5069  	// match: (Rsh64x8 x y)
  5070  	// cond: shiftIsBounded(v)
  5071  	// result: (SRAD x y)
  5072  	for {
  5073  		x := v_0
  5074  		y := v_1
  5075  		if !(shiftIsBounded(v)) {
  5076  			break
  5077  		}
  5078  		v.reset(OpS390XSRAD)
  5079  		v.AddArg2(x, y)
  5080  		return true
  5081  	}
  5082  	// match: (Rsh64x8 x y)
  5083  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5084  	for {
  5085  		x := v_0
  5086  		y := v_1
  5087  		v.reset(OpS390XSRAD)
  5088  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5089  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5090  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5091  		v1.AuxInt = int64ToAuxInt(63)
  5092  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5093  		v2.AuxInt = int32ToAuxInt(64)
  5094  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5095  		v3.AddArg(y)
  5096  		v2.AddArg(v3)
  5097  		v0.AddArg3(y, v1, v2)
  5098  		v.AddArg2(x, v0)
  5099  		return true
  5100  	}
  5101  }
  5102  func rewriteValueS390X_OpRsh8Ux16(v *Value) bool {
  5103  	v_1 := v.Args[1]
  5104  	v_0 := v.Args[0]
  5105  	b := v.Block
  5106  	typ := &b.Func.Config.Types
  5107  	// match: (Rsh8Ux16 x y)
  5108  	// cond: shiftIsBounded(v)
  5109  	// result: (SRW (MOVBZreg x) y)
  5110  	for {
  5111  		x := v_0
  5112  		y := v_1
  5113  		if !(shiftIsBounded(v)) {
  5114  			break
  5115  		}
  5116  		v.reset(OpS390XSRW)
  5117  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5118  		v0.AddArg(x)
  5119  		v.AddArg2(v0, y)
  5120  		return true
  5121  	}
  5122  	// match: (Rsh8Ux16 <t> x y)
  5123  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  5124  	for {
  5125  		t := v.Type
  5126  		x := v_0
  5127  		y := v_1
  5128  		v.reset(OpS390XLOCGR)
  5129  		v.Type = t
  5130  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5131  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5132  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5133  		v1.AddArg(x)
  5134  		v0.AddArg2(v1, y)
  5135  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5136  		v2.AuxInt = int64ToAuxInt(0)
  5137  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5138  		v3.AuxInt = int32ToAuxInt(64)
  5139  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  5140  		v4.AddArg(y)
  5141  		v3.AddArg(v4)
  5142  		v.AddArg3(v0, v2, v3)
  5143  		return true
  5144  	}
  5145  }
  5146  func rewriteValueS390X_OpRsh8Ux32(v *Value) bool {
  5147  	v_1 := v.Args[1]
  5148  	v_0 := v.Args[0]
  5149  	b := v.Block
  5150  	typ := &b.Func.Config.Types
  5151  	// match: (Rsh8Ux32 x y)
  5152  	// cond: shiftIsBounded(v)
  5153  	// result: (SRW (MOVBZreg x) y)
  5154  	for {
  5155  		x := v_0
  5156  		y := v_1
  5157  		if !(shiftIsBounded(v)) {
  5158  			break
  5159  		}
  5160  		v.reset(OpS390XSRW)
  5161  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5162  		v0.AddArg(x)
  5163  		v.AddArg2(v0, y)
  5164  		return true
  5165  	}
  5166  	// match: (Rsh8Ux32 <t> x y)
  5167  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  5168  	for {
  5169  		t := v.Type
  5170  		x := v_0
  5171  		y := v_1
  5172  		v.reset(OpS390XLOCGR)
  5173  		v.Type = t
  5174  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5175  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5176  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5177  		v1.AddArg(x)
  5178  		v0.AddArg2(v1, y)
  5179  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5180  		v2.AuxInt = int64ToAuxInt(0)
  5181  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5182  		v3.AuxInt = int32ToAuxInt(64)
  5183  		v3.AddArg(y)
  5184  		v.AddArg3(v0, v2, v3)
  5185  		return true
  5186  	}
  5187  }
  5188  func rewriteValueS390X_OpRsh8Ux64(v *Value) bool {
  5189  	v_1 := v.Args[1]
  5190  	v_0 := v.Args[0]
  5191  	b := v.Block
  5192  	typ := &b.Func.Config.Types
  5193  	// match: (Rsh8Ux64 x y)
  5194  	// cond: shiftIsBounded(v)
  5195  	// result: (SRW (MOVBZreg x) y)
  5196  	for {
  5197  		x := v_0
  5198  		y := v_1
  5199  		if !(shiftIsBounded(v)) {
  5200  			break
  5201  		}
  5202  		v.reset(OpS390XSRW)
  5203  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5204  		v0.AddArg(x)
  5205  		v.AddArg2(v0, y)
  5206  		return true
  5207  	}
  5208  	// match: (Rsh8Ux64 <t> x y)
  5209  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  5210  	for {
  5211  		t := v.Type
  5212  		x := v_0
  5213  		y := v_1
  5214  		v.reset(OpS390XLOCGR)
  5215  		v.Type = t
  5216  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5217  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5218  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5219  		v1.AddArg(x)
  5220  		v0.AddArg2(v1, y)
  5221  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5222  		v2.AuxInt = int64ToAuxInt(0)
  5223  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5224  		v3.AuxInt = int32ToAuxInt(64)
  5225  		v3.AddArg(y)
  5226  		v.AddArg3(v0, v2, v3)
  5227  		return true
  5228  	}
  5229  }
  5230  func rewriteValueS390X_OpRsh8Ux8(v *Value) bool {
  5231  	v_1 := v.Args[1]
  5232  	v_0 := v.Args[0]
  5233  	b := v.Block
  5234  	typ := &b.Func.Config.Types
  5235  	// match: (Rsh8Ux8 x y)
  5236  	// cond: shiftIsBounded(v)
  5237  	// result: (SRW (MOVBZreg x) y)
  5238  	for {
  5239  		x := v_0
  5240  		y := v_1
  5241  		if !(shiftIsBounded(v)) {
  5242  			break
  5243  		}
  5244  		v.reset(OpS390XSRW)
  5245  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5246  		v0.AddArg(x)
  5247  		v.AddArg2(v0, y)
  5248  		return true
  5249  	}
  5250  	// match: (Rsh8Ux8 <t> x y)
  5251  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  5252  	for {
  5253  		t := v.Type
  5254  		x := v_0
  5255  		y := v_1
  5256  		v.reset(OpS390XLOCGR)
  5257  		v.Type = t
  5258  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5259  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5260  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5261  		v1.AddArg(x)
  5262  		v0.AddArg2(v1, y)
  5263  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5264  		v2.AuxInt = int64ToAuxInt(0)
  5265  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5266  		v3.AuxInt = int32ToAuxInt(64)
  5267  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5268  		v4.AddArg(y)
  5269  		v3.AddArg(v4)
  5270  		v.AddArg3(v0, v2, v3)
  5271  		return true
  5272  	}
  5273  }
  5274  func rewriteValueS390X_OpRsh8x16(v *Value) bool {
  5275  	v_1 := v.Args[1]
  5276  	v_0 := v.Args[0]
  5277  	b := v.Block
  5278  	typ := &b.Func.Config.Types
  5279  	// match: (Rsh8x16 x y)
  5280  	// cond: shiftIsBounded(v)
  5281  	// result: (SRAW (MOVBreg x) y)
  5282  	for {
  5283  		x := v_0
  5284  		y := v_1
  5285  		if !(shiftIsBounded(v)) {
  5286  			break
  5287  		}
  5288  		v.reset(OpS390XSRAW)
  5289  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5290  		v0.AddArg(x)
  5291  		v.AddArg2(v0, y)
  5292  		return true
  5293  	}
  5294  	// match: (Rsh8x16 x y)
  5295  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  5296  	for {
  5297  		x := v_0
  5298  		y := v_1
  5299  		v.reset(OpS390XSRAW)
  5300  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5301  		v0.AddArg(x)
  5302  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5303  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5304  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5305  		v2.AuxInt = int64ToAuxInt(63)
  5306  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5307  		v3.AuxInt = int32ToAuxInt(64)
  5308  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  5309  		v4.AddArg(y)
  5310  		v3.AddArg(v4)
  5311  		v1.AddArg3(y, v2, v3)
  5312  		v.AddArg2(v0, v1)
  5313  		return true
  5314  	}
  5315  }
  5316  func rewriteValueS390X_OpRsh8x32(v *Value) bool {
  5317  	v_1 := v.Args[1]
  5318  	v_0 := v.Args[0]
  5319  	b := v.Block
  5320  	typ := &b.Func.Config.Types
  5321  	// match: (Rsh8x32 x y)
  5322  	// cond: shiftIsBounded(v)
  5323  	// result: (SRAW (MOVBreg x) y)
  5324  	for {
  5325  		x := v_0
  5326  		y := v_1
  5327  		if !(shiftIsBounded(v)) {
  5328  			break
  5329  		}
  5330  		v.reset(OpS390XSRAW)
  5331  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5332  		v0.AddArg(x)
  5333  		v.AddArg2(v0, y)
  5334  		return true
  5335  	}
  5336  	// match: (Rsh8x32 x y)
  5337  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  5338  	for {
  5339  		x := v_0
  5340  		y := v_1
  5341  		v.reset(OpS390XSRAW)
  5342  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5343  		v0.AddArg(x)
  5344  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5345  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5346  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5347  		v2.AuxInt = int64ToAuxInt(63)
  5348  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5349  		v3.AuxInt = int32ToAuxInt(64)
  5350  		v3.AddArg(y)
  5351  		v1.AddArg3(y, v2, v3)
  5352  		v.AddArg2(v0, v1)
  5353  		return true
  5354  	}
  5355  }
  5356  func rewriteValueS390X_OpRsh8x64(v *Value) bool {
  5357  	v_1 := v.Args[1]
  5358  	v_0 := v.Args[0]
  5359  	b := v.Block
  5360  	typ := &b.Func.Config.Types
  5361  	// match: (Rsh8x64 x y)
  5362  	// cond: shiftIsBounded(v)
  5363  	// result: (SRAW (MOVBreg x) y)
  5364  	for {
  5365  		x := v_0
  5366  		y := v_1
  5367  		if !(shiftIsBounded(v)) {
  5368  			break
  5369  		}
  5370  		v.reset(OpS390XSRAW)
  5371  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5372  		v0.AddArg(x)
  5373  		v.AddArg2(v0, y)
  5374  		return true
  5375  	}
  5376  	// match: (Rsh8x64 x y)
  5377  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5378  	for {
  5379  		x := v_0
  5380  		y := v_1
  5381  		v.reset(OpS390XSRAW)
  5382  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5383  		v0.AddArg(x)
  5384  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5385  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5386  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5387  		v2.AuxInt = int64ToAuxInt(63)
  5388  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5389  		v3.AuxInt = int32ToAuxInt(64)
  5390  		v3.AddArg(y)
  5391  		v1.AddArg3(y, v2, v3)
  5392  		v.AddArg2(v0, v1)
  5393  		return true
  5394  	}
  5395  }
  5396  func rewriteValueS390X_OpRsh8x8(v *Value) bool {
  5397  	v_1 := v.Args[1]
  5398  	v_0 := v.Args[0]
  5399  	b := v.Block
  5400  	typ := &b.Func.Config.Types
  5401  	// match: (Rsh8x8 x y)
  5402  	// cond: shiftIsBounded(v)
  5403  	// result: (SRAW (MOVBreg x) y)
  5404  	for {
  5405  		x := v_0
  5406  		y := v_1
  5407  		if !(shiftIsBounded(v)) {
  5408  			break
  5409  		}
  5410  		v.reset(OpS390XSRAW)
  5411  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5412  		v0.AddArg(x)
  5413  		v.AddArg2(v0, y)
  5414  		return true
  5415  	}
  5416  	// match: (Rsh8x8 x y)
  5417  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5418  	for {
  5419  		x := v_0
  5420  		y := v_1
  5421  		v.reset(OpS390XSRAW)
  5422  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5423  		v0.AddArg(x)
  5424  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5425  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5426  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5427  		v2.AuxInt = int64ToAuxInt(63)
  5428  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5429  		v3.AuxInt = int32ToAuxInt(64)
  5430  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5431  		v4.AddArg(y)
  5432  		v3.AddArg(v4)
  5433  		v1.AddArg3(y, v2, v3)
  5434  		v.AddArg2(v0, v1)
  5435  		return true
  5436  	}
  5437  }
  5438  func rewriteValueS390X_OpS390XADD(v *Value) bool {
  5439  	v_1 := v.Args[1]
  5440  	v_0 := v.Args[0]
  5441  	// match: (ADD x (MOVDconst <t> [c]))
  5442  	// cond: is32Bit(c) && !t.IsPtr()
  5443  	// result: (ADDconst [int32(c)] x)
  5444  	for {
  5445  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5446  			x := v_0
  5447  			if v_1.Op != OpS390XMOVDconst {
  5448  				continue
  5449  			}
  5450  			t := v_1.Type
  5451  			c := auxIntToInt64(v_1.AuxInt)
  5452  			if !(is32Bit(c) && !t.IsPtr()) {
  5453  				continue
  5454  			}
  5455  			v.reset(OpS390XADDconst)
  5456  			v.AuxInt = int32ToAuxInt(int32(c))
  5457  			v.AddArg(x)
  5458  			return true
  5459  		}
  5460  		break
  5461  	}
  5462  	// match: (ADD idx (MOVDaddr [c] {s} ptr))
  5463  	// cond: ptr.Op != OpSB
  5464  	// result: (MOVDaddridx [c] {s} ptr idx)
  5465  	for {
  5466  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5467  			idx := v_0
  5468  			if v_1.Op != OpS390XMOVDaddr {
  5469  				continue
  5470  			}
  5471  			c := auxIntToInt32(v_1.AuxInt)
  5472  			s := auxToSym(v_1.Aux)
  5473  			ptr := v_1.Args[0]
  5474  			if !(ptr.Op != OpSB) {
  5475  				continue
  5476  			}
  5477  			v.reset(OpS390XMOVDaddridx)
  5478  			v.AuxInt = int32ToAuxInt(c)
  5479  			v.Aux = symToAux(s)
  5480  			v.AddArg2(ptr, idx)
  5481  			return true
  5482  		}
  5483  		break
  5484  	}
  5485  	// match: (ADD x (NEG y))
  5486  	// result: (SUB x y)
  5487  	for {
  5488  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5489  			x := v_0
  5490  			if v_1.Op != OpS390XNEG {
  5491  				continue
  5492  			}
  5493  			y := v_1.Args[0]
  5494  			v.reset(OpS390XSUB)
  5495  			v.AddArg2(x, y)
  5496  			return true
  5497  		}
  5498  		break
  5499  	}
  5500  	// match: (ADD <t> x g:(MOVDload [off] {sym} ptr mem))
  5501  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5502  	// result: (ADDload <t> [off] {sym} x ptr mem)
  5503  	for {
  5504  		t := v.Type
  5505  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5506  			x := v_0
  5507  			g := v_1
  5508  			if g.Op != OpS390XMOVDload {
  5509  				continue
  5510  			}
  5511  			off := auxIntToInt32(g.AuxInt)
  5512  			sym := auxToSym(g.Aux)
  5513  			mem := g.Args[1]
  5514  			ptr := g.Args[0]
  5515  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5516  				continue
  5517  			}
  5518  			v.reset(OpS390XADDload)
  5519  			v.Type = t
  5520  			v.AuxInt = int32ToAuxInt(off)
  5521  			v.Aux = symToAux(sym)
  5522  			v.AddArg3(x, ptr, mem)
  5523  			return true
  5524  		}
  5525  		break
  5526  	}
  5527  	return false
  5528  }
  5529  func rewriteValueS390X_OpS390XADDC(v *Value) bool {
  5530  	v_1 := v.Args[1]
  5531  	v_0 := v.Args[0]
  5532  	// match: (ADDC x (MOVDconst [c]))
  5533  	// cond: is16Bit(c)
  5534  	// result: (ADDCconst x [int16(c)])
  5535  	for {
  5536  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5537  			x := v_0
  5538  			if v_1.Op != OpS390XMOVDconst {
  5539  				continue
  5540  			}
  5541  			c := auxIntToInt64(v_1.AuxInt)
  5542  			if !(is16Bit(c)) {
  5543  				continue
  5544  			}
  5545  			v.reset(OpS390XADDCconst)
  5546  			v.AuxInt = int16ToAuxInt(int16(c))
  5547  			v.AddArg(x)
  5548  			return true
  5549  		}
  5550  		break
  5551  	}
  5552  	return false
  5553  }
  5554  func rewriteValueS390X_OpS390XADDE(v *Value) bool {
  5555  	v_2 := v.Args[2]
  5556  	v_1 := v.Args[1]
  5557  	v_0 := v.Args[0]
  5558  	// match: (ADDE x y (FlagEQ))
  5559  	// result: (ADDC x y)
  5560  	for {
  5561  		x := v_0
  5562  		y := v_1
  5563  		if v_2.Op != OpS390XFlagEQ {
  5564  			break
  5565  		}
  5566  		v.reset(OpS390XADDC)
  5567  		v.AddArg2(x, y)
  5568  		return true
  5569  	}
  5570  	// match: (ADDE x y (FlagLT))
  5571  	// result: (ADDC x y)
  5572  	for {
  5573  		x := v_0
  5574  		y := v_1
  5575  		if v_2.Op != OpS390XFlagLT {
  5576  			break
  5577  		}
  5578  		v.reset(OpS390XADDC)
  5579  		v.AddArg2(x, y)
  5580  		return true
  5581  	}
  5582  	// match: (ADDE x y (Select1 (ADDCconst [-1] (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) c)))))
  5583  	// result: (ADDE x y c)
  5584  	for {
  5585  		x := v_0
  5586  		y := v_1
  5587  		if v_2.Op != OpSelect1 {
  5588  			break
  5589  		}
  5590  		v_2_0 := v_2.Args[0]
  5591  		if v_2_0.Op != OpS390XADDCconst || auxIntToInt16(v_2_0.AuxInt) != -1 {
  5592  			break
  5593  		}
  5594  		v_2_0_0 := v_2_0.Args[0]
  5595  		if v_2_0_0.Op != OpSelect0 {
  5596  			break
  5597  		}
  5598  		v_2_0_0_0 := v_2_0_0.Args[0]
  5599  		if v_2_0_0_0.Op != OpS390XADDE {
  5600  			break
  5601  		}
  5602  		c := v_2_0_0_0.Args[2]
  5603  		v_2_0_0_0_0 := v_2_0_0_0.Args[0]
  5604  		if v_2_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_0.AuxInt) != 0 {
  5605  			break
  5606  		}
  5607  		v_2_0_0_0_1 := v_2_0_0_0.Args[1]
  5608  		if v_2_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_1.AuxInt) != 0 {
  5609  			break
  5610  		}
  5611  		v.reset(OpS390XADDE)
  5612  		v.AddArg3(x, y, c)
  5613  		return true
  5614  	}
  5615  	return false
  5616  }
  5617  func rewriteValueS390X_OpS390XADDW(v *Value) bool {
  5618  	v_1 := v.Args[1]
  5619  	v_0 := v.Args[0]
  5620  	// match: (ADDW x (MOVDconst [c]))
  5621  	// result: (ADDWconst [int32(c)] x)
  5622  	for {
  5623  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5624  			x := v_0
  5625  			if v_1.Op != OpS390XMOVDconst {
  5626  				continue
  5627  			}
  5628  			c := auxIntToInt64(v_1.AuxInt)
  5629  			v.reset(OpS390XADDWconst)
  5630  			v.AuxInt = int32ToAuxInt(int32(c))
  5631  			v.AddArg(x)
  5632  			return true
  5633  		}
  5634  		break
  5635  	}
  5636  	// match: (ADDW x (NEGW y))
  5637  	// result: (SUBW x y)
  5638  	for {
  5639  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5640  			x := v_0
  5641  			if v_1.Op != OpS390XNEGW {
  5642  				continue
  5643  			}
  5644  			y := v_1.Args[0]
  5645  			v.reset(OpS390XSUBW)
  5646  			v.AddArg2(x, y)
  5647  			return true
  5648  		}
  5649  		break
  5650  	}
  5651  	// match: (ADDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5652  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5653  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5654  	for {
  5655  		t := v.Type
  5656  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5657  			x := v_0
  5658  			g := v_1
  5659  			if g.Op != OpS390XMOVWload {
  5660  				continue
  5661  			}
  5662  			off := auxIntToInt32(g.AuxInt)
  5663  			sym := auxToSym(g.Aux)
  5664  			mem := g.Args[1]
  5665  			ptr := g.Args[0]
  5666  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5667  				continue
  5668  			}
  5669  			v.reset(OpS390XADDWload)
  5670  			v.Type = t
  5671  			v.AuxInt = int32ToAuxInt(off)
  5672  			v.Aux = symToAux(sym)
  5673  			v.AddArg3(x, ptr, mem)
  5674  			return true
  5675  		}
  5676  		break
  5677  	}
  5678  	// match: (ADDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  5679  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5680  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5681  	for {
  5682  		t := v.Type
  5683  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5684  			x := v_0
  5685  			g := v_1
  5686  			if g.Op != OpS390XMOVWZload {
  5687  				continue
  5688  			}
  5689  			off := auxIntToInt32(g.AuxInt)
  5690  			sym := auxToSym(g.Aux)
  5691  			mem := g.Args[1]
  5692  			ptr := g.Args[0]
  5693  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5694  				continue
  5695  			}
  5696  			v.reset(OpS390XADDWload)
  5697  			v.Type = t
  5698  			v.AuxInt = int32ToAuxInt(off)
  5699  			v.Aux = symToAux(sym)
  5700  			v.AddArg3(x, ptr, mem)
  5701  			return true
  5702  		}
  5703  		break
  5704  	}
  5705  	return false
  5706  }
  5707  func rewriteValueS390X_OpS390XADDWconst(v *Value) bool {
  5708  	v_0 := v.Args[0]
  5709  	// match: (ADDWconst [c] x)
  5710  	// cond: int32(c)==0
  5711  	// result: x
  5712  	for {
  5713  		c := auxIntToInt32(v.AuxInt)
  5714  		x := v_0
  5715  		if !(int32(c) == 0) {
  5716  			break
  5717  		}
  5718  		v.copyOf(x)
  5719  		return true
  5720  	}
  5721  	// match: (ADDWconst [c] (MOVDconst [d]))
  5722  	// result: (MOVDconst [int64(c)+d])
  5723  	for {
  5724  		c := auxIntToInt32(v.AuxInt)
  5725  		if v_0.Op != OpS390XMOVDconst {
  5726  			break
  5727  		}
  5728  		d := auxIntToInt64(v_0.AuxInt)
  5729  		v.reset(OpS390XMOVDconst)
  5730  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5731  		return true
  5732  	}
  5733  	// match: (ADDWconst [c] (ADDWconst [d] x))
  5734  	// result: (ADDWconst [int32(c+d)] x)
  5735  	for {
  5736  		c := auxIntToInt32(v.AuxInt)
  5737  		if v_0.Op != OpS390XADDWconst {
  5738  			break
  5739  		}
  5740  		d := auxIntToInt32(v_0.AuxInt)
  5741  		x := v_0.Args[0]
  5742  		v.reset(OpS390XADDWconst)
  5743  		v.AuxInt = int32ToAuxInt(int32(c + d))
  5744  		v.AddArg(x)
  5745  		return true
  5746  	}
  5747  	return false
  5748  }
  5749  func rewriteValueS390X_OpS390XADDWload(v *Value) bool {
  5750  	v_2 := v.Args[2]
  5751  	v_1 := v.Args[1]
  5752  	v_0 := v.Args[0]
  5753  	// match: (ADDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5754  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5755  	// result: (ADDWload [off1+off2] {sym} x ptr mem)
  5756  	for {
  5757  		off1 := auxIntToInt32(v.AuxInt)
  5758  		sym := auxToSym(v.Aux)
  5759  		x := v_0
  5760  		if v_1.Op != OpS390XADDconst {
  5761  			break
  5762  		}
  5763  		off2 := auxIntToInt32(v_1.AuxInt)
  5764  		ptr := v_1.Args[0]
  5765  		mem := v_2
  5766  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5767  			break
  5768  		}
  5769  		v.reset(OpS390XADDWload)
  5770  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5771  		v.Aux = symToAux(sym)
  5772  		v.AddArg3(x, ptr, mem)
  5773  		return true
  5774  	}
  5775  	// match: (ADDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5776  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5777  	// result: (ADDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5778  	for {
  5779  		o1 := auxIntToInt32(v.AuxInt)
  5780  		s1 := auxToSym(v.Aux)
  5781  		x := v_0
  5782  		if v_1.Op != OpS390XMOVDaddr {
  5783  			break
  5784  		}
  5785  		o2 := auxIntToInt32(v_1.AuxInt)
  5786  		s2 := auxToSym(v_1.Aux)
  5787  		ptr := v_1.Args[0]
  5788  		mem := v_2
  5789  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5790  			break
  5791  		}
  5792  		v.reset(OpS390XADDWload)
  5793  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5794  		v.Aux = symToAux(mergeSym(s1, s2))
  5795  		v.AddArg3(x, ptr, mem)
  5796  		return true
  5797  	}
  5798  	return false
  5799  }
  5800  func rewriteValueS390X_OpS390XADDconst(v *Value) bool {
  5801  	v_0 := v.Args[0]
  5802  	// match: (ADDconst [c] (MOVDaddr [d] {s} x:(SB)))
  5803  	// cond: ((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))
  5804  	// result: (MOVDaddr [c+d] {s} x)
  5805  	for {
  5806  		c := auxIntToInt32(v.AuxInt)
  5807  		if v_0.Op != OpS390XMOVDaddr {
  5808  			break
  5809  		}
  5810  		d := auxIntToInt32(v_0.AuxInt)
  5811  		s := auxToSym(v_0.Aux)
  5812  		x := v_0.Args[0]
  5813  		if x.Op != OpSB || !(((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))) {
  5814  			break
  5815  		}
  5816  		v.reset(OpS390XMOVDaddr)
  5817  		v.AuxInt = int32ToAuxInt(c + d)
  5818  		v.Aux = symToAux(s)
  5819  		v.AddArg(x)
  5820  		return true
  5821  	}
  5822  	// match: (ADDconst [c] (MOVDaddr [d] {s} x))
  5823  	// cond: x.Op != OpSB && is20Bit(int64(c)+int64(d))
  5824  	// result: (MOVDaddr [c+d] {s} x)
  5825  	for {
  5826  		c := auxIntToInt32(v.AuxInt)
  5827  		if v_0.Op != OpS390XMOVDaddr {
  5828  			break
  5829  		}
  5830  		d := auxIntToInt32(v_0.AuxInt)
  5831  		s := auxToSym(v_0.Aux)
  5832  		x := v_0.Args[0]
  5833  		if !(x.Op != OpSB && is20Bit(int64(c)+int64(d))) {
  5834  			break
  5835  		}
  5836  		v.reset(OpS390XMOVDaddr)
  5837  		v.AuxInt = int32ToAuxInt(c + d)
  5838  		v.Aux = symToAux(s)
  5839  		v.AddArg(x)
  5840  		return true
  5841  	}
  5842  	// match: (ADDconst [c] (MOVDaddridx [d] {s} x y))
  5843  	// cond: is20Bit(int64(c)+int64(d))
  5844  	// result: (MOVDaddridx [c+d] {s} x y)
  5845  	for {
  5846  		c := auxIntToInt32(v.AuxInt)
  5847  		if v_0.Op != OpS390XMOVDaddridx {
  5848  			break
  5849  		}
  5850  		d := auxIntToInt32(v_0.AuxInt)
  5851  		s := auxToSym(v_0.Aux)
  5852  		y := v_0.Args[1]
  5853  		x := v_0.Args[0]
  5854  		if !(is20Bit(int64(c) + int64(d))) {
  5855  			break
  5856  		}
  5857  		v.reset(OpS390XMOVDaddridx)
  5858  		v.AuxInt = int32ToAuxInt(c + d)
  5859  		v.Aux = symToAux(s)
  5860  		v.AddArg2(x, y)
  5861  		return true
  5862  	}
  5863  	// match: (ADDconst [0] x)
  5864  	// result: x
  5865  	for {
  5866  		if auxIntToInt32(v.AuxInt) != 0 {
  5867  			break
  5868  		}
  5869  		x := v_0
  5870  		v.copyOf(x)
  5871  		return true
  5872  	}
  5873  	// match: (ADDconst [c] (MOVDconst [d]))
  5874  	// result: (MOVDconst [int64(c)+d])
  5875  	for {
  5876  		c := auxIntToInt32(v.AuxInt)
  5877  		if v_0.Op != OpS390XMOVDconst {
  5878  			break
  5879  		}
  5880  		d := auxIntToInt64(v_0.AuxInt)
  5881  		v.reset(OpS390XMOVDconst)
  5882  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5883  		return true
  5884  	}
  5885  	// match: (ADDconst [c] (ADDconst [d] x))
  5886  	// cond: is32Bit(int64(c)+int64(d))
  5887  	// result: (ADDconst [c+d] x)
  5888  	for {
  5889  		c := auxIntToInt32(v.AuxInt)
  5890  		if v_0.Op != OpS390XADDconst {
  5891  			break
  5892  		}
  5893  		d := auxIntToInt32(v_0.AuxInt)
  5894  		x := v_0.Args[0]
  5895  		if !(is32Bit(int64(c) + int64(d))) {
  5896  			break
  5897  		}
  5898  		v.reset(OpS390XADDconst)
  5899  		v.AuxInt = int32ToAuxInt(c + d)
  5900  		v.AddArg(x)
  5901  		return true
  5902  	}
  5903  	return false
  5904  }
  5905  func rewriteValueS390X_OpS390XADDload(v *Value) bool {
  5906  	v_2 := v.Args[2]
  5907  	v_1 := v.Args[1]
  5908  	v_0 := v.Args[0]
  5909  	b := v.Block
  5910  	// match: (ADDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  5911  	// cond: isSamePtr(ptr1, ptr2)
  5912  	// result: (ADD x (LGDR <t> y))
  5913  	for {
  5914  		t := v.Type
  5915  		off := auxIntToInt32(v.AuxInt)
  5916  		sym := auxToSym(v.Aux)
  5917  		x := v_0
  5918  		ptr1 := v_1
  5919  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  5920  			break
  5921  		}
  5922  		y := v_2.Args[1]
  5923  		ptr2 := v_2.Args[0]
  5924  		if !(isSamePtr(ptr1, ptr2)) {
  5925  			break
  5926  		}
  5927  		v.reset(OpS390XADD)
  5928  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  5929  		v0.AddArg(y)
  5930  		v.AddArg2(x, v0)
  5931  		return true
  5932  	}
  5933  	// match: (ADDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5934  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5935  	// result: (ADDload [off1+off2] {sym} x ptr mem)
  5936  	for {
  5937  		off1 := auxIntToInt32(v.AuxInt)
  5938  		sym := auxToSym(v.Aux)
  5939  		x := v_0
  5940  		if v_1.Op != OpS390XADDconst {
  5941  			break
  5942  		}
  5943  		off2 := auxIntToInt32(v_1.AuxInt)
  5944  		ptr := v_1.Args[0]
  5945  		mem := v_2
  5946  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5947  			break
  5948  		}
  5949  		v.reset(OpS390XADDload)
  5950  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5951  		v.Aux = symToAux(sym)
  5952  		v.AddArg3(x, ptr, mem)
  5953  		return true
  5954  	}
  5955  	// match: (ADDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5956  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5957  	// result: (ADDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5958  	for {
  5959  		o1 := auxIntToInt32(v.AuxInt)
  5960  		s1 := auxToSym(v.Aux)
  5961  		x := v_0
  5962  		if v_1.Op != OpS390XMOVDaddr {
  5963  			break
  5964  		}
  5965  		o2 := auxIntToInt32(v_1.AuxInt)
  5966  		s2 := auxToSym(v_1.Aux)
  5967  		ptr := v_1.Args[0]
  5968  		mem := v_2
  5969  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5970  			break
  5971  		}
  5972  		v.reset(OpS390XADDload)
  5973  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5974  		v.Aux = symToAux(mergeSym(s1, s2))
  5975  		v.AddArg3(x, ptr, mem)
  5976  		return true
  5977  	}
  5978  	return false
  5979  }
  5980  func rewriteValueS390X_OpS390XAND(v *Value) bool {
  5981  	v_1 := v.Args[1]
  5982  	v_0 := v.Args[0]
  5983  	b := v.Block
  5984  	typ := &b.Func.Config.Types
  5985  	// match: (AND x (MOVDconst [c]))
  5986  	// cond: s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil
  5987  	// result: (RISBGZ x {*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c))})
  5988  	for {
  5989  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5990  			x := v_0
  5991  			if v_1.Op != OpS390XMOVDconst {
  5992  				continue
  5993  			}
  5994  			c := auxIntToInt64(v_1.AuxInt)
  5995  			if !(s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil) {
  5996  				continue
  5997  			}
  5998  			v.reset(OpS390XRISBGZ)
  5999  			v.Aux = s390xRotateParamsToAux(*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)))
  6000  			v.AddArg(x)
  6001  			return true
  6002  		}
  6003  		break
  6004  	}
  6005  	// match: (AND x (MOVDconst [c]))
  6006  	// cond: is32Bit(c) && c < 0
  6007  	// result: (ANDconst [c] x)
  6008  	for {
  6009  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6010  			x := v_0
  6011  			if v_1.Op != OpS390XMOVDconst {
  6012  				continue
  6013  			}
  6014  			c := auxIntToInt64(v_1.AuxInt)
  6015  			if !(is32Bit(c) && c < 0) {
  6016  				continue
  6017  			}
  6018  			v.reset(OpS390XANDconst)
  6019  			v.AuxInt = int64ToAuxInt(c)
  6020  			v.AddArg(x)
  6021  			return true
  6022  		}
  6023  		break
  6024  	}
  6025  	// match: (AND x (MOVDconst [c]))
  6026  	// cond: is32Bit(c) && c >= 0
  6027  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(c)] x))
  6028  	for {
  6029  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6030  			x := v_0
  6031  			if v_1.Op != OpS390XMOVDconst {
  6032  				continue
  6033  			}
  6034  			c := auxIntToInt64(v_1.AuxInt)
  6035  			if !(is32Bit(c) && c >= 0) {
  6036  				continue
  6037  			}
  6038  			v.reset(OpS390XMOVWZreg)
  6039  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  6040  			v0.AuxInt = int32ToAuxInt(int32(c))
  6041  			v0.AddArg(x)
  6042  			v.AddArg(v0)
  6043  			return true
  6044  		}
  6045  		break
  6046  	}
  6047  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  6048  	// result: (MOVDconst [c&d])
  6049  	for {
  6050  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6051  			if v_0.Op != OpS390XMOVDconst {
  6052  				continue
  6053  			}
  6054  			c := auxIntToInt64(v_0.AuxInt)
  6055  			if v_1.Op != OpS390XMOVDconst {
  6056  				continue
  6057  			}
  6058  			d := auxIntToInt64(v_1.AuxInt)
  6059  			v.reset(OpS390XMOVDconst)
  6060  			v.AuxInt = int64ToAuxInt(c & d)
  6061  			return true
  6062  		}
  6063  		break
  6064  	}
  6065  	// match: (AND x x)
  6066  	// result: x
  6067  	for {
  6068  		x := v_0
  6069  		if x != v_1 {
  6070  			break
  6071  		}
  6072  		v.copyOf(x)
  6073  		return true
  6074  	}
  6075  	// match: (AND <t> x g:(MOVDload [off] {sym} ptr mem))
  6076  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6077  	// result: (ANDload <t> [off] {sym} x ptr mem)
  6078  	for {
  6079  		t := v.Type
  6080  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6081  			x := v_0
  6082  			g := v_1
  6083  			if g.Op != OpS390XMOVDload {
  6084  				continue
  6085  			}
  6086  			off := auxIntToInt32(g.AuxInt)
  6087  			sym := auxToSym(g.Aux)
  6088  			mem := g.Args[1]
  6089  			ptr := g.Args[0]
  6090  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6091  				continue
  6092  			}
  6093  			v.reset(OpS390XANDload)
  6094  			v.Type = t
  6095  			v.AuxInt = int32ToAuxInt(off)
  6096  			v.Aux = symToAux(sym)
  6097  			v.AddArg3(x, ptr, mem)
  6098  			return true
  6099  		}
  6100  		break
  6101  	}
  6102  	return false
  6103  }
  6104  func rewriteValueS390X_OpS390XANDW(v *Value) bool {
  6105  	v_1 := v.Args[1]
  6106  	v_0 := v.Args[0]
  6107  	// match: (ANDW x (MOVDconst [c]))
  6108  	// result: (ANDWconst [int32(c)] x)
  6109  	for {
  6110  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6111  			x := v_0
  6112  			if v_1.Op != OpS390XMOVDconst {
  6113  				continue
  6114  			}
  6115  			c := auxIntToInt64(v_1.AuxInt)
  6116  			v.reset(OpS390XANDWconst)
  6117  			v.AuxInt = int32ToAuxInt(int32(c))
  6118  			v.AddArg(x)
  6119  			return true
  6120  		}
  6121  		break
  6122  	}
  6123  	// match: (ANDW x x)
  6124  	// result: x
  6125  	for {
  6126  		x := v_0
  6127  		if x != v_1 {
  6128  			break
  6129  		}
  6130  		v.copyOf(x)
  6131  		return true
  6132  	}
  6133  	// match: (ANDW <t> x g:(MOVWload [off] {sym} ptr mem))
  6134  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6135  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6136  	for {
  6137  		t := v.Type
  6138  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6139  			x := v_0
  6140  			g := v_1
  6141  			if g.Op != OpS390XMOVWload {
  6142  				continue
  6143  			}
  6144  			off := auxIntToInt32(g.AuxInt)
  6145  			sym := auxToSym(g.Aux)
  6146  			mem := g.Args[1]
  6147  			ptr := g.Args[0]
  6148  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6149  				continue
  6150  			}
  6151  			v.reset(OpS390XANDWload)
  6152  			v.Type = t
  6153  			v.AuxInt = int32ToAuxInt(off)
  6154  			v.Aux = symToAux(sym)
  6155  			v.AddArg3(x, ptr, mem)
  6156  			return true
  6157  		}
  6158  		break
  6159  	}
  6160  	// match: (ANDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  6161  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6162  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6163  	for {
  6164  		t := v.Type
  6165  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6166  			x := v_0
  6167  			g := v_1
  6168  			if g.Op != OpS390XMOVWZload {
  6169  				continue
  6170  			}
  6171  			off := auxIntToInt32(g.AuxInt)
  6172  			sym := auxToSym(g.Aux)
  6173  			mem := g.Args[1]
  6174  			ptr := g.Args[0]
  6175  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6176  				continue
  6177  			}
  6178  			v.reset(OpS390XANDWload)
  6179  			v.Type = t
  6180  			v.AuxInt = int32ToAuxInt(off)
  6181  			v.Aux = symToAux(sym)
  6182  			v.AddArg3(x, ptr, mem)
  6183  			return true
  6184  		}
  6185  		break
  6186  	}
  6187  	return false
  6188  }
  6189  func rewriteValueS390X_OpS390XANDWconst(v *Value) bool {
  6190  	v_0 := v.Args[0]
  6191  	// match: (ANDWconst [c] (ANDWconst [d] x))
  6192  	// result: (ANDWconst [c&d] x)
  6193  	for {
  6194  		c := auxIntToInt32(v.AuxInt)
  6195  		if v_0.Op != OpS390XANDWconst {
  6196  			break
  6197  		}
  6198  		d := auxIntToInt32(v_0.AuxInt)
  6199  		x := v_0.Args[0]
  6200  		v.reset(OpS390XANDWconst)
  6201  		v.AuxInt = int32ToAuxInt(c & d)
  6202  		v.AddArg(x)
  6203  		return true
  6204  	}
  6205  	// match: (ANDWconst [0x00ff] x)
  6206  	// result: (MOVBZreg x)
  6207  	for {
  6208  		if auxIntToInt32(v.AuxInt) != 0x00ff {
  6209  			break
  6210  		}
  6211  		x := v_0
  6212  		v.reset(OpS390XMOVBZreg)
  6213  		v.AddArg(x)
  6214  		return true
  6215  	}
  6216  	// match: (ANDWconst [0xffff] x)
  6217  	// result: (MOVHZreg x)
  6218  	for {
  6219  		if auxIntToInt32(v.AuxInt) != 0xffff {
  6220  			break
  6221  		}
  6222  		x := v_0
  6223  		v.reset(OpS390XMOVHZreg)
  6224  		v.AddArg(x)
  6225  		return true
  6226  	}
  6227  	// match: (ANDWconst [c] _)
  6228  	// cond: int32(c)==0
  6229  	// result: (MOVDconst [0])
  6230  	for {
  6231  		c := auxIntToInt32(v.AuxInt)
  6232  		if !(int32(c) == 0) {
  6233  			break
  6234  		}
  6235  		v.reset(OpS390XMOVDconst)
  6236  		v.AuxInt = int64ToAuxInt(0)
  6237  		return true
  6238  	}
  6239  	// match: (ANDWconst [c] x)
  6240  	// cond: int32(c)==-1
  6241  	// result: x
  6242  	for {
  6243  		c := auxIntToInt32(v.AuxInt)
  6244  		x := v_0
  6245  		if !(int32(c) == -1) {
  6246  			break
  6247  		}
  6248  		v.copyOf(x)
  6249  		return true
  6250  	}
  6251  	// match: (ANDWconst [c] (MOVDconst [d]))
  6252  	// result: (MOVDconst [int64(c)&d])
  6253  	for {
  6254  		c := auxIntToInt32(v.AuxInt)
  6255  		if v_0.Op != OpS390XMOVDconst {
  6256  			break
  6257  		}
  6258  		d := auxIntToInt64(v_0.AuxInt)
  6259  		v.reset(OpS390XMOVDconst)
  6260  		v.AuxInt = int64ToAuxInt(int64(c) & d)
  6261  		return true
  6262  	}
  6263  	return false
  6264  }
  6265  func rewriteValueS390X_OpS390XANDWload(v *Value) bool {
  6266  	v_2 := v.Args[2]
  6267  	v_1 := v.Args[1]
  6268  	v_0 := v.Args[0]
  6269  	// match: (ANDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6270  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6271  	// result: (ANDWload [off1+off2] {sym} x ptr mem)
  6272  	for {
  6273  		off1 := auxIntToInt32(v.AuxInt)
  6274  		sym := auxToSym(v.Aux)
  6275  		x := v_0
  6276  		if v_1.Op != OpS390XADDconst {
  6277  			break
  6278  		}
  6279  		off2 := auxIntToInt32(v_1.AuxInt)
  6280  		ptr := v_1.Args[0]
  6281  		mem := v_2
  6282  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6283  			break
  6284  		}
  6285  		v.reset(OpS390XANDWload)
  6286  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6287  		v.Aux = symToAux(sym)
  6288  		v.AddArg3(x, ptr, mem)
  6289  		return true
  6290  	}
  6291  	// match: (ANDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6292  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6293  	// result: (ANDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6294  	for {
  6295  		o1 := auxIntToInt32(v.AuxInt)
  6296  		s1 := auxToSym(v.Aux)
  6297  		x := v_0
  6298  		if v_1.Op != OpS390XMOVDaddr {
  6299  			break
  6300  		}
  6301  		o2 := auxIntToInt32(v_1.AuxInt)
  6302  		s2 := auxToSym(v_1.Aux)
  6303  		ptr := v_1.Args[0]
  6304  		mem := v_2
  6305  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6306  			break
  6307  		}
  6308  		v.reset(OpS390XANDWload)
  6309  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6310  		v.Aux = symToAux(mergeSym(s1, s2))
  6311  		v.AddArg3(x, ptr, mem)
  6312  		return true
  6313  	}
  6314  	return false
  6315  }
  6316  func rewriteValueS390X_OpS390XANDconst(v *Value) bool {
  6317  	v_0 := v.Args[0]
  6318  	// match: (ANDconst [c] (ANDconst [d] x))
  6319  	// result: (ANDconst [c&d] x)
  6320  	for {
  6321  		c := auxIntToInt64(v.AuxInt)
  6322  		if v_0.Op != OpS390XANDconst {
  6323  			break
  6324  		}
  6325  		d := auxIntToInt64(v_0.AuxInt)
  6326  		x := v_0.Args[0]
  6327  		v.reset(OpS390XANDconst)
  6328  		v.AuxInt = int64ToAuxInt(c & d)
  6329  		v.AddArg(x)
  6330  		return true
  6331  	}
  6332  	// match: (ANDconst [0] _)
  6333  	// result: (MOVDconst [0])
  6334  	for {
  6335  		if auxIntToInt64(v.AuxInt) != 0 {
  6336  			break
  6337  		}
  6338  		v.reset(OpS390XMOVDconst)
  6339  		v.AuxInt = int64ToAuxInt(0)
  6340  		return true
  6341  	}
  6342  	// match: (ANDconst [-1] x)
  6343  	// result: x
  6344  	for {
  6345  		if auxIntToInt64(v.AuxInt) != -1 {
  6346  			break
  6347  		}
  6348  		x := v_0
  6349  		v.copyOf(x)
  6350  		return true
  6351  	}
  6352  	// match: (ANDconst [c] (MOVDconst [d]))
  6353  	// result: (MOVDconst [c&d])
  6354  	for {
  6355  		c := auxIntToInt64(v.AuxInt)
  6356  		if v_0.Op != OpS390XMOVDconst {
  6357  			break
  6358  		}
  6359  		d := auxIntToInt64(v_0.AuxInt)
  6360  		v.reset(OpS390XMOVDconst)
  6361  		v.AuxInt = int64ToAuxInt(c & d)
  6362  		return true
  6363  	}
  6364  	return false
  6365  }
  6366  func rewriteValueS390X_OpS390XANDload(v *Value) bool {
  6367  	v_2 := v.Args[2]
  6368  	v_1 := v.Args[1]
  6369  	v_0 := v.Args[0]
  6370  	b := v.Block
  6371  	// match: (ANDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  6372  	// cond: isSamePtr(ptr1, ptr2)
  6373  	// result: (AND x (LGDR <t> y))
  6374  	for {
  6375  		t := v.Type
  6376  		off := auxIntToInt32(v.AuxInt)
  6377  		sym := auxToSym(v.Aux)
  6378  		x := v_0
  6379  		ptr1 := v_1
  6380  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  6381  			break
  6382  		}
  6383  		y := v_2.Args[1]
  6384  		ptr2 := v_2.Args[0]
  6385  		if !(isSamePtr(ptr1, ptr2)) {
  6386  			break
  6387  		}
  6388  		v.reset(OpS390XAND)
  6389  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  6390  		v0.AddArg(y)
  6391  		v.AddArg2(x, v0)
  6392  		return true
  6393  	}
  6394  	// match: (ANDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6395  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6396  	// result: (ANDload [off1+off2] {sym} x ptr mem)
  6397  	for {
  6398  		off1 := auxIntToInt32(v.AuxInt)
  6399  		sym := auxToSym(v.Aux)
  6400  		x := v_0
  6401  		if v_1.Op != OpS390XADDconst {
  6402  			break
  6403  		}
  6404  		off2 := auxIntToInt32(v_1.AuxInt)
  6405  		ptr := v_1.Args[0]
  6406  		mem := v_2
  6407  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6408  			break
  6409  		}
  6410  		v.reset(OpS390XANDload)
  6411  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6412  		v.Aux = symToAux(sym)
  6413  		v.AddArg3(x, ptr, mem)
  6414  		return true
  6415  	}
  6416  	// match: (ANDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6417  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6418  	// result: (ANDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6419  	for {
  6420  		o1 := auxIntToInt32(v.AuxInt)
  6421  		s1 := auxToSym(v.Aux)
  6422  		x := v_0
  6423  		if v_1.Op != OpS390XMOVDaddr {
  6424  			break
  6425  		}
  6426  		o2 := auxIntToInt32(v_1.AuxInt)
  6427  		s2 := auxToSym(v_1.Aux)
  6428  		ptr := v_1.Args[0]
  6429  		mem := v_2
  6430  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6431  			break
  6432  		}
  6433  		v.reset(OpS390XANDload)
  6434  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6435  		v.Aux = symToAux(mergeSym(s1, s2))
  6436  		v.AddArg3(x, ptr, mem)
  6437  		return true
  6438  	}
  6439  	return false
  6440  }
  6441  func rewriteValueS390X_OpS390XCMP(v *Value) bool {
  6442  	v_1 := v.Args[1]
  6443  	v_0 := v.Args[0]
  6444  	b := v.Block
  6445  	// match: (CMP x (MOVDconst [c]))
  6446  	// cond: is32Bit(c)
  6447  	// result: (CMPconst x [int32(c)])
  6448  	for {
  6449  		x := v_0
  6450  		if v_1.Op != OpS390XMOVDconst {
  6451  			break
  6452  		}
  6453  		c := auxIntToInt64(v_1.AuxInt)
  6454  		if !(is32Bit(c)) {
  6455  			break
  6456  		}
  6457  		v.reset(OpS390XCMPconst)
  6458  		v.AuxInt = int32ToAuxInt(int32(c))
  6459  		v.AddArg(x)
  6460  		return true
  6461  	}
  6462  	// match: (CMP (MOVDconst [c]) x)
  6463  	// cond: is32Bit(c)
  6464  	// result: (InvertFlags (CMPconst x [int32(c)]))
  6465  	for {
  6466  		if v_0.Op != OpS390XMOVDconst {
  6467  			break
  6468  		}
  6469  		c := auxIntToInt64(v_0.AuxInt)
  6470  		x := v_1
  6471  		if !(is32Bit(c)) {
  6472  			break
  6473  		}
  6474  		v.reset(OpS390XInvertFlags)
  6475  		v0 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  6476  		v0.AuxInt = int32ToAuxInt(int32(c))
  6477  		v0.AddArg(x)
  6478  		v.AddArg(v0)
  6479  		return true
  6480  	}
  6481  	// match: (CMP x y)
  6482  	// cond: canonLessThan(x,y)
  6483  	// result: (InvertFlags (CMP y x))
  6484  	for {
  6485  		x := v_0
  6486  		y := v_1
  6487  		if !(canonLessThan(x, y)) {
  6488  			break
  6489  		}
  6490  		v.reset(OpS390XInvertFlags)
  6491  		v0 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  6492  		v0.AddArg2(y, x)
  6493  		v.AddArg(v0)
  6494  		return true
  6495  	}
  6496  	return false
  6497  }
  6498  func rewriteValueS390X_OpS390XCMPU(v *Value) bool {
  6499  	v_1 := v.Args[1]
  6500  	v_0 := v.Args[0]
  6501  	b := v.Block
  6502  	// match: (CMPU x (MOVDconst [c]))
  6503  	// cond: isU32Bit(c)
  6504  	// result: (CMPUconst x [int32(c)])
  6505  	for {
  6506  		x := v_0
  6507  		if v_1.Op != OpS390XMOVDconst {
  6508  			break
  6509  		}
  6510  		c := auxIntToInt64(v_1.AuxInt)
  6511  		if !(isU32Bit(c)) {
  6512  			break
  6513  		}
  6514  		v.reset(OpS390XCMPUconst)
  6515  		v.AuxInt = int32ToAuxInt(int32(c))
  6516  		v.AddArg(x)
  6517  		return true
  6518  	}
  6519  	// match: (CMPU (MOVDconst [c]) x)
  6520  	// cond: isU32Bit(c)
  6521  	// result: (InvertFlags (CMPUconst x [int32(c)]))
  6522  	for {
  6523  		if v_0.Op != OpS390XMOVDconst {
  6524  			break
  6525  		}
  6526  		c := auxIntToInt64(v_0.AuxInt)
  6527  		x := v_1
  6528  		if !(isU32Bit(c)) {
  6529  			break
  6530  		}
  6531  		v.reset(OpS390XInvertFlags)
  6532  		v0 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  6533  		v0.AuxInt = int32ToAuxInt(int32(c))
  6534  		v0.AddArg(x)
  6535  		v.AddArg(v0)
  6536  		return true
  6537  	}
  6538  	// match: (CMPU x y)
  6539  	// cond: canonLessThan(x,y)
  6540  	// result: (InvertFlags (CMPU y x))
  6541  	for {
  6542  		x := v_0
  6543  		y := v_1
  6544  		if !(canonLessThan(x, y)) {
  6545  			break
  6546  		}
  6547  		v.reset(OpS390XInvertFlags)
  6548  		v0 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  6549  		v0.AddArg2(y, x)
  6550  		v.AddArg(v0)
  6551  		return true
  6552  	}
  6553  	return false
  6554  }
  6555  func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
  6556  	v_0 := v.Args[0]
  6557  	// match: (CMPUconst (MOVDconst [x]) [y])
  6558  	// cond: uint64(x)==uint64(y)
  6559  	// result: (FlagEQ)
  6560  	for {
  6561  		y := auxIntToInt32(v.AuxInt)
  6562  		if v_0.Op != OpS390XMOVDconst {
  6563  			break
  6564  		}
  6565  		x := auxIntToInt64(v_0.AuxInt)
  6566  		if !(uint64(x) == uint64(y)) {
  6567  			break
  6568  		}
  6569  		v.reset(OpS390XFlagEQ)
  6570  		return true
  6571  	}
  6572  	// match: (CMPUconst (MOVDconst [x]) [y])
  6573  	// cond: uint64(x)<uint64(y)
  6574  	// result: (FlagLT)
  6575  	for {
  6576  		y := auxIntToInt32(v.AuxInt)
  6577  		if v_0.Op != OpS390XMOVDconst {
  6578  			break
  6579  		}
  6580  		x := auxIntToInt64(v_0.AuxInt)
  6581  		if !(uint64(x) < uint64(y)) {
  6582  			break
  6583  		}
  6584  		v.reset(OpS390XFlagLT)
  6585  		return true
  6586  	}
  6587  	// match: (CMPUconst (MOVDconst [x]) [y])
  6588  	// cond: uint64(x)>uint64(y)
  6589  	// result: (FlagGT)
  6590  	for {
  6591  		y := auxIntToInt32(v.AuxInt)
  6592  		if v_0.Op != OpS390XMOVDconst {
  6593  			break
  6594  		}
  6595  		x := auxIntToInt64(v_0.AuxInt)
  6596  		if !(uint64(x) > uint64(y)) {
  6597  			break
  6598  		}
  6599  		v.reset(OpS390XFlagGT)
  6600  		return true
  6601  	}
  6602  	// match: (CMPUconst (SRDconst _ [c]) [n])
  6603  	// cond: c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)
  6604  	// result: (FlagLT)
  6605  	for {
  6606  		n := auxIntToInt32(v.AuxInt)
  6607  		if v_0.Op != OpS390XSRDconst {
  6608  			break
  6609  		}
  6610  		c := auxIntToUint8(v_0.AuxInt)
  6611  		if !(c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)) {
  6612  			break
  6613  		}
  6614  		v.reset(OpS390XFlagLT)
  6615  		return true
  6616  	}
  6617  	// match: (CMPUconst (RISBGZ x {r}) [c])
  6618  	// cond: r.OutMask() < uint64(uint32(c))
  6619  	// result: (FlagLT)
  6620  	for {
  6621  		c := auxIntToInt32(v.AuxInt)
  6622  		if v_0.Op != OpS390XRISBGZ {
  6623  			break
  6624  		}
  6625  		r := auxToS390xRotateParams(v_0.Aux)
  6626  		if !(r.OutMask() < uint64(uint32(c))) {
  6627  			break
  6628  		}
  6629  		v.reset(OpS390XFlagLT)
  6630  		return true
  6631  	}
  6632  	// match: (CMPUconst (MOVWZreg x) [c])
  6633  	// result: (CMPWUconst x [c])
  6634  	for {
  6635  		c := auxIntToInt32(v.AuxInt)
  6636  		if v_0.Op != OpS390XMOVWZreg {
  6637  			break
  6638  		}
  6639  		x := v_0.Args[0]
  6640  		v.reset(OpS390XCMPWUconst)
  6641  		v.AuxInt = int32ToAuxInt(c)
  6642  		v.AddArg(x)
  6643  		return true
  6644  	}
  6645  	// match: (CMPUconst x:(MOVHreg _) [c])
  6646  	// result: (CMPWUconst x [c])
  6647  	for {
  6648  		c := auxIntToInt32(v.AuxInt)
  6649  		x := v_0
  6650  		if x.Op != OpS390XMOVHreg {
  6651  			break
  6652  		}
  6653  		v.reset(OpS390XCMPWUconst)
  6654  		v.AuxInt = int32ToAuxInt(c)
  6655  		v.AddArg(x)
  6656  		return true
  6657  	}
  6658  	// match: (CMPUconst x:(MOVHZreg _) [c])
  6659  	// result: (CMPWUconst x [c])
  6660  	for {
  6661  		c := auxIntToInt32(v.AuxInt)
  6662  		x := v_0
  6663  		if x.Op != OpS390XMOVHZreg {
  6664  			break
  6665  		}
  6666  		v.reset(OpS390XCMPWUconst)
  6667  		v.AuxInt = int32ToAuxInt(c)
  6668  		v.AddArg(x)
  6669  		return true
  6670  	}
  6671  	// match: (CMPUconst x:(MOVBreg _) [c])
  6672  	// result: (CMPWUconst x [c])
  6673  	for {
  6674  		c := auxIntToInt32(v.AuxInt)
  6675  		x := v_0
  6676  		if x.Op != OpS390XMOVBreg {
  6677  			break
  6678  		}
  6679  		v.reset(OpS390XCMPWUconst)
  6680  		v.AuxInt = int32ToAuxInt(c)
  6681  		v.AddArg(x)
  6682  		return true
  6683  	}
  6684  	// match: (CMPUconst x:(MOVBZreg _) [c])
  6685  	// result: (CMPWUconst x [c])
  6686  	for {
  6687  		c := auxIntToInt32(v.AuxInt)
  6688  		x := v_0
  6689  		if x.Op != OpS390XMOVBZreg {
  6690  			break
  6691  		}
  6692  		v.reset(OpS390XCMPWUconst)
  6693  		v.AuxInt = int32ToAuxInt(c)
  6694  		v.AddArg(x)
  6695  		return true
  6696  	}
  6697  	// match: (CMPUconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  6698  	// cond: int32(m) >= 0
  6699  	// result: (CMPWUconst x [c])
  6700  	for {
  6701  		c := auxIntToInt32(v.AuxInt)
  6702  		if v_0.Op != OpS390XMOVWZreg {
  6703  			break
  6704  		}
  6705  		x := v_0.Args[0]
  6706  		if x.Op != OpS390XANDWconst {
  6707  			break
  6708  		}
  6709  		m := auxIntToInt32(x.AuxInt)
  6710  		if !(int32(m) >= 0) {
  6711  			break
  6712  		}
  6713  		v.reset(OpS390XCMPWUconst)
  6714  		v.AuxInt = int32ToAuxInt(c)
  6715  		v.AddArg(x)
  6716  		return true
  6717  	}
  6718  	// match: (CMPUconst (MOVWreg x:(ANDWconst [m] _)) [c])
  6719  	// cond: int32(m) >= 0
  6720  	// result: (CMPWUconst x [c])
  6721  	for {
  6722  		c := auxIntToInt32(v.AuxInt)
  6723  		if v_0.Op != OpS390XMOVWreg {
  6724  			break
  6725  		}
  6726  		x := v_0.Args[0]
  6727  		if x.Op != OpS390XANDWconst {
  6728  			break
  6729  		}
  6730  		m := auxIntToInt32(x.AuxInt)
  6731  		if !(int32(m) >= 0) {
  6732  			break
  6733  		}
  6734  		v.reset(OpS390XCMPWUconst)
  6735  		v.AuxInt = int32ToAuxInt(c)
  6736  		v.AddArg(x)
  6737  		return true
  6738  	}
  6739  	return false
  6740  }
  6741  func rewriteValueS390X_OpS390XCMPW(v *Value) bool {
  6742  	v_1 := v.Args[1]
  6743  	v_0 := v.Args[0]
  6744  	b := v.Block
  6745  	// match: (CMPW x (MOVDconst [c]))
  6746  	// result: (CMPWconst x [int32(c)])
  6747  	for {
  6748  		x := v_0
  6749  		if v_1.Op != OpS390XMOVDconst {
  6750  			break
  6751  		}
  6752  		c := auxIntToInt64(v_1.AuxInt)
  6753  		v.reset(OpS390XCMPWconst)
  6754  		v.AuxInt = int32ToAuxInt(int32(c))
  6755  		v.AddArg(x)
  6756  		return true
  6757  	}
  6758  	// match: (CMPW (MOVDconst [c]) x)
  6759  	// result: (InvertFlags (CMPWconst x [int32(c)]))
  6760  	for {
  6761  		if v_0.Op != OpS390XMOVDconst {
  6762  			break
  6763  		}
  6764  		c := auxIntToInt64(v_0.AuxInt)
  6765  		x := v_1
  6766  		v.reset(OpS390XInvertFlags)
  6767  		v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags)
  6768  		v0.AuxInt = int32ToAuxInt(int32(c))
  6769  		v0.AddArg(x)
  6770  		v.AddArg(v0)
  6771  		return true
  6772  	}
  6773  	// match: (CMPW x y)
  6774  	// cond: canonLessThan(x,y)
  6775  	// result: (InvertFlags (CMPW y x))
  6776  	for {
  6777  		x := v_0
  6778  		y := v_1
  6779  		if !(canonLessThan(x, y)) {
  6780  			break
  6781  		}
  6782  		v.reset(OpS390XInvertFlags)
  6783  		v0 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  6784  		v0.AddArg2(y, x)
  6785  		v.AddArg(v0)
  6786  		return true
  6787  	}
  6788  	// match: (CMPW x (MOVWreg y))
  6789  	// result: (CMPW x y)
  6790  	for {
  6791  		x := v_0
  6792  		if v_1.Op != OpS390XMOVWreg {
  6793  			break
  6794  		}
  6795  		y := v_1.Args[0]
  6796  		v.reset(OpS390XCMPW)
  6797  		v.AddArg2(x, y)
  6798  		return true
  6799  	}
  6800  	// match: (CMPW x (MOVWZreg y))
  6801  	// result: (CMPW x y)
  6802  	for {
  6803  		x := v_0
  6804  		if v_1.Op != OpS390XMOVWZreg {
  6805  			break
  6806  		}
  6807  		y := v_1.Args[0]
  6808  		v.reset(OpS390XCMPW)
  6809  		v.AddArg2(x, y)
  6810  		return true
  6811  	}
  6812  	// match: (CMPW (MOVWreg x) y)
  6813  	// result: (CMPW x y)
  6814  	for {
  6815  		if v_0.Op != OpS390XMOVWreg {
  6816  			break
  6817  		}
  6818  		x := v_0.Args[0]
  6819  		y := v_1
  6820  		v.reset(OpS390XCMPW)
  6821  		v.AddArg2(x, y)
  6822  		return true
  6823  	}
  6824  	// match: (CMPW (MOVWZreg x) y)
  6825  	// result: (CMPW x y)
  6826  	for {
  6827  		if v_0.Op != OpS390XMOVWZreg {
  6828  			break
  6829  		}
  6830  		x := v_0.Args[0]
  6831  		y := v_1
  6832  		v.reset(OpS390XCMPW)
  6833  		v.AddArg2(x, y)
  6834  		return true
  6835  	}
  6836  	return false
  6837  }
  6838  func rewriteValueS390X_OpS390XCMPWU(v *Value) bool {
  6839  	v_1 := v.Args[1]
  6840  	v_0 := v.Args[0]
  6841  	b := v.Block
  6842  	// match: (CMPWU x (MOVDconst [c]))
  6843  	// result: (CMPWUconst x [int32(c)])
  6844  	for {
  6845  		x := v_0
  6846  		if v_1.Op != OpS390XMOVDconst {
  6847  			break
  6848  		}
  6849  		c := auxIntToInt64(v_1.AuxInt)
  6850  		v.reset(OpS390XCMPWUconst)
  6851  		v.AuxInt = int32ToAuxInt(int32(c))
  6852  		v.AddArg(x)
  6853  		return true
  6854  	}
  6855  	// match: (CMPWU (MOVDconst [c]) x)
  6856  	// result: (InvertFlags (CMPWUconst x [int32(c)]))
  6857  	for {
  6858  		if v_0.Op != OpS390XMOVDconst {
  6859  			break
  6860  		}
  6861  		c := auxIntToInt64(v_0.AuxInt)
  6862  		x := v_1
  6863  		v.reset(OpS390XInvertFlags)
  6864  		v0 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  6865  		v0.AuxInt = int32ToAuxInt(int32(c))
  6866  		v0.AddArg(x)
  6867  		v.AddArg(v0)
  6868  		return true
  6869  	}
  6870  	// match: (CMPWU x y)
  6871  	// cond: canonLessThan(x,y)
  6872  	// result: (InvertFlags (CMPWU y x))
  6873  	for {
  6874  		x := v_0
  6875  		y := v_1
  6876  		if !(canonLessThan(x, y)) {
  6877  			break
  6878  		}
  6879  		v.reset(OpS390XInvertFlags)
  6880  		v0 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  6881  		v0.AddArg2(y, x)
  6882  		v.AddArg(v0)
  6883  		return true
  6884  	}
  6885  	// match: (CMPWU x (MOVWreg y))
  6886  	// result: (CMPWU x y)
  6887  	for {
  6888  		x := v_0
  6889  		if v_1.Op != OpS390XMOVWreg {
  6890  			break
  6891  		}
  6892  		y := v_1.Args[0]
  6893  		v.reset(OpS390XCMPWU)
  6894  		v.AddArg2(x, y)
  6895  		return true
  6896  	}
  6897  	// match: (CMPWU x (MOVWZreg y))
  6898  	// result: (CMPWU x y)
  6899  	for {
  6900  		x := v_0
  6901  		if v_1.Op != OpS390XMOVWZreg {
  6902  			break
  6903  		}
  6904  		y := v_1.Args[0]
  6905  		v.reset(OpS390XCMPWU)
  6906  		v.AddArg2(x, y)
  6907  		return true
  6908  	}
  6909  	// match: (CMPWU (MOVWreg x) y)
  6910  	// result: (CMPWU x y)
  6911  	for {
  6912  		if v_0.Op != OpS390XMOVWreg {
  6913  			break
  6914  		}
  6915  		x := v_0.Args[0]
  6916  		y := v_1
  6917  		v.reset(OpS390XCMPWU)
  6918  		v.AddArg2(x, y)
  6919  		return true
  6920  	}
  6921  	// match: (CMPWU (MOVWZreg x) y)
  6922  	// result: (CMPWU x y)
  6923  	for {
  6924  		if v_0.Op != OpS390XMOVWZreg {
  6925  			break
  6926  		}
  6927  		x := v_0.Args[0]
  6928  		y := v_1
  6929  		v.reset(OpS390XCMPWU)
  6930  		v.AddArg2(x, y)
  6931  		return true
  6932  	}
  6933  	return false
  6934  }
  6935  func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
  6936  	v_0 := v.Args[0]
  6937  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6938  	// cond: uint32(x)==uint32(y)
  6939  	// result: (FlagEQ)
  6940  	for {
  6941  		y := auxIntToInt32(v.AuxInt)
  6942  		if v_0.Op != OpS390XMOVDconst {
  6943  			break
  6944  		}
  6945  		x := auxIntToInt64(v_0.AuxInt)
  6946  		if !(uint32(x) == uint32(y)) {
  6947  			break
  6948  		}
  6949  		v.reset(OpS390XFlagEQ)
  6950  		return true
  6951  	}
  6952  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6953  	// cond: uint32(x)<uint32(y)
  6954  	// result: (FlagLT)
  6955  	for {
  6956  		y := auxIntToInt32(v.AuxInt)
  6957  		if v_0.Op != OpS390XMOVDconst {
  6958  			break
  6959  		}
  6960  		x := auxIntToInt64(v_0.AuxInt)
  6961  		if !(uint32(x) < uint32(y)) {
  6962  			break
  6963  		}
  6964  		v.reset(OpS390XFlagLT)
  6965  		return true
  6966  	}
  6967  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6968  	// cond: uint32(x)>uint32(y)
  6969  	// result: (FlagGT)
  6970  	for {
  6971  		y := auxIntToInt32(v.AuxInt)
  6972  		if v_0.Op != OpS390XMOVDconst {
  6973  			break
  6974  		}
  6975  		x := auxIntToInt64(v_0.AuxInt)
  6976  		if !(uint32(x) > uint32(y)) {
  6977  			break
  6978  		}
  6979  		v.reset(OpS390XFlagGT)
  6980  		return true
  6981  	}
  6982  	// match: (CMPWUconst (MOVBZreg _) [c])
  6983  	// cond: 0xff < c
  6984  	// result: (FlagLT)
  6985  	for {
  6986  		c := auxIntToInt32(v.AuxInt)
  6987  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  6988  			break
  6989  		}
  6990  		v.reset(OpS390XFlagLT)
  6991  		return true
  6992  	}
  6993  	// match: (CMPWUconst (MOVHZreg _) [c])
  6994  	// cond: 0xffff < c
  6995  	// result: (FlagLT)
  6996  	for {
  6997  		c := auxIntToInt32(v.AuxInt)
  6998  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  6999  			break
  7000  		}
  7001  		v.reset(OpS390XFlagLT)
  7002  		return true
  7003  	}
  7004  	// match: (CMPWUconst (SRWconst _ [c]) [n])
  7005  	// cond: c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)
  7006  	// result: (FlagLT)
  7007  	for {
  7008  		n := auxIntToInt32(v.AuxInt)
  7009  		if v_0.Op != OpS390XSRWconst {
  7010  			break
  7011  		}
  7012  		c := auxIntToUint8(v_0.AuxInt)
  7013  		if !(c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)) {
  7014  			break
  7015  		}
  7016  		v.reset(OpS390XFlagLT)
  7017  		return true
  7018  	}
  7019  	// match: (CMPWUconst (ANDWconst _ [m]) [n])
  7020  	// cond: uint32(m) < uint32(n)
  7021  	// result: (FlagLT)
  7022  	for {
  7023  		n := auxIntToInt32(v.AuxInt)
  7024  		if v_0.Op != OpS390XANDWconst {
  7025  			break
  7026  		}
  7027  		m := auxIntToInt32(v_0.AuxInt)
  7028  		if !(uint32(m) < uint32(n)) {
  7029  			break
  7030  		}
  7031  		v.reset(OpS390XFlagLT)
  7032  		return true
  7033  	}
  7034  	// match: (CMPWUconst (MOVWreg x) [c])
  7035  	// result: (CMPWUconst x [c])
  7036  	for {
  7037  		c := auxIntToInt32(v.AuxInt)
  7038  		if v_0.Op != OpS390XMOVWreg {
  7039  			break
  7040  		}
  7041  		x := v_0.Args[0]
  7042  		v.reset(OpS390XCMPWUconst)
  7043  		v.AuxInt = int32ToAuxInt(c)
  7044  		v.AddArg(x)
  7045  		return true
  7046  	}
  7047  	// match: (CMPWUconst (MOVWZreg x) [c])
  7048  	// result: (CMPWUconst x [c])
  7049  	for {
  7050  		c := auxIntToInt32(v.AuxInt)
  7051  		if v_0.Op != OpS390XMOVWZreg {
  7052  			break
  7053  		}
  7054  		x := v_0.Args[0]
  7055  		v.reset(OpS390XCMPWUconst)
  7056  		v.AuxInt = int32ToAuxInt(c)
  7057  		v.AddArg(x)
  7058  		return true
  7059  	}
  7060  	return false
  7061  }
  7062  func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
  7063  	v_0 := v.Args[0]
  7064  	// match: (CMPWconst (MOVDconst [x]) [y])
  7065  	// cond: int32(x)==int32(y)
  7066  	// result: (FlagEQ)
  7067  	for {
  7068  		y := auxIntToInt32(v.AuxInt)
  7069  		if v_0.Op != OpS390XMOVDconst {
  7070  			break
  7071  		}
  7072  		x := auxIntToInt64(v_0.AuxInt)
  7073  		if !(int32(x) == int32(y)) {
  7074  			break
  7075  		}
  7076  		v.reset(OpS390XFlagEQ)
  7077  		return true
  7078  	}
  7079  	// match: (CMPWconst (MOVDconst [x]) [y])
  7080  	// cond: int32(x)<int32(y)
  7081  	// result: (FlagLT)
  7082  	for {
  7083  		y := auxIntToInt32(v.AuxInt)
  7084  		if v_0.Op != OpS390XMOVDconst {
  7085  			break
  7086  		}
  7087  		x := auxIntToInt64(v_0.AuxInt)
  7088  		if !(int32(x) < int32(y)) {
  7089  			break
  7090  		}
  7091  		v.reset(OpS390XFlagLT)
  7092  		return true
  7093  	}
  7094  	// match: (CMPWconst (MOVDconst [x]) [y])
  7095  	// cond: int32(x)>int32(y)
  7096  	// result: (FlagGT)
  7097  	for {
  7098  		y := auxIntToInt32(v.AuxInt)
  7099  		if v_0.Op != OpS390XMOVDconst {
  7100  			break
  7101  		}
  7102  		x := auxIntToInt64(v_0.AuxInt)
  7103  		if !(int32(x) > int32(y)) {
  7104  			break
  7105  		}
  7106  		v.reset(OpS390XFlagGT)
  7107  		return true
  7108  	}
  7109  	// match: (CMPWconst (MOVBZreg _) [c])
  7110  	// cond: 0xff < c
  7111  	// result: (FlagLT)
  7112  	for {
  7113  		c := auxIntToInt32(v.AuxInt)
  7114  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  7115  			break
  7116  		}
  7117  		v.reset(OpS390XFlagLT)
  7118  		return true
  7119  	}
  7120  	// match: (CMPWconst (MOVHZreg _) [c])
  7121  	// cond: 0xffff < c
  7122  	// result: (FlagLT)
  7123  	for {
  7124  		c := auxIntToInt32(v.AuxInt)
  7125  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  7126  			break
  7127  		}
  7128  		v.reset(OpS390XFlagLT)
  7129  		return true
  7130  	}
  7131  	// match: (CMPWconst (SRWconst _ [c]) [n])
  7132  	// cond: c > 0 && n < 0
  7133  	// result: (FlagGT)
  7134  	for {
  7135  		n := auxIntToInt32(v.AuxInt)
  7136  		if v_0.Op != OpS390XSRWconst {
  7137  			break
  7138  		}
  7139  		c := auxIntToUint8(v_0.AuxInt)
  7140  		if !(c > 0 && n < 0) {
  7141  			break
  7142  		}
  7143  		v.reset(OpS390XFlagGT)
  7144  		return true
  7145  	}
  7146  	// match: (CMPWconst (ANDWconst _ [m]) [n])
  7147  	// cond: int32(m) >= 0 && int32(m) < int32(n)
  7148  	// result: (FlagLT)
  7149  	for {
  7150  		n := auxIntToInt32(v.AuxInt)
  7151  		if v_0.Op != OpS390XANDWconst {
  7152  			break
  7153  		}
  7154  		m := auxIntToInt32(v_0.AuxInt)
  7155  		if !(int32(m) >= 0 && int32(m) < int32(n)) {
  7156  			break
  7157  		}
  7158  		v.reset(OpS390XFlagLT)
  7159  		return true
  7160  	}
  7161  	// match: (CMPWconst x:(SRWconst _ [c]) [n])
  7162  	// cond: c > 0 && n >= 0
  7163  	// result: (CMPWUconst x [n])
  7164  	for {
  7165  		n := auxIntToInt32(v.AuxInt)
  7166  		x := v_0
  7167  		if x.Op != OpS390XSRWconst {
  7168  			break
  7169  		}
  7170  		c := auxIntToUint8(x.AuxInt)
  7171  		if !(c > 0 && n >= 0) {
  7172  			break
  7173  		}
  7174  		v.reset(OpS390XCMPWUconst)
  7175  		v.AuxInt = int32ToAuxInt(n)
  7176  		v.AddArg(x)
  7177  		return true
  7178  	}
  7179  	// match: (CMPWconst (MOVWreg x) [c])
  7180  	// result: (CMPWconst x [c])
  7181  	for {
  7182  		c := auxIntToInt32(v.AuxInt)
  7183  		if v_0.Op != OpS390XMOVWreg {
  7184  			break
  7185  		}
  7186  		x := v_0.Args[0]
  7187  		v.reset(OpS390XCMPWconst)
  7188  		v.AuxInt = int32ToAuxInt(c)
  7189  		v.AddArg(x)
  7190  		return true
  7191  	}
  7192  	// match: (CMPWconst (MOVWZreg x) [c])
  7193  	// result: (CMPWconst x [c])
  7194  	for {
  7195  		c := auxIntToInt32(v.AuxInt)
  7196  		if v_0.Op != OpS390XMOVWZreg {
  7197  			break
  7198  		}
  7199  		x := v_0.Args[0]
  7200  		v.reset(OpS390XCMPWconst)
  7201  		v.AuxInt = int32ToAuxInt(c)
  7202  		v.AddArg(x)
  7203  		return true
  7204  	}
  7205  	return false
  7206  }
  7207  func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
  7208  	v_0 := v.Args[0]
  7209  	// match: (CMPconst (MOVDconst [x]) [y])
  7210  	// cond: x==int64(y)
  7211  	// result: (FlagEQ)
  7212  	for {
  7213  		y := auxIntToInt32(v.AuxInt)
  7214  		if v_0.Op != OpS390XMOVDconst {
  7215  			break
  7216  		}
  7217  		x := auxIntToInt64(v_0.AuxInt)
  7218  		if !(x == int64(y)) {
  7219  			break
  7220  		}
  7221  		v.reset(OpS390XFlagEQ)
  7222  		return true
  7223  	}
  7224  	// match: (CMPconst (MOVDconst [x]) [y])
  7225  	// cond: x<int64(y)
  7226  	// result: (FlagLT)
  7227  	for {
  7228  		y := auxIntToInt32(v.AuxInt)
  7229  		if v_0.Op != OpS390XMOVDconst {
  7230  			break
  7231  		}
  7232  		x := auxIntToInt64(v_0.AuxInt)
  7233  		if !(x < int64(y)) {
  7234  			break
  7235  		}
  7236  		v.reset(OpS390XFlagLT)
  7237  		return true
  7238  	}
  7239  	// match: (CMPconst (MOVDconst [x]) [y])
  7240  	// cond: x>int64(y)
  7241  	// result: (FlagGT)
  7242  	for {
  7243  		y := auxIntToInt32(v.AuxInt)
  7244  		if v_0.Op != OpS390XMOVDconst {
  7245  			break
  7246  		}
  7247  		x := auxIntToInt64(v_0.AuxInt)
  7248  		if !(x > int64(y)) {
  7249  			break
  7250  		}
  7251  		v.reset(OpS390XFlagGT)
  7252  		return true
  7253  	}
  7254  	// match: (CMPconst (SRDconst _ [c]) [n])
  7255  	// cond: c > 0 && n < 0
  7256  	// result: (FlagGT)
  7257  	for {
  7258  		n := auxIntToInt32(v.AuxInt)
  7259  		if v_0.Op != OpS390XSRDconst {
  7260  			break
  7261  		}
  7262  		c := auxIntToUint8(v_0.AuxInt)
  7263  		if !(c > 0 && n < 0) {
  7264  			break
  7265  		}
  7266  		v.reset(OpS390XFlagGT)
  7267  		return true
  7268  	}
  7269  	// match: (CMPconst (RISBGZ x {r}) [c])
  7270  	// cond: c > 0 && r.OutMask() < uint64(c)
  7271  	// result: (FlagLT)
  7272  	for {
  7273  		c := auxIntToInt32(v.AuxInt)
  7274  		if v_0.Op != OpS390XRISBGZ {
  7275  			break
  7276  		}
  7277  		r := auxToS390xRotateParams(v_0.Aux)
  7278  		if !(c > 0 && r.OutMask() < uint64(c)) {
  7279  			break
  7280  		}
  7281  		v.reset(OpS390XFlagLT)
  7282  		return true
  7283  	}
  7284  	// match: (CMPconst (MOVWreg x) [c])
  7285  	// result: (CMPWconst x [c])
  7286  	for {
  7287  		c := auxIntToInt32(v.AuxInt)
  7288  		if v_0.Op != OpS390XMOVWreg {
  7289  			break
  7290  		}
  7291  		x := v_0.Args[0]
  7292  		v.reset(OpS390XCMPWconst)
  7293  		v.AuxInt = int32ToAuxInt(c)
  7294  		v.AddArg(x)
  7295  		return true
  7296  	}
  7297  	// match: (CMPconst x:(MOVHreg _) [c])
  7298  	// result: (CMPWconst x [c])
  7299  	for {
  7300  		c := auxIntToInt32(v.AuxInt)
  7301  		x := v_0
  7302  		if x.Op != OpS390XMOVHreg {
  7303  			break
  7304  		}
  7305  		v.reset(OpS390XCMPWconst)
  7306  		v.AuxInt = int32ToAuxInt(c)
  7307  		v.AddArg(x)
  7308  		return true
  7309  	}
  7310  	// match: (CMPconst x:(MOVHZreg _) [c])
  7311  	// result: (CMPWconst x [c])
  7312  	for {
  7313  		c := auxIntToInt32(v.AuxInt)
  7314  		x := v_0
  7315  		if x.Op != OpS390XMOVHZreg {
  7316  			break
  7317  		}
  7318  		v.reset(OpS390XCMPWconst)
  7319  		v.AuxInt = int32ToAuxInt(c)
  7320  		v.AddArg(x)
  7321  		return true
  7322  	}
  7323  	// match: (CMPconst x:(MOVBreg _) [c])
  7324  	// result: (CMPWconst x [c])
  7325  	for {
  7326  		c := auxIntToInt32(v.AuxInt)
  7327  		x := v_0
  7328  		if x.Op != OpS390XMOVBreg {
  7329  			break
  7330  		}
  7331  		v.reset(OpS390XCMPWconst)
  7332  		v.AuxInt = int32ToAuxInt(c)
  7333  		v.AddArg(x)
  7334  		return true
  7335  	}
  7336  	// match: (CMPconst x:(MOVBZreg _) [c])
  7337  	// result: (CMPWconst x [c])
  7338  	for {
  7339  		c := auxIntToInt32(v.AuxInt)
  7340  		x := v_0
  7341  		if x.Op != OpS390XMOVBZreg {
  7342  			break
  7343  		}
  7344  		v.reset(OpS390XCMPWconst)
  7345  		v.AuxInt = int32ToAuxInt(c)
  7346  		v.AddArg(x)
  7347  		return true
  7348  	}
  7349  	// match: (CMPconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  7350  	// cond: int32(m) >= 0 && c >= 0
  7351  	// result: (CMPWUconst x [c])
  7352  	for {
  7353  		c := auxIntToInt32(v.AuxInt)
  7354  		if v_0.Op != OpS390XMOVWZreg {
  7355  			break
  7356  		}
  7357  		x := v_0.Args[0]
  7358  		if x.Op != OpS390XANDWconst {
  7359  			break
  7360  		}
  7361  		m := auxIntToInt32(x.AuxInt)
  7362  		if !(int32(m) >= 0 && c >= 0) {
  7363  			break
  7364  		}
  7365  		v.reset(OpS390XCMPWUconst)
  7366  		v.AuxInt = int32ToAuxInt(c)
  7367  		v.AddArg(x)
  7368  		return true
  7369  	}
  7370  	// match: (CMPconst (MOVWreg x:(ANDWconst [m] _)) [c])
  7371  	// cond: int32(m) >= 0 && c >= 0
  7372  	// result: (CMPWUconst x [c])
  7373  	for {
  7374  		c := auxIntToInt32(v.AuxInt)
  7375  		if v_0.Op != OpS390XMOVWreg {
  7376  			break
  7377  		}
  7378  		x := v_0.Args[0]
  7379  		if x.Op != OpS390XANDWconst {
  7380  			break
  7381  		}
  7382  		m := auxIntToInt32(x.AuxInt)
  7383  		if !(int32(m) >= 0 && c >= 0) {
  7384  			break
  7385  		}
  7386  		v.reset(OpS390XCMPWUconst)
  7387  		v.AuxInt = int32ToAuxInt(c)
  7388  		v.AddArg(x)
  7389  		return true
  7390  	}
  7391  	// match: (CMPconst x:(SRDconst _ [c]) [n])
  7392  	// cond: c > 0 && n >= 0
  7393  	// result: (CMPUconst x [n])
  7394  	for {
  7395  		n := auxIntToInt32(v.AuxInt)
  7396  		x := v_0
  7397  		if x.Op != OpS390XSRDconst {
  7398  			break
  7399  		}
  7400  		c := auxIntToUint8(x.AuxInt)
  7401  		if !(c > 0 && n >= 0) {
  7402  			break
  7403  		}
  7404  		v.reset(OpS390XCMPUconst)
  7405  		v.AuxInt = int32ToAuxInt(n)
  7406  		v.AddArg(x)
  7407  		return true
  7408  	}
  7409  	return false
  7410  }
  7411  func rewriteValueS390X_OpS390XCPSDR(v *Value) bool {
  7412  	v_1 := v.Args[1]
  7413  	v_0 := v.Args[0]
  7414  	// match: (CPSDR y (FMOVDconst [c]))
  7415  	// cond: !math.Signbit(c)
  7416  	// result: (LPDFR y)
  7417  	for {
  7418  		y := v_0
  7419  		if v_1.Op != OpS390XFMOVDconst {
  7420  			break
  7421  		}
  7422  		c := auxIntToFloat64(v_1.AuxInt)
  7423  		if !(!math.Signbit(c)) {
  7424  			break
  7425  		}
  7426  		v.reset(OpS390XLPDFR)
  7427  		v.AddArg(y)
  7428  		return true
  7429  	}
  7430  	// match: (CPSDR y (FMOVDconst [c]))
  7431  	// cond: math.Signbit(c)
  7432  	// result: (LNDFR y)
  7433  	for {
  7434  		y := v_0
  7435  		if v_1.Op != OpS390XFMOVDconst {
  7436  			break
  7437  		}
  7438  		c := auxIntToFloat64(v_1.AuxInt)
  7439  		if !(math.Signbit(c)) {
  7440  			break
  7441  		}
  7442  		v.reset(OpS390XLNDFR)
  7443  		v.AddArg(y)
  7444  		return true
  7445  	}
  7446  	return false
  7447  }
  7448  func rewriteValueS390X_OpS390XFCMP(v *Value) bool {
  7449  	v_1 := v.Args[1]
  7450  	v_0 := v.Args[0]
  7451  	b := v.Block
  7452  	// match: (FCMP x (FMOVDconst [0.0]))
  7453  	// result: (LTDBR x)
  7454  	for {
  7455  		x := v_0
  7456  		if v_1.Op != OpS390XFMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0.0 {
  7457  			break
  7458  		}
  7459  		v.reset(OpS390XLTDBR)
  7460  		v.AddArg(x)
  7461  		return true
  7462  	}
  7463  	// match: (FCMP (FMOVDconst [0.0]) x)
  7464  	// result: (InvertFlags (LTDBR <v.Type> x))
  7465  	for {
  7466  		if v_0.Op != OpS390XFMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0.0 {
  7467  			break
  7468  		}
  7469  		x := v_1
  7470  		v.reset(OpS390XInvertFlags)
  7471  		v0 := b.NewValue0(v.Pos, OpS390XLTDBR, v.Type)
  7472  		v0.AddArg(x)
  7473  		v.AddArg(v0)
  7474  		return true
  7475  	}
  7476  	return false
  7477  }
  7478  func rewriteValueS390X_OpS390XFCMPS(v *Value) bool {
  7479  	v_1 := v.Args[1]
  7480  	v_0 := v.Args[0]
  7481  	b := v.Block
  7482  	// match: (FCMPS x (FMOVSconst [0.0]))
  7483  	// result: (LTEBR x)
  7484  	for {
  7485  		x := v_0
  7486  		if v_1.Op != OpS390XFMOVSconst || auxIntToFloat32(v_1.AuxInt) != 0.0 {
  7487  			break
  7488  		}
  7489  		v.reset(OpS390XLTEBR)
  7490  		v.AddArg(x)
  7491  		return true
  7492  	}
  7493  	// match: (FCMPS (FMOVSconst [0.0]) x)
  7494  	// result: (InvertFlags (LTEBR <v.Type> x))
  7495  	for {
  7496  		if v_0.Op != OpS390XFMOVSconst || auxIntToFloat32(v_0.AuxInt) != 0.0 {
  7497  			break
  7498  		}
  7499  		x := v_1
  7500  		v.reset(OpS390XInvertFlags)
  7501  		v0 := b.NewValue0(v.Pos, OpS390XLTEBR, v.Type)
  7502  		v0.AddArg(x)
  7503  		v.AddArg(v0)
  7504  		return true
  7505  	}
  7506  	return false
  7507  }
  7508  func rewriteValueS390X_OpS390XFMOVDload(v *Value) bool {
  7509  	v_1 := v.Args[1]
  7510  	v_0 := v.Args[0]
  7511  	// match: (FMOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  7512  	// cond: isSamePtr(ptr1, ptr2)
  7513  	// result: (LDGR x)
  7514  	for {
  7515  		off := auxIntToInt32(v.AuxInt)
  7516  		sym := auxToSym(v.Aux)
  7517  		ptr1 := v_0
  7518  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7519  			break
  7520  		}
  7521  		x := v_1.Args[1]
  7522  		ptr2 := v_1.Args[0]
  7523  		if !(isSamePtr(ptr1, ptr2)) {
  7524  			break
  7525  		}
  7526  		v.reset(OpS390XLDGR)
  7527  		v.AddArg(x)
  7528  		return true
  7529  	}
  7530  	// match: (FMOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  7531  	// cond: isSamePtr(ptr1, ptr2)
  7532  	// result: x
  7533  	for {
  7534  		off := auxIntToInt32(v.AuxInt)
  7535  		sym := auxToSym(v.Aux)
  7536  		ptr1 := v_0
  7537  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7538  			break
  7539  		}
  7540  		x := v_1.Args[1]
  7541  		ptr2 := v_1.Args[0]
  7542  		if !(isSamePtr(ptr1, ptr2)) {
  7543  			break
  7544  		}
  7545  		v.copyOf(x)
  7546  		return true
  7547  	}
  7548  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  7549  	// cond: is20Bit(int64(off1)+int64(off2))
  7550  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  7551  	for {
  7552  		off1 := auxIntToInt32(v.AuxInt)
  7553  		sym := auxToSym(v.Aux)
  7554  		if v_0.Op != OpS390XADDconst {
  7555  			break
  7556  		}
  7557  		off2 := auxIntToInt32(v_0.AuxInt)
  7558  		ptr := v_0.Args[0]
  7559  		mem := v_1
  7560  		if !(is20Bit(int64(off1) + int64(off2))) {
  7561  			break
  7562  		}
  7563  		v.reset(OpS390XFMOVDload)
  7564  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7565  		v.Aux = symToAux(sym)
  7566  		v.AddArg2(ptr, mem)
  7567  		return true
  7568  	}
  7569  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7570  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7571  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7572  	for {
  7573  		off1 := auxIntToInt32(v.AuxInt)
  7574  		sym1 := auxToSym(v.Aux)
  7575  		if v_0.Op != OpS390XMOVDaddr {
  7576  			break
  7577  		}
  7578  		off2 := auxIntToInt32(v_0.AuxInt)
  7579  		sym2 := auxToSym(v_0.Aux)
  7580  		base := v_0.Args[0]
  7581  		mem := v_1
  7582  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7583  			break
  7584  		}
  7585  		v.reset(OpS390XFMOVDload)
  7586  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7587  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7588  		v.AddArg2(base, mem)
  7589  		return true
  7590  	}
  7591  	return false
  7592  }
  7593  func rewriteValueS390X_OpS390XFMOVDstore(v *Value) bool {
  7594  	v_2 := v.Args[2]
  7595  	v_1 := v.Args[1]
  7596  	v_0 := v.Args[0]
  7597  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7598  	// cond: is20Bit(int64(off1)+int64(off2))
  7599  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  7600  	for {
  7601  		off1 := auxIntToInt32(v.AuxInt)
  7602  		sym := auxToSym(v.Aux)
  7603  		if v_0.Op != OpS390XADDconst {
  7604  			break
  7605  		}
  7606  		off2 := auxIntToInt32(v_0.AuxInt)
  7607  		ptr := v_0.Args[0]
  7608  		val := v_1
  7609  		mem := v_2
  7610  		if !(is20Bit(int64(off1) + int64(off2))) {
  7611  			break
  7612  		}
  7613  		v.reset(OpS390XFMOVDstore)
  7614  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7615  		v.Aux = symToAux(sym)
  7616  		v.AddArg3(ptr, val, mem)
  7617  		return true
  7618  	}
  7619  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7620  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7621  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7622  	for {
  7623  		off1 := auxIntToInt32(v.AuxInt)
  7624  		sym1 := auxToSym(v.Aux)
  7625  		if v_0.Op != OpS390XMOVDaddr {
  7626  			break
  7627  		}
  7628  		off2 := auxIntToInt32(v_0.AuxInt)
  7629  		sym2 := auxToSym(v_0.Aux)
  7630  		base := v_0.Args[0]
  7631  		val := v_1
  7632  		mem := v_2
  7633  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7634  			break
  7635  		}
  7636  		v.reset(OpS390XFMOVDstore)
  7637  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7638  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7639  		v.AddArg3(base, val, mem)
  7640  		return true
  7641  	}
  7642  	return false
  7643  }
  7644  func rewriteValueS390X_OpS390XFMOVSload(v *Value) bool {
  7645  	v_1 := v.Args[1]
  7646  	v_0 := v.Args[0]
  7647  	// match: (FMOVSload [off] {sym} ptr1 (FMOVSstore [off] {sym} ptr2 x _))
  7648  	// cond: isSamePtr(ptr1, ptr2)
  7649  	// result: x
  7650  	for {
  7651  		off := auxIntToInt32(v.AuxInt)
  7652  		sym := auxToSym(v.Aux)
  7653  		ptr1 := v_0
  7654  		if v_1.Op != OpS390XFMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7655  			break
  7656  		}
  7657  		x := v_1.Args[1]
  7658  		ptr2 := v_1.Args[0]
  7659  		if !(isSamePtr(ptr1, ptr2)) {
  7660  			break
  7661  		}
  7662  		v.copyOf(x)
  7663  		return true
  7664  	}
  7665  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  7666  	// cond: is20Bit(int64(off1)+int64(off2))
  7667  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  7668  	for {
  7669  		off1 := auxIntToInt32(v.AuxInt)
  7670  		sym := auxToSym(v.Aux)
  7671  		if v_0.Op != OpS390XADDconst {
  7672  			break
  7673  		}
  7674  		off2 := auxIntToInt32(v_0.AuxInt)
  7675  		ptr := v_0.Args[0]
  7676  		mem := v_1
  7677  		if !(is20Bit(int64(off1) + int64(off2))) {
  7678  			break
  7679  		}
  7680  		v.reset(OpS390XFMOVSload)
  7681  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7682  		v.Aux = symToAux(sym)
  7683  		v.AddArg2(ptr, mem)
  7684  		return true
  7685  	}
  7686  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7687  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7688  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7689  	for {
  7690  		off1 := auxIntToInt32(v.AuxInt)
  7691  		sym1 := auxToSym(v.Aux)
  7692  		if v_0.Op != OpS390XMOVDaddr {
  7693  			break
  7694  		}
  7695  		off2 := auxIntToInt32(v_0.AuxInt)
  7696  		sym2 := auxToSym(v_0.Aux)
  7697  		base := v_0.Args[0]
  7698  		mem := v_1
  7699  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7700  			break
  7701  		}
  7702  		v.reset(OpS390XFMOVSload)
  7703  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7704  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7705  		v.AddArg2(base, mem)
  7706  		return true
  7707  	}
  7708  	return false
  7709  }
  7710  func rewriteValueS390X_OpS390XFMOVSstore(v *Value) bool {
  7711  	v_2 := v.Args[2]
  7712  	v_1 := v.Args[1]
  7713  	v_0 := v.Args[0]
  7714  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7715  	// cond: is20Bit(int64(off1)+int64(off2))
  7716  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  7717  	for {
  7718  		off1 := auxIntToInt32(v.AuxInt)
  7719  		sym := auxToSym(v.Aux)
  7720  		if v_0.Op != OpS390XADDconst {
  7721  			break
  7722  		}
  7723  		off2 := auxIntToInt32(v_0.AuxInt)
  7724  		ptr := v_0.Args[0]
  7725  		val := v_1
  7726  		mem := v_2
  7727  		if !(is20Bit(int64(off1) + int64(off2))) {
  7728  			break
  7729  		}
  7730  		v.reset(OpS390XFMOVSstore)
  7731  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7732  		v.Aux = symToAux(sym)
  7733  		v.AddArg3(ptr, val, mem)
  7734  		return true
  7735  	}
  7736  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7737  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7738  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7739  	for {
  7740  		off1 := auxIntToInt32(v.AuxInt)
  7741  		sym1 := auxToSym(v.Aux)
  7742  		if v_0.Op != OpS390XMOVDaddr {
  7743  			break
  7744  		}
  7745  		off2 := auxIntToInt32(v_0.AuxInt)
  7746  		sym2 := auxToSym(v_0.Aux)
  7747  		base := v_0.Args[0]
  7748  		val := v_1
  7749  		mem := v_2
  7750  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7751  			break
  7752  		}
  7753  		v.reset(OpS390XFMOVSstore)
  7754  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7755  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7756  		v.AddArg3(base, val, mem)
  7757  		return true
  7758  	}
  7759  	return false
  7760  }
  7761  func rewriteValueS390X_OpS390XFNEG(v *Value) bool {
  7762  	v_0 := v.Args[0]
  7763  	// match: (FNEG (LPDFR x))
  7764  	// result: (LNDFR x)
  7765  	for {
  7766  		if v_0.Op != OpS390XLPDFR {
  7767  			break
  7768  		}
  7769  		x := v_0.Args[0]
  7770  		v.reset(OpS390XLNDFR)
  7771  		v.AddArg(x)
  7772  		return true
  7773  	}
  7774  	// match: (FNEG (LNDFR x))
  7775  	// result: (LPDFR x)
  7776  	for {
  7777  		if v_0.Op != OpS390XLNDFR {
  7778  			break
  7779  		}
  7780  		x := v_0.Args[0]
  7781  		v.reset(OpS390XLPDFR)
  7782  		v.AddArg(x)
  7783  		return true
  7784  	}
  7785  	return false
  7786  }
  7787  func rewriteValueS390X_OpS390XFNEGS(v *Value) bool {
  7788  	v_0 := v.Args[0]
  7789  	// match: (FNEGS (LPDFR x))
  7790  	// result: (LNDFR x)
  7791  	for {
  7792  		if v_0.Op != OpS390XLPDFR {
  7793  			break
  7794  		}
  7795  		x := v_0.Args[0]
  7796  		v.reset(OpS390XLNDFR)
  7797  		v.AddArg(x)
  7798  		return true
  7799  	}
  7800  	// match: (FNEGS (LNDFR x))
  7801  	// result: (LPDFR x)
  7802  	for {
  7803  		if v_0.Op != OpS390XLNDFR {
  7804  			break
  7805  		}
  7806  		x := v_0.Args[0]
  7807  		v.reset(OpS390XLPDFR)
  7808  		v.AddArg(x)
  7809  		return true
  7810  	}
  7811  	return false
  7812  }
  7813  func rewriteValueS390X_OpS390XLDGR(v *Value) bool {
  7814  	v_0 := v.Args[0]
  7815  	b := v.Block
  7816  	// match: (LDGR <t> (RISBGZ x {r}))
  7817  	// cond: r == s390x.NewRotateParams(1, 63, 0)
  7818  	// result: (LPDFR (LDGR <t> x))
  7819  	for {
  7820  		t := v.Type
  7821  		if v_0.Op != OpS390XRISBGZ {
  7822  			break
  7823  		}
  7824  		r := auxToS390xRotateParams(v_0.Aux)
  7825  		x := v_0.Args[0]
  7826  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
  7827  			break
  7828  		}
  7829  		v.reset(OpS390XLPDFR)
  7830  		v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7831  		v0.AddArg(x)
  7832  		v.AddArg(v0)
  7833  		return true
  7834  	}
  7835  	// match: (LDGR <t> (OR (MOVDconst [-1<<63]) x))
  7836  	// result: (LNDFR (LDGR <t> x))
  7837  	for {
  7838  		t := v.Type
  7839  		if v_0.Op != OpS390XOR {
  7840  			break
  7841  		}
  7842  		_ = v_0.Args[1]
  7843  		v_0_0 := v_0.Args[0]
  7844  		v_0_1 := v_0.Args[1]
  7845  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7846  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != -1<<63 {
  7847  				continue
  7848  			}
  7849  			x := v_0_1
  7850  			v.reset(OpS390XLNDFR)
  7851  			v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7852  			v0.AddArg(x)
  7853  			v.AddArg(v0)
  7854  			return true
  7855  		}
  7856  		break
  7857  	}
  7858  	// match: (LDGR <t> x:(ORload <t1> [off] {sym} (MOVDconst [-1<<63]) ptr mem))
  7859  	// cond: x.Uses == 1 && clobber(x)
  7860  	// result: @x.Block (LNDFR <t> (LDGR <t> (MOVDload <t1> [off] {sym} ptr mem)))
  7861  	for {
  7862  		t := v.Type
  7863  		x := v_0
  7864  		if x.Op != OpS390XORload {
  7865  			break
  7866  		}
  7867  		t1 := x.Type
  7868  		off := auxIntToInt32(x.AuxInt)
  7869  		sym := auxToSym(x.Aux)
  7870  		mem := x.Args[2]
  7871  		x_0 := x.Args[0]
  7872  		if x_0.Op != OpS390XMOVDconst || auxIntToInt64(x_0.AuxInt) != -1<<63 {
  7873  			break
  7874  		}
  7875  		ptr := x.Args[1]
  7876  		if !(x.Uses == 1 && clobber(x)) {
  7877  			break
  7878  		}
  7879  		b = x.Block
  7880  		v0 := b.NewValue0(x.Pos, OpS390XLNDFR, t)
  7881  		v.copyOf(v0)
  7882  		v1 := b.NewValue0(x.Pos, OpS390XLDGR, t)
  7883  		v2 := b.NewValue0(x.Pos, OpS390XMOVDload, t1)
  7884  		v2.AuxInt = int32ToAuxInt(off)
  7885  		v2.Aux = symToAux(sym)
  7886  		v2.AddArg2(ptr, mem)
  7887  		v1.AddArg(v2)
  7888  		v0.AddArg(v1)
  7889  		return true
  7890  	}
  7891  	// match: (LDGR (LGDR x))
  7892  	// result: x
  7893  	for {
  7894  		if v_0.Op != OpS390XLGDR {
  7895  			break
  7896  		}
  7897  		x := v_0.Args[0]
  7898  		v.copyOf(x)
  7899  		return true
  7900  	}
  7901  	return false
  7902  }
  7903  func rewriteValueS390X_OpS390XLEDBR(v *Value) bool {
  7904  	v_0 := v.Args[0]
  7905  	// match: (LEDBR (LPDFR (LDEBR x)))
  7906  	// result: (LPDFR x)
  7907  	for {
  7908  		if v_0.Op != OpS390XLPDFR {
  7909  			break
  7910  		}
  7911  		v_0_0 := v_0.Args[0]
  7912  		if v_0_0.Op != OpS390XLDEBR {
  7913  			break
  7914  		}
  7915  		x := v_0_0.Args[0]
  7916  		v.reset(OpS390XLPDFR)
  7917  		v.AddArg(x)
  7918  		return true
  7919  	}
  7920  	// match: (LEDBR (LNDFR (LDEBR x)))
  7921  	// result: (LNDFR x)
  7922  	for {
  7923  		if v_0.Op != OpS390XLNDFR {
  7924  			break
  7925  		}
  7926  		v_0_0 := v_0.Args[0]
  7927  		if v_0_0.Op != OpS390XLDEBR {
  7928  			break
  7929  		}
  7930  		x := v_0_0.Args[0]
  7931  		v.reset(OpS390XLNDFR)
  7932  		v.AddArg(x)
  7933  		return true
  7934  	}
  7935  	return false
  7936  }
  7937  func rewriteValueS390X_OpS390XLGDR(v *Value) bool {
  7938  	v_0 := v.Args[0]
  7939  	// match: (LGDR (LDGR x))
  7940  	// result: x
  7941  	for {
  7942  		if v_0.Op != OpS390XLDGR {
  7943  			break
  7944  		}
  7945  		x := v_0.Args[0]
  7946  		v.copyOf(x)
  7947  		return true
  7948  	}
  7949  	return false
  7950  }
  7951  func rewriteValueS390X_OpS390XLOCGR(v *Value) bool {
  7952  	v_2 := v.Args[2]
  7953  	v_1 := v.Args[1]
  7954  	v_0 := v.Args[0]
  7955  	// match: (LOCGR {c} x y (InvertFlags cmp))
  7956  	// result: (LOCGR {c.ReverseComparison()} x y cmp)
  7957  	for {
  7958  		c := auxToS390xCCMask(v.Aux)
  7959  		x := v_0
  7960  		y := v_1
  7961  		if v_2.Op != OpS390XInvertFlags {
  7962  			break
  7963  		}
  7964  		cmp := v_2.Args[0]
  7965  		v.reset(OpS390XLOCGR)
  7966  		v.Aux = s390xCCMaskToAux(c.ReverseComparison())
  7967  		v.AddArg3(x, y, cmp)
  7968  		return true
  7969  	}
  7970  	// match: (LOCGR {c} _ x (FlagEQ))
  7971  	// cond: c&s390x.Equal != 0
  7972  	// result: x
  7973  	for {
  7974  		c := auxToS390xCCMask(v.Aux)
  7975  		x := v_1
  7976  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal != 0) {
  7977  			break
  7978  		}
  7979  		v.copyOf(x)
  7980  		return true
  7981  	}
  7982  	// match: (LOCGR {c} _ x (FlagLT))
  7983  	// cond: c&s390x.Less != 0
  7984  	// result: x
  7985  	for {
  7986  		c := auxToS390xCCMask(v.Aux)
  7987  		x := v_1
  7988  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less != 0) {
  7989  			break
  7990  		}
  7991  		v.copyOf(x)
  7992  		return true
  7993  	}
  7994  	// match: (LOCGR {c} _ x (FlagGT))
  7995  	// cond: c&s390x.Greater != 0
  7996  	// result: x
  7997  	for {
  7998  		c := auxToS390xCCMask(v.Aux)
  7999  		x := v_1
  8000  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater != 0) {
  8001  			break
  8002  		}
  8003  		v.copyOf(x)
  8004  		return true
  8005  	}
  8006  	// match: (LOCGR {c} _ x (FlagOV))
  8007  	// cond: c&s390x.Unordered != 0
  8008  	// result: x
  8009  	for {
  8010  		c := auxToS390xCCMask(v.Aux)
  8011  		x := v_1
  8012  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered != 0) {
  8013  			break
  8014  		}
  8015  		v.copyOf(x)
  8016  		return true
  8017  	}
  8018  	// match: (LOCGR {c} x _ (FlagEQ))
  8019  	// cond: c&s390x.Equal == 0
  8020  	// result: x
  8021  	for {
  8022  		c := auxToS390xCCMask(v.Aux)
  8023  		x := v_0
  8024  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal == 0) {
  8025  			break
  8026  		}
  8027  		v.copyOf(x)
  8028  		return true
  8029  	}
  8030  	// match: (LOCGR {c} x _ (FlagLT))
  8031  	// cond: c&s390x.Less == 0
  8032  	// result: x
  8033  	for {
  8034  		c := auxToS390xCCMask(v.Aux)
  8035  		x := v_0
  8036  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less == 0) {
  8037  			break
  8038  		}
  8039  		v.copyOf(x)
  8040  		return true
  8041  	}
  8042  	// match: (LOCGR {c} x _ (FlagGT))
  8043  	// cond: c&s390x.Greater == 0
  8044  	// result: x
  8045  	for {
  8046  		c := auxToS390xCCMask(v.Aux)
  8047  		x := v_0
  8048  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater == 0) {
  8049  			break
  8050  		}
  8051  		v.copyOf(x)
  8052  		return true
  8053  	}
  8054  	// match: (LOCGR {c} x _ (FlagOV))
  8055  	// cond: c&s390x.Unordered == 0
  8056  	// result: x
  8057  	for {
  8058  		c := auxToS390xCCMask(v.Aux)
  8059  		x := v_0
  8060  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered == 0) {
  8061  			break
  8062  		}
  8063  		v.copyOf(x)
  8064  		return true
  8065  	}
  8066  	return false
  8067  }
  8068  func rewriteValueS390X_OpS390XLTDBR(v *Value) bool {
  8069  	v_0 := v.Args[0]
  8070  	b := v.Block
  8071  	// match: (LTDBR (Select0 x:(FADD _ _)))
  8072  	// cond: b == x.Block
  8073  	// result: (Select1 x)
  8074  	for {
  8075  		if v_0.Op != OpSelect0 {
  8076  			break
  8077  		}
  8078  		x := v_0.Args[0]
  8079  		if x.Op != OpS390XFADD || !(b == x.Block) {
  8080  			break
  8081  		}
  8082  		v.reset(OpSelect1)
  8083  		v.AddArg(x)
  8084  		return true
  8085  	}
  8086  	// match: (LTDBR (Select0 x:(FSUB _ _)))
  8087  	// cond: b == x.Block
  8088  	// result: (Select1 x)
  8089  	for {
  8090  		if v_0.Op != OpSelect0 {
  8091  			break
  8092  		}
  8093  		x := v_0.Args[0]
  8094  		if x.Op != OpS390XFSUB || !(b == x.Block) {
  8095  			break
  8096  		}
  8097  		v.reset(OpSelect1)
  8098  		v.AddArg(x)
  8099  		return true
  8100  	}
  8101  	return false
  8102  }
  8103  func rewriteValueS390X_OpS390XLTEBR(v *Value) bool {
  8104  	v_0 := v.Args[0]
  8105  	b := v.Block
  8106  	// match: (LTEBR (Select0 x:(FADDS _ _)))
  8107  	// cond: b == x.Block
  8108  	// result: (Select1 x)
  8109  	for {
  8110  		if v_0.Op != OpSelect0 {
  8111  			break
  8112  		}
  8113  		x := v_0.Args[0]
  8114  		if x.Op != OpS390XFADDS || !(b == x.Block) {
  8115  			break
  8116  		}
  8117  		v.reset(OpSelect1)
  8118  		v.AddArg(x)
  8119  		return true
  8120  	}
  8121  	// match: (LTEBR (Select0 x:(FSUBS _ _)))
  8122  	// cond: b == x.Block
  8123  	// result: (Select1 x)
  8124  	for {
  8125  		if v_0.Op != OpSelect0 {
  8126  			break
  8127  		}
  8128  		x := v_0.Args[0]
  8129  		if x.Op != OpS390XFSUBS || !(b == x.Block) {
  8130  			break
  8131  		}
  8132  		v.reset(OpSelect1)
  8133  		v.AddArg(x)
  8134  		return true
  8135  	}
  8136  	return false
  8137  }
  8138  func rewriteValueS390X_OpS390XLoweredRound32F(v *Value) bool {
  8139  	v_0 := v.Args[0]
  8140  	// match: (LoweredRound32F x:(FMOVSconst))
  8141  	// result: x
  8142  	for {
  8143  		x := v_0
  8144  		if x.Op != OpS390XFMOVSconst {
  8145  			break
  8146  		}
  8147  		v.copyOf(x)
  8148  		return true
  8149  	}
  8150  	return false
  8151  }
  8152  func rewriteValueS390X_OpS390XLoweredRound64F(v *Value) bool {
  8153  	v_0 := v.Args[0]
  8154  	// match: (LoweredRound64F x:(FMOVDconst))
  8155  	// result: x
  8156  	for {
  8157  		x := v_0
  8158  		if x.Op != OpS390XFMOVDconst {
  8159  			break
  8160  		}
  8161  		v.copyOf(x)
  8162  		return true
  8163  	}
  8164  	return false
  8165  }
  8166  func rewriteValueS390X_OpS390XMOVBZload(v *Value) bool {
  8167  	v_1 := v.Args[1]
  8168  	v_0 := v.Args[0]
  8169  	// match: (MOVBZload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8170  	// cond: isSamePtr(ptr1, ptr2)
  8171  	// result: (MOVBZreg x)
  8172  	for {
  8173  		off := auxIntToInt32(v.AuxInt)
  8174  		sym := auxToSym(v.Aux)
  8175  		ptr1 := v_0
  8176  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8177  			break
  8178  		}
  8179  		x := v_1.Args[1]
  8180  		ptr2 := v_1.Args[0]
  8181  		if !(isSamePtr(ptr1, ptr2)) {
  8182  			break
  8183  		}
  8184  		v.reset(OpS390XMOVBZreg)
  8185  		v.AddArg(x)
  8186  		return true
  8187  	}
  8188  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] ptr) mem)
  8189  	// cond: is20Bit(int64(off1)+int64(off2))
  8190  	// result: (MOVBZload [off1+off2] {sym} ptr mem)
  8191  	for {
  8192  		off1 := auxIntToInt32(v.AuxInt)
  8193  		sym := auxToSym(v.Aux)
  8194  		if v_0.Op != OpS390XADDconst {
  8195  			break
  8196  		}
  8197  		off2 := auxIntToInt32(v_0.AuxInt)
  8198  		ptr := v_0.Args[0]
  8199  		mem := v_1
  8200  		if !(is20Bit(int64(off1) + int64(off2))) {
  8201  			break
  8202  		}
  8203  		v.reset(OpS390XMOVBZload)
  8204  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8205  		v.Aux = symToAux(sym)
  8206  		v.AddArg2(ptr, mem)
  8207  		return true
  8208  	}
  8209  	// match: (MOVBZload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8210  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8211  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8212  	for {
  8213  		off1 := auxIntToInt32(v.AuxInt)
  8214  		sym1 := auxToSym(v.Aux)
  8215  		if v_0.Op != OpS390XMOVDaddr {
  8216  			break
  8217  		}
  8218  		off2 := auxIntToInt32(v_0.AuxInt)
  8219  		sym2 := auxToSym(v_0.Aux)
  8220  		base := v_0.Args[0]
  8221  		mem := v_1
  8222  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8223  			break
  8224  		}
  8225  		v.reset(OpS390XMOVBZload)
  8226  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8227  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8228  		v.AddArg2(base, mem)
  8229  		return true
  8230  	}
  8231  	return false
  8232  }
  8233  func rewriteValueS390X_OpS390XMOVBZreg(v *Value) bool {
  8234  	v_0 := v.Args[0]
  8235  	b := v.Block
  8236  	typ := &b.Func.Config.Types
  8237  	// match: (MOVBZreg e:(MOVBreg x))
  8238  	// cond: clobberIfDead(e)
  8239  	// result: (MOVBZreg x)
  8240  	for {
  8241  		e := v_0
  8242  		if e.Op != OpS390XMOVBreg {
  8243  			break
  8244  		}
  8245  		x := e.Args[0]
  8246  		if !(clobberIfDead(e)) {
  8247  			break
  8248  		}
  8249  		v.reset(OpS390XMOVBZreg)
  8250  		v.AddArg(x)
  8251  		return true
  8252  	}
  8253  	// match: (MOVBZreg e:(MOVHreg x))
  8254  	// cond: clobberIfDead(e)
  8255  	// result: (MOVBZreg x)
  8256  	for {
  8257  		e := v_0
  8258  		if e.Op != OpS390XMOVHreg {
  8259  			break
  8260  		}
  8261  		x := e.Args[0]
  8262  		if !(clobberIfDead(e)) {
  8263  			break
  8264  		}
  8265  		v.reset(OpS390XMOVBZreg)
  8266  		v.AddArg(x)
  8267  		return true
  8268  	}
  8269  	// match: (MOVBZreg e:(MOVWreg x))
  8270  	// cond: clobberIfDead(e)
  8271  	// result: (MOVBZreg x)
  8272  	for {
  8273  		e := v_0
  8274  		if e.Op != OpS390XMOVWreg {
  8275  			break
  8276  		}
  8277  		x := e.Args[0]
  8278  		if !(clobberIfDead(e)) {
  8279  			break
  8280  		}
  8281  		v.reset(OpS390XMOVBZreg)
  8282  		v.AddArg(x)
  8283  		return true
  8284  	}
  8285  	// match: (MOVBZreg e:(MOVBZreg x))
  8286  	// cond: clobberIfDead(e)
  8287  	// result: (MOVBZreg x)
  8288  	for {
  8289  		e := v_0
  8290  		if e.Op != OpS390XMOVBZreg {
  8291  			break
  8292  		}
  8293  		x := e.Args[0]
  8294  		if !(clobberIfDead(e)) {
  8295  			break
  8296  		}
  8297  		v.reset(OpS390XMOVBZreg)
  8298  		v.AddArg(x)
  8299  		return true
  8300  	}
  8301  	// match: (MOVBZreg e:(MOVHZreg x))
  8302  	// cond: clobberIfDead(e)
  8303  	// result: (MOVBZreg x)
  8304  	for {
  8305  		e := v_0
  8306  		if e.Op != OpS390XMOVHZreg {
  8307  			break
  8308  		}
  8309  		x := e.Args[0]
  8310  		if !(clobberIfDead(e)) {
  8311  			break
  8312  		}
  8313  		v.reset(OpS390XMOVBZreg)
  8314  		v.AddArg(x)
  8315  		return true
  8316  	}
  8317  	// match: (MOVBZreg e:(MOVWZreg x))
  8318  	// cond: clobberIfDead(e)
  8319  	// result: (MOVBZreg x)
  8320  	for {
  8321  		e := v_0
  8322  		if e.Op != OpS390XMOVWZreg {
  8323  			break
  8324  		}
  8325  		x := e.Args[0]
  8326  		if !(clobberIfDead(e)) {
  8327  			break
  8328  		}
  8329  		v.reset(OpS390XMOVBZreg)
  8330  		v.AddArg(x)
  8331  		return true
  8332  	}
  8333  	// match: (MOVBZreg x:(MOVBZload _ _))
  8334  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  8335  	// result: x
  8336  	for {
  8337  		x := v_0
  8338  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  8339  			break
  8340  		}
  8341  		v.copyOf(x)
  8342  		return true
  8343  	}
  8344  	// match: (MOVBZreg <t> x:(MOVBload [o] {s} p mem))
  8345  	// cond: x.Uses == 1 && clobber(x)
  8346  	// result: @x.Block (MOVBZload <t> [o] {s} p mem)
  8347  	for {
  8348  		t := v.Type
  8349  		x := v_0
  8350  		if x.Op != OpS390XMOVBload {
  8351  			break
  8352  		}
  8353  		o := auxIntToInt32(x.AuxInt)
  8354  		s := auxToSym(x.Aux)
  8355  		mem := x.Args[1]
  8356  		p := x.Args[0]
  8357  		if !(x.Uses == 1 && clobber(x)) {
  8358  			break
  8359  		}
  8360  		b = x.Block
  8361  		v0 := b.NewValue0(x.Pos, OpS390XMOVBZload, t)
  8362  		v.copyOf(v0)
  8363  		v0.AuxInt = int32ToAuxInt(o)
  8364  		v0.Aux = symToAux(s)
  8365  		v0.AddArg2(p, mem)
  8366  		return true
  8367  	}
  8368  	// match: (MOVBZreg x:(Arg <t>))
  8369  	// cond: !t.IsSigned() && t.Size() == 1
  8370  	// result: x
  8371  	for {
  8372  		x := v_0
  8373  		if x.Op != OpArg {
  8374  			break
  8375  		}
  8376  		t := x.Type
  8377  		if !(!t.IsSigned() && t.Size() == 1) {
  8378  			break
  8379  		}
  8380  		v.copyOf(x)
  8381  		return true
  8382  	}
  8383  	// match: (MOVBZreg (MOVDconst [c]))
  8384  	// result: (MOVDconst [int64( uint8(c))])
  8385  	for {
  8386  		if v_0.Op != OpS390XMOVDconst {
  8387  			break
  8388  		}
  8389  		c := auxIntToInt64(v_0.AuxInt)
  8390  		v.reset(OpS390XMOVDconst)
  8391  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8392  		return true
  8393  	}
  8394  	// match: (MOVBZreg x:(LOCGR (MOVDconst [c]) (MOVDconst [d]) _))
  8395  	// cond: int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)
  8396  	// result: x
  8397  	for {
  8398  		x := v_0
  8399  		if x.Op != OpS390XLOCGR {
  8400  			break
  8401  		}
  8402  		_ = x.Args[1]
  8403  		x_0 := x.Args[0]
  8404  		if x_0.Op != OpS390XMOVDconst {
  8405  			break
  8406  		}
  8407  		c := auxIntToInt64(x_0.AuxInt)
  8408  		x_1 := x.Args[1]
  8409  		if x_1.Op != OpS390XMOVDconst {
  8410  			break
  8411  		}
  8412  		d := auxIntToInt64(x_1.AuxInt)
  8413  		if !(int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)) {
  8414  			break
  8415  		}
  8416  		v.copyOf(x)
  8417  		return true
  8418  	}
  8419  	// match: (MOVBZreg (RISBGZ x {r}))
  8420  	// cond: r.OutMerge(0x000000ff) != nil
  8421  	// result: (RISBGZ x {*r.OutMerge(0x000000ff)})
  8422  	for {
  8423  		if v_0.Op != OpS390XRISBGZ {
  8424  			break
  8425  		}
  8426  		r := auxToS390xRotateParams(v_0.Aux)
  8427  		x := v_0.Args[0]
  8428  		if !(r.OutMerge(0x000000ff) != nil) {
  8429  			break
  8430  		}
  8431  		v.reset(OpS390XRISBGZ)
  8432  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x000000ff))
  8433  		v.AddArg(x)
  8434  		return true
  8435  	}
  8436  	// match: (MOVBZreg (ANDWconst [m] x))
  8437  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8438  	for {
  8439  		if v_0.Op != OpS390XANDWconst {
  8440  			break
  8441  		}
  8442  		m := auxIntToInt32(v_0.AuxInt)
  8443  		x := v_0.Args[0]
  8444  		v.reset(OpS390XMOVWZreg)
  8445  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8446  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8447  		v0.AddArg(x)
  8448  		v.AddArg(v0)
  8449  		return true
  8450  	}
  8451  	return false
  8452  }
  8453  func rewriteValueS390X_OpS390XMOVBload(v *Value) bool {
  8454  	v_1 := v.Args[1]
  8455  	v_0 := v.Args[0]
  8456  	// match: (MOVBload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8457  	// cond: isSamePtr(ptr1, ptr2)
  8458  	// result: (MOVBreg x)
  8459  	for {
  8460  		off := auxIntToInt32(v.AuxInt)
  8461  		sym := auxToSym(v.Aux)
  8462  		ptr1 := v_0
  8463  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8464  			break
  8465  		}
  8466  		x := v_1.Args[1]
  8467  		ptr2 := v_1.Args[0]
  8468  		if !(isSamePtr(ptr1, ptr2)) {
  8469  			break
  8470  		}
  8471  		v.reset(OpS390XMOVBreg)
  8472  		v.AddArg(x)
  8473  		return true
  8474  	}
  8475  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8476  	// cond: is20Bit(int64(off1)+int64(off2))
  8477  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  8478  	for {
  8479  		off1 := auxIntToInt32(v.AuxInt)
  8480  		sym := auxToSym(v.Aux)
  8481  		if v_0.Op != OpS390XADDconst {
  8482  			break
  8483  		}
  8484  		off2 := auxIntToInt32(v_0.AuxInt)
  8485  		ptr := v_0.Args[0]
  8486  		mem := v_1
  8487  		if !(is20Bit(int64(off1) + int64(off2))) {
  8488  			break
  8489  		}
  8490  		v.reset(OpS390XMOVBload)
  8491  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8492  		v.Aux = symToAux(sym)
  8493  		v.AddArg2(ptr, mem)
  8494  		return true
  8495  	}
  8496  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8497  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8498  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8499  	for {
  8500  		off1 := auxIntToInt32(v.AuxInt)
  8501  		sym1 := auxToSym(v.Aux)
  8502  		if v_0.Op != OpS390XMOVDaddr {
  8503  			break
  8504  		}
  8505  		off2 := auxIntToInt32(v_0.AuxInt)
  8506  		sym2 := auxToSym(v_0.Aux)
  8507  		base := v_0.Args[0]
  8508  		mem := v_1
  8509  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8510  			break
  8511  		}
  8512  		v.reset(OpS390XMOVBload)
  8513  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8514  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8515  		v.AddArg2(base, mem)
  8516  		return true
  8517  	}
  8518  	return false
  8519  }
  8520  func rewriteValueS390X_OpS390XMOVBreg(v *Value) bool {
  8521  	v_0 := v.Args[0]
  8522  	b := v.Block
  8523  	typ := &b.Func.Config.Types
  8524  	// match: (MOVBreg e:(MOVBreg x))
  8525  	// cond: clobberIfDead(e)
  8526  	// result: (MOVBreg x)
  8527  	for {
  8528  		e := v_0
  8529  		if e.Op != OpS390XMOVBreg {
  8530  			break
  8531  		}
  8532  		x := e.Args[0]
  8533  		if !(clobberIfDead(e)) {
  8534  			break
  8535  		}
  8536  		v.reset(OpS390XMOVBreg)
  8537  		v.AddArg(x)
  8538  		return true
  8539  	}
  8540  	// match: (MOVBreg e:(MOVHreg x))
  8541  	// cond: clobberIfDead(e)
  8542  	// result: (MOVBreg x)
  8543  	for {
  8544  		e := v_0
  8545  		if e.Op != OpS390XMOVHreg {
  8546  			break
  8547  		}
  8548  		x := e.Args[0]
  8549  		if !(clobberIfDead(e)) {
  8550  			break
  8551  		}
  8552  		v.reset(OpS390XMOVBreg)
  8553  		v.AddArg(x)
  8554  		return true
  8555  	}
  8556  	// match: (MOVBreg e:(MOVWreg x))
  8557  	// cond: clobberIfDead(e)
  8558  	// result: (MOVBreg x)
  8559  	for {
  8560  		e := v_0
  8561  		if e.Op != OpS390XMOVWreg {
  8562  			break
  8563  		}
  8564  		x := e.Args[0]
  8565  		if !(clobberIfDead(e)) {
  8566  			break
  8567  		}
  8568  		v.reset(OpS390XMOVBreg)
  8569  		v.AddArg(x)
  8570  		return true
  8571  	}
  8572  	// match: (MOVBreg e:(MOVBZreg x))
  8573  	// cond: clobberIfDead(e)
  8574  	// result: (MOVBreg x)
  8575  	for {
  8576  		e := v_0
  8577  		if e.Op != OpS390XMOVBZreg {
  8578  			break
  8579  		}
  8580  		x := e.Args[0]
  8581  		if !(clobberIfDead(e)) {
  8582  			break
  8583  		}
  8584  		v.reset(OpS390XMOVBreg)
  8585  		v.AddArg(x)
  8586  		return true
  8587  	}
  8588  	// match: (MOVBreg e:(MOVHZreg x))
  8589  	// cond: clobberIfDead(e)
  8590  	// result: (MOVBreg x)
  8591  	for {
  8592  		e := v_0
  8593  		if e.Op != OpS390XMOVHZreg {
  8594  			break
  8595  		}
  8596  		x := e.Args[0]
  8597  		if !(clobberIfDead(e)) {
  8598  			break
  8599  		}
  8600  		v.reset(OpS390XMOVBreg)
  8601  		v.AddArg(x)
  8602  		return true
  8603  	}
  8604  	// match: (MOVBreg e:(MOVWZreg x))
  8605  	// cond: clobberIfDead(e)
  8606  	// result: (MOVBreg x)
  8607  	for {
  8608  		e := v_0
  8609  		if e.Op != OpS390XMOVWZreg {
  8610  			break
  8611  		}
  8612  		x := e.Args[0]
  8613  		if !(clobberIfDead(e)) {
  8614  			break
  8615  		}
  8616  		v.reset(OpS390XMOVBreg)
  8617  		v.AddArg(x)
  8618  		return true
  8619  	}
  8620  	// match: (MOVBreg x:(MOVBload _ _))
  8621  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  8622  	// result: x
  8623  	for {
  8624  		x := v_0
  8625  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  8626  			break
  8627  		}
  8628  		v.copyOf(x)
  8629  		return true
  8630  	}
  8631  	// match: (MOVBreg <t> x:(MOVBZload [o] {s} p mem))
  8632  	// cond: x.Uses == 1 && clobber(x)
  8633  	// result: @x.Block (MOVBload <t> [o] {s} p mem)
  8634  	for {
  8635  		t := v.Type
  8636  		x := v_0
  8637  		if x.Op != OpS390XMOVBZload {
  8638  			break
  8639  		}
  8640  		o := auxIntToInt32(x.AuxInt)
  8641  		s := auxToSym(x.Aux)
  8642  		mem := x.Args[1]
  8643  		p := x.Args[0]
  8644  		if !(x.Uses == 1 && clobber(x)) {
  8645  			break
  8646  		}
  8647  		b = x.Block
  8648  		v0 := b.NewValue0(x.Pos, OpS390XMOVBload, t)
  8649  		v.copyOf(v0)
  8650  		v0.AuxInt = int32ToAuxInt(o)
  8651  		v0.Aux = symToAux(s)
  8652  		v0.AddArg2(p, mem)
  8653  		return true
  8654  	}
  8655  	// match: (MOVBreg x:(Arg <t>))
  8656  	// cond: t.IsSigned() && t.Size() == 1
  8657  	// result: x
  8658  	for {
  8659  		x := v_0
  8660  		if x.Op != OpArg {
  8661  			break
  8662  		}
  8663  		t := x.Type
  8664  		if !(t.IsSigned() && t.Size() == 1) {
  8665  			break
  8666  		}
  8667  		v.copyOf(x)
  8668  		return true
  8669  	}
  8670  	// match: (MOVBreg (MOVDconst [c]))
  8671  	// result: (MOVDconst [int64( int8(c))])
  8672  	for {
  8673  		if v_0.Op != OpS390XMOVDconst {
  8674  			break
  8675  		}
  8676  		c := auxIntToInt64(v_0.AuxInt)
  8677  		v.reset(OpS390XMOVDconst)
  8678  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8679  		return true
  8680  	}
  8681  	// match: (MOVBreg (ANDWconst [m] x))
  8682  	// cond: int8(m) >= 0
  8683  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8684  	for {
  8685  		if v_0.Op != OpS390XANDWconst {
  8686  			break
  8687  		}
  8688  		m := auxIntToInt32(v_0.AuxInt)
  8689  		x := v_0.Args[0]
  8690  		if !(int8(m) >= 0) {
  8691  			break
  8692  		}
  8693  		v.reset(OpS390XMOVWZreg)
  8694  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8695  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8696  		v0.AddArg(x)
  8697  		v.AddArg(v0)
  8698  		return true
  8699  	}
  8700  	return false
  8701  }
  8702  func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
  8703  	v_2 := v.Args[2]
  8704  	v_1 := v.Args[1]
  8705  	v_0 := v.Args[0]
  8706  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8707  	// result: (MOVBstore [off] {sym} ptr x mem)
  8708  	for {
  8709  		off := auxIntToInt32(v.AuxInt)
  8710  		sym := auxToSym(v.Aux)
  8711  		ptr := v_0
  8712  		if v_1.Op != OpS390XMOVBreg {
  8713  			break
  8714  		}
  8715  		x := v_1.Args[0]
  8716  		mem := v_2
  8717  		v.reset(OpS390XMOVBstore)
  8718  		v.AuxInt = int32ToAuxInt(off)
  8719  		v.Aux = symToAux(sym)
  8720  		v.AddArg3(ptr, x, mem)
  8721  		return true
  8722  	}
  8723  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8724  	// result: (MOVBstore [off] {sym} ptr x mem)
  8725  	for {
  8726  		off := auxIntToInt32(v.AuxInt)
  8727  		sym := auxToSym(v.Aux)
  8728  		ptr := v_0
  8729  		if v_1.Op != OpS390XMOVBZreg {
  8730  			break
  8731  		}
  8732  		x := v_1.Args[0]
  8733  		mem := v_2
  8734  		v.reset(OpS390XMOVBstore)
  8735  		v.AuxInt = int32ToAuxInt(off)
  8736  		v.Aux = symToAux(sym)
  8737  		v.AddArg3(ptr, x, mem)
  8738  		return true
  8739  	}
  8740  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8741  	// cond: is20Bit(int64(off1)+int64(off2))
  8742  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  8743  	for {
  8744  		off1 := auxIntToInt32(v.AuxInt)
  8745  		sym := auxToSym(v.Aux)
  8746  		if v_0.Op != OpS390XADDconst {
  8747  			break
  8748  		}
  8749  		off2 := auxIntToInt32(v_0.AuxInt)
  8750  		ptr := v_0.Args[0]
  8751  		val := v_1
  8752  		mem := v_2
  8753  		if !(is20Bit(int64(off1) + int64(off2))) {
  8754  			break
  8755  		}
  8756  		v.reset(OpS390XMOVBstore)
  8757  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8758  		v.Aux = symToAux(sym)
  8759  		v.AddArg3(ptr, val, mem)
  8760  		return true
  8761  	}
  8762  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [c]) mem)
  8763  	// cond: is20Bit(int64(off)) && ptr.Op != OpSB
  8764  	// result: (MOVBstoreconst [makeValAndOff(int32(int8(c)),off)] {sym} ptr mem)
  8765  	for {
  8766  		off := auxIntToInt32(v.AuxInt)
  8767  		sym := auxToSym(v.Aux)
  8768  		ptr := v_0
  8769  		if v_1.Op != OpS390XMOVDconst {
  8770  			break
  8771  		}
  8772  		c := auxIntToInt64(v_1.AuxInt)
  8773  		mem := v_2
  8774  		if !(is20Bit(int64(off)) && ptr.Op != OpSB) {
  8775  			break
  8776  		}
  8777  		v.reset(OpS390XMOVBstoreconst)
  8778  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int8(c)), off))
  8779  		v.Aux = symToAux(sym)
  8780  		v.AddArg2(ptr, mem)
  8781  		return true
  8782  	}
  8783  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  8784  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8785  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8786  	for {
  8787  		off1 := auxIntToInt32(v.AuxInt)
  8788  		sym1 := auxToSym(v.Aux)
  8789  		if v_0.Op != OpS390XMOVDaddr {
  8790  			break
  8791  		}
  8792  		off2 := auxIntToInt32(v_0.AuxInt)
  8793  		sym2 := auxToSym(v_0.Aux)
  8794  		base := v_0.Args[0]
  8795  		val := v_1
  8796  		mem := v_2
  8797  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8798  			break
  8799  		}
  8800  		v.reset(OpS390XMOVBstore)
  8801  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8802  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8803  		v.AddArg3(base, val, mem)
  8804  		return true
  8805  	}
  8806  	return false
  8807  }
  8808  func rewriteValueS390X_OpS390XMOVBstoreconst(v *Value) bool {
  8809  	v_1 := v.Args[1]
  8810  	v_0 := v.Args[0]
  8811  	// match: (MOVBstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  8812  	// cond: is20Bit(sc.Off64()+int64(off))
  8813  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  8814  	for {
  8815  		sc := auxIntToValAndOff(v.AuxInt)
  8816  		s := auxToSym(v.Aux)
  8817  		if v_0.Op != OpS390XADDconst {
  8818  			break
  8819  		}
  8820  		off := auxIntToInt32(v_0.AuxInt)
  8821  		ptr := v_0.Args[0]
  8822  		mem := v_1
  8823  		if !(is20Bit(sc.Off64() + int64(off))) {
  8824  			break
  8825  		}
  8826  		v.reset(OpS390XMOVBstoreconst)
  8827  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8828  		v.Aux = symToAux(s)
  8829  		v.AddArg2(ptr, mem)
  8830  		return true
  8831  	}
  8832  	// match: (MOVBstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  8833  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  8834  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  8835  	for {
  8836  		sc := auxIntToValAndOff(v.AuxInt)
  8837  		sym1 := auxToSym(v.Aux)
  8838  		if v_0.Op != OpS390XMOVDaddr {
  8839  			break
  8840  		}
  8841  		off := auxIntToInt32(v_0.AuxInt)
  8842  		sym2 := auxToSym(v_0.Aux)
  8843  		ptr := v_0.Args[0]
  8844  		mem := v_1
  8845  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  8846  			break
  8847  		}
  8848  		v.reset(OpS390XMOVBstoreconst)
  8849  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8850  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8851  		v.AddArg2(ptr, mem)
  8852  		return true
  8853  	}
  8854  	return false
  8855  }
  8856  func rewriteValueS390X_OpS390XMOVDBR(v *Value) bool {
  8857  	v_0 := v.Args[0]
  8858  	b := v.Block
  8859  	typ := &b.Func.Config.Types
  8860  	// match: (MOVDBR x:(MOVDload [off] {sym} ptr mem))
  8861  	// cond: x.Uses == 1
  8862  	// result: @x.Block (MOVDBRload [off] {sym} ptr mem)
  8863  	for {
  8864  		x := v_0
  8865  		if x.Op != OpS390XMOVDload {
  8866  			break
  8867  		}
  8868  		off := auxIntToInt32(x.AuxInt)
  8869  		sym := auxToSym(x.Aux)
  8870  		mem := x.Args[1]
  8871  		ptr := x.Args[0]
  8872  		if !(x.Uses == 1) {
  8873  			break
  8874  		}
  8875  		b = x.Block
  8876  		v0 := b.NewValue0(x.Pos, OpS390XMOVDBRload, typ.UInt64)
  8877  		v.copyOf(v0)
  8878  		v0.AuxInt = int32ToAuxInt(off)
  8879  		v0.Aux = symToAux(sym)
  8880  		v0.AddArg2(ptr, mem)
  8881  		return true
  8882  	}
  8883  	// match: (MOVDBR x:(MOVDloadidx [off] {sym} ptr idx mem))
  8884  	// cond: x.Uses == 1
  8885  	// result: @x.Block (MOVDBRloadidx [off] {sym} ptr idx mem)
  8886  	for {
  8887  		x := v_0
  8888  		if x.Op != OpS390XMOVDloadidx {
  8889  			break
  8890  		}
  8891  		off := auxIntToInt32(x.AuxInt)
  8892  		sym := auxToSym(x.Aux)
  8893  		mem := x.Args[2]
  8894  		ptr := x.Args[0]
  8895  		idx := x.Args[1]
  8896  		if !(x.Uses == 1) {
  8897  			break
  8898  		}
  8899  		b = x.Block
  8900  		v0 := b.NewValue0(v.Pos, OpS390XMOVDBRloadidx, typ.Int64)
  8901  		v.copyOf(v0)
  8902  		v0.AuxInt = int32ToAuxInt(off)
  8903  		v0.Aux = symToAux(sym)
  8904  		v0.AddArg3(ptr, idx, mem)
  8905  		return true
  8906  	}
  8907  	return false
  8908  }
  8909  func rewriteValueS390X_OpS390XMOVDaddridx(v *Value) bool {
  8910  	v_1 := v.Args[1]
  8911  	v_0 := v.Args[0]
  8912  	// match: (MOVDaddridx [c] {s} (ADDconst [d] x) y)
  8913  	// cond: is20Bit(int64(c)+int64(d))
  8914  	// result: (MOVDaddridx [c+d] {s} x y)
  8915  	for {
  8916  		c := auxIntToInt32(v.AuxInt)
  8917  		s := auxToSym(v.Aux)
  8918  		if v_0.Op != OpS390XADDconst {
  8919  			break
  8920  		}
  8921  		d := auxIntToInt32(v_0.AuxInt)
  8922  		x := v_0.Args[0]
  8923  		y := v_1
  8924  		if !(is20Bit(int64(c) + int64(d))) {
  8925  			break
  8926  		}
  8927  		v.reset(OpS390XMOVDaddridx)
  8928  		v.AuxInt = int32ToAuxInt(c + d)
  8929  		v.Aux = symToAux(s)
  8930  		v.AddArg2(x, y)
  8931  		return true
  8932  	}
  8933  	// match: (MOVDaddridx [c] {s} x (ADDconst [d] y))
  8934  	// cond: is20Bit(int64(c)+int64(d))
  8935  	// result: (MOVDaddridx [c+d] {s} x y)
  8936  	for {
  8937  		c := auxIntToInt32(v.AuxInt)
  8938  		s := auxToSym(v.Aux)
  8939  		x := v_0
  8940  		if v_1.Op != OpS390XADDconst {
  8941  			break
  8942  		}
  8943  		d := auxIntToInt32(v_1.AuxInt)
  8944  		y := v_1.Args[0]
  8945  		if !(is20Bit(int64(c) + int64(d))) {
  8946  			break
  8947  		}
  8948  		v.reset(OpS390XMOVDaddridx)
  8949  		v.AuxInt = int32ToAuxInt(c + d)
  8950  		v.Aux = symToAux(s)
  8951  		v.AddArg2(x, y)
  8952  		return true
  8953  	}
  8954  	// match: (MOVDaddridx [off1] {sym1} (MOVDaddr [off2] {sym2} x) y)
  8955  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  8956  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  8957  	for {
  8958  		off1 := auxIntToInt32(v.AuxInt)
  8959  		sym1 := auxToSym(v.Aux)
  8960  		if v_0.Op != OpS390XMOVDaddr {
  8961  			break
  8962  		}
  8963  		off2 := auxIntToInt32(v_0.AuxInt)
  8964  		sym2 := auxToSym(v_0.Aux)
  8965  		x := v_0.Args[0]
  8966  		y := v_1
  8967  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  8968  			break
  8969  		}
  8970  		v.reset(OpS390XMOVDaddridx)
  8971  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8972  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8973  		v.AddArg2(x, y)
  8974  		return true
  8975  	}
  8976  	// match: (MOVDaddridx [off1] {sym1} x (MOVDaddr [off2] {sym2} y))
  8977  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB
  8978  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  8979  	for {
  8980  		off1 := auxIntToInt32(v.AuxInt)
  8981  		sym1 := auxToSym(v.Aux)
  8982  		x := v_0
  8983  		if v_1.Op != OpS390XMOVDaddr {
  8984  			break
  8985  		}
  8986  		off2 := auxIntToInt32(v_1.AuxInt)
  8987  		sym2 := auxToSym(v_1.Aux)
  8988  		y := v_1.Args[0]
  8989  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  8990  			break
  8991  		}
  8992  		v.reset(OpS390XMOVDaddridx)
  8993  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8994  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8995  		v.AddArg2(x, y)
  8996  		return true
  8997  	}
  8998  	return false
  8999  }
  9000  func rewriteValueS390X_OpS390XMOVDload(v *Value) bool {
  9001  	v_1 := v.Args[1]
  9002  	v_0 := v.Args[0]
  9003  	// match: (MOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  9004  	// cond: isSamePtr(ptr1, ptr2)
  9005  	// result: x
  9006  	for {
  9007  		off := auxIntToInt32(v.AuxInt)
  9008  		sym := auxToSym(v.Aux)
  9009  		ptr1 := v_0
  9010  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9011  			break
  9012  		}
  9013  		x := v_1.Args[1]
  9014  		ptr2 := v_1.Args[0]
  9015  		if !(isSamePtr(ptr1, ptr2)) {
  9016  			break
  9017  		}
  9018  		v.copyOf(x)
  9019  		return true
  9020  	}
  9021  	// match: (MOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  9022  	// cond: isSamePtr(ptr1, ptr2)
  9023  	// result: (LGDR x)
  9024  	for {
  9025  		off := auxIntToInt32(v.AuxInt)
  9026  		sym := auxToSym(v.Aux)
  9027  		ptr1 := v_0
  9028  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9029  			break
  9030  		}
  9031  		x := v_1.Args[1]
  9032  		ptr2 := v_1.Args[0]
  9033  		if !(isSamePtr(ptr1, ptr2)) {
  9034  			break
  9035  		}
  9036  		v.reset(OpS390XLGDR)
  9037  		v.AddArg(x)
  9038  		return true
  9039  	}
  9040  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9041  	// cond: is20Bit(int64(off1)+int64(off2))
  9042  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  9043  	for {
  9044  		off1 := auxIntToInt32(v.AuxInt)
  9045  		sym := auxToSym(v.Aux)
  9046  		if v_0.Op != OpS390XADDconst {
  9047  			break
  9048  		}
  9049  		off2 := auxIntToInt32(v_0.AuxInt)
  9050  		ptr := v_0.Args[0]
  9051  		mem := v_1
  9052  		if !(is20Bit(int64(off1) + int64(off2))) {
  9053  			break
  9054  		}
  9055  		v.reset(OpS390XMOVDload)
  9056  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9057  		v.Aux = symToAux(sym)
  9058  		v.AddArg2(ptr, mem)
  9059  		return true
  9060  	}
  9061  	// match: (MOVDload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9062  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9063  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9064  	for {
  9065  		off1 := auxIntToInt32(v.AuxInt)
  9066  		sym1 := auxToSym(v.Aux)
  9067  		if v_0.Op != OpS390XMOVDaddr {
  9068  			break
  9069  		}
  9070  		t := v_0.Type
  9071  		off2 := auxIntToInt32(v_0.AuxInt)
  9072  		sym2 := auxToSym(v_0.Aux)
  9073  		base := v_0.Args[0]
  9074  		mem := v_1
  9075  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9076  			break
  9077  		}
  9078  		v.reset(OpS390XMOVDload)
  9079  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9080  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9081  		v.AddArg2(base, mem)
  9082  		return true
  9083  	}
  9084  	return false
  9085  }
  9086  func rewriteValueS390X_OpS390XMOVDstore(v *Value) bool {
  9087  	v_2 := v.Args[2]
  9088  	v_1 := v.Args[1]
  9089  	v_0 := v.Args[0]
  9090  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9091  	// cond: is20Bit(int64(off1)+int64(off2))
  9092  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  9093  	for {
  9094  		off1 := auxIntToInt32(v.AuxInt)
  9095  		sym := auxToSym(v.Aux)
  9096  		if v_0.Op != OpS390XADDconst {
  9097  			break
  9098  		}
  9099  		off2 := auxIntToInt32(v_0.AuxInt)
  9100  		ptr := v_0.Args[0]
  9101  		val := v_1
  9102  		mem := v_2
  9103  		if !(is20Bit(int64(off1) + int64(off2))) {
  9104  			break
  9105  		}
  9106  		v.reset(OpS390XMOVDstore)
  9107  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9108  		v.Aux = symToAux(sym)
  9109  		v.AddArg3(ptr, val, mem)
  9110  		return true
  9111  	}
  9112  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [c]) mem)
  9113  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
  9114  	// result: (MOVDstoreconst [makeValAndOff(int32(c),off)] {sym} ptr mem)
  9115  	for {
  9116  		off := auxIntToInt32(v.AuxInt)
  9117  		sym := auxToSym(v.Aux)
  9118  		ptr := v_0
  9119  		if v_1.Op != OpS390XMOVDconst {
  9120  			break
  9121  		}
  9122  		c := auxIntToInt64(v_1.AuxInt)
  9123  		mem := v_2
  9124  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
  9125  			break
  9126  		}
  9127  		v.reset(OpS390XMOVDstoreconst)
  9128  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  9129  		v.Aux = symToAux(sym)
  9130  		v.AddArg2(ptr, mem)
  9131  		return true
  9132  	}
  9133  	// match: (MOVDstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9134  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9135  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  9136  	for {
  9137  		off1 := auxIntToInt32(v.AuxInt)
  9138  		sym1 := auxToSym(v.Aux)
  9139  		if v_0.Op != OpS390XMOVDaddr {
  9140  			break
  9141  		}
  9142  		t := v_0.Type
  9143  		off2 := auxIntToInt32(v_0.AuxInt)
  9144  		sym2 := auxToSym(v_0.Aux)
  9145  		base := v_0.Args[0]
  9146  		val := v_1
  9147  		mem := v_2
  9148  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9149  			break
  9150  		}
  9151  		v.reset(OpS390XMOVDstore)
  9152  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9153  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9154  		v.AddArg3(base, val, mem)
  9155  		return true
  9156  	}
  9157  	// match: (MOVDstore [i] {s} p w1 x:(MOVDstore [i-8] {s} p w0 mem))
  9158  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)
  9159  	// result: (STMG2 [i-8] {s} p w0 w1 mem)
  9160  	for {
  9161  		i := auxIntToInt32(v.AuxInt)
  9162  		s := auxToSym(v.Aux)
  9163  		p := v_0
  9164  		w1 := v_1
  9165  		x := v_2
  9166  		if x.Op != OpS390XMOVDstore || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
  9167  			break
  9168  		}
  9169  		mem := x.Args[2]
  9170  		if p != x.Args[0] {
  9171  			break
  9172  		}
  9173  		w0 := x.Args[1]
  9174  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)) {
  9175  			break
  9176  		}
  9177  		v.reset(OpS390XSTMG2)
  9178  		v.AuxInt = int32ToAuxInt(i - 8)
  9179  		v.Aux = symToAux(s)
  9180  		v.AddArg4(p, w0, w1, mem)
  9181  		return true
  9182  	}
  9183  	// match: (MOVDstore [i] {s} p w2 x:(STMG2 [i-16] {s} p w0 w1 mem))
  9184  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)
  9185  	// result: (STMG3 [i-16] {s} p w0 w1 w2 mem)
  9186  	for {
  9187  		i := auxIntToInt32(v.AuxInt)
  9188  		s := auxToSym(v.Aux)
  9189  		p := v_0
  9190  		w2 := v_1
  9191  		x := v_2
  9192  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
  9193  			break
  9194  		}
  9195  		mem := x.Args[3]
  9196  		if p != x.Args[0] {
  9197  			break
  9198  		}
  9199  		w0 := x.Args[1]
  9200  		w1 := x.Args[2]
  9201  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)) {
  9202  			break
  9203  		}
  9204  		v.reset(OpS390XSTMG3)
  9205  		v.AuxInt = int32ToAuxInt(i - 16)
  9206  		v.Aux = symToAux(s)
  9207  		v.AddArg5(p, w0, w1, w2, mem)
  9208  		return true
  9209  	}
  9210  	// match: (MOVDstore [i] {s} p w3 x:(STMG3 [i-24] {s} p w0 w1 w2 mem))
  9211  	// cond: x.Uses == 1 && is20Bit(int64(i)-24) && setPos(v, x.Pos) && clobber(x)
  9212  	// result: (STMG4 [i-24] {s} p w0 w1 w2 w3 mem)
  9213  	for {
  9214  		i := auxIntToInt32(v.AuxInt)
  9215  		s := auxToSym(v.Aux)
  9216  		p := v_0
  9217  		w3 := v_1
  9218  		x := v_2
  9219  		if x.Op != OpS390XSTMG3 || auxIntToInt32(x.AuxInt) != i-24 || auxToSym(x.Aux) != s {
  9220  			break
  9221  		}
  9222  		mem := x.Args[4]
  9223  		if p != x.Args[0] {
  9224  			break
  9225  		}
  9226  		w0 := x.Args[1]
  9227  		w1 := x.Args[2]
  9228  		w2 := x.Args[3]
  9229  		if !(x.Uses == 1 && is20Bit(int64(i)-24) && setPos(v, x.Pos) && clobber(x)) {
  9230  			break
  9231  		}
  9232  		v.reset(OpS390XSTMG4)
  9233  		v.AuxInt = int32ToAuxInt(i - 24)
  9234  		v.Aux = symToAux(s)
  9235  		v.AddArg6(p, w0, w1, w2, w3, mem)
  9236  		return true
  9237  	}
  9238  	// match: (MOVDstore [off] {sym} ptr r:(MOVDBR x) mem)
  9239  	// cond: r.Uses == 1
  9240  	// result: (MOVDBRstore [off] {sym} ptr x mem)
  9241  	for {
  9242  		off := auxIntToInt32(v.AuxInt)
  9243  		sym := auxToSym(v.Aux)
  9244  		ptr := v_0
  9245  		r := v_1
  9246  		if r.Op != OpS390XMOVDBR {
  9247  			break
  9248  		}
  9249  		x := r.Args[0]
  9250  		mem := v_2
  9251  		if !(r.Uses == 1) {
  9252  			break
  9253  		}
  9254  		v.reset(OpS390XMOVDBRstore)
  9255  		v.AuxInt = int32ToAuxInt(off)
  9256  		v.Aux = symToAux(sym)
  9257  		v.AddArg3(ptr, x, mem)
  9258  		return true
  9259  	}
  9260  	return false
  9261  }
  9262  func rewriteValueS390X_OpS390XMOVDstoreconst(v *Value) bool {
  9263  	v_1 := v.Args[1]
  9264  	v_0 := v.Args[0]
  9265  	// match: (MOVDstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  9266  	// cond: isU12Bit(sc.Off64()+int64(off))
  9267  	// result: (MOVDstoreconst [sc.addOffset32(off)] {s} ptr mem)
  9268  	for {
  9269  		sc := auxIntToValAndOff(v.AuxInt)
  9270  		s := auxToSym(v.Aux)
  9271  		if v_0.Op != OpS390XADDconst {
  9272  			break
  9273  		}
  9274  		off := auxIntToInt32(v_0.AuxInt)
  9275  		ptr := v_0.Args[0]
  9276  		mem := v_1
  9277  		if !(isU12Bit(sc.Off64() + int64(off))) {
  9278  			break
  9279  		}
  9280  		v.reset(OpS390XMOVDstoreconst)
  9281  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9282  		v.Aux = symToAux(s)
  9283  		v.AddArg2(ptr, mem)
  9284  		return true
  9285  	}
  9286  	// match: (MOVDstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  9287  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  9288  	// result: (MOVDstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  9289  	for {
  9290  		sc := auxIntToValAndOff(v.AuxInt)
  9291  		sym1 := auxToSym(v.Aux)
  9292  		if v_0.Op != OpS390XMOVDaddr {
  9293  			break
  9294  		}
  9295  		off := auxIntToInt32(v_0.AuxInt)
  9296  		sym2 := auxToSym(v_0.Aux)
  9297  		ptr := v_0.Args[0]
  9298  		mem := v_1
  9299  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  9300  			break
  9301  		}
  9302  		v.reset(OpS390XMOVDstoreconst)
  9303  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9304  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9305  		v.AddArg2(ptr, mem)
  9306  		return true
  9307  	}
  9308  	return false
  9309  }
  9310  func rewriteValueS390X_OpS390XMOVDstoreidx(v *Value) bool {
  9311  	v_3 := v.Args[3]
  9312  	v_2 := v.Args[2]
  9313  	v_1 := v.Args[1]
  9314  	v_0 := v.Args[0]
  9315  	// match: (MOVDstoreidx [off] {sym} ptr idx r:(MOVDBR x) mem)
  9316  	// cond: r.Uses == 1
  9317  	// result: (MOVDBRstoreidx [off] {sym} ptr idx x mem)
  9318  	for {
  9319  		off := auxIntToInt32(v.AuxInt)
  9320  		sym := auxToSym(v.Aux)
  9321  		ptr := v_0
  9322  		idx := v_1
  9323  		r := v_2
  9324  		if r.Op != OpS390XMOVDBR {
  9325  			break
  9326  		}
  9327  		x := r.Args[0]
  9328  		mem := v_3
  9329  		if !(r.Uses == 1) {
  9330  			break
  9331  		}
  9332  		v.reset(OpS390XMOVDBRstoreidx)
  9333  		v.AuxInt = int32ToAuxInt(off)
  9334  		v.Aux = symToAux(sym)
  9335  		v.AddArg4(ptr, idx, x, mem)
  9336  		return true
  9337  	}
  9338  	return false
  9339  }
  9340  func rewriteValueS390X_OpS390XMOVHZload(v *Value) bool {
  9341  	v_1 := v.Args[1]
  9342  	v_0 := v.Args[0]
  9343  	// match: (MOVHZload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9344  	// cond: isSamePtr(ptr1, ptr2)
  9345  	// result: (MOVHZreg x)
  9346  	for {
  9347  		off := auxIntToInt32(v.AuxInt)
  9348  		sym := auxToSym(v.Aux)
  9349  		ptr1 := v_0
  9350  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9351  			break
  9352  		}
  9353  		x := v_1.Args[1]
  9354  		ptr2 := v_1.Args[0]
  9355  		if !(isSamePtr(ptr1, ptr2)) {
  9356  			break
  9357  		}
  9358  		v.reset(OpS390XMOVHZreg)
  9359  		v.AddArg(x)
  9360  		return true
  9361  	}
  9362  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] ptr) mem)
  9363  	// cond: is20Bit(int64(off1)+int64(off2))
  9364  	// result: (MOVHZload [off1+off2] {sym} ptr mem)
  9365  	for {
  9366  		off1 := auxIntToInt32(v.AuxInt)
  9367  		sym := auxToSym(v.Aux)
  9368  		if v_0.Op != OpS390XADDconst {
  9369  			break
  9370  		}
  9371  		off2 := auxIntToInt32(v_0.AuxInt)
  9372  		ptr := v_0.Args[0]
  9373  		mem := v_1
  9374  		if !(is20Bit(int64(off1) + int64(off2))) {
  9375  			break
  9376  		}
  9377  		v.reset(OpS390XMOVHZload)
  9378  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9379  		v.Aux = symToAux(sym)
  9380  		v.AddArg2(ptr, mem)
  9381  		return true
  9382  	}
  9383  	// match: (MOVHZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9384  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9385  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9386  	for {
  9387  		off1 := auxIntToInt32(v.AuxInt)
  9388  		sym1 := auxToSym(v.Aux)
  9389  		if v_0.Op != OpS390XMOVDaddr {
  9390  			break
  9391  		}
  9392  		t := v_0.Type
  9393  		off2 := auxIntToInt32(v_0.AuxInt)
  9394  		sym2 := auxToSym(v_0.Aux)
  9395  		base := v_0.Args[0]
  9396  		mem := v_1
  9397  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9398  			break
  9399  		}
  9400  		v.reset(OpS390XMOVHZload)
  9401  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9402  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9403  		v.AddArg2(base, mem)
  9404  		return true
  9405  	}
  9406  	return false
  9407  }
  9408  func rewriteValueS390X_OpS390XMOVHZreg(v *Value) bool {
  9409  	v_0 := v.Args[0]
  9410  	b := v.Block
  9411  	typ := &b.Func.Config.Types
  9412  	// match: (MOVHZreg e:(MOVBZreg x))
  9413  	// cond: clobberIfDead(e)
  9414  	// result: (MOVBZreg x)
  9415  	for {
  9416  		e := v_0
  9417  		if e.Op != OpS390XMOVBZreg {
  9418  			break
  9419  		}
  9420  		x := e.Args[0]
  9421  		if !(clobberIfDead(e)) {
  9422  			break
  9423  		}
  9424  		v.reset(OpS390XMOVBZreg)
  9425  		v.AddArg(x)
  9426  		return true
  9427  	}
  9428  	// match: (MOVHZreg e:(MOVHreg x))
  9429  	// cond: clobberIfDead(e)
  9430  	// result: (MOVHZreg x)
  9431  	for {
  9432  		e := v_0
  9433  		if e.Op != OpS390XMOVHreg {
  9434  			break
  9435  		}
  9436  		x := e.Args[0]
  9437  		if !(clobberIfDead(e)) {
  9438  			break
  9439  		}
  9440  		v.reset(OpS390XMOVHZreg)
  9441  		v.AddArg(x)
  9442  		return true
  9443  	}
  9444  	// match: (MOVHZreg e:(MOVWreg x))
  9445  	// cond: clobberIfDead(e)
  9446  	// result: (MOVHZreg x)
  9447  	for {
  9448  		e := v_0
  9449  		if e.Op != OpS390XMOVWreg {
  9450  			break
  9451  		}
  9452  		x := e.Args[0]
  9453  		if !(clobberIfDead(e)) {
  9454  			break
  9455  		}
  9456  		v.reset(OpS390XMOVHZreg)
  9457  		v.AddArg(x)
  9458  		return true
  9459  	}
  9460  	// match: (MOVHZreg e:(MOVHZreg x))
  9461  	// cond: clobberIfDead(e)
  9462  	// result: (MOVHZreg x)
  9463  	for {
  9464  		e := v_0
  9465  		if e.Op != OpS390XMOVHZreg {
  9466  			break
  9467  		}
  9468  		x := e.Args[0]
  9469  		if !(clobberIfDead(e)) {
  9470  			break
  9471  		}
  9472  		v.reset(OpS390XMOVHZreg)
  9473  		v.AddArg(x)
  9474  		return true
  9475  	}
  9476  	// match: (MOVHZreg e:(MOVWZreg x))
  9477  	// cond: clobberIfDead(e)
  9478  	// result: (MOVHZreg x)
  9479  	for {
  9480  		e := v_0
  9481  		if e.Op != OpS390XMOVWZreg {
  9482  			break
  9483  		}
  9484  		x := e.Args[0]
  9485  		if !(clobberIfDead(e)) {
  9486  			break
  9487  		}
  9488  		v.reset(OpS390XMOVHZreg)
  9489  		v.AddArg(x)
  9490  		return true
  9491  	}
  9492  	// match: (MOVHZreg x:(MOVBZload _ _))
  9493  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9494  	// result: x
  9495  	for {
  9496  		x := v_0
  9497  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9498  			break
  9499  		}
  9500  		v.copyOf(x)
  9501  		return true
  9502  	}
  9503  	// match: (MOVHZreg x:(MOVHZload _ _))
  9504  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
  9505  	// result: x
  9506  	for {
  9507  		x := v_0
  9508  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
  9509  			break
  9510  		}
  9511  		v.copyOf(x)
  9512  		return true
  9513  	}
  9514  	// match: (MOVHZreg <t> x:(MOVHload [o] {s} p mem))
  9515  	// cond: x.Uses == 1 && clobber(x)
  9516  	// result: @x.Block (MOVHZload <t> [o] {s} p mem)
  9517  	for {
  9518  		t := v.Type
  9519  		x := v_0
  9520  		if x.Op != OpS390XMOVHload {
  9521  			break
  9522  		}
  9523  		o := auxIntToInt32(x.AuxInt)
  9524  		s := auxToSym(x.Aux)
  9525  		mem := x.Args[1]
  9526  		p := x.Args[0]
  9527  		if !(x.Uses == 1 && clobber(x)) {
  9528  			break
  9529  		}
  9530  		b = x.Block
  9531  		v0 := b.NewValue0(x.Pos, OpS390XMOVHZload, t)
  9532  		v.copyOf(v0)
  9533  		v0.AuxInt = int32ToAuxInt(o)
  9534  		v0.Aux = symToAux(s)
  9535  		v0.AddArg2(p, mem)
  9536  		return true
  9537  	}
  9538  	// match: (MOVHZreg x:(Arg <t>))
  9539  	// cond: !t.IsSigned() && t.Size() <= 2
  9540  	// result: x
  9541  	for {
  9542  		x := v_0
  9543  		if x.Op != OpArg {
  9544  			break
  9545  		}
  9546  		t := x.Type
  9547  		if !(!t.IsSigned() && t.Size() <= 2) {
  9548  			break
  9549  		}
  9550  		v.copyOf(x)
  9551  		return true
  9552  	}
  9553  	// match: (MOVHZreg (MOVDconst [c]))
  9554  	// result: (MOVDconst [int64(uint16(c))])
  9555  	for {
  9556  		if v_0.Op != OpS390XMOVDconst {
  9557  			break
  9558  		}
  9559  		c := auxIntToInt64(v_0.AuxInt)
  9560  		v.reset(OpS390XMOVDconst)
  9561  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9562  		return true
  9563  	}
  9564  	// match: (MOVHZreg (RISBGZ x {r}))
  9565  	// cond: r.OutMerge(0x0000ffff) != nil
  9566  	// result: (RISBGZ x {*r.OutMerge(0x0000ffff)})
  9567  	for {
  9568  		if v_0.Op != OpS390XRISBGZ {
  9569  			break
  9570  		}
  9571  		r := auxToS390xRotateParams(v_0.Aux)
  9572  		x := v_0.Args[0]
  9573  		if !(r.OutMerge(0x0000ffff) != nil) {
  9574  			break
  9575  		}
  9576  		v.reset(OpS390XRISBGZ)
  9577  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x0000ffff))
  9578  		v.AddArg(x)
  9579  		return true
  9580  	}
  9581  	// match: (MOVHZreg (ANDWconst [m] x))
  9582  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9583  	for {
  9584  		if v_0.Op != OpS390XANDWconst {
  9585  			break
  9586  		}
  9587  		m := auxIntToInt32(v_0.AuxInt)
  9588  		x := v_0.Args[0]
  9589  		v.reset(OpS390XMOVWZreg)
  9590  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9591  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9592  		v0.AddArg(x)
  9593  		v.AddArg(v0)
  9594  		return true
  9595  	}
  9596  	return false
  9597  }
  9598  func rewriteValueS390X_OpS390XMOVHload(v *Value) bool {
  9599  	v_1 := v.Args[1]
  9600  	v_0 := v.Args[0]
  9601  	// match: (MOVHload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9602  	// cond: isSamePtr(ptr1, ptr2)
  9603  	// result: (MOVHreg x)
  9604  	for {
  9605  		off := auxIntToInt32(v.AuxInt)
  9606  		sym := auxToSym(v.Aux)
  9607  		ptr1 := v_0
  9608  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9609  			break
  9610  		}
  9611  		x := v_1.Args[1]
  9612  		ptr2 := v_1.Args[0]
  9613  		if !(isSamePtr(ptr1, ptr2)) {
  9614  			break
  9615  		}
  9616  		v.reset(OpS390XMOVHreg)
  9617  		v.AddArg(x)
  9618  		return true
  9619  	}
  9620  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9621  	// cond: is20Bit(int64(off1)+int64(off2))
  9622  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  9623  	for {
  9624  		off1 := auxIntToInt32(v.AuxInt)
  9625  		sym := auxToSym(v.Aux)
  9626  		if v_0.Op != OpS390XADDconst {
  9627  			break
  9628  		}
  9629  		off2 := auxIntToInt32(v_0.AuxInt)
  9630  		ptr := v_0.Args[0]
  9631  		mem := v_1
  9632  		if !(is20Bit(int64(off1) + int64(off2))) {
  9633  			break
  9634  		}
  9635  		v.reset(OpS390XMOVHload)
  9636  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9637  		v.Aux = symToAux(sym)
  9638  		v.AddArg2(ptr, mem)
  9639  		return true
  9640  	}
  9641  	// match: (MOVHload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9642  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9643  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9644  	for {
  9645  		off1 := auxIntToInt32(v.AuxInt)
  9646  		sym1 := auxToSym(v.Aux)
  9647  		if v_0.Op != OpS390XMOVDaddr {
  9648  			break
  9649  		}
  9650  		t := v_0.Type
  9651  		off2 := auxIntToInt32(v_0.AuxInt)
  9652  		sym2 := auxToSym(v_0.Aux)
  9653  		base := v_0.Args[0]
  9654  		mem := v_1
  9655  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9656  			break
  9657  		}
  9658  		v.reset(OpS390XMOVHload)
  9659  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9660  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9661  		v.AddArg2(base, mem)
  9662  		return true
  9663  	}
  9664  	return false
  9665  }
  9666  func rewriteValueS390X_OpS390XMOVHreg(v *Value) bool {
  9667  	v_0 := v.Args[0]
  9668  	b := v.Block
  9669  	typ := &b.Func.Config.Types
  9670  	// match: (MOVHreg e:(MOVBreg x))
  9671  	// cond: clobberIfDead(e)
  9672  	// result: (MOVBreg x)
  9673  	for {
  9674  		e := v_0
  9675  		if e.Op != OpS390XMOVBreg {
  9676  			break
  9677  		}
  9678  		x := e.Args[0]
  9679  		if !(clobberIfDead(e)) {
  9680  			break
  9681  		}
  9682  		v.reset(OpS390XMOVBreg)
  9683  		v.AddArg(x)
  9684  		return true
  9685  	}
  9686  	// match: (MOVHreg e:(MOVHreg x))
  9687  	// cond: clobberIfDead(e)
  9688  	// result: (MOVHreg x)
  9689  	for {
  9690  		e := v_0
  9691  		if e.Op != OpS390XMOVHreg {
  9692  			break
  9693  		}
  9694  		x := e.Args[0]
  9695  		if !(clobberIfDead(e)) {
  9696  			break
  9697  		}
  9698  		v.reset(OpS390XMOVHreg)
  9699  		v.AddArg(x)
  9700  		return true
  9701  	}
  9702  	// match: (MOVHreg e:(MOVWreg x))
  9703  	// cond: clobberIfDead(e)
  9704  	// result: (MOVHreg x)
  9705  	for {
  9706  		e := v_0
  9707  		if e.Op != OpS390XMOVWreg {
  9708  			break
  9709  		}
  9710  		x := e.Args[0]
  9711  		if !(clobberIfDead(e)) {
  9712  			break
  9713  		}
  9714  		v.reset(OpS390XMOVHreg)
  9715  		v.AddArg(x)
  9716  		return true
  9717  	}
  9718  	// match: (MOVHreg e:(MOVHZreg x))
  9719  	// cond: clobberIfDead(e)
  9720  	// result: (MOVHreg x)
  9721  	for {
  9722  		e := v_0
  9723  		if e.Op != OpS390XMOVHZreg {
  9724  			break
  9725  		}
  9726  		x := e.Args[0]
  9727  		if !(clobberIfDead(e)) {
  9728  			break
  9729  		}
  9730  		v.reset(OpS390XMOVHreg)
  9731  		v.AddArg(x)
  9732  		return true
  9733  	}
  9734  	// match: (MOVHreg e:(MOVWZreg x))
  9735  	// cond: clobberIfDead(e)
  9736  	// result: (MOVHreg x)
  9737  	for {
  9738  		e := v_0
  9739  		if e.Op != OpS390XMOVWZreg {
  9740  			break
  9741  		}
  9742  		x := e.Args[0]
  9743  		if !(clobberIfDead(e)) {
  9744  			break
  9745  		}
  9746  		v.reset(OpS390XMOVHreg)
  9747  		v.AddArg(x)
  9748  		return true
  9749  	}
  9750  	// match: (MOVHreg x:(MOVBload _ _))
  9751  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9752  	// result: x
  9753  	for {
  9754  		x := v_0
  9755  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9756  			break
  9757  		}
  9758  		v.copyOf(x)
  9759  		return true
  9760  	}
  9761  	// match: (MOVHreg x:(MOVHload _ _))
  9762  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9763  	// result: x
  9764  	for {
  9765  		x := v_0
  9766  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9767  			break
  9768  		}
  9769  		v.copyOf(x)
  9770  		return true
  9771  	}
  9772  	// match: (MOVHreg x:(MOVBZload _ _))
  9773  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9774  	// result: x
  9775  	for {
  9776  		x := v_0
  9777  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9778  			break
  9779  		}
  9780  		v.copyOf(x)
  9781  		return true
  9782  	}
  9783  	// match: (MOVHreg <t> x:(MOVHZload [o] {s} p mem))
  9784  	// cond: x.Uses == 1 && clobber(x)
  9785  	// result: @x.Block (MOVHload <t> [o] {s} p mem)
  9786  	for {
  9787  		t := v.Type
  9788  		x := v_0
  9789  		if x.Op != OpS390XMOVHZload {
  9790  			break
  9791  		}
  9792  		o := auxIntToInt32(x.AuxInt)
  9793  		s := auxToSym(x.Aux)
  9794  		mem := x.Args[1]
  9795  		p := x.Args[0]
  9796  		if !(x.Uses == 1 && clobber(x)) {
  9797  			break
  9798  		}
  9799  		b = x.Block
  9800  		v0 := b.NewValue0(x.Pos, OpS390XMOVHload, t)
  9801  		v.copyOf(v0)
  9802  		v0.AuxInt = int32ToAuxInt(o)
  9803  		v0.Aux = symToAux(s)
  9804  		v0.AddArg2(p, mem)
  9805  		return true
  9806  	}
  9807  	// match: (MOVHreg x:(Arg <t>))
  9808  	// cond: t.IsSigned() && t.Size() <= 2
  9809  	// result: x
  9810  	for {
  9811  		x := v_0
  9812  		if x.Op != OpArg {
  9813  			break
  9814  		}
  9815  		t := x.Type
  9816  		if !(t.IsSigned() && t.Size() <= 2) {
  9817  			break
  9818  		}
  9819  		v.copyOf(x)
  9820  		return true
  9821  	}
  9822  	// match: (MOVHreg (MOVDconst [c]))
  9823  	// result: (MOVDconst [int64(int16(c))])
  9824  	for {
  9825  		if v_0.Op != OpS390XMOVDconst {
  9826  			break
  9827  		}
  9828  		c := auxIntToInt64(v_0.AuxInt)
  9829  		v.reset(OpS390XMOVDconst)
  9830  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
  9831  		return true
  9832  	}
  9833  	// match: (MOVHreg (ANDWconst [m] x))
  9834  	// cond: int16(m) >= 0
  9835  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9836  	for {
  9837  		if v_0.Op != OpS390XANDWconst {
  9838  			break
  9839  		}
  9840  		m := auxIntToInt32(v_0.AuxInt)
  9841  		x := v_0.Args[0]
  9842  		if !(int16(m) >= 0) {
  9843  			break
  9844  		}
  9845  		v.reset(OpS390XMOVWZreg)
  9846  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9847  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9848  		v0.AddArg(x)
  9849  		v.AddArg(v0)
  9850  		return true
  9851  	}
  9852  	return false
  9853  }
  9854  func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
  9855  	v_2 := v.Args[2]
  9856  	v_1 := v.Args[1]
  9857  	v_0 := v.Args[0]
  9858  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  9859  	// result: (MOVHstore [off] {sym} ptr x mem)
  9860  	for {
  9861  		off := auxIntToInt32(v.AuxInt)
  9862  		sym := auxToSym(v.Aux)
  9863  		ptr := v_0
  9864  		if v_1.Op != OpS390XMOVHreg {
  9865  			break
  9866  		}
  9867  		x := v_1.Args[0]
  9868  		mem := v_2
  9869  		v.reset(OpS390XMOVHstore)
  9870  		v.AuxInt = int32ToAuxInt(off)
  9871  		v.Aux = symToAux(sym)
  9872  		v.AddArg3(ptr, x, mem)
  9873  		return true
  9874  	}
  9875  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
  9876  	// result: (MOVHstore [off] {sym} ptr x mem)
  9877  	for {
  9878  		off := auxIntToInt32(v.AuxInt)
  9879  		sym := auxToSym(v.Aux)
  9880  		ptr := v_0
  9881  		if v_1.Op != OpS390XMOVHZreg {
  9882  			break
  9883  		}
  9884  		x := v_1.Args[0]
  9885  		mem := v_2
  9886  		v.reset(OpS390XMOVHstore)
  9887  		v.AuxInt = int32ToAuxInt(off)
  9888  		v.Aux = symToAux(sym)
  9889  		v.AddArg3(ptr, x, mem)
  9890  		return true
  9891  	}
  9892  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9893  	// cond: is20Bit(int64(off1)+int64(off2))
  9894  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
  9895  	for {
  9896  		off1 := auxIntToInt32(v.AuxInt)
  9897  		sym := auxToSym(v.Aux)
  9898  		if v_0.Op != OpS390XADDconst {
  9899  			break
  9900  		}
  9901  		off2 := auxIntToInt32(v_0.AuxInt)
  9902  		ptr := v_0.Args[0]
  9903  		val := v_1
  9904  		mem := v_2
  9905  		if !(is20Bit(int64(off1) + int64(off2))) {
  9906  			break
  9907  		}
  9908  		v.reset(OpS390XMOVHstore)
  9909  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9910  		v.Aux = symToAux(sym)
  9911  		v.AddArg3(ptr, val, mem)
  9912  		return true
  9913  	}
  9914  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [c]) mem)
  9915  	// cond: isU12Bit(int64(off)) && ptr.Op != OpSB
  9916  	// result: (MOVHstoreconst [makeValAndOff(int32(int16(c)),off)] {sym} ptr mem)
  9917  	for {
  9918  		off := auxIntToInt32(v.AuxInt)
  9919  		sym := auxToSym(v.Aux)
  9920  		ptr := v_0
  9921  		if v_1.Op != OpS390XMOVDconst {
  9922  			break
  9923  		}
  9924  		c := auxIntToInt64(v_1.AuxInt)
  9925  		mem := v_2
  9926  		if !(isU12Bit(int64(off)) && ptr.Op != OpSB) {
  9927  			break
  9928  		}
  9929  		v.reset(OpS390XMOVHstoreconst)
  9930  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int16(c)), off))
  9931  		v.Aux = symToAux(sym)
  9932  		v.AddArg2(ptr, mem)
  9933  		return true
  9934  	}
  9935  	// match: (MOVHstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9936  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9937  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  9938  	for {
  9939  		off1 := auxIntToInt32(v.AuxInt)
  9940  		sym1 := auxToSym(v.Aux)
  9941  		if v_0.Op != OpS390XMOVDaddr {
  9942  			break
  9943  		}
  9944  		t := v_0.Type
  9945  		off2 := auxIntToInt32(v_0.AuxInt)
  9946  		sym2 := auxToSym(v_0.Aux)
  9947  		base := v_0.Args[0]
  9948  		val := v_1
  9949  		mem := v_2
  9950  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9951  			break
  9952  		}
  9953  		v.reset(OpS390XMOVHstore)
  9954  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9955  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9956  		v.AddArg3(base, val, mem)
  9957  		return true
  9958  	}
  9959  	// match: (MOVHstore [off] {sym} ptr (Bswap16 val) mem)
  9960  	// result: (MOVHBRstore [off] {sym} ptr val mem)
  9961  	for {
  9962  		off := auxIntToInt32(v.AuxInt)
  9963  		sym := auxToSym(v.Aux)
  9964  		ptr := v_0
  9965  		if v_1.Op != OpBswap16 {
  9966  			break
  9967  		}
  9968  		val := v_1.Args[0]
  9969  		mem := v_2
  9970  		v.reset(OpS390XMOVHBRstore)
  9971  		v.AuxInt = int32ToAuxInt(off)
  9972  		v.Aux = symToAux(sym)
  9973  		v.AddArg3(ptr, val, mem)
  9974  		return true
  9975  	}
  9976  	return false
  9977  }
  9978  func rewriteValueS390X_OpS390XMOVHstoreconst(v *Value) bool {
  9979  	v_1 := v.Args[1]
  9980  	v_0 := v.Args[0]
  9981  	// match: (MOVHstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  9982  	// cond: isU12Bit(sc.Off64()+int64(off))
  9983  	// result: (MOVHstoreconst [sc.addOffset32(off)] {s} ptr mem)
  9984  	for {
  9985  		sc := auxIntToValAndOff(v.AuxInt)
  9986  		s := auxToSym(v.Aux)
  9987  		if v_0.Op != OpS390XADDconst {
  9988  			break
  9989  		}
  9990  		off := auxIntToInt32(v_0.AuxInt)
  9991  		ptr := v_0.Args[0]
  9992  		mem := v_1
  9993  		if !(isU12Bit(sc.Off64() + int64(off))) {
  9994  			break
  9995  		}
  9996  		v.reset(OpS390XMOVHstoreconst)
  9997  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9998  		v.Aux = symToAux(s)
  9999  		v.AddArg2(ptr, mem)
 10000  		return true
 10001  	}
 10002  	// match: (MOVHstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10003  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 10004  	// result: (MOVHstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 10005  	for {
 10006  		sc := auxIntToValAndOff(v.AuxInt)
 10007  		sym1 := auxToSym(v.Aux)
 10008  		if v_0.Op != OpS390XMOVDaddr {
 10009  			break
 10010  		}
 10011  		off := auxIntToInt32(v_0.AuxInt)
 10012  		sym2 := auxToSym(v_0.Aux)
 10013  		ptr := v_0.Args[0]
 10014  		mem := v_1
 10015  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 10016  			break
 10017  		}
 10018  		v.reset(OpS390XMOVHstoreconst)
 10019  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10020  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10021  		v.AddArg2(ptr, mem)
 10022  		return true
 10023  	}
 10024  	return false
 10025  }
 10026  func rewriteValueS390X_OpS390XMOVHstoreidx(v *Value) bool {
 10027  	v_3 := v.Args[3]
 10028  	v_2 := v.Args[2]
 10029  	v_1 := v.Args[1]
 10030  	v_0 := v.Args[0]
 10031  	// match: (MOVHstoreidx [off] {sym} ptr idx (Bswap16 val) mem)
 10032  	// result: (MOVHBRstoreidx [off] {sym} ptr idx val mem)
 10033  	for {
 10034  		off := auxIntToInt32(v.AuxInt)
 10035  		sym := auxToSym(v.Aux)
 10036  		ptr := v_0
 10037  		idx := v_1
 10038  		if v_2.Op != OpBswap16 {
 10039  			break
 10040  		}
 10041  		val := v_2.Args[0]
 10042  		mem := v_3
 10043  		v.reset(OpS390XMOVHBRstoreidx)
 10044  		v.AuxInt = int32ToAuxInt(off)
 10045  		v.Aux = symToAux(sym)
 10046  		v.AddArg4(ptr, idx, val, mem)
 10047  		return true
 10048  	}
 10049  	return false
 10050  }
 10051  func rewriteValueS390X_OpS390XMOVWBR(v *Value) bool {
 10052  	v_0 := v.Args[0]
 10053  	b := v.Block
 10054  	typ := &b.Func.Config.Types
 10055  	// match: (MOVWBR x:(MOVWZload [off] {sym} ptr mem))
 10056  	// cond: x.Uses == 1
 10057  	// result: @x.Block (MOVWZreg (MOVWBRload [off] {sym} ptr mem))
 10058  	for {
 10059  		x := v_0
 10060  		if x.Op != OpS390XMOVWZload {
 10061  			break
 10062  		}
 10063  		off := auxIntToInt32(x.AuxInt)
 10064  		sym := auxToSym(x.Aux)
 10065  		mem := x.Args[1]
 10066  		ptr := x.Args[0]
 10067  		if !(x.Uses == 1) {
 10068  			break
 10069  		}
 10070  		b = x.Block
 10071  		v0 := b.NewValue0(x.Pos, OpS390XMOVWZreg, typ.UInt64)
 10072  		v.copyOf(v0)
 10073  		v1 := b.NewValue0(x.Pos, OpS390XMOVWBRload, typ.UInt32)
 10074  		v1.AuxInt = int32ToAuxInt(off)
 10075  		v1.Aux = symToAux(sym)
 10076  		v1.AddArg2(ptr, mem)
 10077  		v0.AddArg(v1)
 10078  		return true
 10079  	}
 10080  	// match: (MOVWBR x:(MOVWZloadidx [off] {sym} ptr idx mem))
 10081  	// cond: x.Uses == 1
 10082  	// result: @x.Block (MOVWZreg (MOVWBRloadidx [off] {sym} ptr idx mem))
 10083  	for {
 10084  		x := v_0
 10085  		if x.Op != OpS390XMOVWZloadidx {
 10086  			break
 10087  		}
 10088  		off := auxIntToInt32(x.AuxInt)
 10089  		sym := auxToSym(x.Aux)
 10090  		mem := x.Args[2]
 10091  		ptr := x.Args[0]
 10092  		idx := x.Args[1]
 10093  		if !(x.Uses == 1) {
 10094  			break
 10095  		}
 10096  		b = x.Block
 10097  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
 10098  		v.copyOf(v0)
 10099  		v1 := b.NewValue0(v.Pos, OpS390XMOVWBRloadidx, typ.Int32)
 10100  		v1.AuxInt = int32ToAuxInt(off)
 10101  		v1.Aux = symToAux(sym)
 10102  		v1.AddArg3(ptr, idx, mem)
 10103  		v0.AddArg(v1)
 10104  		return true
 10105  	}
 10106  	return false
 10107  }
 10108  func rewriteValueS390X_OpS390XMOVWZload(v *Value) bool {
 10109  	v_1 := v.Args[1]
 10110  	v_0 := v.Args[0]
 10111  	// match: (MOVWZload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10112  	// cond: isSamePtr(ptr1, ptr2)
 10113  	// result: (MOVWZreg x)
 10114  	for {
 10115  		off := auxIntToInt32(v.AuxInt)
 10116  		sym := auxToSym(v.Aux)
 10117  		ptr1 := v_0
 10118  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10119  			break
 10120  		}
 10121  		x := v_1.Args[1]
 10122  		ptr2 := v_1.Args[0]
 10123  		if !(isSamePtr(ptr1, ptr2)) {
 10124  			break
 10125  		}
 10126  		v.reset(OpS390XMOVWZreg)
 10127  		v.AddArg(x)
 10128  		return true
 10129  	}
 10130  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] ptr) mem)
 10131  	// cond: is20Bit(int64(off1)+int64(off2))
 10132  	// result: (MOVWZload [off1+off2] {sym} ptr mem)
 10133  	for {
 10134  		off1 := auxIntToInt32(v.AuxInt)
 10135  		sym := auxToSym(v.Aux)
 10136  		if v_0.Op != OpS390XADDconst {
 10137  			break
 10138  		}
 10139  		off2 := auxIntToInt32(v_0.AuxInt)
 10140  		ptr := v_0.Args[0]
 10141  		mem := v_1
 10142  		if !(is20Bit(int64(off1) + int64(off2))) {
 10143  			break
 10144  		}
 10145  		v.reset(OpS390XMOVWZload)
 10146  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10147  		v.Aux = symToAux(sym)
 10148  		v.AddArg2(ptr, mem)
 10149  		return true
 10150  	}
 10151  	// match: (MOVWZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10152  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10153  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10154  	for {
 10155  		off1 := auxIntToInt32(v.AuxInt)
 10156  		sym1 := auxToSym(v.Aux)
 10157  		if v_0.Op != OpS390XMOVDaddr {
 10158  			break
 10159  		}
 10160  		t := v_0.Type
 10161  		off2 := auxIntToInt32(v_0.AuxInt)
 10162  		sym2 := auxToSym(v_0.Aux)
 10163  		base := v_0.Args[0]
 10164  		mem := v_1
 10165  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10166  			break
 10167  		}
 10168  		v.reset(OpS390XMOVWZload)
 10169  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10170  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10171  		v.AddArg2(base, mem)
 10172  		return true
 10173  	}
 10174  	return false
 10175  }
 10176  func rewriteValueS390X_OpS390XMOVWZreg(v *Value) bool {
 10177  	v_0 := v.Args[0]
 10178  	b := v.Block
 10179  	// match: (MOVWZreg e:(MOVBZreg x))
 10180  	// cond: clobberIfDead(e)
 10181  	// result: (MOVBZreg x)
 10182  	for {
 10183  		e := v_0
 10184  		if e.Op != OpS390XMOVBZreg {
 10185  			break
 10186  		}
 10187  		x := e.Args[0]
 10188  		if !(clobberIfDead(e)) {
 10189  			break
 10190  		}
 10191  		v.reset(OpS390XMOVBZreg)
 10192  		v.AddArg(x)
 10193  		return true
 10194  	}
 10195  	// match: (MOVWZreg e:(MOVHZreg x))
 10196  	// cond: clobberIfDead(e)
 10197  	// result: (MOVHZreg x)
 10198  	for {
 10199  		e := v_0
 10200  		if e.Op != OpS390XMOVHZreg {
 10201  			break
 10202  		}
 10203  		x := e.Args[0]
 10204  		if !(clobberIfDead(e)) {
 10205  			break
 10206  		}
 10207  		v.reset(OpS390XMOVHZreg)
 10208  		v.AddArg(x)
 10209  		return true
 10210  	}
 10211  	// match: (MOVWZreg e:(MOVWreg x))
 10212  	// cond: clobberIfDead(e)
 10213  	// result: (MOVWZreg x)
 10214  	for {
 10215  		e := v_0
 10216  		if e.Op != OpS390XMOVWreg {
 10217  			break
 10218  		}
 10219  		x := e.Args[0]
 10220  		if !(clobberIfDead(e)) {
 10221  			break
 10222  		}
 10223  		v.reset(OpS390XMOVWZreg)
 10224  		v.AddArg(x)
 10225  		return true
 10226  	}
 10227  	// match: (MOVWZreg e:(MOVWZreg x))
 10228  	// cond: clobberIfDead(e)
 10229  	// result: (MOVWZreg x)
 10230  	for {
 10231  		e := v_0
 10232  		if e.Op != OpS390XMOVWZreg {
 10233  			break
 10234  		}
 10235  		x := e.Args[0]
 10236  		if !(clobberIfDead(e)) {
 10237  			break
 10238  		}
 10239  		v.reset(OpS390XMOVWZreg)
 10240  		v.AddArg(x)
 10241  		return true
 10242  	}
 10243  	// match: (MOVWZreg x:(MOVBZload _ _))
 10244  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10245  	// result: x
 10246  	for {
 10247  		x := v_0
 10248  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10249  			break
 10250  		}
 10251  		v.copyOf(x)
 10252  		return true
 10253  	}
 10254  	// match: (MOVWZreg x:(MOVHZload _ _))
 10255  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10256  	// result: x
 10257  	for {
 10258  		x := v_0
 10259  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10260  			break
 10261  		}
 10262  		v.copyOf(x)
 10263  		return true
 10264  	}
 10265  	// match: (MOVWZreg x:(MOVWZload _ _))
 10266  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 4)
 10267  	// result: x
 10268  	for {
 10269  		x := v_0
 10270  		if x.Op != OpS390XMOVWZload || !(!x.Type.IsSigned() || x.Type.Size() > 4) {
 10271  			break
 10272  		}
 10273  		v.copyOf(x)
 10274  		return true
 10275  	}
 10276  	// match: (MOVWZreg <t> x:(MOVWload [o] {s} p mem))
 10277  	// cond: x.Uses == 1 && clobber(x)
 10278  	// result: @x.Block (MOVWZload <t> [o] {s} p mem)
 10279  	for {
 10280  		t := v.Type
 10281  		x := v_0
 10282  		if x.Op != OpS390XMOVWload {
 10283  			break
 10284  		}
 10285  		o := auxIntToInt32(x.AuxInt)
 10286  		s := auxToSym(x.Aux)
 10287  		mem := x.Args[1]
 10288  		p := x.Args[0]
 10289  		if !(x.Uses == 1 && clobber(x)) {
 10290  			break
 10291  		}
 10292  		b = x.Block
 10293  		v0 := b.NewValue0(x.Pos, OpS390XMOVWZload, t)
 10294  		v.copyOf(v0)
 10295  		v0.AuxInt = int32ToAuxInt(o)
 10296  		v0.Aux = symToAux(s)
 10297  		v0.AddArg2(p, mem)
 10298  		return true
 10299  	}
 10300  	// match: (MOVWZreg x:(Arg <t>))
 10301  	// cond: !t.IsSigned() && t.Size() <= 4
 10302  	// result: x
 10303  	for {
 10304  		x := v_0
 10305  		if x.Op != OpArg {
 10306  			break
 10307  		}
 10308  		t := x.Type
 10309  		if !(!t.IsSigned() && t.Size() <= 4) {
 10310  			break
 10311  		}
 10312  		v.copyOf(x)
 10313  		return true
 10314  	}
 10315  	// match: (MOVWZreg (MOVDconst [c]))
 10316  	// result: (MOVDconst [int64(uint32(c))])
 10317  	for {
 10318  		if v_0.Op != OpS390XMOVDconst {
 10319  			break
 10320  		}
 10321  		c := auxIntToInt64(v_0.AuxInt)
 10322  		v.reset(OpS390XMOVDconst)
 10323  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10324  		return true
 10325  	}
 10326  	// match: (MOVWZreg (RISBGZ x {r}))
 10327  	// cond: r.OutMerge(0xffffffff) != nil
 10328  	// result: (RISBGZ x {*r.OutMerge(0xffffffff)})
 10329  	for {
 10330  		if v_0.Op != OpS390XRISBGZ {
 10331  			break
 10332  		}
 10333  		r := auxToS390xRotateParams(v_0.Aux)
 10334  		x := v_0.Args[0]
 10335  		if !(r.OutMerge(0xffffffff) != nil) {
 10336  			break
 10337  		}
 10338  		v.reset(OpS390XRISBGZ)
 10339  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0xffffffff))
 10340  		v.AddArg(x)
 10341  		return true
 10342  	}
 10343  	return false
 10344  }
 10345  func rewriteValueS390X_OpS390XMOVWload(v *Value) bool {
 10346  	v_1 := v.Args[1]
 10347  	v_0 := v.Args[0]
 10348  	// match: (MOVWload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10349  	// cond: isSamePtr(ptr1, ptr2)
 10350  	// result: (MOVWreg x)
 10351  	for {
 10352  		off := auxIntToInt32(v.AuxInt)
 10353  		sym := auxToSym(v.Aux)
 10354  		ptr1 := v_0
 10355  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10356  			break
 10357  		}
 10358  		x := v_1.Args[1]
 10359  		ptr2 := v_1.Args[0]
 10360  		if !(isSamePtr(ptr1, ptr2)) {
 10361  			break
 10362  		}
 10363  		v.reset(OpS390XMOVWreg)
 10364  		v.AddArg(x)
 10365  		return true
 10366  	}
 10367  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10368  	// cond: is20Bit(int64(off1)+int64(off2))
 10369  	// result: (MOVWload [off1+off2] {sym} ptr mem)
 10370  	for {
 10371  		off1 := auxIntToInt32(v.AuxInt)
 10372  		sym := auxToSym(v.Aux)
 10373  		if v_0.Op != OpS390XADDconst {
 10374  			break
 10375  		}
 10376  		off2 := auxIntToInt32(v_0.AuxInt)
 10377  		ptr := v_0.Args[0]
 10378  		mem := v_1
 10379  		if !(is20Bit(int64(off1) + int64(off2))) {
 10380  			break
 10381  		}
 10382  		v.reset(OpS390XMOVWload)
 10383  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10384  		v.Aux = symToAux(sym)
 10385  		v.AddArg2(ptr, mem)
 10386  		return true
 10387  	}
 10388  	// match: (MOVWload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10389  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10390  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10391  	for {
 10392  		off1 := auxIntToInt32(v.AuxInt)
 10393  		sym1 := auxToSym(v.Aux)
 10394  		if v_0.Op != OpS390XMOVDaddr {
 10395  			break
 10396  		}
 10397  		t := v_0.Type
 10398  		off2 := auxIntToInt32(v_0.AuxInt)
 10399  		sym2 := auxToSym(v_0.Aux)
 10400  		base := v_0.Args[0]
 10401  		mem := v_1
 10402  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10403  			break
 10404  		}
 10405  		v.reset(OpS390XMOVWload)
 10406  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10407  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10408  		v.AddArg2(base, mem)
 10409  		return true
 10410  	}
 10411  	return false
 10412  }
 10413  func rewriteValueS390X_OpS390XMOVWreg(v *Value) bool {
 10414  	v_0 := v.Args[0]
 10415  	b := v.Block
 10416  	// match: (MOVWreg e:(MOVBreg x))
 10417  	// cond: clobberIfDead(e)
 10418  	// result: (MOVBreg x)
 10419  	for {
 10420  		e := v_0
 10421  		if e.Op != OpS390XMOVBreg {
 10422  			break
 10423  		}
 10424  		x := e.Args[0]
 10425  		if !(clobberIfDead(e)) {
 10426  			break
 10427  		}
 10428  		v.reset(OpS390XMOVBreg)
 10429  		v.AddArg(x)
 10430  		return true
 10431  	}
 10432  	// match: (MOVWreg e:(MOVHreg x))
 10433  	// cond: clobberIfDead(e)
 10434  	// result: (MOVHreg x)
 10435  	for {
 10436  		e := v_0
 10437  		if e.Op != OpS390XMOVHreg {
 10438  			break
 10439  		}
 10440  		x := e.Args[0]
 10441  		if !(clobberIfDead(e)) {
 10442  			break
 10443  		}
 10444  		v.reset(OpS390XMOVHreg)
 10445  		v.AddArg(x)
 10446  		return true
 10447  	}
 10448  	// match: (MOVWreg e:(MOVWreg x))
 10449  	// cond: clobberIfDead(e)
 10450  	// result: (MOVWreg x)
 10451  	for {
 10452  		e := v_0
 10453  		if e.Op != OpS390XMOVWreg {
 10454  			break
 10455  		}
 10456  		x := e.Args[0]
 10457  		if !(clobberIfDead(e)) {
 10458  			break
 10459  		}
 10460  		v.reset(OpS390XMOVWreg)
 10461  		v.AddArg(x)
 10462  		return true
 10463  	}
 10464  	// match: (MOVWreg e:(MOVWZreg x))
 10465  	// cond: clobberIfDead(e)
 10466  	// result: (MOVWreg x)
 10467  	for {
 10468  		e := v_0
 10469  		if e.Op != OpS390XMOVWZreg {
 10470  			break
 10471  		}
 10472  		x := e.Args[0]
 10473  		if !(clobberIfDead(e)) {
 10474  			break
 10475  		}
 10476  		v.reset(OpS390XMOVWreg)
 10477  		v.AddArg(x)
 10478  		return true
 10479  	}
 10480  	// match: (MOVWreg x:(MOVBload _ _))
 10481  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10482  	// result: x
 10483  	for {
 10484  		x := v_0
 10485  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10486  			break
 10487  		}
 10488  		v.copyOf(x)
 10489  		return true
 10490  	}
 10491  	// match: (MOVWreg x:(MOVHload _ _))
 10492  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10493  	// result: x
 10494  	for {
 10495  		x := v_0
 10496  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10497  			break
 10498  		}
 10499  		v.copyOf(x)
 10500  		return true
 10501  	}
 10502  	// match: (MOVWreg x:(MOVWload _ _))
 10503  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10504  	// result: x
 10505  	for {
 10506  		x := v_0
 10507  		if x.Op != OpS390XMOVWload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10508  			break
 10509  		}
 10510  		v.copyOf(x)
 10511  		return true
 10512  	}
 10513  	// match: (MOVWreg x:(MOVBZload _ _))
 10514  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10515  	// result: x
 10516  	for {
 10517  		x := v_0
 10518  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10519  			break
 10520  		}
 10521  		v.copyOf(x)
 10522  		return true
 10523  	}
 10524  	// match: (MOVWreg x:(MOVHZload _ _))
 10525  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10526  	// result: x
 10527  	for {
 10528  		x := v_0
 10529  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10530  			break
 10531  		}
 10532  		v.copyOf(x)
 10533  		return true
 10534  	}
 10535  	// match: (MOVWreg <t> x:(MOVWZload [o] {s} p mem))
 10536  	// cond: x.Uses == 1 && clobber(x)
 10537  	// result: @x.Block (MOVWload <t> [o] {s} p mem)
 10538  	for {
 10539  		t := v.Type
 10540  		x := v_0
 10541  		if x.Op != OpS390XMOVWZload {
 10542  			break
 10543  		}
 10544  		o := auxIntToInt32(x.AuxInt)
 10545  		s := auxToSym(x.Aux)
 10546  		mem := x.Args[1]
 10547  		p := x.Args[0]
 10548  		if !(x.Uses == 1 && clobber(x)) {
 10549  			break
 10550  		}
 10551  		b = x.Block
 10552  		v0 := b.NewValue0(x.Pos, OpS390XMOVWload, t)
 10553  		v.copyOf(v0)
 10554  		v0.AuxInt = int32ToAuxInt(o)
 10555  		v0.Aux = symToAux(s)
 10556  		v0.AddArg2(p, mem)
 10557  		return true
 10558  	}
 10559  	// match: (MOVWreg x:(Arg <t>))
 10560  	// cond: t.IsSigned() && t.Size() <= 4
 10561  	// result: x
 10562  	for {
 10563  		x := v_0
 10564  		if x.Op != OpArg {
 10565  			break
 10566  		}
 10567  		t := x.Type
 10568  		if !(t.IsSigned() && t.Size() <= 4) {
 10569  			break
 10570  		}
 10571  		v.copyOf(x)
 10572  		return true
 10573  	}
 10574  	// match: (MOVWreg (MOVDconst [c]))
 10575  	// result: (MOVDconst [int64(int32(c))])
 10576  	for {
 10577  		if v_0.Op != OpS390XMOVDconst {
 10578  			break
 10579  		}
 10580  		c := auxIntToInt64(v_0.AuxInt)
 10581  		v.reset(OpS390XMOVDconst)
 10582  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 10583  		return true
 10584  	}
 10585  	return false
 10586  }
 10587  func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
 10588  	v_2 := v.Args[2]
 10589  	v_1 := v.Args[1]
 10590  	v_0 := v.Args[0]
 10591  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 10592  	// result: (MOVWstore [off] {sym} ptr x mem)
 10593  	for {
 10594  		off := auxIntToInt32(v.AuxInt)
 10595  		sym := auxToSym(v.Aux)
 10596  		ptr := v_0
 10597  		if v_1.Op != OpS390XMOVWreg {
 10598  			break
 10599  		}
 10600  		x := v_1.Args[0]
 10601  		mem := v_2
 10602  		v.reset(OpS390XMOVWstore)
 10603  		v.AuxInt = int32ToAuxInt(off)
 10604  		v.Aux = symToAux(sym)
 10605  		v.AddArg3(ptr, x, mem)
 10606  		return true
 10607  	}
 10608  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 10609  	// result: (MOVWstore [off] {sym} ptr x mem)
 10610  	for {
 10611  		off := auxIntToInt32(v.AuxInt)
 10612  		sym := auxToSym(v.Aux)
 10613  		ptr := v_0
 10614  		if v_1.Op != OpS390XMOVWZreg {
 10615  			break
 10616  		}
 10617  		x := v_1.Args[0]
 10618  		mem := v_2
 10619  		v.reset(OpS390XMOVWstore)
 10620  		v.AuxInt = int32ToAuxInt(off)
 10621  		v.Aux = symToAux(sym)
 10622  		v.AddArg3(ptr, x, mem)
 10623  		return true
 10624  	}
 10625  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10626  	// cond: is20Bit(int64(off1)+int64(off2))
 10627  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
 10628  	for {
 10629  		off1 := auxIntToInt32(v.AuxInt)
 10630  		sym := auxToSym(v.Aux)
 10631  		if v_0.Op != OpS390XADDconst {
 10632  			break
 10633  		}
 10634  		off2 := auxIntToInt32(v_0.AuxInt)
 10635  		ptr := v_0.Args[0]
 10636  		val := v_1
 10637  		mem := v_2
 10638  		if !(is20Bit(int64(off1) + int64(off2))) {
 10639  			break
 10640  		}
 10641  		v.reset(OpS390XMOVWstore)
 10642  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10643  		v.Aux = symToAux(sym)
 10644  		v.AddArg3(ptr, val, mem)
 10645  		return true
 10646  	}
 10647  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [c]) mem)
 10648  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
 10649  	// result: (MOVWstoreconst [makeValAndOff(int32(c),off)] {sym} ptr mem)
 10650  	for {
 10651  		off := auxIntToInt32(v.AuxInt)
 10652  		sym := auxToSym(v.Aux)
 10653  		ptr := v_0
 10654  		if v_1.Op != OpS390XMOVDconst {
 10655  			break
 10656  		}
 10657  		c := auxIntToInt64(v_1.AuxInt)
 10658  		mem := v_2
 10659  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
 10660  			break
 10661  		}
 10662  		v.reset(OpS390XMOVWstoreconst)
 10663  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
 10664  		v.Aux = symToAux(sym)
 10665  		v.AddArg2(ptr, mem)
 10666  		return true
 10667  	}
 10668  	// match: (MOVWstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10669  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10670  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
 10671  	for {
 10672  		off1 := auxIntToInt32(v.AuxInt)
 10673  		sym1 := auxToSym(v.Aux)
 10674  		if v_0.Op != OpS390XMOVDaddr {
 10675  			break
 10676  		}
 10677  		t := v_0.Type
 10678  		off2 := auxIntToInt32(v_0.AuxInt)
 10679  		sym2 := auxToSym(v_0.Aux)
 10680  		base := v_0.Args[0]
 10681  		val := v_1
 10682  		mem := v_2
 10683  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10684  			break
 10685  		}
 10686  		v.reset(OpS390XMOVWstore)
 10687  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10688  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10689  		v.AddArg3(base, val, mem)
 10690  		return true
 10691  	}
 10692  	// match: (MOVWstore [i] {s} p w1 x:(MOVWstore [i-4] {s} p w0 mem))
 10693  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && setPos(v, x.Pos) && clobber(x)
 10694  	// result: (STM2 [i-4] {s} p w0 w1 mem)
 10695  	for {
 10696  		i := auxIntToInt32(v.AuxInt)
 10697  		s := auxToSym(v.Aux)
 10698  		p := v_0
 10699  		w1 := v_1
 10700  		x := v_2
 10701  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10702  			break
 10703  		}
 10704  		mem := x.Args[2]
 10705  		if p != x.Args[0] {
 10706  			break
 10707  		}
 10708  		w0 := x.Args[1]
 10709  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && setPos(v, x.Pos) && clobber(x)) {
 10710  			break
 10711  		}
 10712  		v.reset(OpS390XSTM2)
 10713  		v.AuxInt = int32ToAuxInt(i - 4)
 10714  		v.Aux = symToAux(s)
 10715  		v.AddArg4(p, w0, w1, mem)
 10716  		return true
 10717  	}
 10718  	// match: (MOVWstore [i] {s} p w2 x:(STM2 [i-8] {s} p w0 w1 mem))
 10719  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)
 10720  	// result: (STM3 [i-8] {s} p w0 w1 w2 mem)
 10721  	for {
 10722  		i := auxIntToInt32(v.AuxInt)
 10723  		s := auxToSym(v.Aux)
 10724  		p := v_0
 10725  		w2 := v_1
 10726  		x := v_2
 10727  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 10728  			break
 10729  		}
 10730  		mem := x.Args[3]
 10731  		if p != x.Args[0] {
 10732  			break
 10733  		}
 10734  		w0 := x.Args[1]
 10735  		w1 := x.Args[2]
 10736  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)) {
 10737  			break
 10738  		}
 10739  		v.reset(OpS390XSTM3)
 10740  		v.AuxInt = int32ToAuxInt(i - 8)
 10741  		v.Aux = symToAux(s)
 10742  		v.AddArg5(p, w0, w1, w2, mem)
 10743  		return true
 10744  	}
 10745  	// match: (MOVWstore [i] {s} p w3 x:(STM3 [i-12] {s} p w0 w1 w2 mem))
 10746  	// cond: x.Uses == 1 && is20Bit(int64(i)-12) && setPos(v, x.Pos) && clobber(x)
 10747  	// result: (STM4 [i-12] {s} p w0 w1 w2 w3 mem)
 10748  	for {
 10749  		i := auxIntToInt32(v.AuxInt)
 10750  		s := auxToSym(v.Aux)
 10751  		p := v_0
 10752  		w3 := v_1
 10753  		x := v_2
 10754  		if x.Op != OpS390XSTM3 || auxIntToInt32(x.AuxInt) != i-12 || auxToSym(x.Aux) != s {
 10755  			break
 10756  		}
 10757  		mem := x.Args[4]
 10758  		if p != x.Args[0] {
 10759  			break
 10760  		}
 10761  		w0 := x.Args[1]
 10762  		w1 := x.Args[2]
 10763  		w2 := x.Args[3]
 10764  		if !(x.Uses == 1 && is20Bit(int64(i)-12) && setPos(v, x.Pos) && clobber(x)) {
 10765  			break
 10766  		}
 10767  		v.reset(OpS390XSTM4)
 10768  		v.AuxInt = int32ToAuxInt(i - 12)
 10769  		v.Aux = symToAux(s)
 10770  		v.AddArg6(p, w0, w1, w2, w3, mem)
 10771  		return true
 10772  	}
 10773  	// match: (MOVWstore [off] {sym} ptr r:(MOVWBR x) mem)
 10774  	// cond: r.Uses == 1
 10775  	// result: (MOVWBRstore [off] {sym} ptr x mem)
 10776  	for {
 10777  		off := auxIntToInt32(v.AuxInt)
 10778  		sym := auxToSym(v.Aux)
 10779  		ptr := v_0
 10780  		r := v_1
 10781  		if r.Op != OpS390XMOVWBR {
 10782  			break
 10783  		}
 10784  		x := r.Args[0]
 10785  		mem := v_2
 10786  		if !(r.Uses == 1) {
 10787  			break
 10788  		}
 10789  		v.reset(OpS390XMOVWBRstore)
 10790  		v.AuxInt = int32ToAuxInt(off)
 10791  		v.Aux = symToAux(sym)
 10792  		v.AddArg3(ptr, x, mem)
 10793  		return true
 10794  	}
 10795  	return false
 10796  }
 10797  func rewriteValueS390X_OpS390XMOVWstoreconst(v *Value) bool {
 10798  	v_1 := v.Args[1]
 10799  	v_0 := v.Args[0]
 10800  	// match: (MOVWstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10801  	// cond: isU12Bit(sc.Off64()+int64(off))
 10802  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
 10803  	for {
 10804  		sc := auxIntToValAndOff(v.AuxInt)
 10805  		s := auxToSym(v.Aux)
 10806  		if v_0.Op != OpS390XADDconst {
 10807  			break
 10808  		}
 10809  		off := auxIntToInt32(v_0.AuxInt)
 10810  		ptr := v_0.Args[0]
 10811  		mem := v_1
 10812  		if !(isU12Bit(sc.Off64() + int64(off))) {
 10813  			break
 10814  		}
 10815  		v.reset(OpS390XMOVWstoreconst)
 10816  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10817  		v.Aux = symToAux(s)
 10818  		v.AddArg2(ptr, mem)
 10819  		return true
 10820  	}
 10821  	// match: (MOVWstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10822  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 10823  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 10824  	for {
 10825  		sc := auxIntToValAndOff(v.AuxInt)
 10826  		sym1 := auxToSym(v.Aux)
 10827  		if v_0.Op != OpS390XMOVDaddr {
 10828  			break
 10829  		}
 10830  		off := auxIntToInt32(v_0.AuxInt)
 10831  		sym2 := auxToSym(v_0.Aux)
 10832  		ptr := v_0.Args[0]
 10833  		mem := v_1
 10834  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 10835  			break
 10836  		}
 10837  		v.reset(OpS390XMOVWstoreconst)
 10838  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10839  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10840  		v.AddArg2(ptr, mem)
 10841  		return true
 10842  	}
 10843  	return false
 10844  }
 10845  func rewriteValueS390X_OpS390XMOVWstoreidx(v *Value) bool {
 10846  	v_3 := v.Args[3]
 10847  	v_2 := v.Args[2]
 10848  	v_1 := v.Args[1]
 10849  	v_0 := v.Args[0]
 10850  	// match: (MOVWstoreidx [off] {sym} ptr idx r:(MOVWBR x) mem)
 10851  	// cond: r.Uses == 1
 10852  	// result: (MOVWBRstoreidx [off] {sym} ptr idx x mem)
 10853  	for {
 10854  		off := auxIntToInt32(v.AuxInt)
 10855  		sym := auxToSym(v.Aux)
 10856  		ptr := v_0
 10857  		idx := v_1
 10858  		r := v_2
 10859  		if r.Op != OpS390XMOVWBR {
 10860  			break
 10861  		}
 10862  		x := r.Args[0]
 10863  		mem := v_3
 10864  		if !(r.Uses == 1) {
 10865  			break
 10866  		}
 10867  		v.reset(OpS390XMOVWBRstoreidx)
 10868  		v.AuxInt = int32ToAuxInt(off)
 10869  		v.Aux = symToAux(sym)
 10870  		v.AddArg4(ptr, idx, x, mem)
 10871  		return true
 10872  	}
 10873  	return false
 10874  }
 10875  func rewriteValueS390X_OpS390XMULLD(v *Value) bool {
 10876  	v_1 := v.Args[1]
 10877  	v_0 := v.Args[0]
 10878  	// match: (MULLD x (MOVDconst [c]))
 10879  	// cond: is32Bit(c)
 10880  	// result: (MULLDconst [int32(c)] x)
 10881  	for {
 10882  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10883  			x := v_0
 10884  			if v_1.Op != OpS390XMOVDconst {
 10885  				continue
 10886  			}
 10887  			c := auxIntToInt64(v_1.AuxInt)
 10888  			if !(is32Bit(c)) {
 10889  				continue
 10890  			}
 10891  			v.reset(OpS390XMULLDconst)
 10892  			v.AuxInt = int32ToAuxInt(int32(c))
 10893  			v.AddArg(x)
 10894  			return true
 10895  		}
 10896  		break
 10897  	}
 10898  	// match: (MULLD <t> x g:(MOVDload [off] {sym} ptr mem))
 10899  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 10900  	// result: (MULLDload <t> [off] {sym} x ptr mem)
 10901  	for {
 10902  		t := v.Type
 10903  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10904  			x := v_0
 10905  			g := v_1
 10906  			if g.Op != OpS390XMOVDload {
 10907  				continue
 10908  			}
 10909  			off := auxIntToInt32(g.AuxInt)
 10910  			sym := auxToSym(g.Aux)
 10911  			mem := g.Args[1]
 10912  			ptr := g.Args[0]
 10913  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 10914  				continue
 10915  			}
 10916  			v.reset(OpS390XMULLDload)
 10917  			v.Type = t
 10918  			v.AuxInt = int32ToAuxInt(off)
 10919  			v.Aux = symToAux(sym)
 10920  			v.AddArg3(x, ptr, mem)
 10921  			return true
 10922  		}
 10923  		break
 10924  	}
 10925  	return false
 10926  }
 10927  func rewriteValueS390X_OpS390XMULLDconst(v *Value) bool {
 10928  	v_0 := v.Args[0]
 10929  	b := v.Block
 10930  	// match: (MULLDconst <t> x [c])
 10931  	// cond: isPowerOfTwo(c&(c-1))
 10932  	// result: (ADD (SLDconst <t> x [uint8(log32(c&(c-1)))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 10933  	for {
 10934  		t := v.Type
 10935  		c := auxIntToInt32(v.AuxInt)
 10936  		x := v_0
 10937  		if !(isPowerOfTwo(c & (c - 1))) {
 10938  			break
 10939  		}
 10940  		v.reset(OpS390XADD)
 10941  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10942  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 10943  		v0.AddArg(x)
 10944  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10945  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 10946  		v1.AddArg(x)
 10947  		v.AddArg2(v0, v1)
 10948  		return true
 10949  	}
 10950  	// match: (MULLDconst <t> x [c])
 10951  	// cond: isPowerOfTwo(c+(c&^(c-1)))
 10952  	// result: (SUB (SLDconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 10953  	for {
 10954  		t := v.Type
 10955  		c := auxIntToInt32(v.AuxInt)
 10956  		x := v_0
 10957  		if !(isPowerOfTwo(c + (c &^ (c - 1)))) {
 10958  			break
 10959  		}
 10960  		v.reset(OpS390XSUB)
 10961  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10962  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 10963  		v0.AddArg(x)
 10964  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10965  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 10966  		v1.AddArg(x)
 10967  		v.AddArg2(v0, v1)
 10968  		return true
 10969  	}
 10970  	// match: (MULLDconst <t> x [c])
 10971  	// cond: isPowerOfTwo(-c+(-c&^(-c-1)))
 10972  	// result: (SUB (SLDconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLDconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 10973  	for {
 10974  		t := v.Type
 10975  		c := auxIntToInt32(v.AuxInt)
 10976  		x := v_0
 10977  		if !(isPowerOfTwo(-c + (-c &^ (-c - 1)))) {
 10978  			break
 10979  		}
 10980  		v.reset(OpS390XSUB)
 10981  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10982  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 10983  		v0.AddArg(x)
 10984  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10985  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 10986  		v1.AddArg(x)
 10987  		v.AddArg2(v0, v1)
 10988  		return true
 10989  	}
 10990  	// match: (MULLDconst [c] (MOVDconst [d]))
 10991  	// result: (MOVDconst [int64(c)*d])
 10992  	for {
 10993  		c := auxIntToInt32(v.AuxInt)
 10994  		if v_0.Op != OpS390XMOVDconst {
 10995  			break
 10996  		}
 10997  		d := auxIntToInt64(v_0.AuxInt)
 10998  		v.reset(OpS390XMOVDconst)
 10999  		v.AuxInt = int64ToAuxInt(int64(c) * d)
 11000  		return true
 11001  	}
 11002  	return false
 11003  }
 11004  func rewriteValueS390X_OpS390XMULLDload(v *Value) bool {
 11005  	v_2 := v.Args[2]
 11006  	v_1 := v.Args[1]
 11007  	v_0 := v.Args[0]
 11008  	b := v.Block
 11009  	// match: (MULLDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11010  	// cond: isSamePtr(ptr1, ptr2)
 11011  	// result: (MULLD x (LGDR <t> y))
 11012  	for {
 11013  		t := v.Type
 11014  		off := auxIntToInt32(v.AuxInt)
 11015  		sym := auxToSym(v.Aux)
 11016  		x := v_0
 11017  		ptr1 := v_1
 11018  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 11019  			break
 11020  		}
 11021  		y := v_2.Args[1]
 11022  		ptr2 := v_2.Args[0]
 11023  		if !(isSamePtr(ptr1, ptr2)) {
 11024  			break
 11025  		}
 11026  		v.reset(OpS390XMULLD)
 11027  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 11028  		v0.AddArg(y)
 11029  		v.AddArg2(x, v0)
 11030  		return true
 11031  	}
 11032  	// match: (MULLDload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11033  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11034  	// result: (MULLDload [off1+off2] {sym} x ptr mem)
 11035  	for {
 11036  		off1 := auxIntToInt32(v.AuxInt)
 11037  		sym := auxToSym(v.Aux)
 11038  		x := v_0
 11039  		if v_1.Op != OpS390XADDconst {
 11040  			break
 11041  		}
 11042  		off2 := auxIntToInt32(v_1.AuxInt)
 11043  		ptr := v_1.Args[0]
 11044  		mem := v_2
 11045  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11046  			break
 11047  		}
 11048  		v.reset(OpS390XMULLDload)
 11049  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11050  		v.Aux = symToAux(sym)
 11051  		v.AddArg3(x, ptr, mem)
 11052  		return true
 11053  	}
 11054  	// match: (MULLDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11055  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11056  	// result: (MULLDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11057  	for {
 11058  		o1 := auxIntToInt32(v.AuxInt)
 11059  		s1 := auxToSym(v.Aux)
 11060  		x := v_0
 11061  		if v_1.Op != OpS390XMOVDaddr {
 11062  			break
 11063  		}
 11064  		o2 := auxIntToInt32(v_1.AuxInt)
 11065  		s2 := auxToSym(v_1.Aux)
 11066  		ptr := v_1.Args[0]
 11067  		mem := v_2
 11068  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11069  			break
 11070  		}
 11071  		v.reset(OpS390XMULLDload)
 11072  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11073  		v.Aux = symToAux(mergeSym(s1, s2))
 11074  		v.AddArg3(x, ptr, mem)
 11075  		return true
 11076  	}
 11077  	return false
 11078  }
 11079  func rewriteValueS390X_OpS390XMULLW(v *Value) bool {
 11080  	v_1 := v.Args[1]
 11081  	v_0 := v.Args[0]
 11082  	// match: (MULLW x (MOVDconst [c]))
 11083  	// result: (MULLWconst [int32(c)] x)
 11084  	for {
 11085  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11086  			x := v_0
 11087  			if v_1.Op != OpS390XMOVDconst {
 11088  				continue
 11089  			}
 11090  			c := auxIntToInt64(v_1.AuxInt)
 11091  			v.reset(OpS390XMULLWconst)
 11092  			v.AuxInt = int32ToAuxInt(int32(c))
 11093  			v.AddArg(x)
 11094  			return true
 11095  		}
 11096  		break
 11097  	}
 11098  	// match: (MULLW <t> x g:(MOVWload [off] {sym} ptr mem))
 11099  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11100  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11101  	for {
 11102  		t := v.Type
 11103  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11104  			x := v_0
 11105  			g := v_1
 11106  			if g.Op != OpS390XMOVWload {
 11107  				continue
 11108  			}
 11109  			off := auxIntToInt32(g.AuxInt)
 11110  			sym := auxToSym(g.Aux)
 11111  			mem := g.Args[1]
 11112  			ptr := g.Args[0]
 11113  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11114  				continue
 11115  			}
 11116  			v.reset(OpS390XMULLWload)
 11117  			v.Type = t
 11118  			v.AuxInt = int32ToAuxInt(off)
 11119  			v.Aux = symToAux(sym)
 11120  			v.AddArg3(x, ptr, mem)
 11121  			return true
 11122  		}
 11123  		break
 11124  	}
 11125  	// match: (MULLW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11126  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11127  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11128  	for {
 11129  		t := v.Type
 11130  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11131  			x := v_0
 11132  			g := v_1
 11133  			if g.Op != OpS390XMOVWZload {
 11134  				continue
 11135  			}
 11136  			off := auxIntToInt32(g.AuxInt)
 11137  			sym := auxToSym(g.Aux)
 11138  			mem := g.Args[1]
 11139  			ptr := g.Args[0]
 11140  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11141  				continue
 11142  			}
 11143  			v.reset(OpS390XMULLWload)
 11144  			v.Type = t
 11145  			v.AuxInt = int32ToAuxInt(off)
 11146  			v.Aux = symToAux(sym)
 11147  			v.AddArg3(x, ptr, mem)
 11148  			return true
 11149  		}
 11150  		break
 11151  	}
 11152  	return false
 11153  }
 11154  func rewriteValueS390X_OpS390XMULLWconst(v *Value) bool {
 11155  	v_0 := v.Args[0]
 11156  	b := v.Block
 11157  	// match: (MULLWconst <t> x [c])
 11158  	// cond: isPowerOfTwo(c&(c-1))
 11159  	// result: (ADDW (SLWconst <t> x [uint8(log32(c&(c-1)))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11160  	for {
 11161  		t := v.Type
 11162  		c := auxIntToInt32(v.AuxInt)
 11163  		x := v_0
 11164  		if !(isPowerOfTwo(c & (c - 1))) {
 11165  			break
 11166  		}
 11167  		v.reset(OpS390XADDW)
 11168  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11169  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 11170  		v0.AddArg(x)
 11171  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11172  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11173  		v1.AddArg(x)
 11174  		v.AddArg2(v0, v1)
 11175  		return true
 11176  	}
 11177  	// match: (MULLWconst <t> x [c])
 11178  	// cond: isPowerOfTwo(c+(c&^(c-1)))
 11179  	// result: (SUBW (SLWconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11180  	for {
 11181  		t := v.Type
 11182  		c := auxIntToInt32(v.AuxInt)
 11183  		x := v_0
 11184  		if !(isPowerOfTwo(c + (c &^ (c - 1)))) {
 11185  			break
 11186  		}
 11187  		v.reset(OpS390XSUBW)
 11188  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11189  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11190  		v0.AddArg(x)
 11191  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11192  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11193  		v1.AddArg(x)
 11194  		v.AddArg2(v0, v1)
 11195  		return true
 11196  	}
 11197  	// match: (MULLWconst <t> x [c])
 11198  	// cond: isPowerOfTwo(-c+(-c&^(-c-1)))
 11199  	// result: (SUBW (SLWconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLWconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11200  	for {
 11201  		t := v.Type
 11202  		c := auxIntToInt32(v.AuxInt)
 11203  		x := v_0
 11204  		if !(isPowerOfTwo(-c + (-c &^ (-c - 1)))) {
 11205  			break
 11206  		}
 11207  		v.reset(OpS390XSUBW)
 11208  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11209  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11210  		v0.AddArg(x)
 11211  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11212  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11213  		v1.AddArg(x)
 11214  		v.AddArg2(v0, v1)
 11215  		return true
 11216  	}
 11217  	// match: (MULLWconst [c] (MOVDconst [d]))
 11218  	// result: (MOVDconst [int64(c*int32(d))])
 11219  	for {
 11220  		c := auxIntToInt32(v.AuxInt)
 11221  		if v_0.Op != OpS390XMOVDconst {
 11222  			break
 11223  		}
 11224  		d := auxIntToInt64(v_0.AuxInt)
 11225  		v.reset(OpS390XMOVDconst)
 11226  		v.AuxInt = int64ToAuxInt(int64(c * int32(d)))
 11227  		return true
 11228  	}
 11229  	return false
 11230  }
 11231  func rewriteValueS390X_OpS390XMULLWload(v *Value) bool {
 11232  	v_2 := v.Args[2]
 11233  	v_1 := v.Args[1]
 11234  	v_0 := v.Args[0]
 11235  	// match: (MULLWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11236  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11237  	// result: (MULLWload [off1+off2] {sym} x ptr mem)
 11238  	for {
 11239  		off1 := auxIntToInt32(v.AuxInt)
 11240  		sym := auxToSym(v.Aux)
 11241  		x := v_0
 11242  		if v_1.Op != OpS390XADDconst {
 11243  			break
 11244  		}
 11245  		off2 := auxIntToInt32(v_1.AuxInt)
 11246  		ptr := v_1.Args[0]
 11247  		mem := v_2
 11248  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11249  			break
 11250  		}
 11251  		v.reset(OpS390XMULLWload)
 11252  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11253  		v.Aux = symToAux(sym)
 11254  		v.AddArg3(x, ptr, mem)
 11255  		return true
 11256  	}
 11257  	// match: (MULLWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11258  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11259  	// result: (MULLWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11260  	for {
 11261  		o1 := auxIntToInt32(v.AuxInt)
 11262  		s1 := auxToSym(v.Aux)
 11263  		x := v_0
 11264  		if v_1.Op != OpS390XMOVDaddr {
 11265  			break
 11266  		}
 11267  		o2 := auxIntToInt32(v_1.AuxInt)
 11268  		s2 := auxToSym(v_1.Aux)
 11269  		ptr := v_1.Args[0]
 11270  		mem := v_2
 11271  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11272  			break
 11273  		}
 11274  		v.reset(OpS390XMULLWload)
 11275  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11276  		v.Aux = symToAux(mergeSym(s1, s2))
 11277  		v.AddArg3(x, ptr, mem)
 11278  		return true
 11279  	}
 11280  	return false
 11281  }
 11282  func rewriteValueS390X_OpS390XNEG(v *Value) bool {
 11283  	v_0 := v.Args[0]
 11284  	// match: (NEG (MOVDconst [c]))
 11285  	// result: (MOVDconst [-c])
 11286  	for {
 11287  		if v_0.Op != OpS390XMOVDconst {
 11288  			break
 11289  		}
 11290  		c := auxIntToInt64(v_0.AuxInt)
 11291  		v.reset(OpS390XMOVDconst)
 11292  		v.AuxInt = int64ToAuxInt(-c)
 11293  		return true
 11294  	}
 11295  	// match: (NEG (ADDconst [c] (NEG x)))
 11296  	// cond: c != -(1<<31)
 11297  	// result: (ADDconst [-c] x)
 11298  	for {
 11299  		if v_0.Op != OpS390XADDconst {
 11300  			break
 11301  		}
 11302  		c := auxIntToInt32(v_0.AuxInt)
 11303  		v_0_0 := v_0.Args[0]
 11304  		if v_0_0.Op != OpS390XNEG {
 11305  			break
 11306  		}
 11307  		x := v_0_0.Args[0]
 11308  		if !(c != -(1 << 31)) {
 11309  			break
 11310  		}
 11311  		v.reset(OpS390XADDconst)
 11312  		v.AuxInt = int32ToAuxInt(-c)
 11313  		v.AddArg(x)
 11314  		return true
 11315  	}
 11316  	return false
 11317  }
 11318  func rewriteValueS390X_OpS390XNEGW(v *Value) bool {
 11319  	v_0 := v.Args[0]
 11320  	// match: (NEGW (MOVDconst [c]))
 11321  	// result: (MOVDconst [int64(int32(-c))])
 11322  	for {
 11323  		if v_0.Op != OpS390XMOVDconst {
 11324  			break
 11325  		}
 11326  		c := auxIntToInt64(v_0.AuxInt)
 11327  		v.reset(OpS390XMOVDconst)
 11328  		v.AuxInt = int64ToAuxInt(int64(int32(-c)))
 11329  		return true
 11330  	}
 11331  	return false
 11332  }
 11333  func rewriteValueS390X_OpS390XNOT(v *Value) bool {
 11334  	v_0 := v.Args[0]
 11335  	b := v.Block
 11336  	typ := &b.Func.Config.Types
 11337  	// match: (NOT x)
 11338  	// result: (XOR (MOVDconst [-1]) x)
 11339  	for {
 11340  		x := v_0
 11341  		v.reset(OpS390XXOR)
 11342  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 11343  		v0.AuxInt = int64ToAuxInt(-1)
 11344  		v.AddArg2(v0, x)
 11345  		return true
 11346  	}
 11347  }
 11348  func rewriteValueS390X_OpS390XNOTW(v *Value) bool {
 11349  	v_0 := v.Args[0]
 11350  	// match: (NOTW x)
 11351  	// result: (XORWconst [-1] x)
 11352  	for {
 11353  		x := v_0
 11354  		v.reset(OpS390XXORWconst)
 11355  		v.AuxInt = int32ToAuxInt(-1)
 11356  		v.AddArg(x)
 11357  		return true
 11358  	}
 11359  }
 11360  func rewriteValueS390X_OpS390XOR(v *Value) bool {
 11361  	v_1 := v.Args[1]
 11362  	v_0 := v.Args[0]
 11363  	b := v.Block
 11364  	// match: (OR x (MOVDconst [c]))
 11365  	// cond: isU32Bit(c)
 11366  	// result: (ORconst [c] x)
 11367  	for {
 11368  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11369  			x := v_0
 11370  			if v_1.Op != OpS390XMOVDconst {
 11371  				continue
 11372  			}
 11373  			c := auxIntToInt64(v_1.AuxInt)
 11374  			if !(isU32Bit(c)) {
 11375  				continue
 11376  			}
 11377  			v.reset(OpS390XORconst)
 11378  			v.AuxInt = int64ToAuxInt(c)
 11379  			v.AddArg(x)
 11380  			return true
 11381  		}
 11382  		break
 11383  	}
 11384  	// match: (OR (MOVDconst [-1<<63]) (LGDR <t> x))
 11385  	// result: (LGDR <t> (LNDFR <x.Type> x))
 11386  	for {
 11387  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11388  			if v_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0.AuxInt) != -1<<63 || v_1.Op != OpS390XLGDR {
 11389  				continue
 11390  			}
 11391  			t := v_1.Type
 11392  			x := v_1.Args[0]
 11393  			v.reset(OpS390XLGDR)
 11394  			v.Type = t
 11395  			v0 := b.NewValue0(v.Pos, OpS390XLNDFR, x.Type)
 11396  			v0.AddArg(x)
 11397  			v.AddArg(v0)
 11398  			return true
 11399  		}
 11400  		break
 11401  	}
 11402  	// match: (OR (RISBGZ (LGDR x) {r}) (LGDR (LPDFR <t> y)))
 11403  	// cond: r == s390x.NewRotateParams(0, 0, 0)
 11404  	// result: (LGDR (CPSDR <t> y x))
 11405  	for {
 11406  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11407  			if v_0.Op != OpS390XRISBGZ {
 11408  				continue
 11409  			}
 11410  			r := auxToS390xRotateParams(v_0.Aux)
 11411  			v_0_0 := v_0.Args[0]
 11412  			if v_0_0.Op != OpS390XLGDR {
 11413  				continue
 11414  			}
 11415  			x := v_0_0.Args[0]
 11416  			if v_1.Op != OpS390XLGDR {
 11417  				continue
 11418  			}
 11419  			v_1_0 := v_1.Args[0]
 11420  			if v_1_0.Op != OpS390XLPDFR {
 11421  				continue
 11422  			}
 11423  			t := v_1_0.Type
 11424  			y := v_1_0.Args[0]
 11425  			if !(r == s390x.NewRotateParams(0, 0, 0)) {
 11426  				continue
 11427  			}
 11428  			v.reset(OpS390XLGDR)
 11429  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, t)
 11430  			v0.AddArg2(y, x)
 11431  			v.AddArg(v0)
 11432  			return true
 11433  		}
 11434  		break
 11435  	}
 11436  	// match: (OR (RISBGZ (LGDR x) {r}) (MOVDconst [c]))
 11437  	// cond: c >= 0 && r == s390x.NewRotateParams(0, 0, 0)
 11438  	// result: (LGDR (CPSDR <x.Type> (FMOVDconst <x.Type> [math.Float64frombits(uint64(c))]) x))
 11439  	for {
 11440  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11441  			if v_0.Op != OpS390XRISBGZ {
 11442  				continue
 11443  			}
 11444  			r := auxToS390xRotateParams(v_0.Aux)
 11445  			v_0_0 := v_0.Args[0]
 11446  			if v_0_0.Op != OpS390XLGDR {
 11447  				continue
 11448  			}
 11449  			x := v_0_0.Args[0]
 11450  			if v_1.Op != OpS390XMOVDconst {
 11451  				continue
 11452  			}
 11453  			c := auxIntToInt64(v_1.AuxInt)
 11454  			if !(c >= 0 && r == s390x.NewRotateParams(0, 0, 0)) {
 11455  				continue
 11456  			}
 11457  			v.reset(OpS390XLGDR)
 11458  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, x.Type)
 11459  			v1 := b.NewValue0(v.Pos, OpS390XFMOVDconst, x.Type)
 11460  			v1.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(c)))
 11461  			v0.AddArg2(v1, x)
 11462  			v.AddArg(v0)
 11463  			return true
 11464  		}
 11465  		break
 11466  	}
 11467  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11468  	// result: (MOVDconst [c|d])
 11469  	for {
 11470  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11471  			if v_0.Op != OpS390XMOVDconst {
 11472  				continue
 11473  			}
 11474  			c := auxIntToInt64(v_0.AuxInt)
 11475  			if v_1.Op != OpS390XMOVDconst {
 11476  				continue
 11477  			}
 11478  			d := auxIntToInt64(v_1.AuxInt)
 11479  			v.reset(OpS390XMOVDconst)
 11480  			v.AuxInt = int64ToAuxInt(c | d)
 11481  			return true
 11482  		}
 11483  		break
 11484  	}
 11485  	// match: (OR x x)
 11486  	// result: x
 11487  	for {
 11488  		x := v_0
 11489  		if x != v_1 {
 11490  			break
 11491  		}
 11492  		v.copyOf(x)
 11493  		return true
 11494  	}
 11495  	// match: (OR <t> x g:(MOVDload [off] {sym} ptr mem))
 11496  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11497  	// result: (ORload <t> [off] {sym} x ptr mem)
 11498  	for {
 11499  		t := v.Type
 11500  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11501  			x := v_0
 11502  			g := v_1
 11503  			if g.Op != OpS390XMOVDload {
 11504  				continue
 11505  			}
 11506  			off := auxIntToInt32(g.AuxInt)
 11507  			sym := auxToSym(g.Aux)
 11508  			mem := g.Args[1]
 11509  			ptr := g.Args[0]
 11510  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11511  				continue
 11512  			}
 11513  			v.reset(OpS390XORload)
 11514  			v.Type = t
 11515  			v.AuxInt = int32ToAuxInt(off)
 11516  			v.Aux = symToAux(sym)
 11517  			v.AddArg3(x, ptr, mem)
 11518  			return true
 11519  		}
 11520  		break
 11521  	}
 11522  	return false
 11523  }
 11524  func rewriteValueS390X_OpS390XORW(v *Value) bool {
 11525  	v_1 := v.Args[1]
 11526  	v_0 := v.Args[0]
 11527  	// match: (ORW x (MOVDconst [c]))
 11528  	// result: (ORWconst [int32(c)] x)
 11529  	for {
 11530  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11531  			x := v_0
 11532  			if v_1.Op != OpS390XMOVDconst {
 11533  				continue
 11534  			}
 11535  			c := auxIntToInt64(v_1.AuxInt)
 11536  			v.reset(OpS390XORWconst)
 11537  			v.AuxInt = int32ToAuxInt(int32(c))
 11538  			v.AddArg(x)
 11539  			return true
 11540  		}
 11541  		break
 11542  	}
 11543  	// match: (ORW x x)
 11544  	// result: x
 11545  	for {
 11546  		x := v_0
 11547  		if x != v_1 {
 11548  			break
 11549  		}
 11550  		v.copyOf(x)
 11551  		return true
 11552  	}
 11553  	// match: (ORW <t> x g:(MOVWload [off] {sym} ptr mem))
 11554  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11555  	// result: (ORWload <t> [off] {sym} x ptr mem)
 11556  	for {
 11557  		t := v.Type
 11558  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11559  			x := v_0
 11560  			g := v_1
 11561  			if g.Op != OpS390XMOVWload {
 11562  				continue
 11563  			}
 11564  			off := auxIntToInt32(g.AuxInt)
 11565  			sym := auxToSym(g.Aux)
 11566  			mem := g.Args[1]
 11567  			ptr := g.Args[0]
 11568  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11569  				continue
 11570  			}
 11571  			v.reset(OpS390XORWload)
 11572  			v.Type = t
 11573  			v.AuxInt = int32ToAuxInt(off)
 11574  			v.Aux = symToAux(sym)
 11575  			v.AddArg3(x, ptr, mem)
 11576  			return true
 11577  		}
 11578  		break
 11579  	}
 11580  	// match: (ORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11581  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11582  	// result: (ORWload <t> [off] {sym} x ptr mem)
 11583  	for {
 11584  		t := v.Type
 11585  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11586  			x := v_0
 11587  			g := v_1
 11588  			if g.Op != OpS390XMOVWZload {
 11589  				continue
 11590  			}
 11591  			off := auxIntToInt32(g.AuxInt)
 11592  			sym := auxToSym(g.Aux)
 11593  			mem := g.Args[1]
 11594  			ptr := g.Args[0]
 11595  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11596  				continue
 11597  			}
 11598  			v.reset(OpS390XORWload)
 11599  			v.Type = t
 11600  			v.AuxInt = int32ToAuxInt(off)
 11601  			v.Aux = symToAux(sym)
 11602  			v.AddArg3(x, ptr, mem)
 11603  			return true
 11604  		}
 11605  		break
 11606  	}
 11607  	return false
 11608  }
 11609  func rewriteValueS390X_OpS390XORWconst(v *Value) bool {
 11610  	v_0 := v.Args[0]
 11611  	// match: (ORWconst [c] x)
 11612  	// cond: int32(c)==0
 11613  	// result: x
 11614  	for {
 11615  		c := auxIntToInt32(v.AuxInt)
 11616  		x := v_0
 11617  		if !(int32(c) == 0) {
 11618  			break
 11619  		}
 11620  		v.copyOf(x)
 11621  		return true
 11622  	}
 11623  	// match: (ORWconst [c] _)
 11624  	// cond: int32(c)==-1
 11625  	// result: (MOVDconst [-1])
 11626  	for {
 11627  		c := auxIntToInt32(v.AuxInt)
 11628  		if !(int32(c) == -1) {
 11629  			break
 11630  		}
 11631  		v.reset(OpS390XMOVDconst)
 11632  		v.AuxInt = int64ToAuxInt(-1)
 11633  		return true
 11634  	}
 11635  	// match: (ORWconst [c] (MOVDconst [d]))
 11636  	// result: (MOVDconst [int64(c)|d])
 11637  	for {
 11638  		c := auxIntToInt32(v.AuxInt)
 11639  		if v_0.Op != OpS390XMOVDconst {
 11640  			break
 11641  		}
 11642  		d := auxIntToInt64(v_0.AuxInt)
 11643  		v.reset(OpS390XMOVDconst)
 11644  		v.AuxInt = int64ToAuxInt(int64(c) | d)
 11645  		return true
 11646  	}
 11647  	return false
 11648  }
 11649  func rewriteValueS390X_OpS390XORWload(v *Value) bool {
 11650  	v_2 := v.Args[2]
 11651  	v_1 := v.Args[1]
 11652  	v_0 := v.Args[0]
 11653  	// match: (ORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11654  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11655  	// result: (ORWload [off1+off2] {sym} x ptr mem)
 11656  	for {
 11657  		off1 := auxIntToInt32(v.AuxInt)
 11658  		sym := auxToSym(v.Aux)
 11659  		x := v_0
 11660  		if v_1.Op != OpS390XADDconst {
 11661  			break
 11662  		}
 11663  		off2 := auxIntToInt32(v_1.AuxInt)
 11664  		ptr := v_1.Args[0]
 11665  		mem := v_2
 11666  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11667  			break
 11668  		}
 11669  		v.reset(OpS390XORWload)
 11670  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11671  		v.Aux = symToAux(sym)
 11672  		v.AddArg3(x, ptr, mem)
 11673  		return true
 11674  	}
 11675  	// match: (ORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11676  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11677  	// result: (ORWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11678  	for {
 11679  		o1 := auxIntToInt32(v.AuxInt)
 11680  		s1 := auxToSym(v.Aux)
 11681  		x := v_0
 11682  		if v_1.Op != OpS390XMOVDaddr {
 11683  			break
 11684  		}
 11685  		o2 := auxIntToInt32(v_1.AuxInt)
 11686  		s2 := auxToSym(v_1.Aux)
 11687  		ptr := v_1.Args[0]
 11688  		mem := v_2
 11689  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11690  			break
 11691  		}
 11692  		v.reset(OpS390XORWload)
 11693  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11694  		v.Aux = symToAux(mergeSym(s1, s2))
 11695  		v.AddArg3(x, ptr, mem)
 11696  		return true
 11697  	}
 11698  	return false
 11699  }
 11700  func rewriteValueS390X_OpS390XORconst(v *Value) bool {
 11701  	v_0 := v.Args[0]
 11702  	// match: (ORconst [0] x)
 11703  	// result: x
 11704  	for {
 11705  		if auxIntToInt64(v.AuxInt) != 0 {
 11706  			break
 11707  		}
 11708  		x := v_0
 11709  		v.copyOf(x)
 11710  		return true
 11711  	}
 11712  	// match: (ORconst [-1] _)
 11713  	// result: (MOVDconst [-1])
 11714  	for {
 11715  		if auxIntToInt64(v.AuxInt) != -1 {
 11716  			break
 11717  		}
 11718  		v.reset(OpS390XMOVDconst)
 11719  		v.AuxInt = int64ToAuxInt(-1)
 11720  		return true
 11721  	}
 11722  	// match: (ORconst [c] (MOVDconst [d]))
 11723  	// result: (MOVDconst [c|d])
 11724  	for {
 11725  		c := auxIntToInt64(v.AuxInt)
 11726  		if v_0.Op != OpS390XMOVDconst {
 11727  			break
 11728  		}
 11729  		d := auxIntToInt64(v_0.AuxInt)
 11730  		v.reset(OpS390XMOVDconst)
 11731  		v.AuxInt = int64ToAuxInt(c | d)
 11732  		return true
 11733  	}
 11734  	return false
 11735  }
 11736  func rewriteValueS390X_OpS390XORload(v *Value) bool {
 11737  	v_2 := v.Args[2]
 11738  	v_1 := v.Args[1]
 11739  	v_0 := v.Args[0]
 11740  	b := v.Block
 11741  	// match: (ORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11742  	// cond: isSamePtr(ptr1, ptr2)
 11743  	// result: (OR x (LGDR <t> y))
 11744  	for {
 11745  		t := v.Type
 11746  		off := auxIntToInt32(v.AuxInt)
 11747  		sym := auxToSym(v.Aux)
 11748  		x := v_0
 11749  		ptr1 := v_1
 11750  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 11751  			break
 11752  		}
 11753  		y := v_2.Args[1]
 11754  		ptr2 := v_2.Args[0]
 11755  		if !(isSamePtr(ptr1, ptr2)) {
 11756  			break
 11757  		}
 11758  		v.reset(OpS390XOR)
 11759  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 11760  		v0.AddArg(y)
 11761  		v.AddArg2(x, v0)
 11762  		return true
 11763  	}
 11764  	// match: (ORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11765  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11766  	// result: (ORload [off1+off2] {sym} x ptr mem)
 11767  	for {
 11768  		off1 := auxIntToInt32(v.AuxInt)
 11769  		sym := auxToSym(v.Aux)
 11770  		x := v_0
 11771  		if v_1.Op != OpS390XADDconst {
 11772  			break
 11773  		}
 11774  		off2 := auxIntToInt32(v_1.AuxInt)
 11775  		ptr := v_1.Args[0]
 11776  		mem := v_2
 11777  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11778  			break
 11779  		}
 11780  		v.reset(OpS390XORload)
 11781  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11782  		v.Aux = symToAux(sym)
 11783  		v.AddArg3(x, ptr, mem)
 11784  		return true
 11785  	}
 11786  	// match: (ORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11787  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11788  	// result: (ORload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11789  	for {
 11790  		o1 := auxIntToInt32(v.AuxInt)
 11791  		s1 := auxToSym(v.Aux)
 11792  		x := v_0
 11793  		if v_1.Op != OpS390XMOVDaddr {
 11794  			break
 11795  		}
 11796  		o2 := auxIntToInt32(v_1.AuxInt)
 11797  		s2 := auxToSym(v_1.Aux)
 11798  		ptr := v_1.Args[0]
 11799  		mem := v_2
 11800  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11801  			break
 11802  		}
 11803  		v.reset(OpS390XORload)
 11804  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11805  		v.Aux = symToAux(mergeSym(s1, s2))
 11806  		v.AddArg3(x, ptr, mem)
 11807  		return true
 11808  	}
 11809  	return false
 11810  }
 11811  func rewriteValueS390X_OpS390XRISBGZ(v *Value) bool {
 11812  	v_0 := v.Args[0]
 11813  	b := v.Block
 11814  	// match: (RISBGZ (MOVWZreg x) {r})
 11815  	// cond: r.InMerge(0xffffffff) != nil
 11816  	// result: (RISBGZ x {*r.InMerge(0xffffffff)})
 11817  	for {
 11818  		r := auxToS390xRotateParams(v.Aux)
 11819  		if v_0.Op != OpS390XMOVWZreg {
 11820  			break
 11821  		}
 11822  		x := v_0.Args[0]
 11823  		if !(r.InMerge(0xffffffff) != nil) {
 11824  			break
 11825  		}
 11826  		v.reset(OpS390XRISBGZ)
 11827  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0xffffffff))
 11828  		v.AddArg(x)
 11829  		return true
 11830  	}
 11831  	// match: (RISBGZ (MOVHZreg x) {r})
 11832  	// cond: r.InMerge(0x0000ffff) != nil
 11833  	// result: (RISBGZ x {*r.InMerge(0x0000ffff)})
 11834  	for {
 11835  		r := auxToS390xRotateParams(v.Aux)
 11836  		if v_0.Op != OpS390XMOVHZreg {
 11837  			break
 11838  		}
 11839  		x := v_0.Args[0]
 11840  		if !(r.InMerge(0x0000ffff) != nil) {
 11841  			break
 11842  		}
 11843  		v.reset(OpS390XRISBGZ)
 11844  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0x0000ffff))
 11845  		v.AddArg(x)
 11846  		return true
 11847  	}
 11848  	// match: (RISBGZ (MOVBZreg x) {r})
 11849  	// cond: r.InMerge(0x000000ff) != nil
 11850  	// result: (RISBGZ x {*r.InMerge(0x000000ff)})
 11851  	for {
 11852  		r := auxToS390xRotateParams(v.Aux)
 11853  		if v_0.Op != OpS390XMOVBZreg {
 11854  			break
 11855  		}
 11856  		x := v_0.Args[0]
 11857  		if !(r.InMerge(0x000000ff) != nil) {
 11858  			break
 11859  		}
 11860  		v.reset(OpS390XRISBGZ)
 11861  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0x000000ff))
 11862  		v.AddArg(x)
 11863  		return true
 11864  	}
 11865  	// match: (RISBGZ (SLDconst x [c]) {r})
 11866  	// cond: r.InMerge(^uint64(0)<<c) != nil
 11867  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)<<c)).RotateLeft(c)})
 11868  	for {
 11869  		r := auxToS390xRotateParams(v.Aux)
 11870  		if v_0.Op != OpS390XSLDconst {
 11871  			break
 11872  		}
 11873  		c := auxIntToUint8(v_0.AuxInt)
 11874  		x := v_0.Args[0]
 11875  		if !(r.InMerge(^uint64(0)<<c) != nil) {
 11876  			break
 11877  		}
 11878  		v.reset(OpS390XRISBGZ)
 11879  		v.Aux = s390xRotateParamsToAux((*r.InMerge(^uint64(0) << c)).RotateLeft(c))
 11880  		v.AddArg(x)
 11881  		return true
 11882  	}
 11883  	// match: (RISBGZ (SRDconst x [c]) {r})
 11884  	// cond: r.InMerge(^uint64(0)>>c) != nil
 11885  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)>>c)).RotateLeft(-c)})
 11886  	for {
 11887  		r := auxToS390xRotateParams(v.Aux)
 11888  		if v_0.Op != OpS390XSRDconst {
 11889  			break
 11890  		}
 11891  		c := auxIntToUint8(v_0.AuxInt)
 11892  		x := v_0.Args[0]
 11893  		if !(r.InMerge(^uint64(0)>>c) != nil) {
 11894  			break
 11895  		}
 11896  		v.reset(OpS390XRISBGZ)
 11897  		v.Aux = s390xRotateParamsToAux((*r.InMerge(^uint64(0) >> c)).RotateLeft(-c))
 11898  		v.AddArg(x)
 11899  		return true
 11900  	}
 11901  	// match: (RISBGZ (RISBGZ x {y}) {z})
 11902  	// cond: z.InMerge(y.OutMask()) != nil
 11903  	// result: (RISBGZ x {(*z.InMerge(y.OutMask())).RotateLeft(y.Amount)})
 11904  	for {
 11905  		z := auxToS390xRotateParams(v.Aux)
 11906  		if v_0.Op != OpS390XRISBGZ {
 11907  			break
 11908  		}
 11909  		y := auxToS390xRotateParams(v_0.Aux)
 11910  		x := v_0.Args[0]
 11911  		if !(z.InMerge(y.OutMask()) != nil) {
 11912  			break
 11913  		}
 11914  		v.reset(OpS390XRISBGZ)
 11915  		v.Aux = s390xRotateParamsToAux((*z.InMerge(y.OutMask())).RotateLeft(y.Amount))
 11916  		v.AddArg(x)
 11917  		return true
 11918  	}
 11919  	// match: (RISBGZ x {r})
 11920  	// cond: r.End == 63 && r.Start == -r.Amount&63
 11921  	// result: (SRDconst x [-r.Amount&63])
 11922  	for {
 11923  		r := auxToS390xRotateParams(v.Aux)
 11924  		x := v_0
 11925  		if !(r.End == 63 && r.Start == -r.Amount&63) {
 11926  			break
 11927  		}
 11928  		v.reset(OpS390XSRDconst)
 11929  		v.AuxInt = uint8ToAuxInt(-r.Amount & 63)
 11930  		v.AddArg(x)
 11931  		return true
 11932  	}
 11933  	// match: (RISBGZ x {r})
 11934  	// cond: r.Start == 0 && r.End == 63-r.Amount
 11935  	// result: (SLDconst x [r.Amount])
 11936  	for {
 11937  		r := auxToS390xRotateParams(v.Aux)
 11938  		x := v_0
 11939  		if !(r.Start == 0 && r.End == 63-r.Amount) {
 11940  			break
 11941  		}
 11942  		v.reset(OpS390XSLDconst)
 11943  		v.AuxInt = uint8ToAuxInt(r.Amount)
 11944  		v.AddArg(x)
 11945  		return true
 11946  	}
 11947  	// match: (RISBGZ (SRADconst x [c]) {r})
 11948  	// cond: r.Start == r.End && (r.Start+r.Amount)&63 <= c
 11949  	// result: (RISBGZ x {s390x.NewRotateParams(r.Start, r.Start, -r.Start&63)})
 11950  	for {
 11951  		r := auxToS390xRotateParams(v.Aux)
 11952  		if v_0.Op != OpS390XSRADconst {
 11953  			break
 11954  		}
 11955  		c := auxIntToUint8(v_0.AuxInt)
 11956  		x := v_0.Args[0]
 11957  		if !(r.Start == r.End && (r.Start+r.Amount)&63 <= c) {
 11958  			break
 11959  		}
 11960  		v.reset(OpS390XRISBGZ)
 11961  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(r.Start, r.Start, -r.Start&63))
 11962  		v.AddArg(x)
 11963  		return true
 11964  	}
 11965  	// match: (RISBGZ x {r})
 11966  	// cond: r == s390x.NewRotateParams(56, 63, 0)
 11967  	// result: (MOVBZreg x)
 11968  	for {
 11969  		r := auxToS390xRotateParams(v.Aux)
 11970  		x := v_0
 11971  		if !(r == s390x.NewRotateParams(56, 63, 0)) {
 11972  			break
 11973  		}
 11974  		v.reset(OpS390XMOVBZreg)
 11975  		v.AddArg(x)
 11976  		return true
 11977  	}
 11978  	// match: (RISBGZ x {r})
 11979  	// cond: r == s390x.NewRotateParams(48, 63, 0)
 11980  	// result: (MOVHZreg x)
 11981  	for {
 11982  		r := auxToS390xRotateParams(v.Aux)
 11983  		x := v_0
 11984  		if !(r == s390x.NewRotateParams(48, 63, 0)) {
 11985  			break
 11986  		}
 11987  		v.reset(OpS390XMOVHZreg)
 11988  		v.AddArg(x)
 11989  		return true
 11990  	}
 11991  	// match: (RISBGZ x {r})
 11992  	// cond: r == s390x.NewRotateParams(32, 63, 0)
 11993  	// result: (MOVWZreg x)
 11994  	for {
 11995  		r := auxToS390xRotateParams(v.Aux)
 11996  		x := v_0
 11997  		if !(r == s390x.NewRotateParams(32, 63, 0)) {
 11998  			break
 11999  		}
 12000  		v.reset(OpS390XMOVWZreg)
 12001  		v.AddArg(x)
 12002  		return true
 12003  	}
 12004  	// match: (RISBGZ (LGDR <t> x) {r})
 12005  	// cond: r == s390x.NewRotateParams(1, 63, 0)
 12006  	// result: (LGDR <t> (LPDFR <x.Type> x))
 12007  	for {
 12008  		r := auxToS390xRotateParams(v.Aux)
 12009  		if v_0.Op != OpS390XLGDR {
 12010  			break
 12011  		}
 12012  		t := v_0.Type
 12013  		x := v_0.Args[0]
 12014  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
 12015  			break
 12016  		}
 12017  		v.reset(OpS390XLGDR)
 12018  		v.Type = t
 12019  		v0 := b.NewValue0(v.Pos, OpS390XLPDFR, x.Type)
 12020  		v0.AddArg(x)
 12021  		v.AddArg(v0)
 12022  		return true
 12023  	}
 12024  	return false
 12025  }
 12026  func rewriteValueS390X_OpS390XRLL(v *Value) bool {
 12027  	v_1 := v.Args[1]
 12028  	v_0 := v.Args[0]
 12029  	// match: (RLL x (MOVDconst [c]))
 12030  	// result: (RLLconst x [uint8(c&31)])
 12031  	for {
 12032  		x := v_0
 12033  		if v_1.Op != OpS390XMOVDconst {
 12034  			break
 12035  		}
 12036  		c := auxIntToInt64(v_1.AuxInt)
 12037  		v.reset(OpS390XRLLconst)
 12038  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 12039  		v.AddArg(x)
 12040  		return true
 12041  	}
 12042  	return false
 12043  }
 12044  func rewriteValueS390X_OpS390XRLLG(v *Value) bool {
 12045  	v_1 := v.Args[1]
 12046  	v_0 := v.Args[0]
 12047  	// match: (RLLG x (MOVDconst [c]))
 12048  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, uint8(c&63))})
 12049  	for {
 12050  		x := v_0
 12051  		if v_1.Op != OpS390XMOVDconst {
 12052  			break
 12053  		}
 12054  		c := auxIntToInt64(v_1.AuxInt)
 12055  		v.reset(OpS390XRISBGZ)
 12056  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, uint8(c&63)))
 12057  		v.AddArg(x)
 12058  		return true
 12059  	}
 12060  	return false
 12061  }
 12062  func rewriteValueS390X_OpS390XSLD(v *Value) bool {
 12063  	v_1 := v.Args[1]
 12064  	v_0 := v.Args[0]
 12065  	b := v.Block
 12066  	typ := &b.Func.Config.Types
 12067  	// match: (SLD x (MOVDconst [c]))
 12068  	// result: (SLDconst x [uint8(c&63)])
 12069  	for {
 12070  		x := v_0
 12071  		if v_1.Op != OpS390XMOVDconst {
 12072  			break
 12073  		}
 12074  		c := auxIntToInt64(v_1.AuxInt)
 12075  		v.reset(OpS390XSLDconst)
 12076  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 12077  		v.AddArg(x)
 12078  		return true
 12079  	}
 12080  	// match: (SLD x (RISBGZ y {r}))
 12081  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12082  	// result: (SLD x y)
 12083  	for {
 12084  		x := v_0
 12085  		if v_1.Op != OpS390XRISBGZ {
 12086  			break
 12087  		}
 12088  		r := auxToS390xRotateParams(v_1.Aux)
 12089  		y := v_1.Args[0]
 12090  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12091  			break
 12092  		}
 12093  		v.reset(OpS390XSLD)
 12094  		v.AddArg2(x, y)
 12095  		return true
 12096  	}
 12097  	// match: (SLD x (AND (MOVDconst [c]) y))
 12098  	// result: (SLD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12099  	for {
 12100  		x := v_0
 12101  		if v_1.Op != OpS390XAND {
 12102  			break
 12103  		}
 12104  		_ = v_1.Args[1]
 12105  		v_1_0 := v_1.Args[0]
 12106  		v_1_1 := v_1.Args[1]
 12107  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12108  			if v_1_0.Op != OpS390XMOVDconst {
 12109  				continue
 12110  			}
 12111  			c := auxIntToInt64(v_1_0.AuxInt)
 12112  			y := v_1_1
 12113  			v.reset(OpS390XSLD)
 12114  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12115  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12116  			v0.AddArg(y)
 12117  			v.AddArg2(x, v0)
 12118  			return true
 12119  		}
 12120  		break
 12121  	}
 12122  	// match: (SLD x (ANDWconst [c] y))
 12123  	// cond: c&63 == 63
 12124  	// result: (SLD x y)
 12125  	for {
 12126  		x := v_0
 12127  		if v_1.Op != OpS390XANDWconst {
 12128  			break
 12129  		}
 12130  		c := auxIntToInt32(v_1.AuxInt)
 12131  		y := v_1.Args[0]
 12132  		if !(c&63 == 63) {
 12133  			break
 12134  		}
 12135  		v.reset(OpS390XSLD)
 12136  		v.AddArg2(x, y)
 12137  		return true
 12138  	}
 12139  	// match: (SLD x (MOVWreg y))
 12140  	// result: (SLD x y)
 12141  	for {
 12142  		x := v_0
 12143  		if v_1.Op != OpS390XMOVWreg {
 12144  			break
 12145  		}
 12146  		y := v_1.Args[0]
 12147  		v.reset(OpS390XSLD)
 12148  		v.AddArg2(x, y)
 12149  		return true
 12150  	}
 12151  	// match: (SLD x (MOVHreg y))
 12152  	// result: (SLD x y)
 12153  	for {
 12154  		x := v_0
 12155  		if v_1.Op != OpS390XMOVHreg {
 12156  			break
 12157  		}
 12158  		y := v_1.Args[0]
 12159  		v.reset(OpS390XSLD)
 12160  		v.AddArg2(x, y)
 12161  		return true
 12162  	}
 12163  	// match: (SLD x (MOVBreg y))
 12164  	// result: (SLD x y)
 12165  	for {
 12166  		x := v_0
 12167  		if v_1.Op != OpS390XMOVBreg {
 12168  			break
 12169  		}
 12170  		y := v_1.Args[0]
 12171  		v.reset(OpS390XSLD)
 12172  		v.AddArg2(x, y)
 12173  		return true
 12174  	}
 12175  	// match: (SLD x (MOVWZreg y))
 12176  	// result: (SLD x y)
 12177  	for {
 12178  		x := v_0
 12179  		if v_1.Op != OpS390XMOVWZreg {
 12180  			break
 12181  		}
 12182  		y := v_1.Args[0]
 12183  		v.reset(OpS390XSLD)
 12184  		v.AddArg2(x, y)
 12185  		return true
 12186  	}
 12187  	// match: (SLD x (MOVHZreg y))
 12188  	// result: (SLD x y)
 12189  	for {
 12190  		x := v_0
 12191  		if v_1.Op != OpS390XMOVHZreg {
 12192  			break
 12193  		}
 12194  		y := v_1.Args[0]
 12195  		v.reset(OpS390XSLD)
 12196  		v.AddArg2(x, y)
 12197  		return true
 12198  	}
 12199  	// match: (SLD x (MOVBZreg y))
 12200  	// result: (SLD x y)
 12201  	for {
 12202  		x := v_0
 12203  		if v_1.Op != OpS390XMOVBZreg {
 12204  			break
 12205  		}
 12206  		y := v_1.Args[0]
 12207  		v.reset(OpS390XSLD)
 12208  		v.AddArg2(x, y)
 12209  		return true
 12210  	}
 12211  	return false
 12212  }
 12213  func rewriteValueS390X_OpS390XSLDconst(v *Value) bool {
 12214  	v_0 := v.Args[0]
 12215  	// match: (SLDconst (SRDconst x [c]) [d])
 12216  	// result: (RISBGZ x {s390x.NewRotateParams(uint8(max(0, int8(c-d))), 63-d, uint8(int8(d-c)&63))})
 12217  	for {
 12218  		d := auxIntToUint8(v.AuxInt)
 12219  		if v_0.Op != OpS390XSRDconst {
 12220  			break
 12221  		}
 12222  		c := auxIntToUint8(v_0.AuxInt)
 12223  		x := v_0.Args[0]
 12224  		v.reset(OpS390XRISBGZ)
 12225  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(uint8(max(0, int8(c-d))), 63-d, uint8(int8(d-c)&63)))
 12226  		v.AddArg(x)
 12227  		return true
 12228  	}
 12229  	// match: (SLDconst (RISBGZ x {r}) [c])
 12230  	// cond: s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil
 12231  	// result: (RISBGZ x {(*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 12232  	for {
 12233  		c := auxIntToUint8(v.AuxInt)
 12234  		if v_0.Op != OpS390XRISBGZ {
 12235  			break
 12236  		}
 12237  		r := auxToS390xRotateParams(v_0.Aux)
 12238  		x := v_0.Args[0]
 12239  		if !(s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil) {
 12240  			break
 12241  		}
 12242  		v.reset(OpS390XRISBGZ)
 12243  		v.Aux = s390xRotateParamsToAux((*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount))
 12244  		v.AddArg(x)
 12245  		return true
 12246  	}
 12247  	// match: (SLDconst x [0])
 12248  	// result: x
 12249  	for {
 12250  		if auxIntToUint8(v.AuxInt) != 0 {
 12251  			break
 12252  		}
 12253  		x := v_0
 12254  		v.copyOf(x)
 12255  		return true
 12256  	}
 12257  	return false
 12258  }
 12259  func rewriteValueS390X_OpS390XSLW(v *Value) bool {
 12260  	v_1 := v.Args[1]
 12261  	v_0 := v.Args[0]
 12262  	b := v.Block
 12263  	typ := &b.Func.Config.Types
 12264  	// match: (SLW x (MOVDconst [c]))
 12265  	// cond: c&32 == 0
 12266  	// result: (SLWconst x [uint8(c&31)])
 12267  	for {
 12268  		x := v_0
 12269  		if v_1.Op != OpS390XMOVDconst {
 12270  			break
 12271  		}
 12272  		c := auxIntToInt64(v_1.AuxInt)
 12273  		if !(c&32 == 0) {
 12274  			break
 12275  		}
 12276  		v.reset(OpS390XSLWconst)
 12277  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 12278  		v.AddArg(x)
 12279  		return true
 12280  	}
 12281  	// match: (SLW _ (MOVDconst [c]))
 12282  	// cond: c&32 != 0
 12283  	// result: (MOVDconst [0])
 12284  	for {
 12285  		if v_1.Op != OpS390XMOVDconst {
 12286  			break
 12287  		}
 12288  		c := auxIntToInt64(v_1.AuxInt)
 12289  		if !(c&32 != 0) {
 12290  			break
 12291  		}
 12292  		v.reset(OpS390XMOVDconst)
 12293  		v.AuxInt = int64ToAuxInt(0)
 12294  		return true
 12295  	}
 12296  	// match: (SLW x (RISBGZ y {r}))
 12297  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12298  	// result: (SLW x y)
 12299  	for {
 12300  		x := v_0
 12301  		if v_1.Op != OpS390XRISBGZ {
 12302  			break
 12303  		}
 12304  		r := auxToS390xRotateParams(v_1.Aux)
 12305  		y := v_1.Args[0]
 12306  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12307  			break
 12308  		}
 12309  		v.reset(OpS390XSLW)
 12310  		v.AddArg2(x, y)
 12311  		return true
 12312  	}
 12313  	// match: (SLW x (AND (MOVDconst [c]) y))
 12314  	// result: (SLW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12315  	for {
 12316  		x := v_0
 12317  		if v_1.Op != OpS390XAND {
 12318  			break
 12319  		}
 12320  		_ = v_1.Args[1]
 12321  		v_1_0 := v_1.Args[0]
 12322  		v_1_1 := v_1.Args[1]
 12323  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12324  			if v_1_0.Op != OpS390XMOVDconst {
 12325  				continue
 12326  			}
 12327  			c := auxIntToInt64(v_1_0.AuxInt)
 12328  			y := v_1_1
 12329  			v.reset(OpS390XSLW)
 12330  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12331  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12332  			v0.AddArg(y)
 12333  			v.AddArg2(x, v0)
 12334  			return true
 12335  		}
 12336  		break
 12337  	}
 12338  	// match: (SLW x (ANDWconst [c] y))
 12339  	// cond: c&63 == 63
 12340  	// result: (SLW x y)
 12341  	for {
 12342  		x := v_0
 12343  		if v_1.Op != OpS390XANDWconst {
 12344  			break
 12345  		}
 12346  		c := auxIntToInt32(v_1.AuxInt)
 12347  		y := v_1.Args[0]
 12348  		if !(c&63 == 63) {
 12349  			break
 12350  		}
 12351  		v.reset(OpS390XSLW)
 12352  		v.AddArg2(x, y)
 12353  		return true
 12354  	}
 12355  	// match: (SLW x (MOVWreg y))
 12356  	// result: (SLW x y)
 12357  	for {
 12358  		x := v_0
 12359  		if v_1.Op != OpS390XMOVWreg {
 12360  			break
 12361  		}
 12362  		y := v_1.Args[0]
 12363  		v.reset(OpS390XSLW)
 12364  		v.AddArg2(x, y)
 12365  		return true
 12366  	}
 12367  	// match: (SLW x (MOVHreg y))
 12368  	// result: (SLW x y)
 12369  	for {
 12370  		x := v_0
 12371  		if v_1.Op != OpS390XMOVHreg {
 12372  			break
 12373  		}
 12374  		y := v_1.Args[0]
 12375  		v.reset(OpS390XSLW)
 12376  		v.AddArg2(x, y)
 12377  		return true
 12378  	}
 12379  	// match: (SLW x (MOVBreg y))
 12380  	// result: (SLW x y)
 12381  	for {
 12382  		x := v_0
 12383  		if v_1.Op != OpS390XMOVBreg {
 12384  			break
 12385  		}
 12386  		y := v_1.Args[0]
 12387  		v.reset(OpS390XSLW)
 12388  		v.AddArg2(x, y)
 12389  		return true
 12390  	}
 12391  	// match: (SLW x (MOVWZreg y))
 12392  	// result: (SLW x y)
 12393  	for {
 12394  		x := v_0
 12395  		if v_1.Op != OpS390XMOVWZreg {
 12396  			break
 12397  		}
 12398  		y := v_1.Args[0]
 12399  		v.reset(OpS390XSLW)
 12400  		v.AddArg2(x, y)
 12401  		return true
 12402  	}
 12403  	// match: (SLW x (MOVHZreg y))
 12404  	// result: (SLW x y)
 12405  	for {
 12406  		x := v_0
 12407  		if v_1.Op != OpS390XMOVHZreg {
 12408  			break
 12409  		}
 12410  		y := v_1.Args[0]
 12411  		v.reset(OpS390XSLW)
 12412  		v.AddArg2(x, y)
 12413  		return true
 12414  	}
 12415  	// match: (SLW x (MOVBZreg y))
 12416  	// result: (SLW x y)
 12417  	for {
 12418  		x := v_0
 12419  		if v_1.Op != OpS390XMOVBZreg {
 12420  			break
 12421  		}
 12422  		y := v_1.Args[0]
 12423  		v.reset(OpS390XSLW)
 12424  		v.AddArg2(x, y)
 12425  		return true
 12426  	}
 12427  	return false
 12428  }
 12429  func rewriteValueS390X_OpS390XSLWconst(v *Value) bool {
 12430  	v_0 := v.Args[0]
 12431  	// match: (SLWconst x [0])
 12432  	// result: x
 12433  	for {
 12434  		if auxIntToUint8(v.AuxInt) != 0 {
 12435  			break
 12436  		}
 12437  		x := v_0
 12438  		v.copyOf(x)
 12439  		return true
 12440  	}
 12441  	return false
 12442  }
 12443  func rewriteValueS390X_OpS390XSRAD(v *Value) bool {
 12444  	v_1 := v.Args[1]
 12445  	v_0 := v.Args[0]
 12446  	b := v.Block
 12447  	typ := &b.Func.Config.Types
 12448  	// match: (SRAD x (MOVDconst [c]))
 12449  	// result: (SRADconst x [uint8(c&63)])
 12450  	for {
 12451  		x := v_0
 12452  		if v_1.Op != OpS390XMOVDconst {
 12453  			break
 12454  		}
 12455  		c := auxIntToInt64(v_1.AuxInt)
 12456  		v.reset(OpS390XSRADconst)
 12457  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 12458  		v.AddArg(x)
 12459  		return true
 12460  	}
 12461  	// match: (SRAD x (RISBGZ y {r}))
 12462  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12463  	// result: (SRAD x y)
 12464  	for {
 12465  		x := v_0
 12466  		if v_1.Op != OpS390XRISBGZ {
 12467  			break
 12468  		}
 12469  		r := auxToS390xRotateParams(v_1.Aux)
 12470  		y := v_1.Args[0]
 12471  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12472  			break
 12473  		}
 12474  		v.reset(OpS390XSRAD)
 12475  		v.AddArg2(x, y)
 12476  		return true
 12477  	}
 12478  	// match: (SRAD x (AND (MOVDconst [c]) y))
 12479  	// result: (SRAD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12480  	for {
 12481  		x := v_0
 12482  		if v_1.Op != OpS390XAND {
 12483  			break
 12484  		}
 12485  		_ = v_1.Args[1]
 12486  		v_1_0 := v_1.Args[0]
 12487  		v_1_1 := v_1.Args[1]
 12488  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12489  			if v_1_0.Op != OpS390XMOVDconst {
 12490  				continue
 12491  			}
 12492  			c := auxIntToInt64(v_1_0.AuxInt)
 12493  			y := v_1_1
 12494  			v.reset(OpS390XSRAD)
 12495  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12496  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12497  			v0.AddArg(y)
 12498  			v.AddArg2(x, v0)
 12499  			return true
 12500  		}
 12501  		break
 12502  	}
 12503  	// match: (SRAD x (ANDWconst [c] y))
 12504  	// cond: c&63 == 63
 12505  	// result: (SRAD x y)
 12506  	for {
 12507  		x := v_0
 12508  		if v_1.Op != OpS390XANDWconst {
 12509  			break
 12510  		}
 12511  		c := auxIntToInt32(v_1.AuxInt)
 12512  		y := v_1.Args[0]
 12513  		if !(c&63 == 63) {
 12514  			break
 12515  		}
 12516  		v.reset(OpS390XSRAD)
 12517  		v.AddArg2(x, y)
 12518  		return true
 12519  	}
 12520  	// match: (SRAD x (MOVWreg y))
 12521  	// result: (SRAD x y)
 12522  	for {
 12523  		x := v_0
 12524  		if v_1.Op != OpS390XMOVWreg {
 12525  			break
 12526  		}
 12527  		y := v_1.Args[0]
 12528  		v.reset(OpS390XSRAD)
 12529  		v.AddArg2(x, y)
 12530  		return true
 12531  	}
 12532  	// match: (SRAD x (MOVHreg y))
 12533  	// result: (SRAD x y)
 12534  	for {
 12535  		x := v_0
 12536  		if v_1.Op != OpS390XMOVHreg {
 12537  			break
 12538  		}
 12539  		y := v_1.Args[0]
 12540  		v.reset(OpS390XSRAD)
 12541  		v.AddArg2(x, y)
 12542  		return true
 12543  	}
 12544  	// match: (SRAD x (MOVBreg y))
 12545  	// result: (SRAD x y)
 12546  	for {
 12547  		x := v_0
 12548  		if v_1.Op != OpS390XMOVBreg {
 12549  			break
 12550  		}
 12551  		y := v_1.Args[0]
 12552  		v.reset(OpS390XSRAD)
 12553  		v.AddArg2(x, y)
 12554  		return true
 12555  	}
 12556  	// match: (SRAD x (MOVWZreg y))
 12557  	// result: (SRAD x y)
 12558  	for {
 12559  		x := v_0
 12560  		if v_1.Op != OpS390XMOVWZreg {
 12561  			break
 12562  		}
 12563  		y := v_1.Args[0]
 12564  		v.reset(OpS390XSRAD)
 12565  		v.AddArg2(x, y)
 12566  		return true
 12567  	}
 12568  	// match: (SRAD x (MOVHZreg y))
 12569  	// result: (SRAD x y)
 12570  	for {
 12571  		x := v_0
 12572  		if v_1.Op != OpS390XMOVHZreg {
 12573  			break
 12574  		}
 12575  		y := v_1.Args[0]
 12576  		v.reset(OpS390XSRAD)
 12577  		v.AddArg2(x, y)
 12578  		return true
 12579  	}
 12580  	// match: (SRAD x (MOVBZreg y))
 12581  	// result: (SRAD x y)
 12582  	for {
 12583  		x := v_0
 12584  		if v_1.Op != OpS390XMOVBZreg {
 12585  			break
 12586  		}
 12587  		y := v_1.Args[0]
 12588  		v.reset(OpS390XSRAD)
 12589  		v.AddArg2(x, y)
 12590  		return true
 12591  	}
 12592  	return false
 12593  }
 12594  func rewriteValueS390X_OpS390XSRADconst(v *Value) bool {
 12595  	v_0 := v.Args[0]
 12596  	// match: (SRADconst x [0])
 12597  	// result: x
 12598  	for {
 12599  		if auxIntToUint8(v.AuxInt) != 0 {
 12600  			break
 12601  		}
 12602  		x := v_0
 12603  		v.copyOf(x)
 12604  		return true
 12605  	}
 12606  	// match: (SRADconst [c] (MOVDconst [d]))
 12607  	// result: (MOVDconst [d>>uint64(c)])
 12608  	for {
 12609  		c := auxIntToUint8(v.AuxInt)
 12610  		if v_0.Op != OpS390XMOVDconst {
 12611  			break
 12612  		}
 12613  		d := auxIntToInt64(v_0.AuxInt)
 12614  		v.reset(OpS390XMOVDconst)
 12615  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 12616  		return true
 12617  	}
 12618  	return false
 12619  }
 12620  func rewriteValueS390X_OpS390XSRAW(v *Value) bool {
 12621  	v_1 := v.Args[1]
 12622  	v_0 := v.Args[0]
 12623  	b := v.Block
 12624  	typ := &b.Func.Config.Types
 12625  	// match: (SRAW x (MOVDconst [c]))
 12626  	// cond: c&32 == 0
 12627  	// result: (SRAWconst x [uint8(c&31)])
 12628  	for {
 12629  		x := v_0
 12630  		if v_1.Op != OpS390XMOVDconst {
 12631  			break
 12632  		}
 12633  		c := auxIntToInt64(v_1.AuxInt)
 12634  		if !(c&32 == 0) {
 12635  			break
 12636  		}
 12637  		v.reset(OpS390XSRAWconst)
 12638  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 12639  		v.AddArg(x)
 12640  		return true
 12641  	}
 12642  	// match: (SRAW x (MOVDconst [c]))
 12643  	// cond: c&32 != 0
 12644  	// result: (SRAWconst x [31])
 12645  	for {
 12646  		x := v_0
 12647  		if v_1.Op != OpS390XMOVDconst {
 12648  			break
 12649  		}
 12650  		c := auxIntToInt64(v_1.AuxInt)
 12651  		if !(c&32 != 0) {
 12652  			break
 12653  		}
 12654  		v.reset(OpS390XSRAWconst)
 12655  		v.AuxInt = uint8ToAuxInt(31)
 12656  		v.AddArg(x)
 12657  		return true
 12658  	}
 12659  	// match: (SRAW x (RISBGZ y {r}))
 12660  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12661  	// result: (SRAW x y)
 12662  	for {
 12663  		x := v_0
 12664  		if v_1.Op != OpS390XRISBGZ {
 12665  			break
 12666  		}
 12667  		r := auxToS390xRotateParams(v_1.Aux)
 12668  		y := v_1.Args[0]
 12669  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12670  			break
 12671  		}
 12672  		v.reset(OpS390XSRAW)
 12673  		v.AddArg2(x, y)
 12674  		return true
 12675  	}
 12676  	// match: (SRAW x (AND (MOVDconst [c]) y))
 12677  	// result: (SRAW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12678  	for {
 12679  		x := v_0
 12680  		if v_1.Op != OpS390XAND {
 12681  			break
 12682  		}
 12683  		_ = v_1.Args[1]
 12684  		v_1_0 := v_1.Args[0]
 12685  		v_1_1 := v_1.Args[1]
 12686  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12687  			if v_1_0.Op != OpS390XMOVDconst {
 12688  				continue
 12689  			}
 12690  			c := auxIntToInt64(v_1_0.AuxInt)
 12691  			y := v_1_1
 12692  			v.reset(OpS390XSRAW)
 12693  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12694  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12695  			v0.AddArg(y)
 12696  			v.AddArg2(x, v0)
 12697  			return true
 12698  		}
 12699  		break
 12700  	}
 12701  	// match: (SRAW x (ANDWconst [c] y))
 12702  	// cond: c&63 == 63
 12703  	// result: (SRAW x y)
 12704  	for {
 12705  		x := v_0
 12706  		if v_1.Op != OpS390XANDWconst {
 12707  			break
 12708  		}
 12709  		c := auxIntToInt32(v_1.AuxInt)
 12710  		y := v_1.Args[0]
 12711  		if !(c&63 == 63) {
 12712  			break
 12713  		}
 12714  		v.reset(OpS390XSRAW)
 12715  		v.AddArg2(x, y)
 12716  		return true
 12717  	}
 12718  	// match: (SRAW x (MOVWreg y))
 12719  	// result: (SRAW x y)
 12720  	for {
 12721  		x := v_0
 12722  		if v_1.Op != OpS390XMOVWreg {
 12723  			break
 12724  		}
 12725  		y := v_1.Args[0]
 12726  		v.reset(OpS390XSRAW)
 12727  		v.AddArg2(x, y)
 12728  		return true
 12729  	}
 12730  	// match: (SRAW x (MOVHreg y))
 12731  	// result: (SRAW x y)
 12732  	for {
 12733  		x := v_0
 12734  		if v_1.Op != OpS390XMOVHreg {
 12735  			break
 12736  		}
 12737  		y := v_1.Args[0]
 12738  		v.reset(OpS390XSRAW)
 12739  		v.AddArg2(x, y)
 12740  		return true
 12741  	}
 12742  	// match: (SRAW x (MOVBreg y))
 12743  	// result: (SRAW x y)
 12744  	for {
 12745  		x := v_0
 12746  		if v_1.Op != OpS390XMOVBreg {
 12747  			break
 12748  		}
 12749  		y := v_1.Args[0]
 12750  		v.reset(OpS390XSRAW)
 12751  		v.AddArg2(x, y)
 12752  		return true
 12753  	}
 12754  	// match: (SRAW x (MOVWZreg y))
 12755  	// result: (SRAW x y)
 12756  	for {
 12757  		x := v_0
 12758  		if v_1.Op != OpS390XMOVWZreg {
 12759  			break
 12760  		}
 12761  		y := v_1.Args[0]
 12762  		v.reset(OpS390XSRAW)
 12763  		v.AddArg2(x, y)
 12764  		return true
 12765  	}
 12766  	// match: (SRAW x (MOVHZreg y))
 12767  	// result: (SRAW x y)
 12768  	for {
 12769  		x := v_0
 12770  		if v_1.Op != OpS390XMOVHZreg {
 12771  			break
 12772  		}
 12773  		y := v_1.Args[0]
 12774  		v.reset(OpS390XSRAW)
 12775  		v.AddArg2(x, y)
 12776  		return true
 12777  	}
 12778  	// match: (SRAW x (MOVBZreg y))
 12779  	// result: (SRAW x y)
 12780  	for {
 12781  		x := v_0
 12782  		if v_1.Op != OpS390XMOVBZreg {
 12783  			break
 12784  		}
 12785  		y := v_1.Args[0]
 12786  		v.reset(OpS390XSRAW)
 12787  		v.AddArg2(x, y)
 12788  		return true
 12789  	}
 12790  	return false
 12791  }
 12792  func rewriteValueS390X_OpS390XSRAWconst(v *Value) bool {
 12793  	v_0 := v.Args[0]
 12794  	// match: (SRAWconst x [0])
 12795  	// result: x
 12796  	for {
 12797  		if auxIntToUint8(v.AuxInt) != 0 {
 12798  			break
 12799  		}
 12800  		x := v_0
 12801  		v.copyOf(x)
 12802  		return true
 12803  	}
 12804  	// match: (SRAWconst [c] (MOVDconst [d]))
 12805  	// result: (MOVDconst [int64(int32(d))>>uint64(c)])
 12806  	for {
 12807  		c := auxIntToUint8(v.AuxInt)
 12808  		if v_0.Op != OpS390XMOVDconst {
 12809  			break
 12810  		}
 12811  		d := auxIntToInt64(v_0.AuxInt)
 12812  		v.reset(OpS390XMOVDconst)
 12813  		v.AuxInt = int64ToAuxInt(int64(int32(d)) >> uint64(c))
 12814  		return true
 12815  	}
 12816  	return false
 12817  }
 12818  func rewriteValueS390X_OpS390XSRD(v *Value) bool {
 12819  	v_1 := v.Args[1]
 12820  	v_0 := v.Args[0]
 12821  	b := v.Block
 12822  	typ := &b.Func.Config.Types
 12823  	// match: (SRD x (MOVDconst [c]))
 12824  	// result: (SRDconst x [uint8(c&63)])
 12825  	for {
 12826  		x := v_0
 12827  		if v_1.Op != OpS390XMOVDconst {
 12828  			break
 12829  		}
 12830  		c := auxIntToInt64(v_1.AuxInt)
 12831  		v.reset(OpS390XSRDconst)
 12832  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 12833  		v.AddArg(x)
 12834  		return true
 12835  	}
 12836  	// match: (SRD x (RISBGZ y {r}))
 12837  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12838  	// result: (SRD x y)
 12839  	for {
 12840  		x := v_0
 12841  		if v_1.Op != OpS390XRISBGZ {
 12842  			break
 12843  		}
 12844  		r := auxToS390xRotateParams(v_1.Aux)
 12845  		y := v_1.Args[0]
 12846  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12847  			break
 12848  		}
 12849  		v.reset(OpS390XSRD)
 12850  		v.AddArg2(x, y)
 12851  		return true
 12852  	}
 12853  	// match: (SRD x (AND (MOVDconst [c]) y))
 12854  	// result: (SRD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12855  	for {
 12856  		x := v_0
 12857  		if v_1.Op != OpS390XAND {
 12858  			break
 12859  		}
 12860  		_ = v_1.Args[1]
 12861  		v_1_0 := v_1.Args[0]
 12862  		v_1_1 := v_1.Args[1]
 12863  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12864  			if v_1_0.Op != OpS390XMOVDconst {
 12865  				continue
 12866  			}
 12867  			c := auxIntToInt64(v_1_0.AuxInt)
 12868  			y := v_1_1
 12869  			v.reset(OpS390XSRD)
 12870  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12871  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12872  			v0.AddArg(y)
 12873  			v.AddArg2(x, v0)
 12874  			return true
 12875  		}
 12876  		break
 12877  	}
 12878  	// match: (SRD x (ANDWconst [c] y))
 12879  	// cond: c&63 == 63
 12880  	// result: (SRD x y)
 12881  	for {
 12882  		x := v_0
 12883  		if v_1.Op != OpS390XANDWconst {
 12884  			break
 12885  		}
 12886  		c := auxIntToInt32(v_1.AuxInt)
 12887  		y := v_1.Args[0]
 12888  		if !(c&63 == 63) {
 12889  			break
 12890  		}
 12891  		v.reset(OpS390XSRD)
 12892  		v.AddArg2(x, y)
 12893  		return true
 12894  	}
 12895  	// match: (SRD x (MOVWreg y))
 12896  	// result: (SRD x y)
 12897  	for {
 12898  		x := v_0
 12899  		if v_1.Op != OpS390XMOVWreg {
 12900  			break
 12901  		}
 12902  		y := v_1.Args[0]
 12903  		v.reset(OpS390XSRD)
 12904  		v.AddArg2(x, y)
 12905  		return true
 12906  	}
 12907  	// match: (SRD x (MOVHreg y))
 12908  	// result: (SRD x y)
 12909  	for {
 12910  		x := v_0
 12911  		if v_1.Op != OpS390XMOVHreg {
 12912  			break
 12913  		}
 12914  		y := v_1.Args[0]
 12915  		v.reset(OpS390XSRD)
 12916  		v.AddArg2(x, y)
 12917  		return true
 12918  	}
 12919  	// match: (SRD x (MOVBreg y))
 12920  	// result: (SRD x y)
 12921  	for {
 12922  		x := v_0
 12923  		if v_1.Op != OpS390XMOVBreg {
 12924  			break
 12925  		}
 12926  		y := v_1.Args[0]
 12927  		v.reset(OpS390XSRD)
 12928  		v.AddArg2(x, y)
 12929  		return true
 12930  	}
 12931  	// match: (SRD x (MOVWZreg y))
 12932  	// result: (SRD x y)
 12933  	for {
 12934  		x := v_0
 12935  		if v_1.Op != OpS390XMOVWZreg {
 12936  			break
 12937  		}
 12938  		y := v_1.Args[0]
 12939  		v.reset(OpS390XSRD)
 12940  		v.AddArg2(x, y)
 12941  		return true
 12942  	}
 12943  	// match: (SRD x (MOVHZreg y))
 12944  	// result: (SRD x y)
 12945  	for {
 12946  		x := v_0
 12947  		if v_1.Op != OpS390XMOVHZreg {
 12948  			break
 12949  		}
 12950  		y := v_1.Args[0]
 12951  		v.reset(OpS390XSRD)
 12952  		v.AddArg2(x, y)
 12953  		return true
 12954  	}
 12955  	// match: (SRD x (MOVBZreg y))
 12956  	// result: (SRD x y)
 12957  	for {
 12958  		x := v_0
 12959  		if v_1.Op != OpS390XMOVBZreg {
 12960  			break
 12961  		}
 12962  		y := v_1.Args[0]
 12963  		v.reset(OpS390XSRD)
 12964  		v.AddArg2(x, y)
 12965  		return true
 12966  	}
 12967  	return false
 12968  }
 12969  func rewriteValueS390X_OpS390XSRDconst(v *Value) bool {
 12970  	v_0 := v.Args[0]
 12971  	// match: (SRDconst (SLDconst x [c]) [d])
 12972  	// result: (RISBGZ x {s390x.NewRotateParams(d, uint8(min(63, int8(63-c+d))), uint8(int8(c-d)&63))})
 12973  	for {
 12974  		d := auxIntToUint8(v.AuxInt)
 12975  		if v_0.Op != OpS390XSLDconst {
 12976  			break
 12977  		}
 12978  		c := auxIntToUint8(v_0.AuxInt)
 12979  		x := v_0.Args[0]
 12980  		v.reset(OpS390XRISBGZ)
 12981  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(d, uint8(min(63, int8(63-c+d))), uint8(int8(c-d)&63)))
 12982  		v.AddArg(x)
 12983  		return true
 12984  	}
 12985  	// match: (SRDconst (RISBGZ x {r}) [c])
 12986  	// cond: s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil
 12987  	// result: (RISBGZ x {(*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 12988  	for {
 12989  		c := auxIntToUint8(v.AuxInt)
 12990  		if v_0.Op != OpS390XRISBGZ {
 12991  			break
 12992  		}
 12993  		r := auxToS390xRotateParams(v_0.Aux)
 12994  		x := v_0.Args[0]
 12995  		if !(s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil) {
 12996  			break
 12997  		}
 12998  		v.reset(OpS390XRISBGZ)
 12999  		v.Aux = s390xRotateParamsToAux((*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount))
 13000  		v.AddArg(x)
 13001  		return true
 13002  	}
 13003  	// match: (SRDconst x [0])
 13004  	// result: x
 13005  	for {
 13006  		if auxIntToUint8(v.AuxInt) != 0 {
 13007  			break
 13008  		}
 13009  		x := v_0
 13010  		v.copyOf(x)
 13011  		return true
 13012  	}
 13013  	return false
 13014  }
 13015  func rewriteValueS390X_OpS390XSRW(v *Value) bool {
 13016  	v_1 := v.Args[1]
 13017  	v_0 := v.Args[0]
 13018  	b := v.Block
 13019  	typ := &b.Func.Config.Types
 13020  	// match: (SRW x (MOVDconst [c]))
 13021  	// cond: c&32 == 0
 13022  	// result: (SRWconst x [uint8(c&31)])
 13023  	for {
 13024  		x := v_0
 13025  		if v_1.Op != OpS390XMOVDconst {
 13026  			break
 13027  		}
 13028  		c := auxIntToInt64(v_1.AuxInt)
 13029  		if !(c&32 == 0) {
 13030  			break
 13031  		}
 13032  		v.reset(OpS390XSRWconst)
 13033  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 13034  		v.AddArg(x)
 13035  		return true
 13036  	}
 13037  	// match: (SRW _ (MOVDconst [c]))
 13038  	// cond: c&32 != 0
 13039  	// result: (MOVDconst [0])
 13040  	for {
 13041  		if v_1.Op != OpS390XMOVDconst {
 13042  			break
 13043  		}
 13044  		c := auxIntToInt64(v_1.AuxInt)
 13045  		if !(c&32 != 0) {
 13046  			break
 13047  		}
 13048  		v.reset(OpS390XMOVDconst)
 13049  		v.AuxInt = int64ToAuxInt(0)
 13050  		return true
 13051  	}
 13052  	// match: (SRW x (RISBGZ y {r}))
 13053  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13054  	// result: (SRW x y)
 13055  	for {
 13056  		x := v_0
 13057  		if v_1.Op != OpS390XRISBGZ {
 13058  			break
 13059  		}
 13060  		r := auxToS390xRotateParams(v_1.Aux)
 13061  		y := v_1.Args[0]
 13062  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13063  			break
 13064  		}
 13065  		v.reset(OpS390XSRW)
 13066  		v.AddArg2(x, y)
 13067  		return true
 13068  	}
 13069  	// match: (SRW x (AND (MOVDconst [c]) y))
 13070  	// result: (SRW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13071  	for {
 13072  		x := v_0
 13073  		if v_1.Op != OpS390XAND {
 13074  			break
 13075  		}
 13076  		_ = v_1.Args[1]
 13077  		v_1_0 := v_1.Args[0]
 13078  		v_1_1 := v_1.Args[1]
 13079  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13080  			if v_1_0.Op != OpS390XMOVDconst {
 13081  				continue
 13082  			}
 13083  			c := auxIntToInt64(v_1_0.AuxInt)
 13084  			y := v_1_1
 13085  			v.reset(OpS390XSRW)
 13086  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 13087  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 13088  			v0.AddArg(y)
 13089  			v.AddArg2(x, v0)
 13090  			return true
 13091  		}
 13092  		break
 13093  	}
 13094  	// match: (SRW x (ANDWconst [c] y))
 13095  	// cond: c&63 == 63
 13096  	// result: (SRW x y)
 13097  	for {
 13098  		x := v_0
 13099  		if v_1.Op != OpS390XANDWconst {
 13100  			break
 13101  		}
 13102  		c := auxIntToInt32(v_1.AuxInt)
 13103  		y := v_1.Args[0]
 13104  		if !(c&63 == 63) {
 13105  			break
 13106  		}
 13107  		v.reset(OpS390XSRW)
 13108  		v.AddArg2(x, y)
 13109  		return true
 13110  	}
 13111  	// match: (SRW x (MOVWreg y))
 13112  	// result: (SRW x y)
 13113  	for {
 13114  		x := v_0
 13115  		if v_1.Op != OpS390XMOVWreg {
 13116  			break
 13117  		}
 13118  		y := v_1.Args[0]
 13119  		v.reset(OpS390XSRW)
 13120  		v.AddArg2(x, y)
 13121  		return true
 13122  	}
 13123  	// match: (SRW x (MOVHreg y))
 13124  	// result: (SRW x y)
 13125  	for {
 13126  		x := v_0
 13127  		if v_1.Op != OpS390XMOVHreg {
 13128  			break
 13129  		}
 13130  		y := v_1.Args[0]
 13131  		v.reset(OpS390XSRW)
 13132  		v.AddArg2(x, y)
 13133  		return true
 13134  	}
 13135  	// match: (SRW x (MOVBreg y))
 13136  	// result: (SRW x y)
 13137  	for {
 13138  		x := v_0
 13139  		if v_1.Op != OpS390XMOVBreg {
 13140  			break
 13141  		}
 13142  		y := v_1.Args[0]
 13143  		v.reset(OpS390XSRW)
 13144  		v.AddArg2(x, y)
 13145  		return true
 13146  	}
 13147  	// match: (SRW x (MOVWZreg y))
 13148  	// result: (SRW x y)
 13149  	for {
 13150  		x := v_0
 13151  		if v_1.Op != OpS390XMOVWZreg {
 13152  			break
 13153  		}
 13154  		y := v_1.Args[0]
 13155  		v.reset(OpS390XSRW)
 13156  		v.AddArg2(x, y)
 13157  		return true
 13158  	}
 13159  	// match: (SRW x (MOVHZreg y))
 13160  	// result: (SRW x y)
 13161  	for {
 13162  		x := v_0
 13163  		if v_1.Op != OpS390XMOVHZreg {
 13164  			break
 13165  		}
 13166  		y := v_1.Args[0]
 13167  		v.reset(OpS390XSRW)
 13168  		v.AddArg2(x, y)
 13169  		return true
 13170  	}
 13171  	// match: (SRW x (MOVBZreg y))
 13172  	// result: (SRW x y)
 13173  	for {
 13174  		x := v_0
 13175  		if v_1.Op != OpS390XMOVBZreg {
 13176  			break
 13177  		}
 13178  		y := v_1.Args[0]
 13179  		v.reset(OpS390XSRW)
 13180  		v.AddArg2(x, y)
 13181  		return true
 13182  	}
 13183  	return false
 13184  }
 13185  func rewriteValueS390X_OpS390XSRWconst(v *Value) bool {
 13186  	v_0 := v.Args[0]
 13187  	// match: (SRWconst x [0])
 13188  	// result: x
 13189  	for {
 13190  		if auxIntToUint8(v.AuxInt) != 0 {
 13191  			break
 13192  		}
 13193  		x := v_0
 13194  		v.copyOf(x)
 13195  		return true
 13196  	}
 13197  	return false
 13198  }
 13199  func rewriteValueS390X_OpS390XSTM2(v *Value) bool {
 13200  	v_3 := v.Args[3]
 13201  	v_2 := v.Args[2]
 13202  	v_1 := v.Args[1]
 13203  	v_0 := v.Args[0]
 13204  	// match: (STM2 [i] {s} p w2 w3 x:(STM2 [i-8] {s} p w0 w1 mem))
 13205  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)
 13206  	// result: (STM4 [i-8] {s} p w0 w1 w2 w3 mem)
 13207  	for {
 13208  		i := auxIntToInt32(v.AuxInt)
 13209  		s := auxToSym(v.Aux)
 13210  		p := v_0
 13211  		w2 := v_1
 13212  		w3 := v_2
 13213  		x := v_3
 13214  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 13215  			break
 13216  		}
 13217  		mem := x.Args[3]
 13218  		if p != x.Args[0] {
 13219  			break
 13220  		}
 13221  		w0 := x.Args[1]
 13222  		w1 := x.Args[2]
 13223  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)) {
 13224  			break
 13225  		}
 13226  		v.reset(OpS390XSTM4)
 13227  		v.AuxInt = int32ToAuxInt(i - 8)
 13228  		v.Aux = symToAux(s)
 13229  		v.AddArg6(p, w0, w1, w2, w3, mem)
 13230  		return true
 13231  	}
 13232  	// match: (STM2 [i] {s} p (SRDconst [32] x) x mem)
 13233  	// result: (MOVDstore [i] {s} p x mem)
 13234  	for {
 13235  		i := auxIntToInt32(v.AuxInt)
 13236  		s := auxToSym(v.Aux)
 13237  		p := v_0
 13238  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 13239  			break
 13240  		}
 13241  		x := v_1.Args[0]
 13242  		if x != v_2 {
 13243  			break
 13244  		}
 13245  		mem := v_3
 13246  		v.reset(OpS390XMOVDstore)
 13247  		v.AuxInt = int32ToAuxInt(i)
 13248  		v.Aux = symToAux(s)
 13249  		v.AddArg3(p, x, mem)
 13250  		return true
 13251  	}
 13252  	return false
 13253  }
 13254  func rewriteValueS390X_OpS390XSTMG2(v *Value) bool {
 13255  	v_3 := v.Args[3]
 13256  	v_2 := v.Args[2]
 13257  	v_1 := v.Args[1]
 13258  	v_0 := v.Args[0]
 13259  	// match: (STMG2 [i] {s} p w2 w3 x:(STMG2 [i-16] {s} p w0 w1 mem))
 13260  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)
 13261  	// result: (STMG4 [i-16] {s} p w0 w1 w2 w3 mem)
 13262  	for {
 13263  		i := auxIntToInt32(v.AuxInt)
 13264  		s := auxToSym(v.Aux)
 13265  		p := v_0
 13266  		w2 := v_1
 13267  		w3 := v_2
 13268  		x := v_3
 13269  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
 13270  			break
 13271  		}
 13272  		mem := x.Args[3]
 13273  		if p != x.Args[0] {
 13274  			break
 13275  		}
 13276  		w0 := x.Args[1]
 13277  		w1 := x.Args[2]
 13278  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)) {
 13279  			break
 13280  		}
 13281  		v.reset(OpS390XSTMG4)
 13282  		v.AuxInt = int32ToAuxInt(i - 16)
 13283  		v.Aux = symToAux(s)
 13284  		v.AddArg6(p, w0, w1, w2, w3, mem)
 13285  		return true
 13286  	}
 13287  	return false
 13288  }
 13289  func rewriteValueS390X_OpS390XSUB(v *Value) bool {
 13290  	v_1 := v.Args[1]
 13291  	v_0 := v.Args[0]
 13292  	b := v.Block
 13293  	// match: (SUB x (MOVDconst [c]))
 13294  	// cond: is32Bit(c)
 13295  	// result: (SUBconst x [int32(c)])
 13296  	for {
 13297  		x := v_0
 13298  		if v_1.Op != OpS390XMOVDconst {
 13299  			break
 13300  		}
 13301  		c := auxIntToInt64(v_1.AuxInt)
 13302  		if !(is32Bit(c)) {
 13303  			break
 13304  		}
 13305  		v.reset(OpS390XSUBconst)
 13306  		v.AuxInt = int32ToAuxInt(int32(c))
 13307  		v.AddArg(x)
 13308  		return true
 13309  	}
 13310  	// match: (SUB (MOVDconst [c]) x)
 13311  	// cond: is32Bit(c)
 13312  	// result: (NEG (SUBconst <v.Type> x [int32(c)]))
 13313  	for {
 13314  		if v_0.Op != OpS390XMOVDconst {
 13315  			break
 13316  		}
 13317  		c := auxIntToInt64(v_0.AuxInt)
 13318  		x := v_1
 13319  		if !(is32Bit(c)) {
 13320  			break
 13321  		}
 13322  		v.reset(OpS390XNEG)
 13323  		v0 := b.NewValue0(v.Pos, OpS390XSUBconst, v.Type)
 13324  		v0.AuxInt = int32ToAuxInt(int32(c))
 13325  		v0.AddArg(x)
 13326  		v.AddArg(v0)
 13327  		return true
 13328  	}
 13329  	// match: (SUB x x)
 13330  	// result: (MOVDconst [0])
 13331  	for {
 13332  		x := v_0
 13333  		if x != v_1 {
 13334  			break
 13335  		}
 13336  		v.reset(OpS390XMOVDconst)
 13337  		v.AuxInt = int64ToAuxInt(0)
 13338  		return true
 13339  	}
 13340  	// match: (SUB <t> x g:(MOVDload [off] {sym} ptr mem))
 13341  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13342  	// result: (SUBload <t> [off] {sym} x ptr mem)
 13343  	for {
 13344  		t := v.Type
 13345  		x := v_0
 13346  		g := v_1
 13347  		if g.Op != OpS390XMOVDload {
 13348  			break
 13349  		}
 13350  		off := auxIntToInt32(g.AuxInt)
 13351  		sym := auxToSym(g.Aux)
 13352  		mem := g.Args[1]
 13353  		ptr := g.Args[0]
 13354  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13355  			break
 13356  		}
 13357  		v.reset(OpS390XSUBload)
 13358  		v.Type = t
 13359  		v.AuxInt = int32ToAuxInt(off)
 13360  		v.Aux = symToAux(sym)
 13361  		v.AddArg3(x, ptr, mem)
 13362  		return true
 13363  	}
 13364  	return false
 13365  }
 13366  func rewriteValueS390X_OpS390XSUBE(v *Value) bool {
 13367  	v_2 := v.Args[2]
 13368  	v_1 := v.Args[1]
 13369  	v_0 := v.Args[0]
 13370  	// match: (SUBE x y (FlagGT))
 13371  	// result: (SUBC x y)
 13372  	for {
 13373  		x := v_0
 13374  		y := v_1
 13375  		if v_2.Op != OpS390XFlagGT {
 13376  			break
 13377  		}
 13378  		v.reset(OpS390XSUBC)
 13379  		v.AddArg2(x, y)
 13380  		return true
 13381  	}
 13382  	// match: (SUBE x y (FlagOV))
 13383  	// result: (SUBC x y)
 13384  	for {
 13385  		x := v_0
 13386  		y := v_1
 13387  		if v_2.Op != OpS390XFlagOV {
 13388  			break
 13389  		}
 13390  		v.reset(OpS390XSUBC)
 13391  		v.AddArg2(x, y)
 13392  		return true
 13393  	}
 13394  	// match: (SUBE x y (Select1 (SUBC (MOVDconst [0]) (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) c))))))
 13395  	// result: (SUBE x y c)
 13396  	for {
 13397  		x := v_0
 13398  		y := v_1
 13399  		if v_2.Op != OpSelect1 {
 13400  			break
 13401  		}
 13402  		v_2_0 := v_2.Args[0]
 13403  		if v_2_0.Op != OpS390XSUBC {
 13404  			break
 13405  		}
 13406  		_ = v_2_0.Args[1]
 13407  		v_2_0_0 := v_2_0.Args[0]
 13408  		if v_2_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 13409  			break
 13410  		}
 13411  		v_2_0_1 := v_2_0.Args[1]
 13412  		if v_2_0_1.Op != OpS390XNEG {
 13413  			break
 13414  		}
 13415  		v_2_0_1_0 := v_2_0_1.Args[0]
 13416  		if v_2_0_1_0.Op != OpSelect0 {
 13417  			break
 13418  		}
 13419  		v_2_0_1_0_0 := v_2_0_1_0.Args[0]
 13420  		if v_2_0_1_0_0.Op != OpS390XSUBE {
 13421  			break
 13422  		}
 13423  		c := v_2_0_1_0_0.Args[2]
 13424  		v_2_0_1_0_0_0 := v_2_0_1_0_0.Args[0]
 13425  		if v_2_0_1_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_0.AuxInt) != 0 {
 13426  			break
 13427  		}
 13428  		v_2_0_1_0_0_1 := v_2_0_1_0_0.Args[1]
 13429  		if v_2_0_1_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_1.AuxInt) != 0 {
 13430  			break
 13431  		}
 13432  		v.reset(OpS390XSUBE)
 13433  		v.AddArg3(x, y, c)
 13434  		return true
 13435  	}
 13436  	return false
 13437  }
 13438  func rewriteValueS390X_OpS390XSUBW(v *Value) bool {
 13439  	v_1 := v.Args[1]
 13440  	v_0 := v.Args[0]
 13441  	b := v.Block
 13442  	// match: (SUBW x (MOVDconst [c]))
 13443  	// result: (SUBWconst x [int32(c)])
 13444  	for {
 13445  		x := v_0
 13446  		if v_1.Op != OpS390XMOVDconst {
 13447  			break
 13448  		}
 13449  		c := auxIntToInt64(v_1.AuxInt)
 13450  		v.reset(OpS390XSUBWconst)
 13451  		v.AuxInt = int32ToAuxInt(int32(c))
 13452  		v.AddArg(x)
 13453  		return true
 13454  	}
 13455  	// match: (SUBW (MOVDconst [c]) x)
 13456  	// result: (NEGW (SUBWconst <v.Type> x [int32(c)]))
 13457  	for {
 13458  		if v_0.Op != OpS390XMOVDconst {
 13459  			break
 13460  		}
 13461  		c := auxIntToInt64(v_0.AuxInt)
 13462  		x := v_1
 13463  		v.reset(OpS390XNEGW)
 13464  		v0 := b.NewValue0(v.Pos, OpS390XSUBWconst, v.Type)
 13465  		v0.AuxInt = int32ToAuxInt(int32(c))
 13466  		v0.AddArg(x)
 13467  		v.AddArg(v0)
 13468  		return true
 13469  	}
 13470  	// match: (SUBW x x)
 13471  	// result: (MOVDconst [0])
 13472  	for {
 13473  		x := v_0
 13474  		if x != v_1 {
 13475  			break
 13476  		}
 13477  		v.reset(OpS390XMOVDconst)
 13478  		v.AuxInt = int64ToAuxInt(0)
 13479  		return true
 13480  	}
 13481  	// match: (SUBW <t> x g:(MOVWload [off] {sym} ptr mem))
 13482  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13483  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 13484  	for {
 13485  		t := v.Type
 13486  		x := v_0
 13487  		g := v_1
 13488  		if g.Op != OpS390XMOVWload {
 13489  			break
 13490  		}
 13491  		off := auxIntToInt32(g.AuxInt)
 13492  		sym := auxToSym(g.Aux)
 13493  		mem := g.Args[1]
 13494  		ptr := g.Args[0]
 13495  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13496  			break
 13497  		}
 13498  		v.reset(OpS390XSUBWload)
 13499  		v.Type = t
 13500  		v.AuxInt = int32ToAuxInt(off)
 13501  		v.Aux = symToAux(sym)
 13502  		v.AddArg3(x, ptr, mem)
 13503  		return true
 13504  	}
 13505  	// match: (SUBW <t> x g:(MOVWZload [off] {sym} ptr mem))
 13506  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13507  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 13508  	for {
 13509  		t := v.Type
 13510  		x := v_0
 13511  		g := v_1
 13512  		if g.Op != OpS390XMOVWZload {
 13513  			break
 13514  		}
 13515  		off := auxIntToInt32(g.AuxInt)
 13516  		sym := auxToSym(g.Aux)
 13517  		mem := g.Args[1]
 13518  		ptr := g.Args[0]
 13519  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13520  			break
 13521  		}
 13522  		v.reset(OpS390XSUBWload)
 13523  		v.Type = t
 13524  		v.AuxInt = int32ToAuxInt(off)
 13525  		v.Aux = symToAux(sym)
 13526  		v.AddArg3(x, ptr, mem)
 13527  		return true
 13528  	}
 13529  	return false
 13530  }
 13531  func rewriteValueS390X_OpS390XSUBWconst(v *Value) bool {
 13532  	v_0 := v.Args[0]
 13533  	// match: (SUBWconst [c] x)
 13534  	// cond: int32(c) == 0
 13535  	// result: x
 13536  	for {
 13537  		c := auxIntToInt32(v.AuxInt)
 13538  		x := v_0
 13539  		if !(int32(c) == 0) {
 13540  			break
 13541  		}
 13542  		v.copyOf(x)
 13543  		return true
 13544  	}
 13545  	// match: (SUBWconst [c] x)
 13546  	// result: (ADDWconst [-int32(c)] x)
 13547  	for {
 13548  		c := auxIntToInt32(v.AuxInt)
 13549  		x := v_0
 13550  		v.reset(OpS390XADDWconst)
 13551  		v.AuxInt = int32ToAuxInt(-int32(c))
 13552  		v.AddArg(x)
 13553  		return true
 13554  	}
 13555  }
 13556  func rewriteValueS390X_OpS390XSUBWload(v *Value) bool {
 13557  	v_2 := v.Args[2]
 13558  	v_1 := v.Args[1]
 13559  	v_0 := v.Args[0]
 13560  	// match: (SUBWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13561  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 13562  	// result: (SUBWload [off1+off2] {sym} x ptr mem)
 13563  	for {
 13564  		off1 := auxIntToInt32(v.AuxInt)
 13565  		sym := auxToSym(v.Aux)
 13566  		x := v_0
 13567  		if v_1.Op != OpS390XADDconst {
 13568  			break
 13569  		}
 13570  		off2 := auxIntToInt32(v_1.AuxInt)
 13571  		ptr := v_1.Args[0]
 13572  		mem := v_2
 13573  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 13574  			break
 13575  		}
 13576  		v.reset(OpS390XSUBWload)
 13577  		v.AuxInt = int32ToAuxInt(off1 + off2)
 13578  		v.Aux = symToAux(sym)
 13579  		v.AddArg3(x, ptr, mem)
 13580  		return true
 13581  	}
 13582  	// match: (SUBWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 13583  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 13584  	// result: (SUBWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 13585  	for {
 13586  		o1 := auxIntToInt32(v.AuxInt)
 13587  		s1 := auxToSym(v.Aux)
 13588  		x := v_0
 13589  		if v_1.Op != OpS390XMOVDaddr {
 13590  			break
 13591  		}
 13592  		o2 := auxIntToInt32(v_1.AuxInt)
 13593  		s2 := auxToSym(v_1.Aux)
 13594  		ptr := v_1.Args[0]
 13595  		mem := v_2
 13596  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 13597  			break
 13598  		}
 13599  		v.reset(OpS390XSUBWload)
 13600  		v.AuxInt = int32ToAuxInt(o1 + o2)
 13601  		v.Aux = symToAux(mergeSym(s1, s2))
 13602  		v.AddArg3(x, ptr, mem)
 13603  		return true
 13604  	}
 13605  	return false
 13606  }
 13607  func rewriteValueS390X_OpS390XSUBconst(v *Value) bool {
 13608  	v_0 := v.Args[0]
 13609  	// match: (SUBconst [0] x)
 13610  	// result: x
 13611  	for {
 13612  		if auxIntToInt32(v.AuxInt) != 0 {
 13613  			break
 13614  		}
 13615  		x := v_0
 13616  		v.copyOf(x)
 13617  		return true
 13618  	}
 13619  	// match: (SUBconst [c] x)
 13620  	// cond: c != -(1<<31)
 13621  	// result: (ADDconst [-c] x)
 13622  	for {
 13623  		c := auxIntToInt32(v.AuxInt)
 13624  		x := v_0
 13625  		if !(c != -(1 << 31)) {
 13626  			break
 13627  		}
 13628  		v.reset(OpS390XADDconst)
 13629  		v.AuxInt = int32ToAuxInt(-c)
 13630  		v.AddArg(x)
 13631  		return true
 13632  	}
 13633  	// match: (SUBconst (MOVDconst [d]) [c])
 13634  	// result: (MOVDconst [d-int64(c)])
 13635  	for {
 13636  		c := auxIntToInt32(v.AuxInt)
 13637  		if v_0.Op != OpS390XMOVDconst {
 13638  			break
 13639  		}
 13640  		d := auxIntToInt64(v_0.AuxInt)
 13641  		v.reset(OpS390XMOVDconst)
 13642  		v.AuxInt = int64ToAuxInt(d - int64(c))
 13643  		return true
 13644  	}
 13645  	// match: (SUBconst (SUBconst x [d]) [c])
 13646  	// cond: is32Bit(-int64(c)-int64(d))
 13647  	// result: (ADDconst [-c-d] x)
 13648  	for {
 13649  		c := auxIntToInt32(v.AuxInt)
 13650  		if v_0.Op != OpS390XSUBconst {
 13651  			break
 13652  		}
 13653  		d := auxIntToInt32(v_0.AuxInt)
 13654  		x := v_0.Args[0]
 13655  		if !(is32Bit(-int64(c) - int64(d))) {
 13656  			break
 13657  		}
 13658  		v.reset(OpS390XADDconst)
 13659  		v.AuxInt = int32ToAuxInt(-c - d)
 13660  		v.AddArg(x)
 13661  		return true
 13662  	}
 13663  	return false
 13664  }
 13665  func rewriteValueS390X_OpS390XSUBload(v *Value) bool {
 13666  	v_2 := v.Args[2]
 13667  	v_1 := v.Args[1]
 13668  	v_0 := v.Args[0]
 13669  	b := v.Block
 13670  	// match: (SUBload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 13671  	// cond: isSamePtr(ptr1, ptr2)
 13672  	// result: (SUB x (LGDR <t> y))
 13673  	for {
 13674  		t := v.Type
 13675  		off := auxIntToInt32(v.AuxInt)
 13676  		sym := auxToSym(v.Aux)
 13677  		x := v_0
 13678  		ptr1 := v_1
 13679  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 13680  			break
 13681  		}
 13682  		y := v_2.Args[1]
 13683  		ptr2 := v_2.Args[0]
 13684  		if !(isSamePtr(ptr1, ptr2)) {
 13685  			break
 13686  		}
 13687  		v.reset(OpS390XSUB)
 13688  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 13689  		v0.AddArg(y)
 13690  		v.AddArg2(x, v0)
 13691  		return true
 13692  	}
 13693  	// match: (SUBload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13694  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 13695  	// result: (SUBload [off1+off2] {sym} x ptr mem)
 13696  	for {
 13697  		off1 := auxIntToInt32(v.AuxInt)
 13698  		sym := auxToSym(v.Aux)
 13699  		x := v_0
 13700  		if v_1.Op != OpS390XADDconst {
 13701  			break
 13702  		}
 13703  		off2 := auxIntToInt32(v_1.AuxInt)
 13704  		ptr := v_1.Args[0]
 13705  		mem := v_2
 13706  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 13707  			break
 13708  		}
 13709  		v.reset(OpS390XSUBload)
 13710  		v.AuxInt = int32ToAuxInt(off1 + off2)
 13711  		v.Aux = symToAux(sym)
 13712  		v.AddArg3(x, ptr, mem)
 13713  		return true
 13714  	}
 13715  	// match: (SUBload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 13716  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 13717  	// result: (SUBload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 13718  	for {
 13719  		o1 := auxIntToInt32(v.AuxInt)
 13720  		s1 := auxToSym(v.Aux)
 13721  		x := v_0
 13722  		if v_1.Op != OpS390XMOVDaddr {
 13723  			break
 13724  		}
 13725  		o2 := auxIntToInt32(v_1.AuxInt)
 13726  		s2 := auxToSym(v_1.Aux)
 13727  		ptr := v_1.Args[0]
 13728  		mem := v_2
 13729  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 13730  			break
 13731  		}
 13732  		v.reset(OpS390XSUBload)
 13733  		v.AuxInt = int32ToAuxInt(o1 + o2)
 13734  		v.Aux = symToAux(mergeSym(s1, s2))
 13735  		v.AddArg3(x, ptr, mem)
 13736  		return true
 13737  	}
 13738  	return false
 13739  }
 13740  func rewriteValueS390X_OpS390XSumBytes2(v *Value) bool {
 13741  	v_0 := v.Args[0]
 13742  	b := v.Block
 13743  	typ := &b.Func.Config.Types
 13744  	// match: (SumBytes2 x)
 13745  	// result: (ADDW (SRWconst <typ.UInt8> x [8]) x)
 13746  	for {
 13747  		x := v_0
 13748  		v.reset(OpS390XADDW)
 13749  		v0 := b.NewValue0(v.Pos, OpS390XSRWconst, typ.UInt8)
 13750  		v0.AuxInt = uint8ToAuxInt(8)
 13751  		v0.AddArg(x)
 13752  		v.AddArg2(v0, x)
 13753  		return true
 13754  	}
 13755  }
 13756  func rewriteValueS390X_OpS390XSumBytes4(v *Value) bool {
 13757  	v_0 := v.Args[0]
 13758  	b := v.Block
 13759  	typ := &b.Func.Config.Types
 13760  	// match: (SumBytes4 x)
 13761  	// result: (SumBytes2 (ADDW <typ.UInt16> (SRWconst <typ.UInt16> x [16]) x))
 13762  	for {
 13763  		x := v_0
 13764  		v.reset(OpS390XSumBytes2)
 13765  		v0 := b.NewValue0(v.Pos, OpS390XADDW, typ.UInt16)
 13766  		v1 := b.NewValue0(v.Pos, OpS390XSRWconst, typ.UInt16)
 13767  		v1.AuxInt = uint8ToAuxInt(16)
 13768  		v1.AddArg(x)
 13769  		v0.AddArg2(v1, x)
 13770  		v.AddArg(v0)
 13771  		return true
 13772  	}
 13773  }
 13774  func rewriteValueS390X_OpS390XSumBytes8(v *Value) bool {
 13775  	v_0 := v.Args[0]
 13776  	b := v.Block
 13777  	typ := &b.Func.Config.Types
 13778  	// match: (SumBytes8 x)
 13779  	// result: (SumBytes4 (ADDW <typ.UInt32> (SRDconst <typ.UInt32> x [32]) x))
 13780  	for {
 13781  		x := v_0
 13782  		v.reset(OpS390XSumBytes4)
 13783  		v0 := b.NewValue0(v.Pos, OpS390XADDW, typ.UInt32)
 13784  		v1 := b.NewValue0(v.Pos, OpS390XSRDconst, typ.UInt32)
 13785  		v1.AuxInt = uint8ToAuxInt(32)
 13786  		v1.AddArg(x)
 13787  		v0.AddArg2(v1, x)
 13788  		v.AddArg(v0)
 13789  		return true
 13790  	}
 13791  }
 13792  func rewriteValueS390X_OpS390XXOR(v *Value) bool {
 13793  	v_1 := v.Args[1]
 13794  	v_0 := v.Args[0]
 13795  	// match: (XOR x (MOVDconst [c]))
 13796  	// cond: isU32Bit(c)
 13797  	// result: (XORconst [c] x)
 13798  	for {
 13799  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13800  			x := v_0
 13801  			if v_1.Op != OpS390XMOVDconst {
 13802  				continue
 13803  			}
 13804  			c := auxIntToInt64(v_1.AuxInt)
 13805  			if !(isU32Bit(c)) {
 13806  				continue
 13807  			}
 13808  			v.reset(OpS390XXORconst)
 13809  			v.AuxInt = int64ToAuxInt(c)
 13810  			v.AddArg(x)
 13811  			return true
 13812  		}
 13813  		break
 13814  	}
 13815  	// match: (XOR (MOVDconst [c]) (MOVDconst [d]))
 13816  	// result: (MOVDconst [c^d])
 13817  	for {
 13818  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13819  			if v_0.Op != OpS390XMOVDconst {
 13820  				continue
 13821  			}
 13822  			c := auxIntToInt64(v_0.AuxInt)
 13823  			if v_1.Op != OpS390XMOVDconst {
 13824  				continue
 13825  			}
 13826  			d := auxIntToInt64(v_1.AuxInt)
 13827  			v.reset(OpS390XMOVDconst)
 13828  			v.AuxInt = int64ToAuxInt(c ^ d)
 13829  			return true
 13830  		}
 13831  		break
 13832  	}
 13833  	// match: (XOR x x)
 13834  	// result: (MOVDconst [0])
 13835  	for {
 13836  		x := v_0
 13837  		if x != v_1 {
 13838  			break
 13839  		}
 13840  		v.reset(OpS390XMOVDconst)
 13841  		v.AuxInt = int64ToAuxInt(0)
 13842  		return true
 13843  	}
 13844  	// match: (XOR <t> x g:(MOVDload [off] {sym} ptr mem))
 13845  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13846  	// result: (XORload <t> [off] {sym} x ptr mem)
 13847  	for {
 13848  		t := v.Type
 13849  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13850  			x := v_0
 13851  			g := v_1
 13852  			if g.Op != OpS390XMOVDload {
 13853  				continue
 13854  			}
 13855  			off := auxIntToInt32(g.AuxInt)
 13856  			sym := auxToSym(g.Aux)
 13857  			mem := g.Args[1]
 13858  			ptr := g.Args[0]
 13859  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13860  				continue
 13861  			}
 13862  			v.reset(OpS390XXORload)
 13863  			v.Type = t
 13864  			v.AuxInt = int32ToAuxInt(off)
 13865  			v.Aux = symToAux(sym)
 13866  			v.AddArg3(x, ptr, mem)
 13867  			return true
 13868  		}
 13869  		break
 13870  	}
 13871  	return false
 13872  }
 13873  func rewriteValueS390X_OpS390XXORW(v *Value) bool {
 13874  	v_1 := v.Args[1]
 13875  	v_0 := v.Args[0]
 13876  	// match: (XORW x (MOVDconst [c]))
 13877  	// result: (XORWconst [int32(c)] x)
 13878  	for {
 13879  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13880  			x := v_0
 13881  			if v_1.Op != OpS390XMOVDconst {
 13882  				continue
 13883  			}
 13884  			c := auxIntToInt64(v_1.AuxInt)
 13885  			v.reset(OpS390XXORWconst)
 13886  			v.AuxInt = int32ToAuxInt(int32(c))
 13887  			v.AddArg(x)
 13888  			return true
 13889  		}
 13890  		break
 13891  	}
 13892  	// match: (XORW x x)
 13893  	// result: (MOVDconst [0])
 13894  	for {
 13895  		x := v_0
 13896  		if x != v_1 {
 13897  			break
 13898  		}
 13899  		v.reset(OpS390XMOVDconst)
 13900  		v.AuxInt = int64ToAuxInt(0)
 13901  		return true
 13902  	}
 13903  	// match: (XORW <t> x g:(MOVWload [off] {sym} ptr mem))
 13904  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13905  	// result: (XORWload <t> [off] {sym} x ptr mem)
 13906  	for {
 13907  		t := v.Type
 13908  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13909  			x := v_0
 13910  			g := v_1
 13911  			if g.Op != OpS390XMOVWload {
 13912  				continue
 13913  			}
 13914  			off := auxIntToInt32(g.AuxInt)
 13915  			sym := auxToSym(g.Aux)
 13916  			mem := g.Args[1]
 13917  			ptr := g.Args[0]
 13918  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13919  				continue
 13920  			}
 13921  			v.reset(OpS390XXORWload)
 13922  			v.Type = t
 13923  			v.AuxInt = int32ToAuxInt(off)
 13924  			v.Aux = symToAux(sym)
 13925  			v.AddArg3(x, ptr, mem)
 13926  			return true
 13927  		}
 13928  		break
 13929  	}
 13930  	// match: (XORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 13931  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13932  	// result: (XORWload <t> [off] {sym} x ptr mem)
 13933  	for {
 13934  		t := v.Type
 13935  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13936  			x := v_0
 13937  			g := v_1
 13938  			if g.Op != OpS390XMOVWZload {
 13939  				continue
 13940  			}
 13941  			off := auxIntToInt32(g.AuxInt)
 13942  			sym := auxToSym(g.Aux)
 13943  			mem := g.Args[1]
 13944  			ptr := g.Args[0]
 13945  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13946  				continue
 13947  			}
 13948  			v.reset(OpS390XXORWload)
 13949  			v.Type = t
 13950  			v.AuxInt = int32ToAuxInt(off)
 13951  			v.Aux = symToAux(sym)
 13952  			v.AddArg3(x, ptr, mem)
 13953  			return true
 13954  		}
 13955  		break
 13956  	}
 13957  	return false
 13958  }
 13959  func rewriteValueS390X_OpS390XXORWconst(v *Value) bool {
 13960  	v_0 := v.Args[0]
 13961  	// match: (XORWconst [c] x)
 13962  	// cond: int32(c)==0
 13963  	// result: x
 13964  	for {
 13965  		c := auxIntToInt32(v.AuxInt)
 13966  		x := v_0
 13967  		if !(int32(c) == 0) {
 13968  			break
 13969  		}
 13970  		v.copyOf(x)
 13971  		return true
 13972  	}
 13973  	// match: (XORWconst [c] (MOVDconst [d]))
 13974  	// result: (MOVDconst [int64(c)^d])
 13975  	for {
 13976  		c := auxIntToInt32(v.AuxInt)
 13977  		if v_0.Op != OpS390XMOVDconst {
 13978  			break
 13979  		}
 13980  		d := auxIntToInt64(v_0.AuxInt)
 13981  		v.reset(OpS390XMOVDconst)
 13982  		v.AuxInt = int64ToAuxInt(int64(c) ^ d)
 13983  		return true
 13984  	}
 13985  	return false
 13986  }
 13987  func rewriteValueS390X_OpS390XXORWload(v *Value) bool {
 13988  	v_2 := v.Args[2]
 13989  	v_1 := v.Args[1]
 13990  	v_0 := v.Args[0]
 13991  	// match: (XORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13992  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 13993  	// result: (XORWload [off1+off2] {sym} x ptr mem)
 13994  	for {
 13995  		off1 := auxIntToInt32(v.AuxInt)
 13996  		sym := auxToSym(v.Aux)
 13997  		x := v_0
 13998  		if v_1.Op != OpS390XADDconst {
 13999  			break
 14000  		}
 14001  		off2 := auxIntToInt32(v_1.AuxInt)
 14002  		ptr := v_1.Args[0]
 14003  		mem := v_2
 14004  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 14005  			break
 14006  		}
 14007  		v.reset(OpS390XXORWload)
 14008  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14009  		v.Aux = symToAux(sym)
 14010  		v.AddArg3(x, ptr, mem)
 14011  		return true
 14012  	}
 14013  	// match: (XORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14014  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 14015  	// result: (XORWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 14016  	for {
 14017  		o1 := auxIntToInt32(v.AuxInt)
 14018  		s1 := auxToSym(v.Aux)
 14019  		x := v_0
 14020  		if v_1.Op != OpS390XMOVDaddr {
 14021  			break
 14022  		}
 14023  		o2 := auxIntToInt32(v_1.AuxInt)
 14024  		s2 := auxToSym(v_1.Aux)
 14025  		ptr := v_1.Args[0]
 14026  		mem := v_2
 14027  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 14028  			break
 14029  		}
 14030  		v.reset(OpS390XXORWload)
 14031  		v.AuxInt = int32ToAuxInt(o1 + o2)
 14032  		v.Aux = symToAux(mergeSym(s1, s2))
 14033  		v.AddArg3(x, ptr, mem)
 14034  		return true
 14035  	}
 14036  	return false
 14037  }
 14038  func rewriteValueS390X_OpS390XXORconst(v *Value) bool {
 14039  	v_0 := v.Args[0]
 14040  	// match: (XORconst [0] x)
 14041  	// result: x
 14042  	for {
 14043  		if auxIntToInt64(v.AuxInt) != 0 {
 14044  			break
 14045  		}
 14046  		x := v_0
 14047  		v.copyOf(x)
 14048  		return true
 14049  	}
 14050  	// match: (XORconst [c] (MOVDconst [d]))
 14051  	// result: (MOVDconst [c^d])
 14052  	for {
 14053  		c := auxIntToInt64(v.AuxInt)
 14054  		if v_0.Op != OpS390XMOVDconst {
 14055  			break
 14056  		}
 14057  		d := auxIntToInt64(v_0.AuxInt)
 14058  		v.reset(OpS390XMOVDconst)
 14059  		v.AuxInt = int64ToAuxInt(c ^ d)
 14060  		return true
 14061  	}
 14062  	return false
 14063  }
 14064  func rewriteValueS390X_OpS390XXORload(v *Value) bool {
 14065  	v_2 := v.Args[2]
 14066  	v_1 := v.Args[1]
 14067  	v_0 := v.Args[0]
 14068  	b := v.Block
 14069  	// match: (XORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 14070  	// cond: isSamePtr(ptr1, ptr2)
 14071  	// result: (XOR x (LGDR <t> y))
 14072  	for {
 14073  		t := v.Type
 14074  		off := auxIntToInt32(v.AuxInt)
 14075  		sym := auxToSym(v.Aux)
 14076  		x := v_0
 14077  		ptr1 := v_1
 14078  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 14079  			break
 14080  		}
 14081  		y := v_2.Args[1]
 14082  		ptr2 := v_2.Args[0]
 14083  		if !(isSamePtr(ptr1, ptr2)) {
 14084  			break
 14085  		}
 14086  		v.reset(OpS390XXOR)
 14087  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 14088  		v0.AddArg(y)
 14089  		v.AddArg2(x, v0)
 14090  		return true
 14091  	}
 14092  	// match: (XORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14093  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 14094  	// result: (XORload [off1+off2] {sym} x ptr mem)
 14095  	for {
 14096  		off1 := auxIntToInt32(v.AuxInt)
 14097  		sym := auxToSym(v.Aux)
 14098  		x := v_0
 14099  		if v_1.Op != OpS390XADDconst {
 14100  			break
 14101  		}
 14102  		off2 := auxIntToInt32(v_1.AuxInt)
 14103  		ptr := v_1.Args[0]
 14104  		mem := v_2
 14105  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 14106  			break
 14107  		}
 14108  		v.reset(OpS390XXORload)
 14109  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14110  		v.Aux = symToAux(sym)
 14111  		v.AddArg3(x, ptr, mem)
 14112  		return true
 14113  	}
 14114  	// match: (XORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14115  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 14116  	// result: (XORload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 14117  	for {
 14118  		o1 := auxIntToInt32(v.AuxInt)
 14119  		s1 := auxToSym(v.Aux)
 14120  		x := v_0
 14121  		if v_1.Op != OpS390XMOVDaddr {
 14122  			break
 14123  		}
 14124  		o2 := auxIntToInt32(v_1.AuxInt)
 14125  		s2 := auxToSym(v_1.Aux)
 14126  		ptr := v_1.Args[0]
 14127  		mem := v_2
 14128  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 14129  			break
 14130  		}
 14131  		v.reset(OpS390XXORload)
 14132  		v.AuxInt = int32ToAuxInt(o1 + o2)
 14133  		v.Aux = symToAux(mergeSym(s1, s2))
 14134  		v.AddArg3(x, ptr, mem)
 14135  		return true
 14136  	}
 14137  	return false
 14138  }
 14139  func rewriteValueS390X_OpSelect0(v *Value) bool {
 14140  	v_0 := v.Args[0]
 14141  	b := v.Block
 14142  	typ := &b.Func.Config.Types
 14143  	// match: (Select0 (Add64carry x y c))
 14144  	// result: (Select0 <typ.UInt64> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))
 14145  	for {
 14146  		if v_0.Op != OpAdd64carry {
 14147  			break
 14148  		}
 14149  		c := v_0.Args[2]
 14150  		x := v_0.Args[0]
 14151  		y := v_0.Args[1]
 14152  		v.reset(OpSelect0)
 14153  		v.Type = typ.UInt64
 14154  		v0 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14155  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14156  		v2 := b.NewValue0(v.Pos, OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 14157  		v2.AuxInt = int16ToAuxInt(-1)
 14158  		v2.AddArg(c)
 14159  		v1.AddArg(v2)
 14160  		v0.AddArg3(x, y, v1)
 14161  		v.AddArg(v0)
 14162  		return true
 14163  	}
 14164  	// match: (Select0 (Sub64borrow x y c))
 14165  	// result: (Select0 <typ.UInt64> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c))))
 14166  	for {
 14167  		if v_0.Op != OpSub64borrow {
 14168  			break
 14169  		}
 14170  		c := v_0.Args[2]
 14171  		x := v_0.Args[0]
 14172  		y := v_0.Args[1]
 14173  		v.reset(OpSelect0)
 14174  		v.Type = typ.UInt64
 14175  		v0 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14176  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14177  		v2 := b.NewValue0(v.Pos, OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 14178  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 14179  		v3.AuxInt = int64ToAuxInt(0)
 14180  		v2.AddArg2(v3, c)
 14181  		v1.AddArg(v2)
 14182  		v0.AddArg3(x, y, v1)
 14183  		v.AddArg(v0)
 14184  		return true
 14185  	}
 14186  	// match: (Select0 <t> (AddTupleFirst32 val tuple))
 14187  	// result: (ADDW val (Select0 <t> tuple))
 14188  	for {
 14189  		t := v.Type
 14190  		if v_0.Op != OpS390XAddTupleFirst32 {
 14191  			break
 14192  		}
 14193  		tuple := v_0.Args[1]
 14194  		val := v_0.Args[0]
 14195  		v.reset(OpS390XADDW)
 14196  		v0 := b.NewValue0(v.Pos, OpSelect0, t)
 14197  		v0.AddArg(tuple)
 14198  		v.AddArg2(val, v0)
 14199  		return true
 14200  	}
 14201  	// match: (Select0 <t> (AddTupleFirst64 val tuple))
 14202  	// result: (ADD val (Select0 <t> tuple))
 14203  	for {
 14204  		t := v.Type
 14205  		if v_0.Op != OpS390XAddTupleFirst64 {
 14206  			break
 14207  		}
 14208  		tuple := v_0.Args[1]
 14209  		val := v_0.Args[0]
 14210  		v.reset(OpS390XADD)
 14211  		v0 := b.NewValue0(v.Pos, OpSelect0, t)
 14212  		v0.AddArg(tuple)
 14213  		v.AddArg2(val, v0)
 14214  		return true
 14215  	}
 14216  	// match: (Select0 (ADDCconst (MOVDconst [c]) [d]))
 14217  	// result: (MOVDconst [c+int64(d)])
 14218  	for {
 14219  		if v_0.Op != OpS390XADDCconst {
 14220  			break
 14221  		}
 14222  		d := auxIntToInt16(v_0.AuxInt)
 14223  		v_0_0 := v_0.Args[0]
 14224  		if v_0_0.Op != OpS390XMOVDconst {
 14225  			break
 14226  		}
 14227  		c := auxIntToInt64(v_0_0.AuxInt)
 14228  		v.reset(OpS390XMOVDconst)
 14229  		v.AuxInt = int64ToAuxInt(c + int64(d))
 14230  		return true
 14231  	}
 14232  	// match: (Select0 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14233  	// result: (MOVDconst [c-d])
 14234  	for {
 14235  		if v_0.Op != OpS390XSUBC {
 14236  			break
 14237  		}
 14238  		_ = v_0.Args[1]
 14239  		v_0_0 := v_0.Args[0]
 14240  		if v_0_0.Op != OpS390XMOVDconst {
 14241  			break
 14242  		}
 14243  		c := auxIntToInt64(v_0_0.AuxInt)
 14244  		v_0_1 := v_0.Args[1]
 14245  		if v_0_1.Op != OpS390XMOVDconst {
 14246  			break
 14247  		}
 14248  		d := auxIntToInt64(v_0_1.AuxInt)
 14249  		v.reset(OpS390XMOVDconst)
 14250  		v.AuxInt = int64ToAuxInt(c - d)
 14251  		return true
 14252  	}
 14253  	// match: (Select0 (FADD (FMUL y z) x))
 14254  	// cond: x.Block.Func.useFMA(v)
 14255  	// result: (FMADD x y z)
 14256  	for {
 14257  		if v_0.Op != OpS390XFADD {
 14258  			break
 14259  		}
 14260  		_ = v_0.Args[1]
 14261  		v_0_0 := v_0.Args[0]
 14262  		v_0_1 := v_0.Args[1]
 14263  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 14264  			if v_0_0.Op != OpS390XFMUL {
 14265  				continue
 14266  			}
 14267  			z := v_0_0.Args[1]
 14268  			y := v_0_0.Args[0]
 14269  			x := v_0_1
 14270  			if !(x.Block.Func.useFMA(v)) {
 14271  				continue
 14272  			}
 14273  			v.reset(OpS390XFMADD)
 14274  			v.AddArg3(x, y, z)
 14275  			return true
 14276  		}
 14277  		break
 14278  	}
 14279  	// match: (Select0 (FSUB (FMUL y z) x))
 14280  	// cond: x.Block.Func.useFMA(v)
 14281  	// result: (FMSUB x y z)
 14282  	for {
 14283  		if v_0.Op != OpS390XFSUB {
 14284  			break
 14285  		}
 14286  		x := v_0.Args[1]
 14287  		v_0_0 := v_0.Args[0]
 14288  		if v_0_0.Op != OpS390XFMUL {
 14289  			break
 14290  		}
 14291  		z := v_0_0.Args[1]
 14292  		y := v_0_0.Args[0]
 14293  		if !(x.Block.Func.useFMA(v)) {
 14294  			break
 14295  		}
 14296  		v.reset(OpS390XFMSUB)
 14297  		v.AddArg3(x, y, z)
 14298  		return true
 14299  	}
 14300  	// match: (Select0 (FADDS (FMULS y z) x))
 14301  	// cond: x.Block.Func.useFMA(v)
 14302  	// result: (FMADDS x y z)
 14303  	for {
 14304  		if v_0.Op != OpS390XFADDS {
 14305  			break
 14306  		}
 14307  		_ = v_0.Args[1]
 14308  		v_0_0 := v_0.Args[0]
 14309  		v_0_1 := v_0.Args[1]
 14310  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 14311  			if v_0_0.Op != OpS390XFMULS {
 14312  				continue
 14313  			}
 14314  			z := v_0_0.Args[1]
 14315  			y := v_0_0.Args[0]
 14316  			x := v_0_1
 14317  			if !(x.Block.Func.useFMA(v)) {
 14318  				continue
 14319  			}
 14320  			v.reset(OpS390XFMADDS)
 14321  			v.AddArg3(x, y, z)
 14322  			return true
 14323  		}
 14324  		break
 14325  	}
 14326  	// match: (Select0 (FSUBS (FMULS y z) x))
 14327  	// cond: x.Block.Func.useFMA(v)
 14328  	// result: (FMSUBS x y z)
 14329  	for {
 14330  		if v_0.Op != OpS390XFSUBS {
 14331  			break
 14332  		}
 14333  		x := v_0.Args[1]
 14334  		v_0_0 := v_0.Args[0]
 14335  		if v_0_0.Op != OpS390XFMULS {
 14336  			break
 14337  		}
 14338  		z := v_0_0.Args[1]
 14339  		y := v_0_0.Args[0]
 14340  		if !(x.Block.Func.useFMA(v)) {
 14341  			break
 14342  		}
 14343  		v.reset(OpS390XFMSUBS)
 14344  		v.AddArg3(x, y, z)
 14345  		return true
 14346  	}
 14347  	return false
 14348  }
 14349  func rewriteValueS390X_OpSelect1(v *Value) bool {
 14350  	v_0 := v.Args[0]
 14351  	b := v.Block
 14352  	typ := &b.Func.Config.Types
 14353  	// match: (Select1 (Add64carry x y c))
 14354  	// result: (Select0 <typ.UInt64> (ADDE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))))
 14355  	for {
 14356  		if v_0.Op != OpAdd64carry {
 14357  			break
 14358  		}
 14359  		c := v_0.Args[2]
 14360  		x := v_0.Args[0]
 14361  		y := v_0.Args[1]
 14362  		v.reset(OpSelect0)
 14363  		v.Type = typ.UInt64
 14364  		v0 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14365  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 14366  		v1.AuxInt = int64ToAuxInt(0)
 14367  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14368  		v3 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14369  		v4 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14370  		v5 := b.NewValue0(v.Pos, OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 14371  		v5.AuxInt = int16ToAuxInt(-1)
 14372  		v5.AddArg(c)
 14373  		v4.AddArg(v5)
 14374  		v3.AddArg3(x, y, v4)
 14375  		v2.AddArg(v3)
 14376  		v0.AddArg3(v1, v1, v2)
 14377  		v.AddArg(v0)
 14378  		return true
 14379  	}
 14380  	// match: (Select1 (Sub64borrow x y c))
 14381  	// result: (NEG (Select0 <typ.UInt64> (SUBE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c)))))))
 14382  	for {
 14383  		if v_0.Op != OpSub64borrow {
 14384  			break
 14385  		}
 14386  		c := v_0.Args[2]
 14387  		x := v_0.Args[0]
 14388  		y := v_0.Args[1]
 14389  		v.reset(OpS390XNEG)
 14390  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 14391  		v1 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14392  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 14393  		v2.AuxInt = int64ToAuxInt(0)
 14394  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14395  		v4 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14396  		v5 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14397  		v6 := b.NewValue0(v.Pos, OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 14398  		v6.AddArg2(v2, c)
 14399  		v5.AddArg(v6)
 14400  		v4.AddArg3(x, y, v5)
 14401  		v3.AddArg(v4)
 14402  		v1.AddArg3(v2, v2, v3)
 14403  		v0.AddArg(v1)
 14404  		v.AddArg(v0)
 14405  		return true
 14406  	}
 14407  	// match: (Select1 (AddTupleFirst32 _ tuple))
 14408  	// result: (Select1 tuple)
 14409  	for {
 14410  		if v_0.Op != OpS390XAddTupleFirst32 {
 14411  			break
 14412  		}
 14413  		tuple := v_0.Args[1]
 14414  		v.reset(OpSelect1)
 14415  		v.AddArg(tuple)
 14416  		return true
 14417  	}
 14418  	// match: (Select1 (AddTupleFirst64 _ tuple))
 14419  	// result: (Select1 tuple)
 14420  	for {
 14421  		if v_0.Op != OpS390XAddTupleFirst64 {
 14422  			break
 14423  		}
 14424  		tuple := v_0.Args[1]
 14425  		v.reset(OpSelect1)
 14426  		v.AddArg(tuple)
 14427  		return true
 14428  	}
 14429  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 14430  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0
 14431  	// result: (FlagEQ)
 14432  	for {
 14433  		if v_0.Op != OpS390XADDCconst {
 14434  			break
 14435  		}
 14436  		d := auxIntToInt16(v_0.AuxInt)
 14437  		v_0_0 := v_0.Args[0]
 14438  		if v_0_0.Op != OpS390XMOVDconst {
 14439  			break
 14440  		}
 14441  		c := auxIntToInt64(v_0_0.AuxInt)
 14442  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0) {
 14443  			break
 14444  		}
 14445  		v.reset(OpS390XFlagEQ)
 14446  		return true
 14447  	}
 14448  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 14449  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0
 14450  	// result: (FlagLT)
 14451  	for {
 14452  		if v_0.Op != OpS390XADDCconst {
 14453  			break
 14454  		}
 14455  		d := auxIntToInt16(v_0.AuxInt)
 14456  		v_0_0 := v_0.Args[0]
 14457  		if v_0_0.Op != OpS390XMOVDconst {
 14458  			break
 14459  		}
 14460  		c := auxIntToInt64(v_0_0.AuxInt)
 14461  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0) {
 14462  			break
 14463  		}
 14464  		v.reset(OpS390XFlagLT)
 14465  		return true
 14466  	}
 14467  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14468  	// cond: uint64(d) <= uint64(c) && c-d == 0
 14469  	// result: (FlagGT)
 14470  	for {
 14471  		if v_0.Op != OpS390XSUBC {
 14472  			break
 14473  		}
 14474  		_ = v_0.Args[1]
 14475  		v_0_0 := v_0.Args[0]
 14476  		if v_0_0.Op != OpS390XMOVDconst {
 14477  			break
 14478  		}
 14479  		c := auxIntToInt64(v_0_0.AuxInt)
 14480  		v_0_1 := v_0.Args[1]
 14481  		if v_0_1.Op != OpS390XMOVDconst {
 14482  			break
 14483  		}
 14484  		d := auxIntToInt64(v_0_1.AuxInt)
 14485  		if !(uint64(d) <= uint64(c) && c-d == 0) {
 14486  			break
 14487  		}
 14488  		v.reset(OpS390XFlagGT)
 14489  		return true
 14490  	}
 14491  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14492  	// cond: uint64(d) <= uint64(c) && c-d != 0
 14493  	// result: (FlagOV)
 14494  	for {
 14495  		if v_0.Op != OpS390XSUBC {
 14496  			break
 14497  		}
 14498  		_ = v_0.Args[1]
 14499  		v_0_0 := v_0.Args[0]
 14500  		if v_0_0.Op != OpS390XMOVDconst {
 14501  			break
 14502  		}
 14503  		c := auxIntToInt64(v_0_0.AuxInt)
 14504  		v_0_1 := v_0.Args[1]
 14505  		if v_0_1.Op != OpS390XMOVDconst {
 14506  			break
 14507  		}
 14508  		d := auxIntToInt64(v_0_1.AuxInt)
 14509  		if !(uint64(d) <= uint64(c) && c-d != 0) {
 14510  			break
 14511  		}
 14512  		v.reset(OpS390XFlagOV)
 14513  		return true
 14514  	}
 14515  	return false
 14516  }
 14517  func rewriteValueS390X_OpSlicemask(v *Value) bool {
 14518  	v_0 := v.Args[0]
 14519  	b := v.Block
 14520  	// match: (Slicemask <t> x)
 14521  	// result: (SRADconst (NEG <t> x) [63])
 14522  	for {
 14523  		t := v.Type
 14524  		x := v_0
 14525  		v.reset(OpS390XSRADconst)
 14526  		v.AuxInt = uint8ToAuxInt(63)
 14527  		v0 := b.NewValue0(v.Pos, OpS390XNEG, t)
 14528  		v0.AddArg(x)
 14529  		v.AddArg(v0)
 14530  		return true
 14531  	}
 14532  }
 14533  func rewriteValueS390X_OpStore(v *Value) bool {
 14534  	v_2 := v.Args[2]
 14535  	v_1 := v.Args[1]
 14536  	v_0 := v.Args[0]
 14537  	// match: (Store {t} ptr val mem)
 14538  	// cond: t.Size() == 8 && t.IsFloat()
 14539  	// result: (FMOVDstore ptr val mem)
 14540  	for {
 14541  		t := auxToType(v.Aux)
 14542  		ptr := v_0
 14543  		val := v_1
 14544  		mem := v_2
 14545  		if !(t.Size() == 8 && t.IsFloat()) {
 14546  			break
 14547  		}
 14548  		v.reset(OpS390XFMOVDstore)
 14549  		v.AddArg3(ptr, val, mem)
 14550  		return true
 14551  	}
 14552  	// match: (Store {t} ptr val mem)
 14553  	// cond: t.Size() == 4 && t.IsFloat()
 14554  	// result: (FMOVSstore ptr val mem)
 14555  	for {
 14556  		t := auxToType(v.Aux)
 14557  		ptr := v_0
 14558  		val := v_1
 14559  		mem := v_2
 14560  		if !(t.Size() == 4 && t.IsFloat()) {
 14561  			break
 14562  		}
 14563  		v.reset(OpS390XFMOVSstore)
 14564  		v.AddArg3(ptr, val, mem)
 14565  		return true
 14566  	}
 14567  	// match: (Store {t} ptr val mem)
 14568  	// cond: t.Size() == 8 && !t.IsFloat()
 14569  	// result: (MOVDstore ptr val mem)
 14570  	for {
 14571  		t := auxToType(v.Aux)
 14572  		ptr := v_0
 14573  		val := v_1
 14574  		mem := v_2
 14575  		if !(t.Size() == 8 && !t.IsFloat()) {
 14576  			break
 14577  		}
 14578  		v.reset(OpS390XMOVDstore)
 14579  		v.AddArg3(ptr, val, mem)
 14580  		return true
 14581  	}
 14582  	// match: (Store {t} ptr val mem)
 14583  	// cond: t.Size() == 4 && !t.IsFloat()
 14584  	// result: (MOVWstore ptr val mem)
 14585  	for {
 14586  		t := auxToType(v.Aux)
 14587  		ptr := v_0
 14588  		val := v_1
 14589  		mem := v_2
 14590  		if !(t.Size() == 4 && !t.IsFloat()) {
 14591  			break
 14592  		}
 14593  		v.reset(OpS390XMOVWstore)
 14594  		v.AddArg3(ptr, val, mem)
 14595  		return true
 14596  	}
 14597  	// match: (Store {t} ptr val mem)
 14598  	// cond: t.Size() == 2
 14599  	// result: (MOVHstore ptr val mem)
 14600  	for {
 14601  		t := auxToType(v.Aux)
 14602  		ptr := v_0
 14603  		val := v_1
 14604  		mem := v_2
 14605  		if !(t.Size() == 2) {
 14606  			break
 14607  		}
 14608  		v.reset(OpS390XMOVHstore)
 14609  		v.AddArg3(ptr, val, mem)
 14610  		return true
 14611  	}
 14612  	// match: (Store {t} ptr val mem)
 14613  	// cond: t.Size() == 1
 14614  	// result: (MOVBstore ptr val mem)
 14615  	for {
 14616  		t := auxToType(v.Aux)
 14617  		ptr := v_0
 14618  		val := v_1
 14619  		mem := v_2
 14620  		if !(t.Size() == 1) {
 14621  			break
 14622  		}
 14623  		v.reset(OpS390XMOVBstore)
 14624  		v.AddArg3(ptr, val, mem)
 14625  		return true
 14626  	}
 14627  	return false
 14628  }
 14629  func rewriteValueS390X_OpSub32F(v *Value) bool {
 14630  	v_1 := v.Args[1]
 14631  	v_0 := v.Args[0]
 14632  	b := v.Block
 14633  	typ := &b.Func.Config.Types
 14634  	// match: (Sub32F x y)
 14635  	// result: (Select0 (FSUBS x y))
 14636  	for {
 14637  		x := v_0
 14638  		y := v_1
 14639  		v.reset(OpSelect0)
 14640  		v0 := b.NewValue0(v.Pos, OpS390XFSUBS, types.NewTuple(typ.Float32, types.TypeFlags))
 14641  		v0.AddArg2(x, y)
 14642  		v.AddArg(v0)
 14643  		return true
 14644  	}
 14645  }
 14646  func rewriteValueS390X_OpSub64F(v *Value) bool {
 14647  	v_1 := v.Args[1]
 14648  	v_0 := v.Args[0]
 14649  	b := v.Block
 14650  	typ := &b.Func.Config.Types
 14651  	// match: (Sub64F x y)
 14652  	// result: (Select0 (FSUB x y))
 14653  	for {
 14654  		x := v_0
 14655  		y := v_1
 14656  		v.reset(OpSelect0)
 14657  		v0 := b.NewValue0(v.Pos, OpS390XFSUB, types.NewTuple(typ.Float64, types.TypeFlags))
 14658  		v0.AddArg2(x, y)
 14659  		v.AddArg(v0)
 14660  		return true
 14661  	}
 14662  }
 14663  func rewriteValueS390X_OpTrunc(v *Value) bool {
 14664  	v_0 := v.Args[0]
 14665  	// match: (Trunc x)
 14666  	// result: (FIDBR [5] x)
 14667  	for {
 14668  		x := v_0
 14669  		v.reset(OpS390XFIDBR)
 14670  		v.AuxInt = int8ToAuxInt(5)
 14671  		v.AddArg(x)
 14672  		return true
 14673  	}
 14674  }
 14675  func rewriteValueS390X_OpZero(v *Value) bool {
 14676  	v_1 := v.Args[1]
 14677  	v_0 := v.Args[0]
 14678  	b := v.Block
 14679  	// match: (Zero [0] _ mem)
 14680  	// result: mem
 14681  	for {
 14682  		if auxIntToInt64(v.AuxInt) != 0 {
 14683  			break
 14684  		}
 14685  		mem := v_1
 14686  		v.copyOf(mem)
 14687  		return true
 14688  	}
 14689  	// match: (Zero [1] destptr mem)
 14690  	// result: (MOVBstoreconst [0] destptr mem)
 14691  	for {
 14692  		if auxIntToInt64(v.AuxInt) != 1 {
 14693  			break
 14694  		}
 14695  		destptr := v_0
 14696  		mem := v_1
 14697  		v.reset(OpS390XMOVBstoreconst)
 14698  		v.AuxInt = valAndOffToAuxInt(0)
 14699  		v.AddArg2(destptr, mem)
 14700  		return true
 14701  	}
 14702  	// match: (Zero [2] destptr mem)
 14703  	// result: (MOVHstoreconst [0] destptr mem)
 14704  	for {
 14705  		if auxIntToInt64(v.AuxInt) != 2 {
 14706  			break
 14707  		}
 14708  		destptr := v_0
 14709  		mem := v_1
 14710  		v.reset(OpS390XMOVHstoreconst)
 14711  		v.AuxInt = valAndOffToAuxInt(0)
 14712  		v.AddArg2(destptr, mem)
 14713  		return true
 14714  	}
 14715  	// match: (Zero [4] destptr mem)
 14716  	// result: (MOVWstoreconst [0] destptr mem)
 14717  	for {
 14718  		if auxIntToInt64(v.AuxInt) != 4 {
 14719  			break
 14720  		}
 14721  		destptr := v_0
 14722  		mem := v_1
 14723  		v.reset(OpS390XMOVWstoreconst)
 14724  		v.AuxInt = valAndOffToAuxInt(0)
 14725  		v.AddArg2(destptr, mem)
 14726  		return true
 14727  	}
 14728  	// match: (Zero [8] destptr mem)
 14729  	// result: (MOVDstoreconst [0] destptr mem)
 14730  	for {
 14731  		if auxIntToInt64(v.AuxInt) != 8 {
 14732  			break
 14733  		}
 14734  		destptr := v_0
 14735  		mem := v_1
 14736  		v.reset(OpS390XMOVDstoreconst)
 14737  		v.AuxInt = valAndOffToAuxInt(0)
 14738  		v.AddArg2(destptr, mem)
 14739  		return true
 14740  	}
 14741  	// match: (Zero [3] destptr mem)
 14742  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr (MOVHstoreconst [0] destptr mem))
 14743  	for {
 14744  		if auxIntToInt64(v.AuxInt) != 3 {
 14745  			break
 14746  		}
 14747  		destptr := v_0
 14748  		mem := v_1
 14749  		v.reset(OpS390XMOVBstoreconst)
 14750  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 2))
 14751  		v0 := b.NewValue0(v.Pos, OpS390XMOVHstoreconst, types.TypeMem)
 14752  		v0.AuxInt = valAndOffToAuxInt(0)
 14753  		v0.AddArg2(destptr, mem)
 14754  		v.AddArg2(destptr, v0)
 14755  		return true
 14756  	}
 14757  	// match: (Zero [5] destptr mem)
 14758  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 14759  	for {
 14760  		if auxIntToInt64(v.AuxInt) != 5 {
 14761  			break
 14762  		}
 14763  		destptr := v_0
 14764  		mem := v_1
 14765  		v.reset(OpS390XMOVBstoreconst)
 14766  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 14767  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 14768  		v0.AuxInt = valAndOffToAuxInt(0)
 14769  		v0.AddArg2(destptr, mem)
 14770  		v.AddArg2(destptr, v0)
 14771  		return true
 14772  	}
 14773  	// match: (Zero [6] destptr mem)
 14774  	// result: (MOVHstoreconst [makeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 14775  	for {
 14776  		if auxIntToInt64(v.AuxInt) != 6 {
 14777  			break
 14778  		}
 14779  		destptr := v_0
 14780  		mem := v_1
 14781  		v.reset(OpS390XMOVHstoreconst)
 14782  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 14783  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 14784  		v0.AuxInt = valAndOffToAuxInt(0)
 14785  		v0.AddArg2(destptr, mem)
 14786  		v.AddArg2(destptr, v0)
 14787  		return true
 14788  	}
 14789  	// match: (Zero [7] destptr mem)
 14790  	// result: (MOVWstoreconst [makeValAndOff(0,3)] destptr (MOVWstoreconst [0] destptr mem))
 14791  	for {
 14792  		if auxIntToInt64(v.AuxInt) != 7 {
 14793  			break
 14794  		}
 14795  		destptr := v_0
 14796  		mem := v_1
 14797  		v.reset(OpS390XMOVWstoreconst)
 14798  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 3))
 14799  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 14800  		v0.AuxInt = valAndOffToAuxInt(0)
 14801  		v0.AddArg2(destptr, mem)
 14802  		v.AddArg2(destptr, v0)
 14803  		return true
 14804  	}
 14805  	// match: (Zero [s] destptr mem)
 14806  	// cond: s > 0 && s <= 1024
 14807  	// result: (CLEAR [makeValAndOff(int32(s), 0)] destptr mem)
 14808  	for {
 14809  		s := auxIntToInt64(v.AuxInt)
 14810  		destptr := v_0
 14811  		mem := v_1
 14812  		if !(s > 0 && s <= 1024) {
 14813  			break
 14814  		}
 14815  		v.reset(OpS390XCLEAR)
 14816  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s), 0))
 14817  		v.AddArg2(destptr, mem)
 14818  		return true
 14819  	}
 14820  	// match: (Zero [s] destptr mem)
 14821  	// cond: s > 1024
 14822  	// result: (LoweredZero [s%256] destptr (ADDconst <destptr.Type> destptr [(int32(s)/256)*256]) mem)
 14823  	for {
 14824  		s := auxIntToInt64(v.AuxInt)
 14825  		destptr := v_0
 14826  		mem := v_1
 14827  		if !(s > 1024) {
 14828  			break
 14829  		}
 14830  		v.reset(OpS390XLoweredZero)
 14831  		v.AuxInt = int64ToAuxInt(s % 256)
 14832  		v0 := b.NewValue0(v.Pos, OpS390XADDconst, destptr.Type)
 14833  		v0.AuxInt = int32ToAuxInt((int32(s) / 256) * 256)
 14834  		v0.AddArg(destptr)
 14835  		v.AddArg3(destptr, v0, mem)
 14836  		return true
 14837  	}
 14838  	return false
 14839  }
 14840  func rewriteBlockS390X(b *Block) bool {
 14841  	typ := &b.Func.Config.Types
 14842  	switch b.Kind {
 14843  	case BlockS390XBRC:
 14844  		// match: (BRC {c} x:(CMP _ _) yes no)
 14845  		// cond: c&s390x.Unordered != 0
 14846  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14847  		for b.Controls[0].Op == OpS390XCMP {
 14848  			x := b.Controls[0]
 14849  			c := auxToS390xCCMask(b.Aux)
 14850  			if !(c&s390x.Unordered != 0) {
 14851  				break
 14852  			}
 14853  			b.resetWithControl(BlockS390XBRC, x)
 14854  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14855  			return true
 14856  		}
 14857  		// match: (BRC {c} x:(CMPW _ _) yes no)
 14858  		// cond: c&s390x.Unordered != 0
 14859  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14860  		for b.Controls[0].Op == OpS390XCMPW {
 14861  			x := b.Controls[0]
 14862  			c := auxToS390xCCMask(b.Aux)
 14863  			if !(c&s390x.Unordered != 0) {
 14864  				break
 14865  			}
 14866  			b.resetWithControl(BlockS390XBRC, x)
 14867  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14868  			return true
 14869  		}
 14870  		// match: (BRC {c} x:(CMPU _ _) yes no)
 14871  		// cond: c&s390x.Unordered != 0
 14872  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14873  		for b.Controls[0].Op == OpS390XCMPU {
 14874  			x := b.Controls[0]
 14875  			c := auxToS390xCCMask(b.Aux)
 14876  			if !(c&s390x.Unordered != 0) {
 14877  				break
 14878  			}
 14879  			b.resetWithControl(BlockS390XBRC, x)
 14880  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14881  			return true
 14882  		}
 14883  		// match: (BRC {c} x:(CMPWU _ _) yes no)
 14884  		// cond: c&s390x.Unordered != 0
 14885  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14886  		for b.Controls[0].Op == OpS390XCMPWU {
 14887  			x := b.Controls[0]
 14888  			c := auxToS390xCCMask(b.Aux)
 14889  			if !(c&s390x.Unordered != 0) {
 14890  				break
 14891  			}
 14892  			b.resetWithControl(BlockS390XBRC, x)
 14893  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14894  			return true
 14895  		}
 14896  		// match: (BRC {c} x:(CMPconst _) yes no)
 14897  		// cond: c&s390x.Unordered != 0
 14898  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14899  		for b.Controls[0].Op == OpS390XCMPconst {
 14900  			x := b.Controls[0]
 14901  			c := auxToS390xCCMask(b.Aux)
 14902  			if !(c&s390x.Unordered != 0) {
 14903  				break
 14904  			}
 14905  			b.resetWithControl(BlockS390XBRC, x)
 14906  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14907  			return true
 14908  		}
 14909  		// match: (BRC {c} x:(CMPWconst _) yes no)
 14910  		// cond: c&s390x.Unordered != 0
 14911  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14912  		for b.Controls[0].Op == OpS390XCMPWconst {
 14913  			x := b.Controls[0]
 14914  			c := auxToS390xCCMask(b.Aux)
 14915  			if !(c&s390x.Unordered != 0) {
 14916  				break
 14917  			}
 14918  			b.resetWithControl(BlockS390XBRC, x)
 14919  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14920  			return true
 14921  		}
 14922  		// match: (BRC {c} x:(CMPUconst _) yes no)
 14923  		// cond: c&s390x.Unordered != 0
 14924  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14925  		for b.Controls[0].Op == OpS390XCMPUconst {
 14926  			x := b.Controls[0]
 14927  			c := auxToS390xCCMask(b.Aux)
 14928  			if !(c&s390x.Unordered != 0) {
 14929  				break
 14930  			}
 14931  			b.resetWithControl(BlockS390XBRC, x)
 14932  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14933  			return true
 14934  		}
 14935  		// match: (BRC {c} x:(CMPWUconst _) yes no)
 14936  		// cond: c&s390x.Unordered != 0
 14937  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14938  		for b.Controls[0].Op == OpS390XCMPWUconst {
 14939  			x := b.Controls[0]
 14940  			c := auxToS390xCCMask(b.Aux)
 14941  			if !(c&s390x.Unordered != 0) {
 14942  				break
 14943  			}
 14944  			b.resetWithControl(BlockS390XBRC, x)
 14945  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14946  			return true
 14947  		}
 14948  		// match: (BRC {c} (CMP x y) yes no)
 14949  		// result: (CGRJ {c&^s390x.Unordered} x y yes no)
 14950  		for b.Controls[0].Op == OpS390XCMP {
 14951  			v_0 := b.Controls[0]
 14952  			y := v_0.Args[1]
 14953  			x := v_0.Args[0]
 14954  			c := auxToS390xCCMask(b.Aux)
 14955  			b.resetWithControl2(BlockS390XCGRJ, x, y)
 14956  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14957  			return true
 14958  		}
 14959  		// match: (BRC {c} (CMPW x y) yes no)
 14960  		// result: (CRJ {c&^s390x.Unordered} x y yes no)
 14961  		for b.Controls[0].Op == OpS390XCMPW {
 14962  			v_0 := b.Controls[0]
 14963  			y := v_0.Args[1]
 14964  			x := v_0.Args[0]
 14965  			c := auxToS390xCCMask(b.Aux)
 14966  			b.resetWithControl2(BlockS390XCRJ, x, y)
 14967  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14968  			return true
 14969  		}
 14970  		// match: (BRC {c} (CMPU x y) yes no)
 14971  		// result: (CLGRJ {c&^s390x.Unordered} x y yes no)
 14972  		for b.Controls[0].Op == OpS390XCMPU {
 14973  			v_0 := b.Controls[0]
 14974  			y := v_0.Args[1]
 14975  			x := v_0.Args[0]
 14976  			c := auxToS390xCCMask(b.Aux)
 14977  			b.resetWithControl2(BlockS390XCLGRJ, x, y)
 14978  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14979  			return true
 14980  		}
 14981  		// match: (BRC {c} (CMPWU x y) yes no)
 14982  		// result: (CLRJ {c&^s390x.Unordered} x y yes no)
 14983  		for b.Controls[0].Op == OpS390XCMPWU {
 14984  			v_0 := b.Controls[0]
 14985  			y := v_0.Args[1]
 14986  			x := v_0.Args[0]
 14987  			c := auxToS390xCCMask(b.Aux)
 14988  			b.resetWithControl2(BlockS390XCLRJ, x, y)
 14989  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14990  			return true
 14991  		}
 14992  		// match: (BRC {c} (CMPconst x [y]) yes no)
 14993  		// cond: y == int32( int8(y))
 14994  		// result: (CGIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 14995  		for b.Controls[0].Op == OpS390XCMPconst {
 14996  			v_0 := b.Controls[0]
 14997  			y := auxIntToInt32(v_0.AuxInt)
 14998  			x := v_0.Args[0]
 14999  			c := auxToS390xCCMask(b.Aux)
 15000  			if !(y == int32(int8(y))) {
 15001  				break
 15002  			}
 15003  			b.resetWithControl(BlockS390XCGIJ, x)
 15004  			b.AuxInt = int8ToAuxInt(int8(y))
 15005  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15006  			return true
 15007  		}
 15008  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 15009  		// cond: y == int32( int8(y))
 15010  		// result: (CIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 15011  		for b.Controls[0].Op == OpS390XCMPWconst {
 15012  			v_0 := b.Controls[0]
 15013  			y := auxIntToInt32(v_0.AuxInt)
 15014  			x := v_0.Args[0]
 15015  			c := auxToS390xCCMask(b.Aux)
 15016  			if !(y == int32(int8(y))) {
 15017  				break
 15018  			}
 15019  			b.resetWithControl(BlockS390XCIJ, x)
 15020  			b.AuxInt = int8ToAuxInt(int8(y))
 15021  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15022  			return true
 15023  		}
 15024  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 15025  		// cond: y == int32(uint8(y))
 15026  		// result: (CLGIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 15027  		for b.Controls[0].Op == OpS390XCMPUconst {
 15028  			v_0 := b.Controls[0]
 15029  			y := auxIntToInt32(v_0.AuxInt)
 15030  			x := v_0.Args[0]
 15031  			c := auxToS390xCCMask(b.Aux)
 15032  			if !(y == int32(uint8(y))) {
 15033  				break
 15034  			}
 15035  			b.resetWithControl(BlockS390XCLGIJ, x)
 15036  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15037  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15038  			return true
 15039  		}
 15040  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 15041  		// cond: y == int32(uint8(y))
 15042  		// result: (CLIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 15043  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15044  			v_0 := b.Controls[0]
 15045  			y := auxIntToInt32(v_0.AuxInt)
 15046  			x := v_0.Args[0]
 15047  			c := auxToS390xCCMask(b.Aux)
 15048  			if !(y == int32(uint8(y))) {
 15049  				break
 15050  			}
 15051  			b.resetWithControl(BlockS390XCLIJ, x)
 15052  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15053  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15054  			return true
 15055  		}
 15056  		// match: (BRC {s390x.Less} (CMPconst x [ 128]) yes no)
 15057  		// result: (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
 15058  		for b.Controls[0].Op == OpS390XCMPconst {
 15059  			v_0 := b.Controls[0]
 15060  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15061  				break
 15062  			}
 15063  			x := v_0.Args[0]
 15064  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15065  				break
 15066  			}
 15067  			b.resetWithControl(BlockS390XCGIJ, x)
 15068  			b.AuxInt = int8ToAuxInt(127)
 15069  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15070  			return true
 15071  		}
 15072  		// match: (BRC {s390x.Less} (CMPWconst x [ 128]) yes no)
 15073  		// result: (CIJ {s390x.LessOrEqual} x [ 127] yes no)
 15074  		for b.Controls[0].Op == OpS390XCMPWconst {
 15075  			v_0 := b.Controls[0]
 15076  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15077  				break
 15078  			}
 15079  			x := v_0.Args[0]
 15080  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15081  				break
 15082  			}
 15083  			b.resetWithControl(BlockS390XCIJ, x)
 15084  			b.AuxInt = int8ToAuxInt(127)
 15085  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15086  			return true
 15087  		}
 15088  		// match: (BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no)
 15089  		// result: (CGIJ {s390x.Less} x [-128] yes no)
 15090  		for b.Controls[0].Op == OpS390XCMPconst {
 15091  			v_0 := b.Controls[0]
 15092  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15093  				break
 15094  			}
 15095  			x := v_0.Args[0]
 15096  			if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 15097  				break
 15098  			}
 15099  			b.resetWithControl(BlockS390XCGIJ, x)
 15100  			b.AuxInt = int8ToAuxInt(-128)
 15101  			b.Aux = s390xCCMaskToAux(s390x.Less)
 15102  			return true
 15103  		}
 15104  		// match: (BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no)
 15105  		// result: (CIJ {s390x.Less} x [-128] yes no)
 15106  		for b.Controls[0].Op == OpS390XCMPWconst {
 15107  			v_0 := b.Controls[0]
 15108  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15109  				break
 15110  			}
 15111  			x := v_0.Args[0]
 15112  			if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 15113  				break
 15114  			}
 15115  			b.resetWithControl(BlockS390XCIJ, x)
 15116  			b.AuxInt = int8ToAuxInt(-128)
 15117  			b.Aux = s390xCCMaskToAux(s390x.Less)
 15118  			return true
 15119  		}
 15120  		// match: (BRC {s390x.Greater} (CMPconst x [-129]) yes no)
 15121  		// result: (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
 15122  		for b.Controls[0].Op == OpS390XCMPconst {
 15123  			v_0 := b.Controls[0]
 15124  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15125  				break
 15126  			}
 15127  			x := v_0.Args[0]
 15128  			if auxToS390xCCMask(b.Aux) != s390x.Greater {
 15129  				break
 15130  			}
 15131  			b.resetWithControl(BlockS390XCGIJ, x)
 15132  			b.AuxInt = int8ToAuxInt(-128)
 15133  			b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
 15134  			return true
 15135  		}
 15136  		// match: (BRC {s390x.Greater} (CMPWconst x [-129]) yes no)
 15137  		// result: (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
 15138  		for b.Controls[0].Op == OpS390XCMPWconst {
 15139  			v_0 := b.Controls[0]
 15140  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15141  				break
 15142  			}
 15143  			x := v_0.Args[0]
 15144  			if auxToS390xCCMask(b.Aux) != s390x.Greater {
 15145  				break
 15146  			}
 15147  			b.resetWithControl(BlockS390XCIJ, x)
 15148  			b.AuxInt = int8ToAuxInt(-128)
 15149  			b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
 15150  			return true
 15151  		}
 15152  		// match: (BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no)
 15153  		// result: (CGIJ {s390x.Greater} x [ 127] yes no)
 15154  		for b.Controls[0].Op == OpS390XCMPconst {
 15155  			v_0 := b.Controls[0]
 15156  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15157  				break
 15158  			}
 15159  			x := v_0.Args[0]
 15160  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15161  				break
 15162  			}
 15163  			b.resetWithControl(BlockS390XCGIJ, x)
 15164  			b.AuxInt = int8ToAuxInt(127)
 15165  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15166  			return true
 15167  		}
 15168  		// match: (BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no)
 15169  		// result: (CIJ {s390x.Greater} x [ 127] yes no)
 15170  		for b.Controls[0].Op == OpS390XCMPWconst {
 15171  			v_0 := b.Controls[0]
 15172  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15173  				break
 15174  			}
 15175  			x := v_0.Args[0]
 15176  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15177  				break
 15178  			}
 15179  			b.resetWithControl(BlockS390XCIJ, x)
 15180  			b.AuxInt = int8ToAuxInt(127)
 15181  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15182  			return true
 15183  		}
 15184  		// match: (BRC {s390x.Less} (CMPWUconst x [256]) yes no)
 15185  		// result: (CLIJ {s390x.LessOrEqual} x [255] yes no)
 15186  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15187  			v_0 := b.Controls[0]
 15188  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15189  				break
 15190  			}
 15191  			x := v_0.Args[0]
 15192  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15193  				break
 15194  			}
 15195  			b.resetWithControl(BlockS390XCLIJ, x)
 15196  			b.AuxInt = uint8ToAuxInt(255)
 15197  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15198  			return true
 15199  		}
 15200  		// match: (BRC {s390x.Less} (CMPUconst x [256]) yes no)
 15201  		// result: (CLGIJ {s390x.LessOrEqual} x [255] yes no)
 15202  		for b.Controls[0].Op == OpS390XCMPUconst {
 15203  			v_0 := b.Controls[0]
 15204  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15205  				break
 15206  			}
 15207  			x := v_0.Args[0]
 15208  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15209  				break
 15210  			}
 15211  			b.resetWithControl(BlockS390XCLGIJ, x)
 15212  			b.AuxInt = uint8ToAuxInt(255)
 15213  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15214  			return true
 15215  		}
 15216  		// match: (BRC {s390x.GreaterOrEqual} (CMPWUconst x [256]) yes no)
 15217  		// result: (CLIJ {s390x.Greater} x [255] yes no)
 15218  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15219  			v_0 := b.Controls[0]
 15220  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15221  				break
 15222  			}
 15223  			x := v_0.Args[0]
 15224  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15225  				break
 15226  			}
 15227  			b.resetWithControl(BlockS390XCLIJ, x)
 15228  			b.AuxInt = uint8ToAuxInt(255)
 15229  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15230  			return true
 15231  		}
 15232  		// match: (BRC {s390x.GreaterOrEqual} (CMPUconst x [256]) yes no)
 15233  		// result: (CLGIJ {s390x.Greater} x [255] yes no)
 15234  		for b.Controls[0].Op == OpS390XCMPUconst {
 15235  			v_0 := b.Controls[0]
 15236  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15237  				break
 15238  			}
 15239  			x := v_0.Args[0]
 15240  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15241  				break
 15242  			}
 15243  			b.resetWithControl(BlockS390XCLGIJ, x)
 15244  			b.AuxInt = uint8ToAuxInt(255)
 15245  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15246  			return true
 15247  		}
 15248  		// match: (BRC {c} (CMPconst x [y]) yes no)
 15249  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15250  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 15251  		for b.Controls[0].Op == OpS390XCMPconst {
 15252  			v_0 := b.Controls[0]
 15253  			y := auxIntToInt32(v_0.AuxInt)
 15254  			x := v_0.Args[0]
 15255  			c := auxToS390xCCMask(b.Aux)
 15256  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15257  				break
 15258  			}
 15259  			b.resetWithControl(BlockS390XCLGIJ, x)
 15260  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15261  			b.Aux = s390xCCMaskToAux(c)
 15262  			return true
 15263  		}
 15264  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 15265  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15266  		// result: (CLIJ {c} x [uint8(y)] yes no)
 15267  		for b.Controls[0].Op == OpS390XCMPWconst {
 15268  			v_0 := b.Controls[0]
 15269  			y := auxIntToInt32(v_0.AuxInt)
 15270  			x := v_0.Args[0]
 15271  			c := auxToS390xCCMask(b.Aux)
 15272  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15273  				break
 15274  			}
 15275  			b.resetWithControl(BlockS390XCLIJ, x)
 15276  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15277  			b.Aux = s390xCCMaskToAux(c)
 15278  			return true
 15279  		}
 15280  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 15281  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15282  		// result: (CGIJ {c} x [ int8(y)] yes no)
 15283  		for b.Controls[0].Op == OpS390XCMPUconst {
 15284  			v_0 := b.Controls[0]
 15285  			y := auxIntToInt32(v_0.AuxInt)
 15286  			x := v_0.Args[0]
 15287  			c := auxToS390xCCMask(b.Aux)
 15288  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15289  				break
 15290  			}
 15291  			b.resetWithControl(BlockS390XCGIJ, x)
 15292  			b.AuxInt = int8ToAuxInt(int8(y))
 15293  			b.Aux = s390xCCMaskToAux(c)
 15294  			return true
 15295  		}
 15296  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 15297  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15298  		// result: (CIJ {c} x [ int8(y)] yes no)
 15299  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15300  			v_0 := b.Controls[0]
 15301  			y := auxIntToInt32(v_0.AuxInt)
 15302  			x := v_0.Args[0]
 15303  			c := auxToS390xCCMask(b.Aux)
 15304  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15305  				break
 15306  			}
 15307  			b.resetWithControl(BlockS390XCIJ, x)
 15308  			b.AuxInt = int8ToAuxInt(int8(y))
 15309  			b.Aux = s390xCCMaskToAux(c)
 15310  			return true
 15311  		}
 15312  		// match: (BRC {c} (InvertFlags cmp) yes no)
 15313  		// result: (BRC {c.ReverseComparison()} cmp yes no)
 15314  		for b.Controls[0].Op == OpS390XInvertFlags {
 15315  			v_0 := b.Controls[0]
 15316  			cmp := v_0.Args[0]
 15317  			c := auxToS390xCCMask(b.Aux)
 15318  			b.resetWithControl(BlockS390XBRC, cmp)
 15319  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 15320  			return true
 15321  		}
 15322  		// match: (BRC {c} (FlagEQ) yes no)
 15323  		// cond: c&s390x.Equal != 0
 15324  		// result: (First yes no)
 15325  		for b.Controls[0].Op == OpS390XFlagEQ {
 15326  			c := auxToS390xCCMask(b.Aux)
 15327  			if !(c&s390x.Equal != 0) {
 15328  				break
 15329  			}
 15330  			b.Reset(BlockFirst)
 15331  			return true
 15332  		}
 15333  		// match: (BRC {c} (FlagLT) yes no)
 15334  		// cond: c&s390x.Less != 0
 15335  		// result: (First yes no)
 15336  		for b.Controls[0].Op == OpS390XFlagLT {
 15337  			c := auxToS390xCCMask(b.Aux)
 15338  			if !(c&s390x.Less != 0) {
 15339  				break
 15340  			}
 15341  			b.Reset(BlockFirst)
 15342  			return true
 15343  		}
 15344  		// match: (BRC {c} (FlagGT) yes no)
 15345  		// cond: c&s390x.Greater != 0
 15346  		// result: (First yes no)
 15347  		for b.Controls[0].Op == OpS390XFlagGT {
 15348  			c := auxToS390xCCMask(b.Aux)
 15349  			if !(c&s390x.Greater != 0) {
 15350  				break
 15351  			}
 15352  			b.Reset(BlockFirst)
 15353  			return true
 15354  		}
 15355  		// match: (BRC {c} (FlagOV) yes no)
 15356  		// cond: c&s390x.Unordered != 0
 15357  		// result: (First yes no)
 15358  		for b.Controls[0].Op == OpS390XFlagOV {
 15359  			c := auxToS390xCCMask(b.Aux)
 15360  			if !(c&s390x.Unordered != 0) {
 15361  				break
 15362  			}
 15363  			b.Reset(BlockFirst)
 15364  			return true
 15365  		}
 15366  		// match: (BRC {c} (FlagEQ) yes no)
 15367  		// cond: c&s390x.Equal == 0
 15368  		// result: (First no yes)
 15369  		for b.Controls[0].Op == OpS390XFlagEQ {
 15370  			c := auxToS390xCCMask(b.Aux)
 15371  			if !(c&s390x.Equal == 0) {
 15372  				break
 15373  			}
 15374  			b.Reset(BlockFirst)
 15375  			b.swapSuccessors()
 15376  			return true
 15377  		}
 15378  		// match: (BRC {c} (FlagLT) yes no)
 15379  		// cond: c&s390x.Less == 0
 15380  		// result: (First no yes)
 15381  		for b.Controls[0].Op == OpS390XFlagLT {
 15382  			c := auxToS390xCCMask(b.Aux)
 15383  			if !(c&s390x.Less == 0) {
 15384  				break
 15385  			}
 15386  			b.Reset(BlockFirst)
 15387  			b.swapSuccessors()
 15388  			return true
 15389  		}
 15390  		// match: (BRC {c} (FlagGT) yes no)
 15391  		// cond: c&s390x.Greater == 0
 15392  		// result: (First no yes)
 15393  		for b.Controls[0].Op == OpS390XFlagGT {
 15394  			c := auxToS390xCCMask(b.Aux)
 15395  			if !(c&s390x.Greater == 0) {
 15396  				break
 15397  			}
 15398  			b.Reset(BlockFirst)
 15399  			b.swapSuccessors()
 15400  			return true
 15401  		}
 15402  		// match: (BRC {c} (FlagOV) yes no)
 15403  		// cond: c&s390x.Unordered == 0
 15404  		// result: (First no yes)
 15405  		for b.Controls[0].Op == OpS390XFlagOV {
 15406  			c := auxToS390xCCMask(b.Aux)
 15407  			if !(c&s390x.Unordered == 0) {
 15408  				break
 15409  			}
 15410  			b.Reset(BlockFirst)
 15411  			b.swapSuccessors()
 15412  			return true
 15413  		}
 15414  	case BlockS390XCGIJ:
 15415  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15416  		// cond: c&s390x.Equal != 0 && int64(x) == int64(y)
 15417  		// result: (First yes no)
 15418  		for b.Controls[0].Op == OpS390XMOVDconst {
 15419  			v_0 := b.Controls[0]
 15420  			x := auxIntToInt64(v_0.AuxInt)
 15421  			y := auxIntToInt8(b.AuxInt)
 15422  			c := auxToS390xCCMask(b.Aux)
 15423  			if !(c&s390x.Equal != 0 && int64(x) == int64(y)) {
 15424  				break
 15425  			}
 15426  			b.Reset(BlockFirst)
 15427  			return true
 15428  		}
 15429  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15430  		// cond: c&s390x.Less != 0 && int64(x) < int64(y)
 15431  		// result: (First yes no)
 15432  		for b.Controls[0].Op == OpS390XMOVDconst {
 15433  			v_0 := b.Controls[0]
 15434  			x := auxIntToInt64(v_0.AuxInt)
 15435  			y := auxIntToInt8(b.AuxInt)
 15436  			c := auxToS390xCCMask(b.Aux)
 15437  			if !(c&s390x.Less != 0 && int64(x) < int64(y)) {
 15438  				break
 15439  			}
 15440  			b.Reset(BlockFirst)
 15441  			return true
 15442  		}
 15443  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15444  		// cond: c&s390x.Greater != 0 && int64(x) > int64(y)
 15445  		// result: (First yes no)
 15446  		for b.Controls[0].Op == OpS390XMOVDconst {
 15447  			v_0 := b.Controls[0]
 15448  			x := auxIntToInt64(v_0.AuxInt)
 15449  			y := auxIntToInt8(b.AuxInt)
 15450  			c := auxToS390xCCMask(b.Aux)
 15451  			if !(c&s390x.Greater != 0 && int64(x) > int64(y)) {
 15452  				break
 15453  			}
 15454  			b.Reset(BlockFirst)
 15455  			return true
 15456  		}
 15457  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15458  		// cond: c&s390x.Equal == 0 && int64(x) == int64(y)
 15459  		// result: (First no yes)
 15460  		for b.Controls[0].Op == OpS390XMOVDconst {
 15461  			v_0 := b.Controls[0]
 15462  			x := auxIntToInt64(v_0.AuxInt)
 15463  			y := auxIntToInt8(b.AuxInt)
 15464  			c := auxToS390xCCMask(b.Aux)
 15465  			if !(c&s390x.Equal == 0 && int64(x) == int64(y)) {
 15466  				break
 15467  			}
 15468  			b.Reset(BlockFirst)
 15469  			b.swapSuccessors()
 15470  			return true
 15471  		}
 15472  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15473  		// cond: c&s390x.Less == 0 && int64(x) < int64(y)
 15474  		// result: (First no yes)
 15475  		for b.Controls[0].Op == OpS390XMOVDconst {
 15476  			v_0 := b.Controls[0]
 15477  			x := auxIntToInt64(v_0.AuxInt)
 15478  			y := auxIntToInt8(b.AuxInt)
 15479  			c := auxToS390xCCMask(b.Aux)
 15480  			if !(c&s390x.Less == 0 && int64(x) < int64(y)) {
 15481  				break
 15482  			}
 15483  			b.Reset(BlockFirst)
 15484  			b.swapSuccessors()
 15485  			return true
 15486  		}
 15487  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15488  		// cond: c&s390x.Greater == 0 && int64(x) > int64(y)
 15489  		// result: (First no yes)
 15490  		for b.Controls[0].Op == OpS390XMOVDconst {
 15491  			v_0 := b.Controls[0]
 15492  			x := auxIntToInt64(v_0.AuxInt)
 15493  			y := auxIntToInt8(b.AuxInt)
 15494  			c := auxToS390xCCMask(b.Aux)
 15495  			if !(c&s390x.Greater == 0 && int64(x) > int64(y)) {
 15496  				break
 15497  			}
 15498  			b.Reset(BlockFirst)
 15499  			b.swapSuccessors()
 15500  			return true
 15501  		}
 15502  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15503  		// result: (BRC {s390x.NoCarry} carry)
 15504  		for b.Controls[0].Op == OpSelect0 {
 15505  			v_0 := b.Controls[0]
 15506  			v_0_0 := v_0.Args[0]
 15507  			if v_0_0.Op != OpS390XADDE {
 15508  				break
 15509  			}
 15510  			carry := v_0_0.Args[2]
 15511  			v_0_0_0 := v_0_0.Args[0]
 15512  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15513  				break
 15514  			}
 15515  			v_0_0_1 := v_0_0.Args[1]
 15516  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15517  				break
 15518  			}
 15519  			b.resetWithControl(BlockS390XBRC, carry)
 15520  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 15521  			return true
 15522  		}
 15523  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 15524  		// result: (BRC {s390x.Carry} carry)
 15525  		for b.Controls[0].Op == OpSelect0 {
 15526  			v_0 := b.Controls[0]
 15527  			v_0_0 := v_0.Args[0]
 15528  			if v_0_0.Op != OpS390XADDE {
 15529  				break
 15530  			}
 15531  			carry := v_0_0.Args[2]
 15532  			v_0_0_0 := v_0_0.Args[0]
 15533  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15534  				break
 15535  			}
 15536  			v_0_0_1 := v_0_0.Args[1]
 15537  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15538  				break
 15539  			}
 15540  			b.resetWithControl(BlockS390XBRC, carry)
 15541  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 15542  			return true
 15543  		}
 15544  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15545  		// result: (BRC {s390x.Carry} carry)
 15546  		for b.Controls[0].Op == OpSelect0 {
 15547  			v_0 := b.Controls[0]
 15548  			v_0_0 := v_0.Args[0]
 15549  			if v_0_0.Op != OpS390XADDE {
 15550  				break
 15551  			}
 15552  			carry := v_0_0.Args[2]
 15553  			v_0_0_0 := v_0_0.Args[0]
 15554  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15555  				break
 15556  			}
 15557  			v_0_0_1 := v_0_0.Args[1]
 15558  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15559  				break
 15560  			}
 15561  			b.resetWithControl(BlockS390XBRC, carry)
 15562  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 15563  			return true
 15564  		}
 15565  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 15566  		// result: (BRC {s390x.NoCarry} carry)
 15567  		for b.Controls[0].Op == OpSelect0 {
 15568  			v_0 := b.Controls[0]
 15569  			v_0_0 := v_0.Args[0]
 15570  			if v_0_0.Op != OpS390XADDE {
 15571  				break
 15572  			}
 15573  			carry := v_0_0.Args[2]
 15574  			v_0_0_0 := v_0_0.Args[0]
 15575  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15576  				break
 15577  			}
 15578  			v_0_0_1 := v_0_0.Args[1]
 15579  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15580  				break
 15581  			}
 15582  			b.resetWithControl(BlockS390XBRC, carry)
 15583  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 15584  			return true
 15585  		}
 15586  		// match: (CGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15587  		// result: (BRC {s390x.Carry} carry)
 15588  		for b.Controls[0].Op == OpSelect0 {
 15589  			v_0 := b.Controls[0]
 15590  			v_0_0 := v_0.Args[0]
 15591  			if v_0_0.Op != OpS390XADDE {
 15592  				break
 15593  			}
 15594  			carry := v_0_0.Args[2]
 15595  			v_0_0_0 := v_0_0.Args[0]
 15596  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15597  				break
 15598  			}
 15599  			v_0_0_1 := v_0_0.Args[1]
 15600  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 15601  				break
 15602  			}
 15603  			b.resetWithControl(BlockS390XBRC, carry)
 15604  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 15605  			return true
 15606  		}
 15607  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15608  		// result: (BRC {s390x.NoBorrow} borrow)
 15609  		for b.Controls[0].Op == OpS390XNEG {
 15610  			v_0 := b.Controls[0]
 15611  			v_0_0 := v_0.Args[0]
 15612  			if v_0_0.Op != OpSelect0 {
 15613  				break
 15614  			}
 15615  			v_0_0_0 := v_0_0.Args[0]
 15616  			if v_0_0_0.Op != OpS390XSUBE {
 15617  				break
 15618  			}
 15619  			borrow := v_0_0_0.Args[2]
 15620  			v_0_0_0_0 := v_0_0_0.Args[0]
 15621  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15622  				break
 15623  			}
 15624  			v_0_0_0_1 := v_0_0_0.Args[1]
 15625  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15626  				break
 15627  			}
 15628  			b.resetWithControl(BlockS390XBRC, borrow)
 15629  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 15630  			return true
 15631  		}
 15632  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 15633  		// result: (BRC {s390x.Borrow} borrow)
 15634  		for b.Controls[0].Op == OpS390XNEG {
 15635  			v_0 := b.Controls[0]
 15636  			v_0_0 := v_0.Args[0]
 15637  			if v_0_0.Op != OpSelect0 {
 15638  				break
 15639  			}
 15640  			v_0_0_0 := v_0_0.Args[0]
 15641  			if v_0_0_0.Op != OpS390XSUBE {
 15642  				break
 15643  			}
 15644  			borrow := v_0_0_0.Args[2]
 15645  			v_0_0_0_0 := v_0_0_0.Args[0]
 15646  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15647  				break
 15648  			}
 15649  			v_0_0_0_1 := v_0_0_0.Args[1]
 15650  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15651  				break
 15652  			}
 15653  			b.resetWithControl(BlockS390XBRC, borrow)
 15654  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 15655  			return true
 15656  		}
 15657  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15658  		// result: (BRC {s390x.Borrow} borrow)
 15659  		for b.Controls[0].Op == OpS390XNEG {
 15660  			v_0 := b.Controls[0]
 15661  			v_0_0 := v_0.Args[0]
 15662  			if v_0_0.Op != OpSelect0 {
 15663  				break
 15664  			}
 15665  			v_0_0_0 := v_0_0.Args[0]
 15666  			if v_0_0_0.Op != OpS390XSUBE {
 15667  				break
 15668  			}
 15669  			borrow := v_0_0_0.Args[2]
 15670  			v_0_0_0_0 := v_0_0_0.Args[0]
 15671  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15672  				break
 15673  			}
 15674  			v_0_0_0_1 := v_0_0_0.Args[1]
 15675  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15676  				break
 15677  			}
 15678  			b.resetWithControl(BlockS390XBRC, borrow)
 15679  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 15680  			return true
 15681  		}
 15682  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 15683  		// result: (BRC {s390x.NoBorrow} borrow)
 15684  		for b.Controls[0].Op == OpS390XNEG {
 15685  			v_0 := b.Controls[0]
 15686  			v_0_0 := v_0.Args[0]
 15687  			if v_0_0.Op != OpSelect0 {
 15688  				break
 15689  			}
 15690  			v_0_0_0 := v_0_0.Args[0]
 15691  			if v_0_0_0.Op != OpS390XSUBE {
 15692  				break
 15693  			}
 15694  			borrow := v_0_0_0.Args[2]
 15695  			v_0_0_0_0 := v_0_0_0.Args[0]
 15696  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15697  				break
 15698  			}
 15699  			v_0_0_0_1 := v_0_0_0.Args[1]
 15700  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15701  				break
 15702  			}
 15703  			b.resetWithControl(BlockS390XBRC, borrow)
 15704  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 15705  			return true
 15706  		}
 15707  		// match: (CGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15708  		// result: (BRC {s390x.Borrow} borrow)
 15709  		for b.Controls[0].Op == OpS390XNEG {
 15710  			v_0 := b.Controls[0]
 15711  			v_0_0 := v_0.Args[0]
 15712  			if v_0_0.Op != OpSelect0 {
 15713  				break
 15714  			}
 15715  			v_0_0_0 := v_0_0.Args[0]
 15716  			if v_0_0_0.Op != OpS390XSUBE {
 15717  				break
 15718  			}
 15719  			borrow := v_0_0_0.Args[2]
 15720  			v_0_0_0_0 := v_0_0_0.Args[0]
 15721  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15722  				break
 15723  			}
 15724  			v_0_0_0_1 := v_0_0_0.Args[1]
 15725  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 15726  				break
 15727  			}
 15728  			b.resetWithControl(BlockS390XBRC, borrow)
 15729  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 15730  			return true
 15731  		}
 15732  	case BlockS390XCGRJ:
 15733  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 15734  		// cond: is8Bit(y)
 15735  		// result: (CGIJ {c} x [ int8(y)] yes no)
 15736  		for b.Controls[1].Op == OpS390XMOVDconst {
 15737  			x := b.Controls[0]
 15738  			v_1 := b.Controls[1]
 15739  			y := auxIntToInt64(v_1.AuxInt)
 15740  			c := auxToS390xCCMask(b.Aux)
 15741  			if !(is8Bit(y)) {
 15742  				break
 15743  			}
 15744  			b.resetWithControl(BlockS390XCGIJ, x)
 15745  			b.AuxInt = int8ToAuxInt(int8(y))
 15746  			b.Aux = s390xCCMaskToAux(c)
 15747  			return true
 15748  		}
 15749  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 15750  		// cond: is8Bit(x)
 15751  		// result: (CGIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 15752  		for b.Controls[0].Op == OpS390XMOVDconst {
 15753  			v_0 := b.Controls[0]
 15754  			x := auxIntToInt64(v_0.AuxInt)
 15755  			y := b.Controls[1]
 15756  			c := auxToS390xCCMask(b.Aux)
 15757  			if !(is8Bit(x)) {
 15758  				break
 15759  			}
 15760  			b.resetWithControl(BlockS390XCGIJ, y)
 15761  			b.AuxInt = int8ToAuxInt(int8(x))
 15762  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 15763  			return true
 15764  		}
 15765  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 15766  		// cond: !is8Bit(y) && is32Bit(y)
 15767  		// result: (BRC {c} (CMPconst x [int32(y)]) yes no)
 15768  		for b.Controls[1].Op == OpS390XMOVDconst {
 15769  			x := b.Controls[0]
 15770  			v_1 := b.Controls[1]
 15771  			y := auxIntToInt64(v_1.AuxInt)
 15772  			c := auxToS390xCCMask(b.Aux)
 15773  			if !(!is8Bit(y) && is32Bit(y)) {
 15774  				break
 15775  			}
 15776  			v0 := b.NewValue0(x.Pos, OpS390XCMPconst, types.TypeFlags)
 15777  			v0.AuxInt = int32ToAuxInt(int32(y))
 15778  			v0.AddArg(x)
 15779  			b.resetWithControl(BlockS390XBRC, v0)
 15780  			b.Aux = s390xCCMaskToAux(c)
 15781  			return true
 15782  		}
 15783  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 15784  		// cond: !is8Bit(x) && is32Bit(x)
 15785  		// result: (BRC {c.ReverseComparison()} (CMPconst y [int32(x)]) yes no)
 15786  		for b.Controls[0].Op == OpS390XMOVDconst {
 15787  			v_0 := b.Controls[0]
 15788  			x := auxIntToInt64(v_0.AuxInt)
 15789  			y := b.Controls[1]
 15790  			c := auxToS390xCCMask(b.Aux)
 15791  			if !(!is8Bit(x) && is32Bit(x)) {
 15792  				break
 15793  			}
 15794  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPconst, types.TypeFlags)
 15795  			v0.AuxInt = int32ToAuxInt(int32(x))
 15796  			v0.AddArg(y)
 15797  			b.resetWithControl(BlockS390XBRC, v0)
 15798  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 15799  			return true
 15800  		}
 15801  		// match: (CGRJ {c} x y yes no)
 15802  		// cond: x == y && c&s390x.Equal != 0
 15803  		// result: (First yes no)
 15804  		for {
 15805  			x := b.Controls[0]
 15806  			y := b.Controls[1]
 15807  			c := auxToS390xCCMask(b.Aux)
 15808  			if !(x == y && c&s390x.Equal != 0) {
 15809  				break
 15810  			}
 15811  			b.Reset(BlockFirst)
 15812  			return true
 15813  		}
 15814  		// match: (CGRJ {c} x y yes no)
 15815  		// cond: x == y && c&s390x.Equal == 0
 15816  		// result: (First no yes)
 15817  		for {
 15818  			x := b.Controls[0]
 15819  			y := b.Controls[1]
 15820  			c := auxToS390xCCMask(b.Aux)
 15821  			if !(x == y && c&s390x.Equal == 0) {
 15822  				break
 15823  			}
 15824  			b.Reset(BlockFirst)
 15825  			b.swapSuccessors()
 15826  			return true
 15827  		}
 15828  	case BlockS390XCIJ:
 15829  		// match: (CIJ {c} (MOVWreg x) [y] yes no)
 15830  		// result: (CIJ {c} x [y] yes no)
 15831  		for b.Controls[0].Op == OpS390XMOVWreg {
 15832  			v_0 := b.Controls[0]
 15833  			x := v_0.Args[0]
 15834  			y := auxIntToInt8(b.AuxInt)
 15835  			c := auxToS390xCCMask(b.Aux)
 15836  			b.resetWithControl(BlockS390XCIJ, x)
 15837  			b.AuxInt = int8ToAuxInt(y)
 15838  			b.Aux = s390xCCMaskToAux(c)
 15839  			return true
 15840  		}
 15841  		// match: (CIJ {c} (MOVWZreg x) [y] yes no)
 15842  		// result: (CIJ {c} x [y] yes no)
 15843  		for b.Controls[0].Op == OpS390XMOVWZreg {
 15844  			v_0 := b.Controls[0]
 15845  			x := v_0.Args[0]
 15846  			y := auxIntToInt8(b.AuxInt)
 15847  			c := auxToS390xCCMask(b.Aux)
 15848  			b.resetWithControl(BlockS390XCIJ, x)
 15849  			b.AuxInt = int8ToAuxInt(y)
 15850  			b.Aux = s390xCCMaskToAux(c)
 15851  			return true
 15852  		}
 15853  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15854  		// cond: c&s390x.Equal != 0 && int32(x) == int32(y)
 15855  		// result: (First yes no)
 15856  		for b.Controls[0].Op == OpS390XMOVDconst {
 15857  			v_0 := b.Controls[0]
 15858  			x := auxIntToInt64(v_0.AuxInt)
 15859  			y := auxIntToInt8(b.AuxInt)
 15860  			c := auxToS390xCCMask(b.Aux)
 15861  			if !(c&s390x.Equal != 0 && int32(x) == int32(y)) {
 15862  				break
 15863  			}
 15864  			b.Reset(BlockFirst)
 15865  			return true
 15866  		}
 15867  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15868  		// cond: c&s390x.Less != 0 && int32(x) < int32(y)
 15869  		// result: (First yes no)
 15870  		for b.Controls[0].Op == OpS390XMOVDconst {
 15871  			v_0 := b.Controls[0]
 15872  			x := auxIntToInt64(v_0.AuxInt)
 15873  			y := auxIntToInt8(b.AuxInt)
 15874  			c := auxToS390xCCMask(b.Aux)
 15875  			if !(c&s390x.Less != 0 && int32(x) < int32(y)) {
 15876  				break
 15877  			}
 15878  			b.Reset(BlockFirst)
 15879  			return true
 15880  		}
 15881  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15882  		// cond: c&s390x.Greater != 0 && int32(x) > int32(y)
 15883  		// result: (First yes no)
 15884  		for b.Controls[0].Op == OpS390XMOVDconst {
 15885  			v_0 := b.Controls[0]
 15886  			x := auxIntToInt64(v_0.AuxInt)
 15887  			y := auxIntToInt8(b.AuxInt)
 15888  			c := auxToS390xCCMask(b.Aux)
 15889  			if !(c&s390x.Greater != 0 && int32(x) > int32(y)) {
 15890  				break
 15891  			}
 15892  			b.Reset(BlockFirst)
 15893  			return true
 15894  		}
 15895  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15896  		// cond: c&s390x.Equal == 0 && int32(x) == int32(y)
 15897  		// result: (First no yes)
 15898  		for b.Controls[0].Op == OpS390XMOVDconst {
 15899  			v_0 := b.Controls[0]
 15900  			x := auxIntToInt64(v_0.AuxInt)
 15901  			y := auxIntToInt8(b.AuxInt)
 15902  			c := auxToS390xCCMask(b.Aux)
 15903  			if !(c&s390x.Equal == 0 && int32(x) == int32(y)) {
 15904  				break
 15905  			}
 15906  			b.Reset(BlockFirst)
 15907  			b.swapSuccessors()
 15908  			return true
 15909  		}
 15910  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15911  		// cond: c&s390x.Less == 0 && int32(x) < int32(y)
 15912  		// result: (First no yes)
 15913  		for b.Controls[0].Op == OpS390XMOVDconst {
 15914  			v_0 := b.Controls[0]
 15915  			x := auxIntToInt64(v_0.AuxInt)
 15916  			y := auxIntToInt8(b.AuxInt)
 15917  			c := auxToS390xCCMask(b.Aux)
 15918  			if !(c&s390x.Less == 0 && int32(x) < int32(y)) {
 15919  				break
 15920  			}
 15921  			b.Reset(BlockFirst)
 15922  			b.swapSuccessors()
 15923  			return true
 15924  		}
 15925  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15926  		// cond: c&s390x.Greater == 0 && int32(x) > int32(y)
 15927  		// result: (First no yes)
 15928  		for b.Controls[0].Op == OpS390XMOVDconst {
 15929  			v_0 := b.Controls[0]
 15930  			x := auxIntToInt64(v_0.AuxInt)
 15931  			y := auxIntToInt8(b.AuxInt)
 15932  			c := auxToS390xCCMask(b.Aux)
 15933  			if !(c&s390x.Greater == 0 && int32(x) > int32(y)) {
 15934  				break
 15935  			}
 15936  			b.Reset(BlockFirst)
 15937  			b.swapSuccessors()
 15938  			return true
 15939  		}
 15940  	case BlockS390XCLGIJ:
 15941  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 15942  		// cond: c&s390x.Equal != 0 && uint64(x) == uint64(y)
 15943  		// result: (First yes no)
 15944  		for b.Controls[0].Op == OpS390XMOVDconst {
 15945  			v_0 := b.Controls[0]
 15946  			x := auxIntToInt64(v_0.AuxInt)
 15947  			y := auxIntToUint8(b.AuxInt)
 15948  			c := auxToS390xCCMask(b.Aux)
 15949  			if !(c&s390x.Equal != 0 && uint64(x) == uint64(y)) {
 15950  				break
 15951  			}
 15952  			b.Reset(BlockFirst)
 15953  			return true
 15954  		}
 15955  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 15956  		// cond: c&s390x.Less != 0 && uint64(x) < uint64(y)
 15957  		// result: (First yes no)
 15958  		for b.Controls[0].Op == OpS390XMOVDconst {
 15959  			v_0 := b.Controls[0]
 15960  			x := auxIntToInt64(v_0.AuxInt)
 15961  			y := auxIntToUint8(b.AuxInt)
 15962  			c := auxToS390xCCMask(b.Aux)
 15963  			if !(c&s390x.Less != 0 && uint64(x) < uint64(y)) {
 15964  				break
 15965  			}
 15966  			b.Reset(BlockFirst)
 15967  			return true
 15968  		}
 15969  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 15970  		// cond: c&s390x.Greater != 0 && uint64(x) > uint64(y)
 15971  		// result: (First yes no)
 15972  		for b.Controls[0].Op == OpS390XMOVDconst {
 15973  			v_0 := b.Controls[0]
 15974  			x := auxIntToInt64(v_0.AuxInt)
 15975  			y := auxIntToUint8(b.AuxInt)
 15976  			c := auxToS390xCCMask(b.Aux)
 15977  			if !(c&s390x.Greater != 0 && uint64(x) > uint64(y)) {
 15978  				break
 15979  			}
 15980  			b.Reset(BlockFirst)
 15981  			return true
 15982  		}
 15983  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 15984  		// cond: c&s390x.Equal == 0 && uint64(x) == uint64(y)
 15985  		// result: (First no yes)
 15986  		for b.Controls[0].Op == OpS390XMOVDconst {
 15987  			v_0 := b.Controls[0]
 15988  			x := auxIntToInt64(v_0.AuxInt)
 15989  			y := auxIntToUint8(b.AuxInt)
 15990  			c := auxToS390xCCMask(b.Aux)
 15991  			if !(c&s390x.Equal == 0 && uint64(x) == uint64(y)) {
 15992  				break
 15993  			}
 15994  			b.Reset(BlockFirst)
 15995  			b.swapSuccessors()
 15996  			return true
 15997  		}
 15998  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 15999  		// cond: c&s390x.Less == 0 && uint64(x) < uint64(y)
 16000  		// result: (First no yes)
 16001  		for b.Controls[0].Op == OpS390XMOVDconst {
 16002  			v_0 := b.Controls[0]
 16003  			x := auxIntToInt64(v_0.AuxInt)
 16004  			y := auxIntToUint8(b.AuxInt)
 16005  			c := auxToS390xCCMask(b.Aux)
 16006  			if !(c&s390x.Less == 0 && uint64(x) < uint64(y)) {
 16007  				break
 16008  			}
 16009  			b.Reset(BlockFirst)
 16010  			b.swapSuccessors()
 16011  			return true
 16012  		}
 16013  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16014  		// cond: c&s390x.Greater == 0 && uint64(x) > uint64(y)
 16015  		// result: (First no yes)
 16016  		for b.Controls[0].Op == OpS390XMOVDconst {
 16017  			v_0 := b.Controls[0]
 16018  			x := auxIntToInt64(v_0.AuxInt)
 16019  			y := auxIntToUint8(b.AuxInt)
 16020  			c := auxToS390xCCMask(b.Aux)
 16021  			if !(c&s390x.Greater == 0 && uint64(x) > uint64(y)) {
 16022  				break
 16023  			}
 16024  			b.Reset(BlockFirst)
 16025  			b.swapSuccessors()
 16026  			return true
 16027  		}
 16028  		// match: (CLGIJ {s390x.GreaterOrEqual} _ [0] yes no)
 16029  		// result: (First yes no)
 16030  		for {
 16031  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16032  				break
 16033  			}
 16034  			b.Reset(BlockFirst)
 16035  			return true
 16036  		}
 16037  		// match: (CLGIJ {s390x.Less} _ [0] yes no)
 16038  		// result: (First no yes)
 16039  		for {
 16040  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
 16041  				break
 16042  			}
 16043  			b.Reset(BlockFirst)
 16044  			b.swapSuccessors()
 16045  			return true
 16046  		}
 16047  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16048  		// result: (BRC {s390x.NoCarry} carry)
 16049  		for b.Controls[0].Op == OpSelect0 {
 16050  			v_0 := b.Controls[0]
 16051  			v_0_0 := v_0.Args[0]
 16052  			if v_0_0.Op != OpS390XADDE {
 16053  				break
 16054  			}
 16055  			carry := v_0_0.Args[2]
 16056  			v_0_0_0 := v_0_0.Args[0]
 16057  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16058  				break
 16059  			}
 16060  			v_0_0_1 := v_0_0.Args[1]
 16061  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16062  				break
 16063  			}
 16064  			b.resetWithControl(BlockS390XBRC, carry)
 16065  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 16066  			return true
 16067  		}
 16068  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16069  		// result: (BRC {s390x.Carry} carry)
 16070  		for b.Controls[0].Op == OpSelect0 {
 16071  			v_0 := b.Controls[0]
 16072  			v_0_0 := v_0.Args[0]
 16073  			if v_0_0.Op != OpS390XADDE {
 16074  				break
 16075  			}
 16076  			carry := v_0_0.Args[2]
 16077  			v_0_0_0 := v_0_0.Args[0]
 16078  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16079  				break
 16080  			}
 16081  			v_0_0_1 := v_0_0.Args[1]
 16082  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16083  				break
 16084  			}
 16085  			b.resetWithControl(BlockS390XBRC, carry)
 16086  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16087  			return true
 16088  		}
 16089  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16090  		// result: (BRC {s390x.Carry} carry)
 16091  		for b.Controls[0].Op == OpSelect0 {
 16092  			v_0 := b.Controls[0]
 16093  			v_0_0 := v_0.Args[0]
 16094  			if v_0_0.Op != OpS390XADDE {
 16095  				break
 16096  			}
 16097  			carry := v_0_0.Args[2]
 16098  			v_0_0_0 := v_0_0.Args[0]
 16099  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16100  				break
 16101  			}
 16102  			v_0_0_1 := v_0_0.Args[1]
 16103  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16104  				break
 16105  			}
 16106  			b.resetWithControl(BlockS390XBRC, carry)
 16107  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16108  			return true
 16109  		}
 16110  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16111  		// result: (BRC {s390x.NoCarry} carry)
 16112  		for b.Controls[0].Op == OpSelect0 {
 16113  			v_0 := b.Controls[0]
 16114  			v_0_0 := v_0.Args[0]
 16115  			if v_0_0.Op != OpS390XADDE {
 16116  				break
 16117  			}
 16118  			carry := v_0_0.Args[2]
 16119  			v_0_0_0 := v_0_0.Args[0]
 16120  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16121  				break
 16122  			}
 16123  			v_0_0_1 := v_0_0.Args[1]
 16124  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16125  				break
 16126  			}
 16127  			b.resetWithControl(BlockS390XBRC, carry)
 16128  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 16129  			return true
 16130  		}
 16131  		// match: (CLGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16132  		// result: (BRC {s390x.Carry} carry)
 16133  		for b.Controls[0].Op == OpSelect0 {
 16134  			v_0 := b.Controls[0]
 16135  			v_0_0 := v_0.Args[0]
 16136  			if v_0_0.Op != OpS390XADDE {
 16137  				break
 16138  			}
 16139  			carry := v_0_0.Args[2]
 16140  			v_0_0_0 := v_0_0.Args[0]
 16141  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16142  				break
 16143  			}
 16144  			v_0_0_1 := v_0_0.Args[1]
 16145  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 16146  				break
 16147  			}
 16148  			b.resetWithControl(BlockS390XBRC, carry)
 16149  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16150  			return true
 16151  		}
 16152  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16153  		// result: (BRC {s390x.NoBorrow} borrow)
 16154  		for b.Controls[0].Op == OpS390XNEG {
 16155  			v_0 := b.Controls[0]
 16156  			v_0_0 := v_0.Args[0]
 16157  			if v_0_0.Op != OpSelect0 {
 16158  				break
 16159  			}
 16160  			v_0_0_0 := v_0_0.Args[0]
 16161  			if v_0_0_0.Op != OpS390XSUBE {
 16162  				break
 16163  			}
 16164  			borrow := v_0_0_0.Args[2]
 16165  			v_0_0_0_0 := v_0_0_0.Args[0]
 16166  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16167  				break
 16168  			}
 16169  			v_0_0_0_1 := v_0_0_0.Args[1]
 16170  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16171  				break
 16172  			}
 16173  			b.resetWithControl(BlockS390XBRC, borrow)
 16174  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 16175  			return true
 16176  		}
 16177  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16178  		// result: (BRC {s390x.Borrow} borrow)
 16179  		for b.Controls[0].Op == OpS390XNEG {
 16180  			v_0 := b.Controls[0]
 16181  			v_0_0 := v_0.Args[0]
 16182  			if v_0_0.Op != OpSelect0 {
 16183  				break
 16184  			}
 16185  			v_0_0_0 := v_0_0.Args[0]
 16186  			if v_0_0_0.Op != OpS390XSUBE {
 16187  				break
 16188  			}
 16189  			borrow := v_0_0_0.Args[2]
 16190  			v_0_0_0_0 := v_0_0_0.Args[0]
 16191  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16192  				break
 16193  			}
 16194  			v_0_0_0_1 := v_0_0_0.Args[1]
 16195  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16196  				break
 16197  			}
 16198  			b.resetWithControl(BlockS390XBRC, borrow)
 16199  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16200  			return true
 16201  		}
 16202  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16203  		// result: (BRC {s390x.Borrow} borrow)
 16204  		for b.Controls[0].Op == OpS390XNEG {
 16205  			v_0 := b.Controls[0]
 16206  			v_0_0 := v_0.Args[0]
 16207  			if v_0_0.Op != OpSelect0 {
 16208  				break
 16209  			}
 16210  			v_0_0_0 := v_0_0.Args[0]
 16211  			if v_0_0_0.Op != OpS390XSUBE {
 16212  				break
 16213  			}
 16214  			borrow := v_0_0_0.Args[2]
 16215  			v_0_0_0_0 := v_0_0_0.Args[0]
 16216  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16217  				break
 16218  			}
 16219  			v_0_0_0_1 := v_0_0_0.Args[1]
 16220  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16221  				break
 16222  			}
 16223  			b.resetWithControl(BlockS390XBRC, borrow)
 16224  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16225  			return true
 16226  		}
 16227  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16228  		// result: (BRC {s390x.NoBorrow} borrow)
 16229  		for b.Controls[0].Op == OpS390XNEG {
 16230  			v_0 := b.Controls[0]
 16231  			v_0_0 := v_0.Args[0]
 16232  			if v_0_0.Op != OpSelect0 {
 16233  				break
 16234  			}
 16235  			v_0_0_0 := v_0_0.Args[0]
 16236  			if v_0_0_0.Op != OpS390XSUBE {
 16237  				break
 16238  			}
 16239  			borrow := v_0_0_0.Args[2]
 16240  			v_0_0_0_0 := v_0_0_0.Args[0]
 16241  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16242  				break
 16243  			}
 16244  			v_0_0_0_1 := v_0_0_0.Args[1]
 16245  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16246  				break
 16247  			}
 16248  			b.resetWithControl(BlockS390XBRC, borrow)
 16249  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 16250  			return true
 16251  		}
 16252  		// match: (CLGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16253  		// result: (BRC {s390x.Borrow} borrow)
 16254  		for b.Controls[0].Op == OpS390XNEG {
 16255  			v_0 := b.Controls[0]
 16256  			v_0_0 := v_0.Args[0]
 16257  			if v_0_0.Op != OpSelect0 {
 16258  				break
 16259  			}
 16260  			v_0_0_0 := v_0_0.Args[0]
 16261  			if v_0_0_0.Op != OpS390XSUBE {
 16262  				break
 16263  			}
 16264  			borrow := v_0_0_0.Args[2]
 16265  			v_0_0_0_0 := v_0_0_0.Args[0]
 16266  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16267  				break
 16268  			}
 16269  			v_0_0_0_1 := v_0_0_0.Args[1]
 16270  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 16271  				break
 16272  			}
 16273  			b.resetWithControl(BlockS390XBRC, borrow)
 16274  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16275  			return true
 16276  		}
 16277  	case BlockS390XCLGRJ:
 16278  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 16279  		// cond: isU8Bit(y)
 16280  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 16281  		for b.Controls[1].Op == OpS390XMOVDconst {
 16282  			x := b.Controls[0]
 16283  			v_1 := b.Controls[1]
 16284  			y := auxIntToInt64(v_1.AuxInt)
 16285  			c := auxToS390xCCMask(b.Aux)
 16286  			if !(isU8Bit(y)) {
 16287  				break
 16288  			}
 16289  			b.resetWithControl(BlockS390XCLGIJ, x)
 16290  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16291  			b.Aux = s390xCCMaskToAux(c)
 16292  			return true
 16293  		}
 16294  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 16295  		// cond: isU8Bit(x)
 16296  		// result: (CLGIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 16297  		for b.Controls[0].Op == OpS390XMOVDconst {
 16298  			v_0 := b.Controls[0]
 16299  			x := auxIntToInt64(v_0.AuxInt)
 16300  			y := b.Controls[1]
 16301  			c := auxToS390xCCMask(b.Aux)
 16302  			if !(isU8Bit(x)) {
 16303  				break
 16304  			}
 16305  			b.resetWithControl(BlockS390XCLGIJ, y)
 16306  			b.AuxInt = uint8ToAuxInt(uint8(x))
 16307  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16308  			return true
 16309  		}
 16310  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 16311  		// cond: !isU8Bit(y) && isU32Bit(y)
 16312  		// result: (BRC {c} (CMPUconst x [int32(y)]) yes no)
 16313  		for b.Controls[1].Op == OpS390XMOVDconst {
 16314  			x := b.Controls[0]
 16315  			v_1 := b.Controls[1]
 16316  			y := auxIntToInt64(v_1.AuxInt)
 16317  			c := auxToS390xCCMask(b.Aux)
 16318  			if !(!isU8Bit(y) && isU32Bit(y)) {
 16319  				break
 16320  			}
 16321  			v0 := b.NewValue0(x.Pos, OpS390XCMPUconst, types.TypeFlags)
 16322  			v0.AuxInt = int32ToAuxInt(int32(y))
 16323  			v0.AddArg(x)
 16324  			b.resetWithControl(BlockS390XBRC, v0)
 16325  			b.Aux = s390xCCMaskToAux(c)
 16326  			return true
 16327  		}
 16328  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 16329  		// cond: !isU8Bit(x) && isU32Bit(x)
 16330  		// result: (BRC {c.ReverseComparison()} (CMPUconst y [int32(x)]) yes no)
 16331  		for b.Controls[0].Op == OpS390XMOVDconst {
 16332  			v_0 := b.Controls[0]
 16333  			x := auxIntToInt64(v_0.AuxInt)
 16334  			y := b.Controls[1]
 16335  			c := auxToS390xCCMask(b.Aux)
 16336  			if !(!isU8Bit(x) && isU32Bit(x)) {
 16337  				break
 16338  			}
 16339  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPUconst, types.TypeFlags)
 16340  			v0.AuxInt = int32ToAuxInt(int32(x))
 16341  			v0.AddArg(y)
 16342  			b.resetWithControl(BlockS390XBRC, v0)
 16343  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16344  			return true
 16345  		}
 16346  		// match: (CLGRJ {c} x y yes no)
 16347  		// cond: x == y && c&s390x.Equal != 0
 16348  		// result: (First yes no)
 16349  		for {
 16350  			x := b.Controls[0]
 16351  			y := b.Controls[1]
 16352  			c := auxToS390xCCMask(b.Aux)
 16353  			if !(x == y && c&s390x.Equal != 0) {
 16354  				break
 16355  			}
 16356  			b.Reset(BlockFirst)
 16357  			return true
 16358  		}
 16359  		// match: (CLGRJ {c} x y yes no)
 16360  		// cond: x == y && c&s390x.Equal == 0
 16361  		// result: (First no yes)
 16362  		for {
 16363  			x := b.Controls[0]
 16364  			y := b.Controls[1]
 16365  			c := auxToS390xCCMask(b.Aux)
 16366  			if !(x == y && c&s390x.Equal == 0) {
 16367  				break
 16368  			}
 16369  			b.Reset(BlockFirst)
 16370  			b.swapSuccessors()
 16371  			return true
 16372  		}
 16373  	case BlockS390XCLIJ:
 16374  		// match: (CLIJ {s390x.LessOrGreater} (LOCGR {d} (MOVDconst [0]) (MOVDconst [x]) cmp) [0] yes no)
 16375  		// cond: int32(x) != 0
 16376  		// result: (BRC {d} cmp yes no)
 16377  		for b.Controls[0].Op == OpS390XLOCGR {
 16378  			v_0 := b.Controls[0]
 16379  			d := auxToS390xCCMask(v_0.Aux)
 16380  			cmp := v_0.Args[2]
 16381  			v_0_0 := v_0.Args[0]
 16382  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != 0 {
 16383  				break
 16384  			}
 16385  			v_0_1 := v_0.Args[1]
 16386  			if v_0_1.Op != OpS390XMOVDconst {
 16387  				break
 16388  			}
 16389  			x := auxIntToInt64(v_0_1.AuxInt)
 16390  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater || !(int32(x) != 0) {
 16391  				break
 16392  			}
 16393  			b.resetWithControl(BlockS390XBRC, cmp)
 16394  			b.Aux = s390xCCMaskToAux(d)
 16395  			return true
 16396  		}
 16397  		// match: (CLIJ {c} (MOVWreg x) [y] yes no)
 16398  		// result: (CLIJ {c} x [y] yes no)
 16399  		for b.Controls[0].Op == OpS390XMOVWreg {
 16400  			v_0 := b.Controls[0]
 16401  			x := v_0.Args[0]
 16402  			y := auxIntToUint8(b.AuxInt)
 16403  			c := auxToS390xCCMask(b.Aux)
 16404  			b.resetWithControl(BlockS390XCLIJ, x)
 16405  			b.AuxInt = uint8ToAuxInt(y)
 16406  			b.Aux = s390xCCMaskToAux(c)
 16407  			return true
 16408  		}
 16409  		// match: (CLIJ {c} (MOVWZreg x) [y] yes no)
 16410  		// result: (CLIJ {c} x [y] yes no)
 16411  		for b.Controls[0].Op == OpS390XMOVWZreg {
 16412  			v_0 := b.Controls[0]
 16413  			x := v_0.Args[0]
 16414  			y := auxIntToUint8(b.AuxInt)
 16415  			c := auxToS390xCCMask(b.Aux)
 16416  			b.resetWithControl(BlockS390XCLIJ, x)
 16417  			b.AuxInt = uint8ToAuxInt(y)
 16418  			b.Aux = s390xCCMaskToAux(c)
 16419  			return true
 16420  		}
 16421  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16422  		// cond: c&s390x.Equal != 0 && uint32(x) == uint32(y)
 16423  		// result: (First yes no)
 16424  		for b.Controls[0].Op == OpS390XMOVDconst {
 16425  			v_0 := b.Controls[0]
 16426  			x := auxIntToInt64(v_0.AuxInt)
 16427  			y := auxIntToUint8(b.AuxInt)
 16428  			c := auxToS390xCCMask(b.Aux)
 16429  			if !(c&s390x.Equal != 0 && uint32(x) == uint32(y)) {
 16430  				break
 16431  			}
 16432  			b.Reset(BlockFirst)
 16433  			return true
 16434  		}
 16435  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16436  		// cond: c&s390x.Less != 0 && uint32(x) < uint32(y)
 16437  		// result: (First yes no)
 16438  		for b.Controls[0].Op == OpS390XMOVDconst {
 16439  			v_0 := b.Controls[0]
 16440  			x := auxIntToInt64(v_0.AuxInt)
 16441  			y := auxIntToUint8(b.AuxInt)
 16442  			c := auxToS390xCCMask(b.Aux)
 16443  			if !(c&s390x.Less != 0 && uint32(x) < uint32(y)) {
 16444  				break
 16445  			}
 16446  			b.Reset(BlockFirst)
 16447  			return true
 16448  		}
 16449  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16450  		// cond: c&s390x.Greater != 0 && uint32(x) > uint32(y)
 16451  		// result: (First yes no)
 16452  		for b.Controls[0].Op == OpS390XMOVDconst {
 16453  			v_0 := b.Controls[0]
 16454  			x := auxIntToInt64(v_0.AuxInt)
 16455  			y := auxIntToUint8(b.AuxInt)
 16456  			c := auxToS390xCCMask(b.Aux)
 16457  			if !(c&s390x.Greater != 0 && uint32(x) > uint32(y)) {
 16458  				break
 16459  			}
 16460  			b.Reset(BlockFirst)
 16461  			return true
 16462  		}
 16463  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16464  		// cond: c&s390x.Equal == 0 && uint32(x) == uint32(y)
 16465  		// result: (First no yes)
 16466  		for b.Controls[0].Op == OpS390XMOVDconst {
 16467  			v_0 := b.Controls[0]
 16468  			x := auxIntToInt64(v_0.AuxInt)
 16469  			y := auxIntToUint8(b.AuxInt)
 16470  			c := auxToS390xCCMask(b.Aux)
 16471  			if !(c&s390x.Equal == 0 && uint32(x) == uint32(y)) {
 16472  				break
 16473  			}
 16474  			b.Reset(BlockFirst)
 16475  			b.swapSuccessors()
 16476  			return true
 16477  		}
 16478  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16479  		// cond: c&s390x.Less == 0 && uint32(x) < uint32(y)
 16480  		// result: (First no yes)
 16481  		for b.Controls[0].Op == OpS390XMOVDconst {
 16482  			v_0 := b.Controls[0]
 16483  			x := auxIntToInt64(v_0.AuxInt)
 16484  			y := auxIntToUint8(b.AuxInt)
 16485  			c := auxToS390xCCMask(b.Aux)
 16486  			if !(c&s390x.Less == 0 && uint32(x) < uint32(y)) {
 16487  				break
 16488  			}
 16489  			b.Reset(BlockFirst)
 16490  			b.swapSuccessors()
 16491  			return true
 16492  		}
 16493  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16494  		// cond: c&s390x.Greater == 0 && uint32(x) > uint32(y)
 16495  		// result: (First no yes)
 16496  		for b.Controls[0].Op == OpS390XMOVDconst {
 16497  			v_0 := b.Controls[0]
 16498  			x := auxIntToInt64(v_0.AuxInt)
 16499  			y := auxIntToUint8(b.AuxInt)
 16500  			c := auxToS390xCCMask(b.Aux)
 16501  			if !(c&s390x.Greater == 0 && uint32(x) > uint32(y)) {
 16502  				break
 16503  			}
 16504  			b.Reset(BlockFirst)
 16505  			b.swapSuccessors()
 16506  			return true
 16507  		}
 16508  		// match: (CLIJ {s390x.GreaterOrEqual} _ [0] yes no)
 16509  		// result: (First yes no)
 16510  		for {
 16511  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16512  				break
 16513  			}
 16514  			b.Reset(BlockFirst)
 16515  			return true
 16516  		}
 16517  		// match: (CLIJ {s390x.Less} _ [0] yes no)
 16518  		// result: (First no yes)
 16519  		for {
 16520  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
 16521  				break
 16522  			}
 16523  			b.Reset(BlockFirst)
 16524  			b.swapSuccessors()
 16525  			return true
 16526  		}
 16527  	case BlockS390XCLRJ:
 16528  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 16529  		// cond: isU8Bit(y)
 16530  		// result: (CLIJ {c} x [uint8(y)] yes no)
 16531  		for b.Controls[1].Op == OpS390XMOVDconst {
 16532  			x := b.Controls[0]
 16533  			v_1 := b.Controls[1]
 16534  			y := auxIntToInt64(v_1.AuxInt)
 16535  			c := auxToS390xCCMask(b.Aux)
 16536  			if !(isU8Bit(y)) {
 16537  				break
 16538  			}
 16539  			b.resetWithControl(BlockS390XCLIJ, x)
 16540  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16541  			b.Aux = s390xCCMaskToAux(c)
 16542  			return true
 16543  		}
 16544  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 16545  		// cond: isU8Bit(x)
 16546  		// result: (CLIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 16547  		for b.Controls[0].Op == OpS390XMOVDconst {
 16548  			v_0 := b.Controls[0]
 16549  			x := auxIntToInt64(v_0.AuxInt)
 16550  			y := b.Controls[1]
 16551  			c := auxToS390xCCMask(b.Aux)
 16552  			if !(isU8Bit(x)) {
 16553  				break
 16554  			}
 16555  			b.resetWithControl(BlockS390XCLIJ, y)
 16556  			b.AuxInt = uint8ToAuxInt(uint8(x))
 16557  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16558  			return true
 16559  		}
 16560  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 16561  		// cond: !isU8Bit(y) && isU32Bit(y)
 16562  		// result: (BRC {c} (CMPWUconst x [int32(y)]) yes no)
 16563  		for b.Controls[1].Op == OpS390XMOVDconst {
 16564  			x := b.Controls[0]
 16565  			v_1 := b.Controls[1]
 16566  			y := auxIntToInt64(v_1.AuxInt)
 16567  			c := auxToS390xCCMask(b.Aux)
 16568  			if !(!isU8Bit(y) && isU32Bit(y)) {
 16569  				break
 16570  			}
 16571  			v0 := b.NewValue0(x.Pos, OpS390XCMPWUconst, types.TypeFlags)
 16572  			v0.AuxInt = int32ToAuxInt(int32(y))
 16573  			v0.AddArg(x)
 16574  			b.resetWithControl(BlockS390XBRC, v0)
 16575  			b.Aux = s390xCCMaskToAux(c)
 16576  			return true
 16577  		}
 16578  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 16579  		// cond: !isU8Bit(x) && isU32Bit(x)
 16580  		// result: (BRC {c.ReverseComparison()} (CMPWUconst y [int32(x)]) yes no)
 16581  		for b.Controls[0].Op == OpS390XMOVDconst {
 16582  			v_0 := b.Controls[0]
 16583  			x := auxIntToInt64(v_0.AuxInt)
 16584  			y := b.Controls[1]
 16585  			c := auxToS390xCCMask(b.Aux)
 16586  			if !(!isU8Bit(x) && isU32Bit(x)) {
 16587  				break
 16588  			}
 16589  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPWUconst, types.TypeFlags)
 16590  			v0.AuxInt = int32ToAuxInt(int32(x))
 16591  			v0.AddArg(y)
 16592  			b.resetWithControl(BlockS390XBRC, v0)
 16593  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16594  			return true
 16595  		}
 16596  		// match: (CLRJ {c} x y yes no)
 16597  		// cond: x == y && c&s390x.Equal != 0
 16598  		// result: (First yes no)
 16599  		for {
 16600  			x := b.Controls[0]
 16601  			y := b.Controls[1]
 16602  			c := auxToS390xCCMask(b.Aux)
 16603  			if !(x == y && c&s390x.Equal != 0) {
 16604  				break
 16605  			}
 16606  			b.Reset(BlockFirst)
 16607  			return true
 16608  		}
 16609  		// match: (CLRJ {c} x y yes no)
 16610  		// cond: x == y && c&s390x.Equal == 0
 16611  		// result: (First no yes)
 16612  		for {
 16613  			x := b.Controls[0]
 16614  			y := b.Controls[1]
 16615  			c := auxToS390xCCMask(b.Aux)
 16616  			if !(x == y && c&s390x.Equal == 0) {
 16617  				break
 16618  			}
 16619  			b.Reset(BlockFirst)
 16620  			b.swapSuccessors()
 16621  			return true
 16622  		}
 16623  	case BlockS390XCRJ:
 16624  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 16625  		// cond: is8Bit(y)
 16626  		// result: (CIJ {c} x [ int8(y)] yes no)
 16627  		for b.Controls[1].Op == OpS390XMOVDconst {
 16628  			x := b.Controls[0]
 16629  			v_1 := b.Controls[1]
 16630  			y := auxIntToInt64(v_1.AuxInt)
 16631  			c := auxToS390xCCMask(b.Aux)
 16632  			if !(is8Bit(y)) {
 16633  				break
 16634  			}
 16635  			b.resetWithControl(BlockS390XCIJ, x)
 16636  			b.AuxInt = int8ToAuxInt(int8(y))
 16637  			b.Aux = s390xCCMaskToAux(c)
 16638  			return true
 16639  		}
 16640  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 16641  		// cond: is8Bit(x)
 16642  		// result: (CIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 16643  		for b.Controls[0].Op == OpS390XMOVDconst {
 16644  			v_0 := b.Controls[0]
 16645  			x := auxIntToInt64(v_0.AuxInt)
 16646  			y := b.Controls[1]
 16647  			c := auxToS390xCCMask(b.Aux)
 16648  			if !(is8Bit(x)) {
 16649  				break
 16650  			}
 16651  			b.resetWithControl(BlockS390XCIJ, y)
 16652  			b.AuxInt = int8ToAuxInt(int8(x))
 16653  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16654  			return true
 16655  		}
 16656  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 16657  		// cond: !is8Bit(y) && is32Bit(y)
 16658  		// result: (BRC {c} (CMPWconst x [int32(y)]) yes no)
 16659  		for b.Controls[1].Op == OpS390XMOVDconst {
 16660  			x := b.Controls[0]
 16661  			v_1 := b.Controls[1]
 16662  			y := auxIntToInt64(v_1.AuxInt)
 16663  			c := auxToS390xCCMask(b.Aux)
 16664  			if !(!is8Bit(y) && is32Bit(y)) {
 16665  				break
 16666  			}
 16667  			v0 := b.NewValue0(x.Pos, OpS390XCMPWconst, types.TypeFlags)
 16668  			v0.AuxInt = int32ToAuxInt(int32(y))
 16669  			v0.AddArg(x)
 16670  			b.resetWithControl(BlockS390XBRC, v0)
 16671  			b.Aux = s390xCCMaskToAux(c)
 16672  			return true
 16673  		}
 16674  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 16675  		// cond: !is8Bit(x) && is32Bit(x)
 16676  		// result: (BRC {c.ReverseComparison()} (CMPWconst y [int32(x)]) yes no)
 16677  		for b.Controls[0].Op == OpS390XMOVDconst {
 16678  			v_0 := b.Controls[0]
 16679  			x := auxIntToInt64(v_0.AuxInt)
 16680  			y := b.Controls[1]
 16681  			c := auxToS390xCCMask(b.Aux)
 16682  			if !(!is8Bit(x) && is32Bit(x)) {
 16683  				break
 16684  			}
 16685  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPWconst, types.TypeFlags)
 16686  			v0.AuxInt = int32ToAuxInt(int32(x))
 16687  			v0.AddArg(y)
 16688  			b.resetWithControl(BlockS390XBRC, v0)
 16689  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16690  			return true
 16691  		}
 16692  		// match: (CRJ {c} x y yes no)
 16693  		// cond: x == y && c&s390x.Equal != 0
 16694  		// result: (First yes no)
 16695  		for {
 16696  			x := b.Controls[0]
 16697  			y := b.Controls[1]
 16698  			c := auxToS390xCCMask(b.Aux)
 16699  			if !(x == y && c&s390x.Equal != 0) {
 16700  				break
 16701  			}
 16702  			b.Reset(BlockFirst)
 16703  			return true
 16704  		}
 16705  		// match: (CRJ {c} x y yes no)
 16706  		// cond: x == y && c&s390x.Equal == 0
 16707  		// result: (First no yes)
 16708  		for {
 16709  			x := b.Controls[0]
 16710  			y := b.Controls[1]
 16711  			c := auxToS390xCCMask(b.Aux)
 16712  			if !(x == y && c&s390x.Equal == 0) {
 16713  				break
 16714  			}
 16715  			b.Reset(BlockFirst)
 16716  			b.swapSuccessors()
 16717  			return true
 16718  		}
 16719  	case BlockIf:
 16720  		// match: (If cond yes no)
 16721  		// result: (CLIJ {s390x.LessOrGreater} (MOVBZreg <typ.Bool> cond) [0] yes no)
 16722  		for {
 16723  			cond := b.Controls[0]
 16724  			v0 := b.NewValue0(cond.Pos, OpS390XMOVBZreg, typ.Bool)
 16725  			v0.AddArg(cond)
 16726  			b.resetWithControl(BlockS390XCLIJ, v0)
 16727  			b.AuxInt = uint8ToAuxInt(0)
 16728  			b.Aux = s390xCCMaskToAux(s390x.LessOrGreater)
 16729  			return true
 16730  		}
 16731  	}
 16732  	return false
 16733  }
 16734  

View as plain text