Black Lives Matter. Support the Equal Justice Initiative.

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

Documentation: cmd/compile/internal/ssa

     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 OpStaticCall:
   796  		v.Op = OpS390XCALLstatic
   797  		return true
   798  	case OpStore:
   799  		return rewriteValueS390X_OpStore(v)
   800  	case OpSub16:
   801  		v.Op = OpS390XSUBW
   802  		return true
   803  	case OpSub32:
   804  		v.Op = OpS390XSUBW
   805  		return true
   806  	case OpSub32F:
   807  		return rewriteValueS390X_OpSub32F(v)
   808  	case OpSub64:
   809  		v.Op = OpS390XSUB
   810  		return true
   811  	case OpSub64F:
   812  		return rewriteValueS390X_OpSub64F(v)
   813  	case OpSub8:
   814  		v.Op = OpS390XSUBW
   815  		return true
   816  	case OpSubPtr:
   817  		v.Op = OpS390XSUB
   818  		return true
   819  	case OpTrunc:
   820  		return rewriteValueS390X_OpTrunc(v)
   821  	case OpTrunc16to8:
   822  		v.Op = OpCopy
   823  		return true
   824  	case OpTrunc32to16:
   825  		v.Op = OpCopy
   826  		return true
   827  	case OpTrunc32to8:
   828  		v.Op = OpCopy
   829  		return true
   830  	case OpTrunc64to16:
   831  		v.Op = OpCopy
   832  		return true
   833  	case OpTrunc64to32:
   834  		v.Op = OpCopy
   835  		return true
   836  	case OpTrunc64to8:
   837  		v.Op = OpCopy
   838  		return true
   839  	case OpWB:
   840  		v.Op = OpS390XLoweredWB
   841  		return true
   842  	case OpXor16:
   843  		v.Op = OpS390XXORW
   844  		return true
   845  	case OpXor32:
   846  		v.Op = OpS390XXORW
   847  		return true
   848  	case OpXor64:
   849  		v.Op = OpS390XXOR
   850  		return true
   851  	case OpXor8:
   852  		v.Op = OpS390XXORW
   853  		return true
   854  	case OpZero:
   855  		return rewriteValueS390X_OpZero(v)
   856  	case OpZeroExt16to32:
   857  		v.Op = OpS390XMOVHZreg
   858  		return true
   859  	case OpZeroExt16to64:
   860  		v.Op = OpS390XMOVHZreg
   861  		return true
   862  	case OpZeroExt32to64:
   863  		v.Op = OpS390XMOVWZreg
   864  		return true
   865  	case OpZeroExt8to16:
   866  		v.Op = OpS390XMOVBZreg
   867  		return true
   868  	case OpZeroExt8to32:
   869  		v.Op = OpS390XMOVBZreg
   870  		return true
   871  	case OpZeroExt8to64:
   872  		v.Op = OpS390XMOVBZreg
   873  		return true
   874  	}
   875  	return false
   876  }
   877  func rewriteValueS390X_OpAdd32F(v *Value) bool {
   878  	v_1 := v.Args[1]
   879  	v_0 := v.Args[0]
   880  	b := v.Block
   881  	typ := &b.Func.Config.Types
   882  	// match: (Add32F x y)
   883  	// result: (Select0 (FADDS x y))
   884  	for {
   885  		x := v_0
   886  		y := v_1
   887  		v.reset(OpSelect0)
   888  		v0 := b.NewValue0(v.Pos, OpS390XFADDS, types.NewTuple(typ.Float32, types.TypeFlags))
   889  		v0.AddArg2(x, y)
   890  		v.AddArg(v0)
   891  		return true
   892  	}
   893  }
   894  func rewriteValueS390X_OpAdd64F(v *Value) bool {
   895  	v_1 := v.Args[1]
   896  	v_0 := v.Args[0]
   897  	b := v.Block
   898  	typ := &b.Func.Config.Types
   899  	// match: (Add64F x y)
   900  	// result: (Select0 (FADD x y))
   901  	for {
   902  		x := v_0
   903  		y := v_1
   904  		v.reset(OpSelect0)
   905  		v0 := b.NewValue0(v.Pos, OpS390XFADD, types.NewTuple(typ.Float64, types.TypeFlags))
   906  		v0.AddArg2(x, y)
   907  		v.AddArg(v0)
   908  		return true
   909  	}
   910  }
   911  func rewriteValueS390X_OpAddr(v *Value) bool {
   912  	v_0 := v.Args[0]
   913  	// match: (Addr {sym} base)
   914  	// result: (MOVDaddr {sym} base)
   915  	for {
   916  		sym := auxToSym(v.Aux)
   917  		base := v_0
   918  		v.reset(OpS390XMOVDaddr)
   919  		v.Aux = symToAux(sym)
   920  		v.AddArg(base)
   921  		return true
   922  	}
   923  }
   924  func rewriteValueS390X_OpAtomicAdd32(v *Value) bool {
   925  	v_2 := v.Args[2]
   926  	v_1 := v.Args[1]
   927  	v_0 := v.Args[0]
   928  	b := v.Block
   929  	typ := &b.Func.Config.Types
   930  	// match: (AtomicAdd32 ptr val mem)
   931  	// result: (AddTupleFirst32 val (LAA ptr val mem))
   932  	for {
   933  		ptr := v_0
   934  		val := v_1
   935  		mem := v_2
   936  		v.reset(OpS390XAddTupleFirst32)
   937  		v0 := b.NewValue0(v.Pos, OpS390XLAA, types.NewTuple(typ.UInt32, types.TypeMem))
   938  		v0.AddArg3(ptr, val, mem)
   939  		v.AddArg2(val, v0)
   940  		return true
   941  	}
   942  }
   943  func rewriteValueS390X_OpAtomicAdd64(v *Value) bool {
   944  	v_2 := v.Args[2]
   945  	v_1 := v.Args[1]
   946  	v_0 := v.Args[0]
   947  	b := v.Block
   948  	typ := &b.Func.Config.Types
   949  	// match: (AtomicAdd64 ptr val mem)
   950  	// result: (AddTupleFirst64 val (LAAG ptr val mem))
   951  	for {
   952  		ptr := v_0
   953  		val := v_1
   954  		mem := v_2
   955  		v.reset(OpS390XAddTupleFirst64)
   956  		v0 := b.NewValue0(v.Pos, OpS390XLAAG, types.NewTuple(typ.UInt64, types.TypeMem))
   957  		v0.AddArg3(ptr, val, mem)
   958  		v.AddArg2(val, v0)
   959  		return true
   960  	}
   961  }
   962  func rewriteValueS390X_OpAtomicAnd8(v *Value) bool {
   963  	v_2 := v.Args[2]
   964  	v_1 := v.Args[1]
   965  	v_0 := v.Args[0]
   966  	b := v.Block
   967  	typ := &b.Func.Config.Types
   968  	// match: (AtomicAnd8 ptr val mem)
   969  	// 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)
   970  	for {
   971  		ptr := v_0
   972  		val := v_1
   973  		mem := v_2
   974  		v.reset(OpS390XLANfloor)
   975  		v0 := b.NewValue0(v.Pos, OpS390XRLL, typ.UInt32)
   976  		v1 := b.NewValue0(v.Pos, OpS390XORWconst, typ.UInt32)
   977  		v1.AuxInt = int32ToAuxInt(-1 << 8)
   978  		v1.AddArg(val)
   979  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
   980  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
   981  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
   982  		v3.AuxInt = int64ToAuxInt(3 << 3)
   983  		v2.AddArg2(v3, ptr)
   984  		v0.AddArg2(v1, v2)
   985  		v.AddArg3(ptr, v0, mem)
   986  		return true
   987  	}
   988  }
   989  func rewriteValueS390X_OpAtomicCompareAndSwap32(v *Value) bool {
   990  	v_3 := v.Args[3]
   991  	v_2 := v.Args[2]
   992  	v_1 := v.Args[1]
   993  	v_0 := v.Args[0]
   994  	// match: (AtomicCompareAndSwap32 ptr old new_ mem)
   995  	// result: (LoweredAtomicCas32 ptr old new_ mem)
   996  	for {
   997  		ptr := v_0
   998  		old := v_1
   999  		new_ := v_2
  1000  		mem := v_3
  1001  		v.reset(OpS390XLoweredAtomicCas32)
  1002  		v.AddArg4(ptr, old, new_, mem)
  1003  		return true
  1004  	}
  1005  }
  1006  func rewriteValueS390X_OpAtomicCompareAndSwap64(v *Value) bool {
  1007  	v_3 := v.Args[3]
  1008  	v_2 := v.Args[2]
  1009  	v_1 := v.Args[1]
  1010  	v_0 := v.Args[0]
  1011  	// match: (AtomicCompareAndSwap64 ptr old new_ mem)
  1012  	// result: (LoweredAtomicCas64 ptr old new_ mem)
  1013  	for {
  1014  		ptr := v_0
  1015  		old := v_1
  1016  		new_ := v_2
  1017  		mem := v_3
  1018  		v.reset(OpS390XLoweredAtomicCas64)
  1019  		v.AddArg4(ptr, old, new_, mem)
  1020  		return true
  1021  	}
  1022  }
  1023  func rewriteValueS390X_OpAtomicExchange32(v *Value) bool {
  1024  	v_2 := v.Args[2]
  1025  	v_1 := v.Args[1]
  1026  	v_0 := v.Args[0]
  1027  	// match: (AtomicExchange32 ptr val mem)
  1028  	// result: (LoweredAtomicExchange32 ptr val mem)
  1029  	for {
  1030  		ptr := v_0
  1031  		val := v_1
  1032  		mem := v_2
  1033  		v.reset(OpS390XLoweredAtomicExchange32)
  1034  		v.AddArg3(ptr, val, mem)
  1035  		return true
  1036  	}
  1037  }
  1038  func rewriteValueS390X_OpAtomicExchange64(v *Value) bool {
  1039  	v_2 := v.Args[2]
  1040  	v_1 := v.Args[1]
  1041  	v_0 := v.Args[0]
  1042  	// match: (AtomicExchange64 ptr val mem)
  1043  	// result: (LoweredAtomicExchange64 ptr val mem)
  1044  	for {
  1045  		ptr := v_0
  1046  		val := v_1
  1047  		mem := v_2
  1048  		v.reset(OpS390XLoweredAtomicExchange64)
  1049  		v.AddArg3(ptr, val, mem)
  1050  		return true
  1051  	}
  1052  }
  1053  func rewriteValueS390X_OpAtomicLoad32(v *Value) bool {
  1054  	v_1 := v.Args[1]
  1055  	v_0 := v.Args[0]
  1056  	// match: (AtomicLoad32 ptr mem)
  1057  	// result: (MOVWZatomicload ptr mem)
  1058  	for {
  1059  		ptr := v_0
  1060  		mem := v_1
  1061  		v.reset(OpS390XMOVWZatomicload)
  1062  		v.AddArg2(ptr, mem)
  1063  		return true
  1064  	}
  1065  }
  1066  func rewriteValueS390X_OpAtomicLoad64(v *Value) bool {
  1067  	v_1 := v.Args[1]
  1068  	v_0 := v.Args[0]
  1069  	// match: (AtomicLoad64 ptr mem)
  1070  	// result: (MOVDatomicload ptr mem)
  1071  	for {
  1072  		ptr := v_0
  1073  		mem := v_1
  1074  		v.reset(OpS390XMOVDatomicload)
  1075  		v.AddArg2(ptr, mem)
  1076  		return true
  1077  	}
  1078  }
  1079  func rewriteValueS390X_OpAtomicLoad8(v *Value) bool {
  1080  	v_1 := v.Args[1]
  1081  	v_0 := v.Args[0]
  1082  	// match: (AtomicLoad8 ptr mem)
  1083  	// result: (MOVBZatomicload ptr mem)
  1084  	for {
  1085  		ptr := v_0
  1086  		mem := v_1
  1087  		v.reset(OpS390XMOVBZatomicload)
  1088  		v.AddArg2(ptr, mem)
  1089  		return true
  1090  	}
  1091  }
  1092  func rewriteValueS390X_OpAtomicLoadAcq32(v *Value) bool {
  1093  	v_1 := v.Args[1]
  1094  	v_0 := v.Args[0]
  1095  	// match: (AtomicLoadAcq32 ptr mem)
  1096  	// result: (MOVWZatomicload ptr mem)
  1097  	for {
  1098  		ptr := v_0
  1099  		mem := v_1
  1100  		v.reset(OpS390XMOVWZatomicload)
  1101  		v.AddArg2(ptr, mem)
  1102  		return true
  1103  	}
  1104  }
  1105  func rewriteValueS390X_OpAtomicLoadPtr(v *Value) bool {
  1106  	v_1 := v.Args[1]
  1107  	v_0 := v.Args[0]
  1108  	// match: (AtomicLoadPtr ptr mem)
  1109  	// result: (MOVDatomicload ptr mem)
  1110  	for {
  1111  		ptr := v_0
  1112  		mem := v_1
  1113  		v.reset(OpS390XMOVDatomicload)
  1114  		v.AddArg2(ptr, mem)
  1115  		return true
  1116  	}
  1117  }
  1118  func rewriteValueS390X_OpAtomicOr8(v *Value) bool {
  1119  	v_2 := v.Args[2]
  1120  	v_1 := v.Args[1]
  1121  	v_0 := v.Args[0]
  1122  	b := v.Block
  1123  	typ := &b.Func.Config.Types
  1124  	// match: (AtomicOr8 ptr val mem)
  1125  	// result: (LAOfloor ptr (SLW <typ.UInt32> (MOVBZreg <typ.UInt32> val) (RXSBG <typ.UInt32> {s390x.NewRotateParams(59, 60, 3)} (MOVDconst [3<<3]) ptr)) mem)
  1126  	for {
  1127  		ptr := v_0
  1128  		val := v_1
  1129  		mem := v_2
  1130  		v.reset(OpS390XLAOfloor)
  1131  		v0 := b.NewValue0(v.Pos, OpS390XSLW, typ.UInt32)
  1132  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt32)
  1133  		v1.AddArg(val)
  1134  		v2 := b.NewValue0(v.Pos, OpS390XRXSBG, typ.UInt32)
  1135  		v2.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(59, 60, 3))
  1136  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1137  		v3.AuxInt = int64ToAuxInt(3 << 3)
  1138  		v2.AddArg2(v3, ptr)
  1139  		v0.AddArg2(v1, v2)
  1140  		v.AddArg3(ptr, v0, mem)
  1141  		return true
  1142  	}
  1143  }
  1144  func rewriteValueS390X_OpAtomicStore32(v *Value) bool {
  1145  	v_2 := v.Args[2]
  1146  	v_1 := v.Args[1]
  1147  	v_0 := v.Args[0]
  1148  	b := v.Block
  1149  	// match: (AtomicStore32 ptr val mem)
  1150  	// result: (SYNC (MOVWatomicstore ptr val mem))
  1151  	for {
  1152  		ptr := v_0
  1153  		val := v_1
  1154  		mem := v_2
  1155  		v.reset(OpS390XSYNC)
  1156  		v0 := b.NewValue0(v.Pos, OpS390XMOVWatomicstore, types.TypeMem)
  1157  		v0.AddArg3(ptr, val, mem)
  1158  		v.AddArg(v0)
  1159  		return true
  1160  	}
  1161  }
  1162  func rewriteValueS390X_OpAtomicStore64(v *Value) bool {
  1163  	v_2 := v.Args[2]
  1164  	v_1 := v.Args[1]
  1165  	v_0 := v.Args[0]
  1166  	b := v.Block
  1167  	// match: (AtomicStore64 ptr val mem)
  1168  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1169  	for {
  1170  		ptr := v_0
  1171  		val := v_1
  1172  		mem := v_2
  1173  		v.reset(OpS390XSYNC)
  1174  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1175  		v0.AddArg3(ptr, val, mem)
  1176  		v.AddArg(v0)
  1177  		return true
  1178  	}
  1179  }
  1180  func rewriteValueS390X_OpAtomicStore8(v *Value) bool {
  1181  	v_2 := v.Args[2]
  1182  	v_1 := v.Args[1]
  1183  	v_0 := v.Args[0]
  1184  	b := v.Block
  1185  	// match: (AtomicStore8 ptr val mem)
  1186  	// result: (SYNC (MOVBatomicstore ptr val mem))
  1187  	for {
  1188  		ptr := v_0
  1189  		val := v_1
  1190  		mem := v_2
  1191  		v.reset(OpS390XSYNC)
  1192  		v0 := b.NewValue0(v.Pos, OpS390XMOVBatomicstore, types.TypeMem)
  1193  		v0.AddArg3(ptr, val, mem)
  1194  		v.AddArg(v0)
  1195  		return true
  1196  	}
  1197  }
  1198  func rewriteValueS390X_OpAtomicStorePtrNoWB(v *Value) bool {
  1199  	v_2 := v.Args[2]
  1200  	v_1 := v.Args[1]
  1201  	v_0 := v.Args[0]
  1202  	b := v.Block
  1203  	// match: (AtomicStorePtrNoWB ptr val mem)
  1204  	// result: (SYNC (MOVDatomicstore ptr val mem))
  1205  	for {
  1206  		ptr := v_0
  1207  		val := v_1
  1208  		mem := v_2
  1209  		v.reset(OpS390XSYNC)
  1210  		v0 := b.NewValue0(v.Pos, OpS390XMOVDatomicstore, types.TypeMem)
  1211  		v0.AddArg3(ptr, val, mem)
  1212  		v.AddArg(v0)
  1213  		return true
  1214  	}
  1215  }
  1216  func rewriteValueS390X_OpAtomicStoreRel32(v *Value) bool {
  1217  	v_2 := v.Args[2]
  1218  	v_1 := v.Args[1]
  1219  	v_0 := v.Args[0]
  1220  	// match: (AtomicStoreRel32 ptr val mem)
  1221  	// result: (MOVWatomicstore ptr val mem)
  1222  	for {
  1223  		ptr := v_0
  1224  		val := v_1
  1225  		mem := v_2
  1226  		v.reset(OpS390XMOVWatomicstore)
  1227  		v.AddArg3(ptr, val, mem)
  1228  		return true
  1229  	}
  1230  }
  1231  func rewriteValueS390X_OpAvg64u(v *Value) bool {
  1232  	v_1 := v.Args[1]
  1233  	v_0 := v.Args[0]
  1234  	b := v.Block
  1235  	// match: (Avg64u <t> x y)
  1236  	// result: (ADD (SRDconst <t> (SUB <t> x y) [1]) y)
  1237  	for {
  1238  		t := v.Type
  1239  		x := v_0
  1240  		y := v_1
  1241  		v.reset(OpS390XADD)
  1242  		v0 := b.NewValue0(v.Pos, OpS390XSRDconst, t)
  1243  		v0.AuxInt = uint8ToAuxInt(1)
  1244  		v1 := b.NewValue0(v.Pos, OpS390XSUB, t)
  1245  		v1.AddArg2(x, y)
  1246  		v0.AddArg(v1)
  1247  		v.AddArg2(v0, y)
  1248  		return true
  1249  	}
  1250  }
  1251  func rewriteValueS390X_OpBitLen64(v *Value) bool {
  1252  	v_0 := v.Args[0]
  1253  	b := v.Block
  1254  	typ := &b.Func.Config.Types
  1255  	// match: (BitLen64 x)
  1256  	// result: (SUB (MOVDconst [64]) (FLOGR x))
  1257  	for {
  1258  		x := v_0
  1259  		v.reset(OpS390XSUB)
  1260  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1261  		v0.AuxInt = int64ToAuxInt(64)
  1262  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1263  		v1.AddArg(x)
  1264  		v.AddArg2(v0, v1)
  1265  		return true
  1266  	}
  1267  }
  1268  func rewriteValueS390X_OpCeil(v *Value) bool {
  1269  	v_0 := v.Args[0]
  1270  	// match: (Ceil x)
  1271  	// result: (FIDBR [6] x)
  1272  	for {
  1273  		x := v_0
  1274  		v.reset(OpS390XFIDBR)
  1275  		v.AuxInt = int8ToAuxInt(6)
  1276  		v.AddArg(x)
  1277  		return true
  1278  	}
  1279  }
  1280  func rewriteValueS390X_OpConst16(v *Value) bool {
  1281  	// match: (Const16 [val])
  1282  	// result: (MOVDconst [int64(val)])
  1283  	for {
  1284  		val := auxIntToInt16(v.AuxInt)
  1285  		v.reset(OpS390XMOVDconst)
  1286  		v.AuxInt = int64ToAuxInt(int64(val))
  1287  		return true
  1288  	}
  1289  }
  1290  func rewriteValueS390X_OpConst32(v *Value) bool {
  1291  	// match: (Const32 [val])
  1292  	// result: (MOVDconst [int64(val)])
  1293  	for {
  1294  		val := auxIntToInt32(v.AuxInt)
  1295  		v.reset(OpS390XMOVDconst)
  1296  		v.AuxInt = int64ToAuxInt(int64(val))
  1297  		return true
  1298  	}
  1299  }
  1300  func rewriteValueS390X_OpConst64(v *Value) bool {
  1301  	// match: (Const64 [val])
  1302  	// result: (MOVDconst [int64(val)])
  1303  	for {
  1304  		val := auxIntToInt64(v.AuxInt)
  1305  		v.reset(OpS390XMOVDconst)
  1306  		v.AuxInt = int64ToAuxInt(int64(val))
  1307  		return true
  1308  	}
  1309  }
  1310  func rewriteValueS390X_OpConst8(v *Value) bool {
  1311  	// match: (Const8 [val])
  1312  	// result: (MOVDconst [int64(val)])
  1313  	for {
  1314  		val := auxIntToInt8(v.AuxInt)
  1315  		v.reset(OpS390XMOVDconst)
  1316  		v.AuxInt = int64ToAuxInt(int64(val))
  1317  		return true
  1318  	}
  1319  }
  1320  func rewriteValueS390X_OpConstBool(v *Value) bool {
  1321  	// match: (ConstBool [b])
  1322  	// result: (MOVDconst [b2i(b)])
  1323  	for {
  1324  		b := auxIntToBool(v.AuxInt)
  1325  		v.reset(OpS390XMOVDconst)
  1326  		v.AuxInt = int64ToAuxInt(b2i(b))
  1327  		return true
  1328  	}
  1329  }
  1330  func rewriteValueS390X_OpConstNil(v *Value) bool {
  1331  	// match: (ConstNil)
  1332  	// result: (MOVDconst [0])
  1333  	for {
  1334  		v.reset(OpS390XMOVDconst)
  1335  		v.AuxInt = int64ToAuxInt(0)
  1336  		return true
  1337  	}
  1338  }
  1339  func rewriteValueS390X_OpCtz32(v *Value) bool {
  1340  	v_0 := v.Args[0]
  1341  	b := v.Block
  1342  	typ := &b.Func.Config.Types
  1343  	// match: (Ctz32 <t> x)
  1344  	// result: (SUB (MOVDconst [64]) (FLOGR (MOVWZreg (ANDW <t> (SUBWconst <t> [1] x) (NOTW <t> x)))))
  1345  	for {
  1346  		t := v.Type
  1347  		x := v_0
  1348  		v.reset(OpS390XSUB)
  1349  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1350  		v0.AuxInt = int64ToAuxInt(64)
  1351  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1352  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1353  		v3 := b.NewValue0(v.Pos, OpS390XANDW, t)
  1354  		v4 := b.NewValue0(v.Pos, OpS390XSUBWconst, t)
  1355  		v4.AuxInt = int32ToAuxInt(1)
  1356  		v4.AddArg(x)
  1357  		v5 := b.NewValue0(v.Pos, OpS390XNOTW, t)
  1358  		v5.AddArg(x)
  1359  		v3.AddArg2(v4, v5)
  1360  		v2.AddArg(v3)
  1361  		v1.AddArg(v2)
  1362  		v.AddArg2(v0, v1)
  1363  		return true
  1364  	}
  1365  }
  1366  func rewriteValueS390X_OpCtz64(v *Value) bool {
  1367  	v_0 := v.Args[0]
  1368  	b := v.Block
  1369  	typ := &b.Func.Config.Types
  1370  	// match: (Ctz64 <t> x)
  1371  	// result: (SUB (MOVDconst [64]) (FLOGR (AND <t> (SUBconst <t> [1] x) (NOT <t> x))))
  1372  	for {
  1373  		t := v.Type
  1374  		x := v_0
  1375  		v.reset(OpS390XSUB)
  1376  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1377  		v0.AuxInt = int64ToAuxInt(64)
  1378  		v1 := b.NewValue0(v.Pos, OpS390XFLOGR, typ.UInt64)
  1379  		v2 := b.NewValue0(v.Pos, OpS390XAND, t)
  1380  		v3 := b.NewValue0(v.Pos, OpS390XSUBconst, t)
  1381  		v3.AuxInt = int32ToAuxInt(1)
  1382  		v3.AddArg(x)
  1383  		v4 := b.NewValue0(v.Pos, OpS390XNOT, t)
  1384  		v4.AddArg(x)
  1385  		v2.AddArg2(v3, v4)
  1386  		v1.AddArg(v2)
  1387  		v.AddArg2(v0, v1)
  1388  		return true
  1389  	}
  1390  }
  1391  func rewriteValueS390X_OpDiv16(v *Value) bool {
  1392  	v_1 := v.Args[1]
  1393  	v_0 := v.Args[0]
  1394  	b := v.Block
  1395  	typ := &b.Func.Config.Types
  1396  	// match: (Div16 x y)
  1397  	// result: (DIVW (MOVHreg x) (MOVHreg y))
  1398  	for {
  1399  		x := v_0
  1400  		y := v_1
  1401  		v.reset(OpS390XDIVW)
  1402  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1403  		v0.AddArg(x)
  1404  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1405  		v1.AddArg(y)
  1406  		v.AddArg2(v0, v1)
  1407  		return true
  1408  	}
  1409  }
  1410  func rewriteValueS390X_OpDiv16u(v *Value) bool {
  1411  	v_1 := v.Args[1]
  1412  	v_0 := v.Args[0]
  1413  	b := v.Block
  1414  	typ := &b.Func.Config.Types
  1415  	// match: (Div16u x y)
  1416  	// result: (DIVWU (MOVHZreg x) (MOVHZreg y))
  1417  	for {
  1418  		x := v_0
  1419  		y := v_1
  1420  		v.reset(OpS390XDIVWU)
  1421  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1422  		v0.AddArg(x)
  1423  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1424  		v1.AddArg(y)
  1425  		v.AddArg2(v0, v1)
  1426  		return true
  1427  	}
  1428  }
  1429  func rewriteValueS390X_OpDiv32(v *Value) bool {
  1430  	v_1 := v.Args[1]
  1431  	v_0 := v.Args[0]
  1432  	b := v.Block
  1433  	typ := &b.Func.Config.Types
  1434  	// match: (Div32 x y)
  1435  	// result: (DIVW (MOVWreg x) y)
  1436  	for {
  1437  		x := v_0
  1438  		y := v_1
  1439  		v.reset(OpS390XDIVW)
  1440  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1441  		v0.AddArg(x)
  1442  		v.AddArg2(v0, y)
  1443  		return true
  1444  	}
  1445  }
  1446  func rewriteValueS390X_OpDiv32u(v *Value) bool {
  1447  	v_1 := v.Args[1]
  1448  	v_0 := v.Args[0]
  1449  	b := v.Block
  1450  	typ := &b.Func.Config.Types
  1451  	// match: (Div32u x y)
  1452  	// result: (DIVWU (MOVWZreg x) y)
  1453  	for {
  1454  		x := v_0
  1455  		y := v_1
  1456  		v.reset(OpS390XDIVWU)
  1457  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1458  		v0.AddArg(x)
  1459  		v.AddArg2(v0, y)
  1460  		return true
  1461  	}
  1462  }
  1463  func rewriteValueS390X_OpDiv64(v *Value) bool {
  1464  	v_1 := v.Args[1]
  1465  	v_0 := v.Args[0]
  1466  	// match: (Div64 x y)
  1467  	// result: (DIVD x y)
  1468  	for {
  1469  		x := v_0
  1470  		y := v_1
  1471  		v.reset(OpS390XDIVD)
  1472  		v.AddArg2(x, y)
  1473  		return true
  1474  	}
  1475  }
  1476  func rewriteValueS390X_OpDiv8(v *Value) bool {
  1477  	v_1 := v.Args[1]
  1478  	v_0 := v.Args[0]
  1479  	b := v.Block
  1480  	typ := &b.Func.Config.Types
  1481  	// match: (Div8 x y)
  1482  	// result: (DIVW (MOVBreg x) (MOVBreg y))
  1483  	for {
  1484  		x := v_0
  1485  		y := v_1
  1486  		v.reset(OpS390XDIVW)
  1487  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1488  		v0.AddArg(x)
  1489  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1490  		v1.AddArg(y)
  1491  		v.AddArg2(v0, v1)
  1492  		return true
  1493  	}
  1494  }
  1495  func rewriteValueS390X_OpDiv8u(v *Value) bool {
  1496  	v_1 := v.Args[1]
  1497  	v_0 := v.Args[0]
  1498  	b := v.Block
  1499  	typ := &b.Func.Config.Types
  1500  	// match: (Div8u x y)
  1501  	// result: (DIVWU (MOVBZreg x) (MOVBZreg y))
  1502  	for {
  1503  		x := v_0
  1504  		y := v_1
  1505  		v.reset(OpS390XDIVWU)
  1506  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1507  		v0.AddArg(x)
  1508  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  1509  		v1.AddArg(y)
  1510  		v.AddArg2(v0, v1)
  1511  		return true
  1512  	}
  1513  }
  1514  func rewriteValueS390X_OpEq16(v *Value) bool {
  1515  	v_1 := v.Args[1]
  1516  	v_0 := v.Args[0]
  1517  	b := v.Block
  1518  	typ := &b.Func.Config.Types
  1519  	// match: (Eq16 x y)
  1520  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1521  	for {
  1522  		x := v_0
  1523  		y := v_1
  1524  		v.reset(OpS390XLOCGR)
  1525  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1526  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1527  		v0.AuxInt = int64ToAuxInt(0)
  1528  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1529  		v1.AuxInt = int64ToAuxInt(1)
  1530  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1531  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1532  		v3.AddArg(x)
  1533  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1534  		v4.AddArg(y)
  1535  		v2.AddArg2(v3, v4)
  1536  		v.AddArg3(v0, v1, v2)
  1537  		return true
  1538  	}
  1539  }
  1540  func rewriteValueS390X_OpEq32(v *Value) bool {
  1541  	v_1 := v.Args[1]
  1542  	v_0 := v.Args[0]
  1543  	b := v.Block
  1544  	typ := &b.Func.Config.Types
  1545  	// match: (Eq32 x y)
  1546  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1547  	for {
  1548  		x := v_0
  1549  		y := v_1
  1550  		v.reset(OpS390XLOCGR)
  1551  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1552  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1553  		v0.AuxInt = int64ToAuxInt(0)
  1554  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1555  		v1.AuxInt = int64ToAuxInt(1)
  1556  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1557  		v2.AddArg2(x, y)
  1558  		v.AddArg3(v0, v1, v2)
  1559  		return true
  1560  	}
  1561  }
  1562  func rewriteValueS390X_OpEq32F(v *Value) bool {
  1563  	v_1 := v.Args[1]
  1564  	v_0 := v.Args[0]
  1565  	b := v.Block
  1566  	typ := &b.Func.Config.Types
  1567  	// match: (Eq32F x y)
  1568  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1569  	for {
  1570  		x := v_0
  1571  		y := v_1
  1572  		v.reset(OpS390XLOCGR)
  1573  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1574  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1575  		v0.AuxInt = int64ToAuxInt(0)
  1576  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1577  		v1.AuxInt = int64ToAuxInt(1)
  1578  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  1579  		v2.AddArg2(x, y)
  1580  		v.AddArg3(v0, v1, v2)
  1581  		return true
  1582  	}
  1583  }
  1584  func rewriteValueS390X_OpEq64(v *Value) bool {
  1585  	v_1 := v.Args[1]
  1586  	v_0 := v.Args[0]
  1587  	b := v.Block
  1588  	typ := &b.Func.Config.Types
  1589  	// match: (Eq64 x y)
  1590  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1591  	for {
  1592  		x := v_0
  1593  		y := v_1
  1594  		v.reset(OpS390XLOCGR)
  1595  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1596  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1597  		v0.AuxInt = int64ToAuxInt(0)
  1598  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1599  		v1.AuxInt = int64ToAuxInt(1)
  1600  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1601  		v2.AddArg2(x, y)
  1602  		v.AddArg3(v0, v1, v2)
  1603  		return true
  1604  	}
  1605  }
  1606  func rewriteValueS390X_OpEq64F(v *Value) bool {
  1607  	v_1 := v.Args[1]
  1608  	v_0 := v.Args[0]
  1609  	b := v.Block
  1610  	typ := &b.Func.Config.Types
  1611  	// match: (Eq64F x y)
  1612  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  1613  	for {
  1614  		x := v_0
  1615  		y := v_1
  1616  		v.reset(OpS390XLOCGR)
  1617  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1618  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1619  		v0.AuxInt = int64ToAuxInt(0)
  1620  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1621  		v1.AuxInt = int64ToAuxInt(1)
  1622  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  1623  		v2.AddArg2(x, y)
  1624  		v.AddArg3(v0, v1, v2)
  1625  		return true
  1626  	}
  1627  }
  1628  func rewriteValueS390X_OpEq8(v *Value) bool {
  1629  	v_1 := v.Args[1]
  1630  	v_0 := v.Args[0]
  1631  	b := v.Block
  1632  	typ := &b.Func.Config.Types
  1633  	// match: (Eq8 x y)
  1634  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1635  	for {
  1636  		x := v_0
  1637  		y := v_1
  1638  		v.reset(OpS390XLOCGR)
  1639  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1640  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1641  		v0.AuxInt = int64ToAuxInt(0)
  1642  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1643  		v1.AuxInt = int64ToAuxInt(1)
  1644  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1645  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1646  		v3.AddArg(x)
  1647  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1648  		v4.AddArg(y)
  1649  		v2.AddArg2(v3, v4)
  1650  		v.AddArg3(v0, v1, v2)
  1651  		return true
  1652  	}
  1653  }
  1654  func rewriteValueS390X_OpEqB(v *Value) bool {
  1655  	v_1 := v.Args[1]
  1656  	v_0 := v.Args[0]
  1657  	b := v.Block
  1658  	typ := &b.Func.Config.Types
  1659  	// match: (EqB x y)
  1660  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  1661  	for {
  1662  		x := v_0
  1663  		y := v_1
  1664  		v.reset(OpS390XLOCGR)
  1665  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1666  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1667  		v0.AuxInt = int64ToAuxInt(0)
  1668  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1669  		v1.AuxInt = int64ToAuxInt(1)
  1670  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1671  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1672  		v3.AddArg(x)
  1673  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  1674  		v4.AddArg(y)
  1675  		v2.AddArg2(v3, v4)
  1676  		v.AddArg3(v0, v1, v2)
  1677  		return true
  1678  	}
  1679  }
  1680  func rewriteValueS390X_OpEqPtr(v *Value) bool {
  1681  	v_1 := v.Args[1]
  1682  	v_0 := v.Args[0]
  1683  	b := v.Block
  1684  	typ := &b.Func.Config.Types
  1685  	// match: (EqPtr x y)
  1686  	// result: (LOCGR {s390x.Equal} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1687  	for {
  1688  		x := v_0
  1689  		y := v_1
  1690  		v.reset(OpS390XLOCGR)
  1691  		v.Aux = s390xCCMaskToAux(s390x.Equal)
  1692  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1693  		v0.AuxInt = int64ToAuxInt(0)
  1694  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1695  		v1.AuxInt = int64ToAuxInt(1)
  1696  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1697  		v2.AddArg2(x, y)
  1698  		v.AddArg3(v0, v1, v2)
  1699  		return true
  1700  	}
  1701  }
  1702  func rewriteValueS390X_OpFMA(v *Value) bool {
  1703  	v_2 := v.Args[2]
  1704  	v_1 := v.Args[1]
  1705  	v_0 := v.Args[0]
  1706  	// match: (FMA x y z)
  1707  	// result: (FMADD z x y)
  1708  	for {
  1709  		x := v_0
  1710  		y := v_1
  1711  		z := v_2
  1712  		v.reset(OpS390XFMADD)
  1713  		v.AddArg3(z, x, y)
  1714  		return true
  1715  	}
  1716  }
  1717  func rewriteValueS390X_OpFloor(v *Value) bool {
  1718  	v_0 := v.Args[0]
  1719  	// match: (Floor x)
  1720  	// result: (FIDBR [7] x)
  1721  	for {
  1722  		x := v_0
  1723  		v.reset(OpS390XFIDBR)
  1724  		v.AuxInt = int8ToAuxInt(7)
  1725  		v.AddArg(x)
  1726  		return true
  1727  	}
  1728  }
  1729  func rewriteValueS390X_OpHmul32(v *Value) bool {
  1730  	v_1 := v.Args[1]
  1731  	v_0 := v.Args[0]
  1732  	b := v.Block
  1733  	typ := &b.Func.Config.Types
  1734  	// match: (Hmul32 x y)
  1735  	// result: (SRDconst [32] (MULLD (MOVWreg x) (MOVWreg y)))
  1736  	for {
  1737  		x := v_0
  1738  		y := v_1
  1739  		v.reset(OpS390XSRDconst)
  1740  		v.AuxInt = uint8ToAuxInt(32)
  1741  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1742  		v1 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1743  		v1.AddArg(x)
  1744  		v2 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  1745  		v2.AddArg(y)
  1746  		v0.AddArg2(v1, v2)
  1747  		v.AddArg(v0)
  1748  		return true
  1749  	}
  1750  }
  1751  func rewriteValueS390X_OpHmul32u(v *Value) bool {
  1752  	v_1 := v.Args[1]
  1753  	v_0 := v.Args[0]
  1754  	b := v.Block
  1755  	typ := &b.Func.Config.Types
  1756  	// match: (Hmul32u x y)
  1757  	// result: (SRDconst [32] (MULLD (MOVWZreg x) (MOVWZreg y)))
  1758  	for {
  1759  		x := v_0
  1760  		y := v_1
  1761  		v.reset(OpS390XSRDconst)
  1762  		v.AuxInt = uint8ToAuxInt(32)
  1763  		v0 := b.NewValue0(v.Pos, OpS390XMULLD, typ.Int64)
  1764  		v1 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1765  		v1.AddArg(x)
  1766  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  1767  		v2.AddArg(y)
  1768  		v0.AddArg2(v1, v2)
  1769  		v.AddArg(v0)
  1770  		return true
  1771  	}
  1772  }
  1773  func rewriteValueS390X_OpITab(v *Value) bool {
  1774  	v_0 := v.Args[0]
  1775  	// match: (ITab (Load ptr mem))
  1776  	// result: (MOVDload ptr mem)
  1777  	for {
  1778  		if v_0.Op != OpLoad {
  1779  			break
  1780  		}
  1781  		mem := v_0.Args[1]
  1782  		ptr := v_0.Args[0]
  1783  		v.reset(OpS390XMOVDload)
  1784  		v.AddArg2(ptr, mem)
  1785  		return true
  1786  	}
  1787  	return false
  1788  }
  1789  func rewriteValueS390X_OpIsInBounds(v *Value) bool {
  1790  	v_1 := v.Args[1]
  1791  	v_0 := v.Args[0]
  1792  	b := v.Block
  1793  	typ := &b.Func.Config.Types
  1794  	// match: (IsInBounds idx len)
  1795  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1796  	for {
  1797  		idx := v_0
  1798  		len := v_1
  1799  		v.reset(OpS390XLOCGR)
  1800  		v.Aux = s390xCCMaskToAux(s390x.Less)
  1801  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1802  		v0.AuxInt = int64ToAuxInt(0)
  1803  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1804  		v1.AuxInt = int64ToAuxInt(1)
  1805  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  1806  		v2.AddArg2(idx, len)
  1807  		v.AddArg3(v0, v1, v2)
  1808  		return true
  1809  	}
  1810  }
  1811  func rewriteValueS390X_OpIsNonNil(v *Value) bool {
  1812  	v_0 := v.Args[0]
  1813  	b := v.Block
  1814  	typ := &b.Func.Config.Types
  1815  	// match: (IsNonNil p)
  1816  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPconst p [0]))
  1817  	for {
  1818  		p := v_0
  1819  		v.reset(OpS390XLOCGR)
  1820  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  1821  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1822  		v0.AuxInt = int64ToAuxInt(0)
  1823  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1824  		v1.AuxInt = int64ToAuxInt(1)
  1825  		v2 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  1826  		v2.AuxInt = int32ToAuxInt(0)
  1827  		v2.AddArg(p)
  1828  		v.AddArg3(v0, v1, v2)
  1829  		return true
  1830  	}
  1831  }
  1832  func rewriteValueS390X_OpIsSliceInBounds(v *Value) bool {
  1833  	v_1 := v.Args[1]
  1834  	v_0 := v.Args[0]
  1835  	b := v.Block
  1836  	typ := &b.Func.Config.Types
  1837  	// match: (IsSliceInBounds idx len)
  1838  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU idx len))
  1839  	for {
  1840  		idx := v_0
  1841  		len := v_1
  1842  		v.reset(OpS390XLOCGR)
  1843  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1844  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1845  		v0.AuxInt = int64ToAuxInt(0)
  1846  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1847  		v1.AuxInt = int64ToAuxInt(1)
  1848  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  1849  		v2.AddArg2(idx, len)
  1850  		v.AddArg3(v0, v1, v2)
  1851  		return true
  1852  	}
  1853  }
  1854  func rewriteValueS390X_OpLeq16(v *Value) bool {
  1855  	v_1 := v.Args[1]
  1856  	v_0 := v.Args[0]
  1857  	b := v.Block
  1858  	typ := &b.Func.Config.Types
  1859  	// match: (Leq16 x y)
  1860  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  1861  	for {
  1862  		x := v_0
  1863  		y := v_1
  1864  		v.reset(OpS390XLOCGR)
  1865  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1866  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1867  		v0.AuxInt = int64ToAuxInt(0)
  1868  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1869  		v1.AuxInt = int64ToAuxInt(1)
  1870  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1871  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1872  		v3.AddArg(x)
  1873  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  1874  		v4.AddArg(y)
  1875  		v2.AddArg2(v3, v4)
  1876  		v.AddArg3(v0, v1, v2)
  1877  		return true
  1878  	}
  1879  }
  1880  func rewriteValueS390X_OpLeq16U(v *Value) bool {
  1881  	v_1 := v.Args[1]
  1882  	v_0 := v.Args[0]
  1883  	b := v.Block
  1884  	typ := &b.Func.Config.Types
  1885  	// match: (Leq16U x y)
  1886  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  1887  	for {
  1888  		x := v_0
  1889  		y := v_1
  1890  		v.reset(OpS390XLOCGR)
  1891  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1892  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1893  		v0.AuxInt = int64ToAuxInt(0)
  1894  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1895  		v1.AuxInt = int64ToAuxInt(1)
  1896  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  1897  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1898  		v3.AddArg(x)
  1899  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  1900  		v4.AddArg(y)
  1901  		v2.AddArg2(v3, v4)
  1902  		v.AddArg3(v0, v1, v2)
  1903  		return true
  1904  	}
  1905  }
  1906  func rewriteValueS390X_OpLeq32(v *Value) bool {
  1907  	v_1 := v.Args[1]
  1908  	v_0 := v.Args[0]
  1909  	b := v.Block
  1910  	typ := &b.Func.Config.Types
  1911  	// match: (Leq32 x y)
  1912  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  1913  	for {
  1914  		x := v_0
  1915  		y := v_1
  1916  		v.reset(OpS390XLOCGR)
  1917  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1918  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1919  		v0.AuxInt = int64ToAuxInt(0)
  1920  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1921  		v1.AuxInt = int64ToAuxInt(1)
  1922  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  1923  		v2.AddArg2(x, y)
  1924  		v.AddArg3(v0, v1, v2)
  1925  		return true
  1926  	}
  1927  }
  1928  func rewriteValueS390X_OpLeq32F(v *Value) bool {
  1929  	v_1 := v.Args[1]
  1930  	v_0 := v.Args[0]
  1931  	b := v.Block
  1932  	typ := &b.Func.Config.Types
  1933  	// match: (Leq32F x y)
  1934  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  1935  	for {
  1936  		x := v_0
  1937  		y := v_1
  1938  		v.reset(OpS390XLOCGR)
  1939  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1940  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1941  		v0.AuxInt = int64ToAuxInt(0)
  1942  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1943  		v1.AuxInt = int64ToAuxInt(1)
  1944  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  1945  		v2.AddArg2(x, y)
  1946  		v.AddArg3(v0, v1, v2)
  1947  		return true
  1948  	}
  1949  }
  1950  func rewriteValueS390X_OpLeq32U(v *Value) bool {
  1951  	v_1 := v.Args[1]
  1952  	v_0 := v.Args[0]
  1953  	b := v.Block
  1954  	typ := &b.Func.Config.Types
  1955  	// match: (Leq32U x y)
  1956  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  1957  	for {
  1958  		x := v_0
  1959  		y := v_1
  1960  		v.reset(OpS390XLOCGR)
  1961  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1962  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1963  		v0.AuxInt = int64ToAuxInt(0)
  1964  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1965  		v1.AuxInt = int64ToAuxInt(1)
  1966  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  1967  		v2.AddArg2(x, y)
  1968  		v.AddArg3(v0, v1, v2)
  1969  		return true
  1970  	}
  1971  }
  1972  func rewriteValueS390X_OpLeq64(v *Value) bool {
  1973  	v_1 := v.Args[1]
  1974  	v_0 := v.Args[0]
  1975  	b := v.Block
  1976  	typ := &b.Func.Config.Types
  1977  	// match: (Leq64 x y)
  1978  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  1979  	for {
  1980  		x := v_0
  1981  		y := v_1
  1982  		v.reset(OpS390XLOCGR)
  1983  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  1984  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1985  		v0.AuxInt = int64ToAuxInt(0)
  1986  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  1987  		v1.AuxInt = int64ToAuxInt(1)
  1988  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  1989  		v2.AddArg2(x, y)
  1990  		v.AddArg3(v0, v1, v2)
  1991  		return true
  1992  	}
  1993  }
  1994  func rewriteValueS390X_OpLeq64F(v *Value) bool {
  1995  	v_1 := v.Args[1]
  1996  	v_0 := v.Args[0]
  1997  	b := v.Block
  1998  	typ := &b.Func.Config.Types
  1999  	// match: (Leq64F x y)
  2000  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2001  	for {
  2002  		x := v_0
  2003  		y := v_1
  2004  		v.reset(OpS390XLOCGR)
  2005  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2006  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2007  		v0.AuxInt = int64ToAuxInt(0)
  2008  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2009  		v1.AuxInt = int64ToAuxInt(1)
  2010  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2011  		v2.AddArg2(x, y)
  2012  		v.AddArg3(v0, v1, v2)
  2013  		return true
  2014  	}
  2015  }
  2016  func rewriteValueS390X_OpLeq64U(v *Value) bool {
  2017  	v_1 := v.Args[1]
  2018  	v_0 := v.Args[0]
  2019  	b := v.Block
  2020  	typ := &b.Func.Config.Types
  2021  	// match: (Leq64U x y)
  2022  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2023  	for {
  2024  		x := v_0
  2025  		y := v_1
  2026  		v.reset(OpS390XLOCGR)
  2027  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2028  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2029  		v0.AuxInt = int64ToAuxInt(0)
  2030  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2031  		v1.AuxInt = int64ToAuxInt(1)
  2032  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2033  		v2.AddArg2(x, y)
  2034  		v.AddArg3(v0, v1, v2)
  2035  		return true
  2036  	}
  2037  }
  2038  func rewriteValueS390X_OpLeq8(v *Value) bool {
  2039  	v_1 := v.Args[1]
  2040  	v_0 := v.Args[0]
  2041  	b := v.Block
  2042  	typ := &b.Func.Config.Types
  2043  	// match: (Leq8 x y)
  2044  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2045  	for {
  2046  		x := v_0
  2047  		y := v_1
  2048  		v.reset(OpS390XLOCGR)
  2049  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2050  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2051  		v0.AuxInt = int64ToAuxInt(0)
  2052  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2053  		v1.AuxInt = int64ToAuxInt(1)
  2054  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2055  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2056  		v3.AddArg(x)
  2057  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2058  		v4.AddArg(y)
  2059  		v2.AddArg2(v3, v4)
  2060  		v.AddArg3(v0, v1, v2)
  2061  		return true
  2062  	}
  2063  }
  2064  func rewriteValueS390X_OpLeq8U(v *Value) bool {
  2065  	v_1 := v.Args[1]
  2066  	v_0 := v.Args[0]
  2067  	b := v.Block
  2068  	typ := &b.Func.Config.Types
  2069  	// match: (Leq8U x y)
  2070  	// result: (LOCGR {s390x.LessOrEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2071  	for {
  2072  		x := v_0
  2073  		y := v_1
  2074  		v.reset(OpS390XLOCGR)
  2075  		v.Aux = s390xCCMaskToAux(s390x.LessOrEqual)
  2076  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2077  		v0.AuxInt = int64ToAuxInt(0)
  2078  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2079  		v1.AuxInt = int64ToAuxInt(1)
  2080  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2081  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2082  		v3.AddArg(x)
  2083  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2084  		v4.AddArg(y)
  2085  		v2.AddArg2(v3, v4)
  2086  		v.AddArg3(v0, v1, v2)
  2087  		return true
  2088  	}
  2089  }
  2090  func rewriteValueS390X_OpLess16(v *Value) bool {
  2091  	v_1 := v.Args[1]
  2092  	v_0 := v.Args[0]
  2093  	b := v.Block
  2094  	typ := &b.Func.Config.Types
  2095  	// match: (Less16 x y)
  2096  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  2097  	for {
  2098  		x := v_0
  2099  		y := v_1
  2100  		v.reset(OpS390XLOCGR)
  2101  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2102  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2103  		v0.AuxInt = int64ToAuxInt(0)
  2104  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2105  		v1.AuxInt = int64ToAuxInt(1)
  2106  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2107  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2108  		v3.AddArg(x)
  2109  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  2110  		v4.AddArg(y)
  2111  		v2.AddArg2(v3, v4)
  2112  		v.AddArg3(v0, v1, v2)
  2113  		return true
  2114  	}
  2115  }
  2116  func rewriteValueS390X_OpLess16U(v *Value) bool {
  2117  	v_1 := v.Args[1]
  2118  	v_0 := v.Args[0]
  2119  	b := v.Block
  2120  	typ := &b.Func.Config.Types
  2121  	// match: (Less16U x y)
  2122  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVHZreg x) (MOVHZreg y)))
  2123  	for {
  2124  		x := v_0
  2125  		y := v_1
  2126  		v.reset(OpS390XLOCGR)
  2127  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2128  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2129  		v0.AuxInt = int64ToAuxInt(0)
  2130  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2131  		v1.AuxInt = int64ToAuxInt(1)
  2132  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2133  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2134  		v3.AddArg(x)
  2135  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2136  		v4.AddArg(y)
  2137  		v2.AddArg2(v3, v4)
  2138  		v.AddArg3(v0, v1, v2)
  2139  		return true
  2140  	}
  2141  }
  2142  func rewriteValueS390X_OpLess32(v *Value) bool {
  2143  	v_1 := v.Args[1]
  2144  	v_0 := v.Args[0]
  2145  	b := v.Block
  2146  	typ := &b.Func.Config.Types
  2147  	// match: (Less32 x y)
  2148  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  2149  	for {
  2150  		x := v_0
  2151  		y := v_1
  2152  		v.reset(OpS390XLOCGR)
  2153  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2154  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2155  		v0.AuxInt = int64ToAuxInt(0)
  2156  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2157  		v1.AuxInt = int64ToAuxInt(1)
  2158  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2159  		v2.AddArg2(x, y)
  2160  		v.AddArg3(v0, v1, v2)
  2161  		return true
  2162  	}
  2163  }
  2164  func rewriteValueS390X_OpLess32F(v *Value) bool {
  2165  	v_1 := v.Args[1]
  2166  	v_0 := v.Args[0]
  2167  	b := v.Block
  2168  	typ := &b.Func.Config.Types
  2169  	// match: (Less32F x y)
  2170  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  2171  	for {
  2172  		x := v_0
  2173  		y := v_1
  2174  		v.reset(OpS390XLOCGR)
  2175  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2176  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2177  		v0.AuxInt = int64ToAuxInt(0)
  2178  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2179  		v1.AuxInt = int64ToAuxInt(1)
  2180  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  2181  		v2.AddArg2(x, y)
  2182  		v.AddArg3(v0, v1, v2)
  2183  		return true
  2184  	}
  2185  }
  2186  func rewriteValueS390X_OpLess32U(v *Value) bool {
  2187  	v_1 := v.Args[1]
  2188  	v_0 := v.Args[0]
  2189  	b := v.Block
  2190  	typ := &b.Func.Config.Types
  2191  	// match: (Less32U x y)
  2192  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU x y))
  2193  	for {
  2194  		x := v_0
  2195  		y := v_1
  2196  		v.reset(OpS390XLOCGR)
  2197  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2198  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2199  		v0.AuxInt = int64ToAuxInt(0)
  2200  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2201  		v1.AuxInt = int64ToAuxInt(1)
  2202  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2203  		v2.AddArg2(x, y)
  2204  		v.AddArg3(v0, v1, v2)
  2205  		return true
  2206  	}
  2207  }
  2208  func rewriteValueS390X_OpLess64(v *Value) bool {
  2209  	v_1 := v.Args[1]
  2210  	v_0 := v.Args[0]
  2211  	b := v.Block
  2212  	typ := &b.Func.Config.Types
  2213  	// match: (Less64 x y)
  2214  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  2215  	for {
  2216  		x := v_0
  2217  		y := v_1
  2218  		v.reset(OpS390XLOCGR)
  2219  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2220  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2221  		v0.AuxInt = int64ToAuxInt(0)
  2222  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2223  		v1.AuxInt = int64ToAuxInt(1)
  2224  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  2225  		v2.AddArg2(x, y)
  2226  		v.AddArg3(v0, v1, v2)
  2227  		return true
  2228  	}
  2229  }
  2230  func rewriteValueS390X_OpLess64F(v *Value) bool {
  2231  	v_1 := v.Args[1]
  2232  	v_0 := v.Args[0]
  2233  	b := v.Block
  2234  	typ := &b.Func.Config.Types
  2235  	// match: (Less64F x y)
  2236  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  2237  	for {
  2238  		x := v_0
  2239  		y := v_1
  2240  		v.reset(OpS390XLOCGR)
  2241  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2242  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2243  		v0.AuxInt = int64ToAuxInt(0)
  2244  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2245  		v1.AuxInt = int64ToAuxInt(1)
  2246  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  2247  		v2.AddArg2(x, y)
  2248  		v.AddArg3(v0, v1, v2)
  2249  		return true
  2250  	}
  2251  }
  2252  func rewriteValueS390X_OpLess64U(v *Value) bool {
  2253  	v_1 := v.Args[1]
  2254  	v_0 := v.Args[0]
  2255  	b := v.Block
  2256  	typ := &b.Func.Config.Types
  2257  	// match: (Less64U x y)
  2258  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPU x y))
  2259  	for {
  2260  		x := v_0
  2261  		y := v_1
  2262  		v.reset(OpS390XLOCGR)
  2263  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2264  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2265  		v0.AuxInt = int64ToAuxInt(0)
  2266  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2267  		v1.AuxInt = int64ToAuxInt(1)
  2268  		v2 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  2269  		v2.AddArg2(x, y)
  2270  		v.AddArg3(v0, v1, v2)
  2271  		return true
  2272  	}
  2273  }
  2274  func rewriteValueS390X_OpLess8(v *Value) bool {
  2275  	v_1 := v.Args[1]
  2276  	v_0 := v.Args[0]
  2277  	b := v.Block
  2278  	typ := &b.Func.Config.Types
  2279  	// match: (Less8 x y)
  2280  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  2281  	for {
  2282  		x := v_0
  2283  		y := v_1
  2284  		v.reset(OpS390XLOCGR)
  2285  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2286  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2287  		v0.AuxInt = int64ToAuxInt(0)
  2288  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2289  		v1.AuxInt = int64ToAuxInt(1)
  2290  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  2291  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2292  		v3.AddArg(x)
  2293  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  2294  		v4.AddArg(y)
  2295  		v2.AddArg2(v3, v4)
  2296  		v.AddArg3(v0, v1, v2)
  2297  		return true
  2298  	}
  2299  }
  2300  func rewriteValueS390X_OpLess8U(v *Value) bool {
  2301  	v_1 := v.Args[1]
  2302  	v_0 := v.Args[0]
  2303  	b := v.Block
  2304  	typ := &b.Func.Config.Types
  2305  	// match: (Less8U x y)
  2306  	// result: (LOCGR {s390x.Less} (MOVDconst [0]) (MOVDconst [1]) (CMPWU (MOVBZreg x) (MOVBZreg y)))
  2307  	for {
  2308  		x := v_0
  2309  		y := v_1
  2310  		v.reset(OpS390XLOCGR)
  2311  		v.Aux = s390xCCMaskToAux(s390x.Less)
  2312  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2313  		v0.AuxInt = int64ToAuxInt(0)
  2314  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2315  		v1.AuxInt = int64ToAuxInt(1)
  2316  		v2 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  2317  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2318  		v3.AddArg(x)
  2319  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2320  		v4.AddArg(y)
  2321  		v2.AddArg2(v3, v4)
  2322  		v.AddArg3(v0, v1, v2)
  2323  		return true
  2324  	}
  2325  }
  2326  func rewriteValueS390X_OpLoad(v *Value) bool {
  2327  	v_1 := v.Args[1]
  2328  	v_0 := v.Args[0]
  2329  	// match: (Load <t> ptr mem)
  2330  	// cond: (is64BitInt(t) || isPtr(t))
  2331  	// result: (MOVDload ptr mem)
  2332  	for {
  2333  		t := v.Type
  2334  		ptr := v_0
  2335  		mem := v_1
  2336  		if !(is64BitInt(t) || isPtr(t)) {
  2337  			break
  2338  		}
  2339  		v.reset(OpS390XMOVDload)
  2340  		v.AddArg2(ptr, mem)
  2341  		return true
  2342  	}
  2343  	// match: (Load <t> ptr mem)
  2344  	// cond: is32BitInt(t) && isSigned(t)
  2345  	// result: (MOVWload ptr mem)
  2346  	for {
  2347  		t := v.Type
  2348  		ptr := v_0
  2349  		mem := v_1
  2350  		if !(is32BitInt(t) && isSigned(t)) {
  2351  			break
  2352  		}
  2353  		v.reset(OpS390XMOVWload)
  2354  		v.AddArg2(ptr, mem)
  2355  		return true
  2356  	}
  2357  	// match: (Load <t> ptr mem)
  2358  	// cond: is32BitInt(t) && !isSigned(t)
  2359  	// result: (MOVWZload ptr mem)
  2360  	for {
  2361  		t := v.Type
  2362  		ptr := v_0
  2363  		mem := v_1
  2364  		if !(is32BitInt(t) && !isSigned(t)) {
  2365  			break
  2366  		}
  2367  		v.reset(OpS390XMOVWZload)
  2368  		v.AddArg2(ptr, mem)
  2369  		return true
  2370  	}
  2371  	// match: (Load <t> ptr mem)
  2372  	// cond: is16BitInt(t) && isSigned(t)
  2373  	// result: (MOVHload ptr mem)
  2374  	for {
  2375  		t := v.Type
  2376  		ptr := v_0
  2377  		mem := v_1
  2378  		if !(is16BitInt(t) && isSigned(t)) {
  2379  			break
  2380  		}
  2381  		v.reset(OpS390XMOVHload)
  2382  		v.AddArg2(ptr, mem)
  2383  		return true
  2384  	}
  2385  	// match: (Load <t> ptr mem)
  2386  	// cond: is16BitInt(t) && !isSigned(t)
  2387  	// result: (MOVHZload ptr mem)
  2388  	for {
  2389  		t := v.Type
  2390  		ptr := v_0
  2391  		mem := v_1
  2392  		if !(is16BitInt(t) && !isSigned(t)) {
  2393  			break
  2394  		}
  2395  		v.reset(OpS390XMOVHZload)
  2396  		v.AddArg2(ptr, mem)
  2397  		return true
  2398  	}
  2399  	// match: (Load <t> ptr mem)
  2400  	// cond: is8BitInt(t) && isSigned(t)
  2401  	// result: (MOVBload ptr mem)
  2402  	for {
  2403  		t := v.Type
  2404  		ptr := v_0
  2405  		mem := v_1
  2406  		if !(is8BitInt(t) && isSigned(t)) {
  2407  			break
  2408  		}
  2409  		v.reset(OpS390XMOVBload)
  2410  		v.AddArg2(ptr, mem)
  2411  		return true
  2412  	}
  2413  	// match: (Load <t> ptr mem)
  2414  	// cond: (t.IsBoolean() || (is8BitInt(t) && !isSigned(t)))
  2415  	// result: (MOVBZload ptr mem)
  2416  	for {
  2417  		t := v.Type
  2418  		ptr := v_0
  2419  		mem := v_1
  2420  		if !(t.IsBoolean() || (is8BitInt(t) && !isSigned(t))) {
  2421  			break
  2422  		}
  2423  		v.reset(OpS390XMOVBZload)
  2424  		v.AddArg2(ptr, mem)
  2425  		return true
  2426  	}
  2427  	// match: (Load <t> ptr mem)
  2428  	// cond: is32BitFloat(t)
  2429  	// result: (FMOVSload ptr mem)
  2430  	for {
  2431  		t := v.Type
  2432  		ptr := v_0
  2433  		mem := v_1
  2434  		if !(is32BitFloat(t)) {
  2435  			break
  2436  		}
  2437  		v.reset(OpS390XFMOVSload)
  2438  		v.AddArg2(ptr, mem)
  2439  		return true
  2440  	}
  2441  	// match: (Load <t> ptr mem)
  2442  	// cond: is64BitFloat(t)
  2443  	// result: (FMOVDload ptr mem)
  2444  	for {
  2445  		t := v.Type
  2446  		ptr := v_0
  2447  		mem := v_1
  2448  		if !(is64BitFloat(t)) {
  2449  			break
  2450  		}
  2451  		v.reset(OpS390XFMOVDload)
  2452  		v.AddArg2(ptr, mem)
  2453  		return true
  2454  	}
  2455  	return false
  2456  }
  2457  func rewriteValueS390X_OpLocalAddr(v *Value) bool {
  2458  	v_0 := v.Args[0]
  2459  	// match: (LocalAddr {sym} base _)
  2460  	// result: (MOVDaddr {sym} base)
  2461  	for {
  2462  		sym := auxToSym(v.Aux)
  2463  		base := v_0
  2464  		v.reset(OpS390XMOVDaddr)
  2465  		v.Aux = symToAux(sym)
  2466  		v.AddArg(base)
  2467  		return true
  2468  	}
  2469  }
  2470  func rewriteValueS390X_OpLsh16x16(v *Value) bool {
  2471  	v_1 := v.Args[1]
  2472  	v_0 := v.Args[0]
  2473  	b := v.Block
  2474  	typ := &b.Func.Config.Types
  2475  	// match: (Lsh16x16 x y)
  2476  	// cond: shiftIsBounded(v)
  2477  	// result: (SLW x y)
  2478  	for {
  2479  		x := v_0
  2480  		y := v_1
  2481  		if !(shiftIsBounded(v)) {
  2482  			break
  2483  		}
  2484  		v.reset(OpS390XSLW)
  2485  		v.AddArg2(x, y)
  2486  		return true
  2487  	}
  2488  	// match: (Lsh16x16 <t> x y)
  2489  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2490  	for {
  2491  		t := v.Type
  2492  		x := v_0
  2493  		y := v_1
  2494  		v.reset(OpS390XLOCGR)
  2495  		v.Type = t
  2496  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2497  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2498  		v0.AddArg2(x, y)
  2499  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2500  		v1.AuxInt = int64ToAuxInt(0)
  2501  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2502  		v2.AuxInt = int32ToAuxInt(64)
  2503  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2504  		v3.AddArg(y)
  2505  		v2.AddArg(v3)
  2506  		v.AddArg3(v0, v1, v2)
  2507  		return true
  2508  	}
  2509  }
  2510  func rewriteValueS390X_OpLsh16x32(v *Value) bool {
  2511  	v_1 := v.Args[1]
  2512  	v_0 := v.Args[0]
  2513  	b := v.Block
  2514  	typ := &b.Func.Config.Types
  2515  	// match: (Lsh16x32 x y)
  2516  	// cond: shiftIsBounded(v)
  2517  	// result: (SLW x y)
  2518  	for {
  2519  		x := v_0
  2520  		y := v_1
  2521  		if !(shiftIsBounded(v)) {
  2522  			break
  2523  		}
  2524  		v.reset(OpS390XSLW)
  2525  		v.AddArg2(x, y)
  2526  		return true
  2527  	}
  2528  	// match: (Lsh16x32 <t> x y)
  2529  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2530  	for {
  2531  		t := v.Type
  2532  		x := v_0
  2533  		y := v_1
  2534  		v.reset(OpS390XLOCGR)
  2535  		v.Type = t
  2536  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2537  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2538  		v0.AddArg2(x, y)
  2539  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2540  		v1.AuxInt = int64ToAuxInt(0)
  2541  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2542  		v2.AuxInt = int32ToAuxInt(64)
  2543  		v2.AddArg(y)
  2544  		v.AddArg3(v0, v1, v2)
  2545  		return true
  2546  	}
  2547  }
  2548  func rewriteValueS390X_OpLsh16x64(v *Value) bool {
  2549  	v_1 := v.Args[1]
  2550  	v_0 := v.Args[0]
  2551  	b := v.Block
  2552  	typ := &b.Func.Config.Types
  2553  	// match: (Lsh16x64 x y)
  2554  	// cond: shiftIsBounded(v)
  2555  	// result: (SLW x y)
  2556  	for {
  2557  		x := v_0
  2558  		y := v_1
  2559  		if !(shiftIsBounded(v)) {
  2560  			break
  2561  		}
  2562  		v.reset(OpS390XSLW)
  2563  		v.AddArg2(x, y)
  2564  		return true
  2565  	}
  2566  	// match: (Lsh16x64 <t> x y)
  2567  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2568  	for {
  2569  		t := v.Type
  2570  		x := v_0
  2571  		y := v_1
  2572  		v.reset(OpS390XLOCGR)
  2573  		v.Type = t
  2574  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2575  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2576  		v0.AddArg2(x, y)
  2577  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2578  		v1.AuxInt = int64ToAuxInt(0)
  2579  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2580  		v2.AuxInt = int32ToAuxInt(64)
  2581  		v2.AddArg(y)
  2582  		v.AddArg3(v0, v1, v2)
  2583  		return true
  2584  	}
  2585  }
  2586  func rewriteValueS390X_OpLsh16x8(v *Value) bool {
  2587  	v_1 := v.Args[1]
  2588  	v_0 := v.Args[0]
  2589  	b := v.Block
  2590  	typ := &b.Func.Config.Types
  2591  	// match: (Lsh16x8 x y)
  2592  	// cond: shiftIsBounded(v)
  2593  	// result: (SLW x y)
  2594  	for {
  2595  		x := v_0
  2596  		y := v_1
  2597  		if !(shiftIsBounded(v)) {
  2598  			break
  2599  		}
  2600  		v.reset(OpS390XSLW)
  2601  		v.AddArg2(x, y)
  2602  		return true
  2603  	}
  2604  	// match: (Lsh16x8 <t> x y)
  2605  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2606  	for {
  2607  		t := v.Type
  2608  		x := v_0
  2609  		y := v_1
  2610  		v.reset(OpS390XLOCGR)
  2611  		v.Type = t
  2612  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2613  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2614  		v0.AddArg2(x, y)
  2615  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2616  		v1.AuxInt = int64ToAuxInt(0)
  2617  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2618  		v2.AuxInt = int32ToAuxInt(64)
  2619  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2620  		v3.AddArg(y)
  2621  		v2.AddArg(v3)
  2622  		v.AddArg3(v0, v1, v2)
  2623  		return true
  2624  	}
  2625  }
  2626  func rewriteValueS390X_OpLsh32x16(v *Value) bool {
  2627  	v_1 := v.Args[1]
  2628  	v_0 := v.Args[0]
  2629  	b := v.Block
  2630  	typ := &b.Func.Config.Types
  2631  	// match: (Lsh32x16 x y)
  2632  	// cond: shiftIsBounded(v)
  2633  	// result: (SLW x y)
  2634  	for {
  2635  		x := v_0
  2636  		y := v_1
  2637  		if !(shiftIsBounded(v)) {
  2638  			break
  2639  		}
  2640  		v.reset(OpS390XSLW)
  2641  		v.AddArg2(x, y)
  2642  		return true
  2643  	}
  2644  	// match: (Lsh32x16 <t> x y)
  2645  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2646  	for {
  2647  		t := v.Type
  2648  		x := v_0
  2649  		y := v_1
  2650  		v.reset(OpS390XLOCGR)
  2651  		v.Type = t
  2652  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2653  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2654  		v0.AddArg2(x, y)
  2655  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2656  		v1.AuxInt = int64ToAuxInt(0)
  2657  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2658  		v2.AuxInt = int32ToAuxInt(64)
  2659  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2660  		v3.AddArg(y)
  2661  		v2.AddArg(v3)
  2662  		v.AddArg3(v0, v1, v2)
  2663  		return true
  2664  	}
  2665  }
  2666  func rewriteValueS390X_OpLsh32x32(v *Value) bool {
  2667  	v_1 := v.Args[1]
  2668  	v_0 := v.Args[0]
  2669  	b := v.Block
  2670  	typ := &b.Func.Config.Types
  2671  	// match: (Lsh32x32 x y)
  2672  	// cond: shiftIsBounded(v)
  2673  	// result: (SLW x y)
  2674  	for {
  2675  		x := v_0
  2676  		y := v_1
  2677  		if !(shiftIsBounded(v)) {
  2678  			break
  2679  		}
  2680  		v.reset(OpS390XSLW)
  2681  		v.AddArg2(x, y)
  2682  		return true
  2683  	}
  2684  	// match: (Lsh32x32 <t> x y)
  2685  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2686  	for {
  2687  		t := v.Type
  2688  		x := v_0
  2689  		y := v_1
  2690  		v.reset(OpS390XLOCGR)
  2691  		v.Type = t
  2692  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2693  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2694  		v0.AddArg2(x, y)
  2695  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2696  		v1.AuxInt = int64ToAuxInt(0)
  2697  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2698  		v2.AuxInt = int32ToAuxInt(64)
  2699  		v2.AddArg(y)
  2700  		v.AddArg3(v0, v1, v2)
  2701  		return true
  2702  	}
  2703  }
  2704  func rewriteValueS390X_OpLsh32x64(v *Value) bool {
  2705  	v_1 := v.Args[1]
  2706  	v_0 := v.Args[0]
  2707  	b := v.Block
  2708  	typ := &b.Func.Config.Types
  2709  	// match: (Lsh32x64 x y)
  2710  	// cond: shiftIsBounded(v)
  2711  	// result: (SLW x y)
  2712  	for {
  2713  		x := v_0
  2714  		y := v_1
  2715  		if !(shiftIsBounded(v)) {
  2716  			break
  2717  		}
  2718  		v.reset(OpS390XSLW)
  2719  		v.AddArg2(x, y)
  2720  		return true
  2721  	}
  2722  	// match: (Lsh32x64 <t> x y)
  2723  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2724  	for {
  2725  		t := v.Type
  2726  		x := v_0
  2727  		y := v_1
  2728  		v.reset(OpS390XLOCGR)
  2729  		v.Type = t
  2730  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2731  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2732  		v0.AddArg2(x, y)
  2733  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2734  		v1.AuxInt = int64ToAuxInt(0)
  2735  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2736  		v2.AuxInt = int32ToAuxInt(64)
  2737  		v2.AddArg(y)
  2738  		v.AddArg3(v0, v1, v2)
  2739  		return true
  2740  	}
  2741  }
  2742  func rewriteValueS390X_OpLsh32x8(v *Value) bool {
  2743  	v_1 := v.Args[1]
  2744  	v_0 := v.Args[0]
  2745  	b := v.Block
  2746  	typ := &b.Func.Config.Types
  2747  	// match: (Lsh32x8 x y)
  2748  	// cond: shiftIsBounded(v)
  2749  	// result: (SLW x y)
  2750  	for {
  2751  		x := v_0
  2752  		y := v_1
  2753  		if !(shiftIsBounded(v)) {
  2754  			break
  2755  		}
  2756  		v.reset(OpS390XSLW)
  2757  		v.AddArg2(x, y)
  2758  		return true
  2759  	}
  2760  	// match: (Lsh32x8 <t> x y)
  2761  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2762  	for {
  2763  		t := v.Type
  2764  		x := v_0
  2765  		y := v_1
  2766  		v.reset(OpS390XLOCGR)
  2767  		v.Type = t
  2768  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2769  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2770  		v0.AddArg2(x, y)
  2771  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2772  		v1.AuxInt = int64ToAuxInt(0)
  2773  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2774  		v2.AuxInt = int32ToAuxInt(64)
  2775  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2776  		v3.AddArg(y)
  2777  		v2.AddArg(v3)
  2778  		v.AddArg3(v0, v1, v2)
  2779  		return true
  2780  	}
  2781  }
  2782  func rewriteValueS390X_OpLsh64x16(v *Value) bool {
  2783  	v_1 := v.Args[1]
  2784  	v_0 := v.Args[0]
  2785  	b := v.Block
  2786  	typ := &b.Func.Config.Types
  2787  	// match: (Lsh64x16 x y)
  2788  	// cond: shiftIsBounded(v)
  2789  	// result: (SLD x y)
  2790  	for {
  2791  		x := v_0
  2792  		y := v_1
  2793  		if !(shiftIsBounded(v)) {
  2794  			break
  2795  		}
  2796  		v.reset(OpS390XSLD)
  2797  		v.AddArg2(x, y)
  2798  		return true
  2799  	}
  2800  	// match: (Lsh64x16 <t> x y)
  2801  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2802  	for {
  2803  		t := v.Type
  2804  		x := v_0
  2805  		y := v_1
  2806  		v.reset(OpS390XLOCGR)
  2807  		v.Type = t
  2808  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2809  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2810  		v0.AddArg2(x, y)
  2811  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2812  		v1.AuxInt = int64ToAuxInt(0)
  2813  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2814  		v2.AuxInt = int32ToAuxInt(64)
  2815  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2816  		v3.AddArg(y)
  2817  		v2.AddArg(v3)
  2818  		v.AddArg3(v0, v1, v2)
  2819  		return true
  2820  	}
  2821  }
  2822  func rewriteValueS390X_OpLsh64x32(v *Value) bool {
  2823  	v_1 := v.Args[1]
  2824  	v_0 := v.Args[0]
  2825  	b := v.Block
  2826  	typ := &b.Func.Config.Types
  2827  	// match: (Lsh64x32 x y)
  2828  	// cond: shiftIsBounded(v)
  2829  	// result: (SLD x y)
  2830  	for {
  2831  		x := v_0
  2832  		y := v_1
  2833  		if !(shiftIsBounded(v)) {
  2834  			break
  2835  		}
  2836  		v.reset(OpS390XSLD)
  2837  		v.AddArg2(x, y)
  2838  		return true
  2839  	}
  2840  	// match: (Lsh64x32 <t> x y)
  2841  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2842  	for {
  2843  		t := v.Type
  2844  		x := v_0
  2845  		y := v_1
  2846  		v.reset(OpS390XLOCGR)
  2847  		v.Type = t
  2848  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2849  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2850  		v0.AddArg2(x, y)
  2851  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2852  		v1.AuxInt = int64ToAuxInt(0)
  2853  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2854  		v2.AuxInt = int32ToAuxInt(64)
  2855  		v2.AddArg(y)
  2856  		v.AddArg3(v0, v1, v2)
  2857  		return true
  2858  	}
  2859  }
  2860  func rewriteValueS390X_OpLsh64x64(v *Value) bool {
  2861  	v_1 := v.Args[1]
  2862  	v_0 := v.Args[0]
  2863  	b := v.Block
  2864  	typ := &b.Func.Config.Types
  2865  	// match: (Lsh64x64 x y)
  2866  	// cond: shiftIsBounded(v)
  2867  	// result: (SLD x y)
  2868  	for {
  2869  		x := v_0
  2870  		y := v_1
  2871  		if !(shiftIsBounded(v)) {
  2872  			break
  2873  		}
  2874  		v.reset(OpS390XSLD)
  2875  		v.AddArg2(x, y)
  2876  		return true
  2877  	}
  2878  	// match: (Lsh64x64 <t> x y)
  2879  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  2880  	for {
  2881  		t := v.Type
  2882  		x := v_0
  2883  		y := v_1
  2884  		v.reset(OpS390XLOCGR)
  2885  		v.Type = t
  2886  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2887  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2888  		v0.AddArg2(x, y)
  2889  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2890  		v1.AuxInt = int64ToAuxInt(0)
  2891  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  2892  		v2.AuxInt = int32ToAuxInt(64)
  2893  		v2.AddArg(y)
  2894  		v.AddArg3(v0, v1, v2)
  2895  		return true
  2896  	}
  2897  }
  2898  func rewriteValueS390X_OpLsh64x8(v *Value) bool {
  2899  	v_1 := v.Args[1]
  2900  	v_0 := v.Args[0]
  2901  	b := v.Block
  2902  	typ := &b.Func.Config.Types
  2903  	// match: (Lsh64x8 x y)
  2904  	// cond: shiftIsBounded(v)
  2905  	// result: (SLD x y)
  2906  	for {
  2907  		x := v_0
  2908  		y := v_1
  2909  		if !(shiftIsBounded(v)) {
  2910  			break
  2911  		}
  2912  		v.reset(OpS390XSLD)
  2913  		v.AddArg2(x, y)
  2914  		return true
  2915  	}
  2916  	// match: (Lsh64x8 <t> x y)
  2917  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  2918  	for {
  2919  		t := v.Type
  2920  		x := v_0
  2921  		y := v_1
  2922  		v.reset(OpS390XLOCGR)
  2923  		v.Type = t
  2924  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2925  		v0 := b.NewValue0(v.Pos, OpS390XSLD, t)
  2926  		v0.AddArg2(x, y)
  2927  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2928  		v1.AuxInt = int64ToAuxInt(0)
  2929  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2930  		v2.AuxInt = int32ToAuxInt(64)
  2931  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  2932  		v3.AddArg(y)
  2933  		v2.AddArg(v3)
  2934  		v.AddArg3(v0, v1, v2)
  2935  		return true
  2936  	}
  2937  }
  2938  func rewriteValueS390X_OpLsh8x16(v *Value) bool {
  2939  	v_1 := v.Args[1]
  2940  	v_0 := v.Args[0]
  2941  	b := v.Block
  2942  	typ := &b.Func.Config.Types
  2943  	// match: (Lsh8x16 x y)
  2944  	// cond: shiftIsBounded(v)
  2945  	// result: (SLW x y)
  2946  	for {
  2947  		x := v_0
  2948  		y := v_1
  2949  		if !(shiftIsBounded(v)) {
  2950  			break
  2951  		}
  2952  		v.reset(OpS390XSLW)
  2953  		v.AddArg2(x, y)
  2954  		return true
  2955  	}
  2956  	// match: (Lsh8x16 <t> x y)
  2957  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  2958  	for {
  2959  		t := v.Type
  2960  		x := v_0
  2961  		y := v_1
  2962  		v.reset(OpS390XLOCGR)
  2963  		v.Type = t
  2964  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  2965  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  2966  		v0.AddArg2(x, y)
  2967  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  2968  		v1.AuxInt = int64ToAuxInt(0)
  2969  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  2970  		v2.AuxInt = int32ToAuxInt(64)
  2971  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  2972  		v3.AddArg(y)
  2973  		v2.AddArg(v3)
  2974  		v.AddArg3(v0, v1, v2)
  2975  		return true
  2976  	}
  2977  }
  2978  func rewriteValueS390X_OpLsh8x32(v *Value) bool {
  2979  	v_1 := v.Args[1]
  2980  	v_0 := v.Args[0]
  2981  	b := v.Block
  2982  	typ := &b.Func.Config.Types
  2983  	// match: (Lsh8x32 x y)
  2984  	// cond: shiftIsBounded(v)
  2985  	// result: (SLW x y)
  2986  	for {
  2987  		x := v_0
  2988  		y := v_1
  2989  		if !(shiftIsBounded(v)) {
  2990  			break
  2991  		}
  2992  		v.reset(OpS390XSLW)
  2993  		v.AddArg2(x, y)
  2994  		return true
  2995  	}
  2996  	// match: (Lsh8x32 <t> x y)
  2997  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  2998  	for {
  2999  		t := v.Type
  3000  		x := v_0
  3001  		y := v_1
  3002  		v.reset(OpS390XLOCGR)
  3003  		v.Type = t
  3004  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3005  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3006  		v0.AddArg2(x, y)
  3007  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3008  		v1.AuxInt = int64ToAuxInt(0)
  3009  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3010  		v2.AuxInt = int32ToAuxInt(64)
  3011  		v2.AddArg(y)
  3012  		v.AddArg3(v0, v1, v2)
  3013  		return true
  3014  	}
  3015  }
  3016  func rewriteValueS390X_OpLsh8x64(v *Value) bool {
  3017  	v_1 := v.Args[1]
  3018  	v_0 := v.Args[0]
  3019  	b := v.Block
  3020  	typ := &b.Func.Config.Types
  3021  	// match: (Lsh8x64 x y)
  3022  	// cond: shiftIsBounded(v)
  3023  	// result: (SLW x y)
  3024  	for {
  3025  		x := v_0
  3026  		y := v_1
  3027  		if !(shiftIsBounded(v)) {
  3028  			break
  3029  		}
  3030  		v.reset(OpS390XSLW)
  3031  		v.AddArg2(x, y)
  3032  		return true
  3033  	}
  3034  	// match: (Lsh8x64 <t> x y)
  3035  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  3036  	for {
  3037  		t := v.Type
  3038  		x := v_0
  3039  		y := v_1
  3040  		v.reset(OpS390XLOCGR)
  3041  		v.Type = t
  3042  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3043  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3044  		v0.AddArg2(x, y)
  3045  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3046  		v1.AuxInt = int64ToAuxInt(0)
  3047  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  3048  		v2.AuxInt = int32ToAuxInt(64)
  3049  		v2.AddArg(y)
  3050  		v.AddArg3(v0, v1, v2)
  3051  		return true
  3052  	}
  3053  }
  3054  func rewriteValueS390X_OpLsh8x8(v *Value) bool {
  3055  	v_1 := v.Args[1]
  3056  	v_0 := v.Args[0]
  3057  	b := v.Block
  3058  	typ := &b.Func.Config.Types
  3059  	// match: (Lsh8x8 x y)
  3060  	// cond: shiftIsBounded(v)
  3061  	// result: (SLW x y)
  3062  	for {
  3063  		x := v_0
  3064  		y := v_1
  3065  		if !(shiftIsBounded(v)) {
  3066  			break
  3067  		}
  3068  		v.reset(OpS390XSLW)
  3069  		v.AddArg2(x, y)
  3070  		return true
  3071  	}
  3072  	// match: (Lsh8x8 <t> x y)
  3073  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SLW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  3074  	for {
  3075  		t := v.Type
  3076  		x := v_0
  3077  		y := v_1
  3078  		v.reset(OpS390XLOCGR)
  3079  		v.Type = t
  3080  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  3081  		v0 := b.NewValue0(v.Pos, OpS390XSLW, t)
  3082  		v0.AddArg2(x, y)
  3083  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3084  		v1.AuxInt = int64ToAuxInt(0)
  3085  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  3086  		v2.AuxInt = int32ToAuxInt(64)
  3087  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3088  		v3.AddArg(y)
  3089  		v2.AddArg(v3)
  3090  		v.AddArg3(v0, v1, v2)
  3091  		return true
  3092  	}
  3093  }
  3094  func rewriteValueS390X_OpMod16(v *Value) bool {
  3095  	v_1 := v.Args[1]
  3096  	v_0 := v.Args[0]
  3097  	b := v.Block
  3098  	typ := &b.Func.Config.Types
  3099  	// match: (Mod16 x y)
  3100  	// result: (MODW (MOVHreg x) (MOVHreg y))
  3101  	for {
  3102  		x := v_0
  3103  		y := v_1
  3104  		v.reset(OpS390XMODW)
  3105  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3106  		v0.AddArg(x)
  3107  		v1 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3108  		v1.AddArg(y)
  3109  		v.AddArg2(v0, v1)
  3110  		return true
  3111  	}
  3112  }
  3113  func rewriteValueS390X_OpMod16u(v *Value) bool {
  3114  	v_1 := v.Args[1]
  3115  	v_0 := v.Args[0]
  3116  	b := v.Block
  3117  	typ := &b.Func.Config.Types
  3118  	// match: (Mod16u x y)
  3119  	// result: (MODWU (MOVHZreg x) (MOVHZreg y))
  3120  	for {
  3121  		x := v_0
  3122  		y := v_1
  3123  		v.reset(OpS390XMODWU)
  3124  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3125  		v0.AddArg(x)
  3126  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3127  		v1.AddArg(y)
  3128  		v.AddArg2(v0, v1)
  3129  		return true
  3130  	}
  3131  }
  3132  func rewriteValueS390X_OpMod32(v *Value) bool {
  3133  	v_1 := v.Args[1]
  3134  	v_0 := v.Args[0]
  3135  	b := v.Block
  3136  	typ := &b.Func.Config.Types
  3137  	// match: (Mod32 x y)
  3138  	// result: (MODW (MOVWreg x) y)
  3139  	for {
  3140  		x := v_0
  3141  		y := v_1
  3142  		v.reset(OpS390XMODW)
  3143  		v0 := b.NewValue0(v.Pos, OpS390XMOVWreg, typ.Int64)
  3144  		v0.AddArg(x)
  3145  		v.AddArg2(v0, y)
  3146  		return true
  3147  	}
  3148  }
  3149  func rewriteValueS390X_OpMod32u(v *Value) bool {
  3150  	v_1 := v.Args[1]
  3151  	v_0 := v.Args[0]
  3152  	b := v.Block
  3153  	typ := &b.Func.Config.Types
  3154  	// match: (Mod32u x y)
  3155  	// result: (MODWU (MOVWZreg x) y)
  3156  	for {
  3157  		x := v_0
  3158  		y := v_1
  3159  		v.reset(OpS390XMODWU)
  3160  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZreg, typ.UInt64)
  3161  		v0.AddArg(x)
  3162  		v.AddArg2(v0, y)
  3163  		return true
  3164  	}
  3165  }
  3166  func rewriteValueS390X_OpMod64(v *Value) bool {
  3167  	v_1 := v.Args[1]
  3168  	v_0 := v.Args[0]
  3169  	// match: (Mod64 x y)
  3170  	// result: (MODD x y)
  3171  	for {
  3172  		x := v_0
  3173  		y := v_1
  3174  		v.reset(OpS390XMODD)
  3175  		v.AddArg2(x, y)
  3176  		return true
  3177  	}
  3178  }
  3179  func rewriteValueS390X_OpMod8(v *Value) bool {
  3180  	v_1 := v.Args[1]
  3181  	v_0 := v.Args[0]
  3182  	b := v.Block
  3183  	typ := &b.Func.Config.Types
  3184  	// match: (Mod8 x y)
  3185  	// result: (MODW (MOVBreg x) (MOVBreg y))
  3186  	for {
  3187  		x := v_0
  3188  		y := v_1
  3189  		v.reset(OpS390XMODW)
  3190  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3191  		v0.AddArg(x)
  3192  		v1 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3193  		v1.AddArg(y)
  3194  		v.AddArg2(v0, v1)
  3195  		return true
  3196  	}
  3197  }
  3198  func rewriteValueS390X_OpMod8u(v *Value) bool {
  3199  	v_1 := v.Args[1]
  3200  	v_0 := v.Args[0]
  3201  	b := v.Block
  3202  	typ := &b.Func.Config.Types
  3203  	// match: (Mod8u x y)
  3204  	// result: (MODWU (MOVBZreg x) (MOVBZreg y))
  3205  	for {
  3206  		x := v_0
  3207  		y := v_1
  3208  		v.reset(OpS390XMODWU)
  3209  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3210  		v0.AddArg(x)
  3211  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3212  		v1.AddArg(y)
  3213  		v.AddArg2(v0, v1)
  3214  		return true
  3215  	}
  3216  }
  3217  func rewriteValueS390X_OpMove(v *Value) bool {
  3218  	v_2 := v.Args[2]
  3219  	v_1 := v.Args[1]
  3220  	v_0 := v.Args[0]
  3221  	b := v.Block
  3222  	typ := &b.Func.Config.Types
  3223  	// match: (Move [0] _ _ mem)
  3224  	// result: mem
  3225  	for {
  3226  		if auxIntToInt64(v.AuxInt) != 0 {
  3227  			break
  3228  		}
  3229  		mem := v_2
  3230  		v.copyOf(mem)
  3231  		return true
  3232  	}
  3233  	// match: (Move [1] dst src mem)
  3234  	// result: (MOVBstore dst (MOVBZload src mem) mem)
  3235  	for {
  3236  		if auxIntToInt64(v.AuxInt) != 1 {
  3237  			break
  3238  		}
  3239  		dst := v_0
  3240  		src := v_1
  3241  		mem := v_2
  3242  		v.reset(OpS390XMOVBstore)
  3243  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3244  		v0.AddArg2(src, mem)
  3245  		v.AddArg3(dst, v0, mem)
  3246  		return true
  3247  	}
  3248  	// match: (Move [2] dst src mem)
  3249  	// result: (MOVHstore dst (MOVHZload src mem) mem)
  3250  	for {
  3251  		if auxIntToInt64(v.AuxInt) != 2 {
  3252  			break
  3253  		}
  3254  		dst := v_0
  3255  		src := v_1
  3256  		mem := v_2
  3257  		v.reset(OpS390XMOVHstore)
  3258  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3259  		v0.AddArg2(src, mem)
  3260  		v.AddArg3(dst, v0, mem)
  3261  		return true
  3262  	}
  3263  	// match: (Move [4] dst src mem)
  3264  	// result: (MOVWstore dst (MOVWZload src mem) mem)
  3265  	for {
  3266  		if auxIntToInt64(v.AuxInt) != 4 {
  3267  			break
  3268  		}
  3269  		dst := v_0
  3270  		src := v_1
  3271  		mem := v_2
  3272  		v.reset(OpS390XMOVWstore)
  3273  		v0 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3274  		v0.AddArg2(src, mem)
  3275  		v.AddArg3(dst, v0, mem)
  3276  		return true
  3277  	}
  3278  	// match: (Move [8] dst src mem)
  3279  	// result: (MOVDstore dst (MOVDload src mem) mem)
  3280  	for {
  3281  		if auxIntToInt64(v.AuxInt) != 8 {
  3282  			break
  3283  		}
  3284  		dst := v_0
  3285  		src := v_1
  3286  		mem := v_2
  3287  		v.reset(OpS390XMOVDstore)
  3288  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3289  		v0.AddArg2(src, mem)
  3290  		v.AddArg3(dst, v0, mem)
  3291  		return true
  3292  	}
  3293  	// match: (Move [16] dst src mem)
  3294  	// result: (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem))
  3295  	for {
  3296  		if auxIntToInt64(v.AuxInt) != 16 {
  3297  			break
  3298  		}
  3299  		dst := v_0
  3300  		src := v_1
  3301  		mem := v_2
  3302  		v.reset(OpS390XMOVDstore)
  3303  		v.AuxInt = int32ToAuxInt(8)
  3304  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3305  		v0.AuxInt = int32ToAuxInt(8)
  3306  		v0.AddArg2(src, mem)
  3307  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3308  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3309  		v2.AddArg2(src, mem)
  3310  		v1.AddArg3(dst, v2, mem)
  3311  		v.AddArg3(dst, v0, v1)
  3312  		return true
  3313  	}
  3314  	// match: (Move [24] dst src mem)
  3315  	// result: (MOVDstore [16] dst (MOVDload [16] src mem) (MOVDstore [8] dst (MOVDload [8] src mem) (MOVDstore dst (MOVDload src mem) mem)))
  3316  	for {
  3317  		if auxIntToInt64(v.AuxInt) != 24 {
  3318  			break
  3319  		}
  3320  		dst := v_0
  3321  		src := v_1
  3322  		mem := v_2
  3323  		v.reset(OpS390XMOVDstore)
  3324  		v.AuxInt = int32ToAuxInt(16)
  3325  		v0 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3326  		v0.AuxInt = int32ToAuxInt(16)
  3327  		v0.AddArg2(src, mem)
  3328  		v1 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3329  		v1.AuxInt = int32ToAuxInt(8)
  3330  		v2 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3331  		v2.AuxInt = int32ToAuxInt(8)
  3332  		v2.AddArg2(src, mem)
  3333  		v3 := b.NewValue0(v.Pos, OpS390XMOVDstore, types.TypeMem)
  3334  		v4 := b.NewValue0(v.Pos, OpS390XMOVDload, typ.UInt64)
  3335  		v4.AddArg2(src, mem)
  3336  		v3.AddArg3(dst, v4, mem)
  3337  		v1.AddArg3(dst, v2, v3)
  3338  		v.AddArg3(dst, v0, v1)
  3339  		return true
  3340  	}
  3341  	// match: (Move [3] dst src mem)
  3342  	// result: (MOVBstore [2] dst (MOVBZload [2] src mem) (MOVHstore dst (MOVHZload src mem) mem))
  3343  	for {
  3344  		if auxIntToInt64(v.AuxInt) != 3 {
  3345  			break
  3346  		}
  3347  		dst := v_0
  3348  		src := v_1
  3349  		mem := v_2
  3350  		v.reset(OpS390XMOVBstore)
  3351  		v.AuxInt = int32ToAuxInt(2)
  3352  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3353  		v0.AuxInt = int32ToAuxInt(2)
  3354  		v0.AddArg2(src, mem)
  3355  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3356  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3357  		v2.AddArg2(src, mem)
  3358  		v1.AddArg3(dst, v2, mem)
  3359  		v.AddArg3(dst, v0, v1)
  3360  		return true
  3361  	}
  3362  	// match: (Move [5] dst src mem)
  3363  	// result: (MOVBstore [4] dst (MOVBZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3364  	for {
  3365  		if auxIntToInt64(v.AuxInt) != 5 {
  3366  			break
  3367  		}
  3368  		dst := v_0
  3369  		src := v_1
  3370  		mem := v_2
  3371  		v.reset(OpS390XMOVBstore)
  3372  		v.AuxInt = int32ToAuxInt(4)
  3373  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3374  		v0.AuxInt = int32ToAuxInt(4)
  3375  		v0.AddArg2(src, mem)
  3376  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3377  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3378  		v2.AddArg2(src, mem)
  3379  		v1.AddArg3(dst, v2, mem)
  3380  		v.AddArg3(dst, v0, v1)
  3381  		return true
  3382  	}
  3383  	// match: (Move [6] dst src mem)
  3384  	// result: (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem))
  3385  	for {
  3386  		if auxIntToInt64(v.AuxInt) != 6 {
  3387  			break
  3388  		}
  3389  		dst := v_0
  3390  		src := v_1
  3391  		mem := v_2
  3392  		v.reset(OpS390XMOVHstore)
  3393  		v.AuxInt = int32ToAuxInt(4)
  3394  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3395  		v0.AuxInt = int32ToAuxInt(4)
  3396  		v0.AddArg2(src, mem)
  3397  		v1 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3398  		v2 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3399  		v2.AddArg2(src, mem)
  3400  		v1.AddArg3(dst, v2, mem)
  3401  		v.AddArg3(dst, v0, v1)
  3402  		return true
  3403  	}
  3404  	// match: (Move [7] dst src mem)
  3405  	// result: (MOVBstore [6] dst (MOVBZload [6] src mem) (MOVHstore [4] dst (MOVHZload [4] src mem) (MOVWstore dst (MOVWZload src mem) mem)))
  3406  	for {
  3407  		if auxIntToInt64(v.AuxInt) != 7 {
  3408  			break
  3409  		}
  3410  		dst := v_0
  3411  		src := v_1
  3412  		mem := v_2
  3413  		v.reset(OpS390XMOVBstore)
  3414  		v.AuxInt = int32ToAuxInt(6)
  3415  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZload, typ.UInt8)
  3416  		v0.AuxInt = int32ToAuxInt(6)
  3417  		v0.AddArg2(src, mem)
  3418  		v1 := b.NewValue0(v.Pos, OpS390XMOVHstore, types.TypeMem)
  3419  		v1.AuxInt = int32ToAuxInt(4)
  3420  		v2 := b.NewValue0(v.Pos, OpS390XMOVHZload, typ.UInt16)
  3421  		v2.AuxInt = int32ToAuxInt(4)
  3422  		v2.AddArg2(src, mem)
  3423  		v3 := b.NewValue0(v.Pos, OpS390XMOVWstore, types.TypeMem)
  3424  		v4 := b.NewValue0(v.Pos, OpS390XMOVWZload, typ.UInt32)
  3425  		v4.AddArg2(src, mem)
  3426  		v3.AddArg3(dst, v4, mem)
  3427  		v1.AddArg3(dst, v2, v3)
  3428  		v.AddArg3(dst, v0, v1)
  3429  		return true
  3430  	}
  3431  	// match: (Move [s] dst src mem)
  3432  	// cond: s > 0 && s <= 256 && logLargeCopy(v, s)
  3433  	// result: (MVC [makeValAndOff32(int32(s), 0)] dst src mem)
  3434  	for {
  3435  		s := auxIntToInt64(v.AuxInt)
  3436  		dst := v_0
  3437  		src := v_1
  3438  		mem := v_2
  3439  		if !(s > 0 && s <= 256 && logLargeCopy(v, s)) {
  3440  			break
  3441  		}
  3442  		v.reset(OpS390XMVC)
  3443  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(s), 0))
  3444  		v.AddArg3(dst, src, mem)
  3445  		return true
  3446  	}
  3447  	// match: (Move [s] dst src mem)
  3448  	// cond: s > 256 && s <= 512 && logLargeCopy(v, s)
  3449  	// result: (MVC [makeValAndOff32(int32(s)-256, 256)] dst src (MVC [makeValAndOff32(256, 0)] dst src mem))
  3450  	for {
  3451  		s := auxIntToInt64(v.AuxInt)
  3452  		dst := v_0
  3453  		src := v_1
  3454  		mem := v_2
  3455  		if !(s > 256 && s <= 512 && logLargeCopy(v, s)) {
  3456  			break
  3457  		}
  3458  		v.reset(OpS390XMVC)
  3459  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(s)-256, 256))
  3460  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3461  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(256, 0))
  3462  		v0.AddArg3(dst, src, mem)
  3463  		v.AddArg3(dst, src, v0)
  3464  		return true
  3465  	}
  3466  	// match: (Move [s] dst src mem)
  3467  	// cond: s > 512 && s <= 768 && logLargeCopy(v, s)
  3468  	// result: (MVC [makeValAndOff32(int32(s)-512, 512)] dst src (MVC [makeValAndOff32(256, 256)] dst src (MVC [makeValAndOff32(256, 0)] dst src mem)))
  3469  	for {
  3470  		s := auxIntToInt64(v.AuxInt)
  3471  		dst := v_0
  3472  		src := v_1
  3473  		mem := v_2
  3474  		if !(s > 512 && s <= 768 && logLargeCopy(v, s)) {
  3475  			break
  3476  		}
  3477  		v.reset(OpS390XMVC)
  3478  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(s)-512, 512))
  3479  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3480  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(256, 256))
  3481  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3482  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff32(256, 0))
  3483  		v1.AddArg3(dst, src, mem)
  3484  		v0.AddArg3(dst, src, v1)
  3485  		v.AddArg3(dst, src, v0)
  3486  		return true
  3487  	}
  3488  	// match: (Move [s] dst src mem)
  3489  	// cond: s > 768 && s <= 1024 && logLargeCopy(v, s)
  3490  	// result: (MVC [makeValAndOff32(int32(s)-768, 768)] dst src (MVC [makeValAndOff32(256, 512)] dst src (MVC [makeValAndOff32(256, 256)] dst src (MVC [makeValAndOff32(256, 0)] dst src mem))))
  3491  	for {
  3492  		s := auxIntToInt64(v.AuxInt)
  3493  		dst := v_0
  3494  		src := v_1
  3495  		mem := v_2
  3496  		if !(s > 768 && s <= 1024 && logLargeCopy(v, s)) {
  3497  			break
  3498  		}
  3499  		v.reset(OpS390XMVC)
  3500  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(s)-768, 768))
  3501  		v0 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3502  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(256, 512))
  3503  		v1 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3504  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff32(256, 256))
  3505  		v2 := b.NewValue0(v.Pos, OpS390XMVC, types.TypeMem)
  3506  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff32(256, 0))
  3507  		v2.AddArg3(dst, src, mem)
  3508  		v1.AddArg3(dst, src, v2)
  3509  		v0.AddArg3(dst, src, v1)
  3510  		v.AddArg3(dst, src, v0)
  3511  		return true
  3512  	}
  3513  	// match: (Move [s] dst src mem)
  3514  	// cond: s > 1024 && logLargeCopy(v, s)
  3515  	// result: (LoweredMove [s%256] dst src (ADD <src.Type> src (MOVDconst [(s/256)*256])) mem)
  3516  	for {
  3517  		s := auxIntToInt64(v.AuxInt)
  3518  		dst := v_0
  3519  		src := v_1
  3520  		mem := v_2
  3521  		if !(s > 1024 && logLargeCopy(v, s)) {
  3522  			break
  3523  		}
  3524  		v.reset(OpS390XLoweredMove)
  3525  		v.AuxInt = int64ToAuxInt(s % 256)
  3526  		v0 := b.NewValue0(v.Pos, OpS390XADD, src.Type)
  3527  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3528  		v1.AuxInt = int64ToAuxInt((s / 256) * 256)
  3529  		v0.AddArg2(src, v1)
  3530  		v.AddArg4(dst, src, v0, mem)
  3531  		return true
  3532  	}
  3533  	return false
  3534  }
  3535  func rewriteValueS390X_OpNeq16(v *Value) bool {
  3536  	v_1 := v.Args[1]
  3537  	v_0 := v.Args[0]
  3538  	b := v.Block
  3539  	typ := &b.Func.Config.Types
  3540  	// match: (Neq16 x y)
  3541  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVHreg x) (MOVHreg y)))
  3542  	for {
  3543  		x := v_0
  3544  		y := v_1
  3545  		v.reset(OpS390XLOCGR)
  3546  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3547  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3548  		v0.AuxInt = int64ToAuxInt(0)
  3549  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3550  		v1.AuxInt = int64ToAuxInt(1)
  3551  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3552  		v3 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3553  		v3.AddArg(x)
  3554  		v4 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  3555  		v4.AddArg(y)
  3556  		v2.AddArg2(v3, v4)
  3557  		v.AddArg3(v0, v1, v2)
  3558  		return true
  3559  	}
  3560  }
  3561  func rewriteValueS390X_OpNeq32(v *Value) bool {
  3562  	v_1 := v.Args[1]
  3563  	v_0 := v.Args[0]
  3564  	b := v.Block
  3565  	typ := &b.Func.Config.Types
  3566  	// match: (Neq32 x y)
  3567  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW x y))
  3568  	for {
  3569  		x := v_0
  3570  		y := v_1
  3571  		v.reset(OpS390XLOCGR)
  3572  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3573  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3574  		v0.AuxInt = int64ToAuxInt(0)
  3575  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3576  		v1.AuxInt = int64ToAuxInt(1)
  3577  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3578  		v2.AddArg2(x, y)
  3579  		v.AddArg3(v0, v1, v2)
  3580  		return true
  3581  	}
  3582  }
  3583  func rewriteValueS390X_OpNeq32F(v *Value) bool {
  3584  	v_1 := v.Args[1]
  3585  	v_0 := v.Args[0]
  3586  	b := v.Block
  3587  	typ := &b.Func.Config.Types
  3588  	// match: (Neq32F x y)
  3589  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y))
  3590  	for {
  3591  		x := v_0
  3592  		y := v_1
  3593  		v.reset(OpS390XLOCGR)
  3594  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3595  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3596  		v0.AuxInt = int64ToAuxInt(0)
  3597  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3598  		v1.AuxInt = int64ToAuxInt(1)
  3599  		v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags)
  3600  		v2.AddArg2(x, y)
  3601  		v.AddArg3(v0, v1, v2)
  3602  		return true
  3603  	}
  3604  }
  3605  func rewriteValueS390X_OpNeq64(v *Value) bool {
  3606  	v_1 := v.Args[1]
  3607  	v_0 := v.Args[0]
  3608  	b := v.Block
  3609  	typ := &b.Func.Config.Types
  3610  	// match: (Neq64 x y)
  3611  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3612  	for {
  3613  		x := v_0
  3614  		y := v_1
  3615  		v.reset(OpS390XLOCGR)
  3616  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3617  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3618  		v0.AuxInt = int64ToAuxInt(0)
  3619  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3620  		v1.AuxInt = int64ToAuxInt(1)
  3621  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3622  		v2.AddArg2(x, y)
  3623  		v.AddArg3(v0, v1, v2)
  3624  		return true
  3625  	}
  3626  }
  3627  func rewriteValueS390X_OpNeq64F(v *Value) bool {
  3628  	v_1 := v.Args[1]
  3629  	v_0 := v.Args[0]
  3630  	b := v.Block
  3631  	typ := &b.Func.Config.Types
  3632  	// match: (Neq64F x y)
  3633  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y))
  3634  	for {
  3635  		x := v_0
  3636  		y := v_1
  3637  		v.reset(OpS390XLOCGR)
  3638  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3639  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3640  		v0.AuxInt = int64ToAuxInt(0)
  3641  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3642  		v1.AuxInt = int64ToAuxInt(1)
  3643  		v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags)
  3644  		v2.AddArg2(x, y)
  3645  		v.AddArg3(v0, v1, v2)
  3646  		return true
  3647  	}
  3648  }
  3649  func rewriteValueS390X_OpNeq8(v *Value) bool {
  3650  	v_1 := v.Args[1]
  3651  	v_0 := v.Args[0]
  3652  	b := v.Block
  3653  	typ := &b.Func.Config.Types
  3654  	// match: (Neq8 x y)
  3655  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3656  	for {
  3657  		x := v_0
  3658  		y := v_1
  3659  		v.reset(OpS390XLOCGR)
  3660  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3661  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3662  		v0.AuxInt = int64ToAuxInt(0)
  3663  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3664  		v1.AuxInt = int64ToAuxInt(1)
  3665  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3666  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3667  		v3.AddArg(x)
  3668  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3669  		v4.AddArg(y)
  3670  		v2.AddArg2(v3, v4)
  3671  		v.AddArg3(v0, v1, v2)
  3672  		return true
  3673  	}
  3674  }
  3675  func rewriteValueS390X_OpNeqB(v *Value) bool {
  3676  	v_1 := v.Args[1]
  3677  	v_0 := v.Args[0]
  3678  	b := v.Block
  3679  	typ := &b.Func.Config.Types
  3680  	// match: (NeqB x y)
  3681  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMPW (MOVBreg x) (MOVBreg y)))
  3682  	for {
  3683  		x := v_0
  3684  		y := v_1
  3685  		v.reset(OpS390XLOCGR)
  3686  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3687  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3688  		v0.AuxInt = int64ToAuxInt(0)
  3689  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3690  		v1.AuxInt = int64ToAuxInt(1)
  3691  		v2 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  3692  		v3 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3693  		v3.AddArg(x)
  3694  		v4 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  3695  		v4.AddArg(y)
  3696  		v2.AddArg2(v3, v4)
  3697  		v.AddArg3(v0, v1, v2)
  3698  		return true
  3699  	}
  3700  }
  3701  func rewriteValueS390X_OpNeqPtr(v *Value) bool {
  3702  	v_1 := v.Args[1]
  3703  	v_0 := v.Args[0]
  3704  	b := v.Block
  3705  	typ := &b.Func.Config.Types
  3706  	// match: (NeqPtr x y)
  3707  	// result: (LOCGR {s390x.NotEqual} (MOVDconst [0]) (MOVDconst [1]) (CMP x y))
  3708  	for {
  3709  		x := v_0
  3710  		y := v_1
  3711  		v.reset(OpS390XLOCGR)
  3712  		v.Aux = s390xCCMaskToAux(s390x.NotEqual)
  3713  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3714  		v0.AuxInt = int64ToAuxInt(0)
  3715  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3716  		v1.AuxInt = int64ToAuxInt(1)
  3717  		v2 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  3718  		v2.AddArg2(x, y)
  3719  		v.AddArg3(v0, v1, v2)
  3720  		return true
  3721  	}
  3722  }
  3723  func rewriteValueS390X_OpNot(v *Value) bool {
  3724  	v_0 := v.Args[0]
  3725  	// match: (Not x)
  3726  	// result: (XORWconst [1] x)
  3727  	for {
  3728  		x := v_0
  3729  		v.reset(OpS390XXORWconst)
  3730  		v.AuxInt = int32ToAuxInt(1)
  3731  		v.AddArg(x)
  3732  		return true
  3733  	}
  3734  }
  3735  func rewriteValueS390X_OpOffPtr(v *Value) bool {
  3736  	v_0 := v.Args[0]
  3737  	b := v.Block
  3738  	typ := &b.Func.Config.Types
  3739  	// match: (OffPtr [off] ptr:(SP))
  3740  	// result: (MOVDaddr [int32(off)] ptr)
  3741  	for {
  3742  		off := auxIntToInt64(v.AuxInt)
  3743  		ptr := v_0
  3744  		if ptr.Op != OpSP {
  3745  			break
  3746  		}
  3747  		v.reset(OpS390XMOVDaddr)
  3748  		v.AuxInt = int32ToAuxInt(int32(off))
  3749  		v.AddArg(ptr)
  3750  		return true
  3751  	}
  3752  	// match: (OffPtr [off] ptr)
  3753  	// cond: is32Bit(off)
  3754  	// result: (ADDconst [int32(off)] ptr)
  3755  	for {
  3756  		off := auxIntToInt64(v.AuxInt)
  3757  		ptr := v_0
  3758  		if !(is32Bit(off)) {
  3759  			break
  3760  		}
  3761  		v.reset(OpS390XADDconst)
  3762  		v.AuxInt = int32ToAuxInt(int32(off))
  3763  		v.AddArg(ptr)
  3764  		return true
  3765  	}
  3766  	// match: (OffPtr [off] ptr)
  3767  	// result: (ADD (MOVDconst [off]) ptr)
  3768  	for {
  3769  		off := auxIntToInt64(v.AuxInt)
  3770  		ptr := v_0
  3771  		v.reset(OpS390XADD)
  3772  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3773  		v0.AuxInt = int64ToAuxInt(off)
  3774  		v.AddArg2(v0, ptr)
  3775  		return true
  3776  	}
  3777  }
  3778  func rewriteValueS390X_OpPanicBounds(v *Value) bool {
  3779  	v_2 := v.Args[2]
  3780  	v_1 := v.Args[1]
  3781  	v_0 := v.Args[0]
  3782  	// match: (PanicBounds [kind] x y mem)
  3783  	// cond: boundsABI(kind) == 0
  3784  	// result: (LoweredPanicBoundsA [kind] x y mem)
  3785  	for {
  3786  		kind := auxIntToInt64(v.AuxInt)
  3787  		x := v_0
  3788  		y := v_1
  3789  		mem := v_2
  3790  		if !(boundsABI(kind) == 0) {
  3791  			break
  3792  		}
  3793  		v.reset(OpS390XLoweredPanicBoundsA)
  3794  		v.AuxInt = int64ToAuxInt(kind)
  3795  		v.AddArg3(x, y, mem)
  3796  		return true
  3797  	}
  3798  	// match: (PanicBounds [kind] x y mem)
  3799  	// cond: boundsABI(kind) == 1
  3800  	// result: (LoweredPanicBoundsB [kind] x y mem)
  3801  	for {
  3802  		kind := auxIntToInt64(v.AuxInt)
  3803  		x := v_0
  3804  		y := v_1
  3805  		mem := v_2
  3806  		if !(boundsABI(kind) == 1) {
  3807  			break
  3808  		}
  3809  		v.reset(OpS390XLoweredPanicBoundsB)
  3810  		v.AuxInt = int64ToAuxInt(kind)
  3811  		v.AddArg3(x, y, mem)
  3812  		return true
  3813  	}
  3814  	// match: (PanicBounds [kind] x y mem)
  3815  	// cond: boundsABI(kind) == 2
  3816  	// result: (LoweredPanicBoundsC [kind] x y mem)
  3817  	for {
  3818  		kind := auxIntToInt64(v.AuxInt)
  3819  		x := v_0
  3820  		y := v_1
  3821  		mem := v_2
  3822  		if !(boundsABI(kind) == 2) {
  3823  			break
  3824  		}
  3825  		v.reset(OpS390XLoweredPanicBoundsC)
  3826  		v.AuxInt = int64ToAuxInt(kind)
  3827  		v.AddArg3(x, y, mem)
  3828  		return true
  3829  	}
  3830  	return false
  3831  }
  3832  func rewriteValueS390X_OpPopCount16(v *Value) bool {
  3833  	v_0 := v.Args[0]
  3834  	b := v.Block
  3835  	typ := &b.Func.Config.Types
  3836  	// match: (PopCount16 x)
  3837  	// result: (MOVBZreg (SumBytes2 (POPCNT <typ.UInt16> x)))
  3838  	for {
  3839  		x := v_0
  3840  		v.reset(OpS390XMOVBZreg)
  3841  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes2, typ.UInt8)
  3842  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt16)
  3843  		v1.AddArg(x)
  3844  		v0.AddArg(v1)
  3845  		v.AddArg(v0)
  3846  		return true
  3847  	}
  3848  }
  3849  func rewriteValueS390X_OpPopCount32(v *Value) bool {
  3850  	v_0 := v.Args[0]
  3851  	b := v.Block
  3852  	typ := &b.Func.Config.Types
  3853  	// match: (PopCount32 x)
  3854  	// result: (MOVBZreg (SumBytes4 (POPCNT <typ.UInt32> x)))
  3855  	for {
  3856  		x := v_0
  3857  		v.reset(OpS390XMOVBZreg)
  3858  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes4, typ.UInt8)
  3859  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt32)
  3860  		v1.AddArg(x)
  3861  		v0.AddArg(v1)
  3862  		v.AddArg(v0)
  3863  		return true
  3864  	}
  3865  }
  3866  func rewriteValueS390X_OpPopCount64(v *Value) bool {
  3867  	v_0 := v.Args[0]
  3868  	b := v.Block
  3869  	typ := &b.Func.Config.Types
  3870  	// match: (PopCount64 x)
  3871  	// result: (MOVBZreg (SumBytes8 (POPCNT <typ.UInt64> x)))
  3872  	for {
  3873  		x := v_0
  3874  		v.reset(OpS390XMOVBZreg)
  3875  		v0 := b.NewValue0(v.Pos, OpS390XSumBytes8, typ.UInt8)
  3876  		v1 := b.NewValue0(v.Pos, OpS390XPOPCNT, typ.UInt64)
  3877  		v1.AddArg(x)
  3878  		v0.AddArg(v1)
  3879  		v.AddArg(v0)
  3880  		return true
  3881  	}
  3882  }
  3883  func rewriteValueS390X_OpPopCount8(v *Value) bool {
  3884  	v_0 := v.Args[0]
  3885  	b := v.Block
  3886  	typ := &b.Func.Config.Types
  3887  	// match: (PopCount8 x)
  3888  	// result: (POPCNT (MOVBZreg x))
  3889  	for {
  3890  		x := v_0
  3891  		v.reset(OpS390XPOPCNT)
  3892  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  3893  		v0.AddArg(x)
  3894  		v.AddArg(v0)
  3895  		return true
  3896  	}
  3897  }
  3898  func rewriteValueS390X_OpRotateLeft16(v *Value) bool {
  3899  	v_1 := v.Args[1]
  3900  	v_0 := v.Args[0]
  3901  	b := v.Block
  3902  	typ := &b.Func.Config.Types
  3903  	// match: (RotateLeft16 <t> x (MOVDconst [c]))
  3904  	// result: (Or16 (Lsh16x64 <t> x (MOVDconst [c&15])) (Rsh16Ux64 <t> x (MOVDconst [-c&15])))
  3905  	for {
  3906  		t := v.Type
  3907  		x := v_0
  3908  		if v_1.Op != OpS390XMOVDconst {
  3909  			break
  3910  		}
  3911  		c := auxIntToInt64(v_1.AuxInt)
  3912  		v.reset(OpOr16)
  3913  		v0 := b.NewValue0(v.Pos, OpLsh16x64, t)
  3914  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3915  		v1.AuxInt = int64ToAuxInt(c & 15)
  3916  		v0.AddArg2(x, v1)
  3917  		v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t)
  3918  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3919  		v3.AuxInt = int64ToAuxInt(-c & 15)
  3920  		v2.AddArg2(x, v3)
  3921  		v.AddArg2(v0, v2)
  3922  		return true
  3923  	}
  3924  	return false
  3925  }
  3926  func rewriteValueS390X_OpRotateLeft8(v *Value) bool {
  3927  	v_1 := v.Args[1]
  3928  	v_0 := v.Args[0]
  3929  	b := v.Block
  3930  	typ := &b.Func.Config.Types
  3931  	// match: (RotateLeft8 <t> x (MOVDconst [c]))
  3932  	// result: (Or8 (Lsh8x64 <t> x (MOVDconst [c&7])) (Rsh8Ux64 <t> x (MOVDconst [-c&7])))
  3933  	for {
  3934  		t := v.Type
  3935  		x := v_0
  3936  		if v_1.Op != OpS390XMOVDconst {
  3937  			break
  3938  		}
  3939  		c := auxIntToInt64(v_1.AuxInt)
  3940  		v.reset(OpOr8)
  3941  		v0 := b.NewValue0(v.Pos, OpLsh8x64, t)
  3942  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3943  		v1.AuxInt = int64ToAuxInt(c & 7)
  3944  		v0.AddArg2(x, v1)
  3945  		v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t)
  3946  		v3 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  3947  		v3.AuxInt = int64ToAuxInt(-c & 7)
  3948  		v2.AddArg2(x, v3)
  3949  		v.AddArg2(v0, v2)
  3950  		return true
  3951  	}
  3952  	return false
  3953  }
  3954  func rewriteValueS390X_OpRound(v *Value) bool {
  3955  	v_0 := v.Args[0]
  3956  	// match: (Round x)
  3957  	// result: (FIDBR [1] x)
  3958  	for {
  3959  		x := v_0
  3960  		v.reset(OpS390XFIDBR)
  3961  		v.AuxInt = int8ToAuxInt(1)
  3962  		v.AddArg(x)
  3963  		return true
  3964  	}
  3965  }
  3966  func rewriteValueS390X_OpRoundToEven(v *Value) bool {
  3967  	v_0 := v.Args[0]
  3968  	// match: (RoundToEven x)
  3969  	// result: (FIDBR [4] x)
  3970  	for {
  3971  		x := v_0
  3972  		v.reset(OpS390XFIDBR)
  3973  		v.AuxInt = int8ToAuxInt(4)
  3974  		v.AddArg(x)
  3975  		return true
  3976  	}
  3977  }
  3978  func rewriteValueS390X_OpRsh16Ux16(v *Value) bool {
  3979  	v_1 := v.Args[1]
  3980  	v_0 := v.Args[0]
  3981  	b := v.Block
  3982  	typ := &b.Func.Config.Types
  3983  	// match: (Rsh16Ux16 x y)
  3984  	// cond: shiftIsBounded(v)
  3985  	// result: (SRW (MOVHZreg x) y)
  3986  	for {
  3987  		x := v_0
  3988  		y := v_1
  3989  		if !(shiftIsBounded(v)) {
  3990  			break
  3991  		}
  3992  		v.reset(OpS390XSRW)
  3993  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  3994  		v0.AddArg(x)
  3995  		v.AddArg2(v0, y)
  3996  		return true
  3997  	}
  3998  	// match: (Rsh16Ux16 <t> x y)
  3999  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4000  	for {
  4001  		t := v.Type
  4002  		x := v_0
  4003  		y := v_1
  4004  		v.reset(OpS390XLOCGR)
  4005  		v.Type = t
  4006  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4007  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4008  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4009  		v1.AddArg(x)
  4010  		v0.AddArg2(v1, y)
  4011  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4012  		v2.AuxInt = int64ToAuxInt(0)
  4013  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4014  		v3.AuxInt = int32ToAuxInt(64)
  4015  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4016  		v4.AddArg(y)
  4017  		v3.AddArg(v4)
  4018  		v.AddArg3(v0, v2, v3)
  4019  		return true
  4020  	}
  4021  }
  4022  func rewriteValueS390X_OpRsh16Ux32(v *Value) bool {
  4023  	v_1 := v.Args[1]
  4024  	v_0 := v.Args[0]
  4025  	b := v.Block
  4026  	typ := &b.Func.Config.Types
  4027  	// match: (Rsh16Ux32 x y)
  4028  	// cond: shiftIsBounded(v)
  4029  	// result: (SRW (MOVHZreg x) y)
  4030  	for {
  4031  		x := v_0
  4032  		y := v_1
  4033  		if !(shiftIsBounded(v)) {
  4034  			break
  4035  		}
  4036  		v.reset(OpS390XSRW)
  4037  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4038  		v0.AddArg(x)
  4039  		v.AddArg2(v0, y)
  4040  		return true
  4041  	}
  4042  	// match: (Rsh16Ux32 <t> x y)
  4043  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4044  	for {
  4045  		t := v.Type
  4046  		x := v_0
  4047  		y := v_1
  4048  		v.reset(OpS390XLOCGR)
  4049  		v.Type = t
  4050  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4051  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4052  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4053  		v1.AddArg(x)
  4054  		v0.AddArg2(v1, y)
  4055  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4056  		v2.AuxInt = int64ToAuxInt(0)
  4057  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4058  		v3.AuxInt = int32ToAuxInt(64)
  4059  		v3.AddArg(y)
  4060  		v.AddArg3(v0, v2, v3)
  4061  		return true
  4062  	}
  4063  }
  4064  func rewriteValueS390X_OpRsh16Ux64(v *Value) bool {
  4065  	v_1 := v.Args[1]
  4066  	v_0 := v.Args[0]
  4067  	b := v.Block
  4068  	typ := &b.Func.Config.Types
  4069  	// match: (Rsh16Ux64 x y)
  4070  	// cond: shiftIsBounded(v)
  4071  	// result: (SRW (MOVHZreg x) y)
  4072  	for {
  4073  		x := v_0
  4074  		y := v_1
  4075  		if !(shiftIsBounded(v)) {
  4076  			break
  4077  		}
  4078  		v.reset(OpS390XSRW)
  4079  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4080  		v0.AddArg(x)
  4081  		v.AddArg2(v0, y)
  4082  		return true
  4083  	}
  4084  	// match: (Rsh16Ux64 <t> x y)
  4085  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  4086  	for {
  4087  		t := v.Type
  4088  		x := v_0
  4089  		y := v_1
  4090  		v.reset(OpS390XLOCGR)
  4091  		v.Type = t
  4092  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4093  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4094  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4095  		v1.AddArg(x)
  4096  		v0.AddArg2(v1, y)
  4097  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4098  		v2.AuxInt = int64ToAuxInt(0)
  4099  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4100  		v3.AuxInt = int32ToAuxInt(64)
  4101  		v3.AddArg(y)
  4102  		v.AddArg3(v0, v2, v3)
  4103  		return true
  4104  	}
  4105  }
  4106  func rewriteValueS390X_OpRsh16Ux8(v *Value) bool {
  4107  	v_1 := v.Args[1]
  4108  	v_0 := v.Args[0]
  4109  	b := v.Block
  4110  	typ := &b.Func.Config.Types
  4111  	// match: (Rsh16Ux8 x y)
  4112  	// cond: shiftIsBounded(v)
  4113  	// result: (SRW (MOVHZreg x) y)
  4114  	for {
  4115  		x := v_0
  4116  		y := v_1
  4117  		if !(shiftIsBounded(v)) {
  4118  			break
  4119  		}
  4120  		v.reset(OpS390XSRW)
  4121  		v0 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4122  		v0.AddArg(x)
  4123  		v.AddArg2(v0, y)
  4124  		return true
  4125  	}
  4126  	// match: (Rsh16Ux8 <t> x y)
  4127  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVHZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4128  	for {
  4129  		t := v.Type
  4130  		x := v_0
  4131  		y := v_1
  4132  		v.reset(OpS390XLOCGR)
  4133  		v.Type = t
  4134  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4135  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4136  		v1 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4137  		v1.AddArg(x)
  4138  		v0.AddArg2(v1, y)
  4139  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4140  		v2.AuxInt = int64ToAuxInt(0)
  4141  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4142  		v3.AuxInt = int32ToAuxInt(64)
  4143  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4144  		v4.AddArg(y)
  4145  		v3.AddArg(v4)
  4146  		v.AddArg3(v0, v2, v3)
  4147  		return true
  4148  	}
  4149  }
  4150  func rewriteValueS390X_OpRsh16x16(v *Value) bool {
  4151  	v_1 := v.Args[1]
  4152  	v_0 := v.Args[0]
  4153  	b := v.Block
  4154  	typ := &b.Func.Config.Types
  4155  	// match: (Rsh16x16 x y)
  4156  	// cond: shiftIsBounded(v)
  4157  	// result: (SRAW (MOVHreg x) y)
  4158  	for {
  4159  		x := v_0
  4160  		y := v_1
  4161  		if !(shiftIsBounded(v)) {
  4162  			break
  4163  		}
  4164  		v.reset(OpS390XSRAW)
  4165  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4166  		v0.AddArg(x)
  4167  		v.AddArg2(v0, y)
  4168  		return true
  4169  	}
  4170  	// match: (Rsh16x16 x y)
  4171  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4172  	for {
  4173  		x := v_0
  4174  		y := v_1
  4175  		v.reset(OpS390XSRAW)
  4176  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4177  		v0.AddArg(x)
  4178  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4179  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4180  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4181  		v2.AuxInt = int64ToAuxInt(63)
  4182  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4183  		v3.AuxInt = int32ToAuxInt(64)
  4184  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4185  		v4.AddArg(y)
  4186  		v3.AddArg(v4)
  4187  		v1.AddArg3(y, v2, v3)
  4188  		v.AddArg2(v0, v1)
  4189  		return true
  4190  	}
  4191  }
  4192  func rewriteValueS390X_OpRsh16x32(v *Value) bool {
  4193  	v_1 := v.Args[1]
  4194  	v_0 := v.Args[0]
  4195  	b := v.Block
  4196  	typ := &b.Func.Config.Types
  4197  	// match: (Rsh16x32 x y)
  4198  	// cond: shiftIsBounded(v)
  4199  	// result: (SRAW (MOVHreg x) y)
  4200  	for {
  4201  		x := v_0
  4202  		y := v_1
  4203  		if !(shiftIsBounded(v)) {
  4204  			break
  4205  		}
  4206  		v.reset(OpS390XSRAW)
  4207  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4208  		v0.AddArg(x)
  4209  		v.AddArg2(v0, y)
  4210  		return true
  4211  	}
  4212  	// match: (Rsh16x32 x y)
  4213  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4214  	for {
  4215  		x := v_0
  4216  		y := v_1
  4217  		v.reset(OpS390XSRAW)
  4218  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4219  		v0.AddArg(x)
  4220  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4221  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4222  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4223  		v2.AuxInt = int64ToAuxInt(63)
  4224  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4225  		v3.AuxInt = int32ToAuxInt(64)
  4226  		v3.AddArg(y)
  4227  		v1.AddArg3(y, v2, v3)
  4228  		v.AddArg2(v0, v1)
  4229  		return true
  4230  	}
  4231  }
  4232  func rewriteValueS390X_OpRsh16x64(v *Value) bool {
  4233  	v_1 := v.Args[1]
  4234  	v_0 := v.Args[0]
  4235  	b := v.Block
  4236  	typ := &b.Func.Config.Types
  4237  	// match: (Rsh16x64 x y)
  4238  	// cond: shiftIsBounded(v)
  4239  	// result: (SRAW (MOVHreg x) y)
  4240  	for {
  4241  		x := v_0
  4242  		y := v_1
  4243  		if !(shiftIsBounded(v)) {
  4244  			break
  4245  		}
  4246  		v.reset(OpS390XSRAW)
  4247  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4248  		v0.AddArg(x)
  4249  		v.AddArg2(v0, y)
  4250  		return true
  4251  	}
  4252  	// match: (Rsh16x64 x y)
  4253  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4254  	for {
  4255  		x := v_0
  4256  		y := v_1
  4257  		v.reset(OpS390XSRAW)
  4258  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4259  		v0.AddArg(x)
  4260  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4261  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4262  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4263  		v2.AuxInt = int64ToAuxInt(63)
  4264  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4265  		v3.AuxInt = int32ToAuxInt(64)
  4266  		v3.AddArg(y)
  4267  		v1.AddArg3(y, v2, v3)
  4268  		v.AddArg2(v0, v1)
  4269  		return true
  4270  	}
  4271  }
  4272  func rewriteValueS390X_OpRsh16x8(v *Value) bool {
  4273  	v_1 := v.Args[1]
  4274  	v_0 := v.Args[0]
  4275  	b := v.Block
  4276  	typ := &b.Func.Config.Types
  4277  	// match: (Rsh16x8 x y)
  4278  	// cond: shiftIsBounded(v)
  4279  	// result: (SRAW (MOVHreg x) y)
  4280  	for {
  4281  		x := v_0
  4282  		y := v_1
  4283  		if !(shiftIsBounded(v)) {
  4284  			break
  4285  		}
  4286  		v.reset(OpS390XSRAW)
  4287  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4288  		v0.AddArg(x)
  4289  		v.AddArg2(v0, y)
  4290  		return true
  4291  	}
  4292  	// match: (Rsh16x8 x y)
  4293  	// result: (SRAW (MOVHreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4294  	for {
  4295  		x := v_0
  4296  		y := v_1
  4297  		v.reset(OpS390XSRAW)
  4298  		v0 := b.NewValue0(v.Pos, OpS390XMOVHreg, typ.Int64)
  4299  		v0.AddArg(x)
  4300  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4301  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4302  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4303  		v2.AuxInt = int64ToAuxInt(63)
  4304  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4305  		v3.AuxInt = int32ToAuxInt(64)
  4306  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4307  		v4.AddArg(y)
  4308  		v3.AddArg(v4)
  4309  		v1.AddArg3(y, v2, v3)
  4310  		v.AddArg2(v0, v1)
  4311  		return true
  4312  	}
  4313  }
  4314  func rewriteValueS390X_OpRsh32Ux16(v *Value) bool {
  4315  	v_1 := v.Args[1]
  4316  	v_0 := v.Args[0]
  4317  	b := v.Block
  4318  	typ := &b.Func.Config.Types
  4319  	// match: (Rsh32Ux16 x y)
  4320  	// cond: shiftIsBounded(v)
  4321  	// result: (SRW x y)
  4322  	for {
  4323  		x := v_0
  4324  		y := v_1
  4325  		if !(shiftIsBounded(v)) {
  4326  			break
  4327  		}
  4328  		v.reset(OpS390XSRW)
  4329  		v.AddArg2(x, y)
  4330  		return true
  4331  	}
  4332  	// match: (Rsh32Ux16 <t> x y)
  4333  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4334  	for {
  4335  		t := v.Type
  4336  		x := v_0
  4337  		y := v_1
  4338  		v.reset(OpS390XLOCGR)
  4339  		v.Type = t
  4340  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4341  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4342  		v0.AddArg2(x, y)
  4343  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4344  		v1.AuxInt = int64ToAuxInt(0)
  4345  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4346  		v2.AuxInt = int32ToAuxInt(64)
  4347  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4348  		v3.AddArg(y)
  4349  		v2.AddArg(v3)
  4350  		v.AddArg3(v0, v1, v2)
  4351  		return true
  4352  	}
  4353  }
  4354  func rewriteValueS390X_OpRsh32Ux32(v *Value) bool {
  4355  	v_1 := v.Args[1]
  4356  	v_0 := v.Args[0]
  4357  	b := v.Block
  4358  	typ := &b.Func.Config.Types
  4359  	// match: (Rsh32Ux32 x y)
  4360  	// cond: shiftIsBounded(v)
  4361  	// result: (SRW x y)
  4362  	for {
  4363  		x := v_0
  4364  		y := v_1
  4365  		if !(shiftIsBounded(v)) {
  4366  			break
  4367  		}
  4368  		v.reset(OpS390XSRW)
  4369  		v.AddArg2(x, y)
  4370  		return true
  4371  	}
  4372  	// match: (Rsh32Ux32 <t> x y)
  4373  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4374  	for {
  4375  		t := v.Type
  4376  		x := v_0
  4377  		y := v_1
  4378  		v.reset(OpS390XLOCGR)
  4379  		v.Type = t
  4380  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4381  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4382  		v0.AddArg2(x, y)
  4383  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4384  		v1.AuxInt = int64ToAuxInt(0)
  4385  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4386  		v2.AuxInt = int32ToAuxInt(64)
  4387  		v2.AddArg(y)
  4388  		v.AddArg3(v0, v1, v2)
  4389  		return true
  4390  	}
  4391  }
  4392  func rewriteValueS390X_OpRsh32Ux64(v *Value) bool {
  4393  	v_1 := v.Args[1]
  4394  	v_0 := v.Args[0]
  4395  	b := v.Block
  4396  	typ := &b.Func.Config.Types
  4397  	// match: (Rsh32Ux64 x y)
  4398  	// cond: shiftIsBounded(v)
  4399  	// result: (SRW x y)
  4400  	for {
  4401  		x := v_0
  4402  		y := v_1
  4403  		if !(shiftIsBounded(v)) {
  4404  			break
  4405  		}
  4406  		v.reset(OpS390XSRW)
  4407  		v.AddArg2(x, y)
  4408  		return true
  4409  	}
  4410  	// match: (Rsh32Ux64 <t> x y)
  4411  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4412  	for {
  4413  		t := v.Type
  4414  		x := v_0
  4415  		y := v_1
  4416  		v.reset(OpS390XLOCGR)
  4417  		v.Type = t
  4418  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4419  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4420  		v0.AddArg2(x, y)
  4421  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4422  		v1.AuxInt = int64ToAuxInt(0)
  4423  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4424  		v2.AuxInt = int32ToAuxInt(64)
  4425  		v2.AddArg(y)
  4426  		v.AddArg3(v0, v1, v2)
  4427  		return true
  4428  	}
  4429  }
  4430  func rewriteValueS390X_OpRsh32Ux8(v *Value) bool {
  4431  	v_1 := v.Args[1]
  4432  	v_0 := v.Args[0]
  4433  	b := v.Block
  4434  	typ := &b.Func.Config.Types
  4435  	// match: (Rsh32Ux8 x y)
  4436  	// cond: shiftIsBounded(v)
  4437  	// result: (SRW x y)
  4438  	for {
  4439  		x := v_0
  4440  		y := v_1
  4441  		if !(shiftIsBounded(v)) {
  4442  			break
  4443  		}
  4444  		v.reset(OpS390XSRW)
  4445  		v.AddArg2(x, y)
  4446  		return true
  4447  	}
  4448  	// match: (Rsh32Ux8 <t> x y)
  4449  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4450  	for {
  4451  		t := v.Type
  4452  		x := v_0
  4453  		y := v_1
  4454  		v.reset(OpS390XLOCGR)
  4455  		v.Type = t
  4456  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4457  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4458  		v0.AddArg2(x, y)
  4459  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4460  		v1.AuxInt = int64ToAuxInt(0)
  4461  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4462  		v2.AuxInt = int32ToAuxInt(64)
  4463  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4464  		v3.AddArg(y)
  4465  		v2.AddArg(v3)
  4466  		v.AddArg3(v0, v1, v2)
  4467  		return true
  4468  	}
  4469  }
  4470  func rewriteValueS390X_OpRsh32x16(v *Value) bool {
  4471  	v_1 := v.Args[1]
  4472  	v_0 := v.Args[0]
  4473  	b := v.Block
  4474  	typ := &b.Func.Config.Types
  4475  	// match: (Rsh32x16 x y)
  4476  	// cond: shiftIsBounded(v)
  4477  	// result: (SRAW x y)
  4478  	for {
  4479  		x := v_0
  4480  		y := v_1
  4481  		if !(shiftIsBounded(v)) {
  4482  			break
  4483  		}
  4484  		v.reset(OpS390XSRAW)
  4485  		v.AddArg2(x, y)
  4486  		return true
  4487  	}
  4488  	// match: (Rsh32x16 x y)
  4489  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4490  	for {
  4491  		x := v_0
  4492  		y := v_1
  4493  		v.reset(OpS390XSRAW)
  4494  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4495  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4496  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4497  		v1.AuxInt = int64ToAuxInt(63)
  4498  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4499  		v2.AuxInt = int32ToAuxInt(64)
  4500  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4501  		v3.AddArg(y)
  4502  		v2.AddArg(v3)
  4503  		v0.AddArg3(y, v1, v2)
  4504  		v.AddArg2(x, v0)
  4505  		return true
  4506  	}
  4507  }
  4508  func rewriteValueS390X_OpRsh32x32(v *Value) bool {
  4509  	v_1 := v.Args[1]
  4510  	v_0 := v.Args[0]
  4511  	b := v.Block
  4512  	// match: (Rsh32x32 x y)
  4513  	// cond: shiftIsBounded(v)
  4514  	// result: (SRAW x y)
  4515  	for {
  4516  		x := v_0
  4517  		y := v_1
  4518  		if !(shiftIsBounded(v)) {
  4519  			break
  4520  		}
  4521  		v.reset(OpS390XSRAW)
  4522  		v.AddArg2(x, y)
  4523  		return true
  4524  	}
  4525  	// match: (Rsh32x32 x y)
  4526  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4527  	for {
  4528  		x := v_0
  4529  		y := v_1
  4530  		v.reset(OpS390XSRAW)
  4531  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4532  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4533  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4534  		v1.AuxInt = int64ToAuxInt(63)
  4535  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4536  		v2.AuxInt = int32ToAuxInt(64)
  4537  		v2.AddArg(y)
  4538  		v0.AddArg3(y, v1, v2)
  4539  		v.AddArg2(x, v0)
  4540  		return true
  4541  	}
  4542  }
  4543  func rewriteValueS390X_OpRsh32x64(v *Value) bool {
  4544  	v_1 := v.Args[1]
  4545  	v_0 := v.Args[0]
  4546  	b := v.Block
  4547  	// match: (Rsh32x64 x y)
  4548  	// cond: shiftIsBounded(v)
  4549  	// result: (SRAW x y)
  4550  	for {
  4551  		x := v_0
  4552  		y := v_1
  4553  		if !(shiftIsBounded(v)) {
  4554  			break
  4555  		}
  4556  		v.reset(OpS390XSRAW)
  4557  		v.AddArg2(x, y)
  4558  		return true
  4559  	}
  4560  	// match: (Rsh32x64 x y)
  4561  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4562  	for {
  4563  		x := v_0
  4564  		y := v_1
  4565  		v.reset(OpS390XSRAW)
  4566  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4567  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4568  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4569  		v1.AuxInt = int64ToAuxInt(63)
  4570  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4571  		v2.AuxInt = int32ToAuxInt(64)
  4572  		v2.AddArg(y)
  4573  		v0.AddArg3(y, v1, v2)
  4574  		v.AddArg2(x, v0)
  4575  		return true
  4576  	}
  4577  }
  4578  func rewriteValueS390X_OpRsh32x8(v *Value) bool {
  4579  	v_1 := v.Args[1]
  4580  	v_0 := v.Args[0]
  4581  	b := v.Block
  4582  	typ := &b.Func.Config.Types
  4583  	// match: (Rsh32x8 x y)
  4584  	// cond: shiftIsBounded(v)
  4585  	// result: (SRAW x y)
  4586  	for {
  4587  		x := v_0
  4588  		y := v_1
  4589  		if !(shiftIsBounded(v)) {
  4590  			break
  4591  		}
  4592  		v.reset(OpS390XSRAW)
  4593  		v.AddArg2(x, y)
  4594  		return true
  4595  	}
  4596  	// match: (Rsh32x8 x y)
  4597  	// result: (SRAW x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4598  	for {
  4599  		x := v_0
  4600  		y := v_1
  4601  		v.reset(OpS390XSRAW)
  4602  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4603  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4604  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4605  		v1.AuxInt = int64ToAuxInt(63)
  4606  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4607  		v2.AuxInt = int32ToAuxInt(64)
  4608  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4609  		v3.AddArg(y)
  4610  		v2.AddArg(v3)
  4611  		v0.AddArg3(y, v1, v2)
  4612  		v.AddArg2(x, v0)
  4613  		return true
  4614  	}
  4615  }
  4616  func rewriteValueS390X_OpRsh64Ux16(v *Value) bool {
  4617  	v_1 := v.Args[1]
  4618  	v_0 := v.Args[0]
  4619  	b := v.Block
  4620  	typ := &b.Func.Config.Types
  4621  	// match: (Rsh64Ux16 x y)
  4622  	// cond: shiftIsBounded(v)
  4623  	// result: (SRD x y)
  4624  	for {
  4625  		x := v_0
  4626  		y := v_1
  4627  		if !(shiftIsBounded(v)) {
  4628  			break
  4629  		}
  4630  		v.reset(OpS390XSRD)
  4631  		v.AddArg2(x, y)
  4632  		return true
  4633  	}
  4634  	// match: (Rsh64Ux16 <t> x y)
  4635  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4636  	for {
  4637  		t := v.Type
  4638  		x := v_0
  4639  		y := v_1
  4640  		v.reset(OpS390XLOCGR)
  4641  		v.Type = t
  4642  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4643  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4644  		v0.AddArg2(x, y)
  4645  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4646  		v1.AuxInt = int64ToAuxInt(0)
  4647  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4648  		v2.AuxInt = int32ToAuxInt(64)
  4649  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4650  		v3.AddArg(y)
  4651  		v2.AddArg(v3)
  4652  		v.AddArg3(v0, v1, v2)
  4653  		return true
  4654  	}
  4655  }
  4656  func rewriteValueS390X_OpRsh64Ux32(v *Value) bool {
  4657  	v_1 := v.Args[1]
  4658  	v_0 := v.Args[0]
  4659  	b := v.Block
  4660  	typ := &b.Func.Config.Types
  4661  	// match: (Rsh64Ux32 x y)
  4662  	// cond: shiftIsBounded(v)
  4663  	// result: (SRD x y)
  4664  	for {
  4665  		x := v_0
  4666  		y := v_1
  4667  		if !(shiftIsBounded(v)) {
  4668  			break
  4669  		}
  4670  		v.reset(OpS390XSRD)
  4671  		v.AddArg2(x, y)
  4672  		return true
  4673  	}
  4674  	// match: (Rsh64Ux32 <t> x y)
  4675  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst y [64]))
  4676  	for {
  4677  		t := v.Type
  4678  		x := v_0
  4679  		y := v_1
  4680  		v.reset(OpS390XLOCGR)
  4681  		v.Type = t
  4682  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4683  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4684  		v0.AddArg2(x, y)
  4685  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4686  		v1.AuxInt = int64ToAuxInt(0)
  4687  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4688  		v2.AuxInt = int32ToAuxInt(64)
  4689  		v2.AddArg(y)
  4690  		v.AddArg3(v0, v1, v2)
  4691  		return true
  4692  	}
  4693  }
  4694  func rewriteValueS390X_OpRsh64Ux64(v *Value) bool {
  4695  	v_1 := v.Args[1]
  4696  	v_0 := v.Args[0]
  4697  	b := v.Block
  4698  	typ := &b.Func.Config.Types
  4699  	// match: (Rsh64Ux64 x y)
  4700  	// cond: shiftIsBounded(v)
  4701  	// result: (SRD x y)
  4702  	for {
  4703  		x := v_0
  4704  		y := v_1
  4705  		if !(shiftIsBounded(v)) {
  4706  			break
  4707  		}
  4708  		v.reset(OpS390XSRD)
  4709  		v.AddArg2(x, y)
  4710  		return true
  4711  	}
  4712  	// match: (Rsh64Ux64 <t> x y)
  4713  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPUconst y [64]))
  4714  	for {
  4715  		t := v.Type
  4716  		x := v_0
  4717  		y := v_1
  4718  		v.reset(OpS390XLOCGR)
  4719  		v.Type = t
  4720  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4721  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4722  		v0.AddArg2(x, y)
  4723  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4724  		v1.AuxInt = int64ToAuxInt(0)
  4725  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4726  		v2.AuxInt = int32ToAuxInt(64)
  4727  		v2.AddArg(y)
  4728  		v.AddArg3(v0, v1, v2)
  4729  		return true
  4730  	}
  4731  }
  4732  func rewriteValueS390X_OpRsh64Ux8(v *Value) bool {
  4733  	v_1 := v.Args[1]
  4734  	v_0 := v.Args[0]
  4735  	b := v.Block
  4736  	typ := &b.Func.Config.Types
  4737  	// match: (Rsh64Ux8 x y)
  4738  	// cond: shiftIsBounded(v)
  4739  	// result: (SRD x y)
  4740  	for {
  4741  		x := v_0
  4742  		y := v_1
  4743  		if !(shiftIsBounded(v)) {
  4744  			break
  4745  		}
  4746  		v.reset(OpS390XSRD)
  4747  		v.AddArg2(x, y)
  4748  		return true
  4749  	}
  4750  	// match: (Rsh64Ux8 <t> x y)
  4751  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRD <t> x y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  4752  	for {
  4753  		t := v.Type
  4754  		x := v_0
  4755  		y := v_1
  4756  		v.reset(OpS390XLOCGR)
  4757  		v.Type = t
  4758  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4759  		v0 := b.NewValue0(v.Pos, OpS390XSRD, t)
  4760  		v0.AddArg2(x, y)
  4761  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4762  		v1.AuxInt = int64ToAuxInt(0)
  4763  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4764  		v2.AuxInt = int32ToAuxInt(64)
  4765  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4766  		v3.AddArg(y)
  4767  		v2.AddArg(v3)
  4768  		v.AddArg3(v0, v1, v2)
  4769  		return true
  4770  	}
  4771  }
  4772  func rewriteValueS390X_OpRsh64x16(v *Value) bool {
  4773  	v_1 := v.Args[1]
  4774  	v_0 := v.Args[0]
  4775  	b := v.Block
  4776  	typ := &b.Func.Config.Types
  4777  	// match: (Rsh64x16 x y)
  4778  	// cond: shiftIsBounded(v)
  4779  	// result: (SRAD x y)
  4780  	for {
  4781  		x := v_0
  4782  		y := v_1
  4783  		if !(shiftIsBounded(v)) {
  4784  			break
  4785  		}
  4786  		v.reset(OpS390XSRAD)
  4787  		v.AddArg2(x, y)
  4788  		return true
  4789  	}
  4790  	// match: (Rsh64x16 x y)
  4791  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  4792  	for {
  4793  		x := v_0
  4794  		y := v_1
  4795  		v.reset(OpS390XSRAD)
  4796  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4797  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4798  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4799  		v1.AuxInt = int64ToAuxInt(63)
  4800  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4801  		v2.AuxInt = int32ToAuxInt(64)
  4802  		v3 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4803  		v3.AddArg(y)
  4804  		v2.AddArg(v3)
  4805  		v0.AddArg3(y, v1, v2)
  4806  		v.AddArg2(x, v0)
  4807  		return true
  4808  	}
  4809  }
  4810  func rewriteValueS390X_OpRsh64x32(v *Value) bool {
  4811  	v_1 := v.Args[1]
  4812  	v_0 := v.Args[0]
  4813  	b := v.Block
  4814  	// match: (Rsh64x32 x y)
  4815  	// cond: shiftIsBounded(v)
  4816  	// result: (SRAD x y)
  4817  	for {
  4818  		x := v_0
  4819  		y := v_1
  4820  		if !(shiftIsBounded(v)) {
  4821  			break
  4822  		}
  4823  		v.reset(OpS390XSRAD)
  4824  		v.AddArg2(x, y)
  4825  		return true
  4826  	}
  4827  	// match: (Rsh64x32 x y)
  4828  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  4829  	for {
  4830  		x := v_0
  4831  		y := v_1
  4832  		v.reset(OpS390XSRAD)
  4833  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4834  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4835  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4836  		v1.AuxInt = int64ToAuxInt(63)
  4837  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4838  		v2.AuxInt = int32ToAuxInt(64)
  4839  		v2.AddArg(y)
  4840  		v0.AddArg3(y, v1, v2)
  4841  		v.AddArg2(x, v0)
  4842  		return true
  4843  	}
  4844  }
  4845  func rewriteValueS390X_OpRsh64x64(v *Value) bool {
  4846  	v_1 := v.Args[1]
  4847  	v_0 := v.Args[0]
  4848  	b := v.Block
  4849  	// match: (Rsh64x64 x y)
  4850  	// cond: shiftIsBounded(v)
  4851  	// result: (SRAD x y)
  4852  	for {
  4853  		x := v_0
  4854  		y := v_1
  4855  		if !(shiftIsBounded(v)) {
  4856  			break
  4857  		}
  4858  		v.reset(OpS390XSRAD)
  4859  		v.AddArg2(x, y)
  4860  		return true
  4861  	}
  4862  	// match: (Rsh64x64 x y)
  4863  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  4864  	for {
  4865  		x := v_0
  4866  		y := v_1
  4867  		v.reset(OpS390XSRAD)
  4868  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4869  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4870  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4871  		v1.AuxInt = int64ToAuxInt(63)
  4872  		v2 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  4873  		v2.AuxInt = int32ToAuxInt(64)
  4874  		v2.AddArg(y)
  4875  		v0.AddArg3(y, v1, v2)
  4876  		v.AddArg2(x, v0)
  4877  		return true
  4878  	}
  4879  }
  4880  func rewriteValueS390X_OpRsh64x8(v *Value) bool {
  4881  	v_1 := v.Args[1]
  4882  	v_0 := v.Args[0]
  4883  	b := v.Block
  4884  	typ := &b.Func.Config.Types
  4885  	// match: (Rsh64x8 x y)
  4886  	// cond: shiftIsBounded(v)
  4887  	// result: (SRAD x y)
  4888  	for {
  4889  		x := v_0
  4890  		y := v_1
  4891  		if !(shiftIsBounded(v)) {
  4892  			break
  4893  		}
  4894  		v.reset(OpS390XSRAD)
  4895  		v.AddArg2(x, y)
  4896  		return true
  4897  	}
  4898  	// match: (Rsh64x8 x y)
  4899  	// result: (SRAD x (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  4900  	for {
  4901  		x := v_0
  4902  		y := v_1
  4903  		v.reset(OpS390XSRAD)
  4904  		v0 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  4905  		v0.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4906  		v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  4907  		v1.AuxInt = int64ToAuxInt(63)
  4908  		v2 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4909  		v2.AuxInt = int32ToAuxInt(64)
  4910  		v3 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4911  		v3.AddArg(y)
  4912  		v2.AddArg(v3)
  4913  		v0.AddArg3(y, v1, v2)
  4914  		v.AddArg2(x, v0)
  4915  		return true
  4916  	}
  4917  }
  4918  func rewriteValueS390X_OpRsh8Ux16(v *Value) bool {
  4919  	v_1 := v.Args[1]
  4920  	v_0 := v.Args[0]
  4921  	b := v.Block
  4922  	typ := &b.Func.Config.Types
  4923  	// match: (Rsh8Ux16 x y)
  4924  	// cond: shiftIsBounded(v)
  4925  	// result: (SRW (MOVBZreg x) y)
  4926  	for {
  4927  		x := v_0
  4928  		y := v_1
  4929  		if !(shiftIsBounded(v)) {
  4930  			break
  4931  		}
  4932  		v.reset(OpS390XSRW)
  4933  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4934  		v0.AddArg(x)
  4935  		v.AddArg2(v0, y)
  4936  		return true
  4937  	}
  4938  	// match: (Rsh8Ux16 <t> x y)
  4939  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVHZreg y) [64]))
  4940  	for {
  4941  		t := v.Type
  4942  		x := v_0
  4943  		y := v_1
  4944  		v.reset(OpS390XLOCGR)
  4945  		v.Type = t
  4946  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4947  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4948  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4949  		v1.AddArg(x)
  4950  		v0.AddArg2(v1, y)
  4951  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4952  		v2.AuxInt = int64ToAuxInt(0)
  4953  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4954  		v3.AuxInt = int32ToAuxInt(64)
  4955  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  4956  		v4.AddArg(y)
  4957  		v3.AddArg(v4)
  4958  		v.AddArg3(v0, v2, v3)
  4959  		return true
  4960  	}
  4961  }
  4962  func rewriteValueS390X_OpRsh8Ux32(v *Value) bool {
  4963  	v_1 := v.Args[1]
  4964  	v_0 := v.Args[0]
  4965  	b := v.Block
  4966  	typ := &b.Func.Config.Types
  4967  	// match: (Rsh8Ux32 x y)
  4968  	// cond: shiftIsBounded(v)
  4969  	// result: (SRW (MOVBZreg x) y)
  4970  	for {
  4971  		x := v_0
  4972  		y := v_1
  4973  		if !(shiftIsBounded(v)) {
  4974  			break
  4975  		}
  4976  		v.reset(OpS390XSRW)
  4977  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4978  		v0.AddArg(x)
  4979  		v.AddArg2(v0, y)
  4980  		return true
  4981  	}
  4982  	// match: (Rsh8Ux32 <t> x y)
  4983  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst y [64]))
  4984  	for {
  4985  		t := v.Type
  4986  		x := v_0
  4987  		y := v_1
  4988  		v.reset(OpS390XLOCGR)
  4989  		v.Type = t
  4990  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  4991  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  4992  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  4993  		v1.AddArg(x)
  4994  		v0.AddArg2(v1, y)
  4995  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  4996  		v2.AuxInt = int64ToAuxInt(0)
  4997  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  4998  		v3.AuxInt = int32ToAuxInt(64)
  4999  		v3.AddArg(y)
  5000  		v.AddArg3(v0, v2, v3)
  5001  		return true
  5002  	}
  5003  }
  5004  func rewriteValueS390X_OpRsh8Ux64(v *Value) bool {
  5005  	v_1 := v.Args[1]
  5006  	v_0 := v.Args[0]
  5007  	b := v.Block
  5008  	typ := &b.Func.Config.Types
  5009  	// match: (Rsh8Ux64 x y)
  5010  	// cond: shiftIsBounded(v)
  5011  	// result: (SRW (MOVBZreg x) y)
  5012  	for {
  5013  		x := v_0
  5014  		y := v_1
  5015  		if !(shiftIsBounded(v)) {
  5016  			break
  5017  		}
  5018  		v.reset(OpS390XSRW)
  5019  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5020  		v0.AddArg(x)
  5021  		v.AddArg2(v0, y)
  5022  		return true
  5023  	}
  5024  	// match: (Rsh8Ux64 <t> x y)
  5025  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPUconst y [64]))
  5026  	for {
  5027  		t := v.Type
  5028  		x := v_0
  5029  		y := v_1
  5030  		v.reset(OpS390XLOCGR)
  5031  		v.Type = t
  5032  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5033  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5034  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5035  		v1.AddArg(x)
  5036  		v0.AddArg2(v1, y)
  5037  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5038  		v2.AuxInt = int64ToAuxInt(0)
  5039  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5040  		v3.AuxInt = int32ToAuxInt(64)
  5041  		v3.AddArg(y)
  5042  		v.AddArg3(v0, v2, v3)
  5043  		return true
  5044  	}
  5045  }
  5046  func rewriteValueS390X_OpRsh8Ux8(v *Value) bool {
  5047  	v_1 := v.Args[1]
  5048  	v_0 := v.Args[0]
  5049  	b := v.Block
  5050  	typ := &b.Func.Config.Types
  5051  	// match: (Rsh8Ux8 x y)
  5052  	// cond: shiftIsBounded(v)
  5053  	// result: (SRW (MOVBZreg x) y)
  5054  	for {
  5055  		x := v_0
  5056  		y := v_1
  5057  		if !(shiftIsBounded(v)) {
  5058  			break
  5059  		}
  5060  		v.reset(OpS390XSRW)
  5061  		v0 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5062  		v0.AddArg(x)
  5063  		v.AddArg2(v0, y)
  5064  		return true
  5065  	}
  5066  	// match: (Rsh8Ux8 <t> x y)
  5067  	// result: (LOCGR {s390x.GreaterOrEqual} <t> (SRW <t> (MOVBZreg x) y) (MOVDconst [0]) (CMPWUconst (MOVBZreg y) [64]))
  5068  	for {
  5069  		t := v.Type
  5070  		x := v_0
  5071  		y := v_1
  5072  		v.reset(OpS390XLOCGR)
  5073  		v.Type = t
  5074  		v.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5075  		v0 := b.NewValue0(v.Pos, OpS390XSRW, t)
  5076  		v1 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5077  		v1.AddArg(x)
  5078  		v0.AddArg2(v1, y)
  5079  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
  5080  		v2.AuxInt = int64ToAuxInt(0)
  5081  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5082  		v3.AuxInt = int32ToAuxInt(64)
  5083  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5084  		v4.AddArg(y)
  5085  		v3.AddArg(v4)
  5086  		v.AddArg3(v0, v2, v3)
  5087  		return true
  5088  	}
  5089  }
  5090  func rewriteValueS390X_OpRsh8x16(v *Value) bool {
  5091  	v_1 := v.Args[1]
  5092  	v_0 := v.Args[0]
  5093  	b := v.Block
  5094  	typ := &b.Func.Config.Types
  5095  	// match: (Rsh8x16 x y)
  5096  	// cond: shiftIsBounded(v)
  5097  	// result: (SRAW (MOVBreg x) y)
  5098  	for {
  5099  		x := v_0
  5100  		y := v_1
  5101  		if !(shiftIsBounded(v)) {
  5102  			break
  5103  		}
  5104  		v.reset(OpS390XSRAW)
  5105  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5106  		v0.AddArg(x)
  5107  		v.AddArg2(v0, y)
  5108  		return true
  5109  	}
  5110  	// match: (Rsh8x16 x y)
  5111  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVHZreg y) [64])))
  5112  	for {
  5113  		x := v_0
  5114  		y := v_1
  5115  		v.reset(OpS390XSRAW)
  5116  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5117  		v0.AddArg(x)
  5118  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5119  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5120  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5121  		v2.AuxInt = int64ToAuxInt(63)
  5122  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5123  		v3.AuxInt = int32ToAuxInt(64)
  5124  		v4 := b.NewValue0(v.Pos, OpS390XMOVHZreg, typ.UInt64)
  5125  		v4.AddArg(y)
  5126  		v3.AddArg(v4)
  5127  		v1.AddArg3(y, v2, v3)
  5128  		v.AddArg2(v0, v1)
  5129  		return true
  5130  	}
  5131  }
  5132  func rewriteValueS390X_OpRsh8x32(v *Value) bool {
  5133  	v_1 := v.Args[1]
  5134  	v_0 := v.Args[0]
  5135  	b := v.Block
  5136  	typ := &b.Func.Config.Types
  5137  	// match: (Rsh8x32 x y)
  5138  	// cond: shiftIsBounded(v)
  5139  	// result: (SRAW (MOVBreg x) y)
  5140  	for {
  5141  		x := v_0
  5142  		y := v_1
  5143  		if !(shiftIsBounded(v)) {
  5144  			break
  5145  		}
  5146  		v.reset(OpS390XSRAW)
  5147  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5148  		v0.AddArg(x)
  5149  		v.AddArg2(v0, y)
  5150  		return true
  5151  	}
  5152  	// match: (Rsh8x32 x y)
  5153  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst y [64])))
  5154  	for {
  5155  		x := v_0
  5156  		y := v_1
  5157  		v.reset(OpS390XSRAW)
  5158  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5159  		v0.AddArg(x)
  5160  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5161  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5162  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5163  		v2.AuxInt = int64ToAuxInt(63)
  5164  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5165  		v3.AuxInt = int32ToAuxInt(64)
  5166  		v3.AddArg(y)
  5167  		v1.AddArg3(y, v2, v3)
  5168  		v.AddArg2(v0, v1)
  5169  		return true
  5170  	}
  5171  }
  5172  func rewriteValueS390X_OpRsh8x64(v *Value) bool {
  5173  	v_1 := v.Args[1]
  5174  	v_0 := v.Args[0]
  5175  	b := v.Block
  5176  	typ := &b.Func.Config.Types
  5177  	// match: (Rsh8x64 x y)
  5178  	// cond: shiftIsBounded(v)
  5179  	// result: (SRAW (MOVBreg x) y)
  5180  	for {
  5181  		x := v_0
  5182  		y := v_1
  5183  		if !(shiftIsBounded(v)) {
  5184  			break
  5185  		}
  5186  		v.reset(OpS390XSRAW)
  5187  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5188  		v0.AddArg(x)
  5189  		v.AddArg2(v0, y)
  5190  		return true
  5191  	}
  5192  	// match: (Rsh8x64 x y)
  5193  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPUconst y [64])))
  5194  	for {
  5195  		x := v_0
  5196  		y := v_1
  5197  		v.reset(OpS390XSRAW)
  5198  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5199  		v0.AddArg(x)
  5200  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5201  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5202  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5203  		v2.AuxInt = int64ToAuxInt(63)
  5204  		v3 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  5205  		v3.AuxInt = int32ToAuxInt(64)
  5206  		v3.AddArg(y)
  5207  		v1.AddArg3(y, v2, v3)
  5208  		v.AddArg2(v0, v1)
  5209  		return true
  5210  	}
  5211  }
  5212  func rewriteValueS390X_OpRsh8x8(v *Value) bool {
  5213  	v_1 := v.Args[1]
  5214  	v_0 := v.Args[0]
  5215  	b := v.Block
  5216  	typ := &b.Func.Config.Types
  5217  	// match: (Rsh8x8 x y)
  5218  	// cond: shiftIsBounded(v)
  5219  	// result: (SRAW (MOVBreg x) y)
  5220  	for {
  5221  		x := v_0
  5222  		y := v_1
  5223  		if !(shiftIsBounded(v)) {
  5224  			break
  5225  		}
  5226  		v.reset(OpS390XSRAW)
  5227  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5228  		v0.AddArg(x)
  5229  		v.AddArg2(v0, y)
  5230  		return true
  5231  	}
  5232  	// match: (Rsh8x8 x y)
  5233  	// result: (SRAW (MOVBreg x) (LOCGR {s390x.GreaterOrEqual} <y.Type> y (MOVDconst <y.Type> [63]) (CMPWUconst (MOVBZreg y) [64])))
  5234  	for {
  5235  		x := v_0
  5236  		y := v_1
  5237  		v.reset(OpS390XSRAW)
  5238  		v0 := b.NewValue0(v.Pos, OpS390XMOVBreg, typ.Int64)
  5239  		v0.AddArg(x)
  5240  		v1 := b.NewValue0(v.Pos, OpS390XLOCGR, y.Type)
  5241  		v1.Aux = s390xCCMaskToAux(s390x.GreaterOrEqual)
  5242  		v2 := b.NewValue0(v.Pos, OpS390XMOVDconst, y.Type)
  5243  		v2.AuxInt = int64ToAuxInt(63)
  5244  		v3 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  5245  		v3.AuxInt = int32ToAuxInt(64)
  5246  		v4 := b.NewValue0(v.Pos, OpS390XMOVBZreg, typ.UInt64)
  5247  		v4.AddArg(y)
  5248  		v3.AddArg(v4)
  5249  		v1.AddArg3(y, v2, v3)
  5250  		v.AddArg2(v0, v1)
  5251  		return true
  5252  	}
  5253  }
  5254  func rewriteValueS390X_OpS390XADD(v *Value) bool {
  5255  	v_1 := v.Args[1]
  5256  	v_0 := v.Args[0]
  5257  	// match: (ADD x (MOVDconst [c]))
  5258  	// cond: is32Bit(c)
  5259  	// result: (ADDconst [int32(c)] x)
  5260  	for {
  5261  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5262  			x := v_0
  5263  			if v_1.Op != OpS390XMOVDconst {
  5264  				continue
  5265  			}
  5266  			c := auxIntToInt64(v_1.AuxInt)
  5267  			if !(is32Bit(c)) {
  5268  				continue
  5269  			}
  5270  			v.reset(OpS390XADDconst)
  5271  			v.AuxInt = int32ToAuxInt(int32(c))
  5272  			v.AddArg(x)
  5273  			return true
  5274  		}
  5275  		break
  5276  	}
  5277  	// match: (ADD (SLDconst x [c]) (SRDconst x [64-c]))
  5278  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, c)})
  5279  	for {
  5280  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5281  			if v_0.Op != OpS390XSLDconst {
  5282  				continue
  5283  			}
  5284  			c := auxIntToUint8(v_0.AuxInt)
  5285  			x := v_0.Args[0]
  5286  			if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 64-c || x != v_1.Args[0] {
  5287  				continue
  5288  			}
  5289  			v.reset(OpS390XRISBGZ)
  5290  			v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, c))
  5291  			v.AddArg(x)
  5292  			return true
  5293  		}
  5294  		break
  5295  	}
  5296  	// match: (ADD idx (MOVDaddr [c] {s} ptr))
  5297  	// cond: ptr.Op != OpSB
  5298  	// result: (MOVDaddridx [c] {s} ptr idx)
  5299  	for {
  5300  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5301  			idx := v_0
  5302  			if v_1.Op != OpS390XMOVDaddr {
  5303  				continue
  5304  			}
  5305  			c := auxIntToInt32(v_1.AuxInt)
  5306  			s := auxToSym(v_1.Aux)
  5307  			ptr := v_1.Args[0]
  5308  			if !(ptr.Op != OpSB) {
  5309  				continue
  5310  			}
  5311  			v.reset(OpS390XMOVDaddridx)
  5312  			v.AuxInt = int32ToAuxInt(c)
  5313  			v.Aux = symToAux(s)
  5314  			v.AddArg2(ptr, idx)
  5315  			return true
  5316  		}
  5317  		break
  5318  	}
  5319  	// match: (ADD x (NEG y))
  5320  	// result: (SUB x y)
  5321  	for {
  5322  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5323  			x := v_0
  5324  			if v_1.Op != OpS390XNEG {
  5325  				continue
  5326  			}
  5327  			y := v_1.Args[0]
  5328  			v.reset(OpS390XSUB)
  5329  			v.AddArg2(x, y)
  5330  			return true
  5331  		}
  5332  		break
  5333  	}
  5334  	// match: (ADD <t> x g:(MOVDload [off] {sym} ptr mem))
  5335  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5336  	// result: (ADDload <t> [off] {sym} x ptr mem)
  5337  	for {
  5338  		t := v.Type
  5339  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5340  			x := v_0
  5341  			g := v_1
  5342  			if g.Op != OpS390XMOVDload {
  5343  				continue
  5344  			}
  5345  			off := auxIntToInt32(g.AuxInt)
  5346  			sym := auxToSym(g.Aux)
  5347  			mem := g.Args[1]
  5348  			ptr := g.Args[0]
  5349  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5350  				continue
  5351  			}
  5352  			v.reset(OpS390XADDload)
  5353  			v.Type = t
  5354  			v.AuxInt = int32ToAuxInt(off)
  5355  			v.Aux = symToAux(sym)
  5356  			v.AddArg3(x, ptr, mem)
  5357  			return true
  5358  		}
  5359  		break
  5360  	}
  5361  	return false
  5362  }
  5363  func rewriteValueS390X_OpS390XADDC(v *Value) bool {
  5364  	v_1 := v.Args[1]
  5365  	v_0 := v.Args[0]
  5366  	// match: (ADDC x (MOVDconst [c]))
  5367  	// cond: is16Bit(c)
  5368  	// result: (ADDCconst x [int16(c)])
  5369  	for {
  5370  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5371  			x := v_0
  5372  			if v_1.Op != OpS390XMOVDconst {
  5373  				continue
  5374  			}
  5375  			c := auxIntToInt64(v_1.AuxInt)
  5376  			if !(is16Bit(c)) {
  5377  				continue
  5378  			}
  5379  			v.reset(OpS390XADDCconst)
  5380  			v.AuxInt = int16ToAuxInt(int16(c))
  5381  			v.AddArg(x)
  5382  			return true
  5383  		}
  5384  		break
  5385  	}
  5386  	return false
  5387  }
  5388  func rewriteValueS390X_OpS390XADDE(v *Value) bool {
  5389  	v_2 := v.Args[2]
  5390  	v_1 := v.Args[1]
  5391  	v_0 := v.Args[0]
  5392  	// match: (ADDE x y (FlagEQ))
  5393  	// result: (ADDC x y)
  5394  	for {
  5395  		x := v_0
  5396  		y := v_1
  5397  		if v_2.Op != OpS390XFlagEQ {
  5398  			break
  5399  		}
  5400  		v.reset(OpS390XADDC)
  5401  		v.AddArg2(x, y)
  5402  		return true
  5403  	}
  5404  	// match: (ADDE x y (FlagLT))
  5405  	// result: (ADDC x y)
  5406  	for {
  5407  		x := v_0
  5408  		y := v_1
  5409  		if v_2.Op != OpS390XFlagLT {
  5410  			break
  5411  		}
  5412  		v.reset(OpS390XADDC)
  5413  		v.AddArg2(x, y)
  5414  		return true
  5415  	}
  5416  	// match: (ADDE x y (Select1 (ADDCconst [-1] (Select0 (ADDE (MOVDconst [0]) (MOVDconst [0]) c)))))
  5417  	// result: (ADDE x y c)
  5418  	for {
  5419  		x := v_0
  5420  		y := v_1
  5421  		if v_2.Op != OpSelect1 {
  5422  			break
  5423  		}
  5424  		v_2_0 := v_2.Args[0]
  5425  		if v_2_0.Op != OpS390XADDCconst || auxIntToInt16(v_2_0.AuxInt) != -1 {
  5426  			break
  5427  		}
  5428  		v_2_0_0 := v_2_0.Args[0]
  5429  		if v_2_0_0.Op != OpSelect0 {
  5430  			break
  5431  		}
  5432  		v_2_0_0_0 := v_2_0_0.Args[0]
  5433  		if v_2_0_0_0.Op != OpS390XADDE {
  5434  			break
  5435  		}
  5436  		c := v_2_0_0_0.Args[2]
  5437  		v_2_0_0_0_0 := v_2_0_0_0.Args[0]
  5438  		if v_2_0_0_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_0.AuxInt) != 0 {
  5439  			break
  5440  		}
  5441  		v_2_0_0_0_1 := v_2_0_0_0.Args[1]
  5442  		if v_2_0_0_0_1.Op != OpS390XMOVDconst || auxIntToInt64(v_2_0_0_0_1.AuxInt) != 0 {
  5443  			break
  5444  		}
  5445  		v.reset(OpS390XADDE)
  5446  		v.AddArg3(x, y, c)
  5447  		return true
  5448  	}
  5449  	return false
  5450  }
  5451  func rewriteValueS390X_OpS390XADDW(v *Value) bool {
  5452  	v_1 := v.Args[1]
  5453  	v_0 := v.Args[0]
  5454  	// match: (ADDW x (MOVDconst [c]))
  5455  	// result: (ADDWconst [int32(c)] x)
  5456  	for {
  5457  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5458  			x := v_0
  5459  			if v_1.Op != OpS390XMOVDconst {
  5460  				continue
  5461  			}
  5462  			c := auxIntToInt64(v_1.AuxInt)
  5463  			v.reset(OpS390XADDWconst)
  5464  			v.AuxInt = int32ToAuxInt(int32(c))
  5465  			v.AddArg(x)
  5466  			return true
  5467  		}
  5468  		break
  5469  	}
  5470  	// match: (ADDW (SLWconst x [c]) (SRWconst x [32-c]))
  5471  	// result: (RLLconst x [c])
  5472  	for {
  5473  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5474  			if v_0.Op != OpS390XSLWconst {
  5475  				continue
  5476  			}
  5477  			c := auxIntToUint8(v_0.AuxInt)
  5478  			x := v_0.Args[0]
  5479  			if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 32-c || x != v_1.Args[0] {
  5480  				continue
  5481  			}
  5482  			v.reset(OpS390XRLLconst)
  5483  			v.AuxInt = uint8ToAuxInt(c)
  5484  			v.AddArg(x)
  5485  			return true
  5486  		}
  5487  		break
  5488  	}
  5489  	// match: (ADDW x (NEGW y))
  5490  	// result: (SUBW x y)
  5491  	for {
  5492  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5493  			x := v_0
  5494  			if v_1.Op != OpS390XNEGW {
  5495  				continue
  5496  			}
  5497  			y := v_1.Args[0]
  5498  			v.reset(OpS390XSUBW)
  5499  			v.AddArg2(x, y)
  5500  			return true
  5501  		}
  5502  		break
  5503  	}
  5504  	// match: (ADDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5505  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5506  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5507  	for {
  5508  		t := v.Type
  5509  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5510  			x := v_0
  5511  			g := v_1
  5512  			if g.Op != OpS390XMOVWload {
  5513  				continue
  5514  			}
  5515  			off := auxIntToInt32(g.AuxInt)
  5516  			sym := auxToSym(g.Aux)
  5517  			mem := g.Args[1]
  5518  			ptr := g.Args[0]
  5519  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5520  				continue
  5521  			}
  5522  			v.reset(OpS390XADDWload)
  5523  			v.Type = t
  5524  			v.AuxInt = int32ToAuxInt(off)
  5525  			v.Aux = symToAux(sym)
  5526  			v.AddArg3(x, ptr, mem)
  5527  			return true
  5528  		}
  5529  		break
  5530  	}
  5531  	// match: (ADDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  5532  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5533  	// result: (ADDWload <t> [off] {sym} x ptr mem)
  5534  	for {
  5535  		t := v.Type
  5536  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5537  			x := v_0
  5538  			g := v_1
  5539  			if g.Op != OpS390XMOVWZload {
  5540  				continue
  5541  			}
  5542  			off := auxIntToInt32(g.AuxInt)
  5543  			sym := auxToSym(g.Aux)
  5544  			mem := g.Args[1]
  5545  			ptr := g.Args[0]
  5546  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5547  				continue
  5548  			}
  5549  			v.reset(OpS390XADDWload)
  5550  			v.Type = t
  5551  			v.AuxInt = int32ToAuxInt(off)
  5552  			v.Aux = symToAux(sym)
  5553  			v.AddArg3(x, ptr, mem)
  5554  			return true
  5555  		}
  5556  		break
  5557  	}
  5558  	return false
  5559  }
  5560  func rewriteValueS390X_OpS390XADDWconst(v *Value) bool {
  5561  	v_0 := v.Args[0]
  5562  	// match: (ADDWconst [c] x)
  5563  	// cond: int32(c)==0
  5564  	// result: x
  5565  	for {
  5566  		c := auxIntToInt32(v.AuxInt)
  5567  		x := v_0
  5568  		if !(int32(c) == 0) {
  5569  			break
  5570  		}
  5571  		v.copyOf(x)
  5572  		return true
  5573  	}
  5574  	// match: (ADDWconst [c] (MOVDconst [d]))
  5575  	// result: (MOVDconst [int64(c)+d])
  5576  	for {
  5577  		c := auxIntToInt32(v.AuxInt)
  5578  		if v_0.Op != OpS390XMOVDconst {
  5579  			break
  5580  		}
  5581  		d := auxIntToInt64(v_0.AuxInt)
  5582  		v.reset(OpS390XMOVDconst)
  5583  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5584  		return true
  5585  	}
  5586  	// match: (ADDWconst [c] (ADDWconst [d] x))
  5587  	// result: (ADDWconst [int32(c+d)] x)
  5588  	for {
  5589  		c := auxIntToInt32(v.AuxInt)
  5590  		if v_0.Op != OpS390XADDWconst {
  5591  			break
  5592  		}
  5593  		d := auxIntToInt32(v_0.AuxInt)
  5594  		x := v_0.Args[0]
  5595  		v.reset(OpS390XADDWconst)
  5596  		v.AuxInt = int32ToAuxInt(int32(c + d))
  5597  		v.AddArg(x)
  5598  		return true
  5599  	}
  5600  	return false
  5601  }
  5602  func rewriteValueS390X_OpS390XADDWload(v *Value) bool {
  5603  	v_2 := v.Args[2]
  5604  	v_1 := v.Args[1]
  5605  	v_0 := v.Args[0]
  5606  	// match: (ADDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5607  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5608  	// result: (ADDWload [off1+off2] {sym} x ptr mem)
  5609  	for {
  5610  		off1 := auxIntToInt32(v.AuxInt)
  5611  		sym := auxToSym(v.Aux)
  5612  		x := v_0
  5613  		if v_1.Op != OpS390XADDconst {
  5614  			break
  5615  		}
  5616  		off2 := auxIntToInt32(v_1.AuxInt)
  5617  		ptr := v_1.Args[0]
  5618  		mem := v_2
  5619  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5620  			break
  5621  		}
  5622  		v.reset(OpS390XADDWload)
  5623  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5624  		v.Aux = symToAux(sym)
  5625  		v.AddArg3(x, ptr, mem)
  5626  		return true
  5627  	}
  5628  	// match: (ADDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5629  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5630  	// result: (ADDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5631  	for {
  5632  		o1 := auxIntToInt32(v.AuxInt)
  5633  		s1 := auxToSym(v.Aux)
  5634  		x := v_0
  5635  		if v_1.Op != OpS390XMOVDaddr {
  5636  			break
  5637  		}
  5638  		o2 := auxIntToInt32(v_1.AuxInt)
  5639  		s2 := auxToSym(v_1.Aux)
  5640  		ptr := v_1.Args[0]
  5641  		mem := v_2
  5642  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5643  			break
  5644  		}
  5645  		v.reset(OpS390XADDWload)
  5646  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5647  		v.Aux = symToAux(mergeSym(s1, s2))
  5648  		v.AddArg3(x, ptr, mem)
  5649  		return true
  5650  	}
  5651  	return false
  5652  }
  5653  func rewriteValueS390X_OpS390XADDconst(v *Value) bool {
  5654  	v_0 := v.Args[0]
  5655  	// match: (ADDconst [c] (MOVDaddr [d] {s} x:(SB)))
  5656  	// cond: ((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))
  5657  	// result: (MOVDaddr [c+d] {s} x)
  5658  	for {
  5659  		c := auxIntToInt32(v.AuxInt)
  5660  		if v_0.Op != OpS390XMOVDaddr {
  5661  			break
  5662  		}
  5663  		d := auxIntToInt32(v_0.AuxInt)
  5664  		s := auxToSym(v_0.Aux)
  5665  		x := v_0.Args[0]
  5666  		if x.Op != OpSB || !(((c+d)&1 == 0) && is32Bit(int64(c)+int64(d))) {
  5667  			break
  5668  		}
  5669  		v.reset(OpS390XMOVDaddr)
  5670  		v.AuxInt = int32ToAuxInt(c + d)
  5671  		v.Aux = symToAux(s)
  5672  		v.AddArg(x)
  5673  		return true
  5674  	}
  5675  	// match: (ADDconst [c] (MOVDaddr [d] {s} x))
  5676  	// cond: x.Op != OpSB && is20Bit(int64(c)+int64(d))
  5677  	// result: (MOVDaddr [c+d] {s} x)
  5678  	for {
  5679  		c := auxIntToInt32(v.AuxInt)
  5680  		if v_0.Op != OpS390XMOVDaddr {
  5681  			break
  5682  		}
  5683  		d := auxIntToInt32(v_0.AuxInt)
  5684  		s := auxToSym(v_0.Aux)
  5685  		x := v_0.Args[0]
  5686  		if !(x.Op != OpSB && is20Bit(int64(c)+int64(d))) {
  5687  			break
  5688  		}
  5689  		v.reset(OpS390XMOVDaddr)
  5690  		v.AuxInt = int32ToAuxInt(c + d)
  5691  		v.Aux = symToAux(s)
  5692  		v.AddArg(x)
  5693  		return true
  5694  	}
  5695  	// match: (ADDconst [c] (MOVDaddridx [d] {s} x y))
  5696  	// cond: is20Bit(int64(c)+int64(d))
  5697  	// result: (MOVDaddridx [c+d] {s} x y)
  5698  	for {
  5699  		c := auxIntToInt32(v.AuxInt)
  5700  		if v_0.Op != OpS390XMOVDaddridx {
  5701  			break
  5702  		}
  5703  		d := auxIntToInt32(v_0.AuxInt)
  5704  		s := auxToSym(v_0.Aux)
  5705  		y := v_0.Args[1]
  5706  		x := v_0.Args[0]
  5707  		if !(is20Bit(int64(c) + int64(d))) {
  5708  			break
  5709  		}
  5710  		v.reset(OpS390XMOVDaddridx)
  5711  		v.AuxInt = int32ToAuxInt(c + d)
  5712  		v.Aux = symToAux(s)
  5713  		v.AddArg2(x, y)
  5714  		return true
  5715  	}
  5716  	// match: (ADDconst [0] x)
  5717  	// result: x
  5718  	for {
  5719  		if auxIntToInt32(v.AuxInt) != 0 {
  5720  			break
  5721  		}
  5722  		x := v_0
  5723  		v.copyOf(x)
  5724  		return true
  5725  	}
  5726  	// match: (ADDconst [c] (MOVDconst [d]))
  5727  	// result: (MOVDconst [int64(c)+d])
  5728  	for {
  5729  		c := auxIntToInt32(v.AuxInt)
  5730  		if v_0.Op != OpS390XMOVDconst {
  5731  			break
  5732  		}
  5733  		d := auxIntToInt64(v_0.AuxInt)
  5734  		v.reset(OpS390XMOVDconst)
  5735  		v.AuxInt = int64ToAuxInt(int64(c) + d)
  5736  		return true
  5737  	}
  5738  	// match: (ADDconst [c] (ADDconst [d] x))
  5739  	// cond: is32Bit(int64(c)+int64(d))
  5740  	// result: (ADDconst [c+d] x)
  5741  	for {
  5742  		c := auxIntToInt32(v.AuxInt)
  5743  		if v_0.Op != OpS390XADDconst {
  5744  			break
  5745  		}
  5746  		d := auxIntToInt32(v_0.AuxInt)
  5747  		x := v_0.Args[0]
  5748  		if !(is32Bit(int64(c) + int64(d))) {
  5749  			break
  5750  		}
  5751  		v.reset(OpS390XADDconst)
  5752  		v.AuxInt = int32ToAuxInt(c + d)
  5753  		v.AddArg(x)
  5754  		return true
  5755  	}
  5756  	return false
  5757  }
  5758  func rewriteValueS390X_OpS390XADDload(v *Value) bool {
  5759  	v_2 := v.Args[2]
  5760  	v_1 := v.Args[1]
  5761  	v_0 := v.Args[0]
  5762  	b := v.Block
  5763  	// match: (ADDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  5764  	// cond: isSamePtr(ptr1, ptr2)
  5765  	// result: (ADD x (LGDR <t> y))
  5766  	for {
  5767  		t := v.Type
  5768  		off := auxIntToInt32(v.AuxInt)
  5769  		sym := auxToSym(v.Aux)
  5770  		x := v_0
  5771  		ptr1 := v_1
  5772  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  5773  			break
  5774  		}
  5775  		y := v_2.Args[1]
  5776  		ptr2 := v_2.Args[0]
  5777  		if !(isSamePtr(ptr1, ptr2)) {
  5778  			break
  5779  		}
  5780  		v.reset(OpS390XADD)
  5781  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  5782  		v0.AddArg(y)
  5783  		v.AddArg2(x, v0)
  5784  		return true
  5785  	}
  5786  	// match: (ADDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  5787  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  5788  	// result: (ADDload [off1+off2] {sym} x ptr mem)
  5789  	for {
  5790  		off1 := auxIntToInt32(v.AuxInt)
  5791  		sym := auxToSym(v.Aux)
  5792  		x := v_0
  5793  		if v_1.Op != OpS390XADDconst {
  5794  			break
  5795  		}
  5796  		off2 := auxIntToInt32(v_1.AuxInt)
  5797  		ptr := v_1.Args[0]
  5798  		mem := v_2
  5799  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  5800  			break
  5801  		}
  5802  		v.reset(OpS390XADDload)
  5803  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5804  		v.Aux = symToAux(sym)
  5805  		v.AddArg3(x, ptr, mem)
  5806  		return true
  5807  	}
  5808  	// match: (ADDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  5809  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  5810  	// result: (ADDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  5811  	for {
  5812  		o1 := auxIntToInt32(v.AuxInt)
  5813  		s1 := auxToSym(v.Aux)
  5814  		x := v_0
  5815  		if v_1.Op != OpS390XMOVDaddr {
  5816  			break
  5817  		}
  5818  		o2 := auxIntToInt32(v_1.AuxInt)
  5819  		s2 := auxToSym(v_1.Aux)
  5820  		ptr := v_1.Args[0]
  5821  		mem := v_2
  5822  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  5823  			break
  5824  		}
  5825  		v.reset(OpS390XADDload)
  5826  		v.AuxInt = int32ToAuxInt(o1 + o2)
  5827  		v.Aux = symToAux(mergeSym(s1, s2))
  5828  		v.AddArg3(x, ptr, mem)
  5829  		return true
  5830  	}
  5831  	return false
  5832  }
  5833  func rewriteValueS390X_OpS390XAND(v *Value) bool {
  5834  	v_1 := v.Args[1]
  5835  	v_0 := v.Args[0]
  5836  	b := v.Block
  5837  	typ := &b.Func.Config.Types
  5838  	// match: (AND x (MOVDconst [c]))
  5839  	// cond: s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil
  5840  	// result: (RISBGZ x {*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c))})
  5841  	for {
  5842  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5843  			x := v_0
  5844  			if v_1.Op != OpS390XMOVDconst {
  5845  				continue
  5846  			}
  5847  			c := auxIntToInt64(v_1.AuxInt)
  5848  			if !(s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)) != nil) {
  5849  				continue
  5850  			}
  5851  			v.reset(OpS390XRISBGZ)
  5852  			v.Aux = s390xRotateParamsToAux(*s390x.NewRotateParams(0, 63, 0).OutMerge(uint64(c)))
  5853  			v.AddArg(x)
  5854  			return true
  5855  		}
  5856  		break
  5857  	}
  5858  	// match: (AND x (MOVDconst [c]))
  5859  	// cond: is32Bit(c) && c < 0
  5860  	// result: (ANDconst [c] x)
  5861  	for {
  5862  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5863  			x := v_0
  5864  			if v_1.Op != OpS390XMOVDconst {
  5865  				continue
  5866  			}
  5867  			c := auxIntToInt64(v_1.AuxInt)
  5868  			if !(is32Bit(c) && c < 0) {
  5869  				continue
  5870  			}
  5871  			v.reset(OpS390XANDconst)
  5872  			v.AuxInt = int64ToAuxInt(c)
  5873  			v.AddArg(x)
  5874  			return true
  5875  		}
  5876  		break
  5877  	}
  5878  	// match: (AND x (MOVDconst [c]))
  5879  	// cond: is32Bit(c) && c >= 0
  5880  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(c)] x))
  5881  	for {
  5882  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5883  			x := v_0
  5884  			if v_1.Op != OpS390XMOVDconst {
  5885  				continue
  5886  			}
  5887  			c := auxIntToInt64(v_1.AuxInt)
  5888  			if !(is32Bit(c) && c >= 0) {
  5889  				continue
  5890  			}
  5891  			v.reset(OpS390XMOVWZreg)
  5892  			v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  5893  			v0.AuxInt = int32ToAuxInt(int32(c))
  5894  			v0.AddArg(x)
  5895  			v.AddArg(v0)
  5896  			return true
  5897  		}
  5898  		break
  5899  	}
  5900  	// match: (AND (MOVDconst [c]) (MOVDconst [d]))
  5901  	// result: (MOVDconst [c&d])
  5902  	for {
  5903  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5904  			if v_0.Op != OpS390XMOVDconst {
  5905  				continue
  5906  			}
  5907  			c := auxIntToInt64(v_0.AuxInt)
  5908  			if v_1.Op != OpS390XMOVDconst {
  5909  				continue
  5910  			}
  5911  			d := auxIntToInt64(v_1.AuxInt)
  5912  			v.reset(OpS390XMOVDconst)
  5913  			v.AuxInt = int64ToAuxInt(c & d)
  5914  			return true
  5915  		}
  5916  		break
  5917  	}
  5918  	// match: (AND x x)
  5919  	// result: x
  5920  	for {
  5921  		x := v_0
  5922  		if x != v_1 {
  5923  			break
  5924  		}
  5925  		v.copyOf(x)
  5926  		return true
  5927  	}
  5928  	// match: (AND <t> x g:(MOVDload [off] {sym} ptr mem))
  5929  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5930  	// result: (ANDload <t> [off] {sym} x ptr mem)
  5931  	for {
  5932  		t := v.Type
  5933  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5934  			x := v_0
  5935  			g := v_1
  5936  			if g.Op != OpS390XMOVDload {
  5937  				continue
  5938  			}
  5939  			off := auxIntToInt32(g.AuxInt)
  5940  			sym := auxToSym(g.Aux)
  5941  			mem := g.Args[1]
  5942  			ptr := g.Args[0]
  5943  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  5944  				continue
  5945  			}
  5946  			v.reset(OpS390XANDload)
  5947  			v.Type = t
  5948  			v.AuxInt = int32ToAuxInt(off)
  5949  			v.Aux = symToAux(sym)
  5950  			v.AddArg3(x, ptr, mem)
  5951  			return true
  5952  		}
  5953  		break
  5954  	}
  5955  	return false
  5956  }
  5957  func rewriteValueS390X_OpS390XANDW(v *Value) bool {
  5958  	v_1 := v.Args[1]
  5959  	v_0 := v.Args[0]
  5960  	// match: (ANDW x (MOVDconst [c]))
  5961  	// result: (ANDWconst [int32(c)] x)
  5962  	for {
  5963  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5964  			x := v_0
  5965  			if v_1.Op != OpS390XMOVDconst {
  5966  				continue
  5967  			}
  5968  			c := auxIntToInt64(v_1.AuxInt)
  5969  			v.reset(OpS390XANDWconst)
  5970  			v.AuxInt = int32ToAuxInt(int32(c))
  5971  			v.AddArg(x)
  5972  			return true
  5973  		}
  5974  		break
  5975  	}
  5976  	// match: (ANDW x x)
  5977  	// result: x
  5978  	for {
  5979  		x := v_0
  5980  		if x != v_1 {
  5981  			break
  5982  		}
  5983  		v.copyOf(x)
  5984  		return true
  5985  	}
  5986  	// match: (ANDW <t> x g:(MOVWload [off] {sym} ptr mem))
  5987  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  5988  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  5989  	for {
  5990  		t := v.Type
  5991  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5992  			x := v_0
  5993  			g := v_1
  5994  			if g.Op != OpS390XMOVWload {
  5995  				continue
  5996  			}
  5997  			off := auxIntToInt32(g.AuxInt)
  5998  			sym := auxToSym(g.Aux)
  5999  			mem := g.Args[1]
  6000  			ptr := g.Args[0]
  6001  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6002  				continue
  6003  			}
  6004  			v.reset(OpS390XANDWload)
  6005  			v.Type = t
  6006  			v.AuxInt = int32ToAuxInt(off)
  6007  			v.Aux = symToAux(sym)
  6008  			v.AddArg3(x, ptr, mem)
  6009  			return true
  6010  		}
  6011  		break
  6012  	}
  6013  	// match: (ANDW <t> x g:(MOVWZload [off] {sym} ptr mem))
  6014  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
  6015  	// result: (ANDWload <t> [off] {sym} x ptr mem)
  6016  	for {
  6017  		t := v.Type
  6018  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6019  			x := v_0
  6020  			g := v_1
  6021  			if g.Op != OpS390XMOVWZload {
  6022  				continue
  6023  			}
  6024  			off := auxIntToInt32(g.AuxInt)
  6025  			sym := auxToSym(g.Aux)
  6026  			mem := g.Args[1]
  6027  			ptr := g.Args[0]
  6028  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
  6029  				continue
  6030  			}
  6031  			v.reset(OpS390XANDWload)
  6032  			v.Type = t
  6033  			v.AuxInt = int32ToAuxInt(off)
  6034  			v.Aux = symToAux(sym)
  6035  			v.AddArg3(x, ptr, mem)
  6036  			return true
  6037  		}
  6038  		break
  6039  	}
  6040  	return false
  6041  }
  6042  func rewriteValueS390X_OpS390XANDWconst(v *Value) bool {
  6043  	v_0 := v.Args[0]
  6044  	// match: (ANDWconst [c] (ANDWconst [d] x))
  6045  	// result: (ANDWconst [c&d] x)
  6046  	for {
  6047  		c := auxIntToInt32(v.AuxInt)
  6048  		if v_0.Op != OpS390XANDWconst {
  6049  			break
  6050  		}
  6051  		d := auxIntToInt32(v_0.AuxInt)
  6052  		x := v_0.Args[0]
  6053  		v.reset(OpS390XANDWconst)
  6054  		v.AuxInt = int32ToAuxInt(c & d)
  6055  		v.AddArg(x)
  6056  		return true
  6057  	}
  6058  	// match: (ANDWconst [0x00ff] x)
  6059  	// result: (MOVBZreg x)
  6060  	for {
  6061  		if auxIntToInt32(v.AuxInt) != 0x00ff {
  6062  			break
  6063  		}
  6064  		x := v_0
  6065  		v.reset(OpS390XMOVBZreg)
  6066  		v.AddArg(x)
  6067  		return true
  6068  	}
  6069  	// match: (ANDWconst [0xffff] x)
  6070  	// result: (MOVHZreg x)
  6071  	for {
  6072  		if auxIntToInt32(v.AuxInt) != 0xffff {
  6073  			break
  6074  		}
  6075  		x := v_0
  6076  		v.reset(OpS390XMOVHZreg)
  6077  		v.AddArg(x)
  6078  		return true
  6079  	}
  6080  	// match: (ANDWconst [c] _)
  6081  	// cond: int32(c)==0
  6082  	// result: (MOVDconst [0])
  6083  	for {
  6084  		c := auxIntToInt32(v.AuxInt)
  6085  		if !(int32(c) == 0) {
  6086  			break
  6087  		}
  6088  		v.reset(OpS390XMOVDconst)
  6089  		v.AuxInt = int64ToAuxInt(0)
  6090  		return true
  6091  	}
  6092  	// match: (ANDWconst [c] x)
  6093  	// cond: int32(c)==-1
  6094  	// result: x
  6095  	for {
  6096  		c := auxIntToInt32(v.AuxInt)
  6097  		x := v_0
  6098  		if !(int32(c) == -1) {
  6099  			break
  6100  		}
  6101  		v.copyOf(x)
  6102  		return true
  6103  	}
  6104  	// match: (ANDWconst [c] (MOVDconst [d]))
  6105  	// result: (MOVDconst [int64(c)&d])
  6106  	for {
  6107  		c := auxIntToInt32(v.AuxInt)
  6108  		if v_0.Op != OpS390XMOVDconst {
  6109  			break
  6110  		}
  6111  		d := auxIntToInt64(v_0.AuxInt)
  6112  		v.reset(OpS390XMOVDconst)
  6113  		v.AuxInt = int64ToAuxInt(int64(c) & d)
  6114  		return true
  6115  	}
  6116  	return false
  6117  }
  6118  func rewriteValueS390X_OpS390XANDWload(v *Value) bool {
  6119  	v_2 := v.Args[2]
  6120  	v_1 := v.Args[1]
  6121  	v_0 := v.Args[0]
  6122  	// match: (ANDWload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6123  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6124  	// result: (ANDWload [off1+off2] {sym} x ptr mem)
  6125  	for {
  6126  		off1 := auxIntToInt32(v.AuxInt)
  6127  		sym := auxToSym(v.Aux)
  6128  		x := v_0
  6129  		if v_1.Op != OpS390XADDconst {
  6130  			break
  6131  		}
  6132  		off2 := auxIntToInt32(v_1.AuxInt)
  6133  		ptr := v_1.Args[0]
  6134  		mem := v_2
  6135  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6136  			break
  6137  		}
  6138  		v.reset(OpS390XANDWload)
  6139  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6140  		v.Aux = symToAux(sym)
  6141  		v.AddArg3(x, ptr, mem)
  6142  		return true
  6143  	}
  6144  	// match: (ANDWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6145  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6146  	// result: (ANDWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6147  	for {
  6148  		o1 := auxIntToInt32(v.AuxInt)
  6149  		s1 := auxToSym(v.Aux)
  6150  		x := v_0
  6151  		if v_1.Op != OpS390XMOVDaddr {
  6152  			break
  6153  		}
  6154  		o2 := auxIntToInt32(v_1.AuxInt)
  6155  		s2 := auxToSym(v_1.Aux)
  6156  		ptr := v_1.Args[0]
  6157  		mem := v_2
  6158  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6159  			break
  6160  		}
  6161  		v.reset(OpS390XANDWload)
  6162  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6163  		v.Aux = symToAux(mergeSym(s1, s2))
  6164  		v.AddArg3(x, ptr, mem)
  6165  		return true
  6166  	}
  6167  	return false
  6168  }
  6169  func rewriteValueS390X_OpS390XANDconst(v *Value) bool {
  6170  	v_0 := v.Args[0]
  6171  	// match: (ANDconst [c] (ANDconst [d] x))
  6172  	// result: (ANDconst [c&d] x)
  6173  	for {
  6174  		c := auxIntToInt64(v.AuxInt)
  6175  		if v_0.Op != OpS390XANDconst {
  6176  			break
  6177  		}
  6178  		d := auxIntToInt64(v_0.AuxInt)
  6179  		x := v_0.Args[0]
  6180  		v.reset(OpS390XANDconst)
  6181  		v.AuxInt = int64ToAuxInt(c & d)
  6182  		v.AddArg(x)
  6183  		return true
  6184  	}
  6185  	// match: (ANDconst [0] _)
  6186  	// result: (MOVDconst [0])
  6187  	for {
  6188  		if auxIntToInt64(v.AuxInt) != 0 {
  6189  			break
  6190  		}
  6191  		v.reset(OpS390XMOVDconst)
  6192  		v.AuxInt = int64ToAuxInt(0)
  6193  		return true
  6194  	}
  6195  	// match: (ANDconst [-1] x)
  6196  	// result: x
  6197  	for {
  6198  		if auxIntToInt64(v.AuxInt) != -1 {
  6199  			break
  6200  		}
  6201  		x := v_0
  6202  		v.copyOf(x)
  6203  		return true
  6204  	}
  6205  	// match: (ANDconst [c] (MOVDconst [d]))
  6206  	// result: (MOVDconst [c&d])
  6207  	for {
  6208  		c := auxIntToInt64(v.AuxInt)
  6209  		if v_0.Op != OpS390XMOVDconst {
  6210  			break
  6211  		}
  6212  		d := auxIntToInt64(v_0.AuxInt)
  6213  		v.reset(OpS390XMOVDconst)
  6214  		v.AuxInt = int64ToAuxInt(c & d)
  6215  		return true
  6216  	}
  6217  	return false
  6218  }
  6219  func rewriteValueS390X_OpS390XANDload(v *Value) bool {
  6220  	v_2 := v.Args[2]
  6221  	v_1 := v.Args[1]
  6222  	v_0 := v.Args[0]
  6223  	b := v.Block
  6224  	// match: (ANDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
  6225  	// cond: isSamePtr(ptr1, ptr2)
  6226  	// result: (AND x (LGDR <t> y))
  6227  	for {
  6228  		t := v.Type
  6229  		off := auxIntToInt32(v.AuxInt)
  6230  		sym := auxToSym(v.Aux)
  6231  		x := v_0
  6232  		ptr1 := v_1
  6233  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
  6234  			break
  6235  		}
  6236  		y := v_2.Args[1]
  6237  		ptr2 := v_2.Args[0]
  6238  		if !(isSamePtr(ptr1, ptr2)) {
  6239  			break
  6240  		}
  6241  		v.reset(OpS390XAND)
  6242  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
  6243  		v0.AddArg(y)
  6244  		v.AddArg2(x, v0)
  6245  		return true
  6246  	}
  6247  	// match: (ANDload [off1] {sym} x (ADDconst [off2] ptr) mem)
  6248  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
  6249  	// result: (ANDload [off1+off2] {sym} x ptr mem)
  6250  	for {
  6251  		off1 := auxIntToInt32(v.AuxInt)
  6252  		sym := auxToSym(v.Aux)
  6253  		x := v_0
  6254  		if v_1.Op != OpS390XADDconst {
  6255  			break
  6256  		}
  6257  		off2 := auxIntToInt32(v_1.AuxInt)
  6258  		ptr := v_1.Args[0]
  6259  		mem := v_2
  6260  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
  6261  			break
  6262  		}
  6263  		v.reset(OpS390XANDload)
  6264  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6265  		v.Aux = symToAux(sym)
  6266  		v.AddArg3(x, ptr, mem)
  6267  		return true
  6268  	}
  6269  	// match: (ANDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
  6270  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
  6271  	// result: (ANDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
  6272  	for {
  6273  		o1 := auxIntToInt32(v.AuxInt)
  6274  		s1 := auxToSym(v.Aux)
  6275  		x := v_0
  6276  		if v_1.Op != OpS390XMOVDaddr {
  6277  			break
  6278  		}
  6279  		o2 := auxIntToInt32(v_1.AuxInt)
  6280  		s2 := auxToSym(v_1.Aux)
  6281  		ptr := v_1.Args[0]
  6282  		mem := v_2
  6283  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
  6284  			break
  6285  		}
  6286  		v.reset(OpS390XANDload)
  6287  		v.AuxInt = int32ToAuxInt(o1 + o2)
  6288  		v.Aux = symToAux(mergeSym(s1, s2))
  6289  		v.AddArg3(x, ptr, mem)
  6290  		return true
  6291  	}
  6292  	return false
  6293  }
  6294  func rewriteValueS390X_OpS390XCMP(v *Value) bool {
  6295  	v_1 := v.Args[1]
  6296  	v_0 := v.Args[0]
  6297  	b := v.Block
  6298  	// match: (CMP x (MOVDconst [c]))
  6299  	// cond: is32Bit(c)
  6300  	// result: (CMPconst x [int32(c)])
  6301  	for {
  6302  		x := v_0
  6303  		if v_1.Op != OpS390XMOVDconst {
  6304  			break
  6305  		}
  6306  		c := auxIntToInt64(v_1.AuxInt)
  6307  		if !(is32Bit(c)) {
  6308  			break
  6309  		}
  6310  		v.reset(OpS390XCMPconst)
  6311  		v.AuxInt = int32ToAuxInt(int32(c))
  6312  		v.AddArg(x)
  6313  		return true
  6314  	}
  6315  	// match: (CMP (MOVDconst [c]) x)
  6316  	// cond: is32Bit(c)
  6317  	// result: (InvertFlags (CMPconst x [int32(c)]))
  6318  	for {
  6319  		if v_0.Op != OpS390XMOVDconst {
  6320  			break
  6321  		}
  6322  		c := auxIntToInt64(v_0.AuxInt)
  6323  		x := v_1
  6324  		if !(is32Bit(c)) {
  6325  			break
  6326  		}
  6327  		v.reset(OpS390XInvertFlags)
  6328  		v0 := b.NewValue0(v.Pos, OpS390XCMPconst, types.TypeFlags)
  6329  		v0.AuxInt = int32ToAuxInt(int32(c))
  6330  		v0.AddArg(x)
  6331  		v.AddArg(v0)
  6332  		return true
  6333  	}
  6334  	// match: (CMP x y)
  6335  	// cond: x.ID > y.ID
  6336  	// result: (InvertFlags (CMP y x))
  6337  	for {
  6338  		x := v_0
  6339  		y := v_1
  6340  		if !(x.ID > y.ID) {
  6341  			break
  6342  		}
  6343  		v.reset(OpS390XInvertFlags)
  6344  		v0 := b.NewValue0(v.Pos, OpS390XCMP, types.TypeFlags)
  6345  		v0.AddArg2(y, x)
  6346  		v.AddArg(v0)
  6347  		return true
  6348  	}
  6349  	return false
  6350  }
  6351  func rewriteValueS390X_OpS390XCMPU(v *Value) bool {
  6352  	v_1 := v.Args[1]
  6353  	v_0 := v.Args[0]
  6354  	b := v.Block
  6355  	// match: (CMPU x (MOVDconst [c]))
  6356  	// cond: isU32Bit(c)
  6357  	// result: (CMPUconst x [int32(c)])
  6358  	for {
  6359  		x := v_0
  6360  		if v_1.Op != OpS390XMOVDconst {
  6361  			break
  6362  		}
  6363  		c := auxIntToInt64(v_1.AuxInt)
  6364  		if !(isU32Bit(c)) {
  6365  			break
  6366  		}
  6367  		v.reset(OpS390XCMPUconst)
  6368  		v.AuxInt = int32ToAuxInt(int32(c))
  6369  		v.AddArg(x)
  6370  		return true
  6371  	}
  6372  	// match: (CMPU (MOVDconst [c]) x)
  6373  	// cond: isU32Bit(c)
  6374  	// result: (InvertFlags (CMPUconst x [int32(c)]))
  6375  	for {
  6376  		if v_0.Op != OpS390XMOVDconst {
  6377  			break
  6378  		}
  6379  		c := auxIntToInt64(v_0.AuxInt)
  6380  		x := v_1
  6381  		if !(isU32Bit(c)) {
  6382  			break
  6383  		}
  6384  		v.reset(OpS390XInvertFlags)
  6385  		v0 := b.NewValue0(v.Pos, OpS390XCMPUconst, types.TypeFlags)
  6386  		v0.AuxInt = int32ToAuxInt(int32(c))
  6387  		v0.AddArg(x)
  6388  		v.AddArg(v0)
  6389  		return true
  6390  	}
  6391  	// match: (CMPU x y)
  6392  	// cond: x.ID > y.ID
  6393  	// result: (InvertFlags (CMPU y x))
  6394  	for {
  6395  		x := v_0
  6396  		y := v_1
  6397  		if !(x.ID > y.ID) {
  6398  			break
  6399  		}
  6400  		v.reset(OpS390XInvertFlags)
  6401  		v0 := b.NewValue0(v.Pos, OpS390XCMPU, types.TypeFlags)
  6402  		v0.AddArg2(y, x)
  6403  		v.AddArg(v0)
  6404  		return true
  6405  	}
  6406  	return false
  6407  }
  6408  func rewriteValueS390X_OpS390XCMPUconst(v *Value) bool {
  6409  	v_0 := v.Args[0]
  6410  	// match: (CMPUconst (MOVDconst [x]) [y])
  6411  	// cond: uint64(x)==uint64(y)
  6412  	// result: (FlagEQ)
  6413  	for {
  6414  		y := auxIntToInt32(v.AuxInt)
  6415  		if v_0.Op != OpS390XMOVDconst {
  6416  			break
  6417  		}
  6418  		x := auxIntToInt64(v_0.AuxInt)
  6419  		if !(uint64(x) == uint64(y)) {
  6420  			break
  6421  		}
  6422  		v.reset(OpS390XFlagEQ)
  6423  		return true
  6424  	}
  6425  	// match: (CMPUconst (MOVDconst [x]) [y])
  6426  	// cond: uint64(x)<uint64(y)
  6427  	// result: (FlagLT)
  6428  	for {
  6429  		y := auxIntToInt32(v.AuxInt)
  6430  		if v_0.Op != OpS390XMOVDconst {
  6431  			break
  6432  		}
  6433  		x := auxIntToInt64(v_0.AuxInt)
  6434  		if !(uint64(x) < uint64(y)) {
  6435  			break
  6436  		}
  6437  		v.reset(OpS390XFlagLT)
  6438  		return true
  6439  	}
  6440  	// match: (CMPUconst (MOVDconst [x]) [y])
  6441  	// cond: uint64(x)>uint64(y)
  6442  	// result: (FlagGT)
  6443  	for {
  6444  		y := auxIntToInt32(v.AuxInt)
  6445  		if v_0.Op != OpS390XMOVDconst {
  6446  			break
  6447  		}
  6448  		x := auxIntToInt64(v_0.AuxInt)
  6449  		if !(uint64(x) > uint64(y)) {
  6450  			break
  6451  		}
  6452  		v.reset(OpS390XFlagGT)
  6453  		return true
  6454  	}
  6455  	// match: (CMPUconst (SRDconst _ [c]) [n])
  6456  	// cond: c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)
  6457  	// result: (FlagLT)
  6458  	for {
  6459  		n := auxIntToInt32(v.AuxInt)
  6460  		if v_0.Op != OpS390XSRDconst {
  6461  			break
  6462  		}
  6463  		c := auxIntToUint8(v_0.AuxInt)
  6464  		if !(c > 0 && c < 64 && (1<<uint(64-c)) <= uint64(n)) {
  6465  			break
  6466  		}
  6467  		v.reset(OpS390XFlagLT)
  6468  		return true
  6469  	}
  6470  	// match: (CMPUconst (RISBGZ x {r}) [c])
  6471  	// cond: r.OutMask() < uint64(uint32(c))
  6472  	// result: (FlagLT)
  6473  	for {
  6474  		c := auxIntToInt32(v.AuxInt)
  6475  		if v_0.Op != OpS390XRISBGZ {
  6476  			break
  6477  		}
  6478  		r := auxToS390xRotateParams(v_0.Aux)
  6479  		if !(r.OutMask() < uint64(uint32(c))) {
  6480  			break
  6481  		}
  6482  		v.reset(OpS390XFlagLT)
  6483  		return true
  6484  	}
  6485  	// match: (CMPUconst (MOVWZreg x) [c])
  6486  	// result: (CMPWUconst x [c])
  6487  	for {
  6488  		c := auxIntToInt32(v.AuxInt)
  6489  		if v_0.Op != OpS390XMOVWZreg {
  6490  			break
  6491  		}
  6492  		x := v_0.Args[0]
  6493  		v.reset(OpS390XCMPWUconst)
  6494  		v.AuxInt = int32ToAuxInt(c)
  6495  		v.AddArg(x)
  6496  		return true
  6497  	}
  6498  	// match: (CMPUconst x:(MOVHreg _) [c])
  6499  	// result: (CMPWUconst x [c])
  6500  	for {
  6501  		c := auxIntToInt32(v.AuxInt)
  6502  		x := v_0
  6503  		if x.Op != OpS390XMOVHreg {
  6504  			break
  6505  		}
  6506  		v.reset(OpS390XCMPWUconst)
  6507  		v.AuxInt = int32ToAuxInt(c)
  6508  		v.AddArg(x)
  6509  		return true
  6510  	}
  6511  	// match: (CMPUconst x:(MOVHZreg _) [c])
  6512  	// result: (CMPWUconst x [c])
  6513  	for {
  6514  		c := auxIntToInt32(v.AuxInt)
  6515  		x := v_0
  6516  		if x.Op != OpS390XMOVHZreg {
  6517  			break
  6518  		}
  6519  		v.reset(OpS390XCMPWUconst)
  6520  		v.AuxInt = int32ToAuxInt(c)
  6521  		v.AddArg(x)
  6522  		return true
  6523  	}
  6524  	// match: (CMPUconst x:(MOVBreg _) [c])
  6525  	// result: (CMPWUconst x [c])
  6526  	for {
  6527  		c := auxIntToInt32(v.AuxInt)
  6528  		x := v_0
  6529  		if x.Op != OpS390XMOVBreg {
  6530  			break
  6531  		}
  6532  		v.reset(OpS390XCMPWUconst)
  6533  		v.AuxInt = int32ToAuxInt(c)
  6534  		v.AddArg(x)
  6535  		return true
  6536  	}
  6537  	// match: (CMPUconst x:(MOVBZreg _) [c])
  6538  	// result: (CMPWUconst x [c])
  6539  	for {
  6540  		c := auxIntToInt32(v.AuxInt)
  6541  		x := v_0
  6542  		if x.Op != OpS390XMOVBZreg {
  6543  			break
  6544  		}
  6545  		v.reset(OpS390XCMPWUconst)
  6546  		v.AuxInt = int32ToAuxInt(c)
  6547  		v.AddArg(x)
  6548  		return true
  6549  	}
  6550  	// match: (CMPUconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  6551  	// cond: int32(m) >= 0
  6552  	// result: (CMPWUconst x [c])
  6553  	for {
  6554  		c := auxIntToInt32(v.AuxInt)
  6555  		if v_0.Op != OpS390XMOVWZreg {
  6556  			break
  6557  		}
  6558  		x := v_0.Args[0]
  6559  		if x.Op != OpS390XANDWconst {
  6560  			break
  6561  		}
  6562  		m := auxIntToInt32(x.AuxInt)
  6563  		if !(int32(m) >= 0) {
  6564  			break
  6565  		}
  6566  		v.reset(OpS390XCMPWUconst)
  6567  		v.AuxInt = int32ToAuxInt(c)
  6568  		v.AddArg(x)
  6569  		return true
  6570  	}
  6571  	// match: (CMPUconst (MOVWreg x:(ANDWconst [m] _)) [c])
  6572  	// cond: int32(m) >= 0
  6573  	// result: (CMPWUconst x [c])
  6574  	for {
  6575  		c := auxIntToInt32(v.AuxInt)
  6576  		if v_0.Op != OpS390XMOVWreg {
  6577  			break
  6578  		}
  6579  		x := v_0.Args[0]
  6580  		if x.Op != OpS390XANDWconst {
  6581  			break
  6582  		}
  6583  		m := auxIntToInt32(x.AuxInt)
  6584  		if !(int32(m) >= 0) {
  6585  			break
  6586  		}
  6587  		v.reset(OpS390XCMPWUconst)
  6588  		v.AuxInt = int32ToAuxInt(c)
  6589  		v.AddArg(x)
  6590  		return true
  6591  	}
  6592  	return false
  6593  }
  6594  func rewriteValueS390X_OpS390XCMPW(v *Value) bool {
  6595  	v_1 := v.Args[1]
  6596  	v_0 := v.Args[0]
  6597  	b := v.Block
  6598  	// match: (CMPW x (MOVDconst [c]))
  6599  	// result: (CMPWconst x [int32(c)])
  6600  	for {
  6601  		x := v_0
  6602  		if v_1.Op != OpS390XMOVDconst {
  6603  			break
  6604  		}
  6605  		c := auxIntToInt64(v_1.AuxInt)
  6606  		v.reset(OpS390XCMPWconst)
  6607  		v.AuxInt = int32ToAuxInt(int32(c))
  6608  		v.AddArg(x)
  6609  		return true
  6610  	}
  6611  	// match: (CMPW (MOVDconst [c]) x)
  6612  	// result: (InvertFlags (CMPWconst x [int32(c)]))
  6613  	for {
  6614  		if v_0.Op != OpS390XMOVDconst {
  6615  			break
  6616  		}
  6617  		c := auxIntToInt64(v_0.AuxInt)
  6618  		x := v_1
  6619  		v.reset(OpS390XInvertFlags)
  6620  		v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags)
  6621  		v0.AuxInt = int32ToAuxInt(int32(c))
  6622  		v0.AddArg(x)
  6623  		v.AddArg(v0)
  6624  		return true
  6625  	}
  6626  	// match: (CMPW x y)
  6627  	// cond: x.ID > y.ID
  6628  	// result: (InvertFlags (CMPW y x))
  6629  	for {
  6630  		x := v_0
  6631  		y := v_1
  6632  		if !(x.ID > y.ID) {
  6633  			break
  6634  		}
  6635  		v.reset(OpS390XInvertFlags)
  6636  		v0 := b.NewValue0(v.Pos, OpS390XCMPW, types.TypeFlags)
  6637  		v0.AddArg2(y, x)
  6638  		v.AddArg(v0)
  6639  		return true
  6640  	}
  6641  	// match: (CMPW x (MOVWreg y))
  6642  	// result: (CMPW x y)
  6643  	for {
  6644  		x := v_0
  6645  		if v_1.Op != OpS390XMOVWreg {
  6646  			break
  6647  		}
  6648  		y := v_1.Args[0]
  6649  		v.reset(OpS390XCMPW)
  6650  		v.AddArg2(x, y)
  6651  		return true
  6652  	}
  6653  	// match: (CMPW x (MOVWZreg y))
  6654  	// result: (CMPW x y)
  6655  	for {
  6656  		x := v_0
  6657  		if v_1.Op != OpS390XMOVWZreg {
  6658  			break
  6659  		}
  6660  		y := v_1.Args[0]
  6661  		v.reset(OpS390XCMPW)
  6662  		v.AddArg2(x, y)
  6663  		return true
  6664  	}
  6665  	// match: (CMPW (MOVWreg x) y)
  6666  	// result: (CMPW x y)
  6667  	for {
  6668  		if v_0.Op != OpS390XMOVWreg {
  6669  			break
  6670  		}
  6671  		x := v_0.Args[0]
  6672  		y := v_1
  6673  		v.reset(OpS390XCMPW)
  6674  		v.AddArg2(x, y)
  6675  		return true
  6676  	}
  6677  	// match: (CMPW (MOVWZreg x) y)
  6678  	// result: (CMPW x y)
  6679  	for {
  6680  		if v_0.Op != OpS390XMOVWZreg {
  6681  			break
  6682  		}
  6683  		x := v_0.Args[0]
  6684  		y := v_1
  6685  		v.reset(OpS390XCMPW)
  6686  		v.AddArg2(x, y)
  6687  		return true
  6688  	}
  6689  	return false
  6690  }
  6691  func rewriteValueS390X_OpS390XCMPWU(v *Value) bool {
  6692  	v_1 := v.Args[1]
  6693  	v_0 := v.Args[0]
  6694  	b := v.Block
  6695  	// match: (CMPWU x (MOVDconst [c]))
  6696  	// result: (CMPWUconst x [int32(c)])
  6697  	for {
  6698  		x := v_0
  6699  		if v_1.Op != OpS390XMOVDconst {
  6700  			break
  6701  		}
  6702  		c := auxIntToInt64(v_1.AuxInt)
  6703  		v.reset(OpS390XCMPWUconst)
  6704  		v.AuxInt = int32ToAuxInt(int32(c))
  6705  		v.AddArg(x)
  6706  		return true
  6707  	}
  6708  	// match: (CMPWU (MOVDconst [c]) x)
  6709  	// result: (InvertFlags (CMPWUconst x [int32(c)]))
  6710  	for {
  6711  		if v_0.Op != OpS390XMOVDconst {
  6712  			break
  6713  		}
  6714  		c := auxIntToInt64(v_0.AuxInt)
  6715  		x := v_1
  6716  		v.reset(OpS390XInvertFlags)
  6717  		v0 := b.NewValue0(v.Pos, OpS390XCMPWUconst, types.TypeFlags)
  6718  		v0.AuxInt = int32ToAuxInt(int32(c))
  6719  		v0.AddArg(x)
  6720  		v.AddArg(v0)
  6721  		return true
  6722  	}
  6723  	// match: (CMPWU x y)
  6724  	// cond: x.ID > y.ID
  6725  	// result: (InvertFlags (CMPWU y x))
  6726  	for {
  6727  		x := v_0
  6728  		y := v_1
  6729  		if !(x.ID > y.ID) {
  6730  			break
  6731  		}
  6732  		v.reset(OpS390XInvertFlags)
  6733  		v0 := b.NewValue0(v.Pos, OpS390XCMPWU, types.TypeFlags)
  6734  		v0.AddArg2(y, x)
  6735  		v.AddArg(v0)
  6736  		return true
  6737  	}
  6738  	// match: (CMPWU x (MOVWreg y))
  6739  	// result: (CMPWU x y)
  6740  	for {
  6741  		x := v_0
  6742  		if v_1.Op != OpS390XMOVWreg {
  6743  			break
  6744  		}
  6745  		y := v_1.Args[0]
  6746  		v.reset(OpS390XCMPWU)
  6747  		v.AddArg2(x, y)
  6748  		return true
  6749  	}
  6750  	// match: (CMPWU x (MOVWZreg y))
  6751  	// result: (CMPWU x y)
  6752  	for {
  6753  		x := v_0
  6754  		if v_1.Op != OpS390XMOVWZreg {
  6755  			break
  6756  		}
  6757  		y := v_1.Args[0]
  6758  		v.reset(OpS390XCMPWU)
  6759  		v.AddArg2(x, y)
  6760  		return true
  6761  	}
  6762  	// match: (CMPWU (MOVWreg x) y)
  6763  	// result: (CMPWU x y)
  6764  	for {
  6765  		if v_0.Op != OpS390XMOVWreg {
  6766  			break
  6767  		}
  6768  		x := v_0.Args[0]
  6769  		y := v_1
  6770  		v.reset(OpS390XCMPWU)
  6771  		v.AddArg2(x, y)
  6772  		return true
  6773  	}
  6774  	// match: (CMPWU (MOVWZreg x) y)
  6775  	// result: (CMPWU x y)
  6776  	for {
  6777  		if v_0.Op != OpS390XMOVWZreg {
  6778  			break
  6779  		}
  6780  		x := v_0.Args[0]
  6781  		y := v_1
  6782  		v.reset(OpS390XCMPWU)
  6783  		v.AddArg2(x, y)
  6784  		return true
  6785  	}
  6786  	return false
  6787  }
  6788  func rewriteValueS390X_OpS390XCMPWUconst(v *Value) bool {
  6789  	v_0 := v.Args[0]
  6790  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6791  	// cond: uint32(x)==uint32(y)
  6792  	// result: (FlagEQ)
  6793  	for {
  6794  		y := auxIntToInt32(v.AuxInt)
  6795  		if v_0.Op != OpS390XMOVDconst {
  6796  			break
  6797  		}
  6798  		x := auxIntToInt64(v_0.AuxInt)
  6799  		if !(uint32(x) == uint32(y)) {
  6800  			break
  6801  		}
  6802  		v.reset(OpS390XFlagEQ)
  6803  		return true
  6804  	}
  6805  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6806  	// cond: uint32(x)<uint32(y)
  6807  	// result: (FlagLT)
  6808  	for {
  6809  		y := auxIntToInt32(v.AuxInt)
  6810  		if v_0.Op != OpS390XMOVDconst {
  6811  			break
  6812  		}
  6813  		x := auxIntToInt64(v_0.AuxInt)
  6814  		if !(uint32(x) < uint32(y)) {
  6815  			break
  6816  		}
  6817  		v.reset(OpS390XFlagLT)
  6818  		return true
  6819  	}
  6820  	// match: (CMPWUconst (MOVDconst [x]) [y])
  6821  	// cond: uint32(x)>uint32(y)
  6822  	// result: (FlagGT)
  6823  	for {
  6824  		y := auxIntToInt32(v.AuxInt)
  6825  		if v_0.Op != OpS390XMOVDconst {
  6826  			break
  6827  		}
  6828  		x := auxIntToInt64(v_0.AuxInt)
  6829  		if !(uint32(x) > uint32(y)) {
  6830  			break
  6831  		}
  6832  		v.reset(OpS390XFlagGT)
  6833  		return true
  6834  	}
  6835  	// match: (CMPWUconst (MOVBZreg _) [c])
  6836  	// cond: 0xff < c
  6837  	// result: (FlagLT)
  6838  	for {
  6839  		c := auxIntToInt32(v.AuxInt)
  6840  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  6841  			break
  6842  		}
  6843  		v.reset(OpS390XFlagLT)
  6844  		return true
  6845  	}
  6846  	// match: (CMPWUconst (MOVHZreg _) [c])
  6847  	// cond: 0xffff < c
  6848  	// result: (FlagLT)
  6849  	for {
  6850  		c := auxIntToInt32(v.AuxInt)
  6851  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  6852  			break
  6853  		}
  6854  		v.reset(OpS390XFlagLT)
  6855  		return true
  6856  	}
  6857  	// match: (CMPWUconst (SRWconst _ [c]) [n])
  6858  	// cond: c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)
  6859  	// result: (FlagLT)
  6860  	for {
  6861  		n := auxIntToInt32(v.AuxInt)
  6862  		if v_0.Op != OpS390XSRWconst {
  6863  			break
  6864  		}
  6865  		c := auxIntToUint8(v_0.AuxInt)
  6866  		if !(c > 0 && c < 32 && (1<<uint(32-c)) <= uint32(n)) {
  6867  			break
  6868  		}
  6869  		v.reset(OpS390XFlagLT)
  6870  		return true
  6871  	}
  6872  	// match: (CMPWUconst (ANDWconst _ [m]) [n])
  6873  	// cond: uint32(m) < uint32(n)
  6874  	// result: (FlagLT)
  6875  	for {
  6876  		n := auxIntToInt32(v.AuxInt)
  6877  		if v_0.Op != OpS390XANDWconst {
  6878  			break
  6879  		}
  6880  		m := auxIntToInt32(v_0.AuxInt)
  6881  		if !(uint32(m) < uint32(n)) {
  6882  			break
  6883  		}
  6884  		v.reset(OpS390XFlagLT)
  6885  		return true
  6886  	}
  6887  	// match: (CMPWUconst (MOVWreg x) [c])
  6888  	// result: (CMPWUconst x [c])
  6889  	for {
  6890  		c := auxIntToInt32(v.AuxInt)
  6891  		if v_0.Op != OpS390XMOVWreg {
  6892  			break
  6893  		}
  6894  		x := v_0.Args[0]
  6895  		v.reset(OpS390XCMPWUconst)
  6896  		v.AuxInt = int32ToAuxInt(c)
  6897  		v.AddArg(x)
  6898  		return true
  6899  	}
  6900  	// match: (CMPWUconst (MOVWZreg x) [c])
  6901  	// result: (CMPWUconst x [c])
  6902  	for {
  6903  		c := auxIntToInt32(v.AuxInt)
  6904  		if v_0.Op != OpS390XMOVWZreg {
  6905  			break
  6906  		}
  6907  		x := v_0.Args[0]
  6908  		v.reset(OpS390XCMPWUconst)
  6909  		v.AuxInt = int32ToAuxInt(c)
  6910  		v.AddArg(x)
  6911  		return true
  6912  	}
  6913  	return false
  6914  }
  6915  func rewriteValueS390X_OpS390XCMPWconst(v *Value) bool {
  6916  	v_0 := v.Args[0]
  6917  	// match: (CMPWconst (MOVDconst [x]) [y])
  6918  	// cond: int32(x)==int32(y)
  6919  	// result: (FlagEQ)
  6920  	for {
  6921  		y := auxIntToInt32(v.AuxInt)
  6922  		if v_0.Op != OpS390XMOVDconst {
  6923  			break
  6924  		}
  6925  		x := auxIntToInt64(v_0.AuxInt)
  6926  		if !(int32(x) == int32(y)) {
  6927  			break
  6928  		}
  6929  		v.reset(OpS390XFlagEQ)
  6930  		return true
  6931  	}
  6932  	// match: (CMPWconst (MOVDconst [x]) [y])
  6933  	// cond: int32(x)<int32(y)
  6934  	// result: (FlagLT)
  6935  	for {
  6936  		y := auxIntToInt32(v.AuxInt)
  6937  		if v_0.Op != OpS390XMOVDconst {
  6938  			break
  6939  		}
  6940  		x := auxIntToInt64(v_0.AuxInt)
  6941  		if !(int32(x) < int32(y)) {
  6942  			break
  6943  		}
  6944  		v.reset(OpS390XFlagLT)
  6945  		return true
  6946  	}
  6947  	// match: (CMPWconst (MOVDconst [x]) [y])
  6948  	// cond: int32(x)>int32(y)
  6949  	// result: (FlagGT)
  6950  	for {
  6951  		y := auxIntToInt32(v.AuxInt)
  6952  		if v_0.Op != OpS390XMOVDconst {
  6953  			break
  6954  		}
  6955  		x := auxIntToInt64(v_0.AuxInt)
  6956  		if !(int32(x) > int32(y)) {
  6957  			break
  6958  		}
  6959  		v.reset(OpS390XFlagGT)
  6960  		return true
  6961  	}
  6962  	// match: (CMPWconst (MOVBZreg _) [c])
  6963  	// cond: 0xff < c
  6964  	// result: (FlagLT)
  6965  	for {
  6966  		c := auxIntToInt32(v.AuxInt)
  6967  		if v_0.Op != OpS390XMOVBZreg || !(0xff < c) {
  6968  			break
  6969  		}
  6970  		v.reset(OpS390XFlagLT)
  6971  		return true
  6972  	}
  6973  	// match: (CMPWconst (MOVHZreg _) [c])
  6974  	// cond: 0xffff < c
  6975  	// result: (FlagLT)
  6976  	for {
  6977  		c := auxIntToInt32(v.AuxInt)
  6978  		if v_0.Op != OpS390XMOVHZreg || !(0xffff < c) {
  6979  			break
  6980  		}
  6981  		v.reset(OpS390XFlagLT)
  6982  		return true
  6983  	}
  6984  	// match: (CMPWconst (SRWconst _ [c]) [n])
  6985  	// cond: c > 0 && n < 0
  6986  	// result: (FlagGT)
  6987  	for {
  6988  		n := auxIntToInt32(v.AuxInt)
  6989  		if v_0.Op != OpS390XSRWconst {
  6990  			break
  6991  		}
  6992  		c := auxIntToUint8(v_0.AuxInt)
  6993  		if !(c > 0 && n < 0) {
  6994  			break
  6995  		}
  6996  		v.reset(OpS390XFlagGT)
  6997  		return true
  6998  	}
  6999  	// match: (CMPWconst (ANDWconst _ [m]) [n])
  7000  	// cond: int32(m) >= 0 && int32(m) < int32(n)
  7001  	// result: (FlagLT)
  7002  	for {
  7003  		n := auxIntToInt32(v.AuxInt)
  7004  		if v_0.Op != OpS390XANDWconst {
  7005  			break
  7006  		}
  7007  		m := auxIntToInt32(v_0.AuxInt)
  7008  		if !(int32(m) >= 0 && int32(m) < int32(n)) {
  7009  			break
  7010  		}
  7011  		v.reset(OpS390XFlagLT)
  7012  		return true
  7013  	}
  7014  	// match: (CMPWconst x:(SRWconst _ [c]) [n])
  7015  	// cond: c > 0 && n >= 0
  7016  	// result: (CMPWUconst x [n])
  7017  	for {
  7018  		n := auxIntToInt32(v.AuxInt)
  7019  		x := v_0
  7020  		if x.Op != OpS390XSRWconst {
  7021  			break
  7022  		}
  7023  		c := auxIntToUint8(x.AuxInt)
  7024  		if !(c > 0 && n >= 0) {
  7025  			break
  7026  		}
  7027  		v.reset(OpS390XCMPWUconst)
  7028  		v.AuxInt = int32ToAuxInt(n)
  7029  		v.AddArg(x)
  7030  		return true
  7031  	}
  7032  	// match: (CMPWconst (MOVWreg x) [c])
  7033  	// result: (CMPWconst x [c])
  7034  	for {
  7035  		c := auxIntToInt32(v.AuxInt)
  7036  		if v_0.Op != OpS390XMOVWreg {
  7037  			break
  7038  		}
  7039  		x := v_0.Args[0]
  7040  		v.reset(OpS390XCMPWconst)
  7041  		v.AuxInt = int32ToAuxInt(c)
  7042  		v.AddArg(x)
  7043  		return true
  7044  	}
  7045  	// match: (CMPWconst (MOVWZreg x) [c])
  7046  	// result: (CMPWconst x [c])
  7047  	for {
  7048  		c := auxIntToInt32(v.AuxInt)
  7049  		if v_0.Op != OpS390XMOVWZreg {
  7050  			break
  7051  		}
  7052  		x := v_0.Args[0]
  7053  		v.reset(OpS390XCMPWconst)
  7054  		v.AuxInt = int32ToAuxInt(c)
  7055  		v.AddArg(x)
  7056  		return true
  7057  	}
  7058  	return false
  7059  }
  7060  func rewriteValueS390X_OpS390XCMPconst(v *Value) bool {
  7061  	v_0 := v.Args[0]
  7062  	// match: (CMPconst (MOVDconst [x]) [y])
  7063  	// cond: x==int64(y)
  7064  	// result: (FlagEQ)
  7065  	for {
  7066  		y := auxIntToInt32(v.AuxInt)
  7067  		if v_0.Op != OpS390XMOVDconst {
  7068  			break
  7069  		}
  7070  		x := auxIntToInt64(v_0.AuxInt)
  7071  		if !(x == int64(y)) {
  7072  			break
  7073  		}
  7074  		v.reset(OpS390XFlagEQ)
  7075  		return true
  7076  	}
  7077  	// match: (CMPconst (MOVDconst [x]) [y])
  7078  	// cond: x<int64(y)
  7079  	// result: (FlagLT)
  7080  	for {
  7081  		y := auxIntToInt32(v.AuxInt)
  7082  		if v_0.Op != OpS390XMOVDconst {
  7083  			break
  7084  		}
  7085  		x := auxIntToInt64(v_0.AuxInt)
  7086  		if !(x < int64(y)) {
  7087  			break
  7088  		}
  7089  		v.reset(OpS390XFlagLT)
  7090  		return true
  7091  	}
  7092  	// match: (CMPconst (MOVDconst [x]) [y])
  7093  	// cond: x>int64(y)
  7094  	// result: (FlagGT)
  7095  	for {
  7096  		y := auxIntToInt32(v.AuxInt)
  7097  		if v_0.Op != OpS390XMOVDconst {
  7098  			break
  7099  		}
  7100  		x := auxIntToInt64(v_0.AuxInt)
  7101  		if !(x > int64(y)) {
  7102  			break
  7103  		}
  7104  		v.reset(OpS390XFlagGT)
  7105  		return true
  7106  	}
  7107  	// match: (CMPconst (SRDconst _ [c]) [n])
  7108  	// cond: c > 0 && n < 0
  7109  	// result: (FlagGT)
  7110  	for {
  7111  		n := auxIntToInt32(v.AuxInt)
  7112  		if v_0.Op != OpS390XSRDconst {
  7113  			break
  7114  		}
  7115  		c := auxIntToUint8(v_0.AuxInt)
  7116  		if !(c > 0 && n < 0) {
  7117  			break
  7118  		}
  7119  		v.reset(OpS390XFlagGT)
  7120  		return true
  7121  	}
  7122  	// match: (CMPconst (RISBGZ x {r}) [c])
  7123  	// cond: c > 0 && r.OutMask() < uint64(c)
  7124  	// result: (FlagLT)
  7125  	for {
  7126  		c := auxIntToInt32(v.AuxInt)
  7127  		if v_0.Op != OpS390XRISBGZ {
  7128  			break
  7129  		}
  7130  		r := auxToS390xRotateParams(v_0.Aux)
  7131  		if !(c > 0 && r.OutMask() < uint64(c)) {
  7132  			break
  7133  		}
  7134  		v.reset(OpS390XFlagLT)
  7135  		return true
  7136  	}
  7137  	// match: (CMPconst (MOVWreg x) [c])
  7138  	// result: (CMPWconst x [c])
  7139  	for {
  7140  		c := auxIntToInt32(v.AuxInt)
  7141  		if v_0.Op != OpS390XMOVWreg {
  7142  			break
  7143  		}
  7144  		x := v_0.Args[0]
  7145  		v.reset(OpS390XCMPWconst)
  7146  		v.AuxInt = int32ToAuxInt(c)
  7147  		v.AddArg(x)
  7148  		return true
  7149  	}
  7150  	// match: (CMPconst x:(MOVHreg _) [c])
  7151  	// result: (CMPWconst x [c])
  7152  	for {
  7153  		c := auxIntToInt32(v.AuxInt)
  7154  		x := v_0
  7155  		if x.Op != OpS390XMOVHreg {
  7156  			break
  7157  		}
  7158  		v.reset(OpS390XCMPWconst)
  7159  		v.AuxInt = int32ToAuxInt(c)
  7160  		v.AddArg(x)
  7161  		return true
  7162  	}
  7163  	// match: (CMPconst x:(MOVHZreg _) [c])
  7164  	// result: (CMPWconst x [c])
  7165  	for {
  7166  		c := auxIntToInt32(v.AuxInt)
  7167  		x := v_0
  7168  		if x.Op != OpS390XMOVHZreg {
  7169  			break
  7170  		}
  7171  		v.reset(OpS390XCMPWconst)
  7172  		v.AuxInt = int32ToAuxInt(c)
  7173  		v.AddArg(x)
  7174  		return true
  7175  	}
  7176  	// match: (CMPconst x:(MOVBreg _) [c])
  7177  	// result: (CMPWconst x [c])
  7178  	for {
  7179  		c := auxIntToInt32(v.AuxInt)
  7180  		x := v_0
  7181  		if x.Op != OpS390XMOVBreg {
  7182  			break
  7183  		}
  7184  		v.reset(OpS390XCMPWconst)
  7185  		v.AuxInt = int32ToAuxInt(c)
  7186  		v.AddArg(x)
  7187  		return true
  7188  	}
  7189  	// match: (CMPconst x:(MOVBZreg _) [c])
  7190  	// result: (CMPWconst x [c])
  7191  	for {
  7192  		c := auxIntToInt32(v.AuxInt)
  7193  		x := v_0
  7194  		if x.Op != OpS390XMOVBZreg {
  7195  			break
  7196  		}
  7197  		v.reset(OpS390XCMPWconst)
  7198  		v.AuxInt = int32ToAuxInt(c)
  7199  		v.AddArg(x)
  7200  		return true
  7201  	}
  7202  	// match: (CMPconst (MOVWZreg x:(ANDWconst [m] _)) [c])
  7203  	// cond: int32(m) >= 0 && c >= 0
  7204  	// result: (CMPWUconst x [c])
  7205  	for {
  7206  		c := auxIntToInt32(v.AuxInt)
  7207  		if v_0.Op != OpS390XMOVWZreg {
  7208  			break
  7209  		}
  7210  		x := v_0.Args[0]
  7211  		if x.Op != OpS390XANDWconst {
  7212  			break
  7213  		}
  7214  		m := auxIntToInt32(x.AuxInt)
  7215  		if !(int32(m) >= 0 && c >= 0) {
  7216  			break
  7217  		}
  7218  		v.reset(OpS390XCMPWUconst)
  7219  		v.AuxInt = int32ToAuxInt(c)
  7220  		v.AddArg(x)
  7221  		return true
  7222  	}
  7223  	// match: (CMPconst (MOVWreg x:(ANDWconst [m] _)) [c])
  7224  	// cond: int32(m) >= 0 && c >= 0
  7225  	// result: (CMPWUconst x [c])
  7226  	for {
  7227  		c := auxIntToInt32(v.AuxInt)
  7228  		if v_0.Op != OpS390XMOVWreg {
  7229  			break
  7230  		}
  7231  		x := v_0.Args[0]
  7232  		if x.Op != OpS390XANDWconst {
  7233  			break
  7234  		}
  7235  		m := auxIntToInt32(x.AuxInt)
  7236  		if !(int32(m) >= 0 && c >= 0) {
  7237  			break
  7238  		}
  7239  		v.reset(OpS390XCMPWUconst)
  7240  		v.AuxInt = int32ToAuxInt(c)
  7241  		v.AddArg(x)
  7242  		return true
  7243  	}
  7244  	// match: (CMPconst x:(SRDconst _ [c]) [n])
  7245  	// cond: c > 0 && n >= 0
  7246  	// result: (CMPUconst x [n])
  7247  	for {
  7248  		n := auxIntToInt32(v.AuxInt)
  7249  		x := v_0
  7250  		if x.Op != OpS390XSRDconst {
  7251  			break
  7252  		}
  7253  		c := auxIntToUint8(x.AuxInt)
  7254  		if !(c > 0 && n >= 0) {
  7255  			break
  7256  		}
  7257  		v.reset(OpS390XCMPUconst)
  7258  		v.AuxInt = int32ToAuxInt(n)
  7259  		v.AddArg(x)
  7260  		return true
  7261  	}
  7262  	return false
  7263  }
  7264  func rewriteValueS390X_OpS390XCPSDR(v *Value) bool {
  7265  	v_1 := v.Args[1]
  7266  	v_0 := v.Args[0]
  7267  	// match: (CPSDR y (FMOVDconst [c]))
  7268  	// cond: !math.Signbit(c)
  7269  	// result: (LPDFR y)
  7270  	for {
  7271  		y := v_0
  7272  		if v_1.Op != OpS390XFMOVDconst {
  7273  			break
  7274  		}
  7275  		c := auxIntToFloat64(v_1.AuxInt)
  7276  		if !(!math.Signbit(c)) {
  7277  			break
  7278  		}
  7279  		v.reset(OpS390XLPDFR)
  7280  		v.AddArg(y)
  7281  		return true
  7282  	}
  7283  	// match: (CPSDR y (FMOVDconst [c]))
  7284  	// cond: math.Signbit(c)
  7285  	// result: (LNDFR y)
  7286  	for {
  7287  		y := v_0
  7288  		if v_1.Op != OpS390XFMOVDconst {
  7289  			break
  7290  		}
  7291  		c := auxIntToFloat64(v_1.AuxInt)
  7292  		if !(math.Signbit(c)) {
  7293  			break
  7294  		}
  7295  		v.reset(OpS390XLNDFR)
  7296  		v.AddArg(y)
  7297  		return true
  7298  	}
  7299  	return false
  7300  }
  7301  func rewriteValueS390X_OpS390XFCMP(v *Value) bool {
  7302  	v_1 := v.Args[1]
  7303  	v_0 := v.Args[0]
  7304  	b := v.Block
  7305  	// match: (FCMP x (FMOVDconst [0.0]))
  7306  	// result: (LTDBR x)
  7307  	for {
  7308  		x := v_0
  7309  		if v_1.Op != OpS390XFMOVDconst || auxIntToFloat64(v_1.AuxInt) != 0.0 {
  7310  			break
  7311  		}
  7312  		v.reset(OpS390XLTDBR)
  7313  		v.AddArg(x)
  7314  		return true
  7315  	}
  7316  	// match: (FCMP (FMOVDconst [0.0]) x)
  7317  	// result: (InvertFlags (LTDBR <v.Type> x))
  7318  	for {
  7319  		if v_0.Op != OpS390XFMOVDconst || auxIntToFloat64(v_0.AuxInt) != 0.0 {
  7320  			break
  7321  		}
  7322  		x := v_1
  7323  		v.reset(OpS390XInvertFlags)
  7324  		v0 := b.NewValue0(v.Pos, OpS390XLTDBR, v.Type)
  7325  		v0.AddArg(x)
  7326  		v.AddArg(v0)
  7327  		return true
  7328  	}
  7329  	return false
  7330  }
  7331  func rewriteValueS390X_OpS390XFCMPS(v *Value) bool {
  7332  	v_1 := v.Args[1]
  7333  	v_0 := v.Args[0]
  7334  	b := v.Block
  7335  	// match: (FCMPS x (FMOVSconst [0.0]))
  7336  	// result: (LTEBR x)
  7337  	for {
  7338  		x := v_0
  7339  		if v_1.Op != OpS390XFMOVSconst || auxIntToFloat32(v_1.AuxInt) != 0.0 {
  7340  			break
  7341  		}
  7342  		v.reset(OpS390XLTEBR)
  7343  		v.AddArg(x)
  7344  		return true
  7345  	}
  7346  	// match: (FCMPS (FMOVSconst [0.0]) x)
  7347  	// result: (InvertFlags (LTEBR <v.Type> x))
  7348  	for {
  7349  		if v_0.Op != OpS390XFMOVSconst || auxIntToFloat32(v_0.AuxInt) != 0.0 {
  7350  			break
  7351  		}
  7352  		x := v_1
  7353  		v.reset(OpS390XInvertFlags)
  7354  		v0 := b.NewValue0(v.Pos, OpS390XLTEBR, v.Type)
  7355  		v0.AddArg(x)
  7356  		v.AddArg(v0)
  7357  		return true
  7358  	}
  7359  	return false
  7360  }
  7361  func rewriteValueS390X_OpS390XFMOVDload(v *Value) bool {
  7362  	v_1 := v.Args[1]
  7363  	v_0 := v.Args[0]
  7364  	// match: (FMOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  7365  	// cond: isSamePtr(ptr1, ptr2)
  7366  	// result: (LDGR x)
  7367  	for {
  7368  		off := auxIntToInt32(v.AuxInt)
  7369  		sym := auxToSym(v.Aux)
  7370  		ptr1 := v_0
  7371  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7372  			break
  7373  		}
  7374  		x := v_1.Args[1]
  7375  		ptr2 := v_1.Args[0]
  7376  		if !(isSamePtr(ptr1, ptr2)) {
  7377  			break
  7378  		}
  7379  		v.reset(OpS390XLDGR)
  7380  		v.AddArg(x)
  7381  		return true
  7382  	}
  7383  	// match: (FMOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  7384  	// cond: isSamePtr(ptr1, ptr2)
  7385  	// result: x
  7386  	for {
  7387  		off := auxIntToInt32(v.AuxInt)
  7388  		sym := auxToSym(v.Aux)
  7389  		ptr1 := v_0
  7390  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7391  			break
  7392  		}
  7393  		x := v_1.Args[1]
  7394  		ptr2 := v_1.Args[0]
  7395  		if !(isSamePtr(ptr1, ptr2)) {
  7396  			break
  7397  		}
  7398  		v.copyOf(x)
  7399  		return true
  7400  	}
  7401  	// match: (FMOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  7402  	// cond: is20Bit(int64(off1)+int64(off2))
  7403  	// result: (FMOVDload [off1+off2] {sym} ptr mem)
  7404  	for {
  7405  		off1 := auxIntToInt32(v.AuxInt)
  7406  		sym := auxToSym(v.Aux)
  7407  		if v_0.Op != OpS390XADDconst {
  7408  			break
  7409  		}
  7410  		off2 := auxIntToInt32(v_0.AuxInt)
  7411  		ptr := v_0.Args[0]
  7412  		mem := v_1
  7413  		if !(is20Bit(int64(off1) + int64(off2))) {
  7414  			break
  7415  		}
  7416  		v.reset(OpS390XFMOVDload)
  7417  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7418  		v.Aux = symToAux(sym)
  7419  		v.AddArg2(ptr, mem)
  7420  		return true
  7421  	}
  7422  	// match: (FMOVDload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7423  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7424  	// result: (FMOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7425  	for {
  7426  		off1 := auxIntToInt32(v.AuxInt)
  7427  		sym1 := auxToSym(v.Aux)
  7428  		if v_0.Op != OpS390XMOVDaddr {
  7429  			break
  7430  		}
  7431  		off2 := auxIntToInt32(v_0.AuxInt)
  7432  		sym2 := auxToSym(v_0.Aux)
  7433  		base := v_0.Args[0]
  7434  		mem := v_1
  7435  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7436  			break
  7437  		}
  7438  		v.reset(OpS390XFMOVDload)
  7439  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7440  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7441  		v.AddArg2(base, mem)
  7442  		return true
  7443  	}
  7444  	return false
  7445  }
  7446  func rewriteValueS390X_OpS390XFMOVDstore(v *Value) bool {
  7447  	v_2 := v.Args[2]
  7448  	v_1 := v.Args[1]
  7449  	v_0 := v.Args[0]
  7450  	// match: (FMOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7451  	// cond: is20Bit(int64(off1)+int64(off2))
  7452  	// result: (FMOVDstore [off1+off2] {sym} ptr val mem)
  7453  	for {
  7454  		off1 := auxIntToInt32(v.AuxInt)
  7455  		sym := auxToSym(v.Aux)
  7456  		if v_0.Op != OpS390XADDconst {
  7457  			break
  7458  		}
  7459  		off2 := auxIntToInt32(v_0.AuxInt)
  7460  		ptr := v_0.Args[0]
  7461  		val := v_1
  7462  		mem := v_2
  7463  		if !(is20Bit(int64(off1) + int64(off2))) {
  7464  			break
  7465  		}
  7466  		v.reset(OpS390XFMOVDstore)
  7467  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7468  		v.Aux = symToAux(sym)
  7469  		v.AddArg3(ptr, val, mem)
  7470  		return true
  7471  	}
  7472  	// match: (FMOVDstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7473  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7474  	// result: (FMOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7475  	for {
  7476  		off1 := auxIntToInt32(v.AuxInt)
  7477  		sym1 := auxToSym(v.Aux)
  7478  		if v_0.Op != OpS390XMOVDaddr {
  7479  			break
  7480  		}
  7481  		off2 := auxIntToInt32(v_0.AuxInt)
  7482  		sym2 := auxToSym(v_0.Aux)
  7483  		base := v_0.Args[0]
  7484  		val := v_1
  7485  		mem := v_2
  7486  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7487  			break
  7488  		}
  7489  		v.reset(OpS390XFMOVDstore)
  7490  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7491  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7492  		v.AddArg3(base, val, mem)
  7493  		return true
  7494  	}
  7495  	return false
  7496  }
  7497  func rewriteValueS390X_OpS390XFMOVSload(v *Value) bool {
  7498  	v_1 := v.Args[1]
  7499  	v_0 := v.Args[0]
  7500  	// match: (FMOVSload [off] {sym} ptr1 (FMOVSstore [off] {sym} ptr2 x _))
  7501  	// cond: isSamePtr(ptr1, ptr2)
  7502  	// result: x
  7503  	for {
  7504  		off := auxIntToInt32(v.AuxInt)
  7505  		sym := auxToSym(v.Aux)
  7506  		ptr1 := v_0
  7507  		if v_1.Op != OpS390XFMOVSstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  7508  			break
  7509  		}
  7510  		x := v_1.Args[1]
  7511  		ptr2 := v_1.Args[0]
  7512  		if !(isSamePtr(ptr1, ptr2)) {
  7513  			break
  7514  		}
  7515  		v.copyOf(x)
  7516  		return true
  7517  	}
  7518  	// match: (FMOVSload [off1] {sym} (ADDconst [off2] ptr) mem)
  7519  	// cond: is20Bit(int64(off1)+int64(off2))
  7520  	// result: (FMOVSload [off1+off2] {sym} ptr mem)
  7521  	for {
  7522  		off1 := auxIntToInt32(v.AuxInt)
  7523  		sym := auxToSym(v.Aux)
  7524  		if v_0.Op != OpS390XADDconst {
  7525  			break
  7526  		}
  7527  		off2 := auxIntToInt32(v_0.AuxInt)
  7528  		ptr := v_0.Args[0]
  7529  		mem := v_1
  7530  		if !(is20Bit(int64(off1) + int64(off2))) {
  7531  			break
  7532  		}
  7533  		v.reset(OpS390XFMOVSload)
  7534  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7535  		v.Aux = symToAux(sym)
  7536  		v.AddArg2(ptr, mem)
  7537  		return true
  7538  	}
  7539  	// match: (FMOVSload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  7540  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7541  	// result: (FMOVSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  7542  	for {
  7543  		off1 := auxIntToInt32(v.AuxInt)
  7544  		sym1 := auxToSym(v.Aux)
  7545  		if v_0.Op != OpS390XMOVDaddr {
  7546  			break
  7547  		}
  7548  		off2 := auxIntToInt32(v_0.AuxInt)
  7549  		sym2 := auxToSym(v_0.Aux)
  7550  		base := v_0.Args[0]
  7551  		mem := v_1
  7552  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7553  			break
  7554  		}
  7555  		v.reset(OpS390XFMOVSload)
  7556  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7557  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7558  		v.AddArg2(base, mem)
  7559  		return true
  7560  	}
  7561  	return false
  7562  }
  7563  func rewriteValueS390X_OpS390XFMOVSstore(v *Value) bool {
  7564  	v_2 := v.Args[2]
  7565  	v_1 := v.Args[1]
  7566  	v_0 := v.Args[0]
  7567  	// match: (FMOVSstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  7568  	// cond: is20Bit(int64(off1)+int64(off2))
  7569  	// result: (FMOVSstore [off1+off2] {sym} ptr val mem)
  7570  	for {
  7571  		off1 := auxIntToInt32(v.AuxInt)
  7572  		sym := auxToSym(v.Aux)
  7573  		if v_0.Op != OpS390XADDconst {
  7574  			break
  7575  		}
  7576  		off2 := auxIntToInt32(v_0.AuxInt)
  7577  		ptr := v_0.Args[0]
  7578  		val := v_1
  7579  		mem := v_2
  7580  		if !(is20Bit(int64(off1) + int64(off2))) {
  7581  			break
  7582  		}
  7583  		v.reset(OpS390XFMOVSstore)
  7584  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7585  		v.Aux = symToAux(sym)
  7586  		v.AddArg3(ptr, val, mem)
  7587  		return true
  7588  	}
  7589  	// match: (FMOVSstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  7590  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  7591  	// result: (FMOVSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7592  	for {
  7593  		off1 := auxIntToInt32(v.AuxInt)
  7594  		sym1 := auxToSym(v.Aux)
  7595  		if v_0.Op != OpS390XMOVDaddr {
  7596  			break
  7597  		}
  7598  		off2 := auxIntToInt32(v_0.AuxInt)
  7599  		sym2 := auxToSym(v_0.Aux)
  7600  		base := v_0.Args[0]
  7601  		val := v_1
  7602  		mem := v_2
  7603  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  7604  			break
  7605  		}
  7606  		v.reset(OpS390XFMOVSstore)
  7607  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7608  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7609  		v.AddArg3(base, val, mem)
  7610  		return true
  7611  	}
  7612  	return false
  7613  }
  7614  func rewriteValueS390X_OpS390XFNEG(v *Value) bool {
  7615  	v_0 := v.Args[0]
  7616  	// match: (FNEG (LPDFR x))
  7617  	// result: (LNDFR x)
  7618  	for {
  7619  		if v_0.Op != OpS390XLPDFR {
  7620  			break
  7621  		}
  7622  		x := v_0.Args[0]
  7623  		v.reset(OpS390XLNDFR)
  7624  		v.AddArg(x)
  7625  		return true
  7626  	}
  7627  	// match: (FNEG (LNDFR x))
  7628  	// result: (LPDFR x)
  7629  	for {
  7630  		if v_0.Op != OpS390XLNDFR {
  7631  			break
  7632  		}
  7633  		x := v_0.Args[0]
  7634  		v.reset(OpS390XLPDFR)
  7635  		v.AddArg(x)
  7636  		return true
  7637  	}
  7638  	return false
  7639  }
  7640  func rewriteValueS390X_OpS390XFNEGS(v *Value) bool {
  7641  	v_0 := v.Args[0]
  7642  	// match: (FNEGS (LPDFR x))
  7643  	// result: (LNDFR x)
  7644  	for {
  7645  		if v_0.Op != OpS390XLPDFR {
  7646  			break
  7647  		}
  7648  		x := v_0.Args[0]
  7649  		v.reset(OpS390XLNDFR)
  7650  		v.AddArg(x)
  7651  		return true
  7652  	}
  7653  	// match: (FNEGS (LNDFR x))
  7654  	// result: (LPDFR x)
  7655  	for {
  7656  		if v_0.Op != OpS390XLNDFR {
  7657  			break
  7658  		}
  7659  		x := v_0.Args[0]
  7660  		v.reset(OpS390XLPDFR)
  7661  		v.AddArg(x)
  7662  		return true
  7663  	}
  7664  	return false
  7665  }
  7666  func rewriteValueS390X_OpS390XLDGR(v *Value) bool {
  7667  	v_0 := v.Args[0]
  7668  	b := v.Block
  7669  	// match: (LDGR <t> (RISBGZ x {r}))
  7670  	// cond: r == s390x.NewRotateParams(1, 63, 0)
  7671  	// result: (LPDFR (LDGR <t> x))
  7672  	for {
  7673  		t := v.Type
  7674  		if v_0.Op != OpS390XRISBGZ {
  7675  			break
  7676  		}
  7677  		r := auxToS390xRotateParams(v_0.Aux)
  7678  		x := v_0.Args[0]
  7679  		if !(r == s390x.NewRotateParams(1, 63, 0)) {
  7680  			break
  7681  		}
  7682  		v.reset(OpS390XLPDFR)
  7683  		v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7684  		v0.AddArg(x)
  7685  		v.AddArg(v0)
  7686  		return true
  7687  	}
  7688  	// match: (LDGR <t> (OR (MOVDconst [-1<<63]) x))
  7689  	// result: (LNDFR (LDGR <t> x))
  7690  	for {
  7691  		t := v.Type
  7692  		if v_0.Op != OpS390XOR {
  7693  			break
  7694  		}
  7695  		_ = v_0.Args[1]
  7696  		v_0_0 := v_0.Args[0]
  7697  		v_0_1 := v_0.Args[1]
  7698  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  7699  			if v_0_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0_0.AuxInt) != -1<<63 {
  7700  				continue
  7701  			}
  7702  			x := v_0_1
  7703  			v.reset(OpS390XLNDFR)
  7704  			v0 := b.NewValue0(v.Pos, OpS390XLDGR, t)
  7705  			v0.AddArg(x)
  7706  			v.AddArg(v0)
  7707  			return true
  7708  		}
  7709  		break
  7710  	}
  7711  	// match: (LDGR <t> x:(ORload <t1> [off] {sym} (MOVDconst [-1<<63]) ptr mem))
  7712  	// cond: x.Uses == 1 && clobber(x)
  7713  	// result: @x.Block (LNDFR <t> (LDGR <t> (MOVDload <t1> [off] {sym} ptr mem)))
  7714  	for {
  7715  		t := v.Type
  7716  		x := v_0
  7717  		if x.Op != OpS390XORload {
  7718  			break
  7719  		}
  7720  		t1 := x.Type
  7721  		off := auxIntToInt32(x.AuxInt)
  7722  		sym := auxToSym(x.Aux)
  7723  		mem := x.Args[2]
  7724  		x_0 := x.Args[0]
  7725  		if x_0.Op != OpS390XMOVDconst || auxIntToInt64(x_0.AuxInt) != -1<<63 {
  7726  			break
  7727  		}
  7728  		ptr := x.Args[1]
  7729  		if !(x.Uses == 1 && clobber(x)) {
  7730  			break
  7731  		}
  7732  		b = x.Block
  7733  		v0 := b.NewValue0(x.Pos, OpS390XLNDFR, t)
  7734  		v.copyOf(v0)
  7735  		v1 := b.NewValue0(x.Pos, OpS390XLDGR, t)
  7736  		v2 := b.NewValue0(x.Pos, OpS390XMOVDload, t1)
  7737  		v2.AuxInt = int32ToAuxInt(off)
  7738  		v2.Aux = symToAux(sym)
  7739  		v2.AddArg2(ptr, mem)
  7740  		v1.AddArg(v2)
  7741  		v0.AddArg(v1)
  7742  		return true
  7743  	}
  7744  	// match: (LDGR (LGDR x))
  7745  	// result: x
  7746  	for {
  7747  		if v_0.Op != OpS390XLGDR {
  7748  			break
  7749  		}
  7750  		x := v_0.Args[0]
  7751  		v.copyOf(x)
  7752  		return true
  7753  	}
  7754  	return false
  7755  }
  7756  func rewriteValueS390X_OpS390XLEDBR(v *Value) bool {
  7757  	v_0 := v.Args[0]
  7758  	// match: (LEDBR (LPDFR (LDEBR x)))
  7759  	// result: (LPDFR x)
  7760  	for {
  7761  		if v_0.Op != OpS390XLPDFR {
  7762  			break
  7763  		}
  7764  		v_0_0 := v_0.Args[0]
  7765  		if v_0_0.Op != OpS390XLDEBR {
  7766  			break
  7767  		}
  7768  		x := v_0_0.Args[0]
  7769  		v.reset(OpS390XLPDFR)
  7770  		v.AddArg(x)
  7771  		return true
  7772  	}
  7773  	// match: (LEDBR (LNDFR (LDEBR x)))
  7774  	// result: (LNDFR x)
  7775  	for {
  7776  		if v_0.Op != OpS390XLNDFR {
  7777  			break
  7778  		}
  7779  		v_0_0 := v_0.Args[0]
  7780  		if v_0_0.Op != OpS390XLDEBR {
  7781  			break
  7782  		}
  7783  		x := v_0_0.Args[0]
  7784  		v.reset(OpS390XLNDFR)
  7785  		v.AddArg(x)
  7786  		return true
  7787  	}
  7788  	return false
  7789  }
  7790  func rewriteValueS390X_OpS390XLGDR(v *Value) bool {
  7791  	v_0 := v.Args[0]
  7792  	// match: (LGDR (LDGR x))
  7793  	// result: x
  7794  	for {
  7795  		if v_0.Op != OpS390XLDGR {
  7796  			break
  7797  		}
  7798  		x := v_0.Args[0]
  7799  		v.copyOf(x)
  7800  		return true
  7801  	}
  7802  	return false
  7803  }
  7804  func rewriteValueS390X_OpS390XLOCGR(v *Value) bool {
  7805  	v_2 := v.Args[2]
  7806  	v_1 := v.Args[1]
  7807  	v_0 := v.Args[0]
  7808  	// match: (LOCGR {c} x y (InvertFlags cmp))
  7809  	// result: (LOCGR {c.ReverseComparison()} x y cmp)
  7810  	for {
  7811  		c := auxToS390xCCMask(v.Aux)
  7812  		x := v_0
  7813  		y := v_1
  7814  		if v_2.Op != OpS390XInvertFlags {
  7815  			break
  7816  		}
  7817  		cmp := v_2.Args[0]
  7818  		v.reset(OpS390XLOCGR)
  7819  		v.Aux = s390xCCMaskToAux(c.ReverseComparison())
  7820  		v.AddArg3(x, y, cmp)
  7821  		return true
  7822  	}
  7823  	// match: (LOCGR {c} _ x (FlagEQ))
  7824  	// cond: c&s390x.Equal != 0
  7825  	// result: x
  7826  	for {
  7827  		c := auxToS390xCCMask(v.Aux)
  7828  		x := v_1
  7829  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal != 0) {
  7830  			break
  7831  		}
  7832  		v.copyOf(x)
  7833  		return true
  7834  	}
  7835  	// match: (LOCGR {c} _ x (FlagLT))
  7836  	// cond: c&s390x.Less != 0
  7837  	// result: x
  7838  	for {
  7839  		c := auxToS390xCCMask(v.Aux)
  7840  		x := v_1
  7841  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less != 0) {
  7842  			break
  7843  		}
  7844  		v.copyOf(x)
  7845  		return true
  7846  	}
  7847  	// match: (LOCGR {c} _ x (FlagGT))
  7848  	// cond: c&s390x.Greater != 0
  7849  	// result: x
  7850  	for {
  7851  		c := auxToS390xCCMask(v.Aux)
  7852  		x := v_1
  7853  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater != 0) {
  7854  			break
  7855  		}
  7856  		v.copyOf(x)
  7857  		return true
  7858  	}
  7859  	// match: (LOCGR {c} _ x (FlagOV))
  7860  	// cond: c&s390x.Unordered != 0
  7861  	// result: x
  7862  	for {
  7863  		c := auxToS390xCCMask(v.Aux)
  7864  		x := v_1
  7865  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered != 0) {
  7866  			break
  7867  		}
  7868  		v.copyOf(x)
  7869  		return true
  7870  	}
  7871  	// match: (LOCGR {c} x _ (FlagEQ))
  7872  	// cond: c&s390x.Equal == 0
  7873  	// result: x
  7874  	for {
  7875  		c := auxToS390xCCMask(v.Aux)
  7876  		x := v_0
  7877  		if v_2.Op != OpS390XFlagEQ || !(c&s390x.Equal == 0) {
  7878  			break
  7879  		}
  7880  		v.copyOf(x)
  7881  		return true
  7882  	}
  7883  	// match: (LOCGR {c} x _ (FlagLT))
  7884  	// cond: c&s390x.Less == 0
  7885  	// result: x
  7886  	for {
  7887  		c := auxToS390xCCMask(v.Aux)
  7888  		x := v_0
  7889  		if v_2.Op != OpS390XFlagLT || !(c&s390x.Less == 0) {
  7890  			break
  7891  		}
  7892  		v.copyOf(x)
  7893  		return true
  7894  	}
  7895  	// match: (LOCGR {c} x _ (FlagGT))
  7896  	// cond: c&s390x.Greater == 0
  7897  	// result: x
  7898  	for {
  7899  		c := auxToS390xCCMask(v.Aux)
  7900  		x := v_0
  7901  		if v_2.Op != OpS390XFlagGT || !(c&s390x.Greater == 0) {
  7902  			break
  7903  		}
  7904  		v.copyOf(x)
  7905  		return true
  7906  	}
  7907  	// match: (LOCGR {c} x _ (FlagOV))
  7908  	// cond: c&s390x.Unordered == 0
  7909  	// result: x
  7910  	for {
  7911  		c := auxToS390xCCMask(v.Aux)
  7912  		x := v_0
  7913  		if v_2.Op != OpS390XFlagOV || !(c&s390x.Unordered == 0) {
  7914  			break
  7915  		}
  7916  		v.copyOf(x)
  7917  		return true
  7918  	}
  7919  	return false
  7920  }
  7921  func rewriteValueS390X_OpS390XLTDBR(v *Value) bool {
  7922  	v_0 := v.Args[0]
  7923  	b := v.Block
  7924  	// match: (LTDBR (Select0 x:(FADD _ _)))
  7925  	// cond: b == x.Block
  7926  	// result: (Select1 x)
  7927  	for {
  7928  		if v_0.Op != OpSelect0 {
  7929  			break
  7930  		}
  7931  		x := v_0.Args[0]
  7932  		if x.Op != OpS390XFADD || !(b == x.Block) {
  7933  			break
  7934  		}
  7935  		v.reset(OpSelect1)
  7936  		v.AddArg(x)
  7937  		return true
  7938  	}
  7939  	// match: (LTDBR (Select0 x:(FSUB _ _)))
  7940  	// cond: b == x.Block
  7941  	// result: (Select1 x)
  7942  	for {
  7943  		if v_0.Op != OpSelect0 {
  7944  			break
  7945  		}
  7946  		x := v_0.Args[0]
  7947  		if x.Op != OpS390XFSUB || !(b == x.Block) {
  7948  			break
  7949  		}
  7950  		v.reset(OpSelect1)
  7951  		v.AddArg(x)
  7952  		return true
  7953  	}
  7954  	return false
  7955  }
  7956  func rewriteValueS390X_OpS390XLTEBR(v *Value) bool {
  7957  	v_0 := v.Args[0]
  7958  	b := v.Block
  7959  	// match: (LTEBR (Select0 x:(FADDS _ _)))
  7960  	// cond: b == x.Block
  7961  	// result: (Select1 x)
  7962  	for {
  7963  		if v_0.Op != OpSelect0 {
  7964  			break
  7965  		}
  7966  		x := v_0.Args[0]
  7967  		if x.Op != OpS390XFADDS || !(b == x.Block) {
  7968  			break
  7969  		}
  7970  		v.reset(OpSelect1)
  7971  		v.AddArg(x)
  7972  		return true
  7973  	}
  7974  	// match: (LTEBR (Select0 x:(FSUBS _ _)))
  7975  	// cond: b == x.Block
  7976  	// result: (Select1 x)
  7977  	for {
  7978  		if v_0.Op != OpSelect0 {
  7979  			break
  7980  		}
  7981  		x := v_0.Args[0]
  7982  		if x.Op != OpS390XFSUBS || !(b == x.Block) {
  7983  			break
  7984  		}
  7985  		v.reset(OpSelect1)
  7986  		v.AddArg(x)
  7987  		return true
  7988  	}
  7989  	return false
  7990  }
  7991  func rewriteValueS390X_OpS390XLoweredRound32F(v *Value) bool {
  7992  	v_0 := v.Args[0]
  7993  	// match: (LoweredRound32F x:(FMOVSconst))
  7994  	// result: x
  7995  	for {
  7996  		x := v_0
  7997  		if x.Op != OpS390XFMOVSconst {
  7998  			break
  7999  		}
  8000  		v.copyOf(x)
  8001  		return true
  8002  	}
  8003  	return false
  8004  }
  8005  func rewriteValueS390X_OpS390XLoweredRound64F(v *Value) bool {
  8006  	v_0 := v.Args[0]
  8007  	// match: (LoweredRound64F x:(FMOVDconst))
  8008  	// result: x
  8009  	for {
  8010  		x := v_0
  8011  		if x.Op != OpS390XFMOVDconst {
  8012  			break
  8013  		}
  8014  		v.copyOf(x)
  8015  		return true
  8016  	}
  8017  	return false
  8018  }
  8019  func rewriteValueS390X_OpS390XMOVBZload(v *Value) bool {
  8020  	v_1 := v.Args[1]
  8021  	v_0 := v.Args[0]
  8022  	// match: (MOVBZload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8023  	// cond: isSamePtr(ptr1, ptr2)
  8024  	// result: (MOVBZreg x)
  8025  	for {
  8026  		off := auxIntToInt32(v.AuxInt)
  8027  		sym := auxToSym(v.Aux)
  8028  		ptr1 := v_0
  8029  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8030  			break
  8031  		}
  8032  		x := v_1.Args[1]
  8033  		ptr2 := v_1.Args[0]
  8034  		if !(isSamePtr(ptr1, ptr2)) {
  8035  			break
  8036  		}
  8037  		v.reset(OpS390XMOVBZreg)
  8038  		v.AddArg(x)
  8039  		return true
  8040  	}
  8041  	// match: (MOVBZload [off1] {sym} (ADDconst [off2] ptr) mem)
  8042  	// cond: is20Bit(int64(off1)+int64(off2))
  8043  	// result: (MOVBZload [off1+off2] {sym} ptr mem)
  8044  	for {
  8045  		off1 := auxIntToInt32(v.AuxInt)
  8046  		sym := auxToSym(v.Aux)
  8047  		if v_0.Op != OpS390XADDconst {
  8048  			break
  8049  		}
  8050  		off2 := auxIntToInt32(v_0.AuxInt)
  8051  		ptr := v_0.Args[0]
  8052  		mem := v_1
  8053  		if !(is20Bit(int64(off1) + int64(off2))) {
  8054  			break
  8055  		}
  8056  		v.reset(OpS390XMOVBZload)
  8057  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8058  		v.Aux = symToAux(sym)
  8059  		v.AddArg2(ptr, mem)
  8060  		return true
  8061  	}
  8062  	// match: (MOVBZload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8063  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8064  	// result: (MOVBZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8065  	for {
  8066  		off1 := auxIntToInt32(v.AuxInt)
  8067  		sym1 := auxToSym(v.Aux)
  8068  		if v_0.Op != OpS390XMOVDaddr {
  8069  			break
  8070  		}
  8071  		off2 := auxIntToInt32(v_0.AuxInt)
  8072  		sym2 := auxToSym(v_0.Aux)
  8073  		base := v_0.Args[0]
  8074  		mem := v_1
  8075  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8076  			break
  8077  		}
  8078  		v.reset(OpS390XMOVBZload)
  8079  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8080  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8081  		v.AddArg2(base, mem)
  8082  		return true
  8083  	}
  8084  	return false
  8085  }
  8086  func rewriteValueS390X_OpS390XMOVBZreg(v *Value) bool {
  8087  	v_0 := v.Args[0]
  8088  	b := v.Block
  8089  	typ := &b.Func.Config.Types
  8090  	// match: (MOVBZreg e:(MOVBreg x))
  8091  	// cond: clobberIfDead(e)
  8092  	// result: (MOVBZreg x)
  8093  	for {
  8094  		e := v_0
  8095  		if e.Op != OpS390XMOVBreg {
  8096  			break
  8097  		}
  8098  		x := e.Args[0]
  8099  		if !(clobberIfDead(e)) {
  8100  			break
  8101  		}
  8102  		v.reset(OpS390XMOVBZreg)
  8103  		v.AddArg(x)
  8104  		return true
  8105  	}
  8106  	// match: (MOVBZreg e:(MOVHreg x))
  8107  	// cond: clobberIfDead(e)
  8108  	// result: (MOVBZreg x)
  8109  	for {
  8110  		e := v_0
  8111  		if e.Op != OpS390XMOVHreg {
  8112  			break
  8113  		}
  8114  		x := e.Args[0]
  8115  		if !(clobberIfDead(e)) {
  8116  			break
  8117  		}
  8118  		v.reset(OpS390XMOVBZreg)
  8119  		v.AddArg(x)
  8120  		return true
  8121  	}
  8122  	// match: (MOVBZreg e:(MOVWreg x))
  8123  	// cond: clobberIfDead(e)
  8124  	// result: (MOVBZreg x)
  8125  	for {
  8126  		e := v_0
  8127  		if e.Op != OpS390XMOVWreg {
  8128  			break
  8129  		}
  8130  		x := e.Args[0]
  8131  		if !(clobberIfDead(e)) {
  8132  			break
  8133  		}
  8134  		v.reset(OpS390XMOVBZreg)
  8135  		v.AddArg(x)
  8136  		return true
  8137  	}
  8138  	// match: (MOVBZreg e:(MOVBZreg x))
  8139  	// cond: clobberIfDead(e)
  8140  	// result: (MOVBZreg x)
  8141  	for {
  8142  		e := v_0
  8143  		if e.Op != OpS390XMOVBZreg {
  8144  			break
  8145  		}
  8146  		x := e.Args[0]
  8147  		if !(clobberIfDead(e)) {
  8148  			break
  8149  		}
  8150  		v.reset(OpS390XMOVBZreg)
  8151  		v.AddArg(x)
  8152  		return true
  8153  	}
  8154  	// match: (MOVBZreg e:(MOVHZreg x))
  8155  	// cond: clobberIfDead(e)
  8156  	// result: (MOVBZreg x)
  8157  	for {
  8158  		e := v_0
  8159  		if e.Op != OpS390XMOVHZreg {
  8160  			break
  8161  		}
  8162  		x := e.Args[0]
  8163  		if !(clobberIfDead(e)) {
  8164  			break
  8165  		}
  8166  		v.reset(OpS390XMOVBZreg)
  8167  		v.AddArg(x)
  8168  		return true
  8169  	}
  8170  	// match: (MOVBZreg e:(MOVWZreg x))
  8171  	// cond: clobberIfDead(e)
  8172  	// result: (MOVBZreg x)
  8173  	for {
  8174  		e := v_0
  8175  		if e.Op != OpS390XMOVWZreg {
  8176  			break
  8177  		}
  8178  		x := e.Args[0]
  8179  		if !(clobberIfDead(e)) {
  8180  			break
  8181  		}
  8182  		v.reset(OpS390XMOVBZreg)
  8183  		v.AddArg(x)
  8184  		return true
  8185  	}
  8186  	// match: (MOVBZreg x:(MOVBZload _ _))
  8187  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  8188  	// result: x
  8189  	for {
  8190  		x := v_0
  8191  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  8192  			break
  8193  		}
  8194  		v.copyOf(x)
  8195  		return true
  8196  	}
  8197  	// match: (MOVBZreg <t> x:(MOVBload [o] {s} p mem))
  8198  	// cond: x.Uses == 1 && clobber(x)
  8199  	// result: @x.Block (MOVBZload <t> [o] {s} p mem)
  8200  	for {
  8201  		t := v.Type
  8202  		x := v_0
  8203  		if x.Op != OpS390XMOVBload {
  8204  			break
  8205  		}
  8206  		o := auxIntToInt32(x.AuxInt)
  8207  		s := auxToSym(x.Aux)
  8208  		mem := x.Args[1]
  8209  		p := x.Args[0]
  8210  		if !(x.Uses == 1 && clobber(x)) {
  8211  			break
  8212  		}
  8213  		b = x.Block
  8214  		v0 := b.NewValue0(x.Pos, OpS390XMOVBZload, t)
  8215  		v.copyOf(v0)
  8216  		v0.AuxInt = int32ToAuxInt(o)
  8217  		v0.Aux = symToAux(s)
  8218  		v0.AddArg2(p, mem)
  8219  		return true
  8220  	}
  8221  	// match: (MOVBZreg x:(Arg <t>))
  8222  	// cond: !t.IsSigned() && t.Size() == 1
  8223  	// result: x
  8224  	for {
  8225  		x := v_0
  8226  		if x.Op != OpArg {
  8227  			break
  8228  		}
  8229  		t := x.Type
  8230  		if !(!t.IsSigned() && t.Size() == 1) {
  8231  			break
  8232  		}
  8233  		v.copyOf(x)
  8234  		return true
  8235  	}
  8236  	// match: (MOVBZreg (MOVDconst [c]))
  8237  	// result: (MOVDconst [int64( uint8(c))])
  8238  	for {
  8239  		if v_0.Op != OpS390XMOVDconst {
  8240  			break
  8241  		}
  8242  		c := auxIntToInt64(v_0.AuxInt)
  8243  		v.reset(OpS390XMOVDconst)
  8244  		v.AuxInt = int64ToAuxInt(int64(uint8(c)))
  8245  		return true
  8246  	}
  8247  	// match: (MOVBZreg x:(LOCGR (MOVDconst [c]) (MOVDconst [d]) _))
  8248  	// cond: int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)
  8249  	// result: x
  8250  	for {
  8251  		x := v_0
  8252  		if x.Op != OpS390XLOCGR {
  8253  			break
  8254  		}
  8255  		_ = x.Args[1]
  8256  		x_0 := x.Args[0]
  8257  		if x_0.Op != OpS390XMOVDconst {
  8258  			break
  8259  		}
  8260  		c := auxIntToInt64(x_0.AuxInt)
  8261  		x_1 := x.Args[1]
  8262  		if x_1.Op != OpS390XMOVDconst {
  8263  			break
  8264  		}
  8265  		d := auxIntToInt64(x_1.AuxInt)
  8266  		if !(int64(uint8(c)) == c && int64(uint8(d)) == d && (!x.Type.IsSigned() || x.Type.Size() > 1)) {
  8267  			break
  8268  		}
  8269  		v.copyOf(x)
  8270  		return true
  8271  	}
  8272  	// match: (MOVBZreg (RISBGZ x {r}))
  8273  	// cond: r.OutMerge(0x000000ff) != nil
  8274  	// result: (RISBGZ x {*r.OutMerge(0x000000ff)})
  8275  	for {
  8276  		if v_0.Op != OpS390XRISBGZ {
  8277  			break
  8278  		}
  8279  		r := auxToS390xRotateParams(v_0.Aux)
  8280  		x := v_0.Args[0]
  8281  		if !(r.OutMerge(0x000000ff) != nil) {
  8282  			break
  8283  		}
  8284  		v.reset(OpS390XRISBGZ)
  8285  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x000000ff))
  8286  		v.AddArg(x)
  8287  		return true
  8288  	}
  8289  	// match: (MOVBZreg (ANDWconst [m] x))
  8290  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8291  	for {
  8292  		if v_0.Op != OpS390XANDWconst {
  8293  			break
  8294  		}
  8295  		m := auxIntToInt32(v_0.AuxInt)
  8296  		x := v_0.Args[0]
  8297  		v.reset(OpS390XMOVWZreg)
  8298  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8299  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8300  		v0.AddArg(x)
  8301  		v.AddArg(v0)
  8302  		return true
  8303  	}
  8304  	return false
  8305  }
  8306  func rewriteValueS390X_OpS390XMOVBload(v *Value) bool {
  8307  	v_1 := v.Args[1]
  8308  	v_0 := v.Args[0]
  8309  	// match: (MOVBload [off] {sym} ptr1 (MOVBstore [off] {sym} ptr2 x _))
  8310  	// cond: isSamePtr(ptr1, ptr2)
  8311  	// result: (MOVBreg x)
  8312  	for {
  8313  		off := auxIntToInt32(v.AuxInt)
  8314  		sym := auxToSym(v.Aux)
  8315  		ptr1 := v_0
  8316  		if v_1.Op != OpS390XMOVBstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  8317  			break
  8318  		}
  8319  		x := v_1.Args[1]
  8320  		ptr2 := v_1.Args[0]
  8321  		if !(isSamePtr(ptr1, ptr2)) {
  8322  			break
  8323  		}
  8324  		v.reset(OpS390XMOVBreg)
  8325  		v.AddArg(x)
  8326  		return true
  8327  	}
  8328  	// match: (MOVBload [off1] {sym} (ADDconst [off2] ptr) mem)
  8329  	// cond: is20Bit(int64(off1)+int64(off2))
  8330  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  8331  	for {
  8332  		off1 := auxIntToInt32(v.AuxInt)
  8333  		sym := auxToSym(v.Aux)
  8334  		if v_0.Op != OpS390XADDconst {
  8335  			break
  8336  		}
  8337  		off2 := auxIntToInt32(v_0.AuxInt)
  8338  		ptr := v_0.Args[0]
  8339  		mem := v_1
  8340  		if !(is20Bit(int64(off1) + int64(off2))) {
  8341  			break
  8342  		}
  8343  		v.reset(OpS390XMOVBload)
  8344  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8345  		v.Aux = symToAux(sym)
  8346  		v.AddArg2(ptr, mem)
  8347  		return true
  8348  	}
  8349  	// match: (MOVBload [off1] {sym1} (MOVDaddr [off2] {sym2} base) mem)
  8350  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8351  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  8352  	for {
  8353  		off1 := auxIntToInt32(v.AuxInt)
  8354  		sym1 := auxToSym(v.Aux)
  8355  		if v_0.Op != OpS390XMOVDaddr {
  8356  			break
  8357  		}
  8358  		off2 := auxIntToInt32(v_0.AuxInt)
  8359  		sym2 := auxToSym(v_0.Aux)
  8360  		base := v_0.Args[0]
  8361  		mem := v_1
  8362  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8363  			break
  8364  		}
  8365  		v.reset(OpS390XMOVBload)
  8366  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8367  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8368  		v.AddArg2(base, mem)
  8369  		return true
  8370  	}
  8371  	return false
  8372  }
  8373  func rewriteValueS390X_OpS390XMOVBreg(v *Value) bool {
  8374  	v_0 := v.Args[0]
  8375  	b := v.Block
  8376  	typ := &b.Func.Config.Types
  8377  	// match: (MOVBreg e:(MOVBreg x))
  8378  	// cond: clobberIfDead(e)
  8379  	// result: (MOVBreg x)
  8380  	for {
  8381  		e := v_0
  8382  		if e.Op != OpS390XMOVBreg {
  8383  			break
  8384  		}
  8385  		x := e.Args[0]
  8386  		if !(clobberIfDead(e)) {
  8387  			break
  8388  		}
  8389  		v.reset(OpS390XMOVBreg)
  8390  		v.AddArg(x)
  8391  		return true
  8392  	}
  8393  	// match: (MOVBreg e:(MOVHreg x))
  8394  	// cond: clobberIfDead(e)
  8395  	// result: (MOVBreg x)
  8396  	for {
  8397  		e := v_0
  8398  		if e.Op != OpS390XMOVHreg {
  8399  			break
  8400  		}
  8401  		x := e.Args[0]
  8402  		if !(clobberIfDead(e)) {
  8403  			break
  8404  		}
  8405  		v.reset(OpS390XMOVBreg)
  8406  		v.AddArg(x)
  8407  		return true
  8408  	}
  8409  	// match: (MOVBreg e:(MOVWreg x))
  8410  	// cond: clobberIfDead(e)
  8411  	// result: (MOVBreg x)
  8412  	for {
  8413  		e := v_0
  8414  		if e.Op != OpS390XMOVWreg {
  8415  			break
  8416  		}
  8417  		x := e.Args[0]
  8418  		if !(clobberIfDead(e)) {
  8419  			break
  8420  		}
  8421  		v.reset(OpS390XMOVBreg)
  8422  		v.AddArg(x)
  8423  		return true
  8424  	}
  8425  	// match: (MOVBreg e:(MOVBZreg x))
  8426  	// cond: clobberIfDead(e)
  8427  	// result: (MOVBreg x)
  8428  	for {
  8429  		e := v_0
  8430  		if e.Op != OpS390XMOVBZreg {
  8431  			break
  8432  		}
  8433  		x := e.Args[0]
  8434  		if !(clobberIfDead(e)) {
  8435  			break
  8436  		}
  8437  		v.reset(OpS390XMOVBreg)
  8438  		v.AddArg(x)
  8439  		return true
  8440  	}
  8441  	// match: (MOVBreg e:(MOVHZreg x))
  8442  	// cond: clobberIfDead(e)
  8443  	// result: (MOVBreg x)
  8444  	for {
  8445  		e := v_0
  8446  		if e.Op != OpS390XMOVHZreg {
  8447  			break
  8448  		}
  8449  		x := e.Args[0]
  8450  		if !(clobberIfDead(e)) {
  8451  			break
  8452  		}
  8453  		v.reset(OpS390XMOVBreg)
  8454  		v.AddArg(x)
  8455  		return true
  8456  	}
  8457  	// match: (MOVBreg e:(MOVWZreg x))
  8458  	// cond: clobberIfDead(e)
  8459  	// result: (MOVBreg x)
  8460  	for {
  8461  		e := v_0
  8462  		if e.Op != OpS390XMOVWZreg {
  8463  			break
  8464  		}
  8465  		x := e.Args[0]
  8466  		if !(clobberIfDead(e)) {
  8467  			break
  8468  		}
  8469  		v.reset(OpS390XMOVBreg)
  8470  		v.AddArg(x)
  8471  		return true
  8472  	}
  8473  	// match: (MOVBreg x:(MOVBload _ _))
  8474  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  8475  	// result: x
  8476  	for {
  8477  		x := v_0
  8478  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  8479  			break
  8480  		}
  8481  		v.copyOf(x)
  8482  		return true
  8483  	}
  8484  	// match: (MOVBreg <t> x:(MOVBZload [o] {s} p mem))
  8485  	// cond: x.Uses == 1 && clobber(x)
  8486  	// result: @x.Block (MOVBload <t> [o] {s} p mem)
  8487  	for {
  8488  		t := v.Type
  8489  		x := v_0
  8490  		if x.Op != OpS390XMOVBZload {
  8491  			break
  8492  		}
  8493  		o := auxIntToInt32(x.AuxInt)
  8494  		s := auxToSym(x.Aux)
  8495  		mem := x.Args[1]
  8496  		p := x.Args[0]
  8497  		if !(x.Uses == 1 && clobber(x)) {
  8498  			break
  8499  		}
  8500  		b = x.Block
  8501  		v0 := b.NewValue0(x.Pos, OpS390XMOVBload, t)
  8502  		v.copyOf(v0)
  8503  		v0.AuxInt = int32ToAuxInt(o)
  8504  		v0.Aux = symToAux(s)
  8505  		v0.AddArg2(p, mem)
  8506  		return true
  8507  	}
  8508  	// match: (MOVBreg x:(Arg <t>))
  8509  	// cond: t.IsSigned() && t.Size() == 1
  8510  	// result: x
  8511  	for {
  8512  		x := v_0
  8513  		if x.Op != OpArg {
  8514  			break
  8515  		}
  8516  		t := x.Type
  8517  		if !(t.IsSigned() && t.Size() == 1) {
  8518  			break
  8519  		}
  8520  		v.copyOf(x)
  8521  		return true
  8522  	}
  8523  	// match: (MOVBreg (MOVDconst [c]))
  8524  	// result: (MOVDconst [int64( int8(c))])
  8525  	for {
  8526  		if v_0.Op != OpS390XMOVDconst {
  8527  			break
  8528  		}
  8529  		c := auxIntToInt64(v_0.AuxInt)
  8530  		v.reset(OpS390XMOVDconst)
  8531  		v.AuxInt = int64ToAuxInt(int64(int8(c)))
  8532  		return true
  8533  	}
  8534  	// match: (MOVBreg (ANDWconst [m] x))
  8535  	// cond: int8(m) >= 0
  8536  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32( uint8(m))] x))
  8537  	for {
  8538  		if v_0.Op != OpS390XANDWconst {
  8539  			break
  8540  		}
  8541  		m := auxIntToInt32(v_0.AuxInt)
  8542  		x := v_0.Args[0]
  8543  		if !(int8(m) >= 0) {
  8544  			break
  8545  		}
  8546  		v.reset(OpS390XMOVWZreg)
  8547  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  8548  		v0.AuxInt = int32ToAuxInt(int32(uint8(m)))
  8549  		v0.AddArg(x)
  8550  		v.AddArg(v0)
  8551  		return true
  8552  	}
  8553  	return false
  8554  }
  8555  func rewriteValueS390X_OpS390XMOVBstore(v *Value) bool {
  8556  	v_2 := v.Args[2]
  8557  	v_1 := v.Args[1]
  8558  	v_0 := v.Args[0]
  8559  	// match: (MOVBstore [off] {sym} ptr (MOVBreg x) mem)
  8560  	// result: (MOVBstore [off] {sym} ptr x mem)
  8561  	for {
  8562  		off := auxIntToInt32(v.AuxInt)
  8563  		sym := auxToSym(v.Aux)
  8564  		ptr := v_0
  8565  		if v_1.Op != OpS390XMOVBreg {
  8566  			break
  8567  		}
  8568  		x := v_1.Args[0]
  8569  		mem := v_2
  8570  		v.reset(OpS390XMOVBstore)
  8571  		v.AuxInt = int32ToAuxInt(off)
  8572  		v.Aux = symToAux(sym)
  8573  		v.AddArg3(ptr, x, mem)
  8574  		return true
  8575  	}
  8576  	// match: (MOVBstore [off] {sym} ptr (MOVBZreg x) mem)
  8577  	// result: (MOVBstore [off] {sym} ptr x mem)
  8578  	for {
  8579  		off := auxIntToInt32(v.AuxInt)
  8580  		sym := auxToSym(v.Aux)
  8581  		ptr := v_0
  8582  		if v_1.Op != OpS390XMOVBZreg {
  8583  			break
  8584  		}
  8585  		x := v_1.Args[0]
  8586  		mem := v_2
  8587  		v.reset(OpS390XMOVBstore)
  8588  		v.AuxInt = int32ToAuxInt(off)
  8589  		v.Aux = symToAux(sym)
  8590  		v.AddArg3(ptr, x, mem)
  8591  		return true
  8592  	}
  8593  	// match: (MOVBstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  8594  	// cond: is20Bit(int64(off1)+int64(off2))
  8595  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  8596  	for {
  8597  		off1 := auxIntToInt32(v.AuxInt)
  8598  		sym := auxToSym(v.Aux)
  8599  		if v_0.Op != OpS390XADDconst {
  8600  			break
  8601  		}
  8602  		off2 := auxIntToInt32(v_0.AuxInt)
  8603  		ptr := v_0.Args[0]
  8604  		val := v_1
  8605  		mem := v_2
  8606  		if !(is20Bit(int64(off1) + int64(off2))) {
  8607  			break
  8608  		}
  8609  		v.reset(OpS390XMOVBstore)
  8610  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8611  		v.Aux = symToAux(sym)
  8612  		v.AddArg3(ptr, val, mem)
  8613  		return true
  8614  	}
  8615  	// match: (MOVBstore [off] {sym} ptr (MOVDconst [c]) mem)
  8616  	// cond: is20Bit(int64(off)) && ptr.Op != OpSB
  8617  	// result: (MOVBstoreconst [makeValAndOff32(int32(int8(c)),off)] {sym} ptr mem)
  8618  	for {
  8619  		off := auxIntToInt32(v.AuxInt)
  8620  		sym := auxToSym(v.Aux)
  8621  		ptr := v_0
  8622  		if v_1.Op != OpS390XMOVDconst {
  8623  			break
  8624  		}
  8625  		c := auxIntToInt64(v_1.AuxInt)
  8626  		mem := v_2
  8627  		if !(is20Bit(int64(off)) && ptr.Op != OpSB) {
  8628  			break
  8629  		}
  8630  		v.reset(OpS390XMOVBstoreconst)
  8631  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(int8(c)), off))
  8632  		v.Aux = symToAux(sym)
  8633  		v.AddArg2(ptr, mem)
  8634  		return true
  8635  	}
  8636  	// match: (MOVBstore [off1] {sym1} (MOVDaddr [off2] {sym2} base) val mem)
  8637  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  8638  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8639  	for {
  8640  		off1 := auxIntToInt32(v.AuxInt)
  8641  		sym1 := auxToSym(v.Aux)
  8642  		if v_0.Op != OpS390XMOVDaddr {
  8643  			break
  8644  		}
  8645  		off2 := auxIntToInt32(v_0.AuxInt)
  8646  		sym2 := auxToSym(v_0.Aux)
  8647  		base := v_0.Args[0]
  8648  		val := v_1
  8649  		mem := v_2
  8650  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  8651  			break
  8652  		}
  8653  		v.reset(OpS390XMOVBstore)
  8654  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8655  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8656  		v.AddArg3(base, val, mem)
  8657  		return true
  8658  	}
  8659  	// match: (MOVBstore [i] {s} p w x:(MOVBstore [i-1] {s} p (SRDconst [8] w) mem))
  8660  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8661  	// result: (MOVHstore [i-1] {s} p w mem)
  8662  	for {
  8663  		i := auxIntToInt32(v.AuxInt)
  8664  		s := auxToSym(v.Aux)
  8665  		p := v_0
  8666  		w := v_1
  8667  		x := v_2
  8668  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8669  			break
  8670  		}
  8671  		mem := x.Args[2]
  8672  		if p != x.Args[0] {
  8673  			break
  8674  		}
  8675  		x_1 := x.Args[1]
  8676  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8677  			break
  8678  		}
  8679  		v.reset(OpS390XMOVHstore)
  8680  		v.AuxInt = int32ToAuxInt(i - 1)
  8681  		v.Aux = symToAux(s)
  8682  		v.AddArg3(p, w, mem)
  8683  		return true
  8684  	}
  8685  	// match: (MOVBstore [i] {s} p w0:(SRDconst [j] w) x:(MOVBstore [i-1] {s} p (SRDconst [j+8] w) mem))
  8686  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8687  	// result: (MOVHstore [i-1] {s} p w0 mem)
  8688  	for {
  8689  		i := auxIntToInt32(v.AuxInt)
  8690  		s := auxToSym(v.Aux)
  8691  		p := v_0
  8692  		w0 := v_1
  8693  		if w0.Op != OpS390XSRDconst {
  8694  			break
  8695  		}
  8696  		j := auxIntToUint8(w0.AuxInt)
  8697  		w := w0.Args[0]
  8698  		x := v_2
  8699  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8700  			break
  8701  		}
  8702  		mem := x.Args[2]
  8703  		if p != x.Args[0] {
  8704  			break
  8705  		}
  8706  		x_1 := x.Args[1]
  8707  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != j+8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8708  			break
  8709  		}
  8710  		v.reset(OpS390XMOVHstore)
  8711  		v.AuxInt = int32ToAuxInt(i - 1)
  8712  		v.Aux = symToAux(s)
  8713  		v.AddArg3(p, w0, mem)
  8714  		return true
  8715  	}
  8716  	// match: (MOVBstore [i] {s} p w x:(MOVBstore [i-1] {s} p (SRWconst [8] w) mem))
  8717  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8718  	// result: (MOVHstore [i-1] {s} p w mem)
  8719  	for {
  8720  		i := auxIntToInt32(v.AuxInt)
  8721  		s := auxToSym(v.Aux)
  8722  		p := v_0
  8723  		w := v_1
  8724  		x := v_2
  8725  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8726  			break
  8727  		}
  8728  		mem := x.Args[2]
  8729  		if p != x.Args[0] {
  8730  			break
  8731  		}
  8732  		x_1 := x.Args[1]
  8733  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8734  			break
  8735  		}
  8736  		v.reset(OpS390XMOVHstore)
  8737  		v.AuxInt = int32ToAuxInt(i - 1)
  8738  		v.Aux = symToAux(s)
  8739  		v.AddArg3(p, w, mem)
  8740  		return true
  8741  	}
  8742  	// match: (MOVBstore [i] {s} p w0:(SRWconst [j] w) x:(MOVBstore [i-1] {s} p (SRWconst [j+8] w) mem))
  8743  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8744  	// result: (MOVHstore [i-1] {s} p w0 mem)
  8745  	for {
  8746  		i := auxIntToInt32(v.AuxInt)
  8747  		s := auxToSym(v.Aux)
  8748  		p := v_0
  8749  		w0 := v_1
  8750  		if w0.Op != OpS390XSRWconst {
  8751  			break
  8752  		}
  8753  		j := auxIntToUint8(w0.AuxInt)
  8754  		w := w0.Args[0]
  8755  		x := v_2
  8756  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8757  			break
  8758  		}
  8759  		mem := x.Args[2]
  8760  		if p != x.Args[0] {
  8761  			break
  8762  		}
  8763  		x_1 := x.Args[1]
  8764  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != j+8 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8765  			break
  8766  		}
  8767  		v.reset(OpS390XMOVHstore)
  8768  		v.AuxInt = int32ToAuxInt(i - 1)
  8769  		v.Aux = symToAux(s)
  8770  		v.AddArg3(p, w0, mem)
  8771  		return true
  8772  	}
  8773  	// match: (MOVBstore [i] {s} p (SRDconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  8774  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8775  	// result: (MOVHBRstore [i-1] {s} p w mem)
  8776  	for {
  8777  		i := auxIntToInt32(v.AuxInt)
  8778  		s := auxToSym(v.Aux)
  8779  		p := v_0
  8780  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 8 {
  8781  			break
  8782  		}
  8783  		w := v_1.Args[0]
  8784  		x := v_2
  8785  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8786  			break
  8787  		}
  8788  		mem := x.Args[2]
  8789  		if p != x.Args[0] || w != x.Args[1] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8790  			break
  8791  		}
  8792  		v.reset(OpS390XMOVHBRstore)
  8793  		v.AuxInt = int32ToAuxInt(i - 1)
  8794  		v.Aux = symToAux(s)
  8795  		v.AddArg3(p, w, mem)
  8796  		return true
  8797  	}
  8798  	// match: (MOVBstore [i] {s} p (SRDconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SRDconst [j-8] w) mem))
  8799  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8800  	// result: (MOVHBRstore [i-1] {s} p w0 mem)
  8801  	for {
  8802  		i := auxIntToInt32(v.AuxInt)
  8803  		s := auxToSym(v.Aux)
  8804  		p := v_0
  8805  		if v_1.Op != OpS390XSRDconst {
  8806  			break
  8807  		}
  8808  		j := auxIntToUint8(v_1.AuxInt)
  8809  		w := v_1.Args[0]
  8810  		x := v_2
  8811  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8812  			break
  8813  		}
  8814  		mem := x.Args[2]
  8815  		if p != x.Args[0] {
  8816  			break
  8817  		}
  8818  		w0 := x.Args[1]
  8819  		if w0.Op != OpS390XSRDconst || auxIntToUint8(w0.AuxInt) != j-8 || w != w0.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8820  			break
  8821  		}
  8822  		v.reset(OpS390XMOVHBRstore)
  8823  		v.AuxInt = int32ToAuxInt(i - 1)
  8824  		v.Aux = symToAux(s)
  8825  		v.AddArg3(p, w0, mem)
  8826  		return true
  8827  	}
  8828  	// match: (MOVBstore [i] {s} p (SRWconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  8829  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8830  	// result: (MOVHBRstore [i-1] {s} p w mem)
  8831  	for {
  8832  		i := auxIntToInt32(v.AuxInt)
  8833  		s := auxToSym(v.Aux)
  8834  		p := v_0
  8835  		if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 8 {
  8836  			break
  8837  		}
  8838  		w := v_1.Args[0]
  8839  		x := v_2
  8840  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8841  			break
  8842  		}
  8843  		mem := x.Args[2]
  8844  		if p != x.Args[0] || w != x.Args[1] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8845  			break
  8846  		}
  8847  		v.reset(OpS390XMOVHBRstore)
  8848  		v.AuxInt = int32ToAuxInt(i - 1)
  8849  		v.Aux = symToAux(s)
  8850  		v.AddArg3(p, w, mem)
  8851  		return true
  8852  	}
  8853  	// match: (MOVBstore [i] {s} p (SRWconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SRWconst [j-8] w) mem))
  8854  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
  8855  	// result: (MOVHBRstore [i-1] {s} p w0 mem)
  8856  	for {
  8857  		i := auxIntToInt32(v.AuxInt)
  8858  		s := auxToSym(v.Aux)
  8859  		p := v_0
  8860  		if v_1.Op != OpS390XSRWconst {
  8861  			break
  8862  		}
  8863  		j := auxIntToUint8(v_1.AuxInt)
  8864  		w := v_1.Args[0]
  8865  		x := v_2
  8866  		if x.Op != OpS390XMOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  8867  			break
  8868  		}
  8869  		mem := x.Args[2]
  8870  		if p != x.Args[0] {
  8871  			break
  8872  		}
  8873  		w0 := x.Args[1]
  8874  		if w0.Op != OpS390XSRWconst || auxIntToUint8(w0.AuxInt) != j-8 || w != w0.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
  8875  			break
  8876  		}
  8877  		v.reset(OpS390XMOVHBRstore)
  8878  		v.AuxInt = int32ToAuxInt(i - 1)
  8879  		v.Aux = symToAux(s)
  8880  		v.AddArg3(p, w0, mem)
  8881  		return true
  8882  	}
  8883  	return false
  8884  }
  8885  func rewriteValueS390X_OpS390XMOVBstoreconst(v *Value) bool {
  8886  	v_1 := v.Args[1]
  8887  	v_0 := v.Args[0]
  8888  	// match: (MOVBstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  8889  	// cond: is20Bit(sc.Off()+int64(off))
  8890  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  8891  	for {
  8892  		sc := auxIntToValAndOff(v.AuxInt)
  8893  		s := auxToSym(v.Aux)
  8894  		if v_0.Op != OpS390XADDconst {
  8895  			break
  8896  		}
  8897  		off := auxIntToInt32(v_0.AuxInt)
  8898  		ptr := v_0.Args[0]
  8899  		mem := v_1
  8900  		if !(is20Bit(sc.Off() + int64(off))) {
  8901  			break
  8902  		}
  8903  		v.reset(OpS390XMOVBstoreconst)
  8904  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8905  		v.Aux = symToAux(s)
  8906  		v.AddArg2(ptr, mem)
  8907  		return true
  8908  	}
  8909  	// match: (MOVBstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  8910  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  8911  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  8912  	for {
  8913  		sc := auxIntToValAndOff(v.AuxInt)
  8914  		sym1 := auxToSym(v.Aux)
  8915  		if v_0.Op != OpS390XMOVDaddr {
  8916  			break
  8917  		}
  8918  		off := auxIntToInt32(v_0.AuxInt)
  8919  		sym2 := auxToSym(v_0.Aux)
  8920  		ptr := v_0.Args[0]
  8921  		mem := v_1
  8922  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  8923  			break
  8924  		}
  8925  		v.reset(OpS390XMOVBstoreconst)
  8926  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  8927  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8928  		v.AddArg2(ptr, mem)
  8929  		return true
  8930  	}
  8931  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  8932  	// cond: p.Op != OpSB && x.Uses == 1 && a.Off() + 1 == c.Off() && clobber(x)
  8933  	// result: (MOVHstoreconst [makeValAndOff32(c.Val32()&0xff | a.Val32()<<8, a.Off32())] {s} p mem)
  8934  	for {
  8935  		c := auxIntToValAndOff(v.AuxInt)
  8936  		s := auxToSym(v.Aux)
  8937  		p := v_0
  8938  		x := v_1
  8939  		if x.Op != OpS390XMOVBstoreconst {
  8940  			break
  8941  		}
  8942  		a := auxIntToValAndOff(x.AuxInt)
  8943  		if auxToSym(x.Aux) != s {
  8944  			break
  8945  		}
  8946  		mem := x.Args[1]
  8947  		if p != x.Args[0] || !(p.Op != OpSB && x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
  8948  			break
  8949  		}
  8950  		v.reset(OpS390XMOVHstoreconst)
  8951  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c.Val32()&0xff|a.Val32()<<8, a.Off32()))
  8952  		v.Aux = symToAux(s)
  8953  		v.AddArg2(p, mem)
  8954  		return true
  8955  	}
  8956  	return false
  8957  }
  8958  func rewriteValueS390X_OpS390XMOVDaddridx(v *Value) bool {
  8959  	v_1 := v.Args[1]
  8960  	v_0 := v.Args[0]
  8961  	// match: (MOVDaddridx [c] {s} (ADDconst [d] x) y)
  8962  	// cond: is20Bit(int64(c)+int64(d))
  8963  	// result: (MOVDaddridx [c+d] {s} x y)
  8964  	for {
  8965  		c := auxIntToInt32(v.AuxInt)
  8966  		s := auxToSym(v.Aux)
  8967  		if v_0.Op != OpS390XADDconst {
  8968  			break
  8969  		}
  8970  		d := auxIntToInt32(v_0.AuxInt)
  8971  		x := v_0.Args[0]
  8972  		y := v_1
  8973  		if !(is20Bit(int64(c) + int64(d))) {
  8974  			break
  8975  		}
  8976  		v.reset(OpS390XMOVDaddridx)
  8977  		v.AuxInt = int32ToAuxInt(c + d)
  8978  		v.Aux = symToAux(s)
  8979  		v.AddArg2(x, y)
  8980  		return true
  8981  	}
  8982  	// match: (MOVDaddridx [c] {s} x (ADDconst [d] y))
  8983  	// cond: is20Bit(int64(c)+int64(d))
  8984  	// result: (MOVDaddridx [c+d] {s} x y)
  8985  	for {
  8986  		c := auxIntToInt32(v.AuxInt)
  8987  		s := auxToSym(v.Aux)
  8988  		x := v_0
  8989  		if v_1.Op != OpS390XADDconst {
  8990  			break
  8991  		}
  8992  		d := auxIntToInt32(v_1.AuxInt)
  8993  		y := v_1.Args[0]
  8994  		if !(is20Bit(int64(c) + int64(d))) {
  8995  			break
  8996  		}
  8997  		v.reset(OpS390XMOVDaddridx)
  8998  		v.AuxInt = int32ToAuxInt(c + d)
  8999  		v.Aux = symToAux(s)
  9000  		v.AddArg2(x, y)
  9001  		return true
  9002  	}
  9003  	// match: (MOVDaddridx [off1] {sym1} (MOVDaddr [off2] {sym2} x) y)
  9004  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  9005  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  9006  	for {
  9007  		off1 := auxIntToInt32(v.AuxInt)
  9008  		sym1 := auxToSym(v.Aux)
  9009  		if v_0.Op != OpS390XMOVDaddr {
  9010  			break
  9011  		}
  9012  		off2 := auxIntToInt32(v_0.AuxInt)
  9013  		sym2 := auxToSym(v_0.Aux)
  9014  		x := v_0.Args[0]
  9015  		y := v_1
  9016  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  9017  			break
  9018  		}
  9019  		v.reset(OpS390XMOVDaddridx)
  9020  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9021  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9022  		v.AddArg2(x, y)
  9023  		return true
  9024  	}
  9025  	// match: (MOVDaddridx [off1] {sym1} x (MOVDaddr [off2] {sym2} y))
  9026  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB
  9027  	// result: (MOVDaddridx [off1+off2] {mergeSym(sym1,sym2)} x y)
  9028  	for {
  9029  		off1 := auxIntToInt32(v.AuxInt)
  9030  		sym1 := auxToSym(v.Aux)
  9031  		x := v_0
  9032  		if v_1.Op != OpS390XMOVDaddr {
  9033  			break
  9034  		}
  9035  		off2 := auxIntToInt32(v_1.AuxInt)
  9036  		sym2 := auxToSym(v_1.Aux)
  9037  		y := v_1.Args[0]
  9038  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && y.Op != OpSB) {
  9039  			break
  9040  		}
  9041  		v.reset(OpS390XMOVDaddridx)
  9042  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9043  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9044  		v.AddArg2(x, y)
  9045  		return true
  9046  	}
  9047  	return false
  9048  }
  9049  func rewriteValueS390X_OpS390XMOVDload(v *Value) bool {
  9050  	v_1 := v.Args[1]
  9051  	v_0 := v.Args[0]
  9052  	// match: (MOVDload [off] {sym} ptr1 (MOVDstore [off] {sym} ptr2 x _))
  9053  	// cond: isSamePtr(ptr1, ptr2)
  9054  	// result: x
  9055  	for {
  9056  		off := auxIntToInt32(v.AuxInt)
  9057  		sym := auxToSym(v.Aux)
  9058  		ptr1 := v_0
  9059  		if v_1.Op != OpS390XMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9060  			break
  9061  		}
  9062  		x := v_1.Args[1]
  9063  		ptr2 := v_1.Args[0]
  9064  		if !(isSamePtr(ptr1, ptr2)) {
  9065  			break
  9066  		}
  9067  		v.copyOf(x)
  9068  		return true
  9069  	}
  9070  	// match: (MOVDload [off] {sym} ptr1 (FMOVDstore [off] {sym} ptr2 x _))
  9071  	// cond: isSamePtr(ptr1, ptr2)
  9072  	// result: (LGDR x)
  9073  	for {
  9074  		off := auxIntToInt32(v.AuxInt)
  9075  		sym := auxToSym(v.Aux)
  9076  		ptr1 := v_0
  9077  		if v_1.Op != OpS390XFMOVDstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9078  			break
  9079  		}
  9080  		x := v_1.Args[1]
  9081  		ptr2 := v_1.Args[0]
  9082  		if !(isSamePtr(ptr1, ptr2)) {
  9083  			break
  9084  		}
  9085  		v.reset(OpS390XLGDR)
  9086  		v.AddArg(x)
  9087  		return true
  9088  	}
  9089  	// match: (MOVDload [off1] {sym} (ADDconst [off2] ptr) mem)
  9090  	// cond: is20Bit(int64(off1)+int64(off2))
  9091  	// result: (MOVDload [off1+off2] {sym} ptr mem)
  9092  	for {
  9093  		off1 := auxIntToInt32(v.AuxInt)
  9094  		sym := auxToSym(v.Aux)
  9095  		if v_0.Op != OpS390XADDconst {
  9096  			break
  9097  		}
  9098  		off2 := auxIntToInt32(v_0.AuxInt)
  9099  		ptr := v_0.Args[0]
  9100  		mem := v_1
  9101  		if !(is20Bit(int64(off1) + int64(off2))) {
  9102  			break
  9103  		}
  9104  		v.reset(OpS390XMOVDload)
  9105  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9106  		v.Aux = symToAux(sym)
  9107  		v.AddArg2(ptr, mem)
  9108  		return true
  9109  	}
  9110  	// match: (MOVDload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9111  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9112  	// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9113  	for {
  9114  		off1 := auxIntToInt32(v.AuxInt)
  9115  		sym1 := auxToSym(v.Aux)
  9116  		if v_0.Op != OpS390XMOVDaddr {
  9117  			break
  9118  		}
  9119  		t := v_0.Type
  9120  		off2 := auxIntToInt32(v_0.AuxInt)
  9121  		sym2 := auxToSym(v_0.Aux)
  9122  		base := v_0.Args[0]
  9123  		mem := v_1
  9124  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9125  			break
  9126  		}
  9127  		v.reset(OpS390XMOVDload)
  9128  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9129  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9130  		v.AddArg2(base, mem)
  9131  		return true
  9132  	}
  9133  	return false
  9134  }
  9135  func rewriteValueS390X_OpS390XMOVDstore(v *Value) bool {
  9136  	v_2 := v.Args[2]
  9137  	v_1 := v.Args[1]
  9138  	v_0 := v.Args[0]
  9139  	// match: (MOVDstore [off1] {sym} (ADDconst [off2] ptr) val mem)
  9140  	// cond: is20Bit(int64(off1)+int64(off2))
  9141  	// result: (MOVDstore [off1+off2] {sym} ptr val mem)
  9142  	for {
  9143  		off1 := auxIntToInt32(v.AuxInt)
  9144  		sym := auxToSym(v.Aux)
  9145  		if v_0.Op != OpS390XADDconst {
  9146  			break
  9147  		}
  9148  		off2 := auxIntToInt32(v_0.AuxInt)
  9149  		ptr := v_0.Args[0]
  9150  		val := v_1
  9151  		mem := v_2
  9152  		if !(is20Bit(int64(off1) + int64(off2))) {
  9153  			break
  9154  		}
  9155  		v.reset(OpS390XMOVDstore)
  9156  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9157  		v.Aux = symToAux(sym)
  9158  		v.AddArg3(ptr, val, mem)
  9159  		return true
  9160  	}
  9161  	// match: (MOVDstore [off] {sym} ptr (MOVDconst [c]) mem)
  9162  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
  9163  	// result: (MOVDstoreconst [makeValAndOff32(int32(c),off)] {sym} ptr mem)
  9164  	for {
  9165  		off := auxIntToInt32(v.AuxInt)
  9166  		sym := auxToSym(v.Aux)
  9167  		ptr := v_0
  9168  		if v_1.Op != OpS390XMOVDconst {
  9169  			break
  9170  		}
  9171  		c := auxIntToInt64(v_1.AuxInt)
  9172  		mem := v_2
  9173  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
  9174  			break
  9175  		}
  9176  		v.reset(OpS390XMOVDstoreconst)
  9177  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(c), off))
  9178  		v.Aux = symToAux(sym)
  9179  		v.AddArg2(ptr, mem)
  9180  		return true
  9181  	}
  9182  	// match: (MOVDstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
  9183  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))
  9184  	// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  9185  	for {
  9186  		off1 := auxIntToInt32(v.AuxInt)
  9187  		sym1 := auxToSym(v.Aux)
  9188  		if v_0.Op != OpS390XMOVDaddr {
  9189  			break
  9190  		}
  9191  		t := v_0.Type
  9192  		off2 := auxIntToInt32(v_0.AuxInt)
  9193  		sym2 := auxToSym(v_0.Aux)
  9194  		base := v_0.Args[0]
  9195  		val := v_1
  9196  		mem := v_2
  9197  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%8 == 0 && (off1+off2)%8 == 0))) {
  9198  			break
  9199  		}
  9200  		v.reset(OpS390XMOVDstore)
  9201  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9202  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9203  		v.AddArg3(base, val, mem)
  9204  		return true
  9205  	}
  9206  	// match: (MOVDstore [i] {s} p w1 x:(MOVDstore [i-8] {s} p w0 mem))
  9207  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)
  9208  	// result: (STMG2 [i-8] {s} p w0 w1 mem)
  9209  	for {
  9210  		i := auxIntToInt32(v.AuxInt)
  9211  		s := auxToSym(v.Aux)
  9212  		p := v_0
  9213  		w1 := v_1
  9214  		x := v_2
  9215  		if x.Op != OpS390XMOVDstore || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
  9216  			break
  9217  		}
  9218  		mem := x.Args[2]
  9219  		if p != x.Args[0] {
  9220  			break
  9221  		}
  9222  		w0 := x.Args[1]
  9223  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)) {
  9224  			break
  9225  		}
  9226  		v.reset(OpS390XSTMG2)
  9227  		v.AuxInt = int32ToAuxInt(i - 8)
  9228  		v.Aux = symToAux(s)
  9229  		v.AddArg4(p, w0, w1, mem)
  9230  		return true
  9231  	}
  9232  	// match: (MOVDstore [i] {s} p w2 x:(STMG2 [i-16] {s} p w0 w1 mem))
  9233  	// cond: x.Uses == 1 && is20Bit(int64(i)-16) && clobber(x)
  9234  	// result: (STMG3 [i-16] {s} p w0 w1 w2 mem)
  9235  	for {
  9236  		i := auxIntToInt32(v.AuxInt)
  9237  		s := auxToSym(v.Aux)
  9238  		p := v_0
  9239  		w2 := v_1
  9240  		x := v_2
  9241  		if x.Op != OpS390XSTMG2 || auxIntToInt32(x.AuxInt) != i-16 || auxToSym(x.Aux) != s {
  9242  			break
  9243  		}
  9244  		mem := x.Args[3]
  9245  		if p != x.Args[0] {
  9246  			break
  9247  		}
  9248  		w0 := x.Args[1]
  9249  		w1 := x.Args[2]
  9250  		if !(x.Uses == 1 && is20Bit(int64(i)-16) && clobber(x)) {
  9251  			break
  9252  		}
  9253  		v.reset(OpS390XSTMG3)
  9254  		v.AuxInt = int32ToAuxInt(i - 16)
  9255  		v.Aux = symToAux(s)
  9256  		v.AddArg5(p, w0, w1, w2, mem)
  9257  		return true
  9258  	}
  9259  	// match: (MOVDstore [i] {s} p w3 x:(STMG3 [i-24] {s} p w0 w1 w2 mem))
  9260  	// cond: x.Uses == 1 && is20Bit(int64(i)-24) && clobber(x)
  9261  	// result: (STMG4 [i-24] {s} p w0 w1 w2 w3 mem)
  9262  	for {
  9263  		i := auxIntToInt32(v.AuxInt)
  9264  		s := auxToSym(v.Aux)
  9265  		p := v_0
  9266  		w3 := v_1
  9267  		x := v_2
  9268  		if x.Op != OpS390XSTMG3 || auxIntToInt32(x.AuxInt) != i-24 || auxToSym(x.Aux) != s {
  9269  			break
  9270  		}
  9271  		mem := x.Args[4]
  9272  		if p != x.Args[0] {
  9273  			break
  9274  		}
  9275  		w0 := x.Args[1]
  9276  		w1 := x.Args[2]
  9277  		w2 := x.Args[3]
  9278  		if !(x.Uses == 1 && is20Bit(int64(i)-24) && clobber(x)) {
  9279  			break
  9280  		}
  9281  		v.reset(OpS390XSTMG4)
  9282  		v.AuxInt = int32ToAuxInt(i - 24)
  9283  		v.Aux = symToAux(s)
  9284  		v.AddArg6(p, w0, w1, w2, w3, mem)
  9285  		return true
  9286  	}
  9287  	return false
  9288  }
  9289  func rewriteValueS390X_OpS390XMOVDstoreconst(v *Value) bool {
  9290  	v_1 := v.Args[1]
  9291  	v_0 := v.Args[0]
  9292  	// match: (MOVDstoreconst [sc] {s} (ADDconst [off] ptr) mem)
  9293  	// cond: isU12Bit(sc.Off()+int64(off))
  9294  	// result: (MOVDstoreconst [sc.addOffset32(off)] {s} ptr mem)
  9295  	for {
  9296  		sc := auxIntToValAndOff(v.AuxInt)
  9297  		s := auxToSym(v.Aux)
  9298  		if v_0.Op != OpS390XADDconst {
  9299  			break
  9300  		}
  9301  		off := auxIntToInt32(v_0.AuxInt)
  9302  		ptr := v_0.Args[0]
  9303  		mem := v_1
  9304  		if !(isU12Bit(sc.Off() + int64(off))) {
  9305  			break
  9306  		}
  9307  		v.reset(OpS390XMOVDstoreconst)
  9308  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9309  		v.Aux = symToAux(s)
  9310  		v.AddArg2(ptr, mem)
  9311  		return true
  9312  	}
  9313  	// match: (MOVDstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
  9314  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
  9315  	// result: (MOVDstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  9316  	for {
  9317  		sc := auxIntToValAndOff(v.AuxInt)
  9318  		sym1 := auxToSym(v.Aux)
  9319  		if v_0.Op != OpS390XMOVDaddr {
  9320  			break
  9321  		}
  9322  		off := auxIntToInt32(v_0.AuxInt)
  9323  		sym2 := auxToSym(v_0.Aux)
  9324  		ptr := v_0.Args[0]
  9325  		mem := v_1
  9326  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
  9327  			break
  9328  		}
  9329  		v.reset(OpS390XMOVDstoreconst)
  9330  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  9331  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9332  		v.AddArg2(ptr, mem)
  9333  		return true
  9334  	}
  9335  	return false
  9336  }
  9337  func rewriteValueS390X_OpS390XMOVHBRstore(v *Value) bool {
  9338  	v_2 := v.Args[2]
  9339  	v_1 := v.Args[1]
  9340  	v_0 := v.Args[0]
  9341  	// match: (MOVHBRstore [i] {s} p (SRDconst [16] w) x:(MOVHBRstore [i-2] {s} p w mem))
  9342  	// cond: x.Uses == 1 && clobber(x)
  9343  	// result: (MOVWBRstore [i-2] {s} p w mem)
  9344  	for {
  9345  		i := auxIntToInt32(v.AuxInt)
  9346  		s := auxToSym(v.Aux)
  9347  		p := v_0
  9348  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 16 {
  9349  			break
  9350  		}
  9351  		w := v_1.Args[0]
  9352  		x := v_2
  9353  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9354  			break
  9355  		}
  9356  		mem := x.Args[2]
  9357  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  9358  			break
  9359  		}
  9360  		v.reset(OpS390XMOVWBRstore)
  9361  		v.AuxInt = int32ToAuxInt(i - 2)
  9362  		v.Aux = symToAux(s)
  9363  		v.AddArg3(p, w, mem)
  9364  		return true
  9365  	}
  9366  	// match: (MOVHBRstore [i] {s} p (SRDconst [j] w) x:(MOVHBRstore [i-2] {s} p w0:(SRDconst [j-16] w) mem))
  9367  	// cond: x.Uses == 1 && clobber(x)
  9368  	// result: (MOVWBRstore [i-2] {s} p w0 mem)
  9369  	for {
  9370  		i := auxIntToInt32(v.AuxInt)
  9371  		s := auxToSym(v.Aux)
  9372  		p := v_0
  9373  		if v_1.Op != OpS390XSRDconst {
  9374  			break
  9375  		}
  9376  		j := auxIntToUint8(v_1.AuxInt)
  9377  		w := v_1.Args[0]
  9378  		x := v_2
  9379  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9380  			break
  9381  		}
  9382  		mem := x.Args[2]
  9383  		if p != x.Args[0] {
  9384  			break
  9385  		}
  9386  		w0 := x.Args[1]
  9387  		if w0.Op != OpS390XSRDconst || auxIntToUint8(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  9388  			break
  9389  		}
  9390  		v.reset(OpS390XMOVWBRstore)
  9391  		v.AuxInt = int32ToAuxInt(i - 2)
  9392  		v.Aux = symToAux(s)
  9393  		v.AddArg3(p, w0, mem)
  9394  		return true
  9395  	}
  9396  	// match: (MOVHBRstore [i] {s} p (SRWconst [16] w) x:(MOVHBRstore [i-2] {s} p w mem))
  9397  	// cond: x.Uses == 1 && clobber(x)
  9398  	// result: (MOVWBRstore [i-2] {s} p w mem)
  9399  	for {
  9400  		i := auxIntToInt32(v.AuxInt)
  9401  		s := auxToSym(v.Aux)
  9402  		p := v_0
  9403  		if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 16 {
  9404  			break
  9405  		}
  9406  		w := v_1.Args[0]
  9407  		x := v_2
  9408  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9409  			break
  9410  		}
  9411  		mem := x.Args[2]
  9412  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  9413  			break
  9414  		}
  9415  		v.reset(OpS390XMOVWBRstore)
  9416  		v.AuxInt = int32ToAuxInt(i - 2)
  9417  		v.Aux = symToAux(s)
  9418  		v.AddArg3(p, w, mem)
  9419  		return true
  9420  	}
  9421  	// match: (MOVHBRstore [i] {s} p (SRWconst [j] w) x:(MOVHBRstore [i-2] {s} p w0:(SRWconst [j-16] w) mem))
  9422  	// cond: x.Uses == 1 && clobber(x)
  9423  	// result: (MOVWBRstore [i-2] {s} p w0 mem)
  9424  	for {
  9425  		i := auxIntToInt32(v.AuxInt)
  9426  		s := auxToSym(v.Aux)
  9427  		p := v_0
  9428  		if v_1.Op != OpS390XSRWconst {
  9429  			break
  9430  		}
  9431  		j := auxIntToUint8(v_1.AuxInt)
  9432  		w := v_1.Args[0]
  9433  		x := v_2
  9434  		if x.Op != OpS390XMOVHBRstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  9435  			break
  9436  		}
  9437  		mem := x.Args[2]
  9438  		if p != x.Args[0] {
  9439  			break
  9440  		}
  9441  		w0 := x.Args[1]
  9442  		if w0.Op != OpS390XSRWconst || auxIntToUint8(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  9443  			break
  9444  		}
  9445  		v.reset(OpS390XMOVWBRstore)
  9446  		v.AuxInt = int32ToAuxInt(i - 2)
  9447  		v.Aux = symToAux(s)
  9448  		v.AddArg3(p, w0, mem)
  9449  		return true
  9450  	}
  9451  	return false
  9452  }
  9453  func rewriteValueS390X_OpS390XMOVHZload(v *Value) bool {
  9454  	v_1 := v.Args[1]
  9455  	v_0 := v.Args[0]
  9456  	// match: (MOVHZload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9457  	// cond: isSamePtr(ptr1, ptr2)
  9458  	// result: (MOVHZreg x)
  9459  	for {
  9460  		off := auxIntToInt32(v.AuxInt)
  9461  		sym := auxToSym(v.Aux)
  9462  		ptr1 := v_0
  9463  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9464  			break
  9465  		}
  9466  		x := v_1.Args[1]
  9467  		ptr2 := v_1.Args[0]
  9468  		if !(isSamePtr(ptr1, ptr2)) {
  9469  			break
  9470  		}
  9471  		v.reset(OpS390XMOVHZreg)
  9472  		v.AddArg(x)
  9473  		return true
  9474  	}
  9475  	// match: (MOVHZload [off1] {sym} (ADDconst [off2] ptr) mem)
  9476  	// cond: is20Bit(int64(off1)+int64(off2))
  9477  	// result: (MOVHZload [off1+off2] {sym} ptr mem)
  9478  	for {
  9479  		off1 := auxIntToInt32(v.AuxInt)
  9480  		sym := auxToSym(v.Aux)
  9481  		if v_0.Op != OpS390XADDconst {
  9482  			break
  9483  		}
  9484  		off2 := auxIntToInt32(v_0.AuxInt)
  9485  		ptr := v_0.Args[0]
  9486  		mem := v_1
  9487  		if !(is20Bit(int64(off1) + int64(off2))) {
  9488  			break
  9489  		}
  9490  		v.reset(OpS390XMOVHZload)
  9491  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9492  		v.Aux = symToAux(sym)
  9493  		v.AddArg2(ptr, mem)
  9494  		return true
  9495  	}
  9496  	// match: (MOVHZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9497  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9498  	// result: (MOVHZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9499  	for {
  9500  		off1 := auxIntToInt32(v.AuxInt)
  9501  		sym1 := auxToSym(v.Aux)
  9502  		if v_0.Op != OpS390XMOVDaddr {
  9503  			break
  9504  		}
  9505  		t := v_0.Type
  9506  		off2 := auxIntToInt32(v_0.AuxInt)
  9507  		sym2 := auxToSym(v_0.Aux)
  9508  		base := v_0.Args[0]
  9509  		mem := v_1
  9510  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9511  			break
  9512  		}
  9513  		v.reset(OpS390XMOVHZload)
  9514  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9515  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9516  		v.AddArg2(base, mem)
  9517  		return true
  9518  	}
  9519  	return false
  9520  }
  9521  func rewriteValueS390X_OpS390XMOVHZreg(v *Value) bool {
  9522  	v_0 := v.Args[0]
  9523  	b := v.Block
  9524  	typ := &b.Func.Config.Types
  9525  	// match: (MOVHZreg e:(MOVBZreg x))
  9526  	// cond: clobberIfDead(e)
  9527  	// result: (MOVBZreg x)
  9528  	for {
  9529  		e := v_0
  9530  		if e.Op != OpS390XMOVBZreg {
  9531  			break
  9532  		}
  9533  		x := e.Args[0]
  9534  		if !(clobberIfDead(e)) {
  9535  			break
  9536  		}
  9537  		v.reset(OpS390XMOVBZreg)
  9538  		v.AddArg(x)
  9539  		return true
  9540  	}
  9541  	// match: (MOVHZreg e:(MOVHreg x))
  9542  	// cond: clobberIfDead(e)
  9543  	// result: (MOVHZreg x)
  9544  	for {
  9545  		e := v_0
  9546  		if e.Op != OpS390XMOVHreg {
  9547  			break
  9548  		}
  9549  		x := e.Args[0]
  9550  		if !(clobberIfDead(e)) {
  9551  			break
  9552  		}
  9553  		v.reset(OpS390XMOVHZreg)
  9554  		v.AddArg(x)
  9555  		return true
  9556  	}
  9557  	// match: (MOVHZreg e:(MOVWreg x))
  9558  	// cond: clobberIfDead(e)
  9559  	// result: (MOVHZreg x)
  9560  	for {
  9561  		e := v_0
  9562  		if e.Op != OpS390XMOVWreg {
  9563  			break
  9564  		}
  9565  		x := e.Args[0]
  9566  		if !(clobberIfDead(e)) {
  9567  			break
  9568  		}
  9569  		v.reset(OpS390XMOVHZreg)
  9570  		v.AddArg(x)
  9571  		return true
  9572  	}
  9573  	// match: (MOVHZreg e:(MOVHZreg x))
  9574  	// cond: clobberIfDead(e)
  9575  	// result: (MOVHZreg x)
  9576  	for {
  9577  		e := v_0
  9578  		if e.Op != OpS390XMOVHZreg {
  9579  			break
  9580  		}
  9581  		x := e.Args[0]
  9582  		if !(clobberIfDead(e)) {
  9583  			break
  9584  		}
  9585  		v.reset(OpS390XMOVHZreg)
  9586  		v.AddArg(x)
  9587  		return true
  9588  	}
  9589  	// match: (MOVHZreg e:(MOVWZreg x))
  9590  	// cond: clobberIfDead(e)
  9591  	// result: (MOVHZreg x)
  9592  	for {
  9593  		e := v_0
  9594  		if e.Op != OpS390XMOVWZreg {
  9595  			break
  9596  		}
  9597  		x := e.Args[0]
  9598  		if !(clobberIfDead(e)) {
  9599  			break
  9600  		}
  9601  		v.reset(OpS390XMOVHZreg)
  9602  		v.AddArg(x)
  9603  		return true
  9604  	}
  9605  	// match: (MOVHZreg x:(MOVBZload _ _))
  9606  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9607  	// result: x
  9608  	for {
  9609  		x := v_0
  9610  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9611  			break
  9612  		}
  9613  		v.copyOf(x)
  9614  		return true
  9615  	}
  9616  	// match: (MOVHZreg x:(MOVHZload _ _))
  9617  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
  9618  	// result: x
  9619  	for {
  9620  		x := v_0
  9621  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
  9622  			break
  9623  		}
  9624  		v.copyOf(x)
  9625  		return true
  9626  	}
  9627  	// match: (MOVHZreg <t> x:(MOVHload [o] {s} p mem))
  9628  	// cond: x.Uses == 1 && clobber(x)
  9629  	// result: @x.Block (MOVHZload <t> [o] {s} p mem)
  9630  	for {
  9631  		t := v.Type
  9632  		x := v_0
  9633  		if x.Op != OpS390XMOVHload {
  9634  			break
  9635  		}
  9636  		o := auxIntToInt32(x.AuxInt)
  9637  		s := auxToSym(x.Aux)
  9638  		mem := x.Args[1]
  9639  		p := x.Args[0]
  9640  		if !(x.Uses == 1 && clobber(x)) {
  9641  			break
  9642  		}
  9643  		b = x.Block
  9644  		v0 := b.NewValue0(x.Pos, OpS390XMOVHZload, t)
  9645  		v.copyOf(v0)
  9646  		v0.AuxInt = int32ToAuxInt(o)
  9647  		v0.Aux = symToAux(s)
  9648  		v0.AddArg2(p, mem)
  9649  		return true
  9650  	}
  9651  	// match: (MOVHZreg x:(Arg <t>))
  9652  	// cond: !t.IsSigned() && t.Size() <= 2
  9653  	// result: x
  9654  	for {
  9655  		x := v_0
  9656  		if x.Op != OpArg {
  9657  			break
  9658  		}
  9659  		t := x.Type
  9660  		if !(!t.IsSigned() && t.Size() <= 2) {
  9661  			break
  9662  		}
  9663  		v.copyOf(x)
  9664  		return true
  9665  	}
  9666  	// match: (MOVHZreg (MOVDconst [c]))
  9667  	// result: (MOVDconst [int64(uint16(c))])
  9668  	for {
  9669  		if v_0.Op != OpS390XMOVDconst {
  9670  			break
  9671  		}
  9672  		c := auxIntToInt64(v_0.AuxInt)
  9673  		v.reset(OpS390XMOVDconst)
  9674  		v.AuxInt = int64ToAuxInt(int64(uint16(c)))
  9675  		return true
  9676  	}
  9677  	// match: (MOVHZreg (RISBGZ x {r}))
  9678  	// cond: r.OutMerge(0x0000ffff) != nil
  9679  	// result: (RISBGZ x {*r.OutMerge(0x0000ffff)})
  9680  	for {
  9681  		if v_0.Op != OpS390XRISBGZ {
  9682  			break
  9683  		}
  9684  		r := auxToS390xRotateParams(v_0.Aux)
  9685  		x := v_0.Args[0]
  9686  		if !(r.OutMerge(0x0000ffff) != nil) {
  9687  			break
  9688  		}
  9689  		v.reset(OpS390XRISBGZ)
  9690  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0x0000ffff))
  9691  		v.AddArg(x)
  9692  		return true
  9693  	}
  9694  	// match: (MOVHZreg (ANDWconst [m] x))
  9695  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9696  	for {
  9697  		if v_0.Op != OpS390XANDWconst {
  9698  			break
  9699  		}
  9700  		m := auxIntToInt32(v_0.AuxInt)
  9701  		x := v_0.Args[0]
  9702  		v.reset(OpS390XMOVWZreg)
  9703  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9704  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9705  		v0.AddArg(x)
  9706  		v.AddArg(v0)
  9707  		return true
  9708  	}
  9709  	return false
  9710  }
  9711  func rewriteValueS390X_OpS390XMOVHload(v *Value) bool {
  9712  	v_1 := v.Args[1]
  9713  	v_0 := v.Args[0]
  9714  	// match: (MOVHload [off] {sym} ptr1 (MOVHstore [off] {sym} ptr2 x _))
  9715  	// cond: isSamePtr(ptr1, ptr2)
  9716  	// result: (MOVHreg x)
  9717  	for {
  9718  		off := auxIntToInt32(v.AuxInt)
  9719  		sym := auxToSym(v.Aux)
  9720  		ptr1 := v_0
  9721  		if v_1.Op != OpS390XMOVHstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
  9722  			break
  9723  		}
  9724  		x := v_1.Args[1]
  9725  		ptr2 := v_1.Args[0]
  9726  		if !(isSamePtr(ptr1, ptr2)) {
  9727  			break
  9728  		}
  9729  		v.reset(OpS390XMOVHreg)
  9730  		v.AddArg(x)
  9731  		return true
  9732  	}
  9733  	// match: (MOVHload [off1] {sym} (ADDconst [off2] ptr) mem)
  9734  	// cond: is20Bit(int64(off1)+int64(off2))
  9735  	// result: (MOVHload [off1+off2] {sym} ptr mem)
  9736  	for {
  9737  		off1 := auxIntToInt32(v.AuxInt)
  9738  		sym := auxToSym(v.Aux)
  9739  		if v_0.Op != OpS390XADDconst {
  9740  			break
  9741  		}
  9742  		off2 := auxIntToInt32(v_0.AuxInt)
  9743  		ptr := v_0.Args[0]
  9744  		mem := v_1
  9745  		if !(is20Bit(int64(off1) + int64(off2))) {
  9746  			break
  9747  		}
  9748  		v.reset(OpS390XMOVHload)
  9749  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9750  		v.Aux = symToAux(sym)
  9751  		v.AddArg2(ptr, mem)
  9752  		return true
  9753  	}
  9754  	// match: (MOVHload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
  9755  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
  9756  	// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  9757  	for {
  9758  		off1 := auxIntToInt32(v.AuxInt)
  9759  		sym1 := auxToSym(v.Aux)
  9760  		if v_0.Op != OpS390XMOVDaddr {
  9761  			break
  9762  		}
  9763  		t := v_0.Type
  9764  		off2 := auxIntToInt32(v_0.AuxInt)
  9765  		sym2 := auxToSym(v_0.Aux)
  9766  		base := v_0.Args[0]
  9767  		mem := v_1
  9768  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
  9769  			break
  9770  		}
  9771  		v.reset(OpS390XMOVHload)
  9772  		v.AuxInt = int32ToAuxInt(off1 + off2)
  9773  		v.Aux = symToAux(mergeSym(sym1, sym2))
  9774  		v.AddArg2(base, mem)
  9775  		return true
  9776  	}
  9777  	return false
  9778  }
  9779  func rewriteValueS390X_OpS390XMOVHreg(v *Value) bool {
  9780  	v_0 := v.Args[0]
  9781  	b := v.Block
  9782  	typ := &b.Func.Config.Types
  9783  	// match: (MOVHreg e:(MOVBreg x))
  9784  	// cond: clobberIfDead(e)
  9785  	// result: (MOVBreg x)
  9786  	for {
  9787  		e := v_0
  9788  		if e.Op != OpS390XMOVBreg {
  9789  			break
  9790  		}
  9791  		x := e.Args[0]
  9792  		if !(clobberIfDead(e)) {
  9793  			break
  9794  		}
  9795  		v.reset(OpS390XMOVBreg)
  9796  		v.AddArg(x)
  9797  		return true
  9798  	}
  9799  	// match: (MOVHreg e:(MOVHreg x))
  9800  	// cond: clobberIfDead(e)
  9801  	// result: (MOVHreg x)
  9802  	for {
  9803  		e := v_0
  9804  		if e.Op != OpS390XMOVHreg {
  9805  			break
  9806  		}
  9807  		x := e.Args[0]
  9808  		if !(clobberIfDead(e)) {
  9809  			break
  9810  		}
  9811  		v.reset(OpS390XMOVHreg)
  9812  		v.AddArg(x)
  9813  		return true
  9814  	}
  9815  	// match: (MOVHreg e:(MOVWreg x))
  9816  	// cond: clobberIfDead(e)
  9817  	// result: (MOVHreg x)
  9818  	for {
  9819  		e := v_0
  9820  		if e.Op != OpS390XMOVWreg {
  9821  			break
  9822  		}
  9823  		x := e.Args[0]
  9824  		if !(clobberIfDead(e)) {
  9825  			break
  9826  		}
  9827  		v.reset(OpS390XMOVHreg)
  9828  		v.AddArg(x)
  9829  		return true
  9830  	}
  9831  	// match: (MOVHreg e:(MOVHZreg x))
  9832  	// cond: clobberIfDead(e)
  9833  	// result: (MOVHreg x)
  9834  	for {
  9835  		e := v_0
  9836  		if e.Op != OpS390XMOVHZreg {
  9837  			break
  9838  		}
  9839  		x := e.Args[0]
  9840  		if !(clobberIfDead(e)) {
  9841  			break
  9842  		}
  9843  		v.reset(OpS390XMOVHreg)
  9844  		v.AddArg(x)
  9845  		return true
  9846  	}
  9847  	// match: (MOVHreg e:(MOVWZreg x))
  9848  	// cond: clobberIfDead(e)
  9849  	// result: (MOVHreg x)
  9850  	for {
  9851  		e := v_0
  9852  		if e.Op != OpS390XMOVWZreg {
  9853  			break
  9854  		}
  9855  		x := e.Args[0]
  9856  		if !(clobberIfDead(e)) {
  9857  			break
  9858  		}
  9859  		v.reset(OpS390XMOVHreg)
  9860  		v.AddArg(x)
  9861  		return true
  9862  	}
  9863  	// match: (MOVHreg x:(MOVBload _ _))
  9864  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9865  	// result: x
  9866  	for {
  9867  		x := v_0
  9868  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9869  			break
  9870  		}
  9871  		v.copyOf(x)
  9872  		return true
  9873  	}
  9874  	// match: (MOVHreg x:(MOVHload _ _))
  9875  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
  9876  	// result: x
  9877  	for {
  9878  		x := v_0
  9879  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
  9880  			break
  9881  		}
  9882  		v.copyOf(x)
  9883  		return true
  9884  	}
  9885  	// match: (MOVHreg x:(MOVBZload _ _))
  9886  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
  9887  	// result: x
  9888  	for {
  9889  		x := v_0
  9890  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
  9891  			break
  9892  		}
  9893  		v.copyOf(x)
  9894  		return true
  9895  	}
  9896  	// match: (MOVHreg <t> x:(MOVHZload [o] {s} p mem))
  9897  	// cond: x.Uses == 1 && clobber(x)
  9898  	// result: @x.Block (MOVHload <t> [o] {s} p mem)
  9899  	for {
  9900  		t := v.Type
  9901  		x := v_0
  9902  		if x.Op != OpS390XMOVHZload {
  9903  			break
  9904  		}
  9905  		o := auxIntToInt32(x.AuxInt)
  9906  		s := auxToSym(x.Aux)
  9907  		mem := x.Args[1]
  9908  		p := x.Args[0]
  9909  		if !(x.Uses == 1 && clobber(x)) {
  9910  			break
  9911  		}
  9912  		b = x.Block
  9913  		v0 := b.NewValue0(x.Pos, OpS390XMOVHload, t)
  9914  		v.copyOf(v0)
  9915  		v0.AuxInt = int32ToAuxInt(o)
  9916  		v0.Aux = symToAux(s)
  9917  		v0.AddArg2(p, mem)
  9918  		return true
  9919  	}
  9920  	// match: (MOVHreg x:(Arg <t>))
  9921  	// cond: t.IsSigned() && t.Size() <= 2
  9922  	// result: x
  9923  	for {
  9924  		x := v_0
  9925  		if x.Op != OpArg {
  9926  			break
  9927  		}
  9928  		t := x.Type
  9929  		if !(t.IsSigned() && t.Size() <= 2) {
  9930  			break
  9931  		}
  9932  		v.copyOf(x)
  9933  		return true
  9934  	}
  9935  	// match: (MOVHreg (MOVDconst [c]))
  9936  	// result: (MOVDconst [int64(int16(c))])
  9937  	for {
  9938  		if v_0.Op != OpS390XMOVDconst {
  9939  			break
  9940  		}
  9941  		c := auxIntToInt64(v_0.AuxInt)
  9942  		v.reset(OpS390XMOVDconst)
  9943  		v.AuxInt = int64ToAuxInt(int64(int16(c)))
  9944  		return true
  9945  	}
  9946  	// match: (MOVHreg (ANDWconst [m] x))
  9947  	// cond: int16(m) >= 0
  9948  	// result: (MOVWZreg (ANDWconst <typ.UInt32> [int32(uint16(m))] x))
  9949  	for {
  9950  		if v_0.Op != OpS390XANDWconst {
  9951  			break
  9952  		}
  9953  		m := auxIntToInt32(v_0.AuxInt)
  9954  		x := v_0.Args[0]
  9955  		if !(int16(m) >= 0) {
  9956  			break
  9957  		}
  9958  		v.reset(OpS390XMOVWZreg)
  9959  		v0 := b.NewValue0(v.Pos, OpS390XANDWconst, typ.UInt32)
  9960  		v0.AuxInt = int32ToAuxInt(int32(uint16(m)))
  9961  		v0.AddArg(x)
  9962  		v.AddArg(v0)
  9963  		return true
  9964  	}
  9965  	return false
  9966  }
  9967  func rewriteValueS390X_OpS390XMOVHstore(v *Value) bool {
  9968  	v_2 := v.Args[2]
  9969  	v_1 := v.Args[1]
  9970  	v_0 := v.Args[0]
  9971  	// match: (MOVHstore [off] {sym} ptr (MOVHreg x) mem)
  9972  	// result: (MOVHstore [off] {sym} ptr x mem)
  9973  	for {
  9974  		off := auxIntToInt32(v.AuxInt)
  9975  		sym := auxToSym(v.Aux)
  9976  		ptr := v_0
  9977  		if v_1.Op != OpS390XMOVHreg {
  9978  			break
  9979  		}
  9980  		x := v_1.Args[0]
  9981  		mem := v_2
  9982  		v.reset(OpS390XMOVHstore)
  9983  		v.AuxInt = int32ToAuxInt(off)
  9984  		v.Aux = symToAux(sym)
  9985  		v.AddArg3(ptr, x, mem)
  9986  		return true
  9987  	}
  9988  	// match: (MOVHstore [off] {sym} ptr (MOVHZreg x) mem)
  9989  	// result: (MOVHstore [off] {sym} ptr x mem)
  9990  	for {
  9991  		off := auxIntToInt32(v.AuxInt)
  9992  		sym := auxToSym(v.Aux)
  9993  		ptr := v_0
  9994  		if v_1.Op != OpS390XMOVHZreg {
  9995  			break
  9996  		}
  9997  		x := v_1.Args[0]
  9998  		mem := v_2
  9999  		v.reset(OpS390XMOVHstore)
 10000  		v.AuxInt = int32ToAuxInt(off)
 10001  		v.Aux = symToAux(sym)
 10002  		v.AddArg3(ptr, x, mem)
 10003  		return true
 10004  	}
 10005  	// match: (MOVHstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10006  	// cond: is20Bit(int64(off1)+int64(off2))
 10007  	// result: (MOVHstore [off1+off2] {sym} ptr val mem)
 10008  	for {
 10009  		off1 := auxIntToInt32(v.AuxInt)
 10010  		sym := auxToSym(v.Aux)
 10011  		if v_0.Op != OpS390XADDconst {
 10012  			break
 10013  		}
 10014  		off2 := auxIntToInt32(v_0.AuxInt)
 10015  		ptr := v_0.Args[0]
 10016  		val := v_1
 10017  		mem := v_2
 10018  		if !(is20Bit(int64(off1) + int64(off2))) {
 10019  			break
 10020  		}
 10021  		v.reset(OpS390XMOVHstore)
 10022  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10023  		v.Aux = symToAux(sym)
 10024  		v.AddArg3(ptr, val, mem)
 10025  		return true
 10026  	}
 10027  	// match: (MOVHstore [off] {sym} ptr (MOVDconst [c]) mem)
 10028  	// cond: isU12Bit(int64(off)) && ptr.Op != OpSB
 10029  	// result: (MOVHstoreconst [makeValAndOff32(int32(int16(c)),off)] {sym} ptr mem)
 10030  	for {
 10031  		off := auxIntToInt32(v.AuxInt)
 10032  		sym := auxToSym(v.Aux)
 10033  		ptr := v_0
 10034  		if v_1.Op != OpS390XMOVDconst {
 10035  			break
 10036  		}
 10037  		c := auxIntToInt64(v_1.AuxInt)
 10038  		mem := v_2
 10039  		if !(isU12Bit(int64(off)) && ptr.Op != OpSB) {
 10040  			break
 10041  		}
 10042  		v.reset(OpS390XMOVHstoreconst)
 10043  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(int16(c)), off))
 10044  		v.Aux = symToAux(sym)
 10045  		v.AddArg2(ptr, mem)
 10046  		return true
 10047  	}
 10048  	// match: (MOVHstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10049  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))
 10050  	// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
 10051  	for {
 10052  		off1 := auxIntToInt32(v.AuxInt)
 10053  		sym1 := auxToSym(v.Aux)
 10054  		if v_0.Op != OpS390XMOVDaddr {
 10055  			break
 10056  		}
 10057  		t := v_0.Type
 10058  		off2 := auxIntToInt32(v_0.AuxInt)
 10059  		sym2 := auxToSym(v_0.Aux)
 10060  		base := v_0.Args[0]
 10061  		val := v_1
 10062  		mem := v_2
 10063  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%2 == 0 && (off1+off2)%2 == 0))) {
 10064  			break
 10065  		}
 10066  		v.reset(OpS390XMOVHstore)
 10067  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10068  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10069  		v.AddArg3(base, val, mem)
 10070  		return true
 10071  	}
 10072  	// match: (MOVHstore [i] {s} p w x:(MOVHstore [i-2] {s} p (SRDconst [16] w) mem))
 10073  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10074  	// result: (MOVWstore [i-2] {s} p w mem)
 10075  	for {
 10076  		i := auxIntToInt32(v.AuxInt)
 10077  		s := auxToSym(v.Aux)
 10078  		p := v_0
 10079  		w := v_1
 10080  		x := v_2
 10081  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10082  			break
 10083  		}
 10084  		mem := x.Args[2]
 10085  		if p != x.Args[0] {
 10086  			break
 10087  		}
 10088  		x_1 := x.Args[1]
 10089  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != 16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10090  			break
 10091  		}
 10092  		v.reset(OpS390XMOVWstore)
 10093  		v.AuxInt = int32ToAuxInt(i - 2)
 10094  		v.Aux = symToAux(s)
 10095  		v.AddArg3(p, w, mem)
 10096  		return true
 10097  	}
 10098  	// match: (MOVHstore [i] {s} p w0:(SRDconst [j] w) x:(MOVHstore [i-2] {s} p (SRDconst [j+16] w) mem))
 10099  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10100  	// result: (MOVWstore [i-2] {s} p w0 mem)
 10101  	for {
 10102  		i := auxIntToInt32(v.AuxInt)
 10103  		s := auxToSym(v.Aux)
 10104  		p := v_0
 10105  		w0 := v_1
 10106  		if w0.Op != OpS390XSRDconst {
 10107  			break
 10108  		}
 10109  		j := auxIntToUint8(w0.AuxInt)
 10110  		w := w0.Args[0]
 10111  		x := v_2
 10112  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10113  			break
 10114  		}
 10115  		mem := x.Args[2]
 10116  		if p != x.Args[0] {
 10117  			break
 10118  		}
 10119  		x_1 := x.Args[1]
 10120  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != j+16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10121  			break
 10122  		}
 10123  		v.reset(OpS390XMOVWstore)
 10124  		v.AuxInt = int32ToAuxInt(i - 2)
 10125  		v.Aux = symToAux(s)
 10126  		v.AddArg3(p, w0, mem)
 10127  		return true
 10128  	}
 10129  	// match: (MOVHstore [i] {s} p w x:(MOVHstore [i-2] {s} p (SRWconst [16] w) mem))
 10130  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10131  	// result: (MOVWstore [i-2] {s} p w mem)
 10132  	for {
 10133  		i := auxIntToInt32(v.AuxInt)
 10134  		s := auxToSym(v.Aux)
 10135  		p := v_0
 10136  		w := v_1
 10137  		x := v_2
 10138  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10139  			break
 10140  		}
 10141  		mem := x.Args[2]
 10142  		if p != x.Args[0] {
 10143  			break
 10144  		}
 10145  		x_1 := x.Args[1]
 10146  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != 16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10147  			break
 10148  		}
 10149  		v.reset(OpS390XMOVWstore)
 10150  		v.AuxInt = int32ToAuxInt(i - 2)
 10151  		v.Aux = symToAux(s)
 10152  		v.AddArg3(p, w, mem)
 10153  		return true
 10154  	}
 10155  	// match: (MOVHstore [i] {s} p w0:(SRWconst [j] w) x:(MOVHstore [i-2] {s} p (SRWconst [j+16] w) mem))
 10156  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10157  	// result: (MOVWstore [i-2] {s} p w0 mem)
 10158  	for {
 10159  		i := auxIntToInt32(v.AuxInt)
 10160  		s := auxToSym(v.Aux)
 10161  		p := v_0
 10162  		w0 := v_1
 10163  		if w0.Op != OpS390XSRWconst {
 10164  			break
 10165  		}
 10166  		j := auxIntToUint8(w0.AuxInt)
 10167  		w := w0.Args[0]
 10168  		x := v_2
 10169  		if x.Op != OpS390XMOVHstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
 10170  			break
 10171  		}
 10172  		mem := x.Args[2]
 10173  		if p != x.Args[0] {
 10174  			break
 10175  		}
 10176  		x_1 := x.Args[1]
 10177  		if x_1.Op != OpS390XSRWconst || auxIntToUint8(x_1.AuxInt) != j+16 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10178  			break
 10179  		}
 10180  		v.reset(OpS390XMOVWstore)
 10181  		v.AuxInt = int32ToAuxInt(i - 2)
 10182  		v.Aux = symToAux(s)
 10183  		v.AddArg3(p, w0, mem)
 10184  		return true
 10185  	}
 10186  	return false
 10187  }
 10188  func rewriteValueS390X_OpS390XMOVHstoreconst(v *Value) bool {
 10189  	v_1 := v.Args[1]
 10190  	v_0 := v.Args[0]
 10191  	b := v.Block
 10192  	typ := &b.Func.Config.Types
 10193  	// match: (MOVHstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 10194  	// cond: isU12Bit(sc.Off()+int64(off))
 10195  	// result: (MOVHstoreconst [sc.addOffset32(off)] {s} ptr mem)
 10196  	for {
 10197  		sc := auxIntToValAndOff(v.AuxInt)
 10198  		s := auxToSym(v.Aux)
 10199  		if v_0.Op != OpS390XADDconst {
 10200  			break
 10201  		}
 10202  		off := auxIntToInt32(v_0.AuxInt)
 10203  		ptr := v_0.Args[0]
 10204  		mem := v_1
 10205  		if !(isU12Bit(sc.Off() + int64(off))) {
 10206  			break
 10207  		}
 10208  		v.reset(OpS390XMOVHstoreconst)
 10209  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10210  		v.Aux = symToAux(s)
 10211  		v.AddArg2(ptr, mem)
 10212  		return true
 10213  	}
 10214  	// match: (MOVHstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 10215  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 10216  	// result: (MOVHstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 10217  	for {
 10218  		sc := auxIntToValAndOff(v.AuxInt)
 10219  		sym1 := auxToSym(v.Aux)
 10220  		if v_0.Op != OpS390XMOVDaddr {
 10221  			break
 10222  		}
 10223  		off := auxIntToInt32(v_0.AuxInt)
 10224  		sym2 := auxToSym(v_0.Aux)
 10225  		ptr := v_0.Args[0]
 10226  		mem := v_1
 10227  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 10228  			break
 10229  		}
 10230  		v.reset(OpS390XMOVHstoreconst)
 10231  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 10232  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10233  		v.AddArg2(ptr, mem)
 10234  		return true
 10235  	}
 10236  	// match: (MOVHstoreconst [c] {s} p x:(MOVHstoreconst [a] {s} p mem))
 10237  	// cond: p.Op != OpSB && x.Uses == 1 && a.Off() + 2 == c.Off() && clobber(x)
 10238  	// result: (MOVWstore [a.Off32()] {s} p (MOVDconst [int64(c.Val32()&0xffff | a.Val32()<<16)]) mem)
 10239  	for {
 10240  		c := auxIntToValAndOff(v.AuxInt)
 10241  		s := auxToSym(v.Aux)
 10242  		p := v_0
 10243  		x := v_1
 10244  		if x.Op != OpS390XMOVHstoreconst {
 10245  			break
 10246  		}
 10247  		a := auxIntToValAndOff(x.AuxInt)
 10248  		if auxToSym(x.Aux) != s {
 10249  			break
 10250  		}
 10251  		mem := x.Args[1]
 10252  		if p != x.Args[0] || !(p.Op != OpSB && x.Uses == 1 && a.Off()+2 == c.Off() && clobber(x)) {
 10253  			break
 10254  		}
 10255  		v.reset(OpS390XMOVWstore)
 10256  		v.AuxInt = int32ToAuxInt(a.Off32())
 10257  		v.Aux = symToAux(s)
 10258  		v0 := b.NewValue0(x.Pos, OpS390XMOVDconst, typ.UInt64)
 10259  		v0.AuxInt = int64ToAuxInt(int64(c.Val32()&0xffff | a.Val32()<<16))
 10260  		v.AddArg3(p, v0, mem)
 10261  		return true
 10262  	}
 10263  	return false
 10264  }
 10265  func rewriteValueS390X_OpS390XMOVWBRstore(v *Value) bool {
 10266  	v_2 := v.Args[2]
 10267  	v_1 := v.Args[1]
 10268  	v_0 := v.Args[0]
 10269  	// match: (MOVWBRstore [i] {s} p (SRDconst [32] w) x:(MOVWBRstore [i-4] {s} p w mem))
 10270  	// cond: x.Uses == 1 && clobber(x)
 10271  	// result: (MOVDBRstore [i-4] {s} p w mem)
 10272  	for {
 10273  		i := auxIntToInt32(v.AuxInt)
 10274  		s := auxToSym(v.Aux)
 10275  		p := v_0
 10276  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 10277  			break
 10278  		}
 10279  		w := v_1.Args[0]
 10280  		x := v_2
 10281  		if x.Op != OpS390XMOVWBRstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10282  			break
 10283  		}
 10284  		mem := x.Args[2]
 10285  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
 10286  			break
 10287  		}
 10288  		v.reset(OpS390XMOVDBRstore)
 10289  		v.AuxInt = int32ToAuxInt(i - 4)
 10290  		v.Aux = symToAux(s)
 10291  		v.AddArg3(p, w, mem)
 10292  		return true
 10293  	}
 10294  	// match: (MOVWBRstore [i] {s} p (SRDconst [j] w) x:(MOVWBRstore [i-4] {s} p w0:(SRDconst [j-32] w) mem))
 10295  	// cond: x.Uses == 1 && clobber(x)
 10296  	// result: (MOVDBRstore [i-4] {s} p w0 mem)
 10297  	for {
 10298  		i := auxIntToInt32(v.AuxInt)
 10299  		s := auxToSym(v.Aux)
 10300  		p := v_0
 10301  		if v_1.Op != OpS390XSRDconst {
 10302  			break
 10303  		}
 10304  		j := auxIntToUint8(v_1.AuxInt)
 10305  		w := v_1.Args[0]
 10306  		x := v_2
 10307  		if x.Op != OpS390XMOVWBRstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10308  			break
 10309  		}
 10310  		mem := x.Args[2]
 10311  		if p != x.Args[0] {
 10312  			break
 10313  		}
 10314  		w0 := x.Args[1]
 10315  		if w0.Op != OpS390XSRDconst || auxIntToUint8(w0.AuxInt) != j-32 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
 10316  			break
 10317  		}
 10318  		v.reset(OpS390XMOVDBRstore)
 10319  		v.AuxInt = int32ToAuxInt(i - 4)
 10320  		v.Aux = symToAux(s)
 10321  		v.AddArg3(p, w0, mem)
 10322  		return true
 10323  	}
 10324  	return false
 10325  }
 10326  func rewriteValueS390X_OpS390XMOVWZload(v *Value) bool {
 10327  	v_1 := v.Args[1]
 10328  	v_0 := v.Args[0]
 10329  	// match: (MOVWZload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10330  	// cond: isSamePtr(ptr1, ptr2)
 10331  	// result: (MOVWZreg x)
 10332  	for {
 10333  		off := auxIntToInt32(v.AuxInt)
 10334  		sym := auxToSym(v.Aux)
 10335  		ptr1 := v_0
 10336  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10337  			break
 10338  		}
 10339  		x := v_1.Args[1]
 10340  		ptr2 := v_1.Args[0]
 10341  		if !(isSamePtr(ptr1, ptr2)) {
 10342  			break
 10343  		}
 10344  		v.reset(OpS390XMOVWZreg)
 10345  		v.AddArg(x)
 10346  		return true
 10347  	}
 10348  	// match: (MOVWZload [off1] {sym} (ADDconst [off2] ptr) mem)
 10349  	// cond: is20Bit(int64(off1)+int64(off2))
 10350  	// result: (MOVWZload [off1+off2] {sym} ptr mem)
 10351  	for {
 10352  		off1 := auxIntToInt32(v.AuxInt)
 10353  		sym := auxToSym(v.Aux)
 10354  		if v_0.Op != OpS390XADDconst {
 10355  			break
 10356  		}
 10357  		off2 := auxIntToInt32(v_0.AuxInt)
 10358  		ptr := v_0.Args[0]
 10359  		mem := v_1
 10360  		if !(is20Bit(int64(off1) + int64(off2))) {
 10361  			break
 10362  		}
 10363  		v.reset(OpS390XMOVWZload)
 10364  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10365  		v.Aux = symToAux(sym)
 10366  		v.AddArg2(ptr, mem)
 10367  		return true
 10368  	}
 10369  	// match: (MOVWZload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10370  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10371  	// result: (MOVWZload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10372  	for {
 10373  		off1 := auxIntToInt32(v.AuxInt)
 10374  		sym1 := auxToSym(v.Aux)
 10375  		if v_0.Op != OpS390XMOVDaddr {
 10376  			break
 10377  		}
 10378  		t := v_0.Type
 10379  		off2 := auxIntToInt32(v_0.AuxInt)
 10380  		sym2 := auxToSym(v_0.Aux)
 10381  		base := v_0.Args[0]
 10382  		mem := v_1
 10383  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10384  			break
 10385  		}
 10386  		v.reset(OpS390XMOVWZload)
 10387  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10388  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10389  		v.AddArg2(base, mem)
 10390  		return true
 10391  	}
 10392  	return false
 10393  }
 10394  func rewriteValueS390X_OpS390XMOVWZreg(v *Value) bool {
 10395  	v_0 := v.Args[0]
 10396  	b := v.Block
 10397  	// match: (MOVWZreg e:(MOVBZreg x))
 10398  	// cond: clobberIfDead(e)
 10399  	// result: (MOVBZreg x)
 10400  	for {
 10401  		e := v_0
 10402  		if e.Op != OpS390XMOVBZreg {
 10403  			break
 10404  		}
 10405  		x := e.Args[0]
 10406  		if !(clobberIfDead(e)) {
 10407  			break
 10408  		}
 10409  		v.reset(OpS390XMOVBZreg)
 10410  		v.AddArg(x)
 10411  		return true
 10412  	}
 10413  	// match: (MOVWZreg e:(MOVHZreg x))
 10414  	// cond: clobberIfDead(e)
 10415  	// result: (MOVHZreg x)
 10416  	for {
 10417  		e := v_0
 10418  		if e.Op != OpS390XMOVHZreg {
 10419  			break
 10420  		}
 10421  		x := e.Args[0]
 10422  		if !(clobberIfDead(e)) {
 10423  			break
 10424  		}
 10425  		v.reset(OpS390XMOVHZreg)
 10426  		v.AddArg(x)
 10427  		return true
 10428  	}
 10429  	// match: (MOVWZreg e:(MOVWreg x))
 10430  	// cond: clobberIfDead(e)
 10431  	// result: (MOVWZreg x)
 10432  	for {
 10433  		e := v_0
 10434  		if e.Op != OpS390XMOVWreg {
 10435  			break
 10436  		}
 10437  		x := e.Args[0]
 10438  		if !(clobberIfDead(e)) {
 10439  			break
 10440  		}
 10441  		v.reset(OpS390XMOVWZreg)
 10442  		v.AddArg(x)
 10443  		return true
 10444  	}
 10445  	// match: (MOVWZreg e:(MOVWZreg x))
 10446  	// cond: clobberIfDead(e)
 10447  	// result: (MOVWZreg x)
 10448  	for {
 10449  		e := v_0
 10450  		if e.Op != OpS390XMOVWZreg {
 10451  			break
 10452  		}
 10453  		x := e.Args[0]
 10454  		if !(clobberIfDead(e)) {
 10455  			break
 10456  		}
 10457  		v.reset(OpS390XMOVWZreg)
 10458  		v.AddArg(x)
 10459  		return true
 10460  	}
 10461  	// match: (MOVWZreg x:(MOVBZload _ _))
 10462  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10463  	// result: x
 10464  	for {
 10465  		x := v_0
 10466  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10467  			break
 10468  		}
 10469  		v.copyOf(x)
 10470  		return true
 10471  	}
 10472  	// match: (MOVWZreg x:(MOVHZload _ _))
 10473  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10474  	// result: x
 10475  	for {
 10476  		x := v_0
 10477  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10478  			break
 10479  		}
 10480  		v.copyOf(x)
 10481  		return true
 10482  	}
 10483  	// match: (MOVWZreg x:(MOVWZload _ _))
 10484  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 4)
 10485  	// result: x
 10486  	for {
 10487  		x := v_0
 10488  		if x.Op != OpS390XMOVWZload || !(!x.Type.IsSigned() || x.Type.Size() > 4) {
 10489  			break
 10490  		}
 10491  		v.copyOf(x)
 10492  		return true
 10493  	}
 10494  	// match: (MOVWZreg <t> x:(MOVWload [o] {s} p mem))
 10495  	// cond: x.Uses == 1 && clobber(x)
 10496  	// result: @x.Block (MOVWZload <t> [o] {s} p mem)
 10497  	for {
 10498  		t := v.Type
 10499  		x := v_0
 10500  		if x.Op != OpS390XMOVWload {
 10501  			break
 10502  		}
 10503  		o := auxIntToInt32(x.AuxInt)
 10504  		s := auxToSym(x.Aux)
 10505  		mem := x.Args[1]
 10506  		p := x.Args[0]
 10507  		if !(x.Uses == 1 && clobber(x)) {
 10508  			break
 10509  		}
 10510  		b = x.Block
 10511  		v0 := b.NewValue0(x.Pos, OpS390XMOVWZload, t)
 10512  		v.copyOf(v0)
 10513  		v0.AuxInt = int32ToAuxInt(o)
 10514  		v0.Aux = symToAux(s)
 10515  		v0.AddArg2(p, mem)
 10516  		return true
 10517  	}
 10518  	// match: (MOVWZreg x:(Arg <t>))
 10519  	// cond: !t.IsSigned() && t.Size() <= 4
 10520  	// result: x
 10521  	for {
 10522  		x := v_0
 10523  		if x.Op != OpArg {
 10524  			break
 10525  		}
 10526  		t := x.Type
 10527  		if !(!t.IsSigned() && t.Size() <= 4) {
 10528  			break
 10529  		}
 10530  		v.copyOf(x)
 10531  		return true
 10532  	}
 10533  	// match: (MOVWZreg (MOVDconst [c]))
 10534  	// result: (MOVDconst [int64(uint32(c))])
 10535  	for {
 10536  		if v_0.Op != OpS390XMOVDconst {
 10537  			break
 10538  		}
 10539  		c := auxIntToInt64(v_0.AuxInt)
 10540  		v.reset(OpS390XMOVDconst)
 10541  		v.AuxInt = int64ToAuxInt(int64(uint32(c)))
 10542  		return true
 10543  	}
 10544  	// match: (MOVWZreg (RISBGZ x {r}))
 10545  	// cond: r.OutMerge(0xffffffff) != nil
 10546  	// result: (RISBGZ x {*r.OutMerge(0xffffffff)})
 10547  	for {
 10548  		if v_0.Op != OpS390XRISBGZ {
 10549  			break
 10550  		}
 10551  		r := auxToS390xRotateParams(v_0.Aux)
 10552  		x := v_0.Args[0]
 10553  		if !(r.OutMerge(0xffffffff) != nil) {
 10554  			break
 10555  		}
 10556  		v.reset(OpS390XRISBGZ)
 10557  		v.Aux = s390xRotateParamsToAux(*r.OutMerge(0xffffffff))
 10558  		v.AddArg(x)
 10559  		return true
 10560  	}
 10561  	return false
 10562  }
 10563  func rewriteValueS390X_OpS390XMOVWload(v *Value) bool {
 10564  	v_1 := v.Args[1]
 10565  	v_0 := v.Args[0]
 10566  	// match: (MOVWload [off] {sym} ptr1 (MOVWstore [off] {sym} ptr2 x _))
 10567  	// cond: isSamePtr(ptr1, ptr2)
 10568  	// result: (MOVWreg x)
 10569  	for {
 10570  		off := auxIntToInt32(v.AuxInt)
 10571  		sym := auxToSym(v.Aux)
 10572  		ptr1 := v_0
 10573  		if v_1.Op != OpS390XMOVWstore || auxIntToInt32(v_1.AuxInt) != off || auxToSym(v_1.Aux) != sym {
 10574  			break
 10575  		}
 10576  		x := v_1.Args[1]
 10577  		ptr2 := v_1.Args[0]
 10578  		if !(isSamePtr(ptr1, ptr2)) {
 10579  			break
 10580  		}
 10581  		v.reset(OpS390XMOVWreg)
 10582  		v.AddArg(x)
 10583  		return true
 10584  	}
 10585  	// match: (MOVWload [off1] {sym} (ADDconst [off2] ptr) mem)
 10586  	// cond: is20Bit(int64(off1)+int64(off2))
 10587  	// result: (MOVWload [off1+off2] {sym} ptr mem)
 10588  	for {
 10589  		off1 := auxIntToInt32(v.AuxInt)
 10590  		sym := auxToSym(v.Aux)
 10591  		if v_0.Op != OpS390XADDconst {
 10592  			break
 10593  		}
 10594  		off2 := auxIntToInt32(v_0.AuxInt)
 10595  		ptr := v_0.Args[0]
 10596  		mem := v_1
 10597  		if !(is20Bit(int64(off1) + int64(off2))) {
 10598  			break
 10599  		}
 10600  		v.reset(OpS390XMOVWload)
 10601  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10602  		v.Aux = symToAux(sym)
 10603  		v.AddArg2(ptr, mem)
 10604  		return true
 10605  	}
 10606  	// match: (MOVWload [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem)
 10607  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10608  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
 10609  	for {
 10610  		off1 := auxIntToInt32(v.AuxInt)
 10611  		sym1 := auxToSym(v.Aux)
 10612  		if v_0.Op != OpS390XMOVDaddr {
 10613  			break
 10614  		}
 10615  		t := v_0.Type
 10616  		off2 := auxIntToInt32(v_0.AuxInt)
 10617  		sym2 := auxToSym(v_0.Aux)
 10618  		base := v_0.Args[0]
 10619  		mem := v_1
 10620  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10621  			break
 10622  		}
 10623  		v.reset(OpS390XMOVWload)
 10624  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10625  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10626  		v.AddArg2(base, mem)
 10627  		return true
 10628  	}
 10629  	return false
 10630  }
 10631  func rewriteValueS390X_OpS390XMOVWreg(v *Value) bool {
 10632  	v_0 := v.Args[0]
 10633  	b := v.Block
 10634  	// match: (MOVWreg e:(MOVBreg x))
 10635  	// cond: clobberIfDead(e)
 10636  	// result: (MOVBreg x)
 10637  	for {
 10638  		e := v_0
 10639  		if e.Op != OpS390XMOVBreg {
 10640  			break
 10641  		}
 10642  		x := e.Args[0]
 10643  		if !(clobberIfDead(e)) {
 10644  			break
 10645  		}
 10646  		v.reset(OpS390XMOVBreg)
 10647  		v.AddArg(x)
 10648  		return true
 10649  	}
 10650  	// match: (MOVWreg e:(MOVHreg x))
 10651  	// cond: clobberIfDead(e)
 10652  	// result: (MOVHreg x)
 10653  	for {
 10654  		e := v_0
 10655  		if e.Op != OpS390XMOVHreg {
 10656  			break
 10657  		}
 10658  		x := e.Args[0]
 10659  		if !(clobberIfDead(e)) {
 10660  			break
 10661  		}
 10662  		v.reset(OpS390XMOVHreg)
 10663  		v.AddArg(x)
 10664  		return true
 10665  	}
 10666  	// match: (MOVWreg e:(MOVWreg x))
 10667  	// cond: clobberIfDead(e)
 10668  	// result: (MOVWreg x)
 10669  	for {
 10670  		e := v_0
 10671  		if e.Op != OpS390XMOVWreg {
 10672  			break
 10673  		}
 10674  		x := e.Args[0]
 10675  		if !(clobberIfDead(e)) {
 10676  			break
 10677  		}
 10678  		v.reset(OpS390XMOVWreg)
 10679  		v.AddArg(x)
 10680  		return true
 10681  	}
 10682  	// match: (MOVWreg e:(MOVWZreg x))
 10683  	// cond: clobberIfDead(e)
 10684  	// result: (MOVWreg x)
 10685  	for {
 10686  		e := v_0
 10687  		if e.Op != OpS390XMOVWZreg {
 10688  			break
 10689  		}
 10690  		x := e.Args[0]
 10691  		if !(clobberIfDead(e)) {
 10692  			break
 10693  		}
 10694  		v.reset(OpS390XMOVWreg)
 10695  		v.AddArg(x)
 10696  		return true
 10697  	}
 10698  	// match: (MOVWreg x:(MOVBload _ _))
 10699  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10700  	// result: x
 10701  	for {
 10702  		x := v_0
 10703  		if x.Op != OpS390XMOVBload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10704  			break
 10705  		}
 10706  		v.copyOf(x)
 10707  		return true
 10708  	}
 10709  	// match: (MOVWreg x:(MOVHload _ _))
 10710  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10711  	// result: x
 10712  	for {
 10713  		x := v_0
 10714  		if x.Op != OpS390XMOVHload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10715  			break
 10716  		}
 10717  		v.copyOf(x)
 10718  		return true
 10719  	}
 10720  	// match: (MOVWreg x:(MOVWload _ _))
 10721  	// cond: (x.Type.IsSigned() || x.Type.Size() == 8)
 10722  	// result: x
 10723  	for {
 10724  		x := v_0
 10725  		if x.Op != OpS390XMOVWload || !(x.Type.IsSigned() || x.Type.Size() == 8) {
 10726  			break
 10727  		}
 10728  		v.copyOf(x)
 10729  		return true
 10730  	}
 10731  	// match: (MOVWreg x:(MOVBZload _ _))
 10732  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 1)
 10733  	// result: x
 10734  	for {
 10735  		x := v_0
 10736  		if x.Op != OpS390XMOVBZload || !(!x.Type.IsSigned() || x.Type.Size() > 1) {
 10737  			break
 10738  		}
 10739  		v.copyOf(x)
 10740  		return true
 10741  	}
 10742  	// match: (MOVWreg x:(MOVHZload _ _))
 10743  	// cond: (!x.Type.IsSigned() || x.Type.Size() > 2)
 10744  	// result: x
 10745  	for {
 10746  		x := v_0
 10747  		if x.Op != OpS390XMOVHZload || !(!x.Type.IsSigned() || x.Type.Size() > 2) {
 10748  			break
 10749  		}
 10750  		v.copyOf(x)
 10751  		return true
 10752  	}
 10753  	// match: (MOVWreg <t> x:(MOVWZload [o] {s} p mem))
 10754  	// cond: x.Uses == 1 && clobber(x)
 10755  	// result: @x.Block (MOVWload <t> [o] {s} p mem)
 10756  	for {
 10757  		t := v.Type
 10758  		x := v_0
 10759  		if x.Op != OpS390XMOVWZload {
 10760  			break
 10761  		}
 10762  		o := auxIntToInt32(x.AuxInt)
 10763  		s := auxToSym(x.Aux)
 10764  		mem := x.Args[1]
 10765  		p := x.Args[0]
 10766  		if !(x.Uses == 1 && clobber(x)) {
 10767  			break
 10768  		}
 10769  		b = x.Block
 10770  		v0 := b.NewValue0(x.Pos, OpS390XMOVWload, t)
 10771  		v.copyOf(v0)
 10772  		v0.AuxInt = int32ToAuxInt(o)
 10773  		v0.Aux = symToAux(s)
 10774  		v0.AddArg2(p, mem)
 10775  		return true
 10776  	}
 10777  	// match: (MOVWreg x:(Arg <t>))
 10778  	// cond: t.IsSigned() && t.Size() <= 4
 10779  	// result: x
 10780  	for {
 10781  		x := v_0
 10782  		if x.Op != OpArg {
 10783  			break
 10784  		}
 10785  		t := x.Type
 10786  		if !(t.IsSigned() && t.Size() <= 4) {
 10787  			break
 10788  		}
 10789  		v.copyOf(x)
 10790  		return true
 10791  	}
 10792  	// match: (MOVWreg (MOVDconst [c]))
 10793  	// result: (MOVDconst [int64(int32(c))])
 10794  	for {
 10795  		if v_0.Op != OpS390XMOVDconst {
 10796  			break
 10797  		}
 10798  		c := auxIntToInt64(v_0.AuxInt)
 10799  		v.reset(OpS390XMOVDconst)
 10800  		v.AuxInt = int64ToAuxInt(int64(int32(c)))
 10801  		return true
 10802  	}
 10803  	return false
 10804  }
 10805  func rewriteValueS390X_OpS390XMOVWstore(v *Value) bool {
 10806  	v_2 := v.Args[2]
 10807  	v_1 := v.Args[1]
 10808  	v_0 := v.Args[0]
 10809  	// match: (MOVWstore [off] {sym} ptr (MOVWreg x) mem)
 10810  	// result: (MOVWstore [off] {sym} ptr x mem)
 10811  	for {
 10812  		off := auxIntToInt32(v.AuxInt)
 10813  		sym := auxToSym(v.Aux)
 10814  		ptr := v_0
 10815  		if v_1.Op != OpS390XMOVWreg {
 10816  			break
 10817  		}
 10818  		x := v_1.Args[0]
 10819  		mem := v_2
 10820  		v.reset(OpS390XMOVWstore)
 10821  		v.AuxInt = int32ToAuxInt(off)
 10822  		v.Aux = symToAux(sym)
 10823  		v.AddArg3(ptr, x, mem)
 10824  		return true
 10825  	}
 10826  	// match: (MOVWstore [off] {sym} ptr (MOVWZreg x) mem)
 10827  	// result: (MOVWstore [off] {sym} ptr x mem)
 10828  	for {
 10829  		off := auxIntToInt32(v.AuxInt)
 10830  		sym := auxToSym(v.Aux)
 10831  		ptr := v_0
 10832  		if v_1.Op != OpS390XMOVWZreg {
 10833  			break
 10834  		}
 10835  		x := v_1.Args[0]
 10836  		mem := v_2
 10837  		v.reset(OpS390XMOVWstore)
 10838  		v.AuxInt = int32ToAuxInt(off)
 10839  		v.Aux = symToAux(sym)
 10840  		v.AddArg3(ptr, x, mem)
 10841  		return true
 10842  	}
 10843  	// match: (MOVWstore [off1] {sym} (ADDconst [off2] ptr) val mem)
 10844  	// cond: is20Bit(int64(off1)+int64(off2))
 10845  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
 10846  	for {
 10847  		off1 := auxIntToInt32(v.AuxInt)
 10848  		sym := auxToSym(v.Aux)
 10849  		if v_0.Op != OpS390XADDconst {
 10850  			break
 10851  		}
 10852  		off2 := auxIntToInt32(v_0.AuxInt)
 10853  		ptr := v_0.Args[0]
 10854  		val := v_1
 10855  		mem := v_2
 10856  		if !(is20Bit(int64(off1) + int64(off2))) {
 10857  			break
 10858  		}
 10859  		v.reset(OpS390XMOVWstore)
 10860  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10861  		v.Aux = symToAux(sym)
 10862  		v.AddArg3(ptr, val, mem)
 10863  		return true
 10864  	}
 10865  	// match: (MOVWstore [off] {sym} ptr (MOVDconst [c]) mem)
 10866  	// cond: is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB
 10867  	// result: (MOVWstoreconst [makeValAndOff32(int32(c),off)] {sym} ptr mem)
 10868  	for {
 10869  		off := auxIntToInt32(v.AuxInt)
 10870  		sym := auxToSym(v.Aux)
 10871  		ptr := v_0
 10872  		if v_1.Op != OpS390XMOVDconst {
 10873  			break
 10874  		}
 10875  		c := auxIntToInt64(v_1.AuxInt)
 10876  		mem := v_2
 10877  		if !(is16Bit(c) && isU12Bit(int64(off)) && ptr.Op != OpSB) {
 10878  			break
 10879  		}
 10880  		v.reset(OpS390XMOVWstoreconst)
 10881  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(c), off))
 10882  		v.Aux = symToAux(sym)
 10883  		v.AddArg2(ptr, mem)
 10884  		return true
 10885  	}
 10886  	// match: (MOVWstore [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) val mem)
 10887  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))
 10888  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
 10889  	for {
 10890  		off1 := auxIntToInt32(v.AuxInt)
 10891  		sym1 := auxToSym(v.Aux)
 10892  		if v_0.Op != OpS390XMOVDaddr {
 10893  			break
 10894  		}
 10895  		t := v_0.Type
 10896  		off2 := auxIntToInt32(v_0.AuxInt)
 10897  		sym2 := auxToSym(v_0.Aux)
 10898  		base := v_0.Args[0]
 10899  		val := v_1
 10900  		mem := v_2
 10901  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0))) {
 10902  			break
 10903  		}
 10904  		v.reset(OpS390XMOVWstore)
 10905  		v.AuxInt = int32ToAuxInt(off1 + off2)
 10906  		v.Aux = symToAux(mergeSym(sym1, sym2))
 10907  		v.AddArg3(base, val, mem)
 10908  		return true
 10909  	}
 10910  	// match: (MOVWstore [i] {s} p (SRDconst [32] w) x:(MOVWstore [i-4] {s} p w mem))
 10911  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10912  	// result: (MOVDstore [i-4] {s} p w mem)
 10913  	for {
 10914  		i := auxIntToInt32(v.AuxInt)
 10915  		s := auxToSym(v.Aux)
 10916  		p := v_0
 10917  		if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 32 {
 10918  			break
 10919  		}
 10920  		w := v_1.Args[0]
 10921  		x := v_2
 10922  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10923  			break
 10924  		}
 10925  		mem := x.Args[2]
 10926  		if p != x.Args[0] || w != x.Args[1] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10927  			break
 10928  		}
 10929  		v.reset(OpS390XMOVDstore)
 10930  		v.AuxInt = int32ToAuxInt(i - 4)
 10931  		v.Aux = symToAux(s)
 10932  		v.AddArg3(p, w, mem)
 10933  		return true
 10934  	}
 10935  	// match: (MOVWstore [i] {s} p w0:(SRDconst [j] w) x:(MOVWstore [i-4] {s} p (SRDconst [j+32] w) mem))
 10936  	// cond: p.Op != OpSB && x.Uses == 1 && clobber(x)
 10937  	// result: (MOVDstore [i-4] {s} p w0 mem)
 10938  	for {
 10939  		i := auxIntToInt32(v.AuxInt)
 10940  		s := auxToSym(v.Aux)
 10941  		p := v_0
 10942  		w0 := v_1
 10943  		if w0.Op != OpS390XSRDconst {
 10944  			break
 10945  		}
 10946  		j := auxIntToUint8(w0.AuxInt)
 10947  		w := w0.Args[0]
 10948  		x := v_2
 10949  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10950  			break
 10951  		}
 10952  		mem := x.Args[2]
 10953  		if p != x.Args[0] {
 10954  			break
 10955  		}
 10956  		x_1 := x.Args[1]
 10957  		if x_1.Op != OpS390XSRDconst || auxIntToUint8(x_1.AuxInt) != j+32 || w != x_1.Args[0] || !(p.Op != OpSB && x.Uses == 1 && clobber(x)) {
 10958  			break
 10959  		}
 10960  		v.reset(OpS390XMOVDstore)
 10961  		v.AuxInt = int32ToAuxInt(i - 4)
 10962  		v.Aux = symToAux(s)
 10963  		v.AddArg3(p, w0, mem)
 10964  		return true
 10965  	}
 10966  	// match: (MOVWstore [i] {s} p w1 x:(MOVWstore [i-4] {s} p w0 mem))
 10967  	// cond: p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && clobber(x)
 10968  	// result: (STM2 [i-4] {s} p w0 w1 mem)
 10969  	for {
 10970  		i := auxIntToInt32(v.AuxInt)
 10971  		s := auxToSym(v.Aux)
 10972  		p := v_0
 10973  		w1 := v_1
 10974  		x := v_2
 10975  		if x.Op != OpS390XMOVWstore || auxIntToInt32(x.AuxInt) != i-4 || auxToSym(x.Aux) != s {
 10976  			break
 10977  		}
 10978  		mem := x.Args[2]
 10979  		if p != x.Args[0] {
 10980  			break
 10981  		}
 10982  		w0 := x.Args[1]
 10983  		if !(p.Op != OpSB && x.Uses == 1 && is20Bit(int64(i)-4) && clobber(x)) {
 10984  			break
 10985  		}
 10986  		v.reset(OpS390XSTM2)
 10987  		v.AuxInt = int32ToAuxInt(i - 4)
 10988  		v.Aux = symToAux(s)
 10989  		v.AddArg4(p, w0, w1, mem)
 10990  		return true
 10991  	}
 10992  	// match: (MOVWstore [i] {s} p w2 x:(STM2 [i-8] {s} p w0 w1 mem))
 10993  	// cond: x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)
 10994  	// result: (STM3 [i-8] {s} p w0 w1 w2 mem)
 10995  	for {
 10996  		i := auxIntToInt32(v.AuxInt)
 10997  		s := auxToSym(v.Aux)
 10998  		p := v_0
 10999  		w2 := v_1
 11000  		x := v_2
 11001  		if x.Op != OpS390XSTM2 || auxIntToInt32(x.AuxInt) != i-8 || auxToSym(x.Aux) != s {
 11002  			break
 11003  		}
 11004  		mem := x.Args[3]
 11005  		if p != x.Args[0] {
 11006  			break
 11007  		}
 11008  		w0 := x.Args[1]
 11009  		w1 := x.Args[2]
 11010  		if !(x.Uses == 1 && is20Bit(int64(i)-8) && clobber(x)) {
 11011  			break
 11012  		}
 11013  		v.reset(OpS390XSTM3)
 11014  		v.AuxInt = int32ToAuxInt(i - 8)
 11015  		v.Aux = symToAux(s)
 11016  		v.AddArg5(p, w0, w1, w2, mem)
 11017  		return true
 11018  	}
 11019  	// match: (MOVWstore [i] {s} p w3 x:(STM3 [i-12] {s} p w0 w1 w2 mem))
 11020  	// cond: x.Uses == 1 && is20Bit(int64(i)-12) && clobber(x)
 11021  	// result: (STM4 [i-12] {s} p w0 w1 w2 w3 mem)
 11022  	for {
 11023  		i := auxIntToInt32(v.AuxInt)
 11024  		s := auxToSym(v.Aux)
 11025  		p := v_0
 11026  		w3 := v_1
 11027  		x := v_2
 11028  		if x.Op != OpS390XSTM3 || auxIntToInt32(x.AuxInt) != i-12 || auxToSym(x.Aux) != s {
 11029  			break
 11030  		}
 11031  		mem := x.Args[4]
 11032  		if p != x.Args[0] {
 11033  			break
 11034  		}
 11035  		w0 := x.Args[1]
 11036  		w1 := x.Args[2]
 11037  		w2 := x.Args[3]
 11038  		if !(x.Uses == 1 && is20Bit(int64(i)-12) && clobber(x)) {
 11039  			break
 11040  		}
 11041  		v.reset(OpS390XSTM4)
 11042  		v.AuxInt = int32ToAuxInt(i - 12)
 11043  		v.Aux = symToAux(s)
 11044  		v.AddArg6(p, w0, w1, w2, w3, mem)
 11045  		return true
 11046  	}
 11047  	return false
 11048  }
 11049  func rewriteValueS390X_OpS390XMOVWstoreconst(v *Value) bool {
 11050  	v_1 := v.Args[1]
 11051  	v_0 := v.Args[0]
 11052  	b := v.Block
 11053  	typ := &b.Func.Config.Types
 11054  	// match: (MOVWstoreconst [sc] {s} (ADDconst [off] ptr) mem)
 11055  	// cond: isU12Bit(sc.Off()+int64(off))
 11056  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
 11057  	for {
 11058  		sc := auxIntToValAndOff(v.AuxInt)
 11059  		s := auxToSym(v.Aux)
 11060  		if v_0.Op != OpS390XADDconst {
 11061  			break
 11062  		}
 11063  		off := auxIntToInt32(v_0.AuxInt)
 11064  		ptr := v_0.Args[0]
 11065  		mem := v_1
 11066  		if !(isU12Bit(sc.Off() + int64(off))) {
 11067  			break
 11068  		}
 11069  		v.reset(OpS390XMOVWstoreconst)
 11070  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 11071  		v.Aux = symToAux(s)
 11072  		v.AddArg2(ptr, mem)
 11073  		return true
 11074  	}
 11075  	// match: (MOVWstoreconst [sc] {sym1} (MOVDaddr [off] {sym2} ptr) mem)
 11076  	// cond: ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)
 11077  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
 11078  	for {
 11079  		sc := auxIntToValAndOff(v.AuxInt)
 11080  		sym1 := auxToSym(v.Aux)
 11081  		if v_0.Op != OpS390XMOVDaddr {
 11082  			break
 11083  		}
 11084  		off := auxIntToInt32(v_0.AuxInt)
 11085  		sym2 := auxToSym(v_0.Aux)
 11086  		ptr := v_0.Args[0]
 11087  		mem := v_1
 11088  		if !(ptr.Op != OpSB && canMergeSym(sym1, sym2) && sc.canAdd32(off)) {
 11089  			break
 11090  		}
 11091  		v.reset(OpS390XMOVWstoreconst)
 11092  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
 11093  		v.Aux = symToAux(mergeSym(sym1, sym2))
 11094  		v.AddArg2(ptr, mem)
 11095  		return true
 11096  	}
 11097  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
 11098  	// cond: p.Op != OpSB && x.Uses == 1 && a.Off() + 4 == c.Off() && clobber(x)
 11099  	// result: (MOVDstore [a.Off32()] {s} p (MOVDconst [c.Val()&0xffffffff | a.Val()<<32]) mem)
 11100  	for {
 11101  		c := auxIntToValAndOff(v.AuxInt)
 11102  		s := auxToSym(v.Aux)
 11103  		p := v_0
 11104  		x := v_1
 11105  		if x.Op != OpS390XMOVWstoreconst {
 11106  			break
 11107  		}
 11108  		a := auxIntToValAndOff(x.AuxInt)
 11109  		if auxToSym(x.Aux) != s {
 11110  			break
 11111  		}
 11112  		mem := x.Args[1]
 11113  		if p != x.Args[0] || !(p.Op != OpSB && x.Uses == 1 && a.Off()+4 == c.Off() && clobber(x)) {
 11114  			break
 11115  		}
 11116  		v.reset(OpS390XMOVDstore)
 11117  		v.AuxInt = int32ToAuxInt(a.Off32())
 11118  		v.Aux = symToAux(s)
 11119  		v0 := b.NewValue0(x.Pos, OpS390XMOVDconst, typ.UInt64)
 11120  		v0.AuxInt = int64ToAuxInt(c.Val()&0xffffffff | a.Val()<<32)
 11121  		v.AddArg3(p, v0, mem)
 11122  		return true
 11123  	}
 11124  	return false
 11125  }
 11126  func rewriteValueS390X_OpS390XMULLD(v *Value) bool {
 11127  	v_1 := v.Args[1]
 11128  	v_0 := v.Args[0]
 11129  	// match: (MULLD x (MOVDconst [c]))
 11130  	// cond: is32Bit(c)
 11131  	// result: (MULLDconst [int32(c)] x)
 11132  	for {
 11133  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11134  			x := v_0
 11135  			if v_1.Op != OpS390XMOVDconst {
 11136  				continue
 11137  			}
 11138  			c := auxIntToInt64(v_1.AuxInt)
 11139  			if !(is32Bit(c)) {
 11140  				continue
 11141  			}
 11142  			v.reset(OpS390XMULLDconst)
 11143  			v.AuxInt = int32ToAuxInt(int32(c))
 11144  			v.AddArg(x)
 11145  			return true
 11146  		}
 11147  		break
 11148  	}
 11149  	// match: (MULLD <t> x g:(MOVDload [off] {sym} ptr mem))
 11150  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11151  	// result: (MULLDload <t> [off] {sym} x ptr mem)
 11152  	for {
 11153  		t := v.Type
 11154  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11155  			x := v_0
 11156  			g := v_1
 11157  			if g.Op != OpS390XMOVDload {
 11158  				continue
 11159  			}
 11160  			off := auxIntToInt32(g.AuxInt)
 11161  			sym := auxToSym(g.Aux)
 11162  			mem := g.Args[1]
 11163  			ptr := g.Args[0]
 11164  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11165  				continue
 11166  			}
 11167  			v.reset(OpS390XMULLDload)
 11168  			v.Type = t
 11169  			v.AuxInt = int32ToAuxInt(off)
 11170  			v.Aux = symToAux(sym)
 11171  			v.AddArg3(x, ptr, mem)
 11172  			return true
 11173  		}
 11174  		break
 11175  	}
 11176  	return false
 11177  }
 11178  func rewriteValueS390X_OpS390XMULLDconst(v *Value) bool {
 11179  	v_0 := v.Args[0]
 11180  	b := v.Block
 11181  	// match: (MULLDconst <t> x [c])
 11182  	// cond: isPowerOfTwo32(c&(c-1))
 11183  	// result: (ADD (SLDconst <t> x [uint8(log32(c&(c-1)))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 11184  	for {
 11185  		t := v.Type
 11186  		c := auxIntToInt32(v.AuxInt)
 11187  		x := v_0
 11188  		if !(isPowerOfTwo32(c & (c - 1))) {
 11189  			break
 11190  		}
 11191  		v.reset(OpS390XADD)
 11192  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11193  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 11194  		v0.AddArg(x)
 11195  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11196  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11197  		v1.AddArg(x)
 11198  		v.AddArg2(v0, v1)
 11199  		return true
 11200  	}
 11201  	// match: (MULLDconst <t> x [c])
 11202  	// cond: isPowerOfTwo32(c+(c&^(c-1)))
 11203  	// result: (SUB (SLDconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLDconst <t> x [uint8(log32(c&^(c-1)))]))
 11204  	for {
 11205  		t := v.Type
 11206  		c := auxIntToInt32(v.AuxInt)
 11207  		x := v_0
 11208  		if !(isPowerOfTwo32(c + (c &^ (c - 1)))) {
 11209  			break
 11210  		}
 11211  		v.reset(OpS390XSUB)
 11212  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11213  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11214  		v0.AddArg(x)
 11215  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11216  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11217  		v1.AddArg(x)
 11218  		v.AddArg2(v0, v1)
 11219  		return true
 11220  	}
 11221  	// match: (MULLDconst <t> x [c])
 11222  	// cond: isPowerOfTwo32(-c+(-c&^(-c-1)))
 11223  	// result: (SUB (SLDconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLDconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11224  	for {
 11225  		t := v.Type
 11226  		c := auxIntToInt32(v.AuxInt)
 11227  		x := v_0
 11228  		if !(isPowerOfTwo32(-c + (-c &^ (-c - 1)))) {
 11229  			break
 11230  		}
 11231  		v.reset(OpS390XSUB)
 11232  		v0 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11233  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11234  		v0.AddArg(x)
 11235  		v1 := b.NewValue0(v.Pos, OpS390XSLDconst, t)
 11236  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11237  		v1.AddArg(x)
 11238  		v.AddArg2(v0, v1)
 11239  		return true
 11240  	}
 11241  	// match: (MULLDconst [c] (MOVDconst [d]))
 11242  	// result: (MOVDconst [int64(c)*d])
 11243  	for {
 11244  		c := auxIntToInt32(v.AuxInt)
 11245  		if v_0.Op != OpS390XMOVDconst {
 11246  			break
 11247  		}
 11248  		d := auxIntToInt64(v_0.AuxInt)
 11249  		v.reset(OpS390XMOVDconst)
 11250  		v.AuxInt = int64ToAuxInt(int64(c) * d)
 11251  		return true
 11252  	}
 11253  	return false
 11254  }
 11255  func rewriteValueS390X_OpS390XMULLDload(v *Value) bool {
 11256  	v_2 := v.Args[2]
 11257  	v_1 := v.Args[1]
 11258  	v_0 := v.Args[0]
 11259  	b := v.Block
 11260  	// match: (MULLDload <t> [off] {sym} x ptr1 (FMOVDstore [off] {sym} ptr2 y _))
 11261  	// cond: isSamePtr(ptr1, ptr2)
 11262  	// result: (MULLD x (LGDR <t> y))
 11263  	for {
 11264  		t := v.Type
 11265  		off := auxIntToInt32(v.AuxInt)
 11266  		sym := auxToSym(v.Aux)
 11267  		x := v_0
 11268  		ptr1 := v_1
 11269  		if v_2.Op != OpS390XFMOVDstore || auxIntToInt32(v_2.AuxInt) != off || auxToSym(v_2.Aux) != sym {
 11270  			break
 11271  		}
 11272  		y := v_2.Args[1]
 11273  		ptr2 := v_2.Args[0]
 11274  		if !(isSamePtr(ptr1, ptr2)) {
 11275  			break
 11276  		}
 11277  		v.reset(OpS390XMULLD)
 11278  		v0 := b.NewValue0(v_2.Pos, OpS390XLGDR, t)
 11279  		v0.AddArg(y)
 11280  		v.AddArg2(x, v0)
 11281  		return true
 11282  	}
 11283  	// match: (MULLDload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11284  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11285  	// result: (MULLDload [off1+off2] {sym} x ptr mem)
 11286  	for {
 11287  		off1 := auxIntToInt32(v.AuxInt)
 11288  		sym := auxToSym(v.Aux)
 11289  		x := v_0
 11290  		if v_1.Op != OpS390XADDconst {
 11291  			break
 11292  		}
 11293  		off2 := auxIntToInt32(v_1.AuxInt)
 11294  		ptr := v_1.Args[0]
 11295  		mem := v_2
 11296  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11297  			break
 11298  		}
 11299  		v.reset(OpS390XMULLDload)
 11300  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11301  		v.Aux = symToAux(sym)
 11302  		v.AddArg3(x, ptr, mem)
 11303  		return true
 11304  	}
 11305  	// match: (MULLDload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11306  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11307  	// result: (MULLDload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11308  	for {
 11309  		o1 := auxIntToInt32(v.AuxInt)
 11310  		s1 := auxToSym(v.Aux)
 11311  		x := v_0
 11312  		if v_1.Op != OpS390XMOVDaddr {
 11313  			break
 11314  		}
 11315  		o2 := auxIntToInt32(v_1.AuxInt)
 11316  		s2 := auxToSym(v_1.Aux)
 11317  		ptr := v_1.Args[0]
 11318  		mem := v_2
 11319  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11320  			break
 11321  		}
 11322  		v.reset(OpS390XMULLDload)
 11323  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11324  		v.Aux = symToAux(mergeSym(s1, s2))
 11325  		v.AddArg3(x, ptr, mem)
 11326  		return true
 11327  	}
 11328  	return false
 11329  }
 11330  func rewriteValueS390X_OpS390XMULLW(v *Value) bool {
 11331  	v_1 := v.Args[1]
 11332  	v_0 := v.Args[0]
 11333  	// match: (MULLW x (MOVDconst [c]))
 11334  	// result: (MULLWconst [int32(c)] x)
 11335  	for {
 11336  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11337  			x := v_0
 11338  			if v_1.Op != OpS390XMOVDconst {
 11339  				continue
 11340  			}
 11341  			c := auxIntToInt64(v_1.AuxInt)
 11342  			v.reset(OpS390XMULLWconst)
 11343  			v.AuxInt = int32ToAuxInt(int32(c))
 11344  			v.AddArg(x)
 11345  			return true
 11346  		}
 11347  		break
 11348  	}
 11349  	// match: (MULLW <t> x g:(MOVWload [off] {sym} ptr mem))
 11350  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11351  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11352  	for {
 11353  		t := v.Type
 11354  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11355  			x := v_0
 11356  			g := v_1
 11357  			if g.Op != OpS390XMOVWload {
 11358  				continue
 11359  			}
 11360  			off := auxIntToInt32(g.AuxInt)
 11361  			sym := auxToSym(g.Aux)
 11362  			mem := g.Args[1]
 11363  			ptr := g.Args[0]
 11364  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11365  				continue
 11366  			}
 11367  			v.reset(OpS390XMULLWload)
 11368  			v.Type = t
 11369  			v.AuxInt = int32ToAuxInt(off)
 11370  			v.Aux = symToAux(sym)
 11371  			v.AddArg3(x, ptr, mem)
 11372  			return true
 11373  		}
 11374  		break
 11375  	}
 11376  	// match: (MULLW <t> x g:(MOVWZload [off] {sym} ptr mem))
 11377  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11378  	// result: (MULLWload <t> [off] {sym} x ptr mem)
 11379  	for {
 11380  		t := v.Type
 11381  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11382  			x := v_0
 11383  			g := v_1
 11384  			if g.Op != OpS390XMOVWZload {
 11385  				continue
 11386  			}
 11387  			off := auxIntToInt32(g.AuxInt)
 11388  			sym := auxToSym(g.Aux)
 11389  			mem := g.Args[1]
 11390  			ptr := g.Args[0]
 11391  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11392  				continue
 11393  			}
 11394  			v.reset(OpS390XMULLWload)
 11395  			v.Type = t
 11396  			v.AuxInt = int32ToAuxInt(off)
 11397  			v.Aux = symToAux(sym)
 11398  			v.AddArg3(x, ptr, mem)
 11399  			return true
 11400  		}
 11401  		break
 11402  	}
 11403  	return false
 11404  }
 11405  func rewriteValueS390X_OpS390XMULLWconst(v *Value) bool {
 11406  	v_0 := v.Args[0]
 11407  	b := v.Block
 11408  	// match: (MULLWconst <t> x [c])
 11409  	// cond: isPowerOfTwo32(c&(c-1))
 11410  	// result: (ADDW (SLWconst <t> x [uint8(log32(c&(c-1)))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11411  	for {
 11412  		t := v.Type
 11413  		c := auxIntToInt32(v.AuxInt)
 11414  		x := v_0
 11415  		if !(isPowerOfTwo32(c & (c - 1))) {
 11416  			break
 11417  		}
 11418  		v.reset(OpS390XADDW)
 11419  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11420  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c & (c - 1))))
 11421  		v0.AddArg(x)
 11422  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11423  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11424  		v1.AddArg(x)
 11425  		v.AddArg2(v0, v1)
 11426  		return true
 11427  	}
 11428  	// match: (MULLWconst <t> x [c])
 11429  	// cond: isPowerOfTwo32(c+(c&^(c-1)))
 11430  	// result: (SUBW (SLWconst <t> x [uint8(log32(c+(c&^(c-1))))]) (SLWconst <t> x [uint8(log32(c&^(c-1)))]))
 11431  	for {
 11432  		t := v.Type
 11433  		c := auxIntToInt32(v.AuxInt)
 11434  		x := v_0
 11435  		if !(isPowerOfTwo32(c + (c &^ (c - 1)))) {
 11436  			break
 11437  		}
 11438  		v.reset(OpS390XSUBW)
 11439  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11440  		v0.AuxInt = uint8ToAuxInt(uint8(log32(c + (c &^ (c - 1)))))
 11441  		v0.AddArg(x)
 11442  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11443  		v1.AuxInt = uint8ToAuxInt(uint8(log32(c &^ (c - 1))))
 11444  		v1.AddArg(x)
 11445  		v.AddArg2(v0, v1)
 11446  		return true
 11447  	}
 11448  	// match: (MULLWconst <t> x [c])
 11449  	// cond: isPowerOfTwo32(-c+(-c&^(-c-1)))
 11450  	// result: (SUBW (SLWconst <t> x [uint8(log32(-c&^(-c-1)))]) (SLWconst <t> x [uint8(log32(-c+(-c&^(-c-1))))]))
 11451  	for {
 11452  		t := v.Type
 11453  		c := auxIntToInt32(v.AuxInt)
 11454  		x := v_0
 11455  		if !(isPowerOfTwo32(-c + (-c &^ (-c - 1)))) {
 11456  			break
 11457  		}
 11458  		v.reset(OpS390XSUBW)
 11459  		v0 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11460  		v0.AuxInt = uint8ToAuxInt(uint8(log32(-c &^ (-c - 1))))
 11461  		v0.AddArg(x)
 11462  		v1 := b.NewValue0(v.Pos, OpS390XSLWconst, t)
 11463  		v1.AuxInt = uint8ToAuxInt(uint8(log32(-c + (-c &^ (-c - 1)))))
 11464  		v1.AddArg(x)
 11465  		v.AddArg2(v0, v1)
 11466  		return true
 11467  	}
 11468  	// match: (MULLWconst [c] (MOVDconst [d]))
 11469  	// result: (MOVDconst [int64(c*int32(d))])
 11470  	for {
 11471  		c := auxIntToInt32(v.AuxInt)
 11472  		if v_0.Op != OpS390XMOVDconst {
 11473  			break
 11474  		}
 11475  		d := auxIntToInt64(v_0.AuxInt)
 11476  		v.reset(OpS390XMOVDconst)
 11477  		v.AuxInt = int64ToAuxInt(int64(c * int32(d)))
 11478  		return true
 11479  	}
 11480  	return false
 11481  }
 11482  func rewriteValueS390X_OpS390XMULLWload(v *Value) bool {
 11483  	v_2 := v.Args[2]
 11484  	v_1 := v.Args[1]
 11485  	v_0 := v.Args[0]
 11486  	// match: (MULLWload [off1] {sym} x (ADDconst [off2] ptr) mem)
 11487  	// cond: ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))
 11488  	// result: (MULLWload [off1+off2] {sym} x ptr mem)
 11489  	for {
 11490  		off1 := auxIntToInt32(v.AuxInt)
 11491  		sym := auxToSym(v.Aux)
 11492  		x := v_0
 11493  		if v_1.Op != OpS390XADDconst {
 11494  			break
 11495  		}
 11496  		off2 := auxIntToInt32(v_1.AuxInt)
 11497  		ptr := v_1.Args[0]
 11498  		mem := v_2
 11499  		if !(ptr.Op != OpSB && is20Bit(int64(off1)+int64(off2))) {
 11500  			break
 11501  		}
 11502  		v.reset(OpS390XMULLWload)
 11503  		v.AuxInt = int32ToAuxInt(off1 + off2)
 11504  		v.Aux = symToAux(sym)
 11505  		v.AddArg3(x, ptr, mem)
 11506  		return true
 11507  	}
 11508  	// match: (MULLWload [o1] {s1} x (MOVDaddr [o2] {s2} ptr) mem)
 11509  	// cond: ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)
 11510  	// result: (MULLWload [o1+o2] {mergeSym(s1, s2)} x ptr mem)
 11511  	for {
 11512  		o1 := auxIntToInt32(v.AuxInt)
 11513  		s1 := auxToSym(v.Aux)
 11514  		x := v_0
 11515  		if v_1.Op != OpS390XMOVDaddr {
 11516  			break
 11517  		}
 11518  		o2 := auxIntToInt32(v_1.AuxInt)
 11519  		s2 := auxToSym(v_1.Aux)
 11520  		ptr := v_1.Args[0]
 11521  		mem := v_2
 11522  		if !(ptr.Op != OpSB && is20Bit(int64(o1)+int64(o2)) && canMergeSym(s1, s2)) {
 11523  			break
 11524  		}
 11525  		v.reset(OpS390XMULLWload)
 11526  		v.AuxInt = int32ToAuxInt(o1 + o2)
 11527  		v.Aux = symToAux(mergeSym(s1, s2))
 11528  		v.AddArg3(x, ptr, mem)
 11529  		return true
 11530  	}
 11531  	return false
 11532  }
 11533  func rewriteValueS390X_OpS390XNEG(v *Value) bool {
 11534  	v_0 := v.Args[0]
 11535  	// match: (NEG (MOVDconst [c]))
 11536  	// result: (MOVDconst [-c])
 11537  	for {
 11538  		if v_0.Op != OpS390XMOVDconst {
 11539  			break
 11540  		}
 11541  		c := auxIntToInt64(v_0.AuxInt)
 11542  		v.reset(OpS390XMOVDconst)
 11543  		v.AuxInt = int64ToAuxInt(-c)
 11544  		return true
 11545  	}
 11546  	// match: (NEG (ADDconst [c] (NEG x)))
 11547  	// cond: c != -(1<<31)
 11548  	// result: (ADDconst [-c] x)
 11549  	for {
 11550  		if v_0.Op != OpS390XADDconst {
 11551  			break
 11552  		}
 11553  		c := auxIntToInt32(v_0.AuxInt)
 11554  		v_0_0 := v_0.Args[0]
 11555  		if v_0_0.Op != OpS390XNEG {
 11556  			break
 11557  		}
 11558  		x := v_0_0.Args[0]
 11559  		if !(c != -(1 << 31)) {
 11560  			break
 11561  		}
 11562  		v.reset(OpS390XADDconst)
 11563  		v.AuxInt = int32ToAuxInt(-c)
 11564  		v.AddArg(x)
 11565  		return true
 11566  	}
 11567  	return false
 11568  }
 11569  func rewriteValueS390X_OpS390XNEGW(v *Value) bool {
 11570  	v_0 := v.Args[0]
 11571  	// match: (NEGW (MOVDconst [c]))
 11572  	// result: (MOVDconst [int64(int32(-c))])
 11573  	for {
 11574  		if v_0.Op != OpS390XMOVDconst {
 11575  			break
 11576  		}
 11577  		c := auxIntToInt64(v_0.AuxInt)
 11578  		v.reset(OpS390XMOVDconst)
 11579  		v.AuxInt = int64ToAuxInt(int64(int32(-c)))
 11580  		return true
 11581  	}
 11582  	return false
 11583  }
 11584  func rewriteValueS390X_OpS390XNOT(v *Value) bool {
 11585  	v_0 := v.Args[0]
 11586  	b := v.Block
 11587  	typ := &b.Func.Config.Types
 11588  	// match: (NOT x)
 11589  	// result: (XOR (MOVDconst [-1]) x)
 11590  	for {
 11591  		x := v_0
 11592  		v.reset(OpS390XXOR)
 11593  		v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64)
 11594  		v0.AuxInt = int64ToAuxInt(-1)
 11595  		v.AddArg2(v0, x)
 11596  		return true
 11597  	}
 11598  }
 11599  func rewriteValueS390X_OpS390XNOTW(v *Value) bool {
 11600  	v_0 := v.Args[0]
 11601  	// match: (NOTW x)
 11602  	// result: (XORWconst [-1] x)
 11603  	for {
 11604  		x := v_0
 11605  		v.reset(OpS390XXORWconst)
 11606  		v.AuxInt = int32ToAuxInt(-1)
 11607  		v.AddArg(x)
 11608  		return true
 11609  	}
 11610  }
 11611  func rewriteValueS390X_OpS390XOR(v *Value) bool {
 11612  	v_1 := v.Args[1]
 11613  	v_0 := v.Args[0]
 11614  	b := v.Block
 11615  	typ := &b.Func.Config.Types
 11616  	// match: (OR x (MOVDconst [c]))
 11617  	// cond: isU32Bit(c)
 11618  	// result: (ORconst [c] x)
 11619  	for {
 11620  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11621  			x := v_0
 11622  			if v_1.Op != OpS390XMOVDconst {
 11623  				continue
 11624  			}
 11625  			c := auxIntToInt64(v_1.AuxInt)
 11626  			if !(isU32Bit(c)) {
 11627  				continue
 11628  			}
 11629  			v.reset(OpS390XORconst)
 11630  			v.AuxInt = int64ToAuxInt(c)
 11631  			v.AddArg(x)
 11632  			return true
 11633  		}
 11634  		break
 11635  	}
 11636  	// match: (OR (SLDconst x [c]) (SRDconst x [64-c]))
 11637  	// result: (RISBGZ x {s390x.NewRotateParams(0, 63, c)})
 11638  	for {
 11639  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11640  			if v_0.Op != OpS390XSLDconst {
 11641  				continue
 11642  			}
 11643  			c := auxIntToUint8(v_0.AuxInt)
 11644  			x := v_0.Args[0]
 11645  			if v_1.Op != OpS390XSRDconst || auxIntToUint8(v_1.AuxInt) != 64-c || x != v_1.Args[0] {
 11646  				continue
 11647  			}
 11648  			v.reset(OpS390XRISBGZ)
 11649  			v.Aux = s390xRotateParamsToAux(s390x.NewRotateParams(0, 63, c))
 11650  			v.AddArg(x)
 11651  			return true
 11652  		}
 11653  		break
 11654  	}
 11655  	// match: (OR (MOVDconst [-1<<63]) (LGDR <t> x))
 11656  	// result: (LGDR <t> (LNDFR <x.Type> x))
 11657  	for {
 11658  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11659  			if v_0.Op != OpS390XMOVDconst || auxIntToInt64(v_0.AuxInt) != -1<<63 || v_1.Op != OpS390XLGDR {
 11660  				continue
 11661  			}
 11662  			t := v_1.Type
 11663  			x := v_1.Args[0]
 11664  			v.reset(OpS390XLGDR)
 11665  			v.Type = t
 11666  			v0 := b.NewValue0(v.Pos, OpS390XLNDFR, x.Type)
 11667  			v0.AddArg(x)
 11668  			v.AddArg(v0)
 11669  			return true
 11670  		}
 11671  		break
 11672  	}
 11673  	// match: (OR (RISBGZ (LGDR x) {r}) (LGDR (LPDFR <t> y)))
 11674  	// cond: r == s390x.NewRotateParams(0, 0, 0)
 11675  	// result: (LGDR (CPSDR <t> y x))
 11676  	for {
 11677  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11678  			if v_0.Op != OpS390XRISBGZ {
 11679  				continue
 11680  			}
 11681  			r := auxToS390xRotateParams(v_0.Aux)
 11682  			v_0_0 := v_0.Args[0]
 11683  			if v_0_0.Op != OpS390XLGDR {
 11684  				continue
 11685  			}
 11686  			x := v_0_0.Args[0]
 11687  			if v_1.Op != OpS390XLGDR {
 11688  				continue
 11689  			}
 11690  			v_1_0 := v_1.Args[0]
 11691  			if v_1_0.Op != OpS390XLPDFR {
 11692  				continue
 11693  			}
 11694  			t := v_1_0.Type
 11695  			y := v_1_0.Args[0]
 11696  			if !(r == s390x.NewRotateParams(0, 0, 0)) {
 11697  				continue
 11698  			}
 11699  			v.reset(OpS390XLGDR)
 11700  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, t)
 11701  			v0.AddArg2(y, x)
 11702  			v.AddArg(v0)
 11703  			return true
 11704  		}
 11705  		break
 11706  	}
 11707  	// match: (OR (RISBGZ (LGDR x) {r}) (MOVDconst [c]))
 11708  	// cond: c >= 0 && r == s390x.NewRotateParams(0, 0, 0)
 11709  	// result: (LGDR (CPSDR <x.Type> (FMOVDconst <x.Type> [math.Float64frombits(uint64(c))]) x))
 11710  	for {
 11711  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11712  			if v_0.Op != OpS390XRISBGZ {
 11713  				continue
 11714  			}
 11715  			r := auxToS390xRotateParams(v_0.Aux)
 11716  			v_0_0 := v_0.Args[0]
 11717  			if v_0_0.Op != OpS390XLGDR {
 11718  				continue
 11719  			}
 11720  			x := v_0_0.Args[0]
 11721  			if v_1.Op != OpS390XMOVDconst {
 11722  				continue
 11723  			}
 11724  			c := auxIntToInt64(v_1.AuxInt)
 11725  			if !(c >= 0 && r == s390x.NewRotateParams(0, 0, 0)) {
 11726  				continue
 11727  			}
 11728  			v.reset(OpS390XLGDR)
 11729  			v0 := b.NewValue0(v.Pos, OpS390XCPSDR, x.Type)
 11730  			v1 := b.NewValue0(v.Pos, OpS390XFMOVDconst, x.Type)
 11731  			v1.AuxInt = float64ToAuxInt(math.Float64frombits(uint64(c)))
 11732  			v0.AddArg2(v1, x)
 11733  			v.AddArg(v0)
 11734  			return true
 11735  		}
 11736  		break
 11737  	}
 11738  	// match: (OR (MOVDconst [c]) (MOVDconst [d]))
 11739  	// result: (MOVDconst [c|d])
 11740  	for {
 11741  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11742  			if v_0.Op != OpS390XMOVDconst {
 11743  				continue
 11744  			}
 11745  			c := auxIntToInt64(v_0.AuxInt)
 11746  			if v_1.Op != OpS390XMOVDconst {
 11747  				continue
 11748  			}
 11749  			d := auxIntToInt64(v_1.AuxInt)
 11750  			v.reset(OpS390XMOVDconst)
 11751  			v.AuxInt = int64ToAuxInt(c | d)
 11752  			return true
 11753  		}
 11754  		break
 11755  	}
 11756  	// match: (OR x x)
 11757  	// result: x
 11758  	for {
 11759  		x := v_0
 11760  		if x != v_1 {
 11761  			break
 11762  		}
 11763  		v.copyOf(x)
 11764  		return true
 11765  	}
 11766  	// match: (OR <t> x g:(MOVDload [off] {sym} ptr mem))
 11767  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 11768  	// result: (ORload <t> [off] {sym} x ptr mem)
 11769  	for {
 11770  		t := v.Type
 11771  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11772  			x := v_0
 11773  			g := v_1
 11774  			if g.Op != OpS390XMOVDload {
 11775  				continue
 11776  			}
 11777  			off := auxIntToInt32(g.AuxInt)
 11778  			sym := auxToSym(g.Aux)
 11779  			mem := g.Args[1]
 11780  			ptr := g.Args[0]
 11781  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 11782  				continue
 11783  			}
 11784  			v.reset(OpS390XORload)
 11785  			v.Type = t
 11786  			v.AuxInt = int32ToAuxInt(off)
 11787  			v.Aux = symToAux(sym)
 11788  			v.AddArg3(x, ptr, mem)
 11789  			return true
 11790  		}
 11791  		break
 11792  	}
 11793  	// match: (OR x1:(MOVBZload [i1] {s} p mem) sh:(SLDconst [8] x0:(MOVBZload [i0] {s} p mem)))
 11794  	// 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)
 11795  	// result: @mergePoint(b,x0,x1) (MOVHZload [i0] {s} p mem)
 11796  	for {
 11797  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11798  			x1 := v_0
 11799  			if x1.Op != OpS390XMOVBZload {
 11800  				continue
 11801  			}
 11802  			i1 := auxIntToInt32(x1.AuxInt)
 11803  			s := auxToSym(x1.Aux)
 11804  			mem := x1.Args[1]
 11805  			p := x1.Args[0]
 11806  			sh := v_1
 11807  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 8 {
 11808  				continue
 11809  			}
 11810  			x0 := sh.Args[0]
 11811  			if x0.Op != OpS390XMOVBZload {
 11812  				continue
 11813  			}
 11814  			i0 := auxIntToInt32(x0.AuxInt)
 11815  			if auxToSym(x0.Aux) != s {
 11816  				continue
 11817  			}
 11818  			_ = x0.Args[1]
 11819  			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)) {
 11820  				continue
 11821  			}
 11822  			b = mergePoint(b, x0, x1)
 11823  			v0 := b.NewValue0(x0.Pos, OpS390XMOVHZload, typ.UInt16)
 11824  			v.copyOf(v0)
 11825  			v0.AuxInt = int32ToAuxInt(i0)
 11826  			v0.Aux = symToAux(s)
 11827  			v0.AddArg2(p, mem)
 11828  			return true
 11829  		}
 11830  		break
 11831  	}
 11832  	// match: (OR x1:(MOVHZload [i1] {s} p mem) sh:(SLDconst [16] x0:(MOVHZload [i0] {s} p mem)))
 11833  	// 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)
 11834  	// result: @mergePoint(b,x0,x1) (MOVWZload [i0] {s} p mem)
 11835  	for {
 11836  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11837  			x1 := v_0
 11838  			if x1.Op != OpS390XMOVHZload {
 11839  				continue
 11840  			}
 11841  			i1 := auxIntToInt32(x1.AuxInt)
 11842  			s := auxToSym(x1.Aux)
 11843  			mem := x1.Args[1]
 11844  			p := x1.Args[0]
 11845  			sh := v_1
 11846  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 16 {
 11847  				continue
 11848  			}
 11849  			x0 := sh.Args[0]
 11850  			if x0.Op != OpS390XMOVHZload {
 11851  				continue
 11852  			}
 11853  			i0 := auxIntToInt32(x0.AuxInt)
 11854  			if auxToSym(x0.Aux) != s {
 11855  				continue
 11856  			}
 11857  			_ = x0.Args[1]
 11858  			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)) {
 11859  				continue
 11860  			}
 11861  			b = mergePoint(b, x0, x1)
 11862  			v0 := b.NewValue0(x0.Pos, OpS390XMOVWZload, typ.UInt32)
 11863  			v.copyOf(v0)
 11864  			v0.AuxInt = int32ToAuxInt(i0)
 11865  			v0.Aux = symToAux(s)
 11866  			v0.AddArg2(p, mem)
 11867  			return true
 11868  		}
 11869  		break
 11870  	}
 11871  	// match: (OR x1:(MOVWZload [i1] {s} p mem) sh:(SLDconst [32] x0:(MOVWZload [i0] {s} p mem)))
 11872  	// 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)
 11873  	// result: @mergePoint(b,x0,x1) (MOVDload [i0] {s} p mem)
 11874  	for {
 11875  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11876  			x1 := v_0
 11877  			if x1.Op != OpS390XMOVWZload {
 11878  				continue
 11879  			}
 11880  			i1 := auxIntToInt32(x1.AuxInt)
 11881  			s := auxToSym(x1.Aux)
 11882  			mem := x1.Args[1]
 11883  			p := x1.Args[0]
 11884  			sh := v_1
 11885  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 32 {
 11886  				continue
 11887  			}
 11888  			x0 := sh.Args[0]
 11889  			if x0.Op != OpS390XMOVWZload {
 11890  				continue
 11891  			}
 11892  			i0 := auxIntToInt32(x0.AuxInt)
 11893  			if auxToSym(x0.Aux) != s {
 11894  				continue
 11895  			}
 11896  			_ = x0.Args[1]
 11897  			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)) {
 11898  				continue
 11899  			}
 11900  			b = mergePoint(b, x0, x1)
 11901  			v0 := b.NewValue0(x0.Pos, OpS390XMOVDload, typ.UInt64)
 11902  			v.copyOf(v0)
 11903  			v0.AuxInt = int32ToAuxInt(i0)
 11904  			v0.Aux = symToAux(s)
 11905  			v0.AddArg2(p, mem)
 11906  			return true
 11907  		}
 11908  		break
 11909  	}
 11910  	// match: (OR s0:(SLDconst [j0] x0:(MOVBZload [i0] {s} p mem)) or:(OR s1:(SLDconst [j1] x1:(MOVBZload [i1] {s} p mem)) y))
 11911  	// 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)
 11912  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j1] (MOVHZload [i0] {s} p mem)) y)
 11913  	for {
 11914  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11915  			s0 := v_0
 11916  			if s0.Op != OpS390XSLDconst {
 11917  				continue
 11918  			}
 11919  			j0 := auxIntToUint8(s0.AuxInt)
 11920  			x0 := s0.Args[0]
 11921  			if x0.Op != OpS390XMOVBZload {
 11922  				continue
 11923  			}
 11924  			i0 := auxIntToInt32(x0.AuxInt)
 11925  			s := auxToSym(x0.Aux)
 11926  			mem := x0.Args[1]
 11927  			p := x0.Args[0]
 11928  			or := v_1
 11929  			if or.Op != OpS390XOR {
 11930  				continue
 11931  			}
 11932  			_ = or.Args[1]
 11933  			or_0 := or.Args[0]
 11934  			or_1 := or.Args[1]
 11935  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 11936  				s1 := or_0
 11937  				if s1.Op != OpS390XSLDconst {
 11938  					continue
 11939  				}
 11940  				j1 := auxIntToUint8(s1.AuxInt)
 11941  				x1 := s1.Args[0]
 11942  				if x1.Op != OpS390XMOVBZload {
 11943  					continue
 11944  				}
 11945  				i1 := auxIntToInt32(x1.AuxInt)
 11946  				if auxToSym(x1.Aux) != s {
 11947  					continue
 11948  				}
 11949  				_ = x1.Args[1]
 11950  				if p != x1.Args[0] || mem != x1.Args[1] {
 11951  					continue
 11952  				}
 11953  				y := or_1
 11954  				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)) {
 11955  					continue
 11956  				}
 11957  				b = mergePoint(b, x0, x1, y)
 11958  				v0 := b.NewValue0(x1.Pos, OpS390XOR, v.Type)
 11959  				v.copyOf(v0)
 11960  				v1 := b.NewValue0(x1.Pos, OpS390XSLDconst, v.Type)
 11961  				v1.AuxInt = uint8ToAuxInt(j1)
 11962  				v2 := b.NewValue0(x1.Pos, OpS390XMOVHZload, typ.UInt16)
 11963  				v2.AuxInt = int32ToAuxInt(i0)
 11964  				v2.Aux = symToAux(s)
 11965  				v2.AddArg2(p, mem)
 11966  				v1.AddArg(v2)
 11967  				v0.AddArg2(v1, y)
 11968  				return true
 11969  			}
 11970  		}
 11971  		break
 11972  	}
 11973  	// match: (OR s0:(SLDconst [j0] x0:(MOVHZload [i0] {s} p mem)) or:(OR s1:(SLDconst [j1] x1:(MOVHZload [i1] {s} p mem)) y))
 11974  	// 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)
 11975  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j1] (MOVWZload [i0] {s} p mem)) y)
 11976  	for {
 11977  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 11978  			s0 := v_0
 11979  			if s0.Op != OpS390XSLDconst {
 11980  				continue
 11981  			}
 11982  			j0 := auxIntToUint8(s0.AuxInt)
 11983  			x0 := s0.Args[0]
 11984  			if x0.Op != OpS390XMOVHZload {
 11985  				continue
 11986  			}
 11987  			i0 := auxIntToInt32(x0.AuxInt)
 11988  			s := auxToSym(x0.Aux)
 11989  			mem := x0.Args[1]
 11990  			p := x0.Args[0]
 11991  			or := v_1
 11992  			if or.Op != OpS390XOR {
 11993  				continue
 11994  			}
 11995  			_ = or.Args[1]
 11996  			or_0 := or.Args[0]
 11997  			or_1 := or.Args[1]
 11998  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 11999  				s1 := or_0
 12000  				if s1.Op != OpS390XSLDconst {
 12001  					continue
 12002  				}
 12003  				j1 := auxIntToUint8(s1.AuxInt)
 12004  				x1 := s1.Args[0]
 12005  				if x1.Op != OpS390XMOVHZload {
 12006  					continue
 12007  				}
 12008  				i1 := auxIntToInt32(x1.AuxInt)
 12009  				if auxToSym(x1.Aux) != s {
 12010  					continue
 12011  				}
 12012  				_ = x1.Args[1]
 12013  				if p != x1.Args[0] || mem != x1.Args[1] {
 12014  					continue
 12015  				}
 12016  				y := or_1
 12017  				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)) {
 12018  					continue
 12019  				}
 12020  				b = mergePoint(b, x0, x1, y)
 12021  				v0 := b.NewValue0(x1.Pos, OpS390XOR, v.Type)
 12022  				v.copyOf(v0)
 12023  				v1 := b.NewValue0(x1.Pos, OpS390XSLDconst, v.Type)
 12024  				v1.AuxInt = uint8ToAuxInt(j1)
 12025  				v2 := b.NewValue0(x1.Pos, OpS390XMOVWZload, typ.UInt32)
 12026  				v2.AuxInt = int32ToAuxInt(i0)
 12027  				v2.Aux = symToAux(s)
 12028  				v2.AddArg2(p, mem)
 12029  				v1.AddArg(v2)
 12030  				v0.AddArg2(v1, y)
 12031  				return true
 12032  			}
 12033  		}
 12034  		break
 12035  	}
 12036  	// match: (OR x0:(MOVBZload [i0] {s} p mem) sh:(SLDconst [8] x1:(MOVBZload [i1] {s} p mem)))
 12037  	// 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)
 12038  	// result: @mergePoint(b,x0,x1) (MOVHZreg (MOVHBRload [i0] {s} p mem))
 12039  	for {
 12040  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12041  			x0 := v_0
 12042  			if x0.Op != OpS390XMOVBZload {
 12043  				continue
 12044  			}
 12045  			i0 := auxIntToInt32(x0.AuxInt)
 12046  			s := auxToSym(x0.Aux)
 12047  			mem := x0.Args[1]
 12048  			p := x0.Args[0]
 12049  			sh := v_1
 12050  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 8 {
 12051  				continue
 12052  			}
 12053  			x1 := sh.Args[0]
 12054  			if x1.Op != OpS390XMOVBZload {
 12055  				continue
 12056  			}
 12057  			i1 := auxIntToInt32(x1.AuxInt)
 12058  			if auxToSym(x1.Aux) != s {
 12059  				continue
 12060  			}
 12061  			_ = x1.Args[1]
 12062  			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)) {
 12063  				continue
 12064  			}
 12065  			b = mergePoint(b, x0, x1)
 12066  			v0 := b.NewValue0(x1.Pos, OpS390XMOVHZreg, typ.UInt64)
 12067  			v.copyOf(v0)
 12068  			v1 := b.NewValue0(x1.Pos, OpS390XMOVHBRload, typ.UInt16)
 12069  			v1.AuxInt = int32ToAuxInt(i0)
 12070  			v1.Aux = symToAux(s)
 12071  			v1.AddArg2(p, mem)
 12072  			v0.AddArg(v1)
 12073  			return true
 12074  		}
 12075  		break
 12076  	}
 12077  	// match: (OR r0:(MOVHZreg x0:(MOVHBRload [i0] {s} p mem)) sh:(SLDconst [16] r1:(MOVHZreg x1:(MOVHBRload [i1] {s} p mem))))
 12078  	// 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)
 12079  	// result: @mergePoint(b,x0,x1) (MOVWZreg (MOVWBRload [i0] {s} p mem))
 12080  	for {
 12081  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12082  			r0 := v_0
 12083  			if r0.Op != OpS390XMOVHZreg {
 12084  				continue
 12085  			}
 12086  			x0 := r0.Args[0]
 12087  			if x0.Op != OpS390XMOVHBRload {
 12088  				continue
 12089  			}
 12090  			i0 := auxIntToInt32(x0.AuxInt)
 12091  			s := auxToSym(x0.Aux)
 12092  			mem := x0.Args[1]
 12093  			p := x0.Args[0]
 12094  			sh := v_1
 12095  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 16 {
 12096  				continue
 12097  			}
 12098  			r1 := sh.Args[0]
 12099  			if r1.Op != OpS390XMOVHZreg {
 12100  				continue
 12101  			}
 12102  			x1 := r1.Args[0]
 12103  			if x1.Op != OpS390XMOVHBRload {
 12104  				continue
 12105  			}
 12106  			i1 := auxIntToInt32(x1.AuxInt)
 12107  			if auxToSym(x1.Aux) != s {
 12108  				continue
 12109  			}
 12110  			_ = x1.Args[1]
 12111  			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)) {
 12112  				continue
 12113  			}
 12114  			b = mergePoint(b, x0, x1)
 12115  			v0 := b.NewValue0(x1.Pos, OpS390XMOVWZreg, typ.UInt64)
 12116  			v.copyOf(v0)
 12117  			v1 := b.NewValue0(x1.Pos, OpS390XMOVWBRload, typ.UInt32)
 12118  			v1.AuxInt = int32ToAuxInt(i0)
 12119  			v1.Aux = symToAux(s)
 12120  			v1.AddArg2(p, mem)
 12121  			v0.AddArg(v1)
 12122  			return true
 12123  		}
 12124  		break
 12125  	}
 12126  	// match: (OR r0:(MOVWZreg x0:(MOVWBRload [i0] {s} p mem)) sh:(SLDconst [32] r1:(MOVWZreg x1:(MOVWBRload [i1] {s} p mem))))
 12127  	// 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)
 12128  	// result: @mergePoint(b,x0,x1) (MOVDBRload [i0] {s} p mem)
 12129  	for {
 12130  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12131  			r0 := v_0
 12132  			if r0.Op != OpS390XMOVWZreg {
 12133  				continue
 12134  			}
 12135  			x0 := r0.Args[0]
 12136  			if x0.Op != OpS390XMOVWBRload {
 12137  				continue
 12138  			}
 12139  			i0 := auxIntToInt32(x0.AuxInt)
 12140  			s := auxToSym(x0.Aux)
 12141  			mem := x0.Args[1]
 12142  			p := x0.Args[0]
 12143  			sh := v_1
 12144  			if sh.Op != OpS390XSLDconst || auxIntToUint8(sh.AuxInt) != 32 {
 12145  				continue
 12146  			}
 12147  			r1 := sh.Args[0]
 12148  			if r1.Op != OpS390XMOVWZreg {
 12149  				continue
 12150  			}
 12151  			x1 := r1.Args[0]
 12152  			if x1.Op != OpS390XMOVWBRload {
 12153  				continue
 12154  			}
 12155  			i1 := auxIntToInt32(x1.AuxInt)
 12156  			if auxToSym(x1.Aux) != s {
 12157  				continue
 12158  			}
 12159  			_ = x1.Args[1]
 12160  			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)) {
 12161  				continue
 12162  			}
 12163  			b = mergePoint(b, x0, x1)
 12164  			v0 := b.NewValue0(x1.Pos, OpS390XMOVDBRload, typ.UInt64)
 12165  			v.copyOf(v0)
 12166  			v0.AuxInt = int32ToAuxInt(i0)
 12167  			v0.Aux = symToAux(s)
 12168  			v0.AddArg2(p, mem)
 12169  			return true
 12170  		}
 12171  		break
 12172  	}
 12173  	// match: (OR s1:(SLDconst [j1] x1:(MOVBZload [i1] {s} p mem)) or:(OR s0:(SLDconst [j0] x0:(MOVBZload [i0] {s} p mem)) y))
 12174  	// 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)
 12175  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j0] (MOVHZreg (MOVHBRload [i0] {s} p mem))) y)
 12176  	for {
 12177  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12178  			s1 := v_0
 12179  			if s1.Op != OpS390XSLDconst {
 12180  				continue
 12181  			}
 12182  			j1 := auxIntToUint8(s1.AuxInt)
 12183  			x1 := s1.Args[0]
 12184  			if x1.Op != OpS390XMOVBZload {
 12185  				continue
 12186  			}
 12187  			i1 := auxIntToInt32(x1.AuxInt)
 12188  			s := auxToSym(x1.Aux)
 12189  			mem := x1.Args[1]
 12190  			p := x1.Args[0]
 12191  			or := v_1
 12192  			if or.Op != OpS390XOR {
 12193  				continue
 12194  			}
 12195  			_ = or.Args[1]
 12196  			or_0 := or.Args[0]
 12197  			or_1 := or.Args[1]
 12198  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12199  				s0 := or_0
 12200  				if s0.Op != OpS390XSLDconst {
 12201  					continue
 12202  				}
 12203  				j0 := auxIntToUint8(s0.AuxInt)
 12204  				x0 := s0.Args[0]
 12205  				if x0.Op != OpS390XMOVBZload {
 12206  					continue
 12207  				}
 12208  				i0 := auxIntToInt32(x0.AuxInt)
 12209  				if auxToSym(x0.Aux) != s {
 12210  					continue
 12211  				}
 12212  				_ = x0.Args[1]
 12213  				if p != x0.Args[0] || mem != x0.Args[1] {
 12214  					continue
 12215  				}
 12216  				y := or_1
 12217  				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)) {
 12218  					continue
 12219  				}
 12220  				b = mergePoint(b, x0, x1, y)
 12221  				v0 := b.NewValue0(x0.Pos, OpS390XOR, v.Type)
 12222  				v.copyOf(v0)
 12223  				v1 := b.NewValue0(x0.Pos, OpS390XSLDconst, v.Type)
 12224  				v1.AuxInt = uint8ToAuxInt(j0)
 12225  				v2 := b.NewValue0(x0.Pos, OpS390XMOVHZreg, typ.UInt64)
 12226  				v3 := b.NewValue0(x0.Pos, OpS390XMOVHBRload, typ.UInt16)
 12227  				v3.AuxInt = int32ToAuxInt(i0)
 12228  				v3.Aux = symToAux(s)
 12229  				v3.AddArg2(p, mem)
 12230  				v2.AddArg(v3)
 12231  				v1.AddArg(v2)
 12232  				v0.AddArg2(v1, y)
 12233  				return true
 12234  			}
 12235  		}
 12236  		break
 12237  	}
 12238  	// 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))
 12239  	// 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)
 12240  	// result: @mergePoint(b,x0,x1,y) (OR <v.Type> (SLDconst <v.Type> [j0] (MOVWZreg (MOVWBRload [i0] {s} p mem))) y)
 12241  	for {
 12242  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12243  			s1 := v_0
 12244  			if s1.Op != OpS390XSLDconst {
 12245  				continue
 12246  			}
 12247  			j1 := auxIntToUint8(s1.AuxInt)
 12248  			r1 := s1.Args[0]
 12249  			if r1.Op != OpS390XMOVHZreg {
 12250  				continue
 12251  			}
 12252  			x1 := r1.Args[0]
 12253  			if x1.Op != OpS390XMOVHBRload {
 12254  				continue
 12255  			}
 12256  			i1 := auxIntToInt32(x1.AuxInt)
 12257  			s := auxToSym(x1.Aux)
 12258  			mem := x1.Args[1]
 12259  			p := x1.Args[0]
 12260  			or := v_1
 12261  			if or.Op != OpS390XOR {
 12262  				continue
 12263  			}
 12264  			_ = or.Args[1]
 12265  			or_0 := or.Args[0]
 12266  			or_1 := or.Args[1]
 12267  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12268  				s0 := or_0
 12269  				if s0.Op != OpS390XSLDconst {
 12270  					continue
 12271  				}
 12272  				j0 := auxIntToUint8(s0.AuxInt)
 12273  				r0 := s0.Args[0]
 12274  				if r0.Op != OpS390XMOVHZreg {
 12275  					continue
 12276  				}
 12277  				x0 := r0.Args[0]
 12278  				if x0.Op != OpS390XMOVHBRload {
 12279  					continue
 12280  				}
 12281  				i0 := auxIntToInt32(x0.AuxInt)
 12282  				if auxToSym(x0.Aux) != s {
 12283  					continue
 12284  				}
 12285  				_ = x0.Args[1]
 12286  				if p != x0.Args[0] || mem != x0.Args[1] {
 12287  					continue
 12288  				}
 12289  				y := or_1
 12290  				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)) {
 12291  					continue
 12292  				}
 12293  				b = mergePoint(b, x0, x1, y)
 12294  				v0 := b.NewValue0(x0.Pos, OpS390XOR, v.Type)
 12295  				v.copyOf(v0)
 12296  				v1 := b.NewValue0(x0.Pos, OpS390XSLDconst, v.Type)
 12297  				v1.AuxInt = uint8ToAuxInt(j0)
 12298  				v2 := b.NewValue0(x0.Pos, OpS390XMOVWZreg, typ.UInt64)
 12299  				v3 := b.NewValue0(x0.Pos, OpS390XMOVWBRload, typ.UInt32)
 12300  				v3.AuxInt = int32ToAuxInt(i0)
 12301  				v3.Aux = symToAux(s)
 12302  				v3.AddArg2(p, mem)
 12303  				v2.AddArg(v3)
 12304  				v1.AddArg(v2)
 12305  				v0.AddArg2(v1, y)
 12306  				return true
 12307  			}
 12308  		}
 12309  		break
 12310  	}
 12311  	return false
 12312  }
 12313  func rewriteValueS390X_OpS390XORW(v *Value) bool {
 12314  	v_1 := v.Args[1]
 12315  	v_0 := v.Args[0]
 12316  	b := v.Block
 12317  	typ := &b.Func.Config.Types
 12318  	// match: (ORW x (MOVDconst [c]))
 12319  	// result: (ORWconst [int32(c)] x)
 12320  	for {
 12321  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12322  			x := v_0
 12323  			if v_1.Op != OpS390XMOVDconst {
 12324  				continue
 12325  			}
 12326  			c := auxIntToInt64(v_1.AuxInt)
 12327  			v.reset(OpS390XORWconst)
 12328  			v.AuxInt = int32ToAuxInt(int32(c))
 12329  			v.AddArg(x)
 12330  			return true
 12331  		}
 12332  		break
 12333  	}
 12334  	// match: (ORW (SLWconst x [c]) (SRWconst x [32-c]))
 12335  	// result: (RLLconst x [c])
 12336  	for {
 12337  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12338  			if v_0.Op != OpS390XSLWconst {
 12339  				continue
 12340  			}
 12341  			c := auxIntToUint8(v_0.AuxInt)
 12342  			x := v_0.Args[0]
 12343  			if v_1.Op != OpS390XSRWconst || auxIntToUint8(v_1.AuxInt) != 32-c || x != v_1.Args[0] {
 12344  				continue
 12345  			}
 12346  			v.reset(OpS390XRLLconst)
 12347  			v.AuxInt = uint8ToAuxInt(c)
 12348  			v.AddArg(x)
 12349  			return true
 12350  		}
 12351  		break
 12352  	}
 12353  	// match: (ORW x x)
 12354  	// result: x
 12355  	for {
 12356  		x := v_0
 12357  		if x != v_1 {
 12358  			break
 12359  		}
 12360  		v.copyOf(x)
 12361  		return true
 12362  	}
 12363  	// match: (ORW <t> x g:(MOVWload [off] {sym} ptr mem))
 12364  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 12365  	// result: (ORWload <t> [off] {sym} x ptr mem)
 12366  	for {
 12367  		t := v.Type
 12368  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12369  			x := v_0
 12370  			g := v_1
 12371  			if g.Op != OpS390XMOVWload {
 12372  				continue
 12373  			}
 12374  			off := auxIntToInt32(g.AuxInt)
 12375  			sym := auxToSym(g.Aux)
 12376  			mem := g.Args[1]
 12377  			ptr := g.Args[0]
 12378  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 12379  				continue
 12380  			}
 12381  			v.reset(OpS390XORWload)
 12382  			v.Type = t
 12383  			v.AuxInt = int32ToAuxInt(off)
 12384  			v.Aux = symToAux(sym)
 12385  			v.AddArg3(x, ptr, mem)
 12386  			return true
 12387  		}
 12388  		break
 12389  	}
 12390  	// match: (ORW <t> x g:(MOVWZload [off] {sym} ptr mem))
 12391  	// cond: ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)
 12392  	// result: (ORWload <t> [off] {sym} x ptr mem)
 12393  	for {
 12394  		t := v.Type
 12395  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12396  			x := v_0
 12397  			g := v_1
 12398  			if g.Op != OpS390XMOVWZload {
 12399  				continue
 12400  			}
 12401  			off := auxIntToInt32(g.AuxInt)
 12402  			sym := auxToSym(g.Aux)
 12403  			mem := g.Args[1]
 12404  			ptr := g.Args[0]
 12405  			if !(ptr.Op != OpSB && is20Bit(int64(off)) && canMergeLoadClobber(v, g, x) && clobber(g)) {
 12406  				continue
 12407  			}
 12408  			v.reset(OpS390XORWload)
 12409  			v.Type = t
 12410  			v.AuxInt = int32ToAuxInt(off)
 12411  			v.Aux = symToAux(sym)
 12412  			v.AddArg3(x, ptr, mem)
 12413  			return true
 12414  		}
 12415  		break
 12416  	}
 12417  	// match: (ORW x1:(MOVBZload [i1] {s} p mem) sh:(SLWconst [8] x0:(MOVBZload [i0] {s} p mem)))
 12418  	// 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)
 12419  	// result: @mergePoint(b,x0,x1) (MOVHZload [i0] {s} p mem)
 12420  	for {
 12421  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12422  			x1 := v_0
 12423  			if x1.Op != OpS390XMOVBZload {
 12424  				continue
 12425  			}
 12426  			i1 := auxIntToInt32(x1.AuxInt)
 12427  			s := auxToSym(x1.Aux)
 12428  			mem := x1.Args[1]
 12429  			p := x1.Args[0]
 12430  			sh := v_1
 12431  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 8 {
 12432  				continue
 12433  			}
 12434  			x0 := sh.Args[0]
 12435  			if x0.Op != OpS390XMOVBZload {
 12436  				continue
 12437  			}
 12438  			i0 := auxIntToInt32(x0.AuxInt)
 12439  			if auxToSym(x0.Aux) != s {
 12440  				continue
 12441  			}
 12442  			_ = x0.Args[1]
 12443  			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)) {
 12444  				continue
 12445  			}
 12446  			b = mergePoint(b, x0, x1)
 12447  			v0 := b.NewValue0(x0.Pos, OpS390XMOVHZload, typ.UInt16)
 12448  			v.copyOf(v0)
 12449  			v0.AuxInt = int32ToAuxInt(i0)
 12450  			v0.Aux = symToAux(s)
 12451  			v0.AddArg2(p, mem)
 12452  			return true
 12453  		}
 12454  		break
 12455  	}
 12456  	// match: (ORW x1:(MOVHZload [i1] {s} p mem) sh:(SLWconst [16] x0:(MOVHZload [i0] {s} p mem)))
 12457  	// 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)
 12458  	// result: @mergePoint(b,x0,x1) (MOVWZload [i0] {s} p mem)
 12459  	for {
 12460  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12461  			x1 := v_0
 12462  			if x1.Op != OpS390XMOVHZload {
 12463  				continue
 12464  			}
 12465  			i1 := auxIntToInt32(x1.AuxInt)
 12466  			s := auxToSym(x1.Aux)
 12467  			mem := x1.Args[1]
 12468  			p := x1.Args[0]
 12469  			sh := v_1
 12470  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 16 {
 12471  				continue
 12472  			}
 12473  			x0 := sh.Args[0]
 12474  			if x0.Op != OpS390XMOVHZload {
 12475  				continue
 12476  			}
 12477  			i0 := auxIntToInt32(x0.AuxInt)
 12478  			if auxToSym(x0.Aux) != s {
 12479  				continue
 12480  			}
 12481  			_ = x0.Args[1]
 12482  			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)) {
 12483  				continue
 12484  			}
 12485  			b = mergePoint(b, x0, x1)
 12486  			v0 := b.NewValue0(x0.Pos, OpS390XMOVWZload, typ.UInt32)
 12487  			v.copyOf(v0)
 12488  			v0.AuxInt = int32ToAuxInt(i0)
 12489  			v0.Aux = symToAux(s)
 12490  			v0.AddArg2(p, mem)
 12491  			return true
 12492  		}
 12493  		break
 12494  	}
 12495  	// match: (ORW s0:(SLWconst [j0] x0:(MOVBZload [i0] {s} p mem)) or:(ORW s1:(SLWconst [j1] x1:(MOVBZload [i1] {s} p mem)) y))
 12496  	// 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)
 12497  	// result: @mergePoint(b,x0,x1,y) (ORW <v.Type> (SLWconst <v.Type> [j1] (MOVHZload [i0] {s} p mem)) y)
 12498  	for {
 12499  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12500  			s0 := v_0
 12501  			if s0.Op != OpS390XSLWconst {
 12502  				continue
 12503  			}
 12504  			j0 := auxIntToUint8(s0.AuxInt)
 12505  			x0 := s0.Args[0]
 12506  			if x0.Op != OpS390XMOVBZload {
 12507  				continue
 12508  			}
 12509  			i0 := auxIntToInt32(x0.AuxInt)
 12510  			s := auxToSym(x0.Aux)
 12511  			mem := x0.Args[1]
 12512  			p := x0.Args[0]
 12513  			or := v_1
 12514  			if or.Op != OpS390XORW {
 12515  				continue
 12516  			}
 12517  			_ = or.Args[1]
 12518  			or_0 := or.Args[0]
 12519  			or_1 := or.Args[1]
 12520  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12521  				s1 := or_0
 12522  				if s1.Op != OpS390XSLWconst {
 12523  					continue
 12524  				}
 12525  				j1 := auxIntToUint8(s1.AuxInt)
 12526  				x1 := s1.Args[0]
 12527  				if x1.Op != OpS390XMOVBZload {
 12528  					continue
 12529  				}
 12530  				i1 := auxIntToInt32(x1.AuxInt)
 12531  				if auxToSym(x1.Aux) != s {
 12532  					continue
 12533  				}
 12534  				_ = x1.Args[1]
 12535  				if p != x1.Args[0] || mem != x1.Args[1] {
 12536  					continue
 12537  				}
 12538  				y := or_1
 12539  				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)) {
 12540  					continue
 12541  				}
 12542  				b = mergePoint(b, x0, x1, y)
 12543  				v0 := b.NewValue0(x1.Pos, OpS390XORW, v.Type)
 12544  				v.copyOf(v0)
 12545  				v1 := b.NewValue0(x1.Pos, OpS390XSLWconst, v.Type)
 12546  				v1.AuxInt = uint8ToAuxInt(j1)
 12547  				v2 := b.NewValue0(x1.Pos, OpS390XMOVHZload, typ.UInt16)
 12548  				v2.AuxInt = int32ToAuxInt(i0)
 12549  				v2.Aux = symToAux(s)
 12550  				v2.AddArg2(p, mem)
 12551  				v1.AddArg(v2)
 12552  				v0.AddArg2(v1, y)
 12553  				return true
 12554  			}
 12555  		}
 12556  		break
 12557  	}
 12558  	// match: (ORW x0:(MOVBZload [i0] {s} p mem) sh:(SLWconst [8] x1:(MOVBZload [i1] {s} p mem)))
 12559  	// 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)
 12560  	// result: @mergePoint(b,x0,x1) (MOVHZreg (MOVHBRload [i0] {s} p mem))
 12561  	for {
 12562  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12563  			x0 := v_0
 12564  			if x0.Op != OpS390XMOVBZload {
 12565  				continue
 12566  			}
 12567  			i0 := auxIntToInt32(x0.AuxInt)
 12568  			s := auxToSym(x0.Aux)
 12569  			mem := x0.Args[1]
 12570  			p := x0.Args[0]
 12571  			sh := v_1
 12572  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 8 {
 12573  				continue
 12574  			}
 12575  			x1 := sh.Args[0]
 12576  			if x1.Op != OpS390XMOVBZload {
 12577  				continue
 12578  			}
 12579  			i1 := auxIntToInt32(x1.AuxInt)
 12580  			if auxToSym(x1.Aux) != s {
 12581  				continue
 12582  			}
 12583  			_ = x1.Args[1]
 12584  			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)) {
 12585  				continue
 12586  			}
 12587  			b = mergePoint(b, x0, x1)
 12588  			v0 := b.NewValue0(x1.Pos, OpS390XMOVHZreg, typ.UInt64)
 12589  			v.copyOf(v0)
 12590  			v1 := b.NewValue0(x1.Pos, OpS390XMOVHBRload, typ.UInt16)
 12591  			v1.AuxInt = int32ToAuxInt(i0)
 12592  			v1.Aux = symToAux(s)
 12593  			v1.AddArg2(p, mem)
 12594  			v0.AddArg(v1)
 12595  			return true
 12596  		}
 12597  		break
 12598  	}
 12599  	// match: (ORW r0:(MOVHZreg x0:(MOVHBRload [i0] {s} p mem)) sh:(SLWconst [16] r1:(MOVHZreg x1:(MOVHBRload [i1] {s} p mem))))
 12600  	// 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)
 12601  	// result: @mergePoint(b,x0,x1) (MOVWBRload [i0] {s} p mem)
 12602  	for {
 12603  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12604  			r0 := v_0
 12605  			if r0.Op != OpS390XMOVHZreg {
 12606  				continue
 12607  			}
 12608  			x0 := r0.Args[0]
 12609  			if x0.Op != OpS390XMOVHBRload {
 12610  				continue
 12611  			}
 12612  			i0 := auxIntToInt32(x0.AuxInt)
 12613  			s := auxToSym(x0.Aux)
 12614  			mem := x0.Args[1]
 12615  			p := x0.Args[0]
 12616  			sh := v_1
 12617  			if sh.Op != OpS390XSLWconst || auxIntToUint8(sh.AuxInt) != 16 {
 12618  				continue
 12619  			}
 12620  			r1 := sh.Args[0]
 12621  			if r1.Op != OpS390XMOVHZreg {
 12622  				continue
 12623  			}
 12624  			x1 := r1.Args[0]
 12625  			if x1.Op != OpS390XMOVHBRload {
 12626  				continue
 12627  			}
 12628  			i1 := auxIntToInt32(x1.AuxInt)
 12629  			if auxToSym(x1.Aux) != s {
 12630  				continue
 12631  			}
 12632  			_ = x1.Args[1]
 12633  			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)) {
 12634  				continue
 12635  			}
 12636  			b = mergePoint(b, x0, x1)
 12637  			v0 := b.NewValue0(x1.Pos, OpS390XMOVWBRload, typ.UInt32)
 12638  			v.copyOf(v0)
 12639  			v0.AuxInt = int32ToAuxInt(i0)
 12640  			v0.Aux = symToAux(s)
 12641  			v0.AddArg2(p, mem)
 12642  			return true
 12643  		}
 12644  		break
 12645  	}
 12646  	// match: (ORW s1:(SLWconst [j1] x1:(MOVBZload [i1] {s} p mem)) or:(ORW s0:(SLWconst [j0] x0:(MOVBZload [i0] {s} p mem)) y))
 12647  	// 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)
 12648  	// result: @mergePoint(b,x0,x1,y) (ORW <v.Type> (SLWconst <v.Type> [j0] (MOVHZreg (MOVHBRload [i0] {s} p mem))) y)
 12649  	for {
 12650  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
 12651  			s1 := v_0
 12652  			if s1.Op != OpS390XSLWconst {
 12653  				continue
 12654  			}
 12655  			j1 := auxIntToUint8(s1.AuxInt)
 12656  			x1 := s1.Args[0]
 12657  			if x1.Op != OpS390XMOVBZload {
 12658  				continue
 12659  			}
 12660  			i1 := auxIntToInt32(x1.AuxInt)
 12661  			s := auxToSym(x1.Aux)
 12662  			mem := x1.Args[1]
 12663  			p := x1.Args[0]
 12664  			or := v_1
 12665  			if or.Op != OpS390XORW {
 12666  				continue
 12667  			}
 12668  			_ = or.Args[1]
 12669  			or_0 := or.Args[0]
 12670  			or_1 := or.Args[1]
 12671  			for _i1 := 0; _i1 <= 1; _i1, or_0, or_1 = _i1+1, or_1, or_0 {
 12672  				s0 := or_0
 12673  				if s0.Op != OpS390XSLWconst {
 12674  					continue
 12675  				}
 12676  				j0 := auxIntToUint8(s0.AuxInt)
 12677  				x0 := s0.Args[0]
 12678  				if x0.Op != OpS390XMOVBZload {
 12679  					continue
 12680  				}
 12681  				i0 := auxIntToInt32(x0.AuxInt)
 12682  				if auxToSym(x0.Aux) != s {
 12683  					continue
 12684  				}
 12685  				_ = x0.Args[1]
 12686  				if p != x0.Args[0] || mem != x0.Args[1] {
 12687  					continue
 12688  				}
 12689  				y := or_1
 12690  				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)) {
 12691  					continue
 12692  				}
 12693  				b = mergePoint(b, x0, x1, y)
 12694  				v0 := b.NewValue0(x0.Pos, OpS390XORW, v.Type)
 12695  				v.copyOf(v0)
 12696  				v1 := b.NewValue0(x0.Pos, OpS390XSLWconst, v.Type)
 12697  				v1.AuxInt = uint8ToAuxInt(j0)
 12698  				v2 := b.NewValue0(x0.Pos, OpS390XMOVHZreg, typ.UInt64)
 12699  				v3 := b.NewValue0(x0.Pos, OpS390XMOVHBRload, typ.UInt16)
 12700  				v3.AuxInt = int32ToAuxInt(i0)
 12701  				v3.Aux = symToAux(s)
 12702  				v3.AddArg2(p, mem)
 12703  				v2.AddArg(v3)
 12704  				v1.AddArg(v2)
 12705  				v0.AddArg2(v1, y)
 12706  				return true
 12707  			}
 12708  		}
 12709  		break
 12710  	}
 12711  	return false
 12712  }
 12713  func rewriteValueS390X_OpS390XORWconst(v *Value) bool {
 12714  	v_0 := v.Args[0]
 12715  	// match: (ORWconst [c] x)
 12716  	// cond: int32(c)==0
 12717  	// result: x
 12718  	for {
 12719  		c := auxIntToInt32(v.AuxInt)
 12720  		x := v_0
 12721  		if !(int32(c) == 0) {
 12722  			break
 12723  		}
 12724  		v.copyOf(x)
 12725  		return true
 12726  	}
 12727  	// match: (ORWconst [c] _)
 12728  	// cond: int32(c)==-1
 12729  	// result: (MOVDconst [-1])
 12730  	for {
 12731  		c := auxIntToInt32(v.AuxInt)
 12732  		if !(int32(c) == -1) {
 12733  			break
 12734  		}
 12735  		v.reset(OpS390XMOVDconst)
 12736  		v.AuxInt = int64ToAuxInt(-1)
 12737  		return true
 12738  	}
 12739  	// match: (ORWconst [c] (MOVDconst [d]))
 12740  	// result: (MOVDconst [int64(c)|d])
 12741  	for {
 12742  		c := auxIntToInt32(v.AuxInt)
 12743  		if v_0.Op != OpS390XMOVDconst {
 12744  			break
 12745  		}
 12746  		d := auxIntToInt64(v_0.AuxInt)
 12747  		v.reset(OpS390XMOVDconst)
 12748  		v.AuxInt = int64ToAuxInt(int64(c) | d)
 12749  		return true
 12750  	}
 12751  	return false
 12752  }
 12753  func rewriteValueS390X_OpS390XORWload(v *Value) bool {
 12754  	v_2 := v.Args[2]
 12755  	v_1 := v.Args[1]
 12756  	v_0