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

     1  // Code generated from _gen/386.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewrite386
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  import "cmd/compile/internal/ssa/block"
     8  import "cmd/compile/internal/ssa/ssaop"
     9  import "cmd/compile/internal/ssa"
    10  
    11  func RewriteValue(v *ssa.Value) bool {
    12  	switch v.Op {
    13  	case ssaop.Op386ADCL:
    14  		return rewriteValue_Op386ADCL(v)
    15  	case ssaop.Op386ADDL:
    16  		return rewriteValue_Op386ADDL(v)
    17  	case ssaop.Op386ADDLcarry:
    18  		return rewriteValue_Op386ADDLcarry(v)
    19  	case ssaop.Op386ADDLconst:
    20  		return rewriteValue_Op386ADDLconst(v)
    21  	case ssaop.Op386ADDLconstmodify:
    22  		return rewriteValue_Op386ADDLconstmodify(v)
    23  	case ssaop.Op386ADDLload:
    24  		return rewriteValue_Op386ADDLload(v)
    25  	case ssaop.Op386ADDLmodify:
    26  		return rewriteValue_Op386ADDLmodify(v)
    27  	case ssaop.Op386ADDSD:
    28  		return rewriteValue_Op386ADDSD(v)
    29  	case ssaop.Op386ADDSDload:
    30  		return rewriteValue_Op386ADDSDload(v)
    31  	case ssaop.Op386ADDSS:
    32  		return rewriteValue_Op386ADDSS(v)
    33  	case ssaop.Op386ADDSSload:
    34  		return rewriteValue_Op386ADDSSload(v)
    35  	case ssaop.Op386ANDL:
    36  		return rewriteValue_Op386ANDL(v)
    37  	case ssaop.Op386ANDLconst:
    38  		return rewriteValue_Op386ANDLconst(v)
    39  	case ssaop.Op386ANDLconstmodify:
    40  		return rewriteValue_Op386ANDLconstmodify(v)
    41  	case ssaop.Op386ANDLload:
    42  		return rewriteValue_Op386ANDLload(v)
    43  	case ssaop.Op386ANDLmodify:
    44  		return rewriteValue_Op386ANDLmodify(v)
    45  	case ssaop.Op386CMPB:
    46  		return rewriteValue_Op386CMPB(v)
    47  	case ssaop.Op386CMPBconst:
    48  		return rewriteValue_Op386CMPBconst(v)
    49  	case ssaop.Op386CMPBload:
    50  		return rewriteValue_Op386CMPBload(v)
    51  	case ssaop.Op386CMPL:
    52  		return rewriteValue_Op386CMPL(v)
    53  	case ssaop.Op386CMPLconst:
    54  		return rewriteValue_Op386CMPLconst(v)
    55  	case ssaop.Op386CMPLload:
    56  		return rewriteValue_Op386CMPLload(v)
    57  	case ssaop.Op386CMPW:
    58  		return rewriteValue_Op386CMPW(v)
    59  	case ssaop.Op386CMPWconst:
    60  		return rewriteValue_Op386CMPWconst(v)
    61  	case ssaop.Op386CMPWload:
    62  		return rewriteValue_Op386CMPWload(v)
    63  	case ssaop.Op386DIVSD:
    64  		return rewriteValue_Op386DIVSD(v)
    65  	case ssaop.Op386DIVSDload:
    66  		return rewriteValue_Op386DIVSDload(v)
    67  	case ssaop.Op386DIVSS:
    68  		return rewriteValue_Op386DIVSS(v)
    69  	case ssaop.Op386DIVSSload:
    70  		return rewriteValue_Op386DIVSSload(v)
    71  	case ssaop.Op386LEAL:
    72  		return rewriteValue_Op386LEAL(v)
    73  	case ssaop.Op386LEAL1:
    74  		return rewriteValue_Op386LEAL1(v)
    75  	case ssaop.Op386LEAL2:
    76  		return rewriteValue_Op386LEAL2(v)
    77  	case ssaop.Op386LEAL4:
    78  		return rewriteValue_Op386LEAL4(v)
    79  	case ssaop.Op386LEAL8:
    80  		return rewriteValue_Op386LEAL8(v)
    81  	case ssaop.Op386LoweredPanicBoundsRC:
    82  		return rewriteValue_Op386LoweredPanicBoundsRC(v)
    83  	case ssaop.Op386LoweredPanicBoundsRR:
    84  		return rewriteValue_Op386LoweredPanicBoundsRR(v)
    85  	case ssaop.Op386LoweredPanicExtendRC:
    86  		return rewriteValue_Op386LoweredPanicExtendRC(v)
    87  	case ssaop.Op386LoweredPanicExtendRR:
    88  		return rewriteValue_Op386LoweredPanicExtendRR(v)
    89  	case ssaop.Op386MOVBLSX:
    90  		return rewriteValue_Op386MOVBLSX(v)
    91  	case ssaop.Op386MOVBLSXload:
    92  		return rewriteValue_Op386MOVBLSXload(v)
    93  	case ssaop.Op386MOVBLZX:
    94  		return rewriteValue_Op386MOVBLZX(v)
    95  	case ssaop.Op386MOVBload:
    96  		return rewriteValue_Op386MOVBload(v)
    97  	case ssaop.Op386MOVBstore:
    98  		return rewriteValue_Op386MOVBstore(v)
    99  	case ssaop.Op386MOVBstoreconst:
   100  		return rewriteValue_Op386MOVBstoreconst(v)
   101  	case ssaop.Op386MOVLload:
   102  		return rewriteValue_Op386MOVLload(v)
   103  	case ssaop.Op386MOVLstore:
   104  		return rewriteValue_Op386MOVLstore(v)
   105  	case ssaop.Op386MOVLstoreconst:
   106  		return rewriteValue_Op386MOVLstoreconst(v)
   107  	case ssaop.Op386MOVSDconst:
   108  		return rewriteValue_Op386MOVSDconst(v)
   109  	case ssaop.Op386MOVSDload:
   110  		return rewriteValue_Op386MOVSDload(v)
   111  	case ssaop.Op386MOVSDstore:
   112  		return rewriteValue_Op386MOVSDstore(v)
   113  	case ssaop.Op386MOVSSconst:
   114  		return rewriteValue_Op386MOVSSconst(v)
   115  	case ssaop.Op386MOVSSload:
   116  		return rewriteValue_Op386MOVSSload(v)
   117  	case ssaop.Op386MOVSSstore:
   118  		return rewriteValue_Op386MOVSSstore(v)
   119  	case ssaop.Op386MOVWLSX:
   120  		return rewriteValue_Op386MOVWLSX(v)
   121  	case ssaop.Op386MOVWLSXload:
   122  		return rewriteValue_Op386MOVWLSXload(v)
   123  	case ssaop.Op386MOVWLZX:
   124  		return rewriteValue_Op386MOVWLZX(v)
   125  	case ssaop.Op386MOVWload:
   126  		return rewriteValue_Op386MOVWload(v)
   127  	case ssaop.Op386MOVWstore:
   128  		return rewriteValue_Op386MOVWstore(v)
   129  	case ssaop.Op386MOVWstoreconst:
   130  		return rewriteValue_Op386MOVWstoreconst(v)
   131  	case ssaop.Op386MULL:
   132  		return rewriteValue_Op386MULL(v)
   133  	case ssaop.Op386MULLconst:
   134  		return rewriteValue_Op386MULLconst(v)
   135  	case ssaop.Op386MULLload:
   136  		return rewriteValue_Op386MULLload(v)
   137  	case ssaop.Op386MULSD:
   138  		return rewriteValue_Op386MULSD(v)
   139  	case ssaop.Op386MULSDload:
   140  		return rewriteValue_Op386MULSDload(v)
   141  	case ssaop.Op386MULSS:
   142  		return rewriteValue_Op386MULSS(v)
   143  	case ssaop.Op386MULSSload:
   144  		return rewriteValue_Op386MULSSload(v)
   145  	case ssaop.Op386NEGL:
   146  		return rewriteValue_Op386NEGL(v)
   147  	case ssaop.Op386NOTL:
   148  		return rewriteValue_Op386NOTL(v)
   149  	case ssaop.Op386ORL:
   150  		return rewriteValue_Op386ORL(v)
   151  	case ssaop.Op386ORLconst:
   152  		return rewriteValue_Op386ORLconst(v)
   153  	case ssaop.Op386ORLconstmodify:
   154  		return rewriteValue_Op386ORLconstmodify(v)
   155  	case ssaop.Op386ORLload:
   156  		return rewriteValue_Op386ORLload(v)
   157  	case ssaop.Op386ORLmodify:
   158  		return rewriteValue_Op386ORLmodify(v)
   159  	case ssaop.Op386ROLB:
   160  		return rewriteValue_Op386ROLB(v)
   161  	case ssaop.Op386ROLBconst:
   162  		return rewriteValue_Op386ROLBconst(v)
   163  	case ssaop.Op386ROLL:
   164  		return rewriteValue_Op386ROLL(v)
   165  	case ssaop.Op386ROLLconst:
   166  		return rewriteValue_Op386ROLLconst(v)
   167  	case ssaop.Op386ROLW:
   168  		return rewriteValue_Op386ROLW(v)
   169  	case ssaop.Op386ROLWconst:
   170  		return rewriteValue_Op386ROLWconst(v)
   171  	case ssaop.Op386SARB:
   172  		return rewriteValue_Op386SARB(v)
   173  	case ssaop.Op386SARBconst:
   174  		return rewriteValue_Op386SARBconst(v)
   175  	case ssaop.Op386SARL:
   176  		return rewriteValue_Op386SARL(v)
   177  	case ssaop.Op386SARLconst:
   178  		return rewriteValue_Op386SARLconst(v)
   179  	case ssaop.Op386SARW:
   180  		return rewriteValue_Op386SARW(v)
   181  	case ssaop.Op386SARWconst:
   182  		return rewriteValue_Op386SARWconst(v)
   183  	case ssaop.Op386SBBL:
   184  		return rewriteValue_Op386SBBL(v)
   185  	case ssaop.Op386SBBLcarrymask:
   186  		return rewriteValue_Op386SBBLcarrymask(v)
   187  	case ssaop.Op386SETA:
   188  		return rewriteValue_Op386SETA(v)
   189  	case ssaop.Op386SETAE:
   190  		return rewriteValue_Op386SETAE(v)
   191  	case ssaop.Op386SETB:
   192  		return rewriteValue_Op386SETB(v)
   193  	case ssaop.Op386SETBE:
   194  		return rewriteValue_Op386SETBE(v)
   195  	case ssaop.Op386SETEQ:
   196  		return rewriteValue_Op386SETEQ(v)
   197  	case ssaop.Op386SETG:
   198  		return rewriteValue_Op386SETG(v)
   199  	case ssaop.Op386SETGE:
   200  		return rewriteValue_Op386SETGE(v)
   201  	case ssaop.Op386SETL:
   202  		return rewriteValue_Op386SETL(v)
   203  	case ssaop.Op386SETLE:
   204  		return rewriteValue_Op386SETLE(v)
   205  	case ssaop.Op386SETNE:
   206  		return rewriteValue_Op386SETNE(v)
   207  	case ssaop.Op386SHLL:
   208  		return rewriteValue_Op386SHLL(v)
   209  	case ssaop.Op386SHLLconst:
   210  		return rewriteValue_Op386SHLLconst(v)
   211  	case ssaop.Op386SHRB:
   212  		return rewriteValue_Op386SHRB(v)
   213  	case ssaop.Op386SHRBconst:
   214  		return rewriteValue_Op386SHRBconst(v)
   215  	case ssaop.Op386SHRL:
   216  		return rewriteValue_Op386SHRL(v)
   217  	case ssaop.Op386SHRLconst:
   218  		return rewriteValue_Op386SHRLconst(v)
   219  	case ssaop.Op386SHRW:
   220  		return rewriteValue_Op386SHRW(v)
   221  	case ssaop.Op386SHRWconst:
   222  		return rewriteValue_Op386SHRWconst(v)
   223  	case ssaop.Op386SUBL:
   224  		return rewriteValue_Op386SUBL(v)
   225  	case ssaop.Op386SUBLcarry:
   226  		return rewriteValue_Op386SUBLcarry(v)
   227  	case ssaop.Op386SUBLconst:
   228  		return rewriteValue_Op386SUBLconst(v)
   229  	case ssaop.Op386SUBLload:
   230  		return rewriteValue_Op386SUBLload(v)
   231  	case ssaop.Op386SUBLmodify:
   232  		return rewriteValue_Op386SUBLmodify(v)
   233  	case ssaop.Op386SUBSD:
   234  		return rewriteValue_Op386SUBSD(v)
   235  	case ssaop.Op386SUBSDload:
   236  		return rewriteValue_Op386SUBSDload(v)
   237  	case ssaop.Op386SUBSS:
   238  		return rewriteValue_Op386SUBSS(v)
   239  	case ssaop.Op386SUBSSload:
   240  		return rewriteValue_Op386SUBSSload(v)
   241  	case ssaop.Op386XORL:
   242  		return rewriteValue_Op386XORL(v)
   243  	case ssaop.Op386XORLconst:
   244  		return rewriteValue_Op386XORLconst(v)
   245  	case ssaop.Op386XORLconstmodify:
   246  		return rewriteValue_Op386XORLconstmodify(v)
   247  	case ssaop.Op386XORLload:
   248  		return rewriteValue_Op386XORLload(v)
   249  	case ssaop.Op386XORLmodify:
   250  		return rewriteValue_Op386XORLmodify(v)
   251  	case ssaop.OpAdd16:
   252  		v.Op = ssaop.Op386ADDL
   253  		return true
   254  	case ssaop.OpAdd32:
   255  		v.Op = ssaop.Op386ADDL
   256  		return true
   257  	case ssaop.OpAdd32F:
   258  		v.Op = ssaop.Op386ADDSS
   259  		return true
   260  	case ssaop.OpAdd32carry:
   261  		v.Op = ssaop.Op386ADDLcarry
   262  		return true
   263  	case ssaop.OpAdd32carrywithcarry:
   264  		v.Op = ssaop.Op386ADCLcarry
   265  		return true
   266  	case ssaop.OpAdd32withcarry:
   267  		v.Op = ssaop.Op386ADCL
   268  		return true
   269  	case ssaop.OpAdd64F:
   270  		v.Op = ssaop.Op386ADDSD
   271  		return true
   272  	case ssaop.OpAdd8:
   273  		v.Op = ssaop.Op386ADDL
   274  		return true
   275  	case ssaop.OpAddPtr:
   276  		v.Op = ssaop.Op386ADDL
   277  		return true
   278  	case ssaop.OpAddr:
   279  		return rewriteValue_OpAddr(v)
   280  	case ssaop.OpAnd16:
   281  		v.Op = ssaop.Op386ANDL
   282  		return true
   283  	case ssaop.OpAnd32:
   284  		v.Op = ssaop.Op386ANDL
   285  		return true
   286  	case ssaop.OpAnd8:
   287  		v.Op = ssaop.Op386ANDL
   288  		return true
   289  	case ssaop.OpAndB:
   290  		v.Op = ssaop.Op386ANDL
   291  		return true
   292  	case ssaop.OpAvg32u:
   293  		v.Op = ssaop.Op386AVGLU
   294  		return true
   295  	case ssaop.OpBswap16:
   296  		return rewriteValue_OpBswap16(v)
   297  	case ssaop.OpBswap32:
   298  		v.Op = ssaop.Op386BSWAPL
   299  		return true
   300  	case ssaop.OpClosureCall:
   301  		v.Op = ssaop.Op386CALLclosure
   302  		return true
   303  	case ssaop.OpCom16:
   304  		v.Op = ssaop.Op386NOTL
   305  		return true
   306  	case ssaop.OpCom32:
   307  		v.Op = ssaop.Op386NOTL
   308  		return true
   309  	case ssaop.OpCom8:
   310  		v.Op = ssaop.Op386NOTL
   311  		return true
   312  	case ssaop.OpConst16:
   313  		return rewriteValue_OpConst16(v)
   314  	case ssaop.OpConst32:
   315  		v.Op = ssaop.Op386MOVLconst
   316  		return true
   317  	case ssaop.OpConst32F:
   318  		v.Op = ssaop.Op386MOVSSconst
   319  		return true
   320  	case ssaop.OpConst64F:
   321  		v.Op = ssaop.Op386MOVSDconst
   322  		return true
   323  	case ssaop.OpConst8:
   324  		return rewriteValue_OpConst8(v)
   325  	case ssaop.OpConstBool:
   326  		return rewriteValue_OpConstBool(v)
   327  	case ssaop.OpConstNil:
   328  		return rewriteValue_OpConstNil(v)
   329  	case ssaop.OpCtz16:
   330  		return rewriteValue_OpCtz16(v)
   331  	case ssaop.OpCtz16NonZero:
   332  		v.Op = ssaop.Op386BSFL
   333  		return true
   334  	case ssaop.OpCtz32:
   335  		v.Op = ssaop.Op386LoweredCtz32
   336  		return true
   337  	case ssaop.OpCtz32NonZero:
   338  		v.Op = ssaop.Op386BSFL
   339  		return true
   340  	case ssaop.OpCtz64On32:
   341  		v.Op = ssaop.Op386LoweredCtz64
   342  		return true
   343  	case ssaop.OpCtz8:
   344  		return rewriteValue_OpCtz8(v)
   345  	case ssaop.OpCtz8NonZero:
   346  		v.Op = ssaop.Op386BSFL
   347  		return true
   348  	case ssaop.OpCvt32Fto32:
   349  		v.Op = ssaop.Op386CVTTSS2SL
   350  		return true
   351  	case ssaop.OpCvt32Fto64F:
   352  		v.Op = ssaop.Op386CVTSS2SD
   353  		return true
   354  	case ssaop.OpCvt32to32F:
   355  		v.Op = ssaop.Op386CVTSL2SS
   356  		return true
   357  	case ssaop.OpCvt32to64F:
   358  		v.Op = ssaop.Op386CVTSL2SD
   359  		return true
   360  	case ssaop.OpCvt64Fto32:
   361  		v.Op = ssaop.Op386CVTTSD2SL
   362  		return true
   363  	case ssaop.OpCvt64Fto32F:
   364  		v.Op = ssaop.Op386CVTSD2SS
   365  		return true
   366  	case ssaop.OpCvtBoolToUint8:
   367  		v.Op = ssaop.OpCopy
   368  		return true
   369  	case ssaop.OpDiv16:
   370  		v.Op = ssaop.Op386DIVW
   371  		return true
   372  	case ssaop.OpDiv16u:
   373  		v.Op = ssaop.Op386DIVWU
   374  		return true
   375  	case ssaop.OpDiv32:
   376  		v.Op = ssaop.Op386DIVL
   377  		return true
   378  	case ssaop.OpDiv32F:
   379  		v.Op = ssaop.Op386DIVSS
   380  		return true
   381  	case ssaop.OpDiv32u:
   382  		v.Op = ssaop.Op386DIVLU
   383  		return true
   384  	case ssaop.OpDiv64F:
   385  		v.Op = ssaop.Op386DIVSD
   386  		return true
   387  	case ssaop.OpDiv8:
   388  		return rewriteValue_OpDiv8(v)
   389  	case ssaop.OpDiv8u:
   390  		return rewriteValue_OpDiv8u(v)
   391  	case ssaop.OpEq16:
   392  		return rewriteValue_OpEq16(v)
   393  	case ssaop.OpEq32:
   394  		return rewriteValue_OpEq32(v)
   395  	case ssaop.OpEq32F:
   396  		return rewriteValue_OpEq32F(v)
   397  	case ssaop.OpEq64F:
   398  		return rewriteValue_OpEq64F(v)
   399  	case ssaop.OpEq8:
   400  		return rewriteValue_OpEq8(v)
   401  	case ssaop.OpEqB:
   402  		return rewriteValue_OpEqB(v)
   403  	case ssaop.OpEqPtr:
   404  		return rewriteValue_OpEqPtr(v)
   405  	case ssaop.OpGetCallerPC:
   406  		v.Op = ssaop.Op386LoweredGetCallerPC
   407  		return true
   408  	case ssaop.OpGetCallerSP:
   409  		v.Op = ssaop.Op386LoweredGetCallerSP
   410  		return true
   411  	case ssaop.OpGetClosurePtr:
   412  		v.Op = ssaop.Op386LoweredGetClosurePtr
   413  		return true
   414  	case ssaop.OpGetG:
   415  		v.Op = ssaop.Op386LoweredGetG
   416  		return true
   417  	case ssaop.OpHmul32:
   418  		v.Op = ssaop.Op386HMULL
   419  		return true
   420  	case ssaop.OpHmul32u:
   421  		v.Op = ssaop.Op386HMULLU
   422  		return true
   423  	case ssaop.OpInterCall:
   424  		v.Op = ssaop.Op386CALLinter
   425  		return true
   426  	case ssaop.OpIsInBounds:
   427  		return rewriteValue_OpIsInBounds(v)
   428  	case ssaop.OpIsNonNil:
   429  		return rewriteValue_OpIsNonNil(v)
   430  	case ssaop.OpIsSliceInBounds:
   431  		return rewriteValue_OpIsSliceInBounds(v)
   432  	case ssaop.OpLeq16:
   433  		return rewriteValue_OpLeq16(v)
   434  	case ssaop.OpLeq16U:
   435  		return rewriteValue_OpLeq16U(v)
   436  	case ssaop.OpLeq32:
   437  		return rewriteValue_OpLeq32(v)
   438  	case ssaop.OpLeq32F:
   439  		return rewriteValue_OpLeq32F(v)
   440  	case ssaop.OpLeq32U:
   441  		return rewriteValue_OpLeq32U(v)
   442  	case ssaop.OpLeq64F:
   443  		return rewriteValue_OpLeq64F(v)
   444  	case ssaop.OpLeq8:
   445  		return rewriteValue_OpLeq8(v)
   446  	case ssaop.OpLeq8U:
   447  		return rewriteValue_OpLeq8U(v)
   448  	case ssaop.OpLess16:
   449  		return rewriteValue_OpLess16(v)
   450  	case ssaop.OpLess16U:
   451  		return rewriteValue_OpLess16U(v)
   452  	case ssaop.OpLess32:
   453  		return rewriteValue_OpLess32(v)
   454  	case ssaop.OpLess32F:
   455  		return rewriteValue_OpLess32F(v)
   456  	case ssaop.OpLess32U:
   457  		return rewriteValue_OpLess32U(v)
   458  	case ssaop.OpLess64F:
   459  		return rewriteValue_OpLess64F(v)
   460  	case ssaop.OpLess8:
   461  		return rewriteValue_OpLess8(v)
   462  	case ssaop.OpLess8U:
   463  		return rewriteValue_OpLess8U(v)
   464  	case ssaop.OpLoad:
   465  		return rewriteValue_OpLoad(v)
   466  	case ssaop.OpLocalAddr:
   467  		return rewriteValue_OpLocalAddr(v)
   468  	case ssaop.OpLsh16x16:
   469  		return rewriteValue_OpLsh16x16(v)
   470  	case ssaop.OpLsh16x32:
   471  		return rewriteValue_OpLsh16x32(v)
   472  	case ssaop.OpLsh16x64:
   473  		return rewriteValue_OpLsh16x64(v)
   474  	case ssaop.OpLsh16x8:
   475  		return rewriteValue_OpLsh16x8(v)
   476  	case ssaop.OpLsh32x16:
   477  		return rewriteValue_OpLsh32x16(v)
   478  	case ssaop.OpLsh32x32:
   479  		return rewriteValue_OpLsh32x32(v)
   480  	case ssaop.OpLsh32x64:
   481  		return rewriteValue_OpLsh32x64(v)
   482  	case ssaop.OpLsh32x8:
   483  		return rewriteValue_OpLsh32x8(v)
   484  	case ssaop.OpLsh8x16:
   485  		return rewriteValue_OpLsh8x16(v)
   486  	case ssaop.OpLsh8x32:
   487  		return rewriteValue_OpLsh8x32(v)
   488  	case ssaop.OpLsh8x64:
   489  		return rewriteValue_OpLsh8x64(v)
   490  	case ssaop.OpLsh8x8:
   491  		return rewriteValue_OpLsh8x8(v)
   492  	case ssaop.OpMod16:
   493  		v.Op = ssaop.Op386MODW
   494  		return true
   495  	case ssaop.OpMod16u:
   496  		v.Op = ssaop.Op386MODWU
   497  		return true
   498  	case ssaop.OpMod32:
   499  		v.Op = ssaop.Op386MODL
   500  		return true
   501  	case ssaop.OpMod32u:
   502  		v.Op = ssaop.Op386MODLU
   503  		return true
   504  	case ssaop.OpMod8:
   505  		return rewriteValue_OpMod8(v)
   506  	case ssaop.OpMod8u:
   507  		return rewriteValue_OpMod8u(v)
   508  	case ssaop.OpMove:
   509  		return rewriteValue_OpMove(v)
   510  	case ssaop.OpMul16:
   511  		v.Op = ssaop.Op386MULL
   512  		return true
   513  	case ssaop.OpMul32:
   514  		v.Op = ssaop.Op386MULL
   515  		return true
   516  	case ssaop.OpMul32F:
   517  		v.Op = ssaop.Op386MULSS
   518  		return true
   519  	case ssaop.OpMul32uhilo:
   520  		v.Op = ssaop.Op386MULLQU
   521  		return true
   522  	case ssaop.OpMul64F:
   523  		v.Op = ssaop.Op386MULSD
   524  		return true
   525  	case ssaop.OpMul8:
   526  		v.Op = ssaop.Op386MULL
   527  		return true
   528  	case ssaop.OpNeg16:
   529  		v.Op = ssaop.Op386NEGL
   530  		return true
   531  	case ssaop.OpNeg32:
   532  		v.Op = ssaop.Op386NEGL
   533  		return true
   534  	case ssaop.OpNeg32F:
   535  		return rewriteValue_OpNeg32F(v)
   536  	case ssaop.OpNeg64F:
   537  		return rewriteValue_OpNeg64F(v)
   538  	case ssaop.OpNeg8:
   539  		v.Op = ssaop.Op386NEGL
   540  		return true
   541  	case ssaop.OpNeq16:
   542  		return rewriteValue_OpNeq16(v)
   543  	case ssaop.OpNeq32:
   544  		return rewriteValue_OpNeq32(v)
   545  	case ssaop.OpNeq32F:
   546  		return rewriteValue_OpNeq32F(v)
   547  	case ssaop.OpNeq64F:
   548  		return rewriteValue_OpNeq64F(v)
   549  	case ssaop.OpNeq8:
   550  		return rewriteValue_OpNeq8(v)
   551  	case ssaop.OpNeqB:
   552  		return rewriteValue_OpNeqB(v)
   553  	case ssaop.OpNeqPtr:
   554  		return rewriteValue_OpNeqPtr(v)
   555  	case ssaop.OpNilCheck:
   556  		v.Op = ssaop.Op386LoweredNilCheck
   557  		return true
   558  	case ssaop.OpNot:
   559  		return rewriteValue_OpNot(v)
   560  	case ssaop.OpOffPtr:
   561  		return rewriteValue_OpOffPtr(v)
   562  	case ssaop.OpOr16:
   563  		v.Op = ssaop.Op386ORL
   564  		return true
   565  	case ssaop.OpOr32:
   566  		v.Op = ssaop.Op386ORL
   567  		return true
   568  	case ssaop.OpOr8:
   569  		v.Op = ssaop.Op386ORL
   570  		return true
   571  	case ssaop.OpOrB:
   572  		v.Op = ssaop.Op386ORL
   573  		return true
   574  	case ssaop.OpPanicBounds:
   575  		v.Op = ssaop.Op386LoweredPanicBoundsRR
   576  		return true
   577  	case ssaop.OpPanicExtend:
   578  		v.Op = ssaop.Op386LoweredPanicExtendRR
   579  		return true
   580  	case ssaop.OpRotateLeft16:
   581  		v.Op = ssaop.Op386ROLW
   582  		return true
   583  	case ssaop.OpRotateLeft32:
   584  		v.Op = ssaop.Op386ROLL
   585  		return true
   586  	case ssaop.OpRotateLeft8:
   587  		v.Op = ssaop.Op386ROLB
   588  		return true
   589  	case ssaop.OpRound32F:
   590  		v.Op = ssaop.OpCopy
   591  		return true
   592  	case ssaop.OpRound64F:
   593  		v.Op = ssaop.OpCopy
   594  		return true
   595  	case ssaop.OpRsh16Ux16:
   596  		return rewriteValue_OpRsh16Ux16(v)
   597  	case ssaop.OpRsh16Ux32:
   598  		return rewriteValue_OpRsh16Ux32(v)
   599  	case ssaop.OpRsh16Ux64:
   600  		return rewriteValue_OpRsh16Ux64(v)
   601  	case ssaop.OpRsh16Ux8:
   602  		return rewriteValue_OpRsh16Ux8(v)
   603  	case ssaop.OpRsh16x16:
   604  		return rewriteValue_OpRsh16x16(v)
   605  	case ssaop.OpRsh16x32:
   606  		return rewriteValue_OpRsh16x32(v)
   607  	case ssaop.OpRsh16x64:
   608  		return rewriteValue_OpRsh16x64(v)
   609  	case ssaop.OpRsh16x8:
   610  		return rewriteValue_OpRsh16x8(v)
   611  	case ssaop.OpRsh32Ux16:
   612  		return rewriteValue_OpRsh32Ux16(v)
   613  	case ssaop.OpRsh32Ux32:
   614  		return rewriteValue_OpRsh32Ux32(v)
   615  	case ssaop.OpRsh32Ux64:
   616  		return rewriteValue_OpRsh32Ux64(v)
   617  	case ssaop.OpRsh32Ux8:
   618  		return rewriteValue_OpRsh32Ux8(v)
   619  	case ssaop.OpRsh32x16:
   620  		return rewriteValue_OpRsh32x16(v)
   621  	case ssaop.OpRsh32x32:
   622  		return rewriteValue_OpRsh32x32(v)
   623  	case ssaop.OpRsh32x64:
   624  		return rewriteValue_OpRsh32x64(v)
   625  	case ssaop.OpRsh32x8:
   626  		return rewriteValue_OpRsh32x8(v)
   627  	case ssaop.OpRsh8Ux16:
   628  		return rewriteValue_OpRsh8Ux16(v)
   629  	case ssaop.OpRsh8Ux32:
   630  		return rewriteValue_OpRsh8Ux32(v)
   631  	case ssaop.OpRsh8Ux64:
   632  		return rewriteValue_OpRsh8Ux64(v)
   633  	case ssaop.OpRsh8Ux8:
   634  		return rewriteValue_OpRsh8Ux8(v)
   635  	case ssaop.OpRsh8x16:
   636  		return rewriteValue_OpRsh8x16(v)
   637  	case ssaop.OpRsh8x32:
   638  		return rewriteValue_OpRsh8x32(v)
   639  	case ssaop.OpRsh8x64:
   640  		return rewriteValue_OpRsh8x64(v)
   641  	case ssaop.OpRsh8x8:
   642  		return rewriteValue_OpRsh8x8(v)
   643  	case ssaop.OpSelect0:
   644  		return rewriteValue_OpSelect0(v)
   645  	case ssaop.OpSelect1:
   646  		return rewriteValue_OpSelect1(v)
   647  	case ssaop.OpSignExt16to32:
   648  		v.Op = ssaop.Op386MOVWLSX
   649  		return true
   650  	case ssaop.OpSignExt8to16:
   651  		v.Op = ssaop.Op386MOVBLSX
   652  		return true
   653  	case ssaop.OpSignExt8to32:
   654  		v.Op = ssaop.Op386MOVBLSX
   655  		return true
   656  	case ssaop.OpSignmask:
   657  		return rewriteValue_OpSignmask(v)
   658  	case ssaop.OpSlicemask:
   659  		return rewriteValue_OpSlicemask(v)
   660  	case ssaop.OpSqrt:
   661  		v.Op = ssaop.Op386SQRTSD
   662  		return true
   663  	case ssaop.OpSqrt32:
   664  		v.Op = ssaop.Op386SQRTSS
   665  		return true
   666  	case ssaop.OpStaticCall:
   667  		v.Op = ssaop.Op386CALLstatic
   668  		return true
   669  	case ssaop.OpStore:
   670  		return rewriteValue_OpStore(v)
   671  	case ssaop.OpSub16:
   672  		v.Op = ssaop.Op386SUBL
   673  		return true
   674  	case ssaop.OpSub32:
   675  		v.Op = ssaop.Op386SUBL
   676  		return true
   677  	case ssaop.OpSub32F:
   678  		v.Op = ssaop.Op386SUBSS
   679  		return true
   680  	case ssaop.OpSub32carry:
   681  		v.Op = ssaop.Op386SUBLcarry
   682  		return true
   683  	case ssaop.OpSub32withcarry:
   684  		v.Op = ssaop.Op386SBBL
   685  		return true
   686  	case ssaop.OpSub64F:
   687  		v.Op = ssaop.Op386SUBSD
   688  		return true
   689  	case ssaop.OpSub8:
   690  		v.Op = ssaop.Op386SUBL
   691  		return true
   692  	case ssaop.OpSubPtr:
   693  		v.Op = ssaop.Op386SUBL
   694  		return true
   695  	case ssaop.OpTailCall:
   696  		v.Op = ssaop.Op386CALLtail
   697  		return true
   698  	case ssaop.OpTailCallInter:
   699  		v.Op = ssaop.Op386CALLtailinter
   700  		return true
   701  	case ssaop.OpTrunc16to8:
   702  		v.Op = ssaop.OpCopy
   703  		return true
   704  	case ssaop.OpTrunc32to16:
   705  		v.Op = ssaop.OpCopy
   706  		return true
   707  	case ssaop.OpTrunc32to8:
   708  		v.Op = ssaop.OpCopy
   709  		return true
   710  	case ssaop.OpWB:
   711  		v.Op = ssaop.Op386LoweredWB
   712  		return true
   713  	case ssaop.OpXor16:
   714  		v.Op = ssaop.Op386XORL
   715  		return true
   716  	case ssaop.OpXor32:
   717  		v.Op = ssaop.Op386XORL
   718  		return true
   719  	case ssaop.OpXor8:
   720  		v.Op = ssaop.Op386XORL
   721  		return true
   722  	case ssaop.OpZero:
   723  		return rewriteValue_OpZero(v)
   724  	case ssaop.OpZeroExt16to32:
   725  		v.Op = ssaop.Op386MOVWLZX
   726  		return true
   727  	case ssaop.OpZeroExt8to16:
   728  		v.Op = ssaop.Op386MOVBLZX
   729  		return true
   730  	case ssaop.OpZeroExt8to32:
   731  		v.Op = ssaop.Op386MOVBLZX
   732  		return true
   733  	case ssaop.OpZeromask:
   734  		return rewriteValue_OpZeromask(v)
   735  	}
   736  	return false
   737  }
   738  func rewriteValue_Op386ADCL(v *ssa.Value) bool {
   739  	v_2 := v.Args[2]
   740  	v_1 := v.Args[1]
   741  	v_0 := v.Args[0]
   742  	// match: (ADCL x (MOVLconst [c]) f)
   743  	// result: (ADCLconst [c] x f)
   744  	for {
   745  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   746  			x := v_0
   747  			if v_1.Op != ssaop.Op386MOVLconst {
   748  				continue
   749  			}
   750  			c := ssa.AuxIntToInt32(v_1.AuxInt)
   751  			f := v_2
   752  			v.Reset(ssaop.Op386ADCLconst)
   753  			v.AuxInt = ssa.Int32ToAuxInt(c)
   754  			v.AddArg2(x, f)
   755  			return true
   756  		}
   757  		break
   758  	}
   759  	return false
   760  }
   761  func rewriteValue_Op386ADDL(v *ssa.Value) bool {
   762  	v_1 := v.Args[1]
   763  	v_0 := v.Args[0]
   764  	// match: (ADDL x (MOVLconst <t> [c]))
   765  	// cond: !t.IsPtr()
   766  	// result: (ADDLconst [c] x)
   767  	for {
   768  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   769  			x := v_0
   770  			if v_1.Op != ssaop.Op386MOVLconst {
   771  				continue
   772  			}
   773  			t := v_1.Type
   774  			c := ssa.AuxIntToInt32(v_1.AuxInt)
   775  			if !(!t.IsPtr()) {
   776  				continue
   777  			}
   778  			v.Reset(ssaop.Op386ADDLconst)
   779  			v.AuxInt = ssa.Int32ToAuxInt(c)
   780  			v.AddArg(x)
   781  			return true
   782  		}
   783  		break
   784  	}
   785  	// match: (ADDL x (SHLLconst [3] y))
   786  	// result: (LEAL8 x y)
   787  	for {
   788  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   789  			x := v_0
   790  			if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 3 {
   791  				continue
   792  			}
   793  			y := v_1.Args[0]
   794  			v.Reset(ssaop.Op386LEAL8)
   795  			v.AddArg2(x, y)
   796  			return true
   797  		}
   798  		break
   799  	}
   800  	// match: (ADDL x (SHLLconst [2] y))
   801  	// result: (LEAL4 x y)
   802  	for {
   803  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   804  			x := v_0
   805  			if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 2 {
   806  				continue
   807  			}
   808  			y := v_1.Args[0]
   809  			v.Reset(ssaop.Op386LEAL4)
   810  			v.AddArg2(x, y)
   811  			return true
   812  		}
   813  		break
   814  	}
   815  	// match: (ADDL x (SHLLconst [1] y))
   816  	// result: (LEAL2 x y)
   817  	for {
   818  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   819  			x := v_0
   820  			if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 1 {
   821  				continue
   822  			}
   823  			y := v_1.Args[0]
   824  			v.Reset(ssaop.Op386LEAL2)
   825  			v.AddArg2(x, y)
   826  			return true
   827  		}
   828  		break
   829  	}
   830  	// match: (ADDL x (ADDL y y))
   831  	// result: (LEAL2 x y)
   832  	for {
   833  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   834  			x := v_0
   835  			if v_1.Op != ssaop.Op386ADDL {
   836  				continue
   837  			}
   838  			y := v_1.Args[1]
   839  			if y != v_1.Args[0] {
   840  				continue
   841  			}
   842  			v.Reset(ssaop.Op386LEAL2)
   843  			v.AddArg2(x, y)
   844  			return true
   845  		}
   846  		break
   847  	}
   848  	// match: (ADDL x (ADDL x y))
   849  	// result: (LEAL2 y x)
   850  	for {
   851  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   852  			x := v_0
   853  			if v_1.Op != ssaop.Op386ADDL {
   854  				continue
   855  			}
   856  			_ = v_1.Args[1]
   857  			v_1_0 := v_1.Args[0]
   858  			v_1_1 := v_1.Args[1]
   859  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
   860  				if x != v_1_0 {
   861  					continue
   862  				}
   863  				y := v_1_1
   864  				v.Reset(ssaop.Op386LEAL2)
   865  				v.AddArg2(y, x)
   866  				return true
   867  			}
   868  		}
   869  		break
   870  	}
   871  	// match: (ADDL (ADDLconst [c] x) y)
   872  	// result: (LEAL1 [c] x y)
   873  	for {
   874  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   875  			if v_0.Op != ssaop.Op386ADDLconst {
   876  				continue
   877  			}
   878  			c := ssa.AuxIntToInt32(v_0.AuxInt)
   879  			x := v_0.Args[0]
   880  			y := v_1
   881  			v.Reset(ssaop.Op386LEAL1)
   882  			v.AuxInt = ssa.Int32ToAuxInt(c)
   883  			v.AddArg2(x, y)
   884  			return true
   885  		}
   886  		break
   887  	}
   888  	// match: (ADDL x (LEAL [c] {s} y))
   889  	// cond: x.Op != ssaop.OpSB && y.Op != ssaop.OpSB
   890  	// result: (LEAL1 [c] {s} x y)
   891  	for {
   892  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   893  			x := v_0
   894  			if v_1.Op != ssaop.Op386LEAL {
   895  				continue
   896  			}
   897  			c := ssa.AuxIntToInt32(v_1.AuxInt)
   898  			s := ssa.AuxToSym(v_1.Aux)
   899  			y := v_1.Args[0]
   900  			if !(x.Op != ssaop.OpSB && y.Op != ssaop.OpSB) {
   901  				continue
   902  			}
   903  			v.Reset(ssaop.Op386LEAL1)
   904  			v.AuxInt = ssa.Int32ToAuxInt(c)
   905  			v.Aux = ssa.SymToAux(s)
   906  			v.AddArg2(x, y)
   907  			return true
   908  		}
   909  		break
   910  	}
   911  	// match: (ADDL x l:(MOVLload [off] {sym} ptr mem))
   912  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
   913  	// result: (ADDLload x [off] {sym} ptr mem)
   914  	for {
   915  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   916  			x := v_0
   917  			l := v_1
   918  			if l.Op != ssaop.Op386MOVLload {
   919  				continue
   920  			}
   921  			off := ssa.AuxIntToInt32(l.AuxInt)
   922  			sym := ssa.AuxToSym(l.Aux)
   923  			mem := l.Args[1]
   924  			ptr := l.Args[0]
   925  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
   926  				continue
   927  			}
   928  			v.Reset(ssaop.Op386ADDLload)
   929  			v.AuxInt = ssa.Int32ToAuxInt(off)
   930  			v.Aux = ssa.SymToAux(sym)
   931  			v.AddArg3(x, ptr, mem)
   932  			return true
   933  		}
   934  		break
   935  	}
   936  	// match: (ADDL x (NEGL y))
   937  	// result: (SUBL x y)
   938  	for {
   939  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   940  			x := v_0
   941  			if v_1.Op != ssaop.Op386NEGL {
   942  				continue
   943  			}
   944  			y := v_1.Args[0]
   945  			v.Reset(ssaop.Op386SUBL)
   946  			v.AddArg2(x, y)
   947  			return true
   948  		}
   949  		break
   950  	}
   951  	return false
   952  }
   953  func rewriteValue_Op386ADDLcarry(v *ssa.Value) bool {
   954  	v_1 := v.Args[1]
   955  	v_0 := v.Args[0]
   956  	// match: (ADDLcarry x (MOVLconst [c]))
   957  	// result: (ADDLconstcarry [c] x)
   958  	for {
   959  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   960  			x := v_0
   961  			if v_1.Op != ssaop.Op386MOVLconst {
   962  				continue
   963  			}
   964  			c := ssa.AuxIntToInt32(v_1.AuxInt)
   965  			v.Reset(ssaop.Op386ADDLconstcarry)
   966  			v.AuxInt = ssa.Int32ToAuxInt(c)
   967  			v.AddArg(x)
   968  			return true
   969  		}
   970  		break
   971  	}
   972  	return false
   973  }
   974  func rewriteValue_Op386ADDLconst(v *ssa.Value) bool {
   975  	v_0 := v.Args[0]
   976  	// match: (ADDLconst [c] (ADDL x y))
   977  	// result: (LEAL1 [c] x y)
   978  	for {
   979  		c := ssa.AuxIntToInt32(v.AuxInt)
   980  		if v_0.Op != ssaop.Op386ADDL {
   981  			break
   982  		}
   983  		y := v_0.Args[1]
   984  		x := v_0.Args[0]
   985  		v.Reset(ssaop.Op386LEAL1)
   986  		v.AuxInt = ssa.Int32ToAuxInt(c)
   987  		v.AddArg2(x, y)
   988  		return true
   989  	}
   990  	// match: (ADDLconst [c] (LEAL [d] {s} x))
   991  	// cond: ssa.Is32Bit(int64(c)+int64(d))
   992  	// result: (LEAL [c+d] {s} x)
   993  	for {
   994  		c := ssa.AuxIntToInt32(v.AuxInt)
   995  		if v_0.Op != ssaop.Op386LEAL {
   996  			break
   997  		}
   998  		d := ssa.AuxIntToInt32(v_0.AuxInt)
   999  		s := ssa.AuxToSym(v_0.Aux)
  1000  		x := v_0.Args[0]
  1001  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  1002  			break
  1003  		}
  1004  		v.Reset(ssaop.Op386LEAL)
  1005  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1006  		v.Aux = ssa.SymToAux(s)
  1007  		v.AddArg(x)
  1008  		return true
  1009  	}
  1010  	// match: (ADDLconst [c] x:(SP))
  1011  	// result: (LEAL [c] x)
  1012  	for {
  1013  		c := ssa.AuxIntToInt32(v.AuxInt)
  1014  		x := v_0
  1015  		if x.Op != ssaop.OpSP {
  1016  			break
  1017  		}
  1018  		v.Reset(ssaop.Op386LEAL)
  1019  		v.AuxInt = ssa.Int32ToAuxInt(c)
  1020  		v.AddArg(x)
  1021  		return true
  1022  	}
  1023  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
  1024  	// cond: ssa.Is32Bit(int64(c)+int64(d))
  1025  	// result: (LEAL1 [c+d] {s} x y)
  1026  	for {
  1027  		c := ssa.AuxIntToInt32(v.AuxInt)
  1028  		if v_0.Op != ssaop.Op386LEAL1 {
  1029  			break
  1030  		}
  1031  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1032  		s := ssa.AuxToSym(v_0.Aux)
  1033  		y := v_0.Args[1]
  1034  		x := v_0.Args[0]
  1035  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  1036  			break
  1037  		}
  1038  		v.Reset(ssaop.Op386LEAL1)
  1039  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1040  		v.Aux = ssa.SymToAux(s)
  1041  		v.AddArg2(x, y)
  1042  		return true
  1043  	}
  1044  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
  1045  	// cond: ssa.Is32Bit(int64(c)+int64(d))
  1046  	// result: (LEAL2 [c+d] {s} x y)
  1047  	for {
  1048  		c := ssa.AuxIntToInt32(v.AuxInt)
  1049  		if v_0.Op != ssaop.Op386LEAL2 {
  1050  			break
  1051  		}
  1052  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1053  		s := ssa.AuxToSym(v_0.Aux)
  1054  		y := v_0.Args[1]
  1055  		x := v_0.Args[0]
  1056  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  1057  			break
  1058  		}
  1059  		v.Reset(ssaop.Op386LEAL2)
  1060  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1061  		v.Aux = ssa.SymToAux(s)
  1062  		v.AddArg2(x, y)
  1063  		return true
  1064  	}
  1065  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
  1066  	// cond: ssa.Is32Bit(int64(c)+int64(d))
  1067  	// result: (LEAL4 [c+d] {s} x y)
  1068  	for {
  1069  		c := ssa.AuxIntToInt32(v.AuxInt)
  1070  		if v_0.Op != ssaop.Op386LEAL4 {
  1071  			break
  1072  		}
  1073  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1074  		s := ssa.AuxToSym(v_0.Aux)
  1075  		y := v_0.Args[1]
  1076  		x := v_0.Args[0]
  1077  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  1078  			break
  1079  		}
  1080  		v.Reset(ssaop.Op386LEAL4)
  1081  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1082  		v.Aux = ssa.SymToAux(s)
  1083  		v.AddArg2(x, y)
  1084  		return true
  1085  	}
  1086  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1087  	// cond: ssa.Is32Bit(int64(c)+int64(d))
  1088  	// result: (LEAL8 [c+d] {s} x y)
  1089  	for {
  1090  		c := ssa.AuxIntToInt32(v.AuxInt)
  1091  		if v_0.Op != ssaop.Op386LEAL8 {
  1092  			break
  1093  		}
  1094  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1095  		s := ssa.AuxToSym(v_0.Aux)
  1096  		y := v_0.Args[1]
  1097  		x := v_0.Args[0]
  1098  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  1099  			break
  1100  		}
  1101  		v.Reset(ssaop.Op386LEAL8)
  1102  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1103  		v.Aux = ssa.SymToAux(s)
  1104  		v.AddArg2(x, y)
  1105  		return true
  1106  	}
  1107  	// match: (ADDLconst [c] x)
  1108  	// cond: c==0
  1109  	// result: x
  1110  	for {
  1111  		c := ssa.AuxIntToInt32(v.AuxInt)
  1112  		x := v_0
  1113  		if !(c == 0) {
  1114  			break
  1115  		}
  1116  		v.CopyOf(x)
  1117  		return true
  1118  	}
  1119  	// match: (ADDLconst [c] (MOVLconst [d]))
  1120  	// result: (MOVLconst [c+d])
  1121  	for {
  1122  		c := ssa.AuxIntToInt32(v.AuxInt)
  1123  		if v_0.Op != ssaop.Op386MOVLconst {
  1124  			break
  1125  		}
  1126  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1127  		v.Reset(ssaop.Op386MOVLconst)
  1128  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1129  		return true
  1130  	}
  1131  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1132  	// result: (ADDLconst [c+d] x)
  1133  	for {
  1134  		c := ssa.AuxIntToInt32(v.AuxInt)
  1135  		if v_0.Op != ssaop.Op386ADDLconst {
  1136  			break
  1137  		}
  1138  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1139  		x := v_0.Args[0]
  1140  		v.Reset(ssaop.Op386ADDLconst)
  1141  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  1142  		v.AddArg(x)
  1143  		return true
  1144  	}
  1145  	return false
  1146  }
  1147  func rewriteValue_Op386ADDLconstmodify(v *ssa.Value) bool {
  1148  	v_1 := v.Args[1]
  1149  	v_0 := v.Args[0]
  1150  	b := v.Block
  1151  	config := b.Func.Config
  1152  	// match: (ADDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1153  	// cond: valoff1.CanAdd32(off2)
  1154  	// result: (ADDLconstmodify [valoff1.AddOffset32(off2)] {sym} base mem)
  1155  	for {
  1156  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  1157  		sym := ssa.AuxToSym(v.Aux)
  1158  		if v_0.Op != ssaop.Op386ADDLconst {
  1159  			break
  1160  		}
  1161  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1162  		base := v_0.Args[0]
  1163  		mem := v_1
  1164  		if !(valoff1.CanAdd32(off2)) {
  1165  			break
  1166  		}
  1167  		v.Reset(ssaop.Op386ADDLconstmodify)
  1168  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  1169  		v.Aux = ssa.SymToAux(sym)
  1170  		v.AddArg2(base, mem)
  1171  		return true
  1172  	}
  1173  	// match: (ADDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1174  	// cond: valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1175  	// result: (ADDLconstmodify [valoff1.AddOffset32(off2)] {ssa.MergeSym(sym1,sym2)} base mem)
  1176  	for {
  1177  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  1178  		sym1 := ssa.AuxToSym(v.Aux)
  1179  		if v_0.Op != ssaop.Op386LEAL {
  1180  			break
  1181  		}
  1182  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1183  		sym2 := ssa.AuxToSym(v_0.Aux)
  1184  		base := v_0.Args[0]
  1185  		mem := v_1
  1186  		if !(valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1187  			break
  1188  		}
  1189  		v.Reset(ssaop.Op386ADDLconstmodify)
  1190  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  1191  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1192  		v.AddArg2(base, mem)
  1193  		return true
  1194  	}
  1195  	return false
  1196  }
  1197  func rewriteValue_Op386ADDLload(v *ssa.Value) bool {
  1198  	v_2 := v.Args[2]
  1199  	v_1 := v.Args[1]
  1200  	v_0 := v.Args[0]
  1201  	b := v.Block
  1202  	config := b.Func.Config
  1203  	// match: (ADDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1204  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  1205  	// result: (ADDLload [off1+off2] {sym} val base mem)
  1206  	for {
  1207  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1208  		sym := ssa.AuxToSym(v.Aux)
  1209  		val := v_0
  1210  		if v_1.Op != ssaop.Op386ADDLconst {
  1211  			break
  1212  		}
  1213  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1214  		base := v_1.Args[0]
  1215  		mem := v_2
  1216  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  1217  			break
  1218  		}
  1219  		v.Reset(ssaop.Op386ADDLload)
  1220  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1221  		v.Aux = ssa.SymToAux(sym)
  1222  		v.AddArg3(val, base, mem)
  1223  		return true
  1224  	}
  1225  	// match: (ADDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1226  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1227  	// result: (ADDLload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  1228  	for {
  1229  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1230  		sym1 := ssa.AuxToSym(v.Aux)
  1231  		val := v_0
  1232  		if v_1.Op != ssaop.Op386LEAL {
  1233  			break
  1234  		}
  1235  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1236  		sym2 := ssa.AuxToSym(v_1.Aux)
  1237  		base := v_1.Args[0]
  1238  		mem := v_2
  1239  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1240  			break
  1241  		}
  1242  		v.Reset(ssaop.Op386ADDLload)
  1243  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1244  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1245  		v.AddArg3(val, base, mem)
  1246  		return true
  1247  	}
  1248  	return false
  1249  }
  1250  func rewriteValue_Op386ADDLmodify(v *ssa.Value) bool {
  1251  	v_2 := v.Args[2]
  1252  	v_1 := v.Args[1]
  1253  	v_0 := v.Args[0]
  1254  	b := v.Block
  1255  	config := b.Func.Config
  1256  	// match: (ADDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1257  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  1258  	// result: (ADDLmodify [off1+off2] {sym} base val mem)
  1259  	for {
  1260  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1261  		sym := ssa.AuxToSym(v.Aux)
  1262  		if v_0.Op != ssaop.Op386ADDLconst {
  1263  			break
  1264  		}
  1265  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1266  		base := v_0.Args[0]
  1267  		val := v_1
  1268  		mem := v_2
  1269  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  1270  			break
  1271  		}
  1272  		v.Reset(ssaop.Op386ADDLmodify)
  1273  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1274  		v.Aux = ssa.SymToAux(sym)
  1275  		v.AddArg3(base, val, mem)
  1276  		return true
  1277  	}
  1278  	// match: (ADDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1279  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1280  	// result: (ADDLmodify [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  1281  	for {
  1282  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1283  		sym1 := ssa.AuxToSym(v.Aux)
  1284  		if v_0.Op != ssaop.Op386LEAL {
  1285  			break
  1286  		}
  1287  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1288  		sym2 := ssa.AuxToSym(v_0.Aux)
  1289  		base := v_0.Args[0]
  1290  		val := v_1
  1291  		mem := v_2
  1292  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1293  			break
  1294  		}
  1295  		v.Reset(ssaop.Op386ADDLmodify)
  1296  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1297  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1298  		v.AddArg3(base, val, mem)
  1299  		return true
  1300  	}
  1301  	return false
  1302  }
  1303  func rewriteValue_Op386ADDSD(v *ssa.Value) bool {
  1304  	v_1 := v.Args[1]
  1305  	v_0 := v.Args[0]
  1306  	// match: (ADDSD x l:(MOVSDload [off] {sym} ptr mem))
  1307  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  1308  	// result: (ADDSDload x [off] {sym} ptr mem)
  1309  	for {
  1310  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1311  			x := v_0
  1312  			l := v_1
  1313  			if l.Op != ssaop.Op386MOVSDload {
  1314  				continue
  1315  			}
  1316  			off := ssa.AuxIntToInt32(l.AuxInt)
  1317  			sym := ssa.AuxToSym(l.Aux)
  1318  			mem := l.Args[1]
  1319  			ptr := l.Args[0]
  1320  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  1321  				continue
  1322  			}
  1323  			v.Reset(ssaop.Op386ADDSDload)
  1324  			v.AuxInt = ssa.Int32ToAuxInt(off)
  1325  			v.Aux = ssa.SymToAux(sym)
  1326  			v.AddArg3(x, ptr, mem)
  1327  			return true
  1328  		}
  1329  		break
  1330  	}
  1331  	return false
  1332  }
  1333  func rewriteValue_Op386ADDSDload(v *ssa.Value) bool {
  1334  	v_2 := v.Args[2]
  1335  	v_1 := v.Args[1]
  1336  	v_0 := v.Args[0]
  1337  	b := v.Block
  1338  	config := b.Func.Config
  1339  	// match: (ADDSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  1340  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  1341  	// result: (ADDSDload [off1+off2] {sym} val base mem)
  1342  	for {
  1343  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1344  		sym := ssa.AuxToSym(v.Aux)
  1345  		val := v_0
  1346  		if v_1.Op != ssaop.Op386ADDLconst {
  1347  			break
  1348  		}
  1349  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1350  		base := v_1.Args[0]
  1351  		mem := v_2
  1352  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  1353  			break
  1354  		}
  1355  		v.Reset(ssaop.Op386ADDSDload)
  1356  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1357  		v.Aux = ssa.SymToAux(sym)
  1358  		v.AddArg3(val, base, mem)
  1359  		return true
  1360  	}
  1361  	// match: (ADDSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1362  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1363  	// result: (ADDSDload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  1364  	for {
  1365  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1366  		sym1 := ssa.AuxToSym(v.Aux)
  1367  		val := v_0
  1368  		if v_1.Op != ssaop.Op386LEAL {
  1369  			break
  1370  		}
  1371  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1372  		sym2 := ssa.AuxToSym(v_1.Aux)
  1373  		base := v_1.Args[0]
  1374  		mem := v_2
  1375  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1376  			break
  1377  		}
  1378  		v.Reset(ssaop.Op386ADDSDload)
  1379  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1380  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1381  		v.AddArg3(val, base, mem)
  1382  		return true
  1383  	}
  1384  	return false
  1385  }
  1386  func rewriteValue_Op386ADDSS(v *ssa.Value) bool {
  1387  	v_1 := v.Args[1]
  1388  	v_0 := v.Args[0]
  1389  	// match: (ADDSS x l:(MOVSSload [off] {sym} ptr mem))
  1390  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  1391  	// result: (ADDSSload x [off] {sym} ptr mem)
  1392  	for {
  1393  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1394  			x := v_0
  1395  			l := v_1
  1396  			if l.Op != ssaop.Op386MOVSSload {
  1397  				continue
  1398  			}
  1399  			off := ssa.AuxIntToInt32(l.AuxInt)
  1400  			sym := ssa.AuxToSym(l.Aux)
  1401  			mem := l.Args[1]
  1402  			ptr := l.Args[0]
  1403  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  1404  				continue
  1405  			}
  1406  			v.Reset(ssaop.Op386ADDSSload)
  1407  			v.AuxInt = ssa.Int32ToAuxInt(off)
  1408  			v.Aux = ssa.SymToAux(sym)
  1409  			v.AddArg3(x, ptr, mem)
  1410  			return true
  1411  		}
  1412  		break
  1413  	}
  1414  	return false
  1415  }
  1416  func rewriteValue_Op386ADDSSload(v *ssa.Value) bool {
  1417  	v_2 := v.Args[2]
  1418  	v_1 := v.Args[1]
  1419  	v_0 := v.Args[0]
  1420  	b := v.Block
  1421  	config := b.Func.Config
  1422  	// match: (ADDSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  1423  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  1424  	// result: (ADDSSload [off1+off2] {sym} val base mem)
  1425  	for {
  1426  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1427  		sym := ssa.AuxToSym(v.Aux)
  1428  		val := v_0
  1429  		if v_1.Op != ssaop.Op386ADDLconst {
  1430  			break
  1431  		}
  1432  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1433  		base := v_1.Args[0]
  1434  		mem := v_2
  1435  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  1436  			break
  1437  		}
  1438  		v.Reset(ssaop.Op386ADDSSload)
  1439  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1440  		v.Aux = ssa.SymToAux(sym)
  1441  		v.AddArg3(val, base, mem)
  1442  		return true
  1443  	}
  1444  	// match: (ADDSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1445  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1446  	// result: (ADDSSload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  1447  	for {
  1448  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1449  		sym1 := ssa.AuxToSym(v.Aux)
  1450  		val := v_0
  1451  		if v_1.Op != ssaop.Op386LEAL {
  1452  			break
  1453  		}
  1454  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1455  		sym2 := ssa.AuxToSym(v_1.Aux)
  1456  		base := v_1.Args[0]
  1457  		mem := v_2
  1458  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1459  			break
  1460  		}
  1461  		v.Reset(ssaop.Op386ADDSSload)
  1462  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1463  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1464  		v.AddArg3(val, base, mem)
  1465  		return true
  1466  	}
  1467  	return false
  1468  }
  1469  func rewriteValue_Op386ANDL(v *ssa.Value) bool {
  1470  	v_1 := v.Args[1]
  1471  	v_0 := v.Args[0]
  1472  	// match: (ANDL x (MOVLconst [c]))
  1473  	// result: (ANDLconst [c] x)
  1474  	for {
  1475  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1476  			x := v_0
  1477  			if v_1.Op != ssaop.Op386MOVLconst {
  1478  				continue
  1479  			}
  1480  			c := ssa.AuxIntToInt32(v_1.AuxInt)
  1481  			v.Reset(ssaop.Op386ANDLconst)
  1482  			v.AuxInt = ssa.Int32ToAuxInt(c)
  1483  			v.AddArg(x)
  1484  			return true
  1485  		}
  1486  		break
  1487  	}
  1488  	// match: (ANDL x l:(MOVLload [off] {sym} ptr mem))
  1489  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  1490  	// result: (ANDLload x [off] {sym} ptr mem)
  1491  	for {
  1492  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1493  			x := v_0
  1494  			l := v_1
  1495  			if l.Op != ssaop.Op386MOVLload {
  1496  				continue
  1497  			}
  1498  			off := ssa.AuxIntToInt32(l.AuxInt)
  1499  			sym := ssa.AuxToSym(l.Aux)
  1500  			mem := l.Args[1]
  1501  			ptr := l.Args[0]
  1502  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  1503  				continue
  1504  			}
  1505  			v.Reset(ssaop.Op386ANDLload)
  1506  			v.AuxInt = ssa.Int32ToAuxInt(off)
  1507  			v.Aux = ssa.SymToAux(sym)
  1508  			v.AddArg3(x, ptr, mem)
  1509  			return true
  1510  		}
  1511  		break
  1512  	}
  1513  	// match: (ANDL x x)
  1514  	// result: x
  1515  	for {
  1516  		x := v_0
  1517  		if x != v_1 {
  1518  			break
  1519  		}
  1520  		v.CopyOf(x)
  1521  		return true
  1522  	}
  1523  	return false
  1524  }
  1525  func rewriteValue_Op386ANDLconst(v *ssa.Value) bool {
  1526  	v_0 := v.Args[0]
  1527  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1528  	// result: (ANDLconst [c & d] x)
  1529  	for {
  1530  		c := ssa.AuxIntToInt32(v.AuxInt)
  1531  		if v_0.Op != ssaop.Op386ANDLconst {
  1532  			break
  1533  		}
  1534  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1535  		x := v_0.Args[0]
  1536  		v.Reset(ssaop.Op386ANDLconst)
  1537  		v.AuxInt = ssa.Int32ToAuxInt(c & d)
  1538  		v.AddArg(x)
  1539  		return true
  1540  	}
  1541  	// match: (ANDLconst [c] _)
  1542  	// cond: c==0
  1543  	// result: (MOVLconst [0])
  1544  	for {
  1545  		c := ssa.AuxIntToInt32(v.AuxInt)
  1546  		if !(c == 0) {
  1547  			break
  1548  		}
  1549  		v.Reset(ssaop.Op386MOVLconst)
  1550  		v.AuxInt = ssa.Int32ToAuxInt(0)
  1551  		return true
  1552  	}
  1553  	// match: (ANDLconst [c] x)
  1554  	// cond: c==-1
  1555  	// result: x
  1556  	for {
  1557  		c := ssa.AuxIntToInt32(v.AuxInt)
  1558  		x := v_0
  1559  		if !(c == -1) {
  1560  			break
  1561  		}
  1562  		v.CopyOf(x)
  1563  		return true
  1564  	}
  1565  	// match: (ANDLconst [c] (MOVLconst [d]))
  1566  	// result: (MOVLconst [c&d])
  1567  	for {
  1568  		c := ssa.AuxIntToInt32(v.AuxInt)
  1569  		if v_0.Op != ssaop.Op386MOVLconst {
  1570  			break
  1571  		}
  1572  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  1573  		v.Reset(ssaop.Op386MOVLconst)
  1574  		v.AuxInt = ssa.Int32ToAuxInt(c & d)
  1575  		return true
  1576  	}
  1577  	return false
  1578  }
  1579  func rewriteValue_Op386ANDLconstmodify(v *ssa.Value) bool {
  1580  	v_1 := v.Args[1]
  1581  	v_0 := v.Args[0]
  1582  	b := v.Block
  1583  	config := b.Func.Config
  1584  	// match: (ANDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1585  	// cond: valoff1.CanAdd32(off2)
  1586  	// result: (ANDLconstmodify [valoff1.AddOffset32(off2)] {sym} base mem)
  1587  	for {
  1588  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  1589  		sym := ssa.AuxToSym(v.Aux)
  1590  		if v_0.Op != ssaop.Op386ADDLconst {
  1591  			break
  1592  		}
  1593  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1594  		base := v_0.Args[0]
  1595  		mem := v_1
  1596  		if !(valoff1.CanAdd32(off2)) {
  1597  			break
  1598  		}
  1599  		v.Reset(ssaop.Op386ANDLconstmodify)
  1600  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  1601  		v.Aux = ssa.SymToAux(sym)
  1602  		v.AddArg2(base, mem)
  1603  		return true
  1604  	}
  1605  	// match: (ANDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1606  	// cond: valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1607  	// result: (ANDLconstmodify [valoff1.AddOffset32(off2)] {ssa.MergeSym(sym1,sym2)} base mem)
  1608  	for {
  1609  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  1610  		sym1 := ssa.AuxToSym(v.Aux)
  1611  		if v_0.Op != ssaop.Op386LEAL {
  1612  			break
  1613  		}
  1614  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1615  		sym2 := ssa.AuxToSym(v_0.Aux)
  1616  		base := v_0.Args[0]
  1617  		mem := v_1
  1618  		if !(valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1619  			break
  1620  		}
  1621  		v.Reset(ssaop.Op386ANDLconstmodify)
  1622  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  1623  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1624  		v.AddArg2(base, mem)
  1625  		return true
  1626  	}
  1627  	return false
  1628  }
  1629  func rewriteValue_Op386ANDLload(v *ssa.Value) bool {
  1630  	v_2 := v.Args[2]
  1631  	v_1 := v.Args[1]
  1632  	v_0 := v.Args[0]
  1633  	b := v.Block
  1634  	config := b.Func.Config
  1635  	// match: (ANDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1636  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  1637  	// result: (ANDLload [off1+off2] {sym} val base mem)
  1638  	for {
  1639  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1640  		sym := ssa.AuxToSym(v.Aux)
  1641  		val := v_0
  1642  		if v_1.Op != ssaop.Op386ADDLconst {
  1643  			break
  1644  		}
  1645  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1646  		base := v_1.Args[0]
  1647  		mem := v_2
  1648  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  1649  			break
  1650  		}
  1651  		v.Reset(ssaop.Op386ANDLload)
  1652  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1653  		v.Aux = ssa.SymToAux(sym)
  1654  		v.AddArg3(val, base, mem)
  1655  		return true
  1656  	}
  1657  	// match: (ANDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1658  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1659  	// result: (ANDLload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  1660  	for {
  1661  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1662  		sym1 := ssa.AuxToSym(v.Aux)
  1663  		val := v_0
  1664  		if v_1.Op != ssaop.Op386LEAL {
  1665  			break
  1666  		}
  1667  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  1668  		sym2 := ssa.AuxToSym(v_1.Aux)
  1669  		base := v_1.Args[0]
  1670  		mem := v_2
  1671  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1672  			break
  1673  		}
  1674  		v.Reset(ssaop.Op386ANDLload)
  1675  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1676  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1677  		v.AddArg3(val, base, mem)
  1678  		return true
  1679  	}
  1680  	return false
  1681  }
  1682  func rewriteValue_Op386ANDLmodify(v *ssa.Value) bool {
  1683  	v_2 := v.Args[2]
  1684  	v_1 := v.Args[1]
  1685  	v_0 := v.Args[0]
  1686  	b := v.Block
  1687  	config := b.Func.Config
  1688  	// match: (ANDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1689  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  1690  	// result: (ANDLmodify [off1+off2] {sym} base val mem)
  1691  	for {
  1692  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1693  		sym := ssa.AuxToSym(v.Aux)
  1694  		if v_0.Op != ssaop.Op386ADDLconst {
  1695  			break
  1696  		}
  1697  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1698  		base := v_0.Args[0]
  1699  		val := v_1
  1700  		mem := v_2
  1701  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  1702  			break
  1703  		}
  1704  		v.Reset(ssaop.Op386ANDLmodify)
  1705  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1706  		v.Aux = ssa.SymToAux(sym)
  1707  		v.AddArg3(base, val, mem)
  1708  		return true
  1709  	}
  1710  	// match: (ANDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1711  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  1712  	// result: (ANDLmodify [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  1713  	for {
  1714  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  1715  		sym1 := ssa.AuxToSym(v.Aux)
  1716  		if v_0.Op != ssaop.Op386LEAL {
  1717  			break
  1718  		}
  1719  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  1720  		sym2 := ssa.AuxToSym(v_0.Aux)
  1721  		base := v_0.Args[0]
  1722  		val := v_1
  1723  		mem := v_2
  1724  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  1725  			break
  1726  		}
  1727  		v.Reset(ssaop.Op386ANDLmodify)
  1728  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  1729  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  1730  		v.AddArg3(base, val, mem)
  1731  		return true
  1732  	}
  1733  	return false
  1734  }
  1735  func rewriteValue_Op386CMPB(v *ssa.Value) bool {
  1736  	v_1 := v.Args[1]
  1737  	v_0 := v.Args[0]
  1738  	b := v.Block
  1739  	// match: (CMPB x (MOVLconst [c]))
  1740  	// result: (CMPBconst x [int8(c)])
  1741  	for {
  1742  		x := v_0
  1743  		if v_1.Op != ssaop.Op386MOVLconst {
  1744  			break
  1745  		}
  1746  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  1747  		v.Reset(ssaop.Op386CMPBconst)
  1748  		v.AuxInt = ssa.Int8ToAuxInt(int8(c))
  1749  		v.AddArg(x)
  1750  		return true
  1751  	}
  1752  	// match: (CMPB (MOVLconst [c]) x)
  1753  	// result: (InvertFlags (CMPBconst x [int8(c)]))
  1754  	for {
  1755  		if v_0.Op != ssaop.Op386MOVLconst {
  1756  			break
  1757  		}
  1758  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  1759  		x := v_1
  1760  		v.Reset(ssaop.Op386InvertFlags)
  1761  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  1762  		v0.AuxInt = ssa.Int8ToAuxInt(int8(c))
  1763  		v0.AddArg(x)
  1764  		v.AddArg(v0)
  1765  		return true
  1766  	}
  1767  	// match: (CMPB x y)
  1768  	// cond: ssa.CanonLessThan(x,y)
  1769  	// result: (InvertFlags (CMPB y x))
  1770  	for {
  1771  		x := v_0
  1772  		y := v_1
  1773  		if !(ssa.CanonLessThan(x, y)) {
  1774  			break
  1775  		}
  1776  		v.Reset(ssaop.Op386InvertFlags)
  1777  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  1778  		v0.AddArg2(y, x)
  1779  		v.AddArg(v0)
  1780  		return true
  1781  	}
  1782  	// match: (CMPB l:(MOVBload {sym} [off] ptr mem) x)
  1783  	// cond: ssa.CanMergeLoad(v, l) && ssa.Clobber(l)
  1784  	// result: (CMPBload {sym} [off] ptr x mem)
  1785  	for {
  1786  		l := v_0
  1787  		if l.Op != ssaop.Op386MOVBload {
  1788  			break
  1789  		}
  1790  		off := ssa.AuxIntToInt32(l.AuxInt)
  1791  		sym := ssa.AuxToSym(l.Aux)
  1792  		mem := l.Args[1]
  1793  		ptr := l.Args[0]
  1794  		x := v_1
  1795  		if !(ssa.CanMergeLoad(v, l) && ssa.Clobber(l)) {
  1796  			break
  1797  		}
  1798  		v.Reset(ssaop.Op386CMPBload)
  1799  		v.AuxInt = ssa.Int32ToAuxInt(off)
  1800  		v.Aux = ssa.SymToAux(sym)
  1801  		v.AddArg3(ptr, x, mem)
  1802  		return true
  1803  	}
  1804  	// match: (CMPB x l:(MOVBload {sym} [off] ptr mem))
  1805  	// cond: ssa.CanMergeLoad(v, l) && ssa.Clobber(l)
  1806  	// result: (InvertFlags (CMPBload {sym} [off] ptr x mem))
  1807  	for {
  1808  		x := v_0
  1809  		l := v_1
  1810  		if l.Op != ssaop.Op386MOVBload {
  1811  			break
  1812  		}
  1813  		off := ssa.AuxIntToInt32(l.AuxInt)
  1814  		sym := ssa.AuxToSym(l.Aux)
  1815  		mem := l.Args[1]
  1816  		ptr := l.Args[0]
  1817  		if !(ssa.CanMergeLoad(v, l) && ssa.Clobber(l)) {
  1818  			break
  1819  		}
  1820  		v.Reset(ssaop.Op386InvertFlags)
  1821  		v0 := b.NewValue0(l.Pos, ssaop.Op386CMPBload, types.TypeFlags)
  1822  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  1823  		v0.Aux = ssa.SymToAux(sym)
  1824  		v0.AddArg3(ptr, x, mem)
  1825  		v.AddArg(v0)
  1826  		return true
  1827  	}
  1828  	return false
  1829  }
  1830  func rewriteValue_Op386CMPBconst(v *ssa.Value) bool {
  1831  	v_0 := v.Args[0]
  1832  	b := v.Block
  1833  	// match: (CMPBconst (MOVLconst [x]) [y])
  1834  	// cond: int8(x)==y
  1835  	// result: (FlagEQ)
  1836  	for {
  1837  		y := ssa.AuxIntToInt8(v.AuxInt)
  1838  		if v_0.Op != ssaop.Op386MOVLconst {
  1839  			break
  1840  		}
  1841  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  1842  		if !(int8(x) == y) {
  1843  			break
  1844  		}
  1845  		v.Reset(ssaop.Op386FlagEQ)
  1846  		return true
  1847  	}
  1848  	// match: (CMPBconst (MOVLconst [x]) [y])
  1849  	// cond: int8(x)<y && uint8(x)<uint8(y)
  1850  	// result: (FlagLT_ULT)
  1851  	for {
  1852  		y := ssa.AuxIntToInt8(v.AuxInt)
  1853  		if v_0.Op != ssaop.Op386MOVLconst {
  1854  			break
  1855  		}
  1856  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  1857  		if !(int8(x) < y && uint8(x) < uint8(y)) {
  1858  			break
  1859  		}
  1860  		v.Reset(ssaop.Op386FlagLT_ULT)
  1861  		return true
  1862  	}
  1863  	// match: (CMPBconst (MOVLconst [x]) [y])
  1864  	// cond: int8(x)<y && uint8(x)>uint8(y)
  1865  	// result: (FlagLT_UGT)
  1866  	for {
  1867  		y := ssa.AuxIntToInt8(v.AuxInt)
  1868  		if v_0.Op != ssaop.Op386MOVLconst {
  1869  			break
  1870  		}
  1871  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  1872  		if !(int8(x) < y && uint8(x) > uint8(y)) {
  1873  			break
  1874  		}
  1875  		v.Reset(ssaop.Op386FlagLT_UGT)
  1876  		return true
  1877  	}
  1878  	// match: (CMPBconst (MOVLconst [x]) [y])
  1879  	// cond: int8(x)>y && uint8(x)<uint8(y)
  1880  	// result: (FlagGT_ULT)
  1881  	for {
  1882  		y := ssa.AuxIntToInt8(v.AuxInt)
  1883  		if v_0.Op != ssaop.Op386MOVLconst {
  1884  			break
  1885  		}
  1886  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  1887  		if !(int8(x) > y && uint8(x) < uint8(y)) {
  1888  			break
  1889  		}
  1890  		v.Reset(ssaop.Op386FlagGT_ULT)
  1891  		return true
  1892  	}
  1893  	// match: (CMPBconst (MOVLconst [x]) [y])
  1894  	// cond: int8(x)>y && uint8(x)>uint8(y)
  1895  	// result: (FlagGT_UGT)
  1896  	for {
  1897  		y := ssa.AuxIntToInt8(v.AuxInt)
  1898  		if v_0.Op != ssaop.Op386MOVLconst {
  1899  			break
  1900  		}
  1901  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  1902  		if !(int8(x) > y && uint8(x) > uint8(y)) {
  1903  			break
  1904  		}
  1905  		v.Reset(ssaop.Op386FlagGT_UGT)
  1906  		return true
  1907  	}
  1908  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1909  	// cond: 0 <= int8(m) && int8(m) < n
  1910  	// result: (FlagLT_ULT)
  1911  	for {
  1912  		n := ssa.AuxIntToInt8(v.AuxInt)
  1913  		if v_0.Op != ssaop.Op386ANDLconst {
  1914  			break
  1915  		}
  1916  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  1917  		if !(0 <= int8(m) && int8(m) < n) {
  1918  			break
  1919  		}
  1920  		v.Reset(ssaop.Op386FlagLT_ULT)
  1921  		return true
  1922  	}
  1923  	// match: (CMPBconst l:(ANDL x y) [0])
  1924  	// cond: l.Uses==1
  1925  	// result: (TESTB x y)
  1926  	for {
  1927  		if ssa.AuxIntToInt8(v.AuxInt) != 0 {
  1928  			break
  1929  		}
  1930  		l := v_0
  1931  		if l.Op != ssaop.Op386ANDL {
  1932  			break
  1933  		}
  1934  		y := l.Args[1]
  1935  		x := l.Args[0]
  1936  		if !(l.Uses == 1) {
  1937  			break
  1938  		}
  1939  		v.Reset(ssaop.Op386TESTB)
  1940  		v.AddArg2(x, y)
  1941  		return true
  1942  	}
  1943  	// match: (CMPBconst l:(ANDLconst [c] x) [0])
  1944  	// cond: l.Uses==1
  1945  	// result: (TESTBconst [int8(c)] x)
  1946  	for {
  1947  		if ssa.AuxIntToInt8(v.AuxInt) != 0 {
  1948  			break
  1949  		}
  1950  		l := v_0
  1951  		if l.Op != ssaop.Op386ANDLconst {
  1952  			break
  1953  		}
  1954  		c := ssa.AuxIntToInt32(l.AuxInt)
  1955  		x := l.Args[0]
  1956  		if !(l.Uses == 1) {
  1957  			break
  1958  		}
  1959  		v.Reset(ssaop.Op386TESTBconst)
  1960  		v.AuxInt = ssa.Int8ToAuxInt(int8(c))
  1961  		v.AddArg(x)
  1962  		return true
  1963  	}
  1964  	// match: (CMPBconst x [0])
  1965  	// result: (TESTB x x)
  1966  	for {
  1967  		if ssa.AuxIntToInt8(v.AuxInt) != 0 {
  1968  			break
  1969  		}
  1970  		x := v_0
  1971  		v.Reset(ssaop.Op386TESTB)
  1972  		v.AddArg2(x, x)
  1973  		return true
  1974  	}
  1975  	// match: (CMPBconst l:(MOVBload {sym} [off] ptr mem) [c])
  1976  	// cond: l.Uses == 1 && ssa.Clobber(l)
  1977  	// result: @l.Block (CMPBconstload {sym} [ssa.MakeValAndOff(int32(c),off)] ptr mem)
  1978  	for {
  1979  		c := ssa.AuxIntToInt8(v.AuxInt)
  1980  		l := v_0
  1981  		if l.Op != ssaop.Op386MOVBload {
  1982  			break
  1983  		}
  1984  		off := ssa.AuxIntToInt32(l.AuxInt)
  1985  		sym := ssa.AuxToSym(l.Aux)
  1986  		mem := l.Args[1]
  1987  		ptr := l.Args[0]
  1988  		if !(l.Uses == 1 && ssa.Clobber(l)) {
  1989  			break
  1990  		}
  1991  		b = l.Block
  1992  		v0 := b.NewValue0(l.Pos, ssaop.Op386CMPBconstload, types.TypeFlags)
  1993  		v.CopyOf(v0)
  1994  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(c), off))
  1995  		v0.Aux = ssa.SymToAux(sym)
  1996  		v0.AddArg2(ptr, mem)
  1997  		return true
  1998  	}
  1999  	return false
  2000  }
  2001  func rewriteValue_Op386CMPBload(v *ssa.Value) bool {
  2002  	v_2 := v.Args[2]
  2003  	v_1 := v.Args[1]
  2004  	v_0 := v.Args[0]
  2005  	// match: (CMPBload {sym} [off] ptr (MOVLconst [c]) mem)
  2006  	// result: (CMPBconstload {sym} [ssa.MakeValAndOff(int32(int8(c)),off)] ptr mem)
  2007  	for {
  2008  		off := ssa.AuxIntToInt32(v.AuxInt)
  2009  		sym := ssa.AuxToSym(v.Aux)
  2010  		ptr := v_0
  2011  		if v_1.Op != ssaop.Op386MOVLconst {
  2012  			break
  2013  		}
  2014  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  2015  		mem := v_2
  2016  		v.Reset(ssaop.Op386CMPBconstload)
  2017  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(int8(c)), off))
  2018  		v.Aux = ssa.SymToAux(sym)
  2019  		v.AddArg2(ptr, mem)
  2020  		return true
  2021  	}
  2022  	return false
  2023  }
  2024  func rewriteValue_Op386CMPL(v *ssa.Value) bool {
  2025  	v_1 := v.Args[1]
  2026  	v_0 := v.Args[0]
  2027  	b := v.Block
  2028  	// match: (CMPL x (MOVLconst [c]))
  2029  	// result: (CMPLconst x [c])
  2030  	for {
  2031  		x := v_0
  2032  		if v_1.Op != ssaop.Op386MOVLconst {
  2033  			break
  2034  		}
  2035  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  2036  		v.Reset(ssaop.Op386CMPLconst)
  2037  		v.AuxInt = ssa.Int32ToAuxInt(c)
  2038  		v.AddArg(x)
  2039  		return true
  2040  	}
  2041  	// match: (CMPL (MOVLconst [c]) x)
  2042  	// result: (InvertFlags (CMPLconst x [c]))
  2043  	for {
  2044  		if v_0.Op != ssaop.Op386MOVLconst {
  2045  			break
  2046  		}
  2047  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  2048  		x := v_1
  2049  		v.Reset(ssaop.Op386InvertFlags)
  2050  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  2051  		v0.AuxInt = ssa.Int32ToAuxInt(c)
  2052  		v0.AddArg(x)
  2053  		v.AddArg(v0)
  2054  		return true
  2055  	}
  2056  	// match: (CMPL x y)
  2057  	// cond: ssa.CanonLessThan(x,y)
  2058  	// result: (InvertFlags (CMPL y x))
  2059  	for {
  2060  		x := v_0
  2061  		y := v_1
  2062  		if !(ssa.CanonLessThan(x, y)) {
  2063  			break
  2064  		}
  2065  		v.Reset(ssaop.Op386InvertFlags)
  2066  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  2067  		v0.AddArg2(y, x)
  2068  		v.AddArg(v0)
  2069  		return true
  2070  	}
  2071  	// match: (CMPL l:(MOVLload {sym} [off] ptr mem) x)
  2072  	// cond: ssa.CanMergeLoad(v, l) && ssa.Clobber(l)
  2073  	// result: (CMPLload {sym} [off] ptr x mem)
  2074  	for {
  2075  		l := v_0
  2076  		if l.Op != ssaop.Op386MOVLload {
  2077  			break
  2078  		}
  2079  		off := ssa.AuxIntToInt32(l.AuxInt)
  2080  		sym := ssa.AuxToSym(l.Aux)
  2081  		mem := l.Args[1]
  2082  		ptr := l.Args[0]
  2083  		x := v_1
  2084  		if !(ssa.CanMergeLoad(v, l) && ssa.Clobber(l)) {
  2085  			break
  2086  		}
  2087  		v.Reset(ssaop.Op386CMPLload)
  2088  		v.AuxInt = ssa.Int32ToAuxInt(off)
  2089  		v.Aux = ssa.SymToAux(sym)
  2090  		v.AddArg3(ptr, x, mem)
  2091  		return true
  2092  	}
  2093  	// match: (CMPL x l:(MOVLload {sym} [off] ptr mem))
  2094  	// cond: ssa.CanMergeLoad(v, l) && ssa.Clobber(l)
  2095  	// result: (InvertFlags (CMPLload {sym} [off] ptr x mem))
  2096  	for {
  2097  		x := v_0
  2098  		l := v_1
  2099  		if l.Op != ssaop.Op386MOVLload {
  2100  			break
  2101  		}
  2102  		off := ssa.AuxIntToInt32(l.AuxInt)
  2103  		sym := ssa.AuxToSym(l.Aux)
  2104  		mem := l.Args[1]
  2105  		ptr := l.Args[0]
  2106  		if !(ssa.CanMergeLoad(v, l) && ssa.Clobber(l)) {
  2107  			break
  2108  		}
  2109  		v.Reset(ssaop.Op386InvertFlags)
  2110  		v0 := b.NewValue0(l.Pos, ssaop.Op386CMPLload, types.TypeFlags)
  2111  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  2112  		v0.Aux = ssa.SymToAux(sym)
  2113  		v0.AddArg3(ptr, x, mem)
  2114  		v.AddArg(v0)
  2115  		return true
  2116  	}
  2117  	return false
  2118  }
  2119  func rewriteValue_Op386CMPLconst(v *ssa.Value) bool {
  2120  	v_0 := v.Args[0]
  2121  	b := v.Block
  2122  	// match: (CMPLconst (MOVLconst [x]) [y])
  2123  	// cond: x==y
  2124  	// result: (FlagEQ)
  2125  	for {
  2126  		y := ssa.AuxIntToInt32(v.AuxInt)
  2127  		if v_0.Op != ssaop.Op386MOVLconst {
  2128  			break
  2129  		}
  2130  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2131  		if !(x == y) {
  2132  			break
  2133  		}
  2134  		v.Reset(ssaop.Op386FlagEQ)
  2135  		return true
  2136  	}
  2137  	// match: (CMPLconst (MOVLconst [x]) [y])
  2138  	// cond: x<y && uint32(x)<uint32(y)
  2139  	// result: (FlagLT_ULT)
  2140  	for {
  2141  		y := ssa.AuxIntToInt32(v.AuxInt)
  2142  		if v_0.Op != ssaop.Op386MOVLconst {
  2143  			break
  2144  		}
  2145  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2146  		if !(x < y && uint32(x) < uint32(y)) {
  2147  			break
  2148  		}
  2149  		v.Reset(ssaop.Op386FlagLT_ULT)
  2150  		return true
  2151  	}
  2152  	// match: (CMPLconst (MOVLconst [x]) [y])
  2153  	// cond: x<y && uint32(x)>uint32(y)
  2154  	// result: (FlagLT_UGT)
  2155  	for {
  2156  		y := ssa.AuxIntToInt32(v.AuxInt)
  2157  		if v_0.Op != ssaop.Op386MOVLconst {
  2158  			break
  2159  		}
  2160  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2161  		if !(x < y && uint32(x) > uint32(y)) {
  2162  			break
  2163  		}
  2164  		v.Reset(ssaop.Op386FlagLT_UGT)
  2165  		return true
  2166  	}
  2167  	// match: (CMPLconst (MOVLconst [x]) [y])
  2168  	// cond: x>y && uint32(x)<uint32(y)
  2169  	// result: (FlagGT_ULT)
  2170  	for {
  2171  		y := ssa.AuxIntToInt32(v.AuxInt)
  2172  		if v_0.Op != ssaop.Op386MOVLconst {
  2173  			break
  2174  		}
  2175  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2176  		if !(x > y && uint32(x) < uint32(y)) {
  2177  			break
  2178  		}
  2179  		v.Reset(ssaop.Op386FlagGT_ULT)
  2180  		return true
  2181  	}
  2182  	// match: (CMPLconst (MOVLconst [x]) [y])
  2183  	// cond: x>y && uint32(x)>uint32(y)
  2184  	// result: (FlagGT_UGT)
  2185  	for {
  2186  		y := ssa.AuxIntToInt32(v.AuxInt)
  2187  		if v_0.Op != ssaop.Op386MOVLconst {
  2188  			break
  2189  		}
  2190  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2191  		if !(x > y && uint32(x) > uint32(y)) {
  2192  			break
  2193  		}
  2194  		v.Reset(ssaop.Op386FlagGT_UGT)
  2195  		return true
  2196  	}
  2197  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  2198  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  2199  	// result: (FlagLT_ULT)
  2200  	for {
  2201  		n := ssa.AuxIntToInt32(v.AuxInt)
  2202  		if v_0.Op != ssaop.Op386SHRLconst {
  2203  			break
  2204  		}
  2205  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  2206  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  2207  			break
  2208  		}
  2209  		v.Reset(ssaop.Op386FlagLT_ULT)
  2210  		return true
  2211  	}
  2212  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  2213  	// cond: 0 <= m && m < n
  2214  	// result: (FlagLT_ULT)
  2215  	for {
  2216  		n := ssa.AuxIntToInt32(v.AuxInt)
  2217  		if v_0.Op != ssaop.Op386ANDLconst {
  2218  			break
  2219  		}
  2220  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  2221  		if !(0 <= m && m < n) {
  2222  			break
  2223  		}
  2224  		v.Reset(ssaop.Op386FlagLT_ULT)
  2225  		return true
  2226  	}
  2227  	// match: (CMPLconst l:(ANDL x y) [0])
  2228  	// cond: l.Uses==1
  2229  	// result: (TESTL x y)
  2230  	for {
  2231  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  2232  			break
  2233  		}
  2234  		l := v_0
  2235  		if l.Op != ssaop.Op386ANDL {
  2236  			break
  2237  		}
  2238  		y := l.Args[1]
  2239  		x := l.Args[0]
  2240  		if !(l.Uses == 1) {
  2241  			break
  2242  		}
  2243  		v.Reset(ssaop.Op386TESTL)
  2244  		v.AddArg2(x, y)
  2245  		return true
  2246  	}
  2247  	// match: (CMPLconst l:(ANDLconst [c] x) [0])
  2248  	// cond: l.Uses==1
  2249  	// result: (TESTLconst [c] x)
  2250  	for {
  2251  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  2252  			break
  2253  		}
  2254  		l := v_0
  2255  		if l.Op != ssaop.Op386ANDLconst {
  2256  			break
  2257  		}
  2258  		c := ssa.AuxIntToInt32(l.AuxInt)
  2259  		x := l.Args[0]
  2260  		if !(l.Uses == 1) {
  2261  			break
  2262  		}
  2263  		v.Reset(ssaop.Op386TESTLconst)
  2264  		v.AuxInt = ssa.Int32ToAuxInt(c)
  2265  		v.AddArg(x)
  2266  		return true
  2267  	}
  2268  	// match: (CMPLconst x [0])
  2269  	// result: (TESTL x x)
  2270  	for {
  2271  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  2272  			break
  2273  		}
  2274  		x := v_0
  2275  		v.Reset(ssaop.Op386TESTL)
  2276  		v.AddArg2(x, x)
  2277  		return true
  2278  	}
  2279  	// match: (CMPLconst l:(MOVLload {sym} [off] ptr mem) [c])
  2280  	// cond: l.Uses == 1 && ssa.Clobber(l)
  2281  	// result: @l.Block (CMPLconstload {sym} [ssa.MakeValAndOff(int32(c),off)] ptr mem)
  2282  	for {
  2283  		c := ssa.AuxIntToInt32(v.AuxInt)
  2284  		l := v_0
  2285  		if l.Op != ssaop.Op386MOVLload {
  2286  			break
  2287  		}
  2288  		off := ssa.AuxIntToInt32(l.AuxInt)
  2289  		sym := ssa.AuxToSym(l.Aux)
  2290  		mem := l.Args[1]
  2291  		ptr := l.Args[0]
  2292  		if !(l.Uses == 1 && ssa.Clobber(l)) {
  2293  			break
  2294  		}
  2295  		b = l.Block
  2296  		v0 := b.NewValue0(l.Pos, ssaop.Op386CMPLconstload, types.TypeFlags)
  2297  		v.CopyOf(v0)
  2298  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(c), off))
  2299  		v0.Aux = ssa.SymToAux(sym)
  2300  		v0.AddArg2(ptr, mem)
  2301  		return true
  2302  	}
  2303  	return false
  2304  }
  2305  func rewriteValue_Op386CMPLload(v *ssa.Value) bool {
  2306  	v_2 := v.Args[2]
  2307  	v_1 := v.Args[1]
  2308  	v_0 := v.Args[0]
  2309  	// match: (CMPLload {sym} [off] ptr (MOVLconst [c]) mem)
  2310  	// result: (CMPLconstload {sym} [ssa.MakeValAndOff(c,off)] ptr mem)
  2311  	for {
  2312  		off := ssa.AuxIntToInt32(v.AuxInt)
  2313  		sym := ssa.AuxToSym(v.Aux)
  2314  		ptr := v_0
  2315  		if v_1.Op != ssaop.Op386MOVLconst {
  2316  			break
  2317  		}
  2318  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  2319  		mem := v_2
  2320  		v.Reset(ssaop.Op386CMPLconstload)
  2321  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  2322  		v.Aux = ssa.SymToAux(sym)
  2323  		v.AddArg2(ptr, mem)
  2324  		return true
  2325  	}
  2326  	return false
  2327  }
  2328  func rewriteValue_Op386CMPW(v *ssa.Value) bool {
  2329  	v_1 := v.Args[1]
  2330  	v_0 := v.Args[0]
  2331  	b := v.Block
  2332  	// match: (CMPW x (MOVLconst [c]))
  2333  	// result: (CMPWconst x [int16(c)])
  2334  	for {
  2335  		x := v_0
  2336  		if v_1.Op != ssaop.Op386MOVLconst {
  2337  			break
  2338  		}
  2339  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  2340  		v.Reset(ssaop.Op386CMPWconst)
  2341  		v.AuxInt = ssa.Int16ToAuxInt(int16(c))
  2342  		v.AddArg(x)
  2343  		return true
  2344  	}
  2345  	// match: (CMPW (MOVLconst [c]) x)
  2346  	// result: (InvertFlags (CMPWconst x [int16(c)]))
  2347  	for {
  2348  		if v_0.Op != ssaop.Op386MOVLconst {
  2349  			break
  2350  		}
  2351  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  2352  		x := v_1
  2353  		v.Reset(ssaop.Op386InvertFlags)
  2354  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  2355  		v0.AuxInt = ssa.Int16ToAuxInt(int16(c))
  2356  		v0.AddArg(x)
  2357  		v.AddArg(v0)
  2358  		return true
  2359  	}
  2360  	// match: (CMPW x y)
  2361  	// cond: ssa.CanonLessThan(x,y)
  2362  	// result: (InvertFlags (CMPW y x))
  2363  	for {
  2364  		x := v_0
  2365  		y := v_1
  2366  		if !(ssa.CanonLessThan(x, y)) {
  2367  			break
  2368  		}
  2369  		v.Reset(ssaop.Op386InvertFlags)
  2370  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  2371  		v0.AddArg2(y, x)
  2372  		v.AddArg(v0)
  2373  		return true
  2374  	}
  2375  	// match: (CMPW l:(MOVWload {sym} [off] ptr mem) x)
  2376  	// cond: ssa.CanMergeLoad(v, l) && ssa.Clobber(l)
  2377  	// result: (CMPWload {sym} [off] ptr x mem)
  2378  	for {
  2379  		l := v_0
  2380  		if l.Op != ssaop.Op386MOVWload {
  2381  			break
  2382  		}
  2383  		off := ssa.AuxIntToInt32(l.AuxInt)
  2384  		sym := ssa.AuxToSym(l.Aux)
  2385  		mem := l.Args[1]
  2386  		ptr := l.Args[0]
  2387  		x := v_1
  2388  		if !(ssa.CanMergeLoad(v, l) && ssa.Clobber(l)) {
  2389  			break
  2390  		}
  2391  		v.Reset(ssaop.Op386CMPWload)
  2392  		v.AuxInt = ssa.Int32ToAuxInt(off)
  2393  		v.Aux = ssa.SymToAux(sym)
  2394  		v.AddArg3(ptr, x, mem)
  2395  		return true
  2396  	}
  2397  	// match: (CMPW x l:(MOVWload {sym} [off] ptr mem))
  2398  	// cond: ssa.CanMergeLoad(v, l) && ssa.Clobber(l)
  2399  	// result: (InvertFlags (CMPWload {sym} [off] ptr x mem))
  2400  	for {
  2401  		x := v_0
  2402  		l := v_1
  2403  		if l.Op != ssaop.Op386MOVWload {
  2404  			break
  2405  		}
  2406  		off := ssa.AuxIntToInt32(l.AuxInt)
  2407  		sym := ssa.AuxToSym(l.Aux)
  2408  		mem := l.Args[1]
  2409  		ptr := l.Args[0]
  2410  		if !(ssa.CanMergeLoad(v, l) && ssa.Clobber(l)) {
  2411  			break
  2412  		}
  2413  		v.Reset(ssaop.Op386InvertFlags)
  2414  		v0 := b.NewValue0(l.Pos, ssaop.Op386CMPWload, types.TypeFlags)
  2415  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  2416  		v0.Aux = ssa.SymToAux(sym)
  2417  		v0.AddArg3(ptr, x, mem)
  2418  		v.AddArg(v0)
  2419  		return true
  2420  	}
  2421  	return false
  2422  }
  2423  func rewriteValue_Op386CMPWconst(v *ssa.Value) bool {
  2424  	v_0 := v.Args[0]
  2425  	b := v.Block
  2426  	// match: (CMPWconst (MOVLconst [x]) [y])
  2427  	// cond: int16(x)==y
  2428  	// result: (FlagEQ)
  2429  	for {
  2430  		y := ssa.AuxIntToInt16(v.AuxInt)
  2431  		if v_0.Op != ssaop.Op386MOVLconst {
  2432  			break
  2433  		}
  2434  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2435  		if !(int16(x) == y) {
  2436  			break
  2437  		}
  2438  		v.Reset(ssaop.Op386FlagEQ)
  2439  		return true
  2440  	}
  2441  	// match: (CMPWconst (MOVLconst [x]) [y])
  2442  	// cond: int16(x)<y && uint16(x)<uint16(y)
  2443  	// result: (FlagLT_ULT)
  2444  	for {
  2445  		y := ssa.AuxIntToInt16(v.AuxInt)
  2446  		if v_0.Op != ssaop.Op386MOVLconst {
  2447  			break
  2448  		}
  2449  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2450  		if !(int16(x) < y && uint16(x) < uint16(y)) {
  2451  			break
  2452  		}
  2453  		v.Reset(ssaop.Op386FlagLT_ULT)
  2454  		return true
  2455  	}
  2456  	// match: (CMPWconst (MOVLconst [x]) [y])
  2457  	// cond: int16(x)<y && uint16(x)>uint16(y)
  2458  	// result: (FlagLT_UGT)
  2459  	for {
  2460  		y := ssa.AuxIntToInt16(v.AuxInt)
  2461  		if v_0.Op != ssaop.Op386MOVLconst {
  2462  			break
  2463  		}
  2464  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2465  		if !(int16(x) < y && uint16(x) > uint16(y)) {
  2466  			break
  2467  		}
  2468  		v.Reset(ssaop.Op386FlagLT_UGT)
  2469  		return true
  2470  	}
  2471  	// match: (CMPWconst (MOVLconst [x]) [y])
  2472  	// cond: int16(x)>y && uint16(x)<uint16(y)
  2473  	// result: (FlagGT_ULT)
  2474  	for {
  2475  		y := ssa.AuxIntToInt16(v.AuxInt)
  2476  		if v_0.Op != ssaop.Op386MOVLconst {
  2477  			break
  2478  		}
  2479  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2480  		if !(int16(x) > y && uint16(x) < uint16(y)) {
  2481  			break
  2482  		}
  2483  		v.Reset(ssaop.Op386FlagGT_ULT)
  2484  		return true
  2485  	}
  2486  	// match: (CMPWconst (MOVLconst [x]) [y])
  2487  	// cond: int16(x)>y && uint16(x)>uint16(y)
  2488  	// result: (FlagGT_UGT)
  2489  	for {
  2490  		y := ssa.AuxIntToInt16(v.AuxInt)
  2491  		if v_0.Op != ssaop.Op386MOVLconst {
  2492  			break
  2493  		}
  2494  		x := ssa.AuxIntToInt32(v_0.AuxInt)
  2495  		if !(int16(x) > y && uint16(x) > uint16(y)) {
  2496  			break
  2497  		}
  2498  		v.Reset(ssaop.Op386FlagGT_UGT)
  2499  		return true
  2500  	}
  2501  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  2502  	// cond: 0 <= int16(m) && int16(m) < n
  2503  	// result: (FlagLT_ULT)
  2504  	for {
  2505  		n := ssa.AuxIntToInt16(v.AuxInt)
  2506  		if v_0.Op != ssaop.Op386ANDLconst {
  2507  			break
  2508  		}
  2509  		m := ssa.AuxIntToInt32(v_0.AuxInt)
  2510  		if !(0 <= int16(m) && int16(m) < n) {
  2511  			break
  2512  		}
  2513  		v.Reset(ssaop.Op386FlagLT_ULT)
  2514  		return true
  2515  	}
  2516  	// match: (CMPWconst l:(ANDL x y) [0])
  2517  	// cond: l.Uses==1
  2518  	// result: (TESTW x y)
  2519  	for {
  2520  		if ssa.AuxIntToInt16(v.AuxInt) != 0 {
  2521  			break
  2522  		}
  2523  		l := v_0
  2524  		if l.Op != ssaop.Op386ANDL {
  2525  			break
  2526  		}
  2527  		y := l.Args[1]
  2528  		x := l.Args[0]
  2529  		if !(l.Uses == 1) {
  2530  			break
  2531  		}
  2532  		v.Reset(ssaop.Op386TESTW)
  2533  		v.AddArg2(x, y)
  2534  		return true
  2535  	}
  2536  	// match: (CMPWconst l:(ANDLconst [c] x) [0])
  2537  	// cond: l.Uses==1
  2538  	// result: (TESTWconst [int16(c)] x)
  2539  	for {
  2540  		if ssa.AuxIntToInt16(v.AuxInt) != 0 {
  2541  			break
  2542  		}
  2543  		l := v_0
  2544  		if l.Op != ssaop.Op386ANDLconst {
  2545  			break
  2546  		}
  2547  		c := ssa.AuxIntToInt32(l.AuxInt)
  2548  		x := l.Args[0]
  2549  		if !(l.Uses == 1) {
  2550  			break
  2551  		}
  2552  		v.Reset(ssaop.Op386TESTWconst)
  2553  		v.AuxInt = ssa.Int16ToAuxInt(int16(c))
  2554  		v.AddArg(x)
  2555  		return true
  2556  	}
  2557  	// match: (CMPWconst x [0])
  2558  	// result: (TESTW x x)
  2559  	for {
  2560  		if ssa.AuxIntToInt16(v.AuxInt) != 0 {
  2561  			break
  2562  		}
  2563  		x := v_0
  2564  		v.Reset(ssaop.Op386TESTW)
  2565  		v.AddArg2(x, x)
  2566  		return true
  2567  	}
  2568  	// match: (CMPWconst l:(MOVWload {sym} [off] ptr mem) [c])
  2569  	// cond: l.Uses == 1 && ssa.Clobber(l)
  2570  	// result: @l.Block (CMPWconstload {sym} [ssa.MakeValAndOff(int32(c),off)] ptr mem)
  2571  	for {
  2572  		c := ssa.AuxIntToInt16(v.AuxInt)
  2573  		l := v_0
  2574  		if l.Op != ssaop.Op386MOVWload {
  2575  			break
  2576  		}
  2577  		off := ssa.AuxIntToInt32(l.AuxInt)
  2578  		sym := ssa.AuxToSym(l.Aux)
  2579  		mem := l.Args[1]
  2580  		ptr := l.Args[0]
  2581  		if !(l.Uses == 1 && ssa.Clobber(l)) {
  2582  			break
  2583  		}
  2584  		b = l.Block
  2585  		v0 := b.NewValue0(l.Pos, ssaop.Op386CMPWconstload, types.TypeFlags)
  2586  		v.CopyOf(v0)
  2587  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(c), off))
  2588  		v0.Aux = ssa.SymToAux(sym)
  2589  		v0.AddArg2(ptr, mem)
  2590  		return true
  2591  	}
  2592  	return false
  2593  }
  2594  func rewriteValue_Op386CMPWload(v *ssa.Value) bool {
  2595  	v_2 := v.Args[2]
  2596  	v_1 := v.Args[1]
  2597  	v_0 := v.Args[0]
  2598  	// match: (CMPWload {sym} [off] ptr (MOVLconst [c]) mem)
  2599  	// result: (CMPWconstload {sym} [ssa.MakeValAndOff(int32(int16(c)),off)] ptr mem)
  2600  	for {
  2601  		off := ssa.AuxIntToInt32(v.AuxInt)
  2602  		sym := ssa.AuxToSym(v.Aux)
  2603  		ptr := v_0
  2604  		if v_1.Op != ssaop.Op386MOVLconst {
  2605  			break
  2606  		}
  2607  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  2608  		mem := v_2
  2609  		v.Reset(ssaop.Op386CMPWconstload)
  2610  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(int32(int16(c)), off))
  2611  		v.Aux = ssa.SymToAux(sym)
  2612  		v.AddArg2(ptr, mem)
  2613  		return true
  2614  	}
  2615  	return false
  2616  }
  2617  func rewriteValue_Op386DIVSD(v *ssa.Value) bool {
  2618  	v_1 := v.Args[1]
  2619  	v_0 := v.Args[0]
  2620  	// match: (DIVSD x l:(MOVSDload [off] {sym} ptr mem))
  2621  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  2622  	// result: (DIVSDload x [off] {sym} ptr mem)
  2623  	for {
  2624  		x := v_0
  2625  		l := v_1
  2626  		if l.Op != ssaop.Op386MOVSDload {
  2627  			break
  2628  		}
  2629  		off := ssa.AuxIntToInt32(l.AuxInt)
  2630  		sym := ssa.AuxToSym(l.Aux)
  2631  		mem := l.Args[1]
  2632  		ptr := l.Args[0]
  2633  		if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  2634  			break
  2635  		}
  2636  		v.Reset(ssaop.Op386DIVSDload)
  2637  		v.AuxInt = ssa.Int32ToAuxInt(off)
  2638  		v.Aux = ssa.SymToAux(sym)
  2639  		v.AddArg3(x, ptr, mem)
  2640  		return true
  2641  	}
  2642  	return false
  2643  }
  2644  func rewriteValue_Op386DIVSDload(v *ssa.Value) bool {
  2645  	v_2 := v.Args[2]
  2646  	v_1 := v.Args[1]
  2647  	v_0 := v.Args[0]
  2648  	b := v.Block
  2649  	config := b.Func.Config
  2650  	// match: (DIVSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  2651  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  2652  	// result: (DIVSDload [off1+off2] {sym} val base mem)
  2653  	for {
  2654  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2655  		sym := ssa.AuxToSym(v.Aux)
  2656  		val := v_0
  2657  		if v_1.Op != ssaop.Op386ADDLconst {
  2658  			break
  2659  		}
  2660  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  2661  		base := v_1.Args[0]
  2662  		mem := v_2
  2663  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  2664  			break
  2665  		}
  2666  		v.Reset(ssaop.Op386DIVSDload)
  2667  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2668  		v.Aux = ssa.SymToAux(sym)
  2669  		v.AddArg3(val, base, mem)
  2670  		return true
  2671  	}
  2672  	// match: (DIVSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2673  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  2674  	// result: (DIVSDload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  2675  	for {
  2676  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2677  		sym1 := ssa.AuxToSym(v.Aux)
  2678  		val := v_0
  2679  		if v_1.Op != ssaop.Op386LEAL {
  2680  			break
  2681  		}
  2682  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  2683  		sym2 := ssa.AuxToSym(v_1.Aux)
  2684  		base := v_1.Args[0]
  2685  		mem := v_2
  2686  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  2687  			break
  2688  		}
  2689  		v.Reset(ssaop.Op386DIVSDload)
  2690  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2691  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2692  		v.AddArg3(val, base, mem)
  2693  		return true
  2694  	}
  2695  	return false
  2696  }
  2697  func rewriteValue_Op386DIVSS(v *ssa.Value) bool {
  2698  	v_1 := v.Args[1]
  2699  	v_0 := v.Args[0]
  2700  	// match: (DIVSS x l:(MOVSSload [off] {sym} ptr mem))
  2701  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  2702  	// result: (DIVSSload x [off] {sym} ptr mem)
  2703  	for {
  2704  		x := v_0
  2705  		l := v_1
  2706  		if l.Op != ssaop.Op386MOVSSload {
  2707  			break
  2708  		}
  2709  		off := ssa.AuxIntToInt32(l.AuxInt)
  2710  		sym := ssa.AuxToSym(l.Aux)
  2711  		mem := l.Args[1]
  2712  		ptr := l.Args[0]
  2713  		if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  2714  			break
  2715  		}
  2716  		v.Reset(ssaop.Op386DIVSSload)
  2717  		v.AuxInt = ssa.Int32ToAuxInt(off)
  2718  		v.Aux = ssa.SymToAux(sym)
  2719  		v.AddArg3(x, ptr, mem)
  2720  		return true
  2721  	}
  2722  	return false
  2723  }
  2724  func rewriteValue_Op386DIVSSload(v *ssa.Value) bool {
  2725  	v_2 := v.Args[2]
  2726  	v_1 := v.Args[1]
  2727  	v_0 := v.Args[0]
  2728  	b := v.Block
  2729  	config := b.Func.Config
  2730  	// match: (DIVSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  2731  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  2732  	// result: (DIVSSload [off1+off2] {sym} val base mem)
  2733  	for {
  2734  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2735  		sym := ssa.AuxToSym(v.Aux)
  2736  		val := v_0
  2737  		if v_1.Op != ssaop.Op386ADDLconst {
  2738  			break
  2739  		}
  2740  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  2741  		base := v_1.Args[0]
  2742  		mem := v_2
  2743  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  2744  			break
  2745  		}
  2746  		v.Reset(ssaop.Op386DIVSSload)
  2747  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2748  		v.Aux = ssa.SymToAux(sym)
  2749  		v.AddArg3(val, base, mem)
  2750  		return true
  2751  	}
  2752  	// match: (DIVSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2753  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  2754  	// result: (DIVSSload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  2755  	for {
  2756  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2757  		sym1 := ssa.AuxToSym(v.Aux)
  2758  		val := v_0
  2759  		if v_1.Op != ssaop.Op386LEAL {
  2760  			break
  2761  		}
  2762  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  2763  		sym2 := ssa.AuxToSym(v_1.Aux)
  2764  		base := v_1.Args[0]
  2765  		mem := v_2
  2766  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  2767  			break
  2768  		}
  2769  		v.Reset(ssaop.Op386DIVSSload)
  2770  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2771  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2772  		v.AddArg3(val, base, mem)
  2773  		return true
  2774  	}
  2775  	return false
  2776  }
  2777  func rewriteValue_Op386LEAL(v *ssa.Value) bool {
  2778  	v_0 := v.Args[0]
  2779  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  2780  	// cond: ssa.Is32Bit(int64(c)+int64(d))
  2781  	// result: (LEAL [c+d] {s} x)
  2782  	for {
  2783  		c := ssa.AuxIntToInt32(v.AuxInt)
  2784  		s := ssa.AuxToSym(v.Aux)
  2785  		if v_0.Op != ssaop.Op386ADDLconst {
  2786  			break
  2787  		}
  2788  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  2789  		x := v_0.Args[0]
  2790  		if !(ssa.Is32Bit(int64(c) + int64(d))) {
  2791  			break
  2792  		}
  2793  		v.Reset(ssaop.Op386LEAL)
  2794  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  2795  		v.Aux = ssa.SymToAux(s)
  2796  		v.AddArg(x)
  2797  		return true
  2798  	}
  2799  	// match: (LEAL [c] {s} (ADDL x y))
  2800  	// cond: x.Op != ssaop.OpSB && y.Op != ssaop.OpSB
  2801  	// result: (LEAL1 [c] {s} x y)
  2802  	for {
  2803  		c := ssa.AuxIntToInt32(v.AuxInt)
  2804  		s := ssa.AuxToSym(v.Aux)
  2805  		if v_0.Op != ssaop.Op386ADDL {
  2806  			break
  2807  		}
  2808  		_ = v_0.Args[1]
  2809  		v_0_0 := v_0.Args[0]
  2810  		v_0_1 := v_0.Args[1]
  2811  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  2812  			x := v_0_0
  2813  			y := v_0_1
  2814  			if !(x.Op != ssaop.OpSB && y.Op != ssaop.OpSB) {
  2815  				continue
  2816  			}
  2817  			v.Reset(ssaop.Op386LEAL1)
  2818  			v.AuxInt = ssa.Int32ToAuxInt(c)
  2819  			v.Aux = ssa.SymToAux(s)
  2820  			v.AddArg2(x, y)
  2821  			return true
  2822  		}
  2823  		break
  2824  	}
  2825  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  2826  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  2827  	// result: (LEAL [off1+off2] {ssa.MergeSym(sym1,sym2)} x)
  2828  	for {
  2829  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2830  		sym1 := ssa.AuxToSym(v.Aux)
  2831  		if v_0.Op != ssaop.Op386LEAL {
  2832  			break
  2833  		}
  2834  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2835  		sym2 := ssa.AuxToSym(v_0.Aux)
  2836  		x := v_0.Args[0]
  2837  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  2838  			break
  2839  		}
  2840  		v.Reset(ssaop.Op386LEAL)
  2841  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2842  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2843  		v.AddArg(x)
  2844  		return true
  2845  	}
  2846  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  2847  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  2848  	// result: (LEAL1 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  2849  	for {
  2850  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2851  		sym1 := ssa.AuxToSym(v.Aux)
  2852  		if v_0.Op != ssaop.Op386LEAL1 {
  2853  			break
  2854  		}
  2855  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2856  		sym2 := ssa.AuxToSym(v_0.Aux)
  2857  		y := v_0.Args[1]
  2858  		x := v_0.Args[0]
  2859  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  2860  			break
  2861  		}
  2862  		v.Reset(ssaop.Op386LEAL1)
  2863  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2864  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2865  		v.AddArg2(x, y)
  2866  		return true
  2867  	}
  2868  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  2869  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  2870  	// result: (LEAL2 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  2871  	for {
  2872  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2873  		sym1 := ssa.AuxToSym(v.Aux)
  2874  		if v_0.Op != ssaop.Op386LEAL2 {
  2875  			break
  2876  		}
  2877  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2878  		sym2 := ssa.AuxToSym(v_0.Aux)
  2879  		y := v_0.Args[1]
  2880  		x := v_0.Args[0]
  2881  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  2882  			break
  2883  		}
  2884  		v.Reset(ssaop.Op386LEAL2)
  2885  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2886  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2887  		v.AddArg2(x, y)
  2888  		return true
  2889  	}
  2890  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  2891  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  2892  	// result: (LEAL4 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  2893  	for {
  2894  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2895  		sym1 := ssa.AuxToSym(v.Aux)
  2896  		if v_0.Op != ssaop.Op386LEAL4 {
  2897  			break
  2898  		}
  2899  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2900  		sym2 := ssa.AuxToSym(v_0.Aux)
  2901  		y := v_0.Args[1]
  2902  		x := v_0.Args[0]
  2903  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  2904  			break
  2905  		}
  2906  		v.Reset(ssaop.Op386LEAL4)
  2907  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2908  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2909  		v.AddArg2(x, y)
  2910  		return true
  2911  	}
  2912  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  2913  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  2914  	// result: (LEAL8 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  2915  	for {
  2916  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  2917  		sym1 := ssa.AuxToSym(v.Aux)
  2918  		if v_0.Op != ssaop.Op386LEAL8 {
  2919  			break
  2920  		}
  2921  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  2922  		sym2 := ssa.AuxToSym(v_0.Aux)
  2923  		y := v_0.Args[1]
  2924  		x := v_0.Args[0]
  2925  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  2926  			break
  2927  		}
  2928  		v.Reset(ssaop.Op386LEAL8)
  2929  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  2930  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  2931  		v.AddArg2(x, y)
  2932  		return true
  2933  	}
  2934  	return false
  2935  }
  2936  func rewriteValue_Op386LEAL1(v *ssa.Value) bool {
  2937  	v_1 := v.Args[1]
  2938  	v_0 := v.Args[0]
  2939  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  2940  	// cond: ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB
  2941  	// result: (LEAL1 [c+d] {s} x y)
  2942  	for {
  2943  		c := ssa.AuxIntToInt32(v.AuxInt)
  2944  		s := ssa.AuxToSym(v.Aux)
  2945  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2946  			if v_0.Op != ssaop.Op386ADDLconst {
  2947  				continue
  2948  			}
  2949  			d := ssa.AuxIntToInt32(v_0.AuxInt)
  2950  			x := v_0.Args[0]
  2951  			y := v_1
  2952  			if !(ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB) {
  2953  				continue
  2954  			}
  2955  			v.Reset(ssaop.Op386LEAL1)
  2956  			v.AuxInt = ssa.Int32ToAuxInt(c + d)
  2957  			v.Aux = ssa.SymToAux(s)
  2958  			v.AddArg2(x, y)
  2959  			return true
  2960  		}
  2961  		break
  2962  	}
  2963  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  2964  	// result: (LEAL2 [c] {s} x y)
  2965  	for {
  2966  		c := ssa.AuxIntToInt32(v.AuxInt)
  2967  		s := ssa.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 != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 1 {
  2971  				continue
  2972  			}
  2973  			y := v_1.Args[0]
  2974  			v.Reset(ssaop.Op386LEAL2)
  2975  			v.AuxInt = ssa.Int32ToAuxInt(c)
  2976  			v.Aux = ssa.SymToAux(s)
  2977  			v.AddArg2(x, y)
  2978  			return true
  2979  		}
  2980  		break
  2981  	}
  2982  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  2983  	// result: (LEAL4 [c] {s} x y)
  2984  	for {
  2985  		c := ssa.AuxIntToInt32(v.AuxInt)
  2986  		s := ssa.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 != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 2 {
  2990  				continue
  2991  			}
  2992  			y := v_1.Args[0]
  2993  			v.Reset(ssaop.Op386LEAL4)
  2994  			v.AuxInt = ssa.Int32ToAuxInt(c)
  2995  			v.Aux = ssa.SymToAux(s)
  2996  			v.AddArg2(x, y)
  2997  			return true
  2998  		}
  2999  		break
  3000  	}
  3001  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  3002  	// result: (LEAL8 [c] {s} x y)
  3003  	for {
  3004  		c := ssa.AuxIntToInt32(v.AuxInt)
  3005  		s := ssa.AuxToSym(v.Aux)
  3006  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3007  			x := v_0
  3008  			if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 3 {
  3009  				continue
  3010  			}
  3011  			y := v_1.Args[0]
  3012  			v.Reset(ssaop.Op386LEAL8)
  3013  			v.AuxInt = ssa.Int32ToAuxInt(c)
  3014  			v.Aux = ssa.SymToAux(s)
  3015  			v.AddArg2(x, y)
  3016  			return true
  3017  		}
  3018  		break
  3019  	}
  3020  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3021  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB
  3022  	// result: (LEAL1 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  3023  	for {
  3024  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3025  		sym1 := ssa.AuxToSym(v.Aux)
  3026  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3027  			if v_0.Op != ssaop.Op386LEAL {
  3028  				continue
  3029  			}
  3030  			off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3031  			sym2 := ssa.AuxToSym(v_0.Aux)
  3032  			x := v_0.Args[0]
  3033  			y := v_1
  3034  			if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB) {
  3035  				continue
  3036  			}
  3037  			v.Reset(ssaop.Op386LEAL1)
  3038  			v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3039  			v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3040  			v.AddArg2(x, y)
  3041  			return true
  3042  		}
  3043  		break
  3044  	}
  3045  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} y y))
  3046  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  3047  	// result: (LEAL2 [off1+off2] {ssa.MergeSym(sym1, sym2)} x y)
  3048  	for {
  3049  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3050  		sym1 := ssa.AuxToSym(v.Aux)
  3051  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3052  			x := v_0
  3053  			if v_1.Op != ssaop.Op386LEAL1 {
  3054  				continue
  3055  			}
  3056  			off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3057  			sym2 := ssa.AuxToSym(v_1.Aux)
  3058  			y := v_1.Args[1]
  3059  			if y != v_1.Args[0] || !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  3060  				continue
  3061  			}
  3062  			v.Reset(ssaop.Op386LEAL2)
  3063  			v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3064  			v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3065  			v.AddArg2(x, y)
  3066  			return true
  3067  		}
  3068  		break
  3069  	}
  3070  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} x y))
  3071  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)
  3072  	// result: (LEAL2 [off1+off2] {ssa.MergeSym(sym1, sym2)} y x)
  3073  	for {
  3074  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3075  		sym1 := ssa.AuxToSym(v.Aux)
  3076  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3077  			x := v_0
  3078  			if v_1.Op != ssaop.Op386LEAL1 {
  3079  				continue
  3080  			}
  3081  			off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3082  			sym2 := ssa.AuxToSym(v_1.Aux)
  3083  			_ = v_1.Args[1]
  3084  			v_1_0 := v_1.Args[0]
  3085  			v_1_1 := v_1.Args[1]
  3086  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  3087  				if x != v_1_0 {
  3088  					continue
  3089  				}
  3090  				y := v_1_1
  3091  				if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2)) {
  3092  					continue
  3093  				}
  3094  				v.Reset(ssaop.Op386LEAL2)
  3095  				v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3096  				v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3097  				v.AddArg2(y, x)
  3098  				return true
  3099  			}
  3100  		}
  3101  		break
  3102  	}
  3103  	// match: (LEAL1 [0] {nil} x y)
  3104  	// result: (ADDL x y)
  3105  	for {
  3106  		if ssa.AuxIntToInt32(v.AuxInt) != 0 || ssa.AuxToSym(v.Aux) != nil {
  3107  			break
  3108  		}
  3109  		x := v_0
  3110  		y := v_1
  3111  		v.Reset(ssaop.Op386ADDL)
  3112  		v.AddArg2(x, y)
  3113  		return true
  3114  	}
  3115  	return false
  3116  }
  3117  func rewriteValue_Op386LEAL2(v *ssa.Value) bool {
  3118  	v_1 := v.Args[1]
  3119  	v_0 := v.Args[0]
  3120  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  3121  	// cond: ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB
  3122  	// result: (LEAL2 [c+d] {s} x y)
  3123  	for {
  3124  		c := ssa.AuxIntToInt32(v.AuxInt)
  3125  		s := ssa.AuxToSym(v.Aux)
  3126  		if v_0.Op != ssaop.Op386ADDLconst {
  3127  			break
  3128  		}
  3129  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  3130  		x := v_0.Args[0]
  3131  		y := v_1
  3132  		if !(ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB) {
  3133  			break
  3134  		}
  3135  		v.Reset(ssaop.Op386LEAL2)
  3136  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  3137  		v.Aux = ssa.SymToAux(s)
  3138  		v.AddArg2(x, y)
  3139  		return true
  3140  	}
  3141  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  3142  	// cond: ssa.Is32Bit(int64(c)+2*int64(d)) && y.Op != ssaop.OpSB
  3143  	// result: (LEAL2 [c+2*d] {s} x y)
  3144  	for {
  3145  		c := ssa.AuxIntToInt32(v.AuxInt)
  3146  		s := ssa.AuxToSym(v.Aux)
  3147  		x := v_0
  3148  		if v_1.Op != ssaop.Op386ADDLconst {
  3149  			break
  3150  		}
  3151  		d := ssa.AuxIntToInt32(v_1.AuxInt)
  3152  		y := v_1.Args[0]
  3153  		if !(ssa.Is32Bit(int64(c)+2*int64(d)) && y.Op != ssaop.OpSB) {
  3154  			break
  3155  		}
  3156  		v.Reset(ssaop.Op386LEAL2)
  3157  		v.AuxInt = ssa.Int32ToAuxInt(c + 2*d)
  3158  		v.Aux = ssa.SymToAux(s)
  3159  		v.AddArg2(x, y)
  3160  		return true
  3161  	}
  3162  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  3163  	// result: (LEAL4 [c] {s} x y)
  3164  	for {
  3165  		c := ssa.AuxIntToInt32(v.AuxInt)
  3166  		s := ssa.AuxToSym(v.Aux)
  3167  		x := v_0
  3168  		if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 1 {
  3169  			break
  3170  		}
  3171  		y := v_1.Args[0]
  3172  		v.Reset(ssaop.Op386LEAL4)
  3173  		v.AuxInt = ssa.Int32ToAuxInt(c)
  3174  		v.Aux = ssa.SymToAux(s)
  3175  		v.AddArg2(x, y)
  3176  		return true
  3177  	}
  3178  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  3179  	// result: (LEAL8 [c] {s} x y)
  3180  	for {
  3181  		c := ssa.AuxIntToInt32(v.AuxInt)
  3182  		s := ssa.AuxToSym(v.Aux)
  3183  		x := v_0
  3184  		if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 2 {
  3185  			break
  3186  		}
  3187  		y := v_1.Args[0]
  3188  		v.Reset(ssaop.Op386LEAL8)
  3189  		v.AuxInt = ssa.Int32ToAuxInt(c)
  3190  		v.Aux = ssa.SymToAux(s)
  3191  		v.AddArg2(x, y)
  3192  		return true
  3193  	}
  3194  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3195  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB
  3196  	// result: (LEAL2 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  3197  	for {
  3198  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3199  		sym1 := ssa.AuxToSym(v.Aux)
  3200  		if v_0.Op != ssaop.Op386LEAL {
  3201  			break
  3202  		}
  3203  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3204  		sym2 := ssa.AuxToSym(v_0.Aux)
  3205  		x := v_0.Args[0]
  3206  		y := v_1
  3207  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB) {
  3208  			break
  3209  		}
  3210  		v.Reset(ssaop.Op386LEAL2)
  3211  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3212  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3213  		v.AddArg2(x, y)
  3214  		return true
  3215  	}
  3216  	// match: (LEAL2 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3217  	// cond: ssa.Is32Bit(int64(off1)+2*int64(off2))
  3218  	// result: (LEAL4 [off1+2*off2] {sym} x y)
  3219  	for {
  3220  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3221  		sym := ssa.AuxToSym(v.Aux)
  3222  		x := v_0
  3223  		if v_1.Op != ssaop.Op386LEAL1 {
  3224  			break
  3225  		}
  3226  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3227  		if ssa.AuxToSym(v_1.Aux) != nil {
  3228  			break
  3229  		}
  3230  		y := v_1.Args[1]
  3231  		if y != v_1.Args[0] || !(ssa.Is32Bit(int64(off1) + 2*int64(off2))) {
  3232  			break
  3233  		}
  3234  		v.Reset(ssaop.Op386LEAL4)
  3235  		v.AuxInt = ssa.Int32ToAuxInt(off1 + 2*off2)
  3236  		v.Aux = ssa.SymToAux(sym)
  3237  		v.AddArg2(x, y)
  3238  		return true
  3239  	}
  3240  	return false
  3241  }
  3242  func rewriteValue_Op386LEAL4(v *ssa.Value) bool {
  3243  	v_1 := v.Args[1]
  3244  	v_0 := v.Args[0]
  3245  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  3246  	// cond: ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB
  3247  	// result: (LEAL4 [c+d] {s} x y)
  3248  	for {
  3249  		c := ssa.AuxIntToInt32(v.AuxInt)
  3250  		s := ssa.AuxToSym(v.Aux)
  3251  		if v_0.Op != ssaop.Op386ADDLconst {
  3252  			break
  3253  		}
  3254  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  3255  		x := v_0.Args[0]
  3256  		y := v_1
  3257  		if !(ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB) {
  3258  			break
  3259  		}
  3260  		v.Reset(ssaop.Op386LEAL4)
  3261  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  3262  		v.Aux = ssa.SymToAux(s)
  3263  		v.AddArg2(x, y)
  3264  		return true
  3265  	}
  3266  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  3267  	// cond: ssa.Is32Bit(int64(c)+4*int64(d)) && y.Op != ssaop.OpSB
  3268  	// result: (LEAL4 [c+4*d] {s} x y)
  3269  	for {
  3270  		c := ssa.AuxIntToInt32(v.AuxInt)
  3271  		s := ssa.AuxToSym(v.Aux)
  3272  		x := v_0
  3273  		if v_1.Op != ssaop.Op386ADDLconst {
  3274  			break
  3275  		}
  3276  		d := ssa.AuxIntToInt32(v_1.AuxInt)
  3277  		y := v_1.Args[0]
  3278  		if !(ssa.Is32Bit(int64(c)+4*int64(d)) && y.Op != ssaop.OpSB) {
  3279  			break
  3280  		}
  3281  		v.Reset(ssaop.Op386LEAL4)
  3282  		v.AuxInt = ssa.Int32ToAuxInt(c + 4*d)
  3283  		v.Aux = ssa.SymToAux(s)
  3284  		v.AddArg2(x, y)
  3285  		return true
  3286  	}
  3287  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  3288  	// result: (LEAL8 [c] {s} x y)
  3289  	for {
  3290  		c := ssa.AuxIntToInt32(v.AuxInt)
  3291  		s := ssa.AuxToSym(v.Aux)
  3292  		x := v_0
  3293  		if v_1.Op != ssaop.Op386SHLLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 1 {
  3294  			break
  3295  		}
  3296  		y := v_1.Args[0]
  3297  		v.Reset(ssaop.Op386LEAL8)
  3298  		v.AuxInt = ssa.Int32ToAuxInt(c)
  3299  		v.Aux = ssa.SymToAux(s)
  3300  		v.AddArg2(x, y)
  3301  		return true
  3302  	}
  3303  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3304  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB
  3305  	// result: (LEAL4 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  3306  	for {
  3307  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3308  		sym1 := ssa.AuxToSym(v.Aux)
  3309  		if v_0.Op != ssaop.Op386LEAL {
  3310  			break
  3311  		}
  3312  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3313  		sym2 := ssa.AuxToSym(v_0.Aux)
  3314  		x := v_0.Args[0]
  3315  		y := v_1
  3316  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB) {
  3317  			break
  3318  		}
  3319  		v.Reset(ssaop.Op386LEAL4)
  3320  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3321  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3322  		v.AddArg2(x, y)
  3323  		return true
  3324  	}
  3325  	// match: (LEAL4 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3326  	// cond: ssa.Is32Bit(int64(off1)+4*int64(off2))
  3327  	// result: (LEAL8 [off1+4*off2] {sym} x y)
  3328  	for {
  3329  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3330  		sym := ssa.AuxToSym(v.Aux)
  3331  		x := v_0
  3332  		if v_1.Op != ssaop.Op386LEAL1 {
  3333  			break
  3334  		}
  3335  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3336  		if ssa.AuxToSym(v_1.Aux) != nil {
  3337  			break
  3338  		}
  3339  		y := v_1.Args[1]
  3340  		if y != v_1.Args[0] || !(ssa.Is32Bit(int64(off1) + 4*int64(off2))) {
  3341  			break
  3342  		}
  3343  		v.Reset(ssaop.Op386LEAL8)
  3344  		v.AuxInt = ssa.Int32ToAuxInt(off1 + 4*off2)
  3345  		v.Aux = ssa.SymToAux(sym)
  3346  		v.AddArg2(x, y)
  3347  		return true
  3348  	}
  3349  	return false
  3350  }
  3351  func rewriteValue_Op386LEAL8(v *ssa.Value) bool {
  3352  	v_1 := v.Args[1]
  3353  	v_0 := v.Args[0]
  3354  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  3355  	// cond: ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB
  3356  	// result: (LEAL8 [c+d] {s} x y)
  3357  	for {
  3358  		c := ssa.AuxIntToInt32(v.AuxInt)
  3359  		s := ssa.AuxToSym(v.Aux)
  3360  		if v_0.Op != ssaop.Op386ADDLconst {
  3361  			break
  3362  		}
  3363  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  3364  		x := v_0.Args[0]
  3365  		y := v_1
  3366  		if !(ssa.Is32Bit(int64(c)+int64(d)) && x.Op != ssaop.OpSB) {
  3367  			break
  3368  		}
  3369  		v.Reset(ssaop.Op386LEAL8)
  3370  		v.AuxInt = ssa.Int32ToAuxInt(c + d)
  3371  		v.Aux = ssa.SymToAux(s)
  3372  		v.AddArg2(x, y)
  3373  		return true
  3374  	}
  3375  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  3376  	// cond: ssa.Is32Bit(int64(c)+8*int64(d)) && y.Op != ssaop.OpSB
  3377  	// result: (LEAL8 [c+8*d] {s} x y)
  3378  	for {
  3379  		c := ssa.AuxIntToInt32(v.AuxInt)
  3380  		s := ssa.AuxToSym(v.Aux)
  3381  		x := v_0
  3382  		if v_1.Op != ssaop.Op386ADDLconst {
  3383  			break
  3384  		}
  3385  		d := ssa.AuxIntToInt32(v_1.AuxInt)
  3386  		y := v_1.Args[0]
  3387  		if !(ssa.Is32Bit(int64(c)+8*int64(d)) && y.Op != ssaop.OpSB) {
  3388  			break
  3389  		}
  3390  		v.Reset(ssaop.Op386LEAL8)
  3391  		v.AuxInt = ssa.Int32ToAuxInt(c + 8*d)
  3392  		v.Aux = ssa.SymToAux(s)
  3393  		v.AddArg2(x, y)
  3394  		return true
  3395  	}
  3396  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3397  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB
  3398  	// result: (LEAL8 [off1+off2] {ssa.MergeSym(sym1,sym2)} x y)
  3399  	for {
  3400  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3401  		sym1 := ssa.AuxToSym(v.Aux)
  3402  		if v_0.Op != ssaop.Op386LEAL {
  3403  			break
  3404  		}
  3405  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3406  		sym2 := ssa.AuxToSym(v_0.Aux)
  3407  		x := v_0.Args[0]
  3408  		y := v_1
  3409  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && x.Op != ssaop.OpSB) {
  3410  			break
  3411  		}
  3412  		v.Reset(ssaop.Op386LEAL8)
  3413  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3414  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3415  		v.AddArg2(x, y)
  3416  		return true
  3417  	}
  3418  	return false
  3419  }
  3420  func rewriteValue_Op386LoweredPanicBoundsRC(v *ssa.Value) bool {
  3421  	v_1 := v.Args[1]
  3422  	v_0 := v.Args[0]
  3423  	// match: (LoweredPanicBoundsRC [kind] {p} (MOVLconst [c]) mem)
  3424  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:int64(c), Cy:p.C}} mem)
  3425  	for {
  3426  		kind := ssa.AuxIntToInt64(v.AuxInt)
  3427  		p := ssa.AuxToPanicBoundsC(v.Aux)
  3428  		if v_0.Op != ssaop.Op386MOVLconst {
  3429  			break
  3430  		}
  3431  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  3432  		mem := v_1
  3433  		v.Reset(ssaop.Op386LoweredPanicBoundsCC)
  3434  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  3435  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: int64(c), Cy: p.C})
  3436  		v.AddArg(mem)
  3437  		return true
  3438  	}
  3439  	return false
  3440  }
  3441  func rewriteValue_Op386LoweredPanicBoundsRR(v *ssa.Value) bool {
  3442  	v_2 := v.Args[2]
  3443  	v_1 := v.Args[1]
  3444  	v_0 := v.Args[0]
  3445  	// match: (LoweredPanicBoundsRR [kind] x (MOVLconst [c]) mem)
  3446  	// result: (LoweredPanicBoundsRC [kind] x {ssa.PanicBoundsC{C:int64(c)}} mem)
  3447  	for {
  3448  		kind := ssa.AuxIntToInt64(v.AuxInt)
  3449  		x := v_0
  3450  		if v_1.Op != ssaop.Op386MOVLconst {
  3451  			break
  3452  		}
  3453  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  3454  		mem := v_2
  3455  		v.Reset(ssaop.Op386LoweredPanicBoundsRC)
  3456  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  3457  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: int64(c)})
  3458  		v.AddArg2(x, mem)
  3459  		return true
  3460  	}
  3461  	// match: (LoweredPanicBoundsRR [kind] (MOVLconst [c]) y mem)
  3462  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:int64(c)}} y mem)
  3463  	for {
  3464  		kind := ssa.AuxIntToInt64(v.AuxInt)
  3465  		if v_0.Op != ssaop.Op386MOVLconst {
  3466  			break
  3467  		}
  3468  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  3469  		y := v_1
  3470  		mem := v_2
  3471  		v.Reset(ssaop.Op386LoweredPanicBoundsCR)
  3472  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  3473  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: int64(c)})
  3474  		v.AddArg2(y, mem)
  3475  		return true
  3476  	}
  3477  	return false
  3478  }
  3479  func rewriteValue_Op386LoweredPanicExtendRC(v *ssa.Value) bool {
  3480  	v_2 := v.Args[2]
  3481  	v_1 := v.Args[1]
  3482  	v_0 := v.Args[0]
  3483  	// match: (LoweredPanicExtendRC [kind] {p} (MOVLconst [hi]) (MOVLconst [lo]) mem)
  3484  	// result: (LoweredPanicBoundsCC [kind] {ssa.PanicBoundsCC{Cx:int64(hi)<<32+int64(uint32(lo)), Cy:p.C}} mem)
  3485  	for {
  3486  		kind := ssa.AuxIntToInt64(v.AuxInt)
  3487  		p := ssa.AuxToPanicBoundsC(v.Aux)
  3488  		if v_0.Op != ssaop.Op386MOVLconst {
  3489  			break
  3490  		}
  3491  		hi := ssa.AuxIntToInt32(v_0.AuxInt)
  3492  		if v_1.Op != ssaop.Op386MOVLconst {
  3493  			break
  3494  		}
  3495  		lo := ssa.AuxIntToInt32(v_1.AuxInt)
  3496  		mem := v_2
  3497  		v.Reset(ssaop.Op386LoweredPanicBoundsCC)
  3498  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  3499  		v.Aux = ssa.PanicBoundsCCToAux(ssa.PanicBoundsCC{Cx: int64(hi)<<32 + int64(uint32(lo)), Cy: p.C})
  3500  		v.AddArg(mem)
  3501  		return true
  3502  	}
  3503  	return false
  3504  }
  3505  func rewriteValue_Op386LoweredPanicExtendRR(v *ssa.Value) bool {
  3506  	v_3 := v.Args[3]
  3507  	v_2 := v.Args[2]
  3508  	v_1 := v.Args[1]
  3509  	v_0 := v.Args[0]
  3510  	// match: (LoweredPanicExtendRR [kind] hi lo (MOVLconst [c]) mem)
  3511  	// result: (LoweredPanicExtendRC [kind] hi lo {ssa.PanicBoundsC{C:int64(c)}} mem)
  3512  	for {
  3513  		kind := ssa.AuxIntToInt64(v.AuxInt)
  3514  		hi := v_0
  3515  		lo := v_1
  3516  		if v_2.Op != ssaop.Op386MOVLconst {
  3517  			break
  3518  		}
  3519  		c := ssa.AuxIntToInt32(v_2.AuxInt)
  3520  		mem := v_3
  3521  		v.Reset(ssaop.Op386LoweredPanicExtendRC)
  3522  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  3523  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: int64(c)})
  3524  		v.AddArg3(hi, lo, mem)
  3525  		return true
  3526  	}
  3527  	// match: (LoweredPanicExtendRR [kind] (MOVLconst [hi]) (MOVLconst [lo]) y mem)
  3528  	// result: (LoweredPanicBoundsCR [kind] {ssa.PanicBoundsC{C:int64(hi)<<32 + int64(uint32(lo))}} y mem)
  3529  	for {
  3530  		kind := ssa.AuxIntToInt64(v.AuxInt)
  3531  		if v_0.Op != ssaop.Op386MOVLconst {
  3532  			break
  3533  		}
  3534  		hi := ssa.AuxIntToInt32(v_0.AuxInt)
  3535  		if v_1.Op != ssaop.Op386MOVLconst {
  3536  			break
  3537  		}
  3538  		lo := ssa.AuxIntToInt32(v_1.AuxInt)
  3539  		y := v_2
  3540  		mem := v_3
  3541  		v.Reset(ssaop.Op386LoweredPanicBoundsCR)
  3542  		v.AuxInt = ssa.Int64ToAuxInt(kind)
  3543  		v.Aux = ssa.PanicBoundsCToAux(ssa.PanicBoundsC{C: int64(hi)<<32 + int64(uint32(lo))})
  3544  		v.AddArg2(y, mem)
  3545  		return true
  3546  	}
  3547  	return false
  3548  }
  3549  func rewriteValue_Op386MOVBLSX(v *ssa.Value) bool {
  3550  	v_0 := v.Args[0]
  3551  	b := v.Block
  3552  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  3553  	// cond: x.Uses == 1 && ssa.Clobber(x)
  3554  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  3555  	for {
  3556  		x := v_0
  3557  		if x.Op != ssaop.Op386MOVBload {
  3558  			break
  3559  		}
  3560  		off := ssa.AuxIntToInt32(x.AuxInt)
  3561  		sym := ssa.AuxToSym(x.Aux)
  3562  		mem := x.Args[1]
  3563  		ptr := x.Args[0]
  3564  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  3565  			break
  3566  		}
  3567  		b = x.Block
  3568  		v0 := b.NewValue0(x.Pos, ssaop.Op386MOVBLSXload, v.Type)
  3569  		v.CopyOf(v0)
  3570  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  3571  		v0.Aux = ssa.SymToAux(sym)
  3572  		v0.AddArg2(ptr, mem)
  3573  		return true
  3574  	}
  3575  	// match: (MOVBLSX (ANDLconst [c] x))
  3576  	// cond: c & 0x80 == 0
  3577  	// result: (ANDLconst [c & 0x7f] x)
  3578  	for {
  3579  		if v_0.Op != ssaop.Op386ANDLconst {
  3580  			break
  3581  		}
  3582  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  3583  		x := v_0.Args[0]
  3584  		if !(c&0x80 == 0) {
  3585  			break
  3586  		}
  3587  		v.Reset(ssaop.Op386ANDLconst)
  3588  		v.AuxInt = ssa.Int32ToAuxInt(c & 0x7f)
  3589  		v.AddArg(x)
  3590  		return true
  3591  	}
  3592  	return false
  3593  }
  3594  func rewriteValue_Op386MOVBLSXload(v *ssa.Value) bool {
  3595  	v_1 := v.Args[1]
  3596  	v_0 := v.Args[0]
  3597  	b := v.Block
  3598  	config := b.Func.Config
  3599  	// match: (MOVBLSXload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3600  	// cond: sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)
  3601  	// result: (MOVBLSX x)
  3602  	for {
  3603  		off := ssa.AuxIntToInt32(v.AuxInt)
  3604  		sym := ssa.AuxToSym(v.Aux)
  3605  		ptr := v_0
  3606  		if v_1.Op != ssaop.Op386MOVBstore {
  3607  			break
  3608  		}
  3609  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3610  		sym2 := ssa.AuxToSym(v_1.Aux)
  3611  		x := v_1.Args[1]
  3612  		ptr2 := v_1.Args[0]
  3613  		if !(sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)) {
  3614  			break
  3615  		}
  3616  		v.Reset(ssaop.Op386MOVBLSX)
  3617  		v.AddArg(x)
  3618  		return true
  3619  	}
  3620  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3621  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  3622  	// result: (MOVBLSXload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  3623  	for {
  3624  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3625  		sym1 := ssa.AuxToSym(v.Aux)
  3626  		if v_0.Op != ssaop.Op386LEAL {
  3627  			break
  3628  		}
  3629  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3630  		sym2 := ssa.AuxToSym(v_0.Aux)
  3631  		base := v_0.Args[0]
  3632  		mem := v_1
  3633  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  3634  			break
  3635  		}
  3636  		v.Reset(ssaop.Op386MOVBLSXload)
  3637  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3638  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3639  		v.AddArg2(base, mem)
  3640  		return true
  3641  	}
  3642  	// match: (MOVBLSXload [off] {sym} (SB) _)
  3643  	// cond: ssa.SymIsRO(sym)
  3644  	// result: (MOVLconst [int32(int8(ssa.Read8(sym, int64(off))))])
  3645  	for {
  3646  		off := ssa.AuxIntToInt32(v.AuxInt)
  3647  		sym := ssa.AuxToSym(v.Aux)
  3648  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  3649  			break
  3650  		}
  3651  		v.Reset(ssaop.Op386MOVLconst)
  3652  		v.AuxInt = ssa.Int32ToAuxInt(int32(int8(ssa.Read8(sym, int64(off)))))
  3653  		return true
  3654  	}
  3655  	return false
  3656  }
  3657  func rewriteValue_Op386MOVBLZX(v *ssa.Value) bool {
  3658  	v_0 := v.Args[0]
  3659  	b := v.Block
  3660  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  3661  	// cond: x.Uses == 1 && ssa.Clobber(x)
  3662  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  3663  	for {
  3664  		x := v_0
  3665  		if x.Op != ssaop.Op386MOVBload {
  3666  			break
  3667  		}
  3668  		off := ssa.AuxIntToInt32(x.AuxInt)
  3669  		sym := ssa.AuxToSym(x.Aux)
  3670  		mem := x.Args[1]
  3671  		ptr := x.Args[0]
  3672  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  3673  			break
  3674  		}
  3675  		b = x.Block
  3676  		v0 := b.NewValue0(x.Pos, ssaop.Op386MOVBload, v.Type)
  3677  		v.CopyOf(v0)
  3678  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  3679  		v0.Aux = ssa.SymToAux(sym)
  3680  		v0.AddArg2(ptr, mem)
  3681  		return true
  3682  	}
  3683  	// match: (MOVBLZX (ANDLconst [c] x))
  3684  	// result: (ANDLconst [c & 0xff] x)
  3685  	for {
  3686  		if v_0.Op != ssaop.Op386ANDLconst {
  3687  			break
  3688  		}
  3689  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  3690  		x := v_0.Args[0]
  3691  		v.Reset(ssaop.Op386ANDLconst)
  3692  		v.AuxInt = ssa.Int32ToAuxInt(c & 0xff)
  3693  		v.AddArg(x)
  3694  		return true
  3695  	}
  3696  	return false
  3697  }
  3698  func rewriteValue_Op386MOVBload(v *ssa.Value) bool {
  3699  	v_1 := v.Args[1]
  3700  	v_0 := v.Args[0]
  3701  	b := v.Block
  3702  	config := b.Func.Config
  3703  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3704  	// cond: sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)
  3705  	// result: (MOVBLZX x)
  3706  	for {
  3707  		off := ssa.AuxIntToInt32(v.AuxInt)
  3708  		sym := ssa.AuxToSym(v.Aux)
  3709  		ptr := v_0
  3710  		if v_1.Op != ssaop.Op386MOVBstore {
  3711  			break
  3712  		}
  3713  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3714  		sym2 := ssa.AuxToSym(v_1.Aux)
  3715  		x := v_1.Args[1]
  3716  		ptr2 := v_1.Args[0]
  3717  		if !(sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)) {
  3718  			break
  3719  		}
  3720  		v.Reset(ssaop.Op386MOVBLZX)
  3721  		v.AddArg(x)
  3722  		return true
  3723  	}
  3724  	// match: (MOVBload [off1] {sym} (ADDLconst [off2] ptr) mem)
  3725  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  3726  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  3727  	for {
  3728  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3729  		sym := ssa.AuxToSym(v.Aux)
  3730  		if v_0.Op != ssaop.Op386ADDLconst {
  3731  			break
  3732  		}
  3733  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3734  		ptr := v_0.Args[0]
  3735  		mem := v_1
  3736  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  3737  			break
  3738  		}
  3739  		v.Reset(ssaop.Op386MOVBload)
  3740  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3741  		v.Aux = ssa.SymToAux(sym)
  3742  		v.AddArg2(ptr, mem)
  3743  		return true
  3744  	}
  3745  	// match: (MOVBload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3746  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  3747  	// result: (MOVBload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  3748  	for {
  3749  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3750  		sym1 := ssa.AuxToSym(v.Aux)
  3751  		if v_0.Op != ssaop.Op386LEAL {
  3752  			break
  3753  		}
  3754  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3755  		sym2 := ssa.AuxToSym(v_0.Aux)
  3756  		base := v_0.Args[0]
  3757  		mem := v_1
  3758  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  3759  			break
  3760  		}
  3761  		v.Reset(ssaop.Op386MOVBload)
  3762  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3763  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3764  		v.AddArg2(base, mem)
  3765  		return true
  3766  	}
  3767  	// match: (MOVBload [off] {sym} (SB) _)
  3768  	// cond: ssa.SymIsRO(sym)
  3769  	// result: (MOVLconst [int32(ssa.Read8(sym, int64(off)))])
  3770  	for {
  3771  		off := ssa.AuxIntToInt32(v.AuxInt)
  3772  		sym := ssa.AuxToSym(v.Aux)
  3773  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  3774  			break
  3775  		}
  3776  		v.Reset(ssaop.Op386MOVLconst)
  3777  		v.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Read8(sym, int64(off))))
  3778  		return true
  3779  	}
  3780  	return false
  3781  }
  3782  func rewriteValue_Op386MOVBstore(v *ssa.Value) bool {
  3783  	v_2 := v.Args[2]
  3784  	v_1 := v.Args[1]
  3785  	v_0 := v.Args[0]
  3786  	b := v.Block
  3787  	config := b.Func.Config
  3788  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  3789  	// result: (MOVBstore [off] {sym} ptr x mem)
  3790  	for {
  3791  		off := ssa.AuxIntToInt32(v.AuxInt)
  3792  		sym := ssa.AuxToSym(v.Aux)
  3793  		ptr := v_0
  3794  		if v_1.Op != ssaop.Op386MOVBLSX {
  3795  			break
  3796  		}
  3797  		x := v_1.Args[0]
  3798  		mem := v_2
  3799  		v.Reset(ssaop.Op386MOVBstore)
  3800  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3801  		v.Aux = ssa.SymToAux(sym)
  3802  		v.AddArg3(ptr, x, mem)
  3803  		return true
  3804  	}
  3805  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  3806  	// result: (MOVBstore [off] {sym} ptr x mem)
  3807  	for {
  3808  		off := ssa.AuxIntToInt32(v.AuxInt)
  3809  		sym := ssa.AuxToSym(v.Aux)
  3810  		ptr := v_0
  3811  		if v_1.Op != ssaop.Op386MOVBLZX {
  3812  			break
  3813  		}
  3814  		x := v_1.Args[0]
  3815  		mem := v_2
  3816  		v.Reset(ssaop.Op386MOVBstore)
  3817  		v.AuxInt = ssa.Int32ToAuxInt(off)
  3818  		v.Aux = ssa.SymToAux(sym)
  3819  		v.AddArg3(ptr, x, mem)
  3820  		return true
  3821  	}
  3822  	// match: (MOVBstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3823  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  3824  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  3825  	for {
  3826  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3827  		sym := ssa.AuxToSym(v.Aux)
  3828  		if v_0.Op != ssaop.Op386ADDLconst {
  3829  			break
  3830  		}
  3831  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3832  		ptr := v_0.Args[0]
  3833  		val := v_1
  3834  		mem := v_2
  3835  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  3836  			break
  3837  		}
  3838  		v.Reset(ssaop.Op386MOVBstore)
  3839  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3840  		v.Aux = ssa.SymToAux(sym)
  3841  		v.AddArg3(ptr, val, mem)
  3842  		return true
  3843  	}
  3844  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  3845  	// result: (MOVBstoreconst [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  3846  	for {
  3847  		off := ssa.AuxIntToInt32(v.AuxInt)
  3848  		sym := ssa.AuxToSym(v.Aux)
  3849  		ptr := v_0
  3850  		if v_1.Op != ssaop.Op386MOVLconst {
  3851  			break
  3852  		}
  3853  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  3854  		mem := v_2
  3855  		v.Reset(ssaop.Op386MOVBstoreconst)
  3856  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  3857  		v.Aux = ssa.SymToAux(sym)
  3858  		v.AddArg2(ptr, mem)
  3859  		return true
  3860  	}
  3861  	// match: (MOVBstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3862  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  3863  	// result: (MOVBstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  3864  	for {
  3865  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3866  		sym1 := ssa.AuxToSym(v.Aux)
  3867  		if v_0.Op != ssaop.Op386LEAL {
  3868  			break
  3869  		}
  3870  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3871  		sym2 := ssa.AuxToSym(v_0.Aux)
  3872  		base := v_0.Args[0]
  3873  		val := v_1
  3874  		mem := v_2
  3875  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  3876  			break
  3877  		}
  3878  		v.Reset(ssaop.Op386MOVBstore)
  3879  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3880  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3881  		v.AddArg3(base, val, mem)
  3882  		return true
  3883  	}
  3884  	return false
  3885  }
  3886  func rewriteValue_Op386MOVBstoreconst(v *ssa.Value) bool {
  3887  	v_1 := v.Args[1]
  3888  	v_0 := v.Args[0]
  3889  	b := v.Block
  3890  	config := b.Func.Config
  3891  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  3892  	// cond: sc.CanAdd32(off)
  3893  	// result: (MOVBstoreconst [sc.AddOffset32(off)] {s} ptr mem)
  3894  	for {
  3895  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  3896  		s := ssa.AuxToSym(v.Aux)
  3897  		if v_0.Op != ssaop.Op386ADDLconst {
  3898  			break
  3899  		}
  3900  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  3901  		ptr := v_0.Args[0]
  3902  		mem := v_1
  3903  		if !(sc.CanAdd32(off)) {
  3904  			break
  3905  		}
  3906  		v.Reset(ssaop.Op386MOVBstoreconst)
  3907  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  3908  		v.Aux = ssa.SymToAux(s)
  3909  		v.AddArg2(ptr, mem)
  3910  		return true
  3911  	}
  3912  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  3913  	// cond: ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  3914  	// result: (MOVBstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
  3915  	for {
  3916  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  3917  		sym1 := ssa.AuxToSym(v.Aux)
  3918  		if v_0.Op != ssaop.Op386LEAL {
  3919  			break
  3920  		}
  3921  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  3922  		sym2 := ssa.AuxToSym(v_0.Aux)
  3923  		ptr := v_0.Args[0]
  3924  		mem := v_1
  3925  		if !(ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  3926  			break
  3927  		}
  3928  		v.Reset(ssaop.Op386MOVBstoreconst)
  3929  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  3930  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  3931  		v.AddArg2(ptr, mem)
  3932  		return true
  3933  	}
  3934  	return false
  3935  }
  3936  func rewriteValue_Op386MOVLload(v *ssa.Value) bool {
  3937  	v_1 := v.Args[1]
  3938  	v_0 := v.Args[0]
  3939  	b := v.Block
  3940  	config := b.Func.Config
  3941  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  3942  	// cond: sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)
  3943  	// result: x
  3944  	for {
  3945  		off := ssa.AuxIntToInt32(v.AuxInt)
  3946  		sym := ssa.AuxToSym(v.Aux)
  3947  		ptr := v_0
  3948  		if v_1.Op != ssaop.Op386MOVLstore {
  3949  			break
  3950  		}
  3951  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  3952  		sym2 := ssa.AuxToSym(v_1.Aux)
  3953  		x := v_1.Args[1]
  3954  		ptr2 := v_1.Args[0]
  3955  		if !(sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)) {
  3956  			break
  3957  		}
  3958  		v.CopyOf(x)
  3959  		return true
  3960  	}
  3961  	// match: (MOVLload [off1] {sym} (ADDLconst [off2] ptr) mem)
  3962  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  3963  	// result: (MOVLload [off1+off2] {sym} ptr mem)
  3964  	for {
  3965  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3966  		sym := ssa.AuxToSym(v.Aux)
  3967  		if v_0.Op != ssaop.Op386ADDLconst {
  3968  			break
  3969  		}
  3970  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3971  		ptr := v_0.Args[0]
  3972  		mem := v_1
  3973  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  3974  			break
  3975  		}
  3976  		v.Reset(ssaop.Op386MOVLload)
  3977  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  3978  		v.Aux = ssa.SymToAux(sym)
  3979  		v.AddArg2(ptr, mem)
  3980  		return true
  3981  	}
  3982  	// match: (MOVLload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3983  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  3984  	// result: (MOVLload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  3985  	for {
  3986  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  3987  		sym1 := ssa.AuxToSym(v.Aux)
  3988  		if v_0.Op != ssaop.Op386LEAL {
  3989  			break
  3990  		}
  3991  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  3992  		sym2 := ssa.AuxToSym(v_0.Aux)
  3993  		base := v_0.Args[0]
  3994  		mem := v_1
  3995  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  3996  			break
  3997  		}
  3998  		v.Reset(ssaop.Op386MOVLload)
  3999  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4000  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4001  		v.AddArg2(base, mem)
  4002  		return true
  4003  	}
  4004  	// match: (MOVLload [off] {sym} (SB) _)
  4005  	// cond: ssa.SymIsRO(sym)
  4006  	// result: (MOVLconst [int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4007  	for {
  4008  		off := ssa.AuxIntToInt32(v.AuxInt)
  4009  		sym := ssa.AuxToSym(v.Aux)
  4010  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4011  			break
  4012  		}
  4013  		v.Reset(ssaop.Op386MOVLconst)
  4014  		v.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Read32(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4015  		return true
  4016  	}
  4017  	return false
  4018  }
  4019  func rewriteValue_Op386MOVLstore(v *ssa.Value) bool {
  4020  	v_2 := v.Args[2]
  4021  	v_1 := v.Args[1]
  4022  	v_0 := v.Args[0]
  4023  	b := v.Block
  4024  	config := b.Func.Config
  4025  	// match: (MOVLstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4026  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  4027  	// result: (MOVLstore [off1+off2] {sym} ptr val mem)
  4028  	for {
  4029  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4030  		sym := ssa.AuxToSym(v.Aux)
  4031  		if v_0.Op != ssaop.Op386ADDLconst {
  4032  			break
  4033  		}
  4034  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4035  		ptr := v_0.Args[0]
  4036  		val := v_1
  4037  		mem := v_2
  4038  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  4039  			break
  4040  		}
  4041  		v.Reset(ssaop.Op386MOVLstore)
  4042  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4043  		v.Aux = ssa.SymToAux(sym)
  4044  		v.AddArg3(ptr, val, mem)
  4045  		return true
  4046  	}
  4047  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  4048  	// result: (MOVLstoreconst [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  4049  	for {
  4050  		off := ssa.AuxIntToInt32(v.AuxInt)
  4051  		sym := ssa.AuxToSym(v.Aux)
  4052  		ptr := v_0
  4053  		if v_1.Op != ssaop.Op386MOVLconst {
  4054  			break
  4055  		}
  4056  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  4057  		mem := v_2
  4058  		v.Reset(ssaop.Op386MOVLstoreconst)
  4059  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  4060  		v.Aux = ssa.SymToAux(sym)
  4061  		v.AddArg2(ptr, mem)
  4062  		return true
  4063  	}
  4064  	// match: (MOVLstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4065  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4066  	// result: (MOVLstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  4067  	for {
  4068  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4069  		sym1 := ssa.AuxToSym(v.Aux)
  4070  		if v_0.Op != ssaop.Op386LEAL {
  4071  			break
  4072  		}
  4073  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4074  		sym2 := ssa.AuxToSym(v_0.Aux)
  4075  		base := v_0.Args[0]
  4076  		val := v_1
  4077  		mem := v_2
  4078  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4079  			break
  4080  		}
  4081  		v.Reset(ssaop.Op386MOVLstore)
  4082  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4083  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4084  		v.AddArg3(base, val, mem)
  4085  		return true
  4086  	}
  4087  	// match: (MOVLstore {sym} [off] ptr y:(ADDLload x [off] {sym} ptr mem) mem)
  4088  	// cond: y.Uses==1 && ssa.Clobber(y)
  4089  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4090  	for {
  4091  		off := ssa.AuxIntToInt32(v.AuxInt)
  4092  		sym := ssa.AuxToSym(v.Aux)
  4093  		ptr := v_0
  4094  		y := v_1
  4095  		if y.Op != ssaop.Op386ADDLload || ssa.AuxIntToInt32(y.AuxInt) != off || ssa.AuxToSym(y.Aux) != sym {
  4096  			break
  4097  		}
  4098  		mem := y.Args[2]
  4099  		x := y.Args[0]
  4100  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && ssa.Clobber(y)) {
  4101  			break
  4102  		}
  4103  		v.Reset(ssaop.Op386ADDLmodify)
  4104  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4105  		v.Aux = ssa.SymToAux(sym)
  4106  		v.AddArg3(ptr, x, mem)
  4107  		return true
  4108  	}
  4109  	// match: (MOVLstore {sym} [off] ptr y:(ANDLload x [off] {sym} ptr mem) mem)
  4110  	// cond: y.Uses==1 && ssa.Clobber(y)
  4111  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4112  	for {
  4113  		off := ssa.AuxIntToInt32(v.AuxInt)
  4114  		sym := ssa.AuxToSym(v.Aux)
  4115  		ptr := v_0
  4116  		y := v_1
  4117  		if y.Op != ssaop.Op386ANDLload || ssa.AuxIntToInt32(y.AuxInt) != off || ssa.AuxToSym(y.Aux) != sym {
  4118  			break
  4119  		}
  4120  		mem := y.Args[2]
  4121  		x := y.Args[0]
  4122  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && ssa.Clobber(y)) {
  4123  			break
  4124  		}
  4125  		v.Reset(ssaop.Op386ANDLmodify)
  4126  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4127  		v.Aux = ssa.SymToAux(sym)
  4128  		v.AddArg3(ptr, x, mem)
  4129  		return true
  4130  	}
  4131  	// match: (MOVLstore {sym} [off] ptr y:(ORLload x [off] {sym} ptr mem) mem)
  4132  	// cond: y.Uses==1 && ssa.Clobber(y)
  4133  	// result: (ORLmodify [off] {sym} ptr x mem)
  4134  	for {
  4135  		off := ssa.AuxIntToInt32(v.AuxInt)
  4136  		sym := ssa.AuxToSym(v.Aux)
  4137  		ptr := v_0
  4138  		y := v_1
  4139  		if y.Op != ssaop.Op386ORLload || ssa.AuxIntToInt32(y.AuxInt) != off || ssa.AuxToSym(y.Aux) != sym {
  4140  			break
  4141  		}
  4142  		mem := y.Args[2]
  4143  		x := y.Args[0]
  4144  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && ssa.Clobber(y)) {
  4145  			break
  4146  		}
  4147  		v.Reset(ssaop.Op386ORLmodify)
  4148  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4149  		v.Aux = ssa.SymToAux(sym)
  4150  		v.AddArg3(ptr, x, mem)
  4151  		return true
  4152  	}
  4153  	// match: (MOVLstore {sym} [off] ptr y:(XORLload x [off] {sym} ptr mem) mem)
  4154  	// cond: y.Uses==1 && ssa.Clobber(y)
  4155  	// result: (XORLmodify [off] {sym} ptr x mem)
  4156  	for {
  4157  		off := ssa.AuxIntToInt32(v.AuxInt)
  4158  		sym := ssa.AuxToSym(v.Aux)
  4159  		ptr := v_0
  4160  		y := v_1
  4161  		if y.Op != ssaop.Op386XORLload || ssa.AuxIntToInt32(y.AuxInt) != off || ssa.AuxToSym(y.Aux) != sym {
  4162  			break
  4163  		}
  4164  		mem := y.Args[2]
  4165  		x := y.Args[0]
  4166  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && ssa.Clobber(y)) {
  4167  			break
  4168  		}
  4169  		v.Reset(ssaop.Op386XORLmodify)
  4170  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4171  		v.Aux = ssa.SymToAux(sym)
  4172  		v.AddArg3(ptr, x, mem)
  4173  		return true
  4174  	}
  4175  	// match: (MOVLstore {sym} [off] ptr y:(ADDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4176  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4177  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4178  	for {
  4179  		off := ssa.AuxIntToInt32(v.AuxInt)
  4180  		sym := ssa.AuxToSym(v.Aux)
  4181  		ptr := v_0
  4182  		y := v_1
  4183  		if y.Op != ssaop.Op386ADDL {
  4184  			break
  4185  		}
  4186  		_ = y.Args[1]
  4187  		y_0 := y.Args[0]
  4188  		y_1 := y.Args[1]
  4189  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4190  			l := y_0
  4191  			if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4192  				continue
  4193  			}
  4194  			mem := l.Args[1]
  4195  			if ptr != l.Args[0] {
  4196  				continue
  4197  			}
  4198  			x := y_1
  4199  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4200  				continue
  4201  			}
  4202  			v.Reset(ssaop.Op386ADDLmodify)
  4203  			v.AuxInt = ssa.Int32ToAuxInt(off)
  4204  			v.Aux = ssa.SymToAux(sym)
  4205  			v.AddArg3(ptr, x, mem)
  4206  			return true
  4207  		}
  4208  		break
  4209  	}
  4210  	// match: (MOVLstore {sym} [off] ptr y:(SUBL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4211  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4212  	// result: (SUBLmodify [off] {sym} ptr x mem)
  4213  	for {
  4214  		off := ssa.AuxIntToInt32(v.AuxInt)
  4215  		sym := ssa.AuxToSym(v.Aux)
  4216  		ptr := v_0
  4217  		y := v_1
  4218  		if y.Op != ssaop.Op386SUBL {
  4219  			break
  4220  		}
  4221  		x := y.Args[1]
  4222  		l := y.Args[0]
  4223  		if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4224  			break
  4225  		}
  4226  		mem := l.Args[1]
  4227  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4228  			break
  4229  		}
  4230  		v.Reset(ssaop.Op386SUBLmodify)
  4231  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4232  		v.Aux = ssa.SymToAux(sym)
  4233  		v.AddArg3(ptr, x, mem)
  4234  		return true
  4235  	}
  4236  	// match: (MOVLstore {sym} [off] ptr y:(ANDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4237  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4238  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4239  	for {
  4240  		off := ssa.AuxIntToInt32(v.AuxInt)
  4241  		sym := ssa.AuxToSym(v.Aux)
  4242  		ptr := v_0
  4243  		y := v_1
  4244  		if y.Op != ssaop.Op386ANDL {
  4245  			break
  4246  		}
  4247  		_ = y.Args[1]
  4248  		y_0 := y.Args[0]
  4249  		y_1 := y.Args[1]
  4250  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4251  			l := y_0
  4252  			if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4253  				continue
  4254  			}
  4255  			mem := l.Args[1]
  4256  			if ptr != l.Args[0] {
  4257  				continue
  4258  			}
  4259  			x := y_1
  4260  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4261  				continue
  4262  			}
  4263  			v.Reset(ssaop.Op386ANDLmodify)
  4264  			v.AuxInt = ssa.Int32ToAuxInt(off)
  4265  			v.Aux = ssa.SymToAux(sym)
  4266  			v.AddArg3(ptr, x, mem)
  4267  			return true
  4268  		}
  4269  		break
  4270  	}
  4271  	// match: (MOVLstore {sym} [off] ptr y:(ORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4272  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4273  	// result: (ORLmodify [off] {sym} ptr x mem)
  4274  	for {
  4275  		off := ssa.AuxIntToInt32(v.AuxInt)
  4276  		sym := ssa.AuxToSym(v.Aux)
  4277  		ptr := v_0
  4278  		y := v_1
  4279  		if y.Op != ssaop.Op386ORL {
  4280  			break
  4281  		}
  4282  		_ = y.Args[1]
  4283  		y_0 := y.Args[0]
  4284  		y_1 := y.Args[1]
  4285  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4286  			l := y_0
  4287  			if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4288  				continue
  4289  			}
  4290  			mem := l.Args[1]
  4291  			if ptr != l.Args[0] {
  4292  				continue
  4293  			}
  4294  			x := y_1
  4295  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4296  				continue
  4297  			}
  4298  			v.Reset(ssaop.Op386ORLmodify)
  4299  			v.AuxInt = ssa.Int32ToAuxInt(off)
  4300  			v.Aux = ssa.SymToAux(sym)
  4301  			v.AddArg3(ptr, x, mem)
  4302  			return true
  4303  		}
  4304  		break
  4305  	}
  4306  	// match: (MOVLstore {sym} [off] ptr y:(XORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4307  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4308  	// result: (XORLmodify [off] {sym} ptr x mem)
  4309  	for {
  4310  		off := ssa.AuxIntToInt32(v.AuxInt)
  4311  		sym := ssa.AuxToSym(v.Aux)
  4312  		ptr := v_0
  4313  		y := v_1
  4314  		if y.Op != ssaop.Op386XORL {
  4315  			break
  4316  		}
  4317  		_ = y.Args[1]
  4318  		y_0 := y.Args[0]
  4319  		y_1 := y.Args[1]
  4320  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4321  			l := y_0
  4322  			if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4323  				continue
  4324  			}
  4325  			mem := l.Args[1]
  4326  			if ptr != l.Args[0] {
  4327  				continue
  4328  			}
  4329  			x := y_1
  4330  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4331  				continue
  4332  			}
  4333  			v.Reset(ssaop.Op386XORLmodify)
  4334  			v.AuxInt = ssa.Int32ToAuxInt(off)
  4335  			v.Aux = ssa.SymToAux(sym)
  4336  			v.AddArg3(ptr, x, mem)
  4337  			return true
  4338  		}
  4339  		break
  4340  	}
  4341  	// match: (MOVLstore {sym} [off] ptr y:(ADDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4342  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4343  	// result: (ADDLconstmodify [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  4344  	for {
  4345  		off := ssa.AuxIntToInt32(v.AuxInt)
  4346  		sym := ssa.AuxToSym(v.Aux)
  4347  		ptr := v_0
  4348  		y := v_1
  4349  		if y.Op != ssaop.Op386ADDLconst {
  4350  			break
  4351  		}
  4352  		c := ssa.AuxIntToInt32(y.AuxInt)
  4353  		l := y.Args[0]
  4354  		if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4355  			break
  4356  		}
  4357  		mem := l.Args[1]
  4358  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4359  			break
  4360  		}
  4361  		v.Reset(ssaop.Op386ADDLconstmodify)
  4362  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  4363  		v.Aux = ssa.SymToAux(sym)
  4364  		v.AddArg2(ptr, mem)
  4365  		return true
  4366  	}
  4367  	// match: (MOVLstore {sym} [off] ptr y:(ANDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4368  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4369  	// result: (ANDLconstmodify [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  4370  	for {
  4371  		off := ssa.AuxIntToInt32(v.AuxInt)
  4372  		sym := ssa.AuxToSym(v.Aux)
  4373  		ptr := v_0
  4374  		y := v_1
  4375  		if y.Op != ssaop.Op386ANDLconst {
  4376  			break
  4377  		}
  4378  		c := ssa.AuxIntToInt32(y.AuxInt)
  4379  		l := y.Args[0]
  4380  		if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4381  			break
  4382  		}
  4383  		mem := l.Args[1]
  4384  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4385  			break
  4386  		}
  4387  		v.Reset(ssaop.Op386ANDLconstmodify)
  4388  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  4389  		v.Aux = ssa.SymToAux(sym)
  4390  		v.AddArg2(ptr, mem)
  4391  		return true
  4392  	}
  4393  	// match: (MOVLstore {sym} [off] ptr y:(ORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4394  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4395  	// result: (ORLconstmodify [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  4396  	for {
  4397  		off := ssa.AuxIntToInt32(v.AuxInt)
  4398  		sym := ssa.AuxToSym(v.Aux)
  4399  		ptr := v_0
  4400  		y := v_1
  4401  		if y.Op != ssaop.Op386ORLconst {
  4402  			break
  4403  		}
  4404  		c := ssa.AuxIntToInt32(y.AuxInt)
  4405  		l := y.Args[0]
  4406  		if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4407  			break
  4408  		}
  4409  		mem := l.Args[1]
  4410  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4411  			break
  4412  		}
  4413  		v.Reset(ssaop.Op386ORLconstmodify)
  4414  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  4415  		v.Aux = ssa.SymToAux(sym)
  4416  		v.AddArg2(ptr, mem)
  4417  		return true
  4418  	}
  4419  	// match: (MOVLstore {sym} [off] ptr y:(XORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4420  	// cond: y.Uses==1 && l.Uses==1 && ssa.Clobber(y, l)
  4421  	// result: (XORLconstmodify [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  4422  	for {
  4423  		off := ssa.AuxIntToInt32(v.AuxInt)
  4424  		sym := ssa.AuxToSym(v.Aux)
  4425  		ptr := v_0
  4426  		y := v_1
  4427  		if y.Op != ssaop.Op386XORLconst {
  4428  			break
  4429  		}
  4430  		c := ssa.AuxIntToInt32(y.AuxInt)
  4431  		l := y.Args[0]
  4432  		if l.Op != ssaop.Op386MOVLload || ssa.AuxIntToInt32(l.AuxInt) != off || ssa.AuxToSym(l.Aux) != sym {
  4433  			break
  4434  		}
  4435  		mem := l.Args[1]
  4436  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && ssa.Clobber(y, l)) {
  4437  			break
  4438  		}
  4439  		v.Reset(ssaop.Op386XORLconstmodify)
  4440  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  4441  		v.Aux = ssa.SymToAux(sym)
  4442  		v.AddArg2(ptr, mem)
  4443  		return true
  4444  	}
  4445  	return false
  4446  }
  4447  func rewriteValue_Op386MOVLstoreconst(v *ssa.Value) bool {
  4448  	v_1 := v.Args[1]
  4449  	v_0 := v.Args[0]
  4450  	b := v.Block
  4451  	config := b.Func.Config
  4452  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  4453  	// cond: sc.CanAdd32(off)
  4454  	// result: (MOVLstoreconst [sc.AddOffset32(off)] {s} ptr mem)
  4455  	for {
  4456  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  4457  		s := ssa.AuxToSym(v.Aux)
  4458  		if v_0.Op != ssaop.Op386ADDLconst {
  4459  			break
  4460  		}
  4461  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  4462  		ptr := v_0.Args[0]
  4463  		mem := v_1
  4464  		if !(sc.CanAdd32(off)) {
  4465  			break
  4466  		}
  4467  		v.Reset(ssaop.Op386MOVLstoreconst)
  4468  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  4469  		v.Aux = ssa.SymToAux(s)
  4470  		v.AddArg2(ptr, mem)
  4471  		return true
  4472  	}
  4473  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  4474  	// cond: ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4475  	// result: (MOVLstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
  4476  	for {
  4477  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  4478  		sym1 := ssa.AuxToSym(v.Aux)
  4479  		if v_0.Op != ssaop.Op386LEAL {
  4480  			break
  4481  		}
  4482  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  4483  		sym2 := ssa.AuxToSym(v_0.Aux)
  4484  		ptr := v_0.Args[0]
  4485  		mem := v_1
  4486  		if !(ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4487  			break
  4488  		}
  4489  		v.Reset(ssaop.Op386MOVLstoreconst)
  4490  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  4491  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4492  		v.AddArg2(ptr, mem)
  4493  		return true
  4494  	}
  4495  	return false
  4496  }
  4497  func rewriteValue_Op386MOVSDconst(v *ssa.Value) bool {
  4498  	b := v.Block
  4499  	config := b.Func.Config
  4500  	typ := &b.Func.Config.Types
  4501  	// match: (MOVSDconst [c])
  4502  	// cond: config.Ctxt.Flag_shared
  4503  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4504  	for {
  4505  		c := ssa.AuxIntToFloat64(v.AuxInt)
  4506  		if !(config.Ctxt.Flag_shared) {
  4507  			break
  4508  		}
  4509  		v.Reset(ssaop.Op386MOVSDconst2)
  4510  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVSDconst1, typ.UInt32)
  4511  		v0.AuxInt = ssa.Float64ToAuxInt(c)
  4512  		v.AddArg(v0)
  4513  		return true
  4514  	}
  4515  	return false
  4516  }
  4517  func rewriteValue_Op386MOVSDload(v *ssa.Value) bool {
  4518  	v_1 := v.Args[1]
  4519  	v_0 := v.Args[0]
  4520  	b := v.Block
  4521  	config := b.Func.Config
  4522  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4523  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  4524  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4525  	for {
  4526  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4527  		sym := ssa.AuxToSym(v.Aux)
  4528  		if v_0.Op != ssaop.Op386ADDLconst {
  4529  			break
  4530  		}
  4531  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4532  		ptr := v_0.Args[0]
  4533  		mem := v_1
  4534  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  4535  			break
  4536  		}
  4537  		v.Reset(ssaop.Op386MOVSDload)
  4538  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4539  		v.Aux = ssa.SymToAux(sym)
  4540  		v.AddArg2(ptr, mem)
  4541  		return true
  4542  	}
  4543  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4544  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4545  	// result: (MOVSDload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  4546  	for {
  4547  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4548  		sym1 := ssa.AuxToSym(v.Aux)
  4549  		if v_0.Op != ssaop.Op386LEAL {
  4550  			break
  4551  		}
  4552  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4553  		sym2 := ssa.AuxToSym(v_0.Aux)
  4554  		base := v_0.Args[0]
  4555  		mem := v_1
  4556  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4557  			break
  4558  		}
  4559  		v.Reset(ssaop.Op386MOVSDload)
  4560  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4561  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4562  		v.AddArg2(base, mem)
  4563  		return true
  4564  	}
  4565  	return false
  4566  }
  4567  func rewriteValue_Op386MOVSDstore(v *ssa.Value) bool {
  4568  	v_2 := v.Args[2]
  4569  	v_1 := v.Args[1]
  4570  	v_0 := v.Args[0]
  4571  	b := v.Block
  4572  	config := b.Func.Config
  4573  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4574  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  4575  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4576  	for {
  4577  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4578  		sym := ssa.AuxToSym(v.Aux)
  4579  		if v_0.Op != ssaop.Op386ADDLconst {
  4580  			break
  4581  		}
  4582  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4583  		ptr := v_0.Args[0]
  4584  		val := v_1
  4585  		mem := v_2
  4586  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  4587  			break
  4588  		}
  4589  		v.Reset(ssaop.Op386MOVSDstore)
  4590  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4591  		v.Aux = ssa.SymToAux(sym)
  4592  		v.AddArg3(ptr, val, mem)
  4593  		return true
  4594  	}
  4595  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4596  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4597  	// result: (MOVSDstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  4598  	for {
  4599  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4600  		sym1 := ssa.AuxToSym(v.Aux)
  4601  		if v_0.Op != ssaop.Op386LEAL {
  4602  			break
  4603  		}
  4604  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4605  		sym2 := ssa.AuxToSym(v_0.Aux)
  4606  		base := v_0.Args[0]
  4607  		val := v_1
  4608  		mem := v_2
  4609  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4610  			break
  4611  		}
  4612  		v.Reset(ssaop.Op386MOVSDstore)
  4613  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4614  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4615  		v.AddArg3(base, val, mem)
  4616  		return true
  4617  	}
  4618  	return false
  4619  }
  4620  func rewriteValue_Op386MOVSSconst(v *ssa.Value) bool {
  4621  	b := v.Block
  4622  	config := b.Func.Config
  4623  	typ := &b.Func.Config.Types
  4624  	// match: (MOVSSconst [c])
  4625  	// cond: config.Ctxt.Flag_shared
  4626  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4627  	for {
  4628  		c := ssa.AuxIntToFloat32(v.AuxInt)
  4629  		if !(config.Ctxt.Flag_shared) {
  4630  			break
  4631  		}
  4632  		v.Reset(ssaop.Op386MOVSSconst2)
  4633  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVSSconst1, typ.UInt32)
  4634  		v0.AuxInt = ssa.Float32ToAuxInt(c)
  4635  		v.AddArg(v0)
  4636  		return true
  4637  	}
  4638  	return false
  4639  }
  4640  func rewriteValue_Op386MOVSSload(v *ssa.Value) bool {
  4641  	v_1 := v.Args[1]
  4642  	v_0 := v.Args[0]
  4643  	b := v.Block
  4644  	config := b.Func.Config
  4645  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4646  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  4647  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4648  	for {
  4649  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4650  		sym := ssa.AuxToSym(v.Aux)
  4651  		if v_0.Op != ssaop.Op386ADDLconst {
  4652  			break
  4653  		}
  4654  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4655  		ptr := v_0.Args[0]
  4656  		mem := v_1
  4657  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  4658  			break
  4659  		}
  4660  		v.Reset(ssaop.Op386MOVSSload)
  4661  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4662  		v.Aux = ssa.SymToAux(sym)
  4663  		v.AddArg2(ptr, mem)
  4664  		return true
  4665  	}
  4666  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4667  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4668  	// result: (MOVSSload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  4669  	for {
  4670  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4671  		sym1 := ssa.AuxToSym(v.Aux)
  4672  		if v_0.Op != ssaop.Op386LEAL {
  4673  			break
  4674  		}
  4675  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4676  		sym2 := ssa.AuxToSym(v_0.Aux)
  4677  		base := v_0.Args[0]
  4678  		mem := v_1
  4679  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4680  			break
  4681  		}
  4682  		v.Reset(ssaop.Op386MOVSSload)
  4683  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4684  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4685  		v.AddArg2(base, mem)
  4686  		return true
  4687  	}
  4688  	return false
  4689  }
  4690  func rewriteValue_Op386MOVSSstore(v *ssa.Value) bool {
  4691  	v_2 := v.Args[2]
  4692  	v_1 := v.Args[1]
  4693  	v_0 := v.Args[0]
  4694  	b := v.Block
  4695  	config := b.Func.Config
  4696  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4697  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  4698  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4699  	for {
  4700  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4701  		sym := ssa.AuxToSym(v.Aux)
  4702  		if v_0.Op != ssaop.Op386ADDLconst {
  4703  			break
  4704  		}
  4705  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4706  		ptr := v_0.Args[0]
  4707  		val := v_1
  4708  		mem := v_2
  4709  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  4710  			break
  4711  		}
  4712  		v.Reset(ssaop.Op386MOVSSstore)
  4713  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4714  		v.Aux = ssa.SymToAux(sym)
  4715  		v.AddArg3(ptr, val, mem)
  4716  		return true
  4717  	}
  4718  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4719  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4720  	// result: (MOVSSstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  4721  	for {
  4722  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4723  		sym1 := ssa.AuxToSym(v.Aux)
  4724  		if v_0.Op != ssaop.Op386LEAL {
  4725  			break
  4726  		}
  4727  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4728  		sym2 := ssa.AuxToSym(v_0.Aux)
  4729  		base := v_0.Args[0]
  4730  		val := v_1
  4731  		mem := v_2
  4732  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4733  			break
  4734  		}
  4735  		v.Reset(ssaop.Op386MOVSSstore)
  4736  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4737  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4738  		v.AddArg3(base, val, mem)
  4739  		return true
  4740  	}
  4741  	return false
  4742  }
  4743  func rewriteValue_Op386MOVWLSX(v *ssa.Value) bool {
  4744  	v_0 := v.Args[0]
  4745  	b := v.Block
  4746  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  4747  	// cond: x.Uses == 1 && ssa.Clobber(x)
  4748  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  4749  	for {
  4750  		x := v_0
  4751  		if x.Op != ssaop.Op386MOVWload {
  4752  			break
  4753  		}
  4754  		off := ssa.AuxIntToInt32(x.AuxInt)
  4755  		sym := ssa.AuxToSym(x.Aux)
  4756  		mem := x.Args[1]
  4757  		ptr := x.Args[0]
  4758  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  4759  			break
  4760  		}
  4761  		b = x.Block
  4762  		v0 := b.NewValue0(x.Pos, ssaop.Op386MOVWLSXload, v.Type)
  4763  		v.CopyOf(v0)
  4764  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  4765  		v0.Aux = ssa.SymToAux(sym)
  4766  		v0.AddArg2(ptr, mem)
  4767  		return true
  4768  	}
  4769  	// match: (MOVWLSX (ANDLconst [c] x))
  4770  	// cond: c & 0x8000 == 0
  4771  	// result: (ANDLconst [c & 0x7fff] x)
  4772  	for {
  4773  		if v_0.Op != ssaop.Op386ANDLconst {
  4774  			break
  4775  		}
  4776  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  4777  		x := v_0.Args[0]
  4778  		if !(c&0x8000 == 0) {
  4779  			break
  4780  		}
  4781  		v.Reset(ssaop.Op386ANDLconst)
  4782  		v.AuxInt = ssa.Int32ToAuxInt(c & 0x7fff)
  4783  		v.AddArg(x)
  4784  		return true
  4785  	}
  4786  	return false
  4787  }
  4788  func rewriteValue_Op386MOVWLSXload(v *ssa.Value) bool {
  4789  	v_1 := v.Args[1]
  4790  	v_0 := v.Args[0]
  4791  	b := v.Block
  4792  	config := b.Func.Config
  4793  	// match: (MOVWLSXload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  4794  	// cond: sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)
  4795  	// result: (MOVWLSX x)
  4796  	for {
  4797  		off := ssa.AuxIntToInt32(v.AuxInt)
  4798  		sym := ssa.AuxToSym(v.Aux)
  4799  		ptr := v_0
  4800  		if v_1.Op != ssaop.Op386MOVWstore {
  4801  			break
  4802  		}
  4803  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  4804  		sym2 := ssa.AuxToSym(v_1.Aux)
  4805  		x := v_1.Args[1]
  4806  		ptr2 := v_1.Args[0]
  4807  		if !(sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)) {
  4808  			break
  4809  		}
  4810  		v.Reset(ssaop.Op386MOVWLSX)
  4811  		v.AddArg(x)
  4812  		return true
  4813  	}
  4814  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4815  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4816  	// result: (MOVWLSXload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  4817  	for {
  4818  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4819  		sym1 := ssa.AuxToSym(v.Aux)
  4820  		if v_0.Op != ssaop.Op386LEAL {
  4821  			break
  4822  		}
  4823  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4824  		sym2 := ssa.AuxToSym(v_0.Aux)
  4825  		base := v_0.Args[0]
  4826  		mem := v_1
  4827  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4828  			break
  4829  		}
  4830  		v.Reset(ssaop.Op386MOVWLSXload)
  4831  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4832  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4833  		v.AddArg2(base, mem)
  4834  		return true
  4835  	}
  4836  	// match: (MOVWLSXload [off] {sym} (SB) _)
  4837  	// cond: ssa.SymIsRO(sym)
  4838  	// result: (MOVLconst [int32(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))])
  4839  	for {
  4840  		off := ssa.AuxIntToInt32(v.AuxInt)
  4841  		sym := ssa.AuxToSym(v.Aux)
  4842  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4843  			break
  4844  		}
  4845  		v.Reset(ssaop.Op386MOVLconst)
  4846  		v.AuxInt = ssa.Int32ToAuxInt(int32(int16(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))))
  4847  		return true
  4848  	}
  4849  	return false
  4850  }
  4851  func rewriteValue_Op386MOVWLZX(v *ssa.Value) bool {
  4852  	v_0 := v.Args[0]
  4853  	b := v.Block
  4854  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  4855  	// cond: x.Uses == 1 && ssa.Clobber(x)
  4856  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  4857  	for {
  4858  		x := v_0
  4859  		if x.Op != ssaop.Op386MOVWload {
  4860  			break
  4861  		}
  4862  		off := ssa.AuxIntToInt32(x.AuxInt)
  4863  		sym := ssa.AuxToSym(x.Aux)
  4864  		mem := x.Args[1]
  4865  		ptr := x.Args[0]
  4866  		if !(x.Uses == 1 && ssa.Clobber(x)) {
  4867  			break
  4868  		}
  4869  		b = x.Block
  4870  		v0 := b.NewValue0(x.Pos, ssaop.Op386MOVWload, v.Type)
  4871  		v.CopyOf(v0)
  4872  		v0.AuxInt = ssa.Int32ToAuxInt(off)
  4873  		v0.Aux = ssa.SymToAux(sym)
  4874  		v0.AddArg2(ptr, mem)
  4875  		return true
  4876  	}
  4877  	// match: (MOVWLZX (ANDLconst [c] x))
  4878  	// result: (ANDLconst [c & 0xffff] x)
  4879  	for {
  4880  		if v_0.Op != ssaop.Op386ANDLconst {
  4881  			break
  4882  		}
  4883  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  4884  		x := v_0.Args[0]
  4885  		v.Reset(ssaop.Op386ANDLconst)
  4886  		v.AuxInt = ssa.Int32ToAuxInt(c & 0xffff)
  4887  		v.AddArg(x)
  4888  		return true
  4889  	}
  4890  	return false
  4891  }
  4892  func rewriteValue_Op386MOVWload(v *ssa.Value) bool {
  4893  	v_1 := v.Args[1]
  4894  	v_0 := v.Args[0]
  4895  	b := v.Block
  4896  	config := b.Func.Config
  4897  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  4898  	// cond: sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)
  4899  	// result: (MOVWLZX x)
  4900  	for {
  4901  		off := ssa.AuxIntToInt32(v.AuxInt)
  4902  		sym := ssa.AuxToSym(v.Aux)
  4903  		ptr := v_0
  4904  		if v_1.Op != ssaop.Op386MOVWstore {
  4905  			break
  4906  		}
  4907  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  4908  		sym2 := ssa.AuxToSym(v_1.Aux)
  4909  		x := v_1.Args[1]
  4910  		ptr2 := v_1.Args[0]
  4911  		if !(sym == sym2 && off == off2 && ssa.IsSamePtr(ptr, ptr2)) {
  4912  			break
  4913  		}
  4914  		v.Reset(ssaop.Op386MOVWLZX)
  4915  		v.AddArg(x)
  4916  		return true
  4917  	}
  4918  	// match: (MOVWload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4919  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  4920  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  4921  	for {
  4922  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4923  		sym := ssa.AuxToSym(v.Aux)
  4924  		if v_0.Op != ssaop.Op386ADDLconst {
  4925  			break
  4926  		}
  4927  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4928  		ptr := v_0.Args[0]
  4929  		mem := v_1
  4930  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  4931  			break
  4932  		}
  4933  		v.Reset(ssaop.Op386MOVWload)
  4934  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4935  		v.Aux = ssa.SymToAux(sym)
  4936  		v.AddArg2(ptr, mem)
  4937  		return true
  4938  	}
  4939  	// match: (MOVWload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4940  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  4941  	// result: (MOVWload [off1+off2] {ssa.MergeSym(sym1,sym2)} base mem)
  4942  	for {
  4943  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  4944  		sym1 := ssa.AuxToSym(v.Aux)
  4945  		if v_0.Op != ssaop.Op386LEAL {
  4946  			break
  4947  		}
  4948  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  4949  		sym2 := ssa.AuxToSym(v_0.Aux)
  4950  		base := v_0.Args[0]
  4951  		mem := v_1
  4952  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  4953  			break
  4954  		}
  4955  		v.Reset(ssaop.Op386MOVWload)
  4956  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  4957  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  4958  		v.AddArg2(base, mem)
  4959  		return true
  4960  	}
  4961  	// match: (MOVWload [off] {sym} (SB) _)
  4962  	// cond: ssa.SymIsRO(sym)
  4963  	// result: (MOVLconst [int32(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder))])
  4964  	for {
  4965  		off := ssa.AuxIntToInt32(v.AuxInt)
  4966  		sym := ssa.AuxToSym(v.Aux)
  4967  		if v_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym)) {
  4968  			break
  4969  		}
  4970  		v.Reset(ssaop.Op386MOVLconst)
  4971  		v.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Read16(sym, int64(off), config.Ctxt.Arch.ByteOrder)))
  4972  		return true
  4973  	}
  4974  	return false
  4975  }
  4976  func rewriteValue_Op386MOVWstore(v *ssa.Value) bool {
  4977  	v_2 := v.Args[2]
  4978  	v_1 := v.Args[1]
  4979  	v_0 := v.Args[0]
  4980  	b := v.Block
  4981  	config := b.Func.Config
  4982  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  4983  	// result: (MOVWstore [off] {sym} ptr x mem)
  4984  	for {
  4985  		off := ssa.AuxIntToInt32(v.AuxInt)
  4986  		sym := ssa.AuxToSym(v.Aux)
  4987  		ptr := v_0
  4988  		if v_1.Op != ssaop.Op386MOVWLSX {
  4989  			break
  4990  		}
  4991  		x := v_1.Args[0]
  4992  		mem := v_2
  4993  		v.Reset(ssaop.Op386MOVWstore)
  4994  		v.AuxInt = ssa.Int32ToAuxInt(off)
  4995  		v.Aux = ssa.SymToAux(sym)
  4996  		v.AddArg3(ptr, x, mem)
  4997  		return true
  4998  	}
  4999  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  5000  	// result: (MOVWstore [off] {sym} ptr x mem)
  5001  	for {
  5002  		off := ssa.AuxIntToInt32(v.AuxInt)
  5003  		sym := ssa.AuxToSym(v.Aux)
  5004  		ptr := v_0
  5005  		if v_1.Op != ssaop.Op386MOVWLZX {
  5006  			break
  5007  		}
  5008  		x := v_1.Args[0]
  5009  		mem := v_2
  5010  		v.Reset(ssaop.Op386MOVWstore)
  5011  		v.AuxInt = ssa.Int32ToAuxInt(off)
  5012  		v.Aux = ssa.SymToAux(sym)
  5013  		v.AddArg3(ptr, x, mem)
  5014  		return true
  5015  	}
  5016  	// match: (MOVWstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5017  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  5018  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  5019  	for {
  5020  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5021  		sym := ssa.AuxToSym(v.Aux)
  5022  		if v_0.Op != ssaop.Op386ADDLconst {
  5023  			break
  5024  		}
  5025  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5026  		ptr := v_0.Args[0]
  5027  		val := v_1
  5028  		mem := v_2
  5029  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  5030  			break
  5031  		}
  5032  		v.Reset(ssaop.Op386MOVWstore)
  5033  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5034  		v.Aux = ssa.SymToAux(sym)
  5035  		v.AddArg3(ptr, val, mem)
  5036  		return true
  5037  	}
  5038  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5039  	// result: (MOVWstoreconst [ssa.MakeValAndOff(c,off)] {sym} ptr mem)
  5040  	for {
  5041  		off := ssa.AuxIntToInt32(v.AuxInt)
  5042  		sym := ssa.AuxToSym(v.Aux)
  5043  		ptr := v_0
  5044  		if v_1.Op != ssaop.Op386MOVLconst {
  5045  			break
  5046  		}
  5047  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  5048  		mem := v_2
  5049  		v.Reset(ssaop.Op386MOVWstoreconst)
  5050  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(c, off))
  5051  		v.Aux = ssa.SymToAux(sym)
  5052  		v.AddArg2(ptr, mem)
  5053  		return true
  5054  	}
  5055  	// match: (MOVWstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5056  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  5057  	// result: (MOVWstore [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  5058  	for {
  5059  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5060  		sym1 := ssa.AuxToSym(v.Aux)
  5061  		if v_0.Op != ssaop.Op386LEAL {
  5062  			break
  5063  		}
  5064  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5065  		sym2 := ssa.AuxToSym(v_0.Aux)
  5066  		base := v_0.Args[0]
  5067  		val := v_1
  5068  		mem := v_2
  5069  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  5070  			break
  5071  		}
  5072  		v.Reset(ssaop.Op386MOVWstore)
  5073  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5074  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5075  		v.AddArg3(base, val, mem)
  5076  		return true
  5077  	}
  5078  	return false
  5079  }
  5080  func rewriteValue_Op386MOVWstoreconst(v *ssa.Value) bool {
  5081  	v_1 := v.Args[1]
  5082  	v_0 := v.Args[0]
  5083  	b := v.Block
  5084  	config := b.Func.Config
  5085  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5086  	// cond: sc.CanAdd32(off)
  5087  	// result: (MOVWstoreconst [sc.AddOffset32(off)] {s} ptr mem)
  5088  	for {
  5089  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  5090  		s := ssa.AuxToSym(v.Aux)
  5091  		if v_0.Op != ssaop.Op386ADDLconst {
  5092  			break
  5093  		}
  5094  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  5095  		ptr := v_0.Args[0]
  5096  		mem := v_1
  5097  		if !(sc.CanAdd32(off)) {
  5098  			break
  5099  		}
  5100  		v.Reset(ssaop.Op386MOVWstoreconst)
  5101  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  5102  		v.Aux = ssa.SymToAux(s)
  5103  		v.AddArg2(ptr, mem)
  5104  		return true
  5105  	}
  5106  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  5107  	// cond: ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  5108  	// result: (MOVWstoreconst [sc.AddOffset32(off)] {ssa.MergeSym(sym1, sym2)} ptr mem)
  5109  	for {
  5110  		sc := ssa.AuxIntToValAndOff(v.AuxInt)
  5111  		sym1 := ssa.AuxToSym(v.Aux)
  5112  		if v_0.Op != ssaop.Op386LEAL {
  5113  			break
  5114  		}
  5115  		off := ssa.AuxIntToInt32(v_0.AuxInt)
  5116  		sym2 := ssa.AuxToSym(v_0.Aux)
  5117  		ptr := v_0.Args[0]
  5118  		mem := v_1
  5119  		if !(ssa.CanMergeSym(sym1, sym2) && sc.CanAdd32(off) && (ptr.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  5120  			break
  5121  		}
  5122  		v.Reset(ssaop.Op386MOVWstoreconst)
  5123  		v.AuxInt = ssa.ValAndOffToAuxInt(sc.AddOffset32(off))
  5124  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5125  		v.AddArg2(ptr, mem)
  5126  		return true
  5127  	}
  5128  	return false
  5129  }
  5130  func rewriteValue_Op386MULL(v *ssa.Value) bool {
  5131  	v_1 := v.Args[1]
  5132  	v_0 := v.Args[0]
  5133  	// match: (MULL x (MOVLconst [c]))
  5134  	// result: (MULLconst [c] x)
  5135  	for {
  5136  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5137  			x := v_0
  5138  			if v_1.Op != ssaop.Op386MOVLconst {
  5139  				continue
  5140  			}
  5141  			c := ssa.AuxIntToInt32(v_1.AuxInt)
  5142  			v.Reset(ssaop.Op386MULLconst)
  5143  			v.AuxInt = ssa.Int32ToAuxInt(c)
  5144  			v.AddArg(x)
  5145  			return true
  5146  		}
  5147  		break
  5148  	}
  5149  	// match: (MULL x l:(MOVLload [off] {sym} ptr mem))
  5150  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  5151  	// result: (MULLload x [off] {sym} ptr mem)
  5152  	for {
  5153  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5154  			x := v_0
  5155  			l := v_1
  5156  			if l.Op != ssaop.Op386MOVLload {
  5157  				continue
  5158  			}
  5159  			off := ssa.AuxIntToInt32(l.AuxInt)
  5160  			sym := ssa.AuxToSym(l.Aux)
  5161  			mem := l.Args[1]
  5162  			ptr := l.Args[0]
  5163  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  5164  				continue
  5165  			}
  5166  			v.Reset(ssaop.Op386MULLload)
  5167  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5168  			v.Aux = ssa.SymToAux(sym)
  5169  			v.AddArg3(x, ptr, mem)
  5170  			return true
  5171  		}
  5172  		break
  5173  	}
  5174  	return false
  5175  }
  5176  func rewriteValue_Op386MULLconst(v *ssa.Value) bool {
  5177  	v_0 := v.Args[0]
  5178  	b := v.Block
  5179  	// match: (MULLconst [c] (MULLconst [d] x))
  5180  	// result: (MULLconst [c * d] x)
  5181  	for {
  5182  		c := ssa.AuxIntToInt32(v.AuxInt)
  5183  		if v_0.Op != ssaop.Op386MULLconst {
  5184  			break
  5185  		}
  5186  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5187  		x := v_0.Args[0]
  5188  		v.Reset(ssaop.Op386MULLconst)
  5189  		v.AuxInt = ssa.Int32ToAuxInt(c * d)
  5190  		v.AddArg(x)
  5191  		return true
  5192  	}
  5193  	// match: (MULLconst [-9] x)
  5194  	// result: (NEGL (LEAL8 <v.Type> x x))
  5195  	for {
  5196  		if ssa.AuxIntToInt32(v.AuxInt) != -9 {
  5197  			break
  5198  		}
  5199  		x := v_0
  5200  		v.Reset(ssaop.Op386NEGL)
  5201  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL8, v.Type)
  5202  		v0.AddArg2(x, x)
  5203  		v.AddArg(v0)
  5204  		return true
  5205  	}
  5206  	// match: (MULLconst [-5] x)
  5207  	// result: (NEGL (LEAL4 <v.Type> x x))
  5208  	for {
  5209  		if ssa.AuxIntToInt32(v.AuxInt) != -5 {
  5210  			break
  5211  		}
  5212  		x := v_0
  5213  		v.Reset(ssaop.Op386NEGL)
  5214  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL4, v.Type)
  5215  		v0.AddArg2(x, x)
  5216  		v.AddArg(v0)
  5217  		return true
  5218  	}
  5219  	// match: (MULLconst [-3] x)
  5220  	// result: (NEGL (LEAL2 <v.Type> x x))
  5221  	for {
  5222  		if ssa.AuxIntToInt32(v.AuxInt) != -3 {
  5223  			break
  5224  		}
  5225  		x := v_0
  5226  		v.Reset(ssaop.Op386NEGL)
  5227  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL2, v.Type)
  5228  		v0.AddArg2(x, x)
  5229  		v.AddArg(v0)
  5230  		return true
  5231  	}
  5232  	// match: (MULLconst [-1] x)
  5233  	// result: (NEGL x)
  5234  	for {
  5235  		if ssa.AuxIntToInt32(v.AuxInt) != -1 {
  5236  			break
  5237  		}
  5238  		x := v_0
  5239  		v.Reset(ssaop.Op386NEGL)
  5240  		v.AddArg(x)
  5241  		return true
  5242  	}
  5243  	// match: (MULLconst [0] _)
  5244  	// result: (MOVLconst [0])
  5245  	for {
  5246  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  5247  			break
  5248  		}
  5249  		v.Reset(ssaop.Op386MOVLconst)
  5250  		v.AuxInt = ssa.Int32ToAuxInt(0)
  5251  		return true
  5252  	}
  5253  	// match: (MULLconst [1] x)
  5254  	// result: x
  5255  	for {
  5256  		if ssa.AuxIntToInt32(v.AuxInt) != 1 {
  5257  			break
  5258  		}
  5259  		x := v_0
  5260  		v.CopyOf(x)
  5261  		return true
  5262  	}
  5263  	// match: (MULLconst [3] x)
  5264  	// result: (LEAL2 x x)
  5265  	for {
  5266  		if ssa.AuxIntToInt32(v.AuxInt) != 3 {
  5267  			break
  5268  		}
  5269  		x := v_0
  5270  		v.Reset(ssaop.Op386LEAL2)
  5271  		v.AddArg2(x, x)
  5272  		return true
  5273  	}
  5274  	// match: (MULLconst [5] x)
  5275  	// result: (LEAL4 x x)
  5276  	for {
  5277  		if ssa.AuxIntToInt32(v.AuxInt) != 5 {
  5278  			break
  5279  		}
  5280  		x := v_0
  5281  		v.Reset(ssaop.Op386LEAL4)
  5282  		v.AddArg2(x, x)
  5283  		return true
  5284  	}
  5285  	// match: (MULLconst [7] x)
  5286  	// result: (LEAL2 x (LEAL2 <v.Type> x x))
  5287  	for {
  5288  		if ssa.AuxIntToInt32(v.AuxInt) != 7 {
  5289  			break
  5290  		}
  5291  		x := v_0
  5292  		v.Reset(ssaop.Op386LEAL2)
  5293  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL2, v.Type)
  5294  		v0.AddArg2(x, x)
  5295  		v.AddArg2(x, v0)
  5296  		return true
  5297  	}
  5298  	// match: (MULLconst [9] x)
  5299  	// result: (LEAL8 x x)
  5300  	for {
  5301  		if ssa.AuxIntToInt32(v.AuxInt) != 9 {
  5302  			break
  5303  		}
  5304  		x := v_0
  5305  		v.Reset(ssaop.Op386LEAL8)
  5306  		v.AddArg2(x, x)
  5307  		return true
  5308  	}
  5309  	// match: (MULLconst [11] x)
  5310  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  5311  	for {
  5312  		if ssa.AuxIntToInt32(v.AuxInt) != 11 {
  5313  			break
  5314  		}
  5315  		x := v_0
  5316  		v.Reset(ssaop.Op386LEAL2)
  5317  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL4, v.Type)
  5318  		v0.AddArg2(x, x)
  5319  		v.AddArg2(x, v0)
  5320  		return true
  5321  	}
  5322  	// match: (MULLconst [13] x)
  5323  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  5324  	for {
  5325  		if ssa.AuxIntToInt32(v.AuxInt) != 13 {
  5326  			break
  5327  		}
  5328  		x := v_0
  5329  		v.Reset(ssaop.Op386LEAL4)
  5330  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL2, v.Type)
  5331  		v0.AddArg2(x, x)
  5332  		v.AddArg2(x, v0)
  5333  		return true
  5334  	}
  5335  	// match: (MULLconst [19] x)
  5336  	// result: (LEAL2 x (LEAL8 <v.Type> x x))
  5337  	for {
  5338  		if ssa.AuxIntToInt32(v.AuxInt) != 19 {
  5339  			break
  5340  		}
  5341  		x := v_0
  5342  		v.Reset(ssaop.Op386LEAL2)
  5343  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL8, v.Type)
  5344  		v0.AddArg2(x, x)
  5345  		v.AddArg2(x, v0)
  5346  		return true
  5347  	}
  5348  	// match: (MULLconst [21] x)
  5349  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  5350  	for {
  5351  		if ssa.AuxIntToInt32(v.AuxInt) != 21 {
  5352  			break
  5353  		}
  5354  		x := v_0
  5355  		v.Reset(ssaop.Op386LEAL4)
  5356  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL4, v.Type)
  5357  		v0.AddArg2(x, x)
  5358  		v.AddArg2(x, v0)
  5359  		return true
  5360  	}
  5361  	// match: (MULLconst [25] x)
  5362  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  5363  	for {
  5364  		if ssa.AuxIntToInt32(v.AuxInt) != 25 {
  5365  			break
  5366  		}
  5367  		x := v_0
  5368  		v.Reset(ssaop.Op386LEAL8)
  5369  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL2, v.Type)
  5370  		v0.AddArg2(x, x)
  5371  		v.AddArg2(x, v0)
  5372  		return true
  5373  	}
  5374  	// match: (MULLconst [27] x)
  5375  	// result: (LEAL8 (LEAL2 <v.Type> x x) (LEAL2 <v.Type> x x))
  5376  	for {
  5377  		if ssa.AuxIntToInt32(v.AuxInt) != 27 {
  5378  			break
  5379  		}
  5380  		x := v_0
  5381  		v.Reset(ssaop.Op386LEAL8)
  5382  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL2, v.Type)
  5383  		v0.AddArg2(x, x)
  5384  		v.AddArg2(v0, v0)
  5385  		return true
  5386  	}
  5387  	// match: (MULLconst [37] x)
  5388  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  5389  	for {
  5390  		if ssa.AuxIntToInt32(v.AuxInt) != 37 {
  5391  			break
  5392  		}
  5393  		x := v_0
  5394  		v.Reset(ssaop.Op386LEAL4)
  5395  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL8, v.Type)
  5396  		v0.AddArg2(x, x)
  5397  		v.AddArg2(x, v0)
  5398  		return true
  5399  	}
  5400  	// match: (MULLconst [41] x)
  5401  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  5402  	for {
  5403  		if ssa.AuxIntToInt32(v.AuxInt) != 41 {
  5404  			break
  5405  		}
  5406  		x := v_0
  5407  		v.Reset(ssaop.Op386LEAL8)
  5408  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL4, v.Type)
  5409  		v0.AddArg2(x, x)
  5410  		v.AddArg2(x, v0)
  5411  		return true
  5412  	}
  5413  	// match: (MULLconst [45] x)
  5414  	// result: (LEAL8 (LEAL4 <v.Type> x x) (LEAL4 <v.Type> x x))
  5415  	for {
  5416  		if ssa.AuxIntToInt32(v.AuxInt) != 45 {
  5417  			break
  5418  		}
  5419  		x := v_0
  5420  		v.Reset(ssaop.Op386LEAL8)
  5421  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL4, v.Type)
  5422  		v0.AddArg2(x, x)
  5423  		v.AddArg2(v0, v0)
  5424  		return true
  5425  	}
  5426  	// match: (MULLconst [73] x)
  5427  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  5428  	for {
  5429  		if ssa.AuxIntToInt32(v.AuxInt) != 73 {
  5430  			break
  5431  		}
  5432  		x := v_0
  5433  		v.Reset(ssaop.Op386LEAL8)
  5434  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL8, v.Type)
  5435  		v0.AddArg2(x, x)
  5436  		v.AddArg2(x, v0)
  5437  		return true
  5438  	}
  5439  	// match: (MULLconst [81] x)
  5440  	// result: (LEAL8 (LEAL8 <v.Type> x x) (LEAL8 <v.Type> x x))
  5441  	for {
  5442  		if ssa.AuxIntToInt32(v.AuxInt) != 81 {
  5443  			break
  5444  		}
  5445  		x := v_0
  5446  		v.Reset(ssaop.Op386LEAL8)
  5447  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL8, v.Type)
  5448  		v0.AddArg2(x, x)
  5449  		v.AddArg2(v0, v0)
  5450  		return true
  5451  	}
  5452  	// match: (MULLconst [c] x)
  5453  	// cond: ssa.IsPowerOfTwo(c+1) && c >= 15
  5454  	// result: (SUBL (SHLLconst <v.Type> [int32(ssa.Log32(c+1))] x) x)
  5455  	for {
  5456  		c := ssa.AuxIntToInt32(v.AuxInt)
  5457  		x := v_0
  5458  		if !(ssa.IsPowerOfTwo(c+1) && c >= 15) {
  5459  			break
  5460  		}
  5461  		v.Reset(ssaop.Op386SUBL)
  5462  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLLconst, v.Type)
  5463  		v0.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c + 1)))
  5464  		v0.AddArg(x)
  5465  		v.AddArg2(v0, x)
  5466  		return true
  5467  	}
  5468  	// match: (MULLconst [c] x)
  5469  	// cond: ssa.IsPowerOfTwo(c-1) && c >= 17
  5470  	// result: (LEAL1 (SHLLconst <v.Type> [int32(ssa.Log32(c-1))] x) x)
  5471  	for {
  5472  		c := ssa.AuxIntToInt32(v.AuxInt)
  5473  		x := v_0
  5474  		if !(ssa.IsPowerOfTwo(c-1) && c >= 17) {
  5475  			break
  5476  		}
  5477  		v.Reset(ssaop.Op386LEAL1)
  5478  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLLconst, v.Type)
  5479  		v0.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c - 1)))
  5480  		v0.AddArg(x)
  5481  		v.AddArg2(v0, x)
  5482  		return true
  5483  	}
  5484  	// match: (MULLconst [c] x)
  5485  	// cond: ssa.IsPowerOfTwo(c-2) && c >= 34
  5486  	// result: (LEAL2 (SHLLconst <v.Type> [int32(ssa.Log32(c-2))] x) x)
  5487  	for {
  5488  		c := ssa.AuxIntToInt32(v.AuxInt)
  5489  		x := v_0
  5490  		if !(ssa.IsPowerOfTwo(c-2) && c >= 34) {
  5491  			break
  5492  		}
  5493  		v.Reset(ssaop.Op386LEAL2)
  5494  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLLconst, v.Type)
  5495  		v0.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c - 2)))
  5496  		v0.AddArg(x)
  5497  		v.AddArg2(v0, x)
  5498  		return true
  5499  	}
  5500  	// match: (MULLconst [c] x)
  5501  	// cond: ssa.IsPowerOfTwo(c-4) && c >= 68
  5502  	// result: (LEAL4 (SHLLconst <v.Type> [int32(ssa.Log32(c-4))] x) x)
  5503  	for {
  5504  		c := ssa.AuxIntToInt32(v.AuxInt)
  5505  		x := v_0
  5506  		if !(ssa.IsPowerOfTwo(c-4) && c >= 68) {
  5507  			break
  5508  		}
  5509  		v.Reset(ssaop.Op386LEAL4)
  5510  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLLconst, v.Type)
  5511  		v0.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c - 4)))
  5512  		v0.AddArg(x)
  5513  		v.AddArg2(v0, x)
  5514  		return true
  5515  	}
  5516  	// match: (MULLconst [c] x)
  5517  	// cond: ssa.IsPowerOfTwo(c-8) && c >= 136
  5518  	// result: (LEAL8 (SHLLconst <v.Type> [int32(ssa.Log32(c-8))] x) x)
  5519  	for {
  5520  		c := ssa.AuxIntToInt32(v.AuxInt)
  5521  		x := v_0
  5522  		if !(ssa.IsPowerOfTwo(c-8) && c >= 136) {
  5523  			break
  5524  		}
  5525  		v.Reset(ssaop.Op386LEAL8)
  5526  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLLconst, v.Type)
  5527  		v0.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c - 8)))
  5528  		v0.AddArg(x)
  5529  		v.AddArg2(v0, x)
  5530  		return true
  5531  	}
  5532  	// match: (MULLconst [c] x)
  5533  	// cond: c%3 == 0 && ssa.IsPowerOfTwo(c/3)
  5534  	// result: (SHLLconst [int32(ssa.Log32(c/3))] (LEAL2 <v.Type> x x))
  5535  	for {
  5536  		c := ssa.AuxIntToInt32(v.AuxInt)
  5537  		x := v_0
  5538  		if !(c%3 == 0 && ssa.IsPowerOfTwo(c/3)) {
  5539  			break
  5540  		}
  5541  		v.Reset(ssaop.Op386SHLLconst)
  5542  		v.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c / 3)))
  5543  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL2, v.Type)
  5544  		v0.AddArg2(x, x)
  5545  		v.AddArg(v0)
  5546  		return true
  5547  	}
  5548  	// match: (MULLconst [c] x)
  5549  	// cond: c%5 == 0 && ssa.IsPowerOfTwo(c/5)
  5550  	// result: (SHLLconst [int32(ssa.Log32(c/5))] (LEAL4 <v.Type> x x))
  5551  	for {
  5552  		c := ssa.AuxIntToInt32(v.AuxInt)
  5553  		x := v_0
  5554  		if !(c%5 == 0 && ssa.IsPowerOfTwo(c/5)) {
  5555  			break
  5556  		}
  5557  		v.Reset(ssaop.Op386SHLLconst)
  5558  		v.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c / 5)))
  5559  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL4, v.Type)
  5560  		v0.AddArg2(x, x)
  5561  		v.AddArg(v0)
  5562  		return true
  5563  	}
  5564  	// match: (MULLconst [c] x)
  5565  	// cond: c%9 == 0 && ssa.IsPowerOfTwo(c/9)
  5566  	// result: (SHLLconst [int32(ssa.Log32(c/9))] (LEAL8 <v.Type> x x))
  5567  	for {
  5568  		c := ssa.AuxIntToInt32(v.AuxInt)
  5569  		x := v_0
  5570  		if !(c%9 == 0 && ssa.IsPowerOfTwo(c/9)) {
  5571  			break
  5572  		}
  5573  		v.Reset(ssaop.Op386SHLLconst)
  5574  		v.AuxInt = ssa.Int32ToAuxInt(int32(ssa.Log32(c / 9)))
  5575  		v0 := b.NewValue0(v.Pos, ssaop.Op386LEAL8, v.Type)
  5576  		v0.AddArg2(x, x)
  5577  		v.AddArg(v0)
  5578  		return true
  5579  	}
  5580  	// match: (MULLconst [c] (MOVLconst [d]))
  5581  	// result: (MOVLconst [c*d])
  5582  	for {
  5583  		c := ssa.AuxIntToInt32(v.AuxInt)
  5584  		if v_0.Op != ssaop.Op386MOVLconst {
  5585  			break
  5586  		}
  5587  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5588  		v.Reset(ssaop.Op386MOVLconst)
  5589  		v.AuxInt = ssa.Int32ToAuxInt(c * d)
  5590  		return true
  5591  	}
  5592  	return false
  5593  }
  5594  func rewriteValue_Op386MULLload(v *ssa.Value) bool {
  5595  	v_2 := v.Args[2]
  5596  	v_1 := v.Args[1]
  5597  	v_0 := v.Args[0]
  5598  	b := v.Block
  5599  	config := b.Func.Config
  5600  	// match: (MULLload [off1] {sym} val (ADDLconst [off2] base) mem)
  5601  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  5602  	// result: (MULLload [off1+off2] {sym} val base mem)
  5603  	for {
  5604  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5605  		sym := ssa.AuxToSym(v.Aux)
  5606  		val := v_0
  5607  		if v_1.Op != ssaop.Op386ADDLconst {
  5608  			break
  5609  		}
  5610  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5611  		base := v_1.Args[0]
  5612  		mem := v_2
  5613  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  5614  			break
  5615  		}
  5616  		v.Reset(ssaop.Op386MULLload)
  5617  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5618  		v.Aux = ssa.SymToAux(sym)
  5619  		v.AddArg3(val, base, mem)
  5620  		return true
  5621  	}
  5622  	// match: (MULLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  5623  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  5624  	// result: (MULLload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  5625  	for {
  5626  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5627  		sym1 := ssa.AuxToSym(v.Aux)
  5628  		val := v_0
  5629  		if v_1.Op != ssaop.Op386LEAL {
  5630  			break
  5631  		}
  5632  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5633  		sym2 := ssa.AuxToSym(v_1.Aux)
  5634  		base := v_1.Args[0]
  5635  		mem := v_2
  5636  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  5637  			break
  5638  		}
  5639  		v.Reset(ssaop.Op386MULLload)
  5640  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5641  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5642  		v.AddArg3(val, base, mem)
  5643  		return true
  5644  	}
  5645  	return false
  5646  }
  5647  func rewriteValue_Op386MULSD(v *ssa.Value) bool {
  5648  	v_1 := v.Args[1]
  5649  	v_0 := v.Args[0]
  5650  	// match: (MULSD x l:(MOVSDload [off] {sym} ptr mem))
  5651  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  5652  	// result: (MULSDload x [off] {sym} ptr mem)
  5653  	for {
  5654  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5655  			x := v_0
  5656  			l := v_1
  5657  			if l.Op != ssaop.Op386MOVSDload {
  5658  				continue
  5659  			}
  5660  			off := ssa.AuxIntToInt32(l.AuxInt)
  5661  			sym := ssa.AuxToSym(l.Aux)
  5662  			mem := l.Args[1]
  5663  			ptr := l.Args[0]
  5664  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  5665  				continue
  5666  			}
  5667  			v.Reset(ssaop.Op386MULSDload)
  5668  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5669  			v.Aux = ssa.SymToAux(sym)
  5670  			v.AddArg3(x, ptr, mem)
  5671  			return true
  5672  		}
  5673  		break
  5674  	}
  5675  	return false
  5676  }
  5677  func rewriteValue_Op386MULSDload(v *ssa.Value) bool {
  5678  	v_2 := v.Args[2]
  5679  	v_1 := v.Args[1]
  5680  	v_0 := v.Args[0]
  5681  	b := v.Block
  5682  	config := b.Func.Config
  5683  	// match: (MULSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  5684  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  5685  	// result: (MULSDload [off1+off2] {sym} val base mem)
  5686  	for {
  5687  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5688  		sym := ssa.AuxToSym(v.Aux)
  5689  		val := v_0
  5690  		if v_1.Op != ssaop.Op386ADDLconst {
  5691  			break
  5692  		}
  5693  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5694  		base := v_1.Args[0]
  5695  		mem := v_2
  5696  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  5697  			break
  5698  		}
  5699  		v.Reset(ssaop.Op386MULSDload)
  5700  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5701  		v.Aux = ssa.SymToAux(sym)
  5702  		v.AddArg3(val, base, mem)
  5703  		return true
  5704  	}
  5705  	// match: (MULSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  5706  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  5707  	// result: (MULSDload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  5708  	for {
  5709  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5710  		sym1 := ssa.AuxToSym(v.Aux)
  5711  		val := v_0
  5712  		if v_1.Op != ssaop.Op386LEAL {
  5713  			break
  5714  		}
  5715  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5716  		sym2 := ssa.AuxToSym(v_1.Aux)
  5717  		base := v_1.Args[0]
  5718  		mem := v_2
  5719  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  5720  			break
  5721  		}
  5722  		v.Reset(ssaop.Op386MULSDload)
  5723  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5724  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5725  		v.AddArg3(val, base, mem)
  5726  		return true
  5727  	}
  5728  	return false
  5729  }
  5730  func rewriteValue_Op386MULSS(v *ssa.Value) bool {
  5731  	v_1 := v.Args[1]
  5732  	v_0 := v.Args[0]
  5733  	// match: (MULSS x l:(MOVSSload [off] {sym} ptr mem))
  5734  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  5735  	// result: (MULSSload x [off] {sym} ptr mem)
  5736  	for {
  5737  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5738  			x := v_0
  5739  			l := v_1
  5740  			if l.Op != ssaop.Op386MOVSSload {
  5741  				continue
  5742  			}
  5743  			off := ssa.AuxIntToInt32(l.AuxInt)
  5744  			sym := ssa.AuxToSym(l.Aux)
  5745  			mem := l.Args[1]
  5746  			ptr := l.Args[0]
  5747  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  5748  				continue
  5749  			}
  5750  			v.Reset(ssaop.Op386MULSSload)
  5751  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5752  			v.Aux = ssa.SymToAux(sym)
  5753  			v.AddArg3(x, ptr, mem)
  5754  			return true
  5755  		}
  5756  		break
  5757  	}
  5758  	return false
  5759  }
  5760  func rewriteValue_Op386MULSSload(v *ssa.Value) bool {
  5761  	v_2 := v.Args[2]
  5762  	v_1 := v.Args[1]
  5763  	v_0 := v.Args[0]
  5764  	b := v.Block
  5765  	config := b.Func.Config
  5766  	// match: (MULSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  5767  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  5768  	// result: (MULSSload [off1+off2] {sym} val base mem)
  5769  	for {
  5770  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5771  		sym := ssa.AuxToSym(v.Aux)
  5772  		val := v_0
  5773  		if v_1.Op != ssaop.Op386ADDLconst {
  5774  			break
  5775  		}
  5776  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5777  		base := v_1.Args[0]
  5778  		mem := v_2
  5779  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  5780  			break
  5781  		}
  5782  		v.Reset(ssaop.Op386MULSSload)
  5783  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5784  		v.Aux = ssa.SymToAux(sym)
  5785  		v.AddArg3(val, base, mem)
  5786  		return true
  5787  	}
  5788  	// match: (MULSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  5789  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  5790  	// result: (MULSSload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  5791  	for {
  5792  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  5793  		sym1 := ssa.AuxToSym(v.Aux)
  5794  		val := v_0
  5795  		if v_1.Op != ssaop.Op386LEAL {
  5796  			break
  5797  		}
  5798  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  5799  		sym2 := ssa.AuxToSym(v_1.Aux)
  5800  		base := v_1.Args[0]
  5801  		mem := v_2
  5802  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  5803  			break
  5804  		}
  5805  		v.Reset(ssaop.Op386MULSSload)
  5806  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  5807  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5808  		v.AddArg3(val, base, mem)
  5809  		return true
  5810  	}
  5811  	return false
  5812  }
  5813  func rewriteValue_Op386NEGL(v *ssa.Value) bool {
  5814  	v_0 := v.Args[0]
  5815  	// match: (NEGL (MOVLconst [c]))
  5816  	// result: (MOVLconst [-c])
  5817  	for {
  5818  		if v_0.Op != ssaop.Op386MOVLconst {
  5819  			break
  5820  		}
  5821  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  5822  		v.Reset(ssaop.Op386MOVLconst)
  5823  		v.AuxInt = ssa.Int32ToAuxInt(-c)
  5824  		return true
  5825  	}
  5826  	return false
  5827  }
  5828  func rewriteValue_Op386NOTL(v *ssa.Value) bool {
  5829  	v_0 := v.Args[0]
  5830  	// match: (NOTL (MOVLconst [c]))
  5831  	// result: (MOVLconst [^c])
  5832  	for {
  5833  		if v_0.Op != ssaop.Op386MOVLconst {
  5834  			break
  5835  		}
  5836  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  5837  		v.Reset(ssaop.Op386MOVLconst)
  5838  		v.AuxInt = ssa.Int32ToAuxInt(^c)
  5839  		return true
  5840  	}
  5841  	return false
  5842  }
  5843  func rewriteValue_Op386ORL(v *ssa.Value) bool {
  5844  	v_1 := v.Args[1]
  5845  	v_0 := v.Args[0]
  5846  	// match: (ORL x (MOVLconst [c]))
  5847  	// result: (ORLconst [c] x)
  5848  	for {
  5849  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5850  			x := v_0
  5851  			if v_1.Op != ssaop.Op386MOVLconst {
  5852  				continue
  5853  			}
  5854  			c := ssa.AuxIntToInt32(v_1.AuxInt)
  5855  			v.Reset(ssaop.Op386ORLconst)
  5856  			v.AuxInt = ssa.Int32ToAuxInt(c)
  5857  			v.AddArg(x)
  5858  			return true
  5859  		}
  5860  		break
  5861  	}
  5862  	// match: (ORL x l:(MOVLload [off] {sym} ptr mem))
  5863  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  5864  	// result: (ORLload x [off] {sym} ptr mem)
  5865  	for {
  5866  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5867  			x := v_0
  5868  			l := v_1
  5869  			if l.Op != ssaop.Op386MOVLload {
  5870  				continue
  5871  			}
  5872  			off := ssa.AuxIntToInt32(l.AuxInt)
  5873  			sym := ssa.AuxToSym(l.Aux)
  5874  			mem := l.Args[1]
  5875  			ptr := l.Args[0]
  5876  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  5877  				continue
  5878  			}
  5879  			v.Reset(ssaop.Op386ORLload)
  5880  			v.AuxInt = ssa.Int32ToAuxInt(off)
  5881  			v.Aux = ssa.SymToAux(sym)
  5882  			v.AddArg3(x, ptr, mem)
  5883  			return true
  5884  		}
  5885  		break
  5886  	}
  5887  	// match: (ORL x x)
  5888  	// result: x
  5889  	for {
  5890  		x := v_0
  5891  		if x != v_1 {
  5892  			break
  5893  		}
  5894  		v.CopyOf(x)
  5895  		return true
  5896  	}
  5897  	return false
  5898  }
  5899  func rewriteValue_Op386ORLconst(v *ssa.Value) bool {
  5900  	v_0 := v.Args[0]
  5901  	// match: (ORLconst [c] x)
  5902  	// cond: c==0
  5903  	// result: x
  5904  	for {
  5905  		c := ssa.AuxIntToInt32(v.AuxInt)
  5906  		x := v_0
  5907  		if !(c == 0) {
  5908  			break
  5909  		}
  5910  		v.CopyOf(x)
  5911  		return true
  5912  	}
  5913  	// match: (ORLconst [c] _)
  5914  	// cond: c==-1
  5915  	// result: (MOVLconst [-1])
  5916  	for {
  5917  		c := ssa.AuxIntToInt32(v.AuxInt)
  5918  		if !(c == -1) {
  5919  			break
  5920  		}
  5921  		v.Reset(ssaop.Op386MOVLconst)
  5922  		v.AuxInt = ssa.Int32ToAuxInt(-1)
  5923  		return true
  5924  	}
  5925  	// match: (ORLconst [c] (MOVLconst [d]))
  5926  	// result: (MOVLconst [c|d])
  5927  	for {
  5928  		c := ssa.AuxIntToInt32(v.AuxInt)
  5929  		if v_0.Op != ssaop.Op386MOVLconst {
  5930  			break
  5931  		}
  5932  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  5933  		v.Reset(ssaop.Op386MOVLconst)
  5934  		v.AuxInt = ssa.Int32ToAuxInt(c | d)
  5935  		return true
  5936  	}
  5937  	return false
  5938  }
  5939  func rewriteValue_Op386ORLconstmodify(v *ssa.Value) bool {
  5940  	v_1 := v.Args[1]
  5941  	v_0 := v.Args[0]
  5942  	b := v.Block
  5943  	config := b.Func.Config
  5944  	// match: (ORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  5945  	// cond: valoff1.CanAdd32(off2)
  5946  	// result: (ORLconstmodify [valoff1.AddOffset32(off2)] {sym} base mem)
  5947  	for {
  5948  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  5949  		sym := ssa.AuxToSym(v.Aux)
  5950  		if v_0.Op != ssaop.Op386ADDLconst {
  5951  			break
  5952  		}
  5953  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5954  		base := v_0.Args[0]
  5955  		mem := v_1
  5956  		if !(valoff1.CanAdd32(off2)) {
  5957  			break
  5958  		}
  5959  		v.Reset(ssaop.Op386ORLconstmodify)
  5960  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  5961  		v.Aux = ssa.SymToAux(sym)
  5962  		v.AddArg2(base, mem)
  5963  		return true
  5964  	}
  5965  	// match: (ORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  5966  	// cond: valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  5967  	// result: (ORLconstmodify [valoff1.AddOffset32(off2)] {ssa.MergeSym(sym1,sym2)} base mem)
  5968  	for {
  5969  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  5970  		sym1 := ssa.AuxToSym(v.Aux)
  5971  		if v_0.Op != ssaop.Op386LEAL {
  5972  			break
  5973  		}
  5974  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  5975  		sym2 := ssa.AuxToSym(v_0.Aux)
  5976  		base := v_0.Args[0]
  5977  		mem := v_1
  5978  		if !(valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  5979  			break
  5980  		}
  5981  		v.Reset(ssaop.Op386ORLconstmodify)
  5982  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  5983  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  5984  		v.AddArg2(base, mem)
  5985  		return true
  5986  	}
  5987  	return false
  5988  }
  5989  func rewriteValue_Op386ORLload(v *ssa.Value) bool {
  5990  	v_2 := v.Args[2]
  5991  	v_1 := v.Args[1]
  5992  	v_0 := v.Args[0]
  5993  	b := v.Block
  5994  	config := b.Func.Config
  5995  	// match: (ORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  5996  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  5997  	// result: (ORLload [off1+off2] {sym} val base mem)
  5998  	for {
  5999  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6000  		sym := ssa.AuxToSym(v.Aux)
  6001  		val := v_0
  6002  		if v_1.Op != ssaop.Op386ADDLconst {
  6003  			break
  6004  		}
  6005  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  6006  		base := v_1.Args[0]
  6007  		mem := v_2
  6008  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  6009  			break
  6010  		}
  6011  		v.Reset(ssaop.Op386ORLload)
  6012  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6013  		v.Aux = ssa.SymToAux(sym)
  6014  		v.AddArg3(val, base, mem)
  6015  		return true
  6016  	}
  6017  	// match: (ORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6018  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  6019  	// result: (ORLload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  6020  	for {
  6021  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6022  		sym1 := ssa.AuxToSym(v.Aux)
  6023  		val := v_0
  6024  		if v_1.Op != ssaop.Op386LEAL {
  6025  			break
  6026  		}
  6027  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  6028  		sym2 := ssa.AuxToSym(v_1.Aux)
  6029  		base := v_1.Args[0]
  6030  		mem := v_2
  6031  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  6032  			break
  6033  		}
  6034  		v.Reset(ssaop.Op386ORLload)
  6035  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6036  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  6037  		v.AddArg3(val, base, mem)
  6038  		return true
  6039  	}
  6040  	return false
  6041  }
  6042  func rewriteValue_Op386ORLmodify(v *ssa.Value) bool {
  6043  	v_2 := v.Args[2]
  6044  	v_1 := v.Args[1]
  6045  	v_0 := v.Args[0]
  6046  	b := v.Block
  6047  	config := b.Func.Config
  6048  	// match: (ORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  6049  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  6050  	// result: (ORLmodify [off1+off2] {sym} base val mem)
  6051  	for {
  6052  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6053  		sym := ssa.AuxToSym(v.Aux)
  6054  		if v_0.Op != ssaop.Op386ADDLconst {
  6055  			break
  6056  		}
  6057  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6058  		base := v_0.Args[0]
  6059  		val := v_1
  6060  		mem := v_2
  6061  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  6062  			break
  6063  		}
  6064  		v.Reset(ssaop.Op386ORLmodify)
  6065  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6066  		v.Aux = ssa.SymToAux(sym)
  6067  		v.AddArg3(base, val, mem)
  6068  		return true
  6069  	}
  6070  	// match: (ORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  6071  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  6072  	// result: (ORLmodify [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  6073  	for {
  6074  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  6075  		sym1 := ssa.AuxToSym(v.Aux)
  6076  		if v_0.Op != ssaop.Op386LEAL {
  6077  			break
  6078  		}
  6079  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6080  		sym2 := ssa.AuxToSym(v_0.Aux)
  6081  		base := v_0.Args[0]
  6082  		val := v_1
  6083  		mem := v_2
  6084  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  6085  			break
  6086  		}
  6087  		v.Reset(ssaop.Op386ORLmodify)
  6088  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  6089  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  6090  		v.AddArg3(base, val, mem)
  6091  		return true
  6092  	}
  6093  	return false
  6094  }
  6095  func rewriteValue_Op386ROLB(v *ssa.Value) bool {
  6096  	v_1 := v.Args[1]
  6097  	v_0 := v.Args[0]
  6098  	// match: (ROLB x (MOVLconst [c]))
  6099  	// result: (ROLBconst [int8(c&7)] x)
  6100  	for {
  6101  		x := v_0
  6102  		if v_1.Op != ssaop.Op386MOVLconst {
  6103  			break
  6104  		}
  6105  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6106  		v.Reset(ssaop.Op386ROLBconst)
  6107  		v.AuxInt = ssa.Int8ToAuxInt(int8(c & 7))
  6108  		v.AddArg(x)
  6109  		return true
  6110  	}
  6111  	return false
  6112  }
  6113  func rewriteValue_Op386ROLBconst(v *ssa.Value) bool {
  6114  	v_0 := v.Args[0]
  6115  	// match: (ROLBconst [0] x)
  6116  	// result: x
  6117  	for {
  6118  		if ssa.AuxIntToInt8(v.AuxInt) != 0 {
  6119  			break
  6120  		}
  6121  		x := v_0
  6122  		v.CopyOf(x)
  6123  		return true
  6124  	}
  6125  	return false
  6126  }
  6127  func rewriteValue_Op386ROLL(v *ssa.Value) bool {
  6128  	v_1 := v.Args[1]
  6129  	v_0 := v.Args[0]
  6130  	// match: (ROLL x (MOVLconst [c]))
  6131  	// result: (ROLLconst [c&31] x)
  6132  	for {
  6133  		x := v_0
  6134  		if v_1.Op != ssaop.Op386MOVLconst {
  6135  			break
  6136  		}
  6137  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6138  		v.Reset(ssaop.Op386ROLLconst)
  6139  		v.AuxInt = ssa.Int32ToAuxInt(c & 31)
  6140  		v.AddArg(x)
  6141  		return true
  6142  	}
  6143  	return false
  6144  }
  6145  func rewriteValue_Op386ROLLconst(v *ssa.Value) bool {
  6146  	v_0 := v.Args[0]
  6147  	// match: (ROLLconst [0] x)
  6148  	// result: x
  6149  	for {
  6150  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  6151  			break
  6152  		}
  6153  		x := v_0
  6154  		v.CopyOf(x)
  6155  		return true
  6156  	}
  6157  	return false
  6158  }
  6159  func rewriteValue_Op386ROLW(v *ssa.Value) bool {
  6160  	v_1 := v.Args[1]
  6161  	v_0 := v.Args[0]
  6162  	// match: (ROLW x (MOVLconst [c]))
  6163  	// result: (ROLWconst [int16(c&15)] x)
  6164  	for {
  6165  		x := v_0
  6166  		if v_1.Op != ssaop.Op386MOVLconst {
  6167  			break
  6168  		}
  6169  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6170  		v.Reset(ssaop.Op386ROLWconst)
  6171  		v.AuxInt = ssa.Int16ToAuxInt(int16(c & 15))
  6172  		v.AddArg(x)
  6173  		return true
  6174  	}
  6175  	return false
  6176  }
  6177  func rewriteValue_Op386ROLWconst(v *ssa.Value) bool {
  6178  	v_0 := v.Args[0]
  6179  	// match: (ROLWconst [0] x)
  6180  	// result: x
  6181  	for {
  6182  		if ssa.AuxIntToInt16(v.AuxInt) != 0 {
  6183  			break
  6184  		}
  6185  		x := v_0
  6186  		v.CopyOf(x)
  6187  		return true
  6188  	}
  6189  	return false
  6190  }
  6191  func rewriteValue_Op386SARB(v *ssa.Value) bool {
  6192  	v_1 := v.Args[1]
  6193  	v_0 := v.Args[0]
  6194  	// match: (SARB x (MOVLconst [c]))
  6195  	// result: (SARBconst [int8(min(int64(c&31),7))] x)
  6196  	for {
  6197  		x := v_0
  6198  		if v_1.Op != ssaop.Op386MOVLconst {
  6199  			break
  6200  		}
  6201  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6202  		v.Reset(ssaop.Op386SARBconst)
  6203  		v.AuxInt = ssa.Int8ToAuxInt(int8(min(int64(c&31), 7)))
  6204  		v.AddArg(x)
  6205  		return true
  6206  	}
  6207  	return false
  6208  }
  6209  func rewriteValue_Op386SARBconst(v *ssa.Value) bool {
  6210  	v_0 := v.Args[0]
  6211  	// match: (SARBconst x [0])
  6212  	// result: x
  6213  	for {
  6214  		if ssa.AuxIntToInt8(v.AuxInt) != 0 {
  6215  			break
  6216  		}
  6217  		x := v_0
  6218  		v.CopyOf(x)
  6219  		return true
  6220  	}
  6221  	// match: (SARBconst [c] (MOVLconst [d]))
  6222  	// result: (MOVLconst [d>>uint64(c)])
  6223  	for {
  6224  		c := ssa.AuxIntToInt8(v.AuxInt)
  6225  		if v_0.Op != ssaop.Op386MOVLconst {
  6226  			break
  6227  		}
  6228  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  6229  		v.Reset(ssaop.Op386MOVLconst)
  6230  		v.AuxInt = ssa.Int32ToAuxInt(d >> uint64(c))
  6231  		return true
  6232  	}
  6233  	return false
  6234  }
  6235  func rewriteValue_Op386SARL(v *ssa.Value) bool {
  6236  	v_1 := v.Args[1]
  6237  	v_0 := v.Args[0]
  6238  	// match: (SARL x (MOVLconst [c]))
  6239  	// result: (SARLconst [c&31] x)
  6240  	for {
  6241  		x := v_0
  6242  		if v_1.Op != ssaop.Op386MOVLconst {
  6243  			break
  6244  		}
  6245  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6246  		v.Reset(ssaop.Op386SARLconst)
  6247  		v.AuxInt = ssa.Int32ToAuxInt(c & 31)
  6248  		v.AddArg(x)
  6249  		return true
  6250  	}
  6251  	// match: (SARL x (ANDLconst [31] y))
  6252  	// result: (SARL x y)
  6253  	for {
  6254  		x := v_0
  6255  		if v_1.Op != ssaop.Op386ANDLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 31 {
  6256  			break
  6257  		}
  6258  		y := v_1.Args[0]
  6259  		v.Reset(ssaop.Op386SARL)
  6260  		v.AddArg2(x, y)
  6261  		return true
  6262  	}
  6263  	return false
  6264  }
  6265  func rewriteValue_Op386SARLconst(v *ssa.Value) bool {
  6266  	v_0 := v.Args[0]
  6267  	// match: (SARLconst x [0])
  6268  	// result: x
  6269  	for {
  6270  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  6271  			break
  6272  		}
  6273  		x := v_0
  6274  		v.CopyOf(x)
  6275  		return true
  6276  	}
  6277  	// match: (SARLconst [c] (MOVLconst [d]))
  6278  	// result: (MOVLconst [d>>uint64(c)])
  6279  	for {
  6280  		c := ssa.AuxIntToInt32(v.AuxInt)
  6281  		if v_0.Op != ssaop.Op386MOVLconst {
  6282  			break
  6283  		}
  6284  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  6285  		v.Reset(ssaop.Op386MOVLconst)
  6286  		v.AuxInt = ssa.Int32ToAuxInt(d >> uint64(c))
  6287  		return true
  6288  	}
  6289  	return false
  6290  }
  6291  func rewriteValue_Op386SARW(v *ssa.Value) bool {
  6292  	v_1 := v.Args[1]
  6293  	v_0 := v.Args[0]
  6294  	// match: (SARW x (MOVLconst [c]))
  6295  	// result: (SARWconst [int16(min(int64(c&31),15))] x)
  6296  	for {
  6297  		x := v_0
  6298  		if v_1.Op != ssaop.Op386MOVLconst {
  6299  			break
  6300  		}
  6301  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6302  		v.Reset(ssaop.Op386SARWconst)
  6303  		v.AuxInt = ssa.Int16ToAuxInt(int16(min(int64(c&31), 15)))
  6304  		v.AddArg(x)
  6305  		return true
  6306  	}
  6307  	return false
  6308  }
  6309  func rewriteValue_Op386SARWconst(v *ssa.Value) bool {
  6310  	v_0 := v.Args[0]
  6311  	// match: (SARWconst x [0])
  6312  	// result: x
  6313  	for {
  6314  		if ssa.AuxIntToInt16(v.AuxInt) != 0 {
  6315  			break
  6316  		}
  6317  		x := v_0
  6318  		v.CopyOf(x)
  6319  		return true
  6320  	}
  6321  	// match: (SARWconst [c] (MOVLconst [d]))
  6322  	// result: (MOVLconst [d>>uint64(c)])
  6323  	for {
  6324  		c := ssa.AuxIntToInt16(v.AuxInt)
  6325  		if v_0.Op != ssaop.Op386MOVLconst {
  6326  			break
  6327  		}
  6328  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  6329  		v.Reset(ssaop.Op386MOVLconst)
  6330  		v.AuxInt = ssa.Int32ToAuxInt(d >> uint64(c))
  6331  		return true
  6332  	}
  6333  	return false
  6334  }
  6335  func rewriteValue_Op386SBBL(v *ssa.Value) bool {
  6336  	v_2 := v.Args[2]
  6337  	v_1 := v.Args[1]
  6338  	v_0 := v.Args[0]
  6339  	// match: (SBBL x (MOVLconst [c]) f)
  6340  	// result: (SBBLconst [c] x f)
  6341  	for {
  6342  		x := v_0
  6343  		if v_1.Op != ssaop.Op386MOVLconst {
  6344  			break
  6345  		}
  6346  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  6347  		f := v_2
  6348  		v.Reset(ssaop.Op386SBBLconst)
  6349  		v.AuxInt = ssa.Int32ToAuxInt(c)
  6350  		v.AddArg2(x, f)
  6351  		return true
  6352  	}
  6353  	return false
  6354  }
  6355  func rewriteValue_Op386SBBLcarrymask(v *ssa.Value) bool {
  6356  	v_0 := v.Args[0]
  6357  	// match: (SBBLcarrymask (FlagEQ))
  6358  	// result: (MOVLconst [0])
  6359  	for {
  6360  		if v_0.Op != ssaop.Op386FlagEQ {
  6361  			break
  6362  		}
  6363  		v.Reset(ssaop.Op386MOVLconst)
  6364  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6365  		return true
  6366  	}
  6367  	// match: (SBBLcarrymask (FlagLT_ULT))
  6368  	// result: (MOVLconst [-1])
  6369  	for {
  6370  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6371  			break
  6372  		}
  6373  		v.Reset(ssaop.Op386MOVLconst)
  6374  		v.AuxInt = ssa.Int32ToAuxInt(-1)
  6375  		return true
  6376  	}
  6377  	// match: (SBBLcarrymask (FlagLT_UGT))
  6378  	// result: (MOVLconst [0])
  6379  	for {
  6380  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6381  			break
  6382  		}
  6383  		v.Reset(ssaop.Op386MOVLconst)
  6384  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6385  		return true
  6386  	}
  6387  	// match: (SBBLcarrymask (FlagGT_ULT))
  6388  	// result: (MOVLconst [-1])
  6389  	for {
  6390  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6391  			break
  6392  		}
  6393  		v.Reset(ssaop.Op386MOVLconst)
  6394  		v.AuxInt = ssa.Int32ToAuxInt(-1)
  6395  		return true
  6396  	}
  6397  	// match: (SBBLcarrymask (FlagGT_UGT))
  6398  	// result: (MOVLconst [0])
  6399  	for {
  6400  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6401  			break
  6402  		}
  6403  		v.Reset(ssaop.Op386MOVLconst)
  6404  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6405  		return true
  6406  	}
  6407  	return false
  6408  }
  6409  func rewriteValue_Op386SETA(v *ssa.Value) bool {
  6410  	v_0 := v.Args[0]
  6411  	// match: (SETA (InvertFlags x))
  6412  	// result: (SETB x)
  6413  	for {
  6414  		if v_0.Op != ssaop.Op386InvertFlags {
  6415  			break
  6416  		}
  6417  		x := v_0.Args[0]
  6418  		v.Reset(ssaop.Op386SETB)
  6419  		v.AddArg(x)
  6420  		return true
  6421  	}
  6422  	// match: (SETA (FlagEQ))
  6423  	// result: (MOVLconst [0])
  6424  	for {
  6425  		if v_0.Op != ssaop.Op386FlagEQ {
  6426  			break
  6427  		}
  6428  		v.Reset(ssaop.Op386MOVLconst)
  6429  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6430  		return true
  6431  	}
  6432  	// match: (SETA (FlagLT_ULT))
  6433  	// result: (MOVLconst [0])
  6434  	for {
  6435  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6436  			break
  6437  		}
  6438  		v.Reset(ssaop.Op386MOVLconst)
  6439  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6440  		return true
  6441  	}
  6442  	// match: (SETA (FlagLT_UGT))
  6443  	// result: (MOVLconst [1])
  6444  	for {
  6445  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6446  			break
  6447  		}
  6448  		v.Reset(ssaop.Op386MOVLconst)
  6449  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6450  		return true
  6451  	}
  6452  	// match: (SETA (FlagGT_ULT))
  6453  	// result: (MOVLconst [0])
  6454  	for {
  6455  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6456  			break
  6457  		}
  6458  		v.Reset(ssaop.Op386MOVLconst)
  6459  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6460  		return true
  6461  	}
  6462  	// match: (SETA (FlagGT_UGT))
  6463  	// result: (MOVLconst [1])
  6464  	for {
  6465  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6466  			break
  6467  		}
  6468  		v.Reset(ssaop.Op386MOVLconst)
  6469  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6470  		return true
  6471  	}
  6472  	return false
  6473  }
  6474  func rewriteValue_Op386SETAE(v *ssa.Value) bool {
  6475  	v_0 := v.Args[0]
  6476  	// match: (SETAE (InvertFlags x))
  6477  	// result: (SETBE x)
  6478  	for {
  6479  		if v_0.Op != ssaop.Op386InvertFlags {
  6480  			break
  6481  		}
  6482  		x := v_0.Args[0]
  6483  		v.Reset(ssaop.Op386SETBE)
  6484  		v.AddArg(x)
  6485  		return true
  6486  	}
  6487  	// match: (SETAE (FlagEQ))
  6488  	// result: (MOVLconst [1])
  6489  	for {
  6490  		if v_0.Op != ssaop.Op386FlagEQ {
  6491  			break
  6492  		}
  6493  		v.Reset(ssaop.Op386MOVLconst)
  6494  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6495  		return true
  6496  	}
  6497  	// match: (SETAE (FlagLT_ULT))
  6498  	// result: (MOVLconst [0])
  6499  	for {
  6500  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6501  			break
  6502  		}
  6503  		v.Reset(ssaop.Op386MOVLconst)
  6504  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6505  		return true
  6506  	}
  6507  	// match: (SETAE (FlagLT_UGT))
  6508  	// result: (MOVLconst [1])
  6509  	for {
  6510  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6511  			break
  6512  		}
  6513  		v.Reset(ssaop.Op386MOVLconst)
  6514  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6515  		return true
  6516  	}
  6517  	// match: (SETAE (FlagGT_ULT))
  6518  	// result: (MOVLconst [0])
  6519  	for {
  6520  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6521  			break
  6522  		}
  6523  		v.Reset(ssaop.Op386MOVLconst)
  6524  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6525  		return true
  6526  	}
  6527  	// match: (SETAE (FlagGT_UGT))
  6528  	// result: (MOVLconst [1])
  6529  	for {
  6530  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6531  			break
  6532  		}
  6533  		v.Reset(ssaop.Op386MOVLconst)
  6534  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6535  		return true
  6536  	}
  6537  	return false
  6538  }
  6539  func rewriteValue_Op386SETB(v *ssa.Value) bool {
  6540  	v_0 := v.Args[0]
  6541  	// match: (SETB (InvertFlags x))
  6542  	// result: (SETA x)
  6543  	for {
  6544  		if v_0.Op != ssaop.Op386InvertFlags {
  6545  			break
  6546  		}
  6547  		x := v_0.Args[0]
  6548  		v.Reset(ssaop.Op386SETA)
  6549  		v.AddArg(x)
  6550  		return true
  6551  	}
  6552  	// match: (SETB (FlagEQ))
  6553  	// result: (MOVLconst [0])
  6554  	for {
  6555  		if v_0.Op != ssaop.Op386FlagEQ {
  6556  			break
  6557  		}
  6558  		v.Reset(ssaop.Op386MOVLconst)
  6559  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6560  		return true
  6561  	}
  6562  	// match: (SETB (FlagLT_ULT))
  6563  	// result: (MOVLconst [1])
  6564  	for {
  6565  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6566  			break
  6567  		}
  6568  		v.Reset(ssaop.Op386MOVLconst)
  6569  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6570  		return true
  6571  	}
  6572  	// match: (SETB (FlagLT_UGT))
  6573  	// result: (MOVLconst [0])
  6574  	for {
  6575  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6576  			break
  6577  		}
  6578  		v.Reset(ssaop.Op386MOVLconst)
  6579  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6580  		return true
  6581  	}
  6582  	// match: (SETB (FlagGT_ULT))
  6583  	// result: (MOVLconst [1])
  6584  	for {
  6585  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6586  			break
  6587  		}
  6588  		v.Reset(ssaop.Op386MOVLconst)
  6589  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6590  		return true
  6591  	}
  6592  	// match: (SETB (FlagGT_UGT))
  6593  	// result: (MOVLconst [0])
  6594  	for {
  6595  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6596  			break
  6597  		}
  6598  		v.Reset(ssaop.Op386MOVLconst)
  6599  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6600  		return true
  6601  	}
  6602  	return false
  6603  }
  6604  func rewriteValue_Op386SETBE(v *ssa.Value) bool {
  6605  	v_0 := v.Args[0]
  6606  	// match: (SETBE (InvertFlags x))
  6607  	// result: (SETAE x)
  6608  	for {
  6609  		if v_0.Op != ssaop.Op386InvertFlags {
  6610  			break
  6611  		}
  6612  		x := v_0.Args[0]
  6613  		v.Reset(ssaop.Op386SETAE)
  6614  		v.AddArg(x)
  6615  		return true
  6616  	}
  6617  	// match: (SETBE (FlagEQ))
  6618  	// result: (MOVLconst [1])
  6619  	for {
  6620  		if v_0.Op != ssaop.Op386FlagEQ {
  6621  			break
  6622  		}
  6623  		v.Reset(ssaop.Op386MOVLconst)
  6624  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6625  		return true
  6626  	}
  6627  	// match: (SETBE (FlagLT_ULT))
  6628  	// result: (MOVLconst [1])
  6629  	for {
  6630  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6631  			break
  6632  		}
  6633  		v.Reset(ssaop.Op386MOVLconst)
  6634  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6635  		return true
  6636  	}
  6637  	// match: (SETBE (FlagLT_UGT))
  6638  	// result: (MOVLconst [0])
  6639  	for {
  6640  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6641  			break
  6642  		}
  6643  		v.Reset(ssaop.Op386MOVLconst)
  6644  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6645  		return true
  6646  	}
  6647  	// match: (SETBE (FlagGT_ULT))
  6648  	// result: (MOVLconst [1])
  6649  	for {
  6650  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6651  			break
  6652  		}
  6653  		v.Reset(ssaop.Op386MOVLconst)
  6654  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6655  		return true
  6656  	}
  6657  	// match: (SETBE (FlagGT_UGT))
  6658  	// result: (MOVLconst [0])
  6659  	for {
  6660  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6661  			break
  6662  		}
  6663  		v.Reset(ssaop.Op386MOVLconst)
  6664  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6665  		return true
  6666  	}
  6667  	return false
  6668  }
  6669  func rewriteValue_Op386SETEQ(v *ssa.Value) bool {
  6670  	v_0 := v.Args[0]
  6671  	// match: (SETEQ (InvertFlags x))
  6672  	// result: (SETEQ x)
  6673  	for {
  6674  		if v_0.Op != ssaop.Op386InvertFlags {
  6675  			break
  6676  		}
  6677  		x := v_0.Args[0]
  6678  		v.Reset(ssaop.Op386SETEQ)
  6679  		v.AddArg(x)
  6680  		return true
  6681  	}
  6682  	// match: (SETEQ (FlagEQ))
  6683  	// result: (MOVLconst [1])
  6684  	for {
  6685  		if v_0.Op != ssaop.Op386FlagEQ {
  6686  			break
  6687  		}
  6688  		v.Reset(ssaop.Op386MOVLconst)
  6689  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6690  		return true
  6691  	}
  6692  	// match: (SETEQ (FlagLT_ULT))
  6693  	// result: (MOVLconst [0])
  6694  	for {
  6695  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6696  			break
  6697  		}
  6698  		v.Reset(ssaop.Op386MOVLconst)
  6699  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6700  		return true
  6701  	}
  6702  	// match: (SETEQ (FlagLT_UGT))
  6703  	// result: (MOVLconst [0])
  6704  	for {
  6705  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6706  			break
  6707  		}
  6708  		v.Reset(ssaop.Op386MOVLconst)
  6709  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6710  		return true
  6711  	}
  6712  	// match: (SETEQ (FlagGT_ULT))
  6713  	// result: (MOVLconst [0])
  6714  	for {
  6715  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6716  			break
  6717  		}
  6718  		v.Reset(ssaop.Op386MOVLconst)
  6719  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6720  		return true
  6721  	}
  6722  	// match: (SETEQ (FlagGT_UGT))
  6723  	// result: (MOVLconst [0])
  6724  	for {
  6725  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6726  			break
  6727  		}
  6728  		v.Reset(ssaop.Op386MOVLconst)
  6729  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6730  		return true
  6731  	}
  6732  	return false
  6733  }
  6734  func rewriteValue_Op386SETG(v *ssa.Value) bool {
  6735  	v_0 := v.Args[0]
  6736  	// match: (SETG (InvertFlags x))
  6737  	// result: (SETL x)
  6738  	for {
  6739  		if v_0.Op != ssaop.Op386InvertFlags {
  6740  			break
  6741  		}
  6742  		x := v_0.Args[0]
  6743  		v.Reset(ssaop.Op386SETL)
  6744  		v.AddArg(x)
  6745  		return true
  6746  	}
  6747  	// match: (SETG (FlagEQ))
  6748  	// result: (MOVLconst [0])
  6749  	for {
  6750  		if v_0.Op != ssaop.Op386FlagEQ {
  6751  			break
  6752  		}
  6753  		v.Reset(ssaop.Op386MOVLconst)
  6754  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6755  		return true
  6756  	}
  6757  	// match: (SETG (FlagLT_ULT))
  6758  	// result: (MOVLconst [0])
  6759  	for {
  6760  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6761  			break
  6762  		}
  6763  		v.Reset(ssaop.Op386MOVLconst)
  6764  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6765  		return true
  6766  	}
  6767  	// match: (SETG (FlagLT_UGT))
  6768  	// result: (MOVLconst [0])
  6769  	for {
  6770  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6771  			break
  6772  		}
  6773  		v.Reset(ssaop.Op386MOVLconst)
  6774  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6775  		return true
  6776  	}
  6777  	// match: (SETG (FlagGT_ULT))
  6778  	// result: (MOVLconst [1])
  6779  	for {
  6780  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6781  			break
  6782  		}
  6783  		v.Reset(ssaop.Op386MOVLconst)
  6784  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6785  		return true
  6786  	}
  6787  	// match: (SETG (FlagGT_UGT))
  6788  	// result: (MOVLconst [1])
  6789  	for {
  6790  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6791  			break
  6792  		}
  6793  		v.Reset(ssaop.Op386MOVLconst)
  6794  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6795  		return true
  6796  	}
  6797  	return false
  6798  }
  6799  func rewriteValue_Op386SETGE(v *ssa.Value) bool {
  6800  	v_0 := v.Args[0]
  6801  	// match: (SETGE (InvertFlags x))
  6802  	// result: (SETLE x)
  6803  	for {
  6804  		if v_0.Op != ssaop.Op386InvertFlags {
  6805  			break
  6806  		}
  6807  		x := v_0.Args[0]
  6808  		v.Reset(ssaop.Op386SETLE)
  6809  		v.AddArg(x)
  6810  		return true
  6811  	}
  6812  	// match: (SETGE (FlagEQ))
  6813  	// result: (MOVLconst [1])
  6814  	for {
  6815  		if v_0.Op != ssaop.Op386FlagEQ {
  6816  			break
  6817  		}
  6818  		v.Reset(ssaop.Op386MOVLconst)
  6819  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6820  		return true
  6821  	}
  6822  	// match: (SETGE (FlagLT_ULT))
  6823  	// result: (MOVLconst [0])
  6824  	for {
  6825  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6826  			break
  6827  		}
  6828  		v.Reset(ssaop.Op386MOVLconst)
  6829  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6830  		return true
  6831  	}
  6832  	// match: (SETGE (FlagLT_UGT))
  6833  	// result: (MOVLconst [0])
  6834  	for {
  6835  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6836  			break
  6837  		}
  6838  		v.Reset(ssaop.Op386MOVLconst)
  6839  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6840  		return true
  6841  	}
  6842  	// match: (SETGE (FlagGT_ULT))
  6843  	// result: (MOVLconst [1])
  6844  	for {
  6845  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6846  			break
  6847  		}
  6848  		v.Reset(ssaop.Op386MOVLconst)
  6849  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6850  		return true
  6851  	}
  6852  	// match: (SETGE (FlagGT_UGT))
  6853  	// result: (MOVLconst [1])
  6854  	for {
  6855  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6856  			break
  6857  		}
  6858  		v.Reset(ssaop.Op386MOVLconst)
  6859  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6860  		return true
  6861  	}
  6862  	return false
  6863  }
  6864  func rewriteValue_Op386SETL(v *ssa.Value) bool {
  6865  	v_0 := v.Args[0]
  6866  	// match: (SETL (InvertFlags x))
  6867  	// result: (SETG x)
  6868  	for {
  6869  		if v_0.Op != ssaop.Op386InvertFlags {
  6870  			break
  6871  		}
  6872  		x := v_0.Args[0]
  6873  		v.Reset(ssaop.Op386SETG)
  6874  		v.AddArg(x)
  6875  		return true
  6876  	}
  6877  	// match: (SETL (FlagEQ))
  6878  	// result: (MOVLconst [0])
  6879  	for {
  6880  		if v_0.Op != ssaop.Op386FlagEQ {
  6881  			break
  6882  		}
  6883  		v.Reset(ssaop.Op386MOVLconst)
  6884  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6885  		return true
  6886  	}
  6887  	// match: (SETL (FlagLT_ULT))
  6888  	// result: (MOVLconst [1])
  6889  	for {
  6890  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6891  			break
  6892  		}
  6893  		v.Reset(ssaop.Op386MOVLconst)
  6894  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6895  		return true
  6896  	}
  6897  	// match: (SETL (FlagLT_UGT))
  6898  	// result: (MOVLconst [1])
  6899  	for {
  6900  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6901  			break
  6902  		}
  6903  		v.Reset(ssaop.Op386MOVLconst)
  6904  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6905  		return true
  6906  	}
  6907  	// match: (SETL (FlagGT_ULT))
  6908  	// result: (MOVLconst [0])
  6909  	for {
  6910  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6911  			break
  6912  		}
  6913  		v.Reset(ssaop.Op386MOVLconst)
  6914  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6915  		return true
  6916  	}
  6917  	// match: (SETL (FlagGT_UGT))
  6918  	// result: (MOVLconst [0])
  6919  	for {
  6920  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6921  			break
  6922  		}
  6923  		v.Reset(ssaop.Op386MOVLconst)
  6924  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6925  		return true
  6926  	}
  6927  	return false
  6928  }
  6929  func rewriteValue_Op386SETLE(v *ssa.Value) bool {
  6930  	v_0 := v.Args[0]
  6931  	// match: (SETLE (InvertFlags x))
  6932  	// result: (SETGE x)
  6933  	for {
  6934  		if v_0.Op != ssaop.Op386InvertFlags {
  6935  			break
  6936  		}
  6937  		x := v_0.Args[0]
  6938  		v.Reset(ssaop.Op386SETGE)
  6939  		v.AddArg(x)
  6940  		return true
  6941  	}
  6942  	// match: (SETLE (FlagEQ))
  6943  	// result: (MOVLconst [1])
  6944  	for {
  6945  		if v_0.Op != ssaop.Op386FlagEQ {
  6946  			break
  6947  		}
  6948  		v.Reset(ssaop.Op386MOVLconst)
  6949  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6950  		return true
  6951  	}
  6952  	// match: (SETLE (FlagLT_ULT))
  6953  	// result: (MOVLconst [1])
  6954  	for {
  6955  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  6956  			break
  6957  		}
  6958  		v.Reset(ssaop.Op386MOVLconst)
  6959  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6960  		return true
  6961  	}
  6962  	// match: (SETLE (FlagLT_UGT))
  6963  	// result: (MOVLconst [1])
  6964  	for {
  6965  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  6966  			break
  6967  		}
  6968  		v.Reset(ssaop.Op386MOVLconst)
  6969  		v.AuxInt = ssa.Int32ToAuxInt(1)
  6970  		return true
  6971  	}
  6972  	// match: (SETLE (FlagGT_ULT))
  6973  	// result: (MOVLconst [0])
  6974  	for {
  6975  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  6976  			break
  6977  		}
  6978  		v.Reset(ssaop.Op386MOVLconst)
  6979  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6980  		return true
  6981  	}
  6982  	// match: (SETLE (FlagGT_UGT))
  6983  	// result: (MOVLconst [0])
  6984  	for {
  6985  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  6986  			break
  6987  		}
  6988  		v.Reset(ssaop.Op386MOVLconst)
  6989  		v.AuxInt = ssa.Int32ToAuxInt(0)
  6990  		return true
  6991  	}
  6992  	return false
  6993  }
  6994  func rewriteValue_Op386SETNE(v *ssa.Value) bool {
  6995  	v_0 := v.Args[0]
  6996  	// match: (SETNE (InvertFlags x))
  6997  	// result: (SETNE x)
  6998  	for {
  6999  		if v_0.Op != ssaop.Op386InvertFlags {
  7000  			break
  7001  		}
  7002  		x := v_0.Args[0]
  7003  		v.Reset(ssaop.Op386SETNE)
  7004  		v.AddArg(x)
  7005  		return true
  7006  	}
  7007  	// match: (SETNE (FlagEQ))
  7008  	// result: (MOVLconst [0])
  7009  	for {
  7010  		if v_0.Op != ssaop.Op386FlagEQ {
  7011  			break
  7012  		}
  7013  		v.Reset(ssaop.Op386MOVLconst)
  7014  		v.AuxInt = ssa.Int32ToAuxInt(0)
  7015  		return true
  7016  	}
  7017  	// match: (SETNE (FlagLT_ULT))
  7018  	// result: (MOVLconst [1])
  7019  	for {
  7020  		if v_0.Op != ssaop.Op386FlagLT_ULT {
  7021  			break
  7022  		}
  7023  		v.Reset(ssaop.Op386MOVLconst)
  7024  		v.AuxInt = ssa.Int32ToAuxInt(1)
  7025  		return true
  7026  	}
  7027  	// match: (SETNE (FlagLT_UGT))
  7028  	// result: (MOVLconst [1])
  7029  	for {
  7030  		if v_0.Op != ssaop.Op386FlagLT_UGT {
  7031  			break
  7032  		}
  7033  		v.Reset(ssaop.Op386MOVLconst)
  7034  		v.AuxInt = ssa.Int32ToAuxInt(1)
  7035  		return true
  7036  	}
  7037  	// match: (SETNE (FlagGT_ULT))
  7038  	// result: (MOVLconst [1])
  7039  	for {
  7040  		if v_0.Op != ssaop.Op386FlagGT_ULT {
  7041  			break
  7042  		}
  7043  		v.Reset(ssaop.Op386MOVLconst)
  7044  		v.AuxInt = ssa.Int32ToAuxInt(1)
  7045  		return true
  7046  	}
  7047  	// match: (SETNE (FlagGT_UGT))
  7048  	// result: (MOVLconst [1])
  7049  	for {
  7050  		if v_0.Op != ssaop.Op386FlagGT_UGT {
  7051  			break
  7052  		}
  7053  		v.Reset(ssaop.Op386MOVLconst)
  7054  		v.AuxInt = ssa.Int32ToAuxInt(1)
  7055  		return true
  7056  	}
  7057  	return false
  7058  }
  7059  func rewriteValue_Op386SHLL(v *ssa.Value) bool {
  7060  	v_1 := v.Args[1]
  7061  	v_0 := v.Args[0]
  7062  	// match: (SHLL x (MOVLconst [c]))
  7063  	// result: (SHLLconst [c&31] x)
  7064  	for {
  7065  		x := v_0
  7066  		if v_1.Op != ssaop.Op386MOVLconst {
  7067  			break
  7068  		}
  7069  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7070  		v.Reset(ssaop.Op386SHLLconst)
  7071  		v.AuxInt = ssa.Int32ToAuxInt(c & 31)
  7072  		v.AddArg(x)
  7073  		return true
  7074  	}
  7075  	// match: (SHLL x (ANDLconst [31] y))
  7076  	// result: (SHLL x y)
  7077  	for {
  7078  		x := v_0
  7079  		if v_1.Op != ssaop.Op386ANDLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 31 {
  7080  			break
  7081  		}
  7082  		y := v_1.Args[0]
  7083  		v.Reset(ssaop.Op386SHLL)
  7084  		v.AddArg2(x, y)
  7085  		return true
  7086  	}
  7087  	return false
  7088  }
  7089  func rewriteValue_Op386SHLLconst(v *ssa.Value) bool {
  7090  	v_0 := v.Args[0]
  7091  	// match: (SHLLconst x [0])
  7092  	// result: x
  7093  	for {
  7094  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  7095  			break
  7096  		}
  7097  		x := v_0
  7098  		v.CopyOf(x)
  7099  		return true
  7100  	}
  7101  	return false
  7102  }
  7103  func rewriteValue_Op386SHRB(v *ssa.Value) bool {
  7104  	v_1 := v.Args[1]
  7105  	v_0 := v.Args[0]
  7106  	// match: (SHRB x (MOVLconst [c]))
  7107  	// cond: c&31 < 8
  7108  	// result: (SHRBconst [int8(c&31)] x)
  7109  	for {
  7110  		x := v_0
  7111  		if v_1.Op != ssaop.Op386MOVLconst {
  7112  			break
  7113  		}
  7114  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7115  		if !(c&31 < 8) {
  7116  			break
  7117  		}
  7118  		v.Reset(ssaop.Op386SHRBconst)
  7119  		v.AuxInt = ssa.Int8ToAuxInt(int8(c & 31))
  7120  		v.AddArg(x)
  7121  		return true
  7122  	}
  7123  	// match: (SHRB _ (MOVLconst [c]))
  7124  	// cond: c&31 >= 8
  7125  	// result: (MOVLconst [0])
  7126  	for {
  7127  		if v_1.Op != ssaop.Op386MOVLconst {
  7128  			break
  7129  		}
  7130  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7131  		if !(c&31 >= 8) {
  7132  			break
  7133  		}
  7134  		v.Reset(ssaop.Op386MOVLconst)
  7135  		v.AuxInt = ssa.Int32ToAuxInt(0)
  7136  		return true
  7137  	}
  7138  	return false
  7139  }
  7140  func rewriteValue_Op386SHRBconst(v *ssa.Value) bool {
  7141  	v_0 := v.Args[0]
  7142  	// match: (SHRBconst x [0])
  7143  	// result: x
  7144  	for {
  7145  		if ssa.AuxIntToInt8(v.AuxInt) != 0 {
  7146  			break
  7147  		}
  7148  		x := v_0
  7149  		v.CopyOf(x)
  7150  		return true
  7151  	}
  7152  	return false
  7153  }
  7154  func rewriteValue_Op386SHRL(v *ssa.Value) bool {
  7155  	v_1 := v.Args[1]
  7156  	v_0 := v.Args[0]
  7157  	// match: (SHRL x (MOVLconst [c]))
  7158  	// result: (SHRLconst [c&31] x)
  7159  	for {
  7160  		x := v_0
  7161  		if v_1.Op != ssaop.Op386MOVLconst {
  7162  			break
  7163  		}
  7164  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7165  		v.Reset(ssaop.Op386SHRLconst)
  7166  		v.AuxInt = ssa.Int32ToAuxInt(c & 31)
  7167  		v.AddArg(x)
  7168  		return true
  7169  	}
  7170  	// match: (SHRL x (ANDLconst [31] y))
  7171  	// result: (SHRL x y)
  7172  	for {
  7173  		x := v_0
  7174  		if v_1.Op != ssaop.Op386ANDLconst || ssa.AuxIntToInt32(v_1.AuxInt) != 31 {
  7175  			break
  7176  		}
  7177  		y := v_1.Args[0]
  7178  		v.Reset(ssaop.Op386SHRL)
  7179  		v.AddArg2(x, y)
  7180  		return true
  7181  	}
  7182  	return false
  7183  }
  7184  func rewriteValue_Op386SHRLconst(v *ssa.Value) bool {
  7185  	v_0 := v.Args[0]
  7186  	// match: (SHRLconst x [0])
  7187  	// result: x
  7188  	for {
  7189  		if ssa.AuxIntToInt32(v.AuxInt) != 0 {
  7190  			break
  7191  		}
  7192  		x := v_0
  7193  		v.CopyOf(x)
  7194  		return true
  7195  	}
  7196  	return false
  7197  }
  7198  func rewriteValue_Op386SHRW(v *ssa.Value) bool {
  7199  	v_1 := v.Args[1]
  7200  	v_0 := v.Args[0]
  7201  	// match: (SHRW x (MOVLconst [c]))
  7202  	// cond: c&31 < 16
  7203  	// result: (SHRWconst [int16(c&31)] x)
  7204  	for {
  7205  		x := v_0
  7206  		if v_1.Op != ssaop.Op386MOVLconst {
  7207  			break
  7208  		}
  7209  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7210  		if !(c&31 < 16) {
  7211  			break
  7212  		}
  7213  		v.Reset(ssaop.Op386SHRWconst)
  7214  		v.AuxInt = ssa.Int16ToAuxInt(int16(c & 31))
  7215  		v.AddArg(x)
  7216  		return true
  7217  	}
  7218  	// match: (SHRW _ (MOVLconst [c]))
  7219  	// cond: c&31 >= 16
  7220  	// result: (MOVLconst [0])
  7221  	for {
  7222  		if v_1.Op != ssaop.Op386MOVLconst {
  7223  			break
  7224  		}
  7225  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7226  		if !(c&31 >= 16) {
  7227  			break
  7228  		}
  7229  		v.Reset(ssaop.Op386MOVLconst)
  7230  		v.AuxInt = ssa.Int32ToAuxInt(0)
  7231  		return true
  7232  	}
  7233  	return false
  7234  }
  7235  func rewriteValue_Op386SHRWconst(v *ssa.Value) bool {
  7236  	v_0 := v.Args[0]
  7237  	// match: (SHRWconst x [0])
  7238  	// result: x
  7239  	for {
  7240  		if ssa.AuxIntToInt16(v.AuxInt) != 0 {
  7241  			break
  7242  		}
  7243  		x := v_0
  7244  		v.CopyOf(x)
  7245  		return true
  7246  	}
  7247  	return false
  7248  }
  7249  func rewriteValue_Op386SUBL(v *ssa.Value) bool {
  7250  	v_1 := v.Args[1]
  7251  	v_0 := v.Args[0]
  7252  	b := v.Block
  7253  	// match: (SUBL x (MOVLconst [c]))
  7254  	// result: (SUBLconst x [c])
  7255  	for {
  7256  		x := v_0
  7257  		if v_1.Op != ssaop.Op386MOVLconst {
  7258  			break
  7259  		}
  7260  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7261  		v.Reset(ssaop.Op386SUBLconst)
  7262  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7263  		v.AddArg(x)
  7264  		return true
  7265  	}
  7266  	// match: (SUBL (MOVLconst [c]) x)
  7267  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  7268  	for {
  7269  		if v_0.Op != ssaop.Op386MOVLconst {
  7270  			break
  7271  		}
  7272  		c := ssa.AuxIntToInt32(v_0.AuxInt)
  7273  		x := v_1
  7274  		v.Reset(ssaop.Op386NEGL)
  7275  		v0 := b.NewValue0(v.Pos, ssaop.Op386SUBLconst, v.Type)
  7276  		v0.AuxInt = ssa.Int32ToAuxInt(c)
  7277  		v0.AddArg(x)
  7278  		v.AddArg(v0)
  7279  		return true
  7280  	}
  7281  	// match: (SUBL x l:(MOVLload [off] {sym} ptr mem))
  7282  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  7283  	// result: (SUBLload x [off] {sym} ptr mem)
  7284  	for {
  7285  		x := v_0
  7286  		l := v_1
  7287  		if l.Op != ssaop.Op386MOVLload {
  7288  			break
  7289  		}
  7290  		off := ssa.AuxIntToInt32(l.AuxInt)
  7291  		sym := ssa.AuxToSym(l.Aux)
  7292  		mem := l.Args[1]
  7293  		ptr := l.Args[0]
  7294  		if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  7295  			break
  7296  		}
  7297  		v.Reset(ssaop.Op386SUBLload)
  7298  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7299  		v.Aux = ssa.SymToAux(sym)
  7300  		v.AddArg3(x, ptr, mem)
  7301  		return true
  7302  	}
  7303  	// match: (SUBL x x)
  7304  	// result: (MOVLconst [0])
  7305  	for {
  7306  		x := v_0
  7307  		if x != v_1 {
  7308  			break
  7309  		}
  7310  		v.Reset(ssaop.Op386MOVLconst)
  7311  		v.AuxInt = ssa.Int32ToAuxInt(0)
  7312  		return true
  7313  	}
  7314  	return false
  7315  }
  7316  func rewriteValue_Op386SUBLcarry(v *ssa.Value) bool {
  7317  	v_1 := v.Args[1]
  7318  	v_0 := v.Args[0]
  7319  	// match: (SUBLcarry x (MOVLconst [c]))
  7320  	// result: (SUBLconstcarry [c] x)
  7321  	for {
  7322  		x := v_0
  7323  		if v_1.Op != ssaop.Op386MOVLconst {
  7324  			break
  7325  		}
  7326  		c := ssa.AuxIntToInt32(v_1.AuxInt)
  7327  		v.Reset(ssaop.Op386SUBLconstcarry)
  7328  		v.AuxInt = ssa.Int32ToAuxInt(c)
  7329  		v.AddArg(x)
  7330  		return true
  7331  	}
  7332  	return false
  7333  }
  7334  func rewriteValue_Op386SUBLconst(v *ssa.Value) bool {
  7335  	v_0 := v.Args[0]
  7336  	// match: (SUBLconst [c] x)
  7337  	// cond: c==0
  7338  	// result: x
  7339  	for {
  7340  		c := ssa.AuxIntToInt32(v.AuxInt)
  7341  		x := v_0
  7342  		if !(c == 0) {
  7343  			break
  7344  		}
  7345  		v.CopyOf(x)
  7346  		return true
  7347  	}
  7348  	// match: (SUBLconst [c] x)
  7349  	// result: (ADDLconst [-c] x)
  7350  	for {
  7351  		c := ssa.AuxIntToInt32(v.AuxInt)
  7352  		x := v_0
  7353  		v.Reset(ssaop.Op386ADDLconst)
  7354  		v.AuxInt = ssa.Int32ToAuxInt(-c)
  7355  		v.AddArg(x)
  7356  		return true
  7357  	}
  7358  }
  7359  func rewriteValue_Op386SUBLload(v *ssa.Value) bool {
  7360  	v_2 := v.Args[2]
  7361  	v_1 := v.Args[1]
  7362  	v_0 := v.Args[0]
  7363  	b := v.Block
  7364  	config := b.Func.Config
  7365  	// match: (SUBLload [off1] {sym} val (ADDLconst [off2] base) mem)
  7366  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  7367  	// result: (SUBLload [off1+off2] {sym} val base mem)
  7368  	for {
  7369  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7370  		sym := ssa.AuxToSym(v.Aux)
  7371  		val := v_0
  7372  		if v_1.Op != ssaop.Op386ADDLconst {
  7373  			break
  7374  		}
  7375  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7376  		base := v_1.Args[0]
  7377  		mem := v_2
  7378  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  7379  			break
  7380  		}
  7381  		v.Reset(ssaop.Op386SUBLload)
  7382  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7383  		v.Aux = ssa.SymToAux(sym)
  7384  		v.AddArg3(val, base, mem)
  7385  		return true
  7386  	}
  7387  	// match: (SUBLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7388  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7389  	// result: (SUBLload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  7390  	for {
  7391  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7392  		sym1 := ssa.AuxToSym(v.Aux)
  7393  		val := v_0
  7394  		if v_1.Op != ssaop.Op386LEAL {
  7395  			break
  7396  		}
  7397  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7398  		sym2 := ssa.AuxToSym(v_1.Aux)
  7399  		base := v_1.Args[0]
  7400  		mem := v_2
  7401  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7402  			break
  7403  		}
  7404  		v.Reset(ssaop.Op386SUBLload)
  7405  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7406  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7407  		v.AddArg3(val, base, mem)
  7408  		return true
  7409  	}
  7410  	return false
  7411  }
  7412  func rewriteValue_Op386SUBLmodify(v *ssa.Value) bool {
  7413  	v_2 := v.Args[2]
  7414  	v_1 := v.Args[1]
  7415  	v_0 := v.Args[0]
  7416  	b := v.Block
  7417  	config := b.Func.Config
  7418  	// match: (SUBLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  7419  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  7420  	// result: (SUBLmodify [off1+off2] {sym} base val mem)
  7421  	for {
  7422  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7423  		sym := ssa.AuxToSym(v.Aux)
  7424  		if v_0.Op != ssaop.Op386ADDLconst {
  7425  			break
  7426  		}
  7427  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7428  		base := v_0.Args[0]
  7429  		val := v_1
  7430  		mem := v_2
  7431  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  7432  			break
  7433  		}
  7434  		v.Reset(ssaop.Op386SUBLmodify)
  7435  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7436  		v.Aux = ssa.SymToAux(sym)
  7437  		v.AddArg3(base, val, mem)
  7438  		return true
  7439  	}
  7440  	// match: (SUBLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  7441  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7442  	// result: (SUBLmodify [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  7443  	for {
  7444  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7445  		sym1 := ssa.AuxToSym(v.Aux)
  7446  		if v_0.Op != ssaop.Op386LEAL {
  7447  			break
  7448  		}
  7449  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7450  		sym2 := ssa.AuxToSym(v_0.Aux)
  7451  		base := v_0.Args[0]
  7452  		val := v_1
  7453  		mem := v_2
  7454  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7455  			break
  7456  		}
  7457  		v.Reset(ssaop.Op386SUBLmodify)
  7458  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7459  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7460  		v.AddArg3(base, val, mem)
  7461  		return true
  7462  	}
  7463  	return false
  7464  }
  7465  func rewriteValue_Op386SUBSD(v *ssa.Value) bool {
  7466  	v_1 := v.Args[1]
  7467  	v_0 := v.Args[0]
  7468  	// match: (SUBSD x l:(MOVSDload [off] {sym} ptr mem))
  7469  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  7470  	// result: (SUBSDload x [off] {sym} ptr mem)
  7471  	for {
  7472  		x := v_0
  7473  		l := v_1
  7474  		if l.Op != ssaop.Op386MOVSDload {
  7475  			break
  7476  		}
  7477  		off := ssa.AuxIntToInt32(l.AuxInt)
  7478  		sym := ssa.AuxToSym(l.Aux)
  7479  		mem := l.Args[1]
  7480  		ptr := l.Args[0]
  7481  		if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  7482  			break
  7483  		}
  7484  		v.Reset(ssaop.Op386SUBSDload)
  7485  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7486  		v.Aux = ssa.SymToAux(sym)
  7487  		v.AddArg3(x, ptr, mem)
  7488  		return true
  7489  	}
  7490  	return false
  7491  }
  7492  func rewriteValue_Op386SUBSDload(v *ssa.Value) bool {
  7493  	v_2 := v.Args[2]
  7494  	v_1 := v.Args[1]
  7495  	v_0 := v.Args[0]
  7496  	b := v.Block
  7497  	config := b.Func.Config
  7498  	// match: (SUBSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  7499  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  7500  	// result: (SUBSDload [off1+off2] {sym} val base mem)
  7501  	for {
  7502  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7503  		sym := ssa.AuxToSym(v.Aux)
  7504  		val := v_0
  7505  		if v_1.Op != ssaop.Op386ADDLconst {
  7506  			break
  7507  		}
  7508  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7509  		base := v_1.Args[0]
  7510  		mem := v_2
  7511  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  7512  			break
  7513  		}
  7514  		v.Reset(ssaop.Op386SUBSDload)
  7515  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7516  		v.Aux = ssa.SymToAux(sym)
  7517  		v.AddArg3(val, base, mem)
  7518  		return true
  7519  	}
  7520  	// match: (SUBSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7521  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7522  	// result: (SUBSDload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  7523  	for {
  7524  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7525  		sym1 := ssa.AuxToSym(v.Aux)
  7526  		val := v_0
  7527  		if v_1.Op != ssaop.Op386LEAL {
  7528  			break
  7529  		}
  7530  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7531  		sym2 := ssa.AuxToSym(v_1.Aux)
  7532  		base := v_1.Args[0]
  7533  		mem := v_2
  7534  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7535  			break
  7536  		}
  7537  		v.Reset(ssaop.Op386SUBSDload)
  7538  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7539  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7540  		v.AddArg3(val, base, mem)
  7541  		return true
  7542  	}
  7543  	return false
  7544  }
  7545  func rewriteValue_Op386SUBSS(v *ssa.Value) bool {
  7546  	v_1 := v.Args[1]
  7547  	v_0 := v.Args[0]
  7548  	// match: (SUBSS x l:(MOVSSload [off] {sym} ptr mem))
  7549  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  7550  	// result: (SUBSSload x [off] {sym} ptr mem)
  7551  	for {
  7552  		x := v_0
  7553  		l := v_1
  7554  		if l.Op != ssaop.Op386MOVSSload {
  7555  			break
  7556  		}
  7557  		off := ssa.AuxIntToInt32(l.AuxInt)
  7558  		sym := ssa.AuxToSym(l.Aux)
  7559  		mem := l.Args[1]
  7560  		ptr := l.Args[0]
  7561  		if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  7562  			break
  7563  		}
  7564  		v.Reset(ssaop.Op386SUBSSload)
  7565  		v.AuxInt = ssa.Int32ToAuxInt(off)
  7566  		v.Aux = ssa.SymToAux(sym)
  7567  		v.AddArg3(x, ptr, mem)
  7568  		return true
  7569  	}
  7570  	return false
  7571  }
  7572  func rewriteValue_Op386SUBSSload(v *ssa.Value) bool {
  7573  	v_2 := v.Args[2]
  7574  	v_1 := v.Args[1]
  7575  	v_0 := v.Args[0]
  7576  	b := v.Block
  7577  	config := b.Func.Config
  7578  	// match: (SUBSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  7579  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  7580  	// result: (SUBSSload [off1+off2] {sym} val base mem)
  7581  	for {
  7582  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7583  		sym := ssa.AuxToSym(v.Aux)
  7584  		val := v_0
  7585  		if v_1.Op != ssaop.Op386ADDLconst {
  7586  			break
  7587  		}
  7588  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7589  		base := v_1.Args[0]
  7590  		mem := v_2
  7591  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  7592  			break
  7593  		}
  7594  		v.Reset(ssaop.Op386SUBSSload)
  7595  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7596  		v.Aux = ssa.SymToAux(sym)
  7597  		v.AddArg3(val, base, mem)
  7598  		return true
  7599  	}
  7600  	// match: (SUBSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7601  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7602  	// result: (SUBSSload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  7603  	for {
  7604  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7605  		sym1 := ssa.AuxToSym(v.Aux)
  7606  		val := v_0
  7607  		if v_1.Op != ssaop.Op386LEAL {
  7608  			break
  7609  		}
  7610  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7611  		sym2 := ssa.AuxToSym(v_1.Aux)
  7612  		base := v_1.Args[0]
  7613  		mem := v_2
  7614  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7615  			break
  7616  		}
  7617  		v.Reset(ssaop.Op386SUBSSload)
  7618  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7619  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7620  		v.AddArg3(val, base, mem)
  7621  		return true
  7622  	}
  7623  	return false
  7624  }
  7625  func rewriteValue_Op386XORL(v *ssa.Value) bool {
  7626  	v_1 := v.Args[1]
  7627  	v_0 := v.Args[0]
  7628  	// match: (XORL x (MOVLconst [c]))
  7629  	// result: (XORLconst [c] x)
  7630  	for {
  7631  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7632  			x := v_0
  7633  			if v_1.Op != ssaop.Op386MOVLconst {
  7634  				continue
  7635  			}
  7636  			c := ssa.AuxIntToInt32(v_1.AuxInt)
  7637  			v.Reset(ssaop.Op386XORLconst)
  7638  			v.AuxInt = ssa.Int32ToAuxInt(c)
  7639  			v.AddArg(x)
  7640  			return true
  7641  		}
  7642  		break
  7643  	}
  7644  	// match: (XORL x l:(MOVLload [off] {sym} ptr mem))
  7645  	// cond: ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)
  7646  	// result: (XORLload x [off] {sym} ptr mem)
  7647  	for {
  7648  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  7649  			x := v_0
  7650  			l := v_1
  7651  			if l.Op != ssaop.Op386MOVLload {
  7652  				continue
  7653  			}
  7654  			off := ssa.AuxIntToInt32(l.AuxInt)
  7655  			sym := ssa.AuxToSym(l.Aux)
  7656  			mem := l.Args[1]
  7657  			ptr := l.Args[0]
  7658  			if !(ssa.CanMergeLoadClobber(v, l, x) && ssa.Clobber(l)) {
  7659  				continue
  7660  			}
  7661  			v.Reset(ssaop.Op386XORLload)
  7662  			v.AuxInt = ssa.Int32ToAuxInt(off)
  7663  			v.Aux = ssa.SymToAux(sym)
  7664  			v.AddArg3(x, ptr, mem)
  7665  			return true
  7666  		}
  7667  		break
  7668  	}
  7669  	// match: (XORL x x)
  7670  	// result: (MOVLconst [0])
  7671  	for {
  7672  		x := v_0
  7673  		if x != v_1 {
  7674  			break
  7675  		}
  7676  		v.Reset(ssaop.Op386MOVLconst)
  7677  		v.AuxInt = ssa.Int32ToAuxInt(0)
  7678  		return true
  7679  	}
  7680  	return false
  7681  }
  7682  func rewriteValue_Op386XORLconst(v *ssa.Value) bool {
  7683  	v_0 := v.Args[0]
  7684  	// match: (XORLconst [c] (XORLconst [d] x))
  7685  	// result: (XORLconst [c ^ d] x)
  7686  	for {
  7687  		c := ssa.AuxIntToInt32(v.AuxInt)
  7688  		if v_0.Op != ssaop.Op386XORLconst {
  7689  			break
  7690  		}
  7691  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  7692  		x := v_0.Args[0]
  7693  		v.Reset(ssaop.Op386XORLconst)
  7694  		v.AuxInt = ssa.Int32ToAuxInt(c ^ d)
  7695  		v.AddArg(x)
  7696  		return true
  7697  	}
  7698  	// match: (XORLconst [c] x)
  7699  	// cond: c==0
  7700  	// result: x
  7701  	for {
  7702  		c := ssa.AuxIntToInt32(v.AuxInt)
  7703  		x := v_0
  7704  		if !(c == 0) {
  7705  			break
  7706  		}
  7707  		v.CopyOf(x)
  7708  		return true
  7709  	}
  7710  	// match: (XORLconst [c] (MOVLconst [d]))
  7711  	// result: (MOVLconst [c^d])
  7712  	for {
  7713  		c := ssa.AuxIntToInt32(v.AuxInt)
  7714  		if v_0.Op != ssaop.Op386MOVLconst {
  7715  			break
  7716  		}
  7717  		d := ssa.AuxIntToInt32(v_0.AuxInt)
  7718  		v.Reset(ssaop.Op386MOVLconst)
  7719  		v.AuxInt = ssa.Int32ToAuxInt(c ^ d)
  7720  		return true
  7721  	}
  7722  	return false
  7723  }
  7724  func rewriteValue_Op386XORLconstmodify(v *ssa.Value) bool {
  7725  	v_1 := v.Args[1]
  7726  	v_0 := v.Args[0]
  7727  	b := v.Block
  7728  	config := b.Func.Config
  7729  	// match: (XORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  7730  	// cond: valoff1.CanAdd32(off2)
  7731  	// result: (XORLconstmodify [valoff1.AddOffset32(off2)] {sym} base mem)
  7732  	for {
  7733  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  7734  		sym := ssa.AuxToSym(v.Aux)
  7735  		if v_0.Op != ssaop.Op386ADDLconst {
  7736  			break
  7737  		}
  7738  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7739  		base := v_0.Args[0]
  7740  		mem := v_1
  7741  		if !(valoff1.CanAdd32(off2)) {
  7742  			break
  7743  		}
  7744  		v.Reset(ssaop.Op386XORLconstmodify)
  7745  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  7746  		v.Aux = ssa.SymToAux(sym)
  7747  		v.AddArg2(base, mem)
  7748  		return true
  7749  	}
  7750  	// match: (XORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  7751  	// cond: valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7752  	// result: (XORLconstmodify [valoff1.AddOffset32(off2)] {ssa.MergeSym(sym1,sym2)} base mem)
  7753  	for {
  7754  		valoff1 := ssa.AuxIntToValAndOff(v.AuxInt)
  7755  		sym1 := ssa.AuxToSym(v.Aux)
  7756  		if v_0.Op != ssaop.Op386LEAL {
  7757  			break
  7758  		}
  7759  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7760  		sym2 := ssa.AuxToSym(v_0.Aux)
  7761  		base := v_0.Args[0]
  7762  		mem := v_1
  7763  		if !(valoff1.CanAdd32(off2) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7764  			break
  7765  		}
  7766  		v.Reset(ssaop.Op386XORLconstmodify)
  7767  		v.AuxInt = ssa.ValAndOffToAuxInt(valoff1.AddOffset32(off2))
  7768  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7769  		v.AddArg2(base, mem)
  7770  		return true
  7771  	}
  7772  	return false
  7773  }
  7774  func rewriteValue_Op386XORLload(v *ssa.Value) bool {
  7775  	v_2 := v.Args[2]
  7776  	v_1 := v.Args[1]
  7777  	v_0 := v.Args[0]
  7778  	b := v.Block
  7779  	config := b.Func.Config
  7780  	// match: (XORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  7781  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  7782  	// result: (XORLload [off1+off2] {sym} val base mem)
  7783  	for {
  7784  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7785  		sym := ssa.AuxToSym(v.Aux)
  7786  		val := v_0
  7787  		if v_1.Op != ssaop.Op386ADDLconst {
  7788  			break
  7789  		}
  7790  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7791  		base := v_1.Args[0]
  7792  		mem := v_2
  7793  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  7794  			break
  7795  		}
  7796  		v.Reset(ssaop.Op386XORLload)
  7797  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7798  		v.Aux = ssa.SymToAux(sym)
  7799  		v.AddArg3(val, base, mem)
  7800  		return true
  7801  	}
  7802  	// match: (XORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  7803  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7804  	// result: (XORLload [off1+off2] {ssa.MergeSym(sym1,sym2)} val base mem)
  7805  	for {
  7806  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7807  		sym1 := ssa.AuxToSym(v.Aux)
  7808  		val := v_0
  7809  		if v_1.Op != ssaop.Op386LEAL {
  7810  			break
  7811  		}
  7812  		off2 := ssa.AuxIntToInt32(v_1.AuxInt)
  7813  		sym2 := ssa.AuxToSym(v_1.Aux)
  7814  		base := v_1.Args[0]
  7815  		mem := v_2
  7816  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7817  			break
  7818  		}
  7819  		v.Reset(ssaop.Op386XORLload)
  7820  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7821  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7822  		v.AddArg3(val, base, mem)
  7823  		return true
  7824  	}
  7825  	return false
  7826  }
  7827  func rewriteValue_Op386XORLmodify(v *ssa.Value) bool {
  7828  	v_2 := v.Args[2]
  7829  	v_1 := v.Args[1]
  7830  	v_0 := v.Args[0]
  7831  	b := v.Block
  7832  	config := b.Func.Config
  7833  	// match: (XORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  7834  	// cond: ssa.Is32Bit(int64(off1)+int64(off2))
  7835  	// result: (XORLmodify [off1+off2] {sym} base val mem)
  7836  	for {
  7837  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7838  		sym := ssa.AuxToSym(v.Aux)
  7839  		if v_0.Op != ssaop.Op386ADDLconst {
  7840  			break
  7841  		}
  7842  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7843  		base := v_0.Args[0]
  7844  		val := v_1
  7845  		mem := v_2
  7846  		if !(ssa.Is32Bit(int64(off1) + int64(off2))) {
  7847  			break
  7848  		}
  7849  		v.Reset(ssaop.Op386XORLmodify)
  7850  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7851  		v.Aux = ssa.SymToAux(sym)
  7852  		v.AddArg3(base, val, mem)
  7853  		return true
  7854  	}
  7855  	// match: (XORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  7856  	// cond: ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)
  7857  	// result: (XORLmodify [off1+off2] {ssa.MergeSym(sym1,sym2)} base val mem)
  7858  	for {
  7859  		off1 := ssa.AuxIntToInt32(v.AuxInt)
  7860  		sym1 := ssa.AuxToSym(v.Aux)
  7861  		if v_0.Op != ssaop.Op386LEAL {
  7862  			break
  7863  		}
  7864  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  7865  		sym2 := ssa.AuxToSym(v_0.Aux)
  7866  		base := v_0.Args[0]
  7867  		val := v_1
  7868  		mem := v_2
  7869  		if !(ssa.Is32Bit(int64(off1)+int64(off2)) && ssa.CanMergeSym(sym1, sym2) && (base.Op != ssaop.OpSB || !config.Ctxt.Flag_shared)) {
  7870  			break
  7871  		}
  7872  		v.Reset(ssaop.Op386XORLmodify)
  7873  		v.AuxInt = ssa.Int32ToAuxInt(off1 + off2)
  7874  		v.Aux = ssa.SymToAux(ssa.MergeSym(sym1, sym2))
  7875  		v.AddArg3(base, val, mem)
  7876  		return true
  7877  	}
  7878  	return false
  7879  }
  7880  func rewriteValue_OpAddr(v *ssa.Value) bool {
  7881  	v_0 := v.Args[0]
  7882  	// match: (Addr {sym} base)
  7883  	// result: (LEAL {sym} base)
  7884  	for {
  7885  		sym := ssa.AuxToSym(v.Aux)
  7886  		base := v_0
  7887  		v.Reset(ssaop.Op386LEAL)
  7888  		v.Aux = ssa.SymToAux(sym)
  7889  		v.AddArg(base)
  7890  		return true
  7891  	}
  7892  }
  7893  func rewriteValue_OpBswap16(v *ssa.Value) bool {
  7894  	v_0 := v.Args[0]
  7895  	// match: (Bswap16 x)
  7896  	// result: (ROLWconst [8] x)
  7897  	for {
  7898  		x := v_0
  7899  		v.Reset(ssaop.Op386ROLWconst)
  7900  		v.AuxInt = ssa.Int16ToAuxInt(8)
  7901  		v.AddArg(x)
  7902  		return true
  7903  	}
  7904  }
  7905  func rewriteValue_OpConst16(v *ssa.Value) bool {
  7906  	// match: (Const16 [c])
  7907  	// result: (MOVLconst [int32(c)])
  7908  	for {
  7909  		c := ssa.AuxIntToInt16(v.AuxInt)
  7910  		v.Reset(ssaop.Op386MOVLconst)
  7911  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  7912  		return true
  7913  	}
  7914  }
  7915  func rewriteValue_OpConst8(v *ssa.Value) bool {
  7916  	// match: (Const8 [c])
  7917  	// result: (MOVLconst [int32(c)])
  7918  	for {
  7919  		c := ssa.AuxIntToInt8(v.AuxInt)
  7920  		v.Reset(ssaop.Op386MOVLconst)
  7921  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  7922  		return true
  7923  	}
  7924  }
  7925  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  7926  	// match: (ConstBool [c])
  7927  	// result: (MOVLconst [ssa.B2i32(c)])
  7928  	for {
  7929  		c := ssa.AuxIntToBool(v.AuxInt)
  7930  		v.Reset(ssaop.Op386MOVLconst)
  7931  		v.AuxInt = ssa.Int32ToAuxInt(ssa.B2i32(c))
  7932  		return true
  7933  	}
  7934  }
  7935  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  7936  	// match: (ConstNil)
  7937  	// result: (MOVLconst [0])
  7938  	for {
  7939  		v.Reset(ssaop.Op386MOVLconst)
  7940  		v.AuxInt = ssa.Int32ToAuxInt(0)
  7941  		return true
  7942  	}
  7943  }
  7944  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  7945  	v_0 := v.Args[0]
  7946  	b := v.Block
  7947  	typ := &b.Func.Config.Types
  7948  	// match: (Ctz16 x)
  7949  	// result: (BSFL (ORLconst <typ.UInt32> [0x10000] x))
  7950  	for {
  7951  		x := v_0
  7952  		v.Reset(ssaop.Op386BSFL)
  7953  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORLconst, typ.UInt32)
  7954  		v0.AuxInt = ssa.Int32ToAuxInt(0x10000)
  7955  		v0.AddArg(x)
  7956  		v.AddArg(v0)
  7957  		return true
  7958  	}
  7959  }
  7960  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  7961  	v_0 := v.Args[0]
  7962  	b := v.Block
  7963  	typ := &b.Func.Config.Types
  7964  	// match: (Ctz8 x)
  7965  	// result: (BSFL (ORLconst <typ.UInt32> [0x100] x))
  7966  	for {
  7967  		x := v_0
  7968  		v.Reset(ssaop.Op386BSFL)
  7969  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORLconst, typ.UInt32)
  7970  		v0.AuxInt = ssa.Int32ToAuxInt(0x100)
  7971  		v0.AddArg(x)
  7972  		v.AddArg(v0)
  7973  		return true
  7974  	}
  7975  }
  7976  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  7977  	v_1 := v.Args[1]
  7978  	v_0 := v.Args[0]
  7979  	b := v.Block
  7980  	typ := &b.Func.Config.Types
  7981  	// match: (Div8 x y)
  7982  	// result: (DIVW (SignExt8to16 x) (SignExt8to16 y))
  7983  	for {
  7984  		x := v_0
  7985  		y := v_1
  7986  		v.Reset(ssaop.Op386DIVW)
  7987  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to16, typ.Int16)
  7988  		v0.AddArg(x)
  7989  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to16, typ.Int16)
  7990  		v1.AddArg(y)
  7991  		v.AddArg2(v0, v1)
  7992  		return true
  7993  	}
  7994  }
  7995  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  7996  	v_1 := v.Args[1]
  7997  	v_0 := v.Args[0]
  7998  	b := v.Block
  7999  	typ := &b.Func.Config.Types
  8000  	// match: (Div8u x y)
  8001  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  8002  	for {
  8003  		x := v_0
  8004  		y := v_1
  8005  		v.Reset(ssaop.Op386DIVWU)
  8006  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to16, typ.UInt16)
  8007  		v0.AddArg(x)
  8008  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to16, typ.UInt16)
  8009  		v1.AddArg(y)
  8010  		v.AddArg2(v0, v1)
  8011  		return true
  8012  	}
  8013  }
  8014  func rewriteValue_OpEq16(v *ssa.Value) bool {
  8015  	v_1 := v.Args[1]
  8016  	v_0 := v.Args[0]
  8017  	b := v.Block
  8018  	// match: (Eq16 x y)
  8019  	// result: (SETEQ (CMPW x y))
  8020  	for {
  8021  		x := v_0
  8022  		y := v_1
  8023  		v.Reset(ssaop.Op386SETEQ)
  8024  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  8025  		v0.AddArg2(x, y)
  8026  		v.AddArg(v0)
  8027  		return true
  8028  	}
  8029  }
  8030  func rewriteValue_OpEq32(v *ssa.Value) bool {
  8031  	v_1 := v.Args[1]
  8032  	v_0 := v.Args[0]
  8033  	b := v.Block
  8034  	// match: (Eq32 x y)
  8035  	// result: (SETEQ (CMPL x y))
  8036  	for {
  8037  		x := v_0
  8038  		y := v_1
  8039  		v.Reset(ssaop.Op386SETEQ)
  8040  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8041  		v0.AddArg2(x, y)
  8042  		v.AddArg(v0)
  8043  		return true
  8044  	}
  8045  }
  8046  func rewriteValue_OpEq32F(v *ssa.Value) bool {
  8047  	v_1 := v.Args[1]
  8048  	v_0 := v.Args[0]
  8049  	b := v.Block
  8050  	// match: (Eq32F x y)
  8051  	// result: (SETEQF (UCOMISS x y))
  8052  	for {
  8053  		x := v_0
  8054  		y := v_1
  8055  		v.Reset(ssaop.Op386SETEQF)
  8056  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISS, types.TypeFlags)
  8057  		v0.AddArg2(x, y)
  8058  		v.AddArg(v0)
  8059  		return true
  8060  	}
  8061  }
  8062  func rewriteValue_OpEq64F(v *ssa.Value) bool {
  8063  	v_1 := v.Args[1]
  8064  	v_0 := v.Args[0]
  8065  	b := v.Block
  8066  	// match: (Eq64F x y)
  8067  	// result: (SETEQF (UCOMISD x y))
  8068  	for {
  8069  		x := v_0
  8070  		y := v_1
  8071  		v.Reset(ssaop.Op386SETEQF)
  8072  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISD, types.TypeFlags)
  8073  		v0.AddArg2(x, y)
  8074  		v.AddArg(v0)
  8075  		return true
  8076  	}
  8077  }
  8078  func rewriteValue_OpEq8(v *ssa.Value) bool {
  8079  	v_1 := v.Args[1]
  8080  	v_0 := v.Args[0]
  8081  	b := v.Block
  8082  	// match: (Eq8 x y)
  8083  	// result: (SETEQ (CMPB x y))
  8084  	for {
  8085  		x := v_0
  8086  		y := v_1
  8087  		v.Reset(ssaop.Op386SETEQ)
  8088  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  8089  		v0.AddArg2(x, y)
  8090  		v.AddArg(v0)
  8091  		return true
  8092  	}
  8093  }
  8094  func rewriteValue_OpEqB(v *ssa.Value) bool {
  8095  	v_1 := v.Args[1]
  8096  	v_0 := v.Args[0]
  8097  	b := v.Block
  8098  	// match: (EqB x y)
  8099  	// result: (SETEQ (CMPB x y))
  8100  	for {
  8101  		x := v_0
  8102  		y := v_1
  8103  		v.Reset(ssaop.Op386SETEQ)
  8104  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  8105  		v0.AddArg2(x, y)
  8106  		v.AddArg(v0)
  8107  		return true
  8108  	}
  8109  }
  8110  func rewriteValue_OpEqPtr(v *ssa.Value) bool {
  8111  	v_1 := v.Args[1]
  8112  	v_0 := v.Args[0]
  8113  	b := v.Block
  8114  	// match: (EqPtr x y)
  8115  	// result: (SETEQ (CMPL x y))
  8116  	for {
  8117  		x := v_0
  8118  		y := v_1
  8119  		v.Reset(ssaop.Op386SETEQ)
  8120  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8121  		v0.AddArg2(x, y)
  8122  		v.AddArg(v0)
  8123  		return true
  8124  	}
  8125  }
  8126  func rewriteValue_OpIsInBounds(v *ssa.Value) bool {
  8127  	v_1 := v.Args[1]
  8128  	v_0 := v.Args[0]
  8129  	b := v.Block
  8130  	// match: (IsInBounds idx len)
  8131  	// result: (SETB (CMPL idx len))
  8132  	for {
  8133  		idx := v_0
  8134  		len := v_1
  8135  		v.Reset(ssaop.Op386SETB)
  8136  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8137  		v0.AddArg2(idx, len)
  8138  		v.AddArg(v0)
  8139  		return true
  8140  	}
  8141  }
  8142  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  8143  	v_0 := v.Args[0]
  8144  	b := v.Block
  8145  	// match: (IsNonNil p)
  8146  	// result: (SETNE (TESTL p p))
  8147  	for {
  8148  		p := v_0
  8149  		v.Reset(ssaop.Op386SETNE)
  8150  		v0 := b.NewValue0(v.Pos, ssaop.Op386TESTL, types.TypeFlags)
  8151  		v0.AddArg2(p, p)
  8152  		v.AddArg(v0)
  8153  		return true
  8154  	}
  8155  }
  8156  func rewriteValue_OpIsSliceInBounds(v *ssa.Value) bool {
  8157  	v_1 := v.Args[1]
  8158  	v_0 := v.Args[0]
  8159  	b := v.Block
  8160  	// match: (IsSliceInBounds idx len)
  8161  	// result: (SETBE (CMPL idx len))
  8162  	for {
  8163  		idx := v_0
  8164  		len := v_1
  8165  		v.Reset(ssaop.Op386SETBE)
  8166  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8167  		v0.AddArg2(idx, len)
  8168  		v.AddArg(v0)
  8169  		return true
  8170  	}
  8171  }
  8172  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  8173  	v_1 := v.Args[1]
  8174  	v_0 := v.Args[0]
  8175  	b := v.Block
  8176  	// match: (Leq16 x y)
  8177  	// result: (SETLE (CMPW x y))
  8178  	for {
  8179  		x := v_0
  8180  		y := v_1
  8181  		v.Reset(ssaop.Op386SETLE)
  8182  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  8183  		v0.AddArg2(x, y)
  8184  		v.AddArg(v0)
  8185  		return true
  8186  	}
  8187  }
  8188  func rewriteValue_OpLeq16U(v *ssa.Value) bool {
  8189  	v_1 := v.Args[1]
  8190  	v_0 := v.Args[0]
  8191  	b := v.Block
  8192  	// match: (Leq16U x y)
  8193  	// result: (SETBE (CMPW x y))
  8194  	for {
  8195  		x := v_0
  8196  		y := v_1
  8197  		v.Reset(ssaop.Op386SETBE)
  8198  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  8199  		v0.AddArg2(x, y)
  8200  		v.AddArg(v0)
  8201  		return true
  8202  	}
  8203  }
  8204  func rewriteValue_OpLeq32(v *ssa.Value) bool {
  8205  	v_1 := v.Args[1]
  8206  	v_0 := v.Args[0]
  8207  	b := v.Block
  8208  	// match: (Leq32 x y)
  8209  	// result: (SETLE (CMPL x y))
  8210  	for {
  8211  		x := v_0
  8212  		y := v_1
  8213  		v.Reset(ssaop.Op386SETLE)
  8214  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8215  		v0.AddArg2(x, y)
  8216  		v.AddArg(v0)
  8217  		return true
  8218  	}
  8219  }
  8220  func rewriteValue_OpLeq32F(v *ssa.Value) bool {
  8221  	v_1 := v.Args[1]
  8222  	v_0 := v.Args[0]
  8223  	b := v.Block
  8224  	// match: (Leq32F x y)
  8225  	// result: (SETGEF (UCOMISS y x))
  8226  	for {
  8227  		x := v_0
  8228  		y := v_1
  8229  		v.Reset(ssaop.Op386SETGEF)
  8230  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISS, types.TypeFlags)
  8231  		v0.AddArg2(y, x)
  8232  		v.AddArg(v0)
  8233  		return true
  8234  	}
  8235  }
  8236  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  8237  	v_1 := v.Args[1]
  8238  	v_0 := v.Args[0]
  8239  	b := v.Block
  8240  	// match: (Leq32U x y)
  8241  	// result: (SETBE (CMPL x y))
  8242  	for {
  8243  		x := v_0
  8244  		y := v_1
  8245  		v.Reset(ssaop.Op386SETBE)
  8246  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8247  		v0.AddArg2(x, y)
  8248  		v.AddArg(v0)
  8249  		return true
  8250  	}
  8251  }
  8252  func rewriteValue_OpLeq64F(v *ssa.Value) bool {
  8253  	v_1 := v.Args[1]
  8254  	v_0 := v.Args[0]
  8255  	b := v.Block
  8256  	// match: (Leq64F x y)
  8257  	// result: (SETGEF (UCOMISD y x))
  8258  	for {
  8259  		x := v_0
  8260  		y := v_1
  8261  		v.Reset(ssaop.Op386SETGEF)
  8262  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISD, types.TypeFlags)
  8263  		v0.AddArg2(y, x)
  8264  		v.AddArg(v0)
  8265  		return true
  8266  	}
  8267  }
  8268  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  8269  	v_1 := v.Args[1]
  8270  	v_0 := v.Args[0]
  8271  	b := v.Block
  8272  	// match: (Leq8 x y)
  8273  	// result: (SETLE (CMPB x y))
  8274  	for {
  8275  		x := v_0
  8276  		y := v_1
  8277  		v.Reset(ssaop.Op386SETLE)
  8278  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  8279  		v0.AddArg2(x, y)
  8280  		v.AddArg(v0)
  8281  		return true
  8282  	}
  8283  }
  8284  func rewriteValue_OpLeq8U(v *ssa.Value) bool {
  8285  	v_1 := v.Args[1]
  8286  	v_0 := v.Args[0]
  8287  	b := v.Block
  8288  	// match: (Leq8U x y)
  8289  	// result: (SETBE (CMPB x y))
  8290  	for {
  8291  		x := v_0
  8292  		y := v_1
  8293  		v.Reset(ssaop.Op386SETBE)
  8294  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  8295  		v0.AddArg2(x, y)
  8296  		v.AddArg(v0)
  8297  		return true
  8298  	}
  8299  }
  8300  func rewriteValue_OpLess16(v *ssa.Value) bool {
  8301  	v_1 := v.Args[1]
  8302  	v_0 := v.Args[0]
  8303  	b := v.Block
  8304  	// match: (Less16 x y)
  8305  	// result: (SETL (CMPW x y))
  8306  	for {
  8307  		x := v_0
  8308  		y := v_1
  8309  		v.Reset(ssaop.Op386SETL)
  8310  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  8311  		v0.AddArg2(x, y)
  8312  		v.AddArg(v0)
  8313  		return true
  8314  	}
  8315  }
  8316  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  8317  	v_1 := v.Args[1]
  8318  	v_0 := v.Args[0]
  8319  	b := v.Block
  8320  	// match: (Less16U x y)
  8321  	// result: (SETB (CMPW x y))
  8322  	for {
  8323  		x := v_0
  8324  		y := v_1
  8325  		v.Reset(ssaop.Op386SETB)
  8326  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  8327  		v0.AddArg2(x, y)
  8328  		v.AddArg(v0)
  8329  		return true
  8330  	}
  8331  }
  8332  func rewriteValue_OpLess32(v *ssa.Value) bool {
  8333  	v_1 := v.Args[1]
  8334  	v_0 := v.Args[0]
  8335  	b := v.Block
  8336  	// match: (Less32 x y)
  8337  	// result: (SETL (CMPL x y))
  8338  	for {
  8339  		x := v_0
  8340  		y := v_1
  8341  		v.Reset(ssaop.Op386SETL)
  8342  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8343  		v0.AddArg2(x, y)
  8344  		v.AddArg(v0)
  8345  		return true
  8346  	}
  8347  }
  8348  func rewriteValue_OpLess32F(v *ssa.Value) bool {
  8349  	v_1 := v.Args[1]
  8350  	v_0 := v.Args[0]
  8351  	b := v.Block
  8352  	// match: (Less32F x y)
  8353  	// result: (SETGF (UCOMISS y x))
  8354  	for {
  8355  		x := v_0
  8356  		y := v_1
  8357  		v.Reset(ssaop.Op386SETGF)
  8358  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISS, types.TypeFlags)
  8359  		v0.AddArg2(y, x)
  8360  		v.AddArg(v0)
  8361  		return true
  8362  	}
  8363  }
  8364  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  8365  	v_1 := v.Args[1]
  8366  	v_0 := v.Args[0]
  8367  	b := v.Block
  8368  	// match: (Less32U x y)
  8369  	// result: (SETB (CMPL x y))
  8370  	for {
  8371  		x := v_0
  8372  		y := v_1
  8373  		v.Reset(ssaop.Op386SETB)
  8374  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  8375  		v0.AddArg2(x, y)
  8376  		v.AddArg(v0)
  8377  		return true
  8378  	}
  8379  }
  8380  func rewriteValue_OpLess64F(v *ssa.Value) bool {
  8381  	v_1 := v.Args[1]
  8382  	v_0 := v.Args[0]
  8383  	b := v.Block
  8384  	// match: (Less64F x y)
  8385  	// result: (SETGF (UCOMISD y x))
  8386  	for {
  8387  		x := v_0
  8388  		y := v_1
  8389  		v.Reset(ssaop.Op386SETGF)
  8390  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISD, types.TypeFlags)
  8391  		v0.AddArg2(y, x)
  8392  		v.AddArg(v0)
  8393  		return true
  8394  	}
  8395  }
  8396  func rewriteValue_OpLess8(v *ssa.Value) bool {
  8397  	v_1 := v.Args[1]
  8398  	v_0 := v.Args[0]
  8399  	b := v.Block
  8400  	// match: (Less8 x y)
  8401  	// result: (SETL (CMPB x y))
  8402  	for {
  8403  		x := v_0
  8404  		y := v_1
  8405  		v.Reset(ssaop.Op386SETL)
  8406  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  8407  		v0.AddArg2(x, y)
  8408  		v.AddArg(v0)
  8409  		return true
  8410  	}
  8411  }
  8412  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  8413  	v_1 := v.Args[1]
  8414  	v_0 := v.Args[0]
  8415  	b := v.Block
  8416  	// match: (Less8U x y)
  8417  	// result: (SETB (CMPB x y))
  8418  	for {
  8419  		x := v_0
  8420  		y := v_1
  8421  		v.Reset(ssaop.Op386SETB)
  8422  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  8423  		v0.AddArg2(x, y)
  8424  		v.AddArg(v0)
  8425  		return true
  8426  	}
  8427  }
  8428  func rewriteValue_OpLoad(v *ssa.Value) bool {
  8429  	v_1 := v.Args[1]
  8430  	v_0 := v.Args[0]
  8431  	// match: (Load <t> ptr mem)
  8432  	// cond: (ssa.Is32BitInt(t) ||ssa.IsPtr(t))
  8433  	// result: (MOVLload ptr mem)
  8434  	for {
  8435  		t := v.Type
  8436  		ptr := v_0
  8437  		mem := v_1
  8438  		if !(ssa.Is32BitInt(t) || ssa.IsPtr(t)) {
  8439  			break
  8440  		}
  8441  		v.Reset(ssaop.Op386MOVLload)
  8442  		v.AddArg2(ptr, mem)
  8443  		return true
  8444  	}
  8445  	// match: (Load <t> ptr mem)
  8446  	// cond: ssa.Is16BitInt(t)
  8447  	// result: (MOVWload ptr mem)
  8448  	for {
  8449  		t := v.Type
  8450  		ptr := v_0
  8451  		mem := v_1
  8452  		if !(ssa.Is16BitInt(t)) {
  8453  			break
  8454  		}
  8455  		v.Reset(ssaop.Op386MOVWload)
  8456  		v.AddArg2(ptr, mem)
  8457  		return true
  8458  	}
  8459  	// match: (Load <t> ptr mem)
  8460  	// cond: (t.IsBoolean() || ssa.Is8BitInt(t))
  8461  	// result: (MOVBload ptr mem)
  8462  	for {
  8463  		t := v.Type
  8464  		ptr := v_0
  8465  		mem := v_1
  8466  		if !(t.IsBoolean() || ssa.Is8BitInt(t)) {
  8467  			break
  8468  		}
  8469  		v.Reset(ssaop.Op386MOVBload)
  8470  		v.AddArg2(ptr, mem)
  8471  		return true
  8472  	}
  8473  	// match: (Load <t> ptr mem)
  8474  	// cond: ssa.Is32BitFloat(t)
  8475  	// result: (MOVSSload ptr mem)
  8476  	for {
  8477  		t := v.Type
  8478  		ptr := v_0
  8479  		mem := v_1
  8480  		if !(ssa.Is32BitFloat(t)) {
  8481  			break
  8482  		}
  8483  		v.Reset(ssaop.Op386MOVSSload)
  8484  		v.AddArg2(ptr, mem)
  8485  		return true
  8486  	}
  8487  	// match: (Load <t> ptr mem)
  8488  	// cond: ssa.Is64BitFloat(t)
  8489  	// result: (MOVSDload ptr mem)
  8490  	for {
  8491  		t := v.Type
  8492  		ptr := v_0
  8493  		mem := v_1
  8494  		if !(ssa.Is64BitFloat(t)) {
  8495  			break
  8496  		}
  8497  		v.Reset(ssaop.Op386MOVSDload)
  8498  		v.AddArg2(ptr, mem)
  8499  		return true
  8500  	}
  8501  	return false
  8502  }
  8503  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  8504  	v_1 := v.Args[1]
  8505  	v_0 := v.Args[0]
  8506  	b := v.Block
  8507  	typ := &b.Func.Config.Types
  8508  	// match: (LocalAddr <t> {sym} base mem)
  8509  	// cond: t.Elem().HasPointers()
  8510  	// result: (LEAL {sym} (SPanchored base mem))
  8511  	for {
  8512  		t := v.Type
  8513  		sym := ssa.AuxToSym(v.Aux)
  8514  		base := v_0
  8515  		mem := v_1
  8516  		if !(t.Elem().HasPointers()) {
  8517  			break
  8518  		}
  8519  		v.Reset(ssaop.Op386LEAL)
  8520  		v.Aux = ssa.SymToAux(sym)
  8521  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  8522  		v0.AddArg2(base, mem)
  8523  		v.AddArg(v0)
  8524  		return true
  8525  	}
  8526  	// match: (LocalAddr <t> {sym} base _)
  8527  	// cond: !t.Elem().HasPointers()
  8528  	// result: (LEAL {sym} base)
  8529  	for {
  8530  		t := v.Type
  8531  		sym := ssa.AuxToSym(v.Aux)
  8532  		base := v_0
  8533  		if !(!t.Elem().HasPointers()) {
  8534  			break
  8535  		}
  8536  		v.Reset(ssaop.Op386LEAL)
  8537  		v.Aux = ssa.SymToAux(sym)
  8538  		v.AddArg(base)
  8539  		return true
  8540  	}
  8541  	return false
  8542  }
  8543  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  8544  	v_1 := v.Args[1]
  8545  	v_0 := v.Args[0]
  8546  	b := v.Block
  8547  	// match: (Lsh16x16 <t> x y)
  8548  	// cond: !ssa.ShiftIsBounded(v)
  8549  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  8550  	for {
  8551  		t := v.Type
  8552  		x := v_0
  8553  		y := v_1
  8554  		if !(!ssa.ShiftIsBounded(v)) {
  8555  			break
  8556  		}
  8557  		v.Reset(ssaop.Op386ANDL)
  8558  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8559  		v0.AddArg2(x, y)
  8560  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8561  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  8562  		v2.AuxInt = ssa.Int16ToAuxInt(32)
  8563  		v2.AddArg(y)
  8564  		v1.AddArg(v2)
  8565  		v.AddArg2(v0, v1)
  8566  		return true
  8567  	}
  8568  	// match: (Lsh16x16 <t> x y)
  8569  	// cond: ssa.ShiftIsBounded(v)
  8570  	// result: (SHLL <t> x y)
  8571  	for {
  8572  		t := v.Type
  8573  		x := v_0
  8574  		y := v_1
  8575  		if !(ssa.ShiftIsBounded(v)) {
  8576  			break
  8577  		}
  8578  		v.Reset(ssaop.Op386SHLL)
  8579  		v.Type = t
  8580  		v.AddArg2(x, y)
  8581  		return true
  8582  	}
  8583  	return false
  8584  }
  8585  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  8586  	v_1 := v.Args[1]
  8587  	v_0 := v.Args[0]
  8588  	b := v.Block
  8589  	// match: (Lsh16x32 <t> x y)
  8590  	// cond: !ssa.ShiftIsBounded(v)
  8591  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  8592  	for {
  8593  		t := v.Type
  8594  		x := v_0
  8595  		y := v_1
  8596  		if !(!ssa.ShiftIsBounded(v)) {
  8597  			break
  8598  		}
  8599  		v.Reset(ssaop.Op386ANDL)
  8600  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8601  		v0.AddArg2(x, y)
  8602  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8603  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  8604  		v2.AuxInt = ssa.Int32ToAuxInt(32)
  8605  		v2.AddArg(y)
  8606  		v1.AddArg(v2)
  8607  		v.AddArg2(v0, v1)
  8608  		return true
  8609  	}
  8610  	// match: (Lsh16x32 <t> x y)
  8611  	// cond: ssa.ShiftIsBounded(v)
  8612  	// result: (SHLL <t> x y)
  8613  	for {
  8614  		t := v.Type
  8615  		x := v_0
  8616  		y := v_1
  8617  		if !(ssa.ShiftIsBounded(v)) {
  8618  			break
  8619  		}
  8620  		v.Reset(ssaop.Op386SHLL)
  8621  		v.Type = t
  8622  		v.AddArg2(x, y)
  8623  		return true
  8624  	}
  8625  	return false
  8626  }
  8627  func rewriteValue_OpLsh16x64(v *ssa.Value) bool {
  8628  	v_1 := v.Args[1]
  8629  	v_0 := v.Args[0]
  8630  	// match: (Lsh16x64 x (Const64 [c]))
  8631  	// cond: uint64(c) < 16
  8632  	// result: (SHLLconst x [int32(c)])
  8633  	for {
  8634  		x := v_0
  8635  		if v_1.Op != ssaop.OpConst64 {
  8636  			break
  8637  		}
  8638  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8639  		if !(uint64(c) < 16) {
  8640  			break
  8641  		}
  8642  		v.Reset(ssaop.Op386SHLLconst)
  8643  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8644  		v.AddArg(x)
  8645  		return true
  8646  	}
  8647  	// match: (Lsh16x64 _ (Const64 [c]))
  8648  	// cond: uint64(c) >= 16
  8649  	// result: (Const16 [0])
  8650  	for {
  8651  		if v_1.Op != ssaop.OpConst64 {
  8652  			break
  8653  		}
  8654  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8655  		if !(uint64(c) >= 16) {
  8656  			break
  8657  		}
  8658  		v.Reset(ssaop.OpConst16)
  8659  		v.AuxInt = ssa.Int16ToAuxInt(0)
  8660  		return true
  8661  	}
  8662  	return false
  8663  }
  8664  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  8665  	v_1 := v.Args[1]
  8666  	v_0 := v.Args[0]
  8667  	b := v.Block
  8668  	// match: (Lsh16x8 <t> x y)
  8669  	// cond: !ssa.ShiftIsBounded(v)
  8670  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  8671  	for {
  8672  		t := v.Type
  8673  		x := v_0
  8674  		y := v_1
  8675  		if !(!ssa.ShiftIsBounded(v)) {
  8676  			break
  8677  		}
  8678  		v.Reset(ssaop.Op386ANDL)
  8679  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8680  		v0.AddArg2(x, y)
  8681  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8682  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  8683  		v2.AuxInt = ssa.Int8ToAuxInt(32)
  8684  		v2.AddArg(y)
  8685  		v1.AddArg(v2)
  8686  		v.AddArg2(v0, v1)
  8687  		return true
  8688  	}
  8689  	// match: (Lsh16x8 <t> x y)
  8690  	// cond: ssa.ShiftIsBounded(v)
  8691  	// result: (SHLL <t> x y)
  8692  	for {
  8693  		t := v.Type
  8694  		x := v_0
  8695  		y := v_1
  8696  		if !(ssa.ShiftIsBounded(v)) {
  8697  			break
  8698  		}
  8699  		v.Reset(ssaop.Op386SHLL)
  8700  		v.Type = t
  8701  		v.AddArg2(x, y)
  8702  		return true
  8703  	}
  8704  	return false
  8705  }
  8706  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  8707  	v_1 := v.Args[1]
  8708  	v_0 := v.Args[0]
  8709  	b := v.Block
  8710  	// match: (Lsh32x16 <t> x y)
  8711  	// cond: !ssa.ShiftIsBounded(v)
  8712  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  8713  	for {
  8714  		t := v.Type
  8715  		x := v_0
  8716  		y := v_1
  8717  		if !(!ssa.ShiftIsBounded(v)) {
  8718  			break
  8719  		}
  8720  		v.Reset(ssaop.Op386ANDL)
  8721  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8722  		v0.AddArg2(x, y)
  8723  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8724  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  8725  		v2.AuxInt = ssa.Int16ToAuxInt(32)
  8726  		v2.AddArg(y)
  8727  		v1.AddArg(v2)
  8728  		v.AddArg2(v0, v1)
  8729  		return true
  8730  	}
  8731  	// match: (Lsh32x16 <t> x y)
  8732  	// cond: ssa.ShiftIsBounded(v)
  8733  	// result: (SHLL <t> x y)
  8734  	for {
  8735  		t := v.Type
  8736  		x := v_0
  8737  		y := v_1
  8738  		if !(ssa.ShiftIsBounded(v)) {
  8739  			break
  8740  		}
  8741  		v.Reset(ssaop.Op386SHLL)
  8742  		v.Type = t
  8743  		v.AddArg2(x, y)
  8744  		return true
  8745  	}
  8746  	return false
  8747  }
  8748  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  8749  	v_1 := v.Args[1]
  8750  	v_0 := v.Args[0]
  8751  	b := v.Block
  8752  	// match: (Lsh32x32 <t> x y)
  8753  	// cond: !ssa.ShiftIsBounded(v)
  8754  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  8755  	for {
  8756  		t := v.Type
  8757  		x := v_0
  8758  		y := v_1
  8759  		if !(!ssa.ShiftIsBounded(v)) {
  8760  			break
  8761  		}
  8762  		v.Reset(ssaop.Op386ANDL)
  8763  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8764  		v0.AddArg2(x, y)
  8765  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8766  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  8767  		v2.AuxInt = ssa.Int32ToAuxInt(32)
  8768  		v2.AddArg(y)
  8769  		v1.AddArg(v2)
  8770  		v.AddArg2(v0, v1)
  8771  		return true
  8772  	}
  8773  	// match: (Lsh32x32 <t> x y)
  8774  	// cond: ssa.ShiftIsBounded(v)
  8775  	// result: (SHLL <t> x y)
  8776  	for {
  8777  		t := v.Type
  8778  		x := v_0
  8779  		y := v_1
  8780  		if !(ssa.ShiftIsBounded(v)) {
  8781  			break
  8782  		}
  8783  		v.Reset(ssaop.Op386SHLL)
  8784  		v.Type = t
  8785  		v.AddArg2(x, y)
  8786  		return true
  8787  	}
  8788  	return false
  8789  }
  8790  func rewriteValue_OpLsh32x64(v *ssa.Value) bool {
  8791  	v_1 := v.Args[1]
  8792  	v_0 := v.Args[0]
  8793  	// match: (Lsh32x64 x (Const64 [c]))
  8794  	// cond: uint64(c) < 32
  8795  	// result: (SHLLconst x [int32(c)])
  8796  	for {
  8797  		x := v_0
  8798  		if v_1.Op != ssaop.OpConst64 {
  8799  			break
  8800  		}
  8801  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8802  		if !(uint64(c) < 32) {
  8803  			break
  8804  		}
  8805  		v.Reset(ssaop.Op386SHLLconst)
  8806  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8807  		v.AddArg(x)
  8808  		return true
  8809  	}
  8810  	// match: (Lsh32x64 _ (Const64 [c]))
  8811  	// cond: uint64(c) >= 32
  8812  	// result: (Const32 [0])
  8813  	for {
  8814  		if v_1.Op != ssaop.OpConst64 {
  8815  			break
  8816  		}
  8817  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8818  		if !(uint64(c) >= 32) {
  8819  			break
  8820  		}
  8821  		v.Reset(ssaop.OpConst32)
  8822  		v.AuxInt = ssa.Int32ToAuxInt(0)
  8823  		return true
  8824  	}
  8825  	return false
  8826  }
  8827  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  8828  	v_1 := v.Args[1]
  8829  	v_0 := v.Args[0]
  8830  	b := v.Block
  8831  	// match: (Lsh32x8 <t> x y)
  8832  	// cond: !ssa.ShiftIsBounded(v)
  8833  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  8834  	for {
  8835  		t := v.Type
  8836  		x := v_0
  8837  		y := v_1
  8838  		if !(!ssa.ShiftIsBounded(v)) {
  8839  			break
  8840  		}
  8841  		v.Reset(ssaop.Op386ANDL)
  8842  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8843  		v0.AddArg2(x, y)
  8844  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8845  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  8846  		v2.AuxInt = ssa.Int8ToAuxInt(32)
  8847  		v2.AddArg(y)
  8848  		v1.AddArg(v2)
  8849  		v.AddArg2(v0, v1)
  8850  		return true
  8851  	}
  8852  	// match: (Lsh32x8 <t> x y)
  8853  	// cond: ssa.ShiftIsBounded(v)
  8854  	// result: (SHLL <t> x y)
  8855  	for {
  8856  		t := v.Type
  8857  		x := v_0
  8858  		y := v_1
  8859  		if !(ssa.ShiftIsBounded(v)) {
  8860  			break
  8861  		}
  8862  		v.Reset(ssaop.Op386SHLL)
  8863  		v.Type = t
  8864  		v.AddArg2(x, y)
  8865  		return true
  8866  	}
  8867  	return false
  8868  }
  8869  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  8870  	v_1 := v.Args[1]
  8871  	v_0 := v.Args[0]
  8872  	b := v.Block
  8873  	// match: (Lsh8x16 <t> x y)
  8874  	// cond: !ssa.ShiftIsBounded(v)
  8875  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  8876  	for {
  8877  		t := v.Type
  8878  		x := v_0
  8879  		y := v_1
  8880  		if !(!ssa.ShiftIsBounded(v)) {
  8881  			break
  8882  		}
  8883  		v.Reset(ssaop.Op386ANDL)
  8884  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8885  		v0.AddArg2(x, y)
  8886  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8887  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  8888  		v2.AuxInt = ssa.Int16ToAuxInt(32)
  8889  		v2.AddArg(y)
  8890  		v1.AddArg(v2)
  8891  		v.AddArg2(v0, v1)
  8892  		return true
  8893  	}
  8894  	// match: (Lsh8x16 <t> x y)
  8895  	// cond: ssa.ShiftIsBounded(v)
  8896  	// result: (SHLL <t> x y)
  8897  	for {
  8898  		t := v.Type
  8899  		x := v_0
  8900  		y := v_1
  8901  		if !(ssa.ShiftIsBounded(v)) {
  8902  			break
  8903  		}
  8904  		v.Reset(ssaop.Op386SHLL)
  8905  		v.Type = t
  8906  		v.AddArg2(x, y)
  8907  		return true
  8908  	}
  8909  	return false
  8910  }
  8911  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  8912  	v_1 := v.Args[1]
  8913  	v_0 := v.Args[0]
  8914  	b := v.Block
  8915  	// match: (Lsh8x32 <t> x y)
  8916  	// cond: !ssa.ShiftIsBounded(v)
  8917  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  8918  	for {
  8919  		t := v.Type
  8920  		x := v_0
  8921  		y := v_1
  8922  		if !(!ssa.ShiftIsBounded(v)) {
  8923  			break
  8924  		}
  8925  		v.Reset(ssaop.Op386ANDL)
  8926  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  8927  		v0.AddArg2(x, y)
  8928  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  8929  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  8930  		v2.AuxInt = ssa.Int32ToAuxInt(32)
  8931  		v2.AddArg(y)
  8932  		v1.AddArg(v2)
  8933  		v.AddArg2(v0, v1)
  8934  		return true
  8935  	}
  8936  	// match: (Lsh8x32 <t> x y)
  8937  	// cond: ssa.ShiftIsBounded(v)
  8938  	// result: (SHLL <t> x y)
  8939  	for {
  8940  		t := v.Type
  8941  		x := v_0
  8942  		y := v_1
  8943  		if !(ssa.ShiftIsBounded(v)) {
  8944  			break
  8945  		}
  8946  		v.Reset(ssaop.Op386SHLL)
  8947  		v.Type = t
  8948  		v.AddArg2(x, y)
  8949  		return true
  8950  	}
  8951  	return false
  8952  }
  8953  func rewriteValue_OpLsh8x64(v *ssa.Value) bool {
  8954  	v_1 := v.Args[1]
  8955  	v_0 := v.Args[0]
  8956  	// match: (Lsh8x64 x (Const64 [c]))
  8957  	// cond: uint64(c) < 8
  8958  	// result: (SHLLconst x [int32(c)])
  8959  	for {
  8960  		x := v_0
  8961  		if v_1.Op != ssaop.OpConst64 {
  8962  			break
  8963  		}
  8964  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8965  		if !(uint64(c) < 8) {
  8966  			break
  8967  		}
  8968  		v.Reset(ssaop.Op386SHLLconst)
  8969  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  8970  		v.AddArg(x)
  8971  		return true
  8972  	}
  8973  	// match: (Lsh8x64 _ (Const64 [c]))
  8974  	// cond: uint64(c) >= 8
  8975  	// result: (Const8 [0])
  8976  	for {
  8977  		if v_1.Op != ssaop.OpConst64 {
  8978  			break
  8979  		}
  8980  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  8981  		if !(uint64(c) >= 8) {
  8982  			break
  8983  		}
  8984  		v.Reset(ssaop.OpConst8)
  8985  		v.AuxInt = ssa.Int8ToAuxInt(0)
  8986  		return true
  8987  	}
  8988  	return false
  8989  }
  8990  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  8991  	v_1 := v.Args[1]
  8992  	v_0 := v.Args[0]
  8993  	b := v.Block
  8994  	// match: (Lsh8x8 <t> x y)
  8995  	// cond: !ssa.ShiftIsBounded(v)
  8996  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  8997  	for {
  8998  		t := v.Type
  8999  		x := v_0
  9000  		y := v_1
  9001  		if !(!ssa.ShiftIsBounded(v)) {
  9002  			break
  9003  		}
  9004  		v.Reset(ssaop.Op386ANDL)
  9005  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHLL, t)
  9006  		v0.AddArg2(x, y)
  9007  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9008  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  9009  		v2.AuxInt = ssa.Int8ToAuxInt(32)
  9010  		v2.AddArg(y)
  9011  		v1.AddArg(v2)
  9012  		v.AddArg2(v0, v1)
  9013  		return true
  9014  	}
  9015  	// match: (Lsh8x8 <t> x y)
  9016  	// cond: ssa.ShiftIsBounded(v)
  9017  	// result: (SHLL <t> x y)
  9018  	for {
  9019  		t := v.Type
  9020  		x := v_0
  9021  		y := v_1
  9022  		if !(ssa.ShiftIsBounded(v)) {
  9023  			break
  9024  		}
  9025  		v.Reset(ssaop.Op386SHLL)
  9026  		v.Type = t
  9027  		v.AddArg2(x, y)
  9028  		return true
  9029  	}
  9030  	return false
  9031  }
  9032  func rewriteValue_OpMod8(v *ssa.Value) bool {
  9033  	v_1 := v.Args[1]
  9034  	v_0 := v.Args[0]
  9035  	b := v.Block
  9036  	typ := &b.Func.Config.Types
  9037  	// match: (Mod8 x y)
  9038  	// result: (MODW (SignExt8to16 x) (SignExt8to16 y))
  9039  	for {
  9040  		x := v_0
  9041  		y := v_1
  9042  		v.Reset(ssaop.Op386MODW)
  9043  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to16, typ.Int16)
  9044  		v0.AddArg(x)
  9045  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to16, typ.Int16)
  9046  		v1.AddArg(y)
  9047  		v.AddArg2(v0, v1)
  9048  		return true
  9049  	}
  9050  }
  9051  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  9052  	v_1 := v.Args[1]
  9053  	v_0 := v.Args[0]
  9054  	b := v.Block
  9055  	typ := &b.Func.Config.Types
  9056  	// match: (Mod8u x y)
  9057  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9058  	for {
  9059  		x := v_0
  9060  		y := v_1
  9061  		v.Reset(ssaop.Op386MODWU)
  9062  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to16, typ.UInt16)
  9063  		v0.AddArg(x)
  9064  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to16, typ.UInt16)
  9065  		v1.AddArg(y)
  9066  		v.AddArg2(v0, v1)
  9067  		return true
  9068  	}
  9069  }
  9070  func rewriteValue_OpMove(v *ssa.Value) bool {
  9071  	v_2 := v.Args[2]
  9072  	v_1 := v.Args[1]
  9073  	v_0 := v.Args[0]
  9074  	b := v.Block
  9075  	typ := &b.Func.Config.Types
  9076  	// match: (Move [0] _ _ mem)
  9077  	// result: mem
  9078  	for {
  9079  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  9080  			break
  9081  		}
  9082  		mem := v_2
  9083  		v.CopyOf(mem)
  9084  		return true
  9085  	}
  9086  	// match: (Move [1] dst src mem)
  9087  	// result: (MOVBstore dst (MOVBload src mem) mem)
  9088  	for {
  9089  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  9090  			break
  9091  		}
  9092  		dst := v_0
  9093  		src := v_1
  9094  		mem := v_2
  9095  		v.Reset(ssaop.Op386MOVBstore)
  9096  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVBload, typ.UInt8)
  9097  		v0.AddArg2(src, mem)
  9098  		v.AddArg3(dst, v0, mem)
  9099  		return true
  9100  	}
  9101  	// match: (Move [2] dst src mem)
  9102  	// result: (MOVWstore dst (MOVWload src mem) mem)
  9103  	for {
  9104  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  9105  			break
  9106  		}
  9107  		dst := v_0
  9108  		src := v_1
  9109  		mem := v_2
  9110  		v.Reset(ssaop.Op386MOVWstore)
  9111  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVWload, typ.UInt16)
  9112  		v0.AddArg2(src, mem)
  9113  		v.AddArg3(dst, v0, mem)
  9114  		return true
  9115  	}
  9116  	// match: (Move [4] dst src mem)
  9117  	// result: (MOVLstore dst (MOVLload src mem) mem)
  9118  	for {
  9119  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  9120  			break
  9121  		}
  9122  		dst := v_0
  9123  		src := v_1
  9124  		mem := v_2
  9125  		v.Reset(ssaop.Op386MOVLstore)
  9126  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9127  		v0.AddArg2(src, mem)
  9128  		v.AddArg3(dst, v0, mem)
  9129  		return true
  9130  	}
  9131  	// match: (Move [3] dst src mem)
  9132  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) (MOVWstore dst (MOVWload src mem) mem))
  9133  	for {
  9134  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  9135  			break
  9136  		}
  9137  		dst := v_0
  9138  		src := v_1
  9139  		mem := v_2
  9140  		v.Reset(ssaop.Op386MOVBstore)
  9141  		v.AuxInt = ssa.Int32ToAuxInt(2)
  9142  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVBload, typ.UInt8)
  9143  		v0.AuxInt = ssa.Int32ToAuxInt(2)
  9144  		v0.AddArg2(src, mem)
  9145  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVWstore, types.TypeMem)
  9146  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVWload, typ.UInt16)
  9147  		v2.AddArg2(src, mem)
  9148  		v1.AddArg3(dst, v2, mem)
  9149  		v.AddArg3(dst, v0, v1)
  9150  		return true
  9151  	}
  9152  	// match: (Move [5] dst src mem)
  9153  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9154  	for {
  9155  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  9156  			break
  9157  		}
  9158  		dst := v_0
  9159  		src := v_1
  9160  		mem := v_2
  9161  		v.Reset(ssaop.Op386MOVBstore)
  9162  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9163  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVBload, typ.UInt8)
  9164  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9165  		v0.AddArg2(src, mem)
  9166  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstore, types.TypeMem)
  9167  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9168  		v2.AddArg2(src, mem)
  9169  		v1.AddArg3(dst, v2, mem)
  9170  		v.AddArg3(dst, v0, v1)
  9171  		return true
  9172  	}
  9173  	// match: (Move [6] dst src mem)
  9174  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9175  	for {
  9176  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  9177  			break
  9178  		}
  9179  		dst := v_0
  9180  		src := v_1
  9181  		mem := v_2
  9182  		v.Reset(ssaop.Op386MOVWstore)
  9183  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9184  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVWload, typ.UInt16)
  9185  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9186  		v0.AddArg2(src, mem)
  9187  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstore, types.TypeMem)
  9188  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9189  		v2.AddArg2(src, mem)
  9190  		v1.AddArg3(dst, v2, mem)
  9191  		v.AddArg3(dst, v0, v1)
  9192  		return true
  9193  	}
  9194  	// match: (Move [7] dst src mem)
  9195  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9196  	for {
  9197  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  9198  			break
  9199  		}
  9200  		dst := v_0
  9201  		src := v_1
  9202  		mem := v_2
  9203  		v.Reset(ssaop.Op386MOVLstore)
  9204  		v.AuxInt = ssa.Int32ToAuxInt(3)
  9205  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9206  		v0.AuxInt = ssa.Int32ToAuxInt(3)
  9207  		v0.AddArg2(src, mem)
  9208  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstore, types.TypeMem)
  9209  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9210  		v2.AddArg2(src, mem)
  9211  		v1.AddArg3(dst, v2, mem)
  9212  		v.AddArg3(dst, v0, v1)
  9213  		return true
  9214  	}
  9215  	// match: (Move [8] dst src mem)
  9216  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9217  	for {
  9218  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  9219  			break
  9220  		}
  9221  		dst := v_0
  9222  		src := v_1
  9223  		mem := v_2
  9224  		v.Reset(ssaop.Op386MOVLstore)
  9225  		v.AuxInt = ssa.Int32ToAuxInt(4)
  9226  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9227  		v0.AuxInt = ssa.Int32ToAuxInt(4)
  9228  		v0.AddArg2(src, mem)
  9229  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstore, types.TypeMem)
  9230  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9231  		v2.AddArg2(src, mem)
  9232  		v1.AddArg3(dst, v2, mem)
  9233  		v.AddArg3(dst, v0, v1)
  9234  		return true
  9235  	}
  9236  	// match: (Move [s] dst src mem)
  9237  	// cond: s > 8 && s%4 != 0
  9238  	// 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))
  9239  	for {
  9240  		s := ssa.AuxIntToInt64(v.AuxInt)
  9241  		dst := v_0
  9242  		src := v_1
  9243  		mem := v_2
  9244  		if !(s > 8 && s%4 != 0) {
  9245  			break
  9246  		}
  9247  		v.Reset(ssaop.OpMove)
  9248  		v.AuxInt = ssa.Int64ToAuxInt(s - s%4)
  9249  		v0 := b.NewValue0(v.Pos, ssaop.Op386ADDLconst, dst.Type)
  9250  		v0.AuxInt = ssa.Int32ToAuxInt(int32(s % 4))
  9251  		v0.AddArg(dst)
  9252  		v1 := b.NewValue0(v.Pos, ssaop.Op386ADDLconst, src.Type)
  9253  		v1.AuxInt = ssa.Int32ToAuxInt(int32(s % 4))
  9254  		v1.AddArg(src)
  9255  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVLstore, types.TypeMem)
  9256  		v3 := b.NewValue0(v.Pos, ssaop.Op386MOVLload, typ.UInt32)
  9257  		v3.AddArg2(src, mem)
  9258  		v2.AddArg3(dst, v3, mem)
  9259  		v.AddArg3(v0, v1, v2)
  9260  		return true
  9261  	}
  9262  	// match: (Move [s] dst src mem)
  9263  	// cond: s > 8 && s <= 4*128 && s%4 == 0 && ssa.LogLargeCopyValue(v, s)
  9264  	// result: (DUFFCOPY [10*(128-s/4)] dst src mem)
  9265  	for {
  9266  		s := ssa.AuxIntToInt64(v.AuxInt)
  9267  		dst := v_0
  9268  		src := v_1
  9269  		mem := v_2
  9270  		if !(s > 8 && s <= 4*128 && s%4 == 0 && ssa.LogLargeCopyValue(v, s)) {
  9271  			break
  9272  		}
  9273  		v.Reset(ssaop.Op386DUFFCOPY)
  9274  		v.AuxInt = ssa.Int64ToAuxInt(10 * (128 - s/4))
  9275  		v.AddArg3(dst, src, mem)
  9276  		return true
  9277  	}
  9278  	// match: (Move [s] dst src mem)
  9279  	// cond: s > 4*128 && s%4 == 0 && ssa.LogLargeCopyValue(v, s)
  9280  	// result: (REPMOVSL dst src (MOVLconst [int32(s/4)]) mem)
  9281  	for {
  9282  		s := ssa.AuxIntToInt64(v.AuxInt)
  9283  		dst := v_0
  9284  		src := v_1
  9285  		mem := v_2
  9286  		if !(s > 4*128 && s%4 == 0 && ssa.LogLargeCopyValue(v, s)) {
  9287  			break
  9288  		}
  9289  		v.Reset(ssaop.Op386REPMOVSL)
  9290  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLconst, typ.UInt32)
  9291  		v0.AuxInt = ssa.Int32ToAuxInt(int32(s / 4))
  9292  		v.AddArg4(dst, src, v0, mem)
  9293  		return true
  9294  	}
  9295  	return false
  9296  }
  9297  func rewriteValue_OpNeg32F(v *ssa.Value) bool {
  9298  	v_0 := v.Args[0]
  9299  	b := v.Block
  9300  	typ := &b.Func.Config.Types
  9301  	// match: (Neg32F x)
  9302  	// result: (PXOR x (MOVSSconst <typ.Float32> [float32(math.Copysign(0, -1))]))
  9303  	for {
  9304  		x := v_0
  9305  		v.Reset(ssaop.Op386PXOR)
  9306  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVSSconst, typ.Float32)
  9307  		v0.AuxInt = ssa.Float32ToAuxInt(float32(math.Copysign(0, -1)))
  9308  		v.AddArg2(x, v0)
  9309  		return true
  9310  	}
  9311  }
  9312  func rewriteValue_OpNeg64F(v *ssa.Value) bool {
  9313  	v_0 := v.Args[0]
  9314  	b := v.Block
  9315  	typ := &b.Func.Config.Types
  9316  	// match: (Neg64F x)
  9317  	// result: (PXOR x (MOVSDconst <typ.Float64> [math.Copysign(0, -1)]))
  9318  	for {
  9319  		x := v_0
  9320  		v.Reset(ssaop.Op386PXOR)
  9321  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVSDconst, typ.Float64)
  9322  		v0.AuxInt = ssa.Float64ToAuxInt(math.Copysign(0, -1))
  9323  		v.AddArg2(x, v0)
  9324  		return true
  9325  	}
  9326  }
  9327  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  9328  	v_1 := v.Args[1]
  9329  	v_0 := v.Args[0]
  9330  	b := v.Block
  9331  	// match: (Neq16 x y)
  9332  	// result: (SETNE (CMPW x y))
  9333  	for {
  9334  		x := v_0
  9335  		y := v_1
  9336  		v.Reset(ssaop.Op386SETNE)
  9337  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPW, types.TypeFlags)
  9338  		v0.AddArg2(x, y)
  9339  		v.AddArg(v0)
  9340  		return true
  9341  	}
  9342  }
  9343  func rewriteValue_OpNeq32(v *ssa.Value) bool {
  9344  	v_1 := v.Args[1]
  9345  	v_0 := v.Args[0]
  9346  	b := v.Block
  9347  	// match: (Neq32 x y)
  9348  	// result: (SETNE (CMPL x y))
  9349  	for {
  9350  		x := v_0
  9351  		y := v_1
  9352  		v.Reset(ssaop.Op386SETNE)
  9353  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  9354  		v0.AddArg2(x, y)
  9355  		v.AddArg(v0)
  9356  		return true
  9357  	}
  9358  }
  9359  func rewriteValue_OpNeq32F(v *ssa.Value) bool {
  9360  	v_1 := v.Args[1]
  9361  	v_0 := v.Args[0]
  9362  	b := v.Block
  9363  	// match: (Neq32F x y)
  9364  	// result: (SETNEF (UCOMISS x y))
  9365  	for {
  9366  		x := v_0
  9367  		y := v_1
  9368  		v.Reset(ssaop.Op386SETNEF)
  9369  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISS, types.TypeFlags)
  9370  		v0.AddArg2(x, y)
  9371  		v.AddArg(v0)
  9372  		return true
  9373  	}
  9374  }
  9375  func rewriteValue_OpNeq64F(v *ssa.Value) bool {
  9376  	v_1 := v.Args[1]
  9377  	v_0 := v.Args[0]
  9378  	b := v.Block
  9379  	// match: (Neq64F x y)
  9380  	// result: (SETNEF (UCOMISD x y))
  9381  	for {
  9382  		x := v_0
  9383  		y := v_1
  9384  		v.Reset(ssaop.Op386SETNEF)
  9385  		v0 := b.NewValue0(v.Pos, ssaop.Op386UCOMISD, types.TypeFlags)
  9386  		v0.AddArg2(x, y)
  9387  		v.AddArg(v0)
  9388  		return true
  9389  	}
  9390  }
  9391  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  9392  	v_1 := v.Args[1]
  9393  	v_0 := v.Args[0]
  9394  	b := v.Block
  9395  	// match: (Neq8 x y)
  9396  	// result: (SETNE (CMPB x y))
  9397  	for {
  9398  		x := v_0
  9399  		y := v_1
  9400  		v.Reset(ssaop.Op386SETNE)
  9401  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  9402  		v0.AddArg2(x, y)
  9403  		v.AddArg(v0)
  9404  		return true
  9405  	}
  9406  }
  9407  func rewriteValue_OpNeqB(v *ssa.Value) bool {
  9408  	v_1 := v.Args[1]
  9409  	v_0 := v.Args[0]
  9410  	b := v.Block
  9411  	// match: (NeqB x y)
  9412  	// result: (SETNE (CMPB x y))
  9413  	for {
  9414  		x := v_0
  9415  		y := v_1
  9416  		v.Reset(ssaop.Op386SETNE)
  9417  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPB, types.TypeFlags)
  9418  		v0.AddArg2(x, y)
  9419  		v.AddArg(v0)
  9420  		return true
  9421  	}
  9422  }
  9423  func rewriteValue_OpNeqPtr(v *ssa.Value) bool {
  9424  	v_1 := v.Args[1]
  9425  	v_0 := v.Args[0]
  9426  	b := v.Block
  9427  	// match: (NeqPtr x y)
  9428  	// result: (SETNE (CMPL x y))
  9429  	for {
  9430  		x := v_0
  9431  		y := v_1
  9432  		v.Reset(ssaop.Op386SETNE)
  9433  		v0 := b.NewValue0(v.Pos, ssaop.Op386CMPL, types.TypeFlags)
  9434  		v0.AddArg2(x, y)
  9435  		v.AddArg(v0)
  9436  		return true
  9437  	}
  9438  }
  9439  func rewriteValue_OpNot(v *ssa.Value) bool {
  9440  	v_0 := v.Args[0]
  9441  	// match: (Not x)
  9442  	// result: (XORLconst [1] x)
  9443  	for {
  9444  		x := v_0
  9445  		v.Reset(ssaop.Op386XORLconst)
  9446  		v.AuxInt = ssa.Int32ToAuxInt(1)
  9447  		v.AddArg(x)
  9448  		return true
  9449  	}
  9450  }
  9451  func rewriteValue_OpOffPtr(v *ssa.Value) bool {
  9452  	v_0 := v.Args[0]
  9453  	// match: (OffPtr [off] ptr)
  9454  	// result: (ADDLconst [int32(off)] ptr)
  9455  	for {
  9456  		off := ssa.AuxIntToInt64(v.AuxInt)
  9457  		ptr := v_0
  9458  		v.Reset(ssaop.Op386ADDLconst)
  9459  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  9460  		v.AddArg(ptr)
  9461  		return true
  9462  	}
  9463  }
  9464  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
  9465  	v_1 := v.Args[1]
  9466  	v_0 := v.Args[0]
  9467  	b := v.Block
  9468  	// match: (Rsh16Ux16 <t> x y)
  9469  	// cond: !ssa.ShiftIsBounded(v)
  9470  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
  9471  	for {
  9472  		t := v.Type
  9473  		x := v_0
  9474  		y := v_1
  9475  		if !(!ssa.ShiftIsBounded(v)) {
  9476  			break
  9477  		}
  9478  		v.Reset(ssaop.Op386ANDL)
  9479  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRW, t)
  9480  		v0.AddArg2(x, y)
  9481  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9482  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  9483  		v2.AuxInt = ssa.Int16ToAuxInt(16)
  9484  		v2.AddArg(y)
  9485  		v1.AddArg(v2)
  9486  		v.AddArg2(v0, v1)
  9487  		return true
  9488  	}
  9489  	// match: (Rsh16Ux16 <t> x y)
  9490  	// cond: ssa.ShiftIsBounded(v)
  9491  	// result: (SHRW <t> x y)
  9492  	for {
  9493  		t := v.Type
  9494  		x := v_0
  9495  		y := v_1
  9496  		if !(ssa.ShiftIsBounded(v)) {
  9497  			break
  9498  		}
  9499  		v.Reset(ssaop.Op386SHRW)
  9500  		v.Type = t
  9501  		v.AddArg2(x, y)
  9502  		return true
  9503  	}
  9504  	return false
  9505  }
  9506  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
  9507  	v_1 := v.Args[1]
  9508  	v_0 := v.Args[0]
  9509  	b := v.Block
  9510  	// match: (Rsh16Ux32 <t> x y)
  9511  	// cond: !ssa.ShiftIsBounded(v)
  9512  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
  9513  	for {
  9514  		t := v.Type
  9515  		x := v_0
  9516  		y := v_1
  9517  		if !(!ssa.ShiftIsBounded(v)) {
  9518  			break
  9519  		}
  9520  		v.Reset(ssaop.Op386ANDL)
  9521  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRW, t)
  9522  		v0.AddArg2(x, y)
  9523  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9524  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  9525  		v2.AuxInt = ssa.Int32ToAuxInt(16)
  9526  		v2.AddArg(y)
  9527  		v1.AddArg(v2)
  9528  		v.AddArg2(v0, v1)
  9529  		return true
  9530  	}
  9531  	// match: (Rsh16Ux32 <t> x y)
  9532  	// cond: ssa.ShiftIsBounded(v)
  9533  	// result: (SHRW <t> x y)
  9534  	for {
  9535  		t := v.Type
  9536  		x := v_0
  9537  		y := v_1
  9538  		if !(ssa.ShiftIsBounded(v)) {
  9539  			break
  9540  		}
  9541  		v.Reset(ssaop.Op386SHRW)
  9542  		v.Type = t
  9543  		v.AddArg2(x, y)
  9544  		return true
  9545  	}
  9546  	return false
  9547  }
  9548  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
  9549  	v_1 := v.Args[1]
  9550  	v_0 := v.Args[0]
  9551  	// match: (Rsh16Ux64 x (Const64 [c]))
  9552  	// cond: uint64(c) < 16
  9553  	// result: (SHRWconst x [int16(c)])
  9554  	for {
  9555  		x := v_0
  9556  		if v_1.Op != ssaop.OpConst64 {
  9557  			break
  9558  		}
  9559  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9560  		if !(uint64(c) < 16) {
  9561  			break
  9562  		}
  9563  		v.Reset(ssaop.Op386SHRWconst)
  9564  		v.AuxInt = ssa.Int16ToAuxInt(int16(c))
  9565  		v.AddArg(x)
  9566  		return true
  9567  	}
  9568  	// match: (Rsh16Ux64 _ (Const64 [c]))
  9569  	// cond: uint64(c) >= 16
  9570  	// result: (Const16 [0])
  9571  	for {
  9572  		if v_1.Op != ssaop.OpConst64 {
  9573  			break
  9574  		}
  9575  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9576  		if !(uint64(c) >= 16) {
  9577  			break
  9578  		}
  9579  		v.Reset(ssaop.OpConst16)
  9580  		v.AuxInt = ssa.Int16ToAuxInt(0)
  9581  		return true
  9582  	}
  9583  	return false
  9584  }
  9585  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
  9586  	v_1 := v.Args[1]
  9587  	v_0 := v.Args[0]
  9588  	b := v.Block
  9589  	// match: (Rsh16Ux8 <t> x y)
  9590  	// cond: !ssa.ShiftIsBounded(v)
  9591  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
  9592  	for {
  9593  		t := v.Type
  9594  		x := v_0
  9595  		y := v_1
  9596  		if !(!ssa.ShiftIsBounded(v)) {
  9597  			break
  9598  		}
  9599  		v.Reset(ssaop.Op386ANDL)
  9600  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRW, t)
  9601  		v0.AddArg2(x, y)
  9602  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9603  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  9604  		v2.AuxInt = ssa.Int8ToAuxInt(16)
  9605  		v2.AddArg(y)
  9606  		v1.AddArg(v2)
  9607  		v.AddArg2(v0, v1)
  9608  		return true
  9609  	}
  9610  	// match: (Rsh16Ux8 <t> x y)
  9611  	// cond: ssa.ShiftIsBounded(v)
  9612  	// result: (SHRW <t> x y)
  9613  	for {
  9614  		t := v.Type
  9615  		x := v_0
  9616  		y := v_1
  9617  		if !(ssa.ShiftIsBounded(v)) {
  9618  			break
  9619  		}
  9620  		v.Reset(ssaop.Op386SHRW)
  9621  		v.Type = t
  9622  		v.AddArg2(x, y)
  9623  		return true
  9624  	}
  9625  	return false
  9626  }
  9627  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
  9628  	v_1 := v.Args[1]
  9629  	v_0 := v.Args[0]
  9630  	b := v.Block
  9631  	// match: (Rsh16x16 <t> x y)
  9632  	// cond: !ssa.ShiftIsBounded(v)
  9633  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
  9634  	for {
  9635  		t := v.Type
  9636  		x := v_0
  9637  		y := v_1
  9638  		if !(!ssa.ShiftIsBounded(v)) {
  9639  			break
  9640  		}
  9641  		v.Reset(ssaop.Op386SARW)
  9642  		v.Type = t
  9643  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
  9644  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
  9645  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
  9646  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  9647  		v3.AuxInt = ssa.Int16ToAuxInt(16)
  9648  		v3.AddArg(y)
  9649  		v2.AddArg(v3)
  9650  		v1.AddArg(v2)
  9651  		v0.AddArg2(y, v1)
  9652  		v.AddArg2(x, v0)
  9653  		return true
  9654  	}
  9655  	// match: (Rsh16x16 <t> x y)
  9656  	// cond: ssa.ShiftIsBounded(v)
  9657  	// result: (SARW x y)
  9658  	for {
  9659  		x := v_0
  9660  		y := v_1
  9661  		if !(ssa.ShiftIsBounded(v)) {
  9662  			break
  9663  		}
  9664  		v.Reset(ssaop.Op386SARW)
  9665  		v.AddArg2(x, y)
  9666  		return true
  9667  	}
  9668  	return false
  9669  }
  9670  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
  9671  	v_1 := v.Args[1]
  9672  	v_0 := v.Args[0]
  9673  	b := v.Block
  9674  	// match: (Rsh16x32 <t> x y)
  9675  	// cond: !ssa.ShiftIsBounded(v)
  9676  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
  9677  	for {
  9678  		t := v.Type
  9679  		x := v_0
  9680  		y := v_1
  9681  		if !(!ssa.ShiftIsBounded(v)) {
  9682  			break
  9683  		}
  9684  		v.Reset(ssaop.Op386SARW)
  9685  		v.Type = t
  9686  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
  9687  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
  9688  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
  9689  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  9690  		v3.AuxInt = ssa.Int32ToAuxInt(16)
  9691  		v3.AddArg(y)
  9692  		v2.AddArg(v3)
  9693  		v1.AddArg(v2)
  9694  		v0.AddArg2(y, v1)
  9695  		v.AddArg2(x, v0)
  9696  		return true
  9697  	}
  9698  	// match: (Rsh16x32 <t> x y)
  9699  	// cond: ssa.ShiftIsBounded(v)
  9700  	// result: (SARW x y)
  9701  	for {
  9702  		x := v_0
  9703  		y := v_1
  9704  		if !(ssa.ShiftIsBounded(v)) {
  9705  			break
  9706  		}
  9707  		v.Reset(ssaop.Op386SARW)
  9708  		v.AddArg2(x, y)
  9709  		return true
  9710  	}
  9711  	return false
  9712  }
  9713  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
  9714  	v_1 := v.Args[1]
  9715  	v_0 := v.Args[0]
  9716  	// match: (Rsh16x64 x (Const64 [c]))
  9717  	// cond: uint64(c) < 16
  9718  	// result: (SARWconst x [int16(c)])
  9719  	for {
  9720  		x := v_0
  9721  		if v_1.Op != ssaop.OpConst64 {
  9722  			break
  9723  		}
  9724  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9725  		if !(uint64(c) < 16) {
  9726  			break
  9727  		}
  9728  		v.Reset(ssaop.Op386SARWconst)
  9729  		v.AuxInt = ssa.Int16ToAuxInt(int16(c))
  9730  		v.AddArg(x)
  9731  		return true
  9732  	}
  9733  	// match: (Rsh16x64 x (Const64 [c]))
  9734  	// cond: uint64(c) >= 16
  9735  	// result: (SARWconst x [15])
  9736  	for {
  9737  		x := v_0
  9738  		if v_1.Op != ssaop.OpConst64 {
  9739  			break
  9740  		}
  9741  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9742  		if !(uint64(c) >= 16) {
  9743  			break
  9744  		}
  9745  		v.Reset(ssaop.Op386SARWconst)
  9746  		v.AuxInt = ssa.Int16ToAuxInt(15)
  9747  		v.AddArg(x)
  9748  		return true
  9749  	}
  9750  	return false
  9751  }
  9752  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
  9753  	v_1 := v.Args[1]
  9754  	v_0 := v.Args[0]
  9755  	b := v.Block
  9756  	// match: (Rsh16x8 <t> x y)
  9757  	// cond: !ssa.ShiftIsBounded(v)
  9758  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
  9759  	for {
  9760  		t := v.Type
  9761  		x := v_0
  9762  		y := v_1
  9763  		if !(!ssa.ShiftIsBounded(v)) {
  9764  			break
  9765  		}
  9766  		v.Reset(ssaop.Op386SARW)
  9767  		v.Type = t
  9768  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
  9769  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
  9770  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
  9771  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  9772  		v3.AuxInt = ssa.Int8ToAuxInt(16)
  9773  		v3.AddArg(y)
  9774  		v2.AddArg(v3)
  9775  		v1.AddArg(v2)
  9776  		v0.AddArg2(y, v1)
  9777  		v.AddArg2(x, v0)
  9778  		return true
  9779  	}
  9780  	// match: (Rsh16x8 <t> x y)
  9781  	// cond: ssa.ShiftIsBounded(v)
  9782  	// result: (SARW x y)
  9783  	for {
  9784  		x := v_0
  9785  		y := v_1
  9786  		if !(ssa.ShiftIsBounded(v)) {
  9787  			break
  9788  		}
  9789  		v.Reset(ssaop.Op386SARW)
  9790  		v.AddArg2(x, y)
  9791  		return true
  9792  	}
  9793  	return false
  9794  }
  9795  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
  9796  	v_1 := v.Args[1]
  9797  	v_0 := v.Args[0]
  9798  	b := v.Block
  9799  	// match: (Rsh32Ux16 <t> x y)
  9800  	// cond: !ssa.ShiftIsBounded(v)
  9801  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9802  	for {
  9803  		t := v.Type
  9804  		x := v_0
  9805  		y := v_1
  9806  		if !(!ssa.ShiftIsBounded(v)) {
  9807  			break
  9808  		}
  9809  		v.Reset(ssaop.Op386ANDL)
  9810  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRL, t)
  9811  		v0.AddArg2(x, y)
  9812  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9813  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  9814  		v2.AuxInt = ssa.Int16ToAuxInt(32)
  9815  		v2.AddArg(y)
  9816  		v1.AddArg(v2)
  9817  		v.AddArg2(v0, v1)
  9818  		return true
  9819  	}
  9820  	// match: (Rsh32Ux16 <t> x y)
  9821  	// cond: ssa.ShiftIsBounded(v)
  9822  	// result: (SHRL <t> x y)
  9823  	for {
  9824  		t := v.Type
  9825  		x := v_0
  9826  		y := v_1
  9827  		if !(ssa.ShiftIsBounded(v)) {
  9828  			break
  9829  		}
  9830  		v.Reset(ssaop.Op386SHRL)
  9831  		v.Type = t
  9832  		v.AddArg2(x, y)
  9833  		return true
  9834  	}
  9835  	return false
  9836  }
  9837  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
  9838  	v_1 := v.Args[1]
  9839  	v_0 := v.Args[0]
  9840  	b := v.Block
  9841  	// match: (Rsh32Ux32 <t> x y)
  9842  	// cond: !ssa.ShiftIsBounded(v)
  9843  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9844  	for {
  9845  		t := v.Type
  9846  		x := v_0
  9847  		y := v_1
  9848  		if !(!ssa.ShiftIsBounded(v)) {
  9849  			break
  9850  		}
  9851  		v.Reset(ssaop.Op386ANDL)
  9852  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRL, t)
  9853  		v0.AddArg2(x, y)
  9854  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9855  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
  9856  		v2.AuxInt = ssa.Int32ToAuxInt(32)
  9857  		v2.AddArg(y)
  9858  		v1.AddArg(v2)
  9859  		v.AddArg2(v0, v1)
  9860  		return true
  9861  	}
  9862  	// match: (Rsh32Ux32 <t> x y)
  9863  	// cond: ssa.ShiftIsBounded(v)
  9864  	// result: (SHRL <t> x y)
  9865  	for {
  9866  		t := v.Type
  9867  		x := v_0
  9868  		y := v_1
  9869  		if !(ssa.ShiftIsBounded(v)) {
  9870  			break
  9871  		}
  9872  		v.Reset(ssaop.Op386SHRL)
  9873  		v.Type = t
  9874  		v.AddArg2(x, y)
  9875  		return true
  9876  	}
  9877  	return false
  9878  }
  9879  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
  9880  	v_1 := v.Args[1]
  9881  	v_0 := v.Args[0]
  9882  	// match: (Rsh32Ux64 x (Const64 [c]))
  9883  	// cond: uint64(c) < 32
  9884  	// result: (SHRLconst x [int32(c)])
  9885  	for {
  9886  		x := v_0
  9887  		if v_1.Op != ssaop.OpConst64 {
  9888  			break
  9889  		}
  9890  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9891  		if !(uint64(c) < 32) {
  9892  			break
  9893  		}
  9894  		v.Reset(ssaop.Op386SHRLconst)
  9895  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
  9896  		v.AddArg(x)
  9897  		return true
  9898  	}
  9899  	// match: (Rsh32Ux64 _ (Const64 [c]))
  9900  	// cond: uint64(c) >= 32
  9901  	// result: (Const32 [0])
  9902  	for {
  9903  		if v_1.Op != ssaop.OpConst64 {
  9904  			break
  9905  		}
  9906  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  9907  		if !(uint64(c) >= 32) {
  9908  			break
  9909  		}
  9910  		v.Reset(ssaop.OpConst32)
  9911  		v.AuxInt = ssa.Int32ToAuxInt(0)
  9912  		return true
  9913  	}
  9914  	return false
  9915  }
  9916  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
  9917  	v_1 := v.Args[1]
  9918  	v_0 := v.Args[0]
  9919  	b := v.Block
  9920  	// match: (Rsh32Ux8 <t> x y)
  9921  	// cond: !ssa.ShiftIsBounded(v)
  9922  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9923  	for {
  9924  		t := v.Type
  9925  		x := v_0
  9926  		y := v_1
  9927  		if !(!ssa.ShiftIsBounded(v)) {
  9928  			break
  9929  		}
  9930  		v.Reset(ssaop.Op386ANDL)
  9931  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRL, t)
  9932  		v0.AddArg2(x, y)
  9933  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
  9934  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
  9935  		v2.AuxInt = ssa.Int8ToAuxInt(32)
  9936  		v2.AddArg(y)
  9937  		v1.AddArg(v2)
  9938  		v.AddArg2(v0, v1)
  9939  		return true
  9940  	}
  9941  	// match: (Rsh32Ux8 <t> x y)
  9942  	// cond: ssa.ShiftIsBounded(v)
  9943  	// result: (SHRL <t> x y)
  9944  	for {
  9945  		t := v.Type
  9946  		x := v_0
  9947  		y := v_1
  9948  		if !(ssa.ShiftIsBounded(v)) {
  9949  			break
  9950  		}
  9951  		v.Reset(ssaop.Op386SHRL)
  9952  		v.Type = t
  9953  		v.AddArg2(x, y)
  9954  		return true
  9955  	}
  9956  	return false
  9957  }
  9958  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
  9959  	v_1 := v.Args[1]
  9960  	v_0 := v.Args[0]
  9961  	b := v.Block
  9962  	// match: (Rsh32x16 <t> x y)
  9963  	// cond: !ssa.ShiftIsBounded(v)
  9964  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
  9965  	for {
  9966  		t := v.Type
  9967  		x := v_0
  9968  		y := v_1
  9969  		if !(!ssa.ShiftIsBounded(v)) {
  9970  			break
  9971  		}
  9972  		v.Reset(ssaop.Op386SARL)
  9973  		v.Type = t
  9974  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
  9975  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
  9976  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
  9977  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
  9978  		v3.AuxInt = ssa.Int16ToAuxInt(32)
  9979  		v3.AddArg(y)
  9980  		v2.AddArg(v3)
  9981  		v1.AddArg(v2)
  9982  		v0.AddArg2(y, v1)
  9983  		v.AddArg2(x, v0)
  9984  		return true
  9985  	}
  9986  	// match: (Rsh32x16 <t> x y)
  9987  	// cond: ssa.ShiftIsBounded(v)
  9988  	// result: (SARL x y)
  9989  	for {
  9990  		x := v_0
  9991  		y := v_1
  9992  		if !(ssa.ShiftIsBounded(v)) {
  9993  			break
  9994  		}
  9995  		v.Reset(ssaop.Op386SARL)
  9996  		v.AddArg2(x, y)
  9997  		return true
  9998  	}
  9999  	return false
 10000  }
 10001  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
 10002  	v_1 := v.Args[1]
 10003  	v_0 := v.Args[0]
 10004  	b := v.Block
 10005  	// match: (Rsh32x32 <t> x y)
 10006  	// cond: !ssa.ShiftIsBounded(v)
 10007  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 10008  	for {
 10009  		t := v.Type
 10010  		x := v_0
 10011  		y := v_1
 10012  		if !(!ssa.ShiftIsBounded(v)) {
 10013  			break
 10014  		}
 10015  		v.Reset(ssaop.Op386SARL)
 10016  		v.Type = t
 10017  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
 10018  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
 10019  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
 10020  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
 10021  		v3.AuxInt = ssa.Int32ToAuxInt(32)
 10022  		v3.AddArg(y)
 10023  		v2.AddArg(v3)
 10024  		v1.AddArg(v2)
 10025  		v0.AddArg2(y, v1)
 10026  		v.AddArg2(x, v0)
 10027  		return true
 10028  	}
 10029  	// match: (Rsh32x32 <t> x y)
 10030  	// cond: ssa.ShiftIsBounded(v)
 10031  	// result: (SARL x y)
 10032  	for {
 10033  		x := v_0
 10034  		y := v_1
 10035  		if !(ssa.ShiftIsBounded(v)) {
 10036  			break
 10037  		}
 10038  		v.Reset(ssaop.Op386SARL)
 10039  		v.AddArg2(x, y)
 10040  		return true
 10041  	}
 10042  	return false
 10043  }
 10044  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
 10045  	v_1 := v.Args[1]
 10046  	v_0 := v.Args[0]
 10047  	// match: (Rsh32x64 x (Const64 [c]))
 10048  	// cond: uint64(c) < 32
 10049  	// result: (SARLconst x [int32(c)])
 10050  	for {
 10051  		x := v_0
 10052  		if v_1.Op != ssaop.OpConst64 {
 10053  			break
 10054  		}
 10055  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10056  		if !(uint64(c) < 32) {
 10057  			break
 10058  		}
 10059  		v.Reset(ssaop.Op386SARLconst)
 10060  		v.AuxInt = ssa.Int32ToAuxInt(int32(c))
 10061  		v.AddArg(x)
 10062  		return true
 10063  	}
 10064  	// match: (Rsh32x64 x (Const64 [c]))
 10065  	// cond: uint64(c) >= 32
 10066  	// result: (SARLconst x [31])
 10067  	for {
 10068  		x := v_0
 10069  		if v_1.Op != ssaop.OpConst64 {
 10070  			break
 10071  		}
 10072  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10073  		if !(uint64(c) >= 32) {
 10074  			break
 10075  		}
 10076  		v.Reset(ssaop.Op386SARLconst)
 10077  		v.AuxInt = ssa.Int32ToAuxInt(31)
 10078  		v.AddArg(x)
 10079  		return true
 10080  	}
 10081  	return false
 10082  }
 10083  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
 10084  	v_1 := v.Args[1]
 10085  	v_0 := v.Args[0]
 10086  	b := v.Block
 10087  	// match: (Rsh32x8 <t> x y)
 10088  	// cond: !ssa.ShiftIsBounded(v)
 10089  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 10090  	for {
 10091  		t := v.Type
 10092  		x := v_0
 10093  		y := v_1
 10094  		if !(!ssa.ShiftIsBounded(v)) {
 10095  			break
 10096  		}
 10097  		v.Reset(ssaop.Op386SARL)
 10098  		v.Type = t
 10099  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
 10100  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
 10101  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
 10102  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
 10103  		v3.AuxInt = ssa.Int8ToAuxInt(32)
 10104  		v3.AddArg(y)
 10105  		v2.AddArg(v3)
 10106  		v1.AddArg(v2)
 10107  		v0.AddArg2(y, v1)
 10108  		v.AddArg2(x, v0)
 10109  		return true
 10110  	}
 10111  	// match: (Rsh32x8 <t> x y)
 10112  	// cond: ssa.ShiftIsBounded(v)
 10113  	// result: (SARL x y)
 10114  	for {
 10115  		x := v_0
 10116  		y := v_1
 10117  		if !(ssa.ShiftIsBounded(v)) {
 10118  			break
 10119  		}
 10120  		v.Reset(ssaop.Op386SARL)
 10121  		v.AddArg2(x, y)
 10122  		return true
 10123  	}
 10124  	return false
 10125  }
 10126  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
 10127  	v_1 := v.Args[1]
 10128  	v_0 := v.Args[0]
 10129  	b := v.Block
 10130  	// match: (Rsh8Ux16 <t> x y)
 10131  	// cond: !ssa.ShiftIsBounded(v)
 10132  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 10133  	for {
 10134  		t := v.Type
 10135  		x := v_0
 10136  		y := v_1
 10137  		if !(!ssa.ShiftIsBounded(v)) {
 10138  			break
 10139  		}
 10140  		v.Reset(ssaop.Op386ANDL)
 10141  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRB, t)
 10142  		v0.AddArg2(x, y)
 10143  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
 10144  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
 10145  		v2.AuxInt = ssa.Int16ToAuxInt(8)
 10146  		v2.AddArg(y)
 10147  		v1.AddArg(v2)
 10148  		v.AddArg2(v0, v1)
 10149  		return true
 10150  	}
 10151  	// match: (Rsh8Ux16 <t> x y)
 10152  	// cond: ssa.ShiftIsBounded(v)
 10153  	// result: (SHRB <t> x y)
 10154  	for {
 10155  		t := v.Type
 10156  		x := v_0
 10157  		y := v_1
 10158  		if !(ssa.ShiftIsBounded(v)) {
 10159  			break
 10160  		}
 10161  		v.Reset(ssaop.Op386SHRB)
 10162  		v.Type = t
 10163  		v.AddArg2(x, y)
 10164  		return true
 10165  	}
 10166  	return false
 10167  }
 10168  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
 10169  	v_1 := v.Args[1]
 10170  	v_0 := v.Args[0]
 10171  	b := v.Block
 10172  	// match: (Rsh8Ux32 <t> x y)
 10173  	// cond: !ssa.ShiftIsBounded(v)
 10174  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 10175  	for {
 10176  		t := v.Type
 10177  		x := v_0
 10178  		y := v_1
 10179  		if !(!ssa.ShiftIsBounded(v)) {
 10180  			break
 10181  		}
 10182  		v.Reset(ssaop.Op386ANDL)
 10183  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRB, t)
 10184  		v0.AddArg2(x, y)
 10185  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
 10186  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
 10187  		v2.AuxInt = ssa.Int32ToAuxInt(8)
 10188  		v2.AddArg(y)
 10189  		v1.AddArg(v2)
 10190  		v.AddArg2(v0, v1)
 10191  		return true
 10192  	}
 10193  	// match: (Rsh8Ux32 <t> x y)
 10194  	// cond: ssa.ShiftIsBounded(v)
 10195  	// result: (SHRB <t> x y)
 10196  	for {
 10197  		t := v.Type
 10198  		x := v_0
 10199  		y := v_1
 10200  		if !(ssa.ShiftIsBounded(v)) {
 10201  			break
 10202  		}
 10203  		v.Reset(ssaop.Op386SHRB)
 10204  		v.Type = t
 10205  		v.AddArg2(x, y)
 10206  		return true
 10207  	}
 10208  	return false
 10209  }
 10210  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
 10211  	v_1 := v.Args[1]
 10212  	v_0 := v.Args[0]
 10213  	// match: (Rsh8Ux64 x (Const64 [c]))
 10214  	// cond: uint64(c) < 8
 10215  	// result: (SHRBconst x [int8(c)])
 10216  	for {
 10217  		x := v_0
 10218  		if v_1.Op != ssaop.OpConst64 {
 10219  			break
 10220  		}
 10221  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10222  		if !(uint64(c) < 8) {
 10223  			break
 10224  		}
 10225  		v.Reset(ssaop.Op386SHRBconst)
 10226  		v.AuxInt = ssa.Int8ToAuxInt(int8(c))
 10227  		v.AddArg(x)
 10228  		return true
 10229  	}
 10230  	// match: (Rsh8Ux64 _ (Const64 [c]))
 10231  	// cond: uint64(c) >= 8
 10232  	// result: (Const8 [0])
 10233  	for {
 10234  		if v_1.Op != ssaop.OpConst64 {
 10235  			break
 10236  		}
 10237  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10238  		if !(uint64(c) >= 8) {
 10239  			break
 10240  		}
 10241  		v.Reset(ssaop.OpConst8)
 10242  		v.AuxInt = ssa.Int8ToAuxInt(0)
 10243  		return true
 10244  	}
 10245  	return false
 10246  }
 10247  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
 10248  	v_1 := v.Args[1]
 10249  	v_0 := v.Args[0]
 10250  	b := v.Block
 10251  	// match: (Rsh8Ux8 <t> x y)
 10252  	// cond: !ssa.ShiftIsBounded(v)
 10253  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 10254  	for {
 10255  		t := v.Type
 10256  		x := v_0
 10257  		y := v_1
 10258  		if !(!ssa.ShiftIsBounded(v)) {
 10259  			break
 10260  		}
 10261  		v.Reset(ssaop.Op386ANDL)
 10262  		v0 := b.NewValue0(v.Pos, ssaop.Op386SHRB, t)
 10263  		v0.AddArg2(x, y)
 10264  		v1 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
 10265  		v2 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
 10266  		v2.AuxInt = ssa.Int8ToAuxInt(8)
 10267  		v2.AddArg(y)
 10268  		v1.AddArg(v2)
 10269  		v.AddArg2(v0, v1)
 10270  		return true
 10271  	}
 10272  	// match: (Rsh8Ux8 <t> x y)
 10273  	// cond: ssa.ShiftIsBounded(v)
 10274  	// result: (SHRB <t> x y)
 10275  	for {
 10276  		t := v.Type
 10277  		x := v_0
 10278  		y := v_1
 10279  		if !(ssa.ShiftIsBounded(v)) {
 10280  			break
 10281  		}
 10282  		v.Reset(ssaop.Op386SHRB)
 10283  		v.Type = t
 10284  		v.AddArg2(x, y)
 10285  		return true
 10286  	}
 10287  	return false
 10288  }
 10289  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
 10290  	v_1 := v.Args[1]
 10291  	v_0 := v.Args[0]
 10292  	b := v.Block
 10293  	// match: (Rsh8x16 <t> x y)
 10294  	// cond: !ssa.ShiftIsBounded(v)
 10295  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 10296  	for {
 10297  		t := v.Type
 10298  		x := v_0
 10299  		y := v_1
 10300  		if !(!ssa.ShiftIsBounded(v)) {
 10301  			break
 10302  		}
 10303  		v.Reset(ssaop.Op386SARB)
 10304  		v.Type = t
 10305  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
 10306  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
 10307  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
 10308  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPWconst, types.TypeFlags)
 10309  		v3.AuxInt = ssa.Int16ToAuxInt(8)
 10310  		v3.AddArg(y)
 10311  		v2.AddArg(v3)
 10312  		v1.AddArg(v2)
 10313  		v0.AddArg2(y, v1)
 10314  		v.AddArg2(x, v0)
 10315  		return true
 10316  	}
 10317  	// match: (Rsh8x16 <t> x y)
 10318  	// cond: ssa.ShiftIsBounded(v)
 10319  	// result: (SARB x y)
 10320  	for {
 10321  		x := v_0
 10322  		y := v_1
 10323  		if !(ssa.ShiftIsBounded(v)) {
 10324  			break
 10325  		}
 10326  		v.Reset(ssaop.Op386SARB)
 10327  		v.AddArg2(x, y)
 10328  		return true
 10329  	}
 10330  	return false
 10331  }
 10332  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
 10333  	v_1 := v.Args[1]
 10334  	v_0 := v.Args[0]
 10335  	b := v.Block
 10336  	// match: (Rsh8x32 <t> x y)
 10337  	// cond: !ssa.ShiftIsBounded(v)
 10338  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 10339  	for {
 10340  		t := v.Type
 10341  		x := v_0
 10342  		y := v_1
 10343  		if !(!ssa.ShiftIsBounded(v)) {
 10344  			break
 10345  		}
 10346  		v.Reset(ssaop.Op386SARB)
 10347  		v.Type = t
 10348  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
 10349  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
 10350  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
 10351  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
 10352  		v3.AuxInt = ssa.Int32ToAuxInt(8)
 10353  		v3.AddArg(y)
 10354  		v2.AddArg(v3)
 10355  		v1.AddArg(v2)
 10356  		v0.AddArg2(y, v1)
 10357  		v.AddArg2(x, v0)
 10358  		return true
 10359  	}
 10360  	// match: (Rsh8x32 <t> x y)
 10361  	// cond: ssa.ShiftIsBounded(v)
 10362  	// result: (SARB x y)
 10363  	for {
 10364  		x := v_0
 10365  		y := v_1
 10366  		if !(ssa.ShiftIsBounded(v)) {
 10367  			break
 10368  		}
 10369  		v.Reset(ssaop.Op386SARB)
 10370  		v.AddArg2(x, y)
 10371  		return true
 10372  	}
 10373  	return false
 10374  }
 10375  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
 10376  	v_1 := v.Args[1]
 10377  	v_0 := v.Args[0]
 10378  	// match: (Rsh8x64 x (Const64 [c]))
 10379  	// cond: uint64(c) < 8
 10380  	// result: (SARBconst x [int8(c)])
 10381  	for {
 10382  		x := v_0
 10383  		if v_1.Op != ssaop.OpConst64 {
 10384  			break
 10385  		}
 10386  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10387  		if !(uint64(c) < 8) {
 10388  			break
 10389  		}
 10390  		v.Reset(ssaop.Op386SARBconst)
 10391  		v.AuxInt = ssa.Int8ToAuxInt(int8(c))
 10392  		v.AddArg(x)
 10393  		return true
 10394  	}
 10395  	// match: (Rsh8x64 x (Const64 [c]))
 10396  	// cond: uint64(c) >= 8
 10397  	// result: (SARBconst x [7])
 10398  	for {
 10399  		x := v_0
 10400  		if v_1.Op != ssaop.OpConst64 {
 10401  			break
 10402  		}
 10403  		c := ssa.AuxIntToInt64(v_1.AuxInt)
 10404  		if !(uint64(c) >= 8) {
 10405  			break
 10406  		}
 10407  		v.Reset(ssaop.Op386SARBconst)
 10408  		v.AuxInt = ssa.Int8ToAuxInt(7)
 10409  		v.AddArg(x)
 10410  		return true
 10411  	}
 10412  	return false
 10413  }
 10414  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
 10415  	v_1 := v.Args[1]
 10416  	v_0 := v.Args[0]
 10417  	b := v.Block
 10418  	// match: (Rsh8x8 <t> x y)
 10419  	// cond: !ssa.ShiftIsBounded(v)
 10420  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 10421  	for {
 10422  		t := v.Type
 10423  		x := v_0
 10424  		y := v_1
 10425  		if !(!ssa.ShiftIsBounded(v)) {
 10426  			break
 10427  		}
 10428  		v.Reset(ssaop.Op386SARB)
 10429  		v.Type = t
 10430  		v0 := b.NewValue0(v.Pos, ssaop.Op386ORL, y.Type)
 10431  		v1 := b.NewValue0(v.Pos, ssaop.Op386NOTL, y.Type)
 10432  		v2 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, y.Type)
 10433  		v3 := b.NewValue0(v.Pos, ssaop.Op386CMPBconst, types.TypeFlags)
 10434  		v3.AuxInt = ssa.Int8ToAuxInt(8)
 10435  		v3.AddArg(y)
 10436  		v2.AddArg(v3)
 10437  		v1.AddArg(v2)
 10438  		v0.AddArg2(y, v1)
 10439  		v.AddArg2(x, v0)
 10440  		return true
 10441  	}
 10442  	// match: (Rsh8x8 <t> x y)
 10443  	// cond: ssa.ShiftIsBounded(v)
 10444  	// result: (SARB x y)
 10445  	for {
 10446  		x := v_0
 10447  		y := v_1
 10448  		if !(ssa.ShiftIsBounded(v)) {
 10449  			break
 10450  		}
 10451  		v.Reset(ssaop.Op386SARB)
 10452  		v.AddArg2(x, y)
 10453  		return true
 10454  	}
 10455  	return false
 10456  }
 10457  func rewriteValue_OpSelect0(v *ssa.Value) bool {
 10458  	v_0 := v.Args[0]
 10459  	b := v.Block
 10460  	typ := &b.Func.Config.Types
 10461  	// match: (Select0 (Mul32uover x y))
 10462  	// result: (Select0 <typ.UInt32> (MULLU x y))
 10463  	for {
 10464  		if v_0.Op != ssaop.OpMul32uover {
 10465  			break
 10466  		}
 10467  		y := v_0.Args[1]
 10468  		x := v_0.Args[0]
 10469  		v.Reset(ssaop.OpSelect0)
 10470  		v.Type = typ.UInt32
 10471  		v0 := b.NewValue0(v.Pos, ssaop.Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 10472  		v0.AddArg2(x, y)
 10473  		v.AddArg(v0)
 10474  		return true
 10475  	}
 10476  	return false
 10477  }
 10478  func rewriteValue_OpSelect1(v *ssa.Value) bool {
 10479  	v_0 := v.Args[0]
 10480  	b := v.Block
 10481  	typ := &b.Func.Config.Types
 10482  	// match: (Select1 (Mul32uover x y))
 10483  	// result: (SETO (Select1 <types.TypeFlags> (MULLU x y)))
 10484  	for {
 10485  		if v_0.Op != ssaop.OpMul32uover {
 10486  			break
 10487  		}
 10488  		y := v_0.Args[1]
 10489  		x := v_0.Args[0]
 10490  		v.Reset(ssaop.Op386SETO)
 10491  		v0 := b.NewValue0(v.Pos, ssaop.OpSelect1, types.TypeFlags)
 10492  		v1 := b.NewValue0(v.Pos, ssaop.Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 10493  		v1.AddArg2(x, y)
 10494  		v0.AddArg(v1)
 10495  		v.AddArg(v0)
 10496  		return true
 10497  	}
 10498  	return false
 10499  }
 10500  func rewriteValue_OpSignmask(v *ssa.Value) bool {
 10501  	v_0 := v.Args[0]
 10502  	// match: (Signmask x)
 10503  	// result: (SARLconst x [31])
 10504  	for {
 10505  		x := v_0
 10506  		v.Reset(ssaop.Op386SARLconst)
 10507  		v.AuxInt = ssa.Int32ToAuxInt(31)
 10508  		v.AddArg(x)
 10509  		return true
 10510  	}
 10511  }
 10512  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
 10513  	v_0 := v.Args[0]
 10514  	b := v.Block
 10515  	// match: (Slicemask <t> x)
 10516  	// result: (SARLconst (NEGL <t> x) [31])
 10517  	for {
 10518  		t := v.Type
 10519  		x := v_0
 10520  		v.Reset(ssaop.Op386SARLconst)
 10521  		v.AuxInt = ssa.Int32ToAuxInt(31)
 10522  		v0 := b.NewValue0(v.Pos, ssaop.Op386NEGL, t)
 10523  		v0.AddArg(x)
 10524  		v.AddArg(v0)
 10525  		return true
 10526  	}
 10527  }
 10528  func rewriteValue_OpStore(v *ssa.Value) bool {
 10529  	v_2 := v.Args[2]
 10530  	v_1 := v.Args[1]
 10531  	v_0 := v.Args[0]
 10532  	// match: (Store {t} ptr val mem)
 10533  	// cond: t.Size() == 8 && t.IsFloat()
 10534  	// result: (MOVSDstore ptr val mem)
 10535  	for {
 10536  		t := ssa.AuxToType(v.Aux)
 10537  		ptr := v_0
 10538  		val := v_1
 10539  		mem := v_2
 10540  		if !(t.Size() == 8 && t.IsFloat()) {
 10541  			break
 10542  		}
 10543  		v.Reset(ssaop.Op386MOVSDstore)
 10544  		v.AddArg3(ptr, val, mem)
 10545  		return true
 10546  	}
 10547  	// match: (Store {t} ptr val mem)
 10548  	// cond: t.Size() == 4 && t.IsFloat()
 10549  	// result: (MOVSSstore ptr val mem)
 10550  	for {
 10551  		t := ssa.AuxToType(v.Aux)
 10552  		ptr := v_0
 10553  		val := v_1
 10554  		mem := v_2
 10555  		if !(t.Size() == 4 && t.IsFloat()) {
 10556  			break
 10557  		}
 10558  		v.Reset(ssaop.Op386MOVSSstore)
 10559  		v.AddArg3(ptr, val, mem)
 10560  		return true
 10561  	}
 10562  	// match: (Store {t} ptr val mem)
 10563  	// cond: t.Size() == 4 && !t.IsFloat()
 10564  	// result: (MOVLstore ptr val mem)
 10565  	for {
 10566  		t := ssa.AuxToType(v.Aux)
 10567  		ptr := v_0
 10568  		val := v_1
 10569  		mem := v_2
 10570  		if !(t.Size() == 4 && !t.IsFloat()) {
 10571  			break
 10572  		}
 10573  		v.Reset(ssaop.Op386MOVLstore)
 10574  		v.AddArg3(ptr, val, mem)
 10575  		return true
 10576  	}
 10577  	// match: (Store {t} ptr val mem)
 10578  	// cond: t.Size() == 2
 10579  	// result: (MOVWstore ptr val mem)
 10580  	for {
 10581  		t := ssa.AuxToType(v.Aux)
 10582  		ptr := v_0
 10583  		val := v_1
 10584  		mem := v_2
 10585  		if !(t.Size() == 2) {
 10586  			break
 10587  		}
 10588  		v.Reset(ssaop.Op386MOVWstore)
 10589  		v.AddArg3(ptr, val, mem)
 10590  		return true
 10591  	}
 10592  	// match: (Store {t} ptr val mem)
 10593  	// cond: t.Size() == 1
 10594  	// result: (MOVBstore ptr val mem)
 10595  	for {
 10596  		t := ssa.AuxToType(v.Aux)
 10597  		ptr := v_0
 10598  		val := v_1
 10599  		mem := v_2
 10600  		if !(t.Size() == 1) {
 10601  			break
 10602  		}
 10603  		v.Reset(ssaop.Op386MOVBstore)
 10604  		v.AddArg3(ptr, val, mem)
 10605  		return true
 10606  	}
 10607  	return false
 10608  }
 10609  func rewriteValue_OpZero(v *ssa.Value) bool {
 10610  	v_1 := v.Args[1]
 10611  	v_0 := v.Args[0]
 10612  	b := v.Block
 10613  	typ := &b.Func.Config.Types
 10614  	// match: (Zero [0] _ mem)
 10615  	// result: mem
 10616  	for {
 10617  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
 10618  			break
 10619  		}
 10620  		mem := v_1
 10621  		v.CopyOf(mem)
 10622  		return true
 10623  	}
 10624  	// match: (Zero [1] destptr mem)
 10625  	// result: (MOVBstoreconst [0] destptr mem)
 10626  	for {
 10627  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
 10628  			break
 10629  		}
 10630  		destptr := v_0
 10631  		mem := v_1
 10632  		v.Reset(ssaop.Op386MOVBstoreconst)
 10633  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 10634  		v.AddArg2(destptr, mem)
 10635  		return true
 10636  	}
 10637  	// match: (Zero [2] destptr mem)
 10638  	// result: (MOVWstoreconst [0] destptr mem)
 10639  	for {
 10640  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
 10641  			break
 10642  		}
 10643  		destptr := v_0
 10644  		mem := v_1
 10645  		v.Reset(ssaop.Op386MOVWstoreconst)
 10646  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 10647  		v.AddArg2(destptr, mem)
 10648  		return true
 10649  	}
 10650  	// match: (Zero [4] destptr mem)
 10651  	// result: (MOVLstoreconst [0] destptr mem)
 10652  	for {
 10653  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
 10654  			break
 10655  		}
 10656  		destptr := v_0
 10657  		mem := v_1
 10658  		v.Reset(ssaop.Op386MOVLstoreconst)
 10659  		v.AuxInt = ssa.ValAndOffToAuxInt(0)
 10660  		v.AddArg2(destptr, mem)
 10661  		return true
 10662  	}
 10663  	// match: (Zero [3] destptr mem)
 10664  	// result: (MOVBstoreconst [ssa.MakeValAndOff(0,2)] destptr (MOVWstoreconst [ssa.MakeValAndOff(0,0)] destptr mem))
 10665  	for {
 10666  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
 10667  			break
 10668  		}
 10669  		destptr := v_0
 10670  		mem := v_1
 10671  		v.Reset(ssaop.Op386MOVBstoreconst)
 10672  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 2))
 10673  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVWstoreconst, types.TypeMem)
 10674  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10675  		v0.AddArg2(destptr, mem)
 10676  		v.AddArg2(destptr, v0)
 10677  		return true
 10678  	}
 10679  	// match: (Zero [5] destptr mem)
 10680  	// result: (MOVBstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,0)] destptr mem))
 10681  	for {
 10682  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
 10683  			break
 10684  		}
 10685  		destptr := v_0
 10686  		mem := v_1
 10687  		v.Reset(ssaop.Op386MOVBstoreconst)
 10688  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 10689  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10690  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10691  		v0.AddArg2(destptr, mem)
 10692  		v.AddArg2(destptr, v0)
 10693  		return true
 10694  	}
 10695  	// match: (Zero [6] destptr mem)
 10696  	// result: (MOVWstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,0)] destptr mem))
 10697  	for {
 10698  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
 10699  			break
 10700  		}
 10701  		destptr := v_0
 10702  		mem := v_1
 10703  		v.Reset(ssaop.Op386MOVWstoreconst)
 10704  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 10705  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10706  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10707  		v0.AddArg2(destptr, mem)
 10708  		v.AddArg2(destptr, v0)
 10709  		return true
 10710  	}
 10711  	// match: (Zero [7] destptr mem)
 10712  	// result: (MOVLstoreconst [ssa.MakeValAndOff(0,3)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,0)] destptr mem))
 10713  	for {
 10714  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
 10715  			break
 10716  		}
 10717  		destptr := v_0
 10718  		mem := v_1
 10719  		v.Reset(ssaop.Op386MOVLstoreconst)
 10720  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 3))
 10721  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10722  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10723  		v0.AddArg2(destptr, mem)
 10724  		v.AddArg2(destptr, v0)
 10725  		return true
 10726  	}
 10727  	// match: (Zero [s] destptr mem)
 10728  	// cond: s%4 != 0 && s > 4
 10729  	// result: (Zero [s-s%4] (ADDLconst destptr [int32(s%4)]) (MOVLstoreconst [0] destptr mem))
 10730  	for {
 10731  		s := ssa.AuxIntToInt64(v.AuxInt)
 10732  		destptr := v_0
 10733  		mem := v_1
 10734  		if !(s%4 != 0 && s > 4) {
 10735  			break
 10736  		}
 10737  		v.Reset(ssaop.OpZero)
 10738  		v.AuxInt = ssa.Int64ToAuxInt(s - s%4)
 10739  		v0 := b.NewValue0(v.Pos, ssaop.Op386ADDLconst, typ.UInt32)
 10740  		v0.AuxInt = ssa.Int32ToAuxInt(int32(s % 4))
 10741  		v0.AddArg(destptr)
 10742  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10743  		v1.AuxInt = ssa.ValAndOffToAuxInt(0)
 10744  		v1.AddArg2(destptr, mem)
 10745  		v.AddArg2(v0, v1)
 10746  		return true
 10747  	}
 10748  	// match: (Zero [8] destptr mem)
 10749  	// result: (MOVLstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,0)] destptr mem))
 10750  	for {
 10751  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
 10752  			break
 10753  		}
 10754  		destptr := v_0
 10755  		mem := v_1
 10756  		v.Reset(ssaop.Op386MOVLstoreconst)
 10757  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 10758  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10759  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10760  		v0.AddArg2(destptr, mem)
 10761  		v.AddArg2(destptr, v0)
 10762  		return true
 10763  	}
 10764  	// match: (Zero [12] destptr mem)
 10765  	// result: (MOVLstoreconst [ssa.MakeValAndOff(0,8)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,0)] destptr mem)))
 10766  	for {
 10767  		if ssa.AuxIntToInt64(v.AuxInt) != 12 {
 10768  			break
 10769  		}
 10770  		destptr := v_0
 10771  		mem := v_1
 10772  		v.Reset(ssaop.Op386MOVLstoreconst)
 10773  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 8))
 10774  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10775  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 10776  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10777  		v1.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10778  		v1.AddArg2(destptr, mem)
 10779  		v0.AddArg2(destptr, v1)
 10780  		v.AddArg2(destptr, v0)
 10781  		return true
 10782  	}
 10783  	// match: (Zero [16] destptr mem)
 10784  	// result: (MOVLstoreconst [ssa.MakeValAndOff(0,12)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,8)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,4)] destptr (MOVLstoreconst [ssa.MakeValAndOff(0,0)] destptr mem))))
 10785  	for {
 10786  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
 10787  			break
 10788  		}
 10789  		destptr := v_0
 10790  		mem := v_1
 10791  		v.Reset(ssaop.Op386MOVLstoreconst)
 10792  		v.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 12))
 10793  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10794  		v0.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 8))
 10795  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10796  		v1.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 4))
 10797  		v2 := b.NewValue0(v.Pos, ssaop.Op386MOVLstoreconst, types.TypeMem)
 10798  		v2.AuxInt = ssa.ValAndOffToAuxInt(ssa.MakeValAndOff(0, 0))
 10799  		v2.AddArg2(destptr, mem)
 10800  		v1.AddArg2(destptr, v2)
 10801  		v0.AddArg2(destptr, v1)
 10802  		v.AddArg2(destptr, v0)
 10803  		return true
 10804  	}
 10805  	// match: (Zero [s] destptr mem)
 10806  	// cond: s > 16 && s <= 4*128 && s%4 == 0
 10807  	// result: (DUFFZERO [1*(128-s/4)] destptr (MOVLconst [0]) mem)
 10808  	for {
 10809  		s := ssa.AuxIntToInt64(v.AuxInt)
 10810  		destptr := v_0
 10811  		mem := v_1
 10812  		if !(s > 16 && s <= 4*128 && s%4 == 0) {
 10813  			break
 10814  		}
 10815  		v.Reset(ssaop.Op386DUFFZERO)
 10816  		v.AuxInt = ssa.Int64ToAuxInt(1 * (128 - s/4))
 10817  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLconst, typ.UInt32)
 10818  		v0.AuxInt = ssa.Int32ToAuxInt(0)
 10819  		v.AddArg3(destptr, v0, mem)
 10820  		return true
 10821  	}
 10822  	// match: (Zero [s] destptr mem)
 10823  	// cond: s > 4*128 && s%4 == 0
 10824  	// result: (REPSTOSL destptr (MOVLconst [int32(s/4)]) (MOVLconst [0]) mem)
 10825  	for {
 10826  		s := ssa.AuxIntToInt64(v.AuxInt)
 10827  		destptr := v_0
 10828  		mem := v_1
 10829  		if !(s > 4*128 && s%4 == 0) {
 10830  			break
 10831  		}
 10832  		v.Reset(ssaop.Op386REPSTOSL)
 10833  		v0 := b.NewValue0(v.Pos, ssaop.Op386MOVLconst, typ.UInt32)
 10834  		v0.AuxInt = ssa.Int32ToAuxInt(int32(s / 4))
 10835  		v1 := b.NewValue0(v.Pos, ssaop.Op386MOVLconst, typ.UInt32)
 10836  		v1.AuxInt = ssa.Int32ToAuxInt(0)
 10837  		v.AddArg4(destptr, v0, v1, mem)
 10838  		return true
 10839  	}
 10840  	return false
 10841  }
 10842  func rewriteValue_OpZeromask(v *ssa.Value) bool {
 10843  	v_0 := v.Args[0]
 10844  	b := v.Block
 10845  	// match: (Zeromask <t> x)
 10846  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPLconst x [1])))
 10847  	for {
 10848  		t := v.Type
 10849  		x := v_0
 10850  		v.Reset(ssaop.Op386XORLconst)
 10851  		v.AuxInt = ssa.Int32ToAuxInt(-1)
 10852  		v0 := b.NewValue0(v.Pos, ssaop.Op386SBBLcarrymask, t)
 10853  		v1 := b.NewValue0(v.Pos, ssaop.Op386CMPLconst, types.TypeFlags)
 10854  		v1.AuxInt = ssa.Int32ToAuxInt(1)
 10855  		v1.AddArg(x)
 10856  		v0.AddArg(v1)
 10857  		v.AddArg(v0)
 10858  		return true
 10859  	}
 10860  }
 10861  func RewriteBlock(b *ssa.Block) bool {
 10862  	switch b.Kind {
 10863  	case block.Block386EQ:
 10864  		// match: (EQ (InvertFlags cmp) yes no)
 10865  		// result: (EQ cmp yes no)
 10866  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 10867  			v_0 := b.Controls[0]
 10868  			cmp := v_0.Args[0]
 10869  			b.ResetWithControl(block.Block386EQ, cmp)
 10870  			return true
 10871  		}
 10872  		// match: (EQ (FlagEQ) yes no)
 10873  		// result: (First yes no)
 10874  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 10875  			b.Reset(block.BlockFirst)
 10876  			return true
 10877  		}
 10878  		// match: (EQ (FlagLT_ULT) yes no)
 10879  		// result: (First no yes)
 10880  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 10881  			b.Reset(block.BlockFirst)
 10882  			b.SwapSuccessors()
 10883  			return true
 10884  		}
 10885  		// match: (EQ (FlagLT_UGT) yes no)
 10886  		// result: (First no yes)
 10887  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 10888  			b.Reset(block.BlockFirst)
 10889  			b.SwapSuccessors()
 10890  			return true
 10891  		}
 10892  		// match: (EQ (FlagGT_ULT) yes no)
 10893  		// result: (First no yes)
 10894  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 10895  			b.Reset(block.BlockFirst)
 10896  			b.SwapSuccessors()
 10897  			return true
 10898  		}
 10899  		// match: (EQ (FlagGT_UGT) yes no)
 10900  		// result: (First no yes)
 10901  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 10902  			b.Reset(block.BlockFirst)
 10903  			b.SwapSuccessors()
 10904  			return true
 10905  		}
 10906  	case block.Block386GE:
 10907  		// match: (GE (InvertFlags cmp) yes no)
 10908  		// result: (LE cmp yes no)
 10909  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 10910  			v_0 := b.Controls[0]
 10911  			cmp := v_0.Args[0]
 10912  			b.ResetWithControl(block.Block386LE, cmp)
 10913  			return true
 10914  		}
 10915  		// match: (GE (FlagEQ) yes no)
 10916  		// result: (First yes no)
 10917  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 10918  			b.Reset(block.BlockFirst)
 10919  			return true
 10920  		}
 10921  		// match: (GE (FlagLT_ULT) yes no)
 10922  		// result: (First no yes)
 10923  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 10924  			b.Reset(block.BlockFirst)
 10925  			b.SwapSuccessors()
 10926  			return true
 10927  		}
 10928  		// match: (GE (FlagLT_UGT) yes no)
 10929  		// result: (First no yes)
 10930  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 10931  			b.Reset(block.BlockFirst)
 10932  			b.SwapSuccessors()
 10933  			return true
 10934  		}
 10935  		// match: (GE (FlagGT_ULT) yes no)
 10936  		// result: (First yes no)
 10937  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 10938  			b.Reset(block.BlockFirst)
 10939  			return true
 10940  		}
 10941  		// match: (GE (FlagGT_UGT) yes no)
 10942  		// result: (First yes no)
 10943  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 10944  			b.Reset(block.BlockFirst)
 10945  			return true
 10946  		}
 10947  	case block.Block386GT:
 10948  		// match: (GT (InvertFlags cmp) yes no)
 10949  		// result: (LT cmp yes no)
 10950  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 10951  			v_0 := b.Controls[0]
 10952  			cmp := v_0.Args[0]
 10953  			b.ResetWithControl(block.Block386LT, cmp)
 10954  			return true
 10955  		}
 10956  		// match: (GT (FlagEQ) yes no)
 10957  		// result: (First no yes)
 10958  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 10959  			b.Reset(block.BlockFirst)
 10960  			b.SwapSuccessors()
 10961  			return true
 10962  		}
 10963  		// match: (GT (FlagLT_ULT) yes no)
 10964  		// result: (First no yes)
 10965  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 10966  			b.Reset(block.BlockFirst)
 10967  			b.SwapSuccessors()
 10968  			return true
 10969  		}
 10970  		// match: (GT (FlagLT_UGT) yes no)
 10971  		// result: (First no yes)
 10972  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 10973  			b.Reset(block.BlockFirst)
 10974  			b.SwapSuccessors()
 10975  			return true
 10976  		}
 10977  		// match: (GT (FlagGT_ULT) yes no)
 10978  		// result: (First yes no)
 10979  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 10980  			b.Reset(block.BlockFirst)
 10981  			return true
 10982  		}
 10983  		// match: (GT (FlagGT_UGT) yes no)
 10984  		// result: (First yes no)
 10985  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 10986  			b.Reset(block.BlockFirst)
 10987  			return true
 10988  		}
 10989  	case block.BlockIf:
 10990  		// match: (If (SETL cmp) yes no)
 10991  		// result: (LT cmp yes no)
 10992  		for b.Controls[0].Op == ssaop.Op386SETL {
 10993  			v_0 := b.Controls[0]
 10994  			cmp := v_0.Args[0]
 10995  			b.ResetWithControl(block.Block386LT, cmp)
 10996  			return true
 10997  		}
 10998  		// match: (If (SETLE cmp) yes no)
 10999  		// result: (LE cmp yes no)
 11000  		for b.Controls[0].Op == ssaop.Op386SETLE {
 11001  			v_0 := b.Controls[0]
 11002  			cmp := v_0.Args[0]
 11003  			b.ResetWithControl(block.Block386LE, cmp)
 11004  			return true
 11005  		}
 11006  		// match: (If (SETG cmp) yes no)
 11007  		// result: (GT cmp yes no)
 11008  		for b.Controls[0].Op == ssaop.Op386SETG {
 11009  			v_0 := b.Controls[0]
 11010  			cmp := v_0.Args[0]
 11011  			b.ResetWithControl(block.Block386GT, cmp)
 11012  			return true
 11013  		}
 11014  		// match: (If (SETGE cmp) yes no)
 11015  		// result: (GE cmp yes no)
 11016  		for b.Controls[0].Op == ssaop.Op386SETGE {
 11017  			v_0 := b.Controls[0]
 11018  			cmp := v_0.Args[0]
 11019  			b.ResetWithControl(block.Block386GE, cmp)
 11020  			return true
 11021  		}
 11022  		// match: (If (SETEQ cmp) yes no)
 11023  		// result: (EQ cmp yes no)
 11024  		for b.Controls[0].Op == ssaop.Op386SETEQ {
 11025  			v_0 := b.Controls[0]
 11026  			cmp := v_0.Args[0]
 11027  			b.ResetWithControl(block.Block386EQ, cmp)
 11028  			return true
 11029  		}
 11030  		// match: (If (SETNE cmp) yes no)
 11031  		// result: (NE cmp yes no)
 11032  		for b.Controls[0].Op == ssaop.Op386SETNE {
 11033  			v_0 := b.Controls[0]
 11034  			cmp := v_0.Args[0]
 11035  			b.ResetWithControl(block.Block386NE, cmp)
 11036  			return true
 11037  		}
 11038  		// match: (If (SETB cmp) yes no)
 11039  		// result: (ULT cmp yes no)
 11040  		for b.Controls[0].Op == ssaop.Op386SETB {
 11041  			v_0 := b.Controls[0]
 11042  			cmp := v_0.Args[0]
 11043  			b.ResetWithControl(block.Block386ULT, cmp)
 11044  			return true
 11045  		}
 11046  		// match: (If (SETBE cmp) yes no)
 11047  		// result: (ULE cmp yes no)
 11048  		for b.Controls[0].Op == ssaop.Op386SETBE {
 11049  			v_0 := b.Controls[0]
 11050  			cmp := v_0.Args[0]
 11051  			b.ResetWithControl(block.Block386ULE, cmp)
 11052  			return true
 11053  		}
 11054  		// match: (If (SETA cmp) yes no)
 11055  		// result: (UGT cmp yes no)
 11056  		for b.Controls[0].Op == ssaop.Op386SETA {
 11057  			v_0 := b.Controls[0]
 11058  			cmp := v_0.Args[0]
 11059  			b.ResetWithControl(block.Block386UGT, cmp)
 11060  			return true
 11061  		}
 11062  		// match: (If (SETAE cmp) yes no)
 11063  		// result: (UGE cmp yes no)
 11064  		for b.Controls[0].Op == ssaop.Op386SETAE {
 11065  			v_0 := b.Controls[0]
 11066  			cmp := v_0.Args[0]
 11067  			b.ResetWithControl(block.Block386UGE, cmp)
 11068  			return true
 11069  		}
 11070  		// match: (If (SETO cmp) yes no)
 11071  		// result: (OS cmp yes no)
 11072  		for b.Controls[0].Op == ssaop.Op386SETO {
 11073  			v_0 := b.Controls[0]
 11074  			cmp := v_0.Args[0]
 11075  			b.ResetWithControl(block.Block386OS, cmp)
 11076  			return true
 11077  		}
 11078  		// match: (If (SETGF cmp) yes no)
 11079  		// result: (UGT cmp yes no)
 11080  		for b.Controls[0].Op == ssaop.Op386SETGF {
 11081  			v_0 := b.Controls[0]
 11082  			cmp := v_0.Args[0]
 11083  			b.ResetWithControl(block.Block386UGT, cmp)
 11084  			return true
 11085  		}
 11086  		// match: (If (SETGEF cmp) yes no)
 11087  		// result: (UGE cmp yes no)
 11088  		for b.Controls[0].Op == ssaop.Op386SETGEF {
 11089  			v_0 := b.Controls[0]
 11090  			cmp := v_0.Args[0]
 11091  			b.ResetWithControl(block.Block386UGE, cmp)
 11092  			return true
 11093  		}
 11094  		// match: (If (SETEQF cmp) yes no)
 11095  		// result: (EQF cmp yes no)
 11096  		for b.Controls[0].Op == ssaop.Op386SETEQF {
 11097  			v_0 := b.Controls[0]
 11098  			cmp := v_0.Args[0]
 11099  			b.ResetWithControl(block.Block386EQF, cmp)
 11100  			return true
 11101  		}
 11102  		// match: (If (SETNEF cmp) yes no)
 11103  		// result: (NEF cmp yes no)
 11104  		for b.Controls[0].Op == ssaop.Op386SETNEF {
 11105  			v_0 := b.Controls[0]
 11106  			cmp := v_0.Args[0]
 11107  			b.ResetWithControl(block.Block386NEF, cmp)
 11108  			return true
 11109  		}
 11110  		// match: (If cond yes no)
 11111  		// result: (NE (TESTB cond cond) yes no)
 11112  		for {
 11113  			cond := b.Controls[0]
 11114  			v0 := b.NewValue0(cond.Pos, ssaop.Op386TESTB, types.TypeFlags)
 11115  			v0.AddArg2(cond, cond)
 11116  			b.ResetWithControl(block.Block386NE, v0)
 11117  			return true
 11118  		}
 11119  	case block.Block386LE:
 11120  		// match: (LE (InvertFlags cmp) yes no)
 11121  		// result: (GE cmp yes no)
 11122  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11123  			v_0 := b.Controls[0]
 11124  			cmp := v_0.Args[0]
 11125  			b.ResetWithControl(block.Block386GE, cmp)
 11126  			return true
 11127  		}
 11128  		// match: (LE (FlagEQ) yes no)
 11129  		// result: (First yes no)
 11130  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11131  			b.Reset(block.BlockFirst)
 11132  			return true
 11133  		}
 11134  		// match: (LE (FlagLT_ULT) yes no)
 11135  		// result: (First yes no)
 11136  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11137  			b.Reset(block.BlockFirst)
 11138  			return true
 11139  		}
 11140  		// match: (LE (FlagLT_UGT) yes no)
 11141  		// result: (First yes no)
 11142  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11143  			b.Reset(block.BlockFirst)
 11144  			return true
 11145  		}
 11146  		// match: (LE (FlagGT_ULT) yes no)
 11147  		// result: (First no yes)
 11148  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11149  			b.Reset(block.BlockFirst)
 11150  			b.SwapSuccessors()
 11151  			return true
 11152  		}
 11153  		// match: (LE (FlagGT_UGT) yes no)
 11154  		// result: (First no yes)
 11155  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11156  			b.Reset(block.BlockFirst)
 11157  			b.SwapSuccessors()
 11158  			return true
 11159  		}
 11160  	case block.Block386LT:
 11161  		// match: (LT (InvertFlags cmp) yes no)
 11162  		// result: (GT cmp yes no)
 11163  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11164  			v_0 := b.Controls[0]
 11165  			cmp := v_0.Args[0]
 11166  			b.ResetWithControl(block.Block386GT, cmp)
 11167  			return true
 11168  		}
 11169  		// match: (LT (FlagEQ) yes no)
 11170  		// result: (First no yes)
 11171  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11172  			b.Reset(block.BlockFirst)
 11173  			b.SwapSuccessors()
 11174  			return true
 11175  		}
 11176  		// match: (LT (FlagLT_ULT) yes no)
 11177  		// result: (First yes no)
 11178  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11179  			b.Reset(block.BlockFirst)
 11180  			return true
 11181  		}
 11182  		// match: (LT (FlagLT_UGT) yes no)
 11183  		// result: (First yes no)
 11184  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11185  			b.Reset(block.BlockFirst)
 11186  			return true
 11187  		}
 11188  		// match: (LT (FlagGT_ULT) yes no)
 11189  		// result: (First no yes)
 11190  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11191  			b.Reset(block.BlockFirst)
 11192  			b.SwapSuccessors()
 11193  			return true
 11194  		}
 11195  		// match: (LT (FlagGT_UGT) yes no)
 11196  		// result: (First no yes)
 11197  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11198  			b.Reset(block.BlockFirst)
 11199  			b.SwapSuccessors()
 11200  			return true
 11201  		}
 11202  	case block.Block386NE:
 11203  		// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
 11204  		// result: (LT cmp yes no)
 11205  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11206  			v_0 := b.Controls[0]
 11207  			_ = v_0.Args[1]
 11208  			v_0_0 := v_0.Args[0]
 11209  			if v_0_0.Op != ssaop.Op386SETL {
 11210  				break
 11211  			}
 11212  			cmp := v_0_0.Args[0]
 11213  			v_0_1 := v_0.Args[1]
 11214  			if v_0_1.Op != ssaop.Op386SETL || cmp != v_0_1.Args[0] {
 11215  				break
 11216  			}
 11217  			b.ResetWithControl(block.Block386LT, cmp)
 11218  			return true
 11219  		}
 11220  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 11221  		// result: (LE cmp yes no)
 11222  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11223  			v_0 := b.Controls[0]
 11224  			_ = v_0.Args[1]
 11225  			v_0_0 := v_0.Args[0]
 11226  			if v_0_0.Op != ssaop.Op386SETLE {
 11227  				break
 11228  			}
 11229  			cmp := v_0_0.Args[0]
 11230  			v_0_1 := v_0.Args[1]
 11231  			if v_0_1.Op != ssaop.Op386SETLE || cmp != v_0_1.Args[0] {
 11232  				break
 11233  			}
 11234  			b.ResetWithControl(block.Block386LE, cmp)
 11235  			return true
 11236  		}
 11237  		// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
 11238  		// result: (GT cmp yes no)
 11239  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11240  			v_0 := b.Controls[0]
 11241  			_ = v_0.Args[1]
 11242  			v_0_0 := v_0.Args[0]
 11243  			if v_0_0.Op != ssaop.Op386SETG {
 11244  				break
 11245  			}
 11246  			cmp := v_0_0.Args[0]
 11247  			v_0_1 := v_0.Args[1]
 11248  			if v_0_1.Op != ssaop.Op386SETG || cmp != v_0_1.Args[0] {
 11249  				break
 11250  			}
 11251  			b.ResetWithControl(block.Block386GT, cmp)
 11252  			return true
 11253  		}
 11254  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 11255  		// result: (GE cmp yes no)
 11256  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11257  			v_0 := b.Controls[0]
 11258  			_ = v_0.Args[1]
 11259  			v_0_0 := v_0.Args[0]
 11260  			if v_0_0.Op != ssaop.Op386SETGE {
 11261  				break
 11262  			}
 11263  			cmp := v_0_0.Args[0]
 11264  			v_0_1 := v_0.Args[1]
 11265  			if v_0_1.Op != ssaop.Op386SETGE || cmp != v_0_1.Args[0] {
 11266  				break
 11267  			}
 11268  			b.ResetWithControl(block.Block386GE, cmp)
 11269  			return true
 11270  		}
 11271  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 11272  		// result: (EQ cmp yes no)
 11273  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11274  			v_0 := b.Controls[0]
 11275  			_ = v_0.Args[1]
 11276  			v_0_0 := v_0.Args[0]
 11277  			if v_0_0.Op != ssaop.Op386SETEQ {
 11278  				break
 11279  			}
 11280  			cmp := v_0_0.Args[0]
 11281  			v_0_1 := v_0.Args[1]
 11282  			if v_0_1.Op != ssaop.Op386SETEQ || cmp != v_0_1.Args[0] {
 11283  				break
 11284  			}
 11285  			b.ResetWithControl(block.Block386EQ, cmp)
 11286  			return true
 11287  		}
 11288  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 11289  		// result: (NE cmp yes no)
 11290  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11291  			v_0 := b.Controls[0]
 11292  			_ = v_0.Args[1]
 11293  			v_0_0 := v_0.Args[0]
 11294  			if v_0_0.Op != ssaop.Op386SETNE {
 11295  				break
 11296  			}
 11297  			cmp := v_0_0.Args[0]
 11298  			v_0_1 := v_0.Args[1]
 11299  			if v_0_1.Op != ssaop.Op386SETNE || cmp != v_0_1.Args[0] {
 11300  				break
 11301  			}
 11302  			b.ResetWithControl(block.Block386NE, cmp)
 11303  			return true
 11304  		}
 11305  		// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
 11306  		// result: (ULT cmp yes no)
 11307  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11308  			v_0 := b.Controls[0]
 11309  			_ = v_0.Args[1]
 11310  			v_0_0 := v_0.Args[0]
 11311  			if v_0_0.Op != ssaop.Op386SETB {
 11312  				break
 11313  			}
 11314  			cmp := v_0_0.Args[0]
 11315  			v_0_1 := v_0.Args[1]
 11316  			if v_0_1.Op != ssaop.Op386SETB || cmp != v_0_1.Args[0] {
 11317  				break
 11318  			}
 11319  			b.ResetWithControl(block.Block386ULT, cmp)
 11320  			return true
 11321  		}
 11322  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 11323  		// result: (ULE cmp yes no)
 11324  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11325  			v_0 := b.Controls[0]
 11326  			_ = v_0.Args[1]
 11327  			v_0_0 := v_0.Args[0]
 11328  			if v_0_0.Op != ssaop.Op386SETBE {
 11329  				break
 11330  			}
 11331  			cmp := v_0_0.Args[0]
 11332  			v_0_1 := v_0.Args[1]
 11333  			if v_0_1.Op != ssaop.Op386SETBE || cmp != v_0_1.Args[0] {
 11334  				break
 11335  			}
 11336  			b.ResetWithControl(block.Block386ULE, cmp)
 11337  			return true
 11338  		}
 11339  		// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
 11340  		// result: (UGT cmp yes no)
 11341  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11342  			v_0 := b.Controls[0]
 11343  			_ = v_0.Args[1]
 11344  			v_0_0 := v_0.Args[0]
 11345  			if v_0_0.Op != ssaop.Op386SETA {
 11346  				break
 11347  			}
 11348  			cmp := v_0_0.Args[0]
 11349  			v_0_1 := v_0.Args[1]
 11350  			if v_0_1.Op != ssaop.Op386SETA || cmp != v_0_1.Args[0] {
 11351  				break
 11352  			}
 11353  			b.ResetWithControl(block.Block386UGT, cmp)
 11354  			return true
 11355  		}
 11356  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 11357  		// result: (UGE cmp yes no)
 11358  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11359  			v_0 := b.Controls[0]
 11360  			_ = v_0.Args[1]
 11361  			v_0_0 := v_0.Args[0]
 11362  			if v_0_0.Op != ssaop.Op386SETAE {
 11363  				break
 11364  			}
 11365  			cmp := v_0_0.Args[0]
 11366  			v_0_1 := v_0.Args[1]
 11367  			if v_0_1.Op != ssaop.Op386SETAE || cmp != v_0_1.Args[0] {
 11368  				break
 11369  			}
 11370  			b.ResetWithControl(block.Block386UGE, cmp)
 11371  			return true
 11372  		}
 11373  		// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
 11374  		// result: (OS cmp yes no)
 11375  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11376  			v_0 := b.Controls[0]
 11377  			_ = v_0.Args[1]
 11378  			v_0_0 := v_0.Args[0]
 11379  			if v_0_0.Op != ssaop.Op386SETO {
 11380  				break
 11381  			}
 11382  			cmp := v_0_0.Args[0]
 11383  			v_0_1 := v_0.Args[1]
 11384  			if v_0_1.Op != ssaop.Op386SETO || cmp != v_0_1.Args[0] {
 11385  				break
 11386  			}
 11387  			b.ResetWithControl(block.Block386OS, cmp)
 11388  			return true
 11389  		}
 11390  		// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
 11391  		// result: (UGT cmp yes no)
 11392  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11393  			v_0 := b.Controls[0]
 11394  			_ = v_0.Args[1]
 11395  			v_0_0 := v_0.Args[0]
 11396  			if v_0_0.Op != ssaop.Op386SETGF {
 11397  				break
 11398  			}
 11399  			cmp := v_0_0.Args[0]
 11400  			v_0_1 := v_0.Args[1]
 11401  			if v_0_1.Op != ssaop.Op386SETGF || cmp != v_0_1.Args[0] {
 11402  				break
 11403  			}
 11404  			b.ResetWithControl(block.Block386UGT, cmp)
 11405  			return true
 11406  		}
 11407  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 11408  		// result: (UGE cmp yes no)
 11409  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11410  			v_0 := b.Controls[0]
 11411  			_ = v_0.Args[1]
 11412  			v_0_0 := v_0.Args[0]
 11413  			if v_0_0.Op != ssaop.Op386SETGEF {
 11414  				break
 11415  			}
 11416  			cmp := v_0_0.Args[0]
 11417  			v_0_1 := v_0.Args[1]
 11418  			if v_0_1.Op != ssaop.Op386SETGEF || cmp != v_0_1.Args[0] {
 11419  				break
 11420  			}
 11421  			b.ResetWithControl(block.Block386UGE, cmp)
 11422  			return true
 11423  		}
 11424  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 11425  		// result: (EQF cmp yes no)
 11426  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11427  			v_0 := b.Controls[0]
 11428  			_ = v_0.Args[1]
 11429  			v_0_0 := v_0.Args[0]
 11430  			if v_0_0.Op != ssaop.Op386SETEQF {
 11431  				break
 11432  			}
 11433  			cmp := v_0_0.Args[0]
 11434  			v_0_1 := v_0.Args[1]
 11435  			if v_0_1.Op != ssaop.Op386SETEQF || cmp != v_0_1.Args[0] {
 11436  				break
 11437  			}
 11438  			b.ResetWithControl(block.Block386EQF, cmp)
 11439  			return true
 11440  		}
 11441  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 11442  		// result: (NEF cmp yes no)
 11443  		for b.Controls[0].Op == ssaop.Op386TESTB {
 11444  			v_0 := b.Controls[0]
 11445  			_ = v_0.Args[1]
 11446  			v_0_0 := v_0.Args[0]
 11447  			if v_0_0.Op != ssaop.Op386SETNEF {
 11448  				break
 11449  			}
 11450  			cmp := v_0_0.Args[0]
 11451  			v_0_1 := v_0.Args[1]
 11452  			if v_0_1.Op != ssaop.Op386SETNEF || cmp != v_0_1.Args[0] {
 11453  				break
 11454  			}
 11455  			b.ResetWithControl(block.Block386NEF, cmp)
 11456  			return true
 11457  		}
 11458  		// match: (NE (InvertFlags cmp) yes no)
 11459  		// result: (NE cmp yes no)
 11460  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11461  			v_0 := b.Controls[0]
 11462  			cmp := v_0.Args[0]
 11463  			b.ResetWithControl(block.Block386NE, cmp)
 11464  			return true
 11465  		}
 11466  		// match: (NE (FlagEQ) yes no)
 11467  		// result: (First no yes)
 11468  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11469  			b.Reset(block.BlockFirst)
 11470  			b.SwapSuccessors()
 11471  			return true
 11472  		}
 11473  		// match: (NE (FlagLT_ULT) yes no)
 11474  		// result: (First yes no)
 11475  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11476  			b.Reset(block.BlockFirst)
 11477  			return true
 11478  		}
 11479  		// match: (NE (FlagLT_UGT) yes no)
 11480  		// result: (First yes no)
 11481  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11482  			b.Reset(block.BlockFirst)
 11483  			return true
 11484  		}
 11485  		// match: (NE (FlagGT_ULT) yes no)
 11486  		// result: (First yes no)
 11487  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11488  			b.Reset(block.BlockFirst)
 11489  			return true
 11490  		}
 11491  		// match: (NE (FlagGT_UGT) yes no)
 11492  		// result: (First yes no)
 11493  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11494  			b.Reset(block.BlockFirst)
 11495  			return true
 11496  		}
 11497  	case block.Block386UGE:
 11498  		// match: (UGE (InvertFlags cmp) yes no)
 11499  		// result: (ULE cmp yes no)
 11500  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11501  			v_0 := b.Controls[0]
 11502  			cmp := v_0.Args[0]
 11503  			b.ResetWithControl(block.Block386ULE, cmp)
 11504  			return true
 11505  		}
 11506  		// match: (UGE (FlagEQ) yes no)
 11507  		// result: (First yes no)
 11508  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11509  			b.Reset(block.BlockFirst)
 11510  			return true
 11511  		}
 11512  		// match: (UGE (FlagLT_ULT) yes no)
 11513  		// result: (First no yes)
 11514  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11515  			b.Reset(block.BlockFirst)
 11516  			b.SwapSuccessors()
 11517  			return true
 11518  		}
 11519  		// match: (UGE (FlagLT_UGT) yes no)
 11520  		// result: (First yes no)
 11521  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11522  			b.Reset(block.BlockFirst)
 11523  			return true
 11524  		}
 11525  		// match: (UGE (FlagGT_ULT) yes no)
 11526  		// result: (First no yes)
 11527  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11528  			b.Reset(block.BlockFirst)
 11529  			b.SwapSuccessors()
 11530  			return true
 11531  		}
 11532  		// match: (UGE (FlagGT_UGT) yes no)
 11533  		// result: (First yes no)
 11534  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11535  			b.Reset(block.BlockFirst)
 11536  			return true
 11537  		}
 11538  	case block.Block386UGT:
 11539  		// match: (UGT (InvertFlags cmp) yes no)
 11540  		// result: (ULT cmp yes no)
 11541  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11542  			v_0 := b.Controls[0]
 11543  			cmp := v_0.Args[0]
 11544  			b.ResetWithControl(block.Block386ULT, cmp)
 11545  			return true
 11546  		}
 11547  		// match: (UGT (FlagEQ) yes no)
 11548  		// result: (First no yes)
 11549  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11550  			b.Reset(block.BlockFirst)
 11551  			b.SwapSuccessors()
 11552  			return true
 11553  		}
 11554  		// match: (UGT (FlagLT_ULT) yes no)
 11555  		// result: (First no yes)
 11556  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11557  			b.Reset(block.BlockFirst)
 11558  			b.SwapSuccessors()
 11559  			return true
 11560  		}
 11561  		// match: (UGT (FlagLT_UGT) yes no)
 11562  		// result: (First yes no)
 11563  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11564  			b.Reset(block.BlockFirst)
 11565  			return true
 11566  		}
 11567  		// match: (UGT (FlagGT_ULT) yes no)
 11568  		// result: (First no yes)
 11569  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11570  			b.Reset(block.BlockFirst)
 11571  			b.SwapSuccessors()
 11572  			return true
 11573  		}
 11574  		// match: (UGT (FlagGT_UGT) yes no)
 11575  		// result: (First yes no)
 11576  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11577  			b.Reset(block.BlockFirst)
 11578  			return true
 11579  		}
 11580  	case block.Block386ULE:
 11581  		// match: (ULE (InvertFlags cmp) yes no)
 11582  		// result: (UGE cmp yes no)
 11583  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11584  			v_0 := b.Controls[0]
 11585  			cmp := v_0.Args[0]
 11586  			b.ResetWithControl(block.Block386UGE, cmp)
 11587  			return true
 11588  		}
 11589  		// match: (ULE (FlagEQ) yes no)
 11590  		// result: (First yes no)
 11591  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11592  			b.Reset(block.BlockFirst)
 11593  			return true
 11594  		}
 11595  		// match: (ULE (FlagLT_ULT) yes no)
 11596  		// result: (First yes no)
 11597  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11598  			b.Reset(block.BlockFirst)
 11599  			return true
 11600  		}
 11601  		// match: (ULE (FlagLT_UGT) yes no)
 11602  		// result: (First no yes)
 11603  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11604  			b.Reset(block.BlockFirst)
 11605  			b.SwapSuccessors()
 11606  			return true
 11607  		}
 11608  		// match: (ULE (FlagGT_ULT) yes no)
 11609  		// result: (First yes no)
 11610  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11611  			b.Reset(block.BlockFirst)
 11612  			return true
 11613  		}
 11614  		// match: (ULE (FlagGT_UGT) yes no)
 11615  		// result: (First no yes)
 11616  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11617  			b.Reset(block.BlockFirst)
 11618  			b.SwapSuccessors()
 11619  			return true
 11620  		}
 11621  	case block.Block386ULT:
 11622  		// match: (ULT (InvertFlags cmp) yes no)
 11623  		// result: (UGT cmp yes no)
 11624  		for b.Controls[0].Op == ssaop.Op386InvertFlags {
 11625  			v_0 := b.Controls[0]
 11626  			cmp := v_0.Args[0]
 11627  			b.ResetWithControl(block.Block386UGT, cmp)
 11628  			return true
 11629  		}
 11630  		// match: (ULT (FlagEQ) yes no)
 11631  		// result: (First no yes)
 11632  		for b.Controls[0].Op == ssaop.Op386FlagEQ {
 11633  			b.Reset(block.BlockFirst)
 11634  			b.SwapSuccessors()
 11635  			return true
 11636  		}
 11637  		// match: (ULT (FlagLT_ULT) yes no)
 11638  		// result: (First yes no)
 11639  		for b.Controls[0].Op == ssaop.Op386FlagLT_ULT {
 11640  			b.Reset(block.BlockFirst)
 11641  			return true
 11642  		}
 11643  		// match: (ULT (FlagLT_UGT) yes no)
 11644  		// result: (First no yes)
 11645  		for b.Controls[0].Op == ssaop.Op386FlagLT_UGT {
 11646  			b.Reset(block.BlockFirst)
 11647  			b.SwapSuccessors()
 11648  			return true
 11649  		}
 11650  		// match: (ULT (FlagGT_ULT) yes no)
 11651  		// result: (First yes no)
 11652  		for b.Controls[0].Op == ssaop.Op386FlagGT_ULT {
 11653  			b.Reset(block.BlockFirst)
 11654  			return true
 11655  		}
 11656  		// match: (ULT (FlagGT_UGT) yes no)
 11657  		// result: (First no yes)
 11658  		for b.Controls[0].Op == ssaop.Op386FlagGT_UGT {
 11659  			b.Reset(block.BlockFirst)
 11660  			b.SwapSuccessors()
 11661  			return true
 11662  		}
 11663  	}
 11664  	return false
 11665  }
 11666  

View as plain text