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

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

View as plain text