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

View as plain text