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

     1  // Code generated from gen/S390X.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "math"
     7  import "cmd/compile/internal/types"
     8  import "cmd/internal/obj/s390x"
     9  
    10  func rewriteValueS390X(v *Value) bool {
    11  	switch v.Op {
    12  	case OpAdd16:
    13  		v.Op = OpS390XADDW
    14  		return true
    15  	case OpAdd32:
    16  		v.Op = OpS390XADDW
    17  		return true
    18  	case OpAdd32F:
    19  		return rewriteValueS390X_OpAdd32F(v)
    20  	case OpAdd64:
    21  		v.Op = OpS390XADD
    22  		return true
    23  	case OpAdd64F:
    24  		return rewriteValueS390X_OpAdd64F(v)
    25  	case OpAdd8:
    26  		v.Op = OpS390XADDW
    27  		return true
    28  	case OpAddPtr:
    29  		v.Op = OpS390XADD
    30  		return true
    31  	case OpAddr:
    32  		return rewriteValueS390X_OpAddr(v)
    33  	case OpAnd16:
    34  		v.Op = OpS390XANDW
    35  		return true
    36  	case OpAnd32:
    37  		v.Op = OpS390XANDW
    38  		return true
    39  	case OpAnd64:
    40  		v.Op = OpS390XAND
    41  		return true
    42  	case OpAnd8:
    43  		v.Op = OpS390XANDW
    44  		return true
    45  	case OpAndB:
    46  		v.Op = OpS390XANDW
    47  		return true
    48  	case OpAtomicAdd32:
    49  		return rewriteValueS390X_OpAtomicAdd32(v)
    50  	case OpAtomicAdd64:
    51  		return rewriteValueS390X_OpAtomicAdd64(v)
    52  	case OpAtomicAnd32:
    53  		v.Op = OpS390XLAN
    54  		return true
    55  	case OpAtomicAnd8:
    56  		return rewriteValueS390X_OpAtomicAnd8(v)
    57  	case OpAtomicCompareAndSwap32:
    58  		return rewriteValueS390X_OpAtomicCompareAndSwap32(v)
    59  	case OpAtomicCompareAndSwap64:
    60  		return rewriteValueS390X_OpAtomicCompareAndSwap64(v)
    61  	case OpAtomicExchange32:
    62  		return rewriteValueS390X_OpAtomicExchange32(v)
    63  	case OpAtomicExchange64:
    64  		return rewriteValueS390X_OpAtomicExchange64(v)
    65  	case OpAtomicLoad32:
    66  		return rewriteValueS390X_OpAtomicLoad32(v)
    67  	case OpAtomicLoad64:
    68  		return rewriteValueS390X_OpAtomicLoad64(v)
    69  	case OpAtomicLoad8:
    70  		return rewriteValueS390X_OpAtomicLoad8(v)
    71  	case OpAtomicLoadAcq32:
    72  		return rewriteValueS390X_OpAtomicLoadAcq32(v)
    73  	case OpAtomicLoadPtr:
    74  		return rewriteValueS390X_OpAtomicLoadPtr(v)
    75  	case OpAtomicOr32:
    76  		v.Op = OpS390XLAO
    77  		return true
    78  	case OpAtomicOr8:
    79  		return rewriteValueS390X_OpAtomicOr8(v)
    80  	case OpAtomicStore32:
    81  		return rewriteValueS390X_OpAtomicStore32(v)
    82  	case OpAtomicStore64:
    83  		return rewriteValueS390X_OpAtomicStore64(v)
    84  	case OpAtomicStore8:
    85  		return rewriteValueS390X_OpAtomicStore8(v)
    86  	case OpAtomicStorePtrNoWB:
    87  		return rewriteValueS390X_OpAtomicStorePtrNoWB(v)
    88  	case OpAtomicStoreRel32:
    89  		return rewriteValueS390X_OpAtomicStoreRel32(v)
    90  	case OpAvg64u:
    91  		return rewriteValueS390X_OpAvg64u(v)
    92  	case OpBitLen64:
    93  		return rewriteValueS390X_OpBitLen64(v)
    94  	case OpBswap32:
    95  		v.Op = OpS390XMOVWBR
    96  		return true
    97  	case OpBswap64:
    98  		v.Op = OpS390XMOVDBR
    99  		return true
   100  	case OpCeil:
   101  		return rewriteValueS390X_OpCeil(v)
   102  	case OpClosureCall:
   103  		v.Op = OpS390XCALLclosure
   104  		return true
   105  	case OpCom16:
   106  		v.Op = OpS390XNOTW
   107  		return true
   108  	case OpCom32:
   109  		v.Op = OpS390XNOTW
   110  		return true
   111  	case OpCom64:
   112  		v.Op = OpS390XNOT
   113  		return true
   114  	case OpCom8:
   115  		v.Op = OpS390XNOTW
   116  		return true
   117  	case OpConst16:
   118  		return rewriteValueS390X_OpConst16(v)
   119  	case OpConst32:
   120  		return rewriteValueS390X_OpConst32(v)
   121  	case OpConst32F:
   122  		v.Op = OpS390XFMOVSconst
   123  		return true
   124  	case OpConst64:
   125  		return rewriteValueS390X_OpConst64(v)
   126  	case OpConst64F:
   127  		v.Op = OpS390XFMOVDconst
   128  		return true
   129  	case OpConst8:
   130  		return rewriteValueS390X_OpConst8(v)
   131  	case OpConstBool:
   132  		return rewriteValueS390X_OpConstBool(v)
   133  	case OpConstNil:
   134  		return rewriteValueS390X_OpConstNil(v)
   135  	case OpCtz32:
   136  		return rewriteValueS390X_OpCtz32(v)
   137  	case OpCtz32NonZero:
   138  		v.Op = OpCtz32
   139  		return true
   140  	case OpCtz64:
   141  		return rewriteValueS390X_OpCtz64(v)
   142  	case OpCtz64NonZero:
   143  		v.Op = OpCtz64
   144  		return true
   145  	case OpCvt32Fto32:
   146  		v.Op = OpS390XCFEBRA
   147  		return true
   148  	case OpCvt32Fto32U:
   149  		v.Op = OpS390XCLFEBR
   150  		return true
   151  	case OpCvt32Fto64:
   152  		v.Op = OpS390XCGEBRA
   153  		return true
   154  	case OpCvt32Fto64F:
   155  		v.Op = OpS390XLDEBR
   156  		return true
   157  	case OpCvt32Fto64U:
   158  		v.Op = OpS390XCLGEBR
   159  		return true
   160  	case OpCvt32Uto32F:
   161  		v.Op = OpS390XCELFBR
   162  		return true
   163  	case OpCvt32Uto64F:
   164  		v.Op = OpS390XCDLFBR
   165  		return true
   166  	case OpCvt32to32F:
   167  		v.Op = OpS390XCEFBRA
   168  		return true
   169  	case OpCvt32to64F:
   170  		v.Op = OpS390XCDFBRA
   171  		return true
   172  	case OpCvt64Fto32:
   173  		v.Op = OpS390XCFDBRA
   174  		return true
   175  	case OpCvt64Fto32F:
   176  		v.Op = OpS390XLEDBR
   177  		return true
   178  	case OpCvt64Fto32U:
   179  		v.Op = OpS390XCLFDBR
   180  		return true
   181  	case OpCvt64Fto64:
   182  		v.Op = OpS390XCGDBRA
   183  		return true
   184  	case OpCvt64Fto64U:
   185  		v.Op = OpS390XCLGDBR
   186  		return true
   187  	case OpCvt64Uto32F:
   188  		v.Op = OpS390XCELGBR
   189  		return true
   190  	case OpCvt64Uto64F:
   191  		v.Op = OpS390XCDLGBR
   192  		return true
   193  	case OpCvt64to32F:
   194  		v.Op = OpS390XCEGBRA
   195  		return true
   196  	case OpCvt64to64F:
   197  		v.Op = OpS390XCDGBRA
   198  		return true
   199  	case OpCvtBoolToUint8:
   200  		v.Op = OpCopy
   201  		return true
   202  	case OpDiv16:
   203  		return rewriteValueS390X_OpDiv16(v)
   204  	case OpDiv16u:
   205  		return rewriteValueS390X_OpDiv16u(v)
   206  	case OpDiv32:
   207  		return rewriteValueS390X_OpDiv32(v)
   208  	case OpDiv32F:
   209  		v.Op = OpS390XFDIVS
   210  		return true
   211  	case OpDiv32u:
   212  		return rewriteValueS390X_OpDiv32u(v)
   213  	case OpDiv64:
   214  		return rewriteValueS390X_OpDiv64(v)
   215  	case OpDiv64F:
   216  		v.Op = OpS390XFDIV
   217  		return true
   218  	case OpDiv64u:
   219  		v.Op = OpS390XDIVDU
   220  		return true
   221  	case OpDiv8:
   222  		return rewriteValueS390X_OpDiv8(v)
   223  	case OpDiv8u:
   224  		return rewriteValueS390X_OpDiv8u(v)
   225  	case OpEq16:
   226  		return rewriteValueS390X_OpEq16(v)
   227  	case OpEq32:
   228  		return rewriteValueS390X_OpEq32(v)
   229  	case OpEq32F:
   230  		return rewriteValueS390X_OpEq32F(v)
   231  	case OpEq64:
   232  		return rewriteValueS390X_OpEq64(v)
   233  	case OpEq64F:
   234  		return rewriteValueS390X_OpEq64F(v)
   235  	case OpEq8:
   236  		return rewriteValueS390X_OpEq8(v)
   237  	case OpEqB:
   238  		return rewriteValueS390X_OpEqB(v)
   239  	case OpEqPtr:
   240  		return rewriteValueS390X_OpEqPtr(v)
   241  	case OpFMA:
   242  		return rewriteValueS390X_OpFMA(v)
   243  	case OpFloor:
   244  		return rewriteValueS390X_OpFloor(v)
   245  	case OpGetCallerPC:
   246  		v.Op = OpS390XLoweredGetCallerPC
   247  		return true
   248  	case OpGetCallerSP:
   249  		v.Op = OpS390XLoweredGetCallerSP
   250  		return true
   251  	case OpGetClosurePtr:
   252  		v.Op = OpS390XLoweredGetClosurePtr
   253  		return true
   254  	case OpGetG:
   255  		v.Op = OpS390XLoweredGetG
   256  		return true
   257  	case OpHmul32:
   258  		return rewriteValueS390X_OpHmul32(v)
   259  	case OpHmul32u:
   260  		return rewriteValueS390X_OpHmul32u(v)
   261  	case OpHmul64:
   262  		v.Op = OpS390XMULHD
   263  		return true
   264  	case OpHmul64u:
   265  		v.Op = OpS390XMULHDU
   266  		return true
   267  	case OpITab:
   268  		return rewriteValueS390X_OpITab(v)
   269  	case OpInterCall:
   270  		v.Op = OpS390XCALLinter
   271  		return true
   272  	case OpIsInBounds:
   273  		return rewriteValueS390X_OpIsInBounds(v)
   274  	case OpIsNonNil:
   275  		return rewriteValueS390X_OpIsNonNil(v)
   276  	case OpIsSliceInBounds:
   277  		return rewriteValueS390X_OpIsSliceInBounds(v)
   278  	case OpLeq16:
   279  		return rewriteValueS390X_OpLeq16(v)
   280  	case OpLeq16U:
   281  		return rewriteValueS390X_OpLeq16U(v)
   282  	case OpLeq32:
   283  		return rewriteValueS390X_OpLeq32(v)
   284  	case OpLeq32F:
   285  		return rewriteValueS390X_OpLeq32F(v)
   286  	case OpLeq32U:
   287  		return rewriteValueS390X_OpLeq32U(v)
   288  	case OpLeq64:
   289  		return rewriteValueS390X_OpLeq64(v)
   290  	case OpLeq64F:
   291  		return rewriteValueS390X_OpLeq64F(v)
   292  	case OpLeq64U:
   293  		return rewriteValueS390X_OpLeq64U(v)
   294  	case OpLeq8:
   295  		return rewriteValueS390X_OpLeq8(v)
   296  	case OpLeq8U:
   297  		return rewriteValueS390X_OpLeq8U(v)
   298  	case OpLess16:
   299  		return rewriteValueS390X_OpLess16(v)
   300  	case OpLess16U:
   301  		return rewriteValueS390X_OpLess16U(v)
   302  	case OpLess32:
   303  		return rewriteValueS390X_OpLess32(v)
   304  	case OpLess32F:
   305  		return rewriteValueS390X_OpLess32F(v)
   306  	case OpLess32U:
   307  		return rewriteValueS390X_OpLess32U(v)
   308  	case OpLess64:
   309  		return rewriteValueS390X_OpLess64(v)
   310  	case OpLess64F:
   311  		return rewriteValueS390X_OpLess64F(v)
   312  	case OpLess64U:
   313  		return rewriteValueS390X_OpLess64U(v)
   314  	case OpLess8:
   315  		return rewriteValueS390X_OpLess8(v)
   316  	case OpLess8U:
   317  		return rewriteValueS390X_OpLess8U(v)
   318  	case OpLoad:
   319  		return rewriteValueS390X_OpLoad(v)
   320  	case OpLocalAddr:
   321  		return rewriteValueS390X_OpLocalAddr(v)
   322  	case OpLsh16x16:
   323  		return rewriteValueS390X_OpLsh16x16(v)
   324  	case OpLsh16x32:
   325  		return rewriteValueS390X_OpLsh16x32(v)
   326  	case OpLsh16x64:
   327  		return rewriteValueS390X_OpLsh16x64(v)
   328  	case OpLsh16x8:
   329  		return rewriteValueS390X_OpLsh16x8(v)
   330  	case OpLsh32x16:
   331  		return rewriteValueS390X_OpLsh32x16(v)
   332  	case OpLsh32x32:
   333  		return rewriteValueS390X_OpLsh32x32(v)
   334  	case OpLsh32x64:
   335  		return rewriteValueS390X_OpLsh32x64(v)
   336  	case OpLsh32x8:
   337  		return rewriteValueS390X_OpLsh32x8(v)
   338  	case OpLsh64x16:
   339  		return rewriteValueS390X_OpLsh64x16(v)
   340  	case OpLsh64x32:
   341  		return rewriteValueS390X_OpLsh64x32(v)
   342  	case OpLsh64x64:
   343  		return rewriteValueS390X_OpLsh64x64(v)
   344  	case OpLsh64x8:
   345  		return rewriteValueS390X_OpLsh64x8(v)
   346  	case OpLsh8x16:
   347  		return rewriteValueS390X_OpLsh8x16(v)
   348  	case OpLsh8x32:
   349  		return rewriteValueS390X_OpLsh8x32(v)
   350  	case OpLsh8x64:
   351  		return rewriteValueS390X_OpLsh8x64(v)
   352  	case OpLsh8x8:
   353  		return rewriteValueS390X_OpLsh8x8(v)
   354  	case OpMod16:
   355  		return rewriteValueS390X_OpMod16(v)
   356  	case OpMod16u:
   357  		return rewriteValueS390X_OpMod16u(v)
   358  	case OpMod32:
   359  		return rewriteValueS390X_OpMod32(v)
   360  	case OpMod32u:
   361  		return rewriteValueS390X_OpMod32u(v)
   362  	case OpMod64:
   363  		return rewriteValueS390X_OpMod64(v)
   364  	case OpMod64u:
   365  		v.Op = OpS390XMODDU
   366  		return true
   367  	case OpMod8:
   368  		return rewriteValueS390X_OpMod8(v)
   369  	case OpMod8u:
   370  		return rewriteValueS390X_OpMod8u(v)
   371  	case OpMove:
   372  		return rewriteValueS390X_OpMove(v)
   373  	case OpMul16:
   374  		v.Op = OpS390XMULLW
   375  		return true
   376  	case OpMul32:
   377  		v.Op = OpS390XMULLW
   378  		return true
   379  	case OpMul32F:
   380  		v.Op = OpS390XFMULS
   381  		return true
   382  	case OpMul64:
   383  		v.Op = OpS390XMULLD
   384  		return true
   385  	case OpMul64F:
   386  		v.Op = OpS390XFMUL
   387  		return true
   388  	case OpMul64uhilo:
   389  		v.Op = OpS390XMLGR
   390  		return true
   391  	case OpMul8:
   392  		v.Op = OpS390XMULLW
   393  		return true
   394  	case OpNeg16:
   395  		v.Op = OpS390XNEGW
   396  		return true
   397  	case OpNeg32:
   398  		v.Op = OpS390XNEGW
   399  		return true
   400  	case OpNeg32F:
   401  		v.Op = OpS390XFNEGS
   402  		return true
   403  	case OpNeg64:
   404  		v.Op = OpS390XNEG
   405  		return true
   406  	case OpNeg64F:
   407  		v.Op = OpS390XFNEG
   408  		return true
   409  	case OpNeg8:
   410  		v.Op = OpS390XNEGW
   411  		return true
   412  	case OpNeq16:
   413  		return rewriteValueS390X_OpNeq16(v)
   414  	case OpNeq32:
   415  		return rewriteValueS390X_OpNeq32(v)
   416  	case OpNeq32F:
   417  		return rewriteValueS390X_OpNeq32F(v)
   418  	case OpNeq64:
   419  		return rewriteValueS390X_OpNeq64(v)
   420  	case OpNeq64F:
   421  		return rewriteValueS390X_OpNeq64F(v)
   422  	case OpNeq8:
   423  		return rewriteValueS390X_OpNeq8(v)
   424  	case OpNeqB:
   425  		return rewriteValueS390X_OpNeqB(v)
   426  	case OpNeqPtr:
   427  		return rewriteValueS390X_OpNeqPtr(v)
   428  	case OpNilCheck:
   429  		v.Op = OpS390XLoweredNilCheck
   430  		return true
   431  	case OpNot:
   432  		return rewriteValueS390X_OpNot(v)
   433  	case OpOffPtr:
   434  		return rewriteValueS390X_OpOffPtr(v)
   435  	case OpOr16:
   436  		v.Op = OpS390XORW
   437  		return true
   438  	case OpOr32:
   439  		v.Op = OpS390XORW
   440  		return true
   441  	case OpOr64:
   442  		v.Op = OpS390XOR
   443  		return true
   444  	case OpOr8:
   445  		v.Op = OpS390XORW
   446  		return true
   447  	case OpOrB:
   448  		v.Op = OpS390XORW
   449  		return true
   450  	case OpPanicBounds:
   451  		return rewriteValueS390X_OpPanicBounds(v)
   452  	case OpPopCount16:
   453  		return rewriteValueS390X_OpPopCount16(v)
   454  	case OpPopCount32:
   455  		return rewriteValueS390X_OpPopCount32(v)
   456  	case OpPopCount64:
   457  		return rewriteValueS390X_OpPopCount64(v)
   458  	case OpPopCount8:
   459  		return rewriteValueS390X_OpPopCount8(v)
   460  	case OpRotateLeft16:
   461  		return rewriteValueS390X_OpRotateLeft16(v)
   462  	case OpRotateLeft32:
   463  		v.Op = OpS390XRLL
   464  		return true
   465  	case OpRotateLeft64:
   466  		v.Op = OpS390XRLLG
   467  		return true
   468  	case OpRotateLeft8:
   469  		return rewriteValueS390X_OpRotateLeft8(v)
   470  	case OpRound:
   471  		return rewriteValueS390X_OpRound(v)
   472  	case OpRound32F:
   473  		v.Op = OpS390XLoweredRound32F
   474  		return true
   475  	case OpRound64F:
   476  		v.Op = OpS390XLoweredRound64F
   477  		return true
   478  	case OpRoundToEven:
   479  		return rewriteValueS390X_OpRoundToEven(v)
   480  	case OpRsh16Ux16:
   481  		return rewriteValueS390X_OpRsh16Ux16(v)
   482  	case OpRsh16Ux32:
   483  		return rewriteValueS390X_OpRsh16Ux32(v)
   484  	case OpRsh16Ux64:
   485  		return rewriteValueS390X_OpRsh16Ux64(v)
   486  	case OpRsh16Ux8:
   487  		return rewriteValueS390X_OpRsh16Ux8(v)
   488  	case OpRsh16x16:
   489  		return rewriteValueS390X_OpRsh16x16(v)
   490  	case OpRsh16x32:
   491  		return rewriteValueS390X_OpRsh16x32(v)
   492  	case OpRsh16x64:
   493  		return rewriteValueS390X_OpRsh16x64(v)
   494  	case OpRsh16x8:
   495  		return rewriteValueS390X_OpRsh16x8(v)
   496  	case OpRsh32Ux16:
   497  		return rewriteValueS390X_OpRsh32Ux16(v)
   498  	case OpRsh32Ux32:
   499  		return rewriteValueS390X_OpRsh32Ux32(v)
   500  	case OpRsh32Ux64:
   501  		return rewriteValueS390X_OpRsh32Ux64(v)
   502  	case OpRsh32Ux8:
   503  		return rewriteValueS390X_OpRsh32Ux8(v)
   504  	case OpRsh32x16:
   505  		return rewriteValueS390X_OpRsh32x16(v)
   506  	case OpRsh32x32:
   507  		return rewriteValueS390X_OpRsh32x32(v)
   508  	case OpRsh32x64:
   509  		return rewriteValueS390X_OpRsh32x64(v)
   510  	case OpRsh32x8:
   511  		return rewriteValueS390X_OpRsh32x8(v)
   512  	case OpRsh64Ux16:
   513  		return rewriteValueS390X_OpRsh64Ux16(v)
   514  	case OpRsh64Ux32:
   515  		return rewriteValueS390X_OpRsh64Ux32(v)
   516  	case OpRsh64Ux64:
   517  		return rewriteValueS390X_OpRsh64Ux64(v)
   518  	case OpRsh64Ux8:
   519  		return rewriteValueS390X_OpRsh64Ux8(v)
   520  	case OpRsh64x16:
   521  		return rewriteValueS390X_OpRsh64x16(v)
   522  	case OpRsh64x32:
   523  		return rewriteValueS390X_OpRsh64x32(v)
   524  	case OpRsh64x64:
   525  		return rewriteValueS390X_OpRsh64x64(v)
   526  	case OpRsh64x8:
   527  		return rewriteValueS390X_OpRsh64x8(v)
   528  	case OpRsh8Ux16:
   529  		return rewriteValueS390X_OpRsh8Ux16(v)
   530  	case OpRsh8Ux32:
   531  		return rewriteValueS390X_OpRsh8Ux32(v)
   532  	case OpRsh8Ux64:
   533  		return rewriteValueS390X_OpRsh8Ux64(v)
   534  	case OpRsh8Ux8:
   535  		return rewriteValueS390X_OpRsh8Ux8(v)
   536  	case OpRsh8x16:
   537  		return rewriteValueS390X_OpRsh8x16(v)
   538  	case OpRsh8x32:
   539  		return rewriteValueS390X_OpRsh8x32(v)
   540  	case OpRsh8x64:
   541  		return rewriteValueS390X_OpRsh8x64(v)
   542  	case OpRsh8x8:
   543  		return rewriteValueS390X_OpRsh8x8(v)
   544  	case OpS390XADD:
   545  		return rewriteValueS390X_OpS390XADD(v)
   546  	case OpS390XADDC:
   547  		return rewriteValueS390X_OpS390XADDC(v)
   548  	case OpS390XADDE:
   549  		return rewriteValueS390X_OpS390XADDE(v)
   550  	case OpS390XADDW:
   551  		return rewriteValueS390X_OpS390XADDW(v)
   552  	case OpS390XADDWconst:
   553  		return rewriteValueS390X_OpS390XADDWconst(v)
   554  	case OpS390XADDWload:
   555  		return rewriteValueS390X_OpS390XADDWload(v)
   556  	case OpS390XADDconst:
   557  		return rewriteValueS390X_OpS390XADDconst(v)
   558  	case OpS390XADDload:
   559  		return rewriteValueS390X_OpS390XADDload(v)
   560  	case OpS390XAND:
   561  		return rewriteValueS390X_OpS390XAND(v)
   562  	case OpS390XANDW:
   563  		return rewriteValueS390X_OpS390XANDW(v)
   564  	case OpS390XANDWconst:
   565  		return rewriteValueS390X_OpS390XANDWconst(v)
   566  	case OpS390XANDWload:
   567  		return rewriteValueS390X_OpS390XANDWload(v)
   568  	case OpS390XANDconst:
   569  		return rewriteValueS390X_OpS390XANDconst(v)
   570  	case OpS390XANDload:
   571  		return rewriteValueS390X_OpS390XANDload(v)
   572  	case OpS390XCMP:
   573  		return rewriteValueS390X_OpS390XCMP(v)
   574  	case OpS390XCMPU:
   575  		return rewriteValueS390X_OpS390XCMPU(v)
   576  	case OpS390XCMPUconst:
   577  		return rewriteValueS390X_OpS390XCMPUconst(v)
   578  	case OpS390XCMPW:
   579  		return rewriteValueS390X_OpS390XCMPW(v)
   580  	case OpS390XCMPWU:
   581  		return rewriteValueS390X_OpS390XCMPWU(v)
   582  	case OpS390XCMPWUconst:
   583  		return rewriteValueS390X_OpS390XCMPWUconst(v)
   584  	case OpS390XCMPWconst:
   585  		return rewriteValueS390X_OpS390XCMPWconst(v)
   586  	case OpS390XCMPconst:
   587  		return rewriteValueS390X_OpS390XCMPconst(v)
   588  	case OpS390XCPSDR:
   589  		return rewriteValueS390X_OpS390XCPSDR(v)
   590  	case OpS390XFCMP:
   591  		return rewriteValueS390X_OpS390XFCMP(v)
   592  	case OpS390XFCMPS:
   593  		return rewriteValueS390X_OpS390XFCMPS(v)
   594  	case OpS390XFMOVDload:
   595  		return rewriteValueS390X_OpS390XFMOVDload(v)
   596  	case OpS390XFMOVDstore:
   597  		return rewriteValueS390X_OpS390XFMOVDstore(v)
   598  	case OpS390XFMOVSload:
   599  		return rewriteValueS390X_OpS390XFMOVSload(v)
   600  	case OpS390XFMOVSstore:
   601  		return rewriteValueS390X_OpS390XFMOVSstore(v)
   602  	case OpS390XFNEG:
   603  		return rewriteValueS390X_OpS390XFNEG(v)
   604  	case OpS390XFNEGS:
   605  		return rewriteValueS390X_OpS390XFNEGS(v)
   606  	case OpS390XLDGR:
   607  		return rewriteValueS390X_OpS390XLDGR(v)
   608  	case OpS390XLEDBR:
   609  		return rewriteValueS390X_OpS390XLEDBR(v)
   610  	case OpS390XLGDR:
   611  		return rewriteValueS390X_OpS390XLGDR(v)
   612  	case OpS390XLOCGR:
   613  		return rewriteValueS390X_OpS390XLOCGR(v)
   614  	case OpS390XLTDBR:
   615  		return rewriteValueS390X_OpS390XLTDBR(v)
   616  	case OpS390XLTEBR:
   617  		return rewriteValueS390X_OpS390XLTEBR(v)
   618  	case OpS390XLoweredRound32F:
   619  		return rewriteValueS390X_OpS390XLoweredRound32F(v)
   620  	case OpS390XLoweredRound64F:
   621  		return rewriteValueS390X_OpS390XLoweredRound64F(v)
   622  	case OpS390XMOVBZload:
   623  		return rewriteValueS390X_OpS390XMOVBZload(v)
   624  	case OpS390XMOVBZreg:
   625  		return rewriteValueS390X_OpS390XMOVBZreg(v)
   626  	case OpS390XMOVBload:
   627  		return rewriteValueS390X_OpS390XMOVBload(v)
   628  	case OpS390XMOVBreg:
   629  		return rewriteValueS390X_OpS390XMOVBreg(v)
   630  	case OpS390XMOVBstore:
   631  		return rewriteValueS390X_OpS390XMOVBstore(v)
   632  	case OpS390XMOVBstoreconst:
   633  		return rewriteValueS390X_OpS390XMOVBstoreconst(v)
   634  	case OpS390XMOVDaddridx:
   635  		return rewriteValueS390X_OpS390XMOVDaddridx(v)
   636  	case OpS390XMOVDload:
   637  		return rewriteValueS390X_OpS390XMOVDload(v)
   638  	case OpS390XMOVDstore:
   639  		return rewriteValueS390X_OpS390XMOVDstore(v)
   640  	case OpS390XMOVDstoreconst:
   641  		return rewriteValueS390X_OpS390XMOVDstoreconst(v)
   642  	case OpS390XMOVHBRstore:
   643  		return rewriteValueS390X_OpS390XMOVHBRstore(v)
   644  	case OpS390XMOVHZload:
   645  		return rewriteValueS390X_OpS390XMOVHZload(v)
   646  	case OpS390XMOVHZreg:
   647  		return rewriteValueS390X_OpS390XMOVHZreg(v)
   648  	case OpS390XMOVHload:
   649  		return rewriteValueS390X_OpS390XMOVHload(v)
   650  	case OpS390XMOVHreg:
   651  		return rewriteValueS390X_OpS390XMOVHreg(v)
   652  	case OpS390XMOVHstore:
   653  		return rewriteValueS390X_OpS390XMOVHstore(v)
   654  	case OpS390XMOVHstoreconst:
   655  		return rewriteValueS390X_OpS390XMOVHstoreconst(v)
   656  	case OpS390XMOVWBRstore:
   657  		return rewriteValueS390X_OpS390XMOVWBRstore(v)
   658  	case OpS390XMOVWZload:
   659  		return rewriteValueS390X_OpS390XMOVWZload(v)
   660  	case OpS390XMOVWZreg:
   661  		return rewriteValueS390X_OpS390XMOVWZreg(v)
   662  	case OpS390XMOVWload:
   663  		return rewriteValueS390X_OpS390XMOVWload(v)
   664  	case OpS390XMOVWreg:
   665  		return rewriteValueS390X_OpS390XMOVWreg(v)
   666  	case OpS390XMOVWstore:
   667  		return rewriteValueS390X_OpS390XMOVWstore(v)
   668  	case OpS390XMOVWstoreconst:
   669  		return rewriteValueS390X_OpS390XMOVWstoreconst(v)
   670  	case OpS390XMULLD:
   671  		return rewriteValueS390X_OpS390XMULLD(v)
   672  	case OpS390XMULLDconst:
   673  		return rewriteValueS390X_OpS390XMULLDconst(v)
   674  	case OpS390XMULLDload:
   675  		return rewriteValueS390X_OpS390XMULLDload(v)
   676  	case OpS390XMULLW:
   677  		return rewriteValueS390X_OpS390XMULLW(v)
   678  	case OpS390XMULLWconst:
   679  		return rewriteValueS390X_OpS390XMULLWconst(v)
   680  	case OpS390XMULLWload:
   681  		return rewriteValueS390X_OpS390XMULLWload(v)
   682  	case OpS390XNEG:
   683  		return rewriteValueS390X_OpS390XNEG(v)
   684  	case OpS390XNEGW:
   685  		return rewriteValueS390X_OpS390XNEGW(v)
   686  	case OpS390XNOT:
   687  		return rewriteValueS390X_OpS390XNOT(v)
   688  	case OpS390XNOTW:
   689  		return rewriteValueS390X_OpS390XNOTW(v)
   690  	case OpS390XOR:
   691  		return rewriteValueS390X_OpS390XOR(v)
   692  	case OpS390XORW:
   693  		return rewriteValueS390X_OpS390XORW(v)
   694  	case OpS390XORWconst:
   695  		return rewriteValueS390X_OpS390XORWconst(v)
   696  	case OpS390XORWload:
   697  		return rewriteValueS390X_OpS390XORWload(v)
   698  	case OpS390XORconst:
   699  		return rewriteValueS390X_OpS390XORconst(v)
   700  	case OpS390XORload:
   701  		return rewriteValueS390X_OpS390XORload(v)
   702  	case OpS390XRISBGZ:
   703  		return rewriteValueS390X_OpS390XRISBGZ(v)
   704  	case OpS390XRLL:
   705  		return rewriteValueS390X_OpS390XRLL(v)
   706  	case OpS390XRLLG:
   707  		return rewriteValueS390X_OpS390XRLLG(v)
   708  	case OpS390XSLD:
   709  		return rewriteValueS390X_OpS390XSLD(v)
   710  	case OpS390XSLDconst:
   711  		return rewriteValueS390X_OpS390XSLDconst(v)
   712  	case OpS390XSLW:
   713  		return rewriteValueS390X_OpS390XSLW(v)
   714  	case OpS390XSLWconst:
   715  		return rewriteValueS390X_OpS390XSLWconst(v)
   716  	case OpS390XSRAD:
   717  		return rewriteValueS390X_OpS390XSRAD(v)
   718  	case OpS390XSRADconst:
   719  		return rewriteValueS390X_OpS390XSRADconst(v)
   720  	case OpS390XSRAW:
   721  		return rewriteValueS390X_OpS390XSRAW(v)
   722  	case OpS390XSRAWconst:
   723  		return rewriteValueS390X_OpS390XSRAWconst(v)
   724  	case OpS390XSRD:
   725  		return rewriteValueS390X_OpS390XSRD(v)
   726  	case OpS390XSRDconst:
   727  		return rewriteValueS390X_OpS390XSRDconst(v)
   728  	case OpS390XSRW:
   729  		return rewriteValueS390X_OpS390XSRW(v)
   730  	case OpS390XSRWconst:
   731  		return rewriteValueS390X_OpS390XSRWconst(v)
   732  	case OpS390XSTM2:
   733  		return rewriteValueS390X_OpS390XSTM2(v)
   734  	case OpS390XSTMG2:
   735  		return rewriteValueS390X_OpS390XSTMG2(v)
   736  	case OpS390XSUB:
   737  		return rewriteValueS390X_OpS390XSUB(v)
   738  	case OpS390XSUBE:
   739  		return rewriteValueS390X_OpS390XSUBE(v)
   740  	case OpS390XSUBW:
   741  		return rewriteValueS390X_OpS390XSUBW(v)
   742  	case OpS390XSUBWconst:
   743  		return rewriteValueS390X_OpS390XSUBWconst(v)
   744  	case OpS390XSUBWload:
   745  		return rewriteValueS390X_OpS390XSUBWload(v)
   746  	case OpS390XSUBconst:
   747  		return rewriteValueS390X_OpS390XSUBconst(v)
   748  	case OpS390XSUBload:
   749  		return rewriteValueS390X_OpS390XSUBload(v)
   750  	case OpS390XSumBytes2:
   751  		return rewriteValueS390X_OpS390XSumBytes2(v)
   752  	case OpS390XSumBytes4:
   753  		return rewriteValueS390X_OpS390XSumBytes4(v)
   754  	case OpS390XSumBytes8:
   755  		return rewriteValueS390X_OpS390XSumBytes8(v)
   756  	case OpS390XXOR:
   757  		return rewriteValueS390X_OpS390XXOR(v)
   758  	case OpS390XXORW:
   759  		return rewriteValueS390X_OpS390XXORW(v)
   760  	case OpS390XXORWconst:
   761  		return rewriteValueS390X_OpS390XXORWconst(v)
   762  	case OpS390XXORWload:
   763  		return rewriteValueS390X_OpS390XXORWload(v)
   764  	case OpS390XXORconst:
   765  		return rewriteValueS390X_OpS390XXORconst(v)
   766  	case OpS390XXORload:
   767  		return rewriteValueS390X_OpS390XXORload(v)
   768  	case OpSelect0:
   769  		return rewriteValueS390X_OpSelect0(v)
   770  	case OpSelect1:
   771  		return rewriteValueS390X_OpSelect1(v)
   772  	case OpSignExt16to32:
   773  		v.Op = OpS390XMOVHreg
   774  		return true
   775  	case OpSignExt16to64:
   776  		v.Op = OpS390XMOVHreg
   777  		return true
   778  	case OpSignExt32to64:
   779  		v.Op = OpS390XMOVWreg
   780  		return true
   781  	case OpSignExt8to16:
   782  		v.Op = OpS390XMOVBreg
   783  		return true
   784  	case OpSignExt8to32:
   785  		v.Op = OpS390XMOVBreg
   786  		return true
   787  	case OpSignExt8to64:
   788  		v.Op = OpS390XMOVBreg
   789  		return true
   790  	case OpSlicemask:
   791  		return rewriteValueS390X_OpSlicemask(v)
   792  	case OpSqrt:
   793  		v.Op = OpS390XFSQRT
   794  		return true
   795  	case OpSqrt32:
   796  		v.Op = OpS390XFSQRTS
   797  		return true
   798  	case OpStaticCall:
   799  		v.Op = OpS390XCALLstatic
   800  		return true
   801  	case OpStore:
   802  		return rewriteValueS390X_OpStore(v)
   803  	case OpSub16:
   804  		v.Op = OpS390XSUBW
   805  		return true
   806  	case OpSub32:
   807  		v.Op = OpS390XSUBW
   808  		return true
   809  	case OpSub32F:
   810  		return rewriteValueS390X_OpSub32F(v)
   811  	case OpSub64:
   812  		v.Op = OpS390XSUB
   813  		return true
   814  	case OpSub64F:
   815  		return rewriteValueS390X_OpSub64F(v)
   816  	case OpSub8:
   817  		v.Op = OpS390XSUBW
   818  		return true
   819  	case OpSubPtr:
   820  		v.Op = OpS390XSUB
   821  		return true
   822  	case OpTailCall:
   823  		v.Op = OpS390XCALLtail
   824  		return true
   825  	case OpTrunc:
   826  		return rewriteValueS390X_OpTrunc(v)
   827  	case OpTrunc16to8:
   828  		v.Op = OpCopy
   829  		return true
   830  	case OpTrunc32to16:
   831  		v.Op = OpCopy
   832  		return true
   833  	case OpTrunc32to8:
   834  		v.Op = OpCopy
   835  		return true
   836  	case OpTrunc64to16:
   837  		v.Op = OpCopy
   838  		return true
   839  	case OpTrunc64to32:
   840  		v.Op = OpCopy
   841  		return true
   842  	case OpTrunc64to8:
   843  		v.Op = OpCopy
   844  		return true
   845  	case OpWB:
   846  		v.Op = OpS390XLoweredWB
   847  		return true
   848  	case OpXor16:
   849  		v.Op = OpS390XXORW
   850  		return true
   851  	case OpXor32:
   852  		v.Op = OpS390XXORW
   853  		return true
   854  	case OpXor64:
   855  		v.Op = OpS390XXOR
   856  		return true
   857  	case OpXor8:
   858  		v.Op = OpS390XXORW
   859  		return true
   860  	case OpZero:
   861  		return rewriteValueS390X_OpZero(v)
   862  	case OpZeroExt16to32:
   863  		v.Op = OpS390XMOVHZreg
   864  		return true
   865  	case OpZeroExt16to64:
   866  		v.Op = OpS390XMOVHZreg
   867  		return true
   868  	case OpZeroExt32to64:
   869  		v.Op = OpS390XMOVWZreg
   870  		return true
   871  	case OpZeroExt8to16:
   872  		v.Op = OpS390XMOVBZreg
   873  		return true
   874  	case OpZeroExt8to32:
   875  		v.Op = OpS390XMOVBZreg
   876  		return true
   877  	case OpZeroExt8to64:
   878  		v.Op = OpS390XMOVBZreg
   879  		return true
   880  	}
   881  	return false
   882  }
   883  func rewriteValueS390X_OpAdd32F(v *Value) bool {
   884  	v_1 := v.Args[1]
   885  	v_0 := v.Args[0]
   886  	b := v.Block
   887  	typ := &b.Func.Config.Types
   888  	// match: (Add32F x y)
   889  	// result: (Select0 (FADDS x y))
   890  	for {
   891  		x := v_0
   892  		y := v_1
   893  		v.reset(OpSelect0)
   894  		v0 := b.NewValue0(v.Pos, OpS390XFADDS, types.NewTuple(typ.Float32, types.TypeFlags))
   895  		v0.AddArg2(x, y)
   896  		v.AddArg(v0)
   897  		return true
   898  	}
   899  }
   900  func rewriteValueS390X_OpAdd64F(v *Value) bool {
   901  	v_1 := v.Args[1]
   902  	v_0 := v.Args[0]
   903  	b := v.Block
   904  	typ := &b.Func.Config.Types
   905  	// match: (Add64F x y)
   906  	// result: (Select0 (FADD x y))
   907  	for {
   908  		x := v_0
   909  		y := v_1
   910  		v.reset(OpSelect0)
   911  		v0 := b.NewValue0(v.Pos, OpS390XFADD, types.NewTuple(typ.Float64, types.TypeFlags))
   912  		v0.AddArg2(x, y)
   913  		v.AddArg(v0)
   914  		return true
   915  	}
   916  }
   917  func rewriteValueS390X_OpAddr(v *Value) bool {
   918  	v_0 := v.Args[0]
   919  	// match: (Addr {sym} base)
   920  	// result: (MOVDaddr {sym} base)
   921  	for {
   922  		sym := auxToSym(v.Aux)
   923  		base := v_0
   924  		v.reset(OpS390XMOVDaddr)
   925  		v.Aux = symToAux(sym)
   926  		v.AddArg(base)
   927  		return true
   928  	}
   929  }
   930  func rewriteValueS390X_OpAtomicAdd32(v *Value) bool {
   931  	v_2 := v.Args[2]
   932  	v_1 := v.Args[1]
   933  	v_0 := v.Args[0]
   934  	b := v.Block
   935  	typ := &b.Func.Config.Types
   936  	// match: (AtomicAdd32 ptr val mem)
   937  	// result: (AddTupleFirst32 val (LAA ptr val mem))
   938  	for {
   939  		ptr := v_0
   940  		val := v_1
   941  		mem := v_2
   942  		v.reset(OpS390XAddTupleFirst32)
   943  		v0 := b.NewValue0(v.Pos, OpS390XLAA, types.NewTuple(typ.UInt32, types.TypeMem))
   944  		v0.AddArg3(ptr, val, mem)
   945  		v.AddArg2(val, v0)
   946  		return true
   947  	}
   948  }
   949  func rewriteValueS390X_OpAtomicAdd64(v *Value) bool {
   950  	v_2 := v.Args[2]
   951  	v_1 := v.Args[1]
   952  	v_0 := v.Args[0]
   953  	b := v.Block
   954  	typ := &b.Func.Config.Types
   955  	// match: (AtomicAdd64 ptr val mem)
   956  	// result: (AddTupleFirst64 val (LAAG ptr val mem))
   957  	for {
   958  		ptr := v_0
   959  		val := v_1
   960  		mem := v_2
   961  		v.reset(OpS390XAddTupleFirst64)
   962  		v0 := b.NewValue0(v.Pos, OpS390XLAAG, types.NewTuple(typ.UInt64, types.TypeMem))
   963  		v0.AddArg3(ptr, val, mem)
   964  		v.AddArg2(val, v0)
   965  		return true
   966  	}
   967  }
   968  func rewriteValueS390X_OpAtomicAnd8(v *Value) bool {
   969  	v_2 := v.Args[2]
   970  	v_1 := v.Args[1]
   971  	v_0 := v.Args[0]
   972  	b := v.Block
   973  	typ := &b.Func.Config.Types
   974  	// match: (AtomicAnd8 ptr val mem)
   975  	// 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)
   976  	for {
   977  		ptr := v_0
   978  		val := v_1
   979  		mem := v_2
   980  		v.reset(OpS390XLANfloor)
   981  		v0 := b.NewValue0(v.Pos, OpS390XRLL, typ.UInt32)
   982  		v1 := b.NewValue0(v.Pos, OpS390XORWconst, typ.UInt32)
   983  		v1.AuxInt = int32ToAuxInt(-1 << 8)
   984  		v1.AddArg(val)
   985  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
   986  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
   987  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
   988  		v3.AuxInt = int64ToAuxInt(3 << 3)
   989  		v2.AddArg2(v3, ptr)
   990  		v0.AddArg2(v1, v2)
   991  		v.AddArg3(ptr, v0, mem)
   992  		return true
   993  	}
   994  }
   995  func rewriteValueS390X_OpAtomicCompareAndSwap32(v *Value) bool {
   996  	v_3 := v.Args[3]
   997  	v_2 := v.Args[2]
   998  	v_1 := v.Args[1]
   999  	v_0 := v.Args[0]
  1000  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
  1001  	// result: (LoweredAtomicCas32 ptr old new_ mem)
  1002  	for {
  1003  		ptr := v_0
  1004  		old := v_1
  1005  		new_ := v_2
  1006  		mem := v_3
  1007  		v.reset(OpS390XLoweredAtomicCas32)
  1008  		v.AddArg4(ptr, old, new_, mem)
  1009  		return true
  1010  	}
  1011  }
  1012  func rewriteValueS390X_OpAtomicCompareAndSwap64(v *Value) bool {
  1013  	v_3 := v.Args[3]
  1014  	v_2 := v.Args[2]
  1015  	v_1 := v.Args[1]
  1016  	v_0 := v.Args[0]
  1017  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
  1018  	// result: (LoweredAtomicCas64 ptr old new_ mem)
  1019  	for {
  1020  		ptr := v_0
  1021  		old := v_1
  1022  		new_ := v_2
  1023  		mem := v_3
  1024  		v.reset(OpS390XLoweredAtomicCas64)
  1025  		v.AddArg4(ptr, old, new_, mem)
  1026  		return true
  1027  	}
  1028  }
  1029  func rewriteValueS390X_OpAtomicExchange32(v *Value) bool {
  1030  	v_2 := v.Args[2]
  1031  	v_1 := v.Args[1]
  1032  	v_0 := v.Args[0]
  1033  	// match: (AtomicExchange32 ptr val mem)
  1034  	// result: (LoweredAtomicExchange32 ptr val mem)
  1035  	for {
  1036  		ptr := v_0
  1037  		val := v_1
  1038  		mem := v_2
  1039  		v.reset(OpS390XLoweredAtomicExchange32)
  1040  		v.AddArg3(ptr, val, mem)
  1041  		return true
  1042  	}
  1043  }
  1044  func rewriteValueS390X_OpAtomicExchange64(v *Value) bool {
  1045  	v_2 := v.Args[2]
  1046  	v_1 := v.Args[1]
  1047  	v_0 := v.Args[0]
  1048  	// match: (AtomicExchange64 ptr val mem)
  1049  	// result: (LoweredAtomicExchange64 ptr val mem)
  1050  	for {
  1051  		ptr := v_0
  1052  		val := v_1
  1053  		mem := v_2
  1054  		v.reset(OpS390XLoweredAtomicExchange64)
  1055  		v.AddArg3(ptr, val, mem)
  1056  		return true
  1057  	}
  1058  }
  1059  func rewriteValueS390X_OpAtomicLoad32(v *Value) bool {
  1060  	v_1 := v.Args[1]
  1061  	v_0 := v.Args[0]
  1062  	// match: (AtomicLoad32 ptr mem)
  1063  	// result: (MOVWZatomicload ptr mem)
  1064  	for {
  1065  		ptr := v_0
  1066  		mem := v_1
  1067  		v.reset(OpS390XMOVWZatomicload)
  1068  		v.AddArg2(ptr, mem)
  1069  		return true
  1070  	}
  1071  }
  1072  func rewriteValueS390X_OpAtomicLoad64(v *Value) bool {
  1073  	v_1 := v.Args[1]
  1074  	v_0 := v.Args[0]
  1075  	// match: (AtomicLoad64 ptr mem)
  1076  	// result: (MOVDatomicload ptr mem)
  1077  	for {
  1078  		ptr := v_0
  1079  		mem := v_1
  1080  		v.reset(OpS390XMOVDatomicload)
  1081  		v.AddArg2(ptr, mem)
  1082  		return true
  1083  	}
  1084  }
  1085  func rewriteValueS390X_OpAtomicLoad8(v *Value) bool {
  1086  	v_1 := v.Args[1]
  1087  	v_0 := v.Args[0]
  1088  	// match: (AtomicLoad8 ptr mem)
  1089  	// result: (MOVBZatomicload ptr mem)
  1090  	for {
  1091  		ptr := v_0
  1092  		mem := v_1
  1093  		v.reset(OpS390XMOVBZatomicload)
  1094  		v.AddArg2(ptr, mem)
  1095  		return true
  1096  	}
  1097  }
  1098  func rewriteValueS390X_OpAtomicLoadAcq32(v *Value) bool {
  1099  	v_1 := v.Args[1]
  1100  	v_0 := v.Args[0]
  1101  	// match: (AtomicLoadAcq32 ptr mem)
  1102  	// result: (MOVWZatomicload ptr mem)
  1103  	for {
  1104  		ptr := v_0
  1105  		mem := v_1
  1106  		v.reset(OpS390XMOVWZatomicload)
  1107  		v.AddArg2(ptr, mem)
  1108  		return true
  1109  	}
  1110  }
  1111  func rewriteValueS390X_OpAtomicLoadPtr(v *Value) bool {
  1112  	v_1 := v.Args[1]
  1113  	v_0 := v.Args[0]
  1114  	// match: (AtomicLoadPtr ptr mem)
  1115  	// result: (MOVDatomicload ptr mem)
  1116  	for {
  1117  		ptr := v_0
  1118  		mem := v_1
  1119  		v.reset(OpS390XMOVDatomicload)
  1120  		v.AddArg2(ptr, mem)
  1121  		return true
  1122  	}
  1123  }
  1124  func rewriteValueS390X_OpAtomicOr8(v *Value) bool {
  1125  	v_2 := v.Args[2]
  1126  	v_1 := v.Args[1]
  1127  	v_0 := v.Args[0]
  1128  	b := v.Block
  1129  	typ := &b.Func.Config.Types
  1130  	// match: (AtomicOr8 ptr val mem)
  1131  	// result: (LAOfloor ptr (SLW <typ.UInt32> (MOVBZreg <typ.UInt32> val) (RXSBG <typ.UInt32> {s390x.NewRotateParams(59, 60, 3)} (MOVDconst [3<<3]) ptr)) mem)
  1132  	for {
  1133  		ptr := v_0
  1134  		val := v_1
  1135  		mem := v_2
  1136  		v.reset(OpS390XLAOfloor)
  1137  		v0 := b.NewValue0(v.Pos, OpS390XSLW, typ.UInt32)
  1138  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt32)
  1139  		v1.AddArg(val)
  1140  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
  1141  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1142  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1143  		v3.AuxInt = int64ToAuxInt(3 << 3)
  1144  		v2.AddArg2(v3, ptr)
  1145  		v0.AddArg2(v1, v2)
  1146  		v.AddArg3(ptr, v0, mem)
  1147  		return true
  1148  	}
  1149  }
  1150  func rewriteValueS390X_OpAtomicStore32(v *Value) bool {
  1151  	v_2 := v.Args[2]
  1152  	v_1 := v.Args[1]
  1153  	v_0 := v.Args[0]
  1154  	b := v.Block
  1155  	// match: (AtomicStore32 ptr val mem)
  1156  	// result: (SYNC (MOVWatomicstore ptr val mem))
  1157  	for {
  1158  		ptr := v_0
  1159  		val := v_1
  1160  		mem := v_2
  1161  		v.reset(OpS390XSYNC)
  1162  		v0 := b.NewValue0(v.Pos, OpS390XMOVWatomicstore, types.TypeMem)
  1163  		v0.AddArg3(ptr, val, mem)
  1164  		v.AddArg(v0)
  1165  		return true
  1166  	}
  1167  }
  1168  func rewriteValueS390X_OpAtomicStore64(v *Value) bool {
  1169  	v_2 := v.Args[2]
  1170  	v_1 := v.Args[1]
  1171  	v_0 := v.Args[0]
  1172  	b := v.Block
  1173  	// match: (AtomicStore64 ptr val mem)
  1174  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1175  	for {
  1176  		ptr := v_0
  1177  		val := v_1
  1178  		mem := v_2
  1179  		v.reset(OpS390XSYNC)
  1180  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1181  		v0.AddArg3(ptr, val, mem)
  1182  		v.AddArg(v0)
  1183  		return true
  1184  	}
  1185  }
  1186  func rewriteValueS390X_OpAtomicStore8(v *Value) bool {
  1187  	v_2 := v.Args[2]
  1188  	v_1 := v.Args[1]
  1189  	v_0 := v.Args[0]
  1190  	b := v.Block
  1191  	// match: (AtomicStore8 ptr val mem)
  1192  	// result: (SYNC (MOVBatomicstore ptr val mem))
  1193  	for {
  1194  		ptr := v_0
  1195  		val := v_1
  1196  		mem := v_2
  1197  		v.reset(OpS390XSYNC)
  1198  		v0 := b.NewValue0(v.Pos, OpS390XMOVBatomicstore, types.TypeMem)
  1199  		v0.AddArg3(ptr, val, mem)
  1200  		v.AddArg(v0)
  1201  		return true
  1202  	}
  1203  }
  1204  func rewriteValueS390X_OpAtomicStorePtrNoWB(v *Value) bool {
  1205  	v_2 := v.Args[2]
  1206  	v_1 := v.Args[1]
  1207  	v_0 := v.Args[0]
  1208  	b := v.Block
  1209  	// match: (AtomicStorePtrNoWB ptr val mem)
  1210  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1211  	for {
  1212  		ptr := v_0
  1213  		val := v_1
  1214  		mem := v_2
  1215  		v.reset(OpS390XSYNC)
  1216  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1217  		v0.AddArg3(ptr, val, mem)
  1218  		v.AddArg(v0)
  1219  		return true
  1220  	}
  1221  }
  1222  func rewriteValueS390X_OpAtomicStoreRel32(v *Value) bool {
  1223  	v_2 := v.Args[2]
  1224  	v_1 := v.Args[1]
  1225  	v_0 := v.Args[0]
  1226  	// match: (AtomicStoreRel32 ptr val mem)
  1227  	// result: (MOVWatomicstore ptr val mem)
  1228  	for {
  1229  		ptr := v_0
  1230  		val := v_1
  1231  		mem := v_2
  1232  		v.reset(OpS390XMOVWatomicstore)
  1233  		v.AddArg3(ptr, val, mem)
  1234  		return true
  1235  	}
  1236  }
  1237  func rewriteValueS390X_OpAvg64u(v *Value) bool {
  1238  	v_1 := v.Args[1]
  1239  	v_0 := v.Args[0]
  1240  	b := v.Block
  1241  	// match: (Avg64u <t> x y)
  1242  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1243  	for {
  1244  		t := v.Type
  1245  		x := v_0
  1246  		y := v_1
  1247  		v.reset(OpS390XADD)
  1248  		v0 := b.NewValue0(v.Pos, OpS390XSRDconst, t)
  1249  		v0.AuxInt = uint8ToAuxInt(1)
  1250  		v1 := b.NewValue0(v.Pos, OpS390XSUB, t)
  1251  		v1.AddArg2(x, y)
  1252  		v0.AddArg(v1)
  1253  		v.AddArg2(v0, y)
  1254  		return true
  1255  	}
  1256  }
  1257  func rewriteValueS390X_OpBitLen64(v *Value) bool {
  1258  	v_0 := v.Args[0]
  1259  	b := v.Block
  1260  	typ := &b.Func.Config.Types
  1261  	// match: (BitLen64 x)
  1262  	// result: (SUB (MOVDconst [64]) (FLOGR x))
  1263  	for {
  1264  		x := v_0
  1265  		v.reset(OpS390XSUB)
  1266  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1267  		v0.AuxInt = int64ToAuxInt(64)
  1268  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1269  		v1.AddArg(x)
  1270  		v.AddArg2(v0, v1)
  1271  		return true
  1272  	}
  1273  }
  1274  func rewriteValueS390X_OpCeil(v *Value) bool {
  1275  	v_0 := v.Args[0]
  1276  	// match: (Ceil x)
  1277  	// result: (FIDBR [6] x)
  1278  	for {
  1279  		x := v_0
  1280  		v.reset(OpS390XFIDBR)
  1281  		v.AuxInt = int8ToAuxInt(6)
  1282  		v.AddArg(x)
  1283  		return true
  1284  	}
  1285  }
  1286  func rewriteValueS390X_OpConst16(v *Value) bool {
  1287  	// match: (Const16 [val])
  1288  	// result: (MOVDconst [int64(val)])
  1289  	for {
  1290  		val := auxIntToInt16(v.AuxInt)
  1291  		v.reset(OpS390XMOVDconst)
  1292  		v.AuxInt = int64ToAuxInt(int64(val))
  1293  		return true
  1294  	}
  1295  }
  1296  func rewriteValueS390X_OpConst32(v *Value) bool {
  1297  	// match: (Const32 [val])
  1298  	// result: (MOVDconst [int64(val)])
  1299  	for {
  1300  		val := auxIntToInt32(v.AuxInt)
  1301  		v.reset(OpS390XMOVDconst)
  1302  		v.AuxInt = int64ToAuxInt(int64(val))
  1303  		return true
  1304  	}
  1305  }
  1306  func rewriteValueS390X_OpConst64(v *Value) bool {
  1307  	// match: (Const64 [val])
  1308  	// result: (MOVDconst [int64(val)])
  1309  	for {
  1310  		val := auxIntToInt64(v.AuxInt)
  1311  		v.reset(OpS390XMOVDconst)
  1312  		v.AuxInt = int64ToAuxInt(int64(val))
  1313  		return true
  1314  	}
  1315  }
  1316  func rewriteValueS390X_OpConst8(v *Value) bool {
  1317  	// match: (Const8 [val])
  1318  	// result: (MOVDconst [int64(val)])
  1319  	for {
  1320  		val := auxIntToInt8(v.AuxInt)
  1321  		v.reset(OpS390XMOVDconst)
  1322  		v.AuxInt = int64ToAuxInt(int64(val))
  1323  		return true
  1324  	}
  1325  }
  1326  func rewriteValueS390X_OpConstBool(v *Value) bool {
  1327  	// match: (ConstBool [t])
  1328  	// result: (MOVDconst [b2i(t)])
  1329  	for {
  1330  		t := auxIntToBool(v.AuxInt)
  1331  		v.reset(OpS390XMOVDconst)
  1332  		v.AuxInt = int64ToAuxInt(b2i(t))
  1333  		return true
  1334  	}
  1335  }
  1336  func rewriteValueS390X_OpConstNil(v *Value) bool {
  1337  	// match: (ConstNil)
  1338  	// result: (MOVDconst [0])
  1339  	for {
  1340  		v.reset(OpS390XMOVDconst)
  1341  		v.AuxInt = int64ToAuxInt(0)
  1342  		return true
  1343  	}
  1344  }
  1345  func rewriteValueS390X_OpCtz32(v *Value) bool {
  1346  	v_0 := v.Args[0]
  1347  	b := v.Block
  1348  	typ := &b.Func.Config.Types
  1349  	// match: (Ctz32 <t> x)
  1350  	// result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW <t> (SUBWconst <t> [1] x) (NOTW <t> x)))))
  1351  	for {
  1352  		t := v.Type
  1353  		x := v_0
  1354  		v.reset(OpS390XSUB)
  1355  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1356  		v0.AuxInt = int64ToAuxInt(64)
  1357  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1358  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1359  		v3 := b.NewValue0(v.Pos, OpS390XANDW, t)
  1360  		v4 := b.NewValue0(v.Pos, OpS390XSUBWconst, t)
  1361  		v4.AuxInt = int32ToAuxInt(1)
  1362  		v4.AddArg(x)
  1363  		v5 := b.NewValue0(v.Pos, OpS390XNOTW, t)
  1364  		v5.AddArg(x)
  1365  		v3.AddArg2(v4, v5)
  1366  		v2.AddArg(v3)
  1367  		v1.AddArg(v2)
  1368  		v.AddArg2(v0, v1)
  1369  		return true
  1370  	}
  1371  }
  1372  func rewriteValueS390X_OpCtz64(v *Value) bool {
  1373  	v_0 := v.Args[0]
  1374  	b := v.Block
  1375  	typ := &b.Func.Config.Types
  1376  	// match: (Ctz64 <t> x)
  1377  	// result: (SUB (MOVDconst [64]) (FLOGR (AND <t> (SUBconst <t> [1] x) (NOT <t> x))))
  1378  	for {
  1379  		t := v.Type
  1380  		x := v_0
  1381  		v.reset(OpS390XSUB)
  1382  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1383  		v0.AuxInt = int64ToAuxInt(64)
  1384  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1385  		v2 := b.NewValue0(v.Pos, OpS390XAND, t)
  1386  		v3 := b.NewValue0(v.Pos, OpS390XSUBconst, t)
  1387  		v3.AuxInt = int32ToAuxInt(1)
  1388  		v3.AddArg(x)
  1389  		v4 := b.NewValue0(v.Pos, OpS390XNOT, t)
  1390  		v4.AddArg(x)
  1391  		v2.AddArg2(v3, v4)
  1392  		v1.AddArg(v2)
  1393  		v.AddArg2(v0, v1)
  1394  		return true
  1395  	}
  1396  }
  1397  func rewriteValueS390X_OpDiv16(v *Value) bool {
  1398  	v_1 := v.Args[1]
  1399  	v_0 := v.Args[0]
  1400  	b := v.Block
  1401  	typ := &b.Func.Config.Types
  1402  	// match: (Div16 x y)
  1403  	// result: (DIVW (MOVHreg x) (MOVHreg y))
  1404  	for {
  1405  		x := v_0
  1406  		y := v_1
  1407  		v.reset(OpS390XDIVW)
  1408  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1409  		v0.AddArg(x)
  1410  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1411  		v1.AddArg(y)
  1412  		v.AddArg2(v0, v1)
  1413  		return true
  1414  	}
  1415  }
  1416  func rewriteValueS390X_OpDiv16u(v *Value) bool {
  1417  	v_1 := v.Args[1]
  1418  	v_0 := v.Args[0]
  1419  	b := v.Block
  1420  	typ := &b.Func.Config.Types
  1421  	// match: (Div16u x y)
  1422  	// result: (DIVWU (MOVHZreg x) (MOVHZreg y))
  1423  	for {
  1424  		x := v_0
  1425  		y := v_1
  1426  		v.reset(OpS390XDIVWU)
  1427  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1428  		v0.AddArg(x)
  1429  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1430  		v1.AddArg(y)
  1431  		v.AddArg2(v0, v1)
  1432  		return true
  1433  	}
  1434  }
  1435  func rewriteValueS390X_OpDiv32(v *Value) bool {
  1436  	v_1 := v.Args[1]
  1437  	v_0 := v.Args[0]
  1438  	b := v.Block
  1439  	typ := &b.Func.Config.Types
  1440  	// match: (Div32 x y)
  1441  	// result: (DIVW (MOVWreg x) y)
  1442  	for {
  1443  		x := v_0
  1444  		y := v_1
  1445  		v.reset(OpS390XDIVW)
  1446  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1447  		v0.AddArg(x)
  1448  		v.AddArg2(v0, y)
  1449  		return true
  1450  	}
  1451  }
  1452  func rewriteValueS390X_OpDiv32u(v *Value) bool {
  1453  	v_1 := v.Args[1]
  1454  	v_0 := v.Args[0]
  1455  	b := v.Block
  1456  	typ := &b.Func.Config.Types
  1457  	// match: (Div32u x y)
  1458  	// result: (DIVWU (MOVWZreg x) y)
  1459  	for {
  1460  		x := v_0
  1461  		y := v_1
  1462  		v.reset(OpS390XDIVWU)
  1463  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1464  		v0.AddArg(x)
  1465  		v.AddArg2(v0, y)
  1466  		return true
  1467  	}
  1468  }
  1469  func rewriteValueS390X_OpDiv64(v *Value) bool {
  1470  	v_1 := v.Args[1]
  1471  	v_0 := v.Args[0]
  1472  	// match: (Div64 x y)
  1473  	// result: (DIVD x y)
  1474  	for {
  1475  		x := v_0
  1476  		y := v_1
  1477  		v.reset(OpS390XDIVD)
  1478  		v.AddArg2(x, y)
  1479  		return true
  1480  	}
  1481  }
  1482  func rewriteValueS390X_OpDiv8(v *Value) bool {
  1483  	v_1 := v.Args[1]
  1484  	v_0 := v.Args[0]
  1485  	b := v.Block
  1486  	typ := &b.Func.Config.Types
  1487  	// match: (Div8 x y)
  1488  	// result: (DIVW (MOVBreg x) (MOVBreg y))
  1489  	for {
  1490  		x := v_0
  1491  		y := v_1
  1492  		v.reset(OpS390XDIVW)
  1493  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1494  		v0.AddArg(x)
  1495  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1496  		v1.AddArg(y)
  1497  		v.AddArg2(v0, v1)
  1498  		return true
  1499  	}
  1500  }
  1501  func rewriteValueS390X_OpDiv8u(v *Value) bool {
  1502  	v_1 := v.Args[1]
  1503  	v_0 := v.Args[0]
  1504  	b := v.Block
  1505  	typ := &b.Func.Config.Types
  1506  	// match: (Div8u x y)
  1507  	// result: (DIVWU (MOVBZreg x) (MOVBZreg y))
  1508  	for {
  1509  		x := v_0
  1510  		y := v_1
  1511  		v.reset(OpS390XDIVWU)
  1512  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1513  		v0.AddArg(x)
  1514  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1515  		v1.AddArg(y)
  1516  		v.AddArg2(v0, v1)
  1517  		return true
  1518  	}
  1519  }
  1520  func rewriteValueS390X_OpEq16(v *Value) bool {
  1521  	v_1 := v.Args[1]
  1522  	v_0 := v.Args[0]
  1523  	b := v.Block
  1524  	typ := &b.Func.Config.Types
  1525  	// match: (Eq16 x y)
  1526  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1527  	for {
  1528  		x := v_0
  1529  		y := v_1
  1530  		v.reset(OpS390XLOCGR)
  1531  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1532  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1533  		v0.AuxInt = int64ToAuxInt(0)
  1534  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1535  		v1.AuxInt = int64ToAuxInt(1)
  1536  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1537  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1538  		v3.AddArg(x)
  1539  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1540  		v4.AddArg(y)
  1541  		v2.AddArg2(v3, v4)
  1542  		v.AddArg3(v0, v1, v2)
  1543  		return true
  1544  	}
  1545  }
  1546  func rewriteValueS390X_OpEq32(v *Value) bool {
  1547  	v_1 := v.Args[1]
  1548  	v_0 := v.Args[0]
  1549  	b := v.Block
  1550  	typ := &b.Func.Config.Types
  1551  	// match: (Eq32 x y)
  1552  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1553  	for {
  1554  		x := v_0
  1555  		y := v_1
  1556  		v.reset(OpS390XLOCGR)
  1557  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1558  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1559  		v0.AuxInt = int64ToAuxInt(0)
  1560  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1561  		v1.AuxInt = int64ToAuxInt(1)
  1562  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1563  		v2.AddArg2(x, y)
  1564  		v.AddArg3(v0, v1, v2)
  1565  		return true
  1566  	}
  1567  }
  1568  func rewriteValueS390X_OpEq32F(v *Value) bool {
  1569  	v_1 := v.Args[1]
  1570  	v_0 := v.Args[0]
  1571  	b := v.Block
  1572  	typ := &b.Func.Config.Types
  1573  	// match: (Eq32F x y)
  1574  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1575  	for {
  1576  		x := v_0
  1577  		y := v_1
  1578  		v.reset(OpS390XLOCGR)
  1579  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1580  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1581  		v0.AuxInt = int64ToAuxInt(0)
  1582  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1583  		v1.AuxInt = int64ToAuxInt(1)
  1584  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  1585  		v2.AddArg2(x, y)
  1586  		v.AddArg3(v0, v1, v2)
  1587  		return true
  1588  	}
  1589  }
  1590  func rewriteValueS390X_OpEq64(v *Value) bool {
  1591  	v_1 := v.Args[1]
  1592  	v_0 := v.Args[0]
  1593  	b := v.Block
  1594  	typ := &b.Func.Config.Types
  1595  	// match: (Eq64 x y)
  1596  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1597  	for {
  1598  		x := v_0
  1599  		y := v_1
  1600  		v.reset(OpS390XLOCGR)
  1601  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1602  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1603  		v0.AuxInt = int64ToAuxInt(0)
  1604  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1605  		v1.AuxInt = int64ToAuxInt(1)
  1606  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1607  		v2.AddArg2(x, y)
  1608  		v.AddArg3(v0, v1, v2)
  1609  		return true
  1610  	}
  1611  }
  1612  func rewriteValueS390X_OpEq64F(v *Value) bool {
  1613  	v_1 := v.Args[1]
  1614  	v_0 := v.Args[0]
  1615  	b := v.Block
  1616  	typ := &b.Func.Config.Types
  1617  	// match: (Eq64F x y)
  1618  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  1619  	for {
  1620  		x := v_0
  1621  		y := v_1
  1622  		v.reset(OpS390XLOCGR)
  1623  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1624  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1625  		v0.AuxInt = int64ToAuxInt(0)
  1626  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1627  		v1.AuxInt = int64ToAuxInt(1)
  1628  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  1629  		v2.AddArg2(x, y)
  1630  		v.AddArg3(v0, v1, v2)
  1631  		return true
  1632  	}
  1633  }
  1634  func rewriteValueS390X_OpEq8(v *Value) bool {
  1635  	v_1 := v.Args[1]
  1636  	v_0 := v.Args[0]
  1637  	b := v.Block
  1638  	typ := &b.Func.Config.Types
  1639  	// match: (Eq8 x y)
  1640  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1641  	for {
  1642  		x := v_0
  1643  		y := v_1
  1644  		v.reset(OpS390XLOCGR)
  1645  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1646  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1647  		v0.AuxInt = int64ToAuxInt(0)
  1648  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1649  		v1.AuxInt = int64ToAuxInt(1)
  1650  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1651  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1652  		v3.AddArg(x)
  1653  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1654  		v4.AddArg(y)
  1655  		v2.AddArg2(v3, v4)
  1656  		v.AddArg3(v0, v1, v2)
  1657  		return true
  1658  	}
  1659  }
  1660  func rewriteValueS390X_OpEqB(v *Value) bool {
  1661  	v_1 := v.Args[1]
  1662  	v_0 := v.Args[0]
  1663  	b := v.Block
  1664  	typ := &b.Func.Config.Types
  1665  	// match: (EqB x y)
  1666  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1667  	for {
  1668  		x := v_0
  1669  		y := v_1
  1670  		v.reset(OpS390XLOCGR)
  1671  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1672  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1673  		v0.AuxInt = int64ToAuxInt(0)
  1674  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1675  		v1.AuxInt = int64ToAuxInt(1)
  1676  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1677  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1678  		v3.AddArg(x)
  1679  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1680  		v4.AddArg(y)
  1681  		v2.AddArg2(v3, v4)
  1682  		v.AddArg3(v0, v1, v2)
  1683  		return true
  1684  	}
  1685  }
  1686  func rewriteValueS390X_OpEqPtr(v *Value) bool {
  1687  	v_1 := v.Args[1]
  1688  	v_0 := v.Args[0]
  1689  	b := v.Block
  1690  	typ := &b.Func.Config.Types
  1691  	// match: (EqPtr x y)
  1692  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1693  	for {
  1694  		x := v_0
  1695  		y := v_1
  1696  		v.reset(OpS390XLOCGR)
  1697  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1698  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1699  		v0.AuxInt = int64ToAuxInt(0)
  1700  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1701  		v1.AuxInt = int64ToAuxInt(1)
  1702  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1703  		v2.AddArg2(x, y)
  1704  		v.AddArg3(v0, v1, v2)
  1705  		return true
  1706  	}
  1707  }
  1708  func rewriteValueS390X_OpFMA(v *Value) bool {
  1709  	v_2 := v.Args[2]
  1710  	v_1 := v.Args[1]
  1711  	v_0 := v.Args[0]
  1712  	// match: (FMA x y z)
  1713  	// result: (FMADD z x y)
  1714  	for {
  1715  		x := v_0
  1716  		y := v_1
  1717  		z := v_2
  1718  		v.reset(OpS390XFMADD)
  1719  		v.AddArg3(z, x, y)
  1720  		return true
  1721  	}
  1722  }
  1723  func rewriteValueS390X_OpFloor(v *Value) bool {
  1724  	v_0 := v.Args[0]
  1725  	// match: (Floor x)
  1726  	// result: (FIDBR [7] x)
  1727  	for {
  1728  		x := v_0
  1729  		v.reset(OpS390XFIDBR)
  1730  		v.AuxInt = int8ToAuxInt(7)
  1731  		v.AddArg(x)
  1732  		return true
  1733  	}
  1734  }
  1735  func rewriteValueS390X_OpHmul32(v *Value) bool {
  1736  	v_1 := v.Args[1]
  1737  	v_0 := v.Args[0]
  1738  	b := v.Block
  1739  	typ := &b.Func.Config.Types
  1740  	// match: (Hmul32 x y)
  1741  	// result: (SRDconst [32] (MULLD (MOVWreg x) (MOVWreg y)))
  1742  	for {
  1743  		x := v_0
  1744  		y := v_1
  1745  		v.reset(OpS390XSRDconst)
  1746  		v.AuxInt = uint8ToAuxInt(32)
  1747  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1748  		v1 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1749  		v1.AddArg(x)
  1750  		v2 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1751  		v2.AddArg(y)
  1752  		v0.AddArg2(v1, v2)
  1753  		v.AddArg(v0)
  1754  		return true
  1755  	}
  1756  }
  1757  func rewriteValueS390X_OpHmul32u(v *Value) bool {
  1758  	v_1 := v.Args[1]
  1759  	v_0 := v.Args[0]
  1760  	b := v.Block
  1761  	typ := &b.Func.Config.Types
  1762  	// match: (Hmul32u x y)
  1763  	// result: (SRDconst [32] (MULLD (MOVWZreg x) (MOVWZreg y)))
  1764  	for {
  1765  		x := v_0
  1766  		y := v_1
  1767  		v.reset(OpS390XSRDconst)
  1768  		v.AuxInt = uint8ToAuxInt(32)
  1769  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1770  		v1 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1771  		v1.AddArg(x)
  1772  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1773  		v2.AddArg(y)
  1774  		v0.AddArg2(v1, v2)
  1775  		v.AddArg(v0)
  1776  		return true
  1777  	}
  1778  }
  1779  func rewriteValueS390X_OpITab(v *Value) bool {
  1780  	v_0 := v.Args[0]
  1781  	// match: (ITab (Load ptr mem))
  1782  	// result: (MOVDload ptr mem)
  1783  	for {
  1784  		if v_0.Op != OpLoad {
  1785  			break
  1786  		}
  1787  		mem := v_0.Args[1]
  1788  		ptr := v_0.Args[0]
  1789  		v.reset(OpS390XMOVDload)
  1790  		v.AddArg2(ptr, mem)
  1791  		return true
  1792  	}
  1793  	return false
  1794  }
  1795  func rewriteValueS390X_OpIsInBounds(v *Value) bool {
  1796  	v_1 := v.Args[1]
  1797  	v_0 := v.Args[0]
  1798  	b := v.Block
  1799  	typ := &b.Func.Config.Types
  1800  	// match: (IsInBounds idx len)
  1801  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1802  	for {
  1803  		idx := v_0
  1804  		len := v_1
  1805  		v.reset(OpS390XLOCGR)
  1806  		v.Aux = s390xCCMaskToAux(s390x.Less)
  1807  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1808  		v0.AuxInt = int64ToAuxInt(0)
  1809  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1810  		v1.AuxInt = int64ToAuxInt(1)
  1811  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  1812  		v2.AddArg2(idx, len)
  1813  		v.AddArg3(v0, v1, v2)
  1814  		return true
  1815  	}
  1816  }
  1817  func rewriteValueS390X_OpIsNonNil(v *Value) bool {
  1818  	v_0 := v.Args[0]
  1819  	b := v.Block
  1820  	typ := &b.Func.Config.Types
  1821  	// match: (IsNonNil p)
  1822  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPconst p [0]))
  1823  	for {
  1824  		p := v_0
  1825  		v.reset(OpS390XLOCGR)
  1826  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  1827  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1828  		v0.AuxInt = int64ToAuxInt(0)
  1829  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1830  		v1.AuxInt = int64ToAuxInt(1)
  1831  		v2 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  1832  		v2.AuxInt = int32ToAuxInt(0)
  1833  		v2.AddArg(p)
  1834  		v.AddArg3(v0, v1, v2)
  1835  		return true
  1836  	}
  1837  }
  1838  func rewriteValueS390X_OpIsSliceInBounds(v *Value) bool {
  1839  	v_1 := v.Args[1]
  1840  	v_0 := v.Args[0]
  1841  	b := v.Block
  1842  	typ := &b.Func.Config.Types
  1843  	// match: (IsSliceInBounds idx len)
  1844  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1845  	for {
  1846  		idx := v_0
  1847  		len := v_1
  1848  		v.reset(OpS390XLOCGR)
  1849  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1850  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1851  		v0.AuxInt = int64ToAuxInt(0)
  1852  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1853  		v1.AuxInt = int64ToAuxInt(1)
  1854  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  1855  		v2.AddArg2(idx, len)
  1856  		v.AddArg3(v0, v1, v2)
  1857  		return true
  1858  	}
  1859  }
  1860  func rewriteValueS390X_OpLeq16(v *Value) bool {
  1861  	v_1 := v.Args[1]
  1862  	v_0 := v.Args[0]
  1863  	b := v.Block
  1864  	typ := &b.Func.Config.Types
  1865  	// match: (Leq16 x y)
  1866  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1867  	for {
  1868  		x := v_0
  1869  		y := v_1
  1870  		v.reset(OpS390XLOCGR)
  1871  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1872  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1873  		v0.AuxInt = int64ToAuxInt(0)
  1874  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1875  		v1.AuxInt = int64ToAuxInt(1)
  1876  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1877  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1878  		v3.AddArg(x)
  1879  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1880  		v4.AddArg(y)
  1881  		v2.AddArg2(v3, v4)
  1882  		v.AddArg3(v0, v1, v2)
  1883  		return true
  1884  	}
  1885  }
  1886  func rewriteValueS390X_OpLeq16U(v *Value) bool {
  1887  	v_1 := v.Args[1]
  1888  	v_0 := v.Args[0]
  1889  	b := v.Block
  1890  	typ := &b.Func.Config.Types
  1891  	// match: (Leq16U x y)
  1892  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  1893  	for {
  1894  		x := v_0
  1895  		y := v_1
  1896  		v.reset(OpS390XLOCGR)
  1897  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1898  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1899  		v0.AuxInt = int64ToAuxInt(0)
  1900  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1901  		v1.AuxInt = int64ToAuxInt(1)
  1902  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  1903  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1904  		v3.AddArg(x)
  1905  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1906  		v4.AddArg(y)
  1907  		v2.AddArg2(v3, v4)
  1908  		v.AddArg3(v0, v1, v2)
  1909  		return true
  1910  	}
  1911  }
  1912  func rewriteValueS390X_OpLeq32(v *Value) bool {
  1913  	v_1 := v.Args[1]
  1914  	v_0 := v.Args[0]
  1915  	b := v.Block
  1916  	typ := &b.Func.Config.Types
  1917  	// match: (Leq32 x y)
  1918  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1919  	for {
  1920  		x := v_0
  1921  		y := v_1
  1922  		v.reset(OpS390XLOCGR)
  1923  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1924  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1925  		v0.AuxInt = int64ToAuxInt(0)
  1926  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1927  		v1.AuxInt = int64ToAuxInt(1)
  1928  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1929  		v2.AddArg2(x, y)
  1930  		v.AddArg3(v0, v1, v2)
  1931  		return true
  1932  	}
  1933  }
  1934  func rewriteValueS390X_OpLeq32F(v *Value) bool {
  1935  	v_1 := v.Args[1]
  1936  	v_0 := v.Args[0]
  1937  	b := v.Block
  1938  	typ := &b.Func.Config.Types
  1939  	// match: (Leq32F x y)
  1940  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1941  	for {
  1942  		x := v_0
  1943  		y := v_1
  1944  		v.reset(OpS390XLOCGR)
  1945  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1946  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1947  		v0.AuxInt = int64ToAuxInt(0)
  1948  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1949  		v1.AuxInt = int64ToAuxInt(1)
  1950  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  1951  		v2.AddArg2(x, y)
  1952  		v.AddArg3(v0, v1, v2)
  1953  		return true
  1954  	}
  1955  }
  1956  func rewriteValueS390X_OpLeq32U(v *Value) bool {
  1957  	v_1 := v.Args[1]
  1958  	v_0 := v.Args[0]
  1959  	b := v.Block
  1960  	typ := &b.Func.Config.Types
  1961  	// match: (Leq32U x y)
  1962  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  1963  	for {
  1964  		x := v_0
  1965  		y := v_1
  1966  		v.reset(OpS390XLOCGR)
  1967  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1968  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1969  		v0.AuxInt = int64ToAuxInt(0)
  1970  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1971  		v1.AuxInt = int64ToAuxInt(1)
  1972  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  1973  		v2.AddArg2(x, y)
  1974  		v.AddArg3(v0, v1, v2)
  1975  		return true
  1976  	}
  1977  }
  1978  func rewriteValueS390X_OpLeq64(v *Value) bool {
  1979  	v_1 := v.Args[1]
  1980  	v_0 := v.Args[0]
  1981  	b := v.Block
  1982  	typ := &b.Func.Config.Types
  1983  	// match: (Leq64 x y)
  1984  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1985  	for {
  1986  		x := v_0
  1987  		y := v_1
  1988  		v.reset(OpS390XLOCGR)
  1989  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1990  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1991  		v0.AuxInt = int64ToAuxInt(0)
  1992  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1993  		v1.AuxInt = int64ToAuxInt(1)
  1994  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1995  		v2.AddArg2(x, y)
  1996  		v.AddArg3(v0, v1, v2)
  1997  		return true
  1998  	}
  1999  }
  2000  func rewriteValueS390X_OpLeq64F(v *Value) bool {
  2001  	v_1 := v.Args[1]
  2002  	v_0 := v.Args[0]
  2003  	b := v.Block
  2004  	typ := &b.Func.Config.Types
  2005  	// match: (Leq64F x y)
  2006  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2007  	for {
  2008  		x := v_0
  2009  		y := v_1
  2010  		v.reset(OpS390XLOCGR)
  2011  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2012  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2013  		v0.AuxInt = int64ToAuxInt(0)
  2014  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2015  		v1.AuxInt = int64ToAuxInt(1)
  2016  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2017  		v2.AddArg2(x, y)
  2018  		v.AddArg3(v0, v1, v2)
  2019  		return true
  2020  	}
  2021  }
  2022  func rewriteValueS390X_OpLeq64U(v *Value) bool {
  2023  	v_1 := v.Args[1]
  2024  	v_0 := v.Args[0]
  2025  	b := v.Block
  2026  	typ := &b.Func.Config.Types
  2027  	// match: (Leq64U x y)
  2028  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2029  	for {
  2030  		x := v_0
  2031  		y := v_1
  2032  		v.reset(OpS390XLOCGR)
  2033  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2034  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2035  		v0.AuxInt = int64ToAuxInt(0)
  2036  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2037  		v1.AuxInt = int64ToAuxInt(1)
  2038  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2039  		v2.AddArg2(x, y)
  2040  		v.AddArg3(v0, v1, v2)
  2041  		return true
  2042  	}
  2043  }
  2044  func rewriteValueS390X_OpLeq8(v *Value) bool {
  2045  	v_1 := v.Args[1]
  2046  	v_0 := v.Args[0]
  2047  	b := v.Block
  2048  	typ := &b.Func.Config.Types
  2049  	// match: (Leq8 x y)
  2050  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2051  	for {
  2052  		x := v_0
  2053  		y := v_1
  2054  		v.reset(OpS390XLOCGR)
  2055  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2056  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2057  		v0.AuxInt = int64ToAuxInt(0)
  2058  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2059  		v1.AuxInt = int64ToAuxInt(1)
  2060  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2061  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2062  		v3.AddArg(x)
  2063  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2064  		v4.AddArg(y)
  2065  		v2.AddArg2(v3, v4)
  2066  		v.AddArg3(v0, v1, v2)
  2067  		return true
  2068  	}
  2069  }
  2070  func rewriteValueS390X_OpLeq8U(v *Value) bool {
  2071  	v_1 := v.Args[1]
  2072  	v_0 := v.Args[0]
  2073  	b := v.Block
  2074  	typ := &b.Func.Config.Types
  2075  	// match: (Leq8U x y)
  2076  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2077  	for {
  2078  		x := v_0
  2079  		y := v_1
  2080  		v.reset(OpS390XLOCGR)
  2081  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2082  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2083  		v0.AuxInt = int64ToAuxInt(0)
  2084  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2085  		v1.AuxInt = int64ToAuxInt(1)
  2086  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2087  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2088  		v3.AddArg(x)
  2089  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2090  		v4.AddArg(y)
  2091  		v2.AddArg2(v3, v4)
  2092  		v.AddArg3(v0, v1, v2)
  2093  		return true
  2094  	}
  2095  }
  2096  func rewriteValueS390X_OpLess16(v *Value) bool {
  2097  	v_1 := v.Args[1]
  2098  	v_0 := v.Args[0]
  2099  	b := v.Block
  2100  	typ := &b.Func.Config.Types
  2101  	// match: (Less16 x y)
  2102  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2103  	for {
  2104  		x := v_0
  2105  		y := v_1
  2106  		v.reset(OpS390XLOCGR)
  2107  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2108  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2109  		v0.AuxInt = int64ToAuxInt(0)
  2110  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2111  		v1.AuxInt = int64ToAuxInt(1)
  2112  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2113  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2114  		v3.AddArg(x)
  2115  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2116  		v4.AddArg(y)
  2117  		v2.AddArg2(v3, v4)
  2118  		v.AddArg3(v0, v1, v2)
  2119  		return true
  2120  	}
  2121  }
  2122  func rewriteValueS390X_OpLess16U(v *Value) bool {
  2123  	v_1 := v.Args[1]
  2124  	v_0 := v.Args[0]
  2125  	b := v.Block
  2126  	typ := &b.Func.Config.Types
  2127  	// match: (Less16U x y)
  2128  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2129  	for {
  2130  		x := v_0
  2131  		y := v_1
  2132  		v.reset(OpS390XLOCGR)
  2133  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2134  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2135  		v0.AuxInt = int64ToAuxInt(0)
  2136  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2137  		v1.AuxInt = int64ToAuxInt(1)
  2138  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2139  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2140  		v3.AddArg(x)
  2141  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2142  		v4.AddArg(y)
  2143  		v2.AddArg2(v3, v4)
  2144  		v.AddArg3(v0, v1, v2)
  2145  		return true
  2146  	}
  2147  }
  2148  func rewriteValueS390X_OpLess32(v *Value) bool {
  2149  	v_1 := v.Args[1]
  2150  	v_0 := v.Args[0]
  2151  	b := v.Block
  2152  	typ := &b.Func.Config.Types
  2153  	// match: (Less32 x y)
  2154  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2155  	for {
  2156  		x := v_0
  2157  		y := v_1
  2158  		v.reset(OpS390XLOCGR)
  2159  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2160  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2161  		v0.AuxInt = int64ToAuxInt(0)
  2162  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2163  		v1.AuxInt = int64ToAuxInt(1)
  2164  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2165  		v2.AddArg2(x, y)
  2166  		v.AddArg3(v0, v1, v2)
  2167  		return true
  2168  	}
  2169  }
  2170  func rewriteValueS390X_OpLess32F(v *Value) bool {
  2171  	v_1 := v.Args[1]
  2172  	v_0 := v.Args[0]
  2173  	b := v.Block
  2174  	typ := &b.Func.Config.Types
  2175  	// match: (Less32F x y)
  2176  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2177  	for {
  2178  		x := v_0
  2179  		y := v_1
  2180  		v.reset(OpS390XLOCGR)
  2181  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2182  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2183  		v0.AuxInt = int64ToAuxInt(0)
  2184  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2185  		v1.AuxInt = int64ToAuxInt(1)
  2186  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  2187  		v2.AddArg2(x, y)
  2188  		v.AddArg3(v0, v1, v2)
  2189  		return true
  2190  	}
  2191  }
  2192  func rewriteValueS390X_OpLess32U(v *Value) bool {
  2193  	v_1 := v.Args[1]
  2194  	v_0 := v.Args[0]
  2195  	b := v.Block
  2196  	typ := &b.Func.Config.Types
  2197  	// match: (Less32U x y)
  2198  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2199  	for {
  2200  		x := v_0
  2201  		y := v_1
  2202  		v.reset(OpS390XLOCGR)
  2203  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2204  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2205  		v0.AuxInt = int64ToAuxInt(0)
  2206  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2207  		v1.AuxInt = int64ToAuxInt(1)
  2208  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2209  		v2.AddArg2(x, y)
  2210  		v.AddArg3(v0, v1, v2)
  2211  		return true
  2212  	}
  2213  }
  2214  func rewriteValueS390X_OpLess64(v *Value) bool {
  2215  	v_1 := v.Args[1]
  2216  	v_0 := v.Args[0]
  2217  	b := v.Block
  2218  	typ := &b.Func.Config.Types
  2219  	// match: (Less64 x y)
  2220  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2221  	for {
  2222  		x := v_0
  2223  		y := v_1
  2224  		v.reset(OpS390XLOCGR)
  2225  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2226  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2227  		v0.AuxInt = int64ToAuxInt(0)
  2228  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2229  		v1.AuxInt = int64ToAuxInt(1)
  2230  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  2231  		v2.AddArg2(x, y)
  2232  		v.AddArg3(v0, v1, v2)
  2233  		return true
  2234  	}
  2235  }
  2236  func rewriteValueS390X_OpLess64F(v *Value) bool {
  2237  	v_1 := v.Args[1]
  2238  	v_0 := v.Args[0]
  2239  	b := v.Block
  2240  	typ := &b.Func.Config.Types
  2241  	// match: (Less64F x y)
  2242  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2243  	for {
  2244  		x := v_0
  2245  		y := v_1
  2246  		v.reset(OpS390XLOCGR)
  2247  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2248  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2249  		v0.AuxInt = int64ToAuxInt(0)
  2250  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2251  		v1.AuxInt = int64ToAuxInt(1)
  2252  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2253  		v2.AddArg2(x, y)
  2254  		v.AddArg3(v0, v1, v2)
  2255  		return true
  2256  	}
  2257  }
  2258  func rewriteValueS390X_OpLess64U(v *Value) bool {
  2259  	v_1 := v.Args[1]
  2260  	v_0 := v.Args[0]
  2261  	b := v.Block
  2262  	typ := &b.Func.Config.Types
  2263  	// match: (Less64U x y)
  2264  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2265  	for {
  2266  		x := v_0
  2267  		y := v_1
  2268  		v.reset(OpS390XLOCGR)
  2269  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2270  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2271  		v0.AuxInt = int64ToAuxInt(0)
  2272  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2273  		v1.AuxInt = int64ToAuxInt(1)
  2274  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2275  		v2.AddArg2(x, y)
  2276  		v.AddArg3(v0, v1, v2)
  2277  		return true
  2278  	}
  2279  }
  2280  func rewriteValueS390X_OpLess8(v *Value) bool {
  2281  	v_1 := v.Args[1]
  2282  	v_0 := v.Args[0]
  2283  	b := v.Block
  2284  	typ := &b.Func.Config.Types
  2285  	// match: (Less8 x y)
  2286  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2287  	for {
  2288  		x := v_0
  2289  		y := v_1
  2290  		v.reset(OpS390XLOCGR)
  2291  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2292  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2293  		v0.AuxInt = int64ToAuxInt(0)
  2294  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2295  		v1.AuxInt = int64ToAuxInt(1)
  2296  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2297  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2298  		v3.AddArg(x)
  2299  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2300  		v4.AddArg(y)
  2301  		v2.AddArg2(v3, v4)
  2302  		v.AddArg3(v0, v1, v2)
  2303  		return true
  2304  	}
  2305  }
  2306  func rewriteValueS390X_OpLess8U(v *Value) bool {
  2307  	v_1 := v.Args[1]
  2308  	v_0 := v.Args[0]
  2309  	b := v.Block
  2310  	typ := &b.Func.Config.Types
  2311  	// match: (Less8U x y)
  2312  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2313  	for {
  2314  		x := v_0
  2315  		y := v_1
  2316  		v.reset(OpS390XLOCGR)
  2317  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2318  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2319  		v0.AuxInt = int64ToAuxInt(0)
  2320  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2321  		v1.AuxInt = int64ToAuxInt(1)
  2322  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2323  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2324  		v3.AddArg(x)
  2325  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2326  		v4.AddArg(y)
  2327  		v2.AddArg2(v3, v4)
  2328  		v.AddArg3(v0, v1, v2)
  2329  		return true
  2330  	}
  2331  }
  2332  func rewriteValueS390X_OpLoad(v *Value) bool {
  2333  	v_1 := v.Args[1]
  2334  	v_0 := v.Args[0]
  2335  	// match: (Load <t> ptr mem)
  2336  	// cond: (is64BitInt(t) || isPtr(t))
  2337  	// result: (MOVDload ptr mem)
  2338  	for {
  2339  		t := v.Type
  2340  		ptr := v_0
  2341  		mem := v_1
  2342  		if !(is64BitInt(t) || isPtr(t)) {
  2343  			break
  2344  		}
  2345  		v.reset(OpS390XMOVDload)
  2346  		v.AddArg2(ptr, mem)
  2347  		return true
  2348  	}
  2349  	// match: (Load <t> ptr mem)
  2350  	// cond: is32BitInt(t) && isSigned(t)
  2351  	// result: (MOVWload ptr mem)
  2352  	for {
  2353  		t := v.Type
  2354  		ptr := v_0
  2355  		mem := v_1
  2356  		if !(is32BitInt(t) && isSigned(t)) {
  2357  			break
  2358  		}
  2359  		v.reset(OpS390XMOVWload)
  2360  		v.AddArg2(ptr, mem)
  2361  		return true
  2362  	}
  2363  	// match: (Load <t> ptr mem)
  2364  	// cond: is32BitInt(t) && !isSigned(t)
  2365  	// result: (MOVWZload ptr mem)
  2366  	for {
  2367  		t := v.Type
  2368  		ptr := v_0
  2369  		mem := v_1
  2370  		if !(is32BitInt(t) && !isSigned(t)) {
  2371  			break
  2372  		}
  2373  		v.reset(OpS390XMOVWZload)
  2374  		v.AddArg2(ptr, mem)
  2375  		return true
  2376  	}
  2377  	// match: (Load <t> ptr mem)
  2378  	// cond: is16BitInt(t) && isSigned(t)
  2379  	// result: (MOVHload ptr mem)
  2380  	for {
  2381  		t := v.Type
  2382  		ptr := v_0
  2383  		mem := v_1
  2384  		if !(is16BitInt(t) && isSigned(t)) {
  2385  			break
  2386  		}
  2387  		v.reset(OpS390XMOVHload)
  2388  		v.AddArg2(ptr, mem)
  2389  		return true
  2390  	}
  2391  	// match: (Load <t> ptr mem)
  2392  	// cond: is16BitInt(t) && !isSigned(t)
  2393  	// result: (MOVHZload ptr mem)
  2394  	for {
  2395  		t := v.Type
  2396  		ptr := v_0
  2397  		mem := v_1
  2398  		if !(is16BitInt(t) && !isSigned(t)) {
  2399  			break
  2400  		}
  2401  		v.reset(OpS390XMOVHZload)
  2402  		v.AddArg2(ptr, mem)
  2403  		return true
  2404  	}
  2405  	// match: (Load <t> ptr mem)
  2406  	// cond: is8BitInt(t) && isSigned(t)
  2407  	// result: (MOVBload ptr mem)
  2408  	for {
  2409  		t := v.Type
  2410  		ptr := v_0
  2411  		mem := v_1
  2412  		if !(is8BitInt(t) && isSigned(t)) {
  2413  			break
  2414  		}
  2415  		v.reset(OpS390XMOVBload)
  2416  		v.AddArg2(ptr, mem)
  2417  		return true
  2418  	}
  2419  	// match: (Load <t> ptr mem)
  2420  	// cond: (t.IsBoolean() || (is8BitInt(t) && !isSigned(t)))
  2421  	// result: (MOVBZload ptr mem)
  2422  	for {
  2423  		t := v.Type
  2424  		ptr := v_0
  2425  		mem := v_1
  2426  		if !(t.IsBoolean() || (is8BitInt(t) && !isSigned(t))) {
  2427  			break
  2428  		}
  2429  		v.reset(OpS390XMOVBZload)
  2430  		v.AddArg2(ptr, mem)
  2431  		return true
  2432  	}
  2433  	// match: (Load <t> ptr mem)
  2434  	// cond: is32BitFloat(t)
  2435  	// result: (FMOVSload ptr mem)
  2436  	for {
  2437  		t := v.Type
  2438  		ptr := v_0
  2439  		mem := v_1
  2440  		if !(is32BitFloat(t)) {
  2441  			break
  2442  		}
  2443  		v.reset(OpS390XFMOVSload)
  2444  		v.AddArg2(ptr, mem)
  2445  		return true
  2446  	}
  2447  	// match: (Load <t> ptr mem)
  2448  	// cond: is64BitFloat(t)
  2449  	// result: (FMOVDload ptr mem)
  2450  	for {
  2451  		t := v.Type
  2452  		ptr := v_0
  2453  		mem := v_1
  2454  		if !(is64BitFloat(t)) {
  2455  			break
  2456  		}
  2457  		v.reset(OpS390XFMOVDload)
  2458  		v.AddArg2(ptr, mem)
  2459  		return true
  2460  	}
  2461  	return false
  2462  }
  2463  func rewriteValueS390X_OpLocalAddr(v *Value) bool {
  2464  	v_0 := v.Args[0]
  2465  	// match: (LocalAddr {sym} base _)
  2466  	// result: (MOVDaddr {sym} base)
  2467  	for {
  2468  		sym := auxToSym(v.Aux)
  2469  		base := v_0
  2470  		v.reset(OpS390XMOVDaddr)
  2471  		v.Aux = symToAux(sym)
  2472  		v.AddArg(base)
  2473  		return true
  2474  	}
  2475  }
  2476  func rewriteValueS390X_OpLsh16x16(v *Value) bool {
  2477  	v_1 := v.Args[1]
  2478  	v_0 := v.Args[0]
  2479  	b := v.Block
  2480  	typ := &b.Func.Config.Types
  2481  	// match: (Lsh16x16 x y)
  2482  	// cond: shiftIsBounded(v)
  2483  	// result: (SLW x y)
  2484  	for {
  2485  		x := v_0
  2486  		y := v_1
  2487  		if !(shiftIsBounded(v)) {
  2488  			break
  2489  		}
  2490  		v.reset(OpS390XSLW)
  2491  		v.AddArg2(x, y)
  2492  		return true
  2493  	}
  2494  	// match: (Lsh16x16 <t> x y)
  2495  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2496  	for {
  2497  		t := v.Type
  2498  		x := v_0
  2499  		y := v_1
  2500  		v.reset(OpS390XLOCGR)
  2501  		v.Type = t
  2502  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2503  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2504  		v0.AddArg2(x, y)
  2505  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2506  		v1.AuxInt = int64ToAuxInt(0)
  2507  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2508  		v2.AuxInt = int32ToAuxInt(64)
  2509  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2510  		v3.AddArg(y)
  2511  		v2.AddArg(v3)
  2512  		v.AddArg3(v0, v1, v2)
  2513  		return true
  2514  	}
  2515  }
  2516  func rewriteValueS390X_OpLsh16x32(v *Value) bool {
  2517  	v_1 := v.Args[1]
  2518  	v_0 := v.Args[0]
  2519  	b := v.Block
  2520  	typ := &b.Func.Config.Types
  2521  	// match: (Lsh16x32 x y)
  2522  	// cond: shiftIsBounded(v)
  2523  	// result: (SLW x y)
  2524  	for {
  2525  		x := v_0
  2526  		y := v_1
  2527  		if !(shiftIsBounded(v)) {
  2528  			break
  2529  		}
  2530  		v.reset(OpS390XSLW)
  2531  		v.AddArg2(x, y)
  2532  		return true
  2533  	}
  2534  	// match: (Lsh16x32 <t> x y)
  2535  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2536  	for {
  2537  		t := v.Type
  2538  		x := v_0
  2539  		y := v_1
  2540  		v.reset(OpS390XLOCGR)
  2541  		v.Type = t
  2542  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2543  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2544  		v0.AddArg2(x, y)
  2545  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2546  		v1.AuxInt = int64ToAuxInt(0)
  2547  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2548  		v2.AuxInt = int32ToAuxInt(64)
  2549  		v2.AddArg(y)
  2550  		v.AddArg3(v0, v1, v2)
  2551  		return true
  2552  	}
  2553  }
  2554  func rewriteValueS390X_OpLsh16x64(v *Value) bool {
  2555  	v_1 := v.Args[1]
  2556  	v_0 := v.Args[0]
  2557  	b := v.Block
  2558  	typ := &b.Func.Config.Types
  2559  	// match: (Lsh16x64 x y)
  2560  	// cond: shiftIsBounded(v)
  2561  	// result: (SLW x y)
  2562  	for {
  2563  		x := v_0
  2564  		y := v_1
  2565  		if !(shiftIsBounded(v)) {
  2566  			break
  2567  		}
  2568  		v.reset(OpS390XSLW)
  2569  		v.AddArg2(x, y)
  2570  		return true
  2571  	}
  2572  	// match: (Lsh16x64 <t> x y)
  2573  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2574  	for {
  2575  		t := v.Type
  2576  		x := v_0
  2577  		y := v_1
  2578  		v.reset(OpS390XLOCGR)
  2579  		v.Type = t
  2580  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2581  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2582  		v0.AddArg2(x, y)
  2583  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2584  		v1.AuxInt = int64ToAuxInt(0)
  2585  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2586  		v2.AuxInt = int32ToAuxInt(64)
  2587  		v2.AddArg(y)
  2588  		v.AddArg3(v0, v1, v2)
  2589  		return true
  2590  	}
  2591  }
  2592  func rewriteValueS390X_OpLsh16x8(v *Value) bool {
  2593  	v_1 := v.Args[1]
  2594  	v_0 := v.Args[0]
  2595  	b := v.Block
  2596  	typ := &b.Func.Config.Types
  2597  	// match: (Lsh16x8 x y)
  2598  	// cond: shiftIsBounded(v)
  2599  	// result: (SLW x y)
  2600  	for {
  2601  		x := v_0
  2602  		y := v_1
  2603  		if !(shiftIsBounded(v)) {
  2604  			break
  2605  		}
  2606  		v.reset(OpS390XSLW)
  2607  		v.AddArg2(x, y)
  2608  		return true
  2609  	}
  2610  	// match: (Lsh16x8 <t> x y)
  2611  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2612  	for {
  2613  		t := v.Type
  2614  		x := v_0
  2615  		y := v_1
  2616  		v.reset(OpS390XLOCGR)
  2617  		v.Type = t
  2618  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2619  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2620  		v0.AddArg2(x, y)
  2621  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2622  		v1.AuxInt = int64ToAuxInt(0)
  2623  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2624  		v2.AuxInt = int32ToAuxInt(64)
  2625  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2626  		v3.AddArg(y)
  2627  		v2.AddArg(v3)
  2628  		v.AddArg3(v0, v1, v2)
  2629  		return true
  2630  	}
  2631  }
  2632  func rewriteValueS390X_OpLsh32x16(v *Value) bool {
  2633  	v_1 := v.Args[1]
  2634  	v_0 := v.Args[0]
  2635  	b := v.Block
  2636  	typ := &b.Func.Config.Types
  2637  	// match: (Lsh32x16 x y)
  2638  	// cond: shiftIsBounded(v)
  2639  	// result: (SLW x y)
  2640  	for {
  2641  		x := v_0
  2642  		y := v_1
  2643  		if !(shiftIsBounded(v)) {
  2644  			break
  2645  		}
  2646  		v.reset(OpS390XSLW)
  2647  		v.AddArg2(x, y)
  2648  		return true
  2649  	}
  2650  	// match: (Lsh32x16 <t> x y)
  2651  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2652  	for {
  2653  		t := v.Type
  2654  		x := v_0
  2655  		y := v_1
  2656  		v.reset(OpS390XLOCGR)
  2657  		v.Type = t
  2658  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2659  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2660  		v0.AddArg2(x, y)
  2661  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2662  		v1.AuxInt = int64ToAuxInt(0)
  2663  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2664  		v2.AuxInt = int32ToAuxInt(64)
  2665  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2666  		v3.AddArg(y)
  2667  		v2.AddArg(v3)
  2668  		v.AddArg3(v0, v1, v2)
  2669  		return true
  2670  	}
  2671  }
  2672  func rewriteValueS390X_OpLsh32x32(v *Value) bool {
  2673  	v_1 := v.Args[1]
  2674  	v_0 := v.Args[0]
  2675  	b := v.Block
  2676  	typ := &b.Func.Config.Types
  2677  	// match: (Lsh32x32 x y)
  2678  	// cond: shiftIsBounded(v)
  2679  	// result: (SLW x y)
  2680  	for {
  2681  		x := v_0
  2682  		y := v_1
  2683  		if !(shiftIsBounded(v)) {
  2684  			break
  2685  		}
  2686  		v.reset(OpS390XSLW)
  2687  		v.AddArg2(x, y)
  2688  		return true
  2689  	}
  2690  	// match: (Lsh32x32 <t> x y)
  2691  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2692  	for {
  2693  		t := v.Type
  2694  		x := v_0
  2695  		y := v_1
  2696  		v.reset(OpS390XLOCGR)
  2697  		v.Type = t
  2698  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2699  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2700  		v0.AddArg2(x, y)
  2701  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2702  		v1.AuxInt = int64ToAuxInt(0)
  2703  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2704  		v2.AuxInt = int32ToAuxInt(64)
  2705  		v2.AddArg(y)
  2706  		v.AddArg3(v0, v1, v2)
  2707  		return true
  2708  	}
  2709  }
  2710  func rewriteValueS390X_OpLsh32x64(v *Value) bool {
  2711  	v_1 := v.Args[1]
  2712  	v_0 := v.Args[0]
  2713  	b := v.Block
  2714  	typ := &b.Func.Config.Types
  2715  	// match: (Lsh32x64 x y)
  2716  	// cond: shiftIsBounded(v)
  2717  	// result: (SLW x y)
  2718  	for {
  2719  		x := v_0
  2720  		y := v_1
  2721  		if !(shiftIsBounded(v)) {
  2722  			break
  2723  		}
  2724  		v.reset(OpS390XSLW)
  2725  		v.AddArg2(x, y)
  2726  		return true
  2727  	}
  2728  	// match: (Lsh32x64 <t> x y)
  2729  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2730  	for {
  2731  		t := v.Type
  2732  		x := v_0
  2733  		y := v_1
  2734  		v.reset(OpS390XLOCGR)
  2735  		v.Type = t
  2736  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2737  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2738  		v0.AddArg2(x, y)
  2739  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2740  		v1.AuxInt = int64ToAuxInt(0)
  2741  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2742  		v2.AuxInt = int32ToAuxInt(64)
  2743  		v2.AddArg(y)
  2744  		v.AddArg3(v0, v1, v2)
  2745  		return true
  2746  	}
  2747  }
  2748  func rewriteValueS390X_OpLsh32x8(v *Value) bool {
  2749  	v_1 := v.Args[1]
  2750  	v_0 := v.Args[0]
  2751  	b := v.Block
  2752  	typ := &b.Func.Config.Types
  2753  	// match: (Lsh32x8 x y)
  2754  	// cond: shiftIsBounded(v)
  2755  	// result: (SLW x y)
  2756  	for {
  2757  		x := v_0
  2758  		y := v_1
  2759  		if !(shiftIsBounded(v)) {
  2760  			break
  2761  		}
  2762  		v.reset(OpS390XSLW)
  2763  		v.AddArg2(x, y)
  2764  		return true
  2765  	}
  2766  	// match: (Lsh32x8 <t> x y)
  2767  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2768  	for {
  2769  		t := v.Type
  2770  		x := v_0
  2771  		y := v_1
  2772  		v.reset(OpS390XLOCGR)
  2773  		v.Type = t
  2774  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2775  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2776  		v0.AddArg2(x, y)
  2777  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2778  		v1.AuxInt = int64ToAuxInt(0)
  2779  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2780  		v2.AuxInt = int32ToAuxInt(64)
  2781  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2782  		v3.AddArg(y)
  2783  		v2.AddArg(v3)
  2784  		v.AddArg3(v0, v1, v2)
  2785  		return true
  2786  	}
  2787  }
  2788  func rewriteValueS390X_OpLsh64x16(v *Value) bool {
  2789  	v_1 := v.Args[1]
  2790  	v_0 := v.Args[0]
  2791  	b := v.Block
  2792  	typ := &b.Func.Config.Types
  2793  	// match: (Lsh64x16 x y)
  2794  	// cond: shiftIsBounded(v)
  2795  	// result: (SLD x y)
  2796  	for {
  2797  		x := v_0
  2798  		y := v_1
  2799  		if !(shiftIsBounded(v)) {
  2800  			break
  2801  		}
  2802  		v.reset(OpS390XSLD)
  2803  		v.AddArg2(x, y)
  2804  		return true
  2805  	}
  2806  	// match: (Lsh64x16 <t> x y)
  2807  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2808  	for {
  2809  		t := v.Type
  2810  		x := v_0
  2811  		y := v_1
  2812  		v.reset(OpS390XLOCGR)
  2813  		v.Type = t
  2814  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2815  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2816  		v0.AddArg2(x, y)
  2817  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2818  		v1.AuxInt = int64ToAuxInt(0)
  2819  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2820  		v2.AuxInt = int32ToAuxInt(64)
  2821  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2822  		v3.AddArg(y)
  2823  		v2.AddArg(v3)
  2824  		v.AddArg3(v0, v1, v2)
  2825  		return true
  2826  	}
  2827  }
  2828  func rewriteValueS390X_OpLsh64x32(v *Value) bool {
  2829  	v_1 := v.Args[1]
  2830  	v_0 := v.Args[0]
  2831  	b := v.Block
  2832  	typ := &b.Func.Config.Types
  2833  	// match: (Lsh64x32 x y)
  2834  	// cond: shiftIsBounded(v)
  2835  	// result: (SLD x y)
  2836  	for {
  2837  		x := v_0
  2838  		y := v_1
  2839  		if !(shiftIsBounded(v)) {
  2840  			break
  2841  		}
  2842  		v.reset(OpS390XSLD)
  2843  		v.AddArg2(x, y)
  2844  		return true
  2845  	}
  2846  	// match: (Lsh64x32 <t> x y)
  2847  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2848  	for {
  2849  		t := v.Type
  2850  		x := v_0
  2851  		y := v_1
  2852  		v.reset(OpS390XLOCGR)
  2853  		v.Type = t
  2854  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2855  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2856  		v0.AddArg2(x, y)
  2857  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2858  		v1.AuxInt = int64ToAuxInt(0)
  2859  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2860  		v2.AuxInt = int32ToAuxInt(64)
  2861  		v2.AddArg(y)
  2862  		v.AddArg3(v0, v1, v2)
  2863  		return true
  2864  	}
  2865  }
  2866  func rewriteValueS390X_OpLsh64x64(v *Value) bool {
  2867  	v_1 := v.Args[1]
  2868  	v_0 := v.Args[0]
  2869  	b := v.Block
  2870  	typ := &b.Func.Config.Types
  2871  	// match: (Lsh64x64 x y)
  2872  	// cond: shiftIsBounded(v)
  2873  	// result: (SLD x y)
  2874  	for {
  2875  		x := v_0
  2876  		y := v_1
  2877  		if !(shiftIsBounded(v)) {
  2878  			break
  2879  		}
  2880  		v.reset(OpS390XSLD)
  2881  		v.AddArg2(x, y)
  2882  		return true
  2883  	}
  2884  	// match: (Lsh64x64 <t> x y)
  2885  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2886  	for {
  2887  		t := v.Type
  2888  		x := v_0
  2889  		y := v_1
  2890  		v.reset(OpS390XLOCGR)
  2891  		v.Type = t
  2892  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2893  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2894  		v0.AddArg2(x, y)
  2895  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2896  		v1.AuxInt = int64ToAuxInt(0)
  2897  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2898  		v2.AuxInt = int32ToAuxInt(64)
  2899  		v2.AddArg(y)
  2900  		v.AddArg3(v0, v1, v2)
  2901  		return true
  2902  	}
  2903  }
  2904  func rewriteValueS390X_OpLsh64x8(v *Value) bool {
  2905  	v_1 := v.Args[1]
  2906  	v_0 := v.Args[0]
  2907  	b := v.Block
  2908  	typ := &b.Func.Config.Types
  2909  	// match: (Lsh64x8 x y)
  2910  	// cond: shiftIsBounded(v)
  2911  	// result: (SLD x y)
  2912  	for {
  2913  		x := v_0
  2914  		y := v_1
  2915  		if !(shiftIsBounded(v)) {
  2916  			break
  2917  		}
  2918  		v.reset(OpS390XSLD)
  2919  		v.AddArg2(x, y)
  2920  		return true
  2921  	}
  2922  	// match: (Lsh64x8 <t> x y)
  2923  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2924  	for {
  2925  		t := v.Type
  2926  		x := v_0
  2927  		y := v_1
  2928  		v.reset(OpS390XLOCGR)
  2929  		v.Type = t
  2930  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2931  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2932  		v0.AddArg2(x, y)
  2933  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2934  		v1.AuxInt = int64ToAuxInt(0)
  2935  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2936  		v2.AuxInt = int32ToAuxInt(64)
  2937  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2938  		v3.AddArg(y)
  2939  		v2.AddArg(v3)
  2940  		v.AddArg3(v0, v1, v2)
  2941  		return true
  2942  	}
  2943  }
  2944  func rewriteValueS390X_OpLsh8x16(v *Value) bool {
  2945  	v_1 := v.Args[1]
  2946  	v_0 := v.Args[0]
  2947  	b := v.Block
  2948  	typ := &b.Func.Config.Types
  2949  	// match: (Lsh8x16 x y)
  2950  	// cond: shiftIsBounded(v)
  2951  	// result: (SLW x y)
  2952  	for {
  2953  		x := v_0
  2954  		y := v_1
  2955  		if !(shiftIsBounded(v)) {
  2956  			break
  2957  		}
  2958  		v.reset(OpS390XSLW)
  2959  		v.AddArg2(x, y)
  2960  		return true
  2961  	}
  2962  	// match: (Lsh8x16 <t> x y)
  2963  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2964  	for {
  2965  		t := v.Type
  2966  		x := v_0
  2967  		y := v_1
  2968  		v.reset(OpS390XLOCGR)
  2969  		v.Type = t
  2970  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2971  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2972  		v0.AddArg2(x, y)
  2973  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2974  		v1.AuxInt = int64ToAuxInt(0)
  2975  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2976  		v2.AuxInt = int32ToAuxInt(64)
  2977  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2978  		v3.AddArg(y)
  2979  		v2.AddArg(v3)
  2980  		v.AddArg3(v0, v1, v2)
  2981  		return true
  2982  	}
  2983  }
  2984  func rewriteValueS390X_OpLsh8x32(v *Value) bool {
  2985  	v_1 := v.Args[1]
  2986  	v_0 := v.Args[0]
  2987  	b := v.Block
  2988  	typ := &b.Func.Config.Types
  2989  	// match: (Lsh8x32 x y)
  2990  	// cond: shiftIsBounded(v)
  2991  	// result: (SLW x y)
  2992  	for {
  2993  		x := v_0
  2994  		y := v_1
  2995  		if !(shiftIsBounded(v)) {
  2996  			break
  2997  		}
  2998  		v.reset(OpS390XSLW)
  2999  		v.AddArg2(x, y)
  3000  		return true
  3001  	}
  3002  	// match: (Lsh8x32 <t> x y)
  3003  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  3004  	for {
  3005  		t := v.Type
  3006  		x := v_0
  3007  		y := v_1
  3008  		v.reset(OpS390XLOCGR)
  3009  		v.Type = t
  3010  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3011  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3012  		v0.AddArg2(x, y)
  3013  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3014  		v1.AuxInt = int64ToAuxInt(0)
  3015  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3016  		v2.AuxInt = int32ToAuxInt(64)
  3017  		v2.AddArg(y)
  3018  		v.AddArg3(v0, v1, v2)
  3019  		return true
  3020  	}
  3021  }
  3022  func rewriteValueS390X_OpLsh8x64(v *Value) bool {
  3023  	v_1 := v.Args[1]
  3024  	v_0 := v.Args[0]
  3025  	b := v.Block
  3026  	typ := &b.Func.Config.Types
  3027  	// match: (Lsh8x64 x y)
  3028  	// cond: shiftIsBounded(v)
  3029  	// result: (SLW x y)
  3030  	for {
  3031  		x := v_0
  3032  		y := v_1
  3033  		if !(shiftIsBounded(v)) {
  3034  			break
  3035  		}
  3036  		v.reset(OpS390XSLW)
  3037  		v.AddArg2(x, y)
  3038  		return true
  3039  	}
  3040  	// match: (Lsh8x64 <t> x y)
  3041  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3042  	for {
  3043  		t := v.Type
  3044  		x := v_0
  3045  		y := v_1
  3046  		v.reset(OpS390XLOCGR)
  3047  		v.Type = t
  3048  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3049  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3050  		v0.AddArg2(x, y)
  3051  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3052  		v1.AuxInt = int64ToAuxInt(0)
  3053  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  3054  		v2.AuxInt = int32ToAuxInt(64)
  3055  		v2.AddArg(y)
  3056  		v.AddArg3(v0, v1, v2)
  3057  		return true
  3058  	}
  3059  }
  3060  func rewriteValueS390X_OpLsh8x8(v *Value) bool {
  3061  	v_1 := v.Args[1]
  3062  	v_0 := v.Args[0]
  3063  	b := v.Block
  3064  	typ := &b.Func.Config.Types
  3065  	// match: (Lsh8x8 x y)
  3066  	// cond: shiftIsBounded(v)
  3067  	// result: (SLW x y)
  3068  	for {
  3069  		x := v_0
  3070  		y := v_1
  3071  		if !(shiftIsBounded(v)) {
  3072  			break
  3073  		}
  3074  		v.reset(OpS390XSLW)
  3075  		v.AddArg2(x, y)
  3076  		return true
  3077  	}
  3078  	// match: (Lsh8x8 <t> x y)
  3079  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3080  	for {
  3081  		t := v.Type
  3082  		x := v_0
  3083  		y := v_1
  3084  		v.reset(OpS390XLOCGR)
  3085  		v.Type = t
  3086  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3087  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3088  		v0.AddArg2(x, y)
  3089  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3090  		v1.AuxInt = int64ToAuxInt(0)
  3091  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3092  		v2.AuxInt = int32ToAuxInt(64)
  3093  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3094  		v3.AddArg(y)
  3095  		v2.AddArg(v3)
  3096  		v.AddArg3(v0, v1, v2)
  3097  		return true
  3098  	}
  3099  }
  3100  func rewriteValueS390X_OpMod16(v *Value) bool {
  3101  	v_1 := v.Args[1]
  3102  	v_0 := v.Args[0]
  3103  	b := v.Block
  3104  	typ := &b.Func.Config.Types
  3105  	// match: (Mod16 x y)
  3106  	// result: (MODW (MOVHreg x) (MOVHreg y))
  3107  	for {
  3108  		x := v_0
  3109  		y := v_1
  3110  		v.reset(OpS390XMODW)
  3111  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3112  		v0.AddArg(x)
  3113  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3114  		v1.AddArg(y)
  3115  		v.AddArg2(v0, v1)
  3116  		return true
  3117  	}
  3118  }
  3119  func rewriteValueS390X_OpMod16u(v *Value) bool {
  3120  	v_1 := v.Args[1]
  3121  	v_0 := v.Args[0]
  3122  	b := v.Block
  3123  	typ := &b.Func.Config.Types
  3124  	// match: (Mod16u x y)
  3125  	// result: (MODWU (MOVHZreg x) (MOVHZreg y))
  3126  	for {
  3127  		x := v_0
  3128  		y := v_1
  3129  		v.reset(OpS390XMODWU)
  3130  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3131  		v0.AddArg(x)
  3132  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3133  		v1.AddArg(y)
  3134  		v.AddArg2(v0, v1)
  3135  		return true
  3136  	}
  3137  }
  3138  func rewriteValueS390X_OpMod32(v *Value) bool {
  3139  	v_1 := v.Args[1]
  3140  	v_0 := v.Args[0]
  3141  	b := v.Block
  3142  	typ := &b.Func.Config.Types
  3143  	// match: (Mod32 x y)
  3144  	// result: (MODW (MOVWreg x) y)
  3145  	for {
  3146  		x := v_0
  3147  		y := v_1
  3148  		v.reset(OpS390XMODW)
  3149  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  3150  		v0.AddArg(x)
  3151  		v.AddArg2(v0, y)
  3152  		return true
  3153  	}
  3154  }
  3155  func rewriteValueS390X_OpMod32u(v *Value) bool {
  3156  	v_1 := v.Args[1]
  3157  	v_0 := v.Args[0]
  3158  	b := v.Block
  3159  	typ := &b.Func.Config.Types
  3160  	// match: (Mod32u x y)
  3161  	// result: (MODWU (MOVWZreg x) y)
  3162  	for {
  3163  		x := v_0
  3164  		y := v_1
  3165  		v.reset(OpS390XMODWU)
  3166  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  3167  		v0.AddArg(x)
  3168  		v.AddArg2(v0, y)
  3169  		return true
  3170  	}
  3171  }
  3172  func rewriteValueS390X_OpMod64(v *Value) bool {
  3173  	v_1 := v.Args[1]
  3174  	v_0 := v.Args[0]
  3175  	// match: (Mod64 x y)
  3176  	// result: (MODD x y)
  3177  	for {
  3178  		x := v_0
  3179  		y := v_1
  3180  		v.reset(OpS390XMODD)
  3181  		v.AddArg2(x, y)
  3182  		return true
  3183  	}
  3184  }
  3185  func rewriteValueS390X_OpMod8(v *Value) bool {
  3186  	v_1 := v.Args[1]
  3187  	v_0 := v.Args[0]
  3188  	b := v.Block
  3189  	typ := &b.Func.Config.Types
  3190  	// match: (Mod8 x y)
  3191  	// result: (MODW (MOVBreg x) (MOVBreg y))
  3192  	for {
  3193  		x := v_0
  3194  		y := v_1
  3195  		v.reset(OpS390XMODW)
  3196  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3197  		v0.AddArg(x)
  3198  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3199  		v1.AddArg(y)
  3200  		v.AddArg2(v0, v1)
  3201  		return true
  3202  	}
  3203  }
  3204  func rewriteValueS390X_OpMod8u(v *Value) bool {
  3205  	v_1 := v.Args[1]
  3206  	v_0 := v.Args[0]
  3207  	b := v.Block
  3208  	typ := &b.Func.Config.Types
  3209  	// match: (Mod8u x y)
  3210  	// result: (MODWU (MOVBZreg x) (MOVBZreg y))
  3211  	for {
  3212  		x := v_0
  3213  		y := v_1
  3214  		v.reset(OpS390XMODWU)
  3215  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3216  		v0.AddArg(x)
  3217  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3218  		v1.AddArg(y)
  3219  		v.AddArg2(v0, v1)
  3220  		return true
  3221  	}
  3222  }
  3223  func rewriteValueS390X_OpMove(v *Value) bool {
  3224  	v_2 := v.Args[2]
  3225  	v_1 := v.Args[1]
  3226  	v_0 := v.Args[0]
  3227  	b := v.Block
  3228  	typ := &b.Func.Config.Types
  3229  	// match: (Move [0] _ _ mem)
  3230  	// result: mem
  3231  	for {
  3232  		if auxIntToInt64(v.AuxInt) != 0 {
  3233  			break
  3234  		}
  3235  		mem := v_2
  3236  		v.copyOf(mem)
  3237  		return true
  3238  	}
  3239  	// match: (Move [1] dst src mem)
  3240  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3241  	for {
  3242  		if auxIntToInt64(v.AuxInt) != 1 {
  3243  			break
  3244  		}
  3245  		dst := v_0
  3246  		src := v_1
  3247  		mem := v_2
  3248  		v.reset(OpS390XMOVBstore)
  3249  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3250  		v0.AddArg2(src, mem)
  3251  		v.AddArg3(dst, v0, mem)
  3252  		return true
  3253  	}
  3254  	// match: (Move [2] dst src mem)
  3255  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3256  	for {
  3257  		if auxIntToInt64(v.AuxInt) != 2 {
  3258  			break
  3259  		}
  3260  		dst := v_0
  3261  		src := v_1
  3262  		mem := v_2
  3263  		v.reset(OpS390XMOVHstore)
  3264  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3265  		v0.AddArg2(src, mem)
  3266  		v.AddArg3(dst, v0, mem)
  3267  		return true
  3268  	}
  3269  	// match: (Move [4] dst src mem)
  3270  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3271  	for {
  3272  		if auxIntToInt64(v.AuxInt) != 4 {
  3273  			break
  3274  		}
  3275  		dst := v_0
  3276  		src := v_1
  3277  		mem := v_2
  3278  		v.reset(OpS390XMOVWstore)
  3279  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3280  		v0.AddArg2(src, mem)
  3281  		v.AddArg3(dst, v0, mem)
  3282  		return true
  3283  	}
  3284  	// match: (Move [8] dst src mem)
  3285  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3286  	for {
  3287  		if auxIntToInt64(v.AuxInt) != 8 {
  3288  			break
  3289  		}
  3290  		dst := v_0
  3291  		src := v_1
  3292  		mem := v_2
  3293  		v.reset(OpS390XMOVDstore)
  3294  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3295  		v0.AddArg2(src, mem)
  3296  		v.AddArg3(dst, v0, mem)
  3297  		return true
  3298  	}
  3299  	// match: (Move [16] dst src mem)
  3300  	// result: (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
  3301  	for {
  3302  		if auxIntToInt64(v.AuxInt) != 16 {
  3303  			break
  3304  		}
  3305  		dst := v_0
  3306  		src := v_1
  3307  		mem := v_2
  3308  		v.reset(OpS390XMOVDstore)
  3309  		v.AuxInt = int32ToAuxInt(8)
  3310  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3311  		v0.AuxInt = int32ToAuxInt(8)
  3312  		v0.AddArg2(src, mem)
  3313  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3314  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3315  		v2.AddArg2(src, mem)
  3316  		v1.AddArg3(dst, v2, mem)
  3317  		v.AddArg3(dst, v0, v1)
  3318  		return true
  3319  	}
  3320  	// match: (Move [24] dst src mem)
  3321  	// result: (MOVDstore [16] dst (MOVDload [16] src mem) (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem)))
  3322  	for {
  3323  		if auxIntToInt64(v.AuxInt) != 24 {
  3324  			break
  3325  		}
  3326  		dst := v_0
  3327  		src := v_1
  3328  		mem := v_2
  3329  		v.reset(OpS390XMOVDstore)
  3330  		v.AuxInt = int32ToAuxInt(16)
  3331  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3332  		v0.AuxInt = int32ToAuxInt(16)
  3333  		v0.AddArg2(src, mem)
  3334  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3335  		v1.AuxInt = int32ToAuxInt(8)
  3336  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3337  		v2.AuxInt = int32ToAuxInt(8)
  3338  		v2.AddArg2(src, mem)
  3339  		v3 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3340  		v4 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3341  		v4.AddArg2(src, mem)
  3342  		v3.AddArg3(dst, v4, mem)
  3343  		v1.AddArg3(dst, v2, v3)
  3344  		v.AddArg3(dst, v0, v1)
  3345  		return true
  3346  	}
  3347  	// match: (Move [3] dst src mem)
  3348  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHZload src mem) mem))
  3349  	for {
  3350  		if auxIntToInt64(v.AuxInt) != 3 {
  3351  			break
  3352  		}
  3353  		dst := v_0
  3354  		src := v_1
  3355  		mem := v_2
  3356  		v.reset(OpS390XMOVBstore)
  3357  		v.AuxInt = int32ToAuxInt(2)
  3358  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3359  		v0.AuxInt = int32ToAuxInt(2)
  3360  		v0.AddArg2(src, mem)
  3361  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3362  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3363  		v2.AddArg2(src, mem)
  3364  		v1.AddArg3(dst, v2, mem)
  3365  		v.AddArg3(dst, v0, v1)
  3366  		return true
  3367  	}
  3368  	// match: (Move [5] dst src mem)
  3369  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3370  	for {
  3371  		if auxIntToInt64(v.AuxInt) != 5 {
  3372  			break
  3373  		}
  3374  		dst := v_0
  3375  		src := v_1
  3376  		mem := v_2
  3377  		v.reset(OpS390XMOVBstore)
  3378  		v.AuxInt = int32ToAuxInt(4)
  3379  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3380  		v0.AuxInt = int32ToAuxInt(4)
  3381  		v0.AddArg2(src, mem)
  3382  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3383  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3384  		v2.AddArg2(src, mem)
  3385  		v1.AddArg3(dst, v2, mem)
  3386  		v.AddArg3(dst, v0, v1)
  3387  		return true
  3388  	}
  3389  	// match: (Move [6] dst src mem)
  3390  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3391  	for {
  3392  		if auxIntToInt64(v.AuxInt) != 6 {
  3393  			break
  3394  		}
  3395  		dst := v_0
  3396  		src := v_1
  3397  		mem := v_2
  3398  		v.reset(OpS390XMOVHstore)
  3399  		v.AuxInt = int32ToAuxInt(4)
  3400  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3401  		v0.AuxInt = int32ToAuxInt(4)
  3402  		v0.AddArg2(src, mem)
  3403  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3404  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3405  		v2.AddArg2(src, mem)
  3406  		v1.AddArg3(dst, v2, mem)
  3407  		v.AddArg3(dst, v0, v1)
  3408  		return true
  3409  	}
  3410  	// match: (Move [7] dst src mem)
  3411  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3412  	for {
  3413  		if auxIntToInt64(v.AuxInt) != 7 {
  3414  			break
  3415  		}
  3416  		dst := v_0
  3417  		src := v_1
  3418  		mem := v_2
  3419  		v.reset(OpS390XMOVBstore)
  3420  		v.AuxInt = int32ToAuxInt(6)
  3421  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3422  		v0.AuxInt = int32ToAuxInt(6)
  3423  		v0.AddArg2(src, mem)
  3424  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3425  		v1.AuxInt = int32ToAuxInt(4)
  3426  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3427  		v2.AuxInt = int32ToAuxInt(4)
  3428  		v2.AddArg2(src, mem)
  3429  		v3 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3430  		v4 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3431  		v4.AddArg2(src, mem)
  3432  		v3.AddArg3(dst, v4, mem)
  3433  		v1.AddArg3(dst, v2, v3)
  3434  		v.AddArg3(dst, v0, v1)
  3435  		return true
  3436  	}
  3437  	// match: (Move [s] dst src mem)
  3438  	// cond: s > 0 && s <= 256 && logLargeCopy(v, s)
  3439  	// result: (MVC [makeValAndOff(int32(s), 0)] dst src mem)
  3440  	for {
  3441  		s := auxIntToInt64(v.AuxInt)
  3442  		dst := v_0
  3443  		src := v_1
  3444  		mem := v_2
  3445  		if !(s > 0 && s <= 256 && logLargeCopy(v, s)) {
  3446  			break
  3447  		}
  3448  		v.reset(OpS390XMVC)
  3449  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s), 0))
  3450  		v.AddArg3(dst, src, mem)
  3451  		return true
  3452  	}
  3453  	// match: (Move [s] dst src mem)
  3454  	// cond: s > 256 && s <= 512 && logLargeCopy(v, s)
  3455  	// result: (MVC [makeValAndOff(int32(s)-256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem))
  3456  	for {
  3457  		s := auxIntToInt64(v.AuxInt)
  3458  		dst := v_0
  3459  		src := v_1
  3460  		mem := v_2
  3461  		if !(s > 256 && s <= 512 && logLargeCopy(v, s)) {
  3462  			break
  3463  		}
  3464  		v.reset(OpS390XMVC)
  3465  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-256, 256))
  3466  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3467  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3468  		v0.AddArg3(dst, src, mem)
  3469  		v.AddArg3(dst, src, v0)
  3470  		return true
  3471  	}
  3472  	// match: (Move [s] dst src mem)
  3473  	// cond: s > 512 && s <= 768 && logLargeCopy(v, s)
  3474  	// result: (MVC [makeValAndOff(int32(s)-512, 512)] dst src (MVC [makeValAndOff(256, 256)] dst src (MVC [makeValAndOff(256, 0)] dst src mem)))
  3475  	for {
  3476  		s := auxIntToInt64(v.AuxInt)
  3477  		dst := v_0
  3478  		src := v_1
  3479  		mem := v_2
  3480  		if !(s > 512 && s <= 768 && logLargeCopy(v, s)) {
  3481  			break
  3482  		}
  3483  		v.reset(OpS390XMVC)
  3484  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-512, 512))
  3485  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3486  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 256))
  3487  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3488  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3489  		v1.AddArg3(dst, src, mem)
  3490  		v0.AddArg3(dst, src, v1)
  3491  		v.AddArg3(dst, src, v0)
  3492  		return true
  3493  	}
  3494  	// match: (Move [s] dst src mem)
  3495  	// cond: s > 768 && s <= 1024 && logLargeCopy(v, s)
  3496  	// 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))))
  3497  	for {
  3498  		s := auxIntToInt64(v.AuxInt)
  3499  		dst := v_0
  3500  		src := v_1
  3501  		mem := v_2
  3502  		if !(s > 768 && s <= 1024 && logLargeCopy(v, s)) {
  3503  			break
  3504  		}
  3505  		v.reset(OpS390XMVC)
  3506  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s)-768, 768))
  3507  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3508  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 512))
  3509  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3510  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 256))
  3511  		v2 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3512  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff(256, 0))
  3513  		v2.AddArg3(dst, src, mem)
  3514  		v1.AddArg3(dst, src, v2)
  3515  		v0.AddArg3(dst, src, v1)
  3516  		v.AddArg3(dst, src, v0)
  3517  		return true
  3518  	}
  3519  	// match: (Move [s] dst src mem)
  3520  	// cond: s > 1024 && logLargeCopy(v, s)
  3521  	// result: (LoweredMove [s%256] dst src (ADD <src.Type> src (MOVDconst [(s/256)*256])) mem)
  3522  	for {
  3523  		s := auxIntToInt64(v.AuxInt)
  3524  		dst := v_0
  3525  		src := v_1
  3526  		mem := v_2
  3527  		if !(s > 1024 && logLargeCopy(v, s)) {
  3528  			break
  3529  		}
  3530  		v.reset(OpS390XLoweredMove)
  3531  		v.AuxInt = int64ToAuxInt(s % 256)
  3532  		v0 := b.NewValue0(v.Pos, OpS390XADD, src.Type)
  3533  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3534  		v1.AuxInt = int64ToAuxInt((s / 256) * 256)
  3535  		v0.AddArg2(src, v1)
  3536  		v.AddArg4(dst, src, v0, mem)
  3537  		return true
  3538  	}
  3539  	return false
  3540  }
  3541  func rewriteValueS390X_OpNeq16(v *Value) bool {
  3542  	v_1 := v.Args[1]
  3543  	v_0 := v.Args[0]
  3544  	b := v.Block
  3545  	typ := &b.Func.Config.Types
  3546  	// match: (Neq16 x y)
  3547  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  3548  	for {
  3549  		x := v_0
  3550  		y := v_1
  3551  		v.reset(OpS390XLOCGR)
  3552  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3553  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3554  		v0.AuxInt = int64ToAuxInt(0)
  3555  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3556  		v1.AuxInt = int64ToAuxInt(1)
  3557  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3558  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3559  		v3.AddArg(x)
  3560  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3561  		v4.AddArg(y)
  3562  		v2.AddArg2(v3, v4)
  3563  		v.AddArg3(v0, v1, v2)
  3564  		return true
  3565  	}
  3566  }
  3567  func rewriteValueS390X_OpNeq32(v *Value) bool {
  3568  	v_1 := v.Args[1]
  3569  	v_0 := v.Args[0]
  3570  	b := v.Block
  3571  	typ := &b.Func.Config.Types
  3572  	// match: (Neq32 x y)
  3573  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  3574  	for {
  3575  		x := v_0
  3576  		y := v_1
  3577  		v.reset(OpS390XLOCGR)
  3578  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3579  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3580  		v0.AuxInt = int64ToAuxInt(0)
  3581  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3582  		v1.AuxInt = int64ToAuxInt(1)
  3583  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3584  		v2.AddArg2(x, y)
  3585  		v.AddArg3(v0, v1, v2)
  3586  		return true
  3587  	}
  3588  }
  3589  func rewriteValueS390X_OpNeq32F(v *Value) bool {
  3590  	v_1 := v.Args[1]
  3591  	v_0 := v.Args[0]
  3592  	b := v.Block
  3593  	typ := &b.Func.Config.Types
  3594  	// match: (Neq32F x y)
  3595  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  3596  	for {
  3597  		x := v_0
  3598  		y := v_1
  3599  		v.reset(OpS390XLOCGR)
  3600  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3601  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3602  		v0.AuxInt = int64ToAuxInt(0)
  3603  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3604  		v1.AuxInt = int64ToAuxInt(1)
  3605  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  3606  		v2.AddArg2(x, y)
  3607  		v.AddArg3(v0, v1, v2)
  3608  		return true
  3609  	}
  3610  }
  3611  func rewriteValueS390X_OpNeq64(v *Value) bool {
  3612  	v_1 := v.Args[1]
  3613  	v_0 := v.Args[0]
  3614  	b := v.Block
  3615  	typ := &b.Func.Config.Types
  3616  	// match: (Neq64 x y)
  3617  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3618  	for {
  3619  		x := v_0
  3620  		y := v_1
  3621  		v.reset(OpS390XLOCGR)
  3622  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3623  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3624  		v0.AuxInt = int64ToAuxInt(0)
  3625  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3626  		v1.AuxInt = int64ToAuxInt(1)
  3627  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3628  		v2.AddArg2(x, y)
  3629  		v.AddArg3(v0, v1, v2)
  3630  		return true
  3631  	}
  3632  }
  3633  func rewriteValueS390X_OpNeq64F(v *Value) bool {
  3634  	v_1 := v.Args[1]
  3635  	v_0 := v.Args[0]
  3636  	b := v.Block
  3637  	typ := &b.Func.Config.Types
  3638  	// match: (Neq64F x y)
  3639  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  3640  	for {
  3641  		x := v_0
  3642  		y := v_1
  3643  		v.reset(OpS390XLOCGR)
  3644  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3645  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3646  		v0.AuxInt = int64ToAuxInt(0)
  3647  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3648  		v1.AuxInt = int64ToAuxInt(1)
  3649  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  3650  		v2.AddArg2(x, y)
  3651  		v.AddArg3(v0, v1, v2)
  3652  		return true
  3653  	}
  3654  }
  3655  func rewriteValueS390X_OpNeq8(v *Value) bool {
  3656  	v_1 := v.Args[1]
  3657  	v_0 := v.Args[0]
  3658  	b := v.Block
  3659  	typ := &b.Func.Config.Types
  3660  	// match: (Neq8 x y)
  3661  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3662  	for {
  3663  		x := v_0
  3664  		y := v_1
  3665  		v.reset(OpS390XLOCGR)
  3666  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3667  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3668  		v0.AuxInt = int64ToAuxInt(0)
  3669  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3670  		v1.AuxInt = int64ToAuxInt(1)
  3671  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3672  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3673  		v3.AddArg(x)
  3674  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3675  		v4.AddArg(y)
  3676  		v2.AddArg2(v3, v4)
  3677  		v.AddArg3(v0, v1, v2)
  3678  		return true
  3679  	}
  3680  }
  3681  func rewriteValueS390X_OpNeqB(v *Value) bool {
  3682  	v_1 := v.Args[1]
  3683  	v_0 := v.Args[0]
  3684  	b := v.Block
  3685  	typ := &b.Func.Config.Types
  3686  	// match: (NeqB x y)
  3687  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3688  	for {
  3689  		x := v_0
  3690  		y := v_1
  3691  		v.reset(OpS390XLOCGR)
  3692  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3693  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3694  		v0.AuxInt = int64ToAuxInt(0)
  3695  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3696  		v1.AuxInt = int64ToAuxInt(1)
  3697  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3698  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3699  		v3.AddArg(x)
  3700  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3701  		v4.AddArg(y)
  3702  		v2.AddArg2(v3, v4)
  3703  		v.AddArg3(v0, v1, v2)
  3704  		return true
  3705  	}
  3706  }
  3707  func rewriteValueS390X_OpNeqPtr(v *Value) bool {
  3708  	v_1 := v.Args[1]
  3709  	v_0 := v.Args[0]
  3710  	b := v.Block
  3711  	typ := &b.Func.Config.Types
  3712  	// match: (NeqPtr x y)
  3713  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3714  	for {
  3715  		x := v_0
  3716  		y := v_1
  3717  		v.reset(OpS390XLOCGR)
  3718  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3719  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3720  		v0.AuxInt = int64ToAuxInt(0)
  3721  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3722  		v1.AuxInt = int64ToAuxInt(1)
  3723  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3724  		v2.AddArg2(x, y)
  3725  		v.AddArg3(v0, v1, v2)
  3726  		return true
  3727  	}
  3728  }
  3729  func rewriteValueS390X_OpNot(v *Value) bool {
  3730  	v_0 := v.Args[0]
  3731  	// match: (Not x)
  3732  	// result: (XORWconst [1] x)
  3733  	for {
  3734  		x := v_0
  3735  		v.reset(OpS390XXORWconst)
  3736  		v.AuxInt = int32ToAuxInt(1)
  3737  		v.AddArg(x)
  3738  		return true
  3739  	}
  3740  }
  3741  func rewriteValueS390X_OpOffPtr(v *Value) bool {
  3742  	v_0 := v.Args[0]
  3743  	b := v.Block
  3744  	typ := &b.Func.Config.Types
  3745  	// match: (OffPtr [off] ptr:(SP))
  3746  	// result: (MOVDaddr [int32(off)] ptr)
  3747  	for {
  3748  		off := auxIntToInt64(v.AuxInt)
  3749  		ptr := v_0
  3750  		if ptr.Op != OpSP {
  3751  			break
  3752  		}
  3753  		v.reset(OpS390XMOVDaddr)
  3754  		v.AuxInt = int32ToAuxInt(int32(off))
  3755  		v.AddArg(ptr)
  3756  		return true
  3757  	}
  3758  	// match: (OffPtr [off] ptr)
  3759  	// cond: is32Bit(off)
  3760  	// result: (ADDconst [int32(off)] ptr)
  3761  	for {
  3762  		off := auxIntToInt64(v.AuxInt)
  3763  		ptr := v_0
  3764  		if !(is32Bit(off)) {
  3765  			break
  3766  		}
  3767  		v.reset(OpS390XADDconst)
  3768  		v.AuxInt = int32ToAuxInt(int32(off))
  3769  		v.AddArg(ptr)
  3770  		return true
  3771  	}
  3772  	// match: (OffPtr [off] ptr)
  3773  	// result: (ADD (MOVDconst [off]) ptr)
  3774  	for {
  3775  		off := auxIntToInt64(v.AuxInt)
  3776  		ptr := v_0
  3777  		v.reset(OpS390XADD)
  3778  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3779  		v0.AuxInt = int64ToAuxInt(off)
  3780  		v.AddArg2(v0, ptr)
  3781  		return true
  3782  	}
  3783  }
  3784  func rewriteValueS390X_OpPanicBounds(v *Value) bool {
  3785  	v_2 := v.Args[2]
  3786  	v_1 := v.Args[1]
  3787  	v_0 := v.Args[0]
  3788  	// match: (PanicBounds [kind] x y mem)
  3789  	// cond: boundsABI(kind) == 0
  3790  	// result: (LoweredPanicBoundsA [kind] x y mem)
  3791  	for {
  3792  		kind := auxIntToInt64(v.AuxInt)
  3793  		x := v_0
  3794  		y := v_1
  3795  		mem := v_2
  3796  		if !(boundsABI(kind) == 0) {
  3797  			break
  3798  		}
  3799  		v.reset(OpS390XLoweredPanicBoundsA)
  3800  		v.AuxInt = int64ToAuxInt(kind)
  3801  		v.AddArg3(x, y, mem)
  3802  		return true
  3803  	}
  3804  	// match: (PanicBounds [kind] x y mem)
  3805  	// cond: boundsABI(kind) == 1
  3806  	// result: (LoweredPanicBoundsB [kind] x y mem)
  3807  	for {
  3808  		kind := auxIntToInt64(v.AuxInt)
  3809  		x := v_0
  3810  		y := v_1
  3811  		mem := v_2
  3812  		if !(boundsABI(kind) == 1) {
  3813  			break
  3814  		}
  3815  		v.reset(OpS390XLoweredPanicBoundsB)
  3816  		v.AuxInt = int64ToAuxInt(kind)
  3817  		v.AddArg3(x, y, mem)
  3818  		return true
  3819  	}
  3820  	// match: (PanicBounds [kind] x y mem)
  3821  	// cond: boundsABI(kind) == 2
  3822  	// result: (LoweredPanicBoundsC [kind] x y mem)
  3823  	for {
  3824  		kind := auxIntToInt64(v.AuxInt)
  3825  		x := v_0
  3826  		y := v_1
  3827  		mem := v_2
  3828  		if !(boundsABI(kind) == 2) {
  3829  			break
  3830  		}
  3831  		v.reset(OpS390XLoweredPanicBoundsC)
  3832  		v.AuxInt = int64ToAuxInt(kind)
  3833  		v.AddArg3(x, y, mem)
  3834  		return true
  3835  	}
  3836  	return false
  3837  }
  3838  func rewriteValueS390X_OpPopCount16(v *Value) bool {
  3839  	v_0 := v.Args[0]
  3840  	b := v.Block
  3841  	typ := &b.Func.Config.Types
  3842  	// match: (PopCount16 x)
  3843  	// result: (MOVBZreg (SumBytes2 (POPCNT <typ.UInt16> x)))
  3844  	for {
  3845  		x := v_0
  3846  		v.reset(OpS390XMOVBZreg)
  3847  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes2, typ.UInt8)
  3848  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt16)
  3849  		v1.AddArg(x)
  3850  		v0.AddArg(v1)
  3851  		v.AddArg(v0)
  3852  		return true
  3853  	}
  3854  }
  3855  func rewriteValueS390X_OpPopCount32(v *Value) bool {
  3856  	v_0 := v.Args[0]
  3857  	b := v.Block
  3858  	typ := &b.Func.Config.Types
  3859  	// match: (PopCount32 x)
  3860  	// result: (MOVBZreg (SumBytes4 (POPCNT <typ.UInt32> x)))
  3861  	for {
  3862  		x := v_0
  3863  		v.reset(OpS390XMOVBZreg)
  3864  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes4, typ.UInt8)
  3865  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt32)
  3866  		v1.AddArg(x)
  3867  		v0.AddArg(v1)
  3868  		v.AddArg(v0)
  3869  		return true
  3870  	}
  3871  }
  3872  func rewriteValueS390X_OpPopCount64(v *Value) bool {
  3873  	v_0 := v.Args[0]
  3874  	b := v.Block
  3875  	typ := &b.Func.Config.Types
  3876  	// match: (PopCount64 x)
  3877  	// result: (MOVBZreg (SumBytes8 (POPCNT <typ.UInt64> x)))
  3878  	for {
  3879  		x := v_0
  3880  		v.reset(OpS390XMOVBZreg)
  3881  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes8, typ.UInt8)
  3882  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt64)
  3883  		v1.AddArg(x)
  3884  		v0.AddArg(v1)
  3885  		v.AddArg(v0)
  3886  		return true
  3887  	}
  3888  }
  3889  func rewriteValueS390X_OpPopCount8(v *Value) bool {
  3890  	v_0 := v.Args[0]
  3891  	b := v.Block
  3892  	typ := &b.Func.Config.Types
  3893  	// match: (PopCount8 x)
  3894  	// result: (POPCNT (MOVBZreg x))
  3895  	for {
  3896  		x := v_0
  3897  		v.reset(OpS390XPOPCNT)
  3898  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3899  		v0.AddArg(x)
  3900  		v.AddArg(v0)
  3901  		return true
  3902  	}
  3903  }
  3904  func rewriteValueS390X_OpRotateLeft16(v *Value) bool {
  3905  	v_1 := v.Args[1]
  3906  	v_0 := v.Args[0]
  3907  	b := v.Block
  3908  	typ := &b.Func.Config.Types
  3909  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
  3910  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
  3911  	for {
  3912  		t := v.Type
  3913  		x := v_0
  3914  		if v_1.Op != OpS390XMOVDconst {
  3915  			break
  3916  		}
  3917  		c := auxIntToInt64(v_1.AuxInt)
  3918  		v.reset(OpOr16)
  3919  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  3920  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3921  		v1.AuxInt = int64ToAuxInt(c & 15)
  3922  		v0.AddArg2(x, v1)
  3923  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  3924  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3925  		v3.AuxInt = int64ToAuxInt(-c & 15)
  3926  		v2.AddArg2(x, v3)
  3927  		v.AddArg2(v0, v2)
  3928  		return true
  3929  	}
  3930  	return false
  3931  }
  3932  func rewriteValueS390X_OpRotateLeft8(v *Value) bool {
  3933  	v_1 := v.Args[1]
  3934  	v_0 := v.Args[0]
  3935  	b := v.Block
  3936  	typ := &b.Func.Config.Types
  3937  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
  3938  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
  3939  	for {
  3940  		t := v.Type
  3941  		x := v_0
  3942  		if v_1.Op != OpS390XMOVDconst {
  3943  			break
  3944  		}
  3945  		c := auxIntToInt64(v_1.AuxInt)
  3946  		v.reset(OpOr8)
  3947  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
  3948  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3949  		v1.AuxInt = int64ToAuxInt(c & 7)
  3950  		v0.AddArg2(x, v1)
  3951  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  3952  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3953  		v3.AuxInt = int64ToAuxInt(-c & 7)
  3954  		v2.AddArg2(x, v3)
  3955  		v.AddArg2(v0, v2)
  3956  		return true
  3957  	}
  3958  	return false
  3959  }
  3960  func rewriteValueS390X_OpRound(v *Value) bool {
  3961  	v_0 := v.Args[0]
  3962  	// match: (Round x)
  3963  	// result: (FIDBR [1] x)
  3964  	for {
  3965  		x := v_0
  3966  		v.reset(OpS390XFIDBR)
  3967  		v.AuxInt = int8ToAuxInt(1)
  3968  		v.AddArg(x)
  3969  		return true
  3970  	}
  3971  }
  3972  func rewriteValueS390X_OpRoundToEven(v *Value) bool {
  3973  	v_0 := v.Args[0]
  3974  	// match: (RoundToEven x)
  3975  	// result: (FIDBR [4] x)
  3976  	for {
  3977  		x := v_0
  3978  		v.reset(OpS390XFIDBR)
  3979  		v.AuxInt = int8ToAuxInt(4)
  3980  		v.AddArg(x)
  3981  		return true
  3982  	}
  3983  }
  3984  func rewriteValueS390X_OpRsh16Ux16(v *Value) bool {
  3985  	v_1 := v.Args[1]
  3986  	v_0 := v.Args[0]
  3987  	b := v.Block
  3988  	typ := &b.Func.Config.Types
  3989  	// match: (Rsh16Ux16 x y)
  3990  	// cond: shiftIsBounded(v)
  3991  	// result: (SRW (MOVHZreg x) y)
  3992  	for {
  3993  		x := v_0
  3994  		y := v_1
  3995  		if !(shiftIsBounded(v)) {
  3996  			break
  3997  		}
  3998  		v.reset(OpS390XSRW)
  3999  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4000  		v0.AddArg(x)
  4001  		v.AddArg2(v0, y)
  4002  		return true
  4003  	}
  4004  	// match: (Rsh16Ux16 <t> x y)
  4005  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4006  	for {
  4007  		t := v.Type
  4008  		x := v_0
  4009  		y := v_1
  4010  		v.reset(OpS390XLOCGR)
  4011  		v.Type = t
  4012  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4013  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4014  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4015  		v1.AddArg(x)
  4016  		v0.AddArg2(v1, y)
  4017  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4018  		v2.AuxInt = int64ToAuxInt(0)
  4019  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4020  		v3.AuxInt = int32ToAuxInt(64)
  4021  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4022  		v4.AddArg(y)
  4023  		v3.AddArg(v4)
  4024  		v.AddArg3(v0, v2, v3)
  4025  		return true
  4026  	}
  4027  }
  4028  func rewriteValueS390X_OpRsh16Ux32(v *Value) bool {
  4029  	v_1 := v.Args[1]
  4030  	v_0 := v.Args[0]
  4031  	b := v.Block
  4032  	typ := &b.Func.Config.Types
  4033  	// match: (Rsh16Ux32 x y)
  4034  	// cond: shiftIsBounded(v)
  4035  	// result: (SRW (MOVHZreg x) y)
  4036  	for {
  4037  		x := v_0
  4038  		y := v_1
  4039  		if !(shiftIsBounded(v)) {
  4040  			break
  4041  		}
  4042  		v.reset(OpS390XSRW)
  4043  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4044  		v0.AddArg(x)
  4045  		v.AddArg2(v0, y)
  4046  		return true
  4047  	}
  4048  	// match: (Rsh16Ux32 <t> x y)
  4049  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4050  	for {
  4051  		t := v.Type
  4052  		x := v_0
  4053  		y := v_1
  4054  		v.reset(OpS390XLOCGR)
  4055  		v.Type = t
  4056  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4057  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4058  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4059  		v1.AddArg(x)
  4060  		v0.AddArg2(v1, y)
  4061  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4062  		v2.AuxInt = int64ToAuxInt(0)
  4063  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4064  		v3.AuxInt = int32ToAuxInt(64)
  4065  		v3.AddArg(y)
  4066  		v.AddArg3(v0, v2, v3)
  4067  		return true
  4068  	}
  4069  }
  4070  func rewriteValueS390X_OpRsh16Ux64(v *Value) bool {
  4071  	v_1 := v.Args[1]
  4072  	v_0 := v.Args[0]
  4073  	b := v.Block
  4074  	typ := &b.Func.Config.Types
  4075  	// match: (Rsh16Ux64 x y)
  4076  	// cond: shiftIsBounded(v)
  4077  	// result: (SRW (MOVHZreg x) y)
  4078  	for {
  4079  		x := v_0
  4080  		y := v_1
  4081  		if !(shiftIsBounded(v)) {
  4082  			break
  4083  		}
  4084  		v.reset(OpS390XSRW)
  4085  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4086  		v0.AddArg(x)
  4087  		v.AddArg2(v0, y)
  4088  		return true
  4089  	}
  4090  	// match: (Rsh16Ux64 <t> x y)
  4091  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  4092  	for {
  4093  		t := v.Type
  4094  		x := v_0
  4095  		y := v_1
  4096  		v.reset(OpS390XLOCGR)
  4097  		v.Type = t
  4098  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4099  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4100  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4101  		v1.AddArg(x)
  4102  		v0.AddArg2(v1, y)
  4103  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4104  		v2.AuxInt = int64ToAuxInt(0)
  4105  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4106  		v3.AuxInt = int32ToAuxInt(64)
  4107  		v3.AddArg(y)
  4108  		v.AddArg3(v0, v2, v3)
  4109  		return true
  4110  	}
  4111  }
  4112  func rewriteValueS390X_OpRsh16Ux8(v *Value) bool {
  4113  	v_1 := v.Args[1]
  4114  	v_0 := v.Args[0]
  4115  	b := v.Block
  4116  	typ := &b.Func.Config.Types
  4117  	// match: (Rsh16Ux8 x y)
  4118  	// cond: shiftIsBounded(v)
  4119  	// result: (SRW (MOVHZreg x) y)
  4120  	for {
  4121  		x := v_0
  4122  		y := v_1
  4123  		if !(shiftIsBounded(v)) {
  4124  			break
  4125  		}
  4126  		v.reset(OpS390XSRW)
  4127  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4128  		v0.AddArg(x)
  4129  		v.AddArg2(v0, y)
  4130  		return true
  4131  	}
  4132  	// match: (Rsh16Ux8 <t> x y)
  4133  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4134  	for {
  4135  		t := v.Type
  4136  		x := v_0
  4137  		y := v_1
  4138  		v.reset(OpS390XLOCGR)
  4139  		v.Type = t
  4140  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4141  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4142  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4143  		v1.AddArg(x)
  4144  		v0.AddArg2(v1, y)
  4145  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4146  		v2.AuxInt = int64ToAuxInt(0)
  4147  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4148  		v3.AuxInt = int32ToAuxInt(64)
  4149  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4150  		v4.AddArg(y)
  4151  		v3.AddArg(v4)
  4152  		v.AddArg3(v0, v2, v3)
  4153  		return true
  4154  	}
  4155  }
  4156  func rewriteValueS390X_OpRsh16x16(v *Value) bool {
  4157  	v_1 := v.Args[1]
  4158  	v_0 := v.Args[0]
  4159  	b := v.Block
  4160  	typ := &b.Func.Config.Types
  4161  	// match: (Rsh16x16 x y)
  4162  	// cond: shiftIsBounded(v)
  4163  	// result: (SRAW (MOVHreg x) y)
  4164  	for {
  4165  		x := v_0
  4166  		y := v_1
  4167  		if !(shiftIsBounded(v)) {
  4168  			break
  4169  		}
  4170  		v.reset(OpS390XSRAW)
  4171  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4172  		v0.AddArg(x)
  4173  		v.AddArg2(v0, y)
  4174  		return true
  4175  	}
  4176  	// match: (Rsh16x16 x y)
  4177  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4178  	for {
  4179  		x := v_0
  4180  		y := v_1
  4181  		v.reset(OpS390XSRAW)
  4182  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4183  		v0.AddArg(x)
  4184  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4185  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4186  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4187  		v2.AuxInt = int64ToAuxInt(63)
  4188  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4189  		v3.AuxInt = int32ToAuxInt(64)
  4190  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4191  		v4.AddArg(y)
  4192  		v3.AddArg(v4)
  4193  		v1.AddArg3(y, v2, v3)
  4194  		v.AddArg2(v0, v1)
  4195  		return true
  4196  	}
  4197  }
  4198  func rewriteValueS390X_OpRsh16x32(v *Value) bool {
  4199  	v_1 := v.Args[1]
  4200  	v_0 := v.Args[0]
  4201  	b := v.Block
  4202  	typ := &b.Func.Config.Types
  4203  	// match: (Rsh16x32 x y)
  4204  	// cond: shiftIsBounded(v)
  4205  	// result: (SRAW (MOVHreg x) y)
  4206  	for {
  4207  		x := v_0
  4208  		y := v_1
  4209  		if !(shiftIsBounded(v)) {
  4210  			break
  4211  		}
  4212  		v.reset(OpS390XSRAW)
  4213  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4214  		v0.AddArg(x)
  4215  		v.AddArg2(v0, y)
  4216  		return true
  4217  	}
  4218  	// match: (Rsh16x32 x y)
  4219  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4220  	for {
  4221  		x := v_0
  4222  		y := v_1
  4223  		v.reset(OpS390XSRAW)
  4224  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4225  		v0.AddArg(x)
  4226  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4227  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4228  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4229  		v2.AuxInt = int64ToAuxInt(63)
  4230  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4231  		v3.AuxInt = int32ToAuxInt(64)
  4232  		v3.AddArg(y)
  4233  		v1.AddArg3(y, v2, v3)
  4234  		v.AddArg2(v0, v1)
  4235  		return true
  4236  	}
  4237  }
  4238  func rewriteValueS390X_OpRsh16x64(v *Value) bool {
  4239  	v_1 := v.Args[1]
  4240  	v_0 := v.Args[0]
  4241  	b := v.Block
  4242  	typ := &b.Func.Config.Types
  4243  	// match: (Rsh16x64 x y)
  4244  	// cond: shiftIsBounded(v)
  4245  	// result: (SRAW (MOVHreg x) y)
  4246  	for {
  4247  		x := v_0
  4248  		y := v_1
  4249  		if !(shiftIsBounded(v)) {
  4250  			break
  4251  		}
  4252  		v.reset(OpS390XSRAW)
  4253  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4254  		v0.AddArg(x)
  4255  		v.AddArg2(v0, y)
  4256  		return true
  4257  	}
  4258  	// match: (Rsh16x64 x y)
  4259  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4260  	for {
  4261  		x := v_0
  4262  		y := v_1
  4263  		v.reset(OpS390XSRAW)
  4264  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4265  		v0.AddArg(x)
  4266  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4267  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4268  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4269  		v2.AuxInt = int64ToAuxInt(63)
  4270  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4271  		v3.AuxInt = int32ToAuxInt(64)
  4272  		v3.AddArg(y)
  4273  		v1.AddArg3(y, v2, v3)
  4274  		v.AddArg2(v0, v1)
  4275  		return true
  4276  	}
  4277  }
  4278  func rewriteValueS390X_OpRsh16x8(v *Value) bool {
  4279  	v_1 := v.Args[1]
  4280  	v_0 := v.Args[0]
  4281  	b := v.Block
  4282  	typ := &b.Func.Config.Types
  4283  	// match: (Rsh16x8 x y)
  4284  	// cond: shiftIsBounded(v)
  4285  	// result: (SRAW (MOVHreg x) y)
  4286  	for {
  4287  		x := v_0
  4288  		y := v_1
  4289  		if !(shiftIsBounded(v)) {
  4290  			break
  4291  		}
  4292  		v.reset(OpS390XSRAW)
  4293  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4294  		v0.AddArg(x)
  4295  		v.AddArg2(v0, y)
  4296  		return true
  4297  	}
  4298  	// match: (Rsh16x8 x y)
  4299  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4300  	for {
  4301  		x := v_0
  4302  		y := v_1
  4303  		v.reset(OpS390XSRAW)
  4304  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4305  		v0.AddArg(x)
  4306  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4307  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4308  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4309  		v2.AuxInt = int64ToAuxInt(63)
  4310  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4311  		v3.AuxInt = int32ToAuxInt(64)
  4312  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4313  		v4.AddArg(y)
  4314  		v3.AddArg(v4)
  4315  		v1.AddArg3(y, v2, v3)
  4316  		v.AddArg2(v0, v1)
  4317  		return true
  4318  	}
  4319  }
  4320  func rewriteValueS390X_OpRsh32Ux16(v *Value) bool {
  4321  	v_1 := v.Args[1]
  4322  	v_0 := v.Args[0]
  4323  	b := v.Block
  4324  	typ := &b.Func.Config.Types
  4325  	// match: (Rsh32Ux16 x y)
  4326  	// cond: shiftIsBounded(v)
  4327  	// result: (SRW x y)
  4328  	for {
  4329  		x := v_0
  4330  		y := v_1
  4331  		if !(shiftIsBounded(v)) {
  4332  			break
  4333  		}
  4334  		v.reset(OpS390XSRW)
  4335  		v.AddArg2(x, y)
  4336  		return true
  4337  	}
  4338  	// match: (Rsh32Ux16 <t> x y)
  4339  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4340  	for {
  4341  		t := v.Type
  4342  		x := v_0
  4343  		y := v_1
  4344  		v.reset(OpS390XLOCGR)
  4345  		v.Type = t
  4346  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4347  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4348  		v0.AddArg2(x, y)
  4349  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4350  		v1.AuxInt = int64ToAuxInt(0)
  4351  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4352  		v2.AuxInt = int32ToAuxInt(64)
  4353  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4354  		v3.AddArg(y)
  4355  		v2.AddArg(v3)
  4356  		v.AddArg3(v0, v1, v2)
  4357  		return true
  4358  	}
  4359  }
  4360  func rewriteValueS390X_OpRsh32Ux32(v *Value) bool {
  4361  	v_1 := v.Args[1]
  4362  	v_0 := v.Args[0]
  4363  	b := v.Block
  4364  	typ := &b.Func.Config.Types
  4365  	// match: (Rsh32Ux32 x y)
  4366  	// cond: shiftIsBounded(v)
  4367  	// result: (SRW x y)
  4368  	for {
  4369  		x := v_0
  4370  		y := v_1
  4371  		if !(shiftIsBounded(v)) {
  4372  			break
  4373  		}
  4374  		v.reset(OpS390XSRW)
  4375  		v.AddArg2(x, y)
  4376  		return true
  4377  	}
  4378  	// match: (Rsh32Ux32 <t> x y)
  4379  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4380  	for {
  4381  		t := v.Type
  4382  		x := v_0
  4383  		y := v_1
  4384  		v.reset(OpS390XLOCGR)
  4385  		v.Type = t
  4386  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4387  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4388  		v0.AddArg2(x, y)
  4389  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4390  		v1.AuxInt = int64ToAuxInt(0)
  4391  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4392  		v2.AuxInt = int32ToAuxInt(64)
  4393  		v2.AddArg(y)
  4394  		v.AddArg3(v0, v1, v2)
  4395  		return true
  4396  	}
  4397  }
  4398  func rewriteValueS390X_OpRsh32Ux64(v *Value) bool {
  4399  	v_1 := v.Args[1]
  4400  	v_0 := v.Args[0]
  4401  	b := v.Block
  4402  	typ := &b.Func.Config.Types
  4403  	// match: (Rsh32Ux64 x y)
  4404  	// cond: shiftIsBounded(v)
  4405  	// result: (SRW x y)
  4406  	for {
  4407  		x := v_0
  4408  		y := v_1
  4409  		if !(shiftIsBounded(v)) {
  4410  			break
  4411  		}
  4412  		v.reset(OpS390XSRW)
  4413  		v.AddArg2(x, y)
  4414  		return true
  4415  	}
  4416  	// match: (Rsh32Ux64 <t> x y)
  4417  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4418  	for {
  4419  		t := v.Type
  4420  		x := v_0
  4421  		y := v_1
  4422  		v.reset(OpS390XLOCGR)
  4423  		v.Type = t
  4424  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4425  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4426  		v0.AddArg2(x, y)
  4427  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4428  		v1.AuxInt = int64ToAuxInt(0)
  4429  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4430  		v2.AuxInt = int32ToAuxInt(64)
  4431  		v2.AddArg(y)
  4432  		v.AddArg3(v0, v1, v2)
  4433  		return true
  4434  	}
  4435  }
  4436  func rewriteValueS390X_OpRsh32Ux8(v *Value) bool {
  4437  	v_1 := v.Args[1]
  4438  	v_0 := v.Args[0]
  4439  	b := v.Block
  4440  	typ := &b.Func.Config.Types
  4441  	// match: (Rsh32Ux8 x y)
  4442  	// cond: shiftIsBounded(v)
  4443  	// result: (SRW x y)
  4444  	for {
  4445  		x := v_0
  4446  		y := v_1
  4447  		if !(shiftIsBounded(v)) {
  4448  			break
  4449  		}
  4450  		v.reset(OpS390XSRW)
  4451  		v.AddArg2(x, y)
  4452  		return true
  4453  	}
  4454  	// match: (Rsh32Ux8 <t> x y)
  4455  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4456  	for {
  4457  		t := v.Type
  4458  		x := v_0
  4459  		y := v_1
  4460  		v.reset(OpS390XLOCGR)
  4461  		v.Type = t
  4462  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4463  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4464  		v0.AddArg2(x, y)
  4465  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4466  		v1.AuxInt = int64ToAuxInt(0)
  4467  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4468  		v2.AuxInt = int32ToAuxInt(64)
  4469  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4470  		v3.AddArg(y)
  4471  		v2.AddArg(v3)
  4472  		v.AddArg3(v0, v1, v2)
  4473  		return true
  4474  	}
  4475  }
  4476  func rewriteValueS390X_OpRsh32x16(v *Value) bool {
  4477  	v_1 := v.Args[1]
  4478  	v_0 := v.Args[0]
  4479  	b := v.Block
  4480  	typ := &b.Func.Config.Types
  4481  	// match: (Rsh32x16 x y)
  4482  	// cond: shiftIsBounded(v)
  4483  	// result: (SRAW x y)
  4484  	for {
  4485  		x := v_0
  4486  		y := v_1
  4487  		if !(shiftIsBounded(v)) {
  4488  			break
  4489  		}
  4490  		v.reset(OpS390XSRAW)
  4491  		v.AddArg2(x, y)
  4492  		return true
  4493  	}
  4494  	// match: (Rsh32x16 x y)
  4495  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4496  	for {
  4497  		x := v_0
  4498  		y := v_1
  4499  		v.reset(OpS390XSRAW)
  4500  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4501  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4502  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4503  		v1.AuxInt = int64ToAuxInt(63)
  4504  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4505  		v2.AuxInt = int32ToAuxInt(64)
  4506  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4507  		v3.AddArg(y)
  4508  		v2.AddArg(v3)
  4509  		v0.AddArg3(y, v1, v2)
  4510  		v.AddArg2(x, v0)
  4511  		return true
  4512  	}
  4513  }
  4514  func rewriteValueS390X_OpRsh32x32(v *Value) bool {
  4515  	v_1 := v.Args[1]
  4516  	v_0 := v.Args[0]
  4517  	b := v.Block
  4518  	// match: (Rsh32x32 x y)
  4519  	// cond: shiftIsBounded(v)
  4520  	// result: (SRAW x y)
  4521  	for {
  4522  		x := v_0
  4523  		y := v_1
  4524  		if !(shiftIsBounded(v)) {
  4525  			break
  4526  		}
  4527  		v.reset(OpS390XSRAW)
  4528  		v.AddArg2(x, y)
  4529  		return true
  4530  	}
  4531  	// match: (Rsh32x32 x y)
  4532  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4533  	for {
  4534  		x := v_0
  4535  		y := v_1
  4536  		v.reset(OpS390XSRAW)
  4537  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4538  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4539  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4540  		v1.AuxInt = int64ToAuxInt(63)
  4541  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4542  		v2.AuxInt = int32ToAuxInt(64)
  4543  		v2.AddArg(y)
  4544  		v0.AddArg3(y, v1, v2)
  4545  		v.AddArg2(x, v0)
  4546  		return true
  4547  	}
  4548  }
  4549  func rewriteValueS390X_OpRsh32x64(v *Value) bool {
  4550  	v_1 := v.Args[1]
  4551  	v_0 := v.Args[0]
  4552  	b := v.Block
  4553  	// match: (Rsh32x64 x y)
  4554  	// cond: shiftIsBounded(v)
  4555  	// result: (SRAW x y)
  4556  	for {
  4557  		x := v_0
  4558  		y := v_1
  4559  		if !(shiftIsBounded(v)) {
  4560  			break
  4561  		}
  4562  		v.reset(OpS390XSRAW)
  4563  		v.AddArg2(x, y)
  4564  		return true
  4565  	}
  4566  	// match: (Rsh32x64 x y)
  4567  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4568  	for {
  4569  		x := v_0
  4570  		y := v_1
  4571  		v.reset(OpS390XSRAW)
  4572  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4573  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4574  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4575  		v1.AuxInt = int64ToAuxInt(63)
  4576  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4577  		v2.AuxInt = int32ToAuxInt(64)
  4578  		v2.AddArg(y)
  4579  		v0.AddArg3(y, v1, v2)
  4580  		v.AddArg2(x, v0)
  4581  		return true
  4582  	}
  4583  }
  4584  func rewriteValueS390X_OpRsh32x8(v *Value) bool {
  4585  	v_1 := v.Args[1]
  4586  	v_0 := v.Args[0]
  4587  	b := v.Block
  4588  	typ := &b.Func.Config.Types
  4589  	// match: (Rsh32x8 x y)
  4590  	// cond: shiftIsBounded(v)
  4591  	// result: (SRAW x y)
  4592  	for {
  4593  		x := v_0
  4594  		y := v_1
  4595  		if !(shiftIsBounded(v)) {
  4596  			break
  4597  		}
  4598  		v.reset(OpS390XSRAW)
  4599  		v.AddArg2(x, y)
  4600  		return true
  4601  	}
  4602  	// match: (Rsh32x8 x y)
  4603  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4604  	for {
  4605  		x := v_0
  4606  		y := v_1
  4607  		v.reset(OpS390XSRAW)
  4608  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4609  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4610  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4611  		v1.AuxInt = int64ToAuxInt(63)
  4612  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4613  		v2.AuxInt = int32ToAuxInt(64)
  4614  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4615  		v3.AddArg(y)
  4616  		v2.AddArg(v3)
  4617  		v0.AddArg3(y, v1, v2)
  4618  		v.AddArg2(x, v0)
  4619  		return true
  4620  	}
  4621  }
  4622  func rewriteValueS390X_OpRsh64Ux16(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: (Rsh64Ux16 x y)
  4628  	// cond: shiftIsBounded(v)
  4629  	// result: (SRD x y)
  4630  	for {
  4631  		x := v_0
  4632  		y := v_1
  4633  		if !(shiftIsBounded(v)) {
  4634  			break
  4635  		}
  4636  		v.reset(OpS390XSRD)
  4637  		v.AddArg2(x, y)
  4638  		return true
  4639  	}
  4640  	// match: (Rsh64Ux16 <t> x y)
  4641  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4642  	for {
  4643  		t := v.Type
  4644  		x := v_0
  4645  		y := v_1
  4646  		v.reset(OpS390XLOCGR)
  4647  		v.Type = t
  4648  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4649  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4650  		v0.AddArg2(x, y)
  4651  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4652  		v1.AuxInt = int64ToAuxInt(0)
  4653  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4654  		v2.AuxInt = int32ToAuxInt(64)
  4655  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4656  		v3.AddArg(y)
  4657  		v2.AddArg(v3)
  4658  		v.AddArg3(v0, v1, v2)
  4659  		return true
  4660  	}
  4661  }
  4662  func rewriteValueS390X_OpRsh64Ux32(v *Value) bool {
  4663  	v_1 := v.Args[1]
  4664  	v_0 := v.Args[0]
  4665  	b := v.Block
  4666  	typ := &b.Func.Config.Types
  4667  	// match: (Rsh64Ux32 x y)
  4668  	// cond: shiftIsBounded(v)
  4669  	// result: (SRD x y)
  4670  	for {
  4671  		x := v_0
  4672  		y := v_1
  4673  		if !(shiftIsBounded(v)) {
  4674  			break
  4675  		}
  4676  		v.reset(OpS390XSRD)
  4677  		v.AddArg2(x, y)
  4678  		return true
  4679  	}
  4680  	// match: (Rsh64Ux32 <t> x y)
  4681  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4682  	for {
  4683  		t := v.Type
  4684  		x := v_0
  4685  		y := v_1
  4686  		v.reset(OpS390XLOCGR)
  4687  		v.Type = t
  4688  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4689  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4690  		v0.AddArg2(x, y)
  4691  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4692  		v1.AuxInt = int64ToAuxInt(0)
  4693  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4694  		v2.AuxInt = int32ToAuxInt(64)
  4695  		v2.AddArg(y)
  4696  		v.AddArg3(v0, v1, v2)
  4697  		return true
  4698  	}
  4699  }
  4700  func rewriteValueS390X_OpRsh64Ux64(v *Value) bool {
  4701  	v_1 := v.Args[1]
  4702  	v_0 := v.Args[0]
  4703  	b := v.Block
  4704  	typ := &b.Func.Config.Types
  4705  	// match: (Rsh64Ux64 x y)
  4706  	// cond: shiftIsBounded(v)
  4707  	// result: (SRD x y)
  4708  	for {
  4709  		x := v_0
  4710  		y := v_1
  4711  		if !(shiftIsBounded(v)) {
  4712  			break
  4713  		}
  4714  		v.reset(OpS390XSRD)
  4715  		v.AddArg2(x, y)
  4716  		return true
  4717  	}
  4718  	// match: (Rsh64Ux64 <t> x y)
  4719  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4720  	for {
  4721  		t := v.Type
  4722  		x := v_0
  4723  		y := v_1
  4724  		v.reset(OpS390XLOCGR)
  4725  		v.Type = t
  4726  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4727  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4728  		v0.AddArg2(x, y)
  4729  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4730  		v1.AuxInt = int64ToAuxInt(0)
  4731  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4732  		v2.AuxInt = int32ToAuxInt(64)
  4733  		v2.AddArg(y)
  4734  		v.AddArg3(v0, v1, v2)
  4735  		return true
  4736  	}
  4737  }
  4738  func rewriteValueS390X_OpRsh64Ux8(v *Value) bool {
  4739  	v_1 := v.Args[1]
  4740  	v_0 := v.Args[0]
  4741  	b := v.Block
  4742  	typ := &b.Func.Config.Types
  4743  	// match: (Rsh64Ux8 x y)
  4744  	// cond: shiftIsBounded(v)
  4745  	// result: (SRD x y)
  4746  	for {
  4747  		x := v_0
  4748  		y := v_1
  4749  		if !(shiftIsBounded(v)) {
  4750  			break
  4751  		}
  4752  		v.reset(OpS390XSRD)
  4753  		v.AddArg2(x, y)
  4754  		return true
  4755  	}
  4756  	// match: (Rsh64Ux8 <t> x y)
  4757  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4758  	for {
  4759  		t := v.Type
  4760  		x := v_0
  4761  		y := v_1
  4762  		v.reset(OpS390XLOCGR)
  4763  		v.Type = t
  4764  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4765  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4766  		v0.AddArg2(x, y)
  4767  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4768  		v1.AuxInt = int64ToAuxInt(0)
  4769  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4770  		v2.AuxInt = int32ToAuxInt(64)
  4771  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4772  		v3.AddArg(y)
  4773  		v2.AddArg(v3)
  4774  		v.AddArg3(v0, v1, v2)
  4775  		return true
  4776  	}
  4777  }
  4778  func rewriteValueS390X_OpRsh64x16(v *Value) bool {
  4779  	v_1 := v.Args[1]
  4780  	v_0 := v.Args[0]
  4781  	b := v.Block
  4782  	typ := &b.Func.Config.Types
  4783  	// match: (Rsh64x16 x y)
  4784  	// cond: shiftIsBounded(v)
  4785  	// result: (SRAD x y)
  4786  	for {
  4787  		x := v_0
  4788  		y := v_1
  4789  		if !(shiftIsBounded(v)) {
  4790  			break
  4791  		}
  4792  		v.reset(OpS390XSRAD)
  4793  		v.AddArg2(x, y)
  4794  		return true
  4795  	}
  4796  	// match: (Rsh64x16 x y)
  4797  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4798  	for {
  4799  		x := v_0
  4800  		y := v_1
  4801  		v.reset(OpS390XSRAD)
  4802  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4803  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4804  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4805  		v1.AuxInt = int64ToAuxInt(63)
  4806  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4807  		v2.AuxInt = int32ToAuxInt(64)
  4808  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4809  		v3.AddArg(y)
  4810  		v2.AddArg(v3)
  4811  		v0.AddArg3(y, v1, v2)
  4812  		v.AddArg2(x, v0)
  4813  		return true
  4814  	}
  4815  }
  4816  func rewriteValueS390X_OpRsh64x32(v *Value) bool {
  4817  	v_1 := v.Args[1]
  4818  	v_0 := v.Args[0]
  4819  	b := v.Block
  4820  	// match: (Rsh64x32 x y)
  4821  	// cond: shiftIsBounded(v)
  4822  	// result: (SRAD x y)
  4823  	for {
  4824  		x := v_0
  4825  		y := v_1
  4826  		if !(shiftIsBounded(v)) {
  4827  			break
  4828  		}
  4829  		v.reset(OpS390XSRAD)
  4830  		v.AddArg2(x, y)
  4831  		return true
  4832  	}
  4833  	// match: (Rsh64x32 x y)
  4834  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4835  	for {
  4836  		x := v_0
  4837  		y := v_1
  4838  		v.reset(OpS390XSRAD)
  4839  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4840  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4841  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4842  		v1.AuxInt = int64ToAuxInt(63)
  4843  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4844  		v2.AuxInt = int32ToAuxInt(64)
  4845  		v2.AddArg(y)
  4846  		v0.AddArg3(y, v1, v2)
  4847  		v.AddArg2(x, v0)
  4848  		return true
  4849  	}
  4850  }
  4851  func rewriteValueS390X_OpRsh64x64(v *Value) bool {
  4852  	v_1 := v.Args[1]
  4853  	v_0 := v.Args[0]
  4854  	b := v.Block
  4855  	// match: (Rsh64x64 x y)
  4856  	// cond: shiftIsBounded(v)
  4857  	// result: (SRAD x y)
  4858  	for {
  4859  		x := v_0
  4860  		y := v_1
  4861  		if !(shiftIsBounded(v)) {
  4862  			break
  4863  		}
  4864  		v.reset(OpS390XSRAD)
  4865  		v.AddArg2(x, y)
  4866  		return true
  4867  	}
  4868  	// match: (Rsh64x64 x y)
  4869  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4870  	for {
  4871  		x := v_0
  4872  		y := v_1
  4873  		v.reset(OpS390XSRAD)
  4874  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4875  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4876  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4877  		v1.AuxInt = int64ToAuxInt(63)
  4878  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4879  		v2.AuxInt = int32ToAuxInt(64)
  4880  		v2.AddArg(y)
  4881  		v0.AddArg3(y, v1, v2)
  4882  		v.AddArg2(x, v0)
  4883  		return true
  4884  	}
  4885  }
  4886  func rewriteValueS390X_OpRsh64x8(v *Value) bool {
  4887  	v_1 := v.Args[1]
  4888  	v_0 := v.Args[0]
  4889  	b := v.Block
  4890  	typ := &b.Func.Config.Types
  4891  	// match: (Rsh64x8 x y)
  4892  	// cond: shiftIsBounded(v)
  4893  	// result: (SRAD x y)
  4894  	for {
  4895  		x := v_0
  4896  		y := v_1
  4897  		if !(shiftIsBounded(v)) {
  4898  			break
  4899  		}
  4900  		v.reset(OpS390XSRAD)
  4901  		v.AddArg2(x, y)
  4902  		return true
  4903  	}
  4904  	// match: (Rsh64x8 x y)
  4905  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4906  	for {
  4907  		x := v_0
  4908  		y := v_1
  4909  		v.reset(OpS390XSRAD)
  4910  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4911  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4912  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4913  		v1.AuxInt = int64ToAuxInt(63)
  4914  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4915  		v2.AuxInt = int32ToAuxInt(64)
  4916  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4917  		v3.AddArg(y)
  4918  		v2.AddArg(v3)
  4919  		v0.AddArg3(y, v1, v2)
  4920  		v.AddArg2(x, v0)
  4921  		return true
  4922  	}
  4923  }
  4924  func rewriteValueS390X_OpRsh8Ux16(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: (Rsh8Ux16 x y)
  4930  	// cond: shiftIsBounded(v)
  4931  	// result: (SRW (MOVBZreg x) y)
  4932  	for {
  4933  		x := v_0
  4934  		y := v_1
  4935  		if !(shiftIsBounded(v)) {
  4936  			break
  4937  		}
  4938  		v.reset(OpS390XSRW)
  4939  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4940  		v0.AddArg(x)
  4941  		v.AddArg2(v0, y)
  4942  		return true
  4943  	}
  4944  	// match: (Rsh8Ux16 <t> x y)
  4945  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4946  	for {
  4947  		t := v.Type
  4948  		x := v_0
  4949  		y := v_1
  4950  		v.reset(OpS390XLOCGR)
  4951  		v.Type = t
  4952  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4953  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4954  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4955  		v1.AddArg(x)
  4956  		v0.AddArg2(v1, y)
  4957  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4958  		v2.AuxInt = int64ToAuxInt(0)
  4959  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4960  		v3.AuxInt = int32ToAuxInt(64)
  4961  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4962  		v4.AddArg(y)
  4963  		v3.AddArg(v4)
  4964  		v.AddArg3(v0, v2, v3)
  4965  		return true
  4966  	}
  4967  }
  4968  func rewriteValueS390X_OpRsh8Ux32(v *Value) bool {
  4969  	v_1 := v.Args[1]
  4970  	v_0 := v.Args[0]
  4971  	b := v.Block
  4972  	typ := &b.Func.Config.Types
  4973  	// match: (Rsh8Ux32 x y)
  4974  	// cond: shiftIsBounded(v)
  4975  	// result: (SRW (MOVBZreg x) y)
  4976  	for {
  4977  		x := v_0
  4978  		y := v_1
  4979  		if !(shiftIsBounded(v)) {
  4980  			break
  4981  		}
  4982  		v.reset(OpS390XSRW)
  4983  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4984  		v0.AddArg(x)
  4985  		v.AddArg2(v0, y)
  4986  		return true
  4987  	}
  4988  	// match: (Rsh8Ux32 <t> x y)
  4989  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4990  	for {
  4991  		t := v.Type
  4992  		x := v_0
  4993  		y := v_1
  4994  		v.reset(OpS390XLOCGR)
  4995  		v.Type = t
  4996  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4997  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4998  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4999  		v1.AddArg(x)
  5000  		v0.AddArg2(v1, y)
  5001  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5002  		v2.AuxInt = int64ToAuxInt(0)
  5003  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5004  		v3.AuxInt = int32ToAuxInt(64)
  5005  		v3.AddArg(y)
  5006  		v.AddArg3(v0, v2, v3)
  5007  		return true
  5008  	}
  5009  }
  5010  func rewriteValueS390X_OpRsh8Ux64(v *Value) bool {
  5011  	v_1 := v.Args[1]
  5012  	v_0 := v.Args[0]
  5013  	b := v.Block
  5014  	typ := &b.Func.Config.Types
  5015  	// match: (Rsh8Ux64 x y)
  5016  	// cond: shiftIsBounded(v)
  5017  	// result: (SRW (MOVBZreg x) y)
  5018  	for {
  5019  		x := v_0
  5020  		y := v_1
  5021  		if !(shiftIsBounded(v)) {
  5022  			break
  5023  		}
  5024  		v.reset(OpS390XSRW)
  5025  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5026  		v0.AddArg(x)
  5027  		v.AddArg2(v0, y)
  5028  		return true
  5029  	}
  5030  	// match: (Rsh8Ux64 <t> x y)
  5031  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  5032  	for {
  5033  		t := v.Type
  5034  		x := v_0
  5035  		y := v_1
  5036  		v.reset(OpS390XLOCGR)
  5037  		v.Type = t
  5038  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5039  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5040  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5041  		v1.AddArg(x)
  5042  		v0.AddArg2(v1, y)
  5043  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5044  		v2.AuxInt = int64ToAuxInt(0)
  5045  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5046  		v3.AuxInt = int32ToAuxInt(64)
  5047  		v3.AddArg(y)
  5048  		v.AddArg3(v0, v2, v3)
  5049  		return true
  5050  	}
  5051  }
  5052  func rewriteValueS390X_OpRsh8Ux8(v *Value) bool {
  5053  	v_1 := v.Args[1]
  5054  	v_0 := v.Args[0]
  5055  	b := v.Block
  5056  	typ := &b.Func.Config.Types
  5057  	// match: (Rsh8Ux8 x y)
  5058  	// cond: shiftIsBounded(v)
  5059  	// result: (SRW (MOVBZreg x) y)
  5060  	for {
  5061  		x := v_0
  5062  		y := v_1
  5063  		if !(shiftIsBounded(v)) {
  5064  			break
  5065  		}
  5066  		v.reset(OpS390XSRW)
  5067  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5068  		v0.AddArg(x)
  5069  		v.AddArg2(v0, y)
  5070  		return true
  5071  	}
  5072  	// match: (Rsh8Ux8 <t> x y)
  5073  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  5074  	for {
  5075  		t := v.Type
  5076  		x := v_0
  5077  		y := v_1
  5078  		v.reset(OpS390XLOCGR)
  5079  		v.Type = t
  5080  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5081  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5082  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5083  		v1.AddArg(x)
  5084  		v0.AddArg2(v1, y)
  5085  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5086  		v2.AuxInt = int64ToAuxInt(0)
  5087  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5088  		v3.AuxInt = int32ToAuxInt(64)
  5089  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5090  		v4.AddArg(y)
  5091  		v3.AddArg(v4)
  5092  		v.AddArg3(v0, v2, v3)
  5093  		return true
  5094  	}
  5095  }
  5096  func rewriteValueS390X_OpRsh8x16(v *Value) bool {
  5097  	v_1 := v.Args[1]
  5098  	v_0 := v.Args[0]
  5099  	b := v.Block
  5100  	typ := &b.Func.Config.Types
  5101  	// match: (Rsh8x16 x y)
  5102  	// cond: shiftIsBounded(v)
  5103  	// result: (SRAW (MOVBreg x) y)
  5104  	for {
  5105  		x := v_0
  5106  		y := v_1
  5107  		if !(shiftIsBounded(v)) {
  5108  			break
  5109  		}
  5110  		v.reset(OpS390XSRAW)
  5111  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5112  		v0.AddArg(x)
  5113  		v.AddArg2(v0, y)
  5114  		return true
  5115  	}
  5116  	// match: (Rsh8x16 x y)
  5117  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  5118  	for {
  5119  		x := v_0
  5120  		y := v_1
  5121  		v.reset(OpS390XSRAW)
  5122  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5123  		v0.AddArg(x)
  5124  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5125  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5126  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5127  		v2.AuxInt = int64ToAuxInt(63)
  5128  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5129  		v3.AuxInt = int32ToAuxInt(64)
  5130  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  5131  		v4.AddArg(y)
  5132  		v3.AddArg(v4)
  5133  		v1.AddArg3(y, v2, v3)
  5134  		v.AddArg2(v0, v1)
  5135  		return true
  5136  	}
  5137  }
  5138  func rewriteValueS390X_OpRsh8x32(v *Value) bool {
  5139  	v_1 := v.Args[1]
  5140  	v_0 := v.Args[0]
  5141  	b := v.Block
  5142  	typ := &b.Func.Config.Types
  5143  	// match: (Rsh8x32 x y)
  5144  	// cond: shiftIsBounded(v)
  5145  	// result: (SRAW (MOVBreg x) y)
  5146  	for {
  5147  		x := v_0
  5148  		y := v_1
  5149  		if !(shiftIsBounded(v)) {
  5150  			break
  5151  		}
  5152  		v.reset(OpS390XSRAW)
  5153  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5154  		v0.AddArg(x)
  5155  		v.AddArg2(v0, y)
  5156  		return true
  5157  	}
  5158  	// match: (Rsh8x32 x y)
  5159  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  5160  	for {
  5161  		x := v_0
  5162  		y := v_1
  5163  		v.reset(OpS390XSRAW)
  5164  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5165  		v0.AddArg(x)
  5166  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5167  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5168  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5169  		v2.AuxInt = int64ToAuxInt(63)
  5170  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5171  		v3.AuxInt = int32ToAuxInt(64)
  5172  		v3.AddArg(y)
  5173  		v1.AddArg3(y, v2, v3)
  5174  		v.AddArg2(v0, v1)
  5175  		return true
  5176  	}
  5177  }
  5178  func rewriteValueS390X_OpRsh8x64(v *Value) bool {
  5179  	v_1 := v.Args[1]
  5180  	v_0 := v.Args[0]
  5181  	b := v.Block
  5182  	typ := &b.Func.Config.Types
  5183  	// match: (Rsh8x64 x y)
  5184  	// cond: shiftIsBounded(v)
  5185  	// result: (SRAW (MOVBreg x) y)
  5186  	for {
  5187  		x := v_0
  5188  		y := v_1
  5189  		if !(shiftIsBounded(v)) {
  5190  			break
  5191  		}
  5192  		v.reset(OpS390XSRAW)
  5193  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5194  		v0.AddArg(x)
  5195  		v.AddArg2(v0, y)
  5196  		return true
  5197  	}
  5198  	// match: (Rsh8x64 x y)
  5199  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5200  	for {
  5201  		x := v_0
  5202  		y := v_1
  5203  		v.reset(OpS390XSRAW)
  5204  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5205  		v0.AddArg(x)
  5206  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5207  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5208  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5209  		v2.AuxInt = int64ToAuxInt(63)
  5210  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5211  		v3.AuxInt = int32ToAuxInt(64)
  5212  		v3.AddArg(y)
  5213  		v1.AddArg3(y, v2, v3)
  5214  		v.AddArg2(v0, v1)
  5215  		return true
  5216  	}
  5217  }
  5218  func rewriteValueS390X_OpRsh8x8(v *Value) bool {
  5219  	v_1 := v.Args[1]
  5220  	v_0 := v.Args[0]
  5221  	b := v.Block
  5222  	typ := &b.Func.Config.Types
  5223  	// match: (Rsh8x8 x y)
  5224  	// cond: shiftIsBounded(v)
  5225  	// result: (SRAW (MOVBreg x) y)
  5226  	for {
  5227  		x := v_0
  5228  		y := v_1
  5229  		if !(shiftIsBounded(v)) {
  5230  			break
  5231  		}
  5232  		v.reset(OpS390XSRAW)
  5233  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5234  		v0.AddArg(x)
  5235  		v.AddArg2(v0, y)
  5236  		return true
  5237  	}
  5238  	// match: (Rsh8x8 x y)
  5239  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5240  	for {
  5241  		x := v_0
  5242  		y := v_1
  5243  		v.reset(OpS390XSRAW)
  5244  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5245  		v0.AddArg(x)
  5246  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5247  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5248  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5249  		v2.AuxInt = int64ToAuxInt(63)
  5250  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5251  		v3.AuxInt = int32ToAuxInt(64)
  5252  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5253  		v4.AddArg(y)
  5254  		v3.AddArg(v4)
  5255  		v1.AddArg3(y, v2, v3)
  5256  		v.AddArg2(v0, v1)
  5257  		return true
  5258  	}
  5259  }
  5260  func rewriteValueS390X_OpS390XADD(v *Value) bool {
  5261  	v_1 := v.Args[1]
  5262  	v_0 := v.Args[0]
  5263  	// match: (ADD x (MOVDconst [c]))
  5264  	// cond: is32Bit(c)
  5265  	// result: (ADDconst [int32(c)] x)
  5266  	for {
  5267  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5268  			x := v_0
  5269  			if v_1.Op != OpS390XMOVDconst {
  5270  				continue
  5271  			}
  5272  			c := auxIntToInt64(v_1.AuxInt)
  5273  			if !(is32Bit(c)) {
  5274  				continue
  5275  			}
  5276  			v.reset(OpS390XADDconst)
  5277  			v.AuxInt = int32ToAuxInt(int32(c))
  5278  			v.AddArg(x)
  5279  			return true
  5280  		}
  5281  		break
  5282  	}
  5283  	// match: (ADD (SLDconst x [c]) (SRDconst x [64-c]))
  5284  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, c)})
  5285  	for {
  5286  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5287  			if v_0.Op != OpS390XSLDconst {
  5288  				continue
  5289  			}
  5290  			c := auxIntToUint8(v_0.AuxInt)
  5291  			x := v_0.Args[0]
  5292  			if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 64-c || x != v_1.Args[0] {
  5293  				continue
  5294  			}
  5295  			v.reset(OpS390XRISBGZ)
  5296  			v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, c))
  5297  			v.AddArg(x)
  5298  			return true
  5299  		}
  5300  		break
  5301  	}
  5302  	// match: (ADD idx (MOVDaddr [c] {s} ptr))
  5303  	// cond: ptr.Op != OpSB
  5304  	// result: (MOVDaddridx [c] {s} ptr idx)
  5305  	for {
  5306  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5307  			idx := v_0
  5308  			if v_1.Op != OpS390XMOVDaddr {
  5309  				continue
  5310  			}
  5311  			c := auxIntToInt32(v_1.AuxInt)
  5312  			s := auxToSym(v_1.Aux)
  5313  			ptr := v_1.Args[0]
  5314  			if !(ptr.Op != OpSB) {
  5315  				continue
  5316  			}
  5317  			v.reset(OpS390XMOVDaddridx)
  5318  			v.AuxInt = int32ToAuxInt(c)
  5319  			v.Aux = symToAux(s)
  5320  			v.AddArg2(ptr, idx)
  5321  			return true
  5322  		}
  5323  		break
  5324  	}
  5325  	// match: (ADD x (NEG y))
  5326  	// result: (SUB x y)
  5327  	for {
  5328  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5329  			x := v_0
  5330  			if v_1.Op != OpS390XNEG {
  5331  				continue
  5332  			}
  5333  			y := v_1.Args[0]
  5334  			v.reset(OpS390XSUB)
  5335  			v.AddArg2(x, y)
  5336  			return true
  5337  		}
  5338  		break
  5339  	}
  5340  	// match: (ADD <t> x g:(MOVDload [off] {sym} ptr mem))
  5341  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5342  	// result: (ADDload <t> [off] {sym} x ptr mem)
  5343  	for {
  5344  		t := v.Type
  5345  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5346  			x := v_0
  5347  			g := v_1
  5348  			if g.Op != OpS390XMOVDload {
  5349  				continue
  5350  			}
  5351  			off := auxIntToInt32(g.AuxInt)
  5352  			sym := auxToSym(g.Aux)
  5353  			mem := g.Args[1]
  5354  			ptr := g.Args[0]
  5355  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5356  				continue
  5357  			}
  5358  			v.reset(OpS390XADDload)
  5359  			v.Type = t
  5360  			v.AuxInt = int32ToAuxInt(off)
  5361  			v.Aux = symToAux(sym)
  5362  			v.AddArg3(x, ptr, mem)
  5363  			return true
  5364  		}
  5365  		break
  5366  	}
  5367  	return false
  5368  }
  5369  func rewriteValueS390X_OpS390XADDC(v *Value) bool {
  5370  	v_1 := v.Args[1]
  5371  	v_0 := v.Args[0]
  5372  	// match: (ADDC x (MOVDconst [c]))
  5373  	// cond: is16Bit(c)
  5374  	// result: (ADDCconst x [int16(c)])
  5375  	for {
  5376  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5377  			x := v_0
  5378  			if v_1.Op != OpS390XMOVDconst {
  5379  				continue
  5380  			}
  5381  			c := auxIntToInt64(v_1.AuxInt)
  5382  			if !(is16Bit(c)) {
  5383  				continue
  5384  			}
  5385  			v.reset(OpS390XADDCconst)
  5386  			v.AuxInt = int16ToAuxInt(int16(c))
  5387  			v.AddArg(x)
  5388  			return true
  5389  		}
  5390  		break
  5391  	}
  5392  	return false
  5393  }
  5394  func rewriteValueS390X_OpS390XADDE(v *Value) bool {
  5395  	v_2 := v.Args[2]
  5396  	v_1 := v.Args[1]
  5397  	v_0 := v.Args[0]
  5398  	// match: (ADDE x y (FlagEQ))
  5399  	// result: (ADDC x y)
  5400  	for {
  5401  		x := v_0
  5402  		y := v_1
  5403  		if v_2.Op != OpS390XFlagEQ {
  5404  			break
  5405  		}
  5406  		v.reset(OpS390XADDC)
  5407  		v.AddArg2(x, y)
  5408  		return true
  5409  	}
  5410  	// match: (ADDE x y (FlagLT))
  5411  	// result: (ADDC x y)
  5412  	for {
  5413  		x := v_0
  5414  		y := v_1
  5415  		if v_2.Op != OpS390XFlagLT {
  5416  			break
  5417  		}
  5418  		v.reset(OpS390XADDC)
  5419  		v.AddArg2(x, y)
  5420  		return true
  5421  	}
  5422  	// match: (ADDE x y (Select1 (ADDCconst [-1] (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) c)))))
  5423  	// result: (ADDE x y c)
  5424  	for {
  5425  		x := v_0
  5426  		y := v_1
  5427  		if v_2.Op != OpSelect1 {
  5428  			break
  5429  		}
  5430  		v_2_0 := v_2.Args[0]
  5431  		if v_2_0.Op != OpS390XADDCconst || auxIntToInt16(v_2_0.AuxInt) != -1 {
  5432  			break
  5433  		}
  5434  		v_2_0_0 := v_2_0.Args[0]
  5435  		if v_2_0_0.Op != OpSelect0 {
  5436  			break
  5437  		}
  5438  		v_2_0_0_0 := v_2_0_0.Args[0]
  5439  		if v_2_0_0_0.Op != OpS390XADDE {
  5440  			break
  5441  		}
  5442  		c := v_2_0_0_0.Args[2]
  5443  		v_2_0_0_0_0 := v_2_0_0_0.Args[0]
  5444  		if v_2_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_0.AuxInt) != 0 {
  5445  			break
  5446  		}
  5447  		v_2_0_0_0_1 := v_2_0_0_0.Args[1]
  5448  		if v_2_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_1.AuxInt) != 0 {
  5449  			break
  5450  		}
  5451  		v.reset(OpS390XADDE)
  5452  		v.AddArg3(x, y, c)
  5453  		return true
  5454  	}
  5455  	return false
  5456  }
  5457  func rewriteValueS390X_OpS390XADDW(v *Value) bool {
  5458  	v_1 := v.Args[1]
  5459  	v_0 := v.Args[0]
  5460  	// match: (ADDW x (MOVDconst [c]))
  5461  	// result: (ADDWconst [int32(c)] x)
  5462  	for {
  5463  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5464  			x := v_0
  5465  			if v_1.Op != OpS390XMOVDconst {
  5466  				continue
  5467  			}
  5468  			c := auxIntToInt64(v_1.AuxInt)
  5469  			v.reset(OpS390XADDWconst)
  5470  			v.AuxInt = int32ToAuxInt(int32(c))
  5471  			v.AddArg(x)
  5472  			return true
  5473  		}
  5474  		break
  5475  	}
  5476  	// match: (ADDW (SLWconst x [c]) (SRWconst x [32-c]))
  5477  	// result: (RLLconst x [c])
  5478  	for {
  5479  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5480  			if v_0.Op != OpS390XSLWconst {
  5481  				continue
  5482  			}
  5483  			c := auxIntToUint8(v_0.AuxInt)
  5484  			x := v_0.Args[0]
  5485  			if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 32-c || x != v_1.Args[0] {
  5486  				continue
  5487  			}
  5488  			v.reset(OpS390XRLLconst)
  5489  			v.AuxInt = uint8ToAuxInt(c)
  5490  			v.AddArg(x)
  5491  			return true
  5492  		}
  5493  		break
  5494  	}
  5495  	// match: (ADDW x (NEGW y))
  5496  	// result: (SUBW x y)
  5497  	for {
  5498  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5499  			x := v_0
  5500  			if v_1.Op != OpS390XNEGW {
  5501  				continue
  5502  			}
  5503  			y := v_1.Args[0]
  5504  			v.reset(OpS390XSUBW)
  5505  			v.AddArg2(x, y)
  5506  			return true
  5507  		}
  5508  		break
  5509  	}
  5510  	// match: (ADDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5511  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5512  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5513  	for {
  5514  		t := v.Type
  5515  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5516  			x := v_0
  5517  			g := v_1
  5518  			if g.Op != OpS390XMOVWload {
  5519  				continue
  5520  			}
  5521  			off := auxIntToInt32(g.AuxInt)
  5522  			sym := auxToSym(g.Aux)
  5523  			mem := g.Args[1]
  5524  			ptr := g.Args[0]
  5525  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5526  				continue
  5527  			}
  5528  			v.reset(OpS390XADDWload)
  5529  			v.Type = t
  5530  			v.AuxInt = int32ToAuxInt(off)
  5531  			v.Aux = symToAux(sym)
  5532  			v.AddArg3(x, ptr, mem)
  5533  			return true
  5534  		}
  5535  		break
  5536  	}
  5537  	// match: (ADDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  5538  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5539  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5540  	for {
  5541  		t := v.Type
  5542  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5543  			x := v_0
  5544  			g := v_1
  5545  			if g.Op != OpS390XMOVWZload {
  5546  				continue
  5547  			}
  5548  			off := auxIntToInt32(g.AuxInt)
  5549  			sym := auxToSym(g.Aux)
  5550  			mem := g.Args[1]
  5551  			ptr := g.Args[0]
  5552  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5553  				continue
  5554  			}
  5555  			v.reset(OpS390XADDWload)
  5556  			v.Type = t
  5557  			v.AuxInt = int32ToAuxInt(off)
  5558  			v.Aux = symToAux(sym)
  5559  			v.AddArg3(x, ptr, mem)
  5560  			return true
  5561  		}
  5562  		break
  5563  	}
  5564  	return false
  5565  }
  5566  func rewriteValueS390X_OpS390XADDWconst(v *Value) bool {
  5567  	v_0 := v.Args[0]
  5568  	// match: (ADDWconst [c] x)
  5569  	// cond: int32(c)==0
  5570  	// result: x
  5571  	for {
  5572  		c := auxIntToInt32(v.AuxInt)
  5573  		x := v_0
  5574  		if !(int32(c) == 0) {
  5575  			break
  5576  		}
  5577  		v.copyOf(x)
  5578  		return true
  5579  	}
  5580  	// match: (ADDWconst [c] (MOVDconst [d]))
  5581  	// result: (MOVDconst [int64(c)+d])
  5582  	for {
  5583  		c := auxIntToInt32(v.AuxInt)
  5584  		if v_0.Op != OpS390XMOVDconst {
  5585  			break
  5586  		}
  5587  		d := auxIntToInt64(v_0.AuxInt)
  5588  		v.reset(OpS390XMOVDconst)
  5589  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5590  		return true
  5591  	}
  5592  	// match: (ADDWconst [c] (ADDWconst [d] x))
  5593  	// result: (ADDWconst [int32(c+d)] x)
  5594  	for {
  5595  		c := auxIntToInt32(v.AuxInt)
  5596  		if v_0.Op != OpS390XADDWconst {
  5597  			break
  5598  		}
  5599  		d := auxIntToInt32(v_0.AuxInt)
  5600  		x := v_0.Args[0]
  5601  		v.reset(OpS390XADDWconst)
  5602  		v.AuxInt = int32ToAuxInt(int32(c + d))
  5603  		v.AddArg(x)
  5604  		return true
  5605  	}
  5606  	return false
  5607  }
  5608  func rewriteValueS390X_OpS390XADDWload(v *Value) bool {
  5609  	v_2 := v.Args[2]
  5610  	v_1 := v.Args[1]
  5611  	v_0 := v.Args[0]
  5612  	// match: (ADDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5613  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5614  	// result: (ADDWload [off1+off2] {sym} x ptr mem)
  5615  	for {
  5616  		off1 := auxIntToInt32(v.AuxInt)
  5617  		sym := auxToSym(v.Aux)
  5618  		x := v_0
  5619  		if v_1.Op != OpS390XADDconst {
  5620  			break
  5621  		}
  5622  		off2 := auxIntToInt32(v_1.AuxInt)
  5623  		ptr := v_1.Args[0]
  5624  		mem := v_2
  5625  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5626  			break
  5627  		}
  5628  		v.reset(OpS390XADDWload)
  5629  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5630  		v.Aux = symToAux(sym)
  5631  		v.AddArg3(x, ptr, mem)
  5632  		return true
  5633  	}
  5634  	// match: (ADDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5635  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5636  	// result: (ADDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5637  	for {
  5638  		o1 := auxIntToInt32(v.AuxInt)
  5639  		s1 := auxToSym(v.Aux)
  5640  		x := v_0
  5641  		if v_1.Op != OpS390XMOVDaddr {
  5642  			break
  5643  		}
  5644  		o2 := auxIntToInt32(v_1.AuxInt)
  5645  		s2 := auxToSym(v_1.Aux)
  5646  		ptr := v_1.Args[0]
  5647  		mem := v_2
  5648  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5649  			break
  5650  		}
  5651  		v.reset(OpS390XADDWload)
  5652  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5653  		v.Aux = symToAux(mergeSym(s1, s2))
  5654  		v.AddArg3(x, ptr, mem)
  5655  		return true
  5656  	}
  5657  	return false
  5658  }
  5659  func rewriteValueS390X_OpS390XADDconst(v *Value) bool {
  5660  	v_0 := v.Args[0]
  5661  	// match: (ADDconst [c] (MOVDaddr [d] {s} x:(SB)))
  5662  	// cond: ((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))
  5663  	// result: (MOVDaddr [c+d] {s} x)
  5664  	for {
  5665  		c := auxIntToInt32(v.AuxInt)
  5666  		if v_0.Op != OpS390XMOVDaddr {
  5667  			break
  5668  		}
  5669  		d := auxIntToInt32(v_0.AuxInt)
  5670  		s := auxToSym(v_0.Aux)
  5671  		x := v_0.Args[0]
  5672  		if x.Op != OpSB || !(((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))) {
  5673  			break
  5674  		}
  5675  		v.reset(OpS390XMOVDaddr)
  5676  		v.AuxInt = int32ToAuxInt(c + d)
  5677  		v.Aux = symToAux(s)
  5678  		v.AddArg(x)
  5679  		return true
  5680  	}
  5681  	// match: (ADDconst [c] (MOVDaddr [d] {s} x))
  5682  	// cond: x.Op != OpSB && is20Bit(int64(c)+int64(d))
  5683  	// result: (MOVDaddr [c+d] {s} x)
  5684  	for {
  5685  		c := auxIntToInt32(v.AuxInt)
  5686  		if v_0.Op != OpS390XMOVDaddr {
  5687  			break
  5688  		}
  5689  		d := auxIntToInt32(v_0.AuxInt)
  5690  		s := auxToSym(v_0.Aux)
  5691  		x := v_0.Args[0]
  5692  		if !(x.Op != OpSB && is20Bit(int64(c)+int64(d))) {
  5693  			break
  5694  		}
  5695  		v.reset(OpS390XMOVDaddr)
  5696  		v.AuxInt = int32ToAuxInt(c + d)
  5697  		v.Aux = symToAux(s)
  5698  		v.AddArg(x)
  5699  		return true
  5700  	}
  5701  	// match: (ADDconst [c] (MOVDaddridx [d] {s} x y))
  5702  	// cond: is20Bit(int64(c)+int64(d))
  5703  	// result: (MOVDaddridx [c+d] {s} x y)
  5704  	for {
  5705  		c := auxIntToInt32(v.AuxInt)
  5706  		if v_0.Op != OpS390XMOVDaddridx {
  5707  			break
  5708  		}
  5709  		d := auxIntToInt32(v_0.AuxInt)
  5710  		s := auxToSym(v_0.Aux)
  5711  		y := v_0.Args[1]
  5712  		x := v_0.Args[0]
  5713  		if !(is20Bit(int64(c) + int64(d))) {
  5714  			break
  5715  		}
  5716  		v.reset(OpS390XMOVDaddridx)
  5717  		v.AuxInt = int32ToAuxInt(c + d)
  5718  		v.Aux = symToAux(s)
  5719  		v.AddArg2(x, y)
  5720  		return true
  5721  	}
  5722  	// match: (ADDconst [0] x)
  5723  	// result: x
  5724  	for {
  5725  		if auxIntToInt32(v.AuxInt) != 0 {
  5726  			break
  5727  		}
  5728  		x := v_0
  5729  		v.copyOf(x)
  5730  		return true
  5731  	}
  5732  	// match: (ADDconst [c] (MOVDconst [d]))
  5733  	// result: (MOVDconst [int64(c)+d])
  5734  	for {
  5735  		c := auxIntToInt32(v.AuxInt)
  5736  		if v_0.Op != OpS390XMOVDconst {
  5737  			break
  5738  		}
  5739  		d := auxIntToInt64(v_0.AuxInt)
  5740  		v.reset(OpS390XMOVDconst)
  5741  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5742  		return true
  5743  	}
  5744  	// match: (ADDconst [c] (ADDconst [d] x))
  5745  	// cond: is32Bit(int64(c)+int64(d))
  5746  	// result: (ADDconst [c+d] x)
  5747  	for {
  5748  		c := auxIntToInt32(v.AuxInt)
  5749  		if v_0.Op != OpS390XADDconst {
  5750  			break
  5751  		}
  5752  		d := auxIntToInt32(v_0.AuxInt)
  5753  		x := v_0.Args[0]
  5754  		if !(is32Bit(int64(c) + int64(d))) {
  5755  			break
  5756  		}
  5757  		v.reset(OpS390XADDconst)
  5758  		v.AuxInt = int32ToAuxInt(c + d)
  5759  		v.AddArg(x)
  5760  		return true
  5761  	}
  5762  	return false
  5763  }
  5764  func rewriteValueS390X_OpS390XADDload(v *Value) bool {
  5765  	v_2 := v.Args[2]
  5766  	v_1 := v.Args[1]
  5767  	v_0 := v.Args[0]
  5768  	b := v.Block
  5769  	// match: (ADDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  5770  	// cond: isSamePtr(ptr1, ptr2)
  5771  	// result: (ADD x (LGDR <t> y))
  5772  	for {
  5773  		t := v.Type
  5774  		off := auxIntToInt32(v.AuxInt)
  5775  		sym := auxToSym(v.Aux)
  5776  		x := v_0
  5777  		ptr1 := v_1
  5778  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  5779  			break
  5780  		}
  5781  		y := v_2.Args[1]
  5782  		ptr2 := v_2.Args[0]
  5783  		if !(isSamePtr(ptr1, ptr2)) {
  5784  			break
  5785  		}
  5786  		v.reset(OpS390XADD)
  5787  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  5788  		v0.AddArg(y)
  5789  		v.AddArg2(x, v0)
  5790  		return true
  5791  	}
  5792  	// match: (ADDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5793  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5794  	// result: (ADDload [off1+off2] {sym} x ptr mem)
  5795  	for {
  5796  		off1 := auxIntToInt32(v.AuxInt)
  5797  		sym := auxToSym(v.Aux)
  5798  		x := v_0
  5799  		if v_1.Op != OpS390XADDconst {
  5800  			break
  5801  		}
  5802  		off2 := auxIntToInt32(v_1.AuxInt)
  5803  		ptr := v_1.Args[0]
  5804  		mem := v_2
  5805  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5806  			break
  5807  		}
  5808  		v.reset(OpS390XADDload)
  5809  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5810  		v.Aux = symToAux(sym)
  5811  		v.AddArg3(x, ptr, mem)
  5812  		return true
  5813  	}
  5814  	// match: (ADDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5815  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5816  	// result: (ADDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5817  	for {
  5818  		o1 := auxIntToInt32(v.AuxInt)
  5819  		s1 := auxToSym(v.Aux)
  5820  		x := v_0
  5821  		if v_1.Op != OpS390XMOVDaddr {
  5822  			break
  5823  		}
  5824  		o2 := auxIntToInt32(v_1.AuxInt)
  5825  		s2 := auxToSym(v_1.Aux)
  5826  		ptr := v_1.Args[0]
  5827  		mem := v_2
  5828  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5829  			break
  5830  		}
  5831  		v.reset(OpS390XADDload)
  5832  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5833  		v.Aux = symToAux(mergeSym(s1, s2))
  5834  		v.AddArg3(x, ptr, mem)
  5835  		return true
  5836  	}
  5837  	return false
  5838  }
  5839  func rewriteValueS390X_OpS390XAND(v *Value) bool {
  5840  	v_1 := v.Args[1]
  5841  	v_0 := v.Args[0]
  5842  	b := v.Block
  5843  	typ := &b.Func.Config.Types
  5844  	// match: (AND x (MOVDconst [c]))
  5845  	// cond: s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil
  5846  	// result: (RISBGZ x {*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c))})
  5847  	for {
  5848  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5849  			x := v_0
  5850  			if v_1.Op != OpS390XMOVDconst {
  5851  				continue
  5852  			}
  5853  			c := auxIntToInt64(v_1.AuxInt)
  5854  			if !(s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil) {
  5855  				continue
  5856  			}
  5857  			v.reset(OpS390XRISBGZ)
  5858  			v.Aux = s390xRotateParamsToAux(*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)))
  5859  			v.AddArg(x)
  5860  			return true
  5861  		}
  5862  		break
  5863  	}
  5864  	// match: (AND x (MOVDconst [c]))
  5865  	// cond: is32Bit(c) && c < 0
  5866  	// result: (ANDconst [c] x)
  5867  	for {
  5868  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5869  			x := v_0
  5870  			if v_1.Op != OpS390XMOVDconst {
  5871  				continue
  5872  			}
  5873  			c := auxIntToInt64(v_1.AuxInt)
  5874  			if !(is32Bit(c) && c < 0) {
  5875  				continue
  5876  			}
  5877  			v.reset(OpS390XANDconst)
  5878  			v.AuxInt = int64ToAuxInt(c)
  5879  			v.AddArg(x)
  5880  			return true
  5881  		}
  5882  		break
  5883  	}
  5884  	// match: (AND x (MOVDconst [c]))
  5885  	// cond: is32Bit(c) && c >= 0
  5886  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(c)] x))
  5887  	for {
  5888  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5889  			x := v_0
  5890  			if v_1.Op != OpS390XMOVDconst {
  5891  				continue
  5892  			}
  5893  			c := auxIntToInt64(v_1.AuxInt)
  5894  			if !(is32Bit(c) && c >= 0) {
  5895  				continue
  5896  			}
  5897  			v.reset(OpS390XMOVWZreg)
  5898  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  5899  			v0.AuxInt = int32ToAuxInt(int32(c))
  5900  			v0.AddArg(x)
  5901  			v.AddArg(v0)
  5902  			return true
  5903  		}
  5904  		break
  5905  	}
  5906  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  5907  	// result: (MOVDconst [c&d])
  5908  	for {
  5909  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5910  			if v_0.Op != OpS390XMOVDconst {
  5911  				continue
  5912  			}
  5913  			c := auxIntToInt64(v_0.AuxInt)
  5914  			if v_1.Op != OpS390XMOVDconst {
  5915  				continue
  5916  			}
  5917  			d := auxIntToInt64(v_1.AuxInt)
  5918  			v.reset(OpS390XMOVDconst)
  5919  			v.AuxInt = int64ToAuxInt(c & d)
  5920  			return true
  5921  		}
  5922  		break
  5923  	}
  5924  	// match: (AND x x)
  5925  	// result: x
  5926  	for {
  5927  		x := v_0
  5928  		if x != v_1 {
  5929  			break
  5930  		}
  5931  		v.copyOf(x)
  5932  		return true
  5933  	}
  5934  	// match: (AND <t> x g:(MOVDload [off] {sym} ptr mem))
  5935  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5936  	// result: (ANDload <t> [off] {sym} x ptr mem)
  5937  	for {
  5938  		t := v.Type
  5939  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5940  			x := v_0
  5941  			g := v_1
  5942  			if g.Op != OpS390XMOVDload {
  5943  				continue
  5944  			}
  5945  			off := auxIntToInt32(g.AuxInt)
  5946  			sym := auxToSym(g.Aux)
  5947  			mem := g.Args[1]
  5948  			ptr := g.Args[0]
  5949  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5950  				continue
  5951  			}
  5952  			v.reset(OpS390XANDload)
  5953  			v.Type = t
  5954  			v.AuxInt = int32ToAuxInt(off)
  5955  			v.Aux = symToAux(sym)
  5956  			v.AddArg3(x, ptr, mem)
  5957  			return true
  5958  		}
  5959  		break
  5960  	}
  5961  	return false
  5962  }
  5963  func rewriteValueS390X_OpS390XANDW(v *Value) bool {
  5964  	v_1 := v.Args[1]
  5965  	v_0 := v.Args[0]
  5966  	// match: (ANDW x (MOVDconst [c]))
  5967  	// result: (ANDWconst [int32(c)] x)
  5968  	for {
  5969  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5970  			x := v_0
  5971  			if v_1.Op != OpS390XMOVDconst {
  5972  				continue
  5973  			}
  5974  			c := auxIntToInt64(v_1.AuxInt)
  5975  			v.reset(OpS390XANDWconst)
  5976  			v.AuxInt = int32ToAuxInt(int32(c))
  5977  			v.AddArg(x)
  5978  			return true
  5979  		}
  5980  		break
  5981  	}
  5982  	// match: (ANDW x x)
  5983  	// result: x
  5984  	for {
  5985  		x := v_0
  5986  		if x != v_1 {
  5987  			break
  5988  		}
  5989  		v.copyOf(x)
  5990  		return true
  5991  	}
  5992  	// match: (ANDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5993  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5994  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  5995  	for {
  5996  		t := v.Type
  5997  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5998  			x := v_0
  5999  			g := v_1
  6000  			if g.Op != OpS390XMOVWload {
  6001  				continue
  6002  			}
  6003  			off := auxIntToInt32(g.AuxInt)
  6004  			sym := auxToSym(g.Aux)
  6005  			mem := g.Args[1]
  6006  			ptr := g.Args[0]
  6007  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6008  				continue
  6009  			}
  6010  			v.reset(OpS390XANDWload)
  6011  			v.Type = t
  6012  			v.AuxInt = int32ToAuxInt(off)
  6013  			v.Aux = symToAux(sym)
  6014  			v.AddArg3(x, ptr, mem)
  6015  			return true
  6016  		}
  6017  		break
  6018  	}
  6019  	// match: (ANDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  6020  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6021  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6022  	for {
  6023  		t := v.Type
  6024  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6025  			x := v_0
  6026  			g := v_1
  6027  			if g.Op != OpS390XMOVWZload {
  6028  				continue
  6029  			}
  6030  			off := auxIntToInt32(g.AuxInt)
  6031  			sym := auxToSym(g.Aux)
  6032  			mem := g.Args[1]
  6033  			ptr := g.Args[0]
  6034  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6035  				continue
  6036  			}
  6037  			v.reset(OpS390XANDWload)
  6038  			v.Type = t
  6039  			v.AuxInt = int32ToAuxInt(off)
  6040  			v.Aux = symToAux(sym)
  6041  			v.AddArg3(x, ptr, mem)
  6042  			return true
  6043  		}
  6044  		break
  6045  	}
  6046  	return false
  6047  }
  6048  func rewriteValueS390X_OpS390XANDWconst(v *Value) bool {
  6049  	v_0 := v.Args[0]
  6050  	// match: (ANDWconst [c] (ANDWconst [d] x))
  6051  	// result: (ANDWconst [c&d] x)
  6052  	for {
  6053  		c := auxIntToInt32(v.AuxInt)
  6054  		if v_0.Op != OpS390XANDWconst {
  6055  			break
  6056  		}
  6057  		d := auxIntToInt32(v_0.AuxInt)
  6058  		x := v_0.Args[0]
  6059  		v.reset(OpS390XANDWconst)
  6060  		v.AuxInt = int32ToAuxInt(c & d)
  6061  		v.AddArg(x)
  6062  		return true
  6063  	}
  6064  	// match: (ANDWconst [0x00ff] x)
  6065  	// result: (MOVBZreg x)
  6066  	for {
  6067  		if auxIntToInt32(v.AuxInt) != 0x00ff {
  6068  			break
  6069  		}
  6070  		x := v_0
  6071  		v.reset(OpS390XMOVBZreg)
  6072  		v.AddArg(x)
  6073  		return true
  6074  	}
  6075  	// match: (ANDWconst [0xffff] x)
  6076  	// result: (MOVHZreg x)
  6077  	for {
  6078  		if auxIntToInt32(v.AuxInt) != 0xffff {
  6079  			break
  6080  		}
  6081  		x := v_0
  6082  		v.reset(OpS390XMOVHZreg)
  6083  		v.AddArg(x)
  6084  		return true
  6085  	}
  6086  	// match: (ANDWconst [c] _)
  6087  	// cond: int32(c)==0
  6088  	// result: (MOVDconst [0])
  6089  	for {
  6090  		c := auxIntToInt32(v.AuxInt)
  6091  		if !(int32(c) == 0) {
  6092  			break
  6093  		}
  6094  		v.reset(OpS390XMOVDconst)
  6095  		v.AuxInt = int64ToAuxInt(0)
  6096  		return true
  6097  	}
  6098  	// match: (ANDWconst [c] x)
  6099  	// cond: int32(c)==-1
  6100  	// result: x
  6101  	for {
  6102  		c := auxIntToInt32(v.AuxInt)
  6103  		x := v_0
  6104  		if !(int32(c) == -1) {
  6105  			break
  6106  		}
  6107  		v.copyOf(x)
  6108  		return true
  6109  	}
  6110  	// match: (ANDWconst [c] (MOVDconst [d]))
  6111  	// result: (MOVDconst [int64(c)&d])
  6112  	for {
  6113  		c := auxIntToInt32(v.AuxInt)
  6114  		if v_0.Op != OpS390XMOVDconst {
  6115  			break
  6116  		}
  6117  		d := auxIntToInt64(v_0.AuxInt)
  6118  		v.reset(OpS390XMOVDconst)
  6119  		v.AuxInt = int64ToAuxInt(int64(c) & d)
  6120  		return true
  6121  	}
  6122  	return false
  6123  }
  6124  func rewriteValueS390X_OpS390XANDWload(v *Value) bool {
  6125  	v_2 := v.Args[2]
  6126  	v_1 := v.Args[1]
  6127  	v_0 := v.Args[0]
  6128  	// match: (ANDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6129  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6130  	// result: (ANDWload [off1+off2] {sym} x ptr mem)
  6131  	for {
  6132  		off1 := auxIntToInt32(v.AuxInt)
  6133  		sym := auxToSym(v.Aux)
  6134  		x := v_0
  6135  		if v_1.Op != OpS390XADDconst {
  6136  			break
  6137  		}
  6138  		off2 := auxIntToInt32(v_1.AuxInt)
  6139  		ptr := v_1.Args[0]
  6140  		mem := v_2
  6141  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6142  			break
  6143  		}
  6144  		v.reset(OpS390XANDWload)
  6145  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6146  		v.Aux = symToAux(sym)
  6147  		v.AddArg3(x, ptr, mem)
  6148  		return true
  6149  	}
  6150  	// match: (ANDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6151  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6152  	// result: (ANDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6153  	for {
  6154  		o1 := auxIntToInt32(v.AuxInt)
  6155  		s1 := auxToSym(v.Aux)
  6156  		x := v_0
  6157  		if v_1.Op != OpS390XMOVDaddr {
  6158  			break
  6159  		}
  6160  		o2 := auxIntToInt32(v_1.AuxInt)
  6161  		s2 := auxToSym(v_1.Aux)
  6162  		ptr := v_1.Args[0]
  6163  		mem := v_2
  6164  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6165  			break
  6166  		}
  6167  		v.reset(OpS390XANDWload)
  6168  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6169  		v.Aux = symToAux(mergeSym(s1, s2))
  6170  		v.AddArg3(x, ptr, mem)
  6171  		return true
  6172  	}
  6173  	return false
  6174  }
  6175  func rewriteValueS390X_OpS390XANDconst(v *Value) bool {
  6176  	v_0 := v.Args[0]
  6177  	// match: (ANDconst [c] (ANDconst [d] x))
  6178  	// result: (ANDconst [c&d] x)
  6179  	for {
  6180  		c := auxIntToInt64(v.AuxInt)
  6181  		if v_0.Op != OpS390XANDconst {
  6182  			break
  6183  		}
  6184  		d := auxIntToInt64(v_0.AuxInt)
  6185  		x := v_0.Args[0]
  6186  		v.reset(OpS390XANDconst)
  6187  		v.AuxInt = int64ToAuxInt(c & d)
  6188  		v.AddArg(x)
  6189  		return true
  6190  	}
  6191  	// match: (ANDconst [0] _)
  6192  	// result: (MOVDconst [0])
  6193  	for {
  6194  		if auxIntToInt64(v.AuxInt) != 0 {
  6195  			break
  6196  		}
  6197  		v.reset(OpS390XMOVDconst)
  6198  		v.AuxInt = int64ToAuxInt(0)
  6199  		return true
  6200  	}
  6201  	// match: (ANDconst [-1] x)
  6202  	// result: x
  6203  	for {
  6204  		if auxIntToInt64(v.AuxInt) != -1 {
  6205  			break
  6206  		}
  6207  		x := v_0
  6208  		v.copyOf(x)
  6209  		return true
  6210  	}
  6211  	// match: (ANDconst [c] (MOVDconst [d]))
  6212  	// result: (MOVDconst [c&d])
  6213  	for {
  6214  		c := auxIntToInt64(v.AuxInt)
  6215  		if v_0.Op != OpS390XMOVDconst {
  6216  			break
  6217  		}
  6218  		d := auxIntToInt64(v_0.AuxInt)
  6219  		v.reset(OpS390XMOVDconst)
  6220  		v.AuxInt = int64ToAuxInt(c & d)
  6221  		return true
  6222  	}
  6223  	return false
  6224  }
  6225  func rewriteValueS390X_OpS390XANDload(v *Value) bool {
  6226  	v_2 := v.Args[2]
  6227  	v_1 := v.Args[1]
  6228  	v_0 := v.Args[0]
  6229  	b := v.Block
  6230  	// match: (ANDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  6231  	// cond: isSamePtr(ptr1, ptr2)
  6232  	// result: (AND x (LGDR <t> y))
  6233  	for {
  6234  		t := v.Type
  6235  		off := auxIntToInt32(v.AuxInt)
  6236  		sym := auxToSym(v.Aux)
  6237  		x := v_0
  6238  		ptr1 := v_1
  6239  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  6240  			break
  6241  		}
  6242  		y := v_2.Args[1]
  6243  		ptr2 := v_2.Args[0]
  6244  		if !(isSamePtr(ptr1, ptr2)) {
  6245  			break
  6246  		}
  6247  		v.reset(OpS390XAND)
  6248  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  6249  		v0.AddArg(y)
  6250  		v.AddArg2(x, v0)
  6251  		return true
  6252  	}
  6253  	// match: (ANDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6254  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6255  	// result: (ANDload [off1+off2] {sym} x ptr mem)
  6256  	for {
  6257  		off1 := auxIntToInt32(v.AuxInt)
  6258  		sym := auxToSym(v.Aux)
  6259  		x := v_0
  6260  		if v_1.Op != OpS390XADDconst {
  6261  			break
  6262  		}
  6263  		off2 := auxIntToInt32(v_1.AuxInt)
  6264  		ptr := v_1.Args[0]
  6265  		mem := v_2
  6266  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6267  			break
  6268  		}
  6269  		v.reset(OpS390XANDload)
  6270  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6271  		v.Aux = symToAux(sym)
  6272  		v.AddArg3(x, ptr, mem)
  6273  		return true
  6274  	}
  6275  	// match: (ANDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6276  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6277  	// result: (ANDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6278  	for {
  6279  		o1 := auxIntToInt32(v.AuxInt)
  6280  		s1 := auxToSym(v.Aux)
  6281  		x := v_0
  6282  		if v_1.Op != OpS390XMOVDaddr {
  6283  			break
  6284  		}
  6285  		o2 := auxIntToInt32(v_1.AuxInt)
  6286  		s2 := auxToSym(v_1.Aux)
  6287  		ptr := v_1.Args[0]
  6288  		mem := v_2
  6289  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6290  			break
  6291  		}
  6292  		v.reset(OpS390XANDload)
  6293  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6294  		v.Aux = symToAux(mergeSym(s1, s2))
  6295  		v.AddArg3(x, ptr, mem)
  6296  		return true
  6297  	}
  6298  	return false
  6299  }
  6300  func rewriteValueS390X_OpS390XCMP(v *Value) bool {
  6301  	v_1 := v.Args[1]
  6302  	v_0 := v.Args[0]
  6303  	b := v.Block
  6304  	// match: (CMP x (MOVDconst [c]))
  6305  	// cond: is32Bit(c)
  6306  	// result: (CMPconst x [int32(c)])
  6307  	for {
  6308  		x := v_0
  6309  		if v_1.Op != OpS390XMOVDconst {
  6310  			break
  6311  		}
  6312  		c := auxIntToInt64(v_1.AuxInt)
  6313  		if !(is32Bit(c)) {
  6314  			break
  6315  		}
  6316  		v.reset(OpS390XCMPconst)
  6317  		v.AuxInt = int32ToAuxInt(int32(c))
  6318  		v.AddArg(x)
  6319  		return true
  6320  	}
  6321  	// match: (CMP (MOVDconst [c]) x)
  6322  	// cond: is32Bit(c)
  6323  	// result: (InvertFlags (CMPconst x [int32(c)]))
  6324  	for {
  6325  		if v_0.Op != OpS390XMOVDconst {
  6326  			break
  6327  		}
  6328  		c := auxIntToInt64(v_0.AuxInt)
  6329  		x := v_1
  6330  		if !(is32Bit(c)) {
  6331  			break
  6332  		}
  6333  		v.reset(OpS390XInvertFlags)
  6334  		v0 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  6335  		v0.AuxInt = int32ToAuxInt(int32(c))
  6336  		v0.AddArg(x)
  6337  		v.AddArg(v0)
  6338  		return true
  6339  	}
  6340  	// match: (CMP x y)
  6341  	// cond: canonLessThan(x,y)
  6342  	// result: (InvertFlags (CMP y x))
  6343  	for {
  6344  		x := v_0
  6345  		y := v_1
  6346  		if !(canonLessThan(x, y)) {
  6347  			break
  6348  		}
  6349  		v.reset(OpS390XInvertFlags)
  6350  		v0 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  6351  		v0.AddArg2(y, x)
  6352  		v.AddArg(v0)
  6353  		return true
  6354  	}
  6355  	return false
  6356  }
  6357  func rewriteValueS390X_OpS390XCMPU(v *Value) bool {
  6358  	v_1 := v.Args[1]
  6359  	v_0 := v.Args[0]
  6360  	b := v.Block
  6361  	// match: (CMPU x (MOVDconst [c]))
  6362  	// cond: isU32Bit(c)
  6363  	// result: (CMPUconst x [int32(c)])
  6364  	for {
  6365  		x := v_0
  6366  		if v_1.Op != OpS390XMOVDconst {
  6367  			break
  6368  		}
  6369  		c := auxIntToInt64(v_1.AuxInt)
  6370  		if !(isU32Bit(c)) {
  6371  			break
  6372  		}
  6373  		v.reset(OpS390XCMPUconst)
  6374  		v.AuxInt = int32ToAuxInt(int32(c))
  6375  		v.AddArg(x)
  6376  		return true
  6377  	}
  6378  	// match: (CMPU (MOVDconst [c]) x)
  6379  	// cond: isU32Bit(c)
  6380  	// result: (InvertFlags (CMPUconst x [int32(c)]))
  6381  	for {
  6382  		if v_0.Op != OpS390XMOVDconst {
  6383  			break
  6384  		}
  6385  		c := auxIntToInt64(v_0.AuxInt)
  6386  		x := v_1
  6387  		if !(isU32Bit(c)) {
  6388  			break
  6389  		}
  6390  		v.reset(OpS390XInvertFlags)
  6391  		v0 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  6392  		v0.AuxInt = int32ToAuxInt(int32(c))
  6393  		v0.AddArg(x)
  6394  		v.AddArg(v0)
  6395  		return true
  6396  	}
  6397  	// match: (CMPU x y)
  6398  	// cond: canonLessThan(x,y)
  6399  	// result: (InvertFlags (CMPU y x))
  6400  	for {
  6401  		x := v_0
  6402  		y := v_1
  6403  		if !(canonLessThan(x, y)) {
  6404  			break
  6405  		}
  6406  		v.reset(OpS390XInvertFlags)
  6407  		v0 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  6408  		v0.AddArg2(y, x)
  6409  		v.AddArg(v0)
  6410  		return true
  6411  	}
  6412  	return false
  6413  }
  6414  func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
  6415  	v_0 := v.Args[0]
  6416  	// match: (CMPUconst (MOVDconst [x]) [y])
  6417  	// cond: uint64(x)==uint64(y)
  6418  	// result: (FlagEQ)
  6419  	for {
  6420  		y := auxIntToInt32(v.AuxInt)
  6421  		if v_0.Op != OpS390XMOVDconst {
  6422  			break
  6423  		}
  6424  		x := auxIntToInt64(v_0.AuxInt)
  6425  		if !(uint64(x) == uint64(y)) {
  6426  			break
  6427  		}
  6428  		v.reset(OpS390XFlagEQ)
  6429  		return true
  6430  	}
  6431  	// match: (CMPUconst (MOVDconst [x]) [y])
  6432  	// cond: uint64(x)<uint64(y)
  6433  	// result: (FlagLT)
  6434  	for {
  6435  		y := auxIntToInt32(v.AuxInt)
  6436  		if v_0.Op != OpS390XMOVDconst {
  6437  			break
  6438  		}
  6439  		x := auxIntToInt64(v_0.AuxInt)
  6440  		if !(uint64(x) < uint64(y)) {
  6441  			break
  6442  		}
  6443  		v.reset(OpS390XFlagLT)
  6444  		return true
  6445  	}
  6446  	// match: (CMPUconst (MOVDconst [x]) [y])
  6447  	// cond: uint64(x)>uint64(y)
  6448  	// result: (FlagGT)
  6449  	for {
  6450  		y := auxIntToInt32(v.AuxInt)
  6451  		if v_0.Op != OpS390XMOVDconst {
  6452  			break
  6453  		}
  6454  		x := auxIntToInt64(v_0.AuxInt)
  6455  		if !(uint64(x) > uint64(y)) {
  6456  			break
  6457  		}
  6458  		v.reset(OpS390XFlagGT)
  6459  		return true
  6460  	}
  6461  	// match: (CMPUconst (SRDconst _ [c]) [n])
  6462  	// cond: c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)
  6463  	// result: (FlagLT)
  6464  	for {
  6465  		n := auxIntToInt32(v.AuxInt)
  6466  		if v_0.Op != OpS390XSRDconst {
  6467  			break
  6468  		}
  6469  		c := auxIntToUint8(v_0.AuxInt)
  6470  		if !(c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)) {
  6471  			break
  6472  		}
  6473  		v.reset(OpS390XFlagLT)
  6474  		return true
  6475  	}
  6476  	// match: (CMPUconst (RISBGZ x {r}) [c])
  6477  	// cond: r.OutMask() < uint64(uint32(c))
  6478  	// result: (FlagLT)
  6479  	for {
  6480  		c := auxIntToInt32(v.AuxInt)
  6481  		if v_0.Op != OpS390XRISBGZ {
  6482  			break
  6483  		}
  6484  		r := auxToS390xRotateParams(v_0.Aux)
  6485  		if !(r.OutMask() < uint64(uint32(c))) {
  6486  			break
  6487  		}
  6488  		v.reset(OpS390XFlagLT)
  6489  		return true
  6490  	}
  6491  	// match: (CMPUconst (MOVWZreg x) [c])
  6492  	// result: (CMPWUconst x [c])
  6493  	for {
  6494  		c := auxIntToInt32(v.AuxInt)
  6495  		if v_0.Op != OpS390XMOVWZreg {
  6496  			break
  6497  		}
  6498  		x := v_0.Args[0]
  6499  		v.reset(OpS390XCMPWUconst)
  6500  		v.AuxInt = int32ToAuxInt(c)
  6501  		v.AddArg(x)
  6502  		return true
  6503  	}
  6504  	// match: (CMPUconst x:(MOVHreg _) [c])
  6505  	// result: (CMPWUconst x [c])
  6506  	for {
  6507  		c := auxIntToInt32(v.AuxInt)
  6508  		x := v_0
  6509  		if x.Op != OpS390XMOVHreg {
  6510  			break
  6511  		}
  6512  		v.reset(OpS390XCMPWUconst)
  6513  		v.AuxInt = int32ToAuxInt(c)
  6514  		v.AddArg(x)
  6515  		return true
  6516  	}
  6517  	// match: (CMPUconst x:(MOVHZreg _) [c])
  6518  	// result: (CMPWUconst x [c])
  6519  	for {
  6520  		c := auxIntToInt32(v.AuxInt)
  6521  		x := v_0
  6522  		if x.Op != OpS390XMOVHZreg {
  6523  			break
  6524  		}
  6525  		v.reset(OpS390XCMPWUconst)
  6526  		v.AuxInt = int32ToAuxInt(c)
  6527  		v.AddArg(x)
  6528  		return true
  6529  	}
  6530  	// match: (CMPUconst x:(MOVBreg _) [c])
  6531  	// result: (CMPWUconst x [c])
  6532  	for {
  6533  		c := auxIntToInt32(v.AuxInt)
  6534  		x := v_0
  6535  		if x.Op != OpS390XMOVBreg {
  6536  			break
  6537  		}
  6538  		v.reset(OpS390XCMPWUconst)
  6539  		v.AuxInt = int32ToAuxInt(c)
  6540  		v.AddArg(x)
  6541  		return true
  6542  	}
  6543  	// match: (CMPUconst x:(MOVBZreg _) [c])
  6544  	// result: (CMPWUconst x [c])
  6545  	for {
  6546  		c := auxIntToInt32(v.AuxInt)
  6547  		x := v_0
  6548  		if x.Op != OpS390XMOVBZreg {
  6549  			break
  6550  		}
  6551  		v.reset(OpS390XCMPWUconst)
  6552  		v.AuxInt = int32ToAuxInt(c)
  6553  		v.AddArg(x)
  6554  		return true
  6555  	}
  6556  	// match: (CMPUconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  6557  	// cond: int32(m) >= 0
  6558  	// result: (CMPWUconst x [c])
  6559  	for {
  6560  		c := auxIntToInt32(v.AuxInt)
  6561  		if v_0.Op != OpS390XMOVWZreg {
  6562  			break
  6563  		}
  6564  		x := v_0.Args[0]
  6565  		if x.Op != OpS390XANDWconst {
  6566  			break
  6567  		}
  6568  		m := auxIntToInt32(x.AuxInt)
  6569  		if !(int32(m) >= 0) {
  6570  			break
  6571  		}
  6572  		v.reset(OpS390XCMPWUconst)
  6573  		v.AuxInt = int32ToAuxInt(c)
  6574  		v.AddArg(x)
  6575  		return true
  6576  	}
  6577  	// match: (CMPUconst (MOVWreg x:(ANDWconst [m] _)) [c])
  6578  	// cond: int32(m) >= 0
  6579  	// result: (CMPWUconst x [c])
  6580  	for {
  6581  		c := auxIntToInt32(v.AuxInt)
  6582  		if v_0.Op != OpS390XMOVWreg {
  6583  			break
  6584  		}
  6585  		x := v_0.Args[0]
  6586  		if x.Op != OpS390XANDWconst {
  6587  			break
  6588  		}
  6589  		m := auxIntToInt32(x.AuxInt)
  6590  		if !(int32(m) >= 0) {
  6591  			break
  6592  		}
  6593  		v.reset(OpS390XCMPWUconst)
  6594  		v.AuxInt = int32ToAuxInt(c)
  6595  		v.AddArg(x)
  6596  		return true
  6597  	}
  6598  	return false
  6599  }
  6600  func rewriteValueS390X_OpS390XCMPW(v *Value) bool {
  6601  	v_1 := v.Args[1]
  6602  	v_0 := v.Args[0]
  6603  	b := v.Block
  6604  	// match: (CMPW x (MOVDconst [c]))
  6605  	// result: (CMPWconst x [int32(c)])
  6606  	for {
  6607  		x := v_0
  6608  		if v_1.Op != OpS390XMOVDconst {
  6609  			break
  6610  		}
  6611  		c := auxIntToInt64(v_1.AuxInt)
  6612  		v.reset(OpS390XCMPWconst)
  6613  		v.AuxInt = int32ToAuxInt(int32(c))
  6614  		v.AddArg(x)
  6615  		return true
  6616  	}
  6617  	// match: (CMPW (MOVDconst [c]) x)
  6618  	// result: (InvertFlags (CMPWconst x [int32(c)]))
  6619  	for {
  6620  		if v_0.Op != OpS390XMOVDconst {
  6621  			break
  6622  		}
  6623  		c := auxIntToInt64(v_0.AuxInt)
  6624  		x := v_1
  6625  		v.reset(OpS390XInvertFlags)
  6626  		v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags)
  6627  		v0.AuxInt = int32ToAuxInt(int32(c))
  6628  		v0.AddArg(x)
  6629  		v.AddArg(v0)
  6630  		return true
  6631  	}
  6632  	// match: (CMPW x y)
  6633  	// cond: canonLessThan(x,y)
  6634  	// result: (InvertFlags (CMPW y x))
  6635  	for {
  6636  		x := v_0
  6637  		y := v_1
  6638  		if !(canonLessThan(x, y)) {
  6639  			break
  6640  		}
  6641  		v.reset(OpS390XInvertFlags)
  6642  		v0 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  6643  		v0.AddArg2(y, x)
  6644  		v.AddArg(v0)
  6645  		return true
  6646  	}
  6647  	// match: (CMPW x (MOVWreg y))
  6648  	// result: (CMPW x y)
  6649  	for {
  6650  		x := v_0
  6651  		if v_1.Op != OpS390XMOVWreg {
  6652  			break
  6653  		}
  6654  		y := v_1.Args[0]
  6655  		v.reset(OpS390XCMPW)
  6656  		v.AddArg2(x, y)
  6657  		return true
  6658  	}
  6659  	// match: (CMPW x (MOVWZreg y))
  6660  	// result: (CMPW x y)
  6661  	for {
  6662  		x := v_0
  6663  		if v_1.Op != OpS390XMOVWZreg {
  6664  			break
  6665  		}
  6666  		y := v_1.Args[0]
  6667  		v.reset(OpS390XCMPW)
  6668  		v.AddArg2(x, y)
  6669  		return true
  6670  	}
  6671  	// match: (CMPW (MOVWreg x) y)
  6672  	// result: (CMPW x y)
  6673  	for {
  6674  		if v_0.Op != OpS390XMOVWreg {
  6675  			break
  6676  		}
  6677  		x := v_0.Args[0]
  6678  		y := v_1
  6679  		v.reset(OpS390XCMPW)
  6680  		v.AddArg2(x, y)
  6681  		return true
  6682  	}
  6683  	// match: (CMPW (MOVWZreg x) y)
  6684  	// result: (CMPW x y)
  6685  	for {
  6686  		if v_0.Op != OpS390XMOVWZreg {
  6687  			break
  6688  		}
  6689  		x := v_0.Args[0]
  6690  		y := v_1
  6691  		v.reset(OpS390XCMPW)
  6692  		v.AddArg2(x, y)
  6693  		return true
  6694  	}
  6695  	return false
  6696  }
  6697  func rewriteValueS390X_OpS390XCMPWU(v *Value) bool {
  6698  	v_1 := v.Args[1]
  6699  	v_0 := v.Args[0]
  6700  	b := v.Block
  6701  	// match: (CMPWU x (MOVDconst [c]))
  6702  	// result: (CMPWUconst x [int32(c)])
  6703  	for {
  6704  		x := v_0
  6705  		if v_1.Op != OpS390XMOVDconst {
  6706  			break
  6707  		}
  6708  		c := auxIntToInt64(v_1.AuxInt)
  6709  		v.reset(OpS390XCMPWUconst)
  6710  		v.AuxInt = int32ToAuxInt(int32(c))
  6711  		v.AddArg(x)
  6712  		return true
  6713  	}
  6714  	// match: (CMPWU (MOVDconst [c]) x)
  6715  	// result: (InvertFlags (CMPWUconst x [int32(c)]))
  6716  	for {
  6717  		if v_0.Op != OpS390XMOVDconst {
  6718  			break
  6719  		}
  6720  		c := auxIntToInt64(v_0.AuxInt)
  6721  		x := v_1
  6722  		v.reset(OpS390XInvertFlags)
  6723  		v0 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  6724  		v0.AuxInt = int32ToAuxInt(int32(c))
  6725  		v0.AddArg(x)
  6726  		v.AddArg(v0)
  6727  		return true
  6728  	}
  6729  	// match: (CMPWU x y)
  6730  	// cond: canonLessThan(x,y)
  6731  	// result: (InvertFlags (CMPWU y x))
  6732  	for {
  6733  		x := v_0
  6734  		y := v_1
  6735  		if !(canonLessThan(x, y)) {
  6736  			break
  6737  		}
  6738  		v.reset(OpS390XInvertFlags)
  6739  		v0 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  6740  		v0.AddArg2(y, x)
  6741  		v.AddArg(v0)
  6742  		return true
  6743  	}
  6744  	// match: (CMPWU x (MOVWreg y))
  6745  	// result: (CMPWU x y)
  6746  	for {
  6747  		x := v_0
  6748  		if v_1.Op != OpS390XMOVWreg {
  6749  			break
  6750  		}
  6751  		y := v_1.Args[0]
  6752  		v.reset(OpS390XCMPWU)
  6753  		v.AddArg2(x, y)
  6754  		return true
  6755  	}
  6756  	// match: (CMPWU x (MOVWZreg y))
  6757  	// result: (CMPWU x y)
  6758  	for {
  6759  		x := v_0
  6760  		if v_1.Op != OpS390XMOVWZreg {
  6761  			break
  6762  		}
  6763  		y := v_1.Args[0]
  6764  		v.reset(OpS390XCMPWU)
  6765  		v.AddArg2(x, y)
  6766  		return true
  6767  	}
  6768  	// match: (CMPWU (MOVWreg x) y)
  6769  	// result: (CMPWU x y)
  6770  	for {
  6771  		if v_0.Op != OpS390XMOVWreg {
  6772  			break
  6773  		}
  6774  		x := v_0.Args[0]
  6775  		y := v_1
  6776  		v.reset(OpS390XCMPWU)
  6777  		v.AddArg2(x, y)
  6778  		return true
  6779  	}
  6780  	// match: (CMPWU (MOVWZreg x) y)
  6781  	// result: (CMPWU x y)
  6782  	for {
  6783  		if v_0.Op != OpS390XMOVWZreg {
  6784  			break
  6785  		}
  6786  		x := v_0.Args[0]
  6787  		y := v_1
  6788  		v.reset(OpS390XCMPWU)
  6789  		v.AddArg2(x, y)
  6790  		return true
  6791  	}
  6792  	return false
  6793  }
  6794  func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
  6795  	v_0 := v.Args[0]
  6796  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6797  	// cond: uint32(x)==uint32(y)
  6798  	// result: (FlagEQ)
  6799  	for {
  6800  		y := auxIntToInt32(v.AuxInt)
  6801  		if v_0.Op != OpS390XMOVDconst {
  6802  			break
  6803  		}
  6804  		x := auxIntToInt64(v_0.AuxInt)
  6805  		if !(uint32(x) == uint32(y)) {
  6806  			break
  6807  		}
  6808  		v.reset(OpS390XFlagEQ)
  6809  		return true
  6810  	}
  6811  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6812  	// cond: uint32(x)<uint32(y)
  6813  	// result: (FlagLT)
  6814  	for {
  6815  		y := auxIntToInt32(v.AuxInt)
  6816  		if v_0.Op != OpS390XMOVDconst {
  6817  			break
  6818  		}
  6819  		x := auxIntToInt64(v_0.AuxInt)
  6820  		if !(uint32(x) < uint32(y)) {
  6821  			break
  6822  		}
  6823  		v.reset(OpS390XFlagLT)
  6824  		return true
  6825  	}
  6826  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6827  	// cond: uint32(x)>uint32(y)
  6828  	// result: (FlagGT)
  6829  	for {
  6830  		y := auxIntToInt32(v.AuxInt)
  6831  		if v_0.Op != OpS390XMOVDconst {
  6832  			break
  6833  		}
  6834  		x := auxIntToInt64(v_0.AuxInt)
  6835  		if !(uint32(x) > uint32(y)) {
  6836  			break
  6837  		}
  6838  		v.reset(OpS390XFlagGT)
  6839  		return true
  6840  	}
  6841  	// match: (CMPWUconst (MOVBZreg _) [c])
  6842  	// cond: 0xff < c
  6843  	// result: (FlagLT)
  6844  	for {
  6845  		c := auxIntToInt32(v.AuxInt)
  6846  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  6847  			break
  6848  		}
  6849  		v.reset(OpS390XFlagLT)
  6850  		return true
  6851  	}
  6852  	// match: (CMPWUconst (MOVHZreg _) [c])
  6853  	// cond: 0xffff < c
  6854  	// result: (FlagLT)
  6855  	for {
  6856  		c := auxIntToInt32(v.AuxInt)
  6857  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  6858  			break
  6859  		}
  6860  		v.reset(OpS390XFlagLT)
  6861  		return true
  6862  	}
  6863  	// match: (CMPWUconst (SRWconst _ [c]) [n])
  6864  	// cond: c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)
  6865  	// result: (FlagLT)
  6866  	for {
  6867  		n := auxIntToInt32(v.AuxInt)
  6868  		if v_0.Op != OpS390XSRWconst {
  6869  			break
  6870  		}
  6871  		c := auxIntToUint8(v_0.AuxInt)
  6872  		if !(c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)) {
  6873  			break
  6874  		}
  6875  		v.reset(OpS390XFlagLT)
  6876  		return true
  6877  	}
  6878  	// match: (CMPWUconst (ANDWconst _ [m]) [n])
  6879  	// cond: uint32(m) < uint32(n)
  6880  	// result: (FlagLT)
  6881  	for {
  6882  		n := auxIntToInt32(v.AuxInt)
  6883  		if v_0.Op != OpS390XANDWconst {
  6884  			break
  6885  		}
  6886  		m := auxIntToInt32(v_0.AuxInt)
  6887  		if !(uint32(m) < uint32(n)) {
  6888  			break
  6889  		}
  6890  		v.reset(OpS390XFlagLT)
  6891  		return true
  6892  	}
  6893  	// match: (CMPWUconst (MOVWreg x) [c])
  6894  	// result: (CMPWUconst x [c])
  6895  	for {
  6896  		c := auxIntToInt32(v.AuxInt)
  6897  		if v_0.Op != OpS390XMOVWreg {
  6898  			break
  6899  		}
  6900  		x := v_0.Args[0]
  6901  		v.reset(OpS390XCMPWUconst)
  6902  		v.AuxInt = int32ToAuxInt(c)
  6903  		v.AddArg(x)
  6904  		return true
  6905  	}
  6906  	// match: (CMPWUconst (MOVWZreg x) [c])
  6907  	// result: (CMPWUconst x [c])
  6908  	for {
  6909  		c := auxIntToInt32(v.AuxInt)
  6910  		if v_0.Op != OpS390XMOVWZreg {
  6911  			break
  6912  		}
  6913  		x := v_0.Args[0]
  6914  		v.reset(OpS390XCMPWUconst)
  6915  		v.AuxInt = int32ToAuxInt(c)
  6916  		v.AddArg(x)
  6917  		return true
  6918  	}
  6919  	return false
  6920  }
  6921  func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
  6922  	v_0 := v.Args[0]
  6923  	// match: (CMPWconst (MOVDconst [x]) [y])
  6924  	// cond: int32(x)==int32(y)
  6925  	// result: (FlagEQ)
  6926  	for {
  6927  		y := auxIntToInt32(v.AuxInt)
  6928  		if v_0.Op != OpS390XMOVDconst {
  6929  			break
  6930  		}
  6931  		x := auxIntToInt64(v_0.AuxInt)
  6932  		if !(int32(x) == int32(y)) {
  6933  			break
  6934  		}
  6935  		v.reset(OpS390XFlagEQ)
  6936  		return true
  6937  	}
  6938  	// match: (CMPWconst (MOVDconst [x]) [y])
  6939  	// cond: int32(x)<int32(y)
  6940  	// result: (FlagLT)
  6941  	for {
  6942  		y := auxIntToInt32(v.AuxInt)
  6943  		if v_0.Op != OpS390XMOVDconst {
  6944  			break
  6945  		}
  6946  		x := auxIntToInt64(v_0.AuxInt)
  6947  		if !(int32(x) < int32(y)) {
  6948  			break
  6949  		}
  6950  		v.reset(OpS390XFlagLT)
  6951  		return true
  6952  	}
  6953  	// match: (CMPWconst (MOVDconst [x]) [y])
  6954  	// cond: int32(x)>int32(y)
  6955  	// result: (FlagGT)
  6956  	for {
  6957  		y := auxIntToInt32(v.AuxInt)
  6958  		if v_0.Op != OpS390XMOVDconst {
  6959  			break
  6960  		}
  6961  		x := auxIntToInt64(v_0.AuxInt)
  6962  		if !(int32(x) > int32(y)) {
  6963  			break
  6964  		}
  6965  		v.reset(OpS390XFlagGT)
  6966  		return true
  6967  	}
  6968  	// match: (CMPWconst (MOVBZreg _) [c])
  6969  	// cond: 0xff < c
  6970  	// result: (FlagLT)
  6971  	for {
  6972  		c := auxIntToInt32(v.AuxInt)
  6973  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  6974  			break
  6975  		}
  6976  		v.reset(OpS390XFlagLT)
  6977  		return true
  6978  	}
  6979  	// match: (CMPWconst (MOVHZreg _) [c])
  6980  	// cond: 0xffff < c
  6981  	// result: (FlagLT)
  6982  	for {
  6983  		c := auxIntToInt32(v.AuxInt)
  6984  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  6985  			break
  6986  		}
  6987  		v.reset(OpS390XFlagLT)
  6988  		return true
  6989  	}
  6990  	// match: (CMPWconst (SRWconst _ [c]) [n])
  6991  	// cond: c > 0 && n < 0
  6992  	// result: (FlagGT)
  6993  	for {
  6994  		n := auxIntToInt32(v.AuxInt)
  6995  		if v_0.Op != OpS390XSRWconst {
  6996  			break
  6997  		}
  6998  		c := auxIntToUint8(v_0.AuxInt)
  6999  		if !(c > 0 && n < 0) {
  7000  			break
  7001  		}
  7002  		v.reset(OpS390XFlagGT)
  7003  		return true
  7004  	}
  7005  	// match: (CMPWconst (ANDWconst _ [m]) [n])
  7006  	// cond: int32(m) >= 0 && int32(m) < int32(n)
  7007  	// result: (FlagLT)
  7008  	for {
  7009  		n := auxIntToInt32(v.AuxInt)
  7010  		if v_0.Op != OpS390XANDWconst {
  7011  			break
  7012  		}
  7013  		m := auxIntToInt32(v_0.AuxInt)
  7014  		if !(int32(m) >= 0 && int32(m) < int32(n)) {
  7015  			break
  7016  		}
  7017  		v.reset(OpS390XFlagLT)
  7018  		return true
  7019  	}
  7020  	// match: (CMPWconst x:(SRWconst _ [c]) [n])
  7021  	// cond: c > 0 && n >= 0
  7022  	// result: (CMPWUconst x [n])
  7023  	for {
  7024  		n := auxIntToInt32(v.AuxInt)
  7025  		x := v_0
  7026  		if x.Op != OpS390XSRWconst {
  7027  			break
  7028  		}
  7029  		c := auxIntToUint8(x.AuxInt)
  7030  		if !(c > 0 && n >= 0) {
  7031  			break
  7032  		}
  7033  		v.reset(OpS390XCMPWUconst)
  7034  		v.AuxInt = int32ToAuxInt(n)
  7035  		v.AddArg(x)
  7036  		return true
  7037  	}
  7038  	// match: (CMPWconst (MOVWreg x) [c])
  7039  	// result: (CMPWconst x [c])
  7040  	for {
  7041  		c := auxIntToInt32(v.AuxInt)
  7042  		if v_0.Op != OpS390XMOVWreg {
  7043  			break
  7044  		}
  7045  		x := v_0.Args[0]
  7046  		v.reset(OpS390XCMPWconst)
  7047  		v.AuxInt = int32ToAuxInt(c)
  7048  		v.AddArg(x)
  7049  		return true
  7050  	}
  7051  	// match: (CMPWconst (MOVWZreg x) [c])
  7052  	// result: (CMPWconst x [c])
  7053  	for {
  7054  		c := auxIntToInt32(v.AuxInt)
  7055  		if v_0.Op != OpS390XMOVWZreg {
  7056  			break
  7057  		}
  7058  		x := v_0.Args[0]
  7059  		v.reset(OpS390XCMPWconst)
  7060  		v.AuxInt = int32ToAuxInt(c)
  7061  		v.AddArg(x)
  7062  		return true
  7063  	}
  7064  	return false
  7065  }
  7066  func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
  7067  	v_0 := v.Args[0]
  7068  	// match: (CMPconst (MOVDconst [x]) [y])
  7069  	// cond: x==int64(y)
  7070  	// result: (FlagEQ)
  7071  	for {
  7072  		y := auxIntToInt32(v.AuxInt)
  7073  		if v_0.Op != OpS390XMOVDconst {
  7074  			break
  7075  		}
  7076  		x := auxIntToInt64(v_0.AuxInt)
  7077  		if !(x == int64(y)) {
  7078  			break
  7079  		}
  7080  		v.reset(OpS390XFlagEQ)
  7081  		return true
  7082  	}
  7083  	// match: (CMPconst (MOVDconst [x]) [y])
  7084  	// cond: x<int64(y)
  7085  	// result: (FlagLT)
  7086  	for {
  7087  		y := auxIntToInt32(v.AuxInt)
  7088  		if v_0.Op != OpS390XMOVDconst {
  7089  			break
  7090  		}
  7091  		x := auxIntToInt64(v_0.AuxInt)
  7092  		if !(x < int64(y)) {
  7093  			break
  7094  		}
  7095  		v.reset(OpS390XFlagLT)
  7096  		return true
  7097  	}
  7098  	// match: (CMPconst (MOVDconst [x]) [y])
  7099  	// cond: x>int64(y)
  7100  	// result: (FlagGT)
  7101  	for {
  7102  		y := auxIntToInt32(v.AuxInt)
  7103  		if v_0.Op != OpS390XMOVDconst {
  7104  			break
  7105  		}
  7106  		x := auxIntToInt64(v_0.AuxInt)
  7107  		if !(x > int64(y)) {
  7108  			break
  7109  		}
  7110  		v.reset(OpS390XFlagGT)
  7111  		return true
  7112  	}
  7113  	// match: (CMPconst (SRDconst _ [c]) [n])
  7114  	// cond: c > 0 && n < 0
  7115  	// result: (FlagGT)
  7116  	for {
  7117  		n := auxIntToInt32(v.AuxInt)
  7118  		if v_0.Op != OpS390XSRDconst {
  7119  			break
  7120  		}
  7121  		c := auxIntToUint8(v_0.AuxInt)
  7122  		if !(c > 0 && n < 0) {
  7123  			break
  7124  		}
  7125  		v.reset(OpS390XFlagGT)
  7126  		return true
  7127  	}
  7128  	// match: (CMPconst (RISBGZ x {r}) [c])
  7129  	// cond: c > 0 && r.OutMask() < uint64(c)
  7130  	// result: (FlagLT)
  7131  	for {
  7132  		c := auxIntToInt32(v.AuxInt)
  7133  		if v_0.Op != OpS390XRISBGZ {
  7134  			break
  7135  		}
  7136  		r := auxToS390xRotateParams(v_0.Aux)
  7137  		if !(c > 0 && r.OutMask() < uint64(c)) {
  7138  			break
  7139  		}
  7140  		v.reset(OpS390XFlagLT)
  7141  		return true
  7142  	}
  7143  	// match: (CMPconst (MOVWreg x) [c])
  7144  	// result: (CMPWconst x [c])
  7145  	for {
  7146  		c := auxIntToInt32(v.AuxInt)
  7147  		if v_0.Op != OpS390XMOVWreg {
  7148  			break
  7149  		}
  7150  		x := v_0.Args[0]
  7151  		v.reset(OpS390XCMPWconst)
  7152  		v.AuxInt = int32ToAuxInt(c)
  7153  		v.AddArg(x)
  7154  		return true
  7155  	}
  7156  	// match: (CMPconst x:(MOVHreg _) [c])
  7157  	// result: (CMPWconst x [c])
  7158  	for {
  7159  		c := auxIntToInt32(v.AuxInt)
  7160  		x := v_0
  7161  		if x.Op != OpS390XMOVHreg {
  7162  			break
  7163  		}
  7164  		v.reset(OpS390XCMPWconst)
  7165  		v.AuxInt = int32ToAuxInt(c)
  7166  		v.AddArg(x)
  7167  		return true
  7168  	}
  7169  	// match: (CMPconst x:(MOVHZreg _) [c])
  7170  	// result: (CMPWconst x [c])
  7171  	for {
  7172  		c := auxIntToInt32(v.AuxInt)
  7173  		x := v_0
  7174  		if x.Op != OpS390XMOVHZreg {
  7175  			break
  7176  		}
  7177  		v.reset(OpS390XCMPWconst)
  7178  		v.AuxInt = int32ToAuxInt(c)
  7179  		v.AddArg(x)
  7180  		return true
  7181  	}
  7182  	// match: (CMPconst x:(MOVBreg _) [c])
  7183  	// result: (CMPWconst x [c])
  7184  	for {
  7185  		c := auxIntToInt32(v.AuxInt)
  7186  		x := v_0
  7187  		if x.Op != OpS390XMOVBreg {
  7188  			break
  7189  		}
  7190  		v.reset(OpS390XCMPWconst)
  7191  		v.AuxInt = int32ToAuxInt(c)
  7192  		v.AddArg(x)
  7193  		return true
  7194  	}
  7195  	// match: (CMPconst x:(MOVBZreg _) [c])
  7196  	// result: (CMPWconst x [c])
  7197  	for {
  7198  		c := auxIntToInt32(v.AuxInt)
  7199  		x := v_0
  7200  		if x.Op != OpS390XMOVBZreg {
  7201  			break
  7202  		}
  7203  		v.reset(OpS390XCMPWconst)
  7204  		v.AuxInt = int32ToAuxInt(c)
  7205  		v.AddArg(x)
  7206  		return true
  7207  	}
  7208  	// match: (CMPconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  7209  	// cond: int32(m) >= 0 && c >= 0
  7210  	// result: (CMPWUconst x [c])
  7211  	for {
  7212  		c := auxIntToInt32(v.AuxInt)
  7213  		if v_0.Op != OpS390XMOVWZreg {
  7214  			break
  7215  		}
  7216  		x := v_0.Args[0]
  7217  		if x.Op != OpS390XANDWconst {
  7218  			break
  7219  		}
  7220  		m := auxIntToInt32(x.AuxInt)
  7221  		if !(int32(m) >= 0 && c >= 0) {
  7222  			break
  7223  		}
  7224  		v.reset(OpS390XCMPWUconst)
  7225  		v.AuxInt = int32ToAuxInt(c)
  7226  		v.AddArg(x)
  7227  		return true
  7228  	}
  7229  	// match: (CMPconst (MOVWreg x:(ANDWconst [m] _)) [c])
  7230  	// cond: int32(m) >= 0 && c >= 0
  7231  	// result: (CMPWUconst x [c])
  7232  	for {
  7233  		c := auxIntToInt32(v.AuxInt)
  7234  		if v_0.Op != OpS390XMOVWreg {
  7235  			break
  7236  		}
  7237  		x := v_0.Args[0]
  7238  		if x.Op != OpS390XANDWconst {
  7239  			break
  7240  		}
  7241  		m := auxIntToInt32(x.AuxInt)
  7242  		if !(int32(m) >= 0 && c >= 0) {
  7243  			break
  7244  		}
  7245  		v.reset(OpS390XCMPWUconst)
  7246  		v.AuxInt = int32ToAuxInt(c)
  7247  		v.AddArg(x)
  7248  		return true
  7249  	}
  7250  	// match: (CMPconst x:(SRDconst _ [c]) [n])
  7251  	// cond: c > 0 && n >= 0
  7252  	// result: (CMPUconst x [n])
  7253  	for {
  7254  		n := auxIntToInt32(v.AuxInt)
  7255  		x := v_0
  7256  		if x.Op != OpS390XSRDconst {
  7257  			break
  7258  		}
  7259  		c := auxIntToUint8(x.AuxInt)
  7260  		if !(c > 0 && n >= 0) {
  7261  			break
  7262  		}
  7263  		v.reset(OpS390XCMPUconst)
  7264  		v.AuxInt = int32ToAuxInt(n)
  7265  		v.AddArg(x)
  7266  		return true
  7267  	}
  7268  	return false
  7269  }
  7270  func rewriteValueS390X_OpS390XCPSDR(v *Value) bool {
  7271  	v_1 := v.Args[1]
  7272  	v_0 := v.Args[0]
  7273  	// match: (CPSDR y (FMOVDconst [c]))
  7274  	// cond: !math.Signbit(c)
  7275  	// result: (LPDFR y)
  7276  	for {
  7277  		y := v_0
  7278  		if v_1.Op != OpS390XFMOVDconst {
  7279  			break
  7280  		}
  7281  		c := auxIntToFloat64(v_1.AuxInt)
  7282  		if !(!math.Signbit(c)) {
  7283  			break
  7284  		}
  7285  		v.reset(OpS390XLPDFR)
  7286  		v.AddArg(y)
  7287  		return true
  7288  	}
  7289  	// match: (CPSDR y (FMOVDconst [c]))
  7290  	// cond: math.Signbit(c)
  7291  	// result: (LNDFR y)
  7292  	for {
  7293  		y := v_0
  7294  		if v_1.Op != OpS390XFMOVDconst {
  7295  			break
  7296  		}
  7297  		c := auxIntToFloat64(v_1.AuxInt)
  7298  		if !(math.Signbit(c)) {
  7299  			break
  7300  		}
  7301  		v.reset(OpS390XLNDFR)
  7302  		v.AddArg(y)
  7303  		return true
  7304  	}
  7305  	return false
  7306  }
  7307  func rewriteValueS390X_OpS390XFCMP(v *Value) bool {
  7308  	v_1 := v.Args[1]
  7309  	v_0 := v.Args[0]
  7310  	b := v.Block
  7311  	// match: (FCMP x (FMOVDconst [0.0]))
  7312  	// result: (LTDBR x)
  7313  	for {
  7314  		x := v_0
  7315  		if v_1.Op != OpS390XFMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0.0 {
  7316  			break
  7317  		}
  7318  		v.reset(OpS390XLTDBR)
  7319  		v.AddArg(x)
  7320  		return true
  7321  	}
  7322  	// match: (FCMP (FMOVDconst [0.0]) x)
  7323  	// result: (InvertFlags (LTDBR <v.Type> x))
  7324  	for {
  7325  		if v_0.Op != OpS390XFMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0.0 {
  7326  			break
  7327  		}
  7328  		x := v_1
  7329  		v.reset(OpS390XInvertFlags)
  7330  		v0 := b.NewValue0(v.Pos, OpS390XLTDBR, v.Type)
  7331  		v0.AddArg(x)
  7332  		v.AddArg(v0)
  7333  		return true
  7334  	}
  7335  	return false
  7336  }
  7337  func rewriteValueS390X_OpS390XFCMPS(v *Value) bool {
  7338  	v_1 := v.Args[1]
  7339  	v_0 := v.Args[0]
  7340  	b := v.Block
  7341  	// match: (FCMPS x (FMOVSconst [0.0]))
  7342  	// result: (LTEBR x)
  7343  	for {
  7344  		x := v_0
  7345  		if v_1.Op != OpS390XFMOVSconst || auxIntToFloat32(v_1.AuxInt) != 0.0 {
  7346  			break
  7347  		}
  7348  		v.reset(OpS390XLTEBR)
  7349  		v.AddArg(x)
  7350  		return true
  7351  	}
  7352  	// match: (FCMPS (FMOVSconst [0.0]) x)
  7353  	// result: (InvertFlags (LTEBR <v.Type> x))
  7354  	for {
  7355  		if v_0.Op != OpS390XFMOVSconst || auxIntToFloat32(v_0.AuxInt) != 0.0 {
  7356  			break
  7357  		}
  7358  		x := v_1
  7359  		v.reset(OpS390XInvertFlags)
  7360  		v0 := b.NewValue0(v.Pos, OpS390XLTEBR, v.Type)
  7361  		v0.AddArg(x)
  7362  		v.AddArg(v0)
  7363  		return true
  7364  	}
  7365  	return false
  7366  }
  7367  func rewriteValueS390X_OpS390XFMOVDload(v *Value) bool {
  7368  	v_1 := v.Args[1]
  7369  	v_0 := v.Args[0]
  7370  	// match: (FMOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  7371  	// cond: isSamePtr(ptr1, ptr2)
  7372  	// result: (LDGR x)
  7373  	for {
  7374  		off := auxIntToInt32(v.AuxInt)
  7375  		sym := auxToSym(v.Aux)
  7376  		ptr1 := v_0
  7377  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7378  			break
  7379  		}
  7380  		x := v_1.Args[1]
  7381  		ptr2 := v_1.Args[0]
  7382  		if !(isSamePtr(ptr1, ptr2)) {
  7383  			break
  7384  		}
  7385  		v.reset(OpS390XLDGR)
  7386  		v.AddArg(x)
  7387  		return true
  7388  	}
  7389  	// match: (FMOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  7390  	// cond: isSamePtr(ptr1, ptr2)
  7391  	// result: x
  7392  	for {
  7393  		off := auxIntToInt32(v.AuxInt)
  7394  		sym := auxToSym(v.Aux)
  7395  		ptr1 := v_0
  7396  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7397  			break
  7398  		}
  7399  		x := v_1.Args[1]
  7400  		ptr2 := v_1.Args[0]
  7401  		if !(isSamePtr(ptr1, ptr2)) {
  7402  			break
  7403  		}
  7404  		v.copyOf(x)
  7405  		return true
  7406  	}
  7407  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  7408  	// cond: is20Bit(int64(off1)+int64(off2))
  7409  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  7410  	for {
  7411  		off1 := auxIntToInt32(v.AuxInt)
  7412  		sym := auxToSym(v.Aux)
  7413  		if v_0.Op != OpS390XADDconst {
  7414  			break
  7415  		}
  7416  		off2 := auxIntToInt32(v_0.AuxInt)
  7417  		ptr := v_0.Args[0]
  7418  		mem := v_1
  7419  		if !(is20Bit(int64(off1) + int64(off2))) {
  7420  			break
  7421  		}
  7422  		v.reset(OpS390XFMOVDload)
  7423  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7424  		v.Aux = symToAux(sym)
  7425  		v.AddArg2(ptr, mem)
  7426  		return true
  7427  	}
  7428  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7429  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7430  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7431  	for {
  7432  		off1 := auxIntToInt32(v.AuxInt)
  7433  		sym1 := auxToSym(v.Aux)
  7434  		if v_0.Op != OpS390XMOVDaddr {
  7435  			break
  7436  		}
  7437  		off2 := auxIntToInt32(v_0.AuxInt)
  7438  		sym2 := auxToSym(v_0.Aux)
  7439  		base := v_0.Args[0]
  7440  		mem := v_1
  7441  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7442  			break
  7443  		}
  7444  		v.reset(OpS390XFMOVDload)
  7445  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7446  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7447  		v.AddArg2(base, mem)
  7448  		return true
  7449  	}
  7450  	return false
  7451  }
  7452  func rewriteValueS390X_OpS390XFMOVDstore(v *Value) bool {
  7453  	v_2 := v.Args[2]
  7454  	v_1 := v.Args[1]
  7455  	v_0 := v.Args[0]
  7456  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7457  	// cond: is20Bit(int64(off1)+int64(off2))
  7458  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  7459  	for {
  7460  		off1 := auxIntToInt32(v.AuxInt)
  7461  		sym := auxToSym(v.Aux)
  7462  		if v_0.Op != OpS390XADDconst {
  7463  			break
  7464  		}
  7465  		off2 := auxIntToInt32(v_0.AuxInt)
  7466  		ptr := v_0.Args[0]
  7467  		val := v_1
  7468  		mem := v_2
  7469  		if !(is20Bit(int64(off1) + int64(off2))) {
  7470  			break
  7471  		}
  7472  		v.reset(OpS390XFMOVDstore)
  7473  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7474  		v.Aux = symToAux(sym)
  7475  		v.AddArg3(ptr, val, mem)
  7476  		return true
  7477  	}
  7478  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7479  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7480  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7481  	for {
  7482  		off1 := auxIntToInt32(v.AuxInt)
  7483  		sym1 := auxToSym(v.Aux)
  7484  		if v_0.Op != OpS390XMOVDaddr {
  7485  			break
  7486  		}
  7487  		off2 := auxIntToInt32(v_0.AuxInt)
  7488  		sym2 := auxToSym(v_0.Aux)
  7489  		base := v_0.Args[0]
  7490  		val := v_1
  7491  		mem := v_2
  7492  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7493  			break
  7494  		}
  7495  		v.reset(OpS390XFMOVDstore)
  7496  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7497  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7498  		v.AddArg3(base, val, mem)
  7499  		return true
  7500  	}
  7501  	return false
  7502  }
  7503  func rewriteValueS390X_OpS390XFMOVSload(v *Value) bool {
  7504  	v_1 := v.Args[1]
  7505  	v_0 := v.Args[0]
  7506  	// match: (FMOVSload [off] {sym} ptr1 (FMOVSstore [off] {sym} ptr2 x _))
  7507  	// cond: isSamePtr(ptr1, ptr2)
  7508  	// result: x
  7509  	for {
  7510  		off := auxIntToInt32(v.AuxInt)
  7511  		sym := auxToSym(v.Aux)
  7512  		ptr1 := v_0
  7513  		if v_1.Op != OpS390XFMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7514  			break
  7515  		}
  7516  		x := v_1.Args[1]
  7517  		ptr2 := v_1.Args[0]
  7518  		if !(isSamePtr(ptr1, ptr2)) {
  7519  			break
  7520  		}
  7521  		v.copyOf(x)
  7522  		return true
  7523  	}
  7524  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  7525  	// cond: is20Bit(int64(off1)+int64(off2))
  7526  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  7527  	for {
  7528  		off1 := auxIntToInt32(v.AuxInt)
  7529  		sym := auxToSym(v.Aux)
  7530  		if v_0.Op != OpS390XADDconst {
  7531  			break
  7532  		}
  7533  		off2 := auxIntToInt32(v_0.AuxInt)
  7534  		ptr := v_0.Args[0]
  7535  		mem := v_1
  7536  		if !(is20Bit(int64(off1) + int64(off2))) {
  7537  			break
  7538  		}
  7539  		v.reset(OpS390XFMOVSload)
  7540  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7541  		v.Aux = symToAux(sym)
  7542  		v.AddArg2(ptr, mem)
  7543  		return true
  7544  	}
  7545  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7546  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7547  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7548  	for {
  7549  		off1 := auxIntToInt32(v.AuxInt)
  7550  		sym1 := auxToSym(v.Aux)
  7551  		if v_0.Op != OpS390XMOVDaddr {
  7552  			break
  7553  		}
  7554  		off2 := auxIntToInt32(v_0.AuxInt)
  7555  		sym2 := auxToSym(v_0.Aux)
  7556  		base := v_0.Args[0]
  7557  		mem := v_1
  7558  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7559  			break
  7560  		}
  7561  		v.reset(OpS390XFMOVSload)
  7562  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7563  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7564  		v.AddArg2(base, mem)
  7565  		return true
  7566  	}
  7567  	return false
  7568  }
  7569  func rewriteValueS390X_OpS390XFMOVSstore(v *Value) bool {
  7570  	v_2 := v.Args[2]
  7571  	v_1 := v.Args[1]
  7572  	v_0 := v.Args[0]
  7573  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7574  	// cond: is20Bit(int64(off1)+int64(off2))
  7575  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  7576  	for {
  7577  		off1 := auxIntToInt32(v.AuxInt)
  7578  		sym := auxToSym(v.Aux)
  7579  		if v_0.Op != OpS390XADDconst {
  7580  			break
  7581  		}
  7582  		off2 := auxIntToInt32(v_0.AuxInt)
  7583  		ptr := v_0.Args[0]
  7584  		val := v_1
  7585  		mem := v_2
  7586  		if !(is20Bit(int64(off1) + int64(off2))) {
  7587  			break
  7588  		}
  7589  		v.reset(OpS390XFMOVSstore)
  7590  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7591  		v.Aux = symToAux(sym)
  7592  		v.AddArg3(ptr, val, mem)
  7593  		return true
  7594  	}
  7595  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7596  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7597  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7598  	for {
  7599  		off1 := auxIntToInt32(v.AuxInt)
  7600  		sym1 := auxToSym(v.Aux)
  7601  		if v_0.Op != OpS390XMOVDaddr {
  7602  			break
  7603  		}
  7604  		off2 := auxIntToInt32(v_0.AuxInt)
  7605  		sym2 := auxToSym(v_0.Aux)
  7606  		base := v_0.Args[0]
  7607  		val := v_1
  7608  		mem := v_2
  7609  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7610  			break
  7611  		}
  7612  		v.reset(OpS390XFMOVSstore)
  7613  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7614  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7615  		v.AddArg3(base, val, mem)
  7616  		return true
  7617  	}
  7618  	return false
  7619  }
  7620  func rewriteValueS390X_OpS390XFNEG(v *Value) bool {
  7621  	v_0 := v.Args[0]
  7622  	// match: (FNEG (LPDFR x))
  7623  	// result: (LNDFR x)
  7624  	for {
  7625  		if v_0.Op != OpS390XLPDFR {
  7626  			break
  7627  		}
  7628  		x := v_0.Args[0]
  7629  		v.reset(OpS390XLNDFR)
  7630  		v.AddArg(x)
  7631  		return true
  7632  	}
  7633  	// match: (FNEG (LNDFR x))
  7634  	// result: (LPDFR x)
  7635  	for {
  7636  		if v_0.Op != OpS390XLNDFR {
  7637  			break
  7638  		}
  7639  		x := v_0.Args[0]
  7640  		v.reset(OpS390XLPDFR)
  7641  		v.AddArg(x)
  7642  		return true
  7643  	}
  7644  	return false
  7645  }
  7646  func rewriteValueS390X_OpS390XFNEGS(v *Value) bool {
  7647  	v_0 := v.Args[0]
  7648  	// match: (FNEGS (LPDFR x))
  7649  	// result: (LNDFR x)
  7650  	for {
  7651  		if v_0.Op != OpS390XLPDFR {
  7652  			break
  7653  		}
  7654  		x := v_0.Args[0]
  7655  		v.reset(OpS390XLNDFR)
  7656  		v.AddArg(x)
  7657  		return true
  7658  	}
  7659  	// match: (FNEGS (LNDFR x))
  7660  	// result: (LPDFR x)
  7661  	for {
  7662  		if v_0.Op != OpS390XLNDFR {
  7663  			break
  7664  		}
  7665  		x := v_0.Args[0]
  7666  		v.reset(OpS390XLPDFR)
  7667  		v.AddArg(x)
  7668  		return true
  7669  	}
  7670  	return false
  7671  }
  7672  func rewriteValueS390X_OpS390XLDGR(v *Value) bool {
  7673  	v_0 := v.Args[0]
  7674  	b := v.Block
  7675  	// match: (LDGR <t> (RISBGZ x {r}))
  7676  	// cond: r == s390x.NewRotateParams(1, 63, 0)
  7677  	// result: (LPDFR (LDGR <t> x))
  7678  	for {
  7679  		t := v.Type
  7680  		if v_0.Op != OpS390XRISBGZ {
  7681  			break
  7682  		}
  7683  		r := auxToS390xRotateParams(v_0.Aux)
  7684  		x := v_0.Args[0]
  7685  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
  7686  			break
  7687  		}
  7688  		v.reset(OpS390XLPDFR)
  7689  		v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7690  		v0.AddArg(x)
  7691  		v.AddArg(v0)
  7692  		return true
  7693  	}
  7694  	// match: (LDGR <t> (OR (MOVDconst [-1<<63]) x))
  7695  	// result: (LNDFR (LDGR <t> x))
  7696  	for {
  7697  		t := v.Type
  7698  		if v_0.Op != OpS390XOR {
  7699  			break
  7700  		}
  7701  		_ = v_0.Args[1]
  7702  		v_0_0 := v_0.Args[0]
  7703  		v_0_1 := v_0.Args[1]
  7704  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7705  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != -1<<63 {
  7706  				continue
  7707  			}
  7708  			x := v_0_1
  7709  			v.reset(OpS390XLNDFR)
  7710  			v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7711  			v0.AddArg(x)
  7712  			v.AddArg(v0)
  7713  			return true
  7714  		}
  7715  		break
  7716  	}
  7717  	// match: (LDGR <t> x:(ORload <t1> [off] {sym} (MOVDconst [-1<<63]) ptr mem))
  7718  	// cond: x.Uses == 1 && clobber(x)
  7719  	// result: @x.Block (LNDFR <t> (LDGR <t> (MOVDload <t1> [off] {sym} ptr mem)))
  7720  	for {
  7721  		t := v.Type
  7722  		x := v_0
  7723  		if x.Op != OpS390XORload {
  7724  			break
  7725  		}
  7726  		t1 := x.Type
  7727  		off := auxIntToInt32(x.AuxInt)
  7728  		sym := auxToSym(x.Aux)
  7729  		mem := x.Args[2]
  7730  		x_0 := x.Args[0]
  7731  		if x_0.Op != OpS390XMOVDconst || auxIntToInt64(x_0.AuxInt) != -1<<63 {
  7732  			break
  7733  		}
  7734  		ptr := x.Args[1]
  7735  		if !(x.Uses == 1 && clobber(x)) {
  7736  			break
  7737  		}
  7738  		b = x.Block
  7739  		v0 := b.NewValue0(x.Pos, OpS390XLNDFR, t)
  7740  		v.copyOf(v0)
  7741  		v1 := b.NewValue0(x.Pos, OpS390XLDGR, t)
  7742  		v2 := b.NewValue0(x.Pos, OpS390XMOVDload, t1)
  7743  		v2.AuxInt = int32ToAuxInt(off)
  7744  		v2.Aux = symToAux(sym)
  7745  		v2.AddArg2(ptr, mem)
  7746  		v1.AddArg(v2)
  7747  		v0.AddArg(v1)
  7748  		return true
  7749  	}
  7750  	// match: (LDGR (LGDR x))
  7751  	// result: x
  7752  	for {
  7753  		if v_0.Op != OpS390XLGDR {
  7754  			break
  7755  		}
  7756  		x := v_0.Args[0]
  7757  		v.copyOf(x)
  7758  		return true
  7759  	}
  7760  	return false
  7761  }
  7762  func rewriteValueS390X_OpS390XLEDBR(v *Value) bool {
  7763  	v_0 := v.Args[0]
  7764  	// match: (LEDBR (LPDFR (LDEBR x)))
  7765  	// result: (LPDFR x)
  7766  	for {
  7767  		if v_0.Op != OpS390XLPDFR {
  7768  			break
  7769  		}
  7770  		v_0_0 := v_0.Args[0]
  7771  		if v_0_0.Op != OpS390XLDEBR {
  7772  			break
  7773  		}
  7774  		x := v_0_0.Args[0]
  7775  		v.reset(OpS390XLPDFR)
  7776  		v.AddArg(x)
  7777  		return true
  7778  	}
  7779  	// match: (LEDBR (LNDFR (LDEBR x)))
  7780  	// result: (LNDFR x)
  7781  	for {
  7782  		if v_0.Op != OpS390XLNDFR {
  7783  			break
  7784  		}
  7785  		v_0_0 := v_0.Args[0]
  7786  		if v_0_0.Op != OpS390XLDEBR {
  7787  			break
  7788  		}
  7789  		x := v_0_0.Args[0]
  7790  		v.reset(OpS390XLNDFR)
  7791  		v.AddArg(x)
  7792  		return true
  7793  	}
  7794  	return false
  7795  }
  7796  func rewriteValueS390X_OpS390XLGDR(v *Value) bool {
  7797  	v_0 := v.Args[0]
  7798  	// match: (LGDR (LDGR x))
  7799  	// result: x
  7800  	for {
  7801  		if v_0.Op != OpS390XLDGR {
  7802  			break
  7803  		}
  7804  		x := v_0.Args[0]
  7805  		v.copyOf(x)
  7806  		return true
  7807  	}
  7808  	return false
  7809  }
  7810  func rewriteValueS390X_OpS390XLOCGR(v *Value) bool {
  7811  	v_2 := v.Args[2]
  7812  	v_1 := v.Args[1]
  7813  	v_0 := v.Args[0]
  7814  	// match: (LOCGR {c} x y (InvertFlags cmp))
  7815  	// result: (LOCGR {c.ReverseComparison()} x y cmp)
  7816  	for {
  7817  		c := auxToS390xCCMask(v.Aux)
  7818  		x := v_0
  7819  		y := v_1
  7820  		if v_2.Op != OpS390XInvertFlags {
  7821  			break
  7822  		}
  7823  		cmp := v_2.Args[0]
  7824  		v.reset(OpS390XLOCGR)
  7825  		v.Aux = s390xCCMaskToAux(c.ReverseComparison())
  7826  		v.AddArg3(x, y, cmp)
  7827  		return true
  7828  	}
  7829  	// match: (LOCGR {c} _ x (FlagEQ))
  7830  	// cond: c&s390x.Equal != 0
  7831  	// result: x
  7832  	for {
  7833  		c := auxToS390xCCMask(v.Aux)
  7834  		x := v_1
  7835  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal != 0) {
  7836  			break
  7837  		}
  7838  		v.copyOf(x)
  7839  		return true
  7840  	}
  7841  	// match: (LOCGR {c} _ x (FlagLT))
  7842  	// cond: c&s390x.Less != 0
  7843  	// result: x
  7844  	for {
  7845  		c := auxToS390xCCMask(v.Aux)
  7846  		x := v_1
  7847  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less != 0) {
  7848  			break
  7849  		}
  7850  		v.copyOf(x)
  7851  		return true
  7852  	}
  7853  	// match: (LOCGR {c} _ x (FlagGT))
  7854  	// cond: c&s390x.Greater != 0
  7855  	// result: x
  7856  	for {
  7857  		c := auxToS390xCCMask(v.Aux)
  7858  		x := v_1
  7859  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater != 0) {
  7860  			break
  7861  		}
  7862  		v.copyOf(x)
  7863  		return true
  7864  	}
  7865  	// match: (LOCGR {c} _ x (FlagOV))
  7866  	// cond: c&s390x.Unordered != 0
  7867  	// result: x
  7868  	for {
  7869  		c := auxToS390xCCMask(v.Aux)
  7870  		x := v_1
  7871  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered != 0) {
  7872  			break
  7873  		}
  7874  		v.copyOf(x)
  7875  		return true
  7876  	}
  7877  	// match: (LOCGR {c} x _ (FlagEQ))
  7878  	// cond: c&s390x.Equal == 0
  7879  	// result: x
  7880  	for {
  7881  		c := auxToS390xCCMask(v.Aux)
  7882  		x := v_0
  7883  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal == 0) {
  7884  			break
  7885  		}
  7886  		v.copyOf(x)
  7887  		return true
  7888  	}
  7889  	// match: (LOCGR {c} x _ (FlagLT))
  7890  	// cond: c&s390x.Less == 0
  7891  	// result: x
  7892  	for {
  7893  		c := auxToS390xCCMask(v.Aux)
  7894  		x := v_0
  7895  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less == 0) {
  7896  			break
  7897  		}
  7898  		v.copyOf(x)
  7899  		return true
  7900  	}
  7901  	// match: (LOCGR {c} x _ (FlagGT))
  7902  	// cond: c&s390x.Greater == 0
  7903  	// result: x
  7904  	for {
  7905  		c := auxToS390xCCMask(v.Aux)
  7906  		x := v_0
  7907  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater == 0) {
  7908  			break
  7909  		}
  7910  		v.copyOf(x)
  7911  		return true
  7912  	}
  7913  	// match: (LOCGR {c} x _ (FlagOV))
  7914  	// cond: c&s390x.Unordered == 0
  7915  	// result: x
  7916  	for {
  7917  		c := auxToS390xCCMask(v.Aux)
  7918  		x := v_0
  7919  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered == 0) {
  7920  			break
  7921  		}
  7922  		v.copyOf(x)
  7923  		return true
  7924  	}
  7925  	return false
  7926  }
  7927  func rewriteValueS390X_OpS390XLTDBR(v *Value) bool {
  7928  	v_0 := v.Args[0]
  7929  	b := v.Block
  7930  	// match: (LTDBR (Select0 x:(FADD _ _)))
  7931  	// cond: b == x.Block
  7932  	// result: (Select1 x)
  7933  	for {
  7934  		if v_0.Op != OpSelect0 {
  7935  			break
  7936  		}
  7937  		x := v_0.Args[0]
  7938  		if x.Op != OpS390XFADD || !(b == x.Block) {
  7939  			break
  7940  		}
  7941  		v.reset(OpSelect1)
  7942  		v.AddArg(x)
  7943  		return true
  7944  	}
  7945  	// match: (LTDBR (Select0 x:(FSUB _ _)))
  7946  	// cond: b == x.Block
  7947  	// result: (Select1 x)
  7948  	for {
  7949  		if v_0.Op != OpSelect0 {
  7950  			break
  7951  		}
  7952  		x := v_0.Args[0]
  7953  		if x.Op != OpS390XFSUB || !(b == x.Block) {
  7954  			break
  7955  		}
  7956  		v.reset(OpSelect1)
  7957  		v.AddArg(x)
  7958  		return true
  7959  	}
  7960  	return false
  7961  }
  7962  func rewriteValueS390X_OpS390XLTEBR(v *Value) bool {
  7963  	v_0 := v.Args[0]
  7964  	b := v.Block
  7965  	// match: (LTEBR (Select0 x:(FADDS _ _)))
  7966  	// cond: b == x.Block
  7967  	// result: (Select1 x)
  7968  	for {
  7969  		if v_0.Op != OpSelect0 {
  7970  			break
  7971  		}
  7972  		x := v_0.Args[0]
  7973  		if x.Op != OpS390XFADDS || !(b == x.Block) {
  7974  			break
  7975  		}
  7976  		v.reset(OpSelect1)
  7977  		v.AddArg(x)
  7978  		return true
  7979  	}
  7980  	// match: (LTEBR (Select0 x:(FSUBS _ _)))
  7981  	// cond: b == x.Block
  7982  	// result: (Select1 x)
  7983  	for {
  7984  		if v_0.Op != OpSelect0 {
  7985  			break
  7986  		}
  7987  		x := v_0.Args[0]
  7988  		if x.Op != OpS390XFSUBS || !(b == x.Block) {
  7989  			break
  7990  		}
  7991  		v.reset(OpSelect1)
  7992  		v.AddArg(x)
  7993  		return true
  7994  	}
  7995  	return false
  7996  }
  7997  func rewriteValueS390X_OpS390XLoweredRound32F(v *Value) bool {
  7998  	v_0 := v.Args[0]
  7999  	// match: (LoweredRound32F x:(FMOVSconst))
  8000  	// result: x
  8001  	for {
  8002  		x := v_0
  8003  		if x.Op != OpS390XFMOVSconst {
  8004  			break
  8005  		}
  8006  		v.copyOf(x)
  8007  		return true
  8008  	}
  8009  	return false
  8010  }
  8011  func rewriteValueS390X_OpS390XLoweredRound64F(v *Value) bool {
  8012  	v_0 := v.Args[0]
  8013  	// match: (LoweredRound64F x:(FMOVDconst))
  8014  	// result: x
  8015  	for {
  8016  		x := v_0
  8017  		if x.Op != OpS390XFMOVDconst {
  8018  			break
  8019  		}
  8020  		v.copyOf(x)
  8021  		return true
  8022  	}
  8023  	return false
  8024  }
  8025  func rewriteValueS390X_OpS390XMOVBZload(v *Value) bool {
  8026  	v_1 := v.Args[1]
  8027  	v_0 := v.Args[0]
  8028  	// match: (MOVBZload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8029  	// cond: isSamePtr(ptr1, ptr2)
  8030  	// result: (MOVBZreg x)
  8031  	for {
  8032  		off := auxIntToInt32(v.AuxInt)
  8033  		sym := auxToSym(v.Aux)
  8034  		ptr1 := v_0
  8035  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8036  			break
  8037  		}
  8038  		x := v_1.Args[1]
  8039  		ptr2 := v_1.Args[0]
  8040  		if !(isSamePtr(ptr1, ptr2)) {
  8041  			break
  8042  		}
  8043  		v.reset(OpS390XMOVBZreg)
  8044  		v.AddArg(x)
  8045  		return true
  8046  	}
  8047  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] ptr) mem)
  8048  	// cond: is20Bit(int64(off1)+int64(off2))
  8049  	// result: (MOVBZload [off1+off2] {sym} ptr mem)
  8050  	for {
  8051  		off1 := auxIntToInt32(v.AuxInt)
  8052  		sym := auxToSym(v.Aux)
  8053  		if v_0.Op != OpS390XADDconst {
  8054  			break
  8055  		}
  8056  		off2 := auxIntToInt32(v_0.AuxInt)
  8057  		ptr := v_0.Args[0]
  8058  		mem := v_1
  8059  		if !(is20Bit(int64(off1) + int64(off2))) {
  8060  			break
  8061  		}
  8062  		v.reset(OpS390XMOVBZload)
  8063  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8064  		v.Aux = symToAux(sym)
  8065  		v.AddArg2(ptr, mem)
  8066  		return true
  8067  	}
  8068  	// match: (MOVBZload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8069  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8070  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8071  	for {
  8072  		off1 := auxIntToInt32(v.AuxInt)
  8073  		sym1 := auxToSym(v.Aux)
  8074  		if v_0.Op != OpS390XMOVDaddr {
  8075  			break
  8076  		}
  8077  		off2 := auxIntToInt32(v_0.AuxInt)
  8078  		sym2 := auxToSym(v_0.Aux)
  8079  		base := v_0.Args[0]
  8080  		mem := v_1
  8081  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8082  			break
  8083  		}
  8084  		v.reset(OpS390XMOVBZload)
  8085  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8086  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8087  		v.AddArg2(base, mem)
  8088  		return true
  8089  	}
  8090  	return false
  8091  }
  8092  func rewriteValueS390X_OpS390XMOVBZreg(v *Value) bool {
  8093  	v_0 := v.Args[0]
  8094  	b := v.Block
  8095  	typ := &b.Func.Config.Types
  8096  	// match: (MOVBZreg e:(MOVBreg x))
  8097  	// cond: clobberIfDead(e)
  8098  	// result: (MOVBZreg x)
  8099  	for {
  8100  		e := v_0
  8101  		if e.Op != OpS390XMOVBreg {
  8102  			break
  8103  		}
  8104  		x := e.Args[0]
  8105  		if !(clobberIfDead(e)) {
  8106  			break
  8107  		}
  8108  		v.reset(OpS390XMOVBZreg)
  8109  		v.AddArg(x)
  8110  		return true
  8111  	}
  8112  	// match: (MOVBZreg e:(MOVHreg x))
  8113  	// cond: clobberIfDead(e)
  8114  	// result: (MOVBZreg x)
  8115  	for {
  8116  		e := v_0
  8117  		if e.Op != OpS390XMOVHreg {
  8118  			break
  8119  		}
  8120  		x := e.Args[0]
  8121  		if !(clobberIfDead(e)) {
  8122  			break
  8123  		}
  8124  		v.reset(OpS390XMOVBZreg)
  8125  		v.AddArg(x)
  8126  		return true
  8127  	}
  8128  	// match: (MOVBZreg e:(MOVWreg x))
  8129  	// cond: clobberIfDead(e)
  8130  	// result: (MOVBZreg x)
  8131  	for {
  8132  		e := v_0
  8133  		if e.Op != OpS390XMOVWreg {
  8134  			break
  8135  		}
  8136  		x := e.Args[0]
  8137  		if !(clobberIfDead(e)) {
  8138  			break
  8139  		}
  8140  		v.reset(OpS390XMOVBZreg)
  8141  		v.AddArg(x)
  8142  		return true
  8143  	}
  8144  	// match: (MOVBZreg e:(MOVBZreg x))
  8145  	// cond: clobberIfDead(e)
  8146  	// result: (MOVBZreg x)
  8147  	for {
  8148  		e := v_0
  8149  		if e.Op != OpS390XMOVBZreg {
  8150  			break
  8151  		}
  8152  		x := e.Args[0]
  8153  		if !(clobberIfDead(e)) {
  8154  			break
  8155  		}
  8156  		v.reset(OpS390XMOVBZreg)
  8157  		v.AddArg(x)
  8158  		return true
  8159  	}
  8160  	// match: (MOVBZreg e:(MOVHZreg x))
  8161  	// cond: clobberIfDead(e)
  8162  	// result: (MOVBZreg x)
  8163  	for {
  8164  		e := v_0
  8165  		if e.Op != OpS390XMOVHZreg {
  8166  			break
  8167  		}
  8168  		x := e.Args[0]
  8169  		if !(clobberIfDead(e)) {
  8170  			break
  8171  		}
  8172  		v.reset(OpS390XMOVBZreg)
  8173  		v.AddArg(x)
  8174  		return true
  8175  	}
  8176  	// match: (MOVBZreg e:(MOVWZreg x))
  8177  	// cond: clobberIfDead(e)
  8178  	// result: (MOVBZreg x)
  8179  	for {
  8180  		e := v_0
  8181  		if e.Op != OpS390XMOVWZreg {
  8182  			break
  8183  		}
  8184  		x := e.Args[0]
  8185  		if !(clobberIfDead(e)) {
  8186  			break
  8187  		}
  8188  		v.reset(OpS390XMOVBZreg)
  8189  		v.AddArg(x)
  8190  		return true
  8191  	}
  8192  	// match: (MOVBZreg x:(MOVBZload _ _))
  8193  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  8194  	// result: x
  8195  	for {
  8196  		x := v_0
  8197  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  8198  			break
  8199  		}
  8200  		v.copyOf(x)
  8201  		return true
  8202  	}
  8203  	// match: (MOVBZreg <t> x:(MOVBload [o] {s} p mem))
  8204  	// cond: x.Uses == 1 && clobber(x)
  8205  	// result: @x.Block (MOVBZload <t> [o] {s} p mem)
  8206  	for {
  8207  		t := v.Type
  8208  		x := v_0
  8209  		if x.Op != OpS390XMOVBload {
  8210  			break
  8211  		}
  8212  		o := auxIntToInt32(x.AuxInt)
  8213  		s := auxToSym(x.Aux)
  8214  		mem := x.Args[1]
  8215  		p := x.Args[0]
  8216  		if !(x.Uses == 1 && clobber(x)) {
  8217  			break
  8218  		}
  8219  		b = x.Block
  8220  		v0 := b.NewValue0(x.Pos, OpS390XMOVBZload, t)
  8221  		v.copyOf(v0)
  8222  		v0.AuxInt = int32ToAuxInt(o)
  8223  		v0.Aux = symToAux(s)
  8224  		v0.AddArg2(p, mem)
  8225  		return true
  8226  	}
  8227  	// match: (MOVBZreg x:(Arg <t>))
  8228  	// cond: !t.IsSigned() && t.Size() == 1
  8229  	// result: x
  8230  	for {
  8231  		x := v_0
  8232  		if x.Op != OpArg {
  8233  			break
  8234  		}
  8235  		t := x.Type
  8236  		if !(!t.IsSigned() && t.Size() == 1) {
  8237  			break
  8238  		}
  8239  		v.copyOf(x)
  8240  		return true
  8241  	}
  8242  	// match: (MOVBZreg (MOVDconst [c]))
  8243  	// result: (MOVDconst [int64( uint8(c))])
  8244  	for {
  8245  		if v_0.Op != OpS390XMOVDconst {
  8246  			break
  8247  		}
  8248  		c := auxIntToInt64(v_0.AuxInt)
  8249  		v.reset(OpS390XMOVDconst)
  8250  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8251  		return true
  8252  	}
  8253  	// match: (MOVBZreg x:(LOCGR (MOVDconst [c]) (MOVDconst [d]) _))
  8254  	// cond: int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)
  8255  	// result: x
  8256  	for {
  8257  		x := v_0
  8258  		if x.Op != OpS390XLOCGR {
  8259  			break
  8260  		}
  8261  		_ = x.Args[1]
  8262  		x_0 := x.Args[0]
  8263  		if x_0.Op != OpS390XMOVDconst {
  8264  			break
  8265  		}
  8266  		c := auxIntToInt64(x_0.AuxInt)
  8267  		x_1 := x.Args[1]
  8268  		if x_1.Op != OpS390XMOVDconst {
  8269  			break
  8270  		}
  8271  		d := auxIntToInt64(x_1.AuxInt)
  8272  		if !(int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)) {
  8273  			break
  8274  		}
  8275  		v.copyOf(x)
  8276  		return true
  8277  	}
  8278  	// match: (MOVBZreg (RISBGZ x {r}))
  8279  	// cond: r.OutMerge(0x000000ff) != nil
  8280  	// result: (RISBGZ x {*r.OutMerge(0x000000ff)})
  8281  	for {
  8282  		if v_0.Op != OpS390XRISBGZ {
  8283  			break
  8284  		}
  8285  		r := auxToS390xRotateParams(v_0.Aux)
  8286  		x := v_0.Args[0]
  8287  		if !(r.OutMerge(0x000000ff) != nil) {
  8288  			break
  8289  		}
  8290  		v.reset(OpS390XRISBGZ)
  8291  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x000000ff))
  8292  		v.AddArg(x)
  8293  		return true
  8294  	}
  8295  	// match: (MOVBZreg (ANDWconst [m] x))
  8296  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8297  	for {
  8298  		if v_0.Op != OpS390XANDWconst {
  8299  			break
  8300  		}
  8301  		m := auxIntToInt32(v_0.AuxInt)
  8302  		x := v_0.Args[0]
  8303  		v.reset(OpS390XMOVWZreg)
  8304  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8305  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8306  		v0.AddArg(x)
  8307  		v.AddArg(v0)
  8308  		return true
  8309  	}
  8310  	return false
  8311  }
  8312  func rewriteValueS390X_OpS390XMOVBload(v *Value) bool {
  8313  	v_1 := v.Args[1]
  8314  	v_0 := v.Args[0]
  8315  	// match: (MOVBload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8316  	// cond: isSamePtr(ptr1, ptr2)
  8317  	// result: (MOVBreg x)
  8318  	for {
  8319  		off := auxIntToInt32(v.AuxInt)
  8320  		sym := auxToSym(v.Aux)
  8321  		ptr1 := v_0
  8322  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8323  			break
  8324  		}
  8325  		x := v_1.Args[1]
  8326  		ptr2 := v_1.Args[0]
  8327  		if !(isSamePtr(ptr1, ptr2)) {
  8328  			break
  8329  		}
  8330  		v.reset(OpS390XMOVBreg)
  8331  		v.AddArg(x)
  8332  		return true
  8333  	}
  8334  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8335  	// cond: is20Bit(int64(off1)+int64(off2))
  8336  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  8337  	for {
  8338  		off1 := auxIntToInt32(v.AuxInt)
  8339  		sym := auxToSym(v.Aux)
  8340  		if v_0.Op != OpS390XADDconst {
  8341  			break
  8342  		}
  8343  		off2 := auxIntToInt32(v_0.AuxInt)
  8344  		ptr := v_0.Args[0]
  8345  		mem := v_1
  8346  		if !(is20Bit(int64(off1) + int64(off2))) {
  8347  			break
  8348  		}
  8349  		v.reset(OpS390XMOVBload)
  8350  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8351  		v.Aux = symToAux(sym)
  8352  		v.AddArg2(ptr, mem)
  8353  		return true
  8354  	}
  8355  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8356  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8357  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8358  	for {
  8359  		off1 := auxIntToInt32(v.AuxInt)
  8360  		sym1 := auxToSym(v.Aux)
  8361  		if v_0.Op != OpS390XMOVDaddr {
  8362  			break
  8363  		}
  8364  		off2 := auxIntToInt32(v_0.AuxInt)
  8365  		sym2 := auxToSym(v_0.Aux)
  8366  		base := v_0.Args[0]
  8367  		mem := v_1
  8368  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8369  			break
  8370  		}
  8371  		v.reset(OpS390XMOVBload)
  8372  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8373  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8374  		v.AddArg2(base, mem)
  8375  		return true
  8376  	}
  8377  	return false
  8378  }
  8379  func rewriteValueS390X_OpS390XMOVBreg(v *Value) bool {
  8380  	v_0 := v.Args[0]
  8381  	b := v.Block
  8382  	typ := &b.Func.Config.Types
  8383  	// match: (MOVBreg e:(MOVBreg x))
  8384  	// cond: clobberIfDead(e)
  8385  	// result: (MOVBreg x)
  8386  	for {
  8387  		e := v_0
  8388  		if e.Op != OpS390XMOVBreg {
  8389  			break
  8390  		}
  8391  		x := e.Args[0]
  8392  		if !(clobberIfDead(e)) {
  8393  			break
  8394  		}
  8395  		v.reset(OpS390XMOVBreg)
  8396  		v.AddArg(x)
  8397  		return true
  8398  	}
  8399  	// match: (MOVBreg e:(MOVHreg x))
  8400  	// cond: clobberIfDead(e)
  8401  	// result: (MOVBreg x)
  8402  	for {
  8403  		e := v_0
  8404  		if e.Op != OpS390XMOVHreg {
  8405  			break
  8406  		}
  8407  		x := e.Args[0]
  8408  		if !(clobberIfDead(e)) {
  8409  			break
  8410  		}
  8411  		v.reset(OpS390XMOVBreg)
  8412  		v.AddArg(x)
  8413  		return true
  8414  	}
  8415  	// match: (MOVBreg e:(MOVWreg x))
  8416  	// cond: clobberIfDead(e)
  8417  	// result: (MOVBreg x)
  8418  	for {
  8419  		e := v_0
  8420  		if e.Op != OpS390XMOVWreg {
  8421  			break
  8422  		}
  8423  		x := e.Args[0]
  8424  		if !(clobberIfDead(e)) {
  8425  			break
  8426  		}
  8427  		v.reset(OpS390XMOVBreg)
  8428  		v.AddArg(x)
  8429  		return true
  8430  	}
  8431  	// match: (MOVBreg e:(MOVBZreg x))
  8432  	// cond: clobberIfDead(e)
  8433  	// result: (MOVBreg x)
  8434  	for {
  8435  		e := v_0
  8436  		if e.Op != OpS390XMOVBZreg {
  8437  			break
  8438  		}
  8439  		x := e.Args[0]
  8440  		if !(clobberIfDead(e)) {
  8441  			break
  8442  		}
  8443  		v.reset(OpS390XMOVBreg)
  8444  		v.AddArg(x)
  8445  		return true
  8446  	}
  8447  	// match: (MOVBreg e:(MOVHZreg x))
  8448  	// cond: clobberIfDead(e)
  8449  	// result: (MOVBreg x)
  8450  	for {
  8451  		e := v_0
  8452  		if e.Op != OpS390XMOVHZreg {
  8453  			break
  8454  		}
  8455  		x := e.Args[0]
  8456  		if !(clobberIfDead(e)) {
  8457  			break
  8458  		}
  8459  		v.reset(OpS390XMOVBreg)
  8460  		v.AddArg(x)
  8461  		return true
  8462  	}
  8463  	// match: (MOVBreg e:(MOVWZreg x))
  8464  	// cond: clobberIfDead(e)
  8465  	// result: (MOVBreg x)
  8466  	for {
  8467  		e := v_0
  8468  		if e.Op != OpS390XMOVWZreg {
  8469  			break
  8470  		}
  8471  		x := e.Args[0]
  8472  		if !(clobberIfDead(e)) {
  8473  			break
  8474  		}
  8475  		v.reset(OpS390XMOVBreg)
  8476  		v.AddArg(x)
  8477  		return true
  8478  	}
  8479  	// match: (MOVBreg x:(MOVBload _ _))
  8480  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  8481  	// result: x
  8482  	for {
  8483  		x := v_0
  8484  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  8485  			break
  8486  		}
  8487  		v.copyOf(x)
  8488  		return true
  8489  	}
  8490  	// match: (MOVBreg <t> x:(MOVBZload [o] {s} p mem))
  8491  	// cond: x.Uses == 1 && clobber(x)
  8492  	// result: @x.Block (MOVBload <t> [o] {s} p mem)
  8493  	for {
  8494  		t := v.Type
  8495  		x := v_0
  8496  		if x.Op != OpS390XMOVBZload {
  8497  			break
  8498  		}
  8499  		o := auxIntToInt32(x.AuxInt)
  8500  		s := auxToSym(x.Aux)
  8501  		mem := x.Args[1]
  8502  		p := x.Args[0]
  8503  		if !(x.Uses == 1 && clobber(x)) {
  8504  			break
  8505  		}
  8506  		b = x.Block
  8507  		v0 := b.NewValue0(x.Pos, OpS390XMOVBload, t)
  8508  		v.copyOf(v0)
  8509  		v0.AuxInt = int32ToAuxInt(o)
  8510  		v0.Aux = symToAux(s)
  8511  		v0.AddArg2(p, mem)
  8512  		return true
  8513  	}
  8514  	// match: (MOVBreg x:(Arg <t>))
  8515  	// cond: t.IsSigned() && t.Size() == 1
  8516  	// result: x
  8517  	for {
  8518  		x := v_0
  8519  		if x.Op != OpArg {
  8520  			break
  8521  		}
  8522  		t := x.Type
  8523  		if !(t.IsSigned() && t.Size() == 1) {
  8524  			break
  8525  		}
  8526  		v.copyOf(x)
  8527  		return true
  8528  	}
  8529  	// match: (MOVBreg (MOVDconst [c]))
  8530  	// result: (MOVDconst [int64( int8(c))])
  8531  	for {
  8532  		if v_0.Op != OpS390XMOVDconst {
  8533  			break
  8534  		}
  8535  		c := auxIntToInt64(v_0.AuxInt)
  8536  		v.reset(OpS390XMOVDconst)
  8537  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8538  		return true
  8539  	}
  8540  	// match: (MOVBreg (ANDWconst [m] x))
  8541  	// cond: int8(m) >= 0
  8542  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8543  	for {
  8544  		if v_0.Op != OpS390XANDWconst {
  8545  			break
  8546  		}
  8547  		m := auxIntToInt32(v_0.AuxInt)
  8548  		x := v_0.Args[0]
  8549  		if !(int8(m) >= 0) {
  8550  			break
  8551  		}
  8552  		v.reset(OpS390XMOVWZreg)
  8553  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8554  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8555  		v0.AddArg(x)
  8556  		v.AddArg(v0)
  8557  		return true
  8558  	}
  8559  	return false
  8560  }
  8561  func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
  8562  	v_2 := v.Args[2]
  8563  	v_1 := v.Args[1]
  8564  	v_0 := v.Args[0]
  8565  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8566  	// result: (MOVBstore [off] {sym} ptr x mem)
  8567  	for {
  8568  		off := auxIntToInt32(v.AuxInt)
  8569  		sym := auxToSym(v.Aux)
  8570  		ptr := v_0
  8571  		if v_1.Op != OpS390XMOVBreg {
  8572  			break
  8573  		}
  8574  		x := v_1.Args[0]
  8575  		mem := v_2
  8576  		v.reset(OpS390XMOVBstore)
  8577  		v.AuxInt = int32ToAuxInt(off)
  8578  		v.Aux = symToAux(sym)
  8579  		v.AddArg3(ptr, x, mem)
  8580  		return true
  8581  	}
  8582  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8583  	// result: (MOVBstore [off] {sym} ptr x mem)
  8584  	for {
  8585  		off := auxIntToInt32(v.AuxInt)
  8586  		sym := auxToSym(v.Aux)
  8587  		ptr := v_0
  8588  		if v_1.Op != OpS390XMOVBZreg {
  8589  			break
  8590  		}
  8591  		x := v_1.Args[0]
  8592  		mem := v_2
  8593  		v.reset(OpS390XMOVBstore)
  8594  		v.AuxInt = int32ToAuxInt(off)
  8595  		v.Aux = symToAux(sym)
  8596  		v.AddArg3(ptr, x, mem)
  8597  		return true
  8598  	}
  8599  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8600  	// cond: is20Bit(int64(off1)+int64(off2))
  8601  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  8602  	for {
  8603  		off1 := auxIntToInt32(v.AuxInt)
  8604  		sym := auxToSym(v.Aux)
  8605  		if v_0.Op != OpS390XADDconst {
  8606  			break
  8607  		}
  8608  		off2 := auxIntToInt32(v_0.AuxInt)
  8609  		ptr := v_0.Args[0]
  8610  		val := v_1
  8611  		mem := v_2
  8612  		if !(is20Bit(int64(off1) + int64(off2))) {
  8613  			break
  8614  		}
  8615  		v.reset(OpS390XMOVBstore)
  8616  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8617  		v.Aux = symToAux(sym)
  8618  		v.AddArg3(ptr, val, mem)
  8619  		return true
  8620  	}
  8621  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [c]) mem)
  8622  	// cond: is20Bit(int64(off)) && ptr.Op != OpSB
  8623  	// result: (MOVBstoreconst [makeValAndOff(int32(int8(c)),off)] {sym} ptr mem)
  8624  	for {
  8625  		off := auxIntToInt32(v.AuxInt)
  8626  		sym := auxToSym(v.Aux)
  8627  		ptr := v_0
  8628  		if v_1.Op != OpS390XMOVDconst {
  8629  			break
  8630  		}
  8631  		c := auxIntToInt64(v_1.AuxInt)
  8632  		mem := v_2
  8633  		if !(is20Bit(int64(off)) && ptr.Op != OpSB) {
  8634  			break
  8635  		}
  8636  		v.reset(OpS390XMOVBstoreconst)
  8637  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int8(c)), off))
  8638  		v.Aux = symToAux(sym)
  8639  		v.AddArg2(ptr, mem)
  8640  		return true
  8641  	}
  8642  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  8643  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8644  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8645  	for {
  8646  		off1 := auxIntToInt32(v.AuxInt)
  8647  		sym1 := auxToSym(v.Aux)
  8648  		if v_0.Op != OpS390XMOVDaddr {
  8649  			break
  8650  		}
  8651  		off2 := auxIntToInt32(v_0.AuxInt)
  8652  		sym2 := auxToSym(v_0.Aux)
  8653  		base := v_0.Args[0]
  8654  		val := v_1
  8655  		mem := v_2
  8656  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8657  			break
  8658  		}
  8659  		v.reset(OpS390XMOVBstore)
  8660  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8661  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8662  		v.AddArg3(base, val, mem)
  8663  		return true
  8664  	}
  8665  	// match: (MOVBstore [i] {s} p w x:(MOVBstore [i-1] {s} p (SRDconst [8] w) mem))
  8666  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8667  	// result: (MOVHstore [i-1] {s} p w mem)
  8668  	for {
  8669  		i := auxIntToInt32(v.AuxInt)
  8670  		s := auxToSym(v.Aux)
  8671  		p := v_0
  8672  		w := v_1
  8673  		x := v_2
  8674  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8675  			break
  8676  		}
  8677  		mem := x.Args[2]
  8678  		if p != x.Args[0] {
  8679  			break
  8680  		}
  8681  		x_1 := x.Args[1]
  8682  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8683  			break
  8684  		}
  8685  		v.reset(OpS390XMOVHstore)
  8686  		v.AuxInt = int32ToAuxInt(i - 1)
  8687  		v.Aux = symToAux(s)
  8688  		v.AddArg3(p, w, mem)
  8689  		return true
  8690  	}
  8691  	// match: (MOVBstore [i] {s} p w0:(SRDconst [j] w) x:(MOVBstore [i-1] {s} p (SRDconst [j+8] w) mem))
  8692  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8693  	// result: (MOVHstore [i-1] {s} p w0 mem)
  8694  	for {
  8695  		i := auxIntToInt32(v.AuxInt)
  8696  		s := auxToSym(v.Aux)
  8697  		p := v_0
  8698  		w0 := v_1
  8699  		if w0.Op != OpS390XSRDconst {
  8700  			break
  8701  		}
  8702  		j := auxIntToUint8(w0.AuxInt)
  8703  		w := w0.Args[0]
  8704  		x := v_2
  8705  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8706  			break
  8707  		}
  8708  		mem := x.Args[2]
  8709  		if p != x.Args[0] {
  8710  			break
  8711  		}
  8712  		x_1 := x.Args[1]
  8713  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != j+8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8714  			break
  8715  		}
  8716  		v.reset(OpS390XMOVHstore)
  8717  		v.AuxInt = int32ToAuxInt(i - 1)
  8718  		v.Aux = symToAux(s)
  8719  		v.AddArg3(p, w0, mem)
  8720  		return true
  8721  	}
  8722  	// match: (MOVBstore [i] {s} p w x:(MOVBstore [i-1] {s} p (SRWconst [8] w) mem))
  8723  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8724  	// result: (MOVHstore [i-1] {s} p w mem)
  8725  	for {
  8726  		i := auxIntToInt32(v.AuxInt)
  8727  		s := auxToSym(v.Aux)
  8728  		p := v_0
  8729  		w := v_1
  8730  		x := v_2
  8731  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8732  			break
  8733  		}
  8734  		mem := x.Args[2]
  8735  		if p != x.Args[0] {
  8736  			break
  8737  		}
  8738  		x_1 := x.Args[1]
  8739  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8740  			break
  8741  		}
  8742  		v.reset(OpS390XMOVHstore)
  8743  		v.AuxInt = int32ToAuxInt(i - 1)
  8744  		v.Aux = symToAux(s)
  8745  		v.AddArg3(p, w, mem)
  8746  		return true
  8747  	}
  8748  	// match: (MOVBstore [i] {s} p w0:(SRWconst [j] w) x:(MOVBstore [i-1] {s} p (SRWconst [j+8] w) mem))
  8749  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8750  	// result: (MOVHstore [i-1] {s} p w0 mem)
  8751  	for {
  8752  		i := auxIntToInt32(v.AuxInt)
  8753  		s := auxToSym(v.Aux)
  8754  		p := v_0
  8755  		w0 := v_1
  8756  		if w0.Op != OpS390XSRWconst {
  8757  			break
  8758  		}
  8759  		j := auxIntToUint8(w0.AuxInt)
  8760  		w := w0.Args[0]
  8761  		x := v_2
  8762  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8763  			break
  8764  		}
  8765  		mem := x.Args[2]
  8766  		if p != x.Args[0] {
  8767  			break
  8768  		}
  8769  		x_1 := x.Args[1]
  8770  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != j+8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8771  			break
  8772  		}
  8773  		v.reset(OpS390XMOVHstore)
  8774  		v.AuxInt = int32ToAuxInt(i - 1)
  8775  		v.Aux = symToAux(s)
  8776  		v.AddArg3(p, w0, mem)
  8777  		return true
  8778  	}
  8779  	// match: (MOVBstore [i] {s} p (SRDconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  8780  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8781  	// result: (MOVHBRstore [i-1] {s} p w mem)
  8782  	for {
  8783  		i := auxIntToInt32(v.AuxInt)
  8784  		s := auxToSym(v.Aux)
  8785  		p := v_0
  8786  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 8 {
  8787  			break
  8788  		}
  8789  		w := v_1.Args[0]
  8790  		x := v_2
  8791  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8792  			break
  8793  		}
  8794  		mem := x.Args[2]
  8795  		if p != x.Args[0] || w != x.Args[1] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8796  			break
  8797  		}
  8798  		v.reset(OpS390XMOVHBRstore)
  8799  		v.AuxInt = int32ToAuxInt(i - 1)
  8800  		v.Aux = symToAux(s)
  8801  		v.AddArg3(p, w, mem)
  8802  		return true
  8803  	}
  8804  	// match: (MOVBstore [i] {s} p (SRDconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SRDconst [j-8] w) mem))
  8805  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8806  	// result: (MOVHBRstore [i-1] {s} p w0 mem)
  8807  	for {
  8808  		i := auxIntToInt32(v.AuxInt)
  8809  		s := auxToSym(v.Aux)
  8810  		p := v_0
  8811  		if v_1.Op != OpS390XSRDconst {
  8812  			break
  8813  		}
  8814  		j := auxIntToUint8(v_1.AuxInt)
  8815  		w := v_1.Args[0]
  8816  		x := v_2
  8817  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8818  			break
  8819  		}
  8820  		mem := x.Args[2]
  8821  		if p != x.Args[0] {
  8822  			break
  8823  		}
  8824  		w0 := x.Args[1]
  8825  		if w0.Op != OpS390XSRDconst || auxIntToUint8(w0.AuxInt) != j-8 || w != w0.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8826  			break
  8827  		}
  8828  		v.reset(OpS390XMOVHBRstore)
  8829  		v.AuxInt = int32ToAuxInt(i - 1)
  8830  		v.Aux = symToAux(s)
  8831  		v.AddArg3(p, w0, mem)
  8832  		return true
  8833  	}
  8834  	// match: (MOVBstore [i] {s} p (SRWconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  8835  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8836  	// result: (MOVHBRstore [i-1] {s} p w mem)
  8837  	for {
  8838  		i := auxIntToInt32(v.AuxInt)
  8839  		s := auxToSym(v.Aux)
  8840  		p := v_0
  8841  		if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 8 {
  8842  			break
  8843  		}
  8844  		w := v_1.Args[0]
  8845  		x := v_2
  8846  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8847  			break
  8848  		}
  8849  		mem := x.Args[2]
  8850  		if p != x.Args[0] || w != x.Args[1] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8851  			break
  8852  		}
  8853  		v.reset(OpS390XMOVHBRstore)
  8854  		v.AuxInt = int32ToAuxInt(i - 1)
  8855  		v.Aux = symToAux(s)
  8856  		v.AddArg3(p, w, mem)
  8857  		return true
  8858  	}
  8859  	// match: (MOVBstore [i] {s} p (SRWconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SRWconst [j-8] w) mem))
  8860  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8861  	// result: (MOVHBRstore [i-1] {s} p w0 mem)
  8862  	for {
  8863  		i := auxIntToInt32(v.AuxInt)
  8864  		s := auxToSym(v.Aux)
  8865  		p := v_0
  8866  		if v_1.Op != OpS390XSRWconst {
  8867  			break
  8868  		}
  8869  		j := auxIntToUint8(v_1.AuxInt)
  8870  		w := v_1.Args[0]
  8871  		x := v_2
  8872  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8873  			break
  8874  		}
  8875  		mem := x.Args[2]
  8876  		if p != x.Args[0] {
  8877  			break
  8878  		}
  8879  		w0 := x.Args[1]
  8880  		if w0.Op != OpS390XSRWconst || auxIntToUint8(w0.AuxInt) != j-8 || w != w0.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8881  			break
  8882  		}
  8883  		v.reset(OpS390XMOVHBRstore)
  8884  		v.AuxInt = int32ToAuxInt(i - 1)
  8885  		v.Aux = symToAux(s)
  8886  		v.AddArg3(p, w0, mem)
  8887  		return true
  8888  	}
  8889  	// match: (MOVBstore [7] {s} p1 (SRDconst w) x1:(MOVHBRstore [5] {s} p1 (SRDconst w) x2:(MOVWBRstore [1] {s} p1 (SRDconst w) x3:(MOVBstore [0] {s} p1 w mem))))
  8890  	// cond: x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && clobber(x1, x2, x3)
  8891  	// result: (MOVDBRstore {s} p1 w mem)
  8892  	for {
  8893  		if auxIntToInt32(v.AuxInt) != 7 {
  8894  			break
  8895  		}
  8896  		s := auxToSym(v.Aux)
  8897  		p1 := v_0
  8898  		if v_1.Op != OpS390XSRDconst {
  8899  			break
  8900  		}
  8901  		w := v_1.Args[0]
  8902  		x1 := v_2
  8903  		if x1.Op != OpS390XMOVHBRstore || auxIntToInt32(x1.AuxInt) != 5 || auxToSym(x1.Aux) != s {
  8904  			break
  8905  		}
  8906  		_ = x1.Args[2]
  8907  		if p1 != x1.Args[0] {
  8908  			break
  8909  		}
  8910  		x1_1 := x1.Args[1]
  8911  		if x1_1.Op != OpS390XSRDconst || w != x1_1.Args[0] {
  8912  			break
  8913  		}
  8914  		x2 := x1.Args[2]
  8915  		if x2.Op != OpS390XMOVWBRstore || auxIntToInt32(x2.AuxInt) != 1 || auxToSym(x2.Aux) != s {
  8916  			break
  8917  		}
  8918  		_ = x2.Args[2]
  8919  		if p1 != x2.Args[0] {
  8920  			break
  8921  		}
  8922  		x2_1 := x2.Args[1]
  8923  		if x2_1.Op != OpS390XSRDconst || w != x2_1.Args[0] {
  8924  			break
  8925  		}
  8926  		x3 := x2.Args[2]
  8927  		if x3.Op != OpS390XMOVBstore || auxIntToInt32(x3.AuxInt) != 0 || auxToSym(x3.Aux) != s {
  8928  			break
  8929  		}
  8930  		mem := x3.Args[2]
  8931  		if p1 != x3.Args[0] || w != x3.Args[1] || !(x1.Uses == 1 && x2.Uses == 1 && x3.Uses == 1 && clobber(x1, x2, x3)) {
  8932  			break
  8933  		}
  8934  		v.reset(OpS390XMOVDBRstore)
  8935  		v.Aux = symToAux(s)
  8936  		v.AddArg3(p1, w, mem)
  8937  		return true
  8938  	}
  8939  	return false
  8940  }
  8941  func rewriteValueS390X_OpS390XMOVBstoreconst(v *Value) bool {
  8942  	v_1 := v.Args[1]
  8943  	v_0 := v.Args[0]
  8944  	// match: (MOVBstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  8945  	// cond: is20Bit(sc.Off64()+int64(off))
  8946  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  8947  	for {
  8948  		sc := auxIntToValAndOff(v.AuxInt)
  8949  		s := auxToSym(v.Aux)
  8950  		if v_0.Op != OpS390XADDconst {
  8951  			break
  8952  		}
  8953  		off := auxIntToInt32(v_0.AuxInt)
  8954  		ptr := v_0.Args[0]
  8955  		mem := v_1
  8956  		if !(is20Bit(sc.Off64() + int64(off))) {
  8957  			break
  8958  		}
  8959  		v.reset(OpS390XMOVBstoreconst)
  8960  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8961  		v.Aux = symToAux(s)
  8962  		v.AddArg2(ptr, mem)
  8963  		return true
  8964  	}
  8965  	// match: (MOVBstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  8966  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  8967  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  8968  	for {
  8969  		sc := auxIntToValAndOff(v.AuxInt)
  8970  		sym1 := auxToSym(v.Aux)
  8971  		if v_0.Op != OpS390XMOVDaddr {
  8972  			break
  8973  		}
  8974  		off := auxIntToInt32(v_0.AuxInt)
  8975  		sym2 := auxToSym(v_0.Aux)
  8976  		ptr := v_0.Args[0]
  8977  		mem := v_1
  8978  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  8979  			break
  8980  		}
  8981  		v.reset(OpS390XMOVBstoreconst)
  8982  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8983  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8984  		v.AddArg2(ptr, mem)
  8985  		return true
  8986  	}
  8987  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  8988  	// cond: p.Op != OpSB && x.Uses == 1 && a.Off() + 1 == c.Off() && clobber(x)
  8989  	// result: (MOVHstoreconst [makeValAndOff(c.Val()&0xff | a.Val()<<8, a.Off())] {s} p mem)
  8990  	for {
  8991  		c := auxIntToValAndOff(v.AuxInt)
  8992  		s := auxToSym(v.Aux)
  8993  		p := v_0
  8994  		x := v_1
  8995  		if x.Op != OpS390XMOVBstoreconst {
  8996  			break
  8997  		}
  8998  		a := auxIntToValAndOff(x.AuxInt)
  8999  		if auxToSym(x.Aux) != s {
  9000  			break
  9001  		}
  9002  		mem := x.Args[1]
  9003  		if p != x.Args[0] || !(p.Op != OpSB && x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
  9004  			break
  9005  		}
  9006  		v.reset(OpS390XMOVHstoreconst)
  9007  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c.Val()&0xff|a.Val()<<8, a.Off()))
  9008  		v.Aux = symToAux(s)
  9009  		v.AddArg2(p, mem)
  9010  		return true
  9011  	}
  9012  	return false
  9013  }
  9014  func rewriteValueS390X_OpS390XMOVDaddridx(v *Value) bool {
  9015  	v_1 := v.Args[1]
  9016  	v_0 := v.Args[0]
  9017  	// match: (MOVDaddridx [c] {s} (ADDconst [d] x) y)
  9018  	// cond: is20Bit(int64(c)+int64(d))
  9019  	// result: (MOVDaddridx [c+d] {s} x y)
  9020  	for {
  9021  		c := auxIntToInt32(v.AuxInt)
  9022  		s := auxToSym(v.Aux)
  9023  		if v_0.Op != OpS390XADDconst {
  9024  			break
  9025  		}
  9026  		d := auxIntToInt32(v_0.AuxInt)
  9027  		x := v_0.Args[0]
  9028  		y := v_1
  9029  		if !(is20Bit(int64(c) + int64(d))) {
  9030  			break
  9031  		}
  9032  		v.reset(OpS390XMOVDaddridx)
  9033  		v.AuxInt = int32ToAuxInt(c + d)
  9034  		v.Aux = symToAux(s)
  9035  		v.AddArg2(x, y)
  9036  		return true
  9037  	}
  9038  	// match: (MOVDaddridx [c] {s} x (ADDconst [d] y))
  9039  	// cond: is20Bit(int64(c)+int64(d))
  9040  	// result: (MOVDaddridx [c+d] {s} x y)
  9041  	for {
  9042  		c := auxIntToInt32(v.AuxInt)
  9043  		s := auxToSym(v.Aux)
  9044  		x := v_0
  9045  		if v_1.Op != OpS390XADDconst {
  9046  			break
  9047  		}
  9048  		d := auxIntToInt32(v_1.AuxInt)
  9049  		y := v_1.Args[0]
  9050  		if !(is20Bit(int64(c) + int64(d))) {
  9051  			break
  9052  		}
  9053  		v.reset(OpS390XMOVDaddridx)
  9054  		v.AuxInt = int32ToAuxInt(c + d)
  9055  		v.Aux = symToAux(s)
  9056  		v.AddArg2(x, y)
  9057  		return true
  9058  	}
  9059  	// match: (MOVDaddridx [off1] {sym1} (MOVDaddr [off2] {sym2} x) y)
  9060  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  9061  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  9062  	for {
  9063  		off1 := auxIntToInt32(v.AuxInt)
  9064  		sym1 := auxToSym(v.Aux)
  9065  		if v_0.Op != OpS390XMOVDaddr {
  9066  			break
  9067  		}
  9068  		off2 := auxIntToInt32(v_0.AuxInt)
  9069  		sym2 := auxToSym(v_0.Aux)
  9070  		x := v_0.Args[0]
  9071  		y := v_1
  9072  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  9073  			break
  9074  		}
  9075  		v.reset(OpS390XMOVDaddridx)
  9076  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9077  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9078  		v.AddArg2(x, y)
  9079  		return true
  9080  	}
  9081  	// match: (MOVDaddridx [off1] {sym1} x (MOVDaddr [off2] {sym2} y))
  9082  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB
  9083  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  9084  	for {
  9085  		off1 := auxIntToInt32(v.AuxInt)
  9086  		sym1 := auxToSym(v.Aux)
  9087  		x := v_0
  9088  		if v_1.Op != OpS390XMOVDaddr {
  9089  			break
  9090  		}
  9091  		off2 := auxIntToInt32(v_1.AuxInt)
  9092  		sym2 := auxToSym(v_1.Aux)
  9093  		y := v_1.Args[0]
  9094  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  9095  			break
  9096  		}
  9097  		v.reset(OpS390XMOVDaddridx)
  9098  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9099  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9100  		v.AddArg2(x, y)
  9101  		return true
  9102  	}
  9103  	return false
  9104  }
  9105  func rewriteValueS390X_OpS390XMOVDload(v *Value) bool {
  9106  	v_1 := v.Args[1]
  9107  	v_0 := v.Args[0]
  9108  	// match: (MOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  9109  	// cond: isSamePtr(ptr1, ptr2)
  9110  	// result: x
  9111  	for {
  9112  		off := auxIntToInt32(v.AuxInt)
  9113  		sym := auxToSym(v.Aux)
  9114  		ptr1 := v_0
  9115  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9116  			break
  9117  		}
  9118  		x := v_1.Args[1]
  9119  		ptr2 := v_1.Args[0]
  9120  		if !(isSamePtr(ptr1, ptr2)) {
  9121  			break
  9122  		}
  9123  		v.copyOf(x)
  9124  		return true
  9125  	}
  9126  	// match: (MOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  9127  	// cond: isSamePtr(ptr1, ptr2)
  9128  	// result: (LGDR x)
  9129  	for {
  9130  		off := auxIntToInt32(v.AuxInt)
  9131  		sym := auxToSym(v.Aux)
  9132  		ptr1 := v_0
  9133  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9134  			break
  9135  		}
  9136  		x := v_1.Args[1]
  9137  		ptr2 := v_1.Args[0]
  9138  		if !(isSamePtr(ptr1, ptr2)) {
  9139  			break
  9140  		}
  9141  		v.reset(OpS390XLGDR)
  9142  		v.AddArg(x)
  9143  		return true
  9144  	}
  9145  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9146  	// cond: is20Bit(int64(off1)+int64(off2))
  9147  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  9148  	for {
  9149  		off1 := auxIntToInt32(v.AuxInt)
  9150  		sym := auxToSym(v.Aux)
  9151  		if v_0.Op != OpS390XADDconst {
  9152  			break
  9153  		}
  9154  		off2 := auxIntToInt32(v_0.AuxInt)
  9155  		ptr := v_0.Args[0]
  9156  		mem := v_1
  9157  		if !(is20Bit(int64(off1) + int64(off2))) {
  9158  			break
  9159  		}
  9160  		v.reset(OpS390XMOVDload)
  9161  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9162  		v.Aux = symToAux(sym)
  9163  		v.AddArg2(ptr, mem)
  9164  		return true
  9165  	}
  9166  	// match: (MOVDload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9167  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9168  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9169  	for {
  9170  		off1 := auxIntToInt32(v.AuxInt)
  9171  		sym1 := auxToSym(v.Aux)
  9172  		if v_0.Op != OpS390XMOVDaddr {
  9173  			break
  9174  		}
  9175  		t := v_0.Type
  9176  		off2 := auxIntToInt32(v_0.AuxInt)
  9177  		sym2 := auxToSym(v_0.Aux)
  9178  		base := v_0.Args[0]
  9179  		mem := v_1
  9180  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9181  			break
  9182  		}
  9183  		v.reset(OpS390XMOVDload)
  9184  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9185  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9186  		v.AddArg2(base, mem)
  9187  		return true
  9188  	}
  9189  	return false
  9190  }
  9191  func rewriteValueS390X_OpS390XMOVDstore(v *Value) bool {
  9192  	v_2 := v.Args[2]
  9193  	v_1 := v.Args[1]
  9194  	v_0 := v.Args[0]
  9195  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9196  	// cond: is20Bit(int64(off1)+int64(off2))
  9197  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  9198  	for {
  9199  		off1 := auxIntToInt32(v.AuxInt)
  9200  		sym := auxToSym(v.Aux)
  9201  		if v_0.Op != OpS390XADDconst {
  9202  			break
  9203  		}
  9204  		off2 := auxIntToInt32(v_0.AuxInt)
  9205  		ptr := v_0.Args[0]
  9206  		val := v_1
  9207  		mem := v_2
  9208  		if !(is20Bit(int64(off1) + int64(off2))) {
  9209  			break
  9210  		}
  9211  		v.reset(OpS390XMOVDstore)
  9212  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9213  		v.Aux = symToAux(sym)
  9214  		v.AddArg3(ptr, val, mem)
  9215  		return true
  9216  	}
  9217  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [c]) mem)
  9218  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
  9219  	// result: (MOVDstoreconst [makeValAndOff(int32(c),off)] {sym} ptr mem)
  9220  	for {
  9221  		off := auxIntToInt32(v.AuxInt)
  9222  		sym := auxToSym(v.Aux)
  9223  		ptr := v_0
  9224  		if v_1.Op != OpS390XMOVDconst {
  9225  			break
  9226  		}
  9227  		c := auxIntToInt64(v_1.AuxInt)
  9228  		mem := v_2
  9229  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
  9230  			break
  9231  		}
  9232  		v.reset(OpS390XMOVDstoreconst)
  9233  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  9234  		v.Aux = symToAux(sym)
  9235  		v.AddArg2(ptr, mem)
  9236  		return true
  9237  	}
  9238  	// match: (MOVDstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9239  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9240  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  9241  	for {
  9242  		off1 := auxIntToInt32(v.AuxInt)
  9243  		sym1 := auxToSym(v.Aux)
  9244  		if v_0.Op != OpS390XMOVDaddr {
  9245  			break
  9246  		}
  9247  		t := v_0.Type
  9248  		off2 := auxIntToInt32(v_0.AuxInt)
  9249  		sym2 := auxToSym(v_0.Aux)
  9250  		base := v_0.Args[0]
  9251  		val := v_1
  9252  		mem := v_2
  9253  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9254  			break
  9255  		}
  9256  		v.reset(OpS390XMOVDstore)
  9257  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9258  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9259  		v.AddArg3(base, val, mem)
  9260  		return true
  9261  	}
  9262  	// match: (MOVDstore [i] {s} p w1 x:(MOVDstore [i-8] {s} p w0 mem))
  9263  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)
  9264  	// result: (STMG2 [i-8] {s} p w0 w1 mem)
  9265  	for {
  9266  		i := auxIntToInt32(v.AuxInt)
  9267  		s := auxToSym(v.Aux)
  9268  		p := v_0
  9269  		w1 := v_1
  9270  		x := v_2
  9271  		if x.Op != OpS390XMOVDstore || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
  9272  			break
  9273  		}
  9274  		mem := x.Args[2]
  9275  		if p != x.Args[0] {
  9276  			break
  9277  		}
  9278  		w0 := x.Args[1]
  9279  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)) {
  9280  			break
  9281  		}
  9282  		v.reset(OpS390XSTMG2)
  9283  		v.AuxInt = int32ToAuxInt(i - 8)
  9284  		v.Aux = symToAux(s)
  9285  		v.AddArg4(p, w0, w1, mem)
  9286  		return true
  9287  	}
  9288  	// match: (MOVDstore [i] {s} p w2 x:(STMG2 [i-16] {s} p w0 w1 mem))
  9289  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && clobber(x)
  9290  	// result: (STMG3 [i-16] {s} p w0 w1 w2 mem)
  9291  	for {
  9292  		i := auxIntToInt32(v.AuxInt)
  9293  		s := auxToSym(v.Aux)
  9294  		p := v_0
  9295  		w2 := v_1
  9296  		x := v_2
  9297  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
  9298  			break
  9299  		}
  9300  		mem := x.Args[3]
  9301  		if p != x.Args[0] {
  9302  			break
  9303  		}
  9304  		w0 := x.Args[1]
  9305  		w1 := x.Args[2]
  9306  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && clobber(x)) {
  9307  			break
  9308  		}
  9309  		v.reset(OpS390XSTMG3)
  9310  		v.AuxInt = int32ToAuxInt(i - 16)
  9311  		v.Aux = symToAux(s)
  9312  		v.AddArg5(p, w0, w1, w2, mem)
  9313  		return true
  9314  	}
  9315  	// match: (MOVDstore [i] {s} p w3 x:(STMG3 [i-24] {s} p w0 w1 w2 mem))
  9316  	// cond: x.Uses == 1 && is20Bit(int64(i)-24) && clobber(x)
  9317  	// result: (STMG4 [i-24] {s} p w0 w1 w2 w3 mem)
  9318  	for {
  9319  		i := auxIntToInt32(v.AuxInt)
  9320  		s := auxToSym(v.Aux)
  9321  		p := v_0
  9322  		w3 := v_1
  9323  		x := v_2
  9324  		if x.Op != OpS390XSTMG3 || auxIntToInt32(x.AuxInt) != i-24 || auxToSym(x.Aux) != s {
  9325  			break
  9326  		}
  9327  		mem := x.Args[4]
  9328  		if p != x.Args[0] {
  9329  			break
  9330  		}
  9331  		w0 := x.Args[1]
  9332  		w1 := x.Args[2]
  9333  		w2 := x.Args[3]
  9334  		if !(x.Uses == 1 && is20Bit(int64(i)-24) && clobber(x)) {
  9335  			break
  9336  		}
  9337  		v.reset(OpS390XSTMG4)
  9338  		v.AuxInt = int32ToAuxInt(i - 24)
  9339  		v.Aux = symToAux(s)
  9340  		v.AddArg6(p, w0, w1, w2, w3, mem)
  9341  		return true
  9342  	}
  9343  	return false
  9344  }
  9345  func rewriteValueS390X_OpS390XMOVDstoreconst(v *Value) bool {
  9346  	v_1 := v.Args[1]
  9347  	v_0 := v.Args[0]
  9348  	// match: (MOVDstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  9349  	// cond: isU12Bit(sc.Off64()+int64(off))
  9350  	// result: (MOVDstoreconst [sc.addOffset32(off)] {s} ptr mem)
  9351  	for {
  9352  		sc := auxIntToValAndOff(v.AuxInt)
  9353  		s := auxToSym(v.Aux)
  9354  		if v_0.Op != OpS390XADDconst {
  9355  			break
  9356  		}
  9357  		off := auxIntToInt32(v_0.AuxInt)
  9358  		ptr := v_0.Args[0]
  9359  		mem := v_1
  9360  		if !(isU12Bit(sc.Off64() + int64(off))) {
  9361  			break
  9362  		}
  9363  		v.reset(OpS390XMOVDstoreconst)
  9364  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9365  		v.Aux = symToAux(s)
  9366  		v.AddArg2(ptr, mem)
  9367  		return true
  9368  	}
  9369  	// match: (MOVDstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  9370  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  9371  	// result: (MOVDstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  9372  	for {
  9373  		sc := auxIntToValAndOff(v.AuxInt)
  9374  		sym1 := auxToSym(v.Aux)
  9375  		if v_0.Op != OpS390XMOVDaddr {
  9376  			break
  9377  		}
  9378  		off := auxIntToInt32(v_0.AuxInt)
  9379  		sym2 := auxToSym(v_0.Aux)
  9380  		ptr := v_0.Args[0]
  9381  		mem := v_1
  9382  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  9383  			break
  9384  		}
  9385  		v.reset(OpS390XMOVDstoreconst)
  9386  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9387  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9388  		v.AddArg2(ptr, mem)
  9389  		return true
  9390  	}
  9391  	return false
  9392  }
  9393  func rewriteValueS390X_OpS390XMOVHBRstore(v *Value) bool {
  9394  	v_2 := v.Args[2]
  9395  	v_1 := v.Args[1]
  9396  	v_0 := v.Args[0]
  9397  	// match: (MOVHBRstore [i] {s} p (SRDconst [16] w) x:(MOVHBRstore [i-2] {s} p w mem))
  9398  	// cond: x.Uses == 1 && clobber(x)
  9399  	// result: (MOVWBRstore [i-2] {s} p w mem)
  9400  	for {
  9401  		i := auxIntToInt32(v.AuxInt)
  9402  		s := auxToSym(v.Aux)
  9403  		p := v_0
  9404  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 16 {
  9405  			break
  9406  		}
  9407  		w := v_1.Args[0]
  9408  		x := v_2
  9409  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9410  			break
  9411  		}
  9412  		mem := x.Args[2]
  9413  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  9414  			break
  9415  		}
  9416  		v.reset(OpS390XMOVWBRstore)
  9417  		v.AuxInt = int32ToAuxInt(i - 2)
  9418  		v.Aux = symToAux(s)
  9419  		v.AddArg3(p, w, mem)
  9420  		return true
  9421  	}
  9422  	// match: (MOVHBRstore [i] {s} p (SRDconst [j] w) x:(MOVHBRstore [i-2] {s} p w0:(SRDconst [j-16] w) mem))
  9423  	// cond: x.Uses == 1 && clobber(x)
  9424  	// result: (MOVWBRstore [i-2] {s} p w0 mem)
  9425  	for {
  9426  		i := auxIntToInt32(v.AuxInt)
  9427  		s := auxToSym(v.Aux)
  9428  		p := v_0
  9429  		if v_1.Op != OpS390XSRDconst {
  9430  			break
  9431  		}
  9432  		j := auxIntToUint8(v_1.AuxInt)
  9433  		w := v_1.Args[0]
  9434  		x := v_2
  9435  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9436  			break
  9437  		}
  9438  		mem := x.Args[2]
  9439  		if p != x.Args[0] {
  9440  			break
  9441  		}
  9442  		w0 := x.Args[1]
  9443  		if w0.Op != OpS390XSRDconst || auxIntToUint8(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  9444  			break
  9445  		}
  9446  		v.reset(OpS390XMOVWBRstore)
  9447  		v.AuxInt = int32ToAuxInt(i - 2)
  9448  		v.Aux = symToAux(s)
  9449  		v.AddArg3(p, w0, mem)
  9450  		return true
  9451  	}
  9452  	// match: (MOVHBRstore [i] {s} p (SRWconst [16] w) x:(MOVHBRstore [i-2] {s} p w mem))
  9453  	// cond: x.Uses == 1 && clobber(x)
  9454  	// result: (MOVWBRstore [i-2] {s} p w mem)
  9455  	for {
  9456  		i := auxIntToInt32(v.AuxInt)
  9457  		s := auxToSym(v.Aux)
  9458  		p := v_0
  9459  		if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 16 {
  9460  			break
  9461  		}
  9462  		w := v_1.Args[0]
  9463  		x := v_2
  9464  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9465  			break
  9466  		}
  9467  		mem := x.Args[2]
  9468  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  9469  			break
  9470  		}
  9471  		v.reset(OpS390XMOVWBRstore)
  9472  		v.AuxInt = int32ToAuxInt(i - 2)
  9473  		v.Aux = symToAux(s)
  9474  		v.AddArg3(p, w, mem)
  9475  		return true
  9476  	}
  9477  	// match: (MOVHBRstore [i] {s} p (SRWconst [j] w) x:(MOVHBRstore [i-2] {s} p w0:(SRWconst [j-16] w) mem))
  9478  	// cond: x.Uses == 1 && clobber(x)
  9479  	// result: (MOVWBRstore [i-2] {s} p w0 mem)
  9480  	for {
  9481  		i := auxIntToInt32(v.AuxInt)
  9482  		s := auxToSym(v.Aux)
  9483  		p := v_0
  9484  		if v_1.Op != OpS390XSRWconst {
  9485  			break
  9486  		}
  9487  		j := auxIntToUint8(v_1.AuxInt)
  9488  		w := v_1.Args[0]
  9489  		x := v_2
  9490  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9491  			break
  9492  		}
  9493  		mem := x.Args[2]
  9494  		if p != x.Args[0] {
  9495  			break
  9496  		}
  9497  		w0 := x.Args[1]
  9498  		if w0.Op != OpS390XSRWconst || auxIntToUint8(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  9499  			break
  9500  		}
  9501  		v.reset(OpS390XMOVWBRstore)
  9502  		v.AuxInt = int32ToAuxInt(i - 2)
  9503  		v.Aux = symToAux(s)
  9504  		v.AddArg3(p, w0, mem)
  9505  		return true
  9506  	}
  9507  	return false
  9508  }
  9509  func rewriteValueS390X_OpS390XMOVHZload(v *Value) bool {
  9510  	v_1 := v.Args[1]
  9511  	v_0 := v.Args[0]
  9512  	// match: (MOVHZload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9513  	// cond: isSamePtr(ptr1, ptr2)
  9514  	// result: (MOVHZreg x)
  9515  	for {
  9516  		off := auxIntToInt32(v.AuxInt)
  9517  		sym := auxToSym(v.Aux)
  9518  		ptr1 := v_0
  9519  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9520  			break
  9521  		}
  9522  		x := v_1.Args[1]
  9523  		ptr2 := v_1.Args[0]
  9524  		if !(isSamePtr(ptr1, ptr2)) {
  9525  			break
  9526  		}
  9527  		v.reset(OpS390XMOVHZreg)
  9528  		v.AddArg(x)
  9529  		return true
  9530  	}
  9531  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] ptr) mem)
  9532  	// cond: is20Bit(int64(off1)+int64(off2))
  9533  	// result: (MOVHZload [off1+off2] {sym} ptr mem)
  9534  	for {
  9535  		off1 := auxIntToInt32(v.AuxInt)
  9536  		sym := auxToSym(v.Aux)
  9537  		if v_0.Op != OpS390XADDconst {
  9538  			break
  9539  		}
  9540  		off2 := auxIntToInt32(v_0.AuxInt)
  9541  		ptr := v_0.Args[0]
  9542  		mem := v_1
  9543  		if !(is20Bit(int64(off1) + int64(off2))) {
  9544  			break
  9545  		}
  9546  		v.reset(OpS390XMOVHZload)
  9547  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9548  		v.Aux = symToAux(sym)
  9549  		v.AddArg2(ptr, mem)
  9550  		return true
  9551  	}
  9552  	// match: (MOVHZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9553  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9554  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9555  	for {
  9556  		off1 := auxIntToInt32(v.AuxInt)
  9557  		sym1 := auxToSym(v.Aux)
  9558  		if v_0.Op != OpS390XMOVDaddr {
  9559  			break
  9560  		}
  9561  		t := v_0.Type
  9562  		off2 := auxIntToInt32(v_0.AuxInt)
  9563  		sym2 := auxToSym(v_0.Aux)
  9564  		base := v_0.Args[0]
  9565  		mem := v_1
  9566  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9567  			break
  9568  		}
  9569  		v.reset(OpS390XMOVHZload)
  9570  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9571  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9572  		v.AddArg2(base, mem)
  9573  		return true
  9574  	}
  9575  	return false
  9576  }
  9577  func rewriteValueS390X_OpS390XMOVHZreg(v *Value) bool {
  9578  	v_0 := v.Args[0]
  9579  	b := v.Block
  9580  	typ := &b.Func.Config.Types
  9581  	// match: (MOVHZreg e:(MOVBZreg x))
  9582  	// cond: clobberIfDead(e)
  9583  	// result: (MOVBZreg x)
  9584  	for {
  9585  		e := v_0
  9586  		if e.Op != OpS390XMOVBZreg {
  9587  			break
  9588  		}
  9589  		x := e.Args[0]
  9590  		if !(clobberIfDead(e)) {
  9591  			break
  9592  		}
  9593  		v.reset(OpS390XMOVBZreg)
  9594  		v.AddArg(x)
  9595  		return true
  9596  	}
  9597  	// match: (MOVHZreg e:(MOVHreg x))
  9598  	// cond: clobberIfDead(e)
  9599  	// result: (MOVHZreg x)
  9600  	for {
  9601  		e := v_0
  9602  		if e.Op != OpS390XMOVHreg {
  9603  			break
  9604  		}
  9605  		x := e.Args[0]
  9606  		if !(clobberIfDead(e)) {
  9607  			break
  9608  		}
  9609  		v.reset(OpS390XMOVHZreg)
  9610  		v.AddArg(x)
  9611  		return true
  9612  	}
  9613  	// match: (MOVHZreg e:(MOVWreg x))
  9614  	// cond: clobberIfDead(e)
  9615  	// result: (MOVHZreg x)
  9616  	for {
  9617  		e := v_0
  9618  		if e.Op != OpS390XMOVWreg {
  9619  			break
  9620  		}
  9621  		x := e.Args[0]
  9622  		if !(clobberIfDead(e)) {
  9623  			break
  9624  		}
  9625  		v.reset(OpS390XMOVHZreg)
  9626  		v.AddArg(x)
  9627  		return true
  9628  	}
  9629  	// match: (MOVHZreg e:(MOVHZreg x))
  9630  	// cond: clobberIfDead(e)
  9631  	// result: (MOVHZreg x)
  9632  	for {
  9633  		e := v_0
  9634  		if e.Op != OpS390XMOVHZreg {
  9635  			break
  9636  		}
  9637  		x := e.Args[0]
  9638  		if !(clobberIfDead(e)) {
  9639  			break
  9640  		}
  9641  		v.reset(OpS390XMOVHZreg)
  9642  		v.AddArg(x)
  9643  		return true
  9644  	}
  9645  	// match: (MOVHZreg e:(MOVWZreg x))
  9646  	// cond: clobberIfDead(e)
  9647  	// result: (MOVHZreg x)
  9648  	for {
  9649  		e := v_0
  9650  		if e.Op != OpS390XMOVWZreg {
  9651  			break
  9652  		}
  9653  		x := e.Args[0]
  9654  		if !(clobberIfDead(e)) {
  9655  			break
  9656  		}
  9657  		v.reset(OpS390XMOVHZreg)
  9658  		v.AddArg(x)
  9659  		return true
  9660  	}
  9661  	// match: (MOVHZreg x:(MOVBZload _ _))
  9662  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9663  	// result: x
  9664  	for {
  9665  		x := v_0
  9666  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9667  			break
  9668  		}
  9669  		v.copyOf(x)
  9670  		return true
  9671  	}
  9672  	// match: (MOVHZreg x:(MOVHZload _ _))
  9673  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
  9674  	// result: x
  9675  	for {
  9676  		x := v_0
  9677  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
  9678  			break
  9679  		}
  9680  		v.copyOf(x)
  9681  		return true
  9682  	}
  9683  	// match: (MOVHZreg <t> x:(MOVHload [o] {s} p mem))
  9684  	// cond: x.Uses == 1 && clobber(x)
  9685  	// result: @x.Block (MOVHZload <t> [o] {s} p mem)
  9686  	for {
  9687  		t := v.Type
  9688  		x := v_0
  9689  		if x.Op != OpS390XMOVHload {
  9690  			break
  9691  		}
  9692  		o := auxIntToInt32(x.AuxInt)
  9693  		s := auxToSym(x.Aux)
  9694  		mem := x.Args[1]
  9695  		p := x.Args[0]
  9696  		if !(x.Uses == 1 && clobber(x)) {
  9697  			break
  9698  		}
  9699  		b = x.Block
  9700  		v0 := b.NewValue0(x.Pos, OpS390XMOVHZload, t)
  9701  		v.copyOf(v0)
  9702  		v0.AuxInt = int32ToAuxInt(o)
  9703  		v0.Aux = symToAux(s)
  9704  		v0.AddArg2(p, mem)
  9705  		return true
  9706  	}
  9707  	// match: (MOVHZreg x:(Arg <t>))
  9708  	// cond: !t.IsSigned() && t.Size() <= 2
  9709  	// result: x
  9710  	for {
  9711  		x := v_0
  9712  		if x.Op != OpArg {
  9713  			break
  9714  		}
  9715  		t := x.Type
  9716  		if !(!t.IsSigned() && t.Size() <= 2) {
  9717  			break
  9718  		}
  9719  		v.copyOf(x)
  9720  		return true
  9721  	}
  9722  	// match: (MOVHZreg (MOVDconst [c]))
  9723  	// result: (MOVDconst [int64(uint16(c))])
  9724  	for {
  9725  		if v_0.Op != OpS390XMOVDconst {
  9726  			break
  9727  		}
  9728  		c := auxIntToInt64(v_0.AuxInt)
  9729  		v.reset(OpS390XMOVDconst)
  9730  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9731  		return true
  9732  	}
  9733  	// match: (MOVHZreg (RISBGZ x {r}))
  9734  	// cond: r.OutMerge(0x0000ffff) != nil
  9735  	// result: (RISBGZ x {*r.OutMerge(0x0000ffff)})
  9736  	for {
  9737  		if v_0.Op != OpS390XRISBGZ {
  9738  			break
  9739  		}
  9740  		r := auxToS390xRotateParams(v_0.Aux)
  9741  		x := v_0.Args[0]
  9742  		if !(r.OutMerge(0x0000ffff) != nil) {
  9743  			break
  9744  		}
  9745  		v.reset(OpS390XRISBGZ)
  9746  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x0000ffff))
  9747  		v.AddArg(x)
  9748  		return true
  9749  	}
  9750  	// match: (MOVHZreg (ANDWconst [m] x))
  9751  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9752  	for {
  9753  		if v_0.Op != OpS390XANDWconst {
  9754  			break
  9755  		}
  9756  		m := auxIntToInt32(v_0.AuxInt)
  9757  		x := v_0.Args[0]
  9758  		v.reset(OpS390XMOVWZreg)
  9759  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9760  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9761  		v0.AddArg(x)
  9762  		v.AddArg(v0)
  9763  		return true
  9764  	}
  9765  	return false
  9766  }
  9767  func rewriteValueS390X_OpS390XMOVHload(v *Value) bool {
  9768  	v_1 := v.Args[1]
  9769  	v_0 := v.Args[0]
  9770  	// match: (MOVHload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9771  	// cond: isSamePtr(ptr1, ptr2)
  9772  	// result: (MOVHreg x)
  9773  	for {
  9774  		off := auxIntToInt32(v.AuxInt)
  9775  		sym := auxToSym(v.Aux)
  9776  		ptr1 := v_0
  9777  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9778  			break
  9779  		}
  9780  		x := v_1.Args[1]
  9781  		ptr2 := v_1.Args[0]
  9782  		if !(isSamePtr(ptr1, ptr2)) {
  9783  			break
  9784  		}
  9785  		v.reset(OpS390XMOVHreg)
  9786  		v.AddArg(x)
  9787  		return true
  9788  	}
  9789  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9790  	// cond: is20Bit(int64(off1)+int64(off2))
  9791  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  9792  	for {
  9793  		off1 := auxIntToInt32(v.AuxInt)
  9794  		sym := auxToSym(v.Aux)
  9795  		if v_0.Op != OpS390XADDconst {
  9796  			break
  9797  		}
  9798  		off2 := auxIntToInt32(v_0.AuxInt)
  9799  		ptr := v_0.Args[0]
  9800  		mem := v_1
  9801  		if !(is20Bit(int64(off1) + int64(off2))) {
  9802  			break
  9803  		}
  9804  		v.reset(OpS390XMOVHload)
  9805  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9806  		v.Aux = symToAux(sym)
  9807  		v.AddArg2(ptr, mem)
  9808  		return true
  9809  	}
  9810  	// match: (MOVHload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9811  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9812  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9813  	for {
  9814  		off1 := auxIntToInt32(v.AuxInt)
  9815  		sym1 := auxToSym(v.Aux)
  9816  		if v_0.Op != OpS390XMOVDaddr {
  9817  			break
  9818  		}
  9819  		t := v_0.Type
  9820  		off2 := auxIntToInt32(v_0.AuxInt)
  9821  		sym2 := auxToSym(v_0.Aux)
  9822  		base := v_0.Args[0]
  9823  		mem := v_1
  9824  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9825  			break
  9826  		}
  9827  		v.reset(OpS390XMOVHload)
  9828  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9829  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9830  		v.AddArg2(base, mem)
  9831  		return true
  9832  	}
  9833  	return false
  9834  }
  9835  func rewriteValueS390X_OpS390XMOVHreg(v *Value) bool {
  9836  	v_0 := v.Args[0]
  9837  	b := v.Block
  9838  	typ := &b.Func.Config.Types
  9839  	// match: (MOVHreg e:(MOVBreg x))
  9840  	// cond: clobberIfDead(e)
  9841  	// result: (MOVBreg x)
  9842  	for {
  9843  		e := v_0
  9844  		if e.Op != OpS390XMOVBreg {
  9845  			break
  9846  		}
  9847  		x := e.Args[0]
  9848  		if !(clobberIfDead(e)) {
  9849  			break
  9850  		}
  9851  		v.reset(OpS390XMOVBreg)
  9852  		v.AddArg(x)
  9853  		return true
  9854  	}
  9855  	// match: (MOVHreg e:(MOVHreg x))
  9856  	// cond: clobberIfDead(e)
  9857  	// result: (MOVHreg x)
  9858  	for {
  9859  		e := v_0
  9860  		if e.Op != OpS390XMOVHreg {
  9861  			break
  9862  		}
  9863  		x := e.Args[0]
  9864  		if !(clobberIfDead(e)) {
  9865  			break
  9866  		}
  9867  		v.reset(OpS390XMOVHreg)
  9868  		v.AddArg(x)
  9869  		return true
  9870  	}
  9871  	// match: (MOVHreg e:(MOVWreg x))
  9872  	// cond: clobberIfDead(e)
  9873  	// result: (MOVHreg x)
  9874  	for {
  9875  		e := v_0
  9876  		if e.Op != OpS390XMOVWreg {
  9877  			break
  9878  		}
  9879  		x := e.Args[0]
  9880  		if !(clobberIfDead(e)) {
  9881  			break
  9882  		}
  9883  		v.reset(OpS390XMOVHreg)
  9884  		v.AddArg(x)
  9885  		return true
  9886  	}
  9887  	// match: (MOVHreg e:(MOVHZreg x))
  9888  	// cond: clobberIfDead(e)
  9889  	// result: (MOVHreg x)
  9890  	for {
  9891  		e := v_0
  9892  		if e.Op != OpS390XMOVHZreg {
  9893  			break
  9894  		}
  9895  		x := e.Args[0]
  9896  		if !(clobberIfDead(e)) {
  9897  			break
  9898  		}
  9899  		v.reset(OpS390XMOVHreg)
  9900  		v.AddArg(x)
  9901  		return true
  9902  	}
  9903  	// match: (MOVHreg e:(MOVWZreg x))
  9904  	// cond: clobberIfDead(e)
  9905  	// result: (MOVHreg x)
  9906  	for {
  9907  		e := v_0
  9908  		if e.Op != OpS390XMOVWZreg {
  9909  			break
  9910  		}
  9911  		x := e.Args[0]
  9912  		if !(clobberIfDead(e)) {
  9913  			break
  9914  		}
  9915  		v.reset(OpS390XMOVHreg)
  9916  		v.AddArg(x)
  9917  		return true
  9918  	}
  9919  	// match: (MOVHreg x:(MOVBload _ _))
  9920  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9921  	// result: x
  9922  	for {
  9923  		x := v_0
  9924  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9925  			break
  9926  		}
  9927  		v.copyOf(x)
  9928  		return true
  9929  	}
  9930  	// match: (MOVHreg x:(MOVHload _ _))
  9931  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9932  	// result: x
  9933  	for {
  9934  		x := v_0
  9935  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9936  			break
  9937  		}
  9938  		v.copyOf(x)
  9939  		return true
  9940  	}
  9941  	// match: (MOVHreg x:(MOVBZload _ _))
  9942  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9943  	// result: x
  9944  	for {
  9945  		x := v_0
  9946  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9947  			break
  9948  		}
  9949  		v.copyOf(x)
  9950  		return true
  9951  	}
  9952  	// match: (MOVHreg <t> x:(MOVHZload [o] {s} p mem))
  9953  	// cond: x.Uses == 1 && clobber(x)
  9954  	// result: @x.Block (MOVHload <t> [o] {s} p mem)
  9955  	for {
  9956  		t := v.Type
  9957  		x := v_0
  9958  		if x.Op != OpS390XMOVHZload {
  9959  			break
  9960  		}
  9961  		o := auxIntToInt32(x.AuxInt)
  9962  		s := auxToSym(x.Aux)
  9963  		mem := x.Args[1]
  9964  		p := x.Args[0]
  9965  		if !(x.Uses == 1 && clobber(x)) {
  9966  			break
  9967  		}
  9968  		b = x.Block
  9969  		v0 := b.NewValue0(x.Pos, OpS390XMOVHload, t)
  9970  		v.copyOf(v0)
  9971  		v0.AuxInt = int32ToAuxInt(o)
  9972  		v0.Aux = symToAux(s)
  9973  		v0.AddArg2(p, mem)
  9974  		return true
  9975  	}
  9976  	// match: (MOVHreg x:(Arg <t>))
  9977  	// cond: t.IsSigned() && t.Size() <= 2
  9978  	// result: x
  9979  	for {
  9980  		x := v_0
  9981  		if x.Op != OpArg {
  9982  			break
  9983  		}
  9984  		t := x.Type
  9985  		if !(t.IsSigned() && t.Size() <= 2) {
  9986  			break
  9987  		}
  9988  		v.copyOf(x)
  9989  		return true
  9990  	}
  9991  	// match: (MOVHreg (MOVDconst [c]))
  9992  	// result: (MOVDconst [int64(int16(c))])
  9993  	for {
  9994  		if v_0.Op != OpS390XMOVDconst {
  9995  			break
  9996  		}
  9997  		c := auxIntToInt64(v_0.AuxInt)
  9998  		v.reset(OpS390XMOVDconst)
  9999  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
 10000  		return true
 10001  	}
 10002  	// match: (MOVHreg (ANDWconst [m] x))
 10003  	// cond: int16(m) >= 0
 10004  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
 10005  	for {
 10006  		if v_0.Op != OpS390XANDWconst {
 10007  			break
 10008  		}
 10009  		m := auxIntToInt32(v_0.AuxInt)
 10010  		x := v_0.Args[0]
 10011  		if !(int16(m) >= 0) {
 10012  			break
 10013  		}
 10014  		v.reset(OpS390XMOVWZreg)
 10015  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 10016  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
 10017  		v0.AddArg(x)
 10018  		v.AddArg(v0)
 10019  		return true
 10020  	}
 10021  	return false
 10022  }
 10023  func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
 10024  	v_2 := v.Args[2]
 10025  	v_1 := v.Args[1]
 10026  	v_0 := v.Args[0]
 10027  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
 10028  	// result: (MOVHstore [off] {sym} ptr x mem)
 10029  	for {
 10030  		off := auxIntToInt32(v.AuxInt)
 10031  		sym := auxToSym(v.Aux)
 10032  		ptr := v_0
 10033  		if v_1.Op != OpS390XMOVHreg {
 10034  			break
 10035  		}
 10036  		x := v_1.Args[0]
 10037  		mem := v_2
 10038  		v.reset(OpS390XMOVHstore)
 10039  		v.AuxInt = int32ToAuxInt(off)
 10040  		v.Aux = symToAux(sym)
 10041  		v.AddArg3(ptr, x, mem)
 10042  		return true
 10043  	}
 10044  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
 10045  	// result: (MOVHstore [off] {sym} ptr x mem)
 10046  	for {
 10047  		off := auxIntToInt32(v.AuxInt)
 10048  		sym := auxToSym(v.Aux)
 10049  		ptr := v_0
 10050  		if v_1.Op != OpS390XMOVHZreg {
 10051  			break
 10052  		}
 10053  		x := v_1.Args[0]
 10054  		mem := v_2
 10055  		v.reset(OpS390XMOVHstore)
 10056  		v.AuxInt = int32ToAuxInt(off)
 10057  		v.Aux = symToAux(sym)
 10058  		v.AddArg3(ptr, x, mem)
 10059  		return true
 10060  	}
 10061  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10062  	// cond: is20Bit(int64(off1)+int64(off2))
 10063  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
 10064  	for {
 10065  		off1 := auxIntToInt32(v.AuxInt)
 10066  		sym := auxToSym(v.Aux)
 10067  		if v_0.Op != OpS390XADDconst {
 10068  			break
 10069  		}
 10070  		off2 := auxIntToInt32(v_0.AuxInt)
 10071  		ptr := v_0.Args[0]
 10072  		val := v_1
 10073  		mem := v_2
 10074  		if !(is20Bit(int64(off1) + int64(off2))) {
 10075  			break
 10076  		}
 10077  		v.reset(OpS390XMOVHstore)
 10078  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10079  		v.Aux = symToAux(sym)
 10080  		v.AddArg3(ptr, val, mem)
 10081  		return true
 10082  	}
 10083  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [c]) mem)
 10084  	// cond: isU12Bit(int64(off)) && ptr.Op != OpSB
 10085  	// result: (MOVHstoreconst [makeValAndOff(int32(int16(c)),off)] {sym} ptr mem)
 10086  	for {
 10087  		off := auxIntToInt32(v.AuxInt)
 10088  		sym := auxToSym(v.Aux)
 10089  		ptr := v_0
 10090  		if v_1.Op != OpS390XMOVDconst {
 10091  			break
 10092  		}
 10093  		c := auxIntToInt64(v_1.AuxInt)
 10094  		mem := v_2
 10095  		if !(isU12Bit(int64(off)) && ptr.Op != OpSB) {
 10096  			break
 10097  		}
 10098  		v.reset(OpS390XMOVHstoreconst)
 10099  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int16(c)), off))
 10100  		v.Aux = symToAux(sym)
 10101  		v.AddArg2(ptr, mem)
 10102  		return true
 10103  	}
 10104  	// match: (MOVHstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10105  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
 10106  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
 10107  	for {
 10108  		off1 := auxIntToInt32(v.AuxInt)
 10109  		sym1 := auxToSym(v.Aux)
 10110  		if v_0.Op != OpS390XMOVDaddr {
 10111  			break
 10112  		}
 10113  		t := v_0.Type
 10114  		off2 := auxIntToInt32(v_0.AuxInt)
 10115  		sym2 := auxToSym(v_0.Aux)
 10116  		base := v_0.Args[0]
 10117  		val := v_1
 10118  		mem := v_2
 10119  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
 10120  			break
 10121  		}
 10122  		v.reset(OpS390XMOVHstore)
 10123  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10124  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10125  		v.AddArg3(base, val, mem)
 10126  		return true
 10127  	}
 10128  	// match: (MOVHstore [i] {s} p w x:(MOVHstore [i-2] {s} p (SRDconst [16] w) mem))
 10129  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10130  	// result: (MOVWstore [i-2] {s} p w mem)
 10131  	for {
 10132  		i := auxIntToInt32(v.AuxInt)
 10133  		s := auxToSym(v.Aux)
 10134  		p := v_0
 10135  		w := v_1
 10136  		x := v_2
 10137  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10138  			break
 10139  		}
 10140  		mem := x.Args[2]
 10141  		if p != x.Args[0] {
 10142  			break
 10143  		}
 10144  		x_1 := x.Args[1]
 10145  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != 16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10146  			break
 10147  		}
 10148  		v.reset(OpS390XMOVWstore)
 10149  		v.AuxInt = int32ToAuxInt(i - 2)
 10150  		v.Aux = symToAux(s)
 10151  		v.AddArg3(p, w, mem)
 10152  		return true
 10153  	}
 10154  	// match: (MOVHstore [i] {s} p w0:(SRDconst [j] w) x:(MOVHstore [i-2] {s} p (SRDconst [j+16] w) mem))
 10155  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10156  	// result: (MOVWstore [i-2] {s} p w0 mem)
 10157  	for {
 10158  		i := auxIntToInt32(v.AuxInt)
 10159  		s := auxToSym(v.Aux)
 10160  		p := v_0
 10161  		w0 := v_1
 10162  		if w0.Op != OpS390XSRDconst {
 10163  			break
 10164  		}
 10165  		j := auxIntToUint8(w0.AuxInt)
 10166  		w := w0.Args[0]
 10167  		x := v_2
 10168  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10169  			break
 10170  		}
 10171  		mem := x.Args[2]
 10172  		if p != x.Args[0] {
 10173  			break
 10174  		}
 10175  		x_1 := x.Args[1]
 10176  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != j+16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10177  			break
 10178  		}
 10179  		v.reset(OpS390XMOVWstore)
 10180  		v.AuxInt = int32ToAuxInt(i - 2)
 10181  		v.Aux = symToAux(s)
 10182  		v.AddArg3(p, w0, mem)
 10183  		return true
 10184  	}
 10185  	// match: (MOVHstore [i] {s} p w x:(MOVHstore [i-2] {s} p (SRWconst [16] w) mem))
 10186  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10187  	// result: (MOVWstore [i-2] {s} p w mem)
 10188  	for {
 10189  		i := auxIntToInt32(v.AuxInt)
 10190  		s := auxToSym(v.Aux)
 10191  		p := v_0
 10192  		w := v_1
 10193  		x := v_2
 10194  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10195  			break
 10196  		}
 10197  		mem := x.Args[2]
 10198  		if p != x.Args[0] {
 10199  			break
 10200  		}
 10201  		x_1 := x.Args[1]
 10202  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != 16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10203  			break
 10204  		}
 10205  		v.reset(OpS390XMOVWstore)
 10206  		v.AuxInt = int32ToAuxInt(i - 2)
 10207  		v.Aux = symToAux(s)
 10208  		v.AddArg3(p, w, mem)
 10209  		return true
 10210  	}
 10211  	// match: (MOVHstore [i] {s} p w0:(SRWconst [j] w) x:(MOVHstore [i-2] {s} p (SRWconst [j+16] w) mem))
 10212  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10213  	// result: (MOVWstore [i-2] {s} p w0 mem)
 10214  	for {
 10215  		i := auxIntToInt32(v.AuxInt)
 10216  		s := auxToSym(v.Aux)
 10217  		p := v_0
 10218  		w0 := v_1
 10219  		if w0.Op != OpS390XSRWconst {
 10220  			break
 10221  		}
 10222  		j := auxIntToUint8(w0.AuxInt)
 10223  		w := w0.Args[0]
 10224  		x := v_2
 10225  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10226  			break
 10227  		}
 10228  		mem := x.Args[2]
 10229  		if p != x.Args[0] {
 10230  			break
 10231  		}
 10232  		x_1 := x.Args[1]
 10233  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != j+16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10234  			break
 10235  		}
 10236  		v.reset(OpS390XMOVWstore)
 10237  		v.AuxInt = int32ToAuxInt(i - 2)
 10238  		v.Aux = symToAux(s)
 10239  		v.AddArg3(p, w0, mem)
 10240  		return true
 10241  	}
 10242  	return false
 10243  }
 10244  func rewriteValueS390X_OpS390XMOVHstoreconst(v *Value) bool {
 10245  	v_1 := v.Args[1]
 10246  	v_0 := v.Args[0]
 10247  	b := v.Block
 10248  	typ := &b.Func.Config.Types
 10249  	// match: (MOVHstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10250  	// cond: isU12Bit(sc.Off64()+int64(off))
 10251  	// result: (MOVHstoreconst [sc.addOffset32(off)] {s} ptr mem)
 10252  	for {
 10253  		sc := auxIntToValAndOff(v.AuxInt)
 10254  		s := auxToSym(v.Aux)
 10255  		if v_0.Op != OpS390XADDconst {
 10256  			break
 10257  		}
 10258  		off := auxIntToInt32(v_0.AuxInt)
 10259  		ptr := v_0.Args[0]
 10260  		mem := v_1
 10261  		if !(isU12Bit(sc.Off64() + int64(off))) {
 10262  			break
 10263  		}
 10264  		v.reset(OpS390XMOVHstoreconst)
 10265  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10266  		v.Aux = symToAux(s)
 10267  		v.AddArg2(ptr, mem)
 10268  		return true
 10269  	}
 10270  	// match: (MOVHstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10271  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 10272  	// result: (MOVHstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 10273  	for {
 10274  		sc := auxIntToValAndOff(v.AuxInt)
 10275  		sym1 := auxToSym(v.Aux)
 10276  		if v_0.Op != OpS390XMOVDaddr {
 10277  			break
 10278  		}
 10279  		off := auxIntToInt32(v_0.AuxInt)
 10280  		sym2 := auxToSym(v_0.Aux)
 10281  		ptr := v_0.Args[0]
 10282  		mem := v_1
 10283  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 10284  			break
 10285  		}
 10286  		v.reset(OpS390XMOVHstoreconst)
 10287  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10288  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10289  		v.AddArg2(ptr, mem)
 10290  		return true
 10291  	}
 10292  	// match: (MOVHstoreconst [c] {s} p x:(MOVHstoreconst [a] {s} p mem))
 10293  	// cond: p.Op != OpSB && x.Uses == 1 && a.Off() + 2 == c.Off() && clobber(x)
 10294  	// result: (MOVWstore [a.Off()] {s} p (MOVDconst [int64(c.Val()&0xffff | a.Val()<<16)]) mem)
 10295  	for {
 10296  		c := auxIntToValAndOff(v.AuxInt)
 10297  		s := auxToSym(v.Aux)
 10298  		p := v_0
 10299  		x := v_1
 10300  		if x.Op != OpS390XMOVHstoreconst {
 10301  			break
 10302  		}
 10303  		a := auxIntToValAndOff(x.AuxInt)
 10304  		if auxToSym(x.Aux) != s {
 10305  			break
 10306  		}
 10307  		mem := x.Args[1]
 10308  		if p != x.Args[0] || !(p.Op != OpSB && x.Uses == 1 && a.Off()+2 == c.Off() && clobber(x)) {
 10309  			break
 10310  		}
 10311  		v.reset(OpS390XMOVWstore)
 10312  		v.AuxInt = int32ToAuxInt(a.Off())
 10313  		v.Aux = symToAux(s)
 10314  		v0 := b.NewValue0(x.Pos, OpS390XMOVDconst, typ.UInt64)
 10315  		v0.AuxInt = int64ToAuxInt(int64(c.Val()&0xffff | a.Val()<<16))
 10316  		v.AddArg3(p, v0, mem)
 10317  		return true
 10318  	}
 10319  	return false
 10320  }
 10321  func rewriteValueS390X_OpS390XMOVWBRstore(v *Value) bool {
 10322  	v_2 := v.Args[2]
 10323  	v_1 := v.Args[1]
 10324  	v_0 := v.Args[0]
 10325  	// match: (MOVWBRstore [i] {s} p (SRDconst [32] w) x:(MOVWBRstore [i-4] {s} p w mem))
 10326  	// cond: x.Uses == 1 && clobber(x)
 10327  	// result: (MOVDBRstore [i-4] {s} p w mem)
 10328  	for {
 10329  		i := auxIntToInt32(v.AuxInt)
 10330  		s := auxToSym(v.Aux)
 10331  		p := v_0
 10332  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 10333  			break
 10334  		}
 10335  		w := v_1.Args[0]
 10336  		x := v_2
 10337  		if x.Op != OpS390XMOVWBRstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10338  			break
 10339  		}
 10340  		mem := x.Args[2]
 10341  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
 10342  			break
 10343  		}
 10344  		v.reset(OpS390XMOVDBRstore)
 10345  		v.AuxInt = int32ToAuxInt(i - 4)
 10346  		v.Aux = symToAux(s)
 10347  		v.AddArg3(p, w, mem)
 10348  		return true
 10349  	}
 10350  	// match: (MOVWBRstore [i] {s} p (SRDconst [j] w) x:(MOVWBRstore [i-4] {s} p w0:(SRDconst [j-32] w) mem))
 10351  	// cond: x.Uses == 1 && clobber(x)
 10352  	// result: (MOVDBRstore [i-4] {s} p w0 mem)
 10353  	for {
 10354  		i := auxIntToInt32(v.AuxInt)
 10355  		s := auxToSym(v.Aux)
 10356  		p := v_0
 10357  		if v_1.Op != OpS390XSRDconst {
 10358  			break
 10359  		}
 10360  		j := auxIntToUint8(v_1.AuxInt)
 10361  		w := v_1.Args[0]
 10362  		x := v_2
 10363  		if x.Op != OpS390XMOVWBRstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10364  			break
 10365  		}
 10366  		mem := x.Args[2]
 10367  		if p != x.Args[0] {
 10368  			break
 10369  		}
 10370  		w0 := x.Args[1]
 10371  		if w0.Op != OpS390XSRDconst || auxIntToUint8(w0.AuxInt) != j-32 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
 10372  			break
 10373  		}
 10374  		v.reset(OpS390XMOVDBRstore)
 10375  		v.AuxInt = int32ToAuxInt(i - 4)
 10376  		v.Aux = symToAux(s)
 10377  		v.AddArg3(p, w0, mem)
 10378  		return true
 10379  	}
 10380  	return false
 10381  }
 10382  func rewriteValueS390X_OpS390XMOVWZload(v *Value) bool {
 10383  	v_1 := v.Args[1]
 10384  	v_0 := v.Args[0]
 10385  	// match: (MOVWZload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10386  	// cond: isSamePtr(ptr1, ptr2)
 10387  	// result: (MOVWZreg x)
 10388  	for {
 10389  		off := auxIntToInt32(v.AuxInt)
 10390  		sym := auxToSym(v.Aux)
 10391  		ptr1 := v_0
 10392  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10393  			break
 10394  		}
 10395  		x := v_1.Args[1]
 10396  		ptr2 := v_1.Args[0]
 10397  		if !(isSamePtr(ptr1, ptr2)) {
 10398  			break
 10399  		}
 10400  		v.reset(OpS390XMOVWZreg)
 10401  		v.AddArg(x)
 10402  		return true
 10403  	}
 10404  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] ptr) mem)
 10405  	// cond: is20Bit(int64(off1)+int64(off2))
 10406  	// result: (MOVWZload [off1+off2] {sym} ptr mem)
 10407  	for {
 10408  		off1 := auxIntToInt32(v.AuxInt)
 10409  		sym := auxToSym(v.Aux)
 10410  		if v_0.Op != OpS390XADDconst {
 10411  			break
 10412  		}
 10413  		off2 := auxIntToInt32(v_0.AuxInt)
 10414  		ptr := v_0.Args[0]
 10415  		mem := v_1
 10416  		if !(is20Bit(int64(off1) + int64(off2))) {
 10417  			break
 10418  		}
 10419  		v.reset(OpS390XMOVWZload)
 10420  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10421  		v.Aux = symToAux(sym)
 10422  		v.AddArg2(ptr, mem)
 10423  		return true
 10424  	}
 10425  	// match: (MOVWZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10426  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10427  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10428  	for {
 10429  		off1 := auxIntToInt32(v.AuxInt)
 10430  		sym1 := auxToSym(v.Aux)
 10431  		if v_0.Op != OpS390XMOVDaddr {
 10432  			break
 10433  		}
 10434  		t := v_0.Type
 10435  		off2 := auxIntToInt32(v_0.AuxInt)
 10436  		sym2 := auxToSym(v_0.Aux)
 10437  		base := v_0.Args[0]
 10438  		mem := v_1
 10439  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10440  			break
 10441  		}
 10442  		v.reset(OpS390XMOVWZload)
 10443  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10444  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10445  		v.AddArg2(base, mem)
 10446  		return true
 10447  	}
 10448  	return false
 10449  }
 10450  func rewriteValueS390X_OpS390XMOVWZreg(v *Value) bool {
 10451  	v_0 := v.Args[0]
 10452  	b := v.Block
 10453  	// match: (MOVWZreg e:(MOVBZreg x))
 10454  	// cond: clobberIfDead(e)
 10455  	// result: (MOVBZreg x)
 10456  	for {
 10457  		e := v_0
 10458  		if e.Op != OpS390XMOVBZreg {
 10459  			break
 10460  		}
 10461  		x := e.Args[0]
 10462  		if !(clobberIfDead(e)) {
 10463  			break
 10464  		}
 10465  		v.reset(OpS390XMOVBZreg)
 10466  		v.AddArg(x)
 10467  		return true
 10468  	}
 10469  	// match: (MOVWZreg e:(MOVHZreg x))
 10470  	// cond: clobberIfDead(e)
 10471  	// result: (MOVHZreg x)
 10472  	for {
 10473  		e := v_0
 10474  		if e.Op != OpS390XMOVHZreg {
 10475  			break
 10476  		}
 10477  		x := e.Args[0]
 10478  		if !(clobberIfDead(e)) {
 10479  			break
 10480  		}
 10481  		v.reset(OpS390XMOVHZreg)
 10482  		v.AddArg(x)
 10483  		return true
 10484  	}
 10485  	// match: (MOVWZreg e:(MOVWreg x))
 10486  	// cond: clobberIfDead(e)
 10487  	// result: (MOVWZreg x)
 10488  	for {
 10489  		e := v_0
 10490  		if e.Op != OpS390XMOVWreg {
 10491  			break
 10492  		}
 10493  		x := e.Args[0]
 10494  		if !(clobberIfDead(e)) {
 10495  			break
 10496  		}
 10497  		v.reset(OpS390XMOVWZreg)
 10498  		v.AddArg(x)
 10499  		return true
 10500  	}
 10501  	// match: (MOVWZreg e:(MOVWZreg x))
 10502  	// cond: clobberIfDead(e)
 10503  	// result: (MOVWZreg x)
 10504  	for {
 10505  		e := v_0
 10506  		if e.Op != OpS390XMOVWZreg {
 10507  			break
 10508  		}
 10509  		x := e.Args[0]
 10510  		if !(clobberIfDead(e)) {
 10511  			break
 10512  		}
 10513  		v.reset(OpS390XMOVWZreg)
 10514  		v.AddArg(x)
 10515  		return true
 10516  	}
 10517  	// match: (MOVWZreg x:(MOVBZload _ _))
 10518  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10519  	// result: x
 10520  	for {
 10521  		x := v_0
 10522  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10523  			break
 10524  		}
 10525  		v.copyOf(x)
 10526  		return true
 10527  	}
 10528  	// match: (MOVWZreg x:(MOVHZload _ _))
 10529  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10530  	// result: x
 10531  	for {
 10532  		x := v_0
 10533  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10534  			break
 10535  		}
 10536  		v.copyOf(x)
 10537  		return true
 10538  	}
 10539  	// match: (MOVWZreg x:(MOVWZload _ _))
 10540  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 4)
 10541  	// result: x
 10542  	for {
 10543  		x := v_0
 10544  		if x.Op != OpS390XMOVWZload || !(!x.Type.IsSigned() || x.Type.Size() > 4) {
 10545  			break
 10546  		}
 10547  		v.copyOf(x)
 10548  		return true
 10549  	}
 10550  	// match: (MOVWZreg <t> x:(MOVWload [o] {s} p mem))
 10551  	// cond: x.Uses == 1 && clobber(x)
 10552  	// result: @x.Block (MOVWZload <t> [o] {s} p mem)
 10553  	for {
 10554  		t := v.Type
 10555  		x := v_0
 10556  		if x.Op != OpS390XMOVWload {
 10557  			break
 10558  		}
 10559  		o := auxIntToInt32(x.AuxInt)
 10560  		s := auxToSym(x.Aux)
 10561  		mem := x.Args[1]
 10562  		p := x.Args[0]
 10563  		if !(x.Uses == 1 && clobber(x)) {
 10564  			break
 10565  		}
 10566  		b = x.Block
 10567  		v0 := b.NewValue0(x.Pos, OpS390XMOVWZload, t)
 10568  		v.copyOf(v0)
 10569  		v0.AuxInt = int32ToAuxInt(o)
 10570  		v0.Aux = symToAux(s)
 10571  		v0.AddArg2(p, mem)
 10572  		return true
 10573  	}
 10574  	// match: (MOVWZreg x:(Arg <t>))
 10575  	// cond: !t.IsSigned() && t.Size() <= 4
 10576  	// result: x
 10577  	for {
 10578  		x := v_0
 10579  		if x.Op != OpArg {
 10580  			break
 10581  		}
 10582  		t := x.Type
 10583  		if !(!t.IsSigned() && t.Size() <= 4) {
 10584  			break
 10585  		}
 10586  		v.copyOf(x)
 10587  		return true
 10588  	}
 10589  	// match: (MOVWZreg (MOVDconst [c]))
 10590  	// result: (MOVDconst [int64(uint32(c))])
 10591  	for {
 10592  		if v_0.Op != OpS390XMOVDconst {
 10593  			break
 10594  		}
 10595  		c := auxIntToInt64(v_0.AuxInt)
 10596  		v.reset(OpS390XMOVDconst)
 10597  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10598  		return true
 10599  	}
 10600  	// match: (MOVWZreg (RISBGZ x {r}))
 10601  	// cond: r.OutMerge(0xffffffff) != nil
 10602  	// result: (RISBGZ x {*r.OutMerge(0xffffffff)})
 10603  	for {
 10604  		if v_0.Op != OpS390XRISBGZ {
 10605  			break
 10606  		}
 10607  		r := auxToS390xRotateParams(v_0.Aux)
 10608  		x := v_0.Args[0]
 10609  		if !(r.OutMerge(0xffffffff) != nil) {
 10610  			break
 10611  		}
 10612  		v.reset(OpS390XRISBGZ)
 10613  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0xffffffff))
 10614  		v.AddArg(x)
 10615  		return true
 10616  	}
 10617  	return false
 10618  }
 10619  func rewriteValueS390X_OpS390XMOVWload(v *Value) bool {
 10620  	v_1 := v.Args[1]
 10621  	v_0 := v.Args[0]
 10622  	// match: (MOVWload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10623  	// cond: isSamePtr(ptr1, ptr2)
 10624  	// result: (MOVWreg x)
 10625  	for {
 10626  		off := auxIntToInt32(v.AuxInt)
 10627  		sym := auxToSym(v.Aux)
 10628  		ptr1 := v_0
 10629  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10630  			break
 10631  		}
 10632  		x := v_1.Args[1]
 10633  		ptr2 := v_1.Args[0]
 10634  		if !(isSamePtr(ptr1, ptr2)) {
 10635  			break
 10636  		}
 10637  		v.reset(OpS390XMOVWreg)
 10638  		v.AddArg(x)
 10639  		return true
 10640  	}
 10641  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10642  	// cond: is20Bit(int64(off1)+int64(off2))
 10643  	// result: (MOVWload [off1+off2] {sym} ptr mem)
 10644  	for {
 10645  		off1 := auxIntToInt32(v.AuxInt)
 10646  		sym := auxToSym(v.Aux)
 10647  		if v_0.Op != OpS390XADDconst {
 10648  			break
 10649  		}
 10650  		off2 := auxIntToInt32(v_0.AuxInt)
 10651  		ptr := v_0.Args[0]
 10652  		mem := v_1
 10653  		if !(is20Bit(int64(off1) + int64(off2))) {
 10654  			break
 10655  		}
 10656  		v.reset(OpS390XMOVWload)
 10657  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10658  		v.Aux = symToAux(sym)
 10659  		v.AddArg2(ptr, mem)
 10660  		return true
 10661  	}
 10662  	// match: (MOVWload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10663  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10664  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10665  	for {
 10666  		off1 := auxIntToInt32(v.AuxInt)
 10667  		sym1 := auxToSym(v.Aux)
 10668  		if v_0.Op != OpS390XMOVDaddr {
 10669  			break
 10670  		}
 10671  		t := v_0.Type
 10672  		off2 := auxIntToInt32(v_0.AuxInt)
 10673  		sym2 := auxToSym(v_0.Aux)
 10674  		base := v_0.Args[0]
 10675  		mem := v_1
 10676  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10677  			break
 10678  		}
 10679  		v.reset(OpS390XMOVWload)
 10680  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10681  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10682  		v.AddArg2(base, mem)
 10683  		return true
 10684  	}
 10685  	return false
 10686  }
 10687  func rewriteValueS390X_OpS390XMOVWreg(v *Value) bool {
 10688  	v_0 := v.Args[0]
 10689  	b := v.Block
 10690  	// match: (MOVWreg e:(MOVBreg x))
 10691  	// cond: clobberIfDead(e)
 10692  	// result: (MOVBreg x)
 10693  	for {
 10694  		e := v_0
 10695  		if e.Op != OpS390XMOVBreg {
 10696  			break
 10697  		}
 10698  		x := e.Args[0]
 10699  		if !(clobberIfDead(e)) {
 10700  			break
 10701  		}
 10702  		v.reset(OpS390XMOVBreg)
 10703  		v.AddArg(x)
 10704  		return true
 10705  	}
 10706  	// match: (MOVWreg e:(MOVHreg x))
 10707  	// cond: clobberIfDead(e)
 10708  	// result: (MOVHreg x)
 10709  	for {
 10710  		e := v_0
 10711  		if e.Op != OpS390XMOVHreg {
 10712  			break
 10713  		}
 10714  		x := e.Args[0]
 10715  		if !(clobberIfDead(e)) {
 10716  			break
 10717  		}
 10718  		v.reset(OpS390XMOVHreg)
 10719  		v.AddArg(x)
 10720  		return true
 10721  	}
 10722  	// match: (MOVWreg e:(MOVWreg x))
 10723  	// cond: clobberIfDead(e)
 10724  	// result: (MOVWreg x)
 10725  	for {
 10726  		e := v_0
 10727  		if e.Op != OpS390XMOVWreg {
 10728  			break
 10729  		}
 10730  		x := e.Args[0]
 10731  		if !(clobberIfDead(e)) {
 10732  			break
 10733  		}
 10734  		v.reset(OpS390XMOVWreg)
 10735  		v.AddArg(x)
 10736  		return true
 10737  	}
 10738  	// match: (MOVWreg e:(MOVWZreg x))
 10739  	// cond: clobberIfDead(e)
 10740  	// result: (MOVWreg x)
 10741  	for {
 10742  		e := v_0
 10743  		if e.Op != OpS390XMOVWZreg {
 10744  			break
 10745  		}
 10746  		x := e.Args[0]
 10747  		if !(clobberIfDead(e)) {
 10748  			break
 10749  		}
 10750  		v.reset(OpS390XMOVWreg)
 10751  		v.AddArg(x)
 10752  		return true
 10753  	}
 10754  	// match: (MOVWreg x:(MOVBload _ _))
 10755  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10756  	// result: x
 10757  	for {
 10758  		x := v_0
 10759  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10760  			break
 10761  		}
 10762  		v.copyOf(x)
 10763  		return true
 10764  	}
 10765  	// match: (MOVWreg x:(MOVHload _ _))
 10766  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10767  	// result: x
 10768  	for {
 10769  		x := v_0
 10770  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10771  			break
 10772  		}
 10773  		v.copyOf(x)
 10774  		return true
 10775  	}
 10776  	// match: (MOVWreg x:(MOVWload _ _))
 10777  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10778  	// result: x
 10779  	for {
 10780  		x := v_0
 10781  		if x.Op != OpS390XMOVWload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10782  			break
 10783  		}
 10784  		v.copyOf(x)
 10785  		return true
 10786  	}
 10787  	// match: (MOVWreg x:(MOVBZload _ _))
 10788  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10789  	// result: x
 10790  	for {
 10791  		x := v_0
 10792  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10793  			break
 10794  		}
 10795  		v.copyOf(x)
 10796  		return true
 10797  	}
 10798  	// match: (MOVWreg x:(MOVHZload _ _))
 10799  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10800  	// result: x
 10801  	for {
 10802  		x := v_0
 10803  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10804  			break
 10805  		}
 10806  		v.copyOf(x)
 10807  		return true
 10808  	}
 10809  	// match: (MOVWreg <t> x:(MOVWZload [o] {s} p mem))
 10810  	// cond: x.Uses == 1 && clobber(x)
 10811  	// result: @x.Block (MOVWload <t> [o] {s} p mem)
 10812  	for {
 10813  		t := v.Type
 10814  		x := v_0
 10815  		if x.Op != OpS390XMOVWZload {
 10816  			break
 10817  		}
 10818  		o := auxIntToInt32(x.AuxInt)
 10819  		s := auxToSym(x.Aux)
 10820  		mem := x.Args[1]
 10821  		p := x.Args[0]
 10822  		if !(x.Uses == 1 && clobber(x)) {
 10823  			break
 10824  		}
 10825  		b = x.Block
 10826  		v0 := b.NewValue0(x.Pos, OpS390XMOVWload, t)
 10827  		v.copyOf(v0)
 10828  		v0.AuxInt = int32ToAuxInt(o)
 10829  		v0.Aux = symToAux(s)
 10830  		v0.AddArg2(p, mem)
 10831  		return true
 10832  	}
 10833  	// match: (MOVWreg x:(Arg <t>))
 10834  	// cond: t.IsSigned() && t.Size() <= 4
 10835  	// result: x
 10836  	for {
 10837  		x := v_0
 10838  		if x.Op != OpArg {
 10839  			break
 10840  		}
 10841  		t := x.Type
 10842  		if !(t.IsSigned() && t.Size() <= 4) {
 10843  			break
 10844  		}
 10845  		v.copyOf(x)
 10846  		return true
 10847  	}
 10848  	// match: (MOVWreg (MOVDconst [c]))
 10849  	// result: (MOVDconst [int64(int32(c))])
 10850  	for {
 10851  		if v_0.Op != OpS390XMOVDconst {
 10852  			break
 10853  		}
 10854  		c := auxIntToInt64(v_0.AuxInt)
 10855  		v.reset(OpS390XMOVDconst)
 10856  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 10857  		return true
 10858  	}
 10859  	return false
 10860  }
 10861  func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
 10862  	v_2 := v.Args[2]
 10863  	v_1 := v.Args[1]
 10864  	v_0 := v.Args[0]
 10865  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 10866  	// result: (MOVWstore [off] {sym} ptr x mem)
 10867  	for {
 10868  		off := auxIntToInt32(v.AuxInt)
 10869  		sym := auxToSym(v.Aux)
 10870  		ptr := v_0
 10871  		if v_1.Op != OpS390XMOVWreg {
 10872  			break
 10873  		}
 10874  		x := v_1.Args[0]
 10875  		mem := v_2
 10876  		v.reset(OpS390XMOVWstore)
 10877  		v.AuxInt = int32ToAuxInt(off)
 10878  		v.Aux = symToAux(sym)
 10879  		v.AddArg3(ptr, x, mem)
 10880  		return true
 10881  	}
 10882  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 10883  	// result: (MOVWstore [off] {sym} ptr x mem)
 10884  	for {
 10885  		off := auxIntToInt32(v.AuxInt)
 10886  		sym := auxToSym(v.Aux)
 10887  		ptr := v_0
 10888  		if v_1.Op != OpS390XMOVWZreg {
 10889  			break
 10890  		}
 10891  		x := v_1.Args[0]
 10892  		mem := v_2
 10893  		v.reset(OpS390XMOVWstore)
 10894  		v.AuxInt = int32ToAuxInt(off)
 10895  		v.Aux = symToAux(sym)
 10896  		v.AddArg3(ptr, x, mem)
 10897  		return true
 10898  	}
 10899  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10900  	// cond: is20Bit(int64(off1)+int64(off2))
 10901  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
 10902  	for {
 10903  		off1 := auxIntToInt32(v.AuxInt)
 10904  		sym := auxToSym(v.Aux)
 10905  		if v_0.Op != OpS390XADDconst {
 10906  			break
 10907  		}
 10908  		off2 := auxIntToInt32(v_0.AuxInt)
 10909  		ptr := v_0.Args[0]
 10910  		val := v_1
 10911  		mem := v_2
 10912  		if !(is20Bit(int64(off1) + int64(off2))) {
 10913  			break
 10914  		}
 10915  		v.reset(OpS390XMOVWstore)
 10916  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10917  		v.Aux = symToAux(sym)
 10918  		v.AddArg3(ptr, val, mem)
 10919  		return true
 10920  	}
 10921  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [c]) mem)
 10922  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
 10923  	// result: (MOVWstoreconst [makeValAndOff(int32(c),off)] {sym} ptr mem)
 10924  	for {
 10925  		off := auxIntToInt32(v.AuxInt)
 10926  		sym := auxToSym(v.Aux)
 10927  		ptr := v_0
 10928  		if v_1.Op != OpS390XMOVDconst {
 10929  			break
 10930  		}
 10931  		c := auxIntToInt64(v_1.AuxInt)
 10932  		mem := v_2
 10933  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
 10934  			break
 10935  		}
 10936  		v.reset(OpS390XMOVWstoreconst)
 10937  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
 10938  		v.Aux = symToAux(sym)
 10939  		v.AddArg2(ptr, mem)
 10940  		return true
 10941  	}
 10942  	// match: (MOVWstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10943  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10944  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
 10945  	for {
 10946  		off1 := auxIntToInt32(v.AuxInt)
 10947  		sym1 := auxToSym(v.Aux)
 10948  		if v_0.Op != OpS390XMOVDaddr {
 10949  			break
 10950  		}
 10951  		t := v_0.Type
 10952  		off2 := auxIntToInt32(v_0.AuxInt)
 10953  		sym2 := auxToSym(v_0.Aux)
 10954  		base := v_0.Args[0]
 10955  		val := v_1
 10956  		mem := v_2
 10957  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10958  			break
 10959  		}
 10960  		v.reset(OpS390XMOVWstore)
 10961  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10962  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10963  		v.AddArg3(base, val, mem)
 10964  		return true
 10965  	}
 10966  	// match: (MOVWstore [i] {s} p (SRDconst [32] w) x:(MOVWstore [i-4] {s} p w mem))
 10967  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10968  	// result: (MOVDstore [i-4] {s} p w mem)
 10969  	for {
 10970  		i := auxIntToInt32(v.AuxInt)
 10971  		s := auxToSym(v.Aux)
 10972  		p := v_0
 10973  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 10974  			break
 10975  		}
 10976  		w := v_1.Args[0]
 10977  		x := v_2
 10978  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10979  			break
 10980  		}
 10981  		mem := x.Args[2]
 10982  		if p != x.Args[0] || w != x.Args[1] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10983  			break
 10984  		}
 10985  		v.reset(OpS390XMOVDstore)
 10986  		v.AuxInt = int32ToAuxInt(i - 4)
 10987  		v.Aux = symToAux(s)
 10988  		v.AddArg3(p, w, mem)
 10989  		return true
 10990  	}
 10991  	// match: (MOVWstore [i] {s} p w0:(SRDconst [j] w) x:(MOVWstore [i-4] {s} p (SRDconst [j+32] w) mem))
 10992  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10993  	// result: (MOVDstore [i-4] {s} p w0 mem)
 10994  	for {
 10995  		i := auxIntToInt32(v.AuxInt)
 10996  		s := auxToSym(v.Aux)
 10997  		p := v_0
 10998  		w0 := v_1
 10999  		if w0.Op != OpS390XSRDconst {
 11000  			break
 11001  		}
 11002  		j := auxIntToUint8(w0.AuxInt)
 11003  		w := w0.Args[0]
 11004  		x := v_2
 11005  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 11006  			break
 11007  		}
 11008  		mem := x.Args[2]
 11009  		if p != x.Args[0] {
 11010  			break
 11011  		}
 11012  		x_1 := x.Args[1]
 11013  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != j+32 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 11014  			break
 11015  		}
 11016  		v.reset(OpS390XMOVDstore)
 11017  		v.AuxInt = int32ToAuxInt(i - 4)
 11018  		v.Aux = symToAux(s)
 11019  		v.AddArg3(p, w0, mem)
 11020  		return true
 11021  	}
 11022  	// match: (MOVWstore [i] {s} p w1 x:(MOVWstore [i-4] {s} p w0 mem))
 11023  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && clobber(x)
 11024  	// result: (STM2 [i-4] {s} p w0 w1 mem)
 11025  	for {
 11026  		i := auxIntToInt32(v.AuxInt)
 11027  		s := auxToSym(v.Aux)
 11028  		p := v_0
 11029  		w1 := v_1
 11030  		x := v_2
 11031  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 11032  			break
 11033  		}
 11034  		mem := x.Args[2]
 11035  		if p != x.Args[0] {
 11036  			break
 11037  		}
 11038  		w0 := x.Args[1]
 11039  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && clobber(x)) {
 11040  			break
 11041  		}
 11042  		v.reset(OpS390XSTM2)
 11043  		v.AuxInt = int32ToAuxInt(i - 4)
 11044  		v.Aux = symToAux(s)
 11045  		v.AddArg4(p, w0, w1, mem)
 11046  		return true
 11047  	}
 11048  	// match: (MOVWstore [i] {s} p w2 x:(STM2 [i-8] {s} p w0 w1 mem))
 11049  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)
 11050  	// result: (STM3 [i-8] {s} p w0 w1 w2 mem)
 11051  	for {
 11052  		i := auxIntToInt32(v.AuxInt)
 11053  		s := auxToSym(v.Aux)
 11054  		p := v_0
 11055  		w2 := v_1
 11056  		x := v_2
 11057  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 11058  			break
 11059  		}
 11060  		mem := x.Args[3]
 11061  		if p != x.Args[0] {
 11062  			break
 11063  		}
 11064  		w0 := x.Args[1]
 11065  		w1 := x.Args[2]
 11066  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)) {
 11067  			break
 11068  		}
 11069  		v.reset(OpS390XSTM3)
 11070  		v.AuxInt = int32ToAuxInt(i - 8)
 11071  		v.Aux = symToAux(s)
 11072  		v.AddArg5(p, w0, w1, w2, mem)
 11073  		return true
 11074  	}
 11075  	// match: (MOVWstore [i] {s} p w3 x:(STM3 [i-12] {s} p w0 w1 w2 mem))
 11076  	// cond: x.Uses == 1 && is20Bit(int64(i)-12) && clobber(x)
 11077  	// result: (STM4 [i-12] {s} p w0 w1 w2 w3 mem)
 11078  	for {
 11079  		i := auxIntToInt32(v.AuxInt)
 11080  		s := auxToSym(v.Aux)
 11081  		p := v_0
 11082  		w3 := v_1
 11083  		x := v_2
 11084  		if x.Op != OpS390XSTM3 || auxIntToInt32(x.AuxInt) != i-12 || auxToSym(x.Aux) != s {
 11085  			break
 11086  		}
 11087  		mem := x.Args[4]
 11088  		if p != x.Args[0] {
 11089  			break
 11090  		}
 11091  		w0 := x.Args[1]
 11092  		w1 := x.Args[2]
 11093  		w2 := x.Args[3]
 11094  		if !(x.Uses == 1 && is20Bit(int64(i)-12) && clobber(x)) {
 11095  			break
 11096  		}
 11097  		v.reset(OpS390XSTM4)
 11098  		v.AuxInt = int32ToAuxInt(i - 12)
 11099  		v.Aux = symToAux(s)
 11100  		v.AddArg6(p, w0, w1, w2, w3, mem)
 11101  		return true
 11102  	}
 11103  	return false
 11104  }
 11105  func rewriteValueS390X_OpS390XMOVWstoreconst(v *Value) bool {
 11106  	v_1 := v.Args[1]
 11107  	v_0 := v.Args[0]
 11108  	b := v.Block
 11109  	typ := &b.Func.Config.Types
 11110  	// match: (MOVWstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 11111  	// cond: isU12Bit(sc.Off64()+int64(off))
 11112  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
 11113  	for {
 11114  		sc := auxIntToValAndOff(v.AuxInt)
 11115  		s := auxToSym(v.Aux)
 11116  		if v_0.Op != OpS390XADDconst {
 11117  			break
 11118  		}
 11119  		off := auxIntToInt32(v_0.AuxInt)
 11120  		ptr := v_0.Args[0]
 11121  		mem := v_1
 11122  		if !(isU12Bit(sc.Off64() + int64(off))) {
 11123  			break
 11124  		}
 11125  		v.reset(OpS390XMOVWstoreconst)
 11126  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 11127  		v.Aux = symToAux(s)
 11128  		v.AddArg2(ptr, mem)
 11129  		return true
 11130  	}
 11131  	// match: (MOVWstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 11132  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 11133  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 11134  	for {
 11135  		sc := auxIntToValAndOff(v.AuxInt)
 11136  		sym1 := auxToSym(v.Aux)
 11137  		if v_0.Op != OpS390XMOVDaddr {
 11138  			break
 11139  		}
 11140  		off := auxIntToInt32(v_0.AuxInt)
 11141  		sym2 := auxToSym(v_0.Aux)
 11142  		ptr := v_0.Args[0]
 11143  		mem := v_1
 11144  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 11145  			break
 11146  		}
 11147  		v.reset(OpS390XMOVWstoreconst)
 11148  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 11149  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11150  		v.AddArg2(ptr, mem)
 11151  		return true
 11152  	}
 11153  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
 11154  	// cond: p.Op != OpSB && x.Uses == 1 && a.Off() + 4 == c.Off() && clobber(x)
 11155  	// result: (MOVDstore [a.Off()] {s} p (MOVDconst [c.Val64()&0xffffffff | a.Val64()<<32]) mem)
 11156  	for {
 11157  		c := auxIntToValAndOff(v.AuxInt)
 11158  		s := auxToSym(v.Aux)
 11159  		p := v_0
 11160  		x := v_1
 11161  		if x.Op != OpS390XMOVWstoreconst {
 11162  			break
 11163  		}
 11164  		a := auxIntToValAndOff(x.AuxInt)
 11165  		if auxToSym(x.Aux) != s {
 11166  			break
 11167  		}
 11168  		mem := x.Args[1]
 11169  		if p != x.Args[0] || !(p.Op != OpSB && x.Uses == 1 && a.Off()+4 == c.Off() && clobber(x)) {
 11170  			break
 11171  		}
 11172  		v.reset(OpS390XMOVDstore)
 11173  		v.AuxInt = int32ToAuxInt(a.Off())
 11174  		v.Aux = symToAux(s)
 11175  		v0 := b.NewValue0(x.Pos, OpS390XMOVDconst, typ.UInt64)
 11176  		v0.AuxInt = int64ToAuxInt(c.Val64()&0xffffffff | a.Val64()<<32)
 11177  		v.AddArg3(p, v0, mem)
 11178  		return true
 11179  	}
 11180  	return false
 11181  }
 11182  func rewriteValueS390X_OpS390XMULLD(v *Value) bool {
 11183  	v_1 := v.Args[1]
 11184  	v_0 := v.Args[0]
 11185  	// match: (MULLD x (MOVDconst [c]))
 11186  	// cond: is32Bit(c)
 11187  	// result: (MULLDconst [int32(c)] x)
 11188  	for {
 11189  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11190  			x := v_0
 11191  			if v_1.Op != OpS390XMOVDconst {
 11192  				continue
 11193  			}
 11194  			c := auxIntToInt64(v_1.AuxInt)
 11195  			if !(is32Bit(c)) {
 11196  				continue
 11197  			}
 11198  			v.reset(OpS390XMULLDconst)
 11199  			v.AuxInt = int32ToAuxInt(int32(c))
 11200  			v.AddArg(x)
 11201  			return true
 11202  		}
 11203  		break
 11204  	}
 11205  	// match: (MULLD <t> x g:(MOVDload [off] {sym} ptr mem))
 11206  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11207  	// result: (MULLDload <t> [off] {sym} x ptr mem)
 11208  	for {
 11209  		t := v.Type
 11210  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11211  			x := v_0
 11212  			g := v_1
 11213  			if g.Op != OpS390XMOVDload {
 11214  				continue
 11215  			}
 11216  			off := auxIntToInt32(g.AuxInt)
 11217  			sym := auxToSym(g.Aux)
 11218  			mem := g.Args[1]
 11219  			ptr := g.Args[0]
 11220  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11221  				continue
 11222  			}
 11223  			v.reset(OpS390XMULLDload)
 11224  			v.Type = t
 11225  			v.AuxInt = int32ToAuxInt(off)
 11226  			v.Aux = symToAux(sym)
 11227  			v.AddArg3(x, ptr, mem)
 11228  			return true
 11229  		}
 11230  		break
 11231  	}
 11232  	return false
 11233  }
 11234  func rewriteValueS390X_OpS390XMULLDconst(v *Value) bool {
 11235  	v_0 := v.Args[0]
 11236  	b := v.Block
 11237  	// match: (MULLDconst <t> x [c])
 11238  	// cond: isPowerOfTwo32(c&(c-1))
 11239  	// result: (ADD (SLDconst <t> x [uint8(log32(c&(c-1)))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 11240  	for {
 11241  		t := v.Type
 11242  		c := auxIntToInt32(v.AuxInt)
 11243  		x := v_0
 11244  		if !(isPowerOfTwo32(c & (c - 1))) {
 11245  			break
 11246  		}
 11247  		v.reset(OpS390XADD)
 11248  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11249  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 11250  		v0.AddArg(x)
 11251  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11252  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11253  		v1.AddArg(x)
 11254  		v.AddArg2(v0, v1)
 11255  		return true
 11256  	}
 11257  	// match: (MULLDconst <t> x [c])
 11258  	// cond: isPowerOfTwo32(c+(c&^(c-1)))
 11259  	// result: (SUB (SLDconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 11260  	for {
 11261  		t := v.Type
 11262  		c := auxIntToInt32(v.AuxInt)
 11263  		x := v_0
 11264  		if !(isPowerOfTwo32(c + (c &^ (c - 1)))) {
 11265  			break
 11266  		}
 11267  		v.reset(OpS390XSUB)
 11268  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11269  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11270  		v0.AddArg(x)
 11271  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11272  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11273  		v1.AddArg(x)
 11274  		v.AddArg2(v0, v1)
 11275  		return true
 11276  	}
 11277  	// match: (MULLDconst <t> x [c])
 11278  	// cond: isPowerOfTwo32(-c+(-c&^(-c-1)))
 11279  	// result: (SUB (SLDconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLDconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11280  	for {
 11281  		t := v.Type
 11282  		c := auxIntToInt32(v.AuxInt)
 11283  		x := v_0
 11284  		if !(isPowerOfTwo32(-c + (-c &^ (-c - 1)))) {
 11285  			break
 11286  		}
 11287  		v.reset(OpS390XSUB)
 11288  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11289  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11290  		v0.AddArg(x)
 11291  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11292  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11293  		v1.AddArg(x)
 11294  		v.AddArg2(v0, v1)
 11295  		return true
 11296  	}
 11297  	// match: (MULLDconst [c] (MOVDconst [d]))
 11298  	// result: (MOVDconst [int64(c)*d])
 11299  	for {
 11300  		c := auxIntToInt32(v.AuxInt)
 11301  		if v_0.Op != OpS390XMOVDconst {
 11302  			break
 11303  		}
 11304  		d := auxIntToInt64(v_0.AuxInt)
 11305  		v.reset(OpS390XMOVDconst)
 11306  		v.AuxInt = int64ToAuxInt(int64(c) * d)
 11307  		return true
 11308  	}
 11309  	return false
 11310  }
 11311  func rewriteValueS390X_OpS390XMULLDload(v *Value) bool {
 11312  	v_2 := v.Args[2]
 11313  	v_1 := v.Args[1]
 11314  	v_0 := v.Args[0]
 11315  	b := v.Block
 11316  	// match: (MULLDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11317  	// cond: isSamePtr(ptr1, ptr2)
 11318  	// result: (MULLD x (LGDR <t> y))
 11319  	for {
 11320  		t := v.Type
 11321  		off := auxIntToInt32(v.AuxInt)
 11322  		sym := auxToSym(v.Aux)
 11323  		x := v_0
 11324  		ptr1 := v_1
 11325  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 11326  			break
 11327  		}
 11328  		y := v_2.Args[1]
 11329  		ptr2 := v_2.Args[0]
 11330  		if !(isSamePtr(ptr1, ptr2)) {
 11331  			break
 11332  		}
 11333  		v.reset(OpS390XMULLD)
 11334  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 11335  		v0.AddArg(y)
 11336  		v.AddArg2(x, v0)
 11337  		return true
 11338  	}
 11339  	// match: (MULLDload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11340  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11341  	// result: (MULLDload [off1+off2] {sym} x ptr mem)
 11342  	for {
 11343  		off1 := auxIntToInt32(v.AuxInt)
 11344  		sym := auxToSym(v.Aux)
 11345  		x := v_0
 11346  		if v_1.Op != OpS390XADDconst {
 11347  			break
 11348  		}
 11349  		off2 := auxIntToInt32(v_1.AuxInt)
 11350  		ptr := v_1.Args[0]
 11351  		mem := v_2
 11352  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11353  			break
 11354  		}
 11355  		v.reset(OpS390XMULLDload)
 11356  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11357  		v.Aux = symToAux(sym)
 11358  		v.AddArg3(x, ptr, mem)
 11359  		return true
 11360  	}
 11361  	// match: (MULLDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11362  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11363  	// result: (MULLDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11364  	for {
 11365  		o1 := auxIntToInt32(v.AuxInt)
 11366  		s1 := auxToSym(v.Aux)
 11367  		x := v_0
 11368  		if v_1.Op != OpS390XMOVDaddr {
 11369  			break
 11370  		}
 11371  		o2 := auxIntToInt32(v_1.AuxInt)
 11372  		s2 := auxToSym(v_1.Aux)
 11373  		ptr := v_1.Args[0]
 11374  		mem := v_2
 11375  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11376  			break
 11377  		}
 11378  		v.reset(OpS390XMULLDload)
 11379  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11380  		v.Aux = symToAux(mergeSym(s1, s2))
 11381  		v.AddArg3(x, ptr, mem)
 11382  		return true
 11383  	}
 11384  	return false
 11385  }
 11386  func rewriteValueS390X_OpS390XMULLW(v *Value) bool {
 11387  	v_1 := v.Args[1]
 11388  	v_0 := v.Args[0]
 11389  	// match: (MULLW x (MOVDconst [c]))
 11390  	// result: (MULLWconst [int32(c)] x)
 11391  	for {
 11392  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11393  			x := v_0
 11394  			if v_1.Op != OpS390XMOVDconst {
 11395  				continue
 11396  			}
 11397  			c := auxIntToInt64(v_1.AuxInt)
 11398  			v.reset(OpS390XMULLWconst)
 11399  			v.AuxInt = int32ToAuxInt(int32(c))
 11400  			v.AddArg(x)
 11401  			return true
 11402  		}
 11403  		break
 11404  	}
 11405  	// match: (MULLW <t> x g:(MOVWload [off] {sym} ptr mem))
 11406  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11407  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11408  	for {
 11409  		t := v.Type
 11410  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11411  			x := v_0
 11412  			g := v_1
 11413  			if g.Op != OpS390XMOVWload {
 11414  				continue
 11415  			}
 11416  			off := auxIntToInt32(g.AuxInt)
 11417  			sym := auxToSym(g.Aux)
 11418  			mem := g.Args[1]
 11419  			ptr := g.Args[0]
 11420  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11421  				continue
 11422  			}
 11423  			v.reset(OpS390XMULLWload)
 11424  			v.Type = t
 11425  			v.AuxInt = int32ToAuxInt(off)
 11426  			v.Aux = symToAux(sym)
 11427  			v.AddArg3(x, ptr, mem)
 11428  			return true
 11429  		}
 11430  		break
 11431  	}
 11432  	// match: (MULLW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11433  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11434  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11435  	for {
 11436  		t := v.Type
 11437  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11438  			x := v_0
 11439  			g := v_1
 11440  			if g.Op != OpS390XMOVWZload {
 11441  				continue
 11442  			}
 11443  			off := auxIntToInt32(g.AuxInt)
 11444  			sym := auxToSym(g.Aux)
 11445  			mem := g.Args[1]
 11446  			ptr := g.Args[0]
 11447  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11448  				continue
 11449  			}
 11450  			v.reset(OpS390XMULLWload)
 11451  			v.Type = t
 11452  			v.AuxInt = int32ToAuxInt(off)
 11453  			v.Aux = symToAux(sym)
 11454  			v.AddArg3(x, ptr, mem)
 11455  			return true
 11456  		}
 11457  		break
 11458  	}
 11459  	return false
 11460  }
 11461  func rewriteValueS390X_OpS390XMULLWconst(v *Value) bool {
 11462  	v_0 := v.Args[0]
 11463  	b := v.Block
 11464  	// match: (MULLWconst <t> x [c])
 11465  	// cond: isPowerOfTwo32(c&(c-1))
 11466  	// result: (ADDW (SLWconst <t> x [uint8(log32(c&(c-1)))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11467  	for {
 11468  		t := v.Type
 11469  		c := auxIntToInt32(v.AuxInt)
 11470  		x := v_0
 11471  		if !(isPowerOfTwo32(c & (c - 1))) {
 11472  			break
 11473  		}
 11474  		v.reset(OpS390XADDW)
 11475  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11476  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 11477  		v0.AddArg(x)
 11478  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11479  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11480  		v1.AddArg(x)
 11481  		v.AddArg2(v0, v1)
 11482  		return true
 11483  	}
 11484  	// match: (MULLWconst <t> x [c])
 11485  	// cond: isPowerOfTwo32(c+(c&^(c-1)))
 11486  	// result: (SUBW (SLWconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11487  	for {
 11488  		t := v.Type
 11489  		c := auxIntToInt32(v.AuxInt)
 11490  		x := v_0
 11491  		if !(isPowerOfTwo32(c + (c &^ (c - 1)))) {
 11492  			break
 11493  		}
 11494  		v.reset(OpS390XSUBW)
 11495  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11496  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11497  		v0.AddArg(x)
 11498  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11499  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11500  		v1.AddArg(x)
 11501  		v.AddArg2(v0, v1)
 11502  		return true
 11503  	}
 11504  	// match: (MULLWconst <t> x [c])
 11505  	// cond: isPowerOfTwo32(-c+(-c&^(-c-1)))
 11506  	// result: (SUBW (SLWconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLWconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11507  	for {
 11508  		t := v.Type
 11509  		c := auxIntToInt32(v.AuxInt)
 11510  		x := v_0
 11511  		if !(isPowerOfTwo32(-c + (-c &^ (-c - 1)))) {
 11512  			break
 11513  		}
 11514  		v.reset(OpS390XSUBW)
 11515  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11516  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11517  		v0.AddArg(x)
 11518  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11519  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11520  		v1.AddArg(x)
 11521  		v.AddArg2(v0, v1)
 11522  		return true
 11523  	}
 11524  	// match: (MULLWconst [c] (MOVDconst [d]))
 11525  	// result: (MOVDconst [int64(c*int32(d))])
 11526  	for {
 11527  		c := auxIntToInt32(v.AuxInt)
 11528  		if v_0.Op != OpS390XMOVDconst {
 11529  			break
 11530  		}
 11531  		d := auxIntToInt64(v_0.AuxInt)
 11532  		v.reset(OpS390XMOVDconst)
 11533  		v.AuxInt = int64ToAuxInt(int64(c * int32(d)))
 11534  		return true
 11535  	}
 11536  	return false
 11537  }
 11538  func rewriteValueS390X_OpS390XMULLWload(v *Value) bool {
 11539  	v_2 := v.Args[2]
 11540  	v_1 := v.Args[1]
 11541  	v_0 := v.Args[0]
 11542  	// match: (MULLWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11543  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11544  	// result: (MULLWload [off1+off2] {sym} x ptr mem)
 11545  	for {
 11546  		off1 := auxIntToInt32(v.AuxInt)
 11547  		sym := auxToSym(v.Aux)
 11548  		x := v_0
 11549  		if v_1.Op != OpS390XADDconst {
 11550  			break
 11551  		}
 11552  		off2 := auxIntToInt32(v_1.AuxInt)
 11553  		ptr := v_1.Args[0]
 11554  		mem := v_2
 11555  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11556  			break
 11557  		}
 11558  		v.reset(OpS390XMULLWload)
 11559  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11560  		v.Aux = symToAux(sym)
 11561  		v.AddArg3(x, ptr, mem)
 11562  		return true
 11563  	}
 11564  	// match: (MULLWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11565  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11566  	// result: (MULLWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11567  	for {
 11568  		o1 := auxIntToInt32(v.AuxInt)
 11569  		s1 := auxToSym(v.Aux)
 11570  		x := v_0
 11571  		if v_1.Op != OpS390XMOVDaddr {
 11572  			break
 11573  		}
 11574  		o2 := auxIntToInt32(v_1.AuxInt)
 11575  		s2 := auxToSym(v_1.Aux)
 11576  		ptr := v_1.Args[0]
 11577  		mem := v_2
 11578  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11579  			break
 11580  		}
 11581  		v.reset(OpS390XMULLWload)
 11582  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11583  		v.Aux = symToAux(mergeSym(s1, s2))
 11584  		v.AddArg3(x, ptr, mem)
 11585  		return true
 11586  	}
 11587  	return false
 11588  }
 11589  func rewriteValueS390X_OpS390XNEG(v *Value) bool {
 11590  	v_0 := v.Args[0]
 11591  	// match: (NEG (MOVDconst [c]))
 11592  	// result: (MOVDconst [-c])
 11593  	for {
 11594  		if v_0.Op != OpS390XMOVDconst {
 11595  			break
 11596  		}
 11597  		c := auxIntToInt64(v_0.AuxInt)
 11598  		v.reset(OpS390XMOVDconst)
 11599  		v.AuxInt = int64ToAuxInt(-c)
 11600  		return true
 11601  	}
 11602  	// match: (NEG (ADDconst [c] (NEG x)))
 11603  	// cond: c != -(1<<31)
 11604  	// result: (ADDconst [-c] x)
 11605  	for {
 11606  		if v_0.Op != OpS390XADDconst {
 11607  			break
 11608  		}
 11609  		c := auxIntToInt32(v_0.AuxInt)
 11610  		v_0_0 := v_0.Args[0]
 11611  		if v_0_0.Op != OpS390XNEG {
 11612  			break
 11613  		}
 11614  		x := v_0_0.Args[0]
 11615  		if !(c != -(1 << 31)) {
 11616  			break
 11617  		}
 11618  		v.reset(OpS390XADDconst)
 11619  		v.AuxInt = int32ToAuxInt(-c)
 11620  		v.AddArg(x)
 11621  		return true
 11622  	}
 11623  	return false
 11624  }
 11625  func rewriteValueS390X_OpS390XNEGW(v *Value) bool {
 11626  	v_0 := v.Args[0]
 11627  	// match: (NEGW (MOVDconst [c]))
 11628  	// result: (MOVDconst [int64(int32(-c))])
 11629  	for {
 11630  		if v_0.Op != OpS390XMOVDconst {
 11631  			break
 11632  		}
 11633  		c := auxIntToInt64(v_0.AuxInt)
 11634  		v.reset(OpS390XMOVDconst)
 11635  		v.AuxInt = int64ToAuxInt(int64(int32(-c)))
 11636  		return true
 11637  	}
 11638  	return false
 11639  }
 11640  func rewriteValueS390X_OpS390XNOT(v *Value) bool {
 11641  	v_0 := v.Args[0]
 11642  	b := v.Block
 11643  	typ := &b.Func.Config.Types
 11644  	// match: (NOT x)
 11645  	// result: (XOR (MOVDconst [-1]) x)
 11646  	for {
 11647  		x := v_0
 11648  		v.reset(OpS390XXOR)
 11649  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 11650  		v0.AuxInt = int64ToAuxInt(-1)
 11651  		v.AddArg2(v0, x)
 11652  		return true
 11653  	}
 11654  }
 11655  func rewriteValueS390X_OpS390XNOTW(v *Value) bool {
 11656  	v_0 := v.Args[0]
 11657  	// match: (NOTW x)
 11658  	// result: (XORWconst [-1] x)
 11659  	for {
 11660  		x := v_0
 11661  		v.reset(OpS390XXORWconst)
 11662  		v.AuxInt = int32ToAuxInt(-1)
 11663  		v.AddArg(x)
 11664  		return true
 11665  	}
 11666  }
 11667  func rewriteValueS390X_OpS390XOR(v *Value) bool {
 11668  	v_1 := v.Args[1]
 11669  	v_0 := v.Args[0]
 11670  	b := v.Block
 11671  	typ := &b.Func.Config.Types
 11672  	// match: (OR x (MOVDconst [c]))
 11673  	// cond: isU32Bit(c)
 11674  	// result: (ORconst [c] x)
 11675  	for {
 11676  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11677  			x := v_0
 11678  			if v_1.Op != OpS390XMOVDconst {
 11679  				continue
 11680  			}
 11681  			c := auxIntToInt64(v_1.AuxInt)
 11682  			if !(isU32Bit(c)) {
 11683  				continue
 11684  			}
 11685  			v.reset(OpS390XORconst)
 11686  			v.AuxInt = int64ToAuxInt(c)
 11687  			v.AddArg(x)
 11688  			return true
 11689  		}
 11690  		break
 11691  	}
 11692  	// match: (OR (SLDconst x [c]) (SRDconst x [64-c]))
 11693  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, c)})
 11694  	for {
 11695  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11696  			if v_0.Op != OpS390XSLDconst {
 11697  				continue
 11698  			}
 11699  			c := auxIntToUint8(v_0.AuxInt)
 11700  			x := v_0.Args[0]
 11701  			if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 64-c || x != v_1.Args[0] {
 11702  				continue
 11703  			}
 11704  			v.reset(OpS390XRISBGZ)
 11705  			v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, c))
 11706  			v.AddArg(x)
 11707  			return true
 11708  		}
 11709  		break
 11710  	}
 11711  	// match: (OR (MOVDconst [-1<<63]) (LGDR <t> x))
 11712  	// result: (LGDR <t> (LNDFR <x.Type> x))
 11713  	for {
 11714  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11715  			if v_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0.AuxInt) != -1<<63 || v_1.Op != OpS390XLGDR {
 11716  				continue
 11717  			}
 11718  			t := v_1.Type
 11719  			x := v_1.Args[0]
 11720  			v.reset(OpS390XLGDR)
 11721  			v.Type = t
 11722  			v0 := b.NewValue0(v.Pos, OpS390XLNDFR, x.Type)
 11723  			v0.AddArg(x)
 11724  			v.AddArg(v0)
 11725  			return true
 11726  		}
 11727  		break
 11728  	}
 11729  	// match: (OR (RISBGZ (LGDR x) {r}) (LGDR (LPDFR <t> y)))
 11730  	// cond: r == s390x.NewRotateParams(0, 0, 0)
 11731  	// result: (LGDR (CPSDR <t> y x))
 11732  	for {
 11733  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11734  			if v_0.Op != OpS390XRISBGZ {
 11735  				continue
 11736  			}
 11737  			r := auxToS390xRotateParams(v_0.Aux)
 11738  			v_0_0 := v_0.Args[0]
 11739  			if v_0_0.Op != OpS390XLGDR {
 11740  				continue
 11741  			}
 11742  			x := v_0_0.Args[0]
 11743  			if v_1.Op != OpS390XLGDR {
 11744  				continue
 11745  			}
 11746  			v_1_0 := v_1.Args[0]
 11747  			if v_1_0.Op != OpS390XLPDFR {
 11748  				continue
 11749  			}
 11750  			t := v_1_0.Type
 11751  			y := v_1_0.Args[0]
 11752  			if !(r == s390x.NewRotateParams(0, 0, 0)) {
 11753  				continue
 11754  			}
 11755  			v.reset(OpS390XLGDR)
 11756  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, t)
 11757  			v0.AddArg2(y, x)
 11758  			v.AddArg(v0)
 11759  			return true
 11760  		}
 11761  		break
 11762  	}
 11763  	// match: (OR (RISBGZ (LGDR x) {r}) (MOVDconst [c]))
 11764  	// cond: c >= 0 && r == s390x.NewRotateParams(0, 0, 0)
 11765  	// result: (LGDR (CPSDR <x.Type> (FMOVDconst <x.Type> [math.Float64frombits(uint64(c))]) x))
 11766  	for {
 11767  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11768  			if v_0.Op != OpS390XRISBGZ {
 11769  				continue
 11770  			}
 11771  			r := auxToS390xRotateParams(v_0.Aux)
 11772  			v_0_0 := v_0.Args[0]
 11773  			if v_0_0.Op != OpS390XLGDR {
 11774  				continue
 11775  			}
 11776  			x := v_0_0.Args[0]
 11777  			if v_1.Op != OpS390XMOVDconst {
 11778  				continue
 11779  			}
 11780  			c := auxIntToInt64(v_1.AuxInt)
 11781  			if !(c >= 0 && r == s390x.NewRotateParams(0, 0, 0)) {
 11782  				continue
 11783  			}
 11784  			v.reset(OpS390XLGDR)
 11785  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, x.Type)
 11786  			v1 := b.NewValue0(v.Pos, OpS390XFMOVDconst, x.Type)
 11787  			v1.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(c)))
 11788  			v0.AddArg2(v1, x)
 11789  			v.AddArg(v0)
 11790  			return true
 11791  		}
 11792  		break
 11793  	}
 11794  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11795  	// result: (MOVDconst [c|d])
 11796  	for {
 11797  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11798  			if v_0.Op != OpS390XMOVDconst {
 11799  				continue
 11800  			}
 11801  			c := auxIntToInt64(v_0.AuxInt)
 11802  			if v_1.Op != OpS390XMOVDconst {
 11803  				continue
 11804  			}
 11805  			d := auxIntToInt64(v_1.AuxInt)
 11806  			v.reset(OpS390XMOVDconst)
 11807  			v.AuxInt = int64ToAuxInt(c | d)
 11808  			return true
 11809  		}
 11810  		break
 11811  	}
 11812  	// match: (OR x x)
 11813  	// result: x
 11814  	for {
 11815  		x := v_0
 11816  		if x != v_1 {
 11817  			break
 11818  		}
 11819  		v.copyOf(x)
 11820  		return true
 11821  	}
 11822  	// match: (OR <t> x g:(MOVDload [off] {sym} ptr mem))
 11823  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11824  	// result: (ORload <t> [off] {sym} x ptr mem)
 11825  	for {
 11826  		t := v.Type
 11827  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11828  			x := v_0
 11829  			g := v_1
 11830  			if g.Op != OpS390XMOVDload {
 11831  				continue
 11832  			}
 11833  			off := auxIntToInt32(g.AuxInt)
 11834  			sym := auxToSym(g.Aux)
 11835  			mem := g.Args[1]
 11836  			ptr := g.Args[0]
 11837  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11838  				continue
 11839  			}
 11840  			v.reset(OpS390XORload)
 11841  			v.Type = t
 11842  			v.AuxInt = int32ToAuxInt(off)
 11843  			v.Aux = symToAux(sym)
 11844  			v.AddArg3(x, ptr, mem)
 11845  			return true
 11846  		}
 11847  		break
 11848  	}
 11849  	// match: (OR x1:(MOVBZload [i1] {s} p mem) sh:(SLDconst [8] x0:(MOVBZload [i0] {s} p mem)))
 11850  	// cond: i1 == i0+1 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 11851  	// result: @mergePoint(b,x0,x1) (MOVHZload [i0] {s} p mem)
 11852  	for {
 11853  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11854  			x1 := v_0
 11855  			if x1.Op != OpS390XMOVBZload {
 11856  				continue
 11857  			}
 11858  			i1 := auxIntToInt32(x1.AuxInt)
 11859  			s := auxToSym(x1.Aux)
 11860  			mem := x1.Args[1]
 11861  			p := x1.Args[0]
 11862  			sh := v_1
 11863  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 8 {
 11864  				continue
 11865  			}
 11866  			x0 := sh.Args[0]
 11867  			if x0.Op != OpS390XMOVBZload {
 11868  				continue
 11869  			}
 11870  			i0 := auxIntToInt32(x0.AuxInt)
 11871  			if auxToSym(x0.Aux) != s {
 11872  				continue
 11873  			}
 11874  			_ = x0.Args[1]
 11875  			if p != x0.Args[0] || mem != x0.Args[1] || !(i1 == i0+1 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 11876  				continue
 11877  			}
 11878  			b = mergePoint(b, x0, x1)
 11879  			v0 := b.NewValue0(x0.Pos, OpS390XMOVHZload, typ.UInt16)
 11880  			v.copyOf(v0)
 11881  			v0.AuxInt = int32ToAuxInt(i0)
 11882  			v0.Aux = symToAux(s)
 11883  			v0.AddArg2(p, mem)
 11884  			return true
 11885  		}
 11886  		break
 11887  	}
 11888  	// match: (OR x1:(MOVHZload [i1] {s} p mem) sh:(SLDconst [16] x0:(MOVHZload [i0] {s} p mem)))
 11889  	// cond: i1 == i0+2 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 11890  	// result: @mergePoint(b,x0,x1) (MOVWZload [i0] {s} p mem)
 11891  	for {
 11892  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11893  			x1 := v_0
 11894  			if x1.Op != OpS390XMOVHZload {
 11895  				continue
 11896  			}
 11897  			i1 := auxIntToInt32(x1.AuxInt)
 11898  			s := auxToSym(x1.Aux)
 11899  			mem := x1.Args[1]
 11900  			p := x1.Args[0]
 11901  			sh := v_1
 11902  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 16 {
 11903  				continue
 11904  			}
 11905  			x0 := sh.Args[0]
 11906  			if x0.Op != OpS390XMOVHZload {
 11907  				continue
 11908  			}
 11909  			i0 := auxIntToInt32(x0.AuxInt)
 11910  			if auxToSym(x0.Aux) != s {
 11911  				continue
 11912  			}
 11913  			_ = x0.Args[1]
 11914  			if p != x0.Args[0] || mem != x0.Args[1] || !(i1 == i0+2 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 11915  				continue
 11916  			}
 11917  			b = mergePoint(b, x0, x1)
 11918  			v0 := b.NewValue0(x0.Pos, OpS390XMOVWZload, typ.UInt32)
 11919  			v.copyOf(v0)
 11920  			v0.AuxInt = int32ToAuxInt(i0)
 11921  			v0.Aux = symToAux(s)
 11922  			v0.AddArg2(p, mem)
 11923  			return true
 11924  		}
 11925  		break
 11926  	}
 11927  	// match: (OR x1:(MOVWZload [i1] {s} p mem) sh:(SLDconst [32] x0:(MOVWZload [i0] {s} p mem)))
 11928  	// cond: i1 == i0+4 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 11929  	// result: @mergePoint(b,x0,x1) (MOVDload [i0] {s} p mem)
 11930  	for {
 11931  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11932  			x1 := v_0
 11933  			if x1.Op != OpS390XMOVWZload {
 11934  				continue
 11935  			}
 11936  			i1 := auxIntToInt32(x1.AuxInt)
 11937  			s := auxToSym(x1.Aux)
 11938  			mem := x1.Args[1]
 11939  			p := x1.Args[0]
 11940  			sh := v_1
 11941  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 32 {
 11942  				continue
 11943  			}
 11944  			x0 := sh.Args[0]
 11945  			if x0.Op != OpS390XMOVWZload {
 11946  				continue
 11947  			}
 11948  			i0 := auxIntToInt32(x0.AuxInt)
 11949  			if auxToSym(x0.Aux) != s {
 11950  				continue
 11951  			}
 11952  			_ = x0.Args[1]
 11953  			if p != x0.Args[0] || mem != x0.Args[1] || !(i1 == i0+4 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 11954  				continue
 11955  			}
 11956  			b = mergePoint(b, x0, x1)
 11957  			v0 := b.NewValue0(x0.Pos, OpS390XMOVDload, typ.UInt64)
 11958  			v.copyOf(v0)
 11959  			v0.AuxInt = int32ToAuxInt(i0)
 11960  			v0.Aux = symToAux(s)
 11961  			v0.AddArg2(p, mem)
 11962  			return true
 11963  		}
 11964  		break
 11965  	}
 11966  	// match: (OR s0:(SLDconst [j0] x0:(MOVBZload [i0] {s} p mem)) or:(OR s1:(SLDconst [j1] x1:(MOVBZload [i1] {s} p mem)) y))
 11967  	// cond: i1 == i0+1 && j1 == j0-8 && j1 % 16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b,x0,x1,y) != nil && clobber(x0, x1, s0, s1, or)
 11968  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j1] (MOVHZload [i0] {s} p mem)) y)
 11969  	for {
 11970  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11971  			s0 := v_0
 11972  			if s0.Op != OpS390XSLDconst {
 11973  				continue
 11974  			}
 11975  			j0 := auxIntToUint8(s0.AuxInt)
 11976  			x0 := s0.Args[0]
 11977  			if x0.Op != OpS390XMOVBZload {
 11978  				continue
 11979  			}
 11980  			i0 := auxIntToInt32(x0.AuxInt)
 11981  			s := auxToSym(x0.Aux)
 11982  			mem := x0.Args[1]
 11983  			p := x0.Args[0]
 11984  			or := v_1
 11985  			if or.Op != OpS390XOR {
 11986  				continue
 11987  			}
 11988  			_ = or.Args[1]
 11989  			or_0 := or.Args[0]
 11990  			or_1 := or.Args[1]
 11991  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 11992  				s1 := or_0
 11993  				if s1.Op != OpS390XSLDconst {
 11994  					continue
 11995  				}
 11996  				j1 := auxIntToUint8(s1.AuxInt)
 11997  				x1 := s1.Args[0]
 11998  				if x1.Op != OpS390XMOVBZload {
 11999  					continue
 12000  				}
 12001  				i1 := auxIntToInt32(x1.AuxInt)
 12002  				if auxToSym(x1.Aux) != s {
 12003  					continue
 12004  				}
 12005  				_ = x1.Args[1]
 12006  				if p != x1.Args[0] || mem != x1.Args[1] {
 12007  					continue
 12008  				}
 12009  				y := or_1
 12010  				if !(i1 == i0+1 && j1 == j0-8 && j1%16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b, x0, x1, y) != nil && clobber(x0, x1, s0, s1, or)) {
 12011  					continue
 12012  				}
 12013  				b = mergePoint(b, x0, x1, y)
 12014  				v0 := b.NewValue0(x1.Pos, OpS390XOR, v.Type)
 12015  				v.copyOf(v0)
 12016  				v1 := b.NewValue0(x1.Pos, OpS390XSLDconst, v.Type)
 12017  				v1.AuxInt = uint8ToAuxInt(j1)
 12018  				v2 := b.NewValue0(x1.Pos, OpS390XMOVHZload, typ.UInt16)
 12019  				v2.AuxInt = int32ToAuxInt(i0)
 12020  				v2.Aux = symToAux(s)
 12021  				v2.AddArg2(p, mem)
 12022  				v1.AddArg(v2)
 12023  				v0.AddArg2(v1, y)
 12024  				return true
 12025  			}
 12026  		}
 12027  		break
 12028  	}
 12029  	// match: (OR s0:(SLDconst [j0] x0:(MOVHZload [i0] {s} p mem)) or:(OR s1:(SLDconst [j1] x1:(MOVHZload [i1] {s} p mem)) y))
 12030  	// cond: i1 == i0+2 && j1 == j0-16 && j1 % 32 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b,x0,x1,y) != nil && clobber(x0, x1, s0, s1, or)
 12031  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j1] (MOVWZload [i0] {s} p mem)) y)
 12032  	for {
 12033  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12034  			s0 := v_0
 12035  			if s0.Op != OpS390XSLDconst {
 12036  				continue
 12037  			}
 12038  			j0 := auxIntToUint8(s0.AuxInt)
 12039  			x0 := s0.Args[0]
 12040  			if x0.Op != OpS390XMOVHZload {
 12041  				continue
 12042  			}
 12043  			i0 := auxIntToInt32(x0.AuxInt)
 12044  			s := auxToSym(x0.Aux)
 12045  			mem := x0.Args[1]
 12046  			p := x0.Args[0]
 12047  			or := v_1
 12048  			if or.Op != OpS390XOR {
 12049  				continue
 12050  			}
 12051  			_ = or.Args[1]
 12052  			or_0 := or.Args[0]
 12053  			or_1 := or.Args[1]
 12054  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12055  				s1 := or_0
 12056  				if s1.Op != OpS390XSLDconst {
 12057  					continue
 12058  				}
 12059  				j1 := auxIntToUint8(s1.AuxInt)
 12060  				x1 := s1.Args[0]
 12061  				if x1.Op != OpS390XMOVHZload {
 12062  					continue
 12063  				}
 12064  				i1 := auxIntToInt32(x1.AuxInt)
 12065  				if auxToSym(x1.Aux) != s {
 12066  					continue
 12067  				}
 12068  				_ = x1.Args[1]
 12069  				if p != x1.Args[0] || mem != x1.Args[1] {
 12070  					continue
 12071  				}
 12072  				y := or_1
 12073  				if !(i1 == i0+2 && j1 == j0-16 && j1%32 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b, x0, x1, y) != nil && clobber(x0, x1, s0, s1, or)) {
 12074  					continue
 12075  				}
 12076  				b = mergePoint(b, x0, x1, y)
 12077  				v0 := b.NewValue0(x1.Pos, OpS390XOR, v.Type)
 12078  				v.copyOf(v0)
 12079  				v1 := b.NewValue0(x1.Pos, OpS390XSLDconst, v.Type)
 12080  				v1.AuxInt = uint8ToAuxInt(j1)
 12081  				v2 := b.NewValue0(x1.Pos, OpS390XMOVWZload, typ.UInt32)
 12082  				v2.AuxInt = int32ToAuxInt(i0)
 12083  				v2.Aux = symToAux(s)
 12084  				v2.AddArg2(p, mem)
 12085  				v1.AddArg(v2)
 12086  				v0.AddArg2(v1, y)
 12087  				return true
 12088  			}
 12089  		}
 12090  		break
 12091  	}
 12092  	// match: (OR x0:(MOVBZload [i0] {s} p mem) sh:(SLDconst [8] x1:(MOVBZload [i1] {s} p mem)))
 12093  	// cond: p.Op != OpSB && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 12094  	// result: @mergePoint(b,x0,x1) (MOVHZreg (MOVHBRload [i0] {s} p mem))
 12095  	for {
 12096  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12097  			x0 := v_0
 12098  			if x0.Op != OpS390XMOVBZload {
 12099  				continue
 12100  			}
 12101  			i0 := auxIntToInt32(x0.AuxInt)
 12102  			s := auxToSym(x0.Aux)
 12103  			mem := x0.Args[1]
 12104  			p := x0.Args[0]
 12105  			sh := v_1
 12106  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 8 {
 12107  				continue
 12108  			}
 12109  			x1 := sh.Args[0]
 12110  			if x1.Op != OpS390XMOVBZload {
 12111  				continue
 12112  			}
 12113  			i1 := auxIntToInt32(x1.AuxInt)
 12114  			if auxToSym(x1.Aux) != s {
 12115  				continue
 12116  			}
 12117  			_ = x1.Args[1]
 12118  			if p != x1.Args[0] || mem != x1.Args[1] || !(p.Op != OpSB && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 12119  				continue
 12120  			}
 12121  			b = mergePoint(b, x0, x1)
 12122  			v0 := b.NewValue0(x1.Pos, OpS390XMOVHZreg, typ.UInt64)
 12123  			v.copyOf(v0)
 12124  			v1 := b.NewValue0(x1.Pos, OpS390XMOVHBRload, typ.UInt16)
 12125  			v1.AuxInt = int32ToAuxInt(i0)
 12126  			v1.Aux = symToAux(s)
 12127  			v1.AddArg2(p, mem)
 12128  			v0.AddArg(v1)
 12129  			return true
 12130  		}
 12131  		break
 12132  	}
 12133  	// match: (OR r0:(MOVHZreg x0:(MOVHBRload [i0] {s} p mem)) sh:(SLDconst [16] r1:(MOVHZreg x1:(MOVHBRload [i1] {s} p mem))))
 12134  	// cond: i1 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, r0, r1, sh)
 12135  	// result: @mergePoint(b,x0,x1) (MOVWZreg (MOVWBRload [i0] {s} p mem))
 12136  	for {
 12137  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12138  			r0 := v_0
 12139  			if r0.Op != OpS390XMOVHZreg {
 12140  				continue
 12141  			}
 12142  			x0 := r0.Args[0]
 12143  			if x0.Op != OpS390XMOVHBRload {
 12144  				continue
 12145  			}
 12146  			i0 := auxIntToInt32(x0.AuxInt)
 12147  			s := auxToSym(x0.Aux)
 12148  			mem := x0.Args[1]
 12149  			p := x0.Args[0]
 12150  			sh := v_1
 12151  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 16 {
 12152  				continue
 12153  			}
 12154  			r1 := sh.Args[0]
 12155  			if r1.Op != OpS390XMOVHZreg {
 12156  				continue
 12157  			}
 12158  			x1 := r1.Args[0]
 12159  			if x1.Op != OpS390XMOVHBRload {
 12160  				continue
 12161  			}
 12162  			i1 := auxIntToInt32(x1.AuxInt)
 12163  			if auxToSym(x1.Aux) != s {
 12164  				continue
 12165  			}
 12166  			_ = x1.Args[1]
 12167  			if p != x1.Args[0] || mem != x1.Args[1] || !(i1 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, r0, r1, sh)) {
 12168  				continue
 12169  			}
 12170  			b = mergePoint(b, x0, x1)
 12171  			v0 := b.NewValue0(x1.Pos, OpS390XMOVWZreg, typ.UInt64)
 12172  			v.copyOf(v0)
 12173  			v1 := b.NewValue0(x1.Pos, OpS390XMOVWBRload, typ.UInt32)
 12174  			v1.AuxInt = int32ToAuxInt(i0)
 12175  			v1.Aux = symToAux(s)
 12176  			v1.AddArg2(p, mem)
 12177  			v0.AddArg(v1)
 12178  			return true
 12179  		}
 12180  		break
 12181  	}
 12182  	// match: (OR r0:(MOVWZreg x0:(MOVWBRload [i0] {s} p mem)) sh:(SLDconst [32] r1:(MOVWZreg x1:(MOVWBRload [i1] {s} p mem))))
 12183  	// cond: i1 == i0+4 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, r0, r1, sh)
 12184  	// result: @mergePoint(b,x0,x1) (MOVDBRload [i0] {s} p mem)
 12185  	for {
 12186  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12187  			r0 := v_0
 12188  			if r0.Op != OpS390XMOVWZreg {
 12189  				continue
 12190  			}
 12191  			x0 := r0.Args[0]
 12192  			if x0.Op != OpS390XMOVWBRload {
 12193  				continue
 12194  			}
 12195  			i0 := auxIntToInt32(x0.AuxInt)
 12196  			s := auxToSym(x0.Aux)
 12197  			mem := x0.Args[1]
 12198  			p := x0.Args[0]
 12199  			sh := v_1
 12200  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 32 {
 12201  				continue
 12202  			}
 12203  			r1 := sh.Args[0]
 12204  			if r1.Op != OpS390XMOVWZreg {
 12205  				continue
 12206  			}
 12207  			x1 := r1.Args[0]
 12208  			if x1.Op != OpS390XMOVWBRload {
 12209  				continue
 12210  			}
 12211  			i1 := auxIntToInt32(x1.AuxInt)
 12212  			if auxToSym(x1.Aux) != s {
 12213  				continue
 12214  			}
 12215  			_ = x1.Args[1]
 12216  			if p != x1.Args[0] || mem != x1.Args[1] || !(i1 == i0+4 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, r0, r1, sh)) {
 12217  				continue
 12218  			}
 12219  			b = mergePoint(b, x0, x1)
 12220  			v0 := b.NewValue0(x1.Pos, OpS390XMOVDBRload, typ.UInt64)
 12221  			v.copyOf(v0)
 12222  			v0.AuxInt = int32ToAuxInt(i0)
 12223  			v0.Aux = symToAux(s)
 12224  			v0.AddArg2(p, mem)
 12225  			return true
 12226  		}
 12227  		break
 12228  	}
 12229  	// match: (OR s1:(SLDconst [j1] x1:(MOVBZload [i1] {s} p mem)) or:(OR s0:(SLDconst [j0] x0:(MOVBZload [i0] {s} p mem)) y))
 12230  	// cond: p.Op != OpSB && i1 == i0+1 && j1 == j0+8 && j0 % 16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b,x0,x1,y) != nil && clobber(x0, x1, s0, s1, or)
 12231  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j0] (MOVHZreg (MOVHBRload [i0] {s} p mem))) y)
 12232  	for {
 12233  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12234  			s1 := v_0
 12235  			if s1.Op != OpS390XSLDconst {
 12236  				continue
 12237  			}
 12238  			j1 := auxIntToUint8(s1.AuxInt)
 12239  			x1 := s1.Args[0]
 12240  			if x1.Op != OpS390XMOVBZload {
 12241  				continue
 12242  			}
 12243  			i1 := auxIntToInt32(x1.AuxInt)
 12244  			s := auxToSym(x1.Aux)
 12245  			mem := x1.Args[1]
 12246  			p := x1.Args[0]
 12247  			or := v_1
 12248  			if or.Op != OpS390XOR {
 12249  				continue
 12250  			}
 12251  			_ = or.Args[1]
 12252  			or_0 := or.Args[0]
 12253  			or_1 := or.Args[1]
 12254  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12255  				s0 := or_0
 12256  				if s0.Op != OpS390XSLDconst {
 12257  					continue
 12258  				}
 12259  				j0 := auxIntToUint8(s0.AuxInt)
 12260  				x0 := s0.Args[0]
 12261  				if x0.Op != OpS390XMOVBZload {
 12262  					continue
 12263  				}
 12264  				i0 := auxIntToInt32(x0.AuxInt)
 12265  				if auxToSym(x0.Aux) != s {
 12266  					continue
 12267  				}
 12268  				_ = x0.Args[1]
 12269  				if p != x0.Args[0] || mem != x0.Args[1] {
 12270  					continue
 12271  				}
 12272  				y := or_1
 12273  				if !(p.Op != OpSB && i1 == i0+1 && j1 == j0+8 && j0%16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b, x0, x1, y) != nil && clobber(x0, x1, s0, s1, or)) {
 12274  					continue
 12275  				}
 12276  				b = mergePoint(b, x0, x1, y)
 12277  				v0 := b.NewValue0(x0.Pos, OpS390XOR, v.Type)
 12278  				v.copyOf(v0)
 12279  				v1 := b.NewValue0(x0.Pos, OpS390XSLDconst, v.Type)
 12280  				v1.AuxInt = uint8ToAuxInt(j0)
 12281  				v2 := b.NewValue0(x0.Pos, OpS390XMOVHZreg, typ.UInt64)
 12282  				v3 := b.NewValue0(x0.Pos, OpS390XMOVHBRload, typ.UInt16)
 12283  				v3.AuxInt = int32ToAuxInt(i0)
 12284  				v3.Aux = symToAux(s)
 12285  				v3.AddArg2(p, mem)
 12286  				v2.AddArg(v3)
 12287  				v1.AddArg(v2)
 12288  				v0.AddArg2(v1, y)
 12289  				return true
 12290  			}
 12291  		}
 12292  		break
 12293  	}
 12294  	// match: (OR s1:(SLDconst [j1] r1:(MOVHZreg x1:(MOVHBRload [i1] {s} p mem))) or:(OR s0:(SLDconst [j0] r0:(MOVHZreg x0:(MOVHBRload [i0] {s} p mem))) y))
 12295  	// cond: i1 == i0+2 && j1 == j0+16 && j0 % 32 == 0 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b,x0,x1,y) != nil && clobber(x0, x1, r0, r1, s0, s1, or)
 12296  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j0] (MOVWZreg (MOVWBRload [i0] {s} p mem))) y)
 12297  	for {
 12298  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12299  			s1 := v_0
 12300  			if s1.Op != OpS390XSLDconst {
 12301  				continue
 12302  			}
 12303  			j1 := auxIntToUint8(s1.AuxInt)
 12304  			r1 := s1.Args[0]
 12305  			if r1.Op != OpS390XMOVHZreg {
 12306  				continue
 12307  			}
 12308  			x1 := r1.Args[0]
 12309  			if x1.Op != OpS390XMOVHBRload {
 12310  				continue
 12311  			}
 12312  			i1 := auxIntToInt32(x1.AuxInt)
 12313  			s := auxToSym(x1.Aux)
 12314  			mem := x1.Args[1]
 12315  			p := x1.Args[0]
 12316  			or := v_1
 12317  			if or.Op != OpS390XOR {
 12318  				continue
 12319  			}
 12320  			_ = or.Args[1]
 12321  			or_0 := or.Args[0]
 12322  			or_1 := or.Args[1]
 12323  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12324  				s0 := or_0
 12325  				if s0.Op != OpS390XSLDconst {
 12326  					continue
 12327  				}
 12328  				j0 := auxIntToUint8(s0.AuxInt)
 12329  				r0 := s0.Args[0]
 12330  				if r0.Op != OpS390XMOVHZreg {
 12331  					continue
 12332  				}
 12333  				x0 := r0.Args[0]
 12334  				if x0.Op != OpS390XMOVHBRload {
 12335  					continue
 12336  				}
 12337  				i0 := auxIntToInt32(x0.AuxInt)
 12338  				if auxToSym(x0.Aux) != s {
 12339  					continue
 12340  				}
 12341  				_ = x0.Args[1]
 12342  				if p != x0.Args[0] || mem != x0.Args[1] {
 12343  					continue
 12344  				}
 12345  				y := or_1
 12346  				if !(i1 == i0+2 && j1 == j0+16 && j0%32 == 0 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b, x0, x1, y) != nil && clobber(x0, x1, r0, r1, s0, s1, or)) {
 12347  					continue
 12348  				}
 12349  				b = mergePoint(b, x0, x1, y)
 12350  				v0 := b.NewValue0(x0.Pos, OpS390XOR, v.Type)
 12351  				v.copyOf(v0)
 12352  				v1 := b.NewValue0(x0.Pos, OpS390XSLDconst, v.Type)
 12353  				v1.AuxInt = uint8ToAuxInt(j0)
 12354  				v2 := b.NewValue0(x0.Pos, OpS390XMOVWZreg, typ.UInt64)
 12355  				v3 := b.NewValue0(x0.Pos, OpS390XMOVWBRload, typ.UInt32)
 12356  				v3.AuxInt = int32ToAuxInt(i0)
 12357  				v3.Aux = symToAux(s)
 12358  				v3.AddArg2(p, mem)
 12359  				v2.AddArg(v3)
 12360  				v1.AddArg(v2)
 12361  				v0.AddArg2(v1, y)
 12362  				return true
 12363  			}
 12364  		}
 12365  		break
 12366  	}
 12367  	return false
 12368  }
 12369  func rewriteValueS390X_OpS390XORW(v *Value) bool {
 12370  	v_1 := v.Args[1]
 12371  	v_0 := v.Args[0]
 12372  	b := v.Block
 12373  	typ := &b.Func.Config.Types
 12374  	// match: (ORW x (MOVDconst [c]))
 12375  	// result: (ORWconst [int32(c)] x)
 12376  	for {
 12377  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12378  			x := v_0
 12379  			if v_1.Op != OpS390XMOVDconst {
 12380  				continue
 12381  			}
 12382  			c := auxIntToInt64(v_1.AuxInt)
 12383  			v.reset(OpS390XORWconst)
 12384  			v.AuxInt = int32ToAuxInt(int32(c))
 12385  			v.AddArg(x)
 12386  			return true
 12387  		}
 12388  		break
 12389  	}
 12390  	// match: (ORW (SLWconst x [c]) (SRWconst x [32-c]))
 12391  	// result: (RLLconst x [c])
 12392  	for {
 12393  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12394  			if v_0.Op != OpS390XSLWconst {
 12395  				continue
 12396  			}
 12397  			c := auxIntToUint8(v_0.AuxInt)
 12398  			x := v_0.Args[0]
 12399  			if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 32-c || x != v_1.Args[0] {
 12400  				continue
 12401  			}
 12402  			v.reset(OpS390XRLLconst)
 12403  			v.AuxInt = uint8ToAuxInt(c)
 12404  			v.AddArg(x)
 12405  			return true
 12406  		}
 12407  		break
 12408  	}
 12409  	// match: (ORW x x)
 12410  	// result: x
 12411  	for {
 12412  		x := v_0
 12413  		if x != v_1 {
 12414  			break
 12415  		}
 12416  		v.copyOf(x)
 12417  		return true
 12418  	}
 12419  	// match: (ORW <t> x g:(MOVWload [off] {sym} ptr mem))
 12420  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 12421  	// result: (ORWload <t> [off] {sym} x ptr mem)
 12422  	for {
 12423  		t := v.Type
 12424  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12425  			x := v_0
 12426  			g := v_1
 12427  			if g.Op != OpS390XMOVWload {
 12428  				continue
 12429  			}
 12430  			off := auxIntToInt32(g.AuxInt)
 12431  			sym := auxToSym(g.Aux)
 12432  			mem := g.Args[1]
 12433  			ptr := g.Args[0]
 12434  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 12435  				continue
 12436  			}
 12437  			v.reset(OpS390XORWload)
 12438  			v.Type = t
 12439  			v.AuxInt = int32ToAuxInt(off)
 12440  			v.Aux = symToAux(sym)
 12441  			v.AddArg3(x, ptr, mem)
 12442  			return true
 12443  		}
 12444  		break
 12445  	}
 12446  	// match: (ORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 12447  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 12448  	// result: (ORWload <t> [off] {sym} x ptr mem)
 12449  	for {
 12450  		t := v.Type
 12451  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12452  			x := v_0
 12453  			g := v_1
 12454  			if g.Op != OpS390XMOVWZload {
 12455  				continue
 12456  			}
 12457  			off := auxIntToInt32(g.AuxInt)
 12458  			sym := auxToSym(g.Aux)
 12459  			mem := g.Args[1]
 12460  			ptr := g.Args[0]
 12461  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 12462  				continue
 12463  			}
 12464  			v.reset(OpS390XORWload)
 12465  			v.Type = t
 12466  			v.AuxInt = int32ToAuxInt(off)
 12467  			v.Aux = symToAux(sym)
 12468  			v.AddArg3(x, ptr, mem)
 12469  			return true
 12470  		}
 12471  		break
 12472  	}
 12473  	// match: (ORW x1:(MOVBZload [i1] {s} p mem) sh:(SLWconst [8] x0:(MOVBZload [i0] {s} p mem)))
 12474  	// cond: i1 == i0+1 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 12475  	// result: @mergePoint(b,x0,x1) (MOVHZload [i0] {s} p mem)
 12476  	for {
 12477  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12478  			x1 := v_0
 12479  			if x1.Op != OpS390XMOVBZload {
 12480  				continue
 12481  			}
 12482  			i1 := auxIntToInt32(x1.AuxInt)
 12483  			s := auxToSym(x1.Aux)
 12484  			mem := x1.Args[1]
 12485  			p := x1.Args[0]
 12486  			sh := v_1
 12487  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 8 {
 12488  				continue
 12489  			}
 12490  			x0 := sh.Args[0]
 12491  			if x0.Op != OpS390XMOVBZload {
 12492  				continue
 12493  			}
 12494  			i0 := auxIntToInt32(x0.AuxInt)
 12495  			if auxToSym(x0.Aux) != s {
 12496  				continue
 12497  			}
 12498  			_ = x0.Args[1]
 12499  			if p != x0.Args[0] || mem != x0.Args[1] || !(i1 == i0+1 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 12500  				continue
 12501  			}
 12502  			b = mergePoint(b, x0, x1)
 12503  			v0 := b.NewValue0(x0.Pos, OpS390XMOVHZload, typ.UInt16)
 12504  			v.copyOf(v0)
 12505  			v0.AuxInt = int32ToAuxInt(i0)
 12506  			v0.Aux = symToAux(s)
 12507  			v0.AddArg2(p, mem)
 12508  			return true
 12509  		}
 12510  		break
 12511  	}
 12512  	// match: (ORW x1:(MOVHZload [i1] {s} p mem) sh:(SLWconst [16] x0:(MOVHZload [i0] {s} p mem)))
 12513  	// cond: i1 == i0+2 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 12514  	// result: @mergePoint(b,x0,x1) (MOVWZload [i0] {s} p mem)
 12515  	for {
 12516  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12517  			x1 := v_0
 12518  			if x1.Op != OpS390XMOVHZload {
 12519  				continue
 12520  			}
 12521  			i1 := auxIntToInt32(x1.AuxInt)
 12522  			s := auxToSym(x1.Aux)
 12523  			mem := x1.Args[1]
 12524  			p := x1.Args[0]
 12525  			sh := v_1
 12526  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 16 {
 12527  				continue
 12528  			}
 12529  			x0 := sh.Args[0]
 12530  			if x0.Op != OpS390XMOVHZload {
 12531  				continue
 12532  			}
 12533  			i0 := auxIntToInt32(x0.AuxInt)
 12534  			if auxToSym(x0.Aux) != s {
 12535  				continue
 12536  			}
 12537  			_ = x0.Args[1]
 12538  			if p != x0.Args[0] || mem != x0.Args[1] || !(i1 == i0+2 && p.Op != OpSB && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 12539  				continue
 12540  			}
 12541  			b = mergePoint(b, x0, x1)
 12542  			v0 := b.NewValue0(x0.Pos, OpS390XMOVWZload, typ.UInt32)
 12543  			v.copyOf(v0)
 12544  			v0.AuxInt = int32ToAuxInt(i0)
 12545  			v0.Aux = symToAux(s)
 12546  			v0.AddArg2(p, mem)
 12547  			return true
 12548  		}
 12549  		break
 12550  	}
 12551  	// match: (ORW s0:(SLWconst [j0] x0:(MOVBZload [i0] {s} p mem)) or:(ORW s1:(SLWconst [j1] x1:(MOVBZload [i1] {s} p mem)) y))
 12552  	// cond: i1 == i0+1 && j1 == j0-8 && j1 % 16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b,x0,x1,y) != nil && clobber(x0, x1, s0, s1, or)
 12553  	// result: @mergePoint(b,x0,x1,y) (ORW <v.Type> (SLWconst <v.Type> [j1] (MOVHZload [i0] {s} p mem)) y)
 12554  	for {
 12555  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12556  			s0 := v_0
 12557  			if s0.Op != OpS390XSLWconst {
 12558  				continue
 12559  			}
 12560  			j0 := auxIntToUint8(s0.AuxInt)
 12561  			x0 := s0.Args[0]
 12562  			if x0.Op != OpS390XMOVBZload {
 12563  				continue
 12564  			}
 12565  			i0 := auxIntToInt32(x0.AuxInt)
 12566  			s := auxToSym(x0.Aux)
 12567  			mem := x0.Args[1]
 12568  			p := x0.Args[0]
 12569  			or := v_1
 12570  			if or.Op != OpS390XORW {
 12571  				continue
 12572  			}
 12573  			_ = or.Args[1]
 12574  			or_0 := or.Args[0]
 12575  			or_1 := or.Args[1]
 12576  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12577  				s1 := or_0
 12578  				if s1.Op != OpS390XSLWconst {
 12579  					continue
 12580  				}
 12581  				j1 := auxIntToUint8(s1.AuxInt)
 12582  				x1 := s1.Args[0]
 12583  				if x1.Op != OpS390XMOVBZload {
 12584  					continue
 12585  				}
 12586  				i1 := auxIntToInt32(x1.AuxInt)
 12587  				if auxToSym(x1.Aux) != s {
 12588  					continue
 12589  				}
 12590  				_ = x1.Args[1]
 12591  				if p != x1.Args[0] || mem != x1.Args[1] {
 12592  					continue
 12593  				}
 12594  				y := or_1
 12595  				if !(i1 == i0+1 && j1 == j0-8 && j1%16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b, x0, x1, y) != nil && clobber(x0, x1, s0, s1, or)) {
 12596  					continue
 12597  				}
 12598  				b = mergePoint(b, x0, x1, y)
 12599  				v0 := b.NewValue0(x1.Pos, OpS390XORW, v.Type)
 12600  				v.copyOf(v0)
 12601  				v1 := b.NewValue0(x1.Pos, OpS390XSLWconst, v.Type)
 12602  				v1.AuxInt = uint8ToAuxInt(j1)
 12603  				v2 := b.NewValue0(x1.Pos, OpS390XMOVHZload, typ.UInt16)
 12604  				v2.AuxInt = int32ToAuxInt(i0)
 12605  				v2.Aux = symToAux(s)
 12606  				v2.AddArg2(p, mem)
 12607  				v1.AddArg(v2)
 12608  				v0.AddArg2(v1, y)
 12609  				return true
 12610  			}
 12611  		}
 12612  		break
 12613  	}
 12614  	// match: (ORW x0:(MOVBZload [i0] {s} p mem) sh:(SLWconst [8] x1:(MOVBZload [i1] {s} p mem)))
 12615  	// cond: p.Op != OpSB && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, sh)
 12616  	// result: @mergePoint(b,x0,x1) (MOVHZreg (MOVHBRload [i0] {s} p mem))
 12617  	for {
 12618  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12619  			x0 := v_0
 12620  			if x0.Op != OpS390XMOVBZload {
 12621  				continue
 12622  			}
 12623  			i0 := auxIntToInt32(x0.AuxInt)
 12624  			s := auxToSym(x0.Aux)
 12625  			mem := x0.Args[1]
 12626  			p := x0.Args[0]
 12627  			sh := v_1
 12628  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 8 {
 12629  				continue
 12630  			}
 12631  			x1 := sh.Args[0]
 12632  			if x1.Op != OpS390XMOVBZload {
 12633  				continue
 12634  			}
 12635  			i1 := auxIntToInt32(x1.AuxInt)
 12636  			if auxToSym(x1.Aux) != s {
 12637  				continue
 12638  			}
 12639  			_ = x1.Args[1]
 12640  			if p != x1.Args[0] || mem != x1.Args[1] || !(p.Op != OpSB && i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, sh)) {
 12641  				continue
 12642  			}
 12643  			b = mergePoint(b, x0, x1)
 12644  			v0 := b.NewValue0(x1.Pos, OpS390XMOVHZreg, typ.UInt64)
 12645  			v.copyOf(v0)
 12646  			v1 := b.NewValue0(x1.Pos, OpS390XMOVHBRload, typ.UInt16)
 12647  			v1.AuxInt = int32ToAuxInt(i0)
 12648  			v1.Aux = symToAux(s)
 12649  			v1.AddArg2(p, mem)
 12650  			v0.AddArg(v1)
 12651  			return true
 12652  		}
 12653  		break
 12654  	}
 12655  	// match: (ORW r0:(MOVHZreg x0:(MOVHBRload [i0] {s} p mem)) sh:(SLWconst [16] r1:(MOVHZreg x1:(MOVHBRload [i1] {s} p mem))))
 12656  	// cond: i1 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && sh.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, r0, r1, sh)
 12657  	// result: @mergePoint(b,x0,x1) (MOVWBRload [i0] {s} p mem)
 12658  	for {
 12659  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12660  			r0 := v_0
 12661  			if r0.Op != OpS390XMOVHZreg {
 12662  				continue
 12663  			}
 12664  			x0 := r0.Args[0]
 12665  			if x0.Op != OpS390XMOVHBRload {
 12666  				continue
 12667  			}
 12668  			i0 := auxIntToInt32(x0.AuxInt)
 12669  			s := auxToSym(x0.Aux)
 12670  			mem := x0.Args[1]
 12671  			p := x0.Args[0]
 12672  			sh := v_1
 12673  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 16 {
 12674  				continue
 12675  			}
 12676  			r1 := sh.Args[0]
 12677  			if r1.Op != OpS390XMOVHZreg {
 12678  				continue
 12679  			}
 12680  			x1 := r1.Args[0]
 12681  			if x1.Op != OpS390XMOVHBRload {
 12682  				continue
 12683  			}
 12684  			i1 := auxIntToInt32(x1.AuxInt)
 12685  			if auxToSym(x1.Aux) != s {
 12686  				continue
 12687  			}
 12688  			_ = x1.Args[1]
 12689  			if p != x1.Args[0] || mem != x1.Args[1] || !(i1 == i0+2 && x0.Uses == 1 && x1.Uses == 1 && r0.Uses == 1 && r1.Uses == 1 && sh.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, r0, r1, sh)) {
 12690  				continue
 12691  			}
 12692  			b = mergePoint(b, x0, x1)
 12693  			v0 := b.NewValue0(x1.Pos, OpS390XMOVWBRload, typ.UInt32)
 12694  			v.copyOf(v0)
 12695  			v0.AuxInt = int32ToAuxInt(i0)
 12696  			v0.Aux = symToAux(s)
 12697  			v0.AddArg2(p, mem)
 12698  			return true
 12699  		}
 12700  		break
 12701  	}
 12702  	// match: (ORW s1:(SLWconst [j1] x1:(MOVBZload [i1] {s} p mem)) or:(ORW s0:(SLWconst [j0] x0:(MOVBZload [i0] {s} p mem)) y))
 12703  	// cond: p.Op != OpSB && i1 == i0+1 && j1 == j0+8 && j0 % 16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b,x0,x1,y) != nil && clobber(x0, x1, s0, s1, or)
 12704  	// result: @mergePoint(b,x0,x1,y) (ORW <v.Type> (SLWconst <v.Type> [j0] (MOVHZreg (MOVHBRload [i0] {s} p mem))) y)
 12705  	for {
 12706  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12707  			s1 := v_0
 12708  			if s1.Op != OpS390XSLWconst {
 12709  				continue
 12710  			}
 12711  			j1 := auxIntToUint8(s1.AuxInt)
 12712  			x1 := s1.Args[0]
 12713  			if x1.Op != OpS390XMOVBZload {
 12714  				continue
 12715  			}
 12716  			i1 := auxIntToInt32(x1.AuxInt)
 12717  			s := auxToSym(x1.Aux)
 12718  			mem := x1.Args[1]
 12719  			p := x1.Args[0]
 12720  			or := v_1
 12721  			if or.Op != OpS390XORW {
 12722  				continue
 12723  			}
 12724  			_ = or.Args[1]
 12725  			or_0 := or.Args[0]
 12726  			or_1 := or.Args[1]
 12727  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12728  				s0 := or_0
 12729  				if s0.Op != OpS390XSLWconst {
 12730  					continue
 12731  				}
 12732  				j0 := auxIntToUint8(s0.AuxInt)
 12733  				x0 := s0.Args[0]
 12734  				if x0.Op != OpS390XMOVBZload {
 12735  					continue
 12736  				}
 12737  				i0 := auxIntToInt32(x0.AuxInt)
 12738  				if auxToSym(x0.Aux) != s {
 12739  					continue
 12740  				}
 12741  				_ = x0.Args[1]
 12742  				if p != x0.Args[0] || mem != x0.Args[1] {
 12743  					continue
 12744  				}
 12745  				y := or_1
 12746  				if !(p.Op != OpSB && i1 == i0+1 && j1 == j0+8 && j0%16 == 0 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && or.Uses == 1 && mergePoint(b, x0, x1, y) != nil && clobber(x0, x1, s0, s1, or)) {
 12747  					continue
 12748  				}
 12749  				b = mergePoint(b, x0, x1, y)
 12750  				v0 := b.NewValue0(x0.Pos, OpS390XORW, v.Type)
 12751  				v.copyOf(v0)
 12752  				v1 := b.NewValue0(x0.Pos, OpS390XSLWconst, v.Type)
 12753  				v1.AuxInt = uint8ToAuxInt(j0)
 12754  				v2 := b.NewValue0(x0.Pos, OpS390XMOVHZreg, typ.UInt64)
 12755  				v3 := b.NewValue0(x0.Pos, OpS390XMOVHBRload, typ.UInt16)
 12756  				v3.AuxInt = int32ToAuxInt(i0)
 12757  				v3.Aux = symToAux(s)
 12758  				v3.AddArg2(p, mem)
 12759  				v2.AddArg(v3)
 12760  				v1.AddArg(v2)
 12761  				v0.AddArg2(v1, y)
 12762  				return true
 12763  			}
 12764  		}
 12765  		break
 12766  	}
 12767  	return false
 12768  }
 12769  func rewriteValueS390X_OpS390XORWconst(v *Value) bool {
 12770  	v_0 := v.Args[0]
 12771  	// match: (ORWconst [c] x)
 12772  	// cond: int32(c)==0
 12773  	// result: x
 12774  	for {
 12775  		c := auxIntToInt32(v.AuxInt)
 12776  		x := v_0
 12777  		if !(int32(c) == 0) {
 12778  			break
 12779  		}
 12780  		v.copyOf(x)
 12781  		return true
 12782  	}
 12783  	// match: (ORWconst [c] _)
 12784  	// cond: int32(c)==-1
 12785  	// result: (MOVDconst [-1])
 12786  	for {
 12787  		c := auxIntToInt32(v.AuxInt)
 12788  		if !(int32(c) == -1) {
 12789  			break
 12790  		}
 12791  		v.reset(OpS390XMOVDconst)
 12792  		v.AuxInt = int64ToAuxInt(-1)
 12793  		return true
 12794  	}
 12795  	// match: (ORWconst [c] (MOVDconst [d]))
 12796  	// result: (MOVDconst [int64(c)|d])
 12797  	for {
 12798  		c := auxIntToInt32(v.AuxInt)
 12799  		if v_0.Op != OpS390XMOVDconst {
 12800  			break
 12801  		}
 12802  		d := auxIntToInt64(v_0.AuxInt)
 12803  		v.reset(OpS390XMOVDconst)
 12804  		v.AuxInt = int64ToAuxInt(int64(c) | d)
 12805  		return true
 12806  	}
 12807  	return false
 12808  }
 12809  func rewriteValueS390X_OpS390XORWload(v *Value) bool {
 12810  	v_2 := v.Args[2]
 12811  	v_1 := v.Args[1]
 12812  	v_0 := v.Args[0]
 12813  	// match: (ORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 12814  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 12815  	// result: (ORWload [off1+off2] {sym} x ptr mem)
 12816  	for {
 12817  		off1 := auxIntToInt32(v.AuxInt)
 12818  		sym := auxToSym(v.Aux)
 12819  		x := v_0
 12820  		if v_1.Op != OpS390XADDconst {
 12821  			break
 12822  		}
 12823  		off2 := auxIntToInt32(v_1.AuxInt)
 12824  		ptr := v_1.Args[0]
 12825  		mem := v_2
 12826  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 12827  			break
 12828  		}
 12829  		v.reset(OpS390XORWload)
 12830  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12831  		v.Aux = symToAux(sym)
 12832  		v.AddArg3(x, ptr, mem)
 12833  		return true
 12834  	}
 12835  	// match: (ORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 12836  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 12837  	// result: (ORWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 12838  	for {
 12839  		o1 := auxIntToInt32(v.AuxInt)
 12840  		s1 := auxToSym(v.Aux)
 12841  		x := v_0
 12842  		if v_1.Op != OpS390XMOVDaddr {
 12843  			break
 12844  		}
 12845  		o2 := auxIntToInt32(v_1.AuxInt)
 12846  		s2 := auxToSym(v_1.Aux)
 12847  		ptr := v_1.Args[0]
 12848  		mem := v_2
 12849  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 12850  			break
 12851  		}
 12852  		v.reset(OpS390XORWload)
 12853  		v.AuxInt = int32ToAuxInt(o1 + o2)
 12854  		v.Aux = symToAux(mergeSym(s1, s2))
 12855  		v.AddArg3(x, ptr, mem)
 12856  		return true
 12857  	}
 12858  	return false
 12859  }
 12860  func rewriteValueS390X_OpS390XORconst(v *Value) bool {
 12861  	v_0 := v.Args[0]
 12862  	// match: (ORconst [0] x)
 12863  	// result: x
 12864  	for {
 12865  		if auxIntToInt64(v.AuxInt) != 0 {
 12866  			break
 12867  		}
 12868  		x := v_0
 12869  		v.copyOf(x)
 12870  		return true
 12871  	}
 12872  	// match: (ORconst [-1] _)
 12873  	// result: (MOVDconst [-1])
 12874  	for {
 12875  		if auxIntToInt64(v.AuxInt) != -1 {
 12876  			break
 12877  		}
 12878  		v.reset(OpS390XMOVDconst)
 12879  		v.AuxInt = int64ToAuxInt(-1)
 12880  		return true
 12881  	}
 12882  	// match: (ORconst [c] (MOVDconst [d]))
 12883  	// result: (MOVDconst [c|d])
 12884  	for {
 12885  		c := auxIntToInt64(v.AuxInt)
 12886  		if v_0.Op != OpS390XMOVDconst {
 12887  			break
 12888  		}
 12889  		d := auxIntToInt64(v_0.AuxInt)
 12890  		v.reset(OpS390XMOVDconst)
 12891  		v.AuxInt = int64ToAuxInt(c | d)
 12892  		return true
 12893  	}
 12894  	return false
 12895  }
 12896  func rewriteValueS390X_OpS390XORload(v *Value) bool {
 12897  	v_2 := v.Args[2]
 12898  	v_1 := v.Args[1]
 12899  	v_0 := v.Args[0]
 12900  	b := v.Block
 12901  	// match: (ORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 12902  	// cond: isSamePtr(ptr1, ptr2)
 12903  	// result: (OR x (LGDR <t> y))
 12904  	for {
 12905  		t := v.Type
 12906  		off := auxIntToInt32(v.AuxInt)
 12907  		sym := auxToSym(v.Aux)
 12908  		x := v_0
 12909  		ptr1 := v_1
 12910  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 12911  			break
 12912  		}
 12913  		y := v_2.Args[1]
 12914  		ptr2 := v_2.Args[0]
 12915  		if !(isSamePtr(ptr1, ptr2)) {
 12916  			break
 12917  		}
 12918  		v.reset(OpS390XOR)
 12919  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 12920  		v0.AddArg(y)
 12921  		v.AddArg2(x, v0)
 12922  		return true
 12923  	}
 12924  	// match: (ORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 12925  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 12926  	// result: (ORload [off1+off2] {sym} x ptr mem)
 12927  	for {
 12928  		off1 := auxIntToInt32(v.AuxInt)
 12929  		sym := auxToSym(v.Aux)
 12930  		x := v_0
 12931  		if v_1.Op != OpS390XADDconst {
 12932  			break
 12933  		}
 12934  		off2 := auxIntToInt32(v_1.AuxInt)
 12935  		ptr := v_1.Args[0]
 12936  		mem := v_2
 12937  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 12938  			break
 12939  		}
 12940  		v.reset(OpS390XORload)
 12941  		v.AuxInt = int32ToAuxInt(off1 + off2)
 12942  		v.Aux = symToAux(sym)
 12943  		v.AddArg3(x, ptr, mem)
 12944  		return true
 12945  	}
 12946  	// match: (ORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 12947  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 12948  	// result: (ORload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 12949  	for {
 12950  		o1 := auxIntToInt32(v.AuxInt)
 12951  		s1 := auxToSym(v.Aux)
 12952  		x := v_0
 12953  		if v_1.Op != OpS390XMOVDaddr {
 12954  			break
 12955  		}
 12956  		o2 := auxIntToInt32(v_1.AuxInt)
 12957  		s2 := auxToSym(v_1.Aux)
 12958  		ptr := v_1.Args[0]
 12959  		mem := v_2
 12960  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 12961  			break
 12962  		}
 12963  		v.reset(OpS390XORload)
 12964  		v.AuxInt = int32ToAuxInt(o1 + o2)
 12965  		v.Aux = symToAux(mergeSym(s1, s2))
 12966  		v.AddArg3(x, ptr, mem)
 12967  		return true
 12968  	}
 12969  	return false
 12970  }
 12971  func rewriteValueS390X_OpS390XRISBGZ(v *Value) bool {
 12972  	v_0 := v.Args[0]
 12973  	b := v.Block
 12974  	// match: (RISBGZ (MOVWZreg x) {r})
 12975  	// cond: r.InMerge(0xffffffff) != nil
 12976  	// result: (RISBGZ x {*r.InMerge(0xffffffff)})
 12977  	for {
 12978  		r := auxToS390xRotateParams(v.Aux)
 12979  		if v_0.Op != OpS390XMOVWZreg {
 12980  			break
 12981  		}
 12982  		x := v_0.Args[0]
 12983  		if !(r.InMerge(0xffffffff) != nil) {
 12984  			break
 12985  		}
 12986  		v.reset(OpS390XRISBGZ)
 12987  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0xffffffff))
 12988  		v.AddArg(x)
 12989  		return true
 12990  	}
 12991  	// match: (RISBGZ (MOVHZreg x) {r})
 12992  	// cond: r.InMerge(0x0000ffff) != nil
 12993  	// result: (RISBGZ x {*r.InMerge(0x0000ffff)})
 12994  	for {
 12995  		r := auxToS390xRotateParams(v.Aux)
 12996  		if v_0.Op != OpS390XMOVHZreg {
 12997  			break
 12998  		}
 12999  		x := v_0.Args[0]
 13000  		if !(r.InMerge(0x0000ffff) != nil) {
 13001  			break
 13002  		}
 13003  		v.reset(OpS390XRISBGZ)
 13004  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0x0000ffff))
 13005  		v.AddArg(x)
 13006  		return true
 13007  	}
 13008  	// match: (RISBGZ (MOVBZreg x) {r})
 13009  	// cond: r.InMerge(0x000000ff) != nil
 13010  	// result: (RISBGZ x {*r.InMerge(0x000000ff)})
 13011  	for {
 13012  		r := auxToS390xRotateParams(v.Aux)
 13013  		if v_0.Op != OpS390XMOVBZreg {
 13014  			break
 13015  		}
 13016  		x := v_0.Args[0]
 13017  		if !(r.InMerge(0x000000ff) != nil) {
 13018  			break
 13019  		}
 13020  		v.reset(OpS390XRISBGZ)
 13021  		v.Aux = s390xRotateParamsToAux(*r.InMerge(0x000000ff))
 13022  		v.AddArg(x)
 13023  		return true
 13024  	}
 13025  	// match: (RISBGZ (SLDconst x [c]) {r})
 13026  	// cond: r.InMerge(^uint64(0)<<c) != nil
 13027  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)<<c)).RotateLeft(c)})
 13028  	for {
 13029  		r := auxToS390xRotateParams(v.Aux)
 13030  		if v_0.Op != OpS390XSLDconst {
 13031  			break
 13032  		}
 13033  		c := auxIntToUint8(v_0.AuxInt)
 13034  		x := v_0.Args[0]
 13035  		if !(r.InMerge(^uint64(0)<<c) != nil) {
 13036  			break
 13037  		}
 13038  		v.reset(OpS390XRISBGZ)
 13039  		v.Aux = s390xRotateParamsToAux((*r.InMerge(^uint64(0) << c)).RotateLeft(c))
 13040  		v.AddArg(x)
 13041  		return true
 13042  	}
 13043  	// match: (RISBGZ (SRDconst x [c]) {r})
 13044  	// cond: r.InMerge(^uint64(0)>>c) != nil
 13045  	// result: (RISBGZ x {(*r.InMerge(^uint64(0)>>c)).RotateLeft(-c)})
 13046  	for {
 13047  		r := auxToS390xRotateParams(v.Aux)
 13048  		if v_0.Op != OpS390XSRDconst {
 13049  			break
 13050  		}
 13051  		c := auxIntToUint8(v_0.AuxInt)
 13052  		x := v_0.Args[0]
 13053  		if !(r.InMerge(^uint64(0)>>c) != nil) {
 13054  			break
 13055  		}
 13056  		v.reset(OpS390XRISBGZ)
 13057  		v.Aux = s390xRotateParamsToAux((*r.InMerge(^uint64(0) >> c)).RotateLeft(-c))
 13058  		v.AddArg(x)
 13059  		return true
 13060  	}
 13061  	// match: (RISBGZ (RISBGZ x {y}) {z})
 13062  	// cond: z.InMerge(y.OutMask()) != nil
 13063  	// result: (RISBGZ x {(*z.InMerge(y.OutMask())).RotateLeft(y.Amount)})
 13064  	for {
 13065  		z := auxToS390xRotateParams(v.Aux)
 13066  		if v_0.Op != OpS390XRISBGZ {
 13067  			break
 13068  		}
 13069  		y := auxToS390xRotateParams(v_0.Aux)
 13070  		x := v_0.Args[0]
 13071  		if !(z.InMerge(y.OutMask()) != nil) {
 13072  			break
 13073  		}
 13074  		v.reset(OpS390XRISBGZ)
 13075  		v.Aux = s390xRotateParamsToAux((*z.InMerge(y.OutMask())).RotateLeft(y.Amount))
 13076  		v.AddArg(x)
 13077  		return true
 13078  	}
 13079  	// match: (RISBGZ x {r})
 13080  	// cond: r.End == 63 && r.Start == -r.Amount&63
 13081  	// result: (SRDconst x [-r.Amount&63])
 13082  	for {
 13083  		r := auxToS390xRotateParams(v.Aux)
 13084  		x := v_0
 13085  		if !(r.End == 63 && r.Start == -r.Amount&63) {
 13086  			break
 13087  		}
 13088  		v.reset(OpS390XSRDconst)
 13089  		v.AuxInt = uint8ToAuxInt(-r.Amount & 63)
 13090  		v.AddArg(x)
 13091  		return true
 13092  	}
 13093  	// match: (RISBGZ x {r})
 13094  	// cond: r.Start == 0 && r.End == 63-r.Amount
 13095  	// result: (SLDconst x [r.Amount])
 13096  	for {
 13097  		r := auxToS390xRotateParams(v.Aux)
 13098  		x := v_0
 13099  		if !(r.Start == 0 && r.End == 63-r.Amount) {
 13100  			break
 13101  		}
 13102  		v.reset(OpS390XSLDconst)
 13103  		v.AuxInt = uint8ToAuxInt(r.Amount)
 13104  		v.AddArg(x)
 13105  		return true
 13106  	}
 13107  	// match: (RISBGZ (SRADconst x [c]) {r})
 13108  	// cond: r.Start == r.End && (r.Start+r.Amount)&63 <= c
 13109  	// result: (RISBGZ x {s390x.NewRotateParams(r.Start, r.Start, -r.Start&63)})
 13110  	for {
 13111  		r := auxToS390xRotateParams(v.Aux)
 13112  		if v_0.Op != OpS390XSRADconst {
 13113  			break
 13114  		}
 13115  		c := auxIntToUint8(v_0.AuxInt)
 13116  		x := v_0.Args[0]
 13117  		if !(r.Start == r.End && (r.Start+r.Amount)&63 <= c) {
 13118  			break
 13119  		}
 13120  		v.reset(OpS390XRISBGZ)
 13121  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(r.Start, r.Start, -r.Start&63))
 13122  		v.AddArg(x)
 13123  		return true
 13124  	}
 13125  	// match: (RISBGZ x {r})
 13126  	// cond: r == s390x.NewRotateParams(56, 63, 0)
 13127  	// result: (MOVBZreg x)
 13128  	for {
 13129  		r := auxToS390xRotateParams(v.Aux)
 13130  		x := v_0
 13131  		if !(r == s390x.NewRotateParams(56, 63, 0)) {
 13132  			break
 13133  		}
 13134  		v.reset(OpS390XMOVBZreg)
 13135  		v.AddArg(x)
 13136  		return true
 13137  	}
 13138  	// match: (RISBGZ x {r})
 13139  	// cond: r == s390x.NewRotateParams(48, 63, 0)
 13140  	// result: (MOVHZreg x)
 13141  	for {
 13142  		r := auxToS390xRotateParams(v.Aux)
 13143  		x := v_0
 13144  		if !(r == s390x.NewRotateParams(48, 63, 0)) {
 13145  			break
 13146  		}
 13147  		v.reset(OpS390XMOVHZreg)
 13148  		v.AddArg(x)
 13149  		return true
 13150  	}
 13151  	// match: (RISBGZ x {r})
 13152  	// cond: r == s390x.NewRotateParams(32, 63, 0)
 13153  	// result: (MOVWZreg x)
 13154  	for {
 13155  		r := auxToS390xRotateParams(v.Aux)
 13156  		x := v_0
 13157  		if !(r == s390x.NewRotateParams(32, 63, 0)) {
 13158  			break
 13159  		}
 13160  		v.reset(OpS390XMOVWZreg)
 13161  		v.AddArg(x)
 13162  		return true
 13163  	}
 13164  	// match: (RISBGZ (LGDR <t> x) {r})
 13165  	// cond: r == s390x.NewRotateParams(1, 63, 0)
 13166  	// result: (LGDR <t> (LPDFR <x.Type> x))
 13167  	for {
 13168  		r := auxToS390xRotateParams(v.Aux)
 13169  		if v_0.Op != OpS390XLGDR {
 13170  			break
 13171  		}
 13172  		t := v_0.Type
 13173  		x := v_0.Args[0]
 13174  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
 13175  			break
 13176  		}
 13177  		v.reset(OpS390XLGDR)
 13178  		v.Type = t
 13179  		v0 := b.NewValue0(v.Pos, OpS390XLPDFR, x.Type)
 13180  		v0.AddArg(x)
 13181  		v.AddArg(v0)
 13182  		return true
 13183  	}
 13184  	return false
 13185  }
 13186  func rewriteValueS390X_OpS390XRLL(v *Value) bool {
 13187  	v_1 := v.Args[1]
 13188  	v_0 := v.Args[0]
 13189  	// match: (RLL x (MOVDconst [c]))
 13190  	// result: (RLLconst x [uint8(c&31)])
 13191  	for {
 13192  		x := v_0
 13193  		if v_1.Op != OpS390XMOVDconst {
 13194  			break
 13195  		}
 13196  		c := auxIntToInt64(v_1.AuxInt)
 13197  		v.reset(OpS390XRLLconst)
 13198  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 13199  		v.AddArg(x)
 13200  		return true
 13201  	}
 13202  	return false
 13203  }
 13204  func rewriteValueS390X_OpS390XRLLG(v *Value) bool {
 13205  	v_1 := v.Args[1]
 13206  	v_0 := v.Args[0]
 13207  	// match: (RLLG x (MOVDconst [c]))
 13208  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, uint8(c&63))})
 13209  	for {
 13210  		x := v_0
 13211  		if v_1.Op != OpS390XMOVDconst {
 13212  			break
 13213  		}
 13214  		c := auxIntToInt64(v_1.AuxInt)
 13215  		v.reset(OpS390XRISBGZ)
 13216  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, uint8(c&63)))
 13217  		v.AddArg(x)
 13218  		return true
 13219  	}
 13220  	return false
 13221  }
 13222  func rewriteValueS390X_OpS390XSLD(v *Value) bool {
 13223  	v_1 := v.Args[1]
 13224  	v_0 := v.Args[0]
 13225  	b := v.Block
 13226  	typ := &b.Func.Config.Types
 13227  	// match: (SLD x (MOVDconst [c]))
 13228  	// result: (SLDconst x [uint8(c&63)])
 13229  	for {
 13230  		x := v_0
 13231  		if v_1.Op != OpS390XMOVDconst {
 13232  			break
 13233  		}
 13234  		c := auxIntToInt64(v_1.AuxInt)
 13235  		v.reset(OpS390XSLDconst)
 13236  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 13237  		v.AddArg(x)
 13238  		return true
 13239  	}
 13240  	// match: (SLD x (RISBGZ y {r}))
 13241  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13242  	// result: (SLD x y)
 13243  	for {
 13244  		x := v_0
 13245  		if v_1.Op != OpS390XRISBGZ {
 13246  			break
 13247  		}
 13248  		r := auxToS390xRotateParams(v_1.Aux)
 13249  		y := v_1.Args[0]
 13250  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13251  			break
 13252  		}
 13253  		v.reset(OpS390XSLD)
 13254  		v.AddArg2(x, y)
 13255  		return true
 13256  	}
 13257  	// match: (SLD x (AND (MOVDconst [c]) y))
 13258  	// result: (SLD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13259  	for {
 13260  		x := v_0
 13261  		if v_1.Op != OpS390XAND {
 13262  			break
 13263  		}
 13264  		_ = v_1.Args[1]
 13265  		v_1_0 := v_1.Args[0]
 13266  		v_1_1 := v_1.Args[1]
 13267  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13268  			if v_1_0.Op != OpS390XMOVDconst {
 13269  				continue
 13270  			}
 13271  			c := auxIntToInt64(v_1_0.AuxInt)
 13272  			y := v_1_1
 13273  			v.reset(OpS390XSLD)
 13274  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 13275  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 13276  			v0.AddArg(y)
 13277  			v.AddArg2(x, v0)
 13278  			return true
 13279  		}
 13280  		break
 13281  	}
 13282  	// match: (SLD x (ANDWconst [c] y))
 13283  	// cond: c&63 == 63
 13284  	// result: (SLD x y)
 13285  	for {
 13286  		x := v_0
 13287  		if v_1.Op != OpS390XANDWconst {
 13288  			break
 13289  		}
 13290  		c := auxIntToInt32(v_1.AuxInt)
 13291  		y := v_1.Args[0]
 13292  		if !(c&63 == 63) {
 13293  			break
 13294  		}
 13295  		v.reset(OpS390XSLD)
 13296  		v.AddArg2(x, y)
 13297  		return true
 13298  	}
 13299  	// match: (SLD x (MOVWreg y))
 13300  	// result: (SLD x y)
 13301  	for {
 13302  		x := v_0
 13303  		if v_1.Op != OpS390XMOVWreg {
 13304  			break
 13305  		}
 13306  		y := v_1.Args[0]
 13307  		v.reset(OpS390XSLD)
 13308  		v.AddArg2(x, y)
 13309  		return true
 13310  	}
 13311  	// match: (SLD x (MOVHreg y))
 13312  	// result: (SLD x y)
 13313  	for {
 13314  		x := v_0
 13315  		if v_1.Op != OpS390XMOVHreg {
 13316  			break
 13317  		}
 13318  		y := v_1.Args[0]
 13319  		v.reset(OpS390XSLD)
 13320  		v.AddArg2(x, y)
 13321  		return true
 13322  	}
 13323  	// match: (SLD x (MOVBreg y))
 13324  	// result: (SLD x y)
 13325  	for {
 13326  		x := v_0
 13327  		if v_1.Op != OpS390XMOVBreg {
 13328  			break
 13329  		}
 13330  		y := v_1.Args[0]
 13331  		v.reset(OpS390XSLD)
 13332  		v.AddArg2(x, y)
 13333  		return true
 13334  	}
 13335  	// match: (SLD x (MOVWZreg y))
 13336  	// result: (SLD x y)
 13337  	for {
 13338  		x := v_0
 13339  		if v_1.Op != OpS390XMOVWZreg {
 13340  			break
 13341  		}
 13342  		y := v_1.Args[0]
 13343  		v.reset(OpS390XSLD)
 13344  		v.AddArg2(x, y)
 13345  		return true
 13346  	}
 13347  	// match: (SLD x (MOVHZreg y))
 13348  	// result: (SLD x y)
 13349  	for {
 13350  		x := v_0
 13351  		if v_1.Op != OpS390XMOVHZreg {
 13352  			break
 13353  		}
 13354  		y := v_1.Args[0]
 13355  		v.reset(OpS390XSLD)
 13356  		v.AddArg2(x, y)
 13357  		return true
 13358  	}
 13359  	// match: (SLD x (MOVBZreg y))
 13360  	// result: (SLD x y)
 13361  	for {
 13362  		x := v_0
 13363  		if v_1.Op != OpS390XMOVBZreg {
 13364  			break
 13365  		}
 13366  		y := v_1.Args[0]
 13367  		v.reset(OpS390XSLD)
 13368  		v.AddArg2(x, y)
 13369  		return true
 13370  	}
 13371  	return false
 13372  }
 13373  func rewriteValueS390X_OpS390XSLDconst(v *Value) bool {
 13374  	v_0 := v.Args[0]
 13375  	// match: (SLDconst (SRDconst x [c]) [d])
 13376  	// result: (RISBGZ x {s390x.NewRotateParams(uint8(max8(0, int8(c-d))), 63-d, uint8(int8(d-c)&63))})
 13377  	for {
 13378  		d := auxIntToUint8(v.AuxInt)
 13379  		if v_0.Op != OpS390XSRDconst {
 13380  			break
 13381  		}
 13382  		c := auxIntToUint8(v_0.AuxInt)
 13383  		x := v_0.Args[0]
 13384  		v.reset(OpS390XRISBGZ)
 13385  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(uint8(max8(0, int8(c-d))), 63-d, uint8(int8(d-c)&63)))
 13386  		v.AddArg(x)
 13387  		return true
 13388  	}
 13389  	// match: (SLDconst (RISBGZ x {r}) [c])
 13390  	// cond: s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil
 13391  	// result: (RISBGZ x {(*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 13392  	for {
 13393  		c := auxIntToUint8(v.AuxInt)
 13394  		if v_0.Op != OpS390XRISBGZ {
 13395  			break
 13396  		}
 13397  		r := auxToS390xRotateParams(v_0.Aux)
 13398  		x := v_0.Args[0]
 13399  		if !(s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask()) != nil) {
 13400  			break
 13401  		}
 13402  		v.reset(OpS390XRISBGZ)
 13403  		v.Aux = s390xRotateParamsToAux((*s390x.NewRotateParams(0, 63-c, c).InMerge(r.OutMask())).RotateLeft(r.Amount))
 13404  		v.AddArg(x)
 13405  		return true
 13406  	}
 13407  	// match: (SLDconst x [0])
 13408  	// result: x
 13409  	for {
 13410  		if auxIntToUint8(v.AuxInt) != 0 {
 13411  			break
 13412  		}
 13413  		x := v_0
 13414  		v.copyOf(x)
 13415  		return true
 13416  	}
 13417  	return false
 13418  }
 13419  func rewriteValueS390X_OpS390XSLW(v *Value) bool {
 13420  	v_1 := v.Args[1]
 13421  	v_0 := v.Args[0]
 13422  	b := v.Block
 13423  	typ := &b.Func.Config.Types
 13424  	// match: (SLW x (MOVDconst [c]))
 13425  	// cond: c&32 == 0
 13426  	// result: (SLWconst x [uint8(c&31)])
 13427  	for {
 13428  		x := v_0
 13429  		if v_1.Op != OpS390XMOVDconst {
 13430  			break
 13431  		}
 13432  		c := auxIntToInt64(v_1.AuxInt)
 13433  		if !(c&32 == 0) {
 13434  			break
 13435  		}
 13436  		v.reset(OpS390XSLWconst)
 13437  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 13438  		v.AddArg(x)
 13439  		return true
 13440  	}
 13441  	// match: (SLW _ (MOVDconst [c]))
 13442  	// cond: c&32 != 0
 13443  	// result: (MOVDconst [0])
 13444  	for {
 13445  		if v_1.Op != OpS390XMOVDconst {
 13446  			break
 13447  		}
 13448  		c := auxIntToInt64(v_1.AuxInt)
 13449  		if !(c&32 != 0) {
 13450  			break
 13451  		}
 13452  		v.reset(OpS390XMOVDconst)
 13453  		v.AuxInt = int64ToAuxInt(0)
 13454  		return true
 13455  	}
 13456  	// match: (SLW x (RISBGZ y {r}))
 13457  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13458  	// result: (SLW x y)
 13459  	for {
 13460  		x := v_0
 13461  		if v_1.Op != OpS390XRISBGZ {
 13462  			break
 13463  		}
 13464  		r := auxToS390xRotateParams(v_1.Aux)
 13465  		y := v_1.Args[0]
 13466  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13467  			break
 13468  		}
 13469  		v.reset(OpS390XSLW)
 13470  		v.AddArg2(x, y)
 13471  		return true
 13472  	}
 13473  	// match: (SLW x (AND (MOVDconst [c]) y))
 13474  	// result: (SLW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13475  	for {
 13476  		x := v_0
 13477  		if v_1.Op != OpS390XAND {
 13478  			break
 13479  		}
 13480  		_ = v_1.Args[1]
 13481  		v_1_0 := v_1.Args[0]
 13482  		v_1_1 := v_1.Args[1]
 13483  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13484  			if v_1_0.Op != OpS390XMOVDconst {
 13485  				continue
 13486  			}
 13487  			c := auxIntToInt64(v_1_0.AuxInt)
 13488  			y := v_1_1
 13489  			v.reset(OpS390XSLW)
 13490  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 13491  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 13492  			v0.AddArg(y)
 13493  			v.AddArg2(x, v0)
 13494  			return true
 13495  		}
 13496  		break
 13497  	}
 13498  	// match: (SLW x (ANDWconst [c] y))
 13499  	// cond: c&63 == 63
 13500  	// result: (SLW x y)
 13501  	for {
 13502  		x := v_0
 13503  		if v_1.Op != OpS390XANDWconst {
 13504  			break
 13505  		}
 13506  		c := auxIntToInt32(v_1.AuxInt)
 13507  		y := v_1.Args[0]
 13508  		if !(c&63 == 63) {
 13509  			break
 13510  		}
 13511  		v.reset(OpS390XSLW)
 13512  		v.AddArg2(x, y)
 13513  		return true
 13514  	}
 13515  	// match: (SLW x (MOVWreg y))
 13516  	// result: (SLW x y)
 13517  	for {
 13518  		x := v_0
 13519  		if v_1.Op != OpS390XMOVWreg {
 13520  			break
 13521  		}
 13522  		y := v_1.Args[0]
 13523  		v.reset(OpS390XSLW)
 13524  		v.AddArg2(x, y)
 13525  		return true
 13526  	}
 13527  	// match: (SLW x (MOVHreg y))
 13528  	// result: (SLW x y)
 13529  	for {
 13530  		x := v_0
 13531  		if v_1.Op != OpS390XMOVHreg {
 13532  			break
 13533  		}
 13534  		y := v_1.Args[0]
 13535  		v.reset(OpS390XSLW)
 13536  		v.AddArg2(x, y)
 13537  		return true
 13538  	}
 13539  	// match: (SLW x (MOVBreg y))
 13540  	// result: (SLW x y)
 13541  	for {
 13542  		x := v_0
 13543  		if v_1.Op != OpS390XMOVBreg {
 13544  			break
 13545  		}
 13546  		y := v_1.Args[0]
 13547  		v.reset(OpS390XSLW)
 13548  		v.AddArg2(x, y)
 13549  		return true
 13550  	}
 13551  	// match: (SLW x (MOVWZreg y))
 13552  	// result: (SLW x y)
 13553  	for {
 13554  		x := v_0
 13555  		if v_1.Op != OpS390XMOVWZreg {
 13556  			break
 13557  		}
 13558  		y := v_1.Args[0]
 13559  		v.reset(OpS390XSLW)
 13560  		v.AddArg2(x, y)
 13561  		return true
 13562  	}
 13563  	// match: (SLW x (MOVHZreg y))
 13564  	// result: (SLW x y)
 13565  	for {
 13566  		x := v_0
 13567  		if v_1.Op != OpS390XMOVHZreg {
 13568  			break
 13569  		}
 13570  		y := v_1.Args[0]
 13571  		v.reset(OpS390XSLW)
 13572  		v.AddArg2(x, y)
 13573  		return true
 13574  	}
 13575  	// match: (SLW x (MOVBZreg y))
 13576  	// result: (SLW x y)
 13577  	for {
 13578  		x := v_0
 13579  		if v_1.Op != OpS390XMOVBZreg {
 13580  			break
 13581  		}
 13582  		y := v_1.Args[0]
 13583  		v.reset(OpS390XSLW)
 13584  		v.AddArg2(x, y)
 13585  		return true
 13586  	}
 13587  	return false
 13588  }
 13589  func rewriteValueS390X_OpS390XSLWconst(v *Value) bool {
 13590  	v_0 := v.Args[0]
 13591  	// match: (SLWconst x [0])
 13592  	// result: x
 13593  	for {
 13594  		if auxIntToUint8(v.AuxInt) != 0 {
 13595  			break
 13596  		}
 13597  		x := v_0
 13598  		v.copyOf(x)
 13599  		return true
 13600  	}
 13601  	return false
 13602  }
 13603  func rewriteValueS390X_OpS390XSRAD(v *Value) bool {
 13604  	v_1 := v.Args[1]
 13605  	v_0 := v.Args[0]
 13606  	b := v.Block
 13607  	typ := &b.Func.Config.Types
 13608  	// match: (SRAD x (MOVDconst [c]))
 13609  	// result: (SRADconst x [uint8(c&63)])
 13610  	for {
 13611  		x := v_0
 13612  		if v_1.Op != OpS390XMOVDconst {
 13613  			break
 13614  		}
 13615  		c := auxIntToInt64(v_1.AuxInt)
 13616  		v.reset(OpS390XSRADconst)
 13617  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 13618  		v.AddArg(x)
 13619  		return true
 13620  	}
 13621  	// match: (SRAD x (RISBGZ y {r}))
 13622  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13623  	// result: (SRAD x y)
 13624  	for {
 13625  		x := v_0
 13626  		if v_1.Op != OpS390XRISBGZ {
 13627  			break
 13628  		}
 13629  		r := auxToS390xRotateParams(v_1.Aux)
 13630  		y := v_1.Args[0]
 13631  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13632  			break
 13633  		}
 13634  		v.reset(OpS390XSRAD)
 13635  		v.AddArg2(x, y)
 13636  		return true
 13637  	}
 13638  	// match: (SRAD x (AND (MOVDconst [c]) y))
 13639  	// result: (SRAD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13640  	for {
 13641  		x := v_0
 13642  		if v_1.Op != OpS390XAND {
 13643  			break
 13644  		}
 13645  		_ = v_1.Args[1]
 13646  		v_1_0 := v_1.Args[0]
 13647  		v_1_1 := v_1.Args[1]
 13648  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13649  			if v_1_0.Op != OpS390XMOVDconst {
 13650  				continue
 13651  			}
 13652  			c := auxIntToInt64(v_1_0.AuxInt)
 13653  			y := v_1_1
 13654  			v.reset(OpS390XSRAD)
 13655  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 13656  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 13657  			v0.AddArg(y)
 13658  			v.AddArg2(x, v0)
 13659  			return true
 13660  		}
 13661  		break
 13662  	}
 13663  	// match: (SRAD x (ANDWconst [c] y))
 13664  	// cond: c&63 == 63
 13665  	// result: (SRAD x y)
 13666  	for {
 13667  		x := v_0
 13668  		if v_1.Op != OpS390XANDWconst {
 13669  			break
 13670  		}
 13671  		c := auxIntToInt32(v_1.AuxInt)
 13672  		y := v_1.Args[0]
 13673  		if !(c&63 == 63) {
 13674  			break
 13675  		}
 13676  		v.reset(OpS390XSRAD)
 13677  		v.AddArg2(x, y)
 13678  		return true
 13679  	}
 13680  	// match: (SRAD x (MOVWreg y))
 13681  	// result: (SRAD x y)
 13682  	for {
 13683  		x := v_0
 13684  		if v_1.Op != OpS390XMOVWreg {
 13685  			break
 13686  		}
 13687  		y := v_1.Args[0]
 13688  		v.reset(OpS390XSRAD)
 13689  		v.AddArg2(x, y)
 13690  		return true
 13691  	}
 13692  	// match: (SRAD x (MOVHreg y))
 13693  	// result: (SRAD x y)
 13694  	for {
 13695  		x := v_0
 13696  		if v_1.Op != OpS390XMOVHreg {
 13697  			break
 13698  		}
 13699  		y := v_1.Args[0]
 13700  		v.reset(OpS390XSRAD)
 13701  		v.AddArg2(x, y)
 13702  		return true
 13703  	}
 13704  	// match: (SRAD x (MOVBreg y))
 13705  	// result: (SRAD x y)
 13706  	for {
 13707  		x := v_0
 13708  		if v_1.Op != OpS390XMOVBreg {
 13709  			break
 13710  		}
 13711  		y := v_1.Args[0]
 13712  		v.reset(OpS390XSRAD)
 13713  		v.AddArg2(x, y)
 13714  		return true
 13715  	}
 13716  	// match: (SRAD x (MOVWZreg y))
 13717  	// result: (SRAD x y)
 13718  	for {
 13719  		x := v_0
 13720  		if v_1.Op != OpS390XMOVWZreg {
 13721  			break
 13722  		}
 13723  		y := v_1.Args[0]
 13724  		v.reset(OpS390XSRAD)
 13725  		v.AddArg2(x, y)
 13726  		return true
 13727  	}
 13728  	// match: (SRAD x (MOVHZreg y))
 13729  	// result: (SRAD x y)
 13730  	for {
 13731  		x := v_0
 13732  		if v_1.Op != OpS390XMOVHZreg {
 13733  			break
 13734  		}
 13735  		y := v_1.Args[0]
 13736  		v.reset(OpS390XSRAD)
 13737  		v.AddArg2(x, y)
 13738  		return true
 13739  	}
 13740  	// match: (SRAD x (MOVBZreg y))
 13741  	// result: (SRAD x y)
 13742  	for {
 13743  		x := v_0
 13744  		if v_1.Op != OpS390XMOVBZreg {
 13745  			break
 13746  		}
 13747  		y := v_1.Args[0]
 13748  		v.reset(OpS390XSRAD)
 13749  		v.AddArg2(x, y)
 13750  		return true
 13751  	}
 13752  	return false
 13753  }
 13754  func rewriteValueS390X_OpS390XSRADconst(v *Value) bool {
 13755  	v_0 := v.Args[0]
 13756  	// match: (SRADconst x [0])
 13757  	// result: x
 13758  	for {
 13759  		if auxIntToUint8(v.AuxInt) != 0 {
 13760  			break
 13761  		}
 13762  		x := v_0
 13763  		v.copyOf(x)
 13764  		return true
 13765  	}
 13766  	// match: (SRADconst [c] (MOVDconst [d]))
 13767  	// result: (MOVDconst [d>>uint64(c)])
 13768  	for {
 13769  		c := auxIntToUint8(v.AuxInt)
 13770  		if v_0.Op != OpS390XMOVDconst {
 13771  			break
 13772  		}
 13773  		d := auxIntToInt64(v_0.AuxInt)
 13774  		v.reset(OpS390XMOVDconst)
 13775  		v.AuxInt = int64ToAuxInt(d >> uint64(c))
 13776  		return true
 13777  	}
 13778  	return false
 13779  }
 13780  func rewriteValueS390X_OpS390XSRAW(v *Value) bool {
 13781  	v_1 := v.Args[1]
 13782  	v_0 := v.Args[0]
 13783  	b := v.Block
 13784  	typ := &b.Func.Config.Types
 13785  	// match: (SRAW x (MOVDconst [c]))
 13786  	// cond: c&32 == 0
 13787  	// result: (SRAWconst x [uint8(c&31)])
 13788  	for {
 13789  		x := v_0
 13790  		if v_1.Op != OpS390XMOVDconst {
 13791  			break
 13792  		}
 13793  		c := auxIntToInt64(v_1.AuxInt)
 13794  		if !(c&32 == 0) {
 13795  			break
 13796  		}
 13797  		v.reset(OpS390XSRAWconst)
 13798  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 13799  		v.AddArg(x)
 13800  		return true
 13801  	}
 13802  	// match: (SRAW x (MOVDconst [c]))
 13803  	// cond: c&32 != 0
 13804  	// result: (SRAWconst x [31])
 13805  	for {
 13806  		x := v_0
 13807  		if v_1.Op != OpS390XMOVDconst {
 13808  			break
 13809  		}
 13810  		c := auxIntToInt64(v_1.AuxInt)
 13811  		if !(c&32 != 0) {
 13812  			break
 13813  		}
 13814  		v.reset(OpS390XSRAWconst)
 13815  		v.AuxInt = uint8ToAuxInt(31)
 13816  		v.AddArg(x)
 13817  		return true
 13818  	}
 13819  	// match: (SRAW x (RISBGZ y {r}))
 13820  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13821  	// result: (SRAW x y)
 13822  	for {
 13823  		x := v_0
 13824  		if v_1.Op != OpS390XRISBGZ {
 13825  			break
 13826  		}
 13827  		r := auxToS390xRotateParams(v_1.Aux)
 13828  		y := v_1.Args[0]
 13829  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 13830  			break
 13831  		}
 13832  		v.reset(OpS390XSRAW)
 13833  		v.AddArg2(x, y)
 13834  		return true
 13835  	}
 13836  	// match: (SRAW x (AND (MOVDconst [c]) y))
 13837  	// result: (SRAW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 13838  	for {
 13839  		x := v_0
 13840  		if v_1.Op != OpS390XAND {
 13841  			break
 13842  		}
 13843  		_ = v_1.Args[1]
 13844  		v_1_0 := v_1.Args[0]
 13845  		v_1_1 := v_1.Args[1]
 13846  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 13847  			if v_1_0.Op != OpS390XMOVDconst {
 13848  				continue
 13849  			}
 13850  			c := auxIntToInt64(v_1_0.AuxInt)
 13851  			y := v_1_1
 13852  			v.reset(OpS390XSRAW)
 13853  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 13854  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 13855  			v0.AddArg(y)
 13856  			v.AddArg2(x, v0)
 13857  			return true
 13858  		}
 13859  		break
 13860  	}
 13861  	// match: (SRAW x (ANDWconst [c] y))
 13862  	// cond: c&63 == 63
 13863  	// result: (SRAW x y)
 13864  	for {
 13865  		x := v_0
 13866  		if v_1.Op != OpS390XANDWconst {
 13867  			break
 13868  		}
 13869  		c := auxIntToInt32(v_1.AuxInt)
 13870  		y := v_1.Args[0]
 13871  		if !(c&63 == 63) {
 13872  			break
 13873  		}
 13874  		v.reset(OpS390XSRAW)
 13875  		v.AddArg2(x, y)
 13876  		return true
 13877  	}
 13878  	// match: (SRAW x (MOVWreg y))
 13879  	// result: (SRAW x y)
 13880  	for {
 13881  		x := v_0
 13882  		if v_1.Op != OpS390XMOVWreg {
 13883  			break
 13884  		}
 13885  		y := v_1.Args[0]
 13886  		v.reset(OpS390XSRAW)
 13887  		v.AddArg2(x, y)
 13888  		return true
 13889  	}
 13890  	// match: (SRAW x (MOVHreg y))
 13891  	// result: (SRAW x y)
 13892  	for {
 13893  		x := v_0
 13894  		if v_1.Op != OpS390XMOVHreg {
 13895  			break
 13896  		}
 13897  		y := v_1.Args[0]
 13898  		v.reset(OpS390XSRAW)
 13899  		v.AddArg2(x, y)
 13900  		return true
 13901  	}
 13902  	// match: (SRAW x (MOVBreg y))
 13903  	// result: (SRAW x y)
 13904  	for {
 13905  		x := v_0
 13906  		if v_1.Op != OpS390XMOVBreg {
 13907  			break
 13908  		}
 13909  		y := v_1.Args[0]
 13910  		v.reset(OpS390XSRAW)
 13911  		v.AddArg2(x, y)
 13912  		return true
 13913  	}
 13914  	// match: (SRAW x (MOVWZreg y))
 13915  	// result: (SRAW x y)
 13916  	for {
 13917  		x := v_0
 13918  		if v_1.Op != OpS390XMOVWZreg {
 13919  			break
 13920  		}
 13921  		y := v_1.Args[0]
 13922  		v.reset(OpS390XSRAW)
 13923  		v.AddArg2(x, y)
 13924  		return true
 13925  	}
 13926  	// match: (SRAW x (MOVHZreg y))
 13927  	// result: (SRAW x y)
 13928  	for {
 13929  		x := v_0
 13930  		if v_1.Op != OpS390XMOVHZreg {
 13931  			break
 13932  		}
 13933  		y := v_1.Args[0]
 13934  		v.reset(OpS390XSRAW)
 13935  		v.AddArg2(x, y)
 13936  		return true
 13937  	}
 13938  	// match: (SRAW x (MOVBZreg y))
 13939  	// result: (SRAW x y)
 13940  	for {
 13941  		x := v_0
 13942  		if v_1.Op != OpS390XMOVBZreg {
 13943  			break
 13944  		}
 13945  		y := v_1.Args[0]
 13946  		v.reset(OpS390XSRAW)
 13947  		v.AddArg2(x, y)
 13948  		return true
 13949  	}
 13950  	return false
 13951  }
 13952  func rewriteValueS390X_OpS390XSRAWconst(v *Value) bool {
 13953  	v_0 := v.Args[0]
 13954  	// match: (SRAWconst x [0])
 13955  	// result: x
 13956  	for {
 13957  		if auxIntToUint8(v.AuxInt) != 0 {
 13958  			break
 13959  		}
 13960  		x := v_0
 13961  		v.copyOf(x)
 13962  		return true
 13963  	}
 13964  	// match: (SRAWconst [c] (MOVDconst [d]))
 13965  	// result: (MOVDconst [int64(int32(d))>>uint64(c)])
 13966  	for {
 13967  		c := auxIntToUint8(v.AuxInt)
 13968  		if v_0.Op != OpS390XMOVDconst {
 13969  			break
 13970  		}
 13971  		d := auxIntToInt64(v_0.AuxInt)
 13972  		v.reset(OpS390XMOVDconst)
 13973  		v.AuxInt = int64ToAuxInt(int64(int32(d)) >> uint64(c))
 13974  		return true
 13975  	}
 13976  	return false
 13977  }
 13978  func rewriteValueS390X_OpS390XSRD(v *Value) bool {
 13979  	v_1 := v.Args[1]
 13980  	v_0 := v.Args[0]
 13981  	b := v.Block
 13982  	typ := &b.Func.Config.Types
 13983  	// match: (SRD x (MOVDconst [c]))
 13984  	// result: (SRDconst x [uint8(c&63)])
 13985  	for {
 13986  		x := v_0
 13987  		if v_1.Op != OpS390XMOVDconst {
 13988  			break
 13989  		}
 13990  		c := auxIntToInt64(v_1.AuxInt)
 13991  		v.reset(OpS390XSRDconst)
 13992  		v.AuxInt = uint8ToAuxInt(uint8(c & 63))
 13993  		v.AddArg(x)
 13994  		return true
 13995  	}
 13996  	// match: (SRD x (RISBGZ y {r}))
 13997  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 13998  	// result: (SRD x y)
 13999  	for {
 14000  		x := v_0
 14001  		if v_1.Op != OpS390XRISBGZ {
 14002  			break
 14003  		}
 14004  		r := auxToS390xRotateParams(v_1.Aux)
 14005  		y := v_1.Args[0]
 14006  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 14007  			break
 14008  		}
 14009  		v.reset(OpS390XSRD)
 14010  		v.AddArg2(x, y)
 14011  		return true
 14012  	}
 14013  	// match: (SRD x (AND (MOVDconst [c]) y))
 14014  	// result: (SRD x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 14015  	for {
 14016  		x := v_0
 14017  		if v_1.Op != OpS390XAND {
 14018  			break
 14019  		}
 14020  		_ = v_1.Args[1]
 14021  		v_1_0 := v_1.Args[0]
 14022  		v_1_1 := v_1.Args[1]
 14023  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 14024  			if v_1_0.Op != OpS390XMOVDconst {
 14025  				continue
 14026  			}
 14027  			c := auxIntToInt64(v_1_0.AuxInt)
 14028  			y := v_1_1
 14029  			v.reset(OpS390XSRD)
 14030  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 14031  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 14032  			v0.AddArg(y)
 14033  			v.AddArg2(x, v0)
 14034  			return true
 14035  		}
 14036  		break
 14037  	}
 14038  	// match: (SRD x (ANDWconst [c] y))
 14039  	// cond: c&63 == 63
 14040  	// result: (SRD x y)
 14041  	for {
 14042  		x := v_0
 14043  		if v_1.Op != OpS390XANDWconst {
 14044  			break
 14045  		}
 14046  		c := auxIntToInt32(v_1.AuxInt)
 14047  		y := v_1.Args[0]
 14048  		if !(c&63 == 63) {
 14049  			break
 14050  		}
 14051  		v.reset(OpS390XSRD)
 14052  		v.AddArg2(x, y)
 14053  		return true
 14054  	}
 14055  	// match: (SRD x (MOVWreg y))
 14056  	// result: (SRD x y)
 14057  	for {
 14058  		x := v_0
 14059  		if v_1.Op != OpS390XMOVWreg {
 14060  			break
 14061  		}
 14062  		y := v_1.Args[0]
 14063  		v.reset(OpS390XSRD)
 14064  		v.AddArg2(x, y)
 14065  		return true
 14066  	}
 14067  	// match: (SRD x (MOVHreg y))
 14068  	// result: (SRD x y)
 14069  	for {
 14070  		x := v_0
 14071  		if v_1.Op != OpS390XMOVHreg {
 14072  			break
 14073  		}
 14074  		y := v_1.Args[0]
 14075  		v.reset(OpS390XSRD)
 14076  		v.AddArg2(x, y)
 14077  		return true
 14078  	}
 14079  	// match: (SRD x (MOVBreg y))
 14080  	// result: (SRD x y)
 14081  	for {
 14082  		x := v_0
 14083  		if v_1.Op != OpS390XMOVBreg {
 14084  			break
 14085  		}
 14086  		y := v_1.Args[0]
 14087  		v.reset(OpS390XSRD)
 14088  		v.AddArg2(x, y)
 14089  		return true
 14090  	}
 14091  	// match: (SRD x (MOVWZreg y))
 14092  	// result: (SRD x y)
 14093  	for {
 14094  		x := v_0
 14095  		if v_1.Op != OpS390XMOVWZreg {
 14096  			break
 14097  		}
 14098  		y := v_1.Args[0]
 14099  		v.reset(OpS390XSRD)
 14100  		v.AddArg2(x, y)
 14101  		return true
 14102  	}
 14103  	// match: (SRD x (MOVHZreg y))
 14104  	// result: (SRD x y)
 14105  	for {
 14106  		x := v_0
 14107  		if v_1.Op != OpS390XMOVHZreg {
 14108  			break
 14109  		}
 14110  		y := v_1.Args[0]
 14111  		v.reset(OpS390XSRD)
 14112  		v.AddArg2(x, y)
 14113  		return true
 14114  	}
 14115  	// match: (SRD x (MOVBZreg y))
 14116  	// result: (SRD x y)
 14117  	for {
 14118  		x := v_0
 14119  		if v_1.Op != OpS390XMOVBZreg {
 14120  			break
 14121  		}
 14122  		y := v_1.Args[0]
 14123  		v.reset(OpS390XSRD)
 14124  		v.AddArg2(x, y)
 14125  		return true
 14126  	}
 14127  	return false
 14128  }
 14129  func rewriteValueS390X_OpS390XSRDconst(v *Value) bool {
 14130  	v_0 := v.Args[0]
 14131  	// match: (SRDconst (SLDconst x [c]) [d])
 14132  	// result: (RISBGZ x {s390x.NewRotateParams(d, uint8(min8(63, int8(63-c+d))), uint8(int8(c-d)&63))})
 14133  	for {
 14134  		d := auxIntToUint8(v.AuxInt)
 14135  		if v_0.Op != OpS390XSLDconst {
 14136  			break
 14137  		}
 14138  		c := auxIntToUint8(v_0.AuxInt)
 14139  		x := v_0.Args[0]
 14140  		v.reset(OpS390XRISBGZ)
 14141  		v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(d, uint8(min8(63, int8(63-c+d))), uint8(int8(c-d)&63)))
 14142  		v.AddArg(x)
 14143  		return true
 14144  	}
 14145  	// match: (SRDconst (RISBGZ x {r}) [c])
 14146  	// cond: s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil
 14147  	// result: (RISBGZ x {(*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount)})
 14148  	for {
 14149  		c := auxIntToUint8(v.AuxInt)
 14150  		if v_0.Op != OpS390XRISBGZ {
 14151  			break
 14152  		}
 14153  		r := auxToS390xRotateParams(v_0.Aux)
 14154  		x := v_0.Args[0]
 14155  		if !(s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask()) != nil) {
 14156  			break
 14157  		}
 14158  		v.reset(OpS390XRISBGZ)
 14159  		v.Aux = s390xRotateParamsToAux((*s390x.NewRotateParams(c, 63, -c&63).InMerge(r.OutMask())).RotateLeft(r.Amount))
 14160  		v.AddArg(x)
 14161  		return true
 14162  	}
 14163  	// match: (SRDconst x [0])
 14164  	// result: x
 14165  	for {
 14166  		if auxIntToUint8(v.AuxInt) != 0 {
 14167  			break
 14168  		}
 14169  		x := v_0
 14170  		v.copyOf(x)
 14171  		return true
 14172  	}
 14173  	return false
 14174  }
 14175  func rewriteValueS390X_OpS390XSRW(v *Value) bool {
 14176  	v_1 := v.Args[1]
 14177  	v_0 := v.Args[0]
 14178  	b := v.Block
 14179  	typ := &b.Func.Config.Types
 14180  	// match: (SRW x (MOVDconst [c]))
 14181  	// cond: c&32 == 0
 14182  	// result: (SRWconst x [uint8(c&31)])
 14183  	for {
 14184  		x := v_0
 14185  		if v_1.Op != OpS390XMOVDconst {
 14186  			break
 14187  		}
 14188  		c := auxIntToInt64(v_1.AuxInt)
 14189  		if !(c&32 == 0) {
 14190  			break
 14191  		}
 14192  		v.reset(OpS390XSRWconst)
 14193  		v.AuxInt = uint8ToAuxInt(uint8(c & 31))
 14194  		v.AddArg(x)
 14195  		return true
 14196  	}
 14197  	// match: (SRW _ (MOVDconst [c]))
 14198  	// cond: c&32 != 0
 14199  	// result: (MOVDconst [0])
 14200  	for {
 14201  		if v_1.Op != OpS390XMOVDconst {
 14202  			break
 14203  		}
 14204  		c := auxIntToInt64(v_1.AuxInt)
 14205  		if !(c&32 != 0) {
 14206  			break
 14207  		}
 14208  		v.reset(OpS390XMOVDconst)
 14209  		v.AuxInt = int64ToAuxInt(0)
 14210  		return true
 14211  	}
 14212  	// match: (SRW x (RISBGZ y {r}))
 14213  	// cond: r.Amount == 0 && r.OutMask()&63 == 63
 14214  	// result: (SRW x y)
 14215  	for {
 14216  		x := v_0
 14217  		if v_1.Op != OpS390XRISBGZ {
 14218  			break
 14219  		}
 14220  		r := auxToS390xRotateParams(v_1.Aux)
 14221  		y := v_1.Args[0]
 14222  		if !(r.Amount == 0 && r.OutMask()&63 == 63) {
 14223  			break
 14224  		}
 14225  		v.reset(OpS390XSRW)
 14226  		v.AddArg2(x, y)
 14227  		return true
 14228  	}
 14229  	// match: (SRW x (AND (MOVDconst [c]) y))
 14230  	// result: (SRW x (ANDWconst <typ.UInt32> [int32(c&63)] y))
 14231  	for {
 14232  		x := v_0
 14233  		if v_1.Op != OpS390XAND {
 14234  			break
 14235  		}
 14236  		_ = v_1.Args[1]
 14237  		v_1_0 := v_1.Args[0]
 14238  		v_1_1 := v_1.Args[1]
 14239  		for _i0 := 0; _i0 <= 1; _i0, v_1_0, v_1_1 = _i0+1, v_1_1, v_1_0 {
 14240  			if v_1_0.Op != OpS390XMOVDconst {
 14241  				continue
 14242  			}
 14243  			c := auxIntToInt64(v_1_0.AuxInt)
 14244  			y := v_1_1
 14245  			v.reset(OpS390XSRW)
 14246  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
 14247  			v0.AuxInt = int32ToAuxInt(int32(c & 63))
 14248  			v0.AddArg(y)
 14249  			v.AddArg2(x, v0)
 14250  			return true
 14251  		}
 14252  		break
 14253  	}
 14254  	// match: (SRW x (ANDWconst [c] y))
 14255  	// cond: c&63 == 63
 14256  	// result: (SRW x y)
 14257  	for {
 14258  		x := v_0
 14259  		if v_1.Op != OpS390XANDWconst {
 14260  			break
 14261  		}
 14262  		c := auxIntToInt32(v_1.AuxInt)
 14263  		y := v_1.Args[0]
 14264  		if !(c&63 == 63) {
 14265  			break
 14266  		}
 14267  		v.reset(OpS390XSRW)
 14268  		v.AddArg2(x, y)
 14269  		return true
 14270  	}
 14271  	// match: (SRW x (MOVWreg y))
 14272  	// result: (SRW x y)
 14273  	for {
 14274  		x := v_0
 14275  		if v_1.Op != OpS390XMOVWreg {
 14276  			break
 14277  		}
 14278  		y := v_1.Args[0]
 14279  		v.reset(OpS390XSRW)
 14280  		v.AddArg2(x, y)
 14281  		return true
 14282  	}
 14283  	// match: (SRW x (MOVHreg y))
 14284  	// result: (SRW x y)
 14285  	for {
 14286  		x := v_0
 14287  		if v_1.Op != OpS390XMOVHreg {
 14288  			break
 14289  		}
 14290  		y := v_1.Args[0]
 14291  		v.reset(OpS390XSRW)
 14292  		v.AddArg2(x, y)
 14293  		return true
 14294  	}
 14295  	// match: (SRW x (MOVBreg y))
 14296  	// result: (SRW x y)
 14297  	for {
 14298  		x := v_0
 14299  		if v_1.Op != OpS390XMOVBreg {
 14300  			break
 14301  		}
 14302  		y := v_1.Args[0]
 14303  		v.reset(OpS390XSRW)
 14304  		v.AddArg2(x, y)
 14305  		return true
 14306  	}
 14307  	// match: (SRW x (MOVWZreg y))
 14308  	// result: (SRW x y)
 14309  	for {
 14310  		x := v_0
 14311  		if v_1.Op != OpS390XMOVWZreg {
 14312  			break
 14313  		}
 14314  		y := v_1.Args[0]
 14315  		v.reset(OpS390XSRW)
 14316  		v.AddArg2(x, y)
 14317  		return true
 14318  	}
 14319  	// match: (SRW x (MOVHZreg y))
 14320  	// result: (SRW x y)
 14321  	for {
 14322  		x := v_0
 14323  		if v_1.Op != OpS390XMOVHZreg {
 14324  			break
 14325  		}
 14326  		y := v_1.Args[0]
 14327  		v.reset(OpS390XSRW)
 14328  		v.AddArg2(x, y)
 14329  		return true
 14330  	}
 14331  	// match: (SRW x (MOVBZreg y))
 14332  	// result: (SRW x y)
 14333  	for {
 14334  		x := v_0
 14335  		if v_1.Op != OpS390XMOVBZreg {
 14336  			break
 14337  		}
 14338  		y := v_1.Args[0]
 14339  		v.reset(OpS390XSRW)
 14340  		v.AddArg2(x, y)
 14341  		return true
 14342  	}
 14343  	return false
 14344  }
 14345  func rewriteValueS390X_OpS390XSRWconst(v *Value) bool {
 14346  	v_0 := v.Args[0]
 14347  	// match: (SRWconst x [0])
 14348  	// result: x
 14349  	for {
 14350  		if auxIntToUint8(v.AuxInt) != 0 {
 14351  			break
 14352  		}
 14353  		x := v_0
 14354  		v.copyOf(x)
 14355  		return true
 14356  	}
 14357  	return false
 14358  }
 14359  func rewriteValueS390X_OpS390XSTM2(v *Value) bool {
 14360  	v_3 := v.Args[3]
 14361  	v_2 := v.Args[2]
 14362  	v_1 := v.Args[1]
 14363  	v_0 := v.Args[0]
 14364  	// match: (STM2 [i] {s} p w2 w3 x:(STM2 [i-8] {s} p w0 w1 mem))
 14365  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)
 14366  	// result: (STM4 [i-8] {s} p w0 w1 w2 w3 mem)
 14367  	for {
 14368  		i := auxIntToInt32(v.AuxInt)
 14369  		s := auxToSym(v.Aux)
 14370  		p := v_0
 14371  		w2 := v_1
 14372  		w3 := v_2
 14373  		x := v_3
 14374  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 14375  			break
 14376  		}
 14377  		mem := x.Args[3]
 14378  		if p != x.Args[0] {
 14379  			break
 14380  		}
 14381  		w0 := x.Args[1]
 14382  		w1 := x.Args[2]
 14383  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)) {
 14384  			break
 14385  		}
 14386  		v.reset(OpS390XSTM4)
 14387  		v.AuxInt = int32ToAuxInt(i - 8)
 14388  		v.Aux = symToAux(s)
 14389  		v.AddArg6(p, w0, w1, w2, w3, mem)
 14390  		return true
 14391  	}
 14392  	// match: (STM2 [i] {s} p (SRDconst [32] x) x mem)
 14393  	// result: (MOVDstore [i] {s} p x mem)
 14394  	for {
 14395  		i := auxIntToInt32(v.AuxInt)
 14396  		s := auxToSym(v.Aux)
 14397  		p := v_0
 14398  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 14399  			break
 14400  		}
 14401  		x := v_1.Args[0]
 14402  		if x != v_2 {
 14403  			break
 14404  		}
 14405  		mem := v_3
 14406  		v.reset(OpS390XMOVDstore)
 14407  		v.AuxInt = int32ToAuxInt(i)
 14408  		v.Aux = symToAux(s)
 14409  		v.AddArg3(p, x, mem)
 14410  		return true
 14411  	}
 14412  	return false
 14413  }
 14414  func rewriteValueS390X_OpS390XSTMG2(v *Value) bool {
 14415  	v_3 := v.Args[3]
 14416  	v_2 := v.Args[2]
 14417  	v_1 := v.Args[1]
 14418  	v_0 := v.Args[0]
 14419  	// match: (STMG2 [i] {s} p w2 w3 x:(STMG2 [i-16] {s} p w0 w1 mem))
 14420  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && clobber(x)
 14421  	// result: (STMG4 [i-16] {s} p w0 w1 w2 w3 mem)
 14422  	for {
 14423  		i := auxIntToInt32(v.AuxInt)
 14424  		s := auxToSym(v.Aux)
 14425  		p := v_0
 14426  		w2 := v_1
 14427  		w3 := v_2
 14428  		x := v_3
 14429  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
 14430  			break
 14431  		}
 14432  		mem := x.Args[3]
 14433  		if p != x.Args[0] {
 14434  			break
 14435  		}
 14436  		w0 := x.Args[1]
 14437  		w1 := x.Args[2]
 14438  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && clobber(x)) {
 14439  			break
 14440  		}
 14441  		v.reset(OpS390XSTMG4)
 14442  		v.AuxInt = int32ToAuxInt(i - 16)
 14443  		v.Aux = symToAux(s)
 14444  		v.AddArg6(p, w0, w1, w2, w3, mem)
 14445  		return true
 14446  	}
 14447  	return false
 14448  }
 14449  func rewriteValueS390X_OpS390XSUB(v *Value) bool {
 14450  	v_1 := v.Args[1]
 14451  	v_0 := v.Args[0]
 14452  	b := v.Block
 14453  	// match: (SUB x (MOVDconst [c]))
 14454  	// cond: is32Bit(c)
 14455  	// result: (SUBconst x [int32(c)])
 14456  	for {
 14457  		x := v_0
 14458  		if v_1.Op != OpS390XMOVDconst {
 14459  			break
 14460  		}
 14461  		c := auxIntToInt64(v_1.AuxInt)
 14462  		if !(is32Bit(c)) {
 14463  			break
 14464  		}
 14465  		v.reset(OpS390XSUBconst)
 14466  		v.AuxInt = int32ToAuxInt(int32(c))
 14467  		v.AddArg(x)
 14468  		return true
 14469  	}
 14470  	// match: (SUB (MOVDconst [c]) x)
 14471  	// cond: is32Bit(c)
 14472  	// result: (NEG (SUBconst <v.Type> x [int32(c)]))
 14473  	for {
 14474  		if v_0.Op != OpS390XMOVDconst {
 14475  			break
 14476  		}
 14477  		c := auxIntToInt64(v_0.AuxInt)
 14478  		x := v_1
 14479  		if !(is32Bit(c)) {
 14480  			break
 14481  		}
 14482  		v.reset(OpS390XNEG)
 14483  		v0 := b.NewValue0(v.Pos, OpS390XSUBconst, v.Type)
 14484  		v0.AuxInt = int32ToAuxInt(int32(c))
 14485  		v0.AddArg(x)
 14486  		v.AddArg(v0)
 14487  		return true
 14488  	}
 14489  	// match: (SUB x x)
 14490  	// result: (MOVDconst [0])
 14491  	for {
 14492  		x := v_0
 14493  		if x != v_1 {
 14494  			break
 14495  		}
 14496  		v.reset(OpS390XMOVDconst)
 14497  		v.AuxInt = int64ToAuxInt(0)
 14498  		return true
 14499  	}
 14500  	// match: (SUB <t> x g:(MOVDload [off] {sym} ptr mem))
 14501  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 14502  	// result: (SUBload <t> [off] {sym} x ptr mem)
 14503  	for {
 14504  		t := v.Type
 14505  		x := v_0
 14506  		g := v_1
 14507  		if g.Op != OpS390XMOVDload {
 14508  			break
 14509  		}
 14510  		off := auxIntToInt32(g.AuxInt)
 14511  		sym := auxToSym(g.Aux)
 14512  		mem := g.Args[1]
 14513  		ptr := g.Args[0]
 14514  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 14515  			break
 14516  		}
 14517  		v.reset(OpS390XSUBload)
 14518  		v.Type = t
 14519  		v.AuxInt = int32ToAuxInt(off)
 14520  		v.Aux = symToAux(sym)
 14521  		v.AddArg3(x, ptr, mem)
 14522  		return true
 14523  	}
 14524  	return false
 14525  }
 14526  func rewriteValueS390X_OpS390XSUBE(v *Value) bool {
 14527  	v_2 := v.Args[2]
 14528  	v_1 := v.Args[1]
 14529  	v_0 := v.Args[0]
 14530  	// match: (SUBE x y (FlagGT))
 14531  	// result: (SUBC x y)
 14532  	for {
 14533  		x := v_0
 14534  		y := v_1
 14535  		if v_2.Op != OpS390XFlagGT {
 14536  			break
 14537  		}
 14538  		v.reset(OpS390XSUBC)
 14539  		v.AddArg2(x, y)
 14540  		return true
 14541  	}
 14542  	// match: (SUBE x y (FlagOV))
 14543  	// result: (SUBC x y)
 14544  	for {
 14545  		x := v_0
 14546  		y := v_1
 14547  		if v_2.Op != OpS390XFlagOV {
 14548  			break
 14549  		}
 14550  		v.reset(OpS390XSUBC)
 14551  		v.AddArg2(x, y)
 14552  		return true
 14553  	}
 14554  	// match: (SUBE x y (Select1 (SUBC (MOVDconst [0]) (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) c))))))
 14555  	// result: (SUBE x y c)
 14556  	for {
 14557  		x := v_0
 14558  		y := v_1
 14559  		if v_2.Op != OpSelect1 {
 14560  			break
 14561  		}
 14562  		v_2_0 := v_2.Args[0]
 14563  		if v_2_0.Op != OpS390XSUBC {
 14564  			break
 14565  		}
 14566  		_ = v_2_0.Args[1]
 14567  		v_2_0_0 := v_2_0.Args[0]
 14568  		if v_2_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0.AuxInt) != 0 {
 14569  			break
 14570  		}
 14571  		v_2_0_1 := v_2_0.Args[1]
 14572  		if v_2_0_1.Op != OpS390XNEG {
 14573  			break
 14574  		}
 14575  		v_2_0_1_0 := v_2_0_1.Args[0]
 14576  		if v_2_0_1_0.Op != OpSelect0 {
 14577  			break
 14578  		}
 14579  		v_2_0_1_0_0 := v_2_0_1_0.Args[0]
 14580  		if v_2_0_1_0_0.Op != OpS390XSUBE {
 14581  			break
 14582  		}
 14583  		c := v_2_0_1_0_0.Args[2]
 14584  		v_2_0_1_0_0_0 := v_2_0_1_0_0.Args[0]
 14585  		if v_2_0_1_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_0.AuxInt) != 0 {
 14586  			break
 14587  		}
 14588  		v_2_0_1_0_0_1 := v_2_0_1_0_0.Args[1]
 14589  		if v_2_0_1_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_1_0_0_1.AuxInt) != 0 {
 14590  			break
 14591  		}
 14592  		v.reset(OpS390XSUBE)
 14593  		v.AddArg3(x, y, c)
 14594  		return true
 14595  	}
 14596  	return false
 14597  }
 14598  func rewriteValueS390X_OpS390XSUBW(v *Value) bool {
 14599  	v_1 := v.Args[1]
 14600  	v_0 := v.Args[0]
 14601  	b := v.Block
 14602  	// match: (SUBW x (MOVDconst [c]))
 14603  	// result: (SUBWconst x [int32(c)])
 14604  	for {
 14605  		x := v_0
 14606  		if v_1.Op != OpS390XMOVDconst {
 14607  			break
 14608  		}
 14609  		c := auxIntToInt64(v_1.AuxInt)
 14610  		v.reset(OpS390XSUBWconst)
 14611  		v.AuxInt = int32ToAuxInt(int32(c))
 14612  		v.AddArg(x)
 14613  		return true
 14614  	}
 14615  	// match: (SUBW (MOVDconst [c]) x)
 14616  	// result: (NEGW (SUBWconst <v.Type> x [int32(c)]))
 14617  	for {
 14618  		if v_0.Op != OpS390XMOVDconst {
 14619  			break
 14620  		}
 14621  		c := auxIntToInt64(v_0.AuxInt)
 14622  		x := v_1
 14623  		v.reset(OpS390XNEGW)
 14624  		v0 := b.NewValue0(v.Pos, OpS390XSUBWconst, v.Type)
 14625  		v0.AuxInt = int32ToAuxInt(int32(c))
 14626  		v0.AddArg(x)
 14627  		v.AddArg(v0)
 14628  		return true
 14629  	}
 14630  	// match: (SUBW x x)
 14631  	// result: (MOVDconst [0])
 14632  	for {
 14633  		x := v_0
 14634  		if x != v_1 {
 14635  			break
 14636  		}
 14637  		v.reset(OpS390XMOVDconst)
 14638  		v.AuxInt = int64ToAuxInt(0)
 14639  		return true
 14640  	}
 14641  	// match: (SUBW <t> x g:(MOVWload [off] {sym} ptr mem))
 14642  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 14643  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 14644  	for {
 14645  		t := v.Type
 14646  		x := v_0
 14647  		g := v_1
 14648  		if g.Op != OpS390XMOVWload {
 14649  			break
 14650  		}
 14651  		off := auxIntToInt32(g.AuxInt)
 14652  		sym := auxToSym(g.Aux)
 14653  		mem := g.Args[1]
 14654  		ptr := g.Args[0]
 14655  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 14656  			break
 14657  		}
 14658  		v.reset(OpS390XSUBWload)
 14659  		v.Type = t
 14660  		v.AuxInt = int32ToAuxInt(off)
 14661  		v.Aux = symToAux(sym)
 14662  		v.AddArg3(x, ptr, mem)
 14663  		return true
 14664  	}
 14665  	// match: (SUBW <t> x g:(MOVWZload [off] {sym} ptr mem))
 14666  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 14667  	// result: (SUBWload <t> [off] {sym} x ptr mem)
 14668  	for {
 14669  		t := v.Type
 14670  		x := v_0
 14671  		g := v_1
 14672  		if g.Op != OpS390XMOVWZload {
 14673  			break
 14674  		}
 14675  		off := auxIntToInt32(g.AuxInt)
 14676  		sym := auxToSym(g.Aux)
 14677  		mem := g.Args[1]
 14678  		ptr := g.Args[0]
 14679  		if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 14680  			break
 14681  		}
 14682  		v.reset(OpS390XSUBWload)
 14683  		v.Type = t
 14684  		v.AuxInt = int32ToAuxInt(off)
 14685  		v.Aux = symToAux(sym)
 14686  		v.AddArg3(x, ptr, mem)
 14687  		return true
 14688  	}
 14689  	return false
 14690  }
 14691  func rewriteValueS390X_OpS390XSUBWconst(v *Value) bool {
 14692  	v_0 := v.Args[0]
 14693  	// match: (SUBWconst [c] x)
 14694  	// cond: int32(c) == 0
 14695  	// result: x
 14696  	for {
 14697  		c := auxIntToInt32(v.AuxInt)
 14698  		x := v_0
 14699  		if !(int32(c) == 0) {
 14700  			break
 14701  		}
 14702  		v.copyOf(x)
 14703  		return true
 14704  	}
 14705  	// match: (SUBWconst [c] x)
 14706  	// result: (ADDWconst [-int32(c)] x)
 14707  	for {
 14708  		c := auxIntToInt32(v.AuxInt)
 14709  		x := v_0
 14710  		v.reset(OpS390XADDWconst)
 14711  		v.AuxInt = int32ToAuxInt(-int32(c))
 14712  		v.AddArg(x)
 14713  		return true
 14714  	}
 14715  }
 14716  func rewriteValueS390X_OpS390XSUBWload(v *Value) bool {
 14717  	v_2 := v.Args[2]
 14718  	v_1 := v.Args[1]
 14719  	v_0 := v.Args[0]
 14720  	// match: (SUBWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14721  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 14722  	// result: (SUBWload [off1+off2] {sym} x ptr mem)
 14723  	for {
 14724  		off1 := auxIntToInt32(v.AuxInt)
 14725  		sym := auxToSym(v.Aux)
 14726  		x := v_0
 14727  		if v_1.Op != OpS390XADDconst {
 14728  			break
 14729  		}
 14730  		off2 := auxIntToInt32(v_1.AuxInt)
 14731  		ptr := v_1.Args[0]
 14732  		mem := v_2
 14733  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 14734  			break
 14735  		}
 14736  		v.reset(OpS390XSUBWload)
 14737  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14738  		v.Aux = symToAux(sym)
 14739  		v.AddArg3(x, ptr, mem)
 14740  		return true
 14741  	}
 14742  	// match: (SUBWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14743  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 14744  	// result: (SUBWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 14745  	for {
 14746  		o1 := auxIntToInt32(v.AuxInt)
 14747  		s1 := auxToSym(v.Aux)
 14748  		x := v_0
 14749  		if v_1.Op != OpS390XMOVDaddr {
 14750  			break
 14751  		}
 14752  		o2 := auxIntToInt32(v_1.AuxInt)
 14753  		s2 := auxToSym(v_1.Aux)
 14754  		ptr := v_1.Args[0]
 14755  		mem := v_2
 14756  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 14757  			break
 14758  		}
 14759  		v.reset(OpS390XSUBWload)
 14760  		v.AuxInt = int32ToAuxInt(o1 + o2)
 14761  		v.Aux = symToAux(mergeSym(s1, s2))
 14762  		v.AddArg3(x, ptr, mem)
 14763  		return true
 14764  	}
 14765  	return false
 14766  }
 14767  func rewriteValueS390X_OpS390XSUBconst(v *Value) bool {
 14768  	v_0 := v.Args[0]
 14769  	// match: (SUBconst [0] x)
 14770  	// result: x
 14771  	for {
 14772  		if auxIntToInt32(v.AuxInt) != 0 {
 14773  			break
 14774  		}
 14775  		x := v_0
 14776  		v.copyOf(x)
 14777  		return true
 14778  	}
 14779  	// match: (SUBconst [c] x)
 14780  	// cond: c != -(1<<31)
 14781  	// result: (ADDconst [-c] x)
 14782  	for {
 14783  		c := auxIntToInt32(v.AuxInt)
 14784  		x := v_0
 14785  		if !(c != -(1 << 31)) {
 14786  			break
 14787  		}
 14788  		v.reset(OpS390XADDconst)
 14789  		v.AuxInt = int32ToAuxInt(-c)
 14790  		v.AddArg(x)
 14791  		return true
 14792  	}
 14793  	// match: (SUBconst (MOVDconst [d]) [c])
 14794  	// result: (MOVDconst [d-int64(c)])
 14795  	for {
 14796  		c := auxIntToInt32(v.AuxInt)
 14797  		if v_0.Op != OpS390XMOVDconst {
 14798  			break
 14799  		}
 14800  		d := auxIntToInt64(v_0.AuxInt)
 14801  		v.reset(OpS390XMOVDconst)
 14802  		v.AuxInt = int64ToAuxInt(d - int64(c))
 14803  		return true
 14804  	}
 14805  	// match: (SUBconst (SUBconst x [d]) [c])
 14806  	// cond: is32Bit(-int64(c)-int64(d))
 14807  	// result: (ADDconst [-c-d] x)
 14808  	for {
 14809  		c := auxIntToInt32(v.AuxInt)
 14810  		if v_0.Op != OpS390XSUBconst {
 14811  			break
 14812  		}
 14813  		d := auxIntToInt32(v_0.AuxInt)
 14814  		x := v_0.Args[0]
 14815  		if !(is32Bit(-int64(c) - int64(d))) {
 14816  			break
 14817  		}
 14818  		v.reset(OpS390XADDconst)
 14819  		v.AuxInt = int32ToAuxInt(-c - d)
 14820  		v.AddArg(x)
 14821  		return true
 14822  	}
 14823  	return false
 14824  }
 14825  func rewriteValueS390X_OpS390XSUBload(v *Value) bool {
 14826  	v_2 := v.Args[2]
 14827  	v_1 := v.Args[1]
 14828  	v_0 := v.Args[0]
 14829  	b := v.Block
 14830  	// match: (SUBload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 14831  	// cond: isSamePtr(ptr1, ptr2)
 14832  	// result: (SUB x (LGDR <t> y))
 14833  	for {
 14834  		t := v.Type
 14835  		off := auxIntToInt32(v.AuxInt)
 14836  		sym := auxToSym(v.Aux)
 14837  		x := v_0
 14838  		ptr1 := v_1
 14839  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 14840  			break
 14841  		}
 14842  		y := v_2.Args[1]
 14843  		ptr2 := v_2.Args[0]
 14844  		if !(isSamePtr(ptr1, ptr2)) {
 14845  			break
 14846  		}
 14847  		v.reset(OpS390XSUB)
 14848  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 14849  		v0.AddArg(y)
 14850  		v.AddArg2(x, v0)
 14851  		return true
 14852  	}
 14853  	// match: (SUBload [off1] {sym} x (ADDconst [off2] ptr) mem)
 14854  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 14855  	// result: (SUBload [off1+off2] {sym} x ptr mem)
 14856  	for {
 14857  		off1 := auxIntToInt32(v.AuxInt)
 14858  		sym := auxToSym(v.Aux)
 14859  		x := v_0
 14860  		if v_1.Op != OpS390XADDconst {
 14861  			break
 14862  		}
 14863  		off2 := auxIntToInt32(v_1.AuxInt)
 14864  		ptr := v_1.Args[0]
 14865  		mem := v_2
 14866  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 14867  			break
 14868  		}
 14869  		v.reset(OpS390XSUBload)
 14870  		v.AuxInt = int32ToAuxInt(off1 + off2)
 14871  		v.Aux = symToAux(sym)
 14872  		v.AddArg3(x, ptr, mem)
 14873  		return true
 14874  	}
 14875  	// match: (SUBload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 14876  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 14877  	// result: (SUBload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 14878  	for {
 14879  		o1 := auxIntToInt32(v.AuxInt)
 14880  		s1 := auxToSym(v.Aux)
 14881  		x := v_0
 14882  		if v_1.Op != OpS390XMOVDaddr {
 14883  			break
 14884  		}
 14885  		o2 := auxIntToInt32(v_1.AuxInt)
 14886  		s2 := auxToSym(v_1.Aux)
 14887  		ptr := v_1.Args[0]
 14888  		mem := v_2
 14889  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 14890  			break
 14891  		}
 14892  		v.reset(OpS390XSUBload)
 14893  		v.AuxInt = int32ToAuxInt(o1 + o2)
 14894  		v.Aux = symToAux(mergeSym(s1, s2))
 14895  		v.AddArg3(x, ptr, mem)
 14896  		return true
 14897  	}
 14898  	return false
 14899  }
 14900  func rewriteValueS390X_OpS390XSumBytes2(v *Value) bool {
 14901  	v_0 := v.Args[0]
 14902  	b := v.Block
 14903  	typ := &b.Func.Config.Types
 14904  	// match: (SumBytes2 x)
 14905  	// result: (ADDW (SRWconst <typ.UInt8> x [8]) x)
 14906  	for {
 14907  		x := v_0
 14908  		v.reset(OpS390XADDW)
 14909  		v0 := b.NewValue0(v.Pos, OpS390XSRWconst, typ.UInt8)
 14910  		v0.AuxInt = uint8ToAuxInt(8)
 14911  		v0.AddArg(x)
 14912  		v.AddArg2(v0, x)
 14913  		return true
 14914  	}
 14915  }
 14916  func rewriteValueS390X_OpS390XSumBytes4(v *Value) bool {
 14917  	v_0 := v.Args[0]
 14918  	b := v.Block
 14919  	typ := &b.Func.Config.Types
 14920  	// match: (SumBytes4 x)
 14921  	// result: (SumBytes2 (ADDW <typ.UInt16> (SRWconst <typ.UInt16> x [16]) x))
 14922  	for {
 14923  		x := v_0
 14924  		v.reset(OpS390XSumBytes2)
 14925  		v0 := b.NewValue0(v.Pos, OpS390XADDW, typ.UInt16)
 14926  		v1 := b.NewValue0(v.Pos, OpS390XSRWconst, typ.UInt16)
 14927  		v1.AuxInt = uint8ToAuxInt(16)
 14928  		v1.AddArg(x)
 14929  		v0.AddArg2(v1, x)
 14930  		v.AddArg(v0)
 14931  		return true
 14932  	}
 14933  }
 14934  func rewriteValueS390X_OpS390XSumBytes8(v *Value) bool {
 14935  	v_0 := v.Args[0]
 14936  	b := v.Block
 14937  	typ := &b.Func.Config.Types
 14938  	// match: (SumBytes8 x)
 14939  	// result: (SumBytes4 (ADDW <typ.UInt32> (SRDconst <typ.UInt32> x [32]) x))
 14940  	for {
 14941  		x := v_0
 14942  		v.reset(OpS390XSumBytes4)
 14943  		v0 := b.NewValue0(v.Pos, OpS390XADDW, typ.UInt32)
 14944  		v1 := b.NewValue0(v.Pos, OpS390XSRDconst, typ.UInt32)
 14945  		v1.AuxInt = uint8ToAuxInt(32)
 14946  		v1.AddArg(x)
 14947  		v0.AddArg2(v1, x)
 14948  		v.AddArg(v0)
 14949  		return true
 14950  	}
 14951  }
 14952  func rewriteValueS390X_OpS390XXOR(v *Value) bool {
 14953  	v_1 := v.Args[1]
 14954  	v_0 := v.Args[0]
 14955  	// match: (XOR x (MOVDconst [c]))
 14956  	// cond: isU32Bit(c)
 14957  	// result: (XORconst [c] x)
 14958  	for {
 14959  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14960  			x := v_0
 14961  			if v_1.Op != OpS390XMOVDconst {
 14962  				continue
 14963  			}
 14964  			c := auxIntToInt64(v_1.AuxInt)
 14965  			if !(isU32Bit(c)) {
 14966  				continue
 14967  			}
 14968  			v.reset(OpS390XXORconst)
 14969  			v.AuxInt = int64ToAuxInt(c)
 14970  			v.AddArg(x)
 14971  			return true
 14972  		}
 14973  		break
 14974  	}
 14975  	// match: (XOR (SLDconst x [c]) (SRDconst x [64-c]))
 14976  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, c)})
 14977  	for {
 14978  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14979  			if v_0.Op != OpS390XSLDconst {
 14980  				continue
 14981  			}
 14982  			c := auxIntToUint8(v_0.AuxInt)
 14983  			x := v_0.Args[0]
 14984  			if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 64-c || x != v_1.Args[0] {
 14985  				continue
 14986  			}
 14987  			v.reset(OpS390XRISBGZ)
 14988  			v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, c))
 14989  			v.AddArg(x)
 14990  			return true
 14991  		}
 14992  		break
 14993  	}
 14994  	// match: (XOR (MOVDconst [c]) (MOVDconst [d]))
 14995  	// result: (MOVDconst [c^d])
 14996  	for {
 14997  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 14998  			if v_0.Op != OpS390XMOVDconst {
 14999  				continue
 15000  			}
 15001  			c := auxIntToInt64(v_0.AuxInt)
 15002  			if v_1.Op != OpS390XMOVDconst {
 15003  				continue
 15004  			}
 15005  			d := auxIntToInt64(v_1.AuxInt)
 15006  			v.reset(OpS390XMOVDconst)
 15007  			v.AuxInt = int64ToAuxInt(c ^ d)
 15008  			return true
 15009  		}
 15010  		break
 15011  	}
 15012  	// match: (XOR x x)
 15013  	// result: (MOVDconst [0])
 15014  	for {
 15015  		x := v_0
 15016  		if x != v_1 {
 15017  			break
 15018  		}
 15019  		v.reset(OpS390XMOVDconst)
 15020  		v.AuxInt = int64ToAuxInt(0)
 15021  		return true
 15022  	}
 15023  	// match: (XOR <t> x g:(MOVDload [off] {sym} ptr mem))
 15024  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 15025  	// result: (XORload <t> [off] {sym} x ptr mem)
 15026  	for {
 15027  		t := v.Type
 15028  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15029  			x := v_0
 15030  			g := v_1
 15031  			if g.Op != OpS390XMOVDload {
 15032  				continue
 15033  			}
 15034  			off := auxIntToInt32(g.AuxInt)
 15035  			sym := auxToSym(g.Aux)
 15036  			mem := g.Args[1]
 15037  			ptr := g.Args[0]
 15038  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 15039  				continue
 15040  			}
 15041  			v.reset(OpS390XXORload)
 15042  			v.Type = t
 15043  			v.AuxInt = int32ToAuxInt(off)
 15044  			v.Aux = symToAux(sym)
 15045  			v.AddArg3(x, ptr, mem)
 15046  			return true
 15047  		}
 15048  		break
 15049  	}
 15050  	return false
 15051  }
 15052  func rewriteValueS390X_OpS390XXORW(v *Value) bool {
 15053  	v_1 := v.Args[1]
 15054  	v_0 := v.Args[0]
 15055  	// match: (XORW x (MOVDconst [c]))
 15056  	// result: (XORWconst [int32(c)] x)
 15057  	for {
 15058  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15059  			x := v_0
 15060  			if v_1.Op != OpS390XMOVDconst {
 15061  				continue
 15062  			}
 15063  			c := auxIntToInt64(v_1.AuxInt)
 15064  			v.reset(OpS390XXORWconst)
 15065  			v.AuxInt = int32ToAuxInt(int32(c))
 15066  			v.AddArg(x)
 15067  			return true
 15068  		}
 15069  		break
 15070  	}
 15071  	// match: (XORW (SLWconst x [c]) (SRWconst x [32-c]))
 15072  	// result: (RLLconst x [c])
 15073  	for {
 15074  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15075  			if v_0.Op != OpS390XSLWconst {
 15076  				continue
 15077  			}
 15078  			c := auxIntToUint8(v_0.AuxInt)
 15079  			x := v_0.Args[0]
 15080  			if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 32-c || x != v_1.Args[0] {
 15081  				continue
 15082  			}
 15083  			v.reset(OpS390XRLLconst)
 15084  			v.AuxInt = uint8ToAuxInt(c)
 15085  			v.AddArg(x)
 15086  			return true
 15087  		}
 15088  		break
 15089  	}
 15090  	// match: (XORW x x)
 15091  	// result: (MOVDconst [0])
 15092  	for {
 15093  		x := v_0
 15094  		if x != v_1 {
 15095  			break
 15096  		}
 15097  		v.reset(OpS390XMOVDconst)
 15098  		v.AuxInt = int64ToAuxInt(0)
 15099  		return true
 15100  	}
 15101  	// match: (XORW <t> x g:(MOVWload [off] {sym} ptr mem))
 15102  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 15103  	// result: (XORWload <t> [off] {sym} x ptr mem)
 15104  	for {
 15105  		t := v.Type
 15106  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15107  			x := v_0
 15108  			g := v_1
 15109  			if g.Op != OpS390XMOVWload {
 15110  				continue
 15111  			}
 15112  			off := auxIntToInt32(g.AuxInt)
 15113  			sym := auxToSym(g.Aux)
 15114  			mem := g.Args[1]
 15115  			ptr := g.Args[0]
 15116  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 15117  				continue
 15118  			}
 15119  			v.reset(OpS390XXORWload)
 15120  			v.Type = t
 15121  			v.AuxInt = int32ToAuxInt(off)
 15122  			v.Aux = symToAux(sym)
 15123  			v.AddArg3(x, ptr, mem)
 15124  			return true
 15125  		}
 15126  		break
 15127  	}
 15128  	// match: (XORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 15129  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 15130  	// result: (XORWload <t> [off] {sym} x ptr mem)
 15131  	for {
 15132  		t := v.Type
 15133  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 15134  			x := v_0
 15135  			g := v_1
 15136  			if g.Op != OpS390XMOVWZload {
 15137  				continue
 15138  			}
 15139  			off := auxIntToInt32(g.AuxInt)
 15140  			sym := auxToSym(g.Aux)
 15141  			mem := g.Args[1]
 15142  			ptr := g.Args[0]
 15143  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 15144  				continue
 15145  			}
 15146  			v.reset(OpS390XXORWload)
 15147  			v.Type = t
 15148  			v.AuxInt = int32ToAuxInt(off)
 15149  			v.Aux = symToAux(sym)
 15150  			v.AddArg3(x, ptr, mem)
 15151  			return true
 15152  		}
 15153  		break
 15154  	}
 15155  	return false
 15156  }
 15157  func rewriteValueS390X_OpS390XXORWconst(v *Value) bool {
 15158  	v_0 := v.Args[0]
 15159  	// match: (XORWconst [c] x)
 15160  	// cond: int32(c)==0
 15161  	// result: x
 15162  	for {
 15163  		c := auxIntToInt32(v.AuxInt)
 15164  		x := v_0
 15165  		if !(int32(c) == 0) {
 15166  			break
 15167  		}
 15168  		v.copyOf(x)
 15169  		return true
 15170  	}
 15171  	// match: (XORWconst [c] (MOVDconst [d]))
 15172  	// result: (MOVDconst [int64(c)^d])
 15173  	for {
 15174  		c := auxIntToInt32(v.AuxInt)
 15175  		if v_0.Op != OpS390XMOVDconst {
 15176  			break
 15177  		}
 15178  		d := auxIntToInt64(v_0.AuxInt)
 15179  		v.reset(OpS390XMOVDconst)
 15180  		v.AuxInt = int64ToAuxInt(int64(c) ^ d)
 15181  		return true
 15182  	}
 15183  	return false
 15184  }
 15185  func rewriteValueS390X_OpS390XXORWload(v *Value) bool {
 15186  	v_2 := v.Args[2]
 15187  	v_1 := v.Args[1]
 15188  	v_0 := v.Args[0]
 15189  	// match: (XORWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 15190  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 15191  	// result: (XORWload [off1+off2] {sym} x ptr mem)
 15192  	for {
 15193  		off1 := auxIntToInt32(v.AuxInt)
 15194  		sym := auxToSym(v.Aux)
 15195  		x := v_0
 15196  		if v_1.Op != OpS390XADDconst {
 15197  			break
 15198  		}
 15199  		off2 := auxIntToInt32(v_1.AuxInt)
 15200  		ptr := v_1.Args[0]
 15201  		mem := v_2
 15202  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 15203  			break
 15204  		}
 15205  		v.reset(OpS390XXORWload)
 15206  		v.AuxInt = int32ToAuxInt(off1 + off2)
 15207  		v.Aux = symToAux(sym)
 15208  		v.AddArg3(x, ptr, mem)
 15209  		return true
 15210  	}
 15211  	// match: (XORWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 15212  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 15213  	// result: (XORWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 15214  	for {
 15215  		o1 := auxIntToInt32(v.AuxInt)
 15216  		s1 := auxToSym(v.Aux)
 15217  		x := v_0
 15218  		if v_1.Op != OpS390XMOVDaddr {
 15219  			break
 15220  		}
 15221  		o2 := auxIntToInt32(v_1.AuxInt)
 15222  		s2 := auxToSym(v_1.Aux)
 15223  		ptr := v_1.Args[0]
 15224  		mem := v_2
 15225  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 15226  			break
 15227  		}
 15228  		v.reset(OpS390XXORWload)
 15229  		v.AuxInt = int32ToAuxInt(o1 + o2)
 15230  		v.Aux = symToAux(mergeSym(s1, s2))
 15231  		v.AddArg3(x, ptr, mem)
 15232  		return true
 15233  	}
 15234  	return false
 15235  }
 15236  func rewriteValueS390X_OpS390XXORconst(v *Value) bool {
 15237  	v_0 := v.Args[0]
 15238  	// match: (XORconst [0] x)
 15239  	// result: x
 15240  	for {
 15241  		if auxIntToInt64(v.AuxInt) != 0 {
 15242  			break
 15243  		}
 15244  		x := v_0
 15245  		v.copyOf(x)
 15246  		return true
 15247  	}
 15248  	// match: (XORconst [c] (MOVDconst [d]))
 15249  	// result: (MOVDconst [c^d])
 15250  	for {
 15251  		c := auxIntToInt64(v.AuxInt)
 15252  		if v_0.Op != OpS390XMOVDconst {
 15253  			break
 15254  		}
 15255  		d := auxIntToInt64(v_0.AuxInt)
 15256  		v.reset(OpS390XMOVDconst)
 15257  		v.AuxInt = int64ToAuxInt(c ^ d)
 15258  		return true
 15259  	}
 15260  	return false
 15261  }
 15262  func rewriteValueS390X_OpS390XXORload(v *Value) bool {
 15263  	v_2 := v.Args[2]
 15264  	v_1 := v.Args[1]
 15265  	v_0 := v.Args[0]
 15266  	b := v.Block
 15267  	// match: (XORload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 15268  	// cond: isSamePtr(ptr1, ptr2)
 15269  	// result: (XOR x (LGDR <t> y))
 15270  	for {
 15271  		t := v.Type
 15272  		off := auxIntToInt32(v.AuxInt)
 15273  		sym := auxToSym(v.Aux)
 15274  		x := v_0
 15275  		ptr1 := v_1
 15276  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 15277  			break
 15278  		}
 15279  		y := v_2.Args[1]
 15280  		ptr2 := v_2.Args[0]
 15281  		if !(isSamePtr(ptr1, ptr2)) {
 15282  			break
 15283  		}
 15284  		v.reset(OpS390XXOR)
 15285  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 15286  		v0.AddArg(y)
 15287  		v.AddArg2(x, v0)
 15288  		return true
 15289  	}
 15290  	// match: (XORload [off1] {sym} x (ADDconst [off2] ptr) mem)
 15291  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 15292  	// result: (XORload [off1+off2] {sym} x ptr mem)
 15293  	for {
 15294  		off1 := auxIntToInt32(v.AuxInt)
 15295  		sym := auxToSym(v.Aux)
 15296  		x := v_0
 15297  		if v_1.Op != OpS390XADDconst {
 15298  			break
 15299  		}
 15300  		off2 := auxIntToInt32(v_1.AuxInt)
 15301  		ptr := v_1.Args[0]
 15302  		mem := v_2
 15303  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 15304  			break
 15305  		}
 15306  		v.reset(OpS390XXORload)
 15307  		v.AuxInt = int32ToAuxInt(off1 + off2)
 15308  		v.Aux = symToAux(sym)
 15309  		v.AddArg3(x, ptr, mem)
 15310  		return true
 15311  	}
 15312  	// match: (XORload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 15313  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 15314  	// result: (XORload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 15315  	for {
 15316  		o1 := auxIntToInt32(v.AuxInt)
 15317  		s1 := auxToSym(v.Aux)
 15318  		x := v_0
 15319  		if v_1.Op != OpS390XMOVDaddr {
 15320  			break
 15321  		}
 15322  		o2 := auxIntToInt32(v_1.AuxInt)
 15323  		s2 := auxToSym(v_1.Aux)
 15324  		ptr := v_1.Args[0]
 15325  		mem := v_2
 15326  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 15327  			break
 15328  		}
 15329  		v.reset(OpS390XXORload)
 15330  		v.AuxInt = int32ToAuxInt(o1 + o2)
 15331  		v.Aux = symToAux(mergeSym(s1, s2))
 15332  		v.AddArg3(x, ptr, mem)
 15333  		return true
 15334  	}
 15335  	return false
 15336  }
 15337  func rewriteValueS390X_OpSelect0(v *Value) bool {
 15338  	v_0 := v.Args[0]
 15339  	b := v.Block
 15340  	typ := &b.Func.Config.Types
 15341  	// match: (Select0 (Add64carry x y c))
 15342  	// result: (Select0 <typ.UInt64> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))
 15343  	for {
 15344  		if v_0.Op != OpAdd64carry {
 15345  			break
 15346  		}
 15347  		c := v_0.Args[2]
 15348  		x := v_0.Args[0]
 15349  		y := v_0.Args[1]
 15350  		v.reset(OpSelect0)
 15351  		v.Type = typ.UInt64
 15352  		v0 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 15353  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 15354  		v2 := b.NewValue0(v.Pos, OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 15355  		v2.AuxInt = int16ToAuxInt(-1)
 15356  		v2.AddArg(c)
 15357  		v1.AddArg(v2)
 15358  		v0.AddArg3(x, y, v1)
 15359  		v.AddArg(v0)
 15360  		return true
 15361  	}
 15362  	// match: (Select0 (Sub64borrow x y c))
 15363  	// result: (Select0 <typ.UInt64> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c))))
 15364  	for {
 15365  		if v_0.Op != OpSub64borrow {
 15366  			break
 15367  		}
 15368  		c := v_0.Args[2]
 15369  		x := v_0.Args[0]
 15370  		y := v_0.Args[1]
 15371  		v.reset(OpSelect0)
 15372  		v.Type = typ.UInt64
 15373  		v0 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 15374  		v1 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 15375  		v2 := b.NewValue0(v.Pos, OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 15376  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 15377  		v3.AuxInt = int64ToAuxInt(0)
 15378  		v2.AddArg2(v3, c)
 15379  		v1.AddArg(v2)
 15380  		v0.AddArg3(x, y, v1)
 15381  		v.AddArg(v0)
 15382  		return true
 15383  	}
 15384  	// match: (Select0 <t> (AddTupleFirst32 val tuple))
 15385  	// result: (ADDW val (Select0 <t> tuple))
 15386  	for {
 15387  		t := v.Type
 15388  		if v_0.Op != OpS390XAddTupleFirst32 {
 15389  			break
 15390  		}
 15391  		tuple := v_0.Args[1]
 15392  		val := v_0.Args[0]
 15393  		v.reset(OpS390XADDW)
 15394  		v0 := b.NewValue0(v.Pos, OpSelect0, t)
 15395  		v0.AddArg(tuple)
 15396  		v.AddArg2(val, v0)
 15397  		return true
 15398  	}
 15399  	// match: (Select0 <t> (AddTupleFirst64 val tuple))
 15400  	// result: (ADD val (Select0 <t> tuple))
 15401  	for {
 15402  		t := v.Type
 15403  		if v_0.Op != OpS390XAddTupleFirst64 {
 15404  			break
 15405  		}
 15406  		tuple := v_0.Args[1]
 15407  		val := v_0.Args[0]
 15408  		v.reset(OpS390XADD)
 15409  		v0 := b.NewValue0(v.Pos, OpSelect0, t)
 15410  		v0.AddArg(tuple)
 15411  		v.AddArg2(val, v0)
 15412  		return true
 15413  	}
 15414  	// match: (Select0 (ADDCconst (MOVDconst [c]) [d]))
 15415  	// result: (MOVDconst [c+int64(d)])
 15416  	for {
 15417  		if v_0.Op != OpS390XADDCconst {
 15418  			break
 15419  		}
 15420  		d := auxIntToInt16(v_0.AuxInt)
 15421  		v_0_0 := v_0.Args[0]
 15422  		if v_0_0.Op != OpS390XMOVDconst {
 15423  			break
 15424  		}
 15425  		c := auxIntToInt64(v_0_0.AuxInt)
 15426  		v.reset(OpS390XMOVDconst)
 15427  		v.AuxInt = int64ToAuxInt(c + int64(d))
 15428  		return true
 15429  	}
 15430  	// match: (Select0 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 15431  	// result: (MOVDconst [c-d])
 15432  	for {
 15433  		if v_0.Op != OpS390XSUBC {
 15434  			break
 15435  		}
 15436  		_ = v_0.Args[1]
 15437  		v_0_0 := v_0.Args[0]
 15438  		if v_0_0.Op != OpS390XMOVDconst {
 15439  			break
 15440  		}
 15441  		c := auxIntToInt64(v_0_0.AuxInt)
 15442  		v_0_1 := v_0.Args[1]
 15443  		if v_0_1.Op != OpS390XMOVDconst {
 15444  			break
 15445  		}
 15446  		d := auxIntToInt64(v_0_1.AuxInt)
 15447  		v.reset(OpS390XMOVDconst)
 15448  		v.AuxInt = int64ToAuxInt(c - d)
 15449  		return true
 15450  	}
 15451  	// match: (Select0 (FADD (FMUL y z) x))
 15452  	// result: (FMADD x y z)
 15453  	for {
 15454  		if v_0.Op != OpS390XFADD {
 15455  			break
 15456  		}
 15457  		_ = v_0.Args[1]
 15458  		v_0_0 := v_0.Args[0]
 15459  		v_0_1 := v_0.Args[1]
 15460  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 15461  			if v_0_0.Op != OpS390XFMUL {
 15462  				continue
 15463  			}
 15464  			z := v_0_0.Args[1]
 15465  			y := v_0_0.Args[0]
 15466  			x := v_0_1
 15467  			v.reset(OpS390XFMADD)
 15468  			v.AddArg3(x, y, z)
 15469  			return true
 15470  		}
 15471  		break
 15472  	}
 15473  	// match: (Select0 (FSUB (FMUL y z) x))
 15474  	// result: (FMSUB x y z)
 15475  	for {
 15476  		if v_0.Op != OpS390XFSUB {
 15477  			break
 15478  		}
 15479  		x := v_0.Args[1]
 15480  		v_0_0 := v_0.Args[0]
 15481  		if v_0_0.Op != OpS390XFMUL {
 15482  			break
 15483  		}
 15484  		z := v_0_0.Args[1]
 15485  		y := v_0_0.Args[0]
 15486  		v.reset(OpS390XFMSUB)
 15487  		v.AddArg3(x, y, z)
 15488  		return true
 15489  	}
 15490  	// match: (Select0 (FADDS (FMULS y z) x))
 15491  	// result: (FMADDS x y z)
 15492  	for {
 15493  		if v_0.Op != OpS390XFADDS {
 15494  			break
 15495  		}
 15496  		_ = v_0.Args[1]
 15497  		v_0_0 := v_0.Args[0]
 15498  		v_0_1 := v_0.Args[1]
 15499  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
 15500  			if v_0_0.Op != OpS390XFMULS {
 15501  				continue
 15502  			}
 15503  			z := v_0_0.Args[1]
 15504  			y := v_0_0.Args[0]
 15505  			x := v_0_1
 15506  			v.reset(OpS390XFMADDS)
 15507  			v.AddArg3(x, y, z)
 15508  			return true
 15509  		}
 15510  		break
 15511  	}
 15512  	// match: (Select0 (FSUBS (FMULS y z) x))
 15513  	// result: (FMSUBS x y z)
 15514  	for {
 15515  		if v_0.Op != OpS390XFSUBS {
 15516  			break
 15517  		}
 15518  		x := v_0.Args[1]
 15519  		v_0_0 := v_0.Args[0]
 15520  		if v_0_0.Op != OpS390XFMULS {
 15521  			break
 15522  		}
 15523  		z := v_0_0.Args[1]
 15524  		y := v_0_0.Args[0]
 15525  		v.reset(OpS390XFMSUBS)
 15526  		v.AddArg3(x, y, z)
 15527  		return true
 15528  	}
 15529  	return false
 15530  }
 15531  func rewriteValueS390X_OpSelect1(v *Value) bool {
 15532  	v_0 := v.Args[0]
 15533  	b := v.Block
 15534  	typ := &b.Func.Config.Types
 15535  	// match: (Select1 (Add64carry x y c))
 15536  	// result: (Select0 <typ.UInt64> (ADDE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (ADDE x y (Select1 <types.TypeFlags> (ADDCconst c [-1]))))))
 15537  	for {
 15538  		if v_0.Op != OpAdd64carry {
 15539  			break
 15540  		}
 15541  		c := v_0.Args[2]
 15542  		x := v_0.Args[0]
 15543  		y := v_0.Args[1]
 15544  		v.reset(OpSelect0)
 15545  		v.Type = typ.UInt64
 15546  		v0 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 15547  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 15548  		v1.AuxInt = int64ToAuxInt(0)
 15549  		v2 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 15550  		v3 := b.NewValue0(v.Pos, OpS390XADDE, types.NewTuple(typ.UInt64, types.TypeFlags))
 15551  		v4 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 15552  		v5 := b.NewValue0(v.Pos, OpS390XADDCconst, types.NewTuple(typ.UInt64, types.TypeFlags))
 15553  		v5.AuxInt = int16ToAuxInt(-1)
 15554  		v5.AddArg(c)
 15555  		v4.AddArg(v5)
 15556  		v3.AddArg3(x, y, v4)
 15557  		v2.AddArg(v3)
 15558  		v0.AddArg3(v1, v1, v2)
 15559  		v.AddArg(v0)
 15560  		return true
 15561  	}
 15562  	// match: (Select1 (Sub64borrow x y c))
 15563  	// result: (NEG (Select0 <typ.UInt64> (SUBE (MOVDconst [0]) (MOVDconst [0]) (Select1 <types.TypeFlags> (SUBE x y (Select1 <types.TypeFlags> (SUBC (MOVDconst [0]) c)))))))
 15564  	for {
 15565  		if v_0.Op != OpSub64borrow {
 15566  			break
 15567  		}
 15568  		c := v_0.Args[2]
 15569  		x := v_0.Args[0]
 15570  		y := v_0.Args[1]
 15571  		v.reset(OpS390XNEG)
 15572  		v0 := b.NewValue0(v.Pos, OpSelect0, typ.UInt64)
 15573  		v1 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 15574  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 15575  		v2.AuxInt = int64ToAuxInt(0)
 15576  		v3 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 15577  		v4 := b.NewValue0(v.Pos, OpS390XSUBE, types.NewTuple(typ.UInt64, types.TypeFlags))
 15578  		v5 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 15579  		v6 := b.NewValue0(v.Pos, OpS390XSUBC, types.NewTuple(typ.UInt64, types.TypeFlags))
 15580  		v6.AddArg2(v2, c)
 15581  		v5.AddArg(v6)
 15582  		v4.AddArg3(x, y, v5)
 15583  		v3.AddArg(v4)
 15584  		v1.AddArg3(v2, v2, v3)
 15585  		v0.AddArg(v1)
 15586  		v.AddArg(v0)
 15587  		return true
 15588  	}
 15589  	// match: (Select1 (AddTupleFirst32 _ tuple))
 15590  	// result: (Select1 tuple)
 15591  	for {
 15592  		if v_0.Op != OpS390XAddTupleFirst32 {
 15593  			break
 15594  		}
 15595  		tuple := v_0.Args[1]
 15596  		v.reset(OpSelect1)
 15597  		v.AddArg(tuple)
 15598  		return true
 15599  	}
 15600  	// match: (Select1 (AddTupleFirst64 _ tuple))
 15601  	// result: (Select1 tuple)
 15602  	for {
 15603  		if v_0.Op != OpS390XAddTupleFirst64 {
 15604  			break
 15605  		}
 15606  		tuple := v_0.Args[1]
 15607  		v.reset(OpSelect1)
 15608  		v.AddArg(tuple)
 15609  		return true
 15610  	}
 15611  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 15612  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0
 15613  	// result: (FlagEQ)
 15614  	for {
 15615  		if v_0.Op != OpS390XADDCconst {
 15616  			break
 15617  		}
 15618  		d := auxIntToInt16(v_0.AuxInt)
 15619  		v_0_0 := v_0.Args[0]
 15620  		if v_0_0.Op != OpS390XMOVDconst {
 15621  			break
 15622  		}
 15623  		c := auxIntToInt64(v_0_0.AuxInt)
 15624  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) == 0) {
 15625  			break
 15626  		}
 15627  		v.reset(OpS390XFlagEQ)
 15628  		return true
 15629  	}
 15630  	// match: (Select1 (ADDCconst (MOVDconst [c]) [d]))
 15631  	// cond: uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0
 15632  	// result: (FlagLT)
 15633  	for {
 15634  		if v_0.Op != OpS390XADDCconst {
 15635  			break
 15636  		}
 15637  		d := auxIntToInt16(v_0.AuxInt)
 15638  		v_0_0 := v_0.Args[0]
 15639  		if v_0_0.Op != OpS390XMOVDconst {
 15640  			break
 15641  		}
 15642  		c := auxIntToInt64(v_0_0.AuxInt)
 15643  		if !(uint64(c+int64(d)) >= uint64(c) && c+int64(d) != 0) {
 15644  			break
 15645  		}
 15646  		v.reset(OpS390XFlagLT)
 15647  		return true
 15648  	}
 15649  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 15650  	// cond: uint64(d) <= uint64(c) && c-d == 0
 15651  	// result: (FlagGT)
 15652  	for {
 15653  		if v_0.Op != OpS390XSUBC {
 15654  			break
 15655  		}
 15656  		_ = v_0.Args[1]
 15657  		v_0_0 := v_0.Args[0]
 15658  		if v_0_0.Op != OpS390XMOVDconst {
 15659  			break
 15660  		}
 15661  		c := auxIntToInt64(v_0_0.AuxInt)
 15662  		v_0_1 := v_0.Args[1]
 15663  		if v_0_1.Op != OpS390XMOVDconst {
 15664  			break
 15665  		}
 15666  		d := auxIntToInt64(v_0_1.AuxInt)
 15667  		if !(uint64(d) <= uint64(c) && c-d == 0) {
 15668  			break
 15669  		}
 15670  		v.reset(OpS390XFlagGT)
 15671  		return true
 15672  	}
 15673  	// match: (Select1 (SUBC (MOVDconst [c]) (MOVDconst [d])))
 15674  	// cond: uint64(d) <= uint64(c) && c-d != 0
 15675  	// result: (FlagOV)
 15676  	for {
 15677  		if v_0.Op != OpS390XSUBC {
 15678  			break
 15679  		}
 15680  		_ = v_0.Args[1]
 15681  		v_0_0 := v_0.Args[0]
 15682  		if v_0_0.Op != OpS390XMOVDconst {
 15683  			break
 15684  		}
 15685  		c := auxIntToInt64(v_0_0.AuxInt)
 15686  		v_0_1 := v_0.Args[1]
 15687  		if v_0_1.Op != OpS390XMOVDconst {
 15688  			break
 15689  		}
 15690  		d := auxIntToInt64(v_0_1.AuxInt)
 15691  		if !(uint64(d) <= uint64(c) && c-d != 0) {
 15692  			break
 15693  		}
 15694  		v.reset(OpS390XFlagOV)
 15695  		return true
 15696  	}
 15697  	return false
 15698  }
 15699  func rewriteValueS390X_OpSlicemask(v *Value) bool {
 15700  	v_0 := v.Args[0]
 15701  	b := v.Block
 15702  	// match: (Slicemask <t> x)
 15703  	// result: (SRADconst (NEG <t> x) [63])
 15704  	for {
 15705  		t := v.Type
 15706  		x := v_0
 15707  		v.reset(OpS390XSRADconst)
 15708  		v.AuxInt = uint8ToAuxInt(63)
 15709  		v0 := b.NewValue0(v.Pos, OpS390XNEG, t)
 15710  		v0.AddArg(x)
 15711  		v.AddArg(v0)
 15712  		return true
 15713  	}
 15714  }
 15715  func rewriteValueS390X_OpStore(v *Value) bool {
 15716  	v_2 := v.Args[2]
 15717  	v_1 := v.Args[1]
 15718  	v_0 := v.Args[0]
 15719  	// match: (Store {t} ptr val mem)
 15720  	// cond: t.Size() == 8 && is64BitFloat(val.Type)
 15721  	// result: (FMOVDstore ptr val mem)
 15722  	for {
 15723  		t := auxToType(v.Aux)
 15724  		ptr := v_0
 15725  		val := v_1
 15726  		mem := v_2
 15727  		if !(t.Size() == 8 && is64BitFloat(val.Type)) {
 15728  			break
 15729  		}
 15730  		v.reset(OpS390XFMOVDstore)
 15731  		v.AddArg3(ptr, val, mem)
 15732  		return true
 15733  	}
 15734  	// match: (Store {t} ptr val mem)
 15735  	// cond: t.Size() == 4 && is32BitFloat(val.Type)
 15736  	// result: (FMOVSstore ptr val mem)
 15737  	for {
 15738  		t := auxToType(v.Aux)
 15739  		ptr := v_0
 15740  		val := v_1
 15741  		mem := v_2
 15742  		if !(t.Size() == 4 && is32BitFloat(val.Type)) {
 15743  			break
 15744  		}
 15745  		v.reset(OpS390XFMOVSstore)
 15746  		v.AddArg3(ptr, val, mem)
 15747  		return true
 15748  	}
 15749  	// match: (Store {t} ptr val mem)
 15750  	// cond: t.Size() == 8
 15751  	// result: (MOVDstore ptr val mem)
 15752  	for {
 15753  		t := auxToType(v.Aux)
 15754  		ptr := v_0
 15755  		val := v_1
 15756  		mem := v_2
 15757  		if !(t.Size() == 8) {
 15758  			break
 15759  		}
 15760  		v.reset(OpS390XMOVDstore)
 15761  		v.AddArg3(ptr, val, mem)
 15762  		return true
 15763  	}
 15764  	// match: (Store {t} ptr val mem)
 15765  	// cond: t.Size() == 4
 15766  	// result: (MOVWstore ptr val mem)
 15767  	for {
 15768  		t := auxToType(v.Aux)
 15769  		ptr := v_0
 15770  		val := v_1
 15771  		mem := v_2
 15772  		if !(t.Size() == 4) {
 15773  			break
 15774  		}
 15775  		v.reset(OpS390XMOVWstore)
 15776  		v.AddArg3(ptr, val, mem)
 15777  		return true
 15778  	}
 15779  	// match: (Store {t} ptr val mem)
 15780  	// cond: t.Size() == 2
 15781  	// result: (MOVHstore ptr val mem)
 15782  	for {
 15783  		t := auxToType(v.Aux)
 15784  		ptr := v_0
 15785  		val := v_1
 15786  		mem := v_2
 15787  		if !(t.Size() == 2) {
 15788  			break
 15789  		}
 15790  		v.reset(OpS390XMOVHstore)
 15791  		v.AddArg3(ptr, val, mem)
 15792  		return true
 15793  	}
 15794  	// match: (Store {t} ptr val mem)
 15795  	// cond: t.Size() == 1
 15796  	// result: (MOVBstore ptr val mem)
 15797  	for {
 15798  		t := auxToType(v.Aux)
 15799  		ptr := v_0
 15800  		val := v_1
 15801  		mem := v_2
 15802  		if !(t.Size() == 1) {
 15803  			break
 15804  		}
 15805  		v.reset(OpS390XMOVBstore)
 15806  		v.AddArg3(ptr, val, mem)
 15807  		return true
 15808  	}
 15809  	return false
 15810  }
 15811  func rewriteValueS390X_OpSub32F(v *Value) bool {
 15812  	v_1 := v.Args[1]
 15813  	v_0 := v.Args[0]
 15814  	b := v.Block
 15815  	typ := &b.Func.Config.Types
 15816  	// match: (Sub32F x y)
 15817  	// result: (Select0 (FSUBS x y))
 15818  	for {
 15819  		x := v_0
 15820  		y := v_1
 15821  		v.reset(OpSelect0)
 15822  		v0 := b.NewValue0(v.Pos, OpS390XFSUBS, types.NewTuple(typ.Float32, types.TypeFlags))
 15823  		v0.AddArg2(x, y)
 15824  		v.AddArg(v0)
 15825  		return true
 15826  	}
 15827  }
 15828  func rewriteValueS390X_OpSub64F(v *Value) bool {
 15829  	v_1 := v.Args[1]
 15830  	v_0 := v.Args[0]
 15831  	b := v.Block
 15832  	typ := &b.Func.Config.Types
 15833  	// match: (Sub64F x y)
 15834  	// result: (Select0 (FSUB x y))
 15835  	for {
 15836  		x := v_0
 15837  		y := v_1
 15838  		v.reset(OpSelect0)
 15839  		v0 := b.NewValue0(v.Pos, OpS390XFSUB, types.NewTuple(typ.Float64, types.TypeFlags))
 15840  		v0.AddArg2(x, y)
 15841  		v.AddArg(v0)
 15842  		return true
 15843  	}
 15844  }
 15845  func rewriteValueS390X_OpTrunc(v *Value) bool {
 15846  	v_0 := v.Args[0]
 15847  	// match: (Trunc x)
 15848  	// result: (FIDBR [5] x)
 15849  	for {
 15850  		x := v_0
 15851  		v.reset(OpS390XFIDBR)
 15852  		v.AuxInt = int8ToAuxInt(5)
 15853  		v.AddArg(x)
 15854  		return true
 15855  	}
 15856  }
 15857  func rewriteValueS390X_OpZero(v *Value) bool {
 15858  	v_1 := v.Args[1]
 15859  	v_0 := v.Args[0]
 15860  	b := v.Block
 15861  	// match: (Zero [0] _ mem)
 15862  	// result: mem
 15863  	for {
 15864  		if auxIntToInt64(v.AuxInt) != 0 {
 15865  			break
 15866  		}
 15867  		mem := v_1
 15868  		v.copyOf(mem)
 15869  		return true
 15870  	}
 15871  	// match: (Zero [1] destptr mem)
 15872  	// result: (MOVBstoreconst [0] destptr mem)
 15873  	for {
 15874  		if auxIntToInt64(v.AuxInt) != 1 {
 15875  			break
 15876  		}
 15877  		destptr := v_0
 15878  		mem := v_1
 15879  		v.reset(OpS390XMOVBstoreconst)
 15880  		v.AuxInt = valAndOffToAuxInt(0)
 15881  		v.AddArg2(destptr, mem)
 15882  		return true
 15883  	}
 15884  	// match: (Zero [2] destptr mem)
 15885  	// result: (MOVHstoreconst [0] destptr mem)
 15886  	for {
 15887  		if auxIntToInt64(v.AuxInt) != 2 {
 15888  			break
 15889  		}
 15890  		destptr := v_0
 15891  		mem := v_1
 15892  		v.reset(OpS390XMOVHstoreconst)
 15893  		v.AuxInt = valAndOffToAuxInt(0)
 15894  		v.AddArg2(destptr, mem)
 15895  		return true
 15896  	}
 15897  	// match: (Zero [4] destptr mem)
 15898  	// result: (MOVWstoreconst [0] destptr mem)
 15899  	for {
 15900  		if auxIntToInt64(v.AuxInt) != 4 {
 15901  			break
 15902  		}
 15903  		destptr := v_0
 15904  		mem := v_1
 15905  		v.reset(OpS390XMOVWstoreconst)
 15906  		v.AuxInt = valAndOffToAuxInt(0)
 15907  		v.AddArg2(destptr, mem)
 15908  		return true
 15909  	}
 15910  	// match: (Zero [8] destptr mem)
 15911  	// result: (MOVDstoreconst [0] destptr mem)
 15912  	for {
 15913  		if auxIntToInt64(v.AuxInt) != 8 {
 15914  			break
 15915  		}
 15916  		destptr := v_0
 15917  		mem := v_1
 15918  		v.reset(OpS390XMOVDstoreconst)
 15919  		v.AuxInt = valAndOffToAuxInt(0)
 15920  		v.AddArg2(destptr, mem)
 15921  		return true
 15922  	}
 15923  	// match: (Zero [3] destptr mem)
 15924  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr (MOVHstoreconst [0] destptr mem))
 15925  	for {
 15926  		if auxIntToInt64(v.AuxInt) != 3 {
 15927  			break
 15928  		}
 15929  		destptr := v_0
 15930  		mem := v_1
 15931  		v.reset(OpS390XMOVBstoreconst)
 15932  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 2))
 15933  		v0 := b.NewValue0(v.Pos, OpS390XMOVHstoreconst, types.TypeMem)
 15934  		v0.AuxInt = valAndOffToAuxInt(0)
 15935  		v0.AddArg2(destptr, mem)
 15936  		v.AddArg2(destptr, v0)
 15937  		return true
 15938  	}
 15939  	// match: (Zero [5] destptr mem)
 15940  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 15941  	for {
 15942  		if auxIntToInt64(v.AuxInt) != 5 {
 15943  			break
 15944  		}
 15945  		destptr := v_0
 15946  		mem := v_1
 15947  		v.reset(OpS390XMOVBstoreconst)
 15948  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 15949  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 15950  		v0.AuxInt = valAndOffToAuxInt(0)
 15951  		v0.AddArg2(destptr, mem)
 15952  		v.AddArg2(destptr, v0)
 15953  		return true
 15954  	}
 15955  	// match: (Zero [6] destptr mem)
 15956  	// result: (MOVHstoreconst [makeValAndOff(0,4)] destptr (MOVWstoreconst [0] destptr mem))
 15957  	for {
 15958  		if auxIntToInt64(v.AuxInt) != 6 {
 15959  			break
 15960  		}
 15961  		destptr := v_0
 15962  		mem := v_1
 15963  		v.reset(OpS390XMOVHstoreconst)
 15964  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 15965  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 15966  		v0.AuxInt = valAndOffToAuxInt(0)
 15967  		v0.AddArg2(destptr, mem)
 15968  		v.AddArg2(destptr, v0)
 15969  		return true
 15970  	}
 15971  	// match: (Zero [7] destptr mem)
 15972  	// result: (MOVWstoreconst [makeValAndOff(0,3)] destptr (MOVWstoreconst [0] destptr mem))
 15973  	for {
 15974  		if auxIntToInt64(v.AuxInt) != 7 {
 15975  			break
 15976  		}
 15977  		destptr := v_0
 15978  		mem := v_1
 15979  		v.reset(OpS390XMOVWstoreconst)
 15980  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 3))
 15981  		v0 := b.NewValue0(v.Pos, OpS390XMOVWstoreconst, types.TypeMem)
 15982  		v0.AuxInt = valAndOffToAuxInt(0)
 15983  		v0.AddArg2(destptr, mem)
 15984  		v.AddArg2(destptr, v0)
 15985  		return true
 15986  	}
 15987  	// match: (Zero [s] destptr mem)
 15988  	// cond: s > 0 && s <= 1024
 15989  	// result: (CLEAR [makeValAndOff(int32(s), 0)] destptr mem)
 15990  	for {
 15991  		s := auxIntToInt64(v.AuxInt)
 15992  		destptr := v_0
 15993  		mem := v_1
 15994  		if !(s > 0 && s <= 1024) {
 15995  			break
 15996  		}
 15997  		v.reset(OpS390XCLEAR)
 15998  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(s), 0))
 15999  		v.AddArg2(destptr, mem)
 16000  		return true
 16001  	}
 16002  	// match: (Zero [s] destptr mem)
 16003  	// cond: s > 1024
 16004  	// result: (LoweredZero [s%256] destptr (ADDconst <destptr.Type> destptr [(int32(s)/256)*256]) mem)
 16005  	for {
 16006  		s := auxIntToInt64(v.AuxInt)
 16007  		destptr := v_0
 16008  		mem := v_1
 16009  		if !(s > 1024) {
 16010  			break
 16011  		}
 16012  		v.reset(OpS390XLoweredZero)
 16013  		v.AuxInt = int64ToAuxInt(s % 256)
 16014  		v0 := b.NewValue0(v.Pos, OpS390XADDconst, destptr.Type)
 16015  		v0.AuxInt = int32ToAuxInt((int32(s) / 256) * 256)
 16016  		v0.AddArg(destptr)
 16017  		v.AddArg3(destptr, v0, mem)
 16018  		return true
 16019  	}
 16020  	return false
 16021  }
 16022  func rewriteBlockS390X(b *Block) bool {
 16023  	typ := &b.Func.Config.Types
 16024  	switch b.Kind {
 16025  	case BlockS390XBRC:
 16026  		// match: (BRC {c} x:(CMP _ _) yes no)
 16027  		// cond: c&s390x.Unordered != 0
 16028  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16029  		for b.Controls[0].Op == OpS390XCMP {
 16030  			x := b.Controls[0]
 16031  			c := auxToS390xCCMask(b.Aux)
 16032  			if !(c&s390x.Unordered != 0) {
 16033  				break
 16034  			}
 16035  			b.resetWithControl(BlockS390XBRC, x)
 16036  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16037  			return true
 16038  		}
 16039  		// match: (BRC {c} x:(CMPW _ _) yes no)
 16040  		// cond: c&s390x.Unordered != 0
 16041  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16042  		for b.Controls[0].Op == OpS390XCMPW {
 16043  			x := b.Controls[0]
 16044  			c := auxToS390xCCMask(b.Aux)
 16045  			if !(c&s390x.Unordered != 0) {
 16046  				break
 16047  			}
 16048  			b.resetWithControl(BlockS390XBRC, x)
 16049  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16050  			return true
 16051  		}
 16052  		// match: (BRC {c} x:(CMPU _ _) yes no)
 16053  		// cond: c&s390x.Unordered != 0
 16054  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16055  		for b.Controls[0].Op == OpS390XCMPU {
 16056  			x := b.Controls[0]
 16057  			c := auxToS390xCCMask(b.Aux)
 16058  			if !(c&s390x.Unordered != 0) {
 16059  				break
 16060  			}
 16061  			b.resetWithControl(BlockS390XBRC, x)
 16062  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16063  			return true
 16064  		}
 16065  		// match: (BRC {c} x:(CMPWU _ _) yes no)
 16066  		// cond: c&s390x.Unordered != 0
 16067  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16068  		for b.Controls[0].Op == OpS390XCMPWU {
 16069  			x := b.Controls[0]
 16070  			c := auxToS390xCCMask(b.Aux)
 16071  			if !(c&s390x.Unordered != 0) {
 16072  				break
 16073  			}
 16074  			b.resetWithControl(BlockS390XBRC, x)
 16075  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16076  			return true
 16077  		}
 16078  		// match: (BRC {c} x:(CMPconst _) yes no)
 16079  		// cond: c&s390x.Unordered != 0
 16080  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16081  		for b.Controls[0].Op == OpS390XCMPconst {
 16082  			x := b.Controls[0]
 16083  			c := auxToS390xCCMask(b.Aux)
 16084  			if !(c&s390x.Unordered != 0) {
 16085  				break
 16086  			}
 16087  			b.resetWithControl(BlockS390XBRC, x)
 16088  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16089  			return true
 16090  		}
 16091  		// match: (BRC {c} x:(CMPWconst _) yes no)
 16092  		// cond: c&s390x.Unordered != 0
 16093  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16094  		for b.Controls[0].Op == OpS390XCMPWconst {
 16095  			x := b.Controls[0]
 16096  			c := auxToS390xCCMask(b.Aux)
 16097  			if !(c&s390x.Unordered != 0) {
 16098  				break
 16099  			}
 16100  			b.resetWithControl(BlockS390XBRC, x)
 16101  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16102  			return true
 16103  		}
 16104  		// match: (BRC {c} x:(CMPUconst _) yes no)
 16105  		// cond: c&s390x.Unordered != 0
 16106  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16107  		for b.Controls[0].Op == OpS390XCMPUconst {
 16108  			x := b.Controls[0]
 16109  			c := auxToS390xCCMask(b.Aux)
 16110  			if !(c&s390x.Unordered != 0) {
 16111  				break
 16112  			}
 16113  			b.resetWithControl(BlockS390XBRC, x)
 16114  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16115  			return true
 16116  		}
 16117  		// match: (BRC {c} x:(CMPWUconst _) yes no)
 16118  		// cond: c&s390x.Unordered != 0
 16119  		// result: (BRC {c&^s390x.Unordered} x yes no)
 16120  		for b.Controls[0].Op == OpS390XCMPWUconst {
 16121  			x := b.Controls[0]
 16122  			c := auxToS390xCCMask(b.Aux)
 16123  			if !(c&s390x.Unordered != 0) {
 16124  				break
 16125  			}
 16126  			b.resetWithControl(BlockS390XBRC, x)
 16127  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16128  			return true
 16129  		}
 16130  		// match: (BRC {c} (CMP x y) yes no)
 16131  		// result: (CGRJ {c&^s390x.Unordered} x y yes no)
 16132  		for b.Controls[0].Op == OpS390XCMP {
 16133  			v_0 := b.Controls[0]
 16134  			y := v_0.Args[1]
 16135  			x := v_0.Args[0]
 16136  			c := auxToS390xCCMask(b.Aux)
 16137  			b.resetWithControl2(BlockS390XCGRJ, x, y)
 16138  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16139  			return true
 16140  		}
 16141  		// match: (BRC {c} (CMPW x y) yes no)
 16142  		// result: (CRJ {c&^s390x.Unordered} x y yes no)
 16143  		for b.Controls[0].Op == OpS390XCMPW {
 16144  			v_0 := b.Controls[0]
 16145  			y := v_0.Args[1]
 16146  			x := v_0.Args[0]
 16147  			c := auxToS390xCCMask(b.Aux)
 16148  			b.resetWithControl2(BlockS390XCRJ, x, y)
 16149  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16150  			return true
 16151  		}
 16152  		// match: (BRC {c} (CMPU x y) yes no)
 16153  		// result: (CLGRJ {c&^s390x.Unordered} x y yes no)
 16154  		for b.Controls[0].Op == OpS390XCMPU {
 16155  			v_0 := b.Controls[0]
 16156  			y := v_0.Args[1]
 16157  			x := v_0.Args[0]
 16158  			c := auxToS390xCCMask(b.Aux)
 16159  			b.resetWithControl2(BlockS390XCLGRJ, x, y)
 16160  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16161  			return true
 16162  		}
 16163  		// match: (BRC {c} (CMPWU x y) yes no)
 16164  		// result: (CLRJ {c&^s390x.Unordered} x y yes no)
 16165  		for b.Controls[0].Op == OpS390XCMPWU {
 16166  			v_0 := b.Controls[0]
 16167  			y := v_0.Args[1]
 16168  			x := v_0.Args[0]
 16169  			c := auxToS390xCCMask(b.Aux)
 16170  			b.resetWithControl2(BlockS390XCLRJ, x, y)
 16171  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16172  			return true
 16173  		}
 16174  		// match: (BRC {c} (CMPconst x [y]) yes no)
 16175  		// cond: y == int32( int8(y))
 16176  		// result: (CGIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 16177  		for b.Controls[0].Op == OpS390XCMPconst {
 16178  			v_0 := b.Controls[0]
 16179  			y := auxIntToInt32(v_0.AuxInt)
 16180  			x := v_0.Args[0]
 16181  			c := auxToS390xCCMask(b.Aux)
 16182  			if !(y == int32(int8(y))) {
 16183  				break
 16184  			}
 16185  			b.resetWithControl(BlockS390XCGIJ, x)
 16186  			b.AuxInt = int8ToAuxInt(int8(y))
 16187  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16188  			return true
 16189  		}
 16190  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 16191  		// cond: y == int32( int8(y))
 16192  		// result: (CIJ {c&^s390x.Unordered} x [ int8(y)] yes no)
 16193  		for b.Controls[0].Op == OpS390XCMPWconst {
 16194  			v_0 := b.Controls[0]
 16195  			y := auxIntToInt32(v_0.AuxInt)
 16196  			x := v_0.Args[0]
 16197  			c := auxToS390xCCMask(b.Aux)
 16198  			if !(y == int32(int8(y))) {
 16199  				break
 16200  			}
 16201  			b.resetWithControl(BlockS390XCIJ, x)
 16202  			b.AuxInt = int8ToAuxInt(int8(y))
 16203  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16204  			return true
 16205  		}
 16206  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 16207  		// cond: y == int32(uint8(y))
 16208  		// result: (CLGIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 16209  		for b.Controls[0].Op == OpS390XCMPUconst {
 16210  			v_0 := b.Controls[0]
 16211  			y := auxIntToInt32(v_0.AuxInt)
 16212  			x := v_0.Args[0]
 16213  			c := auxToS390xCCMask(b.Aux)
 16214  			if !(y == int32(uint8(y))) {
 16215  				break
 16216  			}
 16217  			b.resetWithControl(BlockS390XCLGIJ, x)
 16218  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16219  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16220  			return true
 16221  		}
 16222  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 16223  		// cond: y == int32(uint8(y))
 16224  		// result: (CLIJ {c&^s390x.Unordered} x [uint8(y)] yes no)
 16225  		for b.Controls[0].Op == OpS390XCMPWUconst {
 16226  			v_0 := b.Controls[0]
 16227  			y := auxIntToInt32(v_0.AuxInt)
 16228  			x := v_0.Args[0]
 16229  			c := auxToS390xCCMask(b.Aux)
 16230  			if !(y == int32(uint8(y))) {
 16231  				break
 16232  			}
 16233  			b.resetWithControl(BlockS390XCLIJ, x)
 16234  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16235  			b.Aux = s390xCCMaskToAux(c &^ s390x.Unordered)
 16236  			return true
 16237  		}
 16238  		// match: (BRC {s390x.Less} (CMPconst x [ 128]) yes no)
 16239  		// result: (CGIJ {s390x.LessOrEqual} x [ 127] yes no)
 16240  		for b.Controls[0].Op == OpS390XCMPconst {
 16241  			v_0 := b.Controls[0]
 16242  			if auxIntToInt32(v_0.AuxInt) != 128 {
 16243  				break
 16244  			}
 16245  			x := v_0.Args[0]
 16246  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 16247  				break
 16248  			}
 16249  			b.resetWithControl(BlockS390XCGIJ, x)
 16250  			b.AuxInt = int8ToAuxInt(127)
 16251  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 16252  			return true
 16253  		}
 16254  		// match: (BRC {s390x.Less} (CMPWconst x [ 128]) yes no)
 16255  		// result: (CIJ {s390x.LessOrEqual} x [ 127] yes no)
 16256  		for b.Controls[0].Op == OpS390XCMPWconst {
 16257  			v_0 := b.Controls[0]
 16258  			if auxIntToInt32(v_0.AuxInt) != 128 {
 16259  				break
 16260  			}
 16261  			x := v_0.Args[0]
 16262  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 16263  				break
 16264  			}
 16265  			b.resetWithControl(BlockS390XCIJ, x)
 16266  			b.AuxInt = int8ToAuxInt(127)
 16267  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 16268  			return true
 16269  		}
 16270  		// match: (BRC {s390x.LessOrEqual} (CMPconst x [-129]) yes no)
 16271  		// result: (CGIJ {s390x.Less} x [-128] yes no)
 16272  		for b.Controls[0].Op == OpS390XCMPconst {
 16273  			v_0 := b.Controls[0]
 16274  			if auxIntToInt32(v_0.AuxInt) != -129 {
 16275  				break
 16276  			}
 16277  			x := v_0.Args[0]
 16278  			if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 16279  				break
 16280  			}
 16281  			b.resetWithControl(BlockS390XCGIJ, x)
 16282  			b.AuxInt = int8ToAuxInt(-128)
 16283  			b.Aux = s390xCCMaskToAux(s390x.Less)
 16284  			return true
 16285  		}
 16286  		// match: (BRC {s390x.LessOrEqual} (CMPWconst x [-129]) yes no)
 16287  		// result: (CIJ {s390x.Less} x [-128] yes no)
 16288  		for b.Controls[0].Op == OpS390XCMPWconst {
 16289  			v_0 := b.Controls[0]
 16290  			if auxIntToInt32(v_0.AuxInt) != -129 {
 16291  				break
 16292  			}
 16293  			x := v_0.Args[0]
 16294  			if auxToS390xCCMask(b.Aux) != s390x.LessOrEqual {
 16295  				break
 16296  			}
 16297  			b.resetWithControl(BlockS390XCIJ, x)
 16298  			b.AuxInt = int8ToAuxInt(-128)
 16299  			b.Aux = s390xCCMaskToAux(s390x.Less)
 16300  			return true
 16301  		}
 16302  		// match: (BRC {s390x.Greater} (CMPconst x [-129]) yes no)
 16303  		// result: (CGIJ {s390x.GreaterOrEqual} x [-128] yes no)
 16304  		for b.Controls[0].Op == OpS390XCMPconst {
 16305  			v_0 := b.Controls[0]
 16306  			if auxIntToInt32(v_0.AuxInt) != -129 {
 16307  				break
 16308  			}
 16309  			x := v_0.Args[0]
 16310  			if auxToS390xCCMask(b.Aux) != s390x.Greater {
 16311  				break
 16312  			}
 16313  			b.resetWithControl(BlockS390XCGIJ, x)
 16314  			b.AuxInt = int8ToAuxInt(-128)
 16315  			b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
 16316  			return true
 16317  		}
 16318  		// match: (BRC {s390x.Greater} (CMPWconst x [-129]) yes no)
 16319  		// result: (CIJ {s390x.GreaterOrEqual} x [-128] yes no)
 16320  		for b.Controls[0].Op == OpS390XCMPWconst {
 16321  			v_0 := b.Controls[0]
 16322  			if auxIntToInt32(v_0.AuxInt) != -129 {
 16323  				break
 16324  			}
 16325  			x := v_0.Args[0]
 16326  			if auxToS390xCCMask(b.Aux) != s390x.Greater {
 16327  				break
 16328  			}
 16329  			b.resetWithControl(BlockS390XCIJ, x)
 16330  			b.AuxInt = int8ToAuxInt(-128)
 16331  			b.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
 16332  			return true
 16333  		}
 16334  		// match: (BRC {s390x.GreaterOrEqual} (CMPconst x [ 128]) yes no)
 16335  		// result: (CGIJ {s390x.Greater} x [ 127] yes no)
 16336  		for b.Controls[0].Op == OpS390XCMPconst {
 16337  			v_0 := b.Controls[0]
 16338  			if auxIntToInt32(v_0.AuxInt) != 128 {
 16339  				break
 16340  			}
 16341  			x := v_0.Args[0]
 16342  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16343  				break
 16344  			}
 16345  			b.resetWithControl(BlockS390XCGIJ, x)
 16346  			b.AuxInt = int8ToAuxInt(127)
 16347  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 16348  			return true
 16349  		}
 16350  		// match: (BRC {s390x.GreaterOrEqual} (CMPWconst x [ 128]) yes no)
 16351  		// result: (CIJ {s390x.Greater} x [ 127] yes no)
 16352  		for b.Controls[0].Op == OpS390XCMPWconst {
 16353  			v_0 := b.Controls[0]
 16354  			if auxIntToInt32(v_0.AuxInt) != 128 {
 16355  				break
 16356  			}
 16357  			x := v_0.Args[0]
 16358  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16359  				break
 16360  			}
 16361  			b.resetWithControl(BlockS390XCIJ, x)
 16362  			b.AuxInt = int8ToAuxInt(127)
 16363  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 16364  			return true
 16365  		}
 16366  		// match: (BRC {s390x.Less} (CMPWUconst x [256]) yes no)
 16367  		// result: (CLIJ {s390x.LessOrEqual} x [255] yes no)
 16368  		for b.Controls[0].Op == OpS390XCMPWUconst {
 16369  			v_0 := b.Controls[0]
 16370  			if auxIntToInt32(v_0.AuxInt) != 256 {
 16371  				break
 16372  			}
 16373  			x := v_0.Args[0]
 16374  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 16375  				break
 16376  			}
 16377  			b.resetWithControl(BlockS390XCLIJ, x)
 16378  			b.AuxInt = uint8ToAuxInt(255)
 16379  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 16380  			return true
 16381  		}
 16382  		// match: (BRC {s390x.Less} (CMPUconst x [256]) yes no)
 16383  		// result: (CLGIJ {s390x.LessOrEqual} x [255] yes no)
 16384  		for b.Controls[0].Op == OpS390XCMPUconst {
 16385  			v_0 := b.Controls[0]
 16386  			if auxIntToInt32(v_0.AuxInt) != 256 {
 16387  				break
 16388  			}
 16389  			x := v_0.Args[0]
 16390  			if auxToS390xCCMask(b.Aux) != s390x.Less {
 16391  				break
 16392  			}
 16393  			b.resetWithControl(BlockS390XCLGIJ, x)
 16394  			b.AuxInt = uint8ToAuxInt(255)
 16395  			b.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
 16396  			return true
 16397  		}
 16398  		// match: (BRC {s390x.GreaterOrEqual} (CMPWUconst x [256]) yes no)
 16399  		// result: (CLIJ {s390x.Greater} x [255] yes no)
 16400  		for b.Controls[0].Op == OpS390XCMPWUconst {
 16401  			v_0 := b.Controls[0]
 16402  			if auxIntToInt32(v_0.AuxInt) != 256 {
 16403  				break
 16404  			}
 16405  			x := v_0.Args[0]
 16406  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16407  				break
 16408  			}
 16409  			b.resetWithControl(BlockS390XCLIJ, x)
 16410  			b.AuxInt = uint8ToAuxInt(255)
 16411  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 16412  			return true
 16413  		}
 16414  		// match: (BRC {s390x.GreaterOrEqual} (CMPUconst x [256]) yes no)
 16415  		// result: (CLGIJ {s390x.Greater} x [255] yes no)
 16416  		for b.Controls[0].Op == OpS390XCMPUconst {
 16417  			v_0 := b.Controls[0]
 16418  			if auxIntToInt32(v_0.AuxInt) != 256 {
 16419  				break
 16420  			}
 16421  			x := v_0.Args[0]
 16422  			if auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 16423  				break
 16424  			}
 16425  			b.resetWithControl(BlockS390XCLGIJ, x)
 16426  			b.AuxInt = uint8ToAuxInt(255)
 16427  			b.Aux = s390xCCMaskToAux(s390x.Greater)
 16428  			return true
 16429  		}
 16430  		// match: (BRC {c} (CMPconst x [y]) yes no)
 16431  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 16432  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 16433  		for b.Controls[0].Op == OpS390XCMPconst {
 16434  			v_0 := b.Controls[0]
 16435  			y := auxIntToInt32(v_0.AuxInt)
 16436  			x := v_0.Args[0]
 16437  			c := auxToS390xCCMask(b.Aux)
 16438  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 16439  				break
 16440  			}
 16441  			b.resetWithControl(BlockS390XCLGIJ, x)
 16442  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16443  			b.Aux = s390xCCMaskToAux(c)
 16444  			return true
 16445  		}
 16446  		// match: (BRC {c} (CMPWconst x [y]) yes no)
 16447  		// cond: y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 16448  		// result: (CLIJ {c} x [uint8(y)] yes no)
 16449  		for b.Controls[0].Op == OpS390XCMPWconst {
 16450  			v_0 := b.Controls[0]
 16451  			y := auxIntToInt32(v_0.AuxInt)
 16452  			x := v_0.Args[0]
 16453  			c := auxToS390xCCMask(b.Aux)
 16454  			if !(y == int32(uint8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 16455  				break
 16456  			}
 16457  			b.resetWithControl(BlockS390XCLIJ, x)
 16458  			b.AuxInt = uint8ToAuxInt(uint8(y))
 16459  			b.Aux = s390xCCMaskToAux(c)
 16460  			return true
 16461  		}
 16462  		// match: (BRC {c} (CMPUconst x [y]) yes no)
 16463  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 16464  		// result: (CGIJ {c} x [ int8(y)] yes no)
 16465  		for b.Controls[0].Op == OpS390XCMPUconst {
 16466  			v_0 := b.Controls[0]
 16467  			y := auxIntToInt32(v_0.AuxInt)
 16468  			x := v_0.Args[0]
 16469  			c := auxToS390xCCMask(b.Aux)
 16470  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 16471  				break
 16472  			}
 16473  			b.resetWithControl(BlockS390XCGIJ, x)
 16474  			b.AuxInt = int8ToAuxInt(int8(y))
 16475  			b.Aux = s390xCCMaskToAux(c)
 16476  			return true
 16477  		}
 16478  		// match: (BRC {c} (CMPWUconst x [y]) yes no)
 16479  		// cond: y == int32( int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)
 16480  		// result: (CIJ {c} x [ int8(y)] yes no)
 16481  		for b.Controls[0].Op == OpS390XCMPWUconst {
 16482  			v_0 := b.Controls[0]
 16483  			y := auxIntToInt32(v_0.AuxInt)
 16484  			x := v_0.Args[0]
 16485  			c := auxToS390xCCMask(b.Aux)
 16486  			if !(y == int32(int8(y)) && (c == s390x.Equal || c == s390x.LessOrGreater)) {
 16487  				break
 16488  			}
 16489  			b.resetWithControl(BlockS390XCIJ, x)
 16490  			b.AuxInt = int8ToAuxInt(int8(y))
 16491  			b.Aux = s390xCCMaskToAux(c)
 16492  			return true
 16493  		}
 16494  		// match: (BRC {c} (InvertFlags cmp) yes no)
 16495  		// result: (BRC {c.ReverseComparison()} cmp yes no)
 16496  		for b.Controls[0].Op == OpS390XInvertFlags {
 16497  			v_0 := b.Controls[0]
 16498  			cmp := v_0.Args[0]
 16499  			c := auxToS390xCCMask(b.Aux)
 16500  			b.resetWithControl(BlockS390XBRC, cmp)
 16501  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16502  			return true
 16503  		}
 16504  		// match: (BRC {c} (FlagEQ) yes no)
 16505  		// cond: c&s390x.Equal != 0
 16506  		// result: (First yes no)
 16507  		for b.Controls[0].Op == OpS390XFlagEQ {
 16508  			c := auxToS390xCCMask(b.Aux)
 16509  			if !(c&s390x.Equal != 0) {
 16510  				break
 16511  			}
 16512  			b.Reset(BlockFirst)
 16513  			return true
 16514  		}
 16515  		// match: (BRC {c} (FlagLT) yes no)
 16516  		// cond: c&s390x.Less != 0
 16517  		// result: (First yes no)
 16518  		for b.Controls[0].Op == OpS390XFlagLT {
 16519  			c := auxToS390xCCMask(b.Aux)
 16520  			if !(c&s390x.Less != 0) {
 16521  				break
 16522  			}
 16523  			b.Reset(BlockFirst)
 16524  			return true
 16525  		}
 16526  		// match: (BRC {c} (FlagGT) yes no)
 16527  		// cond: c&s390x.Greater != 0
 16528  		// result: (First yes no)
 16529  		for b.Controls[0].Op == OpS390XFlagGT {
 16530  			c := auxToS390xCCMask(b.Aux)
 16531  			if !(c&s390x.Greater != 0) {
 16532  				break
 16533  			}
 16534  			b.Reset(BlockFirst)
 16535  			return true
 16536  		}
 16537  		// match: (BRC {c} (FlagOV) yes no)
 16538  		// cond: c&s390x.Unordered != 0
 16539  		// result: (First yes no)
 16540  		for b.Controls[0].Op == OpS390XFlagOV {
 16541  			c := auxToS390xCCMask(b.Aux)
 16542  			if !(c&s390x.Unordered != 0) {
 16543  				break
 16544  			}
 16545  			b.Reset(BlockFirst)
 16546  			return true
 16547  		}
 16548  		// match: (BRC {c} (FlagEQ) yes no)
 16549  		// cond: c&s390x.Equal == 0
 16550  		// result: (First no yes)
 16551  		for b.Controls[0].Op == OpS390XFlagEQ {
 16552  			c := auxToS390xCCMask(b.Aux)
 16553  			if !(c&s390x.Equal == 0) {
 16554  				break
 16555  			}
 16556  			b.Reset(BlockFirst)
 16557  			b.swapSuccessors()
 16558  			return true
 16559  		}
 16560  		// match: (BRC {c} (FlagLT) yes no)
 16561  		// cond: c&s390x.Less == 0
 16562  		// result: (First no yes)
 16563  		for b.Controls[0].Op == OpS390XFlagLT {
 16564  			c := auxToS390xCCMask(b.Aux)
 16565  			if !(c&s390x.Less == 0) {
 16566  				break
 16567  			}
 16568  			b.Reset(BlockFirst)
 16569  			b.swapSuccessors()
 16570  			return true
 16571  		}
 16572  		// match: (BRC {c} (FlagGT) yes no)
 16573  		// cond: c&s390x.Greater == 0
 16574  		// result: (First no yes)
 16575  		for b.Controls[0].Op == OpS390XFlagGT {
 16576  			c := auxToS390xCCMask(b.Aux)
 16577  			if !(c&s390x.Greater == 0) {
 16578  				break
 16579  			}
 16580  			b.Reset(BlockFirst)
 16581  			b.swapSuccessors()
 16582  			return true
 16583  		}
 16584  		// match: (BRC {c} (FlagOV) yes no)
 16585  		// cond: c&s390x.Unordered == 0
 16586  		// result: (First no yes)
 16587  		for b.Controls[0].Op == OpS390XFlagOV {
 16588  			c := auxToS390xCCMask(b.Aux)
 16589  			if !(c&s390x.Unordered == 0) {
 16590  				break
 16591  			}
 16592  			b.Reset(BlockFirst)
 16593  			b.swapSuccessors()
 16594  			return true
 16595  		}
 16596  	case BlockS390XCGIJ:
 16597  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 16598  		// cond: c&s390x.Equal != 0 && int64(x) == int64(y)
 16599  		// result: (First yes no)
 16600  		for b.Controls[0].Op == OpS390XMOVDconst {
 16601  			v_0 := b.Controls[0]
 16602  			x := auxIntToInt64(v_0.AuxInt)
 16603  			y := auxIntToInt8(b.AuxInt)
 16604  			c := auxToS390xCCMask(b.Aux)
 16605  			if !(c&s390x.Equal != 0 && int64(x) == int64(y)) {
 16606  				break
 16607  			}
 16608  			b.Reset(BlockFirst)
 16609  			return true
 16610  		}
 16611  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 16612  		// cond: c&s390x.Less != 0 && int64(x) < int64(y)
 16613  		// result: (First yes no)
 16614  		for b.Controls[0].Op == OpS390XMOVDconst {
 16615  			v_0 := b.Controls[0]
 16616  			x := auxIntToInt64(v_0.AuxInt)
 16617  			y := auxIntToInt8(b.AuxInt)
 16618  			c := auxToS390xCCMask(b.Aux)
 16619  			if !(c&s390x.Less != 0 && int64(x) < int64(y)) {
 16620  				break
 16621  			}
 16622  			b.Reset(BlockFirst)
 16623  			return true
 16624  		}
 16625  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 16626  		// cond: c&s390x.Greater != 0 && int64(x) > int64(y)
 16627  		// result: (First yes no)
 16628  		for b.Controls[0].Op == OpS390XMOVDconst {
 16629  			v_0 := b.Controls[0]
 16630  			x := auxIntToInt64(v_0.AuxInt)
 16631  			y := auxIntToInt8(b.AuxInt)
 16632  			c := auxToS390xCCMask(b.Aux)
 16633  			if !(c&s390x.Greater != 0 && int64(x) > int64(y)) {
 16634  				break
 16635  			}
 16636  			b.Reset(BlockFirst)
 16637  			return true
 16638  		}
 16639  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 16640  		// cond: c&s390x.Equal == 0 && int64(x) == int64(y)
 16641  		// result: (First no yes)
 16642  		for b.Controls[0].Op == OpS390XMOVDconst {
 16643  			v_0 := b.Controls[0]
 16644  			x := auxIntToInt64(v_0.AuxInt)
 16645  			y := auxIntToInt8(b.AuxInt)
 16646  			c := auxToS390xCCMask(b.Aux)
 16647  			if !(c&s390x.Equal == 0 && int64(x) == int64(y)) {
 16648  				break
 16649  			}
 16650  			b.Reset(BlockFirst)
 16651  			b.swapSuccessors()
 16652  			return true
 16653  		}
 16654  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 16655  		// cond: c&s390x.Less == 0 && int64(x) < int64(y)
 16656  		// result: (First no yes)
 16657  		for b.Controls[0].Op == OpS390XMOVDconst {
 16658  			v_0 := b.Controls[0]
 16659  			x := auxIntToInt64(v_0.AuxInt)
 16660  			y := auxIntToInt8(b.AuxInt)
 16661  			c := auxToS390xCCMask(b.Aux)
 16662  			if !(c&s390x.Less == 0 && int64(x) < int64(y)) {
 16663  				break
 16664  			}
 16665  			b.Reset(BlockFirst)
 16666  			b.swapSuccessors()
 16667  			return true
 16668  		}
 16669  		// match: (CGIJ {c} (MOVDconst [x]) [y] yes no)
 16670  		// cond: c&s390x.Greater == 0 && int64(x) > int64(y)
 16671  		// result: (First no yes)
 16672  		for b.Controls[0].Op == OpS390XMOVDconst {
 16673  			v_0 := b.Controls[0]
 16674  			x := auxIntToInt64(v_0.AuxInt)
 16675  			y := auxIntToInt8(b.AuxInt)
 16676  			c := auxToS390xCCMask(b.Aux)
 16677  			if !(c&s390x.Greater == 0 && int64(x) > int64(y)) {
 16678  				break
 16679  			}
 16680  			b.Reset(BlockFirst)
 16681  			b.swapSuccessors()
 16682  			return true
 16683  		}
 16684  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16685  		// result: (BRC {s390x.NoCarry} carry)
 16686  		for b.Controls[0].Op == OpSelect0 {
 16687  			v_0 := b.Controls[0]
 16688  			v_0_0 := v_0.Args[0]
 16689  			if v_0_0.Op != OpS390XADDE {
 16690  				break
 16691  			}
 16692  			carry := v_0_0.Args[2]
 16693  			v_0_0_0 := v_0_0.Args[0]
 16694  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16695  				break
 16696  			}
 16697  			v_0_0_1 := v_0_0.Args[1]
 16698  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16699  				break
 16700  			}
 16701  			b.resetWithControl(BlockS390XBRC, carry)
 16702  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 16703  			return true
 16704  		}
 16705  		// match: (CGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16706  		// result: (BRC {s390x.Carry} carry)
 16707  		for b.Controls[0].Op == OpSelect0 {
 16708  			v_0 := b.Controls[0]
 16709  			v_0_0 := v_0.Args[0]
 16710  			if v_0_0.Op != OpS390XADDE {
 16711  				break
 16712  			}
 16713  			carry := v_0_0.Args[2]
 16714  			v_0_0_0 := v_0_0.Args[0]
 16715  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16716  				break
 16717  			}
 16718  			v_0_0_1 := v_0_0.Args[1]
 16719  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 16720  				break
 16721  			}
 16722  			b.resetWithControl(BlockS390XBRC, carry)
 16723  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16724  			return true
 16725  		}
 16726  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16727  		// result: (BRC {s390x.Carry} carry)
 16728  		for b.Controls[0].Op == OpSelect0 {
 16729  			v_0 := b.Controls[0]
 16730  			v_0_0 := v_0.Args[0]
 16731  			if v_0_0.Op != OpS390XADDE {
 16732  				break
 16733  			}
 16734  			carry := v_0_0.Args[2]
 16735  			v_0_0_0 := v_0_0.Args[0]
 16736  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16737  				break
 16738  			}
 16739  			v_0_0_1 := v_0_0.Args[1]
 16740  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16741  				break
 16742  			}
 16743  			b.resetWithControl(BlockS390XBRC, carry)
 16744  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16745  			return true
 16746  		}
 16747  		// match: (CGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 16748  		// result: (BRC {s390x.NoCarry} carry)
 16749  		for b.Controls[0].Op == OpSelect0 {
 16750  			v_0 := b.Controls[0]
 16751  			v_0_0 := v_0.Args[0]
 16752  			if v_0_0.Op != OpS390XADDE {
 16753  				break
 16754  			}
 16755  			carry := v_0_0.Args[2]
 16756  			v_0_0_0 := v_0_0.Args[0]
 16757  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16758  				break
 16759  			}
 16760  			v_0_0_1 := v_0_0.Args[1]
 16761  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 16762  				break
 16763  			}
 16764  			b.resetWithControl(BlockS390XBRC, carry)
 16765  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 16766  			return true
 16767  		}
 16768  		// match: (CGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 16769  		// result: (BRC {s390x.Carry} carry)
 16770  		for b.Controls[0].Op == OpSelect0 {
 16771  			v_0 := b.Controls[0]
 16772  			v_0_0 := v_0.Args[0]
 16773  			if v_0_0.Op != OpS390XADDE {
 16774  				break
 16775  			}
 16776  			carry := v_0_0.Args[2]
 16777  			v_0_0_0 := v_0_0.Args[0]
 16778  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 16779  				break
 16780  			}
 16781  			v_0_0_1 := v_0_0.Args[1]
 16782  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToInt8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 16783  				break
 16784  			}
 16785  			b.resetWithControl(BlockS390XBRC, carry)
 16786  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 16787  			return true
 16788  		}
 16789  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16790  		// result: (BRC {s390x.NoBorrow} borrow)
 16791  		for b.Controls[0].Op == OpS390XNEG {
 16792  			v_0 := b.Controls[0]
 16793  			v_0_0 := v_0.Args[0]
 16794  			if v_0_0.Op != OpSelect0 {
 16795  				break
 16796  			}
 16797  			v_0_0_0 := v_0_0.Args[0]
 16798  			if v_0_0_0.Op != OpS390XSUBE {
 16799  				break
 16800  			}
 16801  			borrow := v_0_0_0.Args[2]
 16802  			v_0_0_0_0 := v_0_0_0.Args[0]
 16803  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16804  				break
 16805  			}
 16806  			v_0_0_0_1 := v_0_0_0.Args[1]
 16807  			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 {
 16808  				break
 16809  			}
 16810  			b.resetWithControl(BlockS390XBRC, borrow)
 16811  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 16812  			return true
 16813  		}
 16814  		// match: (CGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16815  		// result: (BRC {s390x.Borrow} borrow)
 16816  		for b.Controls[0].Op == OpS390XNEG {
 16817  			v_0 := b.Controls[0]
 16818  			v_0_0 := v_0.Args[0]
 16819  			if v_0_0.Op != OpSelect0 {
 16820  				break
 16821  			}
 16822  			v_0_0_0 := v_0_0.Args[0]
 16823  			if v_0_0_0.Op != OpS390XSUBE {
 16824  				break
 16825  			}
 16826  			borrow := v_0_0_0.Args[2]
 16827  			v_0_0_0_0 := v_0_0_0.Args[0]
 16828  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16829  				break
 16830  			}
 16831  			v_0_0_0_1 := v_0_0_0.Args[1]
 16832  			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 {
 16833  				break
 16834  			}
 16835  			b.resetWithControl(BlockS390XBRC, borrow)
 16836  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16837  			return true
 16838  		}
 16839  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16840  		// result: (BRC {s390x.Borrow} borrow)
 16841  		for b.Controls[0].Op == OpS390XNEG {
 16842  			v_0 := b.Controls[0]
 16843  			v_0_0 := v_0.Args[0]
 16844  			if v_0_0.Op != OpSelect0 {
 16845  				break
 16846  			}
 16847  			v_0_0_0 := v_0_0.Args[0]
 16848  			if v_0_0_0.Op != OpS390XSUBE {
 16849  				break
 16850  			}
 16851  			borrow := v_0_0_0.Args[2]
 16852  			v_0_0_0_0 := v_0_0_0.Args[0]
 16853  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16854  				break
 16855  			}
 16856  			v_0_0_0_1 := v_0_0_0.Args[1]
 16857  			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 {
 16858  				break
 16859  			}
 16860  			b.resetWithControl(BlockS390XBRC, borrow)
 16861  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16862  			return true
 16863  		}
 16864  		// match: (CGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 16865  		// result: (BRC {s390x.NoBorrow} borrow)
 16866  		for b.Controls[0].Op == OpS390XNEG {
 16867  			v_0 := b.Controls[0]
 16868  			v_0_0 := v_0.Args[0]
 16869  			if v_0_0.Op != OpSelect0 {
 16870  				break
 16871  			}
 16872  			v_0_0_0 := v_0_0.Args[0]
 16873  			if v_0_0_0.Op != OpS390XSUBE {
 16874  				break
 16875  			}
 16876  			borrow := v_0_0_0.Args[2]
 16877  			v_0_0_0_0 := v_0_0_0.Args[0]
 16878  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16879  				break
 16880  			}
 16881  			v_0_0_0_1 := v_0_0_0.Args[1]
 16882  			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 {
 16883  				break
 16884  			}
 16885  			b.resetWithControl(BlockS390XBRC, borrow)
 16886  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 16887  			return true
 16888  		}
 16889  		// match: (CGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 16890  		// result: (BRC {s390x.Borrow} borrow)
 16891  		for b.Controls[0].Op == OpS390XNEG {
 16892  			v_0 := b.Controls[0]
 16893  			v_0_0 := v_0.Args[0]
 16894  			if v_0_0.Op != OpSelect0 {
 16895  				break
 16896  			}
 16897  			v_0_0_0 := v_0_0.Args[0]
 16898  			if v_0_0_0.Op != OpS390XSUBE {
 16899  				break
 16900  			}
 16901  			borrow := v_0_0_0.Args[2]
 16902  			v_0_0_0_0 := v_0_0_0.Args[0]
 16903  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 16904  				break
 16905  			}
 16906  			v_0_0_0_1 := v_0_0_0.Args[1]
 16907  			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 {
 16908  				break
 16909  			}
 16910  			b.resetWithControl(BlockS390XBRC, borrow)
 16911  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 16912  			return true
 16913  		}
 16914  	case BlockS390XCGRJ:
 16915  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 16916  		// cond: is8Bit(y)
 16917  		// result: (CGIJ {c} x [ int8(y)] yes no)
 16918  		for b.Controls[1].Op == OpS390XMOVDconst {
 16919  			x := b.Controls[0]
 16920  			v_1 := b.Controls[1]
 16921  			y := auxIntToInt64(v_1.AuxInt)
 16922  			c := auxToS390xCCMask(b.Aux)
 16923  			if !(is8Bit(y)) {
 16924  				break
 16925  			}
 16926  			b.resetWithControl(BlockS390XCGIJ, x)
 16927  			b.AuxInt = int8ToAuxInt(int8(y))
 16928  			b.Aux = s390xCCMaskToAux(c)
 16929  			return true
 16930  		}
 16931  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 16932  		// cond: is8Bit(x)
 16933  		// result: (CGIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 16934  		for b.Controls[0].Op == OpS390XMOVDconst {
 16935  			v_0 := b.Controls[0]
 16936  			x := auxIntToInt64(v_0.AuxInt)
 16937  			y := b.Controls[1]
 16938  			c := auxToS390xCCMask(b.Aux)
 16939  			if !(is8Bit(x)) {
 16940  				break
 16941  			}
 16942  			b.resetWithControl(BlockS390XCGIJ, y)
 16943  			b.AuxInt = int8ToAuxInt(int8(x))
 16944  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16945  			return true
 16946  		}
 16947  		// match: (CGRJ {c} x (MOVDconst [y]) yes no)
 16948  		// cond: !is8Bit(y) && is32Bit(y)
 16949  		// result: (BRC {c} (CMPconst x [int32(y)]) yes no)
 16950  		for b.Controls[1].Op == OpS390XMOVDconst {
 16951  			x := b.Controls[0]
 16952  			v_1 := b.Controls[1]
 16953  			y := auxIntToInt64(v_1.AuxInt)
 16954  			c := auxToS390xCCMask(b.Aux)
 16955  			if !(!is8Bit(y) && is32Bit(y)) {
 16956  				break
 16957  			}
 16958  			v0 := b.NewValue0(x.Pos, OpS390XCMPconst, types.TypeFlags)
 16959  			v0.AuxInt = int32ToAuxInt(int32(y))
 16960  			v0.AddArg(x)
 16961  			b.resetWithControl(BlockS390XBRC, v0)
 16962  			b.Aux = s390xCCMaskToAux(c)
 16963  			return true
 16964  		}
 16965  		// match: (CGRJ {c} (MOVDconst [x]) y yes no)
 16966  		// cond: !is8Bit(x) && is32Bit(x)
 16967  		// result: (BRC {c.ReverseComparison()} (CMPconst y [int32(x)]) yes no)
 16968  		for b.Controls[0].Op == OpS390XMOVDconst {
 16969  			v_0 := b.Controls[0]
 16970  			x := auxIntToInt64(v_0.AuxInt)
 16971  			y := b.Controls[1]
 16972  			c := auxToS390xCCMask(b.Aux)
 16973  			if !(!is8Bit(x) && is32Bit(x)) {
 16974  				break
 16975  			}
 16976  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPconst, types.TypeFlags)
 16977  			v0.AuxInt = int32ToAuxInt(int32(x))
 16978  			v0.AddArg(y)
 16979  			b.resetWithControl(BlockS390XBRC, v0)
 16980  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 16981  			return true
 16982  		}
 16983  		// match: (CGRJ {c} x y yes no)
 16984  		// cond: x == y && c&s390x.Equal != 0
 16985  		// result: (First yes no)
 16986  		for {
 16987  			x := b.Controls[0]
 16988  			y := b.Controls[1]
 16989  			c := auxToS390xCCMask(b.Aux)
 16990  			if !(x == y && c&s390x.Equal != 0) {
 16991  				break
 16992  			}
 16993  			b.Reset(BlockFirst)
 16994  			return true
 16995  		}
 16996  		// match: (CGRJ {c} x y yes no)
 16997  		// cond: x == y && c&s390x.Equal == 0
 16998  		// result: (First no yes)
 16999  		for {
 17000  			x := b.Controls[0]
 17001  			y := b.Controls[1]
 17002  			c := auxToS390xCCMask(b.Aux)
 17003  			if !(x == y && c&s390x.Equal == 0) {
 17004  				break
 17005  			}
 17006  			b.Reset(BlockFirst)
 17007  			b.swapSuccessors()
 17008  			return true
 17009  		}
 17010  	case BlockS390XCIJ:
 17011  		// match: (CIJ {c} (MOVWreg x) [y] yes no)
 17012  		// result: (CIJ {c} x [y] yes no)
 17013  		for b.Controls[0].Op == OpS390XMOVWreg {
 17014  			v_0 := b.Controls[0]
 17015  			x := v_0.Args[0]
 17016  			y := auxIntToInt8(b.AuxInt)
 17017  			c := auxToS390xCCMask(b.Aux)
 17018  			b.resetWithControl(BlockS390XCIJ, x)
 17019  			b.AuxInt = int8ToAuxInt(y)
 17020  			b.Aux = s390xCCMaskToAux(c)
 17021  			return true
 17022  		}
 17023  		// match: (CIJ {c} (MOVWZreg x) [y] yes no)
 17024  		// result: (CIJ {c} x [y] yes no)
 17025  		for b.Controls[0].Op == OpS390XMOVWZreg {
 17026  			v_0 := b.Controls[0]
 17027  			x := v_0.Args[0]
 17028  			y := auxIntToInt8(b.AuxInt)
 17029  			c := auxToS390xCCMask(b.Aux)
 17030  			b.resetWithControl(BlockS390XCIJ, x)
 17031  			b.AuxInt = int8ToAuxInt(y)
 17032  			b.Aux = s390xCCMaskToAux(c)
 17033  			return true
 17034  		}
 17035  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 17036  		// cond: c&s390x.Equal != 0 && int32(x) == int32(y)
 17037  		// result: (First yes no)
 17038  		for b.Controls[0].Op == OpS390XMOVDconst {
 17039  			v_0 := b.Controls[0]
 17040  			x := auxIntToInt64(v_0.AuxInt)
 17041  			y := auxIntToInt8(b.AuxInt)
 17042  			c := auxToS390xCCMask(b.Aux)
 17043  			if !(c&s390x.Equal != 0 && int32(x) == int32(y)) {
 17044  				break
 17045  			}
 17046  			b.Reset(BlockFirst)
 17047  			return true
 17048  		}
 17049  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 17050  		// cond: c&s390x.Less != 0 && int32(x) < int32(y)
 17051  		// result: (First yes no)
 17052  		for b.Controls[0].Op == OpS390XMOVDconst {
 17053  			v_0 := b.Controls[0]
 17054  			x := auxIntToInt64(v_0.AuxInt)
 17055  			y := auxIntToInt8(b.AuxInt)
 17056  			c := auxToS390xCCMask(b.Aux)
 17057  			if !(c&s390x.Less != 0 && int32(x) < int32(y)) {
 17058  				break
 17059  			}
 17060  			b.Reset(BlockFirst)
 17061  			return true
 17062  		}
 17063  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 17064  		// cond: c&s390x.Greater != 0 && int32(x) > int32(y)
 17065  		// result: (First yes no)
 17066  		for b.Controls[0].Op == OpS390XMOVDconst {
 17067  			v_0 := b.Controls[0]
 17068  			x := auxIntToInt64(v_0.AuxInt)
 17069  			y := auxIntToInt8(b.AuxInt)
 17070  			c := auxToS390xCCMask(b.Aux)
 17071  			if !(c&s390x.Greater != 0 && int32(x) > int32(y)) {
 17072  				break
 17073  			}
 17074  			b.Reset(BlockFirst)
 17075  			return true
 17076  		}
 17077  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 17078  		// cond: c&s390x.Equal == 0 && int32(x) == int32(y)
 17079  		// result: (First no yes)
 17080  		for b.Controls[0].Op == OpS390XMOVDconst {
 17081  			v_0 := b.Controls[0]
 17082  			x := auxIntToInt64(v_0.AuxInt)
 17083  			y := auxIntToInt8(b.AuxInt)
 17084  			c := auxToS390xCCMask(b.Aux)
 17085  			if !(c&s390x.Equal == 0 && int32(x) == int32(y)) {
 17086  				break
 17087  			}
 17088  			b.Reset(BlockFirst)
 17089  			b.swapSuccessors()
 17090  			return true
 17091  		}
 17092  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 17093  		// cond: c&s390x.Less == 0 && int32(x) < int32(y)
 17094  		// result: (First no yes)
 17095  		for b.Controls[0].Op == OpS390XMOVDconst {
 17096  			v_0 := b.Controls[0]
 17097  			x := auxIntToInt64(v_0.AuxInt)
 17098  			y := auxIntToInt8(b.AuxInt)
 17099  			c := auxToS390xCCMask(b.Aux)
 17100  			if !(c&s390x.Less == 0 && int32(x) < int32(y)) {
 17101  				break
 17102  			}
 17103  			b.Reset(BlockFirst)
 17104  			b.swapSuccessors()
 17105  			return true
 17106  		}
 17107  		// match: (CIJ {c} (MOVDconst [x]) [y] yes no)
 17108  		// cond: c&s390x.Greater == 0 && int32(x) > int32(y)
 17109  		// result: (First no yes)
 17110  		for b.Controls[0].Op == OpS390XMOVDconst {
 17111  			v_0 := b.Controls[0]
 17112  			x := auxIntToInt64(v_0.AuxInt)
 17113  			y := auxIntToInt8(b.AuxInt)
 17114  			c := auxToS390xCCMask(b.Aux)
 17115  			if !(c&s390x.Greater == 0 && int32(x) > int32(y)) {
 17116  				break
 17117  			}
 17118  			b.Reset(BlockFirst)
 17119  			b.swapSuccessors()
 17120  			return true
 17121  		}
 17122  	case BlockS390XCLGIJ:
 17123  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 17124  		// cond: c&s390x.Equal != 0 && uint64(x) == uint64(y)
 17125  		// result: (First yes no)
 17126  		for b.Controls[0].Op == OpS390XMOVDconst {
 17127  			v_0 := b.Controls[0]
 17128  			x := auxIntToInt64(v_0.AuxInt)
 17129  			y := auxIntToUint8(b.AuxInt)
 17130  			c := auxToS390xCCMask(b.Aux)
 17131  			if !(c&s390x.Equal != 0 && uint64(x) == uint64(y)) {
 17132  				break
 17133  			}
 17134  			b.Reset(BlockFirst)
 17135  			return true
 17136  		}
 17137  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 17138  		// cond: c&s390x.Less != 0 && uint64(x) < uint64(y)
 17139  		// result: (First yes no)
 17140  		for b.Controls[0].Op == OpS390XMOVDconst {
 17141  			v_0 := b.Controls[0]
 17142  			x := auxIntToInt64(v_0.AuxInt)
 17143  			y := auxIntToUint8(b.AuxInt)
 17144  			c := auxToS390xCCMask(b.Aux)
 17145  			if !(c&s390x.Less != 0 && uint64(x) < uint64(y)) {
 17146  				break
 17147  			}
 17148  			b.Reset(BlockFirst)
 17149  			return true
 17150  		}
 17151  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 17152  		// cond: c&s390x.Greater != 0 && uint64(x) > uint64(y)
 17153  		// result: (First yes no)
 17154  		for b.Controls[0].Op == OpS390XMOVDconst {
 17155  			v_0 := b.Controls[0]
 17156  			x := auxIntToInt64(v_0.AuxInt)
 17157  			y := auxIntToUint8(b.AuxInt)
 17158  			c := auxToS390xCCMask(b.Aux)
 17159  			if !(c&s390x.Greater != 0 && uint64(x) > uint64(y)) {
 17160  				break
 17161  			}
 17162  			b.Reset(BlockFirst)
 17163  			return true
 17164  		}
 17165  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 17166  		// cond: c&s390x.Equal == 0 && uint64(x) == uint64(y)
 17167  		// result: (First no yes)
 17168  		for b.Controls[0].Op == OpS390XMOVDconst {
 17169  			v_0 := b.Controls[0]
 17170  			x := auxIntToInt64(v_0.AuxInt)
 17171  			y := auxIntToUint8(b.AuxInt)
 17172  			c := auxToS390xCCMask(b.Aux)
 17173  			if !(c&s390x.Equal == 0 && uint64(x) == uint64(y)) {
 17174  				break
 17175  			}
 17176  			b.Reset(BlockFirst)
 17177  			b.swapSuccessors()
 17178  			return true
 17179  		}
 17180  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 17181  		// cond: c&s390x.Less == 0 && uint64(x) < uint64(y)
 17182  		// result: (First no yes)
 17183  		for b.Controls[0].Op == OpS390XMOVDconst {
 17184  			v_0 := b.Controls[0]
 17185  			x := auxIntToInt64(v_0.AuxInt)
 17186  			y := auxIntToUint8(b.AuxInt)
 17187  			c := auxToS390xCCMask(b.Aux)
 17188  			if !(c&s390x.Less == 0 && uint64(x) < uint64(y)) {
 17189  				break
 17190  			}
 17191  			b.Reset(BlockFirst)
 17192  			b.swapSuccessors()
 17193  			return true
 17194  		}
 17195  		// match: (CLGIJ {c} (MOVDconst [x]) [y] yes no)
 17196  		// cond: c&s390x.Greater == 0 && uint64(x) > uint64(y)
 17197  		// result: (First no yes)
 17198  		for b.Controls[0].Op == OpS390XMOVDconst {
 17199  			v_0 := b.Controls[0]
 17200  			x := auxIntToInt64(v_0.AuxInt)
 17201  			y := auxIntToUint8(b.AuxInt)
 17202  			c := auxToS390xCCMask(b.Aux)
 17203  			if !(c&s390x.Greater == 0 && uint64(x) > uint64(y)) {
 17204  				break
 17205  			}
 17206  			b.Reset(BlockFirst)
 17207  			b.swapSuccessors()
 17208  			return true
 17209  		}
 17210  		// match: (CLGIJ {s390x.GreaterOrEqual} _ [0] yes no)
 17211  		// result: (First yes no)
 17212  		for {
 17213  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 17214  				break
 17215  			}
 17216  			b.Reset(BlockFirst)
 17217  			return true
 17218  		}
 17219  		// match: (CLGIJ {s390x.Less} _ [0] yes no)
 17220  		// result: (First no yes)
 17221  		for {
 17222  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
 17223  				break
 17224  			}
 17225  			b.Reset(BlockFirst)
 17226  			b.swapSuccessors()
 17227  			return true
 17228  		}
 17229  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 17230  		// result: (BRC {s390x.NoCarry} carry)
 17231  		for b.Controls[0].Op == OpSelect0 {
 17232  			v_0 := b.Controls[0]
 17233  			v_0_0 := v_0.Args[0]
 17234  			if v_0_0.Op != OpS390XADDE {
 17235  				break
 17236  			}
 17237  			carry := v_0_0.Args[2]
 17238  			v_0_0_0 := v_0_0.Args[0]
 17239  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 17240  				break
 17241  			}
 17242  			v_0_0_1 := v_0_0.Args[1]
 17243  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 17244  				break
 17245  			}
 17246  			b.resetWithControl(BlockS390XBRC, carry)
 17247  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 17248  			return true
 17249  		}
 17250  		// match: (CLGIJ {s390x.Equal} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 17251  		// result: (BRC {s390x.Carry} carry)
 17252  		for b.Controls[0].Op == OpSelect0 {
 17253  			v_0 := b.Controls[0]
 17254  			v_0_0 := v_0.Args[0]
 17255  			if v_0_0.Op != OpS390XADDE {
 17256  				break
 17257  			}
 17258  			carry := v_0_0.Args[2]
 17259  			v_0_0_0 := v_0_0.Args[0]
 17260  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 17261  				break
 17262  			}
 17263  			v_0_0_1 := v_0_0.Args[1]
 17264  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.Equal {
 17265  				break
 17266  			}
 17267  			b.resetWithControl(BlockS390XBRC, carry)
 17268  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 17269  			return true
 17270  		}
 17271  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 17272  		// result: (BRC {s390x.Carry} carry)
 17273  		for b.Controls[0].Op == OpSelect0 {
 17274  			v_0 := b.Controls[0]
 17275  			v_0_0 := v_0.Args[0]
 17276  			if v_0_0.Op != OpS390XADDE {
 17277  				break
 17278  			}
 17279  			carry := v_0_0.Args[2]
 17280  			v_0_0_0 := v_0_0.Args[0]
 17281  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 17282  				break
 17283  			}
 17284  			v_0_0_1 := v_0_0.Args[1]
 17285  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 17286  				break
 17287  			}
 17288  			b.resetWithControl(BlockS390XBRC, carry)
 17289  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 17290  			return true
 17291  		}
 17292  		// match: (CLGIJ {s390x.LessOrGreater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [1])
 17293  		// result: (BRC {s390x.NoCarry} carry)
 17294  		for b.Controls[0].Op == OpSelect0 {
 17295  			v_0 := b.Controls[0]
 17296  			v_0_0 := v_0.Args[0]
 17297  			if v_0_0.Op != OpS390XADDE {
 17298  				break
 17299  			}
 17300  			carry := v_0_0.Args[2]
 17301  			v_0_0_0 := v_0_0.Args[0]
 17302  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 17303  				break
 17304  			}
 17305  			v_0_0_1 := v_0_0.Args[1]
 17306  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 1 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater {
 17307  				break
 17308  			}
 17309  			b.resetWithControl(BlockS390XBRC, carry)
 17310  			b.Aux = s390xCCMaskToAux(s390x.NoCarry)
 17311  			return true
 17312  		}
 17313  		// match: (CLGIJ {s390x.Greater} (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) carry)) [0])
 17314  		// result: (BRC {s390x.Carry} carry)
 17315  		for b.Controls[0].Op == OpSelect0 {
 17316  			v_0 := b.Controls[0]
 17317  			v_0_0 := v_0.Args[0]
 17318  			if v_0_0.Op != OpS390XADDE {
 17319  				break
 17320  			}
 17321  			carry := v_0_0.Args[2]
 17322  			v_0_0_0 := v_0_0.Args[0]
 17323  			if v_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0.AuxInt) != 0 {
 17324  				break
 17325  			}
 17326  			v_0_0_1 := v_0_0.Args[1]
 17327  			if v_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_1.AuxInt) != 0 || auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Greater {
 17328  				break
 17329  			}
 17330  			b.resetWithControl(BlockS390XBRC, carry)
 17331  			b.Aux = s390xCCMaskToAux(s390x.Carry)
 17332  			return true
 17333  		}
 17334  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 17335  		// result: (BRC {s390x.NoBorrow} borrow)
 17336  		for b.Controls[0].Op == OpS390XNEG {
 17337  			v_0 := b.Controls[0]
 17338  			v_0_0 := v_0.Args[0]
 17339  			if v_0_0.Op != OpSelect0 {
 17340  				break
 17341  			}
 17342  			v_0_0_0 := v_0_0.Args[0]
 17343  			if v_0_0_0.Op != OpS390XSUBE {
 17344  				break
 17345  			}
 17346  			borrow := v_0_0_0.Args[2]
 17347  			v_0_0_0_0 := v_0_0_0.Args[0]
 17348  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 17349  				break
 17350  			}
 17351  			v_0_0_0_1 := v_0_0_0.Args[1]
 17352  			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 {
 17353  				break
 17354  			}
 17355  			b.resetWithControl(BlockS390XBRC, borrow)
 17356  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 17357  			return true
 17358  		}
 17359  		// match: (CLGIJ {s390x.Equal} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 17360  		// result: (BRC {s390x.Borrow} borrow)
 17361  		for b.Controls[0].Op == OpS390XNEG {
 17362  			v_0 := b.Controls[0]
 17363  			v_0_0 := v_0.Args[0]
 17364  			if v_0_0.Op != OpSelect0 {
 17365  				break
 17366  			}
 17367  			v_0_0_0 := v_0_0.Args[0]
 17368  			if v_0_0_0.Op != OpS390XSUBE {
 17369  				break
 17370  			}
 17371  			borrow := v_0_0_0.Args[2]
 17372  			v_0_0_0_0 := v_0_0_0.Args[0]
 17373  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 17374  				break
 17375  			}
 17376  			v_0_0_0_1 := v_0_0_0.Args[1]
 17377  			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 {
 17378  				break
 17379  			}
 17380  			b.resetWithControl(BlockS390XBRC, borrow)
 17381  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 17382  			return true
 17383  		}
 17384  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 17385  		// result: (BRC {s390x.Borrow} borrow)
 17386  		for b.Controls[0].Op == OpS390XNEG {
 17387  			v_0 := b.Controls[0]
 17388  			v_0_0 := v_0.Args[0]
 17389  			if v_0_0.Op != OpSelect0 {
 17390  				break
 17391  			}
 17392  			v_0_0_0 := v_0_0.Args[0]
 17393  			if v_0_0_0.Op != OpS390XSUBE {
 17394  				break
 17395  			}
 17396  			borrow := v_0_0_0.Args[2]
 17397  			v_0_0_0_0 := v_0_0_0.Args[0]
 17398  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 17399  				break
 17400  			}
 17401  			v_0_0_0_1 := v_0_0_0.Args[1]
 17402  			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 {
 17403  				break
 17404  			}
 17405  			b.resetWithControl(BlockS390XBRC, borrow)
 17406  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 17407  			return true
 17408  		}
 17409  		// match: (CLGIJ {s390x.LessOrGreater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [1])
 17410  		// result: (BRC {s390x.NoBorrow} borrow)
 17411  		for b.Controls[0].Op == OpS390XNEG {
 17412  			v_0 := b.Controls[0]
 17413  			v_0_0 := v_0.Args[0]
 17414  			if v_0_0.Op != OpSelect0 {
 17415  				break
 17416  			}
 17417  			v_0_0_0 := v_0_0.Args[0]
 17418  			if v_0_0_0.Op != OpS390XSUBE {
 17419  				break
 17420  			}
 17421  			borrow := v_0_0_0.Args[2]
 17422  			v_0_0_0_0 := v_0_0_0.Args[0]
 17423  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 17424  				break
 17425  			}
 17426  			v_0_0_0_1 := v_0_0_0.Args[1]
 17427  			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 {
 17428  				break
 17429  			}
 17430  			b.resetWithControl(BlockS390XBRC, borrow)
 17431  			b.Aux = s390xCCMaskToAux(s390x.NoBorrow)
 17432  			return true
 17433  		}
 17434  		// match: (CLGIJ {s390x.Greater} (NEG (Select0 (SUBE (MOVDconst [0]) (MOVDconst [0]) borrow))) [0])
 17435  		// result: (BRC {s390x.Borrow} borrow)
 17436  		for b.Controls[0].Op == OpS390XNEG {
 17437  			v_0 := b.Controls[0]
 17438  			v_0_0 := v_0.Args[0]
 17439  			if v_0_0.Op != OpSelect0 {
 17440  				break
 17441  			}
 17442  			v_0_0_0 := v_0_0.Args[0]
 17443  			if v_0_0_0.Op != OpS390XSUBE {
 17444  				break
 17445  			}
 17446  			borrow := v_0_0_0.Args[2]
 17447  			v_0_0_0_0 := v_0_0_0.Args[0]
 17448  			if v_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0_0_0.AuxInt) != 0 {
 17449  				break
 17450  			}
 17451  			v_0_0_0_1 := v_0_0_0.Args[1]
 17452  			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 {
 17453  				break
 17454  			}
 17455  			b.resetWithControl(BlockS390XBRC, borrow)
 17456  			b.Aux = s390xCCMaskToAux(s390x.Borrow)
 17457  			return true
 17458  		}
 17459  	case BlockS390XCLGRJ:
 17460  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 17461  		// cond: isU8Bit(y)
 17462  		// result: (CLGIJ {c} x [uint8(y)] yes no)
 17463  		for b.Controls[1].Op == OpS390XMOVDconst {
 17464  			x := b.Controls[0]
 17465  			v_1 := b.Controls[1]
 17466  			y := auxIntToInt64(v_1.AuxInt)
 17467  			c := auxToS390xCCMask(b.Aux)
 17468  			if !(isU8Bit(y)) {
 17469  				break
 17470  			}
 17471  			b.resetWithControl(BlockS390XCLGIJ, x)
 17472  			b.AuxInt = uint8ToAuxInt(uint8(y))
 17473  			b.Aux = s390xCCMaskToAux(c)
 17474  			return true
 17475  		}
 17476  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 17477  		// cond: isU8Bit(x)
 17478  		// result: (CLGIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 17479  		for b.Controls[0].Op == OpS390XMOVDconst {
 17480  			v_0 := b.Controls[0]
 17481  			x := auxIntToInt64(v_0.AuxInt)
 17482  			y := b.Controls[1]
 17483  			c := auxToS390xCCMask(b.Aux)
 17484  			if !(isU8Bit(x)) {
 17485  				break
 17486  			}
 17487  			b.resetWithControl(BlockS390XCLGIJ, y)
 17488  			b.AuxInt = uint8ToAuxInt(uint8(x))
 17489  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 17490  			return true
 17491  		}
 17492  		// match: (CLGRJ {c} x (MOVDconst [y]) yes no)
 17493  		// cond: !isU8Bit(y) && isU32Bit(y)
 17494  		// result: (BRC {c} (CMPUconst x [int32(y)]) yes no)
 17495  		for b.Controls[1].Op == OpS390XMOVDconst {
 17496  			x := b.Controls[0]
 17497  			v_1 := b.Controls[1]
 17498  			y := auxIntToInt64(v_1.AuxInt)
 17499  			c := auxToS390xCCMask(b.Aux)
 17500  			if !(!isU8Bit(y) && isU32Bit(y)) {
 17501  				break
 17502  			}
 17503  			v0 := b.NewValue0(x.Pos, OpS390XCMPUconst, types.TypeFlags)
 17504  			v0.AuxInt = int32ToAuxInt(int32(y))
 17505  			v0.AddArg(x)
 17506  			b.resetWithControl(BlockS390XBRC, v0)
 17507  			b.Aux = s390xCCMaskToAux(c)
 17508  			return true
 17509  		}
 17510  		// match: (CLGRJ {c} (MOVDconst [x]) y yes no)
 17511  		// cond: !isU8Bit(x) && isU32Bit(x)
 17512  		// result: (BRC {c.ReverseComparison()} (CMPUconst y [int32(x)]) yes no)
 17513  		for b.Controls[0].Op == OpS390XMOVDconst {
 17514  			v_0 := b.Controls[0]
 17515  			x := auxIntToInt64(v_0.AuxInt)
 17516  			y := b.Controls[1]
 17517  			c := auxToS390xCCMask(b.Aux)
 17518  			if !(!isU8Bit(x) && isU32Bit(x)) {
 17519  				break
 17520  			}
 17521  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPUconst, types.TypeFlags)
 17522  			v0.AuxInt = int32ToAuxInt(int32(x))
 17523  			v0.AddArg(y)
 17524  			b.resetWithControl(BlockS390XBRC, v0)
 17525  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 17526  			return true
 17527  		}
 17528  		// match: (CLGRJ {c} x y yes no)
 17529  		// cond: x == y && c&s390x.Equal != 0
 17530  		// result: (First yes no)
 17531  		for {
 17532  			x := b.Controls[0]
 17533  			y := b.Controls[1]
 17534  			c := auxToS390xCCMask(b.Aux)
 17535  			if !(x == y && c&s390x.Equal != 0) {
 17536  				break
 17537  			}
 17538  			b.Reset(BlockFirst)
 17539  			return true
 17540  		}
 17541  		// match: (CLGRJ {c} x y yes no)
 17542  		// cond: x == y && c&s390x.Equal == 0
 17543  		// result: (First no yes)
 17544  		for {
 17545  			x := b.Controls[0]
 17546  			y := b.Controls[1]
 17547  			c := auxToS390xCCMask(b.Aux)
 17548  			if !(x == y && c&s390x.Equal == 0) {
 17549  				break
 17550  			}
 17551  			b.Reset(BlockFirst)
 17552  			b.swapSuccessors()
 17553  			return true
 17554  		}
 17555  	case BlockS390XCLIJ:
 17556  		// match: (CLIJ {s390x.LessOrGreater} (LOCGR {d} (MOVDconst [0]) (MOVDconst [x]) cmp) [0] yes no)
 17557  		// cond: int32(x) != 0
 17558  		// result: (BRC {d} cmp yes no)
 17559  		for b.Controls[0].Op == OpS390XLOCGR {
 17560  			v_0 := b.Controls[0]
 17561  			d := auxToS390xCCMask(v_0.Aux)
 17562  			cmp := v_0.Args[2]
 17563  			v_0_0 := v_0.Args[0]
 17564  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != 0 {
 17565  				break
 17566  			}
 17567  			v_0_1 := v_0.Args[1]
 17568  			if v_0_1.Op != OpS390XMOVDconst {
 17569  				break
 17570  			}
 17571  			x := auxIntToInt64(v_0_1.AuxInt)
 17572  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.LessOrGreater || !(int32(x) != 0) {
 17573  				break
 17574  			}
 17575  			b.resetWithControl(BlockS390XBRC, cmp)
 17576  			b.Aux = s390xCCMaskToAux(d)
 17577  			return true
 17578  		}
 17579  		// match: (CLIJ {c} (MOVWreg x) [y] yes no)
 17580  		// result: (CLIJ {c} x [y] yes no)
 17581  		for b.Controls[0].Op == OpS390XMOVWreg {
 17582  			v_0 := b.Controls[0]
 17583  			x := v_0.Args[0]
 17584  			y := auxIntToUint8(b.AuxInt)
 17585  			c := auxToS390xCCMask(b.Aux)
 17586  			b.resetWithControl(BlockS390XCLIJ, x)
 17587  			b.AuxInt = uint8ToAuxInt(y)
 17588  			b.Aux = s390xCCMaskToAux(c)
 17589  			return true
 17590  		}
 17591  		// match: (CLIJ {c} (MOVWZreg x) [y] yes no)
 17592  		// result: (CLIJ {c} x [y] yes no)
 17593  		for b.Controls[0].Op == OpS390XMOVWZreg {
 17594  			v_0 := b.Controls[0]
 17595  			x := v_0.Args[0]
 17596  			y := auxIntToUint8(b.AuxInt)
 17597  			c := auxToS390xCCMask(b.Aux)
 17598  			b.resetWithControl(BlockS390XCLIJ, x)
 17599  			b.AuxInt = uint8ToAuxInt(y)
 17600  			b.Aux = s390xCCMaskToAux(c)
 17601  			return true
 17602  		}
 17603  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 17604  		// cond: c&s390x.Equal != 0 && uint32(x) == uint32(y)
 17605  		// result: (First yes no)
 17606  		for b.Controls[0].Op == OpS390XMOVDconst {
 17607  			v_0 := b.Controls[0]
 17608  			x := auxIntToInt64(v_0.AuxInt)
 17609  			y := auxIntToUint8(b.AuxInt)
 17610  			c := auxToS390xCCMask(b.Aux)
 17611  			if !(c&s390x.Equal != 0 && uint32(x) == uint32(y)) {
 17612  				break
 17613  			}
 17614  			b.Reset(BlockFirst)
 17615  			return true
 17616  		}
 17617  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 17618  		// cond: c&s390x.Less != 0 && uint32(x) < uint32(y)
 17619  		// result: (First yes no)
 17620  		for b.Controls[0].Op == OpS390XMOVDconst {
 17621  			v_0 := b.Controls[0]
 17622  			x := auxIntToInt64(v_0.AuxInt)
 17623  			y := auxIntToUint8(b.AuxInt)
 17624  			c := auxToS390xCCMask(b.Aux)
 17625  			if !(c&s390x.Less != 0 && uint32(x) < uint32(y)) {
 17626  				break
 17627  			}
 17628  			b.Reset(BlockFirst)
 17629  			return true
 17630  		}
 17631  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 17632  		// cond: c&s390x.Greater != 0 && uint32(x) > uint32(y)
 17633  		// result: (First yes no)
 17634  		for b.Controls[0].Op == OpS390XMOVDconst {
 17635  			v_0 := b.Controls[0]
 17636  			x := auxIntToInt64(v_0.AuxInt)
 17637  			y := auxIntToUint8(b.AuxInt)
 17638  			c := auxToS390xCCMask(b.Aux)
 17639  			if !(c&s390x.Greater != 0 && uint32(x) > uint32(y)) {
 17640  				break
 17641  			}
 17642  			b.Reset(BlockFirst)
 17643  			return true
 17644  		}
 17645  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 17646  		// cond: c&s390x.Equal == 0 && uint32(x) == uint32(y)
 17647  		// result: (First no yes)
 17648  		for b.Controls[0].Op == OpS390XMOVDconst {
 17649  			v_0 := b.Controls[0]
 17650  			x := auxIntToInt64(v_0.AuxInt)
 17651  			y := auxIntToUint8(b.AuxInt)
 17652  			c := auxToS390xCCMask(b.Aux)
 17653  			if !(c&s390x.Equal == 0 && uint32(x) == uint32(y)) {
 17654  				break
 17655  			}
 17656  			b.Reset(BlockFirst)
 17657  			b.swapSuccessors()
 17658  			return true
 17659  		}
 17660  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 17661  		// cond: c&s390x.Less == 0 && uint32(x) < uint32(y)
 17662  		// result: (First no yes)
 17663  		for b.Controls[0].Op == OpS390XMOVDconst {
 17664  			v_0 := b.Controls[0]
 17665  			x := auxIntToInt64(v_0.AuxInt)
 17666  			y := auxIntToUint8(b.AuxInt)
 17667  			c := auxToS390xCCMask(b.Aux)
 17668  			if !(c&s390x.Less == 0 && uint32(x) < uint32(y)) {
 17669  				break
 17670  			}
 17671  			b.Reset(BlockFirst)
 17672  			b.swapSuccessors()
 17673  			return true
 17674  		}
 17675  		// match: (CLIJ {c} (MOVDconst [x]) [y] yes no)
 17676  		// cond: c&s390x.Greater == 0 && uint32(x) > uint32(y)
 17677  		// result: (First no yes)
 17678  		for b.Controls[0].Op == OpS390XMOVDconst {
 17679  			v_0 := b.Controls[0]
 17680  			x := auxIntToInt64(v_0.AuxInt)
 17681  			y := auxIntToUint8(b.AuxInt)
 17682  			c := auxToS390xCCMask(b.Aux)
 17683  			if !(c&s390x.Greater == 0 && uint32(x) > uint32(y)) {
 17684  				break
 17685  			}
 17686  			b.Reset(BlockFirst)
 17687  			b.swapSuccessors()
 17688  			return true
 17689  		}
 17690  		// match: (CLIJ {s390x.GreaterOrEqual} _ [0] yes no)
 17691  		// result: (First yes no)
 17692  		for {
 17693  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.GreaterOrEqual {
 17694  				break
 17695  			}
 17696  			b.Reset(BlockFirst)
 17697  			return true
 17698  		}
 17699  		// match: (CLIJ {s390x.Less} _ [0] yes no)
 17700  		// result: (First no yes)
 17701  		for {
 17702  			if auxIntToUint8(b.AuxInt) != 0 || auxToS390xCCMask(b.Aux) != s390x.Less {
 17703  				break
 17704  			}
 17705  			b.Reset(BlockFirst)
 17706  			b.swapSuccessors()
 17707  			return true
 17708  		}
 17709  	case BlockS390XCLRJ:
 17710  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 17711  		// cond: isU8Bit(y)
 17712  		// result: (CLIJ {c} x [uint8(y)] yes no)
 17713  		for b.Controls[1].Op == OpS390XMOVDconst {
 17714  			x := b.Controls[0]
 17715  			v_1 := b.Controls[1]
 17716  			y := auxIntToInt64(v_1.AuxInt)
 17717  			c := auxToS390xCCMask(b.Aux)
 17718  			if !(isU8Bit(y)) {
 17719  				break
 17720  			}
 17721  			b.resetWithControl(BlockS390XCLIJ, x)
 17722  			b.AuxInt = uint8ToAuxInt(uint8(y))
 17723  			b.Aux = s390xCCMaskToAux(c)
 17724  			return true
 17725  		}
 17726  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 17727  		// cond: isU8Bit(x)
 17728  		// result: (CLIJ {c.ReverseComparison()} y [uint8(x)] yes no)
 17729  		for b.Controls[0].Op == OpS390XMOVDconst {
 17730  			v_0 := b.Controls[0]
 17731  			x := auxIntToInt64(v_0.AuxInt)
 17732  			y := b.Controls[1]
 17733  			c := auxToS390xCCMask(b.Aux)
 17734  			if !(isU8Bit(x)) {
 17735  				break
 17736  			}
 17737  			b.resetWithControl(BlockS390XCLIJ, y)
 17738  			b.AuxInt = uint8ToAuxInt(uint8(x))
 17739  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 17740  			return true
 17741  		}
 17742  		// match: (CLRJ {c} x (MOVDconst [y]) yes no)
 17743  		// cond: !isU8Bit(y) && isU32Bit(y)
 17744  		// result: (BRC {c} (CMPWUconst x [int32(y)]) yes no)
 17745  		for b.Controls[1].Op == OpS390XMOVDconst {
 17746  			x := b.Controls[0]
 17747  			v_1 := b.Controls[1]
 17748  			y := auxIntToInt64(v_1.AuxInt)
 17749  			c := auxToS390xCCMask(b.Aux)
 17750  			if !(!isU8Bit(y) && isU32Bit(y)) {
 17751  				break
 17752  			}
 17753  			v0 := b.NewValue0(x.Pos, OpS390XCMPWUconst, types.TypeFlags)
 17754  			v0.AuxInt = int32ToAuxInt(int32(y))
 17755  			v0.AddArg(x)
 17756  			b.resetWithControl(BlockS390XBRC, v0)
 17757  			b.Aux = s390xCCMaskToAux(c)
 17758  			return true
 17759  		}
 17760  		// match: (CLRJ {c} (MOVDconst [x]) y yes no)
 17761  		// cond: !isU8Bit(x) && isU32Bit(x)
 17762  		// result: (BRC {c.ReverseComparison()} (CMPWUconst y [int32(x)]) yes no)
 17763  		for b.Controls[0].Op == OpS390XMOVDconst {
 17764  			v_0 := b.Controls[0]
 17765  			x := auxIntToInt64(v_0.AuxInt)
 17766  			y := b.Controls[1]
 17767  			c := auxToS390xCCMask(b.Aux)
 17768  			if !(!isU8Bit(x) && isU32Bit(x)) {
 17769  				break
 17770  			}
 17771  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPWUconst, types.TypeFlags)
 17772  			v0.AuxInt = int32ToAuxInt(int32(x))
 17773  			v0.AddArg(y)
 17774  			b.resetWithControl(BlockS390XBRC, v0)
 17775  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 17776  			return true
 17777  		}
 17778  		// match: (CLRJ {c} x y yes no)
 17779  		// cond: x == y && c&s390x.Equal != 0
 17780  		// result: (First yes no)
 17781  		for {
 17782  			x := b.Controls[0]
 17783  			y := b.Controls[1]
 17784  			c := auxToS390xCCMask(b.Aux)
 17785  			if !(x == y && c&s390x.Equal != 0) {
 17786  				break
 17787  			}
 17788  			b.Reset(BlockFirst)
 17789  			return true
 17790  		}
 17791  		// match: (CLRJ {c} x y yes no)
 17792  		// cond: x == y && c&s390x.Equal == 0
 17793  		// result: (First no yes)
 17794  		for {
 17795  			x := b.Controls[0]
 17796  			y := b.Controls[1]
 17797  			c := auxToS390xCCMask(b.Aux)
 17798  			if !(x == y && c&s390x.Equal == 0) {
 17799  				break
 17800  			}
 17801  			b.Reset(BlockFirst)
 17802  			b.swapSuccessors()
 17803  			return true
 17804  		}
 17805  	case BlockS390XCRJ:
 17806  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 17807  		// cond: is8Bit(y)
 17808  		// result: (CIJ {c} x [ int8(y)] yes no)
 17809  		for b.Controls[1].Op == OpS390XMOVDconst {
 17810  			x := b.Controls[0]
 17811  			v_1 := b.Controls[1]
 17812  			y := auxIntToInt64(v_1.AuxInt)
 17813  			c := auxToS390xCCMask(b.Aux)
 17814  			if !(is8Bit(y)) {
 17815  				break
 17816  			}
 17817  			b.resetWithControl(BlockS390XCIJ, x)
 17818  			b.AuxInt = int8ToAuxInt(int8(y))
 17819  			b.Aux = s390xCCMaskToAux(c)
 17820  			return true
 17821  		}
 17822  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 17823  		// cond: is8Bit(x)
 17824  		// result: (CIJ {c.ReverseComparison()} y [ int8(x)] yes no)
 17825  		for b.Controls[0].Op == OpS390XMOVDconst {
 17826  			v_0 := b.Controls[0]
 17827  			x := auxIntToInt64(v_0.AuxInt)
 17828  			y := b.Controls[1]
 17829  			c := auxToS390xCCMask(b.Aux)
 17830  			if !(is8Bit(x)) {
 17831  				break
 17832  			}
 17833  			b.resetWithControl(BlockS390XCIJ, y)
 17834  			b.AuxInt = int8ToAuxInt(int8(x))
 17835  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 17836  			return true
 17837  		}
 17838  		// match: (CRJ {c} x (MOVDconst [y]) yes no)
 17839  		// cond: !is8Bit(y) && is32Bit(y)
 17840  		// result: (BRC {c} (CMPWconst x [int32(y)]) yes no)
 17841  		for b.Controls[1].Op == OpS390XMOVDconst {
 17842  			x := b.Controls[0]
 17843  			v_1 := b.Controls[1]
 17844  			y := auxIntToInt64(v_1.AuxInt)
 17845  			c := auxToS390xCCMask(b.Aux)
 17846  			if !(!is8Bit(y) && is32Bit(y)) {
 17847  				break
 17848  			}
 17849  			v0 := b.NewValue0(x.Pos, OpS390XCMPWconst, types.TypeFlags)
 17850  			v0.AuxInt = int32ToAuxInt(int32(y))
 17851  			v0.AddArg(x)
 17852  			b.resetWithControl(BlockS390XBRC, v0)
 17853  			b.Aux = s390xCCMaskToAux(c)
 17854  			return true
 17855  		}
 17856  		// match: (CRJ {c} (MOVDconst [x]) y yes no)
 17857  		// cond: !is8Bit(x) && is32Bit(x)
 17858  		// result: (BRC {c.ReverseComparison()} (CMPWconst y [int32(x)]) yes no)
 17859  		for b.Controls[0].Op == OpS390XMOVDconst {
 17860  			v_0 := b.Controls[0]
 17861  			x := auxIntToInt64(v_0.AuxInt)
 17862  			y := b.Controls[1]
 17863  			c := auxToS390xCCMask(b.Aux)
 17864  			if !(!is8Bit(x) && is32Bit(x)) {
 17865  				break
 17866  			}
 17867  			v0 := b.NewValue0(v_0.Pos, OpS390XCMPWconst, types.TypeFlags)
 17868  			v0.AuxInt = int32ToAuxInt(int32(x))
 17869  			v0.AddArg(y)
 17870  			b.resetWithControl(BlockS390XBRC, v0)
 17871  			b.Aux = s390xCCMaskToAux(c.ReverseComparison())
 17872  			return true
 17873  		}
 17874  		// match: (CRJ {c} x y yes no)
 17875  		// cond: x == y && c&s390x.Equal != 0
 17876  		// result: (First yes no)
 17877  		for {
 17878  			x := b.Controls[0]
 17879  			y := b.Controls[1]
 17880  			c := auxToS390xCCMask(b.Aux)
 17881  			if !(x == y && c&s390x.Equal != 0) {
 17882  				break
 17883  			}
 17884  			b.Reset(BlockFirst)
 17885  			return true
 17886  		}
 17887  		// match: (CRJ {c} x y yes no)
 17888  		// cond: x == y && c&s390x.Equal == 0
 17889  		// result: (First no yes)
 17890  		for {
 17891  			x := b.Controls[0]
 17892  			y := b.Controls[1]
 17893  			c := auxToS390xCCMask(b.Aux)
 17894  			if !(x == y && c&s390x.Equal == 0) {
 17895  				break
 17896  			}
 17897  			b.Reset(BlockFirst)
 17898  			b.swapSuccessors()
 17899  			return true
 17900  		}
 17901  	case BlockIf:
 17902  		// match: (If cond yes no)
 17903  		// result: (CLIJ {s390x.LessOrGreater} (MOVBZreg <typ.Bool> cond) [0] yes no)
 17904  		for {
 17905  			cond := b.Controls[0]
 17906  			v0 := b.NewValue0(cond.Pos, OpS390XMOVBZreg, typ.Bool)
 17907  			v0.AddArg(cond)
 17908  			b.resetWithControl(BlockS390XCLIJ, v0)
 17909  			b.AuxInt = uint8ToAuxInt(0)
 17910  			b.Aux = s390xCCMaskToAux(s390x.LessOrGreater)
 17911  			return true
 17912  		}
 17913  	}
 17914  	return false
 17915  }
 17916  

View as plain text