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

     1  // Code generated from _gen/S390X.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  import "cmd/internal/obj/s390x"
     8  
     9  func rewriteValueS390X(v *Value) bool {
    10  	switch v.Op {
    11  	case OpAdd16:
    12  		v.Op = OpS390XADDW
    13  		return true
    14  	case OpAdd32:
    15  		v.Op = OpS390XADDW
    16  		return true
    17  	case OpAdd32F:
    18  		return rewriteValueS390X_OpAdd32F(v)
    19  	case OpAdd64:
    20  		v.Op = OpS390XADD
    21  		return true
    22  	case OpAdd64F:
    23  		return rewriteValueS390X_OpAdd64F(v)
    24  	case OpAdd8:
    25  		v.Op = OpS390XADDW
    26  		return true
    27  	case OpAddPtr:
    28  		v.Op = OpS390XADD
    29  		return true
    30  	case OpAddr:
    31  		return rewriteValueS390X_OpAddr(v)
    32  	case OpAnd16:
    33  		v.Op = OpS390XANDW
    34  		return true
    35  	case OpAnd32:
    36  		v.Op = OpS390XANDW
    37  		return true
    38  	case OpAnd64:
    39  		v.Op = OpS390XAND
    40  		return true
    41  	case OpAnd8:
    42  		v.Op = OpS390XANDW
    43  		return true
    44  	case OpAndB:
    45  		v.Op = OpS390XANDW
    46  		return true
    47  	case OpAtomicAdd32:
    48  		return rewriteValueS390X_OpAtomicAdd32(v)
    49  	case OpAtomicAdd64:
    50  		return rewriteValueS390X_OpAtomicAdd64(v)
    51  	case OpAtomicAnd32:
    52  		v.Op = OpS390XLAN
    53  		return true
    54  	case OpAtomicAnd8:
    55  		return rewriteValueS390X_OpAtomicAnd8(v)
    56  	case OpAtomicCompareAndSwap32:
    57  		return rewriteValueS390X_OpAtomicCompareAndSwap32(v)
    58  	case OpAtomicCompareAndSwap64:
    59  		return rewriteValueS390X_OpAtomicCompareAndSwap64(v)
    60  	case OpAtomicExchange32:
    61  		return rewriteValueS390X_OpAtomicExchange32(v)
    62  	case OpAtomicExchange64:
    63  		return rewriteValueS390X_OpAtomicExchange64(v)
    64  	case OpAtomicLoad32:
    65  		return rewriteValueS390X_OpAtomicLoad32(v)
    66  	case OpAtomicLoad64:
    67  		return rewriteValueS390X_OpAtomicLoad64(v)
    68  	case OpAtomicLoad8:
    69  		return rewriteValueS390X_OpAtomicLoad8(v)
    70  	case OpAtomicLoadAcq32:
    71  		return rewriteValueS390X_OpAtomicLoadAcq32(v)
    72  	case OpAtomicLoadPtr:
    73  		return rewriteValueS390X_OpAtomicLoadPtr(v)
    74  	case OpAtomicOr32:
    75  		v.Op = OpS390XLAO
    76  		return true
    77  	case OpAtomicOr8:
    78  		return rewriteValueS390X_OpAtomicOr8(v)
    79  	case OpAtomicStore32:
    80  		return rewriteValueS390X_OpAtomicStore32(v)
    81  	case OpAtomicStore64:
    82  		return rewriteValueS390X_OpAtomicStore64(v)
    83  	case OpAtomicStore8:
    84  		return rewriteValueS390X_OpAtomicStore8(v)
    85  	case OpAtomicStorePtrNoWB:
    86  		return rewriteValueS390X_OpAtomicStorePtrNoWB(v)
    87  	case OpAtomicStoreRel32:
    88  		return rewriteValueS390X_OpAtomicStoreRel32(v)
    89  	case OpAvg64u:
    90  		return rewriteValueS390X_OpAvg64u(v)
    91  	case OpBitLen16:
    92  		return rewriteValueS390X_OpBitLen16(v)
    93  	case OpBitLen32:
    94  		return rewriteValueS390X_OpBitLen32(v)
    95  	case OpBitLen64:
    96  		return rewriteValueS390X_OpBitLen64(v)
    97  	case OpBitLen8:
    98  		return rewriteValueS390X_OpBitLen8(v)
    99  	case OpBswap16:
   100  		return rewriteValueS390X_OpBswap16(v)
   101  	case OpBswap32:
   102  		v.Op = OpS390XMOVWBR
   103  		return true
   104  	case OpBswap64:
   105  		v.Op = OpS390XMOVDBR
   106  		return true
   107  	case OpCeil:
   108  		return rewriteValueS390X_OpCeil(v)
   109  	case OpClosureCall:
   110  		v.Op = OpS390XCALLclosure
   111  		return true
   112  	case OpCom16:
   113  		v.Op = OpS390XNOTW
   114  		return true
   115  	case OpCom32:
   116  		v.Op = OpS390XNOTW
   117  		return true
   118  	case OpCom64:
   119  		v.Op = OpS390XNOT
   120  		return true
   121  	case OpCom8:
   122  		v.Op = OpS390XNOTW
   123  		return true
   124  	case OpConst16:
   125  		return rewriteValueS390X_OpConst16(v)
   126  	case OpConst32:
   127  		return rewriteValueS390X_OpConst32(v)
   128  	case OpConst32F:
   129  		v.Op = OpS390XFMOVSconst
   130  		return true
   131  	case OpConst64:
   132  		return rewriteValueS390X_OpConst64(v)
   133  	case OpConst64F:
   134  		v.Op = OpS390XFMOVDconst
   135  		return true
   136  	case OpConst8:
   137  		return rewriteValueS390X_OpConst8(v)
   138  	case OpConstBool:
   139  		return rewriteValueS390X_OpConstBool(v)
   140  	case OpConstNil:
   141  		return rewriteValueS390X_OpConstNil(v)
   142  	case OpCtz16:
   143  		return rewriteValueS390X_OpCtz16(v)
   144  	case OpCtz16NonZero:
   145  		v.Op = OpCtz64
   146  		return true
   147  	case OpCtz32:
   148  		return rewriteValueS390X_OpCtz32(v)
   149  	case OpCtz32NonZero:
   150  		v.Op = OpCtz64
   151  		return true
   152  	case OpCtz64:
   153  		return rewriteValueS390X_OpCtz64(v)
   154  	case OpCtz64NonZero:
   155  		v.Op = OpCtz64
   156  		return true
   157  	case OpCtz8:
   158  		return rewriteValueS390X_OpCtz8(v)
   159  	case OpCtz8NonZero:
   160  		v.Op = OpCtz64
   161  		return true
   162  	case OpCvt32Fto32:
   163  		v.Op = OpS390XCFEBRA
   164  		return true
   165  	case OpCvt32Fto32U:
   166  		v.Op = OpS390XCLFEBR
   167  		return true
   168  	case OpCvt32Fto64:
   169  		v.Op = OpS390XCGEBRA
   170  		return true
   171  	case OpCvt32Fto64F:
   172  		v.Op = OpS390XLDEBR
   173  		return true
   174  	case OpCvt32Fto64U:
   175  		v.Op = OpS390XCLGEBR
   176  		return true
   177  	case OpCvt32Uto32F:
   178  		v.Op = OpS390XCELFBR
   179  		return true
   180  	case OpCvt32Uto64F:
   181  		v.Op = OpS390XCDLFBR
   182  		return true
   183  	case OpCvt32to32F:
   184  		v.Op = OpS390XCEFBRA
   185  		return true
   186  	case OpCvt32to64F:
   187  		v.Op = OpS390XCDFBRA
   188  		return true
   189  	case OpCvt64Fto32:
   190  		v.Op = OpS390XCFDBRA
   191  		return true
   192  	case OpCvt64Fto32F:
   193  		v.Op = OpS390XLEDBR
   194  		return true
   195  	case OpCvt64Fto32U:
   196  		v.Op = OpS390XCLFDBR
   197  		return true
   198  	case OpCvt64Fto64:
   199  		v.Op = OpS390XCGDBRA
   200  		return true
   201  	case OpCvt64Fto64U:
   202  		v.Op = OpS390XCLGDBR
   203  		return true
   204  	case OpCvt64Uto32F:
   205  		v.Op = OpS390XCELGBR
   206  		return true
   207  	case OpCvt64Uto64F:
   208  		v.Op = OpS390XCDLGBR
   209  		return true
   210  	case OpCvt64to32F:
   211  		v.Op = OpS390XCEGBRA
   212  		return true
   213  	case OpCvt64to64F:
   214  		v.Op = OpS390XCDGBRA
   215  		return true
   216  	case OpCvtBoolToUint8:
   217  		v.Op = OpCopy
   218  		return true
   219  	case OpDiv16:
   220  		return rewriteValueS390X_OpDiv16(v)
   221  	case OpDiv16u:
   222  		return rewriteValueS390X_OpDiv16u(v)
   223  	case OpDiv32:
   224  		return rewriteValueS390X_OpDiv32(v)
   225  	case OpDiv32F:
   226  		v.Op = OpS390XFDIVS
   227  		return true
   228  	case OpDiv32u:
   229  		return rewriteValueS390X_OpDiv32u(v)
   230  	case OpDiv64:
   231  		return rewriteValueS390X_OpDiv64(v)
   232  	case OpDiv64F:
   233  		v.Op = OpS390XFDIV
   234  		return true
   235  	case OpDiv64u:
   236  		v.Op = OpS390XDIVDU
   237  		return true
   238  	case OpDiv8:
   239  		return rewriteValueS390X_OpDiv8(v)
   240  	case OpDiv8u:
   241  		return rewriteValueS390X_OpDiv8u(v)
   242  	case OpEq16:
   243  		return rewriteValueS390X_OpEq16(v)
   244  	case OpEq32:
   245  		return rewriteValueS390X_OpEq32(v)
   246  	case OpEq32F:
   247  		return rewriteValueS390X_OpEq32F(v)
   248  	case OpEq64:
   249  		return rewriteValueS390X_OpEq64(v)
   250  	case OpEq64F:
   251  		return rewriteValueS390X_OpEq64F(v)
   252  	case OpEq8:
   253  		return rewriteValueS390X_OpEq8(v)
   254  	case OpEqB:
   255  		return rewriteValueS390X_OpEqB(v)
   256  	case OpEqPtr:
   257  		return rewriteValueS390X_OpEqPtr(v)
   258  	case OpFMA:
   259  		return rewriteValueS390X_OpFMA(v)
   260  	case OpFloor:
   261  		return rewriteValueS390X_OpFloor(v)
   262  	case OpGetCallerPC:
   263  		v.Op = OpS390XLoweredGetCallerPC
   264  		return true
   265  	case OpGetCallerSP:
   266  		v.Op = OpS390XLoweredGetCallerSP
   267  		return true
   268  	case OpGetClosurePtr:
   269  		v.Op = OpS390XLoweredGetClosurePtr
   270  		return true
   271  	case OpGetG:
   272  		v.Op = OpS390XLoweredGetG
   273  		return true
   274  	case OpHmul32:
   275  		return rewriteValueS390X_OpHmul32(v)
   276  	case OpHmul32u:
   277  		return rewriteValueS390X_OpHmul32u(v)
   278  	case OpHmul64:
   279  		v.Op = OpS390XMULHD
   280  		return true
   281  	case OpHmul64u:
   282  		v.Op = OpS390XMULHDU
   283  		return true
   284  	case OpITab:
   285  		return rewriteValueS390X_OpITab(v)
   286  	case OpInterCall:
   287  		v.Op = OpS390XCALLinter
   288  		return true
   289  	case OpIsInBounds:
   290  		return rewriteValueS390X_OpIsInBounds(v)
   291  	case OpIsNonNil:
   292  		return rewriteValueS390X_OpIsNonNil(v)
   293  	case OpIsSliceInBounds:
   294  		return rewriteValueS390X_OpIsSliceInBounds(v)
   295  	case OpLeq16:
   296  		return rewriteValueS390X_OpLeq16(v)
   297  	case OpLeq16U:
   298  		return rewriteValueS390X_OpLeq16U(v)
   299  	case OpLeq32:
   300  		return rewriteValueS390X_OpLeq32(v)
   301  	case OpLeq32F:
   302  		return rewriteValueS390X_OpLeq32F(v)
   303  	case OpLeq32U:
   304  		return rewriteValueS390X_OpLeq32U(v)
   305  	case OpLeq64:
   306  		return rewriteValueS390X_OpLeq64(v)
   307  	case OpLeq64F:
   308  		return rewriteValueS390X_OpLeq64F(v)
   309  	case OpLeq64U:
   310  		return rewriteValueS390X_OpLeq64U(v)
   311  	case OpLeq8:
   312  		return rewriteValueS390X_OpLeq8(v)
   313  	case OpLeq8U:
   314  		return rewriteValueS390X_OpLeq8U(v)
   315  	case OpLess16:
   316  		return rewriteValueS390X_OpLess16(v)
   317  	case OpLess16U:
   318  		return rewriteValueS390X_OpLess16U(v)
   319  	case OpLess32:
   320  		return rewriteValueS390X_OpLess32(v)
   321  	case OpLess32F:
   322  		return rewriteValueS390X_OpLess32F(v)
   323  	case OpLess32U:
   324  		return rewriteValueS390X_OpLess32U(v)
   325  	case OpLess64:
   326  		return rewriteValueS390X_OpLess64(v)
   327  	case OpLess64F:
   328  		return rewriteValueS390X_OpLess64F(v)
   329  	case OpLess64U:
   330  		return rewriteValueS390X_OpLess64U(v)
   331  	case OpLess8:
   332  		return rewriteValueS390X_OpLess8(v)
   333  	case OpLess8U:
   334  		return rewriteValueS390X_OpLess8U(v)
   335  	case OpLoad:
   336  		return rewriteValueS390X_OpLoad(v)
   337  	case OpLocalAddr:
   338  		return rewriteValueS390X_OpLocalAddr(v)
   339  	case OpLsh16x16:
   340  		return rewriteValueS390X_OpLsh16x16(v)
   341  	case OpLsh16x32:
   342  		return rewriteValueS390X_OpLsh16x32(v)
   343  	case OpLsh16x64:
   344  		return rewriteValueS390X_OpLsh16x64(v)
   345  	case OpLsh16x8:
   346  		return rewriteValueS390X_OpLsh16x8(v)
   347  	case OpLsh32x16:
   348  		return rewriteValueS390X_OpLsh32x16(v)
   349  	case OpLsh32x32:
   350  		return rewriteValueS390X_OpLsh32x32(v)
   351  	case OpLsh32x64:
   352  		return rewriteValueS390X_OpLsh32x64(v)
   353  	case OpLsh32x8:
   354  		return rewriteValueS390X_OpLsh32x8(v)
   355  	case OpLsh64x16:
   356  		return rewriteValueS390X_OpLsh64x16(v)
   357  	case OpLsh64x32:
   358  		return rewriteValueS390X_OpLsh64x32(v)
   359  	case OpLsh64x64:
   360  		return rewriteValueS390X_OpLsh64x64(v)
   361  	case OpLsh64x8:
   362  		return rewriteValueS390X_OpLsh64x8(v)
   363  	case OpLsh8x16:
   364  		return rewriteValueS390X_OpLsh8x16(v)
   365  	case OpLsh8x32:
   366  		return rewriteValueS390X_OpLsh8x32(v)
   367  	case OpLsh8x64:
   368  		return rewriteValueS390X_OpLsh8x64(v)
   369  	case OpLsh8x8:
   370  		return rewriteValueS390X_OpLsh8x8(v)
   371  	case OpMax32F:
   372  		v.Op = OpS390XWFMAXSB
   373  		return true
   374  	case OpMax64F:
   375  		v.Op = OpS390XWFMAXDB
   376  		return true
   377  	case OpMin32F:
   378  		v.Op = OpS390XWFMINSB
   379  		return true
   380  	case OpMin64F:
   381  		v.Op = OpS390XWFMINDB
   382  		return true
   383  	case OpMod16:
   384  		return rewriteValueS390X_OpMod16(v)
   385  	case OpMod16u:
   386  		return rewriteValueS390X_OpMod16u(v)
   387  	case OpMod32:
   388  		return rewriteValueS390X_OpMod32(v)
   389  	case OpMod32u:
   390  		return rewriteValueS390X_OpMod32u(v)
   391  	case OpMod64:
   392  		return rewriteValueS390X_OpMod64(v)
   393  	case OpMod64u:
   394  		v.Op = OpS390XMODDU
   395  		return true
   396  	case OpMod8:
   397  		return rewriteValueS390X_OpMod8(v)
   398  	case OpMod8u:
   399  		return rewriteValueS390X_OpMod8u(v)
   400  	case OpMove:
   401  		return rewriteValueS390X_OpMove(v)
   402  	case OpMul16:
   403  		v.Op = OpS390XMULLW
   404  		return true
   405  	case OpMul32:
   406  		v.Op = OpS390XMULLW
   407  		return true
   408  	case OpMul32F:
   409  		v.Op = OpS390XFMULS
   410  		return true
   411  	case OpMul64:
   412  		v.Op = OpS390XMULLD
   413  		return true
   414  	case OpMul64F:
   415  		v.Op = OpS390XFMUL
   416  		return true
   417  	case OpMul64uhilo:
   418  		v.Op = OpS390XMLGR
   419  		return true
   420  	case OpMul8:
   421  		v.Op = OpS390XMULLW
   422  		return true
   423  	case OpNeg16:
   424  		v.Op = OpS390XNEGW
   425  		return true
   426  	case OpNeg32:
   427  		v.Op = OpS390XNEGW
   428  		return true
   429  	case OpNeg32F:
   430  		v.Op = OpS390XFNEGS
   431  		return true
   432  	case OpNeg64:
   433  		v.Op = OpS390XNEG
   434  		return true
   435  	case OpNeg64F:
   436  		v.Op = OpS390XFNEG
   437  		return true
   438  	case OpNeg8:
   439  		v.Op = OpS390XNEGW
   440  		return true
   441  	case OpNeq16:
   442  		return rewriteValueS390X_OpNeq16(v)
   443  	case OpNeq32:
   444  		return rewriteValueS390X_OpNeq32(v)
   445  	case OpNeq32F:
   446  		return rewriteValueS390X_OpNeq32F(v)
   447  	case OpNeq64:
   448  		return rewriteValueS390X_OpNeq64(v)
   449  	case OpNeq64F:
   450  		return rewriteValueS390X_OpNeq64F(v)
   451  	case OpNeq8:
   452  		return rewriteValueS390X_OpNeq8(v)
   453  	case OpNeqB:
   454  		return rewriteValueS390X_OpNeqB(v)
   455  	case OpNeqPtr:
   456  		return rewriteValueS390X_OpNeqPtr(v)
   457  	case OpNilCheck:
   458  		v.Op = OpS390XLoweredNilCheck
   459  		return true
   460  	case OpNot:
   461  		return rewriteValueS390X_OpNot(v)
   462  	case OpOffPtr:
   463  		return rewriteValueS390X_OpOffPtr(v)
   464  	case OpOr16:
   465  		v.Op = OpS390XORW
   466  		return true
   467  	case OpOr32:
   468  		v.Op = OpS390XORW
   469  		return true
   470  	case OpOr64:
   471  		v.Op = OpS390XOR
   472  		return true
   473  	case OpOr8:
   474  		v.Op = OpS390XORW
   475  		return true
   476  	case OpOrB:
   477  		v.Op = OpS390XORW
   478  		return true
   479  	case OpPanicBounds:
   480  		v.Op = OpS390XLoweredPanicBoundsRR
   481  		return true
   482  	case OpPopCount16:
   483  		return rewriteValueS390X_OpPopCount16(v)
   484  	case OpPopCount32:
   485  		return rewriteValueS390X_OpPopCount32(v)
   486  	case OpPopCount64:
   487  		return rewriteValueS390X_OpPopCount64(v)
   488  	case OpPopCount8:
   489  		return rewriteValueS390X_OpPopCount8(v)
   490  	case OpRotateLeft16:
   491  		return rewriteValueS390X_OpRotateLeft16(v)
   492  	case OpRotateLeft32:
   493  		v.Op = OpS390XRLL
   494  		return true
   495  	case OpRotateLeft64:
   496  		v.Op = OpS390XRLLG
   497  		return true
   498  	case OpRotateLeft8:
   499  		return rewriteValueS390X_OpRotateLeft8(v)
   500  	case OpRound:
   501  		return rewriteValueS390X_OpRound(v)
   502  	case OpRound32F:
   503  		v.Op = OpS390XLoweredRound32F
   504  		return true
   505  	case OpRound64F:
   506  		v.Op = OpS390XLoweredRound64F
   507  		return true
   508  	case OpRoundToEven:
   509  		return rewriteValueS390X_OpRoundToEven(v)
   510  	case OpRsh16Ux16:
   511  		return rewriteValueS390X_OpRsh16Ux16(v)
   512  	case OpRsh16Ux32:
   513  		return rewriteValueS390X_OpRsh16Ux32(v)
   514  	case OpRsh16Ux64:
   515  		return rewriteValueS390X_OpRsh16Ux64(v)
   516  	case OpRsh16Ux8:
   517  		return rewriteValueS390X_OpRsh16Ux8(v)
   518  	case OpRsh16x16:
   519  		return rewriteValueS390X_OpRsh16x16(v)
   520  	case OpRsh16x32:
   521  		return rewriteValueS390X_OpRsh16x32(v)
   522  	case OpRsh16x64:
   523  		return rewriteValueS390X_OpRsh16x64(v)
   524  	case OpRsh16x8:
   525  		return rewriteValueS390X_OpRsh16x8(v)
   526  	case OpRsh32Ux16:
   527  		return rewriteValueS390X_OpRsh32Ux16(v)
   528  	case OpRsh32Ux32:
   529  		return rewriteValueS390X_OpRsh32Ux32(v)
   530  	case OpRsh32Ux64:
   531  		return rewriteValueS390X_OpRsh32Ux64(v)
   532  	case OpRsh32Ux8:
   533  		return rewriteValueS390X_OpRsh32Ux8(v)
   534  	case OpRsh32x16:
   535  		return rewriteValueS390X_OpRsh32x16(v)
   536  	case OpRsh32x32:
   537  		return rewriteValueS390X_OpRsh32x32(v)
   538  	case OpRsh32x64:
   539  		return rewriteValueS390X_OpRsh32x64(v)
   540  	case OpRsh32x8:
   541  		return rewriteValueS390X_OpRsh32x8(v)
   542  	case OpRsh64Ux16:
   543  		return rewriteValueS390X_OpRsh64Ux16(v)
   544  	case OpRsh64Ux32:
   545  		return rewriteValueS390X_OpRsh64Ux32(v)
   546  	case OpRsh64Ux64:
   547  		return rewriteValueS390X_OpRsh64Ux64(v)
   548  	case OpRsh64Ux8:
   549  		return rewriteValueS390X_OpRsh64Ux8(v)
   550  	case OpRsh64x16:
   551  		return rewriteValueS390X_OpRsh64x16(v)
   552  	case OpRsh64x32:
   553  		return rewriteValueS390X_OpRsh64x32(v)
   554  	case OpRsh64x64:
   555  		return rewriteValueS390X_OpRsh64x64(v)
   556  	case OpRsh64x8:
   557  		return rewriteValueS390X_OpRsh64x8(v)
   558  	case OpRsh8Ux16:
   559  		return rewriteValueS390X_OpRsh8Ux16(v)
   560  	case OpRsh8Ux32:
   561  		return rewriteValueS390X_OpRsh8Ux32(v)
   562  	case OpRsh8Ux64:
   563  		return rewriteValueS390X_OpRsh8Ux64(v)
   564  	case OpRsh8Ux8:
   565  		return rewriteValueS390X_OpRsh8Ux8(v)
   566  	case OpRsh8x16:
   567  		return rewriteValueS390X_OpRsh8x16(v)
   568  	case OpRsh8x32:
   569  		return rewriteValueS390X_OpRsh8x32(v)
   570  	case OpRsh8x64:
   571  		return rewriteValueS390X_OpRsh8x64(v)
   572  	case OpRsh8x8:
   573  		return rewriteValueS390X_OpRsh8x8(v)
   574  	case OpS390XADD:
   575  		return rewriteValueS390X_OpS390XADD(v)
   576  	case OpS390XADDC:
   577  		return rewriteValueS390X_OpS390XADDC(v)
   578  	case OpS390XADDE:
   579  		return rewriteValueS390X_OpS390XADDE(v)
   580  	case OpS390XADDW:
   581  		return rewriteValueS390X_OpS390XADDW(v)
   582  	case OpS390XADDWconst:
   583  		return rewriteValueS390X_OpS390XADDWconst(v)
   584  	case OpS390XADDWload:
   585  		return rewriteValueS390X_OpS390XADDWload(v)
   586  	case OpS390XADDconst:
   587  		return rewriteValueS390X_OpS390XADDconst(v)
   588  	case OpS390XADDload:
   589  		return rewriteValueS390X_OpS390XADDload(v)
   590  	case OpS390XAND:
   591  		return rewriteValueS390X_OpS390XAND(v)
   592  	case OpS390XANDW:
   593  		return rewriteValueS390X_OpS390XANDW(v)
   594  	case OpS390XANDWconst:
   595  		return rewriteValueS390X_OpS390XANDWconst(v)
   596  	case OpS390XANDWload:
   597  		return rewriteValueS390X_OpS390XANDWload(v)
   598  	case OpS390XANDconst:
   599  		return rewriteValueS390X_OpS390XANDconst(v)
   600  	case OpS390XANDload:
   601  		return rewriteValueS390X_OpS390XANDload(v)
   602  	case OpS390XCMP:
   603  		return rewriteValueS390X_OpS390XCMP(v)
   604  	case OpS390XCMPU:
   605  		return rewriteValueS390X_OpS390XCMPU(v)
   606  	case OpS390XCMPUconst:
   607  		return rewriteValueS390X_OpS390XCMPUconst(v)
   608  	case OpS390XCMPW:
   609  		return rewriteValueS390X_OpS390XCMPW(v)
   610  	case OpS390XCMPWU:
   611  		return rewriteValueS390X_OpS390XCMPWU(v)
   612  	case OpS390XCMPWUconst:
   613  		return rewriteValueS390X_OpS390XCMPWUconst(v)
   614  	case OpS390XCMPWconst:
   615  		return rewriteValueS390X_OpS390XCMPWconst(v)
   616  	case OpS390XCMPconst:
   617  		return rewriteValueS390X_OpS390XCMPconst(v)
   618  	case OpS390XCPSDR:
   619  		return rewriteValueS390X_OpS390XCPSDR(v)
   620  	case OpS390XFCMP:
   621  		return rewriteValueS390X_OpS390XFCMP(v)
   622  	case OpS390XFCMPS:
   623  		return rewriteValueS390X_OpS390XFCMPS(v)
   624  	case OpS390XFMOVDload:
   625  		return rewriteValueS390X_OpS390XFMOVDload(v)
   626  	case OpS390XFMOVDstore:
   627  		return rewriteValueS390X_OpS390XFMOVDstore(v)
   628  	case OpS390XFMOVSload:
   629  		return rewriteValueS390X_OpS390XFMOVSload(v)
   630  	case OpS390XFMOVSstore:
   631  		return rewriteValueS390X_OpS390XFMOVSstore(v)
   632  	case OpS390XFNEG:
   633  		return rewriteValueS390X_OpS390XFNEG(v)
   634  	case OpS390XFNEGS:
   635  		return rewriteValueS390X_OpS390XFNEGS(v)
   636  	case OpS390XLDGR:
   637  		return rewriteValueS390X_OpS390XLDGR(v)
   638  	case OpS390XLEDBR:
   639  		return rewriteValueS390X_OpS390XLEDBR(v)
   640  	case OpS390XLGDR:
   641  		return rewriteValueS390X_OpS390XLGDR(v)
   642  	case OpS390XLOCGR:
   643  		return rewriteValueS390X_OpS390XLOCGR(v)
   644  	case OpS390XLTDBR:
   645  		return rewriteValueS390X_OpS390XLTDBR(v)
   646  	case OpS390XLTEBR:
   647  		return rewriteValueS390X_OpS390XLTEBR(v)
   648  	case OpS390XLoweredPanicBoundsCR:
   649  		return rewriteValueS390X_OpS390XLoweredPanicBoundsCR(v)
   650  	case OpS390XLoweredPanicBoundsRC:
   651  		return rewriteValueS390X_OpS390XLoweredPanicBoundsRC(v)
   652  	case OpS390XLoweredPanicBoundsRR:
   653  		return rewriteValueS390X_OpS390XLoweredPanicBoundsRR(v)
   654  	case OpS390XLoweredRound32F:
   655  		return rewriteValueS390X_OpS390XLoweredRound32F(v)
   656  	case OpS390XLoweredRound64F:
   657  		return rewriteValueS390X_OpS390XLoweredRound64F(v)
   658  	case OpS390XMOVBZload:
   659  		return rewriteValueS390X_OpS390XMOVBZload(v)
   660  	case OpS390XMOVBZreg:
   661  		return rewriteValueS390X_OpS390XMOVBZreg(v)
   662  	case OpS390XMOVBload:
   663  		return rewriteValueS390X_OpS390XMOVBload(v)
   664  	case OpS390XMOVBreg:
   665  		return rewriteValueS390X_OpS390XMOVBreg(v)
   666  	case OpS390XMOVBstore:
   667  		return rewriteValueS390X_OpS390XMOVBstore(v)
   668  	case OpS390XMOVBstoreconst:
   669  		return rewriteValueS390X_OpS390XMOVBstoreconst(v)
   670  	case OpS390XMOVDBR:
   671  		return rewriteValueS390X_OpS390XMOVDBR(v)
   672  	case OpS390XMOVDaddridx:
   673  		return rewriteValueS390X_OpS390XMOVDaddridx(v)
   674  	case OpS390XMOVDload:
   675  		return rewriteValueS390X_OpS390XMOVDload(v)
   676  	case OpS390XMOVDstore:
   677  		return rewriteValueS390X_OpS390XMOVDstore(v)
   678  	case OpS390XMOVDstoreconst:
   679  		return rewriteValueS390X_OpS390XMOVDstoreconst(v)
   680  	case OpS390XMOVDstoreidx:
   681  		return rewriteValueS390X_OpS390XMOVDstoreidx(v)
   682  	case OpS390XMOVHZload:
   683  		return rewriteValueS390X_OpS390XMOVHZload(v)
   684  	case OpS390XMOVHZreg:
   685  		return rewriteValueS390X_OpS390XMOVHZreg(v)
   686  	case OpS390XMOVHload:
   687  		return rewriteValueS390X_OpS390XMOVHload(v)
   688  	case OpS390XMOVHreg:
   689  		return rewriteValueS390X_OpS390XMOVHreg(v)
   690  	case OpS390XMOVHstore:
   691  		return rewriteValueS390X_OpS390XMOVHstore(v)
   692  	case OpS390XMOVHstoreconst:
   693  		return rewriteValueS390X_OpS390XMOVHstoreconst(v)
   694  	case OpS390XMOVHstoreidx:
   695  		return rewriteValueS390X_OpS390XMOVHstoreidx(v)
   696  	case OpS390XMOVWBR:
   697  		return rewriteValueS390X_OpS390XMOVWBR(v)
   698  	case OpS390XMOVWZload:
   699  		return rewriteValueS390X_OpS390XMOVWZload(v)
   700  	case OpS390XMOVWZreg:
   701  		return rewriteValueS390X_OpS390XMOVWZreg(v)
   702  	case OpS390XMOVWload:
   703  		return rewriteValueS390X_OpS390XMOVWload(v)
   704  	case OpS390XMOVWreg:
   705  		return rewriteValueS390X_OpS390XMOVWreg(v)
   706  	case OpS390XMOVWstore:
   707  		return rewriteValueS390X_OpS390XMOVWstore(v)
   708  	case OpS390XMOVWstoreconst:
   709  		return rewriteValueS390X_OpS390XMOVWstoreconst(v)
   710  	case OpS390XMOVWstoreidx:
   711  		return rewriteValueS390X_OpS390XMOVWstoreidx(v)
   712  	case OpS390XMULLD:
   713  		return rewriteValueS390X_OpS390XMULLD(v)
   714  	case OpS390XMULLDconst:
   715  		return rewriteValueS390X_OpS390XMULLDconst(v)
   716  	case OpS390XMULLDload:
   717  		return rewriteValueS390X_OpS390XMULLDload(v)
   718  	case OpS390XMULLW:
   719  		return rewriteValueS390X_OpS390XMULLW(v)
   720  	case OpS390XMULLWconst:
   721  		return rewriteValueS390X_OpS390XMULLWconst(v)
   722  	case OpS390XMULLWload:
   723  		return rewriteValueS390X_OpS390XMULLWload(v)
   724  	case OpS390XNEG:
   725  		return rewriteValueS390X_OpS390XNEG(v)
   726  	case OpS390XNEGW:
   727  		return rewriteValueS390X_OpS390XNEGW(v)
   728  	case OpS390XNOT:
   729  		return rewriteValueS390X_OpS390XNOT(v)
   730  	case OpS390XNOTW:
   731  		return rewriteValueS390X_OpS390XNOTW(v)
   732  	case OpS390XOR:
   733  		return rewriteValueS390X_OpS390XOR(v)
   734  	case OpS390XORW:
   735  		return rewriteValueS390X_OpS390XORW(v)
   736  	case OpS390XORWconst:
   737  		return rewriteValueS390X_OpS390XORWconst(v)
   738  	case OpS390XORWload:
   739  		return rewriteValueS390X_OpS390XORWload(v)
   740  	case OpS390XORconst:
   741  		return rewriteValueS390X_OpS390XORconst(v)
   742  	case OpS390XORload:
   743  		return rewriteValueS390X_OpS390XORload(v)
   744  	case OpS390XRISBGZ:
   745  		return rewriteValueS390X_OpS390XRISBGZ(v)
   746  	case OpS390XRLL:
   747  		return rewriteValueS390X_OpS390XRLL(v)
   748  	case OpS390XRLLG:
   749  		return rewriteValueS390X_OpS390XRLLG(v)
   750  	case OpS390XSLD:
   751  		return rewriteValueS390X_OpS390XSLD(v)
   752  	case OpS390XSLDconst:
   753  		return rewriteValueS390X_OpS390XSLDconst(v)
   754  	case OpS390XSLW:
   755  		return rewriteValueS390X_OpS390XSLW(v)
   756  	case OpS390XSLWconst:
   757  		return rewriteValueS390X_OpS390XSLWconst(v)
   758  	case OpS390XSRAD:
   759  		return rewriteValueS390X_OpS390XSRAD(v)
   760  	case OpS390XSRADconst:
   761  		return rewriteValueS390X_OpS390XSRADconst(v)
   762  	case OpS390XSRAW:
   763  		return rewriteValueS390X_OpS390XSRAW(v)
   764  	case OpS390XSRAWconst:
   765  		return rewriteValueS390X_OpS390XSRAWconst(v)
   766  	case OpS390XSRD:
   767  		return rewriteValueS390X_OpS390XSRD(v)
   768  	case OpS390XSRDconst:
   769  		return rewriteValueS390X_OpS390XSRDconst(v)
   770  	case OpS390XSRW:
   771  		return rewriteValueS390X_OpS390XSRW(v)
   772  	case OpS390XSRWconst:
   773  		return rewriteValueS390X_OpS390XSRWconst(v)
   774  	case OpS390XSTM2:
   775  		return rewriteValueS390X_OpS390XSTM2(v)
   776  	case OpS390XSTMG2:
   777  		return rewriteValueS390X_OpS390XSTMG2(v)
   778  	case OpS390XSUB:
   779  		return rewriteValueS390X_OpS390XSUB(v)
   780  	case OpS390XSUBE:
   781  		return rewriteValueS390X_OpS390XSUBE(v)
   782  	case OpS390XSUBW:
   783  		return rewriteValueS390X_OpS390XSUBW(v)
   784  	case OpS390XSUBWconst:
   785  		return rewriteValueS390X_OpS390XSUBWconst(v)
   786  	case OpS390XSUBWload:
   787  		return rewriteValueS390X_OpS390XSUBWload(v)
   788  	case OpS390XSUBconst:
   789  		return rewriteValueS390X_OpS390XSUBconst(v)
   790  	case OpS390XSUBload:
   791  		return rewriteValueS390X_OpS390XSUBload(v)
   792  	case OpS390XSumBytes2:
   793  		return rewriteValueS390X_OpS390XSumBytes2(v)
   794  	case OpS390XSumBytes4:
   795  		return rewriteValueS390X_OpS390XSumBytes4(v)
   796  	case OpS390XSumBytes8:
   797  		return rewriteValueS390X_OpS390XSumBytes8(v)
   798  	case OpS390XXOR:
   799  		return rewriteValueS390X_OpS390XXOR(v)
   800  	case OpS390XXORW:
   801  		return rewriteValueS390X_OpS390XXORW(v)
   802  	case OpS390XXORWconst:
   803  		return rewriteValueS390X_OpS390XXORWconst(v)
   804  	case OpS390XXORWload:
   805  		return rewriteValueS390X_OpS390XXORWload(v)
   806  	case OpS390XXORconst:
   807  		return rewriteValueS390X_OpS390XXORconst(v)
   808  	case OpS390XXORload:
   809  		return rewriteValueS390X_OpS390XXORload(v)
   810  	case OpSelect0:
   811  		return rewriteValueS390X_OpSelect0(v)
   812  	case OpSelect1:
   813  		return rewriteValueS390X_OpSelect1(v)
   814  	case OpSignExt16to32:
   815  		v.Op = OpS390XMOVHreg
   816  		return true
   817  	case OpSignExt16to64:
   818  		v.Op = OpS390XMOVHreg
   819  		return true
   820  	case OpSignExt32to64:
   821  		v.Op = OpS390XMOVWreg
   822  		return true
   823  	case OpSignExt8to16:
   824  		v.Op = OpS390XMOVBreg
   825  		return true
   826  	case OpSignExt8to32:
   827  		v.Op = OpS390XMOVBreg
   828  		return true
   829  	case OpSignExt8to64:
   830  		v.Op = OpS390XMOVBreg
   831  		return true
   832  	case OpSlicemask:
   833  		return rewriteValueS390X_OpSlicemask(v)
   834  	case OpSqrt:
   835  		v.Op = OpS390XFSQRT
   836  		return true
   837  	case OpSqrt32:
   838  		v.Op = OpS390XFSQRTS
   839  		return true
   840  	case OpStaticCall:
   841  		v.Op = OpS390XCALLstatic
   842  		return true
   843  	case OpStore:
   844  		return rewriteValueS390X_OpStore(v)
   845  	case OpSub16:
   846  		v.Op = OpS390XSUBW
   847  		return true
   848  	case OpSub32:
   849  		v.Op = OpS390XSUBW
   850  		return true
   851  	case OpSub32F:
   852  		return rewriteValueS390X_OpSub32F(v)
   853  	case OpSub64:
   854  		v.Op = OpS390XSUB
   855  		return true
   856  	case OpSub64F:
   857  		return rewriteValueS390X_OpSub64F(v)
   858  	case OpSub8:
   859  		v.Op = OpS390XSUBW
   860  		return true
   861  	case OpSubPtr:
   862  		v.Op = OpS390XSUB
   863  		return true
   864  	case OpTailCall:
   865  		v.Op = OpS390XCALLtail
   866  		return true
   867  	case OpTailCallInter:
   868  		v.Op = OpS390XCALLtailinter
   869  		return true
   870  	case OpTrunc:
   871  		return rewriteValueS390X_OpTrunc(v)
   872  	case OpTrunc16to8:
   873  		v.Op = OpCopy
   874  		return true
   875  	case OpTrunc32to16:
   876  		v.Op = OpCopy
   877  		return true
   878  	case OpTrunc32to8:
   879  		v.Op = OpCopy
   880  		return true
   881  	case OpTrunc64to16:
   882  		v.Op = OpCopy
   883  		return true
   884  	case OpTrunc64to32:
   885  		v.Op = OpCopy
   886  		return true
   887  	case OpTrunc64to8:
   888  		v.Op = OpCopy
   889  		return true
   890  	case OpWB:
   891  		v.Op = OpS390XLoweredWB
   892  		return true
   893  	case OpXor16:
   894  		v.Op = OpS390XXORW
   895  		return true
   896  	case OpXor32:
   897  		v.Op = OpS390XXORW
   898  		return true
   899  	case OpXor64:
   900  		v.Op = OpS390XXOR
   901  		return true
   902  	case OpXor8:
   903  		v.Op = OpS390XXORW
   904  		return true
   905  	case OpZero:
   906  		return rewriteValueS390X_OpZero(v)
   907  	case OpZeroExt16to32:
   908  		v.Op = OpS390XMOVHZreg
   909  		return true
   910  	case OpZeroExt16to64:
   911  		v.Op = OpS390XMOVHZreg
   912  		return true
   913  	case OpZeroExt32to64:
   914  		v.Op = OpS390XMOVWZreg
   915  		return true
   916  	case OpZeroExt8to16:
   917  		v.Op = OpS390XMOVBZreg
   918  		return true
   919  	case OpZeroExt8to32:
   920  		v.Op = OpS390XMOVBZreg
   921  		return true
   922  	case OpZeroExt8to64:
   923  		v.Op = OpS390XMOVBZreg
   924  		return true
   925  	}
   926  	return false
   927  }
   928  func rewriteValueS390X_OpAdd32F(v *Value) bool {
   929  	v_1 := v.Args[1]
   930  	v_0 := v.Args[0]
   931  	b := v.Block
   932  	typ := &b.Func.Config.Types
   933  	// match: (Add32F x y)
   934  	// result: (Select0 (FADDS x y))
   935  	for {
   936  		x := v_0
   937  		y := v_1
   938  		v.reset(OpSelect0)
   939  		v0 := b.NewValue0(v.Pos, OpS390XFADDS, types.NewTuple(typ.Float32, types.TypeFlags))
   940  		v0.AddArg2(x, y)
   941  		v.AddArg(v0)
   942  		return true
   943  	}
   944  }
   945  func rewriteValueS390X_OpAdd64F(v *Value) bool {
   946  	v_1 := v.Args[1]
   947  	v_0 := v.Args[0]
   948  	b := v.Block
   949  	typ := &b.Func.Config.Types
   950  	// match: (Add64F x y)
   951  	// result: (Select0 (FADD x y))
   952  	for {
   953  		x := v_0
   954  		y := v_1
   955  		v.reset(OpSelect0)
   956  		v0 := b.NewValue0(v.Pos, OpS390XFADD, types.NewTuple(typ.Float64, types.TypeFlags))
   957  		v0.AddArg2(x, y)
   958  		v.AddArg(v0)
   959  		return true
   960  	}
   961  }
   962  func rewriteValueS390X_OpAddr(v *Value) bool {
   963  	v_0 := v.Args[0]
   964  	// match: (Addr {sym} base)
   965  	// result: (MOVDaddr {sym} base)
   966  	for {
   967  		sym := auxToSym(v.Aux)
   968  		base := v_0
   969  		v.reset(OpS390XMOVDaddr)
   970  		v.Aux = symToAux(sym)
   971  		v.AddArg(base)
   972  		return true
   973  	}
   974  }
   975  func rewriteValueS390X_OpAtomicAdd32(v *Value) bool {
   976  	v_2 := v.Args[2]
   977  	v_1 := v.Args[1]
   978  	v_0 := v.Args[0]
   979  	b := v.Block
   980  	typ := &b.Func.Config.Types
   981  	// match: (AtomicAdd32 ptr val mem)
   982  	// result: (AddTupleFirst32 val (LAA ptr val mem))
   983  	for {
   984  		ptr := v_0
   985  		val := v_1
   986  		mem := v_2
   987  		v.reset(OpS390XAddTupleFirst32)
   988  		v0 := b.NewValue0(v.Pos, OpS390XLAA, types.NewTuple(typ.UInt32, types.TypeMem))
   989  		v0.AddArg3(ptr, val, mem)
   990  		v.AddArg2(val, v0)
   991  		return true
   992  	}
   993  }
   994  func rewriteValueS390X_OpAtomicAdd64(v *Value) bool {
   995  	v_2 := v.Args[2]
   996  	v_1 := v.Args[1]
   997  	v_0 := v.Args[0]
   998  	b := v.Block
   999  	typ := &b.Func.Config.Types
  1000  	// match: (AtomicAdd64 ptr val mem)
  1001  	// result: (AddTupleFirst64 val (LAAG ptr val mem))
  1002  	for {
  1003  		ptr := v_0
  1004  		val := v_1
  1005  		mem := v_2
  1006  		v.reset(OpS390XAddTupleFirst64)
  1007  		v0 := b.NewValue0(v.Pos, OpS390XLAAG, types.NewTuple(typ.UInt64, types.TypeMem))
  1008  		v0.AddArg3(ptr, val, mem)
  1009  		v.AddArg2(val, v0)
  1010  		return true
  1011  	}
  1012  }
  1013  func rewriteValueS390X_OpAtomicAnd8(v *Value) bool {
  1014  	v_2 := v.Args[2]
  1015  	v_1 := v.Args[1]
  1016  	v_0 := v.Args[0]
  1017  	b := v.Block
  1018  	typ := &b.Func.Config.Types
  1019  	// match: (AtomicAnd8 ptr val mem)
  1020  	// 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)
  1021  	for {
  1022  		ptr := v_0
  1023  		val := v_1
  1024  		mem := v_2
  1025  		v.reset(OpS390XLANfloor)
  1026  		v0 := b.NewValue0(v.Pos, OpS390XRLL, typ.UInt32)
  1027  		v1 := b.NewValue0(v.Pos, OpS390XORWconst, typ.UInt32)
  1028  		v1.AuxInt = int32ToAuxInt(-1 << 8)
  1029  		v1.AddArg(val)
  1030  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
  1031  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1032  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1033  		v3.AuxInt = int64ToAuxInt(3 << 3)
  1034  		v2.AddArg2(v3, ptr)
  1035  		v0.AddArg2(v1, v2)
  1036  		v.AddArg3(ptr, v0, mem)
  1037  		return true
  1038  	}
  1039  }
  1040  func rewriteValueS390X_OpAtomicCompareAndSwap32(v *Value) bool {
  1041  	v_3 := v.Args[3]
  1042  	v_2 := v.Args[2]
  1043  	v_1 := v.Args[1]
  1044  	v_0 := v.Args[0]
  1045  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
  1046  	// result: (LoweredAtomicCas32 ptr old new_ mem)
  1047  	for {
  1048  		ptr := v_0
  1049  		old := v_1
  1050  		new_ := v_2
  1051  		mem := v_3
  1052  		v.reset(OpS390XLoweredAtomicCas32)
  1053  		v.AddArg4(ptr, old, new_, mem)
  1054  		return true
  1055  	}
  1056  }
  1057  func rewriteValueS390X_OpAtomicCompareAndSwap64(v *Value) bool {
  1058  	v_3 := v.Args[3]
  1059  	v_2 := v.Args[2]
  1060  	v_1 := v.Args[1]
  1061  	v_0 := v.Args[0]
  1062  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
  1063  	// result: (LoweredAtomicCas64 ptr old new_ mem)
  1064  	for {
  1065  		ptr := v_0
  1066  		old := v_1
  1067  		new_ := v_2
  1068  		mem := v_3
  1069  		v.reset(OpS390XLoweredAtomicCas64)
  1070  		v.AddArg4(ptr, old, new_, mem)
  1071  		return true
  1072  	}
  1073  }
  1074  func rewriteValueS390X_OpAtomicExchange32(v *Value) bool {
  1075  	v_2 := v.Args[2]
  1076  	v_1 := v.Args[1]
  1077  	v_0 := v.Args[0]
  1078  	// match: (AtomicExchange32 ptr val mem)
  1079  	// result: (LoweredAtomicExchange32 ptr val mem)
  1080  	for {
  1081  		ptr := v_0
  1082  		val := v_1
  1083  		mem := v_2
  1084  		v.reset(OpS390XLoweredAtomicExchange32)
  1085  		v.AddArg3(ptr, val, mem)
  1086  		return true
  1087  	}
  1088  }
  1089  func rewriteValueS390X_OpAtomicExchange64(v *Value) bool {
  1090  	v_2 := v.Args[2]
  1091  	v_1 := v.Args[1]
  1092  	v_0 := v.Args[0]
  1093  	// match: (AtomicExchange64 ptr val mem)
  1094  	// result: (LoweredAtomicExchange64 ptr val mem)
  1095  	for {
  1096  		ptr := v_0
  1097  		val := v_1
  1098  		mem := v_2
  1099  		v.reset(OpS390XLoweredAtomicExchange64)
  1100  		v.AddArg3(ptr, val, mem)
  1101  		return true
  1102  	}
  1103  }
  1104  func rewriteValueS390X_OpAtomicLoad32(v *Value) bool {
  1105  	v_1 := v.Args[1]
  1106  	v_0 := v.Args[0]
  1107  	// match: (AtomicLoad32 ptr mem)
  1108  	// result: (MOVWZatomicload ptr mem)
  1109  	for {
  1110  		ptr := v_0
  1111  		mem := v_1
  1112  		v.reset(OpS390XMOVWZatomicload)
  1113  		v.AddArg2(ptr, mem)
  1114  		return true
  1115  	}
  1116  }
  1117  func rewriteValueS390X_OpAtomicLoad64(v *Value) bool {
  1118  	v_1 := v.Args[1]
  1119  	v_0 := v.Args[0]
  1120  	// match: (AtomicLoad64 ptr mem)
  1121  	// result: (MOVDatomicload ptr mem)
  1122  	for {
  1123  		ptr := v_0
  1124  		mem := v_1
  1125  		v.reset(OpS390XMOVDatomicload)
  1126  		v.AddArg2(ptr, mem)
  1127  		return true
  1128  	}
  1129  }
  1130  func rewriteValueS390X_OpAtomicLoad8(v *Value) bool {
  1131  	v_1 := v.Args[1]
  1132  	v_0 := v.Args[0]
  1133  	// match: (AtomicLoad8 ptr mem)
  1134  	// result: (MOVBZatomicload ptr mem)
  1135  	for {
  1136  		ptr := v_0
  1137  		mem := v_1
  1138  		v.reset(OpS390XMOVBZatomicload)
  1139  		v.AddArg2(ptr, mem)
  1140  		return true
  1141  	}
  1142  }
  1143  func rewriteValueS390X_OpAtomicLoadAcq32(v *Value) bool {
  1144  	v_1 := v.Args[1]
  1145  	v_0 := v.Args[0]
  1146  	// match: (AtomicLoadAcq32 ptr mem)
  1147  	// result: (MOVWZatomicload ptr mem)
  1148  	for {
  1149  		ptr := v_0
  1150  		mem := v_1
  1151  		v.reset(OpS390XMOVWZatomicload)
  1152  		v.AddArg2(ptr, mem)
  1153  		return true
  1154  	}
  1155  }
  1156  func rewriteValueS390X_OpAtomicLoadPtr(v *Value) bool {
  1157  	v_1 := v.Args[1]
  1158  	v_0 := v.Args[0]
  1159  	// match: (AtomicLoadPtr ptr mem)
  1160  	// result: (MOVDatomicload ptr mem)
  1161  	for {
  1162  		ptr := v_0
  1163  		mem := v_1
  1164  		v.reset(OpS390XMOVDatomicload)
  1165  		v.AddArg2(ptr, mem)
  1166  		return true
  1167  	}
  1168  }
  1169  func rewriteValueS390X_OpAtomicOr8(v *Value) bool {
  1170  	v_2 := v.Args[2]
  1171  	v_1 := v.Args[1]
  1172  	v_0 := v.Args[0]
  1173  	b := v.Block
  1174  	typ := &b.Func.Config.Types
  1175  	// match: (AtomicOr8 ptr val mem)
  1176  	// result: (LAOfloor ptr (SLW <typ.UInt32> (MOVBZreg <typ.UInt32> val) (RXSBG <typ.UInt32> {s390x.NewRotateParams(59, 60, 3)} (MOVDconst [3<<3]) ptr)) mem)
  1177  	for {
  1178  		ptr := v_0
  1179  		val := v_1
  1180  		mem := v_2
  1181  		v.reset(OpS390XLAOfloor)
  1182  		v0 := b.NewValue0(v.Pos, OpS390XSLW, typ.UInt32)
  1183  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt32)
  1184  		v1.AddArg(val)
  1185  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
  1186  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1187  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1188  		v3.AuxInt = int64ToAuxInt(3 << 3)
  1189  		v2.AddArg2(v3, ptr)
  1190  		v0.AddArg2(v1, v2)
  1191  		v.AddArg3(ptr, v0, mem)
  1192  		return true
  1193  	}
  1194  }
  1195  func rewriteValueS390X_OpAtomicStore32(v *Value) bool {
  1196  	v_2 := v.Args[2]
  1197  	v_1 := v.Args[1]
  1198  	v_0 := v.Args[0]
  1199  	b := v.Block
  1200  	// match: (AtomicStore32 ptr val mem)
  1201  	// result: (SYNC (MOVWatomicstore ptr val mem))
  1202  	for {
  1203  		ptr := v_0
  1204  		val := v_1
  1205  		mem := v_2
  1206  		v.reset(OpS390XSYNC)
  1207  		v0 := b.NewValue0(v.Pos, OpS390XMOVWatomicstore, types.TypeMem)
  1208  		v0.AddArg3(ptr, val, mem)
  1209  		v.AddArg(v0)
  1210  		return true
  1211  	}
  1212  }
  1213  func rewriteValueS390X_OpAtomicStore64(v *Value) bool {
  1214  	v_2 := v.Args[2]
  1215  	v_1 := v.Args[1]
  1216  	v_0 := v.Args[0]
  1217  	b := v.Block
  1218  	// match: (AtomicStore64 ptr val mem)
  1219  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1220  	for {
  1221  		ptr := v_0
  1222  		val := v_1
  1223  		mem := v_2
  1224  		v.reset(OpS390XSYNC)
  1225  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1226  		v0.AddArg3(ptr, val, mem)
  1227  		v.AddArg(v0)
  1228  		return true
  1229  	}
  1230  }
  1231  func rewriteValueS390X_OpAtomicStore8(v *Value) bool {
  1232  	v_2 := v.Args[2]
  1233  	v_1 := v.Args[1]
  1234  	v_0 := v.Args[0]
  1235  	b := v.Block
  1236  	// match: (AtomicStore8 ptr val mem)
  1237  	// result: (SYNC (MOVBatomicstore ptr val mem))
  1238  	for {
  1239  		ptr := v_0
  1240  		val := v_1
  1241  		mem := v_2
  1242  		v.reset(OpS390XSYNC)
  1243  		v0 := b.NewValue0(v.Pos, OpS390XMOVBatomicstore, types.TypeMem)
  1244  		v0.AddArg3(ptr, val, mem)
  1245  		v.AddArg(v0)
  1246  		return true
  1247  	}
  1248  }
  1249  func rewriteValueS390X_OpAtomicStorePtrNoWB(v *Value) bool {
  1250  	v_2 := v.Args[2]
  1251  	v_1 := v.Args[1]
  1252  	v_0 := v.Args[0]
  1253  	b := v.Block
  1254  	// match: (AtomicStorePtrNoWB ptr val mem)
  1255  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1256  	for {
  1257  		ptr := v_0
  1258  		val := v_1
  1259  		mem := v_2
  1260  		v.reset(OpS390XSYNC)
  1261  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1262  		v0.AddArg3(ptr, val, mem)
  1263  		v.AddArg(v0)
  1264  		return true
  1265  	}
  1266  }
  1267  func rewriteValueS390X_OpAtomicStoreRel32(v *Value) bool {
  1268  	v_2 := v.Args[2]
  1269  	v_1 := v.Args[1]
  1270  	v_0 := v.Args[0]
  1271  	// match: (AtomicStoreRel32 ptr val mem)
  1272  	// result: (MOVWatomicstore ptr val mem)
  1273  	for {
  1274  		ptr := v_0
  1275  		val := v_1
  1276  		mem := v_2
  1277  		v.reset(OpS390XMOVWatomicstore)
  1278  		v.AddArg3(ptr, val, mem)
  1279  		return true
  1280  	}
  1281  }
  1282  func rewriteValueS390X_OpAvg64u(v *Value) bool {
  1283  	v_1 := v.Args[1]
  1284  	v_0 := v.Args[0]
  1285  	b := v.Block
  1286  	// match: (Avg64u <t> x y)
  1287  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1288  	for {
  1289  		t := v.Type
  1290  		x := v_0
  1291  		y := v_1
  1292  		v.reset(OpS390XADD)
  1293  		v0 := b.NewValue0(v.Pos, OpS390XSRDconst, t)
  1294  		v0.AuxInt = uint8ToAuxInt(1)
  1295  		v1 := b.NewValue0(v.Pos, OpS390XSUB, t)
  1296  		v1.AddArg2(x, y)
  1297  		v0.AddArg(v1)
  1298  		v.AddArg2(v0, y)
  1299  		return true
  1300  	}
  1301  }
  1302  func rewriteValueS390X_OpBitLen16(v *Value) bool {
  1303  	v_0 := v.Args[0]
  1304  	b := v.Block
  1305  	typ := &b.Func.Config.Types
  1306  	// match: (BitLen16 x)
  1307  	// result: (BitLen64 (ZeroExt16to64 x))
  1308  	for {
  1309  		x := v_0
  1310  		v.reset(OpBitLen64)
  1311  		v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
  1312  		v0.AddArg(x)
  1313  		v.AddArg(v0)
  1314  		return true
  1315  	}
  1316  }
  1317  func rewriteValueS390X_OpBitLen32(v *Value) bool {
  1318  	v_0 := v.Args[0]
  1319  	b := v.Block
  1320  	typ := &b.Func.Config.Types
  1321  	// match: (BitLen32 x)
  1322  	// result: (BitLen64 (ZeroExt32to64 x))
  1323  	for {
  1324  		x := v_0
  1325  		v.reset(OpBitLen64)
  1326  		v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
  1327  		v0.AddArg(x)
  1328  		v.AddArg(v0)
  1329  		return true
  1330  	}
  1331  }
  1332  func rewriteValueS390X_OpBitLen64(v *Value) bool {
  1333  	v_0 := v.Args[0]
  1334  	b := v.Block
  1335  	typ := &b.Func.Config.Types
  1336  	// match: (BitLen64 x)
  1337  	// result: (SUB (MOVDconst [64]) (FLOGR x))
  1338  	for {
  1339  		x := v_0
  1340  		v.reset(OpS390XSUB)
  1341  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1342  		v0.AuxInt = int64ToAuxInt(64)
  1343  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1344  		v1.AddArg(x)
  1345  		v.AddArg2(v0, v1)
  1346  		return true
  1347  	}
  1348  }
  1349  func rewriteValueS390X_OpBitLen8(v *Value) bool {
  1350  	v_0 := v.Args[0]
  1351  	b := v.Block
  1352  	typ := &b.Func.Config.Types
  1353  	// match: (BitLen8 x)
  1354  	// result: (BitLen64 (ZeroExt8to64 x))
  1355  	for {
  1356  		x := v_0
  1357  		v.reset(OpBitLen64)
  1358  		v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
  1359  		v0.AddArg(x)
  1360  		v.AddArg(v0)
  1361  		return true
  1362  	}
  1363  }
  1364  func rewriteValueS390X_OpBswap16(v *Value) bool {
  1365  	v_0 := v.Args[0]
  1366  	b := v.Block
  1367  	typ := &b.Func.Config.Types
  1368  	// match: (Bswap16 x:(MOVHZload [off] {sym} ptr mem))
  1369  	// result: @x.Block (MOVHZreg (MOVHBRload [off] {sym} ptr mem))
  1370  	for {
  1371  		x := v_0
  1372  		if x.Op != OpS390XMOVHZload {
  1373  			break
  1374  		}
  1375  		off := auxIntToInt32(x.AuxInt)
  1376  		sym := auxToSym(x.Aux)
  1377  		mem := x.Args[1]
  1378  		ptr := x.Args[0]
  1379  		b = x.Block
  1380  		v0 := b.NewValue0(x.Pos, OpS390XMOVHZreg, typ.UInt64)
  1381  		v.copyOf(v0)
  1382  		v1 := b.NewValue0(x.Pos, OpS390XMOVHBRload, typ.UInt16)
  1383  		v1.AuxInt = int32ToAuxInt(off)
  1384  		v1.Aux = symToAux(sym)
  1385  		v1.AddArg2(ptr, mem)
  1386  		v0.AddArg(v1)
  1387  		return true
  1388  	}
  1389  	// match: (Bswap16 x:(MOVHZloadidx [off] {sym} ptr idx mem))
  1390  	// result: @x.Block (MOVHZreg (MOVHBRloadidx [off] {sym} ptr idx mem))
  1391  	for {
  1392  		x := v_0
  1393  		if x.Op != OpS390XMOVHZloadidx {
  1394  			break
  1395  		}
  1396  		off := auxIntToInt32(x.AuxInt)
  1397  		sym := auxToSym(x.Aux)
  1398  		mem := x.Args[2]
  1399  		ptr := x.Args[0]
  1400  		idx := x.Args[1]
  1401  		b = x.Block
  1402  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1403  		v.copyOf(v0)
  1404  		v1 := b.NewValue0(v.Pos, OpS390XMOVHBRloadidx, typ.Int16)
  1405  		v1.AuxInt = int32ToAuxInt(off)
  1406  		v1.Aux = symToAux(sym)
  1407  		v1.AddArg3(ptr, idx, mem)
  1408  		v0.AddArg(v1)
  1409  		return true
  1410  	}
  1411  	return false
  1412  }
  1413  func rewriteValueS390X_OpCeil(v *Value) bool {
  1414  	v_0 := v.Args[0]
  1415  	// match: (Ceil x)
  1416  	// result: (FIDBR [6] x)
  1417  	for {
  1418  		x := v_0
  1419  		v.reset(OpS390XFIDBR)
  1420  		v.AuxInt = int8ToAuxInt(6)
  1421  		v.AddArg(x)
  1422  		return true
  1423  	}
  1424  }
  1425  func rewriteValueS390X_OpConst16(v *Value) bool {
  1426  	// match: (Const16 [val])
  1427  	// result: (MOVDconst [int64(val)])
  1428  	for {
  1429  		val := auxIntToInt16(v.AuxInt)
  1430  		v.reset(OpS390XMOVDconst)
  1431  		v.AuxInt = int64ToAuxInt(int64(val))
  1432  		return true
  1433  	}
  1434  }
  1435  func rewriteValueS390X_OpConst32(v *Value) bool {
  1436  	// match: (Const32 [val])
  1437  	// result: (MOVDconst [int64(val)])
  1438  	for {
  1439  		val := auxIntToInt32(v.AuxInt)
  1440  		v.reset(OpS390XMOVDconst)
  1441  		v.AuxInt = int64ToAuxInt(int64(val))
  1442  		return true
  1443  	}
  1444  }
  1445  func rewriteValueS390X_OpConst64(v *Value) bool {
  1446  	// match: (Const64 [val])
  1447  	// result: (MOVDconst [int64(val)])
  1448  	for {
  1449  		val := auxIntToInt64(v.AuxInt)
  1450  		v.reset(OpS390XMOVDconst)
  1451  		v.AuxInt = int64ToAuxInt(int64(val))
  1452  		return true
  1453  	}
  1454  }
  1455  func rewriteValueS390X_OpConst8(v *Value) bool {
  1456  	// match: (Const8 [val])
  1457  	// result: (MOVDconst [int64(val)])
  1458  	for {
  1459  		val := auxIntToInt8(v.AuxInt)
  1460  		v.reset(OpS390XMOVDconst)
  1461  		v.AuxInt = int64ToAuxInt(int64(val))
  1462  		return true
  1463  	}
  1464  }
  1465  func rewriteValueS390X_OpConstBool(v *Value) bool {
  1466  	// match: (ConstBool [t])
  1467  	// result: (MOVDconst [b2i(t)])
  1468  	for {
  1469  		t := auxIntToBool(v.AuxInt)
  1470  		v.reset(OpS390XMOVDconst)
  1471  		v.AuxInt = int64ToAuxInt(b2i(t))
  1472  		return true
  1473  	}
  1474  }
  1475  func rewriteValueS390X_OpConstNil(v *Value) bool {
  1476  	// match: (ConstNil)
  1477  	// result: (MOVDconst [0])
  1478  	for {
  1479  		v.reset(OpS390XMOVDconst)
  1480  		v.AuxInt = int64ToAuxInt(0)
  1481  		return true
  1482  	}
  1483  }
  1484  func rewriteValueS390X_OpCtz16(v *Value) bool {
  1485  	v_0 := v.Args[0]
  1486  	b := v.Block
  1487  	typ := &b.Func.Config.Types
  1488  	// match: (Ctz16 x)
  1489  	// result: (Ctz64 (Or64 <typ.UInt64> x (MOVDconst [1<<16])))
  1490  	for {
  1491  		x := v_0
  1492  		v.reset(OpCtz64)
  1493  		v0 := b.NewValue0(v.Pos, OpOr64, typ.UInt64)
  1494  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1495  		v1.AuxInt = int64ToAuxInt(1 << 16)
  1496  		v0.AddArg2(x, v1)
  1497  		v.AddArg(v0)
  1498  		return true
  1499  	}
  1500  }
  1501  func rewriteValueS390X_OpCtz32(v *Value) bool {
  1502  	v_0 := v.Args[0]
  1503  	b := v.Block
  1504  	typ := &b.Func.Config.Types
  1505  	// match: (Ctz32 <t> x)
  1506  	// result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW <t> (SUBWconst <t> [1] x) (NOTW <t> x)))))
  1507  	for {
  1508  		t := v.Type
  1509  		x := v_0
  1510  		v.reset(OpS390XSUB)
  1511  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1512  		v0.AuxInt = int64ToAuxInt(64)
  1513  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1514  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1515  		v3 := b.NewValue0(v.Pos, OpS390XANDW, t)
  1516  		v4 := b.NewValue0(v.Pos, OpS390XSUBWconst, t)
  1517  		v4.AuxInt = int32ToAuxInt(1)
  1518  		v4.AddArg(x)
  1519  		v5 := b.NewValue0(v.Pos, OpS390XNOTW, t)
  1520  		v5.AddArg(x)
  1521  		v3.AddArg2(v4, v5)
  1522  		v2.AddArg(v3)
  1523  		v1.AddArg(v2)
  1524  		v.AddArg2(v0, v1)
  1525  		return true
  1526  	}
  1527  }
  1528  func rewriteValueS390X_OpCtz64(v *Value) bool {
  1529  	v_0 := v.Args[0]
  1530  	b := v.Block
  1531  	typ := &b.Func.Config.Types
  1532  	// match: (Ctz64 <t> x)
  1533  	// result: (SUB (MOVDconst [64]) (FLOGR (AND <t> (SUBconst <t> [1] x) (NOT <t> x))))
  1534  	for {
  1535  		t := v.Type
  1536  		x := v_0
  1537  		v.reset(OpS390XSUB)
  1538  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1539  		v0.AuxInt = int64ToAuxInt(64)
  1540  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1541  		v2 := b.NewValue0(v.Pos, OpS390XAND, t)
  1542  		v3 := b.NewValue0(v.Pos, OpS390XSUBconst, t)
  1543  		v3.AuxInt = int32ToAuxInt(1)
  1544  		v3.AddArg(x)
  1545  		v4 := b.NewValue0(v.Pos, OpS390XNOT, t)
  1546  		v4.AddArg(x)
  1547  		v2.AddArg2(v3, v4)
  1548  		v1.AddArg(v2)
  1549  		v.AddArg2(v0, v1)
  1550  		return true
  1551  	}
  1552  }
  1553  func rewriteValueS390X_OpCtz8(v *Value) bool {
  1554  	v_0 := v.Args[0]
  1555  	b := v.Block
  1556  	typ := &b.Func.Config.Types
  1557  	// match: (Ctz8 x)
  1558  	// result: (Ctz64 (Or64 <typ.UInt64> x (MOVDconst [1<<8])))
  1559  	for {
  1560  		x := v_0
  1561  		v.reset(OpCtz64)
  1562  		v0 := b.NewValue0(v.Pos, OpOr64, typ.UInt64)
  1563  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1564  		v1.AuxInt = int64ToAuxInt(1 << 8)
  1565  		v0.AddArg2(x, v1)
  1566  		v.AddArg(v0)
  1567  		return true
  1568  	}
  1569  }
  1570  func rewriteValueS390X_OpDiv16(v *Value) bool {
  1571  	v_1 := v.Args[1]
  1572  	v_0 := v.Args[0]
  1573  	b := v.Block
  1574  	typ := &b.Func.Config.Types
  1575  	// match: (Div16 x y)
  1576  	// result: (DIVW (MOVHreg x) (MOVHreg y))
  1577  	for {
  1578  		x := v_0
  1579  		y := v_1
  1580  		v.reset(OpS390XDIVW)
  1581  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1582  		v0.AddArg(x)
  1583  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1584  		v1.AddArg(y)
  1585  		v.AddArg2(v0, v1)
  1586  		return true
  1587  	}
  1588  }
  1589  func rewriteValueS390X_OpDiv16u(v *Value) bool {
  1590  	v_1 := v.Args[1]
  1591  	v_0 := v.Args[0]
  1592  	b := v.Block
  1593  	typ := &b.Func.Config.Types
  1594  	// match: (Div16u x y)
  1595  	// result: (DIVWU (MOVHZreg x) (MOVHZreg y))
  1596  	for {
  1597  		x := v_0
  1598  		y := v_1
  1599  		v.reset(OpS390XDIVWU)
  1600  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1601  		v0.AddArg(x)
  1602  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1603  		v1.AddArg(y)
  1604  		v.AddArg2(v0, v1)
  1605  		return true
  1606  	}
  1607  }
  1608  func rewriteValueS390X_OpDiv32(v *Value) bool {
  1609  	v_1 := v.Args[1]
  1610  	v_0 := v.Args[0]
  1611  	b := v.Block
  1612  	typ := &b.Func.Config.Types
  1613  	// match: (Div32 x y)
  1614  	// result: (DIVW (MOVWreg x) y)
  1615  	for {
  1616  		x := v_0
  1617  		y := v_1
  1618  		v.reset(OpS390XDIVW)
  1619  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1620  		v0.AddArg(x)
  1621  		v.AddArg2(v0, y)
  1622  		return true
  1623  	}
  1624  }
  1625  func rewriteValueS390X_OpDiv32u(v *Value) bool {
  1626  	v_1 := v.Args[1]
  1627  	v_0 := v.Args[0]
  1628  	b := v.Block
  1629  	typ := &b.Func.Config.Types
  1630  	// match: (Div32u x y)
  1631  	// result: (DIVWU (MOVWZreg x) y)
  1632  	for {
  1633  		x := v_0
  1634  		y := v_1
  1635  		v.reset(OpS390XDIVWU)
  1636  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1637  		v0.AddArg(x)
  1638  		v.AddArg2(v0, y)
  1639  		return true
  1640  	}
  1641  }
  1642  func rewriteValueS390X_OpDiv64(v *Value) bool {
  1643  	v_1 := v.Args[1]
  1644  	v_0 := v.Args[0]
  1645  	// match: (Div64 x y)
  1646  	// result: (DIVD x y)
  1647  	for {
  1648  		x := v_0
  1649  		y := v_1
  1650  		v.reset(OpS390XDIVD)
  1651  		v.AddArg2(x, y)
  1652  		return true
  1653  	}
  1654  }
  1655  func rewriteValueS390X_OpDiv8(v *Value) bool {
  1656  	v_1 := v.Args[1]
  1657  	v_0 := v.Args[0]
  1658  	b := v.Block
  1659  	typ := &b.Func.Config.Types
  1660  	// match: (Div8 x y)
  1661  	// result: (DIVW (MOVBreg x) (MOVBreg y))
  1662  	for {
  1663  		x := v_0
  1664  		y := v_1
  1665  		v.reset(OpS390XDIVW)
  1666  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1667  		v0.AddArg(x)
  1668  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1669  		v1.AddArg(y)
  1670  		v.AddArg2(v0, v1)
  1671  		return true
  1672  	}
  1673  }
  1674  func rewriteValueS390X_OpDiv8u(v *Value) bool {
  1675  	v_1 := v.Args[1]
  1676  	v_0 := v.Args[0]
  1677  	b := v.Block
  1678  	typ := &b.Func.Config.Types
  1679  	// match: (Div8u x y)
  1680  	// result: (DIVWU (MOVBZreg x) (MOVBZreg y))
  1681  	for {
  1682  		x := v_0
  1683  		y := v_1
  1684  		v.reset(OpS390XDIVWU)
  1685  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1686  		v0.AddArg(x)
  1687  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1688  		v1.AddArg(y)
  1689  		v.AddArg2(v0, v1)
  1690  		return true
  1691  	}
  1692  }
  1693  func rewriteValueS390X_OpEq16(v *Value) bool {
  1694  	v_1 := v.Args[1]
  1695  	v_0 := v.Args[0]
  1696  	b := v.Block
  1697  	typ := &b.Func.Config.Types
  1698  	// match: (Eq16 x y)
  1699  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1700  	for {
  1701  		x := v_0
  1702  		y := v_1
  1703  		v.reset(OpS390XLOCGR)
  1704  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1705  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1706  		v0.AuxInt = int64ToAuxInt(0)
  1707  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1708  		v1.AuxInt = int64ToAuxInt(1)
  1709  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1710  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1711  		v3.AddArg(x)
  1712  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1713  		v4.AddArg(y)
  1714  		v2.AddArg2(v3, v4)
  1715  		v.AddArg3(v0, v1, v2)
  1716  		return true
  1717  	}
  1718  }
  1719  func rewriteValueS390X_OpEq32(v *Value) bool {
  1720  	v_1 := v.Args[1]
  1721  	v_0 := v.Args[0]
  1722  	b := v.Block
  1723  	typ := &b.Func.Config.Types
  1724  	// match: (Eq32 x y)
  1725  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1726  	for {
  1727  		x := v_0
  1728  		y := v_1
  1729  		v.reset(OpS390XLOCGR)
  1730  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1731  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1732  		v0.AuxInt = int64ToAuxInt(0)
  1733  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1734  		v1.AuxInt = int64ToAuxInt(1)
  1735  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1736  		v2.AddArg2(x, y)
  1737  		v.AddArg3(v0, v1, v2)
  1738  		return true
  1739  	}
  1740  }
  1741  func rewriteValueS390X_OpEq32F(v *Value) bool {
  1742  	v_1 := v.Args[1]
  1743  	v_0 := v.Args[0]
  1744  	b := v.Block
  1745  	typ := &b.Func.Config.Types
  1746  	// match: (Eq32F x y)
  1747  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1748  	for {
  1749  		x := v_0
  1750  		y := v_1
  1751  		v.reset(OpS390XLOCGR)
  1752  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1753  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1754  		v0.AuxInt = int64ToAuxInt(0)
  1755  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1756  		v1.AuxInt = int64ToAuxInt(1)
  1757  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  1758  		v2.AddArg2(x, y)
  1759  		v.AddArg3(v0, v1, v2)
  1760  		return true
  1761  	}
  1762  }
  1763  func rewriteValueS390X_OpEq64(v *Value) bool {
  1764  	v_1 := v.Args[1]
  1765  	v_0 := v.Args[0]
  1766  	b := v.Block
  1767  	typ := &b.Func.Config.Types
  1768  	// match: (Eq64 x y)
  1769  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1770  	for {
  1771  		x := v_0
  1772  		y := v_1
  1773  		v.reset(OpS390XLOCGR)
  1774  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1775  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1776  		v0.AuxInt = int64ToAuxInt(0)
  1777  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1778  		v1.AuxInt = int64ToAuxInt(1)
  1779  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1780  		v2.AddArg2(x, y)
  1781  		v.AddArg3(v0, v1, v2)
  1782  		return true
  1783  	}
  1784  }
  1785  func rewriteValueS390X_OpEq64F(v *Value) bool {
  1786  	v_1 := v.Args[1]
  1787  	v_0 := v.Args[0]
  1788  	b := v.Block
  1789  	typ := &b.Func.Config.Types
  1790  	// match: (Eq64F x y)
  1791  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  1792  	for {
  1793  		x := v_0
  1794  		y := v_1
  1795  		v.reset(OpS390XLOCGR)
  1796  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1797  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1798  		v0.AuxInt = int64ToAuxInt(0)
  1799  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1800  		v1.AuxInt = int64ToAuxInt(1)
  1801  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  1802  		v2.AddArg2(x, y)
  1803  		v.AddArg3(v0, v1, v2)
  1804  		return true
  1805  	}
  1806  }
  1807  func rewriteValueS390X_OpEq8(v *Value) bool {
  1808  	v_1 := v.Args[1]
  1809  	v_0 := v.Args[0]
  1810  	b := v.Block
  1811  	typ := &b.Func.Config.Types
  1812  	// match: (Eq8 x y)
  1813  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1814  	for {
  1815  		x := v_0
  1816  		y := v_1
  1817  		v.reset(OpS390XLOCGR)
  1818  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1819  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1820  		v0.AuxInt = int64ToAuxInt(0)
  1821  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1822  		v1.AuxInt = int64ToAuxInt(1)
  1823  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1824  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1825  		v3.AddArg(x)
  1826  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1827  		v4.AddArg(y)
  1828  		v2.AddArg2(v3, v4)
  1829  		v.AddArg3(v0, v1, v2)
  1830  		return true
  1831  	}
  1832  }
  1833  func rewriteValueS390X_OpEqB(v *Value) bool {
  1834  	v_1 := v.Args[1]
  1835  	v_0 := v.Args[0]
  1836  	b := v.Block
  1837  	typ := &b.Func.Config.Types
  1838  	// match: (EqB x y)
  1839  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1840  	for {
  1841  		x := v_0
  1842  		y := v_1
  1843  		v.reset(OpS390XLOCGR)
  1844  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1845  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1846  		v0.AuxInt = int64ToAuxInt(0)
  1847  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1848  		v1.AuxInt = int64ToAuxInt(1)
  1849  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1850  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1851  		v3.AddArg(x)
  1852  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1853  		v4.AddArg(y)
  1854  		v2.AddArg2(v3, v4)
  1855  		v.AddArg3(v0, v1, v2)
  1856  		return true
  1857  	}
  1858  }
  1859  func rewriteValueS390X_OpEqPtr(v *Value) bool {
  1860  	v_1 := v.Args[1]
  1861  	v_0 := v.Args[0]
  1862  	b := v.Block
  1863  	typ := &b.Func.Config.Types
  1864  	// match: (EqPtr x y)
  1865  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1866  	for {
  1867  		x := v_0
  1868  		y := v_1
  1869  		v.reset(OpS390XLOCGR)
  1870  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1871  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1872  		v0.AuxInt = int64ToAuxInt(0)
  1873  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1874  		v1.AuxInt = int64ToAuxInt(1)
  1875  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1876  		v2.AddArg2(x, y)
  1877  		v.AddArg3(v0, v1, v2)
  1878  		return true
  1879  	}
  1880  }
  1881  func rewriteValueS390X_OpFMA(v *Value) bool {
  1882  	v_2 := v.Args[2]
  1883  	v_1 := v.Args[1]
  1884  	v_0 := v.Args[0]
  1885  	// match: (FMA x y z)
  1886  	// result: (FMADD z x y)
  1887  	for {
  1888  		x := v_0
  1889  		y := v_1
  1890  		z := v_2
  1891  		v.reset(OpS390XFMADD)
  1892  		v.AddArg3(z, x, y)
  1893  		return true
  1894  	}
  1895  }
  1896  func rewriteValueS390X_OpFloor(v *Value) bool {
  1897  	v_0 := v.Args[0]
  1898  	// match: (Floor x)
  1899  	// result: (FIDBR [7] x)
  1900  	for {
  1901  		x := v_0
  1902  		v.reset(OpS390XFIDBR)
  1903  		v.AuxInt = int8ToAuxInt(7)
  1904  		v.AddArg(x)
  1905  		return true
  1906  	}
  1907  }
  1908  func rewriteValueS390X_OpHmul32(v *Value) bool {
  1909  	v_1 := v.Args[1]
  1910  	v_0 := v.Args[0]
  1911  	b := v.Block
  1912  	typ := &b.Func.Config.Types
  1913  	// match: (Hmul32 x y)
  1914  	// result: (SRDconst [32] (MULLD (MOVWreg x) (MOVWreg y)))
  1915  	for {
  1916  		x := v_0
  1917  		y := v_1
  1918  		v.reset(OpS390XSRDconst)
  1919  		v.AuxInt = uint8ToAuxInt(32)
  1920  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1921  		v1 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1922  		v1.AddArg(x)
  1923  		v2 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1924  		v2.AddArg(y)
  1925  		v0.AddArg2(v1, v2)
  1926  		v.AddArg(v0)
  1927  		return true
  1928  	}
  1929  }
  1930  func rewriteValueS390X_OpHmul32u(v *Value) bool {
  1931  	v_1 := v.Args[1]
  1932  	v_0 := v.Args[0]
  1933  	b := v.Block
  1934  	typ := &b.Func.Config.Types
  1935  	// match: (Hmul32u x y)
  1936  	// result: (SRDconst [32] (MULLD (MOVWZreg x) (MOVWZreg y)))
  1937  	for {
  1938  		x := v_0
  1939  		y := v_1
  1940  		v.reset(OpS390XSRDconst)
  1941  		v.AuxInt = uint8ToAuxInt(32)
  1942  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1943  		v1 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1944  		v1.AddArg(x)
  1945  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1946  		v2.AddArg(y)
  1947  		v0.AddArg2(v1, v2)
  1948  		v.AddArg(v0)
  1949  		return true
  1950  	}
  1951  }
  1952  func rewriteValueS390X_OpITab(v *Value) bool {
  1953  	v_0 := v.Args[0]
  1954  	// match: (ITab (Load ptr mem))
  1955  	// result: (MOVDload ptr mem)
  1956  	for {
  1957  		if v_0.Op != OpLoad {
  1958  			break
  1959  		}
  1960  		mem := v_0.Args[1]
  1961  		ptr := v_0.Args[0]
  1962  		v.reset(OpS390XMOVDload)
  1963  		v.AddArg2(ptr, mem)
  1964  		return true
  1965  	}
  1966  	return false
  1967  }
  1968  func rewriteValueS390X_OpIsInBounds(v *Value) bool {
  1969  	v_1 := v.Args[1]
  1970  	v_0 := v.Args[0]
  1971  	b := v.Block
  1972  	typ := &b.Func.Config.Types
  1973  	// match: (IsInBounds idx len)
  1974  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1975  	for {
  1976  		idx := v_0
  1977  		len := v_1
  1978  		v.reset(OpS390XLOCGR)
  1979  		v.Aux = s390xCCMaskToAux(s390x.Less)
  1980  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1981  		v0.AuxInt = int64ToAuxInt(0)
  1982  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1983  		v1.AuxInt = int64ToAuxInt(1)
  1984  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  1985  		v2.AddArg2(idx, len)
  1986  		v.AddArg3(v0, v1, v2)
  1987  		return true
  1988  	}
  1989  }
  1990  func rewriteValueS390X_OpIsNonNil(v *Value) bool {
  1991  	v_0 := v.Args[0]
  1992  	b := v.Block
  1993  	typ := &b.Func.Config.Types
  1994  	// match: (IsNonNil p)
  1995  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPconst p [0]))
  1996  	for {
  1997  		p := v_0
  1998  		v.reset(OpS390XLOCGR)
  1999  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  2000  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2001  		v0.AuxInt = int64ToAuxInt(0)
  2002  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2003  		v1.AuxInt = int64ToAuxInt(1)
  2004  		v2 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  2005  		v2.AuxInt = int32ToAuxInt(0)
  2006  		v2.AddArg(p)
  2007  		v.AddArg3(v0, v1, v2)
  2008  		return true
  2009  	}
  2010  }
  2011  func rewriteValueS390X_OpIsSliceInBounds(v *Value) bool {
  2012  	v_1 := v.Args[1]
  2013  	v_0 := v.Args[0]
  2014  	b := v.Block
  2015  	typ := &b.Func.Config.Types
  2016  	// match: (IsSliceInBounds idx len)
  2017  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  2018  	for {
  2019  		idx := v_0
  2020  		len := v_1
  2021  		v.reset(OpS390XLOCGR)
  2022  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2023  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2024  		v0.AuxInt = int64ToAuxInt(0)
  2025  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2026  		v1.AuxInt = int64ToAuxInt(1)
  2027  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2028  		v2.AddArg2(idx, len)
  2029  		v.AddArg3(v0, v1, v2)
  2030  		return true
  2031  	}
  2032  }
  2033  func rewriteValueS390X_OpLeq16(v *Value) bool {
  2034  	v_1 := v.Args[1]
  2035  	v_0 := v.Args[0]
  2036  	b := v.Block
  2037  	typ := &b.Func.Config.Types
  2038  	// match: (Leq16 x y)
  2039  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2040  	for {
  2041  		x := v_0
  2042  		y := v_1
  2043  		v.reset(OpS390XLOCGR)
  2044  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2045  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2046  		v0.AuxInt = int64ToAuxInt(0)
  2047  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2048  		v1.AuxInt = int64ToAuxInt(1)
  2049  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2050  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2051  		v3.AddArg(x)
  2052  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2053  		v4.AddArg(y)
  2054  		v2.AddArg2(v3, v4)
  2055  		v.AddArg3(v0, v1, v2)
  2056  		return true
  2057  	}
  2058  }
  2059  func rewriteValueS390X_OpLeq16U(v *Value) bool {
  2060  	v_1 := v.Args[1]
  2061  	v_0 := v.Args[0]
  2062  	b := v.Block
  2063  	typ := &b.Func.Config.Types
  2064  	// match: (Leq16U x y)
  2065  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2066  	for {
  2067  		x := v_0
  2068  		y := v_1
  2069  		v.reset(OpS390XLOCGR)
  2070  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2071  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2072  		v0.AuxInt = int64ToAuxInt(0)
  2073  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2074  		v1.AuxInt = int64ToAuxInt(1)
  2075  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2076  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2077  		v3.AddArg(x)
  2078  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2079  		v4.AddArg(y)
  2080  		v2.AddArg2(v3, v4)
  2081  		v.AddArg3(v0, v1, v2)
  2082  		return true
  2083  	}
  2084  }
  2085  func rewriteValueS390X_OpLeq32(v *Value) bool {
  2086  	v_1 := v.Args[1]
  2087  	v_0 := v.Args[0]
  2088  	b := v.Block
  2089  	typ := &b.Func.Config.Types
  2090  	// match: (Leq32 x y)
  2091  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2092  	for {
  2093  		x := v_0
  2094  		y := v_1
  2095  		v.reset(OpS390XLOCGR)
  2096  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2097  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2098  		v0.AuxInt = int64ToAuxInt(0)
  2099  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2100  		v1.AuxInt = int64ToAuxInt(1)
  2101  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2102  		v2.AddArg2(x, y)
  2103  		v.AddArg3(v0, v1, v2)
  2104  		return true
  2105  	}
  2106  }
  2107  func rewriteValueS390X_OpLeq32F(v *Value) bool {
  2108  	v_1 := v.Args[1]
  2109  	v_0 := v.Args[0]
  2110  	b := v.Block
  2111  	typ := &b.Func.Config.Types
  2112  	// match: (Leq32F x y)
  2113  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2114  	for {
  2115  		x := v_0
  2116  		y := v_1
  2117  		v.reset(OpS390XLOCGR)
  2118  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2119  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2120  		v0.AuxInt = int64ToAuxInt(0)
  2121  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2122  		v1.AuxInt = int64ToAuxInt(1)
  2123  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  2124  		v2.AddArg2(x, y)
  2125  		v.AddArg3(v0, v1, v2)
  2126  		return true
  2127  	}
  2128  }
  2129  func rewriteValueS390X_OpLeq32U(v *Value) bool {
  2130  	v_1 := v.Args[1]
  2131  	v_0 := v.Args[0]
  2132  	b := v.Block
  2133  	typ := &b.Func.Config.Types
  2134  	// match: (Leq32U x y)
  2135  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2136  	for {
  2137  		x := v_0
  2138  		y := v_1
  2139  		v.reset(OpS390XLOCGR)
  2140  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2141  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2142  		v0.AuxInt = int64ToAuxInt(0)
  2143  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2144  		v1.AuxInt = int64ToAuxInt(1)
  2145  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2146  		v2.AddArg2(x, y)
  2147  		v.AddArg3(v0, v1, v2)
  2148  		return true
  2149  	}
  2150  }
  2151  func rewriteValueS390X_OpLeq64(v *Value) bool {
  2152  	v_1 := v.Args[1]
  2153  	v_0 := v.Args[0]
  2154  	b := v.Block
  2155  	typ := &b.Func.Config.Types
  2156  	// match: (Leq64 x y)
  2157  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2158  	for {
  2159  		x := v_0
  2160  		y := v_1
  2161  		v.reset(OpS390XLOCGR)
  2162  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2163  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2164  		v0.AuxInt = int64ToAuxInt(0)
  2165  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2166  		v1.AuxInt = int64ToAuxInt(1)
  2167  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  2168  		v2.AddArg2(x, y)
  2169  		v.AddArg3(v0, v1, v2)
  2170  		return true
  2171  	}
  2172  }
  2173  func rewriteValueS390X_OpLeq64F(v *Value) bool {
  2174  	v_1 := v.Args[1]
  2175  	v_0 := v.Args[0]
  2176  	b := v.Block
  2177  	typ := &b.Func.Config.Types
  2178  	// match: (Leq64F x y)
  2179  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2180  	for {
  2181  		x := v_0
  2182  		y := v_1
  2183  		v.reset(OpS390XLOCGR)
  2184  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2185  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2186  		v0.AuxInt = int64ToAuxInt(0)
  2187  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2188  		v1.AuxInt = int64ToAuxInt(1)
  2189  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2190  		v2.AddArg2(x, y)
  2191  		v.AddArg3(v0, v1, v2)
  2192  		return true
  2193  	}
  2194  }
  2195  func rewriteValueS390X_OpLeq64U(v *Value) bool {
  2196  	v_1 := v.Args[1]
  2197  	v_0 := v.Args[0]
  2198  	b := v.Block
  2199  	typ := &b.Func.Config.Types
  2200  	// match: (Leq64U x y)
  2201  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2202  	for {
  2203  		x := v_0
  2204  		y := v_1
  2205  		v.reset(OpS390XLOCGR)
  2206  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2207  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2208  		v0.AuxInt = int64ToAuxInt(0)
  2209  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2210  		v1.AuxInt = int64ToAuxInt(1)
  2211  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2212  		v2.AddArg2(x, y)
  2213  		v.AddArg3(v0, v1, v2)
  2214  		return true
  2215  	}
  2216  }
  2217  func rewriteValueS390X_OpLeq8(v *Value) bool {
  2218  	v_1 := v.Args[1]
  2219  	v_0 := v.Args[0]
  2220  	b := v.Block
  2221  	typ := &b.Func.Config.Types
  2222  	// match: (Leq8 x y)
  2223  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2224  	for {
  2225  		x := v_0
  2226  		y := v_1
  2227  		v.reset(OpS390XLOCGR)
  2228  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2229  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2230  		v0.AuxInt = int64ToAuxInt(0)
  2231  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2232  		v1.AuxInt = int64ToAuxInt(1)
  2233  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2234  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2235  		v3.AddArg(x)
  2236  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2237  		v4.AddArg(y)
  2238  		v2.AddArg2(v3, v4)
  2239  		v.AddArg3(v0, v1, v2)
  2240  		return true
  2241  	}
  2242  }
  2243  func rewriteValueS390X_OpLeq8U(v *Value) bool {
  2244  	v_1 := v.Args[1]
  2245  	v_0 := v.Args[0]
  2246  	b := v.Block
  2247  	typ := &b.Func.Config.Types
  2248  	// match: (Leq8U x y)
  2249  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2250  	for {
  2251  		x := v_0
  2252  		y := v_1
  2253  		v.reset(OpS390XLOCGR)
  2254  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2255  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2256  		v0.AuxInt = int64ToAuxInt(0)
  2257  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2258  		v1.AuxInt = int64ToAuxInt(1)
  2259  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2260  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2261  		v3.AddArg(x)
  2262  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2263  		v4.AddArg(y)
  2264  		v2.AddArg2(v3, v4)
  2265  		v.AddArg3(v0, v1, v2)
  2266  		return true
  2267  	}
  2268  }
  2269  func rewriteValueS390X_OpLess16(v *Value) bool {
  2270  	v_1 := v.Args[1]
  2271  	v_0 := v.Args[0]
  2272  	b := v.Block
  2273  	typ := &b.Func.Config.Types
  2274  	// match: (Less16 x y)
  2275  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2276  	for {
  2277  		x := v_0
  2278  		y := v_1
  2279  		v.reset(OpS390XLOCGR)
  2280  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2281  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2282  		v0.AuxInt = int64ToAuxInt(0)
  2283  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2284  		v1.AuxInt = int64ToAuxInt(1)
  2285  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2286  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2287  		v3.AddArg(x)
  2288  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2289  		v4.AddArg(y)
  2290  		v2.AddArg2(v3, v4)
  2291  		v.AddArg3(v0, v1, v2)
  2292  		return true
  2293  	}
  2294  }
  2295  func rewriteValueS390X_OpLess16U(v *Value) bool {
  2296  	v_1 := v.Args[1]
  2297  	v_0 := v.Args[0]
  2298  	b := v.Block
  2299  	typ := &b.Func.Config.Types
  2300  	// match: (Less16U x y)
  2301  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2302  	for {
  2303  		x := v_0
  2304  		y := v_1
  2305  		v.reset(OpS390XLOCGR)
  2306  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2307  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2308  		v0.AuxInt = int64ToAuxInt(0)
  2309  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2310  		v1.AuxInt = int64ToAuxInt(1)
  2311  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2312  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2313  		v3.AddArg(x)
  2314  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2315  		v4.AddArg(y)
  2316  		v2.AddArg2(v3, v4)
  2317  		v.AddArg3(v0, v1, v2)
  2318  		return true
  2319  	}
  2320  }
  2321  func rewriteValueS390X_OpLess32(v *Value) bool {
  2322  	v_1 := v.Args[1]
  2323  	v_0 := v.Args[0]
  2324  	b := v.Block
  2325  	typ := &b.Func.Config.Types
  2326  	// match: (Less32 x y)
  2327  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2328  	for {
  2329  		x := v_0
  2330  		y := v_1
  2331  		v.reset(OpS390XLOCGR)
  2332  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2333  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2334  		v0.AuxInt = int64ToAuxInt(0)
  2335  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2336  		v1.AuxInt = int64ToAuxInt(1)
  2337  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2338  		v2.AddArg2(x, y)
  2339  		v.AddArg3(v0, v1, v2)
  2340  		return true
  2341  	}
  2342  }
  2343  func rewriteValueS390X_OpLess32F(v *Value) bool {
  2344  	v_1 := v.Args[1]
  2345  	v_0 := v.Args[0]
  2346  	b := v.Block
  2347  	typ := &b.Func.Config.Types
  2348  	// match: (Less32F x y)
  2349  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2350  	for {
  2351  		x := v_0
  2352  		y := v_1
  2353  		v.reset(OpS390XLOCGR)
  2354  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2355  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2356  		v0.AuxInt = int64ToAuxInt(0)
  2357  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2358  		v1.AuxInt = int64ToAuxInt(1)
  2359  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  2360  		v2.AddArg2(x, y)
  2361  		v.AddArg3(v0, v1, v2)
  2362  		return true
  2363  	}
  2364  }
  2365  func rewriteValueS390X_OpLess32U(v *Value) bool {
  2366  	v_1 := v.Args[1]
  2367  	v_0 := v.Args[0]
  2368  	b := v.Block
  2369  	typ := &b.Func.Config.Types
  2370  	// match: (Less32U x y)
  2371  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2372  	for {
  2373  		x := v_0
  2374  		y := v_1
  2375  		v.reset(OpS390XLOCGR)
  2376  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2377  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2378  		v0.AuxInt = int64ToAuxInt(0)
  2379  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2380  		v1.AuxInt = int64ToAuxInt(1)
  2381  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2382  		v2.AddArg2(x, y)
  2383  		v.AddArg3(v0, v1, v2)
  2384  		return true
  2385  	}
  2386  }
  2387  func rewriteValueS390X_OpLess64(v *Value) bool {
  2388  	v_1 := v.Args[1]
  2389  	v_0 := v.Args[0]
  2390  	b := v.Block
  2391  	typ := &b.Func.Config.Types
  2392  	// match: (Less64 x y)
  2393  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2394  	for {
  2395  		x := v_0
  2396  		y := v_1
  2397  		v.reset(OpS390XLOCGR)
  2398  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2399  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2400  		v0.AuxInt = int64ToAuxInt(0)
  2401  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2402  		v1.AuxInt = int64ToAuxInt(1)
  2403  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  2404  		v2.AddArg2(x, y)
  2405  		v.AddArg3(v0, v1, v2)
  2406  		return true
  2407  	}
  2408  }
  2409  func rewriteValueS390X_OpLess64F(v *Value) bool {
  2410  	v_1 := v.Args[1]
  2411  	v_0 := v.Args[0]
  2412  	b := v.Block
  2413  	typ := &b.Func.Config.Types
  2414  	// match: (Less64F x y)
  2415  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2416  	for {
  2417  		x := v_0
  2418  		y := v_1
  2419  		v.reset(OpS390XLOCGR)
  2420  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2421  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2422  		v0.AuxInt = int64ToAuxInt(0)
  2423  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2424  		v1.AuxInt = int64ToAuxInt(1)
  2425  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2426  		v2.AddArg2(x, y)
  2427  		v.AddArg3(v0, v1, v2)
  2428  		return true
  2429  	}
  2430  }
  2431  func rewriteValueS390X_OpLess64U(v *Value) bool {
  2432  	v_1 := v.Args[1]
  2433  	v_0 := v.Args[0]
  2434  	b := v.Block
  2435  	typ := &b.Func.Config.Types
  2436  	// match: (Less64U x y)
  2437  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2438  	for {
  2439  		x := v_0
  2440  		y := v_1
  2441  		v.reset(OpS390XLOCGR)
  2442  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2443  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2444  		v0.AuxInt = int64ToAuxInt(0)
  2445  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2446  		v1.AuxInt = int64ToAuxInt(1)
  2447  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2448  		v2.AddArg2(x, y)
  2449  		v.AddArg3(v0, v1, v2)
  2450  		return true
  2451  	}
  2452  }
  2453  func rewriteValueS390X_OpLess8(v *Value) bool {
  2454  	v_1 := v.Args[1]
  2455  	v_0 := v.Args[0]
  2456  	b := v.Block
  2457  	typ := &b.Func.Config.Types
  2458  	// match: (Less8 x y)
  2459  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2460  	for {
  2461  		x := v_0
  2462  		y := v_1
  2463  		v.reset(OpS390XLOCGR)
  2464  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2465  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2466  		v0.AuxInt = int64ToAuxInt(0)
  2467  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2468  		v1.AuxInt = int64ToAuxInt(1)
  2469  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2470  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2471  		v3.AddArg(x)
  2472  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2473  		v4.AddArg(y)
  2474  		v2.AddArg2(v3, v4)
  2475  		v.AddArg3(v0, v1, v2)
  2476  		return true
  2477  	}
  2478  }
  2479  func rewriteValueS390X_OpLess8U(v *Value) bool {
  2480  	v_1 := v.Args[1]
  2481  	v_0 := v.Args[0]
  2482  	b := v.Block
  2483  	typ := &b.Func.Config.Types
  2484  	// match: (Less8U x y)
  2485  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2486  	for {
  2487  		x := v_0
  2488  		y := v_1
  2489  		v.reset(OpS390XLOCGR)
  2490  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2491  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2492  		v0.AuxInt = int64ToAuxInt(0)
  2493  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2494  		v1.AuxInt = int64ToAuxInt(1)
  2495  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2496  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2497  		v3.AddArg(x)
  2498  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2499  		v4.AddArg(y)
  2500  		v2.AddArg2(v3, v4)
  2501  		v.AddArg3(v0, v1, v2)
  2502  		return true
  2503  	}
  2504  }
  2505  func rewriteValueS390X_OpLoad(v *Value) bool {
  2506  	v_1 := v.Args[1]
  2507  	v_0 := v.Args[0]
  2508  	// match: (Load <t> ptr mem)
  2509  	// cond: (is64BitInt(t) || isPtr(t))
  2510  	// result: (MOVDload ptr mem)
  2511  	for {
  2512  		t := v.Type
  2513  		ptr := v_0
  2514  		mem := v_1
  2515  		if !(is64BitInt(t) || isPtr(t)) {
  2516  			break
  2517  		}
  2518  		v.reset(OpS390XMOVDload)
  2519  		v.AddArg2(ptr, mem)
  2520  		return true
  2521  	}
  2522  	// match: (Load <t> ptr mem)
  2523  	// cond: is32BitInt(t) && t.IsSigned()
  2524  	// result: (MOVWload ptr mem)
  2525  	for {
  2526  		t := v.Type
  2527  		ptr := v_0
  2528  		mem := v_1
  2529  		if !(is32BitInt(t) && t.IsSigned()) {
  2530  			break
  2531  		}
  2532  		v.reset(OpS390XMOVWload)
  2533  		v.AddArg2(ptr, mem)
  2534  		return true
  2535  	}
  2536  	// match: (Load <t> ptr mem)
  2537  	// cond: is32BitInt(t) && !t.IsSigned()
  2538  	// result: (MOVWZload ptr mem)
  2539  	for {
  2540  		t := v.Type
  2541  		ptr := v_0
  2542  		mem := v_1
  2543  		if !(is32BitInt(t) && !t.IsSigned()) {
  2544  			break
  2545  		}
  2546  		v.reset(OpS390XMOVWZload)
  2547  		v.AddArg2(ptr, mem)
  2548  		return true
  2549  	}
  2550  	// match: (Load <t> ptr mem)
  2551  	// cond: is16BitInt(t) && t.IsSigned()
  2552  	// result: (MOVHload ptr mem)
  2553  	for {
  2554  		t := v.Type
  2555  		ptr := v_0
  2556  		mem := v_1
  2557  		if !(is16BitInt(t) && t.IsSigned()) {
  2558  			break
  2559  		}
  2560  		v.reset(OpS390XMOVHload)
  2561  		v.AddArg2(ptr, mem)
  2562  		return true
  2563  	}
  2564  	// match: (Load <t> ptr mem)
  2565  	// cond: is16BitInt(t) && !t.IsSigned()
  2566  	// result: (MOVHZload ptr mem)
  2567  	for {
  2568  		t := v.Type
  2569  		ptr := v_0
  2570  		mem := v_1
  2571  		if !(is16BitInt(t) && !t.IsSigned()) {
  2572  			break
  2573  		}
  2574  		v.reset(OpS390XMOVHZload)
  2575  		v.AddArg2(ptr, mem)
  2576  		return true
  2577  	}
  2578  	// match: (Load <t> ptr mem)
  2579  	// cond: is8BitInt(t) && t.IsSigned()
  2580  	// result: (MOVBload ptr mem)
  2581  	for {
  2582  		t := v.Type
  2583  		ptr := v_0
  2584  		mem := v_1
  2585  		if !(is8BitInt(t) && t.IsSigned()) {
  2586  			break
  2587  		}
  2588  		v.reset(OpS390XMOVBload)
  2589  		v.AddArg2(ptr, mem)
  2590  		return true
  2591  	}
  2592  	// match: (Load <t> ptr mem)
  2593  	// cond: (t.IsBoolean() || (is8BitInt(t) && !t.IsSigned()))
  2594  	// result: (MOVBZload ptr mem)
  2595  	for {
  2596  		t := v.Type
  2597  		ptr := v_0
  2598  		mem := v_1
  2599  		if !(t.IsBoolean() || (is8BitInt(t) && !t.IsSigned())) {
  2600  			break
  2601  		}
  2602  		v.reset(OpS390XMOVBZload)
  2603  		v.AddArg2(ptr, mem)
  2604  		return true
  2605  	}
  2606  	// match: (Load <t> ptr mem)
  2607  	// cond: is32BitFloat(t)
  2608  	// result: (FMOVSload ptr mem)
  2609  	for {
  2610  		t := v.Type
  2611  		ptr := v_0
  2612  		mem := v_1
  2613  		if !(is32BitFloat(t)) {
  2614  			break
  2615  		}
  2616  		v.reset(OpS390XFMOVSload)
  2617  		v.AddArg2(ptr, mem)
  2618  		return true
  2619  	}
  2620  	// match: (Load <t> ptr mem)
  2621  	// cond: is64BitFloat(t)
  2622  	// result: (FMOVDload ptr mem)
  2623  	for {
  2624  		t := v.Type
  2625  		ptr := v_0
  2626  		mem := v_1
  2627  		if !(is64BitFloat(t)) {
  2628  			break
  2629  		}
  2630  		v.reset(OpS390XFMOVDload)
  2631  		v.AddArg2(ptr, mem)
  2632  		return true
  2633  	}
  2634  	return false
  2635  }
  2636  func rewriteValueS390X_OpLocalAddr(v *Value) bool {
  2637  	v_1 := v.Args[1]
  2638  	v_0 := v.Args[0]
  2639  	b := v.Block
  2640  	typ := &b.Func.Config.Types
  2641  	// match: (LocalAddr <t> {sym} base mem)
  2642  	// cond: t.Elem().HasPointers()
  2643  	// result: (MOVDaddr {sym} (SPanchored base mem))
  2644  	for {
  2645  		t := v.Type
  2646  		sym := auxToSym(v.Aux)
  2647  		base := v_0
  2648  		mem := v_1
  2649  		if !(t.Elem().HasPointers()) {
  2650  			break
  2651  		}
  2652  		v.reset(OpS390XMOVDaddr)
  2653  		v.Aux = symToAux(sym)
  2654  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  2655  		v0.AddArg2(base, mem)
  2656  		v.AddArg(v0)
  2657  		return true
  2658  	}
  2659  	// match: (LocalAddr <t> {sym} base _)
  2660  	// cond: !t.Elem().HasPointers()
  2661  	// result: (MOVDaddr {sym} base)
  2662  	for {
  2663  		t := v.Type
  2664  		sym := auxToSym(v.Aux)
  2665  		base := v_0
  2666  		if !(!t.Elem().HasPointers()) {
  2667  			break
  2668  		}
  2669  		v.reset(OpS390XMOVDaddr)
  2670  		v.Aux = symToAux(sym)
  2671  		v.AddArg(base)
  2672  		return true
  2673  	}
  2674  	return false
  2675  }
  2676  func rewriteValueS390X_OpLsh16x16(v *Value) bool {
  2677  	v_1 := v.Args[1]
  2678  	v_0 := v.Args[0]
  2679  	b := v.Block
  2680  	typ := &b.Func.Config.Types
  2681  	// match: (Lsh16x16 x y)
  2682  	// cond: shiftIsBounded(v)
  2683  	// result: (SLW x y)
  2684  	for {
  2685  		x := v_0
  2686  		y := v_1
  2687  		if !(shiftIsBounded(v)) {
  2688  			break
  2689  		}
  2690  		v.reset(OpS390XSLW)
  2691  		v.AddArg2(x, y)
  2692  		return true
  2693  	}
  2694  	// match: (Lsh16x16 <t> x y)
  2695  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2696  	for {
  2697  		t := v.Type
  2698  		x := v_0
  2699  		y := v_1
  2700  		v.reset(OpS390XLOCGR)
  2701  		v.Type = t
  2702  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2703  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2704  		v0.AddArg2(x, y)
  2705  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2706  		v1.AuxInt = int64ToAuxInt(0)
  2707  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2708  		v2.AuxInt = int32ToAuxInt(64)
  2709  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2710  		v3.AddArg(y)
  2711  		v2.AddArg(v3)
  2712  		v.AddArg3(v0, v1, v2)
  2713  		return true
  2714  	}
  2715  }
  2716  func rewriteValueS390X_OpLsh16x32(v *Value) bool {
  2717  	v_1 := v.Args[1]
  2718  	v_0 := v.Args[0]
  2719  	b := v.Block
  2720  	typ := &b.Func.Config.Types
  2721  	// match: (Lsh16x32 x y)
  2722  	// cond: shiftIsBounded(v)
  2723  	// result: (SLW x y)
  2724  	for {
  2725  		x := v_0
  2726  		y := v_1
  2727  		if !(shiftIsBounded(v)) {
  2728  			break
  2729  		}
  2730  		v.reset(OpS390XSLW)
  2731  		v.AddArg2(x, y)
  2732  		return true
  2733  	}
  2734  	// match: (Lsh16x32 <t> x y)
  2735  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2736  	for {
  2737  		t := v.Type
  2738  		x := v_0
  2739  		y := v_1
  2740  		v.reset(OpS390XLOCGR)
  2741  		v.Type = t
  2742  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2743  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2744  		v0.AddArg2(x, y)
  2745  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2746  		v1.AuxInt = int64ToAuxInt(0)
  2747  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2748  		v2.AuxInt = int32ToAuxInt(64)
  2749  		v2.AddArg(y)
  2750  		v.AddArg3(v0, v1, v2)
  2751  		return true
  2752  	}
  2753  }
  2754  func rewriteValueS390X_OpLsh16x64(v *Value) bool {
  2755  	v_1 := v.Args[1]
  2756  	v_0 := v.Args[0]
  2757  	b := v.Block
  2758  	typ := &b.Func.Config.Types
  2759  	// match: (Lsh16x64 x y)
  2760  	// cond: shiftIsBounded(v)
  2761  	// result: (SLW x y)
  2762  	for {
  2763  		x := v_0
  2764  		y := v_1
  2765  		if !(shiftIsBounded(v)) {
  2766  			break
  2767  		}
  2768  		v.reset(OpS390XSLW)
  2769  		v.AddArg2(x, y)
  2770  		return true
  2771  	}
  2772  	// match: (Lsh16x64 <t> x y)
  2773  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2774  	for {
  2775  		t := v.Type
  2776  		x := v_0
  2777  		y := v_1
  2778  		v.reset(OpS390XLOCGR)
  2779  		v.Type = t
  2780  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2781  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2782  		v0.AddArg2(x, y)
  2783  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2784  		v1.AuxInt = int64ToAuxInt(0)
  2785  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2786  		v2.AuxInt = int32ToAuxInt(64)
  2787  		v2.AddArg(y)
  2788  		v.AddArg3(v0, v1, v2)
  2789  		return true
  2790  	}
  2791  }
  2792  func rewriteValueS390X_OpLsh16x8(v *Value) bool {
  2793  	v_1 := v.Args[1]
  2794  	v_0 := v.Args[0]
  2795  	b := v.Block
  2796  	typ := &b.Func.Config.Types
  2797  	// match: (Lsh16x8 x y)
  2798  	// cond: shiftIsBounded(v)
  2799  	// result: (SLW x y)
  2800  	for {
  2801  		x := v_0
  2802  		y := v_1
  2803  		if !(shiftIsBounded(v)) {
  2804  			break
  2805  		}
  2806  		v.reset(OpS390XSLW)
  2807  		v.AddArg2(x, y)
  2808  		return true
  2809  	}
  2810  	// match: (Lsh16x8 <t> x y)
  2811  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2812  	for {
  2813  		t := v.Type
  2814  		x := v_0
  2815  		y := v_1
  2816  		v.reset(OpS390XLOCGR)
  2817  		v.Type = t
  2818  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2819  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2820  		v0.AddArg2(x, y)
  2821  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2822  		v1.AuxInt = int64ToAuxInt(0)
  2823  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2824  		v2.AuxInt = int32ToAuxInt(64)
  2825  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2826  		v3.AddArg(y)
  2827  		v2.AddArg(v3)
  2828  		v.AddArg3(v0, v1, v2)
  2829  		return true
  2830  	}
  2831  }
  2832  func rewriteValueS390X_OpLsh32x16(v *Value) bool {
  2833  	v_1 := v.Args[1]
  2834  	v_0 := v.Args[0]
  2835  	b := v.Block
  2836  	typ := &b.Func.Config.Types
  2837  	// match: (Lsh32x16 x y)
  2838  	// cond: shiftIsBounded(v)
  2839  	// result: (SLW x y)
  2840  	for {
  2841  		x := v_0
  2842  		y := v_1
  2843  		if !(shiftIsBounded(v)) {
  2844  			break
  2845  		}
  2846  		v.reset(OpS390XSLW)
  2847  		v.AddArg2(x, y)
  2848  		return true
  2849  	}
  2850  	// match: (Lsh32x16 <t> x y)
  2851  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2852  	for {
  2853  		t := v.Type
  2854  		x := v_0
  2855  		y := v_1
  2856  		v.reset(OpS390XLOCGR)
  2857  		v.Type = t
  2858  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2859  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2860  		v0.AddArg2(x, y)
  2861  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2862  		v1.AuxInt = int64ToAuxInt(0)
  2863  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2864  		v2.AuxInt = int32ToAuxInt(64)
  2865  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2866  		v3.AddArg(y)
  2867  		v2.AddArg(v3)
  2868  		v.AddArg3(v0, v1, v2)
  2869  		return true
  2870  	}
  2871  }
  2872  func rewriteValueS390X_OpLsh32x32(v *Value) bool {
  2873  	v_1 := v.Args[1]
  2874  	v_0 := v.Args[0]
  2875  	b := v.Block
  2876  	typ := &b.Func.Config.Types
  2877  	// match: (Lsh32x32 x y)
  2878  	// cond: shiftIsBounded(v)
  2879  	// result: (SLW x y)
  2880  	for {
  2881  		x := v_0
  2882  		y := v_1
  2883  		if !(shiftIsBounded(v)) {
  2884  			break
  2885  		}
  2886  		v.reset(OpS390XSLW)
  2887  		v.AddArg2(x, y)
  2888  		return true
  2889  	}
  2890  	// match: (Lsh32x32 <t> x y)
  2891  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2892  	for {
  2893  		t := v.Type
  2894  		x := v_0
  2895  		y := v_1
  2896  		v.reset(OpS390XLOCGR)
  2897  		v.Type = t
  2898  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2899  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2900  		v0.AddArg2(x, y)
  2901  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2902  		v1.AuxInt = int64ToAuxInt(0)
  2903  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2904  		v2.AuxInt = int32ToAuxInt(64)
  2905  		v2.AddArg(y)
  2906  		v.AddArg3(v0, v1, v2)
  2907  		return true
  2908  	}
  2909  }
  2910  func rewriteValueS390X_OpLsh32x64(v *Value) bool {
  2911  	v_1 := v.Args[1]
  2912  	v_0 := v.Args[0]
  2913  	b := v.Block
  2914  	typ := &b.Func.Config.Types
  2915  	// match: (Lsh32x64 x y)
  2916  	// cond: shiftIsBounded(v)
  2917  	// result: (SLW x y)
  2918  	for {
  2919  		x := v_0
  2920  		y := v_1
  2921  		if !(shiftIsBounded(v)) {
  2922  			break
  2923  		}
  2924  		v.reset(OpS390XSLW)
  2925  		v.AddArg2(x, y)
  2926  		return true
  2927  	}
  2928  	// match: (Lsh32x64 <t> x y)
  2929  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2930  	for {
  2931  		t := v.Type
  2932  		x := v_0
  2933  		y := v_1
  2934  		v.reset(OpS390XLOCGR)
  2935  		v.Type = t
  2936  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2937  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2938  		v0.AddArg2(x, y)
  2939  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2940  		v1.AuxInt = int64ToAuxInt(0)
  2941  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2942  		v2.AuxInt = int32ToAuxInt(64)
  2943  		v2.AddArg(y)
  2944  		v.AddArg3(v0, v1, v2)
  2945  		return true
  2946  	}
  2947  }
  2948  func rewriteValueS390X_OpLsh32x8(v *Value) bool {
  2949  	v_1 := v.Args[1]
  2950  	v_0 := v.Args[0]
  2951  	b := v.Block
  2952  	typ := &b.Func.Config.Types
  2953  	// match: (Lsh32x8 x y)
  2954  	// cond: shiftIsBounded(v)
  2955  	// result: (SLW x y)
  2956  	for {
  2957  		x := v_0
  2958  		y := v_1
  2959  		if !(shiftIsBounded(v)) {
  2960  			break
  2961  		}
  2962  		v.reset(OpS390XSLW)
  2963  		v.AddArg2(x, y)
  2964  		return true
  2965  	}
  2966  	// match: (Lsh32x8 <t> x y)
  2967  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2968  	for {
  2969  		t := v.Type
  2970  		x := v_0
  2971  		y := v_1
  2972  		v.reset(OpS390XLOCGR)
  2973  		v.Type = t
  2974  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2975  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2976  		v0.AddArg2(x, y)
  2977  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2978  		v1.AuxInt = int64ToAuxInt(0)
  2979  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2980  		v2.AuxInt = int32ToAuxInt(64)
  2981  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2982  		v3.AddArg(y)
  2983  		v2.AddArg(v3)
  2984  		v.AddArg3(v0, v1, v2)
  2985  		return true
  2986  	}
  2987  }
  2988  func rewriteValueS390X_OpLsh64x16(v *Value) bool {
  2989  	v_1 := v.Args[1]
  2990  	v_0 := v.Args[0]
  2991  	b := v.Block
  2992  	typ := &b.Func.Config.Types
  2993  	// match: (Lsh64x16 x y)
  2994  	// cond: shiftIsBounded(v)
  2995  	// result: (SLD x y)
  2996  	for {
  2997  		x := v_0
  2998  		y := v_1
  2999  		if !(shiftIsBounded(v)) {
  3000  			break
  3001  		}
  3002  		v.reset(OpS390XSLD)
  3003  		v.AddArg2(x, y)
  3004  		return true
  3005  	}
  3006  	// match: (Lsh64x16 <t> x y)
  3007  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  3008  	for {
  3009  		t := v.Type
  3010  		x := v_0
  3011  		y := v_1
  3012  		v.reset(OpS390XLOCGR)
  3013  		v.Type = t
  3014  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3015  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3016  		v0.AddArg2(x, y)
  3017  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3018  		v1.AuxInt = int64ToAuxInt(0)
  3019  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3020  		v2.AuxInt = int32ToAuxInt(64)
  3021  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3022  		v3.AddArg(y)
  3023  		v2.AddArg(v3)
  3024  		v.AddArg3(v0, v1, v2)
  3025  		return true
  3026  	}
  3027  }
  3028  func rewriteValueS390X_OpLsh64x32(v *Value) bool {
  3029  	v_1 := v.Args[1]
  3030  	v_0 := v.Args[0]
  3031  	b := v.Block
  3032  	typ := &b.Func.Config.Types
  3033  	// match: (Lsh64x32 x y)
  3034  	// cond: shiftIsBounded(v)
  3035  	// result: (SLD x y)
  3036  	for {
  3037  		x := v_0
  3038  		y := v_1
  3039  		if !(shiftIsBounded(v)) {
  3040  			break
  3041  		}
  3042  		v.reset(OpS390XSLD)
  3043  		v.AddArg2(x, y)
  3044  		return true
  3045  	}
  3046  	// match: (Lsh64x32 <t> x y)
  3047  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3048  	for {
  3049  		t := v.Type
  3050  		x := v_0
  3051  		y := v_1
  3052  		v.reset(OpS390XLOCGR)
  3053  		v.Type = t
  3054  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3055  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3056  		v0.AddArg2(x, y)
  3057  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3058  		v1.AuxInt = int64ToAuxInt(0)
  3059  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3060  		v2.AuxInt = int32ToAuxInt(64)
  3061  		v2.AddArg(y)
  3062  		v.AddArg3(v0, v1, v2)
  3063  		return true
  3064  	}
  3065  }
  3066  func rewriteValueS390X_OpLsh64x64(v *Value) bool {
  3067  	v_1 := v.Args[1]
  3068  	v_0 := v.Args[0]
  3069  	b := v.Block
  3070  	typ := &b.Func.Config.Types
  3071  	// match: (Lsh64x64 x y)
  3072  	// cond: shiftIsBounded(v)
  3073  	// result: (SLD x y)
  3074  	for {
  3075  		x := v_0
  3076  		y := v_1
  3077  		if !(shiftIsBounded(v)) {
  3078  			break
  3079  		}
  3080  		v.reset(OpS390XSLD)
  3081  		v.AddArg2(x, y)
  3082  		return true
  3083  	}
  3084  	// match: (Lsh64x64 <t> x y)
  3085  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3086  	for {
  3087  		t := v.Type
  3088  		x := v_0
  3089  		y := v_1
  3090  		v.reset(OpS390XLOCGR)
  3091  		v.Type = t
  3092  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3093  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3094  		v0.AddArg2(x, y)
  3095  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3096  		v1.AuxInt = int64ToAuxInt(0)
  3097  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  3098  		v2.AuxInt = int32ToAuxInt(64)
  3099  		v2.AddArg(y)
  3100  		v.AddArg3(v0, v1, v2)
  3101  		return true
  3102  	}
  3103  }
  3104  func rewriteValueS390X_OpLsh64x8(v *Value) bool {
  3105  	v_1 := v.Args[1]
  3106  	v_0 := v.Args[0]
  3107  	b := v.Block
  3108  	typ := &b.Func.Config.Types
  3109  	// match: (Lsh64x8 x y)
  3110  	// cond: shiftIsBounded(v)
  3111  	// result: (SLD x y)
  3112  	for {
  3113  		x := v_0
  3114  		y := v_1
  3115  		if !(shiftIsBounded(v)) {
  3116  			break
  3117  		}
  3118  		v.reset(OpS390XSLD)
  3119  		v.AddArg2(x, y)
  3120  		return true
  3121  	}
  3122  	// match: (Lsh64x8 <t> x y)
  3123  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3124  	for {
  3125  		t := v.Type
  3126  		x := v_0
  3127  		y := v_1
  3128  		v.reset(OpS390XLOCGR)
  3129  		v.Type = t
  3130  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3131  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  3132  		v0.AddArg2(x, y)
  3133  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3134  		v1.AuxInt = int64ToAuxInt(0)
  3135  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3136  		v2.AuxInt = int32ToAuxInt(64)
  3137  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3138  		v3.AddArg(y)
  3139  		v2.AddArg(v3)
  3140  		v.AddArg3(v0, v1, v2)
  3141  		return true
  3142  	}
  3143  }
  3144  func rewriteValueS390X_OpLsh8x16(v *Value) bool {
  3145  	v_1 := v.Args[1]
  3146  	v_0 := v.Args[0]
  3147  	b := v.Block
  3148  	typ := &b.Func.Config.Types
  3149  	// match: (Lsh8x16 x y)
  3150  	// cond: shiftIsBounded(v)
  3151  	// result: (SLW x y)
  3152  	for {
  3153  		x := v_0
  3154  		y := v_1
  3155  		if !(shiftIsBounded(v)) {
  3156  			break
  3157  		}
  3158  		v.reset(OpS390XSLW)
  3159  		v.AddArg2(x, y)
  3160  		return true
  3161  	}
  3162  	// match: (Lsh8x16 <t> x y)
  3163  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  3164  	for {
  3165  		t := v.Type
  3166  		x := v_0
  3167  		y := v_1
  3168  		v.reset(OpS390XLOCGR)
  3169  		v.Type = t
  3170  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3171  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3172  		v0.AddArg2(x, y)
  3173  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3174  		v1.AuxInt = int64ToAuxInt(0)
  3175  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3176  		v2.AuxInt = int32ToAuxInt(64)
  3177  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3178  		v3.AddArg(y)
  3179  		v2.AddArg(v3)
  3180  		v.AddArg3(v0, v1, v2)
  3181  		return true
  3182  	}
  3183  }
  3184  func rewriteValueS390X_OpLsh8x32(v *Value) bool {
  3185  	v_1 := v.Args[1]
  3186  	v_0 := v.Args[0]
  3187  	b := v.Block
  3188  	typ := &b.Func.Config.Types
  3189  	// match: (Lsh8x32 x y)
  3190  	// cond: shiftIsBounded(v)
  3191  	// result: (SLW x y)
  3192  	for {
  3193  		x := v_0
  3194  		y := v_1
  3195  		if !(shiftIsBounded(v)) {
  3196  			break
  3197  		}
  3198  		v.reset(OpS390XSLW)
  3199  		v.AddArg2(x, y)
  3200  		return true
  3201  	}
  3202  	// match: (Lsh8x32 <t> x y)
  3203  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3204  	for {
  3205  		t := v.Type
  3206  		x := v_0
  3207  		y := v_1
  3208  		v.reset(OpS390XLOCGR)
  3209  		v.Type = t
  3210  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3211  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3212  		v0.AddArg2(x, y)
  3213  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3214  		v1.AuxInt = int64ToAuxInt(0)
  3215  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3216  		v2.AuxInt = int32ToAuxInt(64)
  3217  		v2.AddArg(y)
  3218  		v.AddArg3(v0, v1, v2)
  3219  		return true
  3220  	}
  3221  }
  3222  func rewriteValueS390X_OpLsh8x64(v *Value) bool {
  3223  	v_1 := v.Args[1]
  3224  	v_0 := v.Args[0]
  3225  	b := v.Block
  3226  	typ := &b.Func.Config.Types
  3227  	// match: (Lsh8x64 x y)
  3228  	// cond: shiftIsBounded(v)
  3229  	// result: (SLW x y)
  3230  	for {
  3231  		x := v_0
  3232  		y := v_1
  3233  		if !(shiftIsBounded(v)) {
  3234  			break
  3235  		}
  3236  		v.reset(OpS390XSLW)
  3237  		v.AddArg2(x, y)
  3238  		return true
  3239  	}
  3240  	// match: (Lsh8x64 <t> x y)
  3241  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3242  	for {
  3243  		t := v.Type
  3244  		x := v_0
  3245  		y := v_1
  3246  		v.reset(OpS390XLOCGR)
  3247  		v.Type = t
  3248  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3249  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3250  		v0.AddArg2(x, y)
  3251  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3252  		v1.AuxInt = int64ToAuxInt(0)
  3253  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  3254  		v2.AuxInt = int32ToAuxInt(64)
  3255  		v2.AddArg(y)
  3256  		v.AddArg3(v0, v1, v2)
  3257  		return true
  3258  	}
  3259  }
  3260  func rewriteValueS390X_OpLsh8x8(v *Value) bool {
  3261  	v_1 := v.Args[1]
  3262  	v_0 := v.Args[0]
  3263  	b := v.Block
  3264  	typ := &b.Func.Config.Types
  3265  	// match: (Lsh8x8 x y)
  3266  	// cond: shiftIsBounded(v)
  3267  	// result: (SLW x y)
  3268  	for {
  3269  		x := v_0
  3270  		y := v_1
  3271  		if !(shiftIsBounded(v)) {
  3272  			break
  3273  		}
  3274  		v.reset(OpS390XSLW)
  3275  		v.AddArg2(x, y)
  3276  		return true
  3277  	}
  3278  	// match: (Lsh8x8 <t> x y)
  3279  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3280  	for {
  3281  		t := v.Type
  3282  		x := v_0
  3283  		y := v_1
  3284  		v.reset(OpS390XLOCGR)
  3285  		v.Type = t
  3286  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3287  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3288  		v0.AddArg2(x, y)
  3289  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3290  		v1.AuxInt = int64ToAuxInt(0)
  3291  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3292  		v2.AuxInt = int32ToAuxInt(64)
  3293  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3294  		v3.AddArg(y)
  3295  		v2.AddArg(v3)
  3296  		v.AddArg3(v0, v1, v2)
  3297  		return true
  3298  	}
  3299  }
  3300  func rewriteValueS390X_OpMod16(v *Value) bool {
  3301  	v_1 := v.Args[1]
  3302  	v_0 := v.Args[0]
  3303  	b := v.Block
  3304  	typ := &b.Func.Config.Types
  3305  	// match: (Mod16 x y)
  3306  	// result: (MODW (MOVHreg x) (MOVHreg y))
  3307  	for {
  3308  		x := v_0
  3309  		y := v_1
  3310  		v.reset(OpS390XMODW)
  3311  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3312  		v0.AddArg(x)
  3313  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3314  		v1.AddArg(y)
  3315  		v.AddArg2(v0, v1)
  3316  		return true
  3317  	}
  3318  }
  3319  func rewriteValueS390X_OpMod16u(v *Value) bool {
  3320  	v_1 := v.Args[1]
  3321  	v_0 := v.Args[0]
  3322  	b := v.Block
  3323  	typ := &b.Func.Config.Types
  3324  	// match: (Mod16u x y)
  3325  	// result: (MODWU (MOVHZreg x) (MOVHZreg y))
  3326  	for {
  3327  		x := v_0
  3328  		y := v_1
  3329  		v.reset(OpS390XMODWU)
  3330  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3331  		v0.AddArg(x)
  3332  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3333  		v1.AddArg(y)
  3334  		v.AddArg2(v0, v1)
  3335  		return true
  3336  	}
  3337  }
  3338  func rewriteValueS390X_OpMod32(v *Value) bool {
  3339  	v_1 := v.Args[1]
  3340  	v_0 := v.Args[0]
  3341  	b := v.Block
  3342  	typ := &b.Func.Config.Types
  3343  	// match: (Mod32 x y)
  3344  	// result: (MODW (MOVWreg x) y)
  3345  	for {
  3346  		x := v_0
  3347  		y := v_1
  3348  		v.reset(OpS390XMODW)
  3349  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  3350  		v0.AddArg(x)
  3351  		v.AddArg2(v0, y)
  3352  		return true
  3353  	}
  3354  }
  3355  func rewriteValueS390X_OpMod32u(v *Value) bool {
  3356  	v_1 := v.Args[1]
  3357  	v_0 := v.Args[0]
  3358  	b := v.Block
  3359  	typ := &b.Func.Config.Types
  3360  	// match: (Mod32u x y)
  3361  	// result: (MODWU (MOVWZreg x) y)
  3362  	for {
  3363  		x := v_0
  3364  		y := v_1
  3365  		v.reset(OpS390XMODWU)
  3366  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  3367  		v0.AddArg(x)
  3368  		v.AddArg2(v0, y)
  3369  		return true
  3370  	}
  3371  }
  3372  func rewriteValueS390X_OpMod64(v *Value) bool {
  3373  	v_1 := v.Args[1]
  3374  	v_0 := v.Args[0]
  3375  	// match: (Mod64 x y)
  3376  	// result: (MODD x y)
  3377  	for {
  3378  		x := v_0
  3379  		y := v_1
  3380  		v.reset(OpS390XMODD)
  3381  		v.AddArg2(x, y)
  3382  		return true
  3383  	}
  3384  }
  3385  func rewriteValueS390X_OpMod8(v *Value) bool {
  3386  	v_1 := v.Args[1]
  3387  	v_0 := v.Args[0]
  3388  	b := v.Block
  3389  	typ := &b.Func.Config.Types
  3390  	// match: (Mod8 x y)
  3391  	// result: (MODW (MOVBreg x) (MOVBreg y))
  3392  	for {
  3393  		x := v_0
  3394  		y := v_1
  3395  		v.reset(OpS390XMODW)
  3396  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3397  		v0.AddArg(x)
  3398  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3399  		v1.AddArg(y)
  3400  		v.AddArg2(v0, v1)
  3401  		return true
  3402  	}
  3403  }
  3404  func rewriteValueS390X_OpMod8u(v *Value) bool {
  3405  	v_1 := v.Args[1]
  3406  	v_0 := v.Args[0]
  3407  	b := v.Block
  3408  	typ := &b.Func.Config.Types
  3409  	// match: (Mod8u x y)
  3410  	// result: (MODWU (MOVBZreg x) (MOVBZreg y))
  3411  	for {
  3412  		x := v_0
  3413  		y := v_1
  3414  		v.reset(OpS390XMODWU)
  3415  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3416  		v0.AddArg(x)
  3417  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3418  		v1.AddArg(y)
  3419  		v.AddArg2(v0, v1)
  3420  		return true
  3421  	}
  3422  }
  3423  func rewriteValueS390X_OpMove(v *Value) bool {
  3424  	v_2 := v.Args[2]
  3425  	v_1 := v.Args[1]
  3426  	v_0 := v.Args[0]
  3427  	b := v.Block
  3428  	typ := &b.Func.Config.Types
  3429  	// match: (Move [0] _ _ mem)
  3430  	// result: mem
  3431  	for {
  3432  		if auxIntToInt64(v.AuxInt) != 0 {
  3433  			break
  3434  		}
  3435  		mem := v_2
  3436  		v.copyOf(mem)
  3437  		return true
  3438  	}
  3439  	// match: (Move [1] dst src mem)
  3440  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3441  	for {
  3442  		if auxIntToInt64(v.AuxInt) != 1 {
  3443  			break
  3444  		}
  3445  		dst := v_0
  3446  		src := v_1
  3447  		mem := v_2
  3448  		v.reset(OpS390XMOVBstore)
  3449  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3450  		v0.AddArg2(src, mem)
  3451  		v.AddArg3(dst, v0, mem)
  3452  		return true
  3453  	}
  3454  	// match: (Move [2] dst src mem)
  3455  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3456  	for {
  3457  		if auxIntToInt64(v.AuxInt) != 2 {
  3458  			break
  3459  		}
  3460  		dst := v_0
  3461  		src := v_1
  3462  		mem := v_2
  3463  		v.reset(OpS390XMOVHstore)
  3464  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3465  		v0.AddArg2(src, mem)
  3466  		v.AddArg3(dst, v0, mem)
  3467  		return true
  3468  	}
  3469  	// match: (Move [4] dst src mem)
  3470  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3471  	for {
  3472  		if auxIntToInt64(v.AuxInt) != 4 {
  3473  			break
  3474  		}
  3475  		dst := v_0
  3476  		src := v_1
  3477  		mem := v_2
  3478  		v.reset(OpS390XMOVWstore)
  3479  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3480  		v0.AddArg2(src, mem)
  3481  		v.AddArg3(dst, v0, mem)
  3482  		return true
  3483  	}
  3484  	// match: (Move [8] dst src mem)
  3485  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3486  	for {
  3487  		if auxIntToInt64(v.AuxInt) != 8 {
  3488  			break
  3489  		}
  3490  		dst := v_0
  3491  		src := v_1
  3492  		mem := v_2
  3493  		v.reset(OpS390XMOVDstore)
  3494  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3495  		v0.AddArg2(src, mem)
  3496  		v.AddArg3(dst, v0, mem)
  3497  		return true
  3498  	}
  3499  	// match: (Move [16] dst src mem)
  3500  	// result: (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
  3501  	for {
  3502  		if auxIntToInt64(v.AuxInt) != 16 {
  3503  			break
  3504  		}
  3505  		dst := v_0
  3506  		src := v_1
  3507  		mem := v_2
  3508  		v.reset(OpS390XMOVDstore)
  3509  		v.AuxInt = int32ToAuxInt(8)
  3510  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3511  		v0.AuxInt = int32ToAuxInt(8)
  3512  		v0.AddArg2(src, mem)
  3513  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3514  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3515  		v2.AddArg2(src, mem)
  3516  		v1.AddArg3(dst, v2, mem)
  3517  		v.AddArg3(dst, v0, v1)
  3518  		return true
  3519  	}
  3520  	// match: (Move [24] dst src mem)
  3521  	// result: (MOVDstore [16] dst (MOVDload [16] src mem) (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem)))
  3522  	for {
  3523  		if auxIntToInt64(v.AuxInt) != 24 {
  3524  			break
  3525  		}
  3526  		dst := v_0
  3527  		src := v_1
  3528  		mem := v_2
  3529  		v.reset(OpS390XMOVDstore)
  3530  		v.AuxInt = int32ToAuxInt(16)
  3531  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3532  		v0.AuxInt = int32ToAuxInt(16)
  3533  		v0.AddArg2(src, mem)
  3534  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3535  		v1.AuxInt = int32ToAuxInt(8)
  3536  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3537  		v2.AuxInt = int32ToAuxInt(8)
  3538  		v2.AddArg2(src, mem)
  3539  		v3 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3540  		v4 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3541  		v4.AddArg2(src, mem)
  3542  		v3.AddArg3(dst, v4, mem)
  3543  		v1.AddArg3(dst, v2, v3)
  3544  		v.AddArg3(dst, v0, v1)
  3545  		return true
  3546  	}
  3547  	// match: (Move [3] dst src mem)
  3548  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHZload src mem) mem))
  3549  	for {
  3550  		if auxIntToInt64(v.AuxInt) != 3 {
  3551  			break
  3552  		}
  3553  		dst := v_0
  3554  		src := v_1
  3555  		mem := v_2
  3556  		v.reset(OpS390XMOVBstore)
  3557  		v.AuxInt = int32ToAuxInt(2)
  3558  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3559  		v0.AuxInt = int32ToAuxInt(2)
  3560  		v0.AddArg2(src, mem)
  3561  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3562  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3563  		v2.AddArg2(src, mem)
  3564  		v1.AddArg3(dst, v2, mem)
  3565  		v.AddArg3(dst, v0, v1)
  3566  		return true
  3567  	}
  3568  	// match: (Move [5] dst src mem)
  3569  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3570  	for {
  3571  		if auxIntToInt64(v.AuxInt) != 5 {
  3572  			break
  3573  		}
  3574  		dst := v_0
  3575  		src := v_1
  3576  		mem := v_2
  3577  		v.reset(OpS390XMOVBstore)
  3578  		v.AuxInt = int32ToAuxInt(4)
  3579  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3580  		v0.AuxInt = int32ToAuxInt(4)
  3581  		v0.AddArg2(src, mem)
  3582  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3583  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3584  		v2.AddArg2(src, mem)
  3585  		v1.AddArg3(dst, v2, mem)
  3586  		v.AddArg3(dst, v0, v1)
  3587  		return true
  3588  	}
  3589  	// match: (Move [6] dst src mem)
  3590  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3591  	for {
  3592  		if auxIntToInt64(v.AuxInt) != 6 {
  3593  			break
  3594  		}
  3595  		dst := v_0
  3596  		src := v_1
  3597  		mem := v_2
  3598  		v.reset(OpS390XMOVHstore)
  3599  		v.AuxInt = int32ToAuxInt(4)
  3600  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3601  		v0.AuxInt = int32ToAuxInt(4)
  3602  		v0.AddArg2(src, mem)
  3603  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3604  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3605  		v2.AddArg2(src, mem)
  3606  		v1.AddArg3(dst, v2, mem)
  3607  		v.AddArg3(dst, v0, v1)
  3608  		return true
  3609  	}
  3610  	// match: (Move [7] dst src mem)
  3611  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3612  	for {
  3613  		if auxIntToInt64(v.AuxInt) != 7 {
  3614  			break
  3615  		}
  3616  		dst := v_0
  3617  		src := v_1
  3618  		mem := v_2
  3619  		v.reset(OpS390XMOVBstore)
  3620  		v.AuxInt = int32ToAuxInt(6)
  3621  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3622  		v0.AuxInt = int32ToAuxInt(6)
  3623  		v0.AddArg2(src, mem)
  3624  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3625  		v1.AuxInt = int32ToAuxInt(4)
  3626  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3627  		v2.AuxInt = int32ToAuxInt(4)
  3628  		v2.AddArg2(src, mem)
  3629  		v3 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3630  		v4 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3631  		v4.AddArg2(src, mem)
  3632  		v3.AddArg3(dst, v4, mem)
  3633  		v1.AddArg3(dst, v2, v3)
  3634  		v.AddArg3(dst, v0, v1)
  3635  		return true
  3636  	}
  3637  	// match: (Move [s] dst src mem)
  3638  	// cond: s > 0 && s <= 256 && logLargeCopy(v, s)
  3639  	// result: (MVC [makeValAndOff(int32(s), 0)] dst src mem)
  3640  	for {
  3641  		s := auxIntToInt64(v.AuxInt)
  3642  		dst := v_0
  3643  		src := v_1
  3644  		mem := v_2
  3645  		if !(s > 0 && s <= 256 && logLargeCopy(v, s)) {
  3646  			break
  3647  		}
  3648  		v.reset(OpS390XMVC)
  3649  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s), 0))
  3650  		v.AddArg3(dst, src, mem)
  3651  		return true
  3652  	}
  3653  	// match: (Move [s] dst src mem)
  3654  	// cond: s > 256 && s <= 512 && logLargeCopy(v, s)
  3655  	// result: (MVC [makeValAndOff(int32(s)-256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem))
  3656  	for {
  3657  		s := auxIntToInt64(v.AuxInt)
  3658  		dst := v_0
  3659  		src := v_1
  3660  		mem := v_2
  3661  		if !(s > 256 && s <= 512 && logLargeCopy(v, s)) {
  3662  			break
  3663  		}
  3664  		v.reset(OpS390XMVC)
  3665  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-256, 256))
  3666  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3667  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3668  		v0.AddArg3(dst, src, mem)
  3669  		v.AddArg3(dst, src, v0)
  3670  		return true
  3671  	}
  3672  	// match: (Move [s] dst src mem)
  3673  	// cond: s > 512 && s <= 768 && logLargeCopy(v, s)
  3674  	// result: (MVC [makeValAndOff(int32(s)-512, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem)))
  3675  	for {
  3676  		s := auxIntToInt64(v.AuxInt)
  3677  		dst := v_0
  3678  		src := v_1
  3679  		mem := v_2
  3680  		if !(s > 512 && s <= 768 && logLargeCopy(v, s)) {
  3681  			break
  3682  		}
  3683  		v.reset(OpS390XMVC)
  3684  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-512, 512))
  3685  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3686  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 256))
  3687  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3688  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3689  		v1.AddArg3(dst, src, mem)
  3690  		v0.AddArg3(dst, src, v1)
  3691  		v.AddArg3(dst, src, v0)
  3692  		return true
  3693  	}
  3694  	// match: (Move [s] dst src mem)
  3695  	// cond: s > 768 && s <= 1024 && logLargeCopy(v, s)
  3696  	// result: (MVC [makeValAndOff(int32(s)-768, 768)] dst src (MVC [makeValAndOff(256, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem))))
  3697  	for {
  3698  		s := auxIntToInt64(v.AuxInt)
  3699  		dst := v_0
  3700  		src := v_1
  3701  		mem := v_2
  3702  		if !(s > 768 && s <= 1024 && logLargeCopy(v, s)) {
  3703  			break
  3704  		}
  3705  		v.reset(OpS390XMVC)
  3706  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-768, 768))
  3707  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3708  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 512))
  3709  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3710  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 256))
  3711  		v2 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3712  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3713  		v2.AddArg3(dst, src, mem)
  3714  		v1.AddArg3(dst, src, v2)
  3715  		v0.AddArg3(dst, src, v1)
  3716  		v.AddArg3(dst, src, v0)
  3717  		return true
  3718  	}
  3719  	// match: (Move [s] dst src mem)
  3720  	// cond: s > 1024 && logLargeCopy(v, s)
  3721  	// result: (LoweredMove [s%256] dst src (ADD <src.Type> src (MOVDconst [(s/256)*256])) mem)
  3722  	for {
  3723  		s := auxIntToInt64(v.AuxInt)
  3724  		dst := v_0
  3725  		src := v_1
  3726  		mem := v_2
  3727  		if !(s > 1024 && logLargeCopy(v, s)) {
  3728  			break
  3729  		}
  3730  		v.reset(OpS390XLoweredMove)
  3731  		v.AuxInt = int64ToAuxInt(s % 256)
  3732  		v0 := b.NewValue0(v.Pos, OpS390XADD, src.Type)
  3733  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3734  		v1.AuxInt = int64ToAuxInt((s / 256) * 256)
  3735  		v0.AddArg2(src, v1)
  3736  		v.AddArg4(dst, src, v0, mem)
  3737  		return true
  3738  	}
  3739  	return false
  3740  }
  3741  func rewriteValueS390X_OpNeq16(v *Value) bool {
  3742  	v_1 := v.Args[1]
  3743  	v_0 := v.Args[0]
  3744  	b := v.Block
  3745  	typ := &b.Func.Config.Types
  3746  	// match: (Neq16 x y)
  3747  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  3748  	for {
  3749  		x := v_0
  3750  		y := v_1
  3751  		v.reset(OpS390XLOCGR)
  3752  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3753  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3754  		v0.AuxInt = int64ToAuxInt(0)
  3755  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3756  		v1.AuxInt = int64ToAuxInt(1)
  3757  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3758  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3759  		v3.AddArg(x)
  3760  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3761  		v4.AddArg(y)
  3762  		v2.AddArg2(v3, v4)
  3763  		v.AddArg3(v0, v1, v2)
  3764  		return true
  3765  	}
  3766  }
  3767  func rewriteValueS390X_OpNeq32(v *Value) bool {
  3768  	v_1 := v.Args[1]
  3769  	v_0 := v.Args[0]
  3770  	b := v.Block
  3771  	typ := &b.Func.Config.Types
  3772  	// match: (Neq32 x y)
  3773  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  3774  	for {
  3775  		x := v_0
  3776  		y := v_1
  3777  		v.reset(OpS390XLOCGR)
  3778  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3779  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3780  		v0.AuxInt = int64ToAuxInt(0)
  3781  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3782  		v1.AuxInt = int64ToAuxInt(1)
  3783  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3784  		v2.AddArg2(x, y)
  3785  		v.AddArg3(v0, v1, v2)
  3786  		return true
  3787  	}
  3788  }
  3789  func rewriteValueS390X_OpNeq32F(v *Value) bool {
  3790  	v_1 := v.Args[1]
  3791  	v_0 := v.Args[0]
  3792  	b := v.Block
  3793  	typ := &b.Func.Config.Types
  3794  	// match: (Neq32F x y)
  3795  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  3796  	for {
  3797  		x := v_0
  3798  		y := v_1
  3799  		v.reset(OpS390XLOCGR)
  3800  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3801  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3802  		v0.AuxInt = int64ToAuxInt(0)
  3803  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3804  		v1.AuxInt = int64ToAuxInt(1)
  3805  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  3806  		v2.AddArg2(x, y)
  3807  		v.AddArg3(v0, v1, v2)
  3808  		return true
  3809  	}
  3810  }
  3811  func rewriteValueS390X_OpNeq64(v *Value) bool {
  3812  	v_1 := v.Args[1]
  3813  	v_0 := v.Args[0]
  3814  	b := v.Block
  3815  	typ := &b.Func.Config.Types
  3816  	// match: (Neq64 x y)
  3817  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3818  	for {
  3819  		x := v_0
  3820  		y := v_1
  3821  		v.reset(OpS390XLOCGR)
  3822  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3823  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3824  		v0.AuxInt = int64ToAuxInt(0)
  3825  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3826  		v1.AuxInt = int64ToAuxInt(1)
  3827  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3828  		v2.AddArg2(x, y)
  3829  		v.AddArg3(v0, v1, v2)
  3830  		return true
  3831  	}
  3832  }
  3833  func rewriteValueS390X_OpNeq64F(v *Value) bool {
  3834  	v_1 := v.Args[1]
  3835  	v_0 := v.Args[0]
  3836  	b := v.Block
  3837  	typ := &b.Func.Config.Types
  3838  	// match: (Neq64F x y)
  3839  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  3840  	for {
  3841  		x := v_0
  3842  		y := v_1
  3843  		v.reset(OpS390XLOCGR)
  3844  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3845  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3846  		v0.AuxInt = int64ToAuxInt(0)
  3847  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3848  		v1.AuxInt = int64ToAuxInt(1)
  3849  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  3850  		v2.AddArg2(x, y)
  3851  		v.AddArg3(v0, v1, v2)
  3852  		return true
  3853  	}
  3854  }
  3855  func rewriteValueS390X_OpNeq8(v *Value) bool {
  3856  	v_1 := v.Args[1]
  3857  	v_0 := v.Args[0]
  3858  	b := v.Block
  3859  	typ := &b.Func.Config.Types
  3860  	// match: (Neq8 x y)
  3861  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3862  	for {
  3863  		x := v_0
  3864  		y := v_1
  3865  		v.reset(OpS390XLOCGR)
  3866  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3867  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3868  		v0.AuxInt = int64ToAuxInt(0)
  3869  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3870  		v1.AuxInt = int64ToAuxInt(1)
  3871  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3872  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3873  		v3.AddArg(x)
  3874  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3875  		v4.AddArg(y)
  3876  		v2.AddArg2(v3, v4)
  3877  		v.AddArg3(v0, v1, v2)
  3878  		return true
  3879  	}
  3880  }
  3881  func rewriteValueS390X_OpNeqB(v *Value) bool {
  3882  	v_1 := v.Args[1]
  3883  	v_0 := v.Args[0]
  3884  	b := v.Block
  3885  	typ := &b.Func.Config.Types
  3886  	// match: (NeqB x y)
  3887  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3888  	for {
  3889  		x := v_0
  3890  		y := v_1
  3891  		v.reset(OpS390XLOCGR)
  3892  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3893  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3894  		v0.AuxInt = int64ToAuxInt(0)
  3895  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3896  		v1.AuxInt = int64ToAuxInt(1)
  3897  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3898  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3899  		v3.AddArg(x)
  3900  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3901  		v4.AddArg(y)
  3902  		v2.AddArg2(v3, v4)
  3903  		v.AddArg3(v0, v1, v2)
  3904  		return true
  3905  	}
  3906  }
  3907  func rewriteValueS390X_OpNeqPtr(v *Value) bool {
  3908  	v_1 := v.Args[1]
  3909  	v_0 := v.Args[0]
  3910  	b := v.Block
  3911  	typ := &b.Func.Config.Types
  3912  	// match: (NeqPtr x y)
  3913  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3914  	for {
  3915  		x := v_0
  3916  		y := v_1
  3917  		v.reset(OpS390XLOCGR)
  3918  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3919  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3920  		v0.AuxInt = int64ToAuxInt(0)
  3921  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3922  		v1.AuxInt = int64ToAuxInt(1)
  3923  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3924  		v2.AddArg2(x, y)
  3925  		v.AddArg3(v0, v1, v2)
  3926  		return true
  3927  	}
  3928  }
  3929  func rewriteValueS390X_OpNot(v *Value) bool {
  3930  	v_0 := v.Args[0]
  3931  	// match: (Not x)
  3932  	// result: (XORWconst [1] x)
  3933  	for {
  3934  		x := v_0
  3935  		v.reset(OpS390XXORWconst)
  3936  		v.AuxInt = int32ToAuxInt(1)
  3937  		v.AddArg(x)
  3938  		return true
  3939  	}
  3940  }
  3941  func rewriteValueS390X_OpOffPtr(v *Value) bool {
  3942  	v_0 := v.Args[0]
  3943  	b := v.Block
  3944  	typ := &b.Func.Config.Types
  3945  	// match: (OffPtr [off] ptr:(SP))
  3946  	// result: (MOVDaddr [int32(off)] ptr)
  3947  	for {
  3948  		off := auxIntToInt64(v.AuxInt)
  3949  		ptr := v_0
  3950  		if ptr.Op != OpSP {
  3951  			break
  3952  		}
  3953  		v.reset(OpS390XMOVDaddr)
  3954  		v.AuxInt = int32ToAuxInt(int32(off))
  3955  		v.AddArg(ptr)
  3956  		return true
  3957  	}
  3958  	// match: (OffPtr [off] ptr)
  3959  	// cond: is32Bit(off)
  3960  	// result: (ADDconst [int32(off)] ptr)
  3961  	for {
  3962  		off := auxIntToInt64(v.AuxInt)
  3963  		ptr := v_0
  3964  		if !(is32Bit(off)) {
  3965  			break
  3966  		}
  3967  		v.reset(OpS390XADDconst)
  3968  		v.AuxInt = int32ToAuxInt(int32(off))
  3969  		v.AddArg(ptr)
  3970  		return true
  3971  	}
  3972  	// match: (OffPtr [off] ptr)
  3973  	// result: (ADD (MOVDconst [off]) ptr)
  3974  	for {
  3975  		off := auxIntToInt64(v.AuxInt)
  3976  		ptr := v_0
  3977  		v.reset(OpS390XADD)
  3978  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3979  		v0.AuxInt = int64ToAuxInt(off)
  3980  		v.AddArg2(v0, ptr)
  3981  		return true
  3982  	}
  3983  }
  3984  func rewriteValueS390X_OpPopCount16(v *Value) bool {
  3985  	v_0 := v.Args[0]
  3986  	b := v.Block
  3987  	typ := &b.Func.Config.Types
  3988  	// match: (PopCount16 x)
  3989  	// result: (MOVBZreg (SumBytes2 (POPCNT <typ.UInt16> x)))
  3990  	for {
  3991  		x := v_0
  3992  		v.reset(OpS390XMOVBZreg)
  3993  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes2, typ.UInt8)
  3994  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt16)
  3995  		v1.AddArg(x)
  3996  		v0.AddArg(v1)
  3997  		v.AddArg(v0)
  3998  		return true
  3999  	}
  4000  }
  4001  func rewriteValueS390X_OpPopCount32(v *Value) bool {
  4002  	v_0 := v.Args[0]
  4003  	b := v.Block
  4004  	typ := &b.Func.Config.Types
  4005  	// match: (PopCount32 x)
  4006  	// result: (MOVBZreg (SumBytes4 (POPCNT <typ.UInt32> x)))
  4007  	for {
  4008  		x := v_0
  4009  		v.reset(OpS390XMOVBZreg)
  4010  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes4, typ.UInt8)
  4011  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt32)
  4012  		v1.AddArg(x)
  4013  		v0.AddArg(v1)
  4014  		v.AddArg(v0)
  4015  		return true
  4016  	}
  4017  }
  4018  func rewriteValueS390X_OpPopCount64(v *Value) bool {
  4019  	v_0 := v.Args[0]
  4020  	b := v.Block
  4021  	typ := &b.Func.Config.Types
  4022  	// match: (PopCount64 x)
  4023  	// result: (MOVBZreg (SumBytes8 (POPCNT <typ.UInt64> x)))
  4024  	for {
  4025  		x := v_0
  4026  		v.reset(OpS390XMOVBZreg)
  4027  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes8, typ.UInt8)
  4028  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt64)
  4029  		v1.AddArg(x)
  4030  		v0.AddArg(v1)
  4031  		v.AddArg(v0)
  4032  		return true
  4033  	}
  4034  }
  4035  func rewriteValueS390X_OpPopCount8(v *Value) bool {
  4036  	v_0 := v.Args[0]
  4037  	b := v.Block
  4038  	typ := &b.Func.Config.Types
  4039  	// match: (PopCount8 x)
  4040  	// result: (POPCNT (MOVBZreg x))
  4041  	for {
  4042  		x := v_0
  4043  		v.reset(OpS390XPOPCNT)
  4044  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4045  		v0.AddArg(x)
  4046  		v.AddArg(v0)
  4047  		return true
  4048  	}
  4049  }
  4050  func rewriteValueS390X_OpRotateLeft16(v *Value) bool {
  4051  	v_1 := v.Args[1]
  4052  	v_0 := v.Args[0]
  4053  	b := v.Block
  4054  	typ := &b.Func.Config.Types
  4055  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
  4056  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
  4057  	for {
  4058  		t := v.Type
  4059  		x := v_0
  4060  		if v_1.Op != OpS390XMOVDconst {
  4061  			break
  4062  		}
  4063  		c := auxIntToInt64(v_1.AuxInt)
  4064  		v.reset(OpOr16)
  4065  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  4066  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4067  		v1.AuxInt = int64ToAuxInt(c & 15)
  4068  		v0.AddArg2(x, v1)
  4069  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  4070  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4071  		v3.AuxInt = int64ToAuxInt(-c & 15)
  4072  		v2.AddArg2(x, v3)
  4073  		v.AddArg2(v0, v2)
  4074  		return true
  4075  	}
  4076  	return false
  4077  }
  4078  func rewriteValueS390X_OpRotateLeft8(v *Value) bool {
  4079  	v_1 := v.Args[1]
  4080  	v_0 := v.Args[0]
  4081  	b := v.Block
  4082  	typ := &b.Func.Config.Types
  4083  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
  4084  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
  4085  	for {
  4086  		t := v.Type
  4087  		x := v_0
  4088  		if v_1.Op != OpS390XMOVDconst {
  4089  			break
  4090  		}
  4091  		c := auxIntToInt64(v_1.AuxInt)
  4092  		v.reset(OpOr8)
  4093  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
  4094  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4095  		v1.AuxInt = int64ToAuxInt(c & 7)
  4096  		v0.AddArg2(x, v1)
  4097  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  4098  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4099  		v3.AuxInt = int64ToAuxInt(-c & 7)
  4100  		v2.AddArg2(x, v3)
  4101  		v.AddArg2(v0, v2)
  4102  		return true
  4103  	}
  4104  	return false
  4105  }
  4106  func rewriteValueS390X_OpRound(v *Value) bool {
  4107  	v_0 := v.Args[0]
  4108  	// match: (Round x)
  4109  	// result: (FIDBR [1] x)
  4110  	for {
  4111  		x := v_0
  4112  		v.reset(OpS390XFIDBR)
  4113  		v.AuxInt = int8ToAuxInt(1)
  4114  		v.AddArg(x)
  4115  		return true
  4116  	}
  4117  }
  4118  func rewriteValueS390X_OpRoundToEven(v *Value) bool {
  4119  	v_0 := v.Args[0]
  4120  	// match: (RoundToEven x)
  4121  	// result: (FIDBR [4] x)
  4122  	for {
  4123  		x := v_0
  4124  		v.reset(OpS390XFIDBR)
  4125  		v.AuxInt = int8ToAuxInt(4)
  4126  		v.AddArg(x)
  4127  		return true
  4128  	}
  4129  }
  4130  func rewriteValueS390X_OpRsh16Ux16(v *Value) bool {
  4131  	v_1 := v.Args[1]
  4132  	v_0 := v.Args[0]
  4133  	b := v.Block
  4134  	typ := &b.Func.Config.Types
  4135  	// match: (Rsh16Ux16 x y)
  4136  	// cond: shiftIsBounded(v)
  4137  	// result: (SRW (MOVHZreg x) y)
  4138  	for {
  4139  		x := v_0
  4140  		y := v_1
  4141  		if !(shiftIsBounded(v)) {
  4142  			break
  4143  		}
  4144  		v.reset(OpS390XSRW)
  4145  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4146  		v0.AddArg(x)
  4147  		v.AddArg2(v0, y)
  4148  		return true
  4149  	}
  4150  	// match: (Rsh16Ux16 <t> x y)
  4151  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4152  	for {
  4153  		t := v.Type
  4154  		x := v_0
  4155  		y := v_1
  4156  		v.reset(OpS390XLOCGR)
  4157  		v.Type = t
  4158  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4159  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4160  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4161  		v1.AddArg(x)
  4162  		v0.AddArg2(v1, y)
  4163  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4164  		v2.AuxInt = int64ToAuxInt(0)
  4165  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4166  		v3.AuxInt = int32ToAuxInt(64)
  4167  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4168  		v4.AddArg(y)
  4169  		v3.AddArg(v4)
  4170  		v.AddArg3(v0, v2, v3)
  4171  		return true
  4172  	}
  4173  }
  4174  func rewriteValueS390X_OpRsh16Ux32(v *Value) bool {
  4175  	v_1 := v.Args[1]
  4176  	v_0 := v.Args[0]
  4177  	b := v.Block
  4178  	typ := &b.Func.Config.Types
  4179  	// match: (Rsh16Ux32 x y)
  4180  	// cond: shiftIsBounded(v)
  4181  	// result: (SRW (MOVHZreg x) y)
  4182  	for {
  4183  		x := v_0
  4184  		y := v_1
  4185  		if !(shiftIsBounded(v)) {
  4186  			break
  4187  		}
  4188  		v.reset(OpS390XSRW)
  4189  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4190  		v0.AddArg(x)
  4191  		v.AddArg2(v0, y)
  4192  		return true
  4193  	}
  4194  	// match: (Rsh16Ux32 <t> x y)
  4195  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4196  	for {
  4197  		t := v.Type
  4198  		x := v_0
  4199  		y := v_1
  4200  		v.reset(OpS390XLOCGR)
  4201  		v.Type = t
  4202  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4203  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4204  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4205  		v1.AddArg(x)
  4206  		v0.AddArg2(v1, y)
  4207  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4208  		v2.AuxInt = int64ToAuxInt(0)
  4209  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4210  		v3.AuxInt = int32ToAuxInt(64)
  4211  		v3.AddArg(y)
  4212  		v.AddArg3(v0, v2, v3)
  4213  		return true
  4214  	}
  4215  }
  4216  func rewriteValueS390X_OpRsh16Ux64(v *Value) bool {
  4217  	v_1 := v.Args[1]
  4218  	v_0 := v.Args[0]
  4219  	b := v.Block
  4220  	typ := &b.Func.Config.Types
  4221  	// match: (Rsh16Ux64 x y)
  4222  	// cond: shiftIsBounded(v)
  4223  	// result: (SRW (MOVHZreg x) y)
  4224  	for {
  4225  		x := v_0
  4226  		y := v_1
  4227  		if !(shiftIsBounded(v)) {
  4228  			break
  4229  		}
  4230  		v.reset(OpS390XSRW)
  4231  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4232  		v0.AddArg(x)
  4233  		v.AddArg2(v0, y)
  4234  		return true
  4235  	}
  4236  	// match: (Rsh16Ux64 <t> x y)
  4237  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  4238  	for {
  4239  		t := v.Type
  4240  		x := v_0
  4241  		y := v_1
  4242  		v.reset(OpS390XLOCGR)
  4243  		v.Type = t
  4244  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4245  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4246  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4247  		v1.AddArg(x)
  4248  		v0.AddArg2(v1, y)
  4249  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4250  		v2.AuxInt = int64ToAuxInt(0)
  4251  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4252  		v3.AuxInt = int32ToAuxInt(64)
  4253  		v3.AddArg(y)
  4254  		v.AddArg3(v0, v2, v3)
  4255  		return true
  4256  	}
  4257  }
  4258  func rewriteValueS390X_OpRsh16Ux8(v *Value) bool {
  4259  	v_1 := v.Args[1]
  4260  	v_0 := v.Args[0]
  4261  	b := v.Block
  4262  	typ := &b.Func.Config.Types
  4263  	// match: (Rsh16Ux8 x y)
  4264  	// cond: shiftIsBounded(v)
  4265  	// result: (SRW (MOVHZreg x) y)
  4266  	for {
  4267  		x := v_0
  4268  		y := v_1
  4269  		if !(shiftIsBounded(v)) {
  4270  			break
  4271  		}
  4272  		v.reset(OpS390XSRW)
  4273  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4274  		v0.AddArg(x)
  4275  		v.AddArg2(v0, y)
  4276  		return true
  4277  	}
  4278  	// match: (Rsh16Ux8 <t> x y)
  4279  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4280  	for {
  4281  		t := v.Type
  4282  		x := v_0
  4283  		y := v_1
  4284  		v.reset(OpS390XLOCGR)
  4285  		v.Type = t
  4286  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4287  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4288  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4289  		v1.AddArg(x)
  4290  		v0.AddArg2(v1, y)
  4291  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4292  		v2.AuxInt = int64ToAuxInt(0)
  4293  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4294  		v3.AuxInt = int32ToAuxInt(64)
  4295  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4296  		v4.AddArg(y)
  4297  		v3.AddArg(v4)
  4298  		v.AddArg3(v0, v2, v3)
  4299  		return true
  4300  	}
  4301  }
  4302  func rewriteValueS390X_OpRsh16x16(v *Value) bool {
  4303  	v_1 := v.Args[1]
  4304  	v_0 := v.Args[0]
  4305  	b := v.Block
  4306  	typ := &b.Func.Config.Types
  4307  	// match: (Rsh16x16 x y)
  4308  	// cond: shiftIsBounded(v)
  4309  	// result: (SRAW (MOVHreg x) y)
  4310  	for {
  4311  		x := v_0
  4312  		y := v_1
  4313  		if !(shiftIsBounded(v)) {
  4314  			break
  4315  		}
  4316  		v.reset(OpS390XSRAW)
  4317  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4318  		v0.AddArg(x)
  4319  		v.AddArg2(v0, y)
  4320  		return true
  4321  	}
  4322  	// match: (Rsh16x16 x y)
  4323  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4324  	for {
  4325  		x := v_0
  4326  		y := v_1
  4327  		v.reset(OpS390XSRAW)
  4328  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4329  		v0.AddArg(x)
  4330  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4331  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4332  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4333  		v2.AuxInt = int64ToAuxInt(63)
  4334  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4335  		v3.AuxInt = int32ToAuxInt(64)
  4336  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4337  		v4.AddArg(y)
  4338  		v3.AddArg(v4)
  4339  		v1.AddArg3(y, v2, v3)
  4340  		v.AddArg2(v0, v1)
  4341  		return true
  4342  	}
  4343  }
  4344  func rewriteValueS390X_OpRsh16x32(v *Value) bool {
  4345  	v_1 := v.Args[1]
  4346  	v_0 := v.Args[0]
  4347  	b := v.Block
  4348  	typ := &b.Func.Config.Types
  4349  	// match: (Rsh16x32 x y)
  4350  	// cond: shiftIsBounded(v)
  4351  	// result: (SRAW (MOVHreg x) y)
  4352  	for {
  4353  		x := v_0
  4354  		y := v_1
  4355  		if !(shiftIsBounded(v)) {
  4356  			break
  4357  		}
  4358  		v.reset(OpS390XSRAW)
  4359  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4360  		v0.AddArg(x)
  4361  		v.AddArg2(v0, y)
  4362  		return true
  4363  	}
  4364  	// match: (Rsh16x32 x y)
  4365  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4366  	for {
  4367  		x := v_0
  4368  		y := v_1
  4369  		v.reset(OpS390XSRAW)
  4370  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4371  		v0.AddArg(x)
  4372  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4373  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4374  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4375  		v2.AuxInt = int64ToAuxInt(63)
  4376  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4377  		v3.AuxInt = int32ToAuxInt(64)
  4378  		v3.AddArg(y)
  4379  		v1.AddArg3(y, v2, v3)
  4380  		v.AddArg2(v0, v1)
  4381  		return true
  4382  	}
  4383  }
  4384  func rewriteValueS390X_OpRsh16x64(v *Value) bool {
  4385  	v_1 := v.Args[1]
  4386  	v_0 := v.Args[0]
  4387  	b := v.Block
  4388  	typ := &b.Func.Config.Types
  4389  	// match: (Rsh16x64 x y)
  4390  	// cond: shiftIsBounded(v)
  4391  	// result: (SRAW (MOVHreg x) y)
  4392  	for {
  4393  		x := v_0
  4394  		y := v_1
  4395  		if !(shiftIsBounded(v)) {
  4396  			break
  4397  		}
  4398  		v.reset(OpS390XSRAW)
  4399  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4400  		v0.AddArg(x)
  4401  		v.AddArg2(v0, y)
  4402  		return true
  4403  	}
  4404  	// match: (Rsh16x64 x y)
  4405  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4406  	for {
  4407  		x := v_0
  4408  		y := v_1
  4409  		v.reset(OpS390XSRAW)
  4410  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4411  		v0.AddArg(x)
  4412  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4413  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4414  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4415  		v2.AuxInt = int64ToAuxInt(63)
  4416  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4417  		v3.AuxInt = int32ToAuxInt(64)
  4418  		v3.AddArg(y)
  4419  		v1.AddArg3(y, v2, v3)
  4420  		v.AddArg2(v0, v1)
  4421  		return true
  4422  	}
  4423  }
  4424  func rewriteValueS390X_OpRsh16x8(v *Value) bool {
  4425  	v_1 := v.Args[1]
  4426  	v_0 := v.Args[0]
  4427  	b := v.Block
  4428  	typ := &b.Func.Config.Types
  4429  	// match: (Rsh16x8 x y)
  4430  	// cond: shiftIsBounded(v)
  4431  	// result: (SRAW (MOVHreg x) y)
  4432  	for {
  4433  		x := v_0
  4434  		y := v_1
  4435  		if !(shiftIsBounded(v)) {
  4436  			break
  4437  		}
  4438  		v.reset(OpS390XSRAW)
  4439  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4440  		v0.AddArg(x)
  4441  		v.AddArg2(v0, y)
  4442  		return true
  4443  	}
  4444  	// match: (Rsh16x8 x y)
  4445  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4446  	for {
  4447  		x := v_0
  4448  		y := v_1
  4449  		v.reset(OpS390XSRAW)
  4450  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4451  		v0.AddArg(x)
  4452  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4453  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4454  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4455  		v2.AuxInt = int64ToAuxInt(63)
  4456  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4457  		v3.AuxInt = int32ToAuxInt(64)
  4458  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4459  		v4.AddArg(y)
  4460  		v3.AddArg(v4)
  4461  		v1.AddArg3(y, v2, v3)
  4462  		v.AddArg2(v0, v1)
  4463  		return true
  4464  	}
  4465  }
  4466  func rewriteValueS390X_OpRsh32Ux16(v *Value) bool {
  4467  	v_1 := v.Args[1]
  4468  	v_0 := v.Args[0]
  4469  	b := v.Block
  4470  	typ := &b.Func.Config.Types
  4471  	// match: (Rsh32Ux16 x y)
  4472  	// cond: shiftIsBounded(v)
  4473  	// result: (SRW x y)
  4474  	for {
  4475  		x := v_0
  4476  		y := v_1
  4477  		if !(shiftIsBounded(v)) {
  4478  			break
  4479  		}
  4480  		v.reset(OpS390XSRW)
  4481  		v.AddArg2(x, y)
  4482  		return true
  4483  	}
  4484  	// match: (Rsh32Ux16 <t> x y)
  4485  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4486  	for {
  4487  		t := v.Type
  4488  		x := v_0
  4489  		y := v_1
  4490  		v.reset(OpS390XLOCGR)
  4491  		v.Type = t
  4492  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4493  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4494  		v0.AddArg2(x, y)
  4495  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4496  		v1.AuxInt = int64ToAuxInt(0)
  4497  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4498  		v2.AuxInt = int32ToAuxInt(64)
  4499  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4500  		v3.AddArg(y)
  4501  		v2.AddArg(v3)
  4502  		v.AddArg3(v0, v1, v2)
  4503  		return true
  4504  	}
  4505  }
  4506  func rewriteValueS390X_OpRsh32Ux32(v *Value) bool {
  4507  	v_1 := v.Args[1]
  4508  	v_0 := v.Args[0]
  4509  	b := v.Block
  4510  	typ := &b.Func.Config.Types
  4511  	// match: (Rsh32Ux32 x y)
  4512  	// cond: shiftIsBounded(v)
  4513  	// result: (SRW x y)
  4514  	for {
  4515  		x := v_0
  4516  		y := v_1
  4517  		if !(shiftIsBounded(v)) {
  4518  			break
  4519  		}
  4520  		v.reset(OpS390XSRW)
  4521  		v.AddArg2(x, y)
  4522  		return true
  4523  	}
  4524  	// match: (Rsh32Ux32 <t> x y)
  4525  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4526  	for {
  4527  		t := v.Type
  4528  		x := v_0
  4529  		y := v_1
  4530  		v.reset(OpS390XLOCGR)
  4531  		v.Type = t
  4532  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4533  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4534  		v0.AddArg2(x, y)
  4535  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4536  		v1.AuxInt = int64ToAuxInt(0)
  4537  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4538  		v2.AuxInt = int32ToAuxInt(64)
  4539  		v2.AddArg(y)
  4540  		v.AddArg3(v0, v1, v2)
  4541  		return true
  4542  	}
  4543  }
  4544  func rewriteValueS390X_OpRsh32Ux64(v *Value) bool {
  4545  	v_1 := v.Args[1]
  4546  	v_0 := v.Args[0]
  4547  	b := v.Block
  4548  	typ := &b.Func.Config.Types
  4549  	// match: (Rsh32Ux64 x y)
  4550  	// cond: shiftIsBounded(v)
  4551  	// result: (SRW x y)
  4552  	for {
  4553  		x := v_0
  4554  		y := v_1
  4555  		if !(shiftIsBounded(v)) {
  4556  			break
  4557  		}
  4558  		v.reset(OpS390XSRW)
  4559  		v.AddArg2(x, y)
  4560  		return true
  4561  	}
  4562  	// match: (Rsh32Ux64 <t> x y)
  4563  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4564  	for {
  4565  		t := v.Type
  4566  		x := v_0
  4567  		y := v_1
  4568  		v.reset(OpS390XLOCGR)
  4569  		v.Type = t
  4570  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4571  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4572  		v0.AddArg2(x, y)
  4573  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4574  		v1.AuxInt = int64ToAuxInt(0)
  4575  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4576  		v2.AuxInt = int32ToAuxInt(64)
  4577  		v2.AddArg(y)
  4578  		v.AddArg3(v0, v1, v2)
  4579  		return true
  4580  	}
  4581  }
  4582  func rewriteValueS390X_OpRsh32Ux8(v *Value) bool {
  4583  	v_1 := v.Args[1]
  4584  	v_0 := v.Args[0]
  4585  	b := v.Block
  4586  	typ := &b.Func.Config.Types
  4587  	// match: (Rsh32Ux8 x y)
  4588  	// cond: shiftIsBounded(v)
  4589  	// result: (SRW x y)
  4590  	for {
  4591  		x := v_0
  4592  		y := v_1
  4593  		if !(shiftIsBounded(v)) {
  4594  			break
  4595  		}
  4596  		v.reset(OpS390XSRW)
  4597  		v.AddArg2(x, y)
  4598  		return true
  4599  	}
  4600  	// match: (Rsh32Ux8 <t> x y)
  4601  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4602  	for {
  4603  		t := v.Type
  4604  		x := v_0
  4605  		y := v_1
  4606  		v.reset(OpS390XLOCGR)
  4607  		v.Type = t
  4608  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4609  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4610  		v0.AddArg2(x, y)
  4611  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4612  		v1.AuxInt = int64ToAuxInt(0)
  4613  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4614  		v2.AuxInt = int32ToAuxInt(64)
  4615  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4616  		v3.AddArg(y)
  4617  		v2.AddArg(v3)
  4618  		v.AddArg3(v0, v1, v2)
  4619  		return true
  4620  	}
  4621  }
  4622  func rewriteValueS390X_OpRsh32x16(v *Value) bool {
  4623  	v_1 := v.Args[1]
  4624  	v_0 := v.Args[0]
  4625  	b := v.Block
  4626  	typ := &b.Func.Config.Types
  4627  	// match: (Rsh32x16 x y)
  4628  	// cond: shiftIsBounded(v)
  4629  	// result: (SRAW x y)
  4630  	for {
  4631  		x := v_0
  4632  		y := v_1
  4633  		if !(shiftIsBounded(v)) {
  4634  			break
  4635  		}
  4636  		v.reset(OpS390XSRAW)
  4637  		v.AddArg2(x, y)
  4638  		return true
  4639  	}
  4640  	// match: (Rsh32x16 x y)
  4641  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4642  	for {
  4643  		x := v_0
  4644  		y := v_1
  4645  		v.reset(OpS390XSRAW)
  4646  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4647  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4648  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4649  		v1.AuxInt = int64ToAuxInt(63)
  4650  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4651  		v2.AuxInt = int32ToAuxInt(64)
  4652  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4653  		v3.AddArg(y)
  4654  		v2.AddArg(v3)
  4655  		v0.AddArg3(y, v1, v2)
  4656  		v.AddArg2(x, v0)
  4657  		return true
  4658  	}
  4659  }
  4660  func rewriteValueS390X_OpRsh32x32(v *Value) bool {
  4661  	v_1 := v.Args[1]
  4662  	v_0 := v.Args[0]
  4663  	b := v.Block
  4664  	// match: (Rsh32x32 x y)
  4665  	// cond: shiftIsBounded(v)
  4666  	// result: (SRAW x y)
  4667  	for {
  4668  		x := v_0
  4669  		y := v_1
  4670  		if !(shiftIsBounded(v)) {
  4671  			break
  4672  		}
  4673  		v.reset(OpS390XSRAW)
  4674  		v.AddArg2(x, y)
  4675  		return true
  4676  	}
  4677  	// match: (Rsh32x32 x y)
  4678  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4679  	for {
  4680  		x := v_0
  4681  		y := v_1
  4682  		v.reset(OpS390XSRAW)
  4683  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4684  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4685  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4686  		v1.AuxInt = int64ToAuxInt(63)
  4687  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4688  		v2.AuxInt = int32ToAuxInt(64)
  4689  		v2.AddArg(y)
  4690  		v0.AddArg3(y, v1, v2)
  4691  		v.AddArg2(x, v0)
  4692  		return true
  4693  	}
  4694  }
  4695  func rewriteValueS390X_OpRsh32x64(v *Value) bool {
  4696  	v_1 := v.Args[1]
  4697  	v_0 := v.Args[0]
  4698  	b := v.Block
  4699  	// match: (Rsh32x64 x y)
  4700  	// cond: shiftIsBounded(v)
  4701  	// result: (SRAW x y)
  4702  	for {
  4703  		x := v_0
  4704  		y := v_1
  4705  		if !(shiftIsBounded(v)) {
  4706  			break
  4707  		}
  4708  		v.reset(OpS390XSRAW)
  4709  		v.AddArg2(x, y)
  4710  		return true
  4711  	}
  4712  	// match: (Rsh32x64 x y)
  4713  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4714  	for {
  4715  		x := v_0
  4716  		y := v_1
  4717  		v.reset(OpS390XSRAW)
  4718  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4719  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4720  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4721  		v1.AuxInt = int64ToAuxInt(63)
  4722  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4723  		v2.AuxInt = int32ToAuxInt(64)
  4724  		v2.AddArg(y)
  4725  		v0.AddArg3(y, v1, v2)
  4726  		v.AddArg2(x, v0)
  4727  		return true
  4728  	}
  4729  }
  4730  func rewriteValueS390X_OpRsh32x8(v *Value) bool {
  4731  	v_1 := v.Args[1]
  4732  	v_0 := v.Args[0]
  4733  	b := v.Block
  4734  	typ := &b.Func.Config.Types
  4735  	// match: (Rsh32x8 x y)
  4736  	// cond: shiftIsBounded(v)
  4737  	// result: (SRAW x y)
  4738  	for {
  4739  		x := v_0
  4740  		y := v_1
  4741  		if !(shiftIsBounded(v)) {
  4742  			break
  4743  		}
  4744  		v.reset(OpS390XSRAW)
  4745  		v.AddArg2(x, y)
  4746  		return true
  4747  	}
  4748  	// match: (Rsh32x8 x y)
  4749  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4750  	for {
  4751  		x := v_0
  4752  		y := v_1
  4753  		v.reset(OpS390XSRAW)
  4754  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4755  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4756  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4757  		v1.AuxInt = int64ToAuxInt(63)
  4758  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4759  		v2.AuxInt = int32ToAuxInt(64)
  4760  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4761  		v3.AddArg(y)
  4762  		v2.AddArg(v3)
  4763  		v0.AddArg3(y, v1, v2)
  4764  		v.AddArg2(x, v0)
  4765  		return true
  4766  	}
  4767  }
  4768  func rewriteValueS390X_OpRsh64Ux16(v *Value) bool {
  4769  	v_1 := v.Args[1]
  4770  	v_0 := v.Args[0]
  4771  	b := v.Block
  4772  	typ := &b.Func.Config.Types
  4773  	// match: (Rsh64Ux16 x y)
  4774  	// cond: shiftIsBounded(v)
  4775  	// result: (SRD x y)
  4776  	for {
  4777  		x := v_0
  4778  		y := v_1
  4779  		if !(shiftIsBounded(v)) {
  4780  			break
  4781  		}
  4782  		v.reset(OpS390XSRD)
  4783  		v.AddArg2(x, y)
  4784  		return true
  4785  	}
  4786  	// match: (Rsh64Ux16 <t> x y)
  4787  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4788  	for {
  4789  		t := v.Type
  4790  		x := v_0
  4791  		y := v_1
  4792  		v.reset(OpS390XLOCGR)
  4793  		v.Type = t
  4794  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4795  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4796  		v0.AddArg2(x, y)
  4797  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4798  		v1.AuxInt = int64ToAuxInt(0)
  4799  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4800  		v2.AuxInt = int32ToAuxInt(64)
  4801  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4802  		v3.AddArg(y)
  4803  		v2.AddArg(v3)
  4804  		v.AddArg3(v0, v1, v2)
  4805  		return true
  4806  	}
  4807  }
  4808  func rewriteValueS390X_OpRsh64Ux32(v *Value) bool {
  4809  	v_1 := v.Args[1]
  4810  	v_0 := v.Args[0]
  4811  	b := v.Block
  4812  	typ := &b.Func.Config.Types
  4813  	// match: (Rsh64Ux32 x y)
  4814  	// cond: shiftIsBounded(v)
  4815  	// result: (SRD x y)
  4816  	for {
  4817  		x := v_0
  4818  		y := v_1
  4819  		if !(shiftIsBounded(v)) {
  4820  			break
  4821  		}
  4822  		v.reset(OpS390XSRD)
  4823  		v.AddArg2(x, y)
  4824  		return true
  4825  	}
  4826  	// match: (Rsh64Ux32 <t> x y)
  4827  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4828  	for {
  4829  		t := v.Type
  4830  		x := v_0
  4831  		y := v_1
  4832  		v.reset(OpS390XLOCGR)
  4833  		v.Type = t
  4834  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4835  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4836  		v0.AddArg2(x, y)
  4837  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4838  		v1.AuxInt = int64ToAuxInt(0)
  4839  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4840  		v2.AuxInt = int32ToAuxInt(64)
  4841  		v2.AddArg(y)
  4842  		v.AddArg3(v0, v1, v2)
  4843  		return true
  4844  	}
  4845  }
  4846  func rewriteValueS390X_OpRsh64Ux64(v *Value) bool {
  4847  	v_1 := v.Args[1]
  4848  	v_0 := v.Args[0]
  4849  	b := v.Block
  4850  	typ := &b.Func.Config.Types
  4851  	// match: (Rsh64Ux64 x y)
  4852  	// cond: shiftIsBounded(v)
  4853  	// result: (SRD x y)
  4854  	for {
  4855  		x := v_0
  4856  		y := v_1
  4857  		if !(shiftIsBounded(v)) {
  4858  			break
  4859  		}
  4860  		v.reset(OpS390XSRD)
  4861  		v.AddArg2(x, y)
  4862  		return true
  4863  	}
  4864  	// match: (Rsh64Ux64 <t> x y)
  4865  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4866  	for {
  4867  		t := v.Type
  4868  		x := v_0
  4869  		y := v_1
  4870  		v.reset(OpS390XLOCGR)
  4871  		v.Type = t
  4872  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4873  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4874  		v0.AddArg2(x, y)
  4875  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4876  		v1.AuxInt = int64ToAuxInt(0)
  4877  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4878  		v2.AuxInt = int32ToAuxInt(64)
  4879  		v2.AddArg(y)
  4880  		v.AddArg3(v0, v1, v2)
  4881  		return true
  4882  	}
  4883  }
  4884  func rewriteValueS390X_OpRsh64Ux8(v *Value) bool {
  4885  	v_1 := v.Args[1]
  4886  	v_0 := v.Args[0]
  4887  	b := v.Block
  4888  	typ := &b.Func.Config.Types
  4889  	// match: (Rsh64Ux8 x y)
  4890  	// cond: shiftIsBounded(v)
  4891  	// result: (SRD x y)
  4892  	for {
  4893  		x := v_0
  4894  		y := v_1
  4895  		if !(shiftIsBounded(v)) {
  4896  			break
  4897  		}
  4898  		v.reset(OpS390XSRD)
  4899  		v.AddArg2(x, y)
  4900  		return true
  4901  	}
  4902  	// match: (Rsh64Ux8 <t> x y)
  4903  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4904  	for {
  4905  		t := v.Type
  4906  		x := v_0
  4907  		y := v_1
  4908  		v.reset(OpS390XLOCGR)
  4909  		v.Type = t
  4910  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4911  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4912  		v0.AddArg2(x, y)
  4913  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4914  		v1.AuxInt = int64ToAuxInt(0)
  4915  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4916  		v2.AuxInt = int32ToAuxInt(64)
  4917  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4918  		v3.AddArg(y)
  4919  		v2.AddArg(v3)
  4920  		v.AddArg3(v0, v1, v2)
  4921  		return true
  4922  	}
  4923  }
  4924  func rewriteValueS390X_OpRsh64x16(v *Value) bool {
  4925  	v_1 := v.Args[1]
  4926  	v_0 := v.Args[0]
  4927  	b := v.Block
  4928  	typ := &b.Func.Config.Types
  4929  	// match: (Rsh64x16 x y)
  4930  	// cond: shiftIsBounded(v)
  4931  	// result: (SRAD x y)
  4932  	for {
  4933  		x := v_0
  4934  		y := v_1
  4935  		if !(shiftIsBounded(v)) {
  4936  			break
  4937  		}
  4938  		v.reset(OpS390XSRAD)
  4939  		v.AddArg2(x, y)
  4940  		return true
  4941  	}
  4942  	// match: (Rsh64x16 x y)
  4943  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4944  	for {
  4945  		x := v_0
  4946  		y := v_1
  4947  		v.reset(OpS390XSRAD)
  4948  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4949  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4950  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4951  		v1.AuxInt = int64ToAuxInt(63)
  4952  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4953  		v2.AuxInt = int32ToAuxInt(64)
  4954  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4955  		v3.AddArg(y)
  4956  		v2.AddArg(v3)
  4957  		v0.AddArg3(y, v1, v2)
  4958  		v.AddArg2(x, v0)
  4959  		return true
  4960  	}
  4961  }
  4962  func rewriteValueS390X_OpRsh64x32(v *Value) bool {
  4963  	v_1 := v.Args[1]
  4964  	v_0 := v.Args[0]
  4965  	b := v.Block
  4966  	// match: (Rsh64x32 x y)
  4967  	// cond: shiftIsBounded(v)
  4968  	// result: (SRAD x y)
  4969  	for {
  4970  		x := v_0
  4971  		y := v_1
  4972  		if !(shiftIsBounded(v)) {
  4973  			break
  4974  		}
  4975  		v.reset(OpS390XSRAD)
  4976  		v.AddArg2(x, y)
  4977  		return true
  4978  	}
  4979  	// match: (Rsh64x32 x y)
  4980  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4981  	for {
  4982  		x := v_0
  4983  		y := v_1
  4984  		v.reset(OpS390XSRAD)
  4985  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4986  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4987  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4988  		v1.AuxInt = int64ToAuxInt(63)
  4989  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4990  		v2.AuxInt = int32ToAuxInt(64)
  4991  		v2.AddArg(y)
  4992  		v0.AddArg3(y, v1, v2)
  4993  		v.AddArg2(x, v0)
  4994  		return true
  4995  	}
  4996  }
  4997  func rewriteValueS390X_OpRsh64x64(v *Value) bool {
  4998  	v_1 := v.Args[1]
  4999  	v_0 := v.Args[0]
  5000  	b := v.Block
  5001  	// match: (Rsh64x64 x y)
  5002  	// cond: shiftIsBounded(v)
  5003  	// result: (SRAD x y)
  5004  	for {
  5005  		x := v_0
  5006  		y := v_1
  5007  		if !(shiftIsBounded(v)) {
  5008  			break
  5009  		}
  5010  		v.reset(OpS390XSRAD)
  5011  		v.AddArg2(x, y)
  5012  		return true
  5013  	}
  5014  	// match: (Rsh64x64 x y)
  5015  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5016  	for {
  5017  		x := v_0
  5018  		y := v_1
  5019  		v.reset(OpS390XSRAD)
  5020  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5021  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5022  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5023  		v1.AuxInt = int64ToAuxInt(63)
  5024  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5025  		v2.AuxInt = int32ToAuxInt(64)
  5026  		v2.AddArg(y)
  5027  		v0.AddArg3(y, v1, v2)
  5028  		v.AddArg2(x, v0)
  5029  		return true
  5030  	}
  5031  }
  5032  func rewriteValueS390X_OpRsh64x8(v *Value) bool {
  5033  	v_1 := v.Args[1]
  5034  	v_0 := v.Args[0]
  5035  	b := v.Block
  5036  	typ := &b.Func.Config.Types
  5037  	// match: (Rsh64x8 x y)
  5038  	// cond: shiftIsBounded(v)
  5039  	// result: (SRAD x y)
  5040  	for {
  5041  		x := v_0
  5042  		y := v_1
  5043  		if !(shiftIsBounded(v)) {
  5044  			break
  5045  		}
  5046  		v.reset(OpS390XSRAD)
  5047  		v.AddArg2(x, y)
  5048  		return true
  5049  	}
  5050  	// match: (Rsh64x8 x y)
  5051  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5052  	for {
  5053  		x := v_0
  5054  		y := v_1
  5055  		v.reset(OpS390XSRAD)
  5056  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5057  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5058  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5059  		v1.AuxInt = int64ToAuxInt(63)
  5060  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5061  		v2.AuxInt = int32ToAuxInt(64)
  5062  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5063  		v3.AddArg(y)
  5064  		v2.AddArg(v3)
  5065  		v0.AddArg3(y, v1, v2)
  5066  		v.AddArg2(x, v0)
  5067  		return true
  5068  	}
  5069  }
  5070  func rewriteValueS390X_OpRsh8Ux16(v *Value) bool {
  5071  	v_1 := v.Args[1]
  5072  	v_0 := v.Args[0]
  5073  	b := v.Block
  5074  	typ := &b.Func.Config.Types
  5075  	// match: (Rsh8Ux16 x y)
  5076  	// cond: shiftIsBounded(v)
  5077  	// result: (SRW (MOVBZreg x) y)
  5078  	for {
  5079  		x := v_0
  5080  		y := v_1
  5081  		if !(shiftIsBounded(v)) {
  5082  			break
  5083  		}
  5084  		v.reset(OpS390XSRW)
  5085  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5086  		v0.AddArg(x)
  5087  		v.AddArg2(v0, y)
  5088  		return true
  5089  	}
  5090  	// match: (Rsh8Ux16 <t> x y)
  5091  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  5092  	for {
  5093  		t := v.Type
  5094  		x := v_0
  5095  		y := v_1
  5096  		v.reset(OpS390XLOCGR)
  5097  		v.Type = t
  5098  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5099  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5100  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5101  		v1.AddArg(x)
  5102  		v0.AddArg2(v1, y)
  5103  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5104  		v2.AuxInt = int64ToAuxInt(0)
  5105  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5106  		v3.AuxInt = int32ToAuxInt(64)
  5107  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  5108  		v4.AddArg(y)
  5109  		v3.AddArg(v4)
  5110  		v.AddArg3(v0, v2, v3)
  5111  		return true
  5112  	}
  5113  }
  5114  func rewriteValueS390X_OpRsh8Ux32(v *Value) bool {
  5115  	v_1 := v.Args[1]
  5116  	v_0 := v.Args[0]
  5117  	b := v.Block
  5118  	typ := &b.Func.Config.Types
  5119  	// match: (Rsh8Ux32 x y)
  5120  	// cond: shiftIsBounded(v)
  5121  	// result: (SRW (MOVBZreg x) y)
  5122  	for {
  5123  		x := v_0
  5124  		y := v_1
  5125  		if !(shiftIsBounded(v)) {
  5126  			break
  5127  		}
  5128  		v.reset(OpS390XSRW)
  5129  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5130  		v0.AddArg(x)
  5131  		v.AddArg2(v0, y)
  5132  		return true
  5133  	}
  5134  	// match: (Rsh8Ux32 <t> x y)
  5135  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  5136  	for {
  5137  		t := v.Type
  5138  		x := v_0
  5139  		y := v_1
  5140  		v.reset(OpS390XLOCGR)
  5141  		v.Type = t
  5142  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5143  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5144  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5145  		v1.AddArg(x)
  5146  		v0.AddArg2(v1, y)
  5147  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5148  		v2.AuxInt = int64ToAuxInt(0)
  5149  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5150  		v3.AuxInt = int32ToAuxInt(64)
  5151  		v3.AddArg(y)
  5152  		v.AddArg3(v0, v2, v3)
  5153  		return true
  5154  	}
  5155  }
  5156  func rewriteValueS390X_OpRsh8Ux64(v *Value) bool {
  5157  	v_1 := v.Args[1]
  5158  	v_0 := v.Args[0]
  5159  	b := v.Block
  5160  	typ := &b.Func.Config.Types
  5161  	// match: (Rsh8Ux64 x y)
  5162  	// cond: shiftIsBounded(v)
  5163  	// result: (SRW (MOVBZreg x) y)
  5164  	for {
  5165  		x := v_0
  5166  		y := v_1
  5167  		if !(shiftIsBounded(v)) {
  5168  			break
  5169  		}
  5170  		v.reset(OpS390XSRW)
  5171  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5172  		v0.AddArg(x)
  5173  		v.AddArg2(v0, y)
  5174  		return true
  5175  	}
  5176  	// match: (Rsh8Ux64 <t> x y)
  5177  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  5178  	for {
  5179  		t := v.Type
  5180  		x := v_0
  5181  		y := v_1
  5182  		v.reset(OpS390XLOCGR)
  5183  		v.Type = t
  5184  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5185  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5186  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5187  		v1.AddArg(x)
  5188  		v0.AddArg2(v1, y)
  5189  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5190  		v2.AuxInt = int64ToAuxInt(0)
  5191  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5192  		v3.AuxInt = int32ToAuxInt(64)
  5193  		v3.AddArg(y)
  5194  		v.AddArg3(v0, v2, v3)
  5195  		return true
  5196  	}
  5197  }
  5198  func rewriteValueS390X_OpRsh8Ux8(v *Value) bool {
  5199  	v_1 := v.Args[1]
  5200  	v_0 := v.Args[0]
  5201  	b := v.Block
  5202  	typ := &b.Func.Config.Types
  5203  	// match: (Rsh8Ux8 x y)
  5204  	// cond: shiftIsBounded(v)
  5205  	// result: (SRW (MOVBZreg x) y)
  5206  	for {
  5207  		x := v_0
  5208  		y := v_1
  5209  		if !(shiftIsBounded(v)) {
  5210  			break
  5211  		}
  5212  		v.reset(OpS390XSRW)
  5213  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5214  		v0.AddArg(x)
  5215  		v.AddArg2(v0, y)
  5216  		return true
  5217  	}
  5218  	// match: (Rsh8Ux8 <t> x y)
  5219  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  5220  	for {
  5221  		t := v.Type
  5222  		x := v_0
  5223  		y := v_1
  5224  		v.reset(OpS390XLOCGR)
  5225  		v.Type = t
  5226  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5227  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5228  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5229  		v1.AddArg(x)
  5230  		v0.AddArg2(v1, y)
  5231  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5232  		v2.AuxInt = int64ToAuxInt(0)
  5233  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5234  		v3.AuxInt = int32ToAuxInt(64)
  5235  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5236  		v4.AddArg(y)
  5237  		v3.AddArg(v4)
  5238  		v.AddArg3(v0, v2, v3)
  5239  		return true
  5240  	}
  5241  }
  5242  func rewriteValueS390X_OpRsh8x16(v *Value) bool {
  5243  	v_1 := v.Args[1]
  5244  	v_0 := v.Args[0]
  5245  	b := v.Block
  5246  	typ := &b.Func.Config.Types
  5247  	// match: (Rsh8x16 x y)
  5248  	// cond: shiftIsBounded(v)
  5249  	// result: (SRAW (MOVBreg x) y)
  5250  	for {
  5251  		x := v_0
  5252  		y := v_1
  5253  		if !(shiftIsBounded(v)) {
  5254  			break
  5255  		}
  5256  		v.reset(OpS390XSRAW)
  5257  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5258  		v0.AddArg(x)
  5259  		v.AddArg2(v0, y)
  5260  		return true
  5261  	}
  5262  	// match: (Rsh8x16 x y)
  5263  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  5264  	for {
  5265  		x := v_0
  5266  		y := v_1
  5267  		v.reset(OpS390XSRAW)
  5268  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5269  		v0.AddArg(x)
  5270  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5271  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5272  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5273  		v2.AuxInt = int64ToAuxInt(63)
  5274  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5275  		v3.AuxInt = int32ToAuxInt(64)
  5276  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  5277  		v4.AddArg(y)
  5278  		v3.AddArg(v4)
  5279  		v1.AddArg3(y, v2, v3)
  5280  		v.AddArg2(v0, v1)
  5281  		return true
  5282  	}
  5283  }
  5284  func rewriteValueS390X_OpRsh8x32(v *Value) bool {
  5285  	v_1 := v.Args[1]
  5286  	v_0 := v.Args[0]
  5287  	b := v.Block
  5288  	typ := &b.Func.Config.Types
  5289  	// match: (Rsh8x32 x y)
  5290  	// cond: shiftIsBounded(v)
  5291  	// result: (SRAW (MOVBreg x) y)
  5292  	for {
  5293  		x := v_0
  5294  		y := v_1
  5295  		if !(shiftIsBounded(v)) {
  5296  			break
  5297  		}
  5298  		v.reset(OpS390XSRAW)
  5299  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5300  		v0.AddArg(x)
  5301  		v.AddArg2(v0, y)
  5302  		return true
  5303  	}
  5304  	// match: (Rsh8x32 x y)
  5305  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  5306  	for {
  5307  		x := v_0
  5308  		y := v_1
  5309  		v.reset(OpS390XSRAW)
  5310  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5311  		v0.AddArg(x)
  5312  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5313  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5314  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5315  		v2.AuxInt = int64ToAuxInt(63)
  5316  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5317  		v3.AuxInt = int32ToAuxInt(64)
  5318  		v3.AddArg(y)
  5319  		v1.AddArg3(y, v2, v3)
  5320  		v.AddArg2(v0, v1)
  5321  		return true
  5322  	}
  5323  }
  5324  func rewriteValueS390X_OpRsh8x64(v *Value) bool {
  5325  	v_1 := v.Args[1]
  5326  	v_0 := v.Args[0]
  5327  	b := v.Block
  5328  	typ := &b.Func.Config.Types
  5329  	// match: (Rsh8x64 x y)
  5330  	// cond: shiftIsBounded(v)
  5331  	// result: (SRAW (MOVBreg x) y)
  5332  	for {
  5333  		x := v_0
  5334  		y := v_1
  5335  		if !(shiftIsBounded(v)) {
  5336  			break
  5337  		}
  5338  		v.reset(OpS390XSRAW)
  5339  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5340  		v0.AddArg(x)
  5341  		v.AddArg2(v0, y)
  5342  		return true
  5343  	}
  5344  	// match: (Rsh8x64 x y)
  5345  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5346  	for {
  5347  		x := v_0
  5348  		y := v_1
  5349  		v.reset(OpS390XSRAW)
  5350  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5351  		v0.AddArg(x)
  5352  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5353  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5354  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5355  		v2.AuxInt = int64ToAuxInt(63)
  5356  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5357  		v3.AuxInt = int32ToAuxInt(64)
  5358  		v3.AddArg(y)
  5359  		v1.AddArg3(y, v2, v3)
  5360  		v.AddArg2(v0, v1)
  5361  		return true
  5362  	}
  5363  }
  5364  func rewriteValueS390X_OpRsh8x8(v *Value) bool {
  5365  	v_1 := v.Args[1]
  5366  	v_0 := v.Args[0]
  5367  	b := v.Block
  5368  	typ := &b.Func.Config.Types
  5369  	// match: (Rsh8x8 x y)
  5370  	// cond: shiftIsBounded(v)
  5371  	// result: (SRAW (MOVBreg x) y)
  5372  	for {
  5373  		x := v_0
  5374  		y := v_1
  5375  		if !(shiftIsBounded(v)) {
  5376  			break
  5377  		}
  5378  		v.reset(OpS390XSRAW)
  5379  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5380  		v0.AddArg(x)
  5381  		v.AddArg2(v0, y)
  5382  		return true
  5383  	}
  5384  	// match: (Rsh8x8 x y)
  5385  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5386  	for {
  5387  		x := v_0
  5388  		y := v_1
  5389  		v.reset(OpS390XSRAW)
  5390  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5391  		v0.AddArg(x)
  5392  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5393  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5394  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5395  		v2.AuxInt = int64ToAuxInt(63)
  5396  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5397  		v3.AuxInt = int32ToAuxInt(64)
  5398  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5399  		v4.AddArg(y)
  5400  		v3.AddArg(v4)
  5401  		v1.AddArg3(y, v2, v3)
  5402  		v.AddArg2(v0, v1)
  5403  		return true
  5404  	}
  5405  }
  5406  func rewriteValueS390X_OpS390XADD(v *Value) bool {
  5407  	v_1 := v.Args[1]
  5408  	v_0 := v.Args[0]
  5409  	// match: (ADD x (MOVDconst <t> [c]))
  5410  	// cond: is32Bit(c) && !t.IsPtr()
  5411  	// result: (ADDconst [int32(c)] x)
  5412  	for {
  5413  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5414  			x := v_0
  5415  			if v_1.Op != OpS390XMOVDconst {
  5416  				continue
  5417  			}
  5418  			t := v_1.Type
  5419  			c := auxIntToInt64(v_1.AuxInt)
  5420  			if !(is32Bit(c) && !t.IsPtr()) {
  5421  				continue
  5422  			}
  5423  			v.reset(OpS390XADDconst)
  5424  			v.AuxInt = int32ToAuxInt(int32(c))
  5425  			v.AddArg(x)
  5426  			return true
  5427  		}
  5428  		break
  5429  	}
  5430  	// match: (ADD idx (MOVDaddr [c] {s} ptr))
  5431  	// cond: ptr.Op != OpSB
  5432  	// result: (MOVDaddridx [c] {s} ptr idx)
  5433  	for {
  5434  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5435  			idx := v_0
  5436  			if v_1.Op != OpS390XMOVDaddr {
  5437  				continue
  5438  			}
  5439  			c := auxIntToInt32(v_1.AuxInt)
  5440  			s := auxToSym(v_1.Aux)
  5441  			ptr := v_1.Args[0]
  5442  			if !(ptr.Op != OpSB) {
  5443  				continue
  5444  			}
  5445  			v.reset(OpS390XMOVDaddridx)
  5446  			v.AuxInt = int32ToAuxInt(c)
  5447  			v.Aux = symToAux(s)
  5448  			v.AddArg2(ptr, idx)
  5449  			return true
  5450  		}
  5451  		break
  5452  	}
  5453  	// match: (ADD x (NEG y))
  5454  	// result: (SUB x y)
  5455  	for {
  5456  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5457  			x := v_0
  5458  			if v_1.Op != OpS390XNEG {
  5459  				continue
  5460  			}
  5461  			y := v_1.Args[0]
  5462  			v.reset(OpS390XSUB)
  5463  			v.AddArg2(x, y)
  5464  			return true
  5465  		}
  5466  		break
  5467  	}
  5468  	// match: (ADD <t> x g:(MOVDload [off] {sym} ptr mem))
  5469  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5470  	// result: (ADDload <t> [off] {sym} x ptr mem)
  5471  	for {
  5472  		t := v.Type
  5473  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5474  			x := v_0
  5475  			g := v_1
  5476  			if g.Op != OpS390XMOVDload {
  5477  				continue
  5478  			}
  5479  			off := auxIntToInt32(g.AuxInt)
  5480  			sym := auxToSym(g.Aux)
  5481  			mem := g.Args[1]
  5482  			ptr := g.Args[0]
  5483  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5484  				continue
  5485  			}
  5486  			v.reset(OpS390XADDload)
  5487  			v.Type = t
  5488  			v.AuxInt = int32ToAuxInt(off)
  5489  			v.Aux = symToAux(sym)
  5490  			v.AddArg3(x, ptr, mem)
  5491  			return true
  5492  		}
  5493  		break
  5494  	}
  5495  	return false
  5496  }
  5497  func rewriteValueS390X_OpS390XADDC(v *Value) bool {
  5498  	v_1 := v.Args[1]
  5499  	v_0 := v.Args[0]
  5500  	// match: (ADDC x (MOVDconst [c]))
  5501  	// cond: is16Bit(c)
  5502  	// result: (ADDCconst x [int16(c)])
  5503  	for {
  5504  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5505  			x := v_0
  5506  			if v_1.Op != OpS390XMOVDconst {
  5507  				continue
  5508  			}
  5509  			c := auxIntToInt64(v_1.AuxInt)
  5510  			if !(is16Bit(c)) {
  5511  				continue
  5512  			}
  5513  			v.reset(OpS390XADDCconst)
  5514  			v.AuxInt = int16ToAuxInt(int16(c))
  5515  			v.AddArg(x)
  5516  			return true
  5517  		}
  5518  		break
  5519  	}
  5520  	return false
  5521  }
  5522  func rewriteValueS390X_OpS390XADDE(v *Value) bool {
  5523  	v_2 := v.Args[2]
  5524  	v_1 := v.Args[1]
  5525  	v_0 := v.Args[0]
  5526  	// match: (ADDE x y (FlagEQ))
  5527  	// result: (ADDC x y)
  5528  	for {
  5529  		x := v_0
  5530  		y := v_1
  5531  		if v_2.Op != OpS390XFlagEQ {
  5532  			break
  5533  		}
  5534  		v.reset(OpS390XADDC)
  5535  		v.AddArg2(x, y)
  5536  		return true
  5537  	}
  5538  	// match: (ADDE x y (FlagLT))
  5539  	// result: (ADDC x y)
  5540  	for {
  5541  		x := v_0
  5542  		y := v_1
  5543  		if v_2.Op != OpS390XFlagLT {
  5544  			break
  5545  		}
  5546  		v.reset(OpS390XADDC)
  5547  		v.AddArg2(x, y)
  5548  		return true
  5549  	}
  5550  	// match: (ADDE x y (Select1 (ADDCconst [-1] (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) c)))))
  5551  	// result: (ADDE x y c)
  5552  	for {
  5553  		x := v_0
  5554  		y := v_1
  5555  		if v_2.Op != OpSelect1 {
  5556  			break
  5557  		}
  5558  		v_2_0 := v_2.Args[0]
  5559  		if v_2_0.Op != OpS390XADDCconst || auxIntToInt16(v_2_0.AuxInt) != -1 {
  5560  			break
  5561  		}
  5562  		v_2_0_0 := v_2_0.Args[0]
  5563  		if v_2_0_0.Op != OpSelect0 {
  5564  			break
  5565  		}
  5566  		v_2_0_0_0 := v_2_0_0.Args[0]
  5567  		if v_2_0_0_0.Op != OpS390XADDE {
  5568  			break
  5569  		}
  5570  		c := v_2_0_0_0.Args[2]
  5571  		v_2_0_0_0_0 := v_2_0_0_0.Args[0]
  5572  		if v_2_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_0.AuxInt) != 0 {
  5573  			break
  5574  		}
  5575  		v_2_0_0_0_1 := v_2_0_0_0.Args[1]
  5576  		if v_2_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_1.AuxInt) != 0 {
  5577  			break
  5578  		}
  5579  		v.reset(OpS390XADDE)
  5580  		v.AddArg3(x, y, c)
  5581  		return true
  5582  	}
  5583  	return false
  5584  }
  5585  func rewriteValueS390X_OpS390XADDW(v *Value) bool {
  5586  	v_1 := v.Args[1]
  5587  	v_0 := v.Args[0]
  5588  	// match: (ADDW x (MOVDconst [c]))
  5589  	// result: (ADDWconst [int32(c)] x)
  5590  	for {
  5591  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5592  			x := v_0
  5593  			if v_1.Op != OpS390XMOVDconst {
  5594  				continue
  5595  			}
  5596  			c := auxIntToInt64(v_1.AuxInt)
  5597  			v.reset(OpS390XADDWconst)
  5598  			v.AuxInt = int32ToAuxInt(int32(c))
  5599  			v.AddArg(x)
  5600  			return true
  5601  		}
  5602  		break
  5603  	}
  5604  	// match: (ADDW x (NEGW y))
  5605  	// result: (SUBW x y)
  5606  	for {
  5607  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5608  			x := v_0
  5609  			if v_1.Op != OpS390XNEGW {
  5610  				continue
  5611  			}
  5612  			y := v_1.Args[0]
  5613  			v.reset(OpS390XSUBW)
  5614  			v.AddArg2(x, y)
  5615  			return true
  5616  		}
  5617  		break
  5618  	}
  5619  	// match: (ADDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5620  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5621  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5622  	for {
  5623  		t := v.Type
  5624  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5625  			x := v_0
  5626  			g := v_1
  5627  			if g.Op != OpS390XMOVWload {
  5628  				continue
  5629  			}
  5630  			off := auxIntToInt32(g.AuxInt)
  5631  			sym := auxToSym(g.Aux)
  5632  			mem := g.Args[1]
  5633  			ptr := g.Args[0]
  5634  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5635  				continue
  5636  			}
  5637  			v.reset(OpS390XADDWload)
  5638  			v.Type = t
  5639  			v.AuxInt = int32ToAuxInt(off)
  5640  			v.Aux = symToAux(sym)
  5641  			v.AddArg3(x, ptr, mem)
  5642  			return true
  5643  		}
  5644  		break
  5645  	}
  5646  	// match: (ADDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  5647  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5648  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5649  	for {
  5650  		t := v.Type
  5651  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5652  			x := v_0
  5653  			g := v_1
  5654  			if g.Op != OpS390XMOVWZload {
  5655  				continue
  5656  			}
  5657  			off := auxIntToInt32(g.AuxInt)
  5658  			sym := auxToSym(g.Aux)
  5659  			mem := g.Args[1]
  5660  			ptr := g.Args[0]
  5661  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5662  				continue
  5663  			}
  5664  			v.reset(OpS390XADDWload)
  5665  			v.Type = t
  5666  			v.AuxInt = int32ToAuxInt(off)
  5667  			v.Aux = symToAux(sym)
  5668  			v.AddArg3(x, ptr, mem)
  5669  			return true
  5670  		}
  5671  		break
  5672  	}
  5673  	return false
  5674  }
  5675  func rewriteValueS390X_OpS390XADDWconst(v *Value) bool {
  5676  	v_0 := v.Args[0]
  5677  	// match: (ADDWconst [c] x)
  5678  	// cond: int32(c)==0
  5679  	// result: x
  5680  	for {
  5681  		c := auxIntToInt32(v.AuxInt)
  5682  		x := v_0
  5683  		if !(int32(c) == 0) {
  5684  			break
  5685  		}
  5686  		v.copyOf(x)
  5687  		return true
  5688  	}
  5689  	// match: (ADDWconst [c] (MOVDconst [d]))
  5690  	// result: (MOVDconst [int64(c)+d])
  5691  	for {
  5692  		c := auxIntToInt32(v.AuxInt)
  5693  		if v_0.Op != OpS390XMOVDconst {
  5694  			break
  5695  		}
  5696  		d := auxIntToInt64(v_0.AuxInt)
  5697  		v.reset(OpS390XMOVDconst)
  5698  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5699  		return true
  5700  	}
  5701  	// match: (ADDWconst [c] (ADDWconst [d] x))
  5702  	// result: (ADDWconst [int32(c+d)] x)
  5703  	for {
  5704  		c := auxIntToInt32(v.AuxInt)
  5705  		if v_0.Op != OpS390XADDWconst {
  5706  			break
  5707  		}
  5708  		d := auxIntToInt32(v_0.AuxInt)
  5709  		x := v_0.Args[0]
  5710  		v.reset(OpS390XADDWconst)
  5711  		v.AuxInt = int32ToAuxInt(int32(c + d))
  5712  		v.AddArg(x)
  5713  		return true
  5714  	}
  5715  	return false
  5716  }
  5717  func rewriteValueS390X_OpS390XADDWload(v *Value) bool {
  5718  	v_2 := v.Args[2]
  5719  	v_1 := v.Args[1]
  5720  	v_0 := v.Args[0]
  5721  	// match: (ADDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5722  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5723  	// result: (ADDWload [off1+off2] {sym} x ptr mem)
  5724  	for {
  5725  		off1 := auxIntToInt32(v.AuxInt)
  5726  		sym := auxToSym(v.Aux)
  5727  		x := v_0
  5728  		if v_1.Op != OpS390XADDconst {
  5729  			break
  5730  		}
  5731  		off2 := auxIntToInt32(v_1.AuxInt)
  5732  		ptr := v_1.Args[0]
  5733  		mem := v_2
  5734  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5735  			break
  5736  		}
  5737  		v.reset(OpS390XADDWload)
  5738  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5739  		v.Aux = symToAux(sym)
  5740  		v.AddArg3(x, ptr, mem)
  5741  		return true
  5742  	}
  5743  	// match: (ADDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5744  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5745  	// result: (ADDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5746  	for {
  5747  		o1 := auxIntToInt32(v.AuxInt)
  5748  		s1 := auxToSym(v.Aux)
  5749  		x := v_0
  5750  		if v_1.Op != OpS390XMOVDaddr {
  5751  			break
  5752  		}
  5753  		o2 := auxIntToInt32(v_1.AuxInt)
  5754  		s2 := auxToSym(v_1.Aux)
  5755  		ptr := v_1.Args[0]
  5756  		mem := v_2
  5757  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5758  			break
  5759  		}
  5760  		v.reset(OpS390XADDWload)
  5761  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5762  		v.Aux = symToAux(mergeSym(s1, s2))
  5763  		v.AddArg3(x, ptr, mem)
  5764  		return true
  5765  	}
  5766  	return false
  5767  }
  5768  func rewriteValueS390X_OpS390XADDconst(v *Value) bool {
  5769  	v_0 := v.Args[0]
  5770  	// match: (ADDconst [c] (MOVDaddr [d] {s} x:(SB)))
  5771  	// cond: ((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))
  5772  	// result: (MOVDaddr [c+d] {s} x)
  5773  	for {
  5774  		c := auxIntToInt32(v.AuxInt)
  5775  		if v_0.Op != OpS390XMOVDaddr {
  5776  			break
  5777  		}
  5778  		d := auxIntToInt32(v_0.AuxInt)
  5779  		s := auxToSym(v_0.Aux)
  5780  		x := v_0.Args[0]
  5781  		if x.Op != OpSB || !(((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))) {
  5782  			break
  5783  		}
  5784  		v.reset(OpS390XMOVDaddr)
  5785  		v.AuxInt = int32ToAuxInt(c + d)
  5786  		v.Aux = symToAux(s)
  5787  		v.AddArg(x)
  5788  		return true
  5789  	}
  5790  	// match: (ADDconst [c] (MOVDaddr [d] {s} x))
  5791  	// cond: x.Op != OpSB && is20Bit(int64(c)+int64(d))
  5792  	// result: (MOVDaddr [c+d] {s} x)
  5793  	for {
  5794  		c := auxIntToInt32(v.AuxInt)
  5795  		if v_0.Op != OpS390XMOVDaddr {
  5796  			break
  5797  		}
  5798  		d := auxIntToInt32(v_0.AuxInt)
  5799  		s := auxToSym(v_0.Aux)
  5800  		x := v_0.Args[0]
  5801  		if !(x.Op != OpSB && is20Bit(int64(c)+int64(d))) {
  5802  			break
  5803  		}
  5804  		v.reset(OpS390XMOVDaddr)
  5805  		v.AuxInt = int32ToAuxInt(c + d)
  5806  		v.Aux = symToAux(s)
  5807  		v.AddArg(x)
  5808  		return true
  5809  	}
  5810  	// match: (ADDconst [c] (MOVDaddridx [d] {s} x y))
  5811  	// cond: is20Bit(int64(c)+int64(d))
  5812  	// result: (MOVDaddridx [c+d] {s} x y)
  5813  	for {
  5814  		c := auxIntToInt32(v.AuxInt)
  5815  		if v_0.Op != OpS390XMOVDaddridx {
  5816  			break
  5817  		}
  5818  		d := auxIntToInt32(v_0.AuxInt)
  5819  		s := auxToSym(v_0.Aux)
  5820  		y := v_0.Args[1]
  5821  		x := v_0.Args[0]
  5822  		if !(is20Bit(int64(c) + int64(d))) {
  5823  			break
  5824  		}
  5825  		v.reset(OpS390XMOVDaddridx)
  5826  		v.AuxInt = int32ToAuxInt(c + d)
  5827  		v.Aux = symToAux(s)
  5828  		v.AddArg2(x, y)
  5829  		return true
  5830  	}
  5831  	// match: (ADDconst [0] x)
  5832  	// result: x
  5833  	for {
  5834  		if auxIntToInt32(v.AuxInt) != 0 {
  5835  			break
  5836  		}
  5837  		x := v_0
  5838  		v.copyOf(x)
  5839  		return true
  5840  	}
  5841  	// match: (ADDconst [c] (MOVDconst [d]))
  5842  	// result: (MOVDconst [int64(c)+d])
  5843  	for {
  5844  		c := auxIntToInt32(v.AuxInt)
  5845  		if v_0.Op != OpS390XMOVDconst {
  5846  			break
  5847  		}
  5848  		d := auxIntToInt64(v_0.AuxInt)
  5849  		v.reset(OpS390XMOVDconst)
  5850  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5851  		return true
  5852  	}
  5853  	// match: (ADDconst [c] (ADDconst [d] x))
  5854  	// cond: is32Bit(int64(c)+int64(d))
  5855  	// result: (ADDconst [c+d] x)
  5856  	for {
  5857  		c := auxIntToInt32(v.AuxInt)
  5858  		if v_0.Op != OpS390XADDconst {
  5859  			break
  5860  		}
  5861  		d := auxIntToInt32(v_0.AuxInt)
  5862  		x := v_0.Args[0]
  5863  		if !(is32Bit(int64(c) + int64(d))) {
  5864  			break
  5865  		}
  5866  		v.reset(OpS390XADDconst)
  5867  		v.AuxInt = int32ToAuxInt(c + d)
  5868  		v.AddArg(x)
  5869  		return true
  5870  	}
  5871  	return false
  5872  }
  5873  func rewriteValueS390X_OpS390XADDload(v *Value) bool {
  5874  	v_2 := v.Args[2]
  5875  	v_1 := v.Args[1]
  5876  	v_0 := v.Args[0]
  5877  	b := v.Block
  5878  	// match: (ADDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  5879  	// cond: isSamePtr(ptr1, ptr2)
  5880  	// result: (ADD x (LGDR <t> y))
  5881  	for {
  5882  		t := v.Type
  5883  		off := auxIntToInt32(v.AuxInt)
  5884  		sym := auxToSym(v.Aux)
  5885  		x := v_0
  5886  		ptr1 := v_1
  5887  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  5888  			break
  5889  		}
  5890  		y := v_2.Args[1]
  5891  		ptr2 := v_2.Args[0]
  5892  		if !(isSamePtr(ptr1, ptr2)) {
  5893  			break
  5894  		}
  5895  		v.reset(OpS390XADD)
  5896  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  5897  		v0.AddArg(y)
  5898  		v.AddArg2(x, v0)
  5899  		return true
  5900  	}
  5901  	// match: (ADDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5902  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5903  	// result: (ADDload [off1+off2] {sym} x ptr mem)
  5904  	for {
  5905  		off1 := auxIntToInt32(v.AuxInt)
  5906  		sym := auxToSym(v.Aux)
  5907  		x := v_0
  5908  		if v_1.Op != OpS390XADDconst {
  5909  			break
  5910  		}
  5911  		off2 := auxIntToInt32(v_1.AuxInt)
  5912  		ptr := v_1.Args[0]
  5913  		mem := v_2
  5914  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5915  			break
  5916  		}
  5917  		v.reset(OpS390XADDload)
  5918  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5919  		v.Aux = symToAux(sym)
  5920  		v.AddArg3(x, ptr, mem)
  5921  		return true
  5922  	}
  5923  	// match: (ADDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5924  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5925  	// result: (ADDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5926  	for {
  5927  		o1 := auxIntToInt32(v.AuxInt)
  5928  		s1 := auxToSym(v.Aux)
  5929  		x := v_0
  5930  		if v_1.Op != OpS390XMOVDaddr {
  5931  			break
  5932  		}
  5933  		o2 := auxIntToInt32(v_1.AuxInt)
  5934  		s2 := auxToSym(v_1.Aux)
  5935  		ptr := v_1.Args[0]
  5936  		mem := v_2
  5937  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5938  			break
  5939  		}
  5940  		v.reset(OpS390XADDload)
  5941  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5942  		v.Aux = symToAux(mergeSym(s1, s2))
  5943  		v.AddArg3(x, ptr, mem)
  5944  		return true
  5945  	}
  5946  	return false
  5947  }
  5948  func rewriteValueS390X_OpS390XAND(v *Value) bool {
  5949  	v_1 := v.Args[1]
  5950  	v_0 := v.Args[0]
  5951  	b := v.Block
  5952  	typ := &b.Func.Config.Types
  5953  	// match: (AND x (MOVDconst [c]))
  5954  	// cond: s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil
  5955  	// result: (RISBGZ x {*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c))})
  5956  	for {
  5957  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5958  			x := v_0
  5959  			if v_1.Op != OpS390XMOVDconst {
  5960  				continue
  5961  			}
  5962  			c := auxIntToInt64(v_1.AuxInt)
  5963  			if !(s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil) {
  5964  				continue
  5965  			}
  5966  			v.reset(OpS390XRISBGZ)
  5967  			v.Aux = s390xRotateParamsToAux(*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)))
  5968  			v.AddArg(x)
  5969  			return true
  5970  		}
  5971  		break
  5972  	}
  5973  	// match: (AND x (MOVDconst [c]))
  5974  	// cond: is32Bit(c) && c < 0
  5975  	// result: (ANDconst [c] x)
  5976  	for {
  5977  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5978  			x := v_0
  5979  			if v_1.Op != OpS390XMOVDconst {
  5980  				continue
  5981  			}
  5982  			c := auxIntToInt64(v_1.AuxInt)
  5983  			if !(is32Bit(c) && c < 0) {
  5984  				continue
  5985  			}
  5986  			v.reset(OpS390XANDconst)
  5987  			v.AuxInt = int64ToAuxInt(c)
  5988  			v.AddArg(x)
  5989  			return true
  5990  		}
  5991  		break
  5992  	}
  5993  	// match: (AND x (MOVDconst [c]))
  5994  	// cond: is32Bit(c) && c >= 0
  5995  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(c)] x))
  5996  	for {
  5997  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5998  			x := v_0
  5999  			if v_1.Op != OpS390XMOVDconst {
  6000  				continue
  6001  			}
  6002  			c := auxIntToInt64(v_1.AuxInt)
  6003  			if !(is32Bit(c) && c >= 0) {
  6004  				continue
  6005  			}
  6006  			v.reset(OpS390XMOVWZreg)
  6007  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  6008  			v0.AuxInt = int32ToAuxInt(int32(c))
  6009  			v0.AddArg(x)
  6010  			v.AddArg(v0)
  6011  			return true
  6012  		}
  6013  		break
  6014  	}
  6015  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  6016  	// result: (MOVDconst [c&d])
  6017  	for {
  6018  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6019  			if v_0.Op != OpS390XMOVDconst {
  6020  				continue
  6021  			}
  6022  			c := auxIntToInt64(v_0.AuxInt)
  6023  			if v_1.Op != OpS390XMOVDconst {
  6024  				continue
  6025  			}
  6026  			d := auxIntToInt64(v_1.AuxInt)
  6027  			v.reset(OpS390XMOVDconst)
  6028  			v.AuxInt = int64ToAuxInt(c & d)
  6029  			return true
  6030  		}
  6031  		break
  6032  	}
  6033  	// match: (AND x x)
  6034  	// result: x
  6035  	for {
  6036  		x := v_0
  6037  		if x != v_1 {
  6038  			break
  6039  		}
  6040  		v.copyOf(x)
  6041  		return true
  6042  	}
  6043  	// match: (AND <t> x g:(MOVDload [off] {sym} ptr mem))
  6044  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6045  	// result: (ANDload <t> [off] {sym} x ptr mem)
  6046  	for {
  6047  		t := v.Type
  6048  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6049  			x := v_0
  6050  			g := v_1
  6051  			if g.Op != OpS390XMOVDload {
  6052  				continue
  6053  			}
  6054  			off := auxIntToInt32(g.AuxInt)
  6055  			sym := auxToSym(g.Aux)
  6056  			mem := g.Args[1]
  6057  			ptr := g.Args[0]
  6058  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6059  				continue
  6060  			}
  6061  			v.reset(OpS390XANDload)
  6062  			v.Type = t
  6063  			v.AuxInt = int32ToAuxInt(off)
  6064  			v.Aux = symToAux(sym)
  6065  			v.AddArg3(x, ptr, mem)
  6066  			return true
  6067  		}
  6068  		break
  6069  	}
  6070  	return false
  6071  }
  6072  func rewriteValueS390X_OpS390XANDW(v *Value) bool {
  6073  	v_1 := v.Args[1]
  6074  	v_0 := v.Args[0]
  6075  	// match: (ANDW x (MOVDconst [c]))
  6076  	// result: (ANDWconst [int32(c)] x)
  6077  	for {
  6078  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6079  			x := v_0
  6080  			if v_1.Op != OpS390XMOVDconst {
  6081  				continue
  6082  			}
  6083  			c := auxIntToInt64(v_1.AuxInt)
  6084  			v.reset(OpS390XANDWconst)
  6085  			v.AuxInt = int32ToAuxInt(int32(c))
  6086  			v.AddArg(x)
  6087  			return true
  6088  		}
  6089  		break
  6090  	}
  6091  	// match: (ANDW x x)
  6092  	// result: x
  6093  	for {
  6094  		x := v_0
  6095  		if x != v_1 {
  6096  			break
  6097  		}
  6098  		v.copyOf(x)
  6099  		return true
  6100  	}
  6101  	// match: (ANDW <t> x g:(MOVWload [off] {sym} ptr mem))
  6102  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6103  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6104  	for {
  6105  		t := v.Type
  6106  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6107  			x := v_0
  6108  			g := v_1
  6109  			if g.Op != OpS390XMOVWload {
  6110  				continue
  6111  			}
  6112  			off := auxIntToInt32(g.AuxInt)
  6113  			sym := auxToSym(g.Aux)
  6114  			mem := g.Args[1]
  6115  			ptr := g.Args[0]
  6116  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6117  				continue
  6118  			}
  6119  			v.reset(OpS390XANDWload)
  6120  			v.Type = t
  6121  			v.AuxInt = int32ToAuxInt(off)
  6122  			v.Aux = symToAux(sym)
  6123  			v.AddArg3(x, ptr, mem)
  6124  			return true
  6125  		}
  6126  		break
  6127  	}
  6128  	// match: (ANDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  6129  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6130  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6131  	for {
  6132  		t := v.Type
  6133  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6134  			x := v_0
  6135  			g := v_1
  6136  			if g.Op != OpS390XMOVWZload {
  6137  				continue
  6138  			}
  6139  			off := auxIntToInt32(g.AuxInt)
  6140  			sym := auxToSym(g.Aux)
  6141  			mem := g.Args[1]
  6142  			ptr := g.Args[0]
  6143  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6144  				continue
  6145  			}
  6146  			v.reset(OpS390XANDWload)
  6147  			v.Type = t
  6148  			v.AuxInt = int32ToAuxInt(off)
  6149  			v.Aux = symToAux(sym)
  6150  			v.AddArg3(x, ptr, mem)
  6151  			return true
  6152  		}
  6153  		break
  6154  	}
  6155  	return false
  6156  }
  6157  func rewriteValueS390X_OpS390XANDWconst(v *Value) bool {
  6158  	v_0 := v.Args[0]
  6159  	// match: (ANDWconst [c] (ANDWconst [d] x))
  6160  	// result: (ANDWconst [c&d] x)
  6161  	for {
  6162  		c := auxIntToInt32(v.AuxInt)
  6163  		if v_0.Op != OpS390XANDWconst {
  6164  			break
  6165  		}
  6166  		d := auxIntToInt32(v_0.AuxInt)
  6167  		x := v_0.Args[0]
  6168  		v.reset(OpS390XANDWconst)
  6169  		v.AuxInt = int32ToAuxInt(c & d)
  6170  		v.AddArg(x)
  6171  		return true
  6172  	}
  6173  	// match: (ANDWconst [0x00ff] x)
  6174  	// result: (MOVBZreg x)
  6175  	for {
  6176  		if auxIntToInt32(v.AuxInt) != 0x00ff {
  6177  			break
  6178  		}
  6179  		x := v_0
  6180  		v.reset(OpS390XMOVBZreg)
  6181  		v.AddArg(x)
  6182  		return true
  6183  	}
  6184  	// match: (ANDWconst [0xffff] x)
  6185  	// result: (MOVHZreg x)
  6186  	for {
  6187  		if auxIntToInt32(v.AuxInt) != 0xffff {
  6188  			break
  6189  		}
  6190  		x := v_0
  6191  		v.reset(OpS390XMOVHZreg)
  6192  		v.AddArg(x)
  6193  		return true
  6194  	}
  6195  	// match: (ANDWconst [c] _)
  6196  	// cond: int32(c)==0
  6197  	// result: (MOVDconst [0])
  6198  	for {
  6199  		c := auxIntToInt32(v.AuxInt)
  6200  		if !(int32(c) == 0) {
  6201  			break
  6202  		}
  6203  		v.reset(OpS390XMOVDconst)
  6204  		v.AuxInt = int64ToAuxInt(0)
  6205  		return true
  6206  	}
  6207  	// match: (ANDWconst [c] x)
  6208  	// cond: int32(c)==-1
  6209  	// result: x
  6210  	for {
  6211  		c := auxIntToInt32(v.AuxInt)
  6212  		x := v_0
  6213  		if !(int32(c) == -1) {
  6214  			break
  6215  		}
  6216  		v.copyOf(x)
  6217  		return true
  6218  	}
  6219  	// match: (ANDWconst [c] (MOVDconst [d]))
  6220  	// result: (MOVDconst [int64(c)&d])
  6221  	for {
  6222  		c := auxIntToInt32(v.AuxInt)
  6223  		if v_0.Op != OpS390XMOVDconst {
  6224  			break
  6225  		}
  6226  		d := auxIntToInt64(v_0.AuxInt)
  6227  		v.reset(OpS390XMOVDconst)
  6228  		v.AuxInt = int64ToAuxInt(int64(c) & d)
  6229  		return true
  6230  	}
  6231  	return false
  6232  }
  6233  func rewriteValueS390X_OpS390XANDWload(v *Value) bool {
  6234  	v_2 := v.Args[2]
  6235  	v_1 := v.Args[1]
  6236  	v_0 := v.Args[0]
  6237  	// match: (ANDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6238  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6239  	// result: (ANDWload [off1+off2] {sym} x ptr mem)
  6240  	for {
  6241  		off1 := auxIntToInt32(v.AuxInt)
  6242  		sym := auxToSym(v.Aux)
  6243  		x := v_0
  6244  		if v_1.Op != OpS390XADDconst {
  6245  			break
  6246  		}
  6247  		off2 := auxIntToInt32(v_1.AuxInt)
  6248  		ptr := v_1.Args[0]
  6249  		mem := v_2
  6250  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6251  			break
  6252  		}
  6253  		v.reset(OpS390XANDWload)
  6254  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6255  		v.Aux = symToAux(sym)
  6256  		v.AddArg3(x, ptr, mem)
  6257  		return true
  6258  	}
  6259  	// match: (ANDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6260  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6261  	// result: (ANDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6262  	for {
  6263  		o1 := auxIntToInt32(v.AuxInt)
  6264  		s1 := auxToSym(v.Aux)
  6265  		x := v_0
  6266  		if v_1.Op != OpS390XMOVDaddr {
  6267  			break
  6268  		}
  6269  		o2 := auxIntToInt32(v_1.AuxInt)
  6270  		s2 := auxToSym(v_1.Aux)
  6271  		ptr := v_1.Args[0]
  6272  		mem := v_2
  6273  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6274  			break
  6275  		}
  6276  		v.reset(OpS390XANDWload)
  6277  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6278  		v.Aux = symToAux(mergeSym(s1, s2))
  6279  		v.AddArg3(x, ptr, mem)
  6280  		return true
  6281  	}
  6282  	return false
  6283  }
  6284  func rewriteValueS390X_OpS390XANDconst(v *Value) bool {
  6285  	v_0 := v.Args[0]
  6286  	// match: (ANDconst [c] (ANDconst [d] x))
  6287  	// result: (ANDconst [c&d] x)
  6288  	for {
  6289  		c := auxIntToInt64(v.AuxInt)
  6290  		if v_0.Op != OpS390XANDconst {
  6291  			break
  6292  		}
  6293  		d := auxIntToInt64(v_0.AuxInt)
  6294  		x := v_0.Args[0]
  6295  		v.reset(OpS390XANDconst)
  6296  		v.AuxInt = int64ToAuxInt(c & d)
  6297  		v.AddArg(x)
  6298  		return true
  6299  	}
  6300  	// match: (ANDconst [0] _)
  6301  	// result: (MOVDconst [0])
  6302  	for {
  6303  		if auxIntToInt64(v.AuxInt) != 0 {
  6304  			break
  6305  		}
  6306  		v.reset(OpS390XMOVDconst)
  6307  		v.AuxInt = int64ToAuxInt(0)
  6308  		return true
  6309  	}
  6310  	// match: (ANDconst [-1] x)
  6311  	// result: x
  6312  	for {
  6313  		if auxIntToInt64(v.AuxInt) != -1 {
  6314  			break
  6315  		}
  6316  		x := v_0
  6317  		v.copyOf(x)
  6318  		return true
  6319  	}
  6320  	// match: (ANDconst [c] (MOVDconst [d]))
  6321  	// result: (MOVDconst [c&d])
  6322  	for {
  6323  		c := auxIntToInt64(v.AuxInt)
  6324  		if v_0.Op != OpS390XMOVDconst {
  6325  			break
  6326  		}
  6327  		d := auxIntToInt64(v_0.AuxInt)
  6328  		v.reset(OpS390XMOVDconst)
  6329  		v.AuxInt = int64ToAuxInt(c & d)
  6330  		return true
  6331  	}
  6332  	return false
  6333  }
  6334  func rewriteValueS390X_OpS390XANDload(v *Value) bool {
  6335  	v_2 := v.Args[2]
  6336  	v_1 := v.Args[1]
  6337  	v_0 := v.Args[0]
  6338  	b := v.Block
  6339  	// match: (ANDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  6340  	// cond: isSamePtr(ptr1, ptr2)
  6341  	// result: (AND x (LGDR <t> y))
  6342  	for {
  6343  		t := v.Type
  6344  		off := auxIntToInt32(v.AuxInt)
  6345  		sym := auxToSym(v.Aux)
  6346  		x := v_0
  6347  		ptr1 := v_1
  6348  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  6349  			break
  6350  		}
  6351  		y := v_2.Args[1]
  6352  		ptr2 := v_2.Args[0]
  6353  		if !(isSamePtr(ptr1, ptr2)) {
  6354  			break
  6355  		}
  6356  		v.reset(OpS390XAND)
  6357  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  6358  		v0.AddArg(y)
  6359  		v.AddArg2(x, v0)
  6360  		return true
  6361  	}
  6362  	// match: (ANDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6363  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6364  	// result: (ANDload [off1+off2] {sym} x ptr mem)
  6365  	for {
  6366  		off1 := auxIntToInt32(v.AuxInt)
  6367  		sym := auxToSym(v.Aux)
  6368  		x := v_0
  6369  		if v_1.Op != OpS390XADDconst {
  6370  			break
  6371  		}
  6372  		off2 := auxIntToInt32(v_1.AuxInt)
  6373  		ptr := v_1.Args[0]
  6374  		mem := v_2
  6375  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6376  			break
  6377  		}
  6378  		v.reset(OpS390XANDload)
  6379  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6380  		v.Aux = symToAux(sym)
  6381  		v.AddArg3(x, ptr, mem)
  6382  		return true
  6383  	}
  6384  	// match: (ANDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6385  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6386  	// result: (ANDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6387  	for {
  6388  		o1 := auxIntToInt32(v.AuxInt)
  6389  		s1 := auxToSym(v.Aux)
  6390  		x := v_0
  6391  		if v_1.Op != OpS390XMOVDaddr {
  6392  			break
  6393  		}
  6394  		o2 := auxIntToInt32(v_1.AuxInt)
  6395  		s2 := auxToSym(v_1.Aux)
  6396  		ptr := v_1.Args[0]
  6397  		mem := v_2
  6398  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6399  			break
  6400  		}
  6401  		v.reset(OpS390XANDload)
  6402  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6403  		v.Aux = symToAux(mergeSym(s1, s2))
  6404  		v.AddArg3(x, ptr, mem)
  6405  		return true
  6406  	}
  6407  	return false
  6408  }
  6409  func rewriteValueS390X_OpS390XCMP(v *Value) bool {
  6410  	v_1 := v.Args[1]
  6411  	v_0 := v.Args[0]
  6412  	b := v.Block
  6413  	// match: (CMP x (MOVDconst [c]))
  6414  	// cond: is32Bit(c)
  6415  	// result: (CMPconst x [int32(c)])
  6416  	for {
  6417  		x := v_0
  6418  		if v_1.Op != OpS390XMOVDconst {
  6419  			break
  6420  		}
  6421  		c := auxIntToInt64(v_1.AuxInt)
  6422  		if !(is32Bit(c)) {
  6423  			break
  6424  		}
  6425  		v.reset(OpS390XCMPconst)
  6426  		v.AuxInt = int32ToAuxInt(int32(c))
  6427  		v.AddArg(x)
  6428  		return true
  6429  	}
  6430  	// match: (CMP (MOVDconst [c]) x)
  6431  	// cond: is32Bit(c)
  6432  	// result: (InvertFlags (CMPconst x [int32(c)]))
  6433  	for {
  6434  		if v_0.Op != OpS390XMOVDconst {
  6435  			break
  6436  		}
  6437  		c := auxIntToInt64(v_0.AuxInt)
  6438  		x := v_1
  6439  		if !(is32Bit(c)) {
  6440  			break
  6441  		}
  6442  		v.reset(OpS390XInvertFlags)
  6443  		v0 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  6444  		v0.AuxInt = int32ToAuxInt(int32(c))
  6445  		v0.AddArg(x)
  6446  		v.AddArg(v0)
  6447  		return true
  6448  	}
  6449  	// match: (CMP x y)
  6450  	// cond: canonLessThan(x,y)
  6451  	// result: (InvertFlags (CMP y x))
  6452  	for {
  6453  		x := v_0
  6454  		y := v_1
  6455  		if !(canonLessThan(x, y)) {
  6456  			break
  6457  		}
  6458  		v.reset(OpS390XInvertFlags)
  6459  		v0 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  6460  		v0.AddArg2(y, x)
  6461  		v.AddArg(v0)
  6462  		return true
  6463  	}
  6464  	return false
  6465  }
  6466  func rewriteValueS390X_OpS390XCMPU(v *Value) bool {
  6467  	v_1 := v.Args[1]
  6468  	v_0 := v.Args[0]
  6469  	b := v.Block
  6470  	// match: (CMPU x (MOVDconst [c]))
  6471  	// cond: isU32Bit(c)
  6472  	// result: (CMPUconst x [int32(c)])
  6473  	for {
  6474  		x := v_0
  6475  		if v_1.Op != OpS390XMOVDconst {
  6476  			break
  6477  		}
  6478  		c := auxIntToInt64(v_1.AuxInt)
  6479  		if !(isU32Bit(c)) {
  6480  			break
  6481  		}
  6482  		v.reset(OpS390XCMPUconst)
  6483  		v.AuxInt = int32ToAuxInt(int32(c))
  6484  		v.AddArg(x)
  6485  		return true
  6486  	}
  6487  	// match: (CMPU (MOVDconst [c]) x)
  6488  	// cond: isU32Bit(c)
  6489  	// result: (InvertFlags (CMPUconst x [int32(c)]))
  6490  	for {
  6491  		if v_0.Op != OpS390XMOVDconst {
  6492  			break
  6493  		}
  6494  		c := auxIntToInt64(v_0.AuxInt)
  6495  		x := v_1
  6496  		if !(isU32Bit(c)) {
  6497  			break
  6498  		}
  6499  		v.reset(OpS390XInvertFlags)
  6500  		v0 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  6501  		v0.AuxInt = int32ToAuxInt(int32(c))
  6502  		v0.AddArg(x)
  6503  		v.AddArg(v0)
  6504  		return true
  6505  	}
  6506  	// match: (CMPU x y)
  6507  	// cond: canonLessThan(x,y)
  6508  	// result: (InvertFlags (CMPU y x))
  6509  	for {
  6510  		x := v_0
  6511  		y := v_1
  6512  		if !(canonLessThan(x, y)) {
  6513  			break
  6514  		}
  6515  		v.reset(OpS390XInvertFlags)
  6516  		v0 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  6517  		v0.AddArg2(y, x)
  6518  		v.AddArg(v0)
  6519  		return true
  6520  	}
  6521  	return false
  6522  }
  6523  func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
  6524  	v_0 := v.Args[0]
  6525  	// match: (CMPUconst (MOVDconst [x]) [y])
  6526  	// cond: uint64(x)==uint64(y)
  6527  	// result: (FlagEQ)
  6528  	for {
  6529  		y := auxIntToInt32(v.AuxInt)
  6530  		if v_0.Op != OpS390XMOVDconst {
  6531  			break
  6532  		}
  6533  		x := auxIntToInt64(v_0.AuxInt)
  6534  		if !(uint64(x) == uint64(y)) {
  6535  			break
  6536  		}
  6537  		v.reset(OpS390XFlagEQ)
  6538  		return true
  6539  	}
  6540  	// match: (CMPUconst (MOVDconst [x]) [y])
  6541  	// cond: uint64(x)<uint64(y)
  6542  	// result: (FlagLT)
  6543  	for {
  6544  		y := auxIntToInt32(v.AuxInt)
  6545  		if v_0.Op != OpS390XMOVDconst {
  6546  			break
  6547  		}
  6548  		x := auxIntToInt64(v_0.AuxInt)
  6549  		if !(uint64(x) < uint64(y)) {
  6550  			break
  6551  		}
  6552  		v.reset(OpS390XFlagLT)
  6553  		return true
  6554  	}
  6555  	// match: (CMPUconst (MOVDconst [x]) [y])
  6556  	// cond: uint64(x)>uint64(y)
  6557  	// result: (FlagGT)
  6558  	for {
  6559  		y := auxIntToInt32(v.AuxInt)
  6560  		if v_0.Op != OpS390XMOVDconst {
  6561  			break
  6562  		}
  6563  		x := auxIntToInt64(v_0.AuxInt)
  6564  		if !(uint64(x) > uint64(y)) {
  6565  			break
  6566  		}
  6567  		v.reset(OpS390XFlagGT)
  6568  		return true
  6569  	}
  6570  	// match: (CMPUconst (SRDconst _ [c]) [n])
  6571  	// cond: c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)
  6572  	// result: (FlagLT)
  6573  	for {
  6574  		n := auxIntToInt32(v.AuxInt)
  6575  		if v_0.Op != OpS390XSRDconst {
  6576  			break
  6577  		}
  6578  		c := auxIntToUint8(v_0.AuxInt)
  6579  		if !(c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)) {
  6580  			break
  6581  		}
  6582  		v.reset(OpS390XFlagLT)
  6583  		return true
  6584  	}
  6585  	// match: (CMPUconst (RISBGZ x {r}) [c])
  6586  	// cond: r.OutMask() < uint64(uint32(c))
  6587  	// result: (FlagLT)
  6588  	for {
  6589  		c := auxIntToInt32(v.AuxInt)
  6590  		if v_0.Op != OpS390XRISBGZ {
  6591  			break
  6592  		}
  6593  		r := auxToS390xRotateParams(v_0.Aux)
  6594  		if !(r.OutMask() < uint64(uint32(c))) {
  6595  			break
  6596  		}
  6597  		v.reset(OpS390XFlagLT)
  6598  		return true
  6599  	}
  6600  	// match: (CMPUconst (MOVWZreg x) [c])
  6601  	// result: (CMPWUconst x [c])
  6602  	for {
  6603  		c := auxIntToInt32(v.AuxInt)
  6604  		if v_0.Op != OpS390XMOVWZreg {
  6605  			break
  6606  		}
  6607  		x := v_0.Args[0]
  6608  		v.reset(OpS390XCMPWUconst)
  6609  		v.AuxInt = int32ToAuxInt(c)
  6610  		v.AddArg(x)
  6611  		return true
  6612  	}
  6613  	// match: (CMPUconst x:(MOVHreg _) [c])
  6614  	// result: (CMPWUconst x [c])
  6615  	for {
  6616  		c := auxIntToInt32(v.AuxInt)
  6617  		x := v_0
  6618  		if x.Op != OpS390XMOVHreg {
  6619  			break
  6620  		}
  6621  		v.reset(OpS390XCMPWUconst)
  6622  		v.AuxInt = int32ToAuxInt(c)
  6623  		v.AddArg(x)
  6624  		return true
  6625  	}
  6626  	// match: (CMPUconst x:(MOVHZreg _) [c])
  6627  	// result: (CMPWUconst x [c])
  6628  	for {
  6629  		c := auxIntToInt32(v.AuxInt)
  6630  		x := v_0
  6631  		if x.Op != OpS390XMOVHZreg {
  6632  			break
  6633  		}
  6634  		v.reset(OpS390XCMPWUconst)
  6635  		v.AuxInt = int32ToAuxInt(c)
  6636  		v.AddArg(x)
  6637  		return true
  6638  	}
  6639  	// match: (CMPUconst x:(MOVBreg _) [c])
  6640  	// result: (CMPWUconst x [c])
  6641  	for {
  6642  		c := auxIntToInt32(v.AuxInt)
  6643  		x := v_0
  6644  		if x.Op != OpS390XMOVBreg {
  6645  			break
  6646  		}
  6647  		v.reset(OpS390XCMPWUconst)
  6648  		v.AuxInt = int32ToAuxInt(c)
  6649  		v.AddArg(x)
  6650  		return true
  6651  	}
  6652  	// match: (CMPUconst x:(MOVBZreg _) [c])
  6653  	// result: (CMPWUconst x [c])
  6654  	for {
  6655  		c := auxIntToInt32(v.AuxInt)
  6656  		x := v_0
  6657  		if x.Op != OpS390XMOVBZreg {
  6658  			break
  6659  		}
  6660  		v.reset(OpS390XCMPWUconst)
  6661  		v.AuxInt = int32ToAuxInt(c)
  6662  		v.AddArg(x)
  6663  		return true
  6664  	}
  6665  	// match: (CMPUconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  6666  	// cond: int32(m) >= 0
  6667  	// result: (CMPWUconst x [c])
  6668  	for {
  6669  		c := auxIntToInt32(v.AuxInt)
  6670  		if v_0.Op != OpS390XMOVWZreg {
  6671  			break
  6672  		}
  6673  		x := v_0.Args[0]
  6674  		if x.Op != OpS390XANDWconst {
  6675  			break
  6676  		}
  6677  		m := auxIntToInt32(x.AuxInt)
  6678  		if !(int32(m) >= 0) {
  6679  			break
  6680  		}
  6681  		v.reset(OpS390XCMPWUconst)
  6682  		v.AuxInt = int32ToAuxInt(c)
  6683  		v.AddArg(x)
  6684  		return true
  6685  	}
  6686  	// match: (CMPUconst (MOVWreg x:(ANDWconst [m] _)) [c])
  6687  	// cond: int32(m) >= 0
  6688  	// result: (CMPWUconst x [c])
  6689  	for {
  6690  		c := auxIntToInt32(v.AuxInt)
  6691  		if v_0.Op != OpS390XMOVWreg {
  6692  			break
  6693  		}
  6694  		x := v_0.Args[0]
  6695  		if x.Op != OpS390XANDWconst {
  6696  			break
  6697  		}
  6698  		m := auxIntToInt32(x.AuxInt)
  6699  		if !(int32(m) >= 0) {
  6700  			break
  6701  		}
  6702  		v.reset(OpS390XCMPWUconst)
  6703  		v.AuxInt = int32ToAuxInt(c)
  6704  		v.AddArg(x)
  6705  		return true
  6706  	}
  6707  	return false
  6708  }
  6709  func rewriteValueS390X_OpS390XCMPW(v *Value) bool {
  6710  	v_1 := v.Args[1]
  6711  	v_0 := v.Args[0]
  6712  	b := v.Block
  6713  	// match: (CMPW x (MOVDconst [c]))
  6714  	// result: (CMPWconst x [int32(c)])
  6715  	for {
  6716  		x := v_0
  6717  		if v_1.Op != OpS390XMOVDconst {
  6718  			break
  6719  		}
  6720  		c := auxIntToInt64(v_1.AuxInt)
  6721  		v.reset(OpS390XCMPWconst)
  6722  		v.AuxInt = int32ToAuxInt(int32(c))
  6723  		v.AddArg(x)
  6724  		return true
  6725  	}
  6726  	// match: (CMPW (MOVDconst [c]) x)
  6727  	// result: (InvertFlags (CMPWconst x [int32(c)]))
  6728  	for {
  6729  		if v_0.Op != OpS390XMOVDconst {
  6730  			break
  6731  		}
  6732  		c := auxIntToInt64(v_0.AuxInt)
  6733  		x := v_1
  6734  		v.reset(OpS390XInvertFlags)
  6735  		v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags)
  6736  		v0.AuxInt = int32ToAuxInt(int32(c))
  6737  		v0.AddArg(x)
  6738  		v.AddArg(v0)
  6739  		return true
  6740  	}
  6741  	// match: (CMPW x y)
  6742  	// cond: canonLessThan(x,y)
  6743  	// result: (InvertFlags (CMPW y x))
  6744  	for {
  6745  		x := v_0
  6746  		y := v_1
  6747  		if !(canonLessThan(x, y)) {
  6748  			break
  6749  		}
  6750  		v.reset(OpS390XInvertFlags)
  6751  		v0 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  6752  		v0.AddArg2(y, x)
  6753  		v.AddArg(v0)
  6754  		return true
  6755  	}
  6756  	// match: (CMPW x (MOVWreg y))
  6757  	// result: (CMPW x y)
  6758  	for {
  6759  		x := v_0
  6760  		if v_1.Op != OpS390XMOVWreg {
  6761  			break
  6762  		}
  6763  		y := v_1.Args[0]
  6764  		v.reset(OpS390XCMPW)
  6765  		v.AddArg2(x, y)
  6766  		return true
  6767  	}
  6768  	// match: (CMPW x (MOVWZreg y))
  6769  	// result: (CMPW x y)
  6770  	for {
  6771  		x := v_0
  6772  		if v_1.Op != OpS390XMOVWZreg {
  6773  			break
  6774  		}
  6775  		y := v_1.Args[0]
  6776  		v.reset(OpS390XCMPW)
  6777  		v.AddArg2(x, y)
  6778  		return true
  6779  	}
  6780  	// match: (CMPW (MOVWreg x) y)
  6781  	// result: (CMPW x y)
  6782  	for {
  6783  		if v_0.Op != OpS390XMOVWreg {
  6784  			break
  6785  		}
  6786  		x := v_0.Args[0]
  6787  		y := v_1
  6788  		v.reset(OpS390XCMPW)
  6789  		v.AddArg2(x, y)
  6790  		return true
  6791  	}
  6792  	// match: (CMPW (MOVWZreg x) y)
  6793  	// result: (CMPW x y)
  6794  	for {
  6795  		if v_0.Op != OpS390XMOVWZreg {
  6796  			break
  6797  		}
  6798  		x := v_0.Args[0]
  6799  		y := v_1
  6800  		v.reset(OpS390XCMPW)
  6801  		v.AddArg2(x, y)
  6802  		return true
  6803  	}
  6804  	return false
  6805  }
  6806  func rewriteValueS390X_OpS390XCMPWU(v *Value) bool {
  6807  	v_1 := v.Args[1]
  6808  	v_0 := v.Args[0]
  6809  	b := v.Block
  6810  	// match: (CMPWU x (MOVDconst [c]))
  6811  	// result: (CMPWUconst x [int32(c)])
  6812  	for {
  6813  		x := v_0
  6814  		if v_1.Op != OpS390XMOVDconst {
  6815  			break
  6816  		}
  6817  		c := auxIntToInt64(v_1.AuxInt)
  6818  		v.reset(OpS390XCMPWUconst)
  6819  		v.AuxInt = int32ToAuxInt(int32(c))
  6820  		v.AddArg(x)
  6821  		return true
  6822  	}
  6823  	// match: (CMPWU (MOVDconst [c]) x)
  6824  	// result: (InvertFlags (CMPWUconst x [int32(c)]))
  6825  	for {
  6826  		if v_0.Op != OpS390XMOVDconst {
  6827  			break
  6828  		}
  6829  		c := auxIntToInt64(v_0.AuxInt)
  6830  		x := v_1
  6831  		v.reset(OpS390XInvertFlags)
  6832  		v0 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  6833  		v0.AuxInt = int32ToAuxInt(int32(c))
  6834  		v0.AddArg(x)
  6835  		v.AddArg(v0)
  6836  		return true
  6837  	}
  6838  	// match: (CMPWU x y)
  6839  	// cond: canonLessThan(x,y)
  6840  	// result: (InvertFlags (CMPWU y x))
  6841  	for {
  6842  		x := v_0
  6843  		y := v_1
  6844  		if !(canonLessThan(x, y)) {
  6845  			break
  6846  		}
  6847  		v.reset(OpS390XInvertFlags)
  6848  		v0 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  6849  		v0.AddArg2(y, x)
  6850  		v.AddArg(v0)
  6851  		return true
  6852  	}
  6853  	// match: (CMPWU x (MOVWreg y))
  6854  	// result: (CMPWU x y)
  6855  	for {
  6856  		x := v_0
  6857  		if v_1.Op != OpS390XMOVWreg {
  6858  			break
  6859  		}
  6860  		y := v_1.Args[0]
  6861  		v.reset(OpS390XCMPWU)
  6862  		v.AddArg2(x, y)
  6863  		return true
  6864  	}
  6865  	// match: (CMPWU x (MOVWZreg y))
  6866  	// result: (CMPWU x y)
  6867  	for {
  6868  		x := v_0
  6869  		if v_1.Op != OpS390XMOVWZreg {
  6870  			break
  6871  		}
  6872  		y := v_1.Args[0]
  6873  		v.reset(OpS390XCMPWU)
  6874  		v.AddArg2(x, y)
  6875  		return true
  6876  	}
  6877  	// match: (CMPWU (MOVWreg x) y)
  6878  	// result: (CMPWU x y)
  6879  	for {
  6880  		if v_0.Op != OpS390XMOVWreg {
  6881  			break
  6882  		}
  6883  		x := v_0.Args[0]
  6884  		y := v_1
  6885  		v.reset(OpS390XCMPWU)
  6886  		v.AddArg2(x, y)
  6887  		return true
  6888  	}
  6889  	// match: (CMPWU (MOVWZreg x) y)
  6890  	// result: (CMPWU x y)
  6891  	for {
  6892  		if v_0.Op != OpS390XMOVWZreg {
  6893  			break
  6894  		}
  6895  		x := v_0.Args[0]
  6896  		y := v_1
  6897  		v.reset(OpS390XCMPWU)
  6898  		v.AddArg2(x, y)
  6899  		return true
  6900  	}
  6901  	return false
  6902  }
  6903  func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
  6904  	v_0 := v.Args[0]
  6905  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6906  	// cond: uint32(x)==uint32(y)
  6907  	// result: (FlagEQ)
  6908  	for {
  6909  		y := auxIntToInt32(v.AuxInt)
  6910  		if v_0.Op != OpS390XMOVDconst {
  6911  			break
  6912  		}
  6913  		x := auxIntToInt64(v_0.AuxInt)
  6914  		if !(uint32(x) == uint32(y)) {
  6915  			break
  6916  		}
  6917  		v.reset(OpS390XFlagEQ)
  6918  		return true
  6919  	}
  6920  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6921  	// cond: uint32(x)<uint32(y)
  6922  	// result: (FlagLT)
  6923  	for {
  6924  		y := auxIntToInt32(v.AuxInt)
  6925  		if v_0.Op != OpS390XMOVDconst {
  6926  			break
  6927  		}
  6928  		x := auxIntToInt64(v_0.AuxInt)
  6929  		if !(uint32(x) < uint32(y)) {
  6930  			break
  6931  		}
  6932  		v.reset(OpS390XFlagLT)
  6933  		return true
  6934  	}
  6935  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6936  	// cond: uint32(x)>uint32(y)
  6937  	// result: (FlagGT)
  6938  	for {
  6939  		y := auxIntToInt32(v.AuxInt)
  6940  		if v_0.Op != OpS390XMOVDconst {
  6941  			break
  6942  		}
  6943  		x := auxIntToInt64(v_0.AuxInt)
  6944  		if !(uint32(x) > uint32(y)) {
  6945  			break
  6946  		}
  6947  		v.reset(OpS390XFlagGT)
  6948  		return true
  6949  	}
  6950  	// match: (CMPWUconst (MOVBZreg _) [c])
  6951  	// cond: 0xff < c
  6952  	// result: (FlagLT)
  6953  	for {
  6954  		c := auxIntToInt32(v.AuxInt)
  6955  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  6956  			break
  6957  		}
  6958  		v.reset(OpS390XFlagLT)
  6959  		return true
  6960  	}
  6961  	// match: (CMPWUconst (MOVHZreg _) [c])
  6962  	// cond: 0xffff < c
  6963  	// result: (FlagLT)
  6964  	for {
  6965  		c := auxIntToInt32(v.AuxInt)
  6966  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  6967  			break
  6968  		}
  6969  		v.reset(OpS390XFlagLT)
  6970  		return true
  6971  	}
  6972  	// match: (CMPWUconst (SRWconst _ [c]) [n])
  6973  	// cond: c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)
  6974  	// result: (FlagLT)
  6975  	for {
  6976  		n := auxIntToInt32(v.AuxInt)
  6977  		if v_0.Op != OpS390XSRWconst {
  6978  			break
  6979  		}
  6980  		c := auxIntToUint8(v_0.AuxInt)
  6981  		if !(c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)) {
  6982  			break
  6983  		}
  6984  		v.reset(OpS390XFlagLT)
  6985  		return true
  6986  	}
  6987  	// match: (CMPWUconst (ANDWconst _ [m]) [n])
  6988  	// cond: uint32(m) < uint32(n)
  6989  	// result: (FlagLT)
  6990  	for {
  6991  		n := auxIntToInt32(v.AuxInt)
  6992  		if v_0.Op != OpS390XANDWconst {
  6993  			break
  6994  		}
  6995  		m := auxIntToInt32(v_0.AuxInt)
  6996  		if !(uint32(m) < uint32(n)) {
  6997  			break
  6998  		}
  6999  		v.reset(OpS390XFlagLT)
  7000  		return true
  7001  	}
  7002  	// match: (CMPWUconst (MOVWreg x) [c])
  7003  	// result: (CMPWUconst x [c])
  7004  	for {
  7005  		c := auxIntToInt32(v.AuxInt)
  7006  		if v_0.Op != OpS390XMOVWreg {
  7007  			break
  7008  		}
  7009  		x := v_0.Args[0]
  7010  		v.reset(OpS390XCMPWUconst)
  7011  		v.AuxInt = int32ToAuxInt(c)
  7012  		v.AddArg(x)
  7013  		return true
  7014  	}
  7015  	// match: (CMPWUconst (MOVWZreg x) [c])
  7016  	// result: (CMPWUconst x [c])
  7017  	for {
  7018  		c := auxIntToInt32(v.AuxInt)
  7019  		if v_0.Op != OpS390XMOVWZreg {
  7020  			break
  7021  		}
  7022  		x := v_0.Args[0]
  7023  		v.reset(OpS390XCMPWUconst)
  7024  		v.AuxInt = int32ToAuxInt(c)
  7025  		v.AddArg(x)
  7026  		return true
  7027  	}
  7028  	return false
  7029  }
  7030  func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
  7031  	v_0 := v.Args[0]
  7032  	// match: (CMPWconst (MOVDconst [x]) [y])
  7033  	// cond: int32(x)==int32(y)
  7034  	// result: (FlagEQ)
  7035  	for {
  7036  		y := auxIntToInt32(v.AuxInt)
  7037  		if v_0.Op != OpS390XMOVDconst {
  7038  			break
  7039  		}
  7040  		x := auxIntToInt64(v_0.AuxInt)
  7041  		if !(int32(x) == int32(y)) {
  7042  			break
  7043  		}
  7044  		v.reset(OpS390XFlagEQ)
  7045  		return true
  7046  	}
  7047  	// match: (CMPWconst (MOVDconst [x]) [y])
  7048  	// cond: int32(x)<int32(y)
  7049  	// result: (FlagLT)
  7050  	for {
  7051  		y := auxIntToInt32(v.AuxInt)
  7052  		if v_0.Op != OpS390XMOVDconst {
  7053  			break
  7054  		}
  7055  		x := auxIntToInt64(v_0.AuxInt)
  7056  		if !(int32(x) < int32(y)) {
  7057  			break
  7058  		}
  7059  		v.reset(OpS390XFlagLT)
  7060  		return true
  7061  	}
  7062  	// match: (CMPWconst (MOVDconst [x]) [y])
  7063  	// cond: int32(x)>int32(y)
  7064  	// result: (FlagGT)
  7065  	for {
  7066  		y := auxIntToInt32(v.AuxInt)
  7067  		if v_0.Op != OpS390XMOVDconst {
  7068  			break
  7069  		}
  7070  		x := auxIntToInt64(v_0.AuxInt)
  7071  		if !(int32(x) > int32(y)) {
  7072  			break
  7073  		}
  7074  		v.reset(OpS390XFlagGT)
  7075  		return true
  7076  	}
  7077  	// match: (CMPWconst (MOVBZreg _) [c])
  7078  	// cond: 0xff < c
  7079  	// result: (FlagLT)
  7080  	for {
  7081  		c := auxIntToInt32(v.AuxInt)
  7082  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  7083  			break
  7084  		}
  7085  		v.reset(OpS390XFlagLT)
  7086  		return true
  7087  	}
  7088  	// match: (CMPWconst (MOVHZreg _) [c])
  7089  	// cond: 0xffff < c
  7090  	// result: (FlagLT)
  7091  	for {
  7092  		c := auxIntToInt32(v.AuxInt)
  7093  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  7094  			break
  7095  		}
  7096  		v.reset(OpS390XFlagLT)
  7097  		return true
  7098  	}
  7099  	// match: (CMPWconst (SRWconst _ [c]) [n])
  7100  	// cond: c > 0 && n < 0
  7101  	// result: (FlagGT)
  7102  	for {
  7103  		n := auxIntToInt32(v.AuxInt)
  7104  		if v_0.Op != OpS390XSRWconst {
  7105  			break
  7106  		}
  7107  		c := auxIntToUint8(v_0.AuxInt)
  7108  		if !(c > 0 && n < 0) {
  7109  			break
  7110  		}
  7111  		v.reset(OpS390XFlagGT)
  7112  		return true
  7113  	}
  7114  	// match: (CMPWconst (ANDWconst _ [m]) [n])
  7115  	// cond: int32(m) >= 0 && int32(m) < int32(n)
  7116  	// result: (FlagLT)
  7117  	for {
  7118  		n := auxIntToInt32(v.AuxInt)
  7119  		if v_0.Op != OpS390XANDWconst {
  7120  			break
  7121  		}
  7122  		m := auxIntToInt32(v_0.AuxInt)
  7123  		if !(int32(m) >= 0 && int32(m) < int32(n)) {
  7124  			break
  7125  		}
  7126  		v.reset(OpS390XFlagLT)
  7127  		return true
  7128  	}
  7129  	// match: (CMPWconst x:(SRWconst _ [c]) [n])
  7130  	// cond: c > 0 && n >= 0
  7131  	// result: (CMPWUconst x [n])
  7132  	for {
  7133  		n := auxIntToInt32(v.AuxInt)
  7134  		x := v_0
  7135  		if x.Op != OpS390XSRWconst {
  7136  			break
  7137  		}
  7138  		c := auxIntToUint8(x.AuxInt)
  7139  		if !(c > 0 && n >= 0) {
  7140  			break
  7141  		}
  7142  		v.reset(OpS390XCMPWUconst)
  7143  		v.AuxInt = int32ToAuxInt(n)
  7144  		v.AddArg(x)
  7145  		return true
  7146  	}
  7147  	// match: (CMPWconst (MOVWreg x) [c])
  7148  	// result: (CMPWconst x [c])
  7149  	for {
  7150  		c := auxIntToInt32(v.AuxInt)
  7151  		if v_0.Op != OpS390XMOVWreg {
  7152  			break
  7153  		}
  7154  		x := v_0.Args[0]
  7155  		v.reset(OpS390XCMPWconst)
  7156  		v.AuxInt = int32ToAuxInt(c)
  7157  		v.AddArg(x)
  7158  		return true
  7159  	}
  7160  	// match: (CMPWconst (MOVWZreg x) [c])
  7161  	// result: (CMPWconst x [c])
  7162  	for {
  7163  		c := auxIntToInt32(v.AuxInt)
  7164  		if v_0.Op != OpS390XMOVWZreg {
  7165  			break
  7166  		}
  7167  		x := v_0.Args[0]
  7168  		v.reset(OpS390XCMPWconst)
  7169  		v.AuxInt = int32ToAuxInt(c)
  7170  		v.AddArg(x)
  7171  		return true
  7172  	}
  7173  	return false
  7174  }
  7175  func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
  7176  	v_0 := v.Args[0]
  7177  	// match: (CMPconst (MOVDconst [x]) [y])
  7178  	// cond: x==int64(y)
  7179  	// result: (FlagEQ)
  7180  	for {
  7181  		y := auxIntToInt32(v.AuxInt)
  7182  		if v_0.Op != OpS390XMOVDconst {
  7183  			break
  7184  		}
  7185  		x := auxIntToInt64(v_0.AuxInt)
  7186  		if !(x == int64(y)) {
  7187  			break
  7188  		}
  7189  		v.reset(OpS390XFlagEQ)
  7190  		return true
  7191  	}
  7192  	// match: (CMPconst (MOVDconst [x]) [y])
  7193  	// cond: x<int64(y)
  7194  	// result: (FlagLT)
  7195  	for {
  7196  		y := auxIntToInt32(v.AuxInt)
  7197  		if v_0.Op != OpS390XMOVDconst {
  7198  			break
  7199  		}
  7200  		x := auxIntToInt64(v_0.AuxInt)
  7201  		if !(x < int64(y)) {
  7202  			break
  7203  		}
  7204  		v.reset(OpS390XFlagLT)
  7205  		return true
  7206  	}
  7207  	// match: (CMPconst (MOVDconst [x]) [y])
  7208  	// cond: x>int64(y)
  7209  	// result: (FlagGT)
  7210  	for {
  7211  		y := auxIntToInt32(v.AuxInt)
  7212  		if v_0.Op != OpS390XMOVDconst {
  7213  			break
  7214  		}
  7215  		x := auxIntToInt64(v_0.AuxInt)
  7216  		if !(x > int64(y)) {
  7217  			break
  7218  		}
  7219  		v.reset(OpS390XFlagGT)
  7220  		return true
  7221  	}
  7222  	// match: (CMPconst (SRDconst _ [c]) [n])
  7223  	// cond: c > 0 && n < 0
  7224  	// result: (FlagGT)
  7225  	for {
  7226  		n := auxIntToInt32(v.AuxInt)
  7227  		if v_0.Op != OpS390XSRDconst {
  7228  			break
  7229  		}
  7230  		c := auxIntToUint8(v_0.AuxInt)
  7231  		if !(c > 0 && n < 0) {
  7232  			break
  7233  		}
  7234  		v.reset(OpS390XFlagGT)
  7235  		return true
  7236  	}
  7237  	// match: (CMPconst (RISBGZ x {r}) [c])
  7238  	// cond: c > 0 && r.OutMask() < uint64(c)
  7239  	// result: (FlagLT)
  7240  	for {
  7241  		c := auxIntToInt32(v.AuxInt)
  7242  		if v_0.Op != OpS390XRISBGZ {
  7243  			break
  7244  		}
  7245  		r := auxToS390xRotateParams(v_0.Aux)
  7246  		if !(c > 0 && r.OutMask() < uint64(c)) {
  7247  			break
  7248  		}
  7249  		v.reset(OpS390XFlagLT)
  7250  		return true
  7251  	}
  7252  	// match: (CMPconst (MOVWreg x) [c])
  7253  	// result: (CMPWconst x [c])
  7254  	for {
  7255  		c := auxIntToInt32(v.AuxInt)
  7256  		if v_0.Op != OpS390XMOVWreg {
  7257  			break
  7258  		}
  7259  		x := v_0.Args[0]
  7260  		v.reset(OpS390XCMPWconst)
  7261  		v.AuxInt = int32ToAuxInt(c)
  7262  		v.AddArg(x)
  7263  		return true
  7264  	}
  7265  	// match: (CMPconst x:(MOVHreg _) [c])
  7266  	// result: (CMPWconst x [c])
  7267  	for {
  7268  		c := auxIntToInt32(v.AuxInt)
  7269  		x := v_0
  7270  		if x.Op != OpS390XMOVHreg {
  7271  			break
  7272  		}
  7273  		v.reset(OpS390XCMPWconst)
  7274  		v.AuxInt = int32ToAuxInt(c)
  7275  		v.AddArg(x)
  7276  		return true
  7277  	}
  7278  	// match: (CMPconst x:(MOVHZreg _) [c])
  7279  	// result: (CMPWconst x [c])
  7280  	for {
  7281  		c := auxIntToInt32(v.AuxInt)
  7282  		x := v_0
  7283  		if x.Op != OpS390XMOVHZreg {
  7284  			break
  7285  		}
  7286  		v.reset(OpS390XCMPWconst)
  7287  		v.AuxInt = int32ToAuxInt(c)
  7288  		v.AddArg(x)
  7289  		return true
  7290  	}
  7291  	// match: (CMPconst x:(MOVBreg _) [c])
  7292  	// result: (CMPWconst x [c])
  7293  	for {
  7294  		c := auxIntToInt32(v.AuxInt)
  7295  		x := v_0
  7296  		if x.Op != OpS390XMOVBreg {
  7297  			break
  7298  		}
  7299  		v.reset(OpS390XCMPWconst)
  7300  		v.AuxInt = int32ToAuxInt(c)
  7301  		v.AddArg(x)
  7302  		return true
  7303  	}
  7304  	// match: (CMPconst x:(MOVBZreg _) [c])
  7305  	// result: (CMPWconst x [c])
  7306  	for {
  7307  		c := auxIntToInt32(v.AuxInt)
  7308  		x := v_0
  7309  		if x.Op != OpS390XMOVBZreg {
  7310  			break
  7311  		}
  7312  		v.reset(OpS390XCMPWconst)
  7313  		v.AuxInt = int32ToAuxInt(c)
  7314  		v.AddArg(x)
  7315  		return true
  7316  	}
  7317  	// match: (CMPconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  7318  	// cond: int32(m) >= 0 && c >= 0
  7319  	// result: (CMPWUconst x [c])
  7320  	for {
  7321  		c := auxIntToInt32(v.AuxInt)
  7322  		if v_0.Op != OpS390XMOVWZreg {
  7323  			break
  7324  		}
  7325  		x := v_0.Args[0]
  7326  		if x.Op != OpS390XANDWconst {
  7327  			break
  7328  		}
  7329  		m := auxIntToInt32(x.AuxInt)
  7330  		if !(int32(m) >= 0 && c >= 0) {
  7331  			break
  7332  		}
  7333  		v.reset(OpS390XCMPWUconst)
  7334  		v.AuxInt = int32ToAuxInt(c)
  7335  		v.AddArg(x)
  7336  		return true
  7337  	}
  7338  	// match: (CMPconst (MOVWreg x:(ANDWconst [m] _)) [c])
  7339  	// cond: int32(m) >= 0 && c >= 0
  7340  	// result: (CMPWUconst x [c])
  7341  	for {
  7342  		c := auxIntToInt32(v.AuxInt)
  7343  		if v_0.Op != OpS390XMOVWreg {
  7344  			break
  7345  		}
  7346  		x := v_0.Args[0]
  7347  		if x.Op != OpS390XANDWconst {
  7348  			break
  7349  		}
  7350  		m := auxIntToInt32(x.AuxInt)
  7351  		if !(int32(m) >= 0 && c >= 0) {
  7352  			break
  7353  		}
  7354  		v.reset(OpS390XCMPWUconst)
  7355  		v.AuxInt = int32ToAuxInt(c)
  7356  		v.AddArg(x)
  7357  		return true
  7358  	}
  7359  	// match: (CMPconst x:(SRDconst _ [c]) [n])
  7360  	// cond: c > 0 && n >= 0
  7361  	// result: (CMPUconst x [n])
  7362  	for {
  7363  		n := auxIntToInt32(v.AuxInt)
  7364  		x := v_0
  7365  		if x.Op != OpS390XSRDconst {
  7366  			break
  7367  		}
  7368  		c := auxIntToUint8(x.AuxInt)
  7369  		if !(c > 0 && n >= 0) {
  7370  			break
  7371  		}
  7372  		v.reset(OpS390XCMPUconst)
  7373  		v.AuxInt = int32ToAuxInt(n)
  7374  		v.AddArg(x)
  7375  		return true
  7376  	}
  7377  	return false
  7378  }
  7379  func rewriteValueS390X_OpS390XCPSDR(v *Value) bool {
  7380  	v_1 := v.Args[1]
  7381  	v_0 := v.Args[0]
  7382  	// match: (CPSDR y (FMOVDconst [c]))
  7383  	// cond: !math.Signbit(c)
  7384  	// result: (LPDFR y)
  7385  	for {
  7386  		y := v_0
  7387  		if v_1.Op != OpS390XFMOVDconst {
  7388  			break
  7389  		}
  7390  		c := auxIntToFloat64(v_1.AuxInt)
  7391  		if !(!math.Signbit(c)) {
  7392  			break
  7393  		}
  7394  		v.reset(OpS390XLPDFR)
  7395  		v.AddArg(y)
  7396  		return true
  7397  	}
  7398  	// match: (CPSDR y (FMOVDconst [c]))
  7399  	// cond: math.Signbit(c)
  7400  	// result: (LNDFR y)
  7401  	for {
  7402  		y := v_0
  7403  		if v_1.Op != OpS390XFMOVDconst {
  7404  			break
  7405  		}
  7406  		c := auxIntToFloat64(v_1.AuxInt)
  7407  		if !(math.Signbit(c)) {
  7408  			break
  7409  		}
  7410  		v.reset(OpS390XLNDFR)
  7411  		v.AddArg(y)
  7412  		return true
  7413  	}
  7414  	return false
  7415  }
  7416  func rewriteValueS390X_OpS390XFCMP(v *Value) bool {
  7417  	v_1 := v.Args[1]
  7418  	v_0 := v.Args[0]
  7419  	b := v.Block
  7420  	// match: (FCMP x (FMOVDconst [0.0]))
  7421  	// result: (LTDBR x)
  7422  	for {
  7423  		x := v_0
  7424  		if v_1.Op != OpS390XFMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0.0 {
  7425  			break
  7426  		}
  7427  		v.reset(OpS390XLTDBR)
  7428  		v.AddArg(x)
  7429  		return true
  7430  	}
  7431  	// match: (FCMP (FMOVDconst [0.0]) x)
  7432  	// result: (InvertFlags (LTDBR <v.Type> x))
  7433  	for {
  7434  		if v_0.Op != OpS390XFMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0.0 {
  7435  			break
  7436  		}
  7437  		x := v_1
  7438  		v.reset(OpS390XInvertFlags)
  7439  		v0 := b.NewValue0(v.Pos, OpS390XLTDBR, v.Type)
  7440  		v0.AddArg(x)
  7441  		v.AddArg(v0)
  7442  		return true
  7443  	}
  7444  	return false
  7445  }
  7446  func rewriteValueS390X_OpS390XFCMPS(v *Value) bool {
  7447  	v_1 := v.Args[1]
  7448  	v_0 := v.Args[0]
  7449  	b := v.Block
  7450  	// match: (FCMPS x (FMOVSconst [0.0]))
  7451  	// result: (LTEBR x)
  7452  	for {
  7453  		x := v_0
  7454  		if v_1.Op != OpS390XFMOVSconst || auxIntToFloat32(v_1.AuxInt) != 0.0 {
  7455  			break
  7456  		}
  7457  		v.reset(OpS390XLTEBR)
  7458  		v.AddArg(x)
  7459  		return true
  7460  	}
  7461  	// match: (FCMPS (FMOVSconst [0.0]) x)
  7462  	// result: (InvertFlags (LTEBR <v.Type> x))
  7463  	for {
  7464  		if v_0.Op != OpS390XFMOVSconst || auxIntToFloat32(v_0.AuxInt) != 0.0 {
  7465  			break
  7466  		}
  7467  		x := v_1
  7468  		v.reset(OpS390XInvertFlags)
  7469  		v0 := b.NewValue0(v.Pos, OpS390XLTEBR, v.Type)
  7470  		v0.AddArg(x)
  7471  		v.AddArg(v0)
  7472  		return true
  7473  	}
  7474  	return false
  7475  }
  7476  func rewriteValueS390X_OpS390XFMOVDload(v *Value) bool {
  7477  	v_1 := v.Args[1]
  7478  	v_0 := v.Args[0]
  7479  	// match: (FMOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  7480  	// cond: isSamePtr(ptr1, ptr2)
  7481  	// result: (LDGR x)
  7482  	for {
  7483  		off := auxIntToInt32(v.AuxInt)
  7484  		sym := auxToSym(v.Aux)
  7485  		ptr1 := v_0
  7486  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7487  			break
  7488  		}
  7489  		x := v_1.Args[1]
  7490  		ptr2 := v_1.Args[0]
  7491  		if !(isSamePtr(ptr1, ptr2)) {
  7492  			break
  7493  		}
  7494  		v.reset(OpS390XLDGR)
  7495  		v.AddArg(x)
  7496  		return true
  7497  	}
  7498  	// match: (FMOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  7499  	// cond: isSamePtr(ptr1, ptr2)
  7500  	// result: x
  7501  	for {
  7502  		off := auxIntToInt32(v.AuxInt)
  7503  		sym := auxToSym(v.Aux)
  7504  		ptr1 := v_0
  7505  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7506  			break
  7507  		}
  7508  		x := v_1.Args[1]
  7509  		ptr2 := v_1.Args[0]
  7510  		if !(isSamePtr(ptr1, ptr2)) {
  7511  			break
  7512  		}
  7513  		v.copyOf(x)
  7514  		return true
  7515  	}
  7516  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  7517  	// cond: is20Bit(int64(off1)+int64(off2))
  7518  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  7519  	for {
  7520  		off1 := auxIntToInt32(v.AuxInt)
  7521  		sym := auxToSym(v.Aux)
  7522  		if v_0.Op != OpS390XADDconst {
  7523  			break
  7524  		}
  7525  		off2 := auxIntToInt32(v_0.AuxInt)
  7526  		ptr := v_0.Args[0]
  7527  		mem := v_1
  7528  		if !(is20Bit(int64(off1) + int64(off2))) {
  7529  			break
  7530  		}
  7531  		v.reset(OpS390XFMOVDload)
  7532  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7533  		v.Aux = symToAux(sym)
  7534  		v.AddArg2(ptr, mem)
  7535  		return true
  7536  	}
  7537  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7538  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7539  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7540  	for {
  7541  		off1 := auxIntToInt32(v.AuxInt)
  7542  		sym1 := auxToSym(v.Aux)
  7543  		if v_0.Op != OpS390XMOVDaddr {
  7544  			break
  7545  		}
  7546  		off2 := auxIntToInt32(v_0.AuxInt)
  7547  		sym2 := auxToSym(v_0.Aux)
  7548  		base := v_0.Args[0]
  7549  		mem := v_1
  7550  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7551  			break
  7552  		}
  7553  		v.reset(OpS390XFMOVDload)
  7554  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7555  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7556  		v.AddArg2(base, mem)
  7557  		return true
  7558  	}
  7559  	return false
  7560  }
  7561  func rewriteValueS390X_OpS390XFMOVDstore(v *Value) bool {
  7562  	v_2 := v.Args[2]
  7563  	v_1 := v.Args[1]
  7564  	v_0 := v.Args[0]
  7565  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7566  	// cond: is20Bit(int64(off1)+int64(off2))
  7567  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  7568  	for {
  7569  		off1 := auxIntToInt32(v.AuxInt)
  7570  		sym := auxToSym(v.Aux)
  7571  		if v_0.Op != OpS390XADDconst {
  7572  			break
  7573  		}
  7574  		off2 := auxIntToInt32(v_0.AuxInt)
  7575  		ptr := v_0.Args[0]
  7576  		val := v_1
  7577  		mem := v_2
  7578  		if !(is20Bit(int64(off1) + int64(off2))) {
  7579  			break
  7580  		}
  7581  		v.reset(OpS390XFMOVDstore)
  7582  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7583  		v.Aux = symToAux(sym)
  7584  		v.AddArg3(ptr, val, mem)
  7585  		return true
  7586  	}
  7587  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7588  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7589  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7590  	for {
  7591  		off1 := auxIntToInt32(v.AuxInt)
  7592  		sym1 := auxToSym(v.Aux)
  7593  		if v_0.Op != OpS390XMOVDaddr {
  7594  			break
  7595  		}
  7596  		off2 := auxIntToInt32(v_0.AuxInt)
  7597  		sym2 := auxToSym(v_0.Aux)
  7598  		base := v_0.Args[0]
  7599  		val := v_1
  7600  		mem := v_2
  7601  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7602  			break
  7603  		}
  7604  		v.reset(OpS390XFMOVDstore)
  7605  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7606  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7607  		v.AddArg3(base, val, mem)
  7608  		return true
  7609  	}
  7610  	return false
  7611  }
  7612  func rewriteValueS390X_OpS390XFMOVSload(v *Value) bool {
  7613  	v_1 := v.Args[1]
  7614  	v_0 := v.Args[0]
  7615  	// match: (FMOVSload [off] {sym} ptr1 (FMOVSstore [off] {sym} ptr2 x _))
  7616  	// cond: isSamePtr(ptr1, ptr2)
  7617  	// result: x
  7618  	for {
  7619  		off := auxIntToInt32(v.AuxInt)
  7620  		sym := auxToSym(v.Aux)
  7621  		ptr1 := v_0
  7622  		if v_1.Op != OpS390XFMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7623  			break
  7624  		}
  7625  		x := v_1.Args[1]
  7626  		ptr2 := v_1.Args[0]
  7627  		if !(isSamePtr(ptr1, ptr2)) {
  7628  			break
  7629  		}
  7630  		v.copyOf(x)
  7631  		return true
  7632  	}
  7633  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  7634  	// cond: is20Bit(int64(off1)+int64(off2))
  7635  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  7636  	for {
  7637  		off1 := auxIntToInt32(v.AuxInt)
  7638  		sym := auxToSym(v.Aux)
  7639  		if v_0.Op != OpS390XADDconst {
  7640  			break
  7641  		}
  7642  		off2 := auxIntToInt32(v_0.AuxInt)
  7643  		ptr := v_0.Args[0]
  7644  		mem := v_1
  7645  		if !(is20Bit(int64(off1) + int64(off2))) {
  7646  			break
  7647  		}
  7648  		v.reset(OpS390XFMOVSload)
  7649  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7650  		v.Aux = symToAux(sym)
  7651  		v.AddArg2(ptr, mem)
  7652  		return true
  7653  	}
  7654  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7655  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7656  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7657  	for {
  7658  		off1 := auxIntToInt32(v.AuxInt)
  7659  		sym1 := auxToSym(v.Aux)
  7660  		if v_0.Op != OpS390XMOVDaddr {
  7661  			break
  7662  		}
  7663  		off2 := auxIntToInt32(v_0.AuxInt)
  7664  		sym2 := auxToSym(v_0.Aux)
  7665  		base := v_0.Args[0]
  7666  		mem := v_1
  7667  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7668  			break
  7669  		}
  7670  		v.reset(OpS390XFMOVSload)
  7671  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7672  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7673  		v.AddArg2(base, mem)
  7674  		return true
  7675  	}
  7676  	return false
  7677  }
  7678  func rewriteValueS390X_OpS390XFMOVSstore(v *Value) bool {
  7679  	v_2 := v.Args[2]
  7680  	v_1 := v.Args[1]
  7681  	v_0 := v.Args[0]
  7682  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7683  	// cond: is20Bit(int64(off1)+int64(off2))
  7684  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  7685  	for {
  7686  		off1 := auxIntToInt32(v.AuxInt)
  7687  		sym := auxToSym(v.Aux)
  7688  		if v_0.Op != OpS390XADDconst {
  7689  			break
  7690  		}
  7691  		off2 := auxIntToInt32(v_0.AuxInt)
  7692  		ptr := v_0.Args[0]
  7693  		val := v_1
  7694  		mem := v_2
  7695  		if !(is20Bit(int64(off1) + int64(off2))) {
  7696  			break
  7697  		}
  7698  		v.reset(OpS390XFMOVSstore)
  7699  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7700  		v.Aux = symToAux(sym)
  7701  		v.AddArg3(ptr, val, mem)
  7702  		return true
  7703  	}
  7704  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7705  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7706  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7707  	for {
  7708  		off1 := auxIntToInt32(v.AuxInt)
  7709  		sym1 := auxToSym(v.Aux)
  7710  		if v_0.Op != OpS390XMOVDaddr {
  7711  			break
  7712  		}
  7713  		off2 := auxIntToInt32(v_0.AuxInt)
  7714  		sym2 := auxToSym(v_0.Aux)
  7715  		base := v_0.Args[0]
  7716  		val := v_1
  7717  		mem := v_2
  7718  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7719  			break
  7720  		}
  7721  		v.reset(OpS390XFMOVSstore)
  7722  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7723  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7724  		v.AddArg3(base, val, mem)
  7725  		return true
  7726  	}
  7727  	return false
  7728  }
  7729  func rewriteValueS390X_OpS390XFNEG(v *Value) bool {
  7730  	v_0 := v.Args[0]
  7731  	// match: (FNEG (LPDFR x))
  7732  	// result: (LNDFR x)
  7733  	for {
  7734  		if v_0.Op != OpS390XLPDFR {
  7735  			break
  7736  		}
  7737  		x := v_0.Args[0]
  7738  		v.reset(OpS390XLNDFR)
  7739  		v.AddArg(x)
  7740  		return true
  7741  	}
  7742  	// match: (FNEG (LNDFR x))
  7743  	// result: (LPDFR x)
  7744  	for {
  7745  		if v_0.Op != OpS390XLNDFR {
  7746  			break
  7747  		}
  7748  		x := v_0.Args[0]
  7749  		v.reset(OpS390XLPDFR)
  7750  		v.AddArg(x)
  7751  		return true
  7752  	}
  7753  	return false
  7754  }
  7755  func rewriteValueS390X_OpS390XFNEGS(v *Value) bool {
  7756  	v_0 := v.Args[0]
  7757  	// match: (FNEGS (LPDFR x))
  7758  	// result: (LNDFR x)
  7759  	for {
  7760  		if v_0.Op != OpS390XLPDFR {
  7761  			break
  7762  		}
  7763  		x := v_0.Args[0]
  7764  		v.reset(OpS390XLNDFR)
  7765  		v.AddArg(x)
  7766  		return true
  7767  	}
  7768  	// match: (FNEGS (LNDFR x))
  7769  	// result: (LPDFR x)
  7770  	for {
  7771  		if v_0.Op != OpS390XLNDFR {
  7772  			break
  7773  		}
  7774  		x := v_0.Args[0]
  7775  		v.reset(OpS390XLPDFR)
  7776  		v.AddArg(x)
  7777  		return true
  7778  	}
  7779  	return false
  7780  }
  7781  func rewriteValueS390X_OpS390XLDGR(v *Value) bool {
  7782  	v_0 := v.Args[0]
  7783  	b := v.Block
  7784  	// match: (LDGR <t> (RISBGZ x {r}))
  7785  	// cond: r == s390x.NewRotateParams(1, 63, 0)
  7786  	// result: (LPDFR (LDGR <t> x))
  7787  	for {
  7788  		t := v.Type
  7789  		if v_0.Op != OpS390XRISBGZ {
  7790  			break
  7791  		}
  7792  		r := auxToS390xRotateParams(v_0.Aux)
  7793  		x := v_0.Args[0]
  7794  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
  7795  			break
  7796  		}
  7797  		v.reset(OpS390XLPDFR)
  7798  		v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7799  		v0.AddArg(x)
  7800  		v.AddArg(v0)
  7801  		return true
  7802  	}
  7803  	// match: (LDGR <t> (OR (MOVDconst [-1<<63]) x))
  7804  	// result: (LNDFR (LDGR <t> x))
  7805  	for {
  7806  		t := v.Type
  7807  		if v_0.Op != OpS390XOR {
  7808  			break
  7809  		}
  7810  		_ = v_0.Args[1]
  7811  		v_0_0 := v_0.Args[0]
  7812  		v_0_1 := v_0.Args[1]
  7813  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7814  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != -1<<63 {
  7815  				continue
  7816  			}
  7817  			x := v_0_1
  7818  			v.reset(OpS390XLNDFR)
  7819  			v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7820  			v0.AddArg(x)
  7821  			v.AddArg(v0)
  7822  			return true
  7823  		}
  7824  		break
  7825  	}
  7826  	// match: (LDGR <t> x:(ORload <t1> [off] {sym} (MOVDconst [-1<<63]) ptr mem))
  7827  	// cond: x.Uses == 1 && clobber(x)
  7828  	// result: @x.Block (LNDFR <t> (LDGR <t> (MOVDload <t1> [off] {sym} ptr mem)))
  7829  	for {
  7830  		t := v.Type
  7831  		x := v_0
  7832  		if x.Op != OpS390XORload {
  7833  			break
  7834  		}
  7835  		t1 := x.Type
  7836  		off := auxIntToInt32(x.AuxInt)
  7837  		sym := auxToSym(x.Aux)
  7838  		mem := x.Args[2]
  7839  		x_0 := x.Args[0]
  7840  		if x_0.Op != OpS390XMOVDconst || auxIntToInt64(x_0.AuxInt) != -1<<63 {
  7841  			break
  7842  		}
  7843  		ptr := x.Args[1]
  7844  		if !(x.Uses == 1 && clobber(x)) {
  7845  			break
  7846  		}
  7847  		b = x.Block
  7848  		v0 := b.NewValue0(x.Pos, OpS390XLNDFR, t)
  7849  		v.copyOf(v0)
  7850  		v1 := b.NewValue0(x.Pos, OpS390XLDGR, t)
  7851  		v2 := b.NewValue0(x.Pos, OpS390XMOVDload, t1)
  7852  		v2.AuxInt = int32ToAuxInt(off)
  7853  		v2.Aux = symToAux(sym)
  7854  		v2.AddArg2(ptr, mem)
  7855  		v1.AddArg(v2)
  7856  		v0.AddArg(v1)
  7857  		return true
  7858  	}
  7859  	// match: (LDGR (LGDR x))
  7860  	// result: x
  7861  	for {
  7862  		if v_0.Op != OpS390XLGDR {
  7863  			break
  7864  		}
  7865  		x := v_0.Args[0]
  7866  		v.copyOf(x)
  7867  		return true
  7868  	}
  7869  	return false
  7870  }
  7871  func rewriteValueS390X_OpS390XLEDBR(v *Value) bool {
  7872  	v_0 := v.Args[0]
  7873  	// match: (LEDBR (LPDFR (LDEBR x)))
  7874  	// result: (LPDFR x)
  7875  	for {
  7876  		if v_0.Op != OpS390XLPDFR {
  7877  			break
  7878  		}
  7879  		v_0_0 := v_0.Args[0]
  7880  		if v_0_0.Op != OpS390XLDEBR {
  7881  			break
  7882  		}
  7883  		x := v_0_0.Args[0]
  7884  		v.reset(OpS390XLPDFR)
  7885  		v.AddArg(x)
  7886  		return true
  7887  	}
  7888  	// match: (LEDBR (LNDFR (LDEBR x)))
  7889  	// result: (LNDFR x)
  7890  	for {
  7891  		if v_0.Op != OpS390XLNDFR {
  7892  			break
  7893  		}
  7894  		v_0_0 := v_0.Args[0]
  7895  		if v_0_0.Op != OpS390XLDEBR {
  7896  			break
  7897  		}
  7898  		x := v_0_0.Args[0]
  7899  		v.reset(OpS390XLNDFR)
  7900  		v.AddArg(x)
  7901  		return true
  7902  	}
  7903  	return false
  7904  }
  7905  func rewriteValueS390X_OpS390XLGDR(v *Value) bool {
  7906  	v_0 := v.Args[0]
  7907  	// match: (LGDR (LDGR x))
  7908  	// result: x
  7909  	for {
  7910  		if v_0.Op != OpS390XLDGR {
  7911  			break
  7912  		}
  7913  		x := v_0.Args[0]
  7914  		v.copyOf(x)
  7915  		return true
  7916  	}
  7917  	return false
  7918  }
  7919  func rewriteValueS390X_OpS390XLOCGR(v *Value) bool {
  7920  	v_2 := v.Args[2]
  7921  	v_1 := v.Args[1]
  7922  	v_0 := v.Args[0]
  7923  	// match: (LOCGR {c} x y (InvertFlags cmp))
  7924  	// result: (LOCGR {c.ReverseComparison()} x y cmp)
  7925  	for {
  7926  		c := auxToS390xCCMask(v.Aux)
  7927  		x := v_0
  7928  		y := v_1
  7929  		if v_2.Op != OpS390XInvertFlags {
  7930  			break
  7931  		}
  7932  		cmp := v_2.Args[0]
  7933  		v.reset(OpS390XLOCGR)
  7934  		v.Aux = s390xCCMaskToAux(c.ReverseComparison())
  7935  		v.AddArg3(x, y, cmp)
  7936  		return true
  7937  	}
  7938  	// match: (LOCGR {c} _ x (FlagEQ))
  7939  	// cond: c&s390x.Equal != 0
  7940  	// result: x
  7941  	for {
  7942  		c := auxToS390xCCMask(v.Aux)
  7943  		x := v_1
  7944  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal != 0) {
  7945  			break
  7946  		}
  7947  		v.copyOf(x)
  7948  		return true
  7949  	}
  7950  	// match: (LOCGR {c} _ x (FlagLT))
  7951  	// cond: c&s390x.Less != 0
  7952  	// result: x
  7953  	for {
  7954  		c := auxToS390xCCMask(v.Aux)
  7955  		x := v_1
  7956  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less != 0) {
  7957  			break
  7958  		}
  7959  		v.copyOf(x)
  7960  		return true
  7961  	}
  7962  	// match: (LOCGR {c} _ x (FlagGT))
  7963  	// cond: c&s390x.Greater != 0
  7964  	// result: x
  7965  	for {
  7966  		c := auxToS390xCCMask(v.Aux)
  7967  		x := v_1
  7968  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater != 0) {
  7969  			break
  7970  		}
  7971  		v.copyOf(x)
  7972  		return true
  7973  	}
  7974  	// match: (LOCGR {c} _ x (FlagOV))
  7975  	// cond: c&s390x.Unordered != 0
  7976  	// result: x
  7977  	for {
  7978  		c := auxToS390xCCMask(v.Aux)
  7979  		x := v_1
  7980  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered != 0) {
  7981  			break
  7982  		}
  7983  		v.copyOf(x)
  7984  		return true
  7985  	}
  7986  	// match: (LOCGR {c} x _ (FlagEQ))
  7987  	// cond: c&s390x.Equal == 0
  7988  	// result: x
  7989  	for {
  7990  		c := auxToS390xCCMask(v.Aux)
  7991  		x := v_0
  7992  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal == 0) {
  7993  			break
  7994  		}
  7995  		v.copyOf(x)
  7996  		return true
  7997  	}
  7998  	// match: (LOCGR {c} x _ (FlagLT))
  7999  	// cond: c&s390x.Less == 0
  8000  	// result: x
  8001  	for {
  8002  		c := auxToS390xCCMask(v.Aux)
  8003  		x := v_0
  8004  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less == 0) {
  8005  			break
  8006  		}
  8007  		v.copyOf(x)
  8008  		return true
  8009  	}
  8010  	// match: (LOCGR {c} x _ (FlagGT))
  8011  	// cond: c&s390x.Greater == 0
  8012  	// result: x
  8013  	for {
  8014  		c := auxToS390xCCMask(v.Aux)
  8015  		x := v_0
  8016  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater == 0) {
  8017  			break
  8018  		}
  8019  		v.copyOf(x)
  8020  		return true
  8021  	}
  8022  	// match: (LOCGR {c} x _ (FlagOV))
  8023  	// cond: c&s390x.Unordered == 0
  8024  	// result: x
  8025  	for {
  8026  		c := auxToS390xCCMask(v.Aux)
  8027  		x := v_0
  8028  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered == 0) {
  8029  			break
  8030  		}
  8031  		v.copyOf(x)
  8032  		return true
  8033  	}
  8034  	return false
  8035  }
  8036  func rewriteValueS390X_OpS390XLTDBR(v *Value) bool {
  8037  	v_0 := v.Args[0]
  8038  	b := v.Block
  8039  	// match: (LTDBR (Select0 x:(FADD _ _)))
  8040  	// cond: b == x.Block
  8041  	// result: (Select1 x)
  8042  	for {
  8043  		if v_0.Op != OpSelect0 {
  8044  			break
  8045  		}
  8046  		x := v_0.Args[0]
  8047  		if x.Op != OpS390XFADD || !(b == x.Block) {
  8048  			break
  8049  		}
  8050  		v.reset(OpSelect1)
  8051  		v.AddArg(x)
  8052  		return true
  8053  	}
  8054  	// match: (LTDBR (Select0 x:(FSUB _ _)))
  8055  	// cond: b == x.Block
  8056  	// result: (Select1 x)
  8057  	for {
  8058  		if v_0.Op != OpSelect0 {
  8059  			break
  8060  		}
  8061  		x := v_0.Args[0]
  8062  		if x.Op != OpS390XFSUB || !(b == x.Block) {
  8063  			break
  8064  		}
  8065  		v.reset(OpSelect1)
  8066  		v.AddArg(x)
  8067  		return true
  8068  	}
  8069  	return false
  8070  }
  8071  func rewriteValueS390X_OpS390XLTEBR(v *Value) bool {
  8072  	v_0 := v.Args[0]
  8073  	b := v.Block
  8074  	// match: (LTEBR (Select0 x:(FADDS _ _)))
  8075  	// cond: b == x.Block
  8076  	// result: (Select1 x)
  8077  	for {
  8078  		if v_0.Op != OpSelect0 {
  8079  			break
  8080  		}
  8081  		x := v_0.Args[0]
  8082  		if x.Op != OpS390XFADDS || !(b == x.Block) {
  8083  			break
  8084  		}
  8085  		v.reset(OpSelect1)
  8086  		v.AddArg(x)
  8087  		return true
  8088  	}
  8089  	// match: (LTEBR (Select0 x:(FSUBS _ _)))
  8090  	// cond: b == x.Block
  8091  	// result: (Select1 x)
  8092  	for {
  8093  		if v_0.Op != OpSelect0 {
  8094  			break
  8095  		}
  8096  		x := v_0.Args[0]
  8097  		if x.Op != OpS390XFSUBS || !(b == x.Block) {
  8098  			break
  8099  		}
  8100  		v.reset(OpSelect1)
  8101  		v.AddArg(x)
  8102  		return true
  8103  	}
  8104  	return false
  8105  }
  8106  func rewriteValueS390X_OpS390XLoweredPanicBoundsCR(v *Value) bool {
  8107  	v_1 := v.Args[1]
  8108  	v_0 := v.Args[0]
  8109  	// match: (LoweredPanicBoundsCR [kind] {p} (MOVDconst [c]) mem)
  8110  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:p.C, Cy:c}} mem)
  8111  	for {
  8112  		kind := auxIntToInt64(v.AuxInt)
  8113  		p := auxToPanicBoundsC(v.Aux)
  8114  		if v_0.Op != OpS390XMOVDconst {
  8115  			break
  8116  		}
  8117  		c := auxIntToInt64(v_0.AuxInt)
  8118  		mem := v_1
  8119  		v.reset(OpS390XLoweredPanicBoundsCC)
  8120  		v.AuxInt = int64ToAuxInt(kind)
  8121  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: p.C, Cy: c})
  8122  		v.AddArg(mem)
  8123  		return true
  8124  	}
  8125  	return false
  8126  }
  8127  func rewriteValueS390X_OpS390XLoweredPanicBoundsRC(v *Value) bool {
  8128  	v_1 := v.Args[1]
  8129  	v_0 := v.Args[0]
  8130  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVDconst [c]) mem)
  8131  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:c, Cy:p.C}} mem)
  8132  	for {
  8133  		kind := auxIntToInt64(v.AuxInt)
  8134  		p := auxToPanicBoundsC(v.Aux)
  8135  		if v_0.Op != OpS390XMOVDconst {
  8136  			break
  8137  		}
  8138  		c := auxIntToInt64(v_0.AuxInt)
  8139  		mem := v_1
  8140  		v.reset(OpS390XLoweredPanicBoundsCC)
  8141  		v.AuxInt = int64ToAuxInt(kind)
  8142  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: c, Cy: p.C})
  8143  		v.AddArg(mem)
  8144  		return true
  8145  	}
  8146  	return false
  8147  }
  8148  func rewriteValueS390X_OpS390XLoweredPanicBoundsRR(v *Value) bool {
  8149  	v_2 := v.Args[2]
  8150  	v_1 := v.Args[1]
  8151  	v_0 := v.Args[0]
  8152  	// match: (LoweredPanicBoundsRR [kind] x (MOVDconst [c]) mem)
  8153  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:c}} mem)
  8154  	for {
  8155  		kind := auxIntToInt64(v.AuxInt)
  8156  		x := v_0
  8157  		if v_1.Op != OpS390XMOVDconst {
  8158  			break
  8159  		}
  8160  		c := auxIntToInt64(v_1.AuxInt)
  8161  		mem := v_2
  8162  		v.reset(OpS390XLoweredPanicBoundsRC)
  8163  		v.AuxInt = int64ToAuxInt(kind)
  8164  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8165  		v.AddArg2(x, mem)
  8166  		return true
  8167  	}
  8168  	// match: (LoweredPanicBoundsRR [kind] (MOVDconst [c]) y mem)
  8169  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:c}} y mem)
  8170  	for {
  8171  		kind := auxIntToInt64(v.AuxInt)
  8172  		if v_0.Op != OpS390XMOVDconst {
  8173  			break
  8174  		}
  8175  		c := auxIntToInt64(v_0.AuxInt)
  8176  		y := v_1
  8177  		mem := v_2
  8178  		v.reset(OpS390XLoweredPanicBoundsCR)
  8179  		v.AuxInt = int64ToAuxInt(kind)
  8180  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: c})
  8181  		v.AddArg2(y, mem)
  8182  		return true
  8183  	}
  8184  	return false
  8185  }
  8186  func rewriteValueS390X_OpS390XLoweredRound32F(v *Value) bool {
  8187  	v_0 := v.Args[0]
  8188  	// match: (LoweredRound32F x:(FMOVSconst))
  8189  	// result: x
  8190  	for {
  8191  		x := v_0
  8192  		if x.Op != OpS390XFMOVSconst {
  8193  			break
  8194  		}
  8195  		v.copyOf(x)
  8196  		return true
  8197  	}
  8198  	return false
  8199  }
  8200  func rewriteValueS390X_OpS390XLoweredRound64F(v *Value) bool {
  8201  	v_0 := v.Args[0]
  8202  	// match: (LoweredRound64F x:(FMOVDconst))
  8203  	// result: x
  8204  	for {
  8205  		x := v_0
  8206  		if x.Op != OpS390XFMOVDconst {
  8207  			break
  8208  		}
  8209  		v.copyOf(x)
  8210  		return true
  8211  	}
  8212  	return false
  8213  }
  8214  func rewriteValueS390X_OpS390XMOVBZload(v *Value) bool {
  8215  	v_1 := v.Args[1]
  8216  	v_0 := v.Args[0]
  8217  	// match: (MOVBZload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8218  	// cond: isSamePtr(ptr1, ptr2)
  8219  	// result: (MOVBZreg x)
  8220  	for {
  8221  		off := auxIntToInt32(v.AuxInt)
  8222  		sym := auxToSym(v.Aux)
  8223  		ptr1 := v_0
  8224  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8225  			break
  8226  		}
  8227  		x := v_1.Args[1]
  8228  		ptr2 := v_1.Args[0]
  8229  		if !(isSamePtr(ptr1, ptr2)) {
  8230  			break
  8231  		}
  8232  		v.reset(OpS390XMOVBZreg)
  8233  		v.AddArg(x)
  8234  		return true
  8235  	}
  8236  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] ptr) mem)
  8237  	// cond: is20Bit(int64(off1)+int64(off2))
  8238  	// result: (MOVBZload [off1+off2] {sym} ptr mem)
  8239  	for {
  8240  		off1 := auxIntToInt32(v.AuxInt)
  8241  		sym := auxToSym(v.Aux)
  8242  		if v_0.Op != OpS390XADDconst {
  8243  			break
  8244  		}
  8245  		off2 := auxIntToInt32(v_0.AuxInt)
  8246  		ptr := v_0.Args[0]
  8247  		mem := v_1
  8248  		if !(is20Bit(int64(off1) + int64(off2))) {
  8249  			break
  8250  		}
  8251  		v.reset(OpS390XMOVBZload)
  8252  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8253  		v.Aux = symToAux(sym)
  8254  		v.AddArg2(ptr, mem)
  8255  		return true
  8256  	}
  8257  	// match: (MOVBZload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8258  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8259  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8260  	for {
  8261  		off1 := auxIntToInt32(v.AuxInt)
  8262  		sym1 := auxToSym(v.Aux)
  8263  		if v_0.Op != OpS390XMOVDaddr {
  8264  			break
  8265  		}
  8266  		off2 := auxIntToInt32(v_0.AuxInt)
  8267  		sym2 := auxToSym(v_0.Aux)
  8268  		base := v_0.Args[0]
  8269  		mem := v_1
  8270  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8271  			break
  8272  		}
  8273  		v.reset(OpS390XMOVBZload)
  8274  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8275  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8276  		v.AddArg2(base, mem)
  8277  		return true
  8278  	}
  8279  	return false
  8280  }
  8281  func rewriteValueS390X_OpS390XMOVBZreg(v *Value) bool {
  8282  	v_0 := v.Args[0]
  8283  	b := v.Block
  8284  	typ := &b.Func.Config.Types
  8285  	// match: (MOVBZreg e:(MOVBreg x))
  8286  	// cond: clobberIfDead(e)
  8287  	// result: (MOVBZreg x)
  8288  	for {
  8289  		e := v_0
  8290  		if e.Op != OpS390XMOVBreg {
  8291  			break
  8292  		}
  8293  		x := e.Args[0]
  8294  		if !(clobberIfDead(e)) {
  8295  			break
  8296  		}
  8297  		v.reset(OpS390XMOVBZreg)
  8298  		v.AddArg(x)
  8299  		return true
  8300  	}
  8301  	// match: (MOVBZreg e:(MOVHreg x))
  8302  	// cond: clobberIfDead(e)
  8303  	// result: (MOVBZreg x)
  8304  	for {
  8305  		e := v_0
  8306  		if e.Op != OpS390XMOVHreg {
  8307  			break
  8308  		}
  8309  		x := e.Args[0]
  8310  		if !(clobberIfDead(e)) {
  8311  			break
  8312  		}
  8313  		v.reset(OpS390XMOVBZreg)
  8314  		v.AddArg(x)
  8315  		return true
  8316  	}
  8317  	// match: (MOVBZreg e:(MOVWreg x))
  8318  	// cond: clobberIfDead(e)
  8319  	// result: (MOVBZreg x)
  8320  	for {
  8321  		e := v_0
  8322  		if e.Op != OpS390XMOVWreg {
  8323  			break
  8324  		}
  8325  		x := e.Args[0]
  8326  		if !(clobberIfDead(e)) {
  8327  			break
  8328  		}
  8329  		v.reset(OpS390XMOVBZreg)
  8330  		v.AddArg(x)
  8331  		return true
  8332  	}
  8333  	// match: (MOVBZreg e:(MOVBZreg x))
  8334  	// cond: clobberIfDead(e)
  8335  	// result: (MOVBZreg x)
  8336  	for {
  8337  		e := v_0
  8338  		if e.Op != OpS390XMOVBZreg {
  8339  			break
  8340  		}
  8341  		x := e.Args[0]
  8342  		if !(clobberIfDead(e)) {
  8343  			break
  8344  		}
  8345  		v.reset(OpS390XMOVBZreg)
  8346  		v.AddArg(x)
  8347  		return true
  8348  	}
  8349  	// match: (MOVBZreg e:(MOVHZreg x))
  8350  	// cond: clobberIfDead(e)
  8351  	// result: (MOVBZreg x)
  8352  	for {
  8353  		e := v_0
  8354  		if e.Op != OpS390XMOVHZreg {
  8355  			break
  8356  		}
  8357  		x := e.Args[0]
  8358  		if !(clobberIfDead(e)) {
  8359  			break
  8360  		}
  8361  		v.reset(OpS390XMOVBZreg)
  8362  		v.AddArg(x)
  8363  		return true
  8364  	}
  8365  	// match: (MOVBZreg e:(MOVWZreg x))
  8366  	// cond: clobberIfDead(e)
  8367  	// result: (MOVBZreg x)
  8368  	for {
  8369  		e := v_0
  8370  		if e.Op != OpS390XMOVWZreg {
  8371  			break
  8372  		}
  8373  		x := e.Args[0]
  8374  		if !(clobberIfDead(e)) {
  8375  			break
  8376  		}
  8377  		v.reset(OpS390XMOVBZreg)
  8378  		v.AddArg(x)
  8379  		return true
  8380  	}
  8381  	// match: (MOVBZreg x:(MOVBZload _ _))
  8382  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  8383  	// result: x
  8384  	for {
  8385  		x := v_0
  8386  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  8387  			break
  8388  		}
  8389  		v.copyOf(x)
  8390  		return true
  8391  	}
  8392  	// match: (MOVBZreg <t> x:(MOVBload [o] {s} p mem))
  8393  	// cond: x.Uses == 1 && clobber(x)
  8394  	// result: @x.Block (MOVBZload <t> [o] {s} p mem)
  8395  	for {
  8396  		t := v.Type
  8397  		x := v_0
  8398  		if x.Op != OpS390XMOVBload {
  8399  			break
  8400  		}
  8401  		o := auxIntToInt32(x.AuxInt)
  8402  		s := auxToSym(x.Aux)
  8403  		mem := x.Args[1]
  8404  		p := x.Args[0]
  8405  		if !(x.Uses == 1 && clobber(x)) {
  8406  			break
  8407  		}
  8408  		b = x.Block
  8409  		v0 := b.NewValue0(x.Pos, OpS390XMOVBZload, t)
  8410  		v.copyOf(v0)
  8411  		v0.AuxInt = int32ToAuxInt(o)
  8412  		v0.Aux = symToAux(s)
  8413  		v0.AddArg2(p, mem)
  8414  		return true
  8415  	}
  8416  	// match: (MOVBZreg x:(Arg <t>))
  8417  	// cond: !t.IsSigned() && t.Size() == 1
  8418  	// result: x
  8419  	for {
  8420  		x := v_0
  8421  		if x.Op != OpArg {
  8422  			break
  8423  		}
  8424  		t := x.Type
  8425  		if !(!t.IsSigned() && t.Size() == 1) {
  8426  			break
  8427  		}
  8428  		v.copyOf(x)
  8429  		return true
  8430  	}
  8431  	// match: (MOVBZreg (MOVDconst [c]))
  8432  	// result: (MOVDconst [int64( uint8(c))])
  8433  	for {
  8434  		if v_0.Op != OpS390XMOVDconst {
  8435  			break
  8436  		}
  8437  		c := auxIntToInt64(v_0.AuxInt)
  8438  		v.reset(OpS390XMOVDconst)
  8439  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8440  		return true
  8441  	}
  8442  	// match: (MOVBZreg x:(LOCGR (MOVDconst [c]) (MOVDconst [d]) _))
  8443  	// cond: int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)
  8444  	// result: x
  8445  	for {
  8446  		x := v_0
  8447  		if x.Op != OpS390XLOCGR {
  8448  			break
  8449  		}
  8450  		_ = x.Args[1]
  8451  		x_0 := x.Args[0]
  8452  		if x_0.Op != OpS390XMOVDconst {
  8453  			break
  8454  		}
  8455  		c := auxIntToInt64(x_0.AuxInt)
  8456  		x_1 := x.Args[1]
  8457  		if x_1.Op != OpS390XMOVDconst {
  8458  			break
  8459  		}
  8460  		d := auxIntToInt64(x_1.AuxInt)
  8461  		if !(int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)) {
  8462  			break
  8463  		}
  8464  		v.copyOf(x)
  8465  		return true
  8466  	}
  8467  	// match: (MOVBZreg (RISBGZ x {r}))
  8468  	// cond: r.OutMerge(0x000000ff) != nil
  8469  	// result: (RISBGZ x {*r.OutMerge(0x000000ff)})
  8470  	for {
  8471  		if v_0.Op != OpS390XRISBGZ {
  8472  			break
  8473  		}
  8474  		r := auxToS390xRotateParams(v_0.Aux)
  8475  		x := v_0.Args[0]
  8476  		if !(r.OutMerge(0x000000ff) != nil) {
  8477  			break
  8478  		}
  8479  		v.reset(OpS390XRISBGZ)
  8480  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x000000ff))
  8481  		v.AddArg(x)
  8482  		return true
  8483  	}
  8484  	// match: (MOVBZreg (ANDWconst [m] x))
  8485  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8486  	for {
  8487  		if v_0.Op != OpS390XANDWconst {
  8488  			break
  8489  		}
  8490  		m := auxIntToInt32(v_0.AuxInt)
  8491  		x := v_0.Args[0]
  8492  		v.reset(OpS390XMOVWZreg)
  8493  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8494  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8495  		v0.AddArg(x)
  8496  		v.AddArg(v0)
  8497  		return true
  8498  	}
  8499  	return false
  8500  }
  8501  func rewriteValueS390X_OpS390XMOVBload(v *Value) bool {
  8502  	v_1 := v.Args[1]
  8503  	v_0 := v.Args[0]
  8504  	// match: (MOVBload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8505  	// cond: isSamePtr(ptr1, ptr2)
  8506  	// result: (MOVBreg x)
  8507  	for {
  8508  		off := auxIntToInt32(v.AuxInt)
  8509  		sym := auxToSym(v.Aux)
  8510  		ptr1 := v_0
  8511  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8512  			break
  8513  		}
  8514  		x := v_1.Args[1]
  8515  		ptr2 := v_1.Args[0]
  8516  		if !(isSamePtr(ptr1, ptr2)) {
  8517  			break
  8518  		}
  8519  		v.reset(OpS390XMOVBreg)
  8520  		v.AddArg(x)
  8521  		return true
  8522  	}
  8523  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8524  	// cond: is20Bit(int64(off1)+int64(off2))
  8525  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  8526  	for {
  8527  		off1 := auxIntToInt32(v.AuxInt)
  8528  		sym := auxToSym(v.Aux)
  8529  		if v_0.Op != OpS390XADDconst {
  8530  			break
  8531  		}
  8532  		off2 := auxIntToInt32(v_0.AuxInt)
  8533  		ptr := v_0.Args[0]
  8534  		mem := v_1
  8535  		if !(is20Bit(int64(off1) + int64(off2))) {
  8536  			break
  8537  		}
  8538  		v.reset(OpS390XMOVBload)
  8539  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8540  		v.Aux = symToAux(sym)
  8541  		v.AddArg2(ptr, mem)
  8542  		return true
  8543  	}
  8544  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8545  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8546  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8547  	for {
  8548  		off1 := auxIntToInt32(v.AuxInt)
  8549  		sym1 := auxToSym(v.Aux)
  8550  		if v_0.Op != OpS390XMOVDaddr {
  8551  			break
  8552  		}
  8553  		off2 := auxIntToInt32(v_0.AuxInt)
  8554  		sym2 := auxToSym(v_0.Aux)
  8555  		base := v_0.Args[0]
  8556  		mem := v_1
  8557  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8558  			break
  8559  		}
  8560  		v.reset(OpS390XMOVBload)
  8561  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8562  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8563  		v.AddArg2(base, mem)
  8564  		return true
  8565  	}
  8566  	return false
  8567  }
  8568  func rewriteValueS390X_OpS390XMOVBreg(v *Value) bool {
  8569  	v_0 := v.Args[0]
  8570  	b := v.Block
  8571  	typ := &b.Func.Config.Types
  8572  	// match: (MOVBreg e:(MOVBreg x))
  8573  	// cond: clobberIfDead(e)
  8574  	// result: (MOVBreg x)
  8575  	for {
  8576  		e := v_0
  8577  		if e.Op != OpS390XMOVBreg {
  8578  			break
  8579  		}
  8580  		x := e.Args[0]
  8581  		if !(clobberIfDead(e)) {
  8582  			break
  8583  		}
  8584  		v.reset(OpS390XMOVBreg)
  8585  		v.AddArg(x)
  8586  		return true
  8587  	}
  8588  	// match: (MOVBreg e:(MOVHreg x))
  8589  	// cond: clobberIfDead(e)
  8590  	// result: (MOVBreg x)
  8591  	for {
  8592  		e := v_0
  8593  		if e.Op != OpS390XMOVHreg {
  8594  			break
  8595  		}
  8596  		x := e.Args[0]
  8597  		if !(clobberIfDead(e)) {
  8598  			break
  8599  		}
  8600  		v.reset(OpS390XMOVBreg)
  8601  		v.AddArg(x)
  8602  		return true
  8603  	}
  8604  	// match: (MOVBreg e:(MOVWreg x))
  8605  	// cond: clobberIfDead(e)
  8606  	// result: (MOVBreg x)
  8607  	for {
  8608  		e := v_0
  8609  		if e.Op != OpS390XMOVWreg {
  8610  			break
  8611  		}
  8612  		x := e.Args[0]
  8613  		if !(clobberIfDead(e)) {
  8614  			break
  8615  		}
  8616  		v.reset(OpS390XMOVBreg)
  8617  		v.AddArg(x)
  8618  		return true
  8619  	}
  8620  	// match: (MOVBreg e:(MOVBZreg x))
  8621  	// cond: clobberIfDead(e)
  8622  	// result: (MOVBreg x)
  8623  	for {
  8624  		e := v_0
  8625  		if e.Op != OpS390XMOVBZreg {
  8626  			break
  8627  		}
  8628  		x := e.Args[0]
  8629  		if !(clobberIfDead(e)) {
  8630  			break
  8631  		}
  8632  		v.reset(OpS390XMOVBreg)
  8633  		v.AddArg(x)
  8634  		return true
  8635  	}
  8636  	// match: (MOVBreg e:(MOVHZreg x))
  8637  	// cond: clobberIfDead(e)
  8638  	// result: (MOVBreg x)
  8639  	for {
  8640  		e := v_0
  8641  		if e.Op != OpS390XMOVHZreg {
  8642  			break
  8643  		}
  8644  		x := e.Args[0]
  8645  		if !(clobberIfDead(e)) {
  8646  			break
  8647  		}
  8648  		v.reset(OpS390XMOVBreg)
  8649  		v.AddArg(x)
  8650  		return true
  8651  	}
  8652  	// match: (MOVBreg e:(MOVWZreg x))
  8653  	// cond: clobberIfDead(e)
  8654  	// result: (MOVBreg x)
  8655  	for {
  8656  		e := v_0
  8657  		if e.Op != OpS390XMOVWZreg {
  8658  			break
  8659  		}
  8660  		x := e.Args[0]
  8661  		if !(clobberIfDead(e)) {
  8662  			break
  8663  		}
  8664  		v.reset(OpS390XMOVBreg)
  8665  		v.AddArg(x)
  8666  		return true
  8667  	}
  8668  	// match: (MOVBreg x:(MOVBload _ _))
  8669  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  8670  	// result: x
  8671  	for {
  8672  		x := v_0
  8673  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  8674  			break
  8675  		}
  8676  		v.copyOf(x)
  8677  		return true
  8678  	}
  8679  	// match: (MOVBreg <t> x:(MOVBZload [o] {s} p mem))
  8680  	// cond: x.Uses == 1 && clobber(x)
  8681  	// result: @x.Block (MOVBload <t> [o] {s} p mem)
  8682  	for {
  8683  		t := v.Type
  8684  		x := v_0
  8685  		if x.Op != OpS390XMOVBZload {
  8686  			break
  8687  		}
  8688  		o := auxIntToInt32(x.AuxInt)
  8689  		s := auxToSym(x.Aux)
  8690  		mem := x.Args[1]
  8691  		p := x.Args[0]
  8692  		if !(x.Uses == 1 && clobber(x)) {
  8693  			break
  8694  		}
  8695  		b = x.Block
  8696  		v0 := b.NewValue0(x.Pos, OpS390XMOVBload, t)
  8697  		v.copyOf(v0)
  8698  		v0.AuxInt = int32ToAuxInt(o)
  8699  		v0.Aux = symToAux(s)
  8700  		v0.AddArg2(p, mem)
  8701  		return true
  8702  	}
  8703  	// match: (MOVBreg x:(Arg <t>))
  8704  	// cond: t.IsSigned() && t.Size() == 1
  8705  	// result: x
  8706  	for {
  8707  		x := v_0
  8708  		if x.Op != OpArg {
  8709  			break
  8710  		}
  8711  		t := x.Type
  8712  		if !(t.IsSigned() && t.Size() == 1) {
  8713  			break
  8714  		}
  8715  		v.copyOf(x)
  8716  		return true
  8717  	}
  8718  	// match: (MOVBreg (MOVDconst [c]))
  8719  	// result: (MOVDconst [int64( int8(c))])
  8720  	for {
  8721  		if v_0.Op != OpS390XMOVDconst {
  8722  			break
  8723  		}
  8724  		c := auxIntToInt64(v_0.AuxInt)
  8725  		v.reset(OpS390XMOVDconst)
  8726  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8727  		return true
  8728  	}
  8729  	// match: (MOVBreg (ANDWconst [m] x))
  8730  	// cond: int8(m) >= 0
  8731  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8732  	for {
  8733  		if v_0.Op != OpS390XANDWconst {
  8734  			break
  8735  		}
  8736  		m := auxIntToInt32(v_0.AuxInt)
  8737  		x := v_0.Args[0]
  8738  		if !(int8(m) >= 0) {
  8739  			break
  8740  		}
  8741  		v.reset(OpS390XMOVWZreg)
  8742  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8743  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8744  		v0.AddArg(x)
  8745  		v.AddArg(v0)
  8746  		return true
  8747  	}
  8748  	return false
  8749  }
  8750  func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
  8751  	v_2 := v.Args[2]
  8752  	v_1 := v.Args[1]
  8753  	v_0 := v.Args[0]
  8754  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8755  	// result: (MOVBstore [off] {sym} ptr x mem)
  8756  	for {
  8757  		off := auxIntToInt32(v.AuxInt)
  8758  		sym := auxToSym(v.Aux)
  8759  		ptr := v_0
  8760  		if v_1.Op != OpS390XMOVBreg {
  8761  			break
  8762  		}
  8763  		x := v_1.Args[0]
  8764  		mem := v_2
  8765  		v.reset(OpS390XMOVBstore)
  8766  		v.AuxInt = int32ToAuxInt(off)
  8767  		v.Aux = symToAux(sym)
  8768  		v.AddArg3(ptr, x, mem)
  8769  		return true
  8770  	}
  8771  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8772  	// result: (MOVBstore [off] {sym} ptr x mem)
  8773  	for {
  8774  		off := auxIntToInt32(v.AuxInt)
  8775  		sym := auxToSym(v.Aux)
  8776  		ptr := v_0
  8777  		if v_1.Op != OpS390XMOVBZreg {
  8778  			break
  8779  		}
  8780  		x := v_1.Args[0]
  8781  		mem := v_2
  8782  		v.reset(OpS390XMOVBstore)
  8783  		v.AuxInt = int32ToAuxInt(off)
  8784  		v.Aux = symToAux(sym)
  8785  		v.AddArg3(ptr, x, mem)
  8786  		return true
  8787  	}
  8788  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8789  	// cond: is20Bit(int64(off1)+int64(off2))
  8790  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  8791  	for {
  8792  		off1 := auxIntToInt32(v.AuxInt)
  8793  		sym := auxToSym(v.Aux)
  8794  		if v_0.Op != OpS390XADDconst {
  8795  			break
  8796  		}
  8797  		off2 := auxIntToInt32(v_0.AuxInt)
  8798  		ptr := v_0.Args[0]
  8799  		val := v_1
  8800  		mem := v_2
  8801  		if !(is20Bit(int64(off1) + int64(off2))) {
  8802  			break
  8803  		}
  8804  		v.reset(OpS390XMOVBstore)
  8805  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8806  		v.Aux = symToAux(sym)
  8807  		v.AddArg3(ptr, val, mem)
  8808  		return true
  8809  	}
  8810  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [c]) mem)
  8811  	// cond: is20Bit(int64(off)) && ptr.Op != OpSB
  8812  	// result: (MOVBstoreconst [makeValAndOff(int32(int8(c)),off)] {sym} ptr mem)
  8813  	for {
  8814  		off := auxIntToInt32(v.AuxInt)
  8815  		sym := auxToSym(v.Aux)
  8816  		ptr := v_0
  8817  		if v_1.Op != OpS390XMOVDconst {
  8818  			break
  8819  		}
  8820  		c := auxIntToInt64(v_1.AuxInt)
  8821  		mem := v_2
  8822  		if !(is20Bit(int64(off)) && ptr.Op != OpSB) {
  8823  			break
  8824  		}
  8825  		v.reset(OpS390XMOVBstoreconst)
  8826  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int8(c)), off))
  8827  		v.Aux = symToAux(sym)
  8828  		v.AddArg2(ptr, mem)
  8829  		return true
  8830  	}
  8831  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  8832  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8833  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8834  	for {
  8835  		off1 := auxIntToInt32(v.AuxInt)
  8836  		sym1 := auxToSym(v.Aux)
  8837  		if v_0.Op != OpS390XMOVDaddr {
  8838  			break
  8839  		}
  8840  		off2 := auxIntToInt32(v_0.AuxInt)
  8841  		sym2 := auxToSym(v_0.Aux)
  8842  		base := v_0.Args[0]
  8843  		val := v_1
  8844  		mem := v_2
  8845  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8846  			break
  8847  		}
  8848  		v.reset(OpS390XMOVBstore)
  8849  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8850  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8851  		v.AddArg3(base, val, mem)
  8852  		return true
  8853  	}
  8854  	return false
  8855  }
  8856  func rewriteValueS390X_OpS390XMOVBstoreconst(v *Value) bool {
  8857  	v_1 := v.Args[1]
  8858  	v_0 := v.Args[0]
  8859  	// match: (MOVBstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  8860  	// cond: is20Bit(sc.Off64()+int64(off))
  8861  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  8862  	for {
  8863  		sc := auxIntToValAndOff(v.AuxInt)
  8864  		s := auxToSym(v.Aux)
  8865  		if v_0.Op != OpS390XADDconst {
  8866  			break
  8867  		}
  8868  		off := auxIntToInt32(v_0.AuxInt)
  8869  		ptr := v_0.Args[0]
  8870  		mem := v_1
  8871  		if !(is20Bit(sc.Off64() + int64(off))) {
  8872  			break
  8873  		}
  8874  		v.reset(OpS390XMOVBstoreconst)
  8875  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8876  		v.Aux = symToAux(s)
  8877  		v.AddArg2(ptr, mem)
  8878  		return true
  8879  	}
  8880  	// match: (MOVBstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  8881  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  8882  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  8883  	for {
  8884  		sc := auxIntToValAndOff(v.AuxInt)
  8885  		sym1 := auxToSym(v.Aux)
  8886  		if v_0.Op != OpS390XMOVDaddr {
  8887  			break
  8888  		}
  8889  		off := auxIntToInt32(v_0.AuxInt)
  8890  		sym2 := auxToSym(v_0.Aux)
  8891  		ptr := v_0.Args[0]
  8892  		mem := v_1
  8893  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  8894  			break
  8895  		}
  8896  		v.reset(OpS390XMOVBstoreconst)
  8897  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8898  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8899  		v.AddArg2(ptr, mem)
  8900  		return true
  8901  	}
  8902  	return false
  8903  }
  8904  func rewriteValueS390X_OpS390XMOVDBR(v *Value) bool {
  8905  	v_0 := v.Args[0]
  8906  	b := v.Block
  8907  	typ := &b.Func.Config.Types
  8908  	// match: (MOVDBR x:(MOVDload [off] {sym} ptr mem))
  8909  	// cond: x.Uses == 1
  8910  	// result: @x.Block (MOVDBRload [off] {sym} ptr mem)
  8911  	for {
  8912  		x := v_0
  8913  		if x.Op != OpS390XMOVDload {
  8914  			break
  8915  		}
  8916  		off := auxIntToInt32(x.AuxInt)
  8917  		sym := auxToSym(x.Aux)
  8918  		mem := x.Args[1]
  8919  		ptr := x.Args[0]
  8920  		if !(x.Uses == 1) {
  8921  			break
  8922  		}
  8923  		b = x.Block
  8924  		v0 := b.NewValue0(x.Pos, OpS390XMOVDBRload, typ.UInt64)
  8925  		v.copyOf(v0)
  8926  		v0.AuxInt = int32ToAuxInt(off)
  8927  		v0.Aux = symToAux(sym)
  8928  		v0.AddArg2(ptr, mem)
  8929  		return true
  8930  	}
  8931  	// match: (MOVDBR x:(MOVDloadidx [off] {sym} ptr idx mem))
  8932  	// cond: x.Uses == 1
  8933  	// result: @x.Block (MOVDBRloadidx [off] {sym} ptr idx mem)
  8934  	for {
  8935  		x := v_0
  8936  		if x.Op != OpS390XMOVDloadidx {
  8937  			break
  8938  		}
  8939  		off := auxIntToInt32(x.AuxInt)
  8940  		sym := auxToSym(x.Aux)
  8941  		mem := x.Args[2]
  8942  		ptr := x.Args[0]
  8943  		idx := x.Args[1]
  8944  		if !(x.Uses == 1) {
  8945  			break
  8946  		}
  8947  		b = x.Block
  8948  		v0 := b.NewValue0(v.Pos, OpS390XMOVDBRloadidx, typ.Int64)
  8949  		v.copyOf(v0)
  8950  		v0.AuxInt = int32ToAuxInt(off)
  8951  		v0.Aux = symToAux(sym)
  8952  		v0.AddArg3(ptr, idx, mem)
  8953  		return true
  8954  	}
  8955  	return false
  8956  }
  8957  func rewriteValueS390X_OpS390XMOVDaddridx(v *Value) bool {
  8958  	v_1 := v.Args[1]
  8959  	v_0 := v.Args[0]
  8960  	// match: (MOVDaddridx [c] {s} (ADDconst [d] x) y)
  8961  	// cond: is20Bit(int64(c)+int64(d))
  8962  	// result: (MOVDaddridx [c+d] {s} x y)
  8963  	for {
  8964  		c := auxIntToInt32(v.AuxInt)
  8965  		s := auxToSym(v.Aux)
  8966  		if v_0.Op != OpS390XADDconst {
  8967  			break
  8968  		}
  8969  		d := auxIntToInt32(v_0.AuxInt)
  8970  		x := v_0.Args[0]
  8971  		y := v_1
  8972  		if !(is20Bit(int64(c) + int64(d))) {
  8973  			break
  8974  		}
  8975  		v.reset(OpS390XMOVDaddridx)
  8976  		v.AuxInt = int32ToAuxInt(c + d)
  8977  		v.Aux = symToAux(s)
  8978  		v.AddArg2(x, y)
  8979  		return true
  8980  	}
  8981  	// match: (MOVDaddridx [c] {s} x (ADDconst [d] y))
  8982  	// cond: is20Bit(int64(c)+int64(d))
  8983  	// result: (MOVDaddridx [c+d] {s} x y)
  8984  	for {
  8985  		c := auxIntToInt32(v.AuxInt)
  8986  		s := auxToSym(v.Aux)
  8987  		x := v_0
  8988  		if v_1.Op != OpS390XADDconst {
  8989  			break
  8990  		}
  8991  		d := auxIntToInt32(v_1.AuxInt)
  8992  		y := v_1.Args[0]
  8993  		if !(is20Bit(int64(c) + int64(d))) {
  8994  			break
  8995  		}
  8996  		v.reset(OpS390XMOVDaddridx)
  8997  		v.AuxInt = int32ToAuxInt(c + d)
  8998  		v.Aux = symToAux(s)
  8999  		v.AddArg2(x, y)
  9000  		return true
  9001  	}
  9002  	// match: (MOVDaddridx [off1] {sym1} (MOVDaddr [off2] {sym2} x) y)
  9003  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  9004  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  9005  	for {
  9006  		off1 := auxIntToInt32(v.AuxInt)
  9007  		sym1 := auxToSym(v.Aux)
  9008  		if v_0.Op != OpS390XMOVDaddr {
  9009  			break
  9010  		}
  9011  		off2 := auxIntToInt32(v_0.AuxInt)
  9012  		sym2 := auxToSym(v_0.Aux)
  9013  		x := v_0.Args[0]
  9014  		y := v_1
  9015  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  9016  			break
  9017  		}
  9018  		v.reset(OpS390XMOVDaddridx)
  9019  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9020  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9021  		v.AddArg2(x, y)
  9022  		return true
  9023  	}
  9024  	// match: (MOVDaddridx [off1] {sym1} x (MOVDaddr [off2] {sym2} y))
  9025  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB
  9026  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  9027  	for {
  9028  		off1 := auxIntToInt32(v.AuxInt)
  9029  		sym1 := auxToSym(v.Aux)
  9030  		x := v_0
  9031  		if v_1.Op != OpS390XMOVDaddr {
  9032  			break
  9033  		}
  9034  		off2 := auxIntToInt32(v_1.AuxInt)
  9035  		sym2 := auxToSym(v_1.Aux)
  9036  		y := v_1.Args[0]
  9037  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  9038  			break
  9039  		}
  9040  		v.reset(OpS390XMOVDaddridx)
  9041  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9042  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9043  		v.AddArg2(x, y)
  9044  		return true
  9045  	}
  9046  	return false
  9047  }
  9048  func rewriteValueS390X_OpS390XMOVDload(v *Value) bool {
  9049  	v_1 := v.Args[1]
  9050  	v_0 := v.Args[0]
  9051  	// match: (MOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  9052  	// cond: isSamePtr(ptr1, ptr2)
  9053  	// result: x
  9054  	for {
  9055  		off := auxIntToInt32(v.AuxInt)
  9056  		sym := auxToSym(v.Aux)
  9057  		ptr1 := v_0
  9058  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9059  			break
  9060  		}
  9061  		x := v_1.Args[1]
  9062  		ptr2 := v_1.Args[0]
  9063  		if !(isSamePtr(ptr1, ptr2)) {
  9064  			break
  9065  		}
  9066  		v.copyOf(x)
  9067  		return true
  9068  	}
  9069  	// match: (MOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  9070  	// cond: isSamePtr(ptr1, ptr2)
  9071  	// result: (LGDR x)
  9072  	for {
  9073  		off := auxIntToInt32(v.AuxInt)
  9074  		sym := auxToSym(v.Aux)
  9075  		ptr1 := v_0
  9076  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9077  			break
  9078  		}
  9079  		x := v_1.Args[1]
  9080  		ptr2 := v_1.Args[0]
  9081  		if !(isSamePtr(ptr1, ptr2)) {
  9082  			break
  9083  		}
  9084  		v.reset(OpS390XLGDR)
  9085  		v.AddArg(x)
  9086  		return true
  9087  	}
  9088  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9089  	// cond: is20Bit(int64(off1)+int64(off2))
  9090  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  9091  	for {
  9092  		off1 := auxIntToInt32(v.AuxInt)
  9093  		sym := auxToSym(v.Aux)
  9094  		if v_0.Op != OpS390XADDconst {
  9095  			break
  9096  		}
  9097  		off2 := auxIntToInt32(v_0.AuxInt)
  9098  		ptr := v_0.Args[0]
  9099  		mem := v_1
  9100  		if !(is20Bit(int64(off1) + int64(off2))) {
  9101  			break
  9102  		}
  9103  		v.reset(OpS390XMOVDload)
  9104  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9105  		v.Aux = symToAux(sym)
  9106  		v.AddArg2(ptr, mem)
  9107  		return true
  9108  	}
  9109  	// match: (MOVDload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9110  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9111  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9112  	for {
  9113  		off1 := auxIntToInt32(v.AuxInt)
  9114  		sym1 := auxToSym(v.Aux)
  9115  		if v_0.Op != OpS390XMOVDaddr {
  9116  			break
  9117  		}
  9118  		t := v_0.Type
  9119  		off2 := auxIntToInt32(v_0.AuxInt)
  9120  		sym2 := auxToSym(v_0.Aux)
  9121  		base := v_0.Args[0]
  9122  		mem := v_1
  9123  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9124  			break
  9125  		}
  9126  		v.reset(OpS390XMOVDload)
  9127  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9128  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9129  		v.AddArg2(base, mem)
  9130  		return true
  9131  	}
  9132  	return false
  9133  }
  9134  func rewriteValueS390X_OpS390XMOVDstore(v *Value) bool {
  9135  	v_2 := v.Args[2]
  9136  	v_1 := v.Args[1]
  9137  	v_0 := v.Args[0]
  9138  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9139  	// cond: is20Bit(int64(off1)+int64(off2))
  9140  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  9141  	for {
  9142  		off1 := auxIntToInt32(v.AuxInt)
  9143  		sym := auxToSym(v.Aux)
  9144  		if v_0.Op != OpS390XADDconst {
  9145  			break
  9146  		}
  9147  		off2 := auxIntToInt32(v_0.AuxInt)
  9148  		ptr := v_0.Args[0]
  9149  		val := v_1
  9150  		mem := v_2
  9151  		if !(is20Bit(int64(off1) + int64(off2))) {
  9152  			break
  9153  		}
  9154  		v.reset(OpS390XMOVDstore)
  9155  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9156  		v.Aux = symToAux(sym)
  9157  		v.AddArg3(ptr, val, mem)
  9158  		return true
  9159  	}
  9160  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [c]) mem)
  9161  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
  9162  	// result: (MOVDstoreconst [makeValAndOff(int32(c),off)] {sym} ptr mem)
  9163  	for {
  9164  		off := auxIntToInt32(v.AuxInt)
  9165  		sym := auxToSym(v.Aux)
  9166  		ptr := v_0
  9167  		if v_1.Op != OpS390XMOVDconst {
  9168  			break
  9169  		}
  9170  		c := auxIntToInt64(v_1.AuxInt)
  9171  		mem := v_2
  9172  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
  9173  			break
  9174  		}
  9175  		v.reset(OpS390XMOVDstoreconst)
  9176  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  9177  		v.Aux = symToAux(sym)
  9178  		v.AddArg2(ptr, mem)
  9179  		return true
  9180  	}
  9181  	// match: (MOVDstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9182  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9183  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  9184  	for {
  9185  		off1 := auxIntToInt32(v.AuxInt)
  9186  		sym1 := auxToSym(v.Aux)
  9187  		if v_0.Op != OpS390XMOVDaddr {
  9188  			break
  9189  		}
  9190  		t := v_0.Type
  9191  		off2 := auxIntToInt32(v_0.AuxInt)
  9192  		sym2 := auxToSym(v_0.Aux)
  9193  		base := v_0.Args[0]
  9194  		val := v_1
  9195  		mem := v_2
  9196  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9197  			break
  9198  		}
  9199  		v.reset(OpS390XMOVDstore)
  9200  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9201  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9202  		v.AddArg3(base, val, mem)
  9203  		return true
  9204  	}
  9205  	// match: (MOVDstore [i] {s} p w1 x:(MOVDstore [i-8] {s} p w0 mem))
  9206  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)
  9207  	// result: (STMG2 [i-8] {s} p w0 w1 mem)
  9208  	for {
  9209  		i := auxIntToInt32(v.AuxInt)
  9210  		s := auxToSym(v.Aux)
  9211  		p := v_0
  9212  		w1 := v_1
  9213  		x := v_2
  9214  		if x.Op != OpS390XMOVDstore || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
  9215  			break
  9216  		}
  9217  		mem := x.Args[2]
  9218  		if p != x.Args[0] {
  9219  			break
  9220  		}
  9221  		w0 := x.Args[1]
  9222  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)) {
  9223  			break
  9224  		}
  9225  		v.reset(OpS390XSTMG2)
  9226  		v.AuxInt = int32ToAuxInt(i - 8)
  9227  		v.Aux = symToAux(s)
  9228  		v.AddArg4(p, w0, w1, mem)
  9229  		return true
  9230  	}
  9231  	// match: (MOVDstore [i] {s} p w2 x:(STMG2 [i-16] {s} p w0 w1 mem))
  9232  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)
  9233  	// result: (STMG3 [i-16] {s} p w0 w1 w2 mem)
  9234  	for {
  9235  		i := auxIntToInt32(v.AuxInt)
  9236  		s := auxToSym(v.Aux)
  9237  		p := v_0
  9238  		w2 := v_1
  9239  		x := v_2
  9240  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
  9241  			break
  9242  		}
  9243  		mem := x.Args[3]
  9244  		if p != x.Args[0] {
  9245  			break
  9246  		}
  9247  		w0 := x.Args[1]
  9248  		w1 := x.Args[2]
  9249  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)) {
  9250  			break
  9251  		}
  9252  		v.reset(OpS390XSTMG3)
  9253  		v.AuxInt = int32ToAuxInt(i - 16)
  9254  		v.Aux = symToAux(s)
  9255  		v.AddArg5(p, w0, w1, w2, mem)
  9256  		return true
  9257  	}
  9258  	// match: (MOVDstore [i] {s} p w3 x:(STMG3 [i-24] {s} p w0 w1 w2 mem))
  9259  	// cond: x.Uses == 1 && is20Bit(int64(i)-24) && setPos(v, x.Pos) && clobber(x)
  9260  	// result: (STMG4 [i-24] {s} p w0 w1 w2 w3 mem)
  9261  	for {
  9262  		i := auxIntToInt32(v.AuxInt)
  9263  		s := auxToSym(v.Aux)
  9264  		p := v_0
  9265  		w3 := v_1
  9266  		x := v_2
  9267  		if x.Op != OpS390XSTMG3 || auxIntToInt32(x.AuxInt) != i-24 || auxToSym(x.Aux) != s {
  9268  			break
  9269  		}
  9270  		mem := x.Args[4]
  9271  		if p != x.Args[0] {
  9272  			break
  9273  		}
  9274  		w0 := x.Args[1]
  9275  		w1 := x.Args[2]
  9276  		w2 := x.Args[3]
  9277  		if !(x.Uses == 1 && is20Bit(int64(i)-24) && setPos(v, x.Pos) && clobber(x)) {
  9278  			break
  9279  		}
  9280  		v.reset(OpS390XSTMG4)
  9281  		v.AuxInt = int32ToAuxInt(i - 24)
  9282  		v.Aux = symToAux(s)
  9283  		v.AddArg6(p, w0, w1, w2, w3, mem)
  9284  		return true
  9285  	}
  9286  	// match: (MOVDstore [off] {sym} ptr r:(MOVDBR x) mem)
  9287  	// cond: r.Uses == 1
  9288  	// result: (MOVDBRstore [off] {sym} ptr x mem)
  9289  	for {
  9290  		off := auxIntToInt32(v.AuxInt)
  9291  		sym := auxToSym(v.Aux)
  9292  		ptr := v_0
  9293  		r := v_1
  9294  		if r.Op != OpS390XMOVDBR {
  9295  			break
  9296  		}
  9297  		x := r.Args[0]
  9298  		mem := v_2
  9299  		if !(r.Uses == 1) {
  9300  			break
  9301  		}
  9302  		v.reset(OpS390XMOVDBRstore)
  9303  		v.AuxInt = int32ToAuxInt(off)
  9304  		v.Aux = symToAux(sym)
  9305  		v.AddArg3(ptr, x, mem)
  9306  		return true
  9307  	}
  9308  	return false
  9309  }
  9310  func rewriteValueS390X_OpS390XMOVDstoreconst(v *Value) bool {
  9311  	v_1 := v.Args[1]
  9312  	v_0 := v.Args[0]
  9313  	// match: (MOVDstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  9314  	// cond: isU12Bit(sc.Off64()+int64(off))
  9315  	// result: (MOVDstoreconst [sc.addOffset32(off)] {s} ptr mem)
  9316  	for {
  9317  		sc := auxIntToValAndOff(v.AuxInt)
  9318  		s := auxToSym(v.Aux)
  9319  		if v_0.Op != OpS390XADDconst {
  9320  			break
  9321  		}
  9322  		off := auxIntToInt32(v_0.AuxInt)
  9323  		ptr := v_0.Args[0]
  9324  		mem := v_1
  9325  		if !(isU12Bit(sc.Off64() + int64(off))) {
  9326  			break
  9327  		}
  9328  		v.reset(OpS390XMOVDstoreconst)
  9329  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9330  		v.Aux = symToAux(s)
  9331  		v.AddArg2(ptr, mem)
  9332  		return true
  9333  	}
  9334  	// match: (MOVDstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  9335  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  9336  	// result: (MOVDstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  9337  	for {
  9338  		sc := auxIntToValAndOff(v.AuxInt)
  9339  		sym1 := auxToSym(v.Aux)
  9340  		if v_0.Op != OpS390XMOVDaddr {
  9341  			break
  9342  		}
  9343  		off := auxIntToInt32(v_0.AuxInt)
  9344  		sym2 := auxToSym(v_0.Aux)
  9345  		ptr := v_0.Args[0]
  9346  		mem := v_1
  9347  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  9348  			break
  9349  		}
  9350  		v.reset(OpS390XMOVDstoreconst)
  9351  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9352  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9353  		v.AddArg2(ptr, mem)
  9354  		return true
  9355  	}
  9356  	return false
  9357  }
  9358  func rewriteValueS390X_OpS390XMOVDstoreidx(v *Value) bool {
  9359  	v_3 := v.Args[3]
  9360  	v_2 := v.Args[2]
  9361  	v_1 := v.Args[1]
  9362  	v_0 := v.Args[0]
  9363  	// match: (MOVDstoreidx [off] {sym} ptr idx r:(MOVDBR x) mem)
  9364  	// cond: r.Uses == 1
  9365  	// result: (MOVDBRstoreidx [off] {sym} ptr idx x mem)
  9366  	for {
  9367  		off := auxIntToInt32(v.AuxInt)
  9368  		sym := auxToSym(v.Aux)
  9369  		ptr := v_0
  9370  		idx := v_1
  9371  		r := v_2
  9372  		if r.Op != OpS390XMOVDBR {
  9373  			break
  9374  		}
  9375  		x := r.Args[0]
  9376  		mem := v_3
  9377  		if !(r.Uses == 1) {
  9378  			break
  9379  		}
  9380  		v.reset(OpS390XMOVDBRstoreidx)
  9381  		v.AuxInt = int32ToAuxInt(off)
  9382  		v.Aux = symToAux(sym)
  9383  		v.AddArg4(ptr, idx, x, mem)
  9384  		return true
  9385  	}
  9386  	return false
  9387  }
  9388  func rewriteValueS390X_OpS390XMOVHZload(v *Value) bool {
  9389  	v_1 := v.Args[1]
  9390  	v_0 := v.Args[0]
  9391  	// match: (MOVHZload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9392  	// cond: isSamePtr(ptr1, ptr2)
  9393  	// result: (MOVHZreg x)
  9394  	for {
  9395  		off := auxIntToInt32(v.AuxInt)
  9396  		sym := auxToSym(v.Aux)
  9397  		ptr1 := v_0
  9398  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9399  			break
  9400  		}
  9401  		x := v_1.Args[1]
  9402  		ptr2 := v_1.Args[0]
  9403  		if !(isSamePtr(ptr1, ptr2)) {
  9404  			break
  9405  		}
  9406  		v.reset(OpS390XMOVHZreg)
  9407  		v.AddArg(x)
  9408  		return true
  9409  	}
  9410  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] ptr) mem)
  9411  	// cond: is20Bit(int64(off1)+int64(off2))
  9412  	// result: (MOVHZload [off1+off2] {sym} ptr mem)
  9413  	for {
  9414  		off1 := auxIntToInt32(v.AuxInt)
  9415  		sym := auxToSym(v.Aux)
  9416  		if v_0.Op != OpS390XADDconst {
  9417  			break
  9418  		}
  9419  		off2 := auxIntToInt32(v_0.AuxInt)
  9420  		ptr := v_0.Args[0]
  9421  		mem := v_1
  9422  		if !(is20Bit(int64(off1) + int64(off2))) {
  9423  			break
  9424  		}
  9425  		v.reset(OpS390XMOVHZload)
  9426  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9427  		v.Aux = symToAux(sym)
  9428  		v.AddArg2(ptr, mem)
  9429  		return true
  9430  	}
  9431  	// match: (MOVHZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9432  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9433  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9434  	for {
  9435  		off1 := auxIntToInt32(v.AuxInt)
  9436  		sym1 := auxToSym(v.Aux)
  9437  		if v_0.Op != OpS390XMOVDaddr {
  9438  			break
  9439  		}
  9440  		t := v_0.Type
  9441  		off2 := auxIntToInt32(v_0.AuxInt)
  9442  		sym2 := auxToSym(v_0.Aux)
  9443  		base := v_0.Args[0]
  9444  		mem := v_1
  9445  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9446  			break
  9447  		}
  9448  		v.reset(OpS390XMOVHZload)
  9449  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9450  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9451  		v.AddArg2(base, mem)
  9452  		return true
  9453  	}
  9454  	return false
  9455  }
  9456  func rewriteValueS390X_OpS390XMOVHZreg(v *Value) bool {
  9457  	v_0 := v.Args[0]
  9458  	b := v.Block
  9459  	typ := &b.Func.Config.Types
  9460  	// match: (MOVHZreg e:(MOVBZreg x))
  9461  	// cond: clobberIfDead(e)
  9462  	// result: (MOVBZreg x)
  9463  	for {
  9464  		e := v_0
  9465  		if e.Op != OpS390XMOVBZreg {
  9466  			break
  9467  		}
  9468  		x := e.Args[0]
  9469  		if !(clobberIfDead(e)) {
  9470  			break
  9471  		}
  9472  		v.reset(OpS390XMOVBZreg)
  9473  		v.AddArg(x)
  9474  		return true
  9475  	}
  9476  	// match: (MOVHZreg e:(MOVHreg x))
  9477  	// cond: clobberIfDead(e)
  9478  	// result: (MOVHZreg x)
  9479  	for {
  9480  		e := v_0
  9481  		if e.Op != OpS390XMOVHreg {
  9482  			break
  9483  		}
  9484  		x := e.Args[0]
  9485  		if !(clobberIfDead(e)) {
  9486  			break
  9487  		}
  9488  		v.reset(OpS390XMOVHZreg)
  9489  		v.AddArg(x)
  9490  		return true
  9491  	}
  9492  	// match: (MOVHZreg e:(MOVWreg x))
  9493  	// cond: clobberIfDead(e)
  9494  	// result: (MOVHZreg x)
  9495  	for {
  9496  		e := v_0
  9497  		if e.Op != OpS390XMOVWreg {
  9498  			break
  9499  		}
  9500  		x := e.Args[0]
  9501  		if !(clobberIfDead(e)) {
  9502  			break
  9503  		}
  9504  		v.reset(OpS390XMOVHZreg)
  9505  		v.AddArg(x)
  9506  		return true
  9507  	}
  9508  	// match: (MOVHZreg e:(MOVHZreg x))
  9509  	// cond: clobberIfDead(e)
  9510  	// result: (MOVHZreg x)
  9511  	for {
  9512  		e := v_0
  9513  		if e.Op != OpS390XMOVHZreg {
  9514  			break
  9515  		}
  9516  		x := e.Args[0]
  9517  		if !(clobberIfDead(e)) {
  9518  			break
  9519  		}
  9520  		v.reset(OpS390XMOVHZreg)
  9521  		v.AddArg(x)
  9522  		return true
  9523  	}
  9524  	// match: (MOVHZreg e:(MOVWZreg x))
  9525  	// cond: clobberIfDead(e)
  9526  	// result: (MOVHZreg x)
  9527  	for {
  9528  		e := v_0
  9529  		if e.Op != OpS390XMOVWZreg {
  9530  			break
  9531  		}
  9532  		x := e.Args[0]
  9533  		if !(clobberIfDead(e)) {
  9534  			break
  9535  		}
  9536  		v.reset(OpS390XMOVHZreg)
  9537  		v.AddArg(x)
  9538  		return true
  9539  	}
  9540  	// match: (MOVHZreg x:(MOVBZload _ _))
  9541  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9542  	// result: x
  9543  	for {
  9544  		x := v_0
  9545  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9546  			break
  9547  		}
  9548  		v.copyOf(x)
  9549  		return true
  9550  	}
  9551  	// match: (MOVHZreg x:(MOVHZload _ _))
  9552  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
  9553  	// result: x
  9554  	for {
  9555  		x := v_0
  9556  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
  9557  			break
  9558  		}
  9559  		v.copyOf(x)
  9560  		return true
  9561  	}
  9562  	// match: (MOVHZreg <t> x:(MOVHload [o] {s} p mem))
  9563  	// cond: x.Uses == 1 && clobber(x)
  9564  	// result: @x.Block (MOVHZload <t> [o] {s} p mem)
  9565  	for {
  9566  		t := v.Type
  9567  		x := v_0
  9568  		if x.Op != OpS390XMOVHload {
  9569  			break
  9570  		}
  9571  		o := auxIntToInt32(x.AuxInt)
  9572  		s := auxToSym(x.Aux)
  9573  		mem := x.Args[1]
  9574  		p := x.Args[0]
  9575  		if !(x.Uses == 1 && clobber(x)) {
  9576  			break
  9577  		}
  9578  		b = x.Block
  9579  		v0 := b.NewValue0(x.Pos, OpS390XMOVHZload, t)
  9580  		v.copyOf(v0)
  9581  		v0.AuxInt = int32ToAuxInt(o)
  9582  		v0.Aux = symToAux(s)
  9583  		v0.AddArg2(p, mem)
  9584  		return true
  9585  	}
  9586  	// match: (MOVHZreg x:(Arg <t>))
  9587  	// cond: !t.IsSigned() && t.Size() <= 2
  9588  	// result: x
  9589  	for {
  9590  		x := v_0
  9591  		if x.Op != OpArg {
  9592  			break
  9593  		}
  9594  		t := x.Type
  9595  		if !(!t.IsSigned() && t.Size() <= 2) {
  9596  			break
  9597  		}
  9598  		v.copyOf(x)
  9599  		return true
  9600  	}
  9601  	// match: (MOVHZreg (MOVDconst [c]))
  9602  	// result: (MOVDconst [int64(uint16(c))])
  9603  	for {
  9604  		if v_0.Op != OpS390XMOVDconst {
  9605  			break
  9606  		}
  9607  		c := auxIntToInt64(v_0.AuxInt)
  9608  		v.reset(OpS390XMOVDconst)
  9609  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9610  		return true
  9611  	}
  9612  	// match: (MOVHZreg (RISBGZ x {r}))
  9613  	// cond: r.OutMerge(0x0000ffff) != nil
  9614  	// result: (RISBGZ x {*r.OutMerge(0x0000ffff)})
  9615  	for {
  9616  		if v_0.Op != OpS390XRISBGZ {
  9617  			break
  9618  		}
  9619  		r := auxToS390xRotateParams(v_0.Aux)
  9620  		x := v_0.Args[0]
  9621  		if !(r.OutMerge(0x0000ffff) != nil) {
  9622  			break
  9623  		}
  9624  		v.reset(OpS390XRISBGZ)
  9625  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x0000ffff))
  9626  		v.AddArg(x)
  9627  		return true
  9628  	}
  9629  	// match: (MOVHZreg (ANDWconst [m] x))
  9630  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9631  	for {
  9632  		if v_0.Op != OpS390XANDWconst {
  9633  			break
  9634  		}
  9635  		m := auxIntToInt32(v_0.AuxInt)
  9636  		x := v_0.Args[0]
  9637  		v.reset(OpS390XMOVWZreg)
  9638  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9639  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9640  		v0.AddArg(x)
  9641  		v.AddArg(v0)
  9642  		return true
  9643  	}
  9644  	return false
  9645  }
  9646  func rewriteValueS390X_OpS390XMOVHload(v *Value) bool {
  9647  	v_1 := v.Args[1]
  9648  	v_0 := v.Args[0]
  9649  	// match: (MOVHload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9650  	// cond: isSamePtr(ptr1, ptr2)
  9651  	// result: (MOVHreg x)
  9652  	for {
  9653  		off := auxIntToInt32(v.AuxInt)
  9654  		sym := auxToSym(v.Aux)
  9655  		ptr1 := v_0
  9656  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9657  			break
  9658  		}
  9659  		x := v_1.Args[1]
  9660  		ptr2 := v_1.Args[0]
  9661  		if !(isSamePtr(ptr1, ptr2)) {
  9662  			break
  9663  		}
  9664  		v.reset(OpS390XMOVHreg)
  9665  		v.AddArg(x)
  9666  		return true
  9667  	}
  9668  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9669  	// cond: is20Bit(int64(off1)+int64(off2))
  9670  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  9671  	for {
  9672  		off1 := auxIntToInt32(v.AuxInt)
  9673  		sym := auxToSym(v.Aux)
  9674  		if v_0.Op != OpS390XADDconst {
  9675  			break
  9676  		}
  9677  		off2 := auxIntToInt32(v_0.AuxInt)
  9678  		ptr := v_0.Args[0]
  9679  		mem := v_1
  9680  		if !(is20Bit(int64(off1) + int64(off2))) {
  9681  			break
  9682  		}
  9683  		v.reset(OpS390XMOVHload)
  9684  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9685  		v.Aux = symToAux(sym)
  9686  		v.AddArg2(ptr, mem)
  9687  		return true
  9688  	}
  9689  	// match: (MOVHload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9690  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9691  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9692  	for {
  9693  		off1 := auxIntToInt32(v.AuxInt)
  9694  		sym1 := auxToSym(v.Aux)
  9695  		if v_0.Op != OpS390XMOVDaddr {
  9696  			break
  9697  		}
  9698  		t := v_0.Type
  9699  		off2 := auxIntToInt32(v_0.AuxInt)
  9700  		sym2 := auxToSym(v_0.Aux)
  9701  		base := v_0.Args[0]
  9702  		mem := v_1
  9703  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9704  			break
  9705  		}
  9706  		v.reset(OpS390XMOVHload)
  9707  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9708  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9709  		v.AddArg2(base, mem)
  9710  		return true
  9711  	}
  9712  	return false
  9713  }
  9714  func rewriteValueS390X_OpS390XMOVHreg(v *Value) bool {
  9715  	v_0 := v.Args[0]
  9716  	b := v.Block
  9717  	typ := &b.Func.Config.Types
  9718  	// match: (MOVHreg e:(MOVBreg x))
  9719  	// cond: clobberIfDead(e)
  9720  	// result: (MOVBreg x)
  9721  	for {
  9722  		e := v_0
  9723  		if e.Op != OpS390XMOVBreg {
  9724  			break
  9725  		}
  9726  		x := e.Args[0]
  9727  		if !(clobberIfDead(e)) {
  9728  			break
  9729  		}
  9730  		v.reset(OpS390XMOVBreg)
  9731  		v.AddArg(x)
  9732  		return true
  9733  	}
  9734  	// match: (MOVHreg e:(MOVHreg x))
  9735  	// cond: clobberIfDead(e)
  9736  	// result: (MOVHreg x)
  9737  	for {
  9738  		e := v_0
  9739  		if e.Op != OpS390XMOVHreg {
  9740  			break
  9741  		}
  9742  		x := e.Args[0]
  9743  		if !(clobberIfDead(e)) {
  9744  			break
  9745  		}
  9746  		v.reset(OpS390XMOVHreg)
  9747  		v.AddArg(x)
  9748  		return true
  9749  	}
  9750  	// match: (MOVHreg e:(MOVWreg x))
  9751  	// cond: clobberIfDead(e)
  9752  	// result: (MOVHreg x)
  9753  	for {
  9754  		e := v_0
  9755  		if e.Op != OpS390XMOVWreg {
  9756  			break
  9757  		}
  9758  		x := e.Args[0]
  9759  		if !(clobberIfDead(e)) {
  9760  			break
  9761  		}
  9762  		v.reset(OpS390XMOVHreg)
  9763  		v.AddArg(x)
  9764  		return true
  9765  	}
  9766  	// match: (MOVHreg e:(MOVHZreg x))
  9767  	// cond: clobberIfDead(e)
  9768  	// result: (MOVHreg x)
  9769  	for {
  9770  		e := v_0
  9771  		if e.Op != OpS390XMOVHZreg {
  9772  			break
  9773  		}
  9774  		x := e.Args[0]
  9775  		if !(clobberIfDead(e)) {
  9776  			break
  9777  		}
  9778  		v.reset(OpS390XMOVHreg)
  9779  		v.AddArg(x)
  9780  		return true
  9781  	}
  9782  	// match: (MOVHreg e:(MOVWZreg x))
  9783  	// cond: clobberIfDead(e)
  9784  	// result: (MOVHreg x)
  9785  	for {
  9786  		e := v_0
  9787  		if e.Op != OpS390XMOVWZreg {
  9788  			break
  9789  		}
  9790  		x := e.Args[0]
  9791  		if !(clobberIfDead(e)) {
  9792  			break
  9793  		}
  9794  		v.reset(OpS390XMOVHreg)
  9795  		v.AddArg(x)
  9796  		return true
  9797  	}
  9798  	// match: (MOVHreg x:(MOVBload _ _))
  9799  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9800  	// result: x
  9801  	for {
  9802  		x := v_0
  9803  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9804  			break
  9805  		}
  9806  		v.copyOf(x)
  9807  		return true
  9808  	}
  9809  	// match: (MOVHreg x:(MOVHload _ _))
  9810  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9811  	// result: x
  9812  	for {
  9813  		x := v_0
  9814  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9815  			break
  9816  		}
  9817  		v.copyOf(x)
  9818  		return true
  9819  	}
  9820  	// match: (MOVHreg x:(MOVBZload _ _))
  9821  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9822  	// result: x
  9823  	for {
  9824  		x := v_0
  9825  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9826  			break
  9827  		}
  9828  		v.copyOf(x)
  9829  		return true
  9830  	}
  9831  	// match: (MOVHreg <t> x:(MOVHZload [o] {s} p mem))
  9832  	// cond: x.Uses == 1 && clobber(x)
  9833  	// result: @x.Block (MOVHload <t> [o] {s} p mem)
  9834  	for {
  9835  		t := v.Type
  9836  		x := v_0
  9837  		if x.Op != OpS390XMOVHZload {
  9838  			break
  9839  		}
  9840  		o := auxIntToInt32(x.AuxInt)
  9841  		s := auxToSym(x.Aux)
  9842  		mem := x.Args[1]
  9843  		p := x.Args[0]
  9844  		if !(x.Uses == 1 && clobber(x)) {
  9845  			break
  9846  		}
  9847  		b = x.Block
  9848  		v0 := b.NewValue0(x.Pos, OpS390XMOVHload, t)
  9849  		v.copyOf(v0)
  9850  		v0.AuxInt = int32ToAuxInt(o)
  9851  		v0.Aux = symToAux(s)
  9852  		v0.AddArg2(p, mem)
  9853  		return true
  9854  	}
  9855  	// match: (MOVHreg x:(Arg <t>))
  9856  	// cond: t.IsSigned() && t.Size() <= 2
  9857  	// result: x
  9858  	for {
  9859  		x := v_0
  9860  		if x.Op != OpArg {
  9861  			break
  9862  		}
  9863  		t := x.Type
  9864  		if !(t.IsSigned() && t.Size() <= 2) {
  9865  			break
  9866  		}
  9867  		v.copyOf(x)
  9868  		return true
  9869  	}
  9870  	// match: (MOVHreg (MOVDconst [c]))
  9871  	// result: (MOVDconst [int64(int16(c))])
  9872  	for {
  9873  		if v_0.Op != OpS390XMOVDconst {
  9874  			break
  9875  		}
  9876  		c := auxIntToInt64(v_0.AuxInt)
  9877  		v.reset(OpS390XMOVDconst)
  9878  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
  9879  		return true
  9880  	}
  9881  	// match: (MOVHreg (ANDWconst [m] x))
  9882  	// cond: int16(m) >= 0
  9883  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9884  	for {
  9885  		if v_0.Op != OpS390XANDWconst {
  9886  			break
  9887  		}
  9888  		m := auxIntToInt32(v_0.AuxInt)
  9889  		x := v_0.Args[0]
  9890  		if !(int16(m) >= 0) {
  9891  			break
  9892  		}
  9893  		v.reset(OpS390XMOVWZreg)
  9894  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9895  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9896  		v0.AddArg(x)
  9897  		v.AddArg(v0)
  9898  		return true
  9899  	}
  9900  	return false
  9901  }
  9902  func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
  9903  	v_2 := v.Args[2]
  9904  	v_1 := v.Args[1]
  9905  	v_0 := v.Args[0]
  9906  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  9907  	// result: (MOVHstore [off] {sym} ptr x mem)
  9908  	for {
  9909  		off := auxIntToInt32(v.AuxInt)
  9910  		sym := auxToSym(v.Aux)
  9911  		ptr := v_0
  9912  		if v_1.Op != OpS390XMOVHreg {
  9913  			break
  9914  		}
  9915  		x := v_1.Args[0]
  9916  		mem := v_2
  9917  		v.reset(OpS390XMOVHstore)
  9918  		v.AuxInt = int32ToAuxInt(off)
  9919  		v.Aux = symToAux(sym)
  9920  		v.AddArg3(ptr, x, mem)
  9921  		return true
  9922  	}
  9923  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
  9924  	// result: (MOVHstore [off] {sym} ptr x mem)
  9925  	for {
  9926  		off := auxIntToInt32(v.AuxInt)
  9927  		sym := auxToSym(v.Aux)
  9928  		ptr := v_0
  9929  		if v_1.Op != OpS390XMOVHZreg {
  9930  			break
  9931  		}
  9932  		x := v_1.Args[0]
  9933  		mem := v_2
  9934  		v.reset(OpS390XMOVHstore)
  9935  		v.AuxInt = int32ToAuxInt(off)
  9936  		v.Aux = symToAux(sym)
  9937  		v.AddArg3(ptr, x, mem)
  9938  		return true
  9939  	}
  9940  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9941  	// cond: is20Bit(int64(off1)+int64(off2))
  9942  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
  9943  	for {
  9944  		off1 := auxIntToInt32(v.AuxInt)
  9945  		sym := auxToSym(v.Aux)
  9946  		if v_0.Op != OpS390XADDconst {
  9947  			break
  9948  		}
  9949  		off2 := auxIntToInt32(v_0.AuxInt)
  9950  		ptr := v_0.Args[0]
  9951  		val := v_1
  9952  		mem := v_2
  9953  		if !(is20Bit(int64(off1) + int64(off2))) {
  9954  			break
  9955  		}
  9956  		v.reset(OpS390XMOVHstore)
  9957  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9958  		v.Aux = symToAux(sym)
  9959  		v.AddArg3(ptr, val, mem)
  9960  		return true
  9961  	}
  9962  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [c]) mem)
  9963  	// cond: isU12Bit(int64(off)) && ptr.Op != OpSB
  9964  	// result: (MOVHstoreconst [makeValAndOff(int32(int16(c)),off)] {sym} ptr mem)
  9965  	for {
  9966  		off := auxIntToInt32(v.AuxInt)
  9967  		sym := auxToSym(v.Aux)
  9968  		ptr := v_0
  9969  		if v_1.Op != OpS390XMOVDconst {
  9970  			break
  9971  		}
  9972  		c := auxIntToInt64(v_1.AuxInt)
  9973  		mem := v_2
  9974  		if !(isU12Bit(int64(off)) && ptr.Op != OpSB) {
  9975  			break
  9976  		}
  9977  		v.reset(OpS390XMOVHstoreconst)
  9978  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int16(c)), off))
  9979  		v.Aux = symToAux(sym)
  9980  		v.AddArg2(ptr, mem)
  9981  		return true
  9982  	}
  9983  	// match: (MOVHstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9984  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9985  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  9986  	for {
  9987  		off1 := auxIntToInt32(v.AuxInt)
  9988  		sym1 := auxToSym(v.Aux)
  9989  		if v_0.Op != OpS390XMOVDaddr {
  9990  			break
  9991  		}
  9992  		t := v_0.Type
  9993  		off2 := auxIntToInt32(v_0.AuxInt)
  9994  		sym2 := auxToSym(v_0.Aux)
  9995  		base := v_0.Args[0]
  9996  		val := v_1
  9997  		mem := v_2
  9998  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9999  			break
 10000  		}
 10001  		v.reset(OpS390XMOVHstore)
 10002  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10003  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10004  		v.AddArg3(base, val, mem)
 10005  		return true
 10006  	}
 10007  	// match: (MOVHstore [off] {sym} ptr (Bswap16 val) mem)
 10008  	// result: (MOVHBRstore [off] {sym} ptr val mem)
 10009  	for {
 10010  		off := auxIntToInt32(v.AuxInt)
 10011  		sym := auxToSym(v.Aux)
 10012  		ptr := v_0
 10013  		if v_1.Op != OpBswap16 {
 10014  			break
 10015  		}
 10016  		val := v_1.Args[0]
 10017  		mem := v_2
 10018  		v.reset(OpS390XMOVHBRstore)
 10019  		v.AuxInt = int32ToAuxInt(off)
 10020  		v.Aux = symToAux(sym)
 10021  		v.AddArg3(ptr, val, mem)
 10022  		return true
 10023  	}
 10024  	return false
 10025  }
 10026  func rewriteValueS390X_OpS390XMOVHstoreconst(v *Value) bool {
 10027  	v_1 := v.Args[1]
 10028  	v_0 := v.Args[0]
 10029  	// match: (MOVHstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10030  	// cond: isU12Bit(sc.Off64()+int64(off))
 10031  	// result: (MOVHstoreconst [sc.addOffset32(off)] {s} ptr mem)
 10032  	for {
 10033  		sc := auxIntToValAndOff(v.AuxInt)
 10034  		s := auxToSym(v.Aux)
 10035  		if v_0.Op != OpS390XADDconst {
 10036  			break
 10037  		}
 10038  		off := auxIntToInt32(v_0.AuxInt)
 10039  		ptr := v_0.Args[0]
 10040  		mem := v_1
 10041  		if !(isU12Bit(sc.Off64() + int64(off))) {
 10042  			break
 10043  		}
 10044  		v.reset(OpS390XMOVHstoreconst)
 10045  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10046  		v.Aux = symToAux(s)
 10047  		v.AddArg2(ptr, mem)
 10048  		return true
 10049  	}
 10050  	// match: (MOVHstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10051  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 10052  	// result: (MOVHstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 10053  	for {
 10054  		sc := auxIntToValAndOff(v.AuxInt)
 10055  		sym1 := auxToSym(v.Aux)
 10056  		if v_0.Op != OpS390XMOVDaddr {
 10057  			break
 10058  		}
 10059  		off := auxIntToInt32(v_0.AuxInt)
 10060  		sym2 := auxToSym(v_0.Aux)
 10061  		ptr := v_0.Args[0]
 10062  		mem := v_1
 10063  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 10064  			break
 10065  		}
 10066  		v.reset(OpS390XMOVHstoreconst)
 10067  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10068  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10069  		v.AddArg2(ptr, mem)
 10070  		return true
 10071  	}
 10072  	return false
 10073  }
 10074  func rewriteValueS390X_OpS390XMOVHstoreidx(v *Value) bool {
 10075  	v_3 := v.Args[3]
 10076  	v_2 := v.Args[2]
 10077  	v_1 := v.Args[1]
 10078  	v_0 := v.Args[0]
 10079  	// match: (MOVHstoreidx [off] {sym} ptr idx (Bswap16 val) mem)
 10080  	// result: (MOVHBRstoreidx [off] {sym} ptr idx val mem)
 10081  	for {
 10082  		off := auxIntToInt32(v.AuxInt)
 10083  		sym := auxToSym(v.Aux)
 10084  		ptr := v_0
 10085  		idx := v_1
 10086  		if v_2.Op != OpBswap16 {
 10087  			break
 10088  		}
 10089  		val := v_2.Args[0]
 10090  		mem := v_3
 10091  		v.reset(OpS390XMOVHBRstoreidx)
 10092  		v.AuxInt = int32ToAuxInt(off)
 10093  		v.Aux = symToAux(sym)
 10094  		v.AddArg4(ptr, idx, val, mem)
 10095  		return true
 10096  	}
 10097  	return false
 10098  }
 10099  func rewriteValueS390X_OpS390XMOVWBR(v *Value) bool {
 10100  	v_0 := v.Args[0]
 10101  	b := v.Block
 10102  	typ := &b.Func.Config.Types
 10103  	// match: (MOVWBR x:(MOVWZload [off] {sym} ptr mem))
 10104  	// cond: x.Uses == 1
 10105  	// result: @x.Block (MOVWZreg (MOVWBRload [off] {sym} ptr mem))
 10106  	for {
 10107  		x := v_0
 10108  		if x.Op != OpS390XMOVWZload {
 10109  			break
 10110  		}
 10111  		off := auxIntToInt32(x.AuxInt)
 10112  		sym := auxToSym(x.Aux)
 10113  		mem := x.Args[1]
 10114  		ptr := x.Args[0]
 10115  		if !(x.Uses == 1) {
 10116  			break
 10117  		}
 10118  		b = x.Block
 10119  		v0 := b.NewValue0(x.Pos, OpS390XMOVWZreg, typ.UInt64)
 10120  		v.copyOf(v0)
 10121  		v1 := b.NewValue0(x.Pos, OpS390XMOVWBRload, typ.UInt32)
 10122  		v1.AuxInt = int32ToAuxInt(off)
 10123  		v1.Aux = symToAux(sym)
 10124  		v1.AddArg2(ptr, mem)
 10125  		v0.AddArg(v1)
 10126  		return true
 10127  	}
 10128  	// match: (MOVWBR x:(MOVWZloadidx [off] {sym} ptr idx mem))
 10129  	// cond: x.Uses == 1
 10130  	// result: @x.Block (MOVWZreg (MOVWBRloadidx [off] {sym} ptr idx mem))
 10131  	for {
 10132  		x := v_0
 10133  		if x.Op != OpS390XMOVWZloadidx {
 10134  			break
 10135  		}
 10136  		off := auxIntToInt32(x.AuxInt)
 10137  		sym := auxToSym(x.Aux)
 10138  		mem := x.Args[2]
 10139  		ptr := x.Args[0]
 10140  		idx := x.Args[1]
 10141  		if !(x.Uses == 1) {
 10142  			break
 10143  		}
 10144  		b = x.Block
 10145  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
 10146  		v.copyOf(v0)
 10147  		v1 := b.NewValue0(v.Pos, OpS390XMOVWBRloadidx, typ.Int32)
 10148  		v1.AuxInt = int32ToAuxInt(off)
 10149  		v1.Aux = symToAux(sym)
 10150  		v1.AddArg3(ptr, idx, mem)
 10151  		v0.AddArg(v1)
 10152  		return true
 10153  	}
 10154  	return false
 10155  }
 10156  func rewriteValueS390X_OpS390XMOVWZload(v *Value) bool {
 10157  	v_1 := v.Args[1]
 10158  	v_0 := v.Args[0]
 10159  	// match: (MOVWZload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10160  	// cond: isSamePtr(ptr1, ptr2)
 10161  	// result: (MOVWZreg x)
 10162  	for {
 10163  		off := auxIntToInt32(v.AuxInt)
 10164  		sym := auxToSym(v.Aux)
 10165  		ptr1 := v_0
 10166  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10167  			break
 10168  		}
 10169  		x := v_1.Args[1]
 10170  		ptr2 := v_1.Args[0]
 10171  		if !(isSamePtr(ptr1, ptr2)) {
 10172  			break
 10173  		}
 10174  		v.reset(OpS390XMOVWZreg)
 10175  		v.AddArg(x)
 10176  		return true
 10177  	}
 10178  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] ptr) mem)
 10179  	// cond: is20Bit(int64(off1)+int64(off2))
 10180  	// result: (MOVWZload [off1+off2] {sym} ptr mem)
 10181  	for {
 10182  		off1 := auxIntToInt32(v.AuxInt)
 10183  		sym := auxToSym(v.Aux)
 10184  		if v_0.Op != OpS390XADDconst {
 10185  			break
 10186  		}
 10187  		off2 := auxIntToInt32(v_0.AuxInt)
 10188  		ptr := v_0.Args[0]
 10189  		mem := v_1
 10190  		if !(is20Bit(int64(off1) + int64(off2))) {
 10191  			break
 10192  		}
 10193  		v.reset(OpS390XMOVWZload)
 10194  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10195  		v.Aux = symToAux(sym)
 10196  		v.AddArg2(ptr, mem)
 10197  		return true
 10198  	}
 10199  	// match: (MOVWZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10200  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10201  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10202  	for {
 10203  		off1 := auxIntToInt32(v.AuxInt)
 10204  		sym1 := auxToSym(v.Aux)
 10205  		if v_0.Op != OpS390XMOVDaddr {
 10206  			break
 10207  		}
 10208  		t := v_0.Type
 10209  		off2 := auxIntToInt32(v_0.AuxInt)
 10210  		sym2 := auxToSym(v_0.Aux)
 10211  		base := v_0.Args[0]
 10212  		mem := v_1
 10213  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10214  			break
 10215  		}
 10216  		v.reset(OpS390XMOVWZload)
 10217  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10218  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10219  		v.AddArg2(base, mem)
 10220  		return true
 10221  	}
 10222  	return false
 10223  }
 10224  func rewriteValueS390X_OpS390XMOVWZreg(v *Value) bool {
 10225  	v_0 := v.Args[0]
 10226  	b := v.Block
 10227  	// match: (MOVWZreg e:(MOVBZreg x))
 10228  	// cond: clobberIfDead(e)
 10229  	// result: (MOVBZreg x)
 10230  	for {
 10231  		e := v_0
 10232  		if e.Op != OpS390XMOVBZreg {
 10233  			break
 10234  		}
 10235  		x := e.Args[0]
 10236  		if !(clobberIfDead(e)) {
 10237  			break
 10238  		}
 10239  		v.reset(OpS390XMOVBZreg)
 10240  		v.AddArg(x)
 10241  		return true
 10242  	}
 10243  	// match: (MOVWZreg e:(MOVHZreg x))
 10244  	// cond: clobberIfDead(e)
 10245  	// result: (MOVHZreg x)
 10246  	for {
 10247  		e := v_0
 10248  		if e.Op != OpS390XMOVHZreg {
 10249  			break
 10250  		}
 10251  		x := e.Args[0]
 10252  		if !(clobberIfDead(e)) {
 10253  			break
 10254  		}
 10255  		v.reset(OpS390XMOVHZreg)
 10256  		v.AddArg(x)
 10257  		return true
 10258  	}
 10259  	// match: (MOVWZreg e:(MOVWreg x))
 10260  	// cond: clobberIfDead(e)
 10261  	// result: (MOVWZreg x)
 10262  	for {
 10263  		e := v_0
 10264  		if e.Op != OpS390XMOVWreg {
 10265  			break
 10266  		}
 10267  		x := e.Args[0]
 10268  		if !(clobberIfDead(e)) {
 10269  			break
 10270  		}
 10271  		v.reset(OpS390XMOVWZreg)
 10272  		v.AddArg(x)
 10273  		return true
 10274  	}
 10275  	// match: (MOVWZreg e:(MOVWZreg x))
 10276  	// cond: clobberIfDead(e)
 10277  	// result: (MOVWZreg x)
 10278  	for {
 10279  		e := v_0
 10280  		if e.Op != OpS390XMOVWZreg {
 10281  			break
 10282  		}
 10283  		x := e.Args[0]
 10284  		if !(clobberIfDead(e)) {
 10285  			break
 10286  		}
 10287  		v.reset(OpS390XMOVWZreg)
 10288  		v.AddArg(x)
 10289  		return true
 10290  	}
 10291  	// match: (MOVWZreg x:(MOVBZload _ _))
 10292  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10293  	// result: x
 10294  	for {
 10295  		x := v_0
 10296  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10297  			break
 10298  		}
 10299  		v.copyOf(x)
 10300  		return true
 10301  	}
 10302  	// match: (MOVWZreg x:(MOVHZload _ _))
 10303  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10304  	// result: x
 10305  	for {
 10306  		x := v_0
 10307  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10308  			break
 10309  		}
 10310  		v.copyOf(x)
 10311  		return true
 10312  	}
 10313  	// match: (MOVWZreg x:(MOVWZload _ _))
 10314  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 4)
 10315  	// result: x
 10316  	for {
 10317  		x := v_0
 10318  		if x.Op != OpS390XMOVWZload || !(!x.Type.IsSigned() || x.Type.Size() > 4) {
 10319  			break
 10320  		}
 10321  		v.copyOf(x)
 10322  		return true
 10323  	}
 10324  	// match: (MOVWZreg <t> x:(MOVWload [o] {s} p mem))
 10325  	// cond: x.Uses == 1 && clobber(x)
 10326  	// result: @x.Block (MOVWZload <t> [o] {s} p mem)
 10327  	for {
 10328  		t := v.Type
 10329  		x := v_0
 10330  		if x.Op != OpS390XMOVWload {
 10331  			break
 10332  		}
 10333  		o := auxIntToInt32(x.AuxInt)
 10334  		s := auxToSym(x.Aux)
 10335  		mem := x.Args[1]
 10336  		p := x.Args[0]
 10337  		if !(x.Uses == 1 && clobber(x)) {
 10338  			break
 10339  		}
 10340  		b = x.Block
 10341  		v0 := b.NewValue0(x.Pos, OpS390XMOVWZload, t)
 10342  		v.copyOf(v0)
 10343  		v0.AuxInt = int32ToAuxInt(o)
 10344  		v0.Aux = symToAux(s)
 10345  		v0.AddArg2(p, mem)
 10346  		return true
 10347  	}
 10348  	// match: (MOVWZreg x:(Arg <t>))
 10349  	// cond: !t.IsSigned() && t.Size() <= 4
 10350  	// result: x
 10351  	for {
 10352  		x := v_0
 10353  		if x.Op != OpArg {
 10354  			break
 10355  		}
 10356  		t := x.Type
 10357  		if !(!t.IsSigned() && t.Size() <= 4) {
 10358  			break
 10359  		}
 10360  		v.copyOf(x)
 10361  		return true
 10362  	}
 10363  	// match: (MOVWZreg (MOVDconst [c]))
 10364  	// result: (MOVDconst [int64(uint32(c))])
 10365  	for {
 10366  		if v_0.Op != OpS390XMOVDconst {
 10367  			break
 10368  		}
 10369  		c := auxIntToInt64(v_0.AuxInt)
 10370  		v.reset(OpS390XMOVDconst)
 10371  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10372  		return true
 10373  	}
 10374  	// match: (MOVWZreg (RISBGZ x {r}))
 10375  	// cond: r.OutMerge(0xffffffff) != nil
 10376  	// result: (RISBGZ x {*r.OutMerge(0xffffffff)})
 10377  	for {
 10378  		if v_0.Op != OpS390XRISBGZ {
 10379  			break
 10380  		}
 10381  		r := auxToS390xRotateParams(v_0.Aux)
 10382  		x := v_0.Args[0]
 10383  		if !(r.OutMerge(0xffffffff) != nil) {
 10384  			break
 10385  		}
 10386  		v.reset(OpS390XRISBGZ)
 10387  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0xffffffff))
 10388  		v.AddArg(x)
 10389  		return true
 10390  	}
 10391  	return false
 10392  }
 10393  func rewriteValueS390X_OpS390XMOVWload(v *Value) bool {
 10394  	v_1 := v.Args[1]
 10395  	v_0 := v.Args[0]
 10396  	// match: (MOVWload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10397  	// cond: isSamePtr(ptr1, ptr2)
 10398  	// result: (MOVWreg x)
 10399  	for {
 10400  		off := auxIntToInt32(v.AuxInt)
 10401  		sym := auxToSym(v.Aux)
 10402  		ptr1 := v_0
 10403  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10404  			break
 10405  		}
 10406  		x := v_1.Args[1]
 10407  		ptr2 := v_1.Args[0]
 10408  		if !(isSamePtr(ptr1, ptr2)) {
 10409  			break
 10410  		}
 10411  		v.reset(OpS390XMOVWreg)
 10412  		v.AddArg(x)
 10413  		return true
 10414  	}
 10415  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10416  	// cond: is20Bit(int64(off1)+int64(off2))
 10417  	// result: (MOVWload [off1+off2] {sym} ptr mem)
 10418  	for {
 10419  		off1 := auxIntToInt32(v.AuxInt)
 10420  		sym := auxToSym(v.Aux)
 10421  		if v_0.Op != OpS390XADDconst {
 10422  			break
 10423  		}
 10424  		off2 := auxIntToInt32(v_0.AuxInt)
 10425  		ptr := v_0.Args[0]
 10426  		mem := v_1
 10427  		if !(is20Bit(int64(off1) + int64(off2))) {
 10428  			break
 10429  		}
 10430  		v.reset(OpS390XMOVWload)
 10431  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10432  		v.Aux = symToAux(sym)
 10433  		v.AddArg2(ptr, mem)
 10434  		return true
 10435  	}
 10436  	// match: (MOVWload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10437  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10438  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10439  	for {
 10440  		off1 := auxIntToInt32(v.AuxInt)
 10441  		sym1 := auxToSym(v.Aux)
 10442  		if v_0.Op != OpS390XMOVDaddr {
 10443  			break
 10444  		}
 10445  		t := v_0.Type
 10446  		off2 := auxIntToInt32(v_0.AuxInt)
 10447  		sym2 := auxToSym(v_0.Aux)
 10448  		base := v_0.Args[0]
 10449  		mem := v_1
 10450  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10451  			break
 10452  		}
 10453  		v.reset(OpS390XMOVWload)
 10454  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10455  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10456  		v.AddArg2(base, mem)
 10457  		return true
 10458  	}
 10459  	return false
 10460  }
 10461  func rewriteValueS390X_OpS390XMOVWreg(v *Value) bool {
 10462  	v_0 := v.Args[0]
 10463  	b := v.Block
 10464  	// match: (MOVWreg e:(MOVBreg x))
 10465  	// cond: clobberIfDead(e)
 10466  	// result: (MOVBreg x)
 10467  	for {
 10468  		e := v_0
 10469  		if e.Op != OpS390XMOVBreg {
 10470  			break
 10471  		}
 10472  		x := e.Args[0]
 10473  		if !(clobberIfDead(e)) {
 10474  			break
 10475  		}
 10476  		v.reset(OpS390XMOVBreg)
 10477  		v.AddArg(x)
 10478  		return true
 10479  	}
 10480  	// match: (MOVWreg e:(MOVHreg x))
 10481  	// cond: clobberIfDead(e)
 10482  	// result: (MOVHreg x)
 10483  	for {
 10484  		e := v_0
 10485  		if e.Op != OpS390XMOVHreg {
 10486  			break
 10487  		}
 10488  		x := e.Args[0]
 10489  		if !(clobberIfDead(e)) {
 10490  			break
 10491  		}
 10492  		v.reset(OpS390XMOVHreg)
 10493  		v.AddArg(x)
 10494  		return true
 10495  	}
 10496  	// match: (MOVWreg e:(MOVWreg x))
 10497  	// cond: clobberIfDead(e)
 10498  	// result: (MOVWreg x)
 10499  	for {
 10500  		e := v_0
 10501  		if e.Op != OpS390XMOVWreg {
 10502  			break
 10503  		}
 10504  		x := e.Args[0]
 10505  		if !(clobberIfDead(e)) {
 10506  			break
 10507  		}
 10508  		v.reset(OpS390XMOVWreg)
 10509  		v.AddArg(x)
 10510  		return true
 10511  	}
 10512  	// match: (MOVWreg e:(MOVWZreg x))
 10513  	// cond: clobberIfDead(e)
 10514  	// result: (MOVWreg x)
 10515  	for {
 10516  		e := v_0
 10517  		if e.Op != OpS390XMOVWZreg {
 10518  			break
 10519  		}
 10520  		x := e.Args[0]
 10521  		if !(clobberIfDead(e)) {
 10522  			break
 10523  		}
 10524  		v.reset(OpS390XMOVWreg)
 10525  		v.AddArg(x)
 10526  		return true
 10527  	}
 10528  	// match: (MOVWreg x:(MOVBload _ _))
 10529  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10530  	// result: x
 10531  	for {
 10532  		x := v_0
 10533  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10534  			break
 10535  		}
 10536  		v.copyOf(x)
 10537  		return true
 10538  	}
 10539  	// match: (MOVWreg x:(MOVHload _ _))
 10540  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10541  	// result: x
 10542  	for {
 10543  		x := v_0
 10544  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10545  			break
 10546  		}
 10547  		v.copyOf(x)
 10548  		return true
 10549  	}
 10550  	// match: (MOVWreg x:(MOVWload _ _))
 10551  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10552  	// result: x
 10553  	for {
 10554  		x := v_0
 10555  		if x.Op != OpS390XMOVWload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10556  			break
 10557  		}
 10558  		v.copyOf(x)
 10559  		return true
 10560  	}
 10561  	// match: (MOVWreg x:(MOVBZload _ _))
 10562  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10563  	// result: x
 10564  	for {
 10565  		x := v_0
 10566  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10567  			break
 10568  		}
 10569  		v.copyOf(x)
 10570  		return true
 10571  	}
 10572  	// match: (MOVWreg x:(MOVHZload _ _))
 10573  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10574  	// result: x
 10575  	for {
 10576  		x := v_0
 10577  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10578  			break
 10579  		}
 10580  		v.copyOf(x)
 10581  		return true
 10582  	}
 10583  	// match: (MOVWreg <t> x:(MOVWZload [o] {s} p mem))
 10584  	// cond: x.Uses == 1 && clobber(x)
 10585  	// result: @x.Block (MOVWload <t> [o] {s} p mem)
 10586  	for {
 10587  		t := v.Type
 10588  		x := v_0
 10589  		if x.Op != OpS390XMOVWZload {
 10590  			break
 10591  		}
 10592  		o := auxIntToInt32(x.AuxInt)
 10593  		s := auxToSym(x.Aux)
 10594  		mem := x.Args[1]
 10595  		p := x.Args[0]
 10596  		if !(x.Uses == 1 && clobber(x)) {
 10597  			break
 10598  		}
 10599  		b = x.Block
 10600  		v0 := b.NewValue0(x.Pos, OpS390XMOVWload, t)
 10601  		v.copyOf(v0)
 10602  		v0.AuxInt = int32ToAuxInt(o)
 10603  		v0.Aux = symToAux(s)
 10604  		v0.AddArg2(p, mem)
 10605  		return true
 10606  	}
 10607  	// match: (MOVWreg x:(Arg <t>))
 10608  	// cond: t.IsSigned() && t.Size() <= 4
 10609  	// result: x
 10610  	for {
 10611  		x := v_0
 10612  		if x.Op != OpArg {
 10613  			break
 10614  		}
 10615  		t := x.Type
 10616  		if !(t.IsSigned() && t.Size() <= 4) {
 10617  			break
 10618  		}
 10619  		v.copyOf(x)
 10620  		return true
 10621  	}
 10622  	// match: (MOVWreg (MOVDconst [c]))
 10623  	// result: (MOVDconst [int64(int32(c))])
 10624  	for {
 10625  		if v_0.Op != OpS390XMOVDconst {
 10626  			break
 10627  		}
 10628  		c := auxIntToInt64(v_0.AuxInt)
 10629  		v.reset(OpS390XMOVDconst)
 10630  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 10631  		return true
 10632  	}
 10633  	return false
 10634  }
 10635  func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
 10636  	v_2 := v.Args[2]
 10637  	v_1 := v.Args[1]
 10638  	v_0 := v.Args[0]
 10639  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 10640  	// result: (MOVWstore [off] {sym} ptr x mem)
 10641  	for {
 10642  		off := auxIntToInt32(v.AuxInt)
 10643  		sym := auxToSym(v.Aux)
 10644  		ptr := v_0
 10645  		if v_1.Op != OpS390XMOVWreg {
 10646  			break
 10647  		}
 10648  		x := v_1.Args[0]
 10649  		mem := v_2
 10650  		v.reset(OpS390XMOVWstore)
 10651  		v.AuxInt = int32ToAuxInt(off)
 10652  		v.Aux = symToAux(sym)
 10653  		v.AddArg3(ptr, x, mem)
 10654  		return true
 10655  	}
 10656  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 10657  	// result: (MOVWstore [off] {sym} ptr x mem)
 10658  	for {
 10659  		off := auxIntToInt32(v.AuxInt)
 10660  		sym := auxToSym(v.Aux)
 10661  		ptr := v_0
 10662  		if v_1.Op != OpS390XMOVWZreg {
 10663  			break
 10664  		}
 10665  		x := v_1.Args[0]
 10666  		mem := v_2
 10667  		v.reset(OpS390XMOVWstore)
 10668  		v.AuxInt = int32ToAuxInt(off)
 10669  		v.Aux = symToAux(sym)
 10670  		v.AddArg3(ptr, x, mem)
 10671  		return true
 10672  	}
 10673  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10674  	// cond: is20Bit(int64(off1)+int64(off2))
 10675  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
 10676  	for {
 10677  		off1 := auxIntToInt32(v.AuxInt)
 10678  		sym := auxToSym(v.Aux)
 10679  		if v_0.Op != OpS390XADDconst {
 10680  			break
 10681  		}
 10682  		off2 := auxIntToInt32(v_0.AuxInt)
 10683  		ptr := v_0.Args[0]
 10684  		val := v_1
 10685  		mem := v_2
 10686  		if !(is20Bit(int64(off1) + int64(off2))) {
 10687  			break
 10688  		}
 10689  		v.reset(OpS390XMOVWstore)
 10690  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10691  		v.Aux = symToAux(sym)
 10692  		v.AddArg3(ptr, val, mem)
 10693  		return true
 10694  	}
 10695  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [c]) mem)
 10696  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
 10697  	// result: (MOVWstoreconst [makeValAndOff(int32(c),off)] {sym} ptr mem)
 10698  	for {
 10699  		off := auxIntToInt32(v.AuxInt)
 10700  		sym := auxToSym(v.Aux)
 10701  		ptr := v_0
 10702  		if v_1.Op != OpS390XMOVDconst {
 10703  			break
 10704  		}
 10705  		c := auxIntToInt64(v_1.AuxInt)
 10706  		mem := v_2
 10707  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
 10708  			break
 10709  		}
 10710  		v.reset(OpS390XMOVWstoreconst)
 10711  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
 10712  		v.Aux = symToAux(sym)
 10713  		v.AddArg2(ptr, mem)
 10714  		return true
 10715  	}
 10716  	// match: (MOVWstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10717  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10718  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
 10719  	for {
 10720  		off1 := auxIntToInt32(v.AuxInt)
 10721  		sym1 := auxToSym(v.Aux)
 10722  		if v_0.Op != OpS390XMOVDaddr {
 10723  			break
 10724  		}
 10725  		t := v_0.Type
 10726  		off2 := auxIntToInt32(v_0.AuxInt)
 10727  		sym2 := auxToSym(v_0.Aux)
 10728  		base := v_0.Args[0]
 10729  		val := v_1
 10730  		mem := v_2
 10731  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10732  			break
 10733  		}
 10734  		v.reset(OpS390XMOVWstore)
 10735  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10736  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10737  		v.AddArg3(base, val, mem)
 10738  		return true
 10739  	}
 10740  	// match: (MOVWstore [i] {s} p w1 x:(MOVWstore [i-4] {s} p w0 mem))
 10741  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && setPos(v, x.Pos) && clobber(x)
 10742  	// result: (STM2 [i-4] {s} p w0 w1 mem)
 10743  	for {
 10744  		i := auxIntToInt32(v.AuxInt)
 10745  		s := auxToSym(v.Aux)
 10746  		p := v_0
 10747  		w1 := v_1
 10748  		x := v_2
 10749  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10750  			break
 10751  		}
 10752  		mem := x.Args[2]
 10753  		if p != x.Args[0] {
 10754  			break
 10755  		}
 10756  		w0 := x.Args[1]
 10757  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && setPos(v, x.Pos) && clobber(x)) {
 10758  			break
 10759  		}
 10760  		v.reset(OpS390XSTM2)
 10761  		v.AuxInt = int32ToAuxInt(i - 4)
 10762  		v.Aux = symToAux(s)
 10763  		v.AddArg4(p, w0, w1, mem)
 10764  		return true
 10765  	}
 10766  	// match: (MOVWstore [i] {s} p w2 x:(STM2 [i-8] {s} p w0 w1 mem))
 10767  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)
 10768  	// result: (STM3 [i-8] {s} p w0 w1 w2 mem)
 10769  	for {
 10770  		i := auxIntToInt32(v.AuxInt)
 10771  		s := auxToSym(v.Aux)
 10772  		p := v_0
 10773  		w2 := v_1
 10774  		x := v_2
 10775  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 10776  			break
 10777  		}
 10778  		mem := x.Args[3]
 10779  		if p != x.Args[0] {
 10780  			break
 10781  		}
 10782  		w0 := x.Args[1]
 10783  		w1 := x.Args[2]
 10784  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)) {
 10785  			break
 10786  		}
 10787  		v.reset(OpS390XSTM3)
 10788  		v.AuxInt = int32ToAuxInt(i - 8)
 10789  		v.Aux = symToAux(s)
 10790  		v.AddArg5(p, w0, w1, w2, mem)
 10791  		return true
 10792  	}
 10793  	// match: (MOVWstore [i] {s} p w3 x:(STM3 [i-12] {s} p w0 w1 w2 mem))
 10794  	// cond: x.Uses == 1 && is20Bit(int64(i)-12) && setPos(v, x.Pos) && clobber(x)
 10795  	// result: (STM4 [i-12] {s} p w0 w1 w2 w3 mem)
 10796  	for {
 10797  		i := auxIntToInt32(v.AuxInt)
 10798  		s := auxToSym(v.Aux)
 10799  		p := v_0
 10800  		w3 := v_1
 10801  		x := v_2
 10802  		if x.Op != OpS390XSTM3 || auxIntToInt32(x.AuxInt) != i-12 || auxToSym(x.Aux) != s {
 10803  			break
 10804  		}
 10805  		mem := x.Args[4]
 10806  		if p != x.Args[0] {
 10807  			break
 10808  		}
 10809  		w0 := x.Args[1]
 10810  		w1 := x.Args[2]
 10811  		w2 := x.Args[3]
 10812  		if !(x.Uses == 1 && is20Bit(int64(i)-12) && setPos(v, x.Pos) && clobber(x)) {
 10813  			break
 10814  		}
 10815  		v.reset(OpS390XSTM4)
 10816  		v.AuxInt = int32ToAuxInt(i - 12)
 10817  		v.Aux = symToAux(s)
 10818  		v.AddArg6(p, w0, w1, w2, w3, mem)
 10819  		return true
 10820  	}
 10821  	// match: (MOVWstore [off] {sym} ptr r:(MOVWBR x) mem)
 10822  	// cond: r.Uses == 1
 10823  	// result: (MOVWBRstore [off] {sym} ptr x mem)
 10824  	for {
 10825  		off := auxIntToInt32(v.AuxInt)
 10826  		sym := auxToSym(v.Aux)
 10827  		ptr := v_0
 10828  		r := v_1
 10829  		if r.Op != OpS390XMOVWBR {
 10830  			break
 10831  		}
 10832  		x := r.Args[0]
 10833  		mem := v_2
 10834  		if !(r.Uses == 1) {
 10835  			break
 10836  		}
 10837  		v.reset(OpS390XMOVWBRstore)
 10838  		v.AuxInt = int32ToAuxInt(off)
 10839  		v.Aux = symToAux(sym)
 10840  		v.AddArg3(ptr, x, mem)
 10841  		return true
 10842  	}
 10843  	return false
 10844  }
 10845  func rewriteValueS390X_OpS390XMOVWstoreconst(v *Value) bool {
 10846  	v_1 := v.Args[1]
 10847  	v_0 := v.Args[0]
 10848  	// match: (MOVWstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10849  	// cond: isU12Bit(sc.Off64()+int64(off))
 10850  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
 10851  	for {
 10852  		sc := auxIntToValAndOff(v.AuxInt)
 10853  		s := auxToSym(v.Aux)
 10854  		if v_0.Op != OpS390XADDconst {
 10855  			break
 10856  		}
 10857  		off := auxIntToInt32(v_0.AuxInt)
 10858  		ptr := v_0.Args[0]
 10859  		mem := v_1
 10860  		if !(isU12Bit(sc.Off64() + int64(off))) {
 10861  			break
 10862  		}
 10863  		v.reset(OpS390XMOVWstoreconst)
 10864  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10865  		v.Aux = symToAux(s)
 10866  		v.AddArg2(ptr, mem)
 10867  		return true
 10868  	}
 10869  	// match: (MOVWstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10870  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 10871  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 10872  	for {
 10873  		sc := auxIntToValAndOff(v.AuxInt)
 10874  		sym1 := auxToSym(v.Aux)
 10875  		if v_0.Op != OpS390XMOVDaddr {
 10876  			break
 10877  		}
 10878  		off := auxIntToInt32(v_0.AuxInt)
 10879  		sym2 := auxToSym(v_0.Aux)
 10880  		ptr := v_0.Args[0]
 10881  		mem := v_1
 10882  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 10883  			break
 10884  		}
 10885  		v.reset(OpS390XMOVWstoreconst)
 10886  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10887  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10888  		v.AddArg2(ptr, mem)
 10889  		return true
 10890  	}
 10891  	return false
 10892  }
 10893  func rewriteValueS390X_OpS390XMOVWstoreidx(v *Value) bool {
 10894  	v_3 := v.Args[3]
 10895  	v_2 := v.Args[2]
 10896  	v_1 := v.Args[1]
 10897  	v_0 := v.Args[0]
 10898  	// match: (MOVWstoreidx [off] {sym} ptr idx r:(MOVWBR x) mem)
 10899  	// cond: r.Uses == 1
 10900  	// result: (MOVWBRstoreidx [off] {sym} ptr idx x mem)
 10901  	for {
 10902  		off := auxIntToInt32(v.AuxInt)
 10903  		sym := auxToSym(v.Aux)
 10904  		ptr := v_0
 10905  		idx := v_1
 10906  		r := v_2
 10907  		if r.Op != OpS390XMOVWBR {
 10908  			break
 10909  		}
 10910  		x := r.Args[0]
 10911  		mem := v_3
 10912  		if !(r.Uses == 1) {
 10913  			break
 10914  		}
 10915  		v.reset(OpS390XMOVWBRstoreidx)
 10916  		v.AuxInt = int32ToAuxInt(off)
 10917  		v.Aux = symToAux(sym)
 10918  		v.AddArg4(ptr, idx, x, mem)
 10919  		return true
 10920  	}
 10921  	return false
 10922  }
 10923  func rewriteValueS390X_OpS390XMULLD(v *Value) bool {
 10924  	v_1 := v.Args[1]
 10925  	v_0 := v.Args[0]
 10926  	// match: (MULLD x (MOVDconst [c]))
 10927  	// cond: is32Bit(c)
 10928  	// result: (MULLDconst [int32(c)] x)
 10929  	for {
 10930  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10931  			x := v_0
 10932  			if v_1.Op != OpS390XMOVDconst {
 10933  				continue
 10934  			}
 10935  			c := auxIntToInt64(v_1.AuxInt)
 10936  			if !(is32Bit(c)) {
 10937  				continue
 10938  			}
 10939  			v.reset(OpS390XMULLDconst)
 10940  			v.AuxInt = int32ToAuxInt(int32(c))
 10941  			v.AddArg(x)
 10942  			return true
 10943  		}
 10944  		break
 10945  	}
 10946  	// match: (MULLD <t> x g:(MOVDload [off] {sym} ptr mem))
 10947  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 10948  	// result: (MULLDload <t> [off] {sym} x ptr mem)
 10949  	for {
 10950  		t := v.Type
 10951  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 10952  			x := v_0
 10953  			g := v_1
 10954  			if g.Op != OpS390XMOVDload {
 10955  				continue
 10956  			}
 10957  			off := auxIntToInt32(g.AuxInt)
 10958  			sym := auxToSym(g.Aux)
 10959  			mem := g.Args[1]
 10960  			ptr := g.Args[0]
 10961  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 10962  				continue
 10963  			}
 10964  			v.reset(OpS390XMULLDload)
 10965  			v.Type = t
 10966  			v.AuxInt = int32ToAuxInt(off)
 10967  			v.Aux = symToAux(sym)
 10968  			v.AddArg3(x, ptr, mem)
 10969  			return true
 10970  		}
 10971  		break
 10972  	}
 10973  	return false
 10974  }
 10975  func rewriteValueS390X_OpS390XMULLDconst(v *Value) bool {
 10976  	v_0 := v.Args[0]
 10977  	b := v.Block
 10978  	// match: (MULLDconst <t> x [c])
 10979  	// cond: isPowerOfTwo(c&(c-1))
 10980  	// result: (ADD (SLDconst <t> x [uint8(log32(c&(c-1)))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 10981  	for {
 10982  		t := v.Type
 10983  		c := auxIntToInt32(v.AuxInt)
 10984  		x := v_0
 10985  		if !(isPowerOfTwo(c & (c - 1))) {
 10986  			break
 10987  		}
 10988  		v.reset(OpS390XADD)
 10989  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10990  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 10991  		v0.AddArg(x)
 10992  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 10993  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 10994  		v1.AddArg(x)
 10995  		v.AddArg2(v0, v1)
 10996  		return true
 10997  	}
 10998  	// match: (MULLDconst <t> x [c])
 10999  	// cond: isPowerOfTwo(c+(c&^(c-1)))
 11000  	// result: (SUB (SLDconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 11001  	for {
 11002  		t := v.Type
 11003  		c := auxIntToInt32(v.AuxInt)
 11004  		x := v_0
 11005  		if !(isPowerOfTwo(c + (c &^ (c - 1)))) {
 11006  			break
 11007  		}
 11008  		v.reset(OpS390XSUB)
 11009  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11010  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11011  		v0.AddArg(x)
 11012  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11013  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11014  		v1.AddArg(x)
 11015  		v.AddArg2(v0, v1)
 11016  		return true
 11017  	}
 11018  	// match: (MULLDconst <t> x [c])
 11019  	// cond: isPowerOfTwo(-c+(-c&^(-c-1)))
 11020  	// result: (SUB (SLDconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLDconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11021  	for {
 11022  		t := v.Type
 11023  		c := auxIntToInt32(v.AuxInt)
 11024  		x := v_0
 11025  		if !(isPowerOfTwo(-c + (-c &^ (-c - 1)))) {
 11026  			break
 11027  		}
 11028  		v.reset(OpS390XSUB)
 11029  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11030  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11031  		v0.AddArg(x)
 11032  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11033  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11034  		v1.AddArg(x)
 11035  		v.AddArg2(v0, v1)
 11036  		return true
 11037  	}
 11038  	// match: (MULLDconst [c] (MOVDconst [d]))
 11039  	// result: (MOVDconst [int64(c)*d])
 11040  	for {
 11041  		c := auxIntToInt32(v.AuxInt)
 11042  		if v_0.Op != OpS390XMOVDconst {
 11043  			break
 11044  		}
 11045  		d := auxIntToInt64(v_0.AuxInt)
 11046  		v.reset(OpS390XMOVDconst)
 11047  		v.AuxInt = int64ToAuxInt(int64(c) * d)
 11048  		return true
 11049  	}
 11050  	return false
 11051  }
 11052  func rewriteValueS390X_OpS390XMULLDload(v *Value) bool {
 11053  	v_2 := v.Args[2]
 11054  	v_1 := v.Args[1]
 11055  	v_0 := v.Args[0]
 11056  	b := v.Block
 11057  	// match: (MULLDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11058  	// cond: isSamePtr(ptr1, ptr2)
 11059  	// result: (MULLD x (LGDR <t> y))
 11060  	for {
 11061  		t := v.Type
 11062  		off := auxIntToInt32(v.AuxInt)
 11063  		sym := auxToSym(v.Aux)
 11064  		x := v_0
 11065  		ptr1 := v_1
 11066  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 11067  			break
 11068  		}
 11069  		y := v_2.Args[1]
 11070  		ptr2 := v_2.Args[0]
 11071  		if !(isSamePtr(ptr1, ptr2)) {
 11072  			break
 11073  		}
 11074  		v.reset(OpS390XMULLD)
 11075  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 11076  		v0.AddArg(y)
 11077  		v.AddArg2(x, v0)
 11078  		return true
 11079  	}
 11080  	// match: (MULLDload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11081  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11082  	// result: (MULLDload [off1+off2] {sym} x ptr mem)
 11083  	for {
 11084  		off1 := auxIntToInt32(v.AuxInt)
 11085  		sym := auxToSym(v.Aux)
 11086  		x := v_0
 11087  		if v_1.Op != OpS390XADDconst {
 11088  			break
 11089  		}
 11090  		off2 := auxIntToInt32(v_1.AuxInt)
 11091  		ptr := v_1.Args[0]
 11092  		mem := v_2
 11093  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11094  			break
 11095  		}
 11096  		v.reset(OpS390XMULLDload)
 11097  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11098  		v.Aux = symToAux(sym)
 11099  		v.AddArg3(x, ptr, mem)
 11100  		return true
 11101  	}
 11102  	// match: (MULLDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11103  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11104  	// result: (MULLDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11105  	for {
 11106  		o1 := auxIntToInt32(v.AuxInt)
 11107  		s1 := auxToSym(v.Aux)
 11108  		x := v_0
 11109  		if v_1.Op != OpS390XMOVDaddr {
 11110  			break
 11111  		}
 11112  		o2 := auxIntToInt32(v_1.AuxInt)
 11113  		s2 := auxToSym(v_1.Aux)
 11114  		ptr := v_1.Args[0]
 11115  		mem := v_2
 11116  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11117  			break
 11118  		}
 11119  		v.reset(OpS390XMULLDload)
 11120  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11121  		v.Aux = symToAux(mergeSym(s1, s2))
 11122  		v.AddArg3(x, ptr, mem)
 11123  		return true
 11124  	}
 11125  	return false
 11126  }
 11127  func rewriteValueS390X_OpS390XMULLW(v *Value) bool {
 11128  	v_1 := v.Args[1]
 11129  	v_0 := v.Args[0]
 11130  	// match: (MULLW x (MOVDconst [c]))
 11131  	// result: (MULLWconst [int32(c)] x)
 11132  	for {
 11133  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11134  			x := v_0
 11135  			if v_1.Op != OpS390XMOVDconst {
 11136  				continue
 11137  			}
 11138  			c := auxIntToInt64(v_1.AuxInt)
 11139  			v.reset(OpS390XMULLWconst)
 11140  			v.AuxInt = int32ToAuxInt(int32(c))
 11141  			v.AddArg(x)
 11142  			return true
 11143  		}
 11144  		break
 11145  	}
 11146  	// match: (MULLW <t> x g:(MOVWload [off] {sym} ptr mem))
 11147  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11148  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11149  	for {
 11150  		t := v.Type
 11151  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11152  			x := v_0
 11153  			g := v_1
 11154  			if g.Op != OpS390XMOVWload {
 11155  				continue
 11156  			}
 11157  			off := auxIntToInt32(g.AuxInt)
 11158  			sym := auxToSym(g.Aux)
 11159  			mem := g.Args[1]
 11160  			ptr := g.Args[0]
 11161  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11162  				continue
 11163  			}
 11164  			v.reset(OpS390XMULLWload)
 11165  			v.Type = t
 11166  			v.AuxInt = int32ToAuxInt(off)
 11167  			v.Aux = symToAux(sym)
 11168  			v.AddArg3(x, ptr, mem)
 11169  			return true
 11170  		}
 11171  		break
 11172  	}
 11173  	// match: (MULLW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11174  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11175  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11176  	for {
 11177  		t := v.Type
 11178  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11179  			x := v_0
 11180  			g := v_1
 11181  			if g.Op != OpS390XMOVWZload {
 11182  				continue
 11183  			}
 11184  			off := auxIntToInt32(g.AuxInt)
 11185  			sym := auxToSym(g.Aux)
 11186  			mem := g.Args[1]
 11187  			ptr := g.Args[0]
 11188  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11189  				continue
 11190  			}
 11191  			v.reset(OpS390XMULLWload)
 11192  			v.Type = t
 11193  			v.AuxInt = int32ToAuxInt(off)
 11194  			v.Aux = symToAux(sym)
 11195  			v.AddArg3(x, ptr, mem)
 11196  			return true
 11197  		}
 11198  		break
 11199  	}
 11200  	return false
 11201  }
 11202  func rewriteValueS390X_OpS390XMULLWconst(v *Value) bool {
 11203  	v_0 := v.Args[0]
 11204  	b := v.Block
 11205  	// match: (MULLWconst <t> x [c])
 11206  	// cond: isPowerOfTwo(c&(c-1))
 11207  	// result: (ADDW (SLWconst <t> x [uint8(log32(c&(c-1)))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11208  	for {
 11209  		t := v.Type
 11210  		c := auxIntToInt32(v.AuxInt)
 11211  		x := v_0
 11212  		if !(isPowerOfTwo(c & (c - 1))) {
 11213  			break
 11214  		}
 11215  		v.reset(OpS390XADDW)
 11216  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11217  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 11218  		v0.AddArg(x)
 11219  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11220  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11221  		v1.AddArg(x)
 11222  		v.AddArg2(v0, v1)
 11223  		return true
 11224  	}
 11225  	// match: (MULLWconst <t> x [c])
 11226  	// cond: isPowerOfTwo(c+(c&^(c-1)))
 11227  	// result: (SUBW (SLWconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11228  	for {
 11229  		t := v.Type
 11230  		c := auxIntToInt32(v.AuxInt)
 11231  		x := v_0
 11232  		if !(isPowerOfTwo(c + (c &^ (c - 1)))) {
 11233  			break
 11234  		}
 11235  		v.reset(OpS390XSUBW)
 11236  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11237  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11238  		v0.AddArg(x)
 11239  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11240  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11241  		v1.AddArg(x)
 11242  		v.AddArg2(v0, v1)
 11243  		return true
 11244  	}
 11245  	// match: (MULLWconst <t> x [c])
 11246  	// cond: isPowerOfTwo(-c+(-c&^(-c-1)))
 11247  	// result: (SUBW (SLWconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLWconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11248  	for {
 11249  		t := v.Type
 11250  		c := auxIntToInt32(v.AuxInt)
 11251  		x := v_0
 11252  		if !(isPowerOfTwo(-c + (-c &^ (-c - 1)))) {
 11253  			break
 11254  		}
 11255  		v.reset(OpS390XSUBW)
 11256  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11257  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11258  		v0.AddArg(x)
 11259  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11260  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11261  		v1.AddArg(x)
 11262  		v.AddArg2(v0, v1)
 11263  		return true
 11264  	}
 11265  	// match: (MULLWconst [c] (MOVDconst [d]))
 11266  	// result: (MOVDconst [int64(c*int32(d))])
 11267  	for {
 11268  		c := auxIntToInt32(v.AuxInt)
 11269  		if v_0.Op != OpS390XMOVDconst {
 11270  			break
 11271  		}
 11272  		d := auxIntToInt64(v_0.AuxInt)
 11273  		v.reset(OpS390XMOVDconst)
 11274  		v.AuxInt = int64ToAuxInt(int64(c * int32(d)))
 11275  		return true
 11276  	}
 11277  	return false
 11278  }
 11279  func rewriteValueS390X_OpS390XMULLWload(v *Value) bool {
 11280  	v_2 := v.Args[2]
 11281  	v_1 := v.Args[1]
 11282  	v_0 := v.Args[0]
 11283  	// match: (MULLWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11284  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11285  	// result: (MULLWload [off1+off2] {sym} x ptr mem)
 11286  	for {
 11287  		off1 := auxIntToInt32(v.AuxInt)
 11288  		sym := auxToSym(v.Aux)
 11289  		x := v_0
 11290  		if v_1.Op != OpS390XADDconst {
 11291  			break
 11292  		}
 11293  		off2 := auxIntToInt32(v_1.AuxInt)
 11294  		ptr := v_1.Args[0]
 11295  		mem := v_2
 11296  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11297  			break
 11298  		}
 11299  		v.reset(OpS390XMULLWload)
 11300  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11301  		v.Aux = symToAux(sym)
 11302  		v.AddArg3(x, ptr, mem)
 11303  		return true
 11304  	}
 11305  	// match: (MULLWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11306  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11307  	// result: (MULLWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11308  	for {
 11309  		o1 := auxIntToInt32(v.AuxInt)
 11310  		s1 := auxToSym(v.Aux)
 11311  		x := v_0
 11312  		if v_1.Op != OpS390XMOVDaddr {
 11313  			break
 11314  		}
 11315  		o2 := auxIntToInt32(v_1.AuxInt)
 11316  		s2 := auxToSym(v_1.Aux)
 11317  		ptr := v_1.Args[0]
 11318  		mem := v_2
 11319  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11320  			break
 11321  		}
 11322  		v.reset(OpS390XMULLWload)
 11323  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11324  		v.Aux = symToAux(mergeSym(s1, s2))
 11325  		v.AddArg3(x, ptr, mem)
 11326  		return true
 11327  	}
 11328  	return false
 11329  }
 11330  func rewriteValueS390X_OpS390XNEG(v *Value) bool {
 11331  	v_0 := v.Args[0]
 11332  	// match: (NEG (MOVDconst [c]))
 11333  	// result: (MOVDconst [-c])
 11334  	for {
 11335  		if v_0.Op != OpS390XMOVDconst {
 11336  			break
 11337  		}
 11338  		c := auxIntToInt64(v_0.AuxInt)
 11339  		v.reset(OpS390XMOVDconst)
 11340  		v.AuxInt = int64ToAuxInt(-c)
 11341  		return true
 11342  	}
 11343  	// match: (NEG (NEG x))
 11344  	// result: x
 11345  	for {
 11346  		if v_0.Op != OpS390XNEG {
 11347  			break
 11348  		}
 11349  		x := v_0.Args[0]
 11350  		v.copyOf(x)
 11351  		return true
 11352  	}
 11353  	// match: (NEG (ADDconst [c] (NEG x)))
 11354  	// cond: c != -(1<<31)
 11355  	// result: (ADDconst [-c] x)
 11356  	for {
 11357  		if v_0.Op != OpS390XADDconst {
 11358  			break
 11359  		}
 11360  		c := auxIntToInt32(v_0.AuxInt)
 11361  		v_0_0 := v_0.Args[0]
 11362  		if v_0_0.Op != OpS390XNEG {
 11363  			break
 11364  		}
 11365  		x := v_0_0.Args[0]
 11366  		if !(c != -(1 << 31)) {
 11367  			break
 11368  		}
 11369  		v.reset(OpS390XADDconst)
 11370  		v.AuxInt = int32ToAuxInt(-c)
 11371  		v.AddArg(x)
 11372  		return true
 11373  	}
 11374  	return false
 11375  }
 11376  func rewriteValueS390X_OpS390XNEGW(v *Value) bool {
 11377  	v_0 := v.Args[0]
 11378  	// match: (NEGW (MOVDconst [c]))
 11379  	// result: (MOVDconst [int64(int32(-c))])
 11380  	for {
 11381  		if v_0.Op != OpS390XMOVDconst {
 11382  			break
 11383  		}
 11384  		c := auxIntToInt64(v_0.AuxInt)
 11385  		v.reset(OpS390XMOVDconst)
 11386  		v.AuxInt = int64ToAuxInt(int64(int32(-c)))
 11387  		return true
 11388  	}
 11389  	return false
 11390  }
 11391  func rewriteValueS390X_OpS390XNOT(v *Value) bool {
 11392  	v_0 := v.Args[0]
 11393  	b := v.Block
 11394  	typ := &b.Func.Config.Types
 11395  	// match: (NOT x)
 11396  	// result: (XOR (MOVDconst [-1]) x)
 11397  	for {
 11398  		x := v_0
 11399  		v.reset(OpS390XXOR)
 11400  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 11401  		v0.AuxInt = int64ToAuxInt(-1)
 11402  		v.AddArg2(v0, x)
 11403  		return true
 11404  	}
 11405  }
 11406  func rewriteValueS390X_OpS390XNOTW(v *Value) bool {
 11407  	v_0 := v.Args[0]
 11408  	// match: (NOTW x)
 11409  	// result: (XORWconst [-1] x)
 11410  	for {
 11411  		x := v_0
 11412  		v.reset(OpS390XXORWconst)
 11413  		v.AuxInt = int32ToAuxInt(-1)
 11414  		v.AddArg(x)
 11415  		return true
 11416  	}
 11417  }
 11418  func rewriteValueS390X_OpS390XOR(v *Value) bool {
 11419  	v_1 := v.Args[1]
 11420  	v_0 := v.Args[0]
 11421  	b := v.Block
 11422  	// match: (OR x (MOVDconst [c]))
 11423  	// cond: isU32Bit(c)
 11424  	// result: (ORconst [c] x)
 11425  	for {
 11426  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11427  			x := v_0
 11428  			if v_1.Op != OpS390XMOVDconst {
 11429  				continue
 11430  			}
 11431  			c := auxIntToInt64(v_1.AuxInt)
 11432  			if !(isU32Bit(c)) {
 11433  				continue
 11434  			}
 11435  			v.reset(OpS390XORconst)
 11436  			v.AuxInt = int64ToAuxInt(c)
 11437  			v.AddArg(x)
 11438  			return true
 11439  		}
 11440  		break
 11441  	}
 11442  	// match: (OR (MOVDconst [-1<<63]) (LGDR <t> x))
 11443  	// result: (LGDR <t> (LNDFR <x.Type> x))
 11444  	for {
 11445  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11446  			if v_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0.AuxInt) != -1<<63 || v_1.Op != OpS390XLGDR {
 11447  				continue
 11448  			}
 11449  			t := v_1.Type
 11450  			x := v_1.Args[0]
 11451  			v.reset(OpS390XLGDR)
 11452  			v.Type = t
 11453  			v0 := b.NewValue0(v.Pos, OpS390XLNDFR, x.Type)
 11454  			v0.AddArg(x)
 11455  			v.AddArg(v0)
 11456  			return true
 11457  		}
 11458  		break
 11459  	}
 11460  	// match: (OR (RISBGZ (LGDR x) {r}) (LGDR (LPDFR <t> y)))
 11461  	// cond: r == s390x.NewRotateParams(0, 0, 0)
 11462  	// result: (LGDR (CPSDR <t> y x))
 11463  	for {
 11464  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11465  			if v_0.Op != OpS390XRISBGZ {
 11466  				continue
 11467  			}
 11468  			r := auxToS390xRotateParams(v_0.Aux)
 11469  			v_0_0 := v_0.Args[0]
 11470  			if v_0_0.Op != OpS390XLGDR {
 11471  				continue
 11472  			}
 11473  			x := v_0_0.Args[0]
 11474  			if v_1.Op != OpS390XLGDR {
 11475  				continue
 11476  			}
 11477  			v_1_0 := v_1.Args[0]
 11478  			if v_1_0.Op != OpS390XLPDFR {
 11479  				continue
 11480  			}
 11481  			t := v_1_0.Type
 11482  			y := v_1_0.Args[0]
 11483  			if !(r == s390x.NewRotateParams(0, 0, 0)) {
 11484  				continue
 11485  			}
 11486  			v.reset(OpS390XLGDR)
 11487  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, t)
 11488  			v0.AddArg2(y, x)
 11489  			v.AddArg(v0)
 11490  			return true
 11491  		}
 11492  		break
 11493  	}
 11494  	// match: (OR (RISBGZ (LGDR x) {r}) (MOVDconst [c]))
 11495  	// cond: c >= 0 && r == s390x.NewRotateParams(0, 0, 0)
 11496  	// result: (LGDR (CPSDR <x.Type> (FMOVDconst <x.Type> [math.Float64frombits(uint64(c))]) x))
 11497  	for {
 11498  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11499  			if v_0.Op != OpS390XRISBGZ {
 11500  				continue
 11501  			}
 11502  			r := auxToS390xRotateParams(v_0.Aux)
 11503  			v_0_0 := v_0.Args[0]
 11504  			if v_0_0.Op != OpS390XLGDR {
 11505  				continue
 11506  			}
 11507  			x := v_0_0.Args[0]
 11508  			if v_1.Op != OpS390XMOVDconst {
 11509  				continue
 11510  			}
 11511  			c := auxIntToInt64(v_1.AuxInt)
 11512  			if !(c >= 0 && r == s390x.NewRotateParams(0, 0, 0)) {
 11513  				continue
 11514  			}
 11515  			v.reset(OpS390XLGDR)
 11516  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, x.Type)
 11517  			v1 := b.NewValue0(v.Pos, OpS390XFMOVDconst, x.Type)
 11518  			v1.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(c)))
 11519  			v0.AddArg2(v1, x)
 11520  			v.AddArg(v0)
 11521  			return true
 11522  		}
 11523  		break
 11524  	}
 11525  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11526  	// result: (MOVDconst [c|d])
 11527  	for {
 11528  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11529  			if v_0.Op != OpS390XMOVDconst {
 11530  				continue
 11531  			}
 11532  			c := auxIntToInt64(v_0.AuxInt)
 11533  			if v_1.Op != OpS390XMOVDconst {
 11534  				continue
 11535  			}
 11536  			d := auxIntToInt64(v_1.AuxInt)
 11537  			v.reset(OpS390XMOVDconst)
 11538  			v.AuxInt = int64ToAuxInt(c | d)
 11539  			return true
 11540  		}
 11541  		break
 11542  	}
 11543  	// match: (OR x x)
 11544  	// result: x
 11545  	for {
 11546  		x := v_0
 11547  		if x != v_1 {
 11548  			break
 11549  		}
 11550  		v.copyOf(x)
 11551  		return true
 11552  	}
 11553  	// match: (OR <t> x g:(MOVDload [off] {sym} ptr mem))
 11554  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11555  	// result: (ORload <t> [off] {sym} x ptr mem)
 11556  	for {
 11557  		t := v.Type
 11558  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11559  			x := v_0
 11560  			g := v_1
 11561  			if g.Op != OpS390XMOVDload {
 11562  				continue
 11563  			}
 11564  			off := auxIntToInt32(g.AuxInt)
 11565  			sym := auxToSym(g.Aux)
 11566  			mem := g.Args[1]
 11567  			ptr := g.Args[0]
 11568  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11569  				continue
 11570  			}
 11571  			v.reset(OpS390XORload)
 11572  			v.Type = t
 11573  			v.AuxInt = int32ToAuxInt(off)
 11574  			v.Aux = symToAux(sym)
 11575  			v.AddArg3(x, ptr, mem)
 11576  			return true
 11577  		}
 11578  		break
 11579  	}
 11580  	return false
 11581  }
 11582  func rewriteValueS390X_OpS390XORW(v *Value) bool {
 11583  	v_1 := v.Args[1]
 11584  	v_0 := v.Args[0]
 11585  	// match: (ORW x (MOVDconst [c]))
 11586  	// result: (ORWconst [int32(c)] x)
 11587  	for {
 11588  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11589  			x := v_0
 11590  			if v_1.Op != OpS390XMOVDconst {
 11591  				continue
 11592  			}
 11593  			c := auxIntToInt64(v_1.AuxInt)
 11594  			v.reset(OpS390XORWconst)
 11595  			v.AuxInt = int32ToAuxInt(int32(c))
 11596  			v.AddArg(x)
 11597  			return true
 11598  		}
 11599  		break
 11600  	}
 11601  	// match: (ORW x x)
 11602  	// result: x
 11603  	for {
 11604  		x := v_0
 11605  		if x != v_1 {
 11606  			break
 11607  		}
 11608  		v.copyOf(x)
 11609  		return true
 11610  	}
 11611  	// match: (ORW <t> x g:(MOVWload [off] {sym} ptr mem))
 11612  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11613  	// result: (ORWload <t> [off] {sym} x ptr mem)
 11614  	for {
 11615  		t := v.Type
 11616  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11617  			x := v_0
 11618  			g := v_1
 11619  			if g.Op != OpS390XMOVWload {
 11620  				continue
 11621  			}
 11622  			off := auxIntToInt32(g.AuxInt)
 11623  			sym := auxToSym(g.Aux)
 11624  			mem := g.Args[1]
 11625  			ptr := g.Args[0]
 11626  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11627  				continue
 11628  			}
 11629  			v.reset(OpS390XORWload)
 11630  			v.Type = t
 11631  			v.AuxInt = int32ToAuxInt(off)
 11632  			v.Aux = symToAux(sym)
 11633  			v.AddArg3(x, ptr, mem)
 11634  			return true
 11635  		}
 11636  		break
 11637  	}
 11638  	// match: (ORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11639  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11640  	// result: (ORWload <t> [off] {sym} x ptr mem)
 11641  	for {
 11642  		t := v.Type
 11643  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11644  			x := v_0
 11645  			g := v_1
 11646  			if g.Op != OpS390XMOVWZload {
 11647  				continue
 11648  			}
 11649  			off := auxIntToInt32(g.AuxInt)
 11650  			sym := auxToSym(g.Aux)
 11651  			mem := g.Args[1]
 11652  			ptr := g.Args[0]
 11653  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11654  				continue
 11655  			}
 11656  			v.reset(OpS390XORWload)
 11657  			v.Type = t
 11658  			v.AuxInt = int32ToAuxInt(off)
 11659  			v.Aux = symToAux(sym)
 11660  			v.AddArg3(x, ptr, mem)
 11661  			return true
 11662  		}
 11663  		break
 11664  	}
 11665  	return false
 11666  }
 11667  func rewriteValueS390X_OpS390XORWconst(v *Value) bool {
 11668  	v_0 := v.Args[0]
 11669  	// match: (ORWconst [c] x)
 11670  	// cond: int32(c)==0
 11671  	// result: x
 11672  	for {
 11673  		c := auxIntToInt32(v.AuxInt)
 11674  		x := v_0
 11675  		if !(int32(c) == 0) {
 11676  			break
 11677  		}
 11678  		v.copyOf(x)
 11679  		return true
 11680  	}
 11681  	// match: (ORWconst [c] _)
 11682  	// cond: int32(c)==-1
 11683  	// result: (MOVDconst [-1])
 11684  	for {
 11685  		c := auxIntToInt32(v.AuxInt)
 11686  		if !(int32(c) == -1) {
 11687  			break
 11688  		}
 11689  		v.reset(OpS390XMOVDconst)
 11690  		v.AuxInt = int64ToAuxInt(-1)
 11691  		return true
 11692  	}
 11693  	// match: (ORWconst [c] (MOVDconst [d]))
 11694  	// result: (MOVDconst [int64(c)|d])
 11695  	for {
 11696  		c := auxIntToInt32(v.AuxInt)
 11697  		if v_0.Op != OpS390XMOVDconst {
 11698  			break
 11699  		}
 11700  		d := auxIntToInt64(v_0.AuxInt)
 11701  		v.reset(OpS390XMOVDconst)
 11702  		v.AuxInt = int64ToAuxInt(int64(c) | d)
 11703  		return true
 11704  	}
 11705  	return false
 11706  }
 11707  func rewriteValueS390X_OpS390XORWload(v *Value) bool {
 11708  	v_2 := v.Args[2]
 11709  	v_1 := v.Args[1]
 11710  	v_0 := v.Args[0]
 11711  	// match: (ORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11712  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11713  	// result: (ORWload [off1+off2] {sym} x ptr mem)
 11714  	for {
 11715  		off1 := auxIntToInt32(v.AuxInt)
 11716  		sym := auxToSym(v.Aux)
 11717  		x := v_0
 11718  		if v_1.Op != OpS390XADDconst {
 11719  			break
 11720  		}
 11721  		off2 := auxIntToInt32(v_1.AuxInt)
 11722  		ptr := v_1.Args[0]
 11723  		mem := v_2
 11724  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11725  			break
 11726  		}
 11727  		v.reset(OpS390XORWload)
 11728  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11729  		v.Aux = symToAux(sym)
 11730  		v.AddArg3(x, ptr, mem)
 11731  		return true
 11732  	}
 11733  	// match: (ORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11734  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11735  	// result: (ORWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11736  	for {
 11737  		o1 := auxIntToInt32(v.AuxInt)
 11738  		s1 := auxToSym(v.Aux)
 11739  		x := v_0
 11740  		if v_1.Op != OpS390XMOVDaddr {
 11741  			break
 11742  		}
 11743  		o2 := auxIntToInt32(v_1.AuxInt)
 11744  		s2 := auxToSym(v_1.Aux)
 11745  		ptr := v_1.Args[0]
 11746  		mem := v_2
 11747  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11748  			break
 11749  		}
 11750  		v.reset(OpS390XORWload)
 11751  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11752  		v.Aux = symToAux(mergeSym(s1, s2))
 11753  		v.AddArg3(x, ptr, mem)
 11754  		return true
 11755  	}
 11756  	return false
 11757  }
 11758  func rewriteValueS390X_OpS390XORconst(v *Value) bool {
 11759  	v_0 := v.Args[0]
 11760  	// match: (ORconst [0] x)
 11761  	// result: x
 11762  	for {
 11763  		if auxIntToInt64(v.AuxInt) != 0 {
 11764  			break
 11765  		}
 11766  		x := v_0
 11767  		v.copyOf(x)
 11768  		return true
 11769  	}
 11770  	// match: (ORconst [-1] _)
 11771  	// result: (MOVDconst [-1])
 11772  	for {
 11773  		if auxIntToInt64(v.AuxInt) != -1 {
 11774  			break
 11775  		}
 11776  		v.reset(OpS390XMOVDconst)
 11777  		v.AuxInt = int64ToAuxInt(-1)
 11778  		return true
 11779  	}
 11780  	// match: (ORconst [c] (MOVDconst [d]))
 11781  	// result: (MOVDconst [c|d])
 11782  	for {
 11783  		c := auxIntToInt64(v.AuxInt)
 11784  		if v_0.Op != OpS390XMOVDconst {
 11785  			break
 11786  		}
 11787  		d := auxIntToInt64(v_0.AuxInt)
 11788  		v.reset(OpS390XMOVDconst)
 11789  		v.AuxInt = int64ToAuxInt(c | d)
 11790  		return true
 11791  	}
 11792  	return false
 11793  }
 11794  func rewriteValueS390X_OpS390XORload(v *Value) bool {
 11795  	v_2 := v.Args[2]
 11796  	v_1 := v.Args[1]
 11797  	v_0 := v.Args[0]
 11798  	b := v.Block
 11799  	// match: (ORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11800  	// cond: isSamePtr(ptr1, ptr2)
 11801  	// result: (OR x (LGDR <t> y))
 11802  	for {
 11803  		t := v.Type
 11804  		off := auxIntToInt32(v.AuxInt)
 11805  		sym := auxToSym(v.Aux)
 11806  		x := v_0
 11807  		ptr1 := v_1
 11808  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 11809  			break
 11810  		}
 11811  		y := v_2.Args[1]
 11812  		ptr2 := v_2.Args[0]
 11813  		if !(isSamePtr(ptr1, ptr2)) {
 11814  			break
 11815  		}
 11816  		v.reset(OpS390XOR)
 11817  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 11818  		v0.AddArg(y)
 11819  		v.AddArg2(x, v0)
 11820  		return true
 11821  	}
 11822  	// match: (ORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11823  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11824  	// result: (ORload [off1+off2] {sym} x ptr mem)
 11825  	for {
 11826  		off1 := auxIntToInt32(v.AuxInt)
 11827  		sym := auxToSym(v.Aux)
 11828  		x := v_0
 11829  		if v_1.Op != OpS390XADDconst {
 11830  			break
 11831  		}
 11832  		off2 := auxIntToInt32(v_1.AuxInt)
 11833  		ptr := v_1.Args[0]
 11834  		mem := v_2
 11835  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11836  			break
 11837  		}
 11838  		v.reset(OpS390XORload)
 11839  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11840  		v.Aux = symToAux(sym)
 11841  		v.AddArg3(x, ptr, mem)
 11842  		return true
 11843  	}
 11844  	// match: (ORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11845  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11846  	// result: (ORload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11847  	for {
 11848  		o1 := auxIntToInt32(v.AuxInt)
 11849  		s1 := auxToSym(v.Aux)
 11850  		x := v_0
 11851  		if v_1.Op != OpS390XMOVDaddr {
 11852  			break
 11853  		}
 11854  		o2 := auxIntToInt32(v_1.AuxInt)
 11855  		s2 := auxToSym(v_1.Aux)
 11856  		ptr := v_1.Args[0]
 11857  		mem := v_2
 11858  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11859  			break
 11860  		}
 11861  		v.reset(OpS390XORload)
 11862  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11863  		v.Aux = symToAux(mergeSym(s1, s2))
 11864  		v.AddArg3(x, ptr, mem)
 11865  		return true
 11866  	}
 11867  	return false
 11868  }
 11869  func rewriteValueS390X_OpS390XRISBGZ(v *Value) bool {
 11870  	v_0 := v.Args[0]
 11871  	b := v.Block
 11872  	// match: (RISBGZ (MOVWZreg x) {r})
 11873  	// cond: r.InMerge(0xffffffff) != nil
 11874  	// result: (RISBGZ x {*r.InMerge(0xffffffff)})
 11875  	for {
 11876  		r := auxToS390xRotateParams(v.Aux)
 11877  		if v_0.Op != OpS390XMOVWZreg {
 11878  			break
 11879  		}
 11880  		x := v_0.Args[0]
 11881  		if !(r.InMerge(0xffffffff) != nil) {
 11882  			break
 11883  		}
 11884  		v.reset(OpS390XRISBGZ)
 11885  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0xffffffff))
 11886  		v.AddArg(x)
 11887  		return true
 11888  	}
 11889  	// match: (RISBGZ (MOVHZreg x) {r})
 11890  	// cond: r.InMerge(0x0000ffff) != nil
 11891  	// result: (RISBGZ x {*r.InMerge(0x0000ffff)})
 11892  	for {
 11893  		r := auxToS390xRotateParams(v.Aux)
 11894  		if v_0.Op != OpS390XMOVHZreg {
 11895  			break
 11896  		}
 11897  		x := v_0.Args[0]
 11898  		if !(r.InMerge(0x0000ffff) != nil) {
 11899  			break
 11900  		}
 11901  		v.reset(OpS390XRISBGZ)
 11902  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0x0000ffff))
 11903  		v.AddArg(x)
 11904  		return true
 11905  	}
 11906  	// match: (RISBGZ (MOVBZreg x) {r})
 11907  	// cond: r.InMerge(0x000000ff) != nil
 11908  	// result: (RISBGZ x {*r.InMerge(0x000000ff)})
 11909  	for {
 11910  		r := auxToS390xRotateParams(v.Aux)
 11911  		if v_0.Op != OpS390XMOVBZreg {
 11912  			break
 11913  		}
 11914  		x := v_0.Args[0]
 11915  		if !(r.InMerge(0x000000ff) != nil) {
 11916  			break
 11917  		}
 11918  		v.reset(OpS390XRISBGZ)
 11919  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0x000000ff))
 11920  		v.AddArg(x)
 11921  		return true
 11922  	}
 11923  	// match: (RISBGZ (SLDconst x [c]) {r})
 11924  	// cond: r.InMerge(^uint64(0)<<c) != nil
 11925  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)<<c)).RotateLeft(c)})
 11926  	for {
 11927  		r := auxToS390xRotateParams(v.Aux)
 11928  		if v_0.Op != OpS390XSLDconst {
 11929  			break
 11930  		}
 11931  		c := auxIntToUint8(v_0.AuxInt)
 11932  		x := v_0.Args[0]
 11933  		if !(r.InMerge(^uint64(0)<<c) != nil) {
 11934  			break
 11935  		}
 11936  		v.reset(OpS390XRISBGZ)
 11937  		v.Aux = s390xRotateParamsToAux((*r.InMerge(^uint64(0) << c)).RotateLeft(c))
 11938  		v.AddArg(x)
 11939  		return true
 11940  	}
 11941  	// match: (RISBGZ (SRDconst x [c]) {r})
 11942  	// cond: r.InMerge(^uint64(0)>>c) != nil
 11943  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)>>c)).RotateLeft(-c)})
 11944  	for {
 11945  		r := auxToS390xRotateParams(v.Aux)
 11946  		if v_0.Op != OpS390XSRDconst {
 11947  			break
 11948  		}
 11949  		c := auxIntToUint8(v_0.AuxInt)
 11950  		x := v_0.Args[0]
 11951  		if !(r.InMerge(^uint64(0)>>c) != nil) {
 11952  			break
 11953  		}
 11954  		v.reset(OpS390XRISBGZ)
 11955  		v.Aux = s390xRotateParamsToAux((*r.InMerge(^uint64(0) >> c)).RotateLeft(-c))
 11956  		v.AddArg(x)
 11957  		return true
 11958  	}
 11959  	// match: (RISBGZ (RISBGZ x {y}) {z})
 11960  	// cond: z.InMerge(y.OutMask()) != nil
 11961  	// result: (RISBGZ x {(*z.InMerge(y.OutMask())).RotateLeft(y.Amount)})
 11962  	for {
 11963  		z := auxToS390xRotateParams(v.Aux)
 11964  		if v_0.Op != OpS390XRISBGZ {
 11965  			break
 11966  		}
 11967  		y := auxToS390xRotateParams(v_0.Aux)
 11968  		x := v_0.Args[0]
 11969  		if !(z.InMerge(y.OutMask()) != nil) {
 11970  			break
 11971  		}
 11972  		v.reset(OpS390XRISBGZ)
 11973  		v.Aux = s390xRotateParamsToAux((*z.InMerge(y.OutMask())).RotateLeft(y.Amount))
 11974  		v.AddArg(x)
 11975  		return true
 11976  	}
 11977  	// match: (RISBGZ x {r})
 11978  	// cond: r.End == 63 && r.Start == -r.Amount&63
 11979  	// result: (SRDconst x [-r.Amount&63])
 11980  	for {
 11981  		r := auxToS390xRotateParams(v.Aux)
 11982  		x := v_0
 11983  		if !(r.End == 63 && r.Start == -r.Amount&63) {
 11984  			break
 11985  		}
 11986  		v.reset(OpS390XSRDconst)
 11987  		v.AuxInt = uint8ToAuxInt(-r.Amount & 63)
 11988  		v.AddArg(x)
 11989  		return true
 11990  	}
 11991  	// match: (RISBGZ x {r})
 11992  	// cond: r.Start == 0 && r.End == 63-r.Amount
 11993  	// result: (SLDconst x [r.Amount])
 11994  	for {
 11995  		r := auxToS390xRotateParams(v.Aux)
 11996  		x := v_0
 11997  		if !(r.Start == 0 && r.End == 63-r.Amount) {
 11998  			break
 11999  		}
 12000  		v.reset(OpS390XSLDconst)
 12001  		v.AuxInt = uint8ToAuxInt(r.Amount)
 12002  		v.AddArg(x)
 12003  		return true
 12004  	}
 12005  	// match: (RISBGZ (SRADconst x [c]) {r})
 12006  	// cond: r.Start == r.End && (r.Start+r.Amount)&63 <= c
 12007  	// result: (RISBGZ x {s390x.NewRotateParams(r.Start, r.Start, -r.Start&63)})
 12008  	for {
 12009  		r := auxToS390xRotateParams(v.Aux)
 12010  		if v_0.Op != OpS390XSRADconst {
 12011  			break
 12012  		}
 12013  		c := auxIntToUint8(v_0.AuxInt)
 12014  		x := v_0.Args[0]
 12015  		if !(r.Start == r.End && (r.Start+r.Amount)&63 <= c) {
 12016  			break
 12017  		}
 12018  		v.reset(OpS390XRISBGZ)
 12019  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(r.Start, r.Start, -r.Start&63))
 12020  		v.AddArg(x)
 12021  		return true
 12022  	}
 12023  	// match: (RISBGZ x {r})
 12024  	// cond: r == s390x.NewRotateParams(56, 63, 0)
 12025  	// result: (MOVBZreg x)
 12026  	for {
 12027  		r := auxToS390xRotateParams(v.Aux)
 12028  		x := v_0
 12029  		if !(r == s390x.NewRotateParams(56, 63, 0)) {
 12030  			break
 12031  		}
 12032  		v.reset(OpS390XMOVBZreg)
 12033  		v.AddArg(x)
 12034  		return true
 12035  	}
 12036  	// match: (RISBGZ x {r})
 12037  	// cond: r == s390x.NewRotateParams(48, 63, 0)
 12038  	// result: (MOVHZreg x)
 12039  	for {
 12040  		r := auxToS390xRotateParams(v.Aux)
 12041  		x := v_0
 12042  		if !(r == s390x.NewRotateParams(48, 63, 0)) {
 12043  			break
 12044  		}
 12045  		v.reset(OpS390XMOVHZreg)
 12046  		v.AddArg(x)
 12047  		return true
 12048  	}
 12049  	// match: (RISBGZ x {r})
 12050  	// cond: r == s390x.NewRotateParams(32, 63, 0)
 12051  	// result: (MOVWZreg x)
 12052  	for {
 12053  		r := auxToS390xRotateParams(v.Aux)
 12054  		x := v_0
 12055  		if !(r == s390x.NewRotateParams(32, 63, 0)) {
 12056  			break
 12057  		}
 12058  		v.reset(OpS390XMOVWZreg)
 12059  		v.AddArg(x)
 12060  		return true
 12061  	}
 12062  	// match: (RISBGZ (LGDR <t> x) {r})
 12063  	// cond: r == s390x.NewRotateParams(1, 63, 0)
 12064  	// result: (LGDR <t> (LPDFR <x.Type> x))
 12065  	for {
 12066  		r := auxToS390xRotateParams(v.Aux)
 12067  		if v_0.Op != OpS390XLGDR {
 12068  			break
 12069  		}
 12070  		t := v_0.Type
 12071  		x := v_0.Args[0]
 12072  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
 12073  			break
 12074  		}
 12075  		v.reset(OpS390XLGDR)
 12076  		v.Type = t
 12077  		v0 := b.NewValue0(v.Pos, OpS390XLPDFR, x.Type)
 12078  		v0.AddArg(x)
 12079  		v.AddArg(v0)
 12080  		return true
 12081  	}
 12082  	return false
 12083  }
 12084  func rewriteValueS390X_OpS390XRLL(v *Value) bool {
 12085  	v_1 := v.Args[1]
 12086  	v_0 := v.Args[0]
 12087  	// match: (RLL x (MOVDconst [c]))
 12088  	// result: (RLLconst x [uint8(c&31)])
 12089  	for {
 12090  		x := v_0
 12091  		if v_1.Op != OpS390XMOVDconst {
 12092  			break
 12093  		}
 12094  		c := auxIntToInt64(v_1.AuxInt)
 12095  		v.reset(OpS390XRLLconst)
 12096  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 12097  		v.AddArg(x)
 12098  		return true
 12099  	}
 12100  	return false
 12101  }
 12102  func rewriteValueS390X_OpS390XRLLG(v *Value) bool {
 12103  	v_1 := v.Args[1]
 12104  	v_0 := v.Args[0]
 12105  	// match: (RLLG x (MOVDconst [c]))
 12106  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, uint8(c&63))})
 12107  	for {
 12108  		x := v_0
 12109  		if v_1.Op != OpS390XMOVDconst {
 12110  			break
 12111  		}
 12112  		c := auxIntToInt64(v_1.AuxInt)
 12113  		v.reset(OpS390XRISBGZ)
 12114  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, uint8(c&63)))
 12115  		v.AddArg(x)
 12116  		return true
 12117  	}
 12118  	return false
 12119  }
 12120  func rewriteValueS390X_OpS390XSLD(v *Value) bool {
 12121  	v_1 := v.Args[1]
 12122  	v_0 := v.Args[0]
 12123  	b := v.Block
 12124  	typ := &b.Func.Config.Types
 12125  	// match: (SLD x (MOVDconst [c]))
 12126  	// result: (SLDconst x [uint8(c&63)])
 12127  	for {
 12128  		x := v_0
 12129  		if v_1.Op != OpS390XMOVDconst {
 12130  			break
 12131  		}
 12132  		c := auxIntToInt64(v_1.AuxInt)
 12133  		v.reset(OpS390XSLDconst)
 12134  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 12135  		v.AddArg(x)
 12136  		return true
 12137  	}
 12138  	// match: (SLD x (RISBGZ y {r}))
 12139  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12140  	// result: (SLD x y)
 12141  	for {
 12142  		x := v_0
 12143  		if v_1.Op != OpS390XRISBGZ {
 12144  			break
 12145  		}
 12146  		r := auxToS390xRotateParams(v_1.Aux)
 12147  		y := v_1.Args[0]
 12148  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12149  			break
 12150  		}
 12151  		v.reset(OpS390XSLD)
 12152  		v.AddArg2(x, y)
 12153  		return true
 12154  	}
 12155  	// match: (SLD x (AND (MOVDconst [c]) y))
 12156  	// result: (SLD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12157  	for {
 12158  		x := v_0
 12159  		if v_1.Op != OpS390XAND {
 12160  			break
 12161  		}
 12162  		_ = v_1.Args[1]
 12163  		v_1_0 := v_1.Args[0]
 12164  		v_1_1 := v_1.Args[1]
 12165  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12166  			if v_1_0.Op != OpS390XMOVDconst {
 12167  				continue
 12168  			}
 12169  			c := auxIntToInt64(v_1_0.AuxInt)
 12170  			y := v_1_1
 12171  			v.reset(OpS390XSLD)
 12172  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12173  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12174  			v0.AddArg(y)
 12175  			v.AddArg2(x, v0)
 12176  			return true
 12177  		}
 12178  		break
 12179  	}
 12180  	// match: (SLD x (ANDWconst [c] y))
 12181  	// cond: c&63 == 63
 12182  	// result: (SLD x y)
 12183  	for {
 12184  		x := v_0
 12185  		if v_1.Op != OpS390XANDWconst {
 12186  			break
 12187  		}
 12188  		c := auxIntToInt32(v_1.AuxInt)
 12189  		y := v_1.Args[0]
 12190  		if !(c&63 == 63) {
 12191  			break
 12192  		}
 12193  		v.reset(OpS390XSLD)
 12194  		v.AddArg2(x, y)
 12195  		return true
 12196  	}
 12197  	// match: (SLD x (MOVWreg y))
 12198  	// result: (SLD x y)
 12199  	for {
 12200  		x := v_0
 12201  		if v_1.Op != OpS390XMOVWreg {
 12202  			break
 12203  		}
 12204  		y := v_1.Args[0]
 12205  		v.reset(OpS390XSLD)
 12206  		v.AddArg2(x, y)
 12207  		return true
 12208  	}
 12209  	// match: (SLD x (MOVHreg y))
 12210  	// result: (SLD x y)
 12211  	for {
 12212  		x := v_0
 12213  		if v_1.Op != OpS390XMOVHreg {
 12214  			break
 12215  		}
 12216  		y := v_1.Args[0]
 12217  		v.reset(OpS390XSLD)
 12218  		v.AddArg2(x, y)
 12219  		return true
 12220  	}
 12221  	// match: (SLD x (MOVBreg y))
 12222  	// result: (SLD x y)
 12223  	for {
 12224  		x := v_0
 12225  		if v_1.Op != OpS390XMOVBreg {
 12226  			break
 12227  		}
 12228  		y := v_1.Args[0]
 12229  		v.reset(OpS390XSLD)
 12230  		v.AddArg2(x, y)
 12231  		return true
 12232  	}
 12233  	// match: (SLD x (MOVWZreg y))
 12234  	// result: (SLD x y)
 12235  	for {
 12236  		x := v_0
 12237  		if v_1.Op != OpS390XMOVWZreg {
 12238  			break
 12239  		}
 12240  		y := v_1.Args[0]
 12241  		v.reset(OpS390XSLD)
 12242  		v.AddArg2(x, y)
 12243  		return true
 12244  	}
 12245  	// match: (SLD x (MOVHZreg y))
 12246  	// result: (SLD x y)
 12247  	for {
 12248  		x := v_0
 12249  		if v_1.Op != OpS390XMOVHZreg {
 12250  			break
 12251  		}
 12252  		y := v_1.Args[0]
 12253  		v.reset(OpS390XSLD)
 12254  		v.AddArg2(x, y)
 12255  		return true
 12256  	}
 12257  	// match: (SLD x (MOVBZreg y))
 12258  	// result: (SLD x y)
 12259  	for {
 12260  		x := v_0
 12261  		if v_1.Op != OpS390XMOVBZreg {
 12262  			break
 12263  		}
 12264  		y := v_1.Args[0]
 12265  		v.reset(OpS390XSLD)
 12266  		v.AddArg2(x, y)
 12267  		return true
 12268  	}
 12269  	return false
 12270  }
 12271  func rewriteValueS390X_OpS390XSLDconst(v *Value) bool {
 12272  	v_0 := v.Args[0]
 12273  	// match: (SLDconst (SRDconst x [c]) [d])
 12274  	// result: (RISBGZ x {s390x.NewRotateParams(uint8(max(0, int8(c-d))), 63-d, uint8(int8(d-c)&63))})
 12275  	for {
 12276  		d := auxIntToUint8(v.AuxInt)
 12277  		if v_0.Op != OpS390XSRDconst {
 12278  			break
 12279  		}
 12280  		c := auxIntToUint8(v_0.AuxInt)
 12281  		x := v_0.Args[0]
 12282  		v.reset(OpS390XRISBGZ)
 12283  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(uint8(max(0, int8(c-d))), 63-d, uint8(int8(d-c)&63)))
 12284  		v.AddArg(x)
 12285  		return true
 12286  	}
 12287  	// match: (SLDconst (RISBGZ x {r}) [c])
 12288  	// cond: s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil
 12289  	// result: (RISBGZ x {(*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 12290  	for {
 12291  		c := auxIntToUint8(v.AuxInt)
 12292  		if v_0.Op != OpS390XRISBGZ {
 12293  			break
 12294  		}
 12295  		r := auxToS390xRotateParams(v_0.Aux)
 12296  		x := v_0.Args[0]
 12297  		if !(s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil) {
 12298  			break
 12299  		}
 12300  		v.reset(OpS390XRISBGZ)
 12301  		v.Aux = s390xRotateParamsToAux((*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount))
 12302  		v.AddArg(x)
 12303  		return true
 12304  	}
 12305  	// match: (SLDconst x [0])
 12306  	// result: x
 12307  	for {
 12308  		if auxIntToUint8(v.AuxInt) != 0 {
 12309  			break
 12310  		}
 12311  		x := v_0
 12312  		v.copyOf(x)
 12313  		return true
 12314  	}
 12315  	return false
 12316  }
 12317  func rewriteValueS390X_OpS390XSLW(v *Value) bool {
 12318  	v_1 := v.Args[1]
 12319  	v_0 := v.Args[0]
 12320  	b := v.Block
 12321  	typ := &b.Func.Config.Types
 12322  	// match: (SLW x (MOVDconst [c]))
 12323  	// cond: c&32 == 0
 12324  	// result: (SLWconst x [uint8(c&31)])
 12325  	for {
 12326  		x := v_0
 12327  		if v_1.Op != OpS390XMOVDconst {
 12328  			break
 12329  		}
 12330  		c := auxIntToInt64(v_1.AuxInt)
 12331  		if !(c&32 == 0) {
 12332  			break
 12333  		}
 12334  		v.reset(OpS390XSLWconst)
 12335  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 12336  		v.AddArg(x)
 12337  		return true
 12338  	}
 12339  	// match: (SLW _ (MOVDconst [c]))
 12340  	// cond: c&32 != 0
 12341  	// result: (MOVDconst [0])
 12342  	for {
 12343  		if v_1.Op != OpS390XMOVDconst {
 12344  			break
 12345  		}
 12346  		c := auxIntToInt64(v_1.AuxInt)
 12347  		if !(c&32 != 0) {
 12348  			break
 12349  		}
 12350  		v.reset(OpS390XMOVDconst)
 12351  		v.AuxInt = int64ToAuxInt(0)
 12352  		return true
 12353  	}
 12354  	// match: (SLW x (RISBGZ y {r}))
 12355  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12356  	// result: (SLW x y)
 12357  	for {
 12358  		x := v_0
 12359  		if v_1.Op != OpS390XRISBGZ {
 12360  			break
 12361  		}
 12362  		r := auxToS390xRotateParams(v_1.Aux)
 12363  		y := v_1.Args[0]
 12364  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12365  			break
 12366  		}
 12367  		v.reset(OpS390XSLW)
 12368  		v.AddArg2(x, y)
 12369  		return true
 12370  	}
 12371  	// match: (SLW x (AND (MOVDconst [c]) y))
 12372  	// result: (SLW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12373  	for {
 12374  		x := v_0
 12375  		if v_1.Op != OpS390XAND {
 12376  			break
 12377  		}
 12378  		_ = v_1.Args[1]
 12379  		v_1_0 := v_1.Args[0]
 12380  		v_1_1 := v_1.Args[1]
 12381  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12382  			if v_1_0.Op != OpS390XMOVDconst {
 12383  				continue
 12384  			}
 12385  			c := auxIntToInt64(v_1_0.AuxInt)
 12386  			y := v_1_1
 12387  			v.reset(OpS390XSLW)
 12388  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12389  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12390  			v0.AddArg(y)
 12391  			v.AddArg2(x, v0)
 12392  			return true
 12393  		}
 12394  		break
 12395  	}
 12396  	// match: (SLW x (ANDWconst [c] y))
 12397  	// cond: c&63 == 63
 12398  	// result: (SLW x y)
 12399  	for {
 12400  		x := v_0
 12401  		if v_1.Op != OpS390XANDWconst {
 12402  			break
 12403  		}
 12404  		c := auxIntToInt32(v_1.AuxInt)
 12405  		y := v_1.Args[0]
 12406  		if !(c&63 == 63) {
 12407  			break
 12408  		}
 12409  		v.reset(OpS390XSLW)
 12410  		v.AddArg2(x, y)
 12411  		return true
 12412  	}
 12413  	// match: (SLW x (MOVWreg y))
 12414  	// result: (SLW x y)
 12415  	for {
 12416  		x := v_0
 12417  		if v_1.Op != OpS390XMOVWreg {
 12418  			break
 12419  		}
 12420  		y := v_1.Args[0]
 12421  		v.reset(OpS390XSLW)
 12422  		v.AddArg2(x, y)
 12423  		return true
 12424  	}
 12425  	// match: (SLW x (MOVHreg y))
 12426  	// result: (SLW x y)
 12427  	for {
 12428  		x := v_0
 12429  		if v_1.Op != OpS390XMOVHreg {
 12430  			break
 12431  		}
 12432  		y := v_1.Args[0]
 12433  		v.reset(OpS390XSLW)
 12434  		v.AddArg2(x, y)
 12435  		return true
 12436  	}
 12437  	// match: (SLW x (MOVBreg y))
 12438  	// result: (SLW x y)
 12439  	for {
 12440  		x := v_0
 12441  		if v_1.Op != OpS390XMOVBreg {
 12442  			break
 12443  		}
 12444  		y := v_1.Args[0]
 12445  		v.reset(OpS390XSLW)
 12446  		v.AddArg2(x, y)
 12447  		return true
 12448  	}
 12449  	// match: (SLW x (MOVWZreg y))
 12450  	// result: (SLW x y)
 12451  	for {
 12452  		x := v_0
 12453  		if v_1.Op != OpS390XMOVWZreg {
 12454  			break
 12455  		}
 12456  		y := v_1.Args[0]
 12457  		v.reset(OpS390XSLW)
 12458  		v.AddArg2(x, y)
 12459  		return true
 12460  	}
 12461  	// match: (SLW x (MOVHZreg y))
 12462  	// result: (SLW x y)
 12463  	for {
 12464  		x := v_0
 12465  		if v_1.Op != OpS390XMOVHZreg {
 12466  			break
 12467  		}
 12468  		y := v_1.Args[0]
 12469  		v.reset(OpS390XSLW)
 12470  		v.AddArg2(x, y)
 12471  		return true
 12472  	}
 12473  	// match: (SLW x (MOVBZreg y))
 12474  	// result: (SLW x y)
 12475  	for {
 12476  		x := v_0
 12477  		if v_1.Op != OpS390XMOVBZreg {
 12478  			break
 12479  		}
 12480  		y := v_1.Args[0]
 12481  		v.reset(OpS390XSLW)
 12482  		v.AddArg2(x, y)
 12483  		return true
 12484  	}
 12485  	return false
 12486  }
 12487  func rewriteValueS390X_OpS390XSLWconst(v *Value) bool {
 12488  	v_0 := v.Args[0]
 12489  	// match: (SLWconst x [0])
 12490  	// result: x
 12491  	for {
 12492  		if auxIntToUint8(v.AuxInt) != 0 {
 12493  			break
 12494  		}
 12495  		x := v_0
 12496  		v.copyOf(x)
 12497  		return true
 12498  	}
 12499  	return false
 12500  }
 12501  func rewriteValueS390X_OpS390XSRAD(v *Value) bool {
 12502  	v_1 := v.Args[1]
 12503  	v_0 := v.Args[0]
 12504  	b := v.Block
 12505  	typ := &b.Func.Config.Types
 12506  	// match: (SRAD x (MOVDconst [c]))
 12507  	// result: (SRADconst x [uint8(c&63)])
 12508  	for {
 12509  		x := v_0
 12510  		if v_1.Op != OpS390XMOVDconst {
 12511  			break
 12512  		}
 12513  		c := auxIntToInt64(v_1.AuxInt)
 12514  		v.reset(OpS390XSRADconst)
 12515  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 12516  		v.AddArg(x)
 12517  		return true
 12518  	}
 12519  	// match: (SRAD x (RISBGZ y {r}))
 12520  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12521  	// result: (SRAD x y)
 12522  	for {
 12523  		x := v_0
 12524  		if v_1.Op != OpS390XRISBGZ {
 12525  			break
 12526  		}
 12527  		r := auxToS390xRotateParams(v_1.Aux)
 12528  		y := v_1.Args[0]
 12529  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12530  			break
 12531  		}
 12532  		v.reset(OpS390XSRAD)
 12533  		v.AddArg2(x, y)
 12534  		return true
 12535  	}
 12536  	// match: (SRAD x (AND (MOVDconst [c]) y))
 12537  	// result: (SRAD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12538  	for {
 12539  		x := v_0
 12540  		if v_1.Op != OpS390XAND {
 12541  			break
 12542  		}
 12543  		_ = v_1.Args[1]
 12544  		v_1_0 := v_1.Args[0]
 12545  		v_1_1 := v_1.Args[1]
 12546  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12547  			if v_1_0.Op != OpS390XMOVDconst {
 12548  				continue
 12549  			}
 12550  			c := auxIntToInt64(v_1_0.AuxInt)
 12551  			y := v_1_1
 12552  			v.reset(OpS390XSRAD)
 12553  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12554  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12555  			v0.AddArg(y)
 12556  			v.AddArg2(x, v0)
 12557  			return true
 12558  		}
 12559  		break
 12560  	}
 12561  	// match: (SRAD x (ANDWconst [c] y))
 12562  	// cond: c&63 == 63
 12563  	// result: (SRAD x y)
 12564  	for {
 12565  		x := v_0
 12566  		if v_1.Op != OpS390XANDWconst {
 12567  			break
 12568  		}
 12569  		c := auxIntToInt32(v_1.AuxInt)
 12570  		y := v_1.Args[0]
 12571  		if !(c&63 == 63) {
 12572  			break
 12573  		}
 12574  		v.reset(OpS390XSRAD)
 12575  		v.AddArg2(x, y)
 12576  		return true
 12577  	}
 12578  	// match: (SRAD x (MOVWreg y))
 12579  	// result: (SRAD x y)
 12580  	for {
 12581  		x := v_0
 12582  		if v_1.Op != OpS390XMOVWreg {
 12583  			break
 12584  		}
 12585  		y := v_1.Args[0]
 12586  		v.reset(OpS390XSRAD)
 12587  		v.AddArg2(x, y)
 12588  		return true
 12589  	}
 12590  	// match: (SRAD x (MOVHreg y))
 12591  	// result: (SRAD x y)
 12592  	for {
 12593  		x := v_0
 12594  		if v_1.Op != OpS390XMOVHreg {
 12595  			break
 12596  		}
 12597  		y := v_1.Args[0]
 12598  		v.reset(OpS390XSRAD)
 12599  		v.AddArg2(x, y)
 12600  		return true
 12601  	}
 12602  	// match: (SRAD x (MOVBreg y))
 12603  	// result: (SRAD x y)
 12604  	for {
 12605  		x := v_0
 12606  		if v_1.Op != OpS390XMOVBreg {
 12607  			break
 12608  		}
 12609  		y := v_1.Args[0]
 12610  		v.reset(OpS390XSRAD)
 12611  		v.AddArg2(x, y)
 12612  		return true
 12613  	}
 12614  	// match: (SRAD x (MOVWZreg y))
 12615  	// result: (SRAD x y)
 12616  	for {
 12617  		x := v_0
 12618  		if v_1.Op != OpS390XMOVWZreg {
 12619  			break
 12620  		}
 12621  		y := v_1.Args[0]
 12622  		v.reset(OpS390XSRAD)
 12623  		v.AddArg2(x, y)
 12624  		return true
 12625  	}
 12626  	// match: (SRAD x (MOVHZreg y))
 12627  	// result: (SRAD x y)
 12628  	for {
 12629  		x := v_0
 12630  		if v_1.Op != OpS390XMOVHZreg {
 12631  			break
 12632  		}
 12633  		y := v_1.Args[0]
 12634  		v.reset(OpS390XSRAD)
 12635  		v.AddArg2(x, y)
 12636  		return true
 12637  	}
 12638  	// match: (SRAD x (MOVBZreg y))
 12639  	// result: (SRAD x y)
 12640  	for {
 12641  		x := v_0
 12642  		if v_1.Op != OpS390XMOVBZreg {
 12643  			break
 12644  		}
 12645  		y := v_1.Args[0]
 12646  		v.reset(OpS390XSRAD)
 12647  		v.AddArg2(x, y)
 12648  		return true
 12649  	}
 12650  	return false
 12651  }
 12652  func rewriteValueS390X_OpS390XSRADconst(v *Value) bool {
 12653  	v_0 := v.Args[0]
 12654  	// match: (SRADconst x [0])
 12655  	// result: x
 12656  	for {
 12657  		if auxIntToUint8(v.AuxInt) != 0 {
 12658  			break
 12659  		}
 12660  		x := v_0
 12661  		v.copyOf(x)
 12662  		return true
 12663  	}
 12664  	// match: (SRADconst [c] (MOVDconst [d]))
 12665  	// result: (MOVDconst [d>>uint64(c)])
 12666  	for {
 12667  		c := auxIntToUint8(v.AuxInt)
 12668  		if v_0.Op != OpS390XMOVDconst {
 12669  			break
 12670  		}
 12671  		d := auxIntToInt64(v_0.AuxInt)
 12672  		v.reset(OpS390XMOVDconst)
 12673  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 12674  		return true
 12675  	}
 12676  	return false
 12677  }
 12678  func rewriteValueS390X_OpS390XSRAW(v *Value) bool {
 12679  	v_1 := v.Args[1]
 12680  	v_0 := v.Args[0]
 12681  	b := v.Block
 12682  	typ := &b.Func.Config.Types
 12683  	// match: (SRAW x (MOVDconst [c]))
 12684  	// cond: c&32 == 0
 12685  	// result: (SRAWconst x [uint8(c&31)])
 12686  	for {
 12687  		x := v_0
 12688  		if v_1.Op != OpS390XMOVDconst {
 12689  			break
 12690  		}
 12691  		c := auxIntToInt64(v_1.AuxInt)
 12692  		if !(c&32 == 0) {
 12693  			break
 12694  		}
 12695  		v.reset(OpS390XSRAWconst)
 12696  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 12697  		v.AddArg(x)
 12698  		return true
 12699  	}
 12700  	// match: (SRAW x (MOVDconst [c]))
 12701  	// cond: c&32 != 0
 12702  	// result: (SRAWconst x [31])
 12703  	for {
 12704  		x := v_0
 12705  		if v_1.Op != OpS390XMOVDconst {
 12706  			break
 12707  		}
 12708  		c := auxIntToInt64(v_1.AuxInt)
 12709  		if !(c&32 != 0) {
 12710  			break
 12711  		}
 12712  		v.reset(OpS390XSRAWconst)
 12713  		v.AuxInt = uint8ToAuxInt(31)
 12714  		v.AddArg(x)
 12715  		return true
 12716  	}
 12717  	// match: (SRAW x (RISBGZ y {r}))
 12718  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12719  	// result: (SRAW x y)
 12720  	for {
 12721  		x := v_0
 12722  		if v_1.Op != OpS390XRISBGZ {
 12723  			break
 12724  		}
 12725  		r := auxToS390xRotateParams(v_1.Aux)
 12726  		y := v_1.Args[0]
 12727  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12728  			break
 12729  		}
 12730  		v.reset(OpS390XSRAW)
 12731  		v.AddArg2(x, y)
 12732  		return true
 12733  	}
 12734  	// match: (SRAW x (AND (MOVDconst [c]) y))
 12735  	// result: (SRAW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12736  	for {
 12737  		x := v_0
 12738  		if v_1.Op != OpS390XAND {
 12739  			break
 12740  		}
 12741  		_ = v_1.Args[1]
 12742  		v_1_0 := v_1.Args[0]
 12743  		v_1_1 := v_1.Args[1]
 12744  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12745  			if v_1_0.Op != OpS390XMOVDconst {
 12746  				continue
 12747  			}
 12748  			c := auxIntToInt64(v_1_0.AuxInt)
 12749  			y := v_1_1
 12750  			v.reset(OpS390XSRAW)
 12751  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12752  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12753  			v0.AddArg(y)
 12754  			v.AddArg2(x, v0)
 12755  			return true
 12756  		}
 12757  		break
 12758  	}
 12759  	// match: (SRAW x (ANDWconst [c] y))
 12760  	// cond: c&63 == 63
 12761  	// result: (SRAW x y)
 12762  	for {
 12763  		x := v_0
 12764  		if v_1.Op != OpS390XANDWconst {
 12765  			break
 12766  		}
 12767  		c := auxIntToInt32(v_1.AuxInt)
 12768  		y := v_1.Args[0]
 12769  		if !(c&63 == 63) {
 12770  			break
 12771  		}
 12772  		v.reset(OpS390XSRAW)
 12773  		v.AddArg2(x, y)
 12774  		return true
 12775  	}
 12776  	// match: (SRAW x (MOVWreg y))
 12777  	// result: (SRAW x y)
 12778  	for {
 12779  		x := v_0
 12780  		if v_1.Op != OpS390XMOVWreg {
 12781  			break
 12782  		}
 12783  		y := v_1.Args[0]
 12784  		v.reset(OpS390XSRAW)
 12785  		v.AddArg2(x, y)
 12786  		return true
 12787  	}
 12788  	// match: (SRAW x (MOVHreg y))
 12789  	// result: (SRAW x y)
 12790  	for {
 12791  		x := v_0
 12792  		if v_1.Op != OpS390XMOVHreg {
 12793  			break
 12794  		}
 12795  		y := v_1.Args[0]
 12796  		v.reset(OpS390XSRAW)
 12797  		v.AddArg2(x, y)
 12798  		return true
 12799  	}
 12800  	// match: (SRAW x (MOVBreg y))
 12801  	// result: (SRAW x y)
 12802  	for {
 12803  		x := v_0
 12804  		if v_1.Op != OpS390XMOVBreg {
 12805  			break
 12806  		}
 12807  		y := v_1.Args[0]
 12808  		v.reset(OpS390XSRAW)
 12809  		v.AddArg2(x, y)
 12810  		return true
 12811  	}
 12812  	// match: (SRAW x (MOVWZreg y))
 12813  	// result: (SRAW x y)
 12814  	for {
 12815  		x := v_0
 12816  		if v_1.Op != OpS390XMOVWZreg {
 12817  			break
 12818  		}
 12819  		y := v_1.Args[0]
 12820  		v.reset(OpS390XSRAW)
 12821  		v.AddArg2(x, y)
 12822  		return true
 12823  	}
 12824  	// match: (SRAW x (MOVHZreg y))
 12825  	// result: (SRAW x y)
 12826  	for {
 12827  		x := v_0
 12828  		if v_1.Op != OpS390XMOVHZreg {
 12829  			break
 12830  		}
 12831  		y := v_1.Args[0]
 12832  		v.reset(OpS390XSRAW)
 12833  		v.AddArg2(x, y)
 12834  		return true
 12835  	}
 12836  	// match: (SRAW x (MOVBZreg y))
 12837  	// result: (SRAW x y)
 12838  	for {
 12839  		x := v_0
 12840  		if v_1.Op != OpS390XMOVBZreg {
 12841  			break
 12842  		}
 12843  		y := v_1.Args[0]
 12844  		v.reset(OpS390XSRAW)
 12845  		v.AddArg2(x, y)
 12846  		return true
 12847  	}
 12848  	return false
 12849  }
 12850  func rewriteValueS390X_OpS390XSRAWconst(v *Value) bool {
 12851  	v_0 := v.Args[0]
 12852  	// match: (SRAWconst x [0])
 12853  	// result: x
 12854  	for {
 12855  		if auxIntToUint8(v.AuxInt) != 0 {
 12856  			break
 12857  		}
 12858  		x := v_0
 12859  		v.copyOf(x)
 12860  		return true
 12861  	}
 12862  	// match: (SRAWconst [c] (MOVDconst [d]))
 12863  	// result: (MOVDconst [int64(int32(d))>>uint64(c)])
 12864  	for {
 12865  		c := auxIntToUint8(v.AuxInt)
 12866  		if v_0.Op != OpS390XMOVDconst {
 12867  			break
 12868  		}
 12869  		d := auxIntToInt64(v_0.AuxInt)
 12870  		v.reset(OpS390XMOVDconst)
 12871  		v.AuxInt = int64ToAuxInt(int64(int32(d)) >> uint64(c))
 12872  		return true
 12873  	}
 12874  	return false
 12875  }
 12876  func rewriteValueS390X_OpS390XSRD(v *Value) bool {
 12877  	v_1 := v.Args[1]
 12878  	v_0 := v.Args[0]
 12879  	b := v.Block
 12880  	typ := &b.Func.Config.Types
 12881  	// match: (SRD x (MOVDconst [c]))
 12882  	// result: (SRDconst x [uint8(c&63)])
 12883  	for {
 12884  		x := v_0
 12885  		if v_1.Op != OpS390XMOVDconst {
 12886  			break
 12887  		}
 12888  		c := auxIntToInt64(v_1.AuxInt)
 12889  		v.reset(OpS390XSRDconst)
 12890  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 12891  		v.AddArg(x)
 12892  		return true
 12893  	}
 12894  	// match: (SRD x (RISBGZ y {r}))
 12895  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 12896  	// result: (SRD x y)
 12897  	for {
 12898  		x := v_0
 12899  		if v_1.Op != OpS390XRISBGZ {
 12900  			break
 12901  		}
 12902  		r := auxToS390xRotateParams(v_1.Aux)
 12903  		y := v_1.Args[0]
 12904  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 12905  			break
 12906  		}
 12907  		v.reset(OpS390XSRD)
 12908  		v.AddArg2(x, y)
 12909  		return true
 12910  	}
 12911  	// match: (SRD x (AND (MOVDconst [c]) y))
 12912  	// result: (SRD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 12913  	for {
 12914  		x := v_0
 12915  		if v_1.Op != OpS390XAND {
 12916  			break
 12917  		}
 12918  		_ = v_1.Args[1]
 12919  		v_1_0 := v_1.Args[0]
 12920  		v_1_1 := v_1.Args[1]
 12921  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 12922  			if v_1_0.Op != OpS390XMOVDconst {
 12923  				continue
 12924  			}
 12925  			c := auxIntToInt64(v_1_0.AuxInt)
 12926  			y := v_1_1
 12927  			v.reset(OpS390XSRD)
 12928  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 12929  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 12930  			v0.AddArg(y)
 12931  			v.AddArg2(x, v0)
 12932  			return true
 12933  		}
 12934  		break
 12935  	}
 12936  	// match: (SRD x (ANDWconst [c] y))
 12937  	// cond: c&63 == 63
 12938  	// result: (SRD x y)
 12939  	for {
 12940  		x := v_0
 12941  		if v_1.Op != OpS390XANDWconst {
 12942  			break
 12943  		}
 12944  		c := auxIntToInt32(v_1.AuxInt)
 12945  		y := v_1.Args[0]
 12946  		if !(c&63 == 63) {
 12947  			break
 12948  		}
 12949  		v.reset(OpS390XSRD)
 12950  		v.AddArg2(x, y)
 12951  		return true
 12952  	}
 12953  	// match: (SRD x (MOVWreg y))
 12954  	// result: (SRD x y)
 12955  	for {
 12956  		x := v_0
 12957  		if v_1.Op != OpS390XMOVWreg {
 12958  			break
 12959  		}
 12960  		y := v_1.Args[0]
 12961  		v.reset(OpS390XSRD)
 12962  		v.AddArg2(x, y)
 12963  		return true
 12964  	}
 12965  	// match: (SRD x (MOVHreg y))
 12966  	// result: (SRD x y)
 12967  	for {
 12968  		x := v_0
 12969  		if v_1.Op != OpS390XMOVHreg {
 12970  			break
 12971  		}
 12972  		y := v_1.Args[0]
 12973  		v.reset(OpS390XSRD)
 12974  		v.AddArg2(x, y)
 12975  		return true
 12976  	}
 12977  	// match: (SRD x (MOVBreg y))
 12978  	// result: (SRD x y)
 12979  	for {
 12980  		x := v_0
 12981  		if v_1.Op != OpS390XMOVBreg {
 12982  			break
 12983  		}
 12984  		y := v_1.Args[0]
 12985  		v.reset(OpS390XSRD)
 12986  		v.AddArg2(x, y)
 12987  		return true
 12988  	}
 12989  	// match: (SRD x (MOVWZreg y))
 12990  	// result: (SRD x y)
 12991  	for {
 12992  		x := v_0
 12993  		if v_1.Op != OpS390XMOVWZreg {
 12994  			break
 12995  		}
 12996  		y := v_1.Args[0]
 12997  		v.reset(OpS390XSRD)
 12998  		v.AddArg2(x, y)
 12999  		return true
 13000  	}
 13001  	// match: (SRD x (MOVHZreg y))
 13002  	// result: (SRD x y)
 13003  	for {
 13004  		x := v_0
 13005  		if v_1.Op != OpS390XMOVHZreg {
 13006  			break
 13007  		}
 13008  		y := v_1.Args[0]
 13009  		v.reset(OpS390XSRD)
 13010  		v.AddArg2(x, y)
 13011  		return true
 13012  	}
 13013  	// match: (SRD x (MOVBZreg y))
 13014  	// result: (SRD x y)
 13015  	for {
 13016  		x := v_0
 13017  		if v_1.Op != OpS390XMOVBZreg {
 13018  			break
 13019  		}
 13020  		y := v_1.Args[0]
 13021  		v.reset(OpS390XSRD)
 13022  		v.AddArg2(x, y)
 13023  		return true
 13024  	}
 13025  	return false
 13026  }
 13027  func rewriteValueS390X_OpS390XSRDconst(v *Value) bool {
 13028  	v_0 := v.Args[0]
 13029  	// match: (SRDconst (SLDconst x [c]) [d])
 13030  	// result: (RISBGZ x {s390x.NewRotateParams(d, uint8(min(63, int8(63-c+d))), uint8(int8(c-d)&63))})
 13031  	for {
 13032  		d := auxIntToUint8(v.AuxInt)
 13033  		if v_0.Op != OpS390XSLDconst {
 13034  			break
 13035  		}
 13036  		c := auxIntToUint8(v_0.AuxInt)
 13037  		x := v_0.Args[0]
 13038  		v.reset(OpS390XRISBGZ)
 13039  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(d, uint8(min(63, int8(63-c+d))), uint8(int8(c-d)&63)))
 13040  		v.AddArg(x)
 13041  		return true
 13042  	}
 13043  	// match: (SRDconst (RISBGZ x {r}) [c])
 13044  	// cond: s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil
 13045  	// result: (RISBGZ x {(*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 13046  	for {
 13047  		c := auxIntToUint8(v.AuxInt)
 13048  		if v_0.Op != OpS390XRISBGZ {
 13049  			break
 13050  		}
 13051  		r := auxToS390xRotateParams(v_0.Aux)
 13052  		x := v_0.Args[0]
 13053  		if !(s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil) {
 13054  			break
 13055  		}
 13056  		v.reset(OpS390XRISBGZ)
 13057  		v.Aux = s390xRotateParamsToAux((*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount))
 13058  		v.AddArg(x)
 13059  		return true
 13060  	}
 13061  	// match: (SRDconst x [0])
 13062  	// result: x
 13063  	for {
 13064  		if auxIntToUint8(v.AuxInt) != 0 {
 13065  			break
 13066  		}
 13067  		x := v_0
 13068  		v.copyOf(x)
 13069  		return true
 13070  	}
 13071  	return false
 13072  }
 13073  func rewriteValueS390X_OpS390XSRW(v *Value) bool {
 13074  	v_1 := v.Args[1]
 13075  	v_0 := v.Args[0]
 13076  	b := v.Block
 13077  	typ := &b.Func.Config.Types
 13078  	// match: (SRW x (MOVDconst [c]))
 13079  	// cond: c&32 == 0
 13080  	// result: (SRWconst x [uint8(c&31)])
 13081  	for {
 13082  		x := v_0
 13083  		if v_1.Op != OpS390XMOVDconst {
 13084  			break
 13085  		}
 13086  		c := auxIntToInt64(v_1.AuxInt)
 13087  		if !(c&32 == 0) {
 13088  			break
 13089  		}
 13090  		v.reset(OpS390XSRWconst)
 13091  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 13092  		v.AddArg(x)
 13093  		return true
 13094  	}
 13095  	// match: (SRW _ (MOVDconst [c]))
 13096  	// cond: c&32 != 0
 13097  	// result: (MOVDconst [0])
 13098  	for {
 13099  		if v_1.Op != OpS390XMOVDconst {
 13100  			break
 13101  		}
 13102  		c := auxIntToInt64(v_1.AuxInt)
 13103  		if !(c&32 != 0) {
 13104  			break
 13105  		}
 13106  		v.reset(OpS390XMOVDconst)
 13107  		v.AuxInt = int64ToAuxInt(0)
 13108  		return true
 13109  	}
 13110  	// match: (SRW x (RISBGZ y {r}))
 13111  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13112  	// result: (SRW x y)
 13113  	for {
 13114  		x := v_0
 13115  		if v_1.Op != OpS390XRISBGZ {
 13116  			break
 13117  		}
 13118  		r := auxToS390xRotateParams(v_1.Aux)
 13119  		y := v_1.Args[0]
 13120  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13121  			break
 13122  		}
 13123  		v.reset(OpS390XSRW)
 13124  		v.AddArg2(x, y)
 13125  		return true
 13126  	}
 13127  	// match: (SRW x (AND (MOVDconst [c]) y))
 13128  	// result: (SRW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13129  	for {
 13130  		x := v_0
 13131  		if v_1.Op != OpS390XAND {
 13132  			break
 13133  		}
 13134  		_ = v_1.Args[1]
 13135  		v_1_0 := v_1.Args[0]
 13136  		v_1_1 := v_1.Args[1]
 13137  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13138  			if v_1_0.Op != OpS390XMOVDconst {
 13139  				continue
 13140  			}
 13141  			c := auxIntToInt64(v_1_0.AuxInt)
 13142  			y := v_1_1
 13143  			v.reset(OpS390XSRW)
 13144  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 13145  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 13146  			v0.AddArg(y)
 13147  			v.AddArg2(x, v0)
 13148  			return true
 13149  		}
 13150  		break
 13151  	}
 13152  	// match: (SRW x (ANDWconst [c] y))
 13153  	// cond: c&63 == 63
 13154  	// result: (SRW x y)
 13155  	for {
 13156  		x := v_0
 13157  		if v_1.Op != OpS390XANDWconst {
 13158  			break
 13159  		}
 13160  		c := auxIntToInt32(v_1.AuxInt)
 13161  		y := v_1.Args[0]
 13162  		if !(c&63 == 63) {
 13163  			break
 13164  		}
 13165  		v.reset(OpS390XSRW)
 13166  		v.AddArg2(x, y)
 13167  		return true
 13168  	}
 13169  	// match: (SRW x (MOVWreg y))
 13170  	// result: (SRW x y)
 13171  	for {
 13172  		x := v_0
 13173  		if v_1.Op != OpS390XMOVWreg {
 13174  			break
 13175  		}
 13176  		y := v_1.Args[0]
 13177  		v.reset(OpS390XSRW)
 13178  		v.AddArg2(x, y)
 13179  		return true
 13180  	}
 13181  	// match: (SRW x (MOVHreg y))
 13182  	// result: (SRW x y)
 13183  	for {
 13184  		x := v_0
 13185  		if v_1.Op != OpS390XMOVHreg {
 13186  			break
 13187  		}
 13188  		y := v_1.Args[0]
 13189  		v.reset(OpS390XSRW)
 13190  		v.AddArg2(x, y)
 13191  		return true
 13192  	}
 13193  	// match: (SRW x (MOVBreg y))
 13194  	// result: (SRW x y)
 13195  	for {
 13196  		x := v_0
 13197  		if v_1.Op != OpS390XMOVBreg {
 13198  			break
 13199  		}
 13200  		y := v_1.Args[0]
 13201  		v.reset(OpS390XSRW)
 13202  		v.AddArg2(x, y)
 13203  		return true
 13204  	}
 13205  	// match: (SRW x (MOVWZreg y))
 13206  	// result: (SRW x y)
 13207  	for {
 13208  		x := v_0
 13209  		if v_1.Op != OpS390XMOVWZreg {
 13210  			break
 13211  		}
 13212  		y := v_1.Args[0]
 13213  		v.reset(OpS390XSRW)
 13214  		v.AddArg2(x, y)
 13215  		return true
 13216  	}
 13217  	// match: (SRW x (MOVHZreg y))
 13218  	// result: (SRW x y)
 13219  	for {
 13220  		x := v_0
 13221  		if v_1.Op != OpS390XMOVHZreg {
 13222  			break
 13223  		}
 13224  		y := v_1.Args[0]
 13225  		v.reset(OpS390XSRW)
 13226  		v.AddArg2(x, y)
 13227  		return true
 13228  	}
 13229  	// match: (SRW x (MOVBZreg y))
 13230  	// result: (SRW x y)
 13231  	for {
 13232  		x := v_0
 13233  		if v_1.Op != OpS390XMOVBZreg {
 13234  			break
 13235  		}
 13236  		y := v_1.Args[0]
 13237  		v.reset(OpS390XSRW)
 13238  		v.AddArg2(x, y)
 13239  		return true
 13240  	}
 13241  	return false
 13242  }
 13243  func rewriteValueS390X_OpS390XSRWconst(v *Value) bool {
 13244  	v_0 := v.Args[0]
 13245  	// match: (SRWconst x [0])
 13246  	// result: x
 13247  	for {
 13248  		if auxIntToUint8(v.AuxInt) != 0 {
 13249  			break
 13250  		}
 13251  		x := v_0
 13252  		v.copyOf(x)
 13253  		return true
 13254  	}
 13255  	return false
 13256  }
 13257  func rewriteValueS390X_OpS390XSTM2(v *Value) bool {
 13258  	v_3 := v.Args[3]
 13259  	v_2 := v.Args[2]
 13260  	v_1 := v.Args[1]
 13261  	v_0 := v.Args[0]
 13262  	// match: (STM2 [i] {s} p w2 w3 x:(STM2 [i-8] {s} p w0 w1 mem))
 13263  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)
 13264  	// result: (STM4 [i-8] {s} p w0 w1 w2 w3 mem)
 13265  	for {
 13266  		i := auxIntToInt32(v.AuxInt)
 13267  		s := auxToSym(v.Aux)
 13268  		p := v_0
 13269  		w2 := v_1
 13270  		w3 := v_2
 13271  		x := v_3
 13272  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 13273  			break
 13274  		}
 13275  		mem := x.Args[3]
 13276  		if p != x.Args[0] {
 13277  			break
 13278  		}
 13279  		w0 := x.Args[1]
 13280  		w1 := x.Args[2]
 13281  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && setPos(v, x.Pos) && clobber(x)) {
 13282  			break
 13283  		}
 13284  		v.reset(OpS390XSTM4)
 13285  		v.AuxInt = int32ToAuxInt(i - 8)
 13286  		v.Aux = symToAux(s)
 13287  		v.AddArg6(p, w0, w1, w2, w3, mem)
 13288  		return true
 13289  	}
 13290  	// match: (STM2 [i] {s} p (SRDconst [32] x) x mem)
 13291  	// result: (MOVDstore [i] {s} p x mem)
 13292  	for {
 13293  		i := auxIntToInt32(v.AuxInt)
 13294  		s := auxToSym(v.Aux)
 13295  		p := v_0
 13296  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 13297  			break
 13298  		}
 13299  		x := v_1.Args[0]
 13300  		if x != v_2 {
 13301  			break
 13302  		}
 13303  		mem := v_3
 13304  		v.reset(OpS390XMOVDstore)
 13305  		v.AuxInt = int32ToAuxInt(i)
 13306  		v.Aux = symToAux(s)
 13307  		v.AddArg3(p, x, mem)
 13308  		return true
 13309  	}
 13310  	return false
 13311  }
 13312  func rewriteValueS390X_OpS390XSTMG2(v *Value) bool {
 13313  	v_3 := v.Args[3]
 13314  	v_2 := v.Args[2]
 13315  	v_1 := v.Args[1]
 13316  	v_0 := v.Args[0]
 13317  	// match: (STMG2 [i] {s} p w2 w3 x:(STMG2 [i-16] {s} p w0 w1 mem))
 13318  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)
 13319  	// result: (STMG4 [i-16] {s} p w0 w1 w2 w3 mem)
 13320  	for {
 13321  		i := auxIntToInt32(v.AuxInt)
 13322  		s := auxToSym(v.Aux)
 13323  		p := v_0
 13324  		w2 := v_1
 13325  		w3 := v_2
 13326  		x := v_3
 13327  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
 13328  			break
 13329  		}
 13330  		mem := x.Args[3]
 13331  		if p != x.Args[0] {
 13332  			break
 13333  		}
 13334  		w0 := x.Args[1]
 13335  		w1 := x.Args[2]
 13336  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && setPos(v, x.Pos) && clobber(x)) {
 13337  			break
 13338  		}
 13339  		v.reset(OpS390XSTMG4)
 13340  		v.AuxInt = int32ToAuxInt(i - 16)
 13341  		v.Aux = symToAux(s)
 13342  		v.AddArg6(p, w0, w1, w2, w3, mem)
 13343  		return true
 13344  	}
 13345  	return false
 13346  }
 13347  func rewriteValueS390X_OpS390XSUB(v *Value) bool {
 13348  	v_1 := v.Args[1]
 13349  	v_0 := v.Args[0]
 13350  	b := v.Block
 13351  	// match: (SUB x (MOVDconst [c]))
 13352  	// cond: is32Bit(c)
 13353  	// result: (SUBconst x [int32(c)])
 13354  	for {
 13355  		x := v_0
 13356  		if v_1.Op != OpS390XMOVDconst {
 13357  			break
 13358  		}
 13359  		c := auxIntToInt64(v_1.AuxInt)
 13360  		if !(is32Bit(c)) {
 13361  			break
 13362  		}
 13363  		v.reset(OpS390XSUBconst)
 13364  		v.AuxInt = int32ToAuxInt(int32(c))
 13365  		v.AddArg(x)
 13366  		return true
 13367  	}
 13368  	// match: (SUB (MOVDconst [c]) x)
 13369  	// cond: is32Bit(c)
 13370  	// result: (NEG (SUBconst <v.Type> x [int32(c)]))
 13371  	for {
 13372  		if v_0.Op != OpS390XMOVDconst {
 13373  			break
 13374  		}
 13375  		c := auxIntToInt64(v_0.AuxInt)
 13376  		x := v_1
 13377  		if !(is32Bit(c)) {
 13378  			break
 13379  		}
 13380  		v.reset(OpS390XNEG)
 13381  		v0 := b.NewValue0(v.Pos, OpS390XSUBconst, v.Type)
 13382  		v0.AuxInt = int32ToAuxInt(int32(c))
 13383  		v0.AddArg(x)
 13384  		v.AddArg(v0)
 13385  		return true
 13386  	}
 13387  	// match: (SUB x (NEG y))
 13388  	// result: (ADD x y)
 13389  	for {
 13390  		x := v_0
 13391  		if v_1.Op != OpS390XNEG {
 13392  			break
 13393  		}
 13394  		y := v_1.Args[0]
 13395  		v.reset(OpS390XADD)
 13396  		v.AddArg2(x, y)
 13397  		return true
 13398  	}
 13399  	// match: (SUB x x)
 13400  	// result: (MOVDconst [0])
 13401  	for {
 13402  		x := v_0
 13403  		if x != v_1 {
 13404  			break
 13405  		}
 13406  		v.reset(OpS390XMOVDconst)
 13407  		v.AuxInt = int64ToAuxInt(0)
 13408  		return true
 13409  	}
 13410  	// match: (SUB <t> x g:(MOVDload [off] {sym} ptr mem))
 13411  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13412  	// result: (SUBload <t> [off] {sym} x ptr mem)
 13413  	for {
 13414  		t := v.Type
 13415  		x := v_0
 13416  		g := v_1
 13417  		if g.Op != OpS390XMOVDload {
 13418  			break
 13419  		}
 13420  		off := auxIntToInt32(g.AuxInt)
 13421  		sym := auxToSym(g.Aux)
 13422  		mem := g.Args[1]
 13423  		ptr := g.Args[0]
 13424  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13425  			break
 13426  		}
 13427  		v.reset(OpS390XSUBload)
 13428  		v.Type = t
 13429  		v.AuxInt = int32ToAuxInt(off)
 13430  		v.Aux = symToAux(sym)
 13431  		v.AddArg3(x, ptr, mem)
 13432  		return true
 13433  	}
 13434  	return false
 13435  }
 13436  func rewriteValueS390X_OpS390XSUBE(v *Value) bool {
 13437  	v_2 := v.Args[2]
 13438  	v_1 := v.Args[1]
 13439  	v_0 := v.Args[0]
 13440  	// match: (SUBE x y (FlagGT))
 13441  	// result: (SUBC x y)
 13442  	for {
 13443  		x := v_0
 13444  		y := v_1
 13445  		if v_2.Op != OpS390XFlagGT {
 13446  			break
 13447  		}
 13448  		v.reset(OpS390XSUBC)
 13449  		v.AddArg2(x, y)
 13450  		return true
 13451  	}
 13452  	// match: (SUBE x y (FlagOV))
 13453  	// result: (SUBC x y)
 13454  	for {
 13455  		x := v_0
 13456  		y := v_1
 13457  		if v_2.Op != OpS390XFlagOV {
 13458  			break
 13459  		}
 13460  		v.reset(OpS390XSUBC)
 13461  		v.AddArg2(x, y)
 13462  		return true
 13463  	}
 13464  	// match: (SUBE x y (Select1 (SUBC (MOVDconst [0]) (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) c))))))
 13465  	// result: (SUBE x y c)
 13466  	for {
 13467  		x := v_0
 13468  		y := v_1
 13469  		if v_2.Op != OpSelect1 {
 13470  			break
 13471  		}
 13472  		v_2_0 := v_2.Args[0]
 13473  		if v_2_0.Op != OpS390XSUBC {
 13474  			break
 13475  		}
 13476  		_ = v_2_0.Args[1]
 13477  		v_2_0_0 := v_2_0.Args[0]
 13478  		if v_2_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 13479  			break
 13480  		}
 13481  		v_2_0_1 := v_2_0.Args[1]
 13482  		if v_2_0_1.Op != OpS390XNEG {
 13483  			break
 13484  		}
 13485  		v_2_0_1_0 := v_2_0_1.Args[0]
 13486  		if v_2_0_1_0.Op != OpSelect0 {
 13487  			break
 13488  		}
 13489  		v_2_0_1_0_0 := v_2_0_1_0.Args[0]
 13490  		if v_2_0_1_0_0.Op != OpS390XSUBE {
 13491  			break
 13492  		}
 13493  		c := v_2_0_1_0_0.Args[2]
 13494  		v_2_0_1_0_0_0 := v_2_0_1_0_0.Args[0]
 13495  		if v_2_0_1_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_0.AuxInt) != 0 {
 13496  			break
 13497  		}
 13498  		v_2_0_1_0_0_1 := v_2_0_1_0_0.Args[1]
 13499  		if v_2_0_1_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_1.AuxInt) != 0 {
 13500  			break
 13501  		}
 13502  		v.reset(OpS390XSUBE)
 13503  		v.AddArg3(x, y, c)
 13504  		return true
 13505  	}
 13506  	return false
 13507  }
 13508  func rewriteValueS390X_OpS390XSUBW(v *Value) bool {
 13509  	v_1 := v.Args[1]
 13510  	v_0 := v.Args[0]
 13511  	b := v.Block
 13512  	// match: (SUBW x (MOVDconst [c]))
 13513  	// result: (SUBWconst x [int32(c)])
 13514  	for {
 13515  		x := v_0
 13516  		if v_1.Op != OpS390XMOVDconst {
 13517  			break
 13518  		}
 13519  		c := auxIntToInt64(v_1.AuxInt)
 13520  		v.reset(OpS390XSUBWconst)
 13521  		v.AuxInt = int32ToAuxInt(int32(c))
 13522  		v.AddArg(x)
 13523  		return true
 13524  	}
 13525  	// match: (SUBW (MOVDconst [c]) x)
 13526  	// result: (NEGW (SUBWconst <v.Type> x [int32(c)]))
 13527  	for {
 13528  		if v_0.Op != OpS390XMOVDconst {
 13529  			break
 13530  		}
 13531  		c := auxIntToInt64(v_0.AuxInt)
 13532  		x := v_1
 13533  		v.reset(OpS390XNEGW)
 13534  		v0 := b.NewValue0(v.Pos, OpS390XSUBWconst, v.Type)
 13535  		v0.AuxInt = int32ToAuxInt(int32(c))
 13536  		v0.AddArg(x)
 13537  		v.AddArg(v0)
 13538  		return true
 13539  	}
 13540  	// match: (SUBW x (NEGW y))
 13541  	// result: (ADDW x y)
 13542  	for {
 13543  		x := v_0
 13544  		if v_1.Op != OpS390XNEGW {
 13545  			break
 13546  		}
 13547  		y := v_1.Args[0]
 13548  		v.reset(OpS390XADDW)
 13549  		v.AddArg2(x, y)
 13550  		return true
 13551  	}
 13552  	// match: (SUBW x x)
 13553  	// result: (MOVDconst [0])
 13554  	for {
 13555  		x := v_0
 13556  		if x != v_1 {
 13557  			break
 13558  		}
 13559  		v.reset(OpS390XMOVDconst)
 13560  		v.AuxInt = int64ToAuxInt(0)
 13561  		return true
 13562  	}
 13563  	// match: (SUBW <t> x g:(MOVWload [off] {sym} ptr mem))
 13564  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13565  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 13566  	for {
 13567  		t := v.Type
 13568  		x := v_0
 13569  		g := v_1
 13570  		if g.Op != OpS390XMOVWload {
 13571  			break
 13572  		}
 13573  		off := auxIntToInt32(g.AuxInt)
 13574  		sym := auxToSym(g.Aux)
 13575  		mem := g.Args[1]
 13576  		ptr := g.Args[0]
 13577  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13578  			break
 13579  		}
 13580  		v.reset(OpS390XSUBWload)
 13581  		v.Type = t
 13582  		v.AuxInt = int32ToAuxInt(off)
 13583  		v.Aux = symToAux(sym)
 13584  		v.AddArg3(x, ptr, mem)
 13585  		return true
 13586  	}
 13587  	// match: (SUBW <t> x g:(MOVWZload [off] {sym} ptr mem))
 13588  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13589  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 13590  	for {
 13591  		t := v.Type
 13592  		x := v_0
 13593  		g := v_1
 13594  		if g.Op != OpS390XMOVWZload {
 13595  			break
 13596  		}
 13597  		off := auxIntToInt32(g.AuxInt)
 13598  		sym := auxToSym(g.Aux)
 13599  		mem := g.Args[1]
 13600  		ptr := g.Args[0]
 13601  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13602  			break
 13603  		}
 13604  		v.reset(OpS390XSUBWload)
 13605  		v.Type = t
 13606  		v.AuxInt = int32ToAuxInt(off)
 13607  		v.Aux = symToAux(sym)
 13608  		v.AddArg3(x, ptr, mem)
 13609  		return true
 13610  	}
 13611  	return false
 13612  }
 13613  func rewriteValueS390X_OpS390XSUBWconst(v *Value) bool {
 13614  	v_0 := v.Args[0]
 13615  	// match: (SUBWconst [c] x)
 13616  	// cond: int32(c) == 0
 13617  	// result: x
 13618  	for {
 13619  		c := auxIntToInt32(v.AuxInt)
 13620  		x := v_0
 13621  		if !(int32(c) == 0) {
 13622  			break
 13623  		}
 13624  		v.copyOf(x)
 13625  		return true
 13626  	}
 13627  	// match: (SUBWconst [c] x)
 13628  	// result: (ADDWconst [-int32(c)] x)
 13629  	for {
 13630  		c := auxIntToInt32(v.AuxInt)
 13631  		x := v_0
 13632  		v.reset(OpS390XADDWconst)
 13633  		v.AuxInt = int32ToAuxInt(-int32(c))
 13634  		v.AddArg(x)
 13635  		return true
 13636  	}
 13637  }
 13638  func rewriteValueS390X_OpS390XSUBWload(v *Value) bool {
 13639  	v_2 := v.Args[2]
 13640  	v_1 := v.Args[1]
 13641  	v_0 := v.Args[0]
 13642  	// match: (SUBWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13643  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 13644  	// result: (SUBWload [off1+off2] {sym} x ptr mem)
 13645  	for {
 13646  		off1 := auxIntToInt32(v.AuxInt)
 13647  		sym := auxToSym(v.Aux)
 13648  		x := v_0
 13649  		if v_1.Op != OpS390XADDconst {
 13650  			break
 13651  		}
 13652  		off2 := auxIntToInt32(v_1.AuxInt)
 13653  		ptr := v_1.Args[0]
 13654  		mem := v_2
 13655  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 13656  			break
 13657  		}
 13658  		v.reset(OpS390XSUBWload)
 13659  		v.AuxInt = int32ToAuxInt(off1 + off2)
 13660  		v.Aux = symToAux(sym)
 13661  		v.AddArg3(x, ptr, mem)
 13662  		return true
 13663  	}
 13664  	// match: (SUBWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 13665  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 13666  	// result: (SUBWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 13667  	for {
 13668  		o1 := auxIntToInt32(v.AuxInt)
 13669  		s1 := auxToSym(v.Aux)
 13670  		x := v_0
 13671  		if v_1.Op != OpS390XMOVDaddr {
 13672  			break
 13673  		}
 13674  		o2 := auxIntToInt32(v_1.AuxInt)
 13675  		s2 := auxToSym(v_1.Aux)
 13676  		ptr := v_1.Args[0]
 13677  		mem := v_2
 13678  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 13679  			break
 13680  		}
 13681  		v.reset(OpS390XSUBWload)
 13682  		v.AuxInt = int32ToAuxInt(o1 + o2)
 13683  		v.Aux = symToAux(mergeSym(s1, s2))
 13684  		v.AddArg3(x, ptr, mem)
 13685  		return true
 13686  	}
 13687  	return false
 13688  }
 13689  func rewriteValueS390X_OpS390XSUBconst(v *Value) bool {
 13690  	v_0 := v.Args[0]
 13691  	// match: (SUBconst [0] x)
 13692  	// result: x
 13693  	for {
 13694  		if auxIntToInt32(v.AuxInt) != 0 {
 13695  			break
 13696  		}
 13697  		x := v_0
 13698  		v.copyOf(x)
 13699  		return true
 13700  	}
 13701  	// match: (SUBconst [c] x)
 13702  	// cond: c != -(1<<31)
 13703  	// result: (ADDconst [-c] x)
 13704  	for {
 13705  		c := auxIntToInt32(v.AuxInt)
 13706  		x := v_0
 13707  		if !(c != -(1 << 31)) {
 13708  			break
 13709  		}
 13710  		v.reset(OpS390XADDconst)
 13711  		v.AuxInt = int32ToAuxInt(-c)
 13712  		v.AddArg(x)
 13713  		return true
 13714  	}
 13715  	// match: (SUBconst (MOVDconst [d]) [c])
 13716  	// result: (MOVDconst [d-int64(c)])
 13717  	for {
 13718  		c := auxIntToInt32(v.AuxInt)
 13719  		if v_0.Op != OpS390XMOVDconst {
 13720  			break
 13721  		}
 13722  		d := auxIntToInt64(v_0.AuxInt)
 13723  		v.reset(OpS390XMOVDconst)
 13724  		v.AuxInt = int64ToAuxInt(d - int64(c))
 13725  		return true
 13726  	}
 13727  	// match: (SUBconst (SUBconst x [d]) [c])
 13728  	// cond: is32Bit(-int64(c)-int64(d))
 13729  	// result: (ADDconst [-c-d] x)
 13730  	for {
 13731  		c := auxIntToInt32(v.AuxInt)
 13732  		if v_0.Op != OpS390XSUBconst {
 13733  			break
 13734  		}
 13735  		d := auxIntToInt32(v_0.AuxInt)
 13736  		x := v_0.Args[0]
 13737  		if !(is32Bit(-int64(c) - int64(d))) {
 13738  			break
 13739  		}
 13740  		v.reset(OpS390XADDconst)
 13741  		v.AuxInt = int32ToAuxInt(-c - d)
 13742  		v.AddArg(x)
 13743  		return true
 13744  	}
 13745  	return false
 13746  }
 13747  func rewriteValueS390X_OpS390XSUBload(v *Value) bool {
 13748  	v_2 := v.Args[2]
 13749  	v_1 := v.Args[1]
 13750  	v_0 := v.Args[0]
 13751  	b := v.Block
 13752  	// match: (SUBload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 13753  	// cond: isSamePtr(ptr1, ptr2)
 13754  	// result: (SUB x (LGDR <t> y))
 13755  	for {
 13756  		t := v.Type
 13757  		off := auxIntToInt32(v.AuxInt)
 13758  		sym := auxToSym(v.Aux)
 13759  		x := v_0
 13760  		ptr1 := v_1
 13761  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 13762  			break
 13763  		}
 13764  		y := v_2.Args[1]
 13765  		ptr2 := v_2.Args[0]
 13766  		if !(isSamePtr(ptr1, ptr2)) {
 13767  			break
 13768  		}
 13769  		v.reset(OpS390XSUB)
 13770  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 13771  		v0.AddArg(y)
 13772  		v.AddArg2(x, v0)
 13773  		return true
 13774  	}
 13775  	// match: (SUBload [off1] {sym} x (ADDconst [off2] ptr) mem)
 13776  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 13777  	// result: (SUBload [off1+off2] {sym} x ptr mem)
 13778  	for {
 13779  		off1 := auxIntToInt32(v.AuxInt)
 13780  		sym := auxToSym(v.Aux)
 13781  		x := v_0
 13782  		if v_1.Op != OpS390XADDconst {
 13783  			break
 13784  		}
 13785  		off2 := auxIntToInt32(v_1.AuxInt)
 13786  		ptr := v_1.Args[0]
 13787  		mem := v_2
 13788  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 13789  			break
 13790  		}
 13791  		v.reset(OpS390XSUBload)
 13792  		v.AuxInt = int32ToAuxInt(off1 + off2)
 13793  		v.Aux = symToAux(sym)
 13794  		v.AddArg3(x, ptr, mem)
 13795  		return true
 13796  	}
 13797  	// match: (SUBload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 13798  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 13799  	// result: (SUBload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 13800  	for {
 13801  		o1 := auxIntToInt32(v.AuxInt)
 13802  		s1 := auxToSym(v.Aux)
 13803  		x := v_0
 13804  		if v_1.Op != OpS390XMOVDaddr {
 13805  			break
 13806  		}
 13807  		o2 := auxIntToInt32(v_1.AuxInt)
 13808  		s2 := auxToSym(v_1.Aux)
 13809  		ptr := v_1.Args[0]
 13810  		mem := v_2
 13811  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 13812  			break
 13813  		}
 13814  		v.reset(OpS390XSUBload)
 13815  		v.AuxInt = int32ToAuxInt(o1 + o2)
 13816  		v.Aux = symToAux(mergeSym(s1, s2))
 13817  		v.AddArg3(x, ptr, mem)
 13818  		return true
 13819  	}
 13820  	return false
 13821  }
 13822  func rewriteValueS390X_OpS390XSumBytes2(v *Value) bool {
 13823  	v_0 := v.Args[0]
 13824  	b := v.Block
 13825  	typ := &b.Func.Config.Types
 13826  	// match: (SumBytes2 x)
 13827  	// result: (ADDW (SRWconst <typ.UInt8> x [8]) x)
 13828  	for {
 13829  		x := v_0
 13830  		v.reset(OpS390XADDW)
 13831  		v0 := b.NewValue0(v.Pos, OpS390XSRWconst, typ.UInt8)
 13832  		v0.AuxInt = uint8ToAuxInt(8)
 13833  		v0.AddArg(x)
 13834  		v.AddArg2(v0, x)
 13835  		return true
 13836  	}
 13837  }
 13838  func rewriteValueS390X_OpS390XSumBytes4(v *Value) bool {
 13839  	v_0 := v.Args[0]
 13840  	b := v.Block
 13841  	typ := &b.Func.Config.Types
 13842  	// match: (SumBytes4 x)
 13843  	// result: (SumBytes2 (ADDW <typ.UInt16> (SRWconst <typ.UInt16> x [16]) x))
 13844  	for {
 13845  		x := v_0
 13846  		v.reset(OpS390XSumBytes2)
 13847  		v0 := b.NewValue0(v.Pos, OpS390XADDW, typ.UInt16)
 13848  		v1 := b.NewValue0(v.Pos, OpS390XSRWconst, typ.UInt16)
 13849  		v1.AuxInt = uint8ToAuxInt(16)
 13850  		v1.AddArg(x)
 13851  		v0.AddArg2(v1, x)
 13852  		v.AddArg(v0)
 13853  		return true
 13854  	}
 13855  }
 13856  func rewriteValueS390X_OpS390XSumBytes8(v *Value) bool {
 13857  	v_0 := v.Args[0]
 13858  	b := v.Block
 13859  	typ := &b.Func.Config.Types
 13860  	// match: (SumBytes8 x)
 13861  	// result: (SumBytes4 (ADDW <typ.UInt32> (SRDconst <typ.UInt32> x [32]) x))
 13862  	for {
 13863  		x := v_0
 13864  		v.reset(OpS390XSumBytes4)
 13865  		v0 := b.NewValue0(v.Pos, OpS390XADDW, typ.UInt32)
 13866  		v1 := b.NewValue0(v.Pos, OpS390XSRDconst, typ.UInt32)
 13867  		v1.AuxInt = uint8ToAuxInt(32)
 13868  		v1.AddArg(x)
 13869  		v0.AddArg2(v1, x)
 13870  		v.AddArg(v0)
 13871  		return true
 13872  	}
 13873  }
 13874  func rewriteValueS390X_OpS390XXOR(v *Value) bool {
 13875  	v_1 := v.Args[1]
 13876  	v_0 := v.Args[0]
 13877  	// match: (XOR x (MOVDconst [c]))
 13878  	// cond: isU32Bit(c)
 13879  	// result: (XORconst [c] x)
 13880  	for {
 13881  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13882  			x := v_0
 13883  			if v_1.Op != OpS390XMOVDconst {
 13884  				continue
 13885  			}
 13886  			c := auxIntToInt64(v_1.AuxInt)
 13887  			if !(isU32Bit(c)) {
 13888  				continue
 13889  			}
 13890  			v.reset(OpS390XXORconst)
 13891  			v.AuxInt = int64ToAuxInt(c)
 13892  			v.AddArg(x)
 13893  			return true
 13894  		}
 13895  		break
 13896  	}
 13897  	// match: (XOR (MOVDconst [c]) (MOVDconst [d]))
 13898  	// result: (MOVDconst [c^d])
 13899  	for {
 13900  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13901  			if v_0.Op != OpS390XMOVDconst {
 13902  				continue
 13903  			}
 13904  			c := auxIntToInt64(v_0.AuxInt)
 13905  			if v_1.Op != OpS390XMOVDconst {
 13906  				continue
 13907  			}
 13908  			d := auxIntToInt64(v_1.AuxInt)
 13909  			v.reset(OpS390XMOVDconst)
 13910  			v.AuxInt = int64ToAuxInt(c ^ d)
 13911  			return true
 13912  		}
 13913  		break
 13914  	}
 13915  	// match: (XOR x x)
 13916  	// result: (MOVDconst [0])
 13917  	for {
 13918  		x := v_0
 13919  		if x != v_1 {
 13920  			break
 13921  		}
 13922  		v.reset(OpS390XMOVDconst)
 13923  		v.AuxInt = int64ToAuxInt(0)
 13924  		return true
 13925  	}
 13926  	// match: (XOR <t> x g:(MOVDload [off] {sym} ptr mem))
 13927  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13928  	// result: (XORload <t> [off] {sym} x ptr mem)
 13929  	for {
 13930  		t := v.Type
 13931  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13932  			x := v_0
 13933  			g := v_1
 13934  			if g.Op != OpS390XMOVDload {
 13935  				continue
 13936  			}
 13937  			off := auxIntToInt32(g.AuxInt)
 13938  			sym := auxToSym(g.Aux)
 13939  			mem := g.Args[1]
 13940  			ptr := g.Args[0]
 13941  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 13942  				continue
 13943  			}
 13944  			v.reset(OpS390XXORload)
 13945  			v.Type = t
 13946  			v.AuxInt = int32ToAuxInt(off)
 13947  			v.Aux = symToAux(sym)
 13948  			v.AddArg3(x, ptr, mem)
 13949  			return true
 13950  		}
 13951  		break
 13952  	}
 13953  	return false
 13954  }
 13955  func rewriteValueS390X_OpS390XXORW(v *Value) bool {
 13956  	v_1 := v.Args[1]
 13957  	v_0 := v.Args[0]
 13958  	// match: (XORW x (MOVDconst [c]))
 13959  	// result: (XORWconst [int32(c)] x)
 13960  	for {
 13961  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13962  			x := v_0
 13963  			if v_1.Op != OpS390XMOVDconst {
 13964  				continue
 13965  			}
 13966  			c := auxIntToInt64(v_1.AuxInt)
 13967  			v.reset(OpS390XXORWconst)
 13968  			v.AuxInt = int32ToAuxInt(int32(c))
 13969  			v.AddArg(x)
 13970  			return true
 13971  		}
 13972  		break
 13973  	}
 13974  	// match: (XORW x x)
 13975  	// result: (MOVDconst [0])
 13976  	for {
 13977  		x := v_0
 13978  		if x != v_1 {
 13979  			break
 13980  		}
 13981  		v.reset(OpS390XMOVDconst)
 13982  		v.AuxInt = int64ToAuxInt(0)
 13983  		return true
 13984  	}
 13985  	// match: (XORW <t> x g:(MOVWload [off] {sym} ptr mem))
 13986  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 13987  	// result: (XORWload <t> [off] {sym} x ptr mem)
 13988  	for {
 13989  		t := v.Type
 13990  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 13991  			x := v_0
 13992  			g := v_1
 13993  			if g.Op != OpS390XMOVWload {
 13994  				continue
 13995  			}
 13996  			off := auxIntToInt32(g.AuxInt)
 13997  			sym := auxToSym(g.Aux)
 13998  			mem := g.Args[1]
 13999  			ptr := g.Args[0]
 14000  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 14001  				continue
 14002  			}
 14003  			v.reset(OpS390XXORWload)
 14004  			v.Type = t
 14005  			v.AuxInt = int32ToAuxInt(off)
 14006  			v.Aux = symToAux(sym)
 14007  			v.AddArg3(x, ptr, mem)
 14008  			return true
 14009  		}
 14010  		break
 14011  	}
 14012  	// match: (XORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 14013  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 14014  	// result: (XORWload <t> [off] {sym} x ptr mem)
 14015  	for {
 14016  		t := v.Type
 14017  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14018  			x := v_0
 14019  			g := v_1
 14020  			if g.Op != OpS390XMOVWZload {
 14021  				continue
 14022  			}
 14023  			off := auxIntToInt32(g.AuxInt)
 14024  			sym := auxToSym(g.Aux)
 14025  			mem := g.Args[1]
 14026  			ptr := g.Args[0]
 14027  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 14028  				continue
 14029  			}
 14030  			v.reset(OpS390XXORWload)
 14031  			v.Type = t
 14032  			v.AuxInt = int32ToAuxInt(off)
 14033  			v.Aux = symToAux(sym)
 14034  			v.AddArg3(x, ptr, mem)
 14035  			return true
 14036  		}
 14037  		break
 14038  	}
 14039  	return false
 14040  }
 14041  func rewriteValueS390X_OpS390XXORWconst(v *Value) bool {
 14042  	v_0 := v.Args[0]
 14043  	// match: (XORWconst [c] x)
 14044  	// cond: int32(c)==0
 14045  	// result: x
 14046  	for {
 14047  		c := auxIntToInt32(v.AuxInt)
 14048  		x := v_0
 14049  		if !(int32(c) == 0) {
 14050  			break
 14051  		}
 14052  		v.copyOf(x)
 14053  		return true
 14054  	}
 14055  	// match: (XORWconst [c] (MOVDconst [d]))
 14056  	// result: (MOVDconst [int64(c)^d])
 14057  	for {
 14058  		c := auxIntToInt32(v.AuxInt)
 14059  		if v_0.Op != OpS390XMOVDconst {
 14060  			break
 14061  		}
 14062  		d := auxIntToInt64(v_0.AuxInt)
 14063  		v.reset(OpS390XMOVDconst)
 14064  		v.AuxInt = int64ToAuxInt(int64(c) ^ d)
 14065  		return true
 14066  	}
 14067  	return false
 14068  }
 14069  func rewriteValueS390X_OpS390XXORWload(v *Value) bool {
 14070  	v_2 := v.Args[2]
 14071  	v_1 := v.Args[1]
 14072  	v_0 := v.Args[0]
 14073  	// match: (XORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14074  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 14075  	// result: (XORWload [off1+off2] {sym} x ptr mem)
 14076  	for {
 14077  		off1 := auxIntToInt32(v.AuxInt)
 14078  		sym := auxToSym(v.Aux)
 14079  		x := v_0
 14080  		if v_1.Op != OpS390XADDconst {
 14081  			break
 14082  		}
 14083  		off2 := auxIntToInt32(v_1.AuxInt)
 14084  		ptr := v_1.Args[0]
 14085  		mem := v_2
 14086  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 14087  			break
 14088  		}
 14089  		v.reset(OpS390XXORWload)
 14090  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14091  		v.Aux = symToAux(sym)
 14092  		v.AddArg3(x, ptr, mem)
 14093  		return true
 14094  	}
 14095  	// match: (XORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14096  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 14097  	// result: (XORWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 14098  	for {
 14099  		o1 := auxIntToInt32(v.AuxInt)
 14100  		s1 := auxToSym(v.Aux)
 14101  		x := v_0
 14102  		if v_1.Op != OpS390XMOVDaddr {
 14103  			break
 14104  		}
 14105  		o2 := auxIntToInt32(v_1.AuxInt)
 14106  		s2 := auxToSym(v_1.Aux)
 14107  		ptr := v_1.Args[0]
 14108  		mem := v_2
 14109  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 14110  			break
 14111  		}
 14112  		v.reset(OpS390XXORWload)
 14113  		v.AuxInt = int32ToAuxInt(o1 + o2)
 14114  		v.Aux = symToAux(mergeSym(s1, s2))
 14115  		v.AddArg3(x, ptr, mem)
 14116  		return true
 14117  	}
 14118  	return false
 14119  }
 14120  func rewriteValueS390X_OpS390XXORconst(v *Value) bool {
 14121  	v_0 := v.Args[0]
 14122  	// match: (XORconst [0] x)
 14123  	// result: x
 14124  	for {
 14125  		if auxIntToInt64(v.AuxInt) != 0 {
 14126  			break
 14127  		}
 14128  		x := v_0
 14129  		v.copyOf(x)
 14130  		return true
 14131  	}
 14132  	// match: (XORconst [c] (MOVDconst [d]))
 14133  	// result: (MOVDconst [c^d])
 14134  	for {
 14135  		c := auxIntToInt64(v.AuxInt)
 14136  		if v_0.Op != OpS390XMOVDconst {
 14137  			break
 14138  		}
 14139  		d := auxIntToInt64(v_0.AuxInt)
 14140  		v.reset(OpS390XMOVDconst)
 14141  		v.AuxInt = int64ToAuxInt(c ^ d)
 14142  		return true
 14143  	}
 14144  	return false
 14145  }
 14146  func rewriteValueS390X_OpS390XXORload(v *Value) bool {
 14147  	v_2 := v.Args[2]
 14148  	v_1 := v.Args[1]
 14149  	v_0 := v.Args[0]
 14150  	b := v.Block
 14151  	// match: (XORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 14152  	// cond: isSamePtr(ptr1, ptr2)
 14153  	// result: (XOR x (LGDR <t> y))
 14154  	for {
 14155  		t := v.Type
 14156  		off := auxIntToInt32(v.AuxInt)
 14157  		sym := auxToSym(v.Aux)
 14158  		x := v_0
 14159  		ptr1 := v_1
 14160  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 14161  			break
 14162  		}
 14163  		y := v_2.Args[1]
 14164  		ptr2 := v_2.Args[0]
 14165  		if !(isSamePtr(ptr1, ptr2)) {
 14166  			break
 14167  		}
 14168  		v.reset(OpS390XXOR)
 14169  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 14170  		v0.AddArg(y)
 14171  		v.AddArg2(x, v0)
 14172  		return true
 14173  	}
 14174  	// match: (XORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14175  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 14176  	// result: (XORload [off1+off2] {sym} x ptr mem)
 14177  	for {
 14178  		off1 := auxIntToInt32(v.AuxInt)
 14179  		sym := auxToSym(v.Aux)
 14180  		x := v_0
 14181  		if v_1.Op != OpS390XADDconst {
 14182  			break
 14183  		}
 14184  		off2 := auxIntToInt32(v_1.AuxInt)
 14185  		ptr := v_1.Args[0]
 14186  		mem := v_2
 14187  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 14188  			break
 14189  		}
 14190  		v.reset(OpS390XXORload)
 14191  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14192  		v.Aux = symToAux(sym)
 14193  		v.AddArg3(x, ptr, mem)
 14194  		return true
 14195  	}
 14196  	// match: (XORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14197  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 14198  	// result: (XORload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 14199  	for {
 14200  		o1 := auxIntToInt32(v.AuxInt)
 14201  		s1 := auxToSym(v.Aux)
 14202  		x := v_0
 14203  		if v_1.Op != OpS390XMOVDaddr {
 14204  			break
 14205  		}
 14206  		o2 := auxIntToInt32(v_1.AuxInt)
 14207  		s2 := auxToSym(v_1.Aux)
 14208  		ptr := v_1.Args[0]
 14209  		mem := v_2
 14210  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 14211  			break
 14212  		}
 14213  		v.reset(OpS390XXORload)
 14214  		v.AuxInt = int32ToAuxInt(o1 + o2)
 14215  		v.Aux = symToAux(mergeSym(s1, s2))
 14216  		v.AddArg3(x, ptr, mem)
 14217  		return true
 14218  	}
 14219  	return false
 14220  }
 14221  func rewriteValueS390X_OpSelect0(v *Value) bool {
 14222  	v_0 := v.Args[0]
 14223  	b := v.Block
 14224  	typ := &b.Func.Config.Types
 14225  	// match: (Select0 (Add64carry x y c))
 14226  	// result: (Select0 <typ.UInt64> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))
 14227  	for {
 14228  		if v_0.Op != OpAdd64carry {
 14229  			break
 14230  		}
 14231  		c := v_0.Args[2]
 14232  		x := v_0.Args[0]
 14233  		y := v_0.Args[1]
 14234  		v.reset(OpSelect0)
 14235  		v.Type = typ.UInt64
 14236  		v0 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14237  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14238  		v2 := b.NewValue0(v.Pos, OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 14239  		v2.AuxInt = int16ToAuxInt(-1)
 14240  		v2.AddArg(c)
 14241  		v1.AddArg(v2)
 14242  		v0.AddArg3(x, y, v1)
 14243  		v.AddArg(v0)
 14244  		return true
 14245  	}
 14246  	// match: (Select0 (Sub64borrow x y c))
 14247  	// result: (Select0 <typ.UInt64> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c))))
 14248  	for {
 14249  		if v_0.Op != OpSub64borrow {
 14250  			break
 14251  		}
 14252  		c := v_0.Args[2]
 14253  		x := v_0.Args[0]
 14254  		y := v_0.Args[1]
 14255  		v.reset(OpSelect0)
 14256  		v.Type = typ.UInt64
 14257  		v0 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14258  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14259  		v2 := b.NewValue0(v.Pos, OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 14260  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 14261  		v3.AuxInt = int64ToAuxInt(0)
 14262  		v2.AddArg2(v3, c)
 14263  		v1.AddArg(v2)
 14264  		v0.AddArg3(x, y, v1)
 14265  		v.AddArg(v0)
 14266  		return true
 14267  	}
 14268  	// match: (Select0 <t> (AddTupleFirst32 val tuple))
 14269  	// result: (ADDW val (Select0 <t> tuple))
 14270  	for {
 14271  		t := v.Type
 14272  		if v_0.Op != OpS390XAddTupleFirst32 {
 14273  			break
 14274  		}
 14275  		tuple := v_0.Args[1]
 14276  		val := v_0.Args[0]
 14277  		v.reset(OpS390XADDW)
 14278  		v0 := b.NewValue0(v.Pos, OpSelect0, t)
 14279  		v0.AddArg(tuple)
 14280  		v.AddArg2(val, v0)
 14281  		return true
 14282  	}
 14283  	// match: (Select0 <t> (AddTupleFirst64 val tuple))
 14284  	// result: (ADD val (Select0 <t> tuple))
 14285  	for {
 14286  		t := v.Type
 14287  		if v_0.Op != OpS390XAddTupleFirst64 {
 14288  			break
 14289  		}
 14290  		tuple := v_0.Args[1]
 14291  		val := v_0.Args[0]
 14292  		v.reset(OpS390XADD)
 14293  		v0 := b.NewValue0(v.Pos, OpSelect0, t)
 14294  		v0.AddArg(tuple)
 14295  		v.AddArg2(val, v0)
 14296  		return true
 14297  	}
 14298  	// match: (Select0 (ADDCconst (MOVDconst [c]) [d]))
 14299  	// result: (MOVDconst [c+int64(d)])
 14300  	for {
 14301  		if v_0.Op != OpS390XADDCconst {
 14302  			break
 14303  		}
 14304  		d := auxIntToInt16(v_0.AuxInt)
 14305  		v_0_0 := v_0.Args[0]
 14306  		if v_0_0.Op != OpS390XMOVDconst {
 14307  			break
 14308  		}
 14309  		c := auxIntToInt64(v_0_0.AuxInt)
 14310  		v.reset(OpS390XMOVDconst)
 14311  		v.AuxInt = int64ToAuxInt(c + int64(d))
 14312  		return true
 14313  	}
 14314  	// match: (Select0 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14315  	// result: (MOVDconst [c-d])
 14316  	for {
 14317  		if v_0.Op != OpS390XSUBC {
 14318  			break
 14319  		}
 14320  		_ = v_0.Args[1]
 14321  		v_0_0 := v_0.Args[0]
 14322  		if v_0_0.Op != OpS390XMOVDconst {
 14323  			break
 14324  		}
 14325  		c := auxIntToInt64(v_0_0.AuxInt)
 14326  		v_0_1 := v_0.Args[1]
 14327  		if v_0_1.Op != OpS390XMOVDconst {
 14328  			break
 14329  		}
 14330  		d := auxIntToInt64(v_0_1.AuxInt)
 14331  		v.reset(OpS390XMOVDconst)
 14332  		v.AuxInt = int64ToAuxInt(c - d)
 14333  		return true
 14334  	}
 14335  	// match: (Select0 (FADD (FMUL y z) x))
 14336  	// cond: x.Block.Func.useFMA(v)
 14337  	// result: (FMADD x y z)
 14338  	for {
 14339  		if v_0.Op != OpS390XFADD {
 14340  			break
 14341  		}
 14342  		_ = v_0.Args[1]
 14343  		v_0_0 := v_0.Args[0]
 14344  		v_0_1 := v_0.Args[1]
 14345  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 14346  			if v_0_0.Op != OpS390XFMUL {
 14347  				continue
 14348  			}
 14349  			z := v_0_0.Args[1]
 14350  			y := v_0_0.Args[0]
 14351  			x := v_0_1
 14352  			if !(x.Block.Func.useFMA(v)) {
 14353  				continue
 14354  			}
 14355  			v.reset(OpS390XFMADD)
 14356  			v.AddArg3(x, y, z)
 14357  			return true
 14358  		}
 14359  		break
 14360  	}
 14361  	// match: (Select0 (FSUB (FMUL y z) x))
 14362  	// cond: x.Block.Func.useFMA(v)
 14363  	// result: (FMSUB x y z)
 14364  	for {
 14365  		if v_0.Op != OpS390XFSUB {
 14366  			break
 14367  		}
 14368  		x := v_0.Args[1]
 14369  		v_0_0 := v_0.Args[0]
 14370  		if v_0_0.Op != OpS390XFMUL {
 14371  			break
 14372  		}
 14373  		z := v_0_0.Args[1]
 14374  		y := v_0_0.Args[0]
 14375  		if !(x.Block.Func.useFMA(v)) {
 14376  			break
 14377  		}
 14378  		v.reset(OpS390XFMSUB)
 14379  		v.AddArg3(x, y, z)
 14380  		return true
 14381  	}
 14382  	// match: (Select0 (FADDS (FMULS y z) x))
 14383  	// cond: x.Block.Func.useFMA(v)
 14384  	// result: (FMADDS x y z)
 14385  	for {
 14386  		if v_0.Op != OpS390XFADDS {
 14387  			break
 14388  		}
 14389  		_ = v_0.Args[1]
 14390  		v_0_0 := v_0.Args[0]
 14391  		v_0_1 := v_0.Args[1]
 14392  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 14393  			if v_0_0.Op != OpS390XFMULS {
 14394  				continue
 14395  			}
 14396  			z := v_0_0.Args[1]
 14397  			y := v_0_0.Args[0]
 14398  			x := v_0_1
 14399  			if !(x.Block.Func.useFMA(v)) {
 14400  				continue
 14401  			}
 14402  			v.reset(OpS390XFMADDS)
 14403  			v.AddArg3(x, y, z)
 14404  			return true
 14405  		}
 14406  		break
 14407  	}
 14408  	// match: (Select0 (FSUBS (FMULS y z) x))
 14409  	// cond: x.Block.Func.useFMA(v)
 14410  	// result: (FMSUBS x y z)
 14411  	for {
 14412  		if v_0.Op != OpS390XFSUBS {
 14413  			break
 14414  		}
 14415  		x := v_0.Args[1]
 14416  		v_0_0 := v_0.Args[0]
 14417  		if v_0_0.Op != OpS390XFMULS {
 14418  			break
 14419  		}
 14420  		z := v_0_0.Args[1]
 14421  		y := v_0_0.Args[0]
 14422  		if !(x.Block.Func.useFMA(v)) {
 14423  			break
 14424  		}
 14425  		v.reset(OpS390XFMSUBS)
 14426  		v.AddArg3(x, y, z)
 14427  		return true
 14428  	}
 14429  	return false
 14430  }
 14431  func rewriteValueS390X_OpSelect1(v *Value) bool {
 14432  	v_0 := v.Args[0]
 14433  	b := v.Block
 14434  	typ := &b.Func.Config.Types
 14435  	// match: (Select1 (Add64carry x y c))
 14436  	// result: (Select0 <typ.UInt64> (ADDE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))))
 14437  	for {
 14438  		if v_0.Op != OpAdd64carry {
 14439  			break
 14440  		}
 14441  		c := v_0.Args[2]
 14442  		x := v_0.Args[0]
 14443  		y := v_0.Args[1]
 14444  		v.reset(OpSelect0)
 14445  		v.Type = typ.UInt64
 14446  		v0 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14447  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 14448  		v1.AuxInt = int64ToAuxInt(0)
 14449  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14450  		v3 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14451  		v4 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14452  		v5 := b.NewValue0(v.Pos, OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 14453  		v5.AuxInt = int16ToAuxInt(-1)
 14454  		v5.AddArg(c)
 14455  		v4.AddArg(v5)
 14456  		v3.AddArg3(x, y, v4)
 14457  		v2.AddArg(v3)
 14458  		v0.AddArg3(v1, v1, v2)
 14459  		v.AddArg(v0)
 14460  		return true
 14461  	}
 14462  	// match: (Select1 (Sub64borrow x y c))
 14463  	// result: (NEG (Select0 <typ.UInt64> (SUBE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c)))))))
 14464  	for {
 14465  		if v_0.Op != OpSub64borrow {
 14466  			break
 14467  		}
 14468  		c := v_0.Args[2]
 14469  		x := v_0.Args[0]
 14470  		y := v_0.Args[1]
 14471  		v.reset(OpS390XNEG)
 14472  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 14473  		v1 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14474  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 14475  		v2.AuxInt = int64ToAuxInt(0)
 14476  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14477  		v4 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 14478  		v5 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 14479  		v6 := b.NewValue0(v.Pos, OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 14480  		v6.AddArg2(v2, c)
 14481  		v5.AddArg(v6)
 14482  		v4.AddArg3(x, y, v5)
 14483  		v3.AddArg(v4)
 14484  		v1.AddArg3(v2, v2, v3)
 14485  		v0.AddArg(v1)
 14486  		v.AddArg(v0)
 14487  		return true
 14488  	}
 14489  	// match: (Select1 (AddTupleFirst32 _ tuple))
 14490  	// result: (Select1 tuple)
 14491  	for {
 14492  		if v_0.Op != OpS390XAddTupleFirst32 {
 14493  			break
 14494  		}
 14495  		tuple := v_0.Args[1]
 14496  		v.reset(OpSelect1)
 14497  		v.AddArg(tuple)
 14498  		return true
 14499  	}
 14500  	// match: (Select1 (AddTupleFirst64 _ tuple))
 14501  	// result: (Select1 tuple)
 14502  	for {
 14503  		if v_0.Op != OpS390XAddTupleFirst64 {
 14504  			break
 14505  		}
 14506  		tuple := v_0.Args[1]
 14507  		v.reset(OpSelect1)
 14508  		v.AddArg(tuple)
 14509  		return true
 14510  	}
 14511  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 14512  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0
 14513  	// result: (FlagEQ)
 14514  	for {
 14515  		if v_0.Op != OpS390XADDCconst {
 14516  			break
 14517  		}
 14518  		d := auxIntToInt16(v_0.AuxInt)
 14519  		v_0_0 := v_0.Args[0]
 14520  		if v_0_0.Op != OpS390XMOVDconst {
 14521  			break
 14522  		}
 14523  		c := auxIntToInt64(v_0_0.AuxInt)
 14524  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0) {
 14525  			break
 14526  		}
 14527  		v.reset(OpS390XFlagEQ)
 14528  		return true
 14529  	}
 14530  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 14531  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0
 14532  	// result: (FlagLT)
 14533  	for {
 14534  		if v_0.Op != OpS390XADDCconst {
 14535  			break
 14536  		}
 14537  		d := auxIntToInt16(v_0.AuxInt)
 14538  		v_0_0 := v_0.Args[0]
 14539  		if v_0_0.Op != OpS390XMOVDconst {
 14540  			break
 14541  		}
 14542  		c := auxIntToInt64(v_0_0.AuxInt)
 14543  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0) {
 14544  			break
 14545  		}
 14546  		v.reset(OpS390XFlagLT)
 14547  		return true
 14548  	}
 14549  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14550  	// cond: uint64(d) <= uint64(c) && c-d == 0
 14551  	// result: (FlagGT)
 14552  	for {
 14553  		if v_0.Op != OpS390XSUBC {
 14554  			break
 14555  		}
 14556  		_ = v_0.Args[1]
 14557  		v_0_0 := v_0.Args[0]
 14558  		if v_0_0.Op != OpS390XMOVDconst {
 14559  			break
 14560  		}
 14561  		c := auxIntToInt64(v_0_0.AuxInt)
 14562  		v_0_1 := v_0.Args[1]
 14563  		if v_0_1.Op != OpS390XMOVDconst {
 14564  			break
 14565  		}
 14566  		d := auxIntToInt64(v_0_1.AuxInt)
 14567  		if !(uint64(d) <= uint64(c) && c-d == 0) {
 14568  			break
 14569  		}
 14570  		v.reset(OpS390XFlagGT)
 14571  		return true
 14572  	}
 14573  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 14574  	// cond: uint64(d) <= uint64(c) && c-d != 0
 14575  	// result: (FlagOV)
 14576  	for {
 14577  		if v_0.Op != OpS390XSUBC {
 14578  			break
 14579  		}
 14580  		_ = v_0.Args[1]
 14581  		v_0_0 := v_0.Args[0]
 14582  		if v_0_0.Op != OpS390XMOVDconst {
 14583  			break
 14584  		}
 14585  		c := auxIntToInt64(v_0_0.AuxInt)
 14586  		v_0_1 := v_0.Args[1]
 14587  		if v_0_1.Op != OpS390XMOVDconst {
 14588  			break
 14589  		}
 14590  		d := auxIntToInt64(v_0_1.AuxInt)
 14591  		if !(uint64(d) <= uint64(c) && c-d != 0) {
 14592  			break
 14593  		}
 14594  		v.reset(OpS390XFlagOV)
 14595  		return true
 14596  	}
 14597  	return false
 14598  }
 14599  func rewriteValueS390X_OpSlicemask(v *Value) bool {
 14600  	v_0 := v.Args[0]
 14601  	b := v.Block
 14602  	// match: (Slicemask <t> x)
 14603  	// result: (SRADconst (NEG <t> x) [63])
 14604  	for {
 14605  		t := v.Type
 14606  		x := v_0
 14607  		v.reset(OpS390XSRADconst)
 14608  		v.AuxInt = uint8ToAuxInt(63)
 14609  		v0 := b.NewValue0(v.Pos, OpS390XNEG, t)
 14610  		v0.AddArg(x)
 14611  		v.AddArg(v0)
 14612  		return true
 14613  	}
 14614  }
 14615  func rewriteValueS390X_OpStore(v *Value) bool {
 14616  	v_2 := v.Args[2]
 14617  	v_1 := v.Args[1]
 14618  	v_0 := v.Args[0]
 14619  	// match: (Store {t} ptr val mem)
 14620  	// cond: t.Size() == 8 && t.IsFloat()
 14621  	// result: (FMOVDstore ptr val mem)
 14622  	for {
 14623  		t := auxToType(v.Aux)
 14624  		ptr := v_0
 14625  		val := v_1
 14626  		mem := v_2
 14627  		if !(t.Size() == 8 && t.IsFloat()) {
 14628  			break
 14629  		}
 14630  		v.reset(OpS390XFMOVDstore)
 14631  		v.AddArg3(ptr, val, mem)
 14632  		return true
 14633  	}
 14634  	// match: (Store {t} ptr val mem)
 14635  	// cond: t.Size() == 4 && t.IsFloat()
 14636  	// result: (FMOVSstore ptr val mem)
 14637  	for {
 14638  		t := auxToType(v.Aux)
 14639  		ptr := v_0
 14640  		val := v_1
 14641  		mem := v_2
 14642  		if !(t.Size() == 4 && t.IsFloat()) {
 14643  			break
 14644  		}
 14645  		v.reset(OpS390XFMOVSstore)
 14646  		v.AddArg3(ptr, val, mem)
 14647  		return true
 14648  	}
 14649  	// match: (Store {t} ptr val mem)
 14650  	// cond: t.Size() == 8 && !t.IsFloat()
 14651  	// result: (MOVDstore ptr val mem)
 14652  	for {
 14653  		t := auxToType(v.Aux)
 14654  		ptr := v_0
 14655  		val := v_1
 14656  		mem := v_2
 14657  		if !(t.Size() == 8 && !t.IsFloat()) {
 14658  			break
 14659  		}
 14660  		v.reset(OpS390XMOVDstore)
 14661  		v.AddArg3(ptr, val, mem)
 14662  		return true
 14663  	}
 14664  	// match: (Store {t} ptr val mem)
 14665  	// cond: t.Size() == 4 && !t.IsFloat()
 14666  	// result: (MOVWstore ptr val mem)
 14667  	for {
 14668  		t := auxToType(v.Aux)
 14669  		ptr := v_0
 14670  		val := v_1
 14671  		mem := v_2
 14672  		if !(t.Size() == 4 && !t.IsFloat()) {
 14673  			break
 14674  		}
 14675  		v.reset(OpS390XMOVWstore)
 14676  		v.AddArg3(ptr, val, mem)
 14677  		return true
 14678  	}
 14679  	// match: (Store {t} ptr val mem)
 14680  	// cond: t.Size() == 2
 14681  	// result: (MOVHstore ptr val mem)
 14682  	for {
 14683  		t := auxToType(v.Aux)
 14684  		ptr := v_0
 14685  		val := v_1
 14686  		mem := v_2
 14687  		if !(t.Size() == 2) {
 14688  			break
 14689  		}
 14690  		v.reset(OpS390XMOVHstore)
 14691  		v.AddArg3(ptr, val, mem)
 14692  		return true
 14693  	}
 14694  	// match: (Store {t} ptr val mem)
 14695  	// cond: t.Size() == 1
 14696  	// result: (MOVBstore ptr val mem)
 14697  	for {
 14698  		t := auxToType(v.Aux)
 14699  		ptr := v_0
 14700  		val := v_1
 14701  		mem := v_2
 14702  		if !(t.Size() == 1) {
 14703  			break
 14704  		}
 14705  		v.reset(OpS390XMOVBstore)
 14706  		v.AddArg3(ptr, val, mem)
 14707  		return true
 14708  	}
 14709  	return false
 14710  }
 14711  func rewriteValueS390X_OpSub32F(v *Value) bool {
 14712  	v_1 := v.Args[1]
 14713  	v_0 := v.Args[0]
 14714  	b := v.Block
 14715  	typ := &b.Func.Config.Types
 14716  	// match: (Sub32F x y)
 14717  	// result: (Select0 (FSUBS x y))
 14718  	for {
 14719  		x := v_0
 14720  		y := v_1
 14721  		v.reset(OpSelect0)
 14722  		v0 := b.NewValue0(v.Pos, OpS390XFSUBS, types.NewTuple(typ.Float32, types.TypeFlags))
 14723  		v0.AddArg2(x, y)
 14724  		v.AddArg(v0)
 14725  		return true
 14726  	}
 14727  }
 14728  func rewriteValueS390X_OpSub64F(v *Value) bool {
 14729  	v_1 := v.Args[1]
 14730  	v_0 := v.Args[0]
 14731  	b := v.Block
 14732  	typ := &b.Func.Config.Types
 14733  	// match: (Sub64F x y)
 14734  	// result: (Select0 (FSUB x y))
 14735  	for {
 14736  		x := v_0
 14737  		y := v_1
 14738  		v.reset(OpSelect0)
 14739  		v0 := b.NewValue0(v.Pos, OpS390XFSUB, types.NewTuple(typ.Float64, types.TypeFlags))
 14740  		v0.AddArg2(x, y)
 14741  		v.AddArg(v0)
 14742  		return true
 14743  	}
 14744  }
 14745  func rewriteValueS390X_OpTrunc(v *Value) bool {
 14746  	v_0 := v.Args[0]
 14747  	// match: (Trunc x)
 14748  	// result: (FIDBR [5] x)
 14749  	for {
 14750  		x := v_0
 14751  		v.reset(OpS390XFIDBR)
 14752  		v.AuxInt = int8ToAuxInt(5)
 14753  		v.AddArg(x)
 14754  		return true
 14755  	}
 14756  }
 14757  func rewriteValueS390X_OpZero(v *Value) bool {
 14758  	v_1 := v.Args[1]
 14759  	v_0 := v.Args[0]
 14760  	b := v.Block
 14761  	// match: (Zero [0] _ mem)
 14762  	// result: mem
 14763  	for {
 14764  		if auxIntToInt64(v.AuxInt) != 0 {
 14765  			break
 14766  		}
 14767  		mem := v_1
 14768  		v.copyOf(mem)
 14769  		return true
 14770  	}
 14771  	// match: (Zero [1] destptr mem)
 14772  	// result: (MOVBstoreconst [0] destptr mem)
 14773  	for {
 14774  		if auxIntToInt64(v.AuxInt) != 1 {
 14775  			break
 14776  		}
 14777  		destptr := v_0
 14778  		mem := v_1
 14779  		v.reset(OpS390XMOVBstoreconst)
 14780  		v.AuxInt = valAndOffToAuxInt(0)
 14781  		v.AddArg2(destptr, mem)
 14782  		return true
 14783  	}
 14784  	// match: (Zero [2] destptr mem)
 14785  	// result: (MOVHstoreconst [0] destptr mem)
 14786  	for {
 14787  		if auxIntToInt64(v.AuxInt) != 2 {
 14788  			break
 14789  		}
 14790  		destptr := v_0
 14791  		mem := v_1
 14792  		v.reset(OpS390XMOVHstoreconst)
 14793  		v.AuxInt = valAndOffToAuxInt(0)
 14794  		v.AddArg2(destptr, mem)
 14795  		return true
 14796  	}
 14797  	// match: (Zero [4] destptr mem)
 14798  	// result: (MOVWstoreconst [0] destptr mem)
 14799  	for {
 14800  		if auxIntToInt64(v.AuxInt) != 4 {
 14801  			break
 14802  		}
 14803  		destptr := v_0
 14804  		mem := v_1
 14805  		v.reset(OpS390XMOVWstoreconst)
 14806  		v.AuxInt = valAndOffToAuxInt(0)
 14807  		v.AddArg2(destptr, mem)
 14808  		return true
 14809  	}
 14810  	// match: (Zero [8] destptr mem)
 14811  	// result: (MOVDstoreconst [0] destptr mem)
 14812  	for {
 14813  		if auxIntToInt64(v.AuxInt) != 8 {
 14814  			break
 14815  		}
 14816  		destptr := v_0
 14817  		mem := v_1
 14818  		v.reset(OpS390XMOVDstoreconst)
 14819  		v.AuxInt = valAndOffToAuxInt(0)
 14820  		v.AddArg2(destptr, mem)
 14821  		return true
 14822  	}
 14823  	// match: (Zero [3] destptr mem)
 14824  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr (MOVHstoreconst [0] destptr mem))
 14825  	for {
 14826  		if auxIntToInt64(v.AuxInt) != 3 {
 14827  			break
 14828  		}
 14829  		destptr := v_0
 14830  		mem := v_1
 14831  		v.reset(OpS390XMOVBstoreconst)
 14832  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 2))
 14833  		v0 := b.NewValue0(v.Pos, OpS390XMOVHstoreconst, types.TypeMem)
 14834  		v0.AuxInt = valAndOffToAuxInt(0)
 14835  		v0.AddArg2(destptr, mem)
 14836  		v.AddArg2(destptr, v0)
 14837  		return true
 14838  	}
 14839  	// match: (Zero [5] destptr mem)
 14840  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 14841  	for {
 14842  		if auxIntToInt64(v.AuxInt) != 5 {
 14843  			break
 14844  		}
 14845  		destptr := v_0
 14846  		mem := v_1
 14847  		v.reset(OpS390XMOVBstoreconst)
 14848  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 14849  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 14850  		v0.AuxInt = valAndOffToAuxInt(0)
 14851  		v0.AddArg2(destptr, mem)
 14852  		v.AddArg2(destptr, v0)
 14853  		return true
 14854  	}
 14855  	// match: (Zero [6] destptr mem)
 14856  	// result: (MOVHstoreconst [makeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 14857  	for {
 14858  		if auxIntToInt64(v.AuxInt) != 6 {
 14859  			break
 14860  		}
 14861  		destptr := v_0
 14862  		mem := v_1
 14863  		v.reset(OpS390XMOVHstoreconst)
 14864  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 14865  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 14866  		v0.AuxInt = valAndOffToAuxInt(0)
 14867  		v0.AddArg2(destptr, mem)
 14868  		v.AddArg2(destptr, v0)
 14869  		return true
 14870  	}
 14871  	// match: (Zero [7] destptr mem)
 14872  	// result: (MOVWstoreconst [makeValAndOff(0,3)] destptr (MOVWstoreconst [0] destptr mem))
 14873  	for {
 14874  		if auxIntToInt64(v.AuxInt) != 7 {
 14875  			break
 14876  		}
 14877  		destptr := v_0
 14878  		mem := v_1
 14879  		v.reset(OpS390XMOVWstoreconst)
 14880  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 3))
 14881  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 14882  		v0.AuxInt = valAndOffToAuxInt(0)
 14883  		v0.AddArg2(destptr, mem)
 14884  		v.AddArg2(destptr, v0)
 14885  		return true
 14886  	}
 14887  	// match: (Zero [s] destptr mem)
 14888  	// cond: s > 0 && s <= 1024
 14889  	// result: (CLEAR [makeValAndOff(int32(s), 0)] destptr mem)
 14890  	for {
 14891  		s := auxIntToInt64(v.AuxInt)
 14892  		destptr := v_0
 14893  		mem := v_1
 14894  		if !(s > 0 && s <= 1024) {
 14895  			break
 14896  		}
 14897  		v.reset(OpS390XCLEAR)
 14898  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s), 0))
 14899  		v.AddArg2(destptr, mem)
 14900  		return true
 14901  	}
 14902  	// match: (Zero [s] destptr mem)
 14903  	// cond: s > 1024
 14904  	// result: (LoweredZero [s%256] destptr (ADDconst <destptr.Type> destptr [(int32(s)/256)*256]) mem)
 14905  	for {
 14906  		s := auxIntToInt64(v.AuxInt)
 14907  		destptr := v_0
 14908  		mem := v_1
 14909  		if !(s > 1024) {
 14910  			break
 14911  		}
 14912  		v.reset(OpS390XLoweredZero)
 14913  		v.AuxInt = int64ToAuxInt(s % 256)
 14914  		v0 := b.NewValue0(v.Pos, OpS390XADDconst, destptr.Type)
 14915  		v0.AuxInt = int32ToAuxInt((int32(s) / 256) * 256)
 14916  		v0.AddArg(destptr)
 14917  		v.AddArg3(destptr, v0, mem)
 14918  		return true
 14919  	}
 14920  	return false
 14921  }
 14922  func rewriteBlockS390X(b *Block) bool {
 14923  	typ := &b.Func.Config.Types
 14924  	switch b.Kind {
 14925  	case BlockS390XBRC:
 14926  		// match: (BRC {c} x:(CMP _ _) yes no)
 14927  		// cond: c&s390x.Unordered != 0
 14928  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14929  		for b.Controls[0].Op == OpS390XCMP {
 14930  			x := b.Controls[0]
 14931  			c := auxToS390xCCMask(b.Aux)
 14932  			if !(c&s390x.Unordered != 0) {
 14933  				break
 14934  			}
 14935  			b.resetWithControl(BlockS390XBRC, x)
 14936  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14937  			return true
 14938  		}
 14939  		// match: (BRC {c} x:(CMPW _ _) yes no)
 14940  		// cond: c&s390x.Unordered != 0
 14941  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14942  		for b.Controls[0].Op == OpS390XCMPW {
 14943  			x := b.Controls[0]
 14944  			c := auxToS390xCCMask(b.Aux)
 14945  			if !(c&s390x.Unordered != 0) {
 14946  				break
 14947  			}
 14948  			b.resetWithControl(BlockS390XBRC, x)
 14949  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14950  			return true
 14951  		}
 14952  		// match: (BRC {c} x:(CMPU _ _) yes no)
 14953  		// cond: c&s390x.Unordered != 0
 14954  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14955  		for b.Controls[0].Op == OpS390XCMPU {
 14956  			x := b.Controls[0]
 14957  			c := auxToS390xCCMask(b.Aux)
 14958  			if !(c&s390x.Unordered != 0) {
 14959  				break
 14960  			}
 14961  			b.resetWithControl(BlockS390XBRC, x)
 14962  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14963  			return true
 14964  		}
 14965  		// match: (BRC {c} x:(CMPWU _ _) yes no)
 14966  		// cond: c&s390x.Unordered != 0
 14967  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14968  		for b.Controls[0].Op == OpS390XCMPWU {
 14969  			x := b.Controls[0]
 14970  			c := auxToS390xCCMask(b.Aux)
 14971  			if !(c&s390x.Unordered != 0) {
 14972  				break
 14973  			}
 14974  			b.resetWithControl(BlockS390XBRC, x)
 14975  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14976  			return true
 14977  		}
 14978  		// match: (BRC {c} x:(CMPconst _) yes no)
 14979  		// cond: c&s390x.Unordered != 0
 14980  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14981  		for b.Controls[0].Op == OpS390XCMPconst {
 14982  			x := b.Controls[0]
 14983  			c := auxToS390xCCMask(b.Aux)
 14984  			if !(c&s390x.Unordered != 0) {
 14985  				break
 14986  			}
 14987  			b.resetWithControl(BlockS390XBRC, x)
 14988  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 14989  			return true
 14990  		}
 14991  		// match: (BRC {c} x:(CMPWconst _) yes no)
 14992  		// cond: c&s390x.Unordered != 0
 14993  		// result: (BRC {c&^s390x.Unordered} x yes no)
 14994  		for b.Controls[0].Op == OpS390XCMPWconst {
 14995  			x := b.Controls[0]
 14996  			c := auxToS390xCCMask(b.Aux)
 14997  			if !(c&s390x.Unordered != 0) {
 14998  				break
 14999  			}
 15000  			b.resetWithControl(BlockS390XBRC, x)
 15001  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15002  			return true
 15003  		}
 15004  		// match: (BRC {c} x:(CMPUconst _) yes no)
 15005  		// cond: c&s390x.Unordered != 0
 15006  		// result: (BRC {c&^s390x.Unordered} x yes no)
 15007  		for b.Controls[0].Op == OpS390XCMPUconst {
 15008  			x := b.Controls[0]
 15009  			c := auxToS390xCCMask(b.Aux)
 15010  			if !(c&s390x.Unordered != 0) {
 15011  				break
 15012  			}
 15013  			b.resetWithControl(BlockS390XBRC, x)
 15014  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15015  			return true
 15016  		}
 15017  		// match: (BRC {c} x:(CMPWUconst _) yes no)
 15018  		// cond: c&s390x.Unordered != 0
 15019  		// result: (BRC {c&^s390x.Unordered} x yes no)
 15020  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15021  			x := b.Controls[0]
 15022  			c := auxToS390xCCMask(b.Aux)
 15023  			if !(c&s390x.Unordered != 0) {
 15024  				break
 15025  			}
 15026  			b.resetWithControl(BlockS390XBRC, x)
 15027  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15028  			return true
 15029  		}
 15030  		// match: (BRC {c} (CMP x y) yes no)
 15031  		// result: (CGRJ {c&^s390x.Unordered} x y yes no)
 15032  		for b.Controls[0].Op == OpS390XCMP {
 15033  			v_0 := b.Controls[0]
 15034  			y := v_0.Args[1]
 15035  			x := v_0.Args[0]
 15036  			c := auxToS390xCCMask(b.Aux)
 15037  			b.resetWithControl2(BlockS390XCGRJ, x, y)
 15038  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15039  			return true
 15040  		}
 15041  		// match: (BRC {c} (CMPW x y) yes no)
 15042  		// result: (CRJ {c&^s390x.Unordered} x y yes no)
 15043  		for b.Controls[0].Op == OpS390XCMPW {
 15044  			v_0 := b.Controls[0]
 15045  			y := v_0.Args[1]
 15046  			x := v_0.Args[0]
 15047  			c := auxToS390xCCMask(b.Aux)
 15048  			b.resetWithControl2(BlockS390XCRJ, x, y)
 15049  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15050  			return true
 15051  		}
 15052  		// match: (BRC {c} (CMPU x y) yes no)
 15053  		// result: (CLGRJ {c&^s390x.Unordered} x y yes no)
 15054  		for b.Controls[0].Op == OpS390XCMPU {
 15055  			v_0 := b.Controls[0]
 15056  			y := v_0.Args[1]
 15057  			x := v_0.Args[0]
 15058  			c := auxToS390xCCMask(b.Aux)
 15059  			b.resetWithControl2(BlockS390XCLGRJ, x, y)
 15060  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15061  			return true
 15062  		}
 15063  		// match: (BRC {c} (CMPWU x y) yes no)
 15064  		// result: (CLRJ {c&^s390x.Unordered} x y yes no)
 15065  		for b.Controls[0].Op == OpS390XCMPWU {
 15066  			v_0 := b.Controls[0]
 15067  			y := v_0.Args[1]
 15068  			x := v_0.Args[0]
 15069  			c := auxToS390xCCMask(b.Aux)
 15070  			b.resetWithControl2(BlockS390XCLRJ, x, y)
 15071  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15072  			return true
 15073  		}
 15074  		// match: (BRC {c} (CMPconst x [y]) yes no)
 15075  		// cond: y == int32( int8(y))
 15076  		// result: (CGIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 15077  		for b.Controls[0].Op == OpS390XCMPconst {
 15078  			v_0 := b.Controls[0]
 15079  			y := auxIntToInt32(v_0.AuxInt)
 15080  			x := v_0.Args[0]
 15081  			c := auxToS390xCCMask(b.Aux)
 15082  			if !(y == int32(int8(y))) {
 15083  				break
 15084  			}
 15085  			b.resetWithControl(BlockS390XCGIJ, x)
 15086  			b.AuxInt = int8ToAuxInt(int8(y))
 15087  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15088  			return true
 15089  		}
 15090  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 15091  		// cond: y == int32( int8(y))
 15092  		// result: (CIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 15093  		for b.Controls[0].Op == OpS390XCMPWconst {
 15094  			v_0 := b.Controls[0]
 15095  			y := auxIntToInt32(v_0.AuxInt)
 15096  			x := v_0.Args[0]
 15097  			c := auxToS390xCCMask(b.Aux)
 15098  			if !(y == int32(int8(y))) {
 15099  				break
 15100  			}
 15101  			b.resetWithControl(BlockS390XCIJ, x)
 15102  			b.AuxInt = int8ToAuxInt(int8(y))
 15103  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15104  			return true
 15105  		}
 15106  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 15107  		// cond: y == int32(uint8(y))
 15108  		// result: (CLGIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 15109  		for b.Controls[0].Op == OpS390XCMPUconst {
 15110  			v_0 := b.Controls[0]
 15111  			y := auxIntToInt32(v_0.AuxInt)
 15112  			x := v_0.Args[0]
 15113  			c := auxToS390xCCMask(b.Aux)
 15114  			if !(y == int32(uint8(y))) {
 15115  				break
 15116  			}
 15117  			b.resetWithControl(BlockS390XCLGIJ, x)
 15118  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15119  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15120  			return true
 15121  		}
 15122  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 15123  		// cond: y == int32(uint8(y))
 15124  		// result: (CLIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 15125  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15126  			v_0 := b.Controls[0]
 15127  			y := auxIntToInt32(v_0.AuxInt)
 15128  			x := v_0.Args[0]
 15129  			c := auxToS390xCCMask(b.Aux)
 15130  			if !(y == int32(uint8(y))) {
 15131  				break
 15132  			}
 15133  			b.resetWithControl(BlockS390XCLIJ, x)
 15134  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15135  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 15136  			return true
 15137  		}
 15138  		// match: (BRC {s390x.Less} (CMPconst x [ 128]) yes no)
 15139  		// result: (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
 15140  		for b.Controls[0].Op == OpS390XCMPconst {
 15141  			v_0 := b.Controls[0]
 15142  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15143  				break
 15144  			}
 15145  			x := v_0.Args[0]
 15146  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15147  				break
 15148  			}
 15149  			b.resetWithControl(BlockS390XCGIJ, x)
 15150  			b.AuxInt = int8ToAuxInt(127)
 15151  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15152  			return true
 15153  		}
 15154  		// match: (BRC {s390x.Less} (CMPWconst x [ 128]) yes no)
 15155  		// result: (CIJ {s390x.LessOrEqual} x [ 127] yes no)
 15156  		for b.Controls[0].Op == OpS390XCMPWconst {
 15157  			v_0 := b.Controls[0]
 15158  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15159  				break
 15160  			}
 15161  			x := v_0.Args[0]
 15162  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15163  				break
 15164  			}
 15165  			b.resetWithControl(BlockS390XCIJ, x)
 15166  			b.AuxInt = int8ToAuxInt(127)
 15167  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15168  			return true
 15169  		}
 15170  		// match: (BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no)
 15171  		// result: (CGIJ {s390x.Less} x [-128] yes no)
 15172  		for b.Controls[0].Op == OpS390XCMPconst {
 15173  			v_0 := b.Controls[0]
 15174  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15175  				break
 15176  			}
 15177  			x := v_0.Args[0]
 15178  			if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 15179  				break
 15180  			}
 15181  			b.resetWithControl(BlockS390XCGIJ, x)
 15182  			b.AuxInt = int8ToAuxInt(-128)
 15183  			b.Aux = s390xCCMaskToAux(s390x.Less)
 15184  			return true
 15185  		}
 15186  		// match: (BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no)
 15187  		// result: (CIJ {s390x.Less} x [-128] yes no)
 15188  		for b.Controls[0].Op == OpS390XCMPWconst {
 15189  			v_0 := b.Controls[0]
 15190  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15191  				break
 15192  			}
 15193  			x := v_0.Args[0]
 15194  			if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 15195  				break
 15196  			}
 15197  			b.resetWithControl(BlockS390XCIJ, x)
 15198  			b.AuxInt = int8ToAuxInt(-128)
 15199  			b.Aux = s390xCCMaskToAux(s390x.Less)
 15200  			return true
 15201  		}
 15202  		// match: (BRC {s390x.Greater} (CMPconst x [-129]) yes no)
 15203  		// result: (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
 15204  		for b.Controls[0].Op == OpS390XCMPconst {
 15205  			v_0 := b.Controls[0]
 15206  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15207  				break
 15208  			}
 15209  			x := v_0.Args[0]
 15210  			if auxToS390xCCMask(b.Aux) != s390x.Greater {
 15211  				break
 15212  			}
 15213  			b.resetWithControl(BlockS390XCGIJ, x)
 15214  			b.AuxInt = int8ToAuxInt(-128)
 15215  			b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
 15216  			return true
 15217  		}
 15218  		// match: (BRC {s390x.Greater} (CMPWconst x [-129]) yes no)
 15219  		// result: (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
 15220  		for b.Controls[0].Op == OpS390XCMPWconst {
 15221  			v_0 := b.Controls[0]
 15222  			if auxIntToInt32(v_0.AuxInt) != -129 {
 15223  				break
 15224  			}
 15225  			x := v_0.Args[0]
 15226  			if auxToS390xCCMask(b.Aux) != s390x.Greater {
 15227  				break
 15228  			}
 15229  			b.resetWithControl(BlockS390XCIJ, x)
 15230  			b.AuxInt = int8ToAuxInt(-128)
 15231  			b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
 15232  			return true
 15233  		}
 15234  		// match: (BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no)
 15235  		// result: (CGIJ {s390x.Greater} x [ 127] yes no)
 15236  		for b.Controls[0].Op == OpS390XCMPconst {
 15237  			v_0 := b.Controls[0]
 15238  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15239  				break
 15240  			}
 15241  			x := v_0.Args[0]
 15242  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15243  				break
 15244  			}
 15245  			b.resetWithControl(BlockS390XCGIJ, x)
 15246  			b.AuxInt = int8ToAuxInt(127)
 15247  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15248  			return true
 15249  		}
 15250  		// match: (BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no)
 15251  		// result: (CIJ {s390x.Greater} x [ 127] yes no)
 15252  		for b.Controls[0].Op == OpS390XCMPWconst {
 15253  			v_0 := b.Controls[0]
 15254  			if auxIntToInt32(v_0.AuxInt) != 128 {
 15255  				break
 15256  			}
 15257  			x := v_0.Args[0]
 15258  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15259  				break
 15260  			}
 15261  			b.resetWithControl(BlockS390XCIJ, x)
 15262  			b.AuxInt = int8ToAuxInt(127)
 15263  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15264  			return true
 15265  		}
 15266  		// match: (BRC {s390x.Less} (CMPWUconst x [256]) yes no)
 15267  		// result: (CLIJ {s390x.LessOrEqual} x [255] yes no)
 15268  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15269  			v_0 := b.Controls[0]
 15270  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15271  				break
 15272  			}
 15273  			x := v_0.Args[0]
 15274  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15275  				break
 15276  			}
 15277  			b.resetWithControl(BlockS390XCLIJ, x)
 15278  			b.AuxInt = uint8ToAuxInt(255)
 15279  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15280  			return true
 15281  		}
 15282  		// match: (BRC {s390x.Less} (CMPUconst x [256]) yes no)
 15283  		// result: (CLGIJ {s390x.LessOrEqual} x [255] yes no)
 15284  		for b.Controls[0].Op == OpS390XCMPUconst {
 15285  			v_0 := b.Controls[0]
 15286  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15287  				break
 15288  			}
 15289  			x := v_0.Args[0]
 15290  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 15291  				break
 15292  			}
 15293  			b.resetWithControl(BlockS390XCLGIJ, x)
 15294  			b.AuxInt = uint8ToAuxInt(255)
 15295  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 15296  			return true
 15297  		}
 15298  		// match: (BRC {s390x.GreaterOrEqual} (CMPWUconst x [256]) yes no)
 15299  		// result: (CLIJ {s390x.Greater} x [255] yes no)
 15300  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15301  			v_0 := b.Controls[0]
 15302  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15303  				break
 15304  			}
 15305  			x := v_0.Args[0]
 15306  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15307  				break
 15308  			}
 15309  			b.resetWithControl(BlockS390XCLIJ, x)
 15310  			b.AuxInt = uint8ToAuxInt(255)
 15311  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15312  			return true
 15313  		}
 15314  		// match: (BRC {s390x.GreaterOrEqual} (CMPUconst x [256]) yes no)
 15315  		// result: (CLGIJ {s390x.Greater} x [255] yes no)
 15316  		for b.Controls[0].Op == OpS390XCMPUconst {
 15317  			v_0 := b.Controls[0]
 15318  			if auxIntToInt32(v_0.AuxInt) != 256 {
 15319  				break
 15320  			}
 15321  			x := v_0.Args[0]
 15322  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 15323  				break
 15324  			}
 15325  			b.resetWithControl(BlockS390XCLGIJ, x)
 15326  			b.AuxInt = uint8ToAuxInt(255)
 15327  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 15328  			return true
 15329  		}
 15330  		// match: (BRC {c} (CMPconst x [y]) yes no)
 15331  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15332  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 15333  		for b.Controls[0].Op == OpS390XCMPconst {
 15334  			v_0 := b.Controls[0]
 15335  			y := auxIntToInt32(v_0.AuxInt)
 15336  			x := v_0.Args[0]
 15337  			c := auxToS390xCCMask(b.Aux)
 15338  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15339  				break
 15340  			}
 15341  			b.resetWithControl(BlockS390XCLGIJ, x)
 15342  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15343  			b.Aux = s390xCCMaskToAux(c)
 15344  			return true
 15345  		}
 15346  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 15347  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15348  		// result: (CLIJ {c} x [uint8(y)] yes no)
 15349  		for b.Controls[0].Op == OpS390XCMPWconst {
 15350  			v_0 := b.Controls[0]
 15351  			y := auxIntToInt32(v_0.AuxInt)
 15352  			x := v_0.Args[0]
 15353  			c := auxToS390xCCMask(b.Aux)
 15354  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15355  				break
 15356  			}
 15357  			b.resetWithControl(BlockS390XCLIJ, x)
 15358  			b.AuxInt = uint8ToAuxInt(uint8(y))
 15359  			b.Aux = s390xCCMaskToAux(c)
 15360  			return true
 15361  		}
 15362  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 15363  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15364  		// result: (CGIJ {c} x [ int8(y)] yes no)
 15365  		for b.Controls[0].Op == OpS390XCMPUconst {
 15366  			v_0 := b.Controls[0]
 15367  			y := auxIntToInt32(v_0.AuxInt)
 15368  			x := v_0.Args[0]
 15369  			c := auxToS390xCCMask(b.Aux)
 15370  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15371  				break
 15372  			}
 15373  			b.resetWithControl(BlockS390XCGIJ, x)
 15374  			b.AuxInt = int8ToAuxInt(int8(y))
 15375  			b.Aux = s390xCCMaskToAux(c)
 15376  			return true
 15377  		}
 15378  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 15379  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 15380  		// result: (CIJ {c} x [ int8(y)] yes no)
 15381  		for b.Controls[0].Op == OpS390XCMPWUconst {
 15382  			v_0 := b.Controls[0]
 15383  			y := auxIntToInt32(v_0.AuxInt)
 15384  			x := v_0.Args[0]
 15385  			c := auxToS390xCCMask(b.Aux)
 15386  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 15387  				break
 15388  			}
 15389  			b.resetWithControl(BlockS390XCIJ, x)
 15390  			b.AuxInt = int8ToAuxInt(int8(y))
 15391  			b.Aux = s390xCCMaskToAux(c)
 15392  			return true
 15393  		}
 15394  		// match: (BRC {c} (InvertFlags cmp) yes no)
 15395  		// result: (BRC {c.ReverseComparison()} cmp yes no)
 15396  		for b.Controls[0].Op == OpS390XInvertFlags {
 15397  			v_0 := b.Controls[0]
 15398  			cmp := v_0.Args[0]
 15399  			c := auxToS390xCCMask(b.Aux)
 15400  			b.resetWithControl(BlockS390XBRC, cmp)
 15401  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 15402  			return true
 15403  		}
 15404  		// match: (BRC {c} (FlagEQ) yes no)
 15405  		// cond: c&s390x.Equal != 0
 15406  		// result: (First yes no)
 15407  		for b.Controls[0].Op == OpS390XFlagEQ {
 15408  			c := auxToS390xCCMask(b.Aux)
 15409  			if !(c&s390x.Equal != 0) {
 15410  				break
 15411  			}
 15412  			b.Reset(BlockFirst)
 15413  			return true
 15414  		}
 15415  		// match: (BRC {c} (FlagLT) yes no)
 15416  		// cond: c&s390x.Less != 0
 15417  		// result: (First yes no)
 15418  		for b.Controls[0].Op == OpS390XFlagLT {
 15419  			c := auxToS390xCCMask(b.Aux)
 15420  			if !(c&s390x.Less != 0) {
 15421  				break
 15422  			}
 15423  			b.Reset(BlockFirst)
 15424  			return true
 15425  		}
 15426  		// match: (BRC {c} (FlagGT) yes no)
 15427  		// cond: c&s390x.Greater != 0
 15428  		// result: (First yes no)
 15429  		for b.Controls[0].Op == OpS390XFlagGT {
 15430  			c := auxToS390xCCMask(b.Aux)
 15431  			if !(c&s390x.Greater != 0) {
 15432  				break
 15433  			}
 15434  			b.Reset(BlockFirst)
 15435  			return true
 15436  		}
 15437  		// match: (BRC {c} (FlagOV) yes no)
 15438  		// cond: c&s390x.Unordered != 0
 15439  		// result: (First yes no)
 15440  		for b.Controls[0].Op == OpS390XFlagOV {
 15441  			c := auxToS390xCCMask(b.Aux)
 15442  			if !(c&s390x.Unordered != 0) {
 15443  				break
 15444  			}
 15445  			b.Reset(BlockFirst)
 15446  			return true
 15447  		}
 15448  		// match: (BRC {c} (FlagEQ) yes no)
 15449  		// cond: c&s390x.Equal == 0
 15450  		// result: (First no yes)
 15451  		for b.Controls[0].Op == OpS390XFlagEQ {
 15452  			c := auxToS390xCCMask(b.Aux)
 15453  			if !(c&s390x.Equal == 0) {
 15454  				break
 15455  			}
 15456  			b.Reset(BlockFirst)
 15457  			b.swapSuccessors()
 15458  			return true
 15459  		}
 15460  		// match: (BRC {c} (FlagLT) yes no)
 15461  		// cond: c&s390x.Less == 0
 15462  		// result: (First no yes)
 15463  		for b.Controls[0].Op == OpS390XFlagLT {
 15464  			c := auxToS390xCCMask(b.Aux)
 15465  			if !(c&s390x.Less == 0) {
 15466  				break
 15467  			}
 15468  			b.Reset(BlockFirst)
 15469  			b.swapSuccessors()
 15470  			return true
 15471  		}
 15472  		// match: (BRC {c} (FlagGT) yes no)
 15473  		// cond: c&s390x.Greater == 0
 15474  		// result: (First no yes)
 15475  		for b.Controls[0].Op == OpS390XFlagGT {
 15476  			c := auxToS390xCCMask(b.Aux)
 15477  			if !(c&s390x.Greater == 0) {
 15478  				break
 15479  			}
 15480  			b.Reset(BlockFirst)
 15481  			b.swapSuccessors()
 15482  			return true
 15483  		}
 15484  		// match: (BRC {c} (FlagOV) yes no)
 15485  		// cond: c&s390x.Unordered == 0
 15486  		// result: (First no yes)
 15487  		for b.Controls[0].Op == OpS390XFlagOV {
 15488  			c := auxToS390xCCMask(b.Aux)
 15489  			if !(c&s390x.Unordered == 0) {
 15490  				break
 15491  			}
 15492  			b.Reset(BlockFirst)
 15493  			b.swapSuccessors()
 15494  			return true
 15495  		}
 15496  	case BlockS390XCGIJ:
 15497  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15498  		// cond: c&s390x.Equal != 0 && int64(x) == int64(y)
 15499  		// result: (First yes no)
 15500  		for b.Controls[0].Op == OpS390XMOVDconst {
 15501  			v_0 := b.Controls[0]
 15502  			x := auxIntToInt64(v_0.AuxInt)
 15503  			y := auxIntToInt8(b.AuxInt)
 15504  			c := auxToS390xCCMask(b.Aux)
 15505  			if !(c&s390x.Equal != 0 && int64(x) == int64(y)) {
 15506  				break
 15507  			}
 15508  			b.Reset(BlockFirst)
 15509  			return true
 15510  		}
 15511  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15512  		// cond: c&s390x.Less != 0 && int64(x) < int64(y)
 15513  		// result: (First yes no)
 15514  		for b.Controls[0].Op == OpS390XMOVDconst {
 15515  			v_0 := b.Controls[0]
 15516  			x := auxIntToInt64(v_0.AuxInt)
 15517  			y := auxIntToInt8(b.AuxInt)
 15518  			c := auxToS390xCCMask(b.Aux)
 15519  			if !(c&s390x.Less != 0 && int64(x) < int64(y)) {
 15520  				break
 15521  			}
 15522  			b.Reset(BlockFirst)
 15523  			return true
 15524  		}
 15525  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15526  		// cond: c&s390x.Greater != 0 && int64(x) > int64(y)
 15527  		// result: (First yes no)
 15528  		for b.Controls[0].Op == OpS390XMOVDconst {
 15529  			v_0 := b.Controls[0]
 15530  			x := auxIntToInt64(v_0.AuxInt)
 15531  			y := auxIntToInt8(b.AuxInt)
 15532  			c := auxToS390xCCMask(b.Aux)
 15533  			if !(c&s390x.Greater != 0 && int64(x) > int64(y)) {
 15534  				break
 15535  			}
 15536  			b.Reset(BlockFirst)
 15537  			return true
 15538  		}
 15539  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15540  		// cond: c&s390x.Equal == 0 && int64(x) == int64(y)
 15541  		// result: (First no yes)
 15542  		for b.Controls[0].Op == OpS390XMOVDconst {
 15543  			v_0 := b.Controls[0]
 15544  			x := auxIntToInt64(v_0.AuxInt)
 15545  			y := auxIntToInt8(b.AuxInt)
 15546  			c := auxToS390xCCMask(b.Aux)
 15547  			if !(c&s390x.Equal == 0 && int64(x) == int64(y)) {
 15548  				break
 15549  			}
 15550  			b.Reset(BlockFirst)
 15551  			b.swapSuccessors()
 15552  			return true
 15553  		}
 15554  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15555  		// cond: c&s390x.Less == 0 && int64(x) < int64(y)
 15556  		// result: (First no yes)
 15557  		for b.Controls[0].Op == OpS390XMOVDconst {
 15558  			v_0 := b.Controls[0]
 15559  			x := auxIntToInt64(v_0.AuxInt)
 15560  			y := auxIntToInt8(b.AuxInt)
 15561  			c := auxToS390xCCMask(b.Aux)
 15562  			if !(c&s390x.Less == 0 && int64(x) < int64(y)) {
 15563  				break
 15564  			}
 15565  			b.Reset(BlockFirst)
 15566  			b.swapSuccessors()
 15567  			return true
 15568  		}
 15569  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 15570  		// cond: c&s390x.Greater == 0 && int64(x) > int64(y)
 15571  		// result: (First no yes)
 15572  		for b.Controls[0].Op == OpS390XMOVDconst {
 15573  			v_0 := b.Controls[0]
 15574  			x := auxIntToInt64(v_0.AuxInt)
 15575  			y := auxIntToInt8(b.AuxInt)
 15576  			c := auxToS390xCCMask(b.Aux)
 15577  			if !(c&s390x.Greater == 0 && int64(x) > int64(y)) {
 15578  				break
 15579  			}
 15580  			b.Reset(BlockFirst)
 15581  			b.swapSuccessors()
 15582  			return true
 15583  		}
 15584  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15585  		// result: (BRC {s390x.NoCarry} carry)
 15586  		for b.Controls[0].Op == OpSelect0 {
 15587  			v_0 := b.Controls[0]
 15588  			v_0_0 := v_0.Args[0]
 15589  			if v_0_0.Op != OpS390XADDE {
 15590  				break
 15591  			}
 15592  			carry := v_0_0.Args[2]
 15593  			v_0_0_0 := v_0_0.Args[0]
 15594  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15595  				break
 15596  			}
 15597  			v_0_0_1 := v_0_0.Args[1]
 15598  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15599  				break
 15600  			}
 15601  			b.resetWithControl(BlockS390XBRC, carry)
 15602  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 15603  			return true
 15604  		}
 15605  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 15606  		// result: (BRC {s390x.Carry} carry)
 15607  		for b.Controls[0].Op == OpSelect0 {
 15608  			v_0 := b.Controls[0]
 15609  			v_0_0 := v_0.Args[0]
 15610  			if v_0_0.Op != OpS390XADDE {
 15611  				break
 15612  			}
 15613  			carry := v_0_0.Args[2]
 15614  			v_0_0_0 := v_0_0.Args[0]
 15615  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15616  				break
 15617  			}
 15618  			v_0_0_1 := v_0_0.Args[1]
 15619  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15620  				break
 15621  			}
 15622  			b.resetWithControl(BlockS390XBRC, carry)
 15623  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 15624  			return true
 15625  		}
 15626  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15627  		// result: (BRC {s390x.Carry} carry)
 15628  		for b.Controls[0].Op == OpSelect0 {
 15629  			v_0 := b.Controls[0]
 15630  			v_0_0 := v_0.Args[0]
 15631  			if v_0_0.Op != OpS390XADDE {
 15632  				break
 15633  			}
 15634  			carry := v_0_0.Args[2]
 15635  			v_0_0_0 := v_0_0.Args[0]
 15636  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15637  				break
 15638  			}
 15639  			v_0_0_1 := v_0_0.Args[1]
 15640  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15641  				break
 15642  			}
 15643  			b.resetWithControl(BlockS390XBRC, carry)
 15644  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 15645  			return true
 15646  		}
 15647  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 15648  		// result: (BRC {s390x.NoCarry} carry)
 15649  		for b.Controls[0].Op == OpSelect0 {
 15650  			v_0 := b.Controls[0]
 15651  			v_0_0 := v_0.Args[0]
 15652  			if v_0_0.Op != OpS390XADDE {
 15653  				break
 15654  			}
 15655  			carry := v_0_0.Args[2]
 15656  			v_0_0_0 := v_0_0.Args[0]
 15657  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15658  				break
 15659  			}
 15660  			v_0_0_1 := v_0_0.Args[1]
 15661  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15662  				break
 15663  			}
 15664  			b.resetWithControl(BlockS390XBRC, carry)
 15665  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 15666  			return true
 15667  		}
 15668  		// match: (CGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 15669  		// result: (BRC {s390x.Carry} carry)
 15670  		for b.Controls[0].Op == OpSelect0 {
 15671  			v_0 := b.Controls[0]
 15672  			v_0_0 := v_0.Args[0]
 15673  			if v_0_0.Op != OpS390XADDE {
 15674  				break
 15675  			}
 15676  			carry := v_0_0.Args[2]
 15677  			v_0_0_0 := v_0_0.Args[0]
 15678  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 15679  				break
 15680  			}
 15681  			v_0_0_1 := v_0_0.Args[1]
 15682  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 15683  				break
 15684  			}
 15685  			b.resetWithControl(BlockS390XBRC, carry)
 15686  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 15687  			return true
 15688  		}
 15689  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15690  		// result: (BRC {s390x.NoBorrow} borrow)
 15691  		for b.Controls[0].Op == OpS390XNEG {
 15692  			v_0 := b.Controls[0]
 15693  			v_0_0 := v_0.Args[0]
 15694  			if v_0_0.Op != OpSelect0 {
 15695  				break
 15696  			}
 15697  			v_0_0_0 := v_0_0.Args[0]
 15698  			if v_0_0_0.Op != OpS390XSUBE {
 15699  				break
 15700  			}
 15701  			borrow := v_0_0_0.Args[2]
 15702  			v_0_0_0_0 := v_0_0_0.Args[0]
 15703  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15704  				break
 15705  			}
 15706  			v_0_0_0_1 := v_0_0_0.Args[1]
 15707  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15708  				break
 15709  			}
 15710  			b.resetWithControl(BlockS390XBRC, borrow)
 15711  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 15712  			return true
 15713  		}
 15714  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 15715  		// result: (BRC {s390x.Borrow} borrow)
 15716  		for b.Controls[0].Op == OpS390XNEG {
 15717  			v_0 := b.Controls[0]
 15718  			v_0_0 := v_0.Args[0]
 15719  			if v_0_0.Op != OpSelect0 {
 15720  				break
 15721  			}
 15722  			v_0_0_0 := v_0_0.Args[0]
 15723  			if v_0_0_0.Op != OpS390XSUBE {
 15724  				break
 15725  			}
 15726  			borrow := v_0_0_0.Args[2]
 15727  			v_0_0_0_0 := v_0_0_0.Args[0]
 15728  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15729  				break
 15730  			}
 15731  			v_0_0_0_1 := v_0_0_0.Args[1]
 15732  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 15733  				break
 15734  			}
 15735  			b.resetWithControl(BlockS390XBRC, borrow)
 15736  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 15737  			return true
 15738  		}
 15739  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15740  		// result: (BRC {s390x.Borrow} borrow)
 15741  		for b.Controls[0].Op == OpS390XNEG {
 15742  			v_0 := b.Controls[0]
 15743  			v_0_0 := v_0.Args[0]
 15744  			if v_0_0.Op != OpSelect0 {
 15745  				break
 15746  			}
 15747  			v_0_0_0 := v_0_0.Args[0]
 15748  			if v_0_0_0.Op != OpS390XSUBE {
 15749  				break
 15750  			}
 15751  			borrow := v_0_0_0.Args[2]
 15752  			v_0_0_0_0 := v_0_0_0.Args[0]
 15753  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15754  				break
 15755  			}
 15756  			v_0_0_0_1 := v_0_0_0.Args[1]
 15757  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15758  				break
 15759  			}
 15760  			b.resetWithControl(BlockS390XBRC, borrow)
 15761  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 15762  			return true
 15763  		}
 15764  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 15765  		// result: (BRC {s390x.NoBorrow} borrow)
 15766  		for b.Controls[0].Op == OpS390XNEG {
 15767  			v_0 := b.Controls[0]
 15768  			v_0_0 := v_0.Args[0]
 15769  			if v_0_0.Op != OpSelect0 {
 15770  				break
 15771  			}
 15772  			v_0_0_0 := v_0_0.Args[0]
 15773  			if v_0_0_0.Op != OpS390XSUBE {
 15774  				break
 15775  			}
 15776  			borrow := v_0_0_0.Args[2]
 15777  			v_0_0_0_0 := v_0_0_0.Args[0]
 15778  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15779  				break
 15780  			}
 15781  			v_0_0_0_1 := v_0_0_0.Args[1]
 15782  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 15783  				break
 15784  			}
 15785  			b.resetWithControl(BlockS390XBRC, borrow)
 15786  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 15787  			return true
 15788  		}
 15789  		// match: (CGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 15790  		// result: (BRC {s390x.Borrow} borrow)
 15791  		for b.Controls[0].Op == OpS390XNEG {
 15792  			v_0 := b.Controls[0]
 15793  			v_0_0 := v_0.Args[0]
 15794  			if v_0_0.Op != OpSelect0 {
 15795  				break
 15796  			}
 15797  			v_0_0_0 := v_0_0.Args[0]
 15798  			if v_0_0_0.Op != OpS390XSUBE {
 15799  				break
 15800  			}
 15801  			borrow := v_0_0_0.Args[2]
 15802  			v_0_0_0_0 := v_0_0_0.Args[0]
 15803  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 15804  				break
 15805  			}
 15806  			v_0_0_0_1 := v_0_0_0.Args[1]
 15807  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 15808  				break
 15809  			}
 15810  			b.resetWithControl(BlockS390XBRC, borrow)
 15811  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 15812  			return true
 15813  		}
 15814  	case BlockS390XCGRJ:
 15815  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 15816  		// cond: is8Bit(y)
 15817  		// result: (CGIJ {c} x [ int8(y)] yes no)
 15818  		for b.Controls[1].Op == OpS390XMOVDconst {
 15819  			x := b.Controls[0]
 15820  			v_1 := b.Controls[1]
 15821  			y := auxIntToInt64(v_1.AuxInt)
 15822  			c := auxToS390xCCMask(b.Aux)
 15823  			if !(is8Bit(y)) {
 15824  				break
 15825  			}
 15826  			b.resetWithControl(BlockS390XCGIJ, x)
 15827  			b.AuxInt = int8ToAuxInt(int8(y))
 15828  			b.Aux = s390xCCMaskToAux(c)
 15829  			return true
 15830  		}
 15831  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 15832  		// cond: is8Bit(x)
 15833  		// result: (CGIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 15834  		for b.Controls[0].Op == OpS390XMOVDconst {
 15835  			v_0 := b.Controls[0]
 15836  			x := auxIntToInt64(v_0.AuxInt)
 15837  			y := b.Controls[1]
 15838  			c := auxToS390xCCMask(b.Aux)
 15839  			if !(is8Bit(x)) {
 15840  				break
 15841  			}
 15842  			b.resetWithControl(BlockS390XCGIJ, y)
 15843  			b.AuxInt = int8ToAuxInt(int8(x))
 15844  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 15845  			return true
 15846  		}
 15847  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 15848  		// cond: !is8Bit(y) && is32Bit(y)
 15849  		// result: (BRC {c} (CMPconst x [int32(y)]) yes no)
 15850  		for b.Controls[1].Op == OpS390XMOVDconst {
 15851  			x := b.Controls[0]
 15852  			v_1 := b.Controls[1]
 15853  			y := auxIntToInt64(v_1.AuxInt)
 15854  			c := auxToS390xCCMask(b.Aux)
 15855  			if !(!is8Bit(y) && is32Bit(y)) {
 15856  				break
 15857  			}
 15858  			v0 := b.NewValue0(x.Pos, OpS390XCMPconst, types.TypeFlags)
 15859  			v0.AuxInt = int32ToAuxInt(int32(y))
 15860  			v0.AddArg(x)
 15861  			b.resetWithControl(BlockS390XBRC, v0)
 15862  			b.Aux = s390xCCMaskToAux(c)
 15863  			return true
 15864  		}
 15865  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 15866  		// cond: !is8Bit(x) && is32Bit(x)
 15867  		// result: (BRC {c.ReverseComparison()} (CMPconst y [int32(x)]) yes no)
 15868  		for b.Controls[0].Op == OpS390XMOVDconst {
 15869  			v_0 := b.Controls[0]
 15870  			x := auxIntToInt64(v_0.AuxInt)
 15871  			y := b.Controls[1]
 15872  			c := auxToS390xCCMask(b.Aux)
 15873  			if !(!is8Bit(x) && is32Bit(x)) {
 15874  				break
 15875  			}
 15876  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPconst, types.TypeFlags)
 15877  			v0.AuxInt = int32ToAuxInt(int32(x))
 15878  			v0.AddArg(y)
 15879  			b.resetWithControl(BlockS390XBRC, v0)
 15880  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 15881  			return true
 15882  		}
 15883  		// match: (CGRJ {c} x y yes no)
 15884  		// cond: x == y && c&s390x.Equal != 0
 15885  		// result: (First yes no)
 15886  		for {
 15887  			x := b.Controls[0]
 15888  			y := b.Controls[1]
 15889  			c := auxToS390xCCMask(b.Aux)
 15890  			if !(x == y && c&s390x.Equal != 0) {
 15891  				break
 15892  			}
 15893  			b.Reset(BlockFirst)
 15894  			return true
 15895  		}
 15896  		// match: (CGRJ {c} x y yes no)
 15897  		// cond: x == y && c&s390x.Equal == 0
 15898  		// result: (First no yes)
 15899  		for {
 15900  			x := b.Controls[0]
 15901  			y := b.Controls[1]
 15902  			c := auxToS390xCCMask(b.Aux)
 15903  			if !(x == y && c&s390x.Equal == 0) {
 15904  				break
 15905  			}
 15906  			b.Reset(BlockFirst)
 15907  			b.swapSuccessors()
 15908  			return true
 15909  		}
 15910  	case BlockS390XCIJ:
 15911  		// match: (CIJ {c} (MOVWreg x) [y] yes no)
 15912  		// result: (CIJ {c} x [y] yes no)
 15913  		for b.Controls[0].Op == OpS390XMOVWreg {
 15914  			v_0 := b.Controls[0]
 15915  			x := v_0.Args[0]
 15916  			y := auxIntToInt8(b.AuxInt)
 15917  			c := auxToS390xCCMask(b.Aux)
 15918  			b.resetWithControl(BlockS390XCIJ, x)
 15919  			b.AuxInt = int8ToAuxInt(y)
 15920  			b.Aux = s390xCCMaskToAux(c)
 15921  			return true
 15922  		}
 15923  		// match: (CIJ {c} (MOVWZreg x) [y] yes no)
 15924  		// result: (CIJ {c} x [y] yes no)
 15925  		for b.Controls[0].Op == OpS390XMOVWZreg {
 15926  			v_0 := b.Controls[0]
 15927  			x := v_0.Args[0]
 15928  			y := auxIntToInt8(b.AuxInt)
 15929  			c := auxToS390xCCMask(b.Aux)
 15930  			b.resetWithControl(BlockS390XCIJ, x)
 15931  			b.AuxInt = int8ToAuxInt(y)
 15932  			b.Aux = s390xCCMaskToAux(c)
 15933  			return true
 15934  		}
 15935  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15936  		// cond: c&s390x.Equal != 0 && int32(x) == int32(y)
 15937  		// result: (First yes no)
 15938  		for b.Controls[0].Op == OpS390XMOVDconst {
 15939  			v_0 := b.Controls[0]
 15940  			x := auxIntToInt64(v_0.AuxInt)
 15941  			y := auxIntToInt8(b.AuxInt)
 15942  			c := auxToS390xCCMask(b.Aux)
 15943  			if !(c&s390x.Equal != 0 && int32(x) == int32(y)) {
 15944  				break
 15945  			}
 15946  			b.Reset(BlockFirst)
 15947  			return true
 15948  		}
 15949  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15950  		// cond: c&s390x.Less != 0 && int32(x) < int32(y)
 15951  		// result: (First yes no)
 15952  		for b.Controls[0].Op == OpS390XMOVDconst {
 15953  			v_0 := b.Controls[0]
 15954  			x := auxIntToInt64(v_0.AuxInt)
 15955  			y := auxIntToInt8(b.AuxInt)
 15956  			c := auxToS390xCCMask(b.Aux)
 15957  			if !(c&s390x.Less != 0 && int32(x) < int32(y)) {
 15958  				break
 15959  			}
 15960  			b.Reset(BlockFirst)
 15961  			return true
 15962  		}
 15963  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15964  		// cond: c&s390x.Greater != 0 && int32(x) > int32(y)
 15965  		// result: (First yes no)
 15966  		for b.Controls[0].Op == OpS390XMOVDconst {
 15967  			v_0 := b.Controls[0]
 15968  			x := auxIntToInt64(v_0.AuxInt)
 15969  			y := auxIntToInt8(b.AuxInt)
 15970  			c := auxToS390xCCMask(b.Aux)
 15971  			if !(c&s390x.Greater != 0 && int32(x) > int32(y)) {
 15972  				break
 15973  			}
 15974  			b.Reset(BlockFirst)
 15975  			return true
 15976  		}
 15977  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15978  		// cond: c&s390x.Equal == 0 && int32(x) == int32(y)
 15979  		// result: (First no yes)
 15980  		for b.Controls[0].Op == OpS390XMOVDconst {
 15981  			v_0 := b.Controls[0]
 15982  			x := auxIntToInt64(v_0.AuxInt)
 15983  			y := auxIntToInt8(b.AuxInt)
 15984  			c := auxToS390xCCMask(b.Aux)
 15985  			if !(c&s390x.Equal == 0 && int32(x) == int32(y)) {
 15986  				break
 15987  			}
 15988  			b.Reset(BlockFirst)
 15989  			b.swapSuccessors()
 15990  			return true
 15991  		}
 15992  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 15993  		// cond: c&s390x.Less == 0 && int32(x) < int32(y)
 15994  		// result: (First no yes)
 15995  		for b.Controls[0].Op == OpS390XMOVDconst {
 15996  			v_0 := b.Controls[0]
 15997  			x := auxIntToInt64(v_0.AuxInt)
 15998  			y := auxIntToInt8(b.AuxInt)
 15999  			c := auxToS390xCCMask(b.Aux)
 16000  			if !(c&s390x.Less == 0 && int32(x) < int32(y)) {
 16001  				break
 16002  			}
 16003  			b.Reset(BlockFirst)
 16004  			b.swapSuccessors()
 16005  			return true
 16006  		}
 16007  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 16008  		// cond: c&s390x.Greater == 0 && int32(x) > int32(y)
 16009  		// result: (First no yes)
 16010  		for b.Controls[0].Op == OpS390XMOVDconst {
 16011  			v_0 := b.Controls[0]
 16012  			x := auxIntToInt64(v_0.AuxInt)
 16013  			y := auxIntToInt8(b.AuxInt)
 16014  			c := auxToS390xCCMask(b.Aux)
 16015  			if !(c&s390x.Greater == 0 && int32(x) > int32(y)) {
 16016  				break
 16017  			}
 16018  			b.Reset(BlockFirst)
 16019  			b.swapSuccessors()
 16020  			return true
 16021  		}
 16022  	case BlockS390XCLGIJ:
 16023  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16024  		// cond: c&s390x.Equal != 0 && uint64(x) == uint64(y)
 16025  		// result: (First yes no)
 16026  		for b.Controls[0].Op == OpS390XMOVDconst {
 16027  			v_0 := b.Controls[0]
 16028  			x := auxIntToInt64(v_0.AuxInt)
 16029  			y := auxIntToUint8(b.AuxInt)
 16030  			c := auxToS390xCCMask(b.Aux)
 16031  			if !(c&s390x.Equal != 0 && uint64(x) == uint64(y)) {
 16032  				break
 16033  			}
 16034  			b.Reset(BlockFirst)
 16035  			return true
 16036  		}
 16037  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16038  		// cond: c&s390x.Less != 0 && uint64(x) < uint64(y)
 16039  		// result: (First yes no)
 16040  		for b.Controls[0].Op == OpS390XMOVDconst {
 16041  			v_0 := b.Controls[0]
 16042  			x := auxIntToInt64(v_0.AuxInt)
 16043  			y := auxIntToUint8(b.AuxInt)
 16044  			c := auxToS390xCCMask(b.Aux)
 16045  			if !(c&s390x.Less != 0 && uint64(x) < uint64(y)) {
 16046  				break
 16047  			}
 16048  			b.Reset(BlockFirst)
 16049  			return true
 16050  		}
 16051  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16052  		// cond: c&s390x.Greater != 0 && uint64(x) > uint64(y)
 16053  		// result: (First yes no)
 16054  		for b.Controls[0].Op == OpS390XMOVDconst {
 16055  			v_0 := b.Controls[0]
 16056  			x := auxIntToInt64(v_0.AuxInt)
 16057  			y := auxIntToUint8(b.AuxInt)
 16058  			c := auxToS390xCCMask(b.Aux)
 16059  			if !(c&s390x.Greater != 0 && uint64(x) > uint64(y)) {
 16060  				break
 16061  			}
 16062  			b.Reset(BlockFirst)
 16063  			return true
 16064  		}
 16065  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16066  		// cond: c&s390x.Equal == 0 && uint64(x) == uint64(y)
 16067  		// result: (First no yes)
 16068  		for b.Controls[0].Op == OpS390XMOVDconst {
 16069  			v_0 := b.Controls[0]
 16070  			x := auxIntToInt64(v_0.AuxInt)
 16071  			y := auxIntToUint8(b.AuxInt)
 16072  			c := auxToS390xCCMask(b.Aux)
 16073  			if !(c&s390x.Equal == 0 && uint64(x) == uint64(y)) {
 16074  				break
 16075  			}
 16076  			b.Reset(BlockFirst)
 16077  			b.swapSuccessors()
 16078  			return true
 16079  		}
 16080  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16081  		// cond: c&s390x.Less == 0 && uint64(x) < uint64(y)
 16082  		// result: (First no yes)
 16083  		for b.Controls[0].Op == OpS390XMOVDconst {
 16084  			v_0 := b.Controls[0]
 16085  			x := auxIntToInt64(v_0.AuxInt)
 16086  			y := auxIntToUint8(b.AuxInt)
 16087  			c := auxToS390xCCMask(b.Aux)
 16088  			if !(c&s390x.Less == 0 && uint64(x) < uint64(y)) {
 16089  				break
 16090  			}
 16091  			b.Reset(BlockFirst)
 16092  			b.swapSuccessors()
 16093  			return true
 16094  		}
 16095  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 16096  		// cond: c&s390x.Greater == 0 && uint64(x) > uint64(y)
 16097  		// result: (First no yes)
 16098  		for b.Controls[0].Op == OpS390XMOVDconst {
 16099  			v_0 := b.Controls[0]
 16100  			x := auxIntToInt64(v_0.AuxInt)
 16101  			y := auxIntToUint8(b.AuxInt)
 16102  			c := auxToS390xCCMask(b.Aux)
 16103  			if !(c&s390x.Greater == 0 && uint64(x) > uint64(y)) {
 16104  				break
 16105  			}
 16106  			b.Reset(BlockFirst)
 16107  			b.swapSuccessors()
 16108  			return true
 16109  		}
 16110  		// match: (CLGIJ {s390x.GreaterOrEqual} _ [0] yes no)
 16111  		// result: (First yes no)
 16112  		for {
 16113  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16114  				break
 16115  			}
 16116  			b.Reset(BlockFirst)
 16117  			return true
 16118  		}
 16119  		// match: (CLGIJ {s390x.Less} _ [0] yes no)
 16120  		// result: (First no yes)
 16121  		for {
 16122  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
 16123  				break
 16124  			}
 16125  			b.Reset(BlockFirst)
 16126  			b.swapSuccessors()
 16127  			return true
 16128  		}
 16129  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16130  		// result: (BRC {s390x.NoCarry} carry)
 16131  		for b.Controls[0].Op == OpSelect0 {
 16132  			v_0 := b.Controls[0]
 16133  			v_0_0 := v_0.Args[0]
 16134  			if v_0_0.Op != OpS390XADDE {
 16135  				break
 16136  			}
 16137  			carry := v_0_0.Args[2]
 16138  			v_0_0_0 := v_0_0.Args[0]
 16139  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16140  				break
 16141  			}
 16142  			v_0_0_1 := v_0_0.Args[1]
 16143  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16144  				break
 16145  			}
 16146  			b.resetWithControl(BlockS390XBRC, carry)
 16147  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 16148  			return true
 16149  		}
 16150  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16151  		// result: (BRC {s390x.Carry} carry)
 16152  		for b.Controls[0].Op == OpSelect0 {
 16153  			v_0 := b.Controls[0]
 16154  			v_0_0 := v_0.Args[0]
 16155  			if v_0_0.Op != OpS390XADDE {
 16156  				break
 16157  			}
 16158  			carry := v_0_0.Args[2]
 16159  			v_0_0_0 := v_0_0.Args[0]
 16160  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16161  				break
 16162  			}
 16163  			v_0_0_1 := v_0_0.Args[1]
 16164  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16165  				break
 16166  			}
 16167  			b.resetWithControl(BlockS390XBRC, carry)
 16168  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16169  			return true
 16170  		}
 16171  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16172  		// result: (BRC {s390x.Carry} carry)
 16173  		for b.Controls[0].Op == OpSelect0 {
 16174  			v_0 := b.Controls[0]
 16175  			v_0_0 := v_0.Args[0]
 16176  			if v_0_0.Op != OpS390XADDE {
 16177  				break
 16178  			}
 16179  			carry := v_0_0.Args[2]
 16180  			v_0_0_0 := v_0_0.Args[0]
 16181  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16182  				break
 16183  			}
 16184  			v_0_0_1 := v_0_0.Args[1]
 16185  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16186  				break
 16187  			}
 16188  			b.resetWithControl(BlockS390XBRC, carry)
 16189  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16190  			return true
 16191  		}
 16192  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16193  		// result: (BRC {s390x.NoCarry} carry)
 16194  		for b.Controls[0].Op == OpSelect0 {
 16195  			v_0 := b.Controls[0]
 16196  			v_0_0 := v_0.Args[0]
 16197  			if v_0_0.Op != OpS390XADDE {
 16198  				break
 16199  			}
 16200  			carry := v_0_0.Args[2]
 16201  			v_0_0_0 := v_0_0.Args[0]
 16202  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16203  				break
 16204  			}
 16205  			v_0_0_1 := v_0_0.Args[1]
 16206  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16207  				break
 16208  			}
 16209  			b.resetWithControl(BlockS390XBRC, carry)
 16210  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 16211  			return true
 16212  		}
 16213  		// match: (CLGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16214  		// result: (BRC {s390x.Carry} carry)
 16215  		for b.Controls[0].Op == OpSelect0 {
 16216  			v_0 := b.Controls[0]
 16217  			v_0_0 := v_0.Args[0]
 16218  			if v_0_0.Op != OpS390XADDE {
 16219  				break
 16220  			}
 16221  			carry := v_0_0.Args[2]
 16222  			v_0_0_0 := v_0_0.Args[0]
 16223  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16224  				break
 16225  			}
 16226  			v_0_0_1 := v_0_0.Args[1]
 16227  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 16228  				break
 16229  			}
 16230  			b.resetWithControl(BlockS390XBRC, carry)
 16231  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16232  			return true
 16233  		}
 16234  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16235  		// result: (BRC {s390x.NoBorrow} borrow)
 16236  		for b.Controls[0].Op == OpS390XNEG {
 16237  			v_0 := b.Controls[0]
 16238  			v_0_0 := v_0.Args[0]
 16239  			if v_0_0.Op != OpSelect0 {
 16240  				break
 16241  			}
 16242  			v_0_0_0 := v_0_0.Args[0]
 16243  			if v_0_0_0.Op != OpS390XSUBE {
 16244  				break
 16245  			}
 16246  			borrow := v_0_0_0.Args[2]
 16247  			v_0_0_0_0 := v_0_0_0.Args[0]
 16248  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16249  				break
 16250  			}
 16251  			v_0_0_0_1 := v_0_0_0.Args[1]
 16252  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16253  				break
 16254  			}
 16255  			b.resetWithControl(BlockS390XBRC, borrow)
 16256  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 16257  			return true
 16258  		}
 16259  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16260  		// result: (BRC {s390x.Borrow} borrow)
 16261  		for b.Controls[0].Op == OpS390XNEG {
 16262  			v_0 := b.Controls[0]
 16263  			v_0_0 := v_0.Args[0]
 16264  			if v_0_0.Op != OpSelect0 {
 16265  				break
 16266  			}
 16267  			v_0_0_0 := v_0_0.Args[0]
 16268  			if v_0_0_0.Op != OpS390XSUBE {
 16269  				break
 16270  			}
 16271  			borrow := v_0_0_0.Args[2]
 16272  			v_0_0_0_0 := v_0_0_0.Args[0]
 16273  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16274  				break
 16275  			}
 16276  			v_0_0_0_1 := v_0_0_0.Args[1]
 16277  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16278  				break
 16279  			}
 16280  			b.resetWithControl(BlockS390XBRC, borrow)
 16281  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16282  			return true
 16283  		}
 16284  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16285  		// result: (BRC {s390x.Borrow} borrow)
 16286  		for b.Controls[0].Op == OpS390XNEG {
 16287  			v_0 := b.Controls[0]
 16288  			v_0_0 := v_0.Args[0]
 16289  			if v_0_0.Op != OpSelect0 {
 16290  				break
 16291  			}
 16292  			v_0_0_0 := v_0_0.Args[0]
 16293  			if v_0_0_0.Op != OpS390XSUBE {
 16294  				break
 16295  			}
 16296  			borrow := v_0_0_0.Args[2]
 16297  			v_0_0_0_0 := v_0_0_0.Args[0]
 16298  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16299  				break
 16300  			}
 16301  			v_0_0_0_1 := v_0_0_0.Args[1]
 16302  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16303  				break
 16304  			}
 16305  			b.resetWithControl(BlockS390XBRC, borrow)
 16306  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16307  			return true
 16308  		}
 16309  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16310  		// result: (BRC {s390x.NoBorrow} borrow)
 16311  		for b.Controls[0].Op == OpS390XNEG {
 16312  			v_0 := b.Controls[0]
 16313  			v_0_0 := v_0.Args[0]
 16314  			if v_0_0.Op != OpSelect0 {
 16315  				break
 16316  			}
 16317  			v_0_0_0 := v_0_0.Args[0]
 16318  			if v_0_0_0.Op != OpS390XSUBE {
 16319  				break
 16320  			}
 16321  			borrow := v_0_0_0.Args[2]
 16322  			v_0_0_0_0 := v_0_0_0.Args[0]
 16323  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16324  				break
 16325  			}
 16326  			v_0_0_0_1 := v_0_0_0.Args[1]
 16327  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16328  				break
 16329  			}
 16330  			b.resetWithControl(BlockS390XBRC, borrow)
 16331  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 16332  			return true
 16333  		}
 16334  		// match: (CLGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16335  		// result: (BRC {s390x.Borrow} borrow)
 16336  		for b.Controls[0].Op == OpS390XNEG {
 16337  			v_0 := b.Controls[0]
 16338  			v_0_0 := v_0.Args[0]
 16339  			if v_0_0.Op != OpSelect0 {
 16340  				break
 16341  			}
 16342  			v_0_0_0 := v_0_0.Args[0]
 16343  			if v_0_0_0.Op != OpS390XSUBE {
 16344  				break
 16345  			}
 16346  			borrow := v_0_0_0.Args[2]
 16347  			v_0_0_0_0 := v_0_0_0.Args[0]
 16348  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16349  				break
 16350  			}
 16351  			v_0_0_0_1 := v_0_0_0.Args[1]
 16352  			if v_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 16353  				break
 16354  			}
 16355  			b.resetWithControl(BlockS390XBRC, borrow)
 16356  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16357  			return true
 16358  		}
 16359  	case BlockS390XCLGRJ:
 16360  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 16361  		// cond: isU8Bit(y)
 16362  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 16363  		for b.Controls[1].Op == OpS390XMOVDconst {
 16364  			x := b.Controls[0]
 16365  			v_1 := b.Controls[1]
 16366  			y := auxIntToInt64(v_1.AuxInt)
 16367  			c := auxToS390xCCMask(b.Aux)
 16368  			if !(isU8Bit(y)) {
 16369  				break
 16370  			}
 16371  			b.resetWithControl(BlockS390XCLGIJ, x)
 16372  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16373  			b.Aux = s390xCCMaskToAux(c)
 16374  			return true
 16375  		}
 16376  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 16377  		// cond: isU8Bit(x)
 16378  		// result: (CLGIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 16379  		for b.Controls[0].Op == OpS390XMOVDconst {
 16380  			v_0 := b.Controls[0]
 16381  			x := auxIntToInt64(v_0.AuxInt)
 16382  			y := b.Controls[1]
 16383  			c := auxToS390xCCMask(b.Aux)
 16384  			if !(isU8Bit(x)) {
 16385  				break
 16386  			}
 16387  			b.resetWithControl(BlockS390XCLGIJ, y)
 16388  			b.AuxInt = uint8ToAuxInt(uint8(x))
 16389  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16390  			return true
 16391  		}
 16392  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 16393  		// cond: !isU8Bit(y) && isU32Bit(y)
 16394  		// result: (BRC {c} (CMPUconst x [int32(y)]) yes no)
 16395  		for b.Controls[1].Op == OpS390XMOVDconst {
 16396  			x := b.Controls[0]
 16397  			v_1 := b.Controls[1]
 16398  			y := auxIntToInt64(v_1.AuxInt)
 16399  			c := auxToS390xCCMask(b.Aux)
 16400  			if !(!isU8Bit(y) && isU32Bit(y)) {
 16401  				break
 16402  			}
 16403  			v0 := b.NewValue0(x.Pos, OpS390XCMPUconst, types.TypeFlags)
 16404  			v0.AuxInt = int32ToAuxInt(int32(y))
 16405  			v0.AddArg(x)
 16406  			b.resetWithControl(BlockS390XBRC, v0)
 16407  			b.Aux = s390xCCMaskToAux(c)
 16408  			return true
 16409  		}
 16410  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 16411  		// cond: !isU8Bit(x) && isU32Bit(x)
 16412  		// result: (BRC {c.ReverseComparison()} (CMPUconst y [int32(x)]) yes no)
 16413  		for b.Controls[0].Op == OpS390XMOVDconst {
 16414  			v_0 := b.Controls[0]
 16415  			x := auxIntToInt64(v_0.AuxInt)
 16416  			y := b.Controls[1]
 16417  			c := auxToS390xCCMask(b.Aux)
 16418  			if !(!isU8Bit(x) && isU32Bit(x)) {
 16419  				break
 16420  			}
 16421  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPUconst, types.TypeFlags)
 16422  			v0.AuxInt = int32ToAuxInt(int32(x))
 16423  			v0.AddArg(y)
 16424  			b.resetWithControl(BlockS390XBRC, v0)
 16425  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16426  			return true
 16427  		}
 16428  		// match: (CLGRJ {c} x y yes no)
 16429  		// cond: x == y && c&s390x.Equal != 0
 16430  		// result: (First yes no)
 16431  		for {
 16432  			x := b.Controls[0]
 16433  			y := b.Controls[1]
 16434  			c := auxToS390xCCMask(b.Aux)
 16435  			if !(x == y && c&s390x.Equal != 0) {
 16436  				break
 16437  			}
 16438  			b.Reset(BlockFirst)
 16439  			return true
 16440  		}
 16441  		// match: (CLGRJ {c} x y yes no)
 16442  		// cond: x == y && c&s390x.Equal == 0
 16443  		// result: (First no yes)
 16444  		for {
 16445  			x := b.Controls[0]
 16446  			y := b.Controls[1]
 16447  			c := auxToS390xCCMask(b.Aux)
 16448  			if !(x == y && c&s390x.Equal == 0) {
 16449  				break
 16450  			}
 16451  			b.Reset(BlockFirst)
 16452  			b.swapSuccessors()
 16453  			return true
 16454  		}
 16455  	case BlockS390XCLIJ:
 16456  		// match: (CLIJ {s390x.LessOrGreater} (LOCGR {d} (MOVDconst [0]) (MOVDconst [x]) cmp) [0] yes no)
 16457  		// cond: int32(x) != 0
 16458  		// result: (BRC {d} cmp yes no)
 16459  		for b.Controls[0].Op == OpS390XLOCGR {
 16460  			v_0 := b.Controls[0]
 16461  			d := auxToS390xCCMask(v_0.Aux)
 16462  			cmp := v_0.Args[2]
 16463  			v_0_0 := v_0.Args[0]
 16464  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != 0 {
 16465  				break
 16466  			}
 16467  			v_0_1 := v_0.Args[1]
 16468  			if v_0_1.Op != OpS390XMOVDconst {
 16469  				break
 16470  			}
 16471  			x := auxIntToInt64(v_0_1.AuxInt)
 16472  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater || !(int32(x) != 0) {
 16473  				break
 16474  			}
 16475  			b.resetWithControl(BlockS390XBRC, cmp)
 16476  			b.Aux = s390xCCMaskToAux(d)
 16477  			return true
 16478  		}
 16479  		// match: (CLIJ {c} (MOVWreg x) [y] yes no)
 16480  		// result: (CLIJ {c} x [y] yes no)
 16481  		for b.Controls[0].Op == OpS390XMOVWreg {
 16482  			v_0 := b.Controls[0]
 16483  			x := v_0.Args[0]
 16484  			y := auxIntToUint8(b.AuxInt)
 16485  			c := auxToS390xCCMask(b.Aux)
 16486  			b.resetWithControl(BlockS390XCLIJ, x)
 16487  			b.AuxInt = uint8ToAuxInt(y)
 16488  			b.Aux = s390xCCMaskToAux(c)
 16489  			return true
 16490  		}
 16491  		// match: (CLIJ {c} (MOVWZreg x) [y] yes no)
 16492  		// result: (CLIJ {c} x [y] yes no)
 16493  		for b.Controls[0].Op == OpS390XMOVWZreg {
 16494  			v_0 := b.Controls[0]
 16495  			x := v_0.Args[0]
 16496  			y := auxIntToUint8(b.AuxInt)
 16497  			c := auxToS390xCCMask(b.Aux)
 16498  			b.resetWithControl(BlockS390XCLIJ, x)
 16499  			b.AuxInt = uint8ToAuxInt(y)
 16500  			b.Aux = s390xCCMaskToAux(c)
 16501  			return true
 16502  		}
 16503  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16504  		// cond: c&s390x.Equal != 0 && uint32(x) == uint32(y)
 16505  		// result: (First yes no)
 16506  		for b.Controls[0].Op == OpS390XMOVDconst {
 16507  			v_0 := b.Controls[0]
 16508  			x := auxIntToInt64(v_0.AuxInt)
 16509  			y := auxIntToUint8(b.AuxInt)
 16510  			c := auxToS390xCCMask(b.Aux)
 16511  			if !(c&s390x.Equal != 0 && uint32(x) == uint32(y)) {
 16512  				break
 16513  			}
 16514  			b.Reset(BlockFirst)
 16515  			return true
 16516  		}
 16517  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16518  		// cond: c&s390x.Less != 0 && uint32(x) < uint32(y)
 16519  		// result: (First yes no)
 16520  		for b.Controls[0].Op == OpS390XMOVDconst {
 16521  			v_0 := b.Controls[0]
 16522  			x := auxIntToInt64(v_0.AuxInt)
 16523  			y := auxIntToUint8(b.AuxInt)
 16524  			c := auxToS390xCCMask(b.Aux)
 16525  			if !(c&s390x.Less != 0 && uint32(x) < uint32(y)) {
 16526  				break
 16527  			}
 16528  			b.Reset(BlockFirst)
 16529  			return true
 16530  		}
 16531  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16532  		// cond: c&s390x.Greater != 0 && uint32(x) > uint32(y)
 16533  		// result: (First yes no)
 16534  		for b.Controls[0].Op == OpS390XMOVDconst {
 16535  			v_0 := b.Controls[0]
 16536  			x := auxIntToInt64(v_0.AuxInt)
 16537  			y := auxIntToUint8(b.AuxInt)
 16538  			c := auxToS390xCCMask(b.Aux)
 16539  			if !(c&s390x.Greater != 0 && uint32(x) > uint32(y)) {
 16540  				break
 16541  			}
 16542  			b.Reset(BlockFirst)
 16543  			return true
 16544  		}
 16545  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16546  		// cond: c&s390x.Equal == 0 && uint32(x) == uint32(y)
 16547  		// result: (First no yes)
 16548  		for b.Controls[0].Op == OpS390XMOVDconst {
 16549  			v_0 := b.Controls[0]
 16550  			x := auxIntToInt64(v_0.AuxInt)
 16551  			y := auxIntToUint8(b.AuxInt)
 16552  			c := auxToS390xCCMask(b.Aux)
 16553  			if !(c&s390x.Equal == 0 && uint32(x) == uint32(y)) {
 16554  				break
 16555  			}
 16556  			b.Reset(BlockFirst)
 16557  			b.swapSuccessors()
 16558  			return true
 16559  		}
 16560  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16561  		// cond: c&s390x.Less == 0 && uint32(x) < uint32(y)
 16562  		// result: (First no yes)
 16563  		for b.Controls[0].Op == OpS390XMOVDconst {
 16564  			v_0 := b.Controls[0]
 16565  			x := auxIntToInt64(v_0.AuxInt)
 16566  			y := auxIntToUint8(b.AuxInt)
 16567  			c := auxToS390xCCMask(b.Aux)
 16568  			if !(c&s390x.Less == 0 && uint32(x) < uint32(y)) {
 16569  				break
 16570  			}
 16571  			b.Reset(BlockFirst)
 16572  			b.swapSuccessors()
 16573  			return true
 16574  		}
 16575  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 16576  		// cond: c&s390x.Greater == 0 && uint32(x) > uint32(y)
 16577  		// result: (First no yes)
 16578  		for b.Controls[0].Op == OpS390XMOVDconst {
 16579  			v_0 := b.Controls[0]
 16580  			x := auxIntToInt64(v_0.AuxInt)
 16581  			y := auxIntToUint8(b.AuxInt)
 16582  			c := auxToS390xCCMask(b.Aux)
 16583  			if !(c&s390x.Greater == 0 && uint32(x) > uint32(y)) {
 16584  				break
 16585  			}
 16586  			b.Reset(BlockFirst)
 16587  			b.swapSuccessors()
 16588  			return true
 16589  		}
 16590  		// match: (CLIJ {s390x.GreaterOrEqual} _ [0] yes no)
 16591  		// result: (First yes no)
 16592  		for {
 16593  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16594  				break
 16595  			}
 16596  			b.Reset(BlockFirst)
 16597  			return true
 16598  		}
 16599  		// match: (CLIJ {s390x.Less} _ [0] yes no)
 16600  		// result: (First no yes)
 16601  		for {
 16602  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
 16603  				break
 16604  			}
 16605  			b.Reset(BlockFirst)
 16606  			b.swapSuccessors()
 16607  			return true
 16608  		}
 16609  	case BlockS390XCLRJ:
 16610  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 16611  		// cond: isU8Bit(y)
 16612  		// result: (CLIJ {c} x [uint8(y)] yes no)
 16613  		for b.Controls[1].Op == OpS390XMOVDconst {
 16614  			x := b.Controls[0]
 16615  			v_1 := b.Controls[1]
 16616  			y := auxIntToInt64(v_1.AuxInt)
 16617  			c := auxToS390xCCMask(b.Aux)
 16618  			if !(isU8Bit(y)) {
 16619  				break
 16620  			}
 16621  			b.resetWithControl(BlockS390XCLIJ, x)
 16622  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16623  			b.Aux = s390xCCMaskToAux(c)
 16624  			return true
 16625  		}
 16626  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 16627  		// cond: isU8Bit(x)
 16628  		// result: (CLIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 16629  		for b.Controls[0].Op == OpS390XMOVDconst {
 16630  			v_0 := b.Controls[0]
 16631  			x := auxIntToInt64(v_0.AuxInt)
 16632  			y := b.Controls[1]
 16633  			c := auxToS390xCCMask(b.Aux)
 16634  			if !(isU8Bit(x)) {
 16635  				break
 16636  			}
 16637  			b.resetWithControl(BlockS390XCLIJ, y)
 16638  			b.AuxInt = uint8ToAuxInt(uint8(x))
 16639  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16640  			return true
 16641  		}
 16642  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 16643  		// cond: !isU8Bit(y) && isU32Bit(y)
 16644  		// result: (BRC {c} (CMPWUconst x [int32(y)]) yes no)
 16645  		for b.Controls[1].Op == OpS390XMOVDconst {
 16646  			x := b.Controls[0]
 16647  			v_1 := b.Controls[1]
 16648  			y := auxIntToInt64(v_1.AuxInt)
 16649  			c := auxToS390xCCMask(b.Aux)
 16650  			if !(!isU8Bit(y) && isU32Bit(y)) {
 16651  				break
 16652  			}
 16653  			v0 := b.NewValue0(x.Pos, OpS390XCMPWUconst, types.TypeFlags)
 16654  			v0.AuxInt = int32ToAuxInt(int32(y))
 16655  			v0.AddArg(x)
 16656  			b.resetWithControl(BlockS390XBRC, v0)
 16657  			b.Aux = s390xCCMaskToAux(c)
 16658  			return true
 16659  		}
 16660  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 16661  		// cond: !isU8Bit(x) && isU32Bit(x)
 16662  		// result: (BRC {c.ReverseComparison()} (CMPWUconst y [int32(x)]) yes no)
 16663  		for b.Controls[0].Op == OpS390XMOVDconst {
 16664  			v_0 := b.Controls[0]
 16665  			x := auxIntToInt64(v_0.AuxInt)
 16666  			y := b.Controls[1]
 16667  			c := auxToS390xCCMask(b.Aux)
 16668  			if !(!isU8Bit(x) && isU32Bit(x)) {
 16669  				break
 16670  			}
 16671  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPWUconst, types.TypeFlags)
 16672  			v0.AuxInt = int32ToAuxInt(int32(x))
 16673  			v0.AddArg(y)
 16674  			b.resetWithControl(BlockS390XBRC, v0)
 16675  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16676  			return true
 16677  		}
 16678  		// match: (CLRJ {c} x y yes no)
 16679  		// cond: x == y && c&s390x.Equal != 0
 16680  		// result: (First yes no)
 16681  		for {
 16682  			x := b.Controls[0]
 16683  			y := b.Controls[1]
 16684  			c := auxToS390xCCMask(b.Aux)
 16685  			if !(x == y && c&s390x.Equal != 0) {
 16686  				break
 16687  			}
 16688  			b.Reset(BlockFirst)
 16689  			return true
 16690  		}
 16691  		// match: (CLRJ {c} x y yes no)
 16692  		// cond: x == y && c&s390x.Equal == 0
 16693  		// result: (First no yes)
 16694  		for {
 16695  			x := b.Controls[0]
 16696  			y := b.Controls[1]
 16697  			c := auxToS390xCCMask(b.Aux)
 16698  			if !(x == y && c&s390x.Equal == 0) {
 16699  				break
 16700  			}
 16701  			b.Reset(BlockFirst)
 16702  			b.swapSuccessors()
 16703  			return true
 16704  		}
 16705  	case BlockS390XCRJ:
 16706  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 16707  		// cond: is8Bit(y)
 16708  		// result: (CIJ {c} x [ int8(y)] yes no)
 16709  		for b.Controls[1].Op == OpS390XMOVDconst {
 16710  			x := b.Controls[0]
 16711  			v_1 := b.Controls[1]
 16712  			y := auxIntToInt64(v_1.AuxInt)
 16713  			c := auxToS390xCCMask(b.Aux)
 16714  			if !(is8Bit(y)) {
 16715  				break
 16716  			}
 16717  			b.resetWithControl(BlockS390XCIJ, x)
 16718  			b.AuxInt = int8ToAuxInt(int8(y))
 16719  			b.Aux = s390xCCMaskToAux(c)
 16720  			return true
 16721  		}
 16722  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 16723  		// cond: is8Bit(x)
 16724  		// result: (CIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 16725  		for b.Controls[0].Op == OpS390XMOVDconst {
 16726  			v_0 := b.Controls[0]
 16727  			x := auxIntToInt64(v_0.AuxInt)
 16728  			y := b.Controls[1]
 16729  			c := auxToS390xCCMask(b.Aux)
 16730  			if !(is8Bit(x)) {
 16731  				break
 16732  			}
 16733  			b.resetWithControl(BlockS390XCIJ, y)
 16734  			b.AuxInt = int8ToAuxInt(int8(x))
 16735  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16736  			return true
 16737  		}
 16738  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 16739  		// cond: !is8Bit(y) && is32Bit(y)
 16740  		// result: (BRC {c} (CMPWconst x [int32(y)]) yes no)
 16741  		for b.Controls[1].Op == OpS390XMOVDconst {
 16742  			x := b.Controls[0]
 16743  			v_1 := b.Controls[1]
 16744  			y := auxIntToInt64(v_1.AuxInt)
 16745  			c := auxToS390xCCMask(b.Aux)
 16746  			if !(!is8Bit(y) && is32Bit(y)) {
 16747  				break
 16748  			}
 16749  			v0 := b.NewValue0(x.Pos, OpS390XCMPWconst, types.TypeFlags)
 16750  			v0.AuxInt = int32ToAuxInt(int32(y))
 16751  			v0.AddArg(x)
 16752  			b.resetWithControl(BlockS390XBRC, v0)
 16753  			b.Aux = s390xCCMaskToAux(c)
 16754  			return true
 16755  		}
 16756  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 16757  		// cond: !is8Bit(x) && is32Bit(x)
 16758  		// result: (BRC {c.ReverseComparison()} (CMPWconst y [int32(x)]) yes no)
 16759  		for b.Controls[0].Op == OpS390XMOVDconst {
 16760  			v_0 := b.Controls[0]
 16761  			x := auxIntToInt64(v_0.AuxInt)
 16762  			y := b.Controls[1]
 16763  			c := auxToS390xCCMask(b.Aux)
 16764  			if !(!is8Bit(x) && is32Bit(x)) {
 16765  				break
 16766  			}
 16767  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPWconst, types.TypeFlags)
 16768  			v0.AuxInt = int32ToAuxInt(int32(x))
 16769  			v0.AddArg(y)
 16770  			b.resetWithControl(BlockS390XBRC, v0)
 16771  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16772  			return true
 16773  		}
 16774  		// match: (CRJ {c} x y yes no)
 16775  		// cond: x == y && c&s390x.Equal != 0
 16776  		// result: (First yes no)
 16777  		for {
 16778  			x := b.Controls[0]
 16779  			y := b.Controls[1]
 16780  			c := auxToS390xCCMask(b.Aux)
 16781  			if !(x == y && c&s390x.Equal != 0) {
 16782  				break
 16783  			}
 16784  			b.Reset(BlockFirst)
 16785  			return true
 16786  		}
 16787  		// match: (CRJ {c} x y yes no)
 16788  		// cond: x == y && c&s390x.Equal == 0
 16789  		// result: (First no yes)
 16790  		for {
 16791  			x := b.Controls[0]
 16792  			y := b.Controls[1]
 16793  			c := auxToS390xCCMask(b.Aux)
 16794  			if !(x == y && c&s390x.Equal == 0) {
 16795  				break
 16796  			}
 16797  			b.Reset(BlockFirst)
 16798  			b.swapSuccessors()
 16799  			return true
 16800  		}
 16801  	case BlockIf:
 16802  		// match: (If cond yes no)
 16803  		// result: (CLIJ {s390x.LessOrGreater} (MOVBZreg <typ.Bool> cond) [0] yes no)
 16804  		for {
 16805  			cond := b.Controls[0]
 16806  			v0 := b.NewValue0(cond.Pos, OpS390XMOVBZreg, typ.Bool)
 16807  			v0.AddArg(cond)
 16808  			b.resetWithControl(BlockS390XCLIJ, v0)
 16809  			b.AuxInt = uint8ToAuxInt(0)
 16810  			b.Aux = s390xCCMaskToAux(s390x.LessOrGreater)
 16811  			return true
 16812  		}
 16813  	}
 16814  	return false
 16815  }
 16816  

View as plain text