diff options
author | Michael Munday <mike.munday@ibm.com> | 2019-03-13 10:32:48 +0000 |
---|---|---|
committer | Michael Munday <mike.munday@ibm.com> | 2019-03-13 15:11:37 +0000 |
commit | 04f1b65cc6ffbaa3693bbcb57ae26fb59466531b (patch) | |
tree | 08789a47f4032d5bb2ad8e5d2b0da8ea544bc356 /src/cmd/compile/internal/ssa/rewritedec64.go | |
parent | 5d4fa147c70b5ec2dfa812220c1ddc135e3b5381 (diff) | |
download | go-04f1b65cc6ffbaa3693bbcb57ae26fb59466531b.tar.gz go-04f1b65cc6ffbaa3693bbcb57ae26fb59466531b.zip |
cmd/compile: try and access last argument first in rulegen
This reduces the number of extra bounds check hints we need to
insert. For example, rather than producing:
_ = v.Args[2]
x := v.Args[0]
y := v.Args[1]
z := v.Args[2]
We now produce:
z := v.Args[2]
x := v.Args[0]
y := v.Args[1]
This gets rid of about 7000 lines of code from the rewrite rules.
Change-Id: I1291cf0f82e8d035a6d65bce7dee6cedee04cbcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/167397
Reviewed-by: Daniel Martà <mvdan@mvdan.cc>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewritedec64.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewritedec64.go | 202 |
1 files changed, 66 insertions, 136 deletions
diff --git a/src/cmd/compile/internal/ssa/rewritedec64.go b/src/cmd/compile/internal/ssa/rewritedec64.go index eef5483c30..5a143a92a7 100644 --- a/src/cmd/compile/internal/ssa/rewritedec64.go +++ b/src/cmd/compile/internal/ssa/rewritedec64.go @@ -143,9 +143,8 @@ func rewriteValuedec64_OpAdd64_0(v *Value) bool { // cond: // result: (Int64Make (Add32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Add32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Add32carry (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpAdd32withcarry, typ.Int32) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -185,9 +184,8 @@ func rewriteValuedec64_OpAnd64_0(v *Value) bool { // cond: // result: (Int64Make (And32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (And32 <typ.UInt32> (Int64Lo x) (Int64Lo y))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpAnd32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -459,9 +457,8 @@ func rewriteValuedec64_OpEq64_0(v *Value) bool { // cond: // result: (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Eq32 (Int64Lo x) (Int64Lo y))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpAndB) v0 := b.NewValue0(v.Pos, OpEq32, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -489,9 +486,8 @@ func rewriteValuedec64_OpGeq64_0(v *Value) bool { // cond: // result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpGreater32, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -529,9 +525,8 @@ func rewriteValuedec64_OpGeq64U_0(v *Value) bool { // cond: // result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpGreater32U, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -569,9 +564,8 @@ func rewriteValuedec64_OpGreater64_0(v *Value) bool { // cond: // result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpGreater32, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -609,9 +603,8 @@ func rewriteValuedec64_OpGreater64U_0(v *Value) bool { // cond: // result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpGreater32U, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -669,7 +662,6 @@ func rewriteValuedec64_OpInt64Lo_0(v *Value) bool { if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] lo := v_0.Args[1] v.reset(OpCopy) v.Type = lo.Type @@ -685,9 +677,8 @@ func rewriteValuedec64_OpLeq64_0(v *Value) bool { // cond: // result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpLess32, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -725,9 +716,8 @@ func rewriteValuedec64_OpLeq64U_0(v *Value) bool { // cond: // result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpLess32U, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -765,9 +755,8 @@ func rewriteValuedec64_OpLess64_0(v *Value) bool { // cond: // result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpLess32, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -805,9 +794,8 @@ func rewriteValuedec64_OpLess64U_0(v *Value) bool { // cond: // result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpLess32U, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -847,9 +835,8 @@ func rewriteValuedec64_OpLoad_0(v *Value) bool { // result: (Int64Make (Load <typ.Int32> (OffPtr <typ.Int32Ptr> [4] ptr) mem) (Load <typ.UInt32> ptr mem)) for { t := v.Type - _ = v.Args[1] - ptr := v.Args[0] mem := v.Args[1] + ptr := v.Args[0] if !(is64BitInt(t) && !config.BigEndian && t.IsSigned()) { break } @@ -872,9 +859,8 @@ func rewriteValuedec64_OpLoad_0(v *Value) bool { // result: (Int64Make (Load <typ.UInt32> (OffPtr <typ.UInt32Ptr> [4] ptr) mem) (Load <typ.UInt32> ptr mem)) for { t := v.Type - _ = v.Args[1] - ptr := v.Args[0] mem := v.Args[1] + ptr := v.Args[0] if !(is64BitInt(t) && !config.BigEndian && !t.IsSigned()) { break } @@ -897,9 +883,8 @@ func rewriteValuedec64_OpLoad_0(v *Value) bool { // result: (Int64Make (Load <typ.Int32> ptr mem) (Load <typ.UInt32> (OffPtr <typ.UInt32Ptr> [4] ptr) mem)) for { t := v.Type - _ = v.Args[1] - ptr := v.Args[0] mem := v.Args[1] + ptr := v.Args[0] if !(is64BitInt(t) && config.BigEndian && t.IsSigned()) { break } @@ -922,9 +907,8 @@ func rewriteValuedec64_OpLoad_0(v *Value) bool { // result: (Int64Make (Load <typ.UInt32> ptr mem) (Load <typ.UInt32> (OffPtr <typ.UInt32Ptr> [4] ptr) mem)) for { t := v.Type - _ = v.Args[1] - ptr := v.Args[0] mem := v.Args[1] + ptr := v.Args[0] if !(is64BitInt(t) && config.BigEndian && !t.IsSigned()) { break } @@ -979,7 +963,7 @@ func rewriteValuedec64_OpLsh16x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -987,7 +971,6 @@ func rewriteValuedec64_OpLsh16x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpLsh16x32) v.AddArg(x) v.AddArg(lo) @@ -1003,9 +986,8 @@ func rewriteValuedec64_OpLsh16x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1056,7 +1038,7 @@ func rewriteValuedec64_OpLsh32x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1064,7 +1046,6 @@ func rewriteValuedec64_OpLsh32x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpLsh32x32) v.AddArg(x) v.AddArg(lo) @@ -1080,9 +1061,8 @@ func rewriteValuedec64_OpLsh32x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1105,15 +1085,13 @@ func rewriteValuedec64_OpLsh64x16_0(v *Value) bool { // cond: // result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x16 <typ.UInt32> hi s) (Rsh32Ux16 <typ.UInt32> lo (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Lsh32x16 <typ.UInt32> lo (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))) (Lsh32x16 <typ.UInt32> lo s)) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) @@ -1156,15 +1134,13 @@ func rewriteValuedec64_OpLsh64x32_0(v *Value) bool { // cond: // result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> hi s) (Rsh32Ux32 <typ.UInt32> lo (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Lsh32x32 <typ.UInt32> lo (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))) (Lsh32x32 <typ.UInt32> lo s)) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) @@ -1235,7 +1211,7 @@ func rewriteValuedec64_OpLsh64x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1243,7 +1219,6 @@ func rewriteValuedec64_OpLsh64x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpLsh64x32) v.AddArg(x) v.AddArg(lo) @@ -1259,9 +1234,8 @@ func rewriteValuedec64_OpLsh64x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1284,15 +1258,13 @@ func rewriteValuedec64_OpLsh64x8_0(v *Value) bool { // cond: // result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x8 <typ.UInt32> hi s) (Rsh32Ux8 <typ.UInt32> lo (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Lsh32x8 <typ.UInt32> lo (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))) (Lsh32x8 <typ.UInt32> lo s)) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) @@ -1363,7 +1335,7 @@ func rewriteValuedec64_OpLsh8x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1371,7 +1343,6 @@ func rewriteValuedec64_OpLsh8x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpLsh8x32) v.AddArg(x) v.AddArg(lo) @@ -1387,9 +1358,8 @@ func rewriteValuedec64_OpLsh8x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1412,9 +1382,8 @@ func rewriteValuedec64_OpMul64_0(v *Value) bool { // cond: // result: (Int64Make (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Lo x) (Int64Hi y)) (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Hi x) (Int64Lo y)) (Select0 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y))))) (Select1 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpAdd32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpMul32, typ.UInt32) @@ -1482,9 +1451,8 @@ func rewriteValuedec64_OpNeq64_0(v *Value) bool { // cond: // result: (OrB (Neq32 (Int64Hi x) (Int64Hi y)) (Neq32 (Int64Lo x) (Int64Lo y))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpOrB) v0 := b.NewValue0(v.Pos, OpNeq32, typ.Bool) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -1512,9 +1480,8 @@ func rewriteValuedec64_OpOr64_0(v *Value) bool { // cond: // result: (Int64Make (Or32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Or32 <typ.UInt32> (Int64Lo x) (Int64Lo y))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpOr32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -1570,7 +1537,7 @@ func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1578,7 +1545,6 @@ func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh16Ux32) v.AddArg(x) v.AddArg(lo) @@ -1594,9 +1560,8 @@ func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1650,7 +1615,7 @@ func rewriteValuedec64_OpRsh16x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1658,7 +1623,6 @@ func rewriteValuedec64_OpRsh16x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh16x32) v.AddArg(x) v.AddArg(lo) @@ -1674,9 +1638,8 @@ func rewriteValuedec64_OpRsh16x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1727,7 +1690,7 @@ func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1735,7 +1698,6 @@ func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh32Ux32) v.AddArg(x) v.AddArg(lo) @@ -1751,9 +1713,8 @@ func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1805,7 +1766,7 @@ func rewriteValuedec64_OpRsh32x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1813,7 +1774,6 @@ func rewriteValuedec64_OpRsh32x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh32x32) v.AddArg(x) v.AddArg(lo) @@ -1829,9 +1789,8 @@ func rewriteValuedec64_OpRsh32x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -1854,15 +1813,13 @@ func rewriteValuedec64_OpRsh64Ux16_0(v *Value) bool { // cond: // result: (Int64Make (Rsh32Ux16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Rsh32Ux16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))))) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpRsh32Ux16, typ.UInt32) v0.AddArg(hi) @@ -1905,15 +1862,13 @@ func rewriteValuedec64_OpRsh64Ux32_0(v *Value) bool { // cond: // result: (Int64Make (Rsh32Ux32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Rsh32Ux32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))))) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpRsh32Ux32, typ.UInt32) v0.AddArg(hi) @@ -1984,7 +1939,7 @@ func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -1992,7 +1947,6 @@ func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh64Ux32) v.AddArg(x) v.AddArg(lo) @@ -2008,9 +1962,8 @@ func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -2033,15 +1986,13 @@ func rewriteValuedec64_OpRsh64Ux8_0(v *Value) bool { // cond: // result: (Int64Make (Rsh32Ux8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Rsh32Ux8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))))) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpRsh32Ux8, typ.UInt32) v0.AddArg(hi) @@ -2084,15 +2035,13 @@ func rewriteValuedec64_OpRsh64x16_0(v *Value) bool { // cond: // result: (Int64Make (Rsh32x16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (And32 <typ.UInt32> (Rsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))) (Zeromask (ZeroExt16to32 (Rsh16Ux32 <typ.UInt16> s (Const32 <typ.UInt32> [5]))))))) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpRsh32x16, typ.UInt32) v0.AddArg(hi) @@ -2147,15 +2096,13 @@ func rewriteValuedec64_OpRsh64x32_0(v *Value) bool { // cond: // result: (Int64Make (Rsh32x32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (And32 <typ.UInt32> (Rsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))) (Zeromask (Rsh32Ux32 <typ.UInt32> s (Const32 <typ.UInt32> [5])))))) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpRsh32x32, typ.UInt32) v0.AddArg(hi) @@ -2246,7 +2193,7 @@ func rewriteValuedec64_OpRsh64x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -2254,7 +2201,6 @@ func rewriteValuedec64_OpRsh64x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh64x32) v.AddArg(x) v.AddArg(lo) @@ -2270,9 +2216,8 @@ func rewriteValuedec64_OpRsh64x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -2295,15 +2240,13 @@ func rewriteValuedec64_OpRsh64x8_0(v *Value) bool { // cond: // result: (Int64Make (Rsh32x8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (And32 <typ.UInt32> (Rsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))) (Zeromask (ZeroExt8to32 (Rsh8Ux32 <typ.UInt8> s (Const32 <typ.UInt32> [5]))))))) for { - _ = v.Args[1] + s := v.Args[1] v_0 := v.Args[0] if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] - hi := v_0.Args[0] lo := v_0.Args[1] - s := v.Args[1] + hi := v_0.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpRsh32x8, typ.UInt32) v0.AddArg(hi) @@ -2386,7 +2329,7 @@ func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -2394,7 +2337,6 @@ func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh8Ux32) v.AddArg(x) v.AddArg(lo) @@ -2410,9 +2352,8 @@ func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -2466,7 +2407,7 @@ func rewriteValuedec64_OpRsh8x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] + lo := v_1.Args[1] v_1_0 := v_1.Args[0] if v_1_0.Op != OpConst32 { break @@ -2474,7 +2415,6 @@ func rewriteValuedec64_OpRsh8x64_0(v *Value) bool { if v_1_0.AuxInt != 0 { break } - lo := v_1.Args[1] v.reset(OpRsh8x32) v.AddArg(x) v.AddArg(lo) @@ -2490,9 +2430,8 @@ func rewriteValuedec64_OpRsh8x64_0(v *Value) bool { if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] + hi := v_1.Args[0] if !(hi.Op != OpConst32) { break } @@ -2562,16 +2501,14 @@ func rewriteValuedec64_OpStore_0(v *Value) bool { // result: (Store {hi.Type} (OffPtr <hi.Type.PtrTo()> [4] dst) hi (Store {lo.Type} dst lo mem)) for { t := v.Aux - _ = v.Args[2] + mem := v.Args[2] dst := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] - mem := v.Args[2] + hi := v_1.Args[0] if !(t.(*types.Type).Size() == 8 && !config.BigEndian) { break } @@ -2595,16 +2532,14 @@ func rewriteValuedec64_OpStore_0(v *Value) bool { // result: (Store {lo.Type} (OffPtr <lo.Type.PtrTo()> [4] dst) lo (Store {hi.Type} dst hi mem)) for { t := v.Aux - _ = v.Args[2] + mem := v.Args[2] dst := v.Args[0] v_1 := v.Args[1] if v_1.Op != OpInt64Make { break } - _ = v_1.Args[1] - hi := v_1.Args[0] lo := v_1.Args[1] - mem := v.Args[2] + hi := v_1.Args[0] if !(t.(*types.Type).Size() == 8 && config.BigEndian) { break } @@ -2632,9 +2567,8 @@ func rewriteValuedec64_OpSub64_0(v *Value) bool { // cond: // result: (Int64Make (Sub32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Sub32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Sub32carry (Int64Lo x) (Int64Lo y)))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpSub32withcarry, typ.Int32) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) @@ -2676,7 +2610,6 @@ func rewriteValuedec64_OpTrunc64to16_0(v *Value) bool { if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] lo := v_0.Args[1] v.reset(OpTrunc32to16) v.AddArg(lo) @@ -2693,7 +2626,6 @@ func rewriteValuedec64_OpTrunc64to32_0(v *Value) bool { if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] lo := v_0.Args[1] v.reset(OpCopy) v.Type = lo.Type @@ -2711,7 +2643,6 @@ func rewriteValuedec64_OpTrunc64to8_0(v *Value) bool { if v_0.Op != OpInt64Make { break } - _ = v_0.Args[1] lo := v_0.Args[1] v.reset(OpTrunc32to8) v.AddArg(lo) @@ -2726,9 +2657,8 @@ func rewriteValuedec64_OpXor64_0(v *Value) bool { // cond: // result: (Int64Make (Xor32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Xor32 <typ.UInt32> (Int64Lo x) (Int64Lo y))) for { - _ = v.Args[1] - x := v.Args[0] y := v.Args[1] + x := v.Args[0] v.reset(OpInt64Make) v0 := b.NewValue0(v.Pos, OpXor32, typ.UInt32) v1 := b.NewValue0(v.Pos, OpInt64Hi, typ.UInt32) |