Source file src/cmd/compile/internal/ssarewrite/rewrites390x/rewriteS390X.go

     1  // Code generated from _gen/S390X.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewrites390x
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  import "cmd/compile/internal/ssa/block"
     8  import "cmd/internal/obj/s390x"
     9  import "cmd/compile/internal/ssa/ssaop"
    10  import "cmd/compile/internal/ssa"
    11  
    12  func RewriteValue(v *ssa.Value) bool {
    13  	switch v.Op {
    14  	case ssaop.OpAdd16:
    15  		v.Op = ssaop.OpS390XADDW
    16  		return true
    17  	case ssaop.OpAdd32:
    18  		v.Op = ssaop.OpS390XADDW
    19  		return true
    20  	case ssaop.OpAdd32F:
    21  		return rewriteValue_OpAdd32F(v)
    22  	case ssaop.OpAdd64:
    23  		v.Op = ssaop.OpS390XADD
    24  		return true
    25  	case ssaop.OpAdd64F:
    26  		return rewriteValue_OpAdd64F(v)
    27  	case ssaop.OpAdd8:
    28  		v.Op = ssaop.OpS390XADDW
    29  		return true
    30  	case ssaop.OpAddPtr:
    31  		v.Op = ssaop.OpS390XADD
    32  		return true
    33  	case ssaop.OpAddr:
    34  		return rewriteValue_OpAddr(v)
    35  	case ssaop.OpAnd16:
    36  		v.Op = ssaop.OpS390XANDW
    37  		return true
    38  	case ssaop.OpAnd32:
    39  		v.Op = ssaop.OpS390XANDW
    40  		return true
    41  	case ssaop.OpAnd64:
    42  		v.Op = ssaop.OpS390XAND
    43  		return true
    44  	case ssaop.OpAnd8:
    45  		v.Op = ssaop.OpS390XANDW
    46  		return true
    47  	case ssaop.OpAndB:
    48  		v.Op = ssaop.OpS390XANDW
    49  		return true
    50  	case ssaop.OpAtomicAdd32:
    51  		return rewriteValue_OpAtomicAdd32(v)
    52  	case ssaop.OpAtomicAdd64:
    53  		return rewriteValue_OpAtomicAdd64(v)
    54  	case ssaop.OpAtomicAnd32:
    55  		v.Op = ssaop.OpS390XLAN
    56  		return true
    57  	case ssaop.OpAtomicAnd8:
    58  		return rewriteValue_OpAtomicAnd8(v)
    59  	case ssaop.OpAtomicCompareAndSwap32:
    60  		return rewriteValue_OpAtomicCompareAndSwap32(v)
    61  	case ssaop.OpAtomicCompareAndSwap64:
    62  		return rewriteValue_OpAtomicCompareAndSwap64(v)
    63  	case ssaop.OpAtomicExchange32:
    64  		return rewriteValue_OpAtomicExchange32(v)
    65  	case ssaop.OpAtomicExchange64:
    66  		return rewriteValue_OpAtomicExchange64(v)
    67  	case ssaop.OpAtomicLoad32:
    68  		return rewriteValue_OpAtomicLoad32(v)
    69  	case ssaop.OpAtomicLoad64:
    70  		return rewriteValue_OpAtomicLoad64(v)
    71  	case ssaop.OpAtomicLoad8:
    72  		return rewriteValue_OpAtomicLoad8(v)
    73  	case ssaop.OpAtomicLoadAcq32:
    74  		return rewriteValue_OpAtomicLoadAcq32(v)
    75  	case ssaop.OpAtomicLoadPtr:
    76  		return rewriteValue_OpAtomicLoadPtr(v)
    77  	case ssaop.OpAtomicOr32:
    78  		v.Op = ssaop.OpS390XLAO
    79  		return true
    80  	case ssaop.OpAtomicOr8:
    81  		return rewriteValue_OpAtomicOr8(v)
    82  	case ssaop.OpAtomicStore32:
    83  		return rewriteValue_OpAtomicStore32(v)
    84  	case ssaop.OpAtomicStore64:
    85  		return rewriteValue_OpAtomicStore64(v)
    86  	case ssaop.OpAtomicStore8:
    87  		return rewriteValue_OpAtomicStore8(v)
    88  	case ssaop.OpAtomicStorePtrNoWB:
    89  		return rewriteValue_OpAtomicStorePtrNoWB(v)
    90  	case ssaop.OpAtomicStoreRel32:
    91  		return rewriteValue_OpAtomicStoreRel32(v)
    92  	case ssaop.OpAvg64u:
    93  		return rewriteValue_OpAvg64u(v)
    94  	case ssaop.OpBitLen16:
    95  		return rewriteValue_OpBitLen16(v)
    96  	case ssaop.OpBitLen32:
    97  		return rewriteValue_OpBitLen32(v)
    98  	case ssaop.OpBitLen64:
    99  		return rewriteValue_OpBitLen64(v)
   100  	case ssaop.OpBitLen8:
   101  		return rewriteValue_OpBitLen8(v)
   102  	case ssaop.OpBswap16:
   103  		return rewriteValue_OpBswap16(v)
   104  	case ssaop.OpBswap32:
   105  		v.Op = ssaop.OpS390XMOVWBR
   106  		return true
   107  	case ssaop.OpBswap64:
   108  		v.Op = ssaop.OpS390XMOVDBR
   109  		return true
   110  	case ssaop.OpCeil:
   111  		return rewriteValue_OpCeil(v)
   112  	case ssaop.OpClosureCall:
   113  		v.Op = ssaop.OpS390XCALLclosure
   114  		return true
   115  	case ssaop.OpCom16:
   116  		v.Op = ssaop.OpS390XNOTW
   117  		return true
   118  	case ssaop.OpCom32:
   119  		v.Op = ssaop.OpS390XNOTW
   120  		return true
   121  	case ssaop.OpCom64:
   122  		v.Op = ssaop.OpS390XNOT
   123  		return true
   124  	case ssaop.OpCom8:
   125  		v.Op = ssaop.OpS390XNOTW
   126  		return true
   127  	case ssaop.OpConst16:
   128  		return rewriteValue_OpConst16(v)
   129  	case ssaop.OpConst32:
   130  		return rewriteValue_OpConst32(v)
   131  	case ssaop.OpConst32F:
   132  		v.Op = ssaop.OpS390XFMOVSconst
   133  		return true
   134  	case ssaop.OpConst64:
   135  		return rewriteValue_OpConst64(v)
   136  	case ssaop.OpConst64F:
   137  		v.Op = ssaop.OpS390XFMOVDconst
   138  		return true
   139  	case ssaop.OpConst8:
   140  		return rewriteValue_OpConst8(v)
   141  	case ssaop.OpConstBool:
   142  		return rewriteValue_OpConstBool(v)
   143  	case ssaop.OpConstNil:
   144  		return rewriteValue_OpConstNil(v)
   145  	case ssaop.OpCtz16:
   146  		return rewriteValue_OpCtz16(v)
   147  	case ssaop.OpCtz16NonZero:
   148  		v.Op = ssaop.OpCtz64
   149  		return true
   150  	case ssaop.OpCtz32:
   151  		return rewriteValue_OpCtz32(v)
   152  	case ssaop.OpCtz32NonZero:
   153  		v.Op = ssaop.OpCtz64
   154  		return true
   155  	case ssaop.OpCtz64:
   156  		return rewriteValue_OpCtz64(v)
   157  	case ssaop.OpCtz64NonZero:
   158  		v.Op = ssaop.OpCtz64
   159  		return true
   160  	case ssaop.OpCtz8:
   161  		return rewriteValue_OpCtz8(v)
   162  	case ssaop.OpCtz8NonZero:
   163  		v.Op = ssaop.OpCtz64
   164  		return true
   165  	case ssaop.OpCvt32Fto32:
   166  		v.Op = ssaop.OpS390XCFEBRA
   167  		return true
   168  	case ssaop.OpCvt32Fto32U:
   169  		v.Op = ssaop.OpS390XCLFEBR
   170  		return true
   171  	case ssaop.OpCvt32Fto64:
   172  		v.Op = ssaop.OpS390XCGEBRA
   173  		return true
   174  	case ssaop.OpCvt32Fto64F:
   175  		v.Op = ssaop.OpS390XLDEBR
   176  		return true
   177  	case ssaop.OpCvt32Fto64U:
   178  		v.Op = ssaop.OpS390XCLGEBR
   179  		return true
   180  	case ssaop.OpCvt32Uto32F:
   181  		v.Op = ssaop.OpS390XCELFBR
   182  		return true
   183  	case ssaop.OpCvt32Uto64F:
   184  		v.Op = ssaop.OpS390XCDLFBR
   185  		return true
   186  	case ssaop.OpCvt32to32F:
   187  		v.Op = ssaop.OpS390XCEFBRA
   188  		return true
   189  	case ssaop.OpCvt32to64F:
   190  		v.Op = ssaop.OpS390XCDFBRA
   191  		return true
   192  	case ssaop.OpCvt64Fto32:
   193  		v.Op = ssaop.OpS390XCFDBRA
   194  		return true
   195  	case ssaop.OpCvt64Fto32F:
   196  		v.Op = ssaop.OpS390XLEDBR
   197  		return true
   198  	case ssaop.OpCvt64Fto32U:
   199  		v.Op = ssaop.OpS390XCLFDBR
   200  		return true
   201  	case ssaop.OpCvt64Fto64:
   202  		v.Op = ssaop.OpS390XCGDBRA
   203  		return true
   204  	case ssaop.OpCvt64Fto64U:
   205  		v.Op = ssaop.OpS390XCLGDBR
   206  		return true
   207  	case ssaop.OpCvt64Uto32F:
   208  		v.Op = ssaop.OpS390XCELGBR
   209  		return true
   210  	case ssaop.OpCvt64Uto64F:
   211  		v.Op = ssaop.OpS390XCDLGBR
   212  		return true
   213  	case ssaop.OpCvt64to32F:
   214  		v.Op = ssaop.OpS390XCEGBRA
   215  		return true
   216  	case ssaop.OpCvt64to64F:
   217  		v.Op = ssaop.OpS390XCDGBRA
   218  		return true
   219  	case ssaop.OpCvtBoolToUint8:
   220  		v.Op = ssaop.OpCopy
   221  		return true
   222  	case ssaop.OpDiv16:
   223  		return rewriteValue_OpDiv16(v)
   224  	case ssaop.OpDiv16u:
   225  		return rewriteValue_OpDiv16u(v)
   226  	case ssaop.OpDiv32:
   227  		return rewriteValue_OpDiv32(v)
   228  	case ssaop.OpDiv32F:
   229  		v.Op = ssaop.OpS390XFDIVS
   230  		return true
   231  	case ssaop.OpDiv32u:
   232  		return rewriteValue_OpDiv32u(v)
   233  	case ssaop.OpDiv64:
   234  		return rewriteValue_OpDiv64(v)
   235  	case ssaop.OpDiv64F:
   236  		v.Op = ssaop.OpS390XFDIV
   237  		return true
   238  	case ssaop.OpDiv64u:
   239  		v.Op = ssaop.OpS390XDIVDU
   240  		return true
   241  	case ssaop.OpDiv8:
   242  		return rewriteValue_OpDiv8(v)
   243  	case ssaop.OpDiv8u:
   244  		return rewriteValue_OpDiv8u(v)
   245  	case ssaop.OpEq16:
   246  		return rewriteValue_OpEq16(v)
   247  	case ssaop.OpEq32:
   248  		return rewriteValue_OpEq32(v)
   249  	case ssaop.OpEq32F:
   250  		return rewriteValue_OpEq32F(v)
   251  	case ssaop.OpEq64:
   252  		return rewriteValue_OpEq64(v)
   253  	case ssaop.OpEq64F:
   254  		return rewriteValue_OpEq64F(v)
   255  	case ssaop.OpEq8:
   256  		return rewriteValue_OpEq8(v)
   257  	case ssaop.OpEqB:
   258  		return rewriteValue_OpEqB(v)
   259  	case ssaop.OpEqPtr:
   260  		return rewriteValue_OpEqPtr(v)
   261  	case ssaop.OpFMA:
   262  		return rewriteValue_OpFMA(v)
   263  	case ssaop.OpFloor:
   264  		return rewriteValue_OpFloor(v)
   265  	case ssaop.OpGetCallerPC:
   266  		v.Op = ssaop.OpS390XLoweredGetCallerPC
   267  		return true
   268  	case ssaop.OpGetCallerSP:
   269  		v.Op = ssaop.OpS390XLoweredGetCallerSP
   270  		return true
   271  	case ssaop.OpGetClosurePtr:
   272  		v.Op = ssaop.OpS390XLoweredGetClosurePtr
   273  		return true
   274  	case ssaop.OpGetG:
   275  		v.Op = ssaop.OpS390XLoweredGetG
   276  		return true
   277  	case ssaop.OpHmul32:
   278  		return rewriteValue_OpHmul32(v)
   279  	case ssaop.OpHmul32u:
   280  		return rewriteValue_OpHmul32u(v)
   281  	case ssaop.OpHmul64:
   282  		v.Op = ssaop.OpS390XMULHD
   283  		return true
   284  	case ssaop.OpHmul64u:
   285  		v.Op = ssaop.OpS390XMULHDU
   286  		return true
   287  	case ssaop.OpITab:
   288  		return rewriteValue_OpITab(v)
   289  	case ssaop.OpInterCall:
   290  		v.Op = ssaop.OpS390XCALLinter
   291  		return true
   292  	case ssaop.OpIsInBounds:
   293  		return rewriteValue_OpIsInBounds(v)
   294  	case ssaop.OpIsNonNil:
   295  		return rewriteValue_OpIsNonNil(v)
   296  	case ssaop.OpIsSliceInBounds:
   297  		return rewriteValue_OpIsSliceInBounds(v)
   298  	case ssaop.OpLeq16:
   299  		return rewriteValue_OpLeq16(v)
   300  	case ssaop.OpLeq16U:
   301  		return rewriteValue_OpLeq16U(v)
   302  	case ssaop.OpLeq32:
   303  		return rewriteValue_OpLeq32(v)
   304  	case ssaop.OpLeq32F:
   305  		return rewriteValue_OpLeq32F(v)
   306  	case ssaop.OpLeq32U:
   307  		return rewriteValue_OpLeq32U(v)
   308  	case ssaop.OpLeq64:
   309  		return rewriteValue_OpLeq64(v)
   310  	case ssaop.OpLeq64F:
   311  		return rewriteValue_OpLeq64F(v)
   312  	case ssaop.OpLeq64U:
   313  		return rewriteValue_OpLeq64U(v)
   314  	case ssaop.OpLeq8:
   315  		return rewriteValue_OpLeq8(v)
   316  	case ssaop.OpLeq8U:
   317  		return rewriteValue_OpLeq8U(v)
   318  	case ssaop.OpLess16:
   319  		return rewriteValue_OpLess16(v)
   320  	case ssaop.OpLess16U:
   321  		return rewriteValue_OpLess16U(v)
   322  	case ssaop.OpLess32:
   323  		return rewriteValue_OpLess32(v)
   324  	case ssaop.OpLess32F:
   325  		return rewriteValue_OpLess32F(v)
   326  	case ssaop.OpLess32U:
   327  		return rewriteValue_OpLess32U(v)
   328  	case ssaop.OpLess64:
   329  		return rewriteValue_OpLess64(v)
   330  	case ssaop.OpLess64F:
   331  		return rewriteValue_OpLess64F(v)
   332  	case ssaop.OpLess64U:
   333  		return rewriteValue_OpLess64U(v)
   334  	case ssaop.OpLess8:
   335  		return rewriteValue_OpLess8(v)
   336  	case ssaop.OpLess8U:
   337  		return rewriteValue_OpLess8U(v)
   338  	case ssaop.OpLoad:
   339  		return rewriteValue_OpLoad(v)
   340  	case ssaop.OpLocalAddr:
   341  		return rewriteValue_OpLocalAddr(v)
   342  	case ssaop.OpLsh16x16:
   343  		return rewriteValue_OpLsh16x16(v)
   344  	case ssaop.OpLsh16x32:
   345  		return rewriteValue_OpLsh16x32(v)
   346  	case ssaop.OpLsh16x64:
   347  		return rewriteValue_OpLsh16x64(v)
   348  	case ssaop.OpLsh16x8:
   349  		return rewriteValue_OpLsh16x8(v)
   350  	case ssaop.OpLsh32x16:
   351  		return rewriteValue_OpLsh32x16(v)
   352  	case ssaop.OpLsh32x32:
   353  		return rewriteValue_OpLsh32x32(v)
   354  	case ssaop.OpLsh32x64:
   355  		return rewriteValue_OpLsh32x64(v)
   356  	case ssaop.OpLsh32x8:
   357  		return rewriteValue_OpLsh32x8(v)
   358  	case ssaop.OpLsh64x16:
   359  		return rewriteValue_OpLsh64x16(v)
   360  	case ssaop.OpLsh64x32:
   361  		return rewriteValue_OpLsh64x32(v)
   362  	case ssaop.OpLsh64x64:
   363  		return rewriteValue_OpLsh64x64(v)
   364  	case ssaop.OpLsh64x8:
   365  		return rewriteValue_OpLsh64x8(v)
   366  	case ssaop.OpLsh8x16:
   367  		return rewriteValue_OpLsh8x16(v)
   368  	case ssaop.OpLsh8x32:
   369  		return rewriteValue_OpLsh8x32(v)
   370  	case ssaop.OpLsh8x64:
   371  		return rewriteValue_OpLsh8x64(v)
   372  	case ssaop.OpLsh8x8:
   373  		return rewriteValue_OpLsh8x8(v)
   374  	case ssaop.OpMax32F:
   375  		v.Op = ssaop.OpS390XWFMAXSB
   376  		return true
   377  	case ssaop.OpMax64F:
   378  		v.Op = ssaop.OpS390XWFMAXDB
   379  		return true
   380  	case ssaop.OpMin32F:
   381  		v.Op = ssaop.OpS390XWFMINSB
   382  		return true
   383  	case ssaop.OpMin64F:
   384  		v.Op = ssaop.OpS390XWFMINDB
   385  		return true
   386  	case ssaop.OpMod16:
   387  		return rewriteValue_OpMod16(v)
   388  	case ssaop.OpMod16u:
   389  		return rewriteValue_OpMod16u(v)
   390  	case ssaop.OpMod32:
   391  		return rewriteValue_OpMod32(v)
   392  	case ssaop.OpMod32u:
   393  		return rewriteValue_OpMod32u(v)
   394  	case ssaop.OpMod64:
   395  		return rewriteValue_OpMod64(v)
   396  	case ssaop.OpMod64u:
   397  		v.Op = ssaop.OpS390XMODDU
   398  		return true
   399  	case ssaop.OpMod8:
   400  		return rewriteValue_OpMod8(v)
   401  	case ssaop.OpMod8u:
   402  		return rewriteValue_OpMod8u(v)
   403  	case ssaop.OpMove:
   404  		return rewriteValue_OpMove(v)
   405  	case ssaop.OpMul16:
   406  		v.Op = ssaop.OpS390XMULLW
   407  		return true
   408  	case ssaop.OpMul32:
   409  		v.Op = ssaop.OpS390XMULLW
   410  		return true
   411  	case ssaop.OpMul32F:
   412  		v.Op = ssaop.OpS390XFMULS
   413  		return true
   414  	case ssaop.OpMul64:
   415  		v.Op = ssaop.OpS390XMULLD
   416  		return true
   417  	case ssaop.OpMul64F:
   418  		v.Op = ssaop.OpS390XFMUL
   419  		return true
   420  	case ssaop.OpMul64uhilo:
   421  		v.Op = ssaop.OpS390XMLGR
   422  		return true
   423  	case ssaop.OpMul8:
   424  		v.Op = ssaop.OpS390XMULLW
   425  		return true
   426  	case ssaop.OpNeg16:
   427  		v.Op = ssaop.OpS390XNEGW
   428  		return true
   429  	case ssaop.OpNeg32:
   430  		v.Op = ssaop.OpS390XNEGW
   431  		return true
   432  	case ssaop.OpNeg32F:
   433  		v.Op = ssaop.OpS390XFNEGS
   434  		return true
   435  	case ssaop.OpNeg64:
   436  		v.Op = ssaop.OpS390XNEG
   437  		return true
   438  	case ssaop.OpNeg64F:
   439  		v.Op = ssaop.OpS390XFNEG
   440  		return true
   441  	case ssaop.OpNeg8:
   442  		v.Op = ssaop.OpS390XNEGW
   443  		return true
   444  	case ssaop.OpNeq16:
   445  		return rewriteValue_OpNeq16(v)
   446  	case ssaop.OpNeq32:
   447  		return rewriteValue_OpNeq32(v)
   448  	case ssaop.OpNeq32F:
   449  		return rewriteValue_OpNeq32F(v)
   450  	case ssaop.OpNeq64:
   451  		return rewriteValue_OpNeq64(v)
   452  	case ssaop.OpNeq64F:
   453  		return rewriteValue_OpNeq64F(v)
   454  	case ssaop.OpNeq8:
   455  		return rewriteValue_OpNeq8(v)
   456  	case ssaop.OpNeqB:
   457  		return rewriteValue_OpNeqB(v)
   458  	case ssaop.OpNeqPtr:
   459  		return rewriteValue_OpNeqPtr(v)
   460  	case ssaop.OpNilCheck:
   461  		v.Op = ssaop.OpS390XLoweredNilCheck
   462  		return true
   463  	case ssaop.OpNot:
   464  		return rewriteValue_OpNot(v)
   465  	case ssaop.OpOffPtr:
   466  		return rewriteValue_OpOffPtr(v)
   467  	case ssaop.OpOr16:
   468  		v.Op = ssaop.OpS390XORW
   469  		return true
   470  	case ssaop.OpOr32:
   471  		v.Op = ssaop.OpS390XORW
   472  		return true
   473  	case ssaop.OpOr64:
   474  		v.Op = ssaop.OpS390XOR
   475  		return true
   476  	case ssaop.OpOr8:
   477  		v.Op = ssaop.OpS390XORW
   478  		return true
   479  	case ssaop.OpOrB:
   480  		v.Op = ssaop.OpS390XORW
   481  		return true
   482  	case ssaop.OpPanicBounds:
   483  		v.Op = ssaop.OpS390XLoweredPanicBoundsRR
   484  		return true
   485  	case ssaop.OpPopCount16:
   486  		return rewriteValue_OpPopCount16(v)
   487  	case ssaop.OpPopCount32:
   488  		return rewriteValue_OpPopCount32(v)
   489  	case ssaop.OpPopCount64:
   490  		return rewriteValue_OpPopCount64(v)
   491  	case ssaop.OpPopCount8:
   492  		return rewriteValue_OpPopCount8(v)
   493  	case ssaop.OpRotateLeft16:
   494  		return rewriteValue_OpRotateLeft16(v)
   495  	case ssaop.OpRotateLeft32:
   496  		v.Op = ssaop.OpS390XRLL
   497  		return true
   498  	case ssaop.OpRotateLeft64:
   499  		v.Op = ssaop.OpS390XRLLG
   500  		return true
   501  	case ssaop.OpRotateLeft8:
   502  		return rewriteValue_OpRotateLeft8(v)
   503  	case ssaop.OpRound:
   504  		return rewriteValue_OpRound(v)
   505  	case ssaop.OpRound32F:
   506  		v.Op = ssaop.OpS390XLoweredRound32F
   507  		return true
   508  	case ssaop.OpRound64F:
   509  		v.Op = ssaop.OpS390XLoweredRound64F
   510  		return true
   511  	case ssaop.OpRoundToEven:
   512  		return rewriteValue_OpRoundToEven(v)
   513  	case ssaop.OpRsh16Ux16:
   514  		return rewriteValue_OpRsh16Ux16(v)
   515  	case ssaop.OpRsh16Ux32:
   516  		return rewriteValue_OpRsh16Ux32(v)
   517  	case ssaop.OpRsh16Ux64:
   518  		return rewriteValue_OpRsh16Ux64(v)
   519  	case ssaop.OpRsh16Ux8:
   520  		return rewriteValue_OpRsh16Ux8(v)
   521  	case ssaop.OpRsh16x16:
   522  		return rewriteValue_OpRsh16x16(v)
   523  	case ssaop.OpRsh16x32:
   524  		return rewriteValue_OpRsh16x32(v)
   525  	case ssaop.OpRsh16x64:
   526  		return rewriteValue_OpRsh16x64(v)
   527  	case ssaop.OpRsh16x8:
   528  		return rewriteValue_OpRsh16x8(v)
   529  	case ssaop.OpRsh32Ux16:
   530  		return rewriteValue_OpRsh32Ux16(v)
   531  	case ssaop.OpRsh32Ux32:
   532  		return rewriteValue_OpRsh32Ux32(v)
   533  	case ssaop.OpRsh32Ux64:
   534  		return rewriteValue_OpRsh32Ux64(v)
   535  	case ssaop.OpRsh32Ux8:
   536  		return rewriteValue_OpRsh32Ux8(v)
   537  	case ssaop.OpRsh32x16:
   538  		return rewriteValue_OpRsh32x16(v)
   539  	case ssaop.OpRsh32x32:
   540  		return rewriteValue_OpRsh32x32(v)
   541  	case ssaop.OpRsh32x64:
   542  		return rewriteValue_OpRsh32x64(v)
   543  	case ssaop.OpRsh32x8:
   544  		return rewriteValue_OpRsh32x8(v)
   545  	case ssaop.OpRsh64Ux16:
   546  		return rewriteValue_OpRsh64Ux16(v)
   547  	case ssaop.OpRsh64Ux32:
   548  		return rewriteValue_OpRsh64Ux32(v)
   549  	case ssaop.OpRsh64Ux64:
   550  		return rewriteValue_OpRsh64Ux64(v)
   551  	case ssaop.OpRsh64Ux8:
   552  		return rewriteValue_OpRsh64Ux8(v)
   553  	case ssaop.OpRsh64x16:
   554  		return rewriteValue_OpRsh64x16(v)
   555  	case ssaop.OpRsh64x32:
   556  		return rewriteValue_OpRsh64x32(v)
   557  	case ssaop.OpRsh64x64:
   558  		return rewriteValue_OpRsh64x64(v)
   559  	case ssaop.OpRsh64x8:
   560  		return rewriteValue_OpRsh64x8(v)
   561  	case ssaop.OpRsh8Ux16:
   562  		return rewriteValue_OpRsh8Ux16(v)
   563  	case ssaop.OpRsh8Ux32:
   564  		return rewriteValue_OpRsh8Ux32(v)
   565  	case ssaop.OpRsh8Ux64:
   566  		return rewriteValue_OpRsh8Ux64(v)
   567  	case ssaop.OpRsh8Ux8:
   568  		return rewriteValue_OpRsh8Ux8(v)
   569  	case ssaop.OpRsh8x16:
   570  		return rewriteValue_OpRsh8x16(v)
   571  	case ssaop.OpRsh8x32:
   572  		return rewriteValue_OpRsh8x32(v)
   573  	case ssaop.OpRsh8x64:
   574  		return rewriteValue_OpRsh8x64(v)
   575  	case ssaop.OpRsh8x8:
   576  		return rewriteValue_OpRsh8x8(v)
   577  	case ssaop.OpS390XADD:
   578  		return rewriteValue_OpS390XADD(v)
   579  	case ssaop.OpS390XADDC:
   580  		return rewriteValue_OpS390XADDC(v)
   581  	case ssaop.OpS390XADDE:
   582  		return rewriteValue_OpS390XADDE(v)
   583  	case ssaop.OpS390XADDW:
   584  		return rewriteValue_OpS390XADDW(v)
   585  	case ssaop.OpS390XADDWconst:
   586  		return rewriteValue_OpS390XADDWconst(v)
   587  	case ssaop.OpS390XADDWload:
   588  		return rewriteValue_OpS390XADDWload(v)
   589  	case ssaop.OpS390XADDconst:
   590  		return rewriteValue_OpS390XADDconst(v)
   591  	case ssaop.OpS390XADDload:
   592  		return rewriteValue_OpS390XADDload(v)
   593  	case ssaop.OpS390XAND:
   594  		return rewriteValue_OpS390XAND(v)
   595  	case ssaop.OpS390XANDW:
   596  		return rewriteValue_OpS390XANDW(v)
   597  	case ssaop.OpS390XANDWconst:
   598  		return rewriteValue_OpS390XANDWconst(v)
   599  	case ssaop.OpS390XANDWload:
   600  		return rewriteValue_OpS390XANDWload(v)
   601  	case ssaop.OpS390XANDconst:
   602  		return rewriteValue_OpS390XANDconst(v)
   603  	case ssaop.OpS390XANDload:
   604  		return rewriteValue_OpS390XANDload(v)
   605  	case ssaop.OpS390XCMP:
   606  		return rewriteValue_OpS390XCMP(v)
   607  	case ssaop.OpS390XCMPU:
   608  		return rewriteValue_OpS390XCMPU(v)
   609  	case ssaop.OpS390XCMPUconst:
   610  		return rewriteValue_OpS390XCMPUconst(v)
   611  	case ssaop.OpS390XCMPW:
   612  		return rewriteValue_OpS390XCMPW(v)
   613  	case ssaop.OpS390XCMPWU:
   614  		return rewriteValue_OpS390XCMPWU(v)
   615  	case ssaop.OpS390XCMPWUconst:
   616  		return rewriteValue_OpS390XCMPWUconst(v)
   617  	case ssaop.OpS390XCMPWconst:
   618  		return rewriteValue_OpS390XCMPWconst(v)
   619  	case ssaop.OpS390XCMPconst:
   620  		return rewriteValue_OpS390XCMPconst(v)
   621  	case ssaop.OpS390XCPSDR:
   622  		return rewriteValue_OpS390XCPSDR(v)
   623  	case ssaop.OpS390XFCMP:
   624  		return rewriteValue_OpS390XFCMP(v)
   625  	case ssaop.OpS390XFCMPS:
   626  		return rewriteValue_OpS390XFCMPS(v)
   627  	case ssaop.OpS390XFMOVDload:
   628  		return rewriteValue_OpS390XFMOVDload(v)
   629  	case ssaop.OpS390XFMOVDstore:
   630  		return rewriteValue_OpS390XFMOVDstore(v)
   631  	case ssaop.OpS390XFMOVSload:
   632  		return rewriteValue_OpS390XFMOVSload(v)
   633  	case ssaop.OpS390XFMOVSstore:
   634  		return rewriteValue_OpS390XFMOVSstore(v)
   635  	case ssaop.OpS390XFNEG:
   636  		return rewriteValue_OpS390XFNEG(v)
   637  	case ssaop.OpS390XFNEGS:
   638  		return rewriteValue_OpS390XFNEGS(v)
   639  	case ssaop.OpS390XLDGR:
   640  		return rewriteValue_OpS390XLDGR(v)
   641  	case ssaop.OpS390XLEDBR:
   642  		return rewriteValue_OpS390XLEDBR(v)
   643  	case ssaop.OpS390XLGDR:
   644  		return rewriteValue_OpS390XLGDR(v)
   645  	case ssaop.OpS390XLOCGR:
   646  		return rewriteValue_OpS390XLOCGR(v)
   647  	case ssaop.OpS390XLTDBR:
   648  		return rewriteValue_OpS390XLTDBR(v)
   649  	case ssaop.OpS390XLTEBR:
   650  		return rewriteValue_OpS390XLTEBR(v)
   651  	case ssaop.OpS390XLoweredPanicBoundsCR:
   652  		return rewriteValue_OpS390XLoweredPanicBoundsCR(v)
   653  	case ssaop.OpS390XLoweredPanicBoundsRC:
   654  		return rewriteValue_OpS390XLoweredPanicBoundsRC(v)
   655  	case ssaop.OpS390XLoweredPanicBoundsRR:
   656  		return rewriteValue_OpS390XLoweredPanicBoundsRR(v)
   657  	case ssaop.OpS390XLoweredRound32F:
   658  		return rewriteValue_OpS390XLoweredRound32F(v)
   659  	case ssaop.OpS390XLoweredRound64F:
   660  		return rewriteValue_OpS390XLoweredRound64F(v)
   661  	case ssaop.OpS390XMOVBZload:
   662  		return rewriteValue_OpS390XMOVBZload(v)
   663  	case ssaop.OpS390XMOVBZreg:
   664  		return rewriteValue_OpS390XMOVBZreg(v)
   665  	case ssaop.OpS390XMOVBload:
   666  		return rewriteValue_OpS390XMOVBload(v)
   667  	case ssaop.OpS390XMOVBreg:
   668  		return rewriteValue_OpS390XMOVBreg(v)
   669  	case ssaop.OpS390XMOVBstore:
   670  		return rewriteValue_OpS390XMOVBstore(v)
   671  	case ssaop.OpS390XMOVBstoreconst:
   672  		return rewriteValue_OpS390XMOVBstoreconst(v)
   673  	case ssaop.OpS390XMOVDBR:
   674  		return rewriteValue_OpS390XMOVDBR(v)
   675  	case ssaop.OpS390XMOVDaddridx:
   676  		return rewriteValue_OpS390XMOVDaddridx(v)
   677  	case ssaop.OpS390XMOVDload:
   678  		return rewriteValue_OpS390XMOVDload(v)
   679  	case ssaop.OpS390XMOVDstore:
   680  		return rewriteValue_OpS390XMOVDstore(v)
   681  	case ssaop.OpS390XMOVDstoreconst:
   682  		return rewriteValue_OpS390XMOVDstoreconst(v)
   683  	case ssaop.OpS390XMOVDstoreidx:
   684  		return rewriteValue_OpS390XMOVDstoreidx(v)
   685  	case ssaop.OpS390XMOVHZload:
   686  		return rewriteValue_OpS390XMOVHZload(v)
   687  	case ssaop.OpS390XMOVHZreg:
   688  		return rewriteValue_OpS390XMOVHZreg(v)
   689  	case ssaop.OpS390XMOVHload:
   690  		return rewriteValue_OpS390XMOVHload(v)
   691  	case ssaop.OpS390XMOVHreg:
   692  		return rewriteValue_OpS390XMOVHreg(v)
   693  	case ssaop.OpS390XMOVHstore:
   694  		return rewriteValue_OpS390XMOVHstore(v)
   695  	case ssaop.OpS390XMOVHstoreconst:
   696  		return rewriteValue_OpS390XMOVHstoreconst(v)
   697  	case ssaop.OpS390XMOVHstoreidx:
   698  		return rewriteValue_OpS390XMOVHstoreidx(v)
   699  	case ssaop.OpS390XMOVWBR:
   700  		return rewriteValue_OpS390XMOVWBR(v)
   701  	case ssaop.OpS390XMOVWZload:
   702  		return rewriteValue_OpS390XMOVWZload(v)
   703  	case ssaop.OpS390XMOVWZreg:
   704  		return rewriteValue_OpS390XMOVWZreg(v)
   705  	case ssaop.OpS390XMOVWload:
   706  		return rewriteValue_OpS390XMOVWload(v)
   707  	case ssaop.OpS390XMOVWreg:
   708  		return rewriteValue_OpS390XMOVWreg(v)
   709  	case ssaop.OpS390XMOVWstore:
   710  		return rewriteValue_OpS390XMOVWstore(v)
   711  	case ssaop.OpS390XMOVWstoreconst:
   712  		return rewriteValue_OpS390XMOVWstoreconst(v)
   713  	case ssaop.OpS390XMOVWstoreidx:
   714  		return rewriteValue_OpS390XMOVWstoreidx(v)
   715  	case ssaop.OpS390XMULLD:
   716  		return rewriteValue_OpS390XMULLD(v)
   717  	case ssaop.OpS390XMULLDconst:
   718  		return rewriteValue_OpS390XMULLDconst(v)
   719  	case ssaop.OpS390XMULLDload:
   720  		return rewriteValue_OpS390XMULLDload(v)
   721  	case ssaop.OpS390XMULLW:
   722  		return rewriteValue_OpS390XMULLW(v)
   723  	case ssaop.OpS390XMULLWconst:
   724  		return rewriteValue_OpS390XMULLWconst(v)
   725  	case ssaop.OpS390XMULLWload:
   726  		return rewriteValue_OpS390XMULLWload(v)
   727  	case ssaop.OpS390XNEG:
   728  		return rewriteValue_OpS390XNEG(v)
   729  	case ssaop.OpS390XNEGW:
   730  		return rewriteValue_OpS390XNEGW(v)
   731  	case ssaop.OpS390XNOT:
   732  		return rewriteValue_OpS390XNOT(v)
   733  	case ssaop.OpS390XNOTW:
   734  		return rewriteValue_OpS390XNOTW(v)
   735  	case ssaop.OpS390XOR:
   736  		return rewriteValue_OpS390XOR(v)
   737  	case ssaop.OpS390XORW:
   738  		return rewriteValue_OpS390XORW(v)
   739  	case ssaop.OpS390XORWconst:
   740  		return rewriteValue_OpS390XORWconst(v)
   741  	case ssaop.OpS390XORWload:
   742  		return rewriteValue_OpS390XORWload(v)
   743  	case ssaop.OpS390XORconst:
   744  		return rewriteValue_OpS390XORconst(v)
   745  	case ssaop.OpS390XORload:
   746  		return rewriteValue_OpS390XORload(v)
   747  	case ssaop.OpS390XRISBGZ:
   748  		return rewriteValue_OpS390XRISBGZ(v)
   749  	case ssaop.OpS390XRLL:
   750  		return rewriteValue_OpS390XRLL(v)
   751  	case ssaop.OpS390XRLLG:
   752  		return rewriteValue_OpS390XRLLG(v)
   753  	case ssaop.OpS390XSLD:
   754  		return rewriteValue_OpS390XSLD(v)
   755  	case ssaop.OpS390XSLDconst:
   756  		return rewriteValue_OpS390XSLDconst(v)
   757  	case ssaop.OpS390XSLW:
   758  		return rewriteValue_OpS390XSLW(v)
   759  	case ssaop.OpS390XSLWconst:
   760  		return rewriteValue_OpS390XSLWconst(v)
   761  	case ssaop.OpS390XSRAD:
   762  		return rewriteValue_OpS390XSRAD(v)
   763  	case ssaop.OpS390XSRADconst:
   764  		return rewriteValue_OpS390XSRADconst(v)
   765  	case ssaop.OpS390XSRAW:
   766  		return rewriteValue_OpS390XSRAW(v)
   767  	case ssaop.OpS390XSRAWconst:
   768  		return rewriteValue_OpS390XSRAWconst(v)
   769  	case ssaop.OpS390XSRD:
   770  		return rewriteValue_OpS390XSRD(v)
   771  	case ssaop.OpS390XSRDconst:
   772  		return rewriteValue_OpS390XSRDconst(v)
   773  	case ssaop.OpS390XSRW:
   774  		return rewriteValue_OpS390XSRW(v)
   775  	case ssaop.OpS390XSRWconst:
   776  		return rewriteValue_OpS390XSRWconst(v)
   777  	case ssaop.OpS390XSTM2:
   778  		return rewriteValue_OpS390XSTM2(v)
   779  	case ssaop.OpS390XSTMG2:
   780  		return rewriteValue_OpS390XSTMG2(v)
   781  	case ssaop.OpS390XSUB:
   782  		return rewriteValue_OpS390XSUB(v)
   783  	case ssaop.OpS390XSUBE:
   784  		return rewriteValue_OpS390XSUBE(v)
   785  	case ssaop.OpS390XSUBW:
   786  		return rewriteValue_OpS390XSUBW(v)
   787  	case ssaop.OpS390XSUBWconst:
   788  		return rewriteValue_OpS390XSUBWconst(v)
   789  	case ssaop.OpS390XSUBWload:
   790  		return rewriteValue_OpS390XSUBWload(v)
   791  	case ssaop.OpS390XSUBconst:
   792  		return rewriteValue_OpS390XSUBconst(v)
   793  	case ssaop.OpS390XSUBload:
   794  		return rewriteValue_OpS390XSUBload(v)
   795  	case ssaop.OpS390XSumBytes2:
   796  		return rewriteValue_OpS390XSumBytes2(v)
   797  	case ssaop.OpS390XSumBytes4:
   798  		return rewriteValue_OpS390XSumBytes4(v)
   799  	case ssaop.OpS390XSumBytes8:
   800  		return rewriteValue_OpS390XSumBytes8(v)
   801  	case ssaop.OpS390XXOR:
   802  		return rewriteValue_OpS390XXOR(v)
   803  	case ssaop.OpS390XXORW:
   804  		return rewriteValue_OpS390XXORW(v)
   805  	case ssaop.OpS390XXORWconst:
   806  		return rewriteValue_OpS390XXORWconst(v)
   807  	case ssaop.OpS390XXORWload:
   808  		return rewriteValue_OpS390XXORWload(v)
   809  	case ssaop.OpS390XXORconst:
   810  		return rewriteValue_OpS390XXORconst(v)
   811  	case ssaop.OpS390XXORload:
   812  		return rewriteValue_OpS390XXORload(v)
   813  	case ssaop.OpSelect0:
   814  		return rewriteValue_OpSelect0(v)
   815  	case ssaop.OpSelect1:
   816  		return rewriteValue_OpSelect1(v)
   817  	case ssaop.OpSignExt16to32:
   818  		v.Op = ssaop.OpS390XMOVHreg
   819  		return true
   820  	case ssaop.OpSignExt16to64:
   821  		v.Op = ssaop.OpS390XMOVHreg
   822  		return true
   823  	case ssaop.OpSignExt32to64:
   824  		v.Op = ssaop.OpS390XMOVWreg
   825  		return true
   826  	case ssaop.OpSignExt8to16:
   827  		v.Op = ssaop.OpS390XMOVBreg
   828  		return true
   829  	case ssaop.OpSignExt8to32:
   830  		v.Op = ssaop.OpS390XMOVBreg
   831  		return true
   832  	case ssaop.OpSignExt8to64:
   833  		v.Op = ssaop.OpS390XMOVBreg
   834  		return true
   835  	case ssaop.OpSlicemask:
   836  		return rewriteValue_OpSlicemask(v)
   837  	case ssaop.OpSqrt:
   838  		v.Op = ssaop.OpS390XFSQRT
   839  		return true
   840  	case ssaop.OpSqrt32:
   841  		v.Op = ssaop.OpS390XFSQRTS
   842  		return true
   843  	case ssaop.OpStaticCall:
   844  		v.Op = ssaop.OpS390XCALLstatic
   845  		return true
   846  	case ssaop.OpStore:
   847  		return rewriteValue_OpStore(v)
   848  	case ssaop.OpSub16:
   849  		v.Op = ssaop.OpS390XSUBW
   850  		return true
   851  	case ssaop.OpSub32:
   852  		v.Op = ssaop.OpS390XSUBW
   853  		return true
   854  	case ssaop.OpSub32F:
   855  		return rewriteValue_OpSub32F(v)
   856  	case ssaop.OpSub64:
   857  		v.Op = ssaop.OpS390XSUB
   858  		return true
   859  	case ssaop.OpSub64F:
   860  		return rewriteValue_OpSub64F(v)
   861  	case ssaop.OpSub8:
   862  		v.Op = ssaop.OpS390XSUBW
   863  		return true
   864  	case ssaop.OpSubPtr:
   865  		v.Op = ssaop.OpS390XSUB
   866  		return true
   867  	case ssaop.OpTailCall:
   868  		v.Op = ssaop.OpS390XCALLtail
   869  		return true
   870  	case ssaop.OpTailCallInter:
   871  		v.Op = ssaop.OpS390XCALLtailinter
   872  		return true
   873  	case ssaop.OpTrunc:
   874  		return rewriteValue_OpTrunc(v)
   875  	case ssaop.OpTrunc16to8:
   876  		v.Op = ssaop.OpCopy
   877  		return true
   878  	case ssaop.OpTrunc32to16:
   879  		v.Op = ssaop.OpCopy
   880  		return true
   881  	case ssaop.OpTrunc32to8:
   882  		v.Op = ssaop.OpCopy
   883  		return true
   884  	case ssaop.OpTrunc64to16:
   885  		v.Op = ssaop.OpCopy
   886  		return true
   887  	case ssaop.OpTrunc64to32:
   888  		v.Op = ssaop.OpCopy
   889  		return true
   890  	case ssaop.OpTrunc64to8:
   891  		v.Op = ssaop.OpCopy
   892  		return true
   893  	case ssaop.OpWB:
   894  		v.Op = ssaop.OpS390XLoweredWB
   895  		return true
   896  	case ssaop.OpXor16:
   897  		v.Op = ssaop.OpS390XXORW
   898  		return true
   899  	case ssaop.OpXor32:
   900  		v.Op = ssaop.OpS390XXORW
   901  		return true
   902  	case ssaop.OpXor64:
   903  		v.Op = ssaop.OpS390XXOR
   904  		return true
   905  	case ssaop.OpXor8:
   906  		v.Op = ssaop.OpS390XXORW
   907  		return true
   908  	case ssaop.OpZero:
   909  		return rewriteValue_OpZero(v)
   910  	case ssaop.OpZeroExt16to32:
   911  		v.Op = ssaop.OpS390XMOVHZreg
   912  		return true
   913  	case ssaop.OpZeroExt16to64:
   914  		v.Op = ssaop.OpS390XMOVHZreg
   915  		return true
   916  	case ssaop.OpZeroExt32to64:
   917  		v.Op = ssaop.OpS390XMOVWZreg
   918  		return true
   919  	case ssaop.OpZeroExt8to16:
   920  		v.Op = ssaop.OpS390XMOVBZreg
   921  		return true
   922  	case ssaop.OpZeroExt8to32:
   923  		v.Op = ssaop.OpS390XMOVBZreg
   924  		return true
   925  	case ssaop.OpZeroExt8to64:
   926  		v.Op = ssaop.OpS390XMOVBZreg
   927  		return true
   928  	}
   929  	return false
   930  }
   931  func rewriteValue_OpAdd32F(v *ssa.Value) bool {
   932  	v_1 := v.Args[1]
   933  	v_0 := v.Args[0]
   934  	b := v.Block
   935  	typ := &b.Func.Config.Types
   936  	// match: (Add32F x y)
   937  	// result: (Select0 (FADDS x y))
   938  	for {
   939  		x := v_0
   940  		y := v_1
   941  		v.Reset(ssaop.OpSelect0)
   942  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XFADDS, types.NewTuple(typ.Float32, types.TypeFlags))
   943  		v0.AddArg2(x, y)
   944  		v.AddArg(v0)
   945  		return true
   946  	}
   947  }
   948  func rewriteValue_OpAdd64F(v *ssa.Value) bool {
   949  	v_1 := v.Args[1]
   950  	v_0 := v.Args[0]
   951  	b := v.Block
   952  	typ := &b.Func.Config.Types
   953  	// match: (Add64F x y)
   954  	// result: (Select0 (FADD x y))
   955  	for {
   956  		x := v_0
   957  		y := v_1
   958  		v.Reset(ssaop.OpSelect0)
   959  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XFADD, types.NewTuple(typ.Float64, types.TypeFlags))
   960  		v0.AddArg2(x, y)
   961  		v.AddArg(v0)
   962  		return true
   963  	}
   964  }
   965  func rewriteValue_OpAddr(v *ssa.Value) bool {
   966  	v_0 := v.Args[0]
   967  	// match: (Addr {sym} base)
   968  	// result: (MOVDaddr {sym} base)
   969  	for {
   970  		sym := ssa.AuxToSym(v.Aux)
   971  		base := v_0
   972  		v.Reset(ssaop.OpS390XMOVDaddr)
   973  		v.Aux = ssa.SymToAux(sym)
   974  		v.AddArg(base)
   975  		return true
   976  	}
   977  }
   978  func rewriteValue_OpAtomicAdd32(v *ssa.Value) bool {
   979  	v_2 := v.Args[2]
   980  	v_1 := v.Args[1]
   981  	v_0 := v.Args[0]
   982  	b := v.Block
   983  	typ := &b.Func.Config.Types
   984  	// match: (AtomicAdd32 ptr val mem)
   985  	// result: (AddTupleFirst32 val (LAA ptr val mem))
   986  	for {
   987  		ptr := v_0
   988  		val := v_1
   989  		mem := v_2
   990  		v.Reset(ssaop.OpS390XAddTupleFirst32)
   991  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLAA, types.NewTuple(typ.UInt32, types.TypeMem))
   992  		v0.AddArg3(ptr, val, mem)
   993  		v.AddArg2(val, v0)
   994  		return true
   995  	}
   996  }
   997  func rewriteValue_OpAtomicAdd64(v *ssa.Value) bool {
   998  	v_2 := v.Args[2]
   999  	v_1 := v.Args[1]
  1000  	v_0 := v.Args[0]
  1001  	b := v.Block
  1002  	typ := &b.Func.Config.Types
  1003  	// match: (AtomicAdd64 ptr val mem)
  1004  	// result: (AddTupleFirst64 val (LAAG ptr val mem))
  1005  	for {
  1006  		ptr := v_0
  1007  		val := v_1
  1008  		mem := v_2
  1009  		v.Reset(ssaop.OpS390XAddTupleFirst64)
  1010  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLAAG, types.NewTuple(typ.UInt64, types.TypeMem))
  1011  		v0.AddArg3(ptr, val, mem)
  1012  		v.AddArg2(val, v0)
  1013  		return true
  1014  	}
  1015  }
  1016  func rewriteValue_OpAtomicAnd8(v *ssa.Value) bool {
  1017  	v_2 := v.Args[2]
  1018  	v_1 := v.Args[1]
  1019  	v_0 := v.Args[0]
  1020  	b := v.Block
  1021  	typ := &b.Func.Config.Types
  1022  	// match: (AtomicAnd8 ptr val mem)
  1023  	// 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)
  1024  	for {
  1025  		ptr := v_0
  1026  		val := v_1
  1027  		mem := v_2
  1028  		v.Reset(ssaop.OpS390XLANfloor)
  1029  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XRLL, typ.UInt32)
  1030  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XORWconst, typ.UInt32)
  1031  		v1.AuxInt = ssa.Int32ToAuxInt(-1 << 8)
  1032  		v1.AddArg(val)
  1033  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XRXSBG, typ.UInt32)
  1034  		v2.Aux = ssa.S390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1035  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1036  		v3.AuxInt = ssa.Int64ToAuxInt(3 << 3)
  1037  		v2.AddArg2(v3, ptr)
  1038  		v0.AddArg2(v1, v2)
  1039  		v.AddArg3(ptr, v0, mem)
  1040  		return true
  1041  	}
  1042  }
  1043  func rewriteValue_OpAtomicCompareAndSwap32(v *ssa.Value) bool {
  1044  	v_3 := v.Args[3]
  1045  	v_2 := v.Args[2]
  1046  	v_1 := v.Args[1]
  1047  	v_0 := v.Args[0]
  1048  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
  1049  	// result: (LoweredAtomicCas32 ptr old new_ mem)
  1050  	for {
  1051  		ptr := v_0
  1052  		old := v_1
  1053  		new_ := v_2
  1054  		mem := v_3
  1055  		v.Reset(ssaop.OpS390XLoweredAtomicCas32)
  1056  		v.AddArg4(ptr, old, new_, mem)
  1057  		return true
  1058  	}
  1059  }
  1060  func rewriteValue_OpAtomicCompareAndSwap64(v *ssa.Value) bool {
  1061  	v_3 := v.Args[3]
  1062  	v_2 := v.Args[2]
  1063  	v_1 := v.Args[1]
  1064  	v_0 := v.Args[0]
  1065  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
  1066  	// result: (LoweredAtomicCas64 ptr old new_ mem)
  1067  	for {
  1068  		ptr := v_0
  1069  		old := v_1
  1070  		new_ := v_2
  1071  		mem := v_3
  1072  		v.Reset(ssaop.OpS390XLoweredAtomicCas64)
  1073  		v.AddArg4(ptr, old, new_, mem)
  1074  		return true
  1075  	}
  1076  }
  1077  func rewriteValue_OpAtomicExchange32(v *ssa.Value) bool {
  1078  	v_2 := v.Args[2]
  1079  	v_1 := v.Args[1]
  1080  	v_0 := v.Args[0]
  1081  	// match: (AtomicExchange32 ptr val mem)
  1082  	// result: (LoweredAtomicExchange32 ptr val mem)
  1083  	for {
  1084  		ptr := v_0
  1085  		val := v_1
  1086  		mem := v_2
  1087  		v.Reset(ssaop.OpS390XLoweredAtomicExchange32)
  1088  		v.AddArg3(ptr, val, mem)
  1089  		return true
  1090  	}
  1091  }
  1092  func rewriteValue_OpAtomicExchange64(v *ssa.Value) bool {
  1093  	v_2 := v.Args[2]
  1094  	v_1 := v.Args[1]
  1095  	v_0 := v.Args[0]
  1096  	// match: (AtomicExchange64 ptr val mem)
  1097  	// result: (LoweredAtomicExchange64 ptr val mem)
  1098  	for {
  1099  		ptr := v_0
  1100  		val := v_1
  1101  		mem := v_2
  1102  		v.Reset(ssaop.OpS390XLoweredAtomicExchange64)
  1103  		v.AddArg3(ptr, val, mem)
  1104  		return true
  1105  	}
  1106  }
  1107  func rewriteValue_OpAtomicLoad32(v *ssa.Value) bool {
  1108  	v_1 := v.Args[1]
  1109  	v_0 := v.Args[0]
  1110  	// match: (AtomicLoad32 ptr mem)
  1111  	// result: (MOVWZatomicload ptr mem)
  1112  	for {
  1113  		ptr := v_0
  1114  		mem := v_1
  1115  		v.Reset(ssaop.OpS390XMOVWZatomicload)
  1116  		v.AddArg2(ptr, mem)
  1117  		return true
  1118  	}
  1119  }
  1120  func rewriteValue_OpAtomicLoad64(v *ssa.Value) bool {
  1121  	v_1 := v.Args[1]
  1122  	v_0 := v.Args[0]
  1123  	// match: (AtomicLoad64 ptr mem)
  1124  	// result: (MOVDatomicload ptr mem)
  1125  	for {
  1126  		ptr := v_0
  1127  		mem := v_1
  1128  		v.Reset(ssaop.OpS390XMOVDatomicload)
  1129  		v.AddArg2(ptr, mem)
  1130  		return true
  1131  	}
  1132  }
  1133  func rewriteValue_OpAtomicLoad8(v *ssa.Value) bool {
  1134  	v_1 := v.Args[1]
  1135  	v_0 := v.Args[0]
  1136  	// match: (AtomicLoad8 ptr mem)
  1137  	// result: (MOVBZatomicload ptr mem)
  1138  	for {
  1139  		ptr := v_0
  1140  		mem := v_1
  1141  		v.Reset(ssaop.OpS390XMOVBZatomicload)
  1142  		v.AddArg2(ptr, mem)
  1143  		return true
  1144  	}
  1145  }
  1146  func rewriteValue_OpAtomicLoadAcq32(v *ssa.Value) bool {
  1147  	v_1 := v.Args[1]
  1148  	v_0 := v.Args[0]
  1149  	// match: (AtomicLoadAcq32 ptr mem)
  1150  	// result: (MOVWZatomicload ptr mem)
  1151  	for {
  1152  		ptr := v_0
  1153  		mem := v_1
  1154  		v.Reset(ssaop.OpS390XMOVWZatomicload)
  1155  		v.AddArg2(ptr, mem)
  1156  		return true
  1157  	}
  1158  }
  1159  func rewriteValue_OpAtomicLoadPtr(v *ssa.Value) bool {
  1160  	v_1 := v.Args[1]
  1161  	v_0 := v.Args[0]
  1162  	// match: (AtomicLoadPtr ptr mem)
  1163  	// result: (MOVDatomicload ptr mem)
  1164  	for {
  1165  		ptr := v_0
  1166  		mem := v_1
  1167  		v.Reset(ssaop.OpS390XMOVDatomicload)
  1168  		v.AddArg2(ptr, mem)
  1169  		return true
  1170  	}
  1171  }
  1172  func rewriteValue_OpAtomicOr8(v *ssa.Value) bool {
  1173  	v_2 := v.Args[2]
  1174  	v_1 := v.Args[1]
  1175  	v_0 := v.Args[0]
  1176  	b := v.Block
  1177  	typ := &b.Func.Config.Types
  1178  	// match: (AtomicOr8 ptr val mem)
  1179  	// result: (LAOfloor ptr (SLW <typ.UInt32> (MOVBZreg <typ.UInt32> val) (RXSBG <typ.UInt32> {s390x.NewRotateParams(59, 60, 3)} (MOVDconst [3<<3]) ptr)) mem)
  1180  	for {
  1181  		ptr := v_0
  1182  		val := v_1
  1183  		mem := v_2
  1184  		v.Reset(ssaop.OpS390XLAOfloor)
  1185  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, typ.UInt32)
  1186  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt32)
  1187  		v1.AddArg(val)
  1188  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XRXSBG, typ.UInt32)
  1189  		v2.Aux = ssa.S390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1190  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1191  		v3.AuxInt = ssa.Int64ToAuxInt(3 << 3)
  1192  		v2.AddArg2(v3, ptr)
  1193  		v0.AddArg2(v1, v2)
  1194  		v.AddArg3(ptr, v0, mem)
  1195  		return true
  1196  	}
  1197  }
  1198  func rewriteValue_OpAtomicStore32(v *ssa.Value) bool {
  1199  	v_2 := v.Args[2]
  1200  	v_1 := v.Args[1]
  1201  	v_0 := v.Args[0]
  1202  	b := v.Block
  1203  	// match: (AtomicStore32 ptr val mem)
  1204  	// result: (SYNC (MOVWatomicstore ptr val mem))
  1205  	for {
  1206  		ptr := v_0
  1207  		val := v_1
  1208  		mem := v_2
  1209  		v.Reset(ssaop.OpS390XSYNC)
  1210  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWatomicstore, types.TypeMem)
  1211  		v0.AddArg3(ptr, val, mem)
  1212  		v.AddArg(v0)
  1213  		return true
  1214  	}
  1215  }
  1216  func rewriteValue_OpAtomicStore64(v *ssa.Value) bool {
  1217  	v_2 := v.Args[2]
  1218  	v_1 := v.Args[1]
  1219  	v_0 := v.Args[0]
  1220  	b := v.Block
  1221  	// match: (AtomicStore64 ptr val mem)
  1222  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1223  	for {
  1224  		ptr := v_0
  1225  		val := v_1
  1226  		mem := v_2
  1227  		v.Reset(ssaop.OpS390XSYNC)
  1228  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDatomicstore, types.TypeMem)
  1229  		v0.AddArg3(ptr, val, mem)
  1230  		v.AddArg(v0)
  1231  		return true
  1232  	}
  1233  }
  1234  func rewriteValue_OpAtomicStore8(v *ssa.Value) bool {
  1235  	v_2 := v.Args[2]
  1236  	v_1 := v.Args[1]
  1237  	v_0 := v.Args[0]
  1238  	b := v.Block
  1239  	// match: (AtomicStore8 ptr val mem)
  1240  	// result: (SYNC (MOVBatomicstore ptr val mem))
  1241  	for {
  1242  		ptr := v_0
  1243  		val := v_1
  1244  		mem := v_2
  1245  		v.Reset(ssaop.OpS390XSYNC)
  1246  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBatomicstore, types.TypeMem)
  1247  		v0.AddArg3(ptr, val, mem)
  1248  		v.AddArg(v0)
  1249  		return true
  1250  	}
  1251  }
  1252  func rewriteValue_OpAtomicStorePtrNoWB(v *ssa.Value) bool {
  1253  	v_2 := v.Args[2]
  1254  	v_1 := v.Args[1]
  1255  	v_0 := v.Args[0]
  1256  	b := v.Block
  1257  	// match: (AtomicStorePtrNoWB ptr val mem)
  1258  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1259  	for {
  1260  		ptr := v_0
  1261  		val := v_1
  1262  		mem := v_2
  1263  		v.Reset(ssaop.OpS390XSYNC)
  1264  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDatomicstore, types.TypeMem)
  1265  		v0.AddArg3(ptr, val, mem)
  1266  		v.AddArg(v0)
  1267  		return true
  1268  	}
  1269  }
  1270  func rewriteValue_OpAtomicStoreRel32(v *ssa.Value) bool {
  1271  	v_2 := v.Args[2]
  1272  	v_1 := v.Args[1]
  1273  	v_0 := v.Args[0]
  1274  	// match: (AtomicStoreRel32 ptr val mem)
  1275  	// result: (MOVWatomicstore ptr val mem)
  1276  	for {
  1277  		ptr := v_0
  1278  		val := v_1
  1279  		mem := v_2
  1280  		v.Reset(ssaop.OpS390XMOVWatomicstore)
  1281  		v.AddArg3(ptr, val, mem)
  1282  		return true
  1283  	}
  1284  }
  1285  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
  1286  	v_1 := v.Args[1]
  1287  	v_0 := v.Args[0]
  1288  	b := v.Block
  1289  	// match: (Avg64u <t> x y)
  1290  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1291  	for {
  1292  		t := v.Type
  1293  		x := v_0
  1294  		y := v_1
  1295  		v.Reset(ssaop.OpS390XADD)
  1296  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRDconst, t)
  1297  		v0.AuxInt = ssa.Uint8ToAuxInt(1)
  1298  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSUB, t)
  1299  		v1.AddArg2(x, y)
  1300  		v0.AddArg(v1)
  1301  		v.AddArg2(v0, y)
  1302  		return true
  1303  	}
  1304  }
  1305  func rewriteValue_OpBitLen16(v *ssa.Value) bool {
  1306  	v_0 := v.Args[0]
  1307  	b := v.Block
  1308  	typ := &b.Func.Config.Types
  1309  	// match: (BitLen16 x)
  1310  	// result: (BitLen64 (ZeroExt16to64 x))
  1311  	for {
  1312  		x := v_0
  1313  		v.Reset(ssaop.OpBitLen64)
  1314  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1315  		v0.AddArg(x)
  1316  		v.AddArg(v0)
  1317  		return true
  1318  	}
  1319  }
  1320  func rewriteValue_OpBitLen32(v *ssa.Value) bool {
  1321  	v_0 := v.Args[0]
  1322  	b := v.Block
  1323  	typ := &b.Func.Config.Types
  1324  	// match: (BitLen32 x)
  1325  	// result: (BitLen64 (ZeroExt32to64 x))
  1326  	for {
  1327  		x := v_0
  1328  		v.Reset(ssaop.OpBitLen64)
  1329  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1330  		v0.AddArg(x)
  1331  		v.AddArg(v0)
  1332  		return true
  1333  	}
  1334  }
  1335  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
  1336  	v_0 := v.Args[0]
  1337  	b := v.Block
  1338  	typ := &b.Func.Config.Types
  1339  	// match: (BitLen64 x)
  1340  	// result: (SUB (MOVDconst [64]) (FLOGR x))
  1341  	for {
  1342  		x := v_0
  1343  		v.Reset(ssaop.OpS390XSUB)
  1344  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1345  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1346  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XFLOGR, typ.UInt64)
  1347  		v1.AddArg(x)
  1348  		v.AddArg2(v0, v1)
  1349  		return true
  1350  	}
  1351  }
  1352  func rewriteValue_OpBitLen8(v *ssa.Value) bool {
  1353  	v_0 := v.Args[0]
  1354  	b := v.Block
  1355  	typ := &b.Func.Config.Types
  1356  	// match: (BitLen8 x)
  1357  	// result: (BitLen64 (ZeroExt8to64 x))
  1358  	for {
  1359  		x := v_0
  1360  		v.Reset(ssaop.OpBitLen64)
  1361  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1362  		v0.AddArg(x)
  1363  		v.AddArg(v0)
  1364  		return true
  1365  	}
  1366  }
  1367  func rewriteValue_OpBswap16(v *ssa.Value) bool {
  1368  	v_0 := v.Args[0]
  1369  	b := v.Block
  1370  	typ := &b.Func.Config.Types
  1371  	// match: (Bswap16 x:(MOVHZload [off] {sym} ptr mem))
  1372  	// result: @x.Block (MOVHZreg (MOVHBRload [off] {sym} ptr mem))
  1373  	for {
  1374  		x := v_0
  1375  		if x.Op != ssaop.OpS390XMOVHZload {
  1376  			break
  1377  		}
  1378  		off := ssa.AuxIntToInt32(x.AuxInt)
  1379  		sym := ssa.AuxToSym(x.Aux)
  1380  		mem := x.Args[1]
  1381  		ptr := x.Args[0]
  1382  		b = x.Block
  1383  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  1384  		v.CopyOf(v0)
  1385  		v1 := b.NewValue0(x.Pos, ssaop.OpS390XMOVHBRload, typ.UInt16)
  1386  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  1387  		v1.Aux = ssa.SymToAux(sym)
  1388  		v1.AddArg2(ptr, mem)
  1389  		v0.AddArg(v1)
  1390  		return true
  1391  	}
  1392  	// match: (Bswap16 x:(MOVHZloadidx [off] {sym} ptr idx mem))
  1393  	// result: @x.Block (MOVHZreg (MOVHBRloadidx [off] {sym} ptr idx mem))
  1394  	for {
  1395  		x := v_0
  1396  		if x.Op != ssaop.OpS390XMOVHZloadidx {
  1397  			break
  1398  		}
  1399  		off := ssa.AuxIntToInt32(x.AuxInt)
  1400  		sym := ssa.AuxToSym(x.Aux)
  1401  		mem := x.Args[2]
  1402  		ptr := x.Args[0]
  1403  		idx := x.Args[1]
  1404  		b = x.Block
  1405  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  1406  		v.CopyOf(v0)
  1407  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHBRloadidx, typ.Int16)
  1408  		v1.AuxInt = ssa.Int32ToAuxInt(off)
  1409  		v1.Aux = ssa.SymToAux(sym)
  1410  		v1.AddArg3(ptr, idx, mem)
  1411  		v0.AddArg(v1)
  1412  		return true
  1413  	}
  1414  	return false
  1415  }
  1416  func rewriteValue_OpCeil(v *ssa.Value) bool {
  1417  	v_0 := v.Args[0]
  1418  	// match: (Ceil x)
  1419  	// result: (FIDBR [6] x)
  1420  	for {
  1421  		x := v_0
  1422  		v.Reset(ssaop.OpS390XFIDBR)
  1423  		v.AuxInt = ssa.Int8ToAuxInt(6)
  1424  		v.AddArg(x)
  1425  		return true
  1426  	}
  1427  }
  1428  func rewriteValue_OpConst16(v *ssa.Value) bool {
  1429  	// match: (Const16 [val])
  1430  	// result: (MOVDconst [int64(val)])
  1431  	for {
  1432  		val := ssa.AuxIntToInt16(v.AuxInt)
  1433  		v.Reset(ssaop.OpS390XMOVDconst)
  1434  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1435  		return true
  1436  	}
  1437  }
  1438  func rewriteValue_OpConst32(v *ssa.Value) bool {
  1439  	// match: (Const32 [val])
  1440  	// result: (MOVDconst [int64(val)])
  1441  	for {
  1442  		val := ssa.AuxIntToInt32(v.AuxInt)
  1443  		v.Reset(ssaop.OpS390XMOVDconst)
  1444  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1445  		return true
  1446  	}
  1447  }
  1448  func rewriteValue_OpConst64(v *ssa.Value) bool {
  1449  	// match: (Const64 [val])
  1450  	// result: (MOVDconst [int64(val)])
  1451  	for {
  1452  		val := ssa.AuxIntToInt64(v.AuxInt)
  1453  		v.Reset(ssaop.OpS390XMOVDconst)
  1454  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1455  		return true
  1456  	}
  1457  }
  1458  func rewriteValue_OpConst8(v *ssa.Value) bool {
  1459  	// match: (Const8 [val])
  1460  	// result: (MOVDconst [int64(val)])
  1461  	for {
  1462  		val := ssa.AuxIntToInt8(v.AuxInt)
  1463  		v.Reset(ssaop.OpS390XMOVDconst)
  1464  		v.AuxInt = ssa.Int64ToAuxInt(int64(val))
  1465  		return true
  1466  	}
  1467  }
  1468  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  1469  	// match: (ConstBool [t])
  1470  	// result: (MOVDconst [ssa.B2i(t)])
  1471  	for {
  1472  		t := ssa.AuxIntToBool(v.AuxInt)
  1473  		v.Reset(ssaop.OpS390XMOVDconst)
  1474  		v.AuxInt = ssa.Int64ToAuxInt(ssa.B2i(t))
  1475  		return true
  1476  	}
  1477  }
  1478  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  1479  	// match: (ConstNil)
  1480  	// result: (MOVDconst [0])
  1481  	for {
  1482  		v.Reset(ssaop.OpS390XMOVDconst)
  1483  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1484  		return true
  1485  	}
  1486  }
  1487  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  1488  	v_0 := v.Args[0]
  1489  	b := v.Block
  1490  	typ := &b.Func.Config.Types
  1491  	// match: (Ctz16 x)
  1492  	// result: (Ctz64 (Or64 <typ.UInt64> x (MOVDconst [1<<16])))
  1493  	for {
  1494  		x := v_0
  1495  		v.Reset(ssaop.OpCtz64)
  1496  		v0 := b.NewValue0(v.Pos, ssaop.OpOr64, typ.UInt64)
  1497  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1498  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 16)
  1499  		v0.AddArg2(x, v1)
  1500  		v.AddArg(v0)
  1501  		return true
  1502  	}
  1503  }
  1504  func rewriteValue_OpCtz32(v *ssa.Value) bool {
  1505  	v_0 := v.Args[0]
  1506  	b := v.Block
  1507  	typ := &b.Func.Config.Types
  1508  	// match: (Ctz32 <t> x)
  1509  	// result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW <t> (SUBWconst <t> [1] x) (NOTW <t> x)))))
  1510  	for {
  1511  		t := v.Type
  1512  		x := v_0
  1513  		v.Reset(ssaop.OpS390XSUB)
  1514  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1515  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1516  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XFLOGR, typ.UInt64)
  1517  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
  1518  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XANDW, t)
  1519  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XSUBWconst, t)
  1520  		v4.AuxInt = ssa.Int32ToAuxInt(1)
  1521  		v4.AddArg(x)
  1522  		v5 := b.NewValue0(v.Pos, ssaop.OpS390XNOTW, t)
  1523  		v5.AddArg(x)
  1524  		v3.AddArg2(v4, v5)
  1525  		v2.AddArg(v3)
  1526  		v1.AddArg(v2)
  1527  		v.AddArg2(v0, v1)
  1528  		return true
  1529  	}
  1530  }
  1531  func rewriteValue_OpCtz64(v *ssa.Value) bool {
  1532  	v_0 := v.Args[0]
  1533  	b := v.Block
  1534  	typ := &b.Func.Config.Types
  1535  	// match: (Ctz64 <t> x)
  1536  	// result: (SUB (MOVDconst [64]) (FLOGR (AND <t> (SUBconst <t> [1] x) (NOT <t> x))))
  1537  	for {
  1538  		t := v.Type
  1539  		x := v_0
  1540  		v.Reset(ssaop.OpS390XSUB)
  1541  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1542  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1543  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XFLOGR, typ.UInt64)
  1544  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XAND, t)
  1545  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XSUBconst, t)
  1546  		v3.AuxInt = ssa.Int32ToAuxInt(1)
  1547  		v3.AddArg(x)
  1548  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XNOT, t)
  1549  		v4.AddArg(x)
  1550  		v2.AddArg2(v3, v4)
  1551  		v1.AddArg(v2)
  1552  		v.AddArg2(v0, v1)
  1553  		return true
  1554  	}
  1555  }
  1556  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  1557  	v_0 := v.Args[0]
  1558  	b := v.Block
  1559  	typ := &b.Func.Config.Types
  1560  	// match: (Ctz8 x)
  1561  	// result: (Ctz64 (Or64 <typ.UInt64> x (MOVDconst [1<<8])))
  1562  	for {
  1563  		x := v_0
  1564  		v.Reset(ssaop.OpCtz64)
  1565  		v0 := b.NewValue0(v.Pos, ssaop.OpOr64, typ.UInt64)
  1566  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1567  		v1.AuxInt = ssa.Int64ToAuxInt(1 << 8)
  1568  		v0.AddArg2(x, v1)
  1569  		v.AddArg(v0)
  1570  		return true
  1571  	}
  1572  }
  1573  func rewriteValue_OpDiv16(v *ssa.Value) bool {
  1574  	v_1 := v.Args[1]
  1575  	v_0 := v.Args[0]
  1576  	b := v.Block
  1577  	typ := &b.Func.Config.Types
  1578  	// match: (Div16 x y)
  1579  	// result: (DIVW (MOVHreg x) (MOVHreg y))
  1580  	for {
  1581  		x := v_0
  1582  		y := v_1
  1583  		v.Reset(ssaop.OpS390XDIVW)
  1584  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  1585  		v0.AddArg(x)
  1586  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  1587  		v1.AddArg(y)
  1588  		v.AddArg2(v0, v1)
  1589  		return true
  1590  	}
  1591  }
  1592  func rewriteValue_OpDiv16u(v *ssa.Value) bool {
  1593  	v_1 := v.Args[1]
  1594  	v_0 := v.Args[0]
  1595  	b := v.Block
  1596  	typ := &b.Func.Config.Types
  1597  	// match: (Div16u x y)
  1598  	// result: (DIVWU (MOVHZreg x) (MOVHZreg y))
  1599  	for {
  1600  		x := v_0
  1601  		y := v_1
  1602  		v.Reset(ssaop.OpS390XDIVWU)
  1603  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  1604  		v0.AddArg(x)
  1605  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  1606  		v1.AddArg(y)
  1607  		v.AddArg2(v0, v1)
  1608  		return true
  1609  	}
  1610  }
  1611  func rewriteValue_OpDiv32(v *ssa.Value) bool {
  1612  	v_1 := v.Args[1]
  1613  	v_0 := v.Args[0]
  1614  	b := v.Block
  1615  	typ := &b.Func.Config.Types
  1616  	// match: (Div32 x y)
  1617  	// result: (DIVW (MOVWreg x) y)
  1618  	for {
  1619  		x := v_0
  1620  		y := v_1
  1621  		v.Reset(ssaop.OpS390XDIVW)
  1622  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWreg, typ.Int64)
  1623  		v0.AddArg(x)
  1624  		v.AddArg2(v0, y)
  1625  		return true
  1626  	}
  1627  }
  1628  func rewriteValue_OpDiv32u(v *ssa.Value) bool {
  1629  	v_1 := v.Args[1]
  1630  	v_0 := v.Args[0]
  1631  	b := v.Block
  1632  	typ := &b.Func.Config.Types
  1633  	// match: (Div32u x y)
  1634  	// result: (DIVWU (MOVWZreg x) y)
  1635  	for {
  1636  		x := v_0
  1637  		y := v_1
  1638  		v.Reset(ssaop.OpS390XDIVWU)
  1639  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
  1640  		v0.AddArg(x)
  1641  		v.AddArg2(v0, y)
  1642  		return true
  1643  	}
  1644  }
  1645  func rewriteValue_OpDiv64(v *ssa.Value) bool {
  1646  	v_1 := v.Args[1]
  1647  	v_0 := v.Args[0]
  1648  	// match: (Div64 x y)
  1649  	// result: (DIVD x y)
  1650  	for {
  1651  		x := v_0
  1652  		y := v_1
  1653  		v.Reset(ssaop.OpS390XDIVD)
  1654  		v.AddArg2(x, y)
  1655  		return true
  1656  	}
  1657  }
  1658  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  1659  	v_1 := v.Args[1]
  1660  	v_0 := v.Args[0]
  1661  	b := v.Block
  1662  	typ := &b.Func.Config.Types
  1663  	// match: (Div8 x y)
  1664  	// result: (DIVW (MOVBreg x) (MOVBreg y))
  1665  	for {
  1666  		x := v_0
  1667  		y := v_1
  1668  		v.Reset(ssaop.OpS390XDIVW)
  1669  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  1670  		v0.AddArg(x)
  1671  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  1672  		v1.AddArg(y)
  1673  		v.AddArg2(v0, v1)
  1674  		return true
  1675  	}
  1676  }
  1677  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  1678  	v_1 := v.Args[1]
  1679  	v_0 := v.Args[0]
  1680  	b := v.Block
  1681  	typ := &b.Func.Config.Types
  1682  	// match: (Div8u x y)
  1683  	// result: (DIVWU (MOVBZreg x) (MOVBZreg y))
  1684  	for {
  1685  		x := v_0
  1686  		y := v_1
  1687  		v.Reset(ssaop.OpS390XDIVWU)
  1688  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  1689  		v0.AddArg(x)
  1690  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  1691  		v1.AddArg(y)
  1692  		v.AddArg2(v0, v1)
  1693  		return true
  1694  	}
  1695  }
  1696  func rewriteValue_OpEq16(v *ssa.Value) bool {
  1697  	v_1 := v.Args[1]
  1698  	v_0 := v.Args[0]
  1699  	b := v.Block
  1700  	typ := &b.Func.Config.Types
  1701  	// match: (Eq16 x y)
  1702  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1703  	for {
  1704  		x := v_0
  1705  		y := v_1
  1706  		v.Reset(ssaop.OpS390XLOCGR)
  1707  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1708  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1709  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1710  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1711  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1712  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  1713  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  1714  		v3.AddArg(x)
  1715  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  1716  		v4.AddArg(y)
  1717  		v2.AddArg2(v3, v4)
  1718  		v.AddArg3(v0, v1, v2)
  1719  		return true
  1720  	}
  1721  }
  1722  func rewriteValue_OpEq32(v *ssa.Value) bool {
  1723  	v_1 := v.Args[1]
  1724  	v_0 := v.Args[0]
  1725  	b := v.Block
  1726  	typ := &b.Func.Config.Types
  1727  	// match: (Eq32 x y)
  1728  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1729  	for {
  1730  		x := v_0
  1731  		y := v_1
  1732  		v.Reset(ssaop.OpS390XLOCGR)
  1733  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1734  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1735  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1736  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1737  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1738  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  1739  		v2.AddArg2(x, y)
  1740  		v.AddArg3(v0, v1, v2)
  1741  		return true
  1742  	}
  1743  }
  1744  func rewriteValue_OpEq32F(v *ssa.Value) bool {
  1745  	v_1 := v.Args[1]
  1746  	v_0 := v.Args[0]
  1747  	b := v.Block
  1748  	typ := &b.Func.Config.Types
  1749  	// match: (Eq32F x y)
  1750  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1751  	for {
  1752  		x := v_0
  1753  		y := v_1
  1754  		v.Reset(ssaop.OpS390XLOCGR)
  1755  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1756  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1757  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1758  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1759  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1760  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMPS, types.TypeFlags)
  1761  		v2.AddArg2(x, y)
  1762  		v.AddArg3(v0, v1, v2)
  1763  		return true
  1764  	}
  1765  }
  1766  func rewriteValue_OpEq64(v *ssa.Value) bool {
  1767  	v_1 := v.Args[1]
  1768  	v_0 := v.Args[0]
  1769  	b := v.Block
  1770  	typ := &b.Func.Config.Types
  1771  	// match: (Eq64 x y)
  1772  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1773  	for {
  1774  		x := v_0
  1775  		y := v_1
  1776  		v.Reset(ssaop.OpS390XLOCGR)
  1777  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1778  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1779  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1780  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1781  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1782  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  1783  		v2.AddArg2(x, y)
  1784  		v.AddArg3(v0, v1, v2)
  1785  		return true
  1786  	}
  1787  }
  1788  func rewriteValue_OpEq64F(v *ssa.Value) bool {
  1789  	v_1 := v.Args[1]
  1790  	v_0 := v.Args[0]
  1791  	b := v.Block
  1792  	typ := &b.Func.Config.Types
  1793  	// match: (Eq64F x y)
  1794  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  1795  	for {
  1796  		x := v_0
  1797  		y := v_1
  1798  		v.Reset(ssaop.OpS390XLOCGR)
  1799  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1800  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1801  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1802  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1803  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1804  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMP, types.TypeFlags)
  1805  		v2.AddArg2(x, y)
  1806  		v.AddArg3(v0, v1, v2)
  1807  		return true
  1808  	}
  1809  }
  1810  func rewriteValue_OpEq8(v *ssa.Value) bool {
  1811  	v_1 := v.Args[1]
  1812  	v_0 := v.Args[0]
  1813  	b := v.Block
  1814  	typ := &b.Func.Config.Types
  1815  	// match: (Eq8 x y)
  1816  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1817  	for {
  1818  		x := v_0
  1819  		y := v_1
  1820  		v.Reset(ssaop.OpS390XLOCGR)
  1821  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1822  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1823  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1824  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1825  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1826  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  1827  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  1828  		v3.AddArg(x)
  1829  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  1830  		v4.AddArg(y)
  1831  		v2.AddArg2(v3, v4)
  1832  		v.AddArg3(v0, v1, v2)
  1833  		return true
  1834  	}
  1835  }
  1836  func rewriteValue_OpEqB(v *ssa.Value) bool {
  1837  	v_1 := v.Args[1]
  1838  	v_0 := v.Args[0]
  1839  	b := v.Block
  1840  	typ := &b.Func.Config.Types
  1841  	// match: (EqB x y)
  1842  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1843  	for {
  1844  		x := v_0
  1845  		y := v_1
  1846  		v.Reset(ssaop.OpS390XLOCGR)
  1847  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1848  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1849  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1850  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1851  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1852  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  1853  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  1854  		v3.AddArg(x)
  1855  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  1856  		v4.AddArg(y)
  1857  		v2.AddArg2(v3, v4)
  1858  		v.AddArg3(v0, v1, v2)
  1859  		return true
  1860  	}
  1861  }
  1862  func rewriteValue_OpEqPtr(v *ssa.Value) bool {
  1863  	v_1 := v.Args[1]
  1864  	v_0 := v.Args[0]
  1865  	b := v.Block
  1866  	typ := &b.Func.Config.Types
  1867  	// match: (EqPtr x y)
  1868  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1869  	for {
  1870  		x := v_0
  1871  		y := v_1
  1872  		v.Reset(ssaop.OpS390XLOCGR)
  1873  		v.Aux = ssa.S390xCCMaskToAux(s390x.Equal)
  1874  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1875  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1876  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1877  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1878  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  1879  		v2.AddArg2(x, y)
  1880  		v.AddArg3(v0, v1, v2)
  1881  		return true
  1882  	}
  1883  }
  1884  func rewriteValue_OpFMA(v *ssa.Value) bool {
  1885  	v_2 := v.Args[2]
  1886  	v_1 := v.Args[1]
  1887  	v_0 := v.Args[0]
  1888  	// match: (FMA x y z)
  1889  	// result: (FMADD z x y)
  1890  	for {
  1891  		x := v_0
  1892  		y := v_1
  1893  		z := v_2
  1894  		v.Reset(ssaop.OpS390XFMADD)
  1895  		v.AddArg3(z, x, y)
  1896  		return true
  1897  	}
  1898  }
  1899  func rewriteValue_OpFloor(v *ssa.Value) bool {
  1900  	v_0 := v.Args[0]
  1901  	// match: (Floor x)
  1902  	// result: (FIDBR [7] x)
  1903  	for {
  1904  		x := v_0
  1905  		v.Reset(ssaop.OpS390XFIDBR)
  1906  		v.AuxInt = ssa.Int8ToAuxInt(7)
  1907  		v.AddArg(x)
  1908  		return true
  1909  	}
  1910  }
  1911  func rewriteValue_OpHmul32(v *ssa.Value) bool {
  1912  	v_1 := v.Args[1]
  1913  	v_0 := v.Args[0]
  1914  	b := v.Block
  1915  	typ := &b.Func.Config.Types
  1916  	// match: (Hmul32 x y)
  1917  	// result: (SRDconst [32] (MULLD (MOVWreg x) (MOVWreg y)))
  1918  	for {
  1919  		x := v_0
  1920  		y := v_1
  1921  		v.Reset(ssaop.OpS390XSRDconst)
  1922  		v.AuxInt = ssa.Uint8ToAuxInt(32)
  1923  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMULLD, typ.Int64)
  1924  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWreg, typ.Int64)
  1925  		v1.AddArg(x)
  1926  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWreg, typ.Int64)
  1927  		v2.AddArg(y)
  1928  		v0.AddArg2(v1, v2)
  1929  		v.AddArg(v0)
  1930  		return true
  1931  	}
  1932  }
  1933  func rewriteValue_OpHmul32u(v *ssa.Value) bool {
  1934  	v_1 := v.Args[1]
  1935  	v_0 := v.Args[0]
  1936  	b := v.Block
  1937  	typ := &b.Func.Config.Types
  1938  	// match: (Hmul32u x y)
  1939  	// result: (SRDconst [32] (MULLD (MOVWZreg x) (MOVWZreg y)))
  1940  	for {
  1941  		x := v_0
  1942  		y := v_1
  1943  		v.Reset(ssaop.OpS390XSRDconst)
  1944  		v.AuxInt = ssa.Uint8ToAuxInt(32)
  1945  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMULLD, typ.Int64)
  1946  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
  1947  		v1.AddArg(x)
  1948  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
  1949  		v2.AddArg(y)
  1950  		v0.AddArg2(v1, v2)
  1951  		v.AddArg(v0)
  1952  		return true
  1953  	}
  1954  }
  1955  func rewriteValue_OpITab(v *ssa.Value) bool {
  1956  	v_0 := v.Args[0]
  1957  	// match: (ITab (Load ptr mem))
  1958  	// result: (MOVDload ptr mem)
  1959  	for {
  1960  		if v_0.Op != ssaop.OpLoad {
  1961  			break
  1962  		}
  1963  		mem := v_0.Args[1]
  1964  		ptr := v_0.Args[0]
  1965  		v.Reset(ssaop.OpS390XMOVDload)
  1966  		v.AddArg2(ptr, mem)
  1967  		return true
  1968  	}
  1969  	return false
  1970  }
  1971  func rewriteValue_OpIsInBounds(v *ssa.Value) bool {
  1972  	v_1 := v.Args[1]
  1973  	v_0 := v.Args[0]
  1974  	b := v.Block
  1975  	typ := &b.Func.Config.Types
  1976  	// match: (IsInBounds idx len)
  1977  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1978  	for {
  1979  		idx := v_0
  1980  		len := v_1
  1981  		v.Reset(ssaop.OpS390XLOCGR)
  1982  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  1983  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1984  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  1985  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  1986  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  1987  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPU, types.TypeFlags)
  1988  		v2.AddArg2(idx, len)
  1989  		v.AddArg3(v0, v1, v2)
  1990  		return true
  1991  	}
  1992  }
  1993  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  1994  	v_0 := v.Args[0]
  1995  	b := v.Block
  1996  	typ := &b.Func.Config.Types
  1997  	// match: (IsNonNil p)
  1998  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPconst p [0]))
  1999  	for {
  2000  		p := v_0
  2001  		v.Reset(ssaop.OpS390XLOCGR)
  2002  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  2003  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2004  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2005  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2006  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2007  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPconst, types.TypeFlags)
  2008  		v2.AuxInt = ssa.Int32ToAuxInt(0)
  2009  		v2.AddArg(p)
  2010  		v.AddArg3(v0, v1, v2)
  2011  		return true
  2012  	}
  2013  }
  2014  func rewriteValue_OpIsSliceInBounds(v *ssa.Value) bool {
  2015  	v_1 := v.Args[1]
  2016  	v_0 := v.Args[0]
  2017  	b := v.Block
  2018  	typ := &b.Func.Config.Types
  2019  	// match: (IsSliceInBounds idx len)
  2020  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  2021  	for {
  2022  		idx := v_0
  2023  		len := v_1
  2024  		v.Reset(ssaop.OpS390XLOCGR)
  2025  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2026  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2027  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2028  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2029  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2030  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPU, types.TypeFlags)
  2031  		v2.AddArg2(idx, len)
  2032  		v.AddArg3(v0, v1, v2)
  2033  		return true
  2034  	}
  2035  }
  2036  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  2037  	v_1 := v.Args[1]
  2038  	v_0 := v.Args[0]
  2039  	b := v.Block
  2040  	typ := &b.Func.Config.Types
  2041  	// match: (Leq16 x y)
  2042  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2043  	for {
  2044  		x := v_0
  2045  		y := v_1
  2046  		v.Reset(ssaop.OpS390XLOCGR)
  2047  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2048  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2049  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2050  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2051  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2052  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  2053  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  2054  		v3.AddArg(x)
  2055  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  2056  		v4.AddArg(y)
  2057  		v2.AddArg2(v3, v4)
  2058  		v.AddArg3(v0, v1, v2)
  2059  		return true
  2060  	}
  2061  }
  2062  func rewriteValue_OpLeq16U(v *ssa.Value) bool {
  2063  	v_1 := v.Args[1]
  2064  	v_0 := v.Args[0]
  2065  	b := v.Block
  2066  	typ := &b.Func.Config.Types
  2067  	// match: (Leq16U x y)
  2068  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2069  	for {
  2070  		x := v_0
  2071  		y := v_1
  2072  		v.Reset(ssaop.OpS390XLOCGR)
  2073  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2074  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2075  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2076  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2077  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2078  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  2079  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  2080  		v3.AddArg(x)
  2081  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  2082  		v4.AddArg(y)
  2083  		v2.AddArg2(v3, v4)
  2084  		v.AddArg3(v0, v1, v2)
  2085  		return true
  2086  	}
  2087  }
  2088  func rewriteValue_OpLeq32(v *ssa.Value) bool {
  2089  	v_1 := v.Args[1]
  2090  	v_0 := v.Args[0]
  2091  	b := v.Block
  2092  	typ := &b.Func.Config.Types
  2093  	// match: (Leq32 x y)
  2094  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2095  	for {
  2096  		x := v_0
  2097  		y := v_1
  2098  		v.Reset(ssaop.OpS390XLOCGR)
  2099  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2100  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2101  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2102  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2103  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2104  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  2105  		v2.AddArg2(x, y)
  2106  		v.AddArg3(v0, v1, v2)
  2107  		return true
  2108  	}
  2109  }
  2110  func rewriteValue_OpLeq32F(v *ssa.Value) bool {
  2111  	v_1 := v.Args[1]
  2112  	v_0 := v.Args[0]
  2113  	b := v.Block
  2114  	typ := &b.Func.Config.Types
  2115  	// match: (Leq32F x y)
  2116  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2117  	for {
  2118  		x := v_0
  2119  		y := v_1
  2120  		v.Reset(ssaop.OpS390XLOCGR)
  2121  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2122  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2123  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2124  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2125  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2126  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMPS, types.TypeFlags)
  2127  		v2.AddArg2(x, y)
  2128  		v.AddArg3(v0, v1, v2)
  2129  		return true
  2130  	}
  2131  }
  2132  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  2133  	v_1 := v.Args[1]
  2134  	v_0 := v.Args[0]
  2135  	b := v.Block
  2136  	typ := &b.Func.Config.Types
  2137  	// match: (Leq32U x y)
  2138  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2139  	for {
  2140  		x := v_0
  2141  		y := v_1
  2142  		v.Reset(ssaop.OpS390XLOCGR)
  2143  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2144  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2145  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2146  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2147  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2148  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  2149  		v2.AddArg2(x, y)
  2150  		v.AddArg3(v0, v1, v2)
  2151  		return true
  2152  	}
  2153  }
  2154  func rewriteValue_OpLeq64(v *ssa.Value) bool {
  2155  	v_1 := v.Args[1]
  2156  	v_0 := v.Args[0]
  2157  	b := v.Block
  2158  	typ := &b.Func.Config.Types
  2159  	// match: (Leq64 x y)
  2160  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2161  	for {
  2162  		x := v_0
  2163  		y := v_1
  2164  		v.Reset(ssaop.OpS390XLOCGR)
  2165  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2166  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2167  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2168  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2169  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2170  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  2171  		v2.AddArg2(x, y)
  2172  		v.AddArg3(v0, v1, v2)
  2173  		return true
  2174  	}
  2175  }
  2176  func rewriteValue_OpLeq64F(v *ssa.Value) bool {
  2177  	v_1 := v.Args[1]
  2178  	v_0 := v.Args[0]
  2179  	b := v.Block
  2180  	typ := &b.Func.Config.Types
  2181  	// match: (Leq64F x y)
  2182  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2183  	for {
  2184  		x := v_0
  2185  		y := v_1
  2186  		v.Reset(ssaop.OpS390XLOCGR)
  2187  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2188  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2189  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2190  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2191  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2192  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMP, types.TypeFlags)
  2193  		v2.AddArg2(x, y)
  2194  		v.AddArg3(v0, v1, v2)
  2195  		return true
  2196  	}
  2197  }
  2198  func rewriteValue_OpLeq64U(v *ssa.Value) bool {
  2199  	v_1 := v.Args[1]
  2200  	v_0 := v.Args[0]
  2201  	b := v.Block
  2202  	typ := &b.Func.Config.Types
  2203  	// match: (Leq64U x y)
  2204  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2205  	for {
  2206  		x := v_0
  2207  		y := v_1
  2208  		v.Reset(ssaop.OpS390XLOCGR)
  2209  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2210  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2211  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2212  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2213  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2214  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPU, types.TypeFlags)
  2215  		v2.AddArg2(x, y)
  2216  		v.AddArg3(v0, v1, v2)
  2217  		return true
  2218  	}
  2219  }
  2220  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  2221  	v_1 := v.Args[1]
  2222  	v_0 := v.Args[0]
  2223  	b := v.Block
  2224  	typ := &b.Func.Config.Types
  2225  	// match: (Leq8 x y)
  2226  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2227  	for {
  2228  		x := v_0
  2229  		y := v_1
  2230  		v.Reset(ssaop.OpS390XLOCGR)
  2231  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2232  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2233  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2234  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2235  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2236  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  2237  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  2238  		v3.AddArg(x)
  2239  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  2240  		v4.AddArg(y)
  2241  		v2.AddArg2(v3, v4)
  2242  		v.AddArg3(v0, v1, v2)
  2243  		return true
  2244  	}
  2245  }
  2246  func rewriteValue_OpLeq8U(v *ssa.Value) bool {
  2247  	v_1 := v.Args[1]
  2248  	v_0 := v.Args[0]
  2249  	b := v.Block
  2250  	typ := &b.Func.Config.Types
  2251  	// match: (Leq8U x y)
  2252  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2253  	for {
  2254  		x := v_0
  2255  		y := v_1
  2256  		v.Reset(ssaop.OpS390XLOCGR)
  2257  		v.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
  2258  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2259  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2260  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2261  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2262  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  2263  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  2264  		v3.AddArg(x)
  2265  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  2266  		v4.AddArg(y)
  2267  		v2.AddArg2(v3, v4)
  2268  		v.AddArg3(v0, v1, v2)
  2269  		return true
  2270  	}
  2271  }
  2272  func rewriteValue_OpLess16(v *ssa.Value) bool {
  2273  	v_1 := v.Args[1]
  2274  	v_0 := v.Args[0]
  2275  	b := v.Block
  2276  	typ := &b.Func.Config.Types
  2277  	// match: (Less16 x y)
  2278  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2279  	for {
  2280  		x := v_0
  2281  		y := v_1
  2282  		v.Reset(ssaop.OpS390XLOCGR)
  2283  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2284  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2285  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2286  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2287  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2288  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  2289  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  2290  		v3.AddArg(x)
  2291  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  2292  		v4.AddArg(y)
  2293  		v2.AddArg2(v3, v4)
  2294  		v.AddArg3(v0, v1, v2)
  2295  		return true
  2296  	}
  2297  }
  2298  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  2299  	v_1 := v.Args[1]
  2300  	v_0 := v.Args[0]
  2301  	b := v.Block
  2302  	typ := &b.Func.Config.Types
  2303  	// match: (Less16U x y)
  2304  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2305  	for {
  2306  		x := v_0
  2307  		y := v_1
  2308  		v.Reset(ssaop.OpS390XLOCGR)
  2309  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2310  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2311  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2312  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2313  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2314  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  2315  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  2316  		v3.AddArg(x)
  2317  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  2318  		v4.AddArg(y)
  2319  		v2.AddArg2(v3, v4)
  2320  		v.AddArg3(v0, v1, v2)
  2321  		return true
  2322  	}
  2323  }
  2324  func rewriteValue_OpLess32(v *ssa.Value) bool {
  2325  	v_1 := v.Args[1]
  2326  	v_0 := v.Args[0]
  2327  	b := v.Block
  2328  	typ := &b.Func.Config.Types
  2329  	// match: (Less32 x y)
  2330  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2331  	for {
  2332  		x := v_0
  2333  		y := v_1
  2334  		v.Reset(ssaop.OpS390XLOCGR)
  2335  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2336  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2337  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2338  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2339  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2340  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  2341  		v2.AddArg2(x, y)
  2342  		v.AddArg3(v0, v1, v2)
  2343  		return true
  2344  	}
  2345  }
  2346  func rewriteValue_OpLess32F(v *ssa.Value) bool {
  2347  	v_1 := v.Args[1]
  2348  	v_0 := v.Args[0]
  2349  	b := v.Block
  2350  	typ := &b.Func.Config.Types
  2351  	// match: (Less32F x y)
  2352  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2353  	for {
  2354  		x := v_0
  2355  		y := v_1
  2356  		v.Reset(ssaop.OpS390XLOCGR)
  2357  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2358  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2359  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2360  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2361  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2362  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMPS, types.TypeFlags)
  2363  		v2.AddArg2(x, y)
  2364  		v.AddArg3(v0, v1, v2)
  2365  		return true
  2366  	}
  2367  }
  2368  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  2369  	v_1 := v.Args[1]
  2370  	v_0 := v.Args[0]
  2371  	b := v.Block
  2372  	typ := &b.Func.Config.Types
  2373  	// match: (Less32U x y)
  2374  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2375  	for {
  2376  		x := v_0
  2377  		y := v_1
  2378  		v.Reset(ssaop.OpS390XLOCGR)
  2379  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2380  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2381  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2382  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2383  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2384  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  2385  		v2.AddArg2(x, y)
  2386  		v.AddArg3(v0, v1, v2)
  2387  		return true
  2388  	}
  2389  }
  2390  func rewriteValue_OpLess64(v *ssa.Value) bool {
  2391  	v_1 := v.Args[1]
  2392  	v_0 := v.Args[0]
  2393  	b := v.Block
  2394  	typ := &b.Func.Config.Types
  2395  	// match: (Less64 x y)
  2396  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2397  	for {
  2398  		x := v_0
  2399  		y := v_1
  2400  		v.Reset(ssaop.OpS390XLOCGR)
  2401  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2402  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2403  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2404  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2405  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2406  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  2407  		v2.AddArg2(x, y)
  2408  		v.AddArg3(v0, v1, v2)
  2409  		return true
  2410  	}
  2411  }
  2412  func rewriteValue_OpLess64F(v *ssa.Value) bool {
  2413  	v_1 := v.Args[1]
  2414  	v_0 := v.Args[0]
  2415  	b := v.Block
  2416  	typ := &b.Func.Config.Types
  2417  	// match: (Less64F x y)
  2418  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2419  	for {
  2420  		x := v_0
  2421  		y := v_1
  2422  		v.Reset(ssaop.OpS390XLOCGR)
  2423  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2424  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2425  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2426  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2427  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2428  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMP, types.TypeFlags)
  2429  		v2.AddArg2(x, y)
  2430  		v.AddArg3(v0, v1, v2)
  2431  		return true
  2432  	}
  2433  }
  2434  func rewriteValue_OpLess64U(v *ssa.Value) bool {
  2435  	v_1 := v.Args[1]
  2436  	v_0 := v.Args[0]
  2437  	b := v.Block
  2438  	typ := &b.Func.Config.Types
  2439  	// match: (Less64U x y)
  2440  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2441  	for {
  2442  		x := v_0
  2443  		y := v_1
  2444  		v.Reset(ssaop.OpS390XLOCGR)
  2445  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2446  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2447  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2448  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2449  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2450  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPU, types.TypeFlags)
  2451  		v2.AddArg2(x, y)
  2452  		v.AddArg3(v0, v1, v2)
  2453  		return true
  2454  	}
  2455  }
  2456  func rewriteValue_OpLess8(v *ssa.Value) bool {
  2457  	v_1 := v.Args[1]
  2458  	v_0 := v.Args[0]
  2459  	b := v.Block
  2460  	typ := &b.Func.Config.Types
  2461  	// match: (Less8 x y)
  2462  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2463  	for {
  2464  		x := v_0
  2465  		y := v_1
  2466  		v.Reset(ssaop.OpS390XLOCGR)
  2467  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2468  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2469  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2470  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2471  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2472  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  2473  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  2474  		v3.AddArg(x)
  2475  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  2476  		v4.AddArg(y)
  2477  		v2.AddArg2(v3, v4)
  2478  		v.AddArg3(v0, v1, v2)
  2479  		return true
  2480  	}
  2481  }
  2482  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  2483  	v_1 := v.Args[1]
  2484  	v_0 := v.Args[0]
  2485  	b := v.Block
  2486  	typ := &b.Func.Config.Types
  2487  	// match: (Less8U x y)
  2488  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2489  	for {
  2490  		x := v_0
  2491  		y := v_1
  2492  		v.Reset(ssaop.OpS390XLOCGR)
  2493  		v.Aux = ssa.S390xCCMaskToAux(s390x.Less)
  2494  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2495  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  2496  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2497  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  2498  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  2499  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  2500  		v3.AddArg(x)
  2501  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  2502  		v4.AddArg(y)
  2503  		v2.AddArg2(v3, v4)
  2504  		v.AddArg3(v0, v1, v2)
  2505  		return true
  2506  	}
  2507  }
  2508  func rewriteValue_OpLoad(v *ssa.Value) bool {
  2509  	v_1 := v.Args[1]
  2510  	v_0 := v.Args[0]
  2511  	// match: (Load <t> ptr mem)
  2512  	// cond: (ssa.Is64BitInt(t) ||ssa.IsPtr(t))
  2513  	// result: (MOVDload ptr mem)
  2514  	for {
  2515  		t := v.Type
  2516  		ptr := v_0
  2517  		mem := v_1
  2518  		if !(ssa.Is64BitInt(t) || ssa.IsPtr(t)) {
  2519  			break
  2520  		}
  2521  		v.Reset(ssaop.OpS390XMOVDload)
  2522  		v.AddArg2(ptr, mem)
  2523  		return true
  2524  	}
  2525  	// match: (Load <t> ptr mem)
  2526  	// cond: ssa.Is32BitInt(t) && t.IsSigned()
  2527  	// result: (MOVWload ptr mem)
  2528  	for {
  2529  		t := v.Type
  2530  		ptr := v_0
  2531  		mem := v_1
  2532  		if !(ssa.Is32BitInt(t) && t.IsSigned()) {
  2533  			break
  2534  		}
  2535  		v.Reset(ssaop.OpS390XMOVWload)
  2536  		v.AddArg2(ptr, mem)
  2537  		return true
  2538  	}
  2539  	// match: (Load <t> ptr mem)
  2540  	// cond: ssa.Is32BitInt(t) && !t.IsSigned()
  2541  	// result: (MOVWZload ptr mem)
  2542  	for {
  2543  		t := v.Type
  2544  		ptr := v_0
  2545  		mem := v_1
  2546  		if !(ssa.Is32BitInt(t) && !t.IsSigned()) {
  2547  			break
  2548  		}
  2549  		v.Reset(ssaop.OpS390XMOVWZload)
  2550  		v.AddArg2(ptr, mem)
  2551  		return true
  2552  	}
  2553  	// match: (Load <t> ptr mem)
  2554  	// cond: ssa.Is16BitInt(t) && t.IsSigned()
  2555  	// result: (MOVHload ptr mem)
  2556  	for {
  2557  		t := v.Type
  2558  		ptr := v_0
  2559  		mem := v_1
  2560  		if !(ssa.Is16BitInt(t) && t.IsSigned()) {
  2561  			break
  2562  		}
  2563  		v.Reset(ssaop.OpS390XMOVHload)
  2564  		v.AddArg2(ptr, mem)
  2565  		return true
  2566  	}
  2567  	// match: (Load <t> ptr mem)
  2568  	// cond: ssa.Is16BitInt(t) && !t.IsSigned()
  2569  	// result: (MOVHZload ptr mem)
  2570  	for {
  2571  		t := v.Type
  2572  		ptr := v_0
  2573  		mem := v_1
  2574  		if !(ssa.Is16BitInt(t) && !t.IsSigned()) {
  2575  			break
  2576  		}
  2577  		v.Reset(ssaop.OpS390XMOVHZload)
  2578  		v.AddArg2(ptr, mem)
  2579  		return true
  2580  	}
  2581  	// match: (Load <t> ptr mem)
  2582  	// cond: ssa.Is8BitInt(t) && t.IsSigned()
  2583  	// result: (MOVBload ptr mem)
  2584  	for {
  2585  		t := v.Type
  2586  		ptr := v_0
  2587  		mem := v_1
  2588  		if !(ssa.Is8BitInt(t) && t.IsSigned()) {
  2589  			break
  2590  		}
  2591  		v.Reset(ssaop.OpS390XMOVBload)
  2592  		v.AddArg2(ptr, mem)
  2593  		return true
  2594  	}
  2595  	// match: (Load <t> ptr mem)
  2596  	// cond: (t.IsBoolean() || (ssa.Is8BitInt(t) && !t.IsSigned()))
  2597  	// result: (MOVBZload ptr mem)
  2598  	for {
  2599  		t := v.Type
  2600  		ptr := v_0
  2601  		mem := v_1
  2602  		if !(t.IsBoolean() || (ssa.Is8BitInt(t) && !t.IsSigned())) {
  2603  			break
  2604  		}
  2605  		v.Reset(ssaop.OpS390XMOVBZload)
  2606  		v.AddArg2(ptr, mem)
  2607  		return true
  2608  	}
  2609  	// match: (Load <t> ptr mem)
  2610  	// cond: ssa.Is32BitFloat(t)
  2611  	// result: (FMOVSload ptr mem)
  2612  	for {
  2613  		t := v.Type
  2614  		ptr := v_0
  2615  		mem := v_1
  2616  		if !(ssa.Is32BitFloat(t)) {
  2617  			break
  2618  		}
  2619  		v.Reset(ssaop.OpS390XFMOVSload)
  2620  		v.AddArg2(ptr, mem)
  2621  		return true
  2622  	}
  2623  	// match: (Load <t> ptr mem)
  2624  	// cond: ssa.Is64BitFloat(t)
  2625  	// result: (FMOVDload ptr mem)
  2626  	for {
  2627  		t := v.Type
  2628  		ptr := v_0
  2629  		mem := v_1
  2630  		if !(ssa.Is64BitFloat(t)) {
  2631  			break
  2632  		}
  2633  		v.Reset(ssaop.OpS390XFMOVDload)
  2634  		v.AddArg2(ptr, mem)
  2635  		return true
  2636  	}
  2637  	return false
  2638  }
  2639  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  2640  	v_1 := v.Args[1]
  2641  	v_0 := v.Args[0]
  2642  	b := v.Block
  2643  	typ := &b.Func.Config.Types
  2644  	// match: (LocalAddr <t> {sym} base mem)
  2645  	// cond: t.Elem().HasPointers()
  2646  	// result: (MOVDaddr {sym} (SPanchored base mem))
  2647  	for {
  2648  		t := v.Type
  2649  		sym := ssa.AuxToSym(v.Aux)
  2650  		base := v_0
  2651  		mem := v_1
  2652  		if !(t.Elem().HasPointers()) {
  2653  			break
  2654  		}
  2655  		v.Reset(ssaop.OpS390XMOVDaddr)
  2656  		v.Aux = ssa.SymToAux(sym)
  2657  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  2658  		v0.AddArg2(base, mem)
  2659  		v.AddArg(v0)
  2660  		return true
  2661  	}
  2662  	// match: (LocalAddr <t> {sym} base _)
  2663  	// cond: !t.Elem().HasPointers()
  2664  	// result: (MOVDaddr {sym} base)
  2665  	for {
  2666  		t := v.Type
  2667  		sym := ssa.AuxToSym(v.Aux)
  2668  		base := v_0
  2669  		if !(!t.Elem().HasPointers()) {
  2670  			break
  2671  		}
  2672  		v.Reset(ssaop.OpS390XMOVDaddr)
  2673  		v.Aux = ssa.SymToAux(sym)
  2674  		v.AddArg(base)
  2675  		return true
  2676  	}
  2677  	return false
  2678  }
  2679  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  2680  	v_1 := v.Args[1]
  2681  	v_0 := v.Args[0]
  2682  	b := v.Block
  2683  	typ := &b.Func.Config.Types
  2684  	// match: (Lsh16x16 x y)
  2685  	// cond: ssa.ShiftIsBounded(v)
  2686  	// result: (SLW x y)
  2687  	for {
  2688  		x := v_0
  2689  		y := v_1
  2690  		if !(ssa.ShiftIsBounded(v)) {
  2691  			break
  2692  		}
  2693  		v.Reset(ssaop.OpS390XSLW)
  2694  		v.AddArg2(x, y)
  2695  		return true
  2696  	}
  2697  	// match: (Lsh16x16 <t> x y)
  2698  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2699  	for {
  2700  		t := v.Type
  2701  		x := v_0
  2702  		y := v_1
  2703  		v.Reset(ssaop.OpS390XLOCGR)
  2704  		v.Type = t
  2705  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2706  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2707  		v0.AddArg2(x, y)
  2708  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2709  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2710  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  2711  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2712  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  2713  		v3.AddArg(y)
  2714  		v2.AddArg(v3)
  2715  		v.AddArg3(v0, v1, v2)
  2716  		return true
  2717  	}
  2718  }
  2719  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  2720  	v_1 := v.Args[1]
  2721  	v_0 := v.Args[0]
  2722  	b := v.Block
  2723  	typ := &b.Func.Config.Types
  2724  	// match: (Lsh16x32 x y)
  2725  	// cond: ssa.ShiftIsBounded(v)
  2726  	// result: (SLW x y)
  2727  	for {
  2728  		x := v_0
  2729  		y := v_1
  2730  		if !(ssa.ShiftIsBounded(v)) {
  2731  			break
  2732  		}
  2733  		v.Reset(ssaop.OpS390XSLW)
  2734  		v.AddArg2(x, y)
  2735  		return true
  2736  	}
  2737  	// match: (Lsh16x32 <t> x y)
  2738  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2739  	for {
  2740  		t := v.Type
  2741  		x := v_0
  2742  		y := v_1
  2743  		v.Reset(ssaop.OpS390XLOCGR)
  2744  		v.Type = t
  2745  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2746  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2747  		v0.AddArg2(x, y)
  2748  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2749  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2750  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  2751  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2752  		v2.AddArg(y)
  2753  		v.AddArg3(v0, v1, v2)
  2754  		return true
  2755  	}
  2756  }
  2757  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
  2758  	v_1 := v.Args[1]
  2759  	v_0 := v.Args[0]
  2760  	b := v.Block
  2761  	typ := &b.Func.Config.Types
  2762  	// match: (Lsh16x64 x y)
  2763  	// cond: ssa.ShiftIsBounded(v)
  2764  	// result: (SLW x y)
  2765  	for {
  2766  		x := v_0
  2767  		y := v_1
  2768  		if !(ssa.ShiftIsBounded(v)) {
  2769  			break
  2770  		}
  2771  		v.Reset(ssaop.OpS390XSLW)
  2772  		v.AddArg2(x, y)
  2773  		return true
  2774  	}
  2775  	// match: (Lsh16x64 <t> x y)
  2776  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2777  	for {
  2778  		t := v.Type
  2779  		x := v_0
  2780  		y := v_1
  2781  		v.Reset(ssaop.OpS390XLOCGR)
  2782  		v.Type = t
  2783  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2784  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2785  		v0.AddArg2(x, y)
  2786  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2787  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2788  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  2789  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2790  		v2.AddArg(y)
  2791  		v.AddArg3(v0, v1, v2)
  2792  		return true
  2793  	}
  2794  }
  2795  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  2796  	v_1 := v.Args[1]
  2797  	v_0 := v.Args[0]
  2798  	b := v.Block
  2799  	typ := &b.Func.Config.Types
  2800  	// match: (Lsh16x8 x y)
  2801  	// cond: ssa.ShiftIsBounded(v)
  2802  	// result: (SLW x y)
  2803  	for {
  2804  		x := v_0
  2805  		y := v_1
  2806  		if !(ssa.ShiftIsBounded(v)) {
  2807  			break
  2808  		}
  2809  		v.Reset(ssaop.OpS390XSLW)
  2810  		v.AddArg2(x, y)
  2811  		return true
  2812  	}
  2813  	// match: (Lsh16x8 <t> x y)
  2814  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2815  	for {
  2816  		t := v.Type
  2817  		x := v_0
  2818  		y := v_1
  2819  		v.Reset(ssaop.OpS390XLOCGR)
  2820  		v.Type = t
  2821  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2822  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2823  		v0.AddArg2(x, y)
  2824  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2825  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2826  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  2827  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2828  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  2829  		v3.AddArg(y)
  2830  		v2.AddArg(v3)
  2831  		v.AddArg3(v0, v1, v2)
  2832  		return true
  2833  	}
  2834  }
  2835  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  2836  	v_1 := v.Args[1]
  2837  	v_0 := v.Args[0]
  2838  	b := v.Block
  2839  	typ := &b.Func.Config.Types
  2840  	// match: (Lsh32x16 x y)
  2841  	// cond: ssa.ShiftIsBounded(v)
  2842  	// result: (SLW x y)
  2843  	for {
  2844  		x := v_0
  2845  		y := v_1
  2846  		if !(ssa.ShiftIsBounded(v)) {
  2847  			break
  2848  		}
  2849  		v.Reset(ssaop.OpS390XSLW)
  2850  		v.AddArg2(x, y)
  2851  		return true
  2852  	}
  2853  	// match: (Lsh32x16 <t> x y)
  2854  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2855  	for {
  2856  		t := v.Type
  2857  		x := v_0
  2858  		y := v_1
  2859  		v.Reset(ssaop.OpS390XLOCGR)
  2860  		v.Type = t
  2861  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2862  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2863  		v0.AddArg2(x, y)
  2864  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2865  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2866  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  2867  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2868  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  2869  		v3.AddArg(y)
  2870  		v2.AddArg(v3)
  2871  		v.AddArg3(v0, v1, v2)
  2872  		return true
  2873  	}
  2874  }
  2875  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  2876  	v_1 := v.Args[1]
  2877  	v_0 := v.Args[0]
  2878  	b := v.Block
  2879  	typ := &b.Func.Config.Types
  2880  	// match: (Lsh32x32 x y)
  2881  	// cond: ssa.ShiftIsBounded(v)
  2882  	// result: (SLW x y)
  2883  	for {
  2884  		x := v_0
  2885  		y := v_1
  2886  		if !(ssa.ShiftIsBounded(v)) {
  2887  			break
  2888  		}
  2889  		v.Reset(ssaop.OpS390XSLW)
  2890  		v.AddArg2(x, y)
  2891  		return true
  2892  	}
  2893  	// match: (Lsh32x32 <t> x y)
  2894  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2895  	for {
  2896  		t := v.Type
  2897  		x := v_0
  2898  		y := v_1
  2899  		v.Reset(ssaop.OpS390XLOCGR)
  2900  		v.Type = t
  2901  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2902  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2903  		v0.AddArg2(x, y)
  2904  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2905  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2906  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  2907  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2908  		v2.AddArg(y)
  2909  		v.AddArg3(v0, v1, v2)
  2910  		return true
  2911  	}
  2912  }
  2913  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
  2914  	v_1 := v.Args[1]
  2915  	v_0 := v.Args[0]
  2916  	b := v.Block
  2917  	typ := &b.Func.Config.Types
  2918  	// match: (Lsh32x64 x y)
  2919  	// cond: ssa.ShiftIsBounded(v)
  2920  	// result: (SLW x y)
  2921  	for {
  2922  		x := v_0
  2923  		y := v_1
  2924  		if !(ssa.ShiftIsBounded(v)) {
  2925  			break
  2926  		}
  2927  		v.Reset(ssaop.OpS390XSLW)
  2928  		v.AddArg2(x, y)
  2929  		return true
  2930  	}
  2931  	// match: (Lsh32x64 <t> x y)
  2932  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2933  	for {
  2934  		t := v.Type
  2935  		x := v_0
  2936  		y := v_1
  2937  		v.Reset(ssaop.OpS390XLOCGR)
  2938  		v.Type = t
  2939  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2940  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2941  		v0.AddArg2(x, y)
  2942  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2943  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2944  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  2945  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2946  		v2.AddArg(y)
  2947  		v.AddArg3(v0, v1, v2)
  2948  		return true
  2949  	}
  2950  }
  2951  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  2952  	v_1 := v.Args[1]
  2953  	v_0 := v.Args[0]
  2954  	b := v.Block
  2955  	typ := &b.Func.Config.Types
  2956  	// match: (Lsh32x8 x y)
  2957  	// cond: ssa.ShiftIsBounded(v)
  2958  	// result: (SLW x y)
  2959  	for {
  2960  		x := v_0
  2961  		y := v_1
  2962  		if !(ssa.ShiftIsBounded(v)) {
  2963  			break
  2964  		}
  2965  		v.Reset(ssaop.OpS390XSLW)
  2966  		v.AddArg2(x, y)
  2967  		return true
  2968  	}
  2969  	// match: (Lsh32x8 <t> x y)
  2970  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2971  	for {
  2972  		t := v.Type
  2973  		x := v_0
  2974  		y := v_1
  2975  		v.Reset(ssaop.OpS390XLOCGR)
  2976  		v.Type = t
  2977  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  2978  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  2979  		v0.AddArg2(x, y)
  2980  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  2981  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2982  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  2983  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  2984  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  2985  		v3.AddArg(y)
  2986  		v2.AddArg(v3)
  2987  		v.AddArg3(v0, v1, v2)
  2988  		return true
  2989  	}
  2990  }
  2991  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
  2992  	v_1 := v.Args[1]
  2993  	v_0 := v.Args[0]
  2994  	b := v.Block
  2995  	typ := &b.Func.Config.Types
  2996  	// match: (Lsh64x16 x y)
  2997  	// cond: ssa.ShiftIsBounded(v)
  2998  	// result: (SLD x y)
  2999  	for {
  3000  		x := v_0
  3001  		y := v_1
  3002  		if !(ssa.ShiftIsBounded(v)) {
  3003  			break
  3004  		}
  3005  		v.Reset(ssaop.OpS390XSLD)
  3006  		v.AddArg2(x, y)
  3007  		return true
  3008  	}
  3009  	// match: (Lsh64x16 <t> x y)
  3010  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  3011  	for {
  3012  		t := v.Type
  3013  		x := v_0
  3014  		y := v_1
  3015  		v.Reset(ssaop.OpS390XLOCGR)
  3016  		v.Type = t
  3017  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3018  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLD, t)
  3019  		v0.AddArg2(x, y)
  3020  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3021  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3022  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  3023  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3024  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  3025  		v3.AddArg(y)
  3026  		v2.AddArg(v3)
  3027  		v.AddArg3(v0, v1, v2)
  3028  		return true
  3029  	}
  3030  }
  3031  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
  3032  	v_1 := v.Args[1]
  3033  	v_0 := v.Args[0]
  3034  	b := v.Block
  3035  	typ := &b.Func.Config.Types
  3036  	// match: (Lsh64x32 x y)
  3037  	// cond: ssa.ShiftIsBounded(v)
  3038  	// result: (SLD x y)
  3039  	for {
  3040  		x := v_0
  3041  		y := v_1
  3042  		if !(ssa.ShiftIsBounded(v)) {
  3043  			break
  3044  		}
  3045  		v.Reset(ssaop.OpS390XSLD)
  3046  		v.AddArg2(x, y)
  3047  		return true
  3048  	}
  3049  	// match: (Lsh64x32 <t> x y)
  3050  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3051  	for {
  3052  		t := v.Type
  3053  		x := v_0
  3054  		y := v_1
  3055  		v.Reset(ssaop.OpS390XLOCGR)
  3056  		v.Type = t
  3057  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3058  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLD, t)
  3059  		v0.AddArg2(x, y)
  3060  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3061  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3062  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  3063  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3064  		v2.AddArg(y)
  3065  		v.AddArg3(v0, v1, v2)
  3066  		return true
  3067  	}
  3068  }
  3069  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  3070  	v_1 := v.Args[1]
  3071  	v_0 := v.Args[0]
  3072  	b := v.Block
  3073  	typ := &b.Func.Config.Types
  3074  	// match: (Lsh64x64 x y)
  3075  	// cond: ssa.ShiftIsBounded(v)
  3076  	// result: (SLD x y)
  3077  	for {
  3078  		x := v_0
  3079  		y := v_1
  3080  		if !(ssa.ShiftIsBounded(v)) {
  3081  			break
  3082  		}
  3083  		v.Reset(ssaop.OpS390XSLD)
  3084  		v.AddArg2(x, y)
  3085  		return true
  3086  	}
  3087  	// match: (Lsh64x64 <t> x y)
  3088  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3089  	for {
  3090  		t := v.Type
  3091  		x := v_0
  3092  		y := v_1
  3093  		v.Reset(ssaop.OpS390XLOCGR)
  3094  		v.Type = t
  3095  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3096  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLD, t)
  3097  		v0.AddArg2(x, y)
  3098  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3099  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3100  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  3101  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3102  		v2.AddArg(y)
  3103  		v.AddArg3(v0, v1, v2)
  3104  		return true
  3105  	}
  3106  }
  3107  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  3108  	v_1 := v.Args[1]
  3109  	v_0 := v.Args[0]
  3110  	b := v.Block
  3111  	typ := &b.Func.Config.Types
  3112  	// match: (Lsh64x8 x y)
  3113  	// cond: ssa.ShiftIsBounded(v)
  3114  	// result: (SLD x y)
  3115  	for {
  3116  		x := v_0
  3117  		y := v_1
  3118  		if !(ssa.ShiftIsBounded(v)) {
  3119  			break
  3120  		}
  3121  		v.Reset(ssaop.OpS390XSLD)
  3122  		v.AddArg2(x, y)
  3123  		return true
  3124  	}
  3125  	// match: (Lsh64x8 <t> x y)
  3126  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3127  	for {
  3128  		t := v.Type
  3129  		x := v_0
  3130  		y := v_1
  3131  		v.Reset(ssaop.OpS390XLOCGR)
  3132  		v.Type = t
  3133  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3134  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLD, t)
  3135  		v0.AddArg2(x, y)
  3136  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3137  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3138  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  3139  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3140  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  3141  		v3.AddArg(y)
  3142  		v2.AddArg(v3)
  3143  		v.AddArg3(v0, v1, v2)
  3144  		return true
  3145  	}
  3146  }
  3147  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  3148  	v_1 := v.Args[1]
  3149  	v_0 := v.Args[0]
  3150  	b := v.Block
  3151  	typ := &b.Func.Config.Types
  3152  	// match: (Lsh8x16 x y)
  3153  	// cond: ssa.ShiftIsBounded(v)
  3154  	// result: (SLW x y)
  3155  	for {
  3156  		x := v_0
  3157  		y := v_1
  3158  		if !(ssa.ShiftIsBounded(v)) {
  3159  			break
  3160  		}
  3161  		v.Reset(ssaop.OpS390XSLW)
  3162  		v.AddArg2(x, y)
  3163  		return true
  3164  	}
  3165  	// match: (Lsh8x16 <t> x y)
  3166  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  3167  	for {
  3168  		t := v.Type
  3169  		x := v_0
  3170  		y := v_1
  3171  		v.Reset(ssaop.OpS390XLOCGR)
  3172  		v.Type = t
  3173  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3174  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  3175  		v0.AddArg2(x, y)
  3176  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3177  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3178  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  3179  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3180  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  3181  		v3.AddArg(y)
  3182  		v2.AddArg(v3)
  3183  		v.AddArg3(v0, v1, v2)
  3184  		return true
  3185  	}
  3186  }
  3187  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  3188  	v_1 := v.Args[1]
  3189  	v_0 := v.Args[0]
  3190  	b := v.Block
  3191  	typ := &b.Func.Config.Types
  3192  	// match: (Lsh8x32 x y)
  3193  	// cond: ssa.ShiftIsBounded(v)
  3194  	// result: (SLW x y)
  3195  	for {
  3196  		x := v_0
  3197  		y := v_1
  3198  		if !(ssa.ShiftIsBounded(v)) {
  3199  			break
  3200  		}
  3201  		v.Reset(ssaop.OpS390XSLW)
  3202  		v.AddArg2(x, y)
  3203  		return true
  3204  	}
  3205  	// match: (Lsh8x32 <t> x y)
  3206  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3207  	for {
  3208  		t := v.Type
  3209  		x := v_0
  3210  		y := v_1
  3211  		v.Reset(ssaop.OpS390XLOCGR)
  3212  		v.Type = t
  3213  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3214  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  3215  		v0.AddArg2(x, y)
  3216  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3217  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3218  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  3219  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3220  		v2.AddArg(y)
  3221  		v.AddArg3(v0, v1, v2)
  3222  		return true
  3223  	}
  3224  }
  3225  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  3226  	v_1 := v.Args[1]
  3227  	v_0 := v.Args[0]
  3228  	b := v.Block
  3229  	typ := &b.Func.Config.Types
  3230  	// match: (Lsh8x64 x y)
  3231  	// cond: ssa.ShiftIsBounded(v)
  3232  	// result: (SLW x y)
  3233  	for {
  3234  		x := v_0
  3235  		y := v_1
  3236  		if !(ssa.ShiftIsBounded(v)) {
  3237  			break
  3238  		}
  3239  		v.Reset(ssaop.OpS390XSLW)
  3240  		v.AddArg2(x, y)
  3241  		return true
  3242  	}
  3243  	// match: (Lsh8x64 <t> x y)
  3244  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3245  	for {
  3246  		t := v.Type
  3247  		x := v_0
  3248  		y := v_1
  3249  		v.Reset(ssaop.OpS390XLOCGR)
  3250  		v.Type = t
  3251  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3252  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  3253  		v0.AddArg2(x, y)
  3254  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3255  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3256  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  3257  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3258  		v2.AddArg(y)
  3259  		v.AddArg3(v0, v1, v2)
  3260  		return true
  3261  	}
  3262  }
  3263  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  3264  	v_1 := v.Args[1]
  3265  	v_0 := v.Args[0]
  3266  	b := v.Block
  3267  	typ := &b.Func.Config.Types
  3268  	// match: (Lsh8x8 x y)
  3269  	// cond: ssa.ShiftIsBounded(v)
  3270  	// result: (SLW x y)
  3271  	for {
  3272  		x := v_0
  3273  		y := v_1
  3274  		if !(ssa.ShiftIsBounded(v)) {
  3275  			break
  3276  		}
  3277  		v.Reset(ssaop.OpS390XSLW)
  3278  		v.AddArg2(x, y)
  3279  		return true
  3280  	}
  3281  	// match: (Lsh8x8 <t> x y)
  3282  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3283  	for {
  3284  		t := v.Type
  3285  		x := v_0
  3286  		y := v_1
  3287  		v.Reset(ssaop.OpS390XLOCGR)
  3288  		v.Type = t
  3289  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  3290  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLW, t)
  3291  		v0.AddArg2(x, y)
  3292  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3293  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  3294  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  3295  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  3296  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  3297  		v3.AddArg(y)
  3298  		v2.AddArg(v3)
  3299  		v.AddArg3(v0, v1, v2)
  3300  		return true
  3301  	}
  3302  }
  3303  func rewriteValue_OpMod16(v *ssa.Value) bool {
  3304  	v_1 := v.Args[1]
  3305  	v_0 := v.Args[0]
  3306  	b := v.Block
  3307  	typ := &b.Func.Config.Types
  3308  	// match: (Mod16 x y)
  3309  	// result: (MODW (MOVHreg x) (MOVHreg y))
  3310  	for {
  3311  		x := v_0
  3312  		y := v_1
  3313  		v.Reset(ssaop.OpS390XMODW)
  3314  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  3315  		v0.AddArg(x)
  3316  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  3317  		v1.AddArg(y)
  3318  		v.AddArg2(v0, v1)
  3319  		return true
  3320  	}
  3321  }
  3322  func rewriteValue_OpMod16u(v *ssa.Value) bool {
  3323  	v_1 := v.Args[1]
  3324  	v_0 := v.Args[0]
  3325  	b := v.Block
  3326  	typ := &b.Func.Config.Types
  3327  	// match: (Mod16u x y)
  3328  	// result: (MODWU (MOVHZreg x) (MOVHZreg y))
  3329  	for {
  3330  		x := v_0
  3331  		y := v_1
  3332  		v.Reset(ssaop.OpS390XMODWU)
  3333  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  3334  		v0.AddArg(x)
  3335  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  3336  		v1.AddArg(y)
  3337  		v.AddArg2(v0, v1)
  3338  		return true
  3339  	}
  3340  }
  3341  func rewriteValue_OpMod32(v *ssa.Value) bool {
  3342  	v_1 := v.Args[1]
  3343  	v_0 := v.Args[0]
  3344  	b := v.Block
  3345  	typ := &b.Func.Config.Types
  3346  	// match: (Mod32 x y)
  3347  	// result: (MODW (MOVWreg x) y)
  3348  	for {
  3349  		x := v_0
  3350  		y := v_1
  3351  		v.Reset(ssaop.OpS390XMODW)
  3352  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWreg, typ.Int64)
  3353  		v0.AddArg(x)
  3354  		v.AddArg2(v0, y)
  3355  		return true
  3356  	}
  3357  }
  3358  func rewriteValue_OpMod32u(v *ssa.Value) bool {
  3359  	v_1 := v.Args[1]
  3360  	v_0 := v.Args[0]
  3361  	b := v.Block
  3362  	typ := &b.Func.Config.Types
  3363  	// match: (Mod32u x y)
  3364  	// result: (MODWU (MOVWZreg x) y)
  3365  	for {
  3366  		x := v_0
  3367  		y := v_1
  3368  		v.Reset(ssaop.OpS390XMODWU)
  3369  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
  3370  		v0.AddArg(x)
  3371  		v.AddArg2(v0, y)
  3372  		return true
  3373  	}
  3374  }
  3375  func rewriteValue_OpMod64(v *ssa.Value) bool {
  3376  	v_1 := v.Args[1]
  3377  	v_0 := v.Args[0]
  3378  	// match: (Mod64 x y)
  3379  	// result: (MODD x y)
  3380  	for {
  3381  		x := v_0
  3382  		y := v_1
  3383  		v.Reset(ssaop.OpS390XMODD)
  3384  		v.AddArg2(x, y)
  3385  		return true
  3386  	}
  3387  }
  3388  func rewriteValue_OpMod8(v *ssa.Value) bool {
  3389  	v_1 := v.Args[1]
  3390  	v_0 := v.Args[0]
  3391  	b := v.Block
  3392  	typ := &b.Func.Config.Types
  3393  	// match: (Mod8 x y)
  3394  	// result: (MODW (MOVBreg x) (MOVBreg y))
  3395  	for {
  3396  		x := v_0
  3397  		y := v_1
  3398  		v.Reset(ssaop.OpS390XMODW)
  3399  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  3400  		v0.AddArg(x)
  3401  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  3402  		v1.AddArg(y)
  3403  		v.AddArg2(v0, v1)
  3404  		return true
  3405  	}
  3406  }
  3407  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  3408  	v_1 := v.Args[1]
  3409  	v_0 := v.Args[0]
  3410  	b := v.Block
  3411  	typ := &b.Func.Config.Types
  3412  	// match: (Mod8u x y)
  3413  	// result: (MODWU (MOVBZreg x) (MOVBZreg y))
  3414  	for {
  3415  		x := v_0
  3416  		y := v_1
  3417  		v.Reset(ssaop.OpS390XMODWU)
  3418  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  3419  		v0.AddArg(x)
  3420  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  3421  		v1.AddArg(y)
  3422  		v.AddArg2(v0, v1)
  3423  		return true
  3424  	}
  3425  }
  3426  func rewriteValue_OpMove(v *ssa.Value) bool {
  3427  	v_2 := v.Args[2]
  3428  	v_1 := v.Args[1]
  3429  	v_0 := v.Args[0]
  3430  	b := v.Block
  3431  	typ := &b.Func.Config.Types
  3432  	// match: (Move [0] _ _ mem)
  3433  	// result: mem
  3434  	for {
  3435  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  3436  			break
  3437  		}
  3438  		mem := v_2
  3439  		v.CopyOf(mem)
  3440  		return true
  3441  	}
  3442  	// match: (Move [1] dst src mem)
  3443  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3444  	for {
  3445  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  3446  			break
  3447  		}
  3448  		dst := v_0
  3449  		src := v_1
  3450  		mem := v_2
  3451  		v.Reset(ssaop.OpS390XMOVBstore)
  3452  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZload, typ.UInt8)
  3453  		v0.AddArg2(src, mem)
  3454  		v.AddArg3(dst, v0, mem)
  3455  		return true
  3456  	}
  3457  	// match: (Move [2] dst src mem)
  3458  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3459  	for {
  3460  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  3461  			break
  3462  		}
  3463  		dst := v_0
  3464  		src := v_1
  3465  		mem := v_2
  3466  		v.Reset(ssaop.OpS390XMOVHstore)
  3467  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZload, typ.UInt16)
  3468  		v0.AddArg2(src, mem)
  3469  		v.AddArg3(dst, v0, mem)
  3470  		return true
  3471  	}
  3472  	// match: (Move [4] dst src mem)
  3473  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3474  	for {
  3475  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  3476  			break
  3477  		}
  3478  		dst := v_0
  3479  		src := v_1
  3480  		mem := v_2
  3481  		v.Reset(ssaop.OpS390XMOVWstore)
  3482  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZload, typ.UInt32)
  3483  		v0.AddArg2(src, mem)
  3484  		v.AddArg3(dst, v0, mem)
  3485  		return true
  3486  	}
  3487  	// match: (Move [8] dst src mem)
  3488  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3489  	for {
  3490  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  3491  			break
  3492  		}
  3493  		dst := v_0
  3494  		src := v_1
  3495  		mem := v_2
  3496  		v.Reset(ssaop.OpS390XMOVDstore)
  3497  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDload, typ.UInt64)
  3498  		v0.AddArg2(src, mem)
  3499  		v.AddArg3(dst, v0, mem)
  3500  		return true
  3501  	}
  3502  	// match: (Move [16] dst src mem)
  3503  	// result: (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
  3504  	for {
  3505  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
  3506  			break
  3507  		}
  3508  		dst := v_0
  3509  		src := v_1
  3510  		mem := v_2
  3511  		v.Reset(ssaop.OpS390XMOVDstore)
  3512  		v.AuxInt = ssa.Int32ToAuxInt(8)
  3513  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDload, typ.UInt64)
  3514  		v0.AuxInt = ssa.Int32ToAuxInt(8)
  3515  		v0.AddArg2(src, mem)
  3516  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDstore, types.TypeMem)
  3517  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDload, typ.UInt64)
  3518  		v2.AddArg2(src, mem)
  3519  		v1.AddArg3(dst, v2, mem)
  3520  		v.AddArg3(dst, v0, v1)
  3521  		return true
  3522  	}
  3523  	// match: (Move [24] dst src mem)
  3524  	// result: (MOVDstore [16] dst (MOVDload [16] src mem) (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem)))
  3525  	for {
  3526  		if ssa.AuxIntToInt64(v.AuxInt) != 24 {
  3527  			break
  3528  		}
  3529  		dst := v_0
  3530  		src := v_1
  3531  		mem := v_2
  3532  		v.Reset(ssaop.OpS390XMOVDstore)
  3533  		v.AuxInt = ssa.Int32ToAuxInt(16)
  3534  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDload, typ.UInt64)
  3535  		v0.AuxInt = ssa.Int32ToAuxInt(16)
  3536  		v0.AddArg2(src, mem)
  3537  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDstore, types.TypeMem)
  3538  		v1.AuxInt = ssa.Int32ToAuxInt(8)
  3539  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDload, typ.UInt64)
  3540  		v2.AuxInt = ssa.Int32ToAuxInt(8)
  3541  		v2.AddArg2(src, mem)
  3542  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDstore, types.TypeMem)
  3543  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDload, typ.UInt64)
  3544  		v4.AddArg2(src, mem)
  3545  		v3.AddArg3(dst, v4, mem)
  3546  		v1.AddArg3(dst, v2, v3)
  3547  		v.AddArg3(dst, v0, v1)
  3548  		return true
  3549  	}
  3550  	// match: (Move [3] dst src mem)
  3551  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHZload src mem) mem))
  3552  	for {
  3553  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  3554  			break
  3555  		}
  3556  		dst := v_0
  3557  		src := v_1
  3558  		mem := v_2
  3559  		v.Reset(ssaop.OpS390XMOVBstore)
  3560  		v.AuxInt = ssa.Int32ToAuxInt(2)
  3561  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZload, typ.UInt8)
  3562  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  3563  		v0.AddArg2(src, mem)
  3564  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHstore, types.TypeMem)
  3565  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZload, typ.UInt16)
  3566  		v2.AddArg2(src, mem)
  3567  		v1.AddArg3(dst, v2, mem)
  3568  		v.AddArg3(dst, v0, v1)
  3569  		return true
  3570  	}
  3571  	// match: (Move [5] dst src mem)
  3572  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3573  	for {
  3574  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  3575  			break
  3576  		}
  3577  		dst := v_0
  3578  		src := v_1
  3579  		mem := v_2
  3580  		v.Reset(ssaop.OpS390XMOVBstore)
  3581  		v.AuxInt = ssa.Int32ToAuxInt(4)
  3582  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZload, typ.UInt8)
  3583  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  3584  		v0.AddArg2(src, mem)
  3585  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWstore, types.TypeMem)
  3586  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZload, typ.UInt32)
  3587  		v2.AddArg2(src, mem)
  3588  		v1.AddArg3(dst, v2, mem)
  3589  		v.AddArg3(dst, v0, v1)
  3590  		return true
  3591  	}
  3592  	// match: (Move [6] dst src mem)
  3593  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3594  	for {
  3595  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  3596  			break
  3597  		}
  3598  		dst := v_0
  3599  		src := v_1
  3600  		mem := v_2
  3601  		v.Reset(ssaop.OpS390XMOVHstore)
  3602  		v.AuxInt = ssa.Int32ToAuxInt(4)
  3603  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZload, typ.UInt16)
  3604  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  3605  		v0.AddArg2(src, mem)
  3606  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWstore, types.TypeMem)
  3607  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZload, typ.UInt32)
  3608  		v2.AddArg2(src, mem)
  3609  		v1.AddArg3(dst, v2, mem)
  3610  		v.AddArg3(dst, v0, v1)
  3611  		return true
  3612  	}
  3613  	// match: (Move [7] dst src mem)
  3614  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3615  	for {
  3616  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  3617  			break
  3618  		}
  3619  		dst := v_0
  3620  		src := v_1
  3621  		mem := v_2
  3622  		v.Reset(ssaop.OpS390XMOVBstore)
  3623  		v.AuxInt = ssa.Int32ToAuxInt(6)
  3624  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZload, typ.UInt8)
  3625  		v0.AuxInt = ssa.Int32ToAuxInt(6)
  3626  		v0.AddArg2(src, mem)
  3627  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHstore, types.TypeMem)
  3628  		v1.AuxInt = ssa.Int32ToAuxInt(4)
  3629  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZload, typ.UInt16)
  3630  		v2.AuxInt = ssa.Int32ToAuxInt(4)
  3631  		v2.AddArg2(src, mem)
  3632  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWstore, types.TypeMem)
  3633  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZload, typ.UInt32)
  3634  		v4.AddArg2(src, mem)
  3635  		v3.AddArg3(dst, v4, mem)
  3636  		v1.AddArg3(dst, v2, v3)
  3637  		v.AddArg3(dst, v0, v1)
  3638  		return true
  3639  	}
  3640  	// match: (Move [s] dst src mem)
  3641  	// cond: s > 0 && s <= 256 && ssa.LogLargeCopyValue(v, s)
  3642  	// result: (MVC [ssa.MakeValAndOff(int32(s), 0)] dst src mem)
  3643  	for {
  3644  		s := ssa.AuxIntToInt64(v.AuxInt)
  3645  		dst := v_0
  3646  		src := v_1
  3647  		mem := v_2
  3648  		if !(s > 0 && s <= 256 && ssa.LogLargeCopyValue(v, s)) {
  3649  			break
  3650  		}
  3651  		v.Reset(ssaop.OpS390XMVC)
  3652  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(s), 0))
  3653  		v.AddArg3(dst, src, mem)
  3654  		return true
  3655  	}
  3656  	// match: (Move [s] dst src mem)
  3657  	// cond: s > 256 && s <= 512 && ssa.LogLargeCopyValue(v, s)
  3658  	// result: (MVC [ssa.MakeValAndOff(int32(s)-256, 256)] dst src (MVC [ssa.MakeValAndOff(256, 0)] dst src mem))
  3659  	for {
  3660  		s := ssa.AuxIntToInt64(v.AuxInt)
  3661  		dst := v_0
  3662  		src := v_1
  3663  		mem := v_2
  3664  		if !(s > 256 && s <= 512 && ssa.LogLargeCopyValue(v, s)) {
  3665  			break
  3666  		}
  3667  		v.Reset(ssaop.OpS390XMVC)
  3668  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(s)-256, 256))
  3669  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMVC, types.TypeMem)
  3670  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(256, 0))
  3671  		v0.AddArg3(dst, src, mem)
  3672  		v.AddArg3(dst, src, v0)
  3673  		return true
  3674  	}
  3675  	// match: (Move [s] dst src mem)
  3676  	// cond: s > 512 && s <= 768 && ssa.LogLargeCopyValue(v, s)
  3677  	// result: (MVC [ssa.MakeValAndOff(int32(s)-512, 512)] dst src (MVC [ssa.MakeValAndOff(256, 256)] dst src (MVC [ssa.MakeValAndOff(256, 0)] dst src mem)))
  3678  	for {
  3679  		s := ssa.AuxIntToInt64(v.AuxInt)
  3680  		dst := v_0
  3681  		src := v_1
  3682  		mem := v_2
  3683  		if !(s > 512 && s <= 768 && ssa.LogLargeCopyValue(v, s)) {
  3684  			break
  3685  		}
  3686  		v.Reset(ssaop.OpS390XMVC)
  3687  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(s)-512, 512))
  3688  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMVC, types.TypeMem)
  3689  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(256, 256))
  3690  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMVC, types.TypeMem)
  3691  		v1.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(256, 0))
  3692  		v1.AddArg3(dst, src, mem)
  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 > 768 && s <= 1024 && ssa.LogLargeCopyValue(v, s)
  3699  	// result: (MVC [ssa.MakeValAndOff(int32(s)-768, 768)] dst src (MVC [ssa.MakeValAndOff(256, 512)] dst src (MVC [ssa.MakeValAndOff(256, 256)] dst src (MVC [ssa.MakeValAndOff(256, 0)] dst src mem))))
  3700  	for {
  3701  		s := ssa.AuxIntToInt64(v.AuxInt)
  3702  		dst := v_0
  3703  		src := v_1
  3704  		mem := v_2
  3705  		if !(s > 768 && s <= 1024 && ssa.LogLargeCopyValue(v, s)) {
  3706  			break
  3707  		}
  3708  		v.Reset(ssaop.OpS390XMVC)
  3709  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(s)-768, 768))
  3710  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMVC, types.TypeMem)
  3711  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(256, 512))
  3712  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMVC, types.TypeMem)
  3713  		v1.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(256, 256))
  3714  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMVC, types.TypeMem)
  3715  		v2.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(256, 0))
  3716  		v2.AddArg3(dst, src, mem)
  3717  		v1.AddArg3(dst, src, v2)
  3718  		v0.AddArg3(dst, src, v1)
  3719  		v.AddArg3(dst, src, v0)
  3720  		return true
  3721  	}
  3722  	// match: (Move [s] dst src mem)
  3723  	// cond: s > 1024 && ssa.LogLargeCopyValue(v, s)
  3724  	// result: (LoweredMove [s%256] dst src (ADD <src.Type> src (MOVDconst [(s/256)*256])) mem)
  3725  	for {
  3726  		s := ssa.AuxIntToInt64(v.AuxInt)
  3727  		dst := v_0
  3728  		src := v_1
  3729  		mem := v_2
  3730  		if !(s > 1024 && ssa.LogLargeCopyValue(v, s)) {
  3731  			break
  3732  		}
  3733  		v.Reset(ssaop.OpS390XLoweredMove)
  3734  		v.AuxInt = ssa.Int64ToAuxInt(s % 256)
  3735  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XADD, src.Type)
  3736  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3737  		v1.AuxInt = ssa.Int64ToAuxInt((s / 256) * 256)
  3738  		v0.AddArg2(src, v1)
  3739  		v.AddArg4(dst, src, v0, mem)
  3740  		return true
  3741  	}
  3742  	return false
  3743  }
  3744  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  3745  	v_1 := v.Args[1]
  3746  	v_0 := v.Args[0]
  3747  	b := v.Block
  3748  	typ := &b.Func.Config.Types
  3749  	// match: (Neq16 x y)
  3750  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  3751  	for {
  3752  		x := v_0
  3753  		y := v_1
  3754  		v.Reset(ssaop.OpS390XLOCGR)
  3755  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3756  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3757  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3758  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3759  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3760  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  3761  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  3762  		v3.AddArg(x)
  3763  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  3764  		v4.AddArg(y)
  3765  		v2.AddArg2(v3, v4)
  3766  		v.AddArg3(v0, v1, v2)
  3767  		return true
  3768  	}
  3769  }
  3770  func rewriteValue_OpNeq32(v *ssa.Value) bool {
  3771  	v_1 := v.Args[1]
  3772  	v_0 := v.Args[0]
  3773  	b := v.Block
  3774  	typ := &b.Func.Config.Types
  3775  	// match: (Neq32 x y)
  3776  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  3777  	for {
  3778  		x := v_0
  3779  		y := v_1
  3780  		v.Reset(ssaop.OpS390XLOCGR)
  3781  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3782  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3783  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3784  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3785  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3786  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  3787  		v2.AddArg2(x, y)
  3788  		v.AddArg3(v0, v1, v2)
  3789  		return true
  3790  	}
  3791  }
  3792  func rewriteValue_OpNeq32F(v *ssa.Value) bool {
  3793  	v_1 := v.Args[1]
  3794  	v_0 := v.Args[0]
  3795  	b := v.Block
  3796  	typ := &b.Func.Config.Types
  3797  	// match: (Neq32F x y)
  3798  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  3799  	for {
  3800  		x := v_0
  3801  		y := v_1
  3802  		v.Reset(ssaop.OpS390XLOCGR)
  3803  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3804  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3805  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3806  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3807  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3808  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMPS, types.TypeFlags)
  3809  		v2.AddArg2(x, y)
  3810  		v.AddArg3(v0, v1, v2)
  3811  		return true
  3812  	}
  3813  }
  3814  func rewriteValue_OpNeq64(v *ssa.Value) bool {
  3815  	v_1 := v.Args[1]
  3816  	v_0 := v.Args[0]
  3817  	b := v.Block
  3818  	typ := &b.Func.Config.Types
  3819  	// match: (Neq64 x y)
  3820  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3821  	for {
  3822  		x := v_0
  3823  		y := v_1
  3824  		v.Reset(ssaop.OpS390XLOCGR)
  3825  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3826  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3827  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3828  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3829  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3830  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  3831  		v2.AddArg2(x, y)
  3832  		v.AddArg3(v0, v1, v2)
  3833  		return true
  3834  	}
  3835  }
  3836  func rewriteValue_OpNeq64F(v *ssa.Value) bool {
  3837  	v_1 := v.Args[1]
  3838  	v_0 := v.Args[0]
  3839  	b := v.Block
  3840  	typ := &b.Func.Config.Types
  3841  	// match: (Neq64F x y)
  3842  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  3843  	for {
  3844  		x := v_0
  3845  		y := v_1
  3846  		v.Reset(ssaop.OpS390XLOCGR)
  3847  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3848  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3849  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3850  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3851  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3852  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XFCMP, types.TypeFlags)
  3853  		v2.AddArg2(x, y)
  3854  		v.AddArg3(v0, v1, v2)
  3855  		return true
  3856  	}
  3857  }
  3858  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  3859  	v_1 := v.Args[1]
  3860  	v_0 := v.Args[0]
  3861  	b := v.Block
  3862  	typ := &b.Func.Config.Types
  3863  	// match: (Neq8 x y)
  3864  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3865  	for {
  3866  		x := v_0
  3867  		y := v_1
  3868  		v.Reset(ssaop.OpS390XLOCGR)
  3869  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3870  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3871  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3872  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3873  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3874  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  3875  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  3876  		v3.AddArg(x)
  3877  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  3878  		v4.AddArg(y)
  3879  		v2.AddArg2(v3, v4)
  3880  		v.AddArg3(v0, v1, v2)
  3881  		return true
  3882  	}
  3883  }
  3884  func rewriteValue_OpNeqB(v *ssa.Value) bool {
  3885  	v_1 := v.Args[1]
  3886  	v_0 := v.Args[0]
  3887  	b := v.Block
  3888  	typ := &b.Func.Config.Types
  3889  	// match: (NeqB x y)
  3890  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3891  	for {
  3892  		x := v_0
  3893  		y := v_1
  3894  		v.Reset(ssaop.OpS390XLOCGR)
  3895  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3896  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3897  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3898  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3899  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3900  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  3901  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  3902  		v3.AddArg(x)
  3903  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  3904  		v4.AddArg(y)
  3905  		v2.AddArg2(v3, v4)
  3906  		v.AddArg3(v0, v1, v2)
  3907  		return true
  3908  	}
  3909  }
  3910  func rewriteValue_OpNeqPtr(v *ssa.Value) bool {
  3911  	v_1 := v.Args[1]
  3912  	v_0 := v.Args[0]
  3913  	b := v.Block
  3914  	typ := &b.Func.Config.Types
  3915  	// match: (NeqPtr x y)
  3916  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3917  	for {
  3918  		x := v_0
  3919  		y := v_1
  3920  		v.Reset(ssaop.OpS390XLOCGR)
  3921  		v.Aux = ssa.S390xCCMaskToAux(s390x.NotEqual)
  3922  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3923  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3924  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3925  		v1.AuxInt = ssa.Int64ToAuxInt(1)
  3926  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  3927  		v2.AddArg2(x, y)
  3928  		v.AddArg3(v0, v1, v2)
  3929  		return true
  3930  	}
  3931  }
  3932  func rewriteValue_OpNot(v *ssa.Value) bool {
  3933  	v_0 := v.Args[0]
  3934  	// match: (Not x)
  3935  	// result: (XORWconst [1] x)
  3936  	for {
  3937  		x := v_0
  3938  		v.Reset(ssaop.OpS390XXORWconst)
  3939  		v.AuxInt = ssa.Int32ToAuxInt(1)
  3940  		v.AddArg(x)
  3941  		return true
  3942  	}
  3943  }
  3944  func rewriteValue_OpOffPtr(v *ssa.Value) bool {
  3945  	v_0 := v.Args[0]
  3946  	b := v.Block
  3947  	typ := &b.Func.Config.Types
  3948  	// match: (OffPtr [off] ptr:(SP))
  3949  	// result: (MOVDaddr [int32(off)] ptr)
  3950  	for {
  3951  		off := ssa.AuxIntToInt64(v.AuxInt)
  3952  		ptr := v_0
  3953  		if ptr.Op != ssaop.OpSP {
  3954  			break
  3955  		}
  3956  		v.Reset(ssaop.OpS390XMOVDaddr)
  3957  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  3958  		v.AddArg(ptr)
  3959  		return true
  3960  	}
  3961  	// match: (OffPtr [off] ptr)
  3962  	// cond: ssa.Is32Bit(off)
  3963  	// result: (ADDconst [int32(off)] ptr)
  3964  	for {
  3965  		off := ssa.AuxIntToInt64(v.AuxInt)
  3966  		ptr := v_0
  3967  		if !(ssa.Is32Bit(off)) {
  3968  			break
  3969  		}
  3970  		v.Reset(ssaop.OpS390XADDconst)
  3971  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  3972  		v.AddArg(ptr)
  3973  		return true
  3974  	}
  3975  	// match: (OffPtr [off] ptr)
  3976  	// result: (ADD (MOVDconst [off]) ptr)
  3977  	for {
  3978  		off := ssa.AuxIntToInt64(v.AuxInt)
  3979  		ptr := v_0
  3980  		v.Reset(ssaop.OpS390XADD)
  3981  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  3982  		v0.AuxInt = ssa.Int64ToAuxInt(off)
  3983  		v.AddArg2(v0, ptr)
  3984  		return true
  3985  	}
  3986  }
  3987  func rewriteValue_OpPopCount16(v *ssa.Value) bool {
  3988  	v_0 := v.Args[0]
  3989  	b := v.Block
  3990  	typ := &b.Func.Config.Types
  3991  	// match: (PopCount16 x)
  3992  	// result: (MOVBZreg (SumBytes2 (POPCNT <typ.UInt16> x)))
  3993  	for {
  3994  		x := v_0
  3995  		v.Reset(ssaop.OpS390XMOVBZreg)
  3996  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSumBytes2, typ.UInt8)
  3997  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XPOPCNT, typ.UInt16)
  3998  		v1.AddArg(x)
  3999  		v0.AddArg(v1)
  4000  		v.AddArg(v0)
  4001  		return true
  4002  	}
  4003  }
  4004  func rewriteValue_OpPopCount32(v *ssa.Value) bool {
  4005  	v_0 := v.Args[0]
  4006  	b := v.Block
  4007  	typ := &b.Func.Config.Types
  4008  	// match: (PopCount32 x)
  4009  	// result: (MOVBZreg (SumBytes4 (POPCNT <typ.UInt32> x)))
  4010  	for {
  4011  		x := v_0
  4012  		v.Reset(ssaop.OpS390XMOVBZreg)
  4013  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSumBytes4, typ.UInt8)
  4014  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XPOPCNT, typ.UInt32)
  4015  		v1.AddArg(x)
  4016  		v0.AddArg(v1)
  4017  		v.AddArg(v0)
  4018  		return true
  4019  	}
  4020  }
  4021  func rewriteValue_OpPopCount64(v *ssa.Value) bool {
  4022  	v_0 := v.Args[0]
  4023  	b := v.Block
  4024  	typ := &b.Func.Config.Types
  4025  	// match: (PopCount64 x)
  4026  	// result: (MOVBZreg (SumBytes8 (POPCNT <typ.UInt64> x)))
  4027  	for {
  4028  		x := v_0
  4029  		v.Reset(ssaop.OpS390XMOVBZreg)
  4030  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSumBytes8, typ.UInt8)
  4031  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XPOPCNT, typ.UInt64)
  4032  		v1.AddArg(x)
  4033  		v0.AddArg(v1)
  4034  		v.AddArg(v0)
  4035  		return true
  4036  	}
  4037  }
  4038  func rewriteValue_OpPopCount8(v *ssa.Value) bool {
  4039  	v_0 := v.Args[0]
  4040  	b := v.Block
  4041  	typ := &b.Func.Config.Types
  4042  	// match: (PopCount8 x)
  4043  	// result: (POPCNT (MOVBZreg x))
  4044  	for {
  4045  		x := v_0
  4046  		v.Reset(ssaop.OpS390XPOPCNT)
  4047  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  4048  		v0.AddArg(x)
  4049  		v.AddArg(v0)
  4050  		return true
  4051  	}
  4052  }
  4053  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
  4054  	v_1 := v.Args[1]
  4055  	v_0 := v.Args[0]
  4056  	b := v.Block
  4057  	typ := &b.Func.Config.Types
  4058  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
  4059  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
  4060  	for {
  4061  		t := v.Type
  4062  		x := v_0
  4063  		if v_1.Op != ssaop.OpS390XMOVDconst {
  4064  			break
  4065  		}
  4066  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4067  		v.Reset(ssaop.OpOr16)
  4068  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh16x64, t)
  4069  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4070  		v1.AuxInt = ssa.Int64ToAuxInt(c & 15)
  4071  		v0.AddArg2(x, v1)
  4072  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux64, t)
  4073  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4074  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 15)
  4075  		v2.AddArg2(x, v3)
  4076  		v.AddArg2(v0, v2)
  4077  		return true
  4078  	}
  4079  	return false
  4080  }
  4081  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
  4082  	v_1 := v.Args[1]
  4083  	v_0 := v.Args[0]
  4084  	b := v.Block
  4085  	typ := &b.Func.Config.Types
  4086  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
  4087  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
  4088  	for {
  4089  		t := v.Type
  4090  		x := v_0
  4091  		if v_1.Op != ssaop.OpS390XMOVDconst {
  4092  			break
  4093  		}
  4094  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4095  		v.Reset(ssaop.OpOr8)
  4096  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh8x64, t)
  4097  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4098  		v1.AuxInt = ssa.Int64ToAuxInt(c & 7)
  4099  		v0.AddArg2(x, v1)
  4100  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux64, t)
  4101  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4102  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 7)
  4103  		v2.AddArg2(x, v3)
  4104  		v.AddArg2(v0, v2)
  4105  		return true
  4106  	}
  4107  	return false
  4108  }
  4109  func rewriteValue_OpRound(v *ssa.Value) bool {
  4110  	v_0 := v.Args[0]
  4111  	// match: (Round x)
  4112  	// result: (FIDBR [1] x)
  4113  	for {
  4114  		x := v_0
  4115  		v.Reset(ssaop.OpS390XFIDBR)
  4116  		v.AuxInt = ssa.Int8ToAuxInt(1)
  4117  		v.AddArg(x)
  4118  		return true
  4119  	}
  4120  }
  4121  func rewriteValue_OpRoundToEven(v *ssa.Value) bool {
  4122  	v_0 := v.Args[0]
  4123  	// match: (RoundToEven x)
  4124  	// result: (FIDBR [4] x)
  4125  	for {
  4126  		x := v_0
  4127  		v.Reset(ssaop.OpS390XFIDBR)
  4128  		v.AuxInt = ssa.Int8ToAuxInt(4)
  4129  		v.AddArg(x)
  4130  		return true
  4131  	}
  4132  }
  4133  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
  4134  	v_1 := v.Args[1]
  4135  	v_0 := v.Args[0]
  4136  	b := v.Block
  4137  	typ := &b.Func.Config.Types
  4138  	// match: (Rsh16Ux16 x y)
  4139  	// cond: ssa.ShiftIsBounded(v)
  4140  	// result: (SRW (MOVHZreg x) y)
  4141  	for {
  4142  		x := v_0
  4143  		y := v_1
  4144  		if !(ssa.ShiftIsBounded(v)) {
  4145  			break
  4146  		}
  4147  		v.Reset(ssaop.OpS390XSRW)
  4148  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4149  		v0.AddArg(x)
  4150  		v.AddArg2(v0, y)
  4151  		return true
  4152  	}
  4153  	// match: (Rsh16Ux16 <t> x y)
  4154  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4155  	for {
  4156  		t := v.Type
  4157  		x := v_0
  4158  		y := v_1
  4159  		v.Reset(ssaop.OpS390XLOCGR)
  4160  		v.Type = t
  4161  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4162  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4163  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4164  		v1.AddArg(x)
  4165  		v0.AddArg2(v1, y)
  4166  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4167  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  4168  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4169  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4170  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4171  		v4.AddArg(y)
  4172  		v3.AddArg(v4)
  4173  		v.AddArg3(v0, v2, v3)
  4174  		return true
  4175  	}
  4176  }
  4177  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
  4178  	v_1 := v.Args[1]
  4179  	v_0 := v.Args[0]
  4180  	b := v.Block
  4181  	typ := &b.Func.Config.Types
  4182  	// match: (Rsh16Ux32 x y)
  4183  	// cond: ssa.ShiftIsBounded(v)
  4184  	// result: (SRW (MOVHZreg x) y)
  4185  	for {
  4186  		x := v_0
  4187  		y := v_1
  4188  		if !(ssa.ShiftIsBounded(v)) {
  4189  			break
  4190  		}
  4191  		v.Reset(ssaop.OpS390XSRW)
  4192  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4193  		v0.AddArg(x)
  4194  		v.AddArg2(v0, y)
  4195  		return true
  4196  	}
  4197  	// match: (Rsh16Ux32 <t> x y)
  4198  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4199  	for {
  4200  		t := v.Type
  4201  		x := v_0
  4202  		y := v_1
  4203  		v.Reset(ssaop.OpS390XLOCGR)
  4204  		v.Type = t
  4205  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4206  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4207  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4208  		v1.AddArg(x)
  4209  		v0.AddArg2(v1, y)
  4210  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4211  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  4212  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4213  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4214  		v3.AddArg(y)
  4215  		v.AddArg3(v0, v2, v3)
  4216  		return true
  4217  	}
  4218  }
  4219  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
  4220  	v_1 := v.Args[1]
  4221  	v_0 := v.Args[0]
  4222  	b := v.Block
  4223  	typ := &b.Func.Config.Types
  4224  	// match: (Rsh16Ux64 x y)
  4225  	// cond: ssa.ShiftIsBounded(v)
  4226  	// result: (SRW (MOVHZreg x) y)
  4227  	for {
  4228  		x := v_0
  4229  		y := v_1
  4230  		if !(ssa.ShiftIsBounded(v)) {
  4231  			break
  4232  		}
  4233  		v.Reset(ssaop.OpS390XSRW)
  4234  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4235  		v0.AddArg(x)
  4236  		v.AddArg2(v0, y)
  4237  		return true
  4238  	}
  4239  	// match: (Rsh16Ux64 <t> x y)
  4240  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  4241  	for {
  4242  		t := v.Type
  4243  		x := v_0
  4244  		y := v_1
  4245  		v.Reset(ssaop.OpS390XLOCGR)
  4246  		v.Type = t
  4247  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4248  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4249  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4250  		v1.AddArg(x)
  4251  		v0.AddArg2(v1, y)
  4252  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4253  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  4254  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  4255  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4256  		v3.AddArg(y)
  4257  		v.AddArg3(v0, v2, v3)
  4258  		return true
  4259  	}
  4260  }
  4261  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
  4262  	v_1 := v.Args[1]
  4263  	v_0 := v.Args[0]
  4264  	b := v.Block
  4265  	typ := &b.Func.Config.Types
  4266  	// match: (Rsh16Ux8 x y)
  4267  	// cond: ssa.ShiftIsBounded(v)
  4268  	// result: (SRW (MOVHZreg x) y)
  4269  	for {
  4270  		x := v_0
  4271  		y := v_1
  4272  		if !(ssa.ShiftIsBounded(v)) {
  4273  			break
  4274  		}
  4275  		v.Reset(ssaop.OpS390XSRW)
  4276  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4277  		v0.AddArg(x)
  4278  		v.AddArg2(v0, y)
  4279  		return true
  4280  	}
  4281  	// match: (Rsh16Ux8 <t> x y)
  4282  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4283  	for {
  4284  		t := v.Type
  4285  		x := v_0
  4286  		y := v_1
  4287  		v.Reset(ssaop.OpS390XLOCGR)
  4288  		v.Type = t
  4289  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4290  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4291  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4292  		v1.AddArg(x)
  4293  		v0.AddArg2(v1, y)
  4294  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4295  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  4296  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4297  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4298  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  4299  		v4.AddArg(y)
  4300  		v3.AddArg(v4)
  4301  		v.AddArg3(v0, v2, v3)
  4302  		return true
  4303  	}
  4304  }
  4305  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
  4306  	v_1 := v.Args[1]
  4307  	v_0 := v.Args[0]
  4308  	b := v.Block
  4309  	typ := &b.Func.Config.Types
  4310  	// match: (Rsh16x16 x y)
  4311  	// cond: ssa.ShiftIsBounded(v)
  4312  	// result: (SRAW (MOVHreg x) y)
  4313  	for {
  4314  		x := v_0
  4315  		y := v_1
  4316  		if !(ssa.ShiftIsBounded(v)) {
  4317  			break
  4318  		}
  4319  		v.Reset(ssaop.OpS390XSRAW)
  4320  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4321  		v0.AddArg(x)
  4322  		v.AddArg2(v0, y)
  4323  		return true
  4324  	}
  4325  	// match: (Rsh16x16 x y)
  4326  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4327  	for {
  4328  		x := v_0
  4329  		y := v_1
  4330  		v.Reset(ssaop.OpS390XSRAW)
  4331  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4332  		v0.AddArg(x)
  4333  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4334  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4335  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4336  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  4337  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4338  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4339  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4340  		v4.AddArg(y)
  4341  		v3.AddArg(v4)
  4342  		v1.AddArg3(y, v2, v3)
  4343  		v.AddArg2(v0, v1)
  4344  		return true
  4345  	}
  4346  }
  4347  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
  4348  	v_1 := v.Args[1]
  4349  	v_0 := v.Args[0]
  4350  	b := v.Block
  4351  	typ := &b.Func.Config.Types
  4352  	// match: (Rsh16x32 x y)
  4353  	// cond: ssa.ShiftIsBounded(v)
  4354  	// result: (SRAW (MOVHreg x) y)
  4355  	for {
  4356  		x := v_0
  4357  		y := v_1
  4358  		if !(ssa.ShiftIsBounded(v)) {
  4359  			break
  4360  		}
  4361  		v.Reset(ssaop.OpS390XSRAW)
  4362  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4363  		v0.AddArg(x)
  4364  		v.AddArg2(v0, y)
  4365  		return true
  4366  	}
  4367  	// match: (Rsh16x32 x y)
  4368  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4369  	for {
  4370  		x := v_0
  4371  		y := v_1
  4372  		v.Reset(ssaop.OpS390XSRAW)
  4373  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4374  		v0.AddArg(x)
  4375  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4376  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4377  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4378  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  4379  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4380  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4381  		v3.AddArg(y)
  4382  		v1.AddArg3(y, v2, v3)
  4383  		v.AddArg2(v0, v1)
  4384  		return true
  4385  	}
  4386  }
  4387  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
  4388  	v_1 := v.Args[1]
  4389  	v_0 := v.Args[0]
  4390  	b := v.Block
  4391  	typ := &b.Func.Config.Types
  4392  	// match: (Rsh16x64 x y)
  4393  	// cond: ssa.ShiftIsBounded(v)
  4394  	// result: (SRAW (MOVHreg x) y)
  4395  	for {
  4396  		x := v_0
  4397  		y := v_1
  4398  		if !(ssa.ShiftIsBounded(v)) {
  4399  			break
  4400  		}
  4401  		v.Reset(ssaop.OpS390XSRAW)
  4402  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4403  		v0.AddArg(x)
  4404  		v.AddArg2(v0, y)
  4405  		return true
  4406  	}
  4407  	// match: (Rsh16x64 x y)
  4408  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4409  	for {
  4410  		x := v_0
  4411  		y := v_1
  4412  		v.Reset(ssaop.OpS390XSRAW)
  4413  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4414  		v0.AddArg(x)
  4415  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4416  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4417  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4418  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  4419  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  4420  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4421  		v3.AddArg(y)
  4422  		v1.AddArg3(y, v2, v3)
  4423  		v.AddArg2(v0, v1)
  4424  		return true
  4425  	}
  4426  }
  4427  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
  4428  	v_1 := v.Args[1]
  4429  	v_0 := v.Args[0]
  4430  	b := v.Block
  4431  	typ := &b.Func.Config.Types
  4432  	// match: (Rsh16x8 x y)
  4433  	// cond: ssa.ShiftIsBounded(v)
  4434  	// result: (SRAW (MOVHreg x) y)
  4435  	for {
  4436  		x := v_0
  4437  		y := v_1
  4438  		if !(ssa.ShiftIsBounded(v)) {
  4439  			break
  4440  		}
  4441  		v.Reset(ssaop.OpS390XSRAW)
  4442  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4443  		v0.AddArg(x)
  4444  		v.AddArg2(v0, y)
  4445  		return true
  4446  	}
  4447  	// match: (Rsh16x8 x y)
  4448  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4449  	for {
  4450  		x := v_0
  4451  		y := v_1
  4452  		v.Reset(ssaop.OpS390XSRAW)
  4453  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHreg, typ.Int64)
  4454  		v0.AddArg(x)
  4455  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4456  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4457  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4458  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  4459  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4460  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  4461  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  4462  		v4.AddArg(y)
  4463  		v3.AddArg(v4)
  4464  		v1.AddArg3(y, v2, v3)
  4465  		v.AddArg2(v0, v1)
  4466  		return true
  4467  	}
  4468  }
  4469  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
  4470  	v_1 := v.Args[1]
  4471  	v_0 := v.Args[0]
  4472  	b := v.Block
  4473  	typ := &b.Func.Config.Types
  4474  	// match: (Rsh32Ux16 x y)
  4475  	// cond: ssa.ShiftIsBounded(v)
  4476  	// result: (SRW x y)
  4477  	for {
  4478  		x := v_0
  4479  		y := v_1
  4480  		if !(ssa.ShiftIsBounded(v)) {
  4481  			break
  4482  		}
  4483  		v.Reset(ssaop.OpS390XSRW)
  4484  		v.AddArg2(x, y)
  4485  		return true
  4486  	}
  4487  	// match: (Rsh32Ux16 <t> x y)
  4488  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4489  	for {
  4490  		t := v.Type
  4491  		x := v_0
  4492  		y := v_1
  4493  		v.Reset(ssaop.OpS390XLOCGR)
  4494  		v.Type = t
  4495  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4496  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4497  		v0.AddArg2(x, y)
  4498  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4499  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4500  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4501  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4502  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4503  		v3.AddArg(y)
  4504  		v2.AddArg(v3)
  4505  		v.AddArg3(v0, v1, v2)
  4506  		return true
  4507  	}
  4508  }
  4509  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
  4510  	v_1 := v.Args[1]
  4511  	v_0 := v.Args[0]
  4512  	b := v.Block
  4513  	typ := &b.Func.Config.Types
  4514  	// match: (Rsh32Ux32 x y)
  4515  	// cond: ssa.ShiftIsBounded(v)
  4516  	// result: (SRW x y)
  4517  	for {
  4518  		x := v_0
  4519  		y := v_1
  4520  		if !(ssa.ShiftIsBounded(v)) {
  4521  			break
  4522  		}
  4523  		v.Reset(ssaop.OpS390XSRW)
  4524  		v.AddArg2(x, y)
  4525  		return true
  4526  	}
  4527  	// match: (Rsh32Ux32 <t> x y)
  4528  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4529  	for {
  4530  		t := v.Type
  4531  		x := v_0
  4532  		y := v_1
  4533  		v.Reset(ssaop.OpS390XLOCGR)
  4534  		v.Type = t
  4535  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4536  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4537  		v0.AddArg2(x, y)
  4538  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4539  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4540  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4541  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4542  		v2.AddArg(y)
  4543  		v.AddArg3(v0, v1, v2)
  4544  		return true
  4545  	}
  4546  }
  4547  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
  4548  	v_1 := v.Args[1]
  4549  	v_0 := v.Args[0]
  4550  	b := v.Block
  4551  	typ := &b.Func.Config.Types
  4552  	// match: (Rsh32Ux64 x y)
  4553  	// cond: ssa.ShiftIsBounded(v)
  4554  	// result: (SRW x y)
  4555  	for {
  4556  		x := v_0
  4557  		y := v_1
  4558  		if !(ssa.ShiftIsBounded(v)) {
  4559  			break
  4560  		}
  4561  		v.Reset(ssaop.OpS390XSRW)
  4562  		v.AddArg2(x, y)
  4563  		return true
  4564  	}
  4565  	// match: (Rsh32Ux64 <t> x y)
  4566  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4567  	for {
  4568  		t := v.Type
  4569  		x := v_0
  4570  		y := v_1
  4571  		v.Reset(ssaop.OpS390XLOCGR)
  4572  		v.Type = t
  4573  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4574  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4575  		v0.AddArg2(x, y)
  4576  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4577  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4578  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  4579  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4580  		v2.AddArg(y)
  4581  		v.AddArg3(v0, v1, v2)
  4582  		return true
  4583  	}
  4584  }
  4585  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
  4586  	v_1 := v.Args[1]
  4587  	v_0 := v.Args[0]
  4588  	b := v.Block
  4589  	typ := &b.Func.Config.Types
  4590  	// match: (Rsh32Ux8 x y)
  4591  	// cond: ssa.ShiftIsBounded(v)
  4592  	// result: (SRW x y)
  4593  	for {
  4594  		x := v_0
  4595  		y := v_1
  4596  		if !(ssa.ShiftIsBounded(v)) {
  4597  			break
  4598  		}
  4599  		v.Reset(ssaop.OpS390XSRW)
  4600  		v.AddArg2(x, y)
  4601  		return true
  4602  	}
  4603  	// match: (Rsh32Ux8 <t> x y)
  4604  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4605  	for {
  4606  		t := v.Type
  4607  		x := v_0
  4608  		y := v_1
  4609  		v.Reset(ssaop.OpS390XLOCGR)
  4610  		v.Type = t
  4611  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4612  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  4613  		v0.AddArg2(x, y)
  4614  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4615  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4616  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4617  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4618  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  4619  		v3.AddArg(y)
  4620  		v2.AddArg(v3)
  4621  		v.AddArg3(v0, v1, v2)
  4622  		return true
  4623  	}
  4624  }
  4625  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
  4626  	v_1 := v.Args[1]
  4627  	v_0 := v.Args[0]
  4628  	b := v.Block
  4629  	typ := &b.Func.Config.Types
  4630  	// match: (Rsh32x16 x y)
  4631  	// cond: ssa.ShiftIsBounded(v)
  4632  	// result: (SRAW x y)
  4633  	for {
  4634  		x := v_0
  4635  		y := v_1
  4636  		if !(ssa.ShiftIsBounded(v)) {
  4637  			break
  4638  		}
  4639  		v.Reset(ssaop.OpS390XSRAW)
  4640  		v.AddArg2(x, y)
  4641  		return true
  4642  	}
  4643  	// match: (Rsh32x16 x y)
  4644  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4645  	for {
  4646  		x := v_0
  4647  		y := v_1
  4648  		v.Reset(ssaop.OpS390XSRAW)
  4649  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4650  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4651  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4652  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4653  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4654  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4655  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4656  		v3.AddArg(y)
  4657  		v2.AddArg(v3)
  4658  		v0.AddArg3(y, v1, v2)
  4659  		v.AddArg2(x, v0)
  4660  		return true
  4661  	}
  4662  }
  4663  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
  4664  	v_1 := v.Args[1]
  4665  	v_0 := v.Args[0]
  4666  	b := v.Block
  4667  	// match: (Rsh32x32 x y)
  4668  	// cond: ssa.ShiftIsBounded(v)
  4669  	// result: (SRAW x y)
  4670  	for {
  4671  		x := v_0
  4672  		y := v_1
  4673  		if !(ssa.ShiftIsBounded(v)) {
  4674  			break
  4675  		}
  4676  		v.Reset(ssaop.OpS390XSRAW)
  4677  		v.AddArg2(x, y)
  4678  		return true
  4679  	}
  4680  	// match: (Rsh32x32 x y)
  4681  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4682  	for {
  4683  		x := v_0
  4684  		y := v_1
  4685  		v.Reset(ssaop.OpS390XSRAW)
  4686  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4687  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4688  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4689  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4690  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4691  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4692  		v2.AddArg(y)
  4693  		v0.AddArg3(y, v1, v2)
  4694  		v.AddArg2(x, v0)
  4695  		return true
  4696  	}
  4697  }
  4698  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
  4699  	v_1 := v.Args[1]
  4700  	v_0 := v.Args[0]
  4701  	b := v.Block
  4702  	// match: (Rsh32x64 x y)
  4703  	// cond: ssa.ShiftIsBounded(v)
  4704  	// result: (SRAW x y)
  4705  	for {
  4706  		x := v_0
  4707  		y := v_1
  4708  		if !(ssa.ShiftIsBounded(v)) {
  4709  			break
  4710  		}
  4711  		v.Reset(ssaop.OpS390XSRAW)
  4712  		v.AddArg2(x, y)
  4713  		return true
  4714  	}
  4715  	// match: (Rsh32x64 x y)
  4716  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4717  	for {
  4718  		x := v_0
  4719  		y := v_1
  4720  		v.Reset(ssaop.OpS390XSRAW)
  4721  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4722  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4723  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4724  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4725  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  4726  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4727  		v2.AddArg(y)
  4728  		v0.AddArg3(y, v1, v2)
  4729  		v.AddArg2(x, v0)
  4730  		return true
  4731  	}
  4732  }
  4733  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
  4734  	v_1 := v.Args[1]
  4735  	v_0 := v.Args[0]
  4736  	b := v.Block
  4737  	typ := &b.Func.Config.Types
  4738  	// match: (Rsh32x8 x y)
  4739  	// cond: ssa.ShiftIsBounded(v)
  4740  	// result: (SRAW x y)
  4741  	for {
  4742  		x := v_0
  4743  		y := v_1
  4744  		if !(ssa.ShiftIsBounded(v)) {
  4745  			break
  4746  		}
  4747  		v.Reset(ssaop.OpS390XSRAW)
  4748  		v.AddArg2(x, y)
  4749  		return true
  4750  	}
  4751  	// match: (Rsh32x8 x y)
  4752  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4753  	for {
  4754  		x := v_0
  4755  		y := v_1
  4756  		v.Reset(ssaop.OpS390XSRAW)
  4757  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4758  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4759  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4760  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4761  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4762  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4763  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  4764  		v3.AddArg(y)
  4765  		v2.AddArg(v3)
  4766  		v0.AddArg3(y, v1, v2)
  4767  		v.AddArg2(x, v0)
  4768  		return true
  4769  	}
  4770  }
  4771  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
  4772  	v_1 := v.Args[1]
  4773  	v_0 := v.Args[0]
  4774  	b := v.Block
  4775  	typ := &b.Func.Config.Types
  4776  	// match: (Rsh64Ux16 x y)
  4777  	// cond: ssa.ShiftIsBounded(v)
  4778  	// result: (SRD x y)
  4779  	for {
  4780  		x := v_0
  4781  		y := v_1
  4782  		if !(ssa.ShiftIsBounded(v)) {
  4783  			break
  4784  		}
  4785  		v.Reset(ssaop.OpS390XSRD)
  4786  		v.AddArg2(x, y)
  4787  		return true
  4788  	}
  4789  	// match: (Rsh64Ux16 <t> x y)
  4790  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4791  	for {
  4792  		t := v.Type
  4793  		x := v_0
  4794  		y := v_1
  4795  		v.Reset(ssaop.OpS390XLOCGR)
  4796  		v.Type = t
  4797  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4798  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRD, t)
  4799  		v0.AddArg2(x, y)
  4800  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4801  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4802  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4803  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4804  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4805  		v3.AddArg(y)
  4806  		v2.AddArg(v3)
  4807  		v.AddArg3(v0, v1, v2)
  4808  		return true
  4809  	}
  4810  }
  4811  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
  4812  	v_1 := v.Args[1]
  4813  	v_0 := v.Args[0]
  4814  	b := v.Block
  4815  	typ := &b.Func.Config.Types
  4816  	// match: (Rsh64Ux32 x y)
  4817  	// cond: ssa.ShiftIsBounded(v)
  4818  	// result: (SRD x y)
  4819  	for {
  4820  		x := v_0
  4821  		y := v_1
  4822  		if !(ssa.ShiftIsBounded(v)) {
  4823  			break
  4824  		}
  4825  		v.Reset(ssaop.OpS390XSRD)
  4826  		v.AddArg2(x, y)
  4827  		return true
  4828  	}
  4829  	// match: (Rsh64Ux32 <t> x y)
  4830  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4831  	for {
  4832  		t := v.Type
  4833  		x := v_0
  4834  		y := v_1
  4835  		v.Reset(ssaop.OpS390XLOCGR)
  4836  		v.Type = t
  4837  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4838  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRD, t)
  4839  		v0.AddArg2(x, y)
  4840  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4841  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4842  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4843  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4844  		v2.AddArg(y)
  4845  		v.AddArg3(v0, v1, v2)
  4846  		return true
  4847  	}
  4848  }
  4849  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
  4850  	v_1 := v.Args[1]
  4851  	v_0 := v.Args[0]
  4852  	b := v.Block
  4853  	typ := &b.Func.Config.Types
  4854  	// match: (Rsh64Ux64 x y)
  4855  	// cond: ssa.ShiftIsBounded(v)
  4856  	// result: (SRD x y)
  4857  	for {
  4858  		x := v_0
  4859  		y := v_1
  4860  		if !(ssa.ShiftIsBounded(v)) {
  4861  			break
  4862  		}
  4863  		v.Reset(ssaop.OpS390XSRD)
  4864  		v.AddArg2(x, y)
  4865  		return true
  4866  	}
  4867  	// match: (Rsh64Ux64 <t> x y)
  4868  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4869  	for {
  4870  		t := v.Type
  4871  		x := v_0
  4872  		y := v_1
  4873  		v.Reset(ssaop.OpS390XLOCGR)
  4874  		v.Type = t
  4875  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4876  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRD, t)
  4877  		v0.AddArg2(x, y)
  4878  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4879  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4880  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  4881  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4882  		v2.AddArg(y)
  4883  		v.AddArg3(v0, v1, v2)
  4884  		return true
  4885  	}
  4886  }
  4887  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
  4888  	v_1 := v.Args[1]
  4889  	v_0 := v.Args[0]
  4890  	b := v.Block
  4891  	typ := &b.Func.Config.Types
  4892  	// match: (Rsh64Ux8 x y)
  4893  	// cond: ssa.ShiftIsBounded(v)
  4894  	// result: (SRD x y)
  4895  	for {
  4896  		x := v_0
  4897  		y := v_1
  4898  		if !(ssa.ShiftIsBounded(v)) {
  4899  			break
  4900  		}
  4901  		v.Reset(ssaop.OpS390XSRD)
  4902  		v.AddArg2(x, y)
  4903  		return true
  4904  	}
  4905  	// match: (Rsh64Ux8 <t> x y)
  4906  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4907  	for {
  4908  		t := v.Type
  4909  		x := v_0
  4910  		y := v_1
  4911  		v.Reset(ssaop.OpS390XLOCGR)
  4912  		v.Type = t
  4913  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4914  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRD, t)
  4915  		v0.AddArg2(x, y)
  4916  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  4917  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4918  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4919  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4920  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  4921  		v3.AddArg(y)
  4922  		v2.AddArg(v3)
  4923  		v.AddArg3(v0, v1, v2)
  4924  		return true
  4925  	}
  4926  }
  4927  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
  4928  	v_1 := v.Args[1]
  4929  	v_0 := v.Args[0]
  4930  	b := v.Block
  4931  	typ := &b.Func.Config.Types
  4932  	// match: (Rsh64x16 x y)
  4933  	// cond: ssa.ShiftIsBounded(v)
  4934  	// result: (SRAD x y)
  4935  	for {
  4936  		x := v_0
  4937  		y := v_1
  4938  		if !(ssa.ShiftIsBounded(v)) {
  4939  			break
  4940  		}
  4941  		v.Reset(ssaop.OpS390XSRAD)
  4942  		v.AddArg2(x, y)
  4943  		return true
  4944  	}
  4945  	// match: (Rsh64x16 x y)
  4946  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4947  	for {
  4948  		x := v_0
  4949  		y := v_1
  4950  		v.Reset(ssaop.OpS390XSRAD)
  4951  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4952  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4953  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4954  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4955  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4956  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4957  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  4958  		v3.AddArg(y)
  4959  		v2.AddArg(v3)
  4960  		v0.AddArg3(y, v1, v2)
  4961  		v.AddArg2(x, v0)
  4962  		return true
  4963  	}
  4964  }
  4965  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
  4966  	v_1 := v.Args[1]
  4967  	v_0 := v.Args[0]
  4968  	b := v.Block
  4969  	// match: (Rsh64x32 x y)
  4970  	// cond: ssa.ShiftIsBounded(v)
  4971  	// result: (SRAD x y)
  4972  	for {
  4973  		x := v_0
  4974  		y := v_1
  4975  		if !(ssa.ShiftIsBounded(v)) {
  4976  			break
  4977  		}
  4978  		v.Reset(ssaop.OpS390XSRAD)
  4979  		v.AddArg2(x, y)
  4980  		return true
  4981  	}
  4982  	// match: (Rsh64x32 x y)
  4983  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4984  	for {
  4985  		x := v_0
  4986  		y := v_1
  4987  		v.Reset(ssaop.OpS390XSRAD)
  4988  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  4989  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  4990  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  4991  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4992  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  4993  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  4994  		v2.AddArg(y)
  4995  		v0.AddArg3(y, v1, v2)
  4996  		v.AddArg2(x, v0)
  4997  		return true
  4998  	}
  4999  }
  5000  func rewriteValue_OpRsh64x64(v *ssa.Value) bool {
  5001  	v_1 := v.Args[1]
  5002  	v_0 := v.Args[0]
  5003  	b := v.Block
  5004  	// match: (Rsh64x64 x y)
  5005  	// cond: ssa.ShiftIsBounded(v)
  5006  	// result: (SRAD x y)
  5007  	for {
  5008  		x := v_0
  5009  		y := v_1
  5010  		if !(ssa.ShiftIsBounded(v)) {
  5011  			break
  5012  		}
  5013  		v.Reset(ssaop.OpS390XSRAD)
  5014  		v.AddArg2(x, y)
  5015  		return true
  5016  	}
  5017  	// match: (Rsh64x64 x y)
  5018  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5019  	for {
  5020  		x := v_0
  5021  		y := v_1
  5022  		v.Reset(ssaop.OpS390XSRAD)
  5023  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  5024  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5025  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  5026  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  5027  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  5028  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  5029  		v2.AddArg(y)
  5030  		v0.AddArg3(y, v1, v2)
  5031  		v.AddArg2(x, v0)
  5032  		return true
  5033  	}
  5034  }
  5035  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
  5036  	v_1 := v.Args[1]
  5037  	v_0 := v.Args[0]
  5038  	b := v.Block
  5039  	typ := &b.Func.Config.Types
  5040  	// match: (Rsh64x8 x y)
  5041  	// cond: ssa.ShiftIsBounded(v)
  5042  	// result: (SRAD x y)
  5043  	for {
  5044  		x := v_0
  5045  		y := v_1
  5046  		if !(ssa.ShiftIsBounded(v)) {
  5047  			break
  5048  		}
  5049  		v.Reset(ssaop.OpS390XSRAD)
  5050  		v.AddArg2(x, y)
  5051  		return true
  5052  	}
  5053  	// match: (Rsh64x8 x y)
  5054  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5055  	for {
  5056  		x := v_0
  5057  		y := v_1
  5058  		v.Reset(ssaop.OpS390XSRAD)
  5059  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  5060  		v0.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5061  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  5062  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  5063  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5064  		v2.AuxInt = ssa.Int32ToAuxInt(64)
  5065  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5066  		v3.AddArg(y)
  5067  		v2.AddArg(v3)
  5068  		v0.AddArg3(y, v1, v2)
  5069  		v.AddArg2(x, v0)
  5070  		return true
  5071  	}
  5072  }
  5073  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
  5074  	v_1 := v.Args[1]
  5075  	v_0 := v.Args[0]
  5076  	b := v.Block
  5077  	typ := &b.Func.Config.Types
  5078  	// match: (Rsh8Ux16 x y)
  5079  	// cond: ssa.ShiftIsBounded(v)
  5080  	// result: (SRW (MOVBZreg x) y)
  5081  	for {
  5082  		x := v_0
  5083  		y := v_1
  5084  		if !(ssa.ShiftIsBounded(v)) {
  5085  			break
  5086  		}
  5087  		v.Reset(ssaop.OpS390XSRW)
  5088  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5089  		v0.AddArg(x)
  5090  		v.AddArg2(v0, y)
  5091  		return true
  5092  	}
  5093  	// match: (Rsh8Ux16 <t> x y)
  5094  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  5095  	for {
  5096  		t := v.Type
  5097  		x := v_0
  5098  		y := v_1
  5099  		v.Reset(ssaop.OpS390XLOCGR)
  5100  		v.Type = t
  5101  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5102  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  5103  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5104  		v1.AddArg(x)
  5105  		v0.AddArg2(v1, y)
  5106  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  5107  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  5108  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5109  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5110  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  5111  		v4.AddArg(y)
  5112  		v3.AddArg(v4)
  5113  		v.AddArg3(v0, v2, v3)
  5114  		return true
  5115  	}
  5116  }
  5117  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
  5118  	v_1 := v.Args[1]
  5119  	v_0 := v.Args[0]
  5120  	b := v.Block
  5121  	typ := &b.Func.Config.Types
  5122  	// match: (Rsh8Ux32 x y)
  5123  	// cond: ssa.ShiftIsBounded(v)
  5124  	// result: (SRW (MOVBZreg x) y)
  5125  	for {
  5126  		x := v_0
  5127  		y := v_1
  5128  		if !(ssa.ShiftIsBounded(v)) {
  5129  			break
  5130  		}
  5131  		v.Reset(ssaop.OpS390XSRW)
  5132  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5133  		v0.AddArg(x)
  5134  		v.AddArg2(v0, y)
  5135  		return true
  5136  	}
  5137  	// match: (Rsh8Ux32 <t> x y)
  5138  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  5139  	for {
  5140  		t := v.Type
  5141  		x := v_0
  5142  		y := v_1
  5143  		v.Reset(ssaop.OpS390XLOCGR)
  5144  		v.Type = t
  5145  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5146  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  5147  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5148  		v1.AddArg(x)
  5149  		v0.AddArg2(v1, y)
  5150  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  5151  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  5152  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5153  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5154  		v3.AddArg(y)
  5155  		v.AddArg3(v0, v2, v3)
  5156  		return true
  5157  	}
  5158  }
  5159  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
  5160  	v_1 := v.Args[1]
  5161  	v_0 := v.Args[0]
  5162  	b := v.Block
  5163  	typ := &b.Func.Config.Types
  5164  	// match: (Rsh8Ux64 x y)
  5165  	// cond: ssa.ShiftIsBounded(v)
  5166  	// result: (SRW (MOVBZreg x) y)
  5167  	for {
  5168  		x := v_0
  5169  		y := v_1
  5170  		if !(ssa.ShiftIsBounded(v)) {
  5171  			break
  5172  		}
  5173  		v.Reset(ssaop.OpS390XSRW)
  5174  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5175  		v0.AddArg(x)
  5176  		v.AddArg2(v0, y)
  5177  		return true
  5178  	}
  5179  	// match: (Rsh8Ux64 <t> x y)
  5180  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  5181  	for {
  5182  		t := v.Type
  5183  		x := v_0
  5184  		y := v_1
  5185  		v.Reset(ssaop.OpS390XLOCGR)
  5186  		v.Type = t
  5187  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5188  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  5189  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5190  		v1.AddArg(x)
  5191  		v0.AddArg2(v1, y)
  5192  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  5193  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  5194  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  5195  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5196  		v3.AddArg(y)
  5197  		v.AddArg3(v0, v2, v3)
  5198  		return true
  5199  	}
  5200  }
  5201  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
  5202  	v_1 := v.Args[1]
  5203  	v_0 := v.Args[0]
  5204  	b := v.Block
  5205  	typ := &b.Func.Config.Types
  5206  	// match: (Rsh8Ux8 x y)
  5207  	// cond: ssa.ShiftIsBounded(v)
  5208  	// result: (SRW (MOVBZreg x) y)
  5209  	for {
  5210  		x := v_0
  5211  		y := v_1
  5212  		if !(ssa.ShiftIsBounded(v)) {
  5213  			break
  5214  		}
  5215  		v.Reset(ssaop.OpS390XSRW)
  5216  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5217  		v0.AddArg(x)
  5218  		v.AddArg2(v0, y)
  5219  		return true
  5220  	}
  5221  	// match: (Rsh8Ux8 <t> x y)
  5222  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  5223  	for {
  5224  		t := v.Type
  5225  		x := v_0
  5226  		y := v_1
  5227  		v.Reset(ssaop.OpS390XLOCGR)
  5228  		v.Type = t
  5229  		v.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5230  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRW, t)
  5231  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5232  		v1.AddArg(x)
  5233  		v0.AddArg2(v1, y)
  5234  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
  5235  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  5236  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5237  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5238  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5239  		v4.AddArg(y)
  5240  		v3.AddArg(v4)
  5241  		v.AddArg3(v0, v2, v3)
  5242  		return true
  5243  	}
  5244  }
  5245  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
  5246  	v_1 := v.Args[1]
  5247  	v_0 := v.Args[0]
  5248  	b := v.Block
  5249  	typ := &b.Func.Config.Types
  5250  	// match: (Rsh8x16 x y)
  5251  	// cond: ssa.ShiftIsBounded(v)
  5252  	// result: (SRAW (MOVBreg x) y)
  5253  	for {
  5254  		x := v_0
  5255  		y := v_1
  5256  		if !(ssa.ShiftIsBounded(v)) {
  5257  			break
  5258  		}
  5259  		v.Reset(ssaop.OpS390XSRAW)
  5260  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5261  		v0.AddArg(x)
  5262  		v.AddArg2(v0, y)
  5263  		return true
  5264  	}
  5265  	// match: (Rsh8x16 x y)
  5266  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  5267  	for {
  5268  		x := v_0
  5269  		y := v_1
  5270  		v.Reset(ssaop.OpS390XSRAW)
  5271  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5272  		v0.AddArg(x)
  5273  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  5274  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5275  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  5276  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  5277  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5278  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5279  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHZreg, typ.UInt64)
  5280  		v4.AddArg(y)
  5281  		v3.AddArg(v4)
  5282  		v1.AddArg3(y, v2, v3)
  5283  		v.AddArg2(v0, v1)
  5284  		return true
  5285  	}
  5286  }
  5287  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
  5288  	v_1 := v.Args[1]
  5289  	v_0 := v.Args[0]
  5290  	b := v.Block
  5291  	typ := &b.Func.Config.Types
  5292  	// match: (Rsh8x32 x y)
  5293  	// cond: ssa.ShiftIsBounded(v)
  5294  	// result: (SRAW (MOVBreg x) y)
  5295  	for {
  5296  		x := v_0
  5297  		y := v_1
  5298  		if !(ssa.ShiftIsBounded(v)) {
  5299  			break
  5300  		}
  5301  		v.Reset(ssaop.OpS390XSRAW)
  5302  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5303  		v0.AddArg(x)
  5304  		v.AddArg2(v0, y)
  5305  		return true
  5306  	}
  5307  	// match: (Rsh8x32 x y)
  5308  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  5309  	for {
  5310  		x := v_0
  5311  		y := v_1
  5312  		v.Reset(ssaop.OpS390XSRAW)
  5313  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5314  		v0.AddArg(x)
  5315  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  5316  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5317  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  5318  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  5319  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5320  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5321  		v3.AddArg(y)
  5322  		v1.AddArg3(y, v2, v3)
  5323  		v.AddArg2(v0, v1)
  5324  		return true
  5325  	}
  5326  }
  5327  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
  5328  	v_1 := v.Args[1]
  5329  	v_0 := v.Args[0]
  5330  	b := v.Block
  5331  	typ := &b.Func.Config.Types
  5332  	// match: (Rsh8x64 x y)
  5333  	// cond: ssa.ShiftIsBounded(v)
  5334  	// result: (SRAW (MOVBreg x) y)
  5335  	for {
  5336  		x := v_0
  5337  		y := v_1
  5338  		if !(ssa.ShiftIsBounded(v)) {
  5339  			break
  5340  		}
  5341  		v.Reset(ssaop.OpS390XSRAW)
  5342  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5343  		v0.AddArg(x)
  5344  		v.AddArg2(v0, y)
  5345  		return true
  5346  	}
  5347  	// match: (Rsh8x64 x y)
  5348  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5349  	for {
  5350  		x := v_0
  5351  		y := v_1
  5352  		v.Reset(ssaop.OpS390XSRAW)
  5353  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5354  		v0.AddArg(x)
  5355  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  5356  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5357  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  5358  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  5359  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  5360  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5361  		v3.AddArg(y)
  5362  		v1.AddArg3(y, v2, v3)
  5363  		v.AddArg2(v0, v1)
  5364  		return true
  5365  	}
  5366  }
  5367  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
  5368  	v_1 := v.Args[1]
  5369  	v_0 := v.Args[0]
  5370  	b := v.Block
  5371  	typ := &b.Func.Config.Types
  5372  	// match: (Rsh8x8 x y)
  5373  	// cond: ssa.ShiftIsBounded(v)
  5374  	// result: (SRAW (MOVBreg x) y)
  5375  	for {
  5376  		x := v_0
  5377  		y := v_1
  5378  		if !(ssa.ShiftIsBounded(v)) {
  5379  			break
  5380  		}
  5381  		v.Reset(ssaop.OpS390XSRAW)
  5382  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5383  		v0.AddArg(x)
  5384  		v.AddArg2(v0, y)
  5385  		return true
  5386  	}
  5387  	// match: (Rsh8x8 x y)
  5388  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5389  	for {
  5390  		x := v_0
  5391  		y := v_1
  5392  		v.Reset(ssaop.OpS390XSRAW)
  5393  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBreg, typ.Int64)
  5394  		v0.AddArg(x)
  5395  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XLOCGR, y.Type)
  5396  		v1.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
  5397  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, y.Type)
  5398  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  5399  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  5400  		v3.AuxInt = ssa.Int32ToAuxInt(64)
  5401  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XMOVBZreg, typ.UInt64)
  5402  		v4.AddArg(y)
  5403  		v3.AddArg(v4)
  5404  		v1.AddArg3(y, v2, v3)
  5405  		v.AddArg2(v0, v1)
  5406  		return true
  5407  	}
  5408  }
  5409  func rewriteValue_OpS390XADD(v *ssa.Value) bool {
  5410  	v_1 := v.Args[1]
  5411  	v_0 := v.Args[0]
  5412  	// match: (ADD x (MOVDconst <t> [c]))
  5413  	// cond: ssa.Is32Bit(c) && !t.IsPtr()
  5414  	// result: (ADDconst [int32(c)] x)
  5415  	for {
  5416  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5417  			x := v_0
  5418  			if v_1.Op != ssaop.OpS390XMOVDconst {
  5419  				continue
  5420  			}
  5421  			t := v_1.Type
  5422  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5423  			if !(ssa.Is32Bit(c) && !t.IsPtr()) {
  5424  				continue
  5425  			}
  5426  			v.Reset(ssaop.OpS390XADDconst)
  5427  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5428  			v.AddArg(x)
  5429  			return true
  5430  		}
  5431  		break
  5432  	}
  5433  	// match: (ADD idx (MOVDaddr [c] {s} ptr))
  5434  	// cond: ptr.Op != ssaop.OpSB
  5435  	// result: (MOVDaddridx [c] {s} ptr idx)
  5436  	for {
  5437  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5438  			idx := v_0
  5439  			if v_1.Op != ssaop.OpS390XMOVDaddr {
  5440  				continue
  5441  			}
  5442  			c := ssa.AuxIntToInt32(v_1.AuxInt)
  5443  			s := ssa.AuxToSym(v_1.Aux)
  5444  			ptr := v_1.Args[0]
  5445  			if !(ptr.Op != ssaop.OpSB) {
  5446  				continue
  5447  			}
  5448  			v.Reset(ssaop.OpS390XMOVDaddridx)
  5449  			v.AuxInt = ssa.Int32ToAuxInt(c)
  5450  			v.Aux = ssa.SymToAux(s)
  5451  			v.AddArg2(ptr, idx)
  5452  			return true
  5453  		}
  5454  		break
  5455  	}
  5456  	// match: (ADD x (NEG y))
  5457  	// result: (SUB x y)
  5458  	for {
  5459  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5460  			x := v_0
  5461  			if v_1.Op != ssaop.OpS390XNEG {
  5462  				continue
  5463  			}
  5464  			y := v_1.Args[0]
  5465  			v.Reset(ssaop.OpS390XSUB)
  5466  			v.AddArg2(x, y)
  5467  			return true
  5468  		}
  5469  		break
  5470  	}
  5471  	// match: (ADD <t> x g:(MOVDload [off] {sym} ptr mem))
  5472  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
  5473  	// result: (ADDload <t> [off] {sym} x ptr mem)
  5474  	for {
  5475  		t := v.Type
  5476  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5477  			x := v_0
  5478  			g := v_1
  5479  			if g.Op != ssaop.OpS390XMOVDload {
  5480  				continue
  5481  			}
  5482  			off := ssa.AuxIntToInt32(g.AuxInt)
  5483  			sym := ssa.AuxToSym(g.Aux)
  5484  			mem := g.Args[1]
  5485  			ptr := g.Args[0]
  5486  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
  5487  				continue
  5488  			}
  5489  			v.Reset(ssaop.OpS390XADDload)
  5490  			v.Type = t
  5491  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5492  			v.Aux = ssa.SymToAux(sym)
  5493  			v.AddArg3(x, ptr, mem)
  5494  			return true
  5495  		}
  5496  		break
  5497  	}
  5498  	return false
  5499  }
  5500  func rewriteValue_OpS390XADDC(v *ssa.Value) bool {
  5501  	v_1 := v.Args[1]
  5502  	v_0 := v.Args[0]
  5503  	// match: (ADDC x (MOVDconst [c]))
  5504  	// cond: ssa.Is16Bit(c)
  5505  	// result: (ADDCconst x [int16(c)])
  5506  	for {
  5507  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5508  			x := v_0
  5509  			if v_1.Op != ssaop.OpS390XMOVDconst {
  5510  				continue
  5511  			}
  5512  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5513  			if !(ssa.Is16Bit(c)) {
  5514  				continue
  5515  			}
  5516  			v.Reset(ssaop.OpS390XADDCconst)
  5517  			v.AuxInt = ssa.Int16ToAuxInt(int16(c))
  5518  			v.AddArg(x)
  5519  			return true
  5520  		}
  5521  		break
  5522  	}
  5523  	return false
  5524  }
  5525  func rewriteValue_OpS390XADDE(v *ssa.Value) bool {
  5526  	v_2 := v.Args[2]
  5527  	v_1 := v.Args[1]
  5528  	v_0 := v.Args[0]
  5529  	// match: (ADDE x y (FlagEQ))
  5530  	// result: (ADDC x y)
  5531  	for {
  5532  		x := v_0
  5533  		y := v_1
  5534  		if v_2.Op != ssaop.OpS390XFlagEQ {
  5535  			break
  5536  		}
  5537  		v.Reset(ssaop.OpS390XADDC)
  5538  		v.AddArg2(x, y)
  5539  		return true
  5540  	}
  5541  	// match: (ADDE x y (FlagLT))
  5542  	// result: (ADDC x y)
  5543  	for {
  5544  		x := v_0
  5545  		y := v_1
  5546  		if v_2.Op != ssaop.OpS390XFlagLT {
  5547  			break
  5548  		}
  5549  		v.Reset(ssaop.OpS390XADDC)
  5550  		v.AddArg2(x, y)
  5551  		return true
  5552  	}
  5553  	// match: (ADDE x y (Select1 (ADDCconst [-1] (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) c)))))
  5554  	// result: (ADDE x y c)
  5555  	for {
  5556  		x := v_0
  5557  		y := v_1
  5558  		if v_2.Op != ssaop.OpSelect1 {
  5559  			break
  5560  		}
  5561  		v_2_0 := v_2.Args[0]
  5562  		if v_2_0.Op != ssaop.OpS390XADDCconst || ssa.AuxIntToInt16(v_2_0.AuxInt) != -1 {
  5563  			break
  5564  		}
  5565  		v_2_0_0 := v_2_0.Args[0]
  5566  		if v_2_0_0.Op != ssaop.OpSelect0 {
  5567  			break
  5568  		}
  5569  		v_2_0_0_0 := v_2_0_0.Args[0]
  5570  		if v_2_0_0_0.Op != ssaop.OpS390XADDE {
  5571  			break
  5572  		}
  5573  		c := v_2_0_0_0.Args[2]
  5574  		v_2_0_0_0_0 := v_2_0_0_0.Args[0]
  5575  		if v_2_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_2_0_0_0_0.AuxInt) != 0 {
  5576  			break
  5577  		}
  5578  		v_2_0_0_0_1 := v_2_0_0_0.Args[1]
  5579  		if v_2_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_2_0_0_0_1.AuxInt) != 0 {
  5580  			break
  5581  		}
  5582  		v.Reset(ssaop.OpS390XADDE)
  5583  		v.AddArg3(x, y, c)
  5584  		return true
  5585  	}
  5586  	return false
  5587  }
  5588  func rewriteValue_OpS390XADDW(v *ssa.Value) bool {
  5589  	v_1 := v.Args[1]
  5590  	v_0 := v.Args[0]
  5591  	// match: (ADDW x (MOVDconst [c]))
  5592  	// result: (ADDWconst [int32(c)] x)
  5593  	for {
  5594  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5595  			x := v_0
  5596  			if v_1.Op != ssaop.OpS390XMOVDconst {
  5597  				continue
  5598  			}
  5599  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5600  			v.Reset(ssaop.OpS390XADDWconst)
  5601  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  5602  			v.AddArg(x)
  5603  			return true
  5604  		}
  5605  		break
  5606  	}
  5607  	// match: (ADDW x (NEGW y))
  5608  	// result: (SUBW x y)
  5609  	for {
  5610  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5611  			x := v_0
  5612  			if v_1.Op != ssaop.OpS390XNEGW {
  5613  				continue
  5614  			}
  5615  			y := v_1.Args[0]
  5616  			v.Reset(ssaop.OpS390XSUBW)
  5617  			v.AddArg2(x, y)
  5618  			return true
  5619  		}
  5620  		break
  5621  	}
  5622  	// match: (ADDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5623  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
  5624  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5625  	for {
  5626  		t := v.Type
  5627  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5628  			x := v_0
  5629  			g := v_1
  5630  			if g.Op != ssaop.OpS390XMOVWload {
  5631  				continue
  5632  			}
  5633  			off := ssa.AuxIntToInt32(g.AuxInt)
  5634  			sym := ssa.AuxToSym(g.Aux)
  5635  			mem := g.Args[1]
  5636  			ptr := g.Args[0]
  5637  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
  5638  				continue
  5639  			}
  5640  			v.Reset(ssaop.OpS390XADDWload)
  5641  			v.Type = t
  5642  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5643  			v.Aux = ssa.SymToAux(sym)
  5644  			v.AddArg3(x, ptr, mem)
  5645  			return true
  5646  		}
  5647  		break
  5648  	}
  5649  	// match: (ADDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  5650  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
  5651  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5652  	for {
  5653  		t := v.Type
  5654  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5655  			x := v_0
  5656  			g := v_1
  5657  			if g.Op != ssaop.OpS390XMOVWZload {
  5658  				continue
  5659  			}
  5660  			off := ssa.AuxIntToInt32(g.AuxInt)
  5661  			sym := ssa.AuxToSym(g.Aux)
  5662  			mem := g.Args[1]
  5663  			ptr := g.Args[0]
  5664  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
  5665  				continue
  5666  			}
  5667  			v.Reset(ssaop.OpS390XADDWload)
  5668  			v.Type = t
  5669  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5670  			v.Aux = ssa.SymToAux(sym)
  5671  			v.AddArg3(x, ptr, mem)
  5672  			return true
  5673  		}
  5674  		break
  5675  	}
  5676  	return false
  5677  }
  5678  func rewriteValue_OpS390XADDWconst(v *ssa.Value) bool {
  5679  	v_0 := v.Args[0]
  5680  	// match: (ADDWconst [c] x)
  5681  	// cond: int32(c)==0
  5682  	// result: x
  5683  	for {
  5684  		c := ssa.AuxIntToInt32(v.AuxInt)
  5685  		x := v_0
  5686  		if !(int32(c) == 0) {
  5687  			break
  5688  		}
  5689  		v.CopyOf(x)
  5690  		return true
  5691  	}
  5692  	// match: (ADDWconst [c] (MOVDconst [d]))
  5693  	// result: (MOVDconst [int64(c)+d])
  5694  	for {
  5695  		c := ssa.AuxIntToInt32(v.AuxInt)
  5696  		if v_0.Op != ssaop.OpS390XMOVDconst {
  5697  			break
  5698  		}
  5699  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  5700  		v.Reset(ssaop.OpS390XMOVDconst)
  5701  		v.AuxInt = ssa.Int64ToAuxInt(int64(c) + d)
  5702  		return true
  5703  	}
  5704  	// match: (ADDWconst [c] (ADDWconst [d] x))
  5705  	// result: (ADDWconst [int32(c+d)] x)
  5706  	for {
  5707  		c := ssa.AuxIntToInt32(v.AuxInt)
  5708  		if v_0.Op != ssaop.OpS390XADDWconst {
  5709  			break
  5710  		}
  5711  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5712  		x := v_0.Args[0]
  5713  		v.Reset(ssaop.OpS390XADDWconst)
  5714  		v.AuxInt = ssa.Int32ToAuxInt(int32(c + d))
  5715  		v.AddArg(x)
  5716  		return true
  5717  	}
  5718  	return false
  5719  }
  5720  func rewriteValue_OpS390XADDWload(v *ssa.Value) bool {
  5721  	v_2 := v.Args[2]
  5722  	v_1 := v.Args[1]
  5723  	v_0 := v.Args[0]
  5724  	// match: (ADDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5725  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
  5726  	// result: (ADDWload [off1+off2] {sym} x ptr mem)
  5727  	for {
  5728  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5729  		sym := ssa.AuxToSym(v.Aux)
  5730  		x := v_0
  5731  		if v_1.Op != ssaop.OpS390XADDconst {
  5732  			break
  5733  		}
  5734  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5735  		ptr := v_1.Args[0]
  5736  		mem := v_2
  5737  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
  5738  			break
  5739  		}
  5740  		v.Reset(ssaop.OpS390XADDWload)
  5741  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5742  		v.Aux = ssa.SymToAux(sym)
  5743  		v.AddArg3(x, ptr, mem)
  5744  		return true
  5745  	}
  5746  	// match: (ADDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5747  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
  5748  	// result: (ADDWload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
  5749  	for {
  5750  		o1 := ssa.AuxIntToInt32(v.AuxInt)
  5751  		s1 := ssa.AuxToSym(v.Aux)
  5752  		x := v_0
  5753  		if v_1.Op != ssaop.OpS390XMOVDaddr {
  5754  			break
  5755  		}
  5756  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5757  		s2 := ssa.AuxToSym(v_1.Aux)
  5758  		ptr := v_1.Args[0]
  5759  		mem := v_2
  5760  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
  5761  			break
  5762  		}
  5763  		v.Reset(ssaop.OpS390XADDWload)
  5764  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
  5765  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
  5766  		v.AddArg3(x, ptr, mem)
  5767  		return true
  5768  	}
  5769  	return false
  5770  }
  5771  func rewriteValue_OpS390XADDconst(v *ssa.Value) bool {
  5772  	v_0 := v.Args[0]
  5773  	// match: (ADDconst [c] (MOVDaddr [d] {s} x:(SB)))
  5774  	// cond: ((c+d)&1 == 0) && ssa.Is32Bit(int64(c)+int64(d))
  5775  	// result: (MOVDaddr [c+d] {s} x)
  5776  	for {
  5777  		c := ssa.AuxIntToInt32(v.AuxInt)
  5778  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  5779  			break
  5780  		}
  5781  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5782  		s := ssa.AuxToSym(v_0.Aux)
  5783  		x := v_0.Args[0]
  5784  		if x.Op != ssaop.OpSB || !(((c+d)&1 == 0) && ssa.Is32Bit(int64(c)+int64(d))) {
  5785  			break
  5786  		}
  5787  		v.Reset(ssaop.OpS390XMOVDaddr)
  5788  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  5789  		v.Aux = ssa.SymToAux(s)
  5790  		v.AddArg(x)
  5791  		return true
  5792  	}
  5793  	// match: (ADDconst [c] (MOVDaddr [d] {s} x))
  5794  	// cond: x.Op != ssaop.OpSB && ssa.Is20Bit(int64(c)+int64(d))
  5795  	// result: (MOVDaddr [c+d] {s} x)
  5796  	for {
  5797  		c := ssa.AuxIntToInt32(v.AuxInt)
  5798  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  5799  			break
  5800  		}
  5801  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5802  		s := ssa.AuxToSym(v_0.Aux)
  5803  		x := v_0.Args[0]
  5804  		if !(x.Op != ssaop.OpSB && ssa.Is20Bit(int64(c)+int64(d))) {
  5805  			break
  5806  		}
  5807  		v.Reset(ssaop.OpS390XMOVDaddr)
  5808  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  5809  		v.Aux = ssa.SymToAux(s)
  5810  		v.AddArg(x)
  5811  		return true
  5812  	}
  5813  	// match: (ADDconst [c] (MOVDaddridx [d] {s} x y))
  5814  	// cond: ssa.Is20Bit(int64(c)+int64(d))
  5815  	// result: (MOVDaddridx [c+d] {s} x y)
  5816  	for {
  5817  		c := ssa.AuxIntToInt32(v.AuxInt)
  5818  		if v_0.Op != ssaop.OpS390XMOVDaddridx {
  5819  			break
  5820  		}
  5821  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5822  		s := ssa.AuxToSym(v_0.Aux)
  5823  		y := v_0.Args[1]
  5824  		x := v_0.Args[0]
  5825  		if !(ssa.Is20Bit(int64(c) + int64(d))) {
  5826  			break
  5827  		}
  5828  		v.Reset(ssaop.OpS390XMOVDaddridx)
  5829  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  5830  		v.Aux = ssa.SymToAux(s)
  5831  		v.AddArg2(x, y)
  5832  		return true
  5833  	}
  5834  	// match: (ADDconst [0] x)
  5835  	// result: x
  5836  	for {
  5837  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  5838  			break
  5839  		}
  5840  		x := v_0
  5841  		v.CopyOf(x)
  5842  		return true
  5843  	}
  5844  	// match: (ADDconst [c] (MOVDconst [d]))
  5845  	// result: (MOVDconst [int64(c)+d])
  5846  	for {
  5847  		c := ssa.AuxIntToInt32(v.AuxInt)
  5848  		if v_0.Op != ssaop.OpS390XMOVDconst {
  5849  			break
  5850  		}
  5851  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  5852  		v.Reset(ssaop.OpS390XMOVDconst)
  5853  		v.AuxInt = ssa.Int64ToAuxInt(int64(c) + d)
  5854  		return true
  5855  	}
  5856  	// match: (ADDconst [c] (ADDconst [d] x))
  5857  	// cond: ssa.Is32Bit(int64(c)+int64(d))
  5858  	// result: (ADDconst [c+d] x)
  5859  	for {
  5860  		c := ssa.AuxIntToInt32(v.AuxInt)
  5861  		if v_0.Op != ssaop.OpS390XADDconst {
  5862  			break
  5863  		}
  5864  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5865  		x := v_0.Args[0]
  5866  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  5867  			break
  5868  		}
  5869  		v.Reset(ssaop.OpS390XADDconst)
  5870  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  5871  		v.AddArg(x)
  5872  		return true
  5873  	}
  5874  	return false
  5875  }
  5876  func rewriteValue_OpS390XADDload(v *ssa.Value) bool {
  5877  	v_2 := v.Args[2]
  5878  	v_1 := v.Args[1]
  5879  	v_0 := v.Args[0]
  5880  	b := v.Block
  5881  	// match: (ADDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  5882  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  5883  	// result: (ADD x (LGDR <t> y))
  5884  	for {
  5885  		t := v.Type
  5886  		off := ssa.AuxIntToInt32(v.AuxInt)
  5887  		sym := ssa.AuxToSym(v.Aux)
  5888  		x := v_0
  5889  		ptr1 := v_1
  5890  		if v_2.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_2.AuxInt) != off || ssa.AuxToSym(v_2.Aux) != sym {
  5891  			break
  5892  		}
  5893  		y := v_2.Args[1]
  5894  		ptr2 := v_2.Args[0]
  5895  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  5896  			break
  5897  		}
  5898  		v.Reset(ssaop.OpS390XADD)
  5899  		v0 := b.NewValue0(v_2.Pos, ssaop.OpS390XLGDR, t)
  5900  		v0.AddArg(y)
  5901  		v.AddArg2(x, v0)
  5902  		return true
  5903  	}
  5904  	// match: (ADDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5905  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
  5906  	// result: (ADDload [off1+off2] {sym} x ptr mem)
  5907  	for {
  5908  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5909  		sym := ssa.AuxToSym(v.Aux)
  5910  		x := v_0
  5911  		if v_1.Op != ssaop.OpS390XADDconst {
  5912  			break
  5913  		}
  5914  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5915  		ptr := v_1.Args[0]
  5916  		mem := v_2
  5917  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
  5918  			break
  5919  		}
  5920  		v.Reset(ssaop.OpS390XADDload)
  5921  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5922  		v.Aux = ssa.SymToAux(sym)
  5923  		v.AddArg3(x, ptr, mem)
  5924  		return true
  5925  	}
  5926  	// match: (ADDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5927  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
  5928  	// result: (ADDload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
  5929  	for {
  5930  		o1 := ssa.AuxIntToInt32(v.AuxInt)
  5931  		s1 := ssa.AuxToSym(v.Aux)
  5932  		x := v_0
  5933  		if v_1.Op != ssaop.OpS390XMOVDaddr {
  5934  			break
  5935  		}
  5936  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5937  		s2 := ssa.AuxToSym(v_1.Aux)
  5938  		ptr := v_1.Args[0]
  5939  		mem := v_2
  5940  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
  5941  			break
  5942  		}
  5943  		v.Reset(ssaop.OpS390XADDload)
  5944  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
  5945  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
  5946  		v.AddArg3(x, ptr, mem)
  5947  		return true
  5948  	}
  5949  	return false
  5950  }
  5951  func rewriteValue_OpS390XAND(v *ssa.Value) bool {
  5952  	v_1 := v.Args[1]
  5953  	v_0 := v.Args[0]
  5954  	b := v.Block
  5955  	typ := &b.Func.Config.Types
  5956  	// match: (AND x (MOVDconst [c]))
  5957  	// cond: s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil
  5958  	// result: (RISBGZ x {*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c))})
  5959  	for {
  5960  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5961  			x := v_0
  5962  			if v_1.Op != ssaop.OpS390XMOVDconst {
  5963  				continue
  5964  			}
  5965  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5966  			if !(s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil) {
  5967  				continue
  5968  			}
  5969  			v.Reset(ssaop.OpS390XRISBGZ)
  5970  			v.Aux = ssa.S390xRotateParamsToAux(*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)))
  5971  			v.AddArg(x)
  5972  			return true
  5973  		}
  5974  		break
  5975  	}
  5976  	// match: (AND x (MOVDconst [c]))
  5977  	// cond: ssa.Is32Bit(c) && c < 0
  5978  	// result: (ANDconst [c] x)
  5979  	for {
  5980  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5981  			x := v_0
  5982  			if v_1.Op != ssaop.OpS390XMOVDconst {
  5983  				continue
  5984  			}
  5985  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  5986  			if !(ssa.Is32Bit(c) && c < 0) {
  5987  				continue
  5988  			}
  5989  			v.Reset(ssaop.OpS390XANDconst)
  5990  			v.AuxInt = ssa.Int64ToAuxInt(c)
  5991  			v.AddArg(x)
  5992  			return true
  5993  		}
  5994  		break
  5995  	}
  5996  	// match: (AND x (MOVDconst [c]))
  5997  	// cond: ssa.Is32Bit(c) && c >= 0
  5998  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(c)] x))
  5999  	for {
  6000  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6001  			x := v_0
  6002  			if v_1.Op != ssaop.OpS390XMOVDconst {
  6003  				continue
  6004  			}
  6005  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  6006  			if !(ssa.Is32Bit(c) && c >= 0) {
  6007  				continue
  6008  			}
  6009  			v.Reset(ssaop.OpS390XMOVWZreg)
  6010  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
  6011  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6012  			v0.AddArg(x)
  6013  			v.AddArg(v0)
  6014  			return true
  6015  		}
  6016  		break
  6017  	}
  6018  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  6019  	// result: (MOVDconst [c&d])
  6020  	for {
  6021  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6022  			if v_0.Op != ssaop.OpS390XMOVDconst {
  6023  				continue
  6024  			}
  6025  			c := ssa.AuxIntToInt64(v_0.AuxInt)
  6026  			if v_1.Op != ssaop.OpS390XMOVDconst {
  6027  				continue
  6028  			}
  6029  			d := ssa.AuxIntToInt64(v_1.AuxInt)
  6030  			v.Reset(ssaop.OpS390XMOVDconst)
  6031  			v.AuxInt = ssa.Int64ToAuxInt(c & d)
  6032  			return true
  6033  		}
  6034  		break
  6035  	}
  6036  	// match: (AND x x)
  6037  	// result: x
  6038  	for {
  6039  		x := v_0
  6040  		if x != v_1 {
  6041  			break
  6042  		}
  6043  		v.CopyOf(x)
  6044  		return true
  6045  	}
  6046  	// match: (AND <t> x g:(MOVDload [off] {sym} ptr mem))
  6047  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
  6048  	// result: (ANDload <t> [off] {sym} x ptr mem)
  6049  	for {
  6050  		t := v.Type
  6051  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6052  			x := v_0
  6053  			g := v_1
  6054  			if g.Op != ssaop.OpS390XMOVDload {
  6055  				continue
  6056  			}
  6057  			off := ssa.AuxIntToInt32(g.AuxInt)
  6058  			sym := ssa.AuxToSym(g.Aux)
  6059  			mem := g.Args[1]
  6060  			ptr := g.Args[0]
  6061  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
  6062  				continue
  6063  			}
  6064  			v.Reset(ssaop.OpS390XANDload)
  6065  			v.Type = t
  6066  			v.AuxInt = ssa.Int32ToAuxInt(off)
  6067  			v.Aux = ssa.SymToAux(sym)
  6068  			v.AddArg3(x, ptr, mem)
  6069  			return true
  6070  		}
  6071  		break
  6072  	}
  6073  	return false
  6074  }
  6075  func rewriteValue_OpS390XANDW(v *ssa.Value) bool {
  6076  	v_1 := v.Args[1]
  6077  	v_0 := v.Args[0]
  6078  	// match: (ANDW x (MOVDconst [c]))
  6079  	// result: (ANDWconst [int32(c)] x)
  6080  	for {
  6081  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6082  			x := v_0
  6083  			if v_1.Op != ssaop.OpS390XMOVDconst {
  6084  				continue
  6085  			}
  6086  			c := ssa.AuxIntToInt64(v_1.AuxInt)
  6087  			v.Reset(ssaop.OpS390XANDWconst)
  6088  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6089  			v.AddArg(x)
  6090  			return true
  6091  		}
  6092  		break
  6093  	}
  6094  	// match: (ANDW x x)
  6095  	// result: x
  6096  	for {
  6097  		x := v_0
  6098  		if x != v_1 {
  6099  			break
  6100  		}
  6101  		v.CopyOf(x)
  6102  		return true
  6103  	}
  6104  	// match: (ANDW <t> x g:(MOVWload [off] {sym} ptr mem))
  6105  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
  6106  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6107  	for {
  6108  		t := v.Type
  6109  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6110  			x := v_0
  6111  			g := v_1
  6112  			if g.Op != ssaop.OpS390XMOVWload {
  6113  				continue
  6114  			}
  6115  			off := ssa.AuxIntToInt32(g.AuxInt)
  6116  			sym := ssa.AuxToSym(g.Aux)
  6117  			mem := g.Args[1]
  6118  			ptr := g.Args[0]
  6119  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
  6120  				continue
  6121  			}
  6122  			v.Reset(ssaop.OpS390XANDWload)
  6123  			v.Type = t
  6124  			v.AuxInt = ssa.Int32ToAuxInt(off)
  6125  			v.Aux = ssa.SymToAux(sym)
  6126  			v.AddArg3(x, ptr, mem)
  6127  			return true
  6128  		}
  6129  		break
  6130  	}
  6131  	// match: (ANDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  6132  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
  6133  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6134  	for {
  6135  		t := v.Type
  6136  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6137  			x := v_0
  6138  			g := v_1
  6139  			if g.Op != ssaop.OpS390XMOVWZload {
  6140  				continue
  6141  			}
  6142  			off := ssa.AuxIntToInt32(g.AuxInt)
  6143  			sym := ssa.AuxToSym(g.Aux)
  6144  			mem := g.Args[1]
  6145  			ptr := g.Args[0]
  6146  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
  6147  				continue
  6148  			}
  6149  			v.Reset(ssaop.OpS390XANDWload)
  6150  			v.Type = t
  6151  			v.AuxInt = ssa.Int32ToAuxInt(off)
  6152  			v.Aux = ssa.SymToAux(sym)
  6153  			v.AddArg3(x, ptr, mem)
  6154  			return true
  6155  		}
  6156  		break
  6157  	}
  6158  	return false
  6159  }
  6160  func rewriteValue_OpS390XANDWconst(v *ssa.Value) bool {
  6161  	v_0 := v.Args[0]
  6162  	// match: (ANDWconst [c] (ANDWconst [d] x))
  6163  	// result: (ANDWconst [c&d] x)
  6164  	for {
  6165  		c := ssa.AuxIntToInt32(v.AuxInt)
  6166  		if v_0.Op != ssaop.OpS390XANDWconst {
  6167  			break
  6168  		}
  6169  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  6170  		x := v_0.Args[0]
  6171  		v.Reset(ssaop.OpS390XANDWconst)
  6172  		v.AuxInt = ssa.Int32ToAuxInt(c & d)
  6173  		v.AddArg(x)
  6174  		return true
  6175  	}
  6176  	// match: (ANDWconst [0x00ff] x)
  6177  	// result: (MOVBZreg x)
  6178  	for {
  6179  		if ssa.AuxIntToInt32(v.AuxInt) != 0x00ff {
  6180  			break
  6181  		}
  6182  		x := v_0
  6183  		v.Reset(ssaop.OpS390XMOVBZreg)
  6184  		v.AddArg(x)
  6185  		return true
  6186  	}
  6187  	// match: (ANDWconst [0xffff] x)
  6188  	// result: (MOVHZreg x)
  6189  	for {
  6190  		if ssa.AuxIntToInt32(v.AuxInt) != 0xffff {
  6191  			break
  6192  		}
  6193  		x := v_0
  6194  		v.Reset(ssaop.OpS390XMOVHZreg)
  6195  		v.AddArg(x)
  6196  		return true
  6197  	}
  6198  	// match: (ANDWconst [c] _)
  6199  	// cond: int32(c)==0
  6200  	// result: (MOVDconst [0])
  6201  	for {
  6202  		c := ssa.AuxIntToInt32(v.AuxInt)
  6203  		if !(int32(c) == 0) {
  6204  			break
  6205  		}
  6206  		v.Reset(ssaop.OpS390XMOVDconst)
  6207  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6208  		return true
  6209  	}
  6210  	// match: (ANDWconst [c] x)
  6211  	// cond: int32(c)==-1
  6212  	// result: x
  6213  	for {
  6214  		c := ssa.AuxIntToInt32(v.AuxInt)
  6215  		x := v_0
  6216  		if !(int32(c) == -1) {
  6217  			break
  6218  		}
  6219  		v.CopyOf(x)
  6220  		return true
  6221  	}
  6222  	// match: (ANDWconst [c] (MOVDconst [d]))
  6223  	// result: (MOVDconst [int64(c)&d])
  6224  	for {
  6225  		c := ssa.AuxIntToInt32(v.AuxInt)
  6226  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6227  			break
  6228  		}
  6229  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6230  		v.Reset(ssaop.OpS390XMOVDconst)
  6231  		v.AuxInt = ssa.Int64ToAuxInt(int64(c) & d)
  6232  		return true
  6233  	}
  6234  	return false
  6235  }
  6236  func rewriteValue_OpS390XANDWload(v *ssa.Value) bool {
  6237  	v_2 := v.Args[2]
  6238  	v_1 := v.Args[1]
  6239  	v_0 := v.Args[0]
  6240  	// match: (ANDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6241  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
  6242  	// result: (ANDWload [off1+off2] {sym} x ptr mem)
  6243  	for {
  6244  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6245  		sym := ssa.AuxToSym(v.Aux)
  6246  		x := v_0
  6247  		if v_1.Op != ssaop.OpS390XADDconst {
  6248  			break
  6249  		}
  6250  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  6251  		ptr := v_1.Args[0]
  6252  		mem := v_2
  6253  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
  6254  			break
  6255  		}
  6256  		v.Reset(ssaop.OpS390XANDWload)
  6257  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6258  		v.Aux = ssa.SymToAux(sym)
  6259  		v.AddArg3(x, ptr, mem)
  6260  		return true
  6261  	}
  6262  	// match: (ANDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6263  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
  6264  	// result: (ANDWload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
  6265  	for {
  6266  		o1 := ssa.AuxIntToInt32(v.AuxInt)
  6267  		s1 := ssa.AuxToSym(v.Aux)
  6268  		x := v_0
  6269  		if v_1.Op != ssaop.OpS390XMOVDaddr {
  6270  			break
  6271  		}
  6272  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
  6273  		s2 := ssa.AuxToSym(v_1.Aux)
  6274  		ptr := v_1.Args[0]
  6275  		mem := v_2
  6276  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
  6277  			break
  6278  		}
  6279  		v.Reset(ssaop.OpS390XANDWload)
  6280  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
  6281  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
  6282  		v.AddArg3(x, ptr, mem)
  6283  		return true
  6284  	}
  6285  	return false
  6286  }
  6287  func rewriteValue_OpS390XANDconst(v *ssa.Value) bool {
  6288  	v_0 := v.Args[0]
  6289  	// match: (ANDconst [c] (ANDconst [d] x))
  6290  	// result: (ANDconst [c&d] x)
  6291  	for {
  6292  		c := ssa.AuxIntToInt64(v.AuxInt)
  6293  		if v_0.Op != ssaop.OpS390XANDconst {
  6294  			break
  6295  		}
  6296  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6297  		x := v_0.Args[0]
  6298  		v.Reset(ssaop.OpS390XANDconst)
  6299  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  6300  		v.AddArg(x)
  6301  		return true
  6302  	}
  6303  	// match: (ANDconst [0] _)
  6304  	// result: (MOVDconst [0])
  6305  	for {
  6306  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  6307  			break
  6308  		}
  6309  		v.Reset(ssaop.OpS390XMOVDconst)
  6310  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6311  		return true
  6312  	}
  6313  	// match: (ANDconst [-1] x)
  6314  	// result: x
  6315  	for {
  6316  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
  6317  			break
  6318  		}
  6319  		x := v_0
  6320  		v.CopyOf(x)
  6321  		return true
  6322  	}
  6323  	// match: (ANDconst [c] (MOVDconst [d]))
  6324  	// result: (MOVDconst [c&d])
  6325  	for {
  6326  		c := ssa.AuxIntToInt64(v.AuxInt)
  6327  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6328  			break
  6329  		}
  6330  		d := ssa.AuxIntToInt64(v_0.AuxInt)
  6331  		v.Reset(ssaop.OpS390XMOVDconst)
  6332  		v.AuxInt = ssa.Int64ToAuxInt(c & d)
  6333  		return true
  6334  	}
  6335  	return false
  6336  }
  6337  func rewriteValue_OpS390XANDload(v *ssa.Value) bool {
  6338  	v_2 := v.Args[2]
  6339  	v_1 := v.Args[1]
  6340  	v_0 := v.Args[0]
  6341  	b := v.Block
  6342  	// match: (ANDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  6343  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  6344  	// result: (AND x (LGDR <t> y))
  6345  	for {
  6346  		t := v.Type
  6347  		off := ssa.AuxIntToInt32(v.AuxInt)
  6348  		sym := ssa.AuxToSym(v.Aux)
  6349  		x := v_0
  6350  		ptr1 := v_1
  6351  		if v_2.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_2.AuxInt) != off || ssa.AuxToSym(v_2.Aux) != sym {
  6352  			break
  6353  		}
  6354  		y := v_2.Args[1]
  6355  		ptr2 := v_2.Args[0]
  6356  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  6357  			break
  6358  		}
  6359  		v.Reset(ssaop.OpS390XAND)
  6360  		v0 := b.NewValue0(v_2.Pos, ssaop.OpS390XLGDR, t)
  6361  		v0.AddArg(y)
  6362  		v.AddArg2(x, v0)
  6363  		return true
  6364  	}
  6365  	// match: (ANDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6366  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
  6367  	// result: (ANDload [off1+off2] {sym} x ptr mem)
  6368  	for {
  6369  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6370  		sym := ssa.AuxToSym(v.Aux)
  6371  		x := v_0
  6372  		if v_1.Op != ssaop.OpS390XADDconst {
  6373  			break
  6374  		}
  6375  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  6376  		ptr := v_1.Args[0]
  6377  		mem := v_2
  6378  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
  6379  			break
  6380  		}
  6381  		v.Reset(ssaop.OpS390XANDload)
  6382  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6383  		v.Aux = ssa.SymToAux(sym)
  6384  		v.AddArg3(x, ptr, mem)
  6385  		return true
  6386  	}
  6387  	// match: (ANDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6388  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
  6389  	// result: (ANDload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
  6390  	for {
  6391  		o1 := ssa.AuxIntToInt32(v.AuxInt)
  6392  		s1 := ssa.AuxToSym(v.Aux)
  6393  		x := v_0
  6394  		if v_1.Op != ssaop.OpS390XMOVDaddr {
  6395  			break
  6396  		}
  6397  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
  6398  		s2 := ssa.AuxToSym(v_1.Aux)
  6399  		ptr := v_1.Args[0]
  6400  		mem := v_2
  6401  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
  6402  			break
  6403  		}
  6404  		v.Reset(ssaop.OpS390XANDload)
  6405  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
  6406  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
  6407  		v.AddArg3(x, ptr, mem)
  6408  		return true
  6409  	}
  6410  	return false
  6411  }
  6412  func rewriteValue_OpS390XCMP(v *ssa.Value) bool {
  6413  	v_1 := v.Args[1]
  6414  	v_0 := v.Args[0]
  6415  	b := v.Block
  6416  	// match: (CMP x (MOVDconst [c]))
  6417  	// cond: ssa.Is32Bit(c)
  6418  	// result: (CMPconst x [int32(c)])
  6419  	for {
  6420  		x := v_0
  6421  		if v_1.Op != ssaop.OpS390XMOVDconst {
  6422  			break
  6423  		}
  6424  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6425  		if !(ssa.Is32Bit(c)) {
  6426  			break
  6427  		}
  6428  		v.Reset(ssaop.OpS390XCMPconst)
  6429  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6430  		v.AddArg(x)
  6431  		return true
  6432  	}
  6433  	// match: (CMP (MOVDconst [c]) x)
  6434  	// cond: ssa.Is32Bit(c)
  6435  	// result: (InvertFlags (CMPconst x [int32(c)]))
  6436  	for {
  6437  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6438  			break
  6439  		}
  6440  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6441  		x := v_1
  6442  		if !(ssa.Is32Bit(c)) {
  6443  			break
  6444  		}
  6445  		v.Reset(ssaop.OpS390XInvertFlags)
  6446  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPconst, types.TypeFlags)
  6447  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6448  		v0.AddArg(x)
  6449  		v.AddArg(v0)
  6450  		return true
  6451  	}
  6452  	// match: (CMP x y)
  6453  	// cond: ssa.CanonLessThan(x,y)
  6454  	// result: (InvertFlags (CMP y x))
  6455  	for {
  6456  		x := v_0
  6457  		y := v_1
  6458  		if !(ssa.CanonLessThan(x, y)) {
  6459  			break
  6460  		}
  6461  		v.Reset(ssaop.OpS390XInvertFlags)
  6462  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMP, types.TypeFlags)
  6463  		v0.AddArg2(y, x)
  6464  		v.AddArg(v0)
  6465  		return true
  6466  	}
  6467  	return false
  6468  }
  6469  func rewriteValue_OpS390XCMPU(v *ssa.Value) bool {
  6470  	v_1 := v.Args[1]
  6471  	v_0 := v.Args[0]
  6472  	b := v.Block
  6473  	// match: (CMPU x (MOVDconst [c]))
  6474  	// cond: ssa.IsU32Bit(c)
  6475  	// result: (CMPUconst x [int32(c)])
  6476  	for {
  6477  		x := v_0
  6478  		if v_1.Op != ssaop.OpS390XMOVDconst {
  6479  			break
  6480  		}
  6481  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6482  		if !(ssa.IsU32Bit(c)) {
  6483  			break
  6484  		}
  6485  		v.Reset(ssaop.OpS390XCMPUconst)
  6486  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6487  		v.AddArg(x)
  6488  		return true
  6489  	}
  6490  	// match: (CMPU (MOVDconst [c]) x)
  6491  	// cond: ssa.IsU32Bit(c)
  6492  	// result: (InvertFlags (CMPUconst x [int32(c)]))
  6493  	for {
  6494  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6495  			break
  6496  		}
  6497  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6498  		x := v_1
  6499  		if !(ssa.IsU32Bit(c)) {
  6500  			break
  6501  		}
  6502  		v.Reset(ssaop.OpS390XInvertFlags)
  6503  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
  6504  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6505  		v0.AddArg(x)
  6506  		v.AddArg(v0)
  6507  		return true
  6508  	}
  6509  	// match: (CMPU x y)
  6510  	// cond: ssa.CanonLessThan(x,y)
  6511  	// result: (InvertFlags (CMPU y x))
  6512  	for {
  6513  		x := v_0
  6514  		y := v_1
  6515  		if !(ssa.CanonLessThan(x, y)) {
  6516  			break
  6517  		}
  6518  		v.Reset(ssaop.OpS390XInvertFlags)
  6519  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPU, types.TypeFlags)
  6520  		v0.AddArg2(y, x)
  6521  		v.AddArg(v0)
  6522  		return true
  6523  	}
  6524  	return false
  6525  }
  6526  func rewriteValue_OpS390XCMPUconst(v *ssa.Value) bool {
  6527  	v_0 := v.Args[0]
  6528  	// match: (CMPUconst (MOVDconst [x]) [y])
  6529  	// cond: uint64(x)==uint64(y)
  6530  	// result: (FlagEQ)
  6531  	for {
  6532  		y := ssa.AuxIntToInt32(v.AuxInt)
  6533  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6534  			break
  6535  		}
  6536  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6537  		if !(uint64(x) == uint64(y)) {
  6538  			break
  6539  		}
  6540  		v.Reset(ssaop.OpS390XFlagEQ)
  6541  		return true
  6542  	}
  6543  	// match: (CMPUconst (MOVDconst [x]) [y])
  6544  	// cond: uint64(x)<uint64(y)
  6545  	// result: (FlagLT)
  6546  	for {
  6547  		y := ssa.AuxIntToInt32(v.AuxInt)
  6548  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6549  			break
  6550  		}
  6551  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6552  		if !(uint64(x) < uint64(y)) {
  6553  			break
  6554  		}
  6555  		v.Reset(ssaop.OpS390XFlagLT)
  6556  		return true
  6557  	}
  6558  	// match: (CMPUconst (MOVDconst [x]) [y])
  6559  	// cond: uint64(x)>uint64(y)
  6560  	// result: (FlagGT)
  6561  	for {
  6562  		y := ssa.AuxIntToInt32(v.AuxInt)
  6563  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6564  			break
  6565  		}
  6566  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6567  		if !(uint64(x) > uint64(y)) {
  6568  			break
  6569  		}
  6570  		v.Reset(ssaop.OpS390XFlagGT)
  6571  		return true
  6572  	}
  6573  	// match: (CMPUconst (SRDconst _ [c]) [n])
  6574  	// cond: c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)
  6575  	// result: (FlagLT)
  6576  	for {
  6577  		n := ssa.AuxIntToInt32(v.AuxInt)
  6578  		if v_0.Op != ssaop.OpS390XSRDconst {
  6579  			break
  6580  		}
  6581  		c := ssa.AuxIntToUint8(v_0.AuxInt)
  6582  		if !(c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)) {
  6583  			break
  6584  		}
  6585  		v.Reset(ssaop.OpS390XFlagLT)
  6586  		return true
  6587  	}
  6588  	// match: (CMPUconst (RISBGZ x {r}) [c])
  6589  	// cond: r.OutMask() < uint64(uint32(c))
  6590  	// result: (FlagLT)
  6591  	for {
  6592  		c := ssa.AuxIntToInt32(v.AuxInt)
  6593  		if v_0.Op != ssaop.OpS390XRISBGZ {
  6594  			break
  6595  		}
  6596  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
  6597  		if !(r.OutMask() < uint64(uint32(c))) {
  6598  			break
  6599  		}
  6600  		v.Reset(ssaop.OpS390XFlagLT)
  6601  		return true
  6602  	}
  6603  	// match: (CMPUconst (MOVWZreg x) [c])
  6604  	// result: (CMPWUconst x [c])
  6605  	for {
  6606  		c := ssa.AuxIntToInt32(v.AuxInt)
  6607  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  6608  			break
  6609  		}
  6610  		x := v_0.Args[0]
  6611  		v.Reset(ssaop.OpS390XCMPWUconst)
  6612  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6613  		v.AddArg(x)
  6614  		return true
  6615  	}
  6616  	// match: (CMPUconst x:(MOVHreg _) [c])
  6617  	// result: (CMPWUconst x [c])
  6618  	for {
  6619  		c := ssa.AuxIntToInt32(v.AuxInt)
  6620  		x := v_0
  6621  		if x.Op != ssaop.OpS390XMOVHreg {
  6622  			break
  6623  		}
  6624  		v.Reset(ssaop.OpS390XCMPWUconst)
  6625  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6626  		v.AddArg(x)
  6627  		return true
  6628  	}
  6629  	// match: (CMPUconst x:(MOVHZreg _) [c])
  6630  	// result: (CMPWUconst x [c])
  6631  	for {
  6632  		c := ssa.AuxIntToInt32(v.AuxInt)
  6633  		x := v_0
  6634  		if x.Op != ssaop.OpS390XMOVHZreg {
  6635  			break
  6636  		}
  6637  		v.Reset(ssaop.OpS390XCMPWUconst)
  6638  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6639  		v.AddArg(x)
  6640  		return true
  6641  	}
  6642  	// match: (CMPUconst x:(MOVBreg _) [c])
  6643  	// result: (CMPWUconst x [c])
  6644  	for {
  6645  		c := ssa.AuxIntToInt32(v.AuxInt)
  6646  		x := v_0
  6647  		if x.Op != ssaop.OpS390XMOVBreg {
  6648  			break
  6649  		}
  6650  		v.Reset(ssaop.OpS390XCMPWUconst)
  6651  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6652  		v.AddArg(x)
  6653  		return true
  6654  	}
  6655  	// match: (CMPUconst x:(MOVBZreg _) [c])
  6656  	// result: (CMPWUconst x [c])
  6657  	for {
  6658  		c := ssa.AuxIntToInt32(v.AuxInt)
  6659  		x := v_0
  6660  		if x.Op != ssaop.OpS390XMOVBZreg {
  6661  			break
  6662  		}
  6663  		v.Reset(ssaop.OpS390XCMPWUconst)
  6664  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6665  		v.AddArg(x)
  6666  		return true
  6667  	}
  6668  	// match: (CMPUconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  6669  	// cond: int32(m) >= 0
  6670  	// result: (CMPWUconst x [c])
  6671  	for {
  6672  		c := ssa.AuxIntToInt32(v.AuxInt)
  6673  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  6674  			break
  6675  		}
  6676  		x := v_0.Args[0]
  6677  		if x.Op != ssaop.OpS390XANDWconst {
  6678  			break
  6679  		}
  6680  		m := ssa.AuxIntToInt32(x.AuxInt)
  6681  		if !(int32(m) >= 0) {
  6682  			break
  6683  		}
  6684  		v.Reset(ssaop.OpS390XCMPWUconst)
  6685  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6686  		v.AddArg(x)
  6687  		return true
  6688  	}
  6689  	// match: (CMPUconst (MOVWreg x:(ANDWconst [m] _)) [c])
  6690  	// cond: int32(m) >= 0
  6691  	// result: (CMPWUconst x [c])
  6692  	for {
  6693  		c := ssa.AuxIntToInt32(v.AuxInt)
  6694  		if v_0.Op != ssaop.OpS390XMOVWreg {
  6695  			break
  6696  		}
  6697  		x := v_0.Args[0]
  6698  		if x.Op != ssaop.OpS390XANDWconst {
  6699  			break
  6700  		}
  6701  		m := ssa.AuxIntToInt32(x.AuxInt)
  6702  		if !(int32(m) >= 0) {
  6703  			break
  6704  		}
  6705  		v.Reset(ssaop.OpS390XCMPWUconst)
  6706  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6707  		v.AddArg(x)
  6708  		return true
  6709  	}
  6710  	return false
  6711  }
  6712  func rewriteValue_OpS390XCMPW(v *ssa.Value) bool {
  6713  	v_1 := v.Args[1]
  6714  	v_0 := v.Args[0]
  6715  	b := v.Block
  6716  	// match: (CMPW x (MOVDconst [c]))
  6717  	// result: (CMPWconst x [int32(c)])
  6718  	for {
  6719  		x := v_0
  6720  		if v_1.Op != ssaop.OpS390XMOVDconst {
  6721  			break
  6722  		}
  6723  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6724  		v.Reset(ssaop.OpS390XCMPWconst)
  6725  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6726  		v.AddArg(x)
  6727  		return true
  6728  	}
  6729  	// match: (CMPW (MOVDconst [c]) x)
  6730  	// result: (InvertFlags (CMPWconst x [int32(c)]))
  6731  	for {
  6732  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6733  			break
  6734  		}
  6735  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6736  		x := v_1
  6737  		v.Reset(ssaop.OpS390XInvertFlags)
  6738  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWconst, types.TypeFlags)
  6739  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6740  		v0.AddArg(x)
  6741  		v.AddArg(v0)
  6742  		return true
  6743  	}
  6744  	// match: (CMPW x y)
  6745  	// cond: ssa.CanonLessThan(x,y)
  6746  	// result: (InvertFlags (CMPW y x))
  6747  	for {
  6748  		x := v_0
  6749  		y := v_1
  6750  		if !(ssa.CanonLessThan(x, y)) {
  6751  			break
  6752  		}
  6753  		v.Reset(ssaop.OpS390XInvertFlags)
  6754  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPW, types.TypeFlags)
  6755  		v0.AddArg2(y, x)
  6756  		v.AddArg(v0)
  6757  		return true
  6758  	}
  6759  	// match: (CMPW x (MOVWreg y))
  6760  	// result: (CMPW x y)
  6761  	for {
  6762  		x := v_0
  6763  		if v_1.Op != ssaop.OpS390XMOVWreg {
  6764  			break
  6765  		}
  6766  		y := v_1.Args[0]
  6767  		v.Reset(ssaop.OpS390XCMPW)
  6768  		v.AddArg2(x, y)
  6769  		return true
  6770  	}
  6771  	// match: (CMPW x (MOVWZreg y))
  6772  	// result: (CMPW x y)
  6773  	for {
  6774  		x := v_0
  6775  		if v_1.Op != ssaop.OpS390XMOVWZreg {
  6776  			break
  6777  		}
  6778  		y := v_1.Args[0]
  6779  		v.Reset(ssaop.OpS390XCMPW)
  6780  		v.AddArg2(x, y)
  6781  		return true
  6782  	}
  6783  	// match: (CMPW (MOVWreg x) y)
  6784  	// result: (CMPW x y)
  6785  	for {
  6786  		if v_0.Op != ssaop.OpS390XMOVWreg {
  6787  			break
  6788  		}
  6789  		x := v_0.Args[0]
  6790  		y := v_1
  6791  		v.Reset(ssaop.OpS390XCMPW)
  6792  		v.AddArg2(x, y)
  6793  		return true
  6794  	}
  6795  	// match: (CMPW (MOVWZreg x) y)
  6796  	// result: (CMPW x y)
  6797  	for {
  6798  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  6799  			break
  6800  		}
  6801  		x := v_0.Args[0]
  6802  		y := v_1
  6803  		v.Reset(ssaop.OpS390XCMPW)
  6804  		v.AddArg2(x, y)
  6805  		return true
  6806  	}
  6807  	return false
  6808  }
  6809  func rewriteValue_OpS390XCMPWU(v *ssa.Value) bool {
  6810  	v_1 := v.Args[1]
  6811  	v_0 := v.Args[0]
  6812  	b := v.Block
  6813  	// match: (CMPWU x (MOVDconst [c]))
  6814  	// result: (CMPWUconst x [int32(c)])
  6815  	for {
  6816  		x := v_0
  6817  		if v_1.Op != ssaop.OpS390XMOVDconst {
  6818  			break
  6819  		}
  6820  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  6821  		v.Reset(ssaop.OpS390XCMPWUconst)
  6822  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6823  		v.AddArg(x)
  6824  		return true
  6825  	}
  6826  	// match: (CMPWU (MOVDconst [c]) x)
  6827  	// result: (InvertFlags (CMPWUconst x [int32(c)]))
  6828  	for {
  6829  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6830  			break
  6831  		}
  6832  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  6833  		x := v_1
  6834  		v.Reset(ssaop.OpS390XInvertFlags)
  6835  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
  6836  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
  6837  		v0.AddArg(x)
  6838  		v.AddArg(v0)
  6839  		return true
  6840  	}
  6841  	// match: (CMPWU x y)
  6842  	// cond: ssa.CanonLessThan(x,y)
  6843  	// result: (InvertFlags (CMPWU y x))
  6844  	for {
  6845  		x := v_0
  6846  		y := v_1
  6847  		if !(ssa.CanonLessThan(x, y)) {
  6848  			break
  6849  		}
  6850  		v.Reset(ssaop.OpS390XInvertFlags)
  6851  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XCMPWU, types.TypeFlags)
  6852  		v0.AddArg2(y, x)
  6853  		v.AddArg(v0)
  6854  		return true
  6855  	}
  6856  	// match: (CMPWU x (MOVWreg y))
  6857  	// result: (CMPWU x y)
  6858  	for {
  6859  		x := v_0
  6860  		if v_1.Op != ssaop.OpS390XMOVWreg {
  6861  			break
  6862  		}
  6863  		y := v_1.Args[0]
  6864  		v.Reset(ssaop.OpS390XCMPWU)
  6865  		v.AddArg2(x, y)
  6866  		return true
  6867  	}
  6868  	// match: (CMPWU x (MOVWZreg y))
  6869  	// result: (CMPWU x y)
  6870  	for {
  6871  		x := v_0
  6872  		if v_1.Op != ssaop.OpS390XMOVWZreg {
  6873  			break
  6874  		}
  6875  		y := v_1.Args[0]
  6876  		v.Reset(ssaop.OpS390XCMPWU)
  6877  		v.AddArg2(x, y)
  6878  		return true
  6879  	}
  6880  	// match: (CMPWU (MOVWreg x) y)
  6881  	// result: (CMPWU x y)
  6882  	for {
  6883  		if v_0.Op != ssaop.OpS390XMOVWreg {
  6884  			break
  6885  		}
  6886  		x := v_0.Args[0]
  6887  		y := v_1
  6888  		v.Reset(ssaop.OpS390XCMPWU)
  6889  		v.AddArg2(x, y)
  6890  		return true
  6891  	}
  6892  	// match: (CMPWU (MOVWZreg x) y)
  6893  	// result: (CMPWU x y)
  6894  	for {
  6895  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  6896  			break
  6897  		}
  6898  		x := v_0.Args[0]
  6899  		y := v_1
  6900  		v.Reset(ssaop.OpS390XCMPWU)
  6901  		v.AddArg2(x, y)
  6902  		return true
  6903  	}
  6904  	return false
  6905  }
  6906  func rewriteValue_OpS390XCMPWUconst(v *ssa.Value) bool {
  6907  	v_0 := v.Args[0]
  6908  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6909  	// cond: uint32(x)==uint32(y)
  6910  	// result: (FlagEQ)
  6911  	for {
  6912  		y := ssa.AuxIntToInt32(v.AuxInt)
  6913  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6914  			break
  6915  		}
  6916  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6917  		if !(uint32(x) == uint32(y)) {
  6918  			break
  6919  		}
  6920  		v.Reset(ssaop.OpS390XFlagEQ)
  6921  		return true
  6922  	}
  6923  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6924  	// cond: uint32(x)<uint32(y)
  6925  	// result: (FlagLT)
  6926  	for {
  6927  		y := ssa.AuxIntToInt32(v.AuxInt)
  6928  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6929  			break
  6930  		}
  6931  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6932  		if !(uint32(x) < uint32(y)) {
  6933  			break
  6934  		}
  6935  		v.Reset(ssaop.OpS390XFlagLT)
  6936  		return true
  6937  	}
  6938  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6939  	// cond: uint32(x)>uint32(y)
  6940  	// result: (FlagGT)
  6941  	for {
  6942  		y := ssa.AuxIntToInt32(v.AuxInt)
  6943  		if v_0.Op != ssaop.OpS390XMOVDconst {
  6944  			break
  6945  		}
  6946  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6947  		if !(uint32(x) > uint32(y)) {
  6948  			break
  6949  		}
  6950  		v.Reset(ssaop.OpS390XFlagGT)
  6951  		return true
  6952  	}
  6953  	// match: (CMPWUconst (MOVBZreg _) [c])
  6954  	// cond: 0xff < c
  6955  	// result: (FlagLT)
  6956  	for {
  6957  		c := ssa.AuxIntToInt32(v.AuxInt)
  6958  		if v_0.Op != ssaop.OpS390XMOVBZreg || !(0xff < c) {
  6959  			break
  6960  		}
  6961  		v.Reset(ssaop.OpS390XFlagLT)
  6962  		return true
  6963  	}
  6964  	// match: (CMPWUconst (MOVHZreg _) [c])
  6965  	// cond: 0xffff < c
  6966  	// result: (FlagLT)
  6967  	for {
  6968  		c := ssa.AuxIntToInt32(v.AuxInt)
  6969  		if v_0.Op != ssaop.OpS390XMOVHZreg || !(0xffff < c) {
  6970  			break
  6971  		}
  6972  		v.Reset(ssaop.OpS390XFlagLT)
  6973  		return true
  6974  	}
  6975  	// match: (CMPWUconst (SRWconst _ [c]) [n])
  6976  	// cond: c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)
  6977  	// result: (FlagLT)
  6978  	for {
  6979  		n := ssa.AuxIntToInt32(v.AuxInt)
  6980  		if v_0.Op != ssaop.OpS390XSRWconst {
  6981  			break
  6982  		}
  6983  		c := ssa.AuxIntToUint8(v_0.AuxInt)
  6984  		if !(c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)) {
  6985  			break
  6986  		}
  6987  		v.Reset(ssaop.OpS390XFlagLT)
  6988  		return true
  6989  	}
  6990  	// match: (CMPWUconst (ANDWconst _ [m]) [n])
  6991  	// cond: uint32(m) < uint32(n)
  6992  	// result: (FlagLT)
  6993  	for {
  6994  		n := ssa.AuxIntToInt32(v.AuxInt)
  6995  		if v_0.Op != ssaop.OpS390XANDWconst {
  6996  			break
  6997  		}
  6998  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  6999  		if !(uint32(m) < uint32(n)) {
  7000  			break
  7001  		}
  7002  		v.Reset(ssaop.OpS390XFlagLT)
  7003  		return true
  7004  	}
  7005  	// match: (CMPWUconst (MOVWreg x) [c])
  7006  	// result: (CMPWUconst x [c])
  7007  	for {
  7008  		c := ssa.AuxIntToInt32(v.AuxInt)
  7009  		if v_0.Op != ssaop.OpS390XMOVWreg {
  7010  			break
  7011  		}
  7012  		x := v_0.Args[0]
  7013  		v.Reset(ssaop.OpS390XCMPWUconst)
  7014  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7015  		v.AddArg(x)
  7016  		return true
  7017  	}
  7018  	// match: (CMPWUconst (MOVWZreg x) [c])
  7019  	// result: (CMPWUconst x [c])
  7020  	for {
  7021  		c := ssa.AuxIntToInt32(v.AuxInt)
  7022  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  7023  			break
  7024  		}
  7025  		x := v_0.Args[0]
  7026  		v.Reset(ssaop.OpS390XCMPWUconst)
  7027  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7028  		v.AddArg(x)
  7029  		return true
  7030  	}
  7031  	return false
  7032  }
  7033  func rewriteValue_OpS390XCMPWconst(v *ssa.Value) bool {
  7034  	v_0 := v.Args[0]
  7035  	// match: (CMPWconst (MOVDconst [x]) [y])
  7036  	// cond: int32(x)==int32(y)
  7037  	// result: (FlagEQ)
  7038  	for {
  7039  		y := ssa.AuxIntToInt32(v.AuxInt)
  7040  		if v_0.Op != ssaop.OpS390XMOVDconst {
  7041  			break
  7042  		}
  7043  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7044  		if !(int32(x) == int32(y)) {
  7045  			break
  7046  		}
  7047  		v.Reset(ssaop.OpS390XFlagEQ)
  7048  		return true
  7049  	}
  7050  	// match: (CMPWconst (MOVDconst [x]) [y])
  7051  	// cond: int32(x)<int32(y)
  7052  	// result: (FlagLT)
  7053  	for {
  7054  		y := ssa.AuxIntToInt32(v.AuxInt)
  7055  		if v_0.Op != ssaop.OpS390XMOVDconst {
  7056  			break
  7057  		}
  7058  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7059  		if !(int32(x) < int32(y)) {
  7060  			break
  7061  		}
  7062  		v.Reset(ssaop.OpS390XFlagLT)
  7063  		return true
  7064  	}
  7065  	// match: (CMPWconst (MOVDconst [x]) [y])
  7066  	// cond: int32(x)>int32(y)
  7067  	// result: (FlagGT)
  7068  	for {
  7069  		y := ssa.AuxIntToInt32(v.AuxInt)
  7070  		if v_0.Op != ssaop.OpS390XMOVDconst {
  7071  			break
  7072  		}
  7073  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7074  		if !(int32(x) > int32(y)) {
  7075  			break
  7076  		}
  7077  		v.Reset(ssaop.OpS390XFlagGT)
  7078  		return true
  7079  	}
  7080  	// match: (CMPWconst (MOVBZreg _) [c])
  7081  	// cond: 0xff < c
  7082  	// result: (FlagLT)
  7083  	for {
  7084  		c := ssa.AuxIntToInt32(v.AuxInt)
  7085  		if v_0.Op != ssaop.OpS390XMOVBZreg || !(0xff < c) {
  7086  			break
  7087  		}
  7088  		v.Reset(ssaop.OpS390XFlagLT)
  7089  		return true
  7090  	}
  7091  	// match: (CMPWconst (MOVHZreg _) [c])
  7092  	// cond: 0xffff < c
  7093  	// result: (FlagLT)
  7094  	for {
  7095  		c := ssa.AuxIntToInt32(v.AuxInt)
  7096  		if v_0.Op != ssaop.OpS390XMOVHZreg || !(0xffff < c) {
  7097  			break
  7098  		}
  7099  		v.Reset(ssaop.OpS390XFlagLT)
  7100  		return true
  7101  	}
  7102  	// match: (CMPWconst (SRWconst _ [c]) [n])
  7103  	// cond: c > 0 && n < 0
  7104  	// result: (FlagGT)
  7105  	for {
  7106  		n := ssa.AuxIntToInt32(v.AuxInt)
  7107  		if v_0.Op != ssaop.OpS390XSRWconst {
  7108  			break
  7109  		}
  7110  		c := ssa.AuxIntToUint8(v_0.AuxInt)
  7111  		if !(c > 0 && n < 0) {
  7112  			break
  7113  		}
  7114  		v.Reset(ssaop.OpS390XFlagGT)
  7115  		return true
  7116  	}
  7117  	// match: (CMPWconst (ANDWconst _ [m]) [n])
  7118  	// cond: int32(m) >= 0 && int32(m) < int32(n)
  7119  	// result: (FlagLT)
  7120  	for {
  7121  		n := ssa.AuxIntToInt32(v.AuxInt)
  7122  		if v_0.Op != ssaop.OpS390XANDWconst {
  7123  			break
  7124  		}
  7125  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  7126  		if !(int32(m) >= 0 && int32(m) < int32(n)) {
  7127  			break
  7128  		}
  7129  		v.Reset(ssaop.OpS390XFlagLT)
  7130  		return true
  7131  	}
  7132  	// match: (CMPWconst x:(SRWconst _ [c]) [n])
  7133  	// cond: c > 0 && n >= 0
  7134  	// result: (CMPWUconst x [n])
  7135  	for {
  7136  		n := ssa.AuxIntToInt32(v.AuxInt)
  7137  		x := v_0
  7138  		if x.Op != ssaop.OpS390XSRWconst {
  7139  			break
  7140  		}
  7141  		c := ssa.AuxIntToUint8(x.AuxInt)
  7142  		if !(c > 0 && n >= 0) {
  7143  			break
  7144  		}
  7145  		v.Reset(ssaop.OpS390XCMPWUconst)
  7146  		v.AuxInt = ssa.Int32ToAuxInt(n)
  7147  		v.AddArg(x)
  7148  		return true
  7149  	}
  7150  	// match: (CMPWconst (MOVWreg x) [c])
  7151  	// result: (CMPWconst x [c])
  7152  	for {
  7153  		c := ssa.AuxIntToInt32(v.AuxInt)
  7154  		if v_0.Op != ssaop.OpS390XMOVWreg {
  7155  			break
  7156  		}
  7157  		x := v_0.Args[0]
  7158  		v.Reset(ssaop.OpS390XCMPWconst)
  7159  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7160  		v.AddArg(x)
  7161  		return true
  7162  	}
  7163  	// match: (CMPWconst (MOVWZreg x) [c])
  7164  	// result: (CMPWconst x [c])
  7165  	for {
  7166  		c := ssa.AuxIntToInt32(v.AuxInt)
  7167  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  7168  			break
  7169  		}
  7170  		x := v_0.Args[0]
  7171  		v.Reset(ssaop.OpS390XCMPWconst)
  7172  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7173  		v.AddArg(x)
  7174  		return true
  7175  	}
  7176  	return false
  7177  }
  7178  func rewriteValue_OpS390XCMPconst(v *ssa.Value) bool {
  7179  	v_0 := v.Args[0]
  7180  	// match: (CMPconst (MOVDconst [x]) [y])
  7181  	// cond: x==int64(y)
  7182  	// result: (FlagEQ)
  7183  	for {
  7184  		y := ssa.AuxIntToInt32(v.AuxInt)
  7185  		if v_0.Op != ssaop.OpS390XMOVDconst {
  7186  			break
  7187  		}
  7188  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7189  		if !(x == int64(y)) {
  7190  			break
  7191  		}
  7192  		v.Reset(ssaop.OpS390XFlagEQ)
  7193  		return true
  7194  	}
  7195  	// match: (CMPconst (MOVDconst [x]) [y])
  7196  	// cond: x<int64(y)
  7197  	// result: (FlagLT)
  7198  	for {
  7199  		y := ssa.AuxIntToInt32(v.AuxInt)
  7200  		if v_0.Op != ssaop.OpS390XMOVDconst {
  7201  			break
  7202  		}
  7203  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7204  		if !(x < int64(y)) {
  7205  			break
  7206  		}
  7207  		v.Reset(ssaop.OpS390XFlagLT)
  7208  		return true
  7209  	}
  7210  	// match: (CMPconst (MOVDconst [x]) [y])
  7211  	// cond: x>int64(y)
  7212  	// result: (FlagGT)
  7213  	for {
  7214  		y := ssa.AuxIntToInt32(v.AuxInt)
  7215  		if v_0.Op != ssaop.OpS390XMOVDconst {
  7216  			break
  7217  		}
  7218  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7219  		if !(x > int64(y)) {
  7220  			break
  7221  		}
  7222  		v.Reset(ssaop.OpS390XFlagGT)
  7223  		return true
  7224  	}
  7225  	// match: (CMPconst (SRDconst _ [c]) [n])
  7226  	// cond: c > 0 && n < 0
  7227  	// result: (FlagGT)
  7228  	for {
  7229  		n := ssa.AuxIntToInt32(v.AuxInt)
  7230  		if v_0.Op != ssaop.OpS390XSRDconst {
  7231  			break
  7232  		}
  7233  		c := ssa.AuxIntToUint8(v_0.AuxInt)
  7234  		if !(c > 0 && n < 0) {
  7235  			break
  7236  		}
  7237  		v.Reset(ssaop.OpS390XFlagGT)
  7238  		return true
  7239  	}
  7240  	// match: (CMPconst (RISBGZ x {r}) [c])
  7241  	// cond: c > 0 && r.OutMask() < uint64(c)
  7242  	// result: (FlagLT)
  7243  	for {
  7244  		c := ssa.AuxIntToInt32(v.AuxInt)
  7245  		if v_0.Op != ssaop.OpS390XRISBGZ {
  7246  			break
  7247  		}
  7248  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
  7249  		if !(c > 0 && r.OutMask() < uint64(c)) {
  7250  			break
  7251  		}
  7252  		v.Reset(ssaop.OpS390XFlagLT)
  7253  		return true
  7254  	}
  7255  	// match: (CMPconst (MOVWreg x) [c])
  7256  	// result: (CMPWconst x [c])
  7257  	for {
  7258  		c := ssa.AuxIntToInt32(v.AuxInt)
  7259  		if v_0.Op != ssaop.OpS390XMOVWreg {
  7260  			break
  7261  		}
  7262  		x := v_0.Args[0]
  7263  		v.Reset(ssaop.OpS390XCMPWconst)
  7264  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7265  		v.AddArg(x)
  7266  		return true
  7267  	}
  7268  	// match: (CMPconst x:(MOVHreg _) [c])
  7269  	// result: (CMPWconst x [c])
  7270  	for {
  7271  		c := ssa.AuxIntToInt32(v.AuxInt)
  7272  		x := v_0
  7273  		if x.Op != ssaop.OpS390XMOVHreg {
  7274  			break
  7275  		}
  7276  		v.Reset(ssaop.OpS390XCMPWconst)
  7277  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7278  		v.AddArg(x)
  7279  		return true
  7280  	}
  7281  	// match: (CMPconst x:(MOVHZreg _) [c])
  7282  	// result: (CMPWconst x [c])
  7283  	for {
  7284  		c := ssa.AuxIntToInt32(v.AuxInt)
  7285  		x := v_0
  7286  		if x.Op != ssaop.OpS390XMOVHZreg {
  7287  			break
  7288  		}
  7289  		v.Reset(ssaop.OpS390XCMPWconst)
  7290  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7291  		v.AddArg(x)
  7292  		return true
  7293  	}
  7294  	// match: (CMPconst x:(MOVBreg _) [c])
  7295  	// result: (CMPWconst x [c])
  7296  	for {
  7297  		c := ssa.AuxIntToInt32(v.AuxInt)
  7298  		x := v_0
  7299  		if x.Op != ssaop.OpS390XMOVBreg {
  7300  			break
  7301  		}
  7302  		v.Reset(ssaop.OpS390XCMPWconst)
  7303  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7304  		v.AddArg(x)
  7305  		return true
  7306  	}
  7307  	// match: (CMPconst x:(MOVBZreg _) [c])
  7308  	// result: (CMPWconst x [c])
  7309  	for {
  7310  		c := ssa.AuxIntToInt32(v.AuxInt)
  7311  		x := v_0
  7312  		if x.Op != ssaop.OpS390XMOVBZreg {
  7313  			break
  7314  		}
  7315  		v.Reset(ssaop.OpS390XCMPWconst)
  7316  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7317  		v.AddArg(x)
  7318  		return true
  7319  	}
  7320  	// match: (CMPconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  7321  	// cond: int32(m) >= 0 && c >= 0
  7322  	// result: (CMPWUconst x [c])
  7323  	for {
  7324  		c := ssa.AuxIntToInt32(v.AuxInt)
  7325  		if v_0.Op != ssaop.OpS390XMOVWZreg {
  7326  			break
  7327  		}
  7328  		x := v_0.Args[0]
  7329  		if x.Op != ssaop.OpS390XANDWconst {
  7330  			break
  7331  		}
  7332  		m := ssa.AuxIntToInt32(x.AuxInt)
  7333  		if !(int32(m) >= 0 && c >= 0) {
  7334  			break
  7335  		}
  7336  		v.Reset(ssaop.OpS390XCMPWUconst)
  7337  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7338  		v.AddArg(x)
  7339  		return true
  7340  	}
  7341  	// match: (CMPconst (MOVWreg x:(ANDWconst [m] _)) [c])
  7342  	// cond: int32(m) >= 0 && c >= 0
  7343  	// result: (CMPWUconst x [c])
  7344  	for {
  7345  		c := ssa.AuxIntToInt32(v.AuxInt)
  7346  		if v_0.Op != ssaop.OpS390XMOVWreg {
  7347  			break
  7348  		}
  7349  		x := v_0.Args[0]
  7350  		if x.Op != ssaop.OpS390XANDWconst {
  7351  			break
  7352  		}
  7353  		m := ssa.AuxIntToInt32(x.AuxInt)
  7354  		if !(int32(m) >= 0 && c >= 0) {
  7355  			break
  7356  		}
  7357  		v.Reset(ssaop.OpS390XCMPWUconst)
  7358  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7359  		v.AddArg(x)
  7360  		return true
  7361  	}
  7362  	// match: (CMPconst x:(SRDconst _ [c]) [n])
  7363  	// cond: c > 0 && n >= 0
  7364  	// result: (CMPUconst x [n])
  7365  	for {
  7366  		n := ssa.AuxIntToInt32(v.AuxInt)
  7367  		x := v_0
  7368  		if x.Op != ssaop.OpS390XSRDconst {
  7369  			break
  7370  		}
  7371  		c := ssa.AuxIntToUint8(x.AuxInt)
  7372  		if !(c > 0 && n >= 0) {
  7373  			break
  7374  		}
  7375  		v.Reset(ssaop.OpS390XCMPUconst)
  7376  		v.AuxInt = ssa.Int32ToAuxInt(n)
  7377  		v.AddArg(x)
  7378  		return true
  7379  	}
  7380  	return false
  7381  }
  7382  func rewriteValue_OpS390XCPSDR(v *ssa.Value) bool {
  7383  	v_1 := v.Args[1]
  7384  	v_0 := v.Args[0]
  7385  	// match: (CPSDR y (FMOVDconst [c]))
  7386  	// cond: !math.Signbit(c)
  7387  	// result: (LPDFR y)
  7388  	for {
  7389  		y := v_0
  7390  		if v_1.Op != ssaop.OpS390XFMOVDconst {
  7391  			break
  7392  		}
  7393  		c := ssa.AuxIntToFloat64(v_1.AuxInt)
  7394  		if !(!math.Signbit(c)) {
  7395  			break
  7396  		}
  7397  		v.Reset(ssaop.OpS390XLPDFR)
  7398  		v.AddArg(y)
  7399  		return true
  7400  	}
  7401  	// match: (CPSDR y (FMOVDconst [c]))
  7402  	// cond: math.Signbit(c)
  7403  	// result: (LNDFR y)
  7404  	for {
  7405  		y := v_0
  7406  		if v_1.Op != ssaop.OpS390XFMOVDconst {
  7407  			break
  7408  		}
  7409  		c := ssa.AuxIntToFloat64(v_1.AuxInt)
  7410  		if !(math.Signbit(c)) {
  7411  			break
  7412  		}
  7413  		v.Reset(ssaop.OpS390XLNDFR)
  7414  		v.AddArg(y)
  7415  		return true
  7416  	}
  7417  	return false
  7418  }
  7419  func rewriteValue_OpS390XFCMP(v *ssa.Value) bool {
  7420  	v_1 := v.Args[1]
  7421  	v_0 := v.Args[0]
  7422  	b := v.Block
  7423  	// match: (FCMP x (FMOVDconst [0.0]))
  7424  	// result: (LTDBR x)
  7425  	for {
  7426  		x := v_0
  7427  		if v_1.Op != ssaop.OpS390XFMOVDconst || ssa.AuxIntToFloat64(v_1.AuxInt) != 0.0 {
  7428  			break
  7429  		}
  7430  		v.Reset(ssaop.OpS390XLTDBR)
  7431  		v.AddArg(x)
  7432  		return true
  7433  	}
  7434  	// match: (FCMP (FMOVDconst [0.0]) x)
  7435  	// result: (InvertFlags (LTDBR <v.Type> x))
  7436  	for {
  7437  		if v_0.Op != ssaop.OpS390XFMOVDconst || ssa.AuxIntToFloat64(v_0.AuxInt) != 0.0 {
  7438  			break
  7439  		}
  7440  		x := v_1
  7441  		v.Reset(ssaop.OpS390XInvertFlags)
  7442  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLTDBR, v.Type)
  7443  		v0.AddArg(x)
  7444  		v.AddArg(v0)
  7445  		return true
  7446  	}
  7447  	return false
  7448  }
  7449  func rewriteValue_OpS390XFCMPS(v *ssa.Value) bool {
  7450  	v_1 := v.Args[1]
  7451  	v_0 := v.Args[0]
  7452  	b := v.Block
  7453  	// match: (FCMPS x (FMOVSconst [0.0]))
  7454  	// result: (LTEBR x)
  7455  	for {
  7456  		x := v_0
  7457  		if v_1.Op != ssaop.OpS390XFMOVSconst || ssa.AuxIntToFloat32(v_1.AuxInt) != 0.0 {
  7458  			break
  7459  		}
  7460  		v.Reset(ssaop.OpS390XLTEBR)
  7461  		v.AddArg(x)
  7462  		return true
  7463  	}
  7464  	// match: (FCMPS (FMOVSconst [0.0]) x)
  7465  	// result: (InvertFlags (LTEBR <v.Type> x))
  7466  	for {
  7467  		if v_0.Op != ssaop.OpS390XFMOVSconst || ssa.AuxIntToFloat32(v_0.AuxInt) != 0.0 {
  7468  			break
  7469  		}
  7470  		x := v_1
  7471  		v.Reset(ssaop.OpS390XInvertFlags)
  7472  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLTEBR, v.Type)
  7473  		v0.AddArg(x)
  7474  		v.AddArg(v0)
  7475  		return true
  7476  	}
  7477  	return false
  7478  }
  7479  func rewriteValue_OpS390XFMOVDload(v *ssa.Value) bool {
  7480  	v_1 := v.Args[1]
  7481  	v_0 := v.Args[0]
  7482  	// match: (FMOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  7483  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  7484  	// result: (LDGR x)
  7485  	for {
  7486  		off := ssa.AuxIntToInt32(v.AuxInt)
  7487  		sym := ssa.AuxToSym(v.Aux)
  7488  		ptr1 := v_0
  7489  		if v_1.Op != ssaop.OpS390XMOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  7490  			break
  7491  		}
  7492  		x := v_1.Args[1]
  7493  		ptr2 := v_1.Args[0]
  7494  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  7495  			break
  7496  		}
  7497  		v.Reset(ssaop.OpS390XLDGR)
  7498  		v.AddArg(x)
  7499  		return true
  7500  	}
  7501  	// match: (FMOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  7502  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  7503  	// result: x
  7504  	for {
  7505  		off := ssa.AuxIntToInt32(v.AuxInt)
  7506  		sym := ssa.AuxToSym(v.Aux)
  7507  		ptr1 := v_0
  7508  		if v_1.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  7509  			break
  7510  		}
  7511  		x := v_1.Args[1]
  7512  		ptr2 := v_1.Args[0]
  7513  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  7514  			break
  7515  		}
  7516  		v.CopyOf(x)
  7517  		return true
  7518  	}
  7519  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  7520  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  7521  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  7522  	for {
  7523  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7524  		sym := ssa.AuxToSym(v.Aux)
  7525  		if v_0.Op != ssaop.OpS390XADDconst {
  7526  			break
  7527  		}
  7528  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7529  		ptr := v_0.Args[0]
  7530  		mem := v_1
  7531  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  7532  			break
  7533  		}
  7534  		v.Reset(ssaop.OpS390XFMOVDload)
  7535  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7536  		v.Aux = ssa.SymToAux(sym)
  7537  		v.AddArg2(ptr, mem)
  7538  		return true
  7539  	}
  7540  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7541  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  7542  	// result: (FMOVDload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  7543  	for {
  7544  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7545  		sym1 := ssa.AuxToSym(v.Aux)
  7546  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  7547  			break
  7548  		}
  7549  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7550  		sym2 := ssa.AuxToSym(v_0.Aux)
  7551  		base := v_0.Args[0]
  7552  		mem := v_1
  7553  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  7554  			break
  7555  		}
  7556  		v.Reset(ssaop.OpS390XFMOVDload)
  7557  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7558  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7559  		v.AddArg2(base, mem)
  7560  		return true
  7561  	}
  7562  	return false
  7563  }
  7564  func rewriteValue_OpS390XFMOVDstore(v *ssa.Value) bool {
  7565  	v_2 := v.Args[2]
  7566  	v_1 := v.Args[1]
  7567  	v_0 := v.Args[0]
  7568  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7569  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  7570  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  7571  	for {
  7572  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7573  		sym := ssa.AuxToSym(v.Aux)
  7574  		if v_0.Op != ssaop.OpS390XADDconst {
  7575  			break
  7576  		}
  7577  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7578  		ptr := v_0.Args[0]
  7579  		val := v_1
  7580  		mem := v_2
  7581  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  7582  			break
  7583  		}
  7584  		v.Reset(ssaop.OpS390XFMOVDstore)
  7585  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7586  		v.Aux = ssa.SymToAux(sym)
  7587  		v.AddArg3(ptr, val, mem)
  7588  		return true
  7589  	}
  7590  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7591  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  7592  	// result: (FMOVDstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  7593  	for {
  7594  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7595  		sym1 := ssa.AuxToSym(v.Aux)
  7596  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  7597  			break
  7598  		}
  7599  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7600  		sym2 := ssa.AuxToSym(v_0.Aux)
  7601  		base := v_0.Args[0]
  7602  		val := v_1
  7603  		mem := v_2
  7604  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  7605  			break
  7606  		}
  7607  		v.Reset(ssaop.OpS390XFMOVDstore)
  7608  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7609  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7610  		v.AddArg3(base, val, mem)
  7611  		return true
  7612  	}
  7613  	return false
  7614  }
  7615  func rewriteValue_OpS390XFMOVSload(v *ssa.Value) bool {
  7616  	v_1 := v.Args[1]
  7617  	v_0 := v.Args[0]
  7618  	// match: (FMOVSload [off] {sym} ptr1 (FMOVSstore [off] {sym} ptr2 x _))
  7619  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  7620  	// result: x
  7621  	for {
  7622  		off := ssa.AuxIntToInt32(v.AuxInt)
  7623  		sym := ssa.AuxToSym(v.Aux)
  7624  		ptr1 := v_0
  7625  		if v_1.Op != ssaop.OpS390XFMOVSstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  7626  			break
  7627  		}
  7628  		x := v_1.Args[1]
  7629  		ptr2 := v_1.Args[0]
  7630  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  7631  			break
  7632  		}
  7633  		v.CopyOf(x)
  7634  		return true
  7635  	}
  7636  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  7637  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  7638  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  7639  	for {
  7640  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7641  		sym := ssa.AuxToSym(v.Aux)
  7642  		if v_0.Op != ssaop.OpS390XADDconst {
  7643  			break
  7644  		}
  7645  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7646  		ptr := v_0.Args[0]
  7647  		mem := v_1
  7648  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  7649  			break
  7650  		}
  7651  		v.Reset(ssaop.OpS390XFMOVSload)
  7652  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7653  		v.Aux = ssa.SymToAux(sym)
  7654  		v.AddArg2(ptr, mem)
  7655  		return true
  7656  	}
  7657  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7658  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  7659  	// result: (FMOVSload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  7660  	for {
  7661  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7662  		sym1 := ssa.AuxToSym(v.Aux)
  7663  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  7664  			break
  7665  		}
  7666  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7667  		sym2 := ssa.AuxToSym(v_0.Aux)
  7668  		base := v_0.Args[0]
  7669  		mem := v_1
  7670  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  7671  			break
  7672  		}
  7673  		v.Reset(ssaop.OpS390XFMOVSload)
  7674  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7675  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7676  		v.AddArg2(base, mem)
  7677  		return true
  7678  	}
  7679  	return false
  7680  }
  7681  func rewriteValue_OpS390XFMOVSstore(v *ssa.Value) bool {
  7682  	v_2 := v.Args[2]
  7683  	v_1 := v.Args[1]
  7684  	v_0 := v.Args[0]
  7685  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7686  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  7687  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  7688  	for {
  7689  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7690  		sym := ssa.AuxToSym(v.Aux)
  7691  		if v_0.Op != ssaop.OpS390XADDconst {
  7692  			break
  7693  		}
  7694  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7695  		ptr := v_0.Args[0]
  7696  		val := v_1
  7697  		mem := v_2
  7698  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  7699  			break
  7700  		}
  7701  		v.Reset(ssaop.OpS390XFMOVSstore)
  7702  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7703  		v.Aux = ssa.SymToAux(sym)
  7704  		v.AddArg3(ptr, val, mem)
  7705  		return true
  7706  	}
  7707  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7708  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  7709  	// result: (FMOVSstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  7710  	for {
  7711  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7712  		sym1 := ssa.AuxToSym(v.Aux)
  7713  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  7714  			break
  7715  		}
  7716  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7717  		sym2 := ssa.AuxToSym(v_0.Aux)
  7718  		base := v_0.Args[0]
  7719  		val := v_1
  7720  		mem := v_2
  7721  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  7722  			break
  7723  		}
  7724  		v.Reset(ssaop.OpS390XFMOVSstore)
  7725  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7726  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7727  		v.AddArg3(base, val, mem)
  7728  		return true
  7729  	}
  7730  	return false
  7731  }
  7732  func rewriteValue_OpS390XFNEG(v *ssa.Value) bool {
  7733  	v_0 := v.Args[0]
  7734  	// match: (FNEG (LPDFR x))
  7735  	// result: (LNDFR x)
  7736  	for {
  7737  		if v_0.Op != ssaop.OpS390XLPDFR {
  7738  			break
  7739  		}
  7740  		x := v_0.Args[0]
  7741  		v.Reset(ssaop.OpS390XLNDFR)
  7742  		v.AddArg(x)
  7743  		return true
  7744  	}
  7745  	// match: (FNEG (LNDFR x))
  7746  	// result: (LPDFR x)
  7747  	for {
  7748  		if v_0.Op != ssaop.OpS390XLNDFR {
  7749  			break
  7750  		}
  7751  		x := v_0.Args[0]
  7752  		v.Reset(ssaop.OpS390XLPDFR)
  7753  		v.AddArg(x)
  7754  		return true
  7755  	}
  7756  	return false
  7757  }
  7758  func rewriteValue_OpS390XFNEGS(v *ssa.Value) bool {
  7759  	v_0 := v.Args[0]
  7760  	// match: (FNEGS (LPDFR x))
  7761  	// result: (LNDFR x)
  7762  	for {
  7763  		if v_0.Op != ssaop.OpS390XLPDFR {
  7764  			break
  7765  		}
  7766  		x := v_0.Args[0]
  7767  		v.Reset(ssaop.OpS390XLNDFR)
  7768  		v.AddArg(x)
  7769  		return true
  7770  	}
  7771  	// match: (FNEGS (LNDFR x))
  7772  	// result: (LPDFR x)
  7773  	for {
  7774  		if v_0.Op != ssaop.OpS390XLNDFR {
  7775  			break
  7776  		}
  7777  		x := v_0.Args[0]
  7778  		v.Reset(ssaop.OpS390XLPDFR)
  7779  		v.AddArg(x)
  7780  		return true
  7781  	}
  7782  	return false
  7783  }
  7784  func rewriteValue_OpS390XLDGR(v *ssa.Value) bool {
  7785  	v_0 := v.Args[0]
  7786  	b := v.Block
  7787  	// match: (LDGR <t> (RISBGZ x {r}))
  7788  	// cond: r == s390x.NewRotateParams(1, 63, 0)
  7789  	// result: (LPDFR (LDGR <t> x))
  7790  	for {
  7791  		t := v.Type
  7792  		if v_0.Op != ssaop.OpS390XRISBGZ {
  7793  			break
  7794  		}
  7795  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
  7796  		x := v_0.Args[0]
  7797  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
  7798  			break
  7799  		}
  7800  		v.Reset(ssaop.OpS390XLPDFR)
  7801  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLDGR, t)
  7802  		v0.AddArg(x)
  7803  		v.AddArg(v0)
  7804  		return true
  7805  	}
  7806  	// match: (LDGR <t> (OR (MOVDconst [-1<<63]) x))
  7807  	// result: (LNDFR (LDGR <t> x))
  7808  	for {
  7809  		t := v.Type
  7810  		if v_0.Op != ssaop.OpS390XOR {
  7811  			break
  7812  		}
  7813  		_ = v_0.Args[1]
  7814  		v_0_0 := v_0.Args[0]
  7815  		v_0_1 := v_0.Args[1]
  7816  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7817  			if v_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != -1<<63 {
  7818  				continue
  7819  			}
  7820  			x := v_0_1
  7821  			v.Reset(ssaop.OpS390XLNDFR)
  7822  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XLDGR, t)
  7823  			v0.AddArg(x)
  7824  			v.AddArg(v0)
  7825  			return true
  7826  		}
  7827  		break
  7828  	}
  7829  	// match: (LDGR <t> x:(ORload <t1> [off] {sym} (MOVDconst [-1<<63]) ptr mem))
  7830  	// cond: x.Uses == 1 && ssa.Clobber(x)
  7831  	// result: @x.Block (LNDFR <t> (LDGR <t> (MOVDload <t1> [off] {sym} ptr mem)))
  7832  	for {
  7833  		t := v.Type
  7834  		x := v_0
  7835  		if x.Op != ssaop.OpS390XORload {
  7836  			break
  7837  		}
  7838  		t1 := x.Type
  7839  		off := ssa.AuxIntToInt32(x.AuxInt)
  7840  		sym := ssa.AuxToSym(x.Aux)
  7841  		mem := x.Args[2]
  7842  		x_0 := x.Args[0]
  7843  		if x_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(x_0.AuxInt) != -1<<63 {
  7844  			break
  7845  		}
  7846  		ptr := x.Args[1]
  7847  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  7848  			break
  7849  		}
  7850  		b = x.Block
  7851  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XLNDFR, t)
  7852  		v.CopyOf(v0)
  7853  		v1 := b.NewValue0(x.Pos, ssaop.OpS390XLDGR, t)
  7854  		v2 := b.NewValue0(x.Pos, ssaop.OpS390XMOVDload, t1)
  7855  		v2.AuxInt = ssa.Int32ToAuxInt(off)
  7856  		v2.Aux = ssa.SymToAux(sym)
  7857  		v2.AddArg2(ptr, mem)
  7858  		v1.AddArg(v2)
  7859  		v0.AddArg(v1)
  7860  		return true
  7861  	}
  7862  	// match: (LDGR (LGDR x))
  7863  	// result: x
  7864  	for {
  7865  		if v_0.Op != ssaop.OpS390XLGDR {
  7866  			break
  7867  		}
  7868  		x := v_0.Args[0]
  7869  		v.CopyOf(x)
  7870  		return true
  7871  	}
  7872  	return false
  7873  }
  7874  func rewriteValue_OpS390XLEDBR(v *ssa.Value) bool {
  7875  	v_0 := v.Args[0]
  7876  	// match: (LEDBR (LPDFR (LDEBR x)))
  7877  	// result: (LPDFR x)
  7878  	for {
  7879  		if v_0.Op != ssaop.OpS390XLPDFR {
  7880  			break
  7881  		}
  7882  		v_0_0 := v_0.Args[0]
  7883  		if v_0_0.Op != ssaop.OpS390XLDEBR {
  7884  			break
  7885  		}
  7886  		x := v_0_0.Args[0]
  7887  		v.Reset(ssaop.OpS390XLPDFR)
  7888  		v.AddArg(x)
  7889  		return true
  7890  	}
  7891  	// match: (LEDBR (LNDFR (LDEBR x)))
  7892  	// result: (LNDFR x)
  7893  	for {
  7894  		if v_0.Op != ssaop.OpS390XLNDFR {
  7895  			break
  7896  		}
  7897  		v_0_0 := v_0.Args[0]
  7898  		if v_0_0.Op != ssaop.OpS390XLDEBR {
  7899  			break
  7900  		}
  7901  		x := v_0_0.Args[0]
  7902  		v.Reset(ssaop.OpS390XLNDFR)
  7903  		v.AddArg(x)
  7904  		return true
  7905  	}
  7906  	return false
  7907  }
  7908  func rewriteValue_OpS390XLGDR(v *ssa.Value) bool {
  7909  	v_0 := v.Args[0]
  7910  	// match: (LGDR (LDGR x))
  7911  	// result: x
  7912  	for {
  7913  		if v_0.Op != ssaop.OpS390XLDGR {
  7914  			break
  7915  		}
  7916  		x := v_0.Args[0]
  7917  		v.CopyOf(x)
  7918  		return true
  7919  	}
  7920  	return false
  7921  }
  7922  func rewriteValue_OpS390XLOCGR(v *ssa.Value) bool {
  7923  	v_2 := v.Args[2]
  7924  	v_1 := v.Args[1]
  7925  	v_0 := v.Args[0]
  7926  	// match: (LOCGR {c} x y (InvertFlags cmp))
  7927  	// result: (LOCGR {c.ReverseComparison()} x y cmp)
  7928  	for {
  7929  		c := ssa.AuxToS390xCCMask(v.Aux)
  7930  		x := v_0
  7931  		y := v_1
  7932  		if v_2.Op != ssaop.OpS390XInvertFlags {
  7933  			break
  7934  		}
  7935  		cmp := v_2.Args[0]
  7936  		v.Reset(ssaop.OpS390XLOCGR)
  7937  		v.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
  7938  		v.AddArg3(x, y, cmp)
  7939  		return true
  7940  	}
  7941  	// match: (LOCGR {c} _ x (FlagEQ))
  7942  	// cond: c&s390x.Equal != 0
  7943  	// result: x
  7944  	for {
  7945  		c := ssa.AuxToS390xCCMask(v.Aux)
  7946  		x := v_1
  7947  		if v_2.Op != ssaop.OpS390XFlagEQ || !(c&s390x.Equal != 0) {
  7948  			break
  7949  		}
  7950  		v.CopyOf(x)
  7951  		return true
  7952  	}
  7953  	// match: (LOCGR {c} _ x (FlagLT))
  7954  	// cond: c&s390x.Less != 0
  7955  	// result: x
  7956  	for {
  7957  		c := ssa.AuxToS390xCCMask(v.Aux)
  7958  		x := v_1
  7959  		if v_2.Op != ssaop.OpS390XFlagLT || !(c&s390x.Less != 0) {
  7960  			break
  7961  		}
  7962  		v.CopyOf(x)
  7963  		return true
  7964  	}
  7965  	// match: (LOCGR {c} _ x (FlagGT))
  7966  	// cond: c&s390x.Greater != 0
  7967  	// result: x
  7968  	for {
  7969  		c := ssa.AuxToS390xCCMask(v.Aux)
  7970  		x := v_1
  7971  		if v_2.Op != ssaop.OpS390XFlagGT || !(c&s390x.Greater != 0) {
  7972  			break
  7973  		}
  7974  		v.CopyOf(x)
  7975  		return true
  7976  	}
  7977  	// match: (LOCGR {c} _ x (FlagOV))
  7978  	// cond: c&s390x.Unordered != 0
  7979  	// result: x
  7980  	for {
  7981  		c := ssa.AuxToS390xCCMask(v.Aux)
  7982  		x := v_1
  7983  		if v_2.Op != ssaop.OpS390XFlagOV || !(c&s390x.Unordered != 0) {
  7984  			break
  7985  		}
  7986  		v.CopyOf(x)
  7987  		return true
  7988  	}
  7989  	// match: (LOCGR {c} x _ (FlagEQ))
  7990  	// cond: c&s390x.Equal == 0
  7991  	// result: x
  7992  	for {
  7993  		c := ssa.AuxToS390xCCMask(v.Aux)
  7994  		x := v_0
  7995  		if v_2.Op != ssaop.OpS390XFlagEQ || !(c&s390x.Equal == 0) {
  7996  			break
  7997  		}
  7998  		v.CopyOf(x)
  7999  		return true
  8000  	}
  8001  	// match: (LOCGR {c} x _ (FlagLT))
  8002  	// cond: c&s390x.Less == 0
  8003  	// result: x
  8004  	for {
  8005  		c := ssa.AuxToS390xCCMask(v.Aux)
  8006  		x := v_0
  8007  		if v_2.Op != ssaop.OpS390XFlagLT || !(c&s390x.Less == 0) {
  8008  			break
  8009  		}
  8010  		v.CopyOf(x)
  8011  		return true
  8012  	}
  8013  	// match: (LOCGR {c} x _ (FlagGT))
  8014  	// cond: c&s390x.Greater == 0
  8015  	// result: x
  8016  	for {
  8017  		c := ssa.AuxToS390xCCMask(v.Aux)
  8018  		x := v_0
  8019  		if v_2.Op != ssaop.OpS390XFlagGT || !(c&s390x.Greater == 0) {
  8020  			break
  8021  		}
  8022  		v.CopyOf(x)
  8023  		return true
  8024  	}
  8025  	// match: (LOCGR {c} x _ (FlagOV))
  8026  	// cond: c&s390x.Unordered == 0
  8027  	// result: x
  8028  	for {
  8029  		c := ssa.AuxToS390xCCMask(v.Aux)
  8030  		x := v_0
  8031  		if v_2.Op != ssaop.OpS390XFlagOV || !(c&s390x.Unordered == 0) {
  8032  			break
  8033  		}
  8034  		v.CopyOf(x)
  8035  		return true
  8036  	}
  8037  	return false
  8038  }
  8039  func rewriteValue_OpS390XLTDBR(v *ssa.Value) bool {
  8040  	v_0 := v.Args[0]
  8041  	b := v.Block
  8042  	// match: (LTDBR (Select0 x:(FADD _ _)))
  8043  	// cond: b == x.Block
  8044  	// result: (Select1 x)
  8045  	for {
  8046  		if v_0.Op != ssaop.OpSelect0 {
  8047  			break
  8048  		}
  8049  		x := v_0.Args[0]
  8050  		if x.Op != ssaop.OpS390XFADD || !(b == x.Block) {
  8051  			break
  8052  		}
  8053  		v.Reset(ssaop.OpSelect1)
  8054  		v.AddArg(x)
  8055  		return true
  8056  	}
  8057  	// match: (LTDBR (Select0 x:(FSUB _ _)))
  8058  	// cond: b == x.Block
  8059  	// result: (Select1 x)
  8060  	for {
  8061  		if v_0.Op != ssaop.OpSelect0 {
  8062  			break
  8063  		}
  8064  		x := v_0.Args[0]
  8065  		if x.Op != ssaop.OpS390XFSUB || !(b == x.Block) {
  8066  			break
  8067  		}
  8068  		v.Reset(ssaop.OpSelect1)
  8069  		v.AddArg(x)
  8070  		return true
  8071  	}
  8072  	return false
  8073  }
  8074  func rewriteValue_OpS390XLTEBR(v *ssa.Value) bool {
  8075  	v_0 := v.Args[0]
  8076  	b := v.Block
  8077  	// match: (LTEBR (Select0 x:(FADDS _ _)))
  8078  	// cond: b == x.Block
  8079  	// result: (Select1 x)
  8080  	for {
  8081  		if v_0.Op != ssaop.OpSelect0 {
  8082  			break
  8083  		}
  8084  		x := v_0.Args[0]
  8085  		if x.Op != ssaop.OpS390XFADDS || !(b == x.Block) {
  8086  			break
  8087  		}
  8088  		v.Reset(ssaop.OpSelect1)
  8089  		v.AddArg(x)
  8090  		return true
  8091  	}
  8092  	// match: (LTEBR (Select0 x:(FSUBS _ _)))
  8093  	// cond: b == x.Block
  8094  	// result: (Select1 x)
  8095  	for {
  8096  		if v_0.Op != ssaop.OpSelect0 {
  8097  			break
  8098  		}
  8099  		x := v_0.Args[0]
  8100  		if x.Op != ssaop.OpS390XFSUBS || !(b == x.Block) {
  8101  			break
  8102  		}
  8103  		v.Reset(ssaop.OpSelect1)
  8104  		v.AddArg(x)
  8105  		return true
  8106  	}
  8107  	return false
  8108  }
  8109  func rewriteValue_OpS390XLoweredPanicBoundsCR(v *ssa.Value) bool {
  8110  	v_1 := v.Args[1]
  8111  	v_0 := v.Args[0]
  8112  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  8113  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  8114  	for {
  8115  		kind := ssa.AuxIntToInt64(v.AuxInt)
  8116  		p := ssa.AuxToPanicBoundsC(v.Aux)
  8117  		if v_0.Op != ssaop.OpS390XMOVDconst {
  8118  			break
  8119  		}
  8120  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8121  		mem := v_1
  8122  		v.Reset(ssaop.OpS390XLoweredPanicBoundsCC)
  8123  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  8124  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: p.C, Cy: c})
  8125  		v.AddArg(mem)
  8126  		return true
  8127  	}
  8128  	return false
  8129  }
  8130  func rewriteValue_OpS390XLoweredPanicBoundsRC(v *ssa.Value) bool {
  8131  	v_1 := v.Args[1]
  8132  	v_0 := v.Args[0]
  8133  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  8134  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  8135  	for {
  8136  		kind := ssa.AuxIntToInt64(v.AuxInt)
  8137  		p := ssa.AuxToPanicBoundsC(v.Aux)
  8138  		if v_0.Op != ssaop.OpS390XMOVDconst {
  8139  			break
  8140  		}
  8141  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8142  		mem := v_1
  8143  		v.Reset(ssaop.OpS390XLoweredPanicBoundsCC)
  8144  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  8145  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: c, Cy: p.C})
  8146  		v.AddArg(mem)
  8147  		return true
  8148  	}
  8149  	return false
  8150  }
  8151  func rewriteValue_OpS390XLoweredPanicBoundsRR(v *ssa.Value) bool {
  8152  	v_2 := v.Args[2]
  8153  	v_1 := v.Args[1]
  8154  	v_0 := v.Args[0]
  8155  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  8156  	// result: (LoweredPanicBoundsRC [kind] x {ssa.PanicBoundsC{C:c}} mem)
  8157  	for {
  8158  		kind := ssa.AuxIntToInt64(v.AuxInt)
  8159  		x := v_0
  8160  		if v_1.Op != ssaop.OpS390XMOVDconst {
  8161  			break
  8162  		}
  8163  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8164  		mem := v_2
  8165  		v.Reset(ssaop.OpS390XLoweredPanicBoundsRC)
  8166  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  8167  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  8168  		v.AddArg2(x, mem)
  8169  		return true
  8170  	}
  8171  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  8172  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:c}} y mem)
  8173  	for {
  8174  		kind := ssa.AuxIntToInt64(v.AuxInt)
  8175  		if v_0.Op != ssaop.OpS390XMOVDconst {
  8176  			break
  8177  		}
  8178  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8179  		y := v_1
  8180  		mem := v_2
  8181  		v.Reset(ssaop.OpS390XLoweredPanicBoundsCR)
  8182  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  8183  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: c})
  8184  		v.AddArg2(y, mem)
  8185  		return true
  8186  	}
  8187  	return false
  8188  }
  8189  func rewriteValue_OpS390XLoweredRound32F(v *ssa.Value) bool {
  8190  	v_0 := v.Args[0]
  8191  	// match: (LoweredRound32F x:(FMOVSconst))
  8192  	// result: x
  8193  	for {
  8194  		x := v_0
  8195  		if x.Op != ssaop.OpS390XFMOVSconst {
  8196  			break
  8197  		}
  8198  		v.CopyOf(x)
  8199  		return true
  8200  	}
  8201  	return false
  8202  }
  8203  func rewriteValue_OpS390XLoweredRound64F(v *ssa.Value) bool {
  8204  	v_0 := v.Args[0]
  8205  	// match: (LoweredRound64F x:(FMOVDconst))
  8206  	// result: x
  8207  	for {
  8208  		x := v_0
  8209  		if x.Op != ssaop.OpS390XFMOVDconst {
  8210  			break
  8211  		}
  8212  		v.CopyOf(x)
  8213  		return true
  8214  	}
  8215  	return false
  8216  }
  8217  func rewriteValue_OpS390XMOVBZload(v *ssa.Value) bool {
  8218  	v_1 := v.Args[1]
  8219  	v_0 := v.Args[0]
  8220  	// match: (MOVBZload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8221  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  8222  	// result: (MOVBZreg x)
  8223  	for {
  8224  		off := ssa.AuxIntToInt32(v.AuxInt)
  8225  		sym := ssa.AuxToSym(v.Aux)
  8226  		ptr1 := v_0
  8227  		if v_1.Op != ssaop.OpS390XMOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  8228  			break
  8229  		}
  8230  		x := v_1.Args[1]
  8231  		ptr2 := v_1.Args[0]
  8232  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  8233  			break
  8234  		}
  8235  		v.Reset(ssaop.OpS390XMOVBZreg)
  8236  		v.AddArg(x)
  8237  		return true
  8238  	}
  8239  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] ptr) mem)
  8240  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  8241  	// result: (MOVBZload [off1+off2] {sym} ptr mem)
  8242  	for {
  8243  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8244  		sym := ssa.AuxToSym(v.Aux)
  8245  		if v_0.Op != ssaop.OpS390XADDconst {
  8246  			break
  8247  		}
  8248  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  8249  		ptr := v_0.Args[0]
  8250  		mem := v_1
  8251  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  8252  			break
  8253  		}
  8254  		v.Reset(ssaop.OpS390XMOVBZload)
  8255  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8256  		v.Aux = ssa.SymToAux(sym)
  8257  		v.AddArg2(ptr, mem)
  8258  		return true
  8259  	}
  8260  	// match: (MOVBZload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8261  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  8262  	// result: (MOVBZload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  8263  	for {
  8264  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8265  		sym1 := ssa.AuxToSym(v.Aux)
  8266  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  8267  			break
  8268  		}
  8269  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  8270  		sym2 := ssa.AuxToSym(v_0.Aux)
  8271  		base := v_0.Args[0]
  8272  		mem := v_1
  8273  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  8274  			break
  8275  		}
  8276  		v.Reset(ssaop.OpS390XMOVBZload)
  8277  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8278  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8279  		v.AddArg2(base, mem)
  8280  		return true
  8281  	}
  8282  	return false
  8283  }
  8284  func rewriteValue_OpS390XMOVBZreg(v *ssa.Value) bool {
  8285  	v_0 := v.Args[0]
  8286  	b := v.Block
  8287  	typ := &b.Func.Config.Types
  8288  	// match: (MOVBZreg e:(MOVBreg x))
  8289  	// cond: ssa.ClobberIfDead(e)
  8290  	// result: (MOVBZreg x)
  8291  	for {
  8292  		e := v_0
  8293  		if e.Op != ssaop.OpS390XMOVBreg {
  8294  			break
  8295  		}
  8296  		x := e.Args[0]
  8297  		if !(ssa.ClobberIfDead(e)) {
  8298  			break
  8299  		}
  8300  		v.Reset(ssaop.OpS390XMOVBZreg)
  8301  		v.AddArg(x)
  8302  		return true
  8303  	}
  8304  	// match: (MOVBZreg e:(MOVHreg x))
  8305  	// cond: ssa.ClobberIfDead(e)
  8306  	// result: (MOVBZreg x)
  8307  	for {
  8308  		e := v_0
  8309  		if e.Op != ssaop.OpS390XMOVHreg {
  8310  			break
  8311  		}
  8312  		x := e.Args[0]
  8313  		if !(ssa.ClobberIfDead(e)) {
  8314  			break
  8315  		}
  8316  		v.Reset(ssaop.OpS390XMOVBZreg)
  8317  		v.AddArg(x)
  8318  		return true
  8319  	}
  8320  	// match: (MOVBZreg e:(MOVWreg x))
  8321  	// cond: ssa.ClobberIfDead(e)
  8322  	// result: (MOVBZreg x)
  8323  	for {
  8324  		e := v_0
  8325  		if e.Op != ssaop.OpS390XMOVWreg {
  8326  			break
  8327  		}
  8328  		x := e.Args[0]
  8329  		if !(ssa.ClobberIfDead(e)) {
  8330  			break
  8331  		}
  8332  		v.Reset(ssaop.OpS390XMOVBZreg)
  8333  		v.AddArg(x)
  8334  		return true
  8335  	}
  8336  	// match: (MOVBZreg e:(MOVBZreg x))
  8337  	// cond: ssa.ClobberIfDead(e)
  8338  	// result: (MOVBZreg x)
  8339  	for {
  8340  		e := v_0
  8341  		if e.Op != ssaop.OpS390XMOVBZreg {
  8342  			break
  8343  		}
  8344  		x := e.Args[0]
  8345  		if !(ssa.ClobberIfDead(e)) {
  8346  			break
  8347  		}
  8348  		v.Reset(ssaop.OpS390XMOVBZreg)
  8349  		v.AddArg(x)
  8350  		return true
  8351  	}
  8352  	// match: (MOVBZreg e:(MOVHZreg x))
  8353  	// cond: ssa.ClobberIfDead(e)
  8354  	// result: (MOVBZreg x)
  8355  	for {
  8356  		e := v_0
  8357  		if e.Op != ssaop.OpS390XMOVHZreg {
  8358  			break
  8359  		}
  8360  		x := e.Args[0]
  8361  		if !(ssa.ClobberIfDead(e)) {
  8362  			break
  8363  		}
  8364  		v.Reset(ssaop.OpS390XMOVBZreg)
  8365  		v.AddArg(x)
  8366  		return true
  8367  	}
  8368  	// match: (MOVBZreg e:(MOVWZreg x))
  8369  	// cond: ssa.ClobberIfDead(e)
  8370  	// result: (MOVBZreg x)
  8371  	for {
  8372  		e := v_0
  8373  		if e.Op != ssaop.OpS390XMOVWZreg {
  8374  			break
  8375  		}
  8376  		x := e.Args[0]
  8377  		if !(ssa.ClobberIfDead(e)) {
  8378  			break
  8379  		}
  8380  		v.Reset(ssaop.OpS390XMOVBZreg)
  8381  		v.AddArg(x)
  8382  		return true
  8383  	}
  8384  	// match: (MOVBZreg x:(MOVBZload _ _))
  8385  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  8386  	// result: x
  8387  	for {
  8388  		x := v_0
  8389  		if x.Op != ssaop.OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  8390  			break
  8391  		}
  8392  		v.CopyOf(x)
  8393  		return true
  8394  	}
  8395  	// match: (MOVBZreg <t> x:(MOVBload [o] {s} p mem))
  8396  	// cond: x.Uses == 1 && ssa.Clobber(x)
  8397  	// result: @x.Block (MOVBZload <t> [o] {s} p mem)
  8398  	for {
  8399  		t := v.Type
  8400  		x := v_0
  8401  		if x.Op != ssaop.OpS390XMOVBload {
  8402  			break
  8403  		}
  8404  		o := ssa.AuxIntToInt32(x.AuxInt)
  8405  		s := ssa.AuxToSym(x.Aux)
  8406  		mem := x.Args[1]
  8407  		p := x.Args[0]
  8408  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  8409  			break
  8410  		}
  8411  		b = x.Block
  8412  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVBZload, t)
  8413  		v.CopyOf(v0)
  8414  		v0.AuxInt = ssa.Int32ToAuxInt(o)
  8415  		v0.Aux = ssa.SymToAux(s)
  8416  		v0.AddArg2(p, mem)
  8417  		return true
  8418  	}
  8419  	// match: (MOVBZreg x:(Arg <t>))
  8420  	// cond: !t.IsSigned() && t.Size() == 1
  8421  	// result: x
  8422  	for {
  8423  		x := v_0
  8424  		if x.Op != ssaop.OpArg {
  8425  			break
  8426  		}
  8427  		t := x.Type
  8428  		if !(!t.IsSigned() && t.Size() == 1) {
  8429  			break
  8430  		}
  8431  		v.CopyOf(x)
  8432  		return true
  8433  	}
  8434  	// match: (MOVBZreg (MOVDconst [c]))
  8435  	// result: (MOVDconst [int64( uint8(c))])
  8436  	for {
  8437  		if v_0.Op != ssaop.OpS390XMOVDconst {
  8438  			break
  8439  		}
  8440  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8441  		v.Reset(ssaop.OpS390XMOVDconst)
  8442  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint8(c)))
  8443  		return true
  8444  	}
  8445  	// match: (MOVBZreg x:(LOCGR (MOVDconst [c]) (MOVDconst [d]) _))
  8446  	// cond: int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)
  8447  	// result: x
  8448  	for {
  8449  		x := v_0
  8450  		if x.Op != ssaop.OpS390XLOCGR {
  8451  			break
  8452  		}
  8453  		_ = x.Args[1]
  8454  		x_0 := x.Args[0]
  8455  		if x_0.Op != ssaop.OpS390XMOVDconst {
  8456  			break
  8457  		}
  8458  		c := ssa.AuxIntToInt64(x_0.AuxInt)
  8459  		x_1 := x.Args[1]
  8460  		if x_1.Op != ssaop.OpS390XMOVDconst {
  8461  			break
  8462  		}
  8463  		d := ssa.AuxIntToInt64(x_1.AuxInt)
  8464  		if !(int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)) {
  8465  			break
  8466  		}
  8467  		v.CopyOf(x)
  8468  		return true
  8469  	}
  8470  	// match: (MOVBZreg (RISBGZ x {r}))
  8471  	// cond: r.OutMerge(0x000000ff) != nil
  8472  	// result: (RISBGZ x {*r.OutMerge(0x000000ff)})
  8473  	for {
  8474  		if v_0.Op != ssaop.OpS390XRISBGZ {
  8475  			break
  8476  		}
  8477  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
  8478  		x := v_0.Args[0]
  8479  		if !(r.OutMerge(0x000000ff) != nil) {
  8480  			break
  8481  		}
  8482  		v.Reset(ssaop.OpS390XRISBGZ)
  8483  		v.Aux = ssa.S390xRotateParamsToAux(*r.OutMerge(0x000000ff))
  8484  		v.AddArg(x)
  8485  		return true
  8486  	}
  8487  	// match: (MOVBZreg (ANDWconst [m] x))
  8488  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8489  	for {
  8490  		if v_0.Op != ssaop.OpS390XANDWconst {
  8491  			break
  8492  		}
  8493  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  8494  		x := v_0.Args[0]
  8495  		v.Reset(ssaop.OpS390XMOVWZreg)
  8496  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
  8497  		v0.AuxInt = ssa.Int32ToAuxInt(int32(uint8(m)))
  8498  		v0.AddArg(x)
  8499  		v.AddArg(v0)
  8500  		return true
  8501  	}
  8502  	return false
  8503  }
  8504  func rewriteValue_OpS390XMOVBload(v *ssa.Value) bool {
  8505  	v_1 := v.Args[1]
  8506  	v_0 := v.Args[0]
  8507  	// match: (MOVBload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8508  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  8509  	// result: (MOVBreg x)
  8510  	for {
  8511  		off := ssa.AuxIntToInt32(v.AuxInt)
  8512  		sym := ssa.AuxToSym(v.Aux)
  8513  		ptr1 := v_0
  8514  		if v_1.Op != ssaop.OpS390XMOVBstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  8515  			break
  8516  		}
  8517  		x := v_1.Args[1]
  8518  		ptr2 := v_1.Args[0]
  8519  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  8520  			break
  8521  		}
  8522  		v.Reset(ssaop.OpS390XMOVBreg)
  8523  		v.AddArg(x)
  8524  		return true
  8525  	}
  8526  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8527  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  8528  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  8529  	for {
  8530  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8531  		sym := ssa.AuxToSym(v.Aux)
  8532  		if v_0.Op != ssaop.OpS390XADDconst {
  8533  			break
  8534  		}
  8535  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  8536  		ptr := v_0.Args[0]
  8537  		mem := v_1
  8538  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  8539  			break
  8540  		}
  8541  		v.Reset(ssaop.OpS390XMOVBload)
  8542  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8543  		v.Aux = ssa.SymToAux(sym)
  8544  		v.AddArg2(ptr, mem)
  8545  		return true
  8546  	}
  8547  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8548  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  8549  	// result: (MOVBload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  8550  	for {
  8551  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8552  		sym1 := ssa.AuxToSym(v.Aux)
  8553  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  8554  			break
  8555  		}
  8556  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  8557  		sym2 := ssa.AuxToSym(v_0.Aux)
  8558  		base := v_0.Args[0]
  8559  		mem := v_1
  8560  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  8561  			break
  8562  		}
  8563  		v.Reset(ssaop.OpS390XMOVBload)
  8564  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8565  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8566  		v.AddArg2(base, mem)
  8567  		return true
  8568  	}
  8569  	return false
  8570  }
  8571  func rewriteValue_OpS390XMOVBreg(v *ssa.Value) bool {
  8572  	v_0 := v.Args[0]
  8573  	b := v.Block
  8574  	typ := &b.Func.Config.Types
  8575  	// match: (MOVBreg e:(MOVBreg x))
  8576  	// cond: ssa.ClobberIfDead(e)
  8577  	// result: (MOVBreg x)
  8578  	for {
  8579  		e := v_0
  8580  		if e.Op != ssaop.OpS390XMOVBreg {
  8581  			break
  8582  		}
  8583  		x := e.Args[0]
  8584  		if !(ssa.ClobberIfDead(e)) {
  8585  			break
  8586  		}
  8587  		v.Reset(ssaop.OpS390XMOVBreg)
  8588  		v.AddArg(x)
  8589  		return true
  8590  	}
  8591  	// match: (MOVBreg e:(MOVHreg x))
  8592  	// cond: ssa.ClobberIfDead(e)
  8593  	// result: (MOVBreg x)
  8594  	for {
  8595  		e := v_0
  8596  		if e.Op != ssaop.OpS390XMOVHreg {
  8597  			break
  8598  		}
  8599  		x := e.Args[0]
  8600  		if !(ssa.ClobberIfDead(e)) {
  8601  			break
  8602  		}
  8603  		v.Reset(ssaop.OpS390XMOVBreg)
  8604  		v.AddArg(x)
  8605  		return true
  8606  	}
  8607  	// match: (MOVBreg e:(MOVWreg x))
  8608  	// cond: ssa.ClobberIfDead(e)
  8609  	// result: (MOVBreg x)
  8610  	for {
  8611  		e := v_0
  8612  		if e.Op != ssaop.OpS390XMOVWreg {
  8613  			break
  8614  		}
  8615  		x := e.Args[0]
  8616  		if !(ssa.ClobberIfDead(e)) {
  8617  			break
  8618  		}
  8619  		v.Reset(ssaop.OpS390XMOVBreg)
  8620  		v.AddArg(x)
  8621  		return true
  8622  	}
  8623  	// match: (MOVBreg e:(MOVBZreg x))
  8624  	// cond: ssa.ClobberIfDead(e)
  8625  	// result: (MOVBreg x)
  8626  	for {
  8627  		e := v_0
  8628  		if e.Op != ssaop.OpS390XMOVBZreg {
  8629  			break
  8630  		}
  8631  		x := e.Args[0]
  8632  		if !(ssa.ClobberIfDead(e)) {
  8633  			break
  8634  		}
  8635  		v.Reset(ssaop.OpS390XMOVBreg)
  8636  		v.AddArg(x)
  8637  		return true
  8638  	}
  8639  	// match: (MOVBreg e:(MOVHZreg x))
  8640  	// cond: ssa.ClobberIfDead(e)
  8641  	// result: (MOVBreg x)
  8642  	for {
  8643  		e := v_0
  8644  		if e.Op != ssaop.OpS390XMOVHZreg {
  8645  			break
  8646  		}
  8647  		x := e.Args[0]
  8648  		if !(ssa.ClobberIfDead(e)) {
  8649  			break
  8650  		}
  8651  		v.Reset(ssaop.OpS390XMOVBreg)
  8652  		v.AddArg(x)
  8653  		return true
  8654  	}
  8655  	// match: (MOVBreg e:(MOVWZreg x))
  8656  	// cond: ssa.ClobberIfDead(e)
  8657  	// result: (MOVBreg x)
  8658  	for {
  8659  		e := v_0
  8660  		if e.Op != ssaop.OpS390XMOVWZreg {
  8661  			break
  8662  		}
  8663  		x := e.Args[0]
  8664  		if !(ssa.ClobberIfDead(e)) {
  8665  			break
  8666  		}
  8667  		v.Reset(ssaop.OpS390XMOVBreg)
  8668  		v.AddArg(x)
  8669  		return true
  8670  	}
  8671  	// match: (MOVBreg x:(MOVBload _ _))
  8672  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  8673  	// result: x
  8674  	for {
  8675  		x := v_0
  8676  		if x.Op != ssaop.OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  8677  			break
  8678  		}
  8679  		v.CopyOf(x)
  8680  		return true
  8681  	}
  8682  	// match: (MOVBreg <t> x:(MOVBZload [o] {s} p mem))
  8683  	// cond: x.Uses == 1 && ssa.Clobber(x)
  8684  	// result: @x.Block (MOVBload <t> [o] {s} p mem)
  8685  	for {
  8686  		t := v.Type
  8687  		x := v_0
  8688  		if x.Op != ssaop.OpS390XMOVBZload {
  8689  			break
  8690  		}
  8691  		o := ssa.AuxIntToInt32(x.AuxInt)
  8692  		s := ssa.AuxToSym(x.Aux)
  8693  		mem := x.Args[1]
  8694  		p := x.Args[0]
  8695  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  8696  			break
  8697  		}
  8698  		b = x.Block
  8699  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVBload, t)
  8700  		v.CopyOf(v0)
  8701  		v0.AuxInt = ssa.Int32ToAuxInt(o)
  8702  		v0.Aux = ssa.SymToAux(s)
  8703  		v0.AddArg2(p, mem)
  8704  		return true
  8705  	}
  8706  	// match: (MOVBreg x:(Arg <t>))
  8707  	// cond: t.IsSigned() && t.Size() == 1
  8708  	// result: x
  8709  	for {
  8710  		x := v_0
  8711  		if x.Op != ssaop.OpArg {
  8712  			break
  8713  		}
  8714  		t := x.Type
  8715  		if !(t.IsSigned() && t.Size() == 1) {
  8716  			break
  8717  		}
  8718  		v.CopyOf(x)
  8719  		return true
  8720  	}
  8721  	// match: (MOVBreg (MOVDconst [c]))
  8722  	// result: (MOVDconst [int64( int8(c))])
  8723  	for {
  8724  		if v_0.Op != ssaop.OpS390XMOVDconst {
  8725  			break
  8726  		}
  8727  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  8728  		v.Reset(ssaop.OpS390XMOVDconst)
  8729  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(c)))
  8730  		return true
  8731  	}
  8732  	// match: (MOVBreg (ANDWconst [m] x))
  8733  	// cond: int8(m) >= 0
  8734  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8735  	for {
  8736  		if v_0.Op != ssaop.OpS390XANDWconst {
  8737  			break
  8738  		}
  8739  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  8740  		x := v_0.Args[0]
  8741  		if !(int8(m) >= 0) {
  8742  			break
  8743  		}
  8744  		v.Reset(ssaop.OpS390XMOVWZreg)
  8745  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
  8746  		v0.AuxInt = ssa.Int32ToAuxInt(int32(uint8(m)))
  8747  		v0.AddArg(x)
  8748  		v.AddArg(v0)
  8749  		return true
  8750  	}
  8751  	return false
  8752  }
  8753  func rewriteValue_OpS390XMOVBstore(v *ssa.Value) bool {
  8754  	v_2 := v.Args[2]
  8755  	v_1 := v.Args[1]
  8756  	v_0 := v.Args[0]
  8757  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8758  	// result: (MOVBstore [off] {sym} ptr x mem)
  8759  	for {
  8760  		off := ssa.AuxIntToInt32(v.AuxInt)
  8761  		sym := ssa.AuxToSym(v.Aux)
  8762  		ptr := v_0
  8763  		if v_1.Op != ssaop.OpS390XMOVBreg {
  8764  			break
  8765  		}
  8766  		x := v_1.Args[0]
  8767  		mem := v_2
  8768  		v.Reset(ssaop.OpS390XMOVBstore)
  8769  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8770  		v.Aux = ssa.SymToAux(sym)
  8771  		v.AddArg3(ptr, x, mem)
  8772  		return true
  8773  	}
  8774  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8775  	// result: (MOVBstore [off] {sym} ptr x mem)
  8776  	for {
  8777  		off := ssa.AuxIntToInt32(v.AuxInt)
  8778  		sym := ssa.AuxToSym(v.Aux)
  8779  		ptr := v_0
  8780  		if v_1.Op != ssaop.OpS390XMOVBZreg {
  8781  			break
  8782  		}
  8783  		x := v_1.Args[0]
  8784  		mem := v_2
  8785  		v.Reset(ssaop.OpS390XMOVBstore)
  8786  		v.AuxInt = ssa.Int32ToAuxInt(off)
  8787  		v.Aux = ssa.SymToAux(sym)
  8788  		v.AddArg3(ptr, x, mem)
  8789  		return true
  8790  	}
  8791  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8792  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  8793  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  8794  	for {
  8795  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8796  		sym := ssa.AuxToSym(v.Aux)
  8797  		if v_0.Op != ssaop.OpS390XADDconst {
  8798  			break
  8799  		}
  8800  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  8801  		ptr := v_0.Args[0]
  8802  		val := v_1
  8803  		mem := v_2
  8804  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  8805  			break
  8806  		}
  8807  		v.Reset(ssaop.OpS390XMOVBstore)
  8808  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8809  		v.Aux = ssa.SymToAux(sym)
  8810  		v.AddArg3(ptr, val, mem)
  8811  		return true
  8812  	}
  8813  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [c]) mem)
  8814  	// cond: ssa.Is20Bit(int64(off)) && ptr.Op != ssaop.OpSB
  8815  	// result: (MOVBstoreconst [ssa.MakeValAndOff(int32(int8(c)),off)] {sym} ptr mem)
  8816  	for {
  8817  		off := ssa.AuxIntToInt32(v.AuxInt)
  8818  		sym := ssa.AuxToSym(v.Aux)
  8819  		ptr := v_0
  8820  		if v_1.Op != ssaop.OpS390XMOVDconst {
  8821  			break
  8822  		}
  8823  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8824  		mem := v_2
  8825  		if !(ssa.Is20Bit(int64(off)) && ptr.Op != ssaop.OpSB) {
  8826  			break
  8827  		}
  8828  		v.Reset(ssaop.OpS390XMOVBstoreconst)
  8829  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(int8(c)), off))
  8830  		v.Aux = ssa.SymToAux(sym)
  8831  		v.AddArg2(ptr, mem)
  8832  		return true
  8833  	}
  8834  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  8835  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  8836  	// result: (MOVBstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  8837  	for {
  8838  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  8839  		sym1 := ssa.AuxToSym(v.Aux)
  8840  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  8841  			break
  8842  		}
  8843  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  8844  		sym2 := ssa.AuxToSym(v_0.Aux)
  8845  		base := v_0.Args[0]
  8846  		val := v_1
  8847  		mem := v_2
  8848  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  8849  			break
  8850  		}
  8851  		v.Reset(ssaop.OpS390XMOVBstore)
  8852  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  8853  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8854  		v.AddArg3(base, val, mem)
  8855  		return true
  8856  	}
  8857  	return false
  8858  }
  8859  func rewriteValue_OpS390XMOVBstoreconst(v *ssa.Value) bool {
  8860  	v_1 := v.Args[1]
  8861  	v_0 := v.Args[0]
  8862  	// match: (MOVBstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  8863  	// cond: ssa.Is20Bit(sc.Off64()+int64(off))
  8864  	// result: (MOVBstoreconst [sc.AddOffset32(off)] {s} ptr mem)
  8865  	for {
  8866  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  8867  		s := ssa.AuxToSym(v.Aux)
  8868  		if v_0.Op != ssaop.OpS390XADDconst {
  8869  			break
  8870  		}
  8871  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  8872  		ptr := v_0.Args[0]
  8873  		mem := v_1
  8874  		if !(ssa.Is20Bit(sc.Off64() + int64(off))) {
  8875  			break
  8876  		}
  8877  		v.Reset(ssaop.OpS390XMOVBstoreconst)
  8878  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  8879  		v.Aux = ssa.SymToAux(s)
  8880  		v.AddArg2(ptr, mem)
  8881  		return true
  8882  	}
  8883  	// match: (MOVBstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  8884  	// cond: ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)
  8885  	// result: (MOVBstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
  8886  	for {
  8887  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  8888  		sym1 := ssa.AuxToSym(v.Aux)
  8889  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  8890  			break
  8891  		}
  8892  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  8893  		sym2 := ssa.AuxToSym(v_0.Aux)
  8894  		ptr := v_0.Args[0]
  8895  		mem := v_1
  8896  		if !(ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)) {
  8897  			break
  8898  		}
  8899  		v.Reset(ssaop.OpS390XMOVBstoreconst)
  8900  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  8901  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  8902  		v.AddArg2(ptr, mem)
  8903  		return true
  8904  	}
  8905  	return false
  8906  }
  8907  func rewriteValue_OpS390XMOVDBR(v *ssa.Value) bool {
  8908  	v_0 := v.Args[0]
  8909  	b := v.Block
  8910  	typ := &b.Func.Config.Types
  8911  	// match: (MOVDBR x:(MOVDload [off] {sym} ptr mem))
  8912  	// cond: x.Uses == 1
  8913  	// result: @x.Block (MOVDBRload [off] {sym} ptr mem)
  8914  	for {
  8915  		x := v_0
  8916  		if x.Op != ssaop.OpS390XMOVDload {
  8917  			break
  8918  		}
  8919  		off := ssa.AuxIntToInt32(x.AuxInt)
  8920  		sym := ssa.AuxToSym(x.Aux)
  8921  		mem := x.Args[1]
  8922  		ptr := x.Args[0]
  8923  		if !(x.Uses == 1) {
  8924  			break
  8925  		}
  8926  		b = x.Block
  8927  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVDBRload, typ.UInt64)
  8928  		v.CopyOf(v0)
  8929  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  8930  		v0.Aux = ssa.SymToAux(sym)
  8931  		v0.AddArg2(ptr, mem)
  8932  		return true
  8933  	}
  8934  	// match: (MOVDBR x:(MOVDloadidx [off] {sym} ptr idx mem))
  8935  	// cond: x.Uses == 1
  8936  	// result: @x.Block (MOVDBRloadidx [off] {sym} ptr idx mem)
  8937  	for {
  8938  		x := v_0
  8939  		if x.Op != ssaop.OpS390XMOVDloadidx {
  8940  			break
  8941  		}
  8942  		off := ssa.AuxIntToInt32(x.AuxInt)
  8943  		sym := ssa.AuxToSym(x.Aux)
  8944  		mem := x.Args[2]
  8945  		ptr := x.Args[0]
  8946  		idx := x.Args[1]
  8947  		if !(x.Uses == 1) {
  8948  			break
  8949  		}
  8950  		b = x.Block
  8951  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDBRloadidx, typ.Int64)
  8952  		v.CopyOf(v0)
  8953  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  8954  		v0.Aux = ssa.SymToAux(sym)
  8955  		v0.AddArg3(ptr, idx, mem)
  8956  		return true
  8957  	}
  8958  	return false
  8959  }
  8960  func rewriteValue_OpS390XMOVDaddridx(v *ssa.Value) bool {
  8961  	v_1 := v.Args[1]
  8962  	v_0 := v.Args[0]
  8963  	// match: (MOVDaddridx [c] {s} (ADDconst [d] x) y)
  8964  	// cond: ssa.Is20Bit(int64(c)+int64(d))
  8965  	// result: (MOVDaddridx [c+d] {s} x y)
  8966  	for {
  8967  		c := ssa.AuxIntToInt32(v.AuxInt)
  8968  		s := ssa.AuxToSym(v.Aux)
  8969  		if v_0.Op != ssaop.OpS390XADDconst {
  8970  			break
  8971  		}
  8972  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  8973  		x := v_0.Args[0]
  8974  		y := v_1
  8975  		if !(ssa.Is20Bit(int64(c) + int64(d))) {
  8976  			break
  8977  		}
  8978  		v.Reset(ssaop.OpS390XMOVDaddridx)
  8979  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  8980  		v.Aux = ssa.SymToAux(s)
  8981  		v.AddArg2(x, y)
  8982  		return true
  8983  	}
  8984  	// match: (MOVDaddridx [c] {s} x (ADDconst [d] y))
  8985  	// cond: ssa.Is20Bit(int64(c)+int64(d))
  8986  	// result: (MOVDaddridx [c+d] {s} x y)
  8987  	for {
  8988  		c := ssa.AuxIntToInt32(v.AuxInt)
  8989  		s := ssa.AuxToSym(v.Aux)
  8990  		x := v_0
  8991  		if v_1.Op != ssaop.OpS390XADDconst {
  8992  			break
  8993  		}
  8994  		d := ssa.AuxIntToInt32(v_1.AuxInt)
  8995  		y := v_1.Args[0]
  8996  		if !(ssa.Is20Bit(int64(c) + int64(d))) {
  8997  			break
  8998  		}
  8999  		v.Reset(ssaop.OpS390XMOVDaddridx)
  9000  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  9001  		v.Aux = ssa.SymToAux(s)
  9002  		v.AddArg2(x, y)
  9003  		return true
  9004  	}
  9005  	// match: (MOVDaddridx [off1] {sym1} (MOVDaddr [off2] {sym2} x) y)
  9006  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB
  9007  	// result: (MOVDaddridx [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  9008  	for {
  9009  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9010  		sym1 := ssa.AuxToSym(v.Aux)
  9011  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9012  			break
  9013  		}
  9014  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9015  		sym2 := ssa.AuxToSym(v_0.Aux)
  9016  		x := v_0.Args[0]
  9017  		y := v_1
  9018  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB) {
  9019  			break
  9020  		}
  9021  		v.Reset(ssaop.OpS390XMOVDaddridx)
  9022  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9023  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9024  		v.AddArg2(x, y)
  9025  		return true
  9026  	}
  9027  	// match: (MOVDaddridx [off1] {sym1} x (MOVDaddr [off2] {sym2} y))
  9028  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && y.Op != ssaop.OpSB
  9029  	// result: (MOVDaddridx [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  9030  	for {
  9031  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9032  		sym1 := ssa.AuxToSym(v.Aux)
  9033  		x := v_0
  9034  		if v_1.Op != ssaop.OpS390XMOVDaddr {
  9035  			break
  9036  		}
  9037  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  9038  		sym2 := ssa.AuxToSym(v_1.Aux)
  9039  		y := v_1.Args[0]
  9040  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && y.Op != ssaop.OpSB) {
  9041  			break
  9042  		}
  9043  		v.Reset(ssaop.OpS390XMOVDaddridx)
  9044  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9045  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9046  		v.AddArg2(x, y)
  9047  		return true
  9048  	}
  9049  	return false
  9050  }
  9051  func rewriteValue_OpS390XMOVDload(v *ssa.Value) bool {
  9052  	v_1 := v.Args[1]
  9053  	v_0 := v.Args[0]
  9054  	// match: (MOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  9055  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  9056  	// result: x
  9057  	for {
  9058  		off := ssa.AuxIntToInt32(v.AuxInt)
  9059  		sym := ssa.AuxToSym(v.Aux)
  9060  		ptr1 := v_0
  9061  		if v_1.Op != ssaop.OpS390XMOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  9062  			break
  9063  		}
  9064  		x := v_1.Args[1]
  9065  		ptr2 := v_1.Args[0]
  9066  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  9067  			break
  9068  		}
  9069  		v.CopyOf(x)
  9070  		return true
  9071  	}
  9072  	// match: (MOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  9073  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  9074  	// result: (LGDR x)
  9075  	for {
  9076  		off := ssa.AuxIntToInt32(v.AuxInt)
  9077  		sym := ssa.AuxToSym(v.Aux)
  9078  		ptr1 := v_0
  9079  		if v_1.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  9080  			break
  9081  		}
  9082  		x := v_1.Args[1]
  9083  		ptr2 := v_1.Args[0]
  9084  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  9085  			break
  9086  		}
  9087  		v.Reset(ssaop.OpS390XLGDR)
  9088  		v.AddArg(x)
  9089  		return true
  9090  	}
  9091  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9092  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  9093  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  9094  	for {
  9095  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9096  		sym := ssa.AuxToSym(v.Aux)
  9097  		if v_0.Op != ssaop.OpS390XADDconst {
  9098  			break
  9099  		}
  9100  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9101  		ptr := v_0.Args[0]
  9102  		mem := v_1
  9103  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  9104  			break
  9105  		}
  9106  		v.Reset(ssaop.OpS390XMOVDload)
  9107  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9108  		v.Aux = ssa.SymToAux(sym)
  9109  		v.AddArg2(ptr, mem)
  9110  		return true
  9111  	}
  9112  	// match: (MOVDload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9113  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9114  	// result: (MOVDload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  9115  	for {
  9116  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9117  		sym1 := ssa.AuxToSym(v.Aux)
  9118  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9119  			break
  9120  		}
  9121  		t := v_0.Type
  9122  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9123  		sym2 := ssa.AuxToSym(v_0.Aux)
  9124  		base := v_0.Args[0]
  9125  		mem := v_1
  9126  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9127  			break
  9128  		}
  9129  		v.Reset(ssaop.OpS390XMOVDload)
  9130  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9131  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9132  		v.AddArg2(base, mem)
  9133  		return true
  9134  	}
  9135  	return false
  9136  }
  9137  func rewriteValue_OpS390XMOVDstore(v *ssa.Value) bool {
  9138  	v_2 := v.Args[2]
  9139  	v_1 := v.Args[1]
  9140  	v_0 := v.Args[0]
  9141  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9142  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  9143  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  9144  	for {
  9145  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9146  		sym := ssa.AuxToSym(v.Aux)
  9147  		if v_0.Op != ssaop.OpS390XADDconst {
  9148  			break
  9149  		}
  9150  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9151  		ptr := v_0.Args[0]
  9152  		val := v_1
  9153  		mem := v_2
  9154  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  9155  			break
  9156  		}
  9157  		v.Reset(ssaop.OpS390XMOVDstore)
  9158  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9159  		v.Aux = ssa.SymToAux(sym)
  9160  		v.AddArg3(ptr, val, mem)
  9161  		return true
  9162  	}
  9163  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [c]) mem)
  9164  	// cond: ssa.Is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != ssaop.OpSB
  9165  	// result: (MOVDstoreconst [ssa.MakeValAndOff(int32(c),off)] {sym} ptr mem)
  9166  	for {
  9167  		off := ssa.AuxIntToInt32(v.AuxInt)
  9168  		sym := ssa.AuxToSym(v.Aux)
  9169  		ptr := v_0
  9170  		if v_1.Op != ssaop.OpS390XMOVDconst {
  9171  			break
  9172  		}
  9173  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9174  		mem := v_2
  9175  		if !(ssa.Is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != ssaop.OpSB) {
  9176  			break
  9177  		}
  9178  		v.Reset(ssaop.OpS390XMOVDstoreconst)
  9179  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(c), off))
  9180  		v.Aux = ssa.SymToAux(sym)
  9181  		v.AddArg2(ptr, mem)
  9182  		return true
  9183  	}
  9184  	// match: (MOVDstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9185  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9186  	// result: (MOVDstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  9187  	for {
  9188  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9189  		sym1 := ssa.AuxToSym(v.Aux)
  9190  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9191  			break
  9192  		}
  9193  		t := v_0.Type
  9194  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9195  		sym2 := ssa.AuxToSym(v_0.Aux)
  9196  		base := v_0.Args[0]
  9197  		val := v_1
  9198  		mem := v_2
  9199  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9200  			break
  9201  		}
  9202  		v.Reset(ssaop.OpS390XMOVDstore)
  9203  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9204  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9205  		v.AddArg3(base, val, mem)
  9206  		return true
  9207  	}
  9208  	// match: (MOVDstore [i] {s} p w1 x:(MOVDstore [i-8] {s} p w0 mem))
  9209  	// cond: p.Op != ssaop.OpSB && x.Uses == 1 && ssa.Is20Bit(int64(i)-8) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
  9210  	// result: (STMG2 [i-8] {s} p w0 w1 mem)
  9211  	for {
  9212  		i := ssa.AuxIntToInt32(v.AuxInt)
  9213  		s := ssa.AuxToSym(v.Aux)
  9214  		p := v_0
  9215  		w1 := v_1
  9216  		x := v_2
  9217  		if x.Op != ssaop.OpS390XMOVDstore || ssa.AuxIntToInt32(x.AuxInt) != i-8 || ssa.AuxToSym(x.Aux) != s {
  9218  			break
  9219  		}
  9220  		mem := x.Args[2]
  9221  		if p != x.Args[0] {
  9222  			break
  9223  		}
  9224  		w0 := x.Args[1]
  9225  		if !(p.Op != ssaop.OpSB && x.Uses == 1 && ssa.Is20Bit(int64(i)-8) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
  9226  			break
  9227  		}
  9228  		v.Reset(ssaop.OpS390XSTMG2)
  9229  		v.AuxInt = ssa.Int32ToAuxInt(i - 8)
  9230  		v.Aux = ssa.SymToAux(s)
  9231  		v.AddArg4(p, w0, w1, mem)
  9232  		return true
  9233  	}
  9234  	// match: (MOVDstore [i] {s} p w2 x:(STMG2 [i-16] {s} p w0 w1 mem))
  9235  	// cond: x.Uses == 1 && ssa.Is20Bit(int64(i)-16) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
  9236  	// result: (STMG3 [i-16] {s} p w0 w1 w2 mem)
  9237  	for {
  9238  		i := ssa.AuxIntToInt32(v.AuxInt)
  9239  		s := ssa.AuxToSym(v.Aux)
  9240  		p := v_0
  9241  		w2 := v_1
  9242  		x := v_2
  9243  		if x.Op != ssaop.OpS390XSTMG2 || ssa.AuxIntToInt32(x.AuxInt) != i-16 || ssa.AuxToSym(x.Aux) != s {
  9244  			break
  9245  		}
  9246  		mem := x.Args[3]
  9247  		if p != x.Args[0] {
  9248  			break
  9249  		}
  9250  		w0 := x.Args[1]
  9251  		w1 := x.Args[2]
  9252  		if !(x.Uses == 1 && ssa.Is20Bit(int64(i)-16) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
  9253  			break
  9254  		}
  9255  		v.Reset(ssaop.OpS390XSTMG3)
  9256  		v.AuxInt = ssa.Int32ToAuxInt(i - 16)
  9257  		v.Aux = ssa.SymToAux(s)
  9258  		v.AddArg5(p, w0, w1, w2, mem)
  9259  		return true
  9260  	}
  9261  	// match: (MOVDstore [i] {s} p w3 x:(STMG3 [i-24] {s} p w0 w1 w2 mem))
  9262  	// cond: x.Uses == 1 && ssa.Is20Bit(int64(i)-24) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
  9263  	// result: (STMG4 [i-24] {s} p w0 w1 w2 w3 mem)
  9264  	for {
  9265  		i := ssa.AuxIntToInt32(v.AuxInt)
  9266  		s := ssa.AuxToSym(v.Aux)
  9267  		p := v_0
  9268  		w3 := v_1
  9269  		x := v_2
  9270  		if x.Op != ssaop.OpS390XSTMG3 || ssa.AuxIntToInt32(x.AuxInt) != i-24 || ssa.AuxToSym(x.Aux) != s {
  9271  			break
  9272  		}
  9273  		mem := x.Args[4]
  9274  		if p != x.Args[0] {
  9275  			break
  9276  		}
  9277  		w0 := x.Args[1]
  9278  		w1 := x.Args[2]
  9279  		w2 := x.Args[3]
  9280  		if !(x.Uses == 1 && ssa.Is20Bit(int64(i)-24) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
  9281  			break
  9282  		}
  9283  		v.Reset(ssaop.OpS390XSTMG4)
  9284  		v.AuxInt = ssa.Int32ToAuxInt(i - 24)
  9285  		v.Aux = ssa.SymToAux(s)
  9286  		v.AddArg6(p, w0, w1, w2, w3, mem)
  9287  		return true
  9288  	}
  9289  	// match: (MOVDstore [off] {sym} ptr r:(MOVDBR x) mem)
  9290  	// cond: r.Uses == 1
  9291  	// result: (MOVDBRstore [off] {sym} ptr x mem)
  9292  	for {
  9293  		off := ssa.AuxIntToInt32(v.AuxInt)
  9294  		sym := ssa.AuxToSym(v.Aux)
  9295  		ptr := v_0
  9296  		r := v_1
  9297  		if r.Op != ssaop.OpS390XMOVDBR {
  9298  			break
  9299  		}
  9300  		x := r.Args[0]
  9301  		mem := v_2
  9302  		if !(r.Uses == 1) {
  9303  			break
  9304  		}
  9305  		v.Reset(ssaop.OpS390XMOVDBRstore)
  9306  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9307  		v.Aux = ssa.SymToAux(sym)
  9308  		v.AddArg3(ptr, x, mem)
  9309  		return true
  9310  	}
  9311  	return false
  9312  }
  9313  func rewriteValue_OpS390XMOVDstoreconst(v *ssa.Value) bool {
  9314  	v_1 := v.Args[1]
  9315  	v_0 := v.Args[0]
  9316  	// match: (MOVDstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  9317  	// cond: isU12Bit(sc.Off64()+int64(off))
  9318  	// result: (MOVDstoreconst [sc.AddOffset32(off)] {s} ptr mem)
  9319  	for {
  9320  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  9321  		s := ssa.AuxToSym(v.Aux)
  9322  		if v_0.Op != ssaop.OpS390XADDconst {
  9323  			break
  9324  		}
  9325  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  9326  		ptr := v_0.Args[0]
  9327  		mem := v_1
  9328  		if !(isU12Bit(sc.Off64() + int64(off))) {
  9329  			break
  9330  		}
  9331  		v.Reset(ssaop.OpS390XMOVDstoreconst)
  9332  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  9333  		v.Aux = ssa.SymToAux(s)
  9334  		v.AddArg2(ptr, mem)
  9335  		return true
  9336  	}
  9337  	// match: (MOVDstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  9338  	// cond: ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)
  9339  	// result: (MOVDstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
  9340  	for {
  9341  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  9342  		sym1 := ssa.AuxToSym(v.Aux)
  9343  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9344  			break
  9345  		}
  9346  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  9347  		sym2 := ssa.AuxToSym(v_0.Aux)
  9348  		ptr := v_0.Args[0]
  9349  		mem := v_1
  9350  		if !(ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)) {
  9351  			break
  9352  		}
  9353  		v.Reset(ssaop.OpS390XMOVDstoreconst)
  9354  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  9355  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9356  		v.AddArg2(ptr, mem)
  9357  		return true
  9358  	}
  9359  	return false
  9360  }
  9361  func rewriteValue_OpS390XMOVDstoreidx(v *ssa.Value) bool {
  9362  	v_3 := v.Args[3]
  9363  	v_2 := v.Args[2]
  9364  	v_1 := v.Args[1]
  9365  	v_0 := v.Args[0]
  9366  	// match: (MOVDstoreidx [off] {sym} ptr idx r:(MOVDBR x) mem)
  9367  	// cond: r.Uses == 1
  9368  	// result: (MOVDBRstoreidx [off] {sym} ptr idx x mem)
  9369  	for {
  9370  		off := ssa.AuxIntToInt32(v.AuxInt)
  9371  		sym := ssa.AuxToSym(v.Aux)
  9372  		ptr := v_0
  9373  		idx := v_1
  9374  		r := v_2
  9375  		if r.Op != ssaop.OpS390XMOVDBR {
  9376  			break
  9377  		}
  9378  		x := r.Args[0]
  9379  		mem := v_3
  9380  		if !(r.Uses == 1) {
  9381  			break
  9382  		}
  9383  		v.Reset(ssaop.OpS390XMOVDBRstoreidx)
  9384  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9385  		v.Aux = ssa.SymToAux(sym)
  9386  		v.AddArg4(ptr, idx, x, mem)
  9387  		return true
  9388  	}
  9389  	return false
  9390  }
  9391  func rewriteValue_OpS390XMOVHZload(v *ssa.Value) bool {
  9392  	v_1 := v.Args[1]
  9393  	v_0 := v.Args[0]
  9394  	// match: (MOVHZload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9395  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  9396  	// result: (MOVHZreg x)
  9397  	for {
  9398  		off := ssa.AuxIntToInt32(v.AuxInt)
  9399  		sym := ssa.AuxToSym(v.Aux)
  9400  		ptr1 := v_0
  9401  		if v_1.Op != ssaop.OpS390XMOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  9402  			break
  9403  		}
  9404  		x := v_1.Args[1]
  9405  		ptr2 := v_1.Args[0]
  9406  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  9407  			break
  9408  		}
  9409  		v.Reset(ssaop.OpS390XMOVHZreg)
  9410  		v.AddArg(x)
  9411  		return true
  9412  	}
  9413  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] ptr) mem)
  9414  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  9415  	// result: (MOVHZload [off1+off2] {sym} ptr mem)
  9416  	for {
  9417  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9418  		sym := ssa.AuxToSym(v.Aux)
  9419  		if v_0.Op != ssaop.OpS390XADDconst {
  9420  			break
  9421  		}
  9422  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9423  		ptr := v_0.Args[0]
  9424  		mem := v_1
  9425  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  9426  			break
  9427  		}
  9428  		v.Reset(ssaop.OpS390XMOVHZload)
  9429  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9430  		v.Aux = ssa.SymToAux(sym)
  9431  		v.AddArg2(ptr, mem)
  9432  		return true
  9433  	}
  9434  	// match: (MOVHZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9435  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9436  	// result: (MOVHZload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  9437  	for {
  9438  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9439  		sym1 := ssa.AuxToSym(v.Aux)
  9440  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9441  			break
  9442  		}
  9443  		t := v_0.Type
  9444  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9445  		sym2 := ssa.AuxToSym(v_0.Aux)
  9446  		base := v_0.Args[0]
  9447  		mem := v_1
  9448  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9449  			break
  9450  		}
  9451  		v.Reset(ssaop.OpS390XMOVHZload)
  9452  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9453  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9454  		v.AddArg2(base, mem)
  9455  		return true
  9456  	}
  9457  	return false
  9458  }
  9459  func rewriteValue_OpS390XMOVHZreg(v *ssa.Value) bool {
  9460  	v_0 := v.Args[0]
  9461  	b := v.Block
  9462  	typ := &b.Func.Config.Types
  9463  	// match: (MOVHZreg e:(MOVBZreg x))
  9464  	// cond: ssa.ClobberIfDead(e)
  9465  	// result: (MOVBZreg x)
  9466  	for {
  9467  		e := v_0
  9468  		if e.Op != ssaop.OpS390XMOVBZreg {
  9469  			break
  9470  		}
  9471  		x := e.Args[0]
  9472  		if !(ssa.ClobberIfDead(e)) {
  9473  			break
  9474  		}
  9475  		v.Reset(ssaop.OpS390XMOVBZreg)
  9476  		v.AddArg(x)
  9477  		return true
  9478  	}
  9479  	// match: (MOVHZreg e:(MOVHreg x))
  9480  	// cond: ssa.ClobberIfDead(e)
  9481  	// result: (MOVHZreg x)
  9482  	for {
  9483  		e := v_0
  9484  		if e.Op != ssaop.OpS390XMOVHreg {
  9485  			break
  9486  		}
  9487  		x := e.Args[0]
  9488  		if !(ssa.ClobberIfDead(e)) {
  9489  			break
  9490  		}
  9491  		v.Reset(ssaop.OpS390XMOVHZreg)
  9492  		v.AddArg(x)
  9493  		return true
  9494  	}
  9495  	// match: (MOVHZreg e:(MOVWreg x))
  9496  	// cond: ssa.ClobberIfDead(e)
  9497  	// result: (MOVHZreg x)
  9498  	for {
  9499  		e := v_0
  9500  		if e.Op != ssaop.OpS390XMOVWreg {
  9501  			break
  9502  		}
  9503  		x := e.Args[0]
  9504  		if !(ssa.ClobberIfDead(e)) {
  9505  			break
  9506  		}
  9507  		v.Reset(ssaop.OpS390XMOVHZreg)
  9508  		v.AddArg(x)
  9509  		return true
  9510  	}
  9511  	// match: (MOVHZreg e:(MOVHZreg x))
  9512  	// cond: ssa.ClobberIfDead(e)
  9513  	// result: (MOVHZreg x)
  9514  	for {
  9515  		e := v_0
  9516  		if e.Op != ssaop.OpS390XMOVHZreg {
  9517  			break
  9518  		}
  9519  		x := e.Args[0]
  9520  		if !(ssa.ClobberIfDead(e)) {
  9521  			break
  9522  		}
  9523  		v.Reset(ssaop.OpS390XMOVHZreg)
  9524  		v.AddArg(x)
  9525  		return true
  9526  	}
  9527  	// match: (MOVHZreg e:(MOVWZreg x))
  9528  	// cond: ssa.ClobberIfDead(e)
  9529  	// result: (MOVHZreg x)
  9530  	for {
  9531  		e := v_0
  9532  		if e.Op != ssaop.OpS390XMOVWZreg {
  9533  			break
  9534  		}
  9535  		x := e.Args[0]
  9536  		if !(ssa.ClobberIfDead(e)) {
  9537  			break
  9538  		}
  9539  		v.Reset(ssaop.OpS390XMOVHZreg)
  9540  		v.AddArg(x)
  9541  		return true
  9542  	}
  9543  	// match: (MOVHZreg x:(MOVBZload _ _))
  9544  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9545  	// result: x
  9546  	for {
  9547  		x := v_0
  9548  		if x.Op != ssaop.OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9549  			break
  9550  		}
  9551  		v.CopyOf(x)
  9552  		return true
  9553  	}
  9554  	// match: (MOVHZreg x:(MOVHZload _ _))
  9555  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
  9556  	// result: x
  9557  	for {
  9558  		x := v_0
  9559  		if x.Op != ssaop.OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
  9560  			break
  9561  		}
  9562  		v.CopyOf(x)
  9563  		return true
  9564  	}
  9565  	// match: (MOVHZreg <t> x:(MOVHload [o] {s} p mem))
  9566  	// cond: x.Uses == 1 && ssa.Clobber(x)
  9567  	// result: @x.Block (MOVHZload <t> [o] {s} p mem)
  9568  	for {
  9569  		t := v.Type
  9570  		x := v_0
  9571  		if x.Op != ssaop.OpS390XMOVHload {
  9572  			break
  9573  		}
  9574  		o := ssa.AuxIntToInt32(x.AuxInt)
  9575  		s := ssa.AuxToSym(x.Aux)
  9576  		mem := x.Args[1]
  9577  		p := x.Args[0]
  9578  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  9579  			break
  9580  		}
  9581  		b = x.Block
  9582  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVHZload, t)
  9583  		v.CopyOf(v0)
  9584  		v0.AuxInt = ssa.Int32ToAuxInt(o)
  9585  		v0.Aux = ssa.SymToAux(s)
  9586  		v0.AddArg2(p, mem)
  9587  		return true
  9588  	}
  9589  	// match: (MOVHZreg x:(Arg <t>))
  9590  	// cond: !t.IsSigned() && t.Size() <= 2
  9591  	// result: x
  9592  	for {
  9593  		x := v_0
  9594  		if x.Op != ssaop.OpArg {
  9595  			break
  9596  		}
  9597  		t := x.Type
  9598  		if !(!t.IsSigned() && t.Size() <= 2) {
  9599  			break
  9600  		}
  9601  		v.CopyOf(x)
  9602  		return true
  9603  	}
  9604  	// match: (MOVHZreg (MOVDconst [c]))
  9605  	// result: (MOVDconst [int64(uint16(c))])
  9606  	for {
  9607  		if v_0.Op != ssaop.OpS390XMOVDconst {
  9608  			break
  9609  		}
  9610  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9611  		v.Reset(ssaop.OpS390XMOVDconst)
  9612  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint16(c)))
  9613  		return true
  9614  	}
  9615  	// match: (MOVHZreg (RISBGZ x {r}))
  9616  	// cond: r.OutMerge(0x0000ffff) != nil
  9617  	// result: (RISBGZ x {*r.OutMerge(0x0000ffff)})
  9618  	for {
  9619  		if v_0.Op != ssaop.OpS390XRISBGZ {
  9620  			break
  9621  		}
  9622  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
  9623  		x := v_0.Args[0]
  9624  		if !(r.OutMerge(0x0000ffff) != nil) {
  9625  			break
  9626  		}
  9627  		v.Reset(ssaop.OpS390XRISBGZ)
  9628  		v.Aux = ssa.S390xRotateParamsToAux(*r.OutMerge(0x0000ffff))
  9629  		v.AddArg(x)
  9630  		return true
  9631  	}
  9632  	// match: (MOVHZreg (ANDWconst [m] x))
  9633  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9634  	for {
  9635  		if v_0.Op != ssaop.OpS390XANDWconst {
  9636  			break
  9637  		}
  9638  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  9639  		x := v_0.Args[0]
  9640  		v.Reset(ssaop.OpS390XMOVWZreg)
  9641  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
  9642  		v0.AuxInt = ssa.Int32ToAuxInt(int32(uint16(m)))
  9643  		v0.AddArg(x)
  9644  		v.AddArg(v0)
  9645  		return true
  9646  	}
  9647  	return false
  9648  }
  9649  func rewriteValue_OpS390XMOVHload(v *ssa.Value) bool {
  9650  	v_1 := v.Args[1]
  9651  	v_0 := v.Args[0]
  9652  	// match: (MOVHload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9653  	// cond: ssa.IsSamePtr(ptr1, ptr2)
  9654  	// result: (MOVHreg x)
  9655  	for {
  9656  		off := ssa.AuxIntToInt32(v.AuxInt)
  9657  		sym := ssa.AuxToSym(v.Aux)
  9658  		ptr1 := v_0
  9659  		if v_1.Op != ssaop.OpS390XMOVHstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
  9660  			break
  9661  		}
  9662  		x := v_1.Args[1]
  9663  		ptr2 := v_1.Args[0]
  9664  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
  9665  			break
  9666  		}
  9667  		v.Reset(ssaop.OpS390XMOVHreg)
  9668  		v.AddArg(x)
  9669  		return true
  9670  	}
  9671  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9672  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  9673  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  9674  	for {
  9675  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9676  		sym := ssa.AuxToSym(v.Aux)
  9677  		if v_0.Op != ssaop.OpS390XADDconst {
  9678  			break
  9679  		}
  9680  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9681  		ptr := v_0.Args[0]
  9682  		mem := v_1
  9683  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  9684  			break
  9685  		}
  9686  		v.Reset(ssaop.OpS390XMOVHload)
  9687  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9688  		v.Aux = ssa.SymToAux(sym)
  9689  		v.AddArg2(ptr, mem)
  9690  		return true
  9691  	}
  9692  	// match: (MOVHload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9693  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9694  	// result: (MOVHload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  9695  	for {
  9696  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9697  		sym1 := ssa.AuxToSym(v.Aux)
  9698  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9699  			break
  9700  		}
  9701  		t := v_0.Type
  9702  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9703  		sym2 := ssa.AuxToSym(v_0.Aux)
  9704  		base := v_0.Args[0]
  9705  		mem := v_1
  9706  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9707  			break
  9708  		}
  9709  		v.Reset(ssaop.OpS390XMOVHload)
  9710  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9711  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  9712  		v.AddArg2(base, mem)
  9713  		return true
  9714  	}
  9715  	return false
  9716  }
  9717  func rewriteValue_OpS390XMOVHreg(v *ssa.Value) bool {
  9718  	v_0 := v.Args[0]
  9719  	b := v.Block
  9720  	typ := &b.Func.Config.Types
  9721  	// match: (MOVHreg e:(MOVBreg x))
  9722  	// cond: ssa.ClobberIfDead(e)
  9723  	// result: (MOVBreg x)
  9724  	for {
  9725  		e := v_0
  9726  		if e.Op != ssaop.OpS390XMOVBreg {
  9727  			break
  9728  		}
  9729  		x := e.Args[0]
  9730  		if !(ssa.ClobberIfDead(e)) {
  9731  			break
  9732  		}
  9733  		v.Reset(ssaop.OpS390XMOVBreg)
  9734  		v.AddArg(x)
  9735  		return true
  9736  	}
  9737  	// match: (MOVHreg e:(MOVHreg x))
  9738  	// cond: ssa.ClobberIfDead(e)
  9739  	// result: (MOVHreg x)
  9740  	for {
  9741  		e := v_0
  9742  		if e.Op != ssaop.OpS390XMOVHreg {
  9743  			break
  9744  		}
  9745  		x := e.Args[0]
  9746  		if !(ssa.ClobberIfDead(e)) {
  9747  			break
  9748  		}
  9749  		v.Reset(ssaop.OpS390XMOVHreg)
  9750  		v.AddArg(x)
  9751  		return true
  9752  	}
  9753  	// match: (MOVHreg e:(MOVWreg x))
  9754  	// cond: ssa.ClobberIfDead(e)
  9755  	// result: (MOVHreg x)
  9756  	for {
  9757  		e := v_0
  9758  		if e.Op != ssaop.OpS390XMOVWreg {
  9759  			break
  9760  		}
  9761  		x := e.Args[0]
  9762  		if !(ssa.ClobberIfDead(e)) {
  9763  			break
  9764  		}
  9765  		v.Reset(ssaop.OpS390XMOVHreg)
  9766  		v.AddArg(x)
  9767  		return true
  9768  	}
  9769  	// match: (MOVHreg e:(MOVHZreg x))
  9770  	// cond: ssa.ClobberIfDead(e)
  9771  	// result: (MOVHreg x)
  9772  	for {
  9773  		e := v_0
  9774  		if e.Op != ssaop.OpS390XMOVHZreg {
  9775  			break
  9776  		}
  9777  		x := e.Args[0]
  9778  		if !(ssa.ClobberIfDead(e)) {
  9779  			break
  9780  		}
  9781  		v.Reset(ssaop.OpS390XMOVHreg)
  9782  		v.AddArg(x)
  9783  		return true
  9784  	}
  9785  	// match: (MOVHreg e:(MOVWZreg x))
  9786  	// cond: ssa.ClobberIfDead(e)
  9787  	// result: (MOVHreg x)
  9788  	for {
  9789  		e := v_0
  9790  		if e.Op != ssaop.OpS390XMOVWZreg {
  9791  			break
  9792  		}
  9793  		x := e.Args[0]
  9794  		if !(ssa.ClobberIfDead(e)) {
  9795  			break
  9796  		}
  9797  		v.Reset(ssaop.OpS390XMOVHreg)
  9798  		v.AddArg(x)
  9799  		return true
  9800  	}
  9801  	// match: (MOVHreg x:(MOVBload _ _))
  9802  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9803  	// result: x
  9804  	for {
  9805  		x := v_0
  9806  		if x.Op != ssaop.OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9807  			break
  9808  		}
  9809  		v.CopyOf(x)
  9810  		return true
  9811  	}
  9812  	// match: (MOVHreg x:(MOVHload _ _))
  9813  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9814  	// result: x
  9815  	for {
  9816  		x := v_0
  9817  		if x.Op != ssaop.OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9818  			break
  9819  		}
  9820  		v.CopyOf(x)
  9821  		return true
  9822  	}
  9823  	// match: (MOVHreg x:(MOVBZload _ _))
  9824  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9825  	// result: x
  9826  	for {
  9827  		x := v_0
  9828  		if x.Op != ssaop.OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9829  			break
  9830  		}
  9831  		v.CopyOf(x)
  9832  		return true
  9833  	}
  9834  	// match: (MOVHreg <t> x:(MOVHZload [o] {s} p mem))
  9835  	// cond: x.Uses == 1 && ssa.Clobber(x)
  9836  	// result: @x.Block (MOVHload <t> [o] {s} p mem)
  9837  	for {
  9838  		t := v.Type
  9839  		x := v_0
  9840  		if x.Op != ssaop.OpS390XMOVHZload {
  9841  			break
  9842  		}
  9843  		o := ssa.AuxIntToInt32(x.AuxInt)
  9844  		s := ssa.AuxToSym(x.Aux)
  9845  		mem := x.Args[1]
  9846  		p := x.Args[0]
  9847  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  9848  			break
  9849  		}
  9850  		b = x.Block
  9851  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVHload, t)
  9852  		v.CopyOf(v0)
  9853  		v0.AuxInt = ssa.Int32ToAuxInt(o)
  9854  		v0.Aux = ssa.SymToAux(s)
  9855  		v0.AddArg2(p, mem)
  9856  		return true
  9857  	}
  9858  	// match: (MOVHreg x:(Arg <t>))
  9859  	// cond: t.IsSigned() && t.Size() <= 2
  9860  	// result: x
  9861  	for {
  9862  		x := v_0
  9863  		if x.Op != ssaop.OpArg {
  9864  			break
  9865  		}
  9866  		t := x.Type
  9867  		if !(t.IsSigned() && t.Size() <= 2) {
  9868  			break
  9869  		}
  9870  		v.CopyOf(x)
  9871  		return true
  9872  	}
  9873  	// match: (MOVHreg (MOVDconst [c]))
  9874  	// result: (MOVDconst [int64(int16(c))])
  9875  	for {
  9876  		if v_0.Op != ssaop.OpS390XMOVDconst {
  9877  			break
  9878  		}
  9879  		c := ssa.AuxIntToInt64(v_0.AuxInt)
  9880  		v.Reset(ssaop.OpS390XMOVDconst)
  9881  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(c)))
  9882  		return true
  9883  	}
  9884  	// match: (MOVHreg (ANDWconst [m] x))
  9885  	// cond: int16(m) >= 0
  9886  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9887  	for {
  9888  		if v_0.Op != ssaop.OpS390XANDWconst {
  9889  			break
  9890  		}
  9891  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  9892  		x := v_0.Args[0]
  9893  		if !(int16(m) >= 0) {
  9894  			break
  9895  		}
  9896  		v.Reset(ssaop.OpS390XMOVWZreg)
  9897  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
  9898  		v0.AuxInt = ssa.Int32ToAuxInt(int32(uint16(m)))
  9899  		v0.AddArg(x)
  9900  		v.AddArg(v0)
  9901  		return true
  9902  	}
  9903  	return false
  9904  }
  9905  func rewriteValue_OpS390XMOVHstore(v *ssa.Value) bool {
  9906  	v_2 := v.Args[2]
  9907  	v_1 := v.Args[1]
  9908  	v_0 := v.Args[0]
  9909  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  9910  	// result: (MOVHstore [off] {sym} ptr x mem)
  9911  	for {
  9912  		off := ssa.AuxIntToInt32(v.AuxInt)
  9913  		sym := ssa.AuxToSym(v.Aux)
  9914  		ptr := v_0
  9915  		if v_1.Op != ssaop.OpS390XMOVHreg {
  9916  			break
  9917  		}
  9918  		x := v_1.Args[0]
  9919  		mem := v_2
  9920  		v.Reset(ssaop.OpS390XMOVHstore)
  9921  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9922  		v.Aux = ssa.SymToAux(sym)
  9923  		v.AddArg3(ptr, x, mem)
  9924  		return true
  9925  	}
  9926  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
  9927  	// result: (MOVHstore [off] {sym} ptr x mem)
  9928  	for {
  9929  		off := ssa.AuxIntToInt32(v.AuxInt)
  9930  		sym := ssa.AuxToSym(v.Aux)
  9931  		ptr := v_0
  9932  		if v_1.Op != ssaop.OpS390XMOVHZreg {
  9933  			break
  9934  		}
  9935  		x := v_1.Args[0]
  9936  		mem := v_2
  9937  		v.Reset(ssaop.OpS390XMOVHstore)
  9938  		v.AuxInt = ssa.Int32ToAuxInt(off)
  9939  		v.Aux = ssa.SymToAux(sym)
  9940  		v.AddArg3(ptr, x, mem)
  9941  		return true
  9942  	}
  9943  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9944  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
  9945  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
  9946  	for {
  9947  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9948  		sym := ssa.AuxToSym(v.Aux)
  9949  		if v_0.Op != ssaop.OpS390XADDconst {
  9950  			break
  9951  		}
  9952  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9953  		ptr := v_0.Args[0]
  9954  		val := v_1
  9955  		mem := v_2
  9956  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
  9957  			break
  9958  		}
  9959  		v.Reset(ssaop.OpS390XMOVHstore)
  9960  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  9961  		v.Aux = ssa.SymToAux(sym)
  9962  		v.AddArg3(ptr, val, mem)
  9963  		return true
  9964  	}
  9965  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [c]) mem)
  9966  	// cond: isU12Bit(int64(off)) && ptr.Op != ssaop.OpSB
  9967  	// result: (MOVHstoreconst [ssa.MakeValAndOff(int32(int16(c)),off)] {sym} ptr mem)
  9968  	for {
  9969  		off := ssa.AuxIntToInt32(v.AuxInt)
  9970  		sym := ssa.AuxToSym(v.Aux)
  9971  		ptr := v_0
  9972  		if v_1.Op != ssaop.OpS390XMOVDconst {
  9973  			break
  9974  		}
  9975  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9976  		mem := v_2
  9977  		if !(isU12Bit(int64(off)) && ptr.Op != ssaop.OpSB) {
  9978  			break
  9979  		}
  9980  		v.Reset(ssaop.OpS390XMOVHstoreconst)
  9981  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(int16(c)), off))
  9982  		v.Aux = ssa.SymToAux(sym)
  9983  		v.AddArg2(ptr, mem)
  9984  		return true
  9985  	}
  9986  	// match: (MOVHstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9987  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9988  	// result: (MOVHstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  9989  	for {
  9990  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  9991  		sym1 := ssa.AuxToSym(v.Aux)
  9992  		if v_0.Op != ssaop.OpS390XMOVDaddr {
  9993  			break
  9994  		}
  9995  		t := v_0.Type
  9996  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  9997  		sym2 := ssa.AuxToSym(v_0.Aux)
  9998  		base := v_0.Args[0]
  9999  		val := v_1
 10000  		mem := v_2
 10001  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
 10002  			break
 10003  		}
 10004  		v.Reset(ssaop.OpS390XMOVHstore)
 10005  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10006  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10007  		v.AddArg3(base, val, mem)
 10008  		return true
 10009  	}
 10010  	// match: (MOVHstore [off] {sym} ptr (Bswap16 val) mem)
 10011  	// result: (MOVHBRstore [off] {sym} ptr val mem)
 10012  	for {
 10013  		off := ssa.AuxIntToInt32(v.AuxInt)
 10014  		sym := ssa.AuxToSym(v.Aux)
 10015  		ptr := v_0
 10016  		if v_1.Op != ssaop.OpBswap16 {
 10017  			break
 10018  		}
 10019  		val := v_1.Args[0]
 10020  		mem := v_2
 10021  		v.Reset(ssaop.OpS390XMOVHBRstore)
 10022  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10023  		v.Aux = ssa.SymToAux(sym)
 10024  		v.AddArg3(ptr, val, mem)
 10025  		return true
 10026  	}
 10027  	return false
 10028  }
 10029  func rewriteValue_OpS390XMOVHstoreconst(v *ssa.Value) bool {
 10030  	v_1 := v.Args[1]
 10031  	v_0 := v.Args[0]
 10032  	// match: (MOVHstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10033  	// cond: isU12Bit(sc.Off64()+int64(off))
 10034  	// result: (MOVHstoreconst [sc.AddOffset32(off)] {s} ptr mem)
 10035  	for {
 10036  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
 10037  		s := ssa.AuxToSym(v.Aux)
 10038  		if v_0.Op != ssaop.OpS390XADDconst {
 10039  			break
 10040  		}
 10041  		off := ssa.AuxIntToInt32(v_0.AuxInt)
 10042  		ptr := v_0.Args[0]
 10043  		mem := v_1
 10044  		if !(isU12Bit(sc.Off64() + int64(off))) {
 10045  			break
 10046  		}
 10047  		v.Reset(ssaop.OpS390XMOVHstoreconst)
 10048  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
 10049  		v.Aux = ssa.SymToAux(s)
 10050  		v.AddArg2(ptr, mem)
 10051  		return true
 10052  	}
 10053  	// match: (MOVHstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10054  	// cond: ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)
 10055  	// result: (MOVHstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
 10056  	for {
 10057  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
 10058  		sym1 := ssa.AuxToSym(v.Aux)
 10059  		if v_0.Op != ssaop.OpS390XMOVDaddr {
 10060  			break
 10061  		}
 10062  		off := ssa.AuxIntToInt32(v_0.AuxInt)
 10063  		sym2 := ssa.AuxToSym(v_0.Aux)
 10064  		ptr := v_0.Args[0]
 10065  		mem := v_1
 10066  		if !(ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)) {
 10067  			break
 10068  		}
 10069  		v.Reset(ssaop.OpS390XMOVHstoreconst)
 10070  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
 10071  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10072  		v.AddArg2(ptr, mem)
 10073  		return true
 10074  	}
 10075  	return false
 10076  }
 10077  func rewriteValue_OpS390XMOVHstoreidx(v *ssa.Value) bool {
 10078  	v_3 := v.Args[3]
 10079  	v_2 := v.Args[2]
 10080  	v_1 := v.Args[1]
 10081  	v_0 := v.Args[0]
 10082  	// match: (MOVHstoreidx [off] {sym} ptr idx (Bswap16 val) mem)
 10083  	// result: (MOVHBRstoreidx [off] {sym} ptr idx val mem)
 10084  	for {
 10085  		off := ssa.AuxIntToInt32(v.AuxInt)
 10086  		sym := ssa.AuxToSym(v.Aux)
 10087  		ptr := v_0
 10088  		idx := v_1
 10089  		if v_2.Op != ssaop.OpBswap16 {
 10090  			break
 10091  		}
 10092  		val := v_2.Args[0]
 10093  		mem := v_3
 10094  		v.Reset(ssaop.OpS390XMOVHBRstoreidx)
 10095  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10096  		v.Aux = ssa.SymToAux(sym)
 10097  		v.AddArg4(ptr, idx, val, mem)
 10098  		return true
 10099  	}
 10100  	return false
 10101  }
 10102  func rewriteValue_OpS390XMOVWBR(v *ssa.Value) bool {
 10103  	v_0 := v.Args[0]
 10104  	b := v.Block
 10105  	typ := &b.Func.Config.Types
 10106  	// match: (MOVWBR x:(MOVWZload [off] {sym} ptr mem))
 10107  	// cond: x.Uses == 1
 10108  	// result: @x.Block (MOVWZreg (MOVWBRload [off] {sym} ptr mem))
 10109  	for {
 10110  		x := v_0
 10111  		if x.Op != ssaop.OpS390XMOVWZload {
 10112  			break
 10113  		}
 10114  		off := ssa.AuxIntToInt32(x.AuxInt)
 10115  		sym := ssa.AuxToSym(x.Aux)
 10116  		mem := x.Args[1]
 10117  		ptr := x.Args[0]
 10118  		if !(x.Uses == 1) {
 10119  			break
 10120  		}
 10121  		b = x.Block
 10122  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
 10123  		v.CopyOf(v0)
 10124  		v1 := b.NewValue0(x.Pos, ssaop.OpS390XMOVWBRload, typ.UInt32)
 10125  		v1.AuxInt = ssa.Int32ToAuxInt(off)
 10126  		v1.Aux = ssa.SymToAux(sym)
 10127  		v1.AddArg2(ptr, mem)
 10128  		v0.AddArg(v1)
 10129  		return true
 10130  	}
 10131  	// match: (MOVWBR x:(MOVWZloadidx [off] {sym} ptr idx mem))
 10132  	// cond: x.Uses == 1
 10133  	// result: @x.Block (MOVWZreg (MOVWBRloadidx [off] {sym} ptr idx mem))
 10134  	for {
 10135  		x := v_0
 10136  		if x.Op != ssaop.OpS390XMOVWZloadidx {
 10137  			break
 10138  		}
 10139  		off := ssa.AuxIntToInt32(x.AuxInt)
 10140  		sym := ssa.AuxToSym(x.Aux)
 10141  		mem := x.Args[2]
 10142  		ptr := x.Args[0]
 10143  		idx := x.Args[1]
 10144  		if !(x.Uses == 1) {
 10145  			break
 10146  		}
 10147  		b = x.Block
 10148  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWZreg, typ.UInt64)
 10149  		v.CopyOf(v0)
 10150  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWBRloadidx, typ.Int32)
 10151  		v1.AuxInt = ssa.Int32ToAuxInt(off)
 10152  		v1.Aux = ssa.SymToAux(sym)
 10153  		v1.AddArg3(ptr, idx, mem)
 10154  		v0.AddArg(v1)
 10155  		return true
 10156  	}
 10157  	return false
 10158  }
 10159  func rewriteValue_OpS390XMOVWZload(v *ssa.Value) bool {
 10160  	v_1 := v.Args[1]
 10161  	v_0 := v.Args[0]
 10162  	// match: (MOVWZload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10163  	// cond: ssa.IsSamePtr(ptr1, ptr2)
 10164  	// result: (MOVWZreg x)
 10165  	for {
 10166  		off := ssa.AuxIntToInt32(v.AuxInt)
 10167  		sym := ssa.AuxToSym(v.Aux)
 10168  		ptr1 := v_0
 10169  		if v_1.Op != ssaop.OpS390XMOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
 10170  			break
 10171  		}
 10172  		x := v_1.Args[1]
 10173  		ptr2 := v_1.Args[0]
 10174  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
 10175  			break
 10176  		}
 10177  		v.Reset(ssaop.OpS390XMOVWZreg)
 10178  		v.AddArg(x)
 10179  		return true
 10180  	}
 10181  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] ptr) mem)
 10182  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
 10183  	// result: (MOVWZload [off1+off2] {sym} ptr mem)
 10184  	for {
 10185  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10186  		sym := ssa.AuxToSym(v.Aux)
 10187  		if v_0.Op != ssaop.OpS390XADDconst {
 10188  			break
 10189  		}
 10190  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
 10191  		ptr := v_0.Args[0]
 10192  		mem := v_1
 10193  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
 10194  			break
 10195  		}
 10196  		v.Reset(ssaop.OpS390XMOVWZload)
 10197  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10198  		v.Aux = ssa.SymToAux(sym)
 10199  		v.AddArg2(ptr, mem)
 10200  		return true
 10201  	}
 10202  	// match: (MOVWZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10203  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10204  	// result: (MOVWZload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
 10205  	for {
 10206  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10207  		sym1 := ssa.AuxToSym(v.Aux)
 10208  		if v_0.Op != ssaop.OpS390XMOVDaddr {
 10209  			break
 10210  		}
 10211  		t := v_0.Type
 10212  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
 10213  		sym2 := ssa.AuxToSym(v_0.Aux)
 10214  		base := v_0.Args[0]
 10215  		mem := v_1
 10216  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10217  			break
 10218  		}
 10219  		v.Reset(ssaop.OpS390XMOVWZload)
 10220  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10221  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10222  		v.AddArg2(base, mem)
 10223  		return true
 10224  	}
 10225  	return false
 10226  }
 10227  func rewriteValue_OpS390XMOVWZreg(v *ssa.Value) bool {
 10228  	v_0 := v.Args[0]
 10229  	b := v.Block
 10230  	// match: (MOVWZreg e:(MOVBZreg x))
 10231  	// cond: ssa.ClobberIfDead(e)
 10232  	// result: (MOVBZreg x)
 10233  	for {
 10234  		e := v_0
 10235  		if e.Op != ssaop.OpS390XMOVBZreg {
 10236  			break
 10237  		}
 10238  		x := e.Args[0]
 10239  		if !(ssa.ClobberIfDead(e)) {
 10240  			break
 10241  		}
 10242  		v.Reset(ssaop.OpS390XMOVBZreg)
 10243  		v.AddArg(x)
 10244  		return true
 10245  	}
 10246  	// match: (MOVWZreg e:(MOVHZreg x))
 10247  	// cond: ssa.ClobberIfDead(e)
 10248  	// result: (MOVHZreg x)
 10249  	for {
 10250  		e := v_0
 10251  		if e.Op != ssaop.OpS390XMOVHZreg {
 10252  			break
 10253  		}
 10254  		x := e.Args[0]
 10255  		if !(ssa.ClobberIfDead(e)) {
 10256  			break
 10257  		}
 10258  		v.Reset(ssaop.OpS390XMOVHZreg)
 10259  		v.AddArg(x)
 10260  		return true
 10261  	}
 10262  	// match: (MOVWZreg e:(MOVWreg x))
 10263  	// cond: ssa.ClobberIfDead(e)
 10264  	// result: (MOVWZreg x)
 10265  	for {
 10266  		e := v_0
 10267  		if e.Op != ssaop.OpS390XMOVWreg {
 10268  			break
 10269  		}
 10270  		x := e.Args[0]
 10271  		if !(ssa.ClobberIfDead(e)) {
 10272  			break
 10273  		}
 10274  		v.Reset(ssaop.OpS390XMOVWZreg)
 10275  		v.AddArg(x)
 10276  		return true
 10277  	}
 10278  	// match: (MOVWZreg e:(MOVWZreg x))
 10279  	// cond: ssa.ClobberIfDead(e)
 10280  	// result: (MOVWZreg x)
 10281  	for {
 10282  		e := v_0
 10283  		if e.Op != ssaop.OpS390XMOVWZreg {
 10284  			break
 10285  		}
 10286  		x := e.Args[0]
 10287  		if !(ssa.ClobberIfDead(e)) {
 10288  			break
 10289  		}
 10290  		v.Reset(ssaop.OpS390XMOVWZreg)
 10291  		v.AddArg(x)
 10292  		return true
 10293  	}
 10294  	// match: (MOVWZreg x:(MOVBZload _ _))
 10295  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10296  	// result: x
 10297  	for {
 10298  		x := v_0
 10299  		if x.Op != ssaop.OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10300  			break
 10301  		}
 10302  		v.CopyOf(x)
 10303  		return true
 10304  	}
 10305  	// match: (MOVWZreg x:(MOVHZload _ _))
 10306  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10307  	// result: x
 10308  	for {
 10309  		x := v_0
 10310  		if x.Op != ssaop.OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10311  			break
 10312  		}
 10313  		v.CopyOf(x)
 10314  		return true
 10315  	}
 10316  	// match: (MOVWZreg x:(MOVWZload _ _))
 10317  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 4)
 10318  	// result: x
 10319  	for {
 10320  		x := v_0
 10321  		if x.Op != ssaop.OpS390XMOVWZload || !(!x.Type.IsSigned() || x.Type.Size() > 4) {
 10322  			break
 10323  		}
 10324  		v.CopyOf(x)
 10325  		return true
 10326  	}
 10327  	// match: (MOVWZreg <t> x:(MOVWload [o] {s} p mem))
 10328  	// cond: x.Uses == 1 && ssa.Clobber(x)
 10329  	// result: @x.Block (MOVWZload <t> [o] {s} p mem)
 10330  	for {
 10331  		t := v.Type
 10332  		x := v_0
 10333  		if x.Op != ssaop.OpS390XMOVWload {
 10334  			break
 10335  		}
 10336  		o := ssa.AuxIntToInt32(x.AuxInt)
 10337  		s := ssa.AuxToSym(x.Aux)
 10338  		mem := x.Args[1]
 10339  		p := x.Args[0]
 10340  		if !(x.Uses == 1 && ssa.Clobber(x)) {
 10341  			break
 10342  		}
 10343  		b = x.Block
 10344  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVWZload, t)
 10345  		v.CopyOf(v0)
 10346  		v0.AuxInt = ssa.Int32ToAuxInt(o)
 10347  		v0.Aux = ssa.SymToAux(s)
 10348  		v0.AddArg2(p, mem)
 10349  		return true
 10350  	}
 10351  	// match: (MOVWZreg x:(Arg <t>))
 10352  	// cond: !t.IsSigned() && t.Size() <= 4
 10353  	// result: x
 10354  	for {
 10355  		x := v_0
 10356  		if x.Op != ssaop.OpArg {
 10357  			break
 10358  		}
 10359  		t := x.Type
 10360  		if !(!t.IsSigned() && t.Size() <= 4) {
 10361  			break
 10362  		}
 10363  		v.CopyOf(x)
 10364  		return true
 10365  	}
 10366  	// match: (MOVWZreg (MOVDconst [c]))
 10367  	// result: (MOVDconst [int64(uint32(c))])
 10368  	for {
 10369  		if v_0.Op != ssaop.OpS390XMOVDconst {
 10370  			break
 10371  		}
 10372  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10373  		v.Reset(ssaop.OpS390XMOVDconst)
 10374  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint32(c)))
 10375  		return true
 10376  	}
 10377  	// match: (MOVWZreg (RISBGZ x {r}))
 10378  	// cond: r.OutMerge(0xffffffff) != nil
 10379  	// result: (RISBGZ x {*r.OutMerge(0xffffffff)})
 10380  	for {
 10381  		if v_0.Op != ssaop.OpS390XRISBGZ {
 10382  			break
 10383  		}
 10384  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
 10385  		x := v_0.Args[0]
 10386  		if !(r.OutMerge(0xffffffff) != nil) {
 10387  			break
 10388  		}
 10389  		v.Reset(ssaop.OpS390XRISBGZ)
 10390  		v.Aux = ssa.S390xRotateParamsToAux(*r.OutMerge(0xffffffff))
 10391  		v.AddArg(x)
 10392  		return true
 10393  	}
 10394  	return false
 10395  }
 10396  func rewriteValue_OpS390XMOVWload(v *ssa.Value) bool {
 10397  	v_1 := v.Args[1]
 10398  	v_0 := v.Args[0]
 10399  	// match: (MOVWload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10400  	// cond: ssa.IsSamePtr(ptr1, ptr2)
 10401  	// result: (MOVWreg x)
 10402  	for {
 10403  		off := ssa.AuxIntToInt32(v.AuxInt)
 10404  		sym := ssa.AuxToSym(v.Aux)
 10405  		ptr1 := v_0
 10406  		if v_1.Op != ssaop.OpS390XMOVWstore || ssa.AuxIntToInt32(v_1.AuxInt) != off || ssa.AuxToSym(v_1.Aux) != sym {
 10407  			break
 10408  		}
 10409  		x := v_1.Args[1]
 10410  		ptr2 := v_1.Args[0]
 10411  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
 10412  			break
 10413  		}
 10414  		v.Reset(ssaop.OpS390XMOVWreg)
 10415  		v.AddArg(x)
 10416  		return true
 10417  	}
 10418  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10419  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
 10420  	// result: (MOVWload [off1+off2] {sym} ptr mem)
 10421  	for {
 10422  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10423  		sym := ssa.AuxToSym(v.Aux)
 10424  		if v_0.Op != ssaop.OpS390XADDconst {
 10425  			break
 10426  		}
 10427  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
 10428  		ptr := v_0.Args[0]
 10429  		mem := v_1
 10430  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
 10431  			break
 10432  		}
 10433  		v.Reset(ssaop.OpS390XMOVWload)
 10434  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10435  		v.Aux = ssa.SymToAux(sym)
 10436  		v.AddArg2(ptr, mem)
 10437  		return true
 10438  	}
 10439  	// match: (MOVWload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10440  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10441  	// result: (MOVWload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
 10442  	for {
 10443  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10444  		sym1 := ssa.AuxToSym(v.Aux)
 10445  		if v_0.Op != ssaop.OpS390XMOVDaddr {
 10446  			break
 10447  		}
 10448  		t := v_0.Type
 10449  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
 10450  		sym2 := ssa.AuxToSym(v_0.Aux)
 10451  		base := v_0.Args[0]
 10452  		mem := v_1
 10453  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10454  			break
 10455  		}
 10456  		v.Reset(ssaop.OpS390XMOVWload)
 10457  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10458  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10459  		v.AddArg2(base, mem)
 10460  		return true
 10461  	}
 10462  	return false
 10463  }
 10464  func rewriteValue_OpS390XMOVWreg(v *ssa.Value) bool {
 10465  	v_0 := v.Args[0]
 10466  	b := v.Block
 10467  	// match: (MOVWreg e:(MOVBreg x))
 10468  	// cond: ssa.ClobberIfDead(e)
 10469  	// result: (MOVBreg x)
 10470  	for {
 10471  		e := v_0
 10472  		if e.Op != ssaop.OpS390XMOVBreg {
 10473  			break
 10474  		}
 10475  		x := e.Args[0]
 10476  		if !(ssa.ClobberIfDead(e)) {
 10477  			break
 10478  		}
 10479  		v.Reset(ssaop.OpS390XMOVBreg)
 10480  		v.AddArg(x)
 10481  		return true
 10482  	}
 10483  	// match: (MOVWreg e:(MOVHreg x))
 10484  	// cond: ssa.ClobberIfDead(e)
 10485  	// result: (MOVHreg x)
 10486  	for {
 10487  		e := v_0
 10488  		if e.Op != ssaop.OpS390XMOVHreg {
 10489  			break
 10490  		}
 10491  		x := e.Args[0]
 10492  		if !(ssa.ClobberIfDead(e)) {
 10493  			break
 10494  		}
 10495  		v.Reset(ssaop.OpS390XMOVHreg)
 10496  		v.AddArg(x)
 10497  		return true
 10498  	}
 10499  	// match: (MOVWreg e:(MOVWreg x))
 10500  	// cond: ssa.ClobberIfDead(e)
 10501  	// result: (MOVWreg x)
 10502  	for {
 10503  		e := v_0
 10504  		if e.Op != ssaop.OpS390XMOVWreg {
 10505  			break
 10506  		}
 10507  		x := e.Args[0]
 10508  		if !(ssa.ClobberIfDead(e)) {
 10509  			break
 10510  		}
 10511  		v.Reset(ssaop.OpS390XMOVWreg)
 10512  		v.AddArg(x)
 10513  		return true
 10514  	}
 10515  	// match: (MOVWreg e:(MOVWZreg x))
 10516  	// cond: ssa.ClobberIfDead(e)
 10517  	// result: (MOVWreg x)
 10518  	for {
 10519  		e := v_0
 10520  		if e.Op != ssaop.OpS390XMOVWZreg {
 10521  			break
 10522  		}
 10523  		x := e.Args[0]
 10524  		if !(ssa.ClobberIfDead(e)) {
 10525  			break
 10526  		}
 10527  		v.Reset(ssaop.OpS390XMOVWreg)
 10528  		v.AddArg(x)
 10529  		return true
 10530  	}
 10531  	// match: (MOVWreg x:(MOVBload _ _))
 10532  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10533  	// result: x
 10534  	for {
 10535  		x := v_0
 10536  		if x.Op != ssaop.OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10537  			break
 10538  		}
 10539  		v.CopyOf(x)
 10540  		return true
 10541  	}
 10542  	// match: (MOVWreg x:(MOVHload _ _))
 10543  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10544  	// result: x
 10545  	for {
 10546  		x := v_0
 10547  		if x.Op != ssaop.OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10548  			break
 10549  		}
 10550  		v.CopyOf(x)
 10551  		return true
 10552  	}
 10553  	// match: (MOVWreg x:(MOVWload _ _))
 10554  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10555  	// result: x
 10556  	for {
 10557  		x := v_0
 10558  		if x.Op != ssaop.OpS390XMOVWload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10559  			break
 10560  		}
 10561  		v.CopyOf(x)
 10562  		return true
 10563  	}
 10564  	// match: (MOVWreg x:(MOVBZload _ _))
 10565  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10566  	// result: x
 10567  	for {
 10568  		x := v_0
 10569  		if x.Op != ssaop.OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10570  			break
 10571  		}
 10572  		v.CopyOf(x)
 10573  		return true
 10574  	}
 10575  	// match: (MOVWreg x:(MOVHZload _ _))
 10576  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10577  	// result: x
 10578  	for {
 10579  		x := v_0
 10580  		if x.Op != ssaop.OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10581  			break
 10582  		}
 10583  		v.CopyOf(x)
 10584  		return true
 10585  	}
 10586  	// match: (MOVWreg <t> x:(MOVWZload [o] {s} p mem))
 10587  	// cond: x.Uses == 1 && ssa.Clobber(x)
 10588  	// result: @x.Block (MOVWload <t> [o] {s} p mem)
 10589  	for {
 10590  		t := v.Type
 10591  		x := v_0
 10592  		if x.Op != ssaop.OpS390XMOVWZload {
 10593  			break
 10594  		}
 10595  		o := ssa.AuxIntToInt32(x.AuxInt)
 10596  		s := ssa.AuxToSym(x.Aux)
 10597  		mem := x.Args[1]
 10598  		p := x.Args[0]
 10599  		if !(x.Uses == 1 && ssa.Clobber(x)) {
 10600  			break
 10601  		}
 10602  		b = x.Block
 10603  		v0 := b.NewValue0(x.Pos, ssaop.OpS390XMOVWload, t)
 10604  		v.CopyOf(v0)
 10605  		v0.AuxInt = ssa.Int32ToAuxInt(o)
 10606  		v0.Aux = ssa.SymToAux(s)
 10607  		v0.AddArg2(p, mem)
 10608  		return true
 10609  	}
 10610  	// match: (MOVWreg x:(Arg <t>))
 10611  	// cond: t.IsSigned() && t.Size() <= 4
 10612  	// result: x
 10613  	for {
 10614  		x := v_0
 10615  		if x.Op != ssaop.OpArg {
 10616  			break
 10617  		}
 10618  		t := x.Type
 10619  		if !(t.IsSigned() && t.Size() <= 4) {
 10620  			break
 10621  		}
 10622  		v.CopyOf(x)
 10623  		return true
 10624  	}
 10625  	// match: (MOVWreg (MOVDconst [c]))
 10626  	// result: (MOVDconst [int64(int32(c))])
 10627  	for {
 10628  		if v_0.Op != ssaop.OpS390XMOVDconst {
 10629  			break
 10630  		}
 10631  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 10632  		v.Reset(ssaop.OpS390XMOVDconst)
 10633  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(c)))
 10634  		return true
 10635  	}
 10636  	return false
 10637  }
 10638  func rewriteValue_OpS390XMOVWstore(v *ssa.Value) bool {
 10639  	v_2 := v.Args[2]
 10640  	v_1 := v.Args[1]
 10641  	v_0 := v.Args[0]
 10642  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 10643  	// result: (MOVWstore [off] {sym} ptr x mem)
 10644  	for {
 10645  		off := ssa.AuxIntToInt32(v.AuxInt)
 10646  		sym := ssa.AuxToSym(v.Aux)
 10647  		ptr := v_0
 10648  		if v_1.Op != ssaop.OpS390XMOVWreg {
 10649  			break
 10650  		}
 10651  		x := v_1.Args[0]
 10652  		mem := v_2
 10653  		v.Reset(ssaop.OpS390XMOVWstore)
 10654  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10655  		v.Aux = ssa.SymToAux(sym)
 10656  		v.AddArg3(ptr, x, mem)
 10657  		return true
 10658  	}
 10659  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 10660  	// result: (MOVWstore [off] {sym} ptr x mem)
 10661  	for {
 10662  		off := ssa.AuxIntToInt32(v.AuxInt)
 10663  		sym := ssa.AuxToSym(v.Aux)
 10664  		ptr := v_0
 10665  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 10666  			break
 10667  		}
 10668  		x := v_1.Args[0]
 10669  		mem := v_2
 10670  		v.Reset(ssaop.OpS390XMOVWstore)
 10671  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10672  		v.Aux = ssa.SymToAux(sym)
 10673  		v.AddArg3(ptr, x, mem)
 10674  		return true
 10675  	}
 10676  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10677  	// cond: ssa.Is20Bit(int64(off1)+int64(off2))
 10678  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
 10679  	for {
 10680  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10681  		sym := ssa.AuxToSym(v.Aux)
 10682  		if v_0.Op != ssaop.OpS390XADDconst {
 10683  			break
 10684  		}
 10685  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
 10686  		ptr := v_0.Args[0]
 10687  		val := v_1
 10688  		mem := v_2
 10689  		if !(ssa.Is20Bit(int64(off1) + int64(off2))) {
 10690  			break
 10691  		}
 10692  		v.Reset(ssaop.OpS390XMOVWstore)
 10693  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10694  		v.Aux = ssa.SymToAux(sym)
 10695  		v.AddArg3(ptr, val, mem)
 10696  		return true
 10697  	}
 10698  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [c]) mem)
 10699  	// cond: ssa.Is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != ssaop.OpSB
 10700  	// result: (MOVWstoreconst [ssa.MakeValAndOff(int32(c),off)] {sym} ptr mem)
 10701  	for {
 10702  		off := ssa.AuxIntToInt32(v.AuxInt)
 10703  		sym := ssa.AuxToSym(v.Aux)
 10704  		ptr := v_0
 10705  		if v_1.Op != ssaop.OpS390XMOVDconst {
 10706  			break
 10707  		}
 10708  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10709  		mem := v_2
 10710  		if !(ssa.Is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != ssaop.OpSB) {
 10711  			break
 10712  		}
 10713  		v.Reset(ssaop.OpS390XMOVWstoreconst)
 10714  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(c), off))
 10715  		v.Aux = ssa.SymToAux(sym)
 10716  		v.AddArg2(ptr, mem)
 10717  		return true
 10718  	}
 10719  	// match: (MOVWstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10720  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10721  	// result: (MOVWstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
 10722  	for {
 10723  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 10724  		sym1 := ssa.AuxToSym(v.Aux)
 10725  		if v_0.Op != ssaop.OpS390XMOVDaddr {
 10726  			break
 10727  		}
 10728  		t := v_0.Type
 10729  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
 10730  		sym2 := ssa.AuxToSym(v_0.Aux)
 10731  		base := v_0.Args[0]
 10732  		val := v_1
 10733  		mem := v_2
 10734  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10735  			break
 10736  		}
 10737  		v.Reset(ssaop.OpS390XMOVWstore)
 10738  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 10739  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10740  		v.AddArg3(base, val, mem)
 10741  		return true
 10742  	}
 10743  	// match: (MOVWstore [i] {s} p w1 x:(MOVWstore [i-4] {s} p w0 mem))
 10744  	// cond: p.Op != ssaop.OpSB && x.Uses == 1 && ssa.Is20Bit(int64(i)-4) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
 10745  	// result: (STM2 [i-4] {s} p w0 w1 mem)
 10746  	for {
 10747  		i := ssa.AuxIntToInt32(v.AuxInt)
 10748  		s := ssa.AuxToSym(v.Aux)
 10749  		p := v_0
 10750  		w1 := v_1
 10751  		x := v_2
 10752  		if x.Op != ssaop.OpS390XMOVWstore || ssa.AuxIntToInt32(x.AuxInt) != i-4 || ssa.AuxToSym(x.Aux) != s {
 10753  			break
 10754  		}
 10755  		mem := x.Args[2]
 10756  		if p != x.Args[0] {
 10757  			break
 10758  		}
 10759  		w0 := x.Args[1]
 10760  		if !(p.Op != ssaop.OpSB && x.Uses == 1 && ssa.Is20Bit(int64(i)-4) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
 10761  			break
 10762  		}
 10763  		v.Reset(ssaop.OpS390XSTM2)
 10764  		v.AuxInt = ssa.Int32ToAuxInt(i - 4)
 10765  		v.Aux = ssa.SymToAux(s)
 10766  		v.AddArg4(p, w0, w1, mem)
 10767  		return true
 10768  	}
 10769  	// match: (MOVWstore [i] {s} p w2 x:(STM2 [i-8] {s} p w0 w1 mem))
 10770  	// cond: x.Uses == 1 && ssa.Is20Bit(int64(i)-8) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
 10771  	// result: (STM3 [i-8] {s} p w0 w1 w2 mem)
 10772  	for {
 10773  		i := ssa.AuxIntToInt32(v.AuxInt)
 10774  		s := ssa.AuxToSym(v.Aux)
 10775  		p := v_0
 10776  		w2 := v_1
 10777  		x := v_2
 10778  		if x.Op != ssaop.OpS390XSTM2 || ssa.AuxIntToInt32(x.AuxInt) != i-8 || ssa.AuxToSym(x.Aux) != s {
 10779  			break
 10780  		}
 10781  		mem := x.Args[3]
 10782  		if p != x.Args[0] {
 10783  			break
 10784  		}
 10785  		w0 := x.Args[1]
 10786  		w1 := x.Args[2]
 10787  		if !(x.Uses == 1 && ssa.Is20Bit(int64(i)-8) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
 10788  			break
 10789  		}
 10790  		v.Reset(ssaop.OpS390XSTM3)
 10791  		v.AuxInt = ssa.Int32ToAuxInt(i - 8)
 10792  		v.Aux = ssa.SymToAux(s)
 10793  		v.AddArg5(p, w0, w1, w2, mem)
 10794  		return true
 10795  	}
 10796  	// match: (MOVWstore [i] {s} p w3 x:(STM3 [i-12] {s} p w0 w1 w2 mem))
 10797  	// cond: x.Uses == 1 && ssa.Is20Bit(int64(i)-12) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
 10798  	// result: (STM4 [i-12] {s} p w0 w1 w2 w3 mem)
 10799  	for {
 10800  		i := ssa.AuxIntToInt32(v.AuxInt)
 10801  		s := ssa.AuxToSym(v.Aux)
 10802  		p := v_0
 10803  		w3 := v_1
 10804  		x := v_2
 10805  		if x.Op != ssaop.OpS390XSTM3 || ssa.AuxIntToInt32(x.AuxInt) != i-12 || ssa.AuxToSym(x.Aux) != s {
 10806  			break
 10807  		}
 10808  		mem := x.Args[4]
 10809  		if p != x.Args[0] {
 10810  			break
 10811  		}
 10812  		w0 := x.Args[1]
 10813  		w1 := x.Args[2]
 10814  		w2 := x.Args[3]
 10815  		if !(x.Uses == 1 && ssa.Is20Bit(int64(i)-12) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
 10816  			break
 10817  		}
 10818  		v.Reset(ssaop.OpS390XSTM4)
 10819  		v.AuxInt = ssa.Int32ToAuxInt(i - 12)
 10820  		v.Aux = ssa.SymToAux(s)
 10821  		v.AddArg6(p, w0, w1, w2, w3, mem)
 10822  		return true
 10823  	}
 10824  	// match: (MOVWstore [off] {sym} ptr r:(MOVWBR x) mem)
 10825  	// cond: r.Uses == 1
 10826  	// result: (MOVWBRstore [off] {sym} ptr x mem)
 10827  	for {
 10828  		off := ssa.AuxIntToInt32(v.AuxInt)
 10829  		sym := ssa.AuxToSym(v.Aux)
 10830  		ptr := v_0
 10831  		r := v_1
 10832  		if r.Op != ssaop.OpS390XMOVWBR {
 10833  			break
 10834  		}
 10835  		x := r.Args[0]
 10836  		mem := v_2
 10837  		if !(r.Uses == 1) {
 10838  			break
 10839  		}
 10840  		v.Reset(ssaop.OpS390XMOVWBRstore)
 10841  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10842  		v.Aux = ssa.SymToAux(sym)
 10843  		v.AddArg3(ptr, x, mem)
 10844  		return true
 10845  	}
 10846  	return false
 10847  }
 10848  func rewriteValue_OpS390XMOVWstoreconst(v *ssa.Value) bool {
 10849  	v_1 := v.Args[1]
 10850  	v_0 := v.Args[0]
 10851  	// match: (MOVWstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10852  	// cond: isU12Bit(sc.Off64()+int64(off))
 10853  	// result: (MOVWstoreconst [sc.AddOffset32(off)] {s} ptr mem)
 10854  	for {
 10855  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
 10856  		s := ssa.AuxToSym(v.Aux)
 10857  		if v_0.Op != ssaop.OpS390XADDconst {
 10858  			break
 10859  		}
 10860  		off := ssa.AuxIntToInt32(v_0.AuxInt)
 10861  		ptr := v_0.Args[0]
 10862  		mem := v_1
 10863  		if !(isU12Bit(sc.Off64() + int64(off))) {
 10864  			break
 10865  		}
 10866  		v.Reset(ssaop.OpS390XMOVWstoreconst)
 10867  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
 10868  		v.Aux = ssa.SymToAux(s)
 10869  		v.AddArg2(ptr, mem)
 10870  		return true
 10871  	}
 10872  	// match: (MOVWstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10873  	// cond: ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)
 10874  	// result: (MOVWstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
 10875  	for {
 10876  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
 10877  		sym1 := ssa.AuxToSym(v.Aux)
 10878  		if v_0.Op != ssaop.OpS390XMOVDaddr {
 10879  			break
 10880  		}
 10881  		off := ssa.AuxIntToInt32(v_0.AuxInt)
 10882  		sym2 := ssa.AuxToSym(v_0.Aux)
 10883  		ptr := v_0.Args[0]
 10884  		mem := v_1
 10885  		if !(ptr.Op != ssaop.OpSB && ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off)) {
 10886  			break
 10887  		}
 10888  		v.Reset(ssaop.OpS390XMOVWstoreconst)
 10889  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
 10890  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
 10891  		v.AddArg2(ptr, mem)
 10892  		return true
 10893  	}
 10894  	return false
 10895  }
 10896  func rewriteValue_OpS390XMOVWstoreidx(v *ssa.Value) bool {
 10897  	v_3 := v.Args[3]
 10898  	v_2 := v.Args[2]
 10899  	v_1 := v.Args[1]
 10900  	v_0 := v.Args[0]
 10901  	// match: (MOVWstoreidx [off] {sym} ptr idx r:(MOVWBR x) mem)
 10902  	// cond: r.Uses == 1
 10903  	// result: (MOVWBRstoreidx [off] {sym} ptr idx x mem)
 10904  	for {
 10905  		off := ssa.AuxIntToInt32(v.AuxInt)
 10906  		sym := ssa.AuxToSym(v.Aux)
 10907  		ptr := v_0
 10908  		idx := v_1
 10909  		r := v_2
 10910  		if r.Op != ssaop.OpS390XMOVWBR {
 10911  			break
 10912  		}
 10913  		x := r.Args[0]
 10914  		mem := v_3
 10915  		if !(r.Uses == 1) {
 10916  			break
 10917  		}
 10918  		v.Reset(ssaop.OpS390XMOVWBRstoreidx)
 10919  		v.AuxInt = ssa.Int32ToAuxInt(off)
 10920  		v.Aux = ssa.SymToAux(sym)
 10921  		v.AddArg4(ptr, idx, x, mem)
 10922  		return true
 10923  	}
 10924  	return false
 10925  }
 10926  func rewriteValue_OpS390XMULLD(v *ssa.Value) bool {
 10927  	v_1 := v.Args[1]
 10928  	v_0 := v.Args[0]
 10929  	// match: (MULLD x (MOVDconst [c]))
 10930  	// cond: ssa.Is32Bit(c)
 10931  	// result: (MULLDconst [int32(c)] x)
 10932  	for {
 10933  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10934  			x := v_0
 10935  			if v_1.Op != ssaop.OpS390XMOVDconst {
 10936  				continue
 10937  			}
 10938  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 10939  			if !(ssa.Is32Bit(c)) {
 10940  				continue
 10941  			}
 10942  			v.Reset(ssaop.OpS390XMULLDconst)
 10943  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10944  			v.AddArg(x)
 10945  			return true
 10946  		}
 10947  		break
 10948  	}
 10949  	// match: (MULLD <t> x g:(MOVDload [off] {sym} ptr mem))
 10950  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 10951  	// result: (MULLDload <t> [off] {sym} x ptr mem)
 10952  	for {
 10953  		t := v.Type
 10954  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10955  			x := v_0
 10956  			g := v_1
 10957  			if g.Op != ssaop.OpS390XMOVDload {
 10958  				continue
 10959  			}
 10960  			off := ssa.AuxIntToInt32(g.AuxInt)
 10961  			sym := ssa.AuxToSym(g.Aux)
 10962  			mem := g.Args[1]
 10963  			ptr := g.Args[0]
 10964  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 10965  				continue
 10966  			}
 10967  			v.Reset(ssaop.OpS390XMULLDload)
 10968  			v.Type = t
 10969  			v.AuxInt = ssa.Int32ToAuxInt(off)
 10970  			v.Aux = ssa.SymToAux(sym)
 10971  			v.AddArg3(x, ptr, mem)
 10972  			return true
 10973  		}
 10974  		break
 10975  	}
 10976  	return false
 10977  }
 10978  func rewriteValue_OpS390XMULLDconst(v *ssa.Value) bool {
 10979  	v_0 := v.Args[0]
 10980  	b := v.Block
 10981  	// match: (MULLDconst <t> x [c])
 10982  	// cond: ssa.IsPowerOfTwo(c&(c-1))
 10983  	// result: (ADD (SLDconst <t> x [uint8(ssa.Log32(c&(c-1)))]) (SLDconst <t> x [uint8(ssa.Log32(c&^(c-1)))]))
 10984  	for {
 10985  		t := v.Type
 10986  		c := ssa.AuxIntToInt32(v.AuxInt)
 10987  		x := v_0
 10988  		if !(ssa.IsPowerOfTwo(c & (c - 1))) {
 10989  			break
 10990  		}
 10991  		v.Reset(ssaop.OpS390XADD)
 10992  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLDconst, t)
 10993  		v0.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c & (c - 1))))
 10994  		v0.AddArg(x)
 10995  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSLDconst, t)
 10996  		v1.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c &^ (c - 1))))
 10997  		v1.AddArg(x)
 10998  		v.AddArg2(v0, v1)
 10999  		return true
 11000  	}
 11001  	// match: (MULLDconst <t> x [c])
 11002  	// cond: ssa.IsPowerOfTwo(c+(c&^(c-1)))
 11003  	// result: (SUB (SLDconst <t> x [uint8(ssa.Log32(c+(c&^(c-1))))]) (SLDconst <t> x [uint8(ssa.Log32(c&^(c-1)))]))
 11004  	for {
 11005  		t := v.Type
 11006  		c := ssa.AuxIntToInt32(v.AuxInt)
 11007  		x := v_0
 11008  		if !(ssa.IsPowerOfTwo(c + (c &^ (c - 1)))) {
 11009  			break
 11010  		}
 11011  		v.Reset(ssaop.OpS390XSUB)
 11012  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLDconst, t)
 11013  		v0.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c + (c &^ (c - 1)))))
 11014  		v0.AddArg(x)
 11015  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSLDconst, t)
 11016  		v1.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c &^ (c - 1))))
 11017  		v1.AddArg(x)
 11018  		v.AddArg2(v0, v1)
 11019  		return true
 11020  	}
 11021  	// match: (MULLDconst <t> x [c])
 11022  	// cond: ssa.IsPowerOfTwo(-c+(-c&^(-c-1)))
 11023  	// result: (SUB (SLDconst <t> x [uint8(ssa.Log32(-c&^(-c-1)))]) (SLDconst <t> x [uint8(ssa.Log32(-c+(-c&^(-c-1))))]))
 11024  	for {
 11025  		t := v.Type
 11026  		c := ssa.AuxIntToInt32(v.AuxInt)
 11027  		x := v_0
 11028  		if !(ssa.IsPowerOfTwo(-c + (-c &^ (-c - 1)))) {
 11029  			break
 11030  		}
 11031  		v.Reset(ssaop.OpS390XSUB)
 11032  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLDconst, t)
 11033  		v0.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(-c &^ (-c - 1))))
 11034  		v0.AddArg(x)
 11035  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSLDconst, t)
 11036  		v1.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(-c + (-c &^ (-c - 1)))))
 11037  		v1.AddArg(x)
 11038  		v.AddArg2(v0, v1)
 11039  		return true
 11040  	}
 11041  	// match: (MULLDconst [c] (MOVDconst [d]))
 11042  	// result: (MOVDconst [int64(c)*d])
 11043  	for {
 11044  		c := ssa.AuxIntToInt32(v.AuxInt)
 11045  		if v_0.Op != ssaop.OpS390XMOVDconst {
 11046  			break
 11047  		}
 11048  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 11049  		v.Reset(ssaop.OpS390XMOVDconst)
 11050  		v.AuxInt = ssa.Int64ToAuxInt(int64(c) * d)
 11051  		return true
 11052  	}
 11053  	return false
 11054  }
 11055  func rewriteValue_OpS390XMULLDload(v *ssa.Value) bool {
 11056  	v_2 := v.Args[2]
 11057  	v_1 := v.Args[1]
 11058  	v_0 := v.Args[0]
 11059  	b := v.Block
 11060  	// match: (MULLDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11061  	// cond: ssa.IsSamePtr(ptr1, ptr2)
 11062  	// result: (MULLD x (LGDR <t> y))
 11063  	for {
 11064  		t := v.Type
 11065  		off := ssa.AuxIntToInt32(v.AuxInt)
 11066  		sym := ssa.AuxToSym(v.Aux)
 11067  		x := v_0
 11068  		ptr1 := v_1
 11069  		if v_2.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_2.AuxInt) != off || ssa.AuxToSym(v_2.Aux) != sym {
 11070  			break
 11071  		}
 11072  		y := v_2.Args[1]
 11073  		ptr2 := v_2.Args[0]
 11074  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
 11075  			break
 11076  		}
 11077  		v.Reset(ssaop.OpS390XMULLD)
 11078  		v0 := b.NewValue0(v_2.Pos, ssaop.OpS390XLGDR, t)
 11079  		v0.AddArg(y)
 11080  		v.AddArg2(x, v0)
 11081  		return true
 11082  	}
 11083  	// match: (MULLDload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11084  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 11085  	// result: (MULLDload [off1+off2] {sym} x ptr mem)
 11086  	for {
 11087  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11088  		sym := ssa.AuxToSym(v.Aux)
 11089  		x := v_0
 11090  		if v_1.Op != ssaop.OpS390XADDconst {
 11091  			break
 11092  		}
 11093  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11094  		ptr := v_1.Args[0]
 11095  		mem := v_2
 11096  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 11097  			break
 11098  		}
 11099  		v.Reset(ssaop.OpS390XMULLDload)
 11100  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 11101  		v.Aux = ssa.SymToAux(sym)
 11102  		v.AddArg3(x, ptr, mem)
 11103  		return true
 11104  	}
 11105  	// match: (MULLDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11106  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 11107  	// result: (MULLDload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 11108  	for {
 11109  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 11110  		s1 := ssa.AuxToSym(v.Aux)
 11111  		x := v_0
 11112  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 11113  			break
 11114  		}
 11115  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11116  		s2 := ssa.AuxToSym(v_1.Aux)
 11117  		ptr := v_1.Args[0]
 11118  		mem := v_2
 11119  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 11120  			break
 11121  		}
 11122  		v.Reset(ssaop.OpS390XMULLDload)
 11123  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 11124  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 11125  		v.AddArg3(x, ptr, mem)
 11126  		return true
 11127  	}
 11128  	return false
 11129  }
 11130  func rewriteValue_OpS390XMULLW(v *ssa.Value) bool {
 11131  	v_1 := v.Args[1]
 11132  	v_0 := v.Args[0]
 11133  	// match: (MULLW x (MOVDconst [c]))
 11134  	// result: (MULLWconst [int32(c)] x)
 11135  	for {
 11136  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11137  			x := v_0
 11138  			if v_1.Op != ssaop.OpS390XMOVDconst {
 11139  				continue
 11140  			}
 11141  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11142  			v.Reset(ssaop.OpS390XMULLWconst)
 11143  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 11144  			v.AddArg(x)
 11145  			return true
 11146  		}
 11147  		break
 11148  	}
 11149  	// match: (MULLW <t> x g:(MOVWload [off] {sym} ptr mem))
 11150  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 11151  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11152  	for {
 11153  		t := v.Type
 11154  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11155  			x := v_0
 11156  			g := v_1
 11157  			if g.Op != ssaop.OpS390XMOVWload {
 11158  				continue
 11159  			}
 11160  			off := ssa.AuxIntToInt32(g.AuxInt)
 11161  			sym := ssa.AuxToSym(g.Aux)
 11162  			mem := g.Args[1]
 11163  			ptr := g.Args[0]
 11164  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 11165  				continue
 11166  			}
 11167  			v.Reset(ssaop.OpS390XMULLWload)
 11168  			v.Type = t
 11169  			v.AuxInt = ssa.Int32ToAuxInt(off)
 11170  			v.Aux = ssa.SymToAux(sym)
 11171  			v.AddArg3(x, ptr, mem)
 11172  			return true
 11173  		}
 11174  		break
 11175  	}
 11176  	// match: (MULLW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11177  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 11178  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11179  	for {
 11180  		t := v.Type
 11181  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11182  			x := v_0
 11183  			g := v_1
 11184  			if g.Op != ssaop.OpS390XMOVWZload {
 11185  				continue
 11186  			}
 11187  			off := ssa.AuxIntToInt32(g.AuxInt)
 11188  			sym := ssa.AuxToSym(g.Aux)
 11189  			mem := g.Args[1]
 11190  			ptr := g.Args[0]
 11191  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 11192  				continue
 11193  			}
 11194  			v.Reset(ssaop.OpS390XMULLWload)
 11195  			v.Type = t
 11196  			v.AuxInt = ssa.Int32ToAuxInt(off)
 11197  			v.Aux = ssa.SymToAux(sym)
 11198  			v.AddArg3(x, ptr, mem)
 11199  			return true
 11200  		}
 11201  		break
 11202  	}
 11203  	return false
 11204  }
 11205  func rewriteValue_OpS390XMULLWconst(v *ssa.Value) bool {
 11206  	v_0 := v.Args[0]
 11207  	b := v.Block
 11208  	// match: (MULLWconst <t> x [c])
 11209  	// cond: ssa.IsPowerOfTwo(c&(c-1))
 11210  	// result: (ADDW (SLWconst <t> x [uint8(ssa.Log32(c&(c-1)))]) (SLWconst <t> x [uint8(ssa.Log32(c&^(c-1)))]))
 11211  	for {
 11212  		t := v.Type
 11213  		c := ssa.AuxIntToInt32(v.AuxInt)
 11214  		x := v_0
 11215  		if !(ssa.IsPowerOfTwo(c & (c - 1))) {
 11216  			break
 11217  		}
 11218  		v.Reset(ssaop.OpS390XADDW)
 11219  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLWconst, t)
 11220  		v0.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c & (c - 1))))
 11221  		v0.AddArg(x)
 11222  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSLWconst, t)
 11223  		v1.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c &^ (c - 1))))
 11224  		v1.AddArg(x)
 11225  		v.AddArg2(v0, v1)
 11226  		return true
 11227  	}
 11228  	// match: (MULLWconst <t> x [c])
 11229  	// cond: ssa.IsPowerOfTwo(c+(c&^(c-1)))
 11230  	// result: (SUBW (SLWconst <t> x [uint8(ssa.Log32(c+(c&^(c-1))))]) (SLWconst <t> x [uint8(ssa.Log32(c&^(c-1)))]))
 11231  	for {
 11232  		t := v.Type
 11233  		c := ssa.AuxIntToInt32(v.AuxInt)
 11234  		x := v_0
 11235  		if !(ssa.IsPowerOfTwo(c + (c &^ (c - 1)))) {
 11236  			break
 11237  		}
 11238  		v.Reset(ssaop.OpS390XSUBW)
 11239  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLWconst, t)
 11240  		v0.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c + (c &^ (c - 1)))))
 11241  		v0.AddArg(x)
 11242  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSLWconst, t)
 11243  		v1.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(c &^ (c - 1))))
 11244  		v1.AddArg(x)
 11245  		v.AddArg2(v0, v1)
 11246  		return true
 11247  	}
 11248  	// match: (MULLWconst <t> x [c])
 11249  	// cond: ssa.IsPowerOfTwo(-c+(-c&^(-c-1)))
 11250  	// result: (SUBW (SLWconst <t> x [uint8(ssa.Log32(-c&^(-c-1)))]) (SLWconst <t> x [uint8(ssa.Log32(-c+(-c&^(-c-1))))]))
 11251  	for {
 11252  		t := v.Type
 11253  		c := ssa.AuxIntToInt32(v.AuxInt)
 11254  		x := v_0
 11255  		if !(ssa.IsPowerOfTwo(-c + (-c &^ (-c - 1)))) {
 11256  			break
 11257  		}
 11258  		v.Reset(ssaop.OpS390XSUBW)
 11259  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSLWconst, t)
 11260  		v0.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(-c &^ (-c - 1))))
 11261  		v0.AddArg(x)
 11262  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSLWconst, t)
 11263  		v1.AuxInt = ssa.Uint8ToAuxInt(uint8(ssa.Log32(-c + (-c &^ (-c - 1)))))
 11264  		v1.AddArg(x)
 11265  		v.AddArg2(v0, v1)
 11266  		return true
 11267  	}
 11268  	// match: (MULLWconst [c] (MOVDconst [d]))
 11269  	// result: (MOVDconst [int64(c*int32(d))])
 11270  	for {
 11271  		c := ssa.AuxIntToInt32(v.AuxInt)
 11272  		if v_0.Op != ssaop.OpS390XMOVDconst {
 11273  			break
 11274  		}
 11275  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 11276  		v.Reset(ssaop.OpS390XMOVDconst)
 11277  		v.AuxInt = ssa.Int64ToAuxInt(int64(c * int32(d)))
 11278  		return true
 11279  	}
 11280  	return false
 11281  }
 11282  func rewriteValue_OpS390XMULLWload(v *ssa.Value) bool {
 11283  	v_2 := v.Args[2]
 11284  	v_1 := v.Args[1]
 11285  	v_0 := v.Args[0]
 11286  	// match: (MULLWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11287  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 11288  	// result: (MULLWload [off1+off2] {sym} x ptr mem)
 11289  	for {
 11290  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11291  		sym := ssa.AuxToSym(v.Aux)
 11292  		x := v_0
 11293  		if v_1.Op != ssaop.OpS390XADDconst {
 11294  			break
 11295  		}
 11296  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11297  		ptr := v_1.Args[0]
 11298  		mem := v_2
 11299  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 11300  			break
 11301  		}
 11302  		v.Reset(ssaop.OpS390XMULLWload)
 11303  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 11304  		v.Aux = ssa.SymToAux(sym)
 11305  		v.AddArg3(x, ptr, mem)
 11306  		return true
 11307  	}
 11308  	// match: (MULLWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11309  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 11310  	// result: (MULLWload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 11311  	for {
 11312  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 11313  		s1 := ssa.AuxToSym(v.Aux)
 11314  		x := v_0
 11315  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 11316  			break
 11317  		}
 11318  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11319  		s2 := ssa.AuxToSym(v_1.Aux)
 11320  		ptr := v_1.Args[0]
 11321  		mem := v_2
 11322  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 11323  			break
 11324  		}
 11325  		v.Reset(ssaop.OpS390XMULLWload)
 11326  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 11327  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 11328  		v.AddArg3(x, ptr, mem)
 11329  		return true
 11330  	}
 11331  	return false
 11332  }
 11333  func rewriteValue_OpS390XNEG(v *ssa.Value) bool {
 11334  	v_0 := v.Args[0]
 11335  	// match: (NEG (MOVDconst [c]))
 11336  	// result: (MOVDconst [-c])
 11337  	for {
 11338  		if v_0.Op != ssaop.OpS390XMOVDconst {
 11339  			break
 11340  		}
 11341  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11342  		v.Reset(ssaop.OpS390XMOVDconst)
 11343  		v.AuxInt = ssa.Int64ToAuxInt(-c)
 11344  		return true
 11345  	}
 11346  	// match: (NEG (NEG x))
 11347  	// result: x
 11348  	for {
 11349  		if v_0.Op != ssaop.OpS390XNEG {
 11350  			break
 11351  		}
 11352  		x := v_0.Args[0]
 11353  		v.CopyOf(x)
 11354  		return true
 11355  	}
 11356  	// match: (NEG (ADDconst [c] (NEG x)))
 11357  	// cond: c != -(1<<31)
 11358  	// result: (ADDconst [-c] x)
 11359  	for {
 11360  		if v_0.Op != ssaop.OpS390XADDconst {
 11361  			break
 11362  		}
 11363  		c := ssa.AuxIntToInt32(v_0.AuxInt)
 11364  		v_0_0 := v_0.Args[0]
 11365  		if v_0_0.Op != ssaop.OpS390XNEG {
 11366  			break
 11367  		}
 11368  		x := v_0_0.Args[0]
 11369  		if !(c != -(1 << 31)) {
 11370  			break
 11371  		}
 11372  		v.Reset(ssaop.OpS390XADDconst)
 11373  		v.AuxInt = ssa.Int32ToAuxInt(-c)
 11374  		v.AddArg(x)
 11375  		return true
 11376  	}
 11377  	return false
 11378  }
 11379  func rewriteValue_OpS390XNEGW(v *ssa.Value) bool {
 11380  	v_0 := v.Args[0]
 11381  	// match: (NEGW (MOVDconst [c]))
 11382  	// result: (MOVDconst [int64(int32(-c))])
 11383  	for {
 11384  		if v_0.Op != ssaop.OpS390XMOVDconst {
 11385  			break
 11386  		}
 11387  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 11388  		v.Reset(ssaop.OpS390XMOVDconst)
 11389  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(-c)))
 11390  		return true
 11391  	}
 11392  	return false
 11393  }
 11394  func rewriteValue_OpS390XNOT(v *ssa.Value) bool {
 11395  	v_0 := v.Args[0]
 11396  	b := v.Block
 11397  	typ := &b.Func.Config.Types
 11398  	// match: (NOT x)
 11399  	// result: (XOR (MOVDconst [-1]) x)
 11400  	for {
 11401  		x := v_0
 11402  		v.Reset(ssaop.OpS390XXOR)
 11403  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
 11404  		v0.AuxInt = ssa.Int64ToAuxInt(-1)
 11405  		v.AddArg2(v0, x)
 11406  		return true
 11407  	}
 11408  }
 11409  func rewriteValue_OpS390XNOTW(v *ssa.Value) bool {
 11410  	v_0 := v.Args[0]
 11411  	// match: (NOTW x)
 11412  	// result: (XORWconst [-1] x)
 11413  	for {
 11414  		x := v_0
 11415  		v.Reset(ssaop.OpS390XXORWconst)
 11416  		v.AuxInt = ssa.Int32ToAuxInt(-1)
 11417  		v.AddArg(x)
 11418  		return true
 11419  	}
 11420  }
 11421  func rewriteValue_OpS390XOR(v *ssa.Value) bool {
 11422  	v_1 := v.Args[1]
 11423  	v_0 := v.Args[0]
 11424  	b := v.Block
 11425  	// match: (OR x (MOVDconst [c]))
 11426  	// cond: ssa.IsU32Bit(c)
 11427  	// result: (ORconst [c] x)
 11428  	for {
 11429  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11430  			x := v_0
 11431  			if v_1.Op != ssaop.OpS390XMOVDconst {
 11432  				continue
 11433  			}
 11434  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11435  			if !(ssa.IsU32Bit(c)) {
 11436  				continue
 11437  			}
 11438  			v.Reset(ssaop.OpS390XORconst)
 11439  			v.AuxInt = ssa.Int64ToAuxInt(c)
 11440  			v.AddArg(x)
 11441  			return true
 11442  		}
 11443  		break
 11444  	}
 11445  	// match: (OR (MOVDconst [-1<<63]) (LGDR <t> x))
 11446  	// result: (LGDR <t> (LNDFR <x.Type> x))
 11447  	for {
 11448  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11449  			if v_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0.AuxInt) != -1<<63 || v_1.Op != ssaop.OpS390XLGDR {
 11450  				continue
 11451  			}
 11452  			t := v_1.Type
 11453  			x := v_1.Args[0]
 11454  			v.Reset(ssaop.OpS390XLGDR)
 11455  			v.Type = t
 11456  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XLNDFR, x.Type)
 11457  			v0.AddArg(x)
 11458  			v.AddArg(v0)
 11459  			return true
 11460  		}
 11461  		break
 11462  	}
 11463  	// match: (OR (RISBGZ (LGDR x) {r}) (LGDR (LPDFR <t> y)))
 11464  	// cond: r == s390x.NewRotateParams(0, 0, 0)
 11465  	// result: (LGDR (CPSDR <t> y x))
 11466  	for {
 11467  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11468  			if v_0.Op != ssaop.OpS390XRISBGZ {
 11469  				continue
 11470  			}
 11471  			r := ssa.AuxToS390xRotateParams(v_0.Aux)
 11472  			v_0_0 := v_0.Args[0]
 11473  			if v_0_0.Op != ssaop.OpS390XLGDR {
 11474  				continue
 11475  			}
 11476  			x := v_0_0.Args[0]
 11477  			if v_1.Op != ssaop.OpS390XLGDR {
 11478  				continue
 11479  			}
 11480  			v_1_0 := v_1.Args[0]
 11481  			if v_1_0.Op != ssaop.OpS390XLPDFR {
 11482  				continue
 11483  			}
 11484  			t := v_1_0.Type
 11485  			y := v_1_0.Args[0]
 11486  			if !(r == s390x.NewRotateParams(0, 0, 0)) {
 11487  				continue
 11488  			}
 11489  			v.Reset(ssaop.OpS390XLGDR)
 11490  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XCPSDR, t)
 11491  			v0.AddArg2(y, x)
 11492  			v.AddArg(v0)
 11493  			return true
 11494  		}
 11495  		break
 11496  	}
 11497  	// match: (OR (RISBGZ (LGDR x) {r}) (MOVDconst [c]))
 11498  	// cond: c >= 0 && r == s390x.NewRotateParams(0, 0, 0)
 11499  	// result: (LGDR (CPSDR <x.Type> (FMOVDconst <x.Type> [math.Float64frombits(uint64(c))]) x))
 11500  	for {
 11501  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11502  			if v_0.Op != ssaop.OpS390XRISBGZ {
 11503  				continue
 11504  			}
 11505  			r := ssa.AuxToS390xRotateParams(v_0.Aux)
 11506  			v_0_0 := v_0.Args[0]
 11507  			if v_0_0.Op != ssaop.OpS390XLGDR {
 11508  				continue
 11509  			}
 11510  			x := v_0_0.Args[0]
 11511  			if v_1.Op != ssaop.OpS390XMOVDconst {
 11512  				continue
 11513  			}
 11514  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11515  			if !(c >= 0 && r == s390x.NewRotateParams(0, 0, 0)) {
 11516  				continue
 11517  			}
 11518  			v.Reset(ssaop.OpS390XLGDR)
 11519  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XCPSDR, x.Type)
 11520  			v1 := b.NewValue0(v.Pos, ssaop.OpS390XFMOVDconst, x.Type)
 11521  			v1.AuxInt = ssa.Float64ToAuxInt(math.Float64frombits(uint64(c)))
 11522  			v0.AddArg2(v1, x)
 11523  			v.AddArg(v0)
 11524  			return true
 11525  		}
 11526  		break
 11527  	}
 11528  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11529  	// result: (MOVDconst [c|d])
 11530  	for {
 11531  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11532  			if v_0.Op != ssaop.OpS390XMOVDconst {
 11533  				continue
 11534  			}
 11535  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 11536  			if v_1.Op != ssaop.OpS390XMOVDconst {
 11537  				continue
 11538  			}
 11539  			d := ssa.AuxIntToInt64(v_1.AuxInt)
 11540  			v.Reset(ssaop.OpS390XMOVDconst)
 11541  			v.AuxInt = ssa.Int64ToAuxInt(c | d)
 11542  			return true
 11543  		}
 11544  		break
 11545  	}
 11546  	// match: (OR x x)
 11547  	// result: x
 11548  	for {
 11549  		x := v_0
 11550  		if x != v_1 {
 11551  			break
 11552  		}
 11553  		v.CopyOf(x)
 11554  		return true
 11555  	}
 11556  	// match: (OR <t> x g:(MOVDload [off] {sym} ptr mem))
 11557  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 11558  	// result: (ORload <t> [off] {sym} x ptr mem)
 11559  	for {
 11560  		t := v.Type
 11561  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11562  			x := v_0
 11563  			g := v_1
 11564  			if g.Op != ssaop.OpS390XMOVDload {
 11565  				continue
 11566  			}
 11567  			off := ssa.AuxIntToInt32(g.AuxInt)
 11568  			sym := ssa.AuxToSym(g.Aux)
 11569  			mem := g.Args[1]
 11570  			ptr := g.Args[0]
 11571  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 11572  				continue
 11573  			}
 11574  			v.Reset(ssaop.OpS390XORload)
 11575  			v.Type = t
 11576  			v.AuxInt = ssa.Int32ToAuxInt(off)
 11577  			v.Aux = ssa.SymToAux(sym)
 11578  			v.AddArg3(x, ptr, mem)
 11579  			return true
 11580  		}
 11581  		break
 11582  	}
 11583  	return false
 11584  }
 11585  func rewriteValue_OpS390XORW(v *ssa.Value) bool {
 11586  	v_1 := v.Args[1]
 11587  	v_0 := v.Args[0]
 11588  	// match: (ORW x (MOVDconst [c]))
 11589  	// result: (ORWconst [int32(c)] x)
 11590  	for {
 11591  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11592  			x := v_0
 11593  			if v_1.Op != ssaop.OpS390XMOVDconst {
 11594  				continue
 11595  			}
 11596  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 11597  			v.Reset(ssaop.OpS390XORWconst)
 11598  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 11599  			v.AddArg(x)
 11600  			return true
 11601  		}
 11602  		break
 11603  	}
 11604  	// match: (ORW x x)
 11605  	// result: x
 11606  	for {
 11607  		x := v_0
 11608  		if x != v_1 {
 11609  			break
 11610  		}
 11611  		v.CopyOf(x)
 11612  		return true
 11613  	}
 11614  	// match: (ORW <t> x g:(MOVWload [off] {sym} ptr mem))
 11615  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 11616  	// result: (ORWload <t> [off] {sym} x ptr mem)
 11617  	for {
 11618  		t := v.Type
 11619  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11620  			x := v_0
 11621  			g := v_1
 11622  			if g.Op != ssaop.OpS390XMOVWload {
 11623  				continue
 11624  			}
 11625  			off := ssa.AuxIntToInt32(g.AuxInt)
 11626  			sym := ssa.AuxToSym(g.Aux)
 11627  			mem := g.Args[1]
 11628  			ptr := g.Args[0]
 11629  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 11630  				continue
 11631  			}
 11632  			v.Reset(ssaop.OpS390XORWload)
 11633  			v.Type = t
 11634  			v.AuxInt = ssa.Int32ToAuxInt(off)
 11635  			v.Aux = ssa.SymToAux(sym)
 11636  			v.AddArg3(x, ptr, mem)
 11637  			return true
 11638  		}
 11639  		break
 11640  	}
 11641  	// match: (ORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11642  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 11643  	// result: (ORWload <t> [off] {sym} x ptr mem)
 11644  	for {
 11645  		t := v.Type
 11646  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11647  			x := v_0
 11648  			g := v_1
 11649  			if g.Op != ssaop.OpS390XMOVWZload {
 11650  				continue
 11651  			}
 11652  			off := ssa.AuxIntToInt32(g.AuxInt)
 11653  			sym := ssa.AuxToSym(g.Aux)
 11654  			mem := g.Args[1]
 11655  			ptr := g.Args[0]
 11656  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 11657  				continue
 11658  			}
 11659  			v.Reset(ssaop.OpS390XORWload)
 11660  			v.Type = t
 11661  			v.AuxInt = ssa.Int32ToAuxInt(off)
 11662  			v.Aux = ssa.SymToAux(sym)
 11663  			v.AddArg3(x, ptr, mem)
 11664  			return true
 11665  		}
 11666  		break
 11667  	}
 11668  	return false
 11669  }
 11670  func rewriteValue_OpS390XORWconst(v *ssa.Value) bool {
 11671  	v_0 := v.Args[0]
 11672  	// match: (ORWconst [c] x)
 11673  	// cond: int32(c)==0
 11674  	// result: x
 11675  	for {
 11676  		c := ssa.AuxIntToInt32(v.AuxInt)
 11677  		x := v_0
 11678  		if !(int32(c) == 0) {
 11679  			break
 11680  		}
 11681  		v.CopyOf(x)
 11682  		return true
 11683  	}
 11684  	// match: (ORWconst [c] _)
 11685  	// cond: int32(c)==-1
 11686  	// result: (MOVDconst [-1])
 11687  	for {
 11688  		c := ssa.AuxIntToInt32(v.AuxInt)
 11689  		if !(int32(c) == -1) {
 11690  			break
 11691  		}
 11692  		v.Reset(ssaop.OpS390XMOVDconst)
 11693  		v.AuxInt = ssa.Int64ToAuxInt(-1)
 11694  		return true
 11695  	}
 11696  	// match: (ORWconst [c] (MOVDconst [d]))
 11697  	// result: (MOVDconst [int64(c)|d])
 11698  	for {
 11699  		c := ssa.AuxIntToInt32(v.AuxInt)
 11700  		if v_0.Op != ssaop.OpS390XMOVDconst {
 11701  			break
 11702  		}
 11703  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 11704  		v.Reset(ssaop.OpS390XMOVDconst)
 11705  		v.AuxInt = ssa.Int64ToAuxInt(int64(c) | d)
 11706  		return true
 11707  	}
 11708  	return false
 11709  }
 11710  func rewriteValue_OpS390XORWload(v *ssa.Value) bool {
 11711  	v_2 := v.Args[2]
 11712  	v_1 := v.Args[1]
 11713  	v_0 := v.Args[0]
 11714  	// match: (ORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11715  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 11716  	// result: (ORWload [off1+off2] {sym} x ptr mem)
 11717  	for {
 11718  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11719  		sym := ssa.AuxToSym(v.Aux)
 11720  		x := v_0
 11721  		if v_1.Op != ssaop.OpS390XADDconst {
 11722  			break
 11723  		}
 11724  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11725  		ptr := v_1.Args[0]
 11726  		mem := v_2
 11727  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 11728  			break
 11729  		}
 11730  		v.Reset(ssaop.OpS390XORWload)
 11731  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 11732  		v.Aux = ssa.SymToAux(sym)
 11733  		v.AddArg3(x, ptr, mem)
 11734  		return true
 11735  	}
 11736  	// match: (ORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11737  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 11738  	// result: (ORWload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 11739  	for {
 11740  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 11741  		s1 := ssa.AuxToSym(v.Aux)
 11742  		x := v_0
 11743  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 11744  			break
 11745  		}
 11746  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11747  		s2 := ssa.AuxToSym(v_1.Aux)
 11748  		ptr := v_1.Args[0]
 11749  		mem := v_2
 11750  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 11751  			break
 11752  		}
 11753  		v.Reset(ssaop.OpS390XORWload)
 11754  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 11755  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 11756  		v.AddArg3(x, ptr, mem)
 11757  		return true
 11758  	}
 11759  	return false
 11760  }
 11761  func rewriteValue_OpS390XORconst(v *ssa.Value) bool {
 11762  	v_0 := v.Args[0]
 11763  	// match: (ORconst [0] x)
 11764  	// result: x
 11765  	for {
 11766  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 11767  			break
 11768  		}
 11769  		x := v_0
 11770  		v.CopyOf(x)
 11771  		return true
 11772  	}
 11773  	// match: (ORconst [-1] _)
 11774  	// result: (MOVDconst [-1])
 11775  	for {
 11776  		if ssa.AuxIntToInt64(v.AuxInt) != -1 {
 11777  			break
 11778  		}
 11779  		v.Reset(ssaop.OpS390XMOVDconst)
 11780  		v.AuxInt = ssa.Int64ToAuxInt(-1)
 11781  		return true
 11782  	}
 11783  	// match: (ORconst [c] (MOVDconst [d]))
 11784  	// result: (MOVDconst [c|d])
 11785  	for {
 11786  		c := ssa.AuxIntToInt64(v.AuxInt)
 11787  		if v_0.Op != ssaop.OpS390XMOVDconst {
 11788  			break
 11789  		}
 11790  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 11791  		v.Reset(ssaop.OpS390XMOVDconst)
 11792  		v.AuxInt = ssa.Int64ToAuxInt(c | d)
 11793  		return true
 11794  	}
 11795  	return false
 11796  }
 11797  func rewriteValue_OpS390XORload(v *ssa.Value) bool {
 11798  	v_2 := v.Args[2]
 11799  	v_1 := v.Args[1]
 11800  	v_0 := v.Args[0]
 11801  	b := v.Block
 11802  	// match: (ORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11803  	// cond: ssa.IsSamePtr(ptr1, ptr2)
 11804  	// result: (OR x (LGDR <t> y))
 11805  	for {
 11806  		t := v.Type
 11807  		off := ssa.AuxIntToInt32(v.AuxInt)
 11808  		sym := ssa.AuxToSym(v.Aux)
 11809  		x := v_0
 11810  		ptr1 := v_1
 11811  		if v_2.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_2.AuxInt) != off || ssa.AuxToSym(v_2.Aux) != sym {
 11812  			break
 11813  		}
 11814  		y := v_2.Args[1]
 11815  		ptr2 := v_2.Args[0]
 11816  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
 11817  			break
 11818  		}
 11819  		v.Reset(ssaop.OpS390XOR)
 11820  		v0 := b.NewValue0(v_2.Pos, ssaop.OpS390XLGDR, t)
 11821  		v0.AddArg(y)
 11822  		v.AddArg2(x, v0)
 11823  		return true
 11824  	}
 11825  	// match: (ORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11826  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 11827  	// result: (ORload [off1+off2] {sym} x ptr mem)
 11828  	for {
 11829  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 11830  		sym := ssa.AuxToSym(v.Aux)
 11831  		x := v_0
 11832  		if v_1.Op != ssaop.OpS390XADDconst {
 11833  			break
 11834  		}
 11835  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11836  		ptr := v_1.Args[0]
 11837  		mem := v_2
 11838  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 11839  			break
 11840  		}
 11841  		v.Reset(ssaop.OpS390XORload)
 11842  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 11843  		v.Aux = ssa.SymToAux(sym)
 11844  		v.AddArg3(x, ptr, mem)
 11845  		return true
 11846  	}
 11847  	// match: (ORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11848  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 11849  	// result: (ORload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 11850  	for {
 11851  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 11852  		s1 := ssa.AuxToSym(v.Aux)
 11853  		x := v_0
 11854  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 11855  			break
 11856  		}
 11857  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 11858  		s2 := ssa.AuxToSym(v_1.Aux)
 11859  		ptr := v_1.Args[0]
 11860  		mem := v_2
 11861  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 11862  			break
 11863  		}
 11864  		v.Reset(ssaop.OpS390XORload)
 11865  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 11866  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 11867  		v.AddArg3(x, ptr, mem)
 11868  		return true
 11869  	}
 11870  	return false
 11871  }
 11872  func rewriteValue_OpS390XRISBGZ(v *ssa.Value) bool {
 11873  	v_0 := v.Args[0]
 11874  	b := v.Block
 11875  	// match: (RISBGZ (MOVWZreg x) {r})
 11876  	// cond: r.InMerge(0xffffffff) != nil
 11877  	// result: (RISBGZ x {*r.InMerge(0xffffffff)})
 11878  	for {
 11879  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11880  		if v_0.Op != ssaop.OpS390XMOVWZreg {
 11881  			break
 11882  		}
 11883  		x := v_0.Args[0]
 11884  		if !(r.InMerge(0xffffffff) != nil) {
 11885  			break
 11886  		}
 11887  		v.Reset(ssaop.OpS390XRISBGZ)
 11888  		v.Aux = ssa.S390xRotateParamsToAux(*r.InMerge(0xffffffff))
 11889  		v.AddArg(x)
 11890  		return true
 11891  	}
 11892  	// match: (RISBGZ (MOVHZreg x) {r})
 11893  	// cond: r.InMerge(0x0000ffff) != nil
 11894  	// result: (RISBGZ x {*r.InMerge(0x0000ffff)})
 11895  	for {
 11896  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11897  		if v_0.Op != ssaop.OpS390XMOVHZreg {
 11898  			break
 11899  		}
 11900  		x := v_0.Args[0]
 11901  		if !(r.InMerge(0x0000ffff) != nil) {
 11902  			break
 11903  		}
 11904  		v.Reset(ssaop.OpS390XRISBGZ)
 11905  		v.Aux = ssa.S390xRotateParamsToAux(*r.InMerge(0x0000ffff))
 11906  		v.AddArg(x)
 11907  		return true
 11908  	}
 11909  	// match: (RISBGZ (MOVBZreg x) {r})
 11910  	// cond: r.InMerge(0x000000ff) != nil
 11911  	// result: (RISBGZ x {*r.InMerge(0x000000ff)})
 11912  	for {
 11913  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11914  		if v_0.Op != ssaop.OpS390XMOVBZreg {
 11915  			break
 11916  		}
 11917  		x := v_0.Args[0]
 11918  		if !(r.InMerge(0x000000ff) != nil) {
 11919  			break
 11920  		}
 11921  		v.Reset(ssaop.OpS390XRISBGZ)
 11922  		v.Aux = ssa.S390xRotateParamsToAux(*r.InMerge(0x000000ff))
 11923  		v.AddArg(x)
 11924  		return true
 11925  	}
 11926  	// match: (RISBGZ (SLDconst x [c]) {r})
 11927  	// cond: r.InMerge(^uint64(0)<<c) != nil
 11928  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)<<c)).RotateLeft(c)})
 11929  	for {
 11930  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11931  		if v_0.Op != ssaop.OpS390XSLDconst {
 11932  			break
 11933  		}
 11934  		c := ssa.AuxIntToUint8(v_0.AuxInt)
 11935  		x := v_0.Args[0]
 11936  		if !(r.InMerge(^uint64(0)<<c) != nil) {
 11937  			break
 11938  		}
 11939  		v.Reset(ssaop.OpS390XRISBGZ)
 11940  		v.Aux = ssa.S390xRotateParamsToAux((*r.InMerge(^uint64(0) << c)).RotateLeft(c))
 11941  		v.AddArg(x)
 11942  		return true
 11943  	}
 11944  	// match: (RISBGZ (SRDconst x [c]) {r})
 11945  	// cond: r.InMerge(^uint64(0)>>c) != nil
 11946  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)>>c)).RotateLeft(-c)})
 11947  	for {
 11948  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11949  		if v_0.Op != ssaop.OpS390XSRDconst {
 11950  			break
 11951  		}
 11952  		c := ssa.AuxIntToUint8(v_0.AuxInt)
 11953  		x := v_0.Args[0]
 11954  		if !(r.InMerge(^uint64(0)>>c) != nil) {
 11955  			break
 11956  		}
 11957  		v.Reset(ssaop.OpS390XRISBGZ)
 11958  		v.Aux = ssa.S390xRotateParamsToAux((*r.InMerge(^uint64(0) >> c)).RotateLeft(-c))
 11959  		v.AddArg(x)
 11960  		return true
 11961  	}
 11962  	// match: (RISBGZ (RISBGZ x {y}) {z})
 11963  	// cond: z.InMerge(y.OutMask()) != nil
 11964  	// result: (RISBGZ x {(*z.InMerge(y.OutMask())).RotateLeft(y.Amount)})
 11965  	for {
 11966  		z := ssa.AuxToS390xRotateParams(v.Aux)
 11967  		if v_0.Op != ssaop.OpS390XRISBGZ {
 11968  			break
 11969  		}
 11970  		y := ssa.AuxToS390xRotateParams(v_0.Aux)
 11971  		x := v_0.Args[0]
 11972  		if !(z.InMerge(y.OutMask()) != nil) {
 11973  			break
 11974  		}
 11975  		v.Reset(ssaop.OpS390XRISBGZ)
 11976  		v.Aux = ssa.S390xRotateParamsToAux((*z.InMerge(y.OutMask())).RotateLeft(y.Amount))
 11977  		v.AddArg(x)
 11978  		return true
 11979  	}
 11980  	// match: (RISBGZ x {r})
 11981  	// cond: r.End == 63 && r.Start == -r.Amount&63
 11982  	// result: (SRDconst x [-r.Amount&63])
 11983  	for {
 11984  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11985  		x := v_0
 11986  		if !(r.End == 63 && r.Start == -r.Amount&63) {
 11987  			break
 11988  		}
 11989  		v.Reset(ssaop.OpS390XSRDconst)
 11990  		v.AuxInt = ssa.Uint8ToAuxInt(-r.Amount & 63)
 11991  		v.AddArg(x)
 11992  		return true
 11993  	}
 11994  	// match: (RISBGZ x {r})
 11995  	// cond: r.Start == 0 && r.End == 63-r.Amount
 11996  	// result: (SLDconst x [r.Amount])
 11997  	for {
 11998  		r := ssa.AuxToS390xRotateParams(v.Aux)
 11999  		x := v_0
 12000  		if !(r.Start == 0 && r.End == 63-r.Amount) {
 12001  			break
 12002  		}
 12003  		v.Reset(ssaop.OpS390XSLDconst)
 12004  		v.AuxInt = ssa.Uint8ToAuxInt(r.Amount)
 12005  		v.AddArg(x)
 12006  		return true
 12007  	}
 12008  	// match: (RISBGZ (SRADconst x [c]) {r})
 12009  	// cond: r.Start == r.End && (r.Start+r.Amount)&63 <= c
 12010  	// result: (RISBGZ x {s390x.NewRotateParams(r.Start, r.Start, -r.Start&63)})
 12011  	for {
 12012  		r := ssa.AuxToS390xRotateParams(v.Aux)
 12013  		if v_0.Op != ssaop.OpS390XSRADconst {
 12014  			break
 12015  		}
 12016  		c := ssa.AuxIntToUint8(v_0.AuxInt)
 12017  		x := v_0.Args[0]
 12018  		if !(r.Start == r.End && (r.Start+r.Amount)&63 <= c) {
 12019  			break
 12020  		}
 12021  		v.Reset(ssaop.OpS390XRISBGZ)
 12022  		v.Aux = ssa.S390xRotateParamsToAux(s390x.NewRotateParams(r.Start, r.Start, -r.Start&63))
 12023  		v.AddArg(x)
 12024  		return true
 12025  	}
 12026  	// match: (RISBGZ x {r})
 12027  	// cond: r == s390x.NewRotateParams(56, 63, 0)
 12028  	// result: (MOVBZreg x)
 12029  	for {
 12030  		r := ssa.AuxToS390xRotateParams(v.Aux)
 12031  		x := v_0
 12032  		if !(r == s390x.NewRotateParams(56, 63, 0)) {
 12033  			break
 12034  		}
 12035  		v.Reset(ssaop.OpS390XMOVBZreg)
 12036  		v.AddArg(x)
 12037  		return true
 12038  	}
 12039  	// match: (RISBGZ x {r})
 12040  	// cond: r == s390x.NewRotateParams(48, 63, 0)
 12041  	// result: (MOVHZreg x)
 12042  	for {
 12043  		r := ssa.AuxToS390xRotateParams(v.Aux)
 12044  		x := v_0
 12045  		if !(r == s390x.NewRotateParams(48, 63, 0)) {
 12046  			break
 12047  		}
 12048  		v.Reset(ssaop.OpS390XMOVHZreg)
 12049  		v.AddArg(x)
 12050  		return true
 12051  	}
 12052  	// match: (RISBGZ x {r})
 12053  	// cond: r == s390x.NewRotateParams(32, 63, 0)
 12054  	// result: (MOVWZreg x)
 12055  	for {
 12056  		r := ssa.AuxToS390xRotateParams(v.Aux)
 12057  		x := v_0
 12058  		if !(r == s390x.NewRotateParams(32, 63, 0)) {
 12059  			break
 12060  		}
 12061  		v.Reset(ssaop.OpS390XMOVWZreg)
 12062  		v.AddArg(x)
 12063  		return true
 12064  	}
 12065  	// match: (RISBGZ (LGDR <t> x) {r})
 12066  	// cond: r == s390x.NewRotateParams(1, 63, 0)
 12067  	// result: (LGDR <t> (LPDFR <x.Type> x))
 12068  	for {
 12069  		r := ssa.AuxToS390xRotateParams(v.Aux)
 12070  		if v_0.Op != ssaop.OpS390XLGDR {
 12071  			break
 12072  		}
 12073  		t := v_0.Type
 12074  		x := v_0.Args[0]
 12075  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
 12076  			break
 12077  		}
 12078  		v.Reset(ssaop.OpS390XLGDR)
 12079  		v.Type = t
 12080  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XLPDFR, x.Type)
 12081  		v0.AddArg(x)
 12082  		v.AddArg(v0)
 12083  		return true
 12084  	}
 12085  	return false
 12086  }
 12087  func rewriteValue_OpS390XRLL(v *ssa.Value) bool {
 12088  	v_1 := v.Args[1]
 12089  	v_0 := v.Args[0]
 12090  	// match: (RLL x (MOVDconst [c]))
 12091  	// result: (RLLconst x [uint8(c&31)])
 12092  	for {
 12093  		x := v_0
 12094  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12095  			break
 12096  		}
 12097  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12098  		v.Reset(ssaop.OpS390XRLLconst)
 12099  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 31))
 12100  		v.AddArg(x)
 12101  		return true
 12102  	}
 12103  	return false
 12104  }
 12105  func rewriteValue_OpS390XRLLG(v *ssa.Value) bool {
 12106  	v_1 := v.Args[1]
 12107  	v_0 := v.Args[0]
 12108  	// match: (RLLG x (MOVDconst [c]))
 12109  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, uint8(c&63))})
 12110  	for {
 12111  		x := v_0
 12112  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12113  			break
 12114  		}
 12115  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12116  		v.Reset(ssaop.OpS390XRISBGZ)
 12117  		v.Aux = ssa.S390xRotateParamsToAux(s390x.NewRotateParams(0, 63, uint8(c&63)))
 12118  		v.AddArg(x)
 12119  		return true
 12120  	}
 12121  	return false
 12122  }
 12123  func rewriteValue_OpS390XSLD(v *ssa.Value) bool {
 12124  	v_1 := v.Args[1]
 12125  	v_0 := v.Args[0]
 12126  	b := v.Block
 12127  	typ := &b.Func.Config.Types
 12128  	// match: (SLD x (MOVDconst [c]))
 12129  	// result: (SLDconst x [uint8(c&63)])
 12130  	for {
 12131  		x := v_0
 12132  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12133  			break
 12134  		}
 12135  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12136  		v.Reset(ssaop.OpS390XSLDconst)
 12137  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 63))
 12138  		v.AddArg(x)
 12139  		return true
 12140  	}
 12141  	// match: (SLD x (RISBGZ y {r}))
 12142  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12143  	// result: (SLD x y)
 12144  	for {
 12145  		x := v_0
 12146  		if v_1.Op != ssaop.OpS390XRISBGZ {
 12147  			break
 12148  		}
 12149  		r := ssa.AuxToS390xRotateParams(v_1.Aux)
 12150  		y := v_1.Args[0]
 12151  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12152  			break
 12153  		}
 12154  		v.Reset(ssaop.OpS390XSLD)
 12155  		v.AddArg2(x, y)
 12156  		return true
 12157  	}
 12158  	// match: (SLD x (AND (MOVDconst [c]) y))
 12159  	// result: (SLD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12160  	for {
 12161  		x := v_0
 12162  		if v_1.Op != ssaop.OpS390XAND {
 12163  			break
 12164  		}
 12165  		_ = v_1.Args[1]
 12166  		v_1_0 := v_1.Args[0]
 12167  		v_1_1 := v_1.Args[1]
 12168  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12169  			if v_1_0.Op != ssaop.OpS390XMOVDconst {
 12170  				continue
 12171  			}
 12172  			c := ssa.AuxIntToInt64(v_1_0.AuxInt)
 12173  			y := v_1_1
 12174  			v.Reset(ssaop.OpS390XSLD)
 12175  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
 12176  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c & 63))
 12177  			v0.AddArg(y)
 12178  			v.AddArg2(x, v0)
 12179  			return true
 12180  		}
 12181  		break
 12182  	}
 12183  	// match: (SLD x (ANDWconst [c] y))
 12184  	// cond: c&63 == 63
 12185  	// result: (SLD x y)
 12186  	for {
 12187  		x := v_0
 12188  		if v_1.Op != ssaop.OpS390XANDWconst {
 12189  			break
 12190  		}
 12191  		c := ssa.AuxIntToInt32(v_1.AuxInt)
 12192  		y := v_1.Args[0]
 12193  		if !(c&63 == 63) {
 12194  			break
 12195  		}
 12196  		v.Reset(ssaop.OpS390XSLD)
 12197  		v.AddArg2(x, y)
 12198  		return true
 12199  	}
 12200  	// match: (SLD x (MOVWreg y))
 12201  	// result: (SLD x y)
 12202  	for {
 12203  		x := v_0
 12204  		if v_1.Op != ssaop.OpS390XMOVWreg {
 12205  			break
 12206  		}
 12207  		y := v_1.Args[0]
 12208  		v.Reset(ssaop.OpS390XSLD)
 12209  		v.AddArg2(x, y)
 12210  		return true
 12211  	}
 12212  	// match: (SLD x (MOVHreg y))
 12213  	// result: (SLD x y)
 12214  	for {
 12215  		x := v_0
 12216  		if v_1.Op != ssaop.OpS390XMOVHreg {
 12217  			break
 12218  		}
 12219  		y := v_1.Args[0]
 12220  		v.Reset(ssaop.OpS390XSLD)
 12221  		v.AddArg2(x, y)
 12222  		return true
 12223  	}
 12224  	// match: (SLD x (MOVBreg y))
 12225  	// result: (SLD x y)
 12226  	for {
 12227  		x := v_0
 12228  		if v_1.Op != ssaop.OpS390XMOVBreg {
 12229  			break
 12230  		}
 12231  		y := v_1.Args[0]
 12232  		v.Reset(ssaop.OpS390XSLD)
 12233  		v.AddArg2(x, y)
 12234  		return true
 12235  	}
 12236  	// match: (SLD x (MOVWZreg y))
 12237  	// result: (SLD x y)
 12238  	for {
 12239  		x := v_0
 12240  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 12241  			break
 12242  		}
 12243  		y := v_1.Args[0]
 12244  		v.Reset(ssaop.OpS390XSLD)
 12245  		v.AddArg2(x, y)
 12246  		return true
 12247  	}
 12248  	// match: (SLD x (MOVHZreg y))
 12249  	// result: (SLD x y)
 12250  	for {
 12251  		x := v_0
 12252  		if v_1.Op != ssaop.OpS390XMOVHZreg {
 12253  			break
 12254  		}
 12255  		y := v_1.Args[0]
 12256  		v.Reset(ssaop.OpS390XSLD)
 12257  		v.AddArg2(x, y)
 12258  		return true
 12259  	}
 12260  	// match: (SLD x (MOVBZreg y))
 12261  	// result: (SLD x y)
 12262  	for {
 12263  		x := v_0
 12264  		if v_1.Op != ssaop.OpS390XMOVBZreg {
 12265  			break
 12266  		}
 12267  		y := v_1.Args[0]
 12268  		v.Reset(ssaop.OpS390XSLD)
 12269  		v.AddArg2(x, y)
 12270  		return true
 12271  	}
 12272  	return false
 12273  }
 12274  func rewriteValue_OpS390XSLDconst(v *ssa.Value) bool {
 12275  	v_0 := v.Args[0]
 12276  	// match: (SLDconst (SRDconst x [c]) [d])
 12277  	// result: (RISBGZ x {s390x.NewRotateParams(uint8(max(0, int8(c-d))), 63-d, uint8(int8(d-c)&63))})
 12278  	for {
 12279  		d := ssa.AuxIntToUint8(v.AuxInt)
 12280  		if v_0.Op != ssaop.OpS390XSRDconst {
 12281  			break
 12282  		}
 12283  		c := ssa.AuxIntToUint8(v_0.AuxInt)
 12284  		x := v_0.Args[0]
 12285  		v.Reset(ssaop.OpS390XRISBGZ)
 12286  		v.Aux = ssa.S390xRotateParamsToAux(s390x.NewRotateParams(uint8(max(0, int8(c-d))), 63-d, uint8(int8(d-c)&63)))
 12287  		v.AddArg(x)
 12288  		return true
 12289  	}
 12290  	// match: (SLDconst (RISBGZ x {r}) [c])
 12291  	// cond: s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil
 12292  	// result: (RISBGZ x {(*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 12293  	for {
 12294  		c := ssa.AuxIntToUint8(v.AuxInt)
 12295  		if v_0.Op != ssaop.OpS390XRISBGZ {
 12296  			break
 12297  		}
 12298  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
 12299  		x := v_0.Args[0]
 12300  		if !(s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil) {
 12301  			break
 12302  		}
 12303  		v.Reset(ssaop.OpS390XRISBGZ)
 12304  		v.Aux = ssa.S390xRotateParamsToAux((*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount))
 12305  		v.AddArg(x)
 12306  		return true
 12307  	}
 12308  	// match: (SLDconst x [0])
 12309  	// result: x
 12310  	for {
 12311  		if ssa.AuxIntToUint8(v.AuxInt) != 0 {
 12312  			break
 12313  		}
 12314  		x := v_0
 12315  		v.CopyOf(x)
 12316  		return true
 12317  	}
 12318  	return false
 12319  }
 12320  func rewriteValue_OpS390XSLW(v *ssa.Value) bool {
 12321  	v_1 := v.Args[1]
 12322  	v_0 := v.Args[0]
 12323  	b := v.Block
 12324  	typ := &b.Func.Config.Types
 12325  	// match: (SLW x (MOVDconst [c]))
 12326  	// cond: c&32 == 0
 12327  	// result: (SLWconst x [uint8(c&31)])
 12328  	for {
 12329  		x := v_0
 12330  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12331  			break
 12332  		}
 12333  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12334  		if !(c&32 == 0) {
 12335  			break
 12336  		}
 12337  		v.Reset(ssaop.OpS390XSLWconst)
 12338  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 31))
 12339  		v.AddArg(x)
 12340  		return true
 12341  	}
 12342  	// match: (SLW _ (MOVDconst [c]))
 12343  	// cond: c&32 != 0
 12344  	// result: (MOVDconst [0])
 12345  	for {
 12346  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12347  			break
 12348  		}
 12349  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12350  		if !(c&32 != 0) {
 12351  			break
 12352  		}
 12353  		v.Reset(ssaop.OpS390XMOVDconst)
 12354  		v.AuxInt = ssa.Int64ToAuxInt(0)
 12355  		return true
 12356  	}
 12357  	// match: (SLW x (RISBGZ y {r}))
 12358  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12359  	// result: (SLW x y)
 12360  	for {
 12361  		x := v_0
 12362  		if v_1.Op != ssaop.OpS390XRISBGZ {
 12363  			break
 12364  		}
 12365  		r := ssa.AuxToS390xRotateParams(v_1.Aux)
 12366  		y := v_1.Args[0]
 12367  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12368  			break
 12369  		}
 12370  		v.Reset(ssaop.OpS390XSLW)
 12371  		v.AddArg2(x, y)
 12372  		return true
 12373  	}
 12374  	// match: (SLW x (AND (MOVDconst [c]) y))
 12375  	// result: (SLW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12376  	for {
 12377  		x := v_0
 12378  		if v_1.Op != ssaop.OpS390XAND {
 12379  			break
 12380  		}
 12381  		_ = v_1.Args[1]
 12382  		v_1_0 := v_1.Args[0]
 12383  		v_1_1 := v_1.Args[1]
 12384  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12385  			if v_1_0.Op != ssaop.OpS390XMOVDconst {
 12386  				continue
 12387  			}
 12388  			c := ssa.AuxIntToInt64(v_1_0.AuxInt)
 12389  			y := v_1_1
 12390  			v.Reset(ssaop.OpS390XSLW)
 12391  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
 12392  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c & 63))
 12393  			v0.AddArg(y)
 12394  			v.AddArg2(x, v0)
 12395  			return true
 12396  		}
 12397  		break
 12398  	}
 12399  	// match: (SLW x (ANDWconst [c] y))
 12400  	// cond: c&63 == 63
 12401  	// result: (SLW x y)
 12402  	for {
 12403  		x := v_0
 12404  		if v_1.Op != ssaop.OpS390XANDWconst {
 12405  			break
 12406  		}
 12407  		c := ssa.AuxIntToInt32(v_1.AuxInt)
 12408  		y := v_1.Args[0]
 12409  		if !(c&63 == 63) {
 12410  			break
 12411  		}
 12412  		v.Reset(ssaop.OpS390XSLW)
 12413  		v.AddArg2(x, y)
 12414  		return true
 12415  	}
 12416  	// match: (SLW x (MOVWreg y))
 12417  	// result: (SLW x y)
 12418  	for {
 12419  		x := v_0
 12420  		if v_1.Op != ssaop.OpS390XMOVWreg {
 12421  			break
 12422  		}
 12423  		y := v_1.Args[0]
 12424  		v.Reset(ssaop.OpS390XSLW)
 12425  		v.AddArg2(x, y)
 12426  		return true
 12427  	}
 12428  	// match: (SLW x (MOVHreg y))
 12429  	// result: (SLW x y)
 12430  	for {
 12431  		x := v_0
 12432  		if v_1.Op != ssaop.OpS390XMOVHreg {
 12433  			break
 12434  		}
 12435  		y := v_1.Args[0]
 12436  		v.Reset(ssaop.OpS390XSLW)
 12437  		v.AddArg2(x, y)
 12438  		return true
 12439  	}
 12440  	// match: (SLW x (MOVBreg y))
 12441  	// result: (SLW x y)
 12442  	for {
 12443  		x := v_0
 12444  		if v_1.Op != ssaop.OpS390XMOVBreg {
 12445  			break
 12446  		}
 12447  		y := v_1.Args[0]
 12448  		v.Reset(ssaop.OpS390XSLW)
 12449  		v.AddArg2(x, y)
 12450  		return true
 12451  	}
 12452  	// match: (SLW x (MOVWZreg y))
 12453  	// result: (SLW x y)
 12454  	for {
 12455  		x := v_0
 12456  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 12457  			break
 12458  		}
 12459  		y := v_1.Args[0]
 12460  		v.Reset(ssaop.OpS390XSLW)
 12461  		v.AddArg2(x, y)
 12462  		return true
 12463  	}
 12464  	// match: (SLW x (MOVHZreg y))
 12465  	// result: (SLW x y)
 12466  	for {
 12467  		x := v_0
 12468  		if v_1.Op != ssaop.OpS390XMOVHZreg {
 12469  			break
 12470  		}
 12471  		y := v_1.Args[0]
 12472  		v.Reset(ssaop.OpS390XSLW)
 12473  		v.AddArg2(x, y)
 12474  		return true
 12475  	}
 12476  	// match: (SLW x (MOVBZreg y))
 12477  	// result: (SLW x y)
 12478  	for {
 12479  		x := v_0
 12480  		if v_1.Op != ssaop.OpS390XMOVBZreg {
 12481  			break
 12482  		}
 12483  		y := v_1.Args[0]
 12484  		v.Reset(ssaop.OpS390XSLW)
 12485  		v.AddArg2(x, y)
 12486  		return true
 12487  	}
 12488  	return false
 12489  }
 12490  func rewriteValue_OpS390XSLWconst(v *ssa.Value) bool {
 12491  	v_0 := v.Args[0]
 12492  	// match: (SLWconst x [0])
 12493  	// result: x
 12494  	for {
 12495  		if ssa.AuxIntToUint8(v.AuxInt) != 0 {
 12496  			break
 12497  		}
 12498  		x := v_0
 12499  		v.CopyOf(x)
 12500  		return true
 12501  	}
 12502  	return false
 12503  }
 12504  func rewriteValue_OpS390XSRAD(v *ssa.Value) bool {
 12505  	v_1 := v.Args[1]
 12506  	v_0 := v.Args[0]
 12507  	b := v.Block
 12508  	typ := &b.Func.Config.Types
 12509  	// match: (SRAD x (MOVDconst [c]))
 12510  	// result: (SRADconst x [uint8(c&63)])
 12511  	for {
 12512  		x := v_0
 12513  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12514  			break
 12515  		}
 12516  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12517  		v.Reset(ssaop.OpS390XSRADconst)
 12518  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 63))
 12519  		v.AddArg(x)
 12520  		return true
 12521  	}
 12522  	// match: (SRAD x (RISBGZ y {r}))
 12523  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12524  	// result: (SRAD x y)
 12525  	for {
 12526  		x := v_0
 12527  		if v_1.Op != ssaop.OpS390XRISBGZ {
 12528  			break
 12529  		}
 12530  		r := ssa.AuxToS390xRotateParams(v_1.Aux)
 12531  		y := v_1.Args[0]
 12532  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12533  			break
 12534  		}
 12535  		v.Reset(ssaop.OpS390XSRAD)
 12536  		v.AddArg2(x, y)
 12537  		return true
 12538  	}
 12539  	// match: (SRAD x (AND (MOVDconst [c]) y))
 12540  	// result: (SRAD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12541  	for {
 12542  		x := v_0
 12543  		if v_1.Op != ssaop.OpS390XAND {
 12544  			break
 12545  		}
 12546  		_ = v_1.Args[1]
 12547  		v_1_0 := v_1.Args[0]
 12548  		v_1_1 := v_1.Args[1]
 12549  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12550  			if v_1_0.Op != ssaop.OpS390XMOVDconst {
 12551  				continue
 12552  			}
 12553  			c := ssa.AuxIntToInt64(v_1_0.AuxInt)
 12554  			y := v_1_1
 12555  			v.Reset(ssaop.OpS390XSRAD)
 12556  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
 12557  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c & 63))
 12558  			v0.AddArg(y)
 12559  			v.AddArg2(x, v0)
 12560  			return true
 12561  		}
 12562  		break
 12563  	}
 12564  	// match: (SRAD x (ANDWconst [c] y))
 12565  	// cond: c&63 == 63
 12566  	// result: (SRAD x y)
 12567  	for {
 12568  		x := v_0
 12569  		if v_1.Op != ssaop.OpS390XANDWconst {
 12570  			break
 12571  		}
 12572  		c := ssa.AuxIntToInt32(v_1.AuxInt)
 12573  		y := v_1.Args[0]
 12574  		if !(c&63 == 63) {
 12575  			break
 12576  		}
 12577  		v.Reset(ssaop.OpS390XSRAD)
 12578  		v.AddArg2(x, y)
 12579  		return true
 12580  	}
 12581  	// match: (SRAD x (MOVWreg y))
 12582  	// result: (SRAD x y)
 12583  	for {
 12584  		x := v_0
 12585  		if v_1.Op != ssaop.OpS390XMOVWreg {
 12586  			break
 12587  		}
 12588  		y := v_1.Args[0]
 12589  		v.Reset(ssaop.OpS390XSRAD)
 12590  		v.AddArg2(x, y)
 12591  		return true
 12592  	}
 12593  	// match: (SRAD x (MOVHreg y))
 12594  	// result: (SRAD x y)
 12595  	for {
 12596  		x := v_0
 12597  		if v_1.Op != ssaop.OpS390XMOVHreg {
 12598  			break
 12599  		}
 12600  		y := v_1.Args[0]
 12601  		v.Reset(ssaop.OpS390XSRAD)
 12602  		v.AddArg2(x, y)
 12603  		return true
 12604  	}
 12605  	// match: (SRAD x (MOVBreg y))
 12606  	// result: (SRAD x y)
 12607  	for {
 12608  		x := v_0
 12609  		if v_1.Op != ssaop.OpS390XMOVBreg {
 12610  			break
 12611  		}
 12612  		y := v_1.Args[0]
 12613  		v.Reset(ssaop.OpS390XSRAD)
 12614  		v.AddArg2(x, y)
 12615  		return true
 12616  	}
 12617  	// match: (SRAD x (MOVWZreg y))
 12618  	// result: (SRAD x y)
 12619  	for {
 12620  		x := v_0
 12621  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 12622  			break
 12623  		}
 12624  		y := v_1.Args[0]
 12625  		v.Reset(ssaop.OpS390XSRAD)
 12626  		v.AddArg2(x, y)
 12627  		return true
 12628  	}
 12629  	// match: (SRAD x (MOVHZreg y))
 12630  	// result: (SRAD x y)
 12631  	for {
 12632  		x := v_0
 12633  		if v_1.Op != ssaop.OpS390XMOVHZreg {
 12634  			break
 12635  		}
 12636  		y := v_1.Args[0]
 12637  		v.Reset(ssaop.OpS390XSRAD)
 12638  		v.AddArg2(x, y)
 12639  		return true
 12640  	}
 12641  	// match: (SRAD x (MOVBZreg y))
 12642  	// result: (SRAD x y)
 12643  	for {
 12644  		x := v_0
 12645  		if v_1.Op != ssaop.OpS390XMOVBZreg {
 12646  			break
 12647  		}
 12648  		y := v_1.Args[0]
 12649  		v.Reset(ssaop.OpS390XSRAD)
 12650  		v.AddArg2(x, y)
 12651  		return true
 12652  	}
 12653  	return false
 12654  }
 12655  func rewriteValue_OpS390XSRADconst(v *ssa.Value) bool {
 12656  	v_0 := v.Args[0]
 12657  	// match: (SRADconst x [0])
 12658  	// result: x
 12659  	for {
 12660  		if ssa.AuxIntToUint8(v.AuxInt) != 0 {
 12661  			break
 12662  		}
 12663  		x := v_0
 12664  		v.CopyOf(x)
 12665  		return true
 12666  	}
 12667  	// match: (SRADconst [c] (MOVDconst [d]))
 12668  	// result: (MOVDconst [d>>uint64(c)])
 12669  	for {
 12670  		c := ssa.AuxIntToUint8(v.AuxInt)
 12671  		if v_0.Op != ssaop.OpS390XMOVDconst {
 12672  			break
 12673  		}
 12674  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 12675  		v.Reset(ssaop.OpS390XMOVDconst)
 12676  		v.AuxInt = ssa.Int64ToAuxInt(d >> uint64(c))
 12677  		return true
 12678  	}
 12679  	return false
 12680  }
 12681  func rewriteValue_OpS390XSRAW(v *ssa.Value) bool {
 12682  	v_1 := v.Args[1]
 12683  	v_0 := v.Args[0]
 12684  	b := v.Block
 12685  	typ := &b.Func.Config.Types
 12686  	// match: (SRAW x (MOVDconst [c]))
 12687  	// cond: c&32 == 0
 12688  	// result: (SRAWconst x [uint8(c&31)])
 12689  	for {
 12690  		x := v_0
 12691  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12692  			break
 12693  		}
 12694  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12695  		if !(c&32 == 0) {
 12696  			break
 12697  		}
 12698  		v.Reset(ssaop.OpS390XSRAWconst)
 12699  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 31))
 12700  		v.AddArg(x)
 12701  		return true
 12702  	}
 12703  	// match: (SRAW x (MOVDconst [c]))
 12704  	// cond: c&32 != 0
 12705  	// result: (SRAWconst x [31])
 12706  	for {
 12707  		x := v_0
 12708  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12709  			break
 12710  		}
 12711  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12712  		if !(c&32 != 0) {
 12713  			break
 12714  		}
 12715  		v.Reset(ssaop.OpS390XSRAWconst)
 12716  		v.AuxInt = ssa.Uint8ToAuxInt(31)
 12717  		v.AddArg(x)
 12718  		return true
 12719  	}
 12720  	// match: (SRAW x (RISBGZ y {r}))
 12721  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12722  	// result: (SRAW x y)
 12723  	for {
 12724  		x := v_0
 12725  		if v_1.Op != ssaop.OpS390XRISBGZ {
 12726  			break
 12727  		}
 12728  		r := ssa.AuxToS390xRotateParams(v_1.Aux)
 12729  		y := v_1.Args[0]
 12730  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12731  			break
 12732  		}
 12733  		v.Reset(ssaop.OpS390XSRAW)
 12734  		v.AddArg2(x, y)
 12735  		return true
 12736  	}
 12737  	// match: (SRAW x (AND (MOVDconst [c]) y))
 12738  	// result: (SRAW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12739  	for {
 12740  		x := v_0
 12741  		if v_1.Op != ssaop.OpS390XAND {
 12742  			break
 12743  		}
 12744  		_ = v_1.Args[1]
 12745  		v_1_0 := v_1.Args[0]
 12746  		v_1_1 := v_1.Args[1]
 12747  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12748  			if v_1_0.Op != ssaop.OpS390XMOVDconst {
 12749  				continue
 12750  			}
 12751  			c := ssa.AuxIntToInt64(v_1_0.AuxInt)
 12752  			y := v_1_1
 12753  			v.Reset(ssaop.OpS390XSRAW)
 12754  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
 12755  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c & 63))
 12756  			v0.AddArg(y)
 12757  			v.AddArg2(x, v0)
 12758  			return true
 12759  		}
 12760  		break
 12761  	}
 12762  	// match: (SRAW x (ANDWconst [c] y))
 12763  	// cond: c&63 == 63
 12764  	// result: (SRAW x y)
 12765  	for {
 12766  		x := v_0
 12767  		if v_1.Op != ssaop.OpS390XANDWconst {
 12768  			break
 12769  		}
 12770  		c := ssa.AuxIntToInt32(v_1.AuxInt)
 12771  		y := v_1.Args[0]
 12772  		if !(c&63 == 63) {
 12773  			break
 12774  		}
 12775  		v.Reset(ssaop.OpS390XSRAW)
 12776  		v.AddArg2(x, y)
 12777  		return true
 12778  	}
 12779  	// match: (SRAW x (MOVWreg y))
 12780  	// result: (SRAW x y)
 12781  	for {
 12782  		x := v_0
 12783  		if v_1.Op != ssaop.OpS390XMOVWreg {
 12784  			break
 12785  		}
 12786  		y := v_1.Args[0]
 12787  		v.Reset(ssaop.OpS390XSRAW)
 12788  		v.AddArg2(x, y)
 12789  		return true
 12790  	}
 12791  	// match: (SRAW x (MOVHreg y))
 12792  	// result: (SRAW x y)
 12793  	for {
 12794  		x := v_0
 12795  		if v_1.Op != ssaop.OpS390XMOVHreg {
 12796  			break
 12797  		}
 12798  		y := v_1.Args[0]
 12799  		v.Reset(ssaop.OpS390XSRAW)
 12800  		v.AddArg2(x, y)
 12801  		return true
 12802  	}
 12803  	// match: (SRAW x (MOVBreg y))
 12804  	// result: (SRAW x y)
 12805  	for {
 12806  		x := v_0
 12807  		if v_1.Op != ssaop.OpS390XMOVBreg {
 12808  			break
 12809  		}
 12810  		y := v_1.Args[0]
 12811  		v.Reset(ssaop.OpS390XSRAW)
 12812  		v.AddArg2(x, y)
 12813  		return true
 12814  	}
 12815  	// match: (SRAW x (MOVWZreg y))
 12816  	// result: (SRAW x y)
 12817  	for {
 12818  		x := v_0
 12819  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 12820  			break
 12821  		}
 12822  		y := v_1.Args[0]
 12823  		v.Reset(ssaop.OpS390XSRAW)
 12824  		v.AddArg2(x, y)
 12825  		return true
 12826  	}
 12827  	// match: (SRAW x (MOVHZreg y))
 12828  	// result: (SRAW x y)
 12829  	for {
 12830  		x := v_0
 12831  		if v_1.Op != ssaop.OpS390XMOVHZreg {
 12832  			break
 12833  		}
 12834  		y := v_1.Args[0]
 12835  		v.Reset(ssaop.OpS390XSRAW)
 12836  		v.AddArg2(x, y)
 12837  		return true
 12838  	}
 12839  	// match: (SRAW x (MOVBZreg y))
 12840  	// result: (SRAW x y)
 12841  	for {
 12842  		x := v_0
 12843  		if v_1.Op != ssaop.OpS390XMOVBZreg {
 12844  			break
 12845  		}
 12846  		y := v_1.Args[0]
 12847  		v.Reset(ssaop.OpS390XSRAW)
 12848  		v.AddArg2(x, y)
 12849  		return true
 12850  	}
 12851  	return false
 12852  }
 12853  func rewriteValue_OpS390XSRAWconst(v *ssa.Value) bool {
 12854  	v_0 := v.Args[0]
 12855  	// match: (SRAWconst x [0])
 12856  	// result: x
 12857  	for {
 12858  		if ssa.AuxIntToUint8(v.AuxInt) != 0 {
 12859  			break
 12860  		}
 12861  		x := v_0
 12862  		v.CopyOf(x)
 12863  		return true
 12864  	}
 12865  	// match: (SRAWconst [c] (MOVDconst [d]))
 12866  	// result: (MOVDconst [int64(int32(d))>>uint64(c)])
 12867  	for {
 12868  		c := ssa.AuxIntToUint8(v.AuxInt)
 12869  		if v_0.Op != ssaop.OpS390XMOVDconst {
 12870  			break
 12871  		}
 12872  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 12873  		v.Reset(ssaop.OpS390XMOVDconst)
 12874  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(d)) >> uint64(c))
 12875  		return true
 12876  	}
 12877  	return false
 12878  }
 12879  func rewriteValue_OpS390XSRD(v *ssa.Value) bool {
 12880  	v_1 := v.Args[1]
 12881  	v_0 := v.Args[0]
 12882  	b := v.Block
 12883  	typ := &b.Func.Config.Types
 12884  	// match: (SRD x (MOVDconst [c]))
 12885  	// result: (SRDconst x [uint8(c&63)])
 12886  	for {
 12887  		x := v_0
 12888  		if v_1.Op != ssaop.OpS390XMOVDconst {
 12889  			break
 12890  		}
 12891  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 12892  		v.Reset(ssaop.OpS390XSRDconst)
 12893  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 63))
 12894  		v.AddArg(x)
 12895  		return true
 12896  	}
 12897  	// match: (SRD x (RISBGZ y {r}))
 12898  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12899  	// result: (SRD x y)
 12900  	for {
 12901  		x := v_0
 12902  		if v_1.Op != ssaop.OpS390XRISBGZ {
 12903  			break
 12904  		}
 12905  		r := ssa.AuxToS390xRotateParams(v_1.Aux)
 12906  		y := v_1.Args[0]
 12907  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12908  			break
 12909  		}
 12910  		v.Reset(ssaop.OpS390XSRD)
 12911  		v.AddArg2(x, y)
 12912  		return true
 12913  	}
 12914  	// match: (SRD x (AND (MOVDconst [c]) y))
 12915  	// result: (SRD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12916  	for {
 12917  		x := v_0
 12918  		if v_1.Op != ssaop.OpS390XAND {
 12919  			break
 12920  		}
 12921  		_ = v_1.Args[1]
 12922  		v_1_0 := v_1.Args[0]
 12923  		v_1_1 := v_1.Args[1]
 12924  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12925  			if v_1_0.Op != ssaop.OpS390XMOVDconst {
 12926  				continue
 12927  			}
 12928  			c := ssa.AuxIntToInt64(v_1_0.AuxInt)
 12929  			y := v_1_1
 12930  			v.Reset(ssaop.OpS390XSRD)
 12931  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
 12932  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c & 63))
 12933  			v0.AddArg(y)
 12934  			v.AddArg2(x, v0)
 12935  			return true
 12936  		}
 12937  		break
 12938  	}
 12939  	// match: (SRD x (ANDWconst [c] y))
 12940  	// cond: c&63 == 63
 12941  	// result: (SRD x y)
 12942  	for {
 12943  		x := v_0
 12944  		if v_1.Op != ssaop.OpS390XANDWconst {
 12945  			break
 12946  		}
 12947  		c := ssa.AuxIntToInt32(v_1.AuxInt)
 12948  		y := v_1.Args[0]
 12949  		if !(c&63 == 63) {
 12950  			break
 12951  		}
 12952  		v.Reset(ssaop.OpS390XSRD)
 12953  		v.AddArg2(x, y)
 12954  		return true
 12955  	}
 12956  	// match: (SRD x (MOVWreg y))
 12957  	// result: (SRD x y)
 12958  	for {
 12959  		x := v_0
 12960  		if v_1.Op != ssaop.OpS390XMOVWreg {
 12961  			break
 12962  		}
 12963  		y := v_1.Args[0]
 12964  		v.Reset(ssaop.OpS390XSRD)
 12965  		v.AddArg2(x, y)
 12966  		return true
 12967  	}
 12968  	// match: (SRD x (MOVHreg y))
 12969  	// result: (SRD x y)
 12970  	for {
 12971  		x := v_0
 12972  		if v_1.Op != ssaop.OpS390XMOVHreg {
 12973  			break
 12974  		}
 12975  		y := v_1.Args[0]
 12976  		v.Reset(ssaop.OpS390XSRD)
 12977  		v.AddArg2(x, y)
 12978  		return true
 12979  	}
 12980  	// match: (SRD x (MOVBreg y))
 12981  	// result: (SRD x y)
 12982  	for {
 12983  		x := v_0
 12984  		if v_1.Op != ssaop.OpS390XMOVBreg {
 12985  			break
 12986  		}
 12987  		y := v_1.Args[0]
 12988  		v.Reset(ssaop.OpS390XSRD)
 12989  		v.AddArg2(x, y)
 12990  		return true
 12991  	}
 12992  	// match: (SRD x (MOVWZreg y))
 12993  	// result: (SRD x y)
 12994  	for {
 12995  		x := v_0
 12996  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 12997  			break
 12998  		}
 12999  		y := v_1.Args[0]
 13000  		v.Reset(ssaop.OpS390XSRD)
 13001  		v.AddArg2(x, y)
 13002  		return true
 13003  	}
 13004  	// match: (SRD x (MOVHZreg y))
 13005  	// result: (SRD x y)
 13006  	for {
 13007  		x := v_0
 13008  		if v_1.Op != ssaop.OpS390XMOVHZreg {
 13009  			break
 13010  		}
 13011  		y := v_1.Args[0]
 13012  		v.Reset(ssaop.OpS390XSRD)
 13013  		v.AddArg2(x, y)
 13014  		return true
 13015  	}
 13016  	// match: (SRD x (MOVBZreg y))
 13017  	// result: (SRD x y)
 13018  	for {
 13019  		x := v_0
 13020  		if v_1.Op != ssaop.OpS390XMOVBZreg {
 13021  			break
 13022  		}
 13023  		y := v_1.Args[0]
 13024  		v.Reset(ssaop.OpS390XSRD)
 13025  		v.AddArg2(x, y)
 13026  		return true
 13027  	}
 13028  	return false
 13029  }
 13030  func rewriteValue_OpS390XSRDconst(v *ssa.Value) bool {
 13031  	v_0 := v.Args[0]
 13032  	// match: (SRDconst (SLDconst x [c]) [d])
 13033  	// result: (RISBGZ x {s390x.NewRotateParams(d, uint8(min(63, int8(63-c+d))), uint8(int8(c-d)&63))})
 13034  	for {
 13035  		d := ssa.AuxIntToUint8(v.AuxInt)
 13036  		if v_0.Op != ssaop.OpS390XSLDconst {
 13037  			break
 13038  		}
 13039  		c := ssa.AuxIntToUint8(v_0.AuxInt)
 13040  		x := v_0.Args[0]
 13041  		v.Reset(ssaop.OpS390XRISBGZ)
 13042  		v.Aux = ssa.S390xRotateParamsToAux(s390x.NewRotateParams(d, uint8(min(63, int8(63-c+d))), uint8(int8(c-d)&63)))
 13043  		v.AddArg(x)
 13044  		return true
 13045  	}
 13046  	// match: (SRDconst (RISBGZ x {r}) [c])
 13047  	// cond: s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil
 13048  	// result: (RISBGZ x {(*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 13049  	for {
 13050  		c := ssa.AuxIntToUint8(v.AuxInt)
 13051  		if v_0.Op != ssaop.OpS390XRISBGZ {
 13052  			break
 13053  		}
 13054  		r := ssa.AuxToS390xRotateParams(v_0.Aux)
 13055  		x := v_0.Args[0]
 13056  		if !(s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil) {
 13057  			break
 13058  		}
 13059  		v.Reset(ssaop.OpS390XRISBGZ)
 13060  		v.Aux = ssa.S390xRotateParamsToAux((*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount))
 13061  		v.AddArg(x)
 13062  		return true
 13063  	}
 13064  	// match: (SRDconst x [0])
 13065  	// result: x
 13066  	for {
 13067  		if ssa.AuxIntToUint8(v.AuxInt) != 0 {
 13068  			break
 13069  		}
 13070  		x := v_0
 13071  		v.CopyOf(x)
 13072  		return true
 13073  	}
 13074  	return false
 13075  }
 13076  func rewriteValue_OpS390XSRW(v *ssa.Value) bool {
 13077  	v_1 := v.Args[1]
 13078  	v_0 := v.Args[0]
 13079  	b := v.Block
 13080  	typ := &b.Func.Config.Types
 13081  	// match: (SRW x (MOVDconst [c]))
 13082  	// cond: c&32 == 0
 13083  	// result: (SRWconst x [uint8(c&31)])
 13084  	for {
 13085  		x := v_0
 13086  		if v_1.Op != ssaop.OpS390XMOVDconst {
 13087  			break
 13088  		}
 13089  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13090  		if !(c&32 == 0) {
 13091  			break
 13092  		}
 13093  		v.Reset(ssaop.OpS390XSRWconst)
 13094  		v.AuxInt = ssa.Uint8ToAuxInt(uint8(c & 31))
 13095  		v.AddArg(x)
 13096  		return true
 13097  	}
 13098  	// match: (SRW _ (MOVDconst [c]))
 13099  	// cond: c&32 != 0
 13100  	// result: (MOVDconst [0])
 13101  	for {
 13102  		if v_1.Op != ssaop.OpS390XMOVDconst {
 13103  			break
 13104  		}
 13105  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13106  		if !(c&32 != 0) {
 13107  			break
 13108  		}
 13109  		v.Reset(ssaop.OpS390XMOVDconst)
 13110  		v.AuxInt = ssa.Int64ToAuxInt(0)
 13111  		return true
 13112  	}
 13113  	// match: (SRW x (RISBGZ y {r}))
 13114  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13115  	// result: (SRW x y)
 13116  	for {
 13117  		x := v_0
 13118  		if v_1.Op != ssaop.OpS390XRISBGZ {
 13119  			break
 13120  		}
 13121  		r := ssa.AuxToS390xRotateParams(v_1.Aux)
 13122  		y := v_1.Args[0]
 13123  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13124  			break
 13125  		}
 13126  		v.Reset(ssaop.OpS390XSRW)
 13127  		v.AddArg2(x, y)
 13128  		return true
 13129  	}
 13130  	// match: (SRW x (AND (MOVDconst [c]) y))
 13131  	// result: (SRW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13132  	for {
 13133  		x := v_0
 13134  		if v_1.Op != ssaop.OpS390XAND {
 13135  			break
 13136  		}
 13137  		_ = v_1.Args[1]
 13138  		v_1_0 := v_1.Args[0]
 13139  		v_1_1 := v_1.Args[1]
 13140  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13141  			if v_1_0.Op != ssaop.OpS390XMOVDconst {
 13142  				continue
 13143  			}
 13144  			c := ssa.AuxIntToInt64(v_1_0.AuxInt)
 13145  			y := v_1_1
 13146  			v.Reset(ssaop.OpS390XSRW)
 13147  			v0 := b.NewValue0(v.Pos, ssaop.OpS390XANDWconst, typ.UInt32)
 13148  			v0.AuxInt = ssa.Int32ToAuxInt(int32(c & 63))
 13149  			v0.AddArg(y)
 13150  			v.AddArg2(x, v0)
 13151  			return true
 13152  		}
 13153  		break
 13154  	}
 13155  	// match: (SRW x (ANDWconst [c] y))
 13156  	// cond: c&63 == 63
 13157  	// result: (SRW x y)
 13158  	for {
 13159  		x := v_0
 13160  		if v_1.Op != ssaop.OpS390XANDWconst {
 13161  			break
 13162  		}
 13163  		c := ssa.AuxIntToInt32(v_1.AuxInt)
 13164  		y := v_1.Args[0]
 13165  		if !(c&63 == 63) {
 13166  			break
 13167  		}
 13168  		v.Reset(ssaop.OpS390XSRW)
 13169  		v.AddArg2(x, y)
 13170  		return true
 13171  	}
 13172  	// match: (SRW x (MOVWreg y))
 13173  	// result: (SRW x y)
 13174  	for {
 13175  		x := v_0
 13176  		if v_1.Op != ssaop.OpS390XMOVWreg {
 13177  			break
 13178  		}
 13179  		y := v_1.Args[0]
 13180  		v.Reset(ssaop.OpS390XSRW)
 13181  		v.AddArg2(x, y)
 13182  		return true
 13183  	}
 13184  	// match: (SRW x (MOVHreg y))
 13185  	// result: (SRW x y)
 13186  	for {
 13187  		x := v_0
 13188  		if v_1.Op != ssaop.OpS390XMOVHreg {
 13189  			break
 13190  		}
 13191  		y := v_1.Args[0]
 13192  		v.Reset(ssaop.OpS390XSRW)
 13193  		v.AddArg2(x, y)
 13194  		return true
 13195  	}
 13196  	// match: (SRW x (MOVBreg y))
 13197  	// result: (SRW x y)
 13198  	for {
 13199  		x := v_0
 13200  		if v_1.Op != ssaop.OpS390XMOVBreg {
 13201  			break
 13202  		}
 13203  		y := v_1.Args[0]
 13204  		v.Reset(ssaop.OpS390XSRW)
 13205  		v.AddArg2(x, y)
 13206  		return true
 13207  	}
 13208  	// match: (SRW x (MOVWZreg y))
 13209  	// result: (SRW x y)
 13210  	for {
 13211  		x := v_0
 13212  		if v_1.Op != ssaop.OpS390XMOVWZreg {
 13213  			break
 13214  		}
 13215  		y := v_1.Args[0]
 13216  		v.Reset(ssaop.OpS390XSRW)
 13217  		v.AddArg2(x, y)
 13218  		return true
 13219  	}
 13220  	// match: (SRW x (MOVHZreg y))
 13221  	// result: (SRW x y)
 13222  	for {
 13223  		x := v_0
 13224  		if v_1.Op != ssaop.OpS390XMOVHZreg {
 13225  			break
 13226  		}
 13227  		y := v_1.Args[0]
 13228  		v.Reset(ssaop.OpS390XSRW)
 13229  		v.AddArg2(x, y)
 13230  		return true
 13231  	}
 13232  	// match: (SRW x (MOVBZreg y))
 13233  	// result: (SRW x y)
 13234  	for {
 13235  		x := v_0
 13236  		if v_1.Op != ssaop.OpS390XMOVBZreg {
 13237  			break
 13238  		}
 13239  		y := v_1.Args[0]
 13240  		v.Reset(ssaop.OpS390XSRW)
 13241  		v.AddArg2(x, y)
 13242  		return true
 13243  	}
 13244  	return false
 13245  }
 13246  func rewriteValue_OpS390XSRWconst(v *ssa.Value) bool {
 13247  	v_0 := v.Args[0]
 13248  	// match: (SRWconst x [0])
 13249  	// result: x
 13250  	for {
 13251  		if ssa.AuxIntToUint8(v.AuxInt) != 0 {
 13252  			break
 13253  		}
 13254  		x := v_0
 13255  		v.CopyOf(x)
 13256  		return true
 13257  	}
 13258  	return false
 13259  }
 13260  func rewriteValue_OpS390XSTM2(v *ssa.Value) bool {
 13261  	v_3 := v.Args[3]
 13262  	v_2 := v.Args[2]
 13263  	v_1 := v.Args[1]
 13264  	v_0 := v.Args[0]
 13265  	// match: (STM2 [i] {s} p w2 w3 x:(STM2 [i-8] {s} p w0 w1 mem))
 13266  	// cond: x.Uses == 1 && ssa.Is20Bit(int64(i)-8) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
 13267  	// result: (STM4 [i-8] {s} p w0 w1 w2 w3 mem)
 13268  	for {
 13269  		i := ssa.AuxIntToInt32(v.AuxInt)
 13270  		s := ssa.AuxToSym(v.Aux)
 13271  		p := v_0
 13272  		w2 := v_1
 13273  		w3 := v_2
 13274  		x := v_3
 13275  		if x.Op != ssaop.OpS390XSTM2 || ssa.AuxIntToInt32(x.AuxInt) != i-8 || ssa.AuxToSym(x.Aux) != s {
 13276  			break
 13277  		}
 13278  		mem := x.Args[3]
 13279  		if p != x.Args[0] {
 13280  			break
 13281  		}
 13282  		w0 := x.Args[1]
 13283  		w1 := x.Args[2]
 13284  		if !(x.Uses == 1 && ssa.Is20Bit(int64(i)-8) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
 13285  			break
 13286  		}
 13287  		v.Reset(ssaop.OpS390XSTM4)
 13288  		v.AuxInt = ssa.Int32ToAuxInt(i - 8)
 13289  		v.Aux = ssa.SymToAux(s)
 13290  		v.AddArg6(p, w0, w1, w2, w3, mem)
 13291  		return true
 13292  	}
 13293  	// match: (STM2 [i] {s} p (SRDconst [32] x) x mem)
 13294  	// result: (MOVDstore [i] {s} p x mem)
 13295  	for {
 13296  		i := ssa.AuxIntToInt32(v.AuxInt)
 13297  		s := ssa.AuxToSym(v.Aux)
 13298  		p := v_0
 13299  		if v_1.Op != ssaop.OpS390XSRDconst || ssa.AuxIntToUint8(v_1.AuxInt) != 32 {
 13300  			break
 13301  		}
 13302  		x := v_1.Args[0]
 13303  		if x != v_2 {
 13304  			break
 13305  		}
 13306  		mem := v_3
 13307  		v.Reset(ssaop.OpS390XMOVDstore)
 13308  		v.AuxInt = ssa.Int32ToAuxInt(i)
 13309  		v.Aux = ssa.SymToAux(s)
 13310  		v.AddArg3(p, x, mem)
 13311  		return true
 13312  	}
 13313  	return false
 13314  }
 13315  func rewriteValue_OpS390XSTMG2(v *ssa.Value) bool {
 13316  	v_3 := v.Args[3]
 13317  	v_2 := v.Args[2]
 13318  	v_1 := v.Args[1]
 13319  	v_0 := v.Args[0]
 13320  	// match: (STMG2 [i] {s} p w2 w3 x:(STMG2 [i-16] {s} p w0 w1 mem))
 13321  	// cond: x.Uses == 1 && ssa.Is20Bit(int64(i)-16) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)
 13322  	// result: (STMG4 [i-16] {s} p w0 w1 w2 w3 mem)
 13323  	for {
 13324  		i := ssa.AuxIntToInt32(v.AuxInt)
 13325  		s := ssa.AuxToSym(v.Aux)
 13326  		p := v_0
 13327  		w2 := v_1
 13328  		w3 := v_2
 13329  		x := v_3
 13330  		if x.Op != ssaop.OpS390XSTMG2 || ssa.AuxIntToInt32(x.AuxInt) != i-16 || ssa.AuxToSym(x.Aux) != s {
 13331  			break
 13332  		}
 13333  		mem := x.Args[3]
 13334  		if p != x.Args[0] {
 13335  			break
 13336  		}
 13337  		w0 := x.Args[1]
 13338  		w1 := x.Args[2]
 13339  		if !(x.Uses == 1 && ssa.Is20Bit(int64(i)-16) && ssa.SetPos(v, x.Pos) && ssa.Clobber(x)) {
 13340  			break
 13341  		}
 13342  		v.Reset(ssaop.OpS390XSTMG4)
 13343  		v.AuxInt = ssa.Int32ToAuxInt(i - 16)
 13344  		v.Aux = ssa.SymToAux(s)
 13345  		v.AddArg6(p, w0, w1, w2, w3, mem)
 13346  		return true
 13347  	}
 13348  	return false
 13349  }
 13350  func rewriteValue_OpS390XSUB(v *ssa.Value) bool {
 13351  	v_1 := v.Args[1]
 13352  	v_0 := v.Args[0]
 13353  	b := v.Block
 13354  	// match: (SUB x (MOVDconst [c]))
 13355  	// cond: ssa.Is32Bit(c)
 13356  	// result: (SUBconst x [int32(c)])
 13357  	for {
 13358  		x := v_0
 13359  		if v_1.Op != ssaop.OpS390XMOVDconst {
 13360  			break
 13361  		}
 13362  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13363  		if !(ssa.Is32Bit(c)) {
 13364  			break
 13365  		}
 13366  		v.Reset(ssaop.OpS390XSUBconst)
 13367  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 13368  		v.AddArg(x)
 13369  		return true
 13370  	}
 13371  	// match: (SUB (MOVDconst [c]) x)
 13372  	// cond: ssa.Is32Bit(c)
 13373  	// result: (NEG (SUBconst <v.Type> x [int32(c)]))
 13374  	for {
 13375  		if v_0.Op != ssaop.OpS390XMOVDconst {
 13376  			break
 13377  		}
 13378  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 13379  		x := v_1
 13380  		if !(ssa.Is32Bit(c)) {
 13381  			break
 13382  		}
 13383  		v.Reset(ssaop.OpS390XNEG)
 13384  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSUBconst, v.Type)
 13385  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
 13386  		v0.AddArg(x)
 13387  		v.AddArg(v0)
 13388  		return true
 13389  	}
 13390  	// match: (SUB x (NEG y))
 13391  	// result: (ADD x y)
 13392  	for {
 13393  		x := v_0
 13394  		if v_1.Op != ssaop.OpS390XNEG {
 13395  			break
 13396  		}
 13397  		y := v_1.Args[0]
 13398  		v.Reset(ssaop.OpS390XADD)
 13399  		v.AddArg2(x, y)
 13400  		return true
 13401  	}
 13402  	// match: (SUB x x)
 13403  	// result: (MOVDconst [0])
 13404  	for {
 13405  		x := v_0
 13406  		if x != v_1 {
 13407  			break
 13408  		}
 13409  		v.Reset(ssaop.OpS390XMOVDconst)
 13410  		v.AuxInt = ssa.Int64ToAuxInt(0)
 13411  		return true
 13412  	}
 13413  	// match: (SUB <t> x g:(MOVDload [off] {sym} ptr mem))
 13414  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 13415  	// result: (SUBload <t> [off] {sym} x ptr mem)
 13416  	for {
 13417  		t := v.Type
 13418  		x := v_0
 13419  		g := v_1
 13420  		if g.Op != ssaop.OpS390XMOVDload {
 13421  			break
 13422  		}
 13423  		off := ssa.AuxIntToInt32(g.AuxInt)
 13424  		sym := ssa.AuxToSym(g.Aux)
 13425  		mem := g.Args[1]
 13426  		ptr := g.Args[0]
 13427  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 13428  			break
 13429  		}
 13430  		v.Reset(ssaop.OpS390XSUBload)
 13431  		v.Type = t
 13432  		v.AuxInt = ssa.Int32ToAuxInt(off)
 13433  		v.Aux = ssa.SymToAux(sym)
 13434  		v.AddArg3(x, ptr, mem)
 13435  		return true
 13436  	}
 13437  	return false
 13438  }
 13439  func rewriteValue_OpS390XSUBE(v *ssa.Value) bool {
 13440  	v_2 := v.Args[2]
 13441  	v_1 := v.Args[1]
 13442  	v_0 := v.Args[0]
 13443  	// match: (SUBE x y (FlagGT))
 13444  	// result: (SUBC x y)
 13445  	for {
 13446  		x := v_0
 13447  		y := v_1
 13448  		if v_2.Op != ssaop.OpS390XFlagGT {
 13449  			break
 13450  		}
 13451  		v.Reset(ssaop.OpS390XSUBC)
 13452  		v.AddArg2(x, y)
 13453  		return true
 13454  	}
 13455  	// match: (SUBE x y (FlagOV))
 13456  	// result: (SUBC x y)
 13457  	for {
 13458  		x := v_0
 13459  		y := v_1
 13460  		if v_2.Op != ssaop.OpS390XFlagOV {
 13461  			break
 13462  		}
 13463  		v.Reset(ssaop.OpS390XSUBC)
 13464  		v.AddArg2(x, y)
 13465  		return true
 13466  	}
 13467  	// match: (SUBE x y (Select1 (SUBC (MOVDconst [0]) (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) c))))))
 13468  	// result: (SUBE x y c)
 13469  	for {
 13470  		x := v_0
 13471  		y := v_1
 13472  		if v_2.Op != ssaop.OpSelect1 {
 13473  			break
 13474  		}
 13475  		v_2_0 := v_2.Args[0]
 13476  		if v_2_0.Op != ssaop.OpS390XSUBC {
 13477  			break
 13478  		}
 13479  		_ = v_2_0.Args[1]
 13480  		v_2_0_0 := v_2_0.Args[0]
 13481  		if v_2_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_2_0_0.AuxInt) != 0 {
 13482  			break
 13483  		}
 13484  		v_2_0_1 := v_2_0.Args[1]
 13485  		if v_2_0_1.Op != ssaop.OpS390XNEG {
 13486  			break
 13487  		}
 13488  		v_2_0_1_0 := v_2_0_1.Args[0]
 13489  		if v_2_0_1_0.Op != ssaop.OpSelect0 {
 13490  			break
 13491  		}
 13492  		v_2_0_1_0_0 := v_2_0_1_0.Args[0]
 13493  		if v_2_0_1_0_0.Op != ssaop.OpS390XSUBE {
 13494  			break
 13495  		}
 13496  		c := v_2_0_1_0_0.Args[2]
 13497  		v_2_0_1_0_0_0 := v_2_0_1_0_0.Args[0]
 13498  		if v_2_0_1_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_2_0_1_0_0_0.AuxInt) != 0 {
 13499  			break
 13500  		}
 13501  		v_2_0_1_0_0_1 := v_2_0_1_0_0.Args[1]
 13502  		if v_2_0_1_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_2_0_1_0_0_1.AuxInt) != 0 {
 13503  			break
 13504  		}
 13505  		v.Reset(ssaop.OpS390XSUBE)
 13506  		v.AddArg3(x, y, c)
 13507  		return true
 13508  	}
 13509  	return false
 13510  }
 13511  func rewriteValue_OpS390XSUBW(v *ssa.Value) bool {
 13512  	v_1 := v.Args[1]
 13513  	v_0 := v.Args[0]
 13514  	b := v.Block
 13515  	// match: (SUBW x (MOVDconst [c]))
 13516  	// result: (SUBWconst x [int32(c)])
 13517  	for {
 13518  		x := v_0
 13519  		if v_1.Op != ssaop.OpS390XMOVDconst {
 13520  			break
 13521  		}
 13522  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 13523  		v.Reset(ssaop.OpS390XSUBWconst)
 13524  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 13525  		v.AddArg(x)
 13526  		return true
 13527  	}
 13528  	// match: (SUBW (MOVDconst [c]) x)
 13529  	// result: (NEGW (SUBWconst <v.Type> x [int32(c)]))
 13530  	for {
 13531  		if v_0.Op != ssaop.OpS390XMOVDconst {
 13532  			break
 13533  		}
 13534  		c := ssa.AuxIntToInt64(v_0.AuxInt)
 13535  		x := v_1
 13536  		v.Reset(ssaop.OpS390XNEGW)
 13537  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSUBWconst, v.Type)
 13538  		v0.AuxInt = ssa.Int32ToAuxInt(int32(c))
 13539  		v0.AddArg(x)
 13540  		v.AddArg(v0)
 13541  		return true
 13542  	}
 13543  	// match: (SUBW x (NEGW y))
 13544  	// result: (ADDW x y)
 13545  	for {
 13546  		x := v_0
 13547  		if v_1.Op != ssaop.OpS390XNEGW {
 13548  			break
 13549  		}
 13550  		y := v_1.Args[0]
 13551  		v.Reset(ssaop.OpS390XADDW)
 13552  		v.AddArg2(x, y)
 13553  		return true
 13554  	}
 13555  	// match: (SUBW x x)
 13556  	// result: (MOVDconst [0])
 13557  	for {
 13558  		x := v_0
 13559  		if x != v_1 {
 13560  			break
 13561  		}
 13562  		v.Reset(ssaop.OpS390XMOVDconst)
 13563  		v.AuxInt = ssa.Int64ToAuxInt(0)
 13564  		return true
 13565  	}
 13566  	// match: (SUBW <t> x g:(MOVWload [off] {sym} ptr mem))
 13567  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 13568  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 13569  	for {
 13570  		t := v.Type
 13571  		x := v_0
 13572  		g := v_1
 13573  		if g.Op != ssaop.OpS390XMOVWload {
 13574  			break
 13575  		}
 13576  		off := ssa.AuxIntToInt32(g.AuxInt)
 13577  		sym := ssa.AuxToSym(g.Aux)
 13578  		mem := g.Args[1]
 13579  		ptr := g.Args[0]
 13580  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 13581  			break
 13582  		}
 13583  		v.Reset(ssaop.OpS390XSUBWload)
 13584  		v.Type = t
 13585  		v.AuxInt = ssa.Int32ToAuxInt(off)
 13586  		v.Aux = ssa.SymToAux(sym)
 13587  		v.AddArg3(x, ptr, mem)
 13588  		return true
 13589  	}
 13590  	// match: (SUBW <t> x g:(MOVWZload [off] {sym} ptr mem))
 13591  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 13592  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 13593  	for {
 13594  		t := v.Type
 13595  		x := v_0
 13596  		g := v_1
 13597  		if g.Op != ssaop.OpS390XMOVWZload {
 13598  			break
 13599  		}
 13600  		off := ssa.AuxIntToInt32(g.AuxInt)
 13601  		sym := ssa.AuxToSym(g.Aux)
 13602  		mem := g.Args[1]
 13603  		ptr := g.Args[0]
 13604  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 13605  			break
 13606  		}
 13607  		v.Reset(ssaop.OpS390XSUBWload)
 13608  		v.Type = t
 13609  		v.AuxInt = ssa.Int32ToAuxInt(off)
 13610  		v.Aux = ssa.SymToAux(sym)
 13611  		v.AddArg3(x, ptr, mem)
 13612  		return true
 13613  	}
 13614  	return false
 13615  }
 13616  func rewriteValue_OpS390XSUBWconst(v *ssa.Value) bool {
 13617  	v_0 := v.Args[0]
 13618  	// match: (SUBWconst [c] x)
 13619  	// cond: int32(c) == 0
 13620  	// result: x
 13621  	for {
 13622  		c := ssa.AuxIntToInt32(v.AuxInt)
 13623  		x := v_0
 13624  		if !(int32(c) == 0) {
 13625  			break
 13626  		}
 13627  		v.CopyOf(x)
 13628  		return true
 13629  	}
 13630  	// match: (SUBWconst [c] x)
 13631  	// result: (ADDWconst [-int32(c)] x)
 13632  	for {
 13633  		c := ssa.AuxIntToInt32(v.AuxInt)
 13634  		x := v_0
 13635  		v.Reset(ssaop.OpS390XADDWconst)
 13636  		v.AuxInt = ssa.Int32ToAuxInt(-int32(c))
 13637  		v.AddArg(x)
 13638  		return true
 13639  	}
 13640  }
 13641  func rewriteValue_OpS390XSUBWload(v *ssa.Value) bool {
 13642  	v_2 := v.Args[2]
 13643  	v_1 := v.Args[1]
 13644  	v_0 := v.Args[0]
 13645  	// match: (SUBWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13646  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 13647  	// result: (SUBWload [off1+off2] {sym} x ptr mem)
 13648  	for {
 13649  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 13650  		sym := ssa.AuxToSym(v.Aux)
 13651  		x := v_0
 13652  		if v_1.Op != ssaop.OpS390XADDconst {
 13653  			break
 13654  		}
 13655  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 13656  		ptr := v_1.Args[0]
 13657  		mem := v_2
 13658  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 13659  			break
 13660  		}
 13661  		v.Reset(ssaop.OpS390XSUBWload)
 13662  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 13663  		v.Aux = ssa.SymToAux(sym)
 13664  		v.AddArg3(x, ptr, mem)
 13665  		return true
 13666  	}
 13667  	// match: (SUBWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 13668  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 13669  	// result: (SUBWload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 13670  	for {
 13671  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 13672  		s1 := ssa.AuxToSym(v.Aux)
 13673  		x := v_0
 13674  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 13675  			break
 13676  		}
 13677  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 13678  		s2 := ssa.AuxToSym(v_1.Aux)
 13679  		ptr := v_1.Args[0]
 13680  		mem := v_2
 13681  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 13682  			break
 13683  		}
 13684  		v.Reset(ssaop.OpS390XSUBWload)
 13685  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 13686  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 13687  		v.AddArg3(x, ptr, mem)
 13688  		return true
 13689  	}
 13690  	return false
 13691  }
 13692  func rewriteValue_OpS390XSUBconst(v *ssa.Value) bool {
 13693  	v_0 := v.Args[0]
 13694  	// match: (SUBconst [0] x)
 13695  	// result: x
 13696  	for {
 13697  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
 13698  			break
 13699  		}
 13700  		x := v_0
 13701  		v.CopyOf(x)
 13702  		return true
 13703  	}
 13704  	// match: (SUBconst [c] x)
 13705  	// cond: c != -(1<<31)
 13706  	// result: (ADDconst [-c] x)
 13707  	for {
 13708  		c := ssa.AuxIntToInt32(v.AuxInt)
 13709  		x := v_0
 13710  		if !(c != -(1 << 31)) {
 13711  			break
 13712  		}
 13713  		v.Reset(ssaop.OpS390XADDconst)
 13714  		v.AuxInt = ssa.Int32ToAuxInt(-c)
 13715  		v.AddArg(x)
 13716  		return true
 13717  	}
 13718  	// match: (SUBconst (MOVDconst [d]) [c])
 13719  	// result: (MOVDconst [d-int64(c)])
 13720  	for {
 13721  		c := ssa.AuxIntToInt32(v.AuxInt)
 13722  		if v_0.Op != ssaop.OpS390XMOVDconst {
 13723  			break
 13724  		}
 13725  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 13726  		v.Reset(ssaop.OpS390XMOVDconst)
 13727  		v.AuxInt = ssa.Int64ToAuxInt(d - int64(c))
 13728  		return true
 13729  	}
 13730  	// match: (SUBconst (SUBconst x [d]) [c])
 13731  	// cond: ssa.Is32Bit(-int64(c)-int64(d))
 13732  	// result: (ADDconst [-c-d] x)
 13733  	for {
 13734  		c := ssa.AuxIntToInt32(v.AuxInt)
 13735  		if v_0.Op != ssaop.OpS390XSUBconst {
 13736  			break
 13737  		}
 13738  		d := ssa.AuxIntToInt32(v_0.AuxInt)
 13739  		x := v_0.Args[0]
 13740  		if !(ssa.Is32Bit(-int64(c) - int64(d))) {
 13741  			break
 13742  		}
 13743  		v.Reset(ssaop.OpS390XADDconst)
 13744  		v.AuxInt = ssa.Int32ToAuxInt(-c - d)
 13745  		v.AddArg(x)
 13746  		return true
 13747  	}
 13748  	return false
 13749  }
 13750  func rewriteValue_OpS390XSUBload(v *ssa.Value) bool {
 13751  	v_2 := v.Args[2]
 13752  	v_1 := v.Args[1]
 13753  	v_0 := v.Args[0]
 13754  	b := v.Block
 13755  	// match: (SUBload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 13756  	// cond: ssa.IsSamePtr(ptr1, ptr2)
 13757  	// result: (SUB x (LGDR <t> y))
 13758  	for {
 13759  		t := v.Type
 13760  		off := ssa.AuxIntToInt32(v.AuxInt)
 13761  		sym := ssa.AuxToSym(v.Aux)
 13762  		x := v_0
 13763  		ptr1 := v_1
 13764  		if v_2.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_2.AuxInt) != off || ssa.AuxToSym(v_2.Aux) != sym {
 13765  			break
 13766  		}
 13767  		y := v_2.Args[1]
 13768  		ptr2 := v_2.Args[0]
 13769  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
 13770  			break
 13771  		}
 13772  		v.Reset(ssaop.OpS390XSUB)
 13773  		v0 := b.NewValue0(v_2.Pos, ssaop.OpS390XLGDR, t)
 13774  		v0.AddArg(y)
 13775  		v.AddArg2(x, v0)
 13776  		return true
 13777  	}
 13778  	// match: (SUBload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13779  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 13780  	// result: (SUBload [off1+off2] {sym} x ptr mem)
 13781  	for {
 13782  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 13783  		sym := ssa.AuxToSym(v.Aux)
 13784  		x := v_0
 13785  		if v_1.Op != ssaop.OpS390XADDconst {
 13786  			break
 13787  		}
 13788  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 13789  		ptr := v_1.Args[0]
 13790  		mem := v_2
 13791  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 13792  			break
 13793  		}
 13794  		v.Reset(ssaop.OpS390XSUBload)
 13795  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 13796  		v.Aux = ssa.SymToAux(sym)
 13797  		v.AddArg3(x, ptr, mem)
 13798  		return true
 13799  	}
 13800  	// match: (SUBload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 13801  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 13802  	// result: (SUBload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 13803  	for {
 13804  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 13805  		s1 := ssa.AuxToSym(v.Aux)
 13806  		x := v_0
 13807  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 13808  			break
 13809  		}
 13810  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 13811  		s2 := ssa.AuxToSym(v_1.Aux)
 13812  		ptr := v_1.Args[0]
 13813  		mem := v_2
 13814  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 13815  			break
 13816  		}
 13817  		v.Reset(ssaop.OpS390XSUBload)
 13818  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 13819  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 13820  		v.AddArg3(x, ptr, mem)
 13821  		return true
 13822  	}
 13823  	return false
 13824  }
 13825  func rewriteValue_OpS390XSumBytes2(v *ssa.Value) bool {
 13826  	v_0 := v.Args[0]
 13827  	b := v.Block
 13828  	typ := &b.Func.Config.Types
 13829  	// match: (SumBytes2 x)
 13830  	// result: (ADDW (SRWconst <typ.UInt8> x [8]) x)
 13831  	for {
 13832  		x := v_0
 13833  		v.Reset(ssaop.OpS390XADDW)
 13834  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSRWconst, typ.UInt8)
 13835  		v0.AuxInt = ssa.Uint8ToAuxInt(8)
 13836  		v0.AddArg(x)
 13837  		v.AddArg2(v0, x)
 13838  		return true
 13839  	}
 13840  }
 13841  func rewriteValue_OpS390XSumBytes4(v *ssa.Value) bool {
 13842  	v_0 := v.Args[0]
 13843  	b := v.Block
 13844  	typ := &b.Func.Config.Types
 13845  	// match: (SumBytes4 x)
 13846  	// result: (SumBytes2 (ADDW <typ.UInt16> (SRWconst <typ.UInt16> x [16]) x))
 13847  	for {
 13848  		x := v_0
 13849  		v.Reset(ssaop.OpS390XSumBytes2)
 13850  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XADDW, typ.UInt16)
 13851  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSRWconst, typ.UInt16)
 13852  		v1.AuxInt = ssa.Uint8ToAuxInt(16)
 13853  		v1.AddArg(x)
 13854  		v0.AddArg2(v1, x)
 13855  		v.AddArg(v0)
 13856  		return true
 13857  	}
 13858  }
 13859  func rewriteValue_OpS390XSumBytes8(v *ssa.Value) bool {
 13860  	v_0 := v.Args[0]
 13861  	b := v.Block
 13862  	typ := &b.Func.Config.Types
 13863  	// match: (SumBytes8 x)
 13864  	// result: (SumBytes4 (ADDW <typ.UInt32> (SRDconst <typ.UInt32> x [32]) x))
 13865  	for {
 13866  		x := v_0
 13867  		v.Reset(ssaop.OpS390XSumBytes4)
 13868  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XADDW, typ.UInt32)
 13869  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSRDconst, typ.UInt32)
 13870  		v1.AuxInt = ssa.Uint8ToAuxInt(32)
 13871  		v1.AddArg(x)
 13872  		v0.AddArg2(v1, x)
 13873  		v.AddArg(v0)
 13874  		return true
 13875  	}
 13876  }
 13877  func rewriteValue_OpS390XXOR(v *ssa.Value) bool {
 13878  	v_1 := v.Args[1]
 13879  	v_0 := v.Args[0]
 13880  	// match: (XOR x (MOVDconst [c]))
 13881  	// cond: ssa.IsU32Bit(c)
 13882  	// result: (XORconst [c] x)
 13883  	for {
 13884  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13885  			x := v_0
 13886  			if v_1.Op != ssaop.OpS390XMOVDconst {
 13887  				continue
 13888  			}
 13889  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 13890  			if !(ssa.IsU32Bit(c)) {
 13891  				continue
 13892  			}
 13893  			v.Reset(ssaop.OpS390XXORconst)
 13894  			v.AuxInt = ssa.Int64ToAuxInt(c)
 13895  			v.AddArg(x)
 13896  			return true
 13897  		}
 13898  		break
 13899  	}
 13900  	// match: (XOR (MOVDconst [c]) (MOVDconst [d]))
 13901  	// result: (MOVDconst [c^d])
 13902  	for {
 13903  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13904  			if v_0.Op != ssaop.OpS390XMOVDconst {
 13905  				continue
 13906  			}
 13907  			c := ssa.AuxIntToInt64(v_0.AuxInt)
 13908  			if v_1.Op != ssaop.OpS390XMOVDconst {
 13909  				continue
 13910  			}
 13911  			d := ssa.AuxIntToInt64(v_1.AuxInt)
 13912  			v.Reset(ssaop.OpS390XMOVDconst)
 13913  			v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
 13914  			return true
 13915  		}
 13916  		break
 13917  	}
 13918  	// match: (XOR x x)
 13919  	// result: (MOVDconst [0])
 13920  	for {
 13921  		x := v_0
 13922  		if x != v_1 {
 13923  			break
 13924  		}
 13925  		v.Reset(ssaop.OpS390XMOVDconst)
 13926  		v.AuxInt = ssa.Int64ToAuxInt(0)
 13927  		return true
 13928  	}
 13929  	// match: (XOR <t> x g:(MOVDload [off] {sym} ptr mem))
 13930  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 13931  	// result: (XORload <t> [off] {sym} x ptr mem)
 13932  	for {
 13933  		t := v.Type
 13934  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13935  			x := v_0
 13936  			g := v_1
 13937  			if g.Op != ssaop.OpS390XMOVDload {
 13938  				continue
 13939  			}
 13940  			off := ssa.AuxIntToInt32(g.AuxInt)
 13941  			sym := ssa.AuxToSym(g.Aux)
 13942  			mem := g.Args[1]
 13943  			ptr := g.Args[0]
 13944  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 13945  				continue
 13946  			}
 13947  			v.Reset(ssaop.OpS390XXORload)
 13948  			v.Type = t
 13949  			v.AuxInt = ssa.Int32ToAuxInt(off)
 13950  			v.Aux = ssa.SymToAux(sym)
 13951  			v.AddArg3(x, ptr, mem)
 13952  			return true
 13953  		}
 13954  		break
 13955  	}
 13956  	return false
 13957  }
 13958  func rewriteValue_OpS390XXORW(v *ssa.Value) bool {
 13959  	v_1 := v.Args[1]
 13960  	v_0 := v.Args[0]
 13961  	// match: (XORW x (MOVDconst [c]))
 13962  	// result: (XORWconst [int32(c)] x)
 13963  	for {
 13964  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13965  			x := v_0
 13966  			if v_1.Op != ssaop.OpS390XMOVDconst {
 13967  				continue
 13968  			}
 13969  			c := ssa.AuxIntToInt64(v_1.AuxInt)
 13970  			v.Reset(ssaop.OpS390XXORWconst)
 13971  			v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 13972  			v.AddArg(x)
 13973  			return true
 13974  		}
 13975  		break
 13976  	}
 13977  	// match: (XORW x x)
 13978  	// result: (MOVDconst [0])
 13979  	for {
 13980  		x := v_0
 13981  		if x != v_1 {
 13982  			break
 13983  		}
 13984  		v.Reset(ssaop.OpS390XMOVDconst)
 13985  		v.AuxInt = ssa.Int64ToAuxInt(0)
 13986  		return true
 13987  	}
 13988  	// match: (XORW <t> x g:(MOVWload [off] {sym} ptr mem))
 13989  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 13990  	// result: (XORWload <t> [off] {sym} x ptr mem)
 13991  	for {
 13992  		t := v.Type
 13993  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13994  			x := v_0
 13995  			g := v_1
 13996  			if g.Op != ssaop.OpS390XMOVWload {
 13997  				continue
 13998  			}
 13999  			off := ssa.AuxIntToInt32(g.AuxInt)
 14000  			sym := ssa.AuxToSym(g.Aux)
 14001  			mem := g.Args[1]
 14002  			ptr := g.Args[0]
 14003  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 14004  				continue
 14005  			}
 14006  			v.Reset(ssaop.OpS390XXORWload)
 14007  			v.Type = t
 14008  			v.AuxInt = ssa.Int32ToAuxInt(off)
 14009  			v.Aux = ssa.SymToAux(sym)
 14010  			v.AddArg3(x, ptr, mem)
 14011  			return true
 14012  		}
 14013  		break
 14014  	}
 14015  	// match: (XORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 14016  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)
 14017  	// result: (XORWload <t> [off] {sym} x ptr mem)
 14018  	for {
 14019  		t := v.Type
 14020  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14021  			x := v_0
 14022  			g := v_1
 14023  			if g.Op != ssaop.OpS390XMOVWZload {
 14024  				continue
 14025  			}
 14026  			off := ssa.AuxIntToInt32(g.AuxInt)
 14027  			sym := ssa.AuxToSym(g.Aux)
 14028  			mem := g.Args[1]
 14029  			ptr := g.Args[0]
 14030  			if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off)) && ssa.CanMergeLoadClobber(v, g, x) && ssa.Clobber(g)) {
 14031  				continue
 14032  			}
 14033  			v.Reset(ssaop.OpS390XXORWload)
 14034  			v.Type = t
 14035  			v.AuxInt = ssa.Int32ToAuxInt(off)
 14036  			v.Aux = ssa.SymToAux(sym)
 14037  			v.AddArg3(x, ptr, mem)
 14038  			return true
 14039  		}
 14040  		break
 14041  	}
 14042  	return false
 14043  }
 14044  func rewriteValue_OpS390XXORWconst(v *ssa.Value) bool {
 14045  	v_0 := v.Args[0]
 14046  	// match: (XORWconst [c] x)
 14047  	// cond: int32(c)==0
 14048  	// result: x
 14049  	for {
 14050  		c := ssa.AuxIntToInt32(v.AuxInt)
 14051  		x := v_0
 14052  		if !(int32(c) == 0) {
 14053  			break
 14054  		}
 14055  		v.CopyOf(x)
 14056  		return true
 14057  	}
 14058  	// match: (XORWconst [c] (MOVDconst [d]))
 14059  	// result: (MOVDconst [int64(c)^d])
 14060  	for {
 14061  		c := ssa.AuxIntToInt32(v.AuxInt)
 14062  		if v_0.Op != ssaop.OpS390XMOVDconst {
 14063  			break
 14064  		}
 14065  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 14066  		v.Reset(ssaop.OpS390XMOVDconst)
 14067  		v.AuxInt = ssa.Int64ToAuxInt(int64(c) ^ d)
 14068  		return true
 14069  	}
 14070  	return false
 14071  }
 14072  func rewriteValue_OpS390XXORWload(v *ssa.Value) bool {
 14073  	v_2 := v.Args[2]
 14074  	v_1 := v.Args[1]
 14075  	v_0 := v.Args[0]
 14076  	// match: (XORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14077  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 14078  	// result: (XORWload [off1+off2] {sym} x ptr mem)
 14079  	for {
 14080  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 14081  		sym := ssa.AuxToSym(v.Aux)
 14082  		x := v_0
 14083  		if v_1.Op != ssaop.OpS390XADDconst {
 14084  			break
 14085  		}
 14086  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 14087  		ptr := v_1.Args[0]
 14088  		mem := v_2
 14089  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 14090  			break
 14091  		}
 14092  		v.Reset(ssaop.OpS390XXORWload)
 14093  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 14094  		v.Aux = ssa.SymToAux(sym)
 14095  		v.AddArg3(x, ptr, mem)
 14096  		return true
 14097  	}
 14098  	// match: (XORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14099  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 14100  	// result: (XORWload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 14101  	for {
 14102  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 14103  		s1 := ssa.AuxToSym(v.Aux)
 14104  		x := v_0
 14105  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 14106  			break
 14107  		}
 14108  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 14109  		s2 := ssa.AuxToSym(v_1.Aux)
 14110  		ptr := v_1.Args[0]
 14111  		mem := v_2
 14112  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 14113  			break
 14114  		}
 14115  		v.Reset(ssaop.OpS390XXORWload)
 14116  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 14117  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 14118  		v.AddArg3(x, ptr, mem)
 14119  		return true
 14120  	}
 14121  	return false
 14122  }
 14123  func rewriteValue_OpS390XXORconst(v *ssa.Value) bool {
 14124  	v_0 := v.Args[0]
 14125  	// match: (XORconst [0] x)
 14126  	// result: x
 14127  	for {
 14128  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 14129  			break
 14130  		}
 14131  		x := v_0
 14132  		v.CopyOf(x)
 14133  		return true
 14134  	}
 14135  	// match: (XORconst [c] (MOVDconst [d]))
 14136  	// result: (MOVDconst [c^d])
 14137  	for {
 14138  		c := ssa.AuxIntToInt64(v.AuxInt)
 14139  		if v_0.Op != ssaop.OpS390XMOVDconst {
 14140  			break
 14141  		}
 14142  		d := ssa.AuxIntToInt64(v_0.AuxInt)
 14143  		v.Reset(ssaop.OpS390XMOVDconst)
 14144  		v.AuxInt = ssa.Int64ToAuxInt(c ^ d)
 14145  		return true
 14146  	}
 14147  	return false
 14148  }
 14149  func rewriteValue_OpS390XXORload(v *ssa.Value) bool {
 14150  	v_2 := v.Args[2]
 14151  	v_1 := v.Args[1]
 14152  	v_0 := v.Args[0]
 14153  	b := v.Block
 14154  	// match: (XORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 14155  	// cond: ssa.IsSamePtr(ptr1, ptr2)
 14156  	// result: (XOR x (LGDR <t> y))
 14157  	for {
 14158  		t := v.Type
 14159  		off := ssa.AuxIntToInt32(v.AuxInt)
 14160  		sym := ssa.AuxToSym(v.Aux)
 14161  		x := v_0
 14162  		ptr1 := v_1
 14163  		if v_2.Op != ssaop.OpS390XFMOVDstore || ssa.AuxIntToInt32(v_2.AuxInt) != off || ssa.AuxToSym(v_2.Aux) != sym {
 14164  			break
 14165  		}
 14166  		y := v_2.Args[1]
 14167  		ptr2 := v_2.Args[0]
 14168  		if !(ssa.IsSamePtr(ptr1, ptr2)) {
 14169  			break
 14170  		}
 14171  		v.Reset(ssaop.OpS390XXOR)
 14172  		v0 := b.NewValue0(v_2.Pos, ssaop.OpS390XLGDR, t)
 14173  		v0.AddArg(y)
 14174  		v.AddArg2(x, v0)
 14175  		return true
 14176  	}
 14177  	// match: (XORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14178  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))
 14179  	// result: (XORload [off1+off2] {sym} x ptr mem)
 14180  	for {
 14181  		off1 := ssa.AuxIntToInt32(v.AuxInt)
 14182  		sym := ssa.AuxToSym(v.Aux)
 14183  		x := v_0
 14184  		if v_1.Op != ssaop.OpS390XADDconst {
 14185  			break
 14186  		}
 14187  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
 14188  		ptr := v_1.Args[0]
 14189  		mem := v_2
 14190  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(off1)+int64(off2))) {
 14191  			break
 14192  		}
 14193  		v.Reset(ssaop.OpS390XXORload)
 14194  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
 14195  		v.Aux = ssa.SymToAux(sym)
 14196  		v.AddArg3(x, ptr, mem)
 14197  		return true
 14198  	}
 14199  	// match: (XORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14200  	// cond: ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)
 14201  	// result: (XORload [o1+o2] {ssa.MergeSym(s1, s2)} x ptr mem)
 14202  	for {
 14203  		o1 := ssa.AuxIntToInt32(v.AuxInt)
 14204  		s1 := ssa.AuxToSym(v.Aux)
 14205  		x := v_0
 14206  		if v_1.Op != ssaop.OpS390XMOVDaddr {
 14207  			break
 14208  		}
 14209  		o2 := ssa.AuxIntToInt32(v_1.AuxInt)
 14210  		s2 := ssa.AuxToSym(v_1.Aux)
 14211  		ptr := v_1.Args[0]
 14212  		mem := v_2
 14213  		if !(ptr.Op != ssaop.OpSB && ssa.Is20Bit(int64(o1)+int64(o2)) && ssa.CanMergeSym(s1, s2)) {
 14214  			break
 14215  		}
 14216  		v.Reset(ssaop.OpS390XXORload)
 14217  		v.AuxInt = ssa.Int32ToAuxInt(o1 + o2)
 14218  		v.Aux = ssa.SymToAux(ssa.MergeSym(s1, s2))
 14219  		v.AddArg3(x, ptr, mem)
 14220  		return true
 14221  	}
 14222  	return false
 14223  }
 14224  func rewriteValue_OpSelect0(v *ssa.Value) bool {
 14225  	v_0 := v.Args[0]
 14226  	b := v.Block
 14227  	typ := &b.Func.Config.Types
 14228  	// match: (Select0 (Add64carry x y c))
 14229  	// result: (Select0 <typ.UInt64> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))
 14230  	for {
 14231  		if v_0.Op != ssaop.OpAdd64carry {
 14232  			break
 14233  		}
 14234  		c := v_0.Args[2]
 14235  		x := v_0.Args[0]
 14236  		y := v_0.Args[1]
 14237  		v.Reset(ssaop.OpSelect0)
 14238  		v.Type = typ.UInt64
 14239  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14240  		v1 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 14241  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 14242  		v2.AuxInt = ssa.Int16ToAuxInt(-1)
 14243  		v2.AddArg(c)
 14244  		v1.AddArg(v2)
 14245  		v0.AddArg3(x, y, v1)
 14246  		v.AddArg(v0)
 14247  		return true
 14248  	}
 14249  	// match: (Select0 (Sub64borrow x y c))
 14250  	// result: (Select0 <typ.UInt64> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c))))
 14251  	for {
 14252  		if v_0.Op != ssaop.OpSub64borrow {
 14253  			break
 14254  		}
 14255  		c := v_0.Args[2]
 14256  		x := v_0.Args[0]
 14257  		y := v_0.Args[1]
 14258  		v.Reset(ssaop.OpSelect0)
 14259  		v.Type = typ.UInt64
 14260  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14261  		v1 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 14262  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 14263  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
 14264  		v3.AuxInt = ssa.Int64ToAuxInt(0)
 14265  		v2.AddArg2(v3, c)
 14266  		v1.AddArg(v2)
 14267  		v0.AddArg3(x, y, v1)
 14268  		v.AddArg(v0)
 14269  		return true
 14270  	}
 14271  	// match: (Select0 <t> (AddTupleFirst32 val tuple))
 14272  	// result: (ADDW val (Select0 <t> tuple))
 14273  	for {
 14274  		t := v.Type
 14275  		if v_0.Op != ssaop.OpS390XAddTupleFirst32 {
 14276  			break
 14277  		}
 14278  		tuple := v_0.Args[1]
 14279  		val := v_0.Args[0]
 14280  		v.Reset(ssaop.OpS390XADDW)
 14281  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect0, t)
 14282  		v0.AddArg(tuple)
 14283  		v.AddArg2(val, v0)
 14284  		return true
 14285  	}
 14286  	// match: (Select0 <t> (AddTupleFirst64 val tuple))
 14287  	// result: (ADD val (Select0 <t> tuple))
 14288  	for {
 14289  		t := v.Type
 14290  		if v_0.Op != ssaop.OpS390XAddTupleFirst64 {
 14291  			break
 14292  		}
 14293  		tuple := v_0.Args[1]
 14294  		val := v_0.Args[0]
 14295  		v.Reset(ssaop.OpS390XADD)
 14296  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect0, t)
 14297  		v0.AddArg(tuple)
 14298  		v.AddArg2(val, v0)
 14299  		return true
 14300  	}
 14301  	// match: (Select0 (ADDCconst (MOVDconst [c]) [d]))
 14302  	// result: (MOVDconst [c+int64(d)])
 14303  	for {
 14304  		if v_0.Op != ssaop.OpS390XADDCconst {
 14305  			break
 14306  		}
 14307  		d := ssa.AuxIntToInt16(v_0.AuxInt)
 14308  		v_0_0 := v_0.Args[0]
 14309  		if v_0_0.Op != ssaop.OpS390XMOVDconst {
 14310  			break
 14311  		}
 14312  		c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 14313  		v.Reset(ssaop.OpS390XMOVDconst)
 14314  		v.AuxInt = ssa.Int64ToAuxInt(c + int64(d))
 14315  		return true
 14316  	}
 14317  	// match: (Select0 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14318  	// result: (MOVDconst [c-d])
 14319  	for {
 14320  		if v_0.Op != ssaop.OpS390XSUBC {
 14321  			break
 14322  		}
 14323  		_ = v_0.Args[1]
 14324  		v_0_0 := v_0.Args[0]
 14325  		if v_0_0.Op != ssaop.OpS390XMOVDconst {
 14326  			break
 14327  		}
 14328  		c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 14329  		v_0_1 := v_0.Args[1]
 14330  		if v_0_1.Op != ssaop.OpS390XMOVDconst {
 14331  			break
 14332  		}
 14333  		d := ssa.AuxIntToInt64(v_0_1.AuxInt)
 14334  		v.Reset(ssaop.OpS390XMOVDconst)
 14335  		v.AuxInt = ssa.Int64ToAuxInt(c - d)
 14336  		return true
 14337  	}
 14338  	// match: (Select0 (FADD (FMUL y z) x))
 14339  	// cond: x.Block.Func.UseFMA(v)
 14340  	// result: (FMADD x y z)
 14341  	for {
 14342  		if v_0.Op != ssaop.OpS390XFADD {
 14343  			break
 14344  		}
 14345  		_ = v_0.Args[1]
 14346  		v_0_0 := v_0.Args[0]
 14347  		v_0_1 := v_0.Args[1]
 14348  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 14349  			if v_0_0.Op != ssaop.OpS390XFMUL {
 14350  				continue
 14351  			}
 14352  			z := v_0_0.Args[1]
 14353  			y := v_0_0.Args[0]
 14354  			x := v_0_1
 14355  			if !(x.Block.Func.UseFMA(v)) {
 14356  				continue
 14357  			}
 14358  			v.Reset(ssaop.OpS390XFMADD)
 14359  			v.AddArg3(x, y, z)
 14360  			return true
 14361  		}
 14362  		break
 14363  	}
 14364  	// match: (Select0 (FSUB (FMUL y z) x))
 14365  	// cond: x.Block.Func.UseFMA(v)
 14366  	// result: (FMSUB x y z)
 14367  	for {
 14368  		if v_0.Op != ssaop.OpS390XFSUB {
 14369  			break
 14370  		}
 14371  		x := v_0.Args[1]
 14372  		v_0_0 := v_0.Args[0]
 14373  		if v_0_0.Op != ssaop.OpS390XFMUL {
 14374  			break
 14375  		}
 14376  		z := v_0_0.Args[1]
 14377  		y := v_0_0.Args[0]
 14378  		if !(x.Block.Func.UseFMA(v)) {
 14379  			break
 14380  		}
 14381  		v.Reset(ssaop.OpS390XFMSUB)
 14382  		v.AddArg3(x, y, z)
 14383  		return true
 14384  	}
 14385  	// match: (Select0 (FADDS (FMULS y z) x))
 14386  	// cond: x.Block.Func.UseFMA(v)
 14387  	// result: (FMADDS x y z)
 14388  	for {
 14389  		if v_0.Op != ssaop.OpS390XFADDS {
 14390  			break
 14391  		}
 14392  		_ = v_0.Args[1]
 14393  		v_0_0 := v_0.Args[0]
 14394  		v_0_1 := v_0.Args[1]
 14395  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 14396  			if v_0_0.Op != ssaop.OpS390XFMULS {
 14397  				continue
 14398  			}
 14399  			z := v_0_0.Args[1]
 14400  			y := v_0_0.Args[0]
 14401  			x := v_0_1
 14402  			if !(x.Block.Func.UseFMA(v)) {
 14403  				continue
 14404  			}
 14405  			v.Reset(ssaop.OpS390XFMADDS)
 14406  			v.AddArg3(x, y, z)
 14407  			return true
 14408  		}
 14409  		break
 14410  	}
 14411  	// match: (Select0 (FSUBS (FMULS y z) x))
 14412  	// cond: x.Block.Func.UseFMA(v)
 14413  	// result: (FMSUBS x y z)
 14414  	for {
 14415  		if v_0.Op != ssaop.OpS390XFSUBS {
 14416  			break
 14417  		}
 14418  		x := v_0.Args[1]
 14419  		v_0_0 := v_0.Args[0]
 14420  		if v_0_0.Op != ssaop.OpS390XFMULS {
 14421  			break
 14422  		}
 14423  		z := v_0_0.Args[1]
 14424  		y := v_0_0.Args[0]
 14425  		if !(x.Block.Func.UseFMA(v)) {
 14426  			break
 14427  		}
 14428  		v.Reset(ssaop.OpS390XFMSUBS)
 14429  		v.AddArg3(x, y, z)
 14430  		return true
 14431  	}
 14432  	return false
 14433  }
 14434  func rewriteValue_OpSelect1(v *ssa.Value) bool {
 14435  	v_0 := v.Args[0]
 14436  	b := v.Block
 14437  	typ := &b.Func.Config.Types
 14438  	// match: (Select1 (Add64carry x y c))
 14439  	// result: (Select0 <typ.UInt64> (ADDE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))))
 14440  	for {
 14441  		if v_0.Op != ssaop.OpAdd64carry {
 14442  			break
 14443  		}
 14444  		c := v_0.Args[2]
 14445  		x := v_0.Args[0]
 14446  		y := v_0.Args[1]
 14447  		v.Reset(ssaop.OpSelect0)
 14448  		v.Type = typ.UInt64
 14449  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14450  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
 14451  		v1.AuxInt = ssa.Int64ToAuxInt(0)
 14452  		v2 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 14453  		v3 := b.NewValue0(v.Pos, ssaop.OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14454  		v4 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 14455  		v5 := b.NewValue0(v.Pos, ssaop.OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 14456  		v5.AuxInt = ssa.Int16ToAuxInt(-1)
 14457  		v5.AddArg(c)
 14458  		v4.AddArg(v5)
 14459  		v3.AddArg3(x, y, v4)
 14460  		v2.AddArg(v3)
 14461  		v0.AddArg3(v1, v1, v2)
 14462  		v.AddArg(v0)
 14463  		return true
 14464  	}
 14465  	// match: (Select1 (Sub64borrow x y c))
 14466  	// result: (NEG (Select0 <typ.UInt64> (SUBE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c)))))))
 14467  	for {
 14468  		if v_0.Op != ssaop.OpSub64borrow {
 14469  			break
 14470  		}
 14471  		c := v_0.Args[2]
 14472  		x := v_0.Args[0]
 14473  		y := v_0.Args[1]
 14474  		v.Reset(ssaop.OpS390XNEG)
 14475  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect0, typ.UInt64)
 14476  		v1 := b.NewValue0(v.Pos, ssaop.OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14477  		v2 := b.NewValue0(v.Pos, ssaop.OpS390XMOVDconst, typ.UInt64)
 14478  		v2.AuxInt = ssa.Int64ToAuxInt(0)
 14479  		v3 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 14480  		v4 := b.NewValue0(v.Pos, ssaop.OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14481  		v5 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 14482  		v6 := b.NewValue0(v.Pos, ssaop.OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 14483  		v6.AddArg2(v2, c)
 14484  		v5.AddArg(v6)
 14485  		v4.AddArg3(x, y, v5)
 14486  		v3.AddArg(v4)
 14487  		v1.AddArg3(v2, v2, v3)
 14488  		v0.AddArg(v1)
 14489  		v.AddArg(v0)
 14490  		return true
 14491  	}
 14492  	// match: (Select1 (AddTupleFirst32 _ tuple))
 14493  	// result: (Select1 tuple)
 14494  	for {
 14495  		if v_0.Op != ssaop.OpS390XAddTupleFirst32 {
 14496  			break
 14497  		}
 14498  		tuple := v_0.Args[1]
 14499  		v.Reset(ssaop.OpSelect1)
 14500  		v.AddArg(tuple)
 14501  		return true
 14502  	}
 14503  	// match: (Select1 (AddTupleFirst64 _ tuple))
 14504  	// result: (Select1 tuple)
 14505  	for {
 14506  		if v_0.Op != ssaop.OpS390XAddTupleFirst64 {
 14507  			break
 14508  		}
 14509  		tuple := v_0.Args[1]
 14510  		v.Reset(ssaop.OpSelect1)
 14511  		v.AddArg(tuple)
 14512  		return true
 14513  	}
 14514  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 14515  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0
 14516  	// result: (FlagEQ)
 14517  	for {
 14518  		if v_0.Op != ssaop.OpS390XADDCconst {
 14519  			break
 14520  		}
 14521  		d := ssa.AuxIntToInt16(v_0.AuxInt)
 14522  		v_0_0 := v_0.Args[0]
 14523  		if v_0_0.Op != ssaop.OpS390XMOVDconst {
 14524  			break
 14525  		}
 14526  		c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 14527  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0) {
 14528  			break
 14529  		}
 14530  		v.Reset(ssaop.OpS390XFlagEQ)
 14531  		return true
 14532  	}
 14533  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 14534  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0
 14535  	// result: (FlagLT)
 14536  	for {
 14537  		if v_0.Op != ssaop.OpS390XADDCconst {
 14538  			break
 14539  		}
 14540  		d := ssa.AuxIntToInt16(v_0.AuxInt)
 14541  		v_0_0 := v_0.Args[0]
 14542  		if v_0_0.Op != ssaop.OpS390XMOVDconst {
 14543  			break
 14544  		}
 14545  		c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 14546  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0) {
 14547  			break
 14548  		}
 14549  		v.Reset(ssaop.OpS390XFlagLT)
 14550  		return true
 14551  	}
 14552  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14553  	// cond: uint64(d) <= uint64(c) && c-d == 0
 14554  	// result: (FlagGT)
 14555  	for {
 14556  		if v_0.Op != ssaop.OpS390XSUBC {
 14557  			break
 14558  		}
 14559  		_ = v_0.Args[1]
 14560  		v_0_0 := v_0.Args[0]
 14561  		if v_0_0.Op != ssaop.OpS390XMOVDconst {
 14562  			break
 14563  		}
 14564  		c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 14565  		v_0_1 := v_0.Args[1]
 14566  		if v_0_1.Op != ssaop.OpS390XMOVDconst {
 14567  			break
 14568  		}
 14569  		d := ssa.AuxIntToInt64(v_0_1.AuxInt)
 14570  		if !(uint64(d) <= uint64(c) && c-d == 0) {
 14571  			break
 14572  		}
 14573  		v.Reset(ssaop.OpS390XFlagGT)
 14574  		return true
 14575  	}
 14576  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14577  	// cond: uint64(d) <= uint64(c) && c-d != 0
 14578  	// result: (FlagOV)
 14579  	for {
 14580  		if v_0.Op != ssaop.OpS390XSUBC {
 14581  			break
 14582  		}
 14583  		_ = v_0.Args[1]
 14584  		v_0_0 := v_0.Args[0]
 14585  		if v_0_0.Op != ssaop.OpS390XMOVDconst {
 14586  			break
 14587  		}
 14588  		c := ssa.AuxIntToInt64(v_0_0.AuxInt)
 14589  		v_0_1 := v_0.Args[1]
 14590  		if v_0_1.Op != ssaop.OpS390XMOVDconst {
 14591  			break
 14592  		}
 14593  		d := ssa.AuxIntToInt64(v_0_1.AuxInt)
 14594  		if !(uint64(d) <= uint64(c) && c-d != 0) {
 14595  			break
 14596  		}
 14597  		v.Reset(ssaop.OpS390XFlagOV)
 14598  		return true
 14599  	}
 14600  	return false
 14601  }
 14602  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
 14603  	v_0 := v.Args[0]
 14604  	b := v.Block
 14605  	// match: (Slicemask <t> x)
 14606  	// result: (SRADconst (NEG <t> x) [63])
 14607  	for {
 14608  		t := v.Type
 14609  		x := v_0
 14610  		v.Reset(ssaop.OpS390XSRADconst)
 14611  		v.AuxInt = ssa.Uint8ToAuxInt(63)
 14612  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XNEG, t)
 14613  		v0.AddArg(x)
 14614  		v.AddArg(v0)
 14615  		return true
 14616  	}
 14617  }
 14618  func rewriteValue_OpStore(v *ssa.Value) bool {
 14619  	v_2 := v.Args[2]
 14620  	v_1 := v.Args[1]
 14621  	v_0 := v.Args[0]
 14622  	// match: (Store {t} ptr val mem)
 14623  	// cond: t.Size() == 8 && t.IsFloat()
 14624  	// result: (FMOVDstore ptr val mem)
 14625  	for {
 14626  		t := ssa.AuxToType(v.Aux)
 14627  		ptr := v_0
 14628  		val := v_1
 14629  		mem := v_2
 14630  		if !(t.Size() == 8 && t.IsFloat()) {
 14631  			break
 14632  		}
 14633  		v.Reset(ssaop.OpS390XFMOVDstore)
 14634  		v.AddArg3(ptr, val, mem)
 14635  		return true
 14636  	}
 14637  	// match: (Store {t} ptr val mem)
 14638  	// cond: t.Size() == 4 && t.IsFloat()
 14639  	// result: (FMOVSstore ptr val mem)
 14640  	for {
 14641  		t := ssa.AuxToType(v.Aux)
 14642  		ptr := v_0
 14643  		val := v_1
 14644  		mem := v_2
 14645  		if !(t.Size() == 4 && t.IsFloat()) {
 14646  			break
 14647  		}
 14648  		v.Reset(ssaop.OpS390XFMOVSstore)
 14649  		v.AddArg3(ptr, val, mem)
 14650  		return true
 14651  	}
 14652  	// match: (Store {t} ptr val mem)
 14653  	// cond: t.Size() == 8 && !t.IsFloat()
 14654  	// result: (MOVDstore ptr val mem)
 14655  	for {
 14656  		t := ssa.AuxToType(v.Aux)
 14657  		ptr := v_0
 14658  		val := v_1
 14659  		mem := v_2
 14660  		if !(t.Size() == 8 && !t.IsFloat()) {
 14661  			break
 14662  		}
 14663  		v.Reset(ssaop.OpS390XMOVDstore)
 14664  		v.AddArg3(ptr, val, mem)
 14665  		return true
 14666  	}
 14667  	// match: (Store {t} ptr val mem)
 14668  	// cond: t.Size() == 4 && !t.IsFloat()
 14669  	// result: (MOVWstore ptr val mem)
 14670  	for {
 14671  		t := ssa.AuxToType(v.Aux)
 14672  		ptr := v_0
 14673  		val := v_1
 14674  		mem := v_2
 14675  		if !(t.Size() == 4 && !t.IsFloat()) {
 14676  			break
 14677  		}
 14678  		v.Reset(ssaop.OpS390XMOVWstore)
 14679  		v.AddArg3(ptr, val, mem)
 14680  		return true
 14681  	}
 14682  	// match: (Store {t} ptr val mem)
 14683  	// cond: t.Size() == 2
 14684  	// result: (MOVHstore ptr val mem)
 14685  	for {
 14686  		t := ssa.AuxToType(v.Aux)
 14687  		ptr := v_0
 14688  		val := v_1
 14689  		mem := v_2
 14690  		if !(t.Size() == 2) {
 14691  			break
 14692  		}
 14693  		v.Reset(ssaop.OpS390XMOVHstore)
 14694  		v.AddArg3(ptr, val, mem)
 14695  		return true
 14696  	}
 14697  	// match: (Store {t} ptr val mem)
 14698  	// cond: t.Size() == 1
 14699  	// result: (MOVBstore ptr val mem)
 14700  	for {
 14701  		t := ssa.AuxToType(v.Aux)
 14702  		ptr := v_0
 14703  		val := v_1
 14704  		mem := v_2
 14705  		if !(t.Size() == 1) {
 14706  			break
 14707  		}
 14708  		v.Reset(ssaop.OpS390XMOVBstore)
 14709  		v.AddArg3(ptr, val, mem)
 14710  		return true
 14711  	}
 14712  	return false
 14713  }
 14714  func rewriteValue_OpSub32F(v *ssa.Value) bool {
 14715  	v_1 := v.Args[1]
 14716  	v_0 := v.Args[0]
 14717  	b := v.Block
 14718  	typ := &b.Func.Config.Types
 14719  	// match: (Sub32F x y)
 14720  	// result: (Select0 (FSUBS x y))
 14721  	for {
 14722  		x := v_0
 14723  		y := v_1
 14724  		v.Reset(ssaop.OpSelect0)
 14725  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XFSUBS, types.NewTuple(typ.Float32, types.TypeFlags))
 14726  		v0.AddArg2(x, y)
 14727  		v.AddArg(v0)
 14728  		return true
 14729  	}
 14730  }
 14731  func rewriteValue_OpSub64F(v *ssa.Value) bool {
 14732  	v_1 := v.Args[1]
 14733  	v_0 := v.Args[0]
 14734  	b := v.Block
 14735  	typ := &b.Func.Config.Types
 14736  	// match: (Sub64F x y)
 14737  	// result: (Select0 (FSUB x y))
 14738  	for {
 14739  		x := v_0
 14740  		y := v_1
 14741  		v.Reset(ssaop.OpSelect0)
 14742  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XFSUB, types.NewTuple(typ.Float64, types.TypeFlags))
 14743  		v0.AddArg2(x, y)
 14744  		v.AddArg(v0)
 14745  		return true
 14746  	}
 14747  }
 14748  func rewriteValue_OpTrunc(v *ssa.Value) bool {
 14749  	v_0 := v.Args[0]
 14750  	// match: (Trunc x)
 14751  	// result: (FIDBR [5] x)
 14752  	for {
 14753  		x := v_0
 14754  		v.Reset(ssaop.OpS390XFIDBR)
 14755  		v.AuxInt = ssa.Int8ToAuxInt(5)
 14756  		v.AddArg(x)
 14757  		return true
 14758  	}
 14759  }
 14760  func rewriteValue_OpZero(v *ssa.Value) bool {
 14761  	v_1 := v.Args[1]
 14762  	v_0 := v.Args[0]
 14763  	b := v.Block
 14764  	// match: (Zero [0] _ mem)
 14765  	// result: mem
 14766  	for {
 14767  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 14768  			break
 14769  		}
 14770  		mem := v_1
 14771  		v.CopyOf(mem)
 14772  		return true
 14773  	}
 14774  	// match: (Zero [1] destptr mem)
 14775  	// result: (MOVBstoreconst [0] destptr mem)
 14776  	for {
 14777  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
 14778  			break
 14779  		}
 14780  		destptr := v_0
 14781  		mem := v_1
 14782  		v.Reset(ssaop.OpS390XMOVBstoreconst)
 14783  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 14784  		v.AddArg2(destptr, mem)
 14785  		return true
 14786  	}
 14787  	// match: (Zero [2] destptr mem)
 14788  	// result: (MOVHstoreconst [0] destptr mem)
 14789  	for {
 14790  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
 14791  			break
 14792  		}
 14793  		destptr := v_0
 14794  		mem := v_1
 14795  		v.Reset(ssaop.OpS390XMOVHstoreconst)
 14796  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 14797  		v.AddArg2(destptr, mem)
 14798  		return true
 14799  	}
 14800  	// match: (Zero [4] destptr mem)
 14801  	// result: (MOVWstoreconst [0] destptr mem)
 14802  	for {
 14803  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
 14804  			break
 14805  		}
 14806  		destptr := v_0
 14807  		mem := v_1
 14808  		v.Reset(ssaop.OpS390XMOVWstoreconst)
 14809  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 14810  		v.AddArg2(destptr, mem)
 14811  		return true
 14812  	}
 14813  	// match: (Zero [8] destptr mem)
 14814  	// result: (MOVDstoreconst [0] destptr mem)
 14815  	for {
 14816  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
 14817  			break
 14818  		}
 14819  		destptr := v_0
 14820  		mem := v_1
 14821  		v.Reset(ssaop.OpS390XMOVDstoreconst)
 14822  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 14823  		v.AddArg2(destptr, mem)
 14824  		return true
 14825  	}
 14826  	// match: (Zero [3] destptr mem)
 14827  	// result: (MOVBstoreconst [ssa.MakeValAndOff(0,2)] destptr (MOVHstoreconst [0] destptr mem))
 14828  	for {
 14829  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
 14830  			break
 14831  		}
 14832  		destptr := v_0
 14833  		mem := v_1
 14834  		v.Reset(ssaop.OpS390XMOVBstoreconst)
 14835  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 2))
 14836  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVHstoreconst, types.TypeMem)
 14837  		v0.AuxInt = ssa.ValAndOffToAuxInt(0)
 14838  		v0.AddArg2(destptr, mem)
 14839  		v.AddArg2(destptr, v0)
 14840  		return true
 14841  	}
 14842  	// match: (Zero [5] destptr mem)
 14843  	// result: (MOVBstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 14844  	for {
 14845  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
 14846  			break
 14847  		}
 14848  		destptr := v_0
 14849  		mem := v_1
 14850  		v.Reset(ssaop.OpS390XMOVBstoreconst)
 14851  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 14852  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWstoreconst, types.TypeMem)
 14853  		v0.AuxInt = ssa.ValAndOffToAuxInt(0)
 14854  		v0.AddArg2(destptr, mem)
 14855  		v.AddArg2(destptr, v0)
 14856  		return true
 14857  	}
 14858  	// match: (Zero [6] destptr mem)
 14859  	// result: (MOVHstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 14860  	for {
 14861  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
 14862  			break
 14863  		}
 14864  		destptr := v_0
 14865  		mem := v_1
 14866  		v.Reset(ssaop.OpS390XMOVHstoreconst)
 14867  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 14868  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWstoreconst, types.TypeMem)
 14869  		v0.AuxInt = ssa.ValAndOffToAuxInt(0)
 14870  		v0.AddArg2(destptr, mem)
 14871  		v.AddArg2(destptr, v0)
 14872  		return true
 14873  	}
 14874  	// match: (Zero [7] destptr mem)
 14875  	// result: (MOVWstoreconst [ssa.MakeValAndOff(0,3)] destptr (MOVWstoreconst [0] destptr mem))
 14876  	for {
 14877  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
 14878  			break
 14879  		}
 14880  		destptr := v_0
 14881  		mem := v_1
 14882  		v.Reset(ssaop.OpS390XMOVWstoreconst)
 14883  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 3))
 14884  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XMOVWstoreconst, types.TypeMem)
 14885  		v0.AuxInt = ssa.ValAndOffToAuxInt(0)
 14886  		v0.AddArg2(destptr, mem)
 14887  		v.AddArg2(destptr, v0)
 14888  		return true
 14889  	}
 14890  	// match: (Zero [s] destptr mem)
 14891  	// cond: s > 0 && s <= 1024
 14892  	// result: (CLEAR [ssa.MakeValAndOff(int32(s), 0)] destptr mem)
 14893  	for {
 14894  		s := ssa.AuxIntToInt64(v.AuxInt)
 14895  		destptr := v_0
 14896  		mem := v_1
 14897  		if !(s > 0 && s <= 1024) {
 14898  			break
 14899  		}
 14900  		v.Reset(ssaop.OpS390XCLEAR)
 14901  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(s), 0))
 14902  		v.AddArg2(destptr, mem)
 14903  		return true
 14904  	}
 14905  	// match: (Zero [s] destptr mem)
 14906  	// cond: s > 1024
 14907  	// result: (LoweredZero [s%256] destptr (ADDconst <destptr.Type> destptr [(int32(s)/256)*256]) mem)
 14908  	for {
 14909  		s := ssa.AuxIntToInt64(v.AuxInt)
 14910  		destptr := v_0
 14911  		mem := v_1
 14912  		if !(s > 1024) {
 14913  			break
 14914  		}
 14915  		v.Reset(ssaop.OpS390XLoweredZero)
 14916  		v.AuxInt = ssa.Int64ToAuxInt(s % 256)
 14917  		v0 := b.NewValue0(v.Pos, ssaop.OpS390XADDconst, destptr.Type)
 14918  		v0.AuxInt = ssa.Int32ToAuxInt((int32(s) / 256) * 256)
 14919  		v0.AddArg(destptr)
 14920  		v.AddArg3(destptr, v0, mem)
 14921  		return true
 14922  	}
 14923  	return false
 14924  }
 14925  func RewriteBlock(b *ssa.Block) bool {
 14926  	typ := &b.Func.Config.Types
 14927  	switch b.Kind {
 14928  	case block.BlockS390XBRC:
 14929  		// match: (BRC {c} x:(CMP _ _) yes no)
 14930  		// cond: c&s390x.Unordered != 0
 14931  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14932  		for b.Controls[0].Op == ssaop.OpS390XCMP {
 14933  			x := b.Controls[0]
 14934  			c := ssa.AuxToS390xCCMask(b.Aux)
 14935  			if !(c&s390x.Unordered != 0) {
 14936  				break
 14937  			}
 14938  			b.ResetWithControl(block.BlockS390XBRC, x)
 14939  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 14940  			return true
 14941  		}
 14942  		// match: (BRC {c} x:(CMPW _ _) yes no)
 14943  		// cond: c&s390x.Unordered != 0
 14944  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14945  		for b.Controls[0].Op == ssaop.OpS390XCMPW {
 14946  			x := b.Controls[0]
 14947  			c := ssa.AuxToS390xCCMask(b.Aux)
 14948  			if !(c&s390x.Unordered != 0) {
 14949  				break
 14950  			}
 14951  			b.ResetWithControl(block.BlockS390XBRC, x)
 14952  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 14953  			return true
 14954  		}
 14955  		// match: (BRC {c} x:(CMPU _ _) yes no)
 14956  		// cond: c&s390x.Unordered != 0
 14957  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14958  		for b.Controls[0].Op == ssaop.OpS390XCMPU {
 14959  			x := b.Controls[0]
 14960  			c := ssa.AuxToS390xCCMask(b.Aux)
 14961  			if !(c&s390x.Unordered != 0) {
 14962  				break
 14963  			}
 14964  			b.ResetWithControl(block.BlockS390XBRC, x)
 14965  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 14966  			return true
 14967  		}
 14968  		// match: (BRC {c} x:(CMPWU _ _) yes no)
 14969  		// cond: c&s390x.Unordered != 0
 14970  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14971  		for b.Controls[0].Op == ssaop.OpS390XCMPWU {
 14972  			x := b.Controls[0]
 14973  			c := ssa.AuxToS390xCCMask(b.Aux)
 14974  			if !(c&s390x.Unordered != 0) {
 14975  				break
 14976  			}
 14977  			b.ResetWithControl(block.BlockS390XBRC, x)
 14978  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 14979  			return true
 14980  		}
 14981  		// match: (BRC {c} x:(CMPconst _) yes no)
 14982  		// cond: c&s390x.Unordered != 0
 14983  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14984  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 14985  			x := b.Controls[0]
 14986  			c := ssa.AuxToS390xCCMask(b.Aux)
 14987  			if !(c&s390x.Unordered != 0) {
 14988  				break
 14989  			}
 14990  			b.ResetWithControl(block.BlockS390XBRC, x)
 14991  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 14992  			return true
 14993  		}
 14994  		// match: (BRC {c} x:(CMPWconst _) yes no)
 14995  		// cond: c&s390x.Unordered != 0
 14996  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14997  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 14998  			x := b.Controls[0]
 14999  			c := ssa.AuxToS390xCCMask(b.Aux)
 15000  			if !(c&s390x.Unordered != 0) {
 15001  				break
 15002  			}
 15003  			b.ResetWithControl(block.BlockS390XBRC, x)
 15004  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15005  			return true
 15006  		}
 15007  		// match: (BRC {c} x:(CMPUconst _) yes no)
 15008  		// cond: c&s390x.Unordered != 0
 15009  		// result: (BRC {c&^s390x.Unordered} x yes no)
 15010  		for b.Controls[0].Op == ssaop.OpS390XCMPUconst {
 15011  			x := b.Controls[0]
 15012  			c := ssa.AuxToS390xCCMask(b.Aux)
 15013  			if !(c&s390x.Unordered != 0) {
 15014  				break
 15015  			}
 15016  			b.ResetWithControl(block.BlockS390XBRC, x)
 15017  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15018  			return true
 15019  		}
 15020  		// match: (BRC {c} x:(CMPWUconst _) yes no)
 15021  		// cond: c&s390x.Unordered != 0
 15022  		// result: (BRC {c&^s390x.Unordered} x yes no)
 15023  		for b.Controls[0].Op == ssaop.OpS390XCMPWUconst {
 15024  			x := b.Controls[0]
 15025  			c := ssa.AuxToS390xCCMask(b.Aux)
 15026  			if !(c&s390x.Unordered != 0) {
 15027  				break
 15028  			}
 15029  			b.ResetWithControl(block.BlockS390XBRC, x)
 15030  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15031  			return true
 15032  		}
 15033  		// match: (BRC {c} (CMP x y) yes no)
 15034  		// result: (CGRJ {c&^s390x.Unordered} x y yes no)
 15035  		for b.Controls[0].Op == ssaop.OpS390XCMP {
 15036  			v_0 := b.Controls[0]
 15037  			y := v_0.Args[1]
 15038  			x := v_0.Args[0]
 15039  			c := ssa.AuxToS390xCCMask(b.Aux)
 15040  			b.ResetWithControl2(block.BlockS390XCGRJ, x, y)
 15041  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15042  			return true
 15043  		}
 15044  		// match: (BRC {c} (CMPW x y) yes no)
 15045  		// result: (CRJ {c&^s390x.Unordered} x y yes no)
 15046  		for b.Controls[0].Op == ssaop.OpS390XCMPW {
 15047  			v_0 := b.Controls[0]
 15048  			y := v_0.Args[1]
 15049  			x := v_0.Args[0]
 15050  			c := ssa.AuxToS390xCCMask(b.Aux)
 15051  			b.ResetWithControl2(block.BlockS390XCRJ, x, y)
 15052  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15053  			return true
 15054  		}
 15055  		// match: (BRC {c} (CMPU x y) yes no)
 15056  		// result: (CLGRJ {c&^s390x.Unordered} x y yes no)
 15057  		for b.Controls[0].Op == ssaop.OpS390XCMPU {
 15058  			v_0 := b.Controls[0]
 15059  			y := v_0.Args[1]
 15060  			x := v_0.Args[0]
 15061  			c := ssa.AuxToS390xCCMask(b.Aux)
 15062  			b.ResetWithControl2(block.BlockS390XCLGRJ, x, y)
 15063  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15064  			return true
 15065  		}
 15066  		// match: (BRC {c} (CMPWU x y) yes no)
 15067  		// result: (CLRJ {c&^s390x.Unordered} x y yes no)
 15068  		for b.Controls[0].Op == ssaop.OpS390XCMPWU {
 15069  			v_0 := b.Controls[0]
 15070  			y := v_0.Args[1]
 15071  			x := v_0.Args[0]
 15072  			c := ssa.AuxToS390xCCMask(b.Aux)
 15073  			b.ResetWithControl2(block.BlockS390XCLRJ, x, y)
 15074  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15075  			return true
 15076  		}
 15077  		// match: (BRC {c} (CMPconst x [y]) yes no)
 15078  		// cond: y == int32( int8(y))
 15079  		// result: (CGIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 15080  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 15081  			v_0 := b.Controls[0]
 15082  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15083  			x := v_0.Args[0]
 15084  			c := ssa.AuxToS390xCCMask(b.Aux)
 15085  			if !(y == int32(int8(y))) {
 15086  				break
 15087  			}
 15088  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15089  			b.AuxInt = ssa.Int8ToAuxInt(int8(y))
 15090  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15091  			return true
 15092  		}
 15093  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 15094  		// cond: y == int32( int8(y))
 15095  		// result: (CIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 15096  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 15097  			v_0 := b.Controls[0]
 15098  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15099  			x := v_0.Args[0]
 15100  			c := ssa.AuxToS390xCCMask(b.Aux)
 15101  			if !(y == int32(int8(y))) {
 15102  				break
 15103  			}
 15104  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15105  			b.AuxInt = ssa.Int8ToAuxInt(int8(y))
 15106  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15107  			return true
 15108  		}
 15109  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 15110  		// cond: y == int32(uint8(y))
 15111  		// result: (CLGIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 15112  		for b.Controls[0].Op == ssaop.OpS390XCMPUconst {
 15113  			v_0 := b.Controls[0]
 15114  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15115  			x := v_0.Args[0]
 15116  			c := ssa.AuxToS390xCCMask(b.Aux)
 15117  			if !(y == int32(uint8(y))) {
 15118  				break
 15119  			}
 15120  			b.ResetWithControl(block.BlockS390XCLGIJ, x)
 15121  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(y))
 15122  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15123  			return true
 15124  		}
 15125  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 15126  		// cond: y == int32(uint8(y))
 15127  		// result: (CLIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 15128  		for b.Controls[0].Op == ssaop.OpS390XCMPWUconst {
 15129  			v_0 := b.Controls[0]
 15130  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15131  			x := v_0.Args[0]
 15132  			c := ssa.AuxToS390xCCMask(b.Aux)
 15133  			if !(y == int32(uint8(y))) {
 15134  				break
 15135  			}
 15136  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 15137  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(y))
 15138  			b.Aux = ssa.S390xCCMaskToAux(c &^ s390x.Unordered)
 15139  			return true
 15140  		}
 15141  		// match: (BRC {s390x.Less} (CMPconst x [ 128]) yes no)
 15142  		// result: (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
 15143  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 15144  			v_0 := b.Controls[0]
 15145  			if ssa.AuxIntToInt32(v_0.AuxInt) != 128 {
 15146  				break
 15147  			}
 15148  			x := v_0.Args[0]
 15149  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.Less {
 15150  				break
 15151  			}
 15152  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15153  			b.AuxInt = ssa.Int8ToAuxInt(127)
 15154  			b.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
 15155  			return true
 15156  		}
 15157  		// match: (BRC {s390x.Less} (CMPWconst x [ 128]) yes no)
 15158  		// result: (CIJ {s390x.LessOrEqual} x [ 127] yes no)
 15159  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 15160  			v_0 := b.Controls[0]
 15161  			if ssa.AuxIntToInt32(v_0.AuxInt) != 128 {
 15162  				break
 15163  			}
 15164  			x := v_0.Args[0]
 15165  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.Less {
 15166  				break
 15167  			}
 15168  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15169  			b.AuxInt = ssa.Int8ToAuxInt(127)
 15170  			b.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
 15171  			return true
 15172  		}
 15173  		// match: (BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no)
 15174  		// result: (CGIJ {s390x.Less} x [-128] yes no)
 15175  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 15176  			v_0 := b.Controls[0]
 15177  			if ssa.AuxIntToInt32(v_0.AuxInt) != -129 {
 15178  				break
 15179  			}
 15180  			x := v_0.Args[0]
 15181  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 15182  				break
 15183  			}
 15184  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15185  			b.AuxInt = ssa.Int8ToAuxInt(-128)
 15186  			b.Aux = ssa.S390xCCMaskToAux(s390x.Less)
 15187  			return true
 15188  		}
 15189  		// match: (BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no)
 15190  		// result: (CIJ {s390x.Less} x [-128] yes no)
 15191  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 15192  			v_0 := b.Controls[0]
 15193  			if ssa.AuxIntToInt32(v_0.AuxInt) != -129 {
 15194  				break
 15195  			}
 15196  			x := v_0.Args[0]
 15197  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 15198  				break
 15199  			}
 15200  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15201  			b.AuxInt = ssa.Int8ToAuxInt(-128)
 15202  			b.Aux = ssa.S390xCCMaskToAux(s390x.Less)
 15203  			return true
 15204  		}
 15205  		// match: (BRC {s390x.Greater} (CMPconst x [-129]) yes no)
 15206  		// result: (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
 15207  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 15208  			v_0 := b.Controls[0]
 15209  			if ssa.AuxIntToInt32(v_0.AuxInt) != -129 {
 15210  				break
 15211  			}
 15212  			x := v_0.Args[0]
 15213  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.Greater {
 15214  				break
 15215  			}
 15216  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15217  			b.AuxInt = ssa.Int8ToAuxInt(-128)
 15218  			b.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
 15219  			return true
 15220  		}
 15221  		// match: (BRC {s390x.Greater} (CMPWconst x [-129]) yes no)
 15222  		// result: (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
 15223  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 15224  			v_0 := b.Controls[0]
 15225  			if ssa.AuxIntToInt32(v_0.AuxInt) != -129 {
 15226  				break
 15227  			}
 15228  			x := v_0.Args[0]
 15229  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.Greater {
 15230  				break
 15231  			}
 15232  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15233  			b.AuxInt = ssa.Int8ToAuxInt(-128)
 15234  			b.Aux = ssa.S390xCCMaskToAux(s390x.GreaterOrEqual)
 15235  			return true
 15236  		}
 15237  		// match: (BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no)
 15238  		// result: (CGIJ {s390x.Greater} x [ 127] yes no)
 15239  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 15240  			v_0 := b.Controls[0]
 15241  			if ssa.AuxIntToInt32(v_0.AuxInt) != 128 {
 15242  				break
 15243  			}
 15244  			x := v_0.Args[0]
 15245  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15246  				break
 15247  			}
 15248  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15249  			b.AuxInt = ssa.Int8ToAuxInt(127)
 15250  			b.Aux = ssa.S390xCCMaskToAux(s390x.Greater)
 15251  			return true
 15252  		}
 15253  		// match: (BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no)
 15254  		// result: (CIJ {s390x.Greater} x [ 127] yes no)
 15255  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 15256  			v_0 := b.Controls[0]
 15257  			if ssa.AuxIntToInt32(v_0.AuxInt) != 128 {
 15258  				break
 15259  			}
 15260  			x := v_0.Args[0]
 15261  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15262  				break
 15263  			}
 15264  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15265  			b.AuxInt = ssa.Int8ToAuxInt(127)
 15266  			b.Aux = ssa.S390xCCMaskToAux(s390x.Greater)
 15267  			return true
 15268  		}
 15269  		// match: (BRC {s390x.Less} (CMPWUconst x [256]) yes no)
 15270  		// result: (CLIJ {s390x.LessOrEqual} x [255] yes no)
 15271  		for b.Controls[0].Op == ssaop.OpS390XCMPWUconst {
 15272  			v_0 := b.Controls[0]
 15273  			if ssa.AuxIntToInt32(v_0.AuxInt) != 256 {
 15274  				break
 15275  			}
 15276  			x := v_0.Args[0]
 15277  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.Less {
 15278  				break
 15279  			}
 15280  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 15281  			b.AuxInt = ssa.Uint8ToAuxInt(255)
 15282  			b.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
 15283  			return true
 15284  		}
 15285  		// match: (BRC {s390x.Less} (CMPUconst x [256]) yes no)
 15286  		// result: (CLGIJ {s390x.LessOrEqual} x [255] yes no)
 15287  		for b.Controls[0].Op == ssaop.OpS390XCMPUconst {
 15288  			v_0 := b.Controls[0]
 15289  			if ssa.AuxIntToInt32(v_0.AuxInt) != 256 {
 15290  				break
 15291  			}
 15292  			x := v_0.Args[0]
 15293  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.Less {
 15294  				break
 15295  			}
 15296  			b.ResetWithControl(block.BlockS390XCLGIJ, x)
 15297  			b.AuxInt = ssa.Uint8ToAuxInt(255)
 15298  			b.Aux = ssa.S390xCCMaskToAux(s390x.LessOrEqual)
 15299  			return true
 15300  		}
 15301  		// match: (BRC {s390x.GreaterOrEqual} (CMPWUconst x [256]) yes no)
 15302  		// result: (CLIJ {s390x.Greater} x [255] yes no)
 15303  		for b.Controls[0].Op == ssaop.OpS390XCMPWUconst {
 15304  			v_0 := b.Controls[0]
 15305  			if ssa.AuxIntToInt32(v_0.AuxInt) != 256 {
 15306  				break
 15307  			}
 15308  			x := v_0.Args[0]
 15309  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15310  				break
 15311  			}
 15312  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 15313  			b.AuxInt = ssa.Uint8ToAuxInt(255)
 15314  			b.Aux = ssa.S390xCCMaskToAux(s390x.Greater)
 15315  			return true
 15316  		}
 15317  		// match: (BRC {s390x.GreaterOrEqual} (CMPUconst x [256]) yes no)
 15318  		// result: (CLGIJ {s390x.Greater} x [255] yes no)
 15319  		for b.Controls[0].Op == ssaop.OpS390XCMPUconst {
 15320  			v_0 := b.Controls[0]
 15321  			if ssa.AuxIntToInt32(v_0.AuxInt) != 256 {
 15322  				break
 15323  			}
 15324  			x := v_0.Args[0]
 15325  			if ssa.AuxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15326  				break
 15327  			}
 15328  			b.ResetWithControl(block.BlockS390XCLGIJ, x)
 15329  			b.AuxInt = ssa.Uint8ToAuxInt(255)
 15330  			b.Aux = ssa.S390xCCMaskToAux(s390x.Greater)
 15331  			return true
 15332  		}
 15333  		// match: (BRC {c} (CMPconst x [y]) yes no)
 15334  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15335  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 15336  		for b.Controls[0].Op == ssaop.OpS390XCMPconst {
 15337  			v_0 := b.Controls[0]
 15338  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15339  			x := v_0.Args[0]
 15340  			c := ssa.AuxToS390xCCMask(b.Aux)
 15341  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15342  				break
 15343  			}
 15344  			b.ResetWithControl(block.BlockS390XCLGIJ, x)
 15345  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(y))
 15346  			b.Aux = ssa.S390xCCMaskToAux(c)
 15347  			return true
 15348  		}
 15349  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 15350  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15351  		// result: (CLIJ {c} x [uint8(y)] yes no)
 15352  		for b.Controls[0].Op == ssaop.OpS390XCMPWconst {
 15353  			v_0 := b.Controls[0]
 15354  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15355  			x := v_0.Args[0]
 15356  			c := ssa.AuxToS390xCCMask(b.Aux)
 15357  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15358  				break
 15359  			}
 15360  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 15361  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(y))
 15362  			b.Aux = ssa.S390xCCMaskToAux(c)
 15363  			return true
 15364  		}
 15365  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 15366  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15367  		// result: (CGIJ {c} x [ int8(y)] yes no)
 15368  		for b.Controls[0].Op == ssaop.OpS390XCMPUconst {
 15369  			v_0 := b.Controls[0]
 15370  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15371  			x := v_0.Args[0]
 15372  			c := ssa.AuxToS390xCCMask(b.Aux)
 15373  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15374  				break
 15375  			}
 15376  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15377  			b.AuxInt = ssa.Int8ToAuxInt(int8(y))
 15378  			b.Aux = ssa.S390xCCMaskToAux(c)
 15379  			return true
 15380  		}
 15381  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 15382  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15383  		// result: (CIJ {c} x [ int8(y)] yes no)
 15384  		for b.Controls[0].Op == ssaop.OpS390XCMPWUconst {
 15385  			v_0 := b.Controls[0]
 15386  			y := ssa.AuxIntToInt32(v_0.AuxInt)
 15387  			x := v_0.Args[0]
 15388  			c := ssa.AuxToS390xCCMask(b.Aux)
 15389  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15390  				break
 15391  			}
 15392  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15393  			b.AuxInt = ssa.Int8ToAuxInt(int8(y))
 15394  			b.Aux = ssa.S390xCCMaskToAux(c)
 15395  			return true
 15396  		}
 15397  		// match: (BRC {c} (InvertFlags cmp) yes no)
 15398  		// result: (BRC {c.ReverseComparison()} cmp yes no)
 15399  		for b.Controls[0].Op == ssaop.OpS390XInvertFlags {
 15400  			v_0 := b.Controls[0]
 15401  			cmp := v_0.Args[0]
 15402  			c := ssa.AuxToS390xCCMask(b.Aux)
 15403  			b.ResetWithControl(block.BlockS390XBRC, cmp)
 15404  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 15405  			return true
 15406  		}
 15407  		// match: (BRC {c} (FlagEQ) yes no)
 15408  		// cond: c&s390x.Equal != 0
 15409  		// result: (First yes no)
 15410  		for b.Controls[0].Op == ssaop.OpS390XFlagEQ {
 15411  			c := ssa.AuxToS390xCCMask(b.Aux)
 15412  			if !(c&s390x.Equal != 0) {
 15413  				break
 15414  			}
 15415  			b.Reset(block.BlockFirst)
 15416  			return true
 15417  		}
 15418  		// match: (BRC {c} (FlagLT) yes no)
 15419  		// cond: c&s390x.Less != 0
 15420  		// result: (First yes no)
 15421  		for b.Controls[0].Op == ssaop.OpS390XFlagLT {
 15422  			c := ssa.AuxToS390xCCMask(b.Aux)
 15423  			if !(c&s390x.Less != 0) {
 15424  				break
 15425  			}
 15426  			b.Reset(block.BlockFirst)
 15427  			return true
 15428  		}
 15429  		// match: (BRC {c} (FlagGT) yes no)
 15430  		// cond: c&s390x.Greater != 0
 15431  		// result: (First yes no)
 15432  		for b.Controls[0].Op == ssaop.OpS390XFlagGT {
 15433  			c := ssa.AuxToS390xCCMask(b.Aux)
 15434  			if !(c&s390x.Greater != 0) {
 15435  				break
 15436  			}
 15437  			b.Reset(block.BlockFirst)
 15438  			return true
 15439  		}
 15440  		// match: (BRC {c} (FlagOV) yes no)
 15441  		// cond: c&s390x.Unordered != 0
 15442  		// result: (First yes no)
 15443  		for b.Controls[0].Op == ssaop.OpS390XFlagOV {
 15444  			c := ssa.AuxToS390xCCMask(b.Aux)
 15445  			if !(c&s390x.Unordered != 0) {
 15446  				break
 15447  			}
 15448  			b.Reset(block.BlockFirst)
 15449  			return true
 15450  		}
 15451  		// match: (BRC {c} (FlagEQ) yes no)
 15452  		// cond: c&s390x.Equal == 0
 15453  		// result: (First no yes)
 15454  		for b.Controls[0].Op == ssaop.OpS390XFlagEQ {
 15455  			c := ssa.AuxToS390xCCMask(b.Aux)
 15456  			if !(c&s390x.Equal == 0) {
 15457  				break
 15458  			}
 15459  			b.Reset(block.BlockFirst)
 15460  			b.SwapSuccessors()
 15461  			return true
 15462  		}
 15463  		// match: (BRC {c} (FlagLT) yes no)
 15464  		// cond: c&s390x.Less == 0
 15465  		// result: (First no yes)
 15466  		for b.Controls[0].Op == ssaop.OpS390XFlagLT {
 15467  			c := ssa.AuxToS390xCCMask(b.Aux)
 15468  			if !(c&s390x.Less == 0) {
 15469  				break
 15470  			}
 15471  			b.Reset(block.BlockFirst)
 15472  			b.SwapSuccessors()
 15473  			return true
 15474  		}
 15475  		// match: (BRC {c} (FlagGT) yes no)
 15476  		// cond: c&s390x.Greater == 0
 15477  		// result: (First no yes)
 15478  		for b.Controls[0].Op == ssaop.OpS390XFlagGT {
 15479  			c := ssa.AuxToS390xCCMask(b.Aux)
 15480  			if !(c&s390x.Greater == 0) {
 15481  				break
 15482  			}
 15483  			b.Reset(block.BlockFirst)
 15484  			b.SwapSuccessors()
 15485  			return true
 15486  		}
 15487  		// match: (BRC {c} (FlagOV) yes no)
 15488  		// cond: c&s390x.Unordered == 0
 15489  		// result: (First no yes)
 15490  		for b.Controls[0].Op == ssaop.OpS390XFlagOV {
 15491  			c := ssa.AuxToS390xCCMask(b.Aux)
 15492  			if !(c&s390x.Unordered == 0) {
 15493  				break
 15494  			}
 15495  			b.Reset(block.BlockFirst)
 15496  			b.SwapSuccessors()
 15497  			return true
 15498  		}
 15499  	case block.BlockS390XCGIJ:
 15500  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15501  		// cond: c&s390x.Equal != 0 && int64(x) == int64(y)
 15502  		// result: (First yes no)
 15503  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15504  			v_0 := b.Controls[0]
 15505  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15506  			y := ssa.AuxIntToInt8(b.AuxInt)
 15507  			c := ssa.AuxToS390xCCMask(b.Aux)
 15508  			if !(c&s390x.Equal != 0 && int64(x) == int64(y)) {
 15509  				break
 15510  			}
 15511  			b.Reset(block.BlockFirst)
 15512  			return true
 15513  		}
 15514  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15515  		// cond: c&s390x.Less != 0 && int64(x) < int64(y)
 15516  		// result: (First yes no)
 15517  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15518  			v_0 := b.Controls[0]
 15519  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15520  			y := ssa.AuxIntToInt8(b.AuxInt)
 15521  			c := ssa.AuxToS390xCCMask(b.Aux)
 15522  			if !(c&s390x.Less != 0 && int64(x) < int64(y)) {
 15523  				break
 15524  			}
 15525  			b.Reset(block.BlockFirst)
 15526  			return true
 15527  		}
 15528  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15529  		// cond: c&s390x.Greater != 0 && int64(x) > int64(y)
 15530  		// result: (First yes no)
 15531  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15532  			v_0 := b.Controls[0]
 15533  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15534  			y := ssa.AuxIntToInt8(b.AuxInt)
 15535  			c := ssa.AuxToS390xCCMask(b.Aux)
 15536  			if !(c&s390x.Greater != 0 && int64(x) > int64(y)) {
 15537  				break
 15538  			}
 15539  			b.Reset(block.BlockFirst)
 15540  			return true
 15541  		}
 15542  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15543  		// cond: c&s390x.Equal == 0 && int64(x) == int64(y)
 15544  		// result: (First no yes)
 15545  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15546  			v_0 := b.Controls[0]
 15547  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15548  			y := ssa.AuxIntToInt8(b.AuxInt)
 15549  			c := ssa.AuxToS390xCCMask(b.Aux)
 15550  			if !(c&s390x.Equal == 0 && int64(x) == int64(y)) {
 15551  				break
 15552  			}
 15553  			b.Reset(block.BlockFirst)
 15554  			b.SwapSuccessors()
 15555  			return true
 15556  		}
 15557  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15558  		// cond: c&s390x.Less == 0 && int64(x) < int64(y)
 15559  		// result: (First no yes)
 15560  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15561  			v_0 := b.Controls[0]
 15562  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15563  			y := ssa.AuxIntToInt8(b.AuxInt)
 15564  			c := ssa.AuxToS390xCCMask(b.Aux)
 15565  			if !(c&s390x.Less == 0 && int64(x) < int64(y)) {
 15566  				break
 15567  			}
 15568  			b.Reset(block.BlockFirst)
 15569  			b.SwapSuccessors()
 15570  			return true
 15571  		}
 15572  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15573  		// cond: c&s390x.Greater == 0 && int64(x) > int64(y)
 15574  		// result: (First no yes)
 15575  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15576  			v_0 := b.Controls[0]
 15577  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15578  			y := ssa.AuxIntToInt8(b.AuxInt)
 15579  			c := ssa.AuxToS390xCCMask(b.Aux)
 15580  			if !(c&s390x.Greater == 0 && int64(x) > int64(y)) {
 15581  				break
 15582  			}
 15583  			b.Reset(block.BlockFirst)
 15584  			b.SwapSuccessors()
 15585  			return true
 15586  		}
 15587  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15588  		// result: (BRC {s390x.NoCarry} carry)
 15589  		for b.Controls[0].Op == ssaop.OpSelect0 {
 15590  			v_0 := b.Controls[0]
 15591  			v_0_0 := v_0.Args[0]
 15592  			if v_0_0.Op != ssaop.OpS390XADDE {
 15593  				break
 15594  			}
 15595  			carry := v_0_0.Args[2]
 15596  			v_0_0_0 := v_0_0.Args[0]
 15597  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15598  				break
 15599  			}
 15600  			v_0_0_1 := v_0_0.Args[1]
 15601  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 15602  				break
 15603  			}
 15604  			b.ResetWithControl(block.BlockS390XBRC, carry)
 15605  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoCarry)
 15606  			return true
 15607  		}
 15608  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 15609  		// result: (BRC {s390x.Carry} carry)
 15610  		for b.Controls[0].Op == ssaop.OpSelect0 {
 15611  			v_0 := b.Controls[0]
 15612  			v_0_0 := v_0.Args[0]
 15613  			if v_0_0.Op != ssaop.OpS390XADDE {
 15614  				break
 15615  			}
 15616  			carry := v_0_0.Args[2]
 15617  			v_0_0_0 := v_0_0.Args[0]
 15618  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15619  				break
 15620  			}
 15621  			v_0_0_1 := v_0_0.Args[1]
 15622  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 15623  				break
 15624  			}
 15625  			b.ResetWithControl(block.BlockS390XBRC, carry)
 15626  			b.Aux = ssa.S390xCCMaskToAux(s390x.Carry)
 15627  			return true
 15628  		}
 15629  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15630  		// result: (BRC {s390x.Carry} carry)
 15631  		for b.Controls[0].Op == ssaop.OpSelect0 {
 15632  			v_0 := b.Controls[0]
 15633  			v_0_0 := v_0.Args[0]
 15634  			if v_0_0.Op != ssaop.OpS390XADDE {
 15635  				break
 15636  			}
 15637  			carry := v_0_0.Args[2]
 15638  			v_0_0_0 := v_0_0.Args[0]
 15639  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15640  				break
 15641  			}
 15642  			v_0_0_1 := v_0_0.Args[1]
 15643  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15644  				break
 15645  			}
 15646  			b.ResetWithControl(block.BlockS390XBRC, carry)
 15647  			b.Aux = ssa.S390xCCMaskToAux(s390x.Carry)
 15648  			return true
 15649  		}
 15650  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 15651  		// result: (BRC {s390x.NoCarry} carry)
 15652  		for b.Controls[0].Op == ssaop.OpSelect0 {
 15653  			v_0 := b.Controls[0]
 15654  			v_0_0 := v_0.Args[0]
 15655  			if v_0_0.Op != ssaop.OpS390XADDE {
 15656  				break
 15657  			}
 15658  			carry := v_0_0.Args[2]
 15659  			v_0_0_0 := v_0_0.Args[0]
 15660  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15661  				break
 15662  			}
 15663  			v_0_0_1 := v_0_0.Args[1]
 15664  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15665  				break
 15666  			}
 15667  			b.ResetWithControl(block.BlockS390XBRC, carry)
 15668  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoCarry)
 15669  			return true
 15670  		}
 15671  		// match: (CGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15672  		// result: (BRC {s390x.Carry} carry)
 15673  		for b.Controls[0].Op == ssaop.OpSelect0 {
 15674  			v_0 := b.Controls[0]
 15675  			v_0_0 := v_0.Args[0]
 15676  			if v_0_0.Op != ssaop.OpS390XADDE {
 15677  				break
 15678  			}
 15679  			carry := v_0_0.Args[2]
 15680  			v_0_0_0 := v_0_0.Args[0]
 15681  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15682  				break
 15683  			}
 15684  			v_0_0_1 := v_0_0.Args[1]
 15685  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Greater {
 15686  				break
 15687  			}
 15688  			b.ResetWithControl(block.BlockS390XBRC, carry)
 15689  			b.Aux = ssa.S390xCCMaskToAux(s390x.Carry)
 15690  			return true
 15691  		}
 15692  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15693  		// result: (BRC {s390x.NoBorrow} borrow)
 15694  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 15695  			v_0 := b.Controls[0]
 15696  			v_0_0 := v_0.Args[0]
 15697  			if v_0_0.Op != ssaop.OpSelect0 {
 15698  				break
 15699  			}
 15700  			v_0_0_0 := v_0_0.Args[0]
 15701  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 15702  				break
 15703  			}
 15704  			borrow := v_0_0_0.Args[2]
 15705  			v_0_0_0_0 := v_0_0_0.Args[0]
 15706  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15707  				break
 15708  			}
 15709  			v_0_0_0_1 := v_0_0_0.Args[1]
 15710  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 15711  				break
 15712  			}
 15713  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 15714  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoBorrow)
 15715  			return true
 15716  		}
 15717  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 15718  		// result: (BRC {s390x.Borrow} borrow)
 15719  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 15720  			v_0 := b.Controls[0]
 15721  			v_0_0 := v_0.Args[0]
 15722  			if v_0_0.Op != ssaop.OpSelect0 {
 15723  				break
 15724  			}
 15725  			v_0_0_0 := v_0_0.Args[0]
 15726  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 15727  				break
 15728  			}
 15729  			borrow := v_0_0_0.Args[2]
 15730  			v_0_0_0_0 := v_0_0_0.Args[0]
 15731  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15732  				break
 15733  			}
 15734  			v_0_0_0_1 := v_0_0_0.Args[1]
 15735  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 15736  				break
 15737  			}
 15738  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 15739  			b.Aux = ssa.S390xCCMaskToAux(s390x.Borrow)
 15740  			return true
 15741  		}
 15742  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15743  		// result: (BRC {s390x.Borrow} borrow)
 15744  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 15745  			v_0 := b.Controls[0]
 15746  			v_0_0 := v_0.Args[0]
 15747  			if v_0_0.Op != ssaop.OpSelect0 {
 15748  				break
 15749  			}
 15750  			v_0_0_0 := v_0_0.Args[0]
 15751  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 15752  				break
 15753  			}
 15754  			borrow := v_0_0_0.Args[2]
 15755  			v_0_0_0_0 := v_0_0_0.Args[0]
 15756  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15757  				break
 15758  			}
 15759  			v_0_0_0_1 := v_0_0_0.Args[1]
 15760  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15761  				break
 15762  			}
 15763  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 15764  			b.Aux = ssa.S390xCCMaskToAux(s390x.Borrow)
 15765  			return true
 15766  		}
 15767  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 15768  		// result: (BRC {s390x.NoBorrow} borrow)
 15769  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 15770  			v_0 := b.Controls[0]
 15771  			v_0_0 := v_0.Args[0]
 15772  			if v_0_0.Op != ssaop.OpSelect0 {
 15773  				break
 15774  			}
 15775  			v_0_0_0 := v_0_0.Args[0]
 15776  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 15777  				break
 15778  			}
 15779  			borrow := v_0_0_0.Args[2]
 15780  			v_0_0_0_0 := v_0_0_0.Args[0]
 15781  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15782  				break
 15783  			}
 15784  			v_0_0_0_1 := v_0_0_0.Args[1]
 15785  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15786  				break
 15787  			}
 15788  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 15789  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoBorrow)
 15790  			return true
 15791  		}
 15792  		// match: (CGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15793  		// result: (BRC {s390x.Borrow} borrow)
 15794  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 15795  			v_0 := b.Controls[0]
 15796  			v_0_0 := v_0.Args[0]
 15797  			if v_0_0.Op != ssaop.OpSelect0 {
 15798  				break
 15799  			}
 15800  			v_0_0_0 := v_0_0.Args[0]
 15801  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 15802  				break
 15803  			}
 15804  			borrow := v_0_0_0.Args[2]
 15805  			v_0_0_0_0 := v_0_0_0.Args[0]
 15806  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15807  				break
 15808  			}
 15809  			v_0_0_0_1 := v_0_0_0.Args[1]
 15810  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToInt8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Greater {
 15811  				break
 15812  			}
 15813  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 15814  			b.Aux = ssa.S390xCCMaskToAux(s390x.Borrow)
 15815  			return true
 15816  		}
 15817  	case block.BlockS390XCGRJ:
 15818  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 15819  		// cond: is8Bit(y)
 15820  		// result: (CGIJ {c} x [ int8(y)] yes no)
 15821  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 15822  			x := b.Controls[0]
 15823  			v_1 := b.Controls[1]
 15824  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 15825  			c := ssa.AuxToS390xCCMask(b.Aux)
 15826  			if !(is8Bit(y)) {
 15827  				break
 15828  			}
 15829  			b.ResetWithControl(block.BlockS390XCGIJ, x)
 15830  			b.AuxInt = ssa.Int8ToAuxInt(int8(y))
 15831  			b.Aux = ssa.S390xCCMaskToAux(c)
 15832  			return true
 15833  		}
 15834  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 15835  		// cond: is8Bit(x)
 15836  		// result: (CGIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 15837  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15838  			v_0 := b.Controls[0]
 15839  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15840  			y := b.Controls[1]
 15841  			c := ssa.AuxToS390xCCMask(b.Aux)
 15842  			if !(is8Bit(x)) {
 15843  				break
 15844  			}
 15845  			b.ResetWithControl(block.BlockS390XCGIJ, y)
 15846  			b.AuxInt = ssa.Int8ToAuxInt(int8(x))
 15847  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 15848  			return true
 15849  		}
 15850  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 15851  		// cond: !is8Bit(y) && ssa.Is32Bit(y)
 15852  		// result: (BRC {c} (CMPconst x [int32(y)]) yes no)
 15853  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 15854  			x := b.Controls[0]
 15855  			v_1 := b.Controls[1]
 15856  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 15857  			c := ssa.AuxToS390xCCMask(b.Aux)
 15858  			if !(!is8Bit(y) && ssa.Is32Bit(y)) {
 15859  				break
 15860  			}
 15861  			v0 := b.NewValue0(x.Pos, ssaop.OpS390XCMPconst, types.TypeFlags)
 15862  			v0.AuxInt = ssa.Int32ToAuxInt(int32(y))
 15863  			v0.AddArg(x)
 15864  			b.ResetWithControl(block.BlockS390XBRC, v0)
 15865  			b.Aux = ssa.S390xCCMaskToAux(c)
 15866  			return true
 15867  		}
 15868  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 15869  		// cond: !is8Bit(x) && ssa.Is32Bit(x)
 15870  		// result: (BRC {c.ReverseComparison()} (CMPconst y [int32(x)]) yes no)
 15871  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15872  			v_0 := b.Controls[0]
 15873  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15874  			y := b.Controls[1]
 15875  			c := ssa.AuxToS390xCCMask(b.Aux)
 15876  			if !(!is8Bit(x) && ssa.Is32Bit(x)) {
 15877  				break
 15878  			}
 15879  			v0 := b.NewValue0(v_0.Pos, ssaop.OpS390XCMPconst, types.TypeFlags)
 15880  			v0.AuxInt = ssa.Int32ToAuxInt(int32(x))
 15881  			v0.AddArg(y)
 15882  			b.ResetWithControl(block.BlockS390XBRC, v0)
 15883  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 15884  			return true
 15885  		}
 15886  		// match: (CGRJ {c} x y yes no)
 15887  		// cond: x == y && c&s390x.Equal != 0
 15888  		// result: (First yes no)
 15889  		for {
 15890  			x := b.Controls[0]
 15891  			y := b.Controls[1]
 15892  			c := ssa.AuxToS390xCCMask(b.Aux)
 15893  			if !(x == y && c&s390x.Equal != 0) {
 15894  				break
 15895  			}
 15896  			b.Reset(block.BlockFirst)
 15897  			return true
 15898  		}
 15899  		// match: (CGRJ {c} x y yes no)
 15900  		// cond: x == y && c&s390x.Equal == 0
 15901  		// result: (First no yes)
 15902  		for {
 15903  			x := b.Controls[0]
 15904  			y := b.Controls[1]
 15905  			c := ssa.AuxToS390xCCMask(b.Aux)
 15906  			if !(x == y && c&s390x.Equal == 0) {
 15907  				break
 15908  			}
 15909  			b.Reset(block.BlockFirst)
 15910  			b.SwapSuccessors()
 15911  			return true
 15912  		}
 15913  	case block.BlockS390XCIJ:
 15914  		// match: (CIJ {c} (MOVWreg x) [y] yes no)
 15915  		// result: (CIJ {c} x [y] yes no)
 15916  		for b.Controls[0].Op == ssaop.OpS390XMOVWreg {
 15917  			v_0 := b.Controls[0]
 15918  			x := v_0.Args[0]
 15919  			y := ssa.AuxIntToInt8(b.AuxInt)
 15920  			c := ssa.AuxToS390xCCMask(b.Aux)
 15921  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15922  			b.AuxInt = ssa.Int8ToAuxInt(y)
 15923  			b.Aux = ssa.S390xCCMaskToAux(c)
 15924  			return true
 15925  		}
 15926  		// match: (CIJ {c} (MOVWZreg x) [y] yes no)
 15927  		// result: (CIJ {c} x [y] yes no)
 15928  		for b.Controls[0].Op == ssaop.OpS390XMOVWZreg {
 15929  			v_0 := b.Controls[0]
 15930  			x := v_0.Args[0]
 15931  			y := ssa.AuxIntToInt8(b.AuxInt)
 15932  			c := ssa.AuxToS390xCCMask(b.Aux)
 15933  			b.ResetWithControl(block.BlockS390XCIJ, x)
 15934  			b.AuxInt = ssa.Int8ToAuxInt(y)
 15935  			b.Aux = ssa.S390xCCMaskToAux(c)
 15936  			return true
 15937  		}
 15938  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15939  		// cond: c&s390x.Equal != 0 && int32(x) == int32(y)
 15940  		// result: (First yes no)
 15941  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15942  			v_0 := b.Controls[0]
 15943  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15944  			y := ssa.AuxIntToInt8(b.AuxInt)
 15945  			c := ssa.AuxToS390xCCMask(b.Aux)
 15946  			if !(c&s390x.Equal != 0 && int32(x) == int32(y)) {
 15947  				break
 15948  			}
 15949  			b.Reset(block.BlockFirst)
 15950  			return true
 15951  		}
 15952  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15953  		// cond: c&s390x.Less != 0 && int32(x) < int32(y)
 15954  		// result: (First yes no)
 15955  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15956  			v_0 := b.Controls[0]
 15957  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15958  			y := ssa.AuxIntToInt8(b.AuxInt)
 15959  			c := ssa.AuxToS390xCCMask(b.Aux)
 15960  			if !(c&s390x.Less != 0 && int32(x) < int32(y)) {
 15961  				break
 15962  			}
 15963  			b.Reset(block.BlockFirst)
 15964  			return true
 15965  		}
 15966  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15967  		// cond: c&s390x.Greater != 0 && int32(x) > int32(y)
 15968  		// result: (First yes no)
 15969  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15970  			v_0 := b.Controls[0]
 15971  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15972  			y := ssa.AuxIntToInt8(b.AuxInt)
 15973  			c := ssa.AuxToS390xCCMask(b.Aux)
 15974  			if !(c&s390x.Greater != 0 && int32(x) > int32(y)) {
 15975  				break
 15976  			}
 15977  			b.Reset(block.BlockFirst)
 15978  			return true
 15979  		}
 15980  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15981  		// cond: c&s390x.Equal == 0 && int32(x) == int32(y)
 15982  		// result: (First no yes)
 15983  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15984  			v_0 := b.Controls[0]
 15985  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 15986  			y := ssa.AuxIntToInt8(b.AuxInt)
 15987  			c := ssa.AuxToS390xCCMask(b.Aux)
 15988  			if !(c&s390x.Equal == 0 && int32(x) == int32(y)) {
 15989  				break
 15990  			}
 15991  			b.Reset(block.BlockFirst)
 15992  			b.SwapSuccessors()
 15993  			return true
 15994  		}
 15995  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15996  		// cond: c&s390x.Less == 0 && int32(x) < int32(y)
 15997  		// result: (First no yes)
 15998  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 15999  			v_0 := b.Controls[0]
 16000  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16001  			y := ssa.AuxIntToInt8(b.AuxInt)
 16002  			c := ssa.AuxToS390xCCMask(b.Aux)
 16003  			if !(c&s390x.Less == 0 && int32(x) < int32(y)) {
 16004  				break
 16005  			}
 16006  			b.Reset(block.BlockFirst)
 16007  			b.SwapSuccessors()
 16008  			return true
 16009  		}
 16010  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 16011  		// cond: c&s390x.Greater == 0 && int32(x) > int32(y)
 16012  		// result: (First no yes)
 16013  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16014  			v_0 := b.Controls[0]
 16015  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16016  			y := ssa.AuxIntToInt8(b.AuxInt)
 16017  			c := ssa.AuxToS390xCCMask(b.Aux)
 16018  			if !(c&s390x.Greater == 0 && int32(x) > int32(y)) {
 16019  				break
 16020  			}
 16021  			b.Reset(block.BlockFirst)
 16022  			b.SwapSuccessors()
 16023  			return true
 16024  		}
 16025  	case block.BlockS390XCLGIJ:
 16026  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16027  		// cond: c&s390x.Equal != 0 && uint64(x) == uint64(y)
 16028  		// result: (First yes no)
 16029  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16030  			v_0 := b.Controls[0]
 16031  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16032  			y := ssa.AuxIntToUint8(b.AuxInt)
 16033  			c := ssa.AuxToS390xCCMask(b.Aux)
 16034  			if !(c&s390x.Equal != 0 && uint64(x) == uint64(y)) {
 16035  				break
 16036  			}
 16037  			b.Reset(block.BlockFirst)
 16038  			return true
 16039  		}
 16040  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16041  		// cond: c&s390x.Less != 0 && uint64(x) < uint64(y)
 16042  		// result: (First yes no)
 16043  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16044  			v_0 := b.Controls[0]
 16045  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16046  			y := ssa.AuxIntToUint8(b.AuxInt)
 16047  			c := ssa.AuxToS390xCCMask(b.Aux)
 16048  			if !(c&s390x.Less != 0 && uint64(x) < uint64(y)) {
 16049  				break
 16050  			}
 16051  			b.Reset(block.BlockFirst)
 16052  			return true
 16053  		}
 16054  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16055  		// cond: c&s390x.Greater != 0 && uint64(x) > uint64(y)
 16056  		// result: (First yes no)
 16057  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16058  			v_0 := b.Controls[0]
 16059  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16060  			y := ssa.AuxIntToUint8(b.AuxInt)
 16061  			c := ssa.AuxToS390xCCMask(b.Aux)
 16062  			if !(c&s390x.Greater != 0 && uint64(x) > uint64(y)) {
 16063  				break
 16064  			}
 16065  			b.Reset(block.BlockFirst)
 16066  			return true
 16067  		}
 16068  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16069  		// cond: c&s390x.Equal == 0 && uint64(x) == uint64(y)
 16070  		// result: (First no yes)
 16071  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16072  			v_0 := b.Controls[0]
 16073  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16074  			y := ssa.AuxIntToUint8(b.AuxInt)
 16075  			c := ssa.AuxToS390xCCMask(b.Aux)
 16076  			if !(c&s390x.Equal == 0 && uint64(x) == uint64(y)) {
 16077  				break
 16078  			}
 16079  			b.Reset(block.BlockFirst)
 16080  			b.SwapSuccessors()
 16081  			return true
 16082  		}
 16083  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16084  		// cond: c&s390x.Less == 0 && uint64(x) < uint64(y)
 16085  		// result: (First no yes)
 16086  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16087  			v_0 := b.Controls[0]
 16088  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16089  			y := ssa.AuxIntToUint8(b.AuxInt)
 16090  			c := ssa.AuxToS390xCCMask(b.Aux)
 16091  			if !(c&s390x.Less == 0 && uint64(x) < uint64(y)) {
 16092  				break
 16093  			}
 16094  			b.Reset(block.BlockFirst)
 16095  			b.SwapSuccessors()
 16096  			return true
 16097  		}
 16098  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16099  		// cond: c&s390x.Greater == 0 && uint64(x) > uint64(y)
 16100  		// result: (First no yes)
 16101  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16102  			v_0 := b.Controls[0]
 16103  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16104  			y := ssa.AuxIntToUint8(b.AuxInt)
 16105  			c := ssa.AuxToS390xCCMask(b.Aux)
 16106  			if !(c&s390x.Greater == 0 && uint64(x) > uint64(y)) {
 16107  				break
 16108  			}
 16109  			b.Reset(block.BlockFirst)
 16110  			b.SwapSuccessors()
 16111  			return true
 16112  		}
 16113  		// match: (CLGIJ {s390x.GreaterOrEqual} _ [0] yes no)
 16114  		// result: (First yes no)
 16115  		for {
 16116  			if ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16117  				break
 16118  			}
 16119  			b.Reset(block.BlockFirst)
 16120  			return true
 16121  		}
 16122  		// match: (CLGIJ {s390x.Less} _ [0] yes no)
 16123  		// result: (First no yes)
 16124  		for {
 16125  			if ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Less {
 16126  				break
 16127  			}
 16128  			b.Reset(block.BlockFirst)
 16129  			b.SwapSuccessors()
 16130  			return true
 16131  		}
 16132  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16133  		// result: (BRC {s390x.NoCarry} carry)
 16134  		for b.Controls[0].Op == ssaop.OpSelect0 {
 16135  			v_0 := b.Controls[0]
 16136  			v_0_0 := v_0.Args[0]
 16137  			if v_0_0.Op != ssaop.OpS390XADDE {
 16138  				break
 16139  			}
 16140  			carry := v_0_0.Args[2]
 16141  			v_0_0_0 := v_0_0.Args[0]
 16142  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16143  				break
 16144  			}
 16145  			v_0_0_1 := v_0_0.Args[1]
 16146  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 16147  				break
 16148  			}
 16149  			b.ResetWithControl(block.BlockS390XBRC, carry)
 16150  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoCarry)
 16151  			return true
 16152  		}
 16153  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16154  		// result: (BRC {s390x.Carry} carry)
 16155  		for b.Controls[0].Op == ssaop.OpSelect0 {
 16156  			v_0 := b.Controls[0]
 16157  			v_0_0 := v_0.Args[0]
 16158  			if v_0_0.Op != ssaop.OpS390XADDE {
 16159  				break
 16160  			}
 16161  			carry := v_0_0.Args[2]
 16162  			v_0_0_0 := v_0_0.Args[0]
 16163  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16164  				break
 16165  			}
 16166  			v_0_0_1 := v_0_0.Args[1]
 16167  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 16168  				break
 16169  			}
 16170  			b.ResetWithControl(block.BlockS390XBRC, carry)
 16171  			b.Aux = ssa.S390xCCMaskToAux(s390x.Carry)
 16172  			return true
 16173  		}
 16174  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16175  		// result: (BRC {s390x.Carry} carry)
 16176  		for b.Controls[0].Op == ssaop.OpSelect0 {
 16177  			v_0 := b.Controls[0]
 16178  			v_0_0 := v_0.Args[0]
 16179  			if v_0_0.Op != ssaop.OpS390XADDE {
 16180  				break
 16181  			}
 16182  			carry := v_0_0.Args[2]
 16183  			v_0_0_0 := v_0_0.Args[0]
 16184  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16185  				break
 16186  			}
 16187  			v_0_0_1 := v_0_0.Args[1]
 16188  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16189  				break
 16190  			}
 16191  			b.ResetWithControl(block.BlockS390XBRC, carry)
 16192  			b.Aux = ssa.S390xCCMaskToAux(s390x.Carry)
 16193  			return true
 16194  		}
 16195  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16196  		// result: (BRC {s390x.NoCarry} carry)
 16197  		for b.Controls[0].Op == ssaop.OpSelect0 {
 16198  			v_0 := b.Controls[0]
 16199  			v_0_0 := v_0.Args[0]
 16200  			if v_0_0.Op != ssaop.OpS390XADDE {
 16201  				break
 16202  			}
 16203  			carry := v_0_0.Args[2]
 16204  			v_0_0_0 := v_0_0.Args[0]
 16205  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16206  				break
 16207  			}
 16208  			v_0_0_1 := v_0_0.Args[1]
 16209  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16210  				break
 16211  			}
 16212  			b.ResetWithControl(block.BlockS390XBRC, carry)
 16213  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoCarry)
 16214  			return true
 16215  		}
 16216  		// match: (CLGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16217  		// result: (BRC {s390x.Carry} carry)
 16218  		for b.Controls[0].Op == ssaop.OpSelect0 {
 16219  			v_0 := b.Controls[0]
 16220  			v_0_0 := v_0.Args[0]
 16221  			if v_0_0.Op != ssaop.OpS390XADDE {
 16222  				break
 16223  			}
 16224  			carry := v_0_0.Args[2]
 16225  			v_0_0_0 := v_0_0.Args[0]
 16226  			if v_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16227  				break
 16228  			}
 16229  			v_0_0_1 := v_0_0.Args[1]
 16230  			if v_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Greater {
 16231  				break
 16232  			}
 16233  			b.ResetWithControl(block.BlockS390XBRC, carry)
 16234  			b.Aux = ssa.S390xCCMaskToAux(s390x.Carry)
 16235  			return true
 16236  		}
 16237  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16238  		// result: (BRC {s390x.NoBorrow} borrow)
 16239  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 16240  			v_0 := b.Controls[0]
 16241  			v_0_0 := v_0.Args[0]
 16242  			if v_0_0.Op != ssaop.OpSelect0 {
 16243  				break
 16244  			}
 16245  			v_0_0_0 := v_0_0.Args[0]
 16246  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 16247  				break
 16248  			}
 16249  			borrow := v_0_0_0.Args[2]
 16250  			v_0_0_0_0 := v_0_0_0.Args[0]
 16251  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16252  				break
 16253  			}
 16254  			v_0_0_0_1 := v_0_0_0.Args[1]
 16255  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 16256  				break
 16257  			}
 16258  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 16259  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoBorrow)
 16260  			return true
 16261  		}
 16262  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16263  		// result: (BRC {s390x.Borrow} borrow)
 16264  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 16265  			v_0 := b.Controls[0]
 16266  			v_0_0 := v_0.Args[0]
 16267  			if v_0_0.Op != ssaop.OpSelect0 {
 16268  				break
 16269  			}
 16270  			v_0_0_0 := v_0_0.Args[0]
 16271  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 16272  				break
 16273  			}
 16274  			borrow := v_0_0_0.Args[2]
 16275  			v_0_0_0_0 := v_0_0_0.Args[0]
 16276  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16277  				break
 16278  			}
 16279  			v_0_0_0_1 := v_0_0_0.Args[1]
 16280  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Equal {
 16281  				break
 16282  			}
 16283  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 16284  			b.Aux = ssa.S390xCCMaskToAux(s390x.Borrow)
 16285  			return true
 16286  		}
 16287  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16288  		// result: (BRC {s390x.Borrow} borrow)
 16289  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 16290  			v_0 := b.Controls[0]
 16291  			v_0_0 := v_0.Args[0]
 16292  			if v_0_0.Op != ssaop.OpSelect0 {
 16293  				break
 16294  			}
 16295  			v_0_0_0 := v_0_0.Args[0]
 16296  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 16297  				break
 16298  			}
 16299  			borrow := v_0_0_0.Args[2]
 16300  			v_0_0_0_0 := v_0_0_0.Args[0]
 16301  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16302  				break
 16303  			}
 16304  			v_0_0_0_1 := v_0_0_0.Args[1]
 16305  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16306  				break
 16307  			}
 16308  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 16309  			b.Aux = ssa.S390xCCMaskToAux(s390x.Borrow)
 16310  			return true
 16311  		}
 16312  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16313  		// result: (BRC {s390x.NoBorrow} borrow)
 16314  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 16315  			v_0 := b.Controls[0]
 16316  			v_0_0 := v_0.Args[0]
 16317  			if v_0_0.Op != ssaop.OpSelect0 {
 16318  				break
 16319  			}
 16320  			v_0_0_0 := v_0_0.Args[0]
 16321  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 16322  				break
 16323  			}
 16324  			borrow := v_0_0_0.Args[2]
 16325  			v_0_0_0_0 := v_0_0_0.Args[0]
 16326  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16327  				break
 16328  			}
 16329  			v_0_0_0_1 := v_0_0_0.Args[1]
 16330  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 1 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16331  				break
 16332  			}
 16333  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 16334  			b.Aux = ssa.S390xCCMaskToAux(s390x.NoBorrow)
 16335  			return true
 16336  		}
 16337  		// match: (CLGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16338  		// result: (BRC {s390x.Borrow} borrow)
 16339  		for b.Controls[0].Op == ssaop.OpS390XNEG {
 16340  			v_0 := b.Controls[0]
 16341  			v_0_0 := v_0.Args[0]
 16342  			if v_0_0.Op != ssaop.OpSelect0 {
 16343  				break
 16344  			}
 16345  			v_0_0_0 := v_0_0.Args[0]
 16346  			if v_0_0_0.Op != ssaop.OpS390XSUBE {
 16347  				break
 16348  			}
 16349  			borrow := v_0_0_0.Args[2]
 16350  			v_0_0_0_0 := v_0_0_0.Args[0]
 16351  			if v_0_0_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16352  				break
 16353  			}
 16354  			v_0_0_0_1 := v_0_0_0.Args[1]
 16355  			if v_0_0_0_1.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0_0_1.AuxInt) != 0 || ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Greater {
 16356  				break
 16357  			}
 16358  			b.ResetWithControl(block.BlockS390XBRC, borrow)
 16359  			b.Aux = ssa.S390xCCMaskToAux(s390x.Borrow)
 16360  			return true
 16361  		}
 16362  	case block.BlockS390XCLGRJ:
 16363  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 16364  		// cond: isU8Bit(y)
 16365  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 16366  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 16367  			x := b.Controls[0]
 16368  			v_1 := b.Controls[1]
 16369  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 16370  			c := ssa.AuxToS390xCCMask(b.Aux)
 16371  			if !(isU8Bit(y)) {
 16372  				break
 16373  			}
 16374  			b.ResetWithControl(block.BlockS390XCLGIJ, x)
 16375  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(y))
 16376  			b.Aux = ssa.S390xCCMaskToAux(c)
 16377  			return true
 16378  		}
 16379  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 16380  		// cond: isU8Bit(x)
 16381  		// result: (CLGIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 16382  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16383  			v_0 := b.Controls[0]
 16384  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16385  			y := b.Controls[1]
 16386  			c := ssa.AuxToS390xCCMask(b.Aux)
 16387  			if !(isU8Bit(x)) {
 16388  				break
 16389  			}
 16390  			b.ResetWithControl(block.BlockS390XCLGIJ, y)
 16391  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(x))
 16392  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 16393  			return true
 16394  		}
 16395  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 16396  		// cond: !isU8Bit(y) && ssa.IsU32Bit(y)
 16397  		// result: (BRC {c} (CMPUconst x [int32(y)]) yes no)
 16398  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 16399  			x := b.Controls[0]
 16400  			v_1 := b.Controls[1]
 16401  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 16402  			c := ssa.AuxToS390xCCMask(b.Aux)
 16403  			if !(!isU8Bit(y) && ssa.IsU32Bit(y)) {
 16404  				break
 16405  			}
 16406  			v0 := b.NewValue0(x.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
 16407  			v0.AuxInt = ssa.Int32ToAuxInt(int32(y))
 16408  			v0.AddArg(x)
 16409  			b.ResetWithControl(block.BlockS390XBRC, v0)
 16410  			b.Aux = ssa.S390xCCMaskToAux(c)
 16411  			return true
 16412  		}
 16413  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 16414  		// cond: !isU8Bit(x) && ssa.IsU32Bit(x)
 16415  		// result: (BRC {c.ReverseComparison()} (CMPUconst y [int32(x)]) yes no)
 16416  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16417  			v_0 := b.Controls[0]
 16418  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16419  			y := b.Controls[1]
 16420  			c := ssa.AuxToS390xCCMask(b.Aux)
 16421  			if !(!isU8Bit(x) && ssa.IsU32Bit(x)) {
 16422  				break
 16423  			}
 16424  			v0 := b.NewValue0(v_0.Pos, ssaop.OpS390XCMPUconst, types.TypeFlags)
 16425  			v0.AuxInt = ssa.Int32ToAuxInt(int32(x))
 16426  			v0.AddArg(y)
 16427  			b.ResetWithControl(block.BlockS390XBRC, v0)
 16428  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 16429  			return true
 16430  		}
 16431  		// match: (CLGRJ {c} x y yes no)
 16432  		// cond: x == y && c&s390x.Equal != 0
 16433  		// result: (First yes no)
 16434  		for {
 16435  			x := b.Controls[0]
 16436  			y := b.Controls[1]
 16437  			c := ssa.AuxToS390xCCMask(b.Aux)
 16438  			if !(x == y && c&s390x.Equal != 0) {
 16439  				break
 16440  			}
 16441  			b.Reset(block.BlockFirst)
 16442  			return true
 16443  		}
 16444  		// match: (CLGRJ {c} x y yes no)
 16445  		// cond: x == y && c&s390x.Equal == 0
 16446  		// result: (First no yes)
 16447  		for {
 16448  			x := b.Controls[0]
 16449  			y := b.Controls[1]
 16450  			c := ssa.AuxToS390xCCMask(b.Aux)
 16451  			if !(x == y && c&s390x.Equal == 0) {
 16452  				break
 16453  			}
 16454  			b.Reset(block.BlockFirst)
 16455  			b.SwapSuccessors()
 16456  			return true
 16457  		}
 16458  	case block.BlockS390XCLIJ:
 16459  		// match: (CLIJ {s390x.LessOrGreater} (LOCGR {d} (MOVDconst [0]) (MOVDconst [x]) cmp) [0] yes no)
 16460  		// cond: int32(x) != 0
 16461  		// result: (BRC {d} cmp yes no)
 16462  		for b.Controls[0].Op == ssaop.OpS390XLOCGR {
 16463  			v_0 := b.Controls[0]
 16464  			d := ssa.AuxToS390xCCMask(v_0.Aux)
 16465  			cmp := v_0.Args[2]
 16466  			v_0_0 := v_0.Args[0]
 16467  			if v_0_0.Op != ssaop.OpS390XMOVDconst || ssa.AuxIntToInt64(v_0_0.AuxInt) != 0 {
 16468  				break
 16469  			}
 16470  			v_0_1 := v_0.Args[1]
 16471  			if v_0_1.Op != ssaop.OpS390XMOVDconst {
 16472  				break
 16473  			}
 16474  			x := ssa.AuxIntToInt64(v_0_1.AuxInt)
 16475  			if ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.LessOrGreater || !(int32(x) != 0) {
 16476  				break
 16477  			}
 16478  			b.ResetWithControl(block.BlockS390XBRC, cmp)
 16479  			b.Aux = ssa.S390xCCMaskToAux(d)
 16480  			return true
 16481  		}
 16482  		// match: (CLIJ {c} (MOVWreg x) [y] yes no)
 16483  		// result: (CLIJ {c} x [y] yes no)
 16484  		for b.Controls[0].Op == ssaop.OpS390XMOVWreg {
 16485  			v_0 := b.Controls[0]
 16486  			x := v_0.Args[0]
 16487  			y := ssa.AuxIntToUint8(b.AuxInt)
 16488  			c := ssa.AuxToS390xCCMask(b.Aux)
 16489  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 16490  			b.AuxInt = ssa.Uint8ToAuxInt(y)
 16491  			b.Aux = ssa.S390xCCMaskToAux(c)
 16492  			return true
 16493  		}
 16494  		// match: (CLIJ {c} (MOVWZreg x) [y] yes no)
 16495  		// result: (CLIJ {c} x [y] yes no)
 16496  		for b.Controls[0].Op == ssaop.OpS390XMOVWZreg {
 16497  			v_0 := b.Controls[0]
 16498  			x := v_0.Args[0]
 16499  			y := ssa.AuxIntToUint8(b.AuxInt)
 16500  			c := ssa.AuxToS390xCCMask(b.Aux)
 16501  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 16502  			b.AuxInt = ssa.Uint8ToAuxInt(y)
 16503  			b.Aux = ssa.S390xCCMaskToAux(c)
 16504  			return true
 16505  		}
 16506  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16507  		// cond: c&s390x.Equal != 0 && uint32(x) == uint32(y)
 16508  		// result: (First yes no)
 16509  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16510  			v_0 := b.Controls[0]
 16511  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16512  			y := ssa.AuxIntToUint8(b.AuxInt)
 16513  			c := ssa.AuxToS390xCCMask(b.Aux)
 16514  			if !(c&s390x.Equal != 0 && uint32(x) == uint32(y)) {
 16515  				break
 16516  			}
 16517  			b.Reset(block.BlockFirst)
 16518  			return true
 16519  		}
 16520  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16521  		// cond: c&s390x.Less != 0 && uint32(x) < uint32(y)
 16522  		// result: (First yes no)
 16523  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16524  			v_0 := b.Controls[0]
 16525  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16526  			y := ssa.AuxIntToUint8(b.AuxInt)
 16527  			c := ssa.AuxToS390xCCMask(b.Aux)
 16528  			if !(c&s390x.Less != 0 && uint32(x) < uint32(y)) {
 16529  				break
 16530  			}
 16531  			b.Reset(block.BlockFirst)
 16532  			return true
 16533  		}
 16534  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16535  		// cond: c&s390x.Greater != 0 && uint32(x) > uint32(y)
 16536  		// result: (First yes no)
 16537  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16538  			v_0 := b.Controls[0]
 16539  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16540  			y := ssa.AuxIntToUint8(b.AuxInt)
 16541  			c := ssa.AuxToS390xCCMask(b.Aux)
 16542  			if !(c&s390x.Greater != 0 && uint32(x) > uint32(y)) {
 16543  				break
 16544  			}
 16545  			b.Reset(block.BlockFirst)
 16546  			return true
 16547  		}
 16548  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16549  		// cond: c&s390x.Equal == 0 && uint32(x) == uint32(y)
 16550  		// result: (First no yes)
 16551  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16552  			v_0 := b.Controls[0]
 16553  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16554  			y := ssa.AuxIntToUint8(b.AuxInt)
 16555  			c := ssa.AuxToS390xCCMask(b.Aux)
 16556  			if !(c&s390x.Equal == 0 && uint32(x) == uint32(y)) {
 16557  				break
 16558  			}
 16559  			b.Reset(block.BlockFirst)
 16560  			b.SwapSuccessors()
 16561  			return true
 16562  		}
 16563  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16564  		// cond: c&s390x.Less == 0 && uint32(x) < uint32(y)
 16565  		// result: (First no yes)
 16566  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16567  			v_0 := b.Controls[0]
 16568  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16569  			y := ssa.AuxIntToUint8(b.AuxInt)
 16570  			c := ssa.AuxToS390xCCMask(b.Aux)
 16571  			if !(c&s390x.Less == 0 && uint32(x) < uint32(y)) {
 16572  				break
 16573  			}
 16574  			b.Reset(block.BlockFirst)
 16575  			b.SwapSuccessors()
 16576  			return true
 16577  		}
 16578  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16579  		// cond: c&s390x.Greater == 0 && uint32(x) > uint32(y)
 16580  		// result: (First no yes)
 16581  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16582  			v_0 := b.Controls[0]
 16583  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16584  			y := ssa.AuxIntToUint8(b.AuxInt)
 16585  			c := ssa.AuxToS390xCCMask(b.Aux)
 16586  			if !(c&s390x.Greater == 0 && uint32(x) > uint32(y)) {
 16587  				break
 16588  			}
 16589  			b.Reset(block.BlockFirst)
 16590  			b.SwapSuccessors()
 16591  			return true
 16592  		}
 16593  		// match: (CLIJ {s390x.GreaterOrEqual} _ [0] yes no)
 16594  		// result: (First yes no)
 16595  		for {
 16596  			if ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16597  				break
 16598  			}
 16599  			b.Reset(block.BlockFirst)
 16600  			return true
 16601  		}
 16602  		// match: (CLIJ {s390x.Less} _ [0] yes no)
 16603  		// result: (First no yes)
 16604  		for {
 16605  			if ssa.AuxIntToUint8(b.AuxInt) != 0 || ssa.AuxToS390xCCMask(b.Aux) != s390x.Less {
 16606  				break
 16607  			}
 16608  			b.Reset(block.BlockFirst)
 16609  			b.SwapSuccessors()
 16610  			return true
 16611  		}
 16612  	case block.BlockS390XCLRJ:
 16613  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 16614  		// cond: isU8Bit(y)
 16615  		// result: (CLIJ {c} x [uint8(y)] yes no)
 16616  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 16617  			x := b.Controls[0]
 16618  			v_1 := b.Controls[1]
 16619  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 16620  			c := ssa.AuxToS390xCCMask(b.Aux)
 16621  			if !(isU8Bit(y)) {
 16622  				break
 16623  			}
 16624  			b.ResetWithControl(block.BlockS390XCLIJ, x)
 16625  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(y))
 16626  			b.Aux = ssa.S390xCCMaskToAux(c)
 16627  			return true
 16628  		}
 16629  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 16630  		// cond: isU8Bit(x)
 16631  		// result: (CLIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 16632  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16633  			v_0 := b.Controls[0]
 16634  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16635  			y := b.Controls[1]
 16636  			c := ssa.AuxToS390xCCMask(b.Aux)
 16637  			if !(isU8Bit(x)) {
 16638  				break
 16639  			}
 16640  			b.ResetWithControl(block.BlockS390XCLIJ, y)
 16641  			b.AuxInt = ssa.Uint8ToAuxInt(uint8(x))
 16642  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 16643  			return true
 16644  		}
 16645  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 16646  		// cond: !isU8Bit(y) && ssa.IsU32Bit(y)
 16647  		// result: (BRC {c} (CMPWUconst x [int32(y)]) yes no)
 16648  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 16649  			x := b.Controls[0]
 16650  			v_1 := b.Controls[1]
 16651  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 16652  			c := ssa.AuxToS390xCCMask(b.Aux)
 16653  			if !(!isU8Bit(y) && ssa.IsU32Bit(y)) {
 16654  				break
 16655  			}
 16656  			v0 := b.NewValue0(x.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
 16657  			v0.AuxInt = ssa.Int32ToAuxInt(int32(y))
 16658  			v0.AddArg(x)
 16659  			b.ResetWithControl(block.BlockS390XBRC, v0)
 16660  			b.Aux = ssa.S390xCCMaskToAux(c)
 16661  			return true
 16662  		}
 16663  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 16664  		// cond: !isU8Bit(x) && ssa.IsU32Bit(x)
 16665  		// result: (BRC {c.ReverseComparison()} (CMPWUconst y [int32(x)]) yes no)
 16666  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16667  			v_0 := b.Controls[0]
 16668  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16669  			y := b.Controls[1]
 16670  			c := ssa.AuxToS390xCCMask(b.Aux)
 16671  			if !(!isU8Bit(x) && ssa.IsU32Bit(x)) {
 16672  				break
 16673  			}
 16674  			v0 := b.NewValue0(v_0.Pos, ssaop.OpS390XCMPWUconst, types.TypeFlags)
 16675  			v0.AuxInt = ssa.Int32ToAuxInt(int32(x))
 16676  			v0.AddArg(y)
 16677  			b.ResetWithControl(block.BlockS390XBRC, v0)
 16678  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 16679  			return true
 16680  		}
 16681  		// match: (CLRJ {c} x y yes no)
 16682  		// cond: x == y && c&s390x.Equal != 0
 16683  		// result: (First yes no)
 16684  		for {
 16685  			x := b.Controls[0]
 16686  			y := b.Controls[1]
 16687  			c := ssa.AuxToS390xCCMask(b.Aux)
 16688  			if !(x == y && c&s390x.Equal != 0) {
 16689  				break
 16690  			}
 16691  			b.Reset(block.BlockFirst)
 16692  			return true
 16693  		}
 16694  		// match: (CLRJ {c} x y yes no)
 16695  		// cond: x == y && c&s390x.Equal == 0
 16696  		// result: (First no yes)
 16697  		for {
 16698  			x := b.Controls[0]
 16699  			y := b.Controls[1]
 16700  			c := ssa.AuxToS390xCCMask(b.Aux)
 16701  			if !(x == y && c&s390x.Equal == 0) {
 16702  				break
 16703  			}
 16704  			b.Reset(block.BlockFirst)
 16705  			b.SwapSuccessors()
 16706  			return true
 16707  		}
 16708  	case block.BlockS390XCRJ:
 16709  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 16710  		// cond: is8Bit(y)
 16711  		// result: (CIJ {c} x [ int8(y)] yes no)
 16712  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 16713  			x := b.Controls[0]
 16714  			v_1 := b.Controls[1]
 16715  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 16716  			c := ssa.AuxToS390xCCMask(b.Aux)
 16717  			if !(is8Bit(y)) {
 16718  				break
 16719  			}
 16720  			b.ResetWithControl(block.BlockS390XCIJ, x)
 16721  			b.AuxInt = ssa.Int8ToAuxInt(int8(y))
 16722  			b.Aux = ssa.S390xCCMaskToAux(c)
 16723  			return true
 16724  		}
 16725  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 16726  		// cond: is8Bit(x)
 16727  		// result: (CIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 16728  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16729  			v_0 := b.Controls[0]
 16730  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16731  			y := b.Controls[1]
 16732  			c := ssa.AuxToS390xCCMask(b.Aux)
 16733  			if !(is8Bit(x)) {
 16734  				break
 16735  			}
 16736  			b.ResetWithControl(block.BlockS390XCIJ, y)
 16737  			b.AuxInt = ssa.Int8ToAuxInt(int8(x))
 16738  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 16739  			return true
 16740  		}
 16741  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 16742  		// cond: !is8Bit(y) && ssa.Is32Bit(y)
 16743  		// result: (BRC {c} (CMPWconst x [int32(y)]) yes no)
 16744  		for b.Controls[1].Op == ssaop.OpS390XMOVDconst {
 16745  			x := b.Controls[0]
 16746  			v_1 := b.Controls[1]
 16747  			y := ssa.AuxIntToInt64(v_1.AuxInt)
 16748  			c := ssa.AuxToS390xCCMask(b.Aux)
 16749  			if !(!is8Bit(y) && ssa.Is32Bit(y)) {
 16750  				break
 16751  			}
 16752  			v0 := b.NewValue0(x.Pos, ssaop.OpS390XCMPWconst, types.TypeFlags)
 16753  			v0.AuxInt = ssa.Int32ToAuxInt(int32(y))
 16754  			v0.AddArg(x)
 16755  			b.ResetWithControl(block.BlockS390XBRC, v0)
 16756  			b.Aux = ssa.S390xCCMaskToAux(c)
 16757  			return true
 16758  		}
 16759  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 16760  		// cond: !is8Bit(x) && ssa.Is32Bit(x)
 16761  		// result: (BRC {c.ReverseComparison()} (CMPWconst y [int32(x)]) yes no)
 16762  		for b.Controls[0].Op == ssaop.OpS390XMOVDconst {
 16763  			v_0 := b.Controls[0]
 16764  			x := ssa.AuxIntToInt64(v_0.AuxInt)
 16765  			y := b.Controls[1]
 16766  			c := ssa.AuxToS390xCCMask(b.Aux)
 16767  			if !(!is8Bit(x) && ssa.Is32Bit(x)) {
 16768  				break
 16769  			}
 16770  			v0 := b.NewValue0(v_0.Pos, ssaop.OpS390XCMPWconst, types.TypeFlags)
 16771  			v0.AuxInt = ssa.Int32ToAuxInt(int32(x))
 16772  			v0.AddArg(y)
 16773  			b.ResetWithControl(block.BlockS390XBRC, v0)
 16774  			b.Aux = ssa.S390xCCMaskToAux(c.ReverseComparison())
 16775  			return true
 16776  		}
 16777  		// match: (CRJ {c} x y yes no)
 16778  		// cond: x == y && c&s390x.Equal != 0
 16779  		// result: (First yes no)
 16780  		for {
 16781  			x := b.Controls[0]
 16782  			y := b.Controls[1]
 16783  			c := ssa.AuxToS390xCCMask(b.Aux)
 16784  			if !(x == y && c&s390x.Equal != 0) {
 16785  				break
 16786  			}
 16787  			b.Reset(block.BlockFirst)
 16788  			return true
 16789  		}
 16790  		// match: (CRJ {c} x y yes no)
 16791  		// cond: x == y && c&s390x.Equal == 0
 16792  		// result: (First no yes)
 16793  		for {
 16794  			x := b.Controls[0]
 16795  			y := b.Controls[1]
 16796  			c := ssa.AuxToS390xCCMask(b.Aux)
 16797  			if !(x == y && c&s390x.Equal == 0) {
 16798  				break
 16799  			}
 16800  			b.Reset(block.BlockFirst)
 16801  			b.SwapSuccessors()
 16802  			return true
 16803  		}
 16804  	case block.BlockIf:
 16805  		// match: (If cond yes no)
 16806  		// result: (CLIJ {s390x.LessOrGreater} (MOVBZreg <typ.Bool> cond) [0] yes no)
 16807  		for {
 16808  			cond := b.Controls[0]
 16809  			v0 := b.NewValue0(cond.Pos, ssaop.OpS390XMOVBZreg, typ.Bool)
 16810  			v0.AddArg(cond)
 16811  			b.ResetWithControl(block.BlockS390XCLIJ, v0)
 16812  			b.AuxInt = ssa.Uint8ToAuxInt(0)
 16813  			b.Aux = ssa.S390xCCMaskToAux(s390x.LessOrGreater)
 16814  			return true
 16815  		}
 16816  	}
 16817  	return false
 16818  }
 16819  

View as plain text