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

     1  // Code generated from _gen/386.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package ssa
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  
     8  func rewriteValue386(v *Value) bool {
     9  	switch v.Op {
    10  	case Op386ADCL:
    11  		return rewriteValue386_Op386ADCL(v)
    12  	case Op386ADDL:
    13  		return rewriteValue386_Op386ADDL(v)
    14  	case Op386ADDLcarry:
    15  		return rewriteValue386_Op386ADDLcarry(v)
    16  	case Op386ADDLconst:
    17  		return rewriteValue386_Op386ADDLconst(v)
    18  	case Op386ADDLconstmodify:
    19  		return rewriteValue386_Op386ADDLconstmodify(v)
    20  	case Op386ADDLload:
    21  		return rewriteValue386_Op386ADDLload(v)
    22  	case Op386ADDLmodify:
    23  		return rewriteValue386_Op386ADDLmodify(v)
    24  	case Op386ADDSD:
    25  		return rewriteValue386_Op386ADDSD(v)
    26  	case Op386ADDSDload:
    27  		return rewriteValue386_Op386ADDSDload(v)
    28  	case Op386ADDSS:
    29  		return rewriteValue386_Op386ADDSS(v)
    30  	case Op386ADDSSload:
    31  		return rewriteValue386_Op386ADDSSload(v)
    32  	case Op386ANDL:
    33  		return rewriteValue386_Op386ANDL(v)
    34  	case Op386ANDLconst:
    35  		return rewriteValue386_Op386ANDLconst(v)
    36  	case Op386ANDLconstmodify:
    37  		return rewriteValue386_Op386ANDLconstmodify(v)
    38  	case Op386ANDLload:
    39  		return rewriteValue386_Op386ANDLload(v)
    40  	case Op386ANDLmodify:
    41  		return rewriteValue386_Op386ANDLmodify(v)
    42  	case Op386CMPB:
    43  		return rewriteValue386_Op386CMPB(v)
    44  	case Op386CMPBconst:
    45  		return rewriteValue386_Op386CMPBconst(v)
    46  	case Op386CMPBload:
    47  		return rewriteValue386_Op386CMPBload(v)
    48  	case Op386CMPL:
    49  		return rewriteValue386_Op386CMPL(v)
    50  	case Op386CMPLconst:
    51  		return rewriteValue386_Op386CMPLconst(v)
    52  	case Op386CMPLload:
    53  		return rewriteValue386_Op386CMPLload(v)
    54  	case Op386CMPW:
    55  		return rewriteValue386_Op386CMPW(v)
    56  	case Op386CMPWconst:
    57  		return rewriteValue386_Op386CMPWconst(v)
    58  	case Op386CMPWload:
    59  		return rewriteValue386_Op386CMPWload(v)
    60  	case Op386DIVSD:
    61  		return rewriteValue386_Op386DIVSD(v)
    62  	case Op386DIVSDload:
    63  		return rewriteValue386_Op386DIVSDload(v)
    64  	case Op386DIVSS:
    65  		return rewriteValue386_Op386DIVSS(v)
    66  	case Op386DIVSSload:
    67  		return rewriteValue386_Op386DIVSSload(v)
    68  	case Op386LEAL:
    69  		return rewriteValue386_Op386LEAL(v)
    70  	case Op386LEAL1:
    71  		return rewriteValue386_Op386LEAL1(v)
    72  	case Op386LEAL2:
    73  		return rewriteValue386_Op386LEAL2(v)
    74  	case Op386LEAL4:
    75  		return rewriteValue386_Op386LEAL4(v)
    76  	case Op386LEAL8:
    77  		return rewriteValue386_Op386LEAL8(v)
    78  	case Op386LoweredPanicBoundsRC:
    79  		return rewriteValue386_Op386LoweredPanicBoundsRC(v)
    80  	case Op386LoweredPanicBoundsRR:
    81  		return rewriteValue386_Op386LoweredPanicBoundsRR(v)
    82  	case Op386LoweredPanicExtendRC:
    83  		return rewriteValue386_Op386LoweredPanicExtendRC(v)
    84  	case Op386LoweredPanicExtendRR:
    85  		return rewriteValue386_Op386LoweredPanicExtendRR(v)
    86  	case Op386MOVBLSX:
    87  		return rewriteValue386_Op386MOVBLSX(v)
    88  	case Op386MOVBLSXload:
    89  		return rewriteValue386_Op386MOVBLSXload(v)
    90  	case Op386MOVBLZX:
    91  		return rewriteValue386_Op386MOVBLZX(v)
    92  	case Op386MOVBload:
    93  		return rewriteValue386_Op386MOVBload(v)
    94  	case Op386MOVBstore:
    95  		return rewriteValue386_Op386MOVBstore(v)
    96  	case Op386MOVBstoreconst:
    97  		return rewriteValue386_Op386MOVBstoreconst(v)
    98  	case Op386MOVLload:
    99  		return rewriteValue386_Op386MOVLload(v)
   100  	case Op386MOVLstore:
   101  		return rewriteValue386_Op386MOVLstore(v)
   102  	case Op386MOVLstoreconst:
   103  		return rewriteValue386_Op386MOVLstoreconst(v)
   104  	case Op386MOVSDconst:
   105  		return rewriteValue386_Op386MOVSDconst(v)
   106  	case Op386MOVSDload:
   107  		return rewriteValue386_Op386MOVSDload(v)
   108  	case Op386MOVSDstore:
   109  		return rewriteValue386_Op386MOVSDstore(v)
   110  	case Op386MOVSSconst:
   111  		return rewriteValue386_Op386MOVSSconst(v)
   112  	case Op386MOVSSload:
   113  		return rewriteValue386_Op386MOVSSload(v)
   114  	case Op386MOVSSstore:
   115  		return rewriteValue386_Op386MOVSSstore(v)
   116  	case Op386MOVWLSX:
   117  		return rewriteValue386_Op386MOVWLSX(v)
   118  	case Op386MOVWLSXload:
   119  		return rewriteValue386_Op386MOVWLSXload(v)
   120  	case Op386MOVWLZX:
   121  		return rewriteValue386_Op386MOVWLZX(v)
   122  	case Op386MOVWload:
   123  		return rewriteValue386_Op386MOVWload(v)
   124  	case Op386MOVWstore:
   125  		return rewriteValue386_Op386MOVWstore(v)
   126  	case Op386MOVWstoreconst:
   127  		return rewriteValue386_Op386MOVWstoreconst(v)
   128  	case Op386MULL:
   129  		return rewriteValue386_Op386MULL(v)
   130  	case Op386MULLconst:
   131  		return rewriteValue386_Op386MULLconst(v)
   132  	case Op386MULLload:
   133  		return rewriteValue386_Op386MULLload(v)
   134  	case Op386MULSD:
   135  		return rewriteValue386_Op386MULSD(v)
   136  	case Op386MULSDload:
   137  		return rewriteValue386_Op386MULSDload(v)
   138  	case Op386MULSS:
   139  		return rewriteValue386_Op386MULSS(v)
   140  	case Op386MULSSload:
   141  		return rewriteValue386_Op386MULSSload(v)
   142  	case Op386NEGL:
   143  		return rewriteValue386_Op386NEGL(v)
   144  	case Op386NOTL:
   145  		return rewriteValue386_Op386NOTL(v)
   146  	case Op386ORL:
   147  		return rewriteValue386_Op386ORL(v)
   148  	case Op386ORLconst:
   149  		return rewriteValue386_Op386ORLconst(v)
   150  	case Op386ORLconstmodify:
   151  		return rewriteValue386_Op386ORLconstmodify(v)
   152  	case Op386ORLload:
   153  		return rewriteValue386_Op386ORLload(v)
   154  	case Op386ORLmodify:
   155  		return rewriteValue386_Op386ORLmodify(v)
   156  	case Op386ROLB:
   157  		return rewriteValue386_Op386ROLB(v)
   158  	case Op386ROLBconst:
   159  		return rewriteValue386_Op386ROLBconst(v)
   160  	case Op386ROLL:
   161  		return rewriteValue386_Op386ROLL(v)
   162  	case Op386ROLLconst:
   163  		return rewriteValue386_Op386ROLLconst(v)
   164  	case Op386ROLW:
   165  		return rewriteValue386_Op386ROLW(v)
   166  	case Op386ROLWconst:
   167  		return rewriteValue386_Op386ROLWconst(v)
   168  	case Op386SARB:
   169  		return rewriteValue386_Op386SARB(v)
   170  	case Op386SARBconst:
   171  		return rewriteValue386_Op386SARBconst(v)
   172  	case Op386SARL:
   173  		return rewriteValue386_Op386SARL(v)
   174  	case Op386SARLconst:
   175  		return rewriteValue386_Op386SARLconst(v)
   176  	case Op386SARW:
   177  		return rewriteValue386_Op386SARW(v)
   178  	case Op386SARWconst:
   179  		return rewriteValue386_Op386SARWconst(v)
   180  	case Op386SBBL:
   181  		return rewriteValue386_Op386SBBL(v)
   182  	case Op386SBBLcarrymask:
   183  		return rewriteValue386_Op386SBBLcarrymask(v)
   184  	case Op386SETA:
   185  		return rewriteValue386_Op386SETA(v)
   186  	case Op386SETAE:
   187  		return rewriteValue386_Op386SETAE(v)
   188  	case Op386SETB:
   189  		return rewriteValue386_Op386SETB(v)
   190  	case Op386SETBE:
   191  		return rewriteValue386_Op386SETBE(v)
   192  	case Op386SETEQ:
   193  		return rewriteValue386_Op386SETEQ(v)
   194  	case Op386SETG:
   195  		return rewriteValue386_Op386SETG(v)
   196  	case Op386SETGE:
   197  		return rewriteValue386_Op386SETGE(v)
   198  	case Op386SETL:
   199  		return rewriteValue386_Op386SETL(v)
   200  	case Op386SETLE:
   201  		return rewriteValue386_Op386SETLE(v)
   202  	case Op386SETNE:
   203  		return rewriteValue386_Op386SETNE(v)
   204  	case Op386SHLL:
   205  		return rewriteValue386_Op386SHLL(v)
   206  	case Op386SHLLconst:
   207  		return rewriteValue386_Op386SHLLconst(v)
   208  	case Op386SHRB:
   209  		return rewriteValue386_Op386SHRB(v)
   210  	case Op386SHRBconst:
   211  		return rewriteValue386_Op386SHRBconst(v)
   212  	case Op386SHRL:
   213  		return rewriteValue386_Op386SHRL(v)
   214  	case Op386SHRLconst:
   215  		return rewriteValue386_Op386SHRLconst(v)
   216  	case Op386SHRW:
   217  		return rewriteValue386_Op386SHRW(v)
   218  	case Op386SHRWconst:
   219  		return rewriteValue386_Op386SHRWconst(v)
   220  	case Op386SUBL:
   221  		return rewriteValue386_Op386SUBL(v)
   222  	case Op386SUBLcarry:
   223  		return rewriteValue386_Op386SUBLcarry(v)
   224  	case Op386SUBLconst:
   225  		return rewriteValue386_Op386SUBLconst(v)
   226  	case Op386SUBLload:
   227  		return rewriteValue386_Op386SUBLload(v)
   228  	case Op386SUBLmodify:
   229  		return rewriteValue386_Op386SUBLmodify(v)
   230  	case Op386SUBSD:
   231  		return rewriteValue386_Op386SUBSD(v)
   232  	case Op386SUBSDload:
   233  		return rewriteValue386_Op386SUBSDload(v)
   234  	case Op386SUBSS:
   235  		return rewriteValue386_Op386SUBSS(v)
   236  	case Op386SUBSSload:
   237  		return rewriteValue386_Op386SUBSSload(v)
   238  	case Op386XORL:
   239  		return rewriteValue386_Op386XORL(v)
   240  	case Op386XORLconst:
   241  		return rewriteValue386_Op386XORLconst(v)
   242  	case Op386XORLconstmodify:
   243  		return rewriteValue386_Op386XORLconstmodify(v)
   244  	case Op386XORLload:
   245  		return rewriteValue386_Op386XORLload(v)
   246  	case Op386XORLmodify:
   247  		return rewriteValue386_Op386XORLmodify(v)
   248  	case OpAdd16:
   249  		v.Op = Op386ADDL
   250  		return true
   251  	case OpAdd32:
   252  		v.Op = Op386ADDL
   253  		return true
   254  	case OpAdd32F:
   255  		v.Op = Op386ADDSS
   256  		return true
   257  	case OpAdd32carry:
   258  		v.Op = Op386ADDLcarry
   259  		return true
   260  	case OpAdd32carrywithcarry:
   261  		v.Op = Op386ADCLcarry
   262  		return true
   263  	case OpAdd32withcarry:
   264  		v.Op = Op386ADCL
   265  		return true
   266  	case OpAdd64F:
   267  		v.Op = Op386ADDSD
   268  		return true
   269  	case OpAdd8:
   270  		v.Op = Op386ADDL
   271  		return true
   272  	case OpAddPtr:
   273  		v.Op = Op386ADDL
   274  		return true
   275  	case OpAddr:
   276  		return rewriteValue386_OpAddr(v)
   277  	case OpAnd16:
   278  		v.Op = Op386ANDL
   279  		return true
   280  	case OpAnd32:
   281  		v.Op = Op386ANDL
   282  		return true
   283  	case OpAnd8:
   284  		v.Op = Op386ANDL
   285  		return true
   286  	case OpAndB:
   287  		v.Op = Op386ANDL
   288  		return true
   289  	case OpAvg32u:
   290  		v.Op = Op386AVGLU
   291  		return true
   292  	case OpBswap16:
   293  		return rewriteValue386_OpBswap16(v)
   294  	case OpBswap32:
   295  		v.Op = Op386BSWAPL
   296  		return true
   297  	case OpClosureCall:
   298  		v.Op = Op386CALLclosure
   299  		return true
   300  	case OpCom16:
   301  		v.Op = Op386NOTL
   302  		return true
   303  	case OpCom32:
   304  		v.Op = Op386NOTL
   305  		return true
   306  	case OpCom8:
   307  		v.Op = Op386NOTL
   308  		return true
   309  	case OpConst16:
   310  		return rewriteValue386_OpConst16(v)
   311  	case OpConst32:
   312  		v.Op = Op386MOVLconst
   313  		return true
   314  	case OpConst32F:
   315  		v.Op = Op386MOVSSconst
   316  		return true
   317  	case OpConst64F:
   318  		v.Op = Op386MOVSDconst
   319  		return true
   320  	case OpConst8:
   321  		return rewriteValue386_OpConst8(v)
   322  	case OpConstBool:
   323  		return rewriteValue386_OpConstBool(v)
   324  	case OpConstNil:
   325  		return rewriteValue386_OpConstNil(v)
   326  	case OpCtz16:
   327  		return rewriteValue386_OpCtz16(v)
   328  	case OpCtz16NonZero:
   329  		v.Op = Op386BSFL
   330  		return true
   331  	case OpCtz32:
   332  		v.Op = Op386LoweredCtz32
   333  		return true
   334  	case OpCtz32NonZero:
   335  		v.Op = Op386BSFL
   336  		return true
   337  	case OpCtz64On32:
   338  		v.Op = Op386LoweredCtz64
   339  		return true
   340  	case OpCtz8:
   341  		return rewriteValue386_OpCtz8(v)
   342  	case OpCtz8NonZero:
   343  		v.Op = Op386BSFL
   344  		return true
   345  	case OpCvt32Fto32:
   346  		v.Op = Op386CVTTSS2SL
   347  		return true
   348  	case OpCvt32Fto64F:
   349  		v.Op = Op386CVTSS2SD
   350  		return true
   351  	case OpCvt32to32F:
   352  		v.Op = Op386CVTSL2SS
   353  		return true
   354  	case OpCvt32to64F:
   355  		v.Op = Op386CVTSL2SD
   356  		return true
   357  	case OpCvt64Fto32:
   358  		v.Op = Op386CVTTSD2SL
   359  		return true
   360  	case OpCvt64Fto32F:
   361  		v.Op = Op386CVTSD2SS
   362  		return true
   363  	case OpCvtBoolToUint8:
   364  		v.Op = OpCopy
   365  		return true
   366  	case OpDiv16:
   367  		v.Op = Op386DIVW
   368  		return true
   369  	case OpDiv16u:
   370  		v.Op = Op386DIVWU
   371  		return true
   372  	case OpDiv32:
   373  		v.Op = Op386DIVL
   374  		return true
   375  	case OpDiv32F:
   376  		v.Op = Op386DIVSS
   377  		return true
   378  	case OpDiv32u:
   379  		v.Op = Op386DIVLU
   380  		return true
   381  	case OpDiv64F:
   382  		v.Op = Op386DIVSD
   383  		return true
   384  	case OpDiv8:
   385  		return rewriteValue386_OpDiv8(v)
   386  	case OpDiv8u:
   387  		return rewriteValue386_OpDiv8u(v)
   388  	case OpEq16:
   389  		return rewriteValue386_OpEq16(v)
   390  	case OpEq32:
   391  		return rewriteValue386_OpEq32(v)
   392  	case OpEq32F:
   393  		return rewriteValue386_OpEq32F(v)
   394  	case OpEq64F:
   395  		return rewriteValue386_OpEq64F(v)
   396  	case OpEq8:
   397  		return rewriteValue386_OpEq8(v)
   398  	case OpEqB:
   399  		return rewriteValue386_OpEqB(v)
   400  	case OpEqPtr:
   401  		return rewriteValue386_OpEqPtr(v)
   402  	case OpGetCallerPC:
   403  		v.Op = Op386LoweredGetCallerPC
   404  		return true
   405  	case OpGetCallerSP:
   406  		v.Op = Op386LoweredGetCallerSP
   407  		return true
   408  	case OpGetClosurePtr:
   409  		v.Op = Op386LoweredGetClosurePtr
   410  		return true
   411  	case OpGetG:
   412  		v.Op = Op386LoweredGetG
   413  		return true
   414  	case OpHmul32:
   415  		v.Op = Op386HMULL
   416  		return true
   417  	case OpHmul32u:
   418  		v.Op = Op386HMULLU
   419  		return true
   420  	case OpInterCall:
   421  		v.Op = Op386CALLinter
   422  		return true
   423  	case OpIsInBounds:
   424  		return rewriteValue386_OpIsInBounds(v)
   425  	case OpIsNonNil:
   426  		return rewriteValue386_OpIsNonNil(v)
   427  	case OpIsSliceInBounds:
   428  		return rewriteValue386_OpIsSliceInBounds(v)
   429  	case OpLeq16:
   430  		return rewriteValue386_OpLeq16(v)
   431  	case OpLeq16U:
   432  		return rewriteValue386_OpLeq16U(v)
   433  	case OpLeq32:
   434  		return rewriteValue386_OpLeq32(v)
   435  	case OpLeq32F:
   436  		return rewriteValue386_OpLeq32F(v)
   437  	case OpLeq32U:
   438  		return rewriteValue386_OpLeq32U(v)
   439  	case OpLeq64F:
   440  		return rewriteValue386_OpLeq64F(v)
   441  	case OpLeq8:
   442  		return rewriteValue386_OpLeq8(v)
   443  	case OpLeq8U:
   444  		return rewriteValue386_OpLeq8U(v)
   445  	case OpLess16:
   446  		return rewriteValue386_OpLess16(v)
   447  	case OpLess16U:
   448  		return rewriteValue386_OpLess16U(v)
   449  	case OpLess32:
   450  		return rewriteValue386_OpLess32(v)
   451  	case OpLess32F:
   452  		return rewriteValue386_OpLess32F(v)
   453  	case OpLess32U:
   454  		return rewriteValue386_OpLess32U(v)
   455  	case OpLess64F:
   456  		return rewriteValue386_OpLess64F(v)
   457  	case OpLess8:
   458  		return rewriteValue386_OpLess8(v)
   459  	case OpLess8U:
   460  		return rewriteValue386_OpLess8U(v)
   461  	case OpLoad:
   462  		return rewriteValue386_OpLoad(v)
   463  	case OpLocalAddr:
   464  		return rewriteValue386_OpLocalAddr(v)
   465  	case OpLsh16x16:
   466  		return rewriteValue386_OpLsh16x16(v)
   467  	case OpLsh16x32:
   468  		return rewriteValue386_OpLsh16x32(v)
   469  	case OpLsh16x64:
   470  		return rewriteValue386_OpLsh16x64(v)
   471  	case OpLsh16x8:
   472  		return rewriteValue386_OpLsh16x8(v)
   473  	case OpLsh32x16:
   474  		return rewriteValue386_OpLsh32x16(v)
   475  	case OpLsh32x32:
   476  		return rewriteValue386_OpLsh32x32(v)
   477  	case OpLsh32x64:
   478  		return rewriteValue386_OpLsh32x64(v)
   479  	case OpLsh32x8:
   480  		return rewriteValue386_OpLsh32x8(v)
   481  	case OpLsh8x16:
   482  		return rewriteValue386_OpLsh8x16(v)
   483  	case OpLsh8x32:
   484  		return rewriteValue386_OpLsh8x32(v)
   485  	case OpLsh8x64:
   486  		return rewriteValue386_OpLsh8x64(v)
   487  	case OpLsh8x8:
   488  		return rewriteValue386_OpLsh8x8(v)
   489  	case OpMod16:
   490  		v.Op = Op386MODW
   491  		return true
   492  	case OpMod16u:
   493  		v.Op = Op386MODWU
   494  		return true
   495  	case OpMod32:
   496  		v.Op = Op386MODL
   497  		return true
   498  	case OpMod32u:
   499  		v.Op = Op386MODLU
   500  		return true
   501  	case OpMod8:
   502  		return rewriteValue386_OpMod8(v)
   503  	case OpMod8u:
   504  		return rewriteValue386_OpMod8u(v)
   505  	case OpMove:
   506  		return rewriteValue386_OpMove(v)
   507  	case OpMul16:
   508  		v.Op = Op386MULL
   509  		return true
   510  	case OpMul32:
   511  		v.Op = Op386MULL
   512  		return true
   513  	case OpMul32F:
   514  		v.Op = Op386MULSS
   515  		return true
   516  	case OpMul32uhilo:
   517  		v.Op = Op386MULLQU
   518  		return true
   519  	case OpMul64F:
   520  		v.Op = Op386MULSD
   521  		return true
   522  	case OpMul8:
   523  		v.Op = Op386MULL
   524  		return true
   525  	case OpNeg16:
   526  		v.Op = Op386NEGL
   527  		return true
   528  	case OpNeg32:
   529  		v.Op = Op386NEGL
   530  		return true
   531  	case OpNeg32F:
   532  		return rewriteValue386_OpNeg32F(v)
   533  	case OpNeg64F:
   534  		return rewriteValue386_OpNeg64F(v)
   535  	case OpNeg8:
   536  		v.Op = Op386NEGL
   537  		return true
   538  	case OpNeq16:
   539  		return rewriteValue386_OpNeq16(v)
   540  	case OpNeq32:
   541  		return rewriteValue386_OpNeq32(v)
   542  	case OpNeq32F:
   543  		return rewriteValue386_OpNeq32F(v)
   544  	case OpNeq64F:
   545  		return rewriteValue386_OpNeq64F(v)
   546  	case OpNeq8:
   547  		return rewriteValue386_OpNeq8(v)
   548  	case OpNeqB:
   549  		return rewriteValue386_OpNeqB(v)
   550  	case OpNeqPtr:
   551  		return rewriteValue386_OpNeqPtr(v)
   552  	case OpNilCheck:
   553  		v.Op = Op386LoweredNilCheck
   554  		return true
   555  	case OpNot:
   556  		return rewriteValue386_OpNot(v)
   557  	case OpOffPtr:
   558  		return rewriteValue386_OpOffPtr(v)
   559  	case OpOr16:
   560  		v.Op = Op386ORL
   561  		return true
   562  	case OpOr32:
   563  		v.Op = Op386ORL
   564  		return true
   565  	case OpOr8:
   566  		v.Op = Op386ORL
   567  		return true
   568  	case OpOrB:
   569  		v.Op = Op386ORL
   570  		return true
   571  	case OpPanicBounds:
   572  		v.Op = Op386LoweredPanicBoundsRR
   573  		return true
   574  	case OpPanicExtend:
   575  		v.Op = Op386LoweredPanicExtendRR
   576  		return true
   577  	case OpRotateLeft16:
   578  		v.Op = Op386ROLW
   579  		return true
   580  	case OpRotateLeft32:
   581  		v.Op = Op386ROLL
   582  		return true
   583  	case OpRotateLeft8:
   584  		v.Op = Op386ROLB
   585  		return true
   586  	case OpRound32F:
   587  		v.Op = OpCopy
   588  		return true
   589  	case OpRound64F:
   590  		v.Op = OpCopy
   591  		return true
   592  	case OpRsh16Ux16:
   593  		return rewriteValue386_OpRsh16Ux16(v)
   594  	case OpRsh16Ux32:
   595  		return rewriteValue386_OpRsh16Ux32(v)
   596  	case OpRsh16Ux64:
   597  		return rewriteValue386_OpRsh16Ux64(v)
   598  	case OpRsh16Ux8:
   599  		return rewriteValue386_OpRsh16Ux8(v)
   600  	case OpRsh16x16:
   601  		return rewriteValue386_OpRsh16x16(v)
   602  	case OpRsh16x32:
   603  		return rewriteValue386_OpRsh16x32(v)
   604  	case OpRsh16x64:
   605  		return rewriteValue386_OpRsh16x64(v)
   606  	case OpRsh16x8:
   607  		return rewriteValue386_OpRsh16x8(v)
   608  	case OpRsh32Ux16:
   609  		return rewriteValue386_OpRsh32Ux16(v)
   610  	case OpRsh32Ux32:
   611  		return rewriteValue386_OpRsh32Ux32(v)
   612  	case OpRsh32Ux64:
   613  		return rewriteValue386_OpRsh32Ux64(v)
   614  	case OpRsh32Ux8:
   615  		return rewriteValue386_OpRsh32Ux8(v)
   616  	case OpRsh32x16:
   617  		return rewriteValue386_OpRsh32x16(v)
   618  	case OpRsh32x32:
   619  		return rewriteValue386_OpRsh32x32(v)
   620  	case OpRsh32x64:
   621  		return rewriteValue386_OpRsh32x64(v)
   622  	case OpRsh32x8:
   623  		return rewriteValue386_OpRsh32x8(v)
   624  	case OpRsh8Ux16:
   625  		return rewriteValue386_OpRsh8Ux16(v)
   626  	case OpRsh8Ux32:
   627  		return rewriteValue386_OpRsh8Ux32(v)
   628  	case OpRsh8Ux64:
   629  		return rewriteValue386_OpRsh8Ux64(v)
   630  	case OpRsh8Ux8:
   631  		return rewriteValue386_OpRsh8Ux8(v)
   632  	case OpRsh8x16:
   633  		return rewriteValue386_OpRsh8x16(v)
   634  	case OpRsh8x32:
   635  		return rewriteValue386_OpRsh8x32(v)
   636  	case OpRsh8x64:
   637  		return rewriteValue386_OpRsh8x64(v)
   638  	case OpRsh8x8:
   639  		return rewriteValue386_OpRsh8x8(v)
   640  	case OpSelect0:
   641  		return rewriteValue386_OpSelect0(v)
   642  	case OpSelect1:
   643  		return rewriteValue386_OpSelect1(v)
   644  	case OpSignExt16to32:
   645  		v.Op = Op386MOVWLSX
   646  		return true
   647  	case OpSignExt8to16:
   648  		v.Op = Op386MOVBLSX
   649  		return true
   650  	case OpSignExt8to32:
   651  		v.Op = Op386MOVBLSX
   652  		return true
   653  	case OpSignmask:
   654  		return rewriteValue386_OpSignmask(v)
   655  	case OpSlicemask:
   656  		return rewriteValue386_OpSlicemask(v)
   657  	case OpSqrt:
   658  		v.Op = Op386SQRTSD
   659  		return true
   660  	case OpSqrt32:
   661  		v.Op = Op386SQRTSS
   662  		return true
   663  	case OpStaticCall:
   664  		v.Op = Op386CALLstatic
   665  		return true
   666  	case OpStore:
   667  		return rewriteValue386_OpStore(v)
   668  	case OpSub16:
   669  		v.Op = Op386SUBL
   670  		return true
   671  	case OpSub32:
   672  		v.Op = Op386SUBL
   673  		return true
   674  	case OpSub32F:
   675  		v.Op = Op386SUBSS
   676  		return true
   677  	case OpSub32carry:
   678  		v.Op = Op386SUBLcarry
   679  		return true
   680  	case OpSub32withcarry:
   681  		v.Op = Op386SBBL
   682  		return true
   683  	case OpSub64F:
   684  		v.Op = Op386SUBSD
   685  		return true
   686  	case OpSub8:
   687  		v.Op = Op386SUBL
   688  		return true
   689  	case OpSubPtr:
   690  		v.Op = Op386SUBL
   691  		return true
   692  	case OpTailCall:
   693  		v.Op = Op386CALLtail
   694  		return true
   695  	case OpTailCallInter:
   696  		v.Op = Op386CALLtailinter
   697  		return true
   698  	case OpTrunc16to8:
   699  		v.Op = OpCopy
   700  		return true
   701  	case OpTrunc32to16:
   702  		v.Op = OpCopy
   703  		return true
   704  	case OpTrunc32to8:
   705  		v.Op = OpCopy
   706  		return true
   707  	case OpWB:
   708  		v.Op = Op386LoweredWB
   709  		return true
   710  	case OpXor16:
   711  		v.Op = Op386XORL
   712  		return true
   713  	case OpXor32:
   714  		v.Op = Op386XORL
   715  		return true
   716  	case OpXor8:
   717  		v.Op = Op386XORL
   718  		return true
   719  	case OpZero:
   720  		return rewriteValue386_OpZero(v)
   721  	case OpZeroExt16to32:
   722  		v.Op = Op386MOVWLZX
   723  		return true
   724  	case OpZeroExt8to16:
   725  		v.Op = Op386MOVBLZX
   726  		return true
   727  	case OpZeroExt8to32:
   728  		v.Op = Op386MOVBLZX
   729  		return true
   730  	case OpZeromask:
   731  		return rewriteValue386_OpZeromask(v)
   732  	}
   733  	return false
   734  }
   735  func rewriteValue386_Op386ADCL(v *Value) bool {
   736  	v_2 := v.Args[2]
   737  	v_1 := v.Args[1]
   738  	v_0 := v.Args[0]
   739  	// match: (ADCL x (MOVLconst [c]) f)
   740  	// result: (ADCLconst [c] x f)
   741  	for {
   742  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   743  			x := v_0
   744  			if v_1.Op != Op386MOVLconst {
   745  				continue
   746  			}
   747  			c := auxIntToInt32(v_1.AuxInt)
   748  			f := v_2
   749  			v.reset(Op386ADCLconst)
   750  			v.AuxInt = int32ToAuxInt(c)
   751  			v.AddArg2(x, f)
   752  			return true
   753  		}
   754  		break
   755  	}
   756  	return false
   757  }
   758  func rewriteValue386_Op386ADDL(v *Value) bool {
   759  	v_1 := v.Args[1]
   760  	v_0 := v.Args[0]
   761  	// match: (ADDL x (MOVLconst <t> [c]))
   762  	// cond: !t.IsPtr()
   763  	// result: (ADDLconst [c] x)
   764  	for {
   765  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   766  			x := v_0
   767  			if v_1.Op != Op386MOVLconst {
   768  				continue
   769  			}
   770  			t := v_1.Type
   771  			c := auxIntToInt32(v_1.AuxInt)
   772  			if !(!t.IsPtr()) {
   773  				continue
   774  			}
   775  			v.reset(Op386ADDLconst)
   776  			v.AuxInt = int32ToAuxInt(c)
   777  			v.AddArg(x)
   778  			return true
   779  		}
   780  		break
   781  	}
   782  	// match: (ADDL x (SHLLconst [3] y))
   783  	// result: (LEAL8 x y)
   784  	for {
   785  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   786  			x := v_0
   787  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
   788  				continue
   789  			}
   790  			y := v_1.Args[0]
   791  			v.reset(Op386LEAL8)
   792  			v.AddArg2(x, y)
   793  			return true
   794  		}
   795  		break
   796  	}
   797  	// match: (ADDL x (SHLLconst [2] y))
   798  	// result: (LEAL4 x y)
   799  	for {
   800  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   801  			x := v_0
   802  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
   803  				continue
   804  			}
   805  			y := v_1.Args[0]
   806  			v.reset(Op386LEAL4)
   807  			v.AddArg2(x, y)
   808  			return true
   809  		}
   810  		break
   811  	}
   812  	// match: (ADDL x (SHLLconst [1] y))
   813  	// result: (LEAL2 x y)
   814  	for {
   815  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   816  			x := v_0
   817  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
   818  				continue
   819  			}
   820  			y := v_1.Args[0]
   821  			v.reset(Op386LEAL2)
   822  			v.AddArg2(x, y)
   823  			return true
   824  		}
   825  		break
   826  	}
   827  	// match: (ADDL x (ADDL y y))
   828  	// result: (LEAL2 x y)
   829  	for {
   830  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   831  			x := v_0
   832  			if v_1.Op != Op386ADDL {
   833  				continue
   834  			}
   835  			y := v_1.Args[1]
   836  			if y != v_1.Args[0] {
   837  				continue
   838  			}
   839  			v.reset(Op386LEAL2)
   840  			v.AddArg2(x, y)
   841  			return true
   842  		}
   843  		break
   844  	}
   845  	// match: (ADDL x (ADDL x y))
   846  	// result: (LEAL2 y x)
   847  	for {
   848  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   849  			x := v_0
   850  			if v_1.Op != Op386ADDL {
   851  				continue
   852  			}
   853  			_ = v_1.Args[1]
   854  			v_1_0 := v_1.Args[0]
   855  			v_1_1 := v_1.Args[1]
   856  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
   857  				if x != v_1_0 {
   858  					continue
   859  				}
   860  				y := v_1_1
   861  				v.reset(Op386LEAL2)
   862  				v.AddArg2(y, x)
   863  				return true
   864  			}
   865  		}
   866  		break
   867  	}
   868  	// match: (ADDL (ADDLconst [c] x) y)
   869  	// result: (LEAL1 [c] x y)
   870  	for {
   871  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   872  			if v_0.Op != Op386ADDLconst {
   873  				continue
   874  			}
   875  			c := auxIntToInt32(v_0.AuxInt)
   876  			x := v_0.Args[0]
   877  			y := v_1
   878  			v.reset(Op386LEAL1)
   879  			v.AuxInt = int32ToAuxInt(c)
   880  			v.AddArg2(x, y)
   881  			return true
   882  		}
   883  		break
   884  	}
   885  	// match: (ADDL x (LEAL [c] {s} y))
   886  	// cond: x.Op != OpSB && y.Op != OpSB
   887  	// result: (LEAL1 [c] {s} x y)
   888  	for {
   889  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   890  			x := v_0
   891  			if v_1.Op != Op386LEAL {
   892  				continue
   893  			}
   894  			c := auxIntToInt32(v_1.AuxInt)
   895  			s := auxToSym(v_1.Aux)
   896  			y := v_1.Args[0]
   897  			if !(x.Op != OpSB && y.Op != OpSB) {
   898  				continue
   899  			}
   900  			v.reset(Op386LEAL1)
   901  			v.AuxInt = int32ToAuxInt(c)
   902  			v.Aux = symToAux(s)
   903  			v.AddArg2(x, y)
   904  			return true
   905  		}
   906  		break
   907  	}
   908  	// match: (ADDL x l:(MOVLload [off] {sym} ptr mem))
   909  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
   910  	// result: (ADDLload x [off] {sym} ptr mem)
   911  	for {
   912  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   913  			x := v_0
   914  			l := v_1
   915  			if l.Op != Op386MOVLload {
   916  				continue
   917  			}
   918  			off := auxIntToInt32(l.AuxInt)
   919  			sym := auxToSym(l.Aux)
   920  			mem := l.Args[1]
   921  			ptr := l.Args[0]
   922  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
   923  				continue
   924  			}
   925  			v.reset(Op386ADDLload)
   926  			v.AuxInt = int32ToAuxInt(off)
   927  			v.Aux = symToAux(sym)
   928  			v.AddArg3(x, ptr, mem)
   929  			return true
   930  		}
   931  		break
   932  	}
   933  	// match: (ADDL x (NEGL y))
   934  	// result: (SUBL x y)
   935  	for {
   936  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   937  			x := v_0
   938  			if v_1.Op != Op386NEGL {
   939  				continue
   940  			}
   941  			y := v_1.Args[0]
   942  			v.reset(Op386SUBL)
   943  			v.AddArg2(x, y)
   944  			return true
   945  		}
   946  		break
   947  	}
   948  	return false
   949  }
   950  func rewriteValue386_Op386ADDLcarry(v *Value) bool {
   951  	v_1 := v.Args[1]
   952  	v_0 := v.Args[0]
   953  	// match: (ADDLcarry x (MOVLconst [c]))
   954  	// result: (ADDLconstcarry [c] x)
   955  	for {
   956  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   957  			x := v_0
   958  			if v_1.Op != Op386MOVLconst {
   959  				continue
   960  			}
   961  			c := auxIntToInt32(v_1.AuxInt)
   962  			v.reset(Op386ADDLconstcarry)
   963  			v.AuxInt = int32ToAuxInt(c)
   964  			v.AddArg(x)
   965  			return true
   966  		}
   967  		break
   968  	}
   969  	return false
   970  }
   971  func rewriteValue386_Op386ADDLconst(v *Value) bool {
   972  	v_0 := v.Args[0]
   973  	// match: (ADDLconst [c] (ADDL x y))
   974  	// result: (LEAL1 [c] x y)
   975  	for {
   976  		c := auxIntToInt32(v.AuxInt)
   977  		if v_0.Op != Op386ADDL {
   978  			break
   979  		}
   980  		y := v_0.Args[1]
   981  		x := v_0.Args[0]
   982  		v.reset(Op386LEAL1)
   983  		v.AuxInt = int32ToAuxInt(c)
   984  		v.AddArg2(x, y)
   985  		return true
   986  	}
   987  	// match: (ADDLconst [c] (LEAL [d] {s} x))
   988  	// cond: is32Bit(int64(c)+int64(d))
   989  	// result: (LEAL [c+d] {s} x)
   990  	for {
   991  		c := auxIntToInt32(v.AuxInt)
   992  		if v_0.Op != Op386LEAL {
   993  			break
   994  		}
   995  		d := auxIntToInt32(v_0.AuxInt)
   996  		s := auxToSym(v_0.Aux)
   997  		x := v_0.Args[0]
   998  		if !(is32Bit(int64(c) + int64(d))) {
   999  			break
  1000  		}
  1001  		v.reset(Op386LEAL)
  1002  		v.AuxInt = int32ToAuxInt(c + d)
  1003  		v.Aux = symToAux(s)
  1004  		v.AddArg(x)
  1005  		return true
  1006  	}
  1007  	// match: (ADDLconst [c] x:(SP))
  1008  	// result: (LEAL [c] x)
  1009  	for {
  1010  		c := auxIntToInt32(v.AuxInt)
  1011  		x := v_0
  1012  		if x.Op != OpSP {
  1013  			break
  1014  		}
  1015  		v.reset(Op386LEAL)
  1016  		v.AuxInt = int32ToAuxInt(c)
  1017  		v.AddArg(x)
  1018  		return true
  1019  	}
  1020  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
  1021  	// cond: is32Bit(int64(c)+int64(d))
  1022  	// result: (LEAL1 [c+d] {s} x y)
  1023  	for {
  1024  		c := auxIntToInt32(v.AuxInt)
  1025  		if v_0.Op != Op386LEAL1 {
  1026  			break
  1027  		}
  1028  		d := auxIntToInt32(v_0.AuxInt)
  1029  		s := auxToSym(v_0.Aux)
  1030  		y := v_0.Args[1]
  1031  		x := v_0.Args[0]
  1032  		if !(is32Bit(int64(c) + int64(d))) {
  1033  			break
  1034  		}
  1035  		v.reset(Op386LEAL1)
  1036  		v.AuxInt = int32ToAuxInt(c + d)
  1037  		v.Aux = symToAux(s)
  1038  		v.AddArg2(x, y)
  1039  		return true
  1040  	}
  1041  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
  1042  	// cond: is32Bit(int64(c)+int64(d))
  1043  	// result: (LEAL2 [c+d] {s} x y)
  1044  	for {
  1045  		c := auxIntToInt32(v.AuxInt)
  1046  		if v_0.Op != Op386LEAL2 {
  1047  			break
  1048  		}
  1049  		d := auxIntToInt32(v_0.AuxInt)
  1050  		s := auxToSym(v_0.Aux)
  1051  		y := v_0.Args[1]
  1052  		x := v_0.Args[0]
  1053  		if !(is32Bit(int64(c) + int64(d))) {
  1054  			break
  1055  		}
  1056  		v.reset(Op386LEAL2)
  1057  		v.AuxInt = int32ToAuxInt(c + d)
  1058  		v.Aux = symToAux(s)
  1059  		v.AddArg2(x, y)
  1060  		return true
  1061  	}
  1062  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
  1063  	// cond: is32Bit(int64(c)+int64(d))
  1064  	// result: (LEAL4 [c+d] {s} x y)
  1065  	for {
  1066  		c := auxIntToInt32(v.AuxInt)
  1067  		if v_0.Op != Op386LEAL4 {
  1068  			break
  1069  		}
  1070  		d := auxIntToInt32(v_0.AuxInt)
  1071  		s := auxToSym(v_0.Aux)
  1072  		y := v_0.Args[1]
  1073  		x := v_0.Args[0]
  1074  		if !(is32Bit(int64(c) + int64(d))) {
  1075  			break
  1076  		}
  1077  		v.reset(Op386LEAL4)
  1078  		v.AuxInt = int32ToAuxInt(c + d)
  1079  		v.Aux = symToAux(s)
  1080  		v.AddArg2(x, y)
  1081  		return true
  1082  	}
  1083  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1084  	// cond: is32Bit(int64(c)+int64(d))
  1085  	// result: (LEAL8 [c+d] {s} x y)
  1086  	for {
  1087  		c := auxIntToInt32(v.AuxInt)
  1088  		if v_0.Op != Op386LEAL8 {
  1089  			break
  1090  		}
  1091  		d := auxIntToInt32(v_0.AuxInt)
  1092  		s := auxToSym(v_0.Aux)
  1093  		y := v_0.Args[1]
  1094  		x := v_0.Args[0]
  1095  		if !(is32Bit(int64(c) + int64(d))) {
  1096  			break
  1097  		}
  1098  		v.reset(Op386LEAL8)
  1099  		v.AuxInt = int32ToAuxInt(c + d)
  1100  		v.Aux = symToAux(s)
  1101  		v.AddArg2(x, y)
  1102  		return true
  1103  	}
  1104  	// match: (ADDLconst [c] x)
  1105  	// cond: c==0
  1106  	// result: x
  1107  	for {
  1108  		c := auxIntToInt32(v.AuxInt)
  1109  		x := v_0
  1110  		if !(c == 0) {
  1111  			break
  1112  		}
  1113  		v.copyOf(x)
  1114  		return true
  1115  	}
  1116  	// match: (ADDLconst [c] (MOVLconst [d]))
  1117  	// result: (MOVLconst [c+d])
  1118  	for {
  1119  		c := auxIntToInt32(v.AuxInt)
  1120  		if v_0.Op != Op386MOVLconst {
  1121  			break
  1122  		}
  1123  		d := auxIntToInt32(v_0.AuxInt)
  1124  		v.reset(Op386MOVLconst)
  1125  		v.AuxInt = int32ToAuxInt(c + d)
  1126  		return true
  1127  	}
  1128  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1129  	// result: (ADDLconst [c+d] x)
  1130  	for {
  1131  		c := auxIntToInt32(v.AuxInt)
  1132  		if v_0.Op != Op386ADDLconst {
  1133  			break
  1134  		}
  1135  		d := auxIntToInt32(v_0.AuxInt)
  1136  		x := v_0.Args[0]
  1137  		v.reset(Op386ADDLconst)
  1138  		v.AuxInt = int32ToAuxInt(c + d)
  1139  		v.AddArg(x)
  1140  		return true
  1141  	}
  1142  	return false
  1143  }
  1144  func rewriteValue386_Op386ADDLconstmodify(v *Value) bool {
  1145  	v_1 := v.Args[1]
  1146  	v_0 := v.Args[0]
  1147  	b := v.Block
  1148  	config := b.Func.Config
  1149  	// match: (ADDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1150  	// cond: valoff1.canAdd32(off2)
  1151  	// result: (ADDLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  1152  	for {
  1153  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1154  		sym := auxToSym(v.Aux)
  1155  		if v_0.Op != Op386ADDLconst {
  1156  			break
  1157  		}
  1158  		off2 := auxIntToInt32(v_0.AuxInt)
  1159  		base := v_0.Args[0]
  1160  		mem := v_1
  1161  		if !(valoff1.canAdd32(off2)) {
  1162  			break
  1163  		}
  1164  		v.reset(Op386ADDLconstmodify)
  1165  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1166  		v.Aux = symToAux(sym)
  1167  		v.AddArg2(base, mem)
  1168  		return true
  1169  	}
  1170  	// match: (ADDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1171  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1172  	// result: (ADDLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  1173  	for {
  1174  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1175  		sym1 := auxToSym(v.Aux)
  1176  		if v_0.Op != Op386LEAL {
  1177  			break
  1178  		}
  1179  		off2 := auxIntToInt32(v_0.AuxInt)
  1180  		sym2 := auxToSym(v_0.Aux)
  1181  		base := v_0.Args[0]
  1182  		mem := v_1
  1183  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1184  			break
  1185  		}
  1186  		v.reset(Op386ADDLconstmodify)
  1187  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1188  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1189  		v.AddArg2(base, mem)
  1190  		return true
  1191  	}
  1192  	return false
  1193  }
  1194  func rewriteValue386_Op386ADDLload(v *Value) bool {
  1195  	v_2 := v.Args[2]
  1196  	v_1 := v.Args[1]
  1197  	v_0 := v.Args[0]
  1198  	b := v.Block
  1199  	config := b.Func.Config
  1200  	// match: (ADDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1201  	// cond: is32Bit(int64(off1)+int64(off2))
  1202  	// result: (ADDLload [off1+off2] {sym} val base mem)
  1203  	for {
  1204  		off1 := auxIntToInt32(v.AuxInt)
  1205  		sym := auxToSym(v.Aux)
  1206  		val := v_0
  1207  		if v_1.Op != Op386ADDLconst {
  1208  			break
  1209  		}
  1210  		off2 := auxIntToInt32(v_1.AuxInt)
  1211  		base := v_1.Args[0]
  1212  		mem := v_2
  1213  		if !(is32Bit(int64(off1) + int64(off2))) {
  1214  			break
  1215  		}
  1216  		v.reset(Op386ADDLload)
  1217  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1218  		v.Aux = symToAux(sym)
  1219  		v.AddArg3(val, base, mem)
  1220  		return true
  1221  	}
  1222  	// match: (ADDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1223  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1224  	// result: (ADDLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1225  	for {
  1226  		off1 := auxIntToInt32(v.AuxInt)
  1227  		sym1 := auxToSym(v.Aux)
  1228  		val := v_0
  1229  		if v_1.Op != Op386LEAL {
  1230  			break
  1231  		}
  1232  		off2 := auxIntToInt32(v_1.AuxInt)
  1233  		sym2 := auxToSym(v_1.Aux)
  1234  		base := v_1.Args[0]
  1235  		mem := v_2
  1236  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1237  			break
  1238  		}
  1239  		v.reset(Op386ADDLload)
  1240  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1241  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1242  		v.AddArg3(val, base, mem)
  1243  		return true
  1244  	}
  1245  	return false
  1246  }
  1247  func rewriteValue386_Op386ADDLmodify(v *Value) bool {
  1248  	v_2 := v.Args[2]
  1249  	v_1 := v.Args[1]
  1250  	v_0 := v.Args[0]
  1251  	b := v.Block
  1252  	config := b.Func.Config
  1253  	// match: (ADDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1254  	// cond: is32Bit(int64(off1)+int64(off2))
  1255  	// result: (ADDLmodify [off1+off2] {sym} base val mem)
  1256  	for {
  1257  		off1 := auxIntToInt32(v.AuxInt)
  1258  		sym := auxToSym(v.Aux)
  1259  		if v_0.Op != Op386ADDLconst {
  1260  			break
  1261  		}
  1262  		off2 := auxIntToInt32(v_0.AuxInt)
  1263  		base := v_0.Args[0]
  1264  		val := v_1
  1265  		mem := v_2
  1266  		if !(is32Bit(int64(off1) + int64(off2))) {
  1267  			break
  1268  		}
  1269  		v.reset(Op386ADDLmodify)
  1270  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1271  		v.Aux = symToAux(sym)
  1272  		v.AddArg3(base, val, mem)
  1273  		return true
  1274  	}
  1275  	// match: (ADDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1276  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1277  	// result: (ADDLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  1278  	for {
  1279  		off1 := auxIntToInt32(v.AuxInt)
  1280  		sym1 := auxToSym(v.Aux)
  1281  		if v_0.Op != Op386LEAL {
  1282  			break
  1283  		}
  1284  		off2 := auxIntToInt32(v_0.AuxInt)
  1285  		sym2 := auxToSym(v_0.Aux)
  1286  		base := v_0.Args[0]
  1287  		val := v_1
  1288  		mem := v_2
  1289  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1290  			break
  1291  		}
  1292  		v.reset(Op386ADDLmodify)
  1293  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1294  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1295  		v.AddArg3(base, val, mem)
  1296  		return true
  1297  	}
  1298  	return false
  1299  }
  1300  func rewriteValue386_Op386ADDSD(v *Value) bool {
  1301  	v_1 := v.Args[1]
  1302  	v_0 := v.Args[0]
  1303  	// match: (ADDSD x l:(MOVSDload [off] {sym} ptr mem))
  1304  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1305  	// result: (ADDSDload x [off] {sym} ptr mem)
  1306  	for {
  1307  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1308  			x := v_0
  1309  			l := v_1
  1310  			if l.Op != Op386MOVSDload {
  1311  				continue
  1312  			}
  1313  			off := auxIntToInt32(l.AuxInt)
  1314  			sym := auxToSym(l.Aux)
  1315  			mem := l.Args[1]
  1316  			ptr := l.Args[0]
  1317  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1318  				continue
  1319  			}
  1320  			v.reset(Op386ADDSDload)
  1321  			v.AuxInt = int32ToAuxInt(off)
  1322  			v.Aux = symToAux(sym)
  1323  			v.AddArg3(x, ptr, mem)
  1324  			return true
  1325  		}
  1326  		break
  1327  	}
  1328  	return false
  1329  }
  1330  func rewriteValue386_Op386ADDSDload(v *Value) bool {
  1331  	v_2 := v.Args[2]
  1332  	v_1 := v.Args[1]
  1333  	v_0 := v.Args[0]
  1334  	b := v.Block
  1335  	config := b.Func.Config
  1336  	// match: (ADDSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  1337  	// cond: is32Bit(int64(off1)+int64(off2))
  1338  	// result: (ADDSDload [off1+off2] {sym} val base mem)
  1339  	for {
  1340  		off1 := auxIntToInt32(v.AuxInt)
  1341  		sym := auxToSym(v.Aux)
  1342  		val := v_0
  1343  		if v_1.Op != Op386ADDLconst {
  1344  			break
  1345  		}
  1346  		off2 := auxIntToInt32(v_1.AuxInt)
  1347  		base := v_1.Args[0]
  1348  		mem := v_2
  1349  		if !(is32Bit(int64(off1) + int64(off2))) {
  1350  			break
  1351  		}
  1352  		v.reset(Op386ADDSDload)
  1353  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1354  		v.Aux = symToAux(sym)
  1355  		v.AddArg3(val, base, mem)
  1356  		return true
  1357  	}
  1358  	// match: (ADDSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1359  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1360  	// result: (ADDSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1361  	for {
  1362  		off1 := auxIntToInt32(v.AuxInt)
  1363  		sym1 := auxToSym(v.Aux)
  1364  		val := v_0
  1365  		if v_1.Op != Op386LEAL {
  1366  			break
  1367  		}
  1368  		off2 := auxIntToInt32(v_1.AuxInt)
  1369  		sym2 := auxToSym(v_1.Aux)
  1370  		base := v_1.Args[0]
  1371  		mem := v_2
  1372  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1373  			break
  1374  		}
  1375  		v.reset(Op386ADDSDload)
  1376  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1377  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1378  		v.AddArg3(val, base, mem)
  1379  		return true
  1380  	}
  1381  	return false
  1382  }
  1383  func rewriteValue386_Op386ADDSS(v *Value) bool {
  1384  	v_1 := v.Args[1]
  1385  	v_0 := v.Args[0]
  1386  	// match: (ADDSS x l:(MOVSSload [off] {sym} ptr mem))
  1387  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1388  	// result: (ADDSSload x [off] {sym} ptr mem)
  1389  	for {
  1390  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1391  			x := v_0
  1392  			l := v_1
  1393  			if l.Op != Op386MOVSSload {
  1394  				continue
  1395  			}
  1396  			off := auxIntToInt32(l.AuxInt)
  1397  			sym := auxToSym(l.Aux)
  1398  			mem := l.Args[1]
  1399  			ptr := l.Args[0]
  1400  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1401  				continue
  1402  			}
  1403  			v.reset(Op386ADDSSload)
  1404  			v.AuxInt = int32ToAuxInt(off)
  1405  			v.Aux = symToAux(sym)
  1406  			v.AddArg3(x, ptr, mem)
  1407  			return true
  1408  		}
  1409  		break
  1410  	}
  1411  	return false
  1412  }
  1413  func rewriteValue386_Op386ADDSSload(v *Value) bool {
  1414  	v_2 := v.Args[2]
  1415  	v_1 := v.Args[1]
  1416  	v_0 := v.Args[0]
  1417  	b := v.Block
  1418  	config := b.Func.Config
  1419  	// match: (ADDSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  1420  	// cond: is32Bit(int64(off1)+int64(off2))
  1421  	// result: (ADDSSload [off1+off2] {sym} val base mem)
  1422  	for {
  1423  		off1 := auxIntToInt32(v.AuxInt)
  1424  		sym := auxToSym(v.Aux)
  1425  		val := v_0
  1426  		if v_1.Op != Op386ADDLconst {
  1427  			break
  1428  		}
  1429  		off2 := auxIntToInt32(v_1.AuxInt)
  1430  		base := v_1.Args[0]
  1431  		mem := v_2
  1432  		if !(is32Bit(int64(off1) + int64(off2))) {
  1433  			break
  1434  		}
  1435  		v.reset(Op386ADDSSload)
  1436  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1437  		v.Aux = symToAux(sym)
  1438  		v.AddArg3(val, base, mem)
  1439  		return true
  1440  	}
  1441  	// match: (ADDSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1442  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1443  	// result: (ADDSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1444  	for {
  1445  		off1 := auxIntToInt32(v.AuxInt)
  1446  		sym1 := auxToSym(v.Aux)
  1447  		val := v_0
  1448  		if v_1.Op != Op386LEAL {
  1449  			break
  1450  		}
  1451  		off2 := auxIntToInt32(v_1.AuxInt)
  1452  		sym2 := auxToSym(v_1.Aux)
  1453  		base := v_1.Args[0]
  1454  		mem := v_2
  1455  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1456  			break
  1457  		}
  1458  		v.reset(Op386ADDSSload)
  1459  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1460  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1461  		v.AddArg3(val, base, mem)
  1462  		return true
  1463  	}
  1464  	return false
  1465  }
  1466  func rewriteValue386_Op386ANDL(v *Value) bool {
  1467  	v_1 := v.Args[1]
  1468  	v_0 := v.Args[0]
  1469  	// match: (ANDL x (MOVLconst [c]))
  1470  	// result: (ANDLconst [c] x)
  1471  	for {
  1472  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1473  			x := v_0
  1474  			if v_1.Op != Op386MOVLconst {
  1475  				continue
  1476  			}
  1477  			c := auxIntToInt32(v_1.AuxInt)
  1478  			v.reset(Op386ANDLconst)
  1479  			v.AuxInt = int32ToAuxInt(c)
  1480  			v.AddArg(x)
  1481  			return true
  1482  		}
  1483  		break
  1484  	}
  1485  	// match: (ANDL x l:(MOVLload [off] {sym} ptr mem))
  1486  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1487  	// result: (ANDLload x [off] {sym} ptr mem)
  1488  	for {
  1489  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1490  			x := v_0
  1491  			l := v_1
  1492  			if l.Op != Op386MOVLload {
  1493  				continue
  1494  			}
  1495  			off := auxIntToInt32(l.AuxInt)
  1496  			sym := auxToSym(l.Aux)
  1497  			mem := l.Args[1]
  1498  			ptr := l.Args[0]
  1499  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1500  				continue
  1501  			}
  1502  			v.reset(Op386ANDLload)
  1503  			v.AuxInt = int32ToAuxInt(off)
  1504  			v.Aux = symToAux(sym)
  1505  			v.AddArg3(x, ptr, mem)
  1506  			return true
  1507  		}
  1508  		break
  1509  	}
  1510  	// match: (ANDL x x)
  1511  	// result: x
  1512  	for {
  1513  		x := v_0
  1514  		if x != v_1 {
  1515  			break
  1516  		}
  1517  		v.copyOf(x)
  1518  		return true
  1519  	}
  1520  	return false
  1521  }
  1522  func rewriteValue386_Op386ANDLconst(v *Value) bool {
  1523  	v_0 := v.Args[0]
  1524  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1525  	// result: (ANDLconst [c & d] x)
  1526  	for {
  1527  		c := auxIntToInt32(v.AuxInt)
  1528  		if v_0.Op != Op386ANDLconst {
  1529  			break
  1530  		}
  1531  		d := auxIntToInt32(v_0.AuxInt)
  1532  		x := v_0.Args[0]
  1533  		v.reset(Op386ANDLconst)
  1534  		v.AuxInt = int32ToAuxInt(c & d)
  1535  		v.AddArg(x)
  1536  		return true
  1537  	}
  1538  	// match: (ANDLconst [c] _)
  1539  	// cond: c==0
  1540  	// result: (MOVLconst [0])
  1541  	for {
  1542  		c := auxIntToInt32(v.AuxInt)
  1543  		if !(c == 0) {
  1544  			break
  1545  		}
  1546  		v.reset(Op386MOVLconst)
  1547  		v.AuxInt = int32ToAuxInt(0)
  1548  		return true
  1549  	}
  1550  	// match: (ANDLconst [c] x)
  1551  	// cond: c==-1
  1552  	// result: x
  1553  	for {
  1554  		c := auxIntToInt32(v.AuxInt)
  1555  		x := v_0
  1556  		if !(c == -1) {
  1557  			break
  1558  		}
  1559  		v.copyOf(x)
  1560  		return true
  1561  	}
  1562  	// match: (ANDLconst [c] (MOVLconst [d]))
  1563  	// result: (MOVLconst [c&d])
  1564  	for {
  1565  		c := auxIntToInt32(v.AuxInt)
  1566  		if v_0.Op != Op386MOVLconst {
  1567  			break
  1568  		}
  1569  		d := auxIntToInt32(v_0.AuxInt)
  1570  		v.reset(Op386MOVLconst)
  1571  		v.AuxInt = int32ToAuxInt(c & d)
  1572  		return true
  1573  	}
  1574  	return false
  1575  }
  1576  func rewriteValue386_Op386ANDLconstmodify(v *Value) bool {
  1577  	v_1 := v.Args[1]
  1578  	v_0 := v.Args[0]
  1579  	b := v.Block
  1580  	config := b.Func.Config
  1581  	// match: (ANDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1582  	// cond: valoff1.canAdd32(off2)
  1583  	// result: (ANDLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  1584  	for {
  1585  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1586  		sym := auxToSym(v.Aux)
  1587  		if v_0.Op != Op386ADDLconst {
  1588  			break
  1589  		}
  1590  		off2 := auxIntToInt32(v_0.AuxInt)
  1591  		base := v_0.Args[0]
  1592  		mem := v_1
  1593  		if !(valoff1.canAdd32(off2)) {
  1594  			break
  1595  		}
  1596  		v.reset(Op386ANDLconstmodify)
  1597  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1598  		v.Aux = symToAux(sym)
  1599  		v.AddArg2(base, mem)
  1600  		return true
  1601  	}
  1602  	// match: (ANDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1603  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1604  	// result: (ANDLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  1605  	for {
  1606  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1607  		sym1 := auxToSym(v.Aux)
  1608  		if v_0.Op != Op386LEAL {
  1609  			break
  1610  		}
  1611  		off2 := auxIntToInt32(v_0.AuxInt)
  1612  		sym2 := auxToSym(v_0.Aux)
  1613  		base := v_0.Args[0]
  1614  		mem := v_1
  1615  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1616  			break
  1617  		}
  1618  		v.reset(Op386ANDLconstmodify)
  1619  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1620  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1621  		v.AddArg2(base, mem)
  1622  		return true
  1623  	}
  1624  	return false
  1625  }
  1626  func rewriteValue386_Op386ANDLload(v *Value) bool {
  1627  	v_2 := v.Args[2]
  1628  	v_1 := v.Args[1]
  1629  	v_0 := v.Args[0]
  1630  	b := v.Block
  1631  	config := b.Func.Config
  1632  	// match: (ANDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1633  	// cond: is32Bit(int64(off1)+int64(off2))
  1634  	// result: (ANDLload [off1+off2] {sym} val base mem)
  1635  	for {
  1636  		off1 := auxIntToInt32(v.AuxInt)
  1637  		sym := auxToSym(v.Aux)
  1638  		val := v_0
  1639  		if v_1.Op != Op386ADDLconst {
  1640  			break
  1641  		}
  1642  		off2 := auxIntToInt32(v_1.AuxInt)
  1643  		base := v_1.Args[0]
  1644  		mem := v_2
  1645  		if !(is32Bit(int64(off1) + int64(off2))) {
  1646  			break
  1647  		}
  1648  		v.reset(Op386ANDLload)
  1649  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1650  		v.Aux = symToAux(sym)
  1651  		v.AddArg3(val, base, mem)
  1652  		return true
  1653  	}
  1654  	// match: (ANDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1655  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1656  	// result: (ANDLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1657  	for {
  1658  		off1 := auxIntToInt32(v.AuxInt)
  1659  		sym1 := auxToSym(v.Aux)
  1660  		val := v_0
  1661  		if v_1.Op != Op386LEAL {
  1662  			break
  1663  		}
  1664  		off2 := auxIntToInt32(v_1.AuxInt)
  1665  		sym2 := auxToSym(v_1.Aux)
  1666  		base := v_1.Args[0]
  1667  		mem := v_2
  1668  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1669  			break
  1670  		}
  1671  		v.reset(Op386ANDLload)
  1672  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1673  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1674  		v.AddArg3(val, base, mem)
  1675  		return true
  1676  	}
  1677  	return false
  1678  }
  1679  func rewriteValue386_Op386ANDLmodify(v *Value) bool {
  1680  	v_2 := v.Args[2]
  1681  	v_1 := v.Args[1]
  1682  	v_0 := v.Args[0]
  1683  	b := v.Block
  1684  	config := b.Func.Config
  1685  	// match: (ANDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1686  	// cond: is32Bit(int64(off1)+int64(off2))
  1687  	// result: (ANDLmodify [off1+off2] {sym} base val mem)
  1688  	for {
  1689  		off1 := auxIntToInt32(v.AuxInt)
  1690  		sym := auxToSym(v.Aux)
  1691  		if v_0.Op != Op386ADDLconst {
  1692  			break
  1693  		}
  1694  		off2 := auxIntToInt32(v_0.AuxInt)
  1695  		base := v_0.Args[0]
  1696  		val := v_1
  1697  		mem := v_2
  1698  		if !(is32Bit(int64(off1) + int64(off2))) {
  1699  			break
  1700  		}
  1701  		v.reset(Op386ANDLmodify)
  1702  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1703  		v.Aux = symToAux(sym)
  1704  		v.AddArg3(base, val, mem)
  1705  		return true
  1706  	}
  1707  	// match: (ANDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1708  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1709  	// result: (ANDLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  1710  	for {
  1711  		off1 := auxIntToInt32(v.AuxInt)
  1712  		sym1 := auxToSym(v.Aux)
  1713  		if v_0.Op != Op386LEAL {
  1714  			break
  1715  		}
  1716  		off2 := auxIntToInt32(v_0.AuxInt)
  1717  		sym2 := auxToSym(v_0.Aux)
  1718  		base := v_0.Args[0]
  1719  		val := v_1
  1720  		mem := v_2
  1721  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1722  			break
  1723  		}
  1724  		v.reset(Op386ANDLmodify)
  1725  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1726  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1727  		v.AddArg3(base, val, mem)
  1728  		return true
  1729  	}
  1730  	return false
  1731  }
  1732  func rewriteValue386_Op386CMPB(v *Value) bool {
  1733  	v_1 := v.Args[1]
  1734  	v_0 := v.Args[0]
  1735  	b := v.Block
  1736  	// match: (CMPB x (MOVLconst [c]))
  1737  	// result: (CMPBconst x [int8(c)])
  1738  	for {
  1739  		x := v_0
  1740  		if v_1.Op != Op386MOVLconst {
  1741  			break
  1742  		}
  1743  		c := auxIntToInt32(v_1.AuxInt)
  1744  		v.reset(Op386CMPBconst)
  1745  		v.AuxInt = int8ToAuxInt(int8(c))
  1746  		v.AddArg(x)
  1747  		return true
  1748  	}
  1749  	// match: (CMPB (MOVLconst [c]) x)
  1750  	// result: (InvertFlags (CMPBconst x [int8(c)]))
  1751  	for {
  1752  		if v_0.Op != Op386MOVLconst {
  1753  			break
  1754  		}
  1755  		c := auxIntToInt32(v_0.AuxInt)
  1756  		x := v_1
  1757  		v.reset(Op386InvertFlags)
  1758  		v0 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  1759  		v0.AuxInt = int8ToAuxInt(int8(c))
  1760  		v0.AddArg(x)
  1761  		v.AddArg(v0)
  1762  		return true
  1763  	}
  1764  	// match: (CMPB x y)
  1765  	// cond: canonLessThan(x,y)
  1766  	// result: (InvertFlags (CMPB y x))
  1767  	for {
  1768  		x := v_0
  1769  		y := v_1
  1770  		if !(canonLessThan(x, y)) {
  1771  			break
  1772  		}
  1773  		v.reset(Op386InvertFlags)
  1774  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  1775  		v0.AddArg2(y, x)
  1776  		v.AddArg(v0)
  1777  		return true
  1778  	}
  1779  	// match: (CMPB l:(MOVBload {sym} [off] ptr mem) x)
  1780  	// cond: canMergeLoad(v, l) && clobber(l)
  1781  	// result: (CMPBload {sym} [off] ptr x mem)
  1782  	for {
  1783  		l := v_0
  1784  		if l.Op != Op386MOVBload {
  1785  			break
  1786  		}
  1787  		off := auxIntToInt32(l.AuxInt)
  1788  		sym := auxToSym(l.Aux)
  1789  		mem := l.Args[1]
  1790  		ptr := l.Args[0]
  1791  		x := v_1
  1792  		if !(canMergeLoad(v, l) && clobber(l)) {
  1793  			break
  1794  		}
  1795  		v.reset(Op386CMPBload)
  1796  		v.AuxInt = int32ToAuxInt(off)
  1797  		v.Aux = symToAux(sym)
  1798  		v.AddArg3(ptr, x, mem)
  1799  		return true
  1800  	}
  1801  	// match: (CMPB x l:(MOVBload {sym} [off] ptr mem))
  1802  	// cond: canMergeLoad(v, l) && clobber(l)
  1803  	// result: (InvertFlags (CMPBload {sym} [off] ptr x mem))
  1804  	for {
  1805  		x := v_0
  1806  		l := v_1
  1807  		if l.Op != Op386MOVBload {
  1808  			break
  1809  		}
  1810  		off := auxIntToInt32(l.AuxInt)
  1811  		sym := auxToSym(l.Aux)
  1812  		mem := l.Args[1]
  1813  		ptr := l.Args[0]
  1814  		if !(canMergeLoad(v, l) && clobber(l)) {
  1815  			break
  1816  		}
  1817  		v.reset(Op386InvertFlags)
  1818  		v0 := b.NewValue0(l.Pos, Op386CMPBload, types.TypeFlags)
  1819  		v0.AuxInt = int32ToAuxInt(off)
  1820  		v0.Aux = symToAux(sym)
  1821  		v0.AddArg3(ptr, x, mem)
  1822  		v.AddArg(v0)
  1823  		return true
  1824  	}
  1825  	return false
  1826  }
  1827  func rewriteValue386_Op386CMPBconst(v *Value) bool {
  1828  	v_0 := v.Args[0]
  1829  	b := v.Block
  1830  	// match: (CMPBconst (MOVLconst [x]) [y])
  1831  	// cond: int8(x)==y
  1832  	// result: (FlagEQ)
  1833  	for {
  1834  		y := auxIntToInt8(v.AuxInt)
  1835  		if v_0.Op != Op386MOVLconst {
  1836  			break
  1837  		}
  1838  		x := auxIntToInt32(v_0.AuxInt)
  1839  		if !(int8(x) == y) {
  1840  			break
  1841  		}
  1842  		v.reset(Op386FlagEQ)
  1843  		return true
  1844  	}
  1845  	// match: (CMPBconst (MOVLconst [x]) [y])
  1846  	// cond: int8(x)<y && uint8(x)<uint8(y)
  1847  	// result: (FlagLT_ULT)
  1848  	for {
  1849  		y := auxIntToInt8(v.AuxInt)
  1850  		if v_0.Op != Op386MOVLconst {
  1851  			break
  1852  		}
  1853  		x := auxIntToInt32(v_0.AuxInt)
  1854  		if !(int8(x) < y && uint8(x) < uint8(y)) {
  1855  			break
  1856  		}
  1857  		v.reset(Op386FlagLT_ULT)
  1858  		return true
  1859  	}
  1860  	// match: (CMPBconst (MOVLconst [x]) [y])
  1861  	// cond: int8(x)<y && uint8(x)>uint8(y)
  1862  	// result: (FlagLT_UGT)
  1863  	for {
  1864  		y := auxIntToInt8(v.AuxInt)
  1865  		if v_0.Op != Op386MOVLconst {
  1866  			break
  1867  		}
  1868  		x := auxIntToInt32(v_0.AuxInt)
  1869  		if !(int8(x) < y && uint8(x) > uint8(y)) {
  1870  			break
  1871  		}
  1872  		v.reset(Op386FlagLT_UGT)
  1873  		return true
  1874  	}
  1875  	// match: (CMPBconst (MOVLconst [x]) [y])
  1876  	// cond: int8(x)>y && uint8(x)<uint8(y)
  1877  	// result: (FlagGT_ULT)
  1878  	for {
  1879  		y := auxIntToInt8(v.AuxInt)
  1880  		if v_0.Op != Op386MOVLconst {
  1881  			break
  1882  		}
  1883  		x := auxIntToInt32(v_0.AuxInt)
  1884  		if !(int8(x) > y && uint8(x) < uint8(y)) {
  1885  			break
  1886  		}
  1887  		v.reset(Op386FlagGT_ULT)
  1888  		return true
  1889  	}
  1890  	// match: (CMPBconst (MOVLconst [x]) [y])
  1891  	// cond: int8(x)>y && uint8(x)>uint8(y)
  1892  	// result: (FlagGT_UGT)
  1893  	for {
  1894  		y := auxIntToInt8(v.AuxInt)
  1895  		if v_0.Op != Op386MOVLconst {
  1896  			break
  1897  		}
  1898  		x := auxIntToInt32(v_0.AuxInt)
  1899  		if !(int8(x) > y && uint8(x) > uint8(y)) {
  1900  			break
  1901  		}
  1902  		v.reset(Op386FlagGT_UGT)
  1903  		return true
  1904  	}
  1905  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1906  	// cond: 0 <= int8(m) && int8(m) < n
  1907  	// result: (FlagLT_ULT)
  1908  	for {
  1909  		n := auxIntToInt8(v.AuxInt)
  1910  		if v_0.Op != Op386ANDLconst {
  1911  			break
  1912  		}
  1913  		m := auxIntToInt32(v_0.AuxInt)
  1914  		if !(0 <= int8(m) && int8(m) < n) {
  1915  			break
  1916  		}
  1917  		v.reset(Op386FlagLT_ULT)
  1918  		return true
  1919  	}
  1920  	// match: (CMPBconst l:(ANDL x y) [0])
  1921  	// cond: l.Uses==1
  1922  	// result: (TESTB x y)
  1923  	for {
  1924  		if auxIntToInt8(v.AuxInt) != 0 {
  1925  			break
  1926  		}
  1927  		l := v_0
  1928  		if l.Op != Op386ANDL {
  1929  			break
  1930  		}
  1931  		y := l.Args[1]
  1932  		x := l.Args[0]
  1933  		if !(l.Uses == 1) {
  1934  			break
  1935  		}
  1936  		v.reset(Op386TESTB)
  1937  		v.AddArg2(x, y)
  1938  		return true
  1939  	}
  1940  	// match: (CMPBconst l:(ANDLconst [c] x) [0])
  1941  	// cond: l.Uses==1
  1942  	// result: (TESTBconst [int8(c)] x)
  1943  	for {
  1944  		if auxIntToInt8(v.AuxInt) != 0 {
  1945  			break
  1946  		}
  1947  		l := v_0
  1948  		if l.Op != Op386ANDLconst {
  1949  			break
  1950  		}
  1951  		c := auxIntToInt32(l.AuxInt)
  1952  		x := l.Args[0]
  1953  		if !(l.Uses == 1) {
  1954  			break
  1955  		}
  1956  		v.reset(Op386TESTBconst)
  1957  		v.AuxInt = int8ToAuxInt(int8(c))
  1958  		v.AddArg(x)
  1959  		return true
  1960  	}
  1961  	// match: (CMPBconst x [0])
  1962  	// result: (TESTB x x)
  1963  	for {
  1964  		if auxIntToInt8(v.AuxInt) != 0 {
  1965  			break
  1966  		}
  1967  		x := v_0
  1968  		v.reset(Op386TESTB)
  1969  		v.AddArg2(x, x)
  1970  		return true
  1971  	}
  1972  	// match: (CMPBconst l:(MOVBload {sym} [off] ptr mem) [c])
  1973  	// cond: l.Uses == 1 && clobber(l)
  1974  	// result: @l.Block (CMPBconstload {sym} [makeValAndOff(int32(c),off)] ptr mem)
  1975  	for {
  1976  		c := auxIntToInt8(v.AuxInt)
  1977  		l := v_0
  1978  		if l.Op != Op386MOVBload {
  1979  			break
  1980  		}
  1981  		off := auxIntToInt32(l.AuxInt)
  1982  		sym := auxToSym(l.Aux)
  1983  		mem := l.Args[1]
  1984  		ptr := l.Args[0]
  1985  		if !(l.Uses == 1 && clobber(l)) {
  1986  			break
  1987  		}
  1988  		b = l.Block
  1989  		v0 := b.NewValue0(l.Pos, Op386CMPBconstload, types.TypeFlags)
  1990  		v.copyOf(v0)
  1991  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  1992  		v0.Aux = symToAux(sym)
  1993  		v0.AddArg2(ptr, mem)
  1994  		return true
  1995  	}
  1996  	return false
  1997  }
  1998  func rewriteValue386_Op386CMPBload(v *Value) bool {
  1999  	v_2 := v.Args[2]
  2000  	v_1 := v.Args[1]
  2001  	v_0 := v.Args[0]
  2002  	// match: (CMPBload {sym} [off] ptr (MOVLconst [c]) mem)
  2003  	// result: (CMPBconstload {sym} [makeValAndOff(int32(int8(c)),off)] ptr mem)
  2004  	for {
  2005  		off := auxIntToInt32(v.AuxInt)
  2006  		sym := auxToSym(v.Aux)
  2007  		ptr := v_0
  2008  		if v_1.Op != Op386MOVLconst {
  2009  			break
  2010  		}
  2011  		c := auxIntToInt32(v_1.AuxInt)
  2012  		mem := v_2
  2013  		v.reset(Op386CMPBconstload)
  2014  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int8(c)), off))
  2015  		v.Aux = symToAux(sym)
  2016  		v.AddArg2(ptr, mem)
  2017  		return true
  2018  	}
  2019  	return false
  2020  }
  2021  func rewriteValue386_Op386CMPL(v *Value) bool {
  2022  	v_1 := v.Args[1]
  2023  	v_0 := v.Args[0]
  2024  	b := v.Block
  2025  	// match: (CMPL x (MOVLconst [c]))
  2026  	// result: (CMPLconst x [c])
  2027  	for {
  2028  		x := v_0
  2029  		if v_1.Op != Op386MOVLconst {
  2030  			break
  2031  		}
  2032  		c := auxIntToInt32(v_1.AuxInt)
  2033  		v.reset(Op386CMPLconst)
  2034  		v.AuxInt = int32ToAuxInt(c)
  2035  		v.AddArg(x)
  2036  		return true
  2037  	}
  2038  	// match: (CMPL (MOVLconst [c]) x)
  2039  	// result: (InvertFlags (CMPLconst x [c]))
  2040  	for {
  2041  		if v_0.Op != Op386MOVLconst {
  2042  			break
  2043  		}
  2044  		c := auxIntToInt32(v_0.AuxInt)
  2045  		x := v_1
  2046  		v.reset(Op386InvertFlags)
  2047  		v0 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  2048  		v0.AuxInt = int32ToAuxInt(c)
  2049  		v0.AddArg(x)
  2050  		v.AddArg(v0)
  2051  		return true
  2052  	}
  2053  	// match: (CMPL x y)
  2054  	// cond: canonLessThan(x,y)
  2055  	// result: (InvertFlags (CMPL y x))
  2056  	for {
  2057  		x := v_0
  2058  		y := v_1
  2059  		if !(canonLessThan(x, y)) {
  2060  			break
  2061  		}
  2062  		v.reset(Op386InvertFlags)
  2063  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  2064  		v0.AddArg2(y, x)
  2065  		v.AddArg(v0)
  2066  		return true
  2067  	}
  2068  	// match: (CMPL l:(MOVLload {sym} [off] ptr mem) x)
  2069  	// cond: canMergeLoad(v, l) && clobber(l)
  2070  	// result: (CMPLload {sym} [off] ptr x mem)
  2071  	for {
  2072  		l := v_0
  2073  		if l.Op != Op386MOVLload {
  2074  			break
  2075  		}
  2076  		off := auxIntToInt32(l.AuxInt)
  2077  		sym := auxToSym(l.Aux)
  2078  		mem := l.Args[1]
  2079  		ptr := l.Args[0]
  2080  		x := v_1
  2081  		if !(canMergeLoad(v, l) && clobber(l)) {
  2082  			break
  2083  		}
  2084  		v.reset(Op386CMPLload)
  2085  		v.AuxInt = int32ToAuxInt(off)
  2086  		v.Aux = symToAux(sym)
  2087  		v.AddArg3(ptr, x, mem)
  2088  		return true
  2089  	}
  2090  	// match: (CMPL x l:(MOVLload {sym} [off] ptr mem))
  2091  	// cond: canMergeLoad(v, l) && clobber(l)
  2092  	// result: (InvertFlags (CMPLload {sym} [off] ptr x mem))
  2093  	for {
  2094  		x := v_0
  2095  		l := v_1
  2096  		if l.Op != Op386MOVLload {
  2097  			break
  2098  		}
  2099  		off := auxIntToInt32(l.AuxInt)
  2100  		sym := auxToSym(l.Aux)
  2101  		mem := l.Args[1]
  2102  		ptr := l.Args[0]
  2103  		if !(canMergeLoad(v, l) && clobber(l)) {
  2104  			break
  2105  		}
  2106  		v.reset(Op386InvertFlags)
  2107  		v0 := b.NewValue0(l.Pos, Op386CMPLload, types.TypeFlags)
  2108  		v0.AuxInt = int32ToAuxInt(off)
  2109  		v0.Aux = symToAux(sym)
  2110  		v0.AddArg3(ptr, x, mem)
  2111  		v.AddArg(v0)
  2112  		return true
  2113  	}
  2114  	return false
  2115  }
  2116  func rewriteValue386_Op386CMPLconst(v *Value) bool {
  2117  	v_0 := v.Args[0]
  2118  	b := v.Block
  2119  	// match: (CMPLconst (MOVLconst [x]) [y])
  2120  	// cond: x==y
  2121  	// result: (FlagEQ)
  2122  	for {
  2123  		y := auxIntToInt32(v.AuxInt)
  2124  		if v_0.Op != Op386MOVLconst {
  2125  			break
  2126  		}
  2127  		x := auxIntToInt32(v_0.AuxInt)
  2128  		if !(x == y) {
  2129  			break
  2130  		}
  2131  		v.reset(Op386FlagEQ)
  2132  		return true
  2133  	}
  2134  	// match: (CMPLconst (MOVLconst [x]) [y])
  2135  	// cond: x<y && uint32(x)<uint32(y)
  2136  	// result: (FlagLT_ULT)
  2137  	for {
  2138  		y := auxIntToInt32(v.AuxInt)
  2139  		if v_0.Op != Op386MOVLconst {
  2140  			break
  2141  		}
  2142  		x := auxIntToInt32(v_0.AuxInt)
  2143  		if !(x < y && uint32(x) < uint32(y)) {
  2144  			break
  2145  		}
  2146  		v.reset(Op386FlagLT_ULT)
  2147  		return true
  2148  	}
  2149  	// match: (CMPLconst (MOVLconst [x]) [y])
  2150  	// cond: x<y && uint32(x)>uint32(y)
  2151  	// result: (FlagLT_UGT)
  2152  	for {
  2153  		y := auxIntToInt32(v.AuxInt)
  2154  		if v_0.Op != Op386MOVLconst {
  2155  			break
  2156  		}
  2157  		x := auxIntToInt32(v_0.AuxInt)
  2158  		if !(x < y && uint32(x) > uint32(y)) {
  2159  			break
  2160  		}
  2161  		v.reset(Op386FlagLT_UGT)
  2162  		return true
  2163  	}
  2164  	// match: (CMPLconst (MOVLconst [x]) [y])
  2165  	// cond: x>y && uint32(x)<uint32(y)
  2166  	// result: (FlagGT_ULT)
  2167  	for {
  2168  		y := auxIntToInt32(v.AuxInt)
  2169  		if v_0.Op != Op386MOVLconst {
  2170  			break
  2171  		}
  2172  		x := auxIntToInt32(v_0.AuxInt)
  2173  		if !(x > y && uint32(x) < uint32(y)) {
  2174  			break
  2175  		}
  2176  		v.reset(Op386FlagGT_ULT)
  2177  		return true
  2178  	}
  2179  	// match: (CMPLconst (MOVLconst [x]) [y])
  2180  	// cond: x>y && uint32(x)>uint32(y)
  2181  	// result: (FlagGT_UGT)
  2182  	for {
  2183  		y := auxIntToInt32(v.AuxInt)
  2184  		if v_0.Op != Op386MOVLconst {
  2185  			break
  2186  		}
  2187  		x := auxIntToInt32(v_0.AuxInt)
  2188  		if !(x > y && uint32(x) > uint32(y)) {
  2189  			break
  2190  		}
  2191  		v.reset(Op386FlagGT_UGT)
  2192  		return true
  2193  	}
  2194  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  2195  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  2196  	// result: (FlagLT_ULT)
  2197  	for {
  2198  		n := auxIntToInt32(v.AuxInt)
  2199  		if v_0.Op != Op386SHRLconst {
  2200  			break
  2201  		}
  2202  		c := auxIntToInt32(v_0.AuxInt)
  2203  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  2204  			break
  2205  		}
  2206  		v.reset(Op386FlagLT_ULT)
  2207  		return true
  2208  	}
  2209  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  2210  	// cond: 0 <= m && m < n
  2211  	// result: (FlagLT_ULT)
  2212  	for {
  2213  		n := auxIntToInt32(v.AuxInt)
  2214  		if v_0.Op != Op386ANDLconst {
  2215  			break
  2216  		}
  2217  		m := auxIntToInt32(v_0.AuxInt)
  2218  		if !(0 <= m && m < n) {
  2219  			break
  2220  		}
  2221  		v.reset(Op386FlagLT_ULT)
  2222  		return true
  2223  	}
  2224  	// match: (CMPLconst l:(ANDL x y) [0])
  2225  	// cond: l.Uses==1
  2226  	// result: (TESTL x y)
  2227  	for {
  2228  		if auxIntToInt32(v.AuxInt) != 0 {
  2229  			break
  2230  		}
  2231  		l := v_0
  2232  		if l.Op != Op386ANDL {
  2233  			break
  2234  		}
  2235  		y := l.Args[1]
  2236  		x := l.Args[0]
  2237  		if !(l.Uses == 1) {
  2238  			break
  2239  		}
  2240  		v.reset(Op386TESTL)
  2241  		v.AddArg2(x, y)
  2242  		return true
  2243  	}
  2244  	// match: (CMPLconst l:(ANDLconst [c] x) [0])
  2245  	// cond: l.Uses==1
  2246  	// result: (TESTLconst [c] x)
  2247  	for {
  2248  		if auxIntToInt32(v.AuxInt) != 0 {
  2249  			break
  2250  		}
  2251  		l := v_0
  2252  		if l.Op != Op386ANDLconst {
  2253  			break
  2254  		}
  2255  		c := auxIntToInt32(l.AuxInt)
  2256  		x := l.Args[0]
  2257  		if !(l.Uses == 1) {
  2258  			break
  2259  		}
  2260  		v.reset(Op386TESTLconst)
  2261  		v.AuxInt = int32ToAuxInt(c)
  2262  		v.AddArg(x)
  2263  		return true
  2264  	}
  2265  	// match: (CMPLconst x [0])
  2266  	// result: (TESTL x x)
  2267  	for {
  2268  		if auxIntToInt32(v.AuxInt) != 0 {
  2269  			break
  2270  		}
  2271  		x := v_0
  2272  		v.reset(Op386TESTL)
  2273  		v.AddArg2(x, x)
  2274  		return true
  2275  	}
  2276  	// match: (CMPLconst l:(MOVLload {sym} [off] ptr mem) [c])
  2277  	// cond: l.Uses == 1 && clobber(l)
  2278  	// result: @l.Block (CMPLconstload {sym} [makeValAndOff(int32(c),off)] ptr mem)
  2279  	for {
  2280  		c := auxIntToInt32(v.AuxInt)
  2281  		l := v_0
  2282  		if l.Op != Op386MOVLload {
  2283  			break
  2284  		}
  2285  		off := auxIntToInt32(l.AuxInt)
  2286  		sym := auxToSym(l.Aux)
  2287  		mem := l.Args[1]
  2288  		ptr := l.Args[0]
  2289  		if !(l.Uses == 1 && clobber(l)) {
  2290  			break
  2291  		}
  2292  		b = l.Block
  2293  		v0 := b.NewValue0(l.Pos, Op386CMPLconstload, types.TypeFlags)
  2294  		v.copyOf(v0)
  2295  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  2296  		v0.Aux = symToAux(sym)
  2297  		v0.AddArg2(ptr, mem)
  2298  		return true
  2299  	}
  2300  	return false
  2301  }
  2302  func rewriteValue386_Op386CMPLload(v *Value) bool {
  2303  	v_2 := v.Args[2]
  2304  	v_1 := v.Args[1]
  2305  	v_0 := v.Args[0]
  2306  	// match: (CMPLload {sym} [off] ptr (MOVLconst [c]) mem)
  2307  	// result: (CMPLconstload {sym} [makeValAndOff(c,off)] ptr mem)
  2308  	for {
  2309  		off := auxIntToInt32(v.AuxInt)
  2310  		sym := auxToSym(v.Aux)
  2311  		ptr := v_0
  2312  		if v_1.Op != Op386MOVLconst {
  2313  			break
  2314  		}
  2315  		c := auxIntToInt32(v_1.AuxInt)
  2316  		mem := v_2
  2317  		v.reset(Op386CMPLconstload)
  2318  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  2319  		v.Aux = symToAux(sym)
  2320  		v.AddArg2(ptr, mem)
  2321  		return true
  2322  	}
  2323  	return false
  2324  }
  2325  func rewriteValue386_Op386CMPW(v *Value) bool {
  2326  	v_1 := v.Args[1]
  2327  	v_0 := v.Args[0]
  2328  	b := v.Block
  2329  	// match: (CMPW x (MOVLconst [c]))
  2330  	// result: (CMPWconst x [int16(c)])
  2331  	for {
  2332  		x := v_0
  2333  		if v_1.Op != Op386MOVLconst {
  2334  			break
  2335  		}
  2336  		c := auxIntToInt32(v_1.AuxInt)
  2337  		v.reset(Op386CMPWconst)
  2338  		v.AuxInt = int16ToAuxInt(int16(c))
  2339  		v.AddArg(x)
  2340  		return true
  2341  	}
  2342  	// match: (CMPW (MOVLconst [c]) x)
  2343  	// result: (InvertFlags (CMPWconst x [int16(c)]))
  2344  	for {
  2345  		if v_0.Op != Op386MOVLconst {
  2346  			break
  2347  		}
  2348  		c := auxIntToInt32(v_0.AuxInt)
  2349  		x := v_1
  2350  		v.reset(Op386InvertFlags)
  2351  		v0 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  2352  		v0.AuxInt = int16ToAuxInt(int16(c))
  2353  		v0.AddArg(x)
  2354  		v.AddArg(v0)
  2355  		return true
  2356  	}
  2357  	// match: (CMPW x y)
  2358  	// cond: canonLessThan(x,y)
  2359  	// result: (InvertFlags (CMPW y x))
  2360  	for {
  2361  		x := v_0
  2362  		y := v_1
  2363  		if !(canonLessThan(x, y)) {
  2364  			break
  2365  		}
  2366  		v.reset(Op386InvertFlags)
  2367  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  2368  		v0.AddArg2(y, x)
  2369  		v.AddArg(v0)
  2370  		return true
  2371  	}
  2372  	// match: (CMPW l:(MOVWload {sym} [off] ptr mem) x)
  2373  	// cond: canMergeLoad(v, l) && clobber(l)
  2374  	// result: (CMPWload {sym} [off] ptr x mem)
  2375  	for {
  2376  		l := v_0
  2377  		if l.Op != Op386MOVWload {
  2378  			break
  2379  		}
  2380  		off := auxIntToInt32(l.AuxInt)
  2381  		sym := auxToSym(l.Aux)
  2382  		mem := l.Args[1]
  2383  		ptr := l.Args[0]
  2384  		x := v_1
  2385  		if !(canMergeLoad(v, l) && clobber(l)) {
  2386  			break
  2387  		}
  2388  		v.reset(Op386CMPWload)
  2389  		v.AuxInt = int32ToAuxInt(off)
  2390  		v.Aux = symToAux(sym)
  2391  		v.AddArg3(ptr, x, mem)
  2392  		return true
  2393  	}
  2394  	// match: (CMPW x l:(MOVWload {sym} [off] ptr mem))
  2395  	// cond: canMergeLoad(v, l) && clobber(l)
  2396  	// result: (InvertFlags (CMPWload {sym} [off] ptr x mem))
  2397  	for {
  2398  		x := v_0
  2399  		l := v_1
  2400  		if l.Op != Op386MOVWload {
  2401  			break
  2402  		}
  2403  		off := auxIntToInt32(l.AuxInt)
  2404  		sym := auxToSym(l.Aux)
  2405  		mem := l.Args[1]
  2406  		ptr := l.Args[0]
  2407  		if !(canMergeLoad(v, l) && clobber(l)) {
  2408  			break
  2409  		}
  2410  		v.reset(Op386InvertFlags)
  2411  		v0 := b.NewValue0(l.Pos, Op386CMPWload, types.TypeFlags)
  2412  		v0.AuxInt = int32ToAuxInt(off)
  2413  		v0.Aux = symToAux(sym)
  2414  		v0.AddArg3(ptr, x, mem)
  2415  		v.AddArg(v0)
  2416  		return true
  2417  	}
  2418  	return false
  2419  }
  2420  func rewriteValue386_Op386CMPWconst(v *Value) bool {
  2421  	v_0 := v.Args[0]
  2422  	b := v.Block
  2423  	// match: (CMPWconst (MOVLconst [x]) [y])
  2424  	// cond: int16(x)==y
  2425  	// result: (FlagEQ)
  2426  	for {
  2427  		y := auxIntToInt16(v.AuxInt)
  2428  		if v_0.Op != Op386MOVLconst {
  2429  			break
  2430  		}
  2431  		x := auxIntToInt32(v_0.AuxInt)
  2432  		if !(int16(x) == y) {
  2433  			break
  2434  		}
  2435  		v.reset(Op386FlagEQ)
  2436  		return true
  2437  	}
  2438  	// match: (CMPWconst (MOVLconst [x]) [y])
  2439  	// cond: int16(x)<y && uint16(x)<uint16(y)
  2440  	// result: (FlagLT_ULT)
  2441  	for {
  2442  		y := auxIntToInt16(v.AuxInt)
  2443  		if v_0.Op != Op386MOVLconst {
  2444  			break
  2445  		}
  2446  		x := auxIntToInt32(v_0.AuxInt)
  2447  		if !(int16(x) < y && uint16(x) < uint16(y)) {
  2448  			break
  2449  		}
  2450  		v.reset(Op386FlagLT_ULT)
  2451  		return true
  2452  	}
  2453  	// match: (CMPWconst (MOVLconst [x]) [y])
  2454  	// cond: int16(x)<y && uint16(x)>uint16(y)
  2455  	// result: (FlagLT_UGT)
  2456  	for {
  2457  		y := auxIntToInt16(v.AuxInt)
  2458  		if v_0.Op != Op386MOVLconst {
  2459  			break
  2460  		}
  2461  		x := auxIntToInt32(v_0.AuxInt)
  2462  		if !(int16(x) < y && uint16(x) > uint16(y)) {
  2463  			break
  2464  		}
  2465  		v.reset(Op386FlagLT_UGT)
  2466  		return true
  2467  	}
  2468  	// match: (CMPWconst (MOVLconst [x]) [y])
  2469  	// cond: int16(x)>y && uint16(x)<uint16(y)
  2470  	// result: (FlagGT_ULT)
  2471  	for {
  2472  		y := auxIntToInt16(v.AuxInt)
  2473  		if v_0.Op != Op386MOVLconst {
  2474  			break
  2475  		}
  2476  		x := auxIntToInt32(v_0.AuxInt)
  2477  		if !(int16(x) > y && uint16(x) < uint16(y)) {
  2478  			break
  2479  		}
  2480  		v.reset(Op386FlagGT_ULT)
  2481  		return true
  2482  	}
  2483  	// match: (CMPWconst (MOVLconst [x]) [y])
  2484  	// cond: int16(x)>y && uint16(x)>uint16(y)
  2485  	// result: (FlagGT_UGT)
  2486  	for {
  2487  		y := auxIntToInt16(v.AuxInt)
  2488  		if v_0.Op != Op386MOVLconst {
  2489  			break
  2490  		}
  2491  		x := auxIntToInt32(v_0.AuxInt)
  2492  		if !(int16(x) > y && uint16(x) > uint16(y)) {
  2493  			break
  2494  		}
  2495  		v.reset(Op386FlagGT_UGT)
  2496  		return true
  2497  	}
  2498  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  2499  	// cond: 0 <= int16(m) && int16(m) < n
  2500  	// result: (FlagLT_ULT)
  2501  	for {
  2502  		n := auxIntToInt16(v.AuxInt)
  2503  		if v_0.Op != Op386ANDLconst {
  2504  			break
  2505  		}
  2506  		m := auxIntToInt32(v_0.AuxInt)
  2507  		if !(0 <= int16(m) && int16(m) < n) {
  2508  			break
  2509  		}
  2510  		v.reset(Op386FlagLT_ULT)
  2511  		return true
  2512  	}
  2513  	// match: (CMPWconst l:(ANDL x y) [0])
  2514  	// cond: l.Uses==1
  2515  	// result: (TESTW x y)
  2516  	for {
  2517  		if auxIntToInt16(v.AuxInt) != 0 {
  2518  			break
  2519  		}
  2520  		l := v_0
  2521  		if l.Op != Op386ANDL {
  2522  			break
  2523  		}
  2524  		y := l.Args[1]
  2525  		x := l.Args[0]
  2526  		if !(l.Uses == 1) {
  2527  			break
  2528  		}
  2529  		v.reset(Op386TESTW)
  2530  		v.AddArg2(x, y)
  2531  		return true
  2532  	}
  2533  	// match: (CMPWconst l:(ANDLconst [c] x) [0])
  2534  	// cond: l.Uses==1
  2535  	// result: (TESTWconst [int16(c)] x)
  2536  	for {
  2537  		if auxIntToInt16(v.AuxInt) != 0 {
  2538  			break
  2539  		}
  2540  		l := v_0
  2541  		if l.Op != Op386ANDLconst {
  2542  			break
  2543  		}
  2544  		c := auxIntToInt32(l.AuxInt)
  2545  		x := l.Args[0]
  2546  		if !(l.Uses == 1) {
  2547  			break
  2548  		}
  2549  		v.reset(Op386TESTWconst)
  2550  		v.AuxInt = int16ToAuxInt(int16(c))
  2551  		v.AddArg(x)
  2552  		return true
  2553  	}
  2554  	// match: (CMPWconst x [0])
  2555  	// result: (TESTW x x)
  2556  	for {
  2557  		if auxIntToInt16(v.AuxInt) != 0 {
  2558  			break
  2559  		}
  2560  		x := v_0
  2561  		v.reset(Op386TESTW)
  2562  		v.AddArg2(x, x)
  2563  		return true
  2564  	}
  2565  	// match: (CMPWconst l:(MOVWload {sym} [off] ptr mem) [c])
  2566  	// cond: l.Uses == 1 && clobber(l)
  2567  	// result: @l.Block (CMPWconstload {sym} [makeValAndOff(int32(c),off)] ptr mem)
  2568  	for {
  2569  		c := auxIntToInt16(v.AuxInt)
  2570  		l := v_0
  2571  		if l.Op != Op386MOVWload {
  2572  			break
  2573  		}
  2574  		off := auxIntToInt32(l.AuxInt)
  2575  		sym := auxToSym(l.Aux)
  2576  		mem := l.Args[1]
  2577  		ptr := l.Args[0]
  2578  		if !(l.Uses == 1 && clobber(l)) {
  2579  			break
  2580  		}
  2581  		b = l.Block
  2582  		v0 := b.NewValue0(l.Pos, Op386CMPWconstload, types.TypeFlags)
  2583  		v.copyOf(v0)
  2584  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  2585  		v0.Aux = symToAux(sym)
  2586  		v0.AddArg2(ptr, mem)
  2587  		return true
  2588  	}
  2589  	return false
  2590  }
  2591  func rewriteValue386_Op386CMPWload(v *Value) bool {
  2592  	v_2 := v.Args[2]
  2593  	v_1 := v.Args[1]
  2594  	v_0 := v.Args[0]
  2595  	// match: (CMPWload {sym} [off] ptr (MOVLconst [c]) mem)
  2596  	// result: (CMPWconstload {sym} [makeValAndOff(int32(int16(c)),off)] ptr mem)
  2597  	for {
  2598  		off := auxIntToInt32(v.AuxInt)
  2599  		sym := auxToSym(v.Aux)
  2600  		ptr := v_0
  2601  		if v_1.Op != Op386MOVLconst {
  2602  			break
  2603  		}
  2604  		c := auxIntToInt32(v_1.AuxInt)
  2605  		mem := v_2
  2606  		v.reset(Op386CMPWconstload)
  2607  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int16(c)), off))
  2608  		v.Aux = symToAux(sym)
  2609  		v.AddArg2(ptr, mem)
  2610  		return true
  2611  	}
  2612  	return false
  2613  }
  2614  func rewriteValue386_Op386DIVSD(v *Value) bool {
  2615  	v_1 := v.Args[1]
  2616  	v_0 := v.Args[0]
  2617  	// match: (DIVSD x l:(MOVSDload [off] {sym} ptr mem))
  2618  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  2619  	// result: (DIVSDload x [off] {sym} ptr mem)
  2620  	for {
  2621  		x := v_0
  2622  		l := v_1
  2623  		if l.Op != Op386MOVSDload {
  2624  			break
  2625  		}
  2626  		off := auxIntToInt32(l.AuxInt)
  2627  		sym := auxToSym(l.Aux)
  2628  		mem := l.Args[1]
  2629  		ptr := l.Args[0]
  2630  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  2631  			break
  2632  		}
  2633  		v.reset(Op386DIVSDload)
  2634  		v.AuxInt = int32ToAuxInt(off)
  2635  		v.Aux = symToAux(sym)
  2636  		v.AddArg3(x, ptr, mem)
  2637  		return true
  2638  	}
  2639  	return false
  2640  }
  2641  func rewriteValue386_Op386DIVSDload(v *Value) bool {
  2642  	v_2 := v.Args[2]
  2643  	v_1 := v.Args[1]
  2644  	v_0 := v.Args[0]
  2645  	b := v.Block
  2646  	config := b.Func.Config
  2647  	// match: (DIVSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  2648  	// cond: is32Bit(int64(off1)+int64(off2))
  2649  	// result: (DIVSDload [off1+off2] {sym} val base mem)
  2650  	for {
  2651  		off1 := auxIntToInt32(v.AuxInt)
  2652  		sym := auxToSym(v.Aux)
  2653  		val := v_0
  2654  		if v_1.Op != Op386ADDLconst {
  2655  			break
  2656  		}
  2657  		off2 := auxIntToInt32(v_1.AuxInt)
  2658  		base := v_1.Args[0]
  2659  		mem := v_2
  2660  		if !(is32Bit(int64(off1) + int64(off2))) {
  2661  			break
  2662  		}
  2663  		v.reset(Op386DIVSDload)
  2664  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2665  		v.Aux = symToAux(sym)
  2666  		v.AddArg3(val, base, mem)
  2667  		return true
  2668  	}
  2669  	// match: (DIVSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2670  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2671  	// result: (DIVSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  2672  	for {
  2673  		off1 := auxIntToInt32(v.AuxInt)
  2674  		sym1 := auxToSym(v.Aux)
  2675  		val := v_0
  2676  		if v_1.Op != Op386LEAL {
  2677  			break
  2678  		}
  2679  		off2 := auxIntToInt32(v_1.AuxInt)
  2680  		sym2 := auxToSym(v_1.Aux)
  2681  		base := v_1.Args[0]
  2682  		mem := v_2
  2683  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2684  			break
  2685  		}
  2686  		v.reset(Op386DIVSDload)
  2687  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2688  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2689  		v.AddArg3(val, base, mem)
  2690  		return true
  2691  	}
  2692  	return false
  2693  }
  2694  func rewriteValue386_Op386DIVSS(v *Value) bool {
  2695  	v_1 := v.Args[1]
  2696  	v_0 := v.Args[0]
  2697  	// match: (DIVSS x l:(MOVSSload [off] {sym} ptr mem))
  2698  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  2699  	// result: (DIVSSload x [off] {sym} ptr mem)
  2700  	for {
  2701  		x := v_0
  2702  		l := v_1
  2703  		if l.Op != Op386MOVSSload {
  2704  			break
  2705  		}
  2706  		off := auxIntToInt32(l.AuxInt)
  2707  		sym := auxToSym(l.Aux)
  2708  		mem := l.Args[1]
  2709  		ptr := l.Args[0]
  2710  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  2711  			break
  2712  		}
  2713  		v.reset(Op386DIVSSload)
  2714  		v.AuxInt = int32ToAuxInt(off)
  2715  		v.Aux = symToAux(sym)
  2716  		v.AddArg3(x, ptr, mem)
  2717  		return true
  2718  	}
  2719  	return false
  2720  }
  2721  func rewriteValue386_Op386DIVSSload(v *Value) bool {
  2722  	v_2 := v.Args[2]
  2723  	v_1 := v.Args[1]
  2724  	v_0 := v.Args[0]
  2725  	b := v.Block
  2726  	config := b.Func.Config
  2727  	// match: (DIVSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  2728  	// cond: is32Bit(int64(off1)+int64(off2))
  2729  	// result: (DIVSSload [off1+off2] {sym} val base mem)
  2730  	for {
  2731  		off1 := auxIntToInt32(v.AuxInt)
  2732  		sym := auxToSym(v.Aux)
  2733  		val := v_0
  2734  		if v_1.Op != Op386ADDLconst {
  2735  			break
  2736  		}
  2737  		off2 := auxIntToInt32(v_1.AuxInt)
  2738  		base := v_1.Args[0]
  2739  		mem := v_2
  2740  		if !(is32Bit(int64(off1) + int64(off2))) {
  2741  			break
  2742  		}
  2743  		v.reset(Op386DIVSSload)
  2744  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2745  		v.Aux = symToAux(sym)
  2746  		v.AddArg3(val, base, mem)
  2747  		return true
  2748  	}
  2749  	// match: (DIVSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2750  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2751  	// result: (DIVSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  2752  	for {
  2753  		off1 := auxIntToInt32(v.AuxInt)
  2754  		sym1 := auxToSym(v.Aux)
  2755  		val := v_0
  2756  		if v_1.Op != Op386LEAL {
  2757  			break
  2758  		}
  2759  		off2 := auxIntToInt32(v_1.AuxInt)
  2760  		sym2 := auxToSym(v_1.Aux)
  2761  		base := v_1.Args[0]
  2762  		mem := v_2
  2763  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2764  			break
  2765  		}
  2766  		v.reset(Op386DIVSSload)
  2767  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2768  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2769  		v.AddArg3(val, base, mem)
  2770  		return true
  2771  	}
  2772  	return false
  2773  }
  2774  func rewriteValue386_Op386LEAL(v *Value) bool {
  2775  	v_0 := v.Args[0]
  2776  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  2777  	// cond: is32Bit(int64(c)+int64(d))
  2778  	// result: (LEAL [c+d] {s} x)
  2779  	for {
  2780  		c := auxIntToInt32(v.AuxInt)
  2781  		s := auxToSym(v.Aux)
  2782  		if v_0.Op != Op386ADDLconst {
  2783  			break
  2784  		}
  2785  		d := auxIntToInt32(v_0.AuxInt)
  2786  		x := v_0.Args[0]
  2787  		if !(is32Bit(int64(c) + int64(d))) {
  2788  			break
  2789  		}
  2790  		v.reset(Op386LEAL)
  2791  		v.AuxInt = int32ToAuxInt(c + d)
  2792  		v.Aux = symToAux(s)
  2793  		v.AddArg(x)
  2794  		return true
  2795  	}
  2796  	// match: (LEAL [c] {s} (ADDL x y))
  2797  	// cond: x.Op != OpSB && y.Op != OpSB
  2798  	// result: (LEAL1 [c] {s} x y)
  2799  	for {
  2800  		c := auxIntToInt32(v.AuxInt)
  2801  		s := auxToSym(v.Aux)
  2802  		if v_0.Op != Op386ADDL {
  2803  			break
  2804  		}
  2805  		_ = v_0.Args[1]
  2806  		v_0_0 := v_0.Args[0]
  2807  		v_0_1 := v_0.Args[1]
  2808  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  2809  			x := v_0_0
  2810  			y := v_0_1
  2811  			if !(x.Op != OpSB && y.Op != OpSB) {
  2812  				continue
  2813  			}
  2814  			v.reset(Op386LEAL1)
  2815  			v.AuxInt = int32ToAuxInt(c)
  2816  			v.Aux = symToAux(s)
  2817  			v.AddArg2(x, y)
  2818  			return true
  2819  		}
  2820  		break
  2821  	}
  2822  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  2823  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2824  	// result: (LEAL [off1+off2] {mergeSym(sym1,sym2)} x)
  2825  	for {
  2826  		off1 := auxIntToInt32(v.AuxInt)
  2827  		sym1 := auxToSym(v.Aux)
  2828  		if v_0.Op != Op386LEAL {
  2829  			break
  2830  		}
  2831  		off2 := auxIntToInt32(v_0.AuxInt)
  2832  		sym2 := auxToSym(v_0.Aux)
  2833  		x := v_0.Args[0]
  2834  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2835  			break
  2836  		}
  2837  		v.reset(Op386LEAL)
  2838  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2839  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2840  		v.AddArg(x)
  2841  		return true
  2842  	}
  2843  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  2844  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2845  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2846  	for {
  2847  		off1 := auxIntToInt32(v.AuxInt)
  2848  		sym1 := auxToSym(v.Aux)
  2849  		if v_0.Op != Op386LEAL1 {
  2850  			break
  2851  		}
  2852  		off2 := auxIntToInt32(v_0.AuxInt)
  2853  		sym2 := auxToSym(v_0.Aux)
  2854  		y := v_0.Args[1]
  2855  		x := v_0.Args[0]
  2856  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2857  			break
  2858  		}
  2859  		v.reset(Op386LEAL1)
  2860  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2861  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2862  		v.AddArg2(x, y)
  2863  		return true
  2864  	}
  2865  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  2866  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2867  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2868  	for {
  2869  		off1 := auxIntToInt32(v.AuxInt)
  2870  		sym1 := auxToSym(v.Aux)
  2871  		if v_0.Op != Op386LEAL2 {
  2872  			break
  2873  		}
  2874  		off2 := auxIntToInt32(v_0.AuxInt)
  2875  		sym2 := auxToSym(v_0.Aux)
  2876  		y := v_0.Args[1]
  2877  		x := v_0.Args[0]
  2878  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2879  			break
  2880  		}
  2881  		v.reset(Op386LEAL2)
  2882  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2883  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2884  		v.AddArg2(x, y)
  2885  		return true
  2886  	}
  2887  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  2888  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2889  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2890  	for {
  2891  		off1 := auxIntToInt32(v.AuxInt)
  2892  		sym1 := auxToSym(v.Aux)
  2893  		if v_0.Op != Op386LEAL4 {
  2894  			break
  2895  		}
  2896  		off2 := auxIntToInt32(v_0.AuxInt)
  2897  		sym2 := auxToSym(v_0.Aux)
  2898  		y := v_0.Args[1]
  2899  		x := v_0.Args[0]
  2900  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2901  			break
  2902  		}
  2903  		v.reset(Op386LEAL4)
  2904  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2905  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2906  		v.AddArg2(x, y)
  2907  		return true
  2908  	}
  2909  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  2910  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2911  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2912  	for {
  2913  		off1 := auxIntToInt32(v.AuxInt)
  2914  		sym1 := auxToSym(v.Aux)
  2915  		if v_0.Op != Op386LEAL8 {
  2916  			break
  2917  		}
  2918  		off2 := auxIntToInt32(v_0.AuxInt)
  2919  		sym2 := auxToSym(v_0.Aux)
  2920  		y := v_0.Args[1]
  2921  		x := v_0.Args[0]
  2922  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2923  			break
  2924  		}
  2925  		v.reset(Op386LEAL8)
  2926  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2927  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2928  		v.AddArg2(x, y)
  2929  		return true
  2930  	}
  2931  	return false
  2932  }
  2933  func rewriteValue386_Op386LEAL1(v *Value) bool {
  2934  	v_1 := v.Args[1]
  2935  	v_0 := v.Args[0]
  2936  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  2937  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  2938  	// result: (LEAL1 [c+d] {s} x y)
  2939  	for {
  2940  		c := auxIntToInt32(v.AuxInt)
  2941  		s := auxToSym(v.Aux)
  2942  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2943  			if v_0.Op != Op386ADDLconst {
  2944  				continue
  2945  			}
  2946  			d := auxIntToInt32(v_0.AuxInt)
  2947  			x := v_0.Args[0]
  2948  			y := v_1
  2949  			if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  2950  				continue
  2951  			}
  2952  			v.reset(Op386LEAL1)
  2953  			v.AuxInt = int32ToAuxInt(c + d)
  2954  			v.Aux = symToAux(s)
  2955  			v.AddArg2(x, y)
  2956  			return true
  2957  		}
  2958  		break
  2959  	}
  2960  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  2961  	// result: (LEAL2 [c] {s} x y)
  2962  	for {
  2963  		c := auxIntToInt32(v.AuxInt)
  2964  		s := auxToSym(v.Aux)
  2965  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2966  			x := v_0
  2967  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  2968  				continue
  2969  			}
  2970  			y := v_1.Args[0]
  2971  			v.reset(Op386LEAL2)
  2972  			v.AuxInt = int32ToAuxInt(c)
  2973  			v.Aux = symToAux(s)
  2974  			v.AddArg2(x, y)
  2975  			return true
  2976  		}
  2977  		break
  2978  	}
  2979  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  2980  	// result: (LEAL4 [c] {s} x y)
  2981  	for {
  2982  		c := auxIntToInt32(v.AuxInt)
  2983  		s := auxToSym(v.Aux)
  2984  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2985  			x := v_0
  2986  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
  2987  				continue
  2988  			}
  2989  			y := v_1.Args[0]
  2990  			v.reset(Op386LEAL4)
  2991  			v.AuxInt = int32ToAuxInt(c)
  2992  			v.Aux = symToAux(s)
  2993  			v.AddArg2(x, y)
  2994  			return true
  2995  		}
  2996  		break
  2997  	}
  2998  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  2999  	// result: (LEAL8 [c] {s} x y)
  3000  	for {
  3001  		c := auxIntToInt32(v.AuxInt)
  3002  		s := auxToSym(v.Aux)
  3003  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3004  			x := v_0
  3005  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
  3006  				continue
  3007  			}
  3008  			y := v_1.Args[0]
  3009  			v.reset(Op386LEAL8)
  3010  			v.AuxInt = int32ToAuxInt(c)
  3011  			v.Aux = symToAux(s)
  3012  			v.AddArg2(x, y)
  3013  			return true
  3014  		}
  3015  		break
  3016  	}
  3017  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3018  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3019  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3020  	for {
  3021  		off1 := auxIntToInt32(v.AuxInt)
  3022  		sym1 := auxToSym(v.Aux)
  3023  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3024  			if v_0.Op != Op386LEAL {
  3025  				continue
  3026  			}
  3027  			off2 := auxIntToInt32(v_0.AuxInt)
  3028  			sym2 := auxToSym(v_0.Aux)
  3029  			x := v_0.Args[0]
  3030  			y := v_1
  3031  			if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3032  				continue
  3033  			}
  3034  			v.reset(Op386LEAL1)
  3035  			v.AuxInt = int32ToAuxInt(off1 + off2)
  3036  			v.Aux = symToAux(mergeSym(sym1, sym2))
  3037  			v.AddArg2(x, y)
  3038  			return true
  3039  		}
  3040  		break
  3041  	}
  3042  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} y y))
  3043  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  3044  	// result: (LEAL2 [off1+off2] {mergeSym(sym1, sym2)} x y)
  3045  	for {
  3046  		off1 := auxIntToInt32(v.AuxInt)
  3047  		sym1 := auxToSym(v.Aux)
  3048  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3049  			x := v_0
  3050  			if v_1.Op != Op386LEAL1 {
  3051  				continue
  3052  			}
  3053  			off2 := auxIntToInt32(v_1.AuxInt)
  3054  			sym2 := auxToSym(v_1.Aux)
  3055  			y := v_1.Args[1]
  3056  			if y != v_1.Args[0] || !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  3057  				continue
  3058  			}
  3059  			v.reset(Op386LEAL2)
  3060  			v.AuxInt = int32ToAuxInt(off1 + off2)
  3061  			v.Aux = symToAux(mergeSym(sym1, sym2))
  3062  			v.AddArg2(x, y)
  3063  			return true
  3064  		}
  3065  		break
  3066  	}
  3067  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} x y))
  3068  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  3069  	// result: (LEAL2 [off1+off2] {mergeSym(sym1, sym2)} y x)
  3070  	for {
  3071  		off1 := auxIntToInt32(v.AuxInt)
  3072  		sym1 := auxToSym(v.Aux)
  3073  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3074  			x := v_0
  3075  			if v_1.Op != Op386LEAL1 {
  3076  				continue
  3077  			}
  3078  			off2 := auxIntToInt32(v_1.AuxInt)
  3079  			sym2 := auxToSym(v_1.Aux)
  3080  			_ = v_1.Args[1]
  3081  			v_1_0 := v_1.Args[0]
  3082  			v_1_1 := v_1.Args[1]
  3083  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  3084  				if x != v_1_0 {
  3085  					continue
  3086  				}
  3087  				y := v_1_1
  3088  				if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  3089  					continue
  3090  				}
  3091  				v.reset(Op386LEAL2)
  3092  				v.AuxInt = int32ToAuxInt(off1 + off2)
  3093  				v.Aux = symToAux(mergeSym(sym1, sym2))
  3094  				v.AddArg2(y, x)
  3095  				return true
  3096  			}
  3097  		}
  3098  		break
  3099  	}
  3100  	// match: (LEAL1 [0] {nil} x y)
  3101  	// result: (ADDL x y)
  3102  	for {
  3103  		if auxIntToInt32(v.AuxInt) != 0 || auxToSym(v.Aux) != nil {
  3104  			break
  3105  		}
  3106  		x := v_0
  3107  		y := v_1
  3108  		v.reset(Op386ADDL)
  3109  		v.AddArg2(x, y)
  3110  		return true
  3111  	}
  3112  	return false
  3113  }
  3114  func rewriteValue386_Op386LEAL2(v *Value) bool {
  3115  	v_1 := v.Args[1]
  3116  	v_0 := v.Args[0]
  3117  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  3118  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3119  	// result: (LEAL2 [c+d] {s} x y)
  3120  	for {
  3121  		c := auxIntToInt32(v.AuxInt)
  3122  		s := auxToSym(v.Aux)
  3123  		if v_0.Op != Op386ADDLconst {
  3124  			break
  3125  		}
  3126  		d := auxIntToInt32(v_0.AuxInt)
  3127  		x := v_0.Args[0]
  3128  		y := v_1
  3129  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3130  			break
  3131  		}
  3132  		v.reset(Op386LEAL2)
  3133  		v.AuxInt = int32ToAuxInt(c + d)
  3134  		v.Aux = symToAux(s)
  3135  		v.AddArg2(x, y)
  3136  		return true
  3137  	}
  3138  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  3139  	// cond: is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB
  3140  	// result: (LEAL2 [c+2*d] {s} x y)
  3141  	for {
  3142  		c := auxIntToInt32(v.AuxInt)
  3143  		s := auxToSym(v.Aux)
  3144  		x := v_0
  3145  		if v_1.Op != Op386ADDLconst {
  3146  			break
  3147  		}
  3148  		d := auxIntToInt32(v_1.AuxInt)
  3149  		y := v_1.Args[0]
  3150  		if !(is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB) {
  3151  			break
  3152  		}
  3153  		v.reset(Op386LEAL2)
  3154  		v.AuxInt = int32ToAuxInt(c + 2*d)
  3155  		v.Aux = symToAux(s)
  3156  		v.AddArg2(x, y)
  3157  		return true
  3158  	}
  3159  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  3160  	// result: (LEAL4 [c] {s} x y)
  3161  	for {
  3162  		c := auxIntToInt32(v.AuxInt)
  3163  		s := auxToSym(v.Aux)
  3164  		x := v_0
  3165  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3166  			break
  3167  		}
  3168  		y := v_1.Args[0]
  3169  		v.reset(Op386LEAL4)
  3170  		v.AuxInt = int32ToAuxInt(c)
  3171  		v.Aux = symToAux(s)
  3172  		v.AddArg2(x, y)
  3173  		return true
  3174  	}
  3175  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  3176  	// result: (LEAL8 [c] {s} x y)
  3177  	for {
  3178  		c := auxIntToInt32(v.AuxInt)
  3179  		s := auxToSym(v.Aux)
  3180  		x := v_0
  3181  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
  3182  			break
  3183  		}
  3184  		y := v_1.Args[0]
  3185  		v.reset(Op386LEAL8)
  3186  		v.AuxInt = int32ToAuxInt(c)
  3187  		v.Aux = symToAux(s)
  3188  		v.AddArg2(x, y)
  3189  		return true
  3190  	}
  3191  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3192  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3193  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3194  	for {
  3195  		off1 := auxIntToInt32(v.AuxInt)
  3196  		sym1 := auxToSym(v.Aux)
  3197  		if v_0.Op != Op386LEAL {
  3198  			break
  3199  		}
  3200  		off2 := auxIntToInt32(v_0.AuxInt)
  3201  		sym2 := auxToSym(v_0.Aux)
  3202  		x := v_0.Args[0]
  3203  		y := v_1
  3204  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3205  			break
  3206  		}
  3207  		v.reset(Op386LEAL2)
  3208  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3209  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3210  		v.AddArg2(x, y)
  3211  		return true
  3212  	}
  3213  	// match: (LEAL2 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3214  	// cond: is32Bit(int64(off1)+2*int64(off2))
  3215  	// result: (LEAL4 [off1+2*off2] {sym} x y)
  3216  	for {
  3217  		off1 := auxIntToInt32(v.AuxInt)
  3218  		sym := auxToSym(v.Aux)
  3219  		x := v_0
  3220  		if v_1.Op != Op386LEAL1 {
  3221  			break
  3222  		}
  3223  		off2 := auxIntToInt32(v_1.AuxInt)
  3224  		if auxToSym(v_1.Aux) != nil {
  3225  			break
  3226  		}
  3227  		y := v_1.Args[1]
  3228  		if y != v_1.Args[0] || !(is32Bit(int64(off1) + 2*int64(off2))) {
  3229  			break
  3230  		}
  3231  		v.reset(Op386LEAL4)
  3232  		v.AuxInt = int32ToAuxInt(off1 + 2*off2)
  3233  		v.Aux = symToAux(sym)
  3234  		v.AddArg2(x, y)
  3235  		return true
  3236  	}
  3237  	return false
  3238  }
  3239  func rewriteValue386_Op386LEAL4(v *Value) bool {
  3240  	v_1 := v.Args[1]
  3241  	v_0 := v.Args[0]
  3242  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  3243  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3244  	// result: (LEAL4 [c+d] {s} x y)
  3245  	for {
  3246  		c := auxIntToInt32(v.AuxInt)
  3247  		s := auxToSym(v.Aux)
  3248  		if v_0.Op != Op386ADDLconst {
  3249  			break
  3250  		}
  3251  		d := auxIntToInt32(v_0.AuxInt)
  3252  		x := v_0.Args[0]
  3253  		y := v_1
  3254  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3255  			break
  3256  		}
  3257  		v.reset(Op386LEAL4)
  3258  		v.AuxInt = int32ToAuxInt(c + d)
  3259  		v.Aux = symToAux(s)
  3260  		v.AddArg2(x, y)
  3261  		return true
  3262  	}
  3263  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  3264  	// cond: is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB
  3265  	// result: (LEAL4 [c+4*d] {s} x y)
  3266  	for {
  3267  		c := auxIntToInt32(v.AuxInt)
  3268  		s := auxToSym(v.Aux)
  3269  		x := v_0
  3270  		if v_1.Op != Op386ADDLconst {
  3271  			break
  3272  		}
  3273  		d := auxIntToInt32(v_1.AuxInt)
  3274  		y := v_1.Args[0]
  3275  		if !(is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB) {
  3276  			break
  3277  		}
  3278  		v.reset(Op386LEAL4)
  3279  		v.AuxInt = int32ToAuxInt(c + 4*d)
  3280  		v.Aux = symToAux(s)
  3281  		v.AddArg2(x, y)
  3282  		return true
  3283  	}
  3284  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  3285  	// result: (LEAL8 [c] {s} x y)
  3286  	for {
  3287  		c := auxIntToInt32(v.AuxInt)
  3288  		s := auxToSym(v.Aux)
  3289  		x := v_0
  3290  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3291  			break
  3292  		}
  3293  		y := v_1.Args[0]
  3294  		v.reset(Op386LEAL8)
  3295  		v.AuxInt = int32ToAuxInt(c)
  3296  		v.Aux = symToAux(s)
  3297  		v.AddArg2(x, y)
  3298  		return true
  3299  	}
  3300  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3301  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3302  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3303  	for {
  3304  		off1 := auxIntToInt32(v.AuxInt)
  3305  		sym1 := auxToSym(v.Aux)
  3306  		if v_0.Op != Op386LEAL {
  3307  			break
  3308  		}
  3309  		off2 := auxIntToInt32(v_0.AuxInt)
  3310  		sym2 := auxToSym(v_0.Aux)
  3311  		x := v_0.Args[0]
  3312  		y := v_1
  3313  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3314  			break
  3315  		}
  3316  		v.reset(Op386LEAL4)
  3317  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3318  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3319  		v.AddArg2(x, y)
  3320  		return true
  3321  	}
  3322  	// match: (LEAL4 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3323  	// cond: is32Bit(int64(off1)+4*int64(off2))
  3324  	// result: (LEAL8 [off1+4*off2] {sym} x y)
  3325  	for {
  3326  		off1 := auxIntToInt32(v.AuxInt)
  3327  		sym := auxToSym(v.Aux)
  3328  		x := v_0
  3329  		if v_1.Op != Op386LEAL1 {
  3330  			break
  3331  		}
  3332  		off2 := auxIntToInt32(v_1.AuxInt)
  3333  		if auxToSym(v_1.Aux) != nil {
  3334  			break
  3335  		}
  3336  		y := v_1.Args[1]
  3337  		if y != v_1.Args[0] || !(is32Bit(int64(off1) + 4*int64(off2))) {
  3338  			break
  3339  		}
  3340  		v.reset(Op386LEAL8)
  3341  		v.AuxInt = int32ToAuxInt(off1 + 4*off2)
  3342  		v.Aux = symToAux(sym)
  3343  		v.AddArg2(x, y)
  3344  		return true
  3345  	}
  3346  	return false
  3347  }
  3348  func rewriteValue386_Op386LEAL8(v *Value) bool {
  3349  	v_1 := v.Args[1]
  3350  	v_0 := v.Args[0]
  3351  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  3352  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3353  	// result: (LEAL8 [c+d] {s} x y)
  3354  	for {
  3355  		c := auxIntToInt32(v.AuxInt)
  3356  		s := auxToSym(v.Aux)
  3357  		if v_0.Op != Op386ADDLconst {
  3358  			break
  3359  		}
  3360  		d := auxIntToInt32(v_0.AuxInt)
  3361  		x := v_0.Args[0]
  3362  		y := v_1
  3363  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3364  			break
  3365  		}
  3366  		v.reset(Op386LEAL8)
  3367  		v.AuxInt = int32ToAuxInt(c + d)
  3368  		v.Aux = symToAux(s)
  3369  		v.AddArg2(x, y)
  3370  		return true
  3371  	}
  3372  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  3373  	// cond: is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB
  3374  	// result: (LEAL8 [c+8*d] {s} x y)
  3375  	for {
  3376  		c := auxIntToInt32(v.AuxInt)
  3377  		s := auxToSym(v.Aux)
  3378  		x := v_0
  3379  		if v_1.Op != Op386ADDLconst {
  3380  			break
  3381  		}
  3382  		d := auxIntToInt32(v_1.AuxInt)
  3383  		y := v_1.Args[0]
  3384  		if !(is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB) {
  3385  			break
  3386  		}
  3387  		v.reset(Op386LEAL8)
  3388  		v.AuxInt = int32ToAuxInt(c + 8*d)
  3389  		v.Aux = symToAux(s)
  3390  		v.AddArg2(x, y)
  3391  		return true
  3392  	}
  3393  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3394  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3395  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3396  	for {
  3397  		off1 := auxIntToInt32(v.AuxInt)
  3398  		sym1 := auxToSym(v.Aux)
  3399  		if v_0.Op != Op386LEAL {
  3400  			break
  3401  		}
  3402  		off2 := auxIntToInt32(v_0.AuxInt)
  3403  		sym2 := auxToSym(v_0.Aux)
  3404  		x := v_0.Args[0]
  3405  		y := v_1
  3406  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3407  			break
  3408  		}
  3409  		v.reset(Op386LEAL8)
  3410  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3411  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3412  		v.AddArg2(x, y)
  3413  		return true
  3414  	}
  3415  	return false
  3416  }
  3417  func rewriteValue386_Op386LoweredPanicBoundsRC(v *Value) bool {
  3418  	v_1 := v.Args[1]
  3419  	v_0 := v.Args[0]
  3420  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVLconst [c]) mem)
  3421  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:int64(c), Cy:p.C}} mem)
  3422  	for {
  3423  		kind := auxIntToInt64(v.AuxInt)
  3424  		p := auxToPanicBoundsC(v.Aux)
  3425  		if v_0.Op != Op386MOVLconst {
  3426  			break
  3427  		}
  3428  		c := auxIntToInt32(v_0.AuxInt)
  3429  		mem := v_1
  3430  		v.reset(Op386LoweredPanicBoundsCC)
  3431  		v.AuxInt = int64ToAuxInt(kind)
  3432  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: int64(c), Cy: p.C})
  3433  		v.AddArg(mem)
  3434  		return true
  3435  	}
  3436  	return false
  3437  }
  3438  func rewriteValue386_Op386LoweredPanicBoundsRR(v *Value) bool {
  3439  	v_2 := v.Args[2]
  3440  	v_1 := v.Args[1]
  3441  	v_0 := v.Args[0]
  3442  	// match: (LoweredPanicBoundsRR [kind] x (MOVLconst [c]) mem)
  3443  	// result: (LoweredPanicBoundsRC [kind] x {PanicBoundsC{C:int64(c)}} mem)
  3444  	for {
  3445  		kind := auxIntToInt64(v.AuxInt)
  3446  		x := v_0
  3447  		if v_1.Op != Op386MOVLconst {
  3448  			break
  3449  		}
  3450  		c := auxIntToInt32(v_1.AuxInt)
  3451  		mem := v_2
  3452  		v.reset(Op386LoweredPanicBoundsRC)
  3453  		v.AuxInt = int64ToAuxInt(kind)
  3454  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: int64(c)})
  3455  		v.AddArg2(x, mem)
  3456  		return true
  3457  	}
  3458  	// match: (LoweredPanicBoundsRR [kind] (MOVLconst [c]) y mem)
  3459  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:int64(c)}} y mem)
  3460  	for {
  3461  		kind := auxIntToInt64(v.AuxInt)
  3462  		if v_0.Op != Op386MOVLconst {
  3463  			break
  3464  		}
  3465  		c := auxIntToInt32(v_0.AuxInt)
  3466  		y := v_1
  3467  		mem := v_2
  3468  		v.reset(Op386LoweredPanicBoundsCR)
  3469  		v.AuxInt = int64ToAuxInt(kind)
  3470  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: int64(c)})
  3471  		v.AddArg2(y, mem)
  3472  		return true
  3473  	}
  3474  	return false
  3475  }
  3476  func rewriteValue386_Op386LoweredPanicExtendRC(v *Value) bool {
  3477  	v_2 := v.Args[2]
  3478  	v_1 := v.Args[1]
  3479  	v_0 := v.Args[0]
  3480  	// match: (LoweredPanicExtendRC [kind] {p} (MOVLconst [hi]) (MOVLconst [lo]) mem)
  3481  	// result: (LoweredPanicBoundsCC [kind] {PanicBoundsCC{Cx:int64(hi)<<32+int64(uint32(lo)), Cy:p.C}} mem)
  3482  	for {
  3483  		kind := auxIntToInt64(v.AuxInt)
  3484  		p := auxToPanicBoundsC(v.Aux)
  3485  		if v_0.Op != Op386MOVLconst {
  3486  			break
  3487  		}
  3488  		hi := auxIntToInt32(v_0.AuxInt)
  3489  		if v_1.Op != Op386MOVLconst {
  3490  			break
  3491  		}
  3492  		lo := auxIntToInt32(v_1.AuxInt)
  3493  		mem := v_2
  3494  		v.reset(Op386LoweredPanicBoundsCC)
  3495  		v.AuxInt = int64ToAuxInt(kind)
  3496  		v.Aux = panicBoundsCCToAux(PanicBoundsCC{Cx: int64(hi)<<32 + int64(uint32(lo)), Cy: p.C})
  3497  		v.AddArg(mem)
  3498  		return true
  3499  	}
  3500  	return false
  3501  }
  3502  func rewriteValue386_Op386LoweredPanicExtendRR(v *Value) bool {
  3503  	v_3 := v.Args[3]
  3504  	v_2 := v.Args[2]
  3505  	v_1 := v.Args[1]
  3506  	v_0 := v.Args[0]
  3507  	// match: (LoweredPanicExtendRR [kind] hi lo (MOVLconst [c]) mem)
  3508  	// result: (LoweredPanicExtendRC [kind] hi lo {PanicBoundsC{C:int64(c)}} mem)
  3509  	for {
  3510  		kind := auxIntToInt64(v.AuxInt)
  3511  		hi := v_0
  3512  		lo := v_1
  3513  		if v_2.Op != Op386MOVLconst {
  3514  			break
  3515  		}
  3516  		c := auxIntToInt32(v_2.AuxInt)
  3517  		mem := v_3
  3518  		v.reset(Op386LoweredPanicExtendRC)
  3519  		v.AuxInt = int64ToAuxInt(kind)
  3520  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: int64(c)})
  3521  		v.AddArg3(hi, lo, mem)
  3522  		return true
  3523  	}
  3524  	// match: (LoweredPanicExtendRR [kind] (MOVLconst [hi]) (MOVLconst [lo]) y mem)
  3525  	// result: (LoweredPanicBoundsCR [kind] {PanicBoundsC{C:int64(hi)<<32 + int64(uint32(lo))}} y mem)
  3526  	for {
  3527  		kind := auxIntToInt64(v.AuxInt)
  3528  		if v_0.Op != Op386MOVLconst {
  3529  			break
  3530  		}
  3531  		hi := auxIntToInt32(v_0.AuxInt)
  3532  		if v_1.Op != Op386MOVLconst {
  3533  			break
  3534  		}
  3535  		lo := auxIntToInt32(v_1.AuxInt)
  3536  		y := v_2
  3537  		mem := v_3
  3538  		v.reset(Op386LoweredPanicBoundsCR)
  3539  		v.AuxInt = int64ToAuxInt(kind)
  3540  		v.Aux = panicBoundsCToAux(PanicBoundsC{C: int64(hi)<<32 + int64(uint32(lo))})
  3541  		v.AddArg2(y, mem)
  3542  		return true
  3543  	}
  3544  	return false
  3545  }
  3546  func rewriteValue386_Op386MOVBLSX(v *Value) bool {
  3547  	v_0 := v.Args[0]
  3548  	b := v.Block
  3549  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  3550  	// cond: x.Uses == 1 && clobber(x)
  3551  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  3552  	for {
  3553  		x := v_0
  3554  		if x.Op != Op386MOVBload {
  3555  			break
  3556  		}
  3557  		off := auxIntToInt32(x.AuxInt)
  3558  		sym := auxToSym(x.Aux)
  3559  		mem := x.Args[1]
  3560  		ptr := x.Args[0]
  3561  		if !(x.Uses == 1 && clobber(x)) {
  3562  			break
  3563  		}
  3564  		b = x.Block
  3565  		v0 := b.NewValue0(x.Pos, Op386MOVBLSXload, v.Type)
  3566  		v.copyOf(v0)
  3567  		v0.AuxInt = int32ToAuxInt(off)
  3568  		v0.Aux = symToAux(sym)
  3569  		v0.AddArg2(ptr, mem)
  3570  		return true
  3571  	}
  3572  	// match: (MOVBLSX (ANDLconst [c] x))
  3573  	// cond: c & 0x80 == 0
  3574  	// result: (ANDLconst [c & 0x7f] x)
  3575  	for {
  3576  		if v_0.Op != Op386ANDLconst {
  3577  			break
  3578  		}
  3579  		c := auxIntToInt32(v_0.AuxInt)
  3580  		x := v_0.Args[0]
  3581  		if !(c&0x80 == 0) {
  3582  			break
  3583  		}
  3584  		v.reset(Op386ANDLconst)
  3585  		v.AuxInt = int32ToAuxInt(c & 0x7f)
  3586  		v.AddArg(x)
  3587  		return true
  3588  	}
  3589  	return false
  3590  }
  3591  func rewriteValue386_Op386MOVBLSXload(v *Value) bool {
  3592  	v_1 := v.Args[1]
  3593  	v_0 := v.Args[0]
  3594  	b := v.Block
  3595  	config := b.Func.Config
  3596  	// match: (MOVBLSXload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3597  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3598  	// result: (MOVBLSX x)
  3599  	for {
  3600  		off := auxIntToInt32(v.AuxInt)
  3601  		sym := auxToSym(v.Aux)
  3602  		ptr := v_0
  3603  		if v_1.Op != Op386MOVBstore {
  3604  			break
  3605  		}
  3606  		off2 := auxIntToInt32(v_1.AuxInt)
  3607  		sym2 := auxToSym(v_1.Aux)
  3608  		x := v_1.Args[1]
  3609  		ptr2 := v_1.Args[0]
  3610  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3611  			break
  3612  		}
  3613  		v.reset(Op386MOVBLSX)
  3614  		v.AddArg(x)
  3615  		return true
  3616  	}
  3617  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3618  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3619  	// result: (MOVBLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3620  	for {
  3621  		off1 := auxIntToInt32(v.AuxInt)
  3622  		sym1 := auxToSym(v.Aux)
  3623  		if v_0.Op != Op386LEAL {
  3624  			break
  3625  		}
  3626  		off2 := auxIntToInt32(v_0.AuxInt)
  3627  		sym2 := auxToSym(v_0.Aux)
  3628  		base := v_0.Args[0]
  3629  		mem := v_1
  3630  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3631  			break
  3632  		}
  3633  		v.reset(Op386MOVBLSXload)
  3634  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3635  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3636  		v.AddArg2(base, mem)
  3637  		return true
  3638  	}
  3639  	// match: (MOVBLSXload [off] {sym} (SB) _)
  3640  	// cond: symIsRO(sym)
  3641  	// result: (MOVLconst [int32(int8(read8(sym, int64(off))))])
  3642  	for {
  3643  		off := auxIntToInt32(v.AuxInt)
  3644  		sym := auxToSym(v.Aux)
  3645  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  3646  			break
  3647  		}
  3648  		v.reset(Op386MOVLconst)
  3649  		v.AuxInt = int32ToAuxInt(int32(int8(read8(sym, int64(off)))))
  3650  		return true
  3651  	}
  3652  	return false
  3653  }
  3654  func rewriteValue386_Op386MOVBLZX(v *Value) bool {
  3655  	v_0 := v.Args[0]
  3656  	b := v.Block
  3657  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  3658  	// cond: x.Uses == 1 && clobber(x)
  3659  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  3660  	for {
  3661  		x := v_0
  3662  		if x.Op != Op386MOVBload {
  3663  			break
  3664  		}
  3665  		off := auxIntToInt32(x.AuxInt)
  3666  		sym := auxToSym(x.Aux)
  3667  		mem := x.Args[1]
  3668  		ptr := x.Args[0]
  3669  		if !(x.Uses == 1 && clobber(x)) {
  3670  			break
  3671  		}
  3672  		b = x.Block
  3673  		v0 := b.NewValue0(x.Pos, Op386MOVBload, v.Type)
  3674  		v.copyOf(v0)
  3675  		v0.AuxInt = int32ToAuxInt(off)
  3676  		v0.Aux = symToAux(sym)
  3677  		v0.AddArg2(ptr, mem)
  3678  		return true
  3679  	}
  3680  	// match: (MOVBLZX (ANDLconst [c] x))
  3681  	// result: (ANDLconst [c & 0xff] x)
  3682  	for {
  3683  		if v_0.Op != Op386ANDLconst {
  3684  			break
  3685  		}
  3686  		c := auxIntToInt32(v_0.AuxInt)
  3687  		x := v_0.Args[0]
  3688  		v.reset(Op386ANDLconst)
  3689  		v.AuxInt = int32ToAuxInt(c & 0xff)
  3690  		v.AddArg(x)
  3691  		return true
  3692  	}
  3693  	return false
  3694  }
  3695  func rewriteValue386_Op386MOVBload(v *Value) bool {
  3696  	v_1 := v.Args[1]
  3697  	v_0 := v.Args[0]
  3698  	b := v.Block
  3699  	config := b.Func.Config
  3700  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3701  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3702  	// result: (MOVBLZX x)
  3703  	for {
  3704  		off := auxIntToInt32(v.AuxInt)
  3705  		sym := auxToSym(v.Aux)
  3706  		ptr := v_0
  3707  		if v_1.Op != Op386MOVBstore {
  3708  			break
  3709  		}
  3710  		off2 := auxIntToInt32(v_1.AuxInt)
  3711  		sym2 := auxToSym(v_1.Aux)
  3712  		x := v_1.Args[1]
  3713  		ptr2 := v_1.Args[0]
  3714  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3715  			break
  3716  		}
  3717  		v.reset(Op386MOVBLZX)
  3718  		v.AddArg(x)
  3719  		return true
  3720  	}
  3721  	// match: (MOVBload [off1] {sym} (ADDLconst [off2] ptr) mem)
  3722  	// cond: is32Bit(int64(off1)+int64(off2))
  3723  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  3724  	for {
  3725  		off1 := auxIntToInt32(v.AuxInt)
  3726  		sym := auxToSym(v.Aux)
  3727  		if v_0.Op != Op386ADDLconst {
  3728  			break
  3729  		}
  3730  		off2 := auxIntToInt32(v_0.AuxInt)
  3731  		ptr := v_0.Args[0]
  3732  		mem := v_1
  3733  		if !(is32Bit(int64(off1) + int64(off2))) {
  3734  			break
  3735  		}
  3736  		v.reset(Op386MOVBload)
  3737  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3738  		v.Aux = symToAux(sym)
  3739  		v.AddArg2(ptr, mem)
  3740  		return true
  3741  	}
  3742  	// match: (MOVBload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3743  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3744  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3745  	for {
  3746  		off1 := auxIntToInt32(v.AuxInt)
  3747  		sym1 := auxToSym(v.Aux)
  3748  		if v_0.Op != Op386LEAL {
  3749  			break
  3750  		}
  3751  		off2 := auxIntToInt32(v_0.AuxInt)
  3752  		sym2 := auxToSym(v_0.Aux)
  3753  		base := v_0.Args[0]
  3754  		mem := v_1
  3755  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3756  			break
  3757  		}
  3758  		v.reset(Op386MOVBload)
  3759  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3760  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3761  		v.AddArg2(base, mem)
  3762  		return true
  3763  	}
  3764  	// match: (MOVBload [off] {sym} (SB) _)
  3765  	// cond: symIsRO(sym)
  3766  	// result: (MOVLconst [int32(read8(sym, int64(off)))])
  3767  	for {
  3768  		off := auxIntToInt32(v.AuxInt)
  3769  		sym := auxToSym(v.Aux)
  3770  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  3771  			break
  3772  		}
  3773  		v.reset(Op386MOVLconst)
  3774  		v.AuxInt = int32ToAuxInt(int32(read8(sym, int64(off))))
  3775  		return true
  3776  	}
  3777  	return false
  3778  }
  3779  func rewriteValue386_Op386MOVBstore(v *Value) bool {
  3780  	v_2 := v.Args[2]
  3781  	v_1 := v.Args[1]
  3782  	v_0 := v.Args[0]
  3783  	b := v.Block
  3784  	config := b.Func.Config
  3785  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  3786  	// result: (MOVBstore [off] {sym} ptr x mem)
  3787  	for {
  3788  		off := auxIntToInt32(v.AuxInt)
  3789  		sym := auxToSym(v.Aux)
  3790  		ptr := v_0
  3791  		if v_1.Op != Op386MOVBLSX {
  3792  			break
  3793  		}
  3794  		x := v_1.Args[0]
  3795  		mem := v_2
  3796  		v.reset(Op386MOVBstore)
  3797  		v.AuxInt = int32ToAuxInt(off)
  3798  		v.Aux = symToAux(sym)
  3799  		v.AddArg3(ptr, x, mem)
  3800  		return true
  3801  	}
  3802  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  3803  	// result: (MOVBstore [off] {sym} ptr x mem)
  3804  	for {
  3805  		off := auxIntToInt32(v.AuxInt)
  3806  		sym := auxToSym(v.Aux)
  3807  		ptr := v_0
  3808  		if v_1.Op != Op386MOVBLZX {
  3809  			break
  3810  		}
  3811  		x := v_1.Args[0]
  3812  		mem := v_2
  3813  		v.reset(Op386MOVBstore)
  3814  		v.AuxInt = int32ToAuxInt(off)
  3815  		v.Aux = symToAux(sym)
  3816  		v.AddArg3(ptr, x, mem)
  3817  		return true
  3818  	}
  3819  	// match: (MOVBstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3820  	// cond: is32Bit(int64(off1)+int64(off2))
  3821  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  3822  	for {
  3823  		off1 := auxIntToInt32(v.AuxInt)
  3824  		sym := auxToSym(v.Aux)
  3825  		if v_0.Op != Op386ADDLconst {
  3826  			break
  3827  		}
  3828  		off2 := auxIntToInt32(v_0.AuxInt)
  3829  		ptr := v_0.Args[0]
  3830  		val := v_1
  3831  		mem := v_2
  3832  		if !(is32Bit(int64(off1) + int64(off2))) {
  3833  			break
  3834  		}
  3835  		v.reset(Op386MOVBstore)
  3836  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3837  		v.Aux = symToAux(sym)
  3838  		v.AddArg3(ptr, val, mem)
  3839  		return true
  3840  	}
  3841  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  3842  	// result: (MOVBstoreconst [makeValAndOff(c,off)] {sym} ptr mem)
  3843  	for {
  3844  		off := auxIntToInt32(v.AuxInt)
  3845  		sym := auxToSym(v.Aux)
  3846  		ptr := v_0
  3847  		if v_1.Op != Op386MOVLconst {
  3848  			break
  3849  		}
  3850  		c := auxIntToInt32(v_1.AuxInt)
  3851  		mem := v_2
  3852  		v.reset(Op386MOVBstoreconst)
  3853  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  3854  		v.Aux = symToAux(sym)
  3855  		v.AddArg2(ptr, mem)
  3856  		return true
  3857  	}
  3858  	// match: (MOVBstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3859  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3860  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  3861  	for {
  3862  		off1 := auxIntToInt32(v.AuxInt)
  3863  		sym1 := auxToSym(v.Aux)
  3864  		if v_0.Op != Op386LEAL {
  3865  			break
  3866  		}
  3867  		off2 := auxIntToInt32(v_0.AuxInt)
  3868  		sym2 := auxToSym(v_0.Aux)
  3869  		base := v_0.Args[0]
  3870  		val := v_1
  3871  		mem := v_2
  3872  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3873  			break
  3874  		}
  3875  		v.reset(Op386MOVBstore)
  3876  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3877  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3878  		v.AddArg3(base, val, mem)
  3879  		return true
  3880  	}
  3881  	return false
  3882  }
  3883  func rewriteValue386_Op386MOVBstoreconst(v *Value) bool {
  3884  	v_1 := v.Args[1]
  3885  	v_0 := v.Args[0]
  3886  	b := v.Block
  3887  	config := b.Func.Config
  3888  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3889  	// cond: sc.canAdd32(off)
  3890  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  3891  	for {
  3892  		sc := auxIntToValAndOff(v.AuxInt)
  3893  		s := auxToSym(v.Aux)
  3894  		if v_0.Op != Op386ADDLconst {
  3895  			break
  3896  		}
  3897  		off := auxIntToInt32(v_0.AuxInt)
  3898  		ptr := v_0.Args[0]
  3899  		mem := v_1
  3900  		if !(sc.canAdd32(off)) {
  3901  			break
  3902  		}
  3903  		v.reset(Op386MOVBstoreconst)
  3904  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  3905  		v.Aux = symToAux(s)
  3906  		v.AddArg2(ptr, mem)
  3907  		return true
  3908  	}
  3909  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3910  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  3911  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  3912  	for {
  3913  		sc := auxIntToValAndOff(v.AuxInt)
  3914  		sym1 := auxToSym(v.Aux)
  3915  		if v_0.Op != Op386LEAL {
  3916  			break
  3917  		}
  3918  		off := auxIntToInt32(v_0.AuxInt)
  3919  		sym2 := auxToSym(v_0.Aux)
  3920  		ptr := v_0.Args[0]
  3921  		mem := v_1
  3922  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  3923  			break
  3924  		}
  3925  		v.reset(Op386MOVBstoreconst)
  3926  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  3927  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3928  		v.AddArg2(ptr, mem)
  3929  		return true
  3930  	}
  3931  	return false
  3932  }
  3933  func rewriteValue386_Op386MOVLload(v *Value) bool {
  3934  	v_1 := v.Args[1]
  3935  	v_0 := v.Args[0]
  3936  	b := v.Block
  3937  	config := b.Func.Config
  3938  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  3939  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3940  	// result: x
  3941  	for {
  3942  		off := auxIntToInt32(v.AuxInt)
  3943  		sym := auxToSym(v.Aux)
  3944  		ptr := v_0
  3945  		if v_1.Op != Op386MOVLstore {
  3946  			break
  3947  		}
  3948  		off2 := auxIntToInt32(v_1.AuxInt)
  3949  		sym2 := auxToSym(v_1.Aux)
  3950  		x := v_1.Args[1]
  3951  		ptr2 := v_1.Args[0]
  3952  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3953  			break
  3954  		}
  3955  		v.copyOf(x)
  3956  		return true
  3957  	}
  3958  	// match: (MOVLload [off1] {sym} (ADDLconst [off2] ptr) mem)
  3959  	// cond: is32Bit(int64(off1)+int64(off2))
  3960  	// result: (MOVLload [off1+off2] {sym} ptr mem)
  3961  	for {
  3962  		off1 := auxIntToInt32(v.AuxInt)
  3963  		sym := auxToSym(v.Aux)
  3964  		if v_0.Op != Op386ADDLconst {
  3965  			break
  3966  		}
  3967  		off2 := auxIntToInt32(v_0.AuxInt)
  3968  		ptr := v_0.Args[0]
  3969  		mem := v_1
  3970  		if !(is32Bit(int64(off1) + int64(off2))) {
  3971  			break
  3972  		}
  3973  		v.reset(Op386MOVLload)
  3974  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3975  		v.Aux = symToAux(sym)
  3976  		v.AddArg2(ptr, mem)
  3977  		return true
  3978  	}
  3979  	// match: (MOVLload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3980  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3981  	// result: (MOVLload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3982  	for {
  3983  		off1 := auxIntToInt32(v.AuxInt)
  3984  		sym1 := auxToSym(v.Aux)
  3985  		if v_0.Op != Op386LEAL {
  3986  			break
  3987  		}
  3988  		off2 := auxIntToInt32(v_0.AuxInt)
  3989  		sym2 := auxToSym(v_0.Aux)
  3990  		base := v_0.Args[0]
  3991  		mem := v_1
  3992  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3993  			break
  3994  		}
  3995  		v.reset(Op386MOVLload)
  3996  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3997  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3998  		v.AddArg2(base, mem)
  3999  		return true
  4000  	}
  4001  	// match: (MOVLload [off] {sym} (SB) _)
  4002  	// cond: symIsRO(sym)
  4003  	// result: (MOVLconst [int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  4004  	for {
  4005  		off := auxIntToInt32(v.AuxInt)
  4006  		sym := auxToSym(v.Aux)
  4007  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4008  			break
  4009  		}
  4010  		v.reset(Op386MOVLconst)
  4011  		v.AuxInt = int32ToAuxInt(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  4012  		return true
  4013  	}
  4014  	return false
  4015  }
  4016  func rewriteValue386_Op386MOVLstore(v *Value) bool {
  4017  	v_2 := v.Args[2]
  4018  	v_1 := v.Args[1]
  4019  	v_0 := v.Args[0]
  4020  	b := v.Block
  4021  	config := b.Func.Config
  4022  	// match: (MOVLstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4023  	// cond: is32Bit(int64(off1)+int64(off2))
  4024  	// result: (MOVLstore [off1+off2] {sym} ptr val mem)
  4025  	for {
  4026  		off1 := auxIntToInt32(v.AuxInt)
  4027  		sym := auxToSym(v.Aux)
  4028  		if v_0.Op != Op386ADDLconst {
  4029  			break
  4030  		}
  4031  		off2 := auxIntToInt32(v_0.AuxInt)
  4032  		ptr := v_0.Args[0]
  4033  		val := v_1
  4034  		mem := v_2
  4035  		if !(is32Bit(int64(off1) + int64(off2))) {
  4036  			break
  4037  		}
  4038  		v.reset(Op386MOVLstore)
  4039  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4040  		v.Aux = symToAux(sym)
  4041  		v.AddArg3(ptr, val, mem)
  4042  		return true
  4043  	}
  4044  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  4045  	// result: (MOVLstoreconst [makeValAndOff(c,off)] {sym} ptr mem)
  4046  	for {
  4047  		off := auxIntToInt32(v.AuxInt)
  4048  		sym := auxToSym(v.Aux)
  4049  		ptr := v_0
  4050  		if v_1.Op != Op386MOVLconst {
  4051  			break
  4052  		}
  4053  		c := auxIntToInt32(v_1.AuxInt)
  4054  		mem := v_2
  4055  		v.reset(Op386MOVLstoreconst)
  4056  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4057  		v.Aux = symToAux(sym)
  4058  		v.AddArg2(ptr, mem)
  4059  		return true
  4060  	}
  4061  	// match: (MOVLstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4062  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4063  	// result: (MOVLstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4064  	for {
  4065  		off1 := auxIntToInt32(v.AuxInt)
  4066  		sym1 := auxToSym(v.Aux)
  4067  		if v_0.Op != Op386LEAL {
  4068  			break
  4069  		}
  4070  		off2 := auxIntToInt32(v_0.AuxInt)
  4071  		sym2 := auxToSym(v_0.Aux)
  4072  		base := v_0.Args[0]
  4073  		val := v_1
  4074  		mem := v_2
  4075  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4076  			break
  4077  		}
  4078  		v.reset(Op386MOVLstore)
  4079  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4080  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4081  		v.AddArg3(base, val, mem)
  4082  		return true
  4083  	}
  4084  	// match: (MOVLstore {sym} [off] ptr y:(ADDLload x [off] {sym} ptr mem) mem)
  4085  	// cond: y.Uses==1 && clobber(y)
  4086  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4087  	for {
  4088  		off := auxIntToInt32(v.AuxInt)
  4089  		sym := auxToSym(v.Aux)
  4090  		ptr := v_0
  4091  		y := v_1
  4092  		if y.Op != Op386ADDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4093  			break
  4094  		}
  4095  		mem := y.Args[2]
  4096  		x := y.Args[0]
  4097  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4098  			break
  4099  		}
  4100  		v.reset(Op386ADDLmodify)
  4101  		v.AuxInt = int32ToAuxInt(off)
  4102  		v.Aux = symToAux(sym)
  4103  		v.AddArg3(ptr, x, mem)
  4104  		return true
  4105  	}
  4106  	// match: (MOVLstore {sym} [off] ptr y:(ANDLload x [off] {sym} ptr mem) mem)
  4107  	// cond: y.Uses==1 && clobber(y)
  4108  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4109  	for {
  4110  		off := auxIntToInt32(v.AuxInt)
  4111  		sym := auxToSym(v.Aux)
  4112  		ptr := v_0
  4113  		y := v_1
  4114  		if y.Op != Op386ANDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4115  			break
  4116  		}
  4117  		mem := y.Args[2]
  4118  		x := y.Args[0]
  4119  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4120  			break
  4121  		}
  4122  		v.reset(Op386ANDLmodify)
  4123  		v.AuxInt = int32ToAuxInt(off)
  4124  		v.Aux = symToAux(sym)
  4125  		v.AddArg3(ptr, x, mem)
  4126  		return true
  4127  	}
  4128  	// match: (MOVLstore {sym} [off] ptr y:(ORLload x [off] {sym} ptr mem) mem)
  4129  	// cond: y.Uses==1 && clobber(y)
  4130  	// result: (ORLmodify [off] {sym} ptr x mem)
  4131  	for {
  4132  		off := auxIntToInt32(v.AuxInt)
  4133  		sym := auxToSym(v.Aux)
  4134  		ptr := v_0
  4135  		y := v_1
  4136  		if y.Op != Op386ORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4137  			break
  4138  		}
  4139  		mem := y.Args[2]
  4140  		x := y.Args[0]
  4141  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4142  			break
  4143  		}
  4144  		v.reset(Op386ORLmodify)
  4145  		v.AuxInt = int32ToAuxInt(off)
  4146  		v.Aux = symToAux(sym)
  4147  		v.AddArg3(ptr, x, mem)
  4148  		return true
  4149  	}
  4150  	// match: (MOVLstore {sym} [off] ptr y:(XORLload x [off] {sym} ptr mem) mem)
  4151  	// cond: y.Uses==1 && clobber(y)
  4152  	// result: (XORLmodify [off] {sym} ptr x mem)
  4153  	for {
  4154  		off := auxIntToInt32(v.AuxInt)
  4155  		sym := auxToSym(v.Aux)
  4156  		ptr := v_0
  4157  		y := v_1
  4158  		if y.Op != Op386XORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4159  			break
  4160  		}
  4161  		mem := y.Args[2]
  4162  		x := y.Args[0]
  4163  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4164  			break
  4165  		}
  4166  		v.reset(Op386XORLmodify)
  4167  		v.AuxInt = int32ToAuxInt(off)
  4168  		v.Aux = symToAux(sym)
  4169  		v.AddArg3(ptr, x, mem)
  4170  		return true
  4171  	}
  4172  	// match: (MOVLstore {sym} [off] ptr y:(ADDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4173  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4174  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4175  	for {
  4176  		off := auxIntToInt32(v.AuxInt)
  4177  		sym := auxToSym(v.Aux)
  4178  		ptr := v_0
  4179  		y := v_1
  4180  		if y.Op != Op386ADDL {
  4181  			break
  4182  		}
  4183  		_ = y.Args[1]
  4184  		y_0 := y.Args[0]
  4185  		y_1 := y.Args[1]
  4186  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4187  			l := y_0
  4188  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4189  				continue
  4190  			}
  4191  			mem := l.Args[1]
  4192  			if ptr != l.Args[0] {
  4193  				continue
  4194  			}
  4195  			x := y_1
  4196  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4197  				continue
  4198  			}
  4199  			v.reset(Op386ADDLmodify)
  4200  			v.AuxInt = int32ToAuxInt(off)
  4201  			v.Aux = symToAux(sym)
  4202  			v.AddArg3(ptr, x, mem)
  4203  			return true
  4204  		}
  4205  		break
  4206  	}
  4207  	// match: (MOVLstore {sym} [off] ptr y:(SUBL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4208  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4209  	// result: (SUBLmodify [off] {sym} ptr x mem)
  4210  	for {
  4211  		off := auxIntToInt32(v.AuxInt)
  4212  		sym := auxToSym(v.Aux)
  4213  		ptr := v_0
  4214  		y := v_1
  4215  		if y.Op != Op386SUBL {
  4216  			break
  4217  		}
  4218  		x := y.Args[1]
  4219  		l := y.Args[0]
  4220  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4221  			break
  4222  		}
  4223  		mem := l.Args[1]
  4224  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4225  			break
  4226  		}
  4227  		v.reset(Op386SUBLmodify)
  4228  		v.AuxInt = int32ToAuxInt(off)
  4229  		v.Aux = symToAux(sym)
  4230  		v.AddArg3(ptr, x, mem)
  4231  		return true
  4232  	}
  4233  	// match: (MOVLstore {sym} [off] ptr y:(ANDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4234  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4235  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4236  	for {
  4237  		off := auxIntToInt32(v.AuxInt)
  4238  		sym := auxToSym(v.Aux)
  4239  		ptr := v_0
  4240  		y := v_1
  4241  		if y.Op != Op386ANDL {
  4242  			break
  4243  		}
  4244  		_ = y.Args[1]
  4245  		y_0 := y.Args[0]
  4246  		y_1 := y.Args[1]
  4247  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4248  			l := y_0
  4249  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4250  				continue
  4251  			}
  4252  			mem := l.Args[1]
  4253  			if ptr != l.Args[0] {
  4254  				continue
  4255  			}
  4256  			x := y_1
  4257  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4258  				continue
  4259  			}
  4260  			v.reset(Op386ANDLmodify)
  4261  			v.AuxInt = int32ToAuxInt(off)
  4262  			v.Aux = symToAux(sym)
  4263  			v.AddArg3(ptr, x, mem)
  4264  			return true
  4265  		}
  4266  		break
  4267  	}
  4268  	// match: (MOVLstore {sym} [off] ptr y:(ORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4269  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4270  	// result: (ORLmodify [off] {sym} ptr x mem)
  4271  	for {
  4272  		off := auxIntToInt32(v.AuxInt)
  4273  		sym := auxToSym(v.Aux)
  4274  		ptr := v_0
  4275  		y := v_1
  4276  		if y.Op != Op386ORL {
  4277  			break
  4278  		}
  4279  		_ = y.Args[1]
  4280  		y_0 := y.Args[0]
  4281  		y_1 := y.Args[1]
  4282  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4283  			l := y_0
  4284  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4285  				continue
  4286  			}
  4287  			mem := l.Args[1]
  4288  			if ptr != l.Args[0] {
  4289  				continue
  4290  			}
  4291  			x := y_1
  4292  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4293  				continue
  4294  			}
  4295  			v.reset(Op386ORLmodify)
  4296  			v.AuxInt = int32ToAuxInt(off)
  4297  			v.Aux = symToAux(sym)
  4298  			v.AddArg3(ptr, x, mem)
  4299  			return true
  4300  		}
  4301  		break
  4302  	}
  4303  	// match: (MOVLstore {sym} [off] ptr y:(XORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4304  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4305  	// result: (XORLmodify [off] {sym} ptr x mem)
  4306  	for {
  4307  		off := auxIntToInt32(v.AuxInt)
  4308  		sym := auxToSym(v.Aux)
  4309  		ptr := v_0
  4310  		y := v_1
  4311  		if y.Op != Op386XORL {
  4312  			break
  4313  		}
  4314  		_ = y.Args[1]
  4315  		y_0 := y.Args[0]
  4316  		y_1 := y.Args[1]
  4317  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4318  			l := y_0
  4319  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4320  				continue
  4321  			}
  4322  			mem := l.Args[1]
  4323  			if ptr != l.Args[0] {
  4324  				continue
  4325  			}
  4326  			x := y_1
  4327  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4328  				continue
  4329  			}
  4330  			v.reset(Op386XORLmodify)
  4331  			v.AuxInt = int32ToAuxInt(off)
  4332  			v.Aux = symToAux(sym)
  4333  			v.AddArg3(ptr, x, mem)
  4334  			return true
  4335  		}
  4336  		break
  4337  	}
  4338  	// match: (MOVLstore {sym} [off] ptr y:(ADDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4339  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4340  	// result: (ADDLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4341  	for {
  4342  		off := auxIntToInt32(v.AuxInt)
  4343  		sym := auxToSym(v.Aux)
  4344  		ptr := v_0
  4345  		y := v_1
  4346  		if y.Op != Op386ADDLconst {
  4347  			break
  4348  		}
  4349  		c := auxIntToInt32(y.AuxInt)
  4350  		l := y.Args[0]
  4351  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4352  			break
  4353  		}
  4354  		mem := l.Args[1]
  4355  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4356  			break
  4357  		}
  4358  		v.reset(Op386ADDLconstmodify)
  4359  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4360  		v.Aux = symToAux(sym)
  4361  		v.AddArg2(ptr, mem)
  4362  		return true
  4363  	}
  4364  	// match: (MOVLstore {sym} [off] ptr y:(ANDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4365  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4366  	// result: (ANDLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4367  	for {
  4368  		off := auxIntToInt32(v.AuxInt)
  4369  		sym := auxToSym(v.Aux)
  4370  		ptr := v_0
  4371  		y := v_1
  4372  		if y.Op != Op386ANDLconst {
  4373  			break
  4374  		}
  4375  		c := auxIntToInt32(y.AuxInt)
  4376  		l := y.Args[0]
  4377  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4378  			break
  4379  		}
  4380  		mem := l.Args[1]
  4381  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4382  			break
  4383  		}
  4384  		v.reset(Op386ANDLconstmodify)
  4385  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4386  		v.Aux = symToAux(sym)
  4387  		v.AddArg2(ptr, mem)
  4388  		return true
  4389  	}
  4390  	// match: (MOVLstore {sym} [off] ptr y:(ORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4391  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4392  	// result: (ORLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4393  	for {
  4394  		off := auxIntToInt32(v.AuxInt)
  4395  		sym := auxToSym(v.Aux)
  4396  		ptr := v_0
  4397  		y := v_1
  4398  		if y.Op != Op386ORLconst {
  4399  			break
  4400  		}
  4401  		c := auxIntToInt32(y.AuxInt)
  4402  		l := y.Args[0]
  4403  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4404  			break
  4405  		}
  4406  		mem := l.Args[1]
  4407  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4408  			break
  4409  		}
  4410  		v.reset(Op386ORLconstmodify)
  4411  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4412  		v.Aux = symToAux(sym)
  4413  		v.AddArg2(ptr, mem)
  4414  		return true
  4415  	}
  4416  	// match: (MOVLstore {sym} [off] ptr y:(XORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4417  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4418  	// result: (XORLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4419  	for {
  4420  		off := auxIntToInt32(v.AuxInt)
  4421  		sym := auxToSym(v.Aux)
  4422  		ptr := v_0
  4423  		y := v_1
  4424  		if y.Op != Op386XORLconst {
  4425  			break
  4426  		}
  4427  		c := auxIntToInt32(y.AuxInt)
  4428  		l := y.Args[0]
  4429  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4430  			break
  4431  		}
  4432  		mem := l.Args[1]
  4433  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4434  			break
  4435  		}
  4436  		v.reset(Op386XORLconstmodify)
  4437  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4438  		v.Aux = symToAux(sym)
  4439  		v.AddArg2(ptr, mem)
  4440  		return true
  4441  	}
  4442  	return false
  4443  }
  4444  func rewriteValue386_Op386MOVLstoreconst(v *Value) bool {
  4445  	v_1 := v.Args[1]
  4446  	v_0 := v.Args[0]
  4447  	b := v.Block
  4448  	config := b.Func.Config
  4449  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  4450  	// cond: sc.canAdd32(off)
  4451  	// result: (MOVLstoreconst [sc.addOffset32(off)] {s} ptr mem)
  4452  	for {
  4453  		sc := auxIntToValAndOff(v.AuxInt)
  4454  		s := auxToSym(v.Aux)
  4455  		if v_0.Op != Op386ADDLconst {
  4456  			break
  4457  		}
  4458  		off := auxIntToInt32(v_0.AuxInt)
  4459  		ptr := v_0.Args[0]
  4460  		mem := v_1
  4461  		if !(sc.canAdd32(off)) {
  4462  			break
  4463  		}
  4464  		v.reset(Op386MOVLstoreconst)
  4465  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4466  		v.Aux = symToAux(s)
  4467  		v.AddArg2(ptr, mem)
  4468  		return true
  4469  	}
  4470  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  4471  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  4472  	// result: (MOVLstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  4473  	for {
  4474  		sc := auxIntToValAndOff(v.AuxInt)
  4475  		sym1 := auxToSym(v.Aux)
  4476  		if v_0.Op != Op386LEAL {
  4477  			break
  4478  		}
  4479  		off := auxIntToInt32(v_0.AuxInt)
  4480  		sym2 := auxToSym(v_0.Aux)
  4481  		ptr := v_0.Args[0]
  4482  		mem := v_1
  4483  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  4484  			break
  4485  		}
  4486  		v.reset(Op386MOVLstoreconst)
  4487  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4488  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4489  		v.AddArg2(ptr, mem)
  4490  		return true
  4491  	}
  4492  	return false
  4493  }
  4494  func rewriteValue386_Op386MOVSDconst(v *Value) bool {
  4495  	b := v.Block
  4496  	config := b.Func.Config
  4497  	typ := &b.Func.Config.Types
  4498  	// match: (MOVSDconst [c])
  4499  	// cond: config.ctxt.Flag_shared
  4500  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4501  	for {
  4502  		c := auxIntToFloat64(v.AuxInt)
  4503  		if !(config.ctxt.Flag_shared) {
  4504  			break
  4505  		}
  4506  		v.reset(Op386MOVSDconst2)
  4507  		v0 := b.NewValue0(v.Pos, Op386MOVSDconst1, typ.UInt32)
  4508  		v0.AuxInt = float64ToAuxInt(c)
  4509  		v.AddArg(v0)
  4510  		return true
  4511  	}
  4512  	return false
  4513  }
  4514  func rewriteValue386_Op386MOVSDload(v *Value) bool {
  4515  	v_1 := v.Args[1]
  4516  	v_0 := v.Args[0]
  4517  	b := v.Block
  4518  	config := b.Func.Config
  4519  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4520  	// cond: is32Bit(int64(off1)+int64(off2))
  4521  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4522  	for {
  4523  		off1 := auxIntToInt32(v.AuxInt)
  4524  		sym := auxToSym(v.Aux)
  4525  		if v_0.Op != Op386ADDLconst {
  4526  			break
  4527  		}
  4528  		off2 := auxIntToInt32(v_0.AuxInt)
  4529  		ptr := v_0.Args[0]
  4530  		mem := v_1
  4531  		if !(is32Bit(int64(off1) + int64(off2))) {
  4532  			break
  4533  		}
  4534  		v.reset(Op386MOVSDload)
  4535  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4536  		v.Aux = symToAux(sym)
  4537  		v.AddArg2(ptr, mem)
  4538  		return true
  4539  	}
  4540  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4541  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4542  	// result: (MOVSDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4543  	for {
  4544  		off1 := auxIntToInt32(v.AuxInt)
  4545  		sym1 := auxToSym(v.Aux)
  4546  		if v_0.Op != Op386LEAL {
  4547  			break
  4548  		}
  4549  		off2 := auxIntToInt32(v_0.AuxInt)
  4550  		sym2 := auxToSym(v_0.Aux)
  4551  		base := v_0.Args[0]
  4552  		mem := v_1
  4553  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4554  			break
  4555  		}
  4556  		v.reset(Op386MOVSDload)
  4557  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4558  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4559  		v.AddArg2(base, mem)
  4560  		return true
  4561  	}
  4562  	return false
  4563  }
  4564  func rewriteValue386_Op386MOVSDstore(v *Value) bool {
  4565  	v_2 := v.Args[2]
  4566  	v_1 := v.Args[1]
  4567  	v_0 := v.Args[0]
  4568  	b := v.Block
  4569  	config := b.Func.Config
  4570  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4571  	// cond: is32Bit(int64(off1)+int64(off2))
  4572  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4573  	for {
  4574  		off1 := auxIntToInt32(v.AuxInt)
  4575  		sym := auxToSym(v.Aux)
  4576  		if v_0.Op != Op386ADDLconst {
  4577  			break
  4578  		}
  4579  		off2 := auxIntToInt32(v_0.AuxInt)
  4580  		ptr := v_0.Args[0]
  4581  		val := v_1
  4582  		mem := v_2
  4583  		if !(is32Bit(int64(off1) + int64(off2))) {
  4584  			break
  4585  		}
  4586  		v.reset(Op386MOVSDstore)
  4587  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4588  		v.Aux = symToAux(sym)
  4589  		v.AddArg3(ptr, val, mem)
  4590  		return true
  4591  	}
  4592  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4593  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4594  	// result: (MOVSDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4595  	for {
  4596  		off1 := auxIntToInt32(v.AuxInt)
  4597  		sym1 := auxToSym(v.Aux)
  4598  		if v_0.Op != Op386LEAL {
  4599  			break
  4600  		}
  4601  		off2 := auxIntToInt32(v_0.AuxInt)
  4602  		sym2 := auxToSym(v_0.Aux)
  4603  		base := v_0.Args[0]
  4604  		val := v_1
  4605  		mem := v_2
  4606  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4607  			break
  4608  		}
  4609  		v.reset(Op386MOVSDstore)
  4610  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4611  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4612  		v.AddArg3(base, val, mem)
  4613  		return true
  4614  	}
  4615  	return false
  4616  }
  4617  func rewriteValue386_Op386MOVSSconst(v *Value) bool {
  4618  	b := v.Block
  4619  	config := b.Func.Config
  4620  	typ := &b.Func.Config.Types
  4621  	// match: (MOVSSconst [c])
  4622  	// cond: config.ctxt.Flag_shared
  4623  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4624  	for {
  4625  		c := auxIntToFloat32(v.AuxInt)
  4626  		if !(config.ctxt.Flag_shared) {
  4627  			break
  4628  		}
  4629  		v.reset(Op386MOVSSconst2)
  4630  		v0 := b.NewValue0(v.Pos, Op386MOVSSconst1, typ.UInt32)
  4631  		v0.AuxInt = float32ToAuxInt(c)
  4632  		v.AddArg(v0)
  4633  		return true
  4634  	}
  4635  	return false
  4636  }
  4637  func rewriteValue386_Op386MOVSSload(v *Value) bool {
  4638  	v_1 := v.Args[1]
  4639  	v_0 := v.Args[0]
  4640  	b := v.Block
  4641  	config := b.Func.Config
  4642  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4643  	// cond: is32Bit(int64(off1)+int64(off2))
  4644  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4645  	for {
  4646  		off1 := auxIntToInt32(v.AuxInt)
  4647  		sym := auxToSym(v.Aux)
  4648  		if v_0.Op != Op386ADDLconst {
  4649  			break
  4650  		}
  4651  		off2 := auxIntToInt32(v_0.AuxInt)
  4652  		ptr := v_0.Args[0]
  4653  		mem := v_1
  4654  		if !(is32Bit(int64(off1) + int64(off2))) {
  4655  			break
  4656  		}
  4657  		v.reset(Op386MOVSSload)
  4658  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4659  		v.Aux = symToAux(sym)
  4660  		v.AddArg2(ptr, mem)
  4661  		return true
  4662  	}
  4663  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4664  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4665  	// result: (MOVSSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4666  	for {
  4667  		off1 := auxIntToInt32(v.AuxInt)
  4668  		sym1 := auxToSym(v.Aux)
  4669  		if v_0.Op != Op386LEAL {
  4670  			break
  4671  		}
  4672  		off2 := auxIntToInt32(v_0.AuxInt)
  4673  		sym2 := auxToSym(v_0.Aux)
  4674  		base := v_0.Args[0]
  4675  		mem := v_1
  4676  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4677  			break
  4678  		}
  4679  		v.reset(Op386MOVSSload)
  4680  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4681  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4682  		v.AddArg2(base, mem)
  4683  		return true
  4684  	}
  4685  	return false
  4686  }
  4687  func rewriteValue386_Op386MOVSSstore(v *Value) bool {
  4688  	v_2 := v.Args[2]
  4689  	v_1 := v.Args[1]
  4690  	v_0 := v.Args[0]
  4691  	b := v.Block
  4692  	config := b.Func.Config
  4693  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4694  	// cond: is32Bit(int64(off1)+int64(off2))
  4695  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4696  	for {
  4697  		off1 := auxIntToInt32(v.AuxInt)
  4698  		sym := auxToSym(v.Aux)
  4699  		if v_0.Op != Op386ADDLconst {
  4700  			break
  4701  		}
  4702  		off2 := auxIntToInt32(v_0.AuxInt)
  4703  		ptr := v_0.Args[0]
  4704  		val := v_1
  4705  		mem := v_2
  4706  		if !(is32Bit(int64(off1) + int64(off2))) {
  4707  			break
  4708  		}
  4709  		v.reset(Op386MOVSSstore)
  4710  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4711  		v.Aux = symToAux(sym)
  4712  		v.AddArg3(ptr, val, mem)
  4713  		return true
  4714  	}
  4715  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4716  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4717  	// result: (MOVSSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4718  	for {
  4719  		off1 := auxIntToInt32(v.AuxInt)
  4720  		sym1 := auxToSym(v.Aux)
  4721  		if v_0.Op != Op386LEAL {
  4722  			break
  4723  		}
  4724  		off2 := auxIntToInt32(v_0.AuxInt)
  4725  		sym2 := auxToSym(v_0.Aux)
  4726  		base := v_0.Args[0]
  4727  		val := v_1
  4728  		mem := v_2
  4729  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4730  			break
  4731  		}
  4732  		v.reset(Op386MOVSSstore)
  4733  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4734  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4735  		v.AddArg3(base, val, mem)
  4736  		return true
  4737  	}
  4738  	return false
  4739  }
  4740  func rewriteValue386_Op386MOVWLSX(v *Value) bool {
  4741  	v_0 := v.Args[0]
  4742  	b := v.Block
  4743  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  4744  	// cond: x.Uses == 1 && clobber(x)
  4745  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  4746  	for {
  4747  		x := v_0
  4748  		if x.Op != Op386MOVWload {
  4749  			break
  4750  		}
  4751  		off := auxIntToInt32(x.AuxInt)
  4752  		sym := auxToSym(x.Aux)
  4753  		mem := x.Args[1]
  4754  		ptr := x.Args[0]
  4755  		if !(x.Uses == 1 && clobber(x)) {
  4756  			break
  4757  		}
  4758  		b = x.Block
  4759  		v0 := b.NewValue0(x.Pos, Op386MOVWLSXload, v.Type)
  4760  		v.copyOf(v0)
  4761  		v0.AuxInt = int32ToAuxInt(off)
  4762  		v0.Aux = symToAux(sym)
  4763  		v0.AddArg2(ptr, mem)
  4764  		return true
  4765  	}
  4766  	// match: (MOVWLSX (ANDLconst [c] x))
  4767  	// cond: c & 0x8000 == 0
  4768  	// result: (ANDLconst [c & 0x7fff] x)
  4769  	for {
  4770  		if v_0.Op != Op386ANDLconst {
  4771  			break
  4772  		}
  4773  		c := auxIntToInt32(v_0.AuxInt)
  4774  		x := v_0.Args[0]
  4775  		if !(c&0x8000 == 0) {
  4776  			break
  4777  		}
  4778  		v.reset(Op386ANDLconst)
  4779  		v.AuxInt = int32ToAuxInt(c & 0x7fff)
  4780  		v.AddArg(x)
  4781  		return true
  4782  	}
  4783  	return false
  4784  }
  4785  func rewriteValue386_Op386MOVWLSXload(v *Value) bool {
  4786  	v_1 := v.Args[1]
  4787  	v_0 := v.Args[0]
  4788  	b := v.Block
  4789  	config := b.Func.Config
  4790  	// match: (MOVWLSXload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  4791  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  4792  	// result: (MOVWLSX x)
  4793  	for {
  4794  		off := auxIntToInt32(v.AuxInt)
  4795  		sym := auxToSym(v.Aux)
  4796  		ptr := v_0
  4797  		if v_1.Op != Op386MOVWstore {
  4798  			break
  4799  		}
  4800  		off2 := auxIntToInt32(v_1.AuxInt)
  4801  		sym2 := auxToSym(v_1.Aux)
  4802  		x := v_1.Args[1]
  4803  		ptr2 := v_1.Args[0]
  4804  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  4805  			break
  4806  		}
  4807  		v.reset(Op386MOVWLSX)
  4808  		v.AddArg(x)
  4809  		return true
  4810  	}
  4811  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4812  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4813  	// result: (MOVWLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4814  	for {
  4815  		off1 := auxIntToInt32(v.AuxInt)
  4816  		sym1 := auxToSym(v.Aux)
  4817  		if v_0.Op != Op386LEAL {
  4818  			break
  4819  		}
  4820  		off2 := auxIntToInt32(v_0.AuxInt)
  4821  		sym2 := auxToSym(v_0.Aux)
  4822  		base := v_0.Args[0]
  4823  		mem := v_1
  4824  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4825  			break
  4826  		}
  4827  		v.reset(Op386MOVWLSXload)
  4828  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4829  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4830  		v.AddArg2(base, mem)
  4831  		return true
  4832  	}
  4833  	// match: (MOVWLSXload [off] {sym} (SB) _)
  4834  	// cond: symIsRO(sym)
  4835  	// result: (MOVLconst [int32(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))])
  4836  	for {
  4837  		off := auxIntToInt32(v.AuxInt)
  4838  		sym := auxToSym(v.Aux)
  4839  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4840  			break
  4841  		}
  4842  		v.reset(Op386MOVLconst)
  4843  		v.AuxInt = int32ToAuxInt(int32(int16(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))))
  4844  		return true
  4845  	}
  4846  	return false
  4847  }
  4848  func rewriteValue386_Op386MOVWLZX(v *Value) bool {
  4849  	v_0 := v.Args[0]
  4850  	b := v.Block
  4851  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  4852  	// cond: x.Uses == 1 && clobber(x)
  4853  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  4854  	for {
  4855  		x := v_0
  4856  		if x.Op != Op386MOVWload {
  4857  			break
  4858  		}
  4859  		off := auxIntToInt32(x.AuxInt)
  4860  		sym := auxToSym(x.Aux)
  4861  		mem := x.Args[1]
  4862  		ptr := x.Args[0]
  4863  		if !(x.Uses == 1 && clobber(x)) {
  4864  			break
  4865  		}
  4866  		b = x.Block
  4867  		v0 := b.NewValue0(x.Pos, Op386MOVWload, v.Type)
  4868  		v.copyOf(v0)
  4869  		v0.AuxInt = int32ToAuxInt(off)
  4870  		v0.Aux = symToAux(sym)
  4871  		v0.AddArg2(ptr, mem)
  4872  		return true
  4873  	}
  4874  	// match: (MOVWLZX (ANDLconst [c] x))
  4875  	// result: (ANDLconst [c & 0xffff] x)
  4876  	for {
  4877  		if v_0.Op != Op386ANDLconst {
  4878  			break
  4879  		}
  4880  		c := auxIntToInt32(v_0.AuxInt)
  4881  		x := v_0.Args[0]
  4882  		v.reset(Op386ANDLconst)
  4883  		v.AuxInt = int32ToAuxInt(c & 0xffff)
  4884  		v.AddArg(x)
  4885  		return true
  4886  	}
  4887  	return false
  4888  }
  4889  func rewriteValue386_Op386MOVWload(v *Value) bool {
  4890  	v_1 := v.Args[1]
  4891  	v_0 := v.Args[0]
  4892  	b := v.Block
  4893  	config := b.Func.Config
  4894  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  4895  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  4896  	// result: (MOVWLZX x)
  4897  	for {
  4898  		off := auxIntToInt32(v.AuxInt)
  4899  		sym := auxToSym(v.Aux)
  4900  		ptr := v_0
  4901  		if v_1.Op != Op386MOVWstore {
  4902  			break
  4903  		}
  4904  		off2 := auxIntToInt32(v_1.AuxInt)
  4905  		sym2 := auxToSym(v_1.Aux)
  4906  		x := v_1.Args[1]
  4907  		ptr2 := v_1.Args[0]
  4908  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  4909  			break
  4910  		}
  4911  		v.reset(Op386MOVWLZX)
  4912  		v.AddArg(x)
  4913  		return true
  4914  	}
  4915  	// match: (MOVWload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4916  	// cond: is32Bit(int64(off1)+int64(off2))
  4917  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  4918  	for {
  4919  		off1 := auxIntToInt32(v.AuxInt)
  4920  		sym := auxToSym(v.Aux)
  4921  		if v_0.Op != Op386ADDLconst {
  4922  			break
  4923  		}
  4924  		off2 := auxIntToInt32(v_0.AuxInt)
  4925  		ptr := v_0.Args[0]
  4926  		mem := v_1
  4927  		if !(is32Bit(int64(off1) + int64(off2))) {
  4928  			break
  4929  		}
  4930  		v.reset(Op386MOVWload)
  4931  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4932  		v.Aux = symToAux(sym)
  4933  		v.AddArg2(ptr, mem)
  4934  		return true
  4935  	}
  4936  	// match: (MOVWload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4937  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4938  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4939  	for {
  4940  		off1 := auxIntToInt32(v.AuxInt)
  4941  		sym1 := auxToSym(v.Aux)
  4942  		if v_0.Op != Op386LEAL {
  4943  			break
  4944  		}
  4945  		off2 := auxIntToInt32(v_0.AuxInt)
  4946  		sym2 := auxToSym(v_0.Aux)
  4947  		base := v_0.Args[0]
  4948  		mem := v_1
  4949  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4950  			break
  4951  		}
  4952  		v.reset(Op386MOVWload)
  4953  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4954  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4955  		v.AddArg2(base, mem)
  4956  		return true
  4957  	}
  4958  	// match: (MOVWload [off] {sym} (SB) _)
  4959  	// cond: symIsRO(sym)
  4960  	// result: (MOVLconst [int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  4961  	for {
  4962  		off := auxIntToInt32(v.AuxInt)
  4963  		sym := auxToSym(v.Aux)
  4964  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4965  			break
  4966  		}
  4967  		v.reset(Op386MOVLconst)
  4968  		v.AuxInt = int32ToAuxInt(int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  4969  		return true
  4970  	}
  4971  	return false
  4972  }
  4973  func rewriteValue386_Op386MOVWstore(v *Value) bool {
  4974  	v_2 := v.Args[2]
  4975  	v_1 := v.Args[1]
  4976  	v_0 := v.Args[0]
  4977  	b := v.Block
  4978  	config := b.Func.Config
  4979  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  4980  	// result: (MOVWstore [off] {sym} ptr x mem)
  4981  	for {
  4982  		off := auxIntToInt32(v.AuxInt)
  4983  		sym := auxToSym(v.Aux)
  4984  		ptr := v_0
  4985  		if v_1.Op != Op386MOVWLSX {
  4986  			break
  4987  		}
  4988  		x := v_1.Args[0]
  4989  		mem := v_2
  4990  		v.reset(Op386MOVWstore)
  4991  		v.AuxInt = int32ToAuxInt(off)
  4992  		v.Aux = symToAux(sym)
  4993  		v.AddArg3(ptr, x, mem)
  4994  		return true
  4995  	}
  4996  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  4997  	// result: (MOVWstore [off] {sym} ptr x mem)
  4998  	for {
  4999  		off := auxIntToInt32(v.AuxInt)
  5000  		sym := auxToSym(v.Aux)
  5001  		ptr := v_0
  5002  		if v_1.Op != Op386MOVWLZX {
  5003  			break
  5004  		}
  5005  		x := v_1.Args[0]
  5006  		mem := v_2
  5007  		v.reset(Op386MOVWstore)
  5008  		v.AuxInt = int32ToAuxInt(off)
  5009  		v.Aux = symToAux(sym)
  5010  		v.AddArg3(ptr, x, mem)
  5011  		return true
  5012  	}
  5013  	// match: (MOVWstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5014  	// cond: is32Bit(int64(off1)+int64(off2))
  5015  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  5016  	for {
  5017  		off1 := auxIntToInt32(v.AuxInt)
  5018  		sym := auxToSym(v.Aux)
  5019  		if v_0.Op != Op386ADDLconst {
  5020  			break
  5021  		}
  5022  		off2 := auxIntToInt32(v_0.AuxInt)
  5023  		ptr := v_0.Args[0]
  5024  		val := v_1
  5025  		mem := v_2
  5026  		if !(is32Bit(int64(off1) + int64(off2))) {
  5027  			break
  5028  		}
  5029  		v.reset(Op386MOVWstore)
  5030  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5031  		v.Aux = symToAux(sym)
  5032  		v.AddArg3(ptr, val, mem)
  5033  		return true
  5034  	}
  5035  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5036  	// result: (MOVWstoreconst [makeValAndOff(c,off)] {sym} ptr mem)
  5037  	for {
  5038  		off := auxIntToInt32(v.AuxInt)
  5039  		sym := auxToSym(v.Aux)
  5040  		ptr := v_0
  5041  		if v_1.Op != Op386MOVLconst {
  5042  			break
  5043  		}
  5044  		c := auxIntToInt32(v_1.AuxInt)
  5045  		mem := v_2
  5046  		v.reset(Op386MOVWstoreconst)
  5047  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  5048  		v.Aux = symToAux(sym)
  5049  		v.AddArg2(ptr, mem)
  5050  		return true
  5051  	}
  5052  	// match: (MOVWstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5053  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5054  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5055  	for {
  5056  		off1 := auxIntToInt32(v.AuxInt)
  5057  		sym1 := auxToSym(v.Aux)
  5058  		if v_0.Op != Op386LEAL {
  5059  			break
  5060  		}
  5061  		off2 := auxIntToInt32(v_0.AuxInt)
  5062  		sym2 := auxToSym(v_0.Aux)
  5063  		base := v_0.Args[0]
  5064  		val := v_1
  5065  		mem := v_2
  5066  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5067  			break
  5068  		}
  5069  		v.reset(Op386MOVWstore)
  5070  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5071  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5072  		v.AddArg3(base, val, mem)
  5073  		return true
  5074  	}
  5075  	return false
  5076  }
  5077  func rewriteValue386_Op386MOVWstoreconst(v *Value) bool {
  5078  	v_1 := v.Args[1]
  5079  	v_0 := v.Args[0]
  5080  	b := v.Block
  5081  	config := b.Func.Config
  5082  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5083  	// cond: sc.canAdd32(off)
  5084  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
  5085  	for {
  5086  		sc := auxIntToValAndOff(v.AuxInt)
  5087  		s := auxToSym(v.Aux)
  5088  		if v_0.Op != Op386ADDLconst {
  5089  			break
  5090  		}
  5091  		off := auxIntToInt32(v_0.AuxInt)
  5092  		ptr := v_0.Args[0]
  5093  		mem := v_1
  5094  		if !(sc.canAdd32(off)) {
  5095  			break
  5096  		}
  5097  		v.reset(Op386MOVWstoreconst)
  5098  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  5099  		v.Aux = symToAux(s)
  5100  		v.AddArg2(ptr, mem)
  5101  		return true
  5102  	}
  5103  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  5104  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  5105  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  5106  	for {
  5107  		sc := auxIntToValAndOff(v.AuxInt)
  5108  		sym1 := auxToSym(v.Aux)
  5109  		if v_0.Op != Op386LEAL {
  5110  			break
  5111  		}
  5112  		off := auxIntToInt32(v_0.AuxInt)
  5113  		sym2 := auxToSym(v_0.Aux)
  5114  		ptr := v_0.Args[0]
  5115  		mem := v_1
  5116  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  5117  			break
  5118  		}
  5119  		v.reset(Op386MOVWstoreconst)
  5120  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  5121  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5122  		v.AddArg2(ptr, mem)
  5123  		return true
  5124  	}
  5125  	return false
  5126  }
  5127  func rewriteValue386_Op386MULL(v *Value) bool {
  5128  	v_1 := v.Args[1]
  5129  	v_0 := v.Args[0]
  5130  	// match: (MULL x (MOVLconst [c]))
  5131  	// result: (MULLconst [c] x)
  5132  	for {
  5133  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5134  			x := v_0
  5135  			if v_1.Op != Op386MOVLconst {
  5136  				continue
  5137  			}
  5138  			c := auxIntToInt32(v_1.AuxInt)
  5139  			v.reset(Op386MULLconst)
  5140  			v.AuxInt = int32ToAuxInt(c)
  5141  			v.AddArg(x)
  5142  			return true
  5143  		}
  5144  		break
  5145  	}
  5146  	// match: (MULL x l:(MOVLload [off] {sym} ptr mem))
  5147  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  5148  	// result: (MULLload x [off] {sym} ptr mem)
  5149  	for {
  5150  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5151  			x := v_0
  5152  			l := v_1
  5153  			if l.Op != Op386MOVLload {
  5154  				continue
  5155  			}
  5156  			off := auxIntToInt32(l.AuxInt)
  5157  			sym := auxToSym(l.Aux)
  5158  			mem := l.Args[1]
  5159  			ptr := l.Args[0]
  5160  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  5161  				continue
  5162  			}
  5163  			v.reset(Op386MULLload)
  5164  			v.AuxInt = int32ToAuxInt(off)
  5165  			v.Aux = symToAux(sym)
  5166  			v.AddArg3(x, ptr, mem)
  5167  			return true
  5168  		}
  5169  		break
  5170  	}
  5171  	return false
  5172  }
  5173  func rewriteValue386_Op386MULLconst(v *Value) bool {
  5174  	v_0 := v.Args[0]
  5175  	b := v.Block
  5176  	// match: (MULLconst [c] (MULLconst [d] x))
  5177  	// result: (MULLconst [c * d] x)
  5178  	for {
  5179  		c := auxIntToInt32(v.AuxInt)
  5180  		if v_0.Op != Op386MULLconst {
  5181  			break
  5182  		}
  5183  		d := auxIntToInt32(v_0.AuxInt)
  5184  		x := v_0.Args[0]
  5185  		v.reset(Op386MULLconst)
  5186  		v.AuxInt = int32ToAuxInt(c * d)
  5187  		v.AddArg(x)
  5188  		return true
  5189  	}
  5190  	// match: (MULLconst [-9] x)
  5191  	// result: (NEGL (LEAL8 <v.Type> x x))
  5192  	for {
  5193  		if auxIntToInt32(v.AuxInt) != -9 {
  5194  			break
  5195  		}
  5196  		x := v_0
  5197  		v.reset(Op386NEGL)
  5198  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5199  		v0.AddArg2(x, x)
  5200  		v.AddArg(v0)
  5201  		return true
  5202  	}
  5203  	// match: (MULLconst [-5] x)
  5204  	// result: (NEGL (LEAL4 <v.Type> x x))
  5205  	for {
  5206  		if auxIntToInt32(v.AuxInt) != -5 {
  5207  			break
  5208  		}
  5209  		x := v_0
  5210  		v.reset(Op386NEGL)
  5211  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5212  		v0.AddArg2(x, x)
  5213  		v.AddArg(v0)
  5214  		return true
  5215  	}
  5216  	// match: (MULLconst [-3] x)
  5217  	// result: (NEGL (LEAL2 <v.Type> x x))
  5218  	for {
  5219  		if auxIntToInt32(v.AuxInt) != -3 {
  5220  			break
  5221  		}
  5222  		x := v_0
  5223  		v.reset(Op386NEGL)
  5224  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5225  		v0.AddArg2(x, x)
  5226  		v.AddArg(v0)
  5227  		return true
  5228  	}
  5229  	// match: (MULLconst [-1] x)
  5230  	// result: (NEGL x)
  5231  	for {
  5232  		if auxIntToInt32(v.AuxInt) != -1 {
  5233  			break
  5234  		}
  5235  		x := v_0
  5236  		v.reset(Op386NEGL)
  5237  		v.AddArg(x)
  5238  		return true
  5239  	}
  5240  	// match: (MULLconst [0] _)
  5241  	// result: (MOVLconst [0])
  5242  	for {
  5243  		if auxIntToInt32(v.AuxInt) != 0 {
  5244  			break
  5245  		}
  5246  		v.reset(Op386MOVLconst)
  5247  		v.AuxInt = int32ToAuxInt(0)
  5248  		return true
  5249  	}
  5250  	// match: (MULLconst [1] x)
  5251  	// result: x
  5252  	for {
  5253  		if auxIntToInt32(v.AuxInt) != 1 {
  5254  			break
  5255  		}
  5256  		x := v_0
  5257  		v.copyOf(x)
  5258  		return true
  5259  	}
  5260  	// match: (MULLconst [3] x)
  5261  	// result: (LEAL2 x x)
  5262  	for {
  5263  		if auxIntToInt32(v.AuxInt) != 3 {
  5264  			break
  5265  		}
  5266  		x := v_0
  5267  		v.reset(Op386LEAL2)
  5268  		v.AddArg2(x, x)
  5269  		return true
  5270  	}
  5271  	// match: (MULLconst [5] x)
  5272  	// result: (LEAL4 x x)
  5273  	for {
  5274  		if auxIntToInt32(v.AuxInt) != 5 {
  5275  			break
  5276  		}
  5277  		x := v_0
  5278  		v.reset(Op386LEAL4)
  5279  		v.AddArg2(x, x)
  5280  		return true
  5281  	}
  5282  	// match: (MULLconst [7] x)
  5283  	// result: (LEAL2 x (LEAL2 <v.Type> x x))
  5284  	for {
  5285  		if auxIntToInt32(v.AuxInt) != 7 {
  5286  			break
  5287  		}
  5288  		x := v_0
  5289  		v.reset(Op386LEAL2)
  5290  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5291  		v0.AddArg2(x, x)
  5292  		v.AddArg2(x, v0)
  5293  		return true
  5294  	}
  5295  	// match: (MULLconst [9] x)
  5296  	// result: (LEAL8 x x)
  5297  	for {
  5298  		if auxIntToInt32(v.AuxInt) != 9 {
  5299  			break
  5300  		}
  5301  		x := v_0
  5302  		v.reset(Op386LEAL8)
  5303  		v.AddArg2(x, x)
  5304  		return true
  5305  	}
  5306  	// match: (MULLconst [11] x)
  5307  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  5308  	for {
  5309  		if auxIntToInt32(v.AuxInt) != 11 {
  5310  			break
  5311  		}
  5312  		x := v_0
  5313  		v.reset(Op386LEAL2)
  5314  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5315  		v0.AddArg2(x, x)
  5316  		v.AddArg2(x, v0)
  5317  		return true
  5318  	}
  5319  	// match: (MULLconst [13] x)
  5320  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  5321  	for {
  5322  		if auxIntToInt32(v.AuxInt) != 13 {
  5323  			break
  5324  		}
  5325  		x := v_0
  5326  		v.reset(Op386LEAL4)
  5327  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5328  		v0.AddArg2(x, x)
  5329  		v.AddArg2(x, v0)
  5330  		return true
  5331  	}
  5332  	// match: (MULLconst [19] x)
  5333  	// result: (LEAL2 x (LEAL8 <v.Type> x x))
  5334  	for {
  5335  		if auxIntToInt32(v.AuxInt) != 19 {
  5336  			break
  5337  		}
  5338  		x := v_0
  5339  		v.reset(Op386LEAL2)
  5340  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5341  		v0.AddArg2(x, x)
  5342  		v.AddArg2(x, v0)
  5343  		return true
  5344  	}
  5345  	// match: (MULLconst [21] x)
  5346  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  5347  	for {
  5348  		if auxIntToInt32(v.AuxInt) != 21 {
  5349  			break
  5350  		}
  5351  		x := v_0
  5352  		v.reset(Op386LEAL4)
  5353  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5354  		v0.AddArg2(x, x)
  5355  		v.AddArg2(x, v0)
  5356  		return true
  5357  	}
  5358  	// match: (MULLconst [25] x)
  5359  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  5360  	for {
  5361  		if auxIntToInt32(v.AuxInt) != 25 {
  5362  			break
  5363  		}
  5364  		x := v_0
  5365  		v.reset(Op386LEAL8)
  5366  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5367  		v0.AddArg2(x, x)
  5368  		v.AddArg2(x, v0)
  5369  		return true
  5370  	}
  5371  	// match: (MULLconst [27] x)
  5372  	// result: (LEAL8 (LEAL2 <v.Type> x x) (LEAL2 <v.Type> x x))
  5373  	for {
  5374  		if auxIntToInt32(v.AuxInt) != 27 {
  5375  			break
  5376  		}
  5377  		x := v_0
  5378  		v.reset(Op386LEAL8)
  5379  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5380  		v0.AddArg2(x, x)
  5381  		v.AddArg2(v0, v0)
  5382  		return true
  5383  	}
  5384  	// match: (MULLconst [37] x)
  5385  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  5386  	for {
  5387  		if auxIntToInt32(v.AuxInt) != 37 {
  5388  			break
  5389  		}
  5390  		x := v_0
  5391  		v.reset(Op386LEAL4)
  5392  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5393  		v0.AddArg2(x, x)
  5394  		v.AddArg2(x, v0)
  5395  		return true
  5396  	}
  5397  	// match: (MULLconst [41] x)
  5398  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  5399  	for {
  5400  		if auxIntToInt32(v.AuxInt) != 41 {
  5401  			break
  5402  		}
  5403  		x := v_0
  5404  		v.reset(Op386LEAL8)
  5405  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5406  		v0.AddArg2(x, x)
  5407  		v.AddArg2(x, v0)
  5408  		return true
  5409  	}
  5410  	// match: (MULLconst [45] x)
  5411  	// result: (LEAL8 (LEAL4 <v.Type> x x) (LEAL4 <v.Type> x x))
  5412  	for {
  5413  		if auxIntToInt32(v.AuxInt) != 45 {
  5414  			break
  5415  		}
  5416  		x := v_0
  5417  		v.reset(Op386LEAL8)
  5418  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5419  		v0.AddArg2(x, x)
  5420  		v.AddArg2(v0, v0)
  5421  		return true
  5422  	}
  5423  	// match: (MULLconst [73] x)
  5424  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  5425  	for {
  5426  		if auxIntToInt32(v.AuxInt) != 73 {
  5427  			break
  5428  		}
  5429  		x := v_0
  5430  		v.reset(Op386LEAL8)
  5431  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5432  		v0.AddArg2(x, x)
  5433  		v.AddArg2(x, v0)
  5434  		return true
  5435  	}
  5436  	// match: (MULLconst [81] x)
  5437  	// result: (LEAL8 (LEAL8 <v.Type> x x) (LEAL8 <v.Type> x x))
  5438  	for {
  5439  		if auxIntToInt32(v.AuxInt) != 81 {
  5440  			break
  5441  		}
  5442  		x := v_0
  5443  		v.reset(Op386LEAL8)
  5444  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5445  		v0.AddArg2(x, x)
  5446  		v.AddArg2(v0, v0)
  5447  		return true
  5448  	}
  5449  	// match: (MULLconst [c] x)
  5450  	// cond: isPowerOfTwo(c+1) && c >= 15
  5451  	// result: (SUBL (SHLLconst <v.Type> [int32(log32(c+1))] x) x)
  5452  	for {
  5453  		c := auxIntToInt32(v.AuxInt)
  5454  		x := v_0
  5455  		if !(isPowerOfTwo(c+1) && c >= 15) {
  5456  			break
  5457  		}
  5458  		v.reset(Op386SUBL)
  5459  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5460  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  5461  		v0.AddArg(x)
  5462  		v.AddArg2(v0, x)
  5463  		return true
  5464  	}
  5465  	// match: (MULLconst [c] x)
  5466  	// cond: isPowerOfTwo(c-1) && c >= 17
  5467  	// result: (LEAL1 (SHLLconst <v.Type> [int32(log32(c-1))] x) x)
  5468  	for {
  5469  		c := auxIntToInt32(v.AuxInt)
  5470  		x := v_0
  5471  		if !(isPowerOfTwo(c-1) && c >= 17) {
  5472  			break
  5473  		}
  5474  		v.reset(Op386LEAL1)
  5475  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5476  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  5477  		v0.AddArg(x)
  5478  		v.AddArg2(v0, x)
  5479  		return true
  5480  	}
  5481  	// match: (MULLconst [c] x)
  5482  	// cond: isPowerOfTwo(c-2) && c >= 34
  5483  	// result: (LEAL2 (SHLLconst <v.Type> [int32(log32(c-2))] x) x)
  5484  	for {
  5485  		c := auxIntToInt32(v.AuxInt)
  5486  		x := v_0
  5487  		if !(isPowerOfTwo(c-2) && c >= 34) {
  5488  			break
  5489  		}
  5490  		v.reset(Op386LEAL2)
  5491  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5492  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 2)))
  5493  		v0.AddArg(x)
  5494  		v.AddArg2(v0, x)
  5495  		return true
  5496  	}
  5497  	// match: (MULLconst [c] x)
  5498  	// cond: isPowerOfTwo(c-4) && c >= 68
  5499  	// result: (LEAL4 (SHLLconst <v.Type> [int32(log32(c-4))] x) x)
  5500  	for {
  5501  		c := auxIntToInt32(v.AuxInt)
  5502  		x := v_0
  5503  		if !(isPowerOfTwo(c-4) && c >= 68) {
  5504  			break
  5505  		}
  5506  		v.reset(Op386LEAL4)
  5507  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5508  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 4)))
  5509  		v0.AddArg(x)
  5510  		v.AddArg2(v0, x)
  5511  		return true
  5512  	}
  5513  	// match: (MULLconst [c] x)
  5514  	// cond: isPowerOfTwo(c-8) && c >= 136
  5515  	// result: (LEAL8 (SHLLconst <v.Type> [int32(log32(c-8))] x) x)
  5516  	for {
  5517  		c := auxIntToInt32(v.AuxInt)
  5518  		x := v_0
  5519  		if !(isPowerOfTwo(c-8) && c >= 136) {
  5520  			break
  5521  		}
  5522  		v.reset(Op386LEAL8)
  5523  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5524  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 8)))
  5525  		v0.AddArg(x)
  5526  		v.AddArg2(v0, x)
  5527  		return true
  5528  	}
  5529  	// match: (MULLconst [c] x)
  5530  	// cond: c%3 == 0 && isPowerOfTwo(c/3)
  5531  	// result: (SHLLconst [int32(log32(c/3))] (LEAL2 <v.Type> x x))
  5532  	for {
  5533  		c := auxIntToInt32(v.AuxInt)
  5534  		x := v_0
  5535  		if !(c%3 == 0 && isPowerOfTwo(c/3)) {
  5536  			break
  5537  		}
  5538  		v.reset(Op386SHLLconst)
  5539  		v.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  5540  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5541  		v0.AddArg2(x, x)
  5542  		v.AddArg(v0)
  5543  		return true
  5544  	}
  5545  	// match: (MULLconst [c] x)
  5546  	// cond: c%5 == 0 && isPowerOfTwo(c/5)
  5547  	// result: (SHLLconst [int32(log32(c/5))] (LEAL4 <v.Type> x x))
  5548  	for {
  5549  		c := auxIntToInt32(v.AuxInt)
  5550  		x := v_0
  5551  		if !(c%5 == 0 && isPowerOfTwo(c/5)) {
  5552  			break
  5553  		}
  5554  		v.reset(Op386SHLLconst)
  5555  		v.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  5556  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5557  		v0.AddArg2(x, x)
  5558  		v.AddArg(v0)
  5559  		return true
  5560  	}
  5561  	// match: (MULLconst [c] x)
  5562  	// cond: c%9 == 0 && isPowerOfTwo(c/9)
  5563  	// result: (SHLLconst [int32(log32(c/9))] (LEAL8 <v.Type> x x))
  5564  	for {
  5565  		c := auxIntToInt32(v.AuxInt)
  5566  		x := v_0
  5567  		if !(c%9 == 0 && isPowerOfTwo(c/9)) {
  5568  			break
  5569  		}
  5570  		v.reset(Op386SHLLconst)
  5571  		v.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  5572  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5573  		v0.AddArg2(x, x)
  5574  		v.AddArg(v0)
  5575  		return true
  5576  	}
  5577  	// match: (MULLconst [c] (MOVLconst [d]))
  5578  	// result: (MOVLconst [c*d])
  5579  	for {
  5580  		c := auxIntToInt32(v.AuxInt)
  5581  		if v_0.Op != Op386MOVLconst {
  5582  			break
  5583  		}
  5584  		d := auxIntToInt32(v_0.AuxInt)
  5585  		v.reset(Op386MOVLconst)
  5586  		v.AuxInt = int32ToAuxInt(c * d)
  5587  		return true
  5588  	}
  5589  	return false
  5590  }
  5591  func rewriteValue386_Op386MULLload(v *Value) bool {
  5592  	v_2 := v.Args[2]
  5593  	v_1 := v.Args[1]
  5594  	v_0 := v.Args[0]
  5595  	b := v.Block
  5596  	config := b.Func.Config
  5597  	// match: (MULLload [off1] {sym} val (ADDLconst [off2] base) mem)
  5598  	// cond: is32Bit(int64(off1)+int64(off2))
  5599  	// result: (MULLload [off1+off2] {sym} val base mem)
  5600  	for {
  5601  		off1 := auxIntToInt32(v.AuxInt)
  5602  		sym := auxToSym(v.Aux)
  5603  		val := v_0
  5604  		if v_1.Op != Op386ADDLconst {
  5605  			break
  5606  		}
  5607  		off2 := auxIntToInt32(v_1.AuxInt)
  5608  		base := v_1.Args[0]
  5609  		mem := v_2
  5610  		if !(is32Bit(int64(off1) + int64(off2))) {
  5611  			break
  5612  		}
  5613  		v.reset(Op386MULLload)
  5614  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5615  		v.Aux = symToAux(sym)
  5616  		v.AddArg3(val, base, mem)
  5617  		return true
  5618  	}
  5619  	// match: (MULLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  5620  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5621  	// result: (MULLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  5622  	for {
  5623  		off1 := auxIntToInt32(v.AuxInt)
  5624  		sym1 := auxToSym(v.Aux)
  5625  		val := v_0
  5626  		if v_1.Op != Op386LEAL {
  5627  			break
  5628  		}
  5629  		off2 := auxIntToInt32(v_1.AuxInt)
  5630  		sym2 := auxToSym(v_1.Aux)
  5631  		base := v_1.Args[0]
  5632  		mem := v_2
  5633  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5634  			break
  5635  		}
  5636  		v.reset(Op386MULLload)
  5637  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5638  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5639  		v.AddArg3(val, base, mem)
  5640  		return true
  5641  	}
  5642  	return false
  5643  }
  5644  func rewriteValue386_Op386MULSD(v *Value) bool {
  5645  	v_1 := v.Args[1]
  5646  	v_0 := v.Args[0]
  5647  	// match: (MULSD x l:(MOVSDload [off] {sym} ptr mem))
  5648  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  5649  	// result: (MULSDload x [off] {sym} ptr mem)
  5650  	for {
  5651  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5652  			x := v_0
  5653  			l := v_1
  5654  			if l.Op != Op386MOVSDload {
  5655  				continue
  5656  			}
  5657  			off := auxIntToInt32(l.AuxInt)
  5658  			sym := auxToSym(l.Aux)
  5659  			mem := l.Args[1]
  5660  			ptr := l.Args[0]
  5661  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  5662  				continue
  5663  			}
  5664  			v.reset(Op386MULSDload)
  5665  			v.AuxInt = int32ToAuxInt(off)
  5666  			v.Aux = symToAux(sym)
  5667  			v.AddArg3(x, ptr, mem)
  5668  			return true
  5669  		}
  5670  		break
  5671  	}
  5672  	return false
  5673  }
  5674  func rewriteValue386_Op386MULSDload(v *Value) bool {
  5675  	v_2 := v.Args[2]
  5676  	v_1 := v.Args[1]
  5677  	v_0 := v.Args[0]
  5678  	b := v.Block
  5679  	config := b.Func.Config
  5680  	// match: (MULSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  5681  	// cond: is32Bit(int64(off1)+int64(off2))
  5682  	// result: (MULSDload [off1+off2] {sym} val base mem)
  5683  	for {
  5684  		off1 := auxIntToInt32(v.AuxInt)
  5685  		sym := auxToSym(v.Aux)
  5686  		val := v_0
  5687  		if v_1.Op != Op386ADDLconst {
  5688  			break
  5689  		}
  5690  		off2 := auxIntToInt32(v_1.AuxInt)
  5691  		base := v_1.Args[0]
  5692  		mem := v_2
  5693  		if !(is32Bit(int64(off1) + int64(off2))) {
  5694  			break
  5695  		}
  5696  		v.reset(Op386MULSDload)
  5697  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5698  		v.Aux = symToAux(sym)
  5699  		v.AddArg3(val, base, mem)
  5700  		return true
  5701  	}
  5702  	// match: (MULSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  5703  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5704  	// result: (MULSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  5705  	for {
  5706  		off1 := auxIntToInt32(v.AuxInt)
  5707  		sym1 := auxToSym(v.Aux)
  5708  		val := v_0
  5709  		if v_1.Op != Op386LEAL {
  5710  			break
  5711  		}
  5712  		off2 := auxIntToInt32(v_1.AuxInt)
  5713  		sym2 := auxToSym(v_1.Aux)
  5714  		base := v_1.Args[0]
  5715  		mem := v_2
  5716  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5717  			break
  5718  		}
  5719  		v.reset(Op386MULSDload)
  5720  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5721  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5722  		v.AddArg3(val, base, mem)
  5723  		return true
  5724  	}
  5725  	return false
  5726  }
  5727  func rewriteValue386_Op386MULSS(v *Value) bool {
  5728  	v_1 := v.Args[1]
  5729  	v_0 := v.Args[0]
  5730  	// match: (MULSS x l:(MOVSSload [off] {sym} ptr mem))
  5731  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  5732  	// result: (MULSSload x [off] {sym} ptr mem)
  5733  	for {
  5734  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5735  			x := v_0
  5736  			l := v_1
  5737  			if l.Op != Op386MOVSSload {
  5738  				continue
  5739  			}
  5740  			off := auxIntToInt32(l.AuxInt)
  5741  			sym := auxToSym(l.Aux)
  5742  			mem := l.Args[1]
  5743  			ptr := l.Args[0]
  5744  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  5745  				continue
  5746  			}
  5747  			v.reset(Op386MULSSload)
  5748  			v.AuxInt = int32ToAuxInt(off)
  5749  			v.Aux = symToAux(sym)
  5750  			v.AddArg3(x, ptr, mem)
  5751  			return true
  5752  		}
  5753  		break
  5754  	}
  5755  	return false
  5756  }
  5757  func rewriteValue386_Op386MULSSload(v *Value) bool {
  5758  	v_2 := v.Args[2]
  5759  	v_1 := v.Args[1]
  5760  	v_0 := v.Args[0]
  5761  	b := v.Block
  5762  	config := b.Func.Config
  5763  	// match: (MULSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  5764  	// cond: is32Bit(int64(off1)+int64(off2))
  5765  	// result: (MULSSload [off1+off2] {sym} val base mem)
  5766  	for {
  5767  		off1 := auxIntToInt32(v.AuxInt)
  5768  		sym := auxToSym(v.Aux)
  5769  		val := v_0
  5770  		if v_1.Op != Op386ADDLconst {
  5771  			break
  5772  		}
  5773  		off2 := auxIntToInt32(v_1.AuxInt)
  5774  		base := v_1.Args[0]
  5775  		mem := v_2
  5776  		if !(is32Bit(int64(off1) + int64(off2))) {
  5777  			break
  5778  		}
  5779  		v.reset(Op386MULSSload)
  5780  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5781  		v.Aux = symToAux(sym)
  5782  		v.AddArg3(val, base, mem)
  5783  		return true
  5784  	}
  5785  	// match: (MULSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  5786  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5787  	// result: (MULSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  5788  	for {
  5789  		off1 := auxIntToInt32(v.AuxInt)
  5790  		sym1 := auxToSym(v.Aux)
  5791  		val := v_0
  5792  		if v_1.Op != Op386LEAL {
  5793  			break
  5794  		}
  5795  		off2 := auxIntToInt32(v_1.AuxInt)
  5796  		sym2 := auxToSym(v_1.Aux)
  5797  		base := v_1.Args[0]
  5798  		mem := v_2
  5799  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5800  			break
  5801  		}
  5802  		v.reset(Op386MULSSload)
  5803  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5804  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5805  		v.AddArg3(val, base, mem)
  5806  		return true
  5807  	}
  5808  	return false
  5809  }
  5810  func rewriteValue386_Op386NEGL(v *Value) bool {
  5811  	v_0 := v.Args[0]
  5812  	// match: (NEGL (MOVLconst [c]))
  5813  	// result: (MOVLconst [-c])
  5814  	for {
  5815  		if v_0.Op != Op386MOVLconst {
  5816  			break
  5817  		}
  5818  		c := auxIntToInt32(v_0.AuxInt)
  5819  		v.reset(Op386MOVLconst)
  5820  		v.AuxInt = int32ToAuxInt(-c)
  5821  		return true
  5822  	}
  5823  	return false
  5824  }
  5825  func rewriteValue386_Op386NOTL(v *Value) bool {
  5826  	v_0 := v.Args[0]
  5827  	// match: (NOTL (MOVLconst [c]))
  5828  	// result: (MOVLconst [^c])
  5829  	for {
  5830  		if v_0.Op != Op386MOVLconst {
  5831  			break
  5832  		}
  5833  		c := auxIntToInt32(v_0.AuxInt)
  5834  		v.reset(Op386MOVLconst)
  5835  		v.AuxInt = int32ToAuxInt(^c)
  5836  		return true
  5837  	}
  5838  	return false
  5839  }
  5840  func rewriteValue386_Op386ORL(v *Value) bool {
  5841  	v_1 := v.Args[1]
  5842  	v_0 := v.Args[0]
  5843  	// match: (ORL x (MOVLconst [c]))
  5844  	// result: (ORLconst [c] x)
  5845  	for {
  5846  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5847  			x := v_0
  5848  			if v_1.Op != Op386MOVLconst {
  5849  				continue
  5850  			}
  5851  			c := auxIntToInt32(v_1.AuxInt)
  5852  			v.reset(Op386ORLconst)
  5853  			v.AuxInt = int32ToAuxInt(c)
  5854  			v.AddArg(x)
  5855  			return true
  5856  		}
  5857  		break
  5858  	}
  5859  	// match: (ORL x l:(MOVLload [off] {sym} ptr mem))
  5860  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  5861  	// result: (ORLload x [off] {sym} ptr mem)
  5862  	for {
  5863  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5864  			x := v_0
  5865  			l := v_1
  5866  			if l.Op != Op386MOVLload {
  5867  				continue
  5868  			}
  5869  			off := auxIntToInt32(l.AuxInt)
  5870  			sym := auxToSym(l.Aux)
  5871  			mem := l.Args[1]
  5872  			ptr := l.Args[0]
  5873  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  5874  				continue
  5875  			}
  5876  			v.reset(Op386ORLload)
  5877  			v.AuxInt = int32ToAuxInt(off)
  5878  			v.Aux = symToAux(sym)
  5879  			v.AddArg3(x, ptr, mem)
  5880  			return true
  5881  		}
  5882  		break
  5883  	}
  5884  	// match: (ORL x x)
  5885  	// result: x
  5886  	for {
  5887  		x := v_0
  5888  		if x != v_1 {
  5889  			break
  5890  		}
  5891  		v.copyOf(x)
  5892  		return true
  5893  	}
  5894  	return false
  5895  }
  5896  func rewriteValue386_Op386ORLconst(v *Value) bool {
  5897  	v_0 := v.Args[0]
  5898  	// match: (ORLconst [c] x)
  5899  	// cond: c==0
  5900  	// result: x
  5901  	for {
  5902  		c := auxIntToInt32(v.AuxInt)
  5903  		x := v_0
  5904  		if !(c == 0) {
  5905  			break
  5906  		}
  5907  		v.copyOf(x)
  5908  		return true
  5909  	}
  5910  	// match: (ORLconst [c] _)
  5911  	// cond: c==-1
  5912  	// result: (MOVLconst [-1])
  5913  	for {
  5914  		c := auxIntToInt32(v.AuxInt)
  5915  		if !(c == -1) {
  5916  			break
  5917  		}
  5918  		v.reset(Op386MOVLconst)
  5919  		v.AuxInt = int32ToAuxInt(-1)
  5920  		return true
  5921  	}
  5922  	// match: (ORLconst [c] (MOVLconst [d]))
  5923  	// result: (MOVLconst [c|d])
  5924  	for {
  5925  		c := auxIntToInt32(v.AuxInt)
  5926  		if v_0.Op != Op386MOVLconst {
  5927  			break
  5928  		}
  5929  		d := auxIntToInt32(v_0.AuxInt)
  5930  		v.reset(Op386MOVLconst)
  5931  		v.AuxInt = int32ToAuxInt(c | d)
  5932  		return true
  5933  	}
  5934  	return false
  5935  }
  5936  func rewriteValue386_Op386ORLconstmodify(v *Value) bool {
  5937  	v_1 := v.Args[1]
  5938  	v_0 := v.Args[0]
  5939  	b := v.Block
  5940  	config := b.Func.Config
  5941  	// match: (ORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  5942  	// cond: valoff1.canAdd32(off2)
  5943  	// result: (ORLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  5944  	for {
  5945  		valoff1 := auxIntToValAndOff(v.AuxInt)
  5946  		sym := auxToSym(v.Aux)
  5947  		if v_0.Op != Op386ADDLconst {
  5948  			break
  5949  		}
  5950  		off2 := auxIntToInt32(v_0.AuxInt)
  5951  		base := v_0.Args[0]
  5952  		mem := v_1
  5953  		if !(valoff1.canAdd32(off2)) {
  5954  			break
  5955  		}
  5956  		v.reset(Op386ORLconstmodify)
  5957  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  5958  		v.Aux = symToAux(sym)
  5959  		v.AddArg2(base, mem)
  5960  		return true
  5961  	}
  5962  	// match: (ORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  5963  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5964  	// result: (ORLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  5965  	for {
  5966  		valoff1 := auxIntToValAndOff(v.AuxInt)
  5967  		sym1 := auxToSym(v.Aux)
  5968  		if v_0.Op != Op386LEAL {
  5969  			break
  5970  		}
  5971  		off2 := auxIntToInt32(v_0.AuxInt)
  5972  		sym2 := auxToSym(v_0.Aux)
  5973  		base := v_0.Args[0]
  5974  		mem := v_1
  5975  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5976  			break
  5977  		}
  5978  		v.reset(Op386ORLconstmodify)
  5979  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  5980  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5981  		v.AddArg2(base, mem)
  5982  		return true
  5983  	}
  5984  	return false
  5985  }
  5986  func rewriteValue386_Op386ORLload(v *Value) bool {
  5987  	v_2 := v.Args[2]
  5988  	v_1 := v.Args[1]
  5989  	v_0 := v.Args[0]
  5990  	b := v.Block
  5991  	config := b.Func.Config
  5992  	// match: (ORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  5993  	// cond: is32Bit(int64(off1)+int64(off2))
  5994  	// result: (ORLload [off1+off2] {sym} val base mem)
  5995  	for {
  5996  		off1 := auxIntToInt32(v.AuxInt)
  5997  		sym := auxToSym(v.Aux)
  5998  		val := v_0
  5999  		if v_1.Op != Op386ADDLconst {
  6000  			break
  6001  		}
  6002  		off2 := auxIntToInt32(v_1.AuxInt)
  6003  		base := v_1.Args[0]
  6004  		mem := v_2
  6005  		if !(is32Bit(int64(off1) + int64(off2))) {
  6006  			break
  6007  		}
  6008  		v.reset(Op386ORLload)
  6009  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6010  		v.Aux = symToAux(sym)
  6011  		v.AddArg3(val, base, mem)
  6012  		return true
  6013  	}
  6014  	// match: (ORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6015  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6016  	// result: (ORLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6017  	for {
  6018  		off1 := auxIntToInt32(v.AuxInt)
  6019  		sym1 := auxToSym(v.Aux)
  6020  		val := v_0
  6021  		if v_1.Op != Op386LEAL {
  6022  			break
  6023  		}
  6024  		off2 := auxIntToInt32(v_1.AuxInt)
  6025  		sym2 := auxToSym(v_1.Aux)
  6026  		base := v_1.Args[0]
  6027  		mem := v_2
  6028  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6029  			break
  6030  		}
  6031  		v.reset(Op386ORLload)
  6032  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6033  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6034  		v.AddArg3(val, base, mem)
  6035  		return true
  6036  	}
  6037  	return false
  6038  }
  6039  func rewriteValue386_Op386ORLmodify(v *Value) bool {
  6040  	v_2 := v.Args[2]
  6041  	v_1 := v.Args[1]
  6042  	v_0 := v.Args[0]
  6043  	b := v.Block
  6044  	config := b.Func.Config
  6045  	// match: (ORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  6046  	// cond: is32Bit(int64(off1)+int64(off2))
  6047  	// result: (ORLmodify [off1+off2] {sym} base val mem)
  6048  	for {
  6049  		off1 := auxIntToInt32(v.AuxInt)
  6050  		sym := auxToSym(v.Aux)
  6051  		if v_0.Op != Op386ADDLconst {
  6052  			break
  6053  		}
  6054  		off2 := auxIntToInt32(v_0.AuxInt)
  6055  		base := v_0.Args[0]
  6056  		val := v_1
  6057  		mem := v_2
  6058  		if !(is32Bit(int64(off1) + int64(off2))) {
  6059  			break
  6060  		}
  6061  		v.reset(Op386ORLmodify)
  6062  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6063  		v.Aux = symToAux(sym)
  6064  		v.AddArg3(base, val, mem)
  6065  		return true
  6066  	}
  6067  	// match: (ORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  6068  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6069  	// result: (ORLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  6070  	for {
  6071  		off1 := auxIntToInt32(v.AuxInt)
  6072  		sym1 := auxToSym(v.Aux)
  6073  		if v_0.Op != Op386LEAL {
  6074  			break
  6075  		}
  6076  		off2 := auxIntToInt32(v_0.AuxInt)
  6077  		sym2 := auxToSym(v_0.Aux)
  6078  		base := v_0.Args[0]
  6079  		val := v_1
  6080  		mem := v_2
  6081  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6082  			break
  6083  		}
  6084  		v.reset(Op386ORLmodify)
  6085  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6086  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6087  		v.AddArg3(base, val, mem)
  6088  		return true
  6089  	}
  6090  	return false
  6091  }
  6092  func rewriteValue386_Op386ROLB(v *Value) bool {
  6093  	v_1 := v.Args[1]
  6094  	v_0 := v.Args[0]
  6095  	// match: (ROLB x (MOVLconst [c]))
  6096  	// result: (ROLBconst [int8(c&7)] x)
  6097  	for {
  6098  		x := v_0
  6099  		if v_1.Op != Op386MOVLconst {
  6100  			break
  6101  		}
  6102  		c := auxIntToInt32(v_1.AuxInt)
  6103  		v.reset(Op386ROLBconst)
  6104  		v.AuxInt = int8ToAuxInt(int8(c & 7))
  6105  		v.AddArg(x)
  6106  		return true
  6107  	}
  6108  	return false
  6109  }
  6110  func rewriteValue386_Op386ROLBconst(v *Value) bool {
  6111  	v_0 := v.Args[0]
  6112  	// match: (ROLBconst [0] x)
  6113  	// result: x
  6114  	for {
  6115  		if auxIntToInt8(v.AuxInt) != 0 {
  6116  			break
  6117  		}
  6118  		x := v_0
  6119  		v.copyOf(x)
  6120  		return true
  6121  	}
  6122  	return false
  6123  }
  6124  func rewriteValue386_Op386ROLL(v *Value) bool {
  6125  	v_1 := v.Args[1]
  6126  	v_0 := v.Args[0]
  6127  	// match: (ROLL x (MOVLconst [c]))
  6128  	// result: (ROLLconst [c&31] x)
  6129  	for {
  6130  		x := v_0
  6131  		if v_1.Op != Op386MOVLconst {
  6132  			break
  6133  		}
  6134  		c := auxIntToInt32(v_1.AuxInt)
  6135  		v.reset(Op386ROLLconst)
  6136  		v.AuxInt = int32ToAuxInt(c & 31)
  6137  		v.AddArg(x)
  6138  		return true
  6139  	}
  6140  	return false
  6141  }
  6142  func rewriteValue386_Op386ROLLconst(v *Value) bool {
  6143  	v_0 := v.Args[0]
  6144  	// match: (ROLLconst [0] x)
  6145  	// result: x
  6146  	for {
  6147  		if auxIntToInt32(v.AuxInt) != 0 {
  6148  			break
  6149  		}
  6150  		x := v_0
  6151  		v.copyOf(x)
  6152  		return true
  6153  	}
  6154  	return false
  6155  }
  6156  func rewriteValue386_Op386ROLW(v *Value) bool {
  6157  	v_1 := v.Args[1]
  6158  	v_0 := v.Args[0]
  6159  	// match: (ROLW x (MOVLconst [c]))
  6160  	// result: (ROLWconst [int16(c&15)] x)
  6161  	for {
  6162  		x := v_0
  6163  		if v_1.Op != Op386MOVLconst {
  6164  			break
  6165  		}
  6166  		c := auxIntToInt32(v_1.AuxInt)
  6167  		v.reset(Op386ROLWconst)
  6168  		v.AuxInt = int16ToAuxInt(int16(c & 15))
  6169  		v.AddArg(x)
  6170  		return true
  6171  	}
  6172  	return false
  6173  }
  6174  func rewriteValue386_Op386ROLWconst(v *Value) bool {
  6175  	v_0 := v.Args[0]
  6176  	// match: (ROLWconst [0] x)
  6177  	// result: x
  6178  	for {
  6179  		if auxIntToInt16(v.AuxInt) != 0 {
  6180  			break
  6181  		}
  6182  		x := v_0
  6183  		v.copyOf(x)
  6184  		return true
  6185  	}
  6186  	return false
  6187  }
  6188  func rewriteValue386_Op386SARB(v *Value) bool {
  6189  	v_1 := v.Args[1]
  6190  	v_0 := v.Args[0]
  6191  	// match: (SARB x (MOVLconst [c]))
  6192  	// result: (SARBconst [int8(min(int64(c&31),7))] x)
  6193  	for {
  6194  		x := v_0
  6195  		if v_1.Op != Op386MOVLconst {
  6196  			break
  6197  		}
  6198  		c := auxIntToInt32(v_1.AuxInt)
  6199  		v.reset(Op386SARBconst)
  6200  		v.AuxInt = int8ToAuxInt(int8(min(int64(c&31), 7)))
  6201  		v.AddArg(x)
  6202  		return true
  6203  	}
  6204  	return false
  6205  }
  6206  func rewriteValue386_Op386SARBconst(v *Value) bool {
  6207  	v_0 := v.Args[0]
  6208  	// match: (SARBconst x [0])
  6209  	// result: x
  6210  	for {
  6211  		if auxIntToInt8(v.AuxInt) != 0 {
  6212  			break
  6213  		}
  6214  		x := v_0
  6215  		v.copyOf(x)
  6216  		return true
  6217  	}
  6218  	// match: (SARBconst [c] (MOVLconst [d]))
  6219  	// result: (MOVLconst [d>>uint64(c)])
  6220  	for {
  6221  		c := auxIntToInt8(v.AuxInt)
  6222  		if v_0.Op != Op386MOVLconst {
  6223  			break
  6224  		}
  6225  		d := auxIntToInt32(v_0.AuxInt)
  6226  		v.reset(Op386MOVLconst)
  6227  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  6228  		return true
  6229  	}
  6230  	return false
  6231  }
  6232  func rewriteValue386_Op386SARL(v *Value) bool {
  6233  	v_1 := v.Args[1]
  6234  	v_0 := v.Args[0]
  6235  	// match: (SARL x (MOVLconst [c]))
  6236  	// result: (SARLconst [c&31] x)
  6237  	for {
  6238  		x := v_0
  6239  		if v_1.Op != Op386MOVLconst {
  6240  			break
  6241  		}
  6242  		c := auxIntToInt32(v_1.AuxInt)
  6243  		v.reset(Op386SARLconst)
  6244  		v.AuxInt = int32ToAuxInt(c & 31)
  6245  		v.AddArg(x)
  6246  		return true
  6247  	}
  6248  	// match: (SARL x (ANDLconst [31] y))
  6249  	// result: (SARL x y)
  6250  	for {
  6251  		x := v_0
  6252  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  6253  			break
  6254  		}
  6255  		y := v_1.Args[0]
  6256  		v.reset(Op386SARL)
  6257  		v.AddArg2(x, y)
  6258  		return true
  6259  	}
  6260  	return false
  6261  }
  6262  func rewriteValue386_Op386SARLconst(v *Value) bool {
  6263  	v_0 := v.Args[0]
  6264  	// match: (SARLconst x [0])
  6265  	// result: x
  6266  	for {
  6267  		if auxIntToInt32(v.AuxInt) != 0 {
  6268  			break
  6269  		}
  6270  		x := v_0
  6271  		v.copyOf(x)
  6272  		return true
  6273  	}
  6274  	// match: (SARLconst [c] (MOVLconst [d]))
  6275  	// result: (MOVLconst [d>>uint64(c)])
  6276  	for {
  6277  		c := auxIntToInt32(v.AuxInt)
  6278  		if v_0.Op != Op386MOVLconst {
  6279  			break
  6280  		}
  6281  		d := auxIntToInt32(v_0.AuxInt)
  6282  		v.reset(Op386MOVLconst)
  6283  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  6284  		return true
  6285  	}
  6286  	return false
  6287  }
  6288  func rewriteValue386_Op386SARW(v *Value) bool {
  6289  	v_1 := v.Args[1]
  6290  	v_0 := v.Args[0]
  6291  	// match: (SARW x (MOVLconst [c]))
  6292  	// result: (SARWconst [int16(min(int64(c&31),15))] x)
  6293  	for {
  6294  		x := v_0
  6295  		if v_1.Op != Op386MOVLconst {
  6296  			break
  6297  		}
  6298  		c := auxIntToInt32(v_1.AuxInt)
  6299  		v.reset(Op386SARWconst)
  6300  		v.AuxInt = int16ToAuxInt(int16(min(int64(c&31), 15)))
  6301  		v.AddArg(x)
  6302  		return true
  6303  	}
  6304  	return false
  6305  }
  6306  func rewriteValue386_Op386SARWconst(v *Value) bool {
  6307  	v_0 := v.Args[0]
  6308  	// match: (SARWconst x [0])
  6309  	// result: x
  6310  	for {
  6311  		if auxIntToInt16(v.AuxInt) != 0 {
  6312  			break
  6313  		}
  6314  		x := v_0
  6315  		v.copyOf(x)
  6316  		return true
  6317  	}
  6318  	// match: (SARWconst [c] (MOVLconst [d]))
  6319  	// result: (MOVLconst [d>>uint64(c)])
  6320  	for {
  6321  		c := auxIntToInt16(v.AuxInt)
  6322  		if v_0.Op != Op386MOVLconst {
  6323  			break
  6324  		}
  6325  		d := auxIntToInt32(v_0.AuxInt)
  6326  		v.reset(Op386MOVLconst)
  6327  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  6328  		return true
  6329  	}
  6330  	return false
  6331  }
  6332  func rewriteValue386_Op386SBBL(v *Value) bool {
  6333  	v_2 := v.Args[2]
  6334  	v_1 := v.Args[1]
  6335  	v_0 := v.Args[0]
  6336  	// match: (SBBL x (MOVLconst [c]) f)
  6337  	// result: (SBBLconst [c] x f)
  6338  	for {
  6339  		x := v_0
  6340  		if v_1.Op != Op386MOVLconst {
  6341  			break
  6342  		}
  6343  		c := auxIntToInt32(v_1.AuxInt)
  6344  		f := v_2
  6345  		v.reset(Op386SBBLconst)
  6346  		v.AuxInt = int32ToAuxInt(c)
  6347  		v.AddArg2(x, f)
  6348  		return true
  6349  	}
  6350  	return false
  6351  }
  6352  func rewriteValue386_Op386SBBLcarrymask(v *Value) bool {
  6353  	v_0 := v.Args[0]
  6354  	// match: (SBBLcarrymask (FlagEQ))
  6355  	// result: (MOVLconst [0])
  6356  	for {
  6357  		if v_0.Op != Op386FlagEQ {
  6358  			break
  6359  		}
  6360  		v.reset(Op386MOVLconst)
  6361  		v.AuxInt = int32ToAuxInt(0)
  6362  		return true
  6363  	}
  6364  	// match: (SBBLcarrymask (FlagLT_ULT))
  6365  	// result: (MOVLconst [-1])
  6366  	for {
  6367  		if v_0.Op != Op386FlagLT_ULT {
  6368  			break
  6369  		}
  6370  		v.reset(Op386MOVLconst)
  6371  		v.AuxInt = int32ToAuxInt(-1)
  6372  		return true
  6373  	}
  6374  	// match: (SBBLcarrymask (FlagLT_UGT))
  6375  	// result: (MOVLconst [0])
  6376  	for {
  6377  		if v_0.Op != Op386FlagLT_UGT {
  6378  			break
  6379  		}
  6380  		v.reset(Op386MOVLconst)
  6381  		v.AuxInt = int32ToAuxInt(0)
  6382  		return true
  6383  	}
  6384  	// match: (SBBLcarrymask (FlagGT_ULT))
  6385  	// result: (MOVLconst [-1])
  6386  	for {
  6387  		if v_0.Op != Op386FlagGT_ULT {
  6388  			break
  6389  		}
  6390  		v.reset(Op386MOVLconst)
  6391  		v.AuxInt = int32ToAuxInt(-1)
  6392  		return true
  6393  	}
  6394  	// match: (SBBLcarrymask (FlagGT_UGT))
  6395  	// result: (MOVLconst [0])
  6396  	for {
  6397  		if v_0.Op != Op386FlagGT_UGT {
  6398  			break
  6399  		}
  6400  		v.reset(Op386MOVLconst)
  6401  		v.AuxInt = int32ToAuxInt(0)
  6402  		return true
  6403  	}
  6404  	return false
  6405  }
  6406  func rewriteValue386_Op386SETA(v *Value) bool {
  6407  	v_0 := v.Args[0]
  6408  	// match: (SETA (InvertFlags x))
  6409  	// result: (SETB x)
  6410  	for {
  6411  		if v_0.Op != Op386InvertFlags {
  6412  			break
  6413  		}
  6414  		x := v_0.Args[0]
  6415  		v.reset(Op386SETB)
  6416  		v.AddArg(x)
  6417  		return true
  6418  	}
  6419  	// match: (SETA (FlagEQ))
  6420  	// result: (MOVLconst [0])
  6421  	for {
  6422  		if v_0.Op != Op386FlagEQ {
  6423  			break
  6424  		}
  6425  		v.reset(Op386MOVLconst)
  6426  		v.AuxInt = int32ToAuxInt(0)
  6427  		return true
  6428  	}
  6429  	// match: (SETA (FlagLT_ULT))
  6430  	// result: (MOVLconst [0])
  6431  	for {
  6432  		if v_0.Op != Op386FlagLT_ULT {
  6433  			break
  6434  		}
  6435  		v.reset(Op386MOVLconst)
  6436  		v.AuxInt = int32ToAuxInt(0)
  6437  		return true
  6438  	}
  6439  	// match: (SETA (FlagLT_UGT))
  6440  	// result: (MOVLconst [1])
  6441  	for {
  6442  		if v_0.Op != Op386FlagLT_UGT {
  6443  			break
  6444  		}
  6445  		v.reset(Op386MOVLconst)
  6446  		v.AuxInt = int32ToAuxInt(1)
  6447  		return true
  6448  	}
  6449  	// match: (SETA (FlagGT_ULT))
  6450  	// result: (MOVLconst [0])
  6451  	for {
  6452  		if v_0.Op != Op386FlagGT_ULT {
  6453  			break
  6454  		}
  6455  		v.reset(Op386MOVLconst)
  6456  		v.AuxInt = int32ToAuxInt(0)
  6457  		return true
  6458  	}
  6459  	// match: (SETA (FlagGT_UGT))
  6460  	// result: (MOVLconst [1])
  6461  	for {
  6462  		if v_0.Op != Op386FlagGT_UGT {
  6463  			break
  6464  		}
  6465  		v.reset(Op386MOVLconst)
  6466  		v.AuxInt = int32ToAuxInt(1)
  6467  		return true
  6468  	}
  6469  	return false
  6470  }
  6471  func rewriteValue386_Op386SETAE(v *Value) bool {
  6472  	v_0 := v.Args[0]
  6473  	// match: (SETAE (InvertFlags x))
  6474  	// result: (SETBE x)
  6475  	for {
  6476  		if v_0.Op != Op386InvertFlags {
  6477  			break
  6478  		}
  6479  		x := v_0.Args[0]
  6480  		v.reset(Op386SETBE)
  6481  		v.AddArg(x)
  6482  		return true
  6483  	}
  6484  	// match: (SETAE (FlagEQ))
  6485  	// result: (MOVLconst [1])
  6486  	for {
  6487  		if v_0.Op != Op386FlagEQ {
  6488  			break
  6489  		}
  6490  		v.reset(Op386MOVLconst)
  6491  		v.AuxInt = int32ToAuxInt(1)
  6492  		return true
  6493  	}
  6494  	// match: (SETAE (FlagLT_ULT))
  6495  	// result: (MOVLconst [0])
  6496  	for {
  6497  		if v_0.Op != Op386FlagLT_ULT {
  6498  			break
  6499  		}
  6500  		v.reset(Op386MOVLconst)
  6501  		v.AuxInt = int32ToAuxInt(0)
  6502  		return true
  6503  	}
  6504  	// match: (SETAE (FlagLT_UGT))
  6505  	// result: (MOVLconst [1])
  6506  	for {
  6507  		if v_0.Op != Op386FlagLT_UGT {
  6508  			break
  6509  		}
  6510  		v.reset(Op386MOVLconst)
  6511  		v.AuxInt = int32ToAuxInt(1)
  6512  		return true
  6513  	}
  6514  	// match: (SETAE (FlagGT_ULT))
  6515  	// result: (MOVLconst [0])
  6516  	for {
  6517  		if v_0.Op != Op386FlagGT_ULT {
  6518  			break
  6519  		}
  6520  		v.reset(Op386MOVLconst)
  6521  		v.AuxInt = int32ToAuxInt(0)
  6522  		return true
  6523  	}
  6524  	// match: (SETAE (FlagGT_UGT))
  6525  	// result: (MOVLconst [1])
  6526  	for {
  6527  		if v_0.Op != Op386FlagGT_UGT {
  6528  			break
  6529  		}
  6530  		v.reset(Op386MOVLconst)
  6531  		v.AuxInt = int32ToAuxInt(1)
  6532  		return true
  6533  	}
  6534  	return false
  6535  }
  6536  func rewriteValue386_Op386SETB(v *Value) bool {
  6537  	v_0 := v.Args[0]
  6538  	// match: (SETB (InvertFlags x))
  6539  	// result: (SETA x)
  6540  	for {
  6541  		if v_0.Op != Op386InvertFlags {
  6542  			break
  6543  		}
  6544  		x := v_0.Args[0]
  6545  		v.reset(Op386SETA)
  6546  		v.AddArg(x)
  6547  		return true
  6548  	}
  6549  	// match: (SETB (FlagEQ))
  6550  	// result: (MOVLconst [0])
  6551  	for {
  6552  		if v_0.Op != Op386FlagEQ {
  6553  			break
  6554  		}
  6555  		v.reset(Op386MOVLconst)
  6556  		v.AuxInt = int32ToAuxInt(0)
  6557  		return true
  6558  	}
  6559  	// match: (SETB (FlagLT_ULT))
  6560  	// result: (MOVLconst [1])
  6561  	for {
  6562  		if v_0.Op != Op386FlagLT_ULT {
  6563  			break
  6564  		}
  6565  		v.reset(Op386MOVLconst)
  6566  		v.AuxInt = int32ToAuxInt(1)
  6567  		return true
  6568  	}
  6569  	// match: (SETB (FlagLT_UGT))
  6570  	// result: (MOVLconst [0])
  6571  	for {
  6572  		if v_0.Op != Op386FlagLT_UGT {
  6573  			break
  6574  		}
  6575  		v.reset(Op386MOVLconst)
  6576  		v.AuxInt = int32ToAuxInt(0)
  6577  		return true
  6578  	}
  6579  	// match: (SETB (FlagGT_ULT))
  6580  	// result: (MOVLconst [1])
  6581  	for {
  6582  		if v_0.Op != Op386FlagGT_ULT {
  6583  			break
  6584  		}
  6585  		v.reset(Op386MOVLconst)
  6586  		v.AuxInt = int32ToAuxInt(1)
  6587  		return true
  6588  	}
  6589  	// match: (SETB (FlagGT_UGT))
  6590  	// result: (MOVLconst [0])
  6591  	for {
  6592  		if v_0.Op != Op386FlagGT_UGT {
  6593  			break
  6594  		}
  6595  		v.reset(Op386MOVLconst)
  6596  		v.AuxInt = int32ToAuxInt(0)
  6597  		return true
  6598  	}
  6599  	return false
  6600  }
  6601  func rewriteValue386_Op386SETBE(v *Value) bool {
  6602  	v_0 := v.Args[0]
  6603  	// match: (SETBE (InvertFlags x))
  6604  	// result: (SETAE x)
  6605  	for {
  6606  		if v_0.Op != Op386InvertFlags {
  6607  			break
  6608  		}
  6609  		x := v_0.Args[0]
  6610  		v.reset(Op386SETAE)
  6611  		v.AddArg(x)
  6612  		return true
  6613  	}
  6614  	// match: (SETBE (FlagEQ))
  6615  	// result: (MOVLconst [1])
  6616  	for {
  6617  		if v_0.Op != Op386FlagEQ {
  6618  			break
  6619  		}
  6620  		v.reset(Op386MOVLconst)
  6621  		v.AuxInt = int32ToAuxInt(1)
  6622  		return true
  6623  	}
  6624  	// match: (SETBE (FlagLT_ULT))
  6625  	// result: (MOVLconst [1])
  6626  	for {
  6627  		if v_0.Op != Op386FlagLT_ULT {
  6628  			break
  6629  		}
  6630  		v.reset(Op386MOVLconst)
  6631  		v.AuxInt = int32ToAuxInt(1)
  6632  		return true
  6633  	}
  6634  	// match: (SETBE (FlagLT_UGT))
  6635  	// result: (MOVLconst [0])
  6636  	for {
  6637  		if v_0.Op != Op386FlagLT_UGT {
  6638  			break
  6639  		}
  6640  		v.reset(Op386MOVLconst)
  6641  		v.AuxInt = int32ToAuxInt(0)
  6642  		return true
  6643  	}
  6644  	// match: (SETBE (FlagGT_ULT))
  6645  	// result: (MOVLconst [1])
  6646  	for {
  6647  		if v_0.Op != Op386FlagGT_ULT {
  6648  			break
  6649  		}
  6650  		v.reset(Op386MOVLconst)
  6651  		v.AuxInt = int32ToAuxInt(1)
  6652  		return true
  6653  	}
  6654  	// match: (SETBE (FlagGT_UGT))
  6655  	// result: (MOVLconst [0])
  6656  	for {
  6657  		if v_0.Op != Op386FlagGT_UGT {
  6658  			break
  6659  		}
  6660  		v.reset(Op386MOVLconst)
  6661  		v.AuxInt = int32ToAuxInt(0)
  6662  		return true
  6663  	}
  6664  	return false
  6665  }
  6666  func rewriteValue386_Op386SETEQ(v *Value) bool {
  6667  	v_0 := v.Args[0]
  6668  	// match: (SETEQ (InvertFlags x))
  6669  	// result: (SETEQ x)
  6670  	for {
  6671  		if v_0.Op != Op386InvertFlags {
  6672  			break
  6673  		}
  6674  		x := v_0.Args[0]
  6675  		v.reset(Op386SETEQ)
  6676  		v.AddArg(x)
  6677  		return true
  6678  	}
  6679  	// match: (SETEQ (FlagEQ))
  6680  	// result: (MOVLconst [1])
  6681  	for {
  6682  		if v_0.Op != Op386FlagEQ {
  6683  			break
  6684  		}
  6685  		v.reset(Op386MOVLconst)
  6686  		v.AuxInt = int32ToAuxInt(1)
  6687  		return true
  6688  	}
  6689  	// match: (SETEQ (FlagLT_ULT))
  6690  	// result: (MOVLconst [0])
  6691  	for {
  6692  		if v_0.Op != Op386FlagLT_ULT {
  6693  			break
  6694  		}
  6695  		v.reset(Op386MOVLconst)
  6696  		v.AuxInt = int32ToAuxInt(0)
  6697  		return true
  6698  	}
  6699  	// match: (SETEQ (FlagLT_UGT))
  6700  	// result: (MOVLconst [0])
  6701  	for {
  6702  		if v_0.Op != Op386FlagLT_UGT {
  6703  			break
  6704  		}
  6705  		v.reset(Op386MOVLconst)
  6706  		v.AuxInt = int32ToAuxInt(0)
  6707  		return true
  6708  	}
  6709  	// match: (SETEQ (FlagGT_ULT))
  6710  	// result: (MOVLconst [0])
  6711  	for {
  6712  		if v_0.Op != Op386FlagGT_ULT {
  6713  			break
  6714  		}
  6715  		v.reset(Op386MOVLconst)
  6716  		v.AuxInt = int32ToAuxInt(0)
  6717  		return true
  6718  	}
  6719  	// match: (SETEQ (FlagGT_UGT))
  6720  	// result: (MOVLconst [0])
  6721  	for {
  6722  		if v_0.Op != Op386FlagGT_UGT {
  6723  			break
  6724  		}
  6725  		v.reset(Op386MOVLconst)
  6726  		v.AuxInt = int32ToAuxInt(0)
  6727  		return true
  6728  	}
  6729  	return false
  6730  }
  6731  func rewriteValue386_Op386SETG(v *Value) bool {
  6732  	v_0 := v.Args[0]
  6733  	// match: (SETG (InvertFlags x))
  6734  	// result: (SETL x)
  6735  	for {
  6736  		if v_0.Op != Op386InvertFlags {
  6737  			break
  6738  		}
  6739  		x := v_0.Args[0]
  6740  		v.reset(Op386SETL)
  6741  		v.AddArg(x)
  6742  		return true
  6743  	}
  6744  	// match: (SETG (FlagEQ))
  6745  	// result: (MOVLconst [0])
  6746  	for {
  6747  		if v_0.Op != Op386FlagEQ {
  6748  			break
  6749  		}
  6750  		v.reset(Op386MOVLconst)
  6751  		v.AuxInt = int32ToAuxInt(0)
  6752  		return true
  6753  	}
  6754  	// match: (SETG (FlagLT_ULT))
  6755  	// result: (MOVLconst [0])
  6756  	for {
  6757  		if v_0.Op != Op386FlagLT_ULT {
  6758  			break
  6759  		}
  6760  		v.reset(Op386MOVLconst)
  6761  		v.AuxInt = int32ToAuxInt(0)
  6762  		return true
  6763  	}
  6764  	// match: (SETG (FlagLT_UGT))
  6765  	// result: (MOVLconst [0])
  6766  	for {
  6767  		if v_0.Op != Op386FlagLT_UGT {
  6768  			break
  6769  		}
  6770  		v.reset(Op386MOVLconst)
  6771  		v.AuxInt = int32ToAuxInt(0)
  6772  		return true
  6773  	}
  6774  	// match: (SETG (FlagGT_ULT))
  6775  	// result: (MOVLconst [1])
  6776  	for {
  6777  		if v_0.Op != Op386FlagGT_ULT {
  6778  			break
  6779  		}
  6780  		v.reset(Op386MOVLconst)
  6781  		v.AuxInt = int32ToAuxInt(1)
  6782  		return true
  6783  	}
  6784  	// match: (SETG (FlagGT_UGT))
  6785  	// result: (MOVLconst [1])
  6786  	for {
  6787  		if v_0.Op != Op386FlagGT_UGT {
  6788  			break
  6789  		}
  6790  		v.reset(Op386MOVLconst)
  6791  		v.AuxInt = int32ToAuxInt(1)
  6792  		return true
  6793  	}
  6794  	return false
  6795  }
  6796  func rewriteValue386_Op386SETGE(v *Value) bool {
  6797  	v_0 := v.Args[0]
  6798  	// match: (SETGE (InvertFlags x))
  6799  	// result: (SETLE x)
  6800  	for {
  6801  		if v_0.Op != Op386InvertFlags {
  6802  			break
  6803  		}
  6804  		x := v_0.Args[0]
  6805  		v.reset(Op386SETLE)
  6806  		v.AddArg(x)
  6807  		return true
  6808  	}
  6809  	// match: (SETGE (FlagEQ))
  6810  	// result: (MOVLconst [1])
  6811  	for {
  6812  		if v_0.Op != Op386FlagEQ {
  6813  			break
  6814  		}
  6815  		v.reset(Op386MOVLconst)
  6816  		v.AuxInt = int32ToAuxInt(1)
  6817  		return true
  6818  	}
  6819  	// match: (SETGE (FlagLT_ULT))
  6820  	// result: (MOVLconst [0])
  6821  	for {
  6822  		if v_0.Op != Op386FlagLT_ULT {
  6823  			break
  6824  		}
  6825  		v.reset(Op386MOVLconst)
  6826  		v.AuxInt = int32ToAuxInt(0)
  6827  		return true
  6828  	}
  6829  	// match: (SETGE (FlagLT_UGT))
  6830  	// result: (MOVLconst [0])
  6831  	for {
  6832  		if v_0.Op != Op386FlagLT_UGT {
  6833  			break
  6834  		}
  6835  		v.reset(Op386MOVLconst)
  6836  		v.AuxInt = int32ToAuxInt(0)
  6837  		return true
  6838  	}
  6839  	// match: (SETGE (FlagGT_ULT))
  6840  	// result: (MOVLconst [1])
  6841  	for {
  6842  		if v_0.Op != Op386FlagGT_ULT {
  6843  			break
  6844  		}
  6845  		v.reset(Op386MOVLconst)
  6846  		v.AuxInt = int32ToAuxInt(1)
  6847  		return true
  6848  	}
  6849  	// match: (SETGE (FlagGT_UGT))
  6850  	// result: (MOVLconst [1])
  6851  	for {
  6852  		if v_0.Op != Op386FlagGT_UGT {
  6853  			break
  6854  		}
  6855  		v.reset(Op386MOVLconst)
  6856  		v.AuxInt = int32ToAuxInt(1)
  6857  		return true
  6858  	}
  6859  	return false
  6860  }
  6861  func rewriteValue386_Op386SETL(v *Value) bool {
  6862  	v_0 := v.Args[0]
  6863  	// match: (SETL (InvertFlags x))
  6864  	// result: (SETG x)
  6865  	for {
  6866  		if v_0.Op != Op386InvertFlags {
  6867  			break
  6868  		}
  6869  		x := v_0.Args[0]
  6870  		v.reset(Op386SETG)
  6871  		v.AddArg(x)
  6872  		return true
  6873  	}
  6874  	// match: (SETL (FlagEQ))
  6875  	// result: (MOVLconst [0])
  6876  	for {
  6877  		if v_0.Op != Op386FlagEQ {
  6878  			break
  6879  		}
  6880  		v.reset(Op386MOVLconst)
  6881  		v.AuxInt = int32ToAuxInt(0)
  6882  		return true
  6883  	}
  6884  	// match: (SETL (FlagLT_ULT))
  6885  	// result: (MOVLconst [1])
  6886  	for {
  6887  		if v_0.Op != Op386FlagLT_ULT {
  6888  			break
  6889  		}
  6890  		v.reset(Op386MOVLconst)
  6891  		v.AuxInt = int32ToAuxInt(1)
  6892  		return true
  6893  	}
  6894  	// match: (SETL (FlagLT_UGT))
  6895  	// result: (MOVLconst [1])
  6896  	for {
  6897  		if v_0.Op != Op386FlagLT_UGT {
  6898  			break
  6899  		}
  6900  		v.reset(Op386MOVLconst)
  6901  		v.AuxInt = int32ToAuxInt(1)
  6902  		return true
  6903  	}
  6904  	// match: (SETL (FlagGT_ULT))
  6905  	// result: (MOVLconst [0])
  6906  	for {
  6907  		if v_0.Op != Op386FlagGT_ULT {
  6908  			break
  6909  		}
  6910  		v.reset(Op386MOVLconst)
  6911  		v.AuxInt = int32ToAuxInt(0)
  6912  		return true
  6913  	}
  6914  	// match: (SETL (FlagGT_UGT))
  6915  	// result: (MOVLconst [0])
  6916  	for {
  6917  		if v_0.Op != Op386FlagGT_UGT {
  6918  			break
  6919  		}
  6920  		v.reset(Op386MOVLconst)
  6921  		v.AuxInt = int32ToAuxInt(0)
  6922  		return true
  6923  	}
  6924  	return false
  6925  }
  6926  func rewriteValue386_Op386SETLE(v *Value) bool {
  6927  	v_0 := v.Args[0]
  6928  	// match: (SETLE (InvertFlags x))
  6929  	// result: (SETGE x)
  6930  	for {
  6931  		if v_0.Op != Op386InvertFlags {
  6932  			break
  6933  		}
  6934  		x := v_0.Args[0]
  6935  		v.reset(Op386SETGE)
  6936  		v.AddArg(x)
  6937  		return true
  6938  	}
  6939  	// match: (SETLE (FlagEQ))
  6940  	// result: (MOVLconst [1])
  6941  	for {
  6942  		if v_0.Op != Op386FlagEQ {
  6943  			break
  6944  		}
  6945  		v.reset(Op386MOVLconst)
  6946  		v.AuxInt = int32ToAuxInt(1)
  6947  		return true
  6948  	}
  6949  	// match: (SETLE (FlagLT_ULT))
  6950  	// result: (MOVLconst [1])
  6951  	for {
  6952  		if v_0.Op != Op386FlagLT_ULT {
  6953  			break
  6954  		}
  6955  		v.reset(Op386MOVLconst)
  6956  		v.AuxInt = int32ToAuxInt(1)
  6957  		return true
  6958  	}
  6959  	// match: (SETLE (FlagLT_UGT))
  6960  	// result: (MOVLconst [1])
  6961  	for {
  6962  		if v_0.Op != Op386FlagLT_UGT {
  6963  			break
  6964  		}
  6965  		v.reset(Op386MOVLconst)
  6966  		v.AuxInt = int32ToAuxInt(1)
  6967  		return true
  6968  	}
  6969  	// match: (SETLE (FlagGT_ULT))
  6970  	// result: (MOVLconst [0])
  6971  	for {
  6972  		if v_0.Op != Op386FlagGT_ULT {
  6973  			break
  6974  		}
  6975  		v.reset(Op386MOVLconst)
  6976  		v.AuxInt = int32ToAuxInt(0)
  6977  		return true
  6978  	}
  6979  	// match: (SETLE (FlagGT_UGT))
  6980  	// result: (MOVLconst [0])
  6981  	for {
  6982  		if v_0.Op != Op386FlagGT_UGT {
  6983  			break
  6984  		}
  6985  		v.reset(Op386MOVLconst)
  6986  		v.AuxInt = int32ToAuxInt(0)
  6987  		return true
  6988  	}
  6989  	return false
  6990  }
  6991  func rewriteValue386_Op386SETNE(v *Value) bool {
  6992  	v_0 := v.Args[0]
  6993  	// match: (SETNE (InvertFlags x))
  6994  	// result: (SETNE x)
  6995  	for {
  6996  		if v_0.Op != Op386InvertFlags {
  6997  			break
  6998  		}
  6999  		x := v_0.Args[0]
  7000  		v.reset(Op386SETNE)
  7001  		v.AddArg(x)
  7002  		return true
  7003  	}
  7004  	// match: (SETNE (FlagEQ))
  7005  	// result: (MOVLconst [0])
  7006  	for {
  7007  		if v_0.Op != Op386FlagEQ {
  7008  			break
  7009  		}
  7010  		v.reset(Op386MOVLconst)
  7011  		v.AuxInt = int32ToAuxInt(0)
  7012  		return true
  7013  	}
  7014  	// match: (SETNE (FlagLT_ULT))
  7015  	// result: (MOVLconst [1])
  7016  	for {
  7017  		if v_0.Op != Op386FlagLT_ULT {
  7018  			break
  7019  		}
  7020  		v.reset(Op386MOVLconst)
  7021  		v.AuxInt = int32ToAuxInt(1)
  7022  		return true
  7023  	}
  7024  	// match: (SETNE (FlagLT_UGT))
  7025  	// result: (MOVLconst [1])
  7026  	for {
  7027  		if v_0.Op != Op386FlagLT_UGT {
  7028  			break
  7029  		}
  7030  		v.reset(Op386MOVLconst)
  7031  		v.AuxInt = int32ToAuxInt(1)
  7032  		return true
  7033  	}
  7034  	// match: (SETNE (FlagGT_ULT))
  7035  	// result: (MOVLconst [1])
  7036  	for {
  7037  		if v_0.Op != Op386FlagGT_ULT {
  7038  			break
  7039  		}
  7040  		v.reset(Op386MOVLconst)
  7041  		v.AuxInt = int32ToAuxInt(1)
  7042  		return true
  7043  	}
  7044  	// match: (SETNE (FlagGT_UGT))
  7045  	// result: (MOVLconst [1])
  7046  	for {
  7047  		if v_0.Op != Op386FlagGT_UGT {
  7048  			break
  7049  		}
  7050  		v.reset(Op386MOVLconst)
  7051  		v.AuxInt = int32ToAuxInt(1)
  7052  		return true
  7053  	}
  7054  	return false
  7055  }
  7056  func rewriteValue386_Op386SHLL(v *Value) bool {
  7057  	v_1 := v.Args[1]
  7058  	v_0 := v.Args[0]
  7059  	// match: (SHLL x (MOVLconst [c]))
  7060  	// result: (SHLLconst [c&31] x)
  7061  	for {
  7062  		x := v_0
  7063  		if v_1.Op != Op386MOVLconst {
  7064  			break
  7065  		}
  7066  		c := auxIntToInt32(v_1.AuxInt)
  7067  		v.reset(Op386SHLLconst)
  7068  		v.AuxInt = int32ToAuxInt(c & 31)
  7069  		v.AddArg(x)
  7070  		return true
  7071  	}
  7072  	// match: (SHLL x (ANDLconst [31] y))
  7073  	// result: (SHLL x y)
  7074  	for {
  7075  		x := v_0
  7076  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  7077  			break
  7078  		}
  7079  		y := v_1.Args[0]
  7080  		v.reset(Op386SHLL)
  7081  		v.AddArg2(x, y)
  7082  		return true
  7083  	}
  7084  	return false
  7085  }
  7086  func rewriteValue386_Op386SHLLconst(v *Value) bool {
  7087  	v_0 := v.Args[0]
  7088  	// match: (SHLLconst x [0])
  7089  	// result: x
  7090  	for {
  7091  		if auxIntToInt32(v.AuxInt) != 0 {
  7092  			break
  7093  		}
  7094  		x := v_0
  7095  		v.copyOf(x)
  7096  		return true
  7097  	}
  7098  	return false
  7099  }
  7100  func rewriteValue386_Op386SHRB(v *Value) bool {
  7101  	v_1 := v.Args[1]
  7102  	v_0 := v.Args[0]
  7103  	// match: (SHRB x (MOVLconst [c]))
  7104  	// cond: c&31 < 8
  7105  	// result: (SHRBconst [int8(c&31)] x)
  7106  	for {
  7107  		x := v_0
  7108  		if v_1.Op != Op386MOVLconst {
  7109  			break
  7110  		}
  7111  		c := auxIntToInt32(v_1.AuxInt)
  7112  		if !(c&31 < 8) {
  7113  			break
  7114  		}
  7115  		v.reset(Op386SHRBconst)
  7116  		v.AuxInt = int8ToAuxInt(int8(c & 31))
  7117  		v.AddArg(x)
  7118  		return true
  7119  	}
  7120  	// match: (SHRB _ (MOVLconst [c]))
  7121  	// cond: c&31 >= 8
  7122  	// result: (MOVLconst [0])
  7123  	for {
  7124  		if v_1.Op != Op386MOVLconst {
  7125  			break
  7126  		}
  7127  		c := auxIntToInt32(v_1.AuxInt)
  7128  		if !(c&31 >= 8) {
  7129  			break
  7130  		}
  7131  		v.reset(Op386MOVLconst)
  7132  		v.AuxInt = int32ToAuxInt(0)
  7133  		return true
  7134  	}
  7135  	return false
  7136  }
  7137  func rewriteValue386_Op386SHRBconst(v *Value) bool {
  7138  	v_0 := v.Args[0]
  7139  	// match: (SHRBconst x [0])
  7140  	// result: x
  7141  	for {
  7142  		if auxIntToInt8(v.AuxInt) != 0 {
  7143  			break
  7144  		}
  7145  		x := v_0
  7146  		v.copyOf(x)
  7147  		return true
  7148  	}
  7149  	return false
  7150  }
  7151  func rewriteValue386_Op386SHRL(v *Value) bool {
  7152  	v_1 := v.Args[1]
  7153  	v_0 := v.Args[0]
  7154  	// match: (SHRL x (MOVLconst [c]))
  7155  	// result: (SHRLconst [c&31] x)
  7156  	for {
  7157  		x := v_0
  7158  		if v_1.Op != Op386MOVLconst {
  7159  			break
  7160  		}
  7161  		c := auxIntToInt32(v_1.AuxInt)
  7162  		v.reset(Op386SHRLconst)
  7163  		v.AuxInt = int32ToAuxInt(c & 31)
  7164  		v.AddArg(x)
  7165  		return true
  7166  	}
  7167  	// match: (SHRL x (ANDLconst [31] y))
  7168  	// result: (SHRL x y)
  7169  	for {
  7170  		x := v_0
  7171  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  7172  			break
  7173  		}
  7174  		y := v_1.Args[0]
  7175  		v.reset(Op386SHRL)
  7176  		v.AddArg2(x, y)
  7177  		return true
  7178  	}
  7179  	return false
  7180  }
  7181  func rewriteValue386_Op386SHRLconst(v *Value) bool {
  7182  	v_0 := v.Args[0]
  7183  	// match: (SHRLconst x [0])
  7184  	// result: x
  7185  	for {
  7186  		if auxIntToInt32(v.AuxInt) != 0 {
  7187  			break
  7188  		}
  7189  		x := v_0
  7190  		v.copyOf(x)
  7191  		return true
  7192  	}
  7193  	return false
  7194  }
  7195  func rewriteValue386_Op386SHRW(v *Value) bool {
  7196  	v_1 := v.Args[1]
  7197  	v_0 := v.Args[0]
  7198  	// match: (SHRW x (MOVLconst [c]))
  7199  	// cond: c&31 < 16
  7200  	// result: (SHRWconst [int16(c&31)] x)
  7201  	for {
  7202  		x := v_0
  7203  		if v_1.Op != Op386MOVLconst {
  7204  			break
  7205  		}
  7206  		c := auxIntToInt32(v_1.AuxInt)
  7207  		if !(c&31 < 16) {
  7208  			break
  7209  		}
  7210  		v.reset(Op386SHRWconst)
  7211  		v.AuxInt = int16ToAuxInt(int16(c & 31))
  7212  		v.AddArg(x)
  7213  		return true
  7214  	}
  7215  	// match: (SHRW _ (MOVLconst [c]))
  7216  	// cond: c&31 >= 16
  7217  	// result: (MOVLconst [0])
  7218  	for {
  7219  		if v_1.Op != Op386MOVLconst {
  7220  			break
  7221  		}
  7222  		c := auxIntToInt32(v_1.AuxInt)
  7223  		if !(c&31 >= 16) {
  7224  			break
  7225  		}
  7226  		v.reset(Op386MOVLconst)
  7227  		v.AuxInt = int32ToAuxInt(0)
  7228  		return true
  7229  	}
  7230  	return false
  7231  }
  7232  func rewriteValue386_Op386SHRWconst(v *Value) bool {
  7233  	v_0 := v.Args[0]
  7234  	// match: (SHRWconst x [0])
  7235  	// result: x
  7236  	for {
  7237  		if auxIntToInt16(v.AuxInt) != 0 {
  7238  			break
  7239  		}
  7240  		x := v_0
  7241  		v.copyOf(x)
  7242  		return true
  7243  	}
  7244  	return false
  7245  }
  7246  func rewriteValue386_Op386SUBL(v *Value) bool {
  7247  	v_1 := v.Args[1]
  7248  	v_0 := v.Args[0]
  7249  	b := v.Block
  7250  	// match: (SUBL x (MOVLconst [c]))
  7251  	// result: (SUBLconst x [c])
  7252  	for {
  7253  		x := v_0
  7254  		if v_1.Op != Op386MOVLconst {
  7255  			break
  7256  		}
  7257  		c := auxIntToInt32(v_1.AuxInt)
  7258  		v.reset(Op386SUBLconst)
  7259  		v.AuxInt = int32ToAuxInt(c)
  7260  		v.AddArg(x)
  7261  		return true
  7262  	}
  7263  	// match: (SUBL (MOVLconst [c]) x)
  7264  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  7265  	for {
  7266  		if v_0.Op != Op386MOVLconst {
  7267  			break
  7268  		}
  7269  		c := auxIntToInt32(v_0.AuxInt)
  7270  		x := v_1
  7271  		v.reset(Op386NEGL)
  7272  		v0 := b.NewValue0(v.Pos, Op386SUBLconst, v.Type)
  7273  		v0.AuxInt = int32ToAuxInt(c)
  7274  		v0.AddArg(x)
  7275  		v.AddArg(v0)
  7276  		return true
  7277  	}
  7278  	// match: (SUBL x l:(MOVLload [off] {sym} ptr mem))
  7279  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  7280  	// result: (SUBLload x [off] {sym} ptr mem)
  7281  	for {
  7282  		x := v_0
  7283  		l := v_1
  7284  		if l.Op != Op386MOVLload {
  7285  			break
  7286  		}
  7287  		off := auxIntToInt32(l.AuxInt)
  7288  		sym := auxToSym(l.Aux)
  7289  		mem := l.Args[1]
  7290  		ptr := l.Args[0]
  7291  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  7292  			break
  7293  		}
  7294  		v.reset(Op386SUBLload)
  7295  		v.AuxInt = int32ToAuxInt(off)
  7296  		v.Aux = symToAux(sym)
  7297  		v.AddArg3(x, ptr, mem)
  7298  		return true
  7299  	}
  7300  	// match: (SUBL x x)
  7301  	// result: (MOVLconst [0])
  7302  	for {
  7303  		x := v_0
  7304  		if x != v_1 {
  7305  			break
  7306  		}
  7307  		v.reset(Op386MOVLconst)
  7308  		v.AuxInt = int32ToAuxInt(0)
  7309  		return true
  7310  	}
  7311  	return false
  7312  }
  7313  func rewriteValue386_Op386SUBLcarry(v *Value) bool {
  7314  	v_1 := v.Args[1]
  7315  	v_0 := v.Args[0]
  7316  	// match: (SUBLcarry x (MOVLconst [c]))
  7317  	// result: (SUBLconstcarry [c] x)
  7318  	for {
  7319  		x := v_0
  7320  		if v_1.Op != Op386MOVLconst {
  7321  			break
  7322  		}
  7323  		c := auxIntToInt32(v_1.AuxInt)
  7324  		v.reset(Op386SUBLconstcarry)
  7325  		v.AuxInt = int32ToAuxInt(c)
  7326  		v.AddArg(x)
  7327  		return true
  7328  	}
  7329  	return false
  7330  }
  7331  func rewriteValue386_Op386SUBLconst(v *Value) bool {
  7332  	v_0 := v.Args[0]
  7333  	// match: (SUBLconst [c] x)
  7334  	// cond: c==0
  7335  	// result: x
  7336  	for {
  7337  		c := auxIntToInt32(v.AuxInt)
  7338  		x := v_0
  7339  		if !(c == 0) {
  7340  			break
  7341  		}
  7342  		v.copyOf(x)
  7343  		return true
  7344  	}
  7345  	// match: (SUBLconst [c] x)
  7346  	// result: (ADDLconst [-c] x)
  7347  	for {
  7348  		c := auxIntToInt32(v.AuxInt)
  7349  		x := v_0
  7350  		v.reset(Op386ADDLconst)
  7351  		v.AuxInt = int32ToAuxInt(-c)
  7352  		v.AddArg(x)
  7353  		return true
  7354  	}
  7355  }
  7356  func rewriteValue386_Op386SUBLload(v *Value) bool {
  7357  	v_2 := v.Args[2]
  7358  	v_1 := v.Args[1]
  7359  	v_0 := v.Args[0]
  7360  	b := v.Block
  7361  	config := b.Func.Config
  7362  	// match: (SUBLload [off1] {sym} val (ADDLconst [off2] base) mem)
  7363  	// cond: is32Bit(int64(off1)+int64(off2))
  7364  	// result: (SUBLload [off1+off2] {sym} val base mem)
  7365  	for {
  7366  		off1 := auxIntToInt32(v.AuxInt)
  7367  		sym := auxToSym(v.Aux)
  7368  		val := v_0
  7369  		if v_1.Op != Op386ADDLconst {
  7370  			break
  7371  		}
  7372  		off2 := auxIntToInt32(v_1.AuxInt)
  7373  		base := v_1.Args[0]
  7374  		mem := v_2
  7375  		if !(is32Bit(int64(off1) + int64(off2))) {
  7376  			break
  7377  		}
  7378  		v.reset(Op386SUBLload)
  7379  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7380  		v.Aux = symToAux(sym)
  7381  		v.AddArg3(val, base, mem)
  7382  		return true
  7383  	}
  7384  	// match: (SUBLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7385  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7386  	// result: (SUBLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  7387  	for {
  7388  		off1 := auxIntToInt32(v.AuxInt)
  7389  		sym1 := auxToSym(v.Aux)
  7390  		val := v_0
  7391  		if v_1.Op != Op386LEAL {
  7392  			break
  7393  		}
  7394  		off2 := auxIntToInt32(v_1.AuxInt)
  7395  		sym2 := auxToSym(v_1.Aux)
  7396  		base := v_1.Args[0]
  7397  		mem := v_2
  7398  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7399  			break
  7400  		}
  7401  		v.reset(Op386SUBLload)
  7402  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7403  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7404  		v.AddArg3(val, base, mem)
  7405  		return true
  7406  	}
  7407  	return false
  7408  }
  7409  func rewriteValue386_Op386SUBLmodify(v *Value) bool {
  7410  	v_2 := v.Args[2]
  7411  	v_1 := v.Args[1]
  7412  	v_0 := v.Args[0]
  7413  	b := v.Block
  7414  	config := b.Func.Config
  7415  	// match: (SUBLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  7416  	// cond: is32Bit(int64(off1)+int64(off2))
  7417  	// result: (SUBLmodify [off1+off2] {sym} base val mem)
  7418  	for {
  7419  		off1 := auxIntToInt32(v.AuxInt)
  7420  		sym := auxToSym(v.Aux)
  7421  		if v_0.Op != Op386ADDLconst {
  7422  			break
  7423  		}
  7424  		off2 := auxIntToInt32(v_0.AuxInt)
  7425  		base := v_0.Args[0]
  7426  		val := v_1
  7427  		mem := v_2
  7428  		if !(is32Bit(int64(off1) + int64(off2))) {
  7429  			break
  7430  		}
  7431  		v.reset(Op386SUBLmodify)
  7432  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7433  		v.Aux = symToAux(sym)
  7434  		v.AddArg3(base, val, mem)
  7435  		return true
  7436  	}
  7437  	// match: (SUBLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  7438  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7439  	// result: (SUBLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7440  	for {
  7441  		off1 := auxIntToInt32(v.AuxInt)
  7442  		sym1 := auxToSym(v.Aux)
  7443  		if v_0.Op != Op386LEAL {
  7444  			break
  7445  		}
  7446  		off2 := auxIntToInt32(v_0.AuxInt)
  7447  		sym2 := auxToSym(v_0.Aux)
  7448  		base := v_0.Args[0]
  7449  		val := v_1
  7450  		mem := v_2
  7451  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7452  			break
  7453  		}
  7454  		v.reset(Op386SUBLmodify)
  7455  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7456  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7457  		v.AddArg3(base, val, mem)
  7458  		return true
  7459  	}
  7460  	return false
  7461  }
  7462  func rewriteValue386_Op386SUBSD(v *Value) bool {
  7463  	v_1 := v.Args[1]
  7464  	v_0 := v.Args[0]
  7465  	// match: (SUBSD x l:(MOVSDload [off] {sym} ptr mem))
  7466  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  7467  	// result: (SUBSDload x [off] {sym} ptr mem)
  7468  	for {
  7469  		x := v_0
  7470  		l := v_1
  7471  		if l.Op != Op386MOVSDload {
  7472  			break
  7473  		}
  7474  		off := auxIntToInt32(l.AuxInt)
  7475  		sym := auxToSym(l.Aux)
  7476  		mem := l.Args[1]
  7477  		ptr := l.Args[0]
  7478  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  7479  			break
  7480  		}
  7481  		v.reset(Op386SUBSDload)
  7482  		v.AuxInt = int32ToAuxInt(off)
  7483  		v.Aux = symToAux(sym)
  7484  		v.AddArg3(x, ptr, mem)
  7485  		return true
  7486  	}
  7487  	return false
  7488  }
  7489  func rewriteValue386_Op386SUBSDload(v *Value) bool {
  7490  	v_2 := v.Args[2]
  7491  	v_1 := v.Args[1]
  7492  	v_0 := v.Args[0]
  7493  	b := v.Block
  7494  	config := b.Func.Config
  7495  	// match: (SUBSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  7496  	// cond: is32Bit(int64(off1)+int64(off2))
  7497  	// result: (SUBSDload [off1+off2] {sym} val base mem)
  7498  	for {
  7499  		off1 := auxIntToInt32(v.AuxInt)
  7500  		sym := auxToSym(v.Aux)
  7501  		val := v_0
  7502  		if v_1.Op != Op386ADDLconst {
  7503  			break
  7504  		}
  7505  		off2 := auxIntToInt32(v_1.AuxInt)
  7506  		base := v_1.Args[0]
  7507  		mem := v_2
  7508  		if !(is32Bit(int64(off1) + int64(off2))) {
  7509  			break
  7510  		}
  7511  		v.reset(Op386SUBSDload)
  7512  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7513  		v.Aux = symToAux(sym)
  7514  		v.AddArg3(val, base, mem)
  7515  		return true
  7516  	}
  7517  	// match: (SUBSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7518  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7519  	// result: (SUBSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  7520  	for {
  7521  		off1 := auxIntToInt32(v.AuxInt)
  7522  		sym1 := auxToSym(v.Aux)
  7523  		val := v_0
  7524  		if v_1.Op != Op386LEAL {
  7525  			break
  7526  		}
  7527  		off2 := auxIntToInt32(v_1.AuxInt)
  7528  		sym2 := auxToSym(v_1.Aux)
  7529  		base := v_1.Args[0]
  7530  		mem := v_2
  7531  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7532  			break
  7533  		}
  7534  		v.reset(Op386SUBSDload)
  7535  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7536  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7537  		v.AddArg3(val, base, mem)
  7538  		return true
  7539  	}
  7540  	return false
  7541  }
  7542  func rewriteValue386_Op386SUBSS(v *Value) bool {
  7543  	v_1 := v.Args[1]
  7544  	v_0 := v.Args[0]
  7545  	// match: (SUBSS x l:(MOVSSload [off] {sym} ptr mem))
  7546  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  7547  	// result: (SUBSSload x [off] {sym} ptr mem)
  7548  	for {
  7549  		x := v_0
  7550  		l := v_1
  7551  		if l.Op != Op386MOVSSload {
  7552  			break
  7553  		}
  7554  		off := auxIntToInt32(l.AuxInt)
  7555  		sym := auxToSym(l.Aux)
  7556  		mem := l.Args[1]
  7557  		ptr := l.Args[0]
  7558  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  7559  			break
  7560  		}
  7561  		v.reset(Op386SUBSSload)
  7562  		v.AuxInt = int32ToAuxInt(off)
  7563  		v.Aux = symToAux(sym)
  7564  		v.AddArg3(x, ptr, mem)
  7565  		return true
  7566  	}
  7567  	return false
  7568  }
  7569  func rewriteValue386_Op386SUBSSload(v *Value) bool {
  7570  	v_2 := v.Args[2]
  7571  	v_1 := v.Args[1]
  7572  	v_0 := v.Args[0]
  7573  	b := v.Block
  7574  	config := b.Func.Config
  7575  	// match: (SUBSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  7576  	// cond: is32Bit(int64(off1)+int64(off2))
  7577  	// result: (SUBSSload [off1+off2] {sym} val base mem)
  7578  	for {
  7579  		off1 := auxIntToInt32(v.AuxInt)
  7580  		sym := auxToSym(v.Aux)
  7581  		val := v_0
  7582  		if v_1.Op != Op386ADDLconst {
  7583  			break
  7584  		}
  7585  		off2 := auxIntToInt32(v_1.AuxInt)
  7586  		base := v_1.Args[0]
  7587  		mem := v_2
  7588  		if !(is32Bit(int64(off1) + int64(off2))) {
  7589  			break
  7590  		}
  7591  		v.reset(Op386SUBSSload)
  7592  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7593  		v.Aux = symToAux(sym)
  7594  		v.AddArg3(val, base, mem)
  7595  		return true
  7596  	}
  7597  	// match: (SUBSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7598  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7599  	// result: (SUBSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  7600  	for {
  7601  		off1 := auxIntToInt32(v.AuxInt)
  7602  		sym1 := auxToSym(v.Aux)
  7603  		val := v_0
  7604  		if v_1.Op != Op386LEAL {
  7605  			break
  7606  		}
  7607  		off2 := auxIntToInt32(v_1.AuxInt)
  7608  		sym2 := auxToSym(v_1.Aux)
  7609  		base := v_1.Args[0]
  7610  		mem := v_2
  7611  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7612  			break
  7613  		}
  7614  		v.reset(Op386SUBSSload)
  7615  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7616  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7617  		v.AddArg3(val, base, mem)
  7618  		return true
  7619  	}
  7620  	return false
  7621  }
  7622  func rewriteValue386_Op386XORL(v *Value) bool {
  7623  	v_1 := v.Args[1]
  7624  	v_0 := v.Args[0]
  7625  	// match: (XORL x (MOVLconst [c]))
  7626  	// result: (XORLconst [c] x)
  7627  	for {
  7628  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7629  			x := v_0
  7630  			if v_1.Op != Op386MOVLconst {
  7631  				continue
  7632  			}
  7633  			c := auxIntToInt32(v_1.AuxInt)
  7634  			v.reset(Op386XORLconst)
  7635  			v.AuxInt = int32ToAuxInt(c)
  7636  			v.AddArg(x)
  7637  			return true
  7638  		}
  7639  		break
  7640  	}
  7641  	// match: (XORL x l:(MOVLload [off] {sym} ptr mem))
  7642  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  7643  	// result: (XORLload x [off] {sym} ptr mem)
  7644  	for {
  7645  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7646  			x := v_0
  7647  			l := v_1
  7648  			if l.Op != Op386MOVLload {
  7649  				continue
  7650  			}
  7651  			off := auxIntToInt32(l.AuxInt)
  7652  			sym := auxToSym(l.Aux)
  7653  			mem := l.Args[1]
  7654  			ptr := l.Args[0]
  7655  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  7656  				continue
  7657  			}
  7658  			v.reset(Op386XORLload)
  7659  			v.AuxInt = int32ToAuxInt(off)
  7660  			v.Aux = symToAux(sym)
  7661  			v.AddArg3(x, ptr, mem)
  7662  			return true
  7663  		}
  7664  		break
  7665  	}
  7666  	// match: (XORL x x)
  7667  	// result: (MOVLconst [0])
  7668  	for {
  7669  		x := v_0
  7670  		if x != v_1 {
  7671  			break
  7672  		}
  7673  		v.reset(Op386MOVLconst)
  7674  		v.AuxInt = int32ToAuxInt(0)
  7675  		return true
  7676  	}
  7677  	return false
  7678  }
  7679  func rewriteValue386_Op386XORLconst(v *Value) bool {
  7680  	v_0 := v.Args[0]
  7681  	// match: (XORLconst [c] (XORLconst [d] x))
  7682  	// result: (XORLconst [c ^ d] x)
  7683  	for {
  7684  		c := auxIntToInt32(v.AuxInt)
  7685  		if v_0.Op != Op386XORLconst {
  7686  			break
  7687  		}
  7688  		d := auxIntToInt32(v_0.AuxInt)
  7689  		x := v_0.Args[0]
  7690  		v.reset(Op386XORLconst)
  7691  		v.AuxInt = int32ToAuxInt(c ^ d)
  7692  		v.AddArg(x)
  7693  		return true
  7694  	}
  7695  	// match: (XORLconst [c] x)
  7696  	// cond: c==0
  7697  	// result: x
  7698  	for {
  7699  		c := auxIntToInt32(v.AuxInt)
  7700  		x := v_0
  7701  		if !(c == 0) {
  7702  			break
  7703  		}
  7704  		v.copyOf(x)
  7705  		return true
  7706  	}
  7707  	// match: (XORLconst [c] (MOVLconst [d]))
  7708  	// result: (MOVLconst [c^d])
  7709  	for {
  7710  		c := auxIntToInt32(v.AuxInt)
  7711  		if v_0.Op != Op386MOVLconst {
  7712  			break
  7713  		}
  7714  		d := auxIntToInt32(v_0.AuxInt)
  7715  		v.reset(Op386MOVLconst)
  7716  		v.AuxInt = int32ToAuxInt(c ^ d)
  7717  		return true
  7718  	}
  7719  	return false
  7720  }
  7721  func rewriteValue386_Op386XORLconstmodify(v *Value) bool {
  7722  	v_1 := v.Args[1]
  7723  	v_0 := v.Args[0]
  7724  	b := v.Block
  7725  	config := b.Func.Config
  7726  	// match: (XORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  7727  	// cond: valoff1.canAdd32(off2)
  7728  	// result: (XORLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  7729  	for {
  7730  		valoff1 := auxIntToValAndOff(v.AuxInt)
  7731  		sym := auxToSym(v.Aux)
  7732  		if v_0.Op != Op386ADDLconst {
  7733  			break
  7734  		}
  7735  		off2 := auxIntToInt32(v_0.AuxInt)
  7736  		base := v_0.Args[0]
  7737  		mem := v_1
  7738  		if !(valoff1.canAdd32(off2)) {
  7739  			break
  7740  		}
  7741  		v.reset(Op386XORLconstmodify)
  7742  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  7743  		v.Aux = symToAux(sym)
  7744  		v.AddArg2(base, mem)
  7745  		return true
  7746  	}
  7747  	// match: (XORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  7748  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7749  	// result: (XORLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  7750  	for {
  7751  		valoff1 := auxIntToValAndOff(v.AuxInt)
  7752  		sym1 := auxToSym(v.Aux)
  7753  		if v_0.Op != Op386LEAL {
  7754  			break
  7755  		}
  7756  		off2 := auxIntToInt32(v_0.AuxInt)
  7757  		sym2 := auxToSym(v_0.Aux)
  7758  		base := v_0.Args[0]
  7759  		mem := v_1
  7760  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7761  			break
  7762  		}
  7763  		v.reset(Op386XORLconstmodify)
  7764  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  7765  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7766  		v.AddArg2(base, mem)
  7767  		return true
  7768  	}
  7769  	return false
  7770  }
  7771  func rewriteValue386_Op386XORLload(v *Value) bool {
  7772  	v_2 := v.Args[2]
  7773  	v_1 := v.Args[1]
  7774  	v_0 := v.Args[0]
  7775  	b := v.Block
  7776  	config := b.Func.Config
  7777  	// match: (XORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  7778  	// cond: is32Bit(int64(off1)+int64(off2))
  7779  	// result: (XORLload [off1+off2] {sym} val base mem)
  7780  	for {
  7781  		off1 := auxIntToInt32(v.AuxInt)
  7782  		sym := auxToSym(v.Aux)
  7783  		val := v_0
  7784  		if v_1.Op != Op386ADDLconst {
  7785  			break
  7786  		}
  7787  		off2 := auxIntToInt32(v_1.AuxInt)
  7788  		base := v_1.Args[0]
  7789  		mem := v_2
  7790  		if !(is32Bit(int64(off1) + int64(off2))) {
  7791  			break
  7792  		}
  7793  		v.reset(Op386XORLload)
  7794  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7795  		v.Aux = symToAux(sym)
  7796  		v.AddArg3(val, base, mem)
  7797  		return true
  7798  	}
  7799  	// match: (XORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7800  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7801  	// result: (XORLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  7802  	for {
  7803  		off1 := auxIntToInt32(v.AuxInt)
  7804  		sym1 := auxToSym(v.Aux)
  7805  		val := v_0
  7806  		if v_1.Op != Op386LEAL {
  7807  			break
  7808  		}
  7809  		off2 := auxIntToInt32(v_1.AuxInt)
  7810  		sym2 := auxToSym(v_1.Aux)
  7811  		base := v_1.Args[0]
  7812  		mem := v_2
  7813  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7814  			break
  7815  		}
  7816  		v.reset(Op386XORLload)
  7817  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7818  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7819  		v.AddArg3(val, base, mem)
  7820  		return true
  7821  	}
  7822  	return false
  7823  }
  7824  func rewriteValue386_Op386XORLmodify(v *Value) bool {
  7825  	v_2 := v.Args[2]
  7826  	v_1 := v.Args[1]
  7827  	v_0 := v.Args[0]
  7828  	b := v.Block
  7829  	config := b.Func.Config
  7830  	// match: (XORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  7831  	// cond: is32Bit(int64(off1)+int64(off2))
  7832  	// result: (XORLmodify [off1+off2] {sym} base val mem)
  7833  	for {
  7834  		off1 := auxIntToInt32(v.AuxInt)
  7835  		sym := auxToSym(v.Aux)
  7836  		if v_0.Op != Op386ADDLconst {
  7837  			break
  7838  		}
  7839  		off2 := auxIntToInt32(v_0.AuxInt)
  7840  		base := v_0.Args[0]
  7841  		val := v_1
  7842  		mem := v_2
  7843  		if !(is32Bit(int64(off1) + int64(off2))) {
  7844  			break
  7845  		}
  7846  		v.reset(Op386XORLmodify)
  7847  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7848  		v.Aux = symToAux(sym)
  7849  		v.AddArg3(base, val, mem)
  7850  		return true
  7851  	}
  7852  	// match: (XORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  7853  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  7854  	// result: (XORLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  7855  	for {
  7856  		off1 := auxIntToInt32(v.AuxInt)
  7857  		sym1 := auxToSym(v.Aux)
  7858  		if v_0.Op != Op386LEAL {
  7859  			break
  7860  		}
  7861  		off2 := auxIntToInt32(v_0.AuxInt)
  7862  		sym2 := auxToSym(v_0.Aux)
  7863  		base := v_0.Args[0]
  7864  		val := v_1
  7865  		mem := v_2
  7866  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  7867  			break
  7868  		}
  7869  		v.reset(Op386XORLmodify)
  7870  		v.AuxInt = int32ToAuxInt(off1 + off2)
  7871  		v.Aux = symToAux(mergeSym(sym1, sym2))
  7872  		v.AddArg3(base, val, mem)
  7873  		return true
  7874  	}
  7875  	return false
  7876  }
  7877  func rewriteValue386_OpAddr(v *Value) bool {
  7878  	v_0 := v.Args[0]
  7879  	// match: (Addr {sym} base)
  7880  	// result: (LEAL {sym} base)
  7881  	for {
  7882  		sym := auxToSym(v.Aux)
  7883  		base := v_0
  7884  		v.reset(Op386LEAL)
  7885  		v.Aux = symToAux(sym)
  7886  		v.AddArg(base)
  7887  		return true
  7888  	}
  7889  }
  7890  func rewriteValue386_OpBswap16(v *Value) bool {
  7891  	v_0 := v.Args[0]
  7892  	// match: (Bswap16 x)
  7893  	// result: (ROLWconst [8] x)
  7894  	for {
  7895  		x := v_0
  7896  		v.reset(Op386ROLWconst)
  7897  		v.AuxInt = int16ToAuxInt(8)
  7898  		v.AddArg(x)
  7899  		return true
  7900  	}
  7901  }
  7902  func rewriteValue386_OpConst16(v *Value) bool {
  7903  	// match: (Const16 [c])
  7904  	// result: (MOVLconst [int32(c)])
  7905  	for {
  7906  		c := auxIntToInt16(v.AuxInt)
  7907  		v.reset(Op386MOVLconst)
  7908  		v.AuxInt = int32ToAuxInt(int32(c))
  7909  		return true
  7910  	}
  7911  }
  7912  func rewriteValue386_OpConst8(v *Value) bool {
  7913  	// match: (Const8 [c])
  7914  	// result: (MOVLconst [int32(c)])
  7915  	for {
  7916  		c := auxIntToInt8(v.AuxInt)
  7917  		v.reset(Op386MOVLconst)
  7918  		v.AuxInt = int32ToAuxInt(int32(c))
  7919  		return true
  7920  	}
  7921  }
  7922  func rewriteValue386_OpConstBool(v *Value) bool {
  7923  	// match: (ConstBool [c])
  7924  	// result: (MOVLconst [b2i32(c)])
  7925  	for {
  7926  		c := auxIntToBool(v.AuxInt)
  7927  		v.reset(Op386MOVLconst)
  7928  		v.AuxInt = int32ToAuxInt(b2i32(c))
  7929  		return true
  7930  	}
  7931  }
  7932  func rewriteValue386_OpConstNil(v *Value) bool {
  7933  	// match: (ConstNil)
  7934  	// result: (MOVLconst [0])
  7935  	for {
  7936  		v.reset(Op386MOVLconst)
  7937  		v.AuxInt = int32ToAuxInt(0)
  7938  		return true
  7939  	}
  7940  }
  7941  func rewriteValue386_OpCtz16(v *Value) bool {
  7942  	v_0 := v.Args[0]
  7943  	b := v.Block
  7944  	typ := &b.Func.Config.Types
  7945  	// match: (Ctz16 x)
  7946  	// result: (BSFL (ORLconst <typ.UInt32> [0x10000] x))
  7947  	for {
  7948  		x := v_0
  7949  		v.reset(Op386BSFL)
  7950  		v0 := b.NewValue0(v.Pos, Op386ORLconst, typ.UInt32)
  7951  		v0.AuxInt = int32ToAuxInt(0x10000)
  7952  		v0.AddArg(x)
  7953  		v.AddArg(v0)
  7954  		return true
  7955  	}
  7956  }
  7957  func rewriteValue386_OpCtz8(v *Value) bool {
  7958  	v_0 := v.Args[0]
  7959  	b := v.Block
  7960  	typ := &b.Func.Config.Types
  7961  	// match: (Ctz8 x)
  7962  	// result: (BSFL (ORLconst <typ.UInt32> [0x100] x))
  7963  	for {
  7964  		x := v_0
  7965  		v.reset(Op386BSFL)
  7966  		v0 := b.NewValue0(v.Pos, Op386ORLconst, typ.UInt32)
  7967  		v0.AuxInt = int32ToAuxInt(0x100)
  7968  		v0.AddArg(x)
  7969  		v.AddArg(v0)
  7970  		return true
  7971  	}
  7972  }
  7973  func rewriteValue386_OpDiv8(v *Value) bool {
  7974  	v_1 := v.Args[1]
  7975  	v_0 := v.Args[0]
  7976  	b := v.Block
  7977  	typ := &b.Func.Config.Types
  7978  	// match: (Div8 x y)
  7979  	// result: (DIVW (SignExt8to16 x) (SignExt8to16 y))
  7980  	for {
  7981  		x := v_0
  7982  		y := v_1
  7983  		v.reset(Op386DIVW)
  7984  		v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  7985  		v0.AddArg(x)
  7986  		v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  7987  		v1.AddArg(y)
  7988  		v.AddArg2(v0, v1)
  7989  		return true
  7990  	}
  7991  }
  7992  func rewriteValue386_OpDiv8u(v *Value) bool {
  7993  	v_1 := v.Args[1]
  7994  	v_0 := v.Args[0]
  7995  	b := v.Block
  7996  	typ := &b.Func.Config.Types
  7997  	// match: (Div8u x y)
  7998  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  7999  	for {
  8000  		x := v_0
  8001  		y := v_1
  8002  		v.reset(Op386DIVWU)
  8003  		v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  8004  		v0.AddArg(x)
  8005  		v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  8006  		v1.AddArg(y)
  8007  		v.AddArg2(v0, v1)
  8008  		return true
  8009  	}
  8010  }
  8011  func rewriteValue386_OpEq16(v *Value) bool {
  8012  	v_1 := v.Args[1]
  8013  	v_0 := v.Args[0]
  8014  	b := v.Block
  8015  	// match: (Eq16 x y)
  8016  	// result: (SETEQ (CMPW x y))
  8017  	for {
  8018  		x := v_0
  8019  		y := v_1
  8020  		v.reset(Op386SETEQ)
  8021  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8022  		v0.AddArg2(x, y)
  8023  		v.AddArg(v0)
  8024  		return true
  8025  	}
  8026  }
  8027  func rewriteValue386_OpEq32(v *Value) bool {
  8028  	v_1 := v.Args[1]
  8029  	v_0 := v.Args[0]
  8030  	b := v.Block
  8031  	// match: (Eq32 x y)
  8032  	// result: (SETEQ (CMPL x y))
  8033  	for {
  8034  		x := v_0
  8035  		y := v_1
  8036  		v.reset(Op386SETEQ)
  8037  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8038  		v0.AddArg2(x, y)
  8039  		v.AddArg(v0)
  8040  		return true
  8041  	}
  8042  }
  8043  func rewriteValue386_OpEq32F(v *Value) bool {
  8044  	v_1 := v.Args[1]
  8045  	v_0 := v.Args[0]
  8046  	b := v.Block
  8047  	// match: (Eq32F x y)
  8048  	// result: (SETEQF (UCOMISS x y))
  8049  	for {
  8050  		x := v_0
  8051  		y := v_1
  8052  		v.reset(Op386SETEQF)
  8053  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  8054  		v0.AddArg2(x, y)
  8055  		v.AddArg(v0)
  8056  		return true
  8057  	}
  8058  }
  8059  func rewriteValue386_OpEq64F(v *Value) bool {
  8060  	v_1 := v.Args[1]
  8061  	v_0 := v.Args[0]
  8062  	b := v.Block
  8063  	// match: (Eq64F x y)
  8064  	// result: (SETEQF (UCOMISD x y))
  8065  	for {
  8066  		x := v_0
  8067  		y := v_1
  8068  		v.reset(Op386SETEQF)
  8069  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  8070  		v0.AddArg2(x, y)
  8071  		v.AddArg(v0)
  8072  		return true
  8073  	}
  8074  }
  8075  func rewriteValue386_OpEq8(v *Value) bool {
  8076  	v_1 := v.Args[1]
  8077  	v_0 := v.Args[0]
  8078  	b := v.Block
  8079  	// match: (Eq8 x y)
  8080  	// result: (SETEQ (CMPB x y))
  8081  	for {
  8082  		x := v_0
  8083  		y := v_1
  8084  		v.reset(Op386SETEQ)
  8085  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8086  		v0.AddArg2(x, y)
  8087  		v.AddArg(v0)
  8088  		return true
  8089  	}
  8090  }
  8091  func rewriteValue386_OpEqB(v *Value) bool {
  8092  	v_1 := v.Args[1]
  8093  	v_0 := v.Args[0]
  8094  	b := v.Block
  8095  	// match: (EqB x y)
  8096  	// result: (SETEQ (CMPB x y))
  8097  	for {
  8098  		x := v_0
  8099  		y := v_1
  8100  		v.reset(Op386SETEQ)
  8101  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8102  		v0.AddArg2(x, y)
  8103  		v.AddArg(v0)
  8104  		return true
  8105  	}
  8106  }
  8107  func rewriteValue386_OpEqPtr(v *Value) bool {
  8108  	v_1 := v.Args[1]
  8109  	v_0 := v.Args[0]
  8110  	b := v.Block
  8111  	// match: (EqPtr x y)
  8112  	// result: (SETEQ (CMPL x y))
  8113  	for {
  8114  		x := v_0
  8115  		y := v_1
  8116  		v.reset(Op386SETEQ)
  8117  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8118  		v0.AddArg2(x, y)
  8119  		v.AddArg(v0)
  8120  		return true
  8121  	}
  8122  }
  8123  func rewriteValue386_OpIsInBounds(v *Value) bool {
  8124  	v_1 := v.Args[1]
  8125  	v_0 := v.Args[0]
  8126  	b := v.Block
  8127  	// match: (IsInBounds idx len)
  8128  	// result: (SETB (CMPL idx len))
  8129  	for {
  8130  		idx := v_0
  8131  		len := v_1
  8132  		v.reset(Op386SETB)
  8133  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8134  		v0.AddArg2(idx, len)
  8135  		v.AddArg(v0)
  8136  		return true
  8137  	}
  8138  }
  8139  func rewriteValue386_OpIsNonNil(v *Value) bool {
  8140  	v_0 := v.Args[0]
  8141  	b := v.Block
  8142  	// match: (IsNonNil p)
  8143  	// result: (SETNE (TESTL p p))
  8144  	for {
  8145  		p := v_0
  8146  		v.reset(Op386SETNE)
  8147  		v0 := b.NewValue0(v.Pos, Op386TESTL, types.TypeFlags)
  8148  		v0.AddArg2(p, p)
  8149  		v.AddArg(v0)
  8150  		return true
  8151  	}
  8152  }
  8153  func rewriteValue386_OpIsSliceInBounds(v *Value) bool {
  8154  	v_1 := v.Args[1]
  8155  	v_0 := v.Args[0]
  8156  	b := v.Block
  8157  	// match: (IsSliceInBounds idx len)
  8158  	// result: (SETBE (CMPL idx len))
  8159  	for {
  8160  		idx := v_0
  8161  		len := v_1
  8162  		v.reset(Op386SETBE)
  8163  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8164  		v0.AddArg2(idx, len)
  8165  		v.AddArg(v0)
  8166  		return true
  8167  	}
  8168  }
  8169  func rewriteValue386_OpLeq16(v *Value) bool {
  8170  	v_1 := v.Args[1]
  8171  	v_0 := v.Args[0]
  8172  	b := v.Block
  8173  	// match: (Leq16 x y)
  8174  	// result: (SETLE (CMPW x y))
  8175  	for {
  8176  		x := v_0
  8177  		y := v_1
  8178  		v.reset(Op386SETLE)
  8179  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8180  		v0.AddArg2(x, y)
  8181  		v.AddArg(v0)
  8182  		return true
  8183  	}
  8184  }
  8185  func rewriteValue386_OpLeq16U(v *Value) bool {
  8186  	v_1 := v.Args[1]
  8187  	v_0 := v.Args[0]
  8188  	b := v.Block
  8189  	// match: (Leq16U x y)
  8190  	// result: (SETBE (CMPW x y))
  8191  	for {
  8192  		x := v_0
  8193  		y := v_1
  8194  		v.reset(Op386SETBE)
  8195  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8196  		v0.AddArg2(x, y)
  8197  		v.AddArg(v0)
  8198  		return true
  8199  	}
  8200  }
  8201  func rewriteValue386_OpLeq32(v *Value) bool {
  8202  	v_1 := v.Args[1]
  8203  	v_0 := v.Args[0]
  8204  	b := v.Block
  8205  	// match: (Leq32 x y)
  8206  	// result: (SETLE (CMPL x y))
  8207  	for {
  8208  		x := v_0
  8209  		y := v_1
  8210  		v.reset(Op386SETLE)
  8211  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8212  		v0.AddArg2(x, y)
  8213  		v.AddArg(v0)
  8214  		return true
  8215  	}
  8216  }
  8217  func rewriteValue386_OpLeq32F(v *Value) bool {
  8218  	v_1 := v.Args[1]
  8219  	v_0 := v.Args[0]
  8220  	b := v.Block
  8221  	// match: (Leq32F x y)
  8222  	// result: (SETGEF (UCOMISS y x))
  8223  	for {
  8224  		x := v_0
  8225  		y := v_1
  8226  		v.reset(Op386SETGEF)
  8227  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  8228  		v0.AddArg2(y, x)
  8229  		v.AddArg(v0)
  8230  		return true
  8231  	}
  8232  }
  8233  func rewriteValue386_OpLeq32U(v *Value) bool {
  8234  	v_1 := v.Args[1]
  8235  	v_0 := v.Args[0]
  8236  	b := v.Block
  8237  	// match: (Leq32U x y)
  8238  	// result: (SETBE (CMPL x y))
  8239  	for {
  8240  		x := v_0
  8241  		y := v_1
  8242  		v.reset(Op386SETBE)
  8243  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8244  		v0.AddArg2(x, y)
  8245  		v.AddArg(v0)
  8246  		return true
  8247  	}
  8248  }
  8249  func rewriteValue386_OpLeq64F(v *Value) bool {
  8250  	v_1 := v.Args[1]
  8251  	v_0 := v.Args[0]
  8252  	b := v.Block
  8253  	// match: (Leq64F x y)
  8254  	// result: (SETGEF (UCOMISD y x))
  8255  	for {
  8256  		x := v_0
  8257  		y := v_1
  8258  		v.reset(Op386SETGEF)
  8259  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  8260  		v0.AddArg2(y, x)
  8261  		v.AddArg(v0)
  8262  		return true
  8263  	}
  8264  }
  8265  func rewriteValue386_OpLeq8(v *Value) bool {
  8266  	v_1 := v.Args[1]
  8267  	v_0 := v.Args[0]
  8268  	b := v.Block
  8269  	// match: (Leq8 x y)
  8270  	// result: (SETLE (CMPB x y))
  8271  	for {
  8272  		x := v_0
  8273  		y := v_1
  8274  		v.reset(Op386SETLE)
  8275  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8276  		v0.AddArg2(x, y)
  8277  		v.AddArg(v0)
  8278  		return true
  8279  	}
  8280  }
  8281  func rewriteValue386_OpLeq8U(v *Value) bool {
  8282  	v_1 := v.Args[1]
  8283  	v_0 := v.Args[0]
  8284  	b := v.Block
  8285  	// match: (Leq8U x y)
  8286  	// result: (SETBE (CMPB x y))
  8287  	for {
  8288  		x := v_0
  8289  		y := v_1
  8290  		v.reset(Op386SETBE)
  8291  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8292  		v0.AddArg2(x, y)
  8293  		v.AddArg(v0)
  8294  		return true
  8295  	}
  8296  }
  8297  func rewriteValue386_OpLess16(v *Value) bool {
  8298  	v_1 := v.Args[1]
  8299  	v_0 := v.Args[0]
  8300  	b := v.Block
  8301  	// match: (Less16 x y)
  8302  	// result: (SETL (CMPW x y))
  8303  	for {
  8304  		x := v_0
  8305  		y := v_1
  8306  		v.reset(Op386SETL)
  8307  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8308  		v0.AddArg2(x, y)
  8309  		v.AddArg(v0)
  8310  		return true
  8311  	}
  8312  }
  8313  func rewriteValue386_OpLess16U(v *Value) bool {
  8314  	v_1 := v.Args[1]
  8315  	v_0 := v.Args[0]
  8316  	b := v.Block
  8317  	// match: (Less16U x y)
  8318  	// result: (SETB (CMPW x y))
  8319  	for {
  8320  		x := v_0
  8321  		y := v_1
  8322  		v.reset(Op386SETB)
  8323  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8324  		v0.AddArg2(x, y)
  8325  		v.AddArg(v0)
  8326  		return true
  8327  	}
  8328  }
  8329  func rewriteValue386_OpLess32(v *Value) bool {
  8330  	v_1 := v.Args[1]
  8331  	v_0 := v.Args[0]
  8332  	b := v.Block
  8333  	// match: (Less32 x y)
  8334  	// result: (SETL (CMPL x y))
  8335  	for {
  8336  		x := v_0
  8337  		y := v_1
  8338  		v.reset(Op386SETL)
  8339  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8340  		v0.AddArg2(x, y)
  8341  		v.AddArg(v0)
  8342  		return true
  8343  	}
  8344  }
  8345  func rewriteValue386_OpLess32F(v *Value) bool {
  8346  	v_1 := v.Args[1]
  8347  	v_0 := v.Args[0]
  8348  	b := v.Block
  8349  	// match: (Less32F x y)
  8350  	// result: (SETGF (UCOMISS y x))
  8351  	for {
  8352  		x := v_0
  8353  		y := v_1
  8354  		v.reset(Op386SETGF)
  8355  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  8356  		v0.AddArg2(y, x)
  8357  		v.AddArg(v0)
  8358  		return true
  8359  	}
  8360  }
  8361  func rewriteValue386_OpLess32U(v *Value) bool {
  8362  	v_1 := v.Args[1]
  8363  	v_0 := v.Args[0]
  8364  	b := v.Block
  8365  	// match: (Less32U x y)
  8366  	// result: (SETB (CMPL x y))
  8367  	for {
  8368  		x := v_0
  8369  		y := v_1
  8370  		v.reset(Op386SETB)
  8371  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8372  		v0.AddArg2(x, y)
  8373  		v.AddArg(v0)
  8374  		return true
  8375  	}
  8376  }
  8377  func rewriteValue386_OpLess64F(v *Value) bool {
  8378  	v_1 := v.Args[1]
  8379  	v_0 := v.Args[0]
  8380  	b := v.Block
  8381  	// match: (Less64F x y)
  8382  	// result: (SETGF (UCOMISD y x))
  8383  	for {
  8384  		x := v_0
  8385  		y := v_1
  8386  		v.reset(Op386SETGF)
  8387  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  8388  		v0.AddArg2(y, x)
  8389  		v.AddArg(v0)
  8390  		return true
  8391  	}
  8392  }
  8393  func rewriteValue386_OpLess8(v *Value) bool {
  8394  	v_1 := v.Args[1]
  8395  	v_0 := v.Args[0]
  8396  	b := v.Block
  8397  	// match: (Less8 x y)
  8398  	// result: (SETL (CMPB x y))
  8399  	for {
  8400  		x := v_0
  8401  		y := v_1
  8402  		v.reset(Op386SETL)
  8403  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8404  		v0.AddArg2(x, y)
  8405  		v.AddArg(v0)
  8406  		return true
  8407  	}
  8408  }
  8409  func rewriteValue386_OpLess8U(v *Value) bool {
  8410  	v_1 := v.Args[1]
  8411  	v_0 := v.Args[0]
  8412  	b := v.Block
  8413  	// match: (Less8U x y)
  8414  	// result: (SETB (CMPB x y))
  8415  	for {
  8416  		x := v_0
  8417  		y := v_1
  8418  		v.reset(Op386SETB)
  8419  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8420  		v0.AddArg2(x, y)
  8421  		v.AddArg(v0)
  8422  		return true
  8423  	}
  8424  }
  8425  func rewriteValue386_OpLoad(v *Value) bool {
  8426  	v_1 := v.Args[1]
  8427  	v_0 := v.Args[0]
  8428  	// match: (Load <t> ptr mem)
  8429  	// cond: (is32BitInt(t) || isPtr(t))
  8430  	// result: (MOVLload ptr mem)
  8431  	for {
  8432  		t := v.Type
  8433  		ptr := v_0
  8434  		mem := v_1
  8435  		if !(is32BitInt(t) || isPtr(t)) {
  8436  			break
  8437  		}
  8438  		v.reset(Op386MOVLload)
  8439  		v.AddArg2(ptr, mem)
  8440  		return true
  8441  	}
  8442  	// match: (Load <t> ptr mem)
  8443  	// cond: is16BitInt(t)
  8444  	// result: (MOVWload ptr mem)
  8445  	for {
  8446  		t := v.Type
  8447  		ptr := v_0
  8448  		mem := v_1
  8449  		if !(is16BitInt(t)) {
  8450  			break
  8451  		}
  8452  		v.reset(Op386MOVWload)
  8453  		v.AddArg2(ptr, mem)
  8454  		return true
  8455  	}
  8456  	// match: (Load <t> ptr mem)
  8457  	// cond: (t.IsBoolean() || is8BitInt(t))
  8458  	// result: (MOVBload ptr mem)
  8459  	for {
  8460  		t := v.Type
  8461  		ptr := v_0
  8462  		mem := v_1
  8463  		if !(t.IsBoolean() || is8BitInt(t)) {
  8464  			break
  8465  		}
  8466  		v.reset(Op386MOVBload)
  8467  		v.AddArg2(ptr, mem)
  8468  		return true
  8469  	}
  8470  	// match: (Load <t> ptr mem)
  8471  	// cond: is32BitFloat(t)
  8472  	// result: (MOVSSload ptr mem)
  8473  	for {
  8474  		t := v.Type
  8475  		ptr := v_0
  8476  		mem := v_1
  8477  		if !(is32BitFloat(t)) {
  8478  			break
  8479  		}
  8480  		v.reset(Op386MOVSSload)
  8481  		v.AddArg2(ptr, mem)
  8482  		return true
  8483  	}
  8484  	// match: (Load <t> ptr mem)
  8485  	// cond: is64BitFloat(t)
  8486  	// result: (MOVSDload ptr mem)
  8487  	for {
  8488  		t := v.Type
  8489  		ptr := v_0
  8490  		mem := v_1
  8491  		if !(is64BitFloat(t)) {
  8492  			break
  8493  		}
  8494  		v.reset(Op386MOVSDload)
  8495  		v.AddArg2(ptr, mem)
  8496  		return true
  8497  	}
  8498  	return false
  8499  }
  8500  func rewriteValue386_OpLocalAddr(v *Value) bool {
  8501  	v_1 := v.Args[1]
  8502  	v_0 := v.Args[0]
  8503  	b := v.Block
  8504  	typ := &b.Func.Config.Types
  8505  	// match: (LocalAddr <t> {sym} base mem)
  8506  	// cond: t.Elem().HasPointers()
  8507  	// result: (LEAL {sym} (SPanchored base mem))
  8508  	for {
  8509  		t := v.Type
  8510  		sym := auxToSym(v.Aux)
  8511  		base := v_0
  8512  		mem := v_1
  8513  		if !(t.Elem().HasPointers()) {
  8514  			break
  8515  		}
  8516  		v.reset(Op386LEAL)
  8517  		v.Aux = symToAux(sym)
  8518  		v0 := b.NewValue0(v.Pos, OpSPanchored, typ.Uintptr)
  8519  		v0.AddArg2(base, mem)
  8520  		v.AddArg(v0)
  8521  		return true
  8522  	}
  8523  	// match: (LocalAddr <t> {sym} base _)
  8524  	// cond: !t.Elem().HasPointers()
  8525  	// result: (LEAL {sym} base)
  8526  	for {
  8527  		t := v.Type
  8528  		sym := auxToSym(v.Aux)
  8529  		base := v_0
  8530  		if !(!t.Elem().HasPointers()) {
  8531  			break
  8532  		}
  8533  		v.reset(Op386LEAL)
  8534  		v.Aux = symToAux(sym)
  8535  		v.AddArg(base)
  8536  		return true
  8537  	}
  8538  	return false
  8539  }
  8540  func rewriteValue386_OpLsh16x16(v *Value) bool {
  8541  	v_1 := v.Args[1]
  8542  	v_0 := v.Args[0]
  8543  	b := v.Block
  8544  	// match: (Lsh16x16 <t> x y)
  8545  	// cond: !shiftIsBounded(v)
  8546  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  8547  	for {
  8548  		t := v.Type
  8549  		x := v_0
  8550  		y := v_1
  8551  		if !(!shiftIsBounded(v)) {
  8552  			break
  8553  		}
  8554  		v.reset(Op386ANDL)
  8555  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8556  		v0.AddArg2(x, y)
  8557  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8558  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  8559  		v2.AuxInt = int16ToAuxInt(32)
  8560  		v2.AddArg(y)
  8561  		v1.AddArg(v2)
  8562  		v.AddArg2(v0, v1)
  8563  		return true
  8564  	}
  8565  	// match: (Lsh16x16 <t> x y)
  8566  	// cond: shiftIsBounded(v)
  8567  	// result: (SHLL <t> x y)
  8568  	for {
  8569  		t := v.Type
  8570  		x := v_0
  8571  		y := v_1
  8572  		if !(shiftIsBounded(v)) {
  8573  			break
  8574  		}
  8575  		v.reset(Op386SHLL)
  8576  		v.Type = t
  8577  		v.AddArg2(x, y)
  8578  		return true
  8579  	}
  8580  	return false
  8581  }
  8582  func rewriteValue386_OpLsh16x32(v *Value) bool {
  8583  	v_1 := v.Args[1]
  8584  	v_0 := v.Args[0]
  8585  	b := v.Block
  8586  	// match: (Lsh16x32 <t> x y)
  8587  	// cond: !shiftIsBounded(v)
  8588  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  8589  	for {
  8590  		t := v.Type
  8591  		x := v_0
  8592  		y := v_1
  8593  		if !(!shiftIsBounded(v)) {
  8594  			break
  8595  		}
  8596  		v.reset(Op386ANDL)
  8597  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8598  		v0.AddArg2(x, y)
  8599  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8600  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  8601  		v2.AuxInt = int32ToAuxInt(32)
  8602  		v2.AddArg(y)
  8603  		v1.AddArg(v2)
  8604  		v.AddArg2(v0, v1)
  8605  		return true
  8606  	}
  8607  	// match: (Lsh16x32 <t> x y)
  8608  	// cond: shiftIsBounded(v)
  8609  	// result: (SHLL <t> x y)
  8610  	for {
  8611  		t := v.Type
  8612  		x := v_0
  8613  		y := v_1
  8614  		if !(shiftIsBounded(v)) {
  8615  			break
  8616  		}
  8617  		v.reset(Op386SHLL)
  8618  		v.Type = t
  8619  		v.AddArg2(x, y)
  8620  		return true
  8621  	}
  8622  	return false
  8623  }
  8624  func rewriteValue386_OpLsh16x64(v *Value) bool {
  8625  	v_1 := v.Args[1]
  8626  	v_0 := v.Args[0]
  8627  	// match: (Lsh16x64 x (Const64 [c]))
  8628  	// cond: uint64(c) < 16
  8629  	// result: (SHLLconst x [int32(c)])
  8630  	for {
  8631  		x := v_0
  8632  		if v_1.Op != OpConst64 {
  8633  			break
  8634  		}
  8635  		c := auxIntToInt64(v_1.AuxInt)
  8636  		if !(uint64(c) < 16) {
  8637  			break
  8638  		}
  8639  		v.reset(Op386SHLLconst)
  8640  		v.AuxInt = int32ToAuxInt(int32(c))
  8641  		v.AddArg(x)
  8642  		return true
  8643  	}
  8644  	// match: (Lsh16x64 _ (Const64 [c]))
  8645  	// cond: uint64(c) >= 16
  8646  	// result: (Const16 [0])
  8647  	for {
  8648  		if v_1.Op != OpConst64 {
  8649  			break
  8650  		}
  8651  		c := auxIntToInt64(v_1.AuxInt)
  8652  		if !(uint64(c) >= 16) {
  8653  			break
  8654  		}
  8655  		v.reset(OpConst16)
  8656  		v.AuxInt = int16ToAuxInt(0)
  8657  		return true
  8658  	}
  8659  	return false
  8660  }
  8661  func rewriteValue386_OpLsh16x8(v *Value) bool {
  8662  	v_1 := v.Args[1]
  8663  	v_0 := v.Args[0]
  8664  	b := v.Block
  8665  	// match: (Lsh16x8 <t> x y)
  8666  	// cond: !shiftIsBounded(v)
  8667  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  8668  	for {
  8669  		t := v.Type
  8670  		x := v_0
  8671  		y := v_1
  8672  		if !(!shiftIsBounded(v)) {
  8673  			break
  8674  		}
  8675  		v.reset(Op386ANDL)
  8676  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8677  		v0.AddArg2(x, y)
  8678  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8679  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  8680  		v2.AuxInt = int8ToAuxInt(32)
  8681  		v2.AddArg(y)
  8682  		v1.AddArg(v2)
  8683  		v.AddArg2(v0, v1)
  8684  		return true
  8685  	}
  8686  	// match: (Lsh16x8 <t> x y)
  8687  	// cond: shiftIsBounded(v)
  8688  	// result: (SHLL <t> x y)
  8689  	for {
  8690  		t := v.Type
  8691  		x := v_0
  8692  		y := v_1
  8693  		if !(shiftIsBounded(v)) {
  8694  			break
  8695  		}
  8696  		v.reset(Op386SHLL)
  8697  		v.Type = t
  8698  		v.AddArg2(x, y)
  8699  		return true
  8700  	}
  8701  	return false
  8702  }
  8703  func rewriteValue386_OpLsh32x16(v *Value) bool {
  8704  	v_1 := v.Args[1]
  8705  	v_0 := v.Args[0]
  8706  	b := v.Block
  8707  	// match: (Lsh32x16 <t> x y)
  8708  	// cond: !shiftIsBounded(v)
  8709  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  8710  	for {
  8711  		t := v.Type
  8712  		x := v_0
  8713  		y := v_1
  8714  		if !(!shiftIsBounded(v)) {
  8715  			break
  8716  		}
  8717  		v.reset(Op386ANDL)
  8718  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8719  		v0.AddArg2(x, y)
  8720  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8721  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  8722  		v2.AuxInt = int16ToAuxInt(32)
  8723  		v2.AddArg(y)
  8724  		v1.AddArg(v2)
  8725  		v.AddArg2(v0, v1)
  8726  		return true
  8727  	}
  8728  	// match: (Lsh32x16 <t> x y)
  8729  	// cond: shiftIsBounded(v)
  8730  	// result: (SHLL <t> x y)
  8731  	for {
  8732  		t := v.Type
  8733  		x := v_0
  8734  		y := v_1
  8735  		if !(shiftIsBounded(v)) {
  8736  			break
  8737  		}
  8738  		v.reset(Op386SHLL)
  8739  		v.Type = t
  8740  		v.AddArg2(x, y)
  8741  		return true
  8742  	}
  8743  	return false
  8744  }
  8745  func rewriteValue386_OpLsh32x32(v *Value) bool {
  8746  	v_1 := v.Args[1]
  8747  	v_0 := v.Args[0]
  8748  	b := v.Block
  8749  	// match: (Lsh32x32 <t> x y)
  8750  	// cond: !shiftIsBounded(v)
  8751  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  8752  	for {
  8753  		t := v.Type
  8754  		x := v_0
  8755  		y := v_1
  8756  		if !(!shiftIsBounded(v)) {
  8757  			break
  8758  		}
  8759  		v.reset(Op386ANDL)
  8760  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8761  		v0.AddArg2(x, y)
  8762  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8763  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  8764  		v2.AuxInt = int32ToAuxInt(32)
  8765  		v2.AddArg(y)
  8766  		v1.AddArg(v2)
  8767  		v.AddArg2(v0, v1)
  8768  		return true
  8769  	}
  8770  	// match: (Lsh32x32 <t> x y)
  8771  	// cond: shiftIsBounded(v)
  8772  	// result: (SHLL <t> x y)
  8773  	for {
  8774  		t := v.Type
  8775  		x := v_0
  8776  		y := v_1
  8777  		if !(shiftIsBounded(v)) {
  8778  			break
  8779  		}
  8780  		v.reset(Op386SHLL)
  8781  		v.Type = t
  8782  		v.AddArg2(x, y)
  8783  		return true
  8784  	}
  8785  	return false
  8786  }
  8787  func rewriteValue386_OpLsh32x64(v *Value) bool {
  8788  	v_1 := v.Args[1]
  8789  	v_0 := v.Args[0]
  8790  	// match: (Lsh32x64 x (Const64 [c]))
  8791  	// cond: uint64(c) < 32
  8792  	// result: (SHLLconst x [int32(c)])
  8793  	for {
  8794  		x := v_0
  8795  		if v_1.Op != OpConst64 {
  8796  			break
  8797  		}
  8798  		c := auxIntToInt64(v_1.AuxInt)
  8799  		if !(uint64(c) < 32) {
  8800  			break
  8801  		}
  8802  		v.reset(Op386SHLLconst)
  8803  		v.AuxInt = int32ToAuxInt(int32(c))
  8804  		v.AddArg(x)
  8805  		return true
  8806  	}
  8807  	// match: (Lsh32x64 _ (Const64 [c]))
  8808  	// cond: uint64(c) >= 32
  8809  	// result: (Const32 [0])
  8810  	for {
  8811  		if v_1.Op != OpConst64 {
  8812  			break
  8813  		}
  8814  		c := auxIntToInt64(v_1.AuxInt)
  8815  		if !(uint64(c) >= 32) {
  8816  			break
  8817  		}
  8818  		v.reset(OpConst32)
  8819  		v.AuxInt = int32ToAuxInt(0)
  8820  		return true
  8821  	}
  8822  	return false
  8823  }
  8824  func rewriteValue386_OpLsh32x8(v *Value) bool {
  8825  	v_1 := v.Args[1]
  8826  	v_0 := v.Args[0]
  8827  	b := v.Block
  8828  	// match: (Lsh32x8 <t> x y)
  8829  	// cond: !shiftIsBounded(v)
  8830  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  8831  	for {
  8832  		t := v.Type
  8833  		x := v_0
  8834  		y := v_1
  8835  		if !(!shiftIsBounded(v)) {
  8836  			break
  8837  		}
  8838  		v.reset(Op386ANDL)
  8839  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8840  		v0.AddArg2(x, y)
  8841  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8842  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  8843  		v2.AuxInt = int8ToAuxInt(32)
  8844  		v2.AddArg(y)
  8845  		v1.AddArg(v2)
  8846  		v.AddArg2(v0, v1)
  8847  		return true
  8848  	}
  8849  	// match: (Lsh32x8 <t> x y)
  8850  	// cond: shiftIsBounded(v)
  8851  	// result: (SHLL <t> x y)
  8852  	for {
  8853  		t := v.Type
  8854  		x := v_0
  8855  		y := v_1
  8856  		if !(shiftIsBounded(v)) {
  8857  			break
  8858  		}
  8859  		v.reset(Op386SHLL)
  8860  		v.Type = t
  8861  		v.AddArg2(x, y)
  8862  		return true
  8863  	}
  8864  	return false
  8865  }
  8866  func rewriteValue386_OpLsh8x16(v *Value) bool {
  8867  	v_1 := v.Args[1]
  8868  	v_0 := v.Args[0]
  8869  	b := v.Block
  8870  	// match: (Lsh8x16 <t> x y)
  8871  	// cond: !shiftIsBounded(v)
  8872  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  8873  	for {
  8874  		t := v.Type
  8875  		x := v_0
  8876  		y := v_1
  8877  		if !(!shiftIsBounded(v)) {
  8878  			break
  8879  		}
  8880  		v.reset(Op386ANDL)
  8881  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8882  		v0.AddArg2(x, y)
  8883  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8884  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  8885  		v2.AuxInt = int16ToAuxInt(32)
  8886  		v2.AddArg(y)
  8887  		v1.AddArg(v2)
  8888  		v.AddArg2(v0, v1)
  8889  		return true
  8890  	}
  8891  	// match: (Lsh8x16 <t> x y)
  8892  	// cond: shiftIsBounded(v)
  8893  	// result: (SHLL <t> x y)
  8894  	for {
  8895  		t := v.Type
  8896  		x := v_0
  8897  		y := v_1
  8898  		if !(shiftIsBounded(v)) {
  8899  			break
  8900  		}
  8901  		v.reset(Op386SHLL)
  8902  		v.Type = t
  8903  		v.AddArg2(x, y)
  8904  		return true
  8905  	}
  8906  	return false
  8907  }
  8908  func rewriteValue386_OpLsh8x32(v *Value) bool {
  8909  	v_1 := v.Args[1]
  8910  	v_0 := v.Args[0]
  8911  	b := v.Block
  8912  	// match: (Lsh8x32 <t> x y)
  8913  	// cond: !shiftIsBounded(v)
  8914  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  8915  	for {
  8916  		t := v.Type
  8917  		x := v_0
  8918  		y := v_1
  8919  		if !(!shiftIsBounded(v)) {
  8920  			break
  8921  		}
  8922  		v.reset(Op386ANDL)
  8923  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  8924  		v0.AddArg2(x, y)
  8925  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  8926  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  8927  		v2.AuxInt = int32ToAuxInt(32)
  8928  		v2.AddArg(y)
  8929  		v1.AddArg(v2)
  8930  		v.AddArg2(v0, v1)
  8931  		return true
  8932  	}
  8933  	// match: (Lsh8x32 <t> x y)
  8934  	// cond: shiftIsBounded(v)
  8935  	// result: (SHLL <t> x y)
  8936  	for {
  8937  		t := v.Type
  8938  		x := v_0
  8939  		y := v_1
  8940  		if !(shiftIsBounded(v)) {
  8941  			break
  8942  		}
  8943  		v.reset(Op386SHLL)
  8944  		v.Type = t
  8945  		v.AddArg2(x, y)
  8946  		return true
  8947  	}
  8948  	return false
  8949  }
  8950  func rewriteValue386_OpLsh8x64(v *Value) bool {
  8951  	v_1 := v.Args[1]
  8952  	v_0 := v.Args[0]
  8953  	// match: (Lsh8x64 x (Const64 [c]))
  8954  	// cond: uint64(c) < 8
  8955  	// result: (SHLLconst x [int32(c)])
  8956  	for {
  8957  		x := v_0
  8958  		if v_1.Op != OpConst64 {
  8959  			break
  8960  		}
  8961  		c := auxIntToInt64(v_1.AuxInt)
  8962  		if !(uint64(c) < 8) {
  8963  			break
  8964  		}
  8965  		v.reset(Op386SHLLconst)
  8966  		v.AuxInt = int32ToAuxInt(int32(c))
  8967  		v.AddArg(x)
  8968  		return true
  8969  	}
  8970  	// match: (Lsh8x64 _ (Const64 [c]))
  8971  	// cond: uint64(c) >= 8
  8972  	// result: (Const8 [0])
  8973  	for {
  8974  		if v_1.Op != OpConst64 {
  8975  			break
  8976  		}
  8977  		c := auxIntToInt64(v_1.AuxInt)
  8978  		if !(uint64(c) >= 8) {
  8979  			break
  8980  		}
  8981  		v.reset(OpConst8)
  8982  		v.AuxInt = int8ToAuxInt(0)
  8983  		return true
  8984  	}
  8985  	return false
  8986  }
  8987  func rewriteValue386_OpLsh8x8(v *Value) bool {
  8988  	v_1 := v.Args[1]
  8989  	v_0 := v.Args[0]
  8990  	b := v.Block
  8991  	// match: (Lsh8x8 <t> x y)
  8992  	// cond: !shiftIsBounded(v)
  8993  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  8994  	for {
  8995  		t := v.Type
  8996  		x := v_0
  8997  		y := v_1
  8998  		if !(!shiftIsBounded(v)) {
  8999  			break
  9000  		}
  9001  		v.reset(Op386ANDL)
  9002  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9003  		v0.AddArg2(x, y)
  9004  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9005  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9006  		v2.AuxInt = int8ToAuxInt(32)
  9007  		v2.AddArg(y)
  9008  		v1.AddArg(v2)
  9009  		v.AddArg2(v0, v1)
  9010  		return true
  9011  	}
  9012  	// match: (Lsh8x8 <t> x y)
  9013  	// cond: shiftIsBounded(v)
  9014  	// result: (SHLL <t> x y)
  9015  	for {
  9016  		t := v.Type
  9017  		x := v_0
  9018  		y := v_1
  9019  		if !(shiftIsBounded(v)) {
  9020  			break
  9021  		}
  9022  		v.reset(Op386SHLL)
  9023  		v.Type = t
  9024  		v.AddArg2(x, y)
  9025  		return true
  9026  	}
  9027  	return false
  9028  }
  9029  func rewriteValue386_OpMod8(v *Value) bool {
  9030  	v_1 := v.Args[1]
  9031  	v_0 := v.Args[0]
  9032  	b := v.Block
  9033  	typ := &b.Func.Config.Types
  9034  	// match: (Mod8 x y)
  9035  	// result: (MODW (SignExt8to16 x) (SignExt8to16 y))
  9036  	for {
  9037  		x := v_0
  9038  		y := v_1
  9039  		v.reset(Op386MODW)
  9040  		v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  9041  		v0.AddArg(x)
  9042  		v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  9043  		v1.AddArg(y)
  9044  		v.AddArg2(v0, v1)
  9045  		return true
  9046  	}
  9047  }
  9048  func rewriteValue386_OpMod8u(v *Value) bool {
  9049  	v_1 := v.Args[1]
  9050  	v_0 := v.Args[0]
  9051  	b := v.Block
  9052  	typ := &b.Func.Config.Types
  9053  	// match: (Mod8u x y)
  9054  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9055  	for {
  9056  		x := v_0
  9057  		y := v_1
  9058  		v.reset(Op386MODWU)
  9059  		v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  9060  		v0.AddArg(x)
  9061  		v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  9062  		v1.AddArg(y)
  9063  		v.AddArg2(v0, v1)
  9064  		return true
  9065  	}
  9066  }
  9067  func rewriteValue386_OpMove(v *Value) bool {
  9068  	v_2 := v.Args[2]
  9069  	v_1 := v.Args[1]
  9070  	v_0 := v.Args[0]
  9071  	b := v.Block
  9072  	typ := &b.Func.Config.Types
  9073  	// match: (Move [0] _ _ mem)
  9074  	// result: mem
  9075  	for {
  9076  		if auxIntToInt64(v.AuxInt) != 0 {
  9077  			break
  9078  		}
  9079  		mem := v_2
  9080  		v.copyOf(mem)
  9081  		return true
  9082  	}
  9083  	// match: (Move [1] dst src mem)
  9084  	// result: (MOVBstore dst (MOVBload src mem) mem)
  9085  	for {
  9086  		if auxIntToInt64(v.AuxInt) != 1 {
  9087  			break
  9088  		}
  9089  		dst := v_0
  9090  		src := v_1
  9091  		mem := v_2
  9092  		v.reset(Op386MOVBstore)
  9093  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9094  		v0.AddArg2(src, mem)
  9095  		v.AddArg3(dst, v0, mem)
  9096  		return true
  9097  	}
  9098  	// match: (Move [2] dst src mem)
  9099  	// result: (MOVWstore dst (MOVWload src mem) mem)
  9100  	for {
  9101  		if auxIntToInt64(v.AuxInt) != 2 {
  9102  			break
  9103  		}
  9104  		dst := v_0
  9105  		src := v_1
  9106  		mem := v_2
  9107  		v.reset(Op386MOVWstore)
  9108  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9109  		v0.AddArg2(src, mem)
  9110  		v.AddArg3(dst, v0, mem)
  9111  		return true
  9112  	}
  9113  	// match: (Move [4] dst src mem)
  9114  	// result: (MOVLstore dst (MOVLload src mem) mem)
  9115  	for {
  9116  		if auxIntToInt64(v.AuxInt) != 4 {
  9117  			break
  9118  		}
  9119  		dst := v_0
  9120  		src := v_1
  9121  		mem := v_2
  9122  		v.reset(Op386MOVLstore)
  9123  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9124  		v0.AddArg2(src, mem)
  9125  		v.AddArg3(dst, v0, mem)
  9126  		return true
  9127  	}
  9128  	// match: (Move [3] dst src mem)
  9129  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) (MOVWstore dst (MOVWload src mem) mem))
  9130  	for {
  9131  		if auxIntToInt64(v.AuxInt) != 3 {
  9132  			break
  9133  		}
  9134  		dst := v_0
  9135  		src := v_1
  9136  		mem := v_2
  9137  		v.reset(Op386MOVBstore)
  9138  		v.AuxInt = int32ToAuxInt(2)
  9139  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9140  		v0.AuxInt = int32ToAuxInt(2)
  9141  		v0.AddArg2(src, mem)
  9142  		v1 := b.NewValue0(v.Pos, Op386MOVWstore, types.TypeMem)
  9143  		v2 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9144  		v2.AddArg2(src, mem)
  9145  		v1.AddArg3(dst, v2, mem)
  9146  		v.AddArg3(dst, v0, v1)
  9147  		return true
  9148  	}
  9149  	// match: (Move [5] dst src mem)
  9150  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9151  	for {
  9152  		if auxIntToInt64(v.AuxInt) != 5 {
  9153  			break
  9154  		}
  9155  		dst := v_0
  9156  		src := v_1
  9157  		mem := v_2
  9158  		v.reset(Op386MOVBstore)
  9159  		v.AuxInt = int32ToAuxInt(4)
  9160  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9161  		v0.AuxInt = int32ToAuxInt(4)
  9162  		v0.AddArg2(src, mem)
  9163  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9164  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9165  		v2.AddArg2(src, mem)
  9166  		v1.AddArg3(dst, v2, mem)
  9167  		v.AddArg3(dst, v0, v1)
  9168  		return true
  9169  	}
  9170  	// match: (Move [6] dst src mem)
  9171  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9172  	for {
  9173  		if auxIntToInt64(v.AuxInt) != 6 {
  9174  			break
  9175  		}
  9176  		dst := v_0
  9177  		src := v_1
  9178  		mem := v_2
  9179  		v.reset(Op386MOVWstore)
  9180  		v.AuxInt = int32ToAuxInt(4)
  9181  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9182  		v0.AuxInt = int32ToAuxInt(4)
  9183  		v0.AddArg2(src, mem)
  9184  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9185  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9186  		v2.AddArg2(src, mem)
  9187  		v1.AddArg3(dst, v2, mem)
  9188  		v.AddArg3(dst, v0, v1)
  9189  		return true
  9190  	}
  9191  	// match: (Move [7] dst src mem)
  9192  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9193  	for {
  9194  		if auxIntToInt64(v.AuxInt) != 7 {
  9195  			break
  9196  		}
  9197  		dst := v_0
  9198  		src := v_1
  9199  		mem := v_2
  9200  		v.reset(Op386MOVLstore)
  9201  		v.AuxInt = int32ToAuxInt(3)
  9202  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9203  		v0.AuxInt = int32ToAuxInt(3)
  9204  		v0.AddArg2(src, mem)
  9205  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9206  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9207  		v2.AddArg2(src, mem)
  9208  		v1.AddArg3(dst, v2, mem)
  9209  		v.AddArg3(dst, v0, v1)
  9210  		return true
  9211  	}
  9212  	// match: (Move [8] dst src mem)
  9213  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9214  	for {
  9215  		if auxIntToInt64(v.AuxInt) != 8 {
  9216  			break
  9217  		}
  9218  		dst := v_0
  9219  		src := v_1
  9220  		mem := v_2
  9221  		v.reset(Op386MOVLstore)
  9222  		v.AuxInt = int32ToAuxInt(4)
  9223  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9224  		v0.AuxInt = int32ToAuxInt(4)
  9225  		v0.AddArg2(src, mem)
  9226  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9227  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9228  		v2.AddArg2(src, mem)
  9229  		v1.AddArg3(dst, v2, mem)
  9230  		v.AddArg3(dst, v0, v1)
  9231  		return true
  9232  	}
  9233  	// match: (Move [s] dst src mem)
  9234  	// cond: s > 8 && s%4 != 0
  9235  	// result: (Move [s-s%4] (ADDLconst <dst.Type> dst [int32(s%4)]) (ADDLconst <src.Type> src [int32(s%4)]) (MOVLstore dst (MOVLload src mem) mem))
  9236  	for {
  9237  		s := auxIntToInt64(v.AuxInt)
  9238  		dst := v_0
  9239  		src := v_1
  9240  		mem := v_2
  9241  		if !(s > 8 && s%4 != 0) {
  9242  			break
  9243  		}
  9244  		v.reset(OpMove)
  9245  		v.AuxInt = int64ToAuxInt(s - s%4)
  9246  		v0 := b.NewValue0(v.Pos, Op386ADDLconst, dst.Type)
  9247  		v0.AuxInt = int32ToAuxInt(int32(s % 4))
  9248  		v0.AddArg(dst)
  9249  		v1 := b.NewValue0(v.Pos, Op386ADDLconst, src.Type)
  9250  		v1.AuxInt = int32ToAuxInt(int32(s % 4))
  9251  		v1.AddArg(src)
  9252  		v2 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9253  		v3 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9254  		v3.AddArg2(src, mem)
  9255  		v2.AddArg3(dst, v3, mem)
  9256  		v.AddArg3(v0, v1, v2)
  9257  		return true
  9258  	}
  9259  	// match: (Move [s] dst src mem)
  9260  	// cond: s > 8 && s <= 4*128 && s%4 == 0 && logLargeCopy(v, s)
  9261  	// result: (DUFFCOPY [10*(128-s/4)] dst src mem)
  9262  	for {
  9263  		s := auxIntToInt64(v.AuxInt)
  9264  		dst := v_0
  9265  		src := v_1
  9266  		mem := v_2
  9267  		if !(s > 8 && s <= 4*128 && s%4 == 0 && logLargeCopy(v, s)) {
  9268  			break
  9269  		}
  9270  		v.reset(Op386DUFFCOPY)
  9271  		v.AuxInt = int64ToAuxInt(10 * (128 - s/4))
  9272  		v.AddArg3(dst, src, mem)
  9273  		return true
  9274  	}
  9275  	// match: (Move [s] dst src mem)
  9276  	// cond: s > 4*128 && s%4 == 0 && logLargeCopy(v, s)
  9277  	// result: (REPMOVSL dst src (MOVLconst [int32(s/4)]) mem)
  9278  	for {
  9279  		s := auxIntToInt64(v.AuxInt)
  9280  		dst := v_0
  9281  		src := v_1
  9282  		mem := v_2
  9283  		if !(s > 4*128 && s%4 == 0 && logLargeCopy(v, s)) {
  9284  			break
  9285  		}
  9286  		v.reset(Op386REPMOVSL)
  9287  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
  9288  		v0.AuxInt = int32ToAuxInt(int32(s / 4))
  9289  		v.AddArg4(dst, src, v0, mem)
  9290  		return true
  9291  	}
  9292  	return false
  9293  }
  9294  func rewriteValue386_OpNeg32F(v *Value) bool {
  9295  	v_0 := v.Args[0]
  9296  	b := v.Block
  9297  	typ := &b.Func.Config.Types
  9298  	// match: (Neg32F x)
  9299  	// result: (PXOR x (MOVSSconst <typ.Float32> [float32(math.Copysign(0, -1))]))
  9300  	for {
  9301  		x := v_0
  9302  		v.reset(Op386PXOR)
  9303  		v0 := b.NewValue0(v.Pos, Op386MOVSSconst, typ.Float32)
  9304  		v0.AuxInt = float32ToAuxInt(float32(math.Copysign(0, -1)))
  9305  		v.AddArg2(x, v0)
  9306  		return true
  9307  	}
  9308  }
  9309  func rewriteValue386_OpNeg64F(v *Value) bool {
  9310  	v_0 := v.Args[0]
  9311  	b := v.Block
  9312  	typ := &b.Func.Config.Types
  9313  	// match: (Neg64F x)
  9314  	// result: (PXOR x (MOVSDconst <typ.Float64> [math.Copysign(0, -1)]))
  9315  	for {
  9316  		x := v_0
  9317  		v.reset(Op386PXOR)
  9318  		v0 := b.NewValue0(v.Pos, Op386MOVSDconst, typ.Float64)
  9319  		v0.AuxInt = float64ToAuxInt(math.Copysign(0, -1))
  9320  		v.AddArg2(x, v0)
  9321  		return true
  9322  	}
  9323  }
  9324  func rewriteValue386_OpNeq16(v *Value) bool {
  9325  	v_1 := v.Args[1]
  9326  	v_0 := v.Args[0]
  9327  	b := v.Block
  9328  	// match: (Neq16 x y)
  9329  	// result: (SETNE (CMPW x y))
  9330  	for {
  9331  		x := v_0
  9332  		y := v_1
  9333  		v.reset(Op386SETNE)
  9334  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  9335  		v0.AddArg2(x, y)
  9336  		v.AddArg(v0)
  9337  		return true
  9338  	}
  9339  }
  9340  func rewriteValue386_OpNeq32(v *Value) bool {
  9341  	v_1 := v.Args[1]
  9342  	v_0 := v.Args[0]
  9343  	b := v.Block
  9344  	// match: (Neq32 x y)
  9345  	// result: (SETNE (CMPL x y))
  9346  	for {
  9347  		x := v_0
  9348  		y := v_1
  9349  		v.reset(Op386SETNE)
  9350  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9351  		v0.AddArg2(x, y)
  9352  		v.AddArg(v0)
  9353  		return true
  9354  	}
  9355  }
  9356  func rewriteValue386_OpNeq32F(v *Value) bool {
  9357  	v_1 := v.Args[1]
  9358  	v_0 := v.Args[0]
  9359  	b := v.Block
  9360  	// match: (Neq32F x y)
  9361  	// result: (SETNEF (UCOMISS x y))
  9362  	for {
  9363  		x := v_0
  9364  		y := v_1
  9365  		v.reset(Op386SETNEF)
  9366  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  9367  		v0.AddArg2(x, y)
  9368  		v.AddArg(v0)
  9369  		return true
  9370  	}
  9371  }
  9372  func rewriteValue386_OpNeq64F(v *Value) bool {
  9373  	v_1 := v.Args[1]
  9374  	v_0 := v.Args[0]
  9375  	b := v.Block
  9376  	// match: (Neq64F x y)
  9377  	// result: (SETNEF (UCOMISD x y))
  9378  	for {
  9379  		x := v_0
  9380  		y := v_1
  9381  		v.reset(Op386SETNEF)
  9382  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  9383  		v0.AddArg2(x, y)
  9384  		v.AddArg(v0)
  9385  		return true
  9386  	}
  9387  }
  9388  func rewriteValue386_OpNeq8(v *Value) bool {
  9389  	v_1 := v.Args[1]
  9390  	v_0 := v.Args[0]
  9391  	b := v.Block
  9392  	// match: (Neq8 x y)
  9393  	// result: (SETNE (CMPB x y))
  9394  	for {
  9395  		x := v_0
  9396  		y := v_1
  9397  		v.reset(Op386SETNE)
  9398  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9399  		v0.AddArg2(x, y)
  9400  		v.AddArg(v0)
  9401  		return true
  9402  	}
  9403  }
  9404  func rewriteValue386_OpNeqB(v *Value) bool {
  9405  	v_1 := v.Args[1]
  9406  	v_0 := v.Args[0]
  9407  	b := v.Block
  9408  	// match: (NeqB x y)
  9409  	// result: (SETNE (CMPB x y))
  9410  	for {
  9411  		x := v_0
  9412  		y := v_1
  9413  		v.reset(Op386SETNE)
  9414  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9415  		v0.AddArg2(x, y)
  9416  		v.AddArg(v0)
  9417  		return true
  9418  	}
  9419  }
  9420  func rewriteValue386_OpNeqPtr(v *Value) bool {
  9421  	v_1 := v.Args[1]
  9422  	v_0 := v.Args[0]
  9423  	b := v.Block
  9424  	// match: (NeqPtr x y)
  9425  	// result: (SETNE (CMPL x y))
  9426  	for {
  9427  		x := v_0
  9428  		y := v_1
  9429  		v.reset(Op386SETNE)
  9430  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9431  		v0.AddArg2(x, y)
  9432  		v.AddArg(v0)
  9433  		return true
  9434  	}
  9435  }
  9436  func rewriteValue386_OpNot(v *Value) bool {
  9437  	v_0 := v.Args[0]
  9438  	// match: (Not x)
  9439  	// result: (XORLconst [1] x)
  9440  	for {
  9441  		x := v_0
  9442  		v.reset(Op386XORLconst)
  9443  		v.AuxInt = int32ToAuxInt(1)
  9444  		v.AddArg(x)
  9445  		return true
  9446  	}
  9447  }
  9448  func rewriteValue386_OpOffPtr(v *Value) bool {
  9449  	v_0 := v.Args[0]
  9450  	// match: (OffPtr [off] ptr)
  9451  	// result: (ADDLconst [int32(off)] ptr)
  9452  	for {
  9453  		off := auxIntToInt64(v.AuxInt)
  9454  		ptr := v_0
  9455  		v.reset(Op386ADDLconst)
  9456  		v.AuxInt = int32ToAuxInt(int32(off))
  9457  		v.AddArg(ptr)
  9458  		return true
  9459  	}
  9460  }
  9461  func rewriteValue386_OpRsh16Ux16(v *Value) bool {
  9462  	v_1 := v.Args[1]
  9463  	v_0 := v.Args[0]
  9464  	b := v.Block
  9465  	// match: (Rsh16Ux16 <t> x y)
  9466  	// cond: !shiftIsBounded(v)
  9467  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
  9468  	for {
  9469  		t := v.Type
  9470  		x := v_0
  9471  		y := v_1
  9472  		if !(!shiftIsBounded(v)) {
  9473  			break
  9474  		}
  9475  		v.reset(Op386ANDL)
  9476  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
  9477  		v0.AddArg2(x, y)
  9478  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9479  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9480  		v2.AuxInt = int16ToAuxInt(16)
  9481  		v2.AddArg(y)
  9482  		v1.AddArg(v2)
  9483  		v.AddArg2(v0, v1)
  9484  		return true
  9485  	}
  9486  	// match: (Rsh16Ux16 <t> x y)
  9487  	// cond: shiftIsBounded(v)
  9488  	// result: (SHRW <t> x y)
  9489  	for {
  9490  		t := v.Type
  9491  		x := v_0
  9492  		y := v_1
  9493  		if !(shiftIsBounded(v)) {
  9494  			break
  9495  		}
  9496  		v.reset(Op386SHRW)
  9497  		v.Type = t
  9498  		v.AddArg2(x, y)
  9499  		return true
  9500  	}
  9501  	return false
  9502  }
  9503  func rewriteValue386_OpRsh16Ux32(v *Value) bool {
  9504  	v_1 := v.Args[1]
  9505  	v_0 := v.Args[0]
  9506  	b := v.Block
  9507  	// match: (Rsh16Ux32 <t> x y)
  9508  	// cond: !shiftIsBounded(v)
  9509  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
  9510  	for {
  9511  		t := v.Type
  9512  		x := v_0
  9513  		y := v_1
  9514  		if !(!shiftIsBounded(v)) {
  9515  			break
  9516  		}
  9517  		v.reset(Op386ANDL)
  9518  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
  9519  		v0.AddArg2(x, y)
  9520  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9521  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9522  		v2.AuxInt = int32ToAuxInt(16)
  9523  		v2.AddArg(y)
  9524  		v1.AddArg(v2)
  9525  		v.AddArg2(v0, v1)
  9526  		return true
  9527  	}
  9528  	// match: (Rsh16Ux32 <t> x y)
  9529  	// cond: shiftIsBounded(v)
  9530  	// result: (SHRW <t> x y)
  9531  	for {
  9532  		t := v.Type
  9533  		x := v_0
  9534  		y := v_1
  9535  		if !(shiftIsBounded(v)) {
  9536  			break
  9537  		}
  9538  		v.reset(Op386SHRW)
  9539  		v.Type = t
  9540  		v.AddArg2(x, y)
  9541  		return true
  9542  	}
  9543  	return false
  9544  }
  9545  func rewriteValue386_OpRsh16Ux64(v *Value) bool {
  9546  	v_1 := v.Args[1]
  9547  	v_0 := v.Args[0]
  9548  	// match: (Rsh16Ux64 x (Const64 [c]))
  9549  	// cond: uint64(c) < 16
  9550  	// result: (SHRWconst x [int16(c)])
  9551  	for {
  9552  		x := v_0
  9553  		if v_1.Op != OpConst64 {
  9554  			break
  9555  		}
  9556  		c := auxIntToInt64(v_1.AuxInt)
  9557  		if !(uint64(c) < 16) {
  9558  			break
  9559  		}
  9560  		v.reset(Op386SHRWconst)
  9561  		v.AuxInt = int16ToAuxInt(int16(c))
  9562  		v.AddArg(x)
  9563  		return true
  9564  	}
  9565  	// match: (Rsh16Ux64 _ (Const64 [c]))
  9566  	// cond: uint64(c) >= 16
  9567  	// result: (Const16 [0])
  9568  	for {
  9569  		if v_1.Op != OpConst64 {
  9570  			break
  9571  		}
  9572  		c := auxIntToInt64(v_1.AuxInt)
  9573  		if !(uint64(c) >= 16) {
  9574  			break
  9575  		}
  9576  		v.reset(OpConst16)
  9577  		v.AuxInt = int16ToAuxInt(0)
  9578  		return true
  9579  	}
  9580  	return false
  9581  }
  9582  func rewriteValue386_OpRsh16Ux8(v *Value) bool {
  9583  	v_1 := v.Args[1]
  9584  	v_0 := v.Args[0]
  9585  	b := v.Block
  9586  	// match: (Rsh16Ux8 <t> x y)
  9587  	// cond: !shiftIsBounded(v)
  9588  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
  9589  	for {
  9590  		t := v.Type
  9591  		x := v_0
  9592  		y := v_1
  9593  		if !(!shiftIsBounded(v)) {
  9594  			break
  9595  		}
  9596  		v.reset(Op386ANDL)
  9597  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
  9598  		v0.AddArg2(x, y)
  9599  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9600  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9601  		v2.AuxInt = int8ToAuxInt(16)
  9602  		v2.AddArg(y)
  9603  		v1.AddArg(v2)
  9604  		v.AddArg2(v0, v1)
  9605  		return true
  9606  	}
  9607  	// match: (Rsh16Ux8 <t> x y)
  9608  	// cond: shiftIsBounded(v)
  9609  	// result: (SHRW <t> x y)
  9610  	for {
  9611  		t := v.Type
  9612  		x := v_0
  9613  		y := v_1
  9614  		if !(shiftIsBounded(v)) {
  9615  			break
  9616  		}
  9617  		v.reset(Op386SHRW)
  9618  		v.Type = t
  9619  		v.AddArg2(x, y)
  9620  		return true
  9621  	}
  9622  	return false
  9623  }
  9624  func rewriteValue386_OpRsh16x16(v *Value) bool {
  9625  	v_1 := v.Args[1]
  9626  	v_0 := v.Args[0]
  9627  	b := v.Block
  9628  	// match: (Rsh16x16 <t> x y)
  9629  	// cond: !shiftIsBounded(v)
  9630  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
  9631  	for {
  9632  		t := v.Type
  9633  		x := v_0
  9634  		y := v_1
  9635  		if !(!shiftIsBounded(v)) {
  9636  			break
  9637  		}
  9638  		v.reset(Op386SARW)
  9639  		v.Type = t
  9640  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
  9641  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
  9642  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
  9643  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9644  		v3.AuxInt = int16ToAuxInt(16)
  9645  		v3.AddArg(y)
  9646  		v2.AddArg(v3)
  9647  		v1.AddArg(v2)
  9648  		v0.AddArg2(y, v1)
  9649  		v.AddArg2(x, v0)
  9650  		return true
  9651  	}
  9652  	// match: (Rsh16x16 <t> x y)
  9653  	// cond: shiftIsBounded(v)
  9654  	// result: (SARW x y)
  9655  	for {
  9656  		x := v_0
  9657  		y := v_1
  9658  		if !(shiftIsBounded(v)) {
  9659  			break
  9660  		}
  9661  		v.reset(Op386SARW)
  9662  		v.AddArg2(x, y)
  9663  		return true
  9664  	}
  9665  	return false
  9666  }
  9667  func rewriteValue386_OpRsh16x32(v *Value) bool {
  9668  	v_1 := v.Args[1]
  9669  	v_0 := v.Args[0]
  9670  	b := v.Block
  9671  	// match: (Rsh16x32 <t> x y)
  9672  	// cond: !shiftIsBounded(v)
  9673  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
  9674  	for {
  9675  		t := v.Type
  9676  		x := v_0
  9677  		y := v_1
  9678  		if !(!shiftIsBounded(v)) {
  9679  			break
  9680  		}
  9681  		v.reset(Op386SARW)
  9682  		v.Type = t
  9683  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
  9684  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
  9685  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
  9686  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9687  		v3.AuxInt = int32ToAuxInt(16)
  9688  		v3.AddArg(y)
  9689  		v2.AddArg(v3)
  9690  		v1.AddArg(v2)
  9691  		v0.AddArg2(y, v1)
  9692  		v.AddArg2(x, v0)
  9693  		return true
  9694  	}
  9695  	// match: (Rsh16x32 <t> x y)
  9696  	// cond: shiftIsBounded(v)
  9697  	// result: (SARW x y)
  9698  	for {
  9699  		x := v_0
  9700  		y := v_1
  9701  		if !(shiftIsBounded(v)) {
  9702  			break
  9703  		}
  9704  		v.reset(Op386SARW)
  9705  		v.AddArg2(x, y)
  9706  		return true
  9707  	}
  9708  	return false
  9709  }
  9710  func rewriteValue386_OpRsh16x64(v *Value) bool {
  9711  	v_1 := v.Args[1]
  9712  	v_0 := v.Args[0]
  9713  	// match: (Rsh16x64 x (Const64 [c]))
  9714  	// cond: uint64(c) < 16
  9715  	// result: (SARWconst x [int16(c)])
  9716  	for {
  9717  		x := v_0
  9718  		if v_1.Op != OpConst64 {
  9719  			break
  9720  		}
  9721  		c := auxIntToInt64(v_1.AuxInt)
  9722  		if !(uint64(c) < 16) {
  9723  			break
  9724  		}
  9725  		v.reset(Op386SARWconst)
  9726  		v.AuxInt = int16ToAuxInt(int16(c))
  9727  		v.AddArg(x)
  9728  		return true
  9729  	}
  9730  	// match: (Rsh16x64 x (Const64 [c]))
  9731  	// cond: uint64(c) >= 16
  9732  	// result: (SARWconst x [15])
  9733  	for {
  9734  		x := v_0
  9735  		if v_1.Op != OpConst64 {
  9736  			break
  9737  		}
  9738  		c := auxIntToInt64(v_1.AuxInt)
  9739  		if !(uint64(c) >= 16) {
  9740  			break
  9741  		}
  9742  		v.reset(Op386SARWconst)
  9743  		v.AuxInt = int16ToAuxInt(15)
  9744  		v.AddArg(x)
  9745  		return true
  9746  	}
  9747  	return false
  9748  }
  9749  func rewriteValue386_OpRsh16x8(v *Value) bool {
  9750  	v_1 := v.Args[1]
  9751  	v_0 := v.Args[0]
  9752  	b := v.Block
  9753  	// match: (Rsh16x8 <t> x y)
  9754  	// cond: !shiftIsBounded(v)
  9755  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
  9756  	for {
  9757  		t := v.Type
  9758  		x := v_0
  9759  		y := v_1
  9760  		if !(!shiftIsBounded(v)) {
  9761  			break
  9762  		}
  9763  		v.reset(Op386SARW)
  9764  		v.Type = t
  9765  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
  9766  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
  9767  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
  9768  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9769  		v3.AuxInt = int8ToAuxInt(16)
  9770  		v3.AddArg(y)
  9771  		v2.AddArg(v3)
  9772  		v1.AddArg(v2)
  9773  		v0.AddArg2(y, v1)
  9774  		v.AddArg2(x, v0)
  9775  		return true
  9776  	}
  9777  	// match: (Rsh16x8 <t> x y)
  9778  	// cond: shiftIsBounded(v)
  9779  	// result: (SARW x y)
  9780  	for {
  9781  		x := v_0
  9782  		y := v_1
  9783  		if !(shiftIsBounded(v)) {
  9784  			break
  9785  		}
  9786  		v.reset(Op386SARW)
  9787  		v.AddArg2(x, y)
  9788  		return true
  9789  	}
  9790  	return false
  9791  }
  9792  func rewriteValue386_OpRsh32Ux16(v *Value) bool {
  9793  	v_1 := v.Args[1]
  9794  	v_0 := v.Args[0]
  9795  	b := v.Block
  9796  	// match: (Rsh32Ux16 <t> x y)
  9797  	// cond: !shiftIsBounded(v)
  9798  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9799  	for {
  9800  		t := v.Type
  9801  		x := v_0
  9802  		y := v_1
  9803  		if !(!shiftIsBounded(v)) {
  9804  			break
  9805  		}
  9806  		v.reset(Op386ANDL)
  9807  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
  9808  		v0.AddArg2(x, y)
  9809  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9810  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9811  		v2.AuxInt = int16ToAuxInt(32)
  9812  		v2.AddArg(y)
  9813  		v1.AddArg(v2)
  9814  		v.AddArg2(v0, v1)
  9815  		return true
  9816  	}
  9817  	// match: (Rsh32Ux16 <t> x y)
  9818  	// cond: shiftIsBounded(v)
  9819  	// result: (SHRL <t> x y)
  9820  	for {
  9821  		t := v.Type
  9822  		x := v_0
  9823  		y := v_1
  9824  		if !(shiftIsBounded(v)) {
  9825  			break
  9826  		}
  9827  		v.reset(Op386SHRL)
  9828  		v.Type = t
  9829  		v.AddArg2(x, y)
  9830  		return true
  9831  	}
  9832  	return false
  9833  }
  9834  func rewriteValue386_OpRsh32Ux32(v *Value) bool {
  9835  	v_1 := v.Args[1]
  9836  	v_0 := v.Args[0]
  9837  	b := v.Block
  9838  	// match: (Rsh32Ux32 <t> x y)
  9839  	// cond: !shiftIsBounded(v)
  9840  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9841  	for {
  9842  		t := v.Type
  9843  		x := v_0
  9844  		y := v_1
  9845  		if !(!shiftIsBounded(v)) {
  9846  			break
  9847  		}
  9848  		v.reset(Op386ANDL)
  9849  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
  9850  		v0.AddArg2(x, y)
  9851  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9852  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9853  		v2.AuxInt = int32ToAuxInt(32)
  9854  		v2.AddArg(y)
  9855  		v1.AddArg(v2)
  9856  		v.AddArg2(v0, v1)
  9857  		return true
  9858  	}
  9859  	// match: (Rsh32Ux32 <t> x y)
  9860  	// cond: shiftIsBounded(v)
  9861  	// result: (SHRL <t> x y)
  9862  	for {
  9863  		t := v.Type
  9864  		x := v_0
  9865  		y := v_1
  9866  		if !(shiftIsBounded(v)) {
  9867  			break
  9868  		}
  9869  		v.reset(Op386SHRL)
  9870  		v.Type = t
  9871  		v.AddArg2(x, y)
  9872  		return true
  9873  	}
  9874  	return false
  9875  }
  9876  func rewriteValue386_OpRsh32Ux64(v *Value) bool {
  9877  	v_1 := v.Args[1]
  9878  	v_0 := v.Args[0]
  9879  	// match: (Rsh32Ux64 x (Const64 [c]))
  9880  	// cond: uint64(c) < 32
  9881  	// result: (SHRLconst x [int32(c)])
  9882  	for {
  9883  		x := v_0
  9884  		if v_1.Op != OpConst64 {
  9885  			break
  9886  		}
  9887  		c := auxIntToInt64(v_1.AuxInt)
  9888  		if !(uint64(c) < 32) {
  9889  			break
  9890  		}
  9891  		v.reset(Op386SHRLconst)
  9892  		v.AuxInt = int32ToAuxInt(int32(c))
  9893  		v.AddArg(x)
  9894  		return true
  9895  	}
  9896  	// match: (Rsh32Ux64 _ (Const64 [c]))
  9897  	// cond: uint64(c) >= 32
  9898  	// result: (Const32 [0])
  9899  	for {
  9900  		if v_1.Op != OpConst64 {
  9901  			break
  9902  		}
  9903  		c := auxIntToInt64(v_1.AuxInt)
  9904  		if !(uint64(c) >= 32) {
  9905  			break
  9906  		}
  9907  		v.reset(OpConst32)
  9908  		v.AuxInt = int32ToAuxInt(0)
  9909  		return true
  9910  	}
  9911  	return false
  9912  }
  9913  func rewriteValue386_OpRsh32Ux8(v *Value) bool {
  9914  	v_1 := v.Args[1]
  9915  	v_0 := v.Args[0]
  9916  	b := v.Block
  9917  	// match: (Rsh32Ux8 <t> x y)
  9918  	// cond: !shiftIsBounded(v)
  9919  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9920  	for {
  9921  		t := v.Type
  9922  		x := v_0
  9923  		y := v_1
  9924  		if !(!shiftIsBounded(v)) {
  9925  			break
  9926  		}
  9927  		v.reset(Op386ANDL)
  9928  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
  9929  		v0.AddArg2(x, y)
  9930  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9931  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9932  		v2.AuxInt = int8ToAuxInt(32)
  9933  		v2.AddArg(y)
  9934  		v1.AddArg(v2)
  9935  		v.AddArg2(v0, v1)
  9936  		return true
  9937  	}
  9938  	// match: (Rsh32Ux8 <t> x y)
  9939  	// cond: shiftIsBounded(v)
  9940  	// result: (SHRL <t> x y)
  9941  	for {
  9942  		t := v.Type
  9943  		x := v_0
  9944  		y := v_1
  9945  		if !(shiftIsBounded(v)) {
  9946  			break
  9947  		}
  9948  		v.reset(Op386SHRL)
  9949  		v.Type = t
  9950  		v.AddArg2(x, y)
  9951  		return true
  9952  	}
  9953  	return false
  9954  }
  9955  func rewriteValue386_OpRsh32x16(v *Value) bool {
  9956  	v_1 := v.Args[1]
  9957  	v_0 := v.Args[0]
  9958  	b := v.Block
  9959  	// match: (Rsh32x16 <t> x y)
  9960  	// cond: !shiftIsBounded(v)
  9961  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
  9962  	for {
  9963  		t := v.Type
  9964  		x := v_0
  9965  		y := v_1
  9966  		if !(!shiftIsBounded(v)) {
  9967  			break
  9968  		}
  9969  		v.reset(Op386SARL)
  9970  		v.Type = t
  9971  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
  9972  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
  9973  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
  9974  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9975  		v3.AuxInt = int16ToAuxInt(32)
  9976  		v3.AddArg(y)
  9977  		v2.AddArg(v3)
  9978  		v1.AddArg(v2)
  9979  		v0.AddArg2(y, v1)
  9980  		v.AddArg2(x, v0)
  9981  		return true
  9982  	}
  9983  	// match: (Rsh32x16 <t> x y)
  9984  	// cond: shiftIsBounded(v)
  9985  	// result: (SARL x y)
  9986  	for {
  9987  		x := v_0
  9988  		y := v_1
  9989  		if !(shiftIsBounded(v)) {
  9990  			break
  9991  		}
  9992  		v.reset(Op386SARL)
  9993  		v.AddArg2(x, y)
  9994  		return true
  9995  	}
  9996  	return false
  9997  }
  9998  func rewriteValue386_OpRsh32x32(v *Value) bool {
  9999  	v_1 := v.Args[1]
 10000  	v_0 := v.Args[0]
 10001  	b := v.Block
 10002  	// match: (Rsh32x32 <t> x y)
 10003  	// cond: !shiftIsBounded(v)
 10004  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 10005  	for {
 10006  		t := v.Type
 10007  		x := v_0
 10008  		y := v_1
 10009  		if !(!shiftIsBounded(v)) {
 10010  			break
 10011  		}
 10012  		v.reset(Op386SARL)
 10013  		v.Type = t
 10014  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10015  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10016  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10017  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10018  		v3.AuxInt = int32ToAuxInt(32)
 10019  		v3.AddArg(y)
 10020  		v2.AddArg(v3)
 10021  		v1.AddArg(v2)
 10022  		v0.AddArg2(y, v1)
 10023  		v.AddArg2(x, v0)
 10024  		return true
 10025  	}
 10026  	// match: (Rsh32x32 <t> x y)
 10027  	// cond: shiftIsBounded(v)
 10028  	// result: (SARL x y)
 10029  	for {
 10030  		x := v_0
 10031  		y := v_1
 10032  		if !(shiftIsBounded(v)) {
 10033  			break
 10034  		}
 10035  		v.reset(Op386SARL)
 10036  		v.AddArg2(x, y)
 10037  		return true
 10038  	}
 10039  	return false
 10040  }
 10041  func rewriteValue386_OpRsh32x64(v *Value) bool {
 10042  	v_1 := v.Args[1]
 10043  	v_0 := v.Args[0]
 10044  	// match: (Rsh32x64 x (Const64 [c]))
 10045  	// cond: uint64(c) < 32
 10046  	// result: (SARLconst x [int32(c)])
 10047  	for {
 10048  		x := v_0
 10049  		if v_1.Op != OpConst64 {
 10050  			break
 10051  		}
 10052  		c := auxIntToInt64(v_1.AuxInt)
 10053  		if !(uint64(c) < 32) {
 10054  			break
 10055  		}
 10056  		v.reset(Op386SARLconst)
 10057  		v.AuxInt = int32ToAuxInt(int32(c))
 10058  		v.AddArg(x)
 10059  		return true
 10060  	}
 10061  	// match: (Rsh32x64 x (Const64 [c]))
 10062  	// cond: uint64(c) >= 32
 10063  	// result: (SARLconst x [31])
 10064  	for {
 10065  		x := v_0
 10066  		if v_1.Op != OpConst64 {
 10067  			break
 10068  		}
 10069  		c := auxIntToInt64(v_1.AuxInt)
 10070  		if !(uint64(c) >= 32) {
 10071  			break
 10072  		}
 10073  		v.reset(Op386SARLconst)
 10074  		v.AuxInt = int32ToAuxInt(31)
 10075  		v.AddArg(x)
 10076  		return true
 10077  	}
 10078  	return false
 10079  }
 10080  func rewriteValue386_OpRsh32x8(v *Value) bool {
 10081  	v_1 := v.Args[1]
 10082  	v_0 := v.Args[0]
 10083  	b := v.Block
 10084  	// match: (Rsh32x8 <t> x y)
 10085  	// cond: !shiftIsBounded(v)
 10086  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 10087  	for {
 10088  		t := v.Type
 10089  		x := v_0
 10090  		y := v_1
 10091  		if !(!shiftIsBounded(v)) {
 10092  			break
 10093  		}
 10094  		v.reset(Op386SARL)
 10095  		v.Type = t
 10096  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10097  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10098  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10099  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10100  		v3.AuxInt = int8ToAuxInt(32)
 10101  		v3.AddArg(y)
 10102  		v2.AddArg(v3)
 10103  		v1.AddArg(v2)
 10104  		v0.AddArg2(y, v1)
 10105  		v.AddArg2(x, v0)
 10106  		return true
 10107  	}
 10108  	// match: (Rsh32x8 <t> x y)
 10109  	// cond: shiftIsBounded(v)
 10110  	// result: (SARL x y)
 10111  	for {
 10112  		x := v_0
 10113  		y := v_1
 10114  		if !(shiftIsBounded(v)) {
 10115  			break
 10116  		}
 10117  		v.reset(Op386SARL)
 10118  		v.AddArg2(x, y)
 10119  		return true
 10120  	}
 10121  	return false
 10122  }
 10123  func rewriteValue386_OpRsh8Ux16(v *Value) bool {
 10124  	v_1 := v.Args[1]
 10125  	v_0 := v.Args[0]
 10126  	b := v.Block
 10127  	// match: (Rsh8Ux16 <t> x y)
 10128  	// cond: !shiftIsBounded(v)
 10129  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 10130  	for {
 10131  		t := v.Type
 10132  		x := v_0
 10133  		y := v_1
 10134  		if !(!shiftIsBounded(v)) {
 10135  			break
 10136  		}
 10137  		v.reset(Op386ANDL)
 10138  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 10139  		v0.AddArg2(x, y)
 10140  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10141  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10142  		v2.AuxInt = int16ToAuxInt(8)
 10143  		v2.AddArg(y)
 10144  		v1.AddArg(v2)
 10145  		v.AddArg2(v0, v1)
 10146  		return true
 10147  	}
 10148  	// match: (Rsh8Ux16 <t> x y)
 10149  	// cond: shiftIsBounded(v)
 10150  	// result: (SHRB <t> x y)
 10151  	for {
 10152  		t := v.Type
 10153  		x := v_0
 10154  		y := v_1
 10155  		if !(shiftIsBounded(v)) {
 10156  			break
 10157  		}
 10158  		v.reset(Op386SHRB)
 10159  		v.Type = t
 10160  		v.AddArg2(x, y)
 10161  		return true
 10162  	}
 10163  	return false
 10164  }
 10165  func rewriteValue386_OpRsh8Ux32(v *Value) bool {
 10166  	v_1 := v.Args[1]
 10167  	v_0 := v.Args[0]
 10168  	b := v.Block
 10169  	// match: (Rsh8Ux32 <t> x y)
 10170  	// cond: !shiftIsBounded(v)
 10171  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 10172  	for {
 10173  		t := v.Type
 10174  		x := v_0
 10175  		y := v_1
 10176  		if !(!shiftIsBounded(v)) {
 10177  			break
 10178  		}
 10179  		v.reset(Op386ANDL)
 10180  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 10181  		v0.AddArg2(x, y)
 10182  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10183  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10184  		v2.AuxInt = int32ToAuxInt(8)
 10185  		v2.AddArg(y)
 10186  		v1.AddArg(v2)
 10187  		v.AddArg2(v0, v1)
 10188  		return true
 10189  	}
 10190  	// match: (Rsh8Ux32 <t> x y)
 10191  	// cond: shiftIsBounded(v)
 10192  	// result: (SHRB <t> x y)
 10193  	for {
 10194  		t := v.Type
 10195  		x := v_0
 10196  		y := v_1
 10197  		if !(shiftIsBounded(v)) {
 10198  			break
 10199  		}
 10200  		v.reset(Op386SHRB)
 10201  		v.Type = t
 10202  		v.AddArg2(x, y)
 10203  		return true
 10204  	}
 10205  	return false
 10206  }
 10207  func rewriteValue386_OpRsh8Ux64(v *Value) bool {
 10208  	v_1 := v.Args[1]
 10209  	v_0 := v.Args[0]
 10210  	// match: (Rsh8Ux64 x (Const64 [c]))
 10211  	// cond: uint64(c) < 8
 10212  	// result: (SHRBconst x [int8(c)])
 10213  	for {
 10214  		x := v_0
 10215  		if v_1.Op != OpConst64 {
 10216  			break
 10217  		}
 10218  		c := auxIntToInt64(v_1.AuxInt)
 10219  		if !(uint64(c) < 8) {
 10220  			break
 10221  		}
 10222  		v.reset(Op386SHRBconst)
 10223  		v.AuxInt = int8ToAuxInt(int8(c))
 10224  		v.AddArg(x)
 10225  		return true
 10226  	}
 10227  	// match: (Rsh8Ux64 _ (Const64 [c]))
 10228  	// cond: uint64(c) >= 8
 10229  	// result: (Const8 [0])
 10230  	for {
 10231  		if v_1.Op != OpConst64 {
 10232  			break
 10233  		}
 10234  		c := auxIntToInt64(v_1.AuxInt)
 10235  		if !(uint64(c) >= 8) {
 10236  			break
 10237  		}
 10238  		v.reset(OpConst8)
 10239  		v.AuxInt = int8ToAuxInt(0)
 10240  		return true
 10241  	}
 10242  	return false
 10243  }
 10244  func rewriteValue386_OpRsh8Ux8(v *Value) bool {
 10245  	v_1 := v.Args[1]
 10246  	v_0 := v.Args[0]
 10247  	b := v.Block
 10248  	// match: (Rsh8Ux8 <t> x y)
 10249  	// cond: !shiftIsBounded(v)
 10250  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 10251  	for {
 10252  		t := v.Type
 10253  		x := v_0
 10254  		y := v_1
 10255  		if !(!shiftIsBounded(v)) {
 10256  			break
 10257  		}
 10258  		v.reset(Op386ANDL)
 10259  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 10260  		v0.AddArg2(x, y)
 10261  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10262  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10263  		v2.AuxInt = int8ToAuxInt(8)
 10264  		v2.AddArg(y)
 10265  		v1.AddArg(v2)
 10266  		v.AddArg2(v0, v1)
 10267  		return true
 10268  	}
 10269  	// match: (Rsh8Ux8 <t> x y)
 10270  	// cond: shiftIsBounded(v)
 10271  	// result: (SHRB <t> x y)
 10272  	for {
 10273  		t := v.Type
 10274  		x := v_0
 10275  		y := v_1
 10276  		if !(shiftIsBounded(v)) {
 10277  			break
 10278  		}
 10279  		v.reset(Op386SHRB)
 10280  		v.Type = t
 10281  		v.AddArg2(x, y)
 10282  		return true
 10283  	}
 10284  	return false
 10285  }
 10286  func rewriteValue386_OpRsh8x16(v *Value) bool {
 10287  	v_1 := v.Args[1]
 10288  	v_0 := v.Args[0]
 10289  	b := v.Block
 10290  	// match: (Rsh8x16 <t> x y)
 10291  	// cond: !shiftIsBounded(v)
 10292  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 10293  	for {
 10294  		t := v.Type
 10295  		x := v_0
 10296  		y := v_1
 10297  		if !(!shiftIsBounded(v)) {
 10298  			break
 10299  		}
 10300  		v.reset(Op386SARB)
 10301  		v.Type = t
 10302  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10303  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10304  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10305  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10306  		v3.AuxInt = int16ToAuxInt(8)
 10307  		v3.AddArg(y)
 10308  		v2.AddArg(v3)
 10309  		v1.AddArg(v2)
 10310  		v0.AddArg2(y, v1)
 10311  		v.AddArg2(x, v0)
 10312  		return true
 10313  	}
 10314  	// match: (Rsh8x16 <t> x y)
 10315  	// cond: shiftIsBounded(v)
 10316  	// result: (SARB x y)
 10317  	for {
 10318  		x := v_0
 10319  		y := v_1
 10320  		if !(shiftIsBounded(v)) {
 10321  			break
 10322  		}
 10323  		v.reset(Op386SARB)
 10324  		v.AddArg2(x, y)
 10325  		return true
 10326  	}
 10327  	return false
 10328  }
 10329  func rewriteValue386_OpRsh8x32(v *Value) bool {
 10330  	v_1 := v.Args[1]
 10331  	v_0 := v.Args[0]
 10332  	b := v.Block
 10333  	// match: (Rsh8x32 <t> x y)
 10334  	// cond: !shiftIsBounded(v)
 10335  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 10336  	for {
 10337  		t := v.Type
 10338  		x := v_0
 10339  		y := v_1
 10340  		if !(!shiftIsBounded(v)) {
 10341  			break
 10342  		}
 10343  		v.reset(Op386SARB)
 10344  		v.Type = t
 10345  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10346  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10347  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10348  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10349  		v3.AuxInt = int32ToAuxInt(8)
 10350  		v3.AddArg(y)
 10351  		v2.AddArg(v3)
 10352  		v1.AddArg(v2)
 10353  		v0.AddArg2(y, v1)
 10354  		v.AddArg2(x, v0)
 10355  		return true
 10356  	}
 10357  	// match: (Rsh8x32 <t> x y)
 10358  	// cond: shiftIsBounded(v)
 10359  	// result: (SARB x y)
 10360  	for {
 10361  		x := v_0
 10362  		y := v_1
 10363  		if !(shiftIsBounded(v)) {
 10364  			break
 10365  		}
 10366  		v.reset(Op386SARB)
 10367  		v.AddArg2(x, y)
 10368  		return true
 10369  	}
 10370  	return false
 10371  }
 10372  func rewriteValue386_OpRsh8x64(v *Value) bool {
 10373  	v_1 := v.Args[1]
 10374  	v_0 := v.Args[0]
 10375  	// match: (Rsh8x64 x (Const64 [c]))
 10376  	// cond: uint64(c) < 8
 10377  	// result: (SARBconst x [int8(c)])
 10378  	for {
 10379  		x := v_0
 10380  		if v_1.Op != OpConst64 {
 10381  			break
 10382  		}
 10383  		c := auxIntToInt64(v_1.AuxInt)
 10384  		if !(uint64(c) < 8) {
 10385  			break
 10386  		}
 10387  		v.reset(Op386SARBconst)
 10388  		v.AuxInt = int8ToAuxInt(int8(c))
 10389  		v.AddArg(x)
 10390  		return true
 10391  	}
 10392  	// match: (Rsh8x64 x (Const64 [c]))
 10393  	// cond: uint64(c) >= 8
 10394  	// result: (SARBconst x [7])
 10395  	for {
 10396  		x := v_0
 10397  		if v_1.Op != OpConst64 {
 10398  			break
 10399  		}
 10400  		c := auxIntToInt64(v_1.AuxInt)
 10401  		if !(uint64(c) >= 8) {
 10402  			break
 10403  		}
 10404  		v.reset(Op386SARBconst)
 10405  		v.AuxInt = int8ToAuxInt(7)
 10406  		v.AddArg(x)
 10407  		return true
 10408  	}
 10409  	return false
 10410  }
 10411  func rewriteValue386_OpRsh8x8(v *Value) bool {
 10412  	v_1 := v.Args[1]
 10413  	v_0 := v.Args[0]
 10414  	b := v.Block
 10415  	// match: (Rsh8x8 <t> x y)
 10416  	// cond: !shiftIsBounded(v)
 10417  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 10418  	for {
 10419  		t := v.Type
 10420  		x := v_0
 10421  		y := v_1
 10422  		if !(!shiftIsBounded(v)) {
 10423  			break
 10424  		}
 10425  		v.reset(Op386SARB)
 10426  		v.Type = t
 10427  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10428  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10429  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10430  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10431  		v3.AuxInt = int8ToAuxInt(8)
 10432  		v3.AddArg(y)
 10433  		v2.AddArg(v3)
 10434  		v1.AddArg(v2)
 10435  		v0.AddArg2(y, v1)
 10436  		v.AddArg2(x, v0)
 10437  		return true
 10438  	}
 10439  	// match: (Rsh8x8 <t> x y)
 10440  	// cond: shiftIsBounded(v)
 10441  	// result: (SARB x y)
 10442  	for {
 10443  		x := v_0
 10444  		y := v_1
 10445  		if !(shiftIsBounded(v)) {
 10446  			break
 10447  		}
 10448  		v.reset(Op386SARB)
 10449  		v.AddArg2(x, y)
 10450  		return true
 10451  	}
 10452  	return false
 10453  }
 10454  func rewriteValue386_OpSelect0(v *Value) bool {
 10455  	v_0 := v.Args[0]
 10456  	b := v.Block
 10457  	typ := &b.Func.Config.Types
 10458  	// match: (Select0 (Mul32uover x y))
 10459  	// result: (Select0 <typ.UInt32> (MULLU x y))
 10460  	for {
 10461  		if v_0.Op != OpMul32uover {
 10462  			break
 10463  		}
 10464  		y := v_0.Args[1]
 10465  		x := v_0.Args[0]
 10466  		v.reset(OpSelect0)
 10467  		v.Type = typ.UInt32
 10468  		v0 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 10469  		v0.AddArg2(x, y)
 10470  		v.AddArg(v0)
 10471  		return true
 10472  	}
 10473  	return false
 10474  }
 10475  func rewriteValue386_OpSelect1(v *Value) bool {
 10476  	v_0 := v.Args[0]
 10477  	b := v.Block
 10478  	typ := &b.Func.Config.Types
 10479  	// match: (Select1 (Mul32uover x y))
 10480  	// result: (SETO (Select1 <types.TypeFlags> (MULLU x y)))
 10481  	for {
 10482  		if v_0.Op != OpMul32uover {
 10483  			break
 10484  		}
 10485  		y := v_0.Args[1]
 10486  		x := v_0.Args[0]
 10487  		v.reset(Op386SETO)
 10488  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 10489  		v1 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 10490  		v1.AddArg2(x, y)
 10491  		v0.AddArg(v1)
 10492  		v.AddArg(v0)
 10493  		return true
 10494  	}
 10495  	return false
 10496  }
 10497  func rewriteValue386_OpSignmask(v *Value) bool {
 10498  	v_0 := v.Args[0]
 10499  	// match: (Signmask x)
 10500  	// result: (SARLconst x [31])
 10501  	for {
 10502  		x := v_0
 10503  		v.reset(Op386SARLconst)
 10504  		v.AuxInt = int32ToAuxInt(31)
 10505  		v.AddArg(x)
 10506  		return true
 10507  	}
 10508  }
 10509  func rewriteValue386_OpSlicemask(v *Value) bool {
 10510  	v_0 := v.Args[0]
 10511  	b := v.Block
 10512  	// match: (Slicemask <t> x)
 10513  	// result: (SARLconst (NEGL <t> x) [31])
 10514  	for {
 10515  		t := v.Type
 10516  		x := v_0
 10517  		v.reset(Op386SARLconst)
 10518  		v.AuxInt = int32ToAuxInt(31)
 10519  		v0 := b.NewValue0(v.Pos, Op386NEGL, t)
 10520  		v0.AddArg(x)
 10521  		v.AddArg(v0)
 10522  		return true
 10523  	}
 10524  }
 10525  func rewriteValue386_OpStore(v *Value) bool {
 10526  	v_2 := v.Args[2]
 10527  	v_1 := v.Args[1]
 10528  	v_0 := v.Args[0]
 10529  	// match: (Store {t} ptr val mem)
 10530  	// cond: t.Size() == 8 && t.IsFloat()
 10531  	// result: (MOVSDstore ptr val mem)
 10532  	for {
 10533  		t := auxToType(v.Aux)
 10534  		ptr := v_0
 10535  		val := v_1
 10536  		mem := v_2
 10537  		if !(t.Size() == 8 && t.IsFloat()) {
 10538  			break
 10539  		}
 10540  		v.reset(Op386MOVSDstore)
 10541  		v.AddArg3(ptr, val, mem)
 10542  		return true
 10543  	}
 10544  	// match: (Store {t} ptr val mem)
 10545  	// cond: t.Size() == 4 && t.IsFloat()
 10546  	// result: (MOVSSstore ptr val mem)
 10547  	for {
 10548  		t := auxToType(v.Aux)
 10549  		ptr := v_0
 10550  		val := v_1
 10551  		mem := v_2
 10552  		if !(t.Size() == 4 && t.IsFloat()) {
 10553  			break
 10554  		}
 10555  		v.reset(Op386MOVSSstore)
 10556  		v.AddArg3(ptr, val, mem)
 10557  		return true
 10558  	}
 10559  	// match: (Store {t} ptr val mem)
 10560  	// cond: t.Size() == 4 && !t.IsFloat()
 10561  	// result: (MOVLstore ptr val mem)
 10562  	for {
 10563  		t := auxToType(v.Aux)
 10564  		ptr := v_0
 10565  		val := v_1
 10566  		mem := v_2
 10567  		if !(t.Size() == 4 && !t.IsFloat()) {
 10568  			break
 10569  		}
 10570  		v.reset(Op386MOVLstore)
 10571  		v.AddArg3(ptr, val, mem)
 10572  		return true
 10573  	}
 10574  	// match: (Store {t} ptr val mem)
 10575  	// cond: t.Size() == 2
 10576  	// result: (MOVWstore ptr val mem)
 10577  	for {
 10578  		t := auxToType(v.Aux)
 10579  		ptr := v_0
 10580  		val := v_1
 10581  		mem := v_2
 10582  		if !(t.Size() == 2) {
 10583  			break
 10584  		}
 10585  		v.reset(Op386MOVWstore)
 10586  		v.AddArg3(ptr, val, mem)
 10587  		return true
 10588  	}
 10589  	// match: (Store {t} ptr val mem)
 10590  	// cond: t.Size() == 1
 10591  	// result: (MOVBstore ptr val mem)
 10592  	for {
 10593  		t := auxToType(v.Aux)
 10594  		ptr := v_0
 10595  		val := v_1
 10596  		mem := v_2
 10597  		if !(t.Size() == 1) {
 10598  			break
 10599  		}
 10600  		v.reset(Op386MOVBstore)
 10601  		v.AddArg3(ptr, val, mem)
 10602  		return true
 10603  	}
 10604  	return false
 10605  }
 10606  func rewriteValue386_OpZero(v *Value) bool {
 10607  	v_1 := v.Args[1]
 10608  	v_0 := v.Args[0]
 10609  	b := v.Block
 10610  	typ := &b.Func.Config.Types
 10611  	// match: (Zero [0] _ mem)
 10612  	// result: mem
 10613  	for {
 10614  		if auxIntToInt64(v.AuxInt) != 0 {
 10615  			break
 10616  		}
 10617  		mem := v_1
 10618  		v.copyOf(mem)
 10619  		return true
 10620  	}
 10621  	// match: (Zero [1] destptr mem)
 10622  	// result: (MOVBstoreconst [0] destptr mem)
 10623  	for {
 10624  		if auxIntToInt64(v.AuxInt) != 1 {
 10625  			break
 10626  		}
 10627  		destptr := v_0
 10628  		mem := v_1
 10629  		v.reset(Op386MOVBstoreconst)
 10630  		v.AuxInt = valAndOffToAuxInt(0)
 10631  		v.AddArg2(destptr, mem)
 10632  		return true
 10633  	}
 10634  	// match: (Zero [2] destptr mem)
 10635  	// result: (MOVWstoreconst [0] destptr mem)
 10636  	for {
 10637  		if auxIntToInt64(v.AuxInt) != 2 {
 10638  			break
 10639  		}
 10640  		destptr := v_0
 10641  		mem := v_1
 10642  		v.reset(Op386MOVWstoreconst)
 10643  		v.AuxInt = valAndOffToAuxInt(0)
 10644  		v.AddArg2(destptr, mem)
 10645  		return true
 10646  	}
 10647  	// match: (Zero [4] destptr mem)
 10648  	// result: (MOVLstoreconst [0] destptr mem)
 10649  	for {
 10650  		if auxIntToInt64(v.AuxInt) != 4 {
 10651  			break
 10652  		}
 10653  		destptr := v_0
 10654  		mem := v_1
 10655  		v.reset(Op386MOVLstoreconst)
 10656  		v.AuxInt = valAndOffToAuxInt(0)
 10657  		v.AddArg2(destptr, mem)
 10658  		return true
 10659  	}
 10660  	// match: (Zero [3] destptr mem)
 10661  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr (MOVWstoreconst [makeValAndOff(0,0)] destptr mem))
 10662  	for {
 10663  		if auxIntToInt64(v.AuxInt) != 3 {
 10664  			break
 10665  		}
 10666  		destptr := v_0
 10667  		mem := v_1
 10668  		v.reset(Op386MOVBstoreconst)
 10669  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 2))
 10670  		v0 := b.NewValue0(v.Pos, Op386MOVWstoreconst, types.TypeMem)
 10671  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10672  		v0.AddArg2(destptr, mem)
 10673  		v.AddArg2(destptr, v0)
 10674  		return true
 10675  	}
 10676  	// match: (Zero [5] destptr mem)
 10677  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 10678  	for {
 10679  		if auxIntToInt64(v.AuxInt) != 5 {
 10680  			break
 10681  		}
 10682  		destptr := v_0
 10683  		mem := v_1
 10684  		v.reset(Op386MOVBstoreconst)
 10685  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 10686  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10687  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10688  		v0.AddArg2(destptr, mem)
 10689  		v.AddArg2(destptr, v0)
 10690  		return true
 10691  	}
 10692  	// match: (Zero [6] destptr mem)
 10693  	// result: (MOVWstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 10694  	for {
 10695  		if auxIntToInt64(v.AuxInt) != 6 {
 10696  			break
 10697  		}
 10698  		destptr := v_0
 10699  		mem := v_1
 10700  		v.reset(Op386MOVWstoreconst)
 10701  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 10702  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10703  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10704  		v0.AddArg2(destptr, mem)
 10705  		v.AddArg2(destptr, v0)
 10706  		return true
 10707  	}
 10708  	// match: (Zero [7] destptr mem)
 10709  	// result: (MOVLstoreconst [makeValAndOff(0,3)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 10710  	for {
 10711  		if auxIntToInt64(v.AuxInt) != 7 {
 10712  			break
 10713  		}
 10714  		destptr := v_0
 10715  		mem := v_1
 10716  		v.reset(Op386MOVLstoreconst)
 10717  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 3))
 10718  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10719  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10720  		v0.AddArg2(destptr, mem)
 10721  		v.AddArg2(destptr, v0)
 10722  		return true
 10723  	}
 10724  	// match: (Zero [s] destptr mem)
 10725  	// cond: s%4 != 0 && s > 4
 10726  	// result: (Zero [s-s%4] (ADDLconst destptr [int32(s%4)]) (MOVLstoreconst [0] destptr mem))
 10727  	for {
 10728  		s := auxIntToInt64(v.AuxInt)
 10729  		destptr := v_0
 10730  		mem := v_1
 10731  		if !(s%4 != 0 && s > 4) {
 10732  			break
 10733  		}
 10734  		v.reset(OpZero)
 10735  		v.AuxInt = int64ToAuxInt(s - s%4)
 10736  		v0 := b.NewValue0(v.Pos, Op386ADDLconst, typ.UInt32)
 10737  		v0.AuxInt = int32ToAuxInt(int32(s % 4))
 10738  		v0.AddArg(destptr)
 10739  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10740  		v1.AuxInt = valAndOffToAuxInt(0)
 10741  		v1.AddArg2(destptr, mem)
 10742  		v.AddArg2(v0, v1)
 10743  		return true
 10744  	}
 10745  	// match: (Zero [8] destptr mem)
 10746  	// result: (MOVLstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 10747  	for {
 10748  		if auxIntToInt64(v.AuxInt) != 8 {
 10749  			break
 10750  		}
 10751  		destptr := v_0
 10752  		mem := v_1
 10753  		v.reset(Op386MOVLstoreconst)
 10754  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 10755  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10756  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10757  		v0.AddArg2(destptr, mem)
 10758  		v.AddArg2(destptr, v0)
 10759  		return true
 10760  	}
 10761  	// match: (Zero [12] destptr mem)
 10762  	// result: (MOVLstoreconst [makeValAndOff(0,8)] destptr (MOVLstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem)))
 10763  	for {
 10764  		if auxIntToInt64(v.AuxInt) != 12 {
 10765  			break
 10766  		}
 10767  		destptr := v_0
 10768  		mem := v_1
 10769  		v.reset(Op386MOVLstoreconst)
 10770  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 8))
 10771  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10772  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 10773  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10774  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10775  		v1.AddArg2(destptr, mem)
 10776  		v0.AddArg2(destptr, v1)
 10777  		v.AddArg2(destptr, v0)
 10778  		return true
 10779  	}
 10780  	// match: (Zero [16] destptr mem)
 10781  	// result: (MOVLstoreconst [makeValAndOff(0,12)] destptr (MOVLstoreconst [makeValAndOff(0,8)] destptr (MOVLstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))))
 10782  	for {
 10783  		if auxIntToInt64(v.AuxInt) != 16 {
 10784  			break
 10785  		}
 10786  		destptr := v_0
 10787  		mem := v_1
 10788  		v.reset(Op386MOVLstoreconst)
 10789  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 12))
 10790  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10791  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 8))
 10792  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10793  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 10794  		v2 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 10795  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 10796  		v2.AddArg2(destptr, mem)
 10797  		v1.AddArg2(destptr, v2)
 10798  		v0.AddArg2(destptr, v1)
 10799  		v.AddArg2(destptr, v0)
 10800  		return true
 10801  	}
 10802  	// match: (Zero [s] destptr mem)
 10803  	// cond: s > 16 && s <= 4*128 && s%4 == 0
 10804  	// result: (DUFFZERO [1*(128-s/4)] destptr (MOVLconst [0]) mem)
 10805  	for {
 10806  		s := auxIntToInt64(v.AuxInt)
 10807  		destptr := v_0
 10808  		mem := v_1
 10809  		if !(s > 16 && s <= 4*128 && s%4 == 0) {
 10810  			break
 10811  		}
 10812  		v.reset(Op386DUFFZERO)
 10813  		v.AuxInt = int64ToAuxInt(1 * (128 - s/4))
 10814  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 10815  		v0.AuxInt = int32ToAuxInt(0)
 10816  		v.AddArg3(destptr, v0, mem)
 10817  		return true
 10818  	}
 10819  	// match: (Zero [s] destptr mem)
 10820  	// cond: s > 4*128 && s%4 == 0
 10821  	// result: (REPSTOSL destptr (MOVLconst [int32(s/4)]) (MOVLconst [0]) mem)
 10822  	for {
 10823  		s := auxIntToInt64(v.AuxInt)
 10824  		destptr := v_0
 10825  		mem := v_1
 10826  		if !(s > 4*128 && s%4 == 0) {
 10827  			break
 10828  		}
 10829  		v.reset(Op386REPSTOSL)
 10830  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 10831  		v0.AuxInt = int32ToAuxInt(int32(s / 4))
 10832  		v1 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 10833  		v1.AuxInt = int32ToAuxInt(0)
 10834  		v.AddArg4(destptr, v0, v1, mem)
 10835  		return true
 10836  	}
 10837  	return false
 10838  }
 10839  func rewriteValue386_OpZeromask(v *Value) bool {
 10840  	v_0 := v.Args[0]
 10841  	b := v.Block
 10842  	// match: (Zeromask <t> x)
 10843  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPLconst x [1])))
 10844  	for {
 10845  		t := v.Type
 10846  		x := v_0
 10847  		v.reset(Op386XORLconst)
 10848  		v.AuxInt = int32ToAuxInt(-1)
 10849  		v0 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10850  		v1 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10851  		v1.AuxInt = int32ToAuxInt(1)
 10852  		v1.AddArg(x)
 10853  		v0.AddArg(v1)
 10854  		v.AddArg(v0)
 10855  		return true
 10856  	}
 10857  }
 10858  func rewriteBlock386(b *Block) bool {
 10859  	switch b.Kind {
 10860  	case Block386EQ:
 10861  		// match: (EQ (InvertFlags cmp) yes no)
 10862  		// result: (EQ cmp yes no)
 10863  		for b.Controls[0].Op == Op386InvertFlags {
 10864  			v_0 := b.Controls[0]
 10865  			cmp := v_0.Args[0]
 10866  			b.resetWithControl(Block386EQ, cmp)
 10867  			return true
 10868  		}
 10869  		// match: (EQ (FlagEQ) yes no)
 10870  		// result: (First yes no)
 10871  		for b.Controls[0].Op == Op386FlagEQ {
 10872  			b.Reset(BlockFirst)
 10873  			return true
 10874  		}
 10875  		// match: (EQ (FlagLT_ULT) yes no)
 10876  		// result: (First no yes)
 10877  		for b.Controls[0].Op == Op386FlagLT_ULT {
 10878  			b.Reset(BlockFirst)
 10879  			b.swapSuccessors()
 10880  			return true
 10881  		}
 10882  		// match: (EQ (FlagLT_UGT) yes no)
 10883  		// result: (First no yes)
 10884  		for b.Controls[0].Op == Op386FlagLT_UGT {
 10885  			b.Reset(BlockFirst)
 10886  			b.swapSuccessors()
 10887  			return true
 10888  		}
 10889  		// match: (EQ (FlagGT_ULT) yes no)
 10890  		// result: (First no yes)
 10891  		for b.Controls[0].Op == Op386FlagGT_ULT {
 10892  			b.Reset(BlockFirst)
 10893  			b.swapSuccessors()
 10894  			return true
 10895  		}
 10896  		// match: (EQ (FlagGT_UGT) yes no)
 10897  		// result: (First no yes)
 10898  		for b.Controls[0].Op == Op386FlagGT_UGT {
 10899  			b.Reset(BlockFirst)
 10900  			b.swapSuccessors()
 10901  			return true
 10902  		}
 10903  	case Block386GE:
 10904  		// match: (GE (InvertFlags cmp) yes no)
 10905  		// result: (LE cmp yes no)
 10906  		for b.Controls[0].Op == Op386InvertFlags {
 10907  			v_0 := b.Controls[0]
 10908  			cmp := v_0.Args[0]
 10909  			b.resetWithControl(Block386LE, cmp)
 10910  			return true
 10911  		}
 10912  		// match: (GE (FlagEQ) yes no)
 10913  		// result: (First yes no)
 10914  		for b.Controls[0].Op == Op386FlagEQ {
 10915  			b.Reset(BlockFirst)
 10916  			return true
 10917  		}
 10918  		// match: (GE (FlagLT_ULT) yes no)
 10919  		// result: (First no yes)
 10920  		for b.Controls[0].Op == Op386FlagLT_ULT {
 10921  			b.Reset(BlockFirst)
 10922  			b.swapSuccessors()
 10923  			return true
 10924  		}
 10925  		// match: (GE (FlagLT_UGT) yes no)
 10926  		// result: (First no yes)
 10927  		for b.Controls[0].Op == Op386FlagLT_UGT {
 10928  			b.Reset(BlockFirst)
 10929  			b.swapSuccessors()
 10930  			return true
 10931  		}
 10932  		// match: (GE (FlagGT_ULT) yes no)
 10933  		// result: (First yes no)
 10934  		for b.Controls[0].Op == Op386FlagGT_ULT {
 10935  			b.Reset(BlockFirst)
 10936  			return true
 10937  		}
 10938  		// match: (GE (FlagGT_UGT) yes no)
 10939  		// result: (First yes no)
 10940  		for b.Controls[0].Op == Op386FlagGT_UGT {
 10941  			b.Reset(BlockFirst)
 10942  			return true
 10943  		}
 10944  	case Block386GT:
 10945  		// match: (GT (InvertFlags cmp) yes no)
 10946  		// result: (LT cmp yes no)
 10947  		for b.Controls[0].Op == Op386InvertFlags {
 10948  			v_0 := b.Controls[0]
 10949  			cmp := v_0.Args[0]
 10950  			b.resetWithControl(Block386LT, cmp)
 10951  			return true
 10952  		}
 10953  		// match: (GT (FlagEQ) yes no)
 10954  		// result: (First no yes)
 10955  		for b.Controls[0].Op == Op386FlagEQ {
 10956  			b.Reset(BlockFirst)
 10957  			b.swapSuccessors()
 10958  			return true
 10959  		}
 10960  		// match: (GT (FlagLT_ULT) yes no)
 10961  		// result: (First no yes)
 10962  		for b.Controls[0].Op == Op386FlagLT_ULT {
 10963  			b.Reset(BlockFirst)
 10964  			b.swapSuccessors()
 10965  			return true
 10966  		}
 10967  		// match: (GT (FlagLT_UGT) yes no)
 10968  		// result: (First no yes)
 10969  		for b.Controls[0].Op == Op386FlagLT_UGT {
 10970  			b.Reset(BlockFirst)
 10971  			b.swapSuccessors()
 10972  			return true
 10973  		}
 10974  		// match: (GT (FlagGT_ULT) yes no)
 10975  		// result: (First yes no)
 10976  		for b.Controls[0].Op == Op386FlagGT_ULT {
 10977  			b.Reset(BlockFirst)
 10978  			return true
 10979  		}
 10980  		// match: (GT (FlagGT_UGT) yes no)
 10981  		// result: (First yes no)
 10982  		for b.Controls[0].Op == Op386FlagGT_UGT {
 10983  			b.Reset(BlockFirst)
 10984  			return true
 10985  		}
 10986  	case BlockIf:
 10987  		// match: (If (SETL cmp) yes no)
 10988  		// result: (LT cmp yes no)
 10989  		for b.Controls[0].Op == Op386SETL {
 10990  			v_0 := b.Controls[0]
 10991  			cmp := v_0.Args[0]
 10992  			b.resetWithControl(Block386LT, cmp)
 10993  			return true
 10994  		}
 10995  		// match: (If (SETLE cmp) yes no)
 10996  		// result: (LE cmp yes no)
 10997  		for b.Controls[0].Op == Op386SETLE {
 10998  			v_0 := b.Controls[0]
 10999  			cmp := v_0.Args[0]
 11000  			b.resetWithControl(Block386LE, cmp)
 11001  			return true
 11002  		}
 11003  		// match: (If (SETG cmp) yes no)
 11004  		// result: (GT cmp yes no)
 11005  		for b.Controls[0].Op == Op386SETG {
 11006  			v_0 := b.Controls[0]
 11007  			cmp := v_0.Args[0]
 11008  			b.resetWithControl(Block386GT, cmp)
 11009  			return true
 11010  		}
 11011  		// match: (If (SETGE cmp) yes no)
 11012  		// result: (GE cmp yes no)
 11013  		for b.Controls[0].Op == Op386SETGE {
 11014  			v_0 := b.Controls[0]
 11015  			cmp := v_0.Args[0]
 11016  			b.resetWithControl(Block386GE, cmp)
 11017  			return true
 11018  		}
 11019  		// match: (If (SETEQ cmp) yes no)
 11020  		// result: (EQ cmp yes no)
 11021  		for b.Controls[0].Op == Op386SETEQ {
 11022  			v_0 := b.Controls[0]
 11023  			cmp := v_0.Args[0]
 11024  			b.resetWithControl(Block386EQ, cmp)
 11025  			return true
 11026  		}
 11027  		// match: (If (SETNE cmp) yes no)
 11028  		// result: (NE cmp yes no)
 11029  		for b.Controls[0].Op == Op386SETNE {
 11030  			v_0 := b.Controls[0]
 11031  			cmp := v_0.Args[0]
 11032  			b.resetWithControl(Block386NE, cmp)
 11033  			return true
 11034  		}
 11035  		// match: (If (SETB cmp) yes no)
 11036  		// result: (ULT cmp yes no)
 11037  		for b.Controls[0].Op == Op386SETB {
 11038  			v_0 := b.Controls[0]
 11039  			cmp := v_0.Args[0]
 11040  			b.resetWithControl(Block386ULT, cmp)
 11041  			return true
 11042  		}
 11043  		// match: (If (SETBE cmp) yes no)
 11044  		// result: (ULE cmp yes no)
 11045  		for b.Controls[0].Op == Op386SETBE {
 11046  			v_0 := b.Controls[0]
 11047  			cmp := v_0.Args[0]
 11048  			b.resetWithControl(Block386ULE, cmp)
 11049  			return true
 11050  		}
 11051  		// match: (If (SETA cmp) yes no)
 11052  		// result: (UGT cmp yes no)
 11053  		for b.Controls[0].Op == Op386SETA {
 11054  			v_0 := b.Controls[0]
 11055  			cmp := v_0.Args[0]
 11056  			b.resetWithControl(Block386UGT, cmp)
 11057  			return true
 11058  		}
 11059  		// match: (If (SETAE cmp) yes no)
 11060  		// result: (UGE cmp yes no)
 11061  		for b.Controls[0].Op == Op386SETAE {
 11062  			v_0 := b.Controls[0]
 11063  			cmp := v_0.Args[0]
 11064  			b.resetWithControl(Block386UGE, cmp)
 11065  			return true
 11066  		}
 11067  		// match: (If (SETO cmp) yes no)
 11068  		// result: (OS cmp yes no)
 11069  		for b.Controls[0].Op == Op386SETO {
 11070  			v_0 := b.Controls[0]
 11071  			cmp := v_0.Args[0]
 11072  			b.resetWithControl(Block386OS, cmp)
 11073  			return true
 11074  		}
 11075  		// match: (If (SETGF cmp) yes no)
 11076  		// result: (UGT cmp yes no)
 11077  		for b.Controls[0].Op == Op386SETGF {
 11078  			v_0 := b.Controls[0]
 11079  			cmp := v_0.Args[0]
 11080  			b.resetWithControl(Block386UGT, cmp)
 11081  			return true
 11082  		}
 11083  		// match: (If (SETGEF cmp) yes no)
 11084  		// result: (UGE cmp yes no)
 11085  		for b.Controls[0].Op == Op386SETGEF {
 11086  			v_0 := b.Controls[0]
 11087  			cmp := v_0.Args[0]
 11088  			b.resetWithControl(Block386UGE, cmp)
 11089  			return true
 11090  		}
 11091  		// match: (If (SETEQF cmp) yes no)
 11092  		// result: (EQF cmp yes no)
 11093  		for b.Controls[0].Op == Op386SETEQF {
 11094  			v_0 := b.Controls[0]
 11095  			cmp := v_0.Args[0]
 11096  			b.resetWithControl(Block386EQF, cmp)
 11097  			return true
 11098  		}
 11099  		// match: (If (SETNEF cmp) yes no)
 11100  		// result: (NEF cmp yes no)
 11101  		for b.Controls[0].Op == Op386SETNEF {
 11102  			v_0 := b.Controls[0]
 11103  			cmp := v_0.Args[0]
 11104  			b.resetWithControl(Block386NEF, cmp)
 11105  			return true
 11106  		}
 11107  		// match: (If cond yes no)
 11108  		// result: (NE (TESTB cond cond) yes no)
 11109  		for {
 11110  			cond := b.Controls[0]
 11111  			v0 := b.NewValue0(cond.Pos, Op386TESTB, types.TypeFlags)
 11112  			v0.AddArg2(cond, cond)
 11113  			b.resetWithControl(Block386NE, v0)
 11114  			return true
 11115  		}
 11116  	case Block386LE:
 11117  		// match: (LE (InvertFlags cmp) yes no)
 11118  		// result: (GE cmp yes no)
 11119  		for b.Controls[0].Op == Op386InvertFlags {
 11120  			v_0 := b.Controls[0]
 11121  			cmp := v_0.Args[0]
 11122  			b.resetWithControl(Block386GE, cmp)
 11123  			return true
 11124  		}
 11125  		// match: (LE (FlagEQ) yes no)
 11126  		// result: (First yes no)
 11127  		for b.Controls[0].Op == Op386FlagEQ {
 11128  			b.Reset(BlockFirst)
 11129  			return true
 11130  		}
 11131  		// match: (LE (FlagLT_ULT) yes no)
 11132  		// result: (First yes no)
 11133  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11134  			b.Reset(BlockFirst)
 11135  			return true
 11136  		}
 11137  		// match: (LE (FlagLT_UGT) yes no)
 11138  		// result: (First yes no)
 11139  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11140  			b.Reset(BlockFirst)
 11141  			return true
 11142  		}
 11143  		// match: (LE (FlagGT_ULT) yes no)
 11144  		// result: (First no yes)
 11145  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11146  			b.Reset(BlockFirst)
 11147  			b.swapSuccessors()
 11148  			return true
 11149  		}
 11150  		// match: (LE (FlagGT_UGT) yes no)
 11151  		// result: (First no yes)
 11152  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11153  			b.Reset(BlockFirst)
 11154  			b.swapSuccessors()
 11155  			return true
 11156  		}
 11157  	case Block386LT:
 11158  		// match: (LT (InvertFlags cmp) yes no)
 11159  		// result: (GT cmp yes no)
 11160  		for b.Controls[0].Op == Op386InvertFlags {
 11161  			v_0 := b.Controls[0]
 11162  			cmp := v_0.Args[0]
 11163  			b.resetWithControl(Block386GT, cmp)
 11164  			return true
 11165  		}
 11166  		// match: (LT (FlagEQ) yes no)
 11167  		// result: (First no yes)
 11168  		for b.Controls[0].Op == Op386FlagEQ {
 11169  			b.Reset(BlockFirst)
 11170  			b.swapSuccessors()
 11171  			return true
 11172  		}
 11173  		// match: (LT (FlagLT_ULT) yes no)
 11174  		// result: (First yes no)
 11175  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11176  			b.Reset(BlockFirst)
 11177  			return true
 11178  		}
 11179  		// match: (LT (FlagLT_UGT) yes no)
 11180  		// result: (First yes no)
 11181  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11182  			b.Reset(BlockFirst)
 11183  			return true
 11184  		}
 11185  		// match: (LT (FlagGT_ULT) yes no)
 11186  		// result: (First no yes)
 11187  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11188  			b.Reset(BlockFirst)
 11189  			b.swapSuccessors()
 11190  			return true
 11191  		}
 11192  		// match: (LT (FlagGT_UGT) yes no)
 11193  		// result: (First no yes)
 11194  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11195  			b.Reset(BlockFirst)
 11196  			b.swapSuccessors()
 11197  			return true
 11198  		}
 11199  	case Block386NE:
 11200  		// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
 11201  		// result: (LT cmp yes no)
 11202  		for b.Controls[0].Op == Op386TESTB {
 11203  			v_0 := b.Controls[0]
 11204  			_ = v_0.Args[1]
 11205  			v_0_0 := v_0.Args[0]
 11206  			if v_0_0.Op != Op386SETL {
 11207  				break
 11208  			}
 11209  			cmp := v_0_0.Args[0]
 11210  			v_0_1 := v_0.Args[1]
 11211  			if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] {
 11212  				break
 11213  			}
 11214  			b.resetWithControl(Block386LT, cmp)
 11215  			return true
 11216  		}
 11217  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 11218  		// result: (LE cmp yes no)
 11219  		for b.Controls[0].Op == Op386TESTB {
 11220  			v_0 := b.Controls[0]
 11221  			_ = v_0.Args[1]
 11222  			v_0_0 := v_0.Args[0]
 11223  			if v_0_0.Op != Op386SETLE {
 11224  				break
 11225  			}
 11226  			cmp := v_0_0.Args[0]
 11227  			v_0_1 := v_0.Args[1]
 11228  			if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] {
 11229  				break
 11230  			}
 11231  			b.resetWithControl(Block386LE, cmp)
 11232  			return true
 11233  		}
 11234  		// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
 11235  		// result: (GT cmp yes no)
 11236  		for b.Controls[0].Op == Op386TESTB {
 11237  			v_0 := b.Controls[0]
 11238  			_ = v_0.Args[1]
 11239  			v_0_0 := v_0.Args[0]
 11240  			if v_0_0.Op != Op386SETG {
 11241  				break
 11242  			}
 11243  			cmp := v_0_0.Args[0]
 11244  			v_0_1 := v_0.Args[1]
 11245  			if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] {
 11246  				break
 11247  			}
 11248  			b.resetWithControl(Block386GT, cmp)
 11249  			return true
 11250  		}
 11251  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 11252  		// result: (GE cmp yes no)
 11253  		for b.Controls[0].Op == Op386TESTB {
 11254  			v_0 := b.Controls[0]
 11255  			_ = v_0.Args[1]
 11256  			v_0_0 := v_0.Args[0]
 11257  			if v_0_0.Op != Op386SETGE {
 11258  				break
 11259  			}
 11260  			cmp := v_0_0.Args[0]
 11261  			v_0_1 := v_0.Args[1]
 11262  			if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] {
 11263  				break
 11264  			}
 11265  			b.resetWithControl(Block386GE, cmp)
 11266  			return true
 11267  		}
 11268  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 11269  		// result: (EQ cmp yes no)
 11270  		for b.Controls[0].Op == Op386TESTB {
 11271  			v_0 := b.Controls[0]
 11272  			_ = v_0.Args[1]
 11273  			v_0_0 := v_0.Args[0]
 11274  			if v_0_0.Op != Op386SETEQ {
 11275  				break
 11276  			}
 11277  			cmp := v_0_0.Args[0]
 11278  			v_0_1 := v_0.Args[1]
 11279  			if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] {
 11280  				break
 11281  			}
 11282  			b.resetWithControl(Block386EQ, cmp)
 11283  			return true
 11284  		}
 11285  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 11286  		// result: (NE cmp yes no)
 11287  		for b.Controls[0].Op == Op386TESTB {
 11288  			v_0 := b.Controls[0]
 11289  			_ = v_0.Args[1]
 11290  			v_0_0 := v_0.Args[0]
 11291  			if v_0_0.Op != Op386SETNE {
 11292  				break
 11293  			}
 11294  			cmp := v_0_0.Args[0]
 11295  			v_0_1 := v_0.Args[1]
 11296  			if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] {
 11297  				break
 11298  			}
 11299  			b.resetWithControl(Block386NE, cmp)
 11300  			return true
 11301  		}
 11302  		// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
 11303  		// result: (ULT cmp yes no)
 11304  		for b.Controls[0].Op == Op386TESTB {
 11305  			v_0 := b.Controls[0]
 11306  			_ = v_0.Args[1]
 11307  			v_0_0 := v_0.Args[0]
 11308  			if v_0_0.Op != Op386SETB {
 11309  				break
 11310  			}
 11311  			cmp := v_0_0.Args[0]
 11312  			v_0_1 := v_0.Args[1]
 11313  			if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] {
 11314  				break
 11315  			}
 11316  			b.resetWithControl(Block386ULT, cmp)
 11317  			return true
 11318  		}
 11319  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 11320  		// result: (ULE cmp yes no)
 11321  		for b.Controls[0].Op == Op386TESTB {
 11322  			v_0 := b.Controls[0]
 11323  			_ = v_0.Args[1]
 11324  			v_0_0 := v_0.Args[0]
 11325  			if v_0_0.Op != Op386SETBE {
 11326  				break
 11327  			}
 11328  			cmp := v_0_0.Args[0]
 11329  			v_0_1 := v_0.Args[1]
 11330  			if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] {
 11331  				break
 11332  			}
 11333  			b.resetWithControl(Block386ULE, cmp)
 11334  			return true
 11335  		}
 11336  		// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
 11337  		// result: (UGT cmp yes no)
 11338  		for b.Controls[0].Op == Op386TESTB {
 11339  			v_0 := b.Controls[0]
 11340  			_ = v_0.Args[1]
 11341  			v_0_0 := v_0.Args[0]
 11342  			if v_0_0.Op != Op386SETA {
 11343  				break
 11344  			}
 11345  			cmp := v_0_0.Args[0]
 11346  			v_0_1 := v_0.Args[1]
 11347  			if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] {
 11348  				break
 11349  			}
 11350  			b.resetWithControl(Block386UGT, cmp)
 11351  			return true
 11352  		}
 11353  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 11354  		// result: (UGE cmp yes no)
 11355  		for b.Controls[0].Op == Op386TESTB {
 11356  			v_0 := b.Controls[0]
 11357  			_ = v_0.Args[1]
 11358  			v_0_0 := v_0.Args[0]
 11359  			if v_0_0.Op != Op386SETAE {
 11360  				break
 11361  			}
 11362  			cmp := v_0_0.Args[0]
 11363  			v_0_1 := v_0.Args[1]
 11364  			if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] {
 11365  				break
 11366  			}
 11367  			b.resetWithControl(Block386UGE, cmp)
 11368  			return true
 11369  		}
 11370  		// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
 11371  		// result: (OS cmp yes no)
 11372  		for b.Controls[0].Op == Op386TESTB {
 11373  			v_0 := b.Controls[0]
 11374  			_ = v_0.Args[1]
 11375  			v_0_0 := v_0.Args[0]
 11376  			if v_0_0.Op != Op386SETO {
 11377  				break
 11378  			}
 11379  			cmp := v_0_0.Args[0]
 11380  			v_0_1 := v_0.Args[1]
 11381  			if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] {
 11382  				break
 11383  			}
 11384  			b.resetWithControl(Block386OS, cmp)
 11385  			return true
 11386  		}
 11387  		// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
 11388  		// result: (UGT cmp yes no)
 11389  		for b.Controls[0].Op == Op386TESTB {
 11390  			v_0 := b.Controls[0]
 11391  			_ = v_0.Args[1]
 11392  			v_0_0 := v_0.Args[0]
 11393  			if v_0_0.Op != Op386SETGF {
 11394  				break
 11395  			}
 11396  			cmp := v_0_0.Args[0]
 11397  			v_0_1 := v_0.Args[1]
 11398  			if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] {
 11399  				break
 11400  			}
 11401  			b.resetWithControl(Block386UGT, cmp)
 11402  			return true
 11403  		}
 11404  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 11405  		// result: (UGE cmp yes no)
 11406  		for b.Controls[0].Op == Op386TESTB {
 11407  			v_0 := b.Controls[0]
 11408  			_ = v_0.Args[1]
 11409  			v_0_0 := v_0.Args[0]
 11410  			if v_0_0.Op != Op386SETGEF {
 11411  				break
 11412  			}
 11413  			cmp := v_0_0.Args[0]
 11414  			v_0_1 := v_0.Args[1]
 11415  			if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] {
 11416  				break
 11417  			}
 11418  			b.resetWithControl(Block386UGE, cmp)
 11419  			return true
 11420  		}
 11421  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 11422  		// result: (EQF cmp yes no)
 11423  		for b.Controls[0].Op == Op386TESTB {
 11424  			v_0 := b.Controls[0]
 11425  			_ = v_0.Args[1]
 11426  			v_0_0 := v_0.Args[0]
 11427  			if v_0_0.Op != Op386SETEQF {
 11428  				break
 11429  			}
 11430  			cmp := v_0_0.Args[0]
 11431  			v_0_1 := v_0.Args[1]
 11432  			if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] {
 11433  				break
 11434  			}
 11435  			b.resetWithControl(Block386EQF, cmp)
 11436  			return true
 11437  		}
 11438  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 11439  		// result: (NEF cmp yes no)
 11440  		for b.Controls[0].Op == Op386TESTB {
 11441  			v_0 := b.Controls[0]
 11442  			_ = v_0.Args[1]
 11443  			v_0_0 := v_0.Args[0]
 11444  			if v_0_0.Op != Op386SETNEF {
 11445  				break
 11446  			}
 11447  			cmp := v_0_0.Args[0]
 11448  			v_0_1 := v_0.Args[1]
 11449  			if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] {
 11450  				break
 11451  			}
 11452  			b.resetWithControl(Block386NEF, cmp)
 11453  			return true
 11454  		}
 11455  		// match: (NE (InvertFlags cmp) yes no)
 11456  		// result: (NE cmp yes no)
 11457  		for b.Controls[0].Op == Op386InvertFlags {
 11458  			v_0 := b.Controls[0]
 11459  			cmp := v_0.Args[0]
 11460  			b.resetWithControl(Block386NE, cmp)
 11461  			return true
 11462  		}
 11463  		// match: (NE (FlagEQ) yes no)
 11464  		// result: (First no yes)
 11465  		for b.Controls[0].Op == Op386FlagEQ {
 11466  			b.Reset(BlockFirst)
 11467  			b.swapSuccessors()
 11468  			return true
 11469  		}
 11470  		// match: (NE (FlagLT_ULT) yes no)
 11471  		// result: (First yes no)
 11472  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11473  			b.Reset(BlockFirst)
 11474  			return true
 11475  		}
 11476  		// match: (NE (FlagLT_UGT) yes no)
 11477  		// result: (First yes no)
 11478  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11479  			b.Reset(BlockFirst)
 11480  			return true
 11481  		}
 11482  		// match: (NE (FlagGT_ULT) yes no)
 11483  		// result: (First yes no)
 11484  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11485  			b.Reset(BlockFirst)
 11486  			return true
 11487  		}
 11488  		// match: (NE (FlagGT_UGT) yes no)
 11489  		// result: (First yes no)
 11490  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11491  			b.Reset(BlockFirst)
 11492  			return true
 11493  		}
 11494  	case Block386UGE:
 11495  		// match: (UGE (InvertFlags cmp) yes no)
 11496  		// result: (ULE cmp yes no)
 11497  		for b.Controls[0].Op == Op386InvertFlags {
 11498  			v_0 := b.Controls[0]
 11499  			cmp := v_0.Args[0]
 11500  			b.resetWithControl(Block386ULE, cmp)
 11501  			return true
 11502  		}
 11503  		// match: (UGE (FlagEQ) yes no)
 11504  		// result: (First yes no)
 11505  		for b.Controls[0].Op == Op386FlagEQ {
 11506  			b.Reset(BlockFirst)
 11507  			return true
 11508  		}
 11509  		// match: (UGE (FlagLT_ULT) yes no)
 11510  		// result: (First no yes)
 11511  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11512  			b.Reset(BlockFirst)
 11513  			b.swapSuccessors()
 11514  			return true
 11515  		}
 11516  		// match: (UGE (FlagLT_UGT) yes no)
 11517  		// result: (First yes no)
 11518  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11519  			b.Reset(BlockFirst)
 11520  			return true
 11521  		}
 11522  		// match: (UGE (FlagGT_ULT) yes no)
 11523  		// result: (First no yes)
 11524  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11525  			b.Reset(BlockFirst)
 11526  			b.swapSuccessors()
 11527  			return true
 11528  		}
 11529  		// match: (UGE (FlagGT_UGT) yes no)
 11530  		// result: (First yes no)
 11531  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11532  			b.Reset(BlockFirst)
 11533  			return true
 11534  		}
 11535  	case Block386UGT:
 11536  		// match: (UGT (InvertFlags cmp) yes no)
 11537  		// result: (ULT cmp yes no)
 11538  		for b.Controls[0].Op == Op386InvertFlags {
 11539  			v_0 := b.Controls[0]
 11540  			cmp := v_0.Args[0]
 11541  			b.resetWithControl(Block386ULT, cmp)
 11542  			return true
 11543  		}
 11544  		// match: (UGT (FlagEQ) yes no)
 11545  		// result: (First no yes)
 11546  		for b.Controls[0].Op == Op386FlagEQ {
 11547  			b.Reset(BlockFirst)
 11548  			b.swapSuccessors()
 11549  			return true
 11550  		}
 11551  		// match: (UGT (FlagLT_ULT) yes no)
 11552  		// result: (First no yes)
 11553  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11554  			b.Reset(BlockFirst)
 11555  			b.swapSuccessors()
 11556  			return true
 11557  		}
 11558  		// match: (UGT (FlagLT_UGT) yes no)
 11559  		// result: (First yes no)
 11560  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11561  			b.Reset(BlockFirst)
 11562  			return true
 11563  		}
 11564  		// match: (UGT (FlagGT_ULT) yes no)
 11565  		// result: (First no yes)
 11566  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11567  			b.Reset(BlockFirst)
 11568  			b.swapSuccessors()
 11569  			return true
 11570  		}
 11571  		// match: (UGT (FlagGT_UGT) yes no)
 11572  		// result: (First yes no)
 11573  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11574  			b.Reset(BlockFirst)
 11575  			return true
 11576  		}
 11577  	case Block386ULE:
 11578  		// match: (ULE (InvertFlags cmp) yes no)
 11579  		// result: (UGE cmp yes no)
 11580  		for b.Controls[0].Op == Op386InvertFlags {
 11581  			v_0 := b.Controls[0]
 11582  			cmp := v_0.Args[0]
 11583  			b.resetWithControl(Block386UGE, cmp)
 11584  			return true
 11585  		}
 11586  		// match: (ULE (FlagEQ) yes no)
 11587  		// result: (First yes no)
 11588  		for b.Controls[0].Op == Op386FlagEQ {
 11589  			b.Reset(BlockFirst)
 11590  			return true
 11591  		}
 11592  		// match: (ULE (FlagLT_ULT) yes no)
 11593  		// result: (First yes no)
 11594  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11595  			b.Reset(BlockFirst)
 11596  			return true
 11597  		}
 11598  		// match: (ULE (FlagLT_UGT) yes no)
 11599  		// result: (First no yes)
 11600  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11601  			b.Reset(BlockFirst)
 11602  			b.swapSuccessors()
 11603  			return true
 11604  		}
 11605  		// match: (ULE (FlagGT_ULT) yes no)
 11606  		// result: (First yes no)
 11607  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11608  			b.Reset(BlockFirst)
 11609  			return true
 11610  		}
 11611  		// match: (ULE (FlagGT_UGT) yes no)
 11612  		// result: (First no yes)
 11613  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11614  			b.Reset(BlockFirst)
 11615  			b.swapSuccessors()
 11616  			return true
 11617  		}
 11618  	case Block386ULT:
 11619  		// match: (ULT (InvertFlags cmp) yes no)
 11620  		// result: (UGT cmp yes no)
 11621  		for b.Controls[0].Op == Op386InvertFlags {
 11622  			v_0 := b.Controls[0]
 11623  			cmp := v_0.Args[0]
 11624  			b.resetWithControl(Block386UGT, cmp)
 11625  			return true
 11626  		}
 11627  		// match: (ULT (FlagEQ) yes no)
 11628  		// result: (First no yes)
 11629  		for b.Controls[0].Op == Op386FlagEQ {
 11630  			b.Reset(BlockFirst)
 11631  			b.swapSuccessors()
 11632  			return true
 11633  		}
 11634  		// match: (ULT (FlagLT_ULT) yes no)
 11635  		// result: (First yes no)
 11636  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11637  			b.Reset(BlockFirst)
 11638  			return true
 11639  		}
 11640  		// match: (ULT (FlagLT_UGT) yes no)
 11641  		// result: (First no yes)
 11642  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11643  			b.Reset(BlockFirst)
 11644  			b.swapSuccessors()
 11645  			return true
 11646  		}
 11647  		// match: (ULT (FlagGT_ULT) yes no)
 11648  		// result: (First yes no)
 11649  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11650  			b.Reset(BlockFirst)
 11651  			return true
 11652  		}
 11653  		// match: (ULT (FlagGT_UGT) yes no)
 11654  		// result: (First no yes)
 11655  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11656  			b.Reset(BlockFirst)
 11657  			b.swapSuccessors()
 11658  			return true
 11659  		}
 11660  	}
 11661  	return false
 11662  }
 11663  

View as plain text