Source file src/cmd/compile/internal/ssa/rewrite/wasm/rewriteWasm.go

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

View as plain text