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

     1  // Code generated from gen/386.rules; DO NOT EDIT.
     2  // generated with: cd gen; go run *.go
     3  
     4  package ssa
     5  
     6  import "math"
     7  import "cmd/compile/internal/types"
     8  
     9  func rewriteValue386(v *Value) bool {
    10  	switch v.Op {
    11  	case Op386ADCL:
    12  		return rewriteValue386_Op386ADCL(v)
    13  	case Op386ADDL:
    14  		return rewriteValue386_Op386ADDL(v)
    15  	case Op386ADDLcarry:
    16  		return rewriteValue386_Op386ADDLcarry(v)
    17  	case Op386ADDLconst:
    18  		return rewriteValue386_Op386ADDLconst(v)
    19  	case Op386ADDLconstmodify:
    20  		return rewriteValue386_Op386ADDLconstmodify(v)
    21  	case Op386ADDLload:
    22  		return rewriteValue386_Op386ADDLload(v)
    23  	case Op386ADDLmodify:
    24  		return rewriteValue386_Op386ADDLmodify(v)
    25  	case Op386ADDSD:
    26  		return rewriteValue386_Op386ADDSD(v)
    27  	case Op386ADDSDload:
    28  		return rewriteValue386_Op386ADDSDload(v)
    29  	case Op386ADDSS:
    30  		return rewriteValue386_Op386ADDSS(v)
    31  	case Op386ADDSSload:
    32  		return rewriteValue386_Op386ADDSSload(v)
    33  	case Op386ANDL:
    34  		return rewriteValue386_Op386ANDL(v)
    35  	case Op386ANDLconst:
    36  		return rewriteValue386_Op386ANDLconst(v)
    37  	case Op386ANDLconstmodify:
    38  		return rewriteValue386_Op386ANDLconstmodify(v)
    39  	case Op386ANDLload:
    40  		return rewriteValue386_Op386ANDLload(v)
    41  	case Op386ANDLmodify:
    42  		return rewriteValue386_Op386ANDLmodify(v)
    43  	case Op386CMPB:
    44  		return rewriteValue386_Op386CMPB(v)
    45  	case Op386CMPBconst:
    46  		return rewriteValue386_Op386CMPBconst(v)
    47  	case Op386CMPBload:
    48  		return rewriteValue386_Op386CMPBload(v)
    49  	case Op386CMPL:
    50  		return rewriteValue386_Op386CMPL(v)
    51  	case Op386CMPLconst:
    52  		return rewriteValue386_Op386CMPLconst(v)
    53  	case Op386CMPLload:
    54  		return rewriteValue386_Op386CMPLload(v)
    55  	case Op386CMPW:
    56  		return rewriteValue386_Op386CMPW(v)
    57  	case Op386CMPWconst:
    58  		return rewriteValue386_Op386CMPWconst(v)
    59  	case Op386CMPWload:
    60  		return rewriteValue386_Op386CMPWload(v)
    61  	case Op386DIVSD:
    62  		return rewriteValue386_Op386DIVSD(v)
    63  	case Op386DIVSDload:
    64  		return rewriteValue386_Op386DIVSDload(v)
    65  	case Op386DIVSS:
    66  		return rewriteValue386_Op386DIVSS(v)
    67  	case Op386DIVSSload:
    68  		return rewriteValue386_Op386DIVSSload(v)
    69  	case Op386LEAL:
    70  		return rewriteValue386_Op386LEAL(v)
    71  	case Op386LEAL1:
    72  		return rewriteValue386_Op386LEAL1(v)
    73  	case Op386LEAL2:
    74  		return rewriteValue386_Op386LEAL2(v)
    75  	case Op386LEAL4:
    76  		return rewriteValue386_Op386LEAL4(v)
    77  	case Op386LEAL8:
    78  		return rewriteValue386_Op386LEAL8(v)
    79  	case Op386MOVBLSX:
    80  		return rewriteValue386_Op386MOVBLSX(v)
    81  	case Op386MOVBLSXload:
    82  		return rewriteValue386_Op386MOVBLSXload(v)
    83  	case Op386MOVBLZX:
    84  		return rewriteValue386_Op386MOVBLZX(v)
    85  	case Op386MOVBload:
    86  		return rewriteValue386_Op386MOVBload(v)
    87  	case Op386MOVBstore:
    88  		return rewriteValue386_Op386MOVBstore(v)
    89  	case Op386MOVBstoreconst:
    90  		return rewriteValue386_Op386MOVBstoreconst(v)
    91  	case Op386MOVLload:
    92  		return rewriteValue386_Op386MOVLload(v)
    93  	case Op386MOVLstore:
    94  		return rewriteValue386_Op386MOVLstore(v)
    95  	case Op386MOVLstoreconst:
    96  		return rewriteValue386_Op386MOVLstoreconst(v)
    97  	case Op386MOVSDconst:
    98  		return rewriteValue386_Op386MOVSDconst(v)
    99  	case Op386MOVSDload:
   100  		return rewriteValue386_Op386MOVSDload(v)
   101  	case Op386MOVSDstore:
   102  		return rewriteValue386_Op386MOVSDstore(v)
   103  	case Op386MOVSSconst:
   104  		return rewriteValue386_Op386MOVSSconst(v)
   105  	case Op386MOVSSload:
   106  		return rewriteValue386_Op386MOVSSload(v)
   107  	case Op386MOVSSstore:
   108  		return rewriteValue386_Op386MOVSSstore(v)
   109  	case Op386MOVWLSX:
   110  		return rewriteValue386_Op386MOVWLSX(v)
   111  	case Op386MOVWLSXload:
   112  		return rewriteValue386_Op386MOVWLSXload(v)
   113  	case Op386MOVWLZX:
   114  		return rewriteValue386_Op386MOVWLZX(v)
   115  	case Op386MOVWload:
   116  		return rewriteValue386_Op386MOVWload(v)
   117  	case Op386MOVWstore:
   118  		return rewriteValue386_Op386MOVWstore(v)
   119  	case Op386MOVWstoreconst:
   120  		return rewriteValue386_Op386MOVWstoreconst(v)
   121  	case Op386MULL:
   122  		return rewriteValue386_Op386MULL(v)
   123  	case Op386MULLconst:
   124  		return rewriteValue386_Op386MULLconst(v)
   125  	case Op386MULLload:
   126  		return rewriteValue386_Op386MULLload(v)
   127  	case Op386MULSD:
   128  		return rewriteValue386_Op386MULSD(v)
   129  	case Op386MULSDload:
   130  		return rewriteValue386_Op386MULSDload(v)
   131  	case Op386MULSS:
   132  		return rewriteValue386_Op386MULSS(v)
   133  	case Op386MULSSload:
   134  		return rewriteValue386_Op386MULSSload(v)
   135  	case Op386NEGL:
   136  		return rewriteValue386_Op386NEGL(v)
   137  	case Op386NOTL:
   138  		return rewriteValue386_Op386NOTL(v)
   139  	case Op386ORL:
   140  		return rewriteValue386_Op386ORL(v)
   141  	case Op386ORLconst:
   142  		return rewriteValue386_Op386ORLconst(v)
   143  	case Op386ORLconstmodify:
   144  		return rewriteValue386_Op386ORLconstmodify(v)
   145  	case Op386ORLload:
   146  		return rewriteValue386_Op386ORLload(v)
   147  	case Op386ORLmodify:
   148  		return rewriteValue386_Op386ORLmodify(v)
   149  	case Op386ROLBconst:
   150  		return rewriteValue386_Op386ROLBconst(v)
   151  	case Op386ROLLconst:
   152  		return rewriteValue386_Op386ROLLconst(v)
   153  	case Op386ROLWconst:
   154  		return rewriteValue386_Op386ROLWconst(v)
   155  	case Op386SARB:
   156  		return rewriteValue386_Op386SARB(v)
   157  	case Op386SARBconst:
   158  		return rewriteValue386_Op386SARBconst(v)
   159  	case Op386SARL:
   160  		return rewriteValue386_Op386SARL(v)
   161  	case Op386SARLconst:
   162  		return rewriteValue386_Op386SARLconst(v)
   163  	case Op386SARW:
   164  		return rewriteValue386_Op386SARW(v)
   165  	case Op386SARWconst:
   166  		return rewriteValue386_Op386SARWconst(v)
   167  	case Op386SBBL:
   168  		return rewriteValue386_Op386SBBL(v)
   169  	case Op386SBBLcarrymask:
   170  		return rewriteValue386_Op386SBBLcarrymask(v)
   171  	case Op386SETA:
   172  		return rewriteValue386_Op386SETA(v)
   173  	case Op386SETAE:
   174  		return rewriteValue386_Op386SETAE(v)
   175  	case Op386SETB:
   176  		return rewriteValue386_Op386SETB(v)
   177  	case Op386SETBE:
   178  		return rewriteValue386_Op386SETBE(v)
   179  	case Op386SETEQ:
   180  		return rewriteValue386_Op386SETEQ(v)
   181  	case Op386SETG:
   182  		return rewriteValue386_Op386SETG(v)
   183  	case Op386SETGE:
   184  		return rewriteValue386_Op386SETGE(v)
   185  	case Op386SETL:
   186  		return rewriteValue386_Op386SETL(v)
   187  	case Op386SETLE:
   188  		return rewriteValue386_Op386SETLE(v)
   189  	case Op386SETNE:
   190  		return rewriteValue386_Op386SETNE(v)
   191  	case Op386SHLL:
   192  		return rewriteValue386_Op386SHLL(v)
   193  	case Op386SHLLconst:
   194  		return rewriteValue386_Op386SHLLconst(v)
   195  	case Op386SHRB:
   196  		return rewriteValue386_Op386SHRB(v)
   197  	case Op386SHRBconst:
   198  		return rewriteValue386_Op386SHRBconst(v)
   199  	case Op386SHRL:
   200  		return rewriteValue386_Op386SHRL(v)
   201  	case Op386SHRLconst:
   202  		return rewriteValue386_Op386SHRLconst(v)
   203  	case Op386SHRW:
   204  		return rewriteValue386_Op386SHRW(v)
   205  	case Op386SHRWconst:
   206  		return rewriteValue386_Op386SHRWconst(v)
   207  	case Op386SUBL:
   208  		return rewriteValue386_Op386SUBL(v)
   209  	case Op386SUBLcarry:
   210  		return rewriteValue386_Op386SUBLcarry(v)
   211  	case Op386SUBLconst:
   212  		return rewriteValue386_Op386SUBLconst(v)
   213  	case Op386SUBLload:
   214  		return rewriteValue386_Op386SUBLload(v)
   215  	case Op386SUBLmodify:
   216  		return rewriteValue386_Op386SUBLmodify(v)
   217  	case Op386SUBSD:
   218  		return rewriteValue386_Op386SUBSD(v)
   219  	case Op386SUBSDload:
   220  		return rewriteValue386_Op386SUBSDload(v)
   221  	case Op386SUBSS:
   222  		return rewriteValue386_Op386SUBSS(v)
   223  	case Op386SUBSSload:
   224  		return rewriteValue386_Op386SUBSSload(v)
   225  	case Op386XORL:
   226  		return rewriteValue386_Op386XORL(v)
   227  	case Op386XORLconst:
   228  		return rewriteValue386_Op386XORLconst(v)
   229  	case Op386XORLconstmodify:
   230  		return rewriteValue386_Op386XORLconstmodify(v)
   231  	case Op386XORLload:
   232  		return rewriteValue386_Op386XORLload(v)
   233  	case Op386XORLmodify:
   234  		return rewriteValue386_Op386XORLmodify(v)
   235  	case OpAdd16:
   236  		v.Op = Op386ADDL
   237  		return true
   238  	case OpAdd32:
   239  		v.Op = Op386ADDL
   240  		return true
   241  	case OpAdd32F:
   242  		v.Op = Op386ADDSS
   243  		return true
   244  	case OpAdd32carry:
   245  		v.Op = Op386ADDLcarry
   246  		return true
   247  	case OpAdd32withcarry:
   248  		v.Op = Op386ADCL
   249  		return true
   250  	case OpAdd64F:
   251  		v.Op = Op386ADDSD
   252  		return true
   253  	case OpAdd8:
   254  		v.Op = Op386ADDL
   255  		return true
   256  	case OpAddPtr:
   257  		v.Op = Op386ADDL
   258  		return true
   259  	case OpAddr:
   260  		return rewriteValue386_OpAddr(v)
   261  	case OpAnd16:
   262  		v.Op = Op386ANDL
   263  		return true
   264  	case OpAnd32:
   265  		v.Op = Op386ANDL
   266  		return true
   267  	case OpAnd8:
   268  		v.Op = Op386ANDL
   269  		return true
   270  	case OpAndB:
   271  		v.Op = Op386ANDL
   272  		return true
   273  	case OpAvg32u:
   274  		v.Op = Op386AVGLU
   275  		return true
   276  	case OpBswap32:
   277  		v.Op = Op386BSWAPL
   278  		return true
   279  	case OpClosureCall:
   280  		v.Op = Op386CALLclosure
   281  		return true
   282  	case OpCom16:
   283  		v.Op = Op386NOTL
   284  		return true
   285  	case OpCom32:
   286  		v.Op = Op386NOTL
   287  		return true
   288  	case OpCom8:
   289  		v.Op = Op386NOTL
   290  		return true
   291  	case OpConst16:
   292  		return rewriteValue386_OpConst16(v)
   293  	case OpConst32:
   294  		v.Op = Op386MOVLconst
   295  		return true
   296  	case OpConst32F:
   297  		v.Op = Op386MOVSSconst
   298  		return true
   299  	case OpConst64F:
   300  		v.Op = Op386MOVSDconst
   301  		return true
   302  	case OpConst8:
   303  		return rewriteValue386_OpConst8(v)
   304  	case OpConstBool:
   305  		return rewriteValue386_OpConstBool(v)
   306  	case OpConstNil:
   307  		return rewriteValue386_OpConstNil(v)
   308  	case OpCtz16:
   309  		return rewriteValue386_OpCtz16(v)
   310  	case OpCtz16NonZero:
   311  		v.Op = Op386BSFL
   312  		return true
   313  	case OpCvt32Fto32:
   314  		v.Op = Op386CVTTSS2SL
   315  		return true
   316  	case OpCvt32Fto64F:
   317  		v.Op = Op386CVTSS2SD
   318  		return true
   319  	case OpCvt32to32F:
   320  		v.Op = Op386CVTSL2SS
   321  		return true
   322  	case OpCvt32to64F:
   323  		v.Op = Op386CVTSL2SD
   324  		return true
   325  	case OpCvt64Fto32:
   326  		v.Op = Op386CVTTSD2SL
   327  		return true
   328  	case OpCvt64Fto32F:
   329  		v.Op = Op386CVTSD2SS
   330  		return true
   331  	case OpCvtBoolToUint8:
   332  		v.Op = OpCopy
   333  		return true
   334  	case OpDiv16:
   335  		v.Op = Op386DIVW
   336  		return true
   337  	case OpDiv16u:
   338  		v.Op = Op386DIVWU
   339  		return true
   340  	case OpDiv32:
   341  		v.Op = Op386DIVL
   342  		return true
   343  	case OpDiv32F:
   344  		v.Op = Op386DIVSS
   345  		return true
   346  	case OpDiv32u:
   347  		v.Op = Op386DIVLU
   348  		return true
   349  	case OpDiv64F:
   350  		v.Op = Op386DIVSD
   351  		return true
   352  	case OpDiv8:
   353  		return rewriteValue386_OpDiv8(v)
   354  	case OpDiv8u:
   355  		return rewriteValue386_OpDiv8u(v)
   356  	case OpEq16:
   357  		return rewriteValue386_OpEq16(v)
   358  	case OpEq32:
   359  		return rewriteValue386_OpEq32(v)
   360  	case OpEq32F:
   361  		return rewriteValue386_OpEq32F(v)
   362  	case OpEq64F:
   363  		return rewriteValue386_OpEq64F(v)
   364  	case OpEq8:
   365  		return rewriteValue386_OpEq8(v)
   366  	case OpEqB:
   367  		return rewriteValue386_OpEqB(v)
   368  	case OpEqPtr:
   369  		return rewriteValue386_OpEqPtr(v)
   370  	case OpGetCallerPC:
   371  		v.Op = Op386LoweredGetCallerPC
   372  		return true
   373  	case OpGetCallerSP:
   374  		v.Op = Op386LoweredGetCallerSP
   375  		return true
   376  	case OpGetClosurePtr:
   377  		v.Op = Op386LoweredGetClosurePtr
   378  		return true
   379  	case OpGetG:
   380  		v.Op = Op386LoweredGetG
   381  		return true
   382  	case OpHmul32:
   383  		v.Op = Op386HMULL
   384  		return true
   385  	case OpHmul32u:
   386  		v.Op = Op386HMULLU
   387  		return true
   388  	case OpInterCall:
   389  		v.Op = Op386CALLinter
   390  		return true
   391  	case OpIsInBounds:
   392  		return rewriteValue386_OpIsInBounds(v)
   393  	case OpIsNonNil:
   394  		return rewriteValue386_OpIsNonNil(v)
   395  	case OpIsSliceInBounds:
   396  		return rewriteValue386_OpIsSliceInBounds(v)
   397  	case OpLeq16:
   398  		return rewriteValue386_OpLeq16(v)
   399  	case OpLeq16U:
   400  		return rewriteValue386_OpLeq16U(v)
   401  	case OpLeq32:
   402  		return rewriteValue386_OpLeq32(v)
   403  	case OpLeq32F:
   404  		return rewriteValue386_OpLeq32F(v)
   405  	case OpLeq32U:
   406  		return rewriteValue386_OpLeq32U(v)
   407  	case OpLeq64F:
   408  		return rewriteValue386_OpLeq64F(v)
   409  	case OpLeq8:
   410  		return rewriteValue386_OpLeq8(v)
   411  	case OpLeq8U:
   412  		return rewriteValue386_OpLeq8U(v)
   413  	case OpLess16:
   414  		return rewriteValue386_OpLess16(v)
   415  	case OpLess16U:
   416  		return rewriteValue386_OpLess16U(v)
   417  	case OpLess32:
   418  		return rewriteValue386_OpLess32(v)
   419  	case OpLess32F:
   420  		return rewriteValue386_OpLess32F(v)
   421  	case OpLess32U:
   422  		return rewriteValue386_OpLess32U(v)
   423  	case OpLess64F:
   424  		return rewriteValue386_OpLess64F(v)
   425  	case OpLess8:
   426  		return rewriteValue386_OpLess8(v)
   427  	case OpLess8U:
   428  		return rewriteValue386_OpLess8U(v)
   429  	case OpLoad:
   430  		return rewriteValue386_OpLoad(v)
   431  	case OpLocalAddr:
   432  		return rewriteValue386_OpLocalAddr(v)
   433  	case OpLsh16x16:
   434  		return rewriteValue386_OpLsh16x16(v)
   435  	case OpLsh16x32:
   436  		return rewriteValue386_OpLsh16x32(v)
   437  	case OpLsh16x64:
   438  		return rewriteValue386_OpLsh16x64(v)
   439  	case OpLsh16x8:
   440  		return rewriteValue386_OpLsh16x8(v)
   441  	case OpLsh32x16:
   442  		return rewriteValue386_OpLsh32x16(v)
   443  	case OpLsh32x32:
   444  		return rewriteValue386_OpLsh32x32(v)
   445  	case OpLsh32x64:
   446  		return rewriteValue386_OpLsh32x64(v)
   447  	case OpLsh32x8:
   448  		return rewriteValue386_OpLsh32x8(v)
   449  	case OpLsh8x16:
   450  		return rewriteValue386_OpLsh8x16(v)
   451  	case OpLsh8x32:
   452  		return rewriteValue386_OpLsh8x32(v)
   453  	case OpLsh8x64:
   454  		return rewriteValue386_OpLsh8x64(v)
   455  	case OpLsh8x8:
   456  		return rewriteValue386_OpLsh8x8(v)
   457  	case OpMod16:
   458  		v.Op = Op386MODW
   459  		return true
   460  	case OpMod16u:
   461  		v.Op = Op386MODWU
   462  		return true
   463  	case OpMod32:
   464  		v.Op = Op386MODL
   465  		return true
   466  	case OpMod32u:
   467  		v.Op = Op386MODLU
   468  		return true
   469  	case OpMod8:
   470  		return rewriteValue386_OpMod8(v)
   471  	case OpMod8u:
   472  		return rewriteValue386_OpMod8u(v)
   473  	case OpMove:
   474  		return rewriteValue386_OpMove(v)
   475  	case OpMul16:
   476  		v.Op = Op386MULL
   477  		return true
   478  	case OpMul32:
   479  		v.Op = Op386MULL
   480  		return true
   481  	case OpMul32F:
   482  		v.Op = Op386MULSS
   483  		return true
   484  	case OpMul32uhilo:
   485  		v.Op = Op386MULLQU
   486  		return true
   487  	case OpMul64F:
   488  		v.Op = Op386MULSD
   489  		return true
   490  	case OpMul8:
   491  		v.Op = Op386MULL
   492  		return true
   493  	case OpNeg16:
   494  		v.Op = Op386NEGL
   495  		return true
   496  	case OpNeg32:
   497  		v.Op = Op386NEGL
   498  		return true
   499  	case OpNeg32F:
   500  		return rewriteValue386_OpNeg32F(v)
   501  	case OpNeg64F:
   502  		return rewriteValue386_OpNeg64F(v)
   503  	case OpNeg8:
   504  		v.Op = Op386NEGL
   505  		return true
   506  	case OpNeq16:
   507  		return rewriteValue386_OpNeq16(v)
   508  	case OpNeq32:
   509  		return rewriteValue386_OpNeq32(v)
   510  	case OpNeq32F:
   511  		return rewriteValue386_OpNeq32F(v)
   512  	case OpNeq64F:
   513  		return rewriteValue386_OpNeq64F(v)
   514  	case OpNeq8:
   515  		return rewriteValue386_OpNeq8(v)
   516  	case OpNeqB:
   517  		return rewriteValue386_OpNeqB(v)
   518  	case OpNeqPtr:
   519  		return rewriteValue386_OpNeqPtr(v)
   520  	case OpNilCheck:
   521  		v.Op = Op386LoweredNilCheck
   522  		return true
   523  	case OpNot:
   524  		return rewriteValue386_OpNot(v)
   525  	case OpOffPtr:
   526  		return rewriteValue386_OpOffPtr(v)
   527  	case OpOr16:
   528  		v.Op = Op386ORL
   529  		return true
   530  	case OpOr32:
   531  		v.Op = Op386ORL
   532  		return true
   533  	case OpOr8:
   534  		v.Op = Op386ORL
   535  		return true
   536  	case OpOrB:
   537  		v.Op = Op386ORL
   538  		return true
   539  	case OpPanicBounds:
   540  		return rewriteValue386_OpPanicBounds(v)
   541  	case OpPanicExtend:
   542  		return rewriteValue386_OpPanicExtend(v)
   543  	case OpRotateLeft16:
   544  		return rewriteValue386_OpRotateLeft16(v)
   545  	case OpRotateLeft32:
   546  		return rewriteValue386_OpRotateLeft32(v)
   547  	case OpRotateLeft8:
   548  		return rewriteValue386_OpRotateLeft8(v)
   549  	case OpRound32F:
   550  		v.Op = OpCopy
   551  		return true
   552  	case OpRound64F:
   553  		v.Op = OpCopy
   554  		return true
   555  	case OpRsh16Ux16:
   556  		return rewriteValue386_OpRsh16Ux16(v)
   557  	case OpRsh16Ux32:
   558  		return rewriteValue386_OpRsh16Ux32(v)
   559  	case OpRsh16Ux64:
   560  		return rewriteValue386_OpRsh16Ux64(v)
   561  	case OpRsh16Ux8:
   562  		return rewriteValue386_OpRsh16Ux8(v)
   563  	case OpRsh16x16:
   564  		return rewriteValue386_OpRsh16x16(v)
   565  	case OpRsh16x32:
   566  		return rewriteValue386_OpRsh16x32(v)
   567  	case OpRsh16x64:
   568  		return rewriteValue386_OpRsh16x64(v)
   569  	case OpRsh16x8:
   570  		return rewriteValue386_OpRsh16x8(v)
   571  	case OpRsh32Ux16:
   572  		return rewriteValue386_OpRsh32Ux16(v)
   573  	case OpRsh32Ux32:
   574  		return rewriteValue386_OpRsh32Ux32(v)
   575  	case OpRsh32Ux64:
   576  		return rewriteValue386_OpRsh32Ux64(v)
   577  	case OpRsh32Ux8:
   578  		return rewriteValue386_OpRsh32Ux8(v)
   579  	case OpRsh32x16:
   580  		return rewriteValue386_OpRsh32x16(v)
   581  	case OpRsh32x32:
   582  		return rewriteValue386_OpRsh32x32(v)
   583  	case OpRsh32x64:
   584  		return rewriteValue386_OpRsh32x64(v)
   585  	case OpRsh32x8:
   586  		return rewriteValue386_OpRsh32x8(v)
   587  	case OpRsh8Ux16:
   588  		return rewriteValue386_OpRsh8Ux16(v)
   589  	case OpRsh8Ux32:
   590  		return rewriteValue386_OpRsh8Ux32(v)
   591  	case OpRsh8Ux64:
   592  		return rewriteValue386_OpRsh8Ux64(v)
   593  	case OpRsh8Ux8:
   594  		return rewriteValue386_OpRsh8Ux8(v)
   595  	case OpRsh8x16:
   596  		return rewriteValue386_OpRsh8x16(v)
   597  	case OpRsh8x32:
   598  		return rewriteValue386_OpRsh8x32(v)
   599  	case OpRsh8x64:
   600  		return rewriteValue386_OpRsh8x64(v)
   601  	case OpRsh8x8:
   602  		return rewriteValue386_OpRsh8x8(v)
   603  	case OpSelect0:
   604  		return rewriteValue386_OpSelect0(v)
   605  	case OpSelect1:
   606  		return rewriteValue386_OpSelect1(v)
   607  	case OpSignExt16to32:
   608  		v.Op = Op386MOVWLSX
   609  		return true
   610  	case OpSignExt8to16:
   611  		v.Op = Op386MOVBLSX
   612  		return true
   613  	case OpSignExt8to32:
   614  		v.Op = Op386MOVBLSX
   615  		return true
   616  	case OpSignmask:
   617  		return rewriteValue386_OpSignmask(v)
   618  	case OpSlicemask:
   619  		return rewriteValue386_OpSlicemask(v)
   620  	case OpSqrt:
   621  		v.Op = Op386SQRTSD
   622  		return true
   623  	case OpSqrt32:
   624  		v.Op = Op386SQRTSS
   625  		return true
   626  	case OpStaticCall:
   627  		v.Op = Op386CALLstatic
   628  		return true
   629  	case OpStore:
   630  		return rewriteValue386_OpStore(v)
   631  	case OpSub16:
   632  		v.Op = Op386SUBL
   633  		return true
   634  	case OpSub32:
   635  		v.Op = Op386SUBL
   636  		return true
   637  	case OpSub32F:
   638  		v.Op = Op386SUBSS
   639  		return true
   640  	case OpSub32carry:
   641  		v.Op = Op386SUBLcarry
   642  		return true
   643  	case OpSub32withcarry:
   644  		v.Op = Op386SBBL
   645  		return true
   646  	case OpSub64F:
   647  		v.Op = Op386SUBSD
   648  		return true
   649  	case OpSub8:
   650  		v.Op = Op386SUBL
   651  		return true
   652  	case OpSubPtr:
   653  		v.Op = Op386SUBL
   654  		return true
   655  	case OpTailCall:
   656  		v.Op = Op386CALLtail
   657  		return true
   658  	case OpTrunc16to8:
   659  		v.Op = OpCopy
   660  		return true
   661  	case OpTrunc32to16:
   662  		v.Op = OpCopy
   663  		return true
   664  	case OpTrunc32to8:
   665  		v.Op = OpCopy
   666  		return true
   667  	case OpWB:
   668  		v.Op = Op386LoweredWB
   669  		return true
   670  	case OpXor16:
   671  		v.Op = Op386XORL
   672  		return true
   673  	case OpXor32:
   674  		v.Op = Op386XORL
   675  		return true
   676  	case OpXor8:
   677  		v.Op = Op386XORL
   678  		return true
   679  	case OpZero:
   680  		return rewriteValue386_OpZero(v)
   681  	case OpZeroExt16to32:
   682  		v.Op = Op386MOVWLZX
   683  		return true
   684  	case OpZeroExt8to16:
   685  		v.Op = Op386MOVBLZX
   686  		return true
   687  	case OpZeroExt8to32:
   688  		v.Op = Op386MOVBLZX
   689  		return true
   690  	case OpZeromask:
   691  		return rewriteValue386_OpZeromask(v)
   692  	}
   693  	return false
   694  }
   695  func rewriteValue386_Op386ADCL(v *Value) bool {
   696  	v_2 := v.Args[2]
   697  	v_1 := v.Args[1]
   698  	v_0 := v.Args[0]
   699  	// match: (ADCL x (MOVLconst [c]) f)
   700  	// result: (ADCLconst [c] x f)
   701  	for {
   702  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   703  			x := v_0
   704  			if v_1.Op != Op386MOVLconst {
   705  				continue
   706  			}
   707  			c := auxIntToInt32(v_1.AuxInt)
   708  			f := v_2
   709  			v.reset(Op386ADCLconst)
   710  			v.AuxInt = int32ToAuxInt(c)
   711  			v.AddArg2(x, f)
   712  			return true
   713  		}
   714  		break
   715  	}
   716  	return false
   717  }
   718  func rewriteValue386_Op386ADDL(v *Value) bool {
   719  	v_1 := v.Args[1]
   720  	v_0 := v.Args[0]
   721  	// match: (ADDL x (MOVLconst [c]))
   722  	// result: (ADDLconst [c] x)
   723  	for {
   724  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   725  			x := v_0
   726  			if v_1.Op != Op386MOVLconst {
   727  				continue
   728  			}
   729  			c := auxIntToInt32(v_1.AuxInt)
   730  			v.reset(Op386ADDLconst)
   731  			v.AuxInt = int32ToAuxInt(c)
   732  			v.AddArg(x)
   733  			return true
   734  		}
   735  		break
   736  	}
   737  	// match: (ADDL (SHLLconst [c] x) (SHRLconst [d] x))
   738  	// cond: d == 32-c
   739  	// result: (ROLLconst [c] x)
   740  	for {
   741  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   742  			if v_0.Op != Op386SHLLconst {
   743  				continue
   744  			}
   745  			c := auxIntToInt32(v_0.AuxInt)
   746  			x := v_0.Args[0]
   747  			if v_1.Op != Op386SHRLconst {
   748  				continue
   749  			}
   750  			d := auxIntToInt32(v_1.AuxInt)
   751  			if x != v_1.Args[0] || !(d == 32-c) {
   752  				continue
   753  			}
   754  			v.reset(Op386ROLLconst)
   755  			v.AuxInt = int32ToAuxInt(c)
   756  			v.AddArg(x)
   757  			return true
   758  		}
   759  		break
   760  	}
   761  	// match: (ADDL <t> (SHLLconst x [c]) (SHRWconst x [d]))
   762  	// cond: c < 16 && d == int16(16-c) && t.Size() == 2
   763  	// result: (ROLWconst x [int16(c)])
   764  	for {
   765  		t := v.Type
   766  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   767  			if v_0.Op != Op386SHLLconst {
   768  				continue
   769  			}
   770  			c := auxIntToInt32(v_0.AuxInt)
   771  			x := v_0.Args[0]
   772  			if v_1.Op != Op386SHRWconst {
   773  				continue
   774  			}
   775  			d := auxIntToInt16(v_1.AuxInt)
   776  			if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
   777  				continue
   778  			}
   779  			v.reset(Op386ROLWconst)
   780  			v.AuxInt = int16ToAuxInt(int16(c))
   781  			v.AddArg(x)
   782  			return true
   783  		}
   784  		break
   785  	}
   786  	// match: (ADDL <t> (SHLLconst x [c]) (SHRBconst x [d]))
   787  	// cond: c < 8 && d == int8(8-c) && t.Size() == 1
   788  	// result: (ROLBconst x [int8(c)])
   789  	for {
   790  		t := v.Type
   791  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   792  			if v_0.Op != Op386SHLLconst {
   793  				continue
   794  			}
   795  			c := auxIntToInt32(v_0.AuxInt)
   796  			x := v_0.Args[0]
   797  			if v_1.Op != Op386SHRBconst {
   798  				continue
   799  			}
   800  			d := auxIntToInt8(v_1.AuxInt)
   801  			if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
   802  				continue
   803  			}
   804  			v.reset(Op386ROLBconst)
   805  			v.AuxInt = int8ToAuxInt(int8(c))
   806  			v.AddArg(x)
   807  			return true
   808  		}
   809  		break
   810  	}
   811  	// match: (ADDL x (SHLLconst [3] y))
   812  	// result: (LEAL8 x y)
   813  	for {
   814  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   815  			x := v_0
   816  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
   817  				continue
   818  			}
   819  			y := v_1.Args[0]
   820  			v.reset(Op386LEAL8)
   821  			v.AddArg2(x, y)
   822  			return true
   823  		}
   824  		break
   825  	}
   826  	// match: (ADDL x (SHLLconst [2] y))
   827  	// result: (LEAL4 x y)
   828  	for {
   829  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   830  			x := v_0
   831  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
   832  				continue
   833  			}
   834  			y := v_1.Args[0]
   835  			v.reset(Op386LEAL4)
   836  			v.AddArg2(x, y)
   837  			return true
   838  		}
   839  		break
   840  	}
   841  	// match: (ADDL x (SHLLconst [1] y))
   842  	// result: (LEAL2 x y)
   843  	for {
   844  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   845  			x := v_0
   846  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
   847  				continue
   848  			}
   849  			y := v_1.Args[0]
   850  			v.reset(Op386LEAL2)
   851  			v.AddArg2(x, y)
   852  			return true
   853  		}
   854  		break
   855  	}
   856  	// match: (ADDL x (ADDL y y))
   857  	// result: (LEAL2 x y)
   858  	for {
   859  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   860  			x := v_0
   861  			if v_1.Op != Op386ADDL {
   862  				continue
   863  			}
   864  			y := v_1.Args[1]
   865  			if y != v_1.Args[0] {
   866  				continue
   867  			}
   868  			v.reset(Op386LEAL2)
   869  			v.AddArg2(x, y)
   870  			return true
   871  		}
   872  		break
   873  	}
   874  	// match: (ADDL x (ADDL x y))
   875  	// result: (LEAL2 y x)
   876  	for {
   877  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   878  			x := v_0
   879  			if v_1.Op != Op386ADDL {
   880  				continue
   881  			}
   882  			_ = v_1.Args[1]
   883  			v_1_0 := v_1.Args[0]
   884  			v_1_1 := v_1.Args[1]
   885  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
   886  				if x != v_1_0 {
   887  					continue
   888  				}
   889  				y := v_1_1
   890  				v.reset(Op386LEAL2)
   891  				v.AddArg2(y, x)
   892  				return true
   893  			}
   894  		}
   895  		break
   896  	}
   897  	// match: (ADDL (ADDLconst [c] x) y)
   898  	// result: (LEAL1 [c] x y)
   899  	for {
   900  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   901  			if v_0.Op != Op386ADDLconst {
   902  				continue
   903  			}
   904  			c := auxIntToInt32(v_0.AuxInt)
   905  			x := v_0.Args[0]
   906  			y := v_1
   907  			v.reset(Op386LEAL1)
   908  			v.AuxInt = int32ToAuxInt(c)
   909  			v.AddArg2(x, y)
   910  			return true
   911  		}
   912  		break
   913  	}
   914  	// match: (ADDL x (LEAL [c] {s} y))
   915  	// cond: x.Op != OpSB && y.Op != OpSB
   916  	// result: (LEAL1 [c] {s} x y)
   917  	for {
   918  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   919  			x := v_0
   920  			if v_1.Op != Op386LEAL {
   921  				continue
   922  			}
   923  			c := auxIntToInt32(v_1.AuxInt)
   924  			s := auxToSym(v_1.Aux)
   925  			y := v_1.Args[0]
   926  			if !(x.Op != OpSB && y.Op != OpSB) {
   927  				continue
   928  			}
   929  			v.reset(Op386LEAL1)
   930  			v.AuxInt = int32ToAuxInt(c)
   931  			v.Aux = symToAux(s)
   932  			v.AddArg2(x, y)
   933  			return true
   934  		}
   935  		break
   936  	}
   937  	// match: (ADDL x l:(MOVLload [off] {sym} ptr mem))
   938  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
   939  	// result: (ADDLload x [off] {sym} ptr mem)
   940  	for {
   941  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   942  			x := v_0
   943  			l := v_1
   944  			if l.Op != Op386MOVLload {
   945  				continue
   946  			}
   947  			off := auxIntToInt32(l.AuxInt)
   948  			sym := auxToSym(l.Aux)
   949  			mem := l.Args[1]
   950  			ptr := l.Args[0]
   951  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
   952  				continue
   953  			}
   954  			v.reset(Op386ADDLload)
   955  			v.AuxInt = int32ToAuxInt(off)
   956  			v.Aux = symToAux(sym)
   957  			v.AddArg3(x, ptr, mem)
   958  			return true
   959  		}
   960  		break
   961  	}
   962  	// match: (ADDL x (NEGL y))
   963  	// result: (SUBL x y)
   964  	for {
   965  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   966  			x := v_0
   967  			if v_1.Op != Op386NEGL {
   968  				continue
   969  			}
   970  			y := v_1.Args[0]
   971  			v.reset(Op386SUBL)
   972  			v.AddArg2(x, y)
   973  			return true
   974  		}
   975  		break
   976  	}
   977  	return false
   978  }
   979  func rewriteValue386_Op386ADDLcarry(v *Value) bool {
   980  	v_1 := v.Args[1]
   981  	v_0 := v.Args[0]
   982  	// match: (ADDLcarry x (MOVLconst [c]))
   983  	// result: (ADDLconstcarry [c] x)
   984  	for {
   985  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   986  			x := v_0
   987  			if v_1.Op != Op386MOVLconst {
   988  				continue
   989  			}
   990  			c := auxIntToInt32(v_1.AuxInt)
   991  			v.reset(Op386ADDLconstcarry)
   992  			v.AuxInt = int32ToAuxInt(c)
   993  			v.AddArg(x)
   994  			return true
   995  		}
   996  		break
   997  	}
   998  	return false
   999  }
  1000  func rewriteValue386_Op386ADDLconst(v *Value) bool {
  1001  	v_0 := v.Args[0]
  1002  	// match: (ADDLconst [c] (ADDL x y))
  1003  	// result: (LEAL1 [c] x y)
  1004  	for {
  1005  		c := auxIntToInt32(v.AuxInt)
  1006  		if v_0.Op != Op386ADDL {
  1007  			break
  1008  		}
  1009  		y := v_0.Args[1]
  1010  		x := v_0.Args[0]
  1011  		v.reset(Op386LEAL1)
  1012  		v.AuxInt = int32ToAuxInt(c)
  1013  		v.AddArg2(x, y)
  1014  		return true
  1015  	}
  1016  	// match: (ADDLconst [c] (LEAL [d] {s} x))
  1017  	// cond: is32Bit(int64(c)+int64(d))
  1018  	// result: (LEAL [c+d] {s} x)
  1019  	for {
  1020  		c := auxIntToInt32(v.AuxInt)
  1021  		if v_0.Op != Op386LEAL {
  1022  			break
  1023  		}
  1024  		d := auxIntToInt32(v_0.AuxInt)
  1025  		s := auxToSym(v_0.Aux)
  1026  		x := v_0.Args[0]
  1027  		if !(is32Bit(int64(c) + int64(d))) {
  1028  			break
  1029  		}
  1030  		v.reset(Op386LEAL)
  1031  		v.AuxInt = int32ToAuxInt(c + d)
  1032  		v.Aux = symToAux(s)
  1033  		v.AddArg(x)
  1034  		return true
  1035  	}
  1036  	// match: (ADDLconst [c] x:(SP))
  1037  	// result: (LEAL [c] x)
  1038  	for {
  1039  		c := auxIntToInt32(v.AuxInt)
  1040  		x := v_0
  1041  		if x.Op != OpSP {
  1042  			break
  1043  		}
  1044  		v.reset(Op386LEAL)
  1045  		v.AuxInt = int32ToAuxInt(c)
  1046  		v.AddArg(x)
  1047  		return true
  1048  	}
  1049  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
  1050  	// cond: is32Bit(int64(c)+int64(d))
  1051  	// result: (LEAL1 [c+d] {s} x y)
  1052  	for {
  1053  		c := auxIntToInt32(v.AuxInt)
  1054  		if v_0.Op != Op386LEAL1 {
  1055  			break
  1056  		}
  1057  		d := auxIntToInt32(v_0.AuxInt)
  1058  		s := auxToSym(v_0.Aux)
  1059  		y := v_0.Args[1]
  1060  		x := v_0.Args[0]
  1061  		if !(is32Bit(int64(c) + int64(d))) {
  1062  			break
  1063  		}
  1064  		v.reset(Op386LEAL1)
  1065  		v.AuxInt = int32ToAuxInt(c + d)
  1066  		v.Aux = symToAux(s)
  1067  		v.AddArg2(x, y)
  1068  		return true
  1069  	}
  1070  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
  1071  	// cond: is32Bit(int64(c)+int64(d))
  1072  	// result: (LEAL2 [c+d] {s} x y)
  1073  	for {
  1074  		c := auxIntToInt32(v.AuxInt)
  1075  		if v_0.Op != Op386LEAL2 {
  1076  			break
  1077  		}
  1078  		d := auxIntToInt32(v_0.AuxInt)
  1079  		s := auxToSym(v_0.Aux)
  1080  		y := v_0.Args[1]
  1081  		x := v_0.Args[0]
  1082  		if !(is32Bit(int64(c) + int64(d))) {
  1083  			break
  1084  		}
  1085  		v.reset(Op386LEAL2)
  1086  		v.AuxInt = int32ToAuxInt(c + d)
  1087  		v.Aux = symToAux(s)
  1088  		v.AddArg2(x, y)
  1089  		return true
  1090  	}
  1091  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
  1092  	// cond: is32Bit(int64(c)+int64(d))
  1093  	// result: (LEAL4 [c+d] {s} x y)
  1094  	for {
  1095  		c := auxIntToInt32(v.AuxInt)
  1096  		if v_0.Op != Op386LEAL4 {
  1097  			break
  1098  		}
  1099  		d := auxIntToInt32(v_0.AuxInt)
  1100  		s := auxToSym(v_0.Aux)
  1101  		y := v_0.Args[1]
  1102  		x := v_0.Args[0]
  1103  		if !(is32Bit(int64(c) + int64(d))) {
  1104  			break
  1105  		}
  1106  		v.reset(Op386LEAL4)
  1107  		v.AuxInt = int32ToAuxInt(c + d)
  1108  		v.Aux = symToAux(s)
  1109  		v.AddArg2(x, y)
  1110  		return true
  1111  	}
  1112  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1113  	// cond: is32Bit(int64(c)+int64(d))
  1114  	// result: (LEAL8 [c+d] {s} x y)
  1115  	for {
  1116  		c := auxIntToInt32(v.AuxInt)
  1117  		if v_0.Op != Op386LEAL8 {
  1118  			break
  1119  		}
  1120  		d := auxIntToInt32(v_0.AuxInt)
  1121  		s := auxToSym(v_0.Aux)
  1122  		y := v_0.Args[1]
  1123  		x := v_0.Args[0]
  1124  		if !(is32Bit(int64(c) + int64(d))) {
  1125  			break
  1126  		}
  1127  		v.reset(Op386LEAL8)
  1128  		v.AuxInt = int32ToAuxInt(c + d)
  1129  		v.Aux = symToAux(s)
  1130  		v.AddArg2(x, y)
  1131  		return true
  1132  	}
  1133  	// match: (ADDLconst [c] x)
  1134  	// cond: c==0
  1135  	// result: x
  1136  	for {
  1137  		c := auxIntToInt32(v.AuxInt)
  1138  		x := v_0
  1139  		if !(c == 0) {
  1140  			break
  1141  		}
  1142  		v.copyOf(x)
  1143  		return true
  1144  	}
  1145  	// match: (ADDLconst [c] (MOVLconst [d]))
  1146  	// result: (MOVLconst [c+d])
  1147  	for {
  1148  		c := auxIntToInt32(v.AuxInt)
  1149  		if v_0.Op != Op386MOVLconst {
  1150  			break
  1151  		}
  1152  		d := auxIntToInt32(v_0.AuxInt)
  1153  		v.reset(Op386MOVLconst)
  1154  		v.AuxInt = int32ToAuxInt(c + d)
  1155  		return true
  1156  	}
  1157  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1158  	// result: (ADDLconst [c+d] x)
  1159  	for {
  1160  		c := auxIntToInt32(v.AuxInt)
  1161  		if v_0.Op != Op386ADDLconst {
  1162  			break
  1163  		}
  1164  		d := auxIntToInt32(v_0.AuxInt)
  1165  		x := v_0.Args[0]
  1166  		v.reset(Op386ADDLconst)
  1167  		v.AuxInt = int32ToAuxInt(c + d)
  1168  		v.AddArg(x)
  1169  		return true
  1170  	}
  1171  	return false
  1172  }
  1173  func rewriteValue386_Op386ADDLconstmodify(v *Value) bool {
  1174  	v_1 := v.Args[1]
  1175  	v_0 := v.Args[0]
  1176  	b := v.Block
  1177  	config := b.Func.Config
  1178  	// match: (ADDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1179  	// cond: valoff1.canAdd32(off2)
  1180  	// result: (ADDLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  1181  	for {
  1182  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1183  		sym := auxToSym(v.Aux)
  1184  		if v_0.Op != Op386ADDLconst {
  1185  			break
  1186  		}
  1187  		off2 := auxIntToInt32(v_0.AuxInt)
  1188  		base := v_0.Args[0]
  1189  		mem := v_1
  1190  		if !(valoff1.canAdd32(off2)) {
  1191  			break
  1192  		}
  1193  		v.reset(Op386ADDLconstmodify)
  1194  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1195  		v.Aux = symToAux(sym)
  1196  		v.AddArg2(base, mem)
  1197  		return true
  1198  	}
  1199  	// match: (ADDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1200  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1201  	// result: (ADDLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  1202  	for {
  1203  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1204  		sym1 := auxToSym(v.Aux)
  1205  		if v_0.Op != Op386LEAL {
  1206  			break
  1207  		}
  1208  		off2 := auxIntToInt32(v_0.AuxInt)
  1209  		sym2 := auxToSym(v_0.Aux)
  1210  		base := v_0.Args[0]
  1211  		mem := v_1
  1212  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1213  			break
  1214  		}
  1215  		v.reset(Op386ADDLconstmodify)
  1216  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1217  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1218  		v.AddArg2(base, mem)
  1219  		return true
  1220  	}
  1221  	return false
  1222  }
  1223  func rewriteValue386_Op386ADDLload(v *Value) bool {
  1224  	v_2 := v.Args[2]
  1225  	v_1 := v.Args[1]
  1226  	v_0 := v.Args[0]
  1227  	b := v.Block
  1228  	config := b.Func.Config
  1229  	// match: (ADDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1230  	// cond: is32Bit(int64(off1)+int64(off2))
  1231  	// result: (ADDLload [off1+off2] {sym} val base mem)
  1232  	for {
  1233  		off1 := auxIntToInt32(v.AuxInt)
  1234  		sym := auxToSym(v.Aux)
  1235  		val := v_0
  1236  		if v_1.Op != Op386ADDLconst {
  1237  			break
  1238  		}
  1239  		off2 := auxIntToInt32(v_1.AuxInt)
  1240  		base := v_1.Args[0]
  1241  		mem := v_2
  1242  		if !(is32Bit(int64(off1) + int64(off2))) {
  1243  			break
  1244  		}
  1245  		v.reset(Op386ADDLload)
  1246  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1247  		v.Aux = symToAux(sym)
  1248  		v.AddArg3(val, base, mem)
  1249  		return true
  1250  	}
  1251  	// match: (ADDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1252  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1253  	// result: (ADDLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1254  	for {
  1255  		off1 := auxIntToInt32(v.AuxInt)
  1256  		sym1 := auxToSym(v.Aux)
  1257  		val := v_0
  1258  		if v_1.Op != Op386LEAL {
  1259  			break
  1260  		}
  1261  		off2 := auxIntToInt32(v_1.AuxInt)
  1262  		sym2 := auxToSym(v_1.Aux)
  1263  		base := v_1.Args[0]
  1264  		mem := v_2
  1265  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1266  			break
  1267  		}
  1268  		v.reset(Op386ADDLload)
  1269  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1270  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1271  		v.AddArg3(val, base, mem)
  1272  		return true
  1273  	}
  1274  	return false
  1275  }
  1276  func rewriteValue386_Op386ADDLmodify(v *Value) bool {
  1277  	v_2 := v.Args[2]
  1278  	v_1 := v.Args[1]
  1279  	v_0 := v.Args[0]
  1280  	b := v.Block
  1281  	config := b.Func.Config
  1282  	// match: (ADDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1283  	// cond: is32Bit(int64(off1)+int64(off2))
  1284  	// result: (ADDLmodify [off1+off2] {sym} base val mem)
  1285  	for {
  1286  		off1 := auxIntToInt32(v.AuxInt)
  1287  		sym := auxToSym(v.Aux)
  1288  		if v_0.Op != Op386ADDLconst {
  1289  			break
  1290  		}
  1291  		off2 := auxIntToInt32(v_0.AuxInt)
  1292  		base := v_0.Args[0]
  1293  		val := v_1
  1294  		mem := v_2
  1295  		if !(is32Bit(int64(off1) + int64(off2))) {
  1296  			break
  1297  		}
  1298  		v.reset(Op386ADDLmodify)
  1299  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1300  		v.Aux = symToAux(sym)
  1301  		v.AddArg3(base, val, mem)
  1302  		return true
  1303  	}
  1304  	// match: (ADDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1305  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1306  	// result: (ADDLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  1307  	for {
  1308  		off1 := auxIntToInt32(v.AuxInt)
  1309  		sym1 := auxToSym(v.Aux)
  1310  		if v_0.Op != Op386LEAL {
  1311  			break
  1312  		}
  1313  		off2 := auxIntToInt32(v_0.AuxInt)
  1314  		sym2 := auxToSym(v_0.Aux)
  1315  		base := v_0.Args[0]
  1316  		val := v_1
  1317  		mem := v_2
  1318  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1319  			break
  1320  		}
  1321  		v.reset(Op386ADDLmodify)
  1322  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1323  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1324  		v.AddArg3(base, val, mem)
  1325  		return true
  1326  	}
  1327  	return false
  1328  }
  1329  func rewriteValue386_Op386ADDSD(v *Value) bool {
  1330  	v_1 := v.Args[1]
  1331  	v_0 := v.Args[0]
  1332  	// match: (ADDSD x l:(MOVSDload [off] {sym} ptr mem))
  1333  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1334  	// result: (ADDSDload x [off] {sym} ptr mem)
  1335  	for {
  1336  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1337  			x := v_0
  1338  			l := v_1
  1339  			if l.Op != Op386MOVSDload {
  1340  				continue
  1341  			}
  1342  			off := auxIntToInt32(l.AuxInt)
  1343  			sym := auxToSym(l.Aux)
  1344  			mem := l.Args[1]
  1345  			ptr := l.Args[0]
  1346  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1347  				continue
  1348  			}
  1349  			v.reset(Op386ADDSDload)
  1350  			v.AuxInt = int32ToAuxInt(off)
  1351  			v.Aux = symToAux(sym)
  1352  			v.AddArg3(x, ptr, mem)
  1353  			return true
  1354  		}
  1355  		break
  1356  	}
  1357  	return false
  1358  }
  1359  func rewriteValue386_Op386ADDSDload(v *Value) bool {
  1360  	v_2 := v.Args[2]
  1361  	v_1 := v.Args[1]
  1362  	v_0 := v.Args[0]
  1363  	b := v.Block
  1364  	config := b.Func.Config
  1365  	// match: (ADDSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  1366  	// cond: is32Bit(int64(off1)+int64(off2))
  1367  	// result: (ADDSDload [off1+off2] {sym} val base mem)
  1368  	for {
  1369  		off1 := auxIntToInt32(v.AuxInt)
  1370  		sym := auxToSym(v.Aux)
  1371  		val := v_0
  1372  		if v_1.Op != Op386ADDLconst {
  1373  			break
  1374  		}
  1375  		off2 := auxIntToInt32(v_1.AuxInt)
  1376  		base := v_1.Args[0]
  1377  		mem := v_2
  1378  		if !(is32Bit(int64(off1) + int64(off2))) {
  1379  			break
  1380  		}
  1381  		v.reset(Op386ADDSDload)
  1382  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1383  		v.Aux = symToAux(sym)
  1384  		v.AddArg3(val, base, mem)
  1385  		return true
  1386  	}
  1387  	// match: (ADDSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1388  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1389  	// result: (ADDSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1390  	for {
  1391  		off1 := auxIntToInt32(v.AuxInt)
  1392  		sym1 := auxToSym(v.Aux)
  1393  		val := v_0
  1394  		if v_1.Op != Op386LEAL {
  1395  			break
  1396  		}
  1397  		off2 := auxIntToInt32(v_1.AuxInt)
  1398  		sym2 := auxToSym(v_1.Aux)
  1399  		base := v_1.Args[0]
  1400  		mem := v_2
  1401  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1402  			break
  1403  		}
  1404  		v.reset(Op386ADDSDload)
  1405  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1406  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1407  		v.AddArg3(val, base, mem)
  1408  		return true
  1409  	}
  1410  	return false
  1411  }
  1412  func rewriteValue386_Op386ADDSS(v *Value) bool {
  1413  	v_1 := v.Args[1]
  1414  	v_0 := v.Args[0]
  1415  	// match: (ADDSS x l:(MOVSSload [off] {sym} ptr mem))
  1416  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1417  	// result: (ADDSSload x [off] {sym} ptr mem)
  1418  	for {
  1419  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1420  			x := v_0
  1421  			l := v_1
  1422  			if l.Op != Op386MOVSSload {
  1423  				continue
  1424  			}
  1425  			off := auxIntToInt32(l.AuxInt)
  1426  			sym := auxToSym(l.Aux)
  1427  			mem := l.Args[1]
  1428  			ptr := l.Args[0]
  1429  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1430  				continue
  1431  			}
  1432  			v.reset(Op386ADDSSload)
  1433  			v.AuxInt = int32ToAuxInt(off)
  1434  			v.Aux = symToAux(sym)
  1435  			v.AddArg3(x, ptr, mem)
  1436  			return true
  1437  		}
  1438  		break
  1439  	}
  1440  	return false
  1441  }
  1442  func rewriteValue386_Op386ADDSSload(v *Value) bool {
  1443  	v_2 := v.Args[2]
  1444  	v_1 := v.Args[1]
  1445  	v_0 := v.Args[0]
  1446  	b := v.Block
  1447  	config := b.Func.Config
  1448  	// match: (ADDSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  1449  	// cond: is32Bit(int64(off1)+int64(off2))
  1450  	// result: (ADDSSload [off1+off2] {sym} val base mem)
  1451  	for {
  1452  		off1 := auxIntToInt32(v.AuxInt)
  1453  		sym := auxToSym(v.Aux)
  1454  		val := v_0
  1455  		if v_1.Op != Op386ADDLconst {
  1456  			break
  1457  		}
  1458  		off2 := auxIntToInt32(v_1.AuxInt)
  1459  		base := v_1.Args[0]
  1460  		mem := v_2
  1461  		if !(is32Bit(int64(off1) + int64(off2))) {
  1462  			break
  1463  		}
  1464  		v.reset(Op386ADDSSload)
  1465  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1466  		v.Aux = symToAux(sym)
  1467  		v.AddArg3(val, base, mem)
  1468  		return true
  1469  	}
  1470  	// match: (ADDSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1471  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1472  	// result: (ADDSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1473  	for {
  1474  		off1 := auxIntToInt32(v.AuxInt)
  1475  		sym1 := auxToSym(v.Aux)
  1476  		val := v_0
  1477  		if v_1.Op != Op386LEAL {
  1478  			break
  1479  		}
  1480  		off2 := auxIntToInt32(v_1.AuxInt)
  1481  		sym2 := auxToSym(v_1.Aux)
  1482  		base := v_1.Args[0]
  1483  		mem := v_2
  1484  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1485  			break
  1486  		}
  1487  		v.reset(Op386ADDSSload)
  1488  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1489  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1490  		v.AddArg3(val, base, mem)
  1491  		return true
  1492  	}
  1493  	return false
  1494  }
  1495  func rewriteValue386_Op386ANDL(v *Value) bool {
  1496  	v_1 := v.Args[1]
  1497  	v_0 := v.Args[0]
  1498  	// match: (ANDL x (MOVLconst [c]))
  1499  	// result: (ANDLconst [c] x)
  1500  	for {
  1501  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1502  			x := v_0
  1503  			if v_1.Op != Op386MOVLconst {
  1504  				continue
  1505  			}
  1506  			c := auxIntToInt32(v_1.AuxInt)
  1507  			v.reset(Op386ANDLconst)
  1508  			v.AuxInt = int32ToAuxInt(c)
  1509  			v.AddArg(x)
  1510  			return true
  1511  		}
  1512  		break
  1513  	}
  1514  	// match: (ANDL x l:(MOVLload [off] {sym} ptr mem))
  1515  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1516  	// result: (ANDLload x [off] {sym} ptr mem)
  1517  	for {
  1518  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1519  			x := v_0
  1520  			l := v_1
  1521  			if l.Op != Op386MOVLload {
  1522  				continue
  1523  			}
  1524  			off := auxIntToInt32(l.AuxInt)
  1525  			sym := auxToSym(l.Aux)
  1526  			mem := l.Args[1]
  1527  			ptr := l.Args[0]
  1528  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1529  				continue
  1530  			}
  1531  			v.reset(Op386ANDLload)
  1532  			v.AuxInt = int32ToAuxInt(off)
  1533  			v.Aux = symToAux(sym)
  1534  			v.AddArg3(x, ptr, mem)
  1535  			return true
  1536  		}
  1537  		break
  1538  	}
  1539  	// match: (ANDL x x)
  1540  	// result: x
  1541  	for {
  1542  		x := v_0
  1543  		if x != v_1 {
  1544  			break
  1545  		}
  1546  		v.copyOf(x)
  1547  		return true
  1548  	}
  1549  	return false
  1550  }
  1551  func rewriteValue386_Op386ANDLconst(v *Value) bool {
  1552  	v_0 := v.Args[0]
  1553  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1554  	// result: (ANDLconst [c & d] x)
  1555  	for {
  1556  		c := auxIntToInt32(v.AuxInt)
  1557  		if v_0.Op != Op386ANDLconst {
  1558  			break
  1559  		}
  1560  		d := auxIntToInt32(v_0.AuxInt)
  1561  		x := v_0.Args[0]
  1562  		v.reset(Op386ANDLconst)
  1563  		v.AuxInt = int32ToAuxInt(c & d)
  1564  		v.AddArg(x)
  1565  		return true
  1566  	}
  1567  	// match: (ANDLconst [c] _)
  1568  	// cond: c==0
  1569  	// result: (MOVLconst [0])
  1570  	for {
  1571  		c := auxIntToInt32(v.AuxInt)
  1572  		if !(c == 0) {
  1573  			break
  1574  		}
  1575  		v.reset(Op386MOVLconst)
  1576  		v.AuxInt = int32ToAuxInt(0)
  1577  		return true
  1578  	}
  1579  	// match: (ANDLconst [c] x)
  1580  	// cond: c==-1
  1581  	// result: x
  1582  	for {
  1583  		c := auxIntToInt32(v.AuxInt)
  1584  		x := v_0
  1585  		if !(c == -1) {
  1586  			break
  1587  		}
  1588  		v.copyOf(x)
  1589  		return true
  1590  	}
  1591  	// match: (ANDLconst [c] (MOVLconst [d]))
  1592  	// result: (MOVLconst [c&d])
  1593  	for {
  1594  		c := auxIntToInt32(v.AuxInt)
  1595  		if v_0.Op != Op386MOVLconst {
  1596  			break
  1597  		}
  1598  		d := auxIntToInt32(v_0.AuxInt)
  1599  		v.reset(Op386MOVLconst)
  1600  		v.AuxInt = int32ToAuxInt(c & d)
  1601  		return true
  1602  	}
  1603  	return false
  1604  }
  1605  func rewriteValue386_Op386ANDLconstmodify(v *Value) bool {
  1606  	v_1 := v.Args[1]
  1607  	v_0 := v.Args[0]
  1608  	b := v.Block
  1609  	config := b.Func.Config
  1610  	// match: (ANDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1611  	// cond: valoff1.canAdd32(off2)
  1612  	// result: (ANDLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  1613  	for {
  1614  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1615  		sym := auxToSym(v.Aux)
  1616  		if v_0.Op != Op386ADDLconst {
  1617  			break
  1618  		}
  1619  		off2 := auxIntToInt32(v_0.AuxInt)
  1620  		base := v_0.Args[0]
  1621  		mem := v_1
  1622  		if !(valoff1.canAdd32(off2)) {
  1623  			break
  1624  		}
  1625  		v.reset(Op386ANDLconstmodify)
  1626  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1627  		v.Aux = symToAux(sym)
  1628  		v.AddArg2(base, mem)
  1629  		return true
  1630  	}
  1631  	// match: (ANDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1632  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1633  	// result: (ANDLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  1634  	for {
  1635  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1636  		sym1 := auxToSym(v.Aux)
  1637  		if v_0.Op != Op386LEAL {
  1638  			break
  1639  		}
  1640  		off2 := auxIntToInt32(v_0.AuxInt)
  1641  		sym2 := auxToSym(v_0.Aux)
  1642  		base := v_0.Args[0]
  1643  		mem := v_1
  1644  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1645  			break
  1646  		}
  1647  		v.reset(Op386ANDLconstmodify)
  1648  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1649  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1650  		v.AddArg2(base, mem)
  1651  		return true
  1652  	}
  1653  	return false
  1654  }
  1655  func rewriteValue386_Op386ANDLload(v *Value) bool {
  1656  	v_2 := v.Args[2]
  1657  	v_1 := v.Args[1]
  1658  	v_0 := v.Args[0]
  1659  	b := v.Block
  1660  	config := b.Func.Config
  1661  	// match: (ANDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1662  	// cond: is32Bit(int64(off1)+int64(off2))
  1663  	// result: (ANDLload [off1+off2] {sym} val base mem)
  1664  	for {
  1665  		off1 := auxIntToInt32(v.AuxInt)
  1666  		sym := auxToSym(v.Aux)
  1667  		val := v_0
  1668  		if v_1.Op != Op386ADDLconst {
  1669  			break
  1670  		}
  1671  		off2 := auxIntToInt32(v_1.AuxInt)
  1672  		base := v_1.Args[0]
  1673  		mem := v_2
  1674  		if !(is32Bit(int64(off1) + int64(off2))) {
  1675  			break
  1676  		}
  1677  		v.reset(Op386ANDLload)
  1678  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1679  		v.Aux = symToAux(sym)
  1680  		v.AddArg3(val, base, mem)
  1681  		return true
  1682  	}
  1683  	// match: (ANDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1684  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1685  	// result: (ANDLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1686  	for {
  1687  		off1 := auxIntToInt32(v.AuxInt)
  1688  		sym1 := auxToSym(v.Aux)
  1689  		val := v_0
  1690  		if v_1.Op != Op386LEAL {
  1691  			break
  1692  		}
  1693  		off2 := auxIntToInt32(v_1.AuxInt)
  1694  		sym2 := auxToSym(v_1.Aux)
  1695  		base := v_1.Args[0]
  1696  		mem := v_2
  1697  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1698  			break
  1699  		}
  1700  		v.reset(Op386ANDLload)
  1701  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1702  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1703  		v.AddArg3(val, base, mem)
  1704  		return true
  1705  	}
  1706  	return false
  1707  }
  1708  func rewriteValue386_Op386ANDLmodify(v *Value) bool {
  1709  	v_2 := v.Args[2]
  1710  	v_1 := v.Args[1]
  1711  	v_0 := v.Args[0]
  1712  	b := v.Block
  1713  	config := b.Func.Config
  1714  	// match: (ANDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1715  	// cond: is32Bit(int64(off1)+int64(off2))
  1716  	// result: (ANDLmodify [off1+off2] {sym} base val mem)
  1717  	for {
  1718  		off1 := auxIntToInt32(v.AuxInt)
  1719  		sym := auxToSym(v.Aux)
  1720  		if v_0.Op != Op386ADDLconst {
  1721  			break
  1722  		}
  1723  		off2 := auxIntToInt32(v_0.AuxInt)
  1724  		base := v_0.Args[0]
  1725  		val := v_1
  1726  		mem := v_2
  1727  		if !(is32Bit(int64(off1) + int64(off2))) {
  1728  			break
  1729  		}
  1730  		v.reset(Op386ANDLmodify)
  1731  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1732  		v.Aux = symToAux(sym)
  1733  		v.AddArg3(base, val, mem)
  1734  		return true
  1735  	}
  1736  	// match: (ANDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1737  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1738  	// result: (ANDLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  1739  	for {
  1740  		off1 := auxIntToInt32(v.AuxInt)
  1741  		sym1 := auxToSym(v.Aux)
  1742  		if v_0.Op != Op386LEAL {
  1743  			break
  1744  		}
  1745  		off2 := auxIntToInt32(v_0.AuxInt)
  1746  		sym2 := auxToSym(v_0.Aux)
  1747  		base := v_0.Args[0]
  1748  		val := v_1
  1749  		mem := v_2
  1750  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1751  			break
  1752  		}
  1753  		v.reset(Op386ANDLmodify)
  1754  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1755  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1756  		v.AddArg3(base, val, mem)
  1757  		return true
  1758  	}
  1759  	return false
  1760  }
  1761  func rewriteValue386_Op386CMPB(v *Value) bool {
  1762  	v_1 := v.Args[1]
  1763  	v_0 := v.Args[0]
  1764  	b := v.Block
  1765  	// match: (CMPB x (MOVLconst [c]))
  1766  	// result: (CMPBconst x [int8(c)])
  1767  	for {
  1768  		x := v_0
  1769  		if v_1.Op != Op386MOVLconst {
  1770  			break
  1771  		}
  1772  		c := auxIntToInt32(v_1.AuxInt)
  1773  		v.reset(Op386CMPBconst)
  1774  		v.AuxInt = int8ToAuxInt(int8(c))
  1775  		v.AddArg(x)
  1776  		return true
  1777  	}
  1778  	// match: (CMPB (MOVLconst [c]) x)
  1779  	// result: (InvertFlags (CMPBconst x [int8(c)]))
  1780  	for {
  1781  		if v_0.Op != Op386MOVLconst {
  1782  			break
  1783  		}
  1784  		c := auxIntToInt32(v_0.AuxInt)
  1785  		x := v_1
  1786  		v.reset(Op386InvertFlags)
  1787  		v0 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  1788  		v0.AuxInt = int8ToAuxInt(int8(c))
  1789  		v0.AddArg(x)
  1790  		v.AddArg(v0)
  1791  		return true
  1792  	}
  1793  	// match: (CMPB x y)
  1794  	// cond: canonLessThan(x,y)
  1795  	// result: (InvertFlags (CMPB y x))
  1796  	for {
  1797  		x := v_0
  1798  		y := v_1
  1799  		if !(canonLessThan(x, y)) {
  1800  			break
  1801  		}
  1802  		v.reset(Op386InvertFlags)
  1803  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  1804  		v0.AddArg2(y, x)
  1805  		v.AddArg(v0)
  1806  		return true
  1807  	}
  1808  	// match: (CMPB l:(MOVBload {sym} [off] ptr mem) x)
  1809  	// cond: canMergeLoad(v, l) && clobber(l)
  1810  	// result: (CMPBload {sym} [off] ptr x mem)
  1811  	for {
  1812  		l := v_0
  1813  		if l.Op != Op386MOVBload {
  1814  			break
  1815  		}
  1816  		off := auxIntToInt32(l.AuxInt)
  1817  		sym := auxToSym(l.Aux)
  1818  		mem := l.Args[1]
  1819  		ptr := l.Args[0]
  1820  		x := v_1
  1821  		if !(canMergeLoad(v, l) && clobber(l)) {
  1822  			break
  1823  		}
  1824  		v.reset(Op386CMPBload)
  1825  		v.AuxInt = int32ToAuxInt(off)
  1826  		v.Aux = symToAux(sym)
  1827  		v.AddArg3(ptr, x, mem)
  1828  		return true
  1829  	}
  1830  	// match: (CMPB x l:(MOVBload {sym} [off] ptr mem))
  1831  	// cond: canMergeLoad(v, l) && clobber(l)
  1832  	// result: (InvertFlags (CMPBload {sym} [off] ptr x mem))
  1833  	for {
  1834  		x := v_0
  1835  		l := v_1
  1836  		if l.Op != Op386MOVBload {
  1837  			break
  1838  		}
  1839  		off := auxIntToInt32(l.AuxInt)
  1840  		sym := auxToSym(l.Aux)
  1841  		mem := l.Args[1]
  1842  		ptr := l.Args[0]
  1843  		if !(canMergeLoad(v, l) && clobber(l)) {
  1844  			break
  1845  		}
  1846  		v.reset(Op386InvertFlags)
  1847  		v0 := b.NewValue0(l.Pos, Op386CMPBload, types.TypeFlags)
  1848  		v0.AuxInt = int32ToAuxInt(off)
  1849  		v0.Aux = symToAux(sym)
  1850  		v0.AddArg3(ptr, x, mem)
  1851  		v.AddArg(v0)
  1852  		return true
  1853  	}
  1854  	return false
  1855  }
  1856  func rewriteValue386_Op386CMPBconst(v *Value) bool {
  1857  	v_0 := v.Args[0]
  1858  	b := v.Block
  1859  	// match: (CMPBconst (MOVLconst [x]) [y])
  1860  	// cond: int8(x)==y
  1861  	// result: (FlagEQ)
  1862  	for {
  1863  		y := auxIntToInt8(v.AuxInt)
  1864  		if v_0.Op != Op386MOVLconst {
  1865  			break
  1866  		}
  1867  		x := auxIntToInt32(v_0.AuxInt)
  1868  		if !(int8(x) == y) {
  1869  			break
  1870  		}
  1871  		v.reset(Op386FlagEQ)
  1872  		return true
  1873  	}
  1874  	// match: (CMPBconst (MOVLconst [x]) [y])
  1875  	// cond: int8(x)<y && uint8(x)<uint8(y)
  1876  	// result: (FlagLT_ULT)
  1877  	for {
  1878  		y := auxIntToInt8(v.AuxInt)
  1879  		if v_0.Op != Op386MOVLconst {
  1880  			break
  1881  		}
  1882  		x := auxIntToInt32(v_0.AuxInt)
  1883  		if !(int8(x) < y && uint8(x) < uint8(y)) {
  1884  			break
  1885  		}
  1886  		v.reset(Op386FlagLT_ULT)
  1887  		return true
  1888  	}
  1889  	// match: (CMPBconst (MOVLconst [x]) [y])
  1890  	// cond: int8(x)<y && uint8(x)>uint8(y)
  1891  	// result: (FlagLT_UGT)
  1892  	for {
  1893  		y := auxIntToInt8(v.AuxInt)
  1894  		if v_0.Op != Op386MOVLconst {
  1895  			break
  1896  		}
  1897  		x := auxIntToInt32(v_0.AuxInt)
  1898  		if !(int8(x) < y && uint8(x) > uint8(y)) {
  1899  			break
  1900  		}
  1901  		v.reset(Op386FlagLT_UGT)
  1902  		return true
  1903  	}
  1904  	// match: (CMPBconst (MOVLconst [x]) [y])
  1905  	// cond: int8(x)>y && uint8(x)<uint8(y)
  1906  	// result: (FlagGT_ULT)
  1907  	for {
  1908  		y := auxIntToInt8(v.AuxInt)
  1909  		if v_0.Op != Op386MOVLconst {
  1910  			break
  1911  		}
  1912  		x := auxIntToInt32(v_0.AuxInt)
  1913  		if !(int8(x) > y && uint8(x) < uint8(y)) {
  1914  			break
  1915  		}
  1916  		v.reset(Op386FlagGT_ULT)
  1917  		return true
  1918  	}
  1919  	// match: (CMPBconst (MOVLconst [x]) [y])
  1920  	// cond: int8(x)>y && uint8(x)>uint8(y)
  1921  	// result: (FlagGT_UGT)
  1922  	for {
  1923  		y := auxIntToInt8(v.AuxInt)
  1924  		if v_0.Op != Op386MOVLconst {
  1925  			break
  1926  		}
  1927  		x := auxIntToInt32(v_0.AuxInt)
  1928  		if !(int8(x) > y && uint8(x) > uint8(y)) {
  1929  			break
  1930  		}
  1931  		v.reset(Op386FlagGT_UGT)
  1932  		return true
  1933  	}
  1934  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1935  	// cond: 0 <= int8(m) && int8(m) < n
  1936  	// result: (FlagLT_ULT)
  1937  	for {
  1938  		n := auxIntToInt8(v.AuxInt)
  1939  		if v_0.Op != Op386ANDLconst {
  1940  			break
  1941  		}
  1942  		m := auxIntToInt32(v_0.AuxInt)
  1943  		if !(0 <= int8(m) && int8(m) < n) {
  1944  			break
  1945  		}
  1946  		v.reset(Op386FlagLT_ULT)
  1947  		return true
  1948  	}
  1949  	// match: (CMPBconst l:(ANDL x y) [0])
  1950  	// cond: l.Uses==1
  1951  	// result: (TESTB x y)
  1952  	for {
  1953  		if auxIntToInt8(v.AuxInt) != 0 {
  1954  			break
  1955  		}
  1956  		l := v_0
  1957  		if l.Op != Op386ANDL {
  1958  			break
  1959  		}
  1960  		y := l.Args[1]
  1961  		x := l.Args[0]
  1962  		if !(l.Uses == 1) {
  1963  			break
  1964  		}
  1965  		v.reset(Op386TESTB)
  1966  		v.AddArg2(x, y)
  1967  		return true
  1968  	}
  1969  	// match: (CMPBconst l:(ANDLconst [c] x) [0])
  1970  	// cond: l.Uses==1
  1971  	// result: (TESTBconst [int8(c)] x)
  1972  	for {
  1973  		if auxIntToInt8(v.AuxInt) != 0 {
  1974  			break
  1975  		}
  1976  		l := v_0
  1977  		if l.Op != Op386ANDLconst {
  1978  			break
  1979  		}
  1980  		c := auxIntToInt32(l.AuxInt)
  1981  		x := l.Args[0]
  1982  		if !(l.Uses == 1) {
  1983  			break
  1984  		}
  1985  		v.reset(Op386TESTBconst)
  1986  		v.AuxInt = int8ToAuxInt(int8(c))
  1987  		v.AddArg(x)
  1988  		return true
  1989  	}
  1990  	// match: (CMPBconst x [0])
  1991  	// result: (TESTB x x)
  1992  	for {
  1993  		if auxIntToInt8(v.AuxInt) != 0 {
  1994  			break
  1995  		}
  1996  		x := v_0
  1997  		v.reset(Op386TESTB)
  1998  		v.AddArg2(x, x)
  1999  		return true
  2000  	}
  2001  	// match: (CMPBconst l:(MOVBload {sym} [off] ptr mem) [c])
  2002  	// cond: l.Uses == 1 && clobber(l)
  2003  	// result: @l.Block (CMPBconstload {sym} [makeValAndOff(int32(c),off)] ptr mem)
  2004  	for {
  2005  		c := auxIntToInt8(v.AuxInt)
  2006  		l := v_0
  2007  		if l.Op != Op386MOVBload {
  2008  			break
  2009  		}
  2010  		off := auxIntToInt32(l.AuxInt)
  2011  		sym := auxToSym(l.Aux)
  2012  		mem := l.Args[1]
  2013  		ptr := l.Args[0]
  2014  		if !(l.Uses == 1 && clobber(l)) {
  2015  			break
  2016  		}
  2017  		b = l.Block
  2018  		v0 := b.NewValue0(l.Pos, Op386CMPBconstload, types.TypeFlags)
  2019  		v.copyOf(v0)
  2020  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  2021  		v0.Aux = symToAux(sym)
  2022  		v0.AddArg2(ptr, mem)
  2023  		return true
  2024  	}
  2025  	return false
  2026  }
  2027  func rewriteValue386_Op386CMPBload(v *Value) bool {
  2028  	v_2 := v.Args[2]
  2029  	v_1 := v.Args[1]
  2030  	v_0 := v.Args[0]
  2031  	// match: (CMPBload {sym} [off] ptr (MOVLconst [c]) mem)
  2032  	// result: (CMPBconstload {sym} [makeValAndOff(int32(int8(c)),off)] ptr mem)
  2033  	for {
  2034  		off := auxIntToInt32(v.AuxInt)
  2035  		sym := auxToSym(v.Aux)
  2036  		ptr := v_0
  2037  		if v_1.Op != Op386MOVLconst {
  2038  			break
  2039  		}
  2040  		c := auxIntToInt32(v_1.AuxInt)
  2041  		mem := v_2
  2042  		v.reset(Op386CMPBconstload)
  2043  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int8(c)), off))
  2044  		v.Aux = symToAux(sym)
  2045  		v.AddArg2(ptr, mem)
  2046  		return true
  2047  	}
  2048  	return false
  2049  }
  2050  func rewriteValue386_Op386CMPL(v *Value) bool {
  2051  	v_1 := v.Args[1]
  2052  	v_0 := v.Args[0]
  2053  	b := v.Block
  2054  	// match: (CMPL x (MOVLconst [c]))
  2055  	// result: (CMPLconst x [c])
  2056  	for {
  2057  		x := v_0
  2058  		if v_1.Op != Op386MOVLconst {
  2059  			break
  2060  		}
  2061  		c := auxIntToInt32(v_1.AuxInt)
  2062  		v.reset(Op386CMPLconst)
  2063  		v.AuxInt = int32ToAuxInt(c)
  2064  		v.AddArg(x)
  2065  		return true
  2066  	}
  2067  	// match: (CMPL (MOVLconst [c]) x)
  2068  	// result: (InvertFlags (CMPLconst x [c]))
  2069  	for {
  2070  		if v_0.Op != Op386MOVLconst {
  2071  			break
  2072  		}
  2073  		c := auxIntToInt32(v_0.AuxInt)
  2074  		x := v_1
  2075  		v.reset(Op386InvertFlags)
  2076  		v0 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  2077  		v0.AuxInt = int32ToAuxInt(c)
  2078  		v0.AddArg(x)
  2079  		v.AddArg(v0)
  2080  		return true
  2081  	}
  2082  	// match: (CMPL x y)
  2083  	// cond: canonLessThan(x,y)
  2084  	// result: (InvertFlags (CMPL y x))
  2085  	for {
  2086  		x := v_0
  2087  		y := v_1
  2088  		if !(canonLessThan(x, y)) {
  2089  			break
  2090  		}
  2091  		v.reset(Op386InvertFlags)
  2092  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  2093  		v0.AddArg2(y, x)
  2094  		v.AddArg(v0)
  2095  		return true
  2096  	}
  2097  	// match: (CMPL l:(MOVLload {sym} [off] ptr mem) x)
  2098  	// cond: canMergeLoad(v, l) && clobber(l)
  2099  	// result: (CMPLload {sym} [off] ptr x mem)
  2100  	for {
  2101  		l := v_0
  2102  		if l.Op != Op386MOVLload {
  2103  			break
  2104  		}
  2105  		off := auxIntToInt32(l.AuxInt)
  2106  		sym := auxToSym(l.Aux)
  2107  		mem := l.Args[1]
  2108  		ptr := l.Args[0]
  2109  		x := v_1
  2110  		if !(canMergeLoad(v, l) && clobber(l)) {
  2111  			break
  2112  		}
  2113  		v.reset(Op386CMPLload)
  2114  		v.AuxInt = int32ToAuxInt(off)
  2115  		v.Aux = symToAux(sym)
  2116  		v.AddArg3(ptr, x, mem)
  2117  		return true
  2118  	}
  2119  	// match: (CMPL x l:(MOVLload {sym} [off] ptr mem))
  2120  	// cond: canMergeLoad(v, l) && clobber(l)
  2121  	// result: (InvertFlags (CMPLload {sym} [off] ptr x mem))
  2122  	for {
  2123  		x := v_0
  2124  		l := v_1
  2125  		if l.Op != Op386MOVLload {
  2126  			break
  2127  		}
  2128  		off := auxIntToInt32(l.AuxInt)
  2129  		sym := auxToSym(l.Aux)
  2130  		mem := l.Args[1]
  2131  		ptr := l.Args[0]
  2132  		if !(canMergeLoad(v, l) && clobber(l)) {
  2133  			break
  2134  		}
  2135  		v.reset(Op386InvertFlags)
  2136  		v0 := b.NewValue0(l.Pos, Op386CMPLload, types.TypeFlags)
  2137  		v0.AuxInt = int32ToAuxInt(off)
  2138  		v0.Aux = symToAux(sym)
  2139  		v0.AddArg3(ptr, x, mem)
  2140  		v.AddArg(v0)
  2141  		return true
  2142  	}
  2143  	return false
  2144  }
  2145  func rewriteValue386_Op386CMPLconst(v *Value) bool {
  2146  	v_0 := v.Args[0]
  2147  	b := v.Block
  2148  	// match: (CMPLconst (MOVLconst [x]) [y])
  2149  	// cond: x==y
  2150  	// result: (FlagEQ)
  2151  	for {
  2152  		y := auxIntToInt32(v.AuxInt)
  2153  		if v_0.Op != Op386MOVLconst {
  2154  			break
  2155  		}
  2156  		x := auxIntToInt32(v_0.AuxInt)
  2157  		if !(x == y) {
  2158  			break
  2159  		}
  2160  		v.reset(Op386FlagEQ)
  2161  		return true
  2162  	}
  2163  	// match: (CMPLconst (MOVLconst [x]) [y])
  2164  	// cond: x<y && uint32(x)<uint32(y)
  2165  	// result: (FlagLT_ULT)
  2166  	for {
  2167  		y := auxIntToInt32(v.AuxInt)
  2168  		if v_0.Op != Op386MOVLconst {
  2169  			break
  2170  		}
  2171  		x := auxIntToInt32(v_0.AuxInt)
  2172  		if !(x < y && uint32(x) < uint32(y)) {
  2173  			break
  2174  		}
  2175  		v.reset(Op386FlagLT_ULT)
  2176  		return true
  2177  	}
  2178  	// match: (CMPLconst (MOVLconst [x]) [y])
  2179  	// cond: x<y && uint32(x)>uint32(y)
  2180  	// result: (FlagLT_UGT)
  2181  	for {
  2182  		y := auxIntToInt32(v.AuxInt)
  2183  		if v_0.Op != Op386MOVLconst {
  2184  			break
  2185  		}
  2186  		x := auxIntToInt32(v_0.AuxInt)
  2187  		if !(x < y && uint32(x) > uint32(y)) {
  2188  			break
  2189  		}
  2190  		v.reset(Op386FlagLT_UGT)
  2191  		return true
  2192  	}
  2193  	// match: (CMPLconst (MOVLconst [x]) [y])
  2194  	// cond: x>y && uint32(x)<uint32(y)
  2195  	// result: (FlagGT_ULT)
  2196  	for {
  2197  		y := auxIntToInt32(v.AuxInt)
  2198  		if v_0.Op != Op386MOVLconst {
  2199  			break
  2200  		}
  2201  		x := auxIntToInt32(v_0.AuxInt)
  2202  		if !(x > y && uint32(x) < uint32(y)) {
  2203  			break
  2204  		}
  2205  		v.reset(Op386FlagGT_ULT)
  2206  		return true
  2207  	}
  2208  	// match: (CMPLconst (MOVLconst [x]) [y])
  2209  	// cond: x>y && uint32(x)>uint32(y)
  2210  	// result: (FlagGT_UGT)
  2211  	for {
  2212  		y := auxIntToInt32(v.AuxInt)
  2213  		if v_0.Op != Op386MOVLconst {
  2214  			break
  2215  		}
  2216  		x := auxIntToInt32(v_0.AuxInt)
  2217  		if !(x > y && uint32(x) > uint32(y)) {
  2218  			break
  2219  		}
  2220  		v.reset(Op386FlagGT_UGT)
  2221  		return true
  2222  	}
  2223  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  2224  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  2225  	// result: (FlagLT_ULT)
  2226  	for {
  2227  		n := auxIntToInt32(v.AuxInt)
  2228  		if v_0.Op != Op386SHRLconst {
  2229  			break
  2230  		}
  2231  		c := auxIntToInt32(v_0.AuxInt)
  2232  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  2233  			break
  2234  		}
  2235  		v.reset(Op386FlagLT_ULT)
  2236  		return true
  2237  	}
  2238  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  2239  	// cond: 0 <= m && m < n
  2240  	// result: (FlagLT_ULT)
  2241  	for {
  2242  		n := auxIntToInt32(v.AuxInt)
  2243  		if v_0.Op != Op386ANDLconst {
  2244  			break
  2245  		}
  2246  		m := auxIntToInt32(v_0.AuxInt)
  2247  		if !(0 <= m && m < n) {
  2248  			break
  2249  		}
  2250  		v.reset(Op386FlagLT_ULT)
  2251  		return true
  2252  	}
  2253  	// match: (CMPLconst l:(ANDL x y) [0])
  2254  	// cond: l.Uses==1
  2255  	// result: (TESTL x y)
  2256  	for {
  2257  		if auxIntToInt32(v.AuxInt) != 0 {
  2258  			break
  2259  		}
  2260  		l := v_0
  2261  		if l.Op != Op386ANDL {
  2262  			break
  2263  		}
  2264  		y := l.Args[1]
  2265  		x := l.Args[0]
  2266  		if !(l.Uses == 1) {
  2267  			break
  2268  		}
  2269  		v.reset(Op386TESTL)
  2270  		v.AddArg2(x, y)
  2271  		return true
  2272  	}
  2273  	// match: (CMPLconst l:(ANDLconst [c] x) [0])
  2274  	// cond: l.Uses==1
  2275  	// result: (TESTLconst [c] x)
  2276  	for {
  2277  		if auxIntToInt32(v.AuxInt) != 0 {
  2278  			break
  2279  		}
  2280  		l := v_0
  2281  		if l.Op != Op386ANDLconst {
  2282  			break
  2283  		}
  2284  		c := auxIntToInt32(l.AuxInt)
  2285  		x := l.Args[0]
  2286  		if !(l.Uses == 1) {
  2287  			break
  2288  		}
  2289  		v.reset(Op386TESTLconst)
  2290  		v.AuxInt = int32ToAuxInt(c)
  2291  		v.AddArg(x)
  2292  		return true
  2293  	}
  2294  	// match: (CMPLconst x [0])
  2295  	// result: (TESTL x x)
  2296  	for {
  2297  		if auxIntToInt32(v.AuxInt) != 0 {
  2298  			break
  2299  		}
  2300  		x := v_0
  2301  		v.reset(Op386TESTL)
  2302  		v.AddArg2(x, x)
  2303  		return true
  2304  	}
  2305  	// match: (CMPLconst l:(MOVLload {sym} [off] ptr mem) [c])
  2306  	// cond: l.Uses == 1 && clobber(l)
  2307  	// result: @l.Block (CMPLconstload {sym} [makeValAndOff(int32(c),off)] ptr mem)
  2308  	for {
  2309  		c := auxIntToInt32(v.AuxInt)
  2310  		l := v_0
  2311  		if l.Op != Op386MOVLload {
  2312  			break
  2313  		}
  2314  		off := auxIntToInt32(l.AuxInt)
  2315  		sym := auxToSym(l.Aux)
  2316  		mem := l.Args[1]
  2317  		ptr := l.Args[0]
  2318  		if !(l.Uses == 1 && clobber(l)) {
  2319  			break
  2320  		}
  2321  		b = l.Block
  2322  		v0 := b.NewValue0(l.Pos, Op386CMPLconstload, types.TypeFlags)
  2323  		v.copyOf(v0)
  2324  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  2325  		v0.Aux = symToAux(sym)
  2326  		v0.AddArg2(ptr, mem)
  2327  		return true
  2328  	}
  2329  	return false
  2330  }
  2331  func rewriteValue386_Op386CMPLload(v *Value) bool {
  2332  	v_2 := v.Args[2]
  2333  	v_1 := v.Args[1]
  2334  	v_0 := v.Args[0]
  2335  	// match: (CMPLload {sym} [off] ptr (MOVLconst [c]) mem)
  2336  	// result: (CMPLconstload {sym} [makeValAndOff(c,off)] ptr mem)
  2337  	for {
  2338  		off := auxIntToInt32(v.AuxInt)
  2339  		sym := auxToSym(v.Aux)
  2340  		ptr := v_0
  2341  		if v_1.Op != Op386MOVLconst {
  2342  			break
  2343  		}
  2344  		c := auxIntToInt32(v_1.AuxInt)
  2345  		mem := v_2
  2346  		v.reset(Op386CMPLconstload)
  2347  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  2348  		v.Aux = symToAux(sym)
  2349  		v.AddArg2(ptr, mem)
  2350  		return true
  2351  	}
  2352  	return false
  2353  }
  2354  func rewriteValue386_Op386CMPW(v *Value) bool {
  2355  	v_1 := v.Args[1]
  2356  	v_0 := v.Args[0]
  2357  	b := v.Block
  2358  	// match: (CMPW x (MOVLconst [c]))
  2359  	// result: (CMPWconst x [int16(c)])
  2360  	for {
  2361  		x := v_0
  2362  		if v_1.Op != Op386MOVLconst {
  2363  			break
  2364  		}
  2365  		c := auxIntToInt32(v_1.AuxInt)
  2366  		v.reset(Op386CMPWconst)
  2367  		v.AuxInt = int16ToAuxInt(int16(c))
  2368  		v.AddArg(x)
  2369  		return true
  2370  	}
  2371  	// match: (CMPW (MOVLconst [c]) x)
  2372  	// result: (InvertFlags (CMPWconst x [int16(c)]))
  2373  	for {
  2374  		if v_0.Op != Op386MOVLconst {
  2375  			break
  2376  		}
  2377  		c := auxIntToInt32(v_0.AuxInt)
  2378  		x := v_1
  2379  		v.reset(Op386InvertFlags)
  2380  		v0 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  2381  		v0.AuxInt = int16ToAuxInt(int16(c))
  2382  		v0.AddArg(x)
  2383  		v.AddArg(v0)
  2384  		return true
  2385  	}
  2386  	// match: (CMPW x y)
  2387  	// cond: canonLessThan(x,y)
  2388  	// result: (InvertFlags (CMPW y x))
  2389  	for {
  2390  		x := v_0
  2391  		y := v_1
  2392  		if !(canonLessThan(x, y)) {
  2393  			break
  2394  		}
  2395  		v.reset(Op386InvertFlags)
  2396  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  2397  		v0.AddArg2(y, x)
  2398  		v.AddArg(v0)
  2399  		return true
  2400  	}
  2401  	// match: (CMPW l:(MOVWload {sym} [off] ptr mem) x)
  2402  	// cond: canMergeLoad(v, l) && clobber(l)
  2403  	// result: (CMPWload {sym} [off] ptr x mem)
  2404  	for {
  2405  		l := v_0
  2406  		if l.Op != Op386MOVWload {
  2407  			break
  2408  		}
  2409  		off := auxIntToInt32(l.AuxInt)
  2410  		sym := auxToSym(l.Aux)
  2411  		mem := l.Args[1]
  2412  		ptr := l.Args[0]
  2413  		x := v_1
  2414  		if !(canMergeLoad(v, l) && clobber(l)) {
  2415  			break
  2416  		}
  2417  		v.reset(Op386CMPWload)
  2418  		v.AuxInt = int32ToAuxInt(off)
  2419  		v.Aux = symToAux(sym)
  2420  		v.AddArg3(ptr, x, mem)
  2421  		return true
  2422  	}
  2423  	// match: (CMPW x l:(MOVWload {sym} [off] ptr mem))
  2424  	// cond: canMergeLoad(v, l) && clobber(l)
  2425  	// result: (InvertFlags (CMPWload {sym} [off] ptr x mem))
  2426  	for {
  2427  		x := v_0
  2428  		l := v_1
  2429  		if l.Op != Op386MOVWload {
  2430  			break
  2431  		}
  2432  		off := auxIntToInt32(l.AuxInt)
  2433  		sym := auxToSym(l.Aux)
  2434  		mem := l.Args[1]
  2435  		ptr := l.Args[0]
  2436  		if !(canMergeLoad(v, l) && clobber(l)) {
  2437  			break
  2438  		}
  2439  		v.reset(Op386InvertFlags)
  2440  		v0 := b.NewValue0(l.Pos, Op386CMPWload, types.TypeFlags)
  2441  		v0.AuxInt = int32ToAuxInt(off)
  2442  		v0.Aux = symToAux(sym)
  2443  		v0.AddArg3(ptr, x, mem)
  2444  		v.AddArg(v0)
  2445  		return true
  2446  	}
  2447  	return false
  2448  }
  2449  func rewriteValue386_Op386CMPWconst(v *Value) bool {
  2450  	v_0 := v.Args[0]
  2451  	b := v.Block
  2452  	// match: (CMPWconst (MOVLconst [x]) [y])
  2453  	// cond: int16(x)==y
  2454  	// result: (FlagEQ)
  2455  	for {
  2456  		y := auxIntToInt16(v.AuxInt)
  2457  		if v_0.Op != Op386MOVLconst {
  2458  			break
  2459  		}
  2460  		x := auxIntToInt32(v_0.AuxInt)
  2461  		if !(int16(x) == y) {
  2462  			break
  2463  		}
  2464  		v.reset(Op386FlagEQ)
  2465  		return true
  2466  	}
  2467  	// match: (CMPWconst (MOVLconst [x]) [y])
  2468  	// cond: int16(x)<y && uint16(x)<uint16(y)
  2469  	// result: (FlagLT_ULT)
  2470  	for {
  2471  		y := auxIntToInt16(v.AuxInt)
  2472  		if v_0.Op != Op386MOVLconst {
  2473  			break
  2474  		}
  2475  		x := auxIntToInt32(v_0.AuxInt)
  2476  		if !(int16(x) < y && uint16(x) < uint16(y)) {
  2477  			break
  2478  		}
  2479  		v.reset(Op386FlagLT_ULT)
  2480  		return true
  2481  	}
  2482  	// match: (CMPWconst (MOVLconst [x]) [y])
  2483  	// cond: int16(x)<y && uint16(x)>uint16(y)
  2484  	// result: (FlagLT_UGT)
  2485  	for {
  2486  		y := auxIntToInt16(v.AuxInt)
  2487  		if v_0.Op != Op386MOVLconst {
  2488  			break
  2489  		}
  2490  		x := auxIntToInt32(v_0.AuxInt)
  2491  		if !(int16(x) < y && uint16(x) > uint16(y)) {
  2492  			break
  2493  		}
  2494  		v.reset(Op386FlagLT_UGT)
  2495  		return true
  2496  	}
  2497  	// match: (CMPWconst (MOVLconst [x]) [y])
  2498  	// cond: int16(x)>y && uint16(x)<uint16(y)
  2499  	// result: (FlagGT_ULT)
  2500  	for {
  2501  		y := auxIntToInt16(v.AuxInt)
  2502  		if v_0.Op != Op386MOVLconst {
  2503  			break
  2504  		}
  2505  		x := auxIntToInt32(v_0.AuxInt)
  2506  		if !(int16(x) > y && uint16(x) < uint16(y)) {
  2507  			break
  2508  		}
  2509  		v.reset(Op386FlagGT_ULT)
  2510  		return true
  2511  	}
  2512  	// match: (CMPWconst (MOVLconst [x]) [y])
  2513  	// cond: int16(x)>y && uint16(x)>uint16(y)
  2514  	// result: (FlagGT_UGT)
  2515  	for {
  2516  		y := auxIntToInt16(v.AuxInt)
  2517  		if v_0.Op != Op386MOVLconst {
  2518  			break
  2519  		}
  2520  		x := auxIntToInt32(v_0.AuxInt)
  2521  		if !(int16(x) > y && uint16(x) > uint16(y)) {
  2522  			break
  2523  		}
  2524  		v.reset(Op386FlagGT_UGT)
  2525  		return true
  2526  	}
  2527  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  2528  	// cond: 0 <= int16(m) && int16(m) < n
  2529  	// result: (FlagLT_ULT)
  2530  	for {
  2531  		n := auxIntToInt16(v.AuxInt)
  2532  		if v_0.Op != Op386ANDLconst {
  2533  			break
  2534  		}
  2535  		m := auxIntToInt32(v_0.AuxInt)
  2536  		if !(0 <= int16(m) && int16(m) < n) {
  2537  			break
  2538  		}
  2539  		v.reset(Op386FlagLT_ULT)
  2540  		return true
  2541  	}
  2542  	// match: (CMPWconst l:(ANDL x y) [0])
  2543  	// cond: l.Uses==1
  2544  	// result: (TESTW x y)
  2545  	for {
  2546  		if auxIntToInt16(v.AuxInt) != 0 {
  2547  			break
  2548  		}
  2549  		l := v_0
  2550  		if l.Op != Op386ANDL {
  2551  			break
  2552  		}
  2553  		y := l.Args[1]
  2554  		x := l.Args[0]
  2555  		if !(l.Uses == 1) {
  2556  			break
  2557  		}
  2558  		v.reset(Op386TESTW)
  2559  		v.AddArg2(x, y)
  2560  		return true
  2561  	}
  2562  	// match: (CMPWconst l:(ANDLconst [c] x) [0])
  2563  	// cond: l.Uses==1
  2564  	// result: (TESTWconst [int16(c)] x)
  2565  	for {
  2566  		if auxIntToInt16(v.AuxInt) != 0 {
  2567  			break
  2568  		}
  2569  		l := v_0
  2570  		if l.Op != Op386ANDLconst {
  2571  			break
  2572  		}
  2573  		c := auxIntToInt32(l.AuxInt)
  2574  		x := l.Args[0]
  2575  		if !(l.Uses == 1) {
  2576  			break
  2577  		}
  2578  		v.reset(Op386TESTWconst)
  2579  		v.AuxInt = int16ToAuxInt(int16(c))
  2580  		v.AddArg(x)
  2581  		return true
  2582  	}
  2583  	// match: (CMPWconst x [0])
  2584  	// result: (TESTW x x)
  2585  	for {
  2586  		if auxIntToInt16(v.AuxInt) != 0 {
  2587  			break
  2588  		}
  2589  		x := v_0
  2590  		v.reset(Op386TESTW)
  2591  		v.AddArg2(x, x)
  2592  		return true
  2593  	}
  2594  	// match: (CMPWconst l:(MOVWload {sym} [off] ptr mem) [c])
  2595  	// cond: l.Uses == 1 && clobber(l)
  2596  	// result: @l.Block (CMPWconstload {sym} [makeValAndOff(int32(c),off)] ptr mem)
  2597  	for {
  2598  		c := auxIntToInt16(v.AuxInt)
  2599  		l := v_0
  2600  		if l.Op != Op386MOVWload {
  2601  			break
  2602  		}
  2603  		off := auxIntToInt32(l.AuxInt)
  2604  		sym := auxToSym(l.Aux)
  2605  		mem := l.Args[1]
  2606  		ptr := l.Args[0]
  2607  		if !(l.Uses == 1 && clobber(l)) {
  2608  			break
  2609  		}
  2610  		b = l.Block
  2611  		v0 := b.NewValue0(l.Pos, Op386CMPWconstload, types.TypeFlags)
  2612  		v.copyOf(v0)
  2613  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(c), off))
  2614  		v0.Aux = symToAux(sym)
  2615  		v0.AddArg2(ptr, mem)
  2616  		return true
  2617  	}
  2618  	return false
  2619  }
  2620  func rewriteValue386_Op386CMPWload(v *Value) bool {
  2621  	v_2 := v.Args[2]
  2622  	v_1 := v.Args[1]
  2623  	v_0 := v.Args[0]
  2624  	// match: (CMPWload {sym} [off] ptr (MOVLconst [c]) mem)
  2625  	// result: (CMPWconstload {sym} [makeValAndOff(int32(int16(c)),off)] ptr mem)
  2626  	for {
  2627  		off := auxIntToInt32(v.AuxInt)
  2628  		sym := auxToSym(v.Aux)
  2629  		ptr := v_0
  2630  		if v_1.Op != Op386MOVLconst {
  2631  			break
  2632  		}
  2633  		c := auxIntToInt32(v_1.AuxInt)
  2634  		mem := v_2
  2635  		v.reset(Op386CMPWconstload)
  2636  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(int32(int16(c)), off))
  2637  		v.Aux = symToAux(sym)
  2638  		v.AddArg2(ptr, mem)
  2639  		return true
  2640  	}
  2641  	return false
  2642  }
  2643  func rewriteValue386_Op386DIVSD(v *Value) bool {
  2644  	v_1 := v.Args[1]
  2645  	v_0 := v.Args[0]
  2646  	// match: (DIVSD x l:(MOVSDload [off] {sym} ptr mem))
  2647  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  2648  	// result: (DIVSDload x [off] {sym} ptr mem)
  2649  	for {
  2650  		x := v_0
  2651  		l := v_1
  2652  		if l.Op != Op386MOVSDload {
  2653  			break
  2654  		}
  2655  		off := auxIntToInt32(l.AuxInt)
  2656  		sym := auxToSym(l.Aux)
  2657  		mem := l.Args[1]
  2658  		ptr := l.Args[0]
  2659  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  2660  			break
  2661  		}
  2662  		v.reset(Op386DIVSDload)
  2663  		v.AuxInt = int32ToAuxInt(off)
  2664  		v.Aux = symToAux(sym)
  2665  		v.AddArg3(x, ptr, mem)
  2666  		return true
  2667  	}
  2668  	return false
  2669  }
  2670  func rewriteValue386_Op386DIVSDload(v *Value) bool {
  2671  	v_2 := v.Args[2]
  2672  	v_1 := v.Args[1]
  2673  	v_0 := v.Args[0]
  2674  	b := v.Block
  2675  	config := b.Func.Config
  2676  	// match: (DIVSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  2677  	// cond: is32Bit(int64(off1)+int64(off2))
  2678  	// result: (DIVSDload [off1+off2] {sym} val base mem)
  2679  	for {
  2680  		off1 := auxIntToInt32(v.AuxInt)
  2681  		sym := auxToSym(v.Aux)
  2682  		val := v_0
  2683  		if v_1.Op != Op386ADDLconst {
  2684  			break
  2685  		}
  2686  		off2 := auxIntToInt32(v_1.AuxInt)
  2687  		base := v_1.Args[0]
  2688  		mem := v_2
  2689  		if !(is32Bit(int64(off1) + int64(off2))) {
  2690  			break
  2691  		}
  2692  		v.reset(Op386DIVSDload)
  2693  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2694  		v.Aux = symToAux(sym)
  2695  		v.AddArg3(val, base, mem)
  2696  		return true
  2697  	}
  2698  	// match: (DIVSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2699  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2700  	// result: (DIVSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  2701  	for {
  2702  		off1 := auxIntToInt32(v.AuxInt)
  2703  		sym1 := auxToSym(v.Aux)
  2704  		val := v_0
  2705  		if v_1.Op != Op386LEAL {
  2706  			break
  2707  		}
  2708  		off2 := auxIntToInt32(v_1.AuxInt)
  2709  		sym2 := auxToSym(v_1.Aux)
  2710  		base := v_1.Args[0]
  2711  		mem := v_2
  2712  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2713  			break
  2714  		}
  2715  		v.reset(Op386DIVSDload)
  2716  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2717  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2718  		v.AddArg3(val, base, mem)
  2719  		return true
  2720  	}
  2721  	return false
  2722  }
  2723  func rewriteValue386_Op386DIVSS(v *Value) bool {
  2724  	v_1 := v.Args[1]
  2725  	v_0 := v.Args[0]
  2726  	// match: (DIVSS x l:(MOVSSload [off] {sym} ptr mem))
  2727  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  2728  	// result: (DIVSSload x [off] {sym} ptr mem)
  2729  	for {
  2730  		x := v_0
  2731  		l := v_1
  2732  		if l.Op != Op386MOVSSload {
  2733  			break
  2734  		}
  2735  		off := auxIntToInt32(l.AuxInt)
  2736  		sym := auxToSym(l.Aux)
  2737  		mem := l.Args[1]
  2738  		ptr := l.Args[0]
  2739  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  2740  			break
  2741  		}
  2742  		v.reset(Op386DIVSSload)
  2743  		v.AuxInt = int32ToAuxInt(off)
  2744  		v.Aux = symToAux(sym)
  2745  		v.AddArg3(x, ptr, mem)
  2746  		return true
  2747  	}
  2748  	return false
  2749  }
  2750  func rewriteValue386_Op386DIVSSload(v *Value) bool {
  2751  	v_2 := v.Args[2]
  2752  	v_1 := v.Args[1]
  2753  	v_0 := v.Args[0]
  2754  	b := v.Block
  2755  	config := b.Func.Config
  2756  	// match: (DIVSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  2757  	// cond: is32Bit(int64(off1)+int64(off2))
  2758  	// result: (DIVSSload [off1+off2] {sym} val base mem)
  2759  	for {
  2760  		off1 := auxIntToInt32(v.AuxInt)
  2761  		sym := auxToSym(v.Aux)
  2762  		val := v_0
  2763  		if v_1.Op != Op386ADDLconst {
  2764  			break
  2765  		}
  2766  		off2 := auxIntToInt32(v_1.AuxInt)
  2767  		base := v_1.Args[0]
  2768  		mem := v_2
  2769  		if !(is32Bit(int64(off1) + int64(off2))) {
  2770  			break
  2771  		}
  2772  		v.reset(Op386DIVSSload)
  2773  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2774  		v.Aux = symToAux(sym)
  2775  		v.AddArg3(val, base, mem)
  2776  		return true
  2777  	}
  2778  	// match: (DIVSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2779  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2780  	// result: (DIVSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  2781  	for {
  2782  		off1 := auxIntToInt32(v.AuxInt)
  2783  		sym1 := auxToSym(v.Aux)
  2784  		val := v_0
  2785  		if v_1.Op != Op386LEAL {
  2786  			break
  2787  		}
  2788  		off2 := auxIntToInt32(v_1.AuxInt)
  2789  		sym2 := auxToSym(v_1.Aux)
  2790  		base := v_1.Args[0]
  2791  		mem := v_2
  2792  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2793  			break
  2794  		}
  2795  		v.reset(Op386DIVSSload)
  2796  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2797  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2798  		v.AddArg3(val, base, mem)
  2799  		return true
  2800  	}
  2801  	return false
  2802  }
  2803  func rewriteValue386_Op386LEAL(v *Value) bool {
  2804  	v_0 := v.Args[0]
  2805  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  2806  	// cond: is32Bit(int64(c)+int64(d))
  2807  	// result: (LEAL [c+d] {s} x)
  2808  	for {
  2809  		c := auxIntToInt32(v.AuxInt)
  2810  		s := auxToSym(v.Aux)
  2811  		if v_0.Op != Op386ADDLconst {
  2812  			break
  2813  		}
  2814  		d := auxIntToInt32(v_0.AuxInt)
  2815  		x := v_0.Args[0]
  2816  		if !(is32Bit(int64(c) + int64(d))) {
  2817  			break
  2818  		}
  2819  		v.reset(Op386LEAL)
  2820  		v.AuxInt = int32ToAuxInt(c + d)
  2821  		v.Aux = symToAux(s)
  2822  		v.AddArg(x)
  2823  		return true
  2824  	}
  2825  	// match: (LEAL [c] {s} (ADDL x y))
  2826  	// cond: x.Op != OpSB && y.Op != OpSB
  2827  	// result: (LEAL1 [c] {s} x y)
  2828  	for {
  2829  		c := auxIntToInt32(v.AuxInt)
  2830  		s := auxToSym(v.Aux)
  2831  		if v_0.Op != Op386ADDL {
  2832  			break
  2833  		}
  2834  		_ = v_0.Args[1]
  2835  		v_0_0 := v_0.Args[0]
  2836  		v_0_1 := v_0.Args[1]
  2837  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  2838  			x := v_0_0
  2839  			y := v_0_1
  2840  			if !(x.Op != OpSB && y.Op != OpSB) {
  2841  				continue
  2842  			}
  2843  			v.reset(Op386LEAL1)
  2844  			v.AuxInt = int32ToAuxInt(c)
  2845  			v.Aux = symToAux(s)
  2846  			v.AddArg2(x, y)
  2847  			return true
  2848  		}
  2849  		break
  2850  	}
  2851  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  2852  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2853  	// result: (LEAL [off1+off2] {mergeSym(sym1,sym2)} x)
  2854  	for {
  2855  		off1 := auxIntToInt32(v.AuxInt)
  2856  		sym1 := auxToSym(v.Aux)
  2857  		if v_0.Op != Op386LEAL {
  2858  			break
  2859  		}
  2860  		off2 := auxIntToInt32(v_0.AuxInt)
  2861  		sym2 := auxToSym(v_0.Aux)
  2862  		x := v_0.Args[0]
  2863  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2864  			break
  2865  		}
  2866  		v.reset(Op386LEAL)
  2867  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2868  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2869  		v.AddArg(x)
  2870  		return true
  2871  	}
  2872  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  2873  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2874  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2875  	for {
  2876  		off1 := auxIntToInt32(v.AuxInt)
  2877  		sym1 := auxToSym(v.Aux)
  2878  		if v_0.Op != Op386LEAL1 {
  2879  			break
  2880  		}
  2881  		off2 := auxIntToInt32(v_0.AuxInt)
  2882  		sym2 := auxToSym(v_0.Aux)
  2883  		y := v_0.Args[1]
  2884  		x := v_0.Args[0]
  2885  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2886  			break
  2887  		}
  2888  		v.reset(Op386LEAL1)
  2889  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2890  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2891  		v.AddArg2(x, y)
  2892  		return true
  2893  	}
  2894  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  2895  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2896  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2897  	for {
  2898  		off1 := auxIntToInt32(v.AuxInt)
  2899  		sym1 := auxToSym(v.Aux)
  2900  		if v_0.Op != Op386LEAL2 {
  2901  			break
  2902  		}
  2903  		off2 := auxIntToInt32(v_0.AuxInt)
  2904  		sym2 := auxToSym(v_0.Aux)
  2905  		y := v_0.Args[1]
  2906  		x := v_0.Args[0]
  2907  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2908  			break
  2909  		}
  2910  		v.reset(Op386LEAL2)
  2911  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2912  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2913  		v.AddArg2(x, y)
  2914  		return true
  2915  	}
  2916  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  2917  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2918  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2919  	for {
  2920  		off1 := auxIntToInt32(v.AuxInt)
  2921  		sym1 := auxToSym(v.Aux)
  2922  		if v_0.Op != Op386LEAL4 {
  2923  			break
  2924  		}
  2925  		off2 := auxIntToInt32(v_0.AuxInt)
  2926  		sym2 := auxToSym(v_0.Aux)
  2927  		y := v_0.Args[1]
  2928  		x := v_0.Args[0]
  2929  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2930  			break
  2931  		}
  2932  		v.reset(Op386LEAL4)
  2933  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2934  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2935  		v.AddArg2(x, y)
  2936  		return true
  2937  	}
  2938  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  2939  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2940  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2941  	for {
  2942  		off1 := auxIntToInt32(v.AuxInt)
  2943  		sym1 := auxToSym(v.Aux)
  2944  		if v_0.Op != Op386LEAL8 {
  2945  			break
  2946  		}
  2947  		off2 := auxIntToInt32(v_0.AuxInt)
  2948  		sym2 := auxToSym(v_0.Aux)
  2949  		y := v_0.Args[1]
  2950  		x := v_0.Args[0]
  2951  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2952  			break
  2953  		}
  2954  		v.reset(Op386LEAL8)
  2955  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2956  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2957  		v.AddArg2(x, y)
  2958  		return true
  2959  	}
  2960  	return false
  2961  }
  2962  func rewriteValue386_Op386LEAL1(v *Value) bool {
  2963  	v_1 := v.Args[1]
  2964  	v_0 := v.Args[0]
  2965  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  2966  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  2967  	// result: (LEAL1 [c+d] {s} x y)
  2968  	for {
  2969  		c := auxIntToInt32(v.AuxInt)
  2970  		s := auxToSym(v.Aux)
  2971  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2972  			if v_0.Op != Op386ADDLconst {
  2973  				continue
  2974  			}
  2975  			d := auxIntToInt32(v_0.AuxInt)
  2976  			x := v_0.Args[0]
  2977  			y := v_1
  2978  			if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  2979  				continue
  2980  			}
  2981  			v.reset(Op386LEAL1)
  2982  			v.AuxInt = int32ToAuxInt(c + d)
  2983  			v.Aux = symToAux(s)
  2984  			v.AddArg2(x, y)
  2985  			return true
  2986  		}
  2987  		break
  2988  	}
  2989  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  2990  	// result: (LEAL2 [c] {s} x y)
  2991  	for {
  2992  		c := auxIntToInt32(v.AuxInt)
  2993  		s := auxToSym(v.Aux)
  2994  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2995  			x := v_0
  2996  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  2997  				continue
  2998  			}
  2999  			y := v_1.Args[0]
  3000  			v.reset(Op386LEAL2)
  3001  			v.AuxInt = int32ToAuxInt(c)
  3002  			v.Aux = symToAux(s)
  3003  			v.AddArg2(x, y)
  3004  			return true
  3005  		}
  3006  		break
  3007  	}
  3008  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  3009  	// result: (LEAL4 [c] {s} x y)
  3010  	for {
  3011  		c := auxIntToInt32(v.AuxInt)
  3012  		s := auxToSym(v.Aux)
  3013  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3014  			x := v_0
  3015  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
  3016  				continue
  3017  			}
  3018  			y := v_1.Args[0]
  3019  			v.reset(Op386LEAL4)
  3020  			v.AuxInt = int32ToAuxInt(c)
  3021  			v.Aux = symToAux(s)
  3022  			v.AddArg2(x, y)
  3023  			return true
  3024  		}
  3025  		break
  3026  	}
  3027  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  3028  	// result: (LEAL8 [c] {s} x y)
  3029  	for {
  3030  		c := auxIntToInt32(v.AuxInt)
  3031  		s := auxToSym(v.Aux)
  3032  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3033  			x := v_0
  3034  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
  3035  				continue
  3036  			}
  3037  			y := v_1.Args[0]
  3038  			v.reset(Op386LEAL8)
  3039  			v.AuxInt = int32ToAuxInt(c)
  3040  			v.Aux = symToAux(s)
  3041  			v.AddArg2(x, y)
  3042  			return true
  3043  		}
  3044  		break
  3045  	}
  3046  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3047  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3048  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3049  	for {
  3050  		off1 := auxIntToInt32(v.AuxInt)
  3051  		sym1 := auxToSym(v.Aux)
  3052  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3053  			if v_0.Op != Op386LEAL {
  3054  				continue
  3055  			}
  3056  			off2 := auxIntToInt32(v_0.AuxInt)
  3057  			sym2 := auxToSym(v_0.Aux)
  3058  			x := v_0.Args[0]
  3059  			y := v_1
  3060  			if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3061  				continue
  3062  			}
  3063  			v.reset(Op386LEAL1)
  3064  			v.AuxInt = int32ToAuxInt(off1 + off2)
  3065  			v.Aux = symToAux(mergeSym(sym1, sym2))
  3066  			v.AddArg2(x, y)
  3067  			return true
  3068  		}
  3069  		break
  3070  	}
  3071  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} y y))
  3072  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  3073  	// result: (LEAL2 [off1+off2] {mergeSym(sym1, sym2)} x y)
  3074  	for {
  3075  		off1 := auxIntToInt32(v.AuxInt)
  3076  		sym1 := auxToSym(v.Aux)
  3077  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3078  			x := v_0
  3079  			if v_1.Op != Op386LEAL1 {
  3080  				continue
  3081  			}
  3082  			off2 := auxIntToInt32(v_1.AuxInt)
  3083  			sym2 := auxToSym(v_1.Aux)
  3084  			y := v_1.Args[1]
  3085  			if y != v_1.Args[0] || !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  3086  				continue
  3087  			}
  3088  			v.reset(Op386LEAL2)
  3089  			v.AuxInt = int32ToAuxInt(off1 + off2)
  3090  			v.Aux = symToAux(mergeSym(sym1, sym2))
  3091  			v.AddArg2(x, y)
  3092  			return true
  3093  		}
  3094  		break
  3095  	}
  3096  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} x y))
  3097  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  3098  	// result: (LEAL2 [off1+off2] {mergeSym(sym1, sym2)} y x)
  3099  	for {
  3100  		off1 := auxIntToInt32(v.AuxInt)
  3101  		sym1 := auxToSym(v.Aux)
  3102  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3103  			x := v_0
  3104  			if v_1.Op != Op386LEAL1 {
  3105  				continue
  3106  			}
  3107  			off2 := auxIntToInt32(v_1.AuxInt)
  3108  			sym2 := auxToSym(v_1.Aux)
  3109  			_ = v_1.Args[1]
  3110  			v_1_0 := v_1.Args[0]
  3111  			v_1_1 := v_1.Args[1]
  3112  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  3113  				if x != v_1_0 {
  3114  					continue
  3115  				}
  3116  				y := v_1_1
  3117  				if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  3118  					continue
  3119  				}
  3120  				v.reset(Op386LEAL2)
  3121  				v.AuxInt = int32ToAuxInt(off1 + off2)
  3122  				v.Aux = symToAux(mergeSym(sym1, sym2))
  3123  				v.AddArg2(y, x)
  3124  				return true
  3125  			}
  3126  		}
  3127  		break
  3128  	}
  3129  	// match: (LEAL1 [0] {nil} x y)
  3130  	// result: (ADDL x y)
  3131  	for {
  3132  		if auxIntToInt32(v.AuxInt) != 0 || auxToSym(v.Aux) != nil {
  3133  			break
  3134  		}
  3135  		x := v_0
  3136  		y := v_1
  3137  		v.reset(Op386ADDL)
  3138  		v.AddArg2(x, y)
  3139  		return true
  3140  	}
  3141  	return false
  3142  }
  3143  func rewriteValue386_Op386LEAL2(v *Value) bool {
  3144  	v_1 := v.Args[1]
  3145  	v_0 := v.Args[0]
  3146  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  3147  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3148  	// result: (LEAL2 [c+d] {s} x y)
  3149  	for {
  3150  		c := auxIntToInt32(v.AuxInt)
  3151  		s := auxToSym(v.Aux)
  3152  		if v_0.Op != Op386ADDLconst {
  3153  			break
  3154  		}
  3155  		d := auxIntToInt32(v_0.AuxInt)
  3156  		x := v_0.Args[0]
  3157  		y := v_1
  3158  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3159  			break
  3160  		}
  3161  		v.reset(Op386LEAL2)
  3162  		v.AuxInt = int32ToAuxInt(c + d)
  3163  		v.Aux = symToAux(s)
  3164  		v.AddArg2(x, y)
  3165  		return true
  3166  	}
  3167  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  3168  	// cond: is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB
  3169  	// result: (LEAL2 [c+2*d] {s} x y)
  3170  	for {
  3171  		c := auxIntToInt32(v.AuxInt)
  3172  		s := auxToSym(v.Aux)
  3173  		x := v_0
  3174  		if v_1.Op != Op386ADDLconst {
  3175  			break
  3176  		}
  3177  		d := auxIntToInt32(v_1.AuxInt)
  3178  		y := v_1.Args[0]
  3179  		if !(is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB) {
  3180  			break
  3181  		}
  3182  		v.reset(Op386LEAL2)
  3183  		v.AuxInt = int32ToAuxInt(c + 2*d)
  3184  		v.Aux = symToAux(s)
  3185  		v.AddArg2(x, y)
  3186  		return true
  3187  	}
  3188  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  3189  	// result: (LEAL4 [c] {s} x y)
  3190  	for {
  3191  		c := auxIntToInt32(v.AuxInt)
  3192  		s := auxToSym(v.Aux)
  3193  		x := v_0
  3194  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3195  			break
  3196  		}
  3197  		y := v_1.Args[0]
  3198  		v.reset(Op386LEAL4)
  3199  		v.AuxInt = int32ToAuxInt(c)
  3200  		v.Aux = symToAux(s)
  3201  		v.AddArg2(x, y)
  3202  		return true
  3203  	}
  3204  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  3205  	// result: (LEAL8 [c] {s} x y)
  3206  	for {
  3207  		c := auxIntToInt32(v.AuxInt)
  3208  		s := auxToSym(v.Aux)
  3209  		x := v_0
  3210  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
  3211  			break
  3212  		}
  3213  		y := v_1.Args[0]
  3214  		v.reset(Op386LEAL8)
  3215  		v.AuxInt = int32ToAuxInt(c)
  3216  		v.Aux = symToAux(s)
  3217  		v.AddArg2(x, y)
  3218  		return true
  3219  	}
  3220  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3221  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3222  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3223  	for {
  3224  		off1 := auxIntToInt32(v.AuxInt)
  3225  		sym1 := auxToSym(v.Aux)
  3226  		if v_0.Op != Op386LEAL {
  3227  			break
  3228  		}
  3229  		off2 := auxIntToInt32(v_0.AuxInt)
  3230  		sym2 := auxToSym(v_0.Aux)
  3231  		x := v_0.Args[0]
  3232  		y := v_1
  3233  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3234  			break
  3235  		}
  3236  		v.reset(Op386LEAL2)
  3237  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3238  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3239  		v.AddArg2(x, y)
  3240  		return true
  3241  	}
  3242  	// match: (LEAL2 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3243  	// cond: is32Bit(int64(off1)+2*int64(off2))
  3244  	// result: (LEAL4 [off1+2*off2] {sym} x y)
  3245  	for {
  3246  		off1 := auxIntToInt32(v.AuxInt)
  3247  		sym := auxToSym(v.Aux)
  3248  		x := v_0
  3249  		if v_1.Op != Op386LEAL1 {
  3250  			break
  3251  		}
  3252  		off2 := auxIntToInt32(v_1.AuxInt)
  3253  		if auxToSym(v_1.Aux) != nil {
  3254  			break
  3255  		}
  3256  		y := v_1.Args[1]
  3257  		if y != v_1.Args[0] || !(is32Bit(int64(off1) + 2*int64(off2))) {
  3258  			break
  3259  		}
  3260  		v.reset(Op386LEAL4)
  3261  		v.AuxInt = int32ToAuxInt(off1 + 2*off2)
  3262  		v.Aux = symToAux(sym)
  3263  		v.AddArg2(x, y)
  3264  		return true
  3265  	}
  3266  	return false
  3267  }
  3268  func rewriteValue386_Op386LEAL4(v *Value) bool {
  3269  	v_1 := v.Args[1]
  3270  	v_0 := v.Args[0]
  3271  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  3272  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3273  	// result: (LEAL4 [c+d] {s} x y)
  3274  	for {
  3275  		c := auxIntToInt32(v.AuxInt)
  3276  		s := auxToSym(v.Aux)
  3277  		if v_0.Op != Op386ADDLconst {
  3278  			break
  3279  		}
  3280  		d := auxIntToInt32(v_0.AuxInt)
  3281  		x := v_0.Args[0]
  3282  		y := v_1
  3283  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3284  			break
  3285  		}
  3286  		v.reset(Op386LEAL4)
  3287  		v.AuxInt = int32ToAuxInt(c + d)
  3288  		v.Aux = symToAux(s)
  3289  		v.AddArg2(x, y)
  3290  		return true
  3291  	}
  3292  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  3293  	// cond: is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB
  3294  	// result: (LEAL4 [c+4*d] {s} x y)
  3295  	for {
  3296  		c := auxIntToInt32(v.AuxInt)
  3297  		s := auxToSym(v.Aux)
  3298  		x := v_0
  3299  		if v_1.Op != Op386ADDLconst {
  3300  			break
  3301  		}
  3302  		d := auxIntToInt32(v_1.AuxInt)
  3303  		y := v_1.Args[0]
  3304  		if !(is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB) {
  3305  			break
  3306  		}
  3307  		v.reset(Op386LEAL4)
  3308  		v.AuxInt = int32ToAuxInt(c + 4*d)
  3309  		v.Aux = symToAux(s)
  3310  		v.AddArg2(x, y)
  3311  		return true
  3312  	}
  3313  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  3314  	// result: (LEAL8 [c] {s} x y)
  3315  	for {
  3316  		c := auxIntToInt32(v.AuxInt)
  3317  		s := auxToSym(v.Aux)
  3318  		x := v_0
  3319  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3320  			break
  3321  		}
  3322  		y := v_1.Args[0]
  3323  		v.reset(Op386LEAL8)
  3324  		v.AuxInt = int32ToAuxInt(c)
  3325  		v.Aux = symToAux(s)
  3326  		v.AddArg2(x, y)
  3327  		return true
  3328  	}
  3329  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3330  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3331  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3332  	for {
  3333  		off1 := auxIntToInt32(v.AuxInt)
  3334  		sym1 := auxToSym(v.Aux)
  3335  		if v_0.Op != Op386LEAL {
  3336  			break
  3337  		}
  3338  		off2 := auxIntToInt32(v_0.AuxInt)
  3339  		sym2 := auxToSym(v_0.Aux)
  3340  		x := v_0.Args[0]
  3341  		y := v_1
  3342  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3343  			break
  3344  		}
  3345  		v.reset(Op386LEAL4)
  3346  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3347  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3348  		v.AddArg2(x, y)
  3349  		return true
  3350  	}
  3351  	// match: (LEAL4 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3352  	// cond: is32Bit(int64(off1)+4*int64(off2))
  3353  	// result: (LEAL8 [off1+4*off2] {sym} x y)
  3354  	for {
  3355  		off1 := auxIntToInt32(v.AuxInt)
  3356  		sym := auxToSym(v.Aux)
  3357  		x := v_0
  3358  		if v_1.Op != Op386LEAL1 {
  3359  			break
  3360  		}
  3361  		off2 := auxIntToInt32(v_1.AuxInt)
  3362  		if auxToSym(v_1.Aux) != nil {
  3363  			break
  3364  		}
  3365  		y := v_1.Args[1]
  3366  		if y != v_1.Args[0] || !(is32Bit(int64(off1) + 4*int64(off2))) {
  3367  			break
  3368  		}
  3369  		v.reset(Op386LEAL8)
  3370  		v.AuxInt = int32ToAuxInt(off1 + 4*off2)
  3371  		v.Aux = symToAux(sym)
  3372  		v.AddArg2(x, y)
  3373  		return true
  3374  	}
  3375  	return false
  3376  }
  3377  func rewriteValue386_Op386LEAL8(v *Value) bool {
  3378  	v_1 := v.Args[1]
  3379  	v_0 := v.Args[0]
  3380  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  3381  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3382  	// result: (LEAL8 [c+d] {s} x y)
  3383  	for {
  3384  		c := auxIntToInt32(v.AuxInt)
  3385  		s := auxToSym(v.Aux)
  3386  		if v_0.Op != Op386ADDLconst {
  3387  			break
  3388  		}
  3389  		d := auxIntToInt32(v_0.AuxInt)
  3390  		x := v_0.Args[0]
  3391  		y := v_1
  3392  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3393  			break
  3394  		}
  3395  		v.reset(Op386LEAL8)
  3396  		v.AuxInt = int32ToAuxInt(c + d)
  3397  		v.Aux = symToAux(s)
  3398  		v.AddArg2(x, y)
  3399  		return true
  3400  	}
  3401  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  3402  	// cond: is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB
  3403  	// result: (LEAL8 [c+8*d] {s} x y)
  3404  	for {
  3405  		c := auxIntToInt32(v.AuxInt)
  3406  		s := auxToSym(v.Aux)
  3407  		x := v_0
  3408  		if v_1.Op != Op386ADDLconst {
  3409  			break
  3410  		}
  3411  		d := auxIntToInt32(v_1.AuxInt)
  3412  		y := v_1.Args[0]
  3413  		if !(is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB) {
  3414  			break
  3415  		}
  3416  		v.reset(Op386LEAL8)
  3417  		v.AuxInt = int32ToAuxInt(c + 8*d)
  3418  		v.Aux = symToAux(s)
  3419  		v.AddArg2(x, y)
  3420  		return true
  3421  	}
  3422  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3423  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3424  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3425  	for {
  3426  		off1 := auxIntToInt32(v.AuxInt)
  3427  		sym1 := auxToSym(v.Aux)
  3428  		if v_0.Op != Op386LEAL {
  3429  			break
  3430  		}
  3431  		off2 := auxIntToInt32(v_0.AuxInt)
  3432  		sym2 := auxToSym(v_0.Aux)
  3433  		x := v_0.Args[0]
  3434  		y := v_1
  3435  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3436  			break
  3437  		}
  3438  		v.reset(Op386LEAL8)
  3439  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3440  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3441  		v.AddArg2(x, y)
  3442  		return true
  3443  	}
  3444  	return false
  3445  }
  3446  func rewriteValue386_Op386MOVBLSX(v *Value) bool {
  3447  	v_0 := v.Args[0]
  3448  	b := v.Block
  3449  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  3450  	// cond: x.Uses == 1 && clobber(x)
  3451  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  3452  	for {
  3453  		x := v_0
  3454  		if x.Op != Op386MOVBload {
  3455  			break
  3456  		}
  3457  		off := auxIntToInt32(x.AuxInt)
  3458  		sym := auxToSym(x.Aux)
  3459  		mem := x.Args[1]
  3460  		ptr := x.Args[0]
  3461  		if !(x.Uses == 1 && clobber(x)) {
  3462  			break
  3463  		}
  3464  		b = x.Block
  3465  		v0 := b.NewValue0(x.Pos, Op386MOVBLSXload, v.Type)
  3466  		v.copyOf(v0)
  3467  		v0.AuxInt = int32ToAuxInt(off)
  3468  		v0.Aux = symToAux(sym)
  3469  		v0.AddArg2(ptr, mem)
  3470  		return true
  3471  	}
  3472  	// match: (MOVBLSX (ANDLconst [c] x))
  3473  	// cond: c & 0x80 == 0
  3474  	// result: (ANDLconst [c & 0x7f] x)
  3475  	for {
  3476  		if v_0.Op != Op386ANDLconst {
  3477  			break
  3478  		}
  3479  		c := auxIntToInt32(v_0.AuxInt)
  3480  		x := v_0.Args[0]
  3481  		if !(c&0x80 == 0) {
  3482  			break
  3483  		}
  3484  		v.reset(Op386ANDLconst)
  3485  		v.AuxInt = int32ToAuxInt(c & 0x7f)
  3486  		v.AddArg(x)
  3487  		return true
  3488  	}
  3489  	return false
  3490  }
  3491  func rewriteValue386_Op386MOVBLSXload(v *Value) bool {
  3492  	v_1 := v.Args[1]
  3493  	v_0 := v.Args[0]
  3494  	b := v.Block
  3495  	config := b.Func.Config
  3496  	// match: (MOVBLSXload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3497  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3498  	// result: (MOVBLSX x)
  3499  	for {
  3500  		off := auxIntToInt32(v.AuxInt)
  3501  		sym := auxToSym(v.Aux)
  3502  		ptr := v_0
  3503  		if v_1.Op != Op386MOVBstore {
  3504  			break
  3505  		}
  3506  		off2 := auxIntToInt32(v_1.AuxInt)
  3507  		sym2 := auxToSym(v_1.Aux)
  3508  		x := v_1.Args[1]
  3509  		ptr2 := v_1.Args[0]
  3510  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3511  			break
  3512  		}
  3513  		v.reset(Op386MOVBLSX)
  3514  		v.AddArg(x)
  3515  		return true
  3516  	}
  3517  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3518  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3519  	// result: (MOVBLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3520  	for {
  3521  		off1 := auxIntToInt32(v.AuxInt)
  3522  		sym1 := auxToSym(v.Aux)
  3523  		if v_0.Op != Op386LEAL {
  3524  			break
  3525  		}
  3526  		off2 := auxIntToInt32(v_0.AuxInt)
  3527  		sym2 := auxToSym(v_0.Aux)
  3528  		base := v_0.Args[0]
  3529  		mem := v_1
  3530  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3531  			break
  3532  		}
  3533  		v.reset(Op386MOVBLSXload)
  3534  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3535  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3536  		v.AddArg2(base, mem)
  3537  		return true
  3538  	}
  3539  	return false
  3540  }
  3541  func rewriteValue386_Op386MOVBLZX(v *Value) bool {
  3542  	v_0 := v.Args[0]
  3543  	b := v.Block
  3544  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  3545  	// cond: x.Uses == 1 && clobber(x)
  3546  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  3547  	for {
  3548  		x := v_0
  3549  		if x.Op != Op386MOVBload {
  3550  			break
  3551  		}
  3552  		off := auxIntToInt32(x.AuxInt)
  3553  		sym := auxToSym(x.Aux)
  3554  		mem := x.Args[1]
  3555  		ptr := x.Args[0]
  3556  		if !(x.Uses == 1 && clobber(x)) {
  3557  			break
  3558  		}
  3559  		b = x.Block
  3560  		v0 := b.NewValue0(x.Pos, Op386MOVBload, v.Type)
  3561  		v.copyOf(v0)
  3562  		v0.AuxInt = int32ToAuxInt(off)
  3563  		v0.Aux = symToAux(sym)
  3564  		v0.AddArg2(ptr, mem)
  3565  		return true
  3566  	}
  3567  	// match: (MOVBLZX (ANDLconst [c] x))
  3568  	// result: (ANDLconst [c & 0xff] x)
  3569  	for {
  3570  		if v_0.Op != Op386ANDLconst {
  3571  			break
  3572  		}
  3573  		c := auxIntToInt32(v_0.AuxInt)
  3574  		x := v_0.Args[0]
  3575  		v.reset(Op386ANDLconst)
  3576  		v.AuxInt = int32ToAuxInt(c & 0xff)
  3577  		v.AddArg(x)
  3578  		return true
  3579  	}
  3580  	return false
  3581  }
  3582  func rewriteValue386_Op386MOVBload(v *Value) bool {
  3583  	v_1 := v.Args[1]
  3584  	v_0 := v.Args[0]
  3585  	b := v.Block
  3586  	config := b.Func.Config
  3587  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3588  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3589  	// result: (MOVBLZX x)
  3590  	for {
  3591  		off := auxIntToInt32(v.AuxInt)
  3592  		sym := auxToSym(v.Aux)
  3593  		ptr := v_0
  3594  		if v_1.Op != Op386MOVBstore {
  3595  			break
  3596  		}
  3597  		off2 := auxIntToInt32(v_1.AuxInt)
  3598  		sym2 := auxToSym(v_1.Aux)
  3599  		x := v_1.Args[1]
  3600  		ptr2 := v_1.Args[0]
  3601  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3602  			break
  3603  		}
  3604  		v.reset(Op386MOVBLZX)
  3605  		v.AddArg(x)
  3606  		return true
  3607  	}
  3608  	// match: (MOVBload [off1] {sym} (ADDLconst [off2] ptr) mem)
  3609  	// cond: is32Bit(int64(off1)+int64(off2))
  3610  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  3611  	for {
  3612  		off1 := auxIntToInt32(v.AuxInt)
  3613  		sym := auxToSym(v.Aux)
  3614  		if v_0.Op != Op386ADDLconst {
  3615  			break
  3616  		}
  3617  		off2 := auxIntToInt32(v_0.AuxInt)
  3618  		ptr := v_0.Args[0]
  3619  		mem := v_1
  3620  		if !(is32Bit(int64(off1) + int64(off2))) {
  3621  			break
  3622  		}
  3623  		v.reset(Op386MOVBload)
  3624  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3625  		v.Aux = symToAux(sym)
  3626  		v.AddArg2(ptr, mem)
  3627  		return true
  3628  	}
  3629  	// match: (MOVBload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3630  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3631  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3632  	for {
  3633  		off1 := auxIntToInt32(v.AuxInt)
  3634  		sym1 := auxToSym(v.Aux)
  3635  		if v_0.Op != Op386LEAL {
  3636  			break
  3637  		}
  3638  		off2 := auxIntToInt32(v_0.AuxInt)
  3639  		sym2 := auxToSym(v_0.Aux)
  3640  		base := v_0.Args[0]
  3641  		mem := v_1
  3642  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3643  			break
  3644  		}
  3645  		v.reset(Op386MOVBload)
  3646  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3647  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3648  		v.AddArg2(base, mem)
  3649  		return true
  3650  	}
  3651  	// match: (MOVBload [off] {sym} (SB) _)
  3652  	// cond: symIsRO(sym)
  3653  	// result: (MOVLconst [int32(read8(sym, int64(off)))])
  3654  	for {
  3655  		off := auxIntToInt32(v.AuxInt)
  3656  		sym := auxToSym(v.Aux)
  3657  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  3658  			break
  3659  		}
  3660  		v.reset(Op386MOVLconst)
  3661  		v.AuxInt = int32ToAuxInt(int32(read8(sym, int64(off))))
  3662  		return true
  3663  	}
  3664  	return false
  3665  }
  3666  func rewriteValue386_Op386MOVBstore(v *Value) bool {
  3667  	v_2 := v.Args[2]
  3668  	v_1 := v.Args[1]
  3669  	v_0 := v.Args[0]
  3670  	b := v.Block
  3671  	config := b.Func.Config
  3672  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  3673  	// result: (MOVBstore [off] {sym} ptr x mem)
  3674  	for {
  3675  		off := auxIntToInt32(v.AuxInt)
  3676  		sym := auxToSym(v.Aux)
  3677  		ptr := v_0
  3678  		if v_1.Op != Op386MOVBLSX {
  3679  			break
  3680  		}
  3681  		x := v_1.Args[0]
  3682  		mem := v_2
  3683  		v.reset(Op386MOVBstore)
  3684  		v.AuxInt = int32ToAuxInt(off)
  3685  		v.Aux = symToAux(sym)
  3686  		v.AddArg3(ptr, x, mem)
  3687  		return true
  3688  	}
  3689  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  3690  	// result: (MOVBstore [off] {sym} ptr x mem)
  3691  	for {
  3692  		off := auxIntToInt32(v.AuxInt)
  3693  		sym := auxToSym(v.Aux)
  3694  		ptr := v_0
  3695  		if v_1.Op != Op386MOVBLZX {
  3696  			break
  3697  		}
  3698  		x := v_1.Args[0]
  3699  		mem := v_2
  3700  		v.reset(Op386MOVBstore)
  3701  		v.AuxInt = int32ToAuxInt(off)
  3702  		v.Aux = symToAux(sym)
  3703  		v.AddArg3(ptr, x, mem)
  3704  		return true
  3705  	}
  3706  	// match: (MOVBstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3707  	// cond: is32Bit(int64(off1)+int64(off2))
  3708  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  3709  	for {
  3710  		off1 := auxIntToInt32(v.AuxInt)
  3711  		sym := auxToSym(v.Aux)
  3712  		if v_0.Op != Op386ADDLconst {
  3713  			break
  3714  		}
  3715  		off2 := auxIntToInt32(v_0.AuxInt)
  3716  		ptr := v_0.Args[0]
  3717  		val := v_1
  3718  		mem := v_2
  3719  		if !(is32Bit(int64(off1) + int64(off2))) {
  3720  			break
  3721  		}
  3722  		v.reset(Op386MOVBstore)
  3723  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3724  		v.Aux = symToAux(sym)
  3725  		v.AddArg3(ptr, val, mem)
  3726  		return true
  3727  	}
  3728  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  3729  	// result: (MOVBstoreconst [makeValAndOff(c,off)] {sym} ptr mem)
  3730  	for {
  3731  		off := auxIntToInt32(v.AuxInt)
  3732  		sym := auxToSym(v.Aux)
  3733  		ptr := v_0
  3734  		if v_1.Op != Op386MOVLconst {
  3735  			break
  3736  		}
  3737  		c := auxIntToInt32(v_1.AuxInt)
  3738  		mem := v_2
  3739  		v.reset(Op386MOVBstoreconst)
  3740  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  3741  		v.Aux = symToAux(sym)
  3742  		v.AddArg2(ptr, mem)
  3743  		return true
  3744  	}
  3745  	// match: (MOVBstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3746  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3747  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  3748  	for {
  3749  		off1 := auxIntToInt32(v.AuxInt)
  3750  		sym1 := auxToSym(v.Aux)
  3751  		if v_0.Op != Op386LEAL {
  3752  			break
  3753  		}
  3754  		off2 := auxIntToInt32(v_0.AuxInt)
  3755  		sym2 := auxToSym(v_0.Aux)
  3756  		base := v_0.Args[0]
  3757  		val := v_1
  3758  		mem := v_2
  3759  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3760  			break
  3761  		}
  3762  		v.reset(Op386MOVBstore)
  3763  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3764  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3765  		v.AddArg3(base, val, mem)
  3766  		return true
  3767  	}
  3768  	// match: (MOVBstore [i] {s} p (SHRWconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  3769  	// cond: x.Uses == 1 && clobber(x)
  3770  	// result: (MOVWstore [i-1] {s} p w mem)
  3771  	for {
  3772  		i := auxIntToInt32(v.AuxInt)
  3773  		s := auxToSym(v.Aux)
  3774  		p := v_0
  3775  		if v_1.Op != Op386SHRWconst || auxIntToInt16(v_1.AuxInt) != 8 {
  3776  			break
  3777  		}
  3778  		w := v_1.Args[0]
  3779  		x := v_2
  3780  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  3781  			break
  3782  		}
  3783  		mem := x.Args[2]
  3784  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  3785  			break
  3786  		}
  3787  		v.reset(Op386MOVWstore)
  3788  		v.AuxInt = int32ToAuxInt(i - 1)
  3789  		v.Aux = symToAux(s)
  3790  		v.AddArg3(p, w, mem)
  3791  		return true
  3792  	}
  3793  	// match: (MOVBstore [i] {s} p (SHRLconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  3794  	// cond: x.Uses == 1 && clobber(x)
  3795  	// result: (MOVWstore [i-1] {s} p w mem)
  3796  	for {
  3797  		i := auxIntToInt32(v.AuxInt)
  3798  		s := auxToSym(v.Aux)
  3799  		p := v_0
  3800  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 8 {
  3801  			break
  3802  		}
  3803  		w := v_1.Args[0]
  3804  		x := v_2
  3805  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  3806  			break
  3807  		}
  3808  		mem := x.Args[2]
  3809  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  3810  			break
  3811  		}
  3812  		v.reset(Op386MOVWstore)
  3813  		v.AuxInt = int32ToAuxInt(i - 1)
  3814  		v.Aux = symToAux(s)
  3815  		v.AddArg3(p, w, mem)
  3816  		return true
  3817  	}
  3818  	// match: (MOVBstore [i] {s} p w x:(MOVBstore {s} [i+1] p (SHRWconst [8] w) mem))
  3819  	// cond: x.Uses == 1 && clobber(x)
  3820  	// result: (MOVWstore [i] {s} p w mem)
  3821  	for {
  3822  		i := auxIntToInt32(v.AuxInt)
  3823  		s := auxToSym(v.Aux)
  3824  		p := v_0
  3825  		w := v_1
  3826  		x := v_2
  3827  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i+1 || auxToSym(x.Aux) != s {
  3828  			break
  3829  		}
  3830  		mem := x.Args[2]
  3831  		if p != x.Args[0] {
  3832  			break
  3833  		}
  3834  		x_1 := x.Args[1]
  3835  		if x_1.Op != Op386SHRWconst || auxIntToInt16(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && clobber(x)) {
  3836  			break
  3837  		}
  3838  		v.reset(Op386MOVWstore)
  3839  		v.AuxInt = int32ToAuxInt(i)
  3840  		v.Aux = symToAux(s)
  3841  		v.AddArg3(p, w, mem)
  3842  		return true
  3843  	}
  3844  	// match: (MOVBstore [i] {s} p w x:(MOVBstore {s} [i+1] p (SHRLconst [8] w) mem))
  3845  	// cond: x.Uses == 1 && clobber(x)
  3846  	// result: (MOVWstore [i] {s} p w mem)
  3847  	for {
  3848  		i := auxIntToInt32(v.AuxInt)
  3849  		s := auxToSym(v.Aux)
  3850  		p := v_0
  3851  		w := v_1
  3852  		x := v_2
  3853  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i+1 || auxToSym(x.Aux) != s {
  3854  			break
  3855  		}
  3856  		mem := x.Args[2]
  3857  		if p != x.Args[0] {
  3858  			break
  3859  		}
  3860  		x_1 := x.Args[1]
  3861  		if x_1.Op != Op386SHRLconst || auxIntToInt32(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && clobber(x)) {
  3862  			break
  3863  		}
  3864  		v.reset(Op386MOVWstore)
  3865  		v.AuxInt = int32ToAuxInt(i)
  3866  		v.Aux = symToAux(s)
  3867  		v.AddArg3(p, w, mem)
  3868  		return true
  3869  	}
  3870  	// match: (MOVBstore [i] {s} p (SHRLconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SHRLconst [j-8] w) mem))
  3871  	// cond: x.Uses == 1 && clobber(x)
  3872  	// result: (MOVWstore [i-1] {s} p w0 mem)
  3873  	for {
  3874  		i := auxIntToInt32(v.AuxInt)
  3875  		s := auxToSym(v.Aux)
  3876  		p := v_0
  3877  		if v_1.Op != Op386SHRLconst {
  3878  			break
  3879  		}
  3880  		j := auxIntToInt32(v_1.AuxInt)
  3881  		w := v_1.Args[0]
  3882  		x := v_2
  3883  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  3884  			break
  3885  		}
  3886  		mem := x.Args[2]
  3887  		if p != x.Args[0] {
  3888  			break
  3889  		}
  3890  		w0 := x.Args[1]
  3891  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-8 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  3892  			break
  3893  		}
  3894  		v.reset(Op386MOVWstore)
  3895  		v.AuxInt = int32ToAuxInt(i - 1)
  3896  		v.Aux = symToAux(s)
  3897  		v.AddArg3(p, w0, mem)
  3898  		return true
  3899  	}
  3900  	// match: (MOVBstore [i] {s} p1 (SHRWconst [8] w) x:(MOVBstore [i] {s} p0 w mem))
  3901  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3902  	// result: (MOVWstore [i] {s} p0 w mem)
  3903  	for {
  3904  		i := auxIntToInt32(v.AuxInt)
  3905  		s := auxToSym(v.Aux)
  3906  		p1 := v_0
  3907  		if v_1.Op != Op386SHRWconst || auxIntToInt16(v_1.AuxInt) != 8 {
  3908  			break
  3909  		}
  3910  		w := v_1.Args[0]
  3911  		x := v_2
  3912  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3913  			break
  3914  		}
  3915  		mem := x.Args[2]
  3916  		p0 := x.Args[0]
  3917  		if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3918  			break
  3919  		}
  3920  		v.reset(Op386MOVWstore)
  3921  		v.AuxInt = int32ToAuxInt(i)
  3922  		v.Aux = symToAux(s)
  3923  		v.AddArg3(p0, w, mem)
  3924  		return true
  3925  	}
  3926  	// match: (MOVBstore [i] {s} p1 (SHRLconst [8] w) x:(MOVBstore [i] {s} p0 w mem))
  3927  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3928  	// result: (MOVWstore [i] {s} p0 w mem)
  3929  	for {
  3930  		i := auxIntToInt32(v.AuxInt)
  3931  		s := auxToSym(v.Aux)
  3932  		p1 := v_0
  3933  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 8 {
  3934  			break
  3935  		}
  3936  		w := v_1.Args[0]
  3937  		x := v_2
  3938  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3939  			break
  3940  		}
  3941  		mem := x.Args[2]
  3942  		p0 := x.Args[0]
  3943  		if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3944  			break
  3945  		}
  3946  		v.reset(Op386MOVWstore)
  3947  		v.AuxInt = int32ToAuxInt(i)
  3948  		v.Aux = symToAux(s)
  3949  		v.AddArg3(p0, w, mem)
  3950  		return true
  3951  	}
  3952  	// match: (MOVBstore [i] {s} p0 w x:(MOVBstore {s} [i] p1 (SHRWconst [8] w) mem))
  3953  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3954  	// result: (MOVWstore [i] {s} p0 w mem)
  3955  	for {
  3956  		i := auxIntToInt32(v.AuxInt)
  3957  		s := auxToSym(v.Aux)
  3958  		p0 := v_0
  3959  		w := v_1
  3960  		x := v_2
  3961  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3962  			break
  3963  		}
  3964  		mem := x.Args[2]
  3965  		p1 := x.Args[0]
  3966  		x_1 := x.Args[1]
  3967  		if x_1.Op != Op386SHRWconst || auxIntToInt16(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3968  			break
  3969  		}
  3970  		v.reset(Op386MOVWstore)
  3971  		v.AuxInt = int32ToAuxInt(i)
  3972  		v.Aux = symToAux(s)
  3973  		v.AddArg3(p0, w, mem)
  3974  		return true
  3975  	}
  3976  	// match: (MOVBstore [i] {s} p0 w x:(MOVBstore {s} [i] p1 (SHRLconst [8] w) mem))
  3977  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3978  	// result: (MOVWstore [i] {s} p0 w mem)
  3979  	for {
  3980  		i := auxIntToInt32(v.AuxInt)
  3981  		s := auxToSym(v.Aux)
  3982  		p0 := v_0
  3983  		w := v_1
  3984  		x := v_2
  3985  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3986  			break
  3987  		}
  3988  		mem := x.Args[2]
  3989  		p1 := x.Args[0]
  3990  		x_1 := x.Args[1]
  3991  		if x_1.Op != Op386SHRLconst || auxIntToInt32(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3992  			break
  3993  		}
  3994  		v.reset(Op386MOVWstore)
  3995  		v.AuxInt = int32ToAuxInt(i)
  3996  		v.Aux = symToAux(s)
  3997  		v.AddArg3(p0, w, mem)
  3998  		return true
  3999  	}
  4000  	// match: (MOVBstore [i] {s} p1 (SHRLconst [j] w) x:(MOVBstore [i] {s} p0 w0:(SHRLconst [j-8] w) mem))
  4001  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  4002  	// result: (MOVWstore [i] {s} p0 w0 mem)
  4003  	for {
  4004  		i := auxIntToInt32(v.AuxInt)
  4005  		s := auxToSym(v.Aux)
  4006  		p1 := v_0
  4007  		if v_1.Op != Op386SHRLconst {
  4008  			break
  4009  		}
  4010  		j := auxIntToInt32(v_1.AuxInt)
  4011  		w := v_1.Args[0]
  4012  		x := v_2
  4013  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  4014  			break
  4015  		}
  4016  		mem := x.Args[2]
  4017  		p0 := x.Args[0]
  4018  		w0 := x.Args[1]
  4019  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-8 || w != w0.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4020  			break
  4021  		}
  4022  		v.reset(Op386MOVWstore)
  4023  		v.AuxInt = int32ToAuxInt(i)
  4024  		v.Aux = symToAux(s)
  4025  		v.AddArg3(p0, w0, mem)
  4026  		return true
  4027  	}
  4028  	return false
  4029  }
  4030  func rewriteValue386_Op386MOVBstoreconst(v *Value) bool {
  4031  	v_1 := v.Args[1]
  4032  	v_0 := v.Args[0]
  4033  	b := v.Block
  4034  	config := b.Func.Config
  4035  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  4036  	// cond: sc.canAdd32(off)
  4037  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  4038  	for {
  4039  		sc := auxIntToValAndOff(v.AuxInt)
  4040  		s := auxToSym(v.Aux)
  4041  		if v_0.Op != Op386ADDLconst {
  4042  			break
  4043  		}
  4044  		off := auxIntToInt32(v_0.AuxInt)
  4045  		ptr := v_0.Args[0]
  4046  		mem := v_1
  4047  		if !(sc.canAdd32(off)) {
  4048  			break
  4049  		}
  4050  		v.reset(Op386MOVBstoreconst)
  4051  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4052  		v.Aux = symToAux(s)
  4053  		v.AddArg2(ptr, mem)
  4054  		return true
  4055  	}
  4056  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  4057  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  4058  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  4059  	for {
  4060  		sc := auxIntToValAndOff(v.AuxInt)
  4061  		sym1 := auxToSym(v.Aux)
  4062  		if v_0.Op != Op386LEAL {
  4063  			break
  4064  		}
  4065  		off := auxIntToInt32(v_0.AuxInt)
  4066  		sym2 := auxToSym(v_0.Aux)
  4067  		ptr := v_0.Args[0]
  4068  		mem := v_1
  4069  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  4070  			break
  4071  		}
  4072  		v.reset(Op386MOVBstoreconst)
  4073  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4074  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4075  		v.AddArg2(ptr, mem)
  4076  		return true
  4077  	}
  4078  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  4079  	// cond: x.Uses == 1 && a.Off() + 1 == c.Off() && clobber(x)
  4080  	// result: (MOVWstoreconst [makeValAndOff(a.Val()&0xff | c.Val()<<8, a.Off())] {s} p mem)
  4081  	for {
  4082  		c := auxIntToValAndOff(v.AuxInt)
  4083  		s := auxToSym(v.Aux)
  4084  		p := v_0
  4085  		x := v_1
  4086  		if x.Op != Op386MOVBstoreconst {
  4087  			break
  4088  		}
  4089  		a := auxIntToValAndOff(x.AuxInt)
  4090  		if auxToSym(x.Aux) != s {
  4091  			break
  4092  		}
  4093  		mem := x.Args[1]
  4094  		if p != x.Args[0] || !(x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
  4095  			break
  4096  		}
  4097  		v.reset(Op386MOVWstoreconst)
  4098  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
  4099  		v.Aux = symToAux(s)
  4100  		v.AddArg2(p, mem)
  4101  		return true
  4102  	}
  4103  	// match: (MOVBstoreconst [a] {s} p x:(MOVBstoreconst [c] {s} p mem))
  4104  	// cond: x.Uses == 1 && a.Off() + 1 == c.Off() && clobber(x)
  4105  	// result: (MOVWstoreconst [makeValAndOff(a.Val()&0xff | c.Val()<<8, a.Off())] {s} p mem)
  4106  	for {
  4107  		a := auxIntToValAndOff(v.AuxInt)
  4108  		s := auxToSym(v.Aux)
  4109  		p := v_0
  4110  		x := v_1
  4111  		if x.Op != Op386MOVBstoreconst {
  4112  			break
  4113  		}
  4114  		c := auxIntToValAndOff(x.AuxInt)
  4115  		if auxToSym(x.Aux) != s {
  4116  			break
  4117  		}
  4118  		mem := x.Args[1]
  4119  		if p != x.Args[0] || !(x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
  4120  			break
  4121  		}
  4122  		v.reset(Op386MOVWstoreconst)
  4123  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
  4124  		v.Aux = symToAux(s)
  4125  		v.AddArg2(p, mem)
  4126  		return true
  4127  	}
  4128  	// match: (MOVBstoreconst [c] {s} p1 x:(MOVBstoreconst [a] {s} p0 mem))
  4129  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)
  4130  	// result: (MOVWstoreconst [makeValAndOff(a.Val()&0xff | c.Val()<<8, a.Off())] {s} p0 mem)
  4131  	for {
  4132  		c := auxIntToValAndOff(v.AuxInt)
  4133  		s := auxToSym(v.Aux)
  4134  		p1 := v_0
  4135  		x := v_1
  4136  		if x.Op != Op386MOVBstoreconst {
  4137  			break
  4138  		}
  4139  		a := auxIntToValAndOff(x.AuxInt)
  4140  		if auxToSym(x.Aux) != s {
  4141  			break
  4142  		}
  4143  		mem := x.Args[1]
  4144  		p0 := x.Args[0]
  4145  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4146  			break
  4147  		}
  4148  		v.reset(Op386MOVWstoreconst)
  4149  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
  4150  		v.Aux = symToAux(s)
  4151  		v.AddArg2(p0, mem)
  4152  		return true
  4153  	}
  4154  	// match: (MOVBstoreconst [a] {s} p0 x:(MOVBstoreconst [c] {s} p1 mem))
  4155  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)
  4156  	// result: (MOVWstoreconst [makeValAndOff(a.Val()&0xff | c.Val()<<8, a.Off())] {s} p0 mem)
  4157  	for {
  4158  		a := auxIntToValAndOff(v.AuxInt)
  4159  		s := auxToSym(v.Aux)
  4160  		p0 := v_0
  4161  		x := v_1
  4162  		if x.Op != Op386MOVBstoreconst {
  4163  			break
  4164  		}
  4165  		c := auxIntToValAndOff(x.AuxInt)
  4166  		if auxToSym(x.Aux) != s {
  4167  			break
  4168  		}
  4169  		mem := x.Args[1]
  4170  		p1 := x.Args[0]
  4171  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4172  			break
  4173  		}
  4174  		v.reset(Op386MOVWstoreconst)
  4175  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xff|c.Val()<<8, a.Off()))
  4176  		v.Aux = symToAux(s)
  4177  		v.AddArg2(p0, mem)
  4178  		return true
  4179  	}
  4180  	return false
  4181  }
  4182  func rewriteValue386_Op386MOVLload(v *Value) bool {
  4183  	v_1 := v.Args[1]
  4184  	v_0 := v.Args[0]
  4185  	b := v.Block
  4186  	config := b.Func.Config
  4187  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  4188  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  4189  	// result: x
  4190  	for {
  4191  		off := auxIntToInt32(v.AuxInt)
  4192  		sym := auxToSym(v.Aux)
  4193  		ptr := v_0
  4194  		if v_1.Op != Op386MOVLstore {
  4195  			break
  4196  		}
  4197  		off2 := auxIntToInt32(v_1.AuxInt)
  4198  		sym2 := auxToSym(v_1.Aux)
  4199  		x := v_1.Args[1]
  4200  		ptr2 := v_1.Args[0]
  4201  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  4202  			break
  4203  		}
  4204  		v.copyOf(x)
  4205  		return true
  4206  	}
  4207  	// match: (MOVLload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4208  	// cond: is32Bit(int64(off1)+int64(off2))
  4209  	// result: (MOVLload [off1+off2] {sym} ptr mem)
  4210  	for {
  4211  		off1 := auxIntToInt32(v.AuxInt)
  4212  		sym := auxToSym(v.Aux)
  4213  		if v_0.Op != Op386ADDLconst {
  4214  			break
  4215  		}
  4216  		off2 := auxIntToInt32(v_0.AuxInt)
  4217  		ptr := v_0.Args[0]
  4218  		mem := v_1
  4219  		if !(is32Bit(int64(off1) + int64(off2))) {
  4220  			break
  4221  		}
  4222  		v.reset(Op386MOVLload)
  4223  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4224  		v.Aux = symToAux(sym)
  4225  		v.AddArg2(ptr, mem)
  4226  		return true
  4227  	}
  4228  	// match: (MOVLload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4229  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4230  	// result: (MOVLload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4231  	for {
  4232  		off1 := auxIntToInt32(v.AuxInt)
  4233  		sym1 := auxToSym(v.Aux)
  4234  		if v_0.Op != Op386LEAL {
  4235  			break
  4236  		}
  4237  		off2 := auxIntToInt32(v_0.AuxInt)
  4238  		sym2 := auxToSym(v_0.Aux)
  4239  		base := v_0.Args[0]
  4240  		mem := v_1
  4241  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4242  			break
  4243  		}
  4244  		v.reset(Op386MOVLload)
  4245  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4246  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4247  		v.AddArg2(base, mem)
  4248  		return true
  4249  	}
  4250  	// match: (MOVLload [off] {sym} (SB) _)
  4251  	// cond: symIsRO(sym)
  4252  	// result: (MOVLconst [int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  4253  	for {
  4254  		off := auxIntToInt32(v.AuxInt)
  4255  		sym := auxToSym(v.Aux)
  4256  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4257  			break
  4258  		}
  4259  		v.reset(Op386MOVLconst)
  4260  		v.AuxInt = int32ToAuxInt(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  4261  		return true
  4262  	}
  4263  	return false
  4264  }
  4265  func rewriteValue386_Op386MOVLstore(v *Value) bool {
  4266  	v_2 := v.Args[2]
  4267  	v_1 := v.Args[1]
  4268  	v_0 := v.Args[0]
  4269  	b := v.Block
  4270  	config := b.Func.Config
  4271  	// match: (MOVLstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4272  	// cond: is32Bit(int64(off1)+int64(off2))
  4273  	// result: (MOVLstore [off1+off2] {sym} ptr val mem)
  4274  	for {
  4275  		off1 := auxIntToInt32(v.AuxInt)
  4276  		sym := auxToSym(v.Aux)
  4277  		if v_0.Op != Op386ADDLconst {
  4278  			break
  4279  		}
  4280  		off2 := auxIntToInt32(v_0.AuxInt)
  4281  		ptr := v_0.Args[0]
  4282  		val := v_1
  4283  		mem := v_2
  4284  		if !(is32Bit(int64(off1) + int64(off2))) {
  4285  			break
  4286  		}
  4287  		v.reset(Op386MOVLstore)
  4288  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4289  		v.Aux = symToAux(sym)
  4290  		v.AddArg3(ptr, val, mem)
  4291  		return true
  4292  	}
  4293  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  4294  	// result: (MOVLstoreconst [makeValAndOff(c,off)] {sym} ptr mem)
  4295  	for {
  4296  		off := auxIntToInt32(v.AuxInt)
  4297  		sym := auxToSym(v.Aux)
  4298  		ptr := v_0
  4299  		if v_1.Op != Op386MOVLconst {
  4300  			break
  4301  		}
  4302  		c := auxIntToInt32(v_1.AuxInt)
  4303  		mem := v_2
  4304  		v.reset(Op386MOVLstoreconst)
  4305  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4306  		v.Aux = symToAux(sym)
  4307  		v.AddArg2(ptr, mem)
  4308  		return true
  4309  	}
  4310  	// match: (MOVLstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4311  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4312  	// result: (MOVLstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4313  	for {
  4314  		off1 := auxIntToInt32(v.AuxInt)
  4315  		sym1 := auxToSym(v.Aux)
  4316  		if v_0.Op != Op386LEAL {
  4317  			break
  4318  		}
  4319  		off2 := auxIntToInt32(v_0.AuxInt)
  4320  		sym2 := auxToSym(v_0.Aux)
  4321  		base := v_0.Args[0]
  4322  		val := v_1
  4323  		mem := v_2
  4324  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4325  			break
  4326  		}
  4327  		v.reset(Op386MOVLstore)
  4328  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4329  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4330  		v.AddArg3(base, val, mem)
  4331  		return true
  4332  	}
  4333  	// match: (MOVLstore {sym} [off] ptr y:(ADDLload x [off] {sym} ptr mem) mem)
  4334  	// cond: y.Uses==1 && clobber(y)
  4335  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4336  	for {
  4337  		off := auxIntToInt32(v.AuxInt)
  4338  		sym := auxToSym(v.Aux)
  4339  		ptr := v_0
  4340  		y := v_1
  4341  		if y.Op != Op386ADDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4342  			break
  4343  		}
  4344  		mem := y.Args[2]
  4345  		x := y.Args[0]
  4346  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4347  			break
  4348  		}
  4349  		v.reset(Op386ADDLmodify)
  4350  		v.AuxInt = int32ToAuxInt(off)
  4351  		v.Aux = symToAux(sym)
  4352  		v.AddArg3(ptr, x, mem)
  4353  		return true
  4354  	}
  4355  	// match: (MOVLstore {sym} [off] ptr y:(ANDLload x [off] {sym} ptr mem) mem)
  4356  	// cond: y.Uses==1 && clobber(y)
  4357  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4358  	for {
  4359  		off := auxIntToInt32(v.AuxInt)
  4360  		sym := auxToSym(v.Aux)
  4361  		ptr := v_0
  4362  		y := v_1
  4363  		if y.Op != Op386ANDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4364  			break
  4365  		}
  4366  		mem := y.Args[2]
  4367  		x := y.Args[0]
  4368  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4369  			break
  4370  		}
  4371  		v.reset(Op386ANDLmodify)
  4372  		v.AuxInt = int32ToAuxInt(off)
  4373  		v.Aux = symToAux(sym)
  4374  		v.AddArg3(ptr, x, mem)
  4375  		return true
  4376  	}
  4377  	// match: (MOVLstore {sym} [off] ptr y:(ORLload x [off] {sym} ptr mem) mem)
  4378  	// cond: y.Uses==1 && clobber(y)
  4379  	// result: (ORLmodify [off] {sym} ptr x mem)
  4380  	for {
  4381  		off := auxIntToInt32(v.AuxInt)
  4382  		sym := auxToSym(v.Aux)
  4383  		ptr := v_0
  4384  		y := v_1
  4385  		if y.Op != Op386ORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4386  			break
  4387  		}
  4388  		mem := y.Args[2]
  4389  		x := y.Args[0]
  4390  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4391  			break
  4392  		}
  4393  		v.reset(Op386ORLmodify)
  4394  		v.AuxInt = int32ToAuxInt(off)
  4395  		v.Aux = symToAux(sym)
  4396  		v.AddArg3(ptr, x, mem)
  4397  		return true
  4398  	}
  4399  	// match: (MOVLstore {sym} [off] ptr y:(XORLload x [off] {sym} ptr mem) mem)
  4400  	// cond: y.Uses==1 && clobber(y)
  4401  	// result: (XORLmodify [off] {sym} ptr x mem)
  4402  	for {
  4403  		off := auxIntToInt32(v.AuxInt)
  4404  		sym := auxToSym(v.Aux)
  4405  		ptr := v_0
  4406  		y := v_1
  4407  		if y.Op != Op386XORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4408  			break
  4409  		}
  4410  		mem := y.Args[2]
  4411  		x := y.Args[0]
  4412  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4413  			break
  4414  		}
  4415  		v.reset(Op386XORLmodify)
  4416  		v.AuxInt = int32ToAuxInt(off)
  4417  		v.Aux = symToAux(sym)
  4418  		v.AddArg3(ptr, x, mem)
  4419  		return true
  4420  	}
  4421  	// match: (MOVLstore {sym} [off] ptr y:(ADDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4422  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4423  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4424  	for {
  4425  		off := auxIntToInt32(v.AuxInt)
  4426  		sym := auxToSym(v.Aux)
  4427  		ptr := v_0
  4428  		y := v_1
  4429  		if y.Op != Op386ADDL {
  4430  			break
  4431  		}
  4432  		_ = y.Args[1]
  4433  		y_0 := y.Args[0]
  4434  		y_1 := y.Args[1]
  4435  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4436  			l := y_0
  4437  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4438  				continue
  4439  			}
  4440  			mem := l.Args[1]
  4441  			if ptr != l.Args[0] {
  4442  				continue
  4443  			}
  4444  			x := y_1
  4445  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4446  				continue
  4447  			}
  4448  			v.reset(Op386ADDLmodify)
  4449  			v.AuxInt = int32ToAuxInt(off)
  4450  			v.Aux = symToAux(sym)
  4451  			v.AddArg3(ptr, x, mem)
  4452  			return true
  4453  		}
  4454  		break
  4455  	}
  4456  	// match: (MOVLstore {sym} [off] ptr y:(SUBL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4457  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4458  	// result: (SUBLmodify [off] {sym} ptr x mem)
  4459  	for {
  4460  		off := auxIntToInt32(v.AuxInt)
  4461  		sym := auxToSym(v.Aux)
  4462  		ptr := v_0
  4463  		y := v_1
  4464  		if y.Op != Op386SUBL {
  4465  			break
  4466  		}
  4467  		x := y.Args[1]
  4468  		l := y.Args[0]
  4469  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4470  			break
  4471  		}
  4472  		mem := l.Args[1]
  4473  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4474  			break
  4475  		}
  4476  		v.reset(Op386SUBLmodify)
  4477  		v.AuxInt = int32ToAuxInt(off)
  4478  		v.Aux = symToAux(sym)
  4479  		v.AddArg3(ptr, x, mem)
  4480  		return true
  4481  	}
  4482  	// match: (MOVLstore {sym} [off] ptr y:(ANDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4483  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4484  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4485  	for {
  4486  		off := auxIntToInt32(v.AuxInt)
  4487  		sym := auxToSym(v.Aux)
  4488  		ptr := v_0
  4489  		y := v_1
  4490  		if y.Op != Op386ANDL {
  4491  			break
  4492  		}
  4493  		_ = y.Args[1]
  4494  		y_0 := y.Args[0]
  4495  		y_1 := y.Args[1]
  4496  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4497  			l := y_0
  4498  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4499  				continue
  4500  			}
  4501  			mem := l.Args[1]
  4502  			if ptr != l.Args[0] {
  4503  				continue
  4504  			}
  4505  			x := y_1
  4506  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4507  				continue
  4508  			}
  4509  			v.reset(Op386ANDLmodify)
  4510  			v.AuxInt = int32ToAuxInt(off)
  4511  			v.Aux = symToAux(sym)
  4512  			v.AddArg3(ptr, x, mem)
  4513  			return true
  4514  		}
  4515  		break
  4516  	}
  4517  	// match: (MOVLstore {sym} [off] ptr y:(ORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4518  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4519  	// result: (ORLmodify [off] {sym} ptr x mem)
  4520  	for {
  4521  		off := auxIntToInt32(v.AuxInt)
  4522  		sym := auxToSym(v.Aux)
  4523  		ptr := v_0
  4524  		y := v_1
  4525  		if y.Op != Op386ORL {
  4526  			break
  4527  		}
  4528  		_ = y.Args[1]
  4529  		y_0 := y.Args[0]
  4530  		y_1 := y.Args[1]
  4531  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4532  			l := y_0
  4533  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4534  				continue
  4535  			}
  4536  			mem := l.Args[1]
  4537  			if ptr != l.Args[0] {
  4538  				continue
  4539  			}
  4540  			x := y_1
  4541  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4542  				continue
  4543  			}
  4544  			v.reset(Op386ORLmodify)
  4545  			v.AuxInt = int32ToAuxInt(off)
  4546  			v.Aux = symToAux(sym)
  4547  			v.AddArg3(ptr, x, mem)
  4548  			return true
  4549  		}
  4550  		break
  4551  	}
  4552  	// match: (MOVLstore {sym} [off] ptr y:(XORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4553  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4554  	// result: (XORLmodify [off] {sym} ptr x mem)
  4555  	for {
  4556  		off := auxIntToInt32(v.AuxInt)
  4557  		sym := auxToSym(v.Aux)
  4558  		ptr := v_0
  4559  		y := v_1
  4560  		if y.Op != Op386XORL {
  4561  			break
  4562  		}
  4563  		_ = y.Args[1]
  4564  		y_0 := y.Args[0]
  4565  		y_1 := y.Args[1]
  4566  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4567  			l := y_0
  4568  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4569  				continue
  4570  			}
  4571  			mem := l.Args[1]
  4572  			if ptr != l.Args[0] {
  4573  				continue
  4574  			}
  4575  			x := y_1
  4576  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4577  				continue
  4578  			}
  4579  			v.reset(Op386XORLmodify)
  4580  			v.AuxInt = int32ToAuxInt(off)
  4581  			v.Aux = symToAux(sym)
  4582  			v.AddArg3(ptr, x, mem)
  4583  			return true
  4584  		}
  4585  		break
  4586  	}
  4587  	// match: (MOVLstore {sym} [off] ptr y:(ADDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4588  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4589  	// result: (ADDLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4590  	for {
  4591  		off := auxIntToInt32(v.AuxInt)
  4592  		sym := auxToSym(v.Aux)
  4593  		ptr := v_0
  4594  		y := v_1
  4595  		if y.Op != Op386ADDLconst {
  4596  			break
  4597  		}
  4598  		c := auxIntToInt32(y.AuxInt)
  4599  		l := y.Args[0]
  4600  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4601  			break
  4602  		}
  4603  		mem := l.Args[1]
  4604  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4605  			break
  4606  		}
  4607  		v.reset(Op386ADDLconstmodify)
  4608  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4609  		v.Aux = symToAux(sym)
  4610  		v.AddArg2(ptr, mem)
  4611  		return true
  4612  	}
  4613  	// match: (MOVLstore {sym} [off] ptr y:(ANDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4614  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4615  	// result: (ANDLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4616  	for {
  4617  		off := auxIntToInt32(v.AuxInt)
  4618  		sym := auxToSym(v.Aux)
  4619  		ptr := v_0
  4620  		y := v_1
  4621  		if y.Op != Op386ANDLconst {
  4622  			break
  4623  		}
  4624  		c := auxIntToInt32(y.AuxInt)
  4625  		l := y.Args[0]
  4626  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4627  			break
  4628  		}
  4629  		mem := l.Args[1]
  4630  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4631  			break
  4632  		}
  4633  		v.reset(Op386ANDLconstmodify)
  4634  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4635  		v.Aux = symToAux(sym)
  4636  		v.AddArg2(ptr, mem)
  4637  		return true
  4638  	}
  4639  	// match: (MOVLstore {sym} [off] ptr y:(ORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4640  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4641  	// result: (ORLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4642  	for {
  4643  		off := auxIntToInt32(v.AuxInt)
  4644  		sym := auxToSym(v.Aux)
  4645  		ptr := v_0
  4646  		y := v_1
  4647  		if y.Op != Op386ORLconst {
  4648  			break
  4649  		}
  4650  		c := auxIntToInt32(y.AuxInt)
  4651  		l := y.Args[0]
  4652  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4653  			break
  4654  		}
  4655  		mem := l.Args[1]
  4656  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4657  			break
  4658  		}
  4659  		v.reset(Op386ORLconstmodify)
  4660  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4661  		v.Aux = symToAux(sym)
  4662  		v.AddArg2(ptr, mem)
  4663  		return true
  4664  	}
  4665  	// match: (MOVLstore {sym} [off] ptr y:(XORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4666  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4667  	// result: (XORLconstmodify [makeValAndOff(c,off)] {sym} ptr mem)
  4668  	for {
  4669  		off := auxIntToInt32(v.AuxInt)
  4670  		sym := auxToSym(v.Aux)
  4671  		ptr := v_0
  4672  		y := v_1
  4673  		if y.Op != Op386XORLconst {
  4674  			break
  4675  		}
  4676  		c := auxIntToInt32(y.AuxInt)
  4677  		l := y.Args[0]
  4678  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4679  			break
  4680  		}
  4681  		mem := l.Args[1]
  4682  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4683  			break
  4684  		}
  4685  		v.reset(Op386XORLconstmodify)
  4686  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  4687  		v.Aux = symToAux(sym)
  4688  		v.AddArg2(ptr, mem)
  4689  		return true
  4690  	}
  4691  	return false
  4692  }
  4693  func rewriteValue386_Op386MOVLstoreconst(v *Value) bool {
  4694  	v_1 := v.Args[1]
  4695  	v_0 := v.Args[0]
  4696  	b := v.Block
  4697  	config := b.Func.Config
  4698  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  4699  	// cond: sc.canAdd32(off)
  4700  	// result: (MOVLstoreconst [sc.addOffset32(off)] {s} ptr mem)
  4701  	for {
  4702  		sc := auxIntToValAndOff(v.AuxInt)
  4703  		s := auxToSym(v.Aux)
  4704  		if v_0.Op != Op386ADDLconst {
  4705  			break
  4706  		}
  4707  		off := auxIntToInt32(v_0.AuxInt)
  4708  		ptr := v_0.Args[0]
  4709  		mem := v_1
  4710  		if !(sc.canAdd32(off)) {
  4711  			break
  4712  		}
  4713  		v.reset(Op386MOVLstoreconst)
  4714  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4715  		v.Aux = symToAux(s)
  4716  		v.AddArg2(ptr, mem)
  4717  		return true
  4718  	}
  4719  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  4720  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  4721  	// result: (MOVLstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  4722  	for {
  4723  		sc := auxIntToValAndOff(v.AuxInt)
  4724  		sym1 := auxToSym(v.Aux)
  4725  		if v_0.Op != Op386LEAL {
  4726  			break
  4727  		}
  4728  		off := auxIntToInt32(v_0.AuxInt)
  4729  		sym2 := auxToSym(v_0.Aux)
  4730  		ptr := v_0.Args[0]
  4731  		mem := v_1
  4732  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  4733  			break
  4734  		}
  4735  		v.reset(Op386MOVLstoreconst)
  4736  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4737  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4738  		v.AddArg2(ptr, mem)
  4739  		return true
  4740  	}
  4741  	return false
  4742  }
  4743  func rewriteValue386_Op386MOVSDconst(v *Value) bool {
  4744  	b := v.Block
  4745  	config := b.Func.Config
  4746  	typ := &b.Func.Config.Types
  4747  	// match: (MOVSDconst [c])
  4748  	// cond: config.ctxt.Flag_shared
  4749  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4750  	for {
  4751  		c := auxIntToFloat64(v.AuxInt)
  4752  		if !(config.ctxt.Flag_shared) {
  4753  			break
  4754  		}
  4755  		v.reset(Op386MOVSDconst2)
  4756  		v0 := b.NewValue0(v.Pos, Op386MOVSDconst1, typ.UInt32)
  4757  		v0.AuxInt = float64ToAuxInt(c)
  4758  		v.AddArg(v0)
  4759  		return true
  4760  	}
  4761  	return false
  4762  }
  4763  func rewriteValue386_Op386MOVSDload(v *Value) bool {
  4764  	v_1 := v.Args[1]
  4765  	v_0 := v.Args[0]
  4766  	b := v.Block
  4767  	config := b.Func.Config
  4768  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4769  	// cond: is32Bit(int64(off1)+int64(off2))
  4770  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4771  	for {
  4772  		off1 := auxIntToInt32(v.AuxInt)
  4773  		sym := auxToSym(v.Aux)
  4774  		if v_0.Op != Op386ADDLconst {
  4775  			break
  4776  		}
  4777  		off2 := auxIntToInt32(v_0.AuxInt)
  4778  		ptr := v_0.Args[0]
  4779  		mem := v_1
  4780  		if !(is32Bit(int64(off1) + int64(off2))) {
  4781  			break
  4782  		}
  4783  		v.reset(Op386MOVSDload)
  4784  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4785  		v.Aux = symToAux(sym)
  4786  		v.AddArg2(ptr, mem)
  4787  		return true
  4788  	}
  4789  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4790  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4791  	// result: (MOVSDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4792  	for {
  4793  		off1 := auxIntToInt32(v.AuxInt)
  4794  		sym1 := auxToSym(v.Aux)
  4795  		if v_0.Op != Op386LEAL {
  4796  			break
  4797  		}
  4798  		off2 := auxIntToInt32(v_0.AuxInt)
  4799  		sym2 := auxToSym(v_0.Aux)
  4800  		base := v_0.Args[0]
  4801  		mem := v_1
  4802  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4803  			break
  4804  		}
  4805  		v.reset(Op386MOVSDload)
  4806  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4807  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4808  		v.AddArg2(base, mem)
  4809  		return true
  4810  	}
  4811  	return false
  4812  }
  4813  func rewriteValue386_Op386MOVSDstore(v *Value) bool {
  4814  	v_2 := v.Args[2]
  4815  	v_1 := v.Args[1]
  4816  	v_0 := v.Args[0]
  4817  	b := v.Block
  4818  	config := b.Func.Config
  4819  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4820  	// cond: is32Bit(int64(off1)+int64(off2))
  4821  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4822  	for {
  4823  		off1 := auxIntToInt32(v.AuxInt)
  4824  		sym := auxToSym(v.Aux)
  4825  		if v_0.Op != Op386ADDLconst {
  4826  			break
  4827  		}
  4828  		off2 := auxIntToInt32(v_0.AuxInt)
  4829  		ptr := v_0.Args[0]
  4830  		val := v_1
  4831  		mem := v_2
  4832  		if !(is32Bit(int64(off1) + int64(off2))) {
  4833  			break
  4834  		}
  4835  		v.reset(Op386MOVSDstore)
  4836  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4837  		v.Aux = symToAux(sym)
  4838  		v.AddArg3(ptr, val, mem)
  4839  		return true
  4840  	}
  4841  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4842  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4843  	// result: (MOVSDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4844  	for {
  4845  		off1 := auxIntToInt32(v.AuxInt)
  4846  		sym1 := auxToSym(v.Aux)
  4847  		if v_0.Op != Op386LEAL {
  4848  			break
  4849  		}
  4850  		off2 := auxIntToInt32(v_0.AuxInt)
  4851  		sym2 := auxToSym(v_0.Aux)
  4852  		base := v_0.Args[0]
  4853  		val := v_1
  4854  		mem := v_2
  4855  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4856  			break
  4857  		}
  4858  		v.reset(Op386MOVSDstore)
  4859  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4860  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4861  		v.AddArg3(base, val, mem)
  4862  		return true
  4863  	}
  4864  	return false
  4865  }
  4866  func rewriteValue386_Op386MOVSSconst(v *Value) bool {
  4867  	b := v.Block
  4868  	config := b.Func.Config
  4869  	typ := &b.Func.Config.Types
  4870  	// match: (MOVSSconst [c])
  4871  	// cond: config.ctxt.Flag_shared
  4872  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4873  	for {
  4874  		c := auxIntToFloat32(v.AuxInt)
  4875  		if !(config.ctxt.Flag_shared) {
  4876  			break
  4877  		}
  4878  		v.reset(Op386MOVSSconst2)
  4879  		v0 := b.NewValue0(v.Pos, Op386MOVSSconst1, typ.UInt32)
  4880  		v0.AuxInt = float32ToAuxInt(c)
  4881  		v.AddArg(v0)
  4882  		return true
  4883  	}
  4884  	return false
  4885  }
  4886  func rewriteValue386_Op386MOVSSload(v *Value) bool {
  4887  	v_1 := v.Args[1]
  4888  	v_0 := v.Args[0]
  4889  	b := v.Block
  4890  	config := b.Func.Config
  4891  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4892  	// cond: is32Bit(int64(off1)+int64(off2))
  4893  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4894  	for {
  4895  		off1 := auxIntToInt32(v.AuxInt)
  4896  		sym := auxToSym(v.Aux)
  4897  		if v_0.Op != Op386ADDLconst {
  4898  			break
  4899  		}
  4900  		off2 := auxIntToInt32(v_0.AuxInt)
  4901  		ptr := v_0.Args[0]
  4902  		mem := v_1
  4903  		if !(is32Bit(int64(off1) + int64(off2))) {
  4904  			break
  4905  		}
  4906  		v.reset(Op386MOVSSload)
  4907  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4908  		v.Aux = symToAux(sym)
  4909  		v.AddArg2(ptr, mem)
  4910  		return true
  4911  	}
  4912  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4913  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4914  	// result: (MOVSSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4915  	for {
  4916  		off1 := auxIntToInt32(v.AuxInt)
  4917  		sym1 := auxToSym(v.Aux)
  4918  		if v_0.Op != Op386LEAL {
  4919  			break
  4920  		}
  4921  		off2 := auxIntToInt32(v_0.AuxInt)
  4922  		sym2 := auxToSym(v_0.Aux)
  4923  		base := v_0.Args[0]
  4924  		mem := v_1
  4925  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4926  			break
  4927  		}
  4928  		v.reset(Op386MOVSSload)
  4929  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4930  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4931  		v.AddArg2(base, mem)
  4932  		return true
  4933  	}
  4934  	return false
  4935  }
  4936  func rewriteValue386_Op386MOVSSstore(v *Value) bool {
  4937  	v_2 := v.Args[2]
  4938  	v_1 := v.Args[1]
  4939  	v_0 := v.Args[0]
  4940  	b := v.Block
  4941  	config := b.Func.Config
  4942  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4943  	// cond: is32Bit(int64(off1)+int64(off2))
  4944  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4945  	for {
  4946  		off1 := auxIntToInt32(v.AuxInt)
  4947  		sym := auxToSym(v.Aux)
  4948  		if v_0.Op != Op386ADDLconst {
  4949  			break
  4950  		}
  4951  		off2 := auxIntToInt32(v_0.AuxInt)
  4952  		ptr := v_0.Args[0]
  4953  		val := v_1
  4954  		mem := v_2
  4955  		if !(is32Bit(int64(off1) + int64(off2))) {
  4956  			break
  4957  		}
  4958  		v.reset(Op386MOVSSstore)
  4959  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4960  		v.Aux = symToAux(sym)
  4961  		v.AddArg3(ptr, val, mem)
  4962  		return true
  4963  	}
  4964  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4965  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4966  	// result: (MOVSSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4967  	for {
  4968  		off1 := auxIntToInt32(v.AuxInt)
  4969  		sym1 := auxToSym(v.Aux)
  4970  		if v_0.Op != Op386LEAL {
  4971  			break
  4972  		}
  4973  		off2 := auxIntToInt32(v_0.AuxInt)
  4974  		sym2 := auxToSym(v_0.Aux)
  4975  		base := v_0.Args[0]
  4976  		val := v_1
  4977  		mem := v_2
  4978  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4979  			break
  4980  		}
  4981  		v.reset(Op386MOVSSstore)
  4982  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4983  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4984  		v.AddArg3(base, val, mem)
  4985  		return true
  4986  	}
  4987  	return false
  4988  }
  4989  func rewriteValue386_Op386MOVWLSX(v *Value) bool {
  4990  	v_0 := v.Args[0]
  4991  	b := v.Block
  4992  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  4993  	// cond: x.Uses == 1 && clobber(x)
  4994  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  4995  	for {
  4996  		x := v_0
  4997  		if x.Op != Op386MOVWload {
  4998  			break
  4999  		}
  5000  		off := auxIntToInt32(x.AuxInt)
  5001  		sym := auxToSym(x.Aux)
  5002  		mem := x.Args[1]
  5003  		ptr := x.Args[0]
  5004  		if !(x.Uses == 1 && clobber(x)) {
  5005  			break
  5006  		}
  5007  		b = x.Block
  5008  		v0 := b.NewValue0(x.Pos, Op386MOVWLSXload, v.Type)
  5009  		v.copyOf(v0)
  5010  		v0.AuxInt = int32ToAuxInt(off)
  5011  		v0.Aux = symToAux(sym)
  5012  		v0.AddArg2(ptr, mem)
  5013  		return true
  5014  	}
  5015  	// match: (MOVWLSX (ANDLconst [c] x))
  5016  	// cond: c & 0x8000 == 0
  5017  	// result: (ANDLconst [c & 0x7fff] x)
  5018  	for {
  5019  		if v_0.Op != Op386ANDLconst {
  5020  			break
  5021  		}
  5022  		c := auxIntToInt32(v_0.AuxInt)
  5023  		x := v_0.Args[0]
  5024  		if !(c&0x8000 == 0) {
  5025  			break
  5026  		}
  5027  		v.reset(Op386ANDLconst)
  5028  		v.AuxInt = int32ToAuxInt(c & 0x7fff)
  5029  		v.AddArg(x)
  5030  		return true
  5031  	}
  5032  	return false
  5033  }
  5034  func rewriteValue386_Op386MOVWLSXload(v *Value) bool {
  5035  	v_1 := v.Args[1]
  5036  	v_0 := v.Args[0]
  5037  	b := v.Block
  5038  	config := b.Func.Config
  5039  	// match: (MOVWLSXload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5040  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5041  	// result: (MOVWLSX x)
  5042  	for {
  5043  		off := auxIntToInt32(v.AuxInt)
  5044  		sym := auxToSym(v.Aux)
  5045  		ptr := v_0
  5046  		if v_1.Op != Op386MOVWstore {
  5047  			break
  5048  		}
  5049  		off2 := auxIntToInt32(v_1.AuxInt)
  5050  		sym2 := auxToSym(v_1.Aux)
  5051  		x := v_1.Args[1]
  5052  		ptr2 := v_1.Args[0]
  5053  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5054  			break
  5055  		}
  5056  		v.reset(Op386MOVWLSX)
  5057  		v.AddArg(x)
  5058  		return true
  5059  	}
  5060  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5061  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5062  	// result: (MOVWLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5063  	for {
  5064  		off1 := auxIntToInt32(v.AuxInt)
  5065  		sym1 := auxToSym(v.Aux)
  5066  		if v_0.Op != Op386LEAL {
  5067  			break
  5068  		}
  5069  		off2 := auxIntToInt32(v_0.AuxInt)
  5070  		sym2 := auxToSym(v_0.Aux)
  5071  		base := v_0.Args[0]
  5072  		mem := v_1
  5073  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5074  			break
  5075  		}
  5076  		v.reset(Op386MOVWLSXload)
  5077  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5078  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5079  		v.AddArg2(base, mem)
  5080  		return true
  5081  	}
  5082  	return false
  5083  }
  5084  func rewriteValue386_Op386MOVWLZX(v *Value) bool {
  5085  	v_0 := v.Args[0]
  5086  	b := v.Block
  5087  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  5088  	// cond: x.Uses == 1 && clobber(x)
  5089  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  5090  	for {
  5091  		x := v_0
  5092  		if x.Op != Op386MOVWload {
  5093  			break
  5094  		}
  5095  		off := auxIntToInt32(x.AuxInt)
  5096  		sym := auxToSym(x.Aux)
  5097  		mem := x.Args[1]
  5098  		ptr := x.Args[0]
  5099  		if !(x.Uses == 1 && clobber(x)) {
  5100  			break
  5101  		}
  5102  		b = x.Block
  5103  		v0 := b.NewValue0(x.Pos, Op386MOVWload, v.Type)
  5104  		v.copyOf(v0)
  5105  		v0.AuxInt = int32ToAuxInt(off)
  5106  		v0.Aux = symToAux(sym)
  5107  		v0.AddArg2(ptr, mem)
  5108  		return true
  5109  	}
  5110  	// match: (MOVWLZX (ANDLconst [c] x))
  5111  	// result: (ANDLconst [c & 0xffff] x)
  5112  	for {
  5113  		if v_0.Op != Op386ANDLconst {
  5114  			break
  5115  		}
  5116  		c := auxIntToInt32(v_0.AuxInt)
  5117  		x := v_0.Args[0]
  5118  		v.reset(Op386ANDLconst)
  5119  		v.AuxInt = int32ToAuxInt(c & 0xffff)
  5120  		v.AddArg(x)
  5121  		return true
  5122  	}
  5123  	return false
  5124  }
  5125  func rewriteValue386_Op386MOVWload(v *Value) bool {
  5126  	v_1 := v.Args[1]
  5127  	v_0 := v.Args[0]
  5128  	b := v.Block
  5129  	config := b.Func.Config
  5130  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5131  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5132  	// result: (MOVWLZX x)
  5133  	for {
  5134  		off := auxIntToInt32(v.AuxInt)
  5135  		sym := auxToSym(v.Aux)
  5136  		ptr := v_0
  5137  		if v_1.Op != Op386MOVWstore {
  5138  			break
  5139  		}
  5140  		off2 := auxIntToInt32(v_1.AuxInt)
  5141  		sym2 := auxToSym(v_1.Aux)
  5142  		x := v_1.Args[1]
  5143  		ptr2 := v_1.Args[0]
  5144  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5145  			break
  5146  		}
  5147  		v.reset(Op386MOVWLZX)
  5148  		v.AddArg(x)
  5149  		return true
  5150  	}
  5151  	// match: (MOVWload [off1] {sym} (ADDLconst [off2] ptr) mem)
  5152  	// cond: is32Bit(int64(off1)+int64(off2))
  5153  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  5154  	for {
  5155  		off1 := auxIntToInt32(v.AuxInt)
  5156  		sym := auxToSym(v.Aux)
  5157  		if v_0.Op != Op386ADDLconst {
  5158  			break
  5159  		}
  5160  		off2 := auxIntToInt32(v_0.AuxInt)
  5161  		ptr := v_0.Args[0]
  5162  		mem := v_1
  5163  		if !(is32Bit(int64(off1) + int64(off2))) {
  5164  			break
  5165  		}
  5166  		v.reset(Op386MOVWload)
  5167  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5168  		v.Aux = symToAux(sym)
  5169  		v.AddArg2(ptr, mem)
  5170  		return true
  5171  	}
  5172  	// match: (MOVWload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5173  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5174  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5175  	for {
  5176  		off1 := auxIntToInt32(v.AuxInt)
  5177  		sym1 := auxToSym(v.Aux)
  5178  		if v_0.Op != Op386LEAL {
  5179  			break
  5180  		}
  5181  		off2 := auxIntToInt32(v_0.AuxInt)
  5182  		sym2 := auxToSym(v_0.Aux)
  5183  		base := v_0.Args[0]
  5184  		mem := v_1
  5185  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5186  			break
  5187  		}
  5188  		v.reset(Op386MOVWload)
  5189  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5190  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5191  		v.AddArg2(base, mem)
  5192  		return true
  5193  	}
  5194  	// match: (MOVWload [off] {sym} (SB) _)
  5195  	// cond: symIsRO(sym)
  5196  	// result: (MOVLconst [int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  5197  	for {
  5198  		off := auxIntToInt32(v.AuxInt)
  5199  		sym := auxToSym(v.Aux)
  5200  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5201  			break
  5202  		}
  5203  		v.reset(Op386MOVLconst)
  5204  		v.AuxInt = int32ToAuxInt(int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  5205  		return true
  5206  	}
  5207  	return false
  5208  }
  5209  func rewriteValue386_Op386MOVWstore(v *Value) bool {
  5210  	v_2 := v.Args[2]
  5211  	v_1 := v.Args[1]
  5212  	v_0 := v.Args[0]
  5213  	b := v.Block
  5214  	config := b.Func.Config
  5215  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  5216  	// result: (MOVWstore [off] {sym} ptr x mem)
  5217  	for {
  5218  		off := auxIntToInt32(v.AuxInt)
  5219  		sym := auxToSym(v.Aux)
  5220  		ptr := v_0
  5221  		if v_1.Op != Op386MOVWLSX {
  5222  			break
  5223  		}
  5224  		x := v_1.Args[0]
  5225  		mem := v_2
  5226  		v.reset(Op386MOVWstore)
  5227  		v.AuxInt = int32ToAuxInt(off)
  5228  		v.Aux = symToAux(sym)
  5229  		v.AddArg3(ptr, x, mem)
  5230  		return true
  5231  	}
  5232  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  5233  	// result: (MOVWstore [off] {sym} ptr x mem)
  5234  	for {
  5235  		off := auxIntToInt32(v.AuxInt)
  5236  		sym := auxToSym(v.Aux)
  5237  		ptr := v_0
  5238  		if v_1.Op != Op386MOVWLZX {
  5239  			break
  5240  		}
  5241  		x := v_1.Args[0]
  5242  		mem := v_2
  5243  		v.reset(Op386MOVWstore)
  5244  		v.AuxInt = int32ToAuxInt(off)
  5245  		v.Aux = symToAux(sym)
  5246  		v.AddArg3(ptr, x, mem)
  5247  		return true
  5248  	}
  5249  	// match: (MOVWstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5250  	// cond: is32Bit(int64(off1)+int64(off2))
  5251  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  5252  	for {
  5253  		off1 := auxIntToInt32(v.AuxInt)
  5254  		sym := auxToSym(v.Aux)
  5255  		if v_0.Op != Op386ADDLconst {
  5256  			break
  5257  		}
  5258  		off2 := auxIntToInt32(v_0.AuxInt)
  5259  		ptr := v_0.Args[0]
  5260  		val := v_1
  5261  		mem := v_2
  5262  		if !(is32Bit(int64(off1) + int64(off2))) {
  5263  			break
  5264  		}
  5265  		v.reset(Op386MOVWstore)
  5266  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5267  		v.Aux = symToAux(sym)
  5268  		v.AddArg3(ptr, val, mem)
  5269  		return true
  5270  	}
  5271  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5272  	// result: (MOVWstoreconst [makeValAndOff(c,off)] {sym} ptr mem)
  5273  	for {
  5274  		off := auxIntToInt32(v.AuxInt)
  5275  		sym := auxToSym(v.Aux)
  5276  		ptr := v_0
  5277  		if v_1.Op != Op386MOVLconst {
  5278  			break
  5279  		}
  5280  		c := auxIntToInt32(v_1.AuxInt)
  5281  		mem := v_2
  5282  		v.reset(Op386MOVWstoreconst)
  5283  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(c, off))
  5284  		v.Aux = symToAux(sym)
  5285  		v.AddArg2(ptr, mem)
  5286  		return true
  5287  	}
  5288  	// match: (MOVWstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5289  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5290  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5291  	for {
  5292  		off1 := auxIntToInt32(v.AuxInt)
  5293  		sym1 := auxToSym(v.Aux)
  5294  		if v_0.Op != Op386LEAL {
  5295  			break
  5296  		}
  5297  		off2 := auxIntToInt32(v_0.AuxInt)
  5298  		sym2 := auxToSym(v_0.Aux)
  5299  		base := v_0.Args[0]
  5300  		val := v_1
  5301  		mem := v_2
  5302  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5303  			break
  5304  		}
  5305  		v.reset(Op386MOVWstore)
  5306  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5307  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5308  		v.AddArg3(base, val, mem)
  5309  		return true
  5310  	}
  5311  	// match: (MOVWstore [i] {s} p (SHRLconst [16] w) x:(MOVWstore [i-2] {s} p w mem))
  5312  	// cond: x.Uses == 1 && clobber(x)
  5313  	// result: (MOVLstore [i-2] {s} p w mem)
  5314  	for {
  5315  		i := auxIntToInt32(v.AuxInt)
  5316  		s := auxToSym(v.Aux)
  5317  		p := v_0
  5318  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 16 {
  5319  			break
  5320  		}
  5321  		w := v_1.Args[0]
  5322  		x := v_2
  5323  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  5324  			break
  5325  		}
  5326  		mem := x.Args[2]
  5327  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  5328  			break
  5329  		}
  5330  		v.reset(Op386MOVLstore)
  5331  		v.AuxInt = int32ToAuxInt(i - 2)
  5332  		v.Aux = symToAux(s)
  5333  		v.AddArg3(p, w, mem)
  5334  		return true
  5335  	}
  5336  	// match: (MOVWstore [i] {s} p (SHRLconst [j] w) x:(MOVWstore [i-2] {s} p w0:(SHRLconst [j-16] w) mem))
  5337  	// cond: x.Uses == 1 && clobber(x)
  5338  	// result: (MOVLstore [i-2] {s} p w0 mem)
  5339  	for {
  5340  		i := auxIntToInt32(v.AuxInt)
  5341  		s := auxToSym(v.Aux)
  5342  		p := v_0
  5343  		if v_1.Op != Op386SHRLconst {
  5344  			break
  5345  		}
  5346  		j := auxIntToInt32(v_1.AuxInt)
  5347  		w := v_1.Args[0]
  5348  		x := v_2
  5349  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  5350  			break
  5351  		}
  5352  		mem := x.Args[2]
  5353  		if p != x.Args[0] {
  5354  			break
  5355  		}
  5356  		w0 := x.Args[1]
  5357  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  5358  			break
  5359  		}
  5360  		v.reset(Op386MOVLstore)
  5361  		v.AuxInt = int32ToAuxInt(i - 2)
  5362  		v.Aux = symToAux(s)
  5363  		v.AddArg3(p, w0, mem)
  5364  		return true
  5365  	}
  5366  	// match: (MOVWstore [i] {s} p1 (SHRLconst [16] w) x:(MOVWstore [i] {s} p0 w mem))
  5367  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)
  5368  	// result: (MOVLstore [i] {s} p0 w mem)
  5369  	for {
  5370  		i := auxIntToInt32(v.AuxInt)
  5371  		s := auxToSym(v.Aux)
  5372  		p1 := v_0
  5373  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 16 {
  5374  			break
  5375  		}
  5376  		w := v_1.Args[0]
  5377  		x := v_2
  5378  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  5379  			break
  5380  		}
  5381  		mem := x.Args[2]
  5382  		p0 := x.Args[0]
  5383  		if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5384  			break
  5385  		}
  5386  		v.reset(Op386MOVLstore)
  5387  		v.AuxInt = int32ToAuxInt(i)
  5388  		v.Aux = symToAux(s)
  5389  		v.AddArg3(p0, w, mem)
  5390  		return true
  5391  	}
  5392  	// match: (MOVWstore [i] {s} p1 (SHRLconst [j] w) x:(MOVWstore [i] {s} p0 w0:(SHRLconst [j-16] w) mem))
  5393  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)
  5394  	// result: (MOVLstore [i] {s} p0 w0 mem)
  5395  	for {
  5396  		i := auxIntToInt32(v.AuxInt)
  5397  		s := auxToSym(v.Aux)
  5398  		p1 := v_0
  5399  		if v_1.Op != Op386SHRLconst {
  5400  			break
  5401  		}
  5402  		j := auxIntToInt32(v_1.AuxInt)
  5403  		w := v_1.Args[0]
  5404  		x := v_2
  5405  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  5406  			break
  5407  		}
  5408  		mem := x.Args[2]
  5409  		p0 := x.Args[0]
  5410  		w0 := x.Args[1]
  5411  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5412  			break
  5413  		}
  5414  		v.reset(Op386MOVLstore)
  5415  		v.AuxInt = int32ToAuxInt(i)
  5416  		v.Aux = symToAux(s)
  5417  		v.AddArg3(p0, w0, mem)
  5418  		return true
  5419  	}
  5420  	return false
  5421  }
  5422  func rewriteValue386_Op386MOVWstoreconst(v *Value) bool {
  5423  	v_1 := v.Args[1]
  5424  	v_0 := v.Args[0]
  5425  	b := v.Block
  5426  	config := b.Func.Config
  5427  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5428  	// cond: sc.canAdd32(off)
  5429  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
  5430  	for {
  5431  		sc := auxIntToValAndOff(v.AuxInt)
  5432  		s := auxToSym(v.Aux)
  5433  		if v_0.Op != Op386ADDLconst {
  5434  			break
  5435  		}
  5436  		off := auxIntToInt32(v_0.AuxInt)
  5437  		ptr := v_0.Args[0]
  5438  		mem := v_1
  5439  		if !(sc.canAdd32(off)) {
  5440  			break
  5441  		}
  5442  		v.reset(Op386MOVWstoreconst)
  5443  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  5444  		v.Aux = symToAux(s)
  5445  		v.AddArg2(ptr, mem)
  5446  		return true
  5447  	}
  5448  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  5449  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  5450  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  5451  	for {
  5452  		sc := auxIntToValAndOff(v.AuxInt)
  5453  		sym1 := auxToSym(v.Aux)
  5454  		if v_0.Op != Op386LEAL {
  5455  			break
  5456  		}
  5457  		off := auxIntToInt32(v_0.AuxInt)
  5458  		sym2 := auxToSym(v_0.Aux)
  5459  		ptr := v_0.Args[0]
  5460  		mem := v_1
  5461  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  5462  			break
  5463  		}
  5464  		v.reset(Op386MOVWstoreconst)
  5465  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  5466  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5467  		v.AddArg2(ptr, mem)
  5468  		return true
  5469  	}
  5470  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
  5471  	// cond: x.Uses == 1 && a.Off() + 2 == c.Off() && clobber(x)
  5472  	// result: (MOVLstoreconst [makeValAndOff(a.Val()&0xffff | c.Val()<<16, a.Off())] {s} p mem)
  5473  	for {
  5474  		c := auxIntToValAndOff(v.AuxInt)
  5475  		s := auxToSym(v.Aux)
  5476  		p := v_0
  5477  		x := v_1
  5478  		if x.Op != Op386MOVWstoreconst {
  5479  			break
  5480  		}
  5481  		a := auxIntToValAndOff(x.AuxInt)
  5482  		if auxToSym(x.Aux) != s {
  5483  			break
  5484  		}
  5485  		mem := x.Args[1]
  5486  		if p != x.Args[0] || !(x.Uses == 1 && a.Off()+2 == c.Off() && clobber(x)) {
  5487  			break
  5488  		}
  5489  		v.reset(Op386MOVLstoreconst)
  5490  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
  5491  		v.Aux = symToAux(s)
  5492  		v.AddArg2(p, mem)
  5493  		return true
  5494  	}
  5495  	// match: (MOVWstoreconst [a] {s} p x:(MOVWstoreconst [c] {s} p mem))
  5496  	// cond: x.Uses == 1 && ValAndOff(a).Off() + 2 == ValAndOff(c).Off() && clobber(x)
  5497  	// result: (MOVLstoreconst [makeValAndOff(a.Val()&0xffff | c.Val()<<16, a.Off())] {s} p mem)
  5498  	for {
  5499  		a := auxIntToValAndOff(v.AuxInt)
  5500  		s := auxToSym(v.Aux)
  5501  		p := v_0
  5502  		x := v_1
  5503  		if x.Op != Op386MOVWstoreconst {
  5504  			break
  5505  		}
  5506  		c := auxIntToValAndOff(x.AuxInt)
  5507  		if auxToSym(x.Aux) != s {
  5508  			break
  5509  		}
  5510  		mem := x.Args[1]
  5511  		if p != x.Args[0] || !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  5512  			break
  5513  		}
  5514  		v.reset(Op386MOVLstoreconst)
  5515  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
  5516  		v.Aux = symToAux(s)
  5517  		v.AddArg2(p, mem)
  5518  		return true
  5519  	}
  5520  	// match: (MOVWstoreconst [c] {s} p1 x:(MOVWstoreconst [a] {s} p0 mem))
  5521  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)
  5522  	// result: (MOVLstoreconst [makeValAndOff(a.Val()&0xffff | c.Val()<<16, a.Off())] {s} p0 mem)
  5523  	for {
  5524  		c := auxIntToValAndOff(v.AuxInt)
  5525  		s := auxToSym(v.Aux)
  5526  		p1 := v_0
  5527  		x := v_1
  5528  		if x.Op != Op386MOVWstoreconst {
  5529  			break
  5530  		}
  5531  		a := auxIntToValAndOff(x.AuxInt)
  5532  		if auxToSym(x.Aux) != s {
  5533  			break
  5534  		}
  5535  		mem := x.Args[1]
  5536  		p0 := x.Args[0]
  5537  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5538  			break
  5539  		}
  5540  		v.reset(Op386MOVLstoreconst)
  5541  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
  5542  		v.Aux = symToAux(s)
  5543  		v.AddArg2(p0, mem)
  5544  		return true
  5545  	}
  5546  	// match: (MOVWstoreconst [a] {s} p0 x:(MOVWstoreconst [c] {s} p1 mem))
  5547  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)
  5548  	// result: (MOVLstoreconst [makeValAndOff(a.Val()&0xffff | c.Val()<<16, a.Off())] {s} p0 mem)
  5549  	for {
  5550  		a := auxIntToValAndOff(v.AuxInt)
  5551  		s := auxToSym(v.Aux)
  5552  		p0 := v_0
  5553  		x := v_1
  5554  		if x.Op != Op386MOVWstoreconst {
  5555  			break
  5556  		}
  5557  		c := auxIntToValAndOff(x.AuxInt)
  5558  		if auxToSym(x.Aux) != s {
  5559  			break
  5560  		}
  5561  		mem := x.Args[1]
  5562  		p1 := x.Args[0]
  5563  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5564  			break
  5565  		}
  5566  		v.reset(Op386MOVLstoreconst)
  5567  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(a.Val()&0xffff|c.Val()<<16, a.Off()))
  5568  		v.Aux = symToAux(s)
  5569  		v.AddArg2(p0, mem)
  5570  		return true
  5571  	}
  5572  	return false
  5573  }
  5574  func rewriteValue386_Op386MULL(v *Value) bool {
  5575  	v_1 := v.Args[1]
  5576  	v_0 := v.Args[0]
  5577  	// match: (MULL x (MOVLconst [c]))
  5578  	// result: (MULLconst [c] x)
  5579  	for {
  5580  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5581  			x := v_0
  5582  			if v_1.Op != Op386MOVLconst {
  5583  				continue
  5584  			}
  5585  			c := auxIntToInt32(v_1.AuxInt)
  5586  			v.reset(Op386MULLconst)
  5587  			v.AuxInt = int32ToAuxInt(c)
  5588  			v.AddArg(x)
  5589  			return true
  5590  		}
  5591  		break
  5592  	}
  5593  	// match: (MULL x l:(MOVLload [off] {sym} ptr mem))
  5594  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  5595  	// result: (MULLload x [off] {sym} ptr mem)
  5596  	for {
  5597  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5598  			x := v_0
  5599  			l := v_1
  5600  			if l.Op != Op386MOVLload {
  5601  				continue
  5602  			}
  5603  			off := auxIntToInt32(l.AuxInt)
  5604  			sym := auxToSym(l.Aux)
  5605  			mem := l.Args[1]
  5606  			ptr := l.Args[0]
  5607  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  5608  				continue
  5609  			}
  5610  			v.reset(Op386MULLload)
  5611  			v.AuxInt = int32ToAuxInt(off)
  5612  			v.Aux = symToAux(sym)
  5613  			v.AddArg3(x, ptr, mem)
  5614  			return true
  5615  		}
  5616  		break
  5617  	}
  5618  	return false
  5619  }
  5620  func rewriteValue386_Op386MULLconst(v *Value) bool {
  5621  	v_0 := v.Args[0]
  5622  	b := v.Block
  5623  	// match: (MULLconst [c] (MULLconst [d] x))
  5624  	// result: (MULLconst [c * d] x)
  5625  	for {
  5626  		c := auxIntToInt32(v.AuxInt)
  5627  		if v_0.Op != Op386MULLconst {
  5628  			break
  5629  		}
  5630  		d := auxIntToInt32(v_0.AuxInt)
  5631  		x := v_0.Args[0]
  5632  		v.reset(Op386MULLconst)
  5633  		v.AuxInt = int32ToAuxInt(c * d)
  5634  		v.AddArg(x)
  5635  		return true
  5636  	}
  5637  	// match: (MULLconst [-9] x)
  5638  	// result: (NEGL (LEAL8 <v.Type> x x))
  5639  	for {
  5640  		if auxIntToInt32(v.AuxInt) != -9 {
  5641  			break
  5642  		}
  5643  		x := v_0
  5644  		v.reset(Op386NEGL)
  5645  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5646  		v0.AddArg2(x, x)
  5647  		v.AddArg(v0)
  5648  		return true
  5649  	}
  5650  	// match: (MULLconst [-5] x)
  5651  	// result: (NEGL (LEAL4 <v.Type> x x))
  5652  	for {
  5653  		if auxIntToInt32(v.AuxInt) != -5 {
  5654  			break
  5655  		}
  5656  		x := v_0
  5657  		v.reset(Op386NEGL)
  5658  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5659  		v0.AddArg2(x, x)
  5660  		v.AddArg(v0)
  5661  		return true
  5662  	}
  5663  	// match: (MULLconst [-3] x)
  5664  	// result: (NEGL (LEAL2 <v.Type> x x))
  5665  	for {
  5666  		if auxIntToInt32(v.AuxInt) != -3 {
  5667  			break
  5668  		}
  5669  		x := v_0
  5670  		v.reset(Op386NEGL)
  5671  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5672  		v0.AddArg2(x, x)
  5673  		v.AddArg(v0)
  5674  		return true
  5675  	}
  5676  	// match: (MULLconst [-1] x)
  5677  	// result: (NEGL x)
  5678  	for {
  5679  		if auxIntToInt32(v.AuxInt) != -1 {
  5680  			break
  5681  		}
  5682  		x := v_0
  5683  		v.reset(Op386NEGL)
  5684  		v.AddArg(x)
  5685  		return true
  5686  	}
  5687  	// match: (MULLconst [0] _)
  5688  	// result: (MOVLconst [0])
  5689  	for {
  5690  		if auxIntToInt32(v.AuxInt) != 0 {
  5691  			break
  5692  		}
  5693  		v.reset(Op386MOVLconst)
  5694  		v.AuxInt = int32ToAuxInt(0)
  5695  		return true
  5696  	}
  5697  	// match: (MULLconst [1] x)
  5698  	// result: x
  5699  	for {
  5700  		if auxIntToInt32(v.AuxInt) != 1 {
  5701  			break
  5702  		}
  5703  		x := v_0
  5704  		v.copyOf(x)
  5705  		return true
  5706  	}
  5707  	// match: (MULLconst [3] x)
  5708  	// result: (LEAL2 x x)
  5709  	for {
  5710  		if auxIntToInt32(v.AuxInt) != 3 {
  5711  			break
  5712  		}
  5713  		x := v_0
  5714  		v.reset(Op386LEAL2)
  5715  		v.AddArg2(x, x)
  5716  		return true
  5717  	}
  5718  	// match: (MULLconst [5] x)
  5719  	// result: (LEAL4 x x)
  5720  	for {
  5721  		if auxIntToInt32(v.AuxInt) != 5 {
  5722  			break
  5723  		}
  5724  		x := v_0
  5725  		v.reset(Op386LEAL4)
  5726  		v.AddArg2(x, x)
  5727  		return true
  5728  	}
  5729  	// match: (MULLconst [7] x)
  5730  	// result: (LEAL2 x (LEAL2 <v.Type> x x))
  5731  	for {
  5732  		if auxIntToInt32(v.AuxInt) != 7 {
  5733  			break
  5734  		}
  5735  		x := v_0
  5736  		v.reset(Op386LEAL2)
  5737  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5738  		v0.AddArg2(x, x)
  5739  		v.AddArg2(x, v0)
  5740  		return true
  5741  	}
  5742  	// match: (MULLconst [9] x)
  5743  	// result: (LEAL8 x x)
  5744  	for {
  5745  		if auxIntToInt32(v.AuxInt) != 9 {
  5746  			break
  5747  		}
  5748  		x := v_0
  5749  		v.reset(Op386LEAL8)
  5750  		v.AddArg2(x, x)
  5751  		return true
  5752  	}
  5753  	// match: (MULLconst [11] x)
  5754  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  5755  	for {
  5756  		if auxIntToInt32(v.AuxInt) != 11 {
  5757  			break
  5758  		}
  5759  		x := v_0
  5760  		v.reset(Op386LEAL2)
  5761  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5762  		v0.AddArg2(x, x)
  5763  		v.AddArg2(x, v0)
  5764  		return true
  5765  	}
  5766  	// match: (MULLconst [13] x)
  5767  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  5768  	for {
  5769  		if auxIntToInt32(v.AuxInt) != 13 {
  5770  			break
  5771  		}
  5772  		x := v_0
  5773  		v.reset(Op386LEAL4)
  5774  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5775  		v0.AddArg2(x, x)
  5776  		v.AddArg2(x, v0)
  5777  		return true
  5778  	}
  5779  	// match: (MULLconst [19] x)
  5780  	// result: (LEAL2 x (LEAL8 <v.Type> x x))
  5781  	for {
  5782  		if auxIntToInt32(v.AuxInt) != 19 {
  5783  			break
  5784  		}
  5785  		x := v_0
  5786  		v.reset(Op386LEAL2)
  5787  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5788  		v0.AddArg2(x, x)
  5789  		v.AddArg2(x, v0)
  5790  		return true
  5791  	}
  5792  	// match: (MULLconst [21] x)
  5793  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  5794  	for {
  5795  		if auxIntToInt32(v.AuxInt) != 21 {
  5796  			break
  5797  		}
  5798  		x := v_0
  5799  		v.reset(Op386LEAL4)
  5800  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5801  		v0.AddArg2(x, x)
  5802  		v.AddArg2(x, v0)
  5803  		return true
  5804  	}
  5805  	// match: (MULLconst [25] x)
  5806  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  5807  	for {
  5808  		if auxIntToInt32(v.AuxInt) != 25 {
  5809  			break
  5810  		}
  5811  		x := v_0
  5812  		v.reset(Op386LEAL8)
  5813  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5814  		v0.AddArg2(x, x)
  5815  		v.AddArg2(x, v0)
  5816  		return true
  5817  	}
  5818  	// match: (MULLconst [27] x)
  5819  	// result: (LEAL8 (LEAL2 <v.Type> x x) (LEAL2 <v.Type> x x))
  5820  	for {
  5821  		if auxIntToInt32(v.AuxInt) != 27 {
  5822  			break
  5823  		}
  5824  		x := v_0
  5825  		v.reset(Op386LEAL8)
  5826  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5827  		v0.AddArg2(x, x)
  5828  		v.AddArg2(v0, v0)
  5829  		return true
  5830  	}
  5831  	// match: (MULLconst [37] x)
  5832  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  5833  	for {
  5834  		if auxIntToInt32(v.AuxInt) != 37 {
  5835  			break
  5836  		}
  5837  		x := v_0
  5838  		v.reset(Op386LEAL4)
  5839  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5840  		v0.AddArg2(x, x)
  5841  		v.AddArg2(x, v0)
  5842  		return true
  5843  	}
  5844  	// match: (MULLconst [41] x)
  5845  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  5846  	for {
  5847  		if auxIntToInt32(v.AuxInt) != 41 {
  5848  			break
  5849  		}
  5850  		x := v_0
  5851  		v.reset(Op386LEAL8)
  5852  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5853  		v0.AddArg2(x, x)
  5854  		v.AddArg2(x, v0)
  5855  		return true
  5856  	}
  5857  	// match: (MULLconst [45] x)
  5858  	// result: (LEAL8 (LEAL4 <v.Type> x x) (LEAL4 <v.Type> x x))
  5859  	for {
  5860  		if auxIntToInt32(v.AuxInt) != 45 {
  5861  			break
  5862  		}
  5863  		x := v_0
  5864  		v.reset(Op386LEAL8)
  5865  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5866  		v0.AddArg2(x, x)
  5867  		v.AddArg2(v0, v0)
  5868  		return true
  5869  	}
  5870  	// match: (MULLconst [73] x)
  5871  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  5872  	for {
  5873  		if auxIntToInt32(v.AuxInt) != 73 {
  5874  			break
  5875  		}
  5876  		x := v_0
  5877  		v.reset(Op386LEAL8)
  5878  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5879  		v0.AddArg2(x, x)
  5880  		v.AddArg2(x, v0)
  5881  		return true
  5882  	}
  5883  	// match: (MULLconst [81] x)
  5884  	// result: (LEAL8 (LEAL8 <v.Type> x x) (LEAL8 <v.Type> x x))
  5885  	for {
  5886  		if auxIntToInt32(v.AuxInt) != 81 {
  5887  			break
  5888  		}
  5889  		x := v_0
  5890  		v.reset(Op386LEAL8)
  5891  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5892  		v0.AddArg2(x, x)
  5893  		v.AddArg2(v0, v0)
  5894  		return true
  5895  	}
  5896  	// match: (MULLconst [c] x)
  5897  	// cond: isPowerOfTwo32(c+1) && c >= 15
  5898  	// result: (SUBL (SHLLconst <v.Type> [int32(log32(c+1))] x) x)
  5899  	for {
  5900  		c := auxIntToInt32(v.AuxInt)
  5901  		x := v_0
  5902  		if !(isPowerOfTwo32(c+1) && c >= 15) {
  5903  			break
  5904  		}
  5905  		v.reset(Op386SUBL)
  5906  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5907  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  5908  		v0.AddArg(x)
  5909  		v.AddArg2(v0, x)
  5910  		return true
  5911  	}
  5912  	// match: (MULLconst [c] x)
  5913  	// cond: isPowerOfTwo32(c-1) && c >= 17
  5914  	// result: (LEAL1 (SHLLconst <v.Type> [int32(log32(c-1))] x) x)
  5915  	for {
  5916  		c := auxIntToInt32(v.AuxInt)
  5917  		x := v_0
  5918  		if !(isPowerOfTwo32(c-1) && c >= 17) {
  5919  			break
  5920  		}
  5921  		v.reset(Op386LEAL1)
  5922  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5923  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  5924  		v0.AddArg(x)
  5925  		v.AddArg2(v0, x)
  5926  		return true
  5927  	}
  5928  	// match: (MULLconst [c] x)
  5929  	// cond: isPowerOfTwo32(c-2) && c >= 34
  5930  	// result: (LEAL2 (SHLLconst <v.Type> [int32(log32(c-2))] x) x)
  5931  	for {
  5932  		c := auxIntToInt32(v.AuxInt)
  5933  		x := v_0
  5934  		if !(isPowerOfTwo32(c-2) && c >= 34) {
  5935  			break
  5936  		}
  5937  		v.reset(Op386LEAL2)
  5938  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5939  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 2)))
  5940  		v0.AddArg(x)
  5941  		v.AddArg2(v0, x)
  5942  		return true
  5943  	}
  5944  	// match: (MULLconst [c] x)
  5945  	// cond: isPowerOfTwo32(c-4) && c >= 68
  5946  	// result: (LEAL4 (SHLLconst <v.Type> [int32(log32(c-4))] x) x)
  5947  	for {
  5948  		c := auxIntToInt32(v.AuxInt)
  5949  		x := v_0
  5950  		if !(isPowerOfTwo32(c-4) && c >= 68) {
  5951  			break
  5952  		}
  5953  		v.reset(Op386LEAL4)
  5954  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5955  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 4)))
  5956  		v0.AddArg(x)
  5957  		v.AddArg2(v0, x)
  5958  		return true
  5959  	}
  5960  	// match: (MULLconst [c] x)
  5961  	// cond: isPowerOfTwo32(c-8) && c >= 136
  5962  	// result: (LEAL8 (SHLLconst <v.Type> [int32(log32(c-8))] x) x)
  5963  	for {
  5964  		c := auxIntToInt32(v.AuxInt)
  5965  		x := v_0
  5966  		if !(isPowerOfTwo32(c-8) && c >= 136) {
  5967  			break
  5968  		}
  5969  		v.reset(Op386LEAL8)
  5970  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5971  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 8)))
  5972  		v0.AddArg(x)
  5973  		v.AddArg2(v0, x)
  5974  		return true
  5975  	}
  5976  	// match: (MULLconst [c] x)
  5977  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  5978  	// result: (SHLLconst [int32(log32(c/3))] (LEAL2 <v.Type> x x))
  5979  	for {
  5980  		c := auxIntToInt32(v.AuxInt)
  5981  		x := v_0
  5982  		if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  5983  			break
  5984  		}
  5985  		v.reset(Op386SHLLconst)
  5986  		v.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  5987  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5988  		v0.AddArg2(x, x)
  5989  		v.AddArg(v0)
  5990  		return true
  5991  	}
  5992  	// match: (MULLconst [c] x)
  5993  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  5994  	// result: (SHLLconst [int32(log32(c/5))] (LEAL4 <v.Type> x x))
  5995  	for {
  5996  		c := auxIntToInt32(v.AuxInt)
  5997  		x := v_0
  5998  		if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  5999  			break
  6000  		}
  6001  		v.reset(Op386SHLLconst)
  6002  		v.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  6003  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  6004  		v0.AddArg2(x, x)
  6005  		v.AddArg(v0)
  6006  		return true
  6007  	}
  6008  	// match: (MULLconst [c] x)
  6009  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  6010  	// result: (SHLLconst [int32(log32(c/9))] (LEAL8 <v.Type> x x))
  6011  	for {
  6012  		c := auxIntToInt32(v.AuxInt)
  6013  		x := v_0
  6014  		if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  6015  			break
  6016  		}
  6017  		v.reset(Op386SHLLconst)
  6018  		v.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  6019  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  6020  		v0.AddArg2(x, x)
  6021  		v.AddArg(v0)
  6022  		return true
  6023  	}
  6024  	// match: (MULLconst [c] (MOVLconst [d]))
  6025  	// result: (MOVLconst [c*d])
  6026  	for {
  6027  		c := auxIntToInt32(v.AuxInt)
  6028  		if v_0.Op != Op386MOVLconst {
  6029  			break
  6030  		}
  6031  		d := auxIntToInt32(v_0.AuxInt)
  6032  		v.reset(Op386MOVLconst)
  6033  		v.AuxInt = int32ToAuxInt(c * d)
  6034  		return true
  6035  	}
  6036  	return false
  6037  }
  6038  func rewriteValue386_Op386MULLload(v *Value) bool {
  6039  	v_2 := v.Args[2]
  6040  	v_1 := v.Args[1]
  6041  	v_0 := v.Args[0]
  6042  	b := v.Block
  6043  	config := b.Func.Config
  6044  	// match: (MULLload [off1] {sym} val (ADDLconst [off2] base) mem)
  6045  	// cond: is32Bit(int64(off1)+int64(off2))
  6046  	// result: (MULLload [off1+off2] {sym} val base mem)
  6047  	for {
  6048  		off1 := auxIntToInt32(v.AuxInt)
  6049  		sym := auxToSym(v.Aux)
  6050  		val := v_0
  6051  		if v_1.Op != Op386ADDLconst {
  6052  			break
  6053  		}
  6054  		off2 := auxIntToInt32(v_1.AuxInt)
  6055  		base := v_1.Args[0]
  6056  		mem := v_2
  6057  		if !(is32Bit(int64(off1) + int64(off2))) {
  6058  			break
  6059  		}
  6060  		v.reset(Op386MULLload)
  6061  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6062  		v.Aux = symToAux(sym)
  6063  		v.AddArg3(val, base, mem)
  6064  		return true
  6065  	}
  6066  	// match: (MULLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6067  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6068  	// result: (MULLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6069  	for {
  6070  		off1 := auxIntToInt32(v.AuxInt)
  6071  		sym1 := auxToSym(v.Aux)
  6072  		val := v_0
  6073  		if v_1.Op != Op386LEAL {
  6074  			break
  6075  		}
  6076  		off2 := auxIntToInt32(v_1.AuxInt)
  6077  		sym2 := auxToSym(v_1.Aux)
  6078  		base := v_1.Args[0]
  6079  		mem := v_2
  6080  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6081  			break
  6082  		}
  6083  		v.reset(Op386MULLload)
  6084  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6085  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6086  		v.AddArg3(val, base, mem)
  6087  		return true
  6088  	}
  6089  	return false
  6090  }
  6091  func rewriteValue386_Op386MULSD(v *Value) bool {
  6092  	v_1 := v.Args[1]
  6093  	v_0 := v.Args[0]
  6094  	// match: (MULSD x l:(MOVSDload [off] {sym} ptr mem))
  6095  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  6096  	// result: (MULSDload x [off] {sym} ptr mem)
  6097  	for {
  6098  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6099  			x := v_0
  6100  			l := v_1
  6101  			if l.Op != Op386MOVSDload {
  6102  				continue
  6103  			}
  6104  			off := auxIntToInt32(l.AuxInt)
  6105  			sym := auxToSym(l.Aux)
  6106  			mem := l.Args[1]
  6107  			ptr := l.Args[0]
  6108  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  6109  				continue
  6110  			}
  6111  			v.reset(Op386MULSDload)
  6112  			v.AuxInt = int32ToAuxInt(off)
  6113  			v.Aux = symToAux(sym)
  6114  			v.AddArg3(x, ptr, mem)
  6115  			return true
  6116  		}
  6117  		break
  6118  	}
  6119  	return false
  6120  }
  6121  func rewriteValue386_Op386MULSDload(v *Value) bool {
  6122  	v_2 := v.Args[2]
  6123  	v_1 := v.Args[1]
  6124  	v_0 := v.Args[0]
  6125  	b := v.Block
  6126  	config := b.Func.Config
  6127  	// match: (MULSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  6128  	// cond: is32Bit(int64(off1)+int64(off2))
  6129  	// result: (MULSDload [off1+off2] {sym} val base mem)
  6130  	for {
  6131  		off1 := auxIntToInt32(v.AuxInt)
  6132  		sym := auxToSym(v.Aux)
  6133  		val := v_0
  6134  		if v_1.Op != Op386ADDLconst {
  6135  			break
  6136  		}
  6137  		off2 := auxIntToInt32(v_1.AuxInt)
  6138  		base := v_1.Args[0]
  6139  		mem := v_2
  6140  		if !(is32Bit(int64(off1) + int64(off2))) {
  6141  			break
  6142  		}
  6143  		v.reset(Op386MULSDload)
  6144  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6145  		v.Aux = symToAux(sym)
  6146  		v.AddArg3(val, base, mem)
  6147  		return true
  6148  	}
  6149  	// match: (MULSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6150  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6151  	// result: (MULSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6152  	for {
  6153  		off1 := auxIntToInt32(v.AuxInt)
  6154  		sym1 := auxToSym(v.Aux)
  6155  		val := v_0
  6156  		if v_1.Op != Op386LEAL {
  6157  			break
  6158  		}
  6159  		off2 := auxIntToInt32(v_1.AuxInt)
  6160  		sym2 := auxToSym(v_1.Aux)
  6161  		base := v_1.Args[0]
  6162  		mem := v_2
  6163  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6164  			break
  6165  		}
  6166  		v.reset(Op386MULSDload)
  6167  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6168  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6169  		v.AddArg3(val, base, mem)
  6170  		return true
  6171  	}
  6172  	return false
  6173  }
  6174  func rewriteValue386_Op386MULSS(v *Value) bool {
  6175  	v_1 := v.Args[1]
  6176  	v_0 := v.Args[0]
  6177  	// match: (MULSS x l:(MOVSSload [off] {sym} ptr mem))
  6178  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  6179  	// result: (MULSSload x [off] {sym} ptr mem)
  6180  	for {
  6181  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6182  			x := v_0
  6183  			l := v_1
  6184  			if l.Op != Op386MOVSSload {
  6185  				continue
  6186  			}
  6187  			off := auxIntToInt32(l.AuxInt)
  6188  			sym := auxToSym(l.Aux)
  6189  			mem := l.Args[1]
  6190  			ptr := l.Args[0]
  6191  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  6192  				continue
  6193  			}
  6194  			v.reset(Op386MULSSload)
  6195  			v.AuxInt = int32ToAuxInt(off)
  6196  			v.Aux = symToAux(sym)
  6197  			v.AddArg3(x, ptr, mem)
  6198  			return true
  6199  		}
  6200  		break
  6201  	}
  6202  	return false
  6203  }
  6204  func rewriteValue386_Op386MULSSload(v *Value) bool {
  6205  	v_2 := v.Args[2]
  6206  	v_1 := v.Args[1]
  6207  	v_0 := v.Args[0]
  6208  	b := v.Block
  6209  	config := b.Func.Config
  6210  	// match: (MULSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  6211  	// cond: is32Bit(int64(off1)+int64(off2))
  6212  	// result: (MULSSload [off1+off2] {sym} val base mem)
  6213  	for {
  6214  		off1 := auxIntToInt32(v.AuxInt)
  6215  		sym := auxToSym(v.Aux)
  6216  		val := v_0
  6217  		if v_1.Op != Op386ADDLconst {
  6218  			break
  6219  		}
  6220  		off2 := auxIntToInt32(v_1.AuxInt)
  6221  		base := v_1.Args[0]
  6222  		mem := v_2
  6223  		if !(is32Bit(int64(off1) + int64(off2))) {
  6224  			break
  6225  		}
  6226  		v.reset(Op386MULSSload)
  6227  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6228  		v.Aux = symToAux(sym)
  6229  		v.AddArg3(val, base, mem)
  6230  		return true
  6231  	}
  6232  	// match: (MULSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6233  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6234  	// result: (MULSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6235  	for {
  6236  		off1 := auxIntToInt32(v.AuxInt)
  6237  		sym1 := auxToSym(v.Aux)
  6238  		val := v_0
  6239  		if v_1.Op != Op386LEAL {
  6240  			break
  6241  		}
  6242  		off2 := auxIntToInt32(v_1.AuxInt)
  6243  		sym2 := auxToSym(v_1.Aux)
  6244  		base := v_1.Args[0]
  6245  		mem := v_2
  6246  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6247  			break
  6248  		}
  6249  		v.reset(Op386MULSSload)
  6250  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6251  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6252  		v.AddArg3(val, base, mem)
  6253  		return true
  6254  	}
  6255  	return false
  6256  }
  6257  func rewriteValue386_Op386NEGL(v *Value) bool {
  6258  	v_0 := v.Args[0]
  6259  	// match: (NEGL (MOVLconst [c]))
  6260  	// result: (MOVLconst [-c])
  6261  	for {
  6262  		if v_0.Op != Op386MOVLconst {
  6263  			break
  6264  		}
  6265  		c := auxIntToInt32(v_0.AuxInt)
  6266  		v.reset(Op386MOVLconst)
  6267  		v.AuxInt = int32ToAuxInt(-c)
  6268  		return true
  6269  	}
  6270  	return false
  6271  }
  6272  func rewriteValue386_Op386NOTL(v *Value) bool {
  6273  	v_0 := v.Args[0]
  6274  	// match: (NOTL (MOVLconst [c]))
  6275  	// result: (MOVLconst [^c])
  6276  	for {
  6277  		if v_0.Op != Op386MOVLconst {
  6278  			break
  6279  		}
  6280  		c := auxIntToInt32(v_0.AuxInt)
  6281  		v.reset(Op386MOVLconst)
  6282  		v.AuxInt = int32ToAuxInt(^c)
  6283  		return true
  6284  	}
  6285  	return false
  6286  }
  6287  func rewriteValue386_Op386ORL(v *Value) bool {
  6288  	v_1 := v.Args[1]
  6289  	v_0 := v.Args[0]
  6290  	b := v.Block
  6291  	typ := &b.Func.Config.Types
  6292  	// match: (ORL x (MOVLconst [c]))
  6293  	// result: (ORLconst [c] x)
  6294  	for {
  6295  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6296  			x := v_0
  6297  			if v_1.Op != Op386MOVLconst {
  6298  				continue
  6299  			}
  6300  			c := auxIntToInt32(v_1.AuxInt)
  6301  			v.reset(Op386ORLconst)
  6302  			v.AuxInt = int32ToAuxInt(c)
  6303  			v.AddArg(x)
  6304  			return true
  6305  		}
  6306  		break
  6307  	}
  6308  	// match: ( ORL (SHLLconst [c] x) (SHRLconst [d] x))
  6309  	// cond: d == 32-c
  6310  	// result: (ROLLconst [c] x)
  6311  	for {
  6312  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6313  			if v_0.Op != Op386SHLLconst {
  6314  				continue
  6315  			}
  6316  			c := auxIntToInt32(v_0.AuxInt)
  6317  			x := v_0.Args[0]
  6318  			if v_1.Op != Op386SHRLconst {
  6319  				continue
  6320  			}
  6321  			d := auxIntToInt32(v_1.AuxInt)
  6322  			if x != v_1.Args[0] || !(d == 32-c) {
  6323  				continue
  6324  			}
  6325  			v.reset(Op386ROLLconst)
  6326  			v.AuxInt = int32ToAuxInt(c)
  6327  			v.AddArg(x)
  6328  			return true
  6329  		}
  6330  		break
  6331  	}
  6332  	// match: ( ORL <t> (SHLLconst x [c]) (SHRWconst x [d]))
  6333  	// cond: c < 16 && d == int16(16-c) && t.Size() == 2
  6334  	// result: (ROLWconst x [int16(c)])
  6335  	for {
  6336  		t := v.Type
  6337  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6338  			if v_0.Op != Op386SHLLconst {
  6339  				continue
  6340  			}
  6341  			c := auxIntToInt32(v_0.AuxInt)
  6342  			x := v_0.Args[0]
  6343  			if v_1.Op != Op386SHRWconst {
  6344  				continue
  6345  			}
  6346  			d := auxIntToInt16(v_1.AuxInt)
  6347  			if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
  6348  				continue
  6349  			}
  6350  			v.reset(Op386ROLWconst)
  6351  			v.AuxInt = int16ToAuxInt(int16(c))
  6352  			v.AddArg(x)
  6353  			return true
  6354  		}
  6355  		break
  6356  	}
  6357  	// match: ( ORL <t> (SHLLconst x [c]) (SHRBconst x [d]))
  6358  	// cond: c < 8 && d == int8(8-c) && t.Size() == 1
  6359  	// result: (ROLBconst x [int8(c)])
  6360  	for {
  6361  		t := v.Type
  6362  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6363  			if v_0.Op != Op386SHLLconst {
  6364  				continue
  6365  			}
  6366  			c := auxIntToInt32(v_0.AuxInt)
  6367  			x := v_0.Args[0]
  6368  			if v_1.Op != Op386SHRBconst {
  6369  				continue
  6370  			}
  6371  			d := auxIntToInt8(v_1.AuxInt)
  6372  			if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
  6373  				continue
  6374  			}
  6375  			v.reset(Op386ROLBconst)
  6376  			v.AuxInt = int8ToAuxInt(int8(c))
  6377  			v.AddArg(x)
  6378  			return true
  6379  		}
  6380  		break
  6381  	}
  6382  	// match: (ORL x l:(MOVLload [off] {sym} ptr mem))
  6383  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  6384  	// result: (ORLload x [off] {sym} ptr mem)
  6385  	for {
  6386  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6387  			x := v_0
  6388  			l := v_1
  6389  			if l.Op != Op386MOVLload {
  6390  				continue
  6391  			}
  6392  			off := auxIntToInt32(l.AuxInt)
  6393  			sym := auxToSym(l.Aux)
  6394  			mem := l.Args[1]
  6395  			ptr := l.Args[0]
  6396  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  6397  				continue
  6398  			}
  6399  			v.reset(Op386ORLload)
  6400  			v.AuxInt = int32ToAuxInt(off)
  6401  			v.Aux = symToAux(sym)
  6402  			v.AddArg3(x, ptr, mem)
  6403  			return true
  6404  		}
  6405  		break
  6406  	}
  6407  	// match: (ORL x x)
  6408  	// result: x
  6409  	for {
  6410  		x := v_0
  6411  		if x != v_1 {
  6412  			break
  6413  		}
  6414  		v.copyOf(x)
  6415  		return true
  6416  	}
  6417  	// match: (ORL x0:(MOVBload [i0] {s} p mem) s0:(SHLLconst [8] x1:(MOVBload [i1] {s} p mem)))
  6418  	// cond: i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, s0)
  6419  	// result: @mergePoint(b,x0,x1) (MOVWload [i0] {s} p mem)
  6420  	for {
  6421  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6422  			x0 := v_0
  6423  			if x0.Op != Op386MOVBload {
  6424  				continue
  6425  			}
  6426  			i0 := auxIntToInt32(x0.AuxInt)
  6427  			s := auxToSym(x0.Aux)
  6428  			mem := x0.Args[1]
  6429  			p := x0.Args[0]
  6430  			s0 := v_1
  6431  			if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 8 {
  6432  				continue
  6433  			}
  6434  			x1 := s0.Args[0]
  6435  			if x1.Op != Op386MOVBload {
  6436  				continue
  6437  			}
  6438  			i1 := auxIntToInt32(x1.AuxInt)
  6439  			if auxToSym(x1.Aux) != s {
  6440  				continue
  6441  			}
  6442  			_ = x1.Args[1]
  6443  			if p != x1.Args[0] || mem != x1.Args[1] || !(i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0)) {
  6444  				continue
  6445  			}
  6446  			b = mergePoint(b, x0, x1)
  6447  			v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
  6448  			v.copyOf(v0)
  6449  			v0.AuxInt = int32ToAuxInt(i0)
  6450  			v0.Aux = symToAux(s)
  6451  			v0.AddArg2(p, mem)
  6452  			return true
  6453  		}
  6454  		break
  6455  	}
  6456  	// match: (ORL x0:(MOVBload [i] {s} p0 mem) s0:(SHLLconst [8] x1:(MOVBload [i] {s} p1 mem)))
  6457  	// cond: x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && sequentialAddresses(p0, p1, 1) && mergePoint(b,x0,x1) != nil && clobber(x0, x1, s0)
  6458  	// result: @mergePoint(b,x0,x1) (MOVWload [i] {s} p0 mem)
  6459  	for {
  6460  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6461  			x0 := v_0
  6462  			if x0.Op != Op386MOVBload {
  6463  				continue
  6464  			}
  6465  			i := auxIntToInt32(x0.AuxInt)
  6466  			s := auxToSym(x0.Aux)
  6467  			mem := x0.Args[1]
  6468  			p0 := x0.Args[0]
  6469  			s0 := v_1
  6470  			if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 8 {
  6471  				continue
  6472  			}
  6473  			x1 := s0.Args[0]
  6474  			if x1.Op != Op386MOVBload || auxIntToInt32(x1.AuxInt) != i || auxToSym(x1.Aux) != s {
  6475  				continue
  6476  			}
  6477  			_ = x1.Args[1]
  6478  			p1 := x1.Args[0]
  6479  			if mem != x1.Args[1] || !(x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && sequentialAddresses(p0, p1, 1) && mergePoint(b, x0, x1) != nil && clobber(x0, x1, s0)) {
  6480  				continue
  6481  			}
  6482  			b = mergePoint(b, x0, x1)
  6483  			v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
  6484  			v.copyOf(v0)
  6485  			v0.AuxInt = int32ToAuxInt(i)
  6486  			v0.Aux = symToAux(s)
  6487  			v0.AddArg2(p0, mem)
  6488  			return true
  6489  		}
  6490  		break
  6491  	}
  6492  	// match: (ORL o0:(ORL x0:(MOVWload [i0] {s} p mem) s0:(SHLLconst [16] x1:(MOVBload [i2] {s} p mem))) s1:(SHLLconst [24] x2:(MOVBload [i3] {s} p mem)))
  6493  	// cond: i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b,x0,x1,x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
  6494  	// result: @mergePoint(b,x0,x1,x2) (MOVLload [i0] {s} p mem)
  6495  	for {
  6496  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6497  			o0 := v_0
  6498  			if o0.Op != Op386ORL {
  6499  				continue
  6500  			}
  6501  			_ = o0.Args[1]
  6502  			o0_0 := o0.Args[0]
  6503  			o0_1 := o0.Args[1]
  6504  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
  6505  				x0 := o0_0
  6506  				if x0.Op != Op386MOVWload {
  6507  					continue
  6508  				}
  6509  				i0 := auxIntToInt32(x0.AuxInt)
  6510  				s := auxToSym(x0.Aux)
  6511  				mem := x0.Args[1]
  6512  				p := x0.Args[0]
  6513  				s0 := o0_1
  6514  				if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 16 {
  6515  					continue
  6516  				}
  6517  				x1 := s0.Args[0]
  6518  				if x1.Op != Op386MOVBload {
  6519  					continue
  6520  				}
  6521  				i2 := auxIntToInt32(x1.AuxInt)
  6522  				if auxToSym(x1.Aux) != s {
  6523  					continue
  6524  				}
  6525  				_ = x1.Args[1]
  6526  				if p != x1.Args[0] || mem != x1.Args[1] {
  6527  					continue
  6528  				}
  6529  				s1 := v_1
  6530  				if s1.Op != Op386SHLLconst || auxIntToInt32(s1.AuxInt) != 24 {
  6531  					continue
  6532  				}
  6533  				x2 := s1.Args[0]
  6534  				if x2.Op != Op386MOVBload {
  6535  					continue
  6536  				}
  6537  				i3 := auxIntToInt32(x2.AuxInt)
  6538  				if auxToSym(x2.Aux) != s {
  6539  					continue
  6540  				}
  6541  				_ = x2.Args[1]
  6542  				if p != x2.Args[0] || mem != x2.Args[1] || !(i2 == i0+2 && i3 == i0+3 && x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
  6543  					continue
  6544  				}
  6545  				b = mergePoint(b, x0, x1, x2)
  6546  				v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
  6547  				v.copyOf(v0)
  6548  				v0.AuxInt = int32ToAuxInt(i0)
  6549  				v0.Aux = symToAux(s)
  6550  				v0.AddArg2(p, mem)
  6551  				return true
  6552  			}
  6553  		}
  6554  		break
  6555  	}
  6556  	// match: (ORL o0:(ORL x0:(MOVWload [i] {s} p0 mem) s0:(SHLLconst [16] x1:(MOVBload [i] {s} p1 mem))) s1:(SHLLconst [24] x2:(MOVBload [i] {s} p2 mem)))
  6557  	// cond: x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && sequentialAddresses(p0, p1, 2) && sequentialAddresses(p1, p2, 1) && mergePoint(b,x0,x1,x2) != nil && clobber(x0, x1, x2, s0, s1, o0)
  6558  	// result: @mergePoint(b,x0,x1,x2) (MOVLload [i] {s} p0 mem)
  6559  	for {
  6560  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6561  			o0 := v_0
  6562  			if o0.Op != Op386ORL {
  6563  				continue
  6564  			}
  6565  			_ = o0.Args[1]
  6566  			o0_0 := o0.Args[0]
  6567  			o0_1 := o0.Args[1]
  6568  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
  6569  				x0 := o0_0
  6570  				if x0.Op != Op386MOVWload {
  6571  					continue
  6572  				}
  6573  				i := auxIntToInt32(x0.AuxInt)
  6574  				s := auxToSym(x0.Aux)
  6575  				mem := x0.Args[1]
  6576  				p0 := x0.Args[0]
  6577  				s0 := o0_1
  6578  				if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 16 {
  6579  					continue
  6580  				}
  6581  				x1 := s0.Args[0]
  6582  				if x1.Op != Op386MOVBload || auxIntToInt32(x1.AuxInt) != i || auxToSym(x1.Aux) != s {
  6583  					continue
  6584  				}
  6585  				_ = x1.Args[1]
  6586  				p1 := x1.Args[0]
  6587  				if mem != x1.Args[1] {
  6588  					continue
  6589  				}
  6590  				s1 := v_1
  6591  				if s1.Op != Op386SHLLconst || auxIntToInt32(s1.AuxInt) != 24 {
  6592  					continue
  6593  				}
  6594  				x2 := s1.Args[0]
  6595  				if x2.Op != Op386MOVBload || auxIntToInt32(x2.AuxInt) != i || auxToSym(x2.Aux) != s {
  6596  					continue
  6597  				}
  6598  				_ = x2.Args[1]
  6599  				p2 := x2.Args[0]
  6600  				if mem != x2.Args[1] || !(x0.Uses == 1 && x1.Uses == 1 && x2.Uses == 1 && s0.Uses == 1 && s1.Uses == 1 && o0.Uses == 1 && sequentialAddresses(p0, p1, 2) && sequentialAddresses(p1, p2, 1) && mergePoint(b, x0, x1, x2) != nil && clobber(x0, x1, x2, s0, s1, o0)) {
  6601  					continue
  6602  				}
  6603  				b = mergePoint(b, x0, x1, x2)
  6604  				v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
  6605  				v.copyOf(v0)
  6606  				v0.AuxInt = int32ToAuxInt(i)
  6607  				v0.Aux = symToAux(s)
  6608  				v0.AddArg2(p0, mem)
  6609  				return true
  6610  			}
  6611  		}
  6612  		break
  6613  	}
  6614  	return false
  6615  }
  6616  func rewriteValue386_Op386ORLconst(v *Value) bool {
  6617  	v_0 := v.Args[0]
  6618  	// match: (ORLconst [c] x)
  6619  	// cond: c==0
  6620  	// result: x
  6621  	for {
  6622  		c := auxIntToInt32(v.AuxInt)
  6623  		x := v_0
  6624  		if !(c == 0) {
  6625  			break
  6626  		}
  6627  		v.copyOf(x)
  6628  		return true
  6629  	}
  6630  	// match: (ORLconst [c] _)
  6631  	// cond: c==-1
  6632  	// result: (MOVLconst [-1])
  6633  	for {
  6634  		c := auxIntToInt32(v.AuxInt)
  6635  		if !(c == -1) {
  6636  			break
  6637  		}
  6638  		v.reset(Op386MOVLconst)
  6639  		v.AuxInt = int32ToAuxInt(-1)
  6640  		return true
  6641  	}
  6642  	// match: (ORLconst [c] (MOVLconst [d]))
  6643  	// result: (MOVLconst [c|d])
  6644  	for {
  6645  		c := auxIntToInt32(v.AuxInt)
  6646  		if v_0.Op != Op386MOVLconst {
  6647  			break
  6648  		}
  6649  		d := auxIntToInt32(v_0.AuxInt)
  6650  		v.reset(Op386MOVLconst)
  6651  		v.AuxInt = int32ToAuxInt(c | d)
  6652  		return true
  6653  	}
  6654  	return false
  6655  }
  6656  func rewriteValue386_Op386ORLconstmodify(v *Value) bool {
  6657  	v_1 := v.Args[1]
  6658  	v_0 := v.Args[0]
  6659  	b := v.Block
  6660  	config := b.Func.Config
  6661  	// match: (ORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  6662  	// cond: valoff1.canAdd32(off2)
  6663  	// result: (ORLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  6664  	for {
  6665  		valoff1 := auxIntToValAndOff(v.AuxInt)
  6666  		sym := auxToSym(v.Aux)
  6667  		if v_0.Op != Op386ADDLconst {
  6668  			break
  6669  		}
  6670  		off2 := auxIntToInt32(v_0.AuxInt)
  6671  		base := v_0.Args[0]
  6672  		mem := v_1
  6673  		if !(valoff1.canAdd32(off2)) {
  6674  			break
  6675  		}
  6676  		v.reset(Op386ORLconstmodify)
  6677  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  6678  		v.Aux = symToAux(sym)
  6679  		v.AddArg2(base, mem)
  6680  		return true
  6681  	}
  6682  	// match: (ORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  6683  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6684  	// result: (ORLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  6685  	for {
  6686  		valoff1 := auxIntToValAndOff(v.AuxInt)
  6687  		sym1 := auxToSym(v.Aux)
  6688  		if v_0.Op != Op386LEAL {
  6689  			break
  6690  		}
  6691  		off2 := auxIntToInt32(v_0.AuxInt)
  6692  		sym2 := auxToSym(v_0.Aux)
  6693  		base := v_0.Args[0]
  6694  		mem := v_1
  6695  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6696  			break
  6697  		}
  6698  		v.reset(Op386ORLconstmodify)
  6699  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  6700  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6701  		v.AddArg2(base, mem)
  6702  		return true
  6703  	}
  6704  	return false
  6705  }
  6706  func rewriteValue386_Op386ORLload(v *Value) bool {
  6707  	v_2 := v.Args[2]
  6708  	v_1 := v.Args[1]
  6709  	v_0 := v.Args[0]
  6710  	b := v.Block
  6711  	config := b.Func.Config
  6712  	// match: (ORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  6713  	// cond: is32Bit(int64(off1)+int64(off2))
  6714  	// result: (ORLload [off1+off2] {sym} val base mem)
  6715  	for {
  6716  		off1 := auxIntToInt32(v.AuxInt)
  6717  		sym := auxToSym(v.Aux)
  6718  		val := v_0
  6719  		if v_1.Op != Op386ADDLconst {
  6720  			break
  6721  		}
  6722  		off2 := auxIntToInt32(v_1.AuxInt)
  6723  		base := v_1.Args[0]
  6724  		mem := v_2
  6725  		if !(is32Bit(int64(off1) + int64(off2))) {
  6726  			break
  6727  		}
  6728  		v.reset(Op386ORLload)
  6729  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6730  		v.Aux = symToAux(sym)
  6731  		v.AddArg3(val, base, mem)
  6732  		return true
  6733  	}
  6734  	// match: (ORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6735  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6736  	// result: (ORLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6737  	for {
  6738  		off1 := auxIntToInt32(v.AuxInt)
  6739  		sym1 := auxToSym(v.Aux)
  6740  		val := v_0
  6741  		if v_1.Op != Op386LEAL {
  6742  			break
  6743  		}
  6744  		off2 := auxIntToInt32(v_1.AuxInt)
  6745  		sym2 := auxToSym(v_1.Aux)
  6746  		base := v_1.Args[0]
  6747  		mem := v_2
  6748  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6749  			break
  6750  		}
  6751  		v.reset(Op386ORLload)
  6752  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6753  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6754  		v.AddArg3(val, base, mem)
  6755  		return true
  6756  	}
  6757  	return false
  6758  }
  6759  func rewriteValue386_Op386ORLmodify(v *Value) bool {
  6760  	v_2 := v.Args[2]
  6761  	v_1 := v.Args[1]
  6762  	v_0 := v.Args[0]
  6763  	b := v.Block
  6764  	config := b.Func.Config
  6765  	// match: (ORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  6766  	// cond: is32Bit(int64(off1)+int64(off2))
  6767  	// result: (ORLmodify [off1+off2] {sym} base val mem)
  6768  	for {
  6769  		off1 := auxIntToInt32(v.AuxInt)
  6770  		sym := auxToSym(v.Aux)
  6771  		if v_0.Op != Op386ADDLconst {
  6772  			break
  6773  		}
  6774  		off2 := auxIntToInt32(v_0.AuxInt)
  6775  		base := v_0.Args[0]
  6776  		val := v_1
  6777  		mem := v_2
  6778  		if !(is32Bit(int64(off1) + int64(off2))) {
  6779  			break
  6780  		}
  6781  		v.reset(Op386ORLmodify)
  6782  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6783  		v.Aux = symToAux(sym)
  6784  		v.AddArg3(base, val, mem)
  6785  		return true
  6786  	}
  6787  	// match: (ORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  6788  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6789  	// result: (ORLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  6790  	for {
  6791  		off1 := auxIntToInt32(v.AuxInt)
  6792  		sym1 := auxToSym(v.Aux)
  6793  		if v_0.Op != Op386LEAL {
  6794  			break
  6795  		}
  6796  		off2 := auxIntToInt32(v_0.AuxInt)
  6797  		sym2 := auxToSym(v_0.Aux)
  6798  		base := v_0.Args[0]
  6799  		val := v_1
  6800  		mem := v_2
  6801  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6802  			break
  6803  		}
  6804  		v.reset(Op386ORLmodify)
  6805  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6806  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6807  		v.AddArg3(base, val, mem)
  6808  		return true
  6809  	}
  6810  	return false
  6811  }
  6812  func rewriteValue386_Op386ROLBconst(v *Value) bool {
  6813  	v_0 := v.Args[0]
  6814  	// match: (ROLBconst [c] (ROLBconst [d] x))
  6815  	// result: (ROLBconst [(c+d)& 7] x)
  6816  	for {
  6817  		c := auxIntToInt8(v.AuxInt)
  6818  		if v_0.Op != Op386ROLBconst {
  6819  			break
  6820  		}
  6821  		d := auxIntToInt8(v_0.AuxInt)
  6822  		x := v_0.Args[0]
  6823  		v.reset(Op386ROLBconst)
  6824  		v.AuxInt = int8ToAuxInt((c + d) & 7)
  6825  		v.AddArg(x)
  6826  		return true
  6827  	}
  6828  	// match: (ROLBconst [0] x)
  6829  	// result: x
  6830  	for {
  6831  		if auxIntToInt8(v.AuxInt) != 0 {
  6832  			break
  6833  		}
  6834  		x := v_0
  6835  		v.copyOf(x)
  6836  		return true
  6837  	}
  6838  	return false
  6839  }
  6840  func rewriteValue386_Op386ROLLconst(v *Value) bool {
  6841  	v_0 := v.Args[0]
  6842  	// match: (ROLLconst [c] (ROLLconst [d] x))
  6843  	// result: (ROLLconst [(c+d)&31] x)
  6844  	for {
  6845  		c := auxIntToInt32(v.AuxInt)
  6846  		if v_0.Op != Op386ROLLconst {
  6847  			break
  6848  		}
  6849  		d := auxIntToInt32(v_0.AuxInt)
  6850  		x := v_0.Args[0]
  6851  		v.reset(Op386ROLLconst)
  6852  		v.AuxInt = int32ToAuxInt((c + d) & 31)
  6853  		v.AddArg(x)
  6854  		return true
  6855  	}
  6856  	// match: (ROLLconst [0] x)
  6857  	// result: x
  6858  	for {
  6859  		if auxIntToInt32(v.AuxInt) != 0 {
  6860  			break
  6861  		}
  6862  		x := v_0
  6863  		v.copyOf(x)
  6864  		return true
  6865  	}
  6866  	return false
  6867  }
  6868  func rewriteValue386_Op386ROLWconst(v *Value) bool {
  6869  	v_0 := v.Args[0]
  6870  	// match: (ROLWconst [c] (ROLWconst [d] x))
  6871  	// result: (ROLWconst [(c+d)&15] x)
  6872  	for {
  6873  		c := auxIntToInt16(v.AuxInt)
  6874  		if v_0.Op != Op386ROLWconst {
  6875  			break
  6876  		}
  6877  		d := auxIntToInt16(v_0.AuxInt)
  6878  		x := v_0.Args[0]
  6879  		v.reset(Op386ROLWconst)
  6880  		v.AuxInt = int16ToAuxInt((c + d) & 15)
  6881  		v.AddArg(x)
  6882  		return true
  6883  	}
  6884  	// match: (ROLWconst [0] x)
  6885  	// result: x
  6886  	for {
  6887  		if auxIntToInt16(v.AuxInt) != 0 {
  6888  			break
  6889  		}
  6890  		x := v_0
  6891  		v.copyOf(x)
  6892  		return true
  6893  	}
  6894  	return false
  6895  }
  6896  func rewriteValue386_Op386SARB(v *Value) bool {
  6897  	v_1 := v.Args[1]
  6898  	v_0 := v.Args[0]
  6899  	// match: (SARB x (MOVLconst [c]))
  6900  	// result: (SARBconst [int8(min(int64(c&31),7))] x)
  6901  	for {
  6902  		x := v_0
  6903  		if v_1.Op != Op386MOVLconst {
  6904  			break
  6905  		}
  6906  		c := auxIntToInt32(v_1.AuxInt)
  6907  		v.reset(Op386SARBconst)
  6908  		v.AuxInt = int8ToAuxInt(int8(min(int64(c&31), 7)))
  6909  		v.AddArg(x)
  6910  		return true
  6911  	}
  6912  	return false
  6913  }
  6914  func rewriteValue386_Op386SARBconst(v *Value) bool {
  6915  	v_0 := v.Args[0]
  6916  	// match: (SARBconst x [0])
  6917  	// result: x
  6918  	for {
  6919  		if auxIntToInt8(v.AuxInt) != 0 {
  6920  			break
  6921  		}
  6922  		x := v_0
  6923  		v.copyOf(x)
  6924  		return true
  6925  	}
  6926  	// match: (SARBconst [c] (MOVLconst [d]))
  6927  	// result: (MOVLconst [d>>uint64(c)])
  6928  	for {
  6929  		c := auxIntToInt8(v.AuxInt)
  6930  		if v_0.Op != Op386MOVLconst {
  6931  			break
  6932  		}
  6933  		d := auxIntToInt32(v_0.AuxInt)
  6934  		v.reset(Op386MOVLconst)
  6935  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  6936  		return true
  6937  	}
  6938  	return false
  6939  }
  6940  func rewriteValue386_Op386SARL(v *Value) bool {
  6941  	v_1 := v.Args[1]
  6942  	v_0 := v.Args[0]
  6943  	// match: (SARL x (MOVLconst [c]))
  6944  	// result: (SARLconst [c&31] x)
  6945  	for {
  6946  		x := v_0
  6947  		if v_1.Op != Op386MOVLconst {
  6948  			break
  6949  		}
  6950  		c := auxIntToInt32(v_1.AuxInt)
  6951  		v.reset(Op386SARLconst)
  6952  		v.AuxInt = int32ToAuxInt(c & 31)
  6953  		v.AddArg(x)
  6954  		return true
  6955  	}
  6956  	// match: (SARL x (ANDLconst [31] y))
  6957  	// result: (SARL x y)
  6958  	for {
  6959  		x := v_0
  6960  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  6961  			break
  6962  		}
  6963  		y := v_1.Args[0]
  6964  		v.reset(Op386SARL)
  6965  		v.AddArg2(x, y)
  6966  		return true
  6967  	}
  6968  	return false
  6969  }
  6970  func rewriteValue386_Op386SARLconst(v *Value) bool {
  6971  	v_0 := v.Args[0]
  6972  	// match: (SARLconst x [0])
  6973  	// result: x
  6974  	for {
  6975  		if auxIntToInt32(v.AuxInt) != 0 {
  6976  			break
  6977  		}
  6978  		x := v_0
  6979  		v.copyOf(x)
  6980  		return true
  6981  	}
  6982  	// match: (SARLconst [c] (MOVLconst [d]))
  6983  	// result: (MOVLconst [d>>uint64(c)])
  6984  	for {
  6985  		c := auxIntToInt32(v.AuxInt)
  6986  		if v_0.Op != Op386MOVLconst {
  6987  			break
  6988  		}
  6989  		d := auxIntToInt32(v_0.AuxInt)
  6990  		v.reset(Op386MOVLconst)
  6991  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  6992  		return true
  6993  	}
  6994  	return false
  6995  }
  6996  func rewriteValue386_Op386SARW(v *Value) bool {
  6997  	v_1 := v.Args[1]
  6998  	v_0 := v.Args[0]
  6999  	// match: (SARW x (MOVLconst [c]))
  7000  	// result: (SARWconst [int16(min(int64(c&31),15))] x)
  7001  	for {
  7002  		x := v_0
  7003  		if v_1.Op != Op386MOVLconst {
  7004  			break
  7005  		}
  7006  		c := auxIntToInt32(v_1.AuxInt)
  7007  		v.reset(Op386SARWconst)
  7008  		v.AuxInt = int16ToAuxInt(int16(min(int64(c&31), 15)))
  7009  		v.AddArg(x)
  7010  		return true
  7011  	}
  7012  	return false
  7013  }
  7014  func rewriteValue386_Op386SARWconst(v *Value) bool {
  7015  	v_0 := v.Args[0]
  7016  	// match: (SARWconst x [0])
  7017  	// result: x
  7018  	for {
  7019  		if auxIntToInt16(v.AuxInt) != 0 {
  7020  			break
  7021  		}
  7022  		x := v_0
  7023  		v.copyOf(x)
  7024  		return true
  7025  	}
  7026  	// match: (SARWconst [c] (MOVLconst [d]))
  7027  	// result: (MOVLconst [d>>uint64(c)])
  7028  	for {
  7029  		c := auxIntToInt16(v.AuxInt)
  7030  		if v_0.Op != Op386MOVLconst {
  7031  			break
  7032  		}
  7033  		d := auxIntToInt32(v_0.AuxInt)
  7034  		v.reset(Op386MOVLconst)
  7035  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  7036  		return true
  7037  	}
  7038  	return false
  7039  }
  7040  func rewriteValue386_Op386SBBL(v *Value) bool {
  7041  	v_2 := v.Args[2]
  7042  	v_1 := v.Args[1]
  7043  	v_0 := v.Args[0]
  7044  	// match: (SBBL x (MOVLconst [c]) f)
  7045  	// result: (SBBLconst [c] x f)
  7046  	for {
  7047  		x := v_0
  7048  		if v_1.Op != Op386MOVLconst {
  7049  			break
  7050  		}
  7051  		c := auxIntToInt32(v_1.AuxInt)
  7052  		f := v_2
  7053  		v.reset(Op386SBBLconst)
  7054  		v.AuxInt = int32ToAuxInt(c)
  7055  		v.AddArg2(x, f)
  7056  		return true
  7057  	}
  7058  	return false
  7059  }
  7060  func rewriteValue386_Op386SBBLcarrymask(v *Value) bool {
  7061  	v_0 := v.Args[0]
  7062  	// match: (SBBLcarrymask (FlagEQ))
  7063  	// result: (MOVLconst [0])
  7064  	for {
  7065  		if v_0.Op != Op386FlagEQ {
  7066  			break
  7067  		}
  7068  		v.reset(Op386MOVLconst)
  7069  		v.AuxInt = int32ToAuxInt(0)
  7070  		return true
  7071  	}
  7072  	// match: (SBBLcarrymask (FlagLT_ULT))
  7073  	// result: (MOVLconst [-1])
  7074  	for {
  7075  		if v_0.Op != Op386FlagLT_ULT {
  7076  			break
  7077  		}
  7078  		v.reset(Op386MOVLconst)
  7079  		v.AuxInt = int32ToAuxInt(-1)
  7080  		return true
  7081  	}
  7082  	// match: (SBBLcarrymask (FlagLT_UGT))
  7083  	// result: (MOVLconst [0])
  7084  	for {
  7085  		if v_0.Op != Op386FlagLT_UGT {
  7086  			break
  7087  		}
  7088  		v.reset(Op386MOVLconst)
  7089  		v.AuxInt = int32ToAuxInt(0)
  7090  		return true
  7091  	}
  7092  	// match: (SBBLcarrymask (FlagGT_ULT))
  7093  	// result: (MOVLconst [-1])
  7094  	for {
  7095  		if v_0.Op != Op386FlagGT_ULT {
  7096  			break
  7097  		}
  7098  		v.reset(Op386MOVLconst)
  7099  		v.AuxInt = int32ToAuxInt(-1)
  7100  		return true
  7101  	}
  7102  	// match: (SBBLcarrymask (FlagGT_UGT))
  7103  	// result: (MOVLconst [0])
  7104  	for {
  7105  		if v_0.Op != Op386FlagGT_UGT {
  7106  			break
  7107  		}
  7108  		v.reset(Op386MOVLconst)
  7109  		v.AuxInt = int32ToAuxInt(0)
  7110  		return true
  7111  	}
  7112  	return false
  7113  }
  7114  func rewriteValue386_Op386SETA(v *Value) bool {
  7115  	v_0 := v.Args[0]
  7116  	// match: (SETA (InvertFlags x))
  7117  	// result: (SETB x)
  7118  	for {
  7119  		if v_0.Op != Op386InvertFlags {
  7120  			break
  7121  		}
  7122  		x := v_0.Args[0]
  7123  		v.reset(Op386SETB)
  7124  		v.AddArg(x)
  7125  		return true
  7126  	}
  7127  	// match: (SETA (FlagEQ))
  7128  	// result: (MOVLconst [0])
  7129  	for {
  7130  		if v_0.Op != Op386FlagEQ {
  7131  			break
  7132  		}
  7133  		v.reset(Op386MOVLconst)
  7134  		v.AuxInt = int32ToAuxInt(0)
  7135  		return true
  7136  	}
  7137  	// match: (SETA (FlagLT_ULT))
  7138  	// result: (MOVLconst [0])
  7139  	for {
  7140  		if v_0.Op != Op386FlagLT_ULT {
  7141  			break
  7142  		}
  7143  		v.reset(Op386MOVLconst)
  7144  		v.AuxInt = int32ToAuxInt(0)
  7145  		return true
  7146  	}
  7147  	// match: (SETA (FlagLT_UGT))
  7148  	// result: (MOVLconst [1])
  7149  	for {
  7150  		if v_0.Op != Op386FlagLT_UGT {
  7151  			break
  7152  		}
  7153  		v.reset(Op386MOVLconst)
  7154  		v.AuxInt = int32ToAuxInt(1)
  7155  		return true
  7156  	}
  7157  	// match: (SETA (FlagGT_ULT))
  7158  	// result: (MOVLconst [0])
  7159  	for {
  7160  		if v_0.Op != Op386FlagGT_ULT {
  7161  			break
  7162  		}
  7163  		v.reset(Op386MOVLconst)
  7164  		v.AuxInt = int32ToAuxInt(0)
  7165  		return true
  7166  	}
  7167  	// match: (SETA (FlagGT_UGT))
  7168  	// result: (MOVLconst [1])
  7169  	for {
  7170  		if v_0.Op != Op386FlagGT_UGT {
  7171  			break
  7172  		}
  7173  		v.reset(Op386MOVLconst)
  7174  		v.AuxInt = int32ToAuxInt(1)
  7175  		return true
  7176  	}
  7177  	return false
  7178  }
  7179  func rewriteValue386_Op386SETAE(v *Value) bool {
  7180  	v_0 := v.Args[0]
  7181  	// match: (SETAE (InvertFlags x))
  7182  	// result: (SETBE x)
  7183  	for {
  7184  		if v_0.Op != Op386InvertFlags {
  7185  			break
  7186  		}
  7187  		x := v_0.Args[0]
  7188  		v.reset(Op386SETBE)
  7189  		v.AddArg(x)
  7190  		return true
  7191  	}
  7192  	// match: (SETAE (FlagEQ))
  7193  	// result: (MOVLconst [1])
  7194  	for {
  7195  		if v_0.Op != Op386FlagEQ {
  7196  			break
  7197  		}
  7198  		v.reset(Op386MOVLconst)
  7199  		v.AuxInt = int32ToAuxInt(1)
  7200  		return true
  7201  	}
  7202  	// match: (SETAE (FlagLT_ULT))
  7203  	// result: (MOVLconst [0])
  7204  	for {
  7205  		if v_0.Op != Op386FlagLT_ULT {
  7206  			break
  7207  		}
  7208  		v.reset(Op386MOVLconst)
  7209  		v.AuxInt = int32ToAuxInt(0)
  7210  		return true
  7211  	}
  7212  	// match: (SETAE (FlagLT_UGT))
  7213  	// result: (MOVLconst [1])
  7214  	for {
  7215  		if v_0.Op != Op386FlagLT_UGT {
  7216  			break
  7217  		}
  7218  		v.reset(Op386MOVLconst)
  7219  		v.AuxInt = int32ToAuxInt(1)
  7220  		return true
  7221  	}
  7222  	// match: (SETAE (FlagGT_ULT))
  7223  	// result: (MOVLconst [0])
  7224  	for {
  7225  		if v_0.Op != Op386FlagGT_ULT {
  7226  			break
  7227  		}
  7228  		v.reset(Op386MOVLconst)
  7229  		v.AuxInt = int32ToAuxInt(0)
  7230  		return true
  7231  	}
  7232  	// match: (SETAE (FlagGT_UGT))
  7233  	// result: (MOVLconst [1])
  7234  	for {
  7235  		if v_0.Op != Op386FlagGT_UGT {
  7236  			break
  7237  		}
  7238  		v.reset(Op386MOVLconst)
  7239  		v.AuxInt = int32ToAuxInt(1)
  7240  		return true
  7241  	}
  7242  	return false
  7243  }
  7244  func rewriteValue386_Op386SETB(v *Value) bool {
  7245  	v_0 := v.Args[0]
  7246  	// match: (SETB (InvertFlags x))
  7247  	// result: (SETA x)
  7248  	for {
  7249  		if v_0.Op != Op386InvertFlags {
  7250  			break
  7251  		}
  7252  		x := v_0.Args[0]
  7253  		v.reset(Op386SETA)
  7254  		v.AddArg(x)
  7255  		return true
  7256  	}
  7257  	// match: (SETB (FlagEQ))
  7258  	// result: (MOVLconst [0])
  7259  	for {
  7260  		if v_0.Op != Op386FlagEQ {
  7261  			break
  7262  		}
  7263  		v.reset(Op386MOVLconst)
  7264  		v.AuxInt = int32ToAuxInt(0)
  7265  		return true
  7266  	}
  7267  	// match: (SETB (FlagLT_ULT))
  7268  	// result: (MOVLconst [1])
  7269  	for {
  7270  		if v_0.Op != Op386FlagLT_ULT {
  7271  			break
  7272  		}
  7273  		v.reset(Op386MOVLconst)
  7274  		v.AuxInt = int32ToAuxInt(1)
  7275  		return true
  7276  	}
  7277  	// match: (SETB (FlagLT_UGT))
  7278  	// result: (MOVLconst [0])
  7279  	for {
  7280  		if v_0.Op != Op386FlagLT_UGT {
  7281  			break
  7282  		}
  7283  		v.reset(Op386MOVLconst)
  7284  		v.AuxInt = int32ToAuxInt(0)
  7285  		return true
  7286  	}
  7287  	// match: (SETB (FlagGT_ULT))
  7288  	// result: (MOVLconst [1])
  7289  	for {
  7290  		if v_0.Op != Op386FlagGT_ULT {
  7291  			break
  7292  		}
  7293  		v.reset(Op386MOVLconst)
  7294  		v.AuxInt = int32ToAuxInt(1)
  7295  		return true
  7296  	}
  7297  	// match: (SETB (FlagGT_UGT))
  7298  	// result: (MOVLconst [0])
  7299  	for {
  7300  		if v_0.Op != Op386FlagGT_UGT {
  7301  			break
  7302  		}
  7303  		v.reset(Op386MOVLconst)
  7304  		v.AuxInt = int32ToAuxInt(0)
  7305  		return true
  7306  	}
  7307  	return false
  7308  }
  7309  func rewriteValue386_Op386SETBE(v *Value) bool {
  7310  	v_0 := v.Args[0]
  7311  	// match: (SETBE (InvertFlags x))
  7312  	// result: (SETAE x)
  7313  	for {
  7314  		if v_0.Op != Op386InvertFlags {
  7315  			break
  7316  		}
  7317  		x := v_0.Args[0]
  7318  		v.reset(Op386SETAE)
  7319  		v.AddArg(x)
  7320  		return true
  7321  	}
  7322  	// match: (SETBE (FlagEQ))
  7323  	// result: (MOVLconst [1])
  7324  	for {
  7325  		if v_0.Op != Op386FlagEQ {
  7326  			break
  7327  		}
  7328  		v.reset(Op386MOVLconst)
  7329  		v.AuxInt = int32ToAuxInt(1)
  7330  		return true
  7331  	}
  7332  	// match: (SETBE (FlagLT_ULT))
  7333  	// result: (MOVLconst [1])
  7334  	for {
  7335  		if v_0.Op != Op386FlagLT_ULT {
  7336  			break
  7337  		}
  7338  		v.reset(Op386MOVLconst)
  7339  		v.AuxInt = int32ToAuxInt(1)
  7340  		return true
  7341  	}
  7342  	// match: (SETBE (FlagLT_UGT))
  7343  	// result: (MOVLconst [0])
  7344  	for {
  7345  		if v_0.Op != Op386FlagLT_UGT {
  7346  			break
  7347  		}
  7348  		v.reset(Op386MOVLconst)
  7349  		v.AuxInt = int32ToAuxInt(0)
  7350  		return true
  7351  	}
  7352  	// match: (SETBE (FlagGT_ULT))
  7353  	// result: (MOVLconst [1])
  7354  	for {
  7355  		if v_0.Op != Op386FlagGT_ULT {
  7356  			break
  7357  		}
  7358  		v.reset(Op386MOVLconst)
  7359  		v.AuxInt = int32ToAuxInt(1)
  7360  		return true
  7361  	}
  7362  	// match: (SETBE (FlagGT_UGT))
  7363  	// result: (MOVLconst [0])
  7364  	for {
  7365  		if v_0.Op != Op386FlagGT_UGT {
  7366  			break
  7367  		}
  7368  		v.reset(Op386MOVLconst)
  7369  		v.AuxInt = int32ToAuxInt(0)
  7370  		return true
  7371  	}
  7372  	return false
  7373  }
  7374  func rewriteValue386_Op386SETEQ(v *Value) bool {
  7375  	v_0 := v.Args[0]
  7376  	// match: (SETEQ (InvertFlags x))
  7377  	// result: (SETEQ x)
  7378  	for {
  7379  		if v_0.Op != Op386InvertFlags {
  7380  			break
  7381  		}
  7382  		x := v_0.Args[0]
  7383  		v.reset(Op386SETEQ)
  7384  		v.AddArg(x)
  7385  		return true
  7386  	}
  7387  	// match: (SETEQ (FlagEQ))
  7388  	// result: (MOVLconst [1])
  7389  	for {
  7390  		if v_0.Op != Op386FlagEQ {
  7391  			break
  7392  		}
  7393  		v.reset(Op386MOVLconst)
  7394  		v.AuxInt = int32ToAuxInt(1)
  7395  		return true
  7396  	}
  7397  	// match: (SETEQ (FlagLT_ULT))
  7398  	// result: (MOVLconst [0])
  7399  	for {
  7400  		if v_0.Op != Op386FlagLT_ULT {
  7401  			break
  7402  		}
  7403  		v.reset(Op386MOVLconst)
  7404  		v.AuxInt = int32ToAuxInt(0)
  7405  		return true
  7406  	}
  7407  	// match: (SETEQ (FlagLT_UGT))
  7408  	// result: (MOVLconst [0])
  7409  	for {
  7410  		if v_0.Op != Op386FlagLT_UGT {
  7411  			break
  7412  		}
  7413  		v.reset(Op386MOVLconst)
  7414  		v.AuxInt = int32ToAuxInt(0)
  7415  		return true
  7416  	}
  7417  	// match: (SETEQ (FlagGT_ULT))
  7418  	// result: (MOVLconst [0])
  7419  	for {
  7420  		if v_0.Op != Op386FlagGT_ULT {
  7421  			break
  7422  		}
  7423  		v.reset(Op386MOVLconst)
  7424  		v.AuxInt = int32ToAuxInt(0)
  7425  		return true
  7426  	}
  7427  	// match: (SETEQ (FlagGT_UGT))
  7428  	// result: (MOVLconst [0])
  7429  	for {
  7430  		if v_0.Op != Op386FlagGT_UGT {
  7431  			break
  7432  		}
  7433  		v.reset(Op386MOVLconst)
  7434  		v.AuxInt = int32ToAuxInt(0)
  7435  		return true
  7436  	}
  7437  	return false
  7438  }
  7439  func rewriteValue386_Op386SETG(v *Value) bool {
  7440  	v_0 := v.Args[0]
  7441  	// match: (SETG (InvertFlags x))
  7442  	// result: (SETL x)
  7443  	for {
  7444  		if v_0.Op != Op386InvertFlags {
  7445  			break
  7446  		}
  7447  		x := v_0.Args[0]
  7448  		v.reset(Op386SETL)
  7449  		v.AddArg(x)
  7450  		return true
  7451  	}
  7452  	// match: (SETG (FlagEQ))
  7453  	// result: (MOVLconst [0])
  7454  	for {
  7455  		if v_0.Op != Op386FlagEQ {
  7456  			break
  7457  		}
  7458  		v.reset(Op386MOVLconst)
  7459  		v.AuxInt = int32ToAuxInt(0)
  7460  		return true
  7461  	}
  7462  	// match: (SETG (FlagLT_ULT))
  7463  	// result: (MOVLconst [0])
  7464  	for {
  7465  		if v_0.Op != Op386FlagLT_ULT {
  7466  			break
  7467  		}
  7468  		v.reset(Op386MOVLconst)
  7469  		v.AuxInt = int32ToAuxInt(0)
  7470  		return true
  7471  	}
  7472  	// match: (SETG (FlagLT_UGT))
  7473  	// result: (MOVLconst [0])
  7474  	for {
  7475  		if v_0.Op != Op386FlagLT_UGT {
  7476  			break
  7477  		}
  7478  		v.reset(Op386MOVLconst)
  7479  		v.AuxInt = int32ToAuxInt(0)
  7480  		return true
  7481  	}
  7482  	// match: (SETG (FlagGT_ULT))
  7483  	// result: (MOVLconst [1])
  7484  	for {
  7485  		if v_0.Op != Op386FlagGT_ULT {
  7486  			break
  7487  		}
  7488  		v.reset(Op386MOVLconst)
  7489  		v.AuxInt = int32ToAuxInt(1)
  7490  		return true
  7491  	}
  7492  	// match: (SETG (FlagGT_UGT))
  7493  	// result: (MOVLconst [1])
  7494  	for {
  7495  		if v_0.Op != Op386FlagGT_UGT {
  7496  			break
  7497  		}
  7498  		v.reset(Op386MOVLconst)
  7499  		v.AuxInt = int32ToAuxInt(1)
  7500  		return true
  7501  	}
  7502  	return false
  7503  }
  7504  func rewriteValue386_Op386SETGE(v *Value) bool {
  7505  	v_0 := v.Args[0]
  7506  	// match: (SETGE (InvertFlags x))
  7507  	// result: (SETLE x)
  7508  	for {
  7509  		if v_0.Op != Op386InvertFlags {
  7510  			break
  7511  		}
  7512  		x := v_0.Args[0]
  7513  		v.reset(Op386SETLE)
  7514  		v.AddArg(x)
  7515  		return true
  7516  	}
  7517  	// match: (SETGE (FlagEQ))
  7518  	// result: (MOVLconst [1])
  7519  	for {
  7520  		if v_0.Op != Op386FlagEQ {
  7521  			break
  7522  		}
  7523  		v.reset(Op386MOVLconst)
  7524  		v.AuxInt = int32ToAuxInt(1)
  7525  		return true
  7526  	}
  7527  	// match: (SETGE (FlagLT_ULT))
  7528  	// result: (MOVLconst [0])
  7529  	for {
  7530  		if v_0.Op != Op386FlagLT_ULT {
  7531  			break
  7532  		}
  7533  		v.reset(Op386MOVLconst)
  7534  		v.AuxInt = int32ToAuxInt(0)
  7535  		return true
  7536  	}
  7537  	// match: (SETGE (FlagLT_UGT))
  7538  	// result: (MOVLconst [0])
  7539  	for {
  7540  		if v_0.Op != Op386FlagLT_UGT {
  7541  			break
  7542  		}
  7543  		v.reset(Op386MOVLconst)
  7544  		v.AuxInt = int32ToAuxInt(0)
  7545  		return true
  7546  	}
  7547  	// match: (SETGE (FlagGT_ULT))
  7548  	// result: (MOVLconst [1])
  7549  	for {
  7550  		if v_0.Op != Op386FlagGT_ULT {
  7551  			break
  7552  		}
  7553  		v.reset(Op386MOVLconst)
  7554  		v.AuxInt = int32ToAuxInt(1)
  7555  		return true
  7556  	}
  7557  	// match: (SETGE (FlagGT_UGT))
  7558  	// result: (MOVLconst [1])
  7559  	for {
  7560  		if v_0.Op != Op386FlagGT_UGT {
  7561  			break
  7562  		}
  7563  		v.reset(Op386MOVLconst)
  7564  		v.AuxInt = int32ToAuxInt(1)
  7565  		return true
  7566  	}
  7567  	return false
  7568  }
  7569  func rewriteValue386_Op386SETL(v *Value) bool {
  7570  	v_0 := v.Args[0]
  7571  	// match: (SETL (InvertFlags x))
  7572  	// result: (SETG x)
  7573  	for {
  7574  		if v_0.Op != Op386InvertFlags {
  7575  			break
  7576  		}
  7577  		x := v_0.Args[0]
  7578  		v.reset(Op386SETG)
  7579  		v.AddArg(x)
  7580  		return true
  7581  	}
  7582  	// match: (SETL (FlagEQ))
  7583  	// result: (MOVLconst [0])
  7584  	for {
  7585  		if v_0.Op != Op386FlagEQ {
  7586  			break
  7587  		}
  7588  		v.reset(Op386MOVLconst)
  7589  		v.AuxInt = int32ToAuxInt(0)
  7590  		return true
  7591  	}
  7592  	// match: (SETL (FlagLT_ULT))
  7593  	// result: (MOVLconst [1])
  7594  	for {
  7595  		if v_0.Op != Op386FlagLT_ULT {
  7596  			break
  7597  		}
  7598  		v.reset(Op386MOVLconst)
  7599  		v.AuxInt = int32ToAuxInt(1)
  7600  		return true
  7601  	}
  7602  	// match: (SETL (FlagLT_UGT))
  7603  	// result: (MOVLconst [1])
  7604  	for {
  7605  		if v_0.Op != Op386FlagLT_UGT {
  7606  			break
  7607  		}
  7608  		v.reset(Op386MOVLconst)
  7609  		v.AuxInt = int32ToAuxInt(1)
  7610  		return true
  7611  	}
  7612  	// match: (SETL (FlagGT_ULT))
  7613  	// result: (MOVLconst [0])
  7614  	for {
  7615  		if v_0.Op != Op386FlagGT_ULT {
  7616  			break
  7617  		}
  7618  		v.reset(Op386MOVLconst)
  7619  		v.AuxInt = int32ToAuxInt(0)
  7620  		return true
  7621  	}
  7622  	// match: (SETL (FlagGT_UGT))
  7623  	// result: (MOVLconst [0])
  7624  	for {
  7625  		if v_0.Op != Op386FlagGT_UGT {
  7626  			break
  7627  		}
  7628  		v.reset(Op386MOVLconst)
  7629  		v.AuxInt = int32ToAuxInt(0)
  7630  		return true
  7631  	}
  7632  	return false
  7633  }
  7634  func rewriteValue386_Op386SETLE(v *Value) bool {
  7635  	v_0 := v.Args[0]
  7636  	// match: (SETLE (InvertFlags x))
  7637  	// result: (SETGE x)
  7638  	for {
  7639  		if v_0.Op != Op386InvertFlags {
  7640  			break
  7641  		}
  7642  		x := v_0.Args[0]
  7643  		v.reset(Op386SETGE)
  7644  		v.AddArg(x)
  7645  		return true
  7646  	}
  7647  	// match: (SETLE (FlagEQ))
  7648  	// result: (MOVLconst [1])
  7649  	for {
  7650  		if v_0.Op != Op386FlagEQ {
  7651  			break
  7652  		}
  7653  		v.reset(Op386MOVLconst)
  7654  		v.AuxInt = int32ToAuxInt(1)
  7655  		return true
  7656  	}
  7657  	// match: (SETLE (FlagLT_ULT))
  7658  	// result: (MOVLconst [1])
  7659  	for {
  7660  		if v_0.Op != Op386FlagLT_ULT {
  7661  			break
  7662  		}
  7663  		v.reset(Op386MOVLconst)
  7664  		v.AuxInt = int32ToAuxInt(1)
  7665  		return true
  7666  	}
  7667  	// match: (SETLE (FlagLT_UGT))
  7668  	// result: (MOVLconst [1])
  7669  	for {
  7670  		if v_0.Op != Op386FlagLT_UGT {
  7671  			break
  7672  		}
  7673  		v.reset(Op386MOVLconst)
  7674  		v.AuxInt = int32ToAuxInt(1)
  7675  		return true
  7676  	}
  7677  	// match: (SETLE (FlagGT_ULT))
  7678  	// result: (MOVLconst [0])
  7679  	for {
  7680  		if v_0.Op != Op386FlagGT_ULT {
  7681  			break
  7682  		}
  7683  		v.reset(Op386MOVLconst)
  7684  		v.AuxInt = int32ToAuxInt(0)
  7685  		return true
  7686  	}
  7687  	// match: (SETLE (FlagGT_UGT))
  7688  	// result: (MOVLconst [0])
  7689  	for {
  7690  		if v_0.Op != Op386FlagGT_UGT {
  7691  			break
  7692  		}
  7693  		v.reset(Op386MOVLconst)
  7694  		v.AuxInt = int32ToAuxInt(0)
  7695  		return true
  7696  	}
  7697  	return false
  7698  }
  7699  func rewriteValue386_Op386SETNE(v *Value) bool {
  7700  	v_0 := v.Args[0]
  7701  	// match: (SETNE (InvertFlags x))
  7702  	// result: (SETNE x)
  7703  	for {
  7704  		if v_0.Op != Op386InvertFlags {
  7705  			break
  7706  		}
  7707  		x := v_0.Args[0]
  7708  		v.reset(Op386SETNE)
  7709  		v.AddArg(x)
  7710  		return true
  7711  	}
  7712  	// match: (SETNE (FlagEQ))
  7713  	// result: (MOVLconst [0])
  7714  	for {
  7715  		if v_0.Op != Op386FlagEQ {
  7716  			break
  7717  		}
  7718  		v.reset(Op386MOVLconst)
  7719  		v.AuxInt = int32ToAuxInt(0)
  7720  		return true
  7721  	}
  7722  	// match: (SETNE (FlagLT_ULT))
  7723  	// result: (MOVLconst [1])
  7724  	for {
  7725  		if v_0.Op != Op386FlagLT_ULT {
  7726  			break
  7727  		}
  7728  		v.reset(Op386MOVLconst)
  7729  		v.AuxInt = int32ToAuxInt(1)
  7730  		return true
  7731  	}
  7732  	// match: (SETNE (FlagLT_UGT))
  7733  	// result: (MOVLconst [1])
  7734  	for {
  7735  		if v_0.Op != Op386FlagLT_UGT {
  7736  			break
  7737  		}
  7738  		v.reset(Op386MOVLconst)
  7739  		v.AuxInt = int32ToAuxInt(1)
  7740  		return true
  7741  	}
  7742  	// match: (SETNE (FlagGT_ULT))
  7743  	// result: (MOVLconst [1])
  7744  	for {
  7745  		if v_0.Op != Op386FlagGT_ULT {
  7746  			break
  7747  		}
  7748  		v.reset(Op386MOVLconst)
  7749  		v.AuxInt = int32ToAuxInt(1)
  7750  		return true
  7751  	}
  7752  	// match: (SETNE (FlagGT_UGT))
  7753  	// result: (MOVLconst [1])
  7754  	for {
  7755  		if v_0.Op != Op386FlagGT_UGT {
  7756  			break
  7757  		}
  7758  		v.reset(Op386MOVLconst)
  7759  		v.AuxInt = int32ToAuxInt(1)
  7760  		return true
  7761  	}
  7762  	return false
  7763  }
  7764  func rewriteValue386_Op386SHLL(v *Value) bool {
  7765  	v_1 := v.Args[1]
  7766  	v_0 := v.Args[0]
  7767  	// match: (SHLL x (MOVLconst [c]))
  7768  	// result: (SHLLconst [c&31] x)
  7769  	for {
  7770  		x := v_0
  7771  		if v_1.Op != Op386MOVLconst {
  7772  			break
  7773  		}
  7774  		c := auxIntToInt32(v_1.AuxInt)
  7775  		v.reset(Op386SHLLconst)
  7776  		v.AuxInt = int32ToAuxInt(c & 31)
  7777  		v.AddArg(x)
  7778  		return true
  7779  	}
  7780  	// match: (SHLL x (ANDLconst [31] y))
  7781  	// result: (SHLL x y)
  7782  	for {
  7783  		x := v_0
  7784  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  7785  			break
  7786  		}
  7787  		y := v_1.Args[0]
  7788  		v.reset(Op386SHLL)
  7789  		v.AddArg2(x, y)
  7790  		return true
  7791  	}
  7792  	return false
  7793  }
  7794  func rewriteValue386_Op386SHLLconst(v *Value) bool {
  7795  	v_0 := v.Args[0]
  7796  	// match: (SHLLconst x [0])
  7797  	// result: x
  7798  	for {
  7799  		if auxIntToInt32(v.AuxInt) != 0 {
  7800  			break
  7801  		}
  7802  		x := v_0
  7803  		v.copyOf(x)
  7804  		return true
  7805  	}
  7806  	return false
  7807  }
  7808  func rewriteValue386_Op386SHRB(v *Value) bool {
  7809  	v_1 := v.Args[1]
  7810  	v_0 := v.Args[0]
  7811  	// match: (SHRB x (MOVLconst [c]))
  7812  	// cond: c&31 < 8
  7813  	// result: (SHRBconst [int8(c&31)] x)
  7814  	for {
  7815  		x := v_0
  7816  		if v_1.Op != Op386MOVLconst {
  7817  			break
  7818  		}
  7819  		c := auxIntToInt32(v_1.AuxInt)
  7820  		if !(c&31 < 8) {
  7821  			break
  7822  		}
  7823  		v.reset(Op386SHRBconst)
  7824  		v.AuxInt = int8ToAuxInt(int8(c & 31))
  7825  		v.AddArg(x)
  7826  		return true
  7827  	}
  7828  	// match: (SHRB _ (MOVLconst [c]))
  7829  	// cond: c&31 >= 8
  7830  	// result: (MOVLconst [0])
  7831  	for {
  7832  		if v_1.Op != Op386MOVLconst {
  7833  			break
  7834  		}
  7835  		c := auxIntToInt32(v_1.AuxInt)
  7836  		if !(c&31 >= 8) {
  7837  			break
  7838  		}
  7839  		v.reset(Op386MOVLconst)
  7840  		v.AuxInt = int32ToAuxInt(0)
  7841  		return true
  7842  	}
  7843  	return false
  7844  }
  7845  func rewriteValue386_Op386SHRBconst(v *Value) bool {
  7846  	v_0 := v.Args[0]
  7847  	// match: (SHRBconst x [0])
  7848  	// result: x
  7849  	for {
  7850  		if auxIntToInt8(v.AuxInt) != 0 {
  7851  			break
  7852  		}
  7853  		x := v_0
  7854  		v.copyOf(x)
  7855  		return true
  7856  	}
  7857  	return false
  7858  }
  7859  func rewriteValue386_Op386SHRL(v *Value) bool {
  7860  	v_1 := v.Args[1]
  7861  	v_0 := v.Args[0]
  7862  	// match: (SHRL x (MOVLconst [c]))
  7863  	// result: (SHRLconst [c&31] x)
  7864  	for {
  7865  		x := v_0
  7866  		if v_1.Op != Op386MOVLconst {
  7867  			break
  7868  		}
  7869  		c := auxIntToInt32(v_1.AuxInt)
  7870  		v.reset(Op386SHRLconst)
  7871  		v.AuxInt = int32ToAuxInt(c & 31)
  7872  		v.AddArg(x)
  7873  		return true
  7874  	}
  7875  	// match: (SHRL x (ANDLconst [31] y))
  7876  	// result: (SHRL x y)
  7877  	for {
  7878  		x := v_0
  7879  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  7880  			break
  7881  		}
  7882  		y := v_1.Args[0]
  7883  		v.reset(Op386SHRL)
  7884  		v.AddArg2(x, y)
  7885  		return true
  7886  	}
  7887  	return false
  7888  }
  7889  func rewriteValue386_Op386SHRLconst(v *Value) bool {
  7890  	v_0 := v.Args[0]
  7891  	// match: (SHRLconst x [0])
  7892  	// result: x
  7893  	for {
  7894  		if auxIntToInt32(v.AuxInt) != 0 {
  7895  			break
  7896  		}
  7897  		x := v_0
  7898  		v.copyOf(x)
  7899  		return true
  7900  	}
  7901  	return false
  7902  }
  7903  func rewriteValue386_Op386SHRW(v *Value) bool {
  7904  	v_1 := v.Args[1]
  7905  	v_0 := v.Args[0]
  7906  	// match: (SHRW x (MOVLconst [c]))
  7907  	// cond: c&31 < 16
  7908  	// result: (SHRWconst [int16(c&31)] x)
  7909  	for {
  7910  		x := v_0
  7911  		if v_1.Op != Op386MOVLconst {
  7912  			break
  7913  		}
  7914  		c := auxIntToInt32(v_1.AuxInt)
  7915  		if !(c&31 < 16) {
  7916  			break
  7917  		}
  7918  		v.reset(Op386SHRWconst)
  7919  		v.AuxInt = int16ToAuxInt(int16(c & 31))
  7920  		v.AddArg(x)
  7921  		return true
  7922  	}
  7923  	// match: (SHRW _ (MOVLconst [c]))
  7924  	// cond: c&31 >= 16
  7925  	// result: (MOVLconst [0])
  7926  	for {
  7927  		if v_1.Op != Op386MOVLconst {
  7928  			break
  7929  		}
  7930  		c := auxIntToInt32(v_1.AuxInt)
  7931  		if !(c&31 >= 16) {
  7932  			break
  7933  		}
  7934  		v.reset(Op386MOVLconst)
  7935  		v.AuxInt = int32ToAuxInt(0)
  7936  		return true
  7937  	}
  7938  	return false
  7939  }
  7940  func rewriteValue386_Op386SHRWconst(v *Value) bool {
  7941  	v_0 := v.Args[0]
  7942  	// match: (SHRWconst x [0])
  7943  	// result: x
  7944  	for {
  7945  		if auxIntToInt16(v.AuxInt) != 0 {
  7946  			break
  7947  		}
  7948  		x := v_0
  7949  		v.copyOf(x)
  7950  		return true
  7951  	}
  7952  	return false
  7953  }
  7954  func rewriteValue386_Op386SUBL(v *Value) bool {
  7955  	v_1 := v.Args[1]
  7956  	v_0 := v.Args[0]
  7957  	b := v.Block
  7958  	// match: (SUBL x (MOVLconst [c]))
  7959  	// result: (SUBLconst x [c])
  7960  	for {
  7961  		x := v_0
  7962  		if v_1.Op != Op386MOVLconst {
  7963  			break
  7964  		}
  7965  		c := auxIntToInt32(v_1.AuxInt)
  7966  		v.reset(Op386SUBLconst)
  7967  		v.AuxInt = int32ToAuxInt(c)
  7968  		v.AddArg(x)
  7969  		return true
  7970  	}
  7971  	// match: (SUBL (MOVLconst [c]) x)
  7972  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  7973  	for {
  7974  		if v_0.Op != Op386MOVLconst {
  7975  			break
  7976  		}
  7977  		c := auxIntToInt32(v_0.AuxInt)
  7978  		x := v_1
  7979  		v.reset(Op386NEGL)
  7980  		v0 := b.NewValue0(v.Pos, Op386SUBLconst, v.Type)
  7981  		v0.AuxInt = int32ToAuxInt(c)
  7982  		v0.AddArg(x)
  7983  		v.AddArg(v0)
  7984  		return true
  7985  	}
  7986  	// match: (SUBL x l:(MOVLload [off] {sym} ptr mem))
  7987  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  7988  	// result: (SUBLload x [off] {sym} ptr mem)
  7989  	for {
  7990  		x := v_0
  7991  		l := v_1
  7992  		if l.Op != Op386MOVLload {
  7993  			break
  7994  		}
  7995  		off := auxIntToInt32(l.AuxInt)
  7996  		sym := auxToSym(l.Aux)
  7997  		mem := l.Args[1]
  7998  		ptr := l.Args[0]
  7999  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8000  			break
  8001  		}
  8002  		v.reset(Op386SUBLload)
  8003  		v.AuxInt = int32ToAuxInt(off)
  8004  		v.Aux = symToAux(sym)
  8005  		v.AddArg3(x, ptr, mem)
  8006  		return true
  8007  	}
  8008  	// match: (SUBL x x)
  8009  	// result: (MOVLconst [0])
  8010  	for {
  8011  		x := v_0
  8012  		if x != v_1 {
  8013  			break
  8014  		}
  8015  		v.reset(Op386MOVLconst)
  8016  		v.AuxInt = int32ToAuxInt(0)
  8017  		return true
  8018  	}
  8019  	return false
  8020  }
  8021  func rewriteValue386_Op386SUBLcarry(v *Value) bool {
  8022  	v_1 := v.Args[1]
  8023  	v_0 := v.Args[0]
  8024  	// match: (SUBLcarry x (MOVLconst [c]))
  8025  	// result: (SUBLconstcarry [c] x)
  8026  	for {
  8027  		x := v_0
  8028  		if v_1.Op != Op386MOVLconst {
  8029  			break
  8030  		}
  8031  		c := auxIntToInt32(v_1.AuxInt)
  8032  		v.reset(Op386SUBLconstcarry)
  8033  		v.AuxInt = int32ToAuxInt(c)
  8034  		v.AddArg(x)
  8035  		return true
  8036  	}
  8037  	return false
  8038  }
  8039  func rewriteValue386_Op386SUBLconst(v *Value) bool {
  8040  	v_0 := v.Args[0]
  8041  	// match: (SUBLconst [c] x)
  8042  	// cond: c==0
  8043  	// result: x
  8044  	for {
  8045  		c := auxIntToInt32(v.AuxInt)
  8046  		x := v_0
  8047  		if !(c == 0) {
  8048  			break
  8049  		}
  8050  		v.copyOf(x)
  8051  		return true
  8052  	}
  8053  	// match: (SUBLconst [c] x)
  8054  	// result: (ADDLconst [-c] x)
  8055  	for {
  8056  		c := auxIntToInt32(v.AuxInt)
  8057  		x := v_0
  8058  		v.reset(Op386ADDLconst)
  8059  		v.AuxInt = int32ToAuxInt(-c)
  8060  		v.AddArg(x)
  8061  		return true
  8062  	}
  8063  }
  8064  func rewriteValue386_Op386SUBLload(v *Value) bool {
  8065  	v_2 := v.Args[2]
  8066  	v_1 := v.Args[1]
  8067  	v_0 := v.Args[0]
  8068  	b := v.Block
  8069  	config := b.Func.Config
  8070  	// match: (SUBLload [off1] {sym} val (ADDLconst [off2] base) mem)
  8071  	// cond: is32Bit(int64(off1)+int64(off2))
  8072  	// result: (SUBLload [off1+off2] {sym} val base mem)
  8073  	for {
  8074  		off1 := auxIntToInt32(v.AuxInt)
  8075  		sym := auxToSym(v.Aux)
  8076  		val := v_0
  8077  		if v_1.Op != Op386ADDLconst {
  8078  			break
  8079  		}
  8080  		off2 := auxIntToInt32(v_1.AuxInt)
  8081  		base := v_1.Args[0]
  8082  		mem := v_2
  8083  		if !(is32Bit(int64(off1) + int64(off2))) {
  8084  			break
  8085  		}
  8086  		v.reset(Op386SUBLload)
  8087  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8088  		v.Aux = symToAux(sym)
  8089  		v.AddArg3(val, base, mem)
  8090  		return true
  8091  	}
  8092  	// match: (SUBLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8093  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8094  	// result: (SUBLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8095  	for {
  8096  		off1 := auxIntToInt32(v.AuxInt)
  8097  		sym1 := auxToSym(v.Aux)
  8098  		val := v_0
  8099  		if v_1.Op != Op386LEAL {
  8100  			break
  8101  		}
  8102  		off2 := auxIntToInt32(v_1.AuxInt)
  8103  		sym2 := auxToSym(v_1.Aux)
  8104  		base := v_1.Args[0]
  8105  		mem := v_2
  8106  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8107  			break
  8108  		}
  8109  		v.reset(Op386SUBLload)
  8110  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8111  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8112  		v.AddArg3(val, base, mem)
  8113  		return true
  8114  	}
  8115  	return false
  8116  }
  8117  func rewriteValue386_Op386SUBLmodify(v *Value) bool {
  8118  	v_2 := v.Args[2]
  8119  	v_1 := v.Args[1]
  8120  	v_0 := v.Args[0]
  8121  	b := v.Block
  8122  	config := b.Func.Config
  8123  	// match: (SUBLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  8124  	// cond: is32Bit(int64(off1)+int64(off2))
  8125  	// result: (SUBLmodify [off1+off2] {sym} base val mem)
  8126  	for {
  8127  		off1 := auxIntToInt32(v.AuxInt)
  8128  		sym := auxToSym(v.Aux)
  8129  		if v_0.Op != Op386ADDLconst {
  8130  			break
  8131  		}
  8132  		off2 := auxIntToInt32(v_0.AuxInt)
  8133  		base := v_0.Args[0]
  8134  		val := v_1
  8135  		mem := v_2
  8136  		if !(is32Bit(int64(off1) + int64(off2))) {
  8137  			break
  8138  		}
  8139  		v.reset(Op386SUBLmodify)
  8140  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8141  		v.Aux = symToAux(sym)
  8142  		v.AddArg3(base, val, mem)
  8143  		return true
  8144  	}
  8145  	// match: (SUBLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  8146  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8147  	// result: (SUBLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8148  	for {
  8149  		off1 := auxIntToInt32(v.AuxInt)
  8150  		sym1 := auxToSym(v.Aux)
  8151  		if v_0.Op != Op386LEAL {
  8152  			break
  8153  		}
  8154  		off2 := auxIntToInt32(v_0.AuxInt)
  8155  		sym2 := auxToSym(v_0.Aux)
  8156  		base := v_0.Args[0]
  8157  		val := v_1
  8158  		mem := v_2
  8159  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8160  			break
  8161  		}
  8162  		v.reset(Op386SUBLmodify)
  8163  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8164  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8165  		v.AddArg3(base, val, mem)
  8166  		return true
  8167  	}
  8168  	return false
  8169  }
  8170  func rewriteValue386_Op386SUBSD(v *Value) bool {
  8171  	v_1 := v.Args[1]
  8172  	v_0 := v.Args[0]
  8173  	// match: (SUBSD x l:(MOVSDload [off] {sym} ptr mem))
  8174  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8175  	// result: (SUBSDload x [off] {sym} ptr mem)
  8176  	for {
  8177  		x := v_0
  8178  		l := v_1
  8179  		if l.Op != Op386MOVSDload {
  8180  			break
  8181  		}
  8182  		off := auxIntToInt32(l.AuxInt)
  8183  		sym := auxToSym(l.Aux)
  8184  		mem := l.Args[1]
  8185  		ptr := l.Args[0]
  8186  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8187  			break
  8188  		}
  8189  		v.reset(Op386SUBSDload)
  8190  		v.AuxInt = int32ToAuxInt(off)
  8191  		v.Aux = symToAux(sym)
  8192  		v.AddArg3(x, ptr, mem)
  8193  		return true
  8194  	}
  8195  	return false
  8196  }
  8197  func rewriteValue386_Op386SUBSDload(v *Value) bool {
  8198  	v_2 := v.Args[2]
  8199  	v_1 := v.Args[1]
  8200  	v_0 := v.Args[0]
  8201  	b := v.Block
  8202  	config := b.Func.Config
  8203  	// match: (SUBSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  8204  	// cond: is32Bit(int64(off1)+int64(off2))
  8205  	// result: (SUBSDload [off1+off2] {sym} val base mem)
  8206  	for {
  8207  		off1 := auxIntToInt32(v.AuxInt)
  8208  		sym := auxToSym(v.Aux)
  8209  		val := v_0
  8210  		if v_1.Op != Op386ADDLconst {
  8211  			break
  8212  		}
  8213  		off2 := auxIntToInt32(v_1.AuxInt)
  8214  		base := v_1.Args[0]
  8215  		mem := v_2
  8216  		if !(is32Bit(int64(off1) + int64(off2))) {
  8217  			break
  8218  		}
  8219  		v.reset(Op386SUBSDload)
  8220  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8221  		v.Aux = symToAux(sym)
  8222  		v.AddArg3(val, base, mem)
  8223  		return true
  8224  	}
  8225  	// match: (SUBSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8226  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8227  	// result: (SUBSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8228  	for {
  8229  		off1 := auxIntToInt32(v.AuxInt)
  8230  		sym1 := auxToSym(v.Aux)
  8231  		val := v_0
  8232  		if v_1.Op != Op386LEAL {
  8233  			break
  8234  		}
  8235  		off2 := auxIntToInt32(v_1.AuxInt)
  8236  		sym2 := auxToSym(v_1.Aux)
  8237  		base := v_1.Args[0]
  8238  		mem := v_2
  8239  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8240  			break
  8241  		}
  8242  		v.reset(Op386SUBSDload)
  8243  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8244  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8245  		v.AddArg3(val, base, mem)
  8246  		return true
  8247  	}
  8248  	return false
  8249  }
  8250  func rewriteValue386_Op386SUBSS(v *Value) bool {
  8251  	v_1 := v.Args[1]
  8252  	v_0 := v.Args[0]
  8253  	// match: (SUBSS x l:(MOVSSload [off] {sym} ptr mem))
  8254  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8255  	// result: (SUBSSload x [off] {sym} ptr mem)
  8256  	for {
  8257  		x := v_0
  8258  		l := v_1
  8259  		if l.Op != Op386MOVSSload {
  8260  			break
  8261  		}
  8262  		off := auxIntToInt32(l.AuxInt)
  8263  		sym := auxToSym(l.Aux)
  8264  		mem := l.Args[1]
  8265  		ptr := l.Args[0]
  8266  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8267  			break
  8268  		}
  8269  		v.reset(Op386SUBSSload)
  8270  		v.AuxInt = int32ToAuxInt(off)
  8271  		v.Aux = symToAux(sym)
  8272  		v.AddArg3(x, ptr, mem)
  8273  		return true
  8274  	}
  8275  	return false
  8276  }
  8277  func rewriteValue386_Op386SUBSSload(v *Value) bool {
  8278  	v_2 := v.Args[2]
  8279  	v_1 := v.Args[1]
  8280  	v_0 := v.Args[0]
  8281  	b := v.Block
  8282  	config := b.Func.Config
  8283  	// match: (SUBSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  8284  	// cond: is32Bit(int64(off1)+int64(off2))
  8285  	// result: (SUBSSload [off1+off2] {sym} val base mem)
  8286  	for {
  8287  		off1 := auxIntToInt32(v.AuxInt)
  8288  		sym := auxToSym(v.Aux)
  8289  		val := v_0
  8290  		if v_1.Op != Op386ADDLconst {
  8291  			break
  8292  		}
  8293  		off2 := auxIntToInt32(v_1.AuxInt)
  8294  		base := v_1.Args[0]
  8295  		mem := v_2
  8296  		if !(is32Bit(int64(off1) + int64(off2))) {
  8297  			break
  8298  		}
  8299  		v.reset(Op386SUBSSload)
  8300  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8301  		v.Aux = symToAux(sym)
  8302  		v.AddArg3(val, base, mem)
  8303  		return true
  8304  	}
  8305  	// match: (SUBSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8306  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8307  	// result: (SUBSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8308  	for {
  8309  		off1 := auxIntToInt32(v.AuxInt)
  8310  		sym1 := auxToSym(v.Aux)
  8311  		val := v_0
  8312  		if v_1.Op != Op386LEAL {
  8313  			break
  8314  		}
  8315  		off2 := auxIntToInt32(v_1.AuxInt)
  8316  		sym2 := auxToSym(v_1.Aux)
  8317  		base := v_1.Args[0]
  8318  		mem := v_2
  8319  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8320  			break
  8321  		}
  8322  		v.reset(Op386SUBSSload)
  8323  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8324  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8325  		v.AddArg3(val, base, mem)
  8326  		return true
  8327  	}
  8328  	return false
  8329  }
  8330  func rewriteValue386_Op386XORL(v *Value) bool {
  8331  	v_1 := v.Args[1]
  8332  	v_0 := v.Args[0]
  8333  	// match: (XORL x (MOVLconst [c]))
  8334  	// result: (XORLconst [c] x)
  8335  	for {
  8336  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8337  			x := v_0
  8338  			if v_1.Op != Op386MOVLconst {
  8339  				continue
  8340  			}
  8341  			c := auxIntToInt32(v_1.AuxInt)
  8342  			v.reset(Op386XORLconst)
  8343  			v.AuxInt = int32ToAuxInt(c)
  8344  			v.AddArg(x)
  8345  			return true
  8346  		}
  8347  		break
  8348  	}
  8349  	// match: (XORL (SHLLconst [c] x) (SHRLconst [d] x))
  8350  	// cond: d == 32-c
  8351  	// result: (ROLLconst [c] x)
  8352  	for {
  8353  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8354  			if v_0.Op != Op386SHLLconst {
  8355  				continue
  8356  			}
  8357  			c := auxIntToInt32(v_0.AuxInt)
  8358  			x := v_0.Args[0]
  8359  			if v_1.Op != Op386SHRLconst {
  8360  				continue
  8361  			}
  8362  			d := auxIntToInt32(v_1.AuxInt)
  8363  			if x != v_1.Args[0] || !(d == 32-c) {
  8364  				continue
  8365  			}
  8366  			v.reset(Op386ROLLconst)
  8367  			v.AuxInt = int32ToAuxInt(c)
  8368  			v.AddArg(x)
  8369  			return true
  8370  		}
  8371  		break
  8372  	}
  8373  	// match: (XORL <t> (SHLLconst x [c]) (SHRWconst x [d]))
  8374  	// cond: c < 16 && d == int16(16-c) && t.Size() == 2
  8375  	// result: (ROLWconst x [int16(c)])
  8376  	for {
  8377  		t := v.Type
  8378  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8379  			if v_0.Op != Op386SHLLconst {
  8380  				continue
  8381  			}
  8382  			c := auxIntToInt32(v_0.AuxInt)
  8383  			x := v_0.Args[0]
  8384  			if v_1.Op != Op386SHRWconst {
  8385  				continue
  8386  			}
  8387  			d := auxIntToInt16(v_1.AuxInt)
  8388  			if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
  8389  				continue
  8390  			}
  8391  			v.reset(Op386ROLWconst)
  8392  			v.AuxInt = int16ToAuxInt(int16(c))
  8393  			v.AddArg(x)
  8394  			return true
  8395  		}
  8396  		break
  8397  	}
  8398  	// match: (XORL <t> (SHLLconst x [c]) (SHRBconst x [d]))
  8399  	// cond: c < 8 && d == int8(8-c) && t.Size() == 1
  8400  	// result: (ROLBconst x [int8(c)])
  8401  	for {
  8402  		t := v.Type
  8403  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8404  			if v_0.Op != Op386SHLLconst {
  8405  				continue
  8406  			}
  8407  			c := auxIntToInt32(v_0.AuxInt)
  8408  			x := v_0.Args[0]
  8409  			if v_1.Op != Op386SHRBconst {
  8410  				continue
  8411  			}
  8412  			d := auxIntToInt8(v_1.AuxInt)
  8413  			if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
  8414  				continue
  8415  			}
  8416  			v.reset(Op386ROLBconst)
  8417  			v.AuxInt = int8ToAuxInt(int8(c))
  8418  			v.AddArg(x)
  8419  			return true
  8420  		}
  8421  		break
  8422  	}
  8423  	// match: (XORL x l:(MOVLload [off] {sym} ptr mem))
  8424  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8425  	// result: (XORLload x [off] {sym} ptr mem)
  8426  	for {
  8427  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8428  			x := v_0
  8429  			l := v_1
  8430  			if l.Op != Op386MOVLload {
  8431  				continue
  8432  			}
  8433  			off := auxIntToInt32(l.AuxInt)
  8434  			sym := auxToSym(l.Aux)
  8435  			mem := l.Args[1]
  8436  			ptr := l.Args[0]
  8437  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8438  				continue
  8439  			}
  8440  			v.reset(Op386XORLload)
  8441  			v.AuxInt = int32ToAuxInt(off)
  8442  			v.Aux = symToAux(sym)
  8443  			v.AddArg3(x, ptr, mem)
  8444  			return true
  8445  		}
  8446  		break
  8447  	}
  8448  	// match: (XORL x x)
  8449  	// result: (MOVLconst [0])
  8450  	for {
  8451  		x := v_0
  8452  		if x != v_1 {
  8453  			break
  8454  		}
  8455  		v.reset(Op386MOVLconst)
  8456  		v.AuxInt = int32ToAuxInt(0)
  8457  		return true
  8458  	}
  8459  	return false
  8460  }
  8461  func rewriteValue386_Op386XORLconst(v *Value) bool {
  8462  	v_0 := v.Args[0]
  8463  	// match: (XORLconst [c] (XORLconst [d] x))
  8464  	// result: (XORLconst [c ^ d] x)
  8465  	for {
  8466  		c := auxIntToInt32(v.AuxInt)
  8467  		if v_0.Op != Op386XORLconst {
  8468  			break
  8469  		}
  8470  		d := auxIntToInt32(v_0.AuxInt)
  8471  		x := v_0.Args[0]
  8472  		v.reset(Op386XORLconst)
  8473  		v.AuxInt = int32ToAuxInt(c ^ d)
  8474  		v.AddArg(x)
  8475  		return true
  8476  	}
  8477  	// match: (XORLconst [c] x)
  8478  	// cond: c==0
  8479  	// result: x
  8480  	for {
  8481  		c := auxIntToInt32(v.AuxInt)
  8482  		x := v_0
  8483  		if !(c == 0) {
  8484  			break
  8485  		}
  8486  		v.copyOf(x)
  8487  		return true
  8488  	}
  8489  	// match: (XORLconst [c] (MOVLconst [d]))
  8490  	// result: (MOVLconst [c^d])
  8491  	for {
  8492  		c := auxIntToInt32(v.AuxInt)
  8493  		if v_0.Op != Op386MOVLconst {
  8494  			break
  8495  		}
  8496  		d := auxIntToInt32(v_0.AuxInt)
  8497  		v.reset(Op386MOVLconst)
  8498  		v.AuxInt = int32ToAuxInt(c ^ d)
  8499  		return true
  8500  	}
  8501  	return false
  8502  }
  8503  func rewriteValue386_Op386XORLconstmodify(v *Value) bool {
  8504  	v_1 := v.Args[1]
  8505  	v_0 := v.Args[0]
  8506  	b := v.Block
  8507  	config := b.Func.Config
  8508  	// match: (XORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  8509  	// cond: valoff1.canAdd32(off2)
  8510  	// result: (XORLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  8511  	for {
  8512  		valoff1 := auxIntToValAndOff(v.AuxInt)
  8513  		sym := auxToSym(v.Aux)
  8514  		if v_0.Op != Op386ADDLconst {
  8515  			break
  8516  		}
  8517  		off2 := auxIntToInt32(v_0.AuxInt)
  8518  		base := v_0.Args[0]
  8519  		mem := v_1
  8520  		if !(valoff1.canAdd32(off2)) {
  8521  			break
  8522  		}
  8523  		v.reset(Op386XORLconstmodify)
  8524  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  8525  		v.Aux = symToAux(sym)
  8526  		v.AddArg2(base, mem)
  8527  		return true
  8528  	}
  8529  	// match: (XORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  8530  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8531  	// result: (XORLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  8532  	for {
  8533  		valoff1 := auxIntToValAndOff(v.AuxInt)
  8534  		sym1 := auxToSym(v.Aux)
  8535  		if v_0.Op != Op386LEAL {
  8536  			break
  8537  		}
  8538  		off2 := auxIntToInt32(v_0.AuxInt)
  8539  		sym2 := auxToSym(v_0.Aux)
  8540  		base := v_0.Args[0]
  8541  		mem := v_1
  8542  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8543  			break
  8544  		}
  8545  		v.reset(Op386XORLconstmodify)
  8546  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  8547  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8548  		v.AddArg2(base, mem)
  8549  		return true
  8550  	}
  8551  	return false
  8552  }
  8553  func rewriteValue386_Op386XORLload(v *Value) bool {
  8554  	v_2 := v.Args[2]
  8555  	v_1 := v.Args[1]
  8556  	v_0 := v.Args[0]
  8557  	b := v.Block
  8558  	config := b.Func.Config
  8559  	// match: (XORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  8560  	// cond: is32Bit(int64(off1)+int64(off2))
  8561  	// result: (XORLload [off1+off2] {sym} val base mem)
  8562  	for {
  8563  		off1 := auxIntToInt32(v.AuxInt)
  8564  		sym := auxToSym(v.Aux)
  8565  		val := v_0
  8566  		if v_1.Op != Op386ADDLconst {
  8567  			break
  8568  		}
  8569  		off2 := auxIntToInt32(v_1.AuxInt)
  8570  		base := v_1.Args[0]
  8571  		mem := v_2
  8572  		if !(is32Bit(int64(off1) + int64(off2))) {
  8573  			break
  8574  		}
  8575  		v.reset(Op386XORLload)
  8576  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8577  		v.Aux = symToAux(sym)
  8578  		v.AddArg3(val, base, mem)
  8579  		return true
  8580  	}
  8581  	// match: (XORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8582  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8583  	// result: (XORLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8584  	for {
  8585  		off1 := auxIntToInt32(v.AuxInt)
  8586  		sym1 := auxToSym(v.Aux)
  8587  		val := v_0
  8588  		if v_1.Op != Op386LEAL {
  8589  			break
  8590  		}
  8591  		off2 := auxIntToInt32(v_1.AuxInt)
  8592  		sym2 := auxToSym(v_1.Aux)
  8593  		base := v_1.Args[0]
  8594  		mem := v_2
  8595  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8596  			break
  8597  		}
  8598  		v.reset(Op386XORLload)
  8599  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8600  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8601  		v.AddArg3(val, base, mem)
  8602  		return true
  8603  	}
  8604  	return false
  8605  }
  8606  func rewriteValue386_Op386XORLmodify(v *Value) bool {
  8607  	v_2 := v.Args[2]
  8608  	v_1 := v.Args[1]
  8609  	v_0 := v.Args[0]
  8610  	b := v.Block
  8611  	config := b.Func.Config
  8612  	// match: (XORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  8613  	// cond: is32Bit(int64(off1)+int64(off2))
  8614  	// result: (XORLmodify [off1+off2] {sym} base val mem)
  8615  	for {
  8616  		off1 := auxIntToInt32(v.AuxInt)
  8617  		sym := auxToSym(v.Aux)
  8618  		if v_0.Op != Op386ADDLconst {
  8619  			break
  8620  		}
  8621  		off2 := auxIntToInt32(v_0.AuxInt)
  8622  		base := v_0.Args[0]
  8623  		val := v_1
  8624  		mem := v_2
  8625  		if !(is32Bit(int64(off1) + int64(off2))) {
  8626  			break
  8627  		}
  8628  		v.reset(Op386XORLmodify)
  8629  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8630  		v.Aux = symToAux(sym)
  8631  		v.AddArg3(base, val, mem)
  8632  		return true
  8633  	}
  8634  	// match: (XORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  8635  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8636  	// result: (XORLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8637  	for {
  8638  		off1 := auxIntToInt32(v.AuxInt)
  8639  		sym1 := auxToSym(v.Aux)
  8640  		if v_0.Op != Op386LEAL {
  8641  			break
  8642  		}
  8643  		off2 := auxIntToInt32(v_0.AuxInt)
  8644  		sym2 := auxToSym(v_0.Aux)
  8645  		base := v_0.Args[0]
  8646  		val := v_1
  8647  		mem := v_2
  8648  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8649  			break
  8650  		}
  8651  		v.reset(Op386XORLmodify)
  8652  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8653  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8654  		v.AddArg3(base, val, mem)
  8655  		return true
  8656  	}
  8657  	return false
  8658  }
  8659  func rewriteValue386_OpAddr(v *Value) bool {
  8660  	v_0 := v.Args[0]
  8661  	// match: (Addr {sym} base)
  8662  	// result: (LEAL {sym} base)
  8663  	for {
  8664  		sym := auxToSym(v.Aux)
  8665  		base := v_0
  8666  		v.reset(Op386LEAL)
  8667  		v.Aux = symToAux(sym)
  8668  		v.AddArg(base)
  8669  		return true
  8670  	}
  8671  }
  8672  func rewriteValue386_OpConst16(v *Value) bool {
  8673  	// match: (Const16 [c])
  8674  	// result: (MOVLconst [int32(c)])
  8675  	for {
  8676  		c := auxIntToInt16(v.AuxInt)
  8677  		v.reset(Op386MOVLconst)
  8678  		v.AuxInt = int32ToAuxInt(int32(c))
  8679  		return true
  8680  	}
  8681  }
  8682  func rewriteValue386_OpConst8(v *Value) bool {
  8683  	// match: (Const8 [c])
  8684  	// result: (MOVLconst [int32(c)])
  8685  	for {
  8686  		c := auxIntToInt8(v.AuxInt)
  8687  		v.reset(Op386MOVLconst)
  8688  		v.AuxInt = int32ToAuxInt(int32(c))
  8689  		return true
  8690  	}
  8691  }
  8692  func rewriteValue386_OpConstBool(v *Value) bool {
  8693  	// match: (ConstBool [c])
  8694  	// result: (MOVLconst [b2i32(c)])
  8695  	for {
  8696  		c := auxIntToBool(v.AuxInt)
  8697  		v.reset(Op386MOVLconst)
  8698  		v.AuxInt = int32ToAuxInt(b2i32(c))
  8699  		return true
  8700  	}
  8701  }
  8702  func rewriteValue386_OpConstNil(v *Value) bool {
  8703  	// match: (ConstNil)
  8704  	// result: (MOVLconst [0])
  8705  	for {
  8706  		v.reset(Op386MOVLconst)
  8707  		v.AuxInt = int32ToAuxInt(0)
  8708  		return true
  8709  	}
  8710  }
  8711  func rewriteValue386_OpCtz16(v *Value) bool {
  8712  	v_0 := v.Args[0]
  8713  	b := v.Block
  8714  	typ := &b.Func.Config.Types
  8715  	// match: (Ctz16 x)
  8716  	// result: (BSFL (ORLconst <typ.UInt32> [0x10000] x))
  8717  	for {
  8718  		x := v_0
  8719  		v.reset(Op386BSFL)
  8720  		v0 := b.NewValue0(v.Pos, Op386ORLconst, typ.UInt32)
  8721  		v0.AuxInt = int32ToAuxInt(0x10000)
  8722  		v0.AddArg(x)
  8723  		v.AddArg(v0)
  8724  		return true
  8725  	}
  8726  }
  8727  func rewriteValue386_OpDiv8(v *Value) bool {
  8728  	v_1 := v.Args[1]
  8729  	v_0 := v.Args[0]
  8730  	b := v.Block
  8731  	typ := &b.Func.Config.Types
  8732  	// match: (Div8 x y)
  8733  	// result: (DIVW (SignExt8to16 x) (SignExt8to16 y))
  8734  	for {
  8735  		x := v_0
  8736  		y := v_1
  8737  		v.reset(Op386DIVW)
  8738  		v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  8739  		v0.AddArg(x)
  8740  		v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  8741  		v1.AddArg(y)
  8742  		v.AddArg2(v0, v1)
  8743  		return true
  8744  	}
  8745  }
  8746  func rewriteValue386_OpDiv8u(v *Value) bool {
  8747  	v_1 := v.Args[1]
  8748  	v_0 := v.Args[0]
  8749  	b := v.Block
  8750  	typ := &b.Func.Config.Types
  8751  	// match: (Div8u x y)
  8752  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  8753  	for {
  8754  		x := v_0
  8755  		y := v_1
  8756  		v.reset(Op386DIVWU)
  8757  		v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  8758  		v0.AddArg(x)
  8759  		v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  8760  		v1.AddArg(y)
  8761  		v.AddArg2(v0, v1)
  8762  		return true
  8763  	}
  8764  }
  8765  func rewriteValue386_OpEq16(v *Value) bool {
  8766  	v_1 := v.Args[1]
  8767  	v_0 := v.Args[0]
  8768  	b := v.Block
  8769  	// match: (Eq16 x y)
  8770  	// result: (SETEQ (CMPW x y))
  8771  	for {
  8772  		x := v_0
  8773  		y := v_1
  8774  		v.reset(Op386SETEQ)
  8775  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8776  		v0.AddArg2(x, y)
  8777  		v.AddArg(v0)
  8778  		return true
  8779  	}
  8780  }
  8781  func rewriteValue386_OpEq32(v *Value) bool {
  8782  	v_1 := v.Args[1]
  8783  	v_0 := v.Args[0]
  8784  	b := v.Block
  8785  	// match: (Eq32 x y)
  8786  	// result: (SETEQ (CMPL x y))
  8787  	for {
  8788  		x := v_0
  8789  		y := v_1
  8790  		v.reset(Op386SETEQ)
  8791  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8792  		v0.AddArg2(x, y)
  8793  		v.AddArg(v0)
  8794  		return true
  8795  	}
  8796  }
  8797  func rewriteValue386_OpEq32F(v *Value) bool {
  8798  	v_1 := v.Args[1]
  8799  	v_0 := v.Args[0]
  8800  	b := v.Block
  8801  	// match: (Eq32F x y)
  8802  	// result: (SETEQF (UCOMISS x y))
  8803  	for {
  8804  		x := v_0
  8805  		y := v_1
  8806  		v.reset(Op386SETEQF)
  8807  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  8808  		v0.AddArg2(x, y)
  8809  		v.AddArg(v0)
  8810  		return true
  8811  	}
  8812  }
  8813  func rewriteValue386_OpEq64F(v *Value) bool {
  8814  	v_1 := v.Args[1]
  8815  	v_0 := v.Args[0]
  8816  	b := v.Block
  8817  	// match: (Eq64F x y)
  8818  	// result: (SETEQF (UCOMISD x y))
  8819  	for {
  8820  		x := v_0
  8821  		y := v_1
  8822  		v.reset(Op386SETEQF)
  8823  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  8824  		v0.AddArg2(x, y)
  8825  		v.AddArg(v0)
  8826  		return true
  8827  	}
  8828  }
  8829  func rewriteValue386_OpEq8(v *Value) bool {
  8830  	v_1 := v.Args[1]
  8831  	v_0 := v.Args[0]
  8832  	b := v.Block
  8833  	// match: (Eq8 x y)
  8834  	// result: (SETEQ (CMPB x y))
  8835  	for {
  8836  		x := v_0
  8837  		y := v_1
  8838  		v.reset(Op386SETEQ)
  8839  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8840  		v0.AddArg2(x, y)
  8841  		v.AddArg(v0)
  8842  		return true
  8843  	}
  8844  }
  8845  func rewriteValue386_OpEqB(v *Value) bool {
  8846  	v_1 := v.Args[1]
  8847  	v_0 := v.Args[0]
  8848  	b := v.Block
  8849  	// match: (EqB x y)
  8850  	// result: (SETEQ (CMPB x y))
  8851  	for {
  8852  		x := v_0
  8853  		y := v_1
  8854  		v.reset(Op386SETEQ)
  8855  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8856  		v0.AddArg2(x, y)
  8857  		v.AddArg(v0)
  8858  		return true
  8859  	}
  8860  }
  8861  func rewriteValue386_OpEqPtr(v *Value) bool {
  8862  	v_1 := v.Args[1]
  8863  	v_0 := v.Args[0]
  8864  	b := v.Block
  8865  	// match: (EqPtr x y)
  8866  	// result: (SETEQ (CMPL x y))
  8867  	for {
  8868  		x := v_0
  8869  		y := v_1
  8870  		v.reset(Op386SETEQ)
  8871  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8872  		v0.AddArg2(x, y)
  8873  		v.AddArg(v0)
  8874  		return true
  8875  	}
  8876  }
  8877  func rewriteValue386_OpIsInBounds(v *Value) bool {
  8878  	v_1 := v.Args[1]
  8879  	v_0 := v.Args[0]
  8880  	b := v.Block
  8881  	// match: (IsInBounds idx len)
  8882  	// result: (SETB (CMPL idx len))
  8883  	for {
  8884  		idx := v_0
  8885  		len := v_1
  8886  		v.reset(Op386SETB)
  8887  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8888  		v0.AddArg2(idx, len)
  8889  		v.AddArg(v0)
  8890  		return true
  8891  	}
  8892  }
  8893  func rewriteValue386_OpIsNonNil(v *Value) bool {
  8894  	v_0 := v.Args[0]
  8895  	b := v.Block
  8896  	// match: (IsNonNil p)
  8897  	// result: (SETNE (TESTL p p))
  8898  	for {
  8899  		p := v_0
  8900  		v.reset(Op386SETNE)
  8901  		v0 := b.NewValue0(v.Pos, Op386TESTL, types.TypeFlags)
  8902  		v0.AddArg2(p, p)
  8903  		v.AddArg(v0)
  8904  		return true
  8905  	}
  8906  }
  8907  func rewriteValue386_OpIsSliceInBounds(v *Value) bool {
  8908  	v_1 := v.Args[1]
  8909  	v_0 := v.Args[0]
  8910  	b := v.Block
  8911  	// match: (IsSliceInBounds idx len)
  8912  	// result: (SETBE (CMPL idx len))
  8913  	for {
  8914  		idx := v_0
  8915  		len := v_1
  8916  		v.reset(Op386SETBE)
  8917  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8918  		v0.AddArg2(idx, len)
  8919  		v.AddArg(v0)
  8920  		return true
  8921  	}
  8922  }
  8923  func rewriteValue386_OpLeq16(v *Value) bool {
  8924  	v_1 := v.Args[1]
  8925  	v_0 := v.Args[0]
  8926  	b := v.Block
  8927  	// match: (Leq16 x y)
  8928  	// result: (SETLE (CMPW x y))
  8929  	for {
  8930  		x := v_0
  8931  		y := v_1
  8932  		v.reset(Op386SETLE)
  8933  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8934  		v0.AddArg2(x, y)
  8935  		v.AddArg(v0)
  8936  		return true
  8937  	}
  8938  }
  8939  func rewriteValue386_OpLeq16U(v *Value) bool {
  8940  	v_1 := v.Args[1]
  8941  	v_0 := v.Args[0]
  8942  	b := v.Block
  8943  	// match: (Leq16U x y)
  8944  	// result: (SETBE (CMPW x y))
  8945  	for {
  8946  		x := v_0
  8947  		y := v_1
  8948  		v.reset(Op386SETBE)
  8949  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8950  		v0.AddArg2(x, y)
  8951  		v.AddArg(v0)
  8952  		return true
  8953  	}
  8954  }
  8955  func rewriteValue386_OpLeq32(v *Value) bool {
  8956  	v_1 := v.Args[1]
  8957  	v_0 := v.Args[0]
  8958  	b := v.Block
  8959  	// match: (Leq32 x y)
  8960  	// result: (SETLE (CMPL x y))
  8961  	for {
  8962  		x := v_0
  8963  		y := v_1
  8964  		v.reset(Op386SETLE)
  8965  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8966  		v0.AddArg2(x, y)
  8967  		v.AddArg(v0)
  8968  		return true
  8969  	}
  8970  }
  8971  func rewriteValue386_OpLeq32F(v *Value) bool {
  8972  	v_1 := v.Args[1]
  8973  	v_0 := v.Args[0]
  8974  	b := v.Block
  8975  	// match: (Leq32F x y)
  8976  	// result: (SETGEF (UCOMISS y x))
  8977  	for {
  8978  		x := v_0
  8979  		y := v_1
  8980  		v.reset(Op386SETGEF)
  8981  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  8982  		v0.AddArg2(y, x)
  8983  		v.AddArg(v0)
  8984  		return true
  8985  	}
  8986  }
  8987  func rewriteValue386_OpLeq32U(v *Value) bool {
  8988  	v_1 := v.Args[1]
  8989  	v_0 := v.Args[0]
  8990  	b := v.Block
  8991  	// match: (Leq32U x y)
  8992  	// result: (SETBE (CMPL x y))
  8993  	for {
  8994  		x := v_0
  8995  		y := v_1
  8996  		v.reset(Op386SETBE)
  8997  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8998  		v0.AddArg2(x, y)
  8999  		v.AddArg(v0)
  9000  		return true
  9001  	}
  9002  }
  9003  func rewriteValue386_OpLeq64F(v *Value) bool {
  9004  	v_1 := v.Args[1]
  9005  	v_0 := v.Args[0]
  9006  	b := v.Block
  9007  	// match: (Leq64F x y)
  9008  	// result: (SETGEF (UCOMISD y x))
  9009  	for {
  9010  		x := v_0
  9011  		y := v_1
  9012  		v.reset(Op386SETGEF)
  9013  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  9014  		v0.AddArg2(y, x)
  9015  		v.AddArg(v0)
  9016  		return true
  9017  	}
  9018  }
  9019  func rewriteValue386_OpLeq8(v *Value) bool {
  9020  	v_1 := v.Args[1]
  9021  	v_0 := v.Args[0]
  9022  	b := v.Block
  9023  	// match: (Leq8 x y)
  9024  	// result: (SETLE (CMPB x y))
  9025  	for {
  9026  		x := v_0
  9027  		y := v_1
  9028  		v.reset(Op386SETLE)
  9029  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9030  		v0.AddArg2(x, y)
  9031  		v.AddArg(v0)
  9032  		return true
  9033  	}
  9034  }
  9035  func rewriteValue386_OpLeq8U(v *Value) bool {
  9036  	v_1 := v.Args[1]
  9037  	v_0 := v.Args[0]
  9038  	b := v.Block
  9039  	// match: (Leq8U x y)
  9040  	// result: (SETBE (CMPB x y))
  9041  	for {
  9042  		x := v_0
  9043  		y := v_1
  9044  		v.reset(Op386SETBE)
  9045  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9046  		v0.AddArg2(x, y)
  9047  		v.AddArg(v0)
  9048  		return true
  9049  	}
  9050  }
  9051  func rewriteValue386_OpLess16(v *Value) bool {
  9052  	v_1 := v.Args[1]
  9053  	v_0 := v.Args[0]
  9054  	b := v.Block
  9055  	// match: (Less16 x y)
  9056  	// result: (SETL (CMPW x y))
  9057  	for {
  9058  		x := v_0
  9059  		y := v_1
  9060  		v.reset(Op386SETL)
  9061  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  9062  		v0.AddArg2(x, y)
  9063  		v.AddArg(v0)
  9064  		return true
  9065  	}
  9066  }
  9067  func rewriteValue386_OpLess16U(v *Value) bool {
  9068  	v_1 := v.Args[1]
  9069  	v_0 := v.Args[0]
  9070  	b := v.Block
  9071  	// match: (Less16U x y)
  9072  	// result: (SETB (CMPW x y))
  9073  	for {
  9074  		x := v_0
  9075  		y := v_1
  9076  		v.reset(Op386SETB)
  9077  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  9078  		v0.AddArg2(x, y)
  9079  		v.AddArg(v0)
  9080  		return true
  9081  	}
  9082  }
  9083  func rewriteValue386_OpLess32(v *Value) bool {
  9084  	v_1 := v.Args[1]
  9085  	v_0 := v.Args[0]
  9086  	b := v.Block
  9087  	// match: (Less32 x y)
  9088  	// result: (SETL (CMPL x y))
  9089  	for {
  9090  		x := v_0
  9091  		y := v_1
  9092  		v.reset(Op386SETL)
  9093  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9094  		v0.AddArg2(x, y)
  9095  		v.AddArg(v0)
  9096  		return true
  9097  	}
  9098  }
  9099  func rewriteValue386_OpLess32F(v *Value) bool {
  9100  	v_1 := v.Args[1]
  9101  	v_0 := v.Args[0]
  9102  	b := v.Block
  9103  	// match: (Less32F x y)
  9104  	// result: (SETGF (UCOMISS y x))
  9105  	for {
  9106  		x := v_0
  9107  		y := v_1
  9108  		v.reset(Op386SETGF)
  9109  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  9110  		v0.AddArg2(y, x)
  9111  		v.AddArg(v0)
  9112  		return true
  9113  	}
  9114  }
  9115  func rewriteValue386_OpLess32U(v *Value) bool {
  9116  	v_1 := v.Args[1]
  9117  	v_0 := v.Args[0]
  9118  	b := v.Block
  9119  	// match: (Less32U x y)
  9120  	// result: (SETB (CMPL x y))
  9121  	for {
  9122  		x := v_0
  9123  		y := v_1
  9124  		v.reset(Op386SETB)
  9125  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9126  		v0.AddArg2(x, y)
  9127  		v.AddArg(v0)
  9128  		return true
  9129  	}
  9130  }
  9131  func rewriteValue386_OpLess64F(v *Value) bool {
  9132  	v_1 := v.Args[1]
  9133  	v_0 := v.Args[0]
  9134  	b := v.Block
  9135  	// match: (Less64F x y)
  9136  	// result: (SETGF (UCOMISD y x))
  9137  	for {
  9138  		x := v_0
  9139  		y := v_1
  9140  		v.reset(Op386SETGF)
  9141  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  9142  		v0.AddArg2(y, x)
  9143  		v.AddArg(v0)
  9144  		return true
  9145  	}
  9146  }
  9147  func rewriteValue386_OpLess8(v *Value) bool {
  9148  	v_1 := v.Args[1]
  9149  	v_0 := v.Args[0]
  9150  	b := v.Block
  9151  	// match: (Less8 x y)
  9152  	// result: (SETL (CMPB x y))
  9153  	for {
  9154  		x := v_0
  9155  		y := v_1
  9156  		v.reset(Op386SETL)
  9157  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9158  		v0.AddArg2(x, y)
  9159  		v.AddArg(v0)
  9160  		return true
  9161  	}
  9162  }
  9163  func rewriteValue386_OpLess8U(v *Value) bool {
  9164  	v_1 := v.Args[1]
  9165  	v_0 := v.Args[0]
  9166  	b := v.Block
  9167  	// match: (Less8U x y)
  9168  	// result: (SETB (CMPB x y))
  9169  	for {
  9170  		x := v_0
  9171  		y := v_1
  9172  		v.reset(Op386SETB)
  9173  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9174  		v0.AddArg2(x, y)
  9175  		v.AddArg(v0)
  9176  		return true
  9177  	}
  9178  }
  9179  func rewriteValue386_OpLoad(v *Value) bool {
  9180  	v_1 := v.Args[1]
  9181  	v_0 := v.Args[0]
  9182  	// match: (Load <t> ptr mem)
  9183  	// cond: (is32BitInt(t) || isPtr(t))
  9184  	// result: (MOVLload ptr mem)
  9185  	for {
  9186  		t := v.Type
  9187  		ptr := v_0
  9188  		mem := v_1
  9189  		if !(is32BitInt(t) || isPtr(t)) {
  9190  			break
  9191  		}
  9192  		v.reset(Op386MOVLload)
  9193  		v.AddArg2(ptr, mem)
  9194  		return true
  9195  	}
  9196  	// match: (Load <t> ptr mem)
  9197  	// cond: is16BitInt(t)
  9198  	// result: (MOVWload ptr mem)
  9199  	for {
  9200  		t := v.Type
  9201  		ptr := v_0
  9202  		mem := v_1
  9203  		if !(is16BitInt(t)) {
  9204  			break
  9205  		}
  9206  		v.reset(Op386MOVWload)
  9207  		v.AddArg2(ptr, mem)
  9208  		return true
  9209  	}
  9210  	// match: (Load <t> ptr mem)
  9211  	// cond: (t.IsBoolean() || is8BitInt(t))
  9212  	// result: (MOVBload ptr mem)
  9213  	for {
  9214  		t := v.Type
  9215  		ptr := v_0
  9216  		mem := v_1
  9217  		if !(t.IsBoolean() || is8BitInt(t)) {
  9218  			break
  9219  		}
  9220  		v.reset(Op386MOVBload)
  9221  		v.AddArg2(ptr, mem)
  9222  		return true
  9223  	}
  9224  	// match: (Load <t> ptr mem)
  9225  	// cond: is32BitFloat(t)
  9226  	// result: (MOVSSload ptr mem)
  9227  	for {
  9228  		t := v.Type
  9229  		ptr := v_0
  9230  		mem := v_1
  9231  		if !(is32BitFloat(t)) {
  9232  			break
  9233  		}
  9234  		v.reset(Op386MOVSSload)
  9235  		v.AddArg2(ptr, mem)
  9236  		return true
  9237  	}
  9238  	// match: (Load <t> ptr mem)
  9239  	// cond: is64BitFloat(t)
  9240  	// result: (MOVSDload ptr mem)
  9241  	for {
  9242  		t := v.Type
  9243  		ptr := v_0
  9244  		mem := v_1
  9245  		if !(is64BitFloat(t)) {
  9246  			break
  9247  		}
  9248  		v.reset(Op386MOVSDload)
  9249  		v.AddArg2(ptr, mem)
  9250  		return true
  9251  	}
  9252  	return false
  9253  }
  9254  func rewriteValue386_OpLocalAddr(v *Value) bool {
  9255  	v_0 := v.Args[0]
  9256  	// match: (LocalAddr {sym} base _)
  9257  	// result: (LEAL {sym} base)
  9258  	for {
  9259  		sym := auxToSym(v.Aux)
  9260  		base := v_0
  9261  		v.reset(Op386LEAL)
  9262  		v.Aux = symToAux(sym)
  9263  		v.AddArg(base)
  9264  		return true
  9265  	}
  9266  }
  9267  func rewriteValue386_OpLsh16x16(v *Value) bool {
  9268  	v_1 := v.Args[1]
  9269  	v_0 := v.Args[0]
  9270  	b := v.Block
  9271  	// match: (Lsh16x16 <t> x y)
  9272  	// cond: !shiftIsBounded(v)
  9273  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9274  	for {
  9275  		t := v.Type
  9276  		x := v_0
  9277  		y := v_1
  9278  		if !(!shiftIsBounded(v)) {
  9279  			break
  9280  		}
  9281  		v.reset(Op386ANDL)
  9282  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9283  		v0.AddArg2(x, y)
  9284  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9285  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9286  		v2.AuxInt = int16ToAuxInt(32)
  9287  		v2.AddArg(y)
  9288  		v1.AddArg(v2)
  9289  		v.AddArg2(v0, v1)
  9290  		return true
  9291  	}
  9292  	// match: (Lsh16x16 <t> x y)
  9293  	// cond: shiftIsBounded(v)
  9294  	// result: (SHLL <t> x y)
  9295  	for {
  9296  		t := v.Type
  9297  		x := v_0
  9298  		y := v_1
  9299  		if !(shiftIsBounded(v)) {
  9300  			break
  9301  		}
  9302  		v.reset(Op386SHLL)
  9303  		v.Type = t
  9304  		v.AddArg2(x, y)
  9305  		return true
  9306  	}
  9307  	return false
  9308  }
  9309  func rewriteValue386_OpLsh16x32(v *Value) bool {
  9310  	v_1 := v.Args[1]
  9311  	v_0 := v.Args[0]
  9312  	b := v.Block
  9313  	// match: (Lsh16x32 <t> x y)
  9314  	// cond: !shiftIsBounded(v)
  9315  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9316  	for {
  9317  		t := v.Type
  9318  		x := v_0
  9319  		y := v_1
  9320  		if !(!shiftIsBounded(v)) {
  9321  			break
  9322  		}
  9323  		v.reset(Op386ANDL)
  9324  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9325  		v0.AddArg2(x, y)
  9326  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9327  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9328  		v2.AuxInt = int32ToAuxInt(32)
  9329  		v2.AddArg(y)
  9330  		v1.AddArg(v2)
  9331  		v.AddArg2(v0, v1)
  9332  		return true
  9333  	}
  9334  	// match: (Lsh16x32 <t> x y)
  9335  	// cond: shiftIsBounded(v)
  9336  	// result: (SHLL <t> x y)
  9337  	for {
  9338  		t := v.Type
  9339  		x := v_0
  9340  		y := v_1
  9341  		if !(shiftIsBounded(v)) {
  9342  			break
  9343  		}
  9344  		v.reset(Op386SHLL)
  9345  		v.Type = t
  9346  		v.AddArg2(x, y)
  9347  		return true
  9348  	}
  9349  	return false
  9350  }
  9351  func rewriteValue386_OpLsh16x64(v *Value) bool {
  9352  	v_1 := v.Args[1]
  9353  	v_0 := v.Args[0]
  9354  	// match: (Lsh16x64 x (Const64 [c]))
  9355  	// cond: uint64(c) < 16
  9356  	// result: (SHLLconst x [int32(c)])
  9357  	for {
  9358  		x := v_0
  9359  		if v_1.Op != OpConst64 {
  9360  			break
  9361  		}
  9362  		c := auxIntToInt64(v_1.AuxInt)
  9363  		if !(uint64(c) < 16) {
  9364  			break
  9365  		}
  9366  		v.reset(Op386SHLLconst)
  9367  		v.AuxInt = int32ToAuxInt(int32(c))
  9368  		v.AddArg(x)
  9369  		return true
  9370  	}
  9371  	// match: (Lsh16x64 _ (Const64 [c]))
  9372  	// cond: uint64(c) >= 16
  9373  	// result: (Const16 [0])
  9374  	for {
  9375  		if v_1.Op != OpConst64 {
  9376  			break
  9377  		}
  9378  		c := auxIntToInt64(v_1.AuxInt)
  9379  		if !(uint64(c) >= 16) {
  9380  			break
  9381  		}
  9382  		v.reset(OpConst16)
  9383  		v.AuxInt = int16ToAuxInt(0)
  9384  		return true
  9385  	}
  9386  	return false
  9387  }
  9388  func rewriteValue386_OpLsh16x8(v *Value) bool {
  9389  	v_1 := v.Args[1]
  9390  	v_0 := v.Args[0]
  9391  	b := v.Block
  9392  	// match: (Lsh16x8 <t> x y)
  9393  	// cond: !shiftIsBounded(v)
  9394  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9395  	for {
  9396  		t := v.Type
  9397  		x := v_0
  9398  		y := v_1
  9399  		if !(!shiftIsBounded(v)) {
  9400  			break
  9401  		}
  9402  		v.reset(Op386ANDL)
  9403  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9404  		v0.AddArg2(x, y)
  9405  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9406  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9407  		v2.AuxInt = int8ToAuxInt(32)
  9408  		v2.AddArg(y)
  9409  		v1.AddArg(v2)
  9410  		v.AddArg2(v0, v1)
  9411  		return true
  9412  	}
  9413  	// match: (Lsh16x8 <t> x y)
  9414  	// cond: shiftIsBounded(v)
  9415  	// result: (SHLL <t> x y)
  9416  	for {
  9417  		t := v.Type
  9418  		x := v_0
  9419  		y := v_1
  9420  		if !(shiftIsBounded(v)) {
  9421  			break
  9422  		}
  9423  		v.reset(Op386SHLL)
  9424  		v.Type = t
  9425  		v.AddArg2(x, y)
  9426  		return true
  9427  	}
  9428  	return false
  9429  }
  9430  func rewriteValue386_OpLsh32x16(v *Value) bool {
  9431  	v_1 := v.Args[1]
  9432  	v_0 := v.Args[0]
  9433  	b := v.Block
  9434  	// match: (Lsh32x16 <t> x y)
  9435  	// cond: !shiftIsBounded(v)
  9436  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9437  	for {
  9438  		t := v.Type
  9439  		x := v_0
  9440  		y := v_1
  9441  		if !(!shiftIsBounded(v)) {
  9442  			break
  9443  		}
  9444  		v.reset(Op386ANDL)
  9445  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9446  		v0.AddArg2(x, y)
  9447  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9448  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9449  		v2.AuxInt = int16ToAuxInt(32)
  9450  		v2.AddArg(y)
  9451  		v1.AddArg(v2)
  9452  		v.AddArg2(v0, v1)
  9453  		return true
  9454  	}
  9455  	// match: (Lsh32x16 <t> x y)
  9456  	// cond: shiftIsBounded(v)
  9457  	// result: (SHLL <t> x y)
  9458  	for {
  9459  		t := v.Type
  9460  		x := v_0
  9461  		y := v_1
  9462  		if !(shiftIsBounded(v)) {
  9463  			break
  9464  		}
  9465  		v.reset(Op386SHLL)
  9466  		v.Type = t
  9467  		v.AddArg2(x, y)
  9468  		return true
  9469  	}
  9470  	return false
  9471  }
  9472  func rewriteValue386_OpLsh32x32(v *Value) bool {
  9473  	v_1 := v.Args[1]
  9474  	v_0 := v.Args[0]
  9475  	b := v.Block
  9476  	// match: (Lsh32x32 <t> x y)
  9477  	// cond: !shiftIsBounded(v)
  9478  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9479  	for {
  9480  		t := v.Type
  9481  		x := v_0
  9482  		y := v_1
  9483  		if !(!shiftIsBounded(v)) {
  9484  			break
  9485  		}
  9486  		v.reset(Op386ANDL)
  9487  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9488  		v0.AddArg2(x, y)
  9489  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9490  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9491  		v2.AuxInt = int32ToAuxInt(32)
  9492  		v2.AddArg(y)
  9493  		v1.AddArg(v2)
  9494  		v.AddArg2(v0, v1)
  9495  		return true
  9496  	}
  9497  	// match: (Lsh32x32 <t> x y)
  9498  	// cond: shiftIsBounded(v)
  9499  	// result: (SHLL <t> x y)
  9500  	for {
  9501  		t := v.Type
  9502  		x := v_0
  9503  		y := v_1
  9504  		if !(shiftIsBounded(v)) {
  9505  			break
  9506  		}
  9507  		v.reset(Op386SHLL)
  9508  		v.Type = t
  9509  		v.AddArg2(x, y)
  9510  		return true
  9511  	}
  9512  	return false
  9513  }
  9514  func rewriteValue386_OpLsh32x64(v *Value) bool {
  9515  	v_1 := v.Args[1]
  9516  	v_0 := v.Args[0]
  9517  	// match: (Lsh32x64 x (Const64 [c]))
  9518  	// cond: uint64(c) < 32
  9519  	// result: (SHLLconst x [int32(c)])
  9520  	for {
  9521  		x := v_0
  9522  		if v_1.Op != OpConst64 {
  9523  			break
  9524  		}
  9525  		c := auxIntToInt64(v_1.AuxInt)
  9526  		if !(uint64(c) < 32) {
  9527  			break
  9528  		}
  9529  		v.reset(Op386SHLLconst)
  9530  		v.AuxInt = int32ToAuxInt(int32(c))
  9531  		v.AddArg(x)
  9532  		return true
  9533  	}
  9534  	// match: (Lsh32x64 _ (Const64 [c]))
  9535  	// cond: uint64(c) >= 32
  9536  	// result: (Const32 [0])
  9537  	for {
  9538  		if v_1.Op != OpConst64 {
  9539  			break
  9540  		}
  9541  		c := auxIntToInt64(v_1.AuxInt)
  9542  		if !(uint64(c) >= 32) {
  9543  			break
  9544  		}
  9545  		v.reset(OpConst32)
  9546  		v.AuxInt = int32ToAuxInt(0)
  9547  		return true
  9548  	}
  9549  	return false
  9550  }
  9551  func rewriteValue386_OpLsh32x8(v *Value) bool {
  9552  	v_1 := v.Args[1]
  9553  	v_0 := v.Args[0]
  9554  	b := v.Block
  9555  	// match: (Lsh32x8 <t> x y)
  9556  	// cond: !shiftIsBounded(v)
  9557  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9558  	for {
  9559  		t := v.Type
  9560  		x := v_0
  9561  		y := v_1
  9562  		if !(!shiftIsBounded(v)) {
  9563  			break
  9564  		}
  9565  		v.reset(Op386ANDL)
  9566  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9567  		v0.AddArg2(x, y)
  9568  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9569  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9570  		v2.AuxInt = int8ToAuxInt(32)
  9571  		v2.AddArg(y)
  9572  		v1.AddArg(v2)
  9573  		v.AddArg2(v0, v1)
  9574  		return true
  9575  	}
  9576  	// match: (Lsh32x8 <t> x y)
  9577  	// cond: shiftIsBounded(v)
  9578  	// result: (SHLL <t> x y)
  9579  	for {
  9580  		t := v.Type
  9581  		x := v_0
  9582  		y := v_1
  9583  		if !(shiftIsBounded(v)) {
  9584  			break
  9585  		}
  9586  		v.reset(Op386SHLL)
  9587  		v.Type = t
  9588  		v.AddArg2(x, y)
  9589  		return true
  9590  	}
  9591  	return false
  9592  }
  9593  func rewriteValue386_OpLsh8x16(v *Value) bool {
  9594  	v_1 := v.Args[1]
  9595  	v_0 := v.Args[0]
  9596  	b := v.Block
  9597  	// match: (Lsh8x16 <t> x y)
  9598  	// cond: !shiftIsBounded(v)
  9599  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9600  	for {
  9601  		t := v.Type
  9602  		x := v_0
  9603  		y := v_1
  9604  		if !(!shiftIsBounded(v)) {
  9605  			break
  9606  		}
  9607  		v.reset(Op386ANDL)
  9608  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9609  		v0.AddArg2(x, y)
  9610  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9611  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9612  		v2.AuxInt = int16ToAuxInt(32)
  9613  		v2.AddArg(y)
  9614  		v1.AddArg(v2)
  9615  		v.AddArg2(v0, v1)
  9616  		return true
  9617  	}
  9618  	// match: (Lsh8x16 <t> x y)
  9619  	// cond: shiftIsBounded(v)
  9620  	// result: (SHLL <t> x y)
  9621  	for {
  9622  		t := v.Type
  9623  		x := v_0
  9624  		y := v_1
  9625  		if !(shiftIsBounded(v)) {
  9626  			break
  9627  		}
  9628  		v.reset(Op386SHLL)
  9629  		v.Type = t
  9630  		v.AddArg2(x, y)
  9631  		return true
  9632  	}
  9633  	return false
  9634  }
  9635  func rewriteValue386_OpLsh8x32(v *Value) bool {
  9636  	v_1 := v.Args[1]
  9637  	v_0 := v.Args[0]
  9638  	b := v.Block
  9639  	// match: (Lsh8x32 <t> x y)
  9640  	// cond: !shiftIsBounded(v)
  9641  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9642  	for {
  9643  		t := v.Type
  9644  		x := v_0
  9645  		y := v_1
  9646  		if !(!shiftIsBounded(v)) {
  9647  			break
  9648  		}
  9649  		v.reset(Op386ANDL)
  9650  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9651  		v0.AddArg2(x, y)
  9652  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9653  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9654  		v2.AuxInt = int32ToAuxInt(32)
  9655  		v2.AddArg(y)
  9656  		v1.AddArg(v2)
  9657  		v.AddArg2(v0, v1)
  9658  		return true
  9659  	}
  9660  	// match: (Lsh8x32 <t> x y)
  9661  	// cond: shiftIsBounded(v)
  9662  	// result: (SHLL <t> x y)
  9663  	for {
  9664  		t := v.Type
  9665  		x := v_0
  9666  		y := v_1
  9667  		if !(shiftIsBounded(v)) {
  9668  			break
  9669  		}
  9670  		v.reset(Op386SHLL)
  9671  		v.Type = t
  9672  		v.AddArg2(x, y)
  9673  		return true
  9674  	}
  9675  	return false
  9676  }
  9677  func rewriteValue386_OpLsh8x64(v *Value) bool {
  9678  	v_1 := v.Args[1]
  9679  	v_0 := v.Args[0]
  9680  	// match: (Lsh8x64 x (Const64 [c]))
  9681  	// cond: uint64(c) < 8
  9682  	// result: (SHLLconst x [int32(c)])
  9683  	for {
  9684  		x := v_0
  9685  		if v_1.Op != OpConst64 {
  9686  			break
  9687  		}
  9688  		c := auxIntToInt64(v_1.AuxInt)
  9689  		if !(uint64(c) < 8) {
  9690  			break
  9691  		}
  9692  		v.reset(Op386SHLLconst)
  9693  		v.AuxInt = int32ToAuxInt(int32(c))
  9694  		v.AddArg(x)
  9695  		return true
  9696  	}
  9697  	// match: (Lsh8x64 _ (Const64 [c]))
  9698  	// cond: uint64(c) >= 8
  9699  	// result: (Const8 [0])
  9700  	for {
  9701  		if v_1.Op != OpConst64 {
  9702  			break
  9703  		}
  9704  		c := auxIntToInt64(v_1.AuxInt)
  9705  		if !(uint64(c) >= 8) {
  9706  			break
  9707  		}
  9708  		v.reset(OpConst8)
  9709  		v.AuxInt = int8ToAuxInt(0)
  9710  		return true
  9711  	}
  9712  	return false
  9713  }
  9714  func rewriteValue386_OpLsh8x8(v *Value) bool {
  9715  	v_1 := v.Args[1]
  9716  	v_0 := v.Args[0]
  9717  	b := v.Block
  9718  	// match: (Lsh8x8 <t> x y)
  9719  	// cond: !shiftIsBounded(v)
  9720  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9721  	for {
  9722  		t := v.Type
  9723  		x := v_0
  9724  		y := v_1
  9725  		if !(!shiftIsBounded(v)) {
  9726  			break
  9727  		}
  9728  		v.reset(Op386ANDL)
  9729  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9730  		v0.AddArg2(x, y)
  9731  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9732  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9733  		v2.AuxInt = int8ToAuxInt(32)
  9734  		v2.AddArg(y)
  9735  		v1.AddArg(v2)
  9736  		v.AddArg2(v0, v1)
  9737  		return true
  9738  	}
  9739  	// match: (Lsh8x8 <t> x y)
  9740  	// cond: shiftIsBounded(v)
  9741  	// result: (SHLL <t> x y)
  9742  	for {
  9743  		t := v.Type
  9744  		x := v_0
  9745  		y := v_1
  9746  		if !(shiftIsBounded(v)) {
  9747  			break
  9748  		}
  9749  		v.reset(Op386SHLL)
  9750  		v.Type = t
  9751  		v.AddArg2(x, y)
  9752  		return true
  9753  	}
  9754  	return false
  9755  }
  9756  func rewriteValue386_OpMod8(v *Value) bool {
  9757  	v_1 := v.Args[1]
  9758  	v_0 := v.Args[0]
  9759  	b := v.Block
  9760  	typ := &b.Func.Config.Types
  9761  	// match: (Mod8 x y)
  9762  	// result: (MODW (SignExt8to16 x) (SignExt8to16 y))
  9763  	for {
  9764  		x := v_0
  9765  		y := v_1
  9766  		v.reset(Op386MODW)
  9767  		v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  9768  		v0.AddArg(x)
  9769  		v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  9770  		v1.AddArg(y)
  9771  		v.AddArg2(v0, v1)
  9772  		return true
  9773  	}
  9774  }
  9775  func rewriteValue386_OpMod8u(v *Value) bool {
  9776  	v_1 := v.Args[1]
  9777  	v_0 := v.Args[0]
  9778  	b := v.Block
  9779  	typ := &b.Func.Config.Types
  9780  	// match: (Mod8u x y)
  9781  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9782  	for {
  9783  		x := v_0
  9784  		y := v_1
  9785  		v.reset(Op386MODWU)
  9786  		v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  9787  		v0.AddArg(x)
  9788  		v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  9789  		v1.AddArg(y)
  9790  		v.AddArg2(v0, v1)
  9791  		return true
  9792  	}
  9793  }
  9794  func rewriteValue386_OpMove(v *Value) bool {
  9795  	v_2 := v.Args[2]
  9796  	v_1 := v.Args[1]
  9797  	v_0 := v.Args[0]
  9798  	b := v.Block
  9799  	config := b.Func.Config
  9800  	typ := &b.Func.Config.Types
  9801  	// match: (Move [0] _ _ mem)
  9802  	// result: mem
  9803  	for {
  9804  		if auxIntToInt64(v.AuxInt) != 0 {
  9805  			break
  9806  		}
  9807  		mem := v_2
  9808  		v.copyOf(mem)
  9809  		return true
  9810  	}
  9811  	// match: (Move [1] dst src mem)
  9812  	// result: (MOVBstore dst (MOVBload src mem) mem)
  9813  	for {
  9814  		if auxIntToInt64(v.AuxInt) != 1 {
  9815  			break
  9816  		}
  9817  		dst := v_0
  9818  		src := v_1
  9819  		mem := v_2
  9820  		v.reset(Op386MOVBstore)
  9821  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9822  		v0.AddArg2(src, mem)
  9823  		v.AddArg3(dst, v0, mem)
  9824  		return true
  9825  	}
  9826  	// match: (Move [2] dst src mem)
  9827  	// result: (MOVWstore dst (MOVWload src mem) mem)
  9828  	for {
  9829  		if auxIntToInt64(v.AuxInt) != 2 {
  9830  			break
  9831  		}
  9832  		dst := v_0
  9833  		src := v_1
  9834  		mem := v_2
  9835  		v.reset(Op386MOVWstore)
  9836  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9837  		v0.AddArg2(src, mem)
  9838  		v.AddArg3(dst, v0, mem)
  9839  		return true
  9840  	}
  9841  	// match: (Move [4] dst src mem)
  9842  	// result: (MOVLstore dst (MOVLload src mem) mem)
  9843  	for {
  9844  		if auxIntToInt64(v.AuxInt) != 4 {
  9845  			break
  9846  		}
  9847  		dst := v_0
  9848  		src := v_1
  9849  		mem := v_2
  9850  		v.reset(Op386MOVLstore)
  9851  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9852  		v0.AddArg2(src, mem)
  9853  		v.AddArg3(dst, v0, mem)
  9854  		return true
  9855  	}
  9856  	// match: (Move [3] dst src mem)
  9857  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) (MOVWstore dst (MOVWload src mem) mem))
  9858  	for {
  9859  		if auxIntToInt64(v.AuxInt) != 3 {
  9860  			break
  9861  		}
  9862  		dst := v_0
  9863  		src := v_1
  9864  		mem := v_2
  9865  		v.reset(Op386MOVBstore)
  9866  		v.AuxInt = int32ToAuxInt(2)
  9867  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9868  		v0.AuxInt = int32ToAuxInt(2)
  9869  		v0.AddArg2(src, mem)
  9870  		v1 := b.NewValue0(v.Pos, Op386MOVWstore, types.TypeMem)
  9871  		v2 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9872  		v2.AddArg2(src, mem)
  9873  		v1.AddArg3(dst, v2, mem)
  9874  		v.AddArg3(dst, v0, v1)
  9875  		return true
  9876  	}
  9877  	// match: (Move [5] dst src mem)
  9878  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9879  	for {
  9880  		if auxIntToInt64(v.AuxInt) != 5 {
  9881  			break
  9882  		}
  9883  		dst := v_0
  9884  		src := v_1
  9885  		mem := v_2
  9886  		v.reset(Op386MOVBstore)
  9887  		v.AuxInt = int32ToAuxInt(4)
  9888  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9889  		v0.AuxInt = int32ToAuxInt(4)
  9890  		v0.AddArg2(src, mem)
  9891  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9892  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9893  		v2.AddArg2(src, mem)
  9894  		v1.AddArg3(dst, v2, mem)
  9895  		v.AddArg3(dst, v0, v1)
  9896  		return true
  9897  	}
  9898  	// match: (Move [6] dst src mem)
  9899  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9900  	for {
  9901  		if auxIntToInt64(v.AuxInt) != 6 {
  9902  			break
  9903  		}
  9904  		dst := v_0
  9905  		src := v_1
  9906  		mem := v_2
  9907  		v.reset(Op386MOVWstore)
  9908  		v.AuxInt = int32ToAuxInt(4)
  9909  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9910  		v0.AuxInt = int32ToAuxInt(4)
  9911  		v0.AddArg2(src, mem)
  9912  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9913  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9914  		v2.AddArg2(src, mem)
  9915  		v1.AddArg3(dst, v2, mem)
  9916  		v.AddArg3(dst, v0, v1)
  9917  		return true
  9918  	}
  9919  	// match: (Move [7] dst src mem)
  9920  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9921  	for {
  9922  		if auxIntToInt64(v.AuxInt) != 7 {
  9923  			break
  9924  		}
  9925  		dst := v_0
  9926  		src := v_1
  9927  		mem := v_2
  9928  		v.reset(Op386MOVLstore)
  9929  		v.AuxInt = int32ToAuxInt(3)
  9930  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9931  		v0.AuxInt = int32ToAuxInt(3)
  9932  		v0.AddArg2(src, mem)
  9933  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9934  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9935  		v2.AddArg2(src, mem)
  9936  		v1.AddArg3(dst, v2, mem)
  9937  		v.AddArg3(dst, v0, v1)
  9938  		return true
  9939  	}
  9940  	// match: (Move [8] dst src mem)
  9941  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9942  	for {
  9943  		if auxIntToInt64(v.AuxInt) != 8 {
  9944  			break
  9945  		}
  9946  		dst := v_0
  9947  		src := v_1
  9948  		mem := v_2
  9949  		v.reset(Op386MOVLstore)
  9950  		v.AuxInt = int32ToAuxInt(4)
  9951  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9952  		v0.AuxInt = int32ToAuxInt(4)
  9953  		v0.AddArg2(src, mem)
  9954  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9955  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9956  		v2.AddArg2(src, mem)
  9957  		v1.AddArg3(dst, v2, mem)
  9958  		v.AddArg3(dst, v0, v1)
  9959  		return true
  9960  	}
  9961  	// match: (Move [s] dst src mem)
  9962  	// cond: s > 8 && s%4 != 0
  9963  	// 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))
  9964  	for {
  9965  		s := auxIntToInt64(v.AuxInt)
  9966  		dst := v_0
  9967  		src := v_1
  9968  		mem := v_2
  9969  		if !(s > 8 && s%4 != 0) {
  9970  			break
  9971  		}
  9972  		v.reset(OpMove)
  9973  		v.AuxInt = int64ToAuxInt(s - s%4)
  9974  		v0 := b.NewValue0(v.Pos, Op386ADDLconst, dst.Type)
  9975  		v0.AuxInt = int32ToAuxInt(int32(s % 4))
  9976  		v0.AddArg(dst)
  9977  		v1 := b.NewValue0(v.Pos, Op386ADDLconst, src.Type)
  9978  		v1.AuxInt = int32ToAuxInt(int32(s % 4))
  9979  		v1.AddArg(src)
  9980  		v2 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9981  		v3 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9982  		v3.AddArg2(src, mem)
  9983  		v2.AddArg3(dst, v3, mem)
  9984  		v.AddArg3(v0, v1, v2)
  9985  		return true
  9986  	}
  9987  	// match: (Move [s] dst src mem)
  9988  	// cond: s > 8 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice && logLargeCopy(v, s)
  9989  	// result: (DUFFCOPY [10*(128-s/4)] dst src mem)
  9990  	for {
  9991  		s := auxIntToInt64(v.AuxInt)
  9992  		dst := v_0
  9993  		src := v_1
  9994  		mem := v_2
  9995  		if !(s > 8 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice && logLargeCopy(v, s)) {
  9996  			break
  9997  		}
  9998  		v.reset(Op386DUFFCOPY)
  9999  		v.AuxInt = int64ToAuxInt(10 * (128 - s/4))
 10000  		v.AddArg3(dst, src, mem)
 10001  		return true
 10002  	}
 10003  	// match: (Move [s] dst src mem)
 10004  	// cond: (s > 4*128 || config.noDuffDevice) && s%4 == 0 && logLargeCopy(v, s)
 10005  	// result: (REPMOVSL dst src (MOVLconst [int32(s/4)]) mem)
 10006  	for {
 10007  		s := auxIntToInt64(v.AuxInt)
 10008  		dst := v_0
 10009  		src := v_1
 10010  		mem := v_2
 10011  		if !((s > 4*128 || config.noDuffDevice) && s%4 == 0 && logLargeCopy(v, s)) {
 10012  			break
 10013  		}
 10014  		v.reset(Op386REPMOVSL)
 10015  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 10016  		v0.AuxInt = int32ToAuxInt(int32(s / 4))
 10017  		v.AddArg4(dst, src, v0, mem)
 10018  		return true
 10019  	}
 10020  	return false
 10021  }
 10022  func rewriteValue386_OpNeg32F(v *Value) bool {
 10023  	v_0 := v.Args[0]
 10024  	b := v.Block
 10025  	typ := &b.Func.Config.Types
 10026  	// match: (Neg32F x)
 10027  	// result: (PXOR x (MOVSSconst <typ.Float32> [float32(math.Copysign(0, -1))]))
 10028  	for {
 10029  		x := v_0
 10030  		v.reset(Op386PXOR)
 10031  		v0 := b.NewValue0(v.Pos, Op386MOVSSconst, typ.Float32)
 10032  		v0.AuxInt = float32ToAuxInt(float32(math.Copysign(0, -1)))
 10033  		v.AddArg2(x, v0)
 10034  		return true
 10035  	}
 10036  }
 10037  func rewriteValue386_OpNeg64F(v *Value) bool {
 10038  	v_0 := v.Args[0]
 10039  	b := v.Block
 10040  	typ := &b.Func.Config.Types
 10041  	// match: (Neg64F x)
 10042  	// result: (PXOR x (MOVSDconst <typ.Float64> [math.Copysign(0, -1)]))
 10043  	for {
 10044  		x := v_0
 10045  		v.reset(Op386PXOR)
 10046  		v0 := b.NewValue0(v.Pos, Op386MOVSDconst, typ.Float64)
 10047  		v0.AuxInt = float64ToAuxInt(math.Copysign(0, -1))
 10048  		v.AddArg2(x, v0)
 10049  		return true
 10050  	}
 10051  }
 10052  func rewriteValue386_OpNeq16(v *Value) bool {
 10053  	v_1 := v.Args[1]
 10054  	v_0 := v.Args[0]
 10055  	b := v.Block
 10056  	// match: (Neq16 x y)
 10057  	// result: (SETNE (CMPW x y))
 10058  	for {
 10059  		x := v_0
 10060  		y := v_1
 10061  		v.reset(Op386SETNE)
 10062  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
 10063  		v0.AddArg2(x, y)
 10064  		v.AddArg(v0)
 10065  		return true
 10066  	}
 10067  }
 10068  func rewriteValue386_OpNeq32(v *Value) bool {
 10069  	v_1 := v.Args[1]
 10070  	v_0 := v.Args[0]
 10071  	b := v.Block
 10072  	// match: (Neq32 x y)
 10073  	// result: (SETNE (CMPL x y))
 10074  	for {
 10075  		x := v_0
 10076  		y := v_1
 10077  		v.reset(Op386SETNE)
 10078  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
 10079  		v0.AddArg2(x, y)
 10080  		v.AddArg(v0)
 10081  		return true
 10082  	}
 10083  }
 10084  func rewriteValue386_OpNeq32F(v *Value) bool {
 10085  	v_1 := v.Args[1]
 10086  	v_0 := v.Args[0]
 10087  	b := v.Block
 10088  	// match: (Neq32F x y)
 10089  	// result: (SETNEF (UCOMISS x y))
 10090  	for {
 10091  		x := v_0
 10092  		y := v_1
 10093  		v.reset(Op386SETNEF)
 10094  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
 10095  		v0.AddArg2(x, y)
 10096  		v.AddArg(v0)
 10097  		return true
 10098  	}
 10099  }
 10100  func rewriteValue386_OpNeq64F(v *Value) bool {
 10101  	v_1 := v.Args[1]
 10102  	v_0 := v.Args[0]
 10103  	b := v.Block
 10104  	// match: (Neq64F x y)
 10105  	// result: (SETNEF (UCOMISD x y))
 10106  	for {
 10107  		x := v_0
 10108  		y := v_1
 10109  		v.reset(Op386SETNEF)
 10110  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
 10111  		v0.AddArg2(x, y)
 10112  		v.AddArg(v0)
 10113  		return true
 10114  	}
 10115  }
 10116  func rewriteValue386_OpNeq8(v *Value) bool {
 10117  	v_1 := v.Args[1]
 10118  	v_0 := v.Args[0]
 10119  	b := v.Block
 10120  	// match: (Neq8 x y)
 10121  	// result: (SETNE (CMPB x y))
 10122  	for {
 10123  		x := v_0
 10124  		y := v_1
 10125  		v.reset(Op386SETNE)
 10126  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
 10127  		v0.AddArg2(x, y)
 10128  		v.AddArg(v0)
 10129  		return true
 10130  	}
 10131  }
 10132  func rewriteValue386_OpNeqB(v *Value) bool {
 10133  	v_1 := v.Args[1]
 10134  	v_0 := v.Args[0]
 10135  	b := v.Block
 10136  	// match: (NeqB x y)
 10137  	// result: (SETNE (CMPB x y))
 10138  	for {
 10139  		x := v_0
 10140  		y := v_1
 10141  		v.reset(Op386SETNE)
 10142  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
 10143  		v0.AddArg2(x, y)
 10144  		v.AddArg(v0)
 10145  		return true
 10146  	}
 10147  }
 10148  func rewriteValue386_OpNeqPtr(v *Value) bool {
 10149  	v_1 := v.Args[1]
 10150  	v_0 := v.Args[0]
 10151  	b := v.Block
 10152  	// match: (NeqPtr x y)
 10153  	// result: (SETNE (CMPL x y))
 10154  	for {
 10155  		x := v_0
 10156  		y := v_1
 10157  		v.reset(Op386SETNE)
 10158  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
 10159  		v0.AddArg2(x, y)
 10160  		v.AddArg(v0)
 10161  		return true
 10162  	}
 10163  }
 10164  func rewriteValue386_OpNot(v *Value) bool {
 10165  	v_0 := v.Args[0]
 10166  	// match: (Not x)
 10167  	// result: (XORLconst [1] x)
 10168  	for {
 10169  		x := v_0
 10170  		v.reset(Op386XORLconst)
 10171  		v.AuxInt = int32ToAuxInt(1)
 10172  		v.AddArg(x)
 10173  		return true
 10174  	}
 10175  }
 10176  func rewriteValue386_OpOffPtr(v *Value) bool {
 10177  	v_0 := v.Args[0]
 10178  	// match: (OffPtr [off] ptr)
 10179  	// result: (ADDLconst [int32(off)] ptr)
 10180  	for {
 10181  		off := auxIntToInt64(v.AuxInt)
 10182  		ptr := v_0
 10183  		v.reset(Op386ADDLconst)
 10184  		v.AuxInt = int32ToAuxInt(int32(off))
 10185  		v.AddArg(ptr)
 10186  		return true
 10187  	}
 10188  }
 10189  func rewriteValue386_OpPanicBounds(v *Value) bool {
 10190  	v_2 := v.Args[2]
 10191  	v_1 := v.Args[1]
 10192  	v_0 := v.Args[0]
 10193  	// match: (PanicBounds [kind] x y mem)
 10194  	// cond: boundsABI(kind) == 0
 10195  	// result: (LoweredPanicBoundsA [kind] x y mem)
 10196  	for {
 10197  		kind := auxIntToInt64(v.AuxInt)
 10198  		x := v_0
 10199  		y := v_1
 10200  		mem := v_2
 10201  		if !(boundsABI(kind) == 0) {
 10202  			break
 10203  		}
 10204  		v.reset(Op386LoweredPanicBoundsA)
 10205  		v.AuxInt = int64ToAuxInt(kind)
 10206  		v.AddArg3(x, y, mem)
 10207  		return true
 10208  	}
 10209  	// match: (PanicBounds [kind] x y mem)
 10210  	// cond: boundsABI(kind) == 1
 10211  	// result: (LoweredPanicBoundsB [kind] x y mem)
 10212  	for {
 10213  		kind := auxIntToInt64(v.AuxInt)
 10214  		x := v_0
 10215  		y := v_1
 10216  		mem := v_2
 10217  		if !(boundsABI(kind) == 1) {
 10218  			break
 10219  		}
 10220  		v.reset(Op386LoweredPanicBoundsB)
 10221  		v.AuxInt = int64ToAuxInt(kind)
 10222  		v.AddArg3(x, y, mem)
 10223  		return true
 10224  	}
 10225  	// match: (PanicBounds [kind] x y mem)
 10226  	// cond: boundsABI(kind) == 2
 10227  	// result: (LoweredPanicBoundsC [kind] x y mem)
 10228  	for {
 10229  		kind := auxIntToInt64(v.AuxInt)
 10230  		x := v_0
 10231  		y := v_1
 10232  		mem := v_2
 10233  		if !(boundsABI(kind) == 2) {
 10234  			break
 10235  		}
 10236  		v.reset(Op386LoweredPanicBoundsC)
 10237  		v.AuxInt = int64ToAuxInt(kind)
 10238  		v.AddArg3(x, y, mem)
 10239  		return true
 10240  	}
 10241  	return false
 10242  }
 10243  func rewriteValue386_OpPanicExtend(v *Value) bool {
 10244  	v_3 := v.Args[3]
 10245  	v_2 := v.Args[2]
 10246  	v_1 := v.Args[1]
 10247  	v_0 := v.Args[0]
 10248  	// match: (PanicExtend [kind] hi lo y mem)
 10249  	// cond: boundsABI(kind) == 0
 10250  	// result: (LoweredPanicExtendA [kind] hi lo y mem)
 10251  	for {
 10252  		kind := auxIntToInt64(v.AuxInt)
 10253  		hi := v_0
 10254  		lo := v_1
 10255  		y := v_2
 10256  		mem := v_3
 10257  		if !(boundsABI(kind) == 0) {
 10258  			break
 10259  		}
 10260  		v.reset(Op386LoweredPanicExtendA)
 10261  		v.AuxInt = int64ToAuxInt(kind)
 10262  		v.AddArg4(hi, lo, y, mem)
 10263  		return true
 10264  	}
 10265  	// match: (PanicExtend [kind] hi lo y mem)
 10266  	// cond: boundsABI(kind) == 1
 10267  	// result: (LoweredPanicExtendB [kind] hi lo y mem)
 10268  	for {
 10269  		kind := auxIntToInt64(v.AuxInt)
 10270  		hi := v_0
 10271  		lo := v_1
 10272  		y := v_2
 10273  		mem := v_3
 10274  		if !(boundsABI(kind) == 1) {
 10275  			break
 10276  		}
 10277  		v.reset(Op386LoweredPanicExtendB)
 10278  		v.AuxInt = int64ToAuxInt(kind)
 10279  		v.AddArg4(hi, lo, y, mem)
 10280  		return true
 10281  	}
 10282  	// match: (PanicExtend [kind] hi lo y mem)
 10283  	// cond: boundsABI(kind) == 2
 10284  	// result: (LoweredPanicExtendC [kind] hi lo y mem)
 10285  	for {
 10286  		kind := auxIntToInt64(v.AuxInt)
 10287  		hi := v_0
 10288  		lo := v_1
 10289  		y := v_2
 10290  		mem := v_3
 10291  		if !(boundsABI(kind) == 2) {
 10292  			break
 10293  		}
 10294  		v.reset(Op386LoweredPanicExtendC)
 10295  		v.AuxInt = int64ToAuxInt(kind)
 10296  		v.AddArg4(hi, lo, y, mem)
 10297  		return true
 10298  	}
 10299  	return false
 10300  }
 10301  func rewriteValue386_OpRotateLeft16(v *Value) bool {
 10302  	v_1 := v.Args[1]
 10303  	v_0 := v.Args[0]
 10304  	// match: (RotateLeft16 x (MOVLconst [c]))
 10305  	// result: (ROLWconst [int16(c&15)] x)
 10306  	for {
 10307  		x := v_0
 10308  		if v_1.Op != Op386MOVLconst {
 10309  			break
 10310  		}
 10311  		c := auxIntToInt32(v_1.AuxInt)
 10312  		v.reset(Op386ROLWconst)
 10313  		v.AuxInt = int16ToAuxInt(int16(c & 15))
 10314  		v.AddArg(x)
 10315  		return true
 10316  	}
 10317  	return false
 10318  }
 10319  func rewriteValue386_OpRotateLeft32(v *Value) bool {
 10320  	v_1 := v.Args[1]
 10321  	v_0 := v.Args[0]
 10322  	// match: (RotateLeft32 x (MOVLconst [c]))
 10323  	// result: (ROLLconst [c&31] x)
 10324  	for {
 10325  		x := v_0
 10326  		if v_1.Op != Op386MOVLconst {
 10327  			break
 10328  		}
 10329  		c := auxIntToInt32(v_1.AuxInt)
 10330  		v.reset(Op386ROLLconst)
 10331  		v.AuxInt = int32ToAuxInt(c & 31)
 10332  		v.AddArg(x)
 10333  		return true
 10334  	}
 10335  	return false
 10336  }
 10337  func rewriteValue386_OpRotateLeft8(v *Value) bool {
 10338  	v_1 := v.Args[1]
 10339  	v_0 := v.Args[0]
 10340  	// match: (RotateLeft8 x (MOVLconst [c]))
 10341  	// result: (ROLBconst [int8(c&7)] x)
 10342  	for {
 10343  		x := v_0
 10344  		if v_1.Op != Op386MOVLconst {
 10345  			break
 10346  		}
 10347  		c := auxIntToInt32(v_1.AuxInt)
 10348  		v.reset(Op386ROLBconst)
 10349  		v.AuxInt = int8ToAuxInt(int8(c & 7))
 10350  		v.AddArg(x)
 10351  		return true
 10352  	}
 10353  	return false
 10354  }
 10355  func rewriteValue386_OpRsh16Ux16(v *Value) bool {
 10356  	v_1 := v.Args[1]
 10357  	v_0 := v.Args[0]
 10358  	b := v.Block
 10359  	// match: (Rsh16Ux16 <t> x y)
 10360  	// cond: !shiftIsBounded(v)
 10361  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
 10362  	for {
 10363  		t := v.Type
 10364  		x := v_0
 10365  		y := v_1
 10366  		if !(!shiftIsBounded(v)) {
 10367  			break
 10368  		}
 10369  		v.reset(Op386ANDL)
 10370  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
 10371  		v0.AddArg2(x, y)
 10372  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10373  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10374  		v2.AuxInt = int16ToAuxInt(16)
 10375  		v2.AddArg(y)
 10376  		v1.AddArg(v2)
 10377  		v.AddArg2(v0, v1)
 10378  		return true
 10379  	}
 10380  	// match: (Rsh16Ux16 <t> x y)
 10381  	// cond: shiftIsBounded(v)
 10382  	// result: (SHRW <t> x y)
 10383  	for {
 10384  		t := v.Type
 10385  		x := v_0
 10386  		y := v_1
 10387  		if !(shiftIsBounded(v)) {
 10388  			break
 10389  		}
 10390  		v.reset(Op386SHRW)
 10391  		v.Type = t
 10392  		v.AddArg2(x, y)
 10393  		return true
 10394  	}
 10395  	return false
 10396  }
 10397  func rewriteValue386_OpRsh16Ux32(v *Value) bool {
 10398  	v_1 := v.Args[1]
 10399  	v_0 := v.Args[0]
 10400  	b := v.Block
 10401  	// match: (Rsh16Ux32 <t> x y)
 10402  	// cond: !shiftIsBounded(v)
 10403  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
 10404  	for {
 10405  		t := v.Type
 10406  		x := v_0
 10407  		y := v_1
 10408  		if !(!shiftIsBounded(v)) {
 10409  			break
 10410  		}
 10411  		v.reset(Op386ANDL)
 10412  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
 10413  		v0.AddArg2(x, y)
 10414  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10415  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10416  		v2.AuxInt = int32ToAuxInt(16)
 10417  		v2.AddArg(y)
 10418  		v1.AddArg(v2)
 10419  		v.AddArg2(v0, v1)
 10420  		return true
 10421  	}
 10422  	// match: (Rsh16Ux32 <t> x y)
 10423  	// cond: shiftIsBounded(v)
 10424  	// result: (SHRW <t> x y)
 10425  	for {
 10426  		t := v.Type
 10427  		x := v_0
 10428  		y := v_1
 10429  		if !(shiftIsBounded(v)) {
 10430  			break
 10431  		}
 10432  		v.reset(Op386SHRW)
 10433  		v.Type = t
 10434  		v.AddArg2(x, y)
 10435  		return true
 10436  	}
 10437  	return false
 10438  }
 10439  func rewriteValue386_OpRsh16Ux64(v *Value) bool {
 10440  	v_1 := v.Args[1]
 10441  	v_0 := v.Args[0]
 10442  	// match: (Rsh16Ux64 x (Const64 [c]))
 10443  	// cond: uint64(c) < 16
 10444  	// result: (SHRWconst x [int16(c)])
 10445  	for {
 10446  		x := v_0
 10447  		if v_1.Op != OpConst64 {
 10448  			break
 10449  		}
 10450  		c := auxIntToInt64(v_1.AuxInt)
 10451  		if !(uint64(c) < 16) {
 10452  			break
 10453  		}
 10454  		v.reset(Op386SHRWconst)
 10455  		v.AuxInt = int16ToAuxInt(int16(c))
 10456  		v.AddArg(x)
 10457  		return true
 10458  	}
 10459  	// match: (Rsh16Ux64 _ (Const64 [c]))
 10460  	// cond: uint64(c) >= 16
 10461  	// result: (Const16 [0])
 10462  	for {
 10463  		if v_1.Op != OpConst64 {
 10464  			break
 10465  		}
 10466  		c := auxIntToInt64(v_1.AuxInt)
 10467  		if !(uint64(c) >= 16) {
 10468  			break
 10469  		}
 10470  		v.reset(OpConst16)
 10471  		v.AuxInt = int16ToAuxInt(0)
 10472  		return true
 10473  	}
 10474  	return false
 10475  }
 10476  func rewriteValue386_OpRsh16Ux8(v *Value) bool {
 10477  	v_1 := v.Args[1]
 10478  	v_0 := v.Args[0]
 10479  	b := v.Block
 10480  	// match: (Rsh16Ux8 <t> x y)
 10481  	// cond: !shiftIsBounded(v)
 10482  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
 10483  	for {
 10484  		t := v.Type
 10485  		x := v_0
 10486  		y := v_1
 10487  		if !(!shiftIsBounded(v)) {
 10488  			break
 10489  		}
 10490  		v.reset(Op386ANDL)
 10491  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
 10492  		v0.AddArg2(x, y)
 10493  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10494  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10495  		v2.AuxInt = int8ToAuxInt(16)
 10496  		v2.AddArg(y)
 10497  		v1.AddArg(v2)
 10498  		v.AddArg2(v0, v1)
 10499  		return true
 10500  	}
 10501  	// match: (Rsh16Ux8 <t> x y)
 10502  	// cond: shiftIsBounded(v)
 10503  	// result: (SHRW <t> x y)
 10504  	for {
 10505  		t := v.Type
 10506  		x := v_0
 10507  		y := v_1
 10508  		if !(shiftIsBounded(v)) {
 10509  			break
 10510  		}
 10511  		v.reset(Op386SHRW)
 10512  		v.Type = t
 10513  		v.AddArg2(x, y)
 10514  		return true
 10515  	}
 10516  	return false
 10517  }
 10518  func rewriteValue386_OpRsh16x16(v *Value) bool {
 10519  	v_1 := v.Args[1]
 10520  	v_0 := v.Args[0]
 10521  	b := v.Block
 10522  	// match: (Rsh16x16 <t> x y)
 10523  	// cond: !shiftIsBounded(v)
 10524  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
 10525  	for {
 10526  		t := v.Type
 10527  		x := v_0
 10528  		y := v_1
 10529  		if !(!shiftIsBounded(v)) {
 10530  			break
 10531  		}
 10532  		v.reset(Op386SARW)
 10533  		v.Type = t
 10534  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10535  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10536  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10537  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10538  		v3.AuxInt = int16ToAuxInt(16)
 10539  		v3.AddArg(y)
 10540  		v2.AddArg(v3)
 10541  		v1.AddArg(v2)
 10542  		v0.AddArg2(y, v1)
 10543  		v.AddArg2(x, v0)
 10544  		return true
 10545  	}
 10546  	// match: (Rsh16x16 <t> x y)
 10547  	// cond: shiftIsBounded(v)
 10548  	// result: (SARW x y)
 10549  	for {
 10550  		x := v_0
 10551  		y := v_1
 10552  		if !(shiftIsBounded(v)) {
 10553  			break
 10554  		}
 10555  		v.reset(Op386SARW)
 10556  		v.AddArg2(x, y)
 10557  		return true
 10558  	}
 10559  	return false
 10560  }
 10561  func rewriteValue386_OpRsh16x32(v *Value) bool {
 10562  	v_1 := v.Args[1]
 10563  	v_0 := v.Args[0]
 10564  	b := v.Block
 10565  	// match: (Rsh16x32 <t> x y)
 10566  	// cond: !shiftIsBounded(v)
 10567  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
 10568  	for {
 10569  		t := v.Type
 10570  		x := v_0
 10571  		y := v_1
 10572  		if !(!shiftIsBounded(v)) {
 10573  			break
 10574  		}
 10575  		v.reset(Op386SARW)
 10576  		v.Type = t
 10577  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10578  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10579  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10580  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10581  		v3.AuxInt = int32ToAuxInt(16)
 10582  		v3.AddArg(y)
 10583  		v2.AddArg(v3)
 10584  		v1.AddArg(v2)
 10585  		v0.AddArg2(y, v1)
 10586  		v.AddArg2(x, v0)
 10587  		return true
 10588  	}
 10589  	// match: (Rsh16x32 <t> x y)
 10590  	// cond: shiftIsBounded(v)
 10591  	// result: (SARW x y)
 10592  	for {
 10593  		x := v_0
 10594  		y := v_1
 10595  		if !(shiftIsBounded(v)) {
 10596  			break
 10597  		}
 10598  		v.reset(Op386SARW)
 10599  		v.AddArg2(x, y)
 10600  		return true
 10601  	}
 10602  	return false
 10603  }
 10604  func rewriteValue386_OpRsh16x64(v *Value) bool {
 10605  	v_1 := v.Args[1]
 10606  	v_0 := v.Args[0]
 10607  	// match: (Rsh16x64 x (Const64 [c]))
 10608  	// cond: uint64(c) < 16
 10609  	// result: (SARWconst x [int16(c)])
 10610  	for {
 10611  		x := v_0
 10612  		if v_1.Op != OpConst64 {
 10613  			break
 10614  		}
 10615  		c := auxIntToInt64(v_1.AuxInt)
 10616  		if !(uint64(c) < 16) {
 10617  			break
 10618  		}
 10619  		v.reset(Op386SARWconst)
 10620  		v.AuxInt = int16ToAuxInt(int16(c))
 10621  		v.AddArg(x)
 10622  		return true
 10623  	}
 10624  	// match: (Rsh16x64 x (Const64 [c]))
 10625  	// cond: uint64(c) >= 16
 10626  	// result: (SARWconst x [15])
 10627  	for {
 10628  		x := v_0
 10629  		if v_1.Op != OpConst64 {
 10630  			break
 10631  		}
 10632  		c := auxIntToInt64(v_1.AuxInt)
 10633  		if !(uint64(c) >= 16) {
 10634  			break
 10635  		}
 10636  		v.reset(Op386SARWconst)
 10637  		v.AuxInt = int16ToAuxInt(15)
 10638  		v.AddArg(x)
 10639  		return true
 10640  	}
 10641  	return false
 10642  }
 10643  func rewriteValue386_OpRsh16x8(v *Value) bool {
 10644  	v_1 := v.Args[1]
 10645  	v_0 := v.Args[0]
 10646  	b := v.Block
 10647  	// match: (Rsh16x8 <t> x y)
 10648  	// cond: !shiftIsBounded(v)
 10649  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
 10650  	for {
 10651  		t := v.Type
 10652  		x := v_0
 10653  		y := v_1
 10654  		if !(!shiftIsBounded(v)) {
 10655  			break
 10656  		}
 10657  		v.reset(Op386SARW)
 10658  		v.Type = t
 10659  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10660  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10661  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10662  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10663  		v3.AuxInt = int8ToAuxInt(16)
 10664  		v3.AddArg(y)
 10665  		v2.AddArg(v3)
 10666  		v1.AddArg(v2)
 10667  		v0.AddArg2(y, v1)
 10668  		v.AddArg2(x, v0)
 10669  		return true
 10670  	}
 10671  	// match: (Rsh16x8 <t> x y)
 10672  	// cond: shiftIsBounded(v)
 10673  	// result: (SARW x y)
 10674  	for {
 10675  		x := v_0
 10676  		y := v_1
 10677  		if !(shiftIsBounded(v)) {
 10678  			break
 10679  		}
 10680  		v.reset(Op386SARW)
 10681  		v.AddArg2(x, y)
 10682  		return true
 10683  	}
 10684  	return false
 10685  }
 10686  func rewriteValue386_OpRsh32Ux16(v *Value) bool {
 10687  	v_1 := v.Args[1]
 10688  	v_0 := v.Args[0]
 10689  	b := v.Block
 10690  	// match: (Rsh32Ux16 <t> x y)
 10691  	// cond: !shiftIsBounded(v)
 10692  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10693  	for {
 10694  		t := v.Type
 10695  		x := v_0
 10696  		y := v_1
 10697  		if !(!shiftIsBounded(v)) {
 10698  			break
 10699  		}
 10700  		v.reset(Op386ANDL)
 10701  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
 10702  		v0.AddArg2(x, y)
 10703  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10704  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10705  		v2.AuxInt = int16ToAuxInt(32)
 10706  		v2.AddArg(y)
 10707  		v1.AddArg(v2)
 10708  		v.AddArg2(v0, v1)
 10709  		return true
 10710  	}
 10711  	// match: (Rsh32Ux16 <t> x y)
 10712  	// cond: shiftIsBounded(v)
 10713  	// result: (SHRL <t> x y)
 10714  	for {
 10715  		t := v.Type
 10716  		x := v_0
 10717  		y := v_1
 10718  		if !(shiftIsBounded(v)) {
 10719  			break
 10720  		}
 10721  		v.reset(Op386SHRL)
 10722  		v.Type = t
 10723  		v.AddArg2(x, y)
 10724  		return true
 10725  	}
 10726  	return false
 10727  }
 10728  func rewriteValue386_OpRsh32Ux32(v *Value) bool {
 10729  	v_1 := v.Args[1]
 10730  	v_0 := v.Args[0]
 10731  	b := v.Block
 10732  	// match: (Rsh32Ux32 <t> x y)
 10733  	// cond: !shiftIsBounded(v)
 10734  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10735  	for {
 10736  		t := v.Type
 10737  		x := v_0
 10738  		y := v_1
 10739  		if !(!shiftIsBounded(v)) {
 10740  			break
 10741  		}
 10742  		v.reset(Op386ANDL)
 10743  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
 10744  		v0.AddArg2(x, y)
 10745  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10746  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10747  		v2.AuxInt = int32ToAuxInt(32)
 10748  		v2.AddArg(y)
 10749  		v1.AddArg(v2)
 10750  		v.AddArg2(v0, v1)
 10751  		return true
 10752  	}
 10753  	// match: (Rsh32Ux32 <t> x y)
 10754  	// cond: shiftIsBounded(v)
 10755  	// result: (SHRL <t> x y)
 10756  	for {
 10757  		t := v.Type
 10758  		x := v_0
 10759  		y := v_1
 10760  		if !(shiftIsBounded(v)) {
 10761  			break
 10762  		}
 10763  		v.reset(Op386SHRL)
 10764  		v.Type = t
 10765  		v.AddArg2(x, y)
 10766  		return true
 10767  	}
 10768  	return false
 10769  }
 10770  func rewriteValue386_OpRsh32Ux64(v *Value) bool {
 10771  	v_1 := v.Args[1]
 10772  	v_0 := v.Args[0]
 10773  	// match: (Rsh32Ux64 x (Const64 [c]))
 10774  	// cond: uint64(c) < 32
 10775  	// result: (SHRLconst x [int32(c)])
 10776  	for {
 10777  		x := v_0
 10778  		if v_1.Op != OpConst64 {
 10779  			break
 10780  		}
 10781  		c := auxIntToInt64(v_1.AuxInt)
 10782  		if !(uint64(c) < 32) {
 10783  			break
 10784  		}
 10785  		v.reset(Op386SHRLconst)
 10786  		v.AuxInt = int32ToAuxInt(int32(c))
 10787  		v.AddArg(x)
 10788  		return true
 10789  	}
 10790  	// match: (Rsh32Ux64 _ (Const64 [c]))
 10791  	// cond: uint64(c) >= 32
 10792  	// result: (Const32 [0])
 10793  	for {
 10794  		if v_1.Op != OpConst64 {
 10795  			break
 10796  		}
 10797  		c := auxIntToInt64(v_1.AuxInt)
 10798  		if !(uint64(c) >= 32) {
 10799  			break
 10800  		}
 10801  		v.reset(OpConst32)
 10802  		v.AuxInt = int32ToAuxInt(0)
 10803  		return true
 10804  	}
 10805  	return false
 10806  }
 10807  func rewriteValue386_OpRsh32Ux8(v *Value) bool {
 10808  	v_1 := v.Args[1]
 10809  	v_0 := v.Args[0]
 10810  	b := v.Block
 10811  	// match: (Rsh32Ux8 <t> x y)
 10812  	// cond: !shiftIsBounded(v)
 10813  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10814  	for {
 10815  		t := v.Type
 10816  		x := v_0
 10817  		y := v_1
 10818  		if !(!shiftIsBounded(v)) {
 10819  			break
 10820  		}
 10821  		v.reset(Op386ANDL)
 10822  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
 10823  		v0.AddArg2(x, y)
 10824  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10825  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10826  		v2.AuxInt = int8ToAuxInt(32)
 10827  		v2.AddArg(y)
 10828  		v1.AddArg(v2)
 10829  		v.AddArg2(v0, v1)
 10830  		return true
 10831  	}
 10832  	// match: (Rsh32Ux8 <t> x y)
 10833  	// cond: shiftIsBounded(v)
 10834  	// result: (SHRL <t> x y)
 10835  	for {
 10836  		t := v.Type
 10837  		x := v_0
 10838  		y := v_1
 10839  		if !(shiftIsBounded(v)) {
 10840  			break
 10841  		}
 10842  		v.reset(Op386SHRL)
 10843  		v.Type = t
 10844  		v.AddArg2(x, y)
 10845  		return true
 10846  	}
 10847  	return false
 10848  }
 10849  func rewriteValue386_OpRsh32x16(v *Value) bool {
 10850  	v_1 := v.Args[1]
 10851  	v_0 := v.Args[0]
 10852  	b := v.Block
 10853  	// match: (Rsh32x16 <t> x y)
 10854  	// cond: !shiftIsBounded(v)
 10855  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
 10856  	for {
 10857  		t := v.Type
 10858  		x := v_0
 10859  		y := v_1
 10860  		if !(!shiftIsBounded(v)) {
 10861  			break
 10862  		}
 10863  		v.reset(Op386SARL)
 10864  		v.Type = t
 10865  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10866  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10867  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10868  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10869  		v3.AuxInt = int16ToAuxInt(32)
 10870  		v3.AddArg(y)
 10871  		v2.AddArg(v3)
 10872  		v1.AddArg(v2)
 10873  		v0.AddArg2(y, v1)
 10874  		v.AddArg2(x, v0)
 10875  		return true
 10876  	}
 10877  	// match: (Rsh32x16 <t> x y)
 10878  	// cond: shiftIsBounded(v)
 10879  	// result: (SARL x y)
 10880  	for {
 10881  		x := v_0
 10882  		y := v_1
 10883  		if !(shiftIsBounded(v)) {
 10884  			break
 10885  		}
 10886  		v.reset(Op386SARL)
 10887  		v.AddArg2(x, y)
 10888  		return true
 10889  	}
 10890  	return false
 10891  }
 10892  func rewriteValue386_OpRsh32x32(v *Value) bool {
 10893  	v_1 := v.Args[1]
 10894  	v_0 := v.Args[0]
 10895  	b := v.Block
 10896  	// match: (Rsh32x32 <t> x y)
 10897  	// cond: !shiftIsBounded(v)
 10898  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 10899  	for {
 10900  		t := v.Type
 10901  		x := v_0
 10902  		y := v_1
 10903  		if !(!shiftIsBounded(v)) {
 10904  			break
 10905  		}
 10906  		v.reset(Op386SARL)
 10907  		v.Type = t
 10908  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10909  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10910  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10911  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10912  		v3.AuxInt = int32ToAuxInt(32)
 10913  		v3.AddArg(y)
 10914  		v2.AddArg(v3)
 10915  		v1.AddArg(v2)
 10916  		v0.AddArg2(y, v1)
 10917  		v.AddArg2(x, v0)
 10918  		return true
 10919  	}
 10920  	// match: (Rsh32x32 <t> x y)
 10921  	// cond: shiftIsBounded(v)
 10922  	// result: (SARL x y)
 10923  	for {
 10924  		x := v_0
 10925  		y := v_1
 10926  		if !(shiftIsBounded(v)) {
 10927  			break
 10928  		}
 10929  		v.reset(Op386SARL)
 10930  		v.AddArg2(x, y)
 10931  		return true
 10932  	}
 10933  	return false
 10934  }
 10935  func rewriteValue386_OpRsh32x64(v *Value) bool {
 10936  	v_1 := v.Args[1]
 10937  	v_0 := v.Args[0]
 10938  	// match: (Rsh32x64 x (Const64 [c]))
 10939  	// cond: uint64(c) < 32
 10940  	// result: (SARLconst x [int32(c)])
 10941  	for {
 10942  		x := v_0
 10943  		if v_1.Op != OpConst64 {
 10944  			break
 10945  		}
 10946  		c := auxIntToInt64(v_1.AuxInt)
 10947  		if !(uint64(c) < 32) {
 10948  			break
 10949  		}
 10950  		v.reset(Op386SARLconst)
 10951  		v.AuxInt = int32ToAuxInt(int32(c))
 10952  		v.AddArg(x)
 10953  		return true
 10954  	}
 10955  	// match: (Rsh32x64 x (Const64 [c]))
 10956  	// cond: uint64(c) >= 32
 10957  	// result: (SARLconst x [31])
 10958  	for {
 10959  		x := v_0
 10960  		if v_1.Op != OpConst64 {
 10961  			break
 10962  		}
 10963  		c := auxIntToInt64(v_1.AuxInt)
 10964  		if !(uint64(c) >= 32) {
 10965  			break
 10966  		}
 10967  		v.reset(Op386SARLconst)
 10968  		v.AuxInt = int32ToAuxInt(31)
 10969  		v.AddArg(x)
 10970  		return true
 10971  	}
 10972  	return false
 10973  }
 10974  func rewriteValue386_OpRsh32x8(v *Value) bool {
 10975  	v_1 := v.Args[1]
 10976  	v_0 := v.Args[0]
 10977  	b := v.Block
 10978  	// match: (Rsh32x8 <t> x y)
 10979  	// cond: !shiftIsBounded(v)
 10980  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 10981  	for {
 10982  		t := v.Type
 10983  		x := v_0
 10984  		y := v_1
 10985  		if !(!shiftIsBounded(v)) {
 10986  			break
 10987  		}
 10988  		v.reset(Op386SARL)
 10989  		v.Type = t
 10990  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10991  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10992  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10993  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10994  		v3.AuxInt = int8ToAuxInt(32)
 10995  		v3.AddArg(y)
 10996  		v2.AddArg(v3)
 10997  		v1.AddArg(v2)
 10998  		v0.AddArg2(y, v1)
 10999  		v.AddArg2(x, v0)
 11000  		return true
 11001  	}
 11002  	// match: (Rsh32x8 <t> x y)
 11003  	// cond: shiftIsBounded(v)
 11004  	// result: (SARL x y)
 11005  	for {
 11006  		x := v_0
 11007  		y := v_1
 11008  		if !(shiftIsBounded(v)) {
 11009  			break
 11010  		}
 11011  		v.reset(Op386SARL)
 11012  		v.AddArg2(x, y)
 11013  		return true
 11014  	}
 11015  	return false
 11016  }
 11017  func rewriteValue386_OpRsh8Ux16(v *Value) bool {
 11018  	v_1 := v.Args[1]
 11019  	v_0 := v.Args[0]
 11020  	b := v.Block
 11021  	// match: (Rsh8Ux16 <t> x y)
 11022  	// cond: !shiftIsBounded(v)
 11023  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 11024  	for {
 11025  		t := v.Type
 11026  		x := v_0
 11027  		y := v_1
 11028  		if !(!shiftIsBounded(v)) {
 11029  			break
 11030  		}
 11031  		v.reset(Op386ANDL)
 11032  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 11033  		v0.AddArg2(x, y)
 11034  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11035  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 11036  		v2.AuxInt = int16ToAuxInt(8)
 11037  		v2.AddArg(y)
 11038  		v1.AddArg(v2)
 11039  		v.AddArg2(v0, v1)
 11040  		return true
 11041  	}
 11042  	// match: (Rsh8Ux16 <t> x y)
 11043  	// cond: shiftIsBounded(v)
 11044  	// result: (SHRB <t> x y)
 11045  	for {
 11046  		t := v.Type
 11047  		x := v_0
 11048  		y := v_1
 11049  		if !(shiftIsBounded(v)) {
 11050  			break
 11051  		}
 11052  		v.reset(Op386SHRB)
 11053  		v.Type = t
 11054  		v.AddArg2(x, y)
 11055  		return true
 11056  	}
 11057  	return false
 11058  }
 11059  func rewriteValue386_OpRsh8Ux32(v *Value) bool {
 11060  	v_1 := v.Args[1]
 11061  	v_0 := v.Args[0]
 11062  	b := v.Block
 11063  	// match: (Rsh8Ux32 <t> x y)
 11064  	// cond: !shiftIsBounded(v)
 11065  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 11066  	for {
 11067  		t := v.Type
 11068  		x := v_0
 11069  		y := v_1
 11070  		if !(!shiftIsBounded(v)) {
 11071  			break
 11072  		}
 11073  		v.reset(Op386ANDL)
 11074  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 11075  		v0.AddArg2(x, y)
 11076  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11077  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 11078  		v2.AuxInt = int32ToAuxInt(8)
 11079  		v2.AddArg(y)
 11080  		v1.AddArg(v2)
 11081  		v.AddArg2(v0, v1)
 11082  		return true
 11083  	}
 11084  	// match: (Rsh8Ux32 <t> x y)
 11085  	// cond: shiftIsBounded(v)
 11086  	// result: (SHRB <t> x y)
 11087  	for {
 11088  		t := v.Type
 11089  		x := v_0
 11090  		y := v_1
 11091  		if !(shiftIsBounded(v)) {
 11092  			break
 11093  		}
 11094  		v.reset(Op386SHRB)
 11095  		v.Type = t
 11096  		v.AddArg2(x, y)
 11097  		return true
 11098  	}
 11099  	return false
 11100  }
 11101  func rewriteValue386_OpRsh8Ux64(v *Value) bool {
 11102  	v_1 := v.Args[1]
 11103  	v_0 := v.Args[0]
 11104  	// match: (Rsh8Ux64 x (Const64 [c]))
 11105  	// cond: uint64(c) < 8
 11106  	// result: (SHRBconst x [int8(c)])
 11107  	for {
 11108  		x := v_0
 11109  		if v_1.Op != OpConst64 {
 11110  			break
 11111  		}
 11112  		c := auxIntToInt64(v_1.AuxInt)
 11113  		if !(uint64(c) < 8) {
 11114  			break
 11115  		}
 11116  		v.reset(Op386SHRBconst)
 11117  		v.AuxInt = int8ToAuxInt(int8(c))
 11118  		v.AddArg(x)
 11119  		return true
 11120  	}
 11121  	// match: (Rsh8Ux64 _ (Const64 [c]))
 11122  	// cond: uint64(c) >= 8
 11123  	// result: (Const8 [0])
 11124  	for {
 11125  		if v_1.Op != OpConst64 {
 11126  			break
 11127  		}
 11128  		c := auxIntToInt64(v_1.AuxInt)
 11129  		if !(uint64(c) >= 8) {
 11130  			break
 11131  		}
 11132  		v.reset(OpConst8)
 11133  		v.AuxInt = int8ToAuxInt(0)
 11134  		return true
 11135  	}
 11136  	return false
 11137  }
 11138  func rewriteValue386_OpRsh8Ux8(v *Value) bool {
 11139  	v_1 := v.Args[1]
 11140  	v_0 := v.Args[0]
 11141  	b := v.Block
 11142  	// match: (Rsh8Ux8 <t> x y)
 11143  	// cond: !shiftIsBounded(v)
 11144  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 11145  	for {
 11146  		t := v.Type
 11147  		x := v_0
 11148  		y := v_1
 11149  		if !(!shiftIsBounded(v)) {
 11150  			break
 11151  		}
 11152  		v.reset(Op386ANDL)
 11153  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 11154  		v0.AddArg2(x, y)
 11155  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11156  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 11157  		v2.AuxInt = int8ToAuxInt(8)
 11158  		v2.AddArg(y)
 11159  		v1.AddArg(v2)
 11160  		v.AddArg2(v0, v1)
 11161  		return true
 11162  	}
 11163  	// match: (Rsh8Ux8 <t> x y)
 11164  	// cond: shiftIsBounded(v)
 11165  	// result: (SHRB <t> x y)
 11166  	for {
 11167  		t := v.Type
 11168  		x := v_0
 11169  		y := v_1
 11170  		if !(shiftIsBounded(v)) {
 11171  			break
 11172  		}
 11173  		v.reset(Op386SHRB)
 11174  		v.Type = t
 11175  		v.AddArg2(x, y)
 11176  		return true
 11177  	}
 11178  	return false
 11179  }
 11180  func rewriteValue386_OpRsh8x16(v *Value) bool {
 11181  	v_1 := v.Args[1]
 11182  	v_0 := v.Args[0]
 11183  	b := v.Block
 11184  	// match: (Rsh8x16 <t> x y)
 11185  	// cond: !shiftIsBounded(v)
 11186  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 11187  	for {
 11188  		t := v.Type
 11189  		x := v_0
 11190  		y := v_1
 11191  		if !(!shiftIsBounded(v)) {
 11192  			break
 11193  		}
 11194  		v.reset(Op386SARB)
 11195  		v.Type = t
 11196  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11197  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11198  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11199  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 11200  		v3.AuxInt = int16ToAuxInt(8)
 11201  		v3.AddArg(y)
 11202  		v2.AddArg(v3)
 11203  		v1.AddArg(v2)
 11204  		v0.AddArg2(y, v1)
 11205  		v.AddArg2(x, v0)
 11206  		return true
 11207  	}
 11208  	// match: (Rsh8x16 <t> x y)
 11209  	// cond: shiftIsBounded(v)
 11210  	// result: (SARB x y)
 11211  	for {
 11212  		x := v_0
 11213  		y := v_1
 11214  		if !(shiftIsBounded(v)) {
 11215  			break
 11216  		}
 11217  		v.reset(Op386SARB)
 11218  		v.AddArg2(x, y)
 11219  		return true
 11220  	}
 11221  	return false
 11222  }
 11223  func rewriteValue386_OpRsh8x32(v *Value) bool {
 11224  	v_1 := v.Args[1]
 11225  	v_0 := v.Args[0]
 11226  	b := v.Block
 11227  	// match: (Rsh8x32 <t> x y)
 11228  	// cond: !shiftIsBounded(v)
 11229  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 11230  	for {
 11231  		t := v.Type
 11232  		x := v_0
 11233  		y := v_1
 11234  		if !(!shiftIsBounded(v)) {
 11235  			break
 11236  		}
 11237  		v.reset(Op386SARB)
 11238  		v.Type = t
 11239  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11240  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11241  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11242  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 11243  		v3.AuxInt = int32ToAuxInt(8)
 11244  		v3.AddArg(y)
 11245  		v2.AddArg(v3)
 11246  		v1.AddArg(v2)
 11247  		v0.AddArg2(y, v1)
 11248  		v.AddArg2(x, v0)
 11249  		return true
 11250  	}
 11251  	// match: (Rsh8x32 <t> x y)
 11252  	// cond: shiftIsBounded(v)
 11253  	// result: (SARB x y)
 11254  	for {
 11255  		x := v_0
 11256  		y := v_1
 11257  		if !(shiftIsBounded(v)) {
 11258  			break
 11259  		}
 11260  		v.reset(Op386SARB)
 11261  		v.AddArg2(x, y)
 11262  		return true
 11263  	}
 11264  	return false
 11265  }
 11266  func rewriteValue386_OpRsh8x64(v *Value) bool {
 11267  	v_1 := v.Args[1]
 11268  	v_0 := v.Args[0]
 11269  	// match: (Rsh8x64 x (Const64 [c]))
 11270  	// cond: uint64(c) < 8
 11271  	// result: (SARBconst x [int8(c)])
 11272  	for {
 11273  		x := v_0
 11274  		if v_1.Op != OpConst64 {
 11275  			break
 11276  		}
 11277  		c := auxIntToInt64(v_1.AuxInt)
 11278  		if !(uint64(c) < 8) {
 11279  			break
 11280  		}
 11281  		v.reset(Op386SARBconst)
 11282  		v.AuxInt = int8ToAuxInt(int8(c))
 11283  		v.AddArg(x)
 11284  		return true
 11285  	}
 11286  	// match: (Rsh8x64 x (Const64 [c]))
 11287  	// cond: uint64(c) >= 8
 11288  	// result: (SARBconst x [7])
 11289  	for {
 11290  		x := v_0
 11291  		if v_1.Op != OpConst64 {
 11292  			break
 11293  		}
 11294  		c := auxIntToInt64(v_1.AuxInt)
 11295  		if !(uint64(c) >= 8) {
 11296  			break
 11297  		}
 11298  		v.reset(Op386SARBconst)
 11299  		v.AuxInt = int8ToAuxInt(7)
 11300  		v.AddArg(x)
 11301  		return true
 11302  	}
 11303  	return false
 11304  }
 11305  func rewriteValue386_OpRsh8x8(v *Value) bool {
 11306  	v_1 := v.Args[1]
 11307  	v_0 := v.Args[0]
 11308  	b := v.Block
 11309  	// match: (Rsh8x8 <t> x y)
 11310  	// cond: !shiftIsBounded(v)
 11311  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 11312  	for {
 11313  		t := v.Type
 11314  		x := v_0
 11315  		y := v_1
 11316  		if !(!shiftIsBounded(v)) {
 11317  			break
 11318  		}
 11319  		v.reset(Op386SARB)
 11320  		v.Type = t
 11321  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11322  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11323  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11324  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 11325  		v3.AuxInt = int8ToAuxInt(8)
 11326  		v3.AddArg(y)
 11327  		v2.AddArg(v3)
 11328  		v1.AddArg(v2)
 11329  		v0.AddArg2(y, v1)
 11330  		v.AddArg2(x, v0)
 11331  		return true
 11332  	}
 11333  	// match: (Rsh8x8 <t> x y)
 11334  	// cond: shiftIsBounded(v)
 11335  	// result: (SARB x y)
 11336  	for {
 11337  		x := v_0
 11338  		y := v_1
 11339  		if !(shiftIsBounded(v)) {
 11340  			break
 11341  		}
 11342  		v.reset(Op386SARB)
 11343  		v.AddArg2(x, y)
 11344  		return true
 11345  	}
 11346  	return false
 11347  }
 11348  func rewriteValue386_OpSelect0(v *Value) bool {
 11349  	v_0 := v.Args[0]
 11350  	b := v.Block
 11351  	typ := &b.Func.Config.Types
 11352  	// match: (Select0 (Mul32uover x y))
 11353  	// result: (Select0 <typ.UInt32> (MULLU x y))
 11354  	for {
 11355  		if v_0.Op != OpMul32uover {
 11356  			break
 11357  		}
 11358  		y := v_0.Args[1]
 11359  		x := v_0.Args[0]
 11360  		v.reset(OpSelect0)
 11361  		v.Type = typ.UInt32
 11362  		v0 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 11363  		v0.AddArg2(x, y)
 11364  		v.AddArg(v0)
 11365  		return true
 11366  	}
 11367  	return false
 11368  }
 11369  func rewriteValue386_OpSelect1(v *Value) bool {
 11370  	v_0 := v.Args[0]
 11371  	b := v.Block
 11372  	typ := &b.Func.Config.Types
 11373  	// match: (Select1 (Mul32uover x y))
 11374  	// result: (SETO (Select1 <types.TypeFlags> (MULLU x y)))
 11375  	for {
 11376  		if v_0.Op != OpMul32uover {
 11377  			break
 11378  		}
 11379  		y := v_0.Args[1]
 11380  		x := v_0.Args[0]
 11381  		v.reset(Op386SETO)
 11382  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 11383  		v1 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 11384  		v1.AddArg2(x, y)
 11385  		v0.AddArg(v1)
 11386  		v.AddArg(v0)
 11387  		return true
 11388  	}
 11389  	return false
 11390  }
 11391  func rewriteValue386_OpSignmask(v *Value) bool {
 11392  	v_0 := v.Args[0]
 11393  	// match: (Signmask x)
 11394  	// result: (SARLconst x [31])
 11395  	for {
 11396  		x := v_0
 11397  		v.reset(Op386SARLconst)
 11398  		v.AuxInt = int32ToAuxInt(31)
 11399  		v.AddArg(x)
 11400  		return true
 11401  	}
 11402  }
 11403  func rewriteValue386_OpSlicemask(v *Value) bool {
 11404  	v_0 := v.Args[0]
 11405  	b := v.Block
 11406  	// match: (Slicemask <t> x)
 11407  	// result: (SARLconst (NEGL <t> x) [31])
 11408  	for {
 11409  		t := v.Type
 11410  		x := v_0
 11411  		v.reset(Op386SARLconst)
 11412  		v.AuxInt = int32ToAuxInt(31)
 11413  		v0 := b.NewValue0(v.Pos, Op386NEGL, t)
 11414  		v0.AddArg(x)
 11415  		v.AddArg(v0)
 11416  		return true
 11417  	}
 11418  }
 11419  func rewriteValue386_OpStore(v *Value) bool {
 11420  	v_2 := v.Args[2]
 11421  	v_1 := v.Args[1]
 11422  	v_0 := v.Args[0]
 11423  	// match: (Store {t} ptr val mem)
 11424  	// cond: t.Size() == 8 && is64BitFloat(val.Type)
 11425  	// result: (MOVSDstore ptr val mem)
 11426  	for {
 11427  		t := auxToType(v.Aux)
 11428  		ptr := v_0
 11429  		val := v_1
 11430  		mem := v_2
 11431  		if !(t.Size() == 8 && is64BitFloat(val.Type)) {
 11432  			break
 11433  		}
 11434  		v.reset(Op386MOVSDstore)
 11435  		v.AddArg3(ptr, val, mem)
 11436  		return true
 11437  	}
 11438  	// match: (Store {t} ptr val mem)
 11439  	// cond: t.Size() == 4 && is32BitFloat(val.Type)
 11440  	// result: (MOVSSstore ptr val mem)
 11441  	for {
 11442  		t := auxToType(v.Aux)
 11443  		ptr := v_0
 11444  		val := v_1
 11445  		mem := v_2
 11446  		if !(t.Size() == 4 && is32BitFloat(val.Type)) {
 11447  			break
 11448  		}
 11449  		v.reset(Op386MOVSSstore)
 11450  		v.AddArg3(ptr, val, mem)
 11451  		return true
 11452  	}
 11453  	// match: (Store {t} ptr val mem)
 11454  	// cond: t.Size() == 4
 11455  	// result: (MOVLstore ptr val mem)
 11456  	for {
 11457  		t := auxToType(v.Aux)
 11458  		ptr := v_0
 11459  		val := v_1
 11460  		mem := v_2
 11461  		if !(t.Size() == 4) {
 11462  			break
 11463  		}
 11464  		v.reset(Op386MOVLstore)
 11465  		v.AddArg3(ptr, val, mem)
 11466  		return true
 11467  	}
 11468  	// match: (Store {t} ptr val mem)
 11469  	// cond: t.Size() == 2
 11470  	// result: (MOVWstore ptr val mem)
 11471  	for {
 11472  		t := auxToType(v.Aux)
 11473  		ptr := v_0
 11474  		val := v_1
 11475  		mem := v_2
 11476  		if !(t.Size() == 2) {
 11477  			break
 11478  		}
 11479  		v.reset(Op386MOVWstore)
 11480  		v.AddArg3(ptr, val, mem)
 11481  		return true
 11482  	}
 11483  	// match: (Store {t} ptr val mem)
 11484  	// cond: t.Size() == 1
 11485  	// result: (MOVBstore ptr val mem)
 11486  	for {
 11487  		t := auxToType(v.Aux)
 11488  		ptr := v_0
 11489  		val := v_1
 11490  		mem := v_2
 11491  		if !(t.Size() == 1) {
 11492  			break
 11493  		}
 11494  		v.reset(Op386MOVBstore)
 11495  		v.AddArg3(ptr, val, mem)
 11496  		return true
 11497  	}
 11498  	return false
 11499  }
 11500  func rewriteValue386_OpZero(v *Value) bool {
 11501  	v_1 := v.Args[1]
 11502  	v_0 := v.Args[0]
 11503  	b := v.Block
 11504  	config := b.Func.Config
 11505  	typ := &b.Func.Config.Types
 11506  	// match: (Zero [0] _ mem)
 11507  	// result: mem
 11508  	for {
 11509  		if auxIntToInt64(v.AuxInt) != 0 {
 11510  			break
 11511  		}
 11512  		mem := v_1
 11513  		v.copyOf(mem)
 11514  		return true
 11515  	}
 11516  	// match: (Zero [1] destptr mem)
 11517  	// result: (MOVBstoreconst [0] destptr mem)
 11518  	for {
 11519  		if auxIntToInt64(v.AuxInt) != 1 {
 11520  			break
 11521  		}
 11522  		destptr := v_0
 11523  		mem := v_1
 11524  		v.reset(Op386MOVBstoreconst)
 11525  		v.AuxInt = valAndOffToAuxInt(0)
 11526  		v.AddArg2(destptr, mem)
 11527  		return true
 11528  	}
 11529  	// match: (Zero [2] destptr mem)
 11530  	// result: (MOVWstoreconst [0] destptr mem)
 11531  	for {
 11532  		if auxIntToInt64(v.AuxInt) != 2 {
 11533  			break
 11534  		}
 11535  		destptr := v_0
 11536  		mem := v_1
 11537  		v.reset(Op386MOVWstoreconst)
 11538  		v.AuxInt = valAndOffToAuxInt(0)
 11539  		v.AddArg2(destptr, mem)
 11540  		return true
 11541  	}
 11542  	// match: (Zero [4] destptr mem)
 11543  	// result: (MOVLstoreconst [0] destptr mem)
 11544  	for {
 11545  		if auxIntToInt64(v.AuxInt) != 4 {
 11546  			break
 11547  		}
 11548  		destptr := v_0
 11549  		mem := v_1
 11550  		v.reset(Op386MOVLstoreconst)
 11551  		v.AuxInt = valAndOffToAuxInt(0)
 11552  		v.AddArg2(destptr, mem)
 11553  		return true
 11554  	}
 11555  	// match: (Zero [3] destptr mem)
 11556  	// result: (MOVBstoreconst [makeValAndOff(0,2)] destptr (MOVWstoreconst [makeValAndOff(0,0)] destptr mem))
 11557  	for {
 11558  		if auxIntToInt64(v.AuxInt) != 3 {
 11559  			break
 11560  		}
 11561  		destptr := v_0
 11562  		mem := v_1
 11563  		v.reset(Op386MOVBstoreconst)
 11564  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 2))
 11565  		v0 := b.NewValue0(v.Pos, Op386MOVWstoreconst, types.TypeMem)
 11566  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11567  		v0.AddArg2(destptr, mem)
 11568  		v.AddArg2(destptr, v0)
 11569  		return true
 11570  	}
 11571  	// match: (Zero [5] destptr mem)
 11572  	// result: (MOVBstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 11573  	for {
 11574  		if auxIntToInt64(v.AuxInt) != 5 {
 11575  			break
 11576  		}
 11577  		destptr := v_0
 11578  		mem := v_1
 11579  		v.reset(Op386MOVBstoreconst)
 11580  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 11581  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11582  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11583  		v0.AddArg2(destptr, mem)
 11584  		v.AddArg2(destptr, v0)
 11585  		return true
 11586  	}
 11587  	// match: (Zero [6] destptr mem)
 11588  	// result: (MOVWstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 11589  	for {
 11590  		if auxIntToInt64(v.AuxInt) != 6 {
 11591  			break
 11592  		}
 11593  		destptr := v_0
 11594  		mem := v_1
 11595  		v.reset(Op386MOVWstoreconst)
 11596  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 11597  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11598  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11599  		v0.AddArg2(destptr, mem)
 11600  		v.AddArg2(destptr, v0)
 11601  		return true
 11602  	}
 11603  	// match: (Zero [7] destptr mem)
 11604  	// result: (MOVLstoreconst [makeValAndOff(0,3)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 11605  	for {
 11606  		if auxIntToInt64(v.AuxInt) != 7 {
 11607  			break
 11608  		}
 11609  		destptr := v_0
 11610  		mem := v_1
 11611  		v.reset(Op386MOVLstoreconst)
 11612  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 3))
 11613  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11614  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11615  		v0.AddArg2(destptr, mem)
 11616  		v.AddArg2(destptr, v0)
 11617  		return true
 11618  	}
 11619  	// match: (Zero [s] destptr mem)
 11620  	// cond: s%4 != 0 && s > 4
 11621  	// result: (Zero [s-s%4] (ADDLconst destptr [int32(s%4)]) (MOVLstoreconst [0] destptr mem))
 11622  	for {
 11623  		s := auxIntToInt64(v.AuxInt)
 11624  		destptr := v_0
 11625  		mem := v_1
 11626  		if !(s%4 != 0 && s > 4) {
 11627  			break
 11628  		}
 11629  		v.reset(OpZero)
 11630  		v.AuxInt = int64ToAuxInt(s - s%4)
 11631  		v0 := b.NewValue0(v.Pos, Op386ADDLconst, typ.UInt32)
 11632  		v0.AuxInt = int32ToAuxInt(int32(s % 4))
 11633  		v0.AddArg(destptr)
 11634  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11635  		v1.AuxInt = valAndOffToAuxInt(0)
 11636  		v1.AddArg2(destptr, mem)
 11637  		v.AddArg2(v0, v1)
 11638  		return true
 11639  	}
 11640  	// match: (Zero [8] destptr mem)
 11641  	// result: (MOVLstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))
 11642  	for {
 11643  		if auxIntToInt64(v.AuxInt) != 8 {
 11644  			break
 11645  		}
 11646  		destptr := v_0
 11647  		mem := v_1
 11648  		v.reset(Op386MOVLstoreconst)
 11649  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 11650  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11651  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11652  		v0.AddArg2(destptr, mem)
 11653  		v.AddArg2(destptr, v0)
 11654  		return true
 11655  	}
 11656  	// match: (Zero [12] destptr mem)
 11657  	// result: (MOVLstoreconst [makeValAndOff(0,8)] destptr (MOVLstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem)))
 11658  	for {
 11659  		if auxIntToInt64(v.AuxInt) != 12 {
 11660  			break
 11661  		}
 11662  		destptr := v_0
 11663  		mem := v_1
 11664  		v.reset(Op386MOVLstoreconst)
 11665  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 8))
 11666  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11667  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 11668  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11669  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11670  		v1.AddArg2(destptr, mem)
 11671  		v0.AddArg2(destptr, v1)
 11672  		v.AddArg2(destptr, v0)
 11673  		return true
 11674  	}
 11675  	// match: (Zero [16] destptr mem)
 11676  	// result: (MOVLstoreconst [makeValAndOff(0,12)] destptr (MOVLstoreconst [makeValAndOff(0,8)] destptr (MOVLstoreconst [makeValAndOff(0,4)] destptr (MOVLstoreconst [makeValAndOff(0,0)] destptr mem))))
 11677  	for {
 11678  		if auxIntToInt64(v.AuxInt) != 16 {
 11679  			break
 11680  		}
 11681  		destptr := v_0
 11682  		mem := v_1
 11683  		v.reset(Op386MOVLstoreconst)
 11684  		v.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 12))
 11685  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11686  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 8))
 11687  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11688  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 4))
 11689  		v2 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11690  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff(0, 0))
 11691  		v2.AddArg2(destptr, mem)
 11692  		v1.AddArg2(destptr, v2)
 11693  		v0.AddArg2(destptr, v1)
 11694  		v.AddArg2(destptr, v0)
 11695  		return true
 11696  	}
 11697  	// match: (Zero [s] destptr mem)
 11698  	// cond: s > 16 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice
 11699  	// result: (DUFFZERO [1*(128-s/4)] destptr (MOVLconst [0]) mem)
 11700  	for {
 11701  		s := auxIntToInt64(v.AuxInt)
 11702  		destptr := v_0
 11703  		mem := v_1
 11704  		if !(s > 16 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice) {
 11705  			break
 11706  		}
 11707  		v.reset(Op386DUFFZERO)
 11708  		v.AuxInt = int64ToAuxInt(1 * (128 - s/4))
 11709  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 11710  		v0.AuxInt = int32ToAuxInt(0)
 11711  		v.AddArg3(destptr, v0, mem)
 11712  		return true
 11713  	}
 11714  	// match: (Zero [s] destptr mem)
 11715  	// cond: (s > 4*128 || (config.noDuffDevice && s > 16)) && s%4 == 0
 11716  	// result: (REPSTOSL destptr (MOVLconst [int32(s/4)]) (MOVLconst [0]) mem)
 11717  	for {
 11718  		s := auxIntToInt64(v.AuxInt)
 11719  		destptr := v_0
 11720  		mem := v_1
 11721  		if !((s > 4*128 || (config.noDuffDevice && s > 16)) && s%4 == 0) {
 11722  			break
 11723  		}
 11724  		v.reset(Op386REPSTOSL)
 11725  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 11726  		v0.AuxInt = int32ToAuxInt(int32(s / 4))
 11727  		v1 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 11728  		v1.AuxInt = int32ToAuxInt(0)
 11729  		v.AddArg4(destptr, v0, v1, mem)
 11730  		return true
 11731  	}
 11732  	return false
 11733  }
 11734  func rewriteValue386_OpZeromask(v *Value) bool {
 11735  	v_0 := v.Args[0]
 11736  	b := v.Block
 11737  	// match: (Zeromask <t> x)
 11738  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPLconst x [1])))
 11739  	for {
 11740  		t := v.Type
 11741  		x := v_0
 11742  		v.reset(Op386XORLconst)
 11743  		v.AuxInt = int32ToAuxInt(-1)
 11744  		v0 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11745  		v1 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 11746  		v1.AuxInt = int32ToAuxInt(1)
 11747  		v1.AddArg(x)
 11748  		v0.AddArg(v1)
 11749  		v.AddArg(v0)
 11750  		return true
 11751  	}
 11752  }
 11753  func rewriteBlock386(b *Block) bool {
 11754  	switch b.Kind {
 11755  	case Block386EQ:
 11756  		// match: (EQ (InvertFlags cmp) yes no)
 11757  		// result: (EQ cmp yes no)
 11758  		for b.Controls[0].Op == Op386InvertFlags {
 11759  			v_0 := b.Controls[0]
 11760  			cmp := v_0.Args[0]
 11761  			b.resetWithControl(Block386EQ, cmp)
 11762  			return true
 11763  		}
 11764  		// match: (EQ (FlagEQ) yes no)
 11765  		// result: (First yes no)
 11766  		for b.Controls[0].Op == Op386FlagEQ {
 11767  			b.Reset(BlockFirst)
 11768  			return true
 11769  		}
 11770  		// match: (EQ (FlagLT_ULT) yes no)
 11771  		// result: (First no yes)
 11772  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11773  			b.Reset(BlockFirst)
 11774  			b.swapSuccessors()
 11775  			return true
 11776  		}
 11777  		// match: (EQ (FlagLT_UGT) yes no)
 11778  		// result: (First no yes)
 11779  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11780  			b.Reset(BlockFirst)
 11781  			b.swapSuccessors()
 11782  			return true
 11783  		}
 11784  		// match: (EQ (FlagGT_ULT) yes no)
 11785  		// result: (First no yes)
 11786  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11787  			b.Reset(BlockFirst)
 11788  			b.swapSuccessors()
 11789  			return true
 11790  		}
 11791  		// match: (EQ (FlagGT_UGT) yes no)
 11792  		// result: (First no yes)
 11793  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11794  			b.Reset(BlockFirst)
 11795  			b.swapSuccessors()
 11796  			return true
 11797  		}
 11798  	case Block386GE:
 11799  		// match: (GE (InvertFlags cmp) yes no)
 11800  		// result: (LE cmp yes no)
 11801  		for b.Controls[0].Op == Op386InvertFlags {
 11802  			v_0 := b.Controls[0]
 11803  			cmp := v_0.Args[0]
 11804  			b.resetWithControl(Block386LE, cmp)
 11805  			return true
 11806  		}
 11807  		// match: (GE (FlagEQ) yes no)
 11808  		// result: (First yes no)
 11809  		for b.Controls[0].Op == Op386FlagEQ {
 11810  			b.Reset(BlockFirst)
 11811  			return true
 11812  		}
 11813  		// match: (GE (FlagLT_ULT) yes no)
 11814  		// result: (First no yes)
 11815  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11816  			b.Reset(BlockFirst)
 11817  			b.swapSuccessors()
 11818  			return true
 11819  		}
 11820  		// match: (GE (FlagLT_UGT) yes no)
 11821  		// result: (First no yes)
 11822  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11823  			b.Reset(BlockFirst)
 11824  			b.swapSuccessors()
 11825  			return true
 11826  		}
 11827  		// match: (GE (FlagGT_ULT) yes no)
 11828  		// result: (First yes no)
 11829  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11830  			b.Reset(BlockFirst)
 11831  			return true
 11832  		}
 11833  		// match: (GE (FlagGT_UGT) yes no)
 11834  		// result: (First yes no)
 11835  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11836  			b.Reset(BlockFirst)
 11837  			return true
 11838  		}
 11839  	case Block386GT:
 11840  		// match: (GT (InvertFlags cmp) yes no)
 11841  		// result: (LT cmp yes no)
 11842  		for b.Controls[0].Op == Op386InvertFlags {
 11843  			v_0 := b.Controls[0]
 11844  			cmp := v_0.Args[0]
 11845  			b.resetWithControl(Block386LT, cmp)
 11846  			return true
 11847  		}
 11848  		// match: (GT (FlagEQ) yes no)
 11849  		// result: (First no yes)
 11850  		for b.Controls[0].Op == Op386FlagEQ {
 11851  			b.Reset(BlockFirst)
 11852  			b.swapSuccessors()
 11853  			return true
 11854  		}
 11855  		// match: (GT (FlagLT_ULT) yes no)
 11856  		// result: (First no yes)
 11857  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11858  			b.Reset(BlockFirst)
 11859  			b.swapSuccessors()
 11860  			return true
 11861  		}
 11862  		// match: (GT (FlagLT_UGT) yes no)
 11863  		// result: (First no yes)
 11864  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11865  			b.Reset(BlockFirst)
 11866  			b.swapSuccessors()
 11867  			return true
 11868  		}
 11869  		// match: (GT (FlagGT_ULT) yes no)
 11870  		// result: (First yes no)
 11871  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11872  			b.Reset(BlockFirst)
 11873  			return true
 11874  		}
 11875  		// match: (GT (FlagGT_UGT) yes no)
 11876  		// result: (First yes no)
 11877  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11878  			b.Reset(BlockFirst)
 11879  			return true
 11880  		}
 11881  	case BlockIf:
 11882  		// match: (If (SETL cmp) yes no)
 11883  		// result: (LT cmp yes no)
 11884  		for b.Controls[0].Op == Op386SETL {
 11885  			v_0 := b.Controls[0]
 11886  			cmp := v_0.Args[0]
 11887  			b.resetWithControl(Block386LT, cmp)
 11888  			return true
 11889  		}
 11890  		// match: (If (SETLE cmp) yes no)
 11891  		// result: (LE cmp yes no)
 11892  		for b.Controls[0].Op == Op386SETLE {
 11893  			v_0 := b.Controls[0]
 11894  			cmp := v_0.Args[0]
 11895  			b.resetWithControl(Block386LE, cmp)
 11896  			return true
 11897  		}
 11898  		// match: (If (SETG cmp) yes no)
 11899  		// result: (GT cmp yes no)
 11900  		for b.Controls[0].Op == Op386SETG {
 11901  			v_0 := b.Controls[0]
 11902  			cmp := v_0.Args[0]
 11903  			b.resetWithControl(Block386GT, cmp)
 11904  			return true
 11905  		}
 11906  		// match: (If (SETGE cmp) yes no)
 11907  		// result: (GE cmp yes no)
 11908  		for b.Controls[0].Op == Op386SETGE {
 11909  			v_0 := b.Controls[0]
 11910  			cmp := v_0.Args[0]
 11911  			b.resetWithControl(Block386GE, cmp)
 11912  			return true
 11913  		}
 11914  		// match: (If (SETEQ cmp) yes no)
 11915  		// result: (EQ cmp yes no)
 11916  		for b.Controls[0].Op == Op386SETEQ {
 11917  			v_0 := b.Controls[0]
 11918  			cmp := v_0.Args[0]
 11919  			b.resetWithControl(Block386EQ, cmp)
 11920  			return true
 11921  		}
 11922  		// match: (If (SETNE cmp) yes no)
 11923  		// result: (NE cmp yes no)
 11924  		for b.Controls[0].Op == Op386SETNE {
 11925  			v_0 := b.Controls[0]
 11926  			cmp := v_0.Args[0]
 11927  			b.resetWithControl(Block386NE, cmp)
 11928  			return true
 11929  		}
 11930  		// match: (If (SETB cmp) yes no)
 11931  		// result: (ULT cmp yes no)
 11932  		for b.Controls[0].Op == Op386SETB {
 11933  			v_0 := b.Controls[0]
 11934  			cmp := v_0.Args[0]
 11935  			b.resetWithControl(Block386ULT, cmp)
 11936  			return true
 11937  		}
 11938  		// match: (If (SETBE cmp) yes no)
 11939  		// result: (ULE cmp yes no)
 11940  		for b.Controls[0].Op == Op386SETBE {
 11941  			v_0 := b.Controls[0]
 11942  			cmp := v_0.Args[0]
 11943  			b.resetWithControl(Block386ULE, cmp)
 11944  			return true
 11945  		}
 11946  		// match: (If (SETA cmp) yes no)
 11947  		// result: (UGT cmp yes no)
 11948  		for b.Controls[0].Op == Op386SETA {
 11949  			v_0 := b.Controls[0]
 11950  			cmp := v_0.Args[0]
 11951  			b.resetWithControl(Block386UGT, cmp)
 11952  			return true
 11953  		}
 11954  		// match: (If (SETAE cmp) yes no)
 11955  		// result: (UGE cmp yes no)
 11956  		for b.Controls[0].Op == Op386SETAE {
 11957  			v_0 := b.Controls[0]
 11958  			cmp := v_0.Args[0]
 11959  			b.resetWithControl(Block386UGE, cmp)
 11960  			return true
 11961  		}
 11962  		// match: (If (SETO cmp) yes no)
 11963  		// result: (OS cmp yes no)
 11964  		for b.Controls[0].Op == Op386SETO {
 11965  			v_0 := b.Controls[0]
 11966  			cmp := v_0.Args[0]
 11967  			b.resetWithControl(Block386OS, cmp)
 11968  			return true
 11969  		}
 11970  		// match: (If (SETGF cmp) yes no)
 11971  		// result: (UGT cmp yes no)
 11972  		for b.Controls[0].Op == Op386SETGF {
 11973  			v_0 := b.Controls[0]
 11974  			cmp := v_0.Args[0]
 11975  			b.resetWithControl(Block386UGT, cmp)
 11976  			return true
 11977  		}
 11978  		// match: (If (SETGEF cmp) yes no)
 11979  		// result: (UGE cmp yes no)
 11980  		for b.Controls[0].Op == Op386SETGEF {
 11981  			v_0 := b.Controls[0]
 11982  			cmp := v_0.Args[0]
 11983  			b.resetWithControl(Block386UGE, cmp)
 11984  			return true
 11985  		}
 11986  		// match: (If (SETEQF cmp) yes no)
 11987  		// result: (EQF cmp yes no)
 11988  		for b.Controls[0].Op == Op386SETEQF {
 11989  			v_0 := b.Controls[0]
 11990  			cmp := v_0.Args[0]
 11991  			b.resetWithControl(Block386EQF, cmp)
 11992  			return true
 11993  		}
 11994  		// match: (If (SETNEF cmp) yes no)
 11995  		// result: (NEF cmp yes no)
 11996  		for b.Controls[0].Op == Op386SETNEF {
 11997  			v_0 := b.Controls[0]
 11998  			cmp := v_0.Args[0]
 11999  			b.resetWithControl(Block386NEF, cmp)
 12000  			return true
 12001  		}
 12002  		// match: (If cond yes no)
 12003  		// result: (NE (TESTB cond cond) yes no)
 12004  		for {
 12005  			cond := b.Controls[0]
 12006  			v0 := b.NewValue0(cond.Pos, Op386TESTB, types.TypeFlags)
 12007  			v0.AddArg2(cond, cond)
 12008  			b.resetWithControl(Block386NE, v0)
 12009  			return true
 12010  		}
 12011  	case Block386LE:
 12012  		// match: (LE (InvertFlags cmp) yes no)
 12013  		// result: (GE cmp yes no)
 12014  		for b.Controls[0].Op == Op386InvertFlags {
 12015  			v_0 := b.Controls[0]
 12016  			cmp := v_0.Args[0]
 12017  			b.resetWithControl(Block386GE, cmp)
 12018  			return true
 12019  		}
 12020  		// match: (LE (FlagEQ) yes no)
 12021  		// result: (First yes no)
 12022  		for b.Controls[0].Op == Op386FlagEQ {
 12023  			b.Reset(BlockFirst)
 12024  			return true
 12025  		}
 12026  		// match: (LE (FlagLT_ULT) yes no)
 12027  		// result: (First yes no)
 12028  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12029  			b.Reset(BlockFirst)
 12030  			return true
 12031  		}
 12032  		// match: (LE (FlagLT_UGT) yes no)
 12033  		// result: (First yes no)
 12034  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12035  			b.Reset(BlockFirst)
 12036  			return true
 12037  		}
 12038  		// match: (LE (FlagGT_ULT) yes no)
 12039  		// result: (First no yes)
 12040  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12041  			b.Reset(BlockFirst)
 12042  			b.swapSuccessors()
 12043  			return true
 12044  		}
 12045  		// match: (LE (FlagGT_UGT) yes no)
 12046  		// result: (First no yes)
 12047  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12048  			b.Reset(BlockFirst)
 12049  			b.swapSuccessors()
 12050  			return true
 12051  		}
 12052  	case Block386LT:
 12053  		// match: (LT (InvertFlags cmp) yes no)
 12054  		// result: (GT cmp yes no)
 12055  		for b.Controls[0].Op == Op386InvertFlags {
 12056  			v_0 := b.Controls[0]
 12057  			cmp := v_0.Args[0]
 12058  			b.resetWithControl(Block386GT, cmp)
 12059  			return true
 12060  		}
 12061  		// match: (LT (FlagEQ) yes no)
 12062  		// result: (First no yes)
 12063  		for b.Controls[0].Op == Op386FlagEQ {
 12064  			b.Reset(BlockFirst)
 12065  			b.swapSuccessors()
 12066  			return true
 12067  		}
 12068  		// match: (LT (FlagLT_ULT) yes no)
 12069  		// result: (First yes no)
 12070  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12071  			b.Reset(BlockFirst)
 12072  			return true
 12073  		}
 12074  		// match: (LT (FlagLT_UGT) yes no)
 12075  		// result: (First yes no)
 12076  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12077  			b.Reset(BlockFirst)
 12078  			return true
 12079  		}
 12080  		// match: (LT (FlagGT_ULT) yes no)
 12081  		// result: (First no yes)
 12082  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12083  			b.Reset(BlockFirst)
 12084  			b.swapSuccessors()
 12085  			return true
 12086  		}
 12087  		// match: (LT (FlagGT_UGT) yes no)
 12088  		// result: (First no yes)
 12089  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12090  			b.Reset(BlockFirst)
 12091  			b.swapSuccessors()
 12092  			return true
 12093  		}
 12094  	case Block386NE:
 12095  		// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
 12096  		// result: (LT cmp yes no)
 12097  		for b.Controls[0].Op == Op386TESTB {
 12098  			v_0 := b.Controls[0]
 12099  			_ = v_0.Args[1]
 12100  			v_0_0 := v_0.Args[0]
 12101  			if v_0_0.Op != Op386SETL {
 12102  				break
 12103  			}
 12104  			cmp := v_0_0.Args[0]
 12105  			v_0_1 := v_0.Args[1]
 12106  			if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] {
 12107  				break
 12108  			}
 12109  			b.resetWithControl(Block386LT, cmp)
 12110  			return true
 12111  		}
 12112  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 12113  		// result: (LE cmp yes no)
 12114  		for b.Controls[0].Op == Op386TESTB {
 12115  			v_0 := b.Controls[0]
 12116  			_ = v_0.Args[1]
 12117  			v_0_0 := v_0.Args[0]
 12118  			if v_0_0.Op != Op386SETLE {
 12119  				break
 12120  			}
 12121  			cmp := v_0_0.Args[0]
 12122  			v_0_1 := v_0.Args[1]
 12123  			if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] {
 12124  				break
 12125  			}
 12126  			b.resetWithControl(Block386LE, cmp)
 12127  			return true
 12128  		}
 12129  		// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
 12130  		// result: (GT cmp yes no)
 12131  		for b.Controls[0].Op == Op386TESTB {
 12132  			v_0 := b.Controls[0]
 12133  			_ = v_0.Args[1]
 12134  			v_0_0 := v_0.Args[0]
 12135  			if v_0_0.Op != Op386SETG {
 12136  				break
 12137  			}
 12138  			cmp := v_0_0.Args[0]
 12139  			v_0_1 := v_0.Args[1]
 12140  			if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] {
 12141  				break
 12142  			}
 12143  			b.resetWithControl(Block386GT, cmp)
 12144  			return true
 12145  		}
 12146  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 12147  		// result: (GE cmp yes no)
 12148  		for b.Controls[0].Op == Op386TESTB {
 12149  			v_0 := b.Controls[0]
 12150  			_ = v_0.Args[1]
 12151  			v_0_0 := v_0.Args[0]
 12152  			if v_0_0.Op != Op386SETGE {
 12153  				break
 12154  			}
 12155  			cmp := v_0_0.Args[0]
 12156  			v_0_1 := v_0.Args[1]
 12157  			if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] {
 12158  				break
 12159  			}
 12160  			b.resetWithControl(Block386GE, cmp)
 12161  			return true
 12162  		}
 12163  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 12164  		// result: (EQ cmp yes no)
 12165  		for b.Controls[0].Op == Op386TESTB {
 12166  			v_0 := b.Controls[0]
 12167  			_ = v_0.Args[1]
 12168  			v_0_0 := v_0.Args[0]
 12169  			if v_0_0.Op != Op386SETEQ {
 12170  				break
 12171  			}
 12172  			cmp := v_0_0.Args[0]
 12173  			v_0_1 := v_0.Args[1]
 12174  			if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] {
 12175  				break
 12176  			}
 12177  			b.resetWithControl(Block386EQ, cmp)
 12178  			return true
 12179  		}
 12180  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 12181  		// result: (NE cmp yes no)
 12182  		for b.Controls[0].Op == Op386TESTB {
 12183  			v_0 := b.Controls[0]
 12184  			_ = v_0.Args[1]
 12185  			v_0_0 := v_0.Args[0]
 12186  			if v_0_0.Op != Op386SETNE {
 12187  				break
 12188  			}
 12189  			cmp := v_0_0.Args[0]
 12190  			v_0_1 := v_0.Args[1]
 12191  			if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] {
 12192  				break
 12193  			}
 12194  			b.resetWithControl(Block386NE, cmp)
 12195  			return true
 12196  		}
 12197  		// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
 12198  		// result: (ULT cmp yes no)
 12199  		for b.Controls[0].Op == Op386TESTB {
 12200  			v_0 := b.Controls[0]
 12201  			_ = v_0.Args[1]
 12202  			v_0_0 := v_0.Args[0]
 12203  			if v_0_0.Op != Op386SETB {
 12204  				break
 12205  			}
 12206  			cmp := v_0_0.Args[0]
 12207  			v_0_1 := v_0.Args[1]
 12208  			if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] {
 12209  				break
 12210  			}
 12211  			b.resetWithControl(Block386ULT, cmp)
 12212  			return true
 12213  		}
 12214  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 12215  		// result: (ULE cmp yes no)
 12216  		for b.Controls[0].Op == Op386TESTB {
 12217  			v_0 := b.Controls[0]
 12218  			_ = v_0.Args[1]
 12219  			v_0_0 := v_0.Args[0]
 12220  			if v_0_0.Op != Op386SETBE {
 12221  				break
 12222  			}
 12223  			cmp := v_0_0.Args[0]
 12224  			v_0_1 := v_0.Args[1]
 12225  			if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] {
 12226  				break
 12227  			}
 12228  			b.resetWithControl(Block386ULE, cmp)
 12229  			return true
 12230  		}
 12231  		// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
 12232  		// result: (UGT cmp yes no)
 12233  		for b.Controls[0].Op == Op386TESTB {
 12234  			v_0 := b.Controls[0]
 12235  			_ = v_0.Args[1]
 12236  			v_0_0 := v_0.Args[0]
 12237  			if v_0_0.Op != Op386SETA {
 12238  				break
 12239  			}
 12240  			cmp := v_0_0.Args[0]
 12241  			v_0_1 := v_0.Args[1]
 12242  			if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] {
 12243  				break
 12244  			}
 12245  			b.resetWithControl(Block386UGT, cmp)
 12246  			return true
 12247  		}
 12248  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 12249  		// result: (UGE cmp yes no)
 12250  		for b.Controls[0].Op == Op386TESTB {
 12251  			v_0 := b.Controls[0]
 12252  			_ = v_0.Args[1]
 12253  			v_0_0 := v_0.Args[0]
 12254  			if v_0_0.Op != Op386SETAE {
 12255  				break
 12256  			}
 12257  			cmp := v_0_0.Args[0]
 12258  			v_0_1 := v_0.Args[1]
 12259  			if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] {
 12260  				break
 12261  			}
 12262  			b.resetWithControl(Block386UGE, cmp)
 12263  			return true
 12264  		}
 12265  		// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
 12266  		// result: (OS cmp yes no)
 12267  		for b.Controls[0].Op == Op386TESTB {
 12268  			v_0 := b.Controls[0]
 12269  			_ = v_0.Args[1]
 12270  			v_0_0 := v_0.Args[0]
 12271  			if v_0_0.Op != Op386SETO {
 12272  				break
 12273  			}
 12274  			cmp := v_0_0.Args[0]
 12275  			v_0_1 := v_0.Args[1]
 12276  			if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] {
 12277  				break
 12278  			}
 12279  			b.resetWithControl(Block386OS, cmp)
 12280  			return true
 12281  		}
 12282  		// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
 12283  		// result: (UGT cmp yes no)
 12284  		for b.Controls[0].Op == Op386TESTB {
 12285  			v_0 := b.Controls[0]
 12286  			_ = v_0.Args[1]
 12287  			v_0_0 := v_0.Args[0]
 12288  			if v_0_0.Op != Op386SETGF {
 12289  				break
 12290  			}
 12291  			cmp := v_0_0.Args[0]
 12292  			v_0_1 := v_0.Args[1]
 12293  			if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] {
 12294  				break
 12295  			}
 12296  			b.resetWithControl(Block386UGT, cmp)
 12297  			return true
 12298  		}
 12299  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 12300  		// result: (UGE cmp yes no)
 12301  		for b.Controls[0].Op == Op386TESTB {
 12302  			v_0 := b.Controls[0]
 12303  			_ = v_0.Args[1]
 12304  			v_0_0 := v_0.Args[0]
 12305  			if v_0_0.Op != Op386SETGEF {
 12306  				break
 12307  			}
 12308  			cmp := v_0_0.Args[0]
 12309  			v_0_1 := v_0.Args[1]
 12310  			if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] {
 12311  				break
 12312  			}
 12313  			b.resetWithControl(Block386UGE, cmp)
 12314  			return true
 12315  		}
 12316  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 12317  		// result: (EQF cmp yes no)
 12318  		for b.Controls[0].Op == Op386TESTB {
 12319  			v_0 := b.Controls[0]
 12320  			_ = v_0.Args[1]
 12321  			v_0_0 := v_0.Args[0]
 12322  			if v_0_0.Op != Op386SETEQF {
 12323  				break
 12324  			}
 12325  			cmp := v_0_0.Args[0]
 12326  			v_0_1 := v_0.Args[1]
 12327  			if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] {
 12328  				break
 12329  			}
 12330  			b.resetWithControl(Block386EQF, cmp)
 12331  			return true
 12332  		}
 12333  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 12334  		// result: (NEF cmp yes no)
 12335  		for b.Controls[0].Op == Op386TESTB {
 12336  			v_0 := b.Controls[0]
 12337  			_ = v_0.Args[1]
 12338  			v_0_0 := v_0.Args[0]
 12339  			if v_0_0.Op != Op386SETNEF {
 12340  				break
 12341  			}
 12342  			cmp := v_0_0.Args[0]
 12343  			v_0_1 := v_0.Args[1]
 12344  			if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] {
 12345  				break
 12346  			}
 12347  			b.resetWithControl(Block386NEF, cmp)
 12348  			return true
 12349  		}
 12350  		// match: (NE (InvertFlags cmp) yes no)
 12351  		// result: (NE cmp yes no)
 12352  		for b.Controls[0].Op == Op386InvertFlags {
 12353  			v_0 := b.Controls[0]
 12354  			cmp := v_0.Args[0]
 12355  			b.resetWithControl(Block386NE, cmp)
 12356  			return true
 12357  		}
 12358  		// match: (NE (FlagEQ) yes no)
 12359  		// result: (First no yes)
 12360  		for b.Controls[0].Op == Op386FlagEQ {
 12361  			b.Reset(BlockFirst)
 12362  			b.swapSuccessors()
 12363  			return true
 12364  		}
 12365  		// match: (NE (FlagLT_ULT) yes no)
 12366  		// result: (First yes no)
 12367  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12368  			b.Reset(BlockFirst)
 12369  			return true
 12370  		}
 12371  		// match: (NE (FlagLT_UGT) yes no)
 12372  		// result: (First yes no)
 12373  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12374  			b.Reset(BlockFirst)
 12375  			return true
 12376  		}
 12377  		// match: (NE (FlagGT_ULT) yes no)
 12378  		// result: (First yes no)
 12379  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12380  			b.Reset(BlockFirst)
 12381  			return true
 12382  		}
 12383  		// match: (NE (FlagGT_UGT) yes no)
 12384  		// result: (First yes no)
 12385  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12386  			b.Reset(BlockFirst)
 12387  			return true
 12388  		}
 12389  	case Block386UGE:
 12390  		// match: (UGE (InvertFlags cmp) yes no)
 12391  		// result: (ULE cmp yes no)
 12392  		for b.Controls[0].Op == Op386InvertFlags {
 12393  			v_0 := b.Controls[0]
 12394  			cmp := v_0.Args[0]
 12395  			b.resetWithControl(Block386ULE, cmp)
 12396  			return true
 12397  		}
 12398  		// match: (UGE (FlagEQ) yes no)
 12399  		// result: (First yes no)
 12400  		for b.Controls[0].Op == Op386FlagEQ {
 12401  			b.Reset(BlockFirst)
 12402  			return true
 12403  		}
 12404  		// match: (UGE (FlagLT_ULT) yes no)
 12405  		// result: (First no yes)
 12406  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12407  			b.Reset(BlockFirst)
 12408  			b.swapSuccessors()
 12409  			return true
 12410  		}
 12411  		// match: (UGE (FlagLT_UGT) yes no)
 12412  		// result: (First yes no)
 12413  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12414  			b.Reset(BlockFirst)
 12415  			return true
 12416  		}
 12417  		// match: (UGE (FlagGT_ULT) yes no)
 12418  		// result: (First no yes)
 12419  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12420  			b.Reset(BlockFirst)
 12421  			b.swapSuccessors()
 12422  			return true
 12423  		}
 12424  		// match: (UGE (FlagGT_UGT) yes no)
 12425  		// result: (First yes no)
 12426  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12427  			b.Reset(BlockFirst)
 12428  			return true
 12429  		}
 12430  	case Block386UGT:
 12431  		// match: (UGT (InvertFlags cmp) yes no)
 12432  		// result: (ULT cmp yes no)
 12433  		for b.Controls[0].Op == Op386InvertFlags {
 12434  			v_0 := b.Controls[0]
 12435  			cmp := v_0.Args[0]
 12436  			b.resetWithControl(Block386ULT, cmp)
 12437  			return true
 12438  		}
 12439  		// match: (UGT (FlagEQ) yes no)
 12440  		// result: (First no yes)
 12441  		for b.Controls[0].Op == Op386FlagEQ {
 12442  			b.Reset(BlockFirst)
 12443  			b.swapSuccessors()
 12444  			return true
 12445  		}
 12446  		// match: (UGT (FlagLT_ULT) yes no)
 12447  		// result: (First no yes)
 12448  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12449  			b.Reset(BlockFirst)
 12450  			b.swapSuccessors()
 12451  			return true
 12452  		}
 12453  		// match: (UGT (FlagLT_UGT) yes no)
 12454  		// result: (First yes no)
 12455  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12456  			b.Reset(BlockFirst)
 12457  			return true
 12458  		}
 12459  		// match: (UGT (FlagGT_ULT) yes no)
 12460  		// result: (First no yes)
 12461  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12462  			b.Reset(BlockFirst)
 12463  			b.swapSuccessors()
 12464  			return true
 12465  		}
 12466  		// match: (UGT (FlagGT_UGT) yes no)
 12467  		// result: (First yes no)
 12468  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12469  			b.Reset(BlockFirst)
 12470  			return true
 12471  		}
 12472  	case Block386ULE:
 12473  		// match: (ULE (InvertFlags cmp) yes no)
 12474  		// result: (UGE cmp yes no)
 12475  		for b.Controls[0].Op == Op386InvertFlags {
 12476  			v_0 := b.Controls[0]
 12477  			cmp := v_0.Args[0]
 12478  			b.resetWithControl(Block386UGE, cmp)
 12479  			return true
 12480  		}
 12481  		// match: (ULE (FlagEQ) yes no)
 12482  		// result: (First yes no)
 12483  		for b.Controls[0].Op == Op386FlagEQ {
 12484  			b.Reset(BlockFirst)
 12485  			return true
 12486  		}
 12487  		// match: (ULE (FlagLT_ULT) yes no)
 12488  		// result: (First yes no)
 12489  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12490  			b.Reset(BlockFirst)
 12491  			return true
 12492  		}
 12493  		// match: (ULE (FlagLT_UGT) yes no)
 12494  		// result: (First no yes)
 12495  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12496  			b.Reset(BlockFirst)
 12497  			b.swapSuccessors()
 12498  			return true
 12499  		}
 12500  		// match: (ULE (FlagGT_ULT) yes no)
 12501  		// result: (First yes no)
 12502  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12503  			b.Reset(BlockFirst)
 12504  			return true
 12505  		}
 12506  		// match: (ULE (FlagGT_UGT) yes no)
 12507  		// result: (First no yes)
 12508  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12509  			b.Reset(BlockFirst)
 12510  			b.swapSuccessors()
 12511  			return true
 12512  		}
 12513  	case Block386ULT:
 12514  		// match: (ULT (InvertFlags cmp) yes no)
 12515  		// result: (UGT cmp yes no)
 12516  		for b.Controls[0].Op == Op386InvertFlags {
 12517  			v_0 := b.Controls[0]
 12518  			cmp := v_0.Args[0]
 12519  			b.resetWithControl(Block386UGT, cmp)
 12520  			return true
 12521  		}
 12522  		// match: (ULT (FlagEQ) yes no)
 12523  		// result: (First no yes)
 12524  		for b.Controls[0].Op == Op386FlagEQ {
 12525  			b.Reset(BlockFirst)
 12526  			b.swapSuccessors()
 12527  			return true
 12528  		}
 12529  		// match: (ULT (FlagLT_ULT) yes no)
 12530  		// result: (First yes no)
 12531  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12532  			b.Reset(BlockFirst)
 12533  			return true
 12534  		}
 12535  		// match: (ULT (FlagLT_UGT) yes no)
 12536  		// result: (First no yes)
 12537  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12538  			b.Reset(BlockFirst)
 12539  			b.swapSuccessors()
 12540  			return true
 12541  		}
 12542  		// match: (ULT (FlagGT_ULT) yes no)
 12543  		// result: (First yes no)
 12544  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12545  			b.Reset(BlockFirst)
 12546  			return true
 12547  		}
 12548  		// match: (ULT (FlagGT_UGT) yes no)
 12549  		// result: (First no yes)
 12550  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12551  			b.Reset(BlockFirst)
 12552  			b.swapSuccessors()
 12553  			return true
 12554  		}
 12555  	}
 12556  	return false
 12557  }
 12558  

View as plain text