Black Lives Matter. Support the Equal Justice Initiative.

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

Documentation: cmd/compile/internal/ssa

     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 OpStaticCall:
   624  		v.Op = Op386CALLstatic
   625  		return true
   626  	case OpStore:
   627  		return rewriteValue386_OpStore(v)
   628  	case OpSub16:
   629  		v.Op = Op386SUBL
   630  		return true
   631  	case OpSub32:
   632  		v.Op = Op386SUBL
   633  		return true
   634  	case OpSub32F:
   635  		v.Op = Op386SUBSS
   636  		return true
   637  	case OpSub32carry:
   638  		v.Op = Op386SUBLcarry
   639  		return true
   640  	case OpSub32withcarry:
   641  		v.Op = Op386SBBL
   642  		return true
   643  	case OpSub64F:
   644  		v.Op = Op386SUBSD
   645  		return true
   646  	case OpSub8:
   647  		v.Op = Op386SUBL
   648  		return true
   649  	case OpSubPtr:
   650  		v.Op = Op386SUBL
   651  		return true
   652  	case OpTrunc16to8:
   653  		v.Op = OpCopy
   654  		return true
   655  	case OpTrunc32to16:
   656  		v.Op = OpCopy
   657  		return true
   658  	case OpTrunc32to8:
   659  		v.Op = OpCopy
   660  		return true
   661  	case OpWB:
   662  		v.Op = Op386LoweredWB
   663  		return true
   664  	case OpXor16:
   665  		v.Op = Op386XORL
   666  		return true
   667  	case OpXor32:
   668  		v.Op = Op386XORL
   669  		return true
   670  	case OpXor8:
   671  		v.Op = Op386XORL
   672  		return true
   673  	case OpZero:
   674  		return rewriteValue386_OpZero(v)
   675  	case OpZeroExt16to32:
   676  		v.Op = Op386MOVWLZX
   677  		return true
   678  	case OpZeroExt8to16:
   679  		v.Op = Op386MOVBLZX
   680  		return true
   681  	case OpZeroExt8to32:
   682  		v.Op = Op386MOVBLZX
   683  		return true
   684  	case OpZeromask:
   685  		return rewriteValue386_OpZeromask(v)
   686  	}
   687  	return false
   688  }
   689  func rewriteValue386_Op386ADCL(v *Value) bool {
   690  	v_2 := v.Args[2]
   691  	v_1 := v.Args[1]
   692  	v_0 := v.Args[0]
   693  	// match: (ADCL x (MOVLconst [c]) f)
   694  	// result: (ADCLconst [c] x f)
   695  	for {
   696  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   697  			x := v_0
   698  			if v_1.Op != Op386MOVLconst {
   699  				continue
   700  			}
   701  			c := auxIntToInt32(v_1.AuxInt)
   702  			f := v_2
   703  			v.reset(Op386ADCLconst)
   704  			v.AuxInt = int32ToAuxInt(c)
   705  			v.AddArg2(x, f)
   706  			return true
   707  		}
   708  		break
   709  	}
   710  	return false
   711  }
   712  func rewriteValue386_Op386ADDL(v *Value) bool {
   713  	v_1 := v.Args[1]
   714  	v_0 := v.Args[0]
   715  	// match: (ADDL x (MOVLconst [c]))
   716  	// result: (ADDLconst [c] x)
   717  	for {
   718  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   719  			x := v_0
   720  			if v_1.Op != Op386MOVLconst {
   721  				continue
   722  			}
   723  			c := auxIntToInt32(v_1.AuxInt)
   724  			v.reset(Op386ADDLconst)
   725  			v.AuxInt = int32ToAuxInt(c)
   726  			v.AddArg(x)
   727  			return true
   728  		}
   729  		break
   730  	}
   731  	// match: (ADDL (SHLLconst [c] x) (SHRLconst [d] x))
   732  	// cond: d == 32-c
   733  	// result: (ROLLconst [c] x)
   734  	for {
   735  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   736  			if v_0.Op != Op386SHLLconst {
   737  				continue
   738  			}
   739  			c := auxIntToInt32(v_0.AuxInt)
   740  			x := v_0.Args[0]
   741  			if v_1.Op != Op386SHRLconst {
   742  				continue
   743  			}
   744  			d := auxIntToInt32(v_1.AuxInt)
   745  			if x != v_1.Args[0] || !(d == 32-c) {
   746  				continue
   747  			}
   748  			v.reset(Op386ROLLconst)
   749  			v.AuxInt = int32ToAuxInt(c)
   750  			v.AddArg(x)
   751  			return true
   752  		}
   753  		break
   754  	}
   755  	// match: (ADDL <t> (SHLLconst x [c]) (SHRWconst x [d]))
   756  	// cond: c < 16 && d == int16(16-c) && t.Size() == 2
   757  	// result: (ROLWconst x [int16(c)])
   758  	for {
   759  		t := v.Type
   760  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   761  			if v_0.Op != Op386SHLLconst {
   762  				continue
   763  			}
   764  			c := auxIntToInt32(v_0.AuxInt)
   765  			x := v_0.Args[0]
   766  			if v_1.Op != Op386SHRWconst {
   767  				continue
   768  			}
   769  			d := auxIntToInt16(v_1.AuxInt)
   770  			if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
   771  				continue
   772  			}
   773  			v.reset(Op386ROLWconst)
   774  			v.AuxInt = int16ToAuxInt(int16(c))
   775  			v.AddArg(x)
   776  			return true
   777  		}
   778  		break
   779  	}
   780  	// match: (ADDL <t> (SHLLconst x [c]) (SHRBconst x [d]))
   781  	// cond: c < 8 && d == int8(8-c) && t.Size() == 1
   782  	// result: (ROLBconst x [int8(c)])
   783  	for {
   784  		t := v.Type
   785  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   786  			if v_0.Op != Op386SHLLconst {
   787  				continue
   788  			}
   789  			c := auxIntToInt32(v_0.AuxInt)
   790  			x := v_0.Args[0]
   791  			if v_1.Op != Op386SHRBconst {
   792  				continue
   793  			}
   794  			d := auxIntToInt8(v_1.AuxInt)
   795  			if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
   796  				continue
   797  			}
   798  			v.reset(Op386ROLBconst)
   799  			v.AuxInt = int8ToAuxInt(int8(c))
   800  			v.AddArg(x)
   801  			return true
   802  		}
   803  		break
   804  	}
   805  	// match: (ADDL x (SHLLconst [3] y))
   806  	// result: (LEAL8 x y)
   807  	for {
   808  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   809  			x := v_0
   810  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
   811  				continue
   812  			}
   813  			y := v_1.Args[0]
   814  			v.reset(Op386LEAL8)
   815  			v.AddArg2(x, y)
   816  			return true
   817  		}
   818  		break
   819  	}
   820  	// match: (ADDL x (SHLLconst [2] y))
   821  	// result: (LEAL4 x y)
   822  	for {
   823  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   824  			x := v_0
   825  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
   826  				continue
   827  			}
   828  			y := v_1.Args[0]
   829  			v.reset(Op386LEAL4)
   830  			v.AddArg2(x, y)
   831  			return true
   832  		}
   833  		break
   834  	}
   835  	// match: (ADDL x (SHLLconst [1] y))
   836  	// result: (LEAL2 x y)
   837  	for {
   838  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   839  			x := v_0
   840  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
   841  				continue
   842  			}
   843  			y := v_1.Args[0]
   844  			v.reset(Op386LEAL2)
   845  			v.AddArg2(x, y)
   846  			return true
   847  		}
   848  		break
   849  	}
   850  	// match: (ADDL x (ADDL y y))
   851  	// result: (LEAL2 x y)
   852  	for {
   853  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   854  			x := v_0
   855  			if v_1.Op != Op386ADDL {
   856  				continue
   857  			}
   858  			y := v_1.Args[1]
   859  			if y != v_1.Args[0] {
   860  				continue
   861  			}
   862  			v.reset(Op386LEAL2)
   863  			v.AddArg2(x, y)
   864  			return true
   865  		}
   866  		break
   867  	}
   868  	// match: (ADDL x (ADDL x y))
   869  	// result: (LEAL2 y x)
   870  	for {
   871  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   872  			x := v_0
   873  			if v_1.Op != Op386ADDL {
   874  				continue
   875  			}
   876  			_ = v_1.Args[1]
   877  			v_1_0 := v_1.Args[0]
   878  			v_1_1 := v_1.Args[1]
   879  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
   880  				if x != v_1_0 {
   881  					continue
   882  				}
   883  				y := v_1_1
   884  				v.reset(Op386LEAL2)
   885  				v.AddArg2(y, x)
   886  				return true
   887  			}
   888  		}
   889  		break
   890  	}
   891  	// match: (ADDL (ADDLconst [c] x) y)
   892  	// result: (LEAL1 [c] x y)
   893  	for {
   894  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   895  			if v_0.Op != Op386ADDLconst {
   896  				continue
   897  			}
   898  			c := auxIntToInt32(v_0.AuxInt)
   899  			x := v_0.Args[0]
   900  			y := v_1
   901  			v.reset(Op386LEAL1)
   902  			v.AuxInt = int32ToAuxInt(c)
   903  			v.AddArg2(x, y)
   904  			return true
   905  		}
   906  		break
   907  	}
   908  	// match: (ADDL x (LEAL [c] {s} y))
   909  	// cond: x.Op != OpSB && y.Op != OpSB
   910  	// result: (LEAL1 [c] {s} x y)
   911  	for {
   912  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   913  			x := v_0
   914  			if v_1.Op != Op386LEAL {
   915  				continue
   916  			}
   917  			c := auxIntToInt32(v_1.AuxInt)
   918  			s := auxToSym(v_1.Aux)
   919  			y := v_1.Args[0]
   920  			if !(x.Op != OpSB && y.Op != OpSB) {
   921  				continue
   922  			}
   923  			v.reset(Op386LEAL1)
   924  			v.AuxInt = int32ToAuxInt(c)
   925  			v.Aux = symToAux(s)
   926  			v.AddArg2(x, y)
   927  			return true
   928  		}
   929  		break
   930  	}
   931  	// match: (ADDL x l:(MOVLload [off] {sym} ptr mem))
   932  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
   933  	// result: (ADDLload x [off] {sym} ptr mem)
   934  	for {
   935  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   936  			x := v_0
   937  			l := v_1
   938  			if l.Op != Op386MOVLload {
   939  				continue
   940  			}
   941  			off := auxIntToInt32(l.AuxInt)
   942  			sym := auxToSym(l.Aux)
   943  			mem := l.Args[1]
   944  			ptr := l.Args[0]
   945  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
   946  				continue
   947  			}
   948  			v.reset(Op386ADDLload)
   949  			v.AuxInt = int32ToAuxInt(off)
   950  			v.Aux = symToAux(sym)
   951  			v.AddArg3(x, ptr, mem)
   952  			return true
   953  		}
   954  		break
   955  	}
   956  	// match: (ADDL x (NEGL y))
   957  	// result: (SUBL x y)
   958  	for {
   959  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   960  			x := v_0
   961  			if v_1.Op != Op386NEGL {
   962  				continue
   963  			}
   964  			y := v_1.Args[0]
   965  			v.reset(Op386SUBL)
   966  			v.AddArg2(x, y)
   967  			return true
   968  		}
   969  		break
   970  	}
   971  	return false
   972  }
   973  func rewriteValue386_Op386ADDLcarry(v *Value) bool {
   974  	v_1 := v.Args[1]
   975  	v_0 := v.Args[0]
   976  	// match: (ADDLcarry x (MOVLconst [c]))
   977  	// result: (ADDLconstcarry [c] x)
   978  	for {
   979  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
   980  			x := v_0
   981  			if v_1.Op != Op386MOVLconst {
   982  				continue
   983  			}
   984  			c := auxIntToInt32(v_1.AuxInt)
   985  			v.reset(Op386ADDLconstcarry)
   986  			v.AuxInt = int32ToAuxInt(c)
   987  			v.AddArg(x)
   988  			return true
   989  		}
   990  		break
   991  	}
   992  	return false
   993  }
   994  func rewriteValue386_Op386ADDLconst(v *Value) bool {
   995  	v_0 := v.Args[0]
   996  	// match: (ADDLconst [c] (ADDL x y))
   997  	// result: (LEAL1 [c] x y)
   998  	for {
   999  		c := auxIntToInt32(v.AuxInt)
  1000  		if v_0.Op != Op386ADDL {
  1001  			break
  1002  		}
  1003  		y := v_0.Args[1]
  1004  		x := v_0.Args[0]
  1005  		v.reset(Op386LEAL1)
  1006  		v.AuxInt = int32ToAuxInt(c)
  1007  		v.AddArg2(x, y)
  1008  		return true
  1009  	}
  1010  	// match: (ADDLconst [c] (LEAL [d] {s} x))
  1011  	// cond: is32Bit(int64(c)+int64(d))
  1012  	// result: (LEAL [c+d] {s} x)
  1013  	for {
  1014  		c := auxIntToInt32(v.AuxInt)
  1015  		if v_0.Op != Op386LEAL {
  1016  			break
  1017  		}
  1018  		d := auxIntToInt32(v_0.AuxInt)
  1019  		s := auxToSym(v_0.Aux)
  1020  		x := v_0.Args[0]
  1021  		if !(is32Bit(int64(c) + int64(d))) {
  1022  			break
  1023  		}
  1024  		v.reset(Op386LEAL)
  1025  		v.AuxInt = int32ToAuxInt(c + d)
  1026  		v.Aux = symToAux(s)
  1027  		v.AddArg(x)
  1028  		return true
  1029  	}
  1030  	// match: (ADDLconst [c] x:(SP))
  1031  	// result: (LEAL [c] x)
  1032  	for {
  1033  		c := auxIntToInt32(v.AuxInt)
  1034  		x := v_0
  1035  		if x.Op != OpSP {
  1036  			break
  1037  		}
  1038  		v.reset(Op386LEAL)
  1039  		v.AuxInt = int32ToAuxInt(c)
  1040  		v.AddArg(x)
  1041  		return true
  1042  	}
  1043  	// match: (ADDLconst [c] (LEAL1 [d] {s} x y))
  1044  	// cond: is32Bit(int64(c)+int64(d))
  1045  	// result: (LEAL1 [c+d] {s} x y)
  1046  	for {
  1047  		c := auxIntToInt32(v.AuxInt)
  1048  		if v_0.Op != Op386LEAL1 {
  1049  			break
  1050  		}
  1051  		d := auxIntToInt32(v_0.AuxInt)
  1052  		s := auxToSym(v_0.Aux)
  1053  		y := v_0.Args[1]
  1054  		x := v_0.Args[0]
  1055  		if !(is32Bit(int64(c) + int64(d))) {
  1056  			break
  1057  		}
  1058  		v.reset(Op386LEAL1)
  1059  		v.AuxInt = int32ToAuxInt(c + d)
  1060  		v.Aux = symToAux(s)
  1061  		v.AddArg2(x, y)
  1062  		return true
  1063  	}
  1064  	// match: (ADDLconst [c] (LEAL2 [d] {s} x y))
  1065  	// cond: is32Bit(int64(c)+int64(d))
  1066  	// result: (LEAL2 [c+d] {s} x y)
  1067  	for {
  1068  		c := auxIntToInt32(v.AuxInt)
  1069  		if v_0.Op != Op386LEAL2 {
  1070  			break
  1071  		}
  1072  		d := auxIntToInt32(v_0.AuxInt)
  1073  		s := auxToSym(v_0.Aux)
  1074  		y := v_0.Args[1]
  1075  		x := v_0.Args[0]
  1076  		if !(is32Bit(int64(c) + int64(d))) {
  1077  			break
  1078  		}
  1079  		v.reset(Op386LEAL2)
  1080  		v.AuxInt = int32ToAuxInt(c + d)
  1081  		v.Aux = symToAux(s)
  1082  		v.AddArg2(x, y)
  1083  		return true
  1084  	}
  1085  	// match: (ADDLconst [c] (LEAL4 [d] {s} x y))
  1086  	// cond: is32Bit(int64(c)+int64(d))
  1087  	// result: (LEAL4 [c+d] {s} x y)
  1088  	for {
  1089  		c := auxIntToInt32(v.AuxInt)
  1090  		if v_0.Op != Op386LEAL4 {
  1091  			break
  1092  		}
  1093  		d := auxIntToInt32(v_0.AuxInt)
  1094  		s := auxToSym(v_0.Aux)
  1095  		y := v_0.Args[1]
  1096  		x := v_0.Args[0]
  1097  		if !(is32Bit(int64(c) + int64(d))) {
  1098  			break
  1099  		}
  1100  		v.reset(Op386LEAL4)
  1101  		v.AuxInt = int32ToAuxInt(c + d)
  1102  		v.Aux = symToAux(s)
  1103  		v.AddArg2(x, y)
  1104  		return true
  1105  	}
  1106  	// match: (ADDLconst [c] (LEAL8 [d] {s} x y))
  1107  	// cond: is32Bit(int64(c)+int64(d))
  1108  	// result: (LEAL8 [c+d] {s} x y)
  1109  	for {
  1110  		c := auxIntToInt32(v.AuxInt)
  1111  		if v_0.Op != Op386LEAL8 {
  1112  			break
  1113  		}
  1114  		d := auxIntToInt32(v_0.AuxInt)
  1115  		s := auxToSym(v_0.Aux)
  1116  		y := v_0.Args[1]
  1117  		x := v_0.Args[0]
  1118  		if !(is32Bit(int64(c) + int64(d))) {
  1119  			break
  1120  		}
  1121  		v.reset(Op386LEAL8)
  1122  		v.AuxInt = int32ToAuxInt(c + d)
  1123  		v.Aux = symToAux(s)
  1124  		v.AddArg2(x, y)
  1125  		return true
  1126  	}
  1127  	// match: (ADDLconst [c] x)
  1128  	// cond: c==0
  1129  	// result: x
  1130  	for {
  1131  		c := auxIntToInt32(v.AuxInt)
  1132  		x := v_0
  1133  		if !(c == 0) {
  1134  			break
  1135  		}
  1136  		v.copyOf(x)
  1137  		return true
  1138  	}
  1139  	// match: (ADDLconst [c] (MOVLconst [d]))
  1140  	// result: (MOVLconst [c+d])
  1141  	for {
  1142  		c := auxIntToInt32(v.AuxInt)
  1143  		if v_0.Op != Op386MOVLconst {
  1144  			break
  1145  		}
  1146  		d := auxIntToInt32(v_0.AuxInt)
  1147  		v.reset(Op386MOVLconst)
  1148  		v.AuxInt = int32ToAuxInt(c + d)
  1149  		return true
  1150  	}
  1151  	// match: (ADDLconst [c] (ADDLconst [d] x))
  1152  	// result: (ADDLconst [c+d] x)
  1153  	for {
  1154  		c := auxIntToInt32(v.AuxInt)
  1155  		if v_0.Op != Op386ADDLconst {
  1156  			break
  1157  		}
  1158  		d := auxIntToInt32(v_0.AuxInt)
  1159  		x := v_0.Args[0]
  1160  		v.reset(Op386ADDLconst)
  1161  		v.AuxInt = int32ToAuxInt(c + d)
  1162  		v.AddArg(x)
  1163  		return true
  1164  	}
  1165  	return false
  1166  }
  1167  func rewriteValue386_Op386ADDLconstmodify(v *Value) bool {
  1168  	v_1 := v.Args[1]
  1169  	v_0 := v.Args[0]
  1170  	b := v.Block
  1171  	config := b.Func.Config
  1172  	// match: (ADDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1173  	// cond: valoff1.canAdd32(off2)
  1174  	// result: (ADDLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  1175  	for {
  1176  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1177  		sym := auxToSym(v.Aux)
  1178  		if v_0.Op != Op386ADDLconst {
  1179  			break
  1180  		}
  1181  		off2 := auxIntToInt32(v_0.AuxInt)
  1182  		base := v_0.Args[0]
  1183  		mem := v_1
  1184  		if !(valoff1.canAdd32(off2)) {
  1185  			break
  1186  		}
  1187  		v.reset(Op386ADDLconstmodify)
  1188  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1189  		v.Aux = symToAux(sym)
  1190  		v.AddArg2(base, mem)
  1191  		return true
  1192  	}
  1193  	// match: (ADDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1194  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1195  	// result: (ADDLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  1196  	for {
  1197  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1198  		sym1 := auxToSym(v.Aux)
  1199  		if v_0.Op != Op386LEAL {
  1200  			break
  1201  		}
  1202  		off2 := auxIntToInt32(v_0.AuxInt)
  1203  		sym2 := auxToSym(v_0.Aux)
  1204  		base := v_0.Args[0]
  1205  		mem := v_1
  1206  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1207  			break
  1208  		}
  1209  		v.reset(Op386ADDLconstmodify)
  1210  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1211  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1212  		v.AddArg2(base, mem)
  1213  		return true
  1214  	}
  1215  	return false
  1216  }
  1217  func rewriteValue386_Op386ADDLload(v *Value) bool {
  1218  	v_2 := v.Args[2]
  1219  	v_1 := v.Args[1]
  1220  	v_0 := v.Args[0]
  1221  	b := v.Block
  1222  	config := b.Func.Config
  1223  	// match: (ADDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1224  	// cond: is32Bit(int64(off1)+int64(off2))
  1225  	// result: (ADDLload [off1+off2] {sym} val base mem)
  1226  	for {
  1227  		off1 := auxIntToInt32(v.AuxInt)
  1228  		sym := auxToSym(v.Aux)
  1229  		val := v_0
  1230  		if v_1.Op != Op386ADDLconst {
  1231  			break
  1232  		}
  1233  		off2 := auxIntToInt32(v_1.AuxInt)
  1234  		base := v_1.Args[0]
  1235  		mem := v_2
  1236  		if !(is32Bit(int64(off1) + int64(off2))) {
  1237  			break
  1238  		}
  1239  		v.reset(Op386ADDLload)
  1240  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1241  		v.Aux = symToAux(sym)
  1242  		v.AddArg3(val, base, mem)
  1243  		return true
  1244  	}
  1245  	// match: (ADDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1246  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1247  	// result: (ADDLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1248  	for {
  1249  		off1 := auxIntToInt32(v.AuxInt)
  1250  		sym1 := auxToSym(v.Aux)
  1251  		val := v_0
  1252  		if v_1.Op != Op386LEAL {
  1253  			break
  1254  		}
  1255  		off2 := auxIntToInt32(v_1.AuxInt)
  1256  		sym2 := auxToSym(v_1.Aux)
  1257  		base := v_1.Args[0]
  1258  		mem := v_2
  1259  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1260  			break
  1261  		}
  1262  		v.reset(Op386ADDLload)
  1263  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1264  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1265  		v.AddArg3(val, base, mem)
  1266  		return true
  1267  	}
  1268  	return false
  1269  }
  1270  func rewriteValue386_Op386ADDLmodify(v *Value) bool {
  1271  	v_2 := v.Args[2]
  1272  	v_1 := v.Args[1]
  1273  	v_0 := v.Args[0]
  1274  	b := v.Block
  1275  	config := b.Func.Config
  1276  	// match: (ADDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1277  	// cond: is32Bit(int64(off1)+int64(off2))
  1278  	// result: (ADDLmodify [off1+off2] {sym} base val mem)
  1279  	for {
  1280  		off1 := auxIntToInt32(v.AuxInt)
  1281  		sym := auxToSym(v.Aux)
  1282  		if v_0.Op != Op386ADDLconst {
  1283  			break
  1284  		}
  1285  		off2 := auxIntToInt32(v_0.AuxInt)
  1286  		base := v_0.Args[0]
  1287  		val := v_1
  1288  		mem := v_2
  1289  		if !(is32Bit(int64(off1) + int64(off2))) {
  1290  			break
  1291  		}
  1292  		v.reset(Op386ADDLmodify)
  1293  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1294  		v.Aux = symToAux(sym)
  1295  		v.AddArg3(base, val, mem)
  1296  		return true
  1297  	}
  1298  	// match: (ADDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1299  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1300  	// result: (ADDLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  1301  	for {
  1302  		off1 := auxIntToInt32(v.AuxInt)
  1303  		sym1 := auxToSym(v.Aux)
  1304  		if v_0.Op != Op386LEAL {
  1305  			break
  1306  		}
  1307  		off2 := auxIntToInt32(v_0.AuxInt)
  1308  		sym2 := auxToSym(v_0.Aux)
  1309  		base := v_0.Args[0]
  1310  		val := v_1
  1311  		mem := v_2
  1312  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1313  			break
  1314  		}
  1315  		v.reset(Op386ADDLmodify)
  1316  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1317  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1318  		v.AddArg3(base, val, mem)
  1319  		return true
  1320  	}
  1321  	return false
  1322  }
  1323  func rewriteValue386_Op386ADDSD(v *Value) bool {
  1324  	v_1 := v.Args[1]
  1325  	v_0 := v.Args[0]
  1326  	// match: (ADDSD x l:(MOVSDload [off] {sym} ptr mem))
  1327  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1328  	// result: (ADDSDload x [off] {sym} ptr mem)
  1329  	for {
  1330  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1331  			x := v_0
  1332  			l := v_1
  1333  			if l.Op != Op386MOVSDload {
  1334  				continue
  1335  			}
  1336  			off := auxIntToInt32(l.AuxInt)
  1337  			sym := auxToSym(l.Aux)
  1338  			mem := l.Args[1]
  1339  			ptr := l.Args[0]
  1340  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1341  				continue
  1342  			}
  1343  			v.reset(Op386ADDSDload)
  1344  			v.AuxInt = int32ToAuxInt(off)
  1345  			v.Aux = symToAux(sym)
  1346  			v.AddArg3(x, ptr, mem)
  1347  			return true
  1348  		}
  1349  		break
  1350  	}
  1351  	return false
  1352  }
  1353  func rewriteValue386_Op386ADDSDload(v *Value) bool {
  1354  	v_2 := v.Args[2]
  1355  	v_1 := v.Args[1]
  1356  	v_0 := v.Args[0]
  1357  	b := v.Block
  1358  	config := b.Func.Config
  1359  	// match: (ADDSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  1360  	// cond: is32Bit(int64(off1)+int64(off2))
  1361  	// result: (ADDSDload [off1+off2] {sym} val base mem)
  1362  	for {
  1363  		off1 := auxIntToInt32(v.AuxInt)
  1364  		sym := auxToSym(v.Aux)
  1365  		val := v_0
  1366  		if v_1.Op != Op386ADDLconst {
  1367  			break
  1368  		}
  1369  		off2 := auxIntToInt32(v_1.AuxInt)
  1370  		base := v_1.Args[0]
  1371  		mem := v_2
  1372  		if !(is32Bit(int64(off1) + int64(off2))) {
  1373  			break
  1374  		}
  1375  		v.reset(Op386ADDSDload)
  1376  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1377  		v.Aux = symToAux(sym)
  1378  		v.AddArg3(val, base, mem)
  1379  		return true
  1380  	}
  1381  	// match: (ADDSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1382  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1383  	// result: (ADDSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1384  	for {
  1385  		off1 := auxIntToInt32(v.AuxInt)
  1386  		sym1 := auxToSym(v.Aux)
  1387  		val := v_0
  1388  		if v_1.Op != Op386LEAL {
  1389  			break
  1390  		}
  1391  		off2 := auxIntToInt32(v_1.AuxInt)
  1392  		sym2 := auxToSym(v_1.Aux)
  1393  		base := v_1.Args[0]
  1394  		mem := v_2
  1395  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1396  			break
  1397  		}
  1398  		v.reset(Op386ADDSDload)
  1399  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1400  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1401  		v.AddArg3(val, base, mem)
  1402  		return true
  1403  	}
  1404  	return false
  1405  }
  1406  func rewriteValue386_Op386ADDSS(v *Value) bool {
  1407  	v_1 := v.Args[1]
  1408  	v_0 := v.Args[0]
  1409  	// match: (ADDSS x l:(MOVSSload [off] {sym} ptr mem))
  1410  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1411  	// result: (ADDSSload x [off] {sym} ptr mem)
  1412  	for {
  1413  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1414  			x := v_0
  1415  			l := v_1
  1416  			if l.Op != Op386MOVSSload {
  1417  				continue
  1418  			}
  1419  			off := auxIntToInt32(l.AuxInt)
  1420  			sym := auxToSym(l.Aux)
  1421  			mem := l.Args[1]
  1422  			ptr := l.Args[0]
  1423  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1424  				continue
  1425  			}
  1426  			v.reset(Op386ADDSSload)
  1427  			v.AuxInt = int32ToAuxInt(off)
  1428  			v.Aux = symToAux(sym)
  1429  			v.AddArg3(x, ptr, mem)
  1430  			return true
  1431  		}
  1432  		break
  1433  	}
  1434  	return false
  1435  }
  1436  func rewriteValue386_Op386ADDSSload(v *Value) bool {
  1437  	v_2 := v.Args[2]
  1438  	v_1 := v.Args[1]
  1439  	v_0 := v.Args[0]
  1440  	b := v.Block
  1441  	config := b.Func.Config
  1442  	// match: (ADDSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  1443  	// cond: is32Bit(int64(off1)+int64(off2))
  1444  	// result: (ADDSSload [off1+off2] {sym} val base mem)
  1445  	for {
  1446  		off1 := auxIntToInt32(v.AuxInt)
  1447  		sym := auxToSym(v.Aux)
  1448  		val := v_0
  1449  		if v_1.Op != Op386ADDLconst {
  1450  			break
  1451  		}
  1452  		off2 := auxIntToInt32(v_1.AuxInt)
  1453  		base := v_1.Args[0]
  1454  		mem := v_2
  1455  		if !(is32Bit(int64(off1) + int64(off2))) {
  1456  			break
  1457  		}
  1458  		v.reset(Op386ADDSSload)
  1459  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1460  		v.Aux = symToAux(sym)
  1461  		v.AddArg3(val, base, mem)
  1462  		return true
  1463  	}
  1464  	// match: (ADDSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1465  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1466  	// result: (ADDSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1467  	for {
  1468  		off1 := auxIntToInt32(v.AuxInt)
  1469  		sym1 := auxToSym(v.Aux)
  1470  		val := v_0
  1471  		if v_1.Op != Op386LEAL {
  1472  			break
  1473  		}
  1474  		off2 := auxIntToInt32(v_1.AuxInt)
  1475  		sym2 := auxToSym(v_1.Aux)
  1476  		base := v_1.Args[0]
  1477  		mem := v_2
  1478  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1479  			break
  1480  		}
  1481  		v.reset(Op386ADDSSload)
  1482  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1483  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1484  		v.AddArg3(val, base, mem)
  1485  		return true
  1486  	}
  1487  	return false
  1488  }
  1489  func rewriteValue386_Op386ANDL(v *Value) bool {
  1490  	v_1 := v.Args[1]
  1491  	v_0 := v.Args[0]
  1492  	// match: (ANDL x (MOVLconst [c]))
  1493  	// result: (ANDLconst [c] x)
  1494  	for {
  1495  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1496  			x := v_0
  1497  			if v_1.Op != Op386MOVLconst {
  1498  				continue
  1499  			}
  1500  			c := auxIntToInt32(v_1.AuxInt)
  1501  			v.reset(Op386ANDLconst)
  1502  			v.AuxInt = int32ToAuxInt(c)
  1503  			v.AddArg(x)
  1504  			return true
  1505  		}
  1506  		break
  1507  	}
  1508  	// match: (ANDL x l:(MOVLload [off] {sym} ptr mem))
  1509  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  1510  	// result: (ANDLload x [off] {sym} ptr mem)
  1511  	for {
  1512  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  1513  			x := v_0
  1514  			l := v_1
  1515  			if l.Op != Op386MOVLload {
  1516  				continue
  1517  			}
  1518  			off := auxIntToInt32(l.AuxInt)
  1519  			sym := auxToSym(l.Aux)
  1520  			mem := l.Args[1]
  1521  			ptr := l.Args[0]
  1522  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  1523  				continue
  1524  			}
  1525  			v.reset(Op386ANDLload)
  1526  			v.AuxInt = int32ToAuxInt(off)
  1527  			v.Aux = symToAux(sym)
  1528  			v.AddArg3(x, ptr, mem)
  1529  			return true
  1530  		}
  1531  		break
  1532  	}
  1533  	// match: (ANDL x x)
  1534  	// result: x
  1535  	for {
  1536  		x := v_0
  1537  		if x != v_1 {
  1538  			break
  1539  		}
  1540  		v.copyOf(x)
  1541  		return true
  1542  	}
  1543  	return false
  1544  }
  1545  func rewriteValue386_Op386ANDLconst(v *Value) bool {
  1546  	v_0 := v.Args[0]
  1547  	// match: (ANDLconst [c] (ANDLconst [d] x))
  1548  	// result: (ANDLconst [c & d] x)
  1549  	for {
  1550  		c := auxIntToInt32(v.AuxInt)
  1551  		if v_0.Op != Op386ANDLconst {
  1552  			break
  1553  		}
  1554  		d := auxIntToInt32(v_0.AuxInt)
  1555  		x := v_0.Args[0]
  1556  		v.reset(Op386ANDLconst)
  1557  		v.AuxInt = int32ToAuxInt(c & d)
  1558  		v.AddArg(x)
  1559  		return true
  1560  	}
  1561  	// match: (ANDLconst [c] _)
  1562  	// cond: c==0
  1563  	// result: (MOVLconst [0])
  1564  	for {
  1565  		c := auxIntToInt32(v.AuxInt)
  1566  		if !(c == 0) {
  1567  			break
  1568  		}
  1569  		v.reset(Op386MOVLconst)
  1570  		v.AuxInt = int32ToAuxInt(0)
  1571  		return true
  1572  	}
  1573  	// match: (ANDLconst [c] x)
  1574  	// cond: c==-1
  1575  	// result: x
  1576  	for {
  1577  		c := auxIntToInt32(v.AuxInt)
  1578  		x := v_0
  1579  		if !(c == -1) {
  1580  			break
  1581  		}
  1582  		v.copyOf(x)
  1583  		return true
  1584  	}
  1585  	// match: (ANDLconst [c] (MOVLconst [d]))
  1586  	// result: (MOVLconst [c&d])
  1587  	for {
  1588  		c := auxIntToInt32(v.AuxInt)
  1589  		if v_0.Op != Op386MOVLconst {
  1590  			break
  1591  		}
  1592  		d := auxIntToInt32(v_0.AuxInt)
  1593  		v.reset(Op386MOVLconst)
  1594  		v.AuxInt = int32ToAuxInt(c & d)
  1595  		return true
  1596  	}
  1597  	return false
  1598  }
  1599  func rewriteValue386_Op386ANDLconstmodify(v *Value) bool {
  1600  	v_1 := v.Args[1]
  1601  	v_0 := v.Args[0]
  1602  	b := v.Block
  1603  	config := b.Func.Config
  1604  	// match: (ANDLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  1605  	// cond: valoff1.canAdd32(off2)
  1606  	// result: (ANDLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  1607  	for {
  1608  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1609  		sym := auxToSym(v.Aux)
  1610  		if v_0.Op != Op386ADDLconst {
  1611  			break
  1612  		}
  1613  		off2 := auxIntToInt32(v_0.AuxInt)
  1614  		base := v_0.Args[0]
  1615  		mem := v_1
  1616  		if !(valoff1.canAdd32(off2)) {
  1617  			break
  1618  		}
  1619  		v.reset(Op386ANDLconstmodify)
  1620  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1621  		v.Aux = symToAux(sym)
  1622  		v.AddArg2(base, mem)
  1623  		return true
  1624  	}
  1625  	// match: (ANDLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  1626  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1627  	// result: (ANDLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  1628  	for {
  1629  		valoff1 := auxIntToValAndOff(v.AuxInt)
  1630  		sym1 := auxToSym(v.Aux)
  1631  		if v_0.Op != Op386LEAL {
  1632  			break
  1633  		}
  1634  		off2 := auxIntToInt32(v_0.AuxInt)
  1635  		sym2 := auxToSym(v_0.Aux)
  1636  		base := v_0.Args[0]
  1637  		mem := v_1
  1638  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1639  			break
  1640  		}
  1641  		v.reset(Op386ANDLconstmodify)
  1642  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  1643  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1644  		v.AddArg2(base, mem)
  1645  		return true
  1646  	}
  1647  	return false
  1648  }
  1649  func rewriteValue386_Op386ANDLload(v *Value) bool {
  1650  	v_2 := v.Args[2]
  1651  	v_1 := v.Args[1]
  1652  	v_0 := v.Args[0]
  1653  	b := v.Block
  1654  	config := b.Func.Config
  1655  	// match: (ANDLload [off1] {sym} val (ADDLconst [off2] base) mem)
  1656  	// cond: is32Bit(int64(off1)+int64(off2))
  1657  	// result: (ANDLload [off1+off2] {sym} val base mem)
  1658  	for {
  1659  		off1 := auxIntToInt32(v.AuxInt)
  1660  		sym := auxToSym(v.Aux)
  1661  		val := v_0
  1662  		if v_1.Op != Op386ADDLconst {
  1663  			break
  1664  		}
  1665  		off2 := auxIntToInt32(v_1.AuxInt)
  1666  		base := v_1.Args[0]
  1667  		mem := v_2
  1668  		if !(is32Bit(int64(off1) + int64(off2))) {
  1669  			break
  1670  		}
  1671  		v.reset(Op386ANDLload)
  1672  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1673  		v.Aux = symToAux(sym)
  1674  		v.AddArg3(val, base, mem)
  1675  		return true
  1676  	}
  1677  	// match: (ANDLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  1678  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1679  	// result: (ANDLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  1680  	for {
  1681  		off1 := auxIntToInt32(v.AuxInt)
  1682  		sym1 := auxToSym(v.Aux)
  1683  		val := v_0
  1684  		if v_1.Op != Op386LEAL {
  1685  			break
  1686  		}
  1687  		off2 := auxIntToInt32(v_1.AuxInt)
  1688  		sym2 := auxToSym(v_1.Aux)
  1689  		base := v_1.Args[0]
  1690  		mem := v_2
  1691  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1692  			break
  1693  		}
  1694  		v.reset(Op386ANDLload)
  1695  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1696  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1697  		v.AddArg3(val, base, mem)
  1698  		return true
  1699  	}
  1700  	return false
  1701  }
  1702  func rewriteValue386_Op386ANDLmodify(v *Value) bool {
  1703  	v_2 := v.Args[2]
  1704  	v_1 := v.Args[1]
  1705  	v_0 := v.Args[0]
  1706  	b := v.Block
  1707  	config := b.Func.Config
  1708  	// match: (ANDLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  1709  	// cond: is32Bit(int64(off1)+int64(off2))
  1710  	// result: (ANDLmodify [off1+off2] {sym} base val mem)
  1711  	for {
  1712  		off1 := auxIntToInt32(v.AuxInt)
  1713  		sym := auxToSym(v.Aux)
  1714  		if v_0.Op != Op386ADDLconst {
  1715  			break
  1716  		}
  1717  		off2 := auxIntToInt32(v_0.AuxInt)
  1718  		base := v_0.Args[0]
  1719  		val := v_1
  1720  		mem := v_2
  1721  		if !(is32Bit(int64(off1) + int64(off2))) {
  1722  			break
  1723  		}
  1724  		v.reset(Op386ANDLmodify)
  1725  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1726  		v.Aux = symToAux(sym)
  1727  		v.AddArg3(base, val, mem)
  1728  		return true
  1729  	}
  1730  	// match: (ANDLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  1731  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  1732  	// result: (ANDLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  1733  	for {
  1734  		off1 := auxIntToInt32(v.AuxInt)
  1735  		sym1 := auxToSym(v.Aux)
  1736  		if v_0.Op != Op386LEAL {
  1737  			break
  1738  		}
  1739  		off2 := auxIntToInt32(v_0.AuxInt)
  1740  		sym2 := auxToSym(v_0.Aux)
  1741  		base := v_0.Args[0]
  1742  		val := v_1
  1743  		mem := v_2
  1744  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  1745  			break
  1746  		}
  1747  		v.reset(Op386ANDLmodify)
  1748  		v.AuxInt = int32ToAuxInt(off1 + off2)
  1749  		v.Aux = symToAux(mergeSym(sym1, sym2))
  1750  		v.AddArg3(base, val, mem)
  1751  		return true
  1752  	}
  1753  	return false
  1754  }
  1755  func rewriteValue386_Op386CMPB(v *Value) bool {
  1756  	v_1 := v.Args[1]
  1757  	v_0 := v.Args[0]
  1758  	b := v.Block
  1759  	// match: (CMPB x (MOVLconst [c]))
  1760  	// result: (CMPBconst x [int8(c)])
  1761  	for {
  1762  		x := v_0
  1763  		if v_1.Op != Op386MOVLconst {
  1764  			break
  1765  		}
  1766  		c := auxIntToInt32(v_1.AuxInt)
  1767  		v.reset(Op386CMPBconst)
  1768  		v.AuxInt = int8ToAuxInt(int8(c))
  1769  		v.AddArg(x)
  1770  		return true
  1771  	}
  1772  	// match: (CMPB (MOVLconst [c]) x)
  1773  	// result: (InvertFlags (CMPBconst x [int8(c)]))
  1774  	for {
  1775  		if v_0.Op != Op386MOVLconst {
  1776  			break
  1777  		}
  1778  		c := auxIntToInt32(v_0.AuxInt)
  1779  		x := v_1
  1780  		v.reset(Op386InvertFlags)
  1781  		v0 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  1782  		v0.AuxInt = int8ToAuxInt(int8(c))
  1783  		v0.AddArg(x)
  1784  		v.AddArg(v0)
  1785  		return true
  1786  	}
  1787  	// match: (CMPB x y)
  1788  	// cond: x.ID > y.ID
  1789  	// result: (InvertFlags (CMPB y x))
  1790  	for {
  1791  		x := v_0
  1792  		y := v_1
  1793  		if !(x.ID > y.ID) {
  1794  			break
  1795  		}
  1796  		v.reset(Op386InvertFlags)
  1797  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  1798  		v0.AddArg2(y, x)
  1799  		v.AddArg(v0)
  1800  		return true
  1801  	}
  1802  	// match: (CMPB l:(MOVBload {sym} [off] ptr mem) x)
  1803  	// cond: canMergeLoad(v, l) && clobber(l)
  1804  	// result: (CMPBload {sym} [off] ptr x mem)
  1805  	for {
  1806  		l := v_0
  1807  		if l.Op != Op386MOVBload {
  1808  			break
  1809  		}
  1810  		off := auxIntToInt32(l.AuxInt)
  1811  		sym := auxToSym(l.Aux)
  1812  		mem := l.Args[1]
  1813  		ptr := l.Args[0]
  1814  		x := v_1
  1815  		if !(canMergeLoad(v, l) && clobber(l)) {
  1816  			break
  1817  		}
  1818  		v.reset(Op386CMPBload)
  1819  		v.AuxInt = int32ToAuxInt(off)
  1820  		v.Aux = symToAux(sym)
  1821  		v.AddArg3(ptr, x, mem)
  1822  		return true
  1823  	}
  1824  	// match: (CMPB x l:(MOVBload {sym} [off] ptr mem))
  1825  	// cond: canMergeLoad(v, l) && clobber(l)
  1826  	// result: (InvertFlags (CMPBload {sym} [off] ptr x mem))
  1827  	for {
  1828  		x := v_0
  1829  		l := v_1
  1830  		if l.Op != Op386MOVBload {
  1831  			break
  1832  		}
  1833  		off := auxIntToInt32(l.AuxInt)
  1834  		sym := auxToSym(l.Aux)
  1835  		mem := l.Args[1]
  1836  		ptr := l.Args[0]
  1837  		if !(canMergeLoad(v, l) && clobber(l)) {
  1838  			break
  1839  		}
  1840  		v.reset(Op386InvertFlags)
  1841  		v0 := b.NewValue0(l.Pos, Op386CMPBload, types.TypeFlags)
  1842  		v0.AuxInt = int32ToAuxInt(off)
  1843  		v0.Aux = symToAux(sym)
  1844  		v0.AddArg3(ptr, x, mem)
  1845  		v.AddArg(v0)
  1846  		return true
  1847  	}
  1848  	return false
  1849  }
  1850  func rewriteValue386_Op386CMPBconst(v *Value) bool {
  1851  	v_0 := v.Args[0]
  1852  	b := v.Block
  1853  	// match: (CMPBconst (MOVLconst [x]) [y])
  1854  	// cond: int8(x)==y
  1855  	// result: (FlagEQ)
  1856  	for {
  1857  		y := auxIntToInt8(v.AuxInt)
  1858  		if v_0.Op != Op386MOVLconst {
  1859  			break
  1860  		}
  1861  		x := auxIntToInt32(v_0.AuxInt)
  1862  		if !(int8(x) == y) {
  1863  			break
  1864  		}
  1865  		v.reset(Op386FlagEQ)
  1866  		return true
  1867  	}
  1868  	// match: (CMPBconst (MOVLconst [x]) [y])
  1869  	// cond: int8(x)<y && uint8(x)<uint8(y)
  1870  	// result: (FlagLT_ULT)
  1871  	for {
  1872  		y := auxIntToInt8(v.AuxInt)
  1873  		if v_0.Op != Op386MOVLconst {
  1874  			break
  1875  		}
  1876  		x := auxIntToInt32(v_0.AuxInt)
  1877  		if !(int8(x) < y && uint8(x) < uint8(y)) {
  1878  			break
  1879  		}
  1880  		v.reset(Op386FlagLT_ULT)
  1881  		return true
  1882  	}
  1883  	// match: (CMPBconst (MOVLconst [x]) [y])
  1884  	// cond: int8(x)<y && uint8(x)>uint8(y)
  1885  	// result: (FlagLT_UGT)
  1886  	for {
  1887  		y := auxIntToInt8(v.AuxInt)
  1888  		if v_0.Op != Op386MOVLconst {
  1889  			break
  1890  		}
  1891  		x := auxIntToInt32(v_0.AuxInt)
  1892  		if !(int8(x) < y && uint8(x) > uint8(y)) {
  1893  			break
  1894  		}
  1895  		v.reset(Op386FlagLT_UGT)
  1896  		return true
  1897  	}
  1898  	// match: (CMPBconst (MOVLconst [x]) [y])
  1899  	// cond: int8(x)>y && uint8(x)<uint8(y)
  1900  	// result: (FlagGT_ULT)
  1901  	for {
  1902  		y := auxIntToInt8(v.AuxInt)
  1903  		if v_0.Op != Op386MOVLconst {
  1904  			break
  1905  		}
  1906  		x := auxIntToInt32(v_0.AuxInt)
  1907  		if !(int8(x) > y && uint8(x) < uint8(y)) {
  1908  			break
  1909  		}
  1910  		v.reset(Op386FlagGT_ULT)
  1911  		return true
  1912  	}
  1913  	// match: (CMPBconst (MOVLconst [x]) [y])
  1914  	// cond: int8(x)>y && uint8(x)>uint8(y)
  1915  	// result: (FlagGT_UGT)
  1916  	for {
  1917  		y := auxIntToInt8(v.AuxInt)
  1918  		if v_0.Op != Op386MOVLconst {
  1919  			break
  1920  		}
  1921  		x := auxIntToInt32(v_0.AuxInt)
  1922  		if !(int8(x) > y && uint8(x) > uint8(y)) {
  1923  			break
  1924  		}
  1925  		v.reset(Op386FlagGT_UGT)
  1926  		return true
  1927  	}
  1928  	// match: (CMPBconst (ANDLconst _ [m]) [n])
  1929  	// cond: 0 <= int8(m) && int8(m) < n
  1930  	// result: (FlagLT_ULT)
  1931  	for {
  1932  		n := auxIntToInt8(v.AuxInt)
  1933  		if v_0.Op != Op386ANDLconst {
  1934  			break
  1935  		}
  1936  		m := auxIntToInt32(v_0.AuxInt)
  1937  		if !(0 <= int8(m) && int8(m) < n) {
  1938  			break
  1939  		}
  1940  		v.reset(Op386FlagLT_ULT)
  1941  		return true
  1942  	}
  1943  	// match: (CMPBconst l:(ANDL x y) [0])
  1944  	// cond: l.Uses==1
  1945  	// result: (TESTB x y)
  1946  	for {
  1947  		if auxIntToInt8(v.AuxInt) != 0 {
  1948  			break
  1949  		}
  1950  		l := v_0
  1951  		if l.Op != Op386ANDL {
  1952  			break
  1953  		}
  1954  		y := l.Args[1]
  1955  		x := l.Args[0]
  1956  		if !(l.Uses == 1) {
  1957  			break
  1958  		}
  1959  		v.reset(Op386TESTB)
  1960  		v.AddArg2(x, y)
  1961  		return true
  1962  	}
  1963  	// match: (CMPBconst l:(ANDLconst [c] x) [0])
  1964  	// cond: l.Uses==1
  1965  	// result: (TESTBconst [int8(c)] x)
  1966  	for {
  1967  		if auxIntToInt8(v.AuxInt) != 0 {
  1968  			break
  1969  		}
  1970  		l := v_0
  1971  		if l.Op != Op386ANDLconst {
  1972  			break
  1973  		}
  1974  		c := auxIntToInt32(l.AuxInt)
  1975  		x := l.Args[0]
  1976  		if !(l.Uses == 1) {
  1977  			break
  1978  		}
  1979  		v.reset(Op386TESTBconst)
  1980  		v.AuxInt = int8ToAuxInt(int8(c))
  1981  		v.AddArg(x)
  1982  		return true
  1983  	}
  1984  	// match: (CMPBconst x [0])
  1985  	// result: (TESTB x x)
  1986  	for {
  1987  		if auxIntToInt8(v.AuxInt) != 0 {
  1988  			break
  1989  		}
  1990  		x := v_0
  1991  		v.reset(Op386TESTB)
  1992  		v.AddArg2(x, x)
  1993  		return true
  1994  	}
  1995  	// match: (CMPBconst l:(MOVBload {sym} [off] ptr mem) [c])
  1996  	// cond: l.Uses == 1 && validValAndOff(int64(c), int64(off)) && clobber(l)
  1997  	// result: @l.Block (CMPBconstload {sym} [makeValAndOff32(int32(c),int32(off))] ptr mem)
  1998  	for {
  1999  		c := auxIntToInt8(v.AuxInt)
  2000  		l := v_0
  2001  		if l.Op != Op386MOVBload {
  2002  			break
  2003  		}
  2004  		off := auxIntToInt32(l.AuxInt)
  2005  		sym := auxToSym(l.Aux)
  2006  		mem := l.Args[1]
  2007  		ptr := l.Args[0]
  2008  		if !(l.Uses == 1 && validValAndOff(int64(c), int64(off)) && clobber(l)) {
  2009  			break
  2010  		}
  2011  		b = l.Block
  2012  		v0 := b.NewValue0(l.Pos, Op386CMPBconstload, types.TypeFlags)
  2013  		v.copyOf(v0)
  2014  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(c), int32(off)))
  2015  		v0.Aux = symToAux(sym)
  2016  		v0.AddArg2(ptr, mem)
  2017  		return true
  2018  	}
  2019  	return false
  2020  }
  2021  func rewriteValue386_Op386CMPBload(v *Value) bool {
  2022  	v_2 := v.Args[2]
  2023  	v_1 := v.Args[1]
  2024  	v_0 := v.Args[0]
  2025  	// match: (CMPBload {sym} [off] ptr (MOVLconst [c]) mem)
  2026  	// cond: validValAndOff(int64(int8(c)),int64(off))
  2027  	// result: (CMPBconstload {sym} [makeValAndOff32(int32(int8(c)),off)] ptr mem)
  2028  	for {
  2029  		off := auxIntToInt32(v.AuxInt)
  2030  		sym := auxToSym(v.Aux)
  2031  		ptr := v_0
  2032  		if v_1.Op != Op386MOVLconst {
  2033  			break
  2034  		}
  2035  		c := auxIntToInt32(v_1.AuxInt)
  2036  		mem := v_2
  2037  		if !(validValAndOff(int64(int8(c)), int64(off))) {
  2038  			break
  2039  		}
  2040  		v.reset(Op386CMPBconstload)
  2041  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(int8(c)), off))
  2042  		v.Aux = symToAux(sym)
  2043  		v.AddArg2(ptr, mem)
  2044  		return true
  2045  	}
  2046  	return false
  2047  }
  2048  func rewriteValue386_Op386CMPL(v *Value) bool {
  2049  	v_1 := v.Args[1]
  2050  	v_0 := v.Args[0]
  2051  	b := v.Block
  2052  	// match: (CMPL x (MOVLconst [c]))
  2053  	// result: (CMPLconst x [c])
  2054  	for {
  2055  		x := v_0
  2056  		if v_1.Op != Op386MOVLconst {
  2057  			break
  2058  		}
  2059  		c := auxIntToInt32(v_1.AuxInt)
  2060  		v.reset(Op386CMPLconst)
  2061  		v.AuxInt = int32ToAuxInt(c)
  2062  		v.AddArg(x)
  2063  		return true
  2064  	}
  2065  	// match: (CMPL (MOVLconst [c]) x)
  2066  	// result: (InvertFlags (CMPLconst x [c]))
  2067  	for {
  2068  		if v_0.Op != Op386MOVLconst {
  2069  			break
  2070  		}
  2071  		c := auxIntToInt32(v_0.AuxInt)
  2072  		x := v_1
  2073  		v.reset(Op386InvertFlags)
  2074  		v0 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  2075  		v0.AuxInt = int32ToAuxInt(c)
  2076  		v0.AddArg(x)
  2077  		v.AddArg(v0)
  2078  		return true
  2079  	}
  2080  	// match: (CMPL x y)
  2081  	// cond: x.ID > y.ID
  2082  	// result: (InvertFlags (CMPL y x))
  2083  	for {
  2084  		x := v_0
  2085  		y := v_1
  2086  		if !(x.ID > y.ID) {
  2087  			break
  2088  		}
  2089  		v.reset(Op386InvertFlags)
  2090  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  2091  		v0.AddArg2(y, x)
  2092  		v.AddArg(v0)
  2093  		return true
  2094  	}
  2095  	// match: (CMPL l:(MOVLload {sym} [off] ptr mem) x)
  2096  	// cond: canMergeLoad(v, l) && clobber(l)
  2097  	// result: (CMPLload {sym} [off] ptr x mem)
  2098  	for {
  2099  		l := v_0
  2100  		if l.Op != Op386MOVLload {
  2101  			break
  2102  		}
  2103  		off := auxIntToInt32(l.AuxInt)
  2104  		sym := auxToSym(l.Aux)
  2105  		mem := l.Args[1]
  2106  		ptr := l.Args[0]
  2107  		x := v_1
  2108  		if !(canMergeLoad(v, l) && clobber(l)) {
  2109  			break
  2110  		}
  2111  		v.reset(Op386CMPLload)
  2112  		v.AuxInt = int32ToAuxInt(off)
  2113  		v.Aux = symToAux(sym)
  2114  		v.AddArg3(ptr, x, mem)
  2115  		return true
  2116  	}
  2117  	// match: (CMPL x l:(MOVLload {sym} [off] ptr mem))
  2118  	// cond: canMergeLoad(v, l) && clobber(l)
  2119  	// result: (InvertFlags (CMPLload {sym} [off] ptr x mem))
  2120  	for {
  2121  		x := v_0
  2122  		l := v_1
  2123  		if l.Op != Op386MOVLload {
  2124  			break
  2125  		}
  2126  		off := auxIntToInt32(l.AuxInt)
  2127  		sym := auxToSym(l.Aux)
  2128  		mem := l.Args[1]
  2129  		ptr := l.Args[0]
  2130  		if !(canMergeLoad(v, l) && clobber(l)) {
  2131  			break
  2132  		}
  2133  		v.reset(Op386InvertFlags)
  2134  		v0 := b.NewValue0(l.Pos, Op386CMPLload, types.TypeFlags)
  2135  		v0.AuxInt = int32ToAuxInt(off)
  2136  		v0.Aux = symToAux(sym)
  2137  		v0.AddArg3(ptr, x, mem)
  2138  		v.AddArg(v0)
  2139  		return true
  2140  	}
  2141  	return false
  2142  }
  2143  func rewriteValue386_Op386CMPLconst(v *Value) bool {
  2144  	v_0 := v.Args[0]
  2145  	b := v.Block
  2146  	// match: (CMPLconst (MOVLconst [x]) [y])
  2147  	// cond: x==y
  2148  	// result: (FlagEQ)
  2149  	for {
  2150  		y := auxIntToInt32(v.AuxInt)
  2151  		if v_0.Op != Op386MOVLconst {
  2152  			break
  2153  		}
  2154  		x := auxIntToInt32(v_0.AuxInt)
  2155  		if !(x == y) {
  2156  			break
  2157  		}
  2158  		v.reset(Op386FlagEQ)
  2159  		return true
  2160  	}
  2161  	// match: (CMPLconst (MOVLconst [x]) [y])
  2162  	// cond: x<y && uint32(x)<uint32(y)
  2163  	// result: (FlagLT_ULT)
  2164  	for {
  2165  		y := auxIntToInt32(v.AuxInt)
  2166  		if v_0.Op != Op386MOVLconst {
  2167  			break
  2168  		}
  2169  		x := auxIntToInt32(v_0.AuxInt)
  2170  		if !(x < y && uint32(x) < uint32(y)) {
  2171  			break
  2172  		}
  2173  		v.reset(Op386FlagLT_ULT)
  2174  		return true
  2175  	}
  2176  	// match: (CMPLconst (MOVLconst [x]) [y])
  2177  	// cond: x<y && uint32(x)>uint32(y)
  2178  	// result: (FlagLT_UGT)
  2179  	for {
  2180  		y := auxIntToInt32(v.AuxInt)
  2181  		if v_0.Op != Op386MOVLconst {
  2182  			break
  2183  		}
  2184  		x := auxIntToInt32(v_0.AuxInt)
  2185  		if !(x < y && uint32(x) > uint32(y)) {
  2186  			break
  2187  		}
  2188  		v.reset(Op386FlagLT_UGT)
  2189  		return true
  2190  	}
  2191  	// match: (CMPLconst (MOVLconst [x]) [y])
  2192  	// cond: x>y && uint32(x)<uint32(y)
  2193  	// result: (FlagGT_ULT)
  2194  	for {
  2195  		y := auxIntToInt32(v.AuxInt)
  2196  		if v_0.Op != Op386MOVLconst {
  2197  			break
  2198  		}
  2199  		x := auxIntToInt32(v_0.AuxInt)
  2200  		if !(x > y && uint32(x) < uint32(y)) {
  2201  			break
  2202  		}
  2203  		v.reset(Op386FlagGT_ULT)
  2204  		return true
  2205  	}
  2206  	// match: (CMPLconst (MOVLconst [x]) [y])
  2207  	// cond: x>y && uint32(x)>uint32(y)
  2208  	// result: (FlagGT_UGT)
  2209  	for {
  2210  		y := auxIntToInt32(v.AuxInt)
  2211  		if v_0.Op != Op386MOVLconst {
  2212  			break
  2213  		}
  2214  		x := auxIntToInt32(v_0.AuxInt)
  2215  		if !(x > y && uint32(x) > uint32(y)) {
  2216  			break
  2217  		}
  2218  		v.reset(Op386FlagGT_UGT)
  2219  		return true
  2220  	}
  2221  	// match: (CMPLconst (SHRLconst _ [c]) [n])
  2222  	// cond: 0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)
  2223  	// result: (FlagLT_ULT)
  2224  	for {
  2225  		n := auxIntToInt32(v.AuxInt)
  2226  		if v_0.Op != Op386SHRLconst {
  2227  			break
  2228  		}
  2229  		c := auxIntToInt32(v_0.AuxInt)
  2230  		if !(0 <= n && 0 < c && c <= 32 && (1<<uint64(32-c)) <= uint64(n)) {
  2231  			break
  2232  		}
  2233  		v.reset(Op386FlagLT_ULT)
  2234  		return true
  2235  	}
  2236  	// match: (CMPLconst (ANDLconst _ [m]) [n])
  2237  	// cond: 0 <= m && m < n
  2238  	// result: (FlagLT_ULT)
  2239  	for {
  2240  		n := auxIntToInt32(v.AuxInt)
  2241  		if v_0.Op != Op386ANDLconst {
  2242  			break
  2243  		}
  2244  		m := auxIntToInt32(v_0.AuxInt)
  2245  		if !(0 <= m && m < n) {
  2246  			break
  2247  		}
  2248  		v.reset(Op386FlagLT_ULT)
  2249  		return true
  2250  	}
  2251  	// match: (CMPLconst l:(ANDL x y) [0])
  2252  	// cond: l.Uses==1
  2253  	// result: (TESTL x y)
  2254  	for {
  2255  		if auxIntToInt32(v.AuxInt) != 0 {
  2256  			break
  2257  		}
  2258  		l := v_0
  2259  		if l.Op != Op386ANDL {
  2260  			break
  2261  		}
  2262  		y := l.Args[1]
  2263  		x := l.Args[0]
  2264  		if !(l.Uses == 1) {
  2265  			break
  2266  		}
  2267  		v.reset(Op386TESTL)
  2268  		v.AddArg2(x, y)
  2269  		return true
  2270  	}
  2271  	// match: (CMPLconst l:(ANDLconst [c] x) [0])
  2272  	// cond: l.Uses==1
  2273  	// result: (TESTLconst [c] x)
  2274  	for {
  2275  		if auxIntToInt32(v.AuxInt) != 0 {
  2276  			break
  2277  		}
  2278  		l := v_0
  2279  		if l.Op != Op386ANDLconst {
  2280  			break
  2281  		}
  2282  		c := auxIntToInt32(l.AuxInt)
  2283  		x := l.Args[0]
  2284  		if !(l.Uses == 1) {
  2285  			break
  2286  		}
  2287  		v.reset(Op386TESTLconst)
  2288  		v.AuxInt = int32ToAuxInt(c)
  2289  		v.AddArg(x)
  2290  		return true
  2291  	}
  2292  	// match: (CMPLconst x [0])
  2293  	// result: (TESTL x x)
  2294  	for {
  2295  		if auxIntToInt32(v.AuxInt) != 0 {
  2296  			break
  2297  		}
  2298  		x := v_0
  2299  		v.reset(Op386TESTL)
  2300  		v.AddArg2(x, x)
  2301  		return true
  2302  	}
  2303  	// match: (CMPLconst l:(MOVLload {sym} [off] ptr mem) [c])
  2304  	// cond: l.Uses == 1 && validValAndOff(int64(c), int64(off)) && clobber(l)
  2305  	// result: @l.Block (CMPLconstload {sym} [makeValAndOff32(int32(c),int32(off))] ptr mem)
  2306  	for {
  2307  		c := auxIntToInt32(v.AuxInt)
  2308  		l := v_0
  2309  		if l.Op != Op386MOVLload {
  2310  			break
  2311  		}
  2312  		off := auxIntToInt32(l.AuxInt)
  2313  		sym := auxToSym(l.Aux)
  2314  		mem := l.Args[1]
  2315  		ptr := l.Args[0]
  2316  		if !(l.Uses == 1 && validValAndOff(int64(c), int64(off)) && clobber(l)) {
  2317  			break
  2318  		}
  2319  		b = l.Block
  2320  		v0 := b.NewValue0(l.Pos, Op386CMPLconstload, types.TypeFlags)
  2321  		v.copyOf(v0)
  2322  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(c), int32(off)))
  2323  		v0.Aux = symToAux(sym)
  2324  		v0.AddArg2(ptr, mem)
  2325  		return true
  2326  	}
  2327  	return false
  2328  }
  2329  func rewriteValue386_Op386CMPLload(v *Value) bool {
  2330  	v_2 := v.Args[2]
  2331  	v_1 := v.Args[1]
  2332  	v_0 := v.Args[0]
  2333  	// match: (CMPLload {sym} [off] ptr (MOVLconst [c]) mem)
  2334  	// cond: validValAndOff(int64(c),int64(off))
  2335  	// result: (CMPLconstload {sym} [makeValAndOff32(c,off)] ptr mem)
  2336  	for {
  2337  		off := auxIntToInt32(v.AuxInt)
  2338  		sym := auxToSym(v.Aux)
  2339  		ptr := v_0
  2340  		if v_1.Op != Op386MOVLconst {
  2341  			break
  2342  		}
  2343  		c := auxIntToInt32(v_1.AuxInt)
  2344  		mem := v_2
  2345  		if !(validValAndOff(int64(c), int64(off))) {
  2346  			break
  2347  		}
  2348  		v.reset(Op386CMPLconstload)
  2349  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  2350  		v.Aux = symToAux(sym)
  2351  		v.AddArg2(ptr, mem)
  2352  		return true
  2353  	}
  2354  	return false
  2355  }
  2356  func rewriteValue386_Op386CMPW(v *Value) bool {
  2357  	v_1 := v.Args[1]
  2358  	v_0 := v.Args[0]
  2359  	b := v.Block
  2360  	// match: (CMPW x (MOVLconst [c]))
  2361  	// result: (CMPWconst x [int16(c)])
  2362  	for {
  2363  		x := v_0
  2364  		if v_1.Op != Op386MOVLconst {
  2365  			break
  2366  		}
  2367  		c := auxIntToInt32(v_1.AuxInt)
  2368  		v.reset(Op386CMPWconst)
  2369  		v.AuxInt = int16ToAuxInt(int16(c))
  2370  		v.AddArg(x)
  2371  		return true
  2372  	}
  2373  	// match: (CMPW (MOVLconst [c]) x)
  2374  	// result: (InvertFlags (CMPWconst x [int16(c)]))
  2375  	for {
  2376  		if v_0.Op != Op386MOVLconst {
  2377  			break
  2378  		}
  2379  		c := auxIntToInt32(v_0.AuxInt)
  2380  		x := v_1
  2381  		v.reset(Op386InvertFlags)
  2382  		v0 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  2383  		v0.AuxInt = int16ToAuxInt(int16(c))
  2384  		v0.AddArg(x)
  2385  		v.AddArg(v0)
  2386  		return true
  2387  	}
  2388  	// match: (CMPW x y)
  2389  	// cond: x.ID > y.ID
  2390  	// result: (InvertFlags (CMPW y x))
  2391  	for {
  2392  		x := v_0
  2393  		y := v_1
  2394  		if !(x.ID > y.ID) {
  2395  			break
  2396  		}
  2397  		v.reset(Op386InvertFlags)
  2398  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  2399  		v0.AddArg2(y, x)
  2400  		v.AddArg(v0)
  2401  		return true
  2402  	}
  2403  	// match: (CMPW l:(MOVWload {sym} [off] ptr mem) x)
  2404  	// cond: canMergeLoad(v, l) && clobber(l)
  2405  	// result: (CMPWload {sym} [off] ptr x mem)
  2406  	for {
  2407  		l := v_0
  2408  		if l.Op != Op386MOVWload {
  2409  			break
  2410  		}
  2411  		off := auxIntToInt32(l.AuxInt)
  2412  		sym := auxToSym(l.Aux)
  2413  		mem := l.Args[1]
  2414  		ptr := l.Args[0]
  2415  		x := v_1
  2416  		if !(canMergeLoad(v, l) && clobber(l)) {
  2417  			break
  2418  		}
  2419  		v.reset(Op386CMPWload)
  2420  		v.AuxInt = int32ToAuxInt(off)
  2421  		v.Aux = symToAux(sym)
  2422  		v.AddArg3(ptr, x, mem)
  2423  		return true
  2424  	}
  2425  	// match: (CMPW x l:(MOVWload {sym} [off] ptr mem))
  2426  	// cond: canMergeLoad(v, l) && clobber(l)
  2427  	// result: (InvertFlags (CMPWload {sym} [off] ptr x mem))
  2428  	for {
  2429  		x := v_0
  2430  		l := v_1
  2431  		if l.Op != Op386MOVWload {
  2432  			break
  2433  		}
  2434  		off := auxIntToInt32(l.AuxInt)
  2435  		sym := auxToSym(l.Aux)
  2436  		mem := l.Args[1]
  2437  		ptr := l.Args[0]
  2438  		if !(canMergeLoad(v, l) && clobber(l)) {
  2439  			break
  2440  		}
  2441  		v.reset(Op386InvertFlags)
  2442  		v0 := b.NewValue0(l.Pos, Op386CMPWload, types.TypeFlags)
  2443  		v0.AuxInt = int32ToAuxInt(off)
  2444  		v0.Aux = symToAux(sym)
  2445  		v0.AddArg3(ptr, x, mem)
  2446  		v.AddArg(v0)
  2447  		return true
  2448  	}
  2449  	return false
  2450  }
  2451  func rewriteValue386_Op386CMPWconst(v *Value) bool {
  2452  	v_0 := v.Args[0]
  2453  	b := v.Block
  2454  	// match: (CMPWconst (MOVLconst [x]) [y])
  2455  	// cond: int16(x)==y
  2456  	// result: (FlagEQ)
  2457  	for {
  2458  		y := auxIntToInt16(v.AuxInt)
  2459  		if v_0.Op != Op386MOVLconst {
  2460  			break
  2461  		}
  2462  		x := auxIntToInt32(v_0.AuxInt)
  2463  		if !(int16(x) == y) {
  2464  			break
  2465  		}
  2466  		v.reset(Op386FlagEQ)
  2467  		return true
  2468  	}
  2469  	// match: (CMPWconst (MOVLconst [x]) [y])
  2470  	// cond: int16(x)<y && uint16(x)<uint16(y)
  2471  	// result: (FlagLT_ULT)
  2472  	for {
  2473  		y := auxIntToInt16(v.AuxInt)
  2474  		if v_0.Op != Op386MOVLconst {
  2475  			break
  2476  		}
  2477  		x := auxIntToInt32(v_0.AuxInt)
  2478  		if !(int16(x) < y && uint16(x) < uint16(y)) {
  2479  			break
  2480  		}
  2481  		v.reset(Op386FlagLT_ULT)
  2482  		return true
  2483  	}
  2484  	// match: (CMPWconst (MOVLconst [x]) [y])
  2485  	// cond: int16(x)<y && uint16(x)>uint16(y)
  2486  	// result: (FlagLT_UGT)
  2487  	for {
  2488  		y := auxIntToInt16(v.AuxInt)
  2489  		if v_0.Op != Op386MOVLconst {
  2490  			break
  2491  		}
  2492  		x := auxIntToInt32(v_0.AuxInt)
  2493  		if !(int16(x) < y && uint16(x) > uint16(y)) {
  2494  			break
  2495  		}
  2496  		v.reset(Op386FlagLT_UGT)
  2497  		return true
  2498  	}
  2499  	// match: (CMPWconst (MOVLconst [x]) [y])
  2500  	// cond: int16(x)>y && uint16(x)<uint16(y)
  2501  	// result: (FlagGT_ULT)
  2502  	for {
  2503  		y := auxIntToInt16(v.AuxInt)
  2504  		if v_0.Op != Op386MOVLconst {
  2505  			break
  2506  		}
  2507  		x := auxIntToInt32(v_0.AuxInt)
  2508  		if !(int16(x) > y && uint16(x) < uint16(y)) {
  2509  			break
  2510  		}
  2511  		v.reset(Op386FlagGT_ULT)
  2512  		return true
  2513  	}
  2514  	// match: (CMPWconst (MOVLconst [x]) [y])
  2515  	// cond: int16(x)>y && uint16(x)>uint16(y)
  2516  	// result: (FlagGT_UGT)
  2517  	for {
  2518  		y := auxIntToInt16(v.AuxInt)
  2519  		if v_0.Op != Op386MOVLconst {
  2520  			break
  2521  		}
  2522  		x := auxIntToInt32(v_0.AuxInt)
  2523  		if !(int16(x) > y && uint16(x) > uint16(y)) {
  2524  			break
  2525  		}
  2526  		v.reset(Op386FlagGT_UGT)
  2527  		return true
  2528  	}
  2529  	// match: (CMPWconst (ANDLconst _ [m]) [n])
  2530  	// cond: 0 <= int16(m) && int16(m) < n
  2531  	// result: (FlagLT_ULT)
  2532  	for {
  2533  		n := auxIntToInt16(v.AuxInt)
  2534  		if v_0.Op != Op386ANDLconst {
  2535  			break
  2536  		}
  2537  		m := auxIntToInt32(v_0.AuxInt)
  2538  		if !(0 <= int16(m) && int16(m) < n) {
  2539  			break
  2540  		}
  2541  		v.reset(Op386FlagLT_ULT)
  2542  		return true
  2543  	}
  2544  	// match: (CMPWconst l:(ANDL x y) [0])
  2545  	// cond: l.Uses==1
  2546  	// result: (TESTW x y)
  2547  	for {
  2548  		if auxIntToInt16(v.AuxInt) != 0 {
  2549  			break
  2550  		}
  2551  		l := v_0
  2552  		if l.Op != Op386ANDL {
  2553  			break
  2554  		}
  2555  		y := l.Args[1]
  2556  		x := l.Args[0]
  2557  		if !(l.Uses == 1) {
  2558  			break
  2559  		}
  2560  		v.reset(Op386TESTW)
  2561  		v.AddArg2(x, y)
  2562  		return true
  2563  	}
  2564  	// match: (CMPWconst l:(ANDLconst [c] x) [0])
  2565  	// cond: l.Uses==1
  2566  	// result: (TESTWconst [int16(c)] x)
  2567  	for {
  2568  		if auxIntToInt16(v.AuxInt) != 0 {
  2569  			break
  2570  		}
  2571  		l := v_0
  2572  		if l.Op != Op386ANDLconst {
  2573  			break
  2574  		}
  2575  		c := auxIntToInt32(l.AuxInt)
  2576  		x := l.Args[0]
  2577  		if !(l.Uses == 1) {
  2578  			break
  2579  		}
  2580  		v.reset(Op386TESTWconst)
  2581  		v.AuxInt = int16ToAuxInt(int16(c))
  2582  		v.AddArg(x)
  2583  		return true
  2584  	}
  2585  	// match: (CMPWconst x [0])
  2586  	// result: (TESTW x x)
  2587  	for {
  2588  		if auxIntToInt16(v.AuxInt) != 0 {
  2589  			break
  2590  		}
  2591  		x := v_0
  2592  		v.reset(Op386TESTW)
  2593  		v.AddArg2(x, x)
  2594  		return true
  2595  	}
  2596  	// match: (CMPWconst l:(MOVWload {sym} [off] ptr mem) [c])
  2597  	// cond: l.Uses == 1 && validValAndOff(int64(c), int64(off)) && clobber(l)
  2598  	// result: @l.Block (CMPWconstload {sym} [makeValAndOff32(int32(c),int32(off))] ptr mem)
  2599  	for {
  2600  		c := auxIntToInt16(v.AuxInt)
  2601  		l := v_0
  2602  		if l.Op != Op386MOVWload {
  2603  			break
  2604  		}
  2605  		off := auxIntToInt32(l.AuxInt)
  2606  		sym := auxToSym(l.Aux)
  2607  		mem := l.Args[1]
  2608  		ptr := l.Args[0]
  2609  		if !(l.Uses == 1 && validValAndOff(int64(c), int64(off)) && clobber(l)) {
  2610  			break
  2611  		}
  2612  		b = l.Block
  2613  		v0 := b.NewValue0(l.Pos, Op386CMPWconstload, types.TypeFlags)
  2614  		v.copyOf(v0)
  2615  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(c), int32(off)))
  2616  		v0.Aux = symToAux(sym)
  2617  		v0.AddArg2(ptr, mem)
  2618  		return true
  2619  	}
  2620  	return false
  2621  }
  2622  func rewriteValue386_Op386CMPWload(v *Value) bool {
  2623  	v_2 := v.Args[2]
  2624  	v_1 := v.Args[1]
  2625  	v_0 := v.Args[0]
  2626  	// match: (CMPWload {sym} [off] ptr (MOVLconst [c]) mem)
  2627  	// cond: validValAndOff(int64(int16(c)),int64(off))
  2628  	// result: (CMPWconstload {sym} [makeValAndOff32(int32(int16(c)),off)] ptr mem)
  2629  	for {
  2630  		off := auxIntToInt32(v.AuxInt)
  2631  		sym := auxToSym(v.Aux)
  2632  		ptr := v_0
  2633  		if v_1.Op != Op386MOVLconst {
  2634  			break
  2635  		}
  2636  		c := auxIntToInt32(v_1.AuxInt)
  2637  		mem := v_2
  2638  		if !(validValAndOff(int64(int16(c)), int64(off))) {
  2639  			break
  2640  		}
  2641  		v.reset(Op386CMPWconstload)
  2642  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(int16(c)), off))
  2643  		v.Aux = symToAux(sym)
  2644  		v.AddArg2(ptr, mem)
  2645  		return true
  2646  	}
  2647  	return false
  2648  }
  2649  func rewriteValue386_Op386DIVSD(v *Value) bool {
  2650  	v_1 := v.Args[1]
  2651  	v_0 := v.Args[0]
  2652  	// match: (DIVSD x l:(MOVSDload [off] {sym} ptr mem))
  2653  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  2654  	// result: (DIVSDload x [off] {sym} ptr mem)
  2655  	for {
  2656  		x := v_0
  2657  		l := v_1
  2658  		if l.Op != Op386MOVSDload {
  2659  			break
  2660  		}
  2661  		off := auxIntToInt32(l.AuxInt)
  2662  		sym := auxToSym(l.Aux)
  2663  		mem := l.Args[1]
  2664  		ptr := l.Args[0]
  2665  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  2666  			break
  2667  		}
  2668  		v.reset(Op386DIVSDload)
  2669  		v.AuxInt = int32ToAuxInt(off)
  2670  		v.Aux = symToAux(sym)
  2671  		v.AddArg3(x, ptr, mem)
  2672  		return true
  2673  	}
  2674  	return false
  2675  }
  2676  func rewriteValue386_Op386DIVSDload(v *Value) bool {
  2677  	v_2 := v.Args[2]
  2678  	v_1 := v.Args[1]
  2679  	v_0 := v.Args[0]
  2680  	b := v.Block
  2681  	config := b.Func.Config
  2682  	// match: (DIVSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  2683  	// cond: is32Bit(int64(off1)+int64(off2))
  2684  	// result: (DIVSDload [off1+off2] {sym} val base mem)
  2685  	for {
  2686  		off1 := auxIntToInt32(v.AuxInt)
  2687  		sym := auxToSym(v.Aux)
  2688  		val := v_0
  2689  		if v_1.Op != Op386ADDLconst {
  2690  			break
  2691  		}
  2692  		off2 := auxIntToInt32(v_1.AuxInt)
  2693  		base := v_1.Args[0]
  2694  		mem := v_2
  2695  		if !(is32Bit(int64(off1) + int64(off2))) {
  2696  			break
  2697  		}
  2698  		v.reset(Op386DIVSDload)
  2699  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2700  		v.Aux = symToAux(sym)
  2701  		v.AddArg3(val, base, mem)
  2702  		return true
  2703  	}
  2704  	// match: (DIVSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2705  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2706  	// result: (DIVSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  2707  	for {
  2708  		off1 := auxIntToInt32(v.AuxInt)
  2709  		sym1 := auxToSym(v.Aux)
  2710  		val := v_0
  2711  		if v_1.Op != Op386LEAL {
  2712  			break
  2713  		}
  2714  		off2 := auxIntToInt32(v_1.AuxInt)
  2715  		sym2 := auxToSym(v_1.Aux)
  2716  		base := v_1.Args[0]
  2717  		mem := v_2
  2718  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2719  			break
  2720  		}
  2721  		v.reset(Op386DIVSDload)
  2722  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2723  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2724  		v.AddArg3(val, base, mem)
  2725  		return true
  2726  	}
  2727  	return false
  2728  }
  2729  func rewriteValue386_Op386DIVSS(v *Value) bool {
  2730  	v_1 := v.Args[1]
  2731  	v_0 := v.Args[0]
  2732  	// match: (DIVSS x l:(MOVSSload [off] {sym} ptr mem))
  2733  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  2734  	// result: (DIVSSload x [off] {sym} ptr mem)
  2735  	for {
  2736  		x := v_0
  2737  		l := v_1
  2738  		if l.Op != Op386MOVSSload {
  2739  			break
  2740  		}
  2741  		off := auxIntToInt32(l.AuxInt)
  2742  		sym := auxToSym(l.Aux)
  2743  		mem := l.Args[1]
  2744  		ptr := l.Args[0]
  2745  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  2746  			break
  2747  		}
  2748  		v.reset(Op386DIVSSload)
  2749  		v.AuxInt = int32ToAuxInt(off)
  2750  		v.Aux = symToAux(sym)
  2751  		v.AddArg3(x, ptr, mem)
  2752  		return true
  2753  	}
  2754  	return false
  2755  }
  2756  func rewriteValue386_Op386DIVSSload(v *Value) bool {
  2757  	v_2 := v.Args[2]
  2758  	v_1 := v.Args[1]
  2759  	v_0 := v.Args[0]
  2760  	b := v.Block
  2761  	config := b.Func.Config
  2762  	// match: (DIVSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  2763  	// cond: is32Bit(int64(off1)+int64(off2))
  2764  	// result: (DIVSSload [off1+off2] {sym} val base mem)
  2765  	for {
  2766  		off1 := auxIntToInt32(v.AuxInt)
  2767  		sym := auxToSym(v.Aux)
  2768  		val := v_0
  2769  		if v_1.Op != Op386ADDLconst {
  2770  			break
  2771  		}
  2772  		off2 := auxIntToInt32(v_1.AuxInt)
  2773  		base := v_1.Args[0]
  2774  		mem := v_2
  2775  		if !(is32Bit(int64(off1) + int64(off2))) {
  2776  			break
  2777  		}
  2778  		v.reset(Op386DIVSSload)
  2779  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2780  		v.Aux = symToAux(sym)
  2781  		v.AddArg3(val, base, mem)
  2782  		return true
  2783  	}
  2784  	// match: (DIVSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  2785  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  2786  	// result: (DIVSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  2787  	for {
  2788  		off1 := auxIntToInt32(v.AuxInt)
  2789  		sym1 := auxToSym(v.Aux)
  2790  		val := v_0
  2791  		if v_1.Op != Op386LEAL {
  2792  			break
  2793  		}
  2794  		off2 := auxIntToInt32(v_1.AuxInt)
  2795  		sym2 := auxToSym(v_1.Aux)
  2796  		base := v_1.Args[0]
  2797  		mem := v_2
  2798  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  2799  			break
  2800  		}
  2801  		v.reset(Op386DIVSSload)
  2802  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2803  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2804  		v.AddArg3(val, base, mem)
  2805  		return true
  2806  	}
  2807  	return false
  2808  }
  2809  func rewriteValue386_Op386LEAL(v *Value) bool {
  2810  	v_0 := v.Args[0]
  2811  	// match: (LEAL [c] {s} (ADDLconst [d] x))
  2812  	// cond: is32Bit(int64(c)+int64(d))
  2813  	// result: (LEAL [c+d] {s} x)
  2814  	for {
  2815  		c := auxIntToInt32(v.AuxInt)
  2816  		s := auxToSym(v.Aux)
  2817  		if v_0.Op != Op386ADDLconst {
  2818  			break
  2819  		}
  2820  		d := auxIntToInt32(v_0.AuxInt)
  2821  		x := v_0.Args[0]
  2822  		if !(is32Bit(int64(c) + int64(d))) {
  2823  			break
  2824  		}
  2825  		v.reset(Op386LEAL)
  2826  		v.AuxInt = int32ToAuxInt(c + d)
  2827  		v.Aux = symToAux(s)
  2828  		v.AddArg(x)
  2829  		return true
  2830  	}
  2831  	// match: (LEAL [c] {s} (ADDL x y))
  2832  	// cond: x.Op != OpSB && y.Op != OpSB
  2833  	// result: (LEAL1 [c] {s} x y)
  2834  	for {
  2835  		c := auxIntToInt32(v.AuxInt)
  2836  		s := auxToSym(v.Aux)
  2837  		if v_0.Op != Op386ADDL {
  2838  			break
  2839  		}
  2840  		_ = v_0.Args[1]
  2841  		v_0_0 := v_0.Args[0]
  2842  		v_0_1 := v_0.Args[1]
  2843  		for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
  2844  			x := v_0_0
  2845  			y := v_0_1
  2846  			if !(x.Op != OpSB && y.Op != OpSB) {
  2847  				continue
  2848  			}
  2849  			v.reset(Op386LEAL1)
  2850  			v.AuxInt = int32ToAuxInt(c)
  2851  			v.Aux = symToAux(s)
  2852  			v.AddArg2(x, y)
  2853  			return true
  2854  		}
  2855  		break
  2856  	}
  2857  	// match: (LEAL [off1] {sym1} (LEAL [off2] {sym2} x))
  2858  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2859  	// result: (LEAL [off1+off2] {mergeSym(sym1,sym2)} x)
  2860  	for {
  2861  		off1 := auxIntToInt32(v.AuxInt)
  2862  		sym1 := auxToSym(v.Aux)
  2863  		if v_0.Op != Op386LEAL {
  2864  			break
  2865  		}
  2866  		off2 := auxIntToInt32(v_0.AuxInt)
  2867  		sym2 := auxToSym(v_0.Aux)
  2868  		x := v_0.Args[0]
  2869  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2870  			break
  2871  		}
  2872  		v.reset(Op386LEAL)
  2873  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2874  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2875  		v.AddArg(x)
  2876  		return true
  2877  	}
  2878  	// match: (LEAL [off1] {sym1} (LEAL1 [off2] {sym2} x y))
  2879  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2880  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2881  	for {
  2882  		off1 := auxIntToInt32(v.AuxInt)
  2883  		sym1 := auxToSym(v.Aux)
  2884  		if v_0.Op != Op386LEAL1 {
  2885  			break
  2886  		}
  2887  		off2 := auxIntToInt32(v_0.AuxInt)
  2888  		sym2 := auxToSym(v_0.Aux)
  2889  		y := v_0.Args[1]
  2890  		x := v_0.Args[0]
  2891  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2892  			break
  2893  		}
  2894  		v.reset(Op386LEAL1)
  2895  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2896  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2897  		v.AddArg2(x, y)
  2898  		return true
  2899  	}
  2900  	// match: (LEAL [off1] {sym1} (LEAL2 [off2] {sym2} x y))
  2901  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2902  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2903  	for {
  2904  		off1 := auxIntToInt32(v.AuxInt)
  2905  		sym1 := auxToSym(v.Aux)
  2906  		if v_0.Op != Op386LEAL2 {
  2907  			break
  2908  		}
  2909  		off2 := auxIntToInt32(v_0.AuxInt)
  2910  		sym2 := auxToSym(v_0.Aux)
  2911  		y := v_0.Args[1]
  2912  		x := v_0.Args[0]
  2913  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2914  			break
  2915  		}
  2916  		v.reset(Op386LEAL2)
  2917  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2918  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2919  		v.AddArg2(x, y)
  2920  		return true
  2921  	}
  2922  	// match: (LEAL [off1] {sym1} (LEAL4 [off2] {sym2} x y))
  2923  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2924  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2925  	for {
  2926  		off1 := auxIntToInt32(v.AuxInt)
  2927  		sym1 := auxToSym(v.Aux)
  2928  		if v_0.Op != Op386LEAL4 {
  2929  			break
  2930  		}
  2931  		off2 := auxIntToInt32(v_0.AuxInt)
  2932  		sym2 := auxToSym(v_0.Aux)
  2933  		y := v_0.Args[1]
  2934  		x := v_0.Args[0]
  2935  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2936  			break
  2937  		}
  2938  		v.reset(Op386LEAL4)
  2939  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2940  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2941  		v.AddArg2(x, y)
  2942  		return true
  2943  	}
  2944  	// match: (LEAL [off1] {sym1} (LEAL8 [off2] {sym2} x y))
  2945  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  2946  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  2947  	for {
  2948  		off1 := auxIntToInt32(v.AuxInt)
  2949  		sym1 := auxToSym(v.Aux)
  2950  		if v_0.Op != Op386LEAL8 {
  2951  			break
  2952  		}
  2953  		off2 := auxIntToInt32(v_0.AuxInt)
  2954  		sym2 := auxToSym(v_0.Aux)
  2955  		y := v_0.Args[1]
  2956  		x := v_0.Args[0]
  2957  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  2958  			break
  2959  		}
  2960  		v.reset(Op386LEAL8)
  2961  		v.AuxInt = int32ToAuxInt(off1 + off2)
  2962  		v.Aux = symToAux(mergeSym(sym1, sym2))
  2963  		v.AddArg2(x, y)
  2964  		return true
  2965  	}
  2966  	return false
  2967  }
  2968  func rewriteValue386_Op386LEAL1(v *Value) bool {
  2969  	v_1 := v.Args[1]
  2970  	v_0 := v.Args[0]
  2971  	// match: (LEAL1 [c] {s} (ADDLconst [d] x) y)
  2972  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  2973  	// result: (LEAL1 [c+d] {s} x y)
  2974  	for {
  2975  		c := auxIntToInt32(v.AuxInt)
  2976  		s := auxToSym(v.Aux)
  2977  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  2978  			if v_0.Op != Op386ADDLconst {
  2979  				continue
  2980  			}
  2981  			d := auxIntToInt32(v_0.AuxInt)
  2982  			x := v_0.Args[0]
  2983  			y := v_1
  2984  			if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  2985  				continue
  2986  			}
  2987  			v.reset(Op386LEAL1)
  2988  			v.AuxInt = int32ToAuxInt(c + d)
  2989  			v.Aux = symToAux(s)
  2990  			v.AddArg2(x, y)
  2991  			return true
  2992  		}
  2993  		break
  2994  	}
  2995  	// match: (LEAL1 [c] {s} x (SHLLconst [1] y))
  2996  	// result: (LEAL2 [c] {s} x y)
  2997  	for {
  2998  		c := auxIntToInt32(v.AuxInt)
  2999  		s := auxToSym(v.Aux)
  3000  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3001  			x := v_0
  3002  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3003  				continue
  3004  			}
  3005  			y := v_1.Args[0]
  3006  			v.reset(Op386LEAL2)
  3007  			v.AuxInt = int32ToAuxInt(c)
  3008  			v.Aux = symToAux(s)
  3009  			v.AddArg2(x, y)
  3010  			return true
  3011  		}
  3012  		break
  3013  	}
  3014  	// match: (LEAL1 [c] {s} x (SHLLconst [2] y))
  3015  	// result: (LEAL4 [c] {s} x y)
  3016  	for {
  3017  		c := auxIntToInt32(v.AuxInt)
  3018  		s := auxToSym(v.Aux)
  3019  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3020  			x := v_0
  3021  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
  3022  				continue
  3023  			}
  3024  			y := v_1.Args[0]
  3025  			v.reset(Op386LEAL4)
  3026  			v.AuxInt = int32ToAuxInt(c)
  3027  			v.Aux = symToAux(s)
  3028  			v.AddArg2(x, y)
  3029  			return true
  3030  		}
  3031  		break
  3032  	}
  3033  	// match: (LEAL1 [c] {s} x (SHLLconst [3] y))
  3034  	// result: (LEAL8 [c] {s} x y)
  3035  	for {
  3036  		c := auxIntToInt32(v.AuxInt)
  3037  		s := auxToSym(v.Aux)
  3038  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3039  			x := v_0
  3040  			if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 3 {
  3041  				continue
  3042  			}
  3043  			y := v_1.Args[0]
  3044  			v.reset(Op386LEAL8)
  3045  			v.AuxInt = int32ToAuxInt(c)
  3046  			v.Aux = symToAux(s)
  3047  			v.AddArg2(x, y)
  3048  			return true
  3049  		}
  3050  		break
  3051  	}
  3052  	// match: (LEAL1 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3053  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3054  	// result: (LEAL1 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3055  	for {
  3056  		off1 := auxIntToInt32(v.AuxInt)
  3057  		sym1 := auxToSym(v.Aux)
  3058  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3059  			if v_0.Op != Op386LEAL {
  3060  				continue
  3061  			}
  3062  			off2 := auxIntToInt32(v_0.AuxInt)
  3063  			sym2 := auxToSym(v_0.Aux)
  3064  			x := v_0.Args[0]
  3065  			y := v_1
  3066  			if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3067  				continue
  3068  			}
  3069  			v.reset(Op386LEAL1)
  3070  			v.AuxInt = int32ToAuxInt(off1 + off2)
  3071  			v.Aux = symToAux(mergeSym(sym1, sym2))
  3072  			v.AddArg2(x, y)
  3073  			return true
  3074  		}
  3075  		break
  3076  	}
  3077  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} y y))
  3078  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  3079  	// result: (LEAL2 [off1+off2] {mergeSym(sym1, sym2)} x y)
  3080  	for {
  3081  		off1 := auxIntToInt32(v.AuxInt)
  3082  		sym1 := auxToSym(v.Aux)
  3083  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3084  			x := v_0
  3085  			if v_1.Op != Op386LEAL1 {
  3086  				continue
  3087  			}
  3088  			off2 := auxIntToInt32(v_1.AuxInt)
  3089  			sym2 := auxToSym(v_1.Aux)
  3090  			y := v_1.Args[1]
  3091  			if y != v_1.Args[0] || !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  3092  				continue
  3093  			}
  3094  			v.reset(Op386LEAL2)
  3095  			v.AuxInt = int32ToAuxInt(off1 + off2)
  3096  			v.Aux = symToAux(mergeSym(sym1, sym2))
  3097  			v.AddArg2(x, y)
  3098  			return true
  3099  		}
  3100  		break
  3101  	}
  3102  	// match: (LEAL1 [off1] {sym1} x (LEAL1 [off2] {sym2} x y))
  3103  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)
  3104  	// result: (LEAL2 [off1+off2] {mergeSym(sym1, sym2)} y x)
  3105  	for {
  3106  		off1 := auxIntToInt32(v.AuxInt)
  3107  		sym1 := auxToSym(v.Aux)
  3108  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  3109  			x := v_0
  3110  			if v_1.Op != Op386LEAL1 {
  3111  				continue
  3112  			}
  3113  			off2 := auxIntToInt32(v_1.AuxInt)
  3114  			sym2 := auxToSym(v_1.Aux)
  3115  			_ = v_1.Args[1]
  3116  			v_1_0 := v_1.Args[0]
  3117  			v_1_1 := v_1.Args[1]
  3118  			for _i1 := 0; _i1 <= 1; _i1, v_1_0, v_1_1 = _i1+1, v_1_1, v_1_0 {
  3119  				if x != v_1_0 {
  3120  					continue
  3121  				}
  3122  				y := v_1_1
  3123  				if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2)) {
  3124  					continue
  3125  				}
  3126  				v.reset(Op386LEAL2)
  3127  				v.AuxInt = int32ToAuxInt(off1 + off2)
  3128  				v.Aux = symToAux(mergeSym(sym1, sym2))
  3129  				v.AddArg2(y, x)
  3130  				return true
  3131  			}
  3132  		}
  3133  		break
  3134  	}
  3135  	// match: (LEAL1 [0] {nil} x y)
  3136  	// result: (ADDL x y)
  3137  	for {
  3138  		if auxIntToInt32(v.AuxInt) != 0 || auxToSym(v.Aux) != nil {
  3139  			break
  3140  		}
  3141  		x := v_0
  3142  		y := v_1
  3143  		v.reset(Op386ADDL)
  3144  		v.AddArg2(x, y)
  3145  		return true
  3146  	}
  3147  	return false
  3148  }
  3149  func rewriteValue386_Op386LEAL2(v *Value) bool {
  3150  	v_1 := v.Args[1]
  3151  	v_0 := v.Args[0]
  3152  	// match: (LEAL2 [c] {s} (ADDLconst [d] x) y)
  3153  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3154  	// result: (LEAL2 [c+d] {s} x y)
  3155  	for {
  3156  		c := auxIntToInt32(v.AuxInt)
  3157  		s := auxToSym(v.Aux)
  3158  		if v_0.Op != Op386ADDLconst {
  3159  			break
  3160  		}
  3161  		d := auxIntToInt32(v_0.AuxInt)
  3162  		x := v_0.Args[0]
  3163  		y := v_1
  3164  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3165  			break
  3166  		}
  3167  		v.reset(Op386LEAL2)
  3168  		v.AuxInt = int32ToAuxInt(c + d)
  3169  		v.Aux = symToAux(s)
  3170  		v.AddArg2(x, y)
  3171  		return true
  3172  	}
  3173  	// match: (LEAL2 [c] {s} x (ADDLconst [d] y))
  3174  	// cond: is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB
  3175  	// result: (LEAL2 [c+2*d] {s} x y)
  3176  	for {
  3177  		c := auxIntToInt32(v.AuxInt)
  3178  		s := auxToSym(v.Aux)
  3179  		x := v_0
  3180  		if v_1.Op != Op386ADDLconst {
  3181  			break
  3182  		}
  3183  		d := auxIntToInt32(v_1.AuxInt)
  3184  		y := v_1.Args[0]
  3185  		if !(is32Bit(int64(c)+2*int64(d)) && y.Op != OpSB) {
  3186  			break
  3187  		}
  3188  		v.reset(Op386LEAL2)
  3189  		v.AuxInt = int32ToAuxInt(c + 2*d)
  3190  		v.Aux = symToAux(s)
  3191  		v.AddArg2(x, y)
  3192  		return true
  3193  	}
  3194  	// match: (LEAL2 [c] {s} x (SHLLconst [1] y))
  3195  	// result: (LEAL4 [c] {s} x y)
  3196  	for {
  3197  		c := auxIntToInt32(v.AuxInt)
  3198  		s := auxToSym(v.Aux)
  3199  		x := v_0
  3200  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3201  			break
  3202  		}
  3203  		y := v_1.Args[0]
  3204  		v.reset(Op386LEAL4)
  3205  		v.AuxInt = int32ToAuxInt(c)
  3206  		v.Aux = symToAux(s)
  3207  		v.AddArg2(x, y)
  3208  		return true
  3209  	}
  3210  	// match: (LEAL2 [c] {s} x (SHLLconst [2] y))
  3211  	// result: (LEAL8 [c] {s} x y)
  3212  	for {
  3213  		c := auxIntToInt32(v.AuxInt)
  3214  		s := auxToSym(v.Aux)
  3215  		x := v_0
  3216  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 2 {
  3217  			break
  3218  		}
  3219  		y := v_1.Args[0]
  3220  		v.reset(Op386LEAL8)
  3221  		v.AuxInt = int32ToAuxInt(c)
  3222  		v.Aux = symToAux(s)
  3223  		v.AddArg2(x, y)
  3224  		return true
  3225  	}
  3226  	// match: (LEAL2 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3227  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3228  	// result: (LEAL2 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3229  	for {
  3230  		off1 := auxIntToInt32(v.AuxInt)
  3231  		sym1 := auxToSym(v.Aux)
  3232  		if v_0.Op != Op386LEAL {
  3233  			break
  3234  		}
  3235  		off2 := auxIntToInt32(v_0.AuxInt)
  3236  		sym2 := auxToSym(v_0.Aux)
  3237  		x := v_0.Args[0]
  3238  		y := v_1
  3239  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3240  			break
  3241  		}
  3242  		v.reset(Op386LEAL2)
  3243  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3244  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3245  		v.AddArg2(x, y)
  3246  		return true
  3247  	}
  3248  	// match: (LEAL2 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3249  	// cond: is32Bit(int64(off1)+2*int64(off2))
  3250  	// result: (LEAL4 [off1+2*off2] {sym} x y)
  3251  	for {
  3252  		off1 := auxIntToInt32(v.AuxInt)
  3253  		sym := auxToSym(v.Aux)
  3254  		x := v_0
  3255  		if v_1.Op != Op386LEAL1 {
  3256  			break
  3257  		}
  3258  		off2 := auxIntToInt32(v_1.AuxInt)
  3259  		if auxToSym(v_1.Aux) != nil {
  3260  			break
  3261  		}
  3262  		y := v_1.Args[1]
  3263  		if y != v_1.Args[0] || !(is32Bit(int64(off1) + 2*int64(off2))) {
  3264  			break
  3265  		}
  3266  		v.reset(Op386LEAL4)
  3267  		v.AuxInt = int32ToAuxInt(off1 + 2*off2)
  3268  		v.Aux = symToAux(sym)
  3269  		v.AddArg2(x, y)
  3270  		return true
  3271  	}
  3272  	return false
  3273  }
  3274  func rewriteValue386_Op386LEAL4(v *Value) bool {
  3275  	v_1 := v.Args[1]
  3276  	v_0 := v.Args[0]
  3277  	// match: (LEAL4 [c] {s} (ADDLconst [d] x) y)
  3278  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3279  	// result: (LEAL4 [c+d] {s} x y)
  3280  	for {
  3281  		c := auxIntToInt32(v.AuxInt)
  3282  		s := auxToSym(v.Aux)
  3283  		if v_0.Op != Op386ADDLconst {
  3284  			break
  3285  		}
  3286  		d := auxIntToInt32(v_0.AuxInt)
  3287  		x := v_0.Args[0]
  3288  		y := v_1
  3289  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3290  			break
  3291  		}
  3292  		v.reset(Op386LEAL4)
  3293  		v.AuxInt = int32ToAuxInt(c + d)
  3294  		v.Aux = symToAux(s)
  3295  		v.AddArg2(x, y)
  3296  		return true
  3297  	}
  3298  	// match: (LEAL4 [c] {s} x (ADDLconst [d] y))
  3299  	// cond: is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB
  3300  	// result: (LEAL4 [c+4*d] {s} x y)
  3301  	for {
  3302  		c := auxIntToInt32(v.AuxInt)
  3303  		s := auxToSym(v.Aux)
  3304  		x := v_0
  3305  		if v_1.Op != Op386ADDLconst {
  3306  			break
  3307  		}
  3308  		d := auxIntToInt32(v_1.AuxInt)
  3309  		y := v_1.Args[0]
  3310  		if !(is32Bit(int64(c)+4*int64(d)) && y.Op != OpSB) {
  3311  			break
  3312  		}
  3313  		v.reset(Op386LEAL4)
  3314  		v.AuxInt = int32ToAuxInt(c + 4*d)
  3315  		v.Aux = symToAux(s)
  3316  		v.AddArg2(x, y)
  3317  		return true
  3318  	}
  3319  	// match: (LEAL4 [c] {s} x (SHLLconst [1] y))
  3320  	// result: (LEAL8 [c] {s} x y)
  3321  	for {
  3322  		c := auxIntToInt32(v.AuxInt)
  3323  		s := auxToSym(v.Aux)
  3324  		x := v_0
  3325  		if v_1.Op != Op386SHLLconst || auxIntToInt32(v_1.AuxInt) != 1 {
  3326  			break
  3327  		}
  3328  		y := v_1.Args[0]
  3329  		v.reset(Op386LEAL8)
  3330  		v.AuxInt = int32ToAuxInt(c)
  3331  		v.Aux = symToAux(s)
  3332  		v.AddArg2(x, y)
  3333  		return true
  3334  	}
  3335  	// match: (LEAL4 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3336  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3337  	// result: (LEAL4 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3338  	for {
  3339  		off1 := auxIntToInt32(v.AuxInt)
  3340  		sym1 := auxToSym(v.Aux)
  3341  		if v_0.Op != Op386LEAL {
  3342  			break
  3343  		}
  3344  		off2 := auxIntToInt32(v_0.AuxInt)
  3345  		sym2 := auxToSym(v_0.Aux)
  3346  		x := v_0.Args[0]
  3347  		y := v_1
  3348  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3349  			break
  3350  		}
  3351  		v.reset(Op386LEAL4)
  3352  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3353  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3354  		v.AddArg2(x, y)
  3355  		return true
  3356  	}
  3357  	// match: (LEAL4 [off1] {sym} x (LEAL1 [off2] {nil} y y))
  3358  	// cond: is32Bit(int64(off1)+4*int64(off2))
  3359  	// result: (LEAL8 [off1+4*off2] {sym} x y)
  3360  	for {
  3361  		off1 := auxIntToInt32(v.AuxInt)
  3362  		sym := auxToSym(v.Aux)
  3363  		x := v_0
  3364  		if v_1.Op != Op386LEAL1 {
  3365  			break
  3366  		}
  3367  		off2 := auxIntToInt32(v_1.AuxInt)
  3368  		if auxToSym(v_1.Aux) != nil {
  3369  			break
  3370  		}
  3371  		y := v_1.Args[1]
  3372  		if y != v_1.Args[0] || !(is32Bit(int64(off1) + 4*int64(off2))) {
  3373  			break
  3374  		}
  3375  		v.reset(Op386LEAL8)
  3376  		v.AuxInt = int32ToAuxInt(off1 + 4*off2)
  3377  		v.Aux = symToAux(sym)
  3378  		v.AddArg2(x, y)
  3379  		return true
  3380  	}
  3381  	return false
  3382  }
  3383  func rewriteValue386_Op386LEAL8(v *Value) bool {
  3384  	v_1 := v.Args[1]
  3385  	v_0 := v.Args[0]
  3386  	// match: (LEAL8 [c] {s} (ADDLconst [d] x) y)
  3387  	// cond: is32Bit(int64(c)+int64(d)) && x.Op != OpSB
  3388  	// result: (LEAL8 [c+d] {s} x y)
  3389  	for {
  3390  		c := auxIntToInt32(v.AuxInt)
  3391  		s := auxToSym(v.Aux)
  3392  		if v_0.Op != Op386ADDLconst {
  3393  			break
  3394  		}
  3395  		d := auxIntToInt32(v_0.AuxInt)
  3396  		x := v_0.Args[0]
  3397  		y := v_1
  3398  		if !(is32Bit(int64(c)+int64(d)) && x.Op != OpSB) {
  3399  			break
  3400  		}
  3401  		v.reset(Op386LEAL8)
  3402  		v.AuxInt = int32ToAuxInt(c + d)
  3403  		v.Aux = symToAux(s)
  3404  		v.AddArg2(x, y)
  3405  		return true
  3406  	}
  3407  	// match: (LEAL8 [c] {s} x (ADDLconst [d] y))
  3408  	// cond: is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB
  3409  	// result: (LEAL8 [c+8*d] {s} x y)
  3410  	for {
  3411  		c := auxIntToInt32(v.AuxInt)
  3412  		s := auxToSym(v.Aux)
  3413  		x := v_0
  3414  		if v_1.Op != Op386ADDLconst {
  3415  			break
  3416  		}
  3417  		d := auxIntToInt32(v_1.AuxInt)
  3418  		y := v_1.Args[0]
  3419  		if !(is32Bit(int64(c)+8*int64(d)) && y.Op != OpSB) {
  3420  			break
  3421  		}
  3422  		v.reset(Op386LEAL8)
  3423  		v.AuxInt = int32ToAuxInt(c + 8*d)
  3424  		v.Aux = symToAux(s)
  3425  		v.AddArg2(x, y)
  3426  		return true
  3427  	}
  3428  	// match: (LEAL8 [off1] {sym1} (LEAL [off2] {sym2} x) y)
  3429  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB
  3430  	// result: (LEAL8 [off1+off2] {mergeSym(sym1,sym2)} x y)
  3431  	for {
  3432  		off1 := auxIntToInt32(v.AuxInt)
  3433  		sym1 := auxToSym(v.Aux)
  3434  		if v_0.Op != Op386LEAL {
  3435  			break
  3436  		}
  3437  		off2 := auxIntToInt32(v_0.AuxInt)
  3438  		sym2 := auxToSym(v_0.Aux)
  3439  		x := v_0.Args[0]
  3440  		y := v_1
  3441  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && x.Op != OpSB) {
  3442  			break
  3443  		}
  3444  		v.reset(Op386LEAL8)
  3445  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3446  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3447  		v.AddArg2(x, y)
  3448  		return true
  3449  	}
  3450  	return false
  3451  }
  3452  func rewriteValue386_Op386MOVBLSX(v *Value) bool {
  3453  	v_0 := v.Args[0]
  3454  	b := v.Block
  3455  	// match: (MOVBLSX x:(MOVBload [off] {sym} ptr mem))
  3456  	// cond: x.Uses == 1 && clobber(x)
  3457  	// result: @x.Block (MOVBLSXload <v.Type> [off] {sym} ptr mem)
  3458  	for {
  3459  		x := v_0
  3460  		if x.Op != Op386MOVBload {
  3461  			break
  3462  		}
  3463  		off := auxIntToInt32(x.AuxInt)
  3464  		sym := auxToSym(x.Aux)
  3465  		mem := x.Args[1]
  3466  		ptr := x.Args[0]
  3467  		if !(x.Uses == 1 && clobber(x)) {
  3468  			break
  3469  		}
  3470  		b = x.Block
  3471  		v0 := b.NewValue0(x.Pos, Op386MOVBLSXload, v.Type)
  3472  		v.copyOf(v0)
  3473  		v0.AuxInt = int32ToAuxInt(off)
  3474  		v0.Aux = symToAux(sym)
  3475  		v0.AddArg2(ptr, mem)
  3476  		return true
  3477  	}
  3478  	// match: (MOVBLSX (ANDLconst [c] x))
  3479  	// cond: c & 0x80 == 0
  3480  	// result: (ANDLconst [c & 0x7f] x)
  3481  	for {
  3482  		if v_0.Op != Op386ANDLconst {
  3483  			break
  3484  		}
  3485  		c := auxIntToInt32(v_0.AuxInt)
  3486  		x := v_0.Args[0]
  3487  		if !(c&0x80 == 0) {
  3488  			break
  3489  		}
  3490  		v.reset(Op386ANDLconst)
  3491  		v.AuxInt = int32ToAuxInt(c & 0x7f)
  3492  		v.AddArg(x)
  3493  		return true
  3494  	}
  3495  	return false
  3496  }
  3497  func rewriteValue386_Op386MOVBLSXload(v *Value) bool {
  3498  	v_1 := v.Args[1]
  3499  	v_0 := v.Args[0]
  3500  	b := v.Block
  3501  	config := b.Func.Config
  3502  	// match: (MOVBLSXload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3503  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3504  	// result: (MOVBLSX x)
  3505  	for {
  3506  		off := auxIntToInt32(v.AuxInt)
  3507  		sym := auxToSym(v.Aux)
  3508  		ptr := v_0
  3509  		if v_1.Op != Op386MOVBstore {
  3510  			break
  3511  		}
  3512  		off2 := auxIntToInt32(v_1.AuxInt)
  3513  		sym2 := auxToSym(v_1.Aux)
  3514  		x := v_1.Args[1]
  3515  		ptr2 := v_1.Args[0]
  3516  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3517  			break
  3518  		}
  3519  		v.reset(Op386MOVBLSX)
  3520  		v.AddArg(x)
  3521  		return true
  3522  	}
  3523  	// match: (MOVBLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3524  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3525  	// result: (MOVBLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3526  	for {
  3527  		off1 := auxIntToInt32(v.AuxInt)
  3528  		sym1 := auxToSym(v.Aux)
  3529  		if v_0.Op != Op386LEAL {
  3530  			break
  3531  		}
  3532  		off2 := auxIntToInt32(v_0.AuxInt)
  3533  		sym2 := auxToSym(v_0.Aux)
  3534  		base := v_0.Args[0]
  3535  		mem := v_1
  3536  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3537  			break
  3538  		}
  3539  		v.reset(Op386MOVBLSXload)
  3540  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3541  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3542  		v.AddArg2(base, mem)
  3543  		return true
  3544  	}
  3545  	return false
  3546  }
  3547  func rewriteValue386_Op386MOVBLZX(v *Value) bool {
  3548  	v_0 := v.Args[0]
  3549  	b := v.Block
  3550  	// match: (MOVBLZX x:(MOVBload [off] {sym} ptr mem))
  3551  	// cond: x.Uses == 1 && clobber(x)
  3552  	// result: @x.Block (MOVBload <v.Type> [off] {sym} ptr mem)
  3553  	for {
  3554  		x := v_0
  3555  		if x.Op != Op386MOVBload {
  3556  			break
  3557  		}
  3558  		off := auxIntToInt32(x.AuxInt)
  3559  		sym := auxToSym(x.Aux)
  3560  		mem := x.Args[1]
  3561  		ptr := x.Args[0]
  3562  		if !(x.Uses == 1 && clobber(x)) {
  3563  			break
  3564  		}
  3565  		b = x.Block
  3566  		v0 := b.NewValue0(x.Pos, Op386MOVBload, v.Type)
  3567  		v.copyOf(v0)
  3568  		v0.AuxInt = int32ToAuxInt(off)
  3569  		v0.Aux = symToAux(sym)
  3570  		v0.AddArg2(ptr, mem)
  3571  		return true
  3572  	}
  3573  	// match: (MOVBLZX (ANDLconst [c] x))
  3574  	// result: (ANDLconst [c & 0xff] x)
  3575  	for {
  3576  		if v_0.Op != Op386ANDLconst {
  3577  			break
  3578  		}
  3579  		c := auxIntToInt32(v_0.AuxInt)
  3580  		x := v_0.Args[0]
  3581  		v.reset(Op386ANDLconst)
  3582  		v.AuxInt = int32ToAuxInt(c & 0xff)
  3583  		v.AddArg(x)
  3584  		return true
  3585  	}
  3586  	return false
  3587  }
  3588  func rewriteValue386_Op386MOVBload(v *Value) bool {
  3589  	v_1 := v.Args[1]
  3590  	v_0 := v.Args[0]
  3591  	b := v.Block
  3592  	config := b.Func.Config
  3593  	// match: (MOVBload [off] {sym} ptr (MOVBstore [off2] {sym2} ptr2 x _))
  3594  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  3595  	// result: (MOVBLZX x)
  3596  	for {
  3597  		off := auxIntToInt32(v.AuxInt)
  3598  		sym := auxToSym(v.Aux)
  3599  		ptr := v_0
  3600  		if v_1.Op != Op386MOVBstore {
  3601  			break
  3602  		}
  3603  		off2 := auxIntToInt32(v_1.AuxInt)
  3604  		sym2 := auxToSym(v_1.Aux)
  3605  		x := v_1.Args[1]
  3606  		ptr2 := v_1.Args[0]
  3607  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  3608  			break
  3609  		}
  3610  		v.reset(Op386MOVBLZX)
  3611  		v.AddArg(x)
  3612  		return true
  3613  	}
  3614  	// match: (MOVBload [off1] {sym} (ADDLconst [off2] ptr) mem)
  3615  	// cond: is32Bit(int64(off1)+int64(off2))
  3616  	// result: (MOVBload [off1+off2] {sym} ptr mem)
  3617  	for {
  3618  		off1 := auxIntToInt32(v.AuxInt)
  3619  		sym := auxToSym(v.Aux)
  3620  		if v_0.Op != Op386ADDLconst {
  3621  			break
  3622  		}
  3623  		off2 := auxIntToInt32(v_0.AuxInt)
  3624  		ptr := v_0.Args[0]
  3625  		mem := v_1
  3626  		if !(is32Bit(int64(off1) + int64(off2))) {
  3627  			break
  3628  		}
  3629  		v.reset(Op386MOVBload)
  3630  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3631  		v.Aux = symToAux(sym)
  3632  		v.AddArg2(ptr, mem)
  3633  		return true
  3634  	}
  3635  	// match: (MOVBload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  3636  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3637  	// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  3638  	for {
  3639  		off1 := auxIntToInt32(v.AuxInt)
  3640  		sym1 := auxToSym(v.Aux)
  3641  		if v_0.Op != Op386LEAL {
  3642  			break
  3643  		}
  3644  		off2 := auxIntToInt32(v_0.AuxInt)
  3645  		sym2 := auxToSym(v_0.Aux)
  3646  		base := v_0.Args[0]
  3647  		mem := v_1
  3648  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3649  			break
  3650  		}
  3651  		v.reset(Op386MOVBload)
  3652  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3653  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3654  		v.AddArg2(base, mem)
  3655  		return true
  3656  	}
  3657  	// match: (MOVBload [off] {sym} (SB) _)
  3658  	// cond: symIsRO(sym)
  3659  	// result: (MOVLconst [int32(read8(sym, int64(off)))])
  3660  	for {
  3661  		off := auxIntToInt32(v.AuxInt)
  3662  		sym := auxToSym(v.Aux)
  3663  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  3664  			break
  3665  		}
  3666  		v.reset(Op386MOVLconst)
  3667  		v.AuxInt = int32ToAuxInt(int32(read8(sym, int64(off))))
  3668  		return true
  3669  	}
  3670  	return false
  3671  }
  3672  func rewriteValue386_Op386MOVBstore(v *Value) bool {
  3673  	v_2 := v.Args[2]
  3674  	v_1 := v.Args[1]
  3675  	v_0 := v.Args[0]
  3676  	b := v.Block
  3677  	config := b.Func.Config
  3678  	// match: (MOVBstore [off] {sym} ptr (MOVBLSX x) mem)
  3679  	// result: (MOVBstore [off] {sym} ptr x mem)
  3680  	for {
  3681  		off := auxIntToInt32(v.AuxInt)
  3682  		sym := auxToSym(v.Aux)
  3683  		ptr := v_0
  3684  		if v_1.Op != Op386MOVBLSX {
  3685  			break
  3686  		}
  3687  		x := v_1.Args[0]
  3688  		mem := v_2
  3689  		v.reset(Op386MOVBstore)
  3690  		v.AuxInt = int32ToAuxInt(off)
  3691  		v.Aux = symToAux(sym)
  3692  		v.AddArg3(ptr, x, mem)
  3693  		return true
  3694  	}
  3695  	// match: (MOVBstore [off] {sym} ptr (MOVBLZX x) mem)
  3696  	// result: (MOVBstore [off] {sym} ptr x mem)
  3697  	for {
  3698  		off := auxIntToInt32(v.AuxInt)
  3699  		sym := auxToSym(v.Aux)
  3700  		ptr := v_0
  3701  		if v_1.Op != Op386MOVBLZX {
  3702  			break
  3703  		}
  3704  		x := v_1.Args[0]
  3705  		mem := v_2
  3706  		v.reset(Op386MOVBstore)
  3707  		v.AuxInt = int32ToAuxInt(off)
  3708  		v.Aux = symToAux(sym)
  3709  		v.AddArg3(ptr, x, mem)
  3710  		return true
  3711  	}
  3712  	// match: (MOVBstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  3713  	// cond: is32Bit(int64(off1)+int64(off2))
  3714  	// result: (MOVBstore [off1+off2] {sym} ptr val mem)
  3715  	for {
  3716  		off1 := auxIntToInt32(v.AuxInt)
  3717  		sym := auxToSym(v.Aux)
  3718  		if v_0.Op != Op386ADDLconst {
  3719  			break
  3720  		}
  3721  		off2 := auxIntToInt32(v_0.AuxInt)
  3722  		ptr := v_0.Args[0]
  3723  		val := v_1
  3724  		mem := v_2
  3725  		if !(is32Bit(int64(off1) + int64(off2))) {
  3726  			break
  3727  		}
  3728  		v.reset(Op386MOVBstore)
  3729  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3730  		v.Aux = symToAux(sym)
  3731  		v.AddArg3(ptr, val, mem)
  3732  		return true
  3733  	}
  3734  	// match: (MOVBstore [off] {sym} ptr (MOVLconst [c]) mem)
  3735  	// cond: validOff(int64(off))
  3736  	// result: (MOVBstoreconst [makeValAndOff32(c,off)] {sym} ptr mem)
  3737  	for {
  3738  		off := auxIntToInt32(v.AuxInt)
  3739  		sym := auxToSym(v.Aux)
  3740  		ptr := v_0
  3741  		if v_1.Op != Op386MOVLconst {
  3742  			break
  3743  		}
  3744  		c := auxIntToInt32(v_1.AuxInt)
  3745  		mem := v_2
  3746  		if !(validOff(int64(off))) {
  3747  			break
  3748  		}
  3749  		v.reset(Op386MOVBstoreconst)
  3750  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  3751  		v.Aux = symToAux(sym)
  3752  		v.AddArg2(ptr, mem)
  3753  		return true
  3754  	}
  3755  	// match: (MOVBstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  3756  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  3757  	// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  3758  	for {
  3759  		off1 := auxIntToInt32(v.AuxInt)
  3760  		sym1 := auxToSym(v.Aux)
  3761  		if v_0.Op != Op386LEAL {
  3762  			break
  3763  		}
  3764  		off2 := auxIntToInt32(v_0.AuxInt)
  3765  		sym2 := auxToSym(v_0.Aux)
  3766  		base := v_0.Args[0]
  3767  		val := v_1
  3768  		mem := v_2
  3769  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  3770  			break
  3771  		}
  3772  		v.reset(Op386MOVBstore)
  3773  		v.AuxInt = int32ToAuxInt(off1 + off2)
  3774  		v.Aux = symToAux(mergeSym(sym1, sym2))
  3775  		v.AddArg3(base, val, mem)
  3776  		return true
  3777  	}
  3778  	// match: (MOVBstore [i] {s} p (SHRWconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  3779  	// cond: x.Uses == 1 && clobber(x)
  3780  	// result: (MOVWstore [i-1] {s} p w mem)
  3781  	for {
  3782  		i := auxIntToInt32(v.AuxInt)
  3783  		s := auxToSym(v.Aux)
  3784  		p := v_0
  3785  		if v_1.Op != Op386SHRWconst || auxIntToInt16(v_1.AuxInt) != 8 {
  3786  			break
  3787  		}
  3788  		w := v_1.Args[0]
  3789  		x := v_2
  3790  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  3791  			break
  3792  		}
  3793  		mem := x.Args[2]
  3794  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  3795  			break
  3796  		}
  3797  		v.reset(Op386MOVWstore)
  3798  		v.AuxInt = int32ToAuxInt(i - 1)
  3799  		v.Aux = symToAux(s)
  3800  		v.AddArg3(p, w, mem)
  3801  		return true
  3802  	}
  3803  	// match: (MOVBstore [i] {s} p (SHRLconst [8] w) x:(MOVBstore [i-1] {s} p w mem))
  3804  	// cond: x.Uses == 1 && clobber(x)
  3805  	// result: (MOVWstore [i-1] {s} p w mem)
  3806  	for {
  3807  		i := auxIntToInt32(v.AuxInt)
  3808  		s := auxToSym(v.Aux)
  3809  		p := v_0
  3810  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 8 {
  3811  			break
  3812  		}
  3813  		w := v_1.Args[0]
  3814  		x := v_2
  3815  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  3816  			break
  3817  		}
  3818  		mem := x.Args[2]
  3819  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  3820  			break
  3821  		}
  3822  		v.reset(Op386MOVWstore)
  3823  		v.AuxInt = int32ToAuxInt(i - 1)
  3824  		v.Aux = symToAux(s)
  3825  		v.AddArg3(p, w, mem)
  3826  		return true
  3827  	}
  3828  	// match: (MOVBstore [i] {s} p w x:(MOVBstore {s} [i+1] p (SHRWconst [8] w) mem))
  3829  	// cond: x.Uses == 1 && clobber(x)
  3830  	// result: (MOVWstore [i] {s} p w mem)
  3831  	for {
  3832  		i := auxIntToInt32(v.AuxInt)
  3833  		s := auxToSym(v.Aux)
  3834  		p := v_0
  3835  		w := v_1
  3836  		x := v_2
  3837  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i+1 || auxToSym(x.Aux) != s {
  3838  			break
  3839  		}
  3840  		mem := x.Args[2]
  3841  		if p != x.Args[0] {
  3842  			break
  3843  		}
  3844  		x_1 := x.Args[1]
  3845  		if x_1.Op != Op386SHRWconst || auxIntToInt16(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && clobber(x)) {
  3846  			break
  3847  		}
  3848  		v.reset(Op386MOVWstore)
  3849  		v.AuxInt = int32ToAuxInt(i)
  3850  		v.Aux = symToAux(s)
  3851  		v.AddArg3(p, w, mem)
  3852  		return true
  3853  	}
  3854  	// match: (MOVBstore [i] {s} p w x:(MOVBstore {s} [i+1] p (SHRLconst [8] w) mem))
  3855  	// cond: x.Uses == 1 && clobber(x)
  3856  	// result: (MOVWstore [i] {s} p w mem)
  3857  	for {
  3858  		i := auxIntToInt32(v.AuxInt)
  3859  		s := auxToSym(v.Aux)
  3860  		p := v_0
  3861  		w := v_1
  3862  		x := v_2
  3863  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i+1 || auxToSym(x.Aux) != s {
  3864  			break
  3865  		}
  3866  		mem := x.Args[2]
  3867  		if p != x.Args[0] {
  3868  			break
  3869  		}
  3870  		x_1 := x.Args[1]
  3871  		if x_1.Op != Op386SHRLconst || auxIntToInt32(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && clobber(x)) {
  3872  			break
  3873  		}
  3874  		v.reset(Op386MOVWstore)
  3875  		v.AuxInt = int32ToAuxInt(i)
  3876  		v.Aux = symToAux(s)
  3877  		v.AddArg3(p, w, mem)
  3878  		return true
  3879  	}
  3880  	// match: (MOVBstore [i] {s} p (SHRLconst [j] w) x:(MOVBstore [i-1] {s} p w0:(SHRLconst [j-8] w) mem))
  3881  	// cond: x.Uses == 1 && clobber(x)
  3882  	// result: (MOVWstore [i-1] {s} p w0 mem)
  3883  	for {
  3884  		i := auxIntToInt32(v.AuxInt)
  3885  		s := auxToSym(v.Aux)
  3886  		p := v_0
  3887  		if v_1.Op != Op386SHRLconst {
  3888  			break
  3889  		}
  3890  		j := auxIntToInt32(v_1.AuxInt)
  3891  		w := v_1.Args[0]
  3892  		x := v_2
  3893  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i-1 || auxToSym(x.Aux) != s {
  3894  			break
  3895  		}
  3896  		mem := x.Args[2]
  3897  		if p != x.Args[0] {
  3898  			break
  3899  		}
  3900  		w0 := x.Args[1]
  3901  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-8 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  3902  			break
  3903  		}
  3904  		v.reset(Op386MOVWstore)
  3905  		v.AuxInt = int32ToAuxInt(i - 1)
  3906  		v.Aux = symToAux(s)
  3907  		v.AddArg3(p, w0, mem)
  3908  		return true
  3909  	}
  3910  	// match: (MOVBstore [i] {s} p1 (SHRWconst [8] w) x:(MOVBstore [i] {s} p0 w mem))
  3911  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3912  	// result: (MOVWstore [i] {s} p0 w mem)
  3913  	for {
  3914  		i := auxIntToInt32(v.AuxInt)
  3915  		s := auxToSym(v.Aux)
  3916  		p1 := v_0
  3917  		if v_1.Op != Op386SHRWconst || auxIntToInt16(v_1.AuxInt) != 8 {
  3918  			break
  3919  		}
  3920  		w := v_1.Args[0]
  3921  		x := v_2
  3922  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3923  			break
  3924  		}
  3925  		mem := x.Args[2]
  3926  		p0 := x.Args[0]
  3927  		if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3928  			break
  3929  		}
  3930  		v.reset(Op386MOVWstore)
  3931  		v.AuxInt = int32ToAuxInt(i)
  3932  		v.Aux = symToAux(s)
  3933  		v.AddArg3(p0, w, mem)
  3934  		return true
  3935  	}
  3936  	// match: (MOVBstore [i] {s} p1 (SHRLconst [8] w) x:(MOVBstore [i] {s} p0 w mem))
  3937  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3938  	// result: (MOVWstore [i] {s} p0 w mem)
  3939  	for {
  3940  		i := auxIntToInt32(v.AuxInt)
  3941  		s := auxToSym(v.Aux)
  3942  		p1 := v_0
  3943  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 8 {
  3944  			break
  3945  		}
  3946  		w := v_1.Args[0]
  3947  		x := v_2
  3948  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3949  			break
  3950  		}
  3951  		mem := x.Args[2]
  3952  		p0 := x.Args[0]
  3953  		if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3954  			break
  3955  		}
  3956  		v.reset(Op386MOVWstore)
  3957  		v.AuxInt = int32ToAuxInt(i)
  3958  		v.Aux = symToAux(s)
  3959  		v.AddArg3(p0, w, mem)
  3960  		return true
  3961  	}
  3962  	// match: (MOVBstore [i] {s} p0 w x:(MOVBstore {s} [i] p1 (SHRWconst [8] w) mem))
  3963  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3964  	// result: (MOVWstore [i] {s} p0 w mem)
  3965  	for {
  3966  		i := auxIntToInt32(v.AuxInt)
  3967  		s := auxToSym(v.Aux)
  3968  		p0 := v_0
  3969  		w := v_1
  3970  		x := v_2
  3971  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3972  			break
  3973  		}
  3974  		mem := x.Args[2]
  3975  		p1 := x.Args[0]
  3976  		x_1 := x.Args[1]
  3977  		if x_1.Op != Op386SHRWconst || auxIntToInt16(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  3978  			break
  3979  		}
  3980  		v.reset(Op386MOVWstore)
  3981  		v.AuxInt = int32ToAuxInt(i)
  3982  		v.Aux = symToAux(s)
  3983  		v.AddArg3(p0, w, mem)
  3984  		return true
  3985  	}
  3986  	// match: (MOVBstore [i] {s} p0 w x:(MOVBstore {s} [i] p1 (SHRLconst [8] w) mem))
  3987  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  3988  	// result: (MOVWstore [i] {s} p0 w mem)
  3989  	for {
  3990  		i := auxIntToInt32(v.AuxInt)
  3991  		s := auxToSym(v.Aux)
  3992  		p0 := v_0
  3993  		w := v_1
  3994  		x := v_2
  3995  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  3996  			break
  3997  		}
  3998  		mem := x.Args[2]
  3999  		p1 := x.Args[0]
  4000  		x_1 := x.Args[1]
  4001  		if x_1.Op != Op386SHRLconst || auxIntToInt32(x_1.AuxInt) != 8 || w != x_1.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4002  			break
  4003  		}
  4004  		v.reset(Op386MOVWstore)
  4005  		v.AuxInt = int32ToAuxInt(i)
  4006  		v.Aux = symToAux(s)
  4007  		v.AddArg3(p0, w, mem)
  4008  		return true
  4009  	}
  4010  	// match: (MOVBstore [i] {s} p1 (SHRLconst [j] w) x:(MOVBstore [i] {s} p0 w0:(SHRLconst [j-8] w) mem))
  4011  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)
  4012  	// result: (MOVWstore [i] {s} p0 w0 mem)
  4013  	for {
  4014  		i := auxIntToInt32(v.AuxInt)
  4015  		s := auxToSym(v.Aux)
  4016  		p1 := v_0
  4017  		if v_1.Op != Op386SHRLconst {
  4018  			break
  4019  		}
  4020  		j := auxIntToInt32(v_1.AuxInt)
  4021  		w := v_1.Args[0]
  4022  		x := v_2
  4023  		if x.Op != Op386MOVBstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  4024  			break
  4025  		}
  4026  		mem := x.Args[2]
  4027  		p0 := x.Args[0]
  4028  		w0 := x.Args[1]
  4029  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-8 || w != w0.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4030  			break
  4031  		}
  4032  		v.reset(Op386MOVWstore)
  4033  		v.AuxInt = int32ToAuxInt(i)
  4034  		v.Aux = symToAux(s)
  4035  		v.AddArg3(p0, w0, mem)
  4036  		return true
  4037  	}
  4038  	return false
  4039  }
  4040  func rewriteValue386_Op386MOVBstoreconst(v *Value) bool {
  4041  	v_1 := v.Args[1]
  4042  	v_0 := v.Args[0]
  4043  	b := v.Block
  4044  	config := b.Func.Config
  4045  	// match: (MOVBstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  4046  	// cond: sc.canAdd32(off)
  4047  	// result: (MOVBstoreconst [sc.addOffset32(off)] {s} ptr mem)
  4048  	for {
  4049  		sc := auxIntToValAndOff(v.AuxInt)
  4050  		s := auxToSym(v.Aux)
  4051  		if v_0.Op != Op386ADDLconst {
  4052  			break
  4053  		}
  4054  		off := auxIntToInt32(v_0.AuxInt)
  4055  		ptr := v_0.Args[0]
  4056  		mem := v_1
  4057  		if !(sc.canAdd32(off)) {
  4058  			break
  4059  		}
  4060  		v.reset(Op386MOVBstoreconst)
  4061  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4062  		v.Aux = symToAux(s)
  4063  		v.AddArg2(ptr, mem)
  4064  		return true
  4065  	}
  4066  	// match: (MOVBstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  4067  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  4068  	// result: (MOVBstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  4069  	for {
  4070  		sc := auxIntToValAndOff(v.AuxInt)
  4071  		sym1 := auxToSym(v.Aux)
  4072  		if v_0.Op != Op386LEAL {
  4073  			break
  4074  		}
  4075  		off := auxIntToInt32(v_0.AuxInt)
  4076  		sym2 := auxToSym(v_0.Aux)
  4077  		ptr := v_0.Args[0]
  4078  		mem := v_1
  4079  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  4080  			break
  4081  		}
  4082  		v.reset(Op386MOVBstoreconst)
  4083  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4084  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4085  		v.AddArg2(ptr, mem)
  4086  		return true
  4087  	}
  4088  	// match: (MOVBstoreconst [c] {s} p x:(MOVBstoreconst [a] {s} p mem))
  4089  	// cond: x.Uses == 1 && a.Off() + 1 == c.Off() && clobber(x)
  4090  	// result: (MOVWstoreconst [makeValAndOff32(int32(a.Val()&0xff | c.Val()<<8), a.Off32())] {s} p mem)
  4091  	for {
  4092  		c := auxIntToValAndOff(v.AuxInt)
  4093  		s := auxToSym(v.Aux)
  4094  		p := v_0
  4095  		x := v_1
  4096  		if x.Op != Op386MOVBstoreconst {
  4097  			break
  4098  		}
  4099  		a := auxIntToValAndOff(x.AuxInt)
  4100  		if auxToSym(x.Aux) != s {
  4101  			break
  4102  		}
  4103  		mem := x.Args[1]
  4104  		if p != x.Args[0] || !(x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
  4105  			break
  4106  		}
  4107  		v.reset(Op386MOVWstoreconst)
  4108  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xff|c.Val()<<8), a.Off32()))
  4109  		v.Aux = symToAux(s)
  4110  		v.AddArg2(p, mem)
  4111  		return true
  4112  	}
  4113  	// match: (MOVBstoreconst [a] {s} p x:(MOVBstoreconst [c] {s} p mem))
  4114  	// cond: x.Uses == 1 && a.Off() + 1 == c.Off() && clobber(x)
  4115  	// result: (MOVWstoreconst [makeValAndOff32(int32(a.Val()&0xff | c.Val()<<8), a.Off32())] {s} p mem)
  4116  	for {
  4117  		a := auxIntToValAndOff(v.AuxInt)
  4118  		s := auxToSym(v.Aux)
  4119  		p := v_0
  4120  		x := v_1
  4121  		if x.Op != Op386MOVBstoreconst {
  4122  			break
  4123  		}
  4124  		c := auxIntToValAndOff(x.AuxInt)
  4125  		if auxToSym(x.Aux) != s {
  4126  			break
  4127  		}
  4128  		mem := x.Args[1]
  4129  		if p != x.Args[0] || !(x.Uses == 1 && a.Off()+1 == c.Off() && clobber(x)) {
  4130  			break
  4131  		}
  4132  		v.reset(Op386MOVWstoreconst)
  4133  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xff|c.Val()<<8), a.Off32()))
  4134  		v.Aux = symToAux(s)
  4135  		v.AddArg2(p, mem)
  4136  		return true
  4137  	}
  4138  	// match: (MOVBstoreconst [c] {s} p1 x:(MOVBstoreconst [a] {s} p0 mem))
  4139  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)
  4140  	// result: (MOVWstoreconst [makeValAndOff32(int32(a.Val()&0xff | c.Val()<<8), a.Off32())] {s} p0 mem)
  4141  	for {
  4142  		c := auxIntToValAndOff(v.AuxInt)
  4143  		s := auxToSym(v.Aux)
  4144  		p1 := v_0
  4145  		x := v_1
  4146  		if x.Op != Op386MOVBstoreconst {
  4147  			break
  4148  		}
  4149  		a := auxIntToValAndOff(x.AuxInt)
  4150  		if auxToSym(x.Aux) != s {
  4151  			break
  4152  		}
  4153  		mem := x.Args[1]
  4154  		p0 := x.Args[0]
  4155  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4156  			break
  4157  		}
  4158  		v.reset(Op386MOVWstoreconst)
  4159  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xff|c.Val()<<8), a.Off32()))
  4160  		v.Aux = symToAux(s)
  4161  		v.AddArg2(p0, mem)
  4162  		return true
  4163  	}
  4164  	// match: (MOVBstoreconst [a] {s} p0 x:(MOVBstoreconst [c] {s} p1 mem))
  4165  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)
  4166  	// result: (MOVWstoreconst [makeValAndOff32(int32(a.Val()&0xff | c.Val()<<8), a.Off32())] {s} p0 mem)
  4167  	for {
  4168  		a := auxIntToValAndOff(v.AuxInt)
  4169  		s := auxToSym(v.Aux)
  4170  		p0 := v_0
  4171  		x := v_1
  4172  		if x.Op != Op386MOVBstoreconst {
  4173  			break
  4174  		}
  4175  		c := auxIntToValAndOff(x.AuxInt)
  4176  		if auxToSym(x.Aux) != s {
  4177  			break
  4178  		}
  4179  		mem := x.Args[1]
  4180  		p1 := x.Args[0]
  4181  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 1) && clobber(x)) {
  4182  			break
  4183  		}
  4184  		v.reset(Op386MOVWstoreconst)
  4185  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xff|c.Val()<<8), a.Off32()))
  4186  		v.Aux = symToAux(s)
  4187  		v.AddArg2(p0, mem)
  4188  		return true
  4189  	}
  4190  	return false
  4191  }
  4192  func rewriteValue386_Op386MOVLload(v *Value) bool {
  4193  	v_1 := v.Args[1]
  4194  	v_0 := v.Args[0]
  4195  	b := v.Block
  4196  	config := b.Func.Config
  4197  	// match: (MOVLload [off] {sym} ptr (MOVLstore [off2] {sym2} ptr2 x _))
  4198  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  4199  	// result: x
  4200  	for {
  4201  		off := auxIntToInt32(v.AuxInt)
  4202  		sym := auxToSym(v.Aux)
  4203  		ptr := v_0
  4204  		if v_1.Op != Op386MOVLstore {
  4205  			break
  4206  		}
  4207  		off2 := auxIntToInt32(v_1.AuxInt)
  4208  		sym2 := auxToSym(v_1.Aux)
  4209  		x := v_1.Args[1]
  4210  		ptr2 := v_1.Args[0]
  4211  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  4212  			break
  4213  		}
  4214  		v.copyOf(x)
  4215  		return true
  4216  	}
  4217  	// match: (MOVLload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4218  	// cond: is32Bit(int64(off1)+int64(off2))
  4219  	// result: (MOVLload [off1+off2] {sym} ptr mem)
  4220  	for {
  4221  		off1 := auxIntToInt32(v.AuxInt)
  4222  		sym := auxToSym(v.Aux)
  4223  		if v_0.Op != Op386ADDLconst {
  4224  			break
  4225  		}
  4226  		off2 := auxIntToInt32(v_0.AuxInt)
  4227  		ptr := v_0.Args[0]
  4228  		mem := v_1
  4229  		if !(is32Bit(int64(off1) + int64(off2))) {
  4230  			break
  4231  		}
  4232  		v.reset(Op386MOVLload)
  4233  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4234  		v.Aux = symToAux(sym)
  4235  		v.AddArg2(ptr, mem)
  4236  		return true
  4237  	}
  4238  	// match: (MOVLload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4239  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4240  	// result: (MOVLload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4241  	for {
  4242  		off1 := auxIntToInt32(v.AuxInt)
  4243  		sym1 := auxToSym(v.Aux)
  4244  		if v_0.Op != Op386LEAL {
  4245  			break
  4246  		}
  4247  		off2 := auxIntToInt32(v_0.AuxInt)
  4248  		sym2 := auxToSym(v_0.Aux)
  4249  		base := v_0.Args[0]
  4250  		mem := v_1
  4251  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4252  			break
  4253  		}
  4254  		v.reset(Op386MOVLload)
  4255  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4256  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4257  		v.AddArg2(base, mem)
  4258  		return true
  4259  	}
  4260  	// match: (MOVLload [off] {sym} (SB) _)
  4261  	// cond: symIsRO(sym)
  4262  	// result: (MOVLconst [int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  4263  	for {
  4264  		off := auxIntToInt32(v.AuxInt)
  4265  		sym := auxToSym(v.Aux)
  4266  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  4267  			break
  4268  		}
  4269  		v.reset(Op386MOVLconst)
  4270  		v.AuxInt = int32ToAuxInt(int32(read32(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  4271  		return true
  4272  	}
  4273  	return false
  4274  }
  4275  func rewriteValue386_Op386MOVLstore(v *Value) bool {
  4276  	v_2 := v.Args[2]
  4277  	v_1 := v.Args[1]
  4278  	v_0 := v.Args[0]
  4279  	b := v.Block
  4280  	config := b.Func.Config
  4281  	// match: (MOVLstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4282  	// cond: is32Bit(int64(off1)+int64(off2))
  4283  	// result: (MOVLstore [off1+off2] {sym} ptr val mem)
  4284  	for {
  4285  		off1 := auxIntToInt32(v.AuxInt)
  4286  		sym := auxToSym(v.Aux)
  4287  		if v_0.Op != Op386ADDLconst {
  4288  			break
  4289  		}
  4290  		off2 := auxIntToInt32(v_0.AuxInt)
  4291  		ptr := v_0.Args[0]
  4292  		val := v_1
  4293  		mem := v_2
  4294  		if !(is32Bit(int64(off1) + int64(off2))) {
  4295  			break
  4296  		}
  4297  		v.reset(Op386MOVLstore)
  4298  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4299  		v.Aux = symToAux(sym)
  4300  		v.AddArg3(ptr, val, mem)
  4301  		return true
  4302  	}
  4303  	// match: (MOVLstore [off] {sym} ptr (MOVLconst [c]) mem)
  4304  	// cond: validOff(int64(off))
  4305  	// result: (MOVLstoreconst [makeValAndOff32(c,off)] {sym} ptr mem)
  4306  	for {
  4307  		off := auxIntToInt32(v.AuxInt)
  4308  		sym := auxToSym(v.Aux)
  4309  		ptr := v_0
  4310  		if v_1.Op != Op386MOVLconst {
  4311  			break
  4312  		}
  4313  		c := auxIntToInt32(v_1.AuxInt)
  4314  		mem := v_2
  4315  		if !(validOff(int64(off))) {
  4316  			break
  4317  		}
  4318  		v.reset(Op386MOVLstoreconst)
  4319  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  4320  		v.Aux = symToAux(sym)
  4321  		v.AddArg2(ptr, mem)
  4322  		return true
  4323  	}
  4324  	// match: (MOVLstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4325  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4326  	// result: (MOVLstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4327  	for {
  4328  		off1 := auxIntToInt32(v.AuxInt)
  4329  		sym1 := auxToSym(v.Aux)
  4330  		if v_0.Op != Op386LEAL {
  4331  			break
  4332  		}
  4333  		off2 := auxIntToInt32(v_0.AuxInt)
  4334  		sym2 := auxToSym(v_0.Aux)
  4335  		base := v_0.Args[0]
  4336  		val := v_1
  4337  		mem := v_2
  4338  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4339  			break
  4340  		}
  4341  		v.reset(Op386MOVLstore)
  4342  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4343  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4344  		v.AddArg3(base, val, mem)
  4345  		return true
  4346  	}
  4347  	// match: (MOVLstore {sym} [off] ptr y:(ADDLload x [off] {sym} ptr mem) mem)
  4348  	// cond: y.Uses==1 && clobber(y)
  4349  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4350  	for {
  4351  		off := auxIntToInt32(v.AuxInt)
  4352  		sym := auxToSym(v.Aux)
  4353  		ptr := v_0
  4354  		y := v_1
  4355  		if y.Op != Op386ADDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4356  			break
  4357  		}
  4358  		mem := y.Args[2]
  4359  		x := y.Args[0]
  4360  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4361  			break
  4362  		}
  4363  		v.reset(Op386ADDLmodify)
  4364  		v.AuxInt = int32ToAuxInt(off)
  4365  		v.Aux = symToAux(sym)
  4366  		v.AddArg3(ptr, x, mem)
  4367  		return true
  4368  	}
  4369  	// match: (MOVLstore {sym} [off] ptr y:(ANDLload x [off] {sym} ptr mem) mem)
  4370  	// cond: y.Uses==1 && clobber(y)
  4371  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4372  	for {
  4373  		off := auxIntToInt32(v.AuxInt)
  4374  		sym := auxToSym(v.Aux)
  4375  		ptr := v_0
  4376  		y := v_1
  4377  		if y.Op != Op386ANDLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4378  			break
  4379  		}
  4380  		mem := y.Args[2]
  4381  		x := y.Args[0]
  4382  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4383  			break
  4384  		}
  4385  		v.reset(Op386ANDLmodify)
  4386  		v.AuxInt = int32ToAuxInt(off)
  4387  		v.Aux = symToAux(sym)
  4388  		v.AddArg3(ptr, x, mem)
  4389  		return true
  4390  	}
  4391  	// match: (MOVLstore {sym} [off] ptr y:(ORLload x [off] {sym} ptr mem) mem)
  4392  	// cond: y.Uses==1 && clobber(y)
  4393  	// result: (ORLmodify [off] {sym} ptr x mem)
  4394  	for {
  4395  		off := auxIntToInt32(v.AuxInt)
  4396  		sym := auxToSym(v.Aux)
  4397  		ptr := v_0
  4398  		y := v_1
  4399  		if y.Op != Op386ORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4400  			break
  4401  		}
  4402  		mem := y.Args[2]
  4403  		x := y.Args[0]
  4404  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4405  			break
  4406  		}
  4407  		v.reset(Op386ORLmodify)
  4408  		v.AuxInt = int32ToAuxInt(off)
  4409  		v.Aux = symToAux(sym)
  4410  		v.AddArg3(ptr, x, mem)
  4411  		return true
  4412  	}
  4413  	// match: (MOVLstore {sym} [off] ptr y:(XORLload x [off] {sym} ptr mem) mem)
  4414  	// cond: y.Uses==1 && clobber(y)
  4415  	// result: (XORLmodify [off] {sym} ptr x mem)
  4416  	for {
  4417  		off := auxIntToInt32(v.AuxInt)
  4418  		sym := auxToSym(v.Aux)
  4419  		ptr := v_0
  4420  		y := v_1
  4421  		if y.Op != Op386XORLload || auxIntToInt32(y.AuxInt) != off || auxToSym(y.Aux) != sym {
  4422  			break
  4423  		}
  4424  		mem := y.Args[2]
  4425  		x := y.Args[0]
  4426  		if ptr != y.Args[1] || mem != v_2 || !(y.Uses == 1 && clobber(y)) {
  4427  			break
  4428  		}
  4429  		v.reset(Op386XORLmodify)
  4430  		v.AuxInt = int32ToAuxInt(off)
  4431  		v.Aux = symToAux(sym)
  4432  		v.AddArg3(ptr, x, mem)
  4433  		return true
  4434  	}
  4435  	// match: (MOVLstore {sym} [off] ptr y:(ADDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4436  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4437  	// result: (ADDLmodify [off] {sym} ptr x mem)
  4438  	for {
  4439  		off := auxIntToInt32(v.AuxInt)
  4440  		sym := auxToSym(v.Aux)
  4441  		ptr := v_0
  4442  		y := v_1
  4443  		if y.Op != Op386ADDL {
  4444  			break
  4445  		}
  4446  		_ = y.Args[1]
  4447  		y_0 := y.Args[0]
  4448  		y_1 := y.Args[1]
  4449  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4450  			l := y_0
  4451  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4452  				continue
  4453  			}
  4454  			mem := l.Args[1]
  4455  			if ptr != l.Args[0] {
  4456  				continue
  4457  			}
  4458  			x := y_1
  4459  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4460  				continue
  4461  			}
  4462  			v.reset(Op386ADDLmodify)
  4463  			v.AuxInt = int32ToAuxInt(off)
  4464  			v.Aux = symToAux(sym)
  4465  			v.AddArg3(ptr, x, mem)
  4466  			return true
  4467  		}
  4468  		break
  4469  	}
  4470  	// match: (MOVLstore {sym} [off] ptr y:(SUBL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4471  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4472  	// result: (SUBLmodify [off] {sym} ptr x mem)
  4473  	for {
  4474  		off := auxIntToInt32(v.AuxInt)
  4475  		sym := auxToSym(v.Aux)
  4476  		ptr := v_0
  4477  		y := v_1
  4478  		if y.Op != Op386SUBL {
  4479  			break
  4480  		}
  4481  		x := y.Args[1]
  4482  		l := y.Args[0]
  4483  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4484  			break
  4485  		}
  4486  		mem := l.Args[1]
  4487  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4488  			break
  4489  		}
  4490  		v.reset(Op386SUBLmodify)
  4491  		v.AuxInt = int32ToAuxInt(off)
  4492  		v.Aux = symToAux(sym)
  4493  		v.AddArg3(ptr, x, mem)
  4494  		return true
  4495  	}
  4496  	// match: (MOVLstore {sym} [off] ptr y:(ANDL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4497  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4498  	// result: (ANDLmodify [off] {sym} ptr x mem)
  4499  	for {
  4500  		off := auxIntToInt32(v.AuxInt)
  4501  		sym := auxToSym(v.Aux)
  4502  		ptr := v_0
  4503  		y := v_1
  4504  		if y.Op != Op386ANDL {
  4505  			break
  4506  		}
  4507  		_ = y.Args[1]
  4508  		y_0 := y.Args[0]
  4509  		y_1 := y.Args[1]
  4510  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4511  			l := y_0
  4512  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4513  				continue
  4514  			}
  4515  			mem := l.Args[1]
  4516  			if ptr != l.Args[0] {
  4517  				continue
  4518  			}
  4519  			x := y_1
  4520  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4521  				continue
  4522  			}
  4523  			v.reset(Op386ANDLmodify)
  4524  			v.AuxInt = int32ToAuxInt(off)
  4525  			v.Aux = symToAux(sym)
  4526  			v.AddArg3(ptr, x, mem)
  4527  			return true
  4528  		}
  4529  		break
  4530  	}
  4531  	// match: (MOVLstore {sym} [off] ptr y:(ORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4532  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4533  	// result: (ORLmodify [off] {sym} ptr x mem)
  4534  	for {
  4535  		off := auxIntToInt32(v.AuxInt)
  4536  		sym := auxToSym(v.Aux)
  4537  		ptr := v_0
  4538  		y := v_1
  4539  		if y.Op != Op386ORL {
  4540  			break
  4541  		}
  4542  		_ = y.Args[1]
  4543  		y_0 := y.Args[0]
  4544  		y_1 := y.Args[1]
  4545  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4546  			l := y_0
  4547  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4548  				continue
  4549  			}
  4550  			mem := l.Args[1]
  4551  			if ptr != l.Args[0] {
  4552  				continue
  4553  			}
  4554  			x := y_1
  4555  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4556  				continue
  4557  			}
  4558  			v.reset(Op386ORLmodify)
  4559  			v.AuxInt = int32ToAuxInt(off)
  4560  			v.Aux = symToAux(sym)
  4561  			v.AddArg3(ptr, x, mem)
  4562  			return true
  4563  		}
  4564  		break
  4565  	}
  4566  	// match: (MOVLstore {sym} [off] ptr y:(XORL l:(MOVLload [off] {sym} ptr mem) x) mem)
  4567  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l)
  4568  	// result: (XORLmodify [off] {sym} ptr x mem)
  4569  	for {
  4570  		off := auxIntToInt32(v.AuxInt)
  4571  		sym := auxToSym(v.Aux)
  4572  		ptr := v_0
  4573  		y := v_1
  4574  		if y.Op != Op386XORL {
  4575  			break
  4576  		}
  4577  		_ = y.Args[1]
  4578  		y_0 := y.Args[0]
  4579  		y_1 := y.Args[1]
  4580  		for _i0 := 0; _i0 <= 1; _i0, y_0, y_1 = _i0+1, y_1, y_0 {
  4581  			l := y_0
  4582  			if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4583  				continue
  4584  			}
  4585  			mem := l.Args[1]
  4586  			if ptr != l.Args[0] {
  4587  				continue
  4588  			}
  4589  			x := y_1
  4590  			if mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l)) {
  4591  				continue
  4592  			}
  4593  			v.reset(Op386XORLmodify)
  4594  			v.AuxInt = int32ToAuxInt(off)
  4595  			v.Aux = symToAux(sym)
  4596  			v.AddArg3(ptr, x, mem)
  4597  			return true
  4598  		}
  4599  		break
  4600  	}
  4601  	// match: (MOVLstore {sym} [off] ptr y:(ADDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4602  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l) && validValAndOff(int64(c),int64(off))
  4603  	// result: (ADDLconstmodify [makeValAndOff32(c,off)] {sym} ptr mem)
  4604  	for {
  4605  		off := auxIntToInt32(v.AuxInt)
  4606  		sym := auxToSym(v.Aux)
  4607  		ptr := v_0
  4608  		y := v_1
  4609  		if y.Op != Op386ADDLconst {
  4610  			break
  4611  		}
  4612  		c := auxIntToInt32(y.AuxInt)
  4613  		l := y.Args[0]
  4614  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4615  			break
  4616  		}
  4617  		mem := l.Args[1]
  4618  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l) && validValAndOff(int64(c), int64(off))) {
  4619  			break
  4620  		}
  4621  		v.reset(Op386ADDLconstmodify)
  4622  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  4623  		v.Aux = symToAux(sym)
  4624  		v.AddArg2(ptr, mem)
  4625  		return true
  4626  	}
  4627  	// match: (MOVLstore {sym} [off] ptr y:(ANDLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4628  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l) && validValAndOff(int64(c),int64(off))
  4629  	// result: (ANDLconstmodify [makeValAndOff32(c,off)] {sym} ptr mem)
  4630  	for {
  4631  		off := auxIntToInt32(v.AuxInt)
  4632  		sym := auxToSym(v.Aux)
  4633  		ptr := v_0
  4634  		y := v_1
  4635  		if y.Op != Op386ANDLconst {
  4636  			break
  4637  		}
  4638  		c := auxIntToInt32(y.AuxInt)
  4639  		l := y.Args[0]
  4640  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4641  			break
  4642  		}
  4643  		mem := l.Args[1]
  4644  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l) && validValAndOff(int64(c), int64(off))) {
  4645  			break
  4646  		}
  4647  		v.reset(Op386ANDLconstmodify)
  4648  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  4649  		v.Aux = symToAux(sym)
  4650  		v.AddArg2(ptr, mem)
  4651  		return true
  4652  	}
  4653  	// match: (MOVLstore {sym} [off] ptr y:(ORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4654  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l) && validValAndOff(int64(c),int64(off))
  4655  	// result: (ORLconstmodify [makeValAndOff32(c,off)] {sym} ptr mem)
  4656  	for {
  4657  		off := auxIntToInt32(v.AuxInt)
  4658  		sym := auxToSym(v.Aux)
  4659  		ptr := v_0
  4660  		y := v_1
  4661  		if y.Op != Op386ORLconst {
  4662  			break
  4663  		}
  4664  		c := auxIntToInt32(y.AuxInt)
  4665  		l := y.Args[0]
  4666  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4667  			break
  4668  		}
  4669  		mem := l.Args[1]
  4670  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l) && validValAndOff(int64(c), int64(off))) {
  4671  			break
  4672  		}
  4673  		v.reset(Op386ORLconstmodify)
  4674  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  4675  		v.Aux = symToAux(sym)
  4676  		v.AddArg2(ptr, mem)
  4677  		return true
  4678  	}
  4679  	// match: (MOVLstore {sym} [off] ptr y:(XORLconst [c] l:(MOVLload [off] {sym} ptr mem)) mem)
  4680  	// cond: y.Uses==1 && l.Uses==1 && clobber(y, l) && validValAndOff(int64(c),int64(off))
  4681  	// result: (XORLconstmodify [makeValAndOff32(c,off)] {sym} ptr mem)
  4682  	for {
  4683  		off := auxIntToInt32(v.AuxInt)
  4684  		sym := auxToSym(v.Aux)
  4685  		ptr := v_0
  4686  		y := v_1
  4687  		if y.Op != Op386XORLconst {
  4688  			break
  4689  		}
  4690  		c := auxIntToInt32(y.AuxInt)
  4691  		l := y.Args[0]
  4692  		if l.Op != Op386MOVLload || auxIntToInt32(l.AuxInt) != off || auxToSym(l.Aux) != sym {
  4693  			break
  4694  		}
  4695  		mem := l.Args[1]
  4696  		if ptr != l.Args[0] || mem != v_2 || !(y.Uses == 1 && l.Uses == 1 && clobber(y, l) && validValAndOff(int64(c), int64(off))) {
  4697  			break
  4698  		}
  4699  		v.reset(Op386XORLconstmodify)
  4700  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  4701  		v.Aux = symToAux(sym)
  4702  		v.AddArg2(ptr, mem)
  4703  		return true
  4704  	}
  4705  	return false
  4706  }
  4707  func rewriteValue386_Op386MOVLstoreconst(v *Value) bool {
  4708  	v_1 := v.Args[1]
  4709  	v_0 := v.Args[0]
  4710  	b := v.Block
  4711  	config := b.Func.Config
  4712  	// match: (MOVLstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  4713  	// cond: sc.canAdd32(off)
  4714  	// result: (MOVLstoreconst [sc.addOffset32(off)] {s} ptr mem)
  4715  	for {
  4716  		sc := auxIntToValAndOff(v.AuxInt)
  4717  		s := auxToSym(v.Aux)
  4718  		if v_0.Op != Op386ADDLconst {
  4719  			break
  4720  		}
  4721  		off := auxIntToInt32(v_0.AuxInt)
  4722  		ptr := v_0.Args[0]
  4723  		mem := v_1
  4724  		if !(sc.canAdd32(off)) {
  4725  			break
  4726  		}
  4727  		v.reset(Op386MOVLstoreconst)
  4728  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4729  		v.Aux = symToAux(s)
  4730  		v.AddArg2(ptr, mem)
  4731  		return true
  4732  	}
  4733  	// match: (MOVLstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  4734  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  4735  	// result: (MOVLstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  4736  	for {
  4737  		sc := auxIntToValAndOff(v.AuxInt)
  4738  		sym1 := auxToSym(v.Aux)
  4739  		if v_0.Op != Op386LEAL {
  4740  			break
  4741  		}
  4742  		off := auxIntToInt32(v_0.AuxInt)
  4743  		sym2 := auxToSym(v_0.Aux)
  4744  		ptr := v_0.Args[0]
  4745  		mem := v_1
  4746  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  4747  			break
  4748  		}
  4749  		v.reset(Op386MOVLstoreconst)
  4750  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  4751  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4752  		v.AddArg2(ptr, mem)
  4753  		return true
  4754  	}
  4755  	return false
  4756  }
  4757  func rewriteValue386_Op386MOVSDconst(v *Value) bool {
  4758  	b := v.Block
  4759  	config := b.Func.Config
  4760  	typ := &b.Func.Config.Types
  4761  	// match: (MOVSDconst [c])
  4762  	// cond: config.ctxt.Flag_shared
  4763  	// result: (MOVSDconst2 (MOVSDconst1 [c]))
  4764  	for {
  4765  		c := auxIntToFloat64(v.AuxInt)
  4766  		if !(config.ctxt.Flag_shared) {
  4767  			break
  4768  		}
  4769  		v.reset(Op386MOVSDconst2)
  4770  		v0 := b.NewValue0(v.Pos, Op386MOVSDconst1, typ.UInt32)
  4771  		v0.AuxInt = float64ToAuxInt(c)
  4772  		v.AddArg(v0)
  4773  		return true
  4774  	}
  4775  	return false
  4776  }
  4777  func rewriteValue386_Op386MOVSDload(v *Value) bool {
  4778  	v_1 := v.Args[1]
  4779  	v_0 := v.Args[0]
  4780  	b := v.Block
  4781  	config := b.Func.Config
  4782  	// match: (MOVSDload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4783  	// cond: is32Bit(int64(off1)+int64(off2))
  4784  	// result: (MOVSDload [off1+off2] {sym} ptr mem)
  4785  	for {
  4786  		off1 := auxIntToInt32(v.AuxInt)
  4787  		sym := auxToSym(v.Aux)
  4788  		if v_0.Op != Op386ADDLconst {
  4789  			break
  4790  		}
  4791  		off2 := auxIntToInt32(v_0.AuxInt)
  4792  		ptr := v_0.Args[0]
  4793  		mem := v_1
  4794  		if !(is32Bit(int64(off1) + int64(off2))) {
  4795  			break
  4796  		}
  4797  		v.reset(Op386MOVSDload)
  4798  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4799  		v.Aux = symToAux(sym)
  4800  		v.AddArg2(ptr, mem)
  4801  		return true
  4802  	}
  4803  	// match: (MOVSDload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4804  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4805  	// result: (MOVSDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4806  	for {
  4807  		off1 := auxIntToInt32(v.AuxInt)
  4808  		sym1 := auxToSym(v.Aux)
  4809  		if v_0.Op != Op386LEAL {
  4810  			break
  4811  		}
  4812  		off2 := auxIntToInt32(v_0.AuxInt)
  4813  		sym2 := auxToSym(v_0.Aux)
  4814  		base := v_0.Args[0]
  4815  		mem := v_1
  4816  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4817  			break
  4818  		}
  4819  		v.reset(Op386MOVSDload)
  4820  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4821  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4822  		v.AddArg2(base, mem)
  4823  		return true
  4824  	}
  4825  	return false
  4826  }
  4827  func rewriteValue386_Op386MOVSDstore(v *Value) bool {
  4828  	v_2 := v.Args[2]
  4829  	v_1 := v.Args[1]
  4830  	v_0 := v.Args[0]
  4831  	b := v.Block
  4832  	config := b.Func.Config
  4833  	// match: (MOVSDstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4834  	// cond: is32Bit(int64(off1)+int64(off2))
  4835  	// result: (MOVSDstore [off1+off2] {sym} ptr val mem)
  4836  	for {
  4837  		off1 := auxIntToInt32(v.AuxInt)
  4838  		sym := auxToSym(v.Aux)
  4839  		if v_0.Op != Op386ADDLconst {
  4840  			break
  4841  		}
  4842  		off2 := auxIntToInt32(v_0.AuxInt)
  4843  		ptr := v_0.Args[0]
  4844  		val := v_1
  4845  		mem := v_2
  4846  		if !(is32Bit(int64(off1) + int64(off2))) {
  4847  			break
  4848  		}
  4849  		v.reset(Op386MOVSDstore)
  4850  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4851  		v.Aux = symToAux(sym)
  4852  		v.AddArg3(ptr, val, mem)
  4853  		return true
  4854  	}
  4855  	// match: (MOVSDstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4856  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4857  	// result: (MOVSDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4858  	for {
  4859  		off1 := auxIntToInt32(v.AuxInt)
  4860  		sym1 := auxToSym(v.Aux)
  4861  		if v_0.Op != Op386LEAL {
  4862  			break
  4863  		}
  4864  		off2 := auxIntToInt32(v_0.AuxInt)
  4865  		sym2 := auxToSym(v_0.Aux)
  4866  		base := v_0.Args[0]
  4867  		val := v_1
  4868  		mem := v_2
  4869  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4870  			break
  4871  		}
  4872  		v.reset(Op386MOVSDstore)
  4873  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4874  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4875  		v.AddArg3(base, val, mem)
  4876  		return true
  4877  	}
  4878  	return false
  4879  }
  4880  func rewriteValue386_Op386MOVSSconst(v *Value) bool {
  4881  	b := v.Block
  4882  	config := b.Func.Config
  4883  	typ := &b.Func.Config.Types
  4884  	// match: (MOVSSconst [c])
  4885  	// cond: config.ctxt.Flag_shared
  4886  	// result: (MOVSSconst2 (MOVSSconst1 [c]))
  4887  	for {
  4888  		c := auxIntToFloat32(v.AuxInt)
  4889  		if !(config.ctxt.Flag_shared) {
  4890  			break
  4891  		}
  4892  		v.reset(Op386MOVSSconst2)
  4893  		v0 := b.NewValue0(v.Pos, Op386MOVSSconst1, typ.UInt32)
  4894  		v0.AuxInt = float32ToAuxInt(c)
  4895  		v.AddArg(v0)
  4896  		return true
  4897  	}
  4898  	return false
  4899  }
  4900  func rewriteValue386_Op386MOVSSload(v *Value) bool {
  4901  	v_1 := v.Args[1]
  4902  	v_0 := v.Args[0]
  4903  	b := v.Block
  4904  	config := b.Func.Config
  4905  	// match: (MOVSSload [off1] {sym} (ADDLconst [off2] ptr) mem)
  4906  	// cond: is32Bit(int64(off1)+int64(off2))
  4907  	// result: (MOVSSload [off1+off2] {sym} ptr mem)
  4908  	for {
  4909  		off1 := auxIntToInt32(v.AuxInt)
  4910  		sym := auxToSym(v.Aux)
  4911  		if v_0.Op != Op386ADDLconst {
  4912  			break
  4913  		}
  4914  		off2 := auxIntToInt32(v_0.AuxInt)
  4915  		ptr := v_0.Args[0]
  4916  		mem := v_1
  4917  		if !(is32Bit(int64(off1) + int64(off2))) {
  4918  			break
  4919  		}
  4920  		v.reset(Op386MOVSSload)
  4921  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4922  		v.Aux = symToAux(sym)
  4923  		v.AddArg2(ptr, mem)
  4924  		return true
  4925  	}
  4926  	// match: (MOVSSload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  4927  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4928  	// result: (MOVSSload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  4929  	for {
  4930  		off1 := auxIntToInt32(v.AuxInt)
  4931  		sym1 := auxToSym(v.Aux)
  4932  		if v_0.Op != Op386LEAL {
  4933  			break
  4934  		}
  4935  		off2 := auxIntToInt32(v_0.AuxInt)
  4936  		sym2 := auxToSym(v_0.Aux)
  4937  		base := v_0.Args[0]
  4938  		mem := v_1
  4939  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4940  			break
  4941  		}
  4942  		v.reset(Op386MOVSSload)
  4943  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4944  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4945  		v.AddArg2(base, mem)
  4946  		return true
  4947  	}
  4948  	return false
  4949  }
  4950  func rewriteValue386_Op386MOVSSstore(v *Value) bool {
  4951  	v_2 := v.Args[2]
  4952  	v_1 := v.Args[1]
  4953  	v_0 := v.Args[0]
  4954  	b := v.Block
  4955  	config := b.Func.Config
  4956  	// match: (MOVSSstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  4957  	// cond: is32Bit(int64(off1)+int64(off2))
  4958  	// result: (MOVSSstore [off1+off2] {sym} ptr val mem)
  4959  	for {
  4960  		off1 := auxIntToInt32(v.AuxInt)
  4961  		sym := auxToSym(v.Aux)
  4962  		if v_0.Op != Op386ADDLconst {
  4963  			break
  4964  		}
  4965  		off2 := auxIntToInt32(v_0.AuxInt)
  4966  		ptr := v_0.Args[0]
  4967  		val := v_1
  4968  		mem := v_2
  4969  		if !(is32Bit(int64(off1) + int64(off2))) {
  4970  			break
  4971  		}
  4972  		v.reset(Op386MOVSSstore)
  4973  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4974  		v.Aux = symToAux(sym)
  4975  		v.AddArg3(ptr, val, mem)
  4976  		return true
  4977  	}
  4978  	// match: (MOVSSstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  4979  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  4980  	// result: (MOVSSstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  4981  	for {
  4982  		off1 := auxIntToInt32(v.AuxInt)
  4983  		sym1 := auxToSym(v.Aux)
  4984  		if v_0.Op != Op386LEAL {
  4985  			break
  4986  		}
  4987  		off2 := auxIntToInt32(v_0.AuxInt)
  4988  		sym2 := auxToSym(v_0.Aux)
  4989  		base := v_0.Args[0]
  4990  		val := v_1
  4991  		mem := v_2
  4992  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  4993  			break
  4994  		}
  4995  		v.reset(Op386MOVSSstore)
  4996  		v.AuxInt = int32ToAuxInt(off1 + off2)
  4997  		v.Aux = symToAux(mergeSym(sym1, sym2))
  4998  		v.AddArg3(base, val, mem)
  4999  		return true
  5000  	}
  5001  	return false
  5002  }
  5003  func rewriteValue386_Op386MOVWLSX(v *Value) bool {
  5004  	v_0 := v.Args[0]
  5005  	b := v.Block
  5006  	// match: (MOVWLSX x:(MOVWload [off] {sym} ptr mem))
  5007  	// cond: x.Uses == 1 && clobber(x)
  5008  	// result: @x.Block (MOVWLSXload <v.Type> [off] {sym} ptr mem)
  5009  	for {
  5010  		x := v_0
  5011  		if x.Op != Op386MOVWload {
  5012  			break
  5013  		}
  5014  		off := auxIntToInt32(x.AuxInt)
  5015  		sym := auxToSym(x.Aux)
  5016  		mem := x.Args[1]
  5017  		ptr := x.Args[0]
  5018  		if !(x.Uses == 1 && clobber(x)) {
  5019  			break
  5020  		}
  5021  		b = x.Block
  5022  		v0 := b.NewValue0(x.Pos, Op386MOVWLSXload, v.Type)
  5023  		v.copyOf(v0)
  5024  		v0.AuxInt = int32ToAuxInt(off)
  5025  		v0.Aux = symToAux(sym)
  5026  		v0.AddArg2(ptr, mem)
  5027  		return true
  5028  	}
  5029  	// match: (MOVWLSX (ANDLconst [c] x))
  5030  	// cond: c & 0x8000 == 0
  5031  	// result: (ANDLconst [c & 0x7fff] x)
  5032  	for {
  5033  		if v_0.Op != Op386ANDLconst {
  5034  			break
  5035  		}
  5036  		c := auxIntToInt32(v_0.AuxInt)
  5037  		x := v_0.Args[0]
  5038  		if !(c&0x8000 == 0) {
  5039  			break
  5040  		}
  5041  		v.reset(Op386ANDLconst)
  5042  		v.AuxInt = int32ToAuxInt(c & 0x7fff)
  5043  		v.AddArg(x)
  5044  		return true
  5045  	}
  5046  	return false
  5047  }
  5048  func rewriteValue386_Op386MOVWLSXload(v *Value) bool {
  5049  	v_1 := v.Args[1]
  5050  	v_0 := v.Args[0]
  5051  	b := v.Block
  5052  	config := b.Func.Config
  5053  	// match: (MOVWLSXload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5054  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5055  	// result: (MOVWLSX x)
  5056  	for {
  5057  		off := auxIntToInt32(v.AuxInt)
  5058  		sym := auxToSym(v.Aux)
  5059  		ptr := v_0
  5060  		if v_1.Op != Op386MOVWstore {
  5061  			break
  5062  		}
  5063  		off2 := auxIntToInt32(v_1.AuxInt)
  5064  		sym2 := auxToSym(v_1.Aux)
  5065  		x := v_1.Args[1]
  5066  		ptr2 := v_1.Args[0]
  5067  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5068  			break
  5069  		}
  5070  		v.reset(Op386MOVWLSX)
  5071  		v.AddArg(x)
  5072  		return true
  5073  	}
  5074  	// match: (MOVWLSXload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5075  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5076  	// result: (MOVWLSXload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5077  	for {
  5078  		off1 := auxIntToInt32(v.AuxInt)
  5079  		sym1 := auxToSym(v.Aux)
  5080  		if v_0.Op != Op386LEAL {
  5081  			break
  5082  		}
  5083  		off2 := auxIntToInt32(v_0.AuxInt)
  5084  		sym2 := auxToSym(v_0.Aux)
  5085  		base := v_0.Args[0]
  5086  		mem := v_1
  5087  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5088  			break
  5089  		}
  5090  		v.reset(Op386MOVWLSXload)
  5091  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5092  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5093  		v.AddArg2(base, mem)
  5094  		return true
  5095  	}
  5096  	return false
  5097  }
  5098  func rewriteValue386_Op386MOVWLZX(v *Value) bool {
  5099  	v_0 := v.Args[0]
  5100  	b := v.Block
  5101  	// match: (MOVWLZX x:(MOVWload [off] {sym} ptr mem))
  5102  	// cond: x.Uses == 1 && clobber(x)
  5103  	// result: @x.Block (MOVWload <v.Type> [off] {sym} ptr mem)
  5104  	for {
  5105  		x := v_0
  5106  		if x.Op != Op386MOVWload {
  5107  			break
  5108  		}
  5109  		off := auxIntToInt32(x.AuxInt)
  5110  		sym := auxToSym(x.Aux)
  5111  		mem := x.Args[1]
  5112  		ptr := x.Args[0]
  5113  		if !(x.Uses == 1 && clobber(x)) {
  5114  			break
  5115  		}
  5116  		b = x.Block
  5117  		v0 := b.NewValue0(x.Pos, Op386MOVWload, v.Type)
  5118  		v.copyOf(v0)
  5119  		v0.AuxInt = int32ToAuxInt(off)
  5120  		v0.Aux = symToAux(sym)
  5121  		v0.AddArg2(ptr, mem)
  5122  		return true
  5123  	}
  5124  	// match: (MOVWLZX (ANDLconst [c] x))
  5125  	// result: (ANDLconst [c & 0xffff] x)
  5126  	for {
  5127  		if v_0.Op != Op386ANDLconst {
  5128  			break
  5129  		}
  5130  		c := auxIntToInt32(v_0.AuxInt)
  5131  		x := v_0.Args[0]
  5132  		v.reset(Op386ANDLconst)
  5133  		v.AuxInt = int32ToAuxInt(c & 0xffff)
  5134  		v.AddArg(x)
  5135  		return true
  5136  	}
  5137  	return false
  5138  }
  5139  func rewriteValue386_Op386MOVWload(v *Value) bool {
  5140  	v_1 := v.Args[1]
  5141  	v_0 := v.Args[0]
  5142  	b := v.Block
  5143  	config := b.Func.Config
  5144  	// match: (MOVWload [off] {sym} ptr (MOVWstore [off2] {sym2} ptr2 x _))
  5145  	// cond: sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)
  5146  	// result: (MOVWLZX x)
  5147  	for {
  5148  		off := auxIntToInt32(v.AuxInt)
  5149  		sym := auxToSym(v.Aux)
  5150  		ptr := v_0
  5151  		if v_1.Op != Op386MOVWstore {
  5152  			break
  5153  		}
  5154  		off2 := auxIntToInt32(v_1.AuxInt)
  5155  		sym2 := auxToSym(v_1.Aux)
  5156  		x := v_1.Args[1]
  5157  		ptr2 := v_1.Args[0]
  5158  		if !(sym == sym2 && off == off2 && isSamePtr(ptr, ptr2)) {
  5159  			break
  5160  		}
  5161  		v.reset(Op386MOVWLZX)
  5162  		v.AddArg(x)
  5163  		return true
  5164  	}
  5165  	// match: (MOVWload [off1] {sym} (ADDLconst [off2] ptr) mem)
  5166  	// cond: is32Bit(int64(off1)+int64(off2))
  5167  	// result: (MOVWload [off1+off2] {sym} ptr mem)
  5168  	for {
  5169  		off1 := auxIntToInt32(v.AuxInt)
  5170  		sym := auxToSym(v.Aux)
  5171  		if v_0.Op != Op386ADDLconst {
  5172  			break
  5173  		}
  5174  		off2 := auxIntToInt32(v_0.AuxInt)
  5175  		ptr := v_0.Args[0]
  5176  		mem := v_1
  5177  		if !(is32Bit(int64(off1) + int64(off2))) {
  5178  			break
  5179  		}
  5180  		v.reset(Op386MOVWload)
  5181  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5182  		v.Aux = symToAux(sym)
  5183  		v.AddArg2(ptr, mem)
  5184  		return true
  5185  	}
  5186  	// match: (MOVWload [off1] {sym1} (LEAL [off2] {sym2} base) mem)
  5187  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5188  	// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
  5189  	for {
  5190  		off1 := auxIntToInt32(v.AuxInt)
  5191  		sym1 := auxToSym(v.Aux)
  5192  		if v_0.Op != Op386LEAL {
  5193  			break
  5194  		}
  5195  		off2 := auxIntToInt32(v_0.AuxInt)
  5196  		sym2 := auxToSym(v_0.Aux)
  5197  		base := v_0.Args[0]
  5198  		mem := v_1
  5199  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5200  			break
  5201  		}
  5202  		v.reset(Op386MOVWload)
  5203  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5204  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5205  		v.AddArg2(base, mem)
  5206  		return true
  5207  	}
  5208  	// match: (MOVWload [off] {sym} (SB) _)
  5209  	// cond: symIsRO(sym)
  5210  	// result: (MOVLconst [int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder))])
  5211  	for {
  5212  		off := auxIntToInt32(v.AuxInt)
  5213  		sym := auxToSym(v.Aux)
  5214  		if v_0.Op != OpSB || !(symIsRO(sym)) {
  5215  			break
  5216  		}
  5217  		v.reset(Op386MOVLconst)
  5218  		v.AuxInt = int32ToAuxInt(int32(read16(sym, int64(off), config.ctxt.Arch.ByteOrder)))
  5219  		return true
  5220  	}
  5221  	return false
  5222  }
  5223  func rewriteValue386_Op386MOVWstore(v *Value) bool {
  5224  	v_2 := v.Args[2]
  5225  	v_1 := v.Args[1]
  5226  	v_0 := v.Args[0]
  5227  	b := v.Block
  5228  	config := b.Func.Config
  5229  	// match: (MOVWstore [off] {sym} ptr (MOVWLSX x) mem)
  5230  	// result: (MOVWstore [off] {sym} ptr x mem)
  5231  	for {
  5232  		off := auxIntToInt32(v.AuxInt)
  5233  		sym := auxToSym(v.Aux)
  5234  		ptr := v_0
  5235  		if v_1.Op != Op386MOVWLSX {
  5236  			break
  5237  		}
  5238  		x := v_1.Args[0]
  5239  		mem := v_2
  5240  		v.reset(Op386MOVWstore)
  5241  		v.AuxInt = int32ToAuxInt(off)
  5242  		v.Aux = symToAux(sym)
  5243  		v.AddArg3(ptr, x, mem)
  5244  		return true
  5245  	}
  5246  	// match: (MOVWstore [off] {sym} ptr (MOVWLZX x) mem)
  5247  	// result: (MOVWstore [off] {sym} ptr x mem)
  5248  	for {
  5249  		off := auxIntToInt32(v.AuxInt)
  5250  		sym := auxToSym(v.Aux)
  5251  		ptr := v_0
  5252  		if v_1.Op != Op386MOVWLZX {
  5253  			break
  5254  		}
  5255  		x := v_1.Args[0]
  5256  		mem := v_2
  5257  		v.reset(Op386MOVWstore)
  5258  		v.AuxInt = int32ToAuxInt(off)
  5259  		v.Aux = symToAux(sym)
  5260  		v.AddArg3(ptr, x, mem)
  5261  		return true
  5262  	}
  5263  	// match: (MOVWstore [off1] {sym} (ADDLconst [off2] ptr) val mem)
  5264  	// cond: is32Bit(int64(off1)+int64(off2))
  5265  	// result: (MOVWstore [off1+off2] {sym} ptr val mem)
  5266  	for {
  5267  		off1 := auxIntToInt32(v.AuxInt)
  5268  		sym := auxToSym(v.Aux)
  5269  		if v_0.Op != Op386ADDLconst {
  5270  			break
  5271  		}
  5272  		off2 := auxIntToInt32(v_0.AuxInt)
  5273  		ptr := v_0.Args[0]
  5274  		val := v_1
  5275  		mem := v_2
  5276  		if !(is32Bit(int64(off1) + int64(off2))) {
  5277  			break
  5278  		}
  5279  		v.reset(Op386MOVWstore)
  5280  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5281  		v.Aux = symToAux(sym)
  5282  		v.AddArg3(ptr, val, mem)
  5283  		return true
  5284  	}
  5285  	// match: (MOVWstore [off] {sym} ptr (MOVLconst [c]) mem)
  5286  	// cond: validOff(int64(off))
  5287  	// result: (MOVWstoreconst [makeValAndOff32(c,off)] {sym} ptr mem)
  5288  	for {
  5289  		off := auxIntToInt32(v.AuxInt)
  5290  		sym := auxToSym(v.Aux)
  5291  		ptr := v_0
  5292  		if v_1.Op != Op386MOVLconst {
  5293  			break
  5294  		}
  5295  		c := auxIntToInt32(v_1.AuxInt)
  5296  		mem := v_2
  5297  		if !(validOff(int64(off))) {
  5298  			break
  5299  		}
  5300  		v.reset(Op386MOVWstoreconst)
  5301  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(c, off))
  5302  		v.Aux = symToAux(sym)
  5303  		v.AddArg2(ptr, mem)
  5304  		return true
  5305  	}
  5306  	// match: (MOVWstore [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  5307  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  5308  	// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  5309  	for {
  5310  		off1 := auxIntToInt32(v.AuxInt)
  5311  		sym1 := auxToSym(v.Aux)
  5312  		if v_0.Op != Op386LEAL {
  5313  			break
  5314  		}
  5315  		off2 := auxIntToInt32(v_0.AuxInt)
  5316  		sym2 := auxToSym(v_0.Aux)
  5317  		base := v_0.Args[0]
  5318  		val := v_1
  5319  		mem := v_2
  5320  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  5321  			break
  5322  		}
  5323  		v.reset(Op386MOVWstore)
  5324  		v.AuxInt = int32ToAuxInt(off1 + off2)
  5325  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5326  		v.AddArg3(base, val, mem)
  5327  		return true
  5328  	}
  5329  	// match: (MOVWstore [i] {s} p (SHRLconst [16] w) x:(MOVWstore [i-2] {s} p w mem))
  5330  	// cond: x.Uses == 1 && clobber(x)
  5331  	// result: (MOVLstore [i-2] {s} p w mem)
  5332  	for {
  5333  		i := auxIntToInt32(v.AuxInt)
  5334  		s := auxToSym(v.Aux)
  5335  		p := v_0
  5336  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 16 {
  5337  			break
  5338  		}
  5339  		w := v_1.Args[0]
  5340  		x := v_2
  5341  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  5342  			break
  5343  		}
  5344  		mem := x.Args[2]
  5345  		if p != x.Args[0] || w != x.Args[1] || !(x.Uses == 1 && clobber(x)) {
  5346  			break
  5347  		}
  5348  		v.reset(Op386MOVLstore)
  5349  		v.AuxInt = int32ToAuxInt(i - 2)
  5350  		v.Aux = symToAux(s)
  5351  		v.AddArg3(p, w, mem)
  5352  		return true
  5353  	}
  5354  	// match: (MOVWstore [i] {s} p (SHRLconst [j] w) x:(MOVWstore [i-2] {s} p w0:(SHRLconst [j-16] w) mem))
  5355  	// cond: x.Uses == 1 && clobber(x)
  5356  	// result: (MOVLstore [i-2] {s} p w0 mem)
  5357  	for {
  5358  		i := auxIntToInt32(v.AuxInt)
  5359  		s := auxToSym(v.Aux)
  5360  		p := v_0
  5361  		if v_1.Op != Op386SHRLconst {
  5362  			break
  5363  		}
  5364  		j := auxIntToInt32(v_1.AuxInt)
  5365  		w := v_1.Args[0]
  5366  		x := v_2
  5367  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i-2 || auxToSym(x.Aux) != s {
  5368  			break
  5369  		}
  5370  		mem := x.Args[2]
  5371  		if p != x.Args[0] {
  5372  			break
  5373  		}
  5374  		w0 := x.Args[1]
  5375  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && clobber(x)) {
  5376  			break
  5377  		}
  5378  		v.reset(Op386MOVLstore)
  5379  		v.AuxInt = int32ToAuxInt(i - 2)
  5380  		v.Aux = symToAux(s)
  5381  		v.AddArg3(p, w0, mem)
  5382  		return true
  5383  	}
  5384  	// match: (MOVWstore [i] {s} p1 (SHRLconst [16] w) x:(MOVWstore [i] {s} p0 w mem))
  5385  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)
  5386  	// result: (MOVLstore [i] {s} p0 w mem)
  5387  	for {
  5388  		i := auxIntToInt32(v.AuxInt)
  5389  		s := auxToSym(v.Aux)
  5390  		p1 := v_0
  5391  		if v_1.Op != Op386SHRLconst || auxIntToInt32(v_1.AuxInt) != 16 {
  5392  			break
  5393  		}
  5394  		w := v_1.Args[0]
  5395  		x := v_2
  5396  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  5397  			break
  5398  		}
  5399  		mem := x.Args[2]
  5400  		p0 := x.Args[0]
  5401  		if w != x.Args[1] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5402  			break
  5403  		}
  5404  		v.reset(Op386MOVLstore)
  5405  		v.AuxInt = int32ToAuxInt(i)
  5406  		v.Aux = symToAux(s)
  5407  		v.AddArg3(p0, w, mem)
  5408  		return true
  5409  	}
  5410  	// match: (MOVWstore [i] {s} p1 (SHRLconst [j] w) x:(MOVWstore [i] {s} p0 w0:(SHRLconst [j-16] w) mem))
  5411  	// cond: x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)
  5412  	// result: (MOVLstore [i] {s} p0 w0 mem)
  5413  	for {
  5414  		i := auxIntToInt32(v.AuxInt)
  5415  		s := auxToSym(v.Aux)
  5416  		p1 := v_0
  5417  		if v_1.Op != Op386SHRLconst {
  5418  			break
  5419  		}
  5420  		j := auxIntToInt32(v_1.AuxInt)
  5421  		w := v_1.Args[0]
  5422  		x := v_2
  5423  		if x.Op != Op386MOVWstore || auxIntToInt32(x.AuxInt) != i || auxToSym(x.Aux) != s {
  5424  			break
  5425  		}
  5426  		mem := x.Args[2]
  5427  		p0 := x.Args[0]
  5428  		w0 := x.Args[1]
  5429  		if w0.Op != Op386SHRLconst || auxIntToInt32(w0.AuxInt) != j-16 || w != w0.Args[0] || !(x.Uses == 1 && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5430  			break
  5431  		}
  5432  		v.reset(Op386MOVLstore)
  5433  		v.AuxInt = int32ToAuxInt(i)
  5434  		v.Aux = symToAux(s)
  5435  		v.AddArg3(p0, w0, mem)
  5436  		return true
  5437  	}
  5438  	return false
  5439  }
  5440  func rewriteValue386_Op386MOVWstoreconst(v *Value) bool {
  5441  	v_1 := v.Args[1]
  5442  	v_0 := v.Args[0]
  5443  	b := v.Block
  5444  	config := b.Func.Config
  5445  	// match: (MOVWstoreconst [sc] {s} (ADDLconst [off] ptr) mem)
  5446  	// cond: sc.canAdd32(off)
  5447  	// result: (MOVWstoreconst [sc.addOffset32(off)] {s} ptr mem)
  5448  	for {
  5449  		sc := auxIntToValAndOff(v.AuxInt)
  5450  		s := auxToSym(v.Aux)
  5451  		if v_0.Op != Op386ADDLconst {
  5452  			break
  5453  		}
  5454  		off := auxIntToInt32(v_0.AuxInt)
  5455  		ptr := v_0.Args[0]
  5456  		mem := v_1
  5457  		if !(sc.canAdd32(off)) {
  5458  			break
  5459  		}
  5460  		v.reset(Op386MOVWstoreconst)
  5461  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  5462  		v.Aux = symToAux(s)
  5463  		v.AddArg2(ptr, mem)
  5464  		return true
  5465  	}
  5466  	// match: (MOVWstoreconst [sc] {sym1} (LEAL [off] {sym2} ptr) mem)
  5467  	// cond: canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)
  5468  	// result: (MOVWstoreconst [sc.addOffset32(off)] {mergeSym(sym1, sym2)} ptr mem)
  5469  	for {
  5470  		sc := auxIntToValAndOff(v.AuxInt)
  5471  		sym1 := auxToSym(v.Aux)
  5472  		if v_0.Op != Op386LEAL {
  5473  			break
  5474  		}
  5475  		off := auxIntToInt32(v_0.AuxInt)
  5476  		sym2 := auxToSym(v_0.Aux)
  5477  		ptr := v_0.Args[0]
  5478  		mem := v_1
  5479  		if !(canMergeSym(sym1, sym2) && sc.canAdd32(off) && (ptr.Op != OpSB || !config.ctxt.Flag_shared)) {
  5480  			break
  5481  		}
  5482  		v.reset(Op386MOVWstoreconst)
  5483  		v.AuxInt = valAndOffToAuxInt(sc.addOffset32(off))
  5484  		v.Aux = symToAux(mergeSym(sym1, sym2))
  5485  		v.AddArg2(ptr, mem)
  5486  		return true
  5487  	}
  5488  	// match: (MOVWstoreconst [c] {s} p x:(MOVWstoreconst [a] {s} p mem))
  5489  	// cond: x.Uses == 1 && a.Off() + 2 == c.Off() && clobber(x)
  5490  	// result: (MOVLstoreconst [makeValAndOff32(int32(a.Val()&0xffff | c.Val()<<16), a.Off32())] {s} p mem)
  5491  	for {
  5492  		c := auxIntToValAndOff(v.AuxInt)
  5493  		s := auxToSym(v.Aux)
  5494  		p := v_0
  5495  		x := v_1
  5496  		if x.Op != Op386MOVWstoreconst {
  5497  			break
  5498  		}
  5499  		a := auxIntToValAndOff(x.AuxInt)
  5500  		if auxToSym(x.Aux) != s {
  5501  			break
  5502  		}
  5503  		mem := x.Args[1]
  5504  		if p != x.Args[0] || !(x.Uses == 1 && a.Off()+2 == c.Off() && clobber(x)) {
  5505  			break
  5506  		}
  5507  		v.reset(Op386MOVLstoreconst)
  5508  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xffff|c.Val()<<16), a.Off32()))
  5509  		v.Aux = symToAux(s)
  5510  		v.AddArg2(p, mem)
  5511  		return true
  5512  	}
  5513  	// match: (MOVWstoreconst [a] {s} p x:(MOVWstoreconst [c] {s} p mem))
  5514  	// cond: x.Uses == 1 && ValAndOff(a).Off() + 2 == ValAndOff(c).Off() && clobber(x)
  5515  	// result: (MOVLstoreconst [makeValAndOff32(int32(a.Val()&0xffff | c.Val()<<16), a.Off32())] {s} p mem)
  5516  	for {
  5517  		a := auxIntToValAndOff(v.AuxInt)
  5518  		s := auxToSym(v.Aux)
  5519  		p := v_0
  5520  		x := v_1
  5521  		if x.Op != Op386MOVWstoreconst {
  5522  			break
  5523  		}
  5524  		c := auxIntToValAndOff(x.AuxInt)
  5525  		if auxToSym(x.Aux) != s {
  5526  			break
  5527  		}
  5528  		mem := x.Args[1]
  5529  		if p != x.Args[0] || !(x.Uses == 1 && ValAndOff(a).Off()+2 == ValAndOff(c).Off() && clobber(x)) {
  5530  			break
  5531  		}
  5532  		v.reset(Op386MOVLstoreconst)
  5533  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xffff|c.Val()<<16), a.Off32()))
  5534  		v.Aux = symToAux(s)
  5535  		v.AddArg2(p, mem)
  5536  		return true
  5537  	}
  5538  	// match: (MOVWstoreconst [c] {s} p1 x:(MOVWstoreconst [a] {s} p0 mem))
  5539  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)
  5540  	// result: (MOVLstoreconst [makeValAndOff32(int32(a.Val()&0xffff | c.Val()<<16), a.Off32())] {s} p0 mem)
  5541  	for {
  5542  		c := auxIntToValAndOff(v.AuxInt)
  5543  		s := auxToSym(v.Aux)
  5544  		p1 := v_0
  5545  		x := v_1
  5546  		if x.Op != Op386MOVWstoreconst {
  5547  			break
  5548  		}
  5549  		a := auxIntToValAndOff(x.AuxInt)
  5550  		if auxToSym(x.Aux) != s {
  5551  			break
  5552  		}
  5553  		mem := x.Args[1]
  5554  		p0 := x.Args[0]
  5555  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5556  			break
  5557  		}
  5558  		v.reset(Op386MOVLstoreconst)
  5559  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xffff|c.Val()<<16), a.Off32()))
  5560  		v.Aux = symToAux(s)
  5561  		v.AddArg2(p0, mem)
  5562  		return true
  5563  	}
  5564  	// match: (MOVWstoreconst [a] {s} p0 x:(MOVWstoreconst [c] {s} p1 mem))
  5565  	// cond: x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)
  5566  	// result: (MOVLstoreconst [makeValAndOff32(int32(a.Val()&0xffff | c.Val()<<16), a.Off32())] {s} p0 mem)
  5567  	for {
  5568  		a := auxIntToValAndOff(v.AuxInt)
  5569  		s := auxToSym(v.Aux)
  5570  		p0 := v_0
  5571  		x := v_1
  5572  		if x.Op != Op386MOVWstoreconst {
  5573  			break
  5574  		}
  5575  		c := auxIntToValAndOff(x.AuxInt)
  5576  		if auxToSym(x.Aux) != s {
  5577  			break
  5578  		}
  5579  		mem := x.Args[1]
  5580  		p1 := x.Args[0]
  5581  		if !(x.Uses == 1 && a.Off() == c.Off() && sequentialAddresses(p0, p1, 2) && clobber(x)) {
  5582  			break
  5583  		}
  5584  		v.reset(Op386MOVLstoreconst)
  5585  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(int32(a.Val()&0xffff|c.Val()<<16), a.Off32()))
  5586  		v.Aux = symToAux(s)
  5587  		v.AddArg2(p0, mem)
  5588  		return true
  5589  	}
  5590  	return false
  5591  }
  5592  func rewriteValue386_Op386MULL(v *Value) bool {
  5593  	v_1 := v.Args[1]
  5594  	v_0 := v.Args[0]
  5595  	// match: (MULL x (MOVLconst [c]))
  5596  	// result: (MULLconst [c] x)
  5597  	for {
  5598  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5599  			x := v_0
  5600  			if v_1.Op != Op386MOVLconst {
  5601  				continue
  5602  			}
  5603  			c := auxIntToInt32(v_1.AuxInt)
  5604  			v.reset(Op386MULLconst)
  5605  			v.AuxInt = int32ToAuxInt(c)
  5606  			v.AddArg(x)
  5607  			return true
  5608  		}
  5609  		break
  5610  	}
  5611  	// match: (MULL x l:(MOVLload [off] {sym} ptr mem))
  5612  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  5613  	// result: (MULLload x [off] {sym} ptr mem)
  5614  	for {
  5615  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  5616  			x := v_0
  5617  			l := v_1
  5618  			if l.Op != Op386MOVLload {
  5619  				continue
  5620  			}
  5621  			off := auxIntToInt32(l.AuxInt)
  5622  			sym := auxToSym(l.Aux)
  5623  			mem := l.Args[1]
  5624  			ptr := l.Args[0]
  5625  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  5626  				continue
  5627  			}
  5628  			v.reset(Op386MULLload)
  5629  			v.AuxInt = int32ToAuxInt(off)
  5630  			v.Aux = symToAux(sym)
  5631  			v.AddArg3(x, ptr, mem)
  5632  			return true
  5633  		}
  5634  		break
  5635  	}
  5636  	return false
  5637  }
  5638  func rewriteValue386_Op386MULLconst(v *Value) bool {
  5639  	v_0 := v.Args[0]
  5640  	b := v.Block
  5641  	// match: (MULLconst [c] (MULLconst [d] x))
  5642  	// result: (MULLconst [c * d] x)
  5643  	for {
  5644  		c := auxIntToInt32(v.AuxInt)
  5645  		if v_0.Op != Op386MULLconst {
  5646  			break
  5647  		}
  5648  		d := auxIntToInt32(v_0.AuxInt)
  5649  		x := v_0.Args[0]
  5650  		v.reset(Op386MULLconst)
  5651  		v.AuxInt = int32ToAuxInt(c * d)
  5652  		v.AddArg(x)
  5653  		return true
  5654  	}
  5655  	// match: (MULLconst [-9] x)
  5656  	// result: (NEGL (LEAL8 <v.Type> x x))
  5657  	for {
  5658  		if auxIntToInt32(v.AuxInt) != -9 {
  5659  			break
  5660  		}
  5661  		x := v_0
  5662  		v.reset(Op386NEGL)
  5663  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5664  		v0.AddArg2(x, x)
  5665  		v.AddArg(v0)
  5666  		return true
  5667  	}
  5668  	// match: (MULLconst [-5] x)
  5669  	// result: (NEGL (LEAL4 <v.Type> x x))
  5670  	for {
  5671  		if auxIntToInt32(v.AuxInt) != -5 {
  5672  			break
  5673  		}
  5674  		x := v_0
  5675  		v.reset(Op386NEGL)
  5676  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5677  		v0.AddArg2(x, x)
  5678  		v.AddArg(v0)
  5679  		return true
  5680  	}
  5681  	// match: (MULLconst [-3] x)
  5682  	// result: (NEGL (LEAL2 <v.Type> x x))
  5683  	for {
  5684  		if auxIntToInt32(v.AuxInt) != -3 {
  5685  			break
  5686  		}
  5687  		x := v_0
  5688  		v.reset(Op386NEGL)
  5689  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5690  		v0.AddArg2(x, x)
  5691  		v.AddArg(v0)
  5692  		return true
  5693  	}
  5694  	// match: (MULLconst [-1] x)
  5695  	// result: (NEGL x)
  5696  	for {
  5697  		if auxIntToInt32(v.AuxInt) != -1 {
  5698  			break
  5699  		}
  5700  		x := v_0
  5701  		v.reset(Op386NEGL)
  5702  		v.AddArg(x)
  5703  		return true
  5704  	}
  5705  	// match: (MULLconst [0] _)
  5706  	// result: (MOVLconst [0])
  5707  	for {
  5708  		if auxIntToInt32(v.AuxInt) != 0 {
  5709  			break
  5710  		}
  5711  		v.reset(Op386MOVLconst)
  5712  		v.AuxInt = int32ToAuxInt(0)
  5713  		return true
  5714  	}
  5715  	// match: (MULLconst [1] x)
  5716  	// result: x
  5717  	for {
  5718  		if auxIntToInt32(v.AuxInt) != 1 {
  5719  			break
  5720  		}
  5721  		x := v_0
  5722  		v.copyOf(x)
  5723  		return true
  5724  	}
  5725  	// match: (MULLconst [3] x)
  5726  	// result: (LEAL2 x x)
  5727  	for {
  5728  		if auxIntToInt32(v.AuxInt) != 3 {
  5729  			break
  5730  		}
  5731  		x := v_0
  5732  		v.reset(Op386LEAL2)
  5733  		v.AddArg2(x, x)
  5734  		return true
  5735  	}
  5736  	// match: (MULLconst [5] x)
  5737  	// result: (LEAL4 x x)
  5738  	for {
  5739  		if auxIntToInt32(v.AuxInt) != 5 {
  5740  			break
  5741  		}
  5742  		x := v_0
  5743  		v.reset(Op386LEAL4)
  5744  		v.AddArg2(x, x)
  5745  		return true
  5746  	}
  5747  	// match: (MULLconst [7] x)
  5748  	// result: (LEAL2 x (LEAL2 <v.Type> x x))
  5749  	for {
  5750  		if auxIntToInt32(v.AuxInt) != 7 {
  5751  			break
  5752  		}
  5753  		x := v_0
  5754  		v.reset(Op386LEAL2)
  5755  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5756  		v0.AddArg2(x, x)
  5757  		v.AddArg2(x, v0)
  5758  		return true
  5759  	}
  5760  	// match: (MULLconst [9] x)
  5761  	// result: (LEAL8 x x)
  5762  	for {
  5763  		if auxIntToInt32(v.AuxInt) != 9 {
  5764  			break
  5765  		}
  5766  		x := v_0
  5767  		v.reset(Op386LEAL8)
  5768  		v.AddArg2(x, x)
  5769  		return true
  5770  	}
  5771  	// match: (MULLconst [11] x)
  5772  	// result: (LEAL2 x (LEAL4 <v.Type> x x))
  5773  	for {
  5774  		if auxIntToInt32(v.AuxInt) != 11 {
  5775  			break
  5776  		}
  5777  		x := v_0
  5778  		v.reset(Op386LEAL2)
  5779  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5780  		v0.AddArg2(x, x)
  5781  		v.AddArg2(x, v0)
  5782  		return true
  5783  	}
  5784  	// match: (MULLconst [13] x)
  5785  	// result: (LEAL4 x (LEAL2 <v.Type> x x))
  5786  	for {
  5787  		if auxIntToInt32(v.AuxInt) != 13 {
  5788  			break
  5789  		}
  5790  		x := v_0
  5791  		v.reset(Op386LEAL4)
  5792  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5793  		v0.AddArg2(x, x)
  5794  		v.AddArg2(x, v0)
  5795  		return true
  5796  	}
  5797  	// match: (MULLconst [19] x)
  5798  	// result: (LEAL2 x (LEAL8 <v.Type> x x))
  5799  	for {
  5800  		if auxIntToInt32(v.AuxInt) != 19 {
  5801  			break
  5802  		}
  5803  		x := v_0
  5804  		v.reset(Op386LEAL2)
  5805  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5806  		v0.AddArg2(x, x)
  5807  		v.AddArg2(x, v0)
  5808  		return true
  5809  	}
  5810  	// match: (MULLconst [21] x)
  5811  	// result: (LEAL4 x (LEAL4 <v.Type> x x))
  5812  	for {
  5813  		if auxIntToInt32(v.AuxInt) != 21 {
  5814  			break
  5815  		}
  5816  		x := v_0
  5817  		v.reset(Op386LEAL4)
  5818  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5819  		v0.AddArg2(x, x)
  5820  		v.AddArg2(x, v0)
  5821  		return true
  5822  	}
  5823  	// match: (MULLconst [25] x)
  5824  	// result: (LEAL8 x (LEAL2 <v.Type> x x))
  5825  	for {
  5826  		if auxIntToInt32(v.AuxInt) != 25 {
  5827  			break
  5828  		}
  5829  		x := v_0
  5830  		v.reset(Op386LEAL8)
  5831  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5832  		v0.AddArg2(x, x)
  5833  		v.AddArg2(x, v0)
  5834  		return true
  5835  	}
  5836  	// match: (MULLconst [27] x)
  5837  	// result: (LEAL8 (LEAL2 <v.Type> x x) (LEAL2 <v.Type> x x))
  5838  	for {
  5839  		if auxIntToInt32(v.AuxInt) != 27 {
  5840  			break
  5841  		}
  5842  		x := v_0
  5843  		v.reset(Op386LEAL8)
  5844  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  5845  		v0.AddArg2(x, x)
  5846  		v.AddArg2(v0, v0)
  5847  		return true
  5848  	}
  5849  	// match: (MULLconst [37] x)
  5850  	// result: (LEAL4 x (LEAL8 <v.Type> x x))
  5851  	for {
  5852  		if auxIntToInt32(v.AuxInt) != 37 {
  5853  			break
  5854  		}
  5855  		x := v_0
  5856  		v.reset(Op386LEAL4)
  5857  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5858  		v0.AddArg2(x, x)
  5859  		v.AddArg2(x, v0)
  5860  		return true
  5861  	}
  5862  	// match: (MULLconst [41] x)
  5863  	// result: (LEAL8 x (LEAL4 <v.Type> x x))
  5864  	for {
  5865  		if auxIntToInt32(v.AuxInt) != 41 {
  5866  			break
  5867  		}
  5868  		x := v_0
  5869  		v.reset(Op386LEAL8)
  5870  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5871  		v0.AddArg2(x, x)
  5872  		v.AddArg2(x, v0)
  5873  		return true
  5874  	}
  5875  	// match: (MULLconst [45] x)
  5876  	// result: (LEAL8 (LEAL4 <v.Type> x x) (LEAL4 <v.Type> x x))
  5877  	for {
  5878  		if auxIntToInt32(v.AuxInt) != 45 {
  5879  			break
  5880  		}
  5881  		x := v_0
  5882  		v.reset(Op386LEAL8)
  5883  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  5884  		v0.AddArg2(x, x)
  5885  		v.AddArg2(v0, v0)
  5886  		return true
  5887  	}
  5888  	// match: (MULLconst [73] x)
  5889  	// result: (LEAL8 x (LEAL8 <v.Type> x x))
  5890  	for {
  5891  		if auxIntToInt32(v.AuxInt) != 73 {
  5892  			break
  5893  		}
  5894  		x := v_0
  5895  		v.reset(Op386LEAL8)
  5896  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5897  		v0.AddArg2(x, x)
  5898  		v.AddArg2(x, v0)
  5899  		return true
  5900  	}
  5901  	// match: (MULLconst [81] x)
  5902  	// result: (LEAL8 (LEAL8 <v.Type> x x) (LEAL8 <v.Type> x x))
  5903  	for {
  5904  		if auxIntToInt32(v.AuxInt) != 81 {
  5905  			break
  5906  		}
  5907  		x := v_0
  5908  		v.reset(Op386LEAL8)
  5909  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  5910  		v0.AddArg2(x, x)
  5911  		v.AddArg2(v0, v0)
  5912  		return true
  5913  	}
  5914  	// match: (MULLconst [c] x)
  5915  	// cond: isPowerOfTwo32(c+1) && c >= 15
  5916  	// result: (SUBL (SHLLconst <v.Type> [int32(log32(c+1))] x) x)
  5917  	for {
  5918  		c := auxIntToInt32(v.AuxInt)
  5919  		x := v_0
  5920  		if !(isPowerOfTwo32(c+1) && c >= 15) {
  5921  			break
  5922  		}
  5923  		v.reset(Op386SUBL)
  5924  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5925  		v0.AuxInt = int32ToAuxInt(int32(log32(c + 1)))
  5926  		v0.AddArg(x)
  5927  		v.AddArg2(v0, x)
  5928  		return true
  5929  	}
  5930  	// match: (MULLconst [c] x)
  5931  	// cond: isPowerOfTwo32(c-1) && c >= 17
  5932  	// result: (LEAL1 (SHLLconst <v.Type> [int32(log32(c-1))] x) x)
  5933  	for {
  5934  		c := auxIntToInt32(v.AuxInt)
  5935  		x := v_0
  5936  		if !(isPowerOfTwo32(c-1) && c >= 17) {
  5937  			break
  5938  		}
  5939  		v.reset(Op386LEAL1)
  5940  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5941  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 1)))
  5942  		v0.AddArg(x)
  5943  		v.AddArg2(v0, x)
  5944  		return true
  5945  	}
  5946  	// match: (MULLconst [c] x)
  5947  	// cond: isPowerOfTwo32(c-2) && c >= 34
  5948  	// result: (LEAL2 (SHLLconst <v.Type> [int32(log32(c-2))] x) x)
  5949  	for {
  5950  		c := auxIntToInt32(v.AuxInt)
  5951  		x := v_0
  5952  		if !(isPowerOfTwo32(c-2) && c >= 34) {
  5953  			break
  5954  		}
  5955  		v.reset(Op386LEAL2)
  5956  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5957  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 2)))
  5958  		v0.AddArg(x)
  5959  		v.AddArg2(v0, x)
  5960  		return true
  5961  	}
  5962  	// match: (MULLconst [c] x)
  5963  	// cond: isPowerOfTwo32(c-4) && c >= 68
  5964  	// result: (LEAL4 (SHLLconst <v.Type> [int32(log32(c-4))] x) x)
  5965  	for {
  5966  		c := auxIntToInt32(v.AuxInt)
  5967  		x := v_0
  5968  		if !(isPowerOfTwo32(c-4) && c >= 68) {
  5969  			break
  5970  		}
  5971  		v.reset(Op386LEAL4)
  5972  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5973  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 4)))
  5974  		v0.AddArg(x)
  5975  		v.AddArg2(v0, x)
  5976  		return true
  5977  	}
  5978  	// match: (MULLconst [c] x)
  5979  	// cond: isPowerOfTwo32(c-8) && c >= 136
  5980  	// result: (LEAL8 (SHLLconst <v.Type> [int32(log32(c-8))] x) x)
  5981  	for {
  5982  		c := auxIntToInt32(v.AuxInt)
  5983  		x := v_0
  5984  		if !(isPowerOfTwo32(c-8) && c >= 136) {
  5985  			break
  5986  		}
  5987  		v.reset(Op386LEAL8)
  5988  		v0 := b.NewValue0(v.Pos, Op386SHLLconst, v.Type)
  5989  		v0.AuxInt = int32ToAuxInt(int32(log32(c - 8)))
  5990  		v0.AddArg(x)
  5991  		v.AddArg2(v0, x)
  5992  		return true
  5993  	}
  5994  	// match: (MULLconst [c] x)
  5995  	// cond: c%3 == 0 && isPowerOfTwo32(c/3)
  5996  	// result: (SHLLconst [int32(log32(c/3))] (LEAL2 <v.Type> x x))
  5997  	for {
  5998  		c := auxIntToInt32(v.AuxInt)
  5999  		x := v_0
  6000  		if !(c%3 == 0 && isPowerOfTwo32(c/3)) {
  6001  			break
  6002  		}
  6003  		v.reset(Op386SHLLconst)
  6004  		v.AuxInt = int32ToAuxInt(int32(log32(c / 3)))
  6005  		v0 := b.NewValue0(v.Pos, Op386LEAL2, v.Type)
  6006  		v0.AddArg2(x, x)
  6007  		v.AddArg(v0)
  6008  		return true
  6009  	}
  6010  	// match: (MULLconst [c] x)
  6011  	// cond: c%5 == 0 && isPowerOfTwo32(c/5)
  6012  	// result: (SHLLconst [int32(log32(c/5))] (LEAL4 <v.Type> x x))
  6013  	for {
  6014  		c := auxIntToInt32(v.AuxInt)
  6015  		x := v_0
  6016  		if !(c%5 == 0 && isPowerOfTwo32(c/5)) {
  6017  			break
  6018  		}
  6019  		v.reset(Op386SHLLconst)
  6020  		v.AuxInt = int32ToAuxInt(int32(log32(c / 5)))
  6021  		v0 := b.NewValue0(v.Pos, Op386LEAL4, v.Type)
  6022  		v0.AddArg2(x, x)
  6023  		v.AddArg(v0)
  6024  		return true
  6025  	}
  6026  	// match: (MULLconst [c] x)
  6027  	// cond: c%9 == 0 && isPowerOfTwo32(c/9)
  6028  	// result: (SHLLconst [int32(log32(c/9))] (LEAL8 <v.Type> x x))
  6029  	for {
  6030  		c := auxIntToInt32(v.AuxInt)
  6031  		x := v_0
  6032  		if !(c%9 == 0 && isPowerOfTwo32(c/9)) {
  6033  			break
  6034  		}
  6035  		v.reset(Op386SHLLconst)
  6036  		v.AuxInt = int32ToAuxInt(int32(log32(c / 9)))
  6037  		v0 := b.NewValue0(v.Pos, Op386LEAL8, v.Type)
  6038  		v0.AddArg2(x, x)
  6039  		v.AddArg(v0)
  6040  		return true
  6041  	}
  6042  	// match: (MULLconst [c] (MOVLconst [d]))
  6043  	// result: (MOVLconst [c*d])
  6044  	for {
  6045  		c := auxIntToInt32(v.AuxInt)
  6046  		if v_0.Op != Op386MOVLconst {
  6047  			break
  6048  		}
  6049  		d := auxIntToInt32(v_0.AuxInt)
  6050  		v.reset(Op386MOVLconst)
  6051  		v.AuxInt = int32ToAuxInt(c * d)
  6052  		return true
  6053  	}
  6054  	return false
  6055  }
  6056  func rewriteValue386_Op386MULLload(v *Value) bool {
  6057  	v_2 := v.Args[2]
  6058  	v_1 := v.Args[1]
  6059  	v_0 := v.Args[0]
  6060  	b := v.Block
  6061  	config := b.Func.Config
  6062  	// match: (MULLload [off1] {sym} val (ADDLconst [off2] base) mem)
  6063  	// cond: is32Bit(int64(off1)+int64(off2))
  6064  	// result: (MULLload [off1+off2] {sym} val base mem)
  6065  	for {
  6066  		off1 := auxIntToInt32(v.AuxInt)
  6067  		sym := auxToSym(v.Aux)
  6068  		val := v_0
  6069  		if v_1.Op != Op386ADDLconst {
  6070  			break
  6071  		}
  6072  		off2 := auxIntToInt32(v_1.AuxInt)
  6073  		base := v_1.Args[0]
  6074  		mem := v_2
  6075  		if !(is32Bit(int64(off1) + int64(off2))) {
  6076  			break
  6077  		}
  6078  		v.reset(Op386MULLload)
  6079  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6080  		v.Aux = symToAux(sym)
  6081  		v.AddArg3(val, base, mem)
  6082  		return true
  6083  	}
  6084  	// match: (MULLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6085  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6086  	// result: (MULLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6087  	for {
  6088  		off1 := auxIntToInt32(v.AuxInt)
  6089  		sym1 := auxToSym(v.Aux)
  6090  		val := v_0
  6091  		if v_1.Op != Op386LEAL {
  6092  			break
  6093  		}
  6094  		off2 := auxIntToInt32(v_1.AuxInt)
  6095  		sym2 := auxToSym(v_1.Aux)
  6096  		base := v_1.Args[0]
  6097  		mem := v_2
  6098  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6099  			break
  6100  		}
  6101  		v.reset(Op386MULLload)
  6102  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6103  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6104  		v.AddArg3(val, base, mem)
  6105  		return true
  6106  	}
  6107  	return false
  6108  }
  6109  func rewriteValue386_Op386MULSD(v *Value) bool {
  6110  	v_1 := v.Args[1]
  6111  	v_0 := v.Args[0]
  6112  	// match: (MULSD x l:(MOVSDload [off] {sym} ptr mem))
  6113  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  6114  	// result: (MULSDload x [off] {sym} ptr mem)
  6115  	for {
  6116  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6117  			x := v_0
  6118  			l := v_1
  6119  			if l.Op != Op386MOVSDload {
  6120  				continue
  6121  			}
  6122  			off := auxIntToInt32(l.AuxInt)
  6123  			sym := auxToSym(l.Aux)
  6124  			mem := l.Args[1]
  6125  			ptr := l.Args[0]
  6126  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  6127  				continue
  6128  			}
  6129  			v.reset(Op386MULSDload)
  6130  			v.AuxInt = int32ToAuxInt(off)
  6131  			v.Aux = symToAux(sym)
  6132  			v.AddArg3(x, ptr, mem)
  6133  			return true
  6134  		}
  6135  		break
  6136  	}
  6137  	return false
  6138  }
  6139  func rewriteValue386_Op386MULSDload(v *Value) bool {
  6140  	v_2 := v.Args[2]
  6141  	v_1 := v.Args[1]
  6142  	v_0 := v.Args[0]
  6143  	b := v.Block
  6144  	config := b.Func.Config
  6145  	// match: (MULSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  6146  	// cond: is32Bit(int64(off1)+int64(off2))
  6147  	// result: (MULSDload [off1+off2] {sym} val base mem)
  6148  	for {
  6149  		off1 := auxIntToInt32(v.AuxInt)
  6150  		sym := auxToSym(v.Aux)
  6151  		val := v_0
  6152  		if v_1.Op != Op386ADDLconst {
  6153  			break
  6154  		}
  6155  		off2 := auxIntToInt32(v_1.AuxInt)
  6156  		base := v_1.Args[0]
  6157  		mem := v_2
  6158  		if !(is32Bit(int64(off1) + int64(off2))) {
  6159  			break
  6160  		}
  6161  		v.reset(Op386MULSDload)
  6162  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6163  		v.Aux = symToAux(sym)
  6164  		v.AddArg3(val, base, mem)
  6165  		return true
  6166  	}
  6167  	// match: (MULSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6168  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6169  	// result: (MULSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6170  	for {
  6171  		off1 := auxIntToInt32(v.AuxInt)
  6172  		sym1 := auxToSym(v.Aux)
  6173  		val := v_0
  6174  		if v_1.Op != Op386LEAL {
  6175  			break
  6176  		}
  6177  		off2 := auxIntToInt32(v_1.AuxInt)
  6178  		sym2 := auxToSym(v_1.Aux)
  6179  		base := v_1.Args[0]
  6180  		mem := v_2
  6181  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6182  			break
  6183  		}
  6184  		v.reset(Op386MULSDload)
  6185  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6186  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6187  		v.AddArg3(val, base, mem)
  6188  		return true
  6189  	}
  6190  	return false
  6191  }
  6192  func rewriteValue386_Op386MULSS(v *Value) bool {
  6193  	v_1 := v.Args[1]
  6194  	v_0 := v.Args[0]
  6195  	// match: (MULSS x l:(MOVSSload [off] {sym} ptr mem))
  6196  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  6197  	// result: (MULSSload x [off] {sym} ptr mem)
  6198  	for {
  6199  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6200  			x := v_0
  6201  			l := v_1
  6202  			if l.Op != Op386MOVSSload {
  6203  				continue
  6204  			}
  6205  			off := auxIntToInt32(l.AuxInt)
  6206  			sym := auxToSym(l.Aux)
  6207  			mem := l.Args[1]
  6208  			ptr := l.Args[0]
  6209  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  6210  				continue
  6211  			}
  6212  			v.reset(Op386MULSSload)
  6213  			v.AuxInt = int32ToAuxInt(off)
  6214  			v.Aux = symToAux(sym)
  6215  			v.AddArg3(x, ptr, mem)
  6216  			return true
  6217  		}
  6218  		break
  6219  	}
  6220  	return false
  6221  }
  6222  func rewriteValue386_Op386MULSSload(v *Value) bool {
  6223  	v_2 := v.Args[2]
  6224  	v_1 := v.Args[1]
  6225  	v_0 := v.Args[0]
  6226  	b := v.Block
  6227  	config := b.Func.Config
  6228  	// match: (MULSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  6229  	// cond: is32Bit(int64(off1)+int64(off2))
  6230  	// result: (MULSSload [off1+off2] {sym} val base mem)
  6231  	for {
  6232  		off1 := auxIntToInt32(v.AuxInt)
  6233  		sym := auxToSym(v.Aux)
  6234  		val := v_0
  6235  		if v_1.Op != Op386ADDLconst {
  6236  			break
  6237  		}
  6238  		off2 := auxIntToInt32(v_1.AuxInt)
  6239  		base := v_1.Args[0]
  6240  		mem := v_2
  6241  		if !(is32Bit(int64(off1) + int64(off2))) {
  6242  			break
  6243  		}
  6244  		v.reset(Op386MULSSload)
  6245  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6246  		v.Aux = symToAux(sym)
  6247  		v.AddArg3(val, base, mem)
  6248  		return true
  6249  	}
  6250  	// match: (MULSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6251  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6252  	// result: (MULSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6253  	for {
  6254  		off1 := auxIntToInt32(v.AuxInt)
  6255  		sym1 := auxToSym(v.Aux)
  6256  		val := v_0
  6257  		if v_1.Op != Op386LEAL {
  6258  			break
  6259  		}
  6260  		off2 := auxIntToInt32(v_1.AuxInt)
  6261  		sym2 := auxToSym(v_1.Aux)
  6262  		base := v_1.Args[0]
  6263  		mem := v_2
  6264  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6265  			break
  6266  		}
  6267  		v.reset(Op386MULSSload)
  6268  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6269  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6270  		v.AddArg3(val, base, mem)
  6271  		return true
  6272  	}
  6273  	return false
  6274  }
  6275  func rewriteValue386_Op386NEGL(v *Value) bool {
  6276  	v_0 := v.Args[0]
  6277  	// match: (NEGL (MOVLconst [c]))
  6278  	// result: (MOVLconst [-c])
  6279  	for {
  6280  		if v_0.Op != Op386MOVLconst {
  6281  			break
  6282  		}
  6283  		c := auxIntToInt32(v_0.AuxInt)
  6284  		v.reset(Op386MOVLconst)
  6285  		v.AuxInt = int32ToAuxInt(-c)
  6286  		return true
  6287  	}
  6288  	return false
  6289  }
  6290  func rewriteValue386_Op386NOTL(v *Value) bool {
  6291  	v_0 := v.Args[0]
  6292  	// match: (NOTL (MOVLconst [c]))
  6293  	// result: (MOVLconst [^c])
  6294  	for {
  6295  		if v_0.Op != Op386MOVLconst {
  6296  			break
  6297  		}
  6298  		c := auxIntToInt32(v_0.AuxInt)
  6299  		v.reset(Op386MOVLconst)
  6300  		v.AuxInt = int32ToAuxInt(^c)
  6301  		return true
  6302  	}
  6303  	return false
  6304  }
  6305  func rewriteValue386_Op386ORL(v *Value) bool {
  6306  	v_1 := v.Args[1]
  6307  	v_0 := v.Args[0]
  6308  	b := v.Block
  6309  	typ := &b.Func.Config.Types
  6310  	// match: (ORL x (MOVLconst [c]))
  6311  	// result: (ORLconst [c] x)
  6312  	for {
  6313  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6314  			x := v_0
  6315  			if v_1.Op != Op386MOVLconst {
  6316  				continue
  6317  			}
  6318  			c := auxIntToInt32(v_1.AuxInt)
  6319  			v.reset(Op386ORLconst)
  6320  			v.AuxInt = int32ToAuxInt(c)
  6321  			v.AddArg(x)
  6322  			return true
  6323  		}
  6324  		break
  6325  	}
  6326  	// match: ( ORL (SHLLconst [c] x) (SHRLconst [d] x))
  6327  	// cond: d == 32-c
  6328  	// result: (ROLLconst [c] x)
  6329  	for {
  6330  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6331  			if v_0.Op != Op386SHLLconst {
  6332  				continue
  6333  			}
  6334  			c := auxIntToInt32(v_0.AuxInt)
  6335  			x := v_0.Args[0]
  6336  			if v_1.Op != Op386SHRLconst {
  6337  				continue
  6338  			}
  6339  			d := auxIntToInt32(v_1.AuxInt)
  6340  			if x != v_1.Args[0] || !(d == 32-c) {
  6341  				continue
  6342  			}
  6343  			v.reset(Op386ROLLconst)
  6344  			v.AuxInt = int32ToAuxInt(c)
  6345  			v.AddArg(x)
  6346  			return true
  6347  		}
  6348  		break
  6349  	}
  6350  	// match: ( ORL <t> (SHLLconst x [c]) (SHRWconst x [d]))
  6351  	// cond: c < 16 && d == int16(16-c) && t.Size() == 2
  6352  	// result: (ROLWconst x [int16(c)])
  6353  	for {
  6354  		t := v.Type
  6355  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6356  			if v_0.Op != Op386SHLLconst {
  6357  				continue
  6358  			}
  6359  			c := auxIntToInt32(v_0.AuxInt)
  6360  			x := v_0.Args[0]
  6361  			if v_1.Op != Op386SHRWconst {
  6362  				continue
  6363  			}
  6364  			d := auxIntToInt16(v_1.AuxInt)
  6365  			if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
  6366  				continue
  6367  			}
  6368  			v.reset(Op386ROLWconst)
  6369  			v.AuxInt = int16ToAuxInt(int16(c))
  6370  			v.AddArg(x)
  6371  			return true
  6372  		}
  6373  		break
  6374  	}
  6375  	// match: ( ORL <t> (SHLLconst x [c]) (SHRBconst x [d]))
  6376  	// cond: c < 8 && d == int8(8-c) && t.Size() == 1
  6377  	// result: (ROLBconst x [int8(c)])
  6378  	for {
  6379  		t := v.Type
  6380  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6381  			if v_0.Op != Op386SHLLconst {
  6382  				continue
  6383  			}
  6384  			c := auxIntToInt32(v_0.AuxInt)
  6385  			x := v_0.Args[0]
  6386  			if v_1.Op != Op386SHRBconst {
  6387  				continue
  6388  			}
  6389  			d := auxIntToInt8(v_1.AuxInt)
  6390  			if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
  6391  				continue
  6392  			}
  6393  			v.reset(Op386ROLBconst)
  6394  			v.AuxInt = int8ToAuxInt(int8(c))
  6395  			v.AddArg(x)
  6396  			return true
  6397  		}
  6398  		break
  6399  	}
  6400  	// match: (ORL x l:(MOVLload [off] {sym} ptr mem))
  6401  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  6402  	// result: (ORLload x [off] {sym} ptr mem)
  6403  	for {
  6404  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6405  			x := v_0
  6406  			l := v_1
  6407  			if l.Op != Op386MOVLload {
  6408  				continue
  6409  			}
  6410  			off := auxIntToInt32(l.AuxInt)
  6411  			sym := auxToSym(l.Aux)
  6412  			mem := l.Args[1]
  6413  			ptr := l.Args[0]
  6414  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  6415  				continue
  6416  			}
  6417  			v.reset(Op386ORLload)
  6418  			v.AuxInt = int32ToAuxInt(off)
  6419  			v.Aux = symToAux(sym)
  6420  			v.AddArg3(x, ptr, mem)
  6421  			return true
  6422  		}
  6423  		break
  6424  	}
  6425  	// match: (ORL x x)
  6426  	// result: x
  6427  	for {
  6428  		x := v_0
  6429  		if x != v_1 {
  6430  			break
  6431  		}
  6432  		v.copyOf(x)
  6433  		return true
  6434  	}
  6435  	// match: (ORL x0:(MOVBload [i0] {s} p mem) s0:(SHLLconst [8] x1:(MOVBload [i1] {s} p mem)))
  6436  	// cond: i1 == i0+1 && x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && mergePoint(b,x0,x1) != nil && clobber(x0, x1, s0)
  6437  	// result: @mergePoint(b,x0,x1) (MOVWload [i0] {s} p mem)
  6438  	for {
  6439  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6440  			x0 := v_0
  6441  			if x0.Op != Op386MOVBload {
  6442  				continue
  6443  			}
  6444  			i0 := auxIntToInt32(x0.AuxInt)
  6445  			s := auxToSym(x0.Aux)
  6446  			mem := x0.Args[1]
  6447  			p := x0.Args[0]
  6448  			s0 := v_1
  6449  			if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 8 {
  6450  				continue
  6451  			}
  6452  			x1 := s0.Args[0]
  6453  			if x1.Op != Op386MOVBload {
  6454  				continue
  6455  			}
  6456  			i1 := auxIntToInt32(x1.AuxInt)
  6457  			if auxToSym(x1.Aux) != s {
  6458  				continue
  6459  			}
  6460  			_ = x1.Args[1]
  6461  			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)) {
  6462  				continue
  6463  			}
  6464  			b = mergePoint(b, x0, x1)
  6465  			v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
  6466  			v.copyOf(v0)
  6467  			v0.AuxInt = int32ToAuxInt(i0)
  6468  			v0.Aux = symToAux(s)
  6469  			v0.AddArg2(p, mem)
  6470  			return true
  6471  		}
  6472  		break
  6473  	}
  6474  	// match: (ORL x0:(MOVBload [i] {s} p0 mem) s0:(SHLLconst [8] x1:(MOVBload [i] {s} p1 mem)))
  6475  	// cond: x0.Uses == 1 && x1.Uses == 1 && s0.Uses == 1 && sequentialAddresses(p0, p1, 1) && mergePoint(b,x0,x1) != nil && clobber(x0, x1, s0)
  6476  	// result: @mergePoint(b,x0,x1) (MOVWload [i] {s} p0 mem)
  6477  	for {
  6478  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6479  			x0 := v_0
  6480  			if x0.Op != Op386MOVBload {
  6481  				continue
  6482  			}
  6483  			i := auxIntToInt32(x0.AuxInt)
  6484  			s := auxToSym(x0.Aux)
  6485  			mem := x0.Args[1]
  6486  			p0 := x0.Args[0]
  6487  			s0 := v_1
  6488  			if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 8 {
  6489  				continue
  6490  			}
  6491  			x1 := s0.Args[0]
  6492  			if x1.Op != Op386MOVBload || auxIntToInt32(x1.AuxInt) != i || auxToSym(x1.Aux) != s {
  6493  				continue
  6494  			}
  6495  			_ = x1.Args[1]
  6496  			p1 := x1.Args[0]
  6497  			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)) {
  6498  				continue
  6499  			}
  6500  			b = mergePoint(b, x0, x1)
  6501  			v0 := b.NewValue0(x1.Pos, Op386MOVWload, typ.UInt16)
  6502  			v.copyOf(v0)
  6503  			v0.AuxInt = int32ToAuxInt(i)
  6504  			v0.Aux = symToAux(s)
  6505  			v0.AddArg2(p0, mem)
  6506  			return true
  6507  		}
  6508  		break
  6509  	}
  6510  	// 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)))
  6511  	// 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)
  6512  	// result: @mergePoint(b,x0,x1,x2) (MOVLload [i0] {s} p mem)
  6513  	for {
  6514  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6515  			o0 := v_0
  6516  			if o0.Op != Op386ORL {
  6517  				continue
  6518  			}
  6519  			_ = o0.Args[1]
  6520  			o0_0 := o0.Args[0]
  6521  			o0_1 := o0.Args[1]
  6522  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
  6523  				x0 := o0_0
  6524  				if x0.Op != Op386MOVWload {
  6525  					continue
  6526  				}
  6527  				i0 := auxIntToInt32(x0.AuxInt)
  6528  				s := auxToSym(x0.Aux)
  6529  				mem := x0.Args[1]
  6530  				p := x0.Args[0]
  6531  				s0 := o0_1
  6532  				if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 16 {
  6533  					continue
  6534  				}
  6535  				x1 := s0.Args[0]
  6536  				if x1.Op != Op386MOVBload {
  6537  					continue
  6538  				}
  6539  				i2 := auxIntToInt32(x1.AuxInt)
  6540  				if auxToSym(x1.Aux) != s {
  6541  					continue
  6542  				}
  6543  				_ = x1.Args[1]
  6544  				if p != x1.Args[0] || mem != x1.Args[1] {
  6545  					continue
  6546  				}
  6547  				s1 := v_1
  6548  				if s1.Op != Op386SHLLconst || auxIntToInt32(s1.AuxInt) != 24 {
  6549  					continue
  6550  				}
  6551  				x2 := s1.Args[0]
  6552  				if x2.Op != Op386MOVBload {
  6553  					continue
  6554  				}
  6555  				i3 := auxIntToInt32(x2.AuxInt)
  6556  				if auxToSym(x2.Aux) != s {
  6557  					continue
  6558  				}
  6559  				_ = x2.Args[1]
  6560  				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)) {
  6561  					continue
  6562  				}
  6563  				b = mergePoint(b, x0, x1, x2)
  6564  				v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
  6565  				v.copyOf(v0)
  6566  				v0.AuxInt = int32ToAuxInt(i0)
  6567  				v0.Aux = symToAux(s)
  6568  				v0.AddArg2(p, mem)
  6569  				return true
  6570  			}
  6571  		}
  6572  		break
  6573  	}
  6574  	// 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)))
  6575  	// 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)
  6576  	// result: @mergePoint(b,x0,x1,x2) (MOVLload [i] {s} p0 mem)
  6577  	for {
  6578  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  6579  			o0 := v_0
  6580  			if o0.Op != Op386ORL {
  6581  				continue
  6582  			}
  6583  			_ = o0.Args[1]
  6584  			o0_0 := o0.Args[0]
  6585  			o0_1 := o0.Args[1]
  6586  			for _i1 := 0; _i1 <= 1; _i1, o0_0, o0_1 = _i1+1, o0_1, o0_0 {
  6587  				x0 := o0_0
  6588  				if x0.Op != Op386MOVWload {
  6589  					continue
  6590  				}
  6591  				i := auxIntToInt32(x0.AuxInt)
  6592  				s := auxToSym(x0.Aux)
  6593  				mem := x0.Args[1]
  6594  				p0 := x0.Args[0]
  6595  				s0 := o0_1
  6596  				if s0.Op != Op386SHLLconst || auxIntToInt32(s0.AuxInt) != 16 {
  6597  					continue
  6598  				}
  6599  				x1 := s0.Args[0]
  6600  				if x1.Op != Op386MOVBload || auxIntToInt32(x1.AuxInt) != i || auxToSym(x1.Aux) != s {
  6601  					continue
  6602  				}
  6603  				_ = x1.Args[1]
  6604  				p1 := x1.Args[0]
  6605  				if mem != x1.Args[1] {
  6606  					continue
  6607  				}
  6608  				s1 := v_1
  6609  				if s1.Op != Op386SHLLconst || auxIntToInt32(s1.AuxInt) != 24 {
  6610  					continue
  6611  				}
  6612  				x2 := s1.Args[0]
  6613  				if x2.Op != Op386MOVBload || auxIntToInt32(x2.AuxInt) != i || auxToSym(x2.Aux) != s {
  6614  					continue
  6615  				}
  6616  				_ = x2.Args[1]
  6617  				p2 := x2.Args[0]
  6618  				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)) {
  6619  					continue
  6620  				}
  6621  				b = mergePoint(b, x0, x1, x2)
  6622  				v0 := b.NewValue0(x2.Pos, Op386MOVLload, typ.UInt32)
  6623  				v.copyOf(v0)
  6624  				v0.AuxInt = int32ToAuxInt(i)
  6625  				v0.Aux = symToAux(s)
  6626  				v0.AddArg2(p0, mem)
  6627  				return true
  6628  			}
  6629  		}
  6630  		break
  6631  	}
  6632  	return false
  6633  }
  6634  func rewriteValue386_Op386ORLconst(v *Value) bool {
  6635  	v_0 := v.Args[0]
  6636  	// match: (ORLconst [c] x)
  6637  	// cond: c==0
  6638  	// result: x
  6639  	for {
  6640  		c := auxIntToInt32(v.AuxInt)
  6641  		x := v_0
  6642  		if !(c == 0) {
  6643  			break
  6644  		}
  6645  		v.copyOf(x)
  6646  		return true
  6647  	}
  6648  	// match: (ORLconst [c] _)
  6649  	// cond: c==-1
  6650  	// result: (MOVLconst [-1])
  6651  	for {
  6652  		c := auxIntToInt32(v.AuxInt)
  6653  		if !(c == -1) {
  6654  			break
  6655  		}
  6656  		v.reset(Op386MOVLconst)
  6657  		v.AuxInt = int32ToAuxInt(-1)
  6658  		return true
  6659  	}
  6660  	// match: (ORLconst [c] (MOVLconst [d]))
  6661  	// result: (MOVLconst [c|d])
  6662  	for {
  6663  		c := auxIntToInt32(v.AuxInt)
  6664  		if v_0.Op != Op386MOVLconst {
  6665  			break
  6666  		}
  6667  		d := auxIntToInt32(v_0.AuxInt)
  6668  		v.reset(Op386MOVLconst)
  6669  		v.AuxInt = int32ToAuxInt(c | d)
  6670  		return true
  6671  	}
  6672  	return false
  6673  }
  6674  func rewriteValue386_Op386ORLconstmodify(v *Value) bool {
  6675  	v_1 := v.Args[1]
  6676  	v_0 := v.Args[0]
  6677  	b := v.Block
  6678  	config := b.Func.Config
  6679  	// match: (ORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  6680  	// cond: valoff1.canAdd32(off2)
  6681  	// result: (ORLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  6682  	for {
  6683  		valoff1 := auxIntToValAndOff(v.AuxInt)
  6684  		sym := auxToSym(v.Aux)
  6685  		if v_0.Op != Op386ADDLconst {
  6686  			break
  6687  		}
  6688  		off2 := auxIntToInt32(v_0.AuxInt)
  6689  		base := v_0.Args[0]
  6690  		mem := v_1
  6691  		if !(valoff1.canAdd32(off2)) {
  6692  			break
  6693  		}
  6694  		v.reset(Op386ORLconstmodify)
  6695  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  6696  		v.Aux = symToAux(sym)
  6697  		v.AddArg2(base, mem)
  6698  		return true
  6699  	}
  6700  	// match: (ORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  6701  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6702  	// result: (ORLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  6703  	for {
  6704  		valoff1 := auxIntToValAndOff(v.AuxInt)
  6705  		sym1 := auxToSym(v.Aux)
  6706  		if v_0.Op != Op386LEAL {
  6707  			break
  6708  		}
  6709  		off2 := auxIntToInt32(v_0.AuxInt)
  6710  		sym2 := auxToSym(v_0.Aux)
  6711  		base := v_0.Args[0]
  6712  		mem := v_1
  6713  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6714  			break
  6715  		}
  6716  		v.reset(Op386ORLconstmodify)
  6717  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  6718  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6719  		v.AddArg2(base, mem)
  6720  		return true
  6721  	}
  6722  	return false
  6723  }
  6724  func rewriteValue386_Op386ORLload(v *Value) bool {
  6725  	v_2 := v.Args[2]
  6726  	v_1 := v.Args[1]
  6727  	v_0 := v.Args[0]
  6728  	b := v.Block
  6729  	config := b.Func.Config
  6730  	// match: (ORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  6731  	// cond: is32Bit(int64(off1)+int64(off2))
  6732  	// result: (ORLload [off1+off2] {sym} val base mem)
  6733  	for {
  6734  		off1 := auxIntToInt32(v.AuxInt)
  6735  		sym := auxToSym(v.Aux)
  6736  		val := v_0
  6737  		if v_1.Op != Op386ADDLconst {
  6738  			break
  6739  		}
  6740  		off2 := auxIntToInt32(v_1.AuxInt)
  6741  		base := v_1.Args[0]
  6742  		mem := v_2
  6743  		if !(is32Bit(int64(off1) + int64(off2))) {
  6744  			break
  6745  		}
  6746  		v.reset(Op386ORLload)
  6747  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6748  		v.Aux = symToAux(sym)
  6749  		v.AddArg3(val, base, mem)
  6750  		return true
  6751  	}
  6752  	// match: (ORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  6753  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6754  	// result: (ORLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  6755  	for {
  6756  		off1 := auxIntToInt32(v.AuxInt)
  6757  		sym1 := auxToSym(v.Aux)
  6758  		val := v_0
  6759  		if v_1.Op != Op386LEAL {
  6760  			break
  6761  		}
  6762  		off2 := auxIntToInt32(v_1.AuxInt)
  6763  		sym2 := auxToSym(v_1.Aux)
  6764  		base := v_1.Args[0]
  6765  		mem := v_2
  6766  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6767  			break
  6768  		}
  6769  		v.reset(Op386ORLload)
  6770  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6771  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6772  		v.AddArg3(val, base, mem)
  6773  		return true
  6774  	}
  6775  	return false
  6776  }
  6777  func rewriteValue386_Op386ORLmodify(v *Value) bool {
  6778  	v_2 := v.Args[2]
  6779  	v_1 := v.Args[1]
  6780  	v_0 := v.Args[0]
  6781  	b := v.Block
  6782  	config := b.Func.Config
  6783  	// match: (ORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  6784  	// cond: is32Bit(int64(off1)+int64(off2))
  6785  	// result: (ORLmodify [off1+off2] {sym} base val mem)
  6786  	for {
  6787  		off1 := auxIntToInt32(v.AuxInt)
  6788  		sym := auxToSym(v.Aux)
  6789  		if v_0.Op != Op386ADDLconst {
  6790  			break
  6791  		}
  6792  		off2 := auxIntToInt32(v_0.AuxInt)
  6793  		base := v_0.Args[0]
  6794  		val := v_1
  6795  		mem := v_2
  6796  		if !(is32Bit(int64(off1) + int64(off2))) {
  6797  			break
  6798  		}
  6799  		v.reset(Op386ORLmodify)
  6800  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6801  		v.Aux = symToAux(sym)
  6802  		v.AddArg3(base, val, mem)
  6803  		return true
  6804  	}
  6805  	// match: (ORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  6806  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  6807  	// result: (ORLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  6808  	for {
  6809  		off1 := auxIntToInt32(v.AuxInt)
  6810  		sym1 := auxToSym(v.Aux)
  6811  		if v_0.Op != Op386LEAL {
  6812  			break
  6813  		}
  6814  		off2 := auxIntToInt32(v_0.AuxInt)
  6815  		sym2 := auxToSym(v_0.Aux)
  6816  		base := v_0.Args[0]
  6817  		val := v_1
  6818  		mem := v_2
  6819  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  6820  			break
  6821  		}
  6822  		v.reset(Op386ORLmodify)
  6823  		v.AuxInt = int32ToAuxInt(off1 + off2)
  6824  		v.Aux = symToAux(mergeSym(sym1, sym2))
  6825  		v.AddArg3(base, val, mem)
  6826  		return true
  6827  	}
  6828  	return false
  6829  }
  6830  func rewriteValue386_Op386ROLBconst(v *Value) bool {
  6831  	v_0 := v.Args[0]
  6832  	// match: (ROLBconst [c] (ROLBconst [d] x))
  6833  	// result: (ROLBconst [(c+d)& 7] x)
  6834  	for {
  6835  		c := auxIntToInt8(v.AuxInt)
  6836  		if v_0.Op != Op386ROLBconst {
  6837  			break
  6838  		}
  6839  		d := auxIntToInt8(v_0.AuxInt)
  6840  		x := v_0.Args[0]
  6841  		v.reset(Op386ROLBconst)
  6842  		v.AuxInt = int8ToAuxInt((c + d) & 7)
  6843  		v.AddArg(x)
  6844  		return true
  6845  	}
  6846  	// match: (ROLBconst [0] x)
  6847  	// result: x
  6848  	for {
  6849  		if auxIntToInt8(v.AuxInt) != 0 {
  6850  			break
  6851  		}
  6852  		x := v_0
  6853  		v.copyOf(x)
  6854  		return true
  6855  	}
  6856  	return false
  6857  }
  6858  func rewriteValue386_Op386ROLLconst(v *Value) bool {
  6859  	v_0 := v.Args[0]
  6860  	// match: (ROLLconst [c] (ROLLconst [d] x))
  6861  	// result: (ROLLconst [(c+d)&31] x)
  6862  	for {
  6863  		c := auxIntToInt32(v.AuxInt)
  6864  		if v_0.Op != Op386ROLLconst {
  6865  			break
  6866  		}
  6867  		d := auxIntToInt32(v_0.AuxInt)
  6868  		x := v_0.Args[0]
  6869  		v.reset(Op386ROLLconst)
  6870  		v.AuxInt = int32ToAuxInt((c + d) & 31)
  6871  		v.AddArg(x)
  6872  		return true
  6873  	}
  6874  	// match: (ROLLconst [0] x)
  6875  	// result: x
  6876  	for {
  6877  		if auxIntToInt32(v.AuxInt) != 0 {
  6878  			break
  6879  		}
  6880  		x := v_0
  6881  		v.copyOf(x)
  6882  		return true
  6883  	}
  6884  	return false
  6885  }
  6886  func rewriteValue386_Op386ROLWconst(v *Value) bool {
  6887  	v_0 := v.Args[0]
  6888  	// match: (ROLWconst [c] (ROLWconst [d] x))
  6889  	// result: (ROLWconst [(c+d)&15] x)
  6890  	for {
  6891  		c := auxIntToInt16(v.AuxInt)
  6892  		if v_0.Op != Op386ROLWconst {
  6893  			break
  6894  		}
  6895  		d := auxIntToInt16(v_0.AuxInt)
  6896  		x := v_0.Args[0]
  6897  		v.reset(Op386ROLWconst)
  6898  		v.AuxInt = int16ToAuxInt((c + d) & 15)
  6899  		v.AddArg(x)
  6900  		return true
  6901  	}
  6902  	// match: (ROLWconst [0] x)
  6903  	// result: x
  6904  	for {
  6905  		if auxIntToInt16(v.AuxInt) != 0 {
  6906  			break
  6907  		}
  6908  		x := v_0
  6909  		v.copyOf(x)
  6910  		return true
  6911  	}
  6912  	return false
  6913  }
  6914  func rewriteValue386_Op386SARB(v *Value) bool {
  6915  	v_1 := v.Args[1]
  6916  	v_0 := v.Args[0]
  6917  	// match: (SARB x (MOVLconst [c]))
  6918  	// result: (SARBconst [int8(min(int64(c&31),7))] x)
  6919  	for {
  6920  		x := v_0
  6921  		if v_1.Op != Op386MOVLconst {
  6922  			break
  6923  		}
  6924  		c := auxIntToInt32(v_1.AuxInt)
  6925  		v.reset(Op386SARBconst)
  6926  		v.AuxInt = int8ToAuxInt(int8(min(int64(c&31), 7)))
  6927  		v.AddArg(x)
  6928  		return true
  6929  	}
  6930  	return false
  6931  }
  6932  func rewriteValue386_Op386SARBconst(v *Value) bool {
  6933  	v_0 := v.Args[0]
  6934  	// match: (SARBconst x [0])
  6935  	// result: x
  6936  	for {
  6937  		if auxIntToInt8(v.AuxInt) != 0 {
  6938  			break
  6939  		}
  6940  		x := v_0
  6941  		v.copyOf(x)
  6942  		return true
  6943  	}
  6944  	// match: (SARBconst [c] (MOVLconst [d]))
  6945  	// result: (MOVLconst [d>>uint64(c)])
  6946  	for {
  6947  		c := auxIntToInt8(v.AuxInt)
  6948  		if v_0.Op != Op386MOVLconst {
  6949  			break
  6950  		}
  6951  		d := auxIntToInt32(v_0.AuxInt)
  6952  		v.reset(Op386MOVLconst)
  6953  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  6954  		return true
  6955  	}
  6956  	return false
  6957  }
  6958  func rewriteValue386_Op386SARL(v *Value) bool {
  6959  	v_1 := v.Args[1]
  6960  	v_0 := v.Args[0]
  6961  	// match: (SARL x (MOVLconst [c]))
  6962  	// result: (SARLconst [c&31] x)
  6963  	for {
  6964  		x := v_0
  6965  		if v_1.Op != Op386MOVLconst {
  6966  			break
  6967  		}
  6968  		c := auxIntToInt32(v_1.AuxInt)
  6969  		v.reset(Op386SARLconst)
  6970  		v.AuxInt = int32ToAuxInt(c & 31)
  6971  		v.AddArg(x)
  6972  		return true
  6973  	}
  6974  	// match: (SARL x (ANDLconst [31] y))
  6975  	// result: (SARL x y)
  6976  	for {
  6977  		x := v_0
  6978  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  6979  			break
  6980  		}
  6981  		y := v_1.Args[0]
  6982  		v.reset(Op386SARL)
  6983  		v.AddArg2(x, y)
  6984  		return true
  6985  	}
  6986  	return false
  6987  }
  6988  func rewriteValue386_Op386SARLconst(v *Value) bool {
  6989  	v_0 := v.Args[0]
  6990  	// match: (SARLconst x [0])
  6991  	// result: x
  6992  	for {
  6993  		if auxIntToInt32(v.AuxInt) != 0 {
  6994  			break
  6995  		}
  6996  		x := v_0
  6997  		v.copyOf(x)
  6998  		return true
  6999  	}
  7000  	// match: (SARLconst [c] (MOVLconst [d]))
  7001  	// result: (MOVLconst [d>>uint64(c)])
  7002  	for {
  7003  		c := auxIntToInt32(v.AuxInt)
  7004  		if v_0.Op != Op386MOVLconst {
  7005  			break
  7006  		}
  7007  		d := auxIntToInt32(v_0.AuxInt)
  7008  		v.reset(Op386MOVLconst)
  7009  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  7010  		return true
  7011  	}
  7012  	return false
  7013  }
  7014  func rewriteValue386_Op386SARW(v *Value) bool {
  7015  	v_1 := v.Args[1]
  7016  	v_0 := v.Args[0]
  7017  	// match: (SARW x (MOVLconst [c]))
  7018  	// result: (SARWconst [int16(min(int64(c&31),15))] x)
  7019  	for {
  7020  		x := v_0
  7021  		if v_1.Op != Op386MOVLconst {
  7022  			break
  7023  		}
  7024  		c := auxIntToInt32(v_1.AuxInt)
  7025  		v.reset(Op386SARWconst)
  7026  		v.AuxInt = int16ToAuxInt(int16(min(int64(c&31), 15)))
  7027  		v.AddArg(x)
  7028  		return true
  7029  	}
  7030  	return false
  7031  }
  7032  func rewriteValue386_Op386SARWconst(v *Value) bool {
  7033  	v_0 := v.Args[0]
  7034  	// match: (SARWconst x [0])
  7035  	// result: x
  7036  	for {
  7037  		if auxIntToInt16(v.AuxInt) != 0 {
  7038  			break
  7039  		}
  7040  		x := v_0
  7041  		v.copyOf(x)
  7042  		return true
  7043  	}
  7044  	// match: (SARWconst [c] (MOVLconst [d]))
  7045  	// result: (MOVLconst [d>>uint64(c)])
  7046  	for {
  7047  		c := auxIntToInt16(v.AuxInt)
  7048  		if v_0.Op != Op386MOVLconst {
  7049  			break
  7050  		}
  7051  		d := auxIntToInt32(v_0.AuxInt)
  7052  		v.reset(Op386MOVLconst)
  7053  		v.AuxInt = int32ToAuxInt(d >> uint64(c))
  7054  		return true
  7055  	}
  7056  	return false
  7057  }
  7058  func rewriteValue386_Op386SBBL(v *Value) bool {
  7059  	v_2 := v.Args[2]
  7060  	v_1 := v.Args[1]
  7061  	v_0 := v.Args[0]
  7062  	// match: (SBBL x (MOVLconst [c]) f)
  7063  	// result: (SBBLconst [c] x f)
  7064  	for {
  7065  		x := v_0
  7066  		if v_1.Op != Op386MOVLconst {
  7067  			break
  7068  		}
  7069  		c := auxIntToInt32(v_1.AuxInt)
  7070  		f := v_2
  7071  		v.reset(Op386SBBLconst)
  7072  		v.AuxInt = int32ToAuxInt(c)
  7073  		v.AddArg2(x, f)
  7074  		return true
  7075  	}
  7076  	return false
  7077  }
  7078  func rewriteValue386_Op386SBBLcarrymask(v *Value) bool {
  7079  	v_0 := v.Args[0]
  7080  	// match: (SBBLcarrymask (FlagEQ))
  7081  	// result: (MOVLconst [0])
  7082  	for {
  7083  		if v_0.Op != Op386FlagEQ {
  7084  			break
  7085  		}
  7086  		v.reset(Op386MOVLconst)
  7087  		v.AuxInt = int32ToAuxInt(0)
  7088  		return true
  7089  	}
  7090  	// match: (SBBLcarrymask (FlagLT_ULT))
  7091  	// result: (MOVLconst [-1])
  7092  	for {
  7093  		if v_0.Op != Op386FlagLT_ULT {
  7094  			break
  7095  		}
  7096  		v.reset(Op386MOVLconst)
  7097  		v.AuxInt = int32ToAuxInt(-1)
  7098  		return true
  7099  	}
  7100  	// match: (SBBLcarrymask (FlagLT_UGT))
  7101  	// result: (MOVLconst [0])
  7102  	for {
  7103  		if v_0.Op != Op386FlagLT_UGT {
  7104  			break
  7105  		}
  7106  		v.reset(Op386MOVLconst)
  7107  		v.AuxInt = int32ToAuxInt(0)
  7108  		return true
  7109  	}
  7110  	// match: (SBBLcarrymask (FlagGT_ULT))
  7111  	// result: (MOVLconst [-1])
  7112  	for {
  7113  		if v_0.Op != Op386FlagGT_ULT {
  7114  			break
  7115  		}
  7116  		v.reset(Op386MOVLconst)
  7117  		v.AuxInt = int32ToAuxInt(-1)
  7118  		return true
  7119  	}
  7120  	// match: (SBBLcarrymask (FlagGT_UGT))
  7121  	// result: (MOVLconst [0])
  7122  	for {
  7123  		if v_0.Op != Op386FlagGT_UGT {
  7124  			break
  7125  		}
  7126  		v.reset(Op386MOVLconst)
  7127  		v.AuxInt = int32ToAuxInt(0)
  7128  		return true
  7129  	}
  7130  	return false
  7131  }
  7132  func rewriteValue386_Op386SETA(v *Value) bool {
  7133  	v_0 := v.Args[0]
  7134  	// match: (SETA (InvertFlags x))
  7135  	// result: (SETB x)
  7136  	for {
  7137  		if v_0.Op != Op386InvertFlags {
  7138  			break
  7139  		}
  7140  		x := v_0.Args[0]
  7141  		v.reset(Op386SETB)
  7142  		v.AddArg(x)
  7143  		return true
  7144  	}
  7145  	// match: (SETA (FlagEQ))
  7146  	// result: (MOVLconst [0])
  7147  	for {
  7148  		if v_0.Op != Op386FlagEQ {
  7149  			break
  7150  		}
  7151  		v.reset(Op386MOVLconst)
  7152  		v.AuxInt = int32ToAuxInt(0)
  7153  		return true
  7154  	}
  7155  	// match: (SETA (FlagLT_ULT))
  7156  	// result: (MOVLconst [0])
  7157  	for {
  7158  		if v_0.Op != Op386FlagLT_ULT {
  7159  			break
  7160  		}
  7161  		v.reset(Op386MOVLconst)
  7162  		v.AuxInt = int32ToAuxInt(0)
  7163  		return true
  7164  	}
  7165  	// match: (SETA (FlagLT_UGT))
  7166  	// result: (MOVLconst [1])
  7167  	for {
  7168  		if v_0.Op != Op386FlagLT_UGT {
  7169  			break
  7170  		}
  7171  		v.reset(Op386MOVLconst)
  7172  		v.AuxInt = int32ToAuxInt(1)
  7173  		return true
  7174  	}
  7175  	// match: (SETA (FlagGT_ULT))
  7176  	// result: (MOVLconst [0])
  7177  	for {
  7178  		if v_0.Op != Op386FlagGT_ULT {
  7179  			break
  7180  		}
  7181  		v.reset(Op386MOVLconst)
  7182  		v.AuxInt = int32ToAuxInt(0)
  7183  		return true
  7184  	}
  7185  	// match: (SETA (FlagGT_UGT))
  7186  	// result: (MOVLconst [1])
  7187  	for {
  7188  		if v_0.Op != Op386FlagGT_UGT {
  7189  			break
  7190  		}
  7191  		v.reset(Op386MOVLconst)
  7192  		v.AuxInt = int32ToAuxInt(1)
  7193  		return true
  7194  	}
  7195  	return false
  7196  }
  7197  func rewriteValue386_Op386SETAE(v *Value) bool {
  7198  	v_0 := v.Args[0]
  7199  	// match: (SETAE (InvertFlags x))
  7200  	// result: (SETBE x)
  7201  	for {
  7202  		if v_0.Op != Op386InvertFlags {
  7203  			break
  7204  		}
  7205  		x := v_0.Args[0]
  7206  		v.reset(Op386SETBE)
  7207  		v.AddArg(x)
  7208  		return true
  7209  	}
  7210  	// match: (SETAE (FlagEQ))
  7211  	// result: (MOVLconst [1])
  7212  	for {
  7213  		if v_0.Op != Op386FlagEQ {
  7214  			break
  7215  		}
  7216  		v.reset(Op386MOVLconst)
  7217  		v.AuxInt = int32ToAuxInt(1)
  7218  		return true
  7219  	}
  7220  	// match: (SETAE (FlagLT_ULT))
  7221  	// result: (MOVLconst [0])
  7222  	for {
  7223  		if v_0.Op != Op386FlagLT_ULT {
  7224  			break
  7225  		}
  7226  		v.reset(Op386MOVLconst)
  7227  		v.AuxInt = int32ToAuxInt(0)
  7228  		return true
  7229  	}
  7230  	// match: (SETAE (FlagLT_UGT))
  7231  	// result: (MOVLconst [1])
  7232  	for {
  7233  		if v_0.Op != Op386FlagLT_UGT {
  7234  			break
  7235  		}
  7236  		v.reset(Op386MOVLconst)
  7237  		v.AuxInt = int32ToAuxInt(1)
  7238  		return true
  7239  	}
  7240  	// match: (SETAE (FlagGT_ULT))
  7241  	// result: (MOVLconst [0])
  7242  	for {
  7243  		if v_0.Op != Op386FlagGT_ULT {
  7244  			break
  7245  		}
  7246  		v.reset(Op386MOVLconst)
  7247  		v.AuxInt = int32ToAuxInt(0)
  7248  		return true
  7249  	}
  7250  	// match: (SETAE (FlagGT_UGT))
  7251  	// result: (MOVLconst [1])
  7252  	for {
  7253  		if v_0.Op != Op386FlagGT_UGT {
  7254  			break
  7255  		}
  7256  		v.reset(Op386MOVLconst)
  7257  		v.AuxInt = int32ToAuxInt(1)
  7258  		return true
  7259  	}
  7260  	return false
  7261  }
  7262  func rewriteValue386_Op386SETB(v *Value) bool {
  7263  	v_0 := v.Args[0]
  7264  	// match: (SETB (InvertFlags x))
  7265  	// result: (SETA x)
  7266  	for {
  7267  		if v_0.Op != Op386InvertFlags {
  7268  			break
  7269  		}
  7270  		x := v_0.Args[0]
  7271  		v.reset(Op386SETA)
  7272  		v.AddArg(x)
  7273  		return true
  7274  	}
  7275  	// match: (SETB (FlagEQ))
  7276  	// result: (MOVLconst [0])
  7277  	for {
  7278  		if v_0.Op != Op386FlagEQ {
  7279  			break
  7280  		}
  7281  		v.reset(Op386MOVLconst)
  7282  		v.AuxInt = int32ToAuxInt(0)
  7283  		return true
  7284  	}
  7285  	// match: (SETB (FlagLT_ULT))
  7286  	// result: (MOVLconst [1])
  7287  	for {
  7288  		if v_0.Op != Op386FlagLT_ULT {
  7289  			break
  7290  		}
  7291  		v.reset(Op386MOVLconst)
  7292  		v.AuxInt = int32ToAuxInt(1)
  7293  		return true
  7294  	}
  7295  	// match: (SETB (FlagLT_UGT))
  7296  	// result: (MOVLconst [0])
  7297  	for {
  7298  		if v_0.Op != Op386FlagLT_UGT {
  7299  			break
  7300  		}
  7301  		v.reset(Op386MOVLconst)
  7302  		v.AuxInt = int32ToAuxInt(0)
  7303  		return true
  7304  	}
  7305  	// match: (SETB (FlagGT_ULT))
  7306  	// result: (MOVLconst [1])
  7307  	for {
  7308  		if v_0.Op != Op386FlagGT_ULT {
  7309  			break
  7310  		}
  7311  		v.reset(Op386MOVLconst)
  7312  		v.AuxInt = int32ToAuxInt(1)
  7313  		return true
  7314  	}
  7315  	// match: (SETB (FlagGT_UGT))
  7316  	// result: (MOVLconst [0])
  7317  	for {
  7318  		if v_0.Op != Op386FlagGT_UGT {
  7319  			break
  7320  		}
  7321  		v.reset(Op386MOVLconst)
  7322  		v.AuxInt = int32ToAuxInt(0)
  7323  		return true
  7324  	}
  7325  	return false
  7326  }
  7327  func rewriteValue386_Op386SETBE(v *Value) bool {
  7328  	v_0 := v.Args[0]
  7329  	// match: (SETBE (InvertFlags x))
  7330  	// result: (SETAE x)
  7331  	for {
  7332  		if v_0.Op != Op386InvertFlags {
  7333  			break
  7334  		}
  7335  		x := v_0.Args[0]
  7336  		v.reset(Op386SETAE)
  7337  		v.AddArg(x)
  7338  		return true
  7339  	}
  7340  	// match: (SETBE (FlagEQ))
  7341  	// result: (MOVLconst [1])
  7342  	for {
  7343  		if v_0.Op != Op386FlagEQ {
  7344  			break
  7345  		}
  7346  		v.reset(Op386MOVLconst)
  7347  		v.AuxInt = int32ToAuxInt(1)
  7348  		return true
  7349  	}
  7350  	// match: (SETBE (FlagLT_ULT))
  7351  	// result: (MOVLconst [1])
  7352  	for {
  7353  		if v_0.Op != Op386FlagLT_ULT {
  7354  			break
  7355  		}
  7356  		v.reset(Op386MOVLconst)
  7357  		v.AuxInt = int32ToAuxInt(1)
  7358  		return true
  7359  	}
  7360  	// match: (SETBE (FlagLT_UGT))
  7361  	// result: (MOVLconst [0])
  7362  	for {
  7363  		if v_0.Op != Op386FlagLT_UGT {
  7364  			break
  7365  		}
  7366  		v.reset(Op386MOVLconst)
  7367  		v.AuxInt = int32ToAuxInt(0)
  7368  		return true
  7369  	}
  7370  	// match: (SETBE (FlagGT_ULT))
  7371  	// result: (MOVLconst [1])
  7372  	for {
  7373  		if v_0.Op != Op386FlagGT_ULT {
  7374  			break
  7375  		}
  7376  		v.reset(Op386MOVLconst)
  7377  		v.AuxInt = int32ToAuxInt(1)
  7378  		return true
  7379  	}
  7380  	// match: (SETBE (FlagGT_UGT))
  7381  	// result: (MOVLconst [0])
  7382  	for {
  7383  		if v_0.Op != Op386FlagGT_UGT {
  7384  			break
  7385  		}
  7386  		v.reset(Op386MOVLconst)
  7387  		v.AuxInt = int32ToAuxInt(0)
  7388  		return true
  7389  	}
  7390  	return false
  7391  }
  7392  func rewriteValue386_Op386SETEQ(v *Value) bool {
  7393  	v_0 := v.Args[0]
  7394  	// match: (SETEQ (InvertFlags x))
  7395  	// result: (SETEQ x)
  7396  	for {
  7397  		if v_0.Op != Op386InvertFlags {
  7398  			break
  7399  		}
  7400  		x := v_0.Args[0]
  7401  		v.reset(Op386SETEQ)
  7402  		v.AddArg(x)
  7403  		return true
  7404  	}
  7405  	// match: (SETEQ (FlagEQ))
  7406  	// result: (MOVLconst [1])
  7407  	for {
  7408  		if v_0.Op != Op386FlagEQ {
  7409  			break
  7410  		}
  7411  		v.reset(Op386MOVLconst)
  7412  		v.AuxInt = int32ToAuxInt(1)
  7413  		return true
  7414  	}
  7415  	// match: (SETEQ (FlagLT_ULT))
  7416  	// result: (MOVLconst [0])
  7417  	for {
  7418  		if v_0.Op != Op386FlagLT_ULT {
  7419  			break
  7420  		}
  7421  		v.reset(Op386MOVLconst)
  7422  		v.AuxInt = int32ToAuxInt(0)
  7423  		return true
  7424  	}
  7425  	// match: (SETEQ (FlagLT_UGT))
  7426  	// result: (MOVLconst [0])
  7427  	for {
  7428  		if v_0.Op != Op386FlagLT_UGT {
  7429  			break
  7430  		}
  7431  		v.reset(Op386MOVLconst)
  7432  		v.AuxInt = int32ToAuxInt(0)
  7433  		return true
  7434  	}
  7435  	// match: (SETEQ (FlagGT_ULT))
  7436  	// result: (MOVLconst [0])
  7437  	for {
  7438  		if v_0.Op != Op386FlagGT_ULT {
  7439  			break
  7440  		}
  7441  		v.reset(Op386MOVLconst)
  7442  		v.AuxInt = int32ToAuxInt(0)
  7443  		return true
  7444  	}
  7445  	// match: (SETEQ (FlagGT_UGT))
  7446  	// result: (MOVLconst [0])
  7447  	for {
  7448  		if v_0.Op != Op386FlagGT_UGT {
  7449  			break
  7450  		}
  7451  		v.reset(Op386MOVLconst)
  7452  		v.AuxInt = int32ToAuxInt(0)
  7453  		return true
  7454  	}
  7455  	return false
  7456  }
  7457  func rewriteValue386_Op386SETG(v *Value) bool {
  7458  	v_0 := v.Args[0]
  7459  	// match: (SETG (InvertFlags x))
  7460  	// result: (SETL x)
  7461  	for {
  7462  		if v_0.Op != Op386InvertFlags {
  7463  			break
  7464  		}
  7465  		x := v_0.Args[0]
  7466  		v.reset(Op386SETL)
  7467  		v.AddArg(x)
  7468  		return true
  7469  	}
  7470  	// match: (SETG (FlagEQ))
  7471  	// result: (MOVLconst [0])
  7472  	for {
  7473  		if v_0.Op != Op386FlagEQ {
  7474  			break
  7475  		}
  7476  		v.reset(Op386MOVLconst)
  7477  		v.AuxInt = int32ToAuxInt(0)
  7478  		return true
  7479  	}
  7480  	// match: (SETG (FlagLT_ULT))
  7481  	// result: (MOVLconst [0])
  7482  	for {
  7483  		if v_0.Op != Op386FlagLT_ULT {
  7484  			break
  7485  		}
  7486  		v.reset(Op386MOVLconst)
  7487  		v.AuxInt = int32ToAuxInt(0)
  7488  		return true
  7489  	}
  7490  	// match: (SETG (FlagLT_UGT))
  7491  	// result: (MOVLconst [0])
  7492  	for {
  7493  		if v_0.Op != Op386FlagLT_UGT {
  7494  			break
  7495  		}
  7496  		v.reset(Op386MOVLconst)
  7497  		v.AuxInt = int32ToAuxInt(0)
  7498  		return true
  7499  	}
  7500  	// match: (SETG (FlagGT_ULT))
  7501  	// result: (MOVLconst [1])
  7502  	for {
  7503  		if v_0.Op != Op386FlagGT_ULT {
  7504  			break
  7505  		}
  7506  		v.reset(Op386MOVLconst)
  7507  		v.AuxInt = int32ToAuxInt(1)
  7508  		return true
  7509  	}
  7510  	// match: (SETG (FlagGT_UGT))
  7511  	// result: (MOVLconst [1])
  7512  	for {
  7513  		if v_0.Op != Op386FlagGT_UGT {
  7514  			break
  7515  		}
  7516  		v.reset(Op386MOVLconst)
  7517  		v.AuxInt = int32ToAuxInt(1)
  7518  		return true
  7519  	}
  7520  	return false
  7521  }
  7522  func rewriteValue386_Op386SETGE(v *Value) bool {
  7523  	v_0 := v.Args[0]
  7524  	// match: (SETGE (InvertFlags x))
  7525  	// result: (SETLE x)
  7526  	for {
  7527  		if v_0.Op != Op386InvertFlags {
  7528  			break
  7529  		}
  7530  		x := v_0.Args[0]
  7531  		v.reset(Op386SETLE)
  7532  		v.AddArg(x)
  7533  		return true
  7534  	}
  7535  	// match: (SETGE (FlagEQ))
  7536  	// result: (MOVLconst [1])
  7537  	for {
  7538  		if v_0.Op != Op386FlagEQ {
  7539  			break
  7540  		}
  7541  		v.reset(Op386MOVLconst)
  7542  		v.AuxInt = int32ToAuxInt(1)
  7543  		return true
  7544  	}
  7545  	// match: (SETGE (FlagLT_ULT))
  7546  	// result: (MOVLconst [0])
  7547  	for {
  7548  		if v_0.Op != Op386FlagLT_ULT {
  7549  			break
  7550  		}
  7551  		v.reset(Op386MOVLconst)
  7552  		v.AuxInt = int32ToAuxInt(0)
  7553  		return true
  7554  	}
  7555  	// match: (SETGE (FlagLT_UGT))
  7556  	// result: (MOVLconst [0])
  7557  	for {
  7558  		if v_0.Op != Op386FlagLT_UGT {
  7559  			break
  7560  		}
  7561  		v.reset(Op386MOVLconst)
  7562  		v.AuxInt = int32ToAuxInt(0)
  7563  		return true
  7564  	}
  7565  	// match: (SETGE (FlagGT_ULT))
  7566  	// result: (MOVLconst [1])
  7567  	for {
  7568  		if v_0.Op != Op386FlagGT_ULT {
  7569  			break
  7570  		}
  7571  		v.reset(Op386MOVLconst)
  7572  		v.AuxInt = int32ToAuxInt(1)
  7573  		return true
  7574  	}
  7575  	// match: (SETGE (FlagGT_UGT))
  7576  	// result: (MOVLconst [1])
  7577  	for {
  7578  		if v_0.Op != Op386FlagGT_UGT {
  7579  			break
  7580  		}
  7581  		v.reset(Op386MOVLconst)
  7582  		v.AuxInt = int32ToAuxInt(1)
  7583  		return true
  7584  	}
  7585  	return false
  7586  }
  7587  func rewriteValue386_Op386SETL(v *Value) bool {
  7588  	v_0 := v.Args[0]
  7589  	// match: (SETL (InvertFlags x))
  7590  	// result: (SETG x)
  7591  	for {
  7592  		if v_0.Op != Op386InvertFlags {
  7593  			break
  7594  		}
  7595  		x := v_0.Args[0]
  7596  		v.reset(Op386SETG)
  7597  		v.AddArg(x)
  7598  		return true
  7599  	}
  7600  	// match: (SETL (FlagEQ))
  7601  	// result: (MOVLconst [0])
  7602  	for {
  7603  		if v_0.Op != Op386FlagEQ {
  7604  			break
  7605  		}
  7606  		v.reset(Op386MOVLconst)
  7607  		v.AuxInt = int32ToAuxInt(0)
  7608  		return true
  7609  	}
  7610  	// match: (SETL (FlagLT_ULT))
  7611  	// result: (MOVLconst [1])
  7612  	for {
  7613  		if v_0.Op != Op386FlagLT_ULT {
  7614  			break
  7615  		}
  7616  		v.reset(Op386MOVLconst)
  7617  		v.AuxInt = int32ToAuxInt(1)
  7618  		return true
  7619  	}
  7620  	// match: (SETL (FlagLT_UGT))
  7621  	// result: (MOVLconst [1])
  7622  	for {
  7623  		if v_0.Op != Op386FlagLT_UGT {
  7624  			break
  7625  		}
  7626  		v.reset(Op386MOVLconst)
  7627  		v.AuxInt = int32ToAuxInt(1)
  7628  		return true
  7629  	}
  7630  	// match: (SETL (FlagGT_ULT))
  7631  	// result: (MOVLconst [0])
  7632  	for {
  7633  		if v_0.Op != Op386FlagGT_ULT {
  7634  			break
  7635  		}
  7636  		v.reset(Op386MOVLconst)
  7637  		v.AuxInt = int32ToAuxInt(0)
  7638  		return true
  7639  	}
  7640  	// match: (SETL (FlagGT_UGT))
  7641  	// result: (MOVLconst [0])
  7642  	for {
  7643  		if v_0.Op != Op386FlagGT_UGT {
  7644  			break
  7645  		}
  7646  		v.reset(Op386MOVLconst)
  7647  		v.AuxInt = int32ToAuxInt(0)
  7648  		return true
  7649  	}
  7650  	return false
  7651  }
  7652  func rewriteValue386_Op386SETLE(v *Value) bool {
  7653  	v_0 := v.Args[0]
  7654  	// match: (SETLE (InvertFlags x))
  7655  	// result: (SETGE x)
  7656  	for {
  7657  		if v_0.Op != Op386InvertFlags {
  7658  			break
  7659  		}
  7660  		x := v_0.Args[0]
  7661  		v.reset(Op386SETGE)
  7662  		v.AddArg(x)
  7663  		return true
  7664  	}
  7665  	// match: (SETLE (FlagEQ))
  7666  	// result: (MOVLconst [1])
  7667  	for {
  7668  		if v_0.Op != Op386FlagEQ {
  7669  			break
  7670  		}
  7671  		v.reset(Op386MOVLconst)
  7672  		v.AuxInt = int32ToAuxInt(1)
  7673  		return true
  7674  	}
  7675  	// match: (SETLE (FlagLT_ULT))
  7676  	// result: (MOVLconst [1])
  7677  	for {
  7678  		if v_0.Op != Op386FlagLT_ULT {
  7679  			break
  7680  		}
  7681  		v.reset(Op386MOVLconst)
  7682  		v.AuxInt = int32ToAuxInt(1)
  7683  		return true
  7684  	}
  7685  	// match: (SETLE (FlagLT_UGT))
  7686  	// result: (MOVLconst [1])
  7687  	for {
  7688  		if v_0.Op != Op386FlagLT_UGT {
  7689  			break
  7690  		}
  7691  		v.reset(Op386MOVLconst)
  7692  		v.AuxInt = int32ToAuxInt(1)
  7693  		return true
  7694  	}
  7695  	// match: (SETLE (FlagGT_ULT))
  7696  	// result: (MOVLconst [0])
  7697  	for {
  7698  		if v_0.Op != Op386FlagGT_ULT {
  7699  			break
  7700  		}
  7701  		v.reset(Op386MOVLconst)
  7702  		v.AuxInt = int32ToAuxInt(0)
  7703  		return true
  7704  	}
  7705  	// match: (SETLE (FlagGT_UGT))
  7706  	// result: (MOVLconst [0])
  7707  	for {
  7708  		if v_0.Op != Op386FlagGT_UGT {
  7709  			break
  7710  		}
  7711  		v.reset(Op386MOVLconst)
  7712  		v.AuxInt = int32ToAuxInt(0)
  7713  		return true
  7714  	}
  7715  	return false
  7716  }
  7717  func rewriteValue386_Op386SETNE(v *Value) bool {
  7718  	v_0 := v.Args[0]
  7719  	// match: (SETNE (InvertFlags x))
  7720  	// result: (SETNE x)
  7721  	for {
  7722  		if v_0.Op != Op386InvertFlags {
  7723  			break
  7724  		}
  7725  		x := v_0.Args[0]
  7726  		v.reset(Op386SETNE)
  7727  		v.AddArg(x)
  7728  		return true
  7729  	}
  7730  	// match: (SETNE (FlagEQ))
  7731  	// result: (MOVLconst [0])
  7732  	for {
  7733  		if v_0.Op != Op386FlagEQ {
  7734  			break
  7735  		}
  7736  		v.reset(Op386MOVLconst)
  7737  		v.AuxInt = int32ToAuxInt(0)
  7738  		return true
  7739  	}
  7740  	// match: (SETNE (FlagLT_ULT))
  7741  	// result: (MOVLconst [1])
  7742  	for {
  7743  		if v_0.Op != Op386FlagLT_ULT {
  7744  			break
  7745  		}
  7746  		v.reset(Op386MOVLconst)
  7747  		v.AuxInt = int32ToAuxInt(1)
  7748  		return true
  7749  	}
  7750  	// match: (SETNE (FlagLT_UGT))
  7751  	// result: (MOVLconst [1])
  7752  	for {
  7753  		if v_0.Op != Op386FlagLT_UGT {
  7754  			break
  7755  		}
  7756  		v.reset(Op386MOVLconst)
  7757  		v.AuxInt = int32ToAuxInt(1)
  7758  		return true
  7759  	}
  7760  	// match: (SETNE (FlagGT_ULT))
  7761  	// result: (MOVLconst [1])
  7762  	for {
  7763  		if v_0.Op != Op386FlagGT_ULT {
  7764  			break
  7765  		}
  7766  		v.reset(Op386MOVLconst)
  7767  		v.AuxInt = int32ToAuxInt(1)
  7768  		return true
  7769  	}
  7770  	// match: (SETNE (FlagGT_UGT))
  7771  	// result: (MOVLconst [1])
  7772  	for {
  7773  		if v_0.Op != Op386FlagGT_UGT {
  7774  			break
  7775  		}
  7776  		v.reset(Op386MOVLconst)
  7777  		v.AuxInt = int32ToAuxInt(1)
  7778  		return true
  7779  	}
  7780  	return false
  7781  }
  7782  func rewriteValue386_Op386SHLL(v *Value) bool {
  7783  	v_1 := v.Args[1]
  7784  	v_0 := v.Args[0]
  7785  	// match: (SHLL x (MOVLconst [c]))
  7786  	// result: (SHLLconst [c&31] x)
  7787  	for {
  7788  		x := v_0
  7789  		if v_1.Op != Op386MOVLconst {
  7790  			break
  7791  		}
  7792  		c := auxIntToInt32(v_1.AuxInt)
  7793  		v.reset(Op386SHLLconst)
  7794  		v.AuxInt = int32ToAuxInt(c & 31)
  7795  		v.AddArg(x)
  7796  		return true
  7797  	}
  7798  	// match: (SHLL x (ANDLconst [31] y))
  7799  	// result: (SHLL x y)
  7800  	for {
  7801  		x := v_0
  7802  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  7803  			break
  7804  		}
  7805  		y := v_1.Args[0]
  7806  		v.reset(Op386SHLL)
  7807  		v.AddArg2(x, y)
  7808  		return true
  7809  	}
  7810  	return false
  7811  }
  7812  func rewriteValue386_Op386SHLLconst(v *Value) bool {
  7813  	v_0 := v.Args[0]
  7814  	// match: (SHLLconst x [0])
  7815  	// result: x
  7816  	for {
  7817  		if auxIntToInt32(v.AuxInt) != 0 {
  7818  			break
  7819  		}
  7820  		x := v_0
  7821  		v.copyOf(x)
  7822  		return true
  7823  	}
  7824  	return false
  7825  }
  7826  func rewriteValue386_Op386SHRB(v *Value) bool {
  7827  	v_1 := v.Args[1]
  7828  	v_0 := v.Args[0]
  7829  	// match: (SHRB x (MOVLconst [c]))
  7830  	// cond: c&31 < 8
  7831  	// result: (SHRBconst [int8(c&31)] x)
  7832  	for {
  7833  		x := v_0
  7834  		if v_1.Op != Op386MOVLconst {
  7835  			break
  7836  		}
  7837  		c := auxIntToInt32(v_1.AuxInt)
  7838  		if !(c&31 < 8) {
  7839  			break
  7840  		}
  7841  		v.reset(Op386SHRBconst)
  7842  		v.AuxInt = int8ToAuxInt(int8(c & 31))
  7843  		v.AddArg(x)
  7844  		return true
  7845  	}
  7846  	// match: (SHRB _ (MOVLconst [c]))
  7847  	// cond: c&31 >= 8
  7848  	// result: (MOVLconst [0])
  7849  	for {
  7850  		if v_1.Op != Op386MOVLconst {
  7851  			break
  7852  		}
  7853  		c := auxIntToInt32(v_1.AuxInt)
  7854  		if !(c&31 >= 8) {
  7855  			break
  7856  		}
  7857  		v.reset(Op386MOVLconst)
  7858  		v.AuxInt = int32ToAuxInt(0)
  7859  		return true
  7860  	}
  7861  	return false
  7862  }
  7863  func rewriteValue386_Op386SHRBconst(v *Value) bool {
  7864  	v_0 := v.Args[0]
  7865  	// match: (SHRBconst x [0])
  7866  	// result: x
  7867  	for {
  7868  		if auxIntToInt8(v.AuxInt) != 0 {
  7869  			break
  7870  		}
  7871  		x := v_0
  7872  		v.copyOf(x)
  7873  		return true
  7874  	}
  7875  	return false
  7876  }
  7877  func rewriteValue386_Op386SHRL(v *Value) bool {
  7878  	v_1 := v.Args[1]
  7879  	v_0 := v.Args[0]
  7880  	// match: (SHRL x (MOVLconst [c]))
  7881  	// result: (SHRLconst [c&31] x)
  7882  	for {
  7883  		x := v_0
  7884  		if v_1.Op != Op386MOVLconst {
  7885  			break
  7886  		}
  7887  		c := auxIntToInt32(v_1.AuxInt)
  7888  		v.reset(Op386SHRLconst)
  7889  		v.AuxInt = int32ToAuxInt(c & 31)
  7890  		v.AddArg(x)
  7891  		return true
  7892  	}
  7893  	// match: (SHRL x (ANDLconst [31] y))
  7894  	// result: (SHRL x y)
  7895  	for {
  7896  		x := v_0
  7897  		if v_1.Op != Op386ANDLconst || auxIntToInt32(v_1.AuxInt) != 31 {
  7898  			break
  7899  		}
  7900  		y := v_1.Args[0]
  7901  		v.reset(Op386SHRL)
  7902  		v.AddArg2(x, y)
  7903  		return true
  7904  	}
  7905  	return false
  7906  }
  7907  func rewriteValue386_Op386SHRLconst(v *Value) bool {
  7908  	v_0 := v.Args[0]
  7909  	// match: (SHRLconst x [0])
  7910  	// result: x
  7911  	for {
  7912  		if auxIntToInt32(v.AuxInt) != 0 {
  7913  			break
  7914  		}
  7915  		x := v_0
  7916  		v.copyOf(x)
  7917  		return true
  7918  	}
  7919  	return false
  7920  }
  7921  func rewriteValue386_Op386SHRW(v *Value) bool {
  7922  	v_1 := v.Args[1]
  7923  	v_0 := v.Args[0]
  7924  	// match: (SHRW x (MOVLconst [c]))
  7925  	// cond: c&31 < 16
  7926  	// result: (SHRWconst [int16(c&31)] x)
  7927  	for {
  7928  		x := v_0
  7929  		if v_1.Op != Op386MOVLconst {
  7930  			break
  7931  		}
  7932  		c := auxIntToInt32(v_1.AuxInt)
  7933  		if !(c&31 < 16) {
  7934  			break
  7935  		}
  7936  		v.reset(Op386SHRWconst)
  7937  		v.AuxInt = int16ToAuxInt(int16(c & 31))
  7938  		v.AddArg(x)
  7939  		return true
  7940  	}
  7941  	// match: (SHRW _ (MOVLconst [c]))
  7942  	// cond: c&31 >= 16
  7943  	// result: (MOVLconst [0])
  7944  	for {
  7945  		if v_1.Op != Op386MOVLconst {
  7946  			break
  7947  		}
  7948  		c := auxIntToInt32(v_1.AuxInt)
  7949  		if !(c&31 >= 16) {
  7950  			break
  7951  		}
  7952  		v.reset(Op386MOVLconst)
  7953  		v.AuxInt = int32ToAuxInt(0)
  7954  		return true
  7955  	}
  7956  	return false
  7957  }
  7958  func rewriteValue386_Op386SHRWconst(v *Value) bool {
  7959  	v_0 := v.Args[0]
  7960  	// match: (SHRWconst x [0])
  7961  	// result: x
  7962  	for {
  7963  		if auxIntToInt16(v.AuxInt) != 0 {
  7964  			break
  7965  		}
  7966  		x := v_0
  7967  		v.copyOf(x)
  7968  		return true
  7969  	}
  7970  	return false
  7971  }
  7972  func rewriteValue386_Op386SUBL(v *Value) bool {
  7973  	v_1 := v.Args[1]
  7974  	v_0 := v.Args[0]
  7975  	b := v.Block
  7976  	// match: (SUBL x (MOVLconst [c]))
  7977  	// result: (SUBLconst x [c])
  7978  	for {
  7979  		x := v_0
  7980  		if v_1.Op != Op386MOVLconst {
  7981  			break
  7982  		}
  7983  		c := auxIntToInt32(v_1.AuxInt)
  7984  		v.reset(Op386SUBLconst)
  7985  		v.AuxInt = int32ToAuxInt(c)
  7986  		v.AddArg(x)
  7987  		return true
  7988  	}
  7989  	// match: (SUBL (MOVLconst [c]) x)
  7990  	// result: (NEGL (SUBLconst <v.Type> x [c]))
  7991  	for {
  7992  		if v_0.Op != Op386MOVLconst {
  7993  			break
  7994  		}
  7995  		c := auxIntToInt32(v_0.AuxInt)
  7996  		x := v_1
  7997  		v.reset(Op386NEGL)
  7998  		v0 := b.NewValue0(v.Pos, Op386SUBLconst, v.Type)
  7999  		v0.AuxInt = int32ToAuxInt(c)
  8000  		v0.AddArg(x)
  8001  		v.AddArg(v0)
  8002  		return true
  8003  	}
  8004  	// match: (SUBL x l:(MOVLload [off] {sym} ptr mem))
  8005  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8006  	// result: (SUBLload x [off] {sym} ptr mem)
  8007  	for {
  8008  		x := v_0
  8009  		l := v_1
  8010  		if l.Op != Op386MOVLload {
  8011  			break
  8012  		}
  8013  		off := auxIntToInt32(l.AuxInt)
  8014  		sym := auxToSym(l.Aux)
  8015  		mem := l.Args[1]
  8016  		ptr := l.Args[0]
  8017  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8018  			break
  8019  		}
  8020  		v.reset(Op386SUBLload)
  8021  		v.AuxInt = int32ToAuxInt(off)
  8022  		v.Aux = symToAux(sym)
  8023  		v.AddArg3(x, ptr, mem)
  8024  		return true
  8025  	}
  8026  	// match: (SUBL x x)
  8027  	// result: (MOVLconst [0])
  8028  	for {
  8029  		x := v_0
  8030  		if x != v_1 {
  8031  			break
  8032  		}
  8033  		v.reset(Op386MOVLconst)
  8034  		v.AuxInt = int32ToAuxInt(0)
  8035  		return true
  8036  	}
  8037  	return false
  8038  }
  8039  func rewriteValue386_Op386SUBLcarry(v *Value) bool {
  8040  	v_1 := v.Args[1]
  8041  	v_0 := v.Args[0]
  8042  	// match: (SUBLcarry x (MOVLconst [c]))
  8043  	// result: (SUBLconstcarry [c] x)
  8044  	for {
  8045  		x := v_0
  8046  		if v_1.Op != Op386MOVLconst {
  8047  			break
  8048  		}
  8049  		c := auxIntToInt32(v_1.AuxInt)
  8050  		v.reset(Op386SUBLconstcarry)
  8051  		v.AuxInt = int32ToAuxInt(c)
  8052  		v.AddArg(x)
  8053  		return true
  8054  	}
  8055  	return false
  8056  }
  8057  func rewriteValue386_Op386SUBLconst(v *Value) bool {
  8058  	v_0 := v.Args[0]
  8059  	// match: (SUBLconst [c] x)
  8060  	// cond: c==0
  8061  	// result: x
  8062  	for {
  8063  		c := auxIntToInt32(v.AuxInt)
  8064  		x := v_0
  8065  		if !(c == 0) {
  8066  			break
  8067  		}
  8068  		v.copyOf(x)
  8069  		return true
  8070  	}
  8071  	// match: (SUBLconst [c] x)
  8072  	// result: (ADDLconst [-c] x)
  8073  	for {
  8074  		c := auxIntToInt32(v.AuxInt)
  8075  		x := v_0
  8076  		v.reset(Op386ADDLconst)
  8077  		v.AuxInt = int32ToAuxInt(-c)
  8078  		v.AddArg(x)
  8079  		return true
  8080  	}
  8081  }
  8082  func rewriteValue386_Op386SUBLload(v *Value) bool {
  8083  	v_2 := v.Args[2]
  8084  	v_1 := v.Args[1]
  8085  	v_0 := v.Args[0]
  8086  	b := v.Block
  8087  	config := b.Func.Config
  8088  	// match: (SUBLload [off1] {sym} val (ADDLconst [off2] base) mem)
  8089  	// cond: is32Bit(int64(off1)+int64(off2))
  8090  	// result: (SUBLload [off1+off2] {sym} val base mem)
  8091  	for {
  8092  		off1 := auxIntToInt32(v.AuxInt)
  8093  		sym := auxToSym(v.Aux)
  8094  		val := v_0
  8095  		if v_1.Op != Op386ADDLconst {
  8096  			break
  8097  		}
  8098  		off2 := auxIntToInt32(v_1.AuxInt)
  8099  		base := v_1.Args[0]
  8100  		mem := v_2
  8101  		if !(is32Bit(int64(off1) + int64(off2))) {
  8102  			break
  8103  		}
  8104  		v.reset(Op386SUBLload)
  8105  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8106  		v.Aux = symToAux(sym)
  8107  		v.AddArg3(val, base, mem)
  8108  		return true
  8109  	}
  8110  	// match: (SUBLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8111  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8112  	// result: (SUBLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8113  	for {
  8114  		off1 := auxIntToInt32(v.AuxInt)
  8115  		sym1 := auxToSym(v.Aux)
  8116  		val := v_0
  8117  		if v_1.Op != Op386LEAL {
  8118  			break
  8119  		}
  8120  		off2 := auxIntToInt32(v_1.AuxInt)
  8121  		sym2 := auxToSym(v_1.Aux)
  8122  		base := v_1.Args[0]
  8123  		mem := v_2
  8124  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8125  			break
  8126  		}
  8127  		v.reset(Op386SUBLload)
  8128  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8129  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8130  		v.AddArg3(val, base, mem)
  8131  		return true
  8132  	}
  8133  	return false
  8134  }
  8135  func rewriteValue386_Op386SUBLmodify(v *Value) bool {
  8136  	v_2 := v.Args[2]
  8137  	v_1 := v.Args[1]
  8138  	v_0 := v.Args[0]
  8139  	b := v.Block
  8140  	config := b.Func.Config
  8141  	// match: (SUBLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  8142  	// cond: is32Bit(int64(off1)+int64(off2))
  8143  	// result: (SUBLmodify [off1+off2] {sym} base val mem)
  8144  	for {
  8145  		off1 := auxIntToInt32(v.AuxInt)
  8146  		sym := auxToSym(v.Aux)
  8147  		if v_0.Op != Op386ADDLconst {
  8148  			break
  8149  		}
  8150  		off2 := auxIntToInt32(v_0.AuxInt)
  8151  		base := v_0.Args[0]
  8152  		val := v_1
  8153  		mem := v_2
  8154  		if !(is32Bit(int64(off1) + int64(off2))) {
  8155  			break
  8156  		}
  8157  		v.reset(Op386SUBLmodify)
  8158  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8159  		v.Aux = symToAux(sym)
  8160  		v.AddArg3(base, val, mem)
  8161  		return true
  8162  	}
  8163  	// match: (SUBLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  8164  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8165  	// result: (SUBLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8166  	for {
  8167  		off1 := auxIntToInt32(v.AuxInt)
  8168  		sym1 := auxToSym(v.Aux)
  8169  		if v_0.Op != Op386LEAL {
  8170  			break
  8171  		}
  8172  		off2 := auxIntToInt32(v_0.AuxInt)
  8173  		sym2 := auxToSym(v_0.Aux)
  8174  		base := v_0.Args[0]
  8175  		val := v_1
  8176  		mem := v_2
  8177  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8178  			break
  8179  		}
  8180  		v.reset(Op386SUBLmodify)
  8181  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8182  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8183  		v.AddArg3(base, val, mem)
  8184  		return true
  8185  	}
  8186  	return false
  8187  }
  8188  func rewriteValue386_Op386SUBSD(v *Value) bool {
  8189  	v_1 := v.Args[1]
  8190  	v_0 := v.Args[0]
  8191  	// match: (SUBSD x l:(MOVSDload [off] {sym} ptr mem))
  8192  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8193  	// result: (SUBSDload x [off] {sym} ptr mem)
  8194  	for {
  8195  		x := v_0
  8196  		l := v_1
  8197  		if l.Op != Op386MOVSDload {
  8198  			break
  8199  		}
  8200  		off := auxIntToInt32(l.AuxInt)
  8201  		sym := auxToSym(l.Aux)
  8202  		mem := l.Args[1]
  8203  		ptr := l.Args[0]
  8204  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8205  			break
  8206  		}
  8207  		v.reset(Op386SUBSDload)
  8208  		v.AuxInt = int32ToAuxInt(off)
  8209  		v.Aux = symToAux(sym)
  8210  		v.AddArg3(x, ptr, mem)
  8211  		return true
  8212  	}
  8213  	return false
  8214  }
  8215  func rewriteValue386_Op386SUBSDload(v *Value) bool {
  8216  	v_2 := v.Args[2]
  8217  	v_1 := v.Args[1]
  8218  	v_0 := v.Args[0]
  8219  	b := v.Block
  8220  	config := b.Func.Config
  8221  	// match: (SUBSDload [off1] {sym} val (ADDLconst [off2] base) mem)
  8222  	// cond: is32Bit(int64(off1)+int64(off2))
  8223  	// result: (SUBSDload [off1+off2] {sym} val base mem)
  8224  	for {
  8225  		off1 := auxIntToInt32(v.AuxInt)
  8226  		sym := auxToSym(v.Aux)
  8227  		val := v_0
  8228  		if v_1.Op != Op386ADDLconst {
  8229  			break
  8230  		}
  8231  		off2 := auxIntToInt32(v_1.AuxInt)
  8232  		base := v_1.Args[0]
  8233  		mem := v_2
  8234  		if !(is32Bit(int64(off1) + int64(off2))) {
  8235  			break
  8236  		}
  8237  		v.reset(Op386SUBSDload)
  8238  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8239  		v.Aux = symToAux(sym)
  8240  		v.AddArg3(val, base, mem)
  8241  		return true
  8242  	}
  8243  	// match: (SUBSDload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8244  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8245  	// result: (SUBSDload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8246  	for {
  8247  		off1 := auxIntToInt32(v.AuxInt)
  8248  		sym1 := auxToSym(v.Aux)
  8249  		val := v_0
  8250  		if v_1.Op != Op386LEAL {
  8251  			break
  8252  		}
  8253  		off2 := auxIntToInt32(v_1.AuxInt)
  8254  		sym2 := auxToSym(v_1.Aux)
  8255  		base := v_1.Args[0]
  8256  		mem := v_2
  8257  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8258  			break
  8259  		}
  8260  		v.reset(Op386SUBSDload)
  8261  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8262  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8263  		v.AddArg3(val, base, mem)
  8264  		return true
  8265  	}
  8266  	return false
  8267  }
  8268  func rewriteValue386_Op386SUBSS(v *Value) bool {
  8269  	v_1 := v.Args[1]
  8270  	v_0 := v.Args[0]
  8271  	// match: (SUBSS x l:(MOVSSload [off] {sym} ptr mem))
  8272  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8273  	// result: (SUBSSload x [off] {sym} ptr mem)
  8274  	for {
  8275  		x := v_0
  8276  		l := v_1
  8277  		if l.Op != Op386MOVSSload {
  8278  			break
  8279  		}
  8280  		off := auxIntToInt32(l.AuxInt)
  8281  		sym := auxToSym(l.Aux)
  8282  		mem := l.Args[1]
  8283  		ptr := l.Args[0]
  8284  		if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8285  			break
  8286  		}
  8287  		v.reset(Op386SUBSSload)
  8288  		v.AuxInt = int32ToAuxInt(off)
  8289  		v.Aux = symToAux(sym)
  8290  		v.AddArg3(x, ptr, mem)
  8291  		return true
  8292  	}
  8293  	return false
  8294  }
  8295  func rewriteValue386_Op386SUBSSload(v *Value) bool {
  8296  	v_2 := v.Args[2]
  8297  	v_1 := v.Args[1]
  8298  	v_0 := v.Args[0]
  8299  	b := v.Block
  8300  	config := b.Func.Config
  8301  	// match: (SUBSSload [off1] {sym} val (ADDLconst [off2] base) mem)
  8302  	// cond: is32Bit(int64(off1)+int64(off2))
  8303  	// result: (SUBSSload [off1+off2] {sym} val base mem)
  8304  	for {
  8305  		off1 := auxIntToInt32(v.AuxInt)
  8306  		sym := auxToSym(v.Aux)
  8307  		val := v_0
  8308  		if v_1.Op != Op386ADDLconst {
  8309  			break
  8310  		}
  8311  		off2 := auxIntToInt32(v_1.AuxInt)
  8312  		base := v_1.Args[0]
  8313  		mem := v_2
  8314  		if !(is32Bit(int64(off1) + int64(off2))) {
  8315  			break
  8316  		}
  8317  		v.reset(Op386SUBSSload)
  8318  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8319  		v.Aux = symToAux(sym)
  8320  		v.AddArg3(val, base, mem)
  8321  		return true
  8322  	}
  8323  	// match: (SUBSSload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8324  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8325  	// result: (SUBSSload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8326  	for {
  8327  		off1 := auxIntToInt32(v.AuxInt)
  8328  		sym1 := auxToSym(v.Aux)
  8329  		val := v_0
  8330  		if v_1.Op != Op386LEAL {
  8331  			break
  8332  		}
  8333  		off2 := auxIntToInt32(v_1.AuxInt)
  8334  		sym2 := auxToSym(v_1.Aux)
  8335  		base := v_1.Args[0]
  8336  		mem := v_2
  8337  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8338  			break
  8339  		}
  8340  		v.reset(Op386SUBSSload)
  8341  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8342  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8343  		v.AddArg3(val, base, mem)
  8344  		return true
  8345  	}
  8346  	return false
  8347  }
  8348  func rewriteValue386_Op386XORL(v *Value) bool {
  8349  	v_1 := v.Args[1]
  8350  	v_0 := v.Args[0]
  8351  	// match: (XORL x (MOVLconst [c]))
  8352  	// result: (XORLconst [c] x)
  8353  	for {
  8354  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8355  			x := v_0
  8356  			if v_1.Op != Op386MOVLconst {
  8357  				continue
  8358  			}
  8359  			c := auxIntToInt32(v_1.AuxInt)
  8360  			v.reset(Op386XORLconst)
  8361  			v.AuxInt = int32ToAuxInt(c)
  8362  			v.AddArg(x)
  8363  			return true
  8364  		}
  8365  		break
  8366  	}
  8367  	// match: (XORL (SHLLconst [c] x) (SHRLconst [d] x))
  8368  	// cond: d == 32-c
  8369  	// result: (ROLLconst [c] x)
  8370  	for {
  8371  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8372  			if v_0.Op != Op386SHLLconst {
  8373  				continue
  8374  			}
  8375  			c := auxIntToInt32(v_0.AuxInt)
  8376  			x := v_0.Args[0]
  8377  			if v_1.Op != Op386SHRLconst {
  8378  				continue
  8379  			}
  8380  			d := auxIntToInt32(v_1.AuxInt)
  8381  			if x != v_1.Args[0] || !(d == 32-c) {
  8382  				continue
  8383  			}
  8384  			v.reset(Op386ROLLconst)
  8385  			v.AuxInt = int32ToAuxInt(c)
  8386  			v.AddArg(x)
  8387  			return true
  8388  		}
  8389  		break
  8390  	}
  8391  	// match: (XORL <t> (SHLLconst x [c]) (SHRWconst x [d]))
  8392  	// cond: c < 16 && d == int16(16-c) && t.Size() == 2
  8393  	// result: (ROLWconst x [int16(c)])
  8394  	for {
  8395  		t := v.Type
  8396  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8397  			if v_0.Op != Op386SHLLconst {
  8398  				continue
  8399  			}
  8400  			c := auxIntToInt32(v_0.AuxInt)
  8401  			x := v_0.Args[0]
  8402  			if v_1.Op != Op386SHRWconst {
  8403  				continue
  8404  			}
  8405  			d := auxIntToInt16(v_1.AuxInt)
  8406  			if x != v_1.Args[0] || !(c < 16 && d == int16(16-c) && t.Size() == 2) {
  8407  				continue
  8408  			}
  8409  			v.reset(Op386ROLWconst)
  8410  			v.AuxInt = int16ToAuxInt(int16(c))
  8411  			v.AddArg(x)
  8412  			return true
  8413  		}
  8414  		break
  8415  	}
  8416  	// match: (XORL <t> (SHLLconst x [c]) (SHRBconst x [d]))
  8417  	// cond: c < 8 && d == int8(8-c) && t.Size() == 1
  8418  	// result: (ROLBconst x [int8(c)])
  8419  	for {
  8420  		t := v.Type
  8421  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8422  			if v_0.Op != Op386SHLLconst {
  8423  				continue
  8424  			}
  8425  			c := auxIntToInt32(v_0.AuxInt)
  8426  			x := v_0.Args[0]
  8427  			if v_1.Op != Op386SHRBconst {
  8428  				continue
  8429  			}
  8430  			d := auxIntToInt8(v_1.AuxInt)
  8431  			if x != v_1.Args[0] || !(c < 8 && d == int8(8-c) && t.Size() == 1) {
  8432  				continue
  8433  			}
  8434  			v.reset(Op386ROLBconst)
  8435  			v.AuxInt = int8ToAuxInt(int8(c))
  8436  			v.AddArg(x)
  8437  			return true
  8438  		}
  8439  		break
  8440  	}
  8441  	// match: (XORL x l:(MOVLload [off] {sym} ptr mem))
  8442  	// cond: canMergeLoadClobber(v, l, x) && clobber(l)
  8443  	// result: (XORLload x [off] {sym} ptr mem)
  8444  	for {
  8445  		for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
  8446  			x := v_0
  8447  			l := v_1
  8448  			if l.Op != Op386MOVLload {
  8449  				continue
  8450  			}
  8451  			off := auxIntToInt32(l.AuxInt)
  8452  			sym := auxToSym(l.Aux)
  8453  			mem := l.Args[1]
  8454  			ptr := l.Args[0]
  8455  			if !(canMergeLoadClobber(v, l, x) && clobber(l)) {
  8456  				continue
  8457  			}
  8458  			v.reset(Op386XORLload)
  8459  			v.AuxInt = int32ToAuxInt(off)
  8460  			v.Aux = symToAux(sym)
  8461  			v.AddArg3(x, ptr, mem)
  8462  			return true
  8463  		}
  8464  		break
  8465  	}
  8466  	// match: (XORL x x)
  8467  	// result: (MOVLconst [0])
  8468  	for {
  8469  		x := v_0
  8470  		if x != v_1 {
  8471  			break
  8472  		}
  8473  		v.reset(Op386MOVLconst)
  8474  		v.AuxInt = int32ToAuxInt(0)
  8475  		return true
  8476  	}
  8477  	return false
  8478  }
  8479  func rewriteValue386_Op386XORLconst(v *Value) bool {
  8480  	v_0 := v.Args[0]
  8481  	// match: (XORLconst [c] (XORLconst [d] x))
  8482  	// result: (XORLconst [c ^ d] x)
  8483  	for {
  8484  		c := auxIntToInt32(v.AuxInt)
  8485  		if v_0.Op != Op386XORLconst {
  8486  			break
  8487  		}
  8488  		d := auxIntToInt32(v_0.AuxInt)
  8489  		x := v_0.Args[0]
  8490  		v.reset(Op386XORLconst)
  8491  		v.AuxInt = int32ToAuxInt(c ^ d)
  8492  		v.AddArg(x)
  8493  		return true
  8494  	}
  8495  	// match: (XORLconst [c] x)
  8496  	// cond: c==0
  8497  	// result: x
  8498  	for {
  8499  		c := auxIntToInt32(v.AuxInt)
  8500  		x := v_0
  8501  		if !(c == 0) {
  8502  			break
  8503  		}
  8504  		v.copyOf(x)
  8505  		return true
  8506  	}
  8507  	// match: (XORLconst [c] (MOVLconst [d]))
  8508  	// result: (MOVLconst [c^d])
  8509  	for {
  8510  		c := auxIntToInt32(v.AuxInt)
  8511  		if v_0.Op != Op386MOVLconst {
  8512  			break
  8513  		}
  8514  		d := auxIntToInt32(v_0.AuxInt)
  8515  		v.reset(Op386MOVLconst)
  8516  		v.AuxInt = int32ToAuxInt(c ^ d)
  8517  		return true
  8518  	}
  8519  	return false
  8520  }
  8521  func rewriteValue386_Op386XORLconstmodify(v *Value) bool {
  8522  	v_1 := v.Args[1]
  8523  	v_0 := v.Args[0]
  8524  	b := v.Block
  8525  	config := b.Func.Config
  8526  	// match: (XORLconstmodify [valoff1] {sym} (ADDLconst [off2] base) mem)
  8527  	// cond: valoff1.canAdd32(off2)
  8528  	// result: (XORLconstmodify [valoff1.addOffset32(off2)] {sym} base mem)
  8529  	for {
  8530  		valoff1 := auxIntToValAndOff(v.AuxInt)
  8531  		sym := auxToSym(v.Aux)
  8532  		if v_0.Op != Op386ADDLconst {
  8533  			break
  8534  		}
  8535  		off2 := auxIntToInt32(v_0.AuxInt)
  8536  		base := v_0.Args[0]
  8537  		mem := v_1
  8538  		if !(valoff1.canAdd32(off2)) {
  8539  			break
  8540  		}
  8541  		v.reset(Op386XORLconstmodify)
  8542  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  8543  		v.Aux = symToAux(sym)
  8544  		v.AddArg2(base, mem)
  8545  		return true
  8546  	}
  8547  	// match: (XORLconstmodify [valoff1] {sym1} (LEAL [off2] {sym2} base) mem)
  8548  	// cond: valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8549  	// result: (XORLconstmodify [valoff1.addOffset32(off2)] {mergeSym(sym1,sym2)} base mem)
  8550  	for {
  8551  		valoff1 := auxIntToValAndOff(v.AuxInt)
  8552  		sym1 := auxToSym(v.Aux)
  8553  		if v_0.Op != Op386LEAL {
  8554  			break
  8555  		}
  8556  		off2 := auxIntToInt32(v_0.AuxInt)
  8557  		sym2 := auxToSym(v_0.Aux)
  8558  		base := v_0.Args[0]
  8559  		mem := v_1
  8560  		if !(valoff1.canAdd32(off2) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8561  			break
  8562  		}
  8563  		v.reset(Op386XORLconstmodify)
  8564  		v.AuxInt = valAndOffToAuxInt(valoff1.addOffset32(off2))
  8565  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8566  		v.AddArg2(base, mem)
  8567  		return true
  8568  	}
  8569  	return false
  8570  }
  8571  func rewriteValue386_Op386XORLload(v *Value) bool {
  8572  	v_2 := v.Args[2]
  8573  	v_1 := v.Args[1]
  8574  	v_0 := v.Args[0]
  8575  	b := v.Block
  8576  	config := b.Func.Config
  8577  	// match: (XORLload [off1] {sym} val (ADDLconst [off2] base) mem)
  8578  	// cond: is32Bit(int64(off1)+int64(off2))
  8579  	// result: (XORLload [off1+off2] {sym} val base mem)
  8580  	for {
  8581  		off1 := auxIntToInt32(v.AuxInt)
  8582  		sym := auxToSym(v.Aux)
  8583  		val := v_0
  8584  		if v_1.Op != Op386ADDLconst {
  8585  			break
  8586  		}
  8587  		off2 := auxIntToInt32(v_1.AuxInt)
  8588  		base := v_1.Args[0]
  8589  		mem := v_2
  8590  		if !(is32Bit(int64(off1) + int64(off2))) {
  8591  			break
  8592  		}
  8593  		v.reset(Op386XORLload)
  8594  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8595  		v.Aux = symToAux(sym)
  8596  		v.AddArg3(val, base, mem)
  8597  		return true
  8598  	}
  8599  	// match: (XORLload [off1] {sym1} val (LEAL [off2] {sym2} base) mem)
  8600  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8601  	// result: (XORLload [off1+off2] {mergeSym(sym1,sym2)} val base mem)
  8602  	for {
  8603  		off1 := auxIntToInt32(v.AuxInt)
  8604  		sym1 := auxToSym(v.Aux)
  8605  		val := v_0
  8606  		if v_1.Op != Op386LEAL {
  8607  			break
  8608  		}
  8609  		off2 := auxIntToInt32(v_1.AuxInt)
  8610  		sym2 := auxToSym(v_1.Aux)
  8611  		base := v_1.Args[0]
  8612  		mem := v_2
  8613  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8614  			break
  8615  		}
  8616  		v.reset(Op386XORLload)
  8617  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8618  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8619  		v.AddArg3(val, base, mem)
  8620  		return true
  8621  	}
  8622  	return false
  8623  }
  8624  func rewriteValue386_Op386XORLmodify(v *Value) bool {
  8625  	v_2 := v.Args[2]
  8626  	v_1 := v.Args[1]
  8627  	v_0 := v.Args[0]
  8628  	b := v.Block
  8629  	config := b.Func.Config
  8630  	// match: (XORLmodify [off1] {sym} (ADDLconst [off2] base) val mem)
  8631  	// cond: is32Bit(int64(off1)+int64(off2))
  8632  	// result: (XORLmodify [off1+off2] {sym} base val mem)
  8633  	for {
  8634  		off1 := auxIntToInt32(v.AuxInt)
  8635  		sym := auxToSym(v.Aux)
  8636  		if v_0.Op != Op386ADDLconst {
  8637  			break
  8638  		}
  8639  		off2 := auxIntToInt32(v_0.AuxInt)
  8640  		base := v_0.Args[0]
  8641  		val := v_1
  8642  		mem := v_2
  8643  		if !(is32Bit(int64(off1) + int64(off2))) {
  8644  			break
  8645  		}
  8646  		v.reset(Op386XORLmodify)
  8647  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8648  		v.Aux = symToAux(sym)
  8649  		v.AddArg3(base, val, mem)
  8650  		return true
  8651  	}
  8652  	// match: (XORLmodify [off1] {sym1} (LEAL [off2] {sym2} base) val mem)
  8653  	// cond: is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)
  8654  	// result: (XORLmodify [off1+off2] {mergeSym(sym1,sym2)} base val mem)
  8655  	for {
  8656  		off1 := auxIntToInt32(v.AuxInt)
  8657  		sym1 := auxToSym(v.Aux)
  8658  		if v_0.Op != Op386LEAL {
  8659  			break
  8660  		}
  8661  		off2 := auxIntToInt32(v_0.AuxInt)
  8662  		sym2 := auxToSym(v_0.Aux)
  8663  		base := v_0.Args[0]
  8664  		val := v_1
  8665  		mem := v_2
  8666  		if !(is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || !config.ctxt.Flag_shared)) {
  8667  			break
  8668  		}
  8669  		v.reset(Op386XORLmodify)
  8670  		v.AuxInt = int32ToAuxInt(off1 + off2)
  8671  		v.Aux = symToAux(mergeSym(sym1, sym2))
  8672  		v.AddArg3(base, val, mem)
  8673  		return true
  8674  	}
  8675  	return false
  8676  }
  8677  func rewriteValue386_OpAddr(v *Value) bool {
  8678  	v_0 := v.Args[0]
  8679  	// match: (Addr {sym} base)
  8680  	// result: (LEAL {sym} base)
  8681  	for {
  8682  		sym := auxToSym(v.Aux)
  8683  		base := v_0
  8684  		v.reset(Op386LEAL)
  8685  		v.Aux = symToAux(sym)
  8686  		v.AddArg(base)
  8687  		return true
  8688  	}
  8689  }
  8690  func rewriteValue386_OpConst16(v *Value) bool {
  8691  	// match: (Const16 [c])
  8692  	// result: (MOVLconst [int32(c)])
  8693  	for {
  8694  		c := auxIntToInt16(v.AuxInt)
  8695  		v.reset(Op386MOVLconst)
  8696  		v.AuxInt = int32ToAuxInt(int32(c))
  8697  		return true
  8698  	}
  8699  }
  8700  func rewriteValue386_OpConst8(v *Value) bool {
  8701  	// match: (Const8 [c])
  8702  	// result: (MOVLconst [int32(c)])
  8703  	for {
  8704  		c := auxIntToInt8(v.AuxInt)
  8705  		v.reset(Op386MOVLconst)
  8706  		v.AuxInt = int32ToAuxInt(int32(c))
  8707  		return true
  8708  	}
  8709  }
  8710  func rewriteValue386_OpConstBool(v *Value) bool {
  8711  	// match: (ConstBool [c])
  8712  	// result: (MOVLconst [b2i32(c)])
  8713  	for {
  8714  		c := auxIntToBool(v.AuxInt)
  8715  		v.reset(Op386MOVLconst)
  8716  		v.AuxInt = int32ToAuxInt(b2i32(c))
  8717  		return true
  8718  	}
  8719  }
  8720  func rewriteValue386_OpConstNil(v *Value) bool {
  8721  	// match: (ConstNil)
  8722  	// result: (MOVLconst [0])
  8723  	for {
  8724  		v.reset(Op386MOVLconst)
  8725  		v.AuxInt = int32ToAuxInt(0)
  8726  		return true
  8727  	}
  8728  }
  8729  func rewriteValue386_OpCtz16(v *Value) bool {
  8730  	v_0 := v.Args[0]
  8731  	b := v.Block
  8732  	typ := &b.Func.Config.Types
  8733  	// match: (Ctz16 x)
  8734  	// result: (BSFL (ORLconst <typ.UInt32> [0x10000] x))
  8735  	for {
  8736  		x := v_0
  8737  		v.reset(Op386BSFL)
  8738  		v0 := b.NewValue0(v.Pos, Op386ORLconst, typ.UInt32)
  8739  		v0.AuxInt = int32ToAuxInt(0x10000)
  8740  		v0.AddArg(x)
  8741  		v.AddArg(v0)
  8742  		return true
  8743  	}
  8744  }
  8745  func rewriteValue386_OpDiv8(v *Value) bool {
  8746  	v_1 := v.Args[1]
  8747  	v_0 := v.Args[0]
  8748  	b := v.Block
  8749  	typ := &b.Func.Config.Types
  8750  	// match: (Div8 x y)
  8751  	// result: (DIVW (SignExt8to16 x) (SignExt8to16 y))
  8752  	for {
  8753  		x := v_0
  8754  		y := v_1
  8755  		v.reset(Op386DIVW)
  8756  		v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  8757  		v0.AddArg(x)
  8758  		v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  8759  		v1.AddArg(y)
  8760  		v.AddArg2(v0, v1)
  8761  		return true
  8762  	}
  8763  }
  8764  func rewriteValue386_OpDiv8u(v *Value) bool {
  8765  	v_1 := v.Args[1]
  8766  	v_0 := v.Args[0]
  8767  	b := v.Block
  8768  	typ := &b.Func.Config.Types
  8769  	// match: (Div8u x y)
  8770  	// result: (DIVWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  8771  	for {
  8772  		x := v_0
  8773  		y := v_1
  8774  		v.reset(Op386DIVWU)
  8775  		v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  8776  		v0.AddArg(x)
  8777  		v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  8778  		v1.AddArg(y)
  8779  		v.AddArg2(v0, v1)
  8780  		return true
  8781  	}
  8782  }
  8783  func rewriteValue386_OpEq16(v *Value) bool {
  8784  	v_1 := v.Args[1]
  8785  	v_0 := v.Args[0]
  8786  	b := v.Block
  8787  	// match: (Eq16 x y)
  8788  	// result: (SETEQ (CMPW x y))
  8789  	for {
  8790  		x := v_0
  8791  		y := v_1
  8792  		v.reset(Op386SETEQ)
  8793  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8794  		v0.AddArg2(x, y)
  8795  		v.AddArg(v0)
  8796  		return true
  8797  	}
  8798  }
  8799  func rewriteValue386_OpEq32(v *Value) bool {
  8800  	v_1 := v.Args[1]
  8801  	v_0 := v.Args[0]
  8802  	b := v.Block
  8803  	// match: (Eq32 x y)
  8804  	// result: (SETEQ (CMPL x y))
  8805  	for {
  8806  		x := v_0
  8807  		y := v_1
  8808  		v.reset(Op386SETEQ)
  8809  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8810  		v0.AddArg2(x, y)
  8811  		v.AddArg(v0)
  8812  		return true
  8813  	}
  8814  }
  8815  func rewriteValue386_OpEq32F(v *Value) bool {
  8816  	v_1 := v.Args[1]
  8817  	v_0 := v.Args[0]
  8818  	b := v.Block
  8819  	// match: (Eq32F x y)
  8820  	// result: (SETEQF (UCOMISS x y))
  8821  	for {
  8822  		x := v_0
  8823  		y := v_1
  8824  		v.reset(Op386SETEQF)
  8825  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  8826  		v0.AddArg2(x, y)
  8827  		v.AddArg(v0)
  8828  		return true
  8829  	}
  8830  }
  8831  func rewriteValue386_OpEq64F(v *Value) bool {
  8832  	v_1 := v.Args[1]
  8833  	v_0 := v.Args[0]
  8834  	b := v.Block
  8835  	// match: (Eq64F x y)
  8836  	// result: (SETEQF (UCOMISD x y))
  8837  	for {
  8838  		x := v_0
  8839  		y := v_1
  8840  		v.reset(Op386SETEQF)
  8841  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  8842  		v0.AddArg2(x, y)
  8843  		v.AddArg(v0)
  8844  		return true
  8845  	}
  8846  }
  8847  func rewriteValue386_OpEq8(v *Value) bool {
  8848  	v_1 := v.Args[1]
  8849  	v_0 := v.Args[0]
  8850  	b := v.Block
  8851  	// match: (Eq8 x y)
  8852  	// result: (SETEQ (CMPB x y))
  8853  	for {
  8854  		x := v_0
  8855  		y := v_1
  8856  		v.reset(Op386SETEQ)
  8857  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8858  		v0.AddArg2(x, y)
  8859  		v.AddArg(v0)
  8860  		return true
  8861  	}
  8862  }
  8863  func rewriteValue386_OpEqB(v *Value) bool {
  8864  	v_1 := v.Args[1]
  8865  	v_0 := v.Args[0]
  8866  	b := v.Block
  8867  	// match: (EqB x y)
  8868  	// result: (SETEQ (CMPB x y))
  8869  	for {
  8870  		x := v_0
  8871  		y := v_1
  8872  		v.reset(Op386SETEQ)
  8873  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  8874  		v0.AddArg2(x, y)
  8875  		v.AddArg(v0)
  8876  		return true
  8877  	}
  8878  }
  8879  func rewriteValue386_OpEqPtr(v *Value) bool {
  8880  	v_1 := v.Args[1]
  8881  	v_0 := v.Args[0]
  8882  	b := v.Block
  8883  	// match: (EqPtr x y)
  8884  	// result: (SETEQ (CMPL x y))
  8885  	for {
  8886  		x := v_0
  8887  		y := v_1
  8888  		v.reset(Op386SETEQ)
  8889  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8890  		v0.AddArg2(x, y)
  8891  		v.AddArg(v0)
  8892  		return true
  8893  	}
  8894  }
  8895  func rewriteValue386_OpIsInBounds(v *Value) bool {
  8896  	v_1 := v.Args[1]
  8897  	v_0 := v.Args[0]
  8898  	b := v.Block
  8899  	// match: (IsInBounds idx len)
  8900  	// result: (SETB (CMPL idx len))
  8901  	for {
  8902  		idx := v_0
  8903  		len := v_1
  8904  		v.reset(Op386SETB)
  8905  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8906  		v0.AddArg2(idx, len)
  8907  		v.AddArg(v0)
  8908  		return true
  8909  	}
  8910  }
  8911  func rewriteValue386_OpIsNonNil(v *Value) bool {
  8912  	v_0 := v.Args[0]
  8913  	b := v.Block
  8914  	// match: (IsNonNil p)
  8915  	// result: (SETNE (TESTL p p))
  8916  	for {
  8917  		p := v_0
  8918  		v.reset(Op386SETNE)
  8919  		v0 := b.NewValue0(v.Pos, Op386TESTL, types.TypeFlags)
  8920  		v0.AddArg2(p, p)
  8921  		v.AddArg(v0)
  8922  		return true
  8923  	}
  8924  }
  8925  func rewriteValue386_OpIsSliceInBounds(v *Value) bool {
  8926  	v_1 := v.Args[1]
  8927  	v_0 := v.Args[0]
  8928  	b := v.Block
  8929  	// match: (IsSliceInBounds idx len)
  8930  	// result: (SETBE (CMPL idx len))
  8931  	for {
  8932  		idx := v_0
  8933  		len := v_1
  8934  		v.reset(Op386SETBE)
  8935  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8936  		v0.AddArg2(idx, len)
  8937  		v.AddArg(v0)
  8938  		return true
  8939  	}
  8940  }
  8941  func rewriteValue386_OpLeq16(v *Value) bool {
  8942  	v_1 := v.Args[1]
  8943  	v_0 := v.Args[0]
  8944  	b := v.Block
  8945  	// match: (Leq16 x y)
  8946  	// result: (SETLE (CMPW x y))
  8947  	for {
  8948  		x := v_0
  8949  		y := v_1
  8950  		v.reset(Op386SETLE)
  8951  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8952  		v0.AddArg2(x, y)
  8953  		v.AddArg(v0)
  8954  		return true
  8955  	}
  8956  }
  8957  func rewriteValue386_OpLeq16U(v *Value) bool {
  8958  	v_1 := v.Args[1]
  8959  	v_0 := v.Args[0]
  8960  	b := v.Block
  8961  	// match: (Leq16U x y)
  8962  	// result: (SETBE (CMPW x y))
  8963  	for {
  8964  		x := v_0
  8965  		y := v_1
  8966  		v.reset(Op386SETBE)
  8967  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  8968  		v0.AddArg2(x, y)
  8969  		v.AddArg(v0)
  8970  		return true
  8971  	}
  8972  }
  8973  func rewriteValue386_OpLeq32(v *Value) bool {
  8974  	v_1 := v.Args[1]
  8975  	v_0 := v.Args[0]
  8976  	b := v.Block
  8977  	// match: (Leq32 x y)
  8978  	// result: (SETLE (CMPL x y))
  8979  	for {
  8980  		x := v_0
  8981  		y := v_1
  8982  		v.reset(Op386SETLE)
  8983  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  8984  		v0.AddArg2(x, y)
  8985  		v.AddArg(v0)
  8986  		return true
  8987  	}
  8988  }
  8989  func rewriteValue386_OpLeq32F(v *Value) bool {
  8990  	v_1 := v.Args[1]
  8991  	v_0 := v.Args[0]
  8992  	b := v.Block
  8993  	// match: (Leq32F x y)
  8994  	// result: (SETGEF (UCOMISS y x))
  8995  	for {
  8996  		x := v_0
  8997  		y := v_1
  8998  		v.reset(Op386SETGEF)
  8999  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  9000  		v0.AddArg2(y, x)
  9001  		v.AddArg(v0)
  9002  		return true
  9003  	}
  9004  }
  9005  func rewriteValue386_OpLeq32U(v *Value) bool {
  9006  	v_1 := v.Args[1]
  9007  	v_0 := v.Args[0]
  9008  	b := v.Block
  9009  	// match: (Leq32U x y)
  9010  	// result: (SETBE (CMPL x y))
  9011  	for {
  9012  		x := v_0
  9013  		y := v_1
  9014  		v.reset(Op386SETBE)
  9015  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9016  		v0.AddArg2(x, y)
  9017  		v.AddArg(v0)
  9018  		return true
  9019  	}
  9020  }
  9021  func rewriteValue386_OpLeq64F(v *Value) bool {
  9022  	v_1 := v.Args[1]
  9023  	v_0 := v.Args[0]
  9024  	b := v.Block
  9025  	// match: (Leq64F x y)
  9026  	// result: (SETGEF (UCOMISD y x))
  9027  	for {
  9028  		x := v_0
  9029  		y := v_1
  9030  		v.reset(Op386SETGEF)
  9031  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  9032  		v0.AddArg2(y, x)
  9033  		v.AddArg(v0)
  9034  		return true
  9035  	}
  9036  }
  9037  func rewriteValue386_OpLeq8(v *Value) bool {
  9038  	v_1 := v.Args[1]
  9039  	v_0 := v.Args[0]
  9040  	b := v.Block
  9041  	// match: (Leq8 x y)
  9042  	// result: (SETLE (CMPB x y))
  9043  	for {
  9044  		x := v_0
  9045  		y := v_1
  9046  		v.reset(Op386SETLE)
  9047  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9048  		v0.AddArg2(x, y)
  9049  		v.AddArg(v0)
  9050  		return true
  9051  	}
  9052  }
  9053  func rewriteValue386_OpLeq8U(v *Value) bool {
  9054  	v_1 := v.Args[1]
  9055  	v_0 := v.Args[0]
  9056  	b := v.Block
  9057  	// match: (Leq8U x y)
  9058  	// result: (SETBE (CMPB x y))
  9059  	for {
  9060  		x := v_0
  9061  		y := v_1
  9062  		v.reset(Op386SETBE)
  9063  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9064  		v0.AddArg2(x, y)
  9065  		v.AddArg(v0)
  9066  		return true
  9067  	}
  9068  }
  9069  func rewriteValue386_OpLess16(v *Value) bool {
  9070  	v_1 := v.Args[1]
  9071  	v_0 := v.Args[0]
  9072  	b := v.Block
  9073  	// match: (Less16 x y)
  9074  	// result: (SETL (CMPW x y))
  9075  	for {
  9076  		x := v_0
  9077  		y := v_1
  9078  		v.reset(Op386SETL)
  9079  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  9080  		v0.AddArg2(x, y)
  9081  		v.AddArg(v0)
  9082  		return true
  9083  	}
  9084  }
  9085  func rewriteValue386_OpLess16U(v *Value) bool {
  9086  	v_1 := v.Args[1]
  9087  	v_0 := v.Args[0]
  9088  	b := v.Block
  9089  	// match: (Less16U x y)
  9090  	// result: (SETB (CMPW x y))
  9091  	for {
  9092  		x := v_0
  9093  		y := v_1
  9094  		v.reset(Op386SETB)
  9095  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
  9096  		v0.AddArg2(x, y)
  9097  		v.AddArg(v0)
  9098  		return true
  9099  	}
  9100  }
  9101  func rewriteValue386_OpLess32(v *Value) bool {
  9102  	v_1 := v.Args[1]
  9103  	v_0 := v.Args[0]
  9104  	b := v.Block
  9105  	// match: (Less32 x y)
  9106  	// result: (SETL (CMPL x y))
  9107  	for {
  9108  		x := v_0
  9109  		y := v_1
  9110  		v.reset(Op386SETL)
  9111  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9112  		v0.AddArg2(x, y)
  9113  		v.AddArg(v0)
  9114  		return true
  9115  	}
  9116  }
  9117  func rewriteValue386_OpLess32F(v *Value) bool {
  9118  	v_1 := v.Args[1]
  9119  	v_0 := v.Args[0]
  9120  	b := v.Block
  9121  	// match: (Less32F x y)
  9122  	// result: (SETGF (UCOMISS y x))
  9123  	for {
  9124  		x := v_0
  9125  		y := v_1
  9126  		v.reset(Op386SETGF)
  9127  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
  9128  		v0.AddArg2(y, x)
  9129  		v.AddArg(v0)
  9130  		return true
  9131  	}
  9132  }
  9133  func rewriteValue386_OpLess32U(v *Value) bool {
  9134  	v_1 := v.Args[1]
  9135  	v_0 := v.Args[0]
  9136  	b := v.Block
  9137  	// match: (Less32U x y)
  9138  	// result: (SETB (CMPL x y))
  9139  	for {
  9140  		x := v_0
  9141  		y := v_1
  9142  		v.reset(Op386SETB)
  9143  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
  9144  		v0.AddArg2(x, y)
  9145  		v.AddArg(v0)
  9146  		return true
  9147  	}
  9148  }
  9149  func rewriteValue386_OpLess64F(v *Value) bool {
  9150  	v_1 := v.Args[1]
  9151  	v_0 := v.Args[0]
  9152  	b := v.Block
  9153  	// match: (Less64F x y)
  9154  	// result: (SETGF (UCOMISD y x))
  9155  	for {
  9156  		x := v_0
  9157  		y := v_1
  9158  		v.reset(Op386SETGF)
  9159  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
  9160  		v0.AddArg2(y, x)
  9161  		v.AddArg(v0)
  9162  		return true
  9163  	}
  9164  }
  9165  func rewriteValue386_OpLess8(v *Value) bool {
  9166  	v_1 := v.Args[1]
  9167  	v_0 := v.Args[0]
  9168  	b := v.Block
  9169  	// match: (Less8 x y)
  9170  	// result: (SETL (CMPB x y))
  9171  	for {
  9172  		x := v_0
  9173  		y := v_1
  9174  		v.reset(Op386SETL)
  9175  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9176  		v0.AddArg2(x, y)
  9177  		v.AddArg(v0)
  9178  		return true
  9179  	}
  9180  }
  9181  func rewriteValue386_OpLess8U(v *Value) bool {
  9182  	v_1 := v.Args[1]
  9183  	v_0 := v.Args[0]
  9184  	b := v.Block
  9185  	// match: (Less8U x y)
  9186  	// result: (SETB (CMPB x y))
  9187  	for {
  9188  		x := v_0
  9189  		y := v_1
  9190  		v.reset(Op386SETB)
  9191  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
  9192  		v0.AddArg2(x, y)
  9193  		v.AddArg(v0)
  9194  		return true
  9195  	}
  9196  }
  9197  func rewriteValue386_OpLoad(v *Value) bool {
  9198  	v_1 := v.Args[1]
  9199  	v_0 := v.Args[0]
  9200  	// match: (Load <t> ptr mem)
  9201  	// cond: (is32BitInt(t) || isPtr(t))
  9202  	// result: (MOVLload ptr mem)
  9203  	for {
  9204  		t := v.Type
  9205  		ptr := v_0
  9206  		mem := v_1
  9207  		if !(is32BitInt(t) || isPtr(t)) {
  9208  			break
  9209  		}
  9210  		v.reset(Op386MOVLload)
  9211  		v.AddArg2(ptr, mem)
  9212  		return true
  9213  	}
  9214  	// match: (Load <t> ptr mem)
  9215  	// cond: is16BitInt(t)
  9216  	// result: (MOVWload ptr mem)
  9217  	for {
  9218  		t := v.Type
  9219  		ptr := v_0
  9220  		mem := v_1
  9221  		if !(is16BitInt(t)) {
  9222  			break
  9223  		}
  9224  		v.reset(Op386MOVWload)
  9225  		v.AddArg2(ptr, mem)
  9226  		return true
  9227  	}
  9228  	// match: (Load <t> ptr mem)
  9229  	// cond: (t.IsBoolean() || is8BitInt(t))
  9230  	// result: (MOVBload ptr mem)
  9231  	for {
  9232  		t := v.Type
  9233  		ptr := v_0
  9234  		mem := v_1
  9235  		if !(t.IsBoolean() || is8BitInt(t)) {
  9236  			break
  9237  		}
  9238  		v.reset(Op386MOVBload)
  9239  		v.AddArg2(ptr, mem)
  9240  		return true
  9241  	}
  9242  	// match: (Load <t> ptr mem)
  9243  	// cond: is32BitFloat(t)
  9244  	// result: (MOVSSload ptr mem)
  9245  	for {
  9246  		t := v.Type
  9247  		ptr := v_0
  9248  		mem := v_1
  9249  		if !(is32BitFloat(t)) {
  9250  			break
  9251  		}
  9252  		v.reset(Op386MOVSSload)
  9253  		v.AddArg2(ptr, mem)
  9254  		return true
  9255  	}
  9256  	// match: (Load <t> ptr mem)
  9257  	// cond: is64BitFloat(t)
  9258  	// result: (MOVSDload ptr mem)
  9259  	for {
  9260  		t := v.Type
  9261  		ptr := v_0
  9262  		mem := v_1
  9263  		if !(is64BitFloat(t)) {
  9264  			break
  9265  		}
  9266  		v.reset(Op386MOVSDload)
  9267  		v.AddArg2(ptr, mem)
  9268  		return true
  9269  	}
  9270  	return false
  9271  }
  9272  func rewriteValue386_OpLocalAddr(v *Value) bool {
  9273  	v_0 := v.Args[0]
  9274  	// match: (LocalAddr {sym} base _)
  9275  	// result: (LEAL {sym} base)
  9276  	for {
  9277  		sym := auxToSym(v.Aux)
  9278  		base := v_0
  9279  		v.reset(Op386LEAL)
  9280  		v.Aux = symToAux(sym)
  9281  		v.AddArg(base)
  9282  		return true
  9283  	}
  9284  }
  9285  func rewriteValue386_OpLsh16x16(v *Value) bool {
  9286  	v_1 := v.Args[1]
  9287  	v_0 := v.Args[0]
  9288  	b := v.Block
  9289  	// match: (Lsh16x16 <t> x y)
  9290  	// cond: !shiftIsBounded(v)
  9291  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9292  	for {
  9293  		t := v.Type
  9294  		x := v_0
  9295  		y := v_1
  9296  		if !(!shiftIsBounded(v)) {
  9297  			break
  9298  		}
  9299  		v.reset(Op386ANDL)
  9300  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9301  		v0.AddArg2(x, y)
  9302  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9303  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9304  		v2.AuxInt = int16ToAuxInt(32)
  9305  		v2.AddArg(y)
  9306  		v1.AddArg(v2)
  9307  		v.AddArg2(v0, v1)
  9308  		return true
  9309  	}
  9310  	// match: (Lsh16x16 <t> x y)
  9311  	// cond: shiftIsBounded(v)
  9312  	// result: (SHLL <t> x y)
  9313  	for {
  9314  		t := v.Type
  9315  		x := v_0
  9316  		y := v_1
  9317  		if !(shiftIsBounded(v)) {
  9318  			break
  9319  		}
  9320  		v.reset(Op386SHLL)
  9321  		v.Type = t
  9322  		v.AddArg2(x, y)
  9323  		return true
  9324  	}
  9325  	return false
  9326  }
  9327  func rewriteValue386_OpLsh16x32(v *Value) bool {
  9328  	v_1 := v.Args[1]
  9329  	v_0 := v.Args[0]
  9330  	b := v.Block
  9331  	// match: (Lsh16x32 <t> x y)
  9332  	// cond: !shiftIsBounded(v)
  9333  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9334  	for {
  9335  		t := v.Type
  9336  		x := v_0
  9337  		y := v_1
  9338  		if !(!shiftIsBounded(v)) {
  9339  			break
  9340  		}
  9341  		v.reset(Op386ANDL)
  9342  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9343  		v0.AddArg2(x, y)
  9344  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9345  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9346  		v2.AuxInt = int32ToAuxInt(32)
  9347  		v2.AddArg(y)
  9348  		v1.AddArg(v2)
  9349  		v.AddArg2(v0, v1)
  9350  		return true
  9351  	}
  9352  	// match: (Lsh16x32 <t> x y)
  9353  	// cond: shiftIsBounded(v)
  9354  	// result: (SHLL <t> x y)
  9355  	for {
  9356  		t := v.Type
  9357  		x := v_0
  9358  		y := v_1
  9359  		if !(shiftIsBounded(v)) {
  9360  			break
  9361  		}
  9362  		v.reset(Op386SHLL)
  9363  		v.Type = t
  9364  		v.AddArg2(x, y)
  9365  		return true
  9366  	}
  9367  	return false
  9368  }
  9369  func rewriteValue386_OpLsh16x64(v *Value) bool {
  9370  	v_1 := v.Args[1]
  9371  	v_0 := v.Args[0]
  9372  	// match: (Lsh16x64 x (Const64 [c]))
  9373  	// cond: uint64(c) < 16
  9374  	// result: (SHLLconst x [int32(c)])
  9375  	for {
  9376  		x := v_0
  9377  		if v_1.Op != OpConst64 {
  9378  			break
  9379  		}
  9380  		c := auxIntToInt64(v_1.AuxInt)
  9381  		if !(uint64(c) < 16) {
  9382  			break
  9383  		}
  9384  		v.reset(Op386SHLLconst)
  9385  		v.AuxInt = int32ToAuxInt(int32(c))
  9386  		v.AddArg(x)
  9387  		return true
  9388  	}
  9389  	// match: (Lsh16x64 _ (Const64 [c]))
  9390  	// cond: uint64(c) >= 16
  9391  	// result: (Const16 [0])
  9392  	for {
  9393  		if v_1.Op != OpConst64 {
  9394  			break
  9395  		}
  9396  		c := auxIntToInt64(v_1.AuxInt)
  9397  		if !(uint64(c) >= 16) {
  9398  			break
  9399  		}
  9400  		v.reset(OpConst16)
  9401  		v.AuxInt = int16ToAuxInt(0)
  9402  		return true
  9403  	}
  9404  	return false
  9405  }
  9406  func rewriteValue386_OpLsh16x8(v *Value) bool {
  9407  	v_1 := v.Args[1]
  9408  	v_0 := v.Args[0]
  9409  	b := v.Block
  9410  	// match: (Lsh16x8 <t> x y)
  9411  	// cond: !shiftIsBounded(v)
  9412  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9413  	for {
  9414  		t := v.Type
  9415  		x := v_0
  9416  		y := v_1
  9417  		if !(!shiftIsBounded(v)) {
  9418  			break
  9419  		}
  9420  		v.reset(Op386ANDL)
  9421  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9422  		v0.AddArg2(x, y)
  9423  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9424  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9425  		v2.AuxInt = int8ToAuxInt(32)
  9426  		v2.AddArg(y)
  9427  		v1.AddArg(v2)
  9428  		v.AddArg2(v0, v1)
  9429  		return true
  9430  	}
  9431  	// match: (Lsh16x8 <t> x y)
  9432  	// cond: shiftIsBounded(v)
  9433  	// result: (SHLL <t> x y)
  9434  	for {
  9435  		t := v.Type
  9436  		x := v_0
  9437  		y := v_1
  9438  		if !(shiftIsBounded(v)) {
  9439  			break
  9440  		}
  9441  		v.reset(Op386SHLL)
  9442  		v.Type = t
  9443  		v.AddArg2(x, y)
  9444  		return true
  9445  	}
  9446  	return false
  9447  }
  9448  func rewriteValue386_OpLsh32x16(v *Value) bool {
  9449  	v_1 := v.Args[1]
  9450  	v_0 := v.Args[0]
  9451  	b := v.Block
  9452  	// match: (Lsh32x16 <t> x y)
  9453  	// cond: !shiftIsBounded(v)
  9454  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9455  	for {
  9456  		t := v.Type
  9457  		x := v_0
  9458  		y := v_1
  9459  		if !(!shiftIsBounded(v)) {
  9460  			break
  9461  		}
  9462  		v.reset(Op386ANDL)
  9463  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9464  		v0.AddArg2(x, y)
  9465  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9466  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9467  		v2.AuxInt = int16ToAuxInt(32)
  9468  		v2.AddArg(y)
  9469  		v1.AddArg(v2)
  9470  		v.AddArg2(v0, v1)
  9471  		return true
  9472  	}
  9473  	// match: (Lsh32x16 <t> x y)
  9474  	// cond: shiftIsBounded(v)
  9475  	// result: (SHLL <t> x y)
  9476  	for {
  9477  		t := v.Type
  9478  		x := v_0
  9479  		y := v_1
  9480  		if !(shiftIsBounded(v)) {
  9481  			break
  9482  		}
  9483  		v.reset(Op386SHLL)
  9484  		v.Type = t
  9485  		v.AddArg2(x, y)
  9486  		return true
  9487  	}
  9488  	return false
  9489  }
  9490  func rewriteValue386_OpLsh32x32(v *Value) bool {
  9491  	v_1 := v.Args[1]
  9492  	v_0 := v.Args[0]
  9493  	b := v.Block
  9494  	// match: (Lsh32x32 <t> x y)
  9495  	// cond: !shiftIsBounded(v)
  9496  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9497  	for {
  9498  		t := v.Type
  9499  		x := v_0
  9500  		y := v_1
  9501  		if !(!shiftIsBounded(v)) {
  9502  			break
  9503  		}
  9504  		v.reset(Op386ANDL)
  9505  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9506  		v0.AddArg2(x, y)
  9507  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9508  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9509  		v2.AuxInt = int32ToAuxInt(32)
  9510  		v2.AddArg(y)
  9511  		v1.AddArg(v2)
  9512  		v.AddArg2(v0, v1)
  9513  		return true
  9514  	}
  9515  	// match: (Lsh32x32 <t> x y)
  9516  	// cond: shiftIsBounded(v)
  9517  	// result: (SHLL <t> x y)
  9518  	for {
  9519  		t := v.Type
  9520  		x := v_0
  9521  		y := v_1
  9522  		if !(shiftIsBounded(v)) {
  9523  			break
  9524  		}
  9525  		v.reset(Op386SHLL)
  9526  		v.Type = t
  9527  		v.AddArg2(x, y)
  9528  		return true
  9529  	}
  9530  	return false
  9531  }
  9532  func rewriteValue386_OpLsh32x64(v *Value) bool {
  9533  	v_1 := v.Args[1]
  9534  	v_0 := v.Args[0]
  9535  	// match: (Lsh32x64 x (Const64 [c]))
  9536  	// cond: uint64(c) < 32
  9537  	// result: (SHLLconst x [int32(c)])
  9538  	for {
  9539  		x := v_0
  9540  		if v_1.Op != OpConst64 {
  9541  			break
  9542  		}
  9543  		c := auxIntToInt64(v_1.AuxInt)
  9544  		if !(uint64(c) < 32) {
  9545  			break
  9546  		}
  9547  		v.reset(Op386SHLLconst)
  9548  		v.AuxInt = int32ToAuxInt(int32(c))
  9549  		v.AddArg(x)
  9550  		return true
  9551  	}
  9552  	// match: (Lsh32x64 _ (Const64 [c]))
  9553  	// cond: uint64(c) >= 32
  9554  	// result: (Const32 [0])
  9555  	for {
  9556  		if v_1.Op != OpConst64 {
  9557  			break
  9558  		}
  9559  		c := auxIntToInt64(v_1.AuxInt)
  9560  		if !(uint64(c) >= 32) {
  9561  			break
  9562  		}
  9563  		v.reset(OpConst32)
  9564  		v.AuxInt = int32ToAuxInt(0)
  9565  		return true
  9566  	}
  9567  	return false
  9568  }
  9569  func rewriteValue386_OpLsh32x8(v *Value) bool {
  9570  	v_1 := v.Args[1]
  9571  	v_0 := v.Args[0]
  9572  	b := v.Block
  9573  	// match: (Lsh32x8 <t> x y)
  9574  	// cond: !shiftIsBounded(v)
  9575  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9576  	for {
  9577  		t := v.Type
  9578  		x := v_0
  9579  		y := v_1
  9580  		if !(!shiftIsBounded(v)) {
  9581  			break
  9582  		}
  9583  		v.reset(Op386ANDL)
  9584  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9585  		v0.AddArg2(x, y)
  9586  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9587  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9588  		v2.AuxInt = int8ToAuxInt(32)
  9589  		v2.AddArg(y)
  9590  		v1.AddArg(v2)
  9591  		v.AddArg2(v0, v1)
  9592  		return true
  9593  	}
  9594  	// match: (Lsh32x8 <t> x y)
  9595  	// cond: shiftIsBounded(v)
  9596  	// result: (SHLL <t> x y)
  9597  	for {
  9598  		t := v.Type
  9599  		x := v_0
  9600  		y := v_1
  9601  		if !(shiftIsBounded(v)) {
  9602  			break
  9603  		}
  9604  		v.reset(Op386SHLL)
  9605  		v.Type = t
  9606  		v.AddArg2(x, y)
  9607  		return true
  9608  	}
  9609  	return false
  9610  }
  9611  func rewriteValue386_OpLsh8x16(v *Value) bool {
  9612  	v_1 := v.Args[1]
  9613  	v_0 := v.Args[0]
  9614  	b := v.Block
  9615  	// match: (Lsh8x16 <t> x y)
  9616  	// cond: !shiftIsBounded(v)
  9617  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
  9618  	for {
  9619  		t := v.Type
  9620  		x := v_0
  9621  		y := v_1
  9622  		if !(!shiftIsBounded(v)) {
  9623  			break
  9624  		}
  9625  		v.reset(Op386ANDL)
  9626  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9627  		v0.AddArg2(x, y)
  9628  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9629  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
  9630  		v2.AuxInt = int16ToAuxInt(32)
  9631  		v2.AddArg(y)
  9632  		v1.AddArg(v2)
  9633  		v.AddArg2(v0, v1)
  9634  		return true
  9635  	}
  9636  	// match: (Lsh8x16 <t> x y)
  9637  	// cond: shiftIsBounded(v)
  9638  	// result: (SHLL <t> x y)
  9639  	for {
  9640  		t := v.Type
  9641  		x := v_0
  9642  		y := v_1
  9643  		if !(shiftIsBounded(v)) {
  9644  			break
  9645  		}
  9646  		v.reset(Op386SHLL)
  9647  		v.Type = t
  9648  		v.AddArg2(x, y)
  9649  		return true
  9650  	}
  9651  	return false
  9652  }
  9653  func rewriteValue386_OpLsh8x32(v *Value) bool {
  9654  	v_1 := v.Args[1]
  9655  	v_0 := v.Args[0]
  9656  	b := v.Block
  9657  	// match: (Lsh8x32 <t> x y)
  9658  	// cond: !shiftIsBounded(v)
  9659  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
  9660  	for {
  9661  		t := v.Type
  9662  		x := v_0
  9663  		y := v_1
  9664  		if !(!shiftIsBounded(v)) {
  9665  			break
  9666  		}
  9667  		v.reset(Op386ANDL)
  9668  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9669  		v0.AddArg2(x, y)
  9670  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9671  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
  9672  		v2.AuxInt = int32ToAuxInt(32)
  9673  		v2.AddArg(y)
  9674  		v1.AddArg(v2)
  9675  		v.AddArg2(v0, v1)
  9676  		return true
  9677  	}
  9678  	// match: (Lsh8x32 <t> x y)
  9679  	// cond: shiftIsBounded(v)
  9680  	// result: (SHLL <t> x y)
  9681  	for {
  9682  		t := v.Type
  9683  		x := v_0
  9684  		y := v_1
  9685  		if !(shiftIsBounded(v)) {
  9686  			break
  9687  		}
  9688  		v.reset(Op386SHLL)
  9689  		v.Type = t
  9690  		v.AddArg2(x, y)
  9691  		return true
  9692  	}
  9693  	return false
  9694  }
  9695  func rewriteValue386_OpLsh8x64(v *Value) bool {
  9696  	v_1 := v.Args[1]
  9697  	v_0 := v.Args[0]
  9698  	// match: (Lsh8x64 x (Const64 [c]))
  9699  	// cond: uint64(c) < 8
  9700  	// result: (SHLLconst x [int32(c)])
  9701  	for {
  9702  		x := v_0
  9703  		if v_1.Op != OpConst64 {
  9704  			break
  9705  		}
  9706  		c := auxIntToInt64(v_1.AuxInt)
  9707  		if !(uint64(c) < 8) {
  9708  			break
  9709  		}
  9710  		v.reset(Op386SHLLconst)
  9711  		v.AuxInt = int32ToAuxInt(int32(c))
  9712  		v.AddArg(x)
  9713  		return true
  9714  	}
  9715  	// match: (Lsh8x64 _ (Const64 [c]))
  9716  	// cond: uint64(c) >= 8
  9717  	// result: (Const8 [0])
  9718  	for {
  9719  		if v_1.Op != OpConst64 {
  9720  			break
  9721  		}
  9722  		c := auxIntToInt64(v_1.AuxInt)
  9723  		if !(uint64(c) >= 8) {
  9724  			break
  9725  		}
  9726  		v.reset(OpConst8)
  9727  		v.AuxInt = int8ToAuxInt(0)
  9728  		return true
  9729  	}
  9730  	return false
  9731  }
  9732  func rewriteValue386_OpLsh8x8(v *Value) bool {
  9733  	v_1 := v.Args[1]
  9734  	v_0 := v.Args[0]
  9735  	b := v.Block
  9736  	// match: (Lsh8x8 <t> x y)
  9737  	// cond: !shiftIsBounded(v)
  9738  	// result: (ANDL (SHLL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
  9739  	for {
  9740  		t := v.Type
  9741  		x := v_0
  9742  		y := v_1
  9743  		if !(!shiftIsBounded(v)) {
  9744  			break
  9745  		}
  9746  		v.reset(Op386ANDL)
  9747  		v0 := b.NewValue0(v.Pos, Op386SHLL, t)
  9748  		v0.AddArg2(x, y)
  9749  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
  9750  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
  9751  		v2.AuxInt = int8ToAuxInt(32)
  9752  		v2.AddArg(y)
  9753  		v1.AddArg(v2)
  9754  		v.AddArg2(v0, v1)
  9755  		return true
  9756  	}
  9757  	// match: (Lsh8x8 <t> x y)
  9758  	// cond: shiftIsBounded(v)
  9759  	// result: (SHLL <t> x y)
  9760  	for {
  9761  		t := v.Type
  9762  		x := v_0
  9763  		y := v_1
  9764  		if !(shiftIsBounded(v)) {
  9765  			break
  9766  		}
  9767  		v.reset(Op386SHLL)
  9768  		v.Type = t
  9769  		v.AddArg2(x, y)
  9770  		return true
  9771  	}
  9772  	return false
  9773  }
  9774  func rewriteValue386_OpMod8(v *Value) bool {
  9775  	v_1 := v.Args[1]
  9776  	v_0 := v.Args[0]
  9777  	b := v.Block
  9778  	typ := &b.Func.Config.Types
  9779  	// match: (Mod8 x y)
  9780  	// result: (MODW (SignExt8to16 x) (SignExt8to16 y))
  9781  	for {
  9782  		x := v_0
  9783  		y := v_1
  9784  		v.reset(Op386MODW)
  9785  		v0 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  9786  		v0.AddArg(x)
  9787  		v1 := b.NewValue0(v.Pos, OpSignExt8to16, typ.Int16)
  9788  		v1.AddArg(y)
  9789  		v.AddArg2(v0, v1)
  9790  		return true
  9791  	}
  9792  }
  9793  func rewriteValue386_OpMod8u(v *Value) bool {
  9794  	v_1 := v.Args[1]
  9795  	v_0 := v.Args[0]
  9796  	b := v.Block
  9797  	typ := &b.Func.Config.Types
  9798  	// match: (Mod8u x y)
  9799  	// result: (MODWU (ZeroExt8to16 x) (ZeroExt8to16 y))
  9800  	for {
  9801  		x := v_0
  9802  		y := v_1
  9803  		v.reset(Op386MODWU)
  9804  		v0 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  9805  		v0.AddArg(x)
  9806  		v1 := b.NewValue0(v.Pos, OpZeroExt8to16, typ.UInt16)
  9807  		v1.AddArg(y)
  9808  		v.AddArg2(v0, v1)
  9809  		return true
  9810  	}
  9811  }
  9812  func rewriteValue386_OpMove(v *Value) bool {
  9813  	v_2 := v.Args[2]
  9814  	v_1 := v.Args[1]
  9815  	v_0 := v.Args[0]
  9816  	b := v.Block
  9817  	config := b.Func.Config
  9818  	typ := &b.Func.Config.Types
  9819  	// match: (Move [0] _ _ mem)
  9820  	// result: mem
  9821  	for {
  9822  		if auxIntToInt64(v.AuxInt) != 0 {
  9823  			break
  9824  		}
  9825  		mem := v_2
  9826  		v.copyOf(mem)
  9827  		return true
  9828  	}
  9829  	// match: (Move [1] dst src mem)
  9830  	// result: (MOVBstore dst (MOVBload src mem) mem)
  9831  	for {
  9832  		if auxIntToInt64(v.AuxInt) != 1 {
  9833  			break
  9834  		}
  9835  		dst := v_0
  9836  		src := v_1
  9837  		mem := v_2
  9838  		v.reset(Op386MOVBstore)
  9839  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9840  		v0.AddArg2(src, mem)
  9841  		v.AddArg3(dst, v0, mem)
  9842  		return true
  9843  	}
  9844  	// match: (Move [2] dst src mem)
  9845  	// result: (MOVWstore dst (MOVWload src mem) mem)
  9846  	for {
  9847  		if auxIntToInt64(v.AuxInt) != 2 {
  9848  			break
  9849  		}
  9850  		dst := v_0
  9851  		src := v_1
  9852  		mem := v_2
  9853  		v.reset(Op386MOVWstore)
  9854  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9855  		v0.AddArg2(src, mem)
  9856  		v.AddArg3(dst, v0, mem)
  9857  		return true
  9858  	}
  9859  	// match: (Move [4] dst src mem)
  9860  	// result: (MOVLstore dst (MOVLload src mem) mem)
  9861  	for {
  9862  		if auxIntToInt64(v.AuxInt) != 4 {
  9863  			break
  9864  		}
  9865  		dst := v_0
  9866  		src := v_1
  9867  		mem := v_2
  9868  		v.reset(Op386MOVLstore)
  9869  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9870  		v0.AddArg2(src, mem)
  9871  		v.AddArg3(dst, v0, mem)
  9872  		return true
  9873  	}
  9874  	// match: (Move [3] dst src mem)
  9875  	// result: (MOVBstore [2] dst (MOVBload [2] src mem) (MOVWstore dst (MOVWload src mem) mem))
  9876  	for {
  9877  		if auxIntToInt64(v.AuxInt) != 3 {
  9878  			break
  9879  		}
  9880  		dst := v_0
  9881  		src := v_1
  9882  		mem := v_2
  9883  		v.reset(Op386MOVBstore)
  9884  		v.AuxInt = int32ToAuxInt(2)
  9885  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9886  		v0.AuxInt = int32ToAuxInt(2)
  9887  		v0.AddArg2(src, mem)
  9888  		v1 := b.NewValue0(v.Pos, Op386MOVWstore, types.TypeMem)
  9889  		v2 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9890  		v2.AddArg2(src, mem)
  9891  		v1.AddArg3(dst, v2, mem)
  9892  		v.AddArg3(dst, v0, v1)
  9893  		return true
  9894  	}
  9895  	// match: (Move [5] dst src mem)
  9896  	// result: (MOVBstore [4] dst (MOVBload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9897  	for {
  9898  		if auxIntToInt64(v.AuxInt) != 5 {
  9899  			break
  9900  		}
  9901  		dst := v_0
  9902  		src := v_1
  9903  		mem := v_2
  9904  		v.reset(Op386MOVBstore)
  9905  		v.AuxInt = int32ToAuxInt(4)
  9906  		v0 := b.NewValue0(v.Pos, Op386MOVBload, typ.UInt8)
  9907  		v0.AuxInt = int32ToAuxInt(4)
  9908  		v0.AddArg2(src, mem)
  9909  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9910  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9911  		v2.AddArg2(src, mem)
  9912  		v1.AddArg3(dst, v2, mem)
  9913  		v.AddArg3(dst, v0, v1)
  9914  		return true
  9915  	}
  9916  	// match: (Move [6] dst src mem)
  9917  	// result: (MOVWstore [4] dst (MOVWload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9918  	for {
  9919  		if auxIntToInt64(v.AuxInt) != 6 {
  9920  			break
  9921  		}
  9922  		dst := v_0
  9923  		src := v_1
  9924  		mem := v_2
  9925  		v.reset(Op386MOVWstore)
  9926  		v.AuxInt = int32ToAuxInt(4)
  9927  		v0 := b.NewValue0(v.Pos, Op386MOVWload, typ.UInt16)
  9928  		v0.AuxInt = int32ToAuxInt(4)
  9929  		v0.AddArg2(src, mem)
  9930  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9931  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9932  		v2.AddArg2(src, mem)
  9933  		v1.AddArg3(dst, v2, mem)
  9934  		v.AddArg3(dst, v0, v1)
  9935  		return true
  9936  	}
  9937  	// match: (Move [7] dst src mem)
  9938  	// result: (MOVLstore [3] dst (MOVLload [3] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9939  	for {
  9940  		if auxIntToInt64(v.AuxInt) != 7 {
  9941  			break
  9942  		}
  9943  		dst := v_0
  9944  		src := v_1
  9945  		mem := v_2
  9946  		v.reset(Op386MOVLstore)
  9947  		v.AuxInt = int32ToAuxInt(3)
  9948  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9949  		v0.AuxInt = int32ToAuxInt(3)
  9950  		v0.AddArg2(src, mem)
  9951  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9952  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9953  		v2.AddArg2(src, mem)
  9954  		v1.AddArg3(dst, v2, mem)
  9955  		v.AddArg3(dst, v0, v1)
  9956  		return true
  9957  	}
  9958  	// match: (Move [8] dst src mem)
  9959  	// result: (MOVLstore [4] dst (MOVLload [4] src mem) (MOVLstore dst (MOVLload src mem) mem))
  9960  	for {
  9961  		if auxIntToInt64(v.AuxInt) != 8 {
  9962  			break
  9963  		}
  9964  		dst := v_0
  9965  		src := v_1
  9966  		mem := v_2
  9967  		v.reset(Op386MOVLstore)
  9968  		v.AuxInt = int32ToAuxInt(4)
  9969  		v0 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9970  		v0.AuxInt = int32ToAuxInt(4)
  9971  		v0.AddArg2(src, mem)
  9972  		v1 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9973  		v2 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
  9974  		v2.AddArg2(src, mem)
  9975  		v1.AddArg3(dst, v2, mem)
  9976  		v.AddArg3(dst, v0, v1)
  9977  		return true
  9978  	}
  9979  	// match: (Move [s] dst src mem)
  9980  	// cond: s > 8 && s%4 != 0
  9981  	// 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))
  9982  	for {
  9983  		s := auxIntToInt64(v.AuxInt)
  9984  		dst := v_0
  9985  		src := v_1
  9986  		mem := v_2
  9987  		if !(s > 8 && s%4 != 0) {
  9988  			break
  9989  		}
  9990  		v.reset(OpMove)
  9991  		v.AuxInt = int64ToAuxInt(s - s%4)
  9992  		v0 := b.NewValue0(v.Pos, Op386ADDLconst, dst.Type)
  9993  		v0.AuxInt = int32ToAuxInt(int32(s % 4))
  9994  		v0.AddArg(dst)
  9995  		v1 := b.NewValue0(v.Pos, Op386ADDLconst, src.Type)
  9996  		v1.AuxInt = int32ToAuxInt(int32(s % 4))
  9997  		v1.AddArg(src)
  9998  		v2 := b.NewValue0(v.Pos, Op386MOVLstore, types.TypeMem)
  9999  		v3 := b.NewValue0(v.Pos, Op386MOVLload, typ.UInt32)
 10000  		v3.AddArg2(src, mem)
 10001  		v2.AddArg3(dst, v3, mem)
 10002  		v.AddArg3(v0, v1, v2)
 10003  		return true
 10004  	}
 10005  	// match: (Move [s] dst src mem)
 10006  	// cond: s > 8 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice && logLargeCopy(v, s)
 10007  	// result: (DUFFCOPY [10*(128-s/4)] dst src mem)
 10008  	for {
 10009  		s := auxIntToInt64(v.AuxInt)
 10010  		dst := v_0
 10011  		src := v_1
 10012  		mem := v_2
 10013  		if !(s > 8 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice && logLargeCopy(v, s)) {
 10014  			break
 10015  		}
 10016  		v.reset(Op386DUFFCOPY)
 10017  		v.AuxInt = int64ToAuxInt(10 * (128 - s/4))
 10018  		v.AddArg3(dst, src, mem)
 10019  		return true
 10020  	}
 10021  	// match: (Move [s] dst src mem)
 10022  	// cond: (s > 4*128 || config.noDuffDevice) && s%4 == 0 && logLargeCopy(v, s)
 10023  	// result: (REPMOVSL dst src (MOVLconst [int32(s/4)]) mem)
 10024  	for {
 10025  		s := auxIntToInt64(v.AuxInt)
 10026  		dst := v_0
 10027  		src := v_1
 10028  		mem := v_2
 10029  		if !((s > 4*128 || config.noDuffDevice) && s%4 == 0 && logLargeCopy(v, s)) {
 10030  			break
 10031  		}
 10032  		v.reset(Op386REPMOVSL)
 10033  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 10034  		v0.AuxInt = int32ToAuxInt(int32(s / 4))
 10035  		v.AddArg4(dst, src, v0, mem)
 10036  		return true
 10037  	}
 10038  	return false
 10039  }
 10040  func rewriteValue386_OpNeg32F(v *Value) bool {
 10041  	v_0 := v.Args[0]
 10042  	b := v.Block
 10043  	typ := &b.Func.Config.Types
 10044  	// match: (Neg32F x)
 10045  	// result: (PXOR x (MOVSSconst <typ.Float32> [float32(math.Copysign(0, -1))]))
 10046  	for {
 10047  		x := v_0
 10048  		v.reset(Op386PXOR)
 10049  		v0 := b.NewValue0(v.Pos, Op386MOVSSconst, typ.Float32)
 10050  		v0.AuxInt = float32ToAuxInt(float32(math.Copysign(0, -1)))
 10051  		v.AddArg2(x, v0)
 10052  		return true
 10053  	}
 10054  }
 10055  func rewriteValue386_OpNeg64F(v *Value) bool {
 10056  	v_0 := v.Args[0]
 10057  	b := v.Block
 10058  	typ := &b.Func.Config.Types
 10059  	// match: (Neg64F x)
 10060  	// result: (PXOR x (MOVSDconst <typ.Float64> [math.Copysign(0, -1)]))
 10061  	for {
 10062  		x := v_0
 10063  		v.reset(Op386PXOR)
 10064  		v0 := b.NewValue0(v.Pos, Op386MOVSDconst, typ.Float64)
 10065  		v0.AuxInt = float64ToAuxInt(math.Copysign(0, -1))
 10066  		v.AddArg2(x, v0)
 10067  		return true
 10068  	}
 10069  }
 10070  func rewriteValue386_OpNeq16(v *Value) bool {
 10071  	v_1 := v.Args[1]
 10072  	v_0 := v.Args[0]
 10073  	b := v.Block
 10074  	// match: (Neq16 x y)
 10075  	// result: (SETNE (CMPW x y))
 10076  	for {
 10077  		x := v_0
 10078  		y := v_1
 10079  		v.reset(Op386SETNE)
 10080  		v0 := b.NewValue0(v.Pos, Op386CMPW, types.TypeFlags)
 10081  		v0.AddArg2(x, y)
 10082  		v.AddArg(v0)
 10083  		return true
 10084  	}
 10085  }
 10086  func rewriteValue386_OpNeq32(v *Value) bool {
 10087  	v_1 := v.Args[1]
 10088  	v_0 := v.Args[0]
 10089  	b := v.Block
 10090  	// match: (Neq32 x y)
 10091  	// result: (SETNE (CMPL x y))
 10092  	for {
 10093  		x := v_0
 10094  		y := v_1
 10095  		v.reset(Op386SETNE)
 10096  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
 10097  		v0.AddArg2(x, y)
 10098  		v.AddArg(v0)
 10099  		return true
 10100  	}
 10101  }
 10102  func rewriteValue386_OpNeq32F(v *Value) bool {
 10103  	v_1 := v.Args[1]
 10104  	v_0 := v.Args[0]
 10105  	b := v.Block
 10106  	// match: (Neq32F x y)
 10107  	// result: (SETNEF (UCOMISS x y))
 10108  	for {
 10109  		x := v_0
 10110  		y := v_1
 10111  		v.reset(Op386SETNEF)
 10112  		v0 := b.NewValue0(v.Pos, Op386UCOMISS, types.TypeFlags)
 10113  		v0.AddArg2(x, y)
 10114  		v.AddArg(v0)
 10115  		return true
 10116  	}
 10117  }
 10118  func rewriteValue386_OpNeq64F(v *Value) bool {
 10119  	v_1 := v.Args[1]
 10120  	v_0 := v.Args[0]
 10121  	b := v.Block
 10122  	// match: (Neq64F x y)
 10123  	// result: (SETNEF (UCOMISD x y))
 10124  	for {
 10125  		x := v_0
 10126  		y := v_1
 10127  		v.reset(Op386SETNEF)
 10128  		v0 := b.NewValue0(v.Pos, Op386UCOMISD, types.TypeFlags)
 10129  		v0.AddArg2(x, y)
 10130  		v.AddArg(v0)
 10131  		return true
 10132  	}
 10133  }
 10134  func rewriteValue386_OpNeq8(v *Value) bool {
 10135  	v_1 := v.Args[1]
 10136  	v_0 := v.Args[0]
 10137  	b := v.Block
 10138  	// match: (Neq8 x y)
 10139  	// result: (SETNE (CMPB x y))
 10140  	for {
 10141  		x := v_0
 10142  		y := v_1
 10143  		v.reset(Op386SETNE)
 10144  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
 10145  		v0.AddArg2(x, y)
 10146  		v.AddArg(v0)
 10147  		return true
 10148  	}
 10149  }
 10150  func rewriteValue386_OpNeqB(v *Value) bool {
 10151  	v_1 := v.Args[1]
 10152  	v_0 := v.Args[0]
 10153  	b := v.Block
 10154  	// match: (NeqB x y)
 10155  	// result: (SETNE (CMPB x y))
 10156  	for {
 10157  		x := v_0
 10158  		y := v_1
 10159  		v.reset(Op386SETNE)
 10160  		v0 := b.NewValue0(v.Pos, Op386CMPB, types.TypeFlags)
 10161  		v0.AddArg2(x, y)
 10162  		v.AddArg(v0)
 10163  		return true
 10164  	}
 10165  }
 10166  func rewriteValue386_OpNeqPtr(v *Value) bool {
 10167  	v_1 := v.Args[1]
 10168  	v_0 := v.Args[0]
 10169  	b := v.Block
 10170  	// match: (NeqPtr x y)
 10171  	// result: (SETNE (CMPL x y))
 10172  	for {
 10173  		x := v_0
 10174  		y := v_1
 10175  		v.reset(Op386SETNE)
 10176  		v0 := b.NewValue0(v.Pos, Op386CMPL, types.TypeFlags)
 10177  		v0.AddArg2(x, y)
 10178  		v.AddArg(v0)
 10179  		return true
 10180  	}
 10181  }
 10182  func rewriteValue386_OpNot(v *Value) bool {
 10183  	v_0 := v.Args[0]
 10184  	// match: (Not x)
 10185  	// result: (XORLconst [1] x)
 10186  	for {
 10187  		x := v_0
 10188  		v.reset(Op386XORLconst)
 10189  		v.AuxInt = int32ToAuxInt(1)
 10190  		v.AddArg(x)
 10191  		return true
 10192  	}
 10193  }
 10194  func rewriteValue386_OpOffPtr(v *Value) bool {
 10195  	v_0 := v.Args[0]
 10196  	// match: (OffPtr [off] ptr)
 10197  	// result: (ADDLconst [int32(off)] ptr)
 10198  	for {
 10199  		off := auxIntToInt64(v.AuxInt)
 10200  		ptr := v_0
 10201  		v.reset(Op386ADDLconst)
 10202  		v.AuxInt = int32ToAuxInt(int32(off))
 10203  		v.AddArg(ptr)
 10204  		return true
 10205  	}
 10206  }
 10207  func rewriteValue386_OpPanicBounds(v *Value) bool {
 10208  	v_2 := v.Args[2]
 10209  	v_1 := v.Args[1]
 10210  	v_0 := v.Args[0]
 10211  	// match: (PanicBounds [kind] x y mem)
 10212  	// cond: boundsABI(kind) == 0
 10213  	// result: (LoweredPanicBoundsA [kind] x y mem)
 10214  	for {
 10215  		kind := auxIntToInt64(v.AuxInt)
 10216  		x := v_0
 10217  		y := v_1
 10218  		mem := v_2
 10219  		if !(boundsABI(kind) == 0) {
 10220  			break
 10221  		}
 10222  		v.reset(Op386LoweredPanicBoundsA)
 10223  		v.AuxInt = int64ToAuxInt(kind)
 10224  		v.AddArg3(x, y, mem)
 10225  		return true
 10226  	}
 10227  	// match: (PanicBounds [kind] x y mem)
 10228  	// cond: boundsABI(kind) == 1
 10229  	// result: (LoweredPanicBoundsB [kind] x y mem)
 10230  	for {
 10231  		kind := auxIntToInt64(v.AuxInt)
 10232  		x := v_0
 10233  		y := v_1
 10234  		mem := v_2
 10235  		if !(boundsABI(kind) == 1) {
 10236  			break
 10237  		}
 10238  		v.reset(Op386LoweredPanicBoundsB)
 10239  		v.AuxInt = int64ToAuxInt(kind)
 10240  		v.AddArg3(x, y, mem)
 10241  		return true
 10242  	}
 10243  	// match: (PanicBounds [kind] x y mem)
 10244  	// cond: boundsABI(kind) == 2
 10245  	// result: (LoweredPanicBoundsC [kind] x y mem)
 10246  	for {
 10247  		kind := auxIntToInt64(v.AuxInt)
 10248  		x := v_0
 10249  		y := v_1
 10250  		mem := v_2
 10251  		if !(boundsABI(kind) == 2) {
 10252  			break
 10253  		}
 10254  		v.reset(Op386LoweredPanicBoundsC)
 10255  		v.AuxInt = int64ToAuxInt(kind)
 10256  		v.AddArg3(x, y, mem)
 10257  		return true
 10258  	}
 10259  	return false
 10260  }
 10261  func rewriteValue386_OpPanicExtend(v *Value) bool {
 10262  	v_3 := v.Args[3]
 10263  	v_2 := v.Args[2]
 10264  	v_1 := v.Args[1]
 10265  	v_0 := v.Args[0]
 10266  	// match: (PanicExtend [kind] hi lo y mem)
 10267  	// cond: boundsABI(kind) == 0
 10268  	// result: (LoweredPanicExtendA [kind] hi lo y mem)
 10269  	for {
 10270  		kind := auxIntToInt64(v.AuxInt)
 10271  		hi := v_0
 10272  		lo := v_1
 10273  		y := v_2
 10274  		mem := v_3
 10275  		if !(boundsABI(kind) == 0) {
 10276  			break
 10277  		}
 10278  		v.reset(Op386LoweredPanicExtendA)
 10279  		v.AuxInt = int64ToAuxInt(kind)
 10280  		v.AddArg4(hi, lo, y, mem)
 10281  		return true
 10282  	}
 10283  	// match: (PanicExtend [kind] hi lo y mem)
 10284  	// cond: boundsABI(kind) == 1
 10285  	// result: (LoweredPanicExtendB [kind] hi lo y mem)
 10286  	for {
 10287  		kind := auxIntToInt64(v.AuxInt)
 10288  		hi := v_0
 10289  		lo := v_1
 10290  		y := v_2
 10291  		mem := v_3
 10292  		if !(boundsABI(kind) == 1) {
 10293  			break
 10294  		}
 10295  		v.reset(Op386LoweredPanicExtendB)
 10296  		v.AuxInt = int64ToAuxInt(kind)
 10297  		v.AddArg4(hi, lo, y, mem)
 10298  		return true
 10299  	}
 10300  	// match: (PanicExtend [kind] hi lo y mem)
 10301  	// cond: boundsABI(kind) == 2
 10302  	// result: (LoweredPanicExtendC [kind] hi lo y mem)
 10303  	for {
 10304  		kind := auxIntToInt64(v.AuxInt)
 10305  		hi := v_0
 10306  		lo := v_1
 10307  		y := v_2
 10308  		mem := v_3
 10309  		if !(boundsABI(kind) == 2) {
 10310  			break
 10311  		}
 10312  		v.reset(Op386LoweredPanicExtendC)
 10313  		v.AuxInt = int64ToAuxInt(kind)
 10314  		v.AddArg4(hi, lo, y, mem)
 10315  		return true
 10316  	}
 10317  	return false
 10318  }
 10319  func rewriteValue386_OpRotateLeft16(v *Value) bool {
 10320  	v_1 := v.Args[1]
 10321  	v_0 := v.Args[0]
 10322  	// match: (RotateLeft16 x (MOVLconst [c]))
 10323  	// result: (ROLWconst [int16(c&15)] 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(Op386ROLWconst)
 10331  		v.AuxInt = int16ToAuxInt(int16(c & 15))
 10332  		v.AddArg(x)
 10333  		return true
 10334  	}
 10335  	return false
 10336  }
 10337  func rewriteValue386_OpRotateLeft32(v *Value) bool {
 10338  	v_1 := v.Args[1]
 10339  	v_0 := v.Args[0]
 10340  	// match: (RotateLeft32 x (MOVLconst [c]))
 10341  	// result: (ROLLconst [c&31] 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(Op386ROLLconst)
 10349  		v.AuxInt = int32ToAuxInt(c & 31)
 10350  		v.AddArg(x)
 10351  		return true
 10352  	}
 10353  	return false
 10354  }
 10355  func rewriteValue386_OpRotateLeft8(v *Value) bool {
 10356  	v_1 := v.Args[1]
 10357  	v_0 := v.Args[0]
 10358  	// match: (RotateLeft8 x (MOVLconst [c]))
 10359  	// result: (ROLBconst [int8(c&7)] x)
 10360  	for {
 10361  		x := v_0
 10362  		if v_1.Op != Op386MOVLconst {
 10363  			break
 10364  		}
 10365  		c := auxIntToInt32(v_1.AuxInt)
 10366  		v.reset(Op386ROLBconst)
 10367  		v.AuxInt = int8ToAuxInt(int8(c & 7))
 10368  		v.AddArg(x)
 10369  		return true
 10370  	}
 10371  	return false
 10372  }
 10373  func rewriteValue386_OpRsh16Ux16(v *Value) bool {
 10374  	v_1 := v.Args[1]
 10375  	v_0 := v.Args[0]
 10376  	b := v.Block
 10377  	// match: (Rsh16Ux16 <t> x y)
 10378  	// cond: !shiftIsBounded(v)
 10379  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPWconst y [16])))
 10380  	for {
 10381  		t := v.Type
 10382  		x := v_0
 10383  		y := v_1
 10384  		if !(!shiftIsBounded(v)) {
 10385  			break
 10386  		}
 10387  		v.reset(Op386ANDL)
 10388  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
 10389  		v0.AddArg2(x, y)
 10390  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10391  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10392  		v2.AuxInt = int16ToAuxInt(16)
 10393  		v2.AddArg(y)
 10394  		v1.AddArg(v2)
 10395  		v.AddArg2(v0, v1)
 10396  		return true
 10397  	}
 10398  	// match: (Rsh16Ux16 <t> x y)
 10399  	// cond: shiftIsBounded(v)
 10400  	// result: (SHRW <t> x y)
 10401  	for {
 10402  		t := v.Type
 10403  		x := v_0
 10404  		y := v_1
 10405  		if !(shiftIsBounded(v)) {
 10406  			break
 10407  		}
 10408  		v.reset(Op386SHRW)
 10409  		v.Type = t
 10410  		v.AddArg2(x, y)
 10411  		return true
 10412  	}
 10413  	return false
 10414  }
 10415  func rewriteValue386_OpRsh16Ux32(v *Value) bool {
 10416  	v_1 := v.Args[1]
 10417  	v_0 := v.Args[0]
 10418  	b := v.Block
 10419  	// match: (Rsh16Ux32 <t> x y)
 10420  	// cond: !shiftIsBounded(v)
 10421  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPLconst y [16])))
 10422  	for {
 10423  		t := v.Type
 10424  		x := v_0
 10425  		y := v_1
 10426  		if !(!shiftIsBounded(v)) {
 10427  			break
 10428  		}
 10429  		v.reset(Op386ANDL)
 10430  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
 10431  		v0.AddArg2(x, y)
 10432  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10433  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10434  		v2.AuxInt = int32ToAuxInt(16)
 10435  		v2.AddArg(y)
 10436  		v1.AddArg(v2)
 10437  		v.AddArg2(v0, v1)
 10438  		return true
 10439  	}
 10440  	// match: (Rsh16Ux32 <t> x y)
 10441  	// cond: shiftIsBounded(v)
 10442  	// result: (SHRW <t> x y)
 10443  	for {
 10444  		t := v.Type
 10445  		x := v_0
 10446  		y := v_1
 10447  		if !(shiftIsBounded(v)) {
 10448  			break
 10449  		}
 10450  		v.reset(Op386SHRW)
 10451  		v.Type = t
 10452  		v.AddArg2(x, y)
 10453  		return true
 10454  	}
 10455  	return false
 10456  }
 10457  func rewriteValue386_OpRsh16Ux64(v *Value) bool {
 10458  	v_1 := v.Args[1]
 10459  	v_0 := v.Args[0]
 10460  	// match: (Rsh16Ux64 x (Const64 [c]))
 10461  	// cond: uint64(c) < 16
 10462  	// result: (SHRWconst x [int16(c)])
 10463  	for {
 10464  		x := v_0
 10465  		if v_1.Op != OpConst64 {
 10466  			break
 10467  		}
 10468  		c := auxIntToInt64(v_1.AuxInt)
 10469  		if !(uint64(c) < 16) {
 10470  			break
 10471  		}
 10472  		v.reset(Op386SHRWconst)
 10473  		v.AuxInt = int16ToAuxInt(int16(c))
 10474  		v.AddArg(x)
 10475  		return true
 10476  	}
 10477  	// match: (Rsh16Ux64 _ (Const64 [c]))
 10478  	// cond: uint64(c) >= 16
 10479  	// result: (Const16 [0])
 10480  	for {
 10481  		if v_1.Op != OpConst64 {
 10482  			break
 10483  		}
 10484  		c := auxIntToInt64(v_1.AuxInt)
 10485  		if !(uint64(c) >= 16) {
 10486  			break
 10487  		}
 10488  		v.reset(OpConst16)
 10489  		v.AuxInt = int16ToAuxInt(0)
 10490  		return true
 10491  	}
 10492  	return false
 10493  }
 10494  func rewriteValue386_OpRsh16Ux8(v *Value) bool {
 10495  	v_1 := v.Args[1]
 10496  	v_0 := v.Args[0]
 10497  	b := v.Block
 10498  	// match: (Rsh16Ux8 <t> x y)
 10499  	// cond: !shiftIsBounded(v)
 10500  	// result: (ANDL (SHRW <t> x y) (SBBLcarrymask <t> (CMPBconst y [16])))
 10501  	for {
 10502  		t := v.Type
 10503  		x := v_0
 10504  		y := v_1
 10505  		if !(!shiftIsBounded(v)) {
 10506  			break
 10507  		}
 10508  		v.reset(Op386ANDL)
 10509  		v0 := b.NewValue0(v.Pos, Op386SHRW, t)
 10510  		v0.AddArg2(x, y)
 10511  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10512  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10513  		v2.AuxInt = int8ToAuxInt(16)
 10514  		v2.AddArg(y)
 10515  		v1.AddArg(v2)
 10516  		v.AddArg2(v0, v1)
 10517  		return true
 10518  	}
 10519  	// match: (Rsh16Ux8 <t> x y)
 10520  	// cond: shiftIsBounded(v)
 10521  	// result: (SHRW <t> x y)
 10522  	for {
 10523  		t := v.Type
 10524  		x := v_0
 10525  		y := v_1
 10526  		if !(shiftIsBounded(v)) {
 10527  			break
 10528  		}
 10529  		v.reset(Op386SHRW)
 10530  		v.Type = t
 10531  		v.AddArg2(x, y)
 10532  		return true
 10533  	}
 10534  	return false
 10535  }
 10536  func rewriteValue386_OpRsh16x16(v *Value) bool {
 10537  	v_1 := v.Args[1]
 10538  	v_0 := v.Args[0]
 10539  	b := v.Block
 10540  	// match: (Rsh16x16 <t> x y)
 10541  	// cond: !shiftIsBounded(v)
 10542  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [16])))))
 10543  	for {
 10544  		t := v.Type
 10545  		x := v_0
 10546  		y := v_1
 10547  		if !(!shiftIsBounded(v)) {
 10548  			break
 10549  		}
 10550  		v.reset(Op386SARW)
 10551  		v.Type = t
 10552  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10553  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10554  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10555  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10556  		v3.AuxInt = int16ToAuxInt(16)
 10557  		v3.AddArg(y)
 10558  		v2.AddArg(v3)
 10559  		v1.AddArg(v2)
 10560  		v0.AddArg2(y, v1)
 10561  		v.AddArg2(x, v0)
 10562  		return true
 10563  	}
 10564  	// match: (Rsh16x16 <t> x y)
 10565  	// cond: shiftIsBounded(v)
 10566  	// result: (SARW x y)
 10567  	for {
 10568  		x := v_0
 10569  		y := v_1
 10570  		if !(shiftIsBounded(v)) {
 10571  			break
 10572  		}
 10573  		v.reset(Op386SARW)
 10574  		v.AddArg2(x, y)
 10575  		return true
 10576  	}
 10577  	return false
 10578  }
 10579  func rewriteValue386_OpRsh16x32(v *Value) bool {
 10580  	v_1 := v.Args[1]
 10581  	v_0 := v.Args[0]
 10582  	b := v.Block
 10583  	// match: (Rsh16x32 <t> x y)
 10584  	// cond: !shiftIsBounded(v)
 10585  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [16])))))
 10586  	for {
 10587  		t := v.Type
 10588  		x := v_0
 10589  		y := v_1
 10590  		if !(!shiftIsBounded(v)) {
 10591  			break
 10592  		}
 10593  		v.reset(Op386SARW)
 10594  		v.Type = t
 10595  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10596  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10597  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10598  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10599  		v3.AuxInt = int32ToAuxInt(16)
 10600  		v3.AddArg(y)
 10601  		v2.AddArg(v3)
 10602  		v1.AddArg(v2)
 10603  		v0.AddArg2(y, v1)
 10604  		v.AddArg2(x, v0)
 10605  		return true
 10606  	}
 10607  	// match: (Rsh16x32 <t> x y)
 10608  	// cond: shiftIsBounded(v)
 10609  	// result: (SARW x y)
 10610  	for {
 10611  		x := v_0
 10612  		y := v_1
 10613  		if !(shiftIsBounded(v)) {
 10614  			break
 10615  		}
 10616  		v.reset(Op386SARW)
 10617  		v.AddArg2(x, y)
 10618  		return true
 10619  	}
 10620  	return false
 10621  }
 10622  func rewriteValue386_OpRsh16x64(v *Value) bool {
 10623  	v_1 := v.Args[1]
 10624  	v_0 := v.Args[0]
 10625  	// match: (Rsh16x64 x (Const64 [c]))
 10626  	// cond: uint64(c) < 16
 10627  	// result: (SARWconst x [int16(c)])
 10628  	for {
 10629  		x := v_0
 10630  		if v_1.Op != OpConst64 {
 10631  			break
 10632  		}
 10633  		c := auxIntToInt64(v_1.AuxInt)
 10634  		if !(uint64(c) < 16) {
 10635  			break
 10636  		}
 10637  		v.reset(Op386SARWconst)
 10638  		v.AuxInt = int16ToAuxInt(int16(c))
 10639  		v.AddArg(x)
 10640  		return true
 10641  	}
 10642  	// match: (Rsh16x64 x (Const64 [c]))
 10643  	// cond: uint64(c) >= 16
 10644  	// result: (SARWconst x [15])
 10645  	for {
 10646  		x := v_0
 10647  		if v_1.Op != OpConst64 {
 10648  			break
 10649  		}
 10650  		c := auxIntToInt64(v_1.AuxInt)
 10651  		if !(uint64(c) >= 16) {
 10652  			break
 10653  		}
 10654  		v.reset(Op386SARWconst)
 10655  		v.AuxInt = int16ToAuxInt(15)
 10656  		v.AddArg(x)
 10657  		return true
 10658  	}
 10659  	return false
 10660  }
 10661  func rewriteValue386_OpRsh16x8(v *Value) bool {
 10662  	v_1 := v.Args[1]
 10663  	v_0 := v.Args[0]
 10664  	b := v.Block
 10665  	// match: (Rsh16x8 <t> x y)
 10666  	// cond: !shiftIsBounded(v)
 10667  	// result: (SARW <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [16])))))
 10668  	for {
 10669  		t := v.Type
 10670  		x := v_0
 10671  		y := v_1
 10672  		if !(!shiftIsBounded(v)) {
 10673  			break
 10674  		}
 10675  		v.reset(Op386SARW)
 10676  		v.Type = t
 10677  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10678  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10679  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10680  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10681  		v3.AuxInt = int8ToAuxInt(16)
 10682  		v3.AddArg(y)
 10683  		v2.AddArg(v3)
 10684  		v1.AddArg(v2)
 10685  		v0.AddArg2(y, v1)
 10686  		v.AddArg2(x, v0)
 10687  		return true
 10688  	}
 10689  	// match: (Rsh16x8 <t> x y)
 10690  	// cond: shiftIsBounded(v)
 10691  	// result: (SARW x y)
 10692  	for {
 10693  		x := v_0
 10694  		y := v_1
 10695  		if !(shiftIsBounded(v)) {
 10696  			break
 10697  		}
 10698  		v.reset(Op386SARW)
 10699  		v.AddArg2(x, y)
 10700  		return true
 10701  	}
 10702  	return false
 10703  }
 10704  func rewriteValue386_OpRsh32Ux16(v *Value) bool {
 10705  	v_1 := v.Args[1]
 10706  	v_0 := v.Args[0]
 10707  	b := v.Block
 10708  	// match: (Rsh32Ux16 <t> x y)
 10709  	// cond: !shiftIsBounded(v)
 10710  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPWconst y [32])))
 10711  	for {
 10712  		t := v.Type
 10713  		x := v_0
 10714  		y := v_1
 10715  		if !(!shiftIsBounded(v)) {
 10716  			break
 10717  		}
 10718  		v.reset(Op386ANDL)
 10719  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
 10720  		v0.AddArg2(x, y)
 10721  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10722  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10723  		v2.AuxInt = int16ToAuxInt(32)
 10724  		v2.AddArg(y)
 10725  		v1.AddArg(v2)
 10726  		v.AddArg2(v0, v1)
 10727  		return true
 10728  	}
 10729  	// match: (Rsh32Ux16 <t> x y)
 10730  	// cond: shiftIsBounded(v)
 10731  	// result: (SHRL <t> x y)
 10732  	for {
 10733  		t := v.Type
 10734  		x := v_0
 10735  		y := v_1
 10736  		if !(shiftIsBounded(v)) {
 10737  			break
 10738  		}
 10739  		v.reset(Op386SHRL)
 10740  		v.Type = t
 10741  		v.AddArg2(x, y)
 10742  		return true
 10743  	}
 10744  	return false
 10745  }
 10746  func rewriteValue386_OpRsh32Ux32(v *Value) bool {
 10747  	v_1 := v.Args[1]
 10748  	v_0 := v.Args[0]
 10749  	b := v.Block
 10750  	// match: (Rsh32Ux32 <t> x y)
 10751  	// cond: !shiftIsBounded(v)
 10752  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPLconst y [32])))
 10753  	for {
 10754  		t := v.Type
 10755  		x := v_0
 10756  		y := v_1
 10757  		if !(!shiftIsBounded(v)) {
 10758  			break
 10759  		}
 10760  		v.reset(Op386ANDL)
 10761  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
 10762  		v0.AddArg2(x, y)
 10763  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10764  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10765  		v2.AuxInt = int32ToAuxInt(32)
 10766  		v2.AddArg(y)
 10767  		v1.AddArg(v2)
 10768  		v.AddArg2(v0, v1)
 10769  		return true
 10770  	}
 10771  	// match: (Rsh32Ux32 <t> x y)
 10772  	// cond: shiftIsBounded(v)
 10773  	// result: (SHRL <t> x y)
 10774  	for {
 10775  		t := v.Type
 10776  		x := v_0
 10777  		y := v_1
 10778  		if !(shiftIsBounded(v)) {
 10779  			break
 10780  		}
 10781  		v.reset(Op386SHRL)
 10782  		v.Type = t
 10783  		v.AddArg2(x, y)
 10784  		return true
 10785  	}
 10786  	return false
 10787  }
 10788  func rewriteValue386_OpRsh32Ux64(v *Value) bool {
 10789  	v_1 := v.Args[1]
 10790  	v_0 := v.Args[0]
 10791  	// match: (Rsh32Ux64 x (Const64 [c]))
 10792  	// cond: uint64(c) < 32
 10793  	// result: (SHRLconst x [int32(c)])
 10794  	for {
 10795  		x := v_0
 10796  		if v_1.Op != OpConst64 {
 10797  			break
 10798  		}
 10799  		c := auxIntToInt64(v_1.AuxInt)
 10800  		if !(uint64(c) < 32) {
 10801  			break
 10802  		}
 10803  		v.reset(Op386SHRLconst)
 10804  		v.AuxInt = int32ToAuxInt(int32(c))
 10805  		v.AddArg(x)
 10806  		return true
 10807  	}
 10808  	// match: (Rsh32Ux64 _ (Const64 [c]))
 10809  	// cond: uint64(c) >= 32
 10810  	// result: (Const32 [0])
 10811  	for {
 10812  		if v_1.Op != OpConst64 {
 10813  			break
 10814  		}
 10815  		c := auxIntToInt64(v_1.AuxInt)
 10816  		if !(uint64(c) >= 32) {
 10817  			break
 10818  		}
 10819  		v.reset(OpConst32)
 10820  		v.AuxInt = int32ToAuxInt(0)
 10821  		return true
 10822  	}
 10823  	return false
 10824  }
 10825  func rewriteValue386_OpRsh32Ux8(v *Value) bool {
 10826  	v_1 := v.Args[1]
 10827  	v_0 := v.Args[0]
 10828  	b := v.Block
 10829  	// match: (Rsh32Ux8 <t> x y)
 10830  	// cond: !shiftIsBounded(v)
 10831  	// result: (ANDL (SHRL <t> x y) (SBBLcarrymask <t> (CMPBconst y [32])))
 10832  	for {
 10833  		t := v.Type
 10834  		x := v_0
 10835  		y := v_1
 10836  		if !(!shiftIsBounded(v)) {
 10837  			break
 10838  		}
 10839  		v.reset(Op386ANDL)
 10840  		v0 := b.NewValue0(v.Pos, Op386SHRL, t)
 10841  		v0.AddArg2(x, y)
 10842  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 10843  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 10844  		v2.AuxInt = int8ToAuxInt(32)
 10845  		v2.AddArg(y)
 10846  		v1.AddArg(v2)
 10847  		v.AddArg2(v0, v1)
 10848  		return true
 10849  	}
 10850  	// match: (Rsh32Ux8 <t> x y)
 10851  	// cond: shiftIsBounded(v)
 10852  	// result: (SHRL <t> x y)
 10853  	for {
 10854  		t := v.Type
 10855  		x := v_0
 10856  		y := v_1
 10857  		if !(shiftIsBounded(v)) {
 10858  			break
 10859  		}
 10860  		v.reset(Op386SHRL)
 10861  		v.Type = t
 10862  		v.AddArg2(x, y)
 10863  		return true
 10864  	}
 10865  	return false
 10866  }
 10867  func rewriteValue386_OpRsh32x16(v *Value) bool {
 10868  	v_1 := v.Args[1]
 10869  	v_0 := v.Args[0]
 10870  	b := v.Block
 10871  	// match: (Rsh32x16 <t> x y)
 10872  	// cond: !shiftIsBounded(v)
 10873  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [32])))))
 10874  	for {
 10875  		t := v.Type
 10876  		x := v_0
 10877  		y := v_1
 10878  		if !(!shiftIsBounded(v)) {
 10879  			break
 10880  		}
 10881  		v.reset(Op386SARL)
 10882  		v.Type = t
 10883  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10884  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10885  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10886  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 10887  		v3.AuxInt = int16ToAuxInt(32)
 10888  		v3.AddArg(y)
 10889  		v2.AddArg(v3)
 10890  		v1.AddArg(v2)
 10891  		v0.AddArg2(y, v1)
 10892  		v.AddArg2(x, v0)
 10893  		return true
 10894  	}
 10895  	// match: (Rsh32x16 <t> x y)
 10896  	// cond: shiftIsBounded(v)
 10897  	// result: (SARL x y)
 10898  	for {
 10899  		x := v_0
 10900  		y := v_1
 10901  		if !(shiftIsBounded(v)) {
 10902  			break
 10903  		}
 10904  		v.reset(Op386SARL)
 10905  		v.AddArg2(x, y)
 10906  		return true
 10907  	}
 10908  	return false
 10909  }
 10910  func rewriteValue386_OpRsh32x32(v *Value) bool {
 10911  	v_1 := v.Args[1]
 10912  	v_0 := v.Args[0]
 10913  	b := v.Block
 10914  	// match: (Rsh32x32 <t> x y)
 10915  	// cond: !shiftIsBounded(v)
 10916  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [32])))))
 10917  	for {
 10918  		t := v.Type
 10919  		x := v_0
 10920  		y := v_1
 10921  		if !(!shiftIsBounded(v)) {
 10922  			break
 10923  		}
 10924  		v.reset(Op386SARL)
 10925  		v.Type = t
 10926  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 10927  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 10928  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 10929  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 10930  		v3.AuxInt = int32ToAuxInt(32)
 10931  		v3.AddArg(y)
 10932  		v2.AddArg(v3)
 10933  		v1.AddArg(v2)
 10934  		v0.AddArg2(y, v1)
 10935  		v.AddArg2(x, v0)
 10936  		return true
 10937  	}
 10938  	// match: (Rsh32x32 <t> x y)
 10939  	// cond: shiftIsBounded(v)
 10940  	// result: (SARL x y)
 10941  	for {
 10942  		x := v_0
 10943  		y := v_1
 10944  		if !(shiftIsBounded(v)) {
 10945  			break
 10946  		}
 10947  		v.reset(Op386SARL)
 10948  		v.AddArg2(x, y)
 10949  		return true
 10950  	}
 10951  	return false
 10952  }
 10953  func rewriteValue386_OpRsh32x64(v *Value) bool {
 10954  	v_1 := v.Args[1]
 10955  	v_0 := v.Args[0]
 10956  	// match: (Rsh32x64 x (Const64 [c]))
 10957  	// cond: uint64(c) < 32
 10958  	// result: (SARLconst x [int32(c)])
 10959  	for {
 10960  		x := v_0
 10961  		if v_1.Op != OpConst64 {
 10962  			break
 10963  		}
 10964  		c := auxIntToInt64(v_1.AuxInt)
 10965  		if !(uint64(c) < 32) {
 10966  			break
 10967  		}
 10968  		v.reset(Op386SARLconst)
 10969  		v.AuxInt = int32ToAuxInt(int32(c))
 10970  		v.AddArg(x)
 10971  		return true
 10972  	}
 10973  	// match: (Rsh32x64 x (Const64 [c]))
 10974  	// cond: uint64(c) >= 32
 10975  	// result: (SARLconst x [31])
 10976  	for {
 10977  		x := v_0
 10978  		if v_1.Op != OpConst64 {
 10979  			break
 10980  		}
 10981  		c := auxIntToInt64(v_1.AuxInt)
 10982  		if !(uint64(c) >= 32) {
 10983  			break
 10984  		}
 10985  		v.reset(Op386SARLconst)
 10986  		v.AuxInt = int32ToAuxInt(31)
 10987  		v.AddArg(x)
 10988  		return true
 10989  	}
 10990  	return false
 10991  }
 10992  func rewriteValue386_OpRsh32x8(v *Value) bool {
 10993  	v_1 := v.Args[1]
 10994  	v_0 := v.Args[0]
 10995  	b := v.Block
 10996  	// match: (Rsh32x8 <t> x y)
 10997  	// cond: !shiftIsBounded(v)
 10998  	// result: (SARL <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [32])))))
 10999  	for {
 11000  		t := v.Type
 11001  		x := v_0
 11002  		y := v_1
 11003  		if !(!shiftIsBounded(v)) {
 11004  			break
 11005  		}
 11006  		v.reset(Op386SARL)
 11007  		v.Type = t
 11008  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11009  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11010  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11011  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 11012  		v3.AuxInt = int8ToAuxInt(32)
 11013  		v3.AddArg(y)
 11014  		v2.AddArg(v3)
 11015  		v1.AddArg(v2)
 11016  		v0.AddArg2(y, v1)
 11017  		v.AddArg2(x, v0)
 11018  		return true
 11019  	}
 11020  	// match: (Rsh32x8 <t> x y)
 11021  	// cond: shiftIsBounded(v)
 11022  	// result: (SARL x y)
 11023  	for {
 11024  		x := v_0
 11025  		y := v_1
 11026  		if !(shiftIsBounded(v)) {
 11027  			break
 11028  		}
 11029  		v.reset(Op386SARL)
 11030  		v.AddArg2(x, y)
 11031  		return true
 11032  	}
 11033  	return false
 11034  }
 11035  func rewriteValue386_OpRsh8Ux16(v *Value) bool {
 11036  	v_1 := v.Args[1]
 11037  	v_0 := v.Args[0]
 11038  	b := v.Block
 11039  	// match: (Rsh8Ux16 <t> x y)
 11040  	// cond: !shiftIsBounded(v)
 11041  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPWconst y [8])))
 11042  	for {
 11043  		t := v.Type
 11044  		x := v_0
 11045  		y := v_1
 11046  		if !(!shiftIsBounded(v)) {
 11047  			break
 11048  		}
 11049  		v.reset(Op386ANDL)
 11050  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 11051  		v0.AddArg2(x, y)
 11052  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11053  		v2 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 11054  		v2.AuxInt = int16ToAuxInt(8)
 11055  		v2.AddArg(y)
 11056  		v1.AddArg(v2)
 11057  		v.AddArg2(v0, v1)
 11058  		return true
 11059  	}
 11060  	// match: (Rsh8Ux16 <t> x y)
 11061  	// cond: shiftIsBounded(v)
 11062  	// result: (SHRB <t> x y)
 11063  	for {
 11064  		t := v.Type
 11065  		x := v_0
 11066  		y := v_1
 11067  		if !(shiftIsBounded(v)) {
 11068  			break
 11069  		}
 11070  		v.reset(Op386SHRB)
 11071  		v.Type = t
 11072  		v.AddArg2(x, y)
 11073  		return true
 11074  	}
 11075  	return false
 11076  }
 11077  func rewriteValue386_OpRsh8Ux32(v *Value) bool {
 11078  	v_1 := v.Args[1]
 11079  	v_0 := v.Args[0]
 11080  	b := v.Block
 11081  	// match: (Rsh8Ux32 <t> x y)
 11082  	// cond: !shiftIsBounded(v)
 11083  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPLconst y [8])))
 11084  	for {
 11085  		t := v.Type
 11086  		x := v_0
 11087  		y := v_1
 11088  		if !(!shiftIsBounded(v)) {
 11089  			break
 11090  		}
 11091  		v.reset(Op386ANDL)
 11092  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 11093  		v0.AddArg2(x, y)
 11094  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11095  		v2 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 11096  		v2.AuxInt = int32ToAuxInt(8)
 11097  		v2.AddArg(y)
 11098  		v1.AddArg(v2)
 11099  		v.AddArg2(v0, v1)
 11100  		return true
 11101  	}
 11102  	// match: (Rsh8Ux32 <t> x y)
 11103  	// cond: shiftIsBounded(v)
 11104  	// result: (SHRB <t> x y)
 11105  	for {
 11106  		t := v.Type
 11107  		x := v_0
 11108  		y := v_1
 11109  		if !(shiftIsBounded(v)) {
 11110  			break
 11111  		}
 11112  		v.reset(Op386SHRB)
 11113  		v.Type = t
 11114  		v.AddArg2(x, y)
 11115  		return true
 11116  	}
 11117  	return false
 11118  }
 11119  func rewriteValue386_OpRsh8Ux64(v *Value) bool {
 11120  	v_1 := v.Args[1]
 11121  	v_0 := v.Args[0]
 11122  	// match: (Rsh8Ux64 x (Const64 [c]))
 11123  	// cond: uint64(c) < 8
 11124  	// result: (SHRBconst x [int8(c)])
 11125  	for {
 11126  		x := v_0
 11127  		if v_1.Op != OpConst64 {
 11128  			break
 11129  		}
 11130  		c := auxIntToInt64(v_1.AuxInt)
 11131  		if !(uint64(c) < 8) {
 11132  			break
 11133  		}
 11134  		v.reset(Op386SHRBconst)
 11135  		v.AuxInt = int8ToAuxInt(int8(c))
 11136  		v.AddArg(x)
 11137  		return true
 11138  	}
 11139  	// match: (Rsh8Ux64 _ (Const64 [c]))
 11140  	// cond: uint64(c) >= 8
 11141  	// result: (Const8 [0])
 11142  	for {
 11143  		if v_1.Op != OpConst64 {
 11144  			break
 11145  		}
 11146  		c := auxIntToInt64(v_1.AuxInt)
 11147  		if !(uint64(c) >= 8) {
 11148  			break
 11149  		}
 11150  		v.reset(OpConst8)
 11151  		v.AuxInt = int8ToAuxInt(0)
 11152  		return true
 11153  	}
 11154  	return false
 11155  }
 11156  func rewriteValue386_OpRsh8Ux8(v *Value) bool {
 11157  	v_1 := v.Args[1]
 11158  	v_0 := v.Args[0]
 11159  	b := v.Block
 11160  	// match: (Rsh8Ux8 <t> x y)
 11161  	// cond: !shiftIsBounded(v)
 11162  	// result: (ANDL (SHRB <t> x y) (SBBLcarrymask <t> (CMPBconst y [8])))
 11163  	for {
 11164  		t := v.Type
 11165  		x := v_0
 11166  		y := v_1
 11167  		if !(!shiftIsBounded(v)) {
 11168  			break
 11169  		}
 11170  		v.reset(Op386ANDL)
 11171  		v0 := b.NewValue0(v.Pos, Op386SHRB, t)
 11172  		v0.AddArg2(x, y)
 11173  		v1 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11174  		v2 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 11175  		v2.AuxInt = int8ToAuxInt(8)
 11176  		v2.AddArg(y)
 11177  		v1.AddArg(v2)
 11178  		v.AddArg2(v0, v1)
 11179  		return true
 11180  	}
 11181  	// match: (Rsh8Ux8 <t> x y)
 11182  	// cond: shiftIsBounded(v)
 11183  	// result: (SHRB <t> x y)
 11184  	for {
 11185  		t := v.Type
 11186  		x := v_0
 11187  		y := v_1
 11188  		if !(shiftIsBounded(v)) {
 11189  			break
 11190  		}
 11191  		v.reset(Op386SHRB)
 11192  		v.Type = t
 11193  		v.AddArg2(x, y)
 11194  		return true
 11195  	}
 11196  	return false
 11197  }
 11198  func rewriteValue386_OpRsh8x16(v *Value) bool {
 11199  	v_1 := v.Args[1]
 11200  	v_0 := v.Args[0]
 11201  	b := v.Block
 11202  	// match: (Rsh8x16 <t> x y)
 11203  	// cond: !shiftIsBounded(v)
 11204  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPWconst y [8])))))
 11205  	for {
 11206  		t := v.Type
 11207  		x := v_0
 11208  		y := v_1
 11209  		if !(!shiftIsBounded(v)) {
 11210  			break
 11211  		}
 11212  		v.reset(Op386SARB)
 11213  		v.Type = t
 11214  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11215  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11216  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11217  		v3 := b.NewValue0(v.Pos, Op386CMPWconst, types.TypeFlags)
 11218  		v3.AuxInt = int16ToAuxInt(8)
 11219  		v3.AddArg(y)
 11220  		v2.AddArg(v3)
 11221  		v1.AddArg(v2)
 11222  		v0.AddArg2(y, v1)
 11223  		v.AddArg2(x, v0)
 11224  		return true
 11225  	}
 11226  	// match: (Rsh8x16 <t> x y)
 11227  	// cond: shiftIsBounded(v)
 11228  	// result: (SARB x y)
 11229  	for {
 11230  		x := v_0
 11231  		y := v_1
 11232  		if !(shiftIsBounded(v)) {
 11233  			break
 11234  		}
 11235  		v.reset(Op386SARB)
 11236  		v.AddArg2(x, y)
 11237  		return true
 11238  	}
 11239  	return false
 11240  }
 11241  func rewriteValue386_OpRsh8x32(v *Value) bool {
 11242  	v_1 := v.Args[1]
 11243  	v_0 := v.Args[0]
 11244  	b := v.Block
 11245  	// match: (Rsh8x32 <t> x y)
 11246  	// cond: !shiftIsBounded(v)
 11247  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPLconst y [8])))))
 11248  	for {
 11249  		t := v.Type
 11250  		x := v_0
 11251  		y := v_1
 11252  		if !(!shiftIsBounded(v)) {
 11253  			break
 11254  		}
 11255  		v.reset(Op386SARB)
 11256  		v.Type = t
 11257  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11258  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11259  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11260  		v3 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 11261  		v3.AuxInt = int32ToAuxInt(8)
 11262  		v3.AddArg(y)
 11263  		v2.AddArg(v3)
 11264  		v1.AddArg(v2)
 11265  		v0.AddArg2(y, v1)
 11266  		v.AddArg2(x, v0)
 11267  		return true
 11268  	}
 11269  	// match: (Rsh8x32 <t> x y)
 11270  	// cond: shiftIsBounded(v)
 11271  	// result: (SARB x y)
 11272  	for {
 11273  		x := v_0
 11274  		y := v_1
 11275  		if !(shiftIsBounded(v)) {
 11276  			break
 11277  		}
 11278  		v.reset(Op386SARB)
 11279  		v.AddArg2(x, y)
 11280  		return true
 11281  	}
 11282  	return false
 11283  }
 11284  func rewriteValue386_OpRsh8x64(v *Value) bool {
 11285  	v_1 := v.Args[1]
 11286  	v_0 := v.Args[0]
 11287  	// match: (Rsh8x64 x (Const64 [c]))
 11288  	// cond: uint64(c) < 8
 11289  	// result: (SARBconst x [int8(c)])
 11290  	for {
 11291  		x := v_0
 11292  		if v_1.Op != OpConst64 {
 11293  			break
 11294  		}
 11295  		c := auxIntToInt64(v_1.AuxInt)
 11296  		if !(uint64(c) < 8) {
 11297  			break
 11298  		}
 11299  		v.reset(Op386SARBconst)
 11300  		v.AuxInt = int8ToAuxInt(int8(c))
 11301  		v.AddArg(x)
 11302  		return true
 11303  	}
 11304  	// match: (Rsh8x64 x (Const64 [c]))
 11305  	// cond: uint64(c) >= 8
 11306  	// result: (SARBconst x [7])
 11307  	for {
 11308  		x := v_0
 11309  		if v_1.Op != OpConst64 {
 11310  			break
 11311  		}
 11312  		c := auxIntToInt64(v_1.AuxInt)
 11313  		if !(uint64(c) >= 8) {
 11314  			break
 11315  		}
 11316  		v.reset(Op386SARBconst)
 11317  		v.AuxInt = int8ToAuxInt(7)
 11318  		v.AddArg(x)
 11319  		return true
 11320  	}
 11321  	return false
 11322  }
 11323  func rewriteValue386_OpRsh8x8(v *Value) bool {
 11324  	v_1 := v.Args[1]
 11325  	v_0 := v.Args[0]
 11326  	b := v.Block
 11327  	// match: (Rsh8x8 <t> x y)
 11328  	// cond: !shiftIsBounded(v)
 11329  	// result: (SARB <t> x (ORL <y.Type> y (NOTL <y.Type> (SBBLcarrymask <y.Type> (CMPBconst y [8])))))
 11330  	for {
 11331  		t := v.Type
 11332  		x := v_0
 11333  		y := v_1
 11334  		if !(!shiftIsBounded(v)) {
 11335  			break
 11336  		}
 11337  		v.reset(Op386SARB)
 11338  		v.Type = t
 11339  		v0 := b.NewValue0(v.Pos, Op386ORL, y.Type)
 11340  		v1 := b.NewValue0(v.Pos, Op386NOTL, y.Type)
 11341  		v2 := b.NewValue0(v.Pos, Op386SBBLcarrymask, y.Type)
 11342  		v3 := b.NewValue0(v.Pos, Op386CMPBconst, types.TypeFlags)
 11343  		v3.AuxInt = int8ToAuxInt(8)
 11344  		v3.AddArg(y)
 11345  		v2.AddArg(v3)
 11346  		v1.AddArg(v2)
 11347  		v0.AddArg2(y, v1)
 11348  		v.AddArg2(x, v0)
 11349  		return true
 11350  	}
 11351  	// match: (Rsh8x8 <t> x y)
 11352  	// cond: shiftIsBounded(v)
 11353  	// result: (SARB x y)
 11354  	for {
 11355  		x := v_0
 11356  		y := v_1
 11357  		if !(shiftIsBounded(v)) {
 11358  			break
 11359  		}
 11360  		v.reset(Op386SARB)
 11361  		v.AddArg2(x, y)
 11362  		return true
 11363  	}
 11364  	return false
 11365  }
 11366  func rewriteValue386_OpSelect0(v *Value) bool {
 11367  	v_0 := v.Args[0]
 11368  	b := v.Block
 11369  	typ := &b.Func.Config.Types
 11370  	// match: (Select0 (Mul32uover x y))
 11371  	// result: (Select0 <typ.UInt32> (MULLU x y))
 11372  	for {
 11373  		if v_0.Op != OpMul32uover {
 11374  			break
 11375  		}
 11376  		y := v_0.Args[1]
 11377  		x := v_0.Args[0]
 11378  		v.reset(OpSelect0)
 11379  		v.Type = typ.UInt32
 11380  		v0 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 11381  		v0.AddArg2(x, y)
 11382  		v.AddArg(v0)
 11383  		return true
 11384  	}
 11385  	return false
 11386  }
 11387  func rewriteValue386_OpSelect1(v *Value) bool {
 11388  	v_0 := v.Args[0]
 11389  	b := v.Block
 11390  	typ := &b.Func.Config.Types
 11391  	// match: (Select1 (Mul32uover x y))
 11392  	// result: (SETO (Select1 <types.TypeFlags> (MULLU x y)))
 11393  	for {
 11394  		if v_0.Op != OpMul32uover {
 11395  			break
 11396  		}
 11397  		y := v_0.Args[1]
 11398  		x := v_0.Args[0]
 11399  		v.reset(Op386SETO)
 11400  		v0 := b.NewValue0(v.Pos, OpSelect1, types.TypeFlags)
 11401  		v1 := b.NewValue0(v.Pos, Op386MULLU, types.NewTuple(typ.UInt32, types.TypeFlags))
 11402  		v1.AddArg2(x, y)
 11403  		v0.AddArg(v1)
 11404  		v.AddArg(v0)
 11405  		return true
 11406  	}
 11407  	return false
 11408  }
 11409  func rewriteValue386_OpSignmask(v *Value) bool {
 11410  	v_0 := v.Args[0]
 11411  	// match: (Signmask x)
 11412  	// result: (SARLconst x [31])
 11413  	for {
 11414  		x := v_0
 11415  		v.reset(Op386SARLconst)
 11416  		v.AuxInt = int32ToAuxInt(31)
 11417  		v.AddArg(x)
 11418  		return true
 11419  	}
 11420  }
 11421  func rewriteValue386_OpSlicemask(v *Value) bool {
 11422  	v_0 := v.Args[0]
 11423  	b := v.Block
 11424  	// match: (Slicemask <t> x)
 11425  	// result: (SARLconst (NEGL <t> x) [31])
 11426  	for {
 11427  		t := v.Type
 11428  		x := v_0
 11429  		v.reset(Op386SARLconst)
 11430  		v.AuxInt = int32ToAuxInt(31)
 11431  		v0 := b.NewValue0(v.Pos, Op386NEGL, t)
 11432  		v0.AddArg(x)
 11433  		v.AddArg(v0)
 11434  		return true
 11435  	}
 11436  }
 11437  func rewriteValue386_OpStore(v *Value) bool {
 11438  	v_2 := v.Args[2]
 11439  	v_1 := v.Args[1]
 11440  	v_0 := v.Args[0]
 11441  	// match: (Store {t} ptr val mem)
 11442  	// cond: t.Size() == 8 && is64BitFloat(val.Type)
 11443  	// result: (MOVSDstore ptr val mem)
 11444  	for {
 11445  		t := auxToType(v.Aux)
 11446  		ptr := v_0
 11447  		val := v_1
 11448  		mem := v_2
 11449  		if !(t.Size() == 8 && is64BitFloat(val.Type)) {
 11450  			break
 11451  		}
 11452  		v.reset(Op386MOVSDstore)
 11453  		v.AddArg3(ptr, val, mem)
 11454  		return true
 11455  	}
 11456  	// match: (Store {t} ptr val mem)
 11457  	// cond: t.Size() == 4 && is32BitFloat(val.Type)
 11458  	// result: (MOVSSstore ptr val mem)
 11459  	for {
 11460  		t := auxToType(v.Aux)
 11461  		ptr := v_0
 11462  		val := v_1
 11463  		mem := v_2
 11464  		if !(t.Size() == 4 && is32BitFloat(val.Type)) {
 11465  			break
 11466  		}
 11467  		v.reset(Op386MOVSSstore)
 11468  		v.AddArg3(ptr, val, mem)
 11469  		return true
 11470  	}
 11471  	// match: (Store {t} ptr val mem)
 11472  	// cond: t.Size() == 4
 11473  	// result: (MOVLstore ptr val mem)
 11474  	for {
 11475  		t := auxToType(v.Aux)
 11476  		ptr := v_0
 11477  		val := v_1
 11478  		mem := v_2
 11479  		if !(t.Size() == 4) {
 11480  			break
 11481  		}
 11482  		v.reset(Op386MOVLstore)
 11483  		v.AddArg3(ptr, val, mem)
 11484  		return true
 11485  	}
 11486  	// match: (Store {t} ptr val mem)
 11487  	// cond: t.Size() == 2
 11488  	// result: (MOVWstore ptr val mem)
 11489  	for {
 11490  		t := auxToType(v.Aux)
 11491  		ptr := v_0
 11492  		val := v_1
 11493  		mem := v_2
 11494  		if !(t.Size() == 2) {
 11495  			break
 11496  		}
 11497  		v.reset(Op386MOVWstore)
 11498  		v.AddArg3(ptr, val, mem)
 11499  		return true
 11500  	}
 11501  	// match: (Store {t} ptr val mem)
 11502  	// cond: t.Size() == 1
 11503  	// result: (MOVBstore ptr val mem)
 11504  	for {
 11505  		t := auxToType(v.Aux)
 11506  		ptr := v_0
 11507  		val := v_1
 11508  		mem := v_2
 11509  		if !(t.Size() == 1) {
 11510  			break
 11511  		}
 11512  		v.reset(Op386MOVBstore)
 11513  		v.AddArg3(ptr, val, mem)
 11514  		return true
 11515  	}
 11516  	return false
 11517  }
 11518  func rewriteValue386_OpZero(v *Value) bool {
 11519  	v_1 := v.Args[1]
 11520  	v_0 := v.Args[0]
 11521  	b := v.Block
 11522  	config := b.Func.Config
 11523  	typ := &b.Func.Config.Types
 11524  	// match: (Zero [0] _ mem)
 11525  	// result: mem
 11526  	for {
 11527  		if auxIntToInt64(v.AuxInt) != 0 {
 11528  			break
 11529  		}
 11530  		mem := v_1
 11531  		v.copyOf(mem)
 11532  		return true
 11533  	}
 11534  	// match: (Zero [1] destptr mem)
 11535  	// result: (MOVBstoreconst [0] destptr mem)
 11536  	for {
 11537  		if auxIntToInt64(v.AuxInt) != 1 {
 11538  			break
 11539  		}
 11540  		destptr := v_0
 11541  		mem := v_1
 11542  		v.reset(Op386MOVBstoreconst)
 11543  		v.AuxInt = valAndOffToAuxInt(0)
 11544  		v.AddArg2(destptr, mem)
 11545  		return true
 11546  	}
 11547  	// match: (Zero [2] destptr mem)
 11548  	// result: (MOVWstoreconst [0] destptr mem)
 11549  	for {
 11550  		if auxIntToInt64(v.AuxInt) != 2 {
 11551  			break
 11552  		}
 11553  		destptr := v_0
 11554  		mem := v_1
 11555  		v.reset(Op386MOVWstoreconst)
 11556  		v.AuxInt = valAndOffToAuxInt(0)
 11557  		v.AddArg2(destptr, mem)
 11558  		return true
 11559  	}
 11560  	// match: (Zero [4] destptr mem)
 11561  	// result: (MOVLstoreconst [0] destptr mem)
 11562  	for {
 11563  		if auxIntToInt64(v.AuxInt) != 4 {
 11564  			break
 11565  		}
 11566  		destptr := v_0
 11567  		mem := v_1
 11568  		v.reset(Op386MOVLstoreconst)
 11569  		v.AuxInt = valAndOffToAuxInt(0)
 11570  		v.AddArg2(destptr, mem)
 11571  		return true
 11572  	}
 11573  	// match: (Zero [3] destptr mem)
 11574  	// result: (MOVBstoreconst [makeValAndOff32(0,2)] destptr (MOVWstoreconst [makeValAndOff32(0,0)] destptr mem))
 11575  	for {
 11576  		if auxIntToInt64(v.AuxInt) != 3 {
 11577  			break
 11578  		}
 11579  		destptr := v_0
 11580  		mem := v_1
 11581  		v.reset(Op386MOVBstoreconst)
 11582  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 2))
 11583  		v0 := b.NewValue0(v.Pos, Op386MOVWstoreconst, types.TypeMem)
 11584  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11585  		v0.AddArg2(destptr, mem)
 11586  		v.AddArg2(destptr, v0)
 11587  		return true
 11588  	}
 11589  	// match: (Zero [5] destptr mem)
 11590  	// result: (MOVBstoreconst [makeValAndOff32(0,4)] destptr (MOVLstoreconst [makeValAndOff32(0,0)] destptr mem))
 11591  	for {
 11592  		if auxIntToInt64(v.AuxInt) != 5 {
 11593  			break
 11594  		}
 11595  		destptr := v_0
 11596  		mem := v_1
 11597  		v.reset(Op386MOVBstoreconst)
 11598  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 4))
 11599  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11600  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11601  		v0.AddArg2(destptr, mem)
 11602  		v.AddArg2(destptr, v0)
 11603  		return true
 11604  	}
 11605  	// match: (Zero [6] destptr mem)
 11606  	// result: (MOVWstoreconst [makeValAndOff32(0,4)] destptr (MOVLstoreconst [makeValAndOff32(0,0)] destptr mem))
 11607  	for {
 11608  		if auxIntToInt64(v.AuxInt) != 6 {
 11609  			break
 11610  		}
 11611  		destptr := v_0
 11612  		mem := v_1
 11613  		v.reset(Op386MOVWstoreconst)
 11614  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 4))
 11615  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11616  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11617  		v0.AddArg2(destptr, mem)
 11618  		v.AddArg2(destptr, v0)
 11619  		return true
 11620  	}
 11621  	// match: (Zero [7] destptr mem)
 11622  	// result: (MOVLstoreconst [makeValAndOff32(0,3)] destptr (MOVLstoreconst [makeValAndOff32(0,0)] destptr mem))
 11623  	for {
 11624  		if auxIntToInt64(v.AuxInt) != 7 {
 11625  			break
 11626  		}
 11627  		destptr := v_0
 11628  		mem := v_1
 11629  		v.reset(Op386MOVLstoreconst)
 11630  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 3))
 11631  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11632  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11633  		v0.AddArg2(destptr, mem)
 11634  		v.AddArg2(destptr, v0)
 11635  		return true
 11636  	}
 11637  	// match: (Zero [s] destptr mem)
 11638  	// cond: s%4 != 0 && s > 4
 11639  	// result: (Zero [s-s%4] (ADDLconst destptr [int32(s%4)]) (MOVLstoreconst [0] destptr mem))
 11640  	for {
 11641  		s := auxIntToInt64(v.AuxInt)
 11642  		destptr := v_0
 11643  		mem := v_1
 11644  		if !(s%4 != 0 && s > 4) {
 11645  			break
 11646  		}
 11647  		v.reset(OpZero)
 11648  		v.AuxInt = int64ToAuxInt(s - s%4)
 11649  		v0 := b.NewValue0(v.Pos, Op386ADDLconst, typ.UInt32)
 11650  		v0.AuxInt = int32ToAuxInt(int32(s % 4))
 11651  		v0.AddArg(destptr)
 11652  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11653  		v1.AuxInt = valAndOffToAuxInt(0)
 11654  		v1.AddArg2(destptr, mem)
 11655  		v.AddArg2(v0, v1)
 11656  		return true
 11657  	}
 11658  	// match: (Zero [8] destptr mem)
 11659  	// result: (MOVLstoreconst [makeValAndOff32(0,4)] destptr (MOVLstoreconst [makeValAndOff32(0,0)] destptr mem))
 11660  	for {
 11661  		if auxIntToInt64(v.AuxInt) != 8 {
 11662  			break
 11663  		}
 11664  		destptr := v_0
 11665  		mem := v_1
 11666  		v.reset(Op386MOVLstoreconst)
 11667  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 4))
 11668  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11669  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11670  		v0.AddArg2(destptr, mem)
 11671  		v.AddArg2(destptr, v0)
 11672  		return true
 11673  	}
 11674  	// match: (Zero [12] destptr mem)
 11675  	// result: (MOVLstoreconst [makeValAndOff32(0,8)] destptr (MOVLstoreconst [makeValAndOff32(0,4)] destptr (MOVLstoreconst [makeValAndOff32(0,0)] destptr mem)))
 11676  	for {
 11677  		if auxIntToInt64(v.AuxInt) != 12 {
 11678  			break
 11679  		}
 11680  		destptr := v_0
 11681  		mem := v_1
 11682  		v.reset(Op386MOVLstoreconst)
 11683  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 8))
 11684  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11685  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 4))
 11686  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11687  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11688  		v1.AddArg2(destptr, mem)
 11689  		v0.AddArg2(destptr, v1)
 11690  		v.AddArg2(destptr, v0)
 11691  		return true
 11692  	}
 11693  	// match: (Zero [16] destptr mem)
 11694  	// result: (MOVLstoreconst [makeValAndOff32(0,12)] destptr (MOVLstoreconst [makeValAndOff32(0,8)] destptr (MOVLstoreconst [makeValAndOff32(0,4)] destptr (MOVLstoreconst [makeValAndOff32(0,0)] destptr mem))))
 11695  	for {
 11696  		if auxIntToInt64(v.AuxInt) != 16 {
 11697  			break
 11698  		}
 11699  		destptr := v_0
 11700  		mem := v_1
 11701  		v.reset(Op386MOVLstoreconst)
 11702  		v.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 12))
 11703  		v0 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11704  		v0.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 8))
 11705  		v1 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11706  		v1.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 4))
 11707  		v2 := b.NewValue0(v.Pos, Op386MOVLstoreconst, types.TypeMem)
 11708  		v2.AuxInt = valAndOffToAuxInt(makeValAndOff32(0, 0))
 11709  		v2.AddArg2(destptr, mem)
 11710  		v1.AddArg2(destptr, v2)
 11711  		v0.AddArg2(destptr, v1)
 11712  		v.AddArg2(destptr, v0)
 11713  		return true
 11714  	}
 11715  	// match: (Zero [s] destptr mem)
 11716  	// cond: s > 16 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice
 11717  	// result: (DUFFZERO [1*(128-s/4)] destptr (MOVLconst [0]) mem)
 11718  	for {
 11719  		s := auxIntToInt64(v.AuxInt)
 11720  		destptr := v_0
 11721  		mem := v_1
 11722  		if !(s > 16 && s <= 4*128 && s%4 == 0 && !config.noDuffDevice) {
 11723  			break
 11724  		}
 11725  		v.reset(Op386DUFFZERO)
 11726  		v.AuxInt = int64ToAuxInt(1 * (128 - s/4))
 11727  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 11728  		v0.AuxInt = int32ToAuxInt(0)
 11729  		v.AddArg3(destptr, v0, mem)
 11730  		return true
 11731  	}
 11732  	// match: (Zero [s] destptr mem)
 11733  	// cond: (s > 4*128 || (config.noDuffDevice && s > 16)) && s%4 == 0
 11734  	// result: (REPSTOSL destptr (MOVLconst [int32(s/4)]) (MOVLconst [0]) mem)
 11735  	for {
 11736  		s := auxIntToInt64(v.AuxInt)
 11737  		destptr := v_0
 11738  		mem := v_1
 11739  		if !((s > 4*128 || (config.noDuffDevice && s > 16)) && s%4 == 0) {
 11740  			break
 11741  		}
 11742  		v.reset(Op386REPSTOSL)
 11743  		v0 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 11744  		v0.AuxInt = int32ToAuxInt(int32(s / 4))
 11745  		v1 := b.NewValue0(v.Pos, Op386MOVLconst, typ.UInt32)
 11746  		v1.AuxInt = int32ToAuxInt(0)
 11747  		v.AddArg4(destptr, v0, v1, mem)
 11748  		return true
 11749  	}
 11750  	return false
 11751  }
 11752  func rewriteValue386_OpZeromask(v *Value) bool {
 11753  	v_0 := v.Args[0]
 11754  	b := v.Block
 11755  	// match: (Zeromask <t> x)
 11756  	// result: (XORLconst [-1] (SBBLcarrymask <t> (CMPLconst x [1])))
 11757  	for {
 11758  		t := v.Type
 11759  		x := v_0
 11760  		v.reset(Op386XORLconst)
 11761  		v.AuxInt = int32ToAuxInt(-1)
 11762  		v0 := b.NewValue0(v.Pos, Op386SBBLcarrymask, t)
 11763  		v1 := b.NewValue0(v.Pos, Op386CMPLconst, types.TypeFlags)
 11764  		v1.AuxInt = int32ToAuxInt(1)
 11765  		v1.AddArg(x)
 11766  		v0.AddArg(v1)
 11767  		v.AddArg(v0)
 11768  		return true
 11769  	}
 11770  }
 11771  func rewriteBlock386(b *Block) bool {
 11772  	switch b.Kind {
 11773  	case Block386EQ:
 11774  		// match: (EQ (InvertFlags cmp) yes no)
 11775  		// result: (EQ cmp yes no)
 11776  		for b.Controls[0].Op == Op386InvertFlags {
 11777  			v_0 := b.Controls[0]
 11778  			cmp := v_0.Args[0]
 11779  			b.resetWithControl(Block386EQ, cmp)
 11780  			return true
 11781  		}
 11782  		// match: (EQ (FlagEQ) yes no)
 11783  		// result: (First yes no)
 11784  		for b.Controls[0].Op == Op386FlagEQ {
 11785  			b.Reset(BlockFirst)
 11786  			return true
 11787  		}
 11788  		// match: (EQ (FlagLT_ULT) yes no)
 11789  		// result: (First no yes)
 11790  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11791  			b.Reset(BlockFirst)
 11792  			b.swapSuccessors()
 11793  			return true
 11794  		}
 11795  		// match: (EQ (FlagLT_UGT) yes no)
 11796  		// result: (First no yes)
 11797  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11798  			b.Reset(BlockFirst)
 11799  			b.swapSuccessors()
 11800  			return true
 11801  		}
 11802  		// match: (EQ (FlagGT_ULT) yes no)
 11803  		// result: (First no yes)
 11804  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11805  			b.Reset(BlockFirst)
 11806  			b.swapSuccessors()
 11807  			return true
 11808  		}
 11809  		// match: (EQ (FlagGT_UGT) yes no)
 11810  		// result: (First no yes)
 11811  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11812  			b.Reset(BlockFirst)
 11813  			b.swapSuccessors()
 11814  			return true
 11815  		}
 11816  	case Block386GE:
 11817  		// match: (GE (InvertFlags cmp) yes no)
 11818  		// result: (LE cmp yes no)
 11819  		for b.Controls[0].Op == Op386InvertFlags {
 11820  			v_0 := b.Controls[0]
 11821  			cmp := v_0.Args[0]
 11822  			b.resetWithControl(Block386LE, cmp)
 11823  			return true
 11824  		}
 11825  		// match: (GE (FlagEQ) yes no)
 11826  		// result: (First yes no)
 11827  		for b.Controls[0].Op == Op386FlagEQ {
 11828  			b.Reset(BlockFirst)
 11829  			return true
 11830  		}
 11831  		// match: (GE (FlagLT_ULT) yes no)
 11832  		// result: (First no yes)
 11833  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11834  			b.Reset(BlockFirst)
 11835  			b.swapSuccessors()
 11836  			return true
 11837  		}
 11838  		// match: (GE (FlagLT_UGT) yes no)
 11839  		// result: (First no yes)
 11840  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11841  			b.Reset(BlockFirst)
 11842  			b.swapSuccessors()
 11843  			return true
 11844  		}
 11845  		// match: (GE (FlagGT_ULT) yes no)
 11846  		// result: (First yes no)
 11847  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11848  			b.Reset(BlockFirst)
 11849  			return true
 11850  		}
 11851  		// match: (GE (FlagGT_UGT) yes no)
 11852  		// result: (First yes no)
 11853  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11854  			b.Reset(BlockFirst)
 11855  			return true
 11856  		}
 11857  	case Block386GT:
 11858  		// match: (GT (InvertFlags cmp) yes no)
 11859  		// result: (LT cmp yes no)
 11860  		for b.Controls[0].Op == Op386InvertFlags {
 11861  			v_0 := b.Controls[0]
 11862  			cmp := v_0.Args[0]
 11863  			b.resetWithControl(Block386LT, cmp)
 11864  			return true
 11865  		}
 11866  		// match: (GT (FlagEQ) yes no)
 11867  		// result: (First no yes)
 11868  		for b.Controls[0].Op == Op386FlagEQ {
 11869  			b.Reset(BlockFirst)
 11870  			b.swapSuccessors()
 11871  			return true
 11872  		}
 11873  		// match: (GT (FlagLT_ULT) yes no)
 11874  		// result: (First no yes)
 11875  		for b.Controls[0].Op == Op386FlagLT_ULT {
 11876  			b.Reset(BlockFirst)
 11877  			b.swapSuccessors()
 11878  			return true
 11879  		}
 11880  		// match: (GT (FlagLT_UGT) yes no)
 11881  		// result: (First no yes)
 11882  		for b.Controls[0].Op == Op386FlagLT_UGT {
 11883  			b.Reset(BlockFirst)
 11884  			b.swapSuccessors()
 11885  			return true
 11886  		}
 11887  		// match: (GT (FlagGT_ULT) yes no)
 11888  		// result: (First yes no)
 11889  		for b.Controls[0].Op == Op386FlagGT_ULT {
 11890  			b.Reset(BlockFirst)
 11891  			return true
 11892  		}
 11893  		// match: (GT (FlagGT_UGT) yes no)
 11894  		// result: (First yes no)
 11895  		for b.Controls[0].Op == Op386FlagGT_UGT {
 11896  			b.Reset(BlockFirst)
 11897  			return true
 11898  		}
 11899  	case BlockIf:
 11900  		// match: (If (SETL cmp) yes no)
 11901  		// result: (LT cmp yes no)
 11902  		for b.Controls[0].Op == Op386SETL {
 11903  			v_0 := b.Controls[0]
 11904  			cmp := v_0.Args[0]
 11905  			b.resetWithControl(Block386LT, cmp)
 11906  			return true
 11907  		}
 11908  		// match: (If (SETLE cmp) yes no)
 11909  		// result: (LE cmp yes no)
 11910  		for b.Controls[0].Op == Op386SETLE {
 11911  			v_0 := b.Controls[0]
 11912  			cmp := v_0.Args[0]
 11913  			b.resetWithControl(Block386LE, cmp)
 11914  			return true
 11915  		}
 11916  		// match: (If (SETG cmp) yes no)
 11917  		// result: (GT cmp yes no)
 11918  		for b.Controls[0].Op == Op386SETG {
 11919  			v_0 := b.Controls[0]
 11920  			cmp := v_0.Args[0]
 11921  			b.resetWithControl(Block386GT, cmp)
 11922  			return true
 11923  		}
 11924  		// match: (If (SETGE cmp) yes no)
 11925  		// result: (GE cmp yes no)
 11926  		for b.Controls[0].Op == Op386SETGE {
 11927  			v_0 := b.Controls[0]
 11928  			cmp := v_0.Args[0]
 11929  			b.resetWithControl(Block386GE, cmp)
 11930  			return true
 11931  		}
 11932  		// match: (If (SETEQ cmp) yes no)
 11933  		// result: (EQ cmp yes no)
 11934  		for b.Controls[0].Op == Op386SETEQ {
 11935  			v_0 := b.Controls[0]
 11936  			cmp := v_0.Args[0]
 11937  			b.resetWithControl(Block386EQ, cmp)
 11938  			return true
 11939  		}
 11940  		// match: (If (SETNE cmp) yes no)
 11941  		// result: (NE cmp yes no)
 11942  		for b.Controls[0].Op == Op386SETNE {
 11943  			v_0 := b.Controls[0]
 11944  			cmp := v_0.Args[0]
 11945  			b.resetWithControl(Block386NE, cmp)
 11946  			return true
 11947  		}
 11948  		// match: (If (SETB cmp) yes no)
 11949  		// result: (ULT cmp yes no)
 11950  		for b.Controls[0].Op == Op386SETB {
 11951  			v_0 := b.Controls[0]
 11952  			cmp := v_0.Args[0]
 11953  			b.resetWithControl(Block386ULT, cmp)
 11954  			return true
 11955  		}
 11956  		// match: (If (SETBE cmp) yes no)
 11957  		// result: (ULE cmp yes no)
 11958  		for b.Controls[0].Op == Op386SETBE {
 11959  			v_0 := b.Controls[0]
 11960  			cmp := v_0.Args[0]
 11961  			b.resetWithControl(Block386ULE, cmp)
 11962  			return true
 11963  		}
 11964  		// match: (If (SETA cmp) yes no)
 11965  		// result: (UGT cmp yes no)
 11966  		for b.Controls[0].Op == Op386SETA {
 11967  			v_0 := b.Controls[0]
 11968  			cmp := v_0.Args[0]
 11969  			b.resetWithControl(Block386UGT, cmp)
 11970  			return true
 11971  		}
 11972  		// match: (If (SETAE cmp) yes no)
 11973  		// result: (UGE cmp yes no)
 11974  		for b.Controls[0].Op == Op386SETAE {
 11975  			v_0 := b.Controls[0]
 11976  			cmp := v_0.Args[0]
 11977  			b.resetWithControl(Block386UGE, cmp)
 11978  			return true
 11979  		}
 11980  		// match: (If (SETO cmp) yes no)
 11981  		// result: (OS cmp yes no)
 11982  		for b.Controls[0].Op == Op386SETO {
 11983  			v_0 := b.Controls[0]
 11984  			cmp := v_0.Args[0]
 11985  			b.resetWithControl(Block386OS, cmp)
 11986  			return true
 11987  		}
 11988  		// match: (If (SETGF cmp) yes no)
 11989  		// result: (UGT cmp yes no)
 11990  		for b.Controls[0].Op == Op386SETGF {
 11991  			v_0 := b.Controls[0]
 11992  			cmp := v_0.Args[0]
 11993  			b.resetWithControl(Block386UGT, cmp)
 11994  			return true
 11995  		}
 11996  		// match: (If (SETGEF cmp) yes no)
 11997  		// result: (UGE cmp yes no)
 11998  		for b.Controls[0].Op == Op386SETGEF {
 11999  			v_0 := b.Controls[0]
 12000  			cmp := v_0.Args[0]
 12001  			b.resetWithControl(Block386UGE, cmp)
 12002  			return true
 12003  		}
 12004  		// match: (If (SETEQF cmp) yes no)
 12005  		// result: (EQF cmp yes no)
 12006  		for b.Controls[0].Op == Op386SETEQF {
 12007  			v_0 := b.Controls[0]
 12008  			cmp := v_0.Args[0]
 12009  			b.resetWithControl(Block386EQF, cmp)
 12010  			return true
 12011  		}
 12012  		// match: (If (SETNEF cmp) yes no)
 12013  		// result: (NEF cmp yes no)
 12014  		for b.Controls[0].Op == Op386SETNEF {
 12015  			v_0 := b.Controls[0]
 12016  			cmp := v_0.Args[0]
 12017  			b.resetWithControl(Block386NEF, cmp)
 12018  			return true
 12019  		}
 12020  		// match: (If cond yes no)
 12021  		// result: (NE (TESTB cond cond) yes no)
 12022  		for {
 12023  			cond := b.Controls[0]
 12024  			v0 := b.NewValue0(cond.Pos, Op386TESTB, types.TypeFlags)
 12025  			v0.AddArg2(cond, cond)
 12026  			b.resetWithControl(Block386NE, v0)
 12027  			return true
 12028  		}
 12029  	case Block386LE:
 12030  		// match: (LE (InvertFlags cmp) yes no)
 12031  		// result: (GE cmp yes no)
 12032  		for b.Controls[0].Op == Op386InvertFlags {
 12033  			v_0 := b.Controls[0]
 12034  			cmp := v_0.Args[0]
 12035  			b.resetWithControl(Block386GE, cmp)
 12036  			return true
 12037  		}
 12038  		// match: (LE (FlagEQ) yes no)
 12039  		// result: (First yes no)
 12040  		for b.Controls[0].Op == Op386FlagEQ {
 12041  			b.Reset(BlockFirst)
 12042  			return true
 12043  		}
 12044  		// match: (LE (FlagLT_ULT) yes no)
 12045  		// result: (First yes no)
 12046  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12047  			b.Reset(BlockFirst)
 12048  			return true
 12049  		}
 12050  		// match: (LE (FlagLT_UGT) yes no)
 12051  		// result: (First yes no)
 12052  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12053  			b.Reset(BlockFirst)
 12054  			return true
 12055  		}
 12056  		// match: (LE (FlagGT_ULT) yes no)
 12057  		// result: (First no yes)
 12058  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12059  			b.Reset(BlockFirst)
 12060  			b.swapSuccessors()
 12061  			return true
 12062  		}
 12063  		// match: (LE (FlagGT_UGT) yes no)
 12064  		// result: (First no yes)
 12065  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12066  			b.Reset(BlockFirst)
 12067  			b.swapSuccessors()
 12068  			return true
 12069  		}
 12070  	case Block386LT:
 12071  		// match: (LT (InvertFlags cmp) yes no)
 12072  		// result: (GT cmp yes no)
 12073  		for b.Controls[0].Op == Op386InvertFlags {
 12074  			v_0 := b.Controls[0]
 12075  			cmp := v_0.Args[0]
 12076  			b.resetWithControl(Block386GT, cmp)
 12077  			return true
 12078  		}
 12079  		// match: (LT (FlagEQ) yes no)
 12080  		// result: (First no yes)
 12081  		for b.Controls[0].Op == Op386FlagEQ {
 12082  			b.Reset(BlockFirst)
 12083  			b.swapSuccessors()
 12084  			return true
 12085  		}
 12086  		// match: (LT (FlagLT_ULT) yes no)
 12087  		// result: (First yes no)
 12088  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12089  			b.Reset(BlockFirst)
 12090  			return true
 12091  		}
 12092  		// match: (LT (FlagLT_UGT) yes no)
 12093  		// result: (First yes no)
 12094  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12095  			b.Reset(BlockFirst)
 12096  			return true
 12097  		}
 12098  		// match: (LT (FlagGT_ULT) yes no)
 12099  		// result: (First no yes)
 12100  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12101  			b.Reset(BlockFirst)
 12102  			b.swapSuccessors()
 12103  			return true
 12104  		}
 12105  		// match: (LT (FlagGT_UGT) yes no)
 12106  		// result: (First no yes)
 12107  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12108  			b.Reset(BlockFirst)
 12109  			b.swapSuccessors()
 12110  			return true
 12111  		}
 12112  	case Block386NE:
 12113  		// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
 12114  		// result: (LT cmp yes no)
 12115  		for b.Controls[0].Op == Op386TESTB {
 12116  			v_0 := b.Controls[0]
 12117  			_ = v_0.Args[1]
 12118  			v_0_0 := v_0.Args[0]
 12119  			if v_0_0.Op != Op386SETL {
 12120  				break
 12121  			}
 12122  			cmp := v_0_0.Args[0]
 12123  			v_0_1 := v_0.Args[1]
 12124  			if v_0_1.Op != Op386SETL || cmp != v_0_1.Args[0] {
 12125  				break
 12126  			}
 12127  			b.resetWithControl(Block386LT, cmp)
 12128  			return true
 12129  		}
 12130  		// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
 12131  		// result: (LE cmp yes no)
 12132  		for b.Controls[0].Op == Op386TESTB {
 12133  			v_0 := b.Controls[0]
 12134  			_ = v_0.Args[1]
 12135  			v_0_0 := v_0.Args[0]
 12136  			if v_0_0.Op != Op386SETLE {
 12137  				break
 12138  			}
 12139  			cmp := v_0_0.Args[0]
 12140  			v_0_1 := v_0.Args[1]
 12141  			if v_0_1.Op != Op386SETLE || cmp != v_0_1.Args[0] {
 12142  				break
 12143  			}
 12144  			b.resetWithControl(Block386LE, cmp)
 12145  			return true
 12146  		}
 12147  		// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
 12148  		// result: (GT cmp yes no)
 12149  		for b.Controls[0].Op == Op386TESTB {
 12150  			v_0 := b.Controls[0]
 12151  			_ = v_0.Args[1]
 12152  			v_0_0 := v_0.Args[0]
 12153  			if v_0_0.Op != Op386SETG {
 12154  				break
 12155  			}
 12156  			cmp := v_0_0.Args[0]
 12157  			v_0_1 := v_0.Args[1]
 12158  			if v_0_1.Op != Op386SETG || cmp != v_0_1.Args[0] {
 12159  				break
 12160  			}
 12161  			b.resetWithControl(Block386GT, cmp)
 12162  			return true
 12163  		}
 12164  		// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
 12165  		// result: (GE cmp yes no)
 12166  		for b.Controls[0].Op == Op386TESTB {
 12167  			v_0 := b.Controls[0]
 12168  			_ = v_0.Args[1]
 12169  			v_0_0 := v_0.Args[0]
 12170  			if v_0_0.Op != Op386SETGE {
 12171  				break
 12172  			}
 12173  			cmp := v_0_0.Args[0]
 12174  			v_0_1 := v_0.Args[1]
 12175  			if v_0_1.Op != Op386SETGE || cmp != v_0_1.Args[0] {
 12176  				break
 12177  			}
 12178  			b.resetWithControl(Block386GE, cmp)
 12179  			return true
 12180  		}
 12181  		// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
 12182  		// result: (EQ cmp yes no)
 12183  		for b.Controls[0].Op == Op386TESTB {
 12184  			v_0 := b.Controls[0]
 12185  			_ = v_0.Args[1]
 12186  			v_0_0 := v_0.Args[0]
 12187  			if v_0_0.Op != Op386SETEQ {
 12188  				break
 12189  			}
 12190  			cmp := v_0_0.Args[0]
 12191  			v_0_1 := v_0.Args[1]
 12192  			if v_0_1.Op != Op386SETEQ || cmp != v_0_1.Args[0] {
 12193  				break
 12194  			}
 12195  			b.resetWithControl(Block386EQ, cmp)
 12196  			return true
 12197  		}
 12198  		// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
 12199  		// result: (NE cmp yes no)
 12200  		for b.Controls[0].Op == Op386TESTB {
 12201  			v_0 := b.Controls[0]
 12202  			_ = v_0.Args[1]
 12203  			v_0_0 := v_0.Args[0]
 12204  			if v_0_0.Op != Op386SETNE {
 12205  				break
 12206  			}
 12207  			cmp := v_0_0.Args[0]
 12208  			v_0_1 := v_0.Args[1]
 12209  			if v_0_1.Op != Op386SETNE || cmp != v_0_1.Args[0] {
 12210  				break
 12211  			}
 12212  			b.resetWithControl(Block386NE, cmp)
 12213  			return true
 12214  		}
 12215  		// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
 12216  		// result: (ULT cmp yes no)
 12217  		for b.Controls[0].Op == Op386TESTB {
 12218  			v_0 := b.Controls[0]
 12219  			_ = v_0.Args[1]
 12220  			v_0_0 := v_0.Args[0]
 12221  			if v_0_0.Op != Op386SETB {
 12222  				break
 12223  			}
 12224  			cmp := v_0_0.Args[0]
 12225  			v_0_1 := v_0.Args[1]
 12226  			if v_0_1.Op != Op386SETB || cmp != v_0_1.Args[0] {
 12227  				break
 12228  			}
 12229  			b.resetWithControl(Block386ULT, cmp)
 12230  			return true
 12231  		}
 12232  		// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
 12233  		// result: (ULE cmp yes no)
 12234  		for b.Controls[0].Op == Op386TESTB {
 12235  			v_0 := b.Controls[0]
 12236  			_ = v_0.Args[1]
 12237  			v_0_0 := v_0.Args[0]
 12238  			if v_0_0.Op != Op386SETBE {
 12239  				break
 12240  			}
 12241  			cmp := v_0_0.Args[0]
 12242  			v_0_1 := v_0.Args[1]
 12243  			if v_0_1.Op != Op386SETBE || cmp != v_0_1.Args[0] {
 12244  				break
 12245  			}
 12246  			b.resetWithControl(Block386ULE, cmp)
 12247  			return true
 12248  		}
 12249  		// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
 12250  		// result: (UGT cmp yes no)
 12251  		for b.Controls[0].Op == Op386TESTB {
 12252  			v_0 := b.Controls[0]
 12253  			_ = v_0.Args[1]
 12254  			v_0_0 := v_0.Args[0]
 12255  			if v_0_0.Op != Op386SETA {
 12256  				break
 12257  			}
 12258  			cmp := v_0_0.Args[0]
 12259  			v_0_1 := v_0.Args[1]
 12260  			if v_0_1.Op != Op386SETA || cmp != v_0_1.Args[0] {
 12261  				break
 12262  			}
 12263  			b.resetWithControl(Block386UGT, cmp)
 12264  			return true
 12265  		}
 12266  		// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
 12267  		// result: (UGE cmp yes no)
 12268  		for b.Controls[0].Op == Op386TESTB {
 12269  			v_0 := b.Controls[0]
 12270  			_ = v_0.Args[1]
 12271  			v_0_0 := v_0.Args[0]
 12272  			if v_0_0.Op != Op386SETAE {
 12273  				break
 12274  			}
 12275  			cmp := v_0_0.Args[0]
 12276  			v_0_1 := v_0.Args[1]
 12277  			if v_0_1.Op != Op386SETAE || cmp != v_0_1.Args[0] {
 12278  				break
 12279  			}
 12280  			b.resetWithControl(Block386UGE, cmp)
 12281  			return true
 12282  		}
 12283  		// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
 12284  		// result: (OS cmp yes no)
 12285  		for b.Controls[0].Op == Op386TESTB {
 12286  			v_0 := b.Controls[0]
 12287  			_ = v_0.Args[1]
 12288  			v_0_0 := v_0.Args[0]
 12289  			if v_0_0.Op != Op386SETO {
 12290  				break
 12291  			}
 12292  			cmp := v_0_0.Args[0]
 12293  			v_0_1 := v_0.Args[1]
 12294  			if v_0_1.Op != Op386SETO || cmp != v_0_1.Args[0] {
 12295  				break
 12296  			}
 12297  			b.resetWithControl(Block386OS, cmp)
 12298  			return true
 12299  		}
 12300  		// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
 12301  		// result: (UGT cmp yes no)
 12302  		for b.Controls[0].Op == Op386TESTB {
 12303  			v_0 := b.Controls[0]
 12304  			_ = v_0.Args[1]
 12305  			v_0_0 := v_0.Args[0]
 12306  			if v_0_0.Op != Op386SETGF {
 12307  				break
 12308  			}
 12309  			cmp := v_0_0.Args[0]
 12310  			v_0_1 := v_0.Args[1]
 12311  			if v_0_1.Op != Op386SETGF || cmp != v_0_1.Args[0] {
 12312  				break
 12313  			}
 12314  			b.resetWithControl(Block386UGT, cmp)
 12315  			return true
 12316  		}
 12317  		// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
 12318  		// result: (UGE cmp yes no)
 12319  		for b.Controls[0].Op == Op386TESTB {
 12320  			v_0 := b.Controls[0]
 12321  			_ = v_0.Args[1]
 12322  			v_0_0 := v_0.Args[0]
 12323  			if v_0_0.Op != Op386SETGEF {
 12324  				break
 12325  			}
 12326  			cmp := v_0_0.Args[0]
 12327  			v_0_1 := v_0.Args[1]
 12328  			if v_0_1.Op != Op386SETGEF || cmp != v_0_1.Args[0] {
 12329  				break
 12330  			}
 12331  			b.resetWithControl(Block386UGE, cmp)
 12332  			return true
 12333  		}
 12334  		// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
 12335  		// result: (EQF cmp yes no)
 12336  		for b.Controls[0].Op == Op386TESTB {
 12337  			v_0 := b.Controls[0]
 12338  			_ = v_0.Args[1]
 12339  			v_0_0 := v_0.Args[0]
 12340  			if v_0_0.Op != Op386SETEQF {
 12341  				break
 12342  			}
 12343  			cmp := v_0_0.Args[0]
 12344  			v_0_1 := v_0.Args[1]
 12345  			if v_0_1.Op != Op386SETEQF || cmp != v_0_1.Args[0] {
 12346  				break
 12347  			}
 12348  			b.resetWithControl(Block386EQF, cmp)
 12349  			return true
 12350  		}
 12351  		// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
 12352  		// result: (NEF cmp yes no)
 12353  		for b.Controls[0].Op == Op386TESTB {
 12354  			v_0 := b.Controls[0]
 12355  			_ = v_0.Args[1]
 12356  			v_0_0 := v_0.Args[0]
 12357  			if v_0_0.Op != Op386SETNEF {
 12358  				break
 12359  			}
 12360  			cmp := v_0_0.Args[0]
 12361  			v_0_1 := v_0.Args[1]
 12362  			if v_0_1.Op != Op386SETNEF || cmp != v_0_1.Args[0] {
 12363  				break
 12364  			}
 12365  			b.resetWithControl(Block386NEF, cmp)
 12366  			return true
 12367  		}
 12368  		// match: (NE (InvertFlags cmp) yes no)
 12369  		// result: (NE cmp yes no)
 12370  		for b.Controls[0].Op == Op386InvertFlags {
 12371  			v_0 := b.Controls[0]
 12372  			cmp := v_0.Args[0]
 12373  			b.resetWithControl(Block386NE, cmp)
 12374  			return true
 12375  		}
 12376  		// match: (NE (FlagEQ) yes no)
 12377  		// result: (First no yes)
 12378  		for b.Controls[0].Op == Op386FlagEQ {
 12379  			b.Reset(BlockFirst)
 12380  			b.swapSuccessors()
 12381  			return true
 12382  		}
 12383  		// match: (NE (FlagLT_ULT) yes no)
 12384  		// result: (First yes no)
 12385  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12386  			b.Reset(BlockFirst)
 12387  			return true
 12388  		}
 12389  		// match: (NE (FlagLT_UGT) yes no)
 12390  		// result: (First yes no)
 12391  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12392  			b.Reset(BlockFirst)
 12393  			return true
 12394  		}
 12395  		// match: (NE (FlagGT_ULT) yes no)
 12396  		// result: (First yes no)
 12397  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12398  			b.Reset(BlockFirst)
 12399  			return true
 12400  		}
 12401  		// match: (NE (FlagGT_UGT) yes no)
 12402  		// result: (First yes no)
 12403  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12404  			b.Reset(BlockFirst)
 12405  			return true
 12406  		}
 12407  	case Block386UGE:
 12408  		// match: (UGE (InvertFlags cmp) yes no)
 12409  		// result: (ULE cmp yes no)
 12410  		for b.Controls[0].Op == Op386InvertFlags {
 12411  			v_0 := b.Controls[0]
 12412  			cmp := v_0.Args[0]
 12413  			b.resetWithControl(Block386ULE, cmp)
 12414  			return true
 12415  		}
 12416  		// match: (UGE (FlagEQ) yes no)
 12417  		// result: (First yes no)
 12418  		for b.Controls[0].Op == Op386FlagEQ {
 12419  			b.Reset(BlockFirst)
 12420  			return true
 12421  		}
 12422  		// match: (UGE (FlagLT_ULT) yes no)
 12423  		// result: (First no yes)
 12424  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12425  			b.Reset(BlockFirst)
 12426  			b.swapSuccessors()
 12427  			return true
 12428  		}
 12429  		// match: (UGE (FlagLT_UGT) yes no)
 12430  		// result: (First yes no)
 12431  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12432  			b.Reset(BlockFirst)
 12433  			return true
 12434  		}
 12435  		// match: (UGE (FlagGT_ULT) yes no)
 12436  		// result: (First no yes)
 12437  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12438  			b.Reset(BlockFirst)
 12439  			b.swapSuccessors()
 12440  			return true
 12441  		}
 12442  		// match: (UGE (FlagGT_UGT) yes no)
 12443  		// result: (First yes no)
 12444  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12445  			b.Reset(BlockFirst)
 12446  			return true
 12447  		}
 12448  	case Block386UGT:
 12449  		// match: (UGT (InvertFlags cmp) yes no)
 12450  		// result: (ULT cmp yes no)
 12451  		for b.Controls[0].Op == Op386InvertFlags {
 12452  			v_0 := b.Controls[0]
 12453  			cmp := v_0.Args[0]
 12454  			b.resetWithControl(Block386ULT, cmp)
 12455  			return true
 12456  		}
 12457  		// match: (UGT (FlagEQ) yes no)
 12458  		// result: (First no yes)
 12459  		for b.Controls[0].Op == Op386FlagEQ {
 12460  			b.Reset(BlockFirst)
 12461  			b.swapSuccessors()
 12462  			return true
 12463  		}
 12464  		// match: (UGT (FlagLT_ULT) yes no)
 12465  		// result: (First no yes)
 12466  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12467  			b.Reset(BlockFirst)
 12468  			b.swapSuccessors()
 12469  			return true
 12470  		}
 12471  		// match: (UGT (FlagLT_UGT) yes no)
 12472  		// result: (First yes no)
 12473  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12474  			b.Reset(BlockFirst)
 12475  			return true
 12476  		}
 12477  		// match: (UGT (FlagGT_ULT) yes no)
 12478  		// result: (First no yes)
 12479  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12480  			b.Reset(BlockFirst)
 12481  			b.swapSuccessors()
 12482  			return true
 12483  		}
 12484  		// match: (UGT (FlagGT_UGT) yes no)
 12485  		// result: (First yes no)
 12486  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12487  			b.Reset(BlockFirst)
 12488  			return true
 12489  		}
 12490  	case Block386ULE:
 12491  		// match: (ULE (InvertFlags cmp) yes no)
 12492  		// result: (UGE cmp yes no)
 12493  		for b.Controls[0].Op == Op386InvertFlags {
 12494  			v_0 := b.Controls[0]
 12495  			cmp := v_0.Args[0]
 12496  			b.resetWithControl(Block386UGE, cmp)
 12497  			return true
 12498  		}
 12499  		// match: (ULE (FlagEQ) yes no)
 12500  		// result: (First yes no)
 12501  		for b.Controls[0].Op == Op386FlagEQ {
 12502  			b.Reset(BlockFirst)
 12503  			return true
 12504  		}
 12505  		// match: (ULE (FlagLT_ULT) yes no)
 12506  		// result: (First yes no)
 12507  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12508  			b.Reset(BlockFirst)
 12509  			return true
 12510  		}
 12511  		// match: (ULE (FlagLT_UGT) yes no)
 12512  		// result: (First no yes)
 12513  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12514  			b.Reset(BlockFirst)
 12515  			b.swapSuccessors()
 12516  			return true
 12517  		}
 12518  		// match: (ULE (FlagGT_ULT) yes no)
 12519  		// result: (First yes no)
 12520  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12521  			b.Reset(BlockFirst)
 12522  			return true
 12523  		}
 12524  		// match: (ULE (FlagGT_UGT) yes no)
 12525  		// result: (First no yes)
 12526  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12527  			b.Reset(BlockFirst)
 12528  			b.swapSuccessors()
 12529  			return true
 12530  		}
 12531  	case Block386ULT:
 12532  		// match: (ULT (InvertFlags cmp) yes no)
 12533  		// result: (UGT cmp yes no)
 12534  		for b.Controls[0].Op == Op386InvertFlags {
 12535  			v_0 := b.Controls[0]
 12536  			cmp := v_0.Args[0]
 12537  			b.resetWithControl(Block386UGT, cmp)
 12538  			return true
 12539  		}
 12540  		// match: (ULT (FlagEQ) yes no)
 12541  		// result: (First no yes)
 12542  		for b.Controls[0].Op == Op386FlagEQ {
 12543  			b.Reset(BlockFirst)
 12544  			b.swapSuccessors()
 12545  			return true
 12546  		}
 12547  		// match: (ULT (FlagLT_ULT) yes no)
 12548  		// result: (First yes no)
 12549  		for b.Controls[0].Op == Op386FlagLT_ULT {
 12550  			b.Reset(BlockFirst)
 12551  			return true
 12552  		}
 12553  		// match: (ULT (FlagLT_UGT) yes no)
 12554  		// result: (First no yes)
 12555  		for b.Controls[0].Op == Op386FlagLT_UGT {
 12556  			b.Reset(BlockFirst)
 12557  			b.swapSuccessors()
 12558  			return true
 12559  		}
 12560  		// match: (ULT (FlagGT_ULT) yes no)
 12561  		// result: (First yes no)
 12562  		for b.Controls[0].Op == Op386FlagGT_ULT {
 12563  			b.Reset(BlockFirst)
 12564  			return true
 12565  		}
 12566  		// match: (ULT (FlagGT_UGT) yes no)
 12567  		// result: (First no yes)
 12568  		for b.Controls[0].Op == Op386FlagGT_UGT {
 12569  			b.Reset(BlockFirst)
 12570  			b.swapSuccessors()
 12571  			return true
 12572  		}
 12573  	}
 12574  	return false
 12575  }
 12576  

View as plain text