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

View as plain text