Source file src/cmd/compile/internal/ssarewrite/rewritewasm/rewriteWasm.go

     1  // Code generated from _gen/Wasm.rules using 'go generate'; DO NOT EDIT.
     2  
     3  package rewritewasm
     4  
     5  import "math"
     6  import "cmd/compile/internal/types"
     7  import "cmd/compile/internal/ssa/ssaop"
     8  import "cmd/compile/internal/ssa"
     9  
    10  func RewriteValue(v *ssa.Value) bool {
    11  	switch v.Op {
    12  	case ssaop.OpAbs:
    13  		v.Op = ssaop.OpWasmF64Abs
    14  		return true
    15  	case ssaop.OpAbsFloat32x4:
    16  		v.Op = ssaop.OpWasmF32x4Abs
    17  		return true
    18  	case ssaop.OpAbsFloat64x2:
    19  		v.Op = ssaop.OpWasmF64x2Abs
    20  		return true
    21  	case ssaop.OpAbsInt16x8:
    22  		v.Op = ssaop.OpWasmI16x8Abs
    23  		return true
    24  	case ssaop.OpAbsInt32x4:
    25  		v.Op = ssaop.OpWasmI32x4Abs
    26  		return true
    27  	case ssaop.OpAbsInt64x2:
    28  		v.Op = ssaop.OpWasmI64x2Abs
    29  		return true
    30  	case ssaop.OpAbsInt8x16:
    31  		v.Op = ssaop.OpWasmI8x16Abs
    32  		return true
    33  	case ssaop.OpAdd16:
    34  		v.Op = ssaop.OpWasmI64Add
    35  		return true
    36  	case ssaop.OpAdd32:
    37  		v.Op = ssaop.OpWasmI64Add
    38  		return true
    39  	case ssaop.OpAdd32F:
    40  		v.Op = ssaop.OpWasmF32Add
    41  		return true
    42  	case ssaop.OpAdd64:
    43  		v.Op = ssaop.OpWasmI64Add
    44  		return true
    45  	case ssaop.OpAdd64F:
    46  		v.Op = ssaop.OpWasmF64Add
    47  		return true
    48  	case ssaop.OpAdd8:
    49  		v.Op = ssaop.OpWasmI64Add
    50  		return true
    51  	case ssaop.OpAddFloat32x4:
    52  		v.Op = ssaop.OpWasmF32x4Add
    53  		return true
    54  	case ssaop.OpAddFloat64x2:
    55  		v.Op = ssaop.OpWasmF64x2Add
    56  		return true
    57  	case ssaop.OpAddInt16x8:
    58  		v.Op = ssaop.OpWasmI16x8Add
    59  		return true
    60  	case ssaop.OpAddInt32x4:
    61  		v.Op = ssaop.OpWasmI32x4Add
    62  		return true
    63  	case ssaop.OpAddInt64x2:
    64  		v.Op = ssaop.OpWasmI64x2Add
    65  		return true
    66  	case ssaop.OpAddInt8x16:
    67  		v.Op = ssaop.OpWasmI8x16Add
    68  		return true
    69  	case ssaop.OpAddPtr:
    70  		v.Op = ssaop.OpWasmI64Add
    71  		return true
    72  	case ssaop.OpAddSaturatedInt16x8:
    73  		v.Op = ssaop.OpWasmI16x8AddSatS
    74  		return true
    75  	case ssaop.OpAddSaturatedInt8x16:
    76  		v.Op = ssaop.OpWasmI8x16AddSatS
    77  		return true
    78  	case ssaop.OpAddSaturatedUint16x8:
    79  		v.Op = ssaop.OpWasmI16x8AddSatU
    80  		return true
    81  	case ssaop.OpAddSaturatedUint8x16:
    82  		v.Op = ssaop.OpWasmI8x16AddSatU
    83  		return true
    84  	case ssaop.OpAddr:
    85  		return rewriteValue_OpAddr(v)
    86  	case ssaop.OpAnd16:
    87  		v.Op = ssaop.OpWasmI64And
    88  		return true
    89  	case ssaop.OpAnd32:
    90  		v.Op = ssaop.OpWasmI64And
    91  		return true
    92  	case ssaop.OpAnd64:
    93  		v.Op = ssaop.OpWasmI64And
    94  		return true
    95  	case ssaop.OpAnd8:
    96  		v.Op = ssaop.OpWasmI64And
    97  		return true
    98  	case ssaop.OpAndB:
    99  		v.Op = ssaop.OpWasmI64And
   100  		return true
   101  	case ssaop.OpAndInt16x8:
   102  		v.Op = ssaop.OpWasmV128And
   103  		return true
   104  	case ssaop.OpAndInt32x4:
   105  		v.Op = ssaop.OpWasmV128And
   106  		return true
   107  	case ssaop.OpAndInt64x2:
   108  		v.Op = ssaop.OpWasmV128And
   109  		return true
   110  	case ssaop.OpAndInt8x16:
   111  		v.Op = ssaop.OpWasmV128And
   112  		return true
   113  	case ssaop.OpAndNotInt16x8:
   114  		v.Op = ssaop.OpWasmV128Andnot
   115  		return true
   116  	case ssaop.OpAndNotInt32x4:
   117  		v.Op = ssaop.OpWasmV128Andnot
   118  		return true
   119  	case ssaop.OpAndNotInt64x2:
   120  		v.Op = ssaop.OpWasmV128Andnot
   121  		return true
   122  	case ssaop.OpAndNotInt8x16:
   123  		v.Op = ssaop.OpWasmV128Andnot
   124  		return true
   125  	case ssaop.OpAndNotUint16x8:
   126  		v.Op = ssaop.OpWasmV128Andnot
   127  		return true
   128  	case ssaop.OpAndNotUint32x4:
   129  		v.Op = ssaop.OpWasmV128Andnot
   130  		return true
   131  	case ssaop.OpAndNotUint64x2:
   132  		v.Op = ssaop.OpWasmV128Andnot
   133  		return true
   134  	case ssaop.OpAndNotUint8x16:
   135  		v.Op = ssaop.OpWasmV128Andnot
   136  		return true
   137  	case ssaop.OpAndUint16x8:
   138  		v.Op = ssaop.OpWasmV128And
   139  		return true
   140  	case ssaop.OpAndUint32x4:
   141  		v.Op = ssaop.OpWasmV128And
   142  		return true
   143  	case ssaop.OpAndUint64x2:
   144  		v.Op = ssaop.OpWasmV128And
   145  		return true
   146  	case ssaop.OpAndUint8x16:
   147  		v.Op = ssaop.OpWasmV128And
   148  		return true
   149  	case ssaop.OpAverageUint16x8:
   150  		v.Op = ssaop.OpWasmI16x8AvgrU
   151  		return true
   152  	case ssaop.OpAverageUint8x16:
   153  		v.Op = ssaop.OpWasmI8x16AvgrU
   154  		return true
   155  	case ssaop.OpAvg64u:
   156  		return rewriteValue_OpAvg64u(v)
   157  	case ssaop.OpBitLen16:
   158  		return rewriteValue_OpBitLen16(v)
   159  	case ssaop.OpBitLen32:
   160  		return rewriteValue_OpBitLen32(v)
   161  	case ssaop.OpBitLen64:
   162  		return rewriteValue_OpBitLen64(v)
   163  	case ssaop.OpBitLen8:
   164  		return rewriteValue_OpBitLen8(v)
   165  	case ssaop.OpBitSelectInt16x8:
   166  		v.Op = ssaop.OpWasmV128Bitselect
   167  		return true
   168  	case ssaop.OpBitSelectInt32x4:
   169  		v.Op = ssaop.OpWasmV128Bitselect
   170  		return true
   171  	case ssaop.OpBitSelectInt64x2:
   172  		v.Op = ssaop.OpWasmV128Bitselect
   173  		return true
   174  	case ssaop.OpBitSelectInt8x16:
   175  		v.Op = ssaop.OpWasmV128Bitselect
   176  		return true
   177  	case ssaop.OpBitSelectUint16x8:
   178  		v.Op = ssaop.OpWasmV128Bitselect
   179  		return true
   180  	case ssaop.OpBitSelectUint32x4:
   181  		v.Op = ssaop.OpWasmV128Bitselect
   182  		return true
   183  	case ssaop.OpBitSelectUint64x2:
   184  		v.Op = ssaop.OpWasmV128Bitselect
   185  		return true
   186  	case ssaop.OpBitSelectUint8x16:
   187  		v.Op = ssaop.OpWasmV128Bitselect
   188  		return true
   189  	case ssaop.OpBroadcastFloat32x4:
   190  		v.Op = ssaop.OpWasmF32x4Splat
   191  		return true
   192  	case ssaop.OpBroadcastFloat64x2:
   193  		v.Op = ssaop.OpWasmF64x2Splat
   194  		return true
   195  	case ssaop.OpBroadcastInt16x8:
   196  		v.Op = ssaop.OpWasmI16x8Splat
   197  		return true
   198  	case ssaop.OpBroadcastInt32x4:
   199  		v.Op = ssaop.OpWasmI32x4Splat
   200  		return true
   201  	case ssaop.OpBroadcastInt64x2:
   202  		v.Op = ssaop.OpWasmI64x2Splat
   203  		return true
   204  	case ssaop.OpBroadcastInt8x16:
   205  		v.Op = ssaop.OpWasmI8x16Splat
   206  		return true
   207  	case ssaop.OpCeil:
   208  		v.Op = ssaop.OpWasmF64Ceil
   209  		return true
   210  	case ssaop.OpCeilFloat32x4:
   211  		v.Op = ssaop.OpWasmF32x4Ceil
   212  		return true
   213  	case ssaop.OpCeilFloat64x2:
   214  		v.Op = ssaop.OpWasmF64x2Ceil
   215  		return true
   216  	case ssaop.OpClosureCall:
   217  		v.Op = ssaop.OpWasmLoweredClosureCall
   218  		return true
   219  	case ssaop.OpCom16:
   220  		return rewriteValue_OpCom16(v)
   221  	case ssaop.OpCom32:
   222  		return rewriteValue_OpCom32(v)
   223  	case ssaop.OpCom64:
   224  		return rewriteValue_OpCom64(v)
   225  	case ssaop.OpCom8:
   226  		return rewriteValue_OpCom8(v)
   227  	case ssaop.OpCondSelect:
   228  		v.Op = ssaop.OpWasmSelect
   229  		return true
   230  	case ssaop.OpConst16:
   231  		return rewriteValue_OpConst16(v)
   232  	case ssaop.OpConst32:
   233  		return rewriteValue_OpConst32(v)
   234  	case ssaop.OpConst32F:
   235  		v.Op = ssaop.OpWasmF32Const
   236  		return true
   237  	case ssaop.OpConst64:
   238  		v.Op = ssaop.OpWasmI64Const
   239  		return true
   240  	case ssaop.OpConst64F:
   241  		v.Op = ssaop.OpWasmF64Const
   242  		return true
   243  	case ssaop.OpConst8:
   244  		return rewriteValue_OpConst8(v)
   245  	case ssaop.OpConstBool:
   246  		return rewriteValue_OpConstBool(v)
   247  	case ssaop.OpConstNil:
   248  		return rewriteValue_OpConstNil(v)
   249  	case ssaop.OpConvert:
   250  		v.Op = ssaop.OpWasmLoweredConvert
   251  		return true
   252  	case ssaop.OpConvertLo2ToFloat64Int32x4:
   253  		v.Op = ssaop.OpWasmF64x2ConvertLowI32x4S
   254  		return true
   255  	case ssaop.OpConvertLo2ToFloat64Uint32x4:
   256  		v.Op = ssaop.OpWasmF64x2ConvertLowI32x4U
   257  		return true
   258  	case ssaop.OpConvertToFloat32Int32x4:
   259  		v.Op = ssaop.OpWasmF32x4ConvertI32x4S
   260  		return true
   261  	case ssaop.OpConvertToFloat32Uint32x4:
   262  		v.Op = ssaop.OpWasmF32x4ConvertI32x4U
   263  		return true
   264  	case ssaop.OpConvertToInt32Float32x4:
   265  		v.Op = ssaop.OpWasmI32x4TruncSatF32x4S
   266  		return true
   267  	case ssaop.OpConvertToUint32Float32x4:
   268  		v.Op = ssaop.OpWasmI32x4TruncSatF32x4U
   269  		return true
   270  	case ssaop.OpCopysign:
   271  		v.Op = ssaop.OpWasmF64Copysign
   272  		return true
   273  	case ssaop.OpCtz16:
   274  		return rewriteValue_OpCtz16(v)
   275  	case ssaop.OpCtz16NonZero:
   276  		v.Op = ssaop.OpWasmI64Ctz
   277  		return true
   278  	case ssaop.OpCtz32:
   279  		return rewriteValue_OpCtz32(v)
   280  	case ssaop.OpCtz32NonZero:
   281  		v.Op = ssaop.OpWasmI64Ctz
   282  		return true
   283  	case ssaop.OpCtz64:
   284  		v.Op = ssaop.OpWasmI64Ctz
   285  		return true
   286  	case ssaop.OpCtz64NonZero:
   287  		v.Op = ssaop.OpWasmI64Ctz
   288  		return true
   289  	case ssaop.OpCtz8:
   290  		return rewriteValue_OpCtz8(v)
   291  	case ssaop.OpCtz8NonZero:
   292  		v.Op = ssaop.OpWasmI64Ctz
   293  		return true
   294  	case ssaop.OpCvt32Fto32:
   295  		v.Op = ssaop.OpWasmI64TruncSatF32S
   296  		return true
   297  	case ssaop.OpCvt32Fto32U:
   298  		v.Op = ssaop.OpWasmI64TruncSatF32U
   299  		return true
   300  	case ssaop.OpCvt32Fto64:
   301  		v.Op = ssaop.OpWasmI64TruncSatF32S
   302  		return true
   303  	case ssaop.OpCvt32Fto64F:
   304  		v.Op = ssaop.OpWasmF64PromoteF32
   305  		return true
   306  	case ssaop.OpCvt32Fto64U:
   307  		v.Op = ssaop.OpWasmI64TruncSatF32U
   308  		return true
   309  	case ssaop.OpCvt32Uto32F:
   310  		return rewriteValue_OpCvt32Uto32F(v)
   311  	case ssaop.OpCvt32Uto64F:
   312  		return rewriteValue_OpCvt32Uto64F(v)
   313  	case ssaop.OpCvt32to32F:
   314  		return rewriteValue_OpCvt32to32F(v)
   315  	case ssaop.OpCvt32to64F:
   316  		return rewriteValue_OpCvt32to64F(v)
   317  	case ssaop.OpCvt64Fto32:
   318  		v.Op = ssaop.OpWasmI64TruncSatF64S
   319  		return true
   320  	case ssaop.OpCvt64Fto32F:
   321  		v.Op = ssaop.OpWasmF32DemoteF64
   322  		return true
   323  	case ssaop.OpCvt64Fto32U:
   324  		v.Op = ssaop.OpWasmI64TruncSatF64U
   325  		return true
   326  	case ssaop.OpCvt64Fto64:
   327  		v.Op = ssaop.OpWasmI64TruncSatF64S
   328  		return true
   329  	case ssaop.OpCvt64Fto64U:
   330  		v.Op = ssaop.OpWasmI64TruncSatF64U
   331  		return true
   332  	case ssaop.OpCvt64Uto32F:
   333  		v.Op = ssaop.OpWasmF32ConvertI64U
   334  		return true
   335  	case ssaop.OpCvt64Uto64F:
   336  		v.Op = ssaop.OpWasmF64ConvertI64U
   337  		return true
   338  	case ssaop.OpCvt64to32F:
   339  		v.Op = ssaop.OpWasmF32ConvertI64S
   340  		return true
   341  	case ssaop.OpCvt64to64F:
   342  		v.Op = ssaop.OpWasmF64ConvertI64S
   343  		return true
   344  	case ssaop.OpCvtBoolToUint8:
   345  		v.Op = ssaop.OpCopy
   346  		return true
   347  	case ssaop.OpDiv16:
   348  		return rewriteValue_OpDiv16(v)
   349  	case ssaop.OpDiv16u:
   350  		return rewriteValue_OpDiv16u(v)
   351  	case ssaop.OpDiv32:
   352  		return rewriteValue_OpDiv32(v)
   353  	case ssaop.OpDiv32F:
   354  		v.Op = ssaop.OpWasmF32Div
   355  		return true
   356  	case ssaop.OpDiv32u:
   357  		return rewriteValue_OpDiv32u(v)
   358  	case ssaop.OpDiv64:
   359  		return rewriteValue_OpDiv64(v)
   360  	case ssaop.OpDiv64F:
   361  		v.Op = ssaop.OpWasmF64Div
   362  		return true
   363  	case ssaop.OpDiv64u:
   364  		v.Op = ssaop.OpWasmI64DivU
   365  		return true
   366  	case ssaop.OpDiv8:
   367  		return rewriteValue_OpDiv8(v)
   368  	case ssaop.OpDiv8u:
   369  		return rewriteValue_OpDiv8u(v)
   370  	case ssaop.OpDivFloat32x4:
   371  		v.Op = ssaop.OpWasmF32x4Div
   372  		return true
   373  	case ssaop.OpDivFloat64x2:
   374  		v.Op = ssaop.OpWasmF64x2Div
   375  		return true
   376  	case ssaop.OpEq16:
   377  		return rewriteValue_OpEq16(v)
   378  	case ssaop.OpEq32:
   379  		return rewriteValue_OpEq32(v)
   380  	case ssaop.OpEq32F:
   381  		v.Op = ssaop.OpWasmF32Eq
   382  		return true
   383  	case ssaop.OpEq64:
   384  		v.Op = ssaop.OpWasmI64Eq
   385  		return true
   386  	case ssaop.OpEq64F:
   387  		v.Op = ssaop.OpWasmF64Eq
   388  		return true
   389  	case ssaop.OpEq8:
   390  		return rewriteValue_OpEq8(v)
   391  	case ssaop.OpEqB:
   392  		v.Op = ssaop.OpWasmI64Eq
   393  		return true
   394  	case ssaop.OpEqPtr:
   395  		v.Op = ssaop.OpWasmI64Eq
   396  		return true
   397  	case ssaop.OpEqualFloat32x4:
   398  		v.Op = ssaop.OpWasmF32x4Eq
   399  		return true
   400  	case ssaop.OpEqualFloat64x2:
   401  		v.Op = ssaop.OpWasmF64x2Eq
   402  		return true
   403  	case ssaop.OpEqualInt16x8:
   404  		v.Op = ssaop.OpWasmI16x8Eq
   405  		return true
   406  	case ssaop.OpEqualInt32x4:
   407  		v.Op = ssaop.OpWasmI32x4Eq
   408  		return true
   409  	case ssaop.OpEqualInt64x2:
   410  		v.Op = ssaop.OpWasmI64x2Eq
   411  		return true
   412  	case ssaop.OpEqualInt8x16:
   413  		v.Op = ssaop.OpWasmI8x16Eq
   414  		return true
   415  	case ssaop.OpEqualUint16x8:
   416  		v.Op = ssaop.OpWasmI16x8Eq
   417  		return true
   418  	case ssaop.OpEqualUint32x4:
   419  		v.Op = ssaop.OpWasmI32x4Eq
   420  		return true
   421  	case ssaop.OpEqualUint64x2:
   422  		v.Op = ssaop.OpWasmI64x2Eq
   423  		return true
   424  	case ssaop.OpEqualUint8x16:
   425  		v.Op = ssaop.OpWasmI8x16Eq
   426  		return true
   427  	case ssaop.OpExtendHi2ToInt64Int32x4:
   428  		v.Op = ssaop.OpWasmI64x2ExtendHighI32x4S
   429  		return true
   430  	case ssaop.OpExtendHi2ToUint64Uint32x4:
   431  		v.Op = ssaop.OpWasmI64x2ExtendHighI32x4U
   432  		return true
   433  	case ssaop.OpExtendHi4ToInt32Int16x8:
   434  		v.Op = ssaop.OpWasmI32x4ExtendHighI16x8S
   435  		return true
   436  	case ssaop.OpExtendHi4ToUint32Uint16x8:
   437  		v.Op = ssaop.OpWasmI32x4ExtendHighI16x8U
   438  		return true
   439  	case ssaop.OpExtendHi8ToInt16Int8x16:
   440  		v.Op = ssaop.OpWasmI16x8ExtendHighI8x16S
   441  		return true
   442  	case ssaop.OpExtendHi8ToUint16Uint8x16:
   443  		v.Op = ssaop.OpWasmI16x8ExtendHighI8x16U
   444  		return true
   445  	case ssaop.OpExtendLo2ToInt64Int32x4:
   446  		v.Op = ssaop.OpWasmI64x2ExtendLowI32x4S
   447  		return true
   448  	case ssaop.OpExtendLo2ToUint64Uint32x4:
   449  		v.Op = ssaop.OpWasmI64x2ExtendLowI32x4U
   450  		return true
   451  	case ssaop.OpExtendLo4ToInt32Int16x8:
   452  		v.Op = ssaop.OpWasmI32x4ExtendLowI16x8S
   453  		return true
   454  	case ssaop.OpExtendLo4ToUint32Uint16x8:
   455  		v.Op = ssaop.OpWasmI32x4ExtendLowI16x8U
   456  		return true
   457  	case ssaop.OpExtendLo8ToInt16Int8x16:
   458  		v.Op = ssaop.OpWasmI16x8ExtendLowI8x16S
   459  		return true
   460  	case ssaop.OpExtendLo8ToUint16Uint8x16:
   461  		v.Op = ssaop.OpWasmI16x8ExtendLowI8x16U
   462  		return true
   463  	case ssaop.OpFloor:
   464  		v.Op = ssaop.OpWasmF64Floor
   465  		return true
   466  	case ssaop.OpFloorFloat32x4:
   467  		v.Op = ssaop.OpWasmF32x4Floor
   468  		return true
   469  	case ssaop.OpFloorFloat64x2:
   470  		v.Op = ssaop.OpWasmF64x2Floor
   471  		return true
   472  	case ssaop.OpGetCallerPC:
   473  		v.Op = ssaop.OpWasmLoweredGetCallerPC
   474  		return true
   475  	case ssaop.OpGetCallerSP:
   476  		v.Op = ssaop.OpWasmLoweredGetCallerSP
   477  		return true
   478  	case ssaop.OpGetClosurePtr:
   479  		v.Op = ssaop.OpWasmLoweredGetClosurePtr
   480  		return true
   481  	case ssaop.OpGetElemFloat32x4:
   482  		v.Op = ssaop.OpWasmF32x4ExtractLane
   483  		return true
   484  	case ssaop.OpGetElemFloat64x2:
   485  		v.Op = ssaop.OpWasmF64x2ExtractLane
   486  		return true
   487  	case ssaop.OpGetElemInt16x8:
   488  		v.Op = ssaop.OpWasmI16x8ExtractLaneS
   489  		return true
   490  	case ssaop.OpGetElemInt32x4:
   491  		v.Op = ssaop.OpWasmI32x4ExtractLane
   492  		return true
   493  	case ssaop.OpGetElemInt64x2:
   494  		v.Op = ssaop.OpWasmI64x2ExtractLane
   495  		return true
   496  	case ssaop.OpGetElemInt8x16:
   497  		v.Op = ssaop.OpWasmI8x16ExtractLaneS
   498  		return true
   499  	case ssaop.OpGetElemUint16x8:
   500  		v.Op = ssaop.OpWasmI16x8ExtractLaneU
   501  		return true
   502  	case ssaop.OpGetElemUint32x4:
   503  		v.Op = ssaop.OpWasmI32x4ExtractLane
   504  		return true
   505  	case ssaop.OpGetElemUint64x2:
   506  		v.Op = ssaop.OpWasmI64x2ExtractLane
   507  		return true
   508  	case ssaop.OpGetElemUint8x16:
   509  		v.Op = ssaop.OpWasmI8x16ExtractLaneU
   510  		return true
   511  	case ssaop.OpGreaterEqualFloat32x4:
   512  		v.Op = ssaop.OpWasmF32x4Ge
   513  		return true
   514  	case ssaop.OpGreaterEqualFloat64x2:
   515  		v.Op = ssaop.OpWasmF64x2Ge
   516  		return true
   517  	case ssaop.OpGreaterEqualInt16x8:
   518  		v.Op = ssaop.OpWasmI16x8GeS
   519  		return true
   520  	case ssaop.OpGreaterEqualInt32x4:
   521  		v.Op = ssaop.OpWasmI32x4GeS
   522  		return true
   523  	case ssaop.OpGreaterEqualInt64x2:
   524  		v.Op = ssaop.OpWasmI64x2GeS
   525  		return true
   526  	case ssaop.OpGreaterEqualInt8x16:
   527  		v.Op = ssaop.OpWasmI8x16GeS
   528  		return true
   529  	case ssaop.OpGreaterEqualUint16x8:
   530  		v.Op = ssaop.OpWasmI16x8GeU
   531  		return true
   532  	case ssaop.OpGreaterEqualUint32x4:
   533  		v.Op = ssaop.OpWasmI32x4GeU
   534  		return true
   535  	case ssaop.OpGreaterEqualUint8x16:
   536  		v.Op = ssaop.OpWasmI8x16GeU
   537  		return true
   538  	case ssaop.OpGreaterFloat32x4:
   539  		v.Op = ssaop.OpWasmF32x4Gt
   540  		return true
   541  	case ssaop.OpGreaterFloat64x2:
   542  		v.Op = ssaop.OpWasmF64x2Gt
   543  		return true
   544  	case ssaop.OpGreaterInt16x8:
   545  		v.Op = ssaop.OpWasmI16x8GtS
   546  		return true
   547  	case ssaop.OpGreaterInt32x4:
   548  		v.Op = ssaop.OpWasmI32x4GtS
   549  		return true
   550  	case ssaop.OpGreaterInt64x2:
   551  		v.Op = ssaop.OpWasmI64x2GtS
   552  		return true
   553  	case ssaop.OpGreaterInt8x16:
   554  		v.Op = ssaop.OpWasmI8x16GtS
   555  		return true
   556  	case ssaop.OpGreaterUint16x8:
   557  		v.Op = ssaop.OpWasmI16x8GtU
   558  		return true
   559  	case ssaop.OpGreaterUint32x4:
   560  		v.Op = ssaop.OpWasmI32x4GtU
   561  		return true
   562  	case ssaop.OpGreaterUint8x16:
   563  		v.Op = ssaop.OpWasmI8x16GtU
   564  		return true
   565  	case ssaop.OpHmul64:
   566  		return rewriteValue_OpHmul64(v)
   567  	case ssaop.OpHmul64u:
   568  		return rewriteValue_OpHmul64u(v)
   569  	case ssaop.OpInterCall:
   570  		v.Op = ssaop.OpWasmLoweredInterCall
   571  		return true
   572  	case ssaop.OpIsInBounds:
   573  		v.Op = ssaop.OpWasmI64LtU
   574  		return true
   575  	case ssaop.OpIsNonNil:
   576  		return rewriteValue_OpIsNonNil(v)
   577  	case ssaop.OpIsSliceInBounds:
   578  		v.Op = ssaop.OpWasmI64LeU
   579  		return true
   580  	case ssaop.OpLast:
   581  		return rewriteValue_OpLast(v)
   582  	case ssaop.OpLeq16:
   583  		return rewriteValue_OpLeq16(v)
   584  	case ssaop.OpLeq16U:
   585  		return rewriteValue_OpLeq16U(v)
   586  	case ssaop.OpLeq32:
   587  		return rewriteValue_OpLeq32(v)
   588  	case ssaop.OpLeq32F:
   589  		v.Op = ssaop.OpWasmF32Le
   590  		return true
   591  	case ssaop.OpLeq32U:
   592  		return rewriteValue_OpLeq32U(v)
   593  	case ssaop.OpLeq64:
   594  		v.Op = ssaop.OpWasmI64LeS
   595  		return true
   596  	case ssaop.OpLeq64F:
   597  		v.Op = ssaop.OpWasmF64Le
   598  		return true
   599  	case ssaop.OpLeq64U:
   600  		v.Op = ssaop.OpWasmI64LeU
   601  		return true
   602  	case ssaop.OpLeq8:
   603  		return rewriteValue_OpLeq8(v)
   604  	case ssaop.OpLeq8U:
   605  		return rewriteValue_OpLeq8U(v)
   606  	case ssaop.OpLess16:
   607  		return rewriteValue_OpLess16(v)
   608  	case ssaop.OpLess16U:
   609  		return rewriteValue_OpLess16U(v)
   610  	case ssaop.OpLess32:
   611  		return rewriteValue_OpLess32(v)
   612  	case ssaop.OpLess32F:
   613  		v.Op = ssaop.OpWasmF32Lt
   614  		return true
   615  	case ssaop.OpLess32U:
   616  		return rewriteValue_OpLess32U(v)
   617  	case ssaop.OpLess64:
   618  		v.Op = ssaop.OpWasmI64LtS
   619  		return true
   620  	case ssaop.OpLess64F:
   621  		v.Op = ssaop.OpWasmF64Lt
   622  		return true
   623  	case ssaop.OpLess64U:
   624  		v.Op = ssaop.OpWasmI64LtU
   625  		return true
   626  	case ssaop.OpLess8:
   627  		return rewriteValue_OpLess8(v)
   628  	case ssaop.OpLess8U:
   629  		return rewriteValue_OpLess8U(v)
   630  	case ssaop.OpLessEqualFloat32x4:
   631  		v.Op = ssaop.OpWasmF32x4Le
   632  		return true
   633  	case ssaop.OpLessEqualFloat64x2:
   634  		v.Op = ssaop.OpWasmF64x2Le
   635  		return true
   636  	case ssaop.OpLessEqualInt16x8:
   637  		v.Op = ssaop.OpWasmI16x8LeS
   638  		return true
   639  	case ssaop.OpLessEqualInt32x4:
   640  		v.Op = ssaop.OpWasmI32x4LeS
   641  		return true
   642  	case ssaop.OpLessEqualInt64x2:
   643  		v.Op = ssaop.OpWasmI64x2LeS
   644  		return true
   645  	case ssaop.OpLessEqualInt8x16:
   646  		v.Op = ssaop.OpWasmI8x16LeS
   647  		return true
   648  	case ssaop.OpLessEqualUint16x8:
   649  		v.Op = ssaop.OpWasmI16x8LeU
   650  		return true
   651  	case ssaop.OpLessEqualUint32x4:
   652  		v.Op = ssaop.OpWasmI32x4LeU
   653  		return true
   654  	case ssaop.OpLessEqualUint8x16:
   655  		v.Op = ssaop.OpWasmI8x16LeU
   656  		return true
   657  	case ssaop.OpLessFloat32x4:
   658  		v.Op = ssaop.OpWasmF32x4Lt
   659  		return true
   660  	case ssaop.OpLessFloat64x2:
   661  		v.Op = ssaop.OpWasmF64x2Lt
   662  		return true
   663  	case ssaop.OpLessInt16x8:
   664  		v.Op = ssaop.OpWasmI16x8LtS
   665  		return true
   666  	case ssaop.OpLessInt32x4:
   667  		v.Op = ssaop.OpWasmI32x4LtS
   668  		return true
   669  	case ssaop.OpLessInt64x2:
   670  		v.Op = ssaop.OpWasmI64x2LtS
   671  		return true
   672  	case ssaop.OpLessInt8x16:
   673  		v.Op = ssaop.OpWasmI8x16LtS
   674  		return true
   675  	case ssaop.OpLessUint16x8:
   676  		v.Op = ssaop.OpWasmI16x8LtU
   677  		return true
   678  	case ssaop.OpLessUint32x4:
   679  		v.Op = ssaop.OpWasmI32x4LtU
   680  		return true
   681  	case ssaop.OpLessUint8x16:
   682  		v.Op = ssaop.OpWasmI8x16LtU
   683  		return true
   684  	case ssaop.OpLoad:
   685  		return rewriteValue_OpLoad(v)
   686  	case ssaop.OpLocalAddr:
   687  		return rewriteValue_OpLocalAddr(v)
   688  	case ssaop.OpLookupOrZeroInt8x16:
   689  		v.Op = ssaop.OpWasmI8x16Swizzle
   690  		return true
   691  	case ssaop.OpLsh16x16:
   692  		return rewriteValue_OpLsh16x16(v)
   693  	case ssaop.OpLsh16x32:
   694  		return rewriteValue_OpLsh16x32(v)
   695  	case ssaop.OpLsh16x64:
   696  		v.Op = ssaop.OpLsh64x64
   697  		return true
   698  	case ssaop.OpLsh16x8:
   699  		return rewriteValue_OpLsh16x8(v)
   700  	case ssaop.OpLsh32x16:
   701  		return rewriteValue_OpLsh32x16(v)
   702  	case ssaop.OpLsh32x32:
   703  		return rewriteValue_OpLsh32x32(v)
   704  	case ssaop.OpLsh32x64:
   705  		v.Op = ssaop.OpLsh64x64
   706  		return true
   707  	case ssaop.OpLsh32x8:
   708  		return rewriteValue_OpLsh32x8(v)
   709  	case ssaop.OpLsh64x16:
   710  		return rewriteValue_OpLsh64x16(v)
   711  	case ssaop.OpLsh64x32:
   712  		return rewriteValue_OpLsh64x32(v)
   713  	case ssaop.OpLsh64x64:
   714  		return rewriteValue_OpLsh64x64(v)
   715  	case ssaop.OpLsh64x8:
   716  		return rewriteValue_OpLsh64x8(v)
   717  	case ssaop.OpLsh8x16:
   718  		return rewriteValue_OpLsh8x16(v)
   719  	case ssaop.OpLsh8x32:
   720  		return rewriteValue_OpLsh8x32(v)
   721  	case ssaop.OpLsh8x64:
   722  		v.Op = ssaop.OpLsh64x64
   723  		return true
   724  	case ssaop.OpLsh8x8:
   725  		return rewriteValue_OpLsh8x8(v)
   726  	case ssaop.OpMaxFloat32x4:
   727  		v.Op = ssaop.OpWasmF32x4Max
   728  		return true
   729  	case ssaop.OpMaxFloat64x2:
   730  		v.Op = ssaop.OpWasmF64x2Max
   731  		return true
   732  	case ssaop.OpMaxInt16x8:
   733  		v.Op = ssaop.OpWasmI16x8MaxS
   734  		return true
   735  	case ssaop.OpMaxInt32x4:
   736  		v.Op = ssaop.OpWasmI32x4MaxS
   737  		return true
   738  	case ssaop.OpMaxInt8x16:
   739  		v.Op = ssaop.OpWasmI8x16MaxS
   740  		return true
   741  	case ssaop.OpMaxUint16x8:
   742  		v.Op = ssaop.OpWasmI16x8MaxU
   743  		return true
   744  	case ssaop.OpMaxUint32x4:
   745  		v.Op = ssaop.OpWasmI32x4MaxU
   746  		return true
   747  	case ssaop.OpMaxUint8x16:
   748  		v.Op = ssaop.OpWasmI8x16MaxU
   749  		return true
   750  	case ssaop.OpMinFloat32x4:
   751  		v.Op = ssaop.OpWasmF32x4Min
   752  		return true
   753  	case ssaop.OpMinFloat64x2:
   754  		v.Op = ssaop.OpWasmF64x2Min
   755  		return true
   756  	case ssaop.OpMinInt16x8:
   757  		v.Op = ssaop.OpWasmI16x8MinS
   758  		return true
   759  	case ssaop.OpMinInt32x4:
   760  		v.Op = ssaop.OpWasmI32x4MinS
   761  		return true
   762  	case ssaop.OpMinInt8x16:
   763  		v.Op = ssaop.OpWasmI8x16MinS
   764  		return true
   765  	case ssaop.OpMinUint16x8:
   766  		v.Op = ssaop.OpWasmI16x8MinU
   767  		return true
   768  	case ssaop.OpMinUint32x4:
   769  		v.Op = ssaop.OpWasmI32x4MinU
   770  		return true
   771  	case ssaop.OpMinUint8x16:
   772  		v.Op = ssaop.OpWasmI8x16MinU
   773  		return true
   774  	case ssaop.OpMod16:
   775  		return rewriteValue_OpMod16(v)
   776  	case ssaop.OpMod16u:
   777  		return rewriteValue_OpMod16u(v)
   778  	case ssaop.OpMod32:
   779  		return rewriteValue_OpMod32(v)
   780  	case ssaop.OpMod32u:
   781  		return rewriteValue_OpMod32u(v)
   782  	case ssaop.OpMod64:
   783  		return rewriteValue_OpMod64(v)
   784  	case ssaop.OpMod64u:
   785  		v.Op = ssaop.OpWasmI64RemU
   786  		return true
   787  	case ssaop.OpMod8:
   788  		return rewriteValue_OpMod8(v)
   789  	case ssaop.OpMod8u:
   790  		return rewriteValue_OpMod8u(v)
   791  	case ssaop.OpMove:
   792  		return rewriteValue_OpMove(v)
   793  	case ssaop.OpMul16:
   794  		v.Op = ssaop.OpWasmI64Mul
   795  		return true
   796  	case ssaop.OpMul32:
   797  		v.Op = ssaop.OpWasmI64Mul
   798  		return true
   799  	case ssaop.OpMul32F:
   800  		v.Op = ssaop.OpWasmF32Mul
   801  		return true
   802  	case ssaop.OpMul64:
   803  		v.Op = ssaop.OpWasmI64Mul
   804  		return true
   805  	case ssaop.OpMul64F:
   806  		v.Op = ssaop.OpWasmF64Mul
   807  		return true
   808  	case ssaop.OpMul8:
   809  		v.Op = ssaop.OpWasmI64Mul
   810  		return true
   811  	case ssaop.OpMulFloat32x4:
   812  		v.Op = ssaop.OpWasmF32x4Mul
   813  		return true
   814  	case ssaop.OpMulFloat64x2:
   815  		v.Op = ssaop.OpWasmF64x2Mul
   816  		return true
   817  	case ssaop.OpMulInt16x8:
   818  		v.Op = ssaop.OpWasmI16x8Mul
   819  		return true
   820  	case ssaop.OpMulInt32x4:
   821  		v.Op = ssaop.OpWasmI32x4Mul
   822  		return true
   823  	case ssaop.OpMulInt64x2:
   824  		v.Op = ssaop.OpWasmI64x2Mul
   825  		return true
   826  	case ssaop.OpMulUint16x8:
   827  		v.Op = ssaop.OpWasmI16x8Mul
   828  		return true
   829  	case ssaop.OpMulUint32x4:
   830  		v.Op = ssaop.OpWasmI32x4Mul
   831  		return true
   832  	case ssaop.OpMulUint64x2:
   833  		v.Op = ssaop.OpWasmI64x2Mul
   834  		return true
   835  	case ssaop.OpMulWidenHiInt16x8:
   836  		v.Op = ssaop.OpWasmI32x4ExtmulHighI16x8S
   837  		return true
   838  	case ssaop.OpMulWidenHiInt32x4:
   839  		v.Op = ssaop.OpWasmI64x2ExtmulHighI32x4S
   840  		return true
   841  	case ssaop.OpMulWidenHiInt8x16:
   842  		v.Op = ssaop.OpWasmI16x8ExtmulHighI8x16S
   843  		return true
   844  	case ssaop.OpMulWidenHiUint16x8:
   845  		v.Op = ssaop.OpWasmI32x4ExtmulHighI16x8U
   846  		return true
   847  	case ssaop.OpMulWidenHiUint32x4:
   848  		v.Op = ssaop.OpWasmI64x2ExtmulHighI32x4U
   849  		return true
   850  	case ssaop.OpMulWidenHiUint8x16:
   851  		v.Op = ssaop.OpWasmI16x8ExtmulHighI8x16U
   852  		return true
   853  	case ssaop.OpMulWidenLoInt16x8:
   854  		v.Op = ssaop.OpWasmI32x4ExtmulLowI16x8S
   855  		return true
   856  	case ssaop.OpMulWidenLoInt32x4:
   857  		v.Op = ssaop.OpWasmI64x2ExtmulLowI32x4S
   858  		return true
   859  	case ssaop.OpMulWidenLoInt8x16:
   860  		v.Op = ssaop.OpWasmI16x8ExtmulLowI8x16S
   861  		return true
   862  	case ssaop.OpMulWidenLoUint16x8:
   863  		v.Op = ssaop.OpWasmI32x4ExtmulLowI16x8U
   864  		return true
   865  	case ssaop.OpMulWidenLoUint32x4:
   866  		v.Op = ssaop.OpWasmI64x2ExtmulLowI32x4U
   867  		return true
   868  	case ssaop.OpMulWidenLoUint8x16:
   869  		v.Op = ssaop.OpWasmI16x8ExtmulLowI8x16U
   870  		return true
   871  	case ssaop.OpNeg16:
   872  		return rewriteValue_OpNeg16(v)
   873  	case ssaop.OpNeg32:
   874  		return rewriteValue_OpNeg32(v)
   875  	case ssaop.OpNeg32F:
   876  		v.Op = ssaop.OpWasmF32Neg
   877  		return true
   878  	case ssaop.OpNeg64:
   879  		return rewriteValue_OpNeg64(v)
   880  	case ssaop.OpNeg64F:
   881  		v.Op = ssaop.OpWasmF64Neg
   882  		return true
   883  	case ssaop.OpNeg8:
   884  		return rewriteValue_OpNeg8(v)
   885  	case ssaop.OpNegFloat32x4:
   886  		v.Op = ssaop.OpWasmF32x4Neg
   887  		return true
   888  	case ssaop.OpNegFloat64x2:
   889  		v.Op = ssaop.OpWasmF64x2Neg
   890  		return true
   891  	case ssaop.OpNegInt16x8:
   892  		v.Op = ssaop.OpWasmI16x8Neg
   893  		return true
   894  	case ssaop.OpNegInt32x4:
   895  		v.Op = ssaop.OpWasmI32x4Neg
   896  		return true
   897  	case ssaop.OpNegInt64x2:
   898  		v.Op = ssaop.OpWasmI64x2Neg
   899  		return true
   900  	case ssaop.OpNegInt8x16:
   901  		v.Op = ssaop.OpWasmI8x16Neg
   902  		return true
   903  	case ssaop.OpNeq16:
   904  		return rewriteValue_OpNeq16(v)
   905  	case ssaop.OpNeq32:
   906  		return rewriteValue_OpNeq32(v)
   907  	case ssaop.OpNeq32F:
   908  		v.Op = ssaop.OpWasmF32Ne
   909  		return true
   910  	case ssaop.OpNeq64:
   911  		v.Op = ssaop.OpWasmI64Ne
   912  		return true
   913  	case ssaop.OpNeq64F:
   914  		v.Op = ssaop.OpWasmF64Ne
   915  		return true
   916  	case ssaop.OpNeq8:
   917  		return rewriteValue_OpNeq8(v)
   918  	case ssaop.OpNeqB:
   919  		v.Op = ssaop.OpWasmI64Ne
   920  		return true
   921  	case ssaop.OpNeqPtr:
   922  		v.Op = ssaop.OpWasmI64Ne
   923  		return true
   924  	case ssaop.OpNilCheck:
   925  		v.Op = ssaop.OpWasmLoweredNilCheck
   926  		return true
   927  	case ssaop.OpNot:
   928  		v.Op = ssaop.OpWasmI64Eqz
   929  		return true
   930  	case ssaop.OpNotEqualFloat32x4:
   931  		v.Op = ssaop.OpWasmF32x4Ne
   932  		return true
   933  	case ssaop.OpNotEqualFloat64x2:
   934  		v.Op = ssaop.OpWasmF64x2Ne
   935  		return true
   936  	case ssaop.OpNotEqualInt16x8:
   937  		v.Op = ssaop.OpWasmI16x8Ne
   938  		return true
   939  	case ssaop.OpNotEqualInt32x4:
   940  		v.Op = ssaop.OpWasmI32x4Ne
   941  		return true
   942  	case ssaop.OpNotEqualInt64x2:
   943  		v.Op = ssaop.OpWasmI64x2Ne
   944  		return true
   945  	case ssaop.OpNotEqualInt8x16:
   946  		v.Op = ssaop.OpWasmI8x16Ne
   947  		return true
   948  	case ssaop.OpNotEqualUint16x8:
   949  		v.Op = ssaop.OpWasmI16x8Ne
   950  		return true
   951  	case ssaop.OpNotEqualUint32x4:
   952  		v.Op = ssaop.OpWasmI32x4Ne
   953  		return true
   954  	case ssaop.OpNotEqualUint64x2:
   955  		v.Op = ssaop.OpWasmI64x2Ne
   956  		return true
   957  	case ssaop.OpNotEqualUint8x16:
   958  		v.Op = ssaop.OpWasmI8x16Ne
   959  		return true
   960  	case ssaop.OpNotInt16x8:
   961  		v.Op = ssaop.OpWasmV128Not
   962  		return true
   963  	case ssaop.OpNotInt32x4:
   964  		v.Op = ssaop.OpWasmV128Not
   965  		return true
   966  	case ssaop.OpNotInt64x2:
   967  		v.Op = ssaop.OpWasmV128Not
   968  		return true
   969  	case ssaop.OpNotInt8x16:
   970  		v.Op = ssaop.OpWasmV128Not
   971  		return true
   972  	case ssaop.OpNotUint16x8:
   973  		v.Op = ssaop.OpWasmV128Not
   974  		return true
   975  	case ssaop.OpNotUint32x4:
   976  		v.Op = ssaop.OpWasmV128Not
   977  		return true
   978  	case ssaop.OpNotUint64x2:
   979  		v.Op = ssaop.OpWasmV128Not
   980  		return true
   981  	case ssaop.OpNotUint8x16:
   982  		v.Op = ssaop.OpWasmV128Not
   983  		return true
   984  	case ssaop.OpOffPtr:
   985  		v.Op = ssaop.OpWasmI64AddConst
   986  		return true
   987  	case ssaop.OpOnesCountInt8x16:
   988  		v.Op = ssaop.OpWasmI8x16Popcnt
   989  		return true
   990  	case ssaop.OpOr16:
   991  		v.Op = ssaop.OpWasmI64Or
   992  		return true
   993  	case ssaop.OpOr32:
   994  		v.Op = ssaop.OpWasmI64Or
   995  		return true
   996  	case ssaop.OpOr64:
   997  		v.Op = ssaop.OpWasmI64Or
   998  		return true
   999  	case ssaop.OpOr8:
  1000  		v.Op = ssaop.OpWasmI64Or
  1001  		return true
  1002  	case ssaop.OpOrB:
  1003  		v.Op = ssaop.OpWasmI64Or
  1004  		return true
  1005  	case ssaop.OpOrInt16x8:
  1006  		v.Op = ssaop.OpWasmV128Or
  1007  		return true
  1008  	case ssaop.OpOrInt32x4:
  1009  		v.Op = ssaop.OpWasmV128Or
  1010  		return true
  1011  	case ssaop.OpOrInt64x2:
  1012  		v.Op = ssaop.OpWasmV128Or
  1013  		return true
  1014  	case ssaop.OpOrInt8x16:
  1015  		v.Op = ssaop.OpWasmV128Or
  1016  		return true
  1017  	case ssaop.OpOrUint16x8:
  1018  		v.Op = ssaop.OpWasmV128Or
  1019  		return true
  1020  	case ssaop.OpOrUint32x4:
  1021  		v.Op = ssaop.OpWasmV128Or
  1022  		return true
  1023  	case ssaop.OpOrUint64x2:
  1024  		v.Op = ssaop.OpWasmV128Or
  1025  		return true
  1026  	case ssaop.OpOrUint8x16:
  1027  		v.Op = ssaop.OpWasmV128Or
  1028  		return true
  1029  	case ssaop.OpPopCount16:
  1030  		return rewriteValue_OpPopCount16(v)
  1031  	case ssaop.OpPopCount32:
  1032  		return rewriteValue_OpPopCount32(v)
  1033  	case ssaop.OpPopCount64:
  1034  		v.Op = ssaop.OpWasmI64Popcnt
  1035  		return true
  1036  	case ssaop.OpPopCount8:
  1037  		return rewriteValue_OpPopCount8(v)
  1038  	case ssaop.OpRotateAllLeftVarInt16x8:
  1039  		return rewriteValue_OpRotateAllLeftVarInt16x8(v)
  1040  	case ssaop.OpRotateAllLeftVarInt32x4:
  1041  		return rewriteValue_OpRotateAllLeftVarInt32x4(v)
  1042  	case ssaop.OpRotateAllLeftVarInt64x2:
  1043  		return rewriteValue_OpRotateAllLeftVarInt64x2(v)
  1044  	case ssaop.OpRotateAllLeftVarInt8x16:
  1045  		return rewriteValue_OpRotateAllLeftVarInt8x16(v)
  1046  	case ssaop.OpRotateAllLeftVarUint16x8:
  1047  		return rewriteValue_OpRotateAllLeftVarUint16x8(v)
  1048  	case ssaop.OpRotateAllLeftVarUint32x4:
  1049  		return rewriteValue_OpRotateAllLeftVarUint32x4(v)
  1050  	case ssaop.OpRotateAllLeftVarUint64x2:
  1051  		return rewriteValue_OpRotateAllLeftVarUint64x2(v)
  1052  	case ssaop.OpRotateAllLeftVarUint8x16:
  1053  		return rewriteValue_OpRotateAllLeftVarUint8x16(v)
  1054  	case ssaop.OpRotateAllRightVarInt16x8:
  1055  		return rewriteValue_OpRotateAllRightVarInt16x8(v)
  1056  	case ssaop.OpRotateAllRightVarInt32x4:
  1057  		return rewriteValue_OpRotateAllRightVarInt32x4(v)
  1058  	case ssaop.OpRotateAllRightVarInt64x2:
  1059  		return rewriteValue_OpRotateAllRightVarInt64x2(v)
  1060  	case ssaop.OpRotateAllRightVarInt8x16:
  1061  		return rewriteValue_OpRotateAllRightVarInt8x16(v)
  1062  	case ssaop.OpRotateAllRightVarUint16x8:
  1063  		return rewriteValue_OpRotateAllRightVarUint16x8(v)
  1064  	case ssaop.OpRotateAllRightVarUint32x4:
  1065  		return rewriteValue_OpRotateAllRightVarUint32x4(v)
  1066  	case ssaop.OpRotateAllRightVarUint64x2:
  1067  		return rewriteValue_OpRotateAllRightVarUint64x2(v)
  1068  	case ssaop.OpRotateAllRightVarUint8x16:
  1069  		return rewriteValue_OpRotateAllRightVarUint8x16(v)
  1070  	case ssaop.OpRotateLeft16:
  1071  		return rewriteValue_OpRotateLeft16(v)
  1072  	case ssaop.OpRotateLeft32:
  1073  		v.Op = ssaop.OpWasmI32Rotl
  1074  		return true
  1075  	case ssaop.OpRotateLeft64:
  1076  		v.Op = ssaop.OpWasmI64Rotl
  1077  		return true
  1078  	case ssaop.OpRotateLeft8:
  1079  		return rewriteValue_OpRotateLeft8(v)
  1080  	case ssaop.OpRound32F:
  1081  		v.Op = ssaop.OpCopy
  1082  		return true
  1083  	case ssaop.OpRound64F:
  1084  		v.Op = ssaop.OpCopy
  1085  		return true
  1086  	case ssaop.OpRoundFloat32x4:
  1087  		v.Op = ssaop.OpWasmF32x4Nearest
  1088  		return true
  1089  	case ssaop.OpRoundFloat64x2:
  1090  		v.Op = ssaop.OpWasmF64x2Nearest
  1091  		return true
  1092  	case ssaop.OpRoundToEven:
  1093  		v.Op = ssaop.OpWasmF64Nearest
  1094  		return true
  1095  	case ssaop.OpRsh16Ux16:
  1096  		return rewriteValue_OpRsh16Ux16(v)
  1097  	case ssaop.OpRsh16Ux32:
  1098  		return rewriteValue_OpRsh16Ux32(v)
  1099  	case ssaop.OpRsh16Ux64:
  1100  		return rewriteValue_OpRsh16Ux64(v)
  1101  	case ssaop.OpRsh16Ux8:
  1102  		return rewriteValue_OpRsh16Ux8(v)
  1103  	case ssaop.OpRsh16x16:
  1104  		return rewriteValue_OpRsh16x16(v)
  1105  	case ssaop.OpRsh16x32:
  1106  		return rewriteValue_OpRsh16x32(v)
  1107  	case ssaop.OpRsh16x64:
  1108  		return rewriteValue_OpRsh16x64(v)
  1109  	case ssaop.OpRsh16x8:
  1110  		return rewriteValue_OpRsh16x8(v)
  1111  	case ssaop.OpRsh32Ux16:
  1112  		return rewriteValue_OpRsh32Ux16(v)
  1113  	case ssaop.OpRsh32Ux32:
  1114  		return rewriteValue_OpRsh32Ux32(v)
  1115  	case ssaop.OpRsh32Ux64:
  1116  		return rewriteValue_OpRsh32Ux64(v)
  1117  	case ssaop.OpRsh32Ux8:
  1118  		return rewriteValue_OpRsh32Ux8(v)
  1119  	case ssaop.OpRsh32x16:
  1120  		return rewriteValue_OpRsh32x16(v)
  1121  	case ssaop.OpRsh32x32:
  1122  		return rewriteValue_OpRsh32x32(v)
  1123  	case ssaop.OpRsh32x64:
  1124  		return rewriteValue_OpRsh32x64(v)
  1125  	case ssaop.OpRsh32x8:
  1126  		return rewriteValue_OpRsh32x8(v)
  1127  	case ssaop.OpRsh64Ux16:
  1128  		return rewriteValue_OpRsh64Ux16(v)
  1129  	case ssaop.OpRsh64Ux32:
  1130  		return rewriteValue_OpRsh64Ux32(v)
  1131  	case ssaop.OpRsh64Ux64:
  1132  		return rewriteValue_OpRsh64Ux64(v)
  1133  	case ssaop.OpRsh64Ux8:
  1134  		return rewriteValue_OpRsh64Ux8(v)
  1135  	case ssaop.OpRsh64x16:
  1136  		return rewriteValue_OpRsh64x16(v)
  1137  	case ssaop.OpRsh64x32:
  1138  		return rewriteValue_OpRsh64x32(v)
  1139  	case ssaop.OpRsh64x64:
  1140  		return rewriteValue_OpRsh64x64(v)
  1141  	case ssaop.OpRsh64x8:
  1142  		return rewriteValue_OpRsh64x8(v)
  1143  	case ssaop.OpRsh8Ux16:
  1144  		return rewriteValue_OpRsh8Ux16(v)
  1145  	case ssaop.OpRsh8Ux32:
  1146  		return rewriteValue_OpRsh8Ux32(v)
  1147  	case ssaop.OpRsh8Ux64:
  1148  		return rewriteValue_OpRsh8Ux64(v)
  1149  	case ssaop.OpRsh8Ux8:
  1150  		return rewriteValue_OpRsh8Ux8(v)
  1151  	case ssaop.OpRsh8x16:
  1152  		return rewriteValue_OpRsh8x16(v)
  1153  	case ssaop.OpRsh8x32:
  1154  		return rewriteValue_OpRsh8x32(v)
  1155  	case ssaop.OpRsh8x64:
  1156  		return rewriteValue_OpRsh8x64(v)
  1157  	case ssaop.OpRsh8x8:
  1158  		return rewriteValue_OpRsh8x8(v)
  1159  	case ssaop.OpSelect0:
  1160  		return rewriteValue_OpSelect0(v)
  1161  	case ssaop.OpSelect1:
  1162  		return rewriteValue_OpSelect1(v)
  1163  	case ssaop.OpSetElemFloat32x4:
  1164  		v.Op = ssaop.OpWasmF32x4ReplaceLane
  1165  		return true
  1166  	case ssaop.OpSetElemFloat64x2:
  1167  		v.Op = ssaop.OpWasmF64x2ReplaceLane
  1168  		return true
  1169  	case ssaop.OpSetElemInt16x8:
  1170  		v.Op = ssaop.OpWasmI16x8ReplaceLane
  1171  		return true
  1172  	case ssaop.OpSetElemInt32x4:
  1173  		v.Op = ssaop.OpWasmI32x4ReplaceLane
  1174  		return true
  1175  	case ssaop.OpSetElemInt64x2:
  1176  		v.Op = ssaop.OpWasmI64x2ReplaceLane
  1177  		return true
  1178  	case ssaop.OpSetElemInt8x16:
  1179  		v.Op = ssaop.OpWasmI8x16ReplaceLane
  1180  		return true
  1181  	case ssaop.OpSetElemUint16x8:
  1182  		v.Op = ssaop.OpWasmI16x8ReplaceLane
  1183  		return true
  1184  	case ssaop.OpSetElemUint32x4:
  1185  		v.Op = ssaop.OpWasmI32x4ReplaceLane
  1186  		return true
  1187  	case ssaop.OpSetElemUint64x2:
  1188  		v.Op = ssaop.OpWasmI64x2ReplaceLane
  1189  		return true
  1190  	case ssaop.OpSetElemUint8x16:
  1191  		v.Op = ssaop.OpWasmI8x16ReplaceLane
  1192  		return true
  1193  	case ssaop.OpShiftAllLeftInt16x8:
  1194  		return rewriteValue_OpShiftAllLeftInt16x8(v)
  1195  	case ssaop.OpShiftAllLeftInt32x4:
  1196  		return rewriteValue_OpShiftAllLeftInt32x4(v)
  1197  	case ssaop.OpShiftAllLeftInt64x2:
  1198  		return rewriteValue_OpShiftAllLeftInt64x2(v)
  1199  	case ssaop.OpShiftAllLeftInt8x16:
  1200  		return rewriteValue_OpShiftAllLeftInt8x16(v)
  1201  	case ssaop.OpShiftAllLeftUint16x8:
  1202  		return rewriteValue_OpShiftAllLeftUint16x8(v)
  1203  	case ssaop.OpShiftAllLeftUint32x4:
  1204  		return rewriteValue_OpShiftAllLeftUint32x4(v)
  1205  	case ssaop.OpShiftAllLeftUint64x2:
  1206  		return rewriteValue_OpShiftAllLeftUint64x2(v)
  1207  	case ssaop.OpShiftAllLeftUint8x16:
  1208  		return rewriteValue_OpShiftAllLeftUint8x16(v)
  1209  	case ssaop.OpShiftAllRightInt16x8:
  1210  		return rewriteValue_OpShiftAllRightInt16x8(v)
  1211  	case ssaop.OpShiftAllRightInt32x4:
  1212  		return rewriteValue_OpShiftAllRightInt32x4(v)
  1213  	case ssaop.OpShiftAllRightInt64x2:
  1214  		return rewriteValue_OpShiftAllRightInt64x2(v)
  1215  	case ssaop.OpShiftAllRightInt8x16:
  1216  		return rewriteValue_OpShiftAllRightInt8x16(v)
  1217  	case ssaop.OpShiftAllRightUint16x8:
  1218  		return rewriteValue_OpShiftAllRightUint16x8(v)
  1219  	case ssaop.OpShiftAllRightUint32x4:
  1220  		return rewriteValue_OpShiftAllRightUint32x4(v)
  1221  	case ssaop.OpShiftAllRightUint64x2:
  1222  		return rewriteValue_OpShiftAllRightUint64x2(v)
  1223  	case ssaop.OpShiftAllRightUint8x16:
  1224  		return rewriteValue_OpShiftAllRightUint8x16(v)
  1225  	case ssaop.OpSignExt16to32:
  1226  		return rewriteValue_OpSignExt16to32(v)
  1227  	case ssaop.OpSignExt16to64:
  1228  		return rewriteValue_OpSignExt16to64(v)
  1229  	case ssaop.OpSignExt32to64:
  1230  		return rewriteValue_OpSignExt32to64(v)
  1231  	case ssaop.OpSignExt8to16:
  1232  		return rewriteValue_OpSignExt8to16(v)
  1233  	case ssaop.OpSignExt8to32:
  1234  		return rewriteValue_OpSignExt8to32(v)
  1235  	case ssaop.OpSignExt8to64:
  1236  		return rewriteValue_OpSignExt8to64(v)
  1237  	case ssaop.OpSlicemask:
  1238  		return rewriteValue_OpSlicemask(v)
  1239  	case ssaop.OpSqrt:
  1240  		v.Op = ssaop.OpWasmF64Sqrt
  1241  		return true
  1242  	case ssaop.OpSqrt32:
  1243  		v.Op = ssaop.OpWasmF32Sqrt
  1244  		return true
  1245  	case ssaop.OpSqrtFloat32x4:
  1246  		v.Op = ssaop.OpWasmF32x4Sqrt
  1247  		return true
  1248  	case ssaop.OpSqrtFloat64x2:
  1249  		v.Op = ssaop.OpWasmF64x2Sqrt
  1250  		return true
  1251  	case ssaop.OpStaticCall:
  1252  		v.Op = ssaop.OpWasmLoweredStaticCall
  1253  		return true
  1254  	case ssaop.OpStore:
  1255  		return rewriteValue_OpStore(v)
  1256  	case ssaop.OpSub16:
  1257  		v.Op = ssaop.OpWasmI64Sub
  1258  		return true
  1259  	case ssaop.OpSub32:
  1260  		v.Op = ssaop.OpWasmI64Sub
  1261  		return true
  1262  	case ssaop.OpSub32F:
  1263  		v.Op = ssaop.OpWasmF32Sub
  1264  		return true
  1265  	case ssaop.OpSub64:
  1266  		v.Op = ssaop.OpWasmI64Sub
  1267  		return true
  1268  	case ssaop.OpSub64F:
  1269  		v.Op = ssaop.OpWasmF64Sub
  1270  		return true
  1271  	case ssaop.OpSub8:
  1272  		v.Op = ssaop.OpWasmI64Sub
  1273  		return true
  1274  	case ssaop.OpSubFloat32x4:
  1275  		v.Op = ssaop.OpWasmF32x4Sub
  1276  		return true
  1277  	case ssaop.OpSubFloat64x2:
  1278  		v.Op = ssaop.OpWasmF64x2Sub
  1279  		return true
  1280  	case ssaop.OpSubInt16x8:
  1281  		v.Op = ssaop.OpWasmI16x8Sub
  1282  		return true
  1283  	case ssaop.OpSubInt32x4:
  1284  		v.Op = ssaop.OpWasmI32x4Sub
  1285  		return true
  1286  	case ssaop.OpSubInt64x2:
  1287  		v.Op = ssaop.OpWasmI64x2Sub
  1288  		return true
  1289  	case ssaop.OpSubInt8x16:
  1290  		v.Op = ssaop.OpWasmI8x16Sub
  1291  		return true
  1292  	case ssaop.OpSubPtr:
  1293  		v.Op = ssaop.OpWasmI64Sub
  1294  		return true
  1295  	case ssaop.OpSubSaturatedInt16x8:
  1296  		v.Op = ssaop.OpWasmI16x8SubSatS
  1297  		return true
  1298  	case ssaop.OpSubSaturatedInt8x16:
  1299  		v.Op = ssaop.OpWasmI8x16SubSatS
  1300  		return true
  1301  	case ssaop.OpSubSaturatedUint16x8:
  1302  		v.Op = ssaop.OpWasmI16x8SubSatU
  1303  		return true
  1304  	case ssaop.OpSubSaturatedUint8x16:
  1305  		v.Op = ssaop.OpWasmI8x16SubSatU
  1306  		return true
  1307  	case ssaop.OpTailCall:
  1308  		v.Op = ssaop.OpWasmLoweredTailCall
  1309  		return true
  1310  	case ssaop.OpTailCallInter:
  1311  		v.Op = ssaop.OpWasmLoweredTailCallInter
  1312  		return true
  1313  	case ssaop.OpTrunc:
  1314  		v.Op = ssaop.OpWasmF64Trunc
  1315  		return true
  1316  	case ssaop.OpTrunc16to8:
  1317  		v.Op = ssaop.OpCopy
  1318  		return true
  1319  	case ssaop.OpTrunc32to16:
  1320  		v.Op = ssaop.OpCopy
  1321  		return true
  1322  	case ssaop.OpTrunc32to8:
  1323  		v.Op = ssaop.OpCopy
  1324  		return true
  1325  	case ssaop.OpTrunc64to16:
  1326  		v.Op = ssaop.OpCopy
  1327  		return true
  1328  	case ssaop.OpTrunc64to32:
  1329  		v.Op = ssaop.OpCopy
  1330  		return true
  1331  	case ssaop.OpTrunc64to8:
  1332  		v.Op = ssaop.OpCopy
  1333  		return true
  1334  	case ssaop.OpTruncFloat32x4:
  1335  		v.Op = ssaop.OpWasmF32x4Trunc
  1336  		return true
  1337  	case ssaop.OpTruncFloat64x2:
  1338  		v.Op = ssaop.OpWasmF64x2Trunc
  1339  		return true
  1340  	case ssaop.OpWB:
  1341  		v.Op = ssaop.OpWasmLoweredWB
  1342  		return true
  1343  	case ssaop.OpWasmF32DemoteF64:
  1344  		return rewriteValue_OpWasmF32DemoteF64(v)
  1345  	case ssaop.OpWasmF64Add:
  1346  		return rewriteValue_OpWasmF64Add(v)
  1347  	case ssaop.OpWasmF64Mul:
  1348  		return rewriteValue_OpWasmF64Mul(v)
  1349  	case ssaop.OpWasmI64Add:
  1350  		return rewriteValue_OpWasmI64Add(v)
  1351  	case ssaop.OpWasmI64AddConst:
  1352  		return rewriteValue_OpWasmI64AddConst(v)
  1353  	case ssaop.OpWasmI64And:
  1354  		return rewriteValue_OpWasmI64And(v)
  1355  	case ssaop.OpWasmI64Eq:
  1356  		return rewriteValue_OpWasmI64Eq(v)
  1357  	case ssaop.OpWasmI64Eqz:
  1358  		return rewriteValue_OpWasmI64Eqz(v)
  1359  	case ssaop.OpWasmI64Extend16S:
  1360  		return rewriteValue_OpWasmI64Extend16S(v)
  1361  	case ssaop.OpWasmI64Extend32S:
  1362  		return rewriteValue_OpWasmI64Extend32S(v)
  1363  	case ssaop.OpWasmI64Extend8S:
  1364  		return rewriteValue_OpWasmI64Extend8S(v)
  1365  	case ssaop.OpWasmI64LeU:
  1366  		return rewriteValue_OpWasmI64LeU(v)
  1367  	case ssaop.OpWasmI64Load:
  1368  		return rewriteValue_OpWasmI64Load(v)
  1369  	case ssaop.OpWasmI64Load16S:
  1370  		return rewriteValue_OpWasmI64Load16S(v)
  1371  	case ssaop.OpWasmI64Load16U:
  1372  		return rewriteValue_OpWasmI64Load16U(v)
  1373  	case ssaop.OpWasmI64Load32S:
  1374  		return rewriteValue_OpWasmI64Load32S(v)
  1375  	case ssaop.OpWasmI64Load32U:
  1376  		return rewriteValue_OpWasmI64Load32U(v)
  1377  	case ssaop.OpWasmI64Load8S:
  1378  		return rewriteValue_OpWasmI64Load8S(v)
  1379  	case ssaop.OpWasmI64Load8U:
  1380  		return rewriteValue_OpWasmI64Load8U(v)
  1381  	case ssaop.OpWasmI64LtU:
  1382  		return rewriteValue_OpWasmI64LtU(v)
  1383  	case ssaop.OpWasmI64Mul:
  1384  		return rewriteValue_OpWasmI64Mul(v)
  1385  	case ssaop.OpWasmI64Ne:
  1386  		return rewriteValue_OpWasmI64Ne(v)
  1387  	case ssaop.OpWasmI64Or:
  1388  		return rewriteValue_OpWasmI64Or(v)
  1389  	case ssaop.OpWasmI64Shl:
  1390  		return rewriteValue_OpWasmI64Shl(v)
  1391  	case ssaop.OpWasmI64ShrS:
  1392  		return rewriteValue_OpWasmI64ShrS(v)
  1393  	case ssaop.OpWasmI64ShrU:
  1394  		return rewriteValue_OpWasmI64ShrU(v)
  1395  	case ssaop.OpWasmI64Store:
  1396  		return rewriteValue_OpWasmI64Store(v)
  1397  	case ssaop.OpWasmI64Store16:
  1398  		return rewriteValue_OpWasmI64Store16(v)
  1399  	case ssaop.OpWasmI64Store32:
  1400  		return rewriteValue_OpWasmI64Store32(v)
  1401  	case ssaop.OpWasmI64Store8:
  1402  		return rewriteValue_OpWasmI64Store8(v)
  1403  	case ssaop.OpWasmI64Sub:
  1404  		return rewriteValue_OpWasmI64Sub(v)
  1405  	case ssaop.OpWasmI64Xor:
  1406  		return rewriteValue_OpWasmI64Xor(v)
  1407  	case ssaop.OpXor16:
  1408  		v.Op = ssaop.OpWasmI64Xor
  1409  		return true
  1410  	case ssaop.OpXor32:
  1411  		v.Op = ssaop.OpWasmI64Xor
  1412  		return true
  1413  	case ssaop.OpXor64:
  1414  		v.Op = ssaop.OpWasmI64Xor
  1415  		return true
  1416  	case ssaop.OpXor8:
  1417  		v.Op = ssaop.OpWasmI64Xor
  1418  		return true
  1419  	case ssaop.OpXorInt16x8:
  1420  		v.Op = ssaop.OpWasmV128Xor
  1421  		return true
  1422  	case ssaop.OpXorInt32x4:
  1423  		v.Op = ssaop.OpWasmV128Xor
  1424  		return true
  1425  	case ssaop.OpXorInt64x2:
  1426  		v.Op = ssaop.OpWasmV128Xor
  1427  		return true
  1428  	case ssaop.OpXorInt8x16:
  1429  		v.Op = ssaop.OpWasmV128Xor
  1430  		return true
  1431  	case ssaop.OpXorUint16x8:
  1432  		v.Op = ssaop.OpWasmV128Xor
  1433  		return true
  1434  	case ssaop.OpXorUint32x4:
  1435  		v.Op = ssaop.OpWasmV128Xor
  1436  		return true
  1437  	case ssaop.OpXorUint64x2:
  1438  		v.Op = ssaop.OpWasmV128Xor
  1439  		return true
  1440  	case ssaop.OpXorUint8x16:
  1441  		v.Op = ssaop.OpWasmV128Xor
  1442  		return true
  1443  	case ssaop.OpZero:
  1444  		return rewriteValue_OpZero(v)
  1445  	case ssaop.OpZeroExt16to32:
  1446  		return rewriteValue_OpZeroExt16to32(v)
  1447  	case ssaop.OpZeroExt16to64:
  1448  		return rewriteValue_OpZeroExt16to64(v)
  1449  	case ssaop.OpZeroExt32to64:
  1450  		return rewriteValue_OpZeroExt32to64(v)
  1451  	case ssaop.OpZeroExt8to16:
  1452  		return rewriteValue_OpZeroExt8to16(v)
  1453  	case ssaop.OpZeroExt8to32:
  1454  		return rewriteValue_OpZeroExt8to32(v)
  1455  	case ssaop.OpZeroExt8to64:
  1456  		return rewriteValue_OpZeroExt8to64(v)
  1457  	case ssaop.OpZeroSIMD:
  1458  		v.Op = ssaop.OpWasmV128Zero
  1459  		return true
  1460  	}
  1461  	return false
  1462  }
  1463  func rewriteValue_OpAddr(v *ssa.Value) bool {
  1464  	v_0 := v.Args[0]
  1465  	// match: (Addr {sym} base)
  1466  	// result: (LoweredAddr {sym} [0] base)
  1467  	for {
  1468  		sym := ssa.AuxToSym(v.Aux)
  1469  		base := v_0
  1470  		v.Reset(ssaop.OpWasmLoweredAddr)
  1471  		v.AuxInt = ssa.Int32ToAuxInt(0)
  1472  		v.Aux = ssa.SymToAux(sym)
  1473  		v.AddArg(base)
  1474  		return true
  1475  	}
  1476  }
  1477  func rewriteValue_OpAvg64u(v *ssa.Value) bool {
  1478  	v_1 := v.Args[1]
  1479  	v_0 := v.Args[0]
  1480  	b := v.Block
  1481  	typ := &b.Func.Config.Types
  1482  	// match: (Avg64u x y)
  1483  	// result: (I64Add (I64ShrU (I64Sub x y) (I64Const [1])) y)
  1484  	for {
  1485  		x := v_0
  1486  		y := v_1
  1487  		v.Reset(ssaop.OpWasmI64Add)
  1488  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  1489  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  1490  		v1.AddArg2(x, y)
  1491  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1492  		v2.AuxInt = ssa.Int64ToAuxInt(1)
  1493  		v0.AddArg2(v1, v2)
  1494  		v.AddArg2(v0, y)
  1495  		return true
  1496  	}
  1497  }
  1498  func rewriteValue_OpBitLen16(v *ssa.Value) bool {
  1499  	v_0 := v.Args[0]
  1500  	b := v.Block
  1501  	typ := &b.Func.Config.Types
  1502  	// match: (BitLen16 x)
  1503  	// result: (BitLen64 (ZeroExt16to64 x))
  1504  	for {
  1505  		x := v_0
  1506  		v.Reset(ssaop.OpBitLen64)
  1507  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1508  		v0.AddArg(x)
  1509  		v.AddArg(v0)
  1510  		return true
  1511  	}
  1512  }
  1513  func rewriteValue_OpBitLen32(v *ssa.Value) bool {
  1514  	v_0 := v.Args[0]
  1515  	b := v.Block
  1516  	typ := &b.Func.Config.Types
  1517  	// match: (BitLen32 x)
  1518  	// result: (BitLen64 (ZeroExt32to64 x))
  1519  	for {
  1520  		x := v_0
  1521  		v.Reset(ssaop.OpBitLen64)
  1522  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1523  		v0.AddArg(x)
  1524  		v.AddArg(v0)
  1525  		return true
  1526  	}
  1527  }
  1528  func rewriteValue_OpBitLen64(v *ssa.Value) bool {
  1529  	v_0 := v.Args[0]
  1530  	b := v.Block
  1531  	typ := &b.Func.Config.Types
  1532  	// match: (BitLen64 x)
  1533  	// result: (I64Sub (I64Const [64]) (I64Clz x))
  1534  	for {
  1535  		x := v_0
  1536  		v.Reset(ssaop.OpWasmI64Sub)
  1537  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1538  		v0.AuxInt = ssa.Int64ToAuxInt(64)
  1539  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Clz, typ.Int64)
  1540  		v1.AddArg(x)
  1541  		v.AddArg2(v0, v1)
  1542  		return true
  1543  	}
  1544  }
  1545  func rewriteValue_OpBitLen8(v *ssa.Value) bool {
  1546  	v_0 := v.Args[0]
  1547  	b := v.Block
  1548  	typ := &b.Func.Config.Types
  1549  	// match: (BitLen8 x)
  1550  	// result: (BitLen64 (ZeroExt8to64 x))
  1551  	for {
  1552  		x := v_0
  1553  		v.Reset(ssaop.OpBitLen64)
  1554  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1555  		v0.AddArg(x)
  1556  		v.AddArg(v0)
  1557  		return true
  1558  	}
  1559  }
  1560  func rewriteValue_OpCom16(v *ssa.Value) bool {
  1561  	v_0 := v.Args[0]
  1562  	b := v.Block
  1563  	typ := &b.Func.Config.Types
  1564  	// match: (Com16 x)
  1565  	// result: (I64Xor x (I64Const [-1]))
  1566  	for {
  1567  		x := v_0
  1568  		v.Reset(ssaop.OpWasmI64Xor)
  1569  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1570  		v0.AuxInt = ssa.Int64ToAuxInt(-1)
  1571  		v.AddArg2(x, v0)
  1572  		return true
  1573  	}
  1574  }
  1575  func rewriteValue_OpCom32(v *ssa.Value) bool {
  1576  	v_0 := v.Args[0]
  1577  	b := v.Block
  1578  	typ := &b.Func.Config.Types
  1579  	// match: (Com32 x)
  1580  	// result: (I64Xor x (I64Const [-1]))
  1581  	for {
  1582  		x := v_0
  1583  		v.Reset(ssaop.OpWasmI64Xor)
  1584  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1585  		v0.AuxInt = ssa.Int64ToAuxInt(-1)
  1586  		v.AddArg2(x, v0)
  1587  		return true
  1588  	}
  1589  }
  1590  func rewriteValue_OpCom64(v *ssa.Value) bool {
  1591  	v_0 := v.Args[0]
  1592  	b := v.Block
  1593  	typ := &b.Func.Config.Types
  1594  	// match: (Com64 x)
  1595  	// result: (I64Xor x (I64Const [-1]))
  1596  	for {
  1597  		x := v_0
  1598  		v.Reset(ssaop.OpWasmI64Xor)
  1599  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1600  		v0.AuxInt = ssa.Int64ToAuxInt(-1)
  1601  		v.AddArg2(x, v0)
  1602  		return true
  1603  	}
  1604  }
  1605  func rewriteValue_OpCom8(v *ssa.Value) bool {
  1606  	v_0 := v.Args[0]
  1607  	b := v.Block
  1608  	typ := &b.Func.Config.Types
  1609  	// match: (Com8 x)
  1610  	// result: (I64Xor x (I64Const [-1]))
  1611  	for {
  1612  		x := v_0
  1613  		v.Reset(ssaop.OpWasmI64Xor)
  1614  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1615  		v0.AuxInt = ssa.Int64ToAuxInt(-1)
  1616  		v.AddArg2(x, v0)
  1617  		return true
  1618  	}
  1619  }
  1620  func rewriteValue_OpConst16(v *ssa.Value) bool {
  1621  	// match: (Const16 [c])
  1622  	// result: (I64Const [int64(c)])
  1623  	for {
  1624  		c := ssa.AuxIntToInt16(v.AuxInt)
  1625  		v.Reset(ssaop.OpWasmI64Const)
  1626  		v.AuxInt = ssa.Int64ToAuxInt(int64(c))
  1627  		return true
  1628  	}
  1629  }
  1630  func rewriteValue_OpConst32(v *ssa.Value) bool {
  1631  	// match: (Const32 [c])
  1632  	// result: (I64Const [int64(c)])
  1633  	for {
  1634  		c := ssa.AuxIntToInt32(v.AuxInt)
  1635  		v.Reset(ssaop.OpWasmI64Const)
  1636  		v.AuxInt = ssa.Int64ToAuxInt(int64(c))
  1637  		return true
  1638  	}
  1639  }
  1640  func rewriteValue_OpConst8(v *ssa.Value) bool {
  1641  	// match: (Const8 [c])
  1642  	// result: (I64Const [int64(c)])
  1643  	for {
  1644  		c := ssa.AuxIntToInt8(v.AuxInt)
  1645  		v.Reset(ssaop.OpWasmI64Const)
  1646  		v.AuxInt = ssa.Int64ToAuxInt(int64(c))
  1647  		return true
  1648  	}
  1649  }
  1650  func rewriteValue_OpConstBool(v *ssa.Value) bool {
  1651  	// match: (ConstBool [c])
  1652  	// result: (I64Const [ssa.B2i(c)])
  1653  	for {
  1654  		c := ssa.AuxIntToBool(v.AuxInt)
  1655  		v.Reset(ssaop.OpWasmI64Const)
  1656  		v.AuxInt = ssa.Int64ToAuxInt(ssa.B2i(c))
  1657  		return true
  1658  	}
  1659  }
  1660  func rewriteValue_OpConstNil(v *ssa.Value) bool {
  1661  	// match: (ConstNil)
  1662  	// result: (I64Const [0])
  1663  	for {
  1664  		v.Reset(ssaop.OpWasmI64Const)
  1665  		v.AuxInt = ssa.Int64ToAuxInt(0)
  1666  		return true
  1667  	}
  1668  }
  1669  func rewriteValue_OpCtz16(v *ssa.Value) bool {
  1670  	v_0 := v.Args[0]
  1671  	b := v.Block
  1672  	typ := &b.Func.Config.Types
  1673  	// match: (Ctz16 x)
  1674  	// result: (I64Ctz (I64Or x (I64Const [0x10000])))
  1675  	for {
  1676  		x := v_0
  1677  		v.Reset(ssaop.OpWasmI64Ctz)
  1678  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Or, typ.Int64)
  1679  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1680  		v1.AuxInt = ssa.Int64ToAuxInt(0x10000)
  1681  		v0.AddArg2(x, v1)
  1682  		v.AddArg(v0)
  1683  		return true
  1684  	}
  1685  }
  1686  func rewriteValue_OpCtz32(v *ssa.Value) bool {
  1687  	v_0 := v.Args[0]
  1688  	b := v.Block
  1689  	typ := &b.Func.Config.Types
  1690  	// match: (Ctz32 x)
  1691  	// result: (I64Ctz (I64Or x (I64Const [0x100000000])))
  1692  	for {
  1693  		x := v_0
  1694  		v.Reset(ssaop.OpWasmI64Ctz)
  1695  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Or, typ.Int64)
  1696  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1697  		v1.AuxInt = ssa.Int64ToAuxInt(0x100000000)
  1698  		v0.AddArg2(x, v1)
  1699  		v.AddArg(v0)
  1700  		return true
  1701  	}
  1702  }
  1703  func rewriteValue_OpCtz8(v *ssa.Value) bool {
  1704  	v_0 := v.Args[0]
  1705  	b := v.Block
  1706  	typ := &b.Func.Config.Types
  1707  	// match: (Ctz8 x)
  1708  	// result: (I64Ctz (I64Or x (I64Const [0x100])))
  1709  	for {
  1710  		x := v_0
  1711  		v.Reset(ssaop.OpWasmI64Ctz)
  1712  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Or, typ.Int64)
  1713  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1714  		v1.AuxInt = ssa.Int64ToAuxInt(0x100)
  1715  		v0.AddArg2(x, v1)
  1716  		v.AddArg(v0)
  1717  		return true
  1718  	}
  1719  }
  1720  func rewriteValue_OpCvt32Uto32F(v *ssa.Value) bool {
  1721  	v_0 := v.Args[0]
  1722  	b := v.Block
  1723  	typ := &b.Func.Config.Types
  1724  	// match: (Cvt32Uto32F x)
  1725  	// result: (F32ConvertI64U (ZeroExt32to64 x))
  1726  	for {
  1727  		x := v_0
  1728  		v.Reset(ssaop.OpWasmF32ConvertI64U)
  1729  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1730  		v0.AddArg(x)
  1731  		v.AddArg(v0)
  1732  		return true
  1733  	}
  1734  }
  1735  func rewriteValue_OpCvt32Uto64F(v *ssa.Value) bool {
  1736  	v_0 := v.Args[0]
  1737  	b := v.Block
  1738  	typ := &b.Func.Config.Types
  1739  	// match: (Cvt32Uto64F x)
  1740  	// result: (F64ConvertI64U (ZeroExt32to64 x))
  1741  	for {
  1742  		x := v_0
  1743  		v.Reset(ssaop.OpWasmF64ConvertI64U)
  1744  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1745  		v0.AddArg(x)
  1746  		v.AddArg(v0)
  1747  		return true
  1748  	}
  1749  }
  1750  func rewriteValue_OpCvt32to32F(v *ssa.Value) bool {
  1751  	v_0 := v.Args[0]
  1752  	b := v.Block
  1753  	typ := &b.Func.Config.Types
  1754  	// match: (Cvt32to32F x)
  1755  	// result: (F32ConvertI64S (SignExt32to64 x))
  1756  	for {
  1757  		x := v_0
  1758  		v.Reset(ssaop.OpWasmF32ConvertI64S)
  1759  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1760  		v0.AddArg(x)
  1761  		v.AddArg(v0)
  1762  		return true
  1763  	}
  1764  }
  1765  func rewriteValue_OpCvt32to64F(v *ssa.Value) bool {
  1766  	v_0 := v.Args[0]
  1767  	b := v.Block
  1768  	typ := &b.Func.Config.Types
  1769  	// match: (Cvt32to64F x)
  1770  	// result: (F64ConvertI64S (SignExt32to64 x))
  1771  	for {
  1772  		x := v_0
  1773  		v.Reset(ssaop.OpWasmF64ConvertI64S)
  1774  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1775  		v0.AddArg(x)
  1776  		v.AddArg(v0)
  1777  		return true
  1778  	}
  1779  }
  1780  func rewriteValue_OpDiv16(v *ssa.Value) bool {
  1781  	v_1 := v.Args[1]
  1782  	v_0 := v.Args[0]
  1783  	b := v.Block
  1784  	typ := &b.Func.Config.Types
  1785  	// match: (Div16 [false] x y)
  1786  	// result: (I64DivS (SignExt16to64 x) (SignExt16to64 y))
  1787  	for {
  1788  		if ssa.AuxIntToBool(v.AuxInt) != false {
  1789  			break
  1790  		}
  1791  		x := v_0
  1792  		y := v_1
  1793  		v.Reset(ssaop.OpWasmI64DivS)
  1794  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1795  		v0.AddArg(x)
  1796  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  1797  		v1.AddArg(y)
  1798  		v.AddArg2(v0, v1)
  1799  		return true
  1800  	}
  1801  	return false
  1802  }
  1803  func rewriteValue_OpDiv16u(v *ssa.Value) bool {
  1804  	v_1 := v.Args[1]
  1805  	v_0 := v.Args[0]
  1806  	b := v.Block
  1807  	typ := &b.Func.Config.Types
  1808  	// match: (Div16u x y)
  1809  	// result: (I64DivU (ZeroExt16to64 x) (ZeroExt16to64 y))
  1810  	for {
  1811  		x := v_0
  1812  		y := v_1
  1813  		v.Reset(ssaop.OpWasmI64DivU)
  1814  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1815  		v0.AddArg(x)
  1816  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1817  		v1.AddArg(y)
  1818  		v.AddArg2(v0, v1)
  1819  		return true
  1820  	}
  1821  }
  1822  func rewriteValue_OpDiv32(v *ssa.Value) bool {
  1823  	v_1 := v.Args[1]
  1824  	v_0 := v.Args[0]
  1825  	b := v.Block
  1826  	typ := &b.Func.Config.Types
  1827  	// match: (Div32 [false] x y)
  1828  	// result: (I64DivS (SignExt32to64 x) (SignExt32to64 y))
  1829  	for {
  1830  		if ssa.AuxIntToBool(v.AuxInt) != false {
  1831  			break
  1832  		}
  1833  		x := v_0
  1834  		y := v_1
  1835  		v.Reset(ssaop.OpWasmI64DivS)
  1836  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1837  		v0.AddArg(x)
  1838  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  1839  		v1.AddArg(y)
  1840  		v.AddArg2(v0, v1)
  1841  		return true
  1842  	}
  1843  	return false
  1844  }
  1845  func rewriteValue_OpDiv32u(v *ssa.Value) bool {
  1846  	v_1 := v.Args[1]
  1847  	v_0 := v.Args[0]
  1848  	b := v.Block
  1849  	typ := &b.Func.Config.Types
  1850  	// match: (Div32u x y)
  1851  	// result: (I64DivU (ZeroExt32to64 x) (ZeroExt32to64 y))
  1852  	for {
  1853  		x := v_0
  1854  		y := v_1
  1855  		v.Reset(ssaop.OpWasmI64DivU)
  1856  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1857  		v0.AddArg(x)
  1858  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1859  		v1.AddArg(y)
  1860  		v.AddArg2(v0, v1)
  1861  		return true
  1862  	}
  1863  }
  1864  func rewriteValue_OpDiv64(v *ssa.Value) bool {
  1865  	v_1 := v.Args[1]
  1866  	v_0 := v.Args[0]
  1867  	// match: (Div64 [false] x y)
  1868  	// result: (I64DivS x y)
  1869  	for {
  1870  		if ssa.AuxIntToBool(v.AuxInt) != false {
  1871  			break
  1872  		}
  1873  		x := v_0
  1874  		y := v_1
  1875  		v.Reset(ssaop.OpWasmI64DivS)
  1876  		v.AddArg2(x, y)
  1877  		return true
  1878  	}
  1879  	return false
  1880  }
  1881  func rewriteValue_OpDiv8(v *ssa.Value) bool {
  1882  	v_1 := v.Args[1]
  1883  	v_0 := v.Args[0]
  1884  	b := v.Block
  1885  	typ := &b.Func.Config.Types
  1886  	// match: (Div8 x y)
  1887  	// result: (I64DivS (SignExt8to64 x) (SignExt8to64 y))
  1888  	for {
  1889  		x := v_0
  1890  		y := v_1
  1891  		v.Reset(ssaop.OpWasmI64DivS)
  1892  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1893  		v0.AddArg(x)
  1894  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  1895  		v1.AddArg(y)
  1896  		v.AddArg2(v0, v1)
  1897  		return true
  1898  	}
  1899  }
  1900  func rewriteValue_OpDiv8u(v *ssa.Value) bool {
  1901  	v_1 := v.Args[1]
  1902  	v_0 := v.Args[0]
  1903  	b := v.Block
  1904  	typ := &b.Func.Config.Types
  1905  	// match: (Div8u x y)
  1906  	// result: (I64DivU (ZeroExt8to64 x) (ZeroExt8to64 y))
  1907  	for {
  1908  		x := v_0
  1909  		y := v_1
  1910  		v.Reset(ssaop.OpWasmI64DivU)
  1911  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1912  		v0.AddArg(x)
  1913  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1914  		v1.AddArg(y)
  1915  		v.AddArg2(v0, v1)
  1916  		return true
  1917  	}
  1918  }
  1919  func rewriteValue_OpEq16(v *ssa.Value) bool {
  1920  	v_1 := v.Args[1]
  1921  	v_0 := v.Args[0]
  1922  	b := v.Block
  1923  	typ := &b.Func.Config.Types
  1924  	// match: (Eq16 x y)
  1925  	// result: (I64Eq (ZeroExt16to64 x) (ZeroExt16to64 y))
  1926  	for {
  1927  		x := v_0
  1928  		y := v_1
  1929  		v.Reset(ssaop.OpWasmI64Eq)
  1930  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1931  		v0.AddArg(x)
  1932  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  1933  		v1.AddArg(y)
  1934  		v.AddArg2(v0, v1)
  1935  		return true
  1936  	}
  1937  }
  1938  func rewriteValue_OpEq32(v *ssa.Value) bool {
  1939  	v_1 := v.Args[1]
  1940  	v_0 := v.Args[0]
  1941  	b := v.Block
  1942  	typ := &b.Func.Config.Types
  1943  	// match: (Eq32 x y)
  1944  	// result: (I64Eq (ZeroExt32to64 x) (ZeroExt32to64 y))
  1945  	for {
  1946  		x := v_0
  1947  		y := v_1
  1948  		v.Reset(ssaop.OpWasmI64Eq)
  1949  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1950  		v0.AddArg(x)
  1951  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1952  		v1.AddArg(y)
  1953  		v.AddArg2(v0, v1)
  1954  		return true
  1955  	}
  1956  }
  1957  func rewriteValue_OpEq8(v *ssa.Value) bool {
  1958  	v_1 := v.Args[1]
  1959  	v_0 := v.Args[0]
  1960  	b := v.Block
  1961  	typ := &b.Func.Config.Types
  1962  	// match: (Eq8 x y)
  1963  	// result: (I64Eq (ZeroExt8to64 x) (ZeroExt8to64 y))
  1964  	for {
  1965  		x := v_0
  1966  		y := v_1
  1967  		v.Reset(ssaop.OpWasmI64Eq)
  1968  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1969  		v0.AddArg(x)
  1970  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  1971  		v1.AddArg(y)
  1972  		v.AddArg2(v0, v1)
  1973  		return true
  1974  	}
  1975  }
  1976  func rewriteValue_OpHmul64(v *ssa.Value) bool {
  1977  	v_1 := v.Args[1]
  1978  	v_0 := v.Args[0]
  1979  	b := v.Block
  1980  	typ := &b.Func.Config.Types
  1981  	// match: (Hmul64 <t> x y)
  1982  	// result: (Last <t> x0: (ZeroExt32to64 x) x1: (I64ShrS x (I64Const [32])) y0: (ZeroExt32to64 y) y1: (I64ShrS y (I64Const [32])) x0y0: (I64Mul x0 y0) tt: (I64Add (I64Mul x1 y0) (I64ShrU x0y0 (I64Const [32]))) w1: (I64Add (I64Mul x0 y1) (ZeroExt32to64 tt)) w2: (I64ShrS tt (I64Const [32])) (I64Add (I64Add (I64Mul x1 y1) w2) (I64ShrS w1 (I64Const [32]))))
  1983  	for {
  1984  		t := v.Type
  1985  		x := v_0
  1986  		y := v_1
  1987  		v.Reset(ssaop.OpLast)
  1988  		v.Type = t
  1989  		x0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1990  		x0.AddArg(x)
  1991  		x1 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrS, typ.Int64)
  1992  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  1993  		v2.AuxInt = ssa.Int64ToAuxInt(32)
  1994  		x1.AddArg2(x, v2)
  1995  		y0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  1996  		y0.AddArg(y)
  1997  		y1 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrS, typ.Int64)
  1998  		y1.AddArg2(y, v2)
  1999  		x0y0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2000  		x0y0.AddArg2(x0, y0)
  2001  		tt := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2002  		v7 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2003  		v7.AddArg2(x1, y0)
  2004  		v8 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  2005  		v8.AddArg2(x0y0, v2)
  2006  		tt.AddArg2(v7, v8)
  2007  		w1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2008  		v10 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2009  		v10.AddArg2(x0, y1)
  2010  		v11 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2011  		v11.AddArg(tt)
  2012  		w1.AddArg2(v10, v11)
  2013  		w2 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrS, typ.Int64)
  2014  		w2.AddArg2(tt, v2)
  2015  		v13 := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2016  		v14 := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2017  		v15 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2018  		v15.AddArg2(x1, y1)
  2019  		v14.AddArg2(v15, w2)
  2020  		v16 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrS, typ.Int64)
  2021  		v16.AddArg2(w1, v2)
  2022  		v13.AddArg2(v14, v16)
  2023  		v.AddArgs(x0, x1, y0, y1, x0y0, tt, w1, w2, v13)
  2024  		return true
  2025  	}
  2026  }
  2027  func rewriteValue_OpHmul64u(v *ssa.Value) bool {
  2028  	v_1 := v.Args[1]
  2029  	v_0 := v.Args[0]
  2030  	b := v.Block
  2031  	typ := &b.Func.Config.Types
  2032  	// match: (Hmul64u <t> x y)
  2033  	// result: (Last <t> x0: (ZeroExt32to64 x) x1: (I64ShrU x (I64Const [32])) y0: (ZeroExt32to64 y) y1: (I64ShrU y (I64Const [32])) w0: (I64Mul x0 y0) tt: (I64Add (I64Mul x1 y0) (I64ShrU w0 (I64Const [32]))) w1: (I64Add (I64Mul x0 y1) (ZeroExt32to64 tt)) w2: (I64ShrU tt (I64Const [32])) hi: (I64Add (I64Add (I64Mul x1 y1) w2) (I64ShrU w1 (I64Const [32]))))
  2034  	for {
  2035  		t := v.Type
  2036  		x := v_0
  2037  		y := v_1
  2038  		v.Reset(ssaop.OpLast)
  2039  		v.Type = t
  2040  		x0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2041  		x0.AddArg(x)
  2042  		x1 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  2043  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  2044  		v2.AuxInt = ssa.Int64ToAuxInt(32)
  2045  		x1.AddArg2(x, v2)
  2046  		y0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2047  		y0.AddArg(y)
  2048  		y1 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  2049  		y1.AddArg2(y, v2)
  2050  		w0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2051  		w0.AddArg2(x0, y0)
  2052  		tt := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2053  		v7 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2054  		v7.AddArg2(x1, y0)
  2055  		v8 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  2056  		v8.AddArg2(w0, v2)
  2057  		tt.AddArg2(v7, v8)
  2058  		w1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2059  		v10 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2060  		v10.AddArg2(x0, y1)
  2061  		v11 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2062  		v11.AddArg(tt)
  2063  		w1.AddArg2(v10, v11)
  2064  		w2 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  2065  		w2.AddArg2(tt, v2)
  2066  		hi := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2067  		v14 := b.NewValue0(v.Pos, ssaop.OpWasmI64Add, typ.Int64)
  2068  		v15 := b.NewValue0(v.Pos, ssaop.OpWasmI64Mul, typ.Int64)
  2069  		v15.AddArg2(x1, y1)
  2070  		v14.AddArg2(v15, w2)
  2071  		v16 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  2072  		v16.AddArg2(w1, v2)
  2073  		hi.AddArg2(v14, v16)
  2074  		v.AddArgs(x0, x1, y0, y1, w0, tt, w1, w2, hi)
  2075  		return true
  2076  	}
  2077  }
  2078  func rewriteValue_OpIsNonNil(v *ssa.Value) bool {
  2079  	v_0 := v.Args[0]
  2080  	b := v.Block
  2081  	typ := &b.Func.Config.Types
  2082  	// match: (IsNonNil p)
  2083  	// result: (I64Eqz (I64Eqz p))
  2084  	for {
  2085  		p := v_0
  2086  		v.Reset(ssaop.OpWasmI64Eqz)
  2087  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Eqz, typ.Bool)
  2088  		v0.AddArg(p)
  2089  		v.AddArg(v0)
  2090  		return true
  2091  	}
  2092  }
  2093  func rewriteValue_OpLast(v *ssa.Value) bool {
  2094  	// match: (Last ___)
  2095  	// result: v.Args[len(v.Args)-1]
  2096  	for {
  2097  		v.CopyOf(v.Args[len(v.Args)-1])
  2098  		return true
  2099  	}
  2100  }
  2101  func rewriteValue_OpLeq16(v *ssa.Value) bool {
  2102  	v_1 := v.Args[1]
  2103  	v_0 := v.Args[0]
  2104  	b := v.Block
  2105  	typ := &b.Func.Config.Types
  2106  	// match: (Leq16 x y)
  2107  	// result: (I64LeS (SignExt16to64 x) (SignExt16to64 y))
  2108  	for {
  2109  		x := v_0
  2110  		y := v_1
  2111  		v.Reset(ssaop.OpWasmI64LeS)
  2112  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  2113  		v0.AddArg(x)
  2114  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  2115  		v1.AddArg(y)
  2116  		v.AddArg2(v0, v1)
  2117  		return true
  2118  	}
  2119  }
  2120  func rewriteValue_OpLeq16U(v *ssa.Value) bool {
  2121  	v_1 := v.Args[1]
  2122  	v_0 := v.Args[0]
  2123  	b := v.Block
  2124  	typ := &b.Func.Config.Types
  2125  	// match: (Leq16U x y)
  2126  	// result: (I64LeU (ZeroExt16to64 x) (ZeroExt16to64 y))
  2127  	for {
  2128  		x := v_0
  2129  		y := v_1
  2130  		v.Reset(ssaop.OpWasmI64LeU)
  2131  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2132  		v0.AddArg(x)
  2133  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2134  		v1.AddArg(y)
  2135  		v.AddArg2(v0, v1)
  2136  		return true
  2137  	}
  2138  }
  2139  func rewriteValue_OpLeq32(v *ssa.Value) bool {
  2140  	v_1 := v.Args[1]
  2141  	v_0 := v.Args[0]
  2142  	b := v.Block
  2143  	typ := &b.Func.Config.Types
  2144  	// match: (Leq32 x y)
  2145  	// result: (I64LeS (SignExt32to64 x) (SignExt32to64 y))
  2146  	for {
  2147  		x := v_0
  2148  		y := v_1
  2149  		v.Reset(ssaop.OpWasmI64LeS)
  2150  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  2151  		v0.AddArg(x)
  2152  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  2153  		v1.AddArg(y)
  2154  		v.AddArg2(v0, v1)
  2155  		return true
  2156  	}
  2157  }
  2158  func rewriteValue_OpLeq32U(v *ssa.Value) bool {
  2159  	v_1 := v.Args[1]
  2160  	v_0 := v.Args[0]
  2161  	b := v.Block
  2162  	typ := &b.Func.Config.Types
  2163  	// match: (Leq32U x y)
  2164  	// result: (I64LeU (ZeroExt32to64 x) (ZeroExt32to64 y))
  2165  	for {
  2166  		x := v_0
  2167  		y := v_1
  2168  		v.Reset(ssaop.OpWasmI64LeU)
  2169  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2170  		v0.AddArg(x)
  2171  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2172  		v1.AddArg(y)
  2173  		v.AddArg2(v0, v1)
  2174  		return true
  2175  	}
  2176  }
  2177  func rewriteValue_OpLeq8(v *ssa.Value) bool {
  2178  	v_1 := v.Args[1]
  2179  	v_0 := v.Args[0]
  2180  	b := v.Block
  2181  	typ := &b.Func.Config.Types
  2182  	// match: (Leq8 x y)
  2183  	// result: (I64LeS (SignExt8to64 x) (SignExt8to64 y))
  2184  	for {
  2185  		x := v_0
  2186  		y := v_1
  2187  		v.Reset(ssaop.OpWasmI64LeS)
  2188  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  2189  		v0.AddArg(x)
  2190  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  2191  		v1.AddArg(y)
  2192  		v.AddArg2(v0, v1)
  2193  		return true
  2194  	}
  2195  }
  2196  func rewriteValue_OpLeq8U(v *ssa.Value) bool {
  2197  	v_1 := v.Args[1]
  2198  	v_0 := v.Args[0]
  2199  	b := v.Block
  2200  	typ := &b.Func.Config.Types
  2201  	// match: (Leq8U x y)
  2202  	// result: (I64LeU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2203  	for {
  2204  		x := v_0
  2205  		y := v_1
  2206  		v.Reset(ssaop.OpWasmI64LeU)
  2207  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2208  		v0.AddArg(x)
  2209  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2210  		v1.AddArg(y)
  2211  		v.AddArg2(v0, v1)
  2212  		return true
  2213  	}
  2214  }
  2215  func rewriteValue_OpLess16(v *ssa.Value) bool {
  2216  	v_1 := v.Args[1]
  2217  	v_0 := v.Args[0]
  2218  	b := v.Block
  2219  	typ := &b.Func.Config.Types
  2220  	// match: (Less16 x y)
  2221  	// result: (I64LtS (SignExt16to64 x) (SignExt16to64 y))
  2222  	for {
  2223  		x := v_0
  2224  		y := v_1
  2225  		v.Reset(ssaop.OpWasmI64LtS)
  2226  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  2227  		v0.AddArg(x)
  2228  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  2229  		v1.AddArg(y)
  2230  		v.AddArg2(v0, v1)
  2231  		return true
  2232  	}
  2233  }
  2234  func rewriteValue_OpLess16U(v *ssa.Value) bool {
  2235  	v_1 := v.Args[1]
  2236  	v_0 := v.Args[0]
  2237  	b := v.Block
  2238  	typ := &b.Func.Config.Types
  2239  	// match: (Less16U x y)
  2240  	// result: (I64LtU (ZeroExt16to64 x) (ZeroExt16to64 y))
  2241  	for {
  2242  		x := v_0
  2243  		y := v_1
  2244  		v.Reset(ssaop.OpWasmI64LtU)
  2245  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2246  		v0.AddArg(x)
  2247  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2248  		v1.AddArg(y)
  2249  		v.AddArg2(v0, v1)
  2250  		return true
  2251  	}
  2252  }
  2253  func rewriteValue_OpLess32(v *ssa.Value) bool {
  2254  	v_1 := v.Args[1]
  2255  	v_0 := v.Args[0]
  2256  	b := v.Block
  2257  	typ := &b.Func.Config.Types
  2258  	// match: (Less32 x y)
  2259  	// result: (I64LtS (SignExt32to64 x) (SignExt32to64 y))
  2260  	for {
  2261  		x := v_0
  2262  		y := v_1
  2263  		v.Reset(ssaop.OpWasmI64LtS)
  2264  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  2265  		v0.AddArg(x)
  2266  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  2267  		v1.AddArg(y)
  2268  		v.AddArg2(v0, v1)
  2269  		return true
  2270  	}
  2271  }
  2272  func rewriteValue_OpLess32U(v *ssa.Value) bool {
  2273  	v_1 := v.Args[1]
  2274  	v_0 := v.Args[0]
  2275  	b := v.Block
  2276  	typ := &b.Func.Config.Types
  2277  	// match: (Less32U x y)
  2278  	// result: (I64LtU (ZeroExt32to64 x) (ZeroExt32to64 y))
  2279  	for {
  2280  		x := v_0
  2281  		y := v_1
  2282  		v.Reset(ssaop.OpWasmI64LtU)
  2283  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2284  		v0.AddArg(x)
  2285  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2286  		v1.AddArg(y)
  2287  		v.AddArg2(v0, v1)
  2288  		return true
  2289  	}
  2290  }
  2291  func rewriteValue_OpLess8(v *ssa.Value) bool {
  2292  	v_1 := v.Args[1]
  2293  	v_0 := v.Args[0]
  2294  	b := v.Block
  2295  	typ := &b.Func.Config.Types
  2296  	// match: (Less8 x y)
  2297  	// result: (I64LtS (SignExt8to64 x) (SignExt8to64 y))
  2298  	for {
  2299  		x := v_0
  2300  		y := v_1
  2301  		v.Reset(ssaop.OpWasmI64LtS)
  2302  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  2303  		v0.AddArg(x)
  2304  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  2305  		v1.AddArg(y)
  2306  		v.AddArg2(v0, v1)
  2307  		return true
  2308  	}
  2309  }
  2310  func rewriteValue_OpLess8U(v *ssa.Value) bool {
  2311  	v_1 := v.Args[1]
  2312  	v_0 := v.Args[0]
  2313  	b := v.Block
  2314  	typ := &b.Func.Config.Types
  2315  	// match: (Less8U x y)
  2316  	// result: (I64LtU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2317  	for {
  2318  		x := v_0
  2319  		y := v_1
  2320  		v.Reset(ssaop.OpWasmI64LtU)
  2321  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2322  		v0.AddArg(x)
  2323  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2324  		v1.AddArg(y)
  2325  		v.AddArg2(v0, v1)
  2326  		return true
  2327  	}
  2328  }
  2329  func rewriteValue_OpLoad(v *ssa.Value) bool {
  2330  	v_1 := v.Args[1]
  2331  	v_0 := v.Args[0]
  2332  	// match: (Load <t> ptr mem)
  2333  	// cond: ssa.Is32BitFloat(t)
  2334  	// result: (F32Load ptr mem)
  2335  	for {
  2336  		t := v.Type
  2337  		ptr := v_0
  2338  		mem := v_1
  2339  		if !(ssa.Is32BitFloat(t)) {
  2340  			break
  2341  		}
  2342  		v.Reset(ssaop.OpWasmF32Load)
  2343  		v.AddArg2(ptr, mem)
  2344  		return true
  2345  	}
  2346  	// match: (Load <t> ptr mem)
  2347  	// cond: ssa.Is64BitFloat(t)
  2348  	// result: (F64Load ptr mem)
  2349  	for {
  2350  		t := v.Type
  2351  		ptr := v_0
  2352  		mem := v_1
  2353  		if !(ssa.Is64BitFloat(t)) {
  2354  			break
  2355  		}
  2356  		v.Reset(ssaop.OpWasmF64Load)
  2357  		v.AddArg2(ptr, mem)
  2358  		return true
  2359  	}
  2360  	// match: (Load <t> ptr mem)
  2361  	// cond: t.Size() == 16
  2362  	// result: (V128Load ptr mem)
  2363  	for {
  2364  		t := v.Type
  2365  		ptr := v_0
  2366  		mem := v_1
  2367  		if !(t.Size() == 16) {
  2368  			break
  2369  		}
  2370  		v.Reset(ssaop.OpWasmV128Load)
  2371  		v.AddArg2(ptr, mem)
  2372  		return true
  2373  	}
  2374  	// match: (Load <t> ptr mem)
  2375  	// cond: t.Size() == 8
  2376  	// result: (I64Load ptr mem)
  2377  	for {
  2378  		t := v.Type
  2379  		ptr := v_0
  2380  		mem := v_1
  2381  		if !(t.Size() == 8) {
  2382  			break
  2383  		}
  2384  		v.Reset(ssaop.OpWasmI64Load)
  2385  		v.AddArg2(ptr, mem)
  2386  		return true
  2387  	}
  2388  	// match: (Load <t> ptr mem)
  2389  	// cond: t.Size() == 4 && !t.IsSigned()
  2390  	// result: (I64Load32U ptr mem)
  2391  	for {
  2392  		t := v.Type
  2393  		ptr := v_0
  2394  		mem := v_1
  2395  		if !(t.Size() == 4 && !t.IsSigned()) {
  2396  			break
  2397  		}
  2398  		v.Reset(ssaop.OpWasmI64Load32U)
  2399  		v.AddArg2(ptr, mem)
  2400  		return true
  2401  	}
  2402  	// match: (Load <t> ptr mem)
  2403  	// cond: t.Size() == 4 && t.IsSigned()
  2404  	// result: (I64Load32S ptr mem)
  2405  	for {
  2406  		t := v.Type
  2407  		ptr := v_0
  2408  		mem := v_1
  2409  		if !(t.Size() == 4 && t.IsSigned()) {
  2410  			break
  2411  		}
  2412  		v.Reset(ssaop.OpWasmI64Load32S)
  2413  		v.AddArg2(ptr, mem)
  2414  		return true
  2415  	}
  2416  	// match: (Load <t> ptr mem)
  2417  	// cond: t.Size() == 2 && !t.IsSigned()
  2418  	// result: (I64Load16U ptr mem)
  2419  	for {
  2420  		t := v.Type
  2421  		ptr := v_0
  2422  		mem := v_1
  2423  		if !(t.Size() == 2 && !t.IsSigned()) {
  2424  			break
  2425  		}
  2426  		v.Reset(ssaop.OpWasmI64Load16U)
  2427  		v.AddArg2(ptr, mem)
  2428  		return true
  2429  	}
  2430  	// match: (Load <t> ptr mem)
  2431  	// cond: t.Size() == 2 && t.IsSigned()
  2432  	// result: (I64Load16S ptr mem)
  2433  	for {
  2434  		t := v.Type
  2435  		ptr := v_0
  2436  		mem := v_1
  2437  		if !(t.Size() == 2 && t.IsSigned()) {
  2438  			break
  2439  		}
  2440  		v.Reset(ssaop.OpWasmI64Load16S)
  2441  		v.AddArg2(ptr, mem)
  2442  		return true
  2443  	}
  2444  	// match: (Load <t> ptr mem)
  2445  	// cond: t.Size() == 1 && !t.IsSigned()
  2446  	// result: (I64Load8U ptr mem)
  2447  	for {
  2448  		t := v.Type
  2449  		ptr := v_0
  2450  		mem := v_1
  2451  		if !(t.Size() == 1 && !t.IsSigned()) {
  2452  			break
  2453  		}
  2454  		v.Reset(ssaop.OpWasmI64Load8U)
  2455  		v.AddArg2(ptr, mem)
  2456  		return true
  2457  	}
  2458  	// match: (Load <t> ptr mem)
  2459  	// cond: t.Size() == 1 && t.IsSigned()
  2460  	// result: (I64Load8S ptr mem)
  2461  	for {
  2462  		t := v.Type
  2463  		ptr := v_0
  2464  		mem := v_1
  2465  		if !(t.Size() == 1 && t.IsSigned()) {
  2466  			break
  2467  		}
  2468  		v.Reset(ssaop.OpWasmI64Load8S)
  2469  		v.AddArg2(ptr, mem)
  2470  		return true
  2471  	}
  2472  	return false
  2473  }
  2474  func rewriteValue_OpLocalAddr(v *ssa.Value) bool {
  2475  	v_1 := v.Args[1]
  2476  	v_0 := v.Args[0]
  2477  	b := v.Block
  2478  	typ := &b.Func.Config.Types
  2479  	// match: (LocalAddr <t> {sym} base mem)
  2480  	// cond: t.Elem().HasPointers()
  2481  	// result: (LoweredAddr {sym} (SPanchored base mem))
  2482  	for {
  2483  		t := v.Type
  2484  		sym := ssa.AuxToSym(v.Aux)
  2485  		base := v_0
  2486  		mem := v_1
  2487  		if !(t.Elem().HasPointers()) {
  2488  			break
  2489  		}
  2490  		v.Reset(ssaop.OpWasmLoweredAddr)
  2491  		v.Aux = ssa.SymToAux(sym)
  2492  		v0 := b.NewValue0(v.Pos, ssaop.OpSPanchored, typ.Uintptr)
  2493  		v0.AddArg2(base, mem)
  2494  		v.AddArg(v0)
  2495  		return true
  2496  	}
  2497  	// match: (LocalAddr <t> {sym} base _)
  2498  	// cond: !t.Elem().HasPointers()
  2499  	// result: (LoweredAddr {sym} base)
  2500  	for {
  2501  		t := v.Type
  2502  		sym := ssa.AuxToSym(v.Aux)
  2503  		base := v_0
  2504  		if !(!t.Elem().HasPointers()) {
  2505  			break
  2506  		}
  2507  		v.Reset(ssaop.OpWasmLoweredAddr)
  2508  		v.Aux = ssa.SymToAux(sym)
  2509  		v.AddArg(base)
  2510  		return true
  2511  	}
  2512  	return false
  2513  }
  2514  func rewriteValue_OpLsh16x16(v *ssa.Value) bool {
  2515  	v_1 := v.Args[1]
  2516  	v_0 := v.Args[0]
  2517  	b := v.Block
  2518  	typ := &b.Func.Config.Types
  2519  	// match: (Lsh16x16 [c] x y)
  2520  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2521  	for {
  2522  		c := ssa.AuxIntToBool(v.AuxInt)
  2523  		x := v_0
  2524  		y := v_1
  2525  		v.Reset(ssaop.OpLsh64x64)
  2526  		v.AuxInt = ssa.BoolToAuxInt(c)
  2527  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2528  		v0.AddArg(y)
  2529  		v.AddArg2(x, v0)
  2530  		return true
  2531  	}
  2532  }
  2533  func rewriteValue_OpLsh16x32(v *ssa.Value) bool {
  2534  	v_1 := v.Args[1]
  2535  	v_0 := v.Args[0]
  2536  	b := v.Block
  2537  	typ := &b.Func.Config.Types
  2538  	// match: (Lsh16x32 [c] x y)
  2539  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2540  	for {
  2541  		c := ssa.AuxIntToBool(v.AuxInt)
  2542  		x := v_0
  2543  		y := v_1
  2544  		v.Reset(ssaop.OpLsh64x64)
  2545  		v.AuxInt = ssa.BoolToAuxInt(c)
  2546  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2547  		v0.AddArg(y)
  2548  		v.AddArg2(x, v0)
  2549  		return true
  2550  	}
  2551  }
  2552  func rewriteValue_OpLsh16x8(v *ssa.Value) bool {
  2553  	v_1 := v.Args[1]
  2554  	v_0 := v.Args[0]
  2555  	b := v.Block
  2556  	typ := &b.Func.Config.Types
  2557  	// match: (Lsh16x8 [c] x y)
  2558  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2559  	for {
  2560  		c := ssa.AuxIntToBool(v.AuxInt)
  2561  		x := v_0
  2562  		y := v_1
  2563  		v.Reset(ssaop.OpLsh64x64)
  2564  		v.AuxInt = ssa.BoolToAuxInt(c)
  2565  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2566  		v0.AddArg(y)
  2567  		v.AddArg2(x, v0)
  2568  		return true
  2569  	}
  2570  }
  2571  func rewriteValue_OpLsh32x16(v *ssa.Value) bool {
  2572  	v_1 := v.Args[1]
  2573  	v_0 := v.Args[0]
  2574  	b := v.Block
  2575  	typ := &b.Func.Config.Types
  2576  	// match: (Lsh32x16 [c] x y)
  2577  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2578  	for {
  2579  		c := ssa.AuxIntToBool(v.AuxInt)
  2580  		x := v_0
  2581  		y := v_1
  2582  		v.Reset(ssaop.OpLsh64x64)
  2583  		v.AuxInt = ssa.BoolToAuxInt(c)
  2584  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2585  		v0.AddArg(y)
  2586  		v.AddArg2(x, v0)
  2587  		return true
  2588  	}
  2589  }
  2590  func rewriteValue_OpLsh32x32(v *ssa.Value) bool {
  2591  	v_1 := v.Args[1]
  2592  	v_0 := v.Args[0]
  2593  	b := v.Block
  2594  	typ := &b.Func.Config.Types
  2595  	// match: (Lsh32x32 [c] x y)
  2596  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2597  	for {
  2598  		c := ssa.AuxIntToBool(v.AuxInt)
  2599  		x := v_0
  2600  		y := v_1
  2601  		v.Reset(ssaop.OpLsh64x64)
  2602  		v.AuxInt = ssa.BoolToAuxInt(c)
  2603  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2604  		v0.AddArg(y)
  2605  		v.AddArg2(x, v0)
  2606  		return true
  2607  	}
  2608  }
  2609  func rewriteValue_OpLsh32x8(v *ssa.Value) bool {
  2610  	v_1 := v.Args[1]
  2611  	v_0 := v.Args[0]
  2612  	b := v.Block
  2613  	typ := &b.Func.Config.Types
  2614  	// match: (Lsh32x8 [c] x y)
  2615  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2616  	for {
  2617  		c := ssa.AuxIntToBool(v.AuxInt)
  2618  		x := v_0
  2619  		y := v_1
  2620  		v.Reset(ssaop.OpLsh64x64)
  2621  		v.AuxInt = ssa.BoolToAuxInt(c)
  2622  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2623  		v0.AddArg(y)
  2624  		v.AddArg2(x, v0)
  2625  		return true
  2626  	}
  2627  }
  2628  func rewriteValue_OpLsh64x16(v *ssa.Value) bool {
  2629  	v_1 := v.Args[1]
  2630  	v_0 := v.Args[0]
  2631  	b := v.Block
  2632  	typ := &b.Func.Config.Types
  2633  	// match: (Lsh64x16 [c] x y)
  2634  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2635  	for {
  2636  		c := ssa.AuxIntToBool(v.AuxInt)
  2637  		x := v_0
  2638  		y := v_1
  2639  		v.Reset(ssaop.OpLsh64x64)
  2640  		v.AuxInt = ssa.BoolToAuxInt(c)
  2641  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2642  		v0.AddArg(y)
  2643  		v.AddArg2(x, v0)
  2644  		return true
  2645  	}
  2646  }
  2647  func rewriteValue_OpLsh64x32(v *ssa.Value) bool {
  2648  	v_1 := v.Args[1]
  2649  	v_0 := v.Args[0]
  2650  	b := v.Block
  2651  	typ := &b.Func.Config.Types
  2652  	// match: (Lsh64x32 [c] x y)
  2653  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2654  	for {
  2655  		c := ssa.AuxIntToBool(v.AuxInt)
  2656  		x := v_0
  2657  		y := v_1
  2658  		v.Reset(ssaop.OpLsh64x64)
  2659  		v.AuxInt = ssa.BoolToAuxInt(c)
  2660  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2661  		v0.AddArg(y)
  2662  		v.AddArg2(x, v0)
  2663  		return true
  2664  	}
  2665  }
  2666  func rewriteValue_OpLsh64x64(v *ssa.Value) bool {
  2667  	v_1 := v.Args[1]
  2668  	v_0 := v.Args[0]
  2669  	b := v.Block
  2670  	typ := &b.Func.Config.Types
  2671  	// match: (Lsh64x64 x y)
  2672  	// cond: ssa.ShiftIsBounded(v)
  2673  	// result: (I64Shl x y)
  2674  	for {
  2675  		x := v_0
  2676  		y := v_1
  2677  		if !(ssa.ShiftIsBounded(v)) {
  2678  			break
  2679  		}
  2680  		v.Reset(ssaop.OpWasmI64Shl)
  2681  		v.AddArg2(x, y)
  2682  		return true
  2683  	}
  2684  	// match: (Lsh64x64 x (I64Const [c]))
  2685  	// cond: uint64(c) < 64
  2686  	// result: (I64Shl x (I64Const [c]))
  2687  	for {
  2688  		x := v_0
  2689  		if v_1.Op != ssaop.OpWasmI64Const {
  2690  			break
  2691  		}
  2692  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2693  		if !(uint64(c) < 64) {
  2694  			break
  2695  		}
  2696  		v.Reset(ssaop.OpWasmI64Shl)
  2697  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  2698  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  2699  		v.AddArg2(x, v0)
  2700  		return true
  2701  	}
  2702  	// match: (Lsh64x64 x (I64Const [c]))
  2703  	// cond: uint64(c) >= 64
  2704  	// result: (I64Const [0])
  2705  	for {
  2706  		if v_1.Op != ssaop.OpWasmI64Const {
  2707  			break
  2708  		}
  2709  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  2710  		if !(uint64(c) >= 64) {
  2711  			break
  2712  		}
  2713  		v.Reset(ssaop.OpWasmI64Const)
  2714  		v.AuxInt = ssa.Int64ToAuxInt(0)
  2715  		return true
  2716  	}
  2717  	// match: (Lsh64x64 x y)
  2718  	// result: (Select (I64Shl x y) (I64Const [0]) (I64LtU y (I64Const [64])))
  2719  	for {
  2720  		x := v_0
  2721  		y := v_1
  2722  		v.Reset(ssaop.OpWasmSelect)
  2723  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Shl, typ.Int64)
  2724  		v0.AddArg2(x, y)
  2725  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  2726  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  2727  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  2728  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  2729  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  2730  		v2.AddArg2(y, v3)
  2731  		v.AddArg3(v0, v1, v2)
  2732  		return true
  2733  	}
  2734  }
  2735  func rewriteValue_OpLsh64x8(v *ssa.Value) bool {
  2736  	v_1 := v.Args[1]
  2737  	v_0 := v.Args[0]
  2738  	b := v.Block
  2739  	typ := &b.Func.Config.Types
  2740  	// match: (Lsh64x8 [c] x y)
  2741  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2742  	for {
  2743  		c := ssa.AuxIntToBool(v.AuxInt)
  2744  		x := v_0
  2745  		y := v_1
  2746  		v.Reset(ssaop.OpLsh64x64)
  2747  		v.AuxInt = ssa.BoolToAuxInt(c)
  2748  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2749  		v0.AddArg(y)
  2750  		v.AddArg2(x, v0)
  2751  		return true
  2752  	}
  2753  }
  2754  func rewriteValue_OpLsh8x16(v *ssa.Value) bool {
  2755  	v_1 := v.Args[1]
  2756  	v_0 := v.Args[0]
  2757  	b := v.Block
  2758  	typ := &b.Func.Config.Types
  2759  	// match: (Lsh8x16 [c] x y)
  2760  	// result: (Lsh64x64 [c] x (ZeroExt16to64 y))
  2761  	for {
  2762  		c := ssa.AuxIntToBool(v.AuxInt)
  2763  		x := v_0
  2764  		y := v_1
  2765  		v.Reset(ssaop.OpLsh64x64)
  2766  		v.AuxInt = ssa.BoolToAuxInt(c)
  2767  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2768  		v0.AddArg(y)
  2769  		v.AddArg2(x, v0)
  2770  		return true
  2771  	}
  2772  }
  2773  func rewriteValue_OpLsh8x32(v *ssa.Value) bool {
  2774  	v_1 := v.Args[1]
  2775  	v_0 := v.Args[0]
  2776  	b := v.Block
  2777  	typ := &b.Func.Config.Types
  2778  	// match: (Lsh8x32 [c] x y)
  2779  	// result: (Lsh64x64 [c] x (ZeroExt32to64 y))
  2780  	for {
  2781  		c := ssa.AuxIntToBool(v.AuxInt)
  2782  		x := v_0
  2783  		y := v_1
  2784  		v.Reset(ssaop.OpLsh64x64)
  2785  		v.AuxInt = ssa.BoolToAuxInt(c)
  2786  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2787  		v0.AddArg(y)
  2788  		v.AddArg2(x, v0)
  2789  		return true
  2790  	}
  2791  }
  2792  func rewriteValue_OpLsh8x8(v *ssa.Value) bool {
  2793  	v_1 := v.Args[1]
  2794  	v_0 := v.Args[0]
  2795  	b := v.Block
  2796  	typ := &b.Func.Config.Types
  2797  	// match: (Lsh8x8 [c] x y)
  2798  	// result: (Lsh64x64 [c] x (ZeroExt8to64 y))
  2799  	for {
  2800  		c := ssa.AuxIntToBool(v.AuxInt)
  2801  		x := v_0
  2802  		y := v_1
  2803  		v.Reset(ssaop.OpLsh64x64)
  2804  		v.AuxInt = ssa.BoolToAuxInt(c)
  2805  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2806  		v0.AddArg(y)
  2807  		v.AddArg2(x, v0)
  2808  		return true
  2809  	}
  2810  }
  2811  func rewriteValue_OpMod16(v *ssa.Value) bool {
  2812  	v_1 := v.Args[1]
  2813  	v_0 := v.Args[0]
  2814  	b := v.Block
  2815  	typ := &b.Func.Config.Types
  2816  	// match: (Mod16 [false] x y)
  2817  	// result: (I64RemS (SignExt16to64 x) (SignExt16to64 y))
  2818  	for {
  2819  		if ssa.AuxIntToBool(v.AuxInt) != false {
  2820  			break
  2821  		}
  2822  		x := v_0
  2823  		y := v_1
  2824  		v.Reset(ssaop.OpWasmI64RemS)
  2825  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  2826  		v0.AddArg(x)
  2827  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  2828  		v1.AddArg(y)
  2829  		v.AddArg2(v0, v1)
  2830  		return true
  2831  	}
  2832  	return false
  2833  }
  2834  func rewriteValue_OpMod16u(v *ssa.Value) bool {
  2835  	v_1 := v.Args[1]
  2836  	v_0 := v.Args[0]
  2837  	b := v.Block
  2838  	typ := &b.Func.Config.Types
  2839  	// match: (Mod16u x y)
  2840  	// result: (I64RemU (ZeroExt16to64 x) (ZeroExt16to64 y))
  2841  	for {
  2842  		x := v_0
  2843  		y := v_1
  2844  		v.Reset(ssaop.OpWasmI64RemU)
  2845  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2846  		v0.AddArg(x)
  2847  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  2848  		v1.AddArg(y)
  2849  		v.AddArg2(v0, v1)
  2850  		return true
  2851  	}
  2852  }
  2853  func rewriteValue_OpMod32(v *ssa.Value) bool {
  2854  	v_1 := v.Args[1]
  2855  	v_0 := v.Args[0]
  2856  	b := v.Block
  2857  	typ := &b.Func.Config.Types
  2858  	// match: (Mod32 [false] x y)
  2859  	// result: (I64RemS (SignExt32to64 x) (SignExt32to64 y))
  2860  	for {
  2861  		if ssa.AuxIntToBool(v.AuxInt) != false {
  2862  			break
  2863  		}
  2864  		x := v_0
  2865  		y := v_1
  2866  		v.Reset(ssaop.OpWasmI64RemS)
  2867  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  2868  		v0.AddArg(x)
  2869  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  2870  		v1.AddArg(y)
  2871  		v.AddArg2(v0, v1)
  2872  		return true
  2873  	}
  2874  	return false
  2875  }
  2876  func rewriteValue_OpMod32u(v *ssa.Value) bool {
  2877  	v_1 := v.Args[1]
  2878  	v_0 := v.Args[0]
  2879  	b := v.Block
  2880  	typ := &b.Func.Config.Types
  2881  	// match: (Mod32u x y)
  2882  	// result: (I64RemU (ZeroExt32to64 x) (ZeroExt32to64 y))
  2883  	for {
  2884  		x := v_0
  2885  		y := v_1
  2886  		v.Reset(ssaop.OpWasmI64RemU)
  2887  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2888  		v0.AddArg(x)
  2889  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  2890  		v1.AddArg(y)
  2891  		v.AddArg2(v0, v1)
  2892  		return true
  2893  	}
  2894  }
  2895  func rewriteValue_OpMod64(v *ssa.Value) bool {
  2896  	v_1 := v.Args[1]
  2897  	v_0 := v.Args[0]
  2898  	// match: (Mod64 [false] x y)
  2899  	// result: (I64RemS x y)
  2900  	for {
  2901  		if ssa.AuxIntToBool(v.AuxInt) != false {
  2902  			break
  2903  		}
  2904  		x := v_0
  2905  		y := v_1
  2906  		v.Reset(ssaop.OpWasmI64RemS)
  2907  		v.AddArg2(x, y)
  2908  		return true
  2909  	}
  2910  	return false
  2911  }
  2912  func rewriteValue_OpMod8(v *ssa.Value) bool {
  2913  	v_1 := v.Args[1]
  2914  	v_0 := v.Args[0]
  2915  	b := v.Block
  2916  	typ := &b.Func.Config.Types
  2917  	// match: (Mod8 x y)
  2918  	// result: (I64RemS (SignExt8to64 x) (SignExt8to64 y))
  2919  	for {
  2920  		x := v_0
  2921  		y := v_1
  2922  		v.Reset(ssaop.OpWasmI64RemS)
  2923  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  2924  		v0.AddArg(x)
  2925  		v1 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  2926  		v1.AddArg(y)
  2927  		v.AddArg2(v0, v1)
  2928  		return true
  2929  	}
  2930  }
  2931  func rewriteValue_OpMod8u(v *ssa.Value) bool {
  2932  	v_1 := v.Args[1]
  2933  	v_0 := v.Args[0]
  2934  	b := v.Block
  2935  	typ := &b.Func.Config.Types
  2936  	// match: (Mod8u x y)
  2937  	// result: (I64RemU (ZeroExt8to64 x) (ZeroExt8to64 y))
  2938  	for {
  2939  		x := v_0
  2940  		y := v_1
  2941  		v.Reset(ssaop.OpWasmI64RemU)
  2942  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2943  		v0.AddArg(x)
  2944  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  2945  		v1.AddArg(y)
  2946  		v.AddArg2(v0, v1)
  2947  		return true
  2948  	}
  2949  }
  2950  func rewriteValue_OpMove(v *ssa.Value) bool {
  2951  	v_2 := v.Args[2]
  2952  	v_1 := v.Args[1]
  2953  	v_0 := v.Args[0]
  2954  	b := v.Block
  2955  	typ := &b.Func.Config.Types
  2956  	// match: (Move [0] _ _ mem)
  2957  	// result: mem
  2958  	for {
  2959  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  2960  			break
  2961  		}
  2962  		mem := v_2
  2963  		v.CopyOf(mem)
  2964  		return true
  2965  	}
  2966  	// match: (Move [1] dst src mem)
  2967  	// result: (I64Store8 dst (I64Load8U src mem) mem)
  2968  	for {
  2969  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  2970  			break
  2971  		}
  2972  		dst := v_0
  2973  		src := v_1
  2974  		mem := v_2
  2975  		v.Reset(ssaop.OpWasmI64Store8)
  2976  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load8U, typ.UInt8)
  2977  		v0.AddArg2(src, mem)
  2978  		v.AddArg3(dst, v0, mem)
  2979  		return true
  2980  	}
  2981  	// match: (Move [2] dst src mem)
  2982  	// result: (I64Store16 dst (I64Load16U src mem) mem)
  2983  	for {
  2984  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  2985  			break
  2986  		}
  2987  		dst := v_0
  2988  		src := v_1
  2989  		mem := v_2
  2990  		v.Reset(ssaop.OpWasmI64Store16)
  2991  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load16U, typ.UInt16)
  2992  		v0.AddArg2(src, mem)
  2993  		v.AddArg3(dst, v0, mem)
  2994  		return true
  2995  	}
  2996  	// match: (Move [4] dst src mem)
  2997  	// result: (I64Store32 dst (I64Load32U src mem) mem)
  2998  	for {
  2999  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  3000  			break
  3001  		}
  3002  		dst := v_0
  3003  		src := v_1
  3004  		mem := v_2
  3005  		v.Reset(ssaop.OpWasmI64Store32)
  3006  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load32U, typ.UInt32)
  3007  		v0.AddArg2(src, mem)
  3008  		v.AddArg3(dst, v0, mem)
  3009  		return true
  3010  	}
  3011  	// match: (Move [8] dst src mem)
  3012  	// result: (I64Store dst (I64Load src mem) mem)
  3013  	for {
  3014  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  3015  			break
  3016  		}
  3017  		dst := v_0
  3018  		src := v_1
  3019  		mem := v_2
  3020  		v.Reset(ssaop.OpWasmI64Store)
  3021  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load, typ.UInt64)
  3022  		v0.AddArg2(src, mem)
  3023  		v.AddArg3(dst, v0, mem)
  3024  		return true
  3025  	}
  3026  	// match: (Move [16] dst src mem)
  3027  	// result: (I64Store [8] dst (I64Load [8] src mem) (I64Store dst (I64Load src mem) mem))
  3028  	for {
  3029  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
  3030  			break
  3031  		}
  3032  		dst := v_0
  3033  		src := v_1
  3034  		mem := v_2
  3035  		v.Reset(ssaop.OpWasmI64Store)
  3036  		v.AuxInt = ssa.Int64ToAuxInt(8)
  3037  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load, typ.UInt64)
  3038  		v0.AuxInt = ssa.Int64ToAuxInt(8)
  3039  		v0.AddArg2(src, mem)
  3040  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  3041  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load, typ.UInt64)
  3042  		v2.AddArg2(src, mem)
  3043  		v1.AddArg3(dst, v2, mem)
  3044  		v.AddArg3(dst, v0, v1)
  3045  		return true
  3046  	}
  3047  	// match: (Move [3] dst src mem)
  3048  	// result: (I64Store8 [2] dst (I64Load8U [2] src mem) (I64Store16 dst (I64Load16U src mem) mem))
  3049  	for {
  3050  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  3051  			break
  3052  		}
  3053  		dst := v_0
  3054  		src := v_1
  3055  		mem := v_2
  3056  		v.Reset(ssaop.OpWasmI64Store8)
  3057  		v.AuxInt = ssa.Int64ToAuxInt(2)
  3058  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load8U, typ.UInt8)
  3059  		v0.AuxInt = ssa.Int64ToAuxInt(2)
  3060  		v0.AddArg2(src, mem)
  3061  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store16, types.TypeMem)
  3062  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load16U, typ.UInt16)
  3063  		v2.AddArg2(src, mem)
  3064  		v1.AddArg3(dst, v2, mem)
  3065  		v.AddArg3(dst, v0, v1)
  3066  		return true
  3067  	}
  3068  	// match: (Move [5] dst src mem)
  3069  	// result: (I64Store8 [4] dst (I64Load8U [4] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  3070  	for {
  3071  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  3072  			break
  3073  		}
  3074  		dst := v_0
  3075  		src := v_1
  3076  		mem := v_2
  3077  		v.Reset(ssaop.OpWasmI64Store8)
  3078  		v.AuxInt = ssa.Int64ToAuxInt(4)
  3079  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load8U, typ.UInt8)
  3080  		v0.AuxInt = ssa.Int64ToAuxInt(4)
  3081  		v0.AddArg2(src, mem)
  3082  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store32, types.TypeMem)
  3083  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load32U, typ.UInt32)
  3084  		v2.AddArg2(src, mem)
  3085  		v1.AddArg3(dst, v2, mem)
  3086  		v.AddArg3(dst, v0, v1)
  3087  		return true
  3088  	}
  3089  	// match: (Move [6] dst src mem)
  3090  	// result: (I64Store16 [4] dst (I64Load16U [4] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  3091  	for {
  3092  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  3093  			break
  3094  		}
  3095  		dst := v_0
  3096  		src := v_1
  3097  		mem := v_2
  3098  		v.Reset(ssaop.OpWasmI64Store16)
  3099  		v.AuxInt = ssa.Int64ToAuxInt(4)
  3100  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load16U, typ.UInt16)
  3101  		v0.AuxInt = ssa.Int64ToAuxInt(4)
  3102  		v0.AddArg2(src, mem)
  3103  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store32, types.TypeMem)
  3104  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load32U, typ.UInt32)
  3105  		v2.AddArg2(src, mem)
  3106  		v1.AddArg3(dst, v2, mem)
  3107  		v.AddArg3(dst, v0, v1)
  3108  		return true
  3109  	}
  3110  	// match: (Move [7] dst src mem)
  3111  	// result: (I64Store32 [3] dst (I64Load32U [3] src mem) (I64Store32 dst (I64Load32U src mem) mem))
  3112  	for {
  3113  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  3114  			break
  3115  		}
  3116  		dst := v_0
  3117  		src := v_1
  3118  		mem := v_2
  3119  		v.Reset(ssaop.OpWasmI64Store32)
  3120  		v.AuxInt = ssa.Int64ToAuxInt(3)
  3121  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load32U, typ.UInt32)
  3122  		v0.AuxInt = ssa.Int64ToAuxInt(3)
  3123  		v0.AddArg2(src, mem)
  3124  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store32, types.TypeMem)
  3125  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load32U, typ.UInt32)
  3126  		v2.AddArg2(src, mem)
  3127  		v1.AddArg3(dst, v2, mem)
  3128  		v.AddArg3(dst, v0, v1)
  3129  		return true
  3130  	}
  3131  	// match: (Move [s] dst src mem)
  3132  	// cond: s > 8 && s < 16
  3133  	// result: (I64Store [s-8] dst (I64Load [s-8] src mem) (I64Store dst (I64Load src mem) mem))
  3134  	for {
  3135  		s := ssa.AuxIntToInt64(v.AuxInt)
  3136  		dst := v_0
  3137  		src := v_1
  3138  		mem := v_2
  3139  		if !(s > 8 && s < 16) {
  3140  			break
  3141  		}
  3142  		v.Reset(ssaop.OpWasmI64Store)
  3143  		v.AuxInt = ssa.Int64ToAuxInt(s - 8)
  3144  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load, typ.UInt64)
  3145  		v0.AuxInt = ssa.Int64ToAuxInt(s - 8)
  3146  		v0.AddArg2(src, mem)
  3147  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  3148  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Load, typ.UInt64)
  3149  		v2.AddArg2(src, mem)
  3150  		v1.AddArg3(dst, v2, mem)
  3151  		v.AddArg3(dst, v0, v1)
  3152  		return true
  3153  	}
  3154  	// match: (Move [s] dst src mem)
  3155  	// cond: ssa.LogLargeCopyValue(v, s)
  3156  	// result: (LoweredMove [s] dst src mem)
  3157  	for {
  3158  		s := ssa.AuxIntToInt64(v.AuxInt)
  3159  		dst := v_0
  3160  		src := v_1
  3161  		mem := v_2
  3162  		if !(ssa.LogLargeCopyValue(v, s)) {
  3163  			break
  3164  		}
  3165  		v.Reset(ssaop.OpWasmLoweredMove)
  3166  		v.AuxInt = ssa.Int64ToAuxInt(s)
  3167  		v.AddArg3(dst, src, mem)
  3168  		return true
  3169  	}
  3170  	return false
  3171  }
  3172  func rewriteValue_OpNeg16(v *ssa.Value) bool {
  3173  	v_0 := v.Args[0]
  3174  	b := v.Block
  3175  	typ := &b.Func.Config.Types
  3176  	// match: (Neg16 x)
  3177  	// result: (I64Sub (I64Const [0]) x)
  3178  	for {
  3179  		x := v_0
  3180  		v.Reset(ssaop.OpWasmI64Sub)
  3181  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3182  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3183  		v.AddArg2(v0, x)
  3184  		return true
  3185  	}
  3186  }
  3187  func rewriteValue_OpNeg32(v *ssa.Value) bool {
  3188  	v_0 := v.Args[0]
  3189  	b := v.Block
  3190  	typ := &b.Func.Config.Types
  3191  	// match: (Neg32 x)
  3192  	// result: (I64Sub (I64Const [0]) x)
  3193  	for {
  3194  		x := v_0
  3195  		v.Reset(ssaop.OpWasmI64Sub)
  3196  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3197  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3198  		v.AddArg2(v0, x)
  3199  		return true
  3200  	}
  3201  }
  3202  func rewriteValue_OpNeg64(v *ssa.Value) bool {
  3203  	v_0 := v.Args[0]
  3204  	b := v.Block
  3205  	typ := &b.Func.Config.Types
  3206  	// match: (Neg64 x)
  3207  	// result: (I64Sub (I64Const [0]) x)
  3208  	for {
  3209  		x := v_0
  3210  		v.Reset(ssaop.OpWasmI64Sub)
  3211  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3212  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3213  		v.AddArg2(v0, x)
  3214  		return true
  3215  	}
  3216  }
  3217  func rewriteValue_OpNeg8(v *ssa.Value) bool {
  3218  	v_0 := v.Args[0]
  3219  	b := v.Block
  3220  	typ := &b.Func.Config.Types
  3221  	// match: (Neg8 x)
  3222  	// result: (I64Sub (I64Const [0]) x)
  3223  	for {
  3224  		x := v_0
  3225  		v.Reset(ssaop.OpWasmI64Sub)
  3226  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3227  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  3228  		v.AddArg2(v0, x)
  3229  		return true
  3230  	}
  3231  }
  3232  func rewriteValue_OpNeq16(v *ssa.Value) bool {
  3233  	v_1 := v.Args[1]
  3234  	v_0 := v.Args[0]
  3235  	b := v.Block
  3236  	typ := &b.Func.Config.Types
  3237  	// match: (Neq16 x y)
  3238  	// result: (I64Ne (ZeroExt16to64 x) (ZeroExt16to64 y))
  3239  	for {
  3240  		x := v_0
  3241  		y := v_1
  3242  		v.Reset(ssaop.OpWasmI64Ne)
  3243  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3244  		v0.AddArg(x)
  3245  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3246  		v1.AddArg(y)
  3247  		v.AddArg2(v0, v1)
  3248  		return true
  3249  	}
  3250  }
  3251  func rewriteValue_OpNeq32(v *ssa.Value) bool {
  3252  	v_1 := v.Args[1]
  3253  	v_0 := v.Args[0]
  3254  	b := v.Block
  3255  	typ := &b.Func.Config.Types
  3256  	// match: (Neq32 x y)
  3257  	// result: (I64Ne (ZeroExt32to64 x) (ZeroExt32to64 y))
  3258  	for {
  3259  		x := v_0
  3260  		y := v_1
  3261  		v.Reset(ssaop.OpWasmI64Ne)
  3262  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3263  		v0.AddArg(x)
  3264  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3265  		v1.AddArg(y)
  3266  		v.AddArg2(v0, v1)
  3267  		return true
  3268  	}
  3269  }
  3270  func rewriteValue_OpNeq8(v *ssa.Value) bool {
  3271  	v_1 := v.Args[1]
  3272  	v_0 := v.Args[0]
  3273  	b := v.Block
  3274  	typ := &b.Func.Config.Types
  3275  	// match: (Neq8 x y)
  3276  	// result: (I64Ne (ZeroExt8to64 x) (ZeroExt8to64 y))
  3277  	for {
  3278  		x := v_0
  3279  		y := v_1
  3280  		v.Reset(ssaop.OpWasmI64Ne)
  3281  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  3282  		v0.AddArg(x)
  3283  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  3284  		v1.AddArg(y)
  3285  		v.AddArg2(v0, v1)
  3286  		return true
  3287  	}
  3288  }
  3289  func rewriteValue_OpPopCount16(v *ssa.Value) bool {
  3290  	v_0 := v.Args[0]
  3291  	b := v.Block
  3292  	typ := &b.Func.Config.Types
  3293  	// match: (PopCount16 x)
  3294  	// result: (I64Popcnt (ZeroExt16to64 x))
  3295  	for {
  3296  		x := v_0
  3297  		v.Reset(ssaop.OpWasmI64Popcnt)
  3298  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3299  		v0.AddArg(x)
  3300  		v.AddArg(v0)
  3301  		return true
  3302  	}
  3303  }
  3304  func rewriteValue_OpPopCount32(v *ssa.Value) bool {
  3305  	v_0 := v.Args[0]
  3306  	b := v.Block
  3307  	typ := &b.Func.Config.Types
  3308  	// match: (PopCount32 x)
  3309  	// result: (I64Popcnt (ZeroExt32to64 x))
  3310  	for {
  3311  		x := v_0
  3312  		v.Reset(ssaop.OpWasmI64Popcnt)
  3313  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3314  		v0.AddArg(x)
  3315  		v.AddArg(v0)
  3316  		return true
  3317  	}
  3318  }
  3319  func rewriteValue_OpPopCount8(v *ssa.Value) bool {
  3320  	v_0 := v.Args[0]
  3321  	b := v.Block
  3322  	typ := &b.Func.Config.Types
  3323  	// match: (PopCount8 x)
  3324  	// result: (I64Popcnt (ZeroExt8to64 x))
  3325  	for {
  3326  		x := v_0
  3327  		v.Reset(ssaop.OpWasmI64Popcnt)
  3328  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  3329  		v0.AddArg(x)
  3330  		v.AddArg(v0)
  3331  		return true
  3332  	}
  3333  }
  3334  func rewriteValue_OpRotateAllLeftVarInt16x8(v *ssa.Value) bool {
  3335  	v_1 := v.Args[1]
  3336  	v_0 := v.Args[0]
  3337  	b := v.Block
  3338  	typ := &b.Func.Config.Types
  3339  	// match: (RotateAllLeftVarInt16x8 x y)
  3340  	// result: (V128Or (I16x8Shl x y) (I16x8ShrU x (I64Sub (I64Const [16]) y)))
  3341  	for {
  3342  		x := v_0
  3343  		y := v_1
  3344  		v.Reset(ssaop.OpWasmV128Or)
  3345  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8Shl, typ.Vec128)
  3346  		v0.AddArg2(x, y)
  3347  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrU, typ.Vec128)
  3348  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3349  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3350  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  3351  		v2.AddArg2(v3, y)
  3352  		v1.AddArg2(x, v2)
  3353  		v.AddArg2(v0, v1)
  3354  		return true
  3355  	}
  3356  }
  3357  func rewriteValue_OpRotateAllLeftVarInt32x4(v *ssa.Value) bool {
  3358  	v_1 := v.Args[1]
  3359  	v_0 := v.Args[0]
  3360  	b := v.Block
  3361  	typ := &b.Func.Config.Types
  3362  	// match: (RotateAllLeftVarInt32x4 x y)
  3363  	// result: (V128Or (I32x4Shl x y) (I32x4ShrU x (I64Sub (I64Const [32]) y)))
  3364  	for {
  3365  		x := v_0
  3366  		y := v_1
  3367  		v.Reset(ssaop.OpWasmV128Or)
  3368  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4Shl, typ.Vec128)
  3369  		v0.AddArg2(x, y)
  3370  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrU, typ.Vec128)
  3371  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3372  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3373  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  3374  		v2.AddArg2(v3, y)
  3375  		v1.AddArg2(x, v2)
  3376  		v.AddArg2(v0, v1)
  3377  		return true
  3378  	}
  3379  }
  3380  func rewriteValue_OpRotateAllLeftVarInt64x2(v *ssa.Value) bool {
  3381  	v_1 := v.Args[1]
  3382  	v_0 := v.Args[0]
  3383  	b := v.Block
  3384  	typ := &b.Func.Config.Types
  3385  	// match: (RotateAllLeftVarInt64x2 x y)
  3386  	// result: (V128Or (I64x2Shl x y) (I64x2ShrU x (I64Sub (I64Const [64]) y)))
  3387  	for {
  3388  		x := v_0
  3389  		y := v_1
  3390  		v.Reset(ssaop.OpWasmV128Or)
  3391  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2Shl, typ.Vec128)
  3392  		v0.AddArg2(x, y)
  3393  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrU, typ.Vec128)
  3394  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3395  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3396  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  3397  		v2.AddArg2(v3, y)
  3398  		v1.AddArg2(x, v2)
  3399  		v.AddArg2(v0, v1)
  3400  		return true
  3401  	}
  3402  }
  3403  func rewriteValue_OpRotateAllLeftVarInt8x16(v *ssa.Value) bool {
  3404  	v_1 := v.Args[1]
  3405  	v_0 := v.Args[0]
  3406  	b := v.Block
  3407  	typ := &b.Func.Config.Types
  3408  	// match: (RotateAllLeftVarInt8x16 x y)
  3409  	// result: (V128Or (I8x16Shl x y) (I8x16ShrU x (I64Sub (I64Const [8]) y)))
  3410  	for {
  3411  		x := v_0
  3412  		y := v_1
  3413  		v.Reset(ssaop.OpWasmV128Or)
  3414  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16Shl, typ.Vec128)
  3415  		v0.AddArg2(x, y)
  3416  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrU, typ.Vec128)
  3417  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3418  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3419  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  3420  		v2.AddArg2(v3, y)
  3421  		v1.AddArg2(x, v2)
  3422  		v.AddArg2(v0, v1)
  3423  		return true
  3424  	}
  3425  }
  3426  func rewriteValue_OpRotateAllLeftVarUint16x8(v *ssa.Value) bool {
  3427  	v_1 := v.Args[1]
  3428  	v_0 := v.Args[0]
  3429  	b := v.Block
  3430  	typ := &b.Func.Config.Types
  3431  	// match: (RotateAllLeftVarUint16x8 x y)
  3432  	// result: (V128Or (I16x8Shl x y) (I16x8ShrU x (I64Sub (I64Const [16]) y)))
  3433  	for {
  3434  		x := v_0
  3435  		y := v_1
  3436  		v.Reset(ssaop.OpWasmV128Or)
  3437  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8Shl, typ.Vec128)
  3438  		v0.AddArg2(x, y)
  3439  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrU, typ.Vec128)
  3440  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3441  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3442  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  3443  		v2.AddArg2(v3, y)
  3444  		v1.AddArg2(x, v2)
  3445  		v.AddArg2(v0, v1)
  3446  		return true
  3447  	}
  3448  }
  3449  func rewriteValue_OpRotateAllLeftVarUint32x4(v *ssa.Value) bool {
  3450  	v_1 := v.Args[1]
  3451  	v_0 := v.Args[0]
  3452  	b := v.Block
  3453  	typ := &b.Func.Config.Types
  3454  	// match: (RotateAllLeftVarUint32x4 x y)
  3455  	// result: (V128Or (I32x4Shl x y) (I32x4ShrU x (I64Sub (I64Const [32]) y)))
  3456  	for {
  3457  		x := v_0
  3458  		y := v_1
  3459  		v.Reset(ssaop.OpWasmV128Or)
  3460  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4Shl, typ.Vec128)
  3461  		v0.AddArg2(x, y)
  3462  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrU, typ.Vec128)
  3463  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3464  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3465  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  3466  		v2.AddArg2(v3, y)
  3467  		v1.AddArg2(x, v2)
  3468  		v.AddArg2(v0, v1)
  3469  		return true
  3470  	}
  3471  }
  3472  func rewriteValue_OpRotateAllLeftVarUint64x2(v *ssa.Value) bool {
  3473  	v_1 := v.Args[1]
  3474  	v_0 := v.Args[0]
  3475  	b := v.Block
  3476  	typ := &b.Func.Config.Types
  3477  	// match: (RotateAllLeftVarUint64x2 x y)
  3478  	// result: (V128Or (I64x2Shl x y) (I64x2ShrU x (I64Sub (I64Const [64]) y)))
  3479  	for {
  3480  		x := v_0
  3481  		y := v_1
  3482  		v.Reset(ssaop.OpWasmV128Or)
  3483  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2Shl, typ.Vec128)
  3484  		v0.AddArg2(x, y)
  3485  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrU, typ.Vec128)
  3486  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3487  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3488  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  3489  		v2.AddArg2(v3, y)
  3490  		v1.AddArg2(x, v2)
  3491  		v.AddArg2(v0, v1)
  3492  		return true
  3493  	}
  3494  }
  3495  func rewriteValue_OpRotateAllLeftVarUint8x16(v *ssa.Value) bool {
  3496  	v_1 := v.Args[1]
  3497  	v_0 := v.Args[0]
  3498  	b := v.Block
  3499  	typ := &b.Func.Config.Types
  3500  	// match: (RotateAllLeftVarUint8x16 x y)
  3501  	// result: (V128Or (I8x16Shl x y) (I8x16ShrU x (I64Sub (I64Const [8]) y)))
  3502  	for {
  3503  		x := v_0
  3504  		y := v_1
  3505  		v.Reset(ssaop.OpWasmV128Or)
  3506  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16Shl, typ.Vec128)
  3507  		v0.AddArg2(x, y)
  3508  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrU, typ.Vec128)
  3509  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3510  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3511  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  3512  		v2.AddArg2(v3, y)
  3513  		v1.AddArg2(x, v2)
  3514  		v.AddArg2(v0, v1)
  3515  		return true
  3516  	}
  3517  }
  3518  func rewriteValue_OpRotateAllRightVarInt16x8(v *ssa.Value) bool {
  3519  	v_1 := v.Args[1]
  3520  	v_0 := v.Args[0]
  3521  	b := v.Block
  3522  	typ := &b.Func.Config.Types
  3523  	// match: (RotateAllRightVarInt16x8 x y)
  3524  	// result: (V128Or (I16x8ShrU x y) (I16x8Shl x (I64Sub (I64Const [16]) y)))
  3525  	for {
  3526  		x := v_0
  3527  		y := v_1
  3528  		v.Reset(ssaop.OpWasmV128Or)
  3529  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrU, typ.Vec128)
  3530  		v0.AddArg2(x, y)
  3531  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8Shl, typ.Vec128)
  3532  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3533  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3534  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  3535  		v2.AddArg2(v3, y)
  3536  		v1.AddArg2(x, v2)
  3537  		v.AddArg2(v0, v1)
  3538  		return true
  3539  	}
  3540  }
  3541  func rewriteValue_OpRotateAllRightVarInt32x4(v *ssa.Value) bool {
  3542  	v_1 := v.Args[1]
  3543  	v_0 := v.Args[0]
  3544  	b := v.Block
  3545  	typ := &b.Func.Config.Types
  3546  	// match: (RotateAllRightVarInt32x4 x y)
  3547  	// result: (V128Or (I32x4ShrU x y) (I32x4Shl x (I64Sub (I64Const [32]) y)))
  3548  	for {
  3549  		x := v_0
  3550  		y := v_1
  3551  		v.Reset(ssaop.OpWasmV128Or)
  3552  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrU, typ.Vec128)
  3553  		v0.AddArg2(x, y)
  3554  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4Shl, typ.Vec128)
  3555  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3556  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3557  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  3558  		v2.AddArg2(v3, y)
  3559  		v1.AddArg2(x, v2)
  3560  		v.AddArg2(v0, v1)
  3561  		return true
  3562  	}
  3563  }
  3564  func rewriteValue_OpRotateAllRightVarInt64x2(v *ssa.Value) bool {
  3565  	v_1 := v.Args[1]
  3566  	v_0 := v.Args[0]
  3567  	b := v.Block
  3568  	typ := &b.Func.Config.Types
  3569  	// match: (RotateAllRightVarInt64x2 x y)
  3570  	// result: (V128Or (I64x2ShrU x y) (I64x2Shl x (I64Sub (I64Const [64]) y)))
  3571  	for {
  3572  		x := v_0
  3573  		y := v_1
  3574  		v.Reset(ssaop.OpWasmV128Or)
  3575  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrU, typ.Vec128)
  3576  		v0.AddArg2(x, y)
  3577  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2Shl, typ.Vec128)
  3578  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3579  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3580  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  3581  		v2.AddArg2(v3, y)
  3582  		v1.AddArg2(x, v2)
  3583  		v.AddArg2(v0, v1)
  3584  		return true
  3585  	}
  3586  }
  3587  func rewriteValue_OpRotateAllRightVarInt8x16(v *ssa.Value) bool {
  3588  	v_1 := v.Args[1]
  3589  	v_0 := v.Args[0]
  3590  	b := v.Block
  3591  	typ := &b.Func.Config.Types
  3592  	// match: (RotateAllRightVarInt8x16 x y)
  3593  	// result: (V128Or (I8x16ShrU x y) (I8x16Shl x (I64Sub (I64Const [8]) y)))
  3594  	for {
  3595  		x := v_0
  3596  		y := v_1
  3597  		v.Reset(ssaop.OpWasmV128Or)
  3598  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrU, typ.Vec128)
  3599  		v0.AddArg2(x, y)
  3600  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16Shl, typ.Vec128)
  3601  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3602  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3603  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  3604  		v2.AddArg2(v3, y)
  3605  		v1.AddArg2(x, v2)
  3606  		v.AddArg2(v0, v1)
  3607  		return true
  3608  	}
  3609  }
  3610  func rewriteValue_OpRotateAllRightVarUint16x8(v *ssa.Value) bool {
  3611  	v_1 := v.Args[1]
  3612  	v_0 := v.Args[0]
  3613  	b := v.Block
  3614  	typ := &b.Func.Config.Types
  3615  	// match: (RotateAllRightVarUint16x8 x y)
  3616  	// result: (V128Or (I16x8ShrU x y) (I16x8Shl x (I64Sub (I64Const [16]) y)))
  3617  	for {
  3618  		x := v_0
  3619  		y := v_1
  3620  		v.Reset(ssaop.OpWasmV128Or)
  3621  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrU, typ.Vec128)
  3622  		v0.AddArg2(x, y)
  3623  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8Shl, typ.Vec128)
  3624  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3625  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3626  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  3627  		v2.AddArg2(v3, y)
  3628  		v1.AddArg2(x, v2)
  3629  		v.AddArg2(v0, v1)
  3630  		return true
  3631  	}
  3632  }
  3633  func rewriteValue_OpRotateAllRightVarUint32x4(v *ssa.Value) bool {
  3634  	v_1 := v.Args[1]
  3635  	v_0 := v.Args[0]
  3636  	b := v.Block
  3637  	typ := &b.Func.Config.Types
  3638  	// match: (RotateAllRightVarUint32x4 x y)
  3639  	// result: (V128Or (I32x4ShrU x y) (I32x4Shl x (I64Sub (I64Const [32]) y)))
  3640  	for {
  3641  		x := v_0
  3642  		y := v_1
  3643  		v.Reset(ssaop.OpWasmV128Or)
  3644  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrU, typ.Vec128)
  3645  		v0.AddArg2(x, y)
  3646  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4Shl, typ.Vec128)
  3647  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3648  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3649  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  3650  		v2.AddArg2(v3, y)
  3651  		v1.AddArg2(x, v2)
  3652  		v.AddArg2(v0, v1)
  3653  		return true
  3654  	}
  3655  }
  3656  func rewriteValue_OpRotateAllRightVarUint64x2(v *ssa.Value) bool {
  3657  	v_1 := v.Args[1]
  3658  	v_0 := v.Args[0]
  3659  	b := v.Block
  3660  	typ := &b.Func.Config.Types
  3661  	// match: (RotateAllRightVarUint64x2 x y)
  3662  	// result: (V128Or (I64x2ShrU x y) (I64x2Shl x (I64Sub (I64Const [64]) y)))
  3663  	for {
  3664  		x := v_0
  3665  		y := v_1
  3666  		v.Reset(ssaop.OpWasmV128Or)
  3667  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrU, typ.Vec128)
  3668  		v0.AddArg2(x, y)
  3669  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2Shl, typ.Vec128)
  3670  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3671  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3672  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  3673  		v2.AddArg2(v3, y)
  3674  		v1.AddArg2(x, v2)
  3675  		v.AddArg2(v0, v1)
  3676  		return true
  3677  	}
  3678  }
  3679  func rewriteValue_OpRotateAllRightVarUint8x16(v *ssa.Value) bool {
  3680  	v_1 := v.Args[1]
  3681  	v_0 := v.Args[0]
  3682  	b := v.Block
  3683  	typ := &b.Func.Config.Types
  3684  	// match: (RotateAllRightVarUint8x16 x y)
  3685  	// result: (V128Or (I8x16ShrU x y) (I8x16Shl x (I64Sub (I64Const [8]) y)))
  3686  	for {
  3687  		x := v_0
  3688  		y := v_1
  3689  		v.Reset(ssaop.OpWasmV128Or)
  3690  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrU, typ.Vec128)
  3691  		v0.AddArg2(x, y)
  3692  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16Shl, typ.Vec128)
  3693  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  3694  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3695  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  3696  		v2.AddArg2(v3, y)
  3697  		v1.AddArg2(x, v2)
  3698  		v.AddArg2(v0, v1)
  3699  		return true
  3700  	}
  3701  }
  3702  func rewriteValue_OpRotateLeft16(v *ssa.Value) bool {
  3703  	v_1 := v.Args[1]
  3704  	v_0 := v.Args[0]
  3705  	b := v.Block
  3706  	typ := &b.Func.Config.Types
  3707  	// match: (RotateLeft16 <t> x (I64Const [c]))
  3708  	// result: (Or16 (Lsh16x64 <t> x (I64Const [c&15])) (Rsh16Ux64 <t> x (I64Const [-c&15])))
  3709  	for {
  3710  		t := v.Type
  3711  		x := v_0
  3712  		if v_1.Op != ssaop.OpWasmI64Const {
  3713  			break
  3714  		}
  3715  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3716  		v.Reset(ssaop.OpOr16)
  3717  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh16x64, t)
  3718  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3719  		v1.AuxInt = ssa.Int64ToAuxInt(c & 15)
  3720  		v0.AddArg2(x, v1)
  3721  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh16Ux64, t)
  3722  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3723  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 15)
  3724  		v2.AddArg2(x, v3)
  3725  		v.AddArg2(v0, v2)
  3726  		return true
  3727  	}
  3728  	return false
  3729  }
  3730  func rewriteValue_OpRotateLeft8(v *ssa.Value) bool {
  3731  	v_1 := v.Args[1]
  3732  	v_0 := v.Args[0]
  3733  	b := v.Block
  3734  	typ := &b.Func.Config.Types
  3735  	// match: (RotateLeft8 <t> x (I64Const [c]))
  3736  	// result: (Or8 (Lsh8x64 <t> x (I64Const [c&7])) (Rsh8Ux64 <t> x (I64Const [-c&7])))
  3737  	for {
  3738  		t := v.Type
  3739  		x := v_0
  3740  		if v_1.Op != ssaop.OpWasmI64Const {
  3741  			break
  3742  		}
  3743  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  3744  		v.Reset(ssaop.OpOr8)
  3745  		v0 := b.NewValue0(v.Pos, ssaop.OpLsh8x64, t)
  3746  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3747  		v1.AuxInt = ssa.Int64ToAuxInt(c & 7)
  3748  		v0.AddArg2(x, v1)
  3749  		v2 := b.NewValue0(v.Pos, ssaop.OpRsh8Ux64, t)
  3750  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  3751  		v3.AuxInt = ssa.Int64ToAuxInt(-c & 7)
  3752  		v2.AddArg2(x, v3)
  3753  		v.AddArg2(v0, v2)
  3754  		return true
  3755  	}
  3756  	return false
  3757  }
  3758  func rewriteValue_OpRsh16Ux16(v *ssa.Value) bool {
  3759  	v_1 := v.Args[1]
  3760  	v_0 := v.Args[0]
  3761  	b := v.Block
  3762  	typ := &b.Func.Config.Types
  3763  	// match: (Rsh16Ux16 [c] x y)
  3764  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt16to64 y))
  3765  	for {
  3766  		c := ssa.AuxIntToBool(v.AuxInt)
  3767  		x := v_0
  3768  		y := v_1
  3769  		v.Reset(ssaop.OpRsh64Ux64)
  3770  		v.AuxInt = ssa.BoolToAuxInt(c)
  3771  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3772  		v0.AddArg(x)
  3773  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3774  		v1.AddArg(y)
  3775  		v.AddArg2(v0, v1)
  3776  		return true
  3777  	}
  3778  }
  3779  func rewriteValue_OpRsh16Ux32(v *ssa.Value) bool {
  3780  	v_1 := v.Args[1]
  3781  	v_0 := v.Args[0]
  3782  	b := v.Block
  3783  	typ := &b.Func.Config.Types
  3784  	// match: (Rsh16Ux32 [c] x y)
  3785  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt32to64 y))
  3786  	for {
  3787  		c := ssa.AuxIntToBool(v.AuxInt)
  3788  		x := v_0
  3789  		y := v_1
  3790  		v.Reset(ssaop.OpRsh64Ux64)
  3791  		v.AuxInt = ssa.BoolToAuxInt(c)
  3792  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3793  		v0.AddArg(x)
  3794  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3795  		v1.AddArg(y)
  3796  		v.AddArg2(v0, v1)
  3797  		return true
  3798  	}
  3799  }
  3800  func rewriteValue_OpRsh16Ux64(v *ssa.Value) bool {
  3801  	v_1 := v.Args[1]
  3802  	v_0 := v.Args[0]
  3803  	b := v.Block
  3804  	typ := &b.Func.Config.Types
  3805  	// match: (Rsh16Ux64 [c] x y)
  3806  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) y)
  3807  	for {
  3808  		c := ssa.AuxIntToBool(v.AuxInt)
  3809  		x := v_0
  3810  		y := v_1
  3811  		v.Reset(ssaop.OpRsh64Ux64)
  3812  		v.AuxInt = ssa.BoolToAuxInt(c)
  3813  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3814  		v0.AddArg(x)
  3815  		v.AddArg2(v0, y)
  3816  		return true
  3817  	}
  3818  }
  3819  func rewriteValue_OpRsh16Ux8(v *ssa.Value) bool {
  3820  	v_1 := v.Args[1]
  3821  	v_0 := v.Args[0]
  3822  	b := v.Block
  3823  	typ := &b.Func.Config.Types
  3824  	// match: (Rsh16Ux8 [c] x y)
  3825  	// result: (Rsh64Ux64 [c] (ZeroExt16to64 x) (ZeroExt8to64 y))
  3826  	for {
  3827  		c := ssa.AuxIntToBool(v.AuxInt)
  3828  		x := v_0
  3829  		y := v_1
  3830  		v.Reset(ssaop.OpRsh64Ux64)
  3831  		v.AuxInt = ssa.BoolToAuxInt(c)
  3832  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3833  		v0.AddArg(x)
  3834  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  3835  		v1.AddArg(y)
  3836  		v.AddArg2(v0, v1)
  3837  		return true
  3838  	}
  3839  }
  3840  func rewriteValue_OpRsh16x16(v *ssa.Value) bool {
  3841  	v_1 := v.Args[1]
  3842  	v_0 := v.Args[0]
  3843  	b := v.Block
  3844  	typ := &b.Func.Config.Types
  3845  	// match: (Rsh16x16 [c] x y)
  3846  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt16to64 y))
  3847  	for {
  3848  		c := ssa.AuxIntToBool(v.AuxInt)
  3849  		x := v_0
  3850  		y := v_1
  3851  		v.Reset(ssaop.OpRsh64x64)
  3852  		v.AuxInt = ssa.BoolToAuxInt(c)
  3853  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  3854  		v0.AddArg(x)
  3855  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3856  		v1.AddArg(y)
  3857  		v.AddArg2(v0, v1)
  3858  		return true
  3859  	}
  3860  }
  3861  func rewriteValue_OpRsh16x32(v *ssa.Value) bool {
  3862  	v_1 := v.Args[1]
  3863  	v_0 := v.Args[0]
  3864  	b := v.Block
  3865  	typ := &b.Func.Config.Types
  3866  	// match: (Rsh16x32 [c] x y)
  3867  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt32to64 y))
  3868  	for {
  3869  		c := ssa.AuxIntToBool(v.AuxInt)
  3870  		x := v_0
  3871  		y := v_1
  3872  		v.Reset(ssaop.OpRsh64x64)
  3873  		v.AuxInt = ssa.BoolToAuxInt(c)
  3874  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  3875  		v0.AddArg(x)
  3876  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3877  		v1.AddArg(y)
  3878  		v.AddArg2(v0, v1)
  3879  		return true
  3880  	}
  3881  }
  3882  func rewriteValue_OpRsh16x64(v *ssa.Value) bool {
  3883  	v_1 := v.Args[1]
  3884  	v_0 := v.Args[0]
  3885  	b := v.Block
  3886  	typ := &b.Func.Config.Types
  3887  	// match: (Rsh16x64 [c] x y)
  3888  	// result: (Rsh64x64 [c] (SignExt16to64 x) y)
  3889  	for {
  3890  		c := ssa.AuxIntToBool(v.AuxInt)
  3891  		x := v_0
  3892  		y := v_1
  3893  		v.Reset(ssaop.OpRsh64x64)
  3894  		v.AuxInt = ssa.BoolToAuxInt(c)
  3895  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  3896  		v0.AddArg(x)
  3897  		v.AddArg2(v0, y)
  3898  		return true
  3899  	}
  3900  }
  3901  func rewriteValue_OpRsh16x8(v *ssa.Value) bool {
  3902  	v_1 := v.Args[1]
  3903  	v_0 := v.Args[0]
  3904  	b := v.Block
  3905  	typ := &b.Func.Config.Types
  3906  	// match: (Rsh16x8 [c] x y)
  3907  	// result: (Rsh64x64 [c] (SignExt16to64 x) (ZeroExt8to64 y))
  3908  	for {
  3909  		c := ssa.AuxIntToBool(v.AuxInt)
  3910  		x := v_0
  3911  		y := v_1
  3912  		v.Reset(ssaop.OpRsh64x64)
  3913  		v.AuxInt = ssa.BoolToAuxInt(c)
  3914  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt16to64, typ.Int64)
  3915  		v0.AddArg(x)
  3916  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  3917  		v1.AddArg(y)
  3918  		v.AddArg2(v0, v1)
  3919  		return true
  3920  	}
  3921  }
  3922  func rewriteValue_OpRsh32Ux16(v *ssa.Value) bool {
  3923  	v_1 := v.Args[1]
  3924  	v_0 := v.Args[0]
  3925  	b := v.Block
  3926  	typ := &b.Func.Config.Types
  3927  	// match: (Rsh32Ux16 [c] x y)
  3928  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt16to64 y))
  3929  	for {
  3930  		c := ssa.AuxIntToBool(v.AuxInt)
  3931  		x := v_0
  3932  		y := v_1
  3933  		v.Reset(ssaop.OpRsh64Ux64)
  3934  		v.AuxInt = ssa.BoolToAuxInt(c)
  3935  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3936  		v0.AddArg(x)
  3937  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  3938  		v1.AddArg(y)
  3939  		v.AddArg2(v0, v1)
  3940  		return true
  3941  	}
  3942  }
  3943  func rewriteValue_OpRsh32Ux32(v *ssa.Value) bool {
  3944  	v_1 := v.Args[1]
  3945  	v_0 := v.Args[0]
  3946  	b := v.Block
  3947  	typ := &b.Func.Config.Types
  3948  	// match: (Rsh32Ux32 [c] x y)
  3949  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt32to64 y))
  3950  	for {
  3951  		c := ssa.AuxIntToBool(v.AuxInt)
  3952  		x := v_0
  3953  		y := v_1
  3954  		v.Reset(ssaop.OpRsh64Ux64)
  3955  		v.AuxInt = ssa.BoolToAuxInt(c)
  3956  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3957  		v0.AddArg(x)
  3958  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3959  		v1.AddArg(y)
  3960  		v.AddArg2(v0, v1)
  3961  		return true
  3962  	}
  3963  }
  3964  func rewriteValue_OpRsh32Ux64(v *ssa.Value) bool {
  3965  	v_1 := v.Args[1]
  3966  	v_0 := v.Args[0]
  3967  	b := v.Block
  3968  	typ := &b.Func.Config.Types
  3969  	// match: (Rsh32Ux64 [c] x y)
  3970  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) y)
  3971  	for {
  3972  		c := ssa.AuxIntToBool(v.AuxInt)
  3973  		x := v_0
  3974  		y := v_1
  3975  		v.Reset(ssaop.OpRsh64Ux64)
  3976  		v.AuxInt = ssa.BoolToAuxInt(c)
  3977  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3978  		v0.AddArg(x)
  3979  		v.AddArg2(v0, y)
  3980  		return true
  3981  	}
  3982  }
  3983  func rewriteValue_OpRsh32Ux8(v *ssa.Value) bool {
  3984  	v_1 := v.Args[1]
  3985  	v_0 := v.Args[0]
  3986  	b := v.Block
  3987  	typ := &b.Func.Config.Types
  3988  	// match: (Rsh32Ux8 [c] x y)
  3989  	// result: (Rsh64Ux64 [c] (ZeroExt32to64 x) (ZeroExt8to64 y))
  3990  	for {
  3991  		c := ssa.AuxIntToBool(v.AuxInt)
  3992  		x := v_0
  3993  		y := v_1
  3994  		v.Reset(ssaop.OpRsh64Ux64)
  3995  		v.AuxInt = ssa.BoolToAuxInt(c)
  3996  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  3997  		v0.AddArg(x)
  3998  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  3999  		v1.AddArg(y)
  4000  		v.AddArg2(v0, v1)
  4001  		return true
  4002  	}
  4003  }
  4004  func rewriteValue_OpRsh32x16(v *ssa.Value) bool {
  4005  	v_1 := v.Args[1]
  4006  	v_0 := v.Args[0]
  4007  	b := v.Block
  4008  	typ := &b.Func.Config.Types
  4009  	// match: (Rsh32x16 [c] x y)
  4010  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt16to64 y))
  4011  	for {
  4012  		c := ssa.AuxIntToBool(v.AuxInt)
  4013  		x := v_0
  4014  		y := v_1
  4015  		v.Reset(ssaop.OpRsh64x64)
  4016  		v.AuxInt = ssa.BoolToAuxInt(c)
  4017  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  4018  		v0.AddArg(x)
  4019  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  4020  		v1.AddArg(y)
  4021  		v.AddArg2(v0, v1)
  4022  		return true
  4023  	}
  4024  }
  4025  func rewriteValue_OpRsh32x32(v *ssa.Value) bool {
  4026  	v_1 := v.Args[1]
  4027  	v_0 := v.Args[0]
  4028  	b := v.Block
  4029  	typ := &b.Func.Config.Types
  4030  	// match: (Rsh32x32 [c] x y)
  4031  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt32to64 y))
  4032  	for {
  4033  		c := ssa.AuxIntToBool(v.AuxInt)
  4034  		x := v_0
  4035  		y := v_1
  4036  		v.Reset(ssaop.OpRsh64x64)
  4037  		v.AuxInt = ssa.BoolToAuxInt(c)
  4038  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  4039  		v0.AddArg(x)
  4040  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  4041  		v1.AddArg(y)
  4042  		v.AddArg2(v0, v1)
  4043  		return true
  4044  	}
  4045  }
  4046  func rewriteValue_OpRsh32x64(v *ssa.Value) bool {
  4047  	v_1 := v.Args[1]
  4048  	v_0 := v.Args[0]
  4049  	b := v.Block
  4050  	typ := &b.Func.Config.Types
  4051  	// match: (Rsh32x64 [c] x y)
  4052  	// result: (Rsh64x64 [c] (SignExt32to64 x) y)
  4053  	for {
  4054  		c := ssa.AuxIntToBool(v.AuxInt)
  4055  		x := v_0
  4056  		y := v_1
  4057  		v.Reset(ssaop.OpRsh64x64)
  4058  		v.AuxInt = ssa.BoolToAuxInt(c)
  4059  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  4060  		v0.AddArg(x)
  4061  		v.AddArg2(v0, y)
  4062  		return true
  4063  	}
  4064  }
  4065  func rewriteValue_OpRsh32x8(v *ssa.Value) bool {
  4066  	v_1 := v.Args[1]
  4067  	v_0 := v.Args[0]
  4068  	b := v.Block
  4069  	typ := &b.Func.Config.Types
  4070  	// match: (Rsh32x8 [c] x y)
  4071  	// result: (Rsh64x64 [c] (SignExt32to64 x) (ZeroExt8to64 y))
  4072  	for {
  4073  		c := ssa.AuxIntToBool(v.AuxInt)
  4074  		x := v_0
  4075  		y := v_1
  4076  		v.Reset(ssaop.OpRsh64x64)
  4077  		v.AuxInt = ssa.BoolToAuxInt(c)
  4078  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt32to64, typ.Int64)
  4079  		v0.AddArg(x)
  4080  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4081  		v1.AddArg(y)
  4082  		v.AddArg2(v0, v1)
  4083  		return true
  4084  	}
  4085  }
  4086  func rewriteValue_OpRsh64Ux16(v *ssa.Value) bool {
  4087  	v_1 := v.Args[1]
  4088  	v_0 := v.Args[0]
  4089  	b := v.Block
  4090  	typ := &b.Func.Config.Types
  4091  	// match: (Rsh64Ux16 [c] x y)
  4092  	// result: (Rsh64Ux64 [c] x (ZeroExt16to64 y))
  4093  	for {
  4094  		c := ssa.AuxIntToBool(v.AuxInt)
  4095  		x := v_0
  4096  		y := v_1
  4097  		v.Reset(ssaop.OpRsh64Ux64)
  4098  		v.AuxInt = ssa.BoolToAuxInt(c)
  4099  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  4100  		v0.AddArg(y)
  4101  		v.AddArg2(x, v0)
  4102  		return true
  4103  	}
  4104  }
  4105  func rewriteValue_OpRsh64Ux32(v *ssa.Value) bool {
  4106  	v_1 := v.Args[1]
  4107  	v_0 := v.Args[0]
  4108  	b := v.Block
  4109  	typ := &b.Func.Config.Types
  4110  	// match: (Rsh64Ux32 [c] x y)
  4111  	// result: (Rsh64Ux64 [c] x (ZeroExt32to64 y))
  4112  	for {
  4113  		c := ssa.AuxIntToBool(v.AuxInt)
  4114  		x := v_0
  4115  		y := v_1
  4116  		v.Reset(ssaop.OpRsh64Ux64)
  4117  		v.AuxInt = ssa.BoolToAuxInt(c)
  4118  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  4119  		v0.AddArg(y)
  4120  		v.AddArg2(x, v0)
  4121  		return true
  4122  	}
  4123  }
  4124  func rewriteValue_OpRsh64Ux64(v *ssa.Value) bool {
  4125  	v_1 := v.Args[1]
  4126  	v_0 := v.Args[0]
  4127  	b := v.Block
  4128  	typ := &b.Func.Config.Types
  4129  	// match: (Rsh64Ux64 x y)
  4130  	// cond: ssa.ShiftIsBounded(v)
  4131  	// result: (I64ShrU x y)
  4132  	for {
  4133  		x := v_0
  4134  		y := v_1
  4135  		if !(ssa.ShiftIsBounded(v)) {
  4136  			break
  4137  		}
  4138  		v.Reset(ssaop.OpWasmI64ShrU)
  4139  		v.AddArg2(x, y)
  4140  		return true
  4141  	}
  4142  	// match: (Rsh64Ux64 x (I64Const [c]))
  4143  	// cond: uint64(c) < 64
  4144  	// result: (I64ShrU x (I64Const [c]))
  4145  	for {
  4146  		x := v_0
  4147  		if v_1.Op != ssaop.OpWasmI64Const {
  4148  			break
  4149  		}
  4150  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4151  		if !(uint64(c) < 64) {
  4152  			break
  4153  		}
  4154  		v.Reset(ssaop.OpWasmI64ShrU)
  4155  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4156  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4157  		v.AddArg2(x, v0)
  4158  		return true
  4159  	}
  4160  	// match: (Rsh64Ux64 x (I64Const [c]))
  4161  	// cond: uint64(c) >= 64
  4162  	// result: (I64Const [0])
  4163  	for {
  4164  		if v_1.Op != ssaop.OpWasmI64Const {
  4165  			break
  4166  		}
  4167  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4168  		if !(uint64(c) >= 64) {
  4169  			break
  4170  		}
  4171  		v.Reset(ssaop.OpWasmI64Const)
  4172  		v.AuxInt = ssa.Int64ToAuxInt(0)
  4173  		return true
  4174  	}
  4175  	// match: (Rsh64Ux64 x y)
  4176  	// result: (Select (I64ShrU x y) (I64Const [0]) (I64LtU y (I64Const [64])))
  4177  	for {
  4178  		x := v_0
  4179  		y := v_1
  4180  		v.Reset(ssaop.OpWasmSelect)
  4181  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64ShrU, typ.Int64)
  4182  		v0.AddArg2(x, y)
  4183  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4184  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  4185  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4186  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4187  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  4188  		v2.AddArg2(y, v3)
  4189  		v.AddArg3(v0, v1, v2)
  4190  		return true
  4191  	}
  4192  }
  4193  func rewriteValue_OpRsh64Ux8(v *ssa.Value) bool {
  4194  	v_1 := v.Args[1]
  4195  	v_0 := v.Args[0]
  4196  	b := v.Block
  4197  	typ := &b.Func.Config.Types
  4198  	// match: (Rsh64Ux8 [c] x y)
  4199  	// result: (Rsh64Ux64 [c] x (ZeroExt8to64 y))
  4200  	for {
  4201  		c := ssa.AuxIntToBool(v.AuxInt)
  4202  		x := v_0
  4203  		y := v_1
  4204  		v.Reset(ssaop.OpRsh64Ux64)
  4205  		v.AuxInt = ssa.BoolToAuxInt(c)
  4206  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4207  		v0.AddArg(y)
  4208  		v.AddArg2(x, v0)
  4209  		return true
  4210  	}
  4211  }
  4212  func rewriteValue_OpRsh64x16(v *ssa.Value) bool {
  4213  	v_1 := v.Args[1]
  4214  	v_0 := v.Args[0]
  4215  	b := v.Block
  4216  	typ := &b.Func.Config.Types
  4217  	// match: (Rsh64x16 [c] x y)
  4218  	// result: (Rsh64x64 [c] x (ZeroExt16to64 y))
  4219  	for {
  4220  		c := ssa.AuxIntToBool(v.AuxInt)
  4221  		x := v_0
  4222  		y := v_1
  4223  		v.Reset(ssaop.OpRsh64x64)
  4224  		v.AuxInt = ssa.BoolToAuxInt(c)
  4225  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  4226  		v0.AddArg(y)
  4227  		v.AddArg2(x, v0)
  4228  		return true
  4229  	}
  4230  }
  4231  func rewriteValue_OpRsh64x32(v *ssa.Value) bool {
  4232  	v_1 := v.Args[1]
  4233  	v_0 := v.Args[0]
  4234  	b := v.Block
  4235  	typ := &b.Func.Config.Types
  4236  	// match: (Rsh64x32 [c] x y)
  4237  	// result: (Rsh64x64 [c] x (ZeroExt32to64 y))
  4238  	for {
  4239  		c := ssa.AuxIntToBool(v.AuxInt)
  4240  		x := v_0
  4241  		y := v_1
  4242  		v.Reset(ssaop.OpRsh64x64)
  4243  		v.AuxInt = ssa.BoolToAuxInt(c)
  4244  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  4245  		v0.AddArg(y)
  4246  		v.AddArg2(x, v0)
  4247  		return true
  4248  	}
  4249  }
  4250  func rewriteValue_OpRsh64x64(v *ssa.Value) bool {
  4251  	v_1 := v.Args[1]
  4252  	v_0 := v.Args[0]
  4253  	b := v.Block
  4254  	typ := &b.Func.Config.Types
  4255  	// match: (Rsh64x64 x y)
  4256  	// cond: ssa.ShiftIsBounded(v)
  4257  	// result: (I64ShrS x y)
  4258  	for {
  4259  		x := v_0
  4260  		y := v_1
  4261  		if !(ssa.ShiftIsBounded(v)) {
  4262  			break
  4263  		}
  4264  		v.Reset(ssaop.OpWasmI64ShrS)
  4265  		v.AddArg2(x, y)
  4266  		return true
  4267  	}
  4268  	// match: (Rsh64x64 x (I64Const [c]))
  4269  	// cond: uint64(c) < 64
  4270  	// result: (I64ShrS x (I64Const [c]))
  4271  	for {
  4272  		x := v_0
  4273  		if v_1.Op != ssaop.OpWasmI64Const {
  4274  			break
  4275  		}
  4276  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4277  		if !(uint64(c) < 64) {
  4278  			break
  4279  		}
  4280  		v.Reset(ssaop.OpWasmI64ShrS)
  4281  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4282  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4283  		v.AddArg2(x, v0)
  4284  		return true
  4285  	}
  4286  	// match: (Rsh64x64 x (I64Const [c]))
  4287  	// cond: uint64(c) >= 64
  4288  	// result: (I64ShrS x (I64Const [63]))
  4289  	for {
  4290  		x := v_0
  4291  		if v_1.Op != ssaop.OpWasmI64Const {
  4292  			break
  4293  		}
  4294  		c := ssa.AuxIntToInt64(v_1.AuxInt)
  4295  		if !(uint64(c) >= 64) {
  4296  			break
  4297  		}
  4298  		v.Reset(ssaop.OpWasmI64ShrS)
  4299  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4300  		v0.AuxInt = ssa.Int64ToAuxInt(63)
  4301  		v.AddArg2(x, v0)
  4302  		return true
  4303  	}
  4304  	// match: (Rsh64x64 x y)
  4305  	// result: (I64ShrS x (Select <typ.Int64> y (I64Const [63]) (I64LtU y (I64Const [64]))))
  4306  	for {
  4307  		x := v_0
  4308  		y := v_1
  4309  		v.Reset(ssaop.OpWasmI64ShrS)
  4310  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmSelect, typ.Int64)
  4311  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4312  		v1.AuxInt = ssa.Int64ToAuxInt(63)
  4313  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4314  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4315  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  4316  		v2.AddArg2(y, v3)
  4317  		v0.AddArg3(y, v1, v2)
  4318  		v.AddArg2(x, v0)
  4319  		return true
  4320  	}
  4321  }
  4322  func rewriteValue_OpRsh64x8(v *ssa.Value) bool {
  4323  	v_1 := v.Args[1]
  4324  	v_0 := v.Args[0]
  4325  	b := v.Block
  4326  	typ := &b.Func.Config.Types
  4327  	// match: (Rsh64x8 [c] x y)
  4328  	// result: (Rsh64x64 [c] x (ZeroExt8to64 y))
  4329  	for {
  4330  		c := ssa.AuxIntToBool(v.AuxInt)
  4331  		x := v_0
  4332  		y := v_1
  4333  		v.Reset(ssaop.OpRsh64x64)
  4334  		v.AuxInt = ssa.BoolToAuxInt(c)
  4335  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4336  		v0.AddArg(y)
  4337  		v.AddArg2(x, v0)
  4338  		return true
  4339  	}
  4340  }
  4341  func rewriteValue_OpRsh8Ux16(v *ssa.Value) bool {
  4342  	v_1 := v.Args[1]
  4343  	v_0 := v.Args[0]
  4344  	b := v.Block
  4345  	typ := &b.Func.Config.Types
  4346  	// match: (Rsh8Ux16 [c] x y)
  4347  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt16to64 y))
  4348  	for {
  4349  		c := ssa.AuxIntToBool(v.AuxInt)
  4350  		x := v_0
  4351  		y := v_1
  4352  		v.Reset(ssaop.OpRsh64Ux64)
  4353  		v.AuxInt = ssa.BoolToAuxInt(c)
  4354  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4355  		v0.AddArg(x)
  4356  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  4357  		v1.AddArg(y)
  4358  		v.AddArg2(v0, v1)
  4359  		return true
  4360  	}
  4361  }
  4362  func rewriteValue_OpRsh8Ux32(v *ssa.Value) bool {
  4363  	v_1 := v.Args[1]
  4364  	v_0 := v.Args[0]
  4365  	b := v.Block
  4366  	typ := &b.Func.Config.Types
  4367  	// match: (Rsh8Ux32 [c] x y)
  4368  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt32to64 y))
  4369  	for {
  4370  		c := ssa.AuxIntToBool(v.AuxInt)
  4371  		x := v_0
  4372  		y := v_1
  4373  		v.Reset(ssaop.OpRsh64Ux64)
  4374  		v.AuxInt = ssa.BoolToAuxInt(c)
  4375  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4376  		v0.AddArg(x)
  4377  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  4378  		v1.AddArg(y)
  4379  		v.AddArg2(v0, v1)
  4380  		return true
  4381  	}
  4382  }
  4383  func rewriteValue_OpRsh8Ux64(v *ssa.Value) bool {
  4384  	v_1 := v.Args[1]
  4385  	v_0 := v.Args[0]
  4386  	b := v.Block
  4387  	typ := &b.Func.Config.Types
  4388  	// match: (Rsh8Ux64 [c] x y)
  4389  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) y)
  4390  	for {
  4391  		c := ssa.AuxIntToBool(v.AuxInt)
  4392  		x := v_0
  4393  		y := v_1
  4394  		v.Reset(ssaop.OpRsh64Ux64)
  4395  		v.AuxInt = ssa.BoolToAuxInt(c)
  4396  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4397  		v0.AddArg(x)
  4398  		v.AddArg2(v0, y)
  4399  		return true
  4400  	}
  4401  }
  4402  func rewriteValue_OpRsh8Ux8(v *ssa.Value) bool {
  4403  	v_1 := v.Args[1]
  4404  	v_0 := v.Args[0]
  4405  	b := v.Block
  4406  	typ := &b.Func.Config.Types
  4407  	// match: (Rsh8Ux8 [c] x y)
  4408  	// result: (Rsh64Ux64 [c] (ZeroExt8to64 x) (ZeroExt8to64 y))
  4409  	for {
  4410  		c := ssa.AuxIntToBool(v.AuxInt)
  4411  		x := v_0
  4412  		y := v_1
  4413  		v.Reset(ssaop.OpRsh64Ux64)
  4414  		v.AuxInt = ssa.BoolToAuxInt(c)
  4415  		v0 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4416  		v0.AddArg(x)
  4417  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4418  		v1.AddArg(y)
  4419  		v.AddArg2(v0, v1)
  4420  		return true
  4421  	}
  4422  }
  4423  func rewriteValue_OpRsh8x16(v *ssa.Value) bool {
  4424  	v_1 := v.Args[1]
  4425  	v_0 := v.Args[0]
  4426  	b := v.Block
  4427  	typ := &b.Func.Config.Types
  4428  	// match: (Rsh8x16 [c] x y)
  4429  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt16to64 y))
  4430  	for {
  4431  		c := ssa.AuxIntToBool(v.AuxInt)
  4432  		x := v_0
  4433  		y := v_1
  4434  		v.Reset(ssaop.OpRsh64x64)
  4435  		v.AuxInt = ssa.BoolToAuxInt(c)
  4436  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  4437  		v0.AddArg(x)
  4438  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt16to64, typ.UInt64)
  4439  		v1.AddArg(y)
  4440  		v.AddArg2(v0, v1)
  4441  		return true
  4442  	}
  4443  }
  4444  func rewriteValue_OpRsh8x32(v *ssa.Value) bool {
  4445  	v_1 := v.Args[1]
  4446  	v_0 := v.Args[0]
  4447  	b := v.Block
  4448  	typ := &b.Func.Config.Types
  4449  	// match: (Rsh8x32 [c] x y)
  4450  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt32to64 y))
  4451  	for {
  4452  		c := ssa.AuxIntToBool(v.AuxInt)
  4453  		x := v_0
  4454  		y := v_1
  4455  		v.Reset(ssaop.OpRsh64x64)
  4456  		v.AuxInt = ssa.BoolToAuxInt(c)
  4457  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  4458  		v0.AddArg(x)
  4459  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt32to64, typ.UInt64)
  4460  		v1.AddArg(y)
  4461  		v.AddArg2(v0, v1)
  4462  		return true
  4463  	}
  4464  }
  4465  func rewriteValue_OpRsh8x64(v *ssa.Value) bool {
  4466  	v_1 := v.Args[1]
  4467  	v_0 := v.Args[0]
  4468  	b := v.Block
  4469  	typ := &b.Func.Config.Types
  4470  	// match: (Rsh8x64 [c] x y)
  4471  	// result: (Rsh64x64 [c] (SignExt8to64 x) y)
  4472  	for {
  4473  		c := ssa.AuxIntToBool(v.AuxInt)
  4474  		x := v_0
  4475  		y := v_1
  4476  		v.Reset(ssaop.OpRsh64x64)
  4477  		v.AuxInt = ssa.BoolToAuxInt(c)
  4478  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  4479  		v0.AddArg(x)
  4480  		v.AddArg2(v0, y)
  4481  		return true
  4482  	}
  4483  }
  4484  func rewriteValue_OpRsh8x8(v *ssa.Value) bool {
  4485  	v_1 := v.Args[1]
  4486  	v_0 := v.Args[0]
  4487  	b := v.Block
  4488  	typ := &b.Func.Config.Types
  4489  	// match: (Rsh8x8 [c] x y)
  4490  	// result: (Rsh64x64 [c] (SignExt8to64 x) (ZeroExt8to64 y))
  4491  	for {
  4492  		c := ssa.AuxIntToBool(v.AuxInt)
  4493  		x := v_0
  4494  		y := v_1
  4495  		v.Reset(ssaop.OpRsh64x64)
  4496  		v.AuxInt = ssa.BoolToAuxInt(c)
  4497  		v0 := b.NewValue0(v.Pos, ssaop.OpSignExt8to64, typ.Int64)
  4498  		v0.AddArg(x)
  4499  		v1 := b.NewValue0(v.Pos, ssaop.OpZeroExt8to64, typ.UInt64)
  4500  		v1.AddArg(y)
  4501  		v.AddArg2(v0, v1)
  4502  		return true
  4503  	}
  4504  }
  4505  func rewriteValue_OpSelect0(v *ssa.Value) bool {
  4506  	v_0 := v.Args[0]
  4507  	// match: (Select0 <t> (Mul64uhilo x y))
  4508  	// result: (Hmul64u <t> x y)
  4509  	for {
  4510  		t := v.Type
  4511  		if v_0.Op != ssaop.OpMul64uhilo {
  4512  			break
  4513  		}
  4514  		y := v_0.Args[1]
  4515  		x := v_0.Args[0]
  4516  		v.Reset(ssaop.OpHmul64u)
  4517  		v.Type = t
  4518  		v.AddArg2(x, y)
  4519  		return true
  4520  	}
  4521  	return false
  4522  }
  4523  func rewriteValue_OpSelect1(v *ssa.Value) bool {
  4524  	v_0 := v.Args[0]
  4525  	// match: (Select1 <t> (Mul64uhilo x y))
  4526  	// result: (I64Mul x y)
  4527  	for {
  4528  		if v_0.Op != ssaop.OpMul64uhilo {
  4529  			break
  4530  		}
  4531  		y := v_0.Args[1]
  4532  		x := v_0.Args[0]
  4533  		v.Reset(ssaop.OpWasmI64Mul)
  4534  		v.AddArg2(x, y)
  4535  		return true
  4536  	}
  4537  	return false
  4538  }
  4539  func rewriteValue_OpShiftAllLeftInt16x8(v *ssa.Value) bool {
  4540  	v_1 := v.Args[1]
  4541  	v_0 := v.Args[0]
  4542  	b := v.Block
  4543  	typ := &b.Func.Config.Types
  4544  	// match: (ShiftAllLeftInt16x8 x d:(Const64 [c]))
  4545  	// cond: uint64(c) < 16
  4546  	// result: (I16x8Shl x (I64Const [c]))
  4547  	for {
  4548  		x := v_0
  4549  		d := v_1
  4550  		if d.Op != ssaop.OpConst64 {
  4551  			break
  4552  		}
  4553  		c := ssa.AuxIntToInt64(d.AuxInt)
  4554  		if !(uint64(c) < 16) {
  4555  			break
  4556  		}
  4557  		v.Reset(ssaop.OpWasmI16x8Shl)
  4558  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4559  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4560  		v.AddArg2(x, v0)
  4561  		return true
  4562  	}
  4563  	// match: (ShiftAllLeftInt16x8 x d:(I64Const [c]))
  4564  	// cond: uint64(c) < 16
  4565  	// result: (I16x8Shl x d)
  4566  	for {
  4567  		x := v_0
  4568  		d := v_1
  4569  		if d.Op != ssaop.OpWasmI64Const {
  4570  			break
  4571  		}
  4572  		c := ssa.AuxIntToInt64(d.AuxInt)
  4573  		if !(uint64(c) < 16) {
  4574  			break
  4575  		}
  4576  		v.Reset(ssaop.OpWasmI16x8Shl)
  4577  		v.AddArg2(x, d)
  4578  		return true
  4579  	}
  4580  	// match: (ShiftAllLeftInt16x8 x y)
  4581  	// result: (SelectV (I16x8Shl x y) (V128Xor x x) (I64LtU y (I64Const [16])))
  4582  	for {
  4583  		x := v_0
  4584  		y := v_1
  4585  		v.Reset(ssaop.OpWasmSelectV)
  4586  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8Shl, typ.Vec128)
  4587  		v0.AddArg2(x, y)
  4588  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4589  		v1.AddArg2(x, x)
  4590  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4591  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4592  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  4593  		v2.AddArg2(y, v3)
  4594  		v.AddArg3(v0, v1, v2)
  4595  		return true
  4596  	}
  4597  }
  4598  func rewriteValue_OpShiftAllLeftInt32x4(v *ssa.Value) bool {
  4599  	v_1 := v.Args[1]
  4600  	v_0 := v.Args[0]
  4601  	b := v.Block
  4602  	typ := &b.Func.Config.Types
  4603  	// match: (ShiftAllLeftInt32x4 x d:(Const64 [c]))
  4604  	// cond: uint64(c) < 32
  4605  	// result: (I32x4Shl x (I64Const [c]))
  4606  	for {
  4607  		x := v_0
  4608  		d := v_1
  4609  		if d.Op != ssaop.OpConst64 {
  4610  			break
  4611  		}
  4612  		c := ssa.AuxIntToInt64(d.AuxInt)
  4613  		if !(uint64(c) < 32) {
  4614  			break
  4615  		}
  4616  		v.Reset(ssaop.OpWasmI32x4Shl)
  4617  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4618  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4619  		v.AddArg2(x, v0)
  4620  		return true
  4621  	}
  4622  	// match: (ShiftAllLeftInt32x4 x d:(I64Const [c]))
  4623  	// cond: uint64(c) < 32
  4624  	// result: (I32x4Shl x d)
  4625  	for {
  4626  		x := v_0
  4627  		d := v_1
  4628  		if d.Op != ssaop.OpWasmI64Const {
  4629  			break
  4630  		}
  4631  		c := ssa.AuxIntToInt64(d.AuxInt)
  4632  		if !(uint64(c) < 32) {
  4633  			break
  4634  		}
  4635  		v.Reset(ssaop.OpWasmI32x4Shl)
  4636  		v.AddArg2(x, d)
  4637  		return true
  4638  	}
  4639  	// match: (ShiftAllLeftInt32x4 x y)
  4640  	// result: (SelectV (I32x4Shl x y) (V128Xor x x) (I64LtU y (I64Const [32])))
  4641  	for {
  4642  		x := v_0
  4643  		y := v_1
  4644  		v.Reset(ssaop.OpWasmSelectV)
  4645  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4Shl, typ.Vec128)
  4646  		v0.AddArg2(x, y)
  4647  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4648  		v1.AddArg2(x, x)
  4649  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4650  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4651  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  4652  		v2.AddArg2(y, v3)
  4653  		v.AddArg3(v0, v1, v2)
  4654  		return true
  4655  	}
  4656  }
  4657  func rewriteValue_OpShiftAllLeftInt64x2(v *ssa.Value) bool {
  4658  	v_1 := v.Args[1]
  4659  	v_0 := v.Args[0]
  4660  	b := v.Block
  4661  	typ := &b.Func.Config.Types
  4662  	// match: (ShiftAllLeftInt64x2 x d:(Const64 [c]))
  4663  	// cond: uint64(c) < 64
  4664  	// result: (I64x2Shl x (I64Const [c]))
  4665  	for {
  4666  		x := v_0
  4667  		d := v_1
  4668  		if d.Op != ssaop.OpConst64 {
  4669  			break
  4670  		}
  4671  		c := ssa.AuxIntToInt64(d.AuxInt)
  4672  		if !(uint64(c) < 64) {
  4673  			break
  4674  		}
  4675  		v.Reset(ssaop.OpWasmI64x2Shl)
  4676  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4677  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4678  		v.AddArg2(x, v0)
  4679  		return true
  4680  	}
  4681  	// match: (ShiftAllLeftInt64x2 x d:(I64Const [c]))
  4682  	// cond: uint64(c) < 64
  4683  	// result: (I64x2Shl x d)
  4684  	for {
  4685  		x := v_0
  4686  		d := v_1
  4687  		if d.Op != ssaop.OpWasmI64Const {
  4688  			break
  4689  		}
  4690  		c := ssa.AuxIntToInt64(d.AuxInt)
  4691  		if !(uint64(c) < 64) {
  4692  			break
  4693  		}
  4694  		v.Reset(ssaop.OpWasmI64x2Shl)
  4695  		v.AddArg2(x, d)
  4696  		return true
  4697  	}
  4698  	// match: (ShiftAllLeftInt64x2 x y)
  4699  	// result: (SelectV (I64x2Shl x y) (V128Xor x x) (I64LtU y (I64Const [64])))
  4700  	for {
  4701  		x := v_0
  4702  		y := v_1
  4703  		v.Reset(ssaop.OpWasmSelectV)
  4704  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2Shl, typ.Vec128)
  4705  		v0.AddArg2(x, y)
  4706  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4707  		v1.AddArg2(x, x)
  4708  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4709  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4710  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  4711  		v2.AddArg2(y, v3)
  4712  		v.AddArg3(v0, v1, v2)
  4713  		return true
  4714  	}
  4715  }
  4716  func rewriteValue_OpShiftAllLeftInt8x16(v *ssa.Value) bool {
  4717  	v_1 := v.Args[1]
  4718  	v_0 := v.Args[0]
  4719  	b := v.Block
  4720  	typ := &b.Func.Config.Types
  4721  	// match: (ShiftAllLeftInt8x16 x d:(Const64 [c]))
  4722  	// cond: uint64(c) < 8
  4723  	// result: (I8x16Shl x (I64Const [c]))
  4724  	for {
  4725  		x := v_0
  4726  		d := v_1
  4727  		if d.Op != ssaop.OpConst64 {
  4728  			break
  4729  		}
  4730  		c := ssa.AuxIntToInt64(d.AuxInt)
  4731  		if !(uint64(c) < 8) {
  4732  			break
  4733  		}
  4734  		v.Reset(ssaop.OpWasmI8x16Shl)
  4735  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4736  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4737  		v.AddArg2(x, v0)
  4738  		return true
  4739  	}
  4740  	// match: (ShiftAllLeftInt8x16 x d:(I64Const [c]))
  4741  	// cond: uint64(c) < 8
  4742  	// result: (I8x16Shl x d)
  4743  	for {
  4744  		x := v_0
  4745  		d := v_1
  4746  		if d.Op != ssaop.OpWasmI64Const {
  4747  			break
  4748  		}
  4749  		c := ssa.AuxIntToInt64(d.AuxInt)
  4750  		if !(uint64(c) < 8) {
  4751  			break
  4752  		}
  4753  		v.Reset(ssaop.OpWasmI8x16Shl)
  4754  		v.AddArg2(x, d)
  4755  		return true
  4756  	}
  4757  	// match: (ShiftAllLeftInt8x16 x y)
  4758  	// result: (SelectV (I8x16Shl x y) (V128Xor x x) (I64LtU y (I64Const [8])))
  4759  	for {
  4760  		x := v_0
  4761  		y := v_1
  4762  		v.Reset(ssaop.OpWasmSelectV)
  4763  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16Shl, typ.Vec128)
  4764  		v0.AddArg2(x, y)
  4765  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4766  		v1.AddArg2(x, x)
  4767  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4768  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4769  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  4770  		v2.AddArg2(y, v3)
  4771  		v.AddArg3(v0, v1, v2)
  4772  		return true
  4773  	}
  4774  }
  4775  func rewriteValue_OpShiftAllLeftUint16x8(v *ssa.Value) bool {
  4776  	v_1 := v.Args[1]
  4777  	v_0 := v.Args[0]
  4778  	b := v.Block
  4779  	typ := &b.Func.Config.Types
  4780  	// match: (ShiftAllLeftUint16x8 x d:(Const64 [c]))
  4781  	// cond: uint64(c) < 16
  4782  	// result: (I16x8Shl x (I64Const [c]))
  4783  	for {
  4784  		x := v_0
  4785  		d := v_1
  4786  		if d.Op != ssaop.OpConst64 {
  4787  			break
  4788  		}
  4789  		c := ssa.AuxIntToInt64(d.AuxInt)
  4790  		if !(uint64(c) < 16) {
  4791  			break
  4792  		}
  4793  		v.Reset(ssaop.OpWasmI16x8Shl)
  4794  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4795  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4796  		v.AddArg2(x, v0)
  4797  		return true
  4798  	}
  4799  	// match: (ShiftAllLeftUint16x8 x d:(I64Const [c]))
  4800  	// cond: uint64(c) < 16
  4801  	// result: (I16x8Shl x d)
  4802  	for {
  4803  		x := v_0
  4804  		d := v_1
  4805  		if d.Op != ssaop.OpWasmI64Const {
  4806  			break
  4807  		}
  4808  		c := ssa.AuxIntToInt64(d.AuxInt)
  4809  		if !(uint64(c) < 16) {
  4810  			break
  4811  		}
  4812  		v.Reset(ssaop.OpWasmI16x8Shl)
  4813  		v.AddArg2(x, d)
  4814  		return true
  4815  	}
  4816  	// match: (ShiftAllLeftUint16x8 x y)
  4817  	// result: (SelectV (I16x8Shl x y) (V128Xor x x) (I64LtU y (I64Const [16])))
  4818  	for {
  4819  		x := v_0
  4820  		y := v_1
  4821  		v.Reset(ssaop.OpWasmSelectV)
  4822  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8Shl, typ.Vec128)
  4823  		v0.AddArg2(x, y)
  4824  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4825  		v1.AddArg2(x, x)
  4826  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4827  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4828  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  4829  		v2.AddArg2(y, v3)
  4830  		v.AddArg3(v0, v1, v2)
  4831  		return true
  4832  	}
  4833  }
  4834  func rewriteValue_OpShiftAllLeftUint32x4(v *ssa.Value) bool {
  4835  	v_1 := v.Args[1]
  4836  	v_0 := v.Args[0]
  4837  	b := v.Block
  4838  	typ := &b.Func.Config.Types
  4839  	// match: (ShiftAllLeftUint32x4 x d:(Const64 [c]))
  4840  	// cond: uint64(c) < 32
  4841  	// result: (I32x4Shl x (I64Const [c]))
  4842  	for {
  4843  		x := v_0
  4844  		d := v_1
  4845  		if d.Op != ssaop.OpConst64 {
  4846  			break
  4847  		}
  4848  		c := ssa.AuxIntToInt64(d.AuxInt)
  4849  		if !(uint64(c) < 32) {
  4850  			break
  4851  		}
  4852  		v.Reset(ssaop.OpWasmI32x4Shl)
  4853  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4854  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4855  		v.AddArg2(x, v0)
  4856  		return true
  4857  	}
  4858  	// match: (ShiftAllLeftUint32x4 x d:(I64Const [c]))
  4859  	// cond: uint64(c) < 32
  4860  	// result: (I32x4Shl x d)
  4861  	for {
  4862  		x := v_0
  4863  		d := v_1
  4864  		if d.Op != ssaop.OpWasmI64Const {
  4865  			break
  4866  		}
  4867  		c := ssa.AuxIntToInt64(d.AuxInt)
  4868  		if !(uint64(c) < 32) {
  4869  			break
  4870  		}
  4871  		v.Reset(ssaop.OpWasmI32x4Shl)
  4872  		v.AddArg2(x, d)
  4873  		return true
  4874  	}
  4875  	// match: (ShiftAllLeftUint32x4 x y)
  4876  	// result: (SelectV (I32x4Shl x y) (V128Xor x x) (I64LtU y (I64Const [32])))
  4877  	for {
  4878  		x := v_0
  4879  		y := v_1
  4880  		v.Reset(ssaop.OpWasmSelectV)
  4881  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4Shl, typ.Vec128)
  4882  		v0.AddArg2(x, y)
  4883  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4884  		v1.AddArg2(x, x)
  4885  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4886  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4887  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  4888  		v2.AddArg2(y, v3)
  4889  		v.AddArg3(v0, v1, v2)
  4890  		return true
  4891  	}
  4892  }
  4893  func rewriteValue_OpShiftAllLeftUint64x2(v *ssa.Value) bool {
  4894  	v_1 := v.Args[1]
  4895  	v_0 := v.Args[0]
  4896  	b := v.Block
  4897  	typ := &b.Func.Config.Types
  4898  	// match: (ShiftAllLeftUint64x2 x d:(Const64 [c]))
  4899  	// cond: uint64(c) < 64
  4900  	// result: (I64x2Shl x (I64Const [c]))
  4901  	for {
  4902  		x := v_0
  4903  		d := v_1
  4904  		if d.Op != ssaop.OpConst64 {
  4905  			break
  4906  		}
  4907  		c := ssa.AuxIntToInt64(d.AuxInt)
  4908  		if !(uint64(c) < 64) {
  4909  			break
  4910  		}
  4911  		v.Reset(ssaop.OpWasmI64x2Shl)
  4912  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4913  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4914  		v.AddArg2(x, v0)
  4915  		return true
  4916  	}
  4917  	// match: (ShiftAllLeftUint64x2 x d:(I64Const [c]))
  4918  	// cond: uint64(c) < 64
  4919  	// result: (I64x2Shl x d)
  4920  	for {
  4921  		x := v_0
  4922  		d := v_1
  4923  		if d.Op != ssaop.OpWasmI64Const {
  4924  			break
  4925  		}
  4926  		c := ssa.AuxIntToInt64(d.AuxInt)
  4927  		if !(uint64(c) < 64) {
  4928  			break
  4929  		}
  4930  		v.Reset(ssaop.OpWasmI64x2Shl)
  4931  		v.AddArg2(x, d)
  4932  		return true
  4933  	}
  4934  	// match: (ShiftAllLeftUint64x2 x y)
  4935  	// result: (SelectV (I64x2Shl x y) (V128Xor x x) (I64LtU y (I64Const [64])))
  4936  	for {
  4937  		x := v_0
  4938  		y := v_1
  4939  		v.Reset(ssaop.OpWasmSelectV)
  4940  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2Shl, typ.Vec128)
  4941  		v0.AddArg2(x, y)
  4942  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  4943  		v1.AddArg2(x, x)
  4944  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  4945  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4946  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  4947  		v2.AddArg2(y, v3)
  4948  		v.AddArg3(v0, v1, v2)
  4949  		return true
  4950  	}
  4951  }
  4952  func rewriteValue_OpShiftAllLeftUint8x16(v *ssa.Value) bool {
  4953  	v_1 := v.Args[1]
  4954  	v_0 := v.Args[0]
  4955  	b := v.Block
  4956  	typ := &b.Func.Config.Types
  4957  	// match: (ShiftAllLeftUint8x16 x d:(Const64 [c]))
  4958  	// cond: uint64(c) < 8
  4959  	// result: (I8x16Shl x (I64Const [c]))
  4960  	for {
  4961  		x := v_0
  4962  		d := v_1
  4963  		if d.Op != ssaop.OpConst64 {
  4964  			break
  4965  		}
  4966  		c := ssa.AuxIntToInt64(d.AuxInt)
  4967  		if !(uint64(c) < 8) {
  4968  			break
  4969  		}
  4970  		v.Reset(ssaop.OpWasmI8x16Shl)
  4971  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  4972  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  4973  		v.AddArg2(x, v0)
  4974  		return true
  4975  	}
  4976  	// match: (ShiftAllLeftUint8x16 x d:(I64Const [c]))
  4977  	// cond: uint64(c) < 8
  4978  	// result: (I8x16Shl x d)
  4979  	for {
  4980  		x := v_0
  4981  		d := v_1
  4982  		if d.Op != ssaop.OpWasmI64Const {
  4983  			break
  4984  		}
  4985  		c := ssa.AuxIntToInt64(d.AuxInt)
  4986  		if !(uint64(c) < 8) {
  4987  			break
  4988  		}
  4989  		v.Reset(ssaop.OpWasmI8x16Shl)
  4990  		v.AddArg2(x, d)
  4991  		return true
  4992  	}
  4993  	// match: (ShiftAllLeftUint8x16 x y)
  4994  	// result: (SelectV (I8x16Shl x y) (V128Xor x x) (I64LtU y (I64Const [8])))
  4995  	for {
  4996  		x := v_0
  4997  		y := v_1
  4998  		v.Reset(ssaop.OpWasmSelectV)
  4999  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16Shl, typ.Vec128)
  5000  		v0.AddArg2(x, y)
  5001  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  5002  		v1.AddArg2(x, x)
  5003  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5004  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5005  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  5006  		v2.AddArg2(y, v3)
  5007  		v.AddArg3(v0, v1, v2)
  5008  		return true
  5009  	}
  5010  }
  5011  func rewriteValue_OpShiftAllRightInt16x8(v *ssa.Value) bool {
  5012  	v_1 := v.Args[1]
  5013  	v_0 := v.Args[0]
  5014  	b := v.Block
  5015  	typ := &b.Func.Config.Types
  5016  	// match: (ShiftAllRightInt16x8 x d:(Const64 [c]))
  5017  	// cond: uint64(c) < 16
  5018  	// result: (I16x8ShrS x (I64Const [c]))
  5019  	for {
  5020  		x := v_0
  5021  		d := v_1
  5022  		if d.Op != ssaop.OpConst64 {
  5023  			break
  5024  		}
  5025  		c := ssa.AuxIntToInt64(d.AuxInt)
  5026  		if !(uint64(c) < 16) {
  5027  			break
  5028  		}
  5029  		v.Reset(ssaop.OpWasmI16x8ShrS)
  5030  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5031  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5032  		v.AddArg2(x, v0)
  5033  		return true
  5034  	}
  5035  	// match: (ShiftAllRightInt16x8 x d:(I64Const [c]))
  5036  	// cond: uint64(c) < 16
  5037  	// result: (I16x8ShrS x d)
  5038  	for {
  5039  		x := v_0
  5040  		d := v_1
  5041  		if d.Op != ssaop.OpWasmI64Const {
  5042  			break
  5043  		}
  5044  		c := ssa.AuxIntToInt64(d.AuxInt)
  5045  		if !(uint64(c) < 16) {
  5046  			break
  5047  		}
  5048  		v.Reset(ssaop.OpWasmI16x8ShrS)
  5049  		v.AddArg2(x, d)
  5050  		return true
  5051  	}
  5052  	// match: (ShiftAllRightInt16x8 x y)
  5053  	// result: (SelectV (I16x8ShrS x y) (I16x8ShrS x (I64Const [15])) (I64LtU y (I64Const [16])))
  5054  	for {
  5055  		x := v_0
  5056  		y := v_1
  5057  		v.Reset(ssaop.OpWasmSelectV)
  5058  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrS, typ.Vec128)
  5059  		v0.AddArg2(x, y)
  5060  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrS, typ.Vec128)
  5061  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5062  		v2.AuxInt = ssa.Int64ToAuxInt(15)
  5063  		v1.AddArg2(x, v2)
  5064  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5065  		v4 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5066  		v4.AuxInt = ssa.Int64ToAuxInt(16)
  5067  		v3.AddArg2(y, v4)
  5068  		v.AddArg3(v0, v1, v3)
  5069  		return true
  5070  	}
  5071  }
  5072  func rewriteValue_OpShiftAllRightInt32x4(v *ssa.Value) bool {
  5073  	v_1 := v.Args[1]
  5074  	v_0 := v.Args[0]
  5075  	b := v.Block
  5076  	typ := &b.Func.Config.Types
  5077  	// match: (ShiftAllRightInt32x4 x d:(Const64 [c]))
  5078  	// cond: uint64(c) < 32
  5079  	// result: (I32x4ShrS x (I64Const [c]))
  5080  	for {
  5081  		x := v_0
  5082  		d := v_1
  5083  		if d.Op != ssaop.OpConst64 {
  5084  			break
  5085  		}
  5086  		c := ssa.AuxIntToInt64(d.AuxInt)
  5087  		if !(uint64(c) < 32) {
  5088  			break
  5089  		}
  5090  		v.Reset(ssaop.OpWasmI32x4ShrS)
  5091  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5092  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5093  		v.AddArg2(x, v0)
  5094  		return true
  5095  	}
  5096  	// match: (ShiftAllRightInt32x4 x d:(I64Const [c]))
  5097  	// cond: uint64(c) < 32
  5098  	// result: (I32x4ShrS x d)
  5099  	for {
  5100  		x := v_0
  5101  		d := v_1
  5102  		if d.Op != ssaop.OpWasmI64Const {
  5103  			break
  5104  		}
  5105  		c := ssa.AuxIntToInt64(d.AuxInt)
  5106  		if !(uint64(c) < 32) {
  5107  			break
  5108  		}
  5109  		v.Reset(ssaop.OpWasmI32x4ShrS)
  5110  		v.AddArg2(x, d)
  5111  		return true
  5112  	}
  5113  	// match: (ShiftAllRightInt32x4 x y)
  5114  	// result: (SelectV (I32x4ShrS x y) (I32x4ShrS x (I64Const [31])) (I64LtU y (I64Const [32])))
  5115  	for {
  5116  		x := v_0
  5117  		y := v_1
  5118  		v.Reset(ssaop.OpWasmSelectV)
  5119  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrS, typ.Vec128)
  5120  		v0.AddArg2(x, y)
  5121  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrS, typ.Vec128)
  5122  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5123  		v2.AuxInt = ssa.Int64ToAuxInt(31)
  5124  		v1.AddArg2(x, v2)
  5125  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5126  		v4 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5127  		v4.AuxInt = ssa.Int64ToAuxInt(32)
  5128  		v3.AddArg2(y, v4)
  5129  		v.AddArg3(v0, v1, v3)
  5130  		return true
  5131  	}
  5132  }
  5133  func rewriteValue_OpShiftAllRightInt64x2(v *ssa.Value) bool {
  5134  	v_1 := v.Args[1]
  5135  	v_0 := v.Args[0]
  5136  	b := v.Block
  5137  	typ := &b.Func.Config.Types
  5138  	// match: (ShiftAllRightInt64x2 x d:(Const64 [c]))
  5139  	// cond: uint64(c) < 64
  5140  	// result: (I64x2ShrS x (I64Const [c]))
  5141  	for {
  5142  		x := v_0
  5143  		d := v_1
  5144  		if d.Op != ssaop.OpConst64 {
  5145  			break
  5146  		}
  5147  		c := ssa.AuxIntToInt64(d.AuxInt)
  5148  		if !(uint64(c) < 64) {
  5149  			break
  5150  		}
  5151  		v.Reset(ssaop.OpWasmI64x2ShrS)
  5152  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5153  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5154  		v.AddArg2(x, v0)
  5155  		return true
  5156  	}
  5157  	// match: (ShiftAllRightInt64x2 x d:(I64Const [c]))
  5158  	// cond: uint64(c) < 64
  5159  	// result: (I64x2ShrS x d)
  5160  	for {
  5161  		x := v_0
  5162  		d := v_1
  5163  		if d.Op != ssaop.OpWasmI64Const {
  5164  			break
  5165  		}
  5166  		c := ssa.AuxIntToInt64(d.AuxInt)
  5167  		if !(uint64(c) < 64) {
  5168  			break
  5169  		}
  5170  		v.Reset(ssaop.OpWasmI64x2ShrS)
  5171  		v.AddArg2(x, d)
  5172  		return true
  5173  	}
  5174  	// match: (ShiftAllRightInt64x2 x y)
  5175  	// result: (SelectV (I64x2ShrS x y) (I64x2ShrS x (I64Const [63])) (I64LtU y (I64Const [64])))
  5176  	for {
  5177  		x := v_0
  5178  		y := v_1
  5179  		v.Reset(ssaop.OpWasmSelectV)
  5180  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrS, typ.Vec128)
  5181  		v0.AddArg2(x, y)
  5182  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrS, typ.Vec128)
  5183  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5184  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  5185  		v1.AddArg2(x, v2)
  5186  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5187  		v4 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5188  		v4.AuxInt = ssa.Int64ToAuxInt(64)
  5189  		v3.AddArg2(y, v4)
  5190  		v.AddArg3(v0, v1, v3)
  5191  		return true
  5192  	}
  5193  }
  5194  func rewriteValue_OpShiftAllRightInt8x16(v *ssa.Value) bool {
  5195  	v_1 := v.Args[1]
  5196  	v_0 := v.Args[0]
  5197  	b := v.Block
  5198  	typ := &b.Func.Config.Types
  5199  	// match: (ShiftAllRightInt8x16 x d:(Const64 [c]))
  5200  	// cond: uint64(c) < 8
  5201  	// result: (I8x16ShrS x (I64Const [c]))
  5202  	for {
  5203  		x := v_0
  5204  		d := v_1
  5205  		if d.Op != ssaop.OpConst64 {
  5206  			break
  5207  		}
  5208  		c := ssa.AuxIntToInt64(d.AuxInt)
  5209  		if !(uint64(c) < 8) {
  5210  			break
  5211  		}
  5212  		v.Reset(ssaop.OpWasmI8x16ShrS)
  5213  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5214  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5215  		v.AddArg2(x, v0)
  5216  		return true
  5217  	}
  5218  	// match: (ShiftAllRightInt8x16 x d:(I64Const [c]))
  5219  	// cond: uint64(c) < 8
  5220  	// result: (I8x16ShrS x d)
  5221  	for {
  5222  		x := v_0
  5223  		d := v_1
  5224  		if d.Op != ssaop.OpWasmI64Const {
  5225  			break
  5226  		}
  5227  		c := ssa.AuxIntToInt64(d.AuxInt)
  5228  		if !(uint64(c) < 8) {
  5229  			break
  5230  		}
  5231  		v.Reset(ssaop.OpWasmI8x16ShrS)
  5232  		v.AddArg2(x, d)
  5233  		return true
  5234  	}
  5235  	// match: (ShiftAllRightInt8x16 x y)
  5236  	// result: (SelectV (I8x16ShrS x y) (I8x16ShrS x (I64Const [7])) (I64LtU y (I64Const [8])))
  5237  	for {
  5238  		x := v_0
  5239  		y := v_1
  5240  		v.Reset(ssaop.OpWasmSelectV)
  5241  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrS, typ.Vec128)
  5242  		v0.AddArg2(x, y)
  5243  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrS, typ.Vec128)
  5244  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5245  		v2.AuxInt = ssa.Int64ToAuxInt(7)
  5246  		v1.AddArg2(x, v2)
  5247  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5248  		v4 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5249  		v4.AuxInt = ssa.Int64ToAuxInt(8)
  5250  		v3.AddArg2(y, v4)
  5251  		v.AddArg3(v0, v1, v3)
  5252  		return true
  5253  	}
  5254  }
  5255  func rewriteValue_OpShiftAllRightUint16x8(v *ssa.Value) bool {
  5256  	v_1 := v.Args[1]
  5257  	v_0 := v.Args[0]
  5258  	b := v.Block
  5259  	typ := &b.Func.Config.Types
  5260  	// match: (ShiftAllRightUint16x8 x d:(Const64 [c]))
  5261  	// cond: uint64(c) < 16
  5262  	// result: (I16x8ShrU x (I64Const [c]))
  5263  	for {
  5264  		x := v_0
  5265  		d := v_1
  5266  		if d.Op != ssaop.OpConst64 {
  5267  			break
  5268  		}
  5269  		c := ssa.AuxIntToInt64(d.AuxInt)
  5270  		if !(uint64(c) < 16) {
  5271  			break
  5272  		}
  5273  		v.Reset(ssaop.OpWasmI16x8ShrU)
  5274  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5275  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5276  		v.AddArg2(x, v0)
  5277  		return true
  5278  	}
  5279  	// match: (ShiftAllRightUint16x8 x d:(I64Const [c]))
  5280  	// cond: uint64(c) < 16
  5281  	// result: (I16x8ShrU x d)
  5282  	for {
  5283  		x := v_0
  5284  		d := v_1
  5285  		if d.Op != ssaop.OpWasmI64Const {
  5286  			break
  5287  		}
  5288  		c := ssa.AuxIntToInt64(d.AuxInt)
  5289  		if !(uint64(c) < 16) {
  5290  			break
  5291  		}
  5292  		v.Reset(ssaop.OpWasmI16x8ShrU)
  5293  		v.AddArg2(x, d)
  5294  		return true
  5295  	}
  5296  	// match: (ShiftAllRightUint16x8 x y)
  5297  	// result: (SelectV (I16x8ShrU x y) (V128Xor x x) (I64LtU y (I64Const [16])))
  5298  	for {
  5299  		x := v_0
  5300  		y := v_1
  5301  		v.Reset(ssaop.OpWasmSelectV)
  5302  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI16x8ShrU, typ.Vec128)
  5303  		v0.AddArg2(x, y)
  5304  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  5305  		v1.AddArg2(x, x)
  5306  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5307  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5308  		v3.AuxInt = ssa.Int64ToAuxInt(16)
  5309  		v2.AddArg2(y, v3)
  5310  		v.AddArg3(v0, v1, v2)
  5311  		return true
  5312  	}
  5313  }
  5314  func rewriteValue_OpShiftAllRightUint32x4(v *ssa.Value) bool {
  5315  	v_1 := v.Args[1]
  5316  	v_0 := v.Args[0]
  5317  	b := v.Block
  5318  	typ := &b.Func.Config.Types
  5319  	// match: (ShiftAllRightUint32x4 x d:(Const64 [c]))
  5320  	// cond: uint64(c) < 32
  5321  	// result: (I32x4ShrU x (I64Const [c]))
  5322  	for {
  5323  		x := v_0
  5324  		d := v_1
  5325  		if d.Op != ssaop.OpConst64 {
  5326  			break
  5327  		}
  5328  		c := ssa.AuxIntToInt64(d.AuxInt)
  5329  		if !(uint64(c) < 32) {
  5330  			break
  5331  		}
  5332  		v.Reset(ssaop.OpWasmI32x4ShrU)
  5333  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5334  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5335  		v.AddArg2(x, v0)
  5336  		return true
  5337  	}
  5338  	// match: (ShiftAllRightUint32x4 x d:(I64Const [c]))
  5339  	// cond: uint64(c) < 32
  5340  	// result: (I32x4ShrU x d)
  5341  	for {
  5342  		x := v_0
  5343  		d := v_1
  5344  		if d.Op != ssaop.OpWasmI64Const {
  5345  			break
  5346  		}
  5347  		c := ssa.AuxIntToInt64(d.AuxInt)
  5348  		if !(uint64(c) < 32) {
  5349  			break
  5350  		}
  5351  		v.Reset(ssaop.OpWasmI32x4ShrU)
  5352  		v.AddArg2(x, d)
  5353  		return true
  5354  	}
  5355  	// match: (ShiftAllRightUint32x4 x y)
  5356  	// result: (SelectV (I32x4ShrU x y) (V128Xor x x) (I64LtU y (I64Const [32])))
  5357  	for {
  5358  		x := v_0
  5359  		y := v_1
  5360  		v.Reset(ssaop.OpWasmSelectV)
  5361  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI32x4ShrU, typ.Vec128)
  5362  		v0.AddArg2(x, y)
  5363  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  5364  		v1.AddArg2(x, x)
  5365  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5366  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5367  		v3.AuxInt = ssa.Int64ToAuxInt(32)
  5368  		v2.AddArg2(y, v3)
  5369  		v.AddArg3(v0, v1, v2)
  5370  		return true
  5371  	}
  5372  }
  5373  func rewriteValue_OpShiftAllRightUint64x2(v *ssa.Value) bool {
  5374  	v_1 := v.Args[1]
  5375  	v_0 := v.Args[0]
  5376  	b := v.Block
  5377  	typ := &b.Func.Config.Types
  5378  	// match: (ShiftAllRightUint64x2 x d:(Const64 [c]))
  5379  	// cond: uint64(c) < 64
  5380  	// result: (I64x2ShrU x (I64Const [c]))
  5381  	for {
  5382  		x := v_0
  5383  		d := v_1
  5384  		if d.Op != ssaop.OpConst64 {
  5385  			break
  5386  		}
  5387  		c := ssa.AuxIntToInt64(d.AuxInt)
  5388  		if !(uint64(c) < 64) {
  5389  			break
  5390  		}
  5391  		v.Reset(ssaop.OpWasmI64x2ShrU)
  5392  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5393  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5394  		v.AddArg2(x, v0)
  5395  		return true
  5396  	}
  5397  	// match: (ShiftAllRightUint64x2 x d:(I64Const [c]))
  5398  	// cond: uint64(c) < 64
  5399  	// result: (I64x2ShrU x d)
  5400  	for {
  5401  		x := v_0
  5402  		d := v_1
  5403  		if d.Op != ssaop.OpWasmI64Const {
  5404  			break
  5405  		}
  5406  		c := ssa.AuxIntToInt64(d.AuxInt)
  5407  		if !(uint64(c) < 64) {
  5408  			break
  5409  		}
  5410  		v.Reset(ssaop.OpWasmI64x2ShrU)
  5411  		v.AddArg2(x, d)
  5412  		return true
  5413  	}
  5414  	// match: (ShiftAllRightUint64x2 x y)
  5415  	// result: (SelectV (I64x2ShrU x y) (V128Xor x x) (I64LtU y (I64Const [64])))
  5416  	for {
  5417  		x := v_0
  5418  		y := v_1
  5419  		v.Reset(ssaop.OpWasmSelectV)
  5420  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64x2ShrU, typ.Vec128)
  5421  		v0.AddArg2(x, y)
  5422  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  5423  		v1.AddArg2(x, x)
  5424  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5425  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5426  		v3.AuxInt = ssa.Int64ToAuxInt(64)
  5427  		v2.AddArg2(y, v3)
  5428  		v.AddArg3(v0, v1, v2)
  5429  		return true
  5430  	}
  5431  }
  5432  func rewriteValue_OpShiftAllRightUint8x16(v *ssa.Value) bool {
  5433  	v_1 := v.Args[1]
  5434  	v_0 := v.Args[0]
  5435  	b := v.Block
  5436  	typ := &b.Func.Config.Types
  5437  	// match: (ShiftAllRightUint8x16 x d:(Const64 [c]))
  5438  	// cond: uint64(c) < 8
  5439  	// result: (I8x16ShrU x (I64Const [c]))
  5440  	for {
  5441  		x := v_0
  5442  		d := v_1
  5443  		if d.Op != ssaop.OpConst64 {
  5444  			break
  5445  		}
  5446  		c := ssa.AuxIntToInt64(d.AuxInt)
  5447  		if !(uint64(c) < 8) {
  5448  			break
  5449  		}
  5450  		v.Reset(ssaop.OpWasmI8x16ShrU)
  5451  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5452  		v0.AuxInt = ssa.Int64ToAuxInt(c)
  5453  		v.AddArg2(x, v0)
  5454  		return true
  5455  	}
  5456  	// match: (ShiftAllRightUint8x16 x d:(I64Const [c]))
  5457  	// cond: uint64(c) < 8
  5458  	// result: (I8x16ShrU x d)
  5459  	for {
  5460  		x := v_0
  5461  		d := v_1
  5462  		if d.Op != ssaop.OpWasmI64Const {
  5463  			break
  5464  		}
  5465  		c := ssa.AuxIntToInt64(d.AuxInt)
  5466  		if !(uint64(c) < 8) {
  5467  			break
  5468  		}
  5469  		v.Reset(ssaop.OpWasmI8x16ShrU)
  5470  		v.AddArg2(x, d)
  5471  		return true
  5472  	}
  5473  	// match: (ShiftAllRightUint8x16 x y)
  5474  	// result: (SelectV (I8x16ShrU x y) (V128Xor x x) (I64LtU y (I64Const [8])))
  5475  	for {
  5476  		x := v_0
  5477  		y := v_1
  5478  		v.Reset(ssaop.OpWasmSelectV)
  5479  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI8x16ShrU, typ.Vec128)
  5480  		v0.AddArg2(x, y)
  5481  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmV128Xor, typ.Vec128)
  5482  		v1.AddArg2(x, x)
  5483  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64LtU, typ.Bool)
  5484  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5485  		v3.AuxInt = ssa.Int64ToAuxInt(8)
  5486  		v2.AddArg2(y, v3)
  5487  		v.AddArg3(v0, v1, v2)
  5488  		return true
  5489  	}
  5490  }
  5491  func rewriteValue_OpSignExt16to32(v *ssa.Value) bool {
  5492  	v_0 := v.Args[0]
  5493  	// match: (SignExt16to32 x:(I64Load16S _ _))
  5494  	// result: x
  5495  	for {
  5496  		x := v_0
  5497  		if x.Op != ssaop.OpWasmI64Load16S {
  5498  			break
  5499  		}
  5500  		v.CopyOf(x)
  5501  		return true
  5502  	}
  5503  	// match: (SignExt16to32 x)
  5504  	// result: (I64Extend16S x)
  5505  	for {
  5506  		x := v_0
  5507  		v.Reset(ssaop.OpWasmI64Extend16S)
  5508  		v.AddArg(x)
  5509  		return true
  5510  	}
  5511  }
  5512  func rewriteValue_OpSignExt16to64(v *ssa.Value) bool {
  5513  	v_0 := v.Args[0]
  5514  	// match: (SignExt16to64 x:(I64Load16S _ _))
  5515  	// result: x
  5516  	for {
  5517  		x := v_0
  5518  		if x.Op != ssaop.OpWasmI64Load16S {
  5519  			break
  5520  		}
  5521  		v.CopyOf(x)
  5522  		return true
  5523  	}
  5524  	// match: (SignExt16to64 x)
  5525  	// result: (I64Extend16S x)
  5526  	for {
  5527  		x := v_0
  5528  		v.Reset(ssaop.OpWasmI64Extend16S)
  5529  		v.AddArg(x)
  5530  		return true
  5531  	}
  5532  }
  5533  func rewriteValue_OpSignExt32to64(v *ssa.Value) bool {
  5534  	v_0 := v.Args[0]
  5535  	// match: (SignExt32to64 x:(I64Load32S _ _))
  5536  	// result: x
  5537  	for {
  5538  		x := v_0
  5539  		if x.Op != ssaop.OpWasmI64Load32S {
  5540  			break
  5541  		}
  5542  		v.CopyOf(x)
  5543  		return true
  5544  	}
  5545  	// match: (SignExt32to64 x)
  5546  	// result: (I64Extend32S x)
  5547  	for {
  5548  		x := v_0
  5549  		v.Reset(ssaop.OpWasmI64Extend32S)
  5550  		v.AddArg(x)
  5551  		return true
  5552  	}
  5553  }
  5554  func rewriteValue_OpSignExt8to16(v *ssa.Value) bool {
  5555  	v_0 := v.Args[0]
  5556  	// match: (SignExt8to16 x:(I64Load8S _ _))
  5557  	// result: x
  5558  	for {
  5559  		x := v_0
  5560  		if x.Op != ssaop.OpWasmI64Load8S {
  5561  			break
  5562  		}
  5563  		v.CopyOf(x)
  5564  		return true
  5565  	}
  5566  	// match: (SignExt8to16 x)
  5567  	// result: (I64Extend8S x)
  5568  	for {
  5569  		x := v_0
  5570  		v.Reset(ssaop.OpWasmI64Extend8S)
  5571  		v.AddArg(x)
  5572  		return true
  5573  	}
  5574  }
  5575  func rewriteValue_OpSignExt8to32(v *ssa.Value) bool {
  5576  	v_0 := v.Args[0]
  5577  	// match: (SignExt8to32 x:(I64Load8S _ _))
  5578  	// result: x
  5579  	for {
  5580  		x := v_0
  5581  		if x.Op != ssaop.OpWasmI64Load8S {
  5582  			break
  5583  		}
  5584  		v.CopyOf(x)
  5585  		return true
  5586  	}
  5587  	// match: (SignExt8to32 x)
  5588  	// result: (I64Extend8S x)
  5589  	for {
  5590  		x := v_0
  5591  		v.Reset(ssaop.OpWasmI64Extend8S)
  5592  		v.AddArg(x)
  5593  		return true
  5594  	}
  5595  }
  5596  func rewriteValue_OpSignExt8to64(v *ssa.Value) bool {
  5597  	v_0 := v.Args[0]
  5598  	// match: (SignExt8to64 x:(I64Load8S _ _))
  5599  	// result: x
  5600  	for {
  5601  		x := v_0
  5602  		if x.Op != ssaop.OpWasmI64Load8S {
  5603  			break
  5604  		}
  5605  		v.CopyOf(x)
  5606  		return true
  5607  	}
  5608  	// match: (SignExt8to64 x)
  5609  	// result: (I64Extend8S x)
  5610  	for {
  5611  		x := v_0
  5612  		v.Reset(ssaop.OpWasmI64Extend8S)
  5613  		v.AddArg(x)
  5614  		return true
  5615  	}
  5616  }
  5617  func rewriteValue_OpSlicemask(v *ssa.Value) bool {
  5618  	v_0 := v.Args[0]
  5619  	b := v.Block
  5620  	typ := &b.Func.Config.Types
  5621  	// match: (Slicemask x)
  5622  	// result: (I64ShrS (I64Sub (I64Const [0]) x) (I64Const [63]))
  5623  	for {
  5624  		x := v_0
  5625  		v.Reset(ssaop.OpWasmI64ShrS)
  5626  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Sub, typ.Int64)
  5627  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5628  		v1.AuxInt = ssa.Int64ToAuxInt(0)
  5629  		v0.AddArg2(v1, x)
  5630  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5631  		v2.AuxInt = ssa.Int64ToAuxInt(63)
  5632  		v.AddArg2(v0, v2)
  5633  		return true
  5634  	}
  5635  }
  5636  func rewriteValue_OpStore(v *ssa.Value) bool {
  5637  	v_2 := v.Args[2]
  5638  	v_1 := v.Args[1]
  5639  	v_0 := v.Args[0]
  5640  	// match: (Store {t} ptr val mem)
  5641  	// cond: ssa.Is64BitFloat(t)
  5642  	// result: (F64Store ptr val mem)
  5643  	for {
  5644  		t := ssa.AuxToType(v.Aux)
  5645  		ptr := v_0
  5646  		val := v_1
  5647  		mem := v_2
  5648  		if !(ssa.Is64BitFloat(t)) {
  5649  			break
  5650  		}
  5651  		v.Reset(ssaop.OpWasmF64Store)
  5652  		v.AddArg3(ptr, val, mem)
  5653  		return true
  5654  	}
  5655  	// match: (Store {t} ptr val mem)
  5656  	// cond: ssa.Is32BitFloat(t)
  5657  	// result: (F32Store ptr val mem)
  5658  	for {
  5659  		t := ssa.AuxToType(v.Aux)
  5660  		ptr := v_0
  5661  		val := v_1
  5662  		mem := v_2
  5663  		if !(ssa.Is32BitFloat(t)) {
  5664  			break
  5665  		}
  5666  		v.Reset(ssaop.OpWasmF32Store)
  5667  		v.AddArg3(ptr, val, mem)
  5668  		return true
  5669  	}
  5670  	// match: (Store {t} ptr val mem)
  5671  	// cond: t.Size() == 16
  5672  	// result: (V128Store ptr val mem)
  5673  	for {
  5674  		t := ssa.AuxToType(v.Aux)
  5675  		ptr := v_0
  5676  		val := v_1
  5677  		mem := v_2
  5678  		if !(t.Size() == 16) {
  5679  			break
  5680  		}
  5681  		v.Reset(ssaop.OpWasmV128Store)
  5682  		v.AddArg3(ptr, val, mem)
  5683  		return true
  5684  	}
  5685  	// match: (Store {t} ptr val mem)
  5686  	// cond: t.Size() == 8
  5687  	// result: (I64Store ptr val mem)
  5688  	for {
  5689  		t := ssa.AuxToType(v.Aux)
  5690  		ptr := v_0
  5691  		val := v_1
  5692  		mem := v_2
  5693  		if !(t.Size() == 8) {
  5694  			break
  5695  		}
  5696  		v.Reset(ssaop.OpWasmI64Store)
  5697  		v.AddArg3(ptr, val, mem)
  5698  		return true
  5699  	}
  5700  	// match: (Store {t} ptr val mem)
  5701  	// cond: t.Size() == 4
  5702  	// result: (I64Store32 ptr val mem)
  5703  	for {
  5704  		t := ssa.AuxToType(v.Aux)
  5705  		ptr := v_0
  5706  		val := v_1
  5707  		mem := v_2
  5708  		if !(t.Size() == 4) {
  5709  			break
  5710  		}
  5711  		v.Reset(ssaop.OpWasmI64Store32)
  5712  		v.AddArg3(ptr, val, mem)
  5713  		return true
  5714  	}
  5715  	// match: (Store {t} ptr val mem)
  5716  	// cond: t.Size() == 2
  5717  	// result: (I64Store16 ptr val mem)
  5718  	for {
  5719  		t := ssa.AuxToType(v.Aux)
  5720  		ptr := v_0
  5721  		val := v_1
  5722  		mem := v_2
  5723  		if !(t.Size() == 2) {
  5724  			break
  5725  		}
  5726  		v.Reset(ssaop.OpWasmI64Store16)
  5727  		v.AddArg3(ptr, val, mem)
  5728  		return true
  5729  	}
  5730  	// match: (Store {t} ptr val mem)
  5731  	// cond: t.Size() == 1
  5732  	// result: (I64Store8 ptr val mem)
  5733  	for {
  5734  		t := ssa.AuxToType(v.Aux)
  5735  		ptr := v_0
  5736  		val := v_1
  5737  		mem := v_2
  5738  		if !(t.Size() == 1) {
  5739  			break
  5740  		}
  5741  		v.Reset(ssaop.OpWasmI64Store8)
  5742  		v.AddArg3(ptr, val, mem)
  5743  		return true
  5744  	}
  5745  	return false
  5746  }
  5747  func rewriteValue_OpWasmF32DemoteF64(v *ssa.Value) bool {
  5748  	v_0 := v.Args[0]
  5749  	// match: (F32DemoteF64 (F64Sqrt (F64PromoteF32 x)))
  5750  	// result: (F32Sqrt x)
  5751  	for {
  5752  		if v_0.Op != ssaop.OpWasmF64Sqrt {
  5753  			break
  5754  		}
  5755  		v_0_0 := v_0.Args[0]
  5756  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5757  			break
  5758  		}
  5759  		x := v_0_0.Args[0]
  5760  		v.Reset(ssaop.OpWasmF32Sqrt)
  5761  		v.AddArg(x)
  5762  		return true
  5763  	}
  5764  	// match: (F32DemoteF64 (F64Trunc (F64PromoteF32 x)))
  5765  	// result: (F32Trunc x)
  5766  	for {
  5767  		if v_0.Op != ssaop.OpWasmF64Trunc {
  5768  			break
  5769  		}
  5770  		v_0_0 := v_0.Args[0]
  5771  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5772  			break
  5773  		}
  5774  		x := v_0_0.Args[0]
  5775  		v.Reset(ssaop.OpWasmF32Trunc)
  5776  		v.AddArg(x)
  5777  		return true
  5778  	}
  5779  	// match: (F32DemoteF64 (F64Ceil (F64PromoteF32 x)))
  5780  	// result: (F32Ceil x)
  5781  	for {
  5782  		if v_0.Op != ssaop.OpWasmF64Ceil {
  5783  			break
  5784  		}
  5785  		v_0_0 := v_0.Args[0]
  5786  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5787  			break
  5788  		}
  5789  		x := v_0_0.Args[0]
  5790  		v.Reset(ssaop.OpWasmF32Ceil)
  5791  		v.AddArg(x)
  5792  		return true
  5793  	}
  5794  	// match: (F32DemoteF64 (F64Floor (F64PromoteF32 x)))
  5795  	// result: (F32Floor x)
  5796  	for {
  5797  		if v_0.Op != ssaop.OpWasmF64Floor {
  5798  			break
  5799  		}
  5800  		v_0_0 := v_0.Args[0]
  5801  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5802  			break
  5803  		}
  5804  		x := v_0_0.Args[0]
  5805  		v.Reset(ssaop.OpWasmF32Floor)
  5806  		v.AddArg(x)
  5807  		return true
  5808  	}
  5809  	// match: (F32DemoteF64 (F64Nearest (F64PromoteF32 x)))
  5810  	// result: (F32Nearest x)
  5811  	for {
  5812  		if v_0.Op != ssaop.OpWasmF64Nearest {
  5813  			break
  5814  		}
  5815  		v_0_0 := v_0.Args[0]
  5816  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5817  			break
  5818  		}
  5819  		x := v_0_0.Args[0]
  5820  		v.Reset(ssaop.OpWasmF32Nearest)
  5821  		v.AddArg(x)
  5822  		return true
  5823  	}
  5824  	// match: (F32DemoteF64 (F64Abs (F64PromoteF32 x)))
  5825  	// result: (F32Abs x)
  5826  	for {
  5827  		if v_0.Op != ssaop.OpWasmF64Abs {
  5828  			break
  5829  		}
  5830  		v_0_0 := v_0.Args[0]
  5831  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5832  			break
  5833  		}
  5834  		x := v_0_0.Args[0]
  5835  		v.Reset(ssaop.OpWasmF32Abs)
  5836  		v.AddArg(x)
  5837  		return true
  5838  	}
  5839  	// match: (F32DemoteF64 (F64Copysign (F64PromoteF32 x) (F64PromoteF32 y)))
  5840  	// result: (F32Copysign x y)
  5841  	for {
  5842  		if v_0.Op != ssaop.OpWasmF64Copysign {
  5843  			break
  5844  		}
  5845  		_ = v_0.Args[1]
  5846  		v_0_0 := v_0.Args[0]
  5847  		if v_0_0.Op != ssaop.OpWasmF64PromoteF32 {
  5848  			break
  5849  		}
  5850  		x := v_0_0.Args[0]
  5851  		v_0_1 := v_0.Args[1]
  5852  		if v_0_1.Op != ssaop.OpWasmF64PromoteF32 {
  5853  			break
  5854  		}
  5855  		y := v_0_1.Args[0]
  5856  		v.Reset(ssaop.OpWasmF32Copysign)
  5857  		v.AddArg2(x, y)
  5858  		return true
  5859  	}
  5860  	return false
  5861  }
  5862  func rewriteValue_OpWasmF64Add(v *ssa.Value) bool {
  5863  	v_1 := v.Args[1]
  5864  	v_0 := v.Args[0]
  5865  	b := v.Block
  5866  	typ := &b.Func.Config.Types
  5867  	// match: (F64Add (F64Const [x]) (F64Const [y]))
  5868  	// result: (F64Const [x + y])
  5869  	for {
  5870  		if v_0.Op != ssaop.OpWasmF64Const {
  5871  			break
  5872  		}
  5873  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5874  		if v_1.Op != ssaop.OpWasmF64Const {
  5875  			break
  5876  		}
  5877  		y := ssa.AuxIntToFloat64(v_1.AuxInt)
  5878  		v.Reset(ssaop.OpWasmF64Const)
  5879  		v.AuxInt = ssa.Float64ToAuxInt(x + y)
  5880  		return true
  5881  	}
  5882  	// match: (F64Add (F64Const [x]) y)
  5883  	// cond: y.Op != ssaop.OpWasmF64Const
  5884  	// result: (F64Add y (F64Const [x]))
  5885  	for {
  5886  		if v_0.Op != ssaop.OpWasmF64Const {
  5887  			break
  5888  		}
  5889  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5890  		y := v_1
  5891  		if !(y.Op != ssaop.OpWasmF64Const) {
  5892  			break
  5893  		}
  5894  		v.Reset(ssaop.OpWasmF64Add)
  5895  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmF64Const, typ.Float64)
  5896  		v0.AuxInt = ssa.Float64ToAuxInt(x)
  5897  		v.AddArg2(y, v0)
  5898  		return true
  5899  	}
  5900  	return false
  5901  }
  5902  func rewriteValue_OpWasmF64Mul(v *ssa.Value) bool {
  5903  	v_1 := v.Args[1]
  5904  	v_0 := v.Args[0]
  5905  	b := v.Block
  5906  	typ := &b.Func.Config.Types
  5907  	// match: (F64Mul (F64Const [x]) (F64Const [y]))
  5908  	// cond: !math.IsNaN(x * y)
  5909  	// result: (F64Const [x * y])
  5910  	for {
  5911  		if v_0.Op != ssaop.OpWasmF64Const {
  5912  			break
  5913  		}
  5914  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5915  		if v_1.Op != ssaop.OpWasmF64Const {
  5916  			break
  5917  		}
  5918  		y := ssa.AuxIntToFloat64(v_1.AuxInt)
  5919  		if !(!math.IsNaN(x * y)) {
  5920  			break
  5921  		}
  5922  		v.Reset(ssaop.OpWasmF64Const)
  5923  		v.AuxInt = ssa.Float64ToAuxInt(x * y)
  5924  		return true
  5925  	}
  5926  	// match: (F64Mul (F64Const [x]) y)
  5927  	// cond: y.Op != ssaop.OpWasmF64Const
  5928  	// result: (F64Mul y (F64Const [x]))
  5929  	for {
  5930  		if v_0.Op != ssaop.OpWasmF64Const {
  5931  			break
  5932  		}
  5933  		x := ssa.AuxIntToFloat64(v_0.AuxInt)
  5934  		y := v_1
  5935  		if !(y.Op != ssaop.OpWasmF64Const) {
  5936  			break
  5937  		}
  5938  		v.Reset(ssaop.OpWasmF64Mul)
  5939  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmF64Const, typ.Float64)
  5940  		v0.AuxInt = ssa.Float64ToAuxInt(x)
  5941  		v.AddArg2(y, v0)
  5942  		return true
  5943  	}
  5944  	return false
  5945  }
  5946  func rewriteValue_OpWasmI64Add(v *ssa.Value) bool {
  5947  	v_1 := v.Args[1]
  5948  	v_0 := v.Args[0]
  5949  	b := v.Block
  5950  	typ := &b.Func.Config.Types
  5951  	// match: (I64Add (I64Const [x]) (I64Const [y]))
  5952  	// result: (I64Const [x + y])
  5953  	for {
  5954  		if v_0.Op != ssaop.OpWasmI64Const {
  5955  			break
  5956  		}
  5957  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5958  		if v_1.Op != ssaop.OpWasmI64Const {
  5959  			break
  5960  		}
  5961  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  5962  		v.Reset(ssaop.OpWasmI64Const)
  5963  		v.AuxInt = ssa.Int64ToAuxInt(x + y)
  5964  		return true
  5965  	}
  5966  	// match: (I64Add (I64Const [x]) y)
  5967  	// cond: y.Op != ssaop.OpWasmI64Const
  5968  	// result: (I64Add y (I64Const [x]))
  5969  	for {
  5970  		if v_0.Op != ssaop.OpWasmI64Const {
  5971  			break
  5972  		}
  5973  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  5974  		y := v_1
  5975  		if !(y.Op != ssaop.OpWasmI64Const) {
  5976  			break
  5977  		}
  5978  		v.Reset(ssaop.OpWasmI64Add)
  5979  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  5980  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  5981  		v.AddArg2(y, v0)
  5982  		return true
  5983  	}
  5984  	// match: (I64Add x (I64Const <t> [y]))
  5985  	// cond: !t.IsPtr()
  5986  	// result: (I64AddConst [y] x)
  5987  	for {
  5988  		x := v_0
  5989  		if v_1.Op != ssaop.OpWasmI64Const {
  5990  			break
  5991  		}
  5992  		t := v_1.Type
  5993  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  5994  		if !(!t.IsPtr()) {
  5995  			break
  5996  		}
  5997  		v.Reset(ssaop.OpWasmI64AddConst)
  5998  		v.AuxInt = ssa.Int64ToAuxInt(y)
  5999  		v.AddArg(x)
  6000  		return true
  6001  	}
  6002  	return false
  6003  }
  6004  func rewriteValue_OpWasmI64AddConst(v *ssa.Value) bool {
  6005  	v_0 := v.Args[0]
  6006  	// match: (I64AddConst [0] x)
  6007  	// result: x
  6008  	for {
  6009  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  6010  			break
  6011  		}
  6012  		x := v_0
  6013  		v.CopyOf(x)
  6014  		return true
  6015  	}
  6016  	// match: (I64AddConst [off] (LoweredAddr {sym} [off2] base))
  6017  	// cond: ssa.IsU32Bit(off+int64(off2))
  6018  	// result: (LoweredAddr {sym} [int32(off)+off2] base)
  6019  	for {
  6020  		off := ssa.AuxIntToInt64(v.AuxInt)
  6021  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6022  			break
  6023  		}
  6024  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6025  		sym := ssa.AuxToSym(v_0.Aux)
  6026  		base := v_0.Args[0]
  6027  		if !(ssa.IsU32Bit(off + int64(off2))) {
  6028  			break
  6029  		}
  6030  		v.Reset(ssaop.OpWasmLoweredAddr)
  6031  		v.AuxInt = ssa.Int32ToAuxInt(int32(off) + off2)
  6032  		v.Aux = ssa.SymToAux(sym)
  6033  		v.AddArg(base)
  6034  		return true
  6035  	}
  6036  	// match: (I64AddConst [off] x:(SP))
  6037  	// cond: ssa.IsU32Bit(off)
  6038  	// result: (LoweredAddr [int32(off)] x)
  6039  	for {
  6040  		off := ssa.AuxIntToInt64(v.AuxInt)
  6041  		x := v_0
  6042  		if x.Op != ssaop.OpSP || !(ssa.IsU32Bit(off)) {
  6043  			break
  6044  		}
  6045  		v.Reset(ssaop.OpWasmLoweredAddr)
  6046  		v.AuxInt = ssa.Int32ToAuxInt(int32(off))
  6047  		v.AddArg(x)
  6048  		return true
  6049  	}
  6050  	return false
  6051  }
  6052  func rewriteValue_OpWasmI64And(v *ssa.Value) bool {
  6053  	v_1 := v.Args[1]
  6054  	v_0 := v.Args[0]
  6055  	b := v.Block
  6056  	typ := &b.Func.Config.Types
  6057  	// match: (I64And (I64Const [x]) (I64Const [y]))
  6058  	// result: (I64Const [x & y])
  6059  	for {
  6060  		if v_0.Op != ssaop.OpWasmI64Const {
  6061  			break
  6062  		}
  6063  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6064  		if v_1.Op != ssaop.OpWasmI64Const {
  6065  			break
  6066  		}
  6067  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6068  		v.Reset(ssaop.OpWasmI64Const)
  6069  		v.AuxInt = ssa.Int64ToAuxInt(x & y)
  6070  		return true
  6071  	}
  6072  	// match: (I64And x (I64Const [-1]))
  6073  	// result: x
  6074  	for {
  6075  		x := v_0
  6076  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
  6077  			break
  6078  		}
  6079  		v.CopyOf(x)
  6080  		return true
  6081  	}
  6082  	// match: (I64And x (I64Const [0]))
  6083  	// result: (I64Const [0])
  6084  	for {
  6085  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6086  			break
  6087  		}
  6088  		v.Reset(ssaop.OpWasmI64Const)
  6089  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6090  		return true
  6091  	}
  6092  	// match: (I64And (I64And x (I64Const [c1])) (I64Const [c2]))
  6093  	// result: (I64And x (I64Const [c1 & c2]))
  6094  	for {
  6095  		if v_0.Op != ssaop.OpWasmI64And {
  6096  			break
  6097  		}
  6098  		_ = v_0.Args[1]
  6099  		x := v_0.Args[0]
  6100  		v_0_1 := v_0.Args[1]
  6101  		if v_0_1.Op != ssaop.OpWasmI64Const {
  6102  			break
  6103  		}
  6104  		c1 := ssa.AuxIntToInt64(v_0_1.AuxInt)
  6105  		if v_1.Op != ssaop.OpWasmI64Const {
  6106  			break
  6107  		}
  6108  		c2 := ssa.AuxIntToInt64(v_1.AuxInt)
  6109  		v.Reset(ssaop.OpWasmI64And)
  6110  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  6111  		v0.AuxInt = ssa.Int64ToAuxInt(c1 & c2)
  6112  		v.AddArg2(x, v0)
  6113  		return true
  6114  	}
  6115  	// match: (I64And (I64Const [x]) y)
  6116  	// cond: y.Op != ssaop.OpWasmI64Const
  6117  	// result: (I64And y (I64Const [x]))
  6118  	for {
  6119  		if v_0.Op != ssaop.OpWasmI64Const {
  6120  			break
  6121  		}
  6122  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6123  		y := v_1
  6124  		if !(y.Op != ssaop.OpWasmI64Const) {
  6125  			break
  6126  		}
  6127  		v.Reset(ssaop.OpWasmI64And)
  6128  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  6129  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  6130  		v.AddArg2(y, v0)
  6131  		return true
  6132  	}
  6133  	return false
  6134  }
  6135  func rewriteValue_OpWasmI64Eq(v *ssa.Value) bool {
  6136  	v_1 := v.Args[1]
  6137  	v_0 := v.Args[0]
  6138  	b := v.Block
  6139  	typ := &b.Func.Config.Types
  6140  	// match: (I64Eq (I64Const [x]) (I64Const [y]))
  6141  	// cond: x == y
  6142  	// result: (I64Const [1])
  6143  	for {
  6144  		if v_0.Op != ssaop.OpWasmI64Const {
  6145  			break
  6146  		}
  6147  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6148  		if v_1.Op != ssaop.OpWasmI64Const {
  6149  			break
  6150  		}
  6151  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6152  		if !(x == y) {
  6153  			break
  6154  		}
  6155  		v.Reset(ssaop.OpWasmI64Const)
  6156  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6157  		return true
  6158  	}
  6159  	// match: (I64Eq (I64Const [x]) (I64Const [y]))
  6160  	// cond: x != y
  6161  	// result: (I64Const [0])
  6162  	for {
  6163  		if v_0.Op != ssaop.OpWasmI64Const {
  6164  			break
  6165  		}
  6166  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6167  		if v_1.Op != ssaop.OpWasmI64Const {
  6168  			break
  6169  		}
  6170  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6171  		if !(x != y) {
  6172  			break
  6173  		}
  6174  		v.Reset(ssaop.OpWasmI64Const)
  6175  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6176  		return true
  6177  	}
  6178  	// match: (I64Eq (I64Const [x]) y)
  6179  	// cond: y.Op != ssaop.OpWasmI64Const
  6180  	// result: (I64Eq y (I64Const [x]))
  6181  	for {
  6182  		if v_0.Op != ssaop.OpWasmI64Const {
  6183  			break
  6184  		}
  6185  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6186  		y := v_1
  6187  		if !(y.Op != ssaop.OpWasmI64Const) {
  6188  			break
  6189  		}
  6190  		v.Reset(ssaop.OpWasmI64Eq)
  6191  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  6192  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  6193  		v.AddArg2(y, v0)
  6194  		return true
  6195  	}
  6196  	// match: (I64Eq x (I64Const [0]))
  6197  	// result: (I64Eqz x)
  6198  	for {
  6199  		x := v_0
  6200  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6201  			break
  6202  		}
  6203  		v.Reset(ssaop.OpWasmI64Eqz)
  6204  		v.AddArg(x)
  6205  		return true
  6206  	}
  6207  	return false
  6208  }
  6209  func rewriteValue_OpWasmI64Eqz(v *ssa.Value) bool {
  6210  	v_0 := v.Args[0]
  6211  	// match: (I64Eqz (I64Eqz (I64Eqz x)))
  6212  	// result: (I64Eqz x)
  6213  	for {
  6214  		if v_0.Op != ssaop.OpWasmI64Eqz {
  6215  			break
  6216  		}
  6217  		v_0_0 := v_0.Args[0]
  6218  		if v_0_0.Op != ssaop.OpWasmI64Eqz {
  6219  			break
  6220  		}
  6221  		x := v_0_0.Args[0]
  6222  		v.Reset(ssaop.OpWasmI64Eqz)
  6223  		v.AddArg(x)
  6224  		return true
  6225  	}
  6226  	return false
  6227  }
  6228  func rewriteValue_OpWasmI64Extend16S(v *ssa.Value) bool {
  6229  	v_0 := v.Args[0]
  6230  	// match: (I64Extend16S (I64Extend16S x))
  6231  	// result: (I64Extend16S x)
  6232  	for {
  6233  		if v_0.Op != ssaop.OpWasmI64Extend16S {
  6234  			break
  6235  		}
  6236  		x := v_0.Args[0]
  6237  		v.Reset(ssaop.OpWasmI64Extend16S)
  6238  		v.AddArg(x)
  6239  		return true
  6240  	}
  6241  	// match: (I64Extend16S (I64Extend8S x))
  6242  	// result: (I64Extend8S x)
  6243  	for {
  6244  		if v_0.Op != ssaop.OpWasmI64Extend8S {
  6245  			break
  6246  		}
  6247  		x := v_0.Args[0]
  6248  		v.Reset(ssaop.OpWasmI64Extend8S)
  6249  		v.AddArg(x)
  6250  		return true
  6251  	}
  6252  	// match: (I64Extend16S x:(I64And _ (I64Const [c])))
  6253  	// cond: c >= 0 && int64(int16(c)) == c
  6254  	// result: x
  6255  	for {
  6256  		x := v_0
  6257  		if x.Op != ssaop.OpWasmI64And {
  6258  			break
  6259  		}
  6260  		_ = x.Args[1]
  6261  		x_1 := x.Args[1]
  6262  		if x_1.Op != ssaop.OpWasmI64Const {
  6263  			break
  6264  		}
  6265  		c := ssa.AuxIntToInt64(x_1.AuxInt)
  6266  		if !(c >= 0 && int64(int16(c)) == c) {
  6267  			break
  6268  		}
  6269  		v.CopyOf(x)
  6270  		return true
  6271  	}
  6272  	return false
  6273  }
  6274  func rewriteValue_OpWasmI64Extend32S(v *ssa.Value) bool {
  6275  	v_0 := v.Args[0]
  6276  	// match: (I64Extend32S (I64Extend32S x))
  6277  	// result: (I64Extend32S x)
  6278  	for {
  6279  		if v_0.Op != ssaop.OpWasmI64Extend32S {
  6280  			break
  6281  		}
  6282  		x := v_0.Args[0]
  6283  		v.Reset(ssaop.OpWasmI64Extend32S)
  6284  		v.AddArg(x)
  6285  		return true
  6286  	}
  6287  	// match: (I64Extend32S (I64Extend16S x))
  6288  	// result: (I64Extend16S x)
  6289  	for {
  6290  		if v_0.Op != ssaop.OpWasmI64Extend16S {
  6291  			break
  6292  		}
  6293  		x := v_0.Args[0]
  6294  		v.Reset(ssaop.OpWasmI64Extend16S)
  6295  		v.AddArg(x)
  6296  		return true
  6297  	}
  6298  	// match: (I64Extend32S (I64Extend8S x))
  6299  	// result: (I64Extend8S x)
  6300  	for {
  6301  		if v_0.Op != ssaop.OpWasmI64Extend8S {
  6302  			break
  6303  		}
  6304  		x := v_0.Args[0]
  6305  		v.Reset(ssaop.OpWasmI64Extend8S)
  6306  		v.AddArg(x)
  6307  		return true
  6308  	}
  6309  	// match: (I64Extend32S x:(I64And _ (I64Const [c])))
  6310  	// cond: c >= 0 && int64(int32(c)) == c
  6311  	// result: x
  6312  	for {
  6313  		x := v_0
  6314  		if x.Op != ssaop.OpWasmI64And {
  6315  			break
  6316  		}
  6317  		_ = x.Args[1]
  6318  		x_1 := x.Args[1]
  6319  		if x_1.Op != ssaop.OpWasmI64Const {
  6320  			break
  6321  		}
  6322  		c := ssa.AuxIntToInt64(x_1.AuxInt)
  6323  		if !(c >= 0 && int64(int32(c)) == c) {
  6324  			break
  6325  		}
  6326  		v.CopyOf(x)
  6327  		return true
  6328  	}
  6329  	return false
  6330  }
  6331  func rewriteValue_OpWasmI64Extend8S(v *ssa.Value) bool {
  6332  	v_0 := v.Args[0]
  6333  	// match: (I64Extend8S (I64Extend8S x))
  6334  	// result: (I64Extend8S x)
  6335  	for {
  6336  		if v_0.Op != ssaop.OpWasmI64Extend8S {
  6337  			break
  6338  		}
  6339  		x := v_0.Args[0]
  6340  		v.Reset(ssaop.OpWasmI64Extend8S)
  6341  		v.AddArg(x)
  6342  		return true
  6343  	}
  6344  	// match: (I64Extend8S x:(I64And _ (I64Const [c])))
  6345  	// cond: c >= 0 && int64(int8(c)) == c
  6346  	// result: x
  6347  	for {
  6348  		x := v_0
  6349  		if x.Op != ssaop.OpWasmI64And {
  6350  			break
  6351  		}
  6352  		_ = x.Args[1]
  6353  		x_1 := x.Args[1]
  6354  		if x_1.Op != ssaop.OpWasmI64Const {
  6355  			break
  6356  		}
  6357  		c := ssa.AuxIntToInt64(x_1.AuxInt)
  6358  		if !(c >= 0 && int64(int8(c)) == c) {
  6359  			break
  6360  		}
  6361  		v.CopyOf(x)
  6362  		return true
  6363  	}
  6364  	return false
  6365  }
  6366  func rewriteValue_OpWasmI64LeU(v *ssa.Value) bool {
  6367  	v_1 := v.Args[1]
  6368  	v_0 := v.Args[0]
  6369  	b := v.Block
  6370  	typ := &b.Func.Config.Types
  6371  	// match: (I64LeU x (I64Const [0]))
  6372  	// result: (I64Eqz x)
  6373  	for {
  6374  		x := v_0
  6375  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6376  			break
  6377  		}
  6378  		v.Reset(ssaop.OpWasmI64Eqz)
  6379  		v.AddArg(x)
  6380  		return true
  6381  	}
  6382  	// match: (I64LeU (I64Const [1]) x)
  6383  	// result: (I64Eqz (I64Eqz x))
  6384  	for {
  6385  		if v_0.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_0.AuxInt) != 1 {
  6386  			break
  6387  		}
  6388  		x := v_1
  6389  		v.Reset(ssaop.OpWasmI64Eqz)
  6390  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Eqz, typ.Bool)
  6391  		v0.AddArg(x)
  6392  		v.AddArg(v0)
  6393  		return true
  6394  	}
  6395  	return false
  6396  }
  6397  func rewriteValue_OpWasmI64Load(v *ssa.Value) bool {
  6398  	v_1 := v.Args[1]
  6399  	v_0 := v.Args[0]
  6400  	b := v.Block
  6401  	config := b.Func.Config
  6402  	// match: (I64Load [off] (I64AddConst [off2] ptr) mem)
  6403  	// cond: ssa.IsU32Bit(off+off2)
  6404  	// result: (I64Load [off+off2] ptr mem)
  6405  	for {
  6406  		off := ssa.AuxIntToInt64(v.AuxInt)
  6407  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6408  			break
  6409  		}
  6410  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6411  		ptr := v_0.Args[0]
  6412  		mem := v_1
  6413  		if !(ssa.IsU32Bit(off + off2)) {
  6414  			break
  6415  		}
  6416  		v.Reset(ssaop.OpWasmI64Load)
  6417  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6418  		v.AddArg2(ptr, mem)
  6419  		return true
  6420  	}
  6421  	// match: (I64Load [off] (LoweredAddr {sym} [off2] (SB)) _)
  6422  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6423  	// result: (I64Const [int64(ssa.Read64(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder))])
  6424  	for {
  6425  		off := ssa.AuxIntToInt64(v.AuxInt)
  6426  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6427  			break
  6428  		}
  6429  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6430  		sym := ssa.AuxToSym(v_0.Aux)
  6431  		v_0_0 := v_0.Args[0]
  6432  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6433  			break
  6434  		}
  6435  		v.Reset(ssaop.OpWasmI64Const)
  6436  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read64(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder)))
  6437  		return true
  6438  	}
  6439  	return false
  6440  }
  6441  func rewriteValue_OpWasmI64Load16S(v *ssa.Value) bool {
  6442  	v_1 := v.Args[1]
  6443  	v_0 := v.Args[0]
  6444  	b := v.Block
  6445  	config := b.Func.Config
  6446  	// match: (I64Load16S [off] (I64AddConst [off2] ptr) mem)
  6447  	// cond: ssa.IsU32Bit(off+off2)
  6448  	// result: (I64Load16S [off+off2] ptr mem)
  6449  	for {
  6450  		off := ssa.AuxIntToInt64(v.AuxInt)
  6451  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6452  			break
  6453  		}
  6454  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6455  		ptr := v_0.Args[0]
  6456  		mem := v_1
  6457  		if !(ssa.IsU32Bit(off + off2)) {
  6458  			break
  6459  		}
  6460  		v.Reset(ssaop.OpWasmI64Load16S)
  6461  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6462  		v.AddArg2(ptr, mem)
  6463  		return true
  6464  	}
  6465  	// match: (I64Load16S [off] (LoweredAddr {sym} [off2] (SB)) _)
  6466  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6467  	// result: (I64Const [int64(int16(ssa.Read16(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder)))])
  6468  	for {
  6469  		off := ssa.AuxIntToInt64(v.AuxInt)
  6470  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6471  			break
  6472  		}
  6473  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6474  		sym := ssa.AuxToSym(v_0.Aux)
  6475  		v_0_0 := v_0.Args[0]
  6476  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6477  			break
  6478  		}
  6479  		v.Reset(ssaop.OpWasmI64Const)
  6480  		v.AuxInt = ssa.Int64ToAuxInt(int64(int16(ssa.Read16(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder))))
  6481  		return true
  6482  	}
  6483  	return false
  6484  }
  6485  func rewriteValue_OpWasmI64Load16U(v *ssa.Value) bool {
  6486  	v_1 := v.Args[1]
  6487  	v_0 := v.Args[0]
  6488  	b := v.Block
  6489  	config := b.Func.Config
  6490  	// match: (I64Load16U [off] (I64AddConst [off2] ptr) mem)
  6491  	// cond: ssa.IsU32Bit(off+off2)
  6492  	// result: (I64Load16U [off+off2] ptr mem)
  6493  	for {
  6494  		off := ssa.AuxIntToInt64(v.AuxInt)
  6495  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6496  			break
  6497  		}
  6498  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6499  		ptr := v_0.Args[0]
  6500  		mem := v_1
  6501  		if !(ssa.IsU32Bit(off + off2)) {
  6502  			break
  6503  		}
  6504  		v.Reset(ssaop.OpWasmI64Load16U)
  6505  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6506  		v.AddArg2(ptr, mem)
  6507  		return true
  6508  	}
  6509  	// match: (I64Load16U [off] (LoweredAddr {sym} [off2] (SB)) _)
  6510  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6511  	// result: (I64Const [int64(ssa.Read16(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder))])
  6512  	for {
  6513  		off := ssa.AuxIntToInt64(v.AuxInt)
  6514  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6515  			break
  6516  		}
  6517  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6518  		sym := ssa.AuxToSym(v_0.Aux)
  6519  		v_0_0 := v_0.Args[0]
  6520  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6521  			break
  6522  		}
  6523  		v.Reset(ssaop.OpWasmI64Const)
  6524  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read16(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder)))
  6525  		return true
  6526  	}
  6527  	return false
  6528  }
  6529  func rewriteValue_OpWasmI64Load32S(v *ssa.Value) bool {
  6530  	v_1 := v.Args[1]
  6531  	v_0 := v.Args[0]
  6532  	b := v.Block
  6533  	config := b.Func.Config
  6534  	// match: (I64Load32S [off] (I64AddConst [off2] ptr) mem)
  6535  	// cond: ssa.IsU32Bit(off+off2)
  6536  	// result: (I64Load32S [off+off2] ptr mem)
  6537  	for {
  6538  		off := ssa.AuxIntToInt64(v.AuxInt)
  6539  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6540  			break
  6541  		}
  6542  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6543  		ptr := v_0.Args[0]
  6544  		mem := v_1
  6545  		if !(ssa.IsU32Bit(off + off2)) {
  6546  			break
  6547  		}
  6548  		v.Reset(ssaop.OpWasmI64Load32S)
  6549  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6550  		v.AddArg2(ptr, mem)
  6551  		return true
  6552  	}
  6553  	// match: (I64Load32S [off] (LoweredAddr {sym} [off2] (SB)) _)
  6554  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6555  	// result: (I64Const [int64(int32(ssa.Read32(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder)))])
  6556  	for {
  6557  		off := ssa.AuxIntToInt64(v.AuxInt)
  6558  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6559  			break
  6560  		}
  6561  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6562  		sym := ssa.AuxToSym(v_0.Aux)
  6563  		v_0_0 := v_0.Args[0]
  6564  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6565  			break
  6566  		}
  6567  		v.Reset(ssaop.OpWasmI64Const)
  6568  		v.AuxInt = ssa.Int64ToAuxInt(int64(int32(ssa.Read32(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder))))
  6569  		return true
  6570  	}
  6571  	return false
  6572  }
  6573  func rewriteValue_OpWasmI64Load32U(v *ssa.Value) bool {
  6574  	v_1 := v.Args[1]
  6575  	v_0 := v.Args[0]
  6576  	b := v.Block
  6577  	config := b.Func.Config
  6578  	// match: (I64Load32U [off] (I64AddConst [off2] ptr) mem)
  6579  	// cond: ssa.IsU32Bit(off+off2)
  6580  	// result: (I64Load32U [off+off2] ptr mem)
  6581  	for {
  6582  		off := ssa.AuxIntToInt64(v.AuxInt)
  6583  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6584  			break
  6585  		}
  6586  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6587  		ptr := v_0.Args[0]
  6588  		mem := v_1
  6589  		if !(ssa.IsU32Bit(off + off2)) {
  6590  			break
  6591  		}
  6592  		v.Reset(ssaop.OpWasmI64Load32U)
  6593  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6594  		v.AddArg2(ptr, mem)
  6595  		return true
  6596  	}
  6597  	// match: (I64Load32U [off] (LoweredAddr {sym} [off2] (SB)) _)
  6598  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6599  	// result: (I64Const [int64(ssa.Read32(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder))])
  6600  	for {
  6601  		off := ssa.AuxIntToInt64(v.AuxInt)
  6602  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6603  			break
  6604  		}
  6605  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6606  		sym := ssa.AuxToSym(v_0.Aux)
  6607  		v_0_0 := v_0.Args[0]
  6608  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6609  			break
  6610  		}
  6611  		v.Reset(ssaop.OpWasmI64Const)
  6612  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read32(sym, off+int64(off2), config.Ctxt.Arch.ByteOrder)))
  6613  		return true
  6614  	}
  6615  	return false
  6616  }
  6617  func rewriteValue_OpWasmI64Load8S(v *ssa.Value) bool {
  6618  	v_1 := v.Args[1]
  6619  	v_0 := v.Args[0]
  6620  	// match: (I64Load8S [off] (I64AddConst [off2] ptr) mem)
  6621  	// cond: ssa.IsU32Bit(off+off2)
  6622  	// result: (I64Load8S [off+off2] ptr mem)
  6623  	for {
  6624  		off := ssa.AuxIntToInt64(v.AuxInt)
  6625  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6626  			break
  6627  		}
  6628  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6629  		ptr := v_0.Args[0]
  6630  		mem := v_1
  6631  		if !(ssa.IsU32Bit(off + off2)) {
  6632  			break
  6633  		}
  6634  		v.Reset(ssaop.OpWasmI64Load8S)
  6635  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6636  		v.AddArg2(ptr, mem)
  6637  		return true
  6638  	}
  6639  	// match: (I64Load8S [off] (LoweredAddr {sym} [off2] (SB)) _)
  6640  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6641  	// result: (I64Const [int64(int8(ssa.Read8(sym, off+int64(off2))))])
  6642  	for {
  6643  		off := ssa.AuxIntToInt64(v.AuxInt)
  6644  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6645  			break
  6646  		}
  6647  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6648  		sym := ssa.AuxToSym(v_0.Aux)
  6649  		v_0_0 := v_0.Args[0]
  6650  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6651  			break
  6652  		}
  6653  		v.Reset(ssaop.OpWasmI64Const)
  6654  		v.AuxInt = ssa.Int64ToAuxInt(int64(int8(ssa.Read8(sym, off+int64(off2)))))
  6655  		return true
  6656  	}
  6657  	return false
  6658  }
  6659  func rewriteValue_OpWasmI64Load8U(v *ssa.Value) bool {
  6660  	v_1 := v.Args[1]
  6661  	v_0 := v.Args[0]
  6662  	// match: (I64Load8U [off] (I64AddConst [off2] ptr) mem)
  6663  	// cond: ssa.IsU32Bit(off+off2)
  6664  	// result: (I64Load8U [off+off2] ptr mem)
  6665  	for {
  6666  		off := ssa.AuxIntToInt64(v.AuxInt)
  6667  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6668  			break
  6669  		}
  6670  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  6671  		ptr := v_0.Args[0]
  6672  		mem := v_1
  6673  		if !(ssa.IsU32Bit(off + off2)) {
  6674  			break
  6675  		}
  6676  		v.Reset(ssaop.OpWasmI64Load8U)
  6677  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  6678  		v.AddArg2(ptr, mem)
  6679  		return true
  6680  	}
  6681  	// match: (I64Load8U [off] (LoweredAddr {sym} [off2] (SB)) _)
  6682  	// cond: ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))
  6683  	// result: (I64Const [int64(ssa.Read8(sym, off+int64(off2)))])
  6684  	for {
  6685  		off := ssa.AuxIntToInt64(v.AuxInt)
  6686  		if v_0.Op != ssaop.OpWasmLoweredAddr {
  6687  			break
  6688  		}
  6689  		off2 := ssa.AuxIntToInt32(v_0.AuxInt)
  6690  		sym := ssa.AuxToSym(v_0.Aux)
  6691  		v_0_0 := v_0.Args[0]
  6692  		if v_0_0.Op != ssaop.OpSB || !(ssa.SymIsRO(sym) && ssa.IsU32Bit(off+int64(off2))) {
  6693  			break
  6694  		}
  6695  		v.Reset(ssaop.OpWasmI64Const)
  6696  		v.AuxInt = ssa.Int64ToAuxInt(int64(ssa.Read8(sym, off+int64(off2))))
  6697  		return true
  6698  	}
  6699  	return false
  6700  }
  6701  func rewriteValue_OpWasmI64LtU(v *ssa.Value) bool {
  6702  	v_1 := v.Args[1]
  6703  	v_0 := v.Args[0]
  6704  	b := v.Block
  6705  	typ := &b.Func.Config.Types
  6706  	// match: (I64LtU (I64Const [0]) x)
  6707  	// result: (I64Eqz (I64Eqz x))
  6708  	for {
  6709  		if v_0.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_0.AuxInt) != 0 {
  6710  			break
  6711  		}
  6712  		x := v_1
  6713  		v.Reset(ssaop.OpWasmI64Eqz)
  6714  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Eqz, typ.Bool)
  6715  		v0.AddArg(x)
  6716  		v.AddArg(v0)
  6717  		return true
  6718  	}
  6719  	// match: (I64LtU x (I64Const [1]))
  6720  	// result: (I64Eqz x)
  6721  	for {
  6722  		x := v_0
  6723  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  6724  			break
  6725  		}
  6726  		v.Reset(ssaop.OpWasmI64Eqz)
  6727  		v.AddArg(x)
  6728  		return true
  6729  	}
  6730  	return false
  6731  }
  6732  func rewriteValue_OpWasmI64Mul(v *ssa.Value) bool {
  6733  	v_1 := v.Args[1]
  6734  	v_0 := v.Args[0]
  6735  	b := v.Block
  6736  	typ := &b.Func.Config.Types
  6737  	// match: (I64Mul (I64Const [x]) (I64Const [y]))
  6738  	// result: (I64Const [x * y])
  6739  	for {
  6740  		if v_0.Op != ssaop.OpWasmI64Const {
  6741  			break
  6742  		}
  6743  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6744  		if v_1.Op != ssaop.OpWasmI64Const {
  6745  			break
  6746  		}
  6747  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6748  		v.Reset(ssaop.OpWasmI64Const)
  6749  		v.AuxInt = ssa.Int64ToAuxInt(x * y)
  6750  		return true
  6751  	}
  6752  	// match: (I64Mul x (I64Const [0]))
  6753  	// result: (I64Const [0])
  6754  	for {
  6755  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6756  			break
  6757  		}
  6758  		v.Reset(ssaop.OpWasmI64Const)
  6759  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6760  		return true
  6761  	}
  6762  	// match: (I64Mul x (I64Const [1]))
  6763  	// result: x
  6764  	for {
  6765  		x := v_0
  6766  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 1 {
  6767  			break
  6768  		}
  6769  		v.CopyOf(x)
  6770  		return true
  6771  	}
  6772  	// match: (I64Mul (I64Const [x]) y)
  6773  	// cond: y.Op != ssaop.OpWasmI64Const
  6774  	// result: (I64Mul y (I64Const [x]))
  6775  	for {
  6776  		if v_0.Op != ssaop.OpWasmI64Const {
  6777  			break
  6778  		}
  6779  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6780  		y := v_1
  6781  		if !(y.Op != ssaop.OpWasmI64Const) {
  6782  			break
  6783  		}
  6784  		v.Reset(ssaop.OpWasmI64Mul)
  6785  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  6786  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  6787  		v.AddArg2(y, v0)
  6788  		return true
  6789  	}
  6790  	return false
  6791  }
  6792  func rewriteValue_OpWasmI64Ne(v *ssa.Value) bool {
  6793  	v_1 := v.Args[1]
  6794  	v_0 := v.Args[0]
  6795  	b := v.Block
  6796  	typ := &b.Func.Config.Types
  6797  	// match: (I64Ne (I64Const [x]) (I64Const [y]))
  6798  	// cond: x == y
  6799  	// result: (I64Const [0])
  6800  	for {
  6801  		if v_0.Op != ssaop.OpWasmI64Const {
  6802  			break
  6803  		}
  6804  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6805  		if v_1.Op != ssaop.OpWasmI64Const {
  6806  			break
  6807  		}
  6808  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6809  		if !(x == y) {
  6810  			break
  6811  		}
  6812  		v.Reset(ssaop.OpWasmI64Const)
  6813  		v.AuxInt = ssa.Int64ToAuxInt(0)
  6814  		return true
  6815  	}
  6816  	// match: (I64Ne (I64Const [x]) (I64Const [y]))
  6817  	// cond: x != y
  6818  	// result: (I64Const [1])
  6819  	for {
  6820  		if v_0.Op != ssaop.OpWasmI64Const {
  6821  			break
  6822  		}
  6823  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6824  		if v_1.Op != ssaop.OpWasmI64Const {
  6825  			break
  6826  		}
  6827  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6828  		if !(x != y) {
  6829  			break
  6830  		}
  6831  		v.Reset(ssaop.OpWasmI64Const)
  6832  		v.AuxInt = ssa.Int64ToAuxInt(1)
  6833  		return true
  6834  	}
  6835  	// match: (I64Ne (I64Const [x]) y)
  6836  	// cond: y.Op != ssaop.OpWasmI64Const
  6837  	// result: (I64Ne y (I64Const [x]))
  6838  	for {
  6839  		if v_0.Op != ssaop.OpWasmI64Const {
  6840  			break
  6841  		}
  6842  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6843  		y := v_1
  6844  		if !(y.Op != ssaop.OpWasmI64Const) {
  6845  			break
  6846  		}
  6847  		v.Reset(ssaop.OpWasmI64Ne)
  6848  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  6849  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  6850  		v.AddArg2(y, v0)
  6851  		return true
  6852  	}
  6853  	// match: (I64Ne x (I64Const [0]))
  6854  	// result: (I64Eqz (I64Eqz x))
  6855  	for {
  6856  		x := v_0
  6857  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6858  			break
  6859  		}
  6860  		v.Reset(ssaop.OpWasmI64Eqz)
  6861  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Eqz, typ.Bool)
  6862  		v0.AddArg(x)
  6863  		v.AddArg(v0)
  6864  		return true
  6865  	}
  6866  	return false
  6867  }
  6868  func rewriteValue_OpWasmI64Or(v *ssa.Value) bool {
  6869  	v_1 := v.Args[1]
  6870  	v_0 := v.Args[0]
  6871  	b := v.Block
  6872  	typ := &b.Func.Config.Types
  6873  	// match: (I64Or (I64Const [x]) (I64Const [y]))
  6874  	// result: (I64Const [x | y])
  6875  	for {
  6876  		if v_0.Op != ssaop.OpWasmI64Const {
  6877  			break
  6878  		}
  6879  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6880  		if v_1.Op != ssaop.OpWasmI64Const {
  6881  			break
  6882  		}
  6883  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6884  		v.Reset(ssaop.OpWasmI64Const)
  6885  		v.AuxInt = ssa.Int64ToAuxInt(x | y)
  6886  		return true
  6887  	}
  6888  	// match: (I64Or x (I64Const [0]))
  6889  	// result: x
  6890  	for {
  6891  		x := v_0
  6892  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  6893  			break
  6894  		}
  6895  		v.CopyOf(x)
  6896  		return true
  6897  	}
  6898  	// match: (I64Or x (I64Const [-1]))
  6899  	// result: (I64Const [-1])
  6900  	for {
  6901  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != -1 {
  6902  			break
  6903  		}
  6904  		v.Reset(ssaop.OpWasmI64Const)
  6905  		v.AuxInt = ssa.Int64ToAuxInt(-1)
  6906  		return true
  6907  	}
  6908  	// match: (I64Or (I64Const [x]) y)
  6909  	// cond: y.Op != ssaop.OpWasmI64Const
  6910  	// result: (I64Or y (I64Const [x]))
  6911  	for {
  6912  		if v_0.Op != ssaop.OpWasmI64Const {
  6913  			break
  6914  		}
  6915  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6916  		y := v_1
  6917  		if !(y.Op != ssaop.OpWasmI64Const) {
  6918  			break
  6919  		}
  6920  		v.Reset(ssaop.OpWasmI64Or)
  6921  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  6922  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  6923  		v.AddArg2(y, v0)
  6924  		return true
  6925  	}
  6926  	return false
  6927  }
  6928  func rewriteValue_OpWasmI64Shl(v *ssa.Value) bool {
  6929  	v_1 := v.Args[1]
  6930  	v_0 := v.Args[0]
  6931  	// match: (I64Shl (I64Const [x]) (I64Const [y]))
  6932  	// result: (I64Const [x << uint64(y)])
  6933  	for {
  6934  		if v_0.Op != ssaop.OpWasmI64Const {
  6935  			break
  6936  		}
  6937  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6938  		if v_1.Op != ssaop.OpWasmI64Const {
  6939  			break
  6940  		}
  6941  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6942  		v.Reset(ssaop.OpWasmI64Const)
  6943  		v.AuxInt = ssa.Int64ToAuxInt(x << uint64(y))
  6944  		return true
  6945  	}
  6946  	return false
  6947  }
  6948  func rewriteValue_OpWasmI64ShrS(v *ssa.Value) bool {
  6949  	v_1 := v.Args[1]
  6950  	v_0 := v.Args[0]
  6951  	// match: (I64ShrS (I64Const [x]) (I64Const [y]))
  6952  	// result: (I64Const [x >> uint64(y)])
  6953  	for {
  6954  		if v_0.Op != ssaop.OpWasmI64Const {
  6955  			break
  6956  		}
  6957  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6958  		if v_1.Op != ssaop.OpWasmI64Const {
  6959  			break
  6960  		}
  6961  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6962  		v.Reset(ssaop.OpWasmI64Const)
  6963  		v.AuxInt = ssa.Int64ToAuxInt(x >> uint64(y))
  6964  		return true
  6965  	}
  6966  	return false
  6967  }
  6968  func rewriteValue_OpWasmI64ShrU(v *ssa.Value) bool {
  6969  	v_1 := v.Args[1]
  6970  	v_0 := v.Args[0]
  6971  	// match: (I64ShrU (I64Const [x]) (I64Const [y]))
  6972  	// result: (I64Const [int64(uint64(x) >> uint64(y))])
  6973  	for {
  6974  		if v_0.Op != ssaop.OpWasmI64Const {
  6975  			break
  6976  		}
  6977  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  6978  		if v_1.Op != ssaop.OpWasmI64Const {
  6979  			break
  6980  		}
  6981  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  6982  		v.Reset(ssaop.OpWasmI64Const)
  6983  		v.AuxInt = ssa.Int64ToAuxInt(int64(uint64(x) >> uint64(y)))
  6984  		return true
  6985  	}
  6986  	return false
  6987  }
  6988  func rewriteValue_OpWasmI64Store(v *ssa.Value) bool {
  6989  	v_2 := v.Args[2]
  6990  	v_1 := v.Args[1]
  6991  	v_0 := v.Args[0]
  6992  	// match: (I64Store [off] (I64AddConst [off2] ptr) val mem)
  6993  	// cond: ssa.IsU32Bit(off+off2)
  6994  	// result: (I64Store [off+off2] ptr val mem)
  6995  	for {
  6996  		off := ssa.AuxIntToInt64(v.AuxInt)
  6997  		if v_0.Op != ssaop.OpWasmI64AddConst {
  6998  			break
  6999  		}
  7000  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  7001  		ptr := v_0.Args[0]
  7002  		val := v_1
  7003  		mem := v_2
  7004  		if !(ssa.IsU32Bit(off + off2)) {
  7005  			break
  7006  		}
  7007  		v.Reset(ssaop.OpWasmI64Store)
  7008  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  7009  		v.AddArg3(ptr, val, mem)
  7010  		return true
  7011  	}
  7012  	return false
  7013  }
  7014  func rewriteValue_OpWasmI64Store16(v *ssa.Value) bool {
  7015  	v_2 := v.Args[2]
  7016  	v_1 := v.Args[1]
  7017  	v_0 := v.Args[0]
  7018  	// match: (I64Store16 [off] (I64AddConst [off2] ptr) val mem)
  7019  	// cond: ssa.IsU32Bit(off+off2)
  7020  	// result: (I64Store16 [off+off2] ptr val mem)
  7021  	for {
  7022  		off := ssa.AuxIntToInt64(v.AuxInt)
  7023  		if v_0.Op != ssaop.OpWasmI64AddConst {
  7024  			break
  7025  		}
  7026  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  7027  		ptr := v_0.Args[0]
  7028  		val := v_1
  7029  		mem := v_2
  7030  		if !(ssa.IsU32Bit(off + off2)) {
  7031  			break
  7032  		}
  7033  		v.Reset(ssaop.OpWasmI64Store16)
  7034  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  7035  		v.AddArg3(ptr, val, mem)
  7036  		return true
  7037  	}
  7038  	return false
  7039  }
  7040  func rewriteValue_OpWasmI64Store32(v *ssa.Value) bool {
  7041  	v_2 := v.Args[2]
  7042  	v_1 := v.Args[1]
  7043  	v_0 := v.Args[0]
  7044  	// match: (I64Store32 [off] (I64AddConst [off2] ptr) val mem)
  7045  	// cond: ssa.IsU32Bit(off+off2)
  7046  	// result: (I64Store32 [off+off2] ptr val mem)
  7047  	for {
  7048  		off := ssa.AuxIntToInt64(v.AuxInt)
  7049  		if v_0.Op != ssaop.OpWasmI64AddConst {
  7050  			break
  7051  		}
  7052  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  7053  		ptr := v_0.Args[0]
  7054  		val := v_1
  7055  		mem := v_2
  7056  		if !(ssa.IsU32Bit(off + off2)) {
  7057  			break
  7058  		}
  7059  		v.Reset(ssaop.OpWasmI64Store32)
  7060  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  7061  		v.AddArg3(ptr, val, mem)
  7062  		return true
  7063  	}
  7064  	return false
  7065  }
  7066  func rewriteValue_OpWasmI64Store8(v *ssa.Value) bool {
  7067  	v_2 := v.Args[2]
  7068  	v_1 := v.Args[1]
  7069  	v_0 := v.Args[0]
  7070  	// match: (I64Store8 [off] (I64AddConst [off2] ptr) val mem)
  7071  	// cond: ssa.IsU32Bit(off+off2)
  7072  	// result: (I64Store8 [off+off2] ptr val mem)
  7073  	for {
  7074  		off := ssa.AuxIntToInt64(v.AuxInt)
  7075  		if v_0.Op != ssaop.OpWasmI64AddConst {
  7076  			break
  7077  		}
  7078  		off2 := ssa.AuxIntToInt64(v_0.AuxInt)
  7079  		ptr := v_0.Args[0]
  7080  		val := v_1
  7081  		mem := v_2
  7082  		if !(ssa.IsU32Bit(off + off2)) {
  7083  			break
  7084  		}
  7085  		v.Reset(ssaop.OpWasmI64Store8)
  7086  		v.AuxInt = ssa.Int64ToAuxInt(off + off2)
  7087  		v.AddArg3(ptr, val, mem)
  7088  		return true
  7089  	}
  7090  	return false
  7091  }
  7092  func rewriteValue_OpWasmI64Sub(v *ssa.Value) bool {
  7093  	v_1 := v.Args[1]
  7094  	v_0 := v.Args[0]
  7095  	// match: (I64Sub (I64Const [x]) (I64Const [y]))
  7096  	// result: (I64Const [x - y])
  7097  	for {
  7098  		if v_0.Op != ssaop.OpWasmI64Const {
  7099  			break
  7100  		}
  7101  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7102  		if v_1.Op != ssaop.OpWasmI64Const {
  7103  			break
  7104  		}
  7105  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  7106  		v.Reset(ssaop.OpWasmI64Const)
  7107  		v.AuxInt = ssa.Int64ToAuxInt(x - y)
  7108  		return true
  7109  	}
  7110  	return false
  7111  }
  7112  func rewriteValue_OpWasmI64Xor(v *ssa.Value) bool {
  7113  	v_1 := v.Args[1]
  7114  	v_0 := v.Args[0]
  7115  	b := v.Block
  7116  	typ := &b.Func.Config.Types
  7117  	// match: (I64Xor (I64Const [x]) (I64Const [y]))
  7118  	// result: (I64Const [x ^ y])
  7119  	for {
  7120  		if v_0.Op != ssaop.OpWasmI64Const {
  7121  			break
  7122  		}
  7123  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7124  		if v_1.Op != ssaop.OpWasmI64Const {
  7125  			break
  7126  		}
  7127  		y := ssa.AuxIntToInt64(v_1.AuxInt)
  7128  		v.Reset(ssaop.OpWasmI64Const)
  7129  		v.AuxInt = ssa.Int64ToAuxInt(x ^ y)
  7130  		return true
  7131  	}
  7132  	// match: (I64Xor x (I64Const [0]))
  7133  	// result: x
  7134  	for {
  7135  		x := v_0
  7136  		if v_1.Op != ssaop.OpWasmI64Const || ssa.AuxIntToInt64(v_1.AuxInt) != 0 {
  7137  			break
  7138  		}
  7139  		v.CopyOf(x)
  7140  		return true
  7141  	}
  7142  	// match: (I64Xor (I64Const [x]) y)
  7143  	// cond: y.Op != ssaop.OpWasmI64Const
  7144  	// result: (I64Xor y (I64Const [x]))
  7145  	for {
  7146  		if v_0.Op != ssaop.OpWasmI64Const {
  7147  			break
  7148  		}
  7149  		x := ssa.AuxIntToInt64(v_0.AuxInt)
  7150  		y := v_1
  7151  		if !(y.Op != ssaop.OpWasmI64Const) {
  7152  			break
  7153  		}
  7154  		v.Reset(ssaop.OpWasmI64Xor)
  7155  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7156  		v0.AuxInt = ssa.Int64ToAuxInt(x)
  7157  		v.AddArg2(y, v0)
  7158  		return true
  7159  	}
  7160  	return false
  7161  }
  7162  func rewriteValue_OpZero(v *ssa.Value) bool {
  7163  	v_1 := v.Args[1]
  7164  	v_0 := v.Args[0]
  7165  	b := v.Block
  7166  	typ := &b.Func.Config.Types
  7167  	// match: (Zero [0] _ mem)
  7168  	// result: mem
  7169  	for {
  7170  		if ssa.AuxIntToInt64(v.AuxInt) != 0 {
  7171  			break
  7172  		}
  7173  		mem := v_1
  7174  		v.CopyOf(mem)
  7175  		return true
  7176  	}
  7177  	// match: (Zero [1] destptr mem)
  7178  	// result: (I64Store8 destptr (I64Const [0]) mem)
  7179  	for {
  7180  		if ssa.AuxIntToInt64(v.AuxInt) != 1 {
  7181  			break
  7182  		}
  7183  		destptr := v_0
  7184  		mem := v_1
  7185  		v.Reset(ssaop.OpWasmI64Store8)
  7186  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7187  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7188  		v.AddArg3(destptr, v0, mem)
  7189  		return true
  7190  	}
  7191  	// match: (Zero [2] destptr mem)
  7192  	// result: (I64Store16 destptr (I64Const [0]) mem)
  7193  	for {
  7194  		if ssa.AuxIntToInt64(v.AuxInt) != 2 {
  7195  			break
  7196  		}
  7197  		destptr := v_0
  7198  		mem := v_1
  7199  		v.Reset(ssaop.OpWasmI64Store16)
  7200  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7201  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7202  		v.AddArg3(destptr, v0, mem)
  7203  		return true
  7204  	}
  7205  	// match: (Zero [4] destptr mem)
  7206  	// result: (I64Store32 destptr (I64Const [0]) mem)
  7207  	for {
  7208  		if ssa.AuxIntToInt64(v.AuxInt) != 4 {
  7209  			break
  7210  		}
  7211  		destptr := v_0
  7212  		mem := v_1
  7213  		v.Reset(ssaop.OpWasmI64Store32)
  7214  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7215  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7216  		v.AddArg3(destptr, v0, mem)
  7217  		return true
  7218  	}
  7219  	// match: (Zero [8] destptr mem)
  7220  	// result: (I64Store destptr (I64Const [0]) mem)
  7221  	for {
  7222  		if ssa.AuxIntToInt64(v.AuxInt) != 8 {
  7223  			break
  7224  		}
  7225  		destptr := v_0
  7226  		mem := v_1
  7227  		v.Reset(ssaop.OpWasmI64Store)
  7228  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7229  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7230  		v.AddArg3(destptr, v0, mem)
  7231  		return true
  7232  	}
  7233  	// match: (Zero [3] destptr mem)
  7234  	// result: (I64Store8 [2] destptr (I64Const [0]) (I64Store16 destptr (I64Const [0]) mem))
  7235  	for {
  7236  		if ssa.AuxIntToInt64(v.AuxInt) != 3 {
  7237  			break
  7238  		}
  7239  		destptr := v_0
  7240  		mem := v_1
  7241  		v.Reset(ssaop.OpWasmI64Store8)
  7242  		v.AuxInt = ssa.Int64ToAuxInt(2)
  7243  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7244  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7245  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store16, types.TypeMem)
  7246  		v1.AddArg3(destptr, v0, mem)
  7247  		v.AddArg3(destptr, v0, v1)
  7248  		return true
  7249  	}
  7250  	// match: (Zero [5] destptr mem)
  7251  	// result: (I64Store8 [4] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  7252  	for {
  7253  		if ssa.AuxIntToInt64(v.AuxInt) != 5 {
  7254  			break
  7255  		}
  7256  		destptr := v_0
  7257  		mem := v_1
  7258  		v.Reset(ssaop.OpWasmI64Store8)
  7259  		v.AuxInt = ssa.Int64ToAuxInt(4)
  7260  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7261  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7262  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store32, types.TypeMem)
  7263  		v1.AddArg3(destptr, v0, mem)
  7264  		v.AddArg3(destptr, v0, v1)
  7265  		return true
  7266  	}
  7267  	// match: (Zero [6] destptr mem)
  7268  	// result: (I64Store16 [4] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  7269  	for {
  7270  		if ssa.AuxIntToInt64(v.AuxInt) != 6 {
  7271  			break
  7272  		}
  7273  		destptr := v_0
  7274  		mem := v_1
  7275  		v.Reset(ssaop.OpWasmI64Store16)
  7276  		v.AuxInt = ssa.Int64ToAuxInt(4)
  7277  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7278  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7279  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store32, types.TypeMem)
  7280  		v1.AddArg3(destptr, v0, mem)
  7281  		v.AddArg3(destptr, v0, v1)
  7282  		return true
  7283  	}
  7284  	// match: (Zero [7] destptr mem)
  7285  	// result: (I64Store32 [3] destptr (I64Const [0]) (I64Store32 destptr (I64Const [0]) mem))
  7286  	for {
  7287  		if ssa.AuxIntToInt64(v.AuxInt) != 7 {
  7288  			break
  7289  		}
  7290  		destptr := v_0
  7291  		mem := v_1
  7292  		v.Reset(ssaop.OpWasmI64Store32)
  7293  		v.AuxInt = ssa.Int64ToAuxInt(3)
  7294  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7295  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7296  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store32, types.TypeMem)
  7297  		v1.AddArg3(destptr, v0, mem)
  7298  		v.AddArg3(destptr, v0, v1)
  7299  		return true
  7300  	}
  7301  	// match: (Zero [s] destptr mem)
  7302  	// cond: s%8 != 0 && s > 8 && s < 32
  7303  	// result: (Zero [s-s%8] (OffPtr <destptr.Type> destptr [s%8]) (I64Store destptr (I64Const [0]) mem))
  7304  	for {
  7305  		s := ssa.AuxIntToInt64(v.AuxInt)
  7306  		destptr := v_0
  7307  		mem := v_1
  7308  		if !(s%8 != 0 && s > 8 && s < 32) {
  7309  			break
  7310  		}
  7311  		v.Reset(ssaop.OpZero)
  7312  		v.AuxInt = ssa.Int64ToAuxInt(s - s%8)
  7313  		v0 := b.NewValue0(v.Pos, ssaop.OpOffPtr, destptr.Type)
  7314  		v0.AuxInt = ssa.Int64ToAuxInt(s % 8)
  7315  		v0.AddArg(destptr)
  7316  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7317  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7318  		v2.AuxInt = ssa.Int64ToAuxInt(0)
  7319  		v1.AddArg3(destptr, v2, mem)
  7320  		v.AddArg2(v0, v1)
  7321  		return true
  7322  	}
  7323  	// match: (Zero [16] destptr mem)
  7324  	// result: (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem))
  7325  	for {
  7326  		if ssa.AuxIntToInt64(v.AuxInt) != 16 {
  7327  			break
  7328  		}
  7329  		destptr := v_0
  7330  		mem := v_1
  7331  		v.Reset(ssaop.OpWasmI64Store)
  7332  		v.AuxInt = ssa.Int64ToAuxInt(8)
  7333  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7334  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7335  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7336  		v1.AddArg3(destptr, v0, mem)
  7337  		v.AddArg3(destptr, v0, v1)
  7338  		return true
  7339  	}
  7340  	// match: (Zero [24] destptr mem)
  7341  	// result: (I64Store [16] destptr (I64Const [0]) (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem)))
  7342  	for {
  7343  		if ssa.AuxIntToInt64(v.AuxInt) != 24 {
  7344  			break
  7345  		}
  7346  		destptr := v_0
  7347  		mem := v_1
  7348  		v.Reset(ssaop.OpWasmI64Store)
  7349  		v.AuxInt = ssa.Int64ToAuxInt(16)
  7350  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7351  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7352  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7353  		v1.AuxInt = ssa.Int64ToAuxInt(8)
  7354  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7355  		v2.AddArg3(destptr, v0, mem)
  7356  		v1.AddArg3(destptr, v0, v2)
  7357  		v.AddArg3(destptr, v0, v1)
  7358  		return true
  7359  	}
  7360  	// match: (Zero [32] destptr mem)
  7361  	// result: (I64Store [24] destptr (I64Const [0]) (I64Store [16] destptr (I64Const [0]) (I64Store [8] destptr (I64Const [0]) (I64Store destptr (I64Const [0]) mem))))
  7362  	for {
  7363  		if ssa.AuxIntToInt64(v.AuxInt) != 32 {
  7364  			break
  7365  		}
  7366  		destptr := v_0
  7367  		mem := v_1
  7368  		v.Reset(ssaop.OpWasmI64Store)
  7369  		v.AuxInt = ssa.Int64ToAuxInt(24)
  7370  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7371  		v0.AuxInt = ssa.Int64ToAuxInt(0)
  7372  		v1 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7373  		v1.AuxInt = ssa.Int64ToAuxInt(16)
  7374  		v2 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7375  		v2.AuxInt = ssa.Int64ToAuxInt(8)
  7376  		v3 := b.NewValue0(v.Pos, ssaop.OpWasmI64Store, types.TypeMem)
  7377  		v3.AddArg3(destptr, v0, mem)
  7378  		v2.AddArg3(destptr, v0, v3)
  7379  		v1.AddArg3(destptr, v0, v2)
  7380  		v.AddArg3(destptr, v0, v1)
  7381  		return true
  7382  	}
  7383  	// match: (Zero [s] destptr mem)
  7384  	// result: (LoweredZero [s] destptr mem)
  7385  	for {
  7386  		s := ssa.AuxIntToInt64(v.AuxInt)
  7387  		destptr := v_0
  7388  		mem := v_1
  7389  		v.Reset(ssaop.OpWasmLoweredZero)
  7390  		v.AuxInt = ssa.Int64ToAuxInt(s)
  7391  		v.AddArg2(destptr, mem)
  7392  		return true
  7393  	}
  7394  }
  7395  func rewriteValue_OpZeroExt16to32(v *ssa.Value) bool {
  7396  	v_0 := v.Args[0]
  7397  	b := v.Block
  7398  	typ := &b.Func.Config.Types
  7399  	// match: (ZeroExt16to32 x:(I64Load16U _ _))
  7400  	// result: x
  7401  	for {
  7402  		x := v_0
  7403  		if x.Op != ssaop.OpWasmI64Load16U {
  7404  			break
  7405  		}
  7406  		v.CopyOf(x)
  7407  		return true
  7408  	}
  7409  	// match: (ZeroExt16to32 x)
  7410  	// result: (I64And x (I64Const [0xffff]))
  7411  	for {
  7412  		x := v_0
  7413  		v.Reset(ssaop.OpWasmI64And)
  7414  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7415  		v0.AuxInt = ssa.Int64ToAuxInt(0xffff)
  7416  		v.AddArg2(x, v0)
  7417  		return true
  7418  	}
  7419  }
  7420  func rewriteValue_OpZeroExt16to64(v *ssa.Value) bool {
  7421  	v_0 := v.Args[0]
  7422  	b := v.Block
  7423  	typ := &b.Func.Config.Types
  7424  	// match: (ZeroExt16to64 x:(I64Load16U _ _))
  7425  	// result: x
  7426  	for {
  7427  		x := v_0
  7428  		if x.Op != ssaop.OpWasmI64Load16U {
  7429  			break
  7430  		}
  7431  		v.CopyOf(x)
  7432  		return true
  7433  	}
  7434  	// match: (ZeroExt16to64 x)
  7435  	// result: (I64And x (I64Const [0xffff]))
  7436  	for {
  7437  		x := v_0
  7438  		v.Reset(ssaop.OpWasmI64And)
  7439  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7440  		v0.AuxInt = ssa.Int64ToAuxInt(0xffff)
  7441  		v.AddArg2(x, v0)
  7442  		return true
  7443  	}
  7444  }
  7445  func rewriteValue_OpZeroExt32to64(v *ssa.Value) bool {
  7446  	v_0 := v.Args[0]
  7447  	b := v.Block
  7448  	typ := &b.Func.Config.Types
  7449  	// match: (ZeroExt32to64 x:(I64Load32U _ _))
  7450  	// result: x
  7451  	for {
  7452  		x := v_0
  7453  		if x.Op != ssaop.OpWasmI64Load32U {
  7454  			break
  7455  		}
  7456  		v.CopyOf(x)
  7457  		return true
  7458  	}
  7459  	// match: (ZeroExt32to64 x)
  7460  	// result: (I64And x (I64Const [0xffffffff]))
  7461  	for {
  7462  		x := v_0
  7463  		v.Reset(ssaop.OpWasmI64And)
  7464  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7465  		v0.AuxInt = ssa.Int64ToAuxInt(0xffffffff)
  7466  		v.AddArg2(x, v0)
  7467  		return true
  7468  	}
  7469  }
  7470  func rewriteValue_OpZeroExt8to16(v *ssa.Value) bool {
  7471  	v_0 := v.Args[0]
  7472  	b := v.Block
  7473  	typ := &b.Func.Config.Types
  7474  	// match: (ZeroExt8to16 x:(I64Load8U _ _))
  7475  	// result: x
  7476  	for {
  7477  		x := v_0
  7478  		if x.Op != ssaop.OpWasmI64Load8U {
  7479  			break
  7480  		}
  7481  		v.CopyOf(x)
  7482  		return true
  7483  	}
  7484  	// match: (ZeroExt8to16 x)
  7485  	// result: (I64And x (I64Const [0xff]))
  7486  	for {
  7487  		x := v_0
  7488  		v.Reset(ssaop.OpWasmI64And)
  7489  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7490  		v0.AuxInt = ssa.Int64ToAuxInt(0xff)
  7491  		v.AddArg2(x, v0)
  7492  		return true
  7493  	}
  7494  }
  7495  func rewriteValue_OpZeroExt8to32(v *ssa.Value) bool {
  7496  	v_0 := v.Args[0]
  7497  	b := v.Block
  7498  	typ := &b.Func.Config.Types
  7499  	// match: (ZeroExt8to32 x:(I64Load8U _ _))
  7500  	// result: x
  7501  	for {
  7502  		x := v_0
  7503  		if x.Op != ssaop.OpWasmI64Load8U {
  7504  			break
  7505  		}
  7506  		v.CopyOf(x)
  7507  		return true
  7508  	}
  7509  	// match: (ZeroExt8to32 x)
  7510  	// result: (I64And x (I64Const [0xff]))
  7511  	for {
  7512  		x := v_0
  7513  		v.Reset(ssaop.OpWasmI64And)
  7514  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7515  		v0.AuxInt = ssa.Int64ToAuxInt(0xff)
  7516  		v.AddArg2(x, v0)
  7517  		return true
  7518  	}
  7519  }
  7520  func rewriteValue_OpZeroExt8to64(v *ssa.Value) bool {
  7521  	v_0 := v.Args[0]
  7522  	b := v.Block
  7523  	typ := &b.Func.Config.Types
  7524  	// match: (ZeroExt8to64 x:(I64Load8U _ _))
  7525  	// result: x
  7526  	for {
  7527  		x := v_0
  7528  		if x.Op != ssaop.OpWasmI64Load8U {
  7529  			break
  7530  		}
  7531  		v.CopyOf(x)
  7532  		return true
  7533  	}
  7534  	// match: (ZeroExt8to64 x)
  7535  	// result: (I64And x (I64Const [0xff]))
  7536  	for {
  7537  		x := v_0
  7538  		v.Reset(ssaop.OpWasmI64And)
  7539  		v0 := b.NewValue0(v.Pos, ssaop.OpWasmI64Const, typ.Int64)
  7540  		v0.AuxInt = ssa.Int64ToAuxInt(0xff)
  7541  		v.AddArg2(x, v0)
  7542  		return true
  7543  	}
  7544  }
  7545  func RewriteBlock(b *ssa.Block) bool {
  7546  	return false
  7547  }
  7548  

View as plain text