diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2020-02-26 11:29:34 -0800 |
---|---|---|
committer | Josh Bleecher Snyder <josharian@gmail.com> | 2020-03-01 15:27:58 +0000 |
commit | 7913f7dfcf2c281b99c6ddd278aa851de47ada9d (patch) | |
tree | 8a34c42a6e16c5c7864d49030ed474dddff2ff82 /src/cmd/compile/internal/ssa/rewriteWasm.go | |
parent | a908e09a34fff3c47efab69857d27bf6965b948a (diff) | |
download | go-7913f7dfcf2c281b99c6ddd278aa851de47ada9d.tar.gz go-7913f7dfcf2c281b99c6ddd278aa851de47ada9d.zip |
cmd/compile: add specialized AddArgN functions for rewrite rules
This shrinks the compiler without impacting performance.
(The performance-sensitive part of rewrite rules is the non-match case.)
Passes toolstash-check -all.
Executable size:
file before after Δ %
compile 20356168 20163960 -192208 -0.944%
total 115599376 115407168 -192208 -0.166%
Text size:
file before after Δ %
cmd/compile/internal/ssa.s 3928309 3778774 -149535 -3.807%
total 18862943 18713408 -149535 -0.793%
Memory allocated compiling package SSA:
SSA 12.7M ± 0% 12.5M ± 0% -1.74% (p=0.008 n=5+5)
Compiler speed impact:
name old time/op new time/op delta
Template 211ms ± 1% 211ms ± 2% ~ (p=0.832 n=49+49)
Unicode 82.8ms ± 2% 83.2ms ± 2% +0.44% (p=0.022 n=46+49)
GoTypes 726ms ± 1% 728ms ± 2% ~ (p=0.076 n=46+48)
Compiler 3.39s ± 2% 3.40s ± 2% ~ (p=0.633 n=48+49)
SSA 7.71s ± 1% 7.65s ± 1% -0.78% (p=0.000 n=45+44)
Flate 134ms ± 1% 134ms ± 1% ~ (p=0.195 n=50+49)
GoParser 167ms ± 1% 167ms ± 1% ~ (p=0.390 n=47+47)
Reflect 453ms ± 3% 452ms ± 2% ~ (p=0.492 n=48+49)
Tar 184ms ± 3% 184ms ± 2% ~ (p=0.862 n=50+48)
XML 248ms ± 2% 248ms ± 2% ~ (p=0.096 n=49+47)
[Geo mean] 415ms 415ms -0.03%
name old user-time/op new user-time/op delta
Template 273ms ± 1% 273ms ± 2% ~ (p=0.711 n=48+48)
Unicode 117ms ± 6% 117ms ± 5% ~ (p=0.633 n=50+50)
GoTypes 972ms ± 2% 974ms ± 1% +0.29% (p=0.016 n=47+49)
Compiler 4.46s ± 6% 4.51s ± 6% ~ (p=0.093 n=50+50)
SSA 10.4s ± 1% 10.3s ± 2% -0.94% (p=0.000 n=45+50)
Flate 166ms ± 2% 167ms ± 2% ~ (p=0.148 n=49+48)
GoParser 202ms ± 1% 202ms ± 2% -0.28% (p=0.014 n=47+49)
Reflect 594ms ± 2% 594ms ± 2% ~ (p=0.717 n=48+49)
Tar 224ms ± 2% 224ms ± 2% ~ (p=0.805 n=50+49)
XML 311ms ± 1% 310ms ± 1% ~ (p=0.177 n=49+48)
[Geo mean] 537ms 537ms +0.01%
Change-Id: I562b9f349b34ddcff01771769e6dbbc80604da7a
Reviewed-on: https://go-review.googlesource.com/c/go/+/221237
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewriteWasm.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteWasm.go | 735 |
1 files changed, 226 insertions, 509 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteWasm.go b/src/cmd/compile/internal/ssa/rewriteWasm.go index 90701067ce..81acd7e7c4 100644 --- a/src/cmd/compile/internal/ssa/rewriteWasm.go +++ b/src/cmd/compile/internal/ssa/rewriteWasm.go @@ -685,10 +685,9 @@ func rewriteValueWasm_OpBitLen64(v *Value) bool { v.reset(OpWasmI64Sub) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 64 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Clz, typ.Int64) v1.AddArg(x) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -701,10 +700,9 @@ func rewriteValueWasm_OpCom16(v *Value) bool { for { x := v_0 v.reset(OpWasmI64Xor) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = -1 - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -717,10 +715,9 @@ func rewriteValueWasm_OpCom32(v *Value) bool { for { x := v_0 v.reset(OpWasmI64Xor) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = -1 - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -733,10 +730,9 @@ func rewriteValueWasm_OpCom64(v *Value) bool { for { x := v_0 v.reset(OpWasmI64Xor) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = -1 - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -749,10 +745,9 @@ func rewriteValueWasm_OpCom8(v *Value) bool { for { x := v_0 v.reset(OpWasmI64Xor) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = -1 - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -775,10 +770,9 @@ func rewriteValueWasm_OpCtz16(v *Value) bool { x := v_0 v.reset(OpWasmI64Ctz) v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 0x10000 - v0.AddArg(v1) + v0.AddArg2(x, v1) v.AddArg(v0) return true } @@ -793,10 +787,9 @@ func rewriteValueWasm_OpCtz32(v *Value) bool { x := v_0 v.reset(OpWasmI64Ctz) v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 0x100000000 - v0.AddArg(v1) + v0.AddArg2(x, v1) v.AddArg(v0) return true } @@ -811,10 +804,9 @@ func rewriteValueWasm_OpCtz8(v *Value) bool { x := v_0 v.reset(OpWasmI64Ctz) v0 := b.NewValue0(v.Pos, OpWasmI64Or, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 0x100 - v0.AddArg(v1) + v0.AddArg2(x, v1) v.AddArg(v0) return true } @@ -892,10 +884,9 @@ func rewriteValueWasm_OpDiv16(v *Value) bool { v.reset(OpWasmI64DivS) v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -912,10 +903,9 @@ func rewriteValueWasm_OpDiv16u(v *Value) bool { v.reset(OpWasmI64DivU) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -932,10 +922,9 @@ func rewriteValueWasm_OpDiv32(v *Value) bool { v.reset(OpWasmI64DivS) v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -952,10 +941,9 @@ func rewriteValueWasm_OpDiv32u(v *Value) bool { v.reset(OpWasmI64DivU) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -972,10 +960,9 @@ func rewriteValueWasm_OpDiv8(v *Value) bool { v.reset(OpWasmI64DivS) v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -992,10 +979,9 @@ func rewriteValueWasm_OpDiv8u(v *Value) bool { v.reset(OpWasmI64DivU) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1012,10 +998,9 @@ func rewriteValueWasm_OpEq16(v *Value) bool { v.reset(OpWasmI64Eq) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1032,10 +1017,9 @@ func rewriteValueWasm_OpEq32(v *Value) bool { v.reset(OpWasmI64Eq) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1052,10 +1036,9 @@ func rewriteValueWasm_OpEq8(v *Value) bool { v.reset(OpWasmI64Eq) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1087,10 +1070,9 @@ func rewriteValueWasm_OpLeq16(v *Value) bool { v.reset(OpWasmI64LeS) v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1107,10 +1089,9 @@ func rewriteValueWasm_OpLeq16U(v *Value) bool { v.reset(OpWasmI64LeU) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1127,10 +1108,9 @@ func rewriteValueWasm_OpLeq32(v *Value) bool { v.reset(OpWasmI64LeS) v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1147,10 +1127,9 @@ func rewriteValueWasm_OpLeq32U(v *Value) bool { v.reset(OpWasmI64LeU) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1167,10 +1146,9 @@ func rewriteValueWasm_OpLeq8(v *Value) bool { v.reset(OpWasmI64LeS) v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1187,10 +1165,9 @@ func rewriteValueWasm_OpLeq8U(v *Value) bool { v.reset(OpWasmI64LeU) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1207,10 +1184,9 @@ func rewriteValueWasm_OpLess16(v *Value) bool { v.reset(OpWasmI64LtS) v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1227,10 +1203,9 @@ func rewriteValueWasm_OpLess16U(v *Value) bool { v.reset(OpWasmI64LtU) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1247,10 +1222,9 @@ func rewriteValueWasm_OpLess32(v *Value) bool { v.reset(OpWasmI64LtS) v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1267,10 +1241,9 @@ func rewriteValueWasm_OpLess32U(v *Value) bool { v.reset(OpWasmI64LtU) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1287,10 +1260,9 @@ func rewriteValueWasm_OpLess8(v *Value) bool { v.reset(OpWasmI64LtS) v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1307,10 +1279,9 @@ func rewriteValueWasm_OpLess8U(v *Value) bool { v.reset(OpWasmI64LtU) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1328,8 +1299,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmF32Load) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1343,8 +1313,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmF64Load) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1358,8 +1327,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1373,8 +1341,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load32U) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1388,8 +1355,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load32S) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1403,8 +1369,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load16U) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1418,8 +1383,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load16S) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1433,8 +1397,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load8U) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (Load <t> ptr mem) @@ -1448,8 +1411,7 @@ func rewriteValueWasm_OpLoad(v *Value) bool { break } v.reset(OpWasmI64Load8S) - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } return false @@ -1480,10 +1442,9 @@ func rewriteValueWasm_OpLsh16x16(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1500,10 +1461,9 @@ func rewriteValueWasm_OpLsh16x32(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1520,10 +1480,9 @@ func rewriteValueWasm_OpLsh16x8(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1540,10 +1499,9 @@ func rewriteValueWasm_OpLsh32x16(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1560,10 +1518,9 @@ func rewriteValueWasm_OpLsh32x32(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1580,10 +1537,9 @@ func rewriteValueWasm_OpLsh32x8(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1600,10 +1556,9 @@ func rewriteValueWasm_OpLsh64x16(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1620,10 +1575,9 @@ func rewriteValueWasm_OpLsh64x32(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1642,8 +1596,7 @@ func rewriteValueWasm_OpLsh64x64(v *Value) bool { break } v.reset(OpWasmI64Shl) - v.AddArg(x) - v.AddArg(y) + v.AddArg2(x, y) return true } // match: (Lsh64x64 x (I64Const [c])) @@ -1659,10 +1612,9 @@ func rewriteValueWasm_OpLsh64x64(v *Value) bool { break } v.reset(OpWasmI64Shl) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = c - v.AddArg(v0) + v.AddArg2(x, v0) return true } // match: (Lsh64x64 x (I64Const [c])) @@ -1687,18 +1639,14 @@ func rewriteValueWasm_OpLsh64x64(v *Value) bool { y := v_1 v.reset(OpWasmSelect) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) - v0.AddArg(y) - v.AddArg(v0) + v0.AddArg2(x, y) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 0 - v.AddArg(v1) v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool) - v2.AddArg(y) v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v3.AuxInt = 64 - v2.AddArg(v3) - v.AddArg(v2) + v2.AddArg2(y, v3) + v.AddArg3(v0, v1, v2) return true } } @@ -1715,10 +1663,9 @@ func rewriteValueWasm_OpLsh64x8(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1735,10 +1682,9 @@ func rewriteValueWasm_OpLsh8x16(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1755,10 +1701,9 @@ func rewriteValueWasm_OpLsh8x32(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1775,10 +1720,9 @@ func rewriteValueWasm_OpLsh8x8(v *Value) bool { y := v_1 v.reset(OpLsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -1795,10 +1739,9 @@ func rewriteValueWasm_OpMod16(v *Value) bool { v.reset(OpWasmI64RemS) v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1815,10 +1758,9 @@ func rewriteValueWasm_OpMod16u(v *Value) bool { v.reset(OpWasmI64RemU) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1835,10 +1777,9 @@ func rewriteValueWasm_OpMod32(v *Value) bool { v.reset(OpWasmI64RemS) v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1855,10 +1796,9 @@ func rewriteValueWasm_OpMod32u(v *Value) bool { v.reset(OpWasmI64RemU) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1875,10 +1815,9 @@ func rewriteValueWasm_OpMod8(v *Value) bool { v.reset(OpWasmI64RemS) v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1895,10 +1834,9 @@ func rewriteValueWasm_OpMod8u(v *Value) bool { v.reset(OpWasmI64RemU) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -1930,12 +1868,9 @@ func rewriteValueWasm_OpMove(v *Value) bool { src := v_1 mem := v_2 v.reset(OpWasmI64Store8) - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8) - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) - v.AddArg(mem) + v0.AddArg2(src, mem) + v.AddArg3(dst, v0, mem) return true } // match: (Move [2] dst src mem) @@ -1948,12 +1883,9 @@ func rewriteValueWasm_OpMove(v *Value) bool { src := v_1 mem := v_2 v.reset(OpWasmI64Store16) - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16) - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) - v.AddArg(mem) + v0.AddArg2(src, mem) + v.AddArg3(dst, v0, mem) return true } // match: (Move [4] dst src mem) @@ -1966,12 +1898,9 @@ func rewriteValueWasm_OpMove(v *Value) bool { src := v_1 mem := v_2 v.reset(OpWasmI64Store32) - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32) - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) - v.AddArg(mem) + v0.AddArg2(src, mem) + v.AddArg3(dst, v0, mem) return true } // match: (Move [8] dst src mem) @@ -1984,12 +1913,9 @@ func rewriteValueWasm_OpMove(v *Value) bool { src := v_1 mem := v_2 v.reset(OpWasmI64Store) - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) - v.AddArg(mem) + v0.AddArg2(src, mem) + v.AddArg3(dst, v0, mem) return true } // match: (Move [16] dst src mem) @@ -2003,20 +1929,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { mem := v_2 v.reset(OpWasmI64Store) v.AuxInt = 8 - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) v0.AuxInt = 8 - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) + v0.AddArg2(src, mem) v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) - v2.AddArg(src) - v2.AddArg(mem) - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v2.AddArg2(src, mem) + v1.AddArg3(dst, v2, mem) + v.AddArg3(dst, v0, v1) return true } // match: (Move [3] dst src mem) @@ -2030,20 +1950,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { mem := v_2 v.reset(OpWasmI64Store8) v.AuxInt = 2 - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8) v0.AuxInt = 2 - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) + v0.AddArg2(src, mem) v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem) - v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16) - v2.AddArg(src) - v2.AddArg(mem) - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v2.AddArg2(src, mem) + v1.AddArg3(dst, v2, mem) + v.AddArg3(dst, v0, v1) return true } // match: (Move [5] dst src mem) @@ -2057,20 +1971,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { mem := v_2 v.reset(OpWasmI64Store8) v.AuxInt = 4 - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load8U, typ.UInt8) v0.AuxInt = 4 - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) + v0.AddArg2(src, mem) v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem) - v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32) - v2.AddArg(src) - v2.AddArg(mem) - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v2.AddArg2(src, mem) + v1.AddArg3(dst, v2, mem) + v.AddArg3(dst, v0, v1) return true } // match: (Move [6] dst src mem) @@ -2084,20 +1992,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { mem := v_2 v.reset(OpWasmI64Store16) v.AuxInt = 4 - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load16U, typ.UInt16) v0.AuxInt = 4 - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) + v0.AddArg2(src, mem) v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem) - v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32) - v2.AddArg(src) - v2.AddArg(mem) - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v2.AddArg2(src, mem) + v1.AddArg3(dst, v2, mem) + v.AddArg3(dst, v0, v1) return true } // match: (Move [7] dst src mem) @@ -2111,20 +2013,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { mem := v_2 v.reset(OpWasmI64Store32) v.AuxInt = 3 - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32) v0.AuxInt = 3 - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) + v0.AddArg2(src, mem) v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem) - v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpWasmI64Load32U, typ.UInt32) - v2.AddArg(src) - v2.AddArg(mem) - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v2.AddArg2(src, mem) + v1.AddArg3(dst, v2, mem) + v.AddArg3(dst, v0, v1) return true } // match: (Move [s] dst src mem) @@ -2140,20 +2036,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { } v.reset(OpWasmI64Store) v.AuxInt = s - 8 - v.AddArg(dst) v0 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) v0.AuxInt = s - 8 - v0.AddArg(src) - v0.AddArg(mem) - v.AddArg(v0) + v0.AddArg2(src, mem) v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v1.AddArg(dst) v2 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) - v2.AddArg(src) - v2.AddArg(mem) - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v2.AddArg2(src, mem) + v1.AddArg3(dst, v2, mem) + v.AddArg3(dst, v0, v1) return true } // match: (Move [s] dst src mem) @@ -2172,19 +2062,14 @@ func rewriteValueWasm_OpMove(v *Value) bool { v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type) v0.AuxInt = s % 16 v0.AddArg(dst) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type) v1.AuxInt = s % 16 v1.AddArg(src) - v.AddArg(v1) v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v2.AddArg(dst) v3 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) - v3.AddArg(src) - v3.AddArg(mem) - v2.AddArg(v3) - v2.AddArg(mem) - v.AddArg(v2) + v3.AddArg2(src, mem) + v2.AddArg3(dst, v3, mem) + v.AddArg3(v0, v1, v2) return true } // match: (Move [s] dst src mem) @@ -2203,28 +2088,20 @@ func rewriteValueWasm_OpMove(v *Value) bool { v0 := b.NewValue0(v.Pos, OpOffPtr, dst.Type) v0.AuxInt = s % 16 v0.AddArg(dst) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpOffPtr, src.Type) v1.AuxInt = s % 16 v1.AddArg(src) - v.AddArg(v1) v2 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) v2.AuxInt = 8 - v2.AddArg(dst) v3 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) v3.AuxInt = 8 - v3.AddArg(src) - v3.AddArg(mem) - v2.AddArg(v3) + v3.AddArg2(src, mem) v4 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v4.AddArg(dst) v5 := b.NewValue0(v.Pos, OpWasmI64Load, typ.UInt64) - v5.AddArg(src) - v5.AddArg(mem) - v4.AddArg(v5) - v4.AddArg(mem) - v2.AddArg(v4) - v.AddArg(v2) + v5.AddArg2(src, mem) + v4.AddArg3(dst, v5, mem) + v2.AddArg3(dst, v3, v4) + v.AddArg3(v0, v1, v2) return true } // match: (Move [s] dst src mem) @@ -2240,9 +2117,7 @@ func rewriteValueWasm_OpMove(v *Value) bool { } v.reset(OpWasmLoweredMove) v.AuxInt = s / 8 - v.AddArg(dst) - v.AddArg(src) - v.AddArg(mem) + v.AddArg3(dst, src, mem) return true } return false @@ -2258,8 +2133,7 @@ func rewriteValueWasm_OpNeg16(v *Value) bool { v.reset(OpWasmI64Sub) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(x) + v.AddArg2(v0, x) return true } } @@ -2274,8 +2148,7 @@ func rewriteValueWasm_OpNeg32(v *Value) bool { v.reset(OpWasmI64Sub) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(x) + v.AddArg2(v0, x) return true } } @@ -2290,8 +2163,7 @@ func rewriteValueWasm_OpNeg64(v *Value) bool { v.reset(OpWasmI64Sub) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(x) + v.AddArg2(v0, x) return true } } @@ -2306,8 +2178,7 @@ func rewriteValueWasm_OpNeg8(v *Value) bool { v.reset(OpWasmI64Sub) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(x) + v.AddArg2(v0, x) return true } } @@ -2324,10 +2195,9 @@ func rewriteValueWasm_OpNeq16(v *Value) bool { v.reset(OpWasmI64Ne) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2344,10 +2214,9 @@ func rewriteValueWasm_OpNeq32(v *Value) bool { v.reset(OpWasmI64Ne) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2364,10 +2233,9 @@ func rewriteValueWasm_OpNeq8(v *Value) bool { v.reset(OpWasmI64Ne) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2432,17 +2300,14 @@ func rewriteValueWasm_OpRotateLeft16(v *Value) bool { c := v_1.AuxInt v.reset(OpOr16) v0 := b.NewValue0(v.Pos, OpLsh16x64, t) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = c & 15 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpRsh16Ux64, t) - v2.AddArg(x) v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v3.AuxInt = -c & 15 - v2.AddArg(v3) - v.AddArg(v2) + v2.AddArg2(x, v3) + v.AddArg2(v0, v2) return true } return false @@ -2463,17 +2328,14 @@ func rewriteValueWasm_OpRotateLeft8(v *Value) bool { c := v_1.AuxInt v.reset(OpOr8) v0 := b.NewValue0(v.Pos, OpLsh8x64, t) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = c & 7 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpRsh8Ux64, t) - v2.AddArg(x) v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v3.AuxInt = -c & 7 - v2.AddArg(v3) - v.AddArg(v2) + v2.AddArg2(x, v3) + v.AddArg2(v0, v2) return true } return false @@ -2493,10 +2355,9 @@ func rewriteValueWasm_OpRsh16Ux16(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2515,10 +2376,9 @@ func rewriteValueWasm_OpRsh16Ux32(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2537,8 +2397,7 @@ func rewriteValueWasm_OpRsh16Ux64(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) - v.AddArg(y) + v.AddArg2(v0, y) return true } } @@ -2557,10 +2416,9 @@ func rewriteValueWasm_OpRsh16Ux8(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2579,10 +2437,9 @@ func rewriteValueWasm_OpRsh16x16(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2601,10 +2458,9 @@ func rewriteValueWasm_OpRsh16x32(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2623,8 +2479,7 @@ func rewriteValueWasm_OpRsh16x64(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) - v.AddArg(y) + v.AddArg2(v0, y) return true } } @@ -2643,10 +2498,9 @@ func rewriteValueWasm_OpRsh16x8(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2665,10 +2519,9 @@ func rewriteValueWasm_OpRsh32Ux16(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2687,10 +2540,9 @@ func rewriteValueWasm_OpRsh32Ux32(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2709,8 +2561,7 @@ func rewriteValueWasm_OpRsh32Ux64(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) - v.AddArg(y) + v.AddArg2(v0, y) return true } } @@ -2729,10 +2580,9 @@ func rewriteValueWasm_OpRsh32Ux8(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2751,10 +2601,9 @@ func rewriteValueWasm_OpRsh32x16(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2773,10 +2622,9 @@ func rewriteValueWasm_OpRsh32x32(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2795,8 +2643,7 @@ func rewriteValueWasm_OpRsh32x64(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) - v.AddArg(y) + v.AddArg2(v0, y) return true } } @@ -2815,10 +2662,9 @@ func rewriteValueWasm_OpRsh32x8(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -2835,10 +2681,9 @@ func rewriteValueWasm_OpRsh64Ux16(v *Value) bool { y := v_1 v.reset(OpRsh64Ux64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -2855,10 +2700,9 @@ func rewriteValueWasm_OpRsh64Ux32(v *Value) bool { y := v_1 v.reset(OpRsh64Ux64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -2877,8 +2721,7 @@ func rewriteValueWasm_OpRsh64Ux64(v *Value) bool { break } v.reset(OpWasmI64ShrU) - v.AddArg(x) - v.AddArg(y) + v.AddArg2(x, y) return true } // match: (Rsh64Ux64 x (I64Const [c])) @@ -2894,10 +2737,9 @@ func rewriteValueWasm_OpRsh64Ux64(v *Value) bool { break } v.reset(OpWasmI64ShrU) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = c - v.AddArg(v0) + v.AddArg2(x, v0) return true } // match: (Rsh64Ux64 x (I64Const [c])) @@ -2922,18 +2764,14 @@ func rewriteValueWasm_OpRsh64Ux64(v *Value) bool { y := v_1 v.reset(OpWasmSelect) v0 := b.NewValue0(v.Pos, OpWasmI64ShrU, typ.Int64) - v0.AddArg(x) - v0.AddArg(y) - v.AddArg(v0) + v0.AddArg2(x, y) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 0 - v.AddArg(v1) v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool) - v2.AddArg(y) v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v3.AuxInt = 64 - v2.AddArg(v3) - v.AddArg(v2) + v2.AddArg2(y, v3) + v.AddArg3(v0, v1, v2) return true } } @@ -2950,10 +2788,9 @@ func rewriteValueWasm_OpRsh64Ux8(v *Value) bool { y := v_1 v.reset(OpRsh64Ux64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -2970,10 +2807,9 @@ func rewriteValueWasm_OpRsh64x16(v *Value) bool { y := v_1 v.reset(OpRsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -2990,10 +2826,9 @@ func rewriteValueWasm_OpRsh64x32(v *Value) bool { y := v_1 v.reset(OpRsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -3012,8 +2847,7 @@ func rewriteValueWasm_OpRsh64x64(v *Value) bool { break } v.reset(OpWasmI64ShrS) - v.AddArg(x) - v.AddArg(y) + v.AddArg2(x, y) return true } // match: (Rsh64x64 x (I64Const [c])) @@ -3029,10 +2863,9 @@ func rewriteValueWasm_OpRsh64x64(v *Value) bool { break } v.reset(OpWasmI64ShrS) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = c - v.AddArg(v0) + v.AddArg2(x, v0) return true } // match: (Rsh64x64 x (I64Const [c])) @@ -3048,10 +2881,9 @@ func rewriteValueWasm_OpRsh64x64(v *Value) bool { break } v.reset(OpWasmI64ShrS) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 63 - v.AddArg(v0) + v.AddArg2(x, v0) return true } // match: (Rsh64x64 x y) @@ -3060,19 +2892,15 @@ func rewriteValueWasm_OpRsh64x64(v *Value) bool { x := v_0 y := v_1 v.reset(OpWasmI64ShrS) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmSelect, typ.Int64) - v0.AddArg(y) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 63 - v0.AddArg(v1) v2 := b.NewValue0(v.Pos, OpWasmI64LtU, typ.Bool) - v2.AddArg(y) v3 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v3.AuxInt = 64 - v2.AddArg(v3) - v0.AddArg(v2) - v.AddArg(v0) + v2.AddArg2(y, v3) + v0.AddArg3(y, v1, v2) + v.AddArg2(x, v0) return true } } @@ -3089,10 +2917,9 @@ func rewriteValueWasm_OpRsh64x8(v *Value) bool { y := v_1 v.reset(OpRsh64x64) v.AuxInt = c - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(y) - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -3111,10 +2938,9 @@ func rewriteValueWasm_OpRsh8Ux16(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -3133,10 +2959,9 @@ func rewriteValueWasm_OpRsh8Ux32(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -3155,8 +2980,7 @@ func rewriteValueWasm_OpRsh8Ux64(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) - v.AddArg(y) + v.AddArg2(v0, y) return true } } @@ -3175,10 +2999,9 @@ func rewriteValueWasm_OpRsh8Ux8(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -3197,10 +3020,9 @@ func rewriteValueWasm_OpRsh8x16(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -3219,10 +3041,9 @@ func rewriteValueWasm_OpRsh8x32(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -3241,8 +3062,7 @@ func rewriteValueWasm_OpRsh8x64(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) - v.AddArg(y) + v.AddArg2(v0, y) return true } } @@ -3261,10 +3081,9 @@ func rewriteValueWasm_OpRsh8x8(v *Value) bool { v.AuxInt = c v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64) v0.AddArg(x) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64) v1.AddArg(y) - v.AddArg(v1) + v.AddArg2(v0, v1) return true } } @@ -3303,14 +3122,12 @@ func rewriteValueWasm_OpSignExt16to32(v *Value) bool { x := v_0 v.reset(OpWasmI64ShrS) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 48 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 48 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3349,14 +3166,12 @@ func rewriteValueWasm_OpSignExt16to64(v *Value) bool { x := v_0 v.reset(OpWasmI64ShrS) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 48 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 48 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3395,14 +3210,12 @@ func rewriteValueWasm_OpSignExt32to64(v *Value) bool { x := v_0 v.reset(OpWasmI64ShrS) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 32 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 32 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3441,14 +3254,12 @@ func rewriteValueWasm_OpSignExt8to16(v *Value) bool { x := v_0 v.reset(OpWasmI64ShrS) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 56 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 56 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3487,14 +3298,12 @@ func rewriteValueWasm_OpSignExt8to32(v *Value) bool { x := v_0 v.reset(OpWasmI64ShrS) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 56 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 56 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3533,14 +3342,12 @@ func rewriteValueWasm_OpSignExt8to64(v *Value) bool { x := v_0 v.reset(OpWasmI64ShrS) v0 := b.NewValue0(v.Pos, OpWasmI64Shl, typ.Int64) - v0.AddArg(x) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 56 - v0.AddArg(v1) - v.AddArg(v0) + v0.AddArg2(x, v1) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 56 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3556,12 +3363,10 @@ func rewriteValueWasm_OpSlicemask(v *Value) bool { v0 := b.NewValue0(v.Pos, OpWasmI64Sub, typ.Int64) v1 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v1.AuxInt = 0 - v0.AddArg(v1) - v0.AddArg(x) - v.AddArg(v0) + v0.AddArg2(v1, x) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 63 - v.AddArg(v2) + v.AddArg2(v0, v2) return true } } @@ -3581,9 +3386,7 @@ func rewriteValueWasm_OpStore(v *Value) bool { break } v.reset(OpWasmF64Store) - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } // match: (Store {t} ptr val mem) @@ -3598,9 +3401,7 @@ func rewriteValueWasm_OpStore(v *Value) bool { break } v.reset(OpWasmF32Store) - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } // match: (Store {t} ptr val mem) @@ -3615,9 +3416,7 @@ func rewriteValueWasm_OpStore(v *Value) bool { break } v.reset(OpWasmI64Store) - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } // match: (Store {t} ptr val mem) @@ -3632,9 +3431,7 @@ func rewriteValueWasm_OpStore(v *Value) bool { break } v.reset(OpWasmI64Store32) - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } // match: (Store {t} ptr val mem) @@ -3649,9 +3446,7 @@ func rewriteValueWasm_OpStore(v *Value) bool { break } v.reset(OpWasmI64Store16) - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } // match: (Store {t} ptr val mem) @@ -3666,9 +3461,7 @@ func rewriteValueWasm_OpStore(v *Value) bool { break } v.reset(OpWasmI64Store8) - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } return false @@ -3702,10 +3495,9 @@ func rewriteValueWasm_OpWasmF64Add(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmF64Add) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } return false @@ -3739,10 +3531,9 @@ func rewriteValueWasm_OpWasmF64Mul(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmF64Mul) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmF64Const, typ.Float64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } return false @@ -3776,10 +3567,9 @@ func rewriteValueWasm_OpWasmI64Add(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64Add) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } // match: (I64Add x (I64Const [y])) @@ -3862,10 +3652,9 @@ func rewriteValueWasm_OpWasmI64And(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64And) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } return false @@ -3922,10 +3711,9 @@ func rewriteValueWasm_OpWasmI64Eq(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64Eq) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } // match: (I64Eq x (I64Const [0])) @@ -3981,8 +3769,7 @@ func rewriteValueWasm_OpWasmI64Load(v *Value) bool { } v.reset(OpWasmI64Load) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (I64Load [off] (LoweredAddr {sym} [off2] (SB)) _) @@ -4024,8 +3811,7 @@ func rewriteValueWasm_OpWasmI64Load16S(v *Value) bool { } v.reset(OpWasmI64Load16S) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } return false @@ -4051,8 +3837,7 @@ func rewriteValueWasm_OpWasmI64Load16U(v *Value) bool { } v.reset(OpWasmI64Load16U) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (I64Load16U [off] (LoweredAddr {sym} [off2] (SB)) _) @@ -4094,8 +3879,7 @@ func rewriteValueWasm_OpWasmI64Load32S(v *Value) bool { } v.reset(OpWasmI64Load32S) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } return false @@ -4121,8 +3905,7 @@ func rewriteValueWasm_OpWasmI64Load32U(v *Value) bool { } v.reset(OpWasmI64Load32U) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (I64Load32U [off] (LoweredAddr {sym} [off2] (SB)) _) @@ -4164,8 +3947,7 @@ func rewriteValueWasm_OpWasmI64Load8S(v *Value) bool { } v.reset(OpWasmI64Load8S) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } return false @@ -4189,8 +3971,7 @@ func rewriteValueWasm_OpWasmI64Load8U(v *Value) bool { } v.reset(OpWasmI64Load8U) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(mem) + v.AddArg2(ptr, mem) return true } // match: (I64Load8U [off] (LoweredAddr {sym} [off2] (SB)) _) @@ -4242,10 +4023,9 @@ func rewriteValueWasm_OpWasmI64Mul(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64Mul) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } return false @@ -4302,10 +4082,9 @@ func rewriteValueWasm_OpWasmI64Ne(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64Ne) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } // match: (I64Ne x (I64Const [0])) @@ -4352,10 +4131,9 @@ func rewriteValueWasm_OpWasmI64Or(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64Or) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } return false @@ -4441,9 +4219,7 @@ func rewriteValueWasm_OpWasmI64Store(v *Value) bool { } v.reset(OpWasmI64Store) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } return false @@ -4469,9 +4245,7 @@ func rewriteValueWasm_OpWasmI64Store16(v *Value) bool { } v.reset(OpWasmI64Store16) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } return false @@ -4497,9 +4271,7 @@ func rewriteValueWasm_OpWasmI64Store32(v *Value) bool { } v.reset(OpWasmI64Store32) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } return false @@ -4525,9 +4297,7 @@ func rewriteValueWasm_OpWasmI64Store8(v *Value) bool { } v.reset(OpWasmI64Store8) v.AuxInt = off + off2 - v.AddArg(ptr) - v.AddArg(val) - v.AddArg(mem) + v.AddArg3(ptr, val, mem) return true } return false @@ -4561,10 +4331,9 @@ func rewriteValueWasm_OpWasmI64Xor(v *Value) bool { x := v_0.AuxInt y := v_1 v.reset(OpWasmI64Xor) - v.AddArg(y) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = x - v.AddArg(v0) + v.AddArg2(y, v0) return true } return false @@ -4595,11 +4364,9 @@ func rewriteValueWasm_OpZero(v *Value) bool { destptr := v_0 mem := v_1 v.reset(OpWasmI64Store8) - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(mem) + v.AddArg3(destptr, v0, mem) return true } // match: (Zero [2] destptr mem) @@ -4611,11 +4378,9 @@ func rewriteValueWasm_OpZero(v *Value) bool { destptr := v_0 mem := v_1 v.reset(OpWasmI64Store16) - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(mem) + v.AddArg3(destptr, v0, mem) return true } // match: (Zero [4] destptr mem) @@ -4627,11 +4392,9 @@ func rewriteValueWasm_OpZero(v *Value) bool { destptr := v_0 mem := v_1 v.reset(OpWasmI64Store32) - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(mem) + v.AddArg3(destptr, v0, mem) return true } // match: (Zero [8] destptr mem) @@ -4643,11 +4406,9 @@ func rewriteValueWasm_OpZero(v *Value) bool { destptr := v_0 mem := v_1 v.reset(OpWasmI64Store) - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) - v.AddArg(mem) + v.AddArg3(destptr, v0, mem) return true } // match: (Zero [3] destptr mem) @@ -4660,17 +4421,13 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store8) v.AuxInt = 2 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store16, types.TypeMem) - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v1.AddArg3(destptr, v2, mem) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [5] destptr mem) @@ -4683,17 +4440,13 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store8) v.AuxInt = 4 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem) - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v1.AddArg3(destptr, v2, mem) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [6] destptr mem) @@ -4706,17 +4459,13 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store16) v.AuxInt = 4 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem) - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v1.AddArg3(destptr, v2, mem) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [7] destptr mem) @@ -4729,17 +4478,13 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store32) v.AuxInt = 3 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store32, types.TypeMem) - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v1.AddArg3(destptr, v2, mem) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [s] destptr mem) @@ -4757,14 +4502,11 @@ func rewriteValueWasm_OpZero(v *Value) bool { v0 := b.NewValue0(v.Pos, OpOffPtr, destptr.Type) v0.AuxInt = s % 8 v0.AddArg(destptr) - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v1.AddArg3(destptr, v2, mem) + v.AddArg2(v0, v1) return true } // match: (Zero [16] destptr mem) @@ -4777,17 +4519,13 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store) v.AuxInt = 8 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) - v1.AddArg(mem) - v.AddArg(v1) + v1.AddArg3(destptr, v2, mem) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [24] destptr mem) @@ -4800,24 +4538,18 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store) v.AuxInt = 16 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) v1.AuxInt = 8 - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v3.AddArg(destptr) v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v4.AuxInt = 0 - v3.AddArg(v4) - v3.AddArg(mem) - v1.AddArg(v3) - v.AddArg(v1) + v3.AddArg3(destptr, v4, mem) + v1.AddArg3(destptr, v2, v3) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [32] destptr mem) @@ -4830,31 +4562,23 @@ func rewriteValueWasm_OpZero(v *Value) bool { mem := v_1 v.reset(OpWasmI64Store) v.AuxInt = 24 - v.AddArg(destptr) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0 - v.AddArg(v0) v1 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) v1.AuxInt = 16 - v1.AddArg(destptr) v2 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v2.AuxInt = 0 - v1.AddArg(v2) v3 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) v3.AuxInt = 8 - v3.AddArg(destptr) v4 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v4.AuxInt = 0 - v3.AddArg(v4) v5 := b.NewValue0(v.Pos, OpWasmI64Store, types.TypeMem) - v5.AddArg(destptr) v6 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v6.AuxInt = 0 - v5.AddArg(v6) - v5.AddArg(mem) - v3.AddArg(v5) - v1.AddArg(v3) - v.AddArg(v1) + v5.AddArg3(destptr, v6, mem) + v3.AddArg3(destptr, v4, v5) + v1.AddArg3(destptr, v2, v3) + v.AddArg3(destptr, v0, v1) return true } // match: (Zero [s] destptr mem) @@ -4869,8 +4593,7 @@ func rewriteValueWasm_OpZero(v *Value) bool { } v.reset(OpWasmLoweredZero) v.AuxInt = s / 8 - v.AddArg(destptr) - v.AddArg(mem) + v.AddArg2(destptr, mem) return true } return false @@ -4897,10 +4620,9 @@ func rewriteValueWasm_OpZeroExt16to32(v *Value) bool { for { x := v_0 v.reset(OpWasmI64And) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0xffff - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -4926,10 +4648,9 @@ func rewriteValueWasm_OpZeroExt16to64(v *Value) bool { for { x := v_0 v.reset(OpWasmI64And) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0xffff - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -4955,10 +4676,9 @@ func rewriteValueWasm_OpZeroExt32to64(v *Value) bool { for { x := v_0 v.reset(OpWasmI64And) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0xffffffff - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -4984,10 +4704,9 @@ func rewriteValueWasm_OpZeroExt8to16(v *Value) bool { for { x := v_0 v.reset(OpWasmI64And) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0xff - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -5013,10 +4732,9 @@ func rewriteValueWasm_OpZeroExt8to32(v *Value) bool { for { x := v_0 v.reset(OpWasmI64And) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0xff - v.AddArg(v0) + v.AddArg2(x, v0) return true } } @@ -5042,10 +4760,9 @@ func rewriteValueWasm_OpZeroExt8to64(v *Value) bool { for { x := v_0 v.reset(OpWasmI64And) - v.AddArg(x) v0 := b.NewValue0(v.Pos, OpWasmI64Const, typ.Int64) v0.AuxInt = 0xff - v.AddArg(v0) + v.AddArg2(x, v0) return true } } |