aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/rewriteMIPS.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2020-01-20 20:09:41 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2020-02-21 00:55:58 +0000
commita3f234c7060b76a4397c2c38dc778a1f82d7fa17 (patch)
tree07615787799dd316debc3aaece530922bfa81e14 /src/cmd/compile/internal/ssa/rewriteMIPS.go
parenta37bbcecca120ed513035a6d8532367daa4e6a95 (diff)
downloadgo-a3f234c7060b76a4397c2c38dc778a1f82d7fa17.tar.gz
go-a3f234c7060b76a4397c2c38dc778a1f82d7fa17.zip
cmd/compile: reduce bounds checks in generated rewrite rules
CL 213703 converted generated rewrite rules for commutative ops to use loops instead of duplicated code. However, it loaded args using expressions like v.Args[i] and v.Args[i^1], which the compiler could not eliminate bounds for (including with all outstanding prove CLs). Also, given a series of separate rewrite rules for the same op, we generated bounds checks for every rewrite rule, even though we were repeatedly loading the same set of args. This change reduces both sets of bounds checks. Instead of loading v.Args[i] and v.Args[i^1] for commutative loops, we now preload v.Args[0] and v.Args[1] into local variables, and then swap them (as needed) in the commutative loop post statement. And we now load all top level v.Args into local variables at the beginning of every rewrite rule function. The second optimization is the more significant, but the first helps a little, and they play together nicely from the perspective of generating the code. This does increase register pressure, but the reduced bounds checks more than compensate. Note that the vast majority of rewrite rules evaluated are not applied, so the prologue is the most important part of the rewrite rules. There is one subtle aspect to the new generated code. Because the top level v.Args are shared across rewrite rules, and rule evaluation can swap v_0 and v_1, v_0 and v_1 can end up being swapped from one rule to the next. That is OK, because any time a rule does not get applied, they will have been swapped exactly twice. Passes toolstash-check -all. name old time/op new time/op delta Template 213ms ± 2% 211ms ± 2% -0.85% (p=0.000 n=92+96) Unicode 83.5ms ± 2% 83.2ms ± 2% -0.41% (p=0.004 n=95+90) GoTypes 737ms ± 2% 733ms ± 2% -0.51% (p=0.000 n=91+94) Compiler 3.45s ± 2% 3.43s ± 2% -0.44% (p=0.000 n=99+100) SSA 8.54s ± 1% 8.32s ± 2% -2.56% (p=0.000 n=96+99) Flate 136ms ± 2% 135ms ± 1% -0.47% (p=0.000 n=96+96) GoParser 169ms ± 1% 168ms ± 1% -0.33% (p=0.000 n=96+93) Reflect 456ms ± 3% 455ms ± 3% ~ (p=0.261 n=95+94) Tar 186ms ± 2% 185ms ± 2% -0.48% (p=0.000 n=94+95) XML 251ms ± 1% 250ms ± 1% -0.51% (p=0.000 n=91+94) [Geo mean] 424ms 421ms -0.68% name old user-time/op new user-time/op delta Template 275ms ± 1% 274ms ± 2% -0.55% (p=0.000 n=95+98) Unicode 118ms ± 4% 118ms ± 4% ~ (p=0.642 n=98+90) GoTypes 983ms ± 1% 980ms ± 1% -0.30% (p=0.000 n=93+93) Compiler 4.56s ± 6% 4.52s ± 6% -0.72% (p=0.003 n=100+100) SSA 11.4s ± 1% 11.1s ± 1% -2.50% (p=0.000 n=96+97) Flate 168ms ± 1% 167ms ± 1% -0.49% (p=0.000 n=92+92) GoParser 204ms ± 1% 204ms ± 2% -0.27% (p=0.003 n=99+96) Reflect 599ms ± 2% 598ms ± 2% ~ (p=0.116 n=95+92) Tar 227ms ± 2% 225ms ± 2% -0.57% (p=0.000 n=95+98) XML 313ms ± 2% 312ms ± 1% -0.37% (p=0.000 n=89+95) [Geo mean] 547ms 544ms -0.61% file before after Δ % compile 21113112 21109016 -4096 -0.019% total 131704940 131700844 -4096 -0.003% Change-Id: Id6c39e0367e597c0c75b8a4b1eb14cc3cbd11956 Reviewed-on: https://go-review.googlesource.com/c/go/+/216218 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/rewriteMIPS.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewriteMIPS.go1997
1 files changed, 1129 insertions, 868 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS.go b/src/cmd/compile/internal/ssa/rewriteMIPS.go
index 912c4a1082..47adca632e 100644
--- a/src/cmd/compile/internal/ssa/rewriteMIPS.go
+++ b/src/cmd/compile/internal/ssa/rewriteMIPS.go
@@ -525,11 +525,13 @@ func rewriteValueMIPS(v *Value) bool {
return false
}
func rewriteValueMIPS_OpAdd16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add16 x y)
// result: (ADD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADD)
v.AddArg(x)
v.AddArg(y)
@@ -537,11 +539,13 @@ func rewriteValueMIPS_OpAdd16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAdd32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add32 x y)
// result: (ADD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADD)
v.AddArg(x)
v.AddArg(y)
@@ -549,11 +553,13 @@ func rewriteValueMIPS_OpAdd32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAdd32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add32F x y)
// result: (ADDF x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADDF)
v.AddArg(x)
v.AddArg(y)
@@ -561,14 +567,17 @@ func rewriteValueMIPS_OpAdd32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAdd32withcarry_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Add32withcarry <t> x y c)
// result: (ADD c (ADD <t> x y))
for {
t := v.Type
- c := v.Args[2]
- x := v.Args[0]
- y := v.Args[1]
+ x := v_0
+ y := v_1
+ c := v_2
v.reset(OpMIPSADD)
v.AddArg(c)
v0 := b.NewValue0(v.Pos, OpMIPSADD, t)
@@ -579,11 +588,13 @@ func rewriteValueMIPS_OpAdd32withcarry_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAdd64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add64F x y)
// result: (ADDD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADDD)
v.AddArg(x)
v.AddArg(y)
@@ -591,11 +602,13 @@ func rewriteValueMIPS_OpAdd64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAdd8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add8 x y)
// result: (ADD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADD)
v.AddArg(x)
v.AddArg(y)
@@ -603,11 +616,13 @@ func rewriteValueMIPS_OpAdd8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAddPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AddPtr x y)
// result: (ADD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADD)
v.AddArg(x)
v.AddArg(y)
@@ -615,11 +630,12 @@ func rewriteValueMIPS_OpAddPtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAddr_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Addr {sym} base)
// result: (MOVWaddr {sym} base)
for {
sym := v.Aux
- base := v.Args[0]
+ base := v_0
v.reset(OpMIPSMOVWaddr)
v.Aux = sym
v.AddArg(base)
@@ -627,11 +643,13 @@ func rewriteValueMIPS_OpAddr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAnd16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (And16 x y)
// result: (AND x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSAND)
v.AddArg(x)
v.AddArg(y)
@@ -639,11 +657,13 @@ func rewriteValueMIPS_OpAnd16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAnd32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (And32 x y)
// result: (AND x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSAND)
v.AddArg(x)
v.AddArg(y)
@@ -651,11 +671,13 @@ func rewriteValueMIPS_OpAnd32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAnd8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (And8 x y)
// result: (AND x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSAND)
v.AddArg(x)
v.AddArg(y)
@@ -663,11 +685,13 @@ func rewriteValueMIPS_OpAnd8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAndB_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AndB x y)
// result: (AND x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSAND)
v.AddArg(x)
v.AddArg(y)
@@ -675,12 +699,15 @@ func rewriteValueMIPS_OpAndB_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicAdd32_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicAdd32 ptr val mem)
// result: (LoweredAtomicAdd ptr val mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
v.reset(OpMIPSLoweredAtomicAdd)
v.AddArg(ptr)
v.AddArg(val)
@@ -689,6 +716,9 @@ func rewriteValueMIPS_OpAtomicAdd32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicAnd8_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
config := b.Func.Config
typ := &b.Func.Config.Types
@@ -696,9 +726,9 @@ func rewriteValueMIPS_OpAtomicAnd8_0(v *Value) bool {
// cond: !config.BigEndian
// result: (LoweredAtomicAnd (AND <typ.UInt32Ptr> (MOVWconst [^3]) ptr) (OR <typ.UInt32> (SLL <typ.UInt32> (ZeroExt8to32 val) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] ptr))) (NORconst [0] <typ.UInt32> (SLL <typ.UInt32> (MOVWconst [0xff]) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] ptr))))) mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(!config.BigEndian) {
break
}
@@ -745,9 +775,9 @@ func rewriteValueMIPS_OpAtomicAnd8_0(v *Value) bool {
// cond: config.BigEndian
// result: (LoweredAtomicAnd (AND <typ.UInt32Ptr> (MOVWconst [^3]) ptr) (OR <typ.UInt32> (SLL <typ.UInt32> (ZeroExt8to32 val) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] (XORconst <typ.UInt32> [3] ptr)))) (NORconst [0] <typ.UInt32> (SLL <typ.UInt32> (MOVWconst [0xff]) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] (XORconst <typ.UInt32> [3] ptr)))))) mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(config.BigEndian) {
break
}
@@ -799,13 +829,17 @@ func rewriteValueMIPS_OpAtomicAnd8_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpAtomicCompareAndSwap32_0(v *Value) bool {
+ v_3 := v.Args[3]
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicCompareAndSwap32 ptr old new_ mem)
// result: (LoweredAtomicCas ptr old new_ mem)
for {
- mem := v.Args[3]
- ptr := v.Args[0]
- old := v.Args[1]
- new_ := v.Args[2]
+ ptr := v_0
+ old := v_1
+ new_ := v_2
+ mem := v_3
v.reset(OpMIPSLoweredAtomicCas)
v.AddArg(ptr)
v.AddArg(old)
@@ -815,12 +849,15 @@ func rewriteValueMIPS_OpAtomicCompareAndSwap32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicExchange32_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicExchange32 ptr val mem)
// result: (LoweredAtomicExchange ptr val mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
v.reset(OpMIPSLoweredAtomicExchange)
v.AddArg(ptr)
v.AddArg(val)
@@ -829,11 +866,13 @@ func rewriteValueMIPS_OpAtomicExchange32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicLoad32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicLoad32 ptr mem)
// result: (LoweredAtomicLoad32 ptr mem)
for {
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSLoweredAtomicLoad32)
v.AddArg(ptr)
v.AddArg(mem)
@@ -841,11 +880,13 @@ func rewriteValueMIPS_OpAtomicLoad32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicLoad8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicLoad8 ptr mem)
// result: (LoweredAtomicLoad8 ptr mem)
for {
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSLoweredAtomicLoad8)
v.AddArg(ptr)
v.AddArg(mem)
@@ -853,11 +894,13 @@ func rewriteValueMIPS_OpAtomicLoad8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicLoadPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicLoadPtr ptr mem)
// result: (LoweredAtomicLoad32 ptr mem)
for {
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSLoweredAtomicLoad32)
v.AddArg(ptr)
v.AddArg(mem)
@@ -865,6 +908,9 @@ func rewriteValueMIPS_OpAtomicLoadPtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicOr8_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
config := b.Func.Config
typ := &b.Func.Config.Types
@@ -872,9 +918,9 @@ func rewriteValueMIPS_OpAtomicOr8_0(v *Value) bool {
// cond: !config.BigEndian
// result: (LoweredAtomicOr (AND <typ.UInt32Ptr> (MOVWconst [^3]) ptr) (SLL <typ.UInt32> (ZeroExt8to32 val) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] ptr))) mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(!config.BigEndian) {
break
}
@@ -904,9 +950,9 @@ func rewriteValueMIPS_OpAtomicOr8_0(v *Value) bool {
// cond: config.BigEndian
// result: (LoweredAtomicOr (AND <typ.UInt32Ptr> (MOVWconst [^3]) ptr) (SLL <typ.UInt32> (ZeroExt8to32 val) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] (XORconst <typ.UInt32> [3] ptr)))) mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(config.BigEndian) {
break
}
@@ -938,12 +984,15 @@ func rewriteValueMIPS_OpAtomicOr8_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpAtomicStore32_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicStore32 ptr val mem)
// result: (LoweredAtomicStore32 ptr val mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
v.reset(OpMIPSLoweredAtomicStore32)
v.AddArg(ptr)
v.AddArg(val)
@@ -952,12 +1001,15 @@ func rewriteValueMIPS_OpAtomicStore32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicStore8_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicStore8 ptr val mem)
// result: (LoweredAtomicStore8 ptr val mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
v.reset(OpMIPSLoweredAtomicStore8)
v.AddArg(ptr)
v.AddArg(val)
@@ -966,12 +1018,15 @@ func rewriteValueMIPS_OpAtomicStore8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAtomicStorePtrNoWB_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (AtomicStorePtrNoWB ptr val mem)
// result: (LoweredAtomicStore32 ptr val mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
v.reset(OpMIPSLoweredAtomicStore32)
v.AddArg(ptr)
v.AddArg(val)
@@ -980,13 +1035,15 @@ func rewriteValueMIPS_OpAtomicStorePtrNoWB_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpAvg32u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Avg32u <t> x y)
// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSADD)
v0 := b.NewValue0(v.Pos, OpMIPSSRLconst, t)
v0.AuxInt = 1
@@ -1000,13 +1057,14 @@ func rewriteValueMIPS_OpAvg32u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpBitLen32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (BitLen32 <t> x)
// result: (SUB (MOVWconst [32]) (CLZ <t> x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSSUB)
v0 := b.NewValue0(v.Pos, OpMIPSMOVWconst, typ.UInt32)
v0.AuxInt = 32
@@ -1018,13 +1076,16 @@ func rewriteValueMIPS_OpBitLen32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpClosureCall_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (ClosureCall [argwid] entry closure mem)
// result: (CALLclosure [argwid] entry closure mem)
for {
argwid := v.AuxInt
- mem := v.Args[2]
- entry := v.Args[0]
- closure := v.Args[1]
+ entry := v_0
+ closure := v_1
+ mem := v_2
v.reset(OpMIPSCALLclosure)
v.AuxInt = argwid
v.AddArg(entry)
@@ -1034,10 +1095,11 @@ func rewriteValueMIPS_OpClosureCall_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpCom16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com16 x)
// result: (NORconst [0] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNORconst)
v.AuxInt = 0
v.AddArg(x)
@@ -1045,10 +1107,11 @@ func rewriteValueMIPS_OpCom16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpCom32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com32 x)
// result: (NORconst [0] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNORconst)
v.AuxInt = 0
v.AddArg(x)
@@ -1056,10 +1119,11 @@ func rewriteValueMIPS_OpCom32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpCom8_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com8 x)
// result: (NORconst [0] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNORconst)
v.AuxInt = 0
v.AddArg(x)
@@ -1136,13 +1200,14 @@ func rewriteValueMIPS_OpConstNil_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpCtz32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Ctz32 <t> x)
// result: (SUB (MOVWconst [32]) (CLZ <t> (SUBconst <t> [1] (AND <t> x (NEG <t> x)))))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSSUB)
v0 := b.NewValue0(v.Pos, OpMIPSMOVWconst, typ.UInt32)
v0.AuxInt = 32
@@ -1162,83 +1227,92 @@ func rewriteValueMIPS_OpCtz32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpCtz32NonZero_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Ctz32NonZero x)
// result: (Ctz32 x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCtz32)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpCvt32Fto32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32Fto32 x)
// result: (TRUNCFW x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSTRUNCFW)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpCvt32Fto64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32Fto64F x)
// result: (MOVFD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVFD)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpCvt32to32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32to32F x)
// result: (MOVWF x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVWF)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpCvt32to64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32to64F x)
// result: (MOVWD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVWD)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpCvt64Fto32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64Fto32 x)
// result: (TRUNCDW x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSTRUNCDW)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpCvt64Fto32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64Fto32F x)
// result: (MOVDF x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVDF)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpDiv16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Div16 x y)
// result: (Select1 (DIV (SignExt16to32 x) (SignExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect1)
v0 := b.NewValue0(v.Pos, OpMIPSDIV, types.NewTuple(typ.Int32, typ.Int32))
v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
@@ -1252,13 +1326,15 @@ func rewriteValueMIPS_OpDiv16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv16u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Div16u x y)
// result: (Select1 (DIVU (ZeroExt16to32 x) (ZeroExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect1)
v0 := b.NewValue0(v.Pos, OpMIPSDIVU, types.NewTuple(typ.UInt32, typ.UInt32))
v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
@@ -1272,13 +1348,15 @@ func rewriteValueMIPS_OpDiv16u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Div32 x y)
// result: (Select1 (DIV x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect1)
v0 := b.NewValue0(v.Pos, OpMIPSDIV, types.NewTuple(typ.Int32, typ.Int32))
v0.AddArg(x)
@@ -1288,11 +1366,13 @@ func rewriteValueMIPS_OpDiv32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div32F x y)
// result: (DIVF x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSDIVF)
v.AddArg(x)
v.AddArg(y)
@@ -1300,13 +1380,15 @@ func rewriteValueMIPS_OpDiv32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv32u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Div32u x y)
// result: (Select1 (DIVU x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect1)
v0 := b.NewValue0(v.Pos, OpMIPSDIVU, types.NewTuple(typ.UInt32, typ.UInt32))
v0.AddArg(x)
@@ -1316,11 +1398,13 @@ func rewriteValueMIPS_OpDiv32u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div64F x y)
// result: (DIVD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSDIVD)
v.AddArg(x)
v.AddArg(y)
@@ -1328,13 +1412,15 @@ func rewriteValueMIPS_OpDiv64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Div8 x y)
// result: (Select1 (DIV (SignExt8to32 x) (SignExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect1)
v0 := b.NewValue0(v.Pos, OpMIPSDIV, types.NewTuple(typ.Int32, typ.Int32))
v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
@@ -1348,13 +1434,15 @@ func rewriteValueMIPS_OpDiv8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpDiv8u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Div8u x y)
// result: (Select1 (DIVU (ZeroExt8to32 x) (ZeroExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect1)
v0 := b.NewValue0(v.Pos, OpMIPSDIVU, types.NewTuple(typ.UInt32, typ.UInt32))
v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
@@ -1368,13 +1456,15 @@ func rewriteValueMIPS_OpDiv8u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEq16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Eq16 x y)
// result: (SGTUconst [1] (XOR (ZeroExt16to32 x) (ZeroExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTUconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
@@ -1389,13 +1479,15 @@ func rewriteValueMIPS_OpEq16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEq32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Eq32 x y)
// result: (SGTUconst [1] (XOR x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTUconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
@@ -1406,12 +1498,14 @@ func rewriteValueMIPS_OpEq32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Eq32F x y)
// result: (FPFlagTrue (CMPEQF x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPEQF, types.TypeFlags)
v0.AddArg(x)
@@ -1421,12 +1515,14 @@ func rewriteValueMIPS_OpEq32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Eq64F x y)
// result: (FPFlagTrue (CMPEQD x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPEQD, types.TypeFlags)
v0.AddArg(x)
@@ -1436,13 +1532,15 @@ func rewriteValueMIPS_OpEq64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEq8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Eq8 x y)
// result: (SGTUconst [1] (XOR (ZeroExt8to32 x) (ZeroExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTUconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
@@ -1457,13 +1555,15 @@ func rewriteValueMIPS_OpEq8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEqB_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (EqB x y)
// result: (XORconst [1] (XOR <typ.Bool> x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.Bool)
@@ -1474,13 +1574,15 @@ func rewriteValueMIPS_OpEqB_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpEqPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (EqPtr x y)
// result: (SGTUconst [1] (XOR x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTUconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
@@ -1491,13 +1593,15 @@ func rewriteValueMIPS_OpEqPtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq16 x y)
// result: (XORconst [1] (SGT (SignExt16to32 y) (SignExt16to32 x)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGT, typ.Bool)
@@ -1512,13 +1616,15 @@ func rewriteValueMIPS_OpGeq16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq16U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq16U x y)
// result: (XORconst [1] (SGTU (ZeroExt16to32 y) (ZeroExt16to32 x)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -1533,13 +1639,15 @@ func rewriteValueMIPS_OpGeq16U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq32 x y)
// result: (XORconst [1] (SGT y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGT, typ.Bool)
@@ -1550,12 +1658,14 @@ func rewriteValueMIPS_OpGeq32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Geq32F x y)
// result: (FPFlagTrue (CMPGEF x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGEF, types.TypeFlags)
v0.AddArg(x)
@@ -1565,13 +1675,15 @@ func rewriteValueMIPS_OpGeq32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq32U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq32U x y)
// result: (XORconst [1] (SGTU y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -1582,12 +1694,14 @@ func rewriteValueMIPS_OpGeq32U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Geq64F x y)
// result: (FPFlagTrue (CMPGED x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGED, types.TypeFlags)
v0.AddArg(x)
@@ -1597,13 +1711,15 @@ func rewriteValueMIPS_OpGeq64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq8 x y)
// result: (XORconst [1] (SGT (SignExt8to32 y) (SignExt8to32 x)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGT, typ.Bool)
@@ -1618,13 +1734,15 @@ func rewriteValueMIPS_OpGeq8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGeq8U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq8U x y)
// result: (XORconst [1] (SGTU (ZeroExt8to32 y) (ZeroExt8to32 x)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -1663,13 +1781,15 @@ func rewriteValueMIPS_OpGetClosurePtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Greater16 x y)
// result: (SGT (SignExt16to32 x) (SignExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGT)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -1681,13 +1801,15 @@ func rewriteValueMIPS_OpGreater16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater16U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Greater16U x y)
// result: (SGTU (ZeroExt16to32 x) (ZeroExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
v0.AddArg(x)
@@ -1699,11 +1821,13 @@ func rewriteValueMIPS_OpGreater16U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater32 x y)
// result: (SGT x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGT)
v.AddArg(x)
v.AddArg(y)
@@ -1711,12 +1835,14 @@ func rewriteValueMIPS_OpGreater32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Greater32F x y)
// result: (FPFlagTrue (CMPGTF x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGTF, types.TypeFlags)
v0.AddArg(x)
@@ -1726,11 +1852,13 @@ func rewriteValueMIPS_OpGreater32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater32U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater32U x y)
// result: (SGTU x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v.AddArg(x)
v.AddArg(y)
@@ -1738,12 +1866,14 @@ func rewriteValueMIPS_OpGreater32U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Greater64F x y)
// result: (FPFlagTrue (CMPGTD x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGTD, types.TypeFlags)
v0.AddArg(x)
@@ -1753,13 +1883,15 @@ func rewriteValueMIPS_OpGreater64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Greater8 x y)
// result: (SGT (SignExt8to32 x) (SignExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGT)
v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
v0.AddArg(x)
@@ -1771,13 +1903,15 @@ func rewriteValueMIPS_OpGreater8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpGreater8U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Greater8U x y)
// result: (SGTU (ZeroExt8to32 x) (ZeroExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
v0.AddArg(x)
@@ -1789,13 +1923,15 @@ func rewriteValueMIPS_OpGreater8U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpHmul32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Hmul32 x y)
// result: (Select0 (MULT x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSMULT, types.NewTuple(typ.Int32, typ.Int32))
v0.AddArg(x)
@@ -1805,13 +1941,15 @@ func rewriteValueMIPS_OpHmul32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpHmul32u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Hmul32u x y)
// result: (Select0 (MULTU x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSMULTU, types.NewTuple(typ.UInt32, typ.UInt32))
v0.AddArg(x)
@@ -1821,12 +1959,14 @@ func rewriteValueMIPS_OpHmul32u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpInterCall_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (InterCall [argwid] entry mem)
// result: (CALLinter [argwid] entry mem)
for {
argwid := v.AuxInt
- mem := v.Args[1]
- entry := v.Args[0]
+ entry := v_0
+ mem := v_1
v.reset(OpMIPSCALLinter)
v.AuxInt = argwid
v.AddArg(entry)
@@ -1835,11 +1975,13 @@ func rewriteValueMIPS_OpInterCall_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpIsInBounds_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (IsInBounds idx len)
// result: (SGTU len idx)
for {
- len := v.Args[1]
- idx := v.Args[0]
+ idx := v_0
+ len := v_1
v.reset(OpMIPSSGTU)
v.AddArg(len)
v.AddArg(idx)
@@ -1847,12 +1989,13 @@ func rewriteValueMIPS_OpIsInBounds_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpIsNonNil_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (IsNonNil ptr)
// result: (SGTU ptr (MOVWconst [0]))
for {
- ptr := v.Args[0]
+ ptr := v_0
v.reset(OpMIPSSGTU)
v.AddArg(ptr)
v0 := b.NewValue0(v.Pos, OpMIPSMOVWconst, typ.UInt32)
@@ -1862,13 +2005,15 @@ func rewriteValueMIPS_OpIsNonNil_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpIsSliceInBounds_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (IsSliceInBounds idx len)
// result: (XORconst [1] (SGTU idx len))
for {
- len := v.Args[1]
- idx := v.Args[0]
+ idx := v_0
+ len := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -1879,13 +2024,15 @@ func rewriteValueMIPS_OpIsSliceInBounds_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq16 x y)
// result: (XORconst [1] (SGT (SignExt16to32 x) (SignExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGT, typ.Bool)
@@ -1900,13 +2047,15 @@ func rewriteValueMIPS_OpLeq16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq16U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq16U x y)
// result: (XORconst [1] (SGTU (ZeroExt16to32 x) (ZeroExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -1921,13 +2070,15 @@ func rewriteValueMIPS_OpLeq16U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq32 x y)
// result: (XORconst [1] (SGT x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGT, typ.Bool)
@@ -1938,12 +2089,14 @@ func rewriteValueMIPS_OpLeq32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Leq32F x y)
// result: (FPFlagTrue (CMPGEF y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGEF, types.TypeFlags)
v0.AddArg(y)
@@ -1953,13 +2106,15 @@ func rewriteValueMIPS_OpLeq32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq32U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq32U x y)
// result: (XORconst [1] (SGTU x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -1970,12 +2125,14 @@ func rewriteValueMIPS_OpLeq32U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Leq64F x y)
// result: (FPFlagTrue (CMPGED y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGED, types.TypeFlags)
v0.AddArg(y)
@@ -1985,13 +2142,15 @@ func rewriteValueMIPS_OpLeq64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq8 x y)
// result: (XORconst [1] (SGT (SignExt8to32 x) (SignExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGT, typ.Bool)
@@ -2006,13 +2165,15 @@ func rewriteValueMIPS_OpLeq8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLeq8U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq8U x y)
// result: (XORconst [1] (SGTU (ZeroExt8to32 x) (ZeroExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
@@ -2027,13 +2188,15 @@ func rewriteValueMIPS_OpLeq8U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Less16 x y)
// result: (SGT (SignExt16to32 y) (SignExt16to32 x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGT)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(y)
@@ -2045,13 +2208,15 @@ func rewriteValueMIPS_OpLess16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess16U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Less16U x y)
// result: (SGTU (ZeroExt16to32 y) (ZeroExt16to32 x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
v0.AddArg(y)
@@ -2063,11 +2228,13 @@ func rewriteValueMIPS_OpLess16U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Less32 x y)
// result: (SGT y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGT)
v.AddArg(y)
v.AddArg(x)
@@ -2075,12 +2242,14 @@ func rewriteValueMIPS_OpLess32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Less32F x y)
// result: (FPFlagTrue (CMPGTF y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGTF, types.TypeFlags)
v0.AddArg(y)
@@ -2090,11 +2259,13 @@ func rewriteValueMIPS_OpLess32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess32U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Less32U x y)
// result: (SGTU y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v.AddArg(y)
v.AddArg(x)
@@ -2102,12 +2273,14 @@ func rewriteValueMIPS_OpLess32U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Less64F x y)
// result: (FPFlagTrue (CMPGTD y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagTrue)
v0 := b.NewValue0(v.Pos, OpMIPSCMPGTD, types.TypeFlags)
v0.AddArg(y)
@@ -2117,13 +2290,15 @@ func rewriteValueMIPS_OpLess64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Less8 x y)
// result: (SGT (SignExt8to32 y) (SignExt8to32 x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGT)
v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
v0.AddArg(y)
@@ -2135,13 +2310,15 @@ func rewriteValueMIPS_OpLess8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLess8U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Less8U x y)
// result: (SGTU (ZeroExt8to32 y) (ZeroExt8to32 x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
v0.AddArg(y)
@@ -2153,13 +2330,15 @@ func rewriteValueMIPS_OpLess8U_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLoad_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Load <t> ptr mem)
// cond: t.IsBoolean()
// result: (MOVBUload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.IsBoolean()) {
break
}
@@ -2173,8 +2352,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVBload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is8BitInt(t) && isSigned(t)) {
break
}
@@ -2188,8 +2367,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVBUload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is8BitInt(t) && !isSigned(t)) {
break
}
@@ -2203,8 +2382,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVHload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is16BitInt(t) && isSigned(t)) {
break
}
@@ -2218,8 +2397,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVHUload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is16BitInt(t) && !isSigned(t)) {
break
}
@@ -2233,8 +2412,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVWload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is32BitInt(t) || isPtr(t)) {
break
}
@@ -2248,8 +2427,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVFload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is32BitFloat(t)) {
break
}
@@ -2263,8 +2442,8 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
// result: (MOVDload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is64BitFloat(t)) {
break
}
@@ -2276,12 +2455,12 @@ func rewriteValueMIPS_OpLoad_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpLocalAddr_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (LocalAddr {sym} base _)
// result: (MOVWaddr {sym} base)
for {
sym := v.Aux
- _ = v.Args[1]
- base := v.Args[0]
+ base := v_0
v.reset(OpMIPSMOVWaddr)
v.Aux = sym
v.AddArg(base)
@@ -2289,14 +2468,16 @@ func rewriteValueMIPS_OpLocalAddr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh16x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh16x16 <t> x y)
// result: (CMOVZ (SLL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2317,14 +2498,16 @@ func rewriteValueMIPS_OpLsh16x16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh16x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh16x32 <t> x y)
// result: (CMOVZ (SLL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2341,13 +2524,13 @@ func rewriteValueMIPS_OpLsh16x32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh16x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Lsh16x64 x (Const64 [c]))
// cond: uint32(c) < 16
// result: (SLLconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -2364,8 +2547,6 @@ func rewriteValueMIPS_OpLsh16x64_0(v *Value) bool {
// cond: uint32(c) >= 16
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpConst64 {
break
}
@@ -2380,14 +2561,16 @@ func rewriteValueMIPS_OpLsh16x64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpLsh16x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh16x8 <t> x y)
// result: (CMOVZ (SLL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2408,14 +2591,16 @@ func rewriteValueMIPS_OpLsh16x8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh32x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh32x16 <t> x y)
// result: (CMOVZ (SLL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2436,14 +2621,16 @@ func rewriteValueMIPS_OpLsh32x16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh32x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh32x32 <t> x y)
// result: (CMOVZ (SLL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2460,13 +2647,13 @@ func rewriteValueMIPS_OpLsh32x32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh32x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Lsh32x64 x (Const64 [c]))
// cond: uint32(c) < 32
// result: (SLLconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -2483,8 +2670,6 @@ func rewriteValueMIPS_OpLsh32x64_0(v *Value) bool {
// cond: uint32(c) >= 32
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpConst64 {
break
}
@@ -2499,14 +2684,16 @@ func rewriteValueMIPS_OpLsh32x64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpLsh32x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh32x8 <t> x y)
// result: (CMOVZ (SLL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2527,14 +2714,16 @@ func rewriteValueMIPS_OpLsh32x8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh8x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh8x16 <t> x y)
// result: (CMOVZ (SLL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2555,14 +2744,16 @@ func rewriteValueMIPS_OpLsh8x16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh8x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh8x32 <t> x y)
// result: (CMOVZ (SLL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2579,13 +2770,13 @@ func rewriteValueMIPS_OpLsh8x32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpLsh8x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Lsh8x64 x (Const64 [c]))
// cond: uint32(c) < 8
// result: (SLLconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -2602,8 +2793,6 @@ func rewriteValueMIPS_OpLsh8x64_0(v *Value) bool {
// cond: uint32(c) >= 8
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpConst64 {
break
}
@@ -2618,14 +2807,16 @@ func rewriteValueMIPS_OpLsh8x64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpLsh8x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh8x8 <t> x y)
// result: (CMOVZ (SLL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSLL, t)
v0.AddArg(x)
@@ -2646,13 +2837,13 @@ func rewriteValueMIPS_OpLsh8x8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMIPSADD_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (ADD x (MOVWconst [c]))
// result: (ADDconst [c] x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- x := v.Args[_i0]
- v_1 := v.Args[1^_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
continue
}
@@ -2667,10 +2858,8 @@ func rewriteValueMIPS_OpMIPSADD_0(v *Value) bool {
// match: (ADD x (NEG y))
// result: (SUB x y)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- x := v.Args[_i0]
- v_1 := v.Args[1^_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
+ x := v_0
if v_1.Op != OpMIPSNEG {
continue
}
@@ -2685,11 +2874,11 @@ func rewriteValueMIPS_OpMIPSADD_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ADDconst [off1] (MOVWaddr [off2] {sym} ptr))
// result: (MOVWaddr [off1+off2] {sym} ptr)
for {
off1 := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
@@ -2708,7 +2897,7 @@ func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
if v.AuxInt != 0 {
break
}
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -2718,7 +2907,6 @@ func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
// result: (MOVWconst [int64(int32(c+d))])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -2731,7 +2919,6 @@ func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
// result: (ADDconst [int64(int32(c+d))] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSADDconst {
break
}
@@ -2746,7 +2933,6 @@ func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
// result: (ADDconst [int64(int32(c-d))] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSSUBconst {
break
}
@@ -2760,14 +2946,14 @@ func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSAND_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (AND x (MOVWconst [c]))
// result: (ANDconst [c] x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- x := v.Args[_i0]
- v_1 := v.Args[1^_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
continue
}
@@ -2782,8 +2968,8 @@ func rewriteValueMIPS_OpMIPSAND_0(v *Value) bool {
// match: (AND x x)
// result: x
for {
- x := v.Args[1]
- if x != v.Args[0] {
+ x := v_0
+ if x != v_1 {
break
}
v.reset(OpCopy)
@@ -2794,14 +2980,11 @@ func rewriteValueMIPS_OpMIPSAND_0(v *Value) bool {
// match: (AND (SGTUconst [1] x) (SGTUconst [1] y))
// result: (SGTUconst [1] (OR <x.Type> x y))
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSSGTUconst || v_0.AuxInt != 1 {
continue
}
x := v_0.Args[0]
- v_1 := v.Args[1^_i0]
if v_1.Op != OpMIPSSGTUconst || v_1.AuxInt != 1 {
continue
}
@@ -2819,6 +3002,7 @@ func rewriteValueMIPS_OpMIPSAND_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSANDconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ANDconst [0] _)
// result: (MOVWconst [0])
for {
@@ -2835,7 +3019,7 @@ func rewriteValueMIPS_OpMIPSANDconst_0(v *Value) bool {
if v.AuxInt != -1 {
break
}
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -2845,7 +3029,6 @@ func rewriteValueMIPS_OpMIPSANDconst_0(v *Value) bool {
// result: (MOVWconst [c&d])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -2858,7 +3041,6 @@ func rewriteValueMIPS_OpMIPSANDconst_0(v *Value) bool {
// result: (ANDconst [c&d] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -2872,12 +3054,13 @@ func rewriteValueMIPS_OpMIPSANDconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSCMOVZ_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (CMOVZ _ f (MOVWconst [0]))
// result: f
for {
- _ = v.Args[2]
- f := v.Args[1]
- v_2 := v.Args[2]
+ f := v_1
if v_2.Op != OpMIPSMOVWconst || v_2.AuxInt != 0 {
break
}
@@ -2890,9 +3073,7 @@ func rewriteValueMIPS_OpMIPSCMOVZ_0(v *Value) bool {
// cond: c!=0
// result: a
for {
- _ = v.Args[2]
- a := v.Args[0]
- v_2 := v.Args[2]
+ a := v_0
if v_2.Op != OpMIPSMOVWconst {
break
}
@@ -2908,12 +3089,11 @@ func rewriteValueMIPS_OpMIPSCMOVZ_0(v *Value) bool {
// match: (CMOVZ a (MOVWconst [0]) c)
// result: (CMOVZzero a c)
for {
- c := v.Args[2]
- a := v.Args[0]
- v_1 := v.Args[1]
+ a := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
+ c := v_2
v.reset(OpMIPSCMOVZzero)
v.AddArg(a)
v.AddArg(c)
@@ -2922,11 +3102,11 @@ func rewriteValueMIPS_OpMIPSCMOVZ_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSCMOVZzero_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (CMOVZzero _ (MOVWconst [0]))
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
@@ -2938,9 +3118,7 @@ func rewriteValueMIPS_OpMIPSCMOVZzero_0(v *Value) bool {
// cond: c!=0
// result: a
for {
- _ = v.Args[1]
- a := v.Args[0]
- v_1 := v.Args[1]
+ a := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -2956,17 +3134,19 @@ func rewriteValueMIPS_OpMIPSCMOVZzero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSLoweredAtomicAdd_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (LoweredAtomicAdd ptr (MOVWconst [c]) mem)
// cond: is16Bit(c)
// result: (LoweredAtomicAddconst [c] ptr mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
c := v_1.AuxInt
+ mem := v_2
if !(is16Bit(c)) {
break
}
@@ -2979,15 +3159,17 @@ func rewriteValueMIPS_OpMIPSLoweredAtomicAdd_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSLoweredAtomicStore32_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (LoweredAtomicStore32 ptr (MOVWconst [0]) mem)
// result: (LoweredAtomicStorezero ptr mem)
for {
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
+ mem := v_2
v.reset(OpMIPSLoweredAtomicStorezero)
v.AddArg(ptr)
v.AddArg(mem)
@@ -2996,19 +3178,21 @@ func rewriteValueMIPS_OpMIPSLoweredAtomicStore32_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVBUload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBUload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVBUload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3025,14 +3209,13 @@ func rewriteValueMIPS_OpMIPSMOVBUload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3049,9 +3232,7 @@ func rewriteValueMIPS_OpMIPSMOVBUload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVBstore {
break
}
@@ -3070,11 +3251,12 @@ func rewriteValueMIPS_OpMIPSMOVBUload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (MOVBUreg x:(MOVBUload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUload {
break
}
@@ -3086,7 +3268,7 @@ func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
// match: (MOVBUreg x:(MOVBUreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUreg {
break
}
@@ -3099,7 +3281,7 @@ func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
// result: @x.Block (MOVBUload <t> [off] {sym} ptr mem)
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBload {
break
}
@@ -3123,7 +3305,6 @@ func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
// match: (MOVBUreg (ANDconst [c] x))
// result: (ANDconst [c&0xff] x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -3137,7 +3318,6 @@ func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
// match: (MOVBUreg (MOVWconst [c]))
// result: (MOVWconst [int64(uint8(c))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -3149,19 +3329,21 @@ func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVBload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVBload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3178,14 +3360,13 @@ func rewriteValueMIPS_OpMIPSMOVBload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3202,9 +3383,7 @@ func rewriteValueMIPS_OpMIPSMOVBload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVBstore {
break
}
@@ -3223,11 +3402,12 @@ func rewriteValueMIPS_OpMIPSMOVBload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (MOVBreg x:(MOVBload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBload {
break
}
@@ -3239,7 +3419,7 @@ func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
// match: (MOVBreg x:(MOVBreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBreg {
break
}
@@ -3252,7 +3432,7 @@ func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
// result: @x.Block (MOVBload <t> [off] {sym} ptr mem)
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUload {
break
}
@@ -3277,7 +3457,6 @@ func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
// cond: c & 0x80 == 0
// result: (ANDconst [c&0x7f] x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -3294,7 +3473,6 @@ func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
// match: (MOVBreg (MOVWconst [c]))
// result: (MOVWconst [int64(int8(c))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -3306,20 +3484,23 @@ func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBstore [off1] {sym} x:(ADDconst [off2] ptr) val mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVBstore [off1+off2] {sym} ptr val mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3337,15 +3518,14 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3362,12 +3542,11 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
+ mem := v_2
v.reset(OpMIPSMOVBstorezero)
v.AuxInt = off
v.Aux = sym
@@ -3380,13 +3559,12 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVBreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = off
v.Aux = sym
@@ -3400,13 +3578,12 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVBUreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = off
v.Aux = sym
@@ -3420,13 +3597,12 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVHreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = off
v.Aux = sym
@@ -3440,13 +3616,12 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVHUreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = off
v.Aux = sym
@@ -3460,13 +3635,12 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = off
v.Aux = sym
@@ -3478,19 +3652,21 @@ func rewriteValueMIPS_OpMIPSMOVBstore_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVBstorezero_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBstorezero [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVBstorezero [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3507,14 +3683,13 @@ func rewriteValueMIPS_OpMIPSMOVBstorezero_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3528,19 +3703,21 @@ func rewriteValueMIPS_OpMIPSMOVBstorezero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVDload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVDload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVDload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3557,14 +3734,13 @@ func rewriteValueMIPS_OpMIPSMOVDload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3581,9 +3757,7 @@ func rewriteValueMIPS_OpMIPSMOVDload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVDstore {
break
}
@@ -3603,20 +3777,23 @@ func rewriteValueMIPS_OpMIPSMOVDload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVDstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVDstore [off1] {sym} x:(ADDconst [off2] ptr) val mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVDstore [off1+off2] {sym} ptr val mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3634,15 +3811,14 @@ func rewriteValueMIPS_OpMIPSMOVDstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3657,19 +3833,21 @@ func rewriteValueMIPS_OpMIPSMOVDstore_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVFload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVFload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVFload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3686,14 +3864,13 @@ func rewriteValueMIPS_OpMIPSMOVFload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3710,9 +3887,7 @@ func rewriteValueMIPS_OpMIPSMOVFload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVFstore {
break
}
@@ -3732,20 +3907,23 @@ func rewriteValueMIPS_OpMIPSMOVFload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVFstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVFstore [off1] {sym} x:(ADDconst [off2] ptr) val mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVFstore [off1+off2] {sym} ptr val mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3763,15 +3941,14 @@ func rewriteValueMIPS_OpMIPSMOVFstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3786,19 +3963,21 @@ func rewriteValueMIPS_OpMIPSMOVFstore_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVHUload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHUload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVHUload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3815,14 +3994,13 @@ func rewriteValueMIPS_OpMIPSMOVHUload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -3839,9 +4017,7 @@ func rewriteValueMIPS_OpMIPSMOVHUload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVHstore {
break
}
@@ -3860,11 +4036,12 @@ func rewriteValueMIPS_OpMIPSMOVHUload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (MOVHUreg x:(MOVBUload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUload {
break
}
@@ -3876,7 +4053,7 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
// match: (MOVHUreg x:(MOVHUload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVHUload {
break
}
@@ -3888,7 +4065,7 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
// match: (MOVHUreg x:(MOVBUreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUreg {
break
}
@@ -3899,7 +4076,7 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
// match: (MOVHUreg x:(MOVHUreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVHUreg {
break
}
@@ -3912,7 +4089,7 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
// result: @x.Block (MOVHUload <t> [off] {sym} ptr mem)
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVHload {
break
}
@@ -3936,7 +4113,6 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
// match: (MOVHUreg (ANDconst [c] x))
// result: (ANDconst [c&0xffff] x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -3950,7 +4126,6 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
// match: (MOVHUreg (MOVWconst [c]))
// result: (MOVWconst [int64(uint16(c))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -3962,19 +4137,21 @@ func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVHload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVHload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -3991,14 +4168,13 @@ func rewriteValueMIPS_OpMIPSMOVHload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -4015,9 +4191,7 @@ func rewriteValueMIPS_OpMIPSMOVHload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVHstore {
break
}
@@ -4036,11 +4210,12 @@ func rewriteValueMIPS_OpMIPSMOVHload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (MOVHreg x:(MOVBload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBload {
break
}
@@ -4052,7 +4227,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// match: (MOVHreg x:(MOVBUload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUload {
break
}
@@ -4064,7 +4239,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// match: (MOVHreg x:(MOVHload _ _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVHload {
break
}
@@ -4076,7 +4251,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// match: (MOVHreg x:(MOVBreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBreg {
break
}
@@ -4087,7 +4262,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// match: (MOVHreg x:(MOVBUreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVBUreg {
break
}
@@ -4098,7 +4273,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// match: (MOVHreg x:(MOVHreg _))
// result: (MOVWreg x)
for {
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVHreg {
break
}
@@ -4111,7 +4286,7 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// result: @x.Block (MOVHload <t> [off] {sym} ptr mem)
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSMOVHUload {
break
}
@@ -4136,7 +4311,6 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// cond: c & 0x8000 == 0
// result: (ANDconst [c&0x7fff] x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -4153,7 +4327,6 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
// match: (MOVHreg (MOVWconst [c]))
// result: (MOVWconst [int64(int16(c))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4165,20 +4338,23 @@ func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHstore [off1] {sym} x:(ADDconst [off2] ptr) val mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVHstore [off1+off2] {sym} ptr val mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -4196,15 +4372,14 @@ func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -4221,12 +4396,11 @@ func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
+ mem := v_2
v.reset(OpMIPSMOVHstorezero)
v.AuxInt = off
v.Aux = sym
@@ -4239,13 +4413,12 @@ func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVHreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVHstore)
v.AuxInt = off
v.Aux = sym
@@ -4259,13 +4432,12 @@ func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVHUreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVHstore)
v.AuxInt = off
v.Aux = sym
@@ -4279,13 +4451,12 @@ func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVHstore)
v.AuxInt = off
v.Aux = sym
@@ -4297,19 +4468,21 @@ func rewriteValueMIPS_OpMIPSMOVHstore_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVHstorezero_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHstorezero [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVHstorezero [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -4326,14 +4499,13 @@ func rewriteValueMIPS_OpMIPSMOVHstorezero_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -4347,19 +4519,21 @@ func rewriteValueMIPS_OpMIPSMOVHstorezero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVWload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVWload [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVWload [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -4376,14 +4550,13 @@ func rewriteValueMIPS_OpMIPSMOVWload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -4400,9 +4573,7 @@ func rewriteValueMIPS_OpMIPSMOVWload_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- _ = v.Args[1]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWstore {
break
}
@@ -4422,11 +4593,12 @@ func rewriteValueMIPS_OpMIPSMOVWload_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVWreg_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (MOVWreg x)
// cond: x.Uses == 1
// result: (MOVWnop x)
for {
- x := v.Args[0]
+ x := v_0
if !(x.Uses == 1) {
break
}
@@ -4437,7 +4609,6 @@ func rewriteValueMIPS_OpMIPSMOVWreg_0(v *Value) bool {
// match: (MOVWreg (MOVWconst [c]))
// result: (MOVWconst [c])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4449,20 +4620,23 @@ func rewriteValueMIPS_OpMIPSMOVWreg_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVWstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVWstore [off1] {sym} x:(ADDconst [off2] ptr) val mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVWstore [off1+off2] {sym} ptr val mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -4480,15 +4654,14 @@ func rewriteValueMIPS_OpMIPSMOVWstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -4505,12 +4678,11 @@ func rewriteValueMIPS_OpMIPSMOVWstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
+ mem := v_2
v.reset(OpMIPSMOVWstorezero)
v.AuxInt = off
v.Aux = sym
@@ -4523,13 +4695,12 @@ func rewriteValueMIPS_OpMIPSMOVWstore_0(v *Value) bool {
for {
off := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- v_1 := v.Args[1]
+ ptr := v_0
if v_1.Op != OpMIPSMOVWreg {
break
}
x := v_1.Args[0]
+ mem := v_2
v.reset(OpMIPSMOVWstore)
v.AuxInt = off
v.Aux = sym
@@ -4541,19 +4712,21 @@ func rewriteValueMIPS_OpMIPSMOVWstore_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMOVWstorezero_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVWstorezero [off1] {sym} x:(ADDconst [off2] ptr) mem)
// cond: (is16Bit(off1+off2) || x.Uses == 1)
// result: (MOVWstorezero [off1+off2] {sym} ptr mem)
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
if x.Op != OpMIPSADDconst {
break
}
off2 := x.AuxInt
ptr := x.Args[0]
+ mem := v_1
if !(is16Bit(off1+off2) || x.Uses == 1) {
break
}
@@ -4570,14 +4743,13 @@ func rewriteValueMIPS_OpMIPSMOVWstorezero_0(v *Value) bool {
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
ptr := v_0.Args[0]
+ mem := v_1
if !(canMergeSym(sym1, sym2)) {
break
}
@@ -4591,12 +4763,12 @@ func rewriteValueMIPS_OpMIPSMOVWstorezero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSMUL_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MUL (MOVWconst [0]) _ )
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSMOVWconst || v_0.AuxInt != 0 {
continue
}
@@ -4609,13 +4781,11 @@ func rewriteValueMIPS_OpMIPSMUL_0(v *Value) bool {
// match: (MUL (MOVWconst [1]) x )
// result: x
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSMOVWconst || v_0.AuxInt != 1 {
continue
}
- x := v.Args[1^_i0]
+ x := v_1
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -4626,13 +4796,11 @@ func rewriteValueMIPS_OpMIPSMUL_0(v *Value) bool {
// match: (MUL (MOVWconst [-1]) x )
// result: (NEG x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSMOVWconst || v_0.AuxInt != -1 {
continue
}
- x := v.Args[1^_i0]
+ x := v_1
v.reset(OpMIPSNEG)
v.AddArg(x)
return true
@@ -4643,14 +4811,12 @@ func rewriteValueMIPS_OpMIPSMUL_0(v *Value) bool {
// cond: isPowerOfTwo(int64(uint32(c)))
// result: (SLLconst [log2(int64(uint32(c)))] x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSMOVWconst {
continue
}
c := v_0.AuxInt
- x := v.Args[1^_i0]
+ x := v_1
if !(isPowerOfTwo(int64(uint32(c)))) {
continue
}
@@ -4664,14 +4830,11 @@ func rewriteValueMIPS_OpMIPSMUL_0(v *Value) bool {
// match: (MUL (MOVWconst [c]) (MOVWconst [d]))
// result: (MOVWconst [int64(int32(c)*int32(d))])
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSMOVWconst {
continue
}
c := v_0.AuxInt
- v_1 := v.Args[1^_i0]
if v_1.Op != OpMIPSMOVWconst {
continue
}
@@ -4685,10 +4848,10 @@ func rewriteValueMIPS_OpMIPSMUL_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSNEG_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (NEG (MOVWconst [c]))
// result: (MOVWconst [int64(int32(-c))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4700,13 +4863,13 @@ func rewriteValueMIPS_OpMIPSNEG_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSNOR_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (NOR x (MOVWconst [c]))
// result: (NORconst [c] x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- x := v.Args[_i0]
- v_1 := v.Args[1^_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
continue
}
@@ -4721,11 +4884,11 @@ func rewriteValueMIPS_OpMIPSNOR_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSNORconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (NORconst [c] (MOVWconst [d]))
// result: (MOVWconst [^(c|d)])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4737,14 +4900,14 @@ func rewriteValueMIPS_OpMIPSNORconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSOR_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (OR x (MOVWconst [c]))
// result: (ORconst [c] x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- x := v.Args[_i0]
- v_1 := v.Args[1^_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
continue
}
@@ -4759,8 +4922,8 @@ func rewriteValueMIPS_OpMIPSOR_0(v *Value) bool {
// match: (OR x x)
// result: x
for {
- x := v.Args[1]
- if x != v.Args[0] {
+ x := v_0
+ if x != v_1 {
break
}
v.reset(OpCopy)
@@ -4771,14 +4934,11 @@ func rewriteValueMIPS_OpMIPSOR_0(v *Value) bool {
// match: (OR (SGTUzero x) (SGTUzero y))
// result: (SGTUzero (OR <x.Type> x y))
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0 := v.Args[_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
if v_0.Op != OpMIPSSGTUzero {
continue
}
x := v_0.Args[0]
- v_1 := v.Args[1^_i0]
if v_1.Op != OpMIPSSGTUzero {
continue
}
@@ -4795,13 +4955,14 @@ func rewriteValueMIPS_OpMIPSOR_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSORconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ORconst [0] x)
// result: x
for {
if v.AuxInt != 0 {
break
}
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -4821,7 +4982,6 @@ func rewriteValueMIPS_OpMIPSORconst_0(v *Value) bool {
// result: (MOVWconst [c|d])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4834,7 +4994,6 @@ func rewriteValueMIPS_OpMIPSORconst_0(v *Value) bool {
// result: (ORconst [c|d] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSORconst {
break
}
@@ -4848,15 +5007,16 @@ func rewriteValueMIPS_OpMIPSORconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGT_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SGT (MOVWconst [c]) x)
// result: (SGTconst [c] x)
for {
- x := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
c := v_0.AuxInt
+ x := v_1
v.reset(OpMIPSSGTconst)
v.AuxInt = c
v.AddArg(x)
@@ -4865,9 +5025,7 @@ func rewriteValueMIPS_OpMIPSSGT_0(v *Value) bool {
// match: (SGT x (MOVWconst [0]))
// result: (SGTzero x)
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
@@ -4878,15 +5036,16 @@ func rewriteValueMIPS_OpMIPSSGT_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGTU_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SGTU (MOVWconst [c]) x)
// result: (SGTUconst [c] x)
for {
- x := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
c := v_0.AuxInt
+ x := v_1
v.reset(OpMIPSSGTUconst)
v.AuxInt = c
v.AddArg(x)
@@ -4895,9 +5054,7 @@ func rewriteValueMIPS_OpMIPSSGTU_0(v *Value) bool {
// match: (SGTU x (MOVWconst [0]))
// result: (SGTUzero x)
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst || v_1.AuxInt != 0 {
break
}
@@ -4908,12 +5065,12 @@ func rewriteValueMIPS_OpMIPSSGTU_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SGTUconst [c] (MOVWconst [d]))
// cond: uint32(c)>uint32(d)
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4930,7 +5087,6 @@ func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
// result: (MOVWconst [0])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -4947,7 +5103,6 @@ func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVBUreg || !(0xff < uint32(c)) {
break
}
@@ -4960,7 +5115,6 @@ func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVHUreg || !(0xffff < uint32(c)) {
break
}
@@ -4973,7 +5127,6 @@ func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -4990,7 +5143,6 @@ func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSSRLconst {
break
}
@@ -5005,11 +5157,11 @@ func rewriteValueMIPS_OpMIPSSGTUconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGTUzero_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SGTUzero (MOVWconst [d]))
// cond: uint32(d) != 0
// result: (MOVWconst [1])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5025,7 +5177,6 @@ func rewriteValueMIPS_OpMIPSSGTUzero_0(v *Value) bool {
// cond: uint32(d) == 0
// result: (MOVWconst [0])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5040,12 +5191,12 @@ func rewriteValueMIPS_OpMIPSSGTUzero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SGTconst [c] (MOVWconst [d]))
// cond: int32(c) > int32(d)
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5062,7 +5213,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [0])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5079,7 +5229,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVBreg || !(0x7f < int32(c)) {
break
}
@@ -5092,7 +5241,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [0])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVBreg || !(int32(c) <= -0x80) {
break
}
@@ -5105,7 +5253,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVBUreg || !(0xff < int32(c)) {
break
}
@@ -5118,7 +5265,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [0])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVBUreg || !(int32(c) < 0) {
break
}
@@ -5131,7 +5277,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVHreg || !(0x7fff < int32(c)) {
break
}
@@ -5144,7 +5289,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [0])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVHreg || !(int32(c) <= -0x8000) {
break
}
@@ -5157,7 +5301,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVHUreg || !(0xffff < int32(c)) {
break
}
@@ -5170,7 +5313,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
// result: (MOVWconst [0])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVHUreg || !(int32(c) < 0) {
break
}
@@ -5181,12 +5323,12 @@ func rewriteValueMIPS_OpMIPSSGTconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGTconst_10(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SGTconst [c] (ANDconst [m] _))
// cond: 0 <= int32(m) && int32(m) < int32(c)
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSANDconst {
break
}
@@ -5203,7 +5345,6 @@ func rewriteValueMIPS_OpMIPSSGTconst_10(v *Value) bool {
// result: (MOVWconst [1])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSSRLconst {
break
}
@@ -5218,11 +5359,11 @@ func rewriteValueMIPS_OpMIPSSGTconst_10(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSGTzero_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SGTzero (MOVWconst [d]))
// cond: int32(d) > 0
// result: (MOVWconst [1])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5238,7 +5379,6 @@ func rewriteValueMIPS_OpMIPSSGTzero_0(v *Value) bool {
// cond: int32(d) <= 0
// result: (MOVWconst [0])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5253,12 +5393,12 @@ func rewriteValueMIPS_OpMIPSSGTzero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSLL_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SLL _ (MOVWconst [c]))
// cond: uint32(c)>=32
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5273,9 +5413,7 @@ func rewriteValueMIPS_OpMIPSSLL_0(v *Value) bool {
// match: (SLL x (MOVWconst [c]))
// result: (SLLconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5288,11 +5426,11 @@ func rewriteValueMIPS_OpMIPSSLL_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSLLconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SLLconst [c] (MOVWconst [d]))
// result: (MOVWconst [int64(int32(uint32(d)<<uint32(c)))])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5304,13 +5442,13 @@ func rewriteValueMIPS_OpMIPSSLLconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSRA_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SRA x (MOVWconst [c]))
// cond: uint32(c)>=32
// result: (SRAconst x [31])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5326,9 +5464,7 @@ func rewriteValueMIPS_OpMIPSSRA_0(v *Value) bool {
// match: (SRA x (MOVWconst [c]))
// result: (SRAconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5341,11 +5477,11 @@ func rewriteValueMIPS_OpMIPSSRA_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSRAconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SRAconst [c] (MOVWconst [d]))
// result: (MOVWconst [int64(int32(d)>>uint32(c))])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5357,12 +5493,12 @@ func rewriteValueMIPS_OpMIPSSRAconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSRL_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SRL _ (MOVWconst [c]))
// cond: uint32(c)>=32
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5377,9 +5513,7 @@ func rewriteValueMIPS_OpMIPSSRL_0(v *Value) bool {
// match: (SRL x (MOVWconst [c]))
// result: (SRLconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5392,11 +5526,11 @@ func rewriteValueMIPS_OpMIPSSRL_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSRLconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SRLconst [c] (MOVWconst [d]))
// result: (MOVWconst [int64(uint32(d)>>uint32(c))])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5408,12 +5542,12 @@ func rewriteValueMIPS_OpMIPSSRLconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSUB_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SUB x (MOVWconst [c]))
// result: (SUBconst [c] x)
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -5426,8 +5560,8 @@ func rewriteValueMIPS_OpMIPSSUB_0(v *Value) bool {
// match: (SUB x x)
// result: (MOVWconst [0])
for {
- x := v.Args[1]
- if x != v.Args[0] {
+ x := v_0
+ if x != v_1 {
break
}
v.reset(OpMIPSMOVWconst)
@@ -5437,11 +5571,10 @@ func rewriteValueMIPS_OpMIPSSUB_0(v *Value) bool {
// match: (SUB (MOVWconst [0]) x)
// result: (NEG x)
for {
- x := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst || v_0.AuxInt != 0 {
break
}
+ x := v_1
v.reset(OpMIPSNEG)
v.AddArg(x)
return true
@@ -5449,13 +5582,14 @@ func rewriteValueMIPS_OpMIPSSUB_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSSUBconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SUBconst [0] x)
// result: x
for {
if v.AuxInt != 0 {
break
}
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -5465,7 +5599,6 @@ func rewriteValueMIPS_OpMIPSSUBconst_0(v *Value) bool {
// result: (MOVWconst [int64(int32(d-c))])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5478,7 +5611,6 @@ func rewriteValueMIPS_OpMIPSSUBconst_0(v *Value) bool {
// result: (ADDconst [int64(int32(-c-d))] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSSUBconst {
break
}
@@ -5493,7 +5625,6 @@ func rewriteValueMIPS_OpMIPSSUBconst_0(v *Value) bool {
// result: (ADDconst [int64(int32(-c+d))] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSADDconst {
break
}
@@ -5507,13 +5638,13 @@ func rewriteValueMIPS_OpMIPSSUBconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSXOR_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (XOR x (MOVWconst [c]))
// result: (XORconst [c] x)
for {
- _ = v.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- x := v.Args[_i0]
- v_1 := v.Args[1^_i0]
+ for _i0 := 0; _i0 <= 1; _i0, v_0, v_1 = _i0+1, v_1, v_0 {
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
continue
}
@@ -5528,8 +5659,8 @@ func rewriteValueMIPS_OpMIPSXOR_0(v *Value) bool {
// match: (XOR x x)
// result: (MOVWconst [0])
for {
- x := v.Args[1]
- if x != v.Args[0] {
+ x := v_0
+ if x != v_1 {
break
}
v.reset(OpMIPSMOVWconst)
@@ -5539,13 +5670,14 @@ func rewriteValueMIPS_OpMIPSXOR_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSXORconst_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (XORconst [0] x)
// result: x
for {
if v.AuxInt != 0 {
break
}
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -5557,7 +5689,7 @@ func rewriteValueMIPS_OpMIPSXORconst_0(v *Value) bool {
if v.AuxInt != -1 {
break
}
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNORconst)
v.AuxInt = 0
v.AddArg(x)
@@ -5567,7 +5699,6 @@ func rewriteValueMIPS_OpMIPSXORconst_0(v *Value) bool {
// result: (MOVWconst [c^d])
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMOVWconst {
break
}
@@ -5580,7 +5711,6 @@ func rewriteValueMIPS_OpMIPSXORconst_0(v *Value) bool {
// result: (XORconst [c^d] x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpMIPSXORconst {
break
}
@@ -5594,13 +5724,15 @@ func rewriteValueMIPS_OpMIPSXORconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMod16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mod16 x y)
// result: (Select0 (DIV (SignExt16to32 x) (SignExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSDIV, types.NewTuple(typ.Int32, typ.Int32))
v1 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
@@ -5614,13 +5746,15 @@ func rewriteValueMIPS_OpMod16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMod16u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mod16u x y)
// result: (Select0 (DIVU (ZeroExt16to32 x) (ZeroExt16to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSDIVU, types.NewTuple(typ.UInt32, typ.UInt32))
v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
@@ -5634,13 +5768,15 @@ func rewriteValueMIPS_OpMod16u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMod32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mod32 x y)
// result: (Select0 (DIV x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSDIV, types.NewTuple(typ.Int32, typ.Int32))
v0.AddArg(x)
@@ -5650,13 +5786,15 @@ func rewriteValueMIPS_OpMod32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMod32u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mod32u x y)
// result: (Select0 (DIVU x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSDIVU, types.NewTuple(typ.UInt32, typ.UInt32))
v0.AddArg(x)
@@ -5666,13 +5804,15 @@ func rewriteValueMIPS_OpMod32u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMod8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mod8 x y)
// result: (Select0 (DIV (SignExt8to32 x) (SignExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSDIV, types.NewTuple(typ.Int32, typ.Int32))
v1 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
@@ -5686,13 +5826,15 @@ func rewriteValueMIPS_OpMod8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMod8u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mod8u x y)
// result: (Select0 (DIVU (ZeroExt8to32 x) (ZeroExt8to32 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpSelect0)
v0 := b.NewValue0(v.Pos, OpMIPSDIVU, types.NewTuple(typ.UInt32, typ.UInt32))
v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
@@ -5706,6 +5848,9 @@ func rewriteValueMIPS_OpMod8u_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMove_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Move [0] _ _ mem)
@@ -5714,7 +5859,7 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
if v.AuxInt != 0 {
break
}
- mem := v.Args[2]
+ mem := v_2
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
@@ -5726,9 +5871,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
if v.AuxInt != 1 {
break
}
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AddArg(dst)
v0 := b.NewValue0(v.Pos, OpMIPSMOVBUload, typ.UInt8)
@@ -5746,9 +5891,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -5767,9 +5912,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
if v.AuxInt != 2 {
break
}
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = 1
v.AddArg(dst)
@@ -5796,9 +5941,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -5819,9 +5964,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -5849,9 +5994,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
if v.AuxInt != 4 {
break
}
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = 3
v.AddArg(dst)
@@ -5894,9 +6039,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
if v.AuxInt != 3 {
break
}
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
v.reset(OpMIPSMOVBstore)
v.AuxInt = 2
v.AddArg(dst)
@@ -5932,9 +6077,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -5964,9 +6109,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -6009,6 +6154,9 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMove_10(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
config := b.Func.Config
typ := &b.Func.Config.Types
@@ -6020,9 +6168,9 @@ func rewriteValueMIPS_OpMove_10(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -6061,9 +6209,9 @@ func rewriteValueMIPS_OpMove_10(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -6102,9 +6250,9 @@ func rewriteValueMIPS_OpMove_10(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -6150,9 +6298,9 @@ func rewriteValueMIPS_OpMove_10(v *Value) bool {
for {
s := v.AuxInt
t := v.Aux
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
if !(s > 16 || t.(*types.Type).Alignment()%4 != 0) {
break
}
@@ -6170,11 +6318,13 @@ func rewriteValueMIPS_OpMove_10(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMul16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul16 x y)
// result: (MUL x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSMUL)
v.AddArg(x)
v.AddArg(y)
@@ -6182,11 +6332,13 @@ func rewriteValueMIPS_OpMul16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMul32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul32 x y)
// result: (MUL x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSMUL)
v.AddArg(x)
v.AddArg(y)
@@ -6194,11 +6346,13 @@ func rewriteValueMIPS_OpMul32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMul32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul32F x y)
// result: (MULF x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSMULF)
v.AddArg(x)
v.AddArg(y)
@@ -6206,11 +6360,13 @@ func rewriteValueMIPS_OpMul32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMul32uhilo_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul32uhilo x y)
// result: (MULTU x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSMULTU)
v.AddArg(x)
v.AddArg(y)
@@ -6218,11 +6374,13 @@ func rewriteValueMIPS_OpMul32uhilo_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMul64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul64F x y)
// result: (MULD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSMULD)
v.AddArg(x)
v.AddArg(y)
@@ -6230,11 +6388,13 @@ func rewriteValueMIPS_OpMul64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpMul8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul8 x y)
// result: (MUL x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSMUL)
v.AddArg(x)
v.AddArg(y)
@@ -6242,63 +6402,70 @@ func rewriteValueMIPS_OpMul8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeg16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg16 x)
// result: (NEG x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNEG)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpNeg32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg32 x)
// result: (NEG x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNEG)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpNeg32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg32F x)
// result: (NEGF x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNEGF)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpNeg64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg64F x)
// result: (NEGD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNEGD)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpNeg8_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg8 x)
// result: (NEG x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNEG)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpNeq16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neq16 x y)
// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to32 y)) (MOVWconst [0]))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
@@ -6315,13 +6482,15 @@ func rewriteValueMIPS_OpNeq16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeq32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neq32 x y)
// result: (SGTU (XOR x y) (MOVWconst [0]))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
v0.AddArg(x)
@@ -6334,12 +6503,14 @@ func rewriteValueMIPS_OpNeq32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Neq32F x y)
// result: (FPFlagFalse (CMPEQF x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagFalse)
v0 := b.NewValue0(v.Pos, OpMIPSCMPEQF, types.TypeFlags)
v0.AddArg(x)
@@ -6349,12 +6520,14 @@ func rewriteValueMIPS_OpNeq32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Neq64F x y)
// result: (FPFlagFalse (CMPEQD x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSFPFlagFalse)
v0 := b.NewValue0(v.Pos, OpMIPSCMPEQD, types.TypeFlags)
v0.AddArg(x)
@@ -6364,13 +6537,15 @@ func rewriteValueMIPS_OpNeq64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeq8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neq8 x y)
// result: (SGTU (XOR (ZeroExt8to32 x) (ZeroExt8to32 y)) (MOVWconst [0]))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
@@ -6387,11 +6562,13 @@ func rewriteValueMIPS_OpNeq8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeqB_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (NeqB x y)
// result: (XOR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXOR)
v.AddArg(x)
v.AddArg(y)
@@ -6399,13 +6576,15 @@ func rewriteValueMIPS_OpNeqB_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNeqPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (NeqPtr x y)
// result: (SGTU (XOR x y) (MOVWconst [0]))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSGTU)
v0 := b.NewValue0(v.Pos, OpMIPSXOR, typ.UInt32)
v0.AddArg(x)
@@ -6418,11 +6597,13 @@ func rewriteValueMIPS_OpNeqPtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNilCheck_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (NilCheck ptr mem)
// result: (LoweredNilCheck ptr mem)
for {
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSLoweredNilCheck)
v.AddArg(ptr)
v.AddArg(mem)
@@ -6430,10 +6611,11 @@ func rewriteValueMIPS_OpNilCheck_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpNot_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Not x)
// result: (XORconst [1] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSXORconst)
v.AuxInt = 1
v.AddArg(x)
@@ -6441,11 +6623,12 @@ func rewriteValueMIPS_OpNot_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpOffPtr_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (OffPtr [off] ptr:(SP))
// result: (MOVWaddr [off] ptr)
for {
off := v.AuxInt
- ptr := v.Args[0]
+ ptr := v_0
if ptr.Op != OpSP {
break
}
@@ -6458,7 +6641,7 @@ func rewriteValueMIPS_OpOffPtr_0(v *Value) bool {
// result: (ADDconst [off] ptr)
for {
off := v.AuxInt
- ptr := v.Args[0]
+ ptr := v_0
v.reset(OpMIPSADDconst)
v.AuxInt = off
v.AddArg(ptr)
@@ -6466,11 +6649,13 @@ func rewriteValueMIPS_OpOffPtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpOr16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Or16 x y)
// result: (OR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSOR)
v.AddArg(x)
v.AddArg(y)
@@ -6478,11 +6663,13 @@ func rewriteValueMIPS_OpOr16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpOr32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Or32 x y)
// result: (OR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSOR)
v.AddArg(x)
v.AddArg(y)
@@ -6490,11 +6677,13 @@ func rewriteValueMIPS_OpOr32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpOr8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Or8 x y)
// result: (OR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSOR)
v.AddArg(x)
v.AddArg(y)
@@ -6502,11 +6691,13 @@ func rewriteValueMIPS_OpOr8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpOrB_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (OrB x y)
// result: (OR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSOR)
v.AddArg(x)
v.AddArg(y)
@@ -6514,14 +6705,17 @@ func rewriteValueMIPS_OpOrB_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpPanicBounds_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (PanicBounds [kind] x y mem)
// cond: boundsABI(kind) == 0
// result: (LoweredPanicBoundsA [kind] x y mem)
for {
kind := v.AuxInt
- mem := v.Args[2]
- x := v.Args[0]
- y := v.Args[1]
+ x := v_0
+ y := v_1
+ mem := v_2
if !(boundsABI(kind) == 0) {
break
}
@@ -6537,9 +6731,9 @@ func rewriteValueMIPS_OpPanicBounds_0(v *Value) bool {
// result: (LoweredPanicBoundsB [kind] x y mem)
for {
kind := v.AuxInt
- mem := v.Args[2]
- x := v.Args[0]
- y := v.Args[1]
+ x := v_0
+ y := v_1
+ mem := v_2
if !(boundsABI(kind) == 1) {
break
}
@@ -6555,9 +6749,9 @@ func rewriteValueMIPS_OpPanicBounds_0(v *Value) bool {
// result: (LoweredPanicBoundsC [kind] x y mem)
for {
kind := v.AuxInt
- mem := v.Args[2]
- x := v.Args[0]
- y := v.Args[1]
+ x := v_0
+ y := v_1
+ mem := v_2
if !(boundsABI(kind) == 2) {
break
}
@@ -6571,15 +6765,19 @@ func rewriteValueMIPS_OpPanicBounds_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpPanicExtend_0(v *Value) bool {
+ v_3 := v.Args[3]
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (PanicExtend [kind] hi lo y mem)
// cond: boundsABI(kind) == 0
// result: (LoweredPanicExtendA [kind] hi lo y mem)
for {
kind := v.AuxInt
- mem := v.Args[3]
- hi := v.Args[0]
- lo := v.Args[1]
- y := v.Args[2]
+ hi := v_0
+ lo := v_1
+ y := v_2
+ mem := v_3
if !(boundsABI(kind) == 0) {
break
}
@@ -6596,10 +6794,10 @@ func rewriteValueMIPS_OpPanicExtend_0(v *Value) bool {
// result: (LoweredPanicExtendB [kind] hi lo y mem)
for {
kind := v.AuxInt
- mem := v.Args[3]
- hi := v.Args[0]
- lo := v.Args[1]
- y := v.Args[2]
+ hi := v_0
+ lo := v_1
+ y := v_2
+ mem := v_3
if !(boundsABI(kind) == 1) {
break
}
@@ -6616,10 +6814,10 @@ func rewriteValueMIPS_OpPanicExtend_0(v *Value) bool {
// result: (LoweredPanicExtendC [kind] hi lo y mem)
for {
kind := v.AuxInt
- mem := v.Args[3]
- hi := v.Args[0]
- lo := v.Args[1]
- y := v.Args[2]
+ hi := v_0
+ lo := v_1
+ y := v_2
+ mem := v_3
if !(boundsABI(kind) == 2) {
break
}
@@ -6634,15 +6832,15 @@ func rewriteValueMIPS_OpPanicExtend_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRotateLeft16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (RotateLeft16 <t> x (MOVWconst [c]))
// result: (Or16 (Lsh16x32 <t> x (MOVWconst [c&15])) (Rsh16Ux32 <t> x (MOVWconst [-c&15])))
for {
t := v.Type
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -6665,15 +6863,15 @@ func rewriteValueMIPS_OpRotateLeft16_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRotateLeft32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (RotateLeft32 <t> x (MOVWconst [c]))
// result: (Or32 (Lsh32x32 <t> x (MOVWconst [c&31])) (Rsh32Ux32 <t> x (MOVWconst [-c&31])))
for {
t := v.Type
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -6696,15 +6894,15 @@ func rewriteValueMIPS_OpRotateLeft32_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRotateLeft64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (RotateLeft64 <t> x (MOVWconst [c]))
// result: (Or64 (Lsh64x32 <t> x (MOVWconst [c&63])) (Rsh64Ux32 <t> x (MOVWconst [-c&63])))
for {
t := v.Type
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -6727,15 +6925,15 @@ func rewriteValueMIPS_OpRotateLeft64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRotateLeft8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (RotateLeft8 <t> x (MOVWconst [c]))
// result: (Or8 (Lsh8x32 <t> x (MOVWconst [c&7])) (Rsh8Ux32 <t> x (MOVWconst [-c&7])))
for {
t := v.Type
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpMIPSMOVWconst {
break
}
@@ -6758,10 +6956,11 @@ func rewriteValueMIPS_OpRotateLeft8_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRound32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Round32F x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -6769,10 +6968,11 @@ func rewriteValueMIPS_OpRound32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRound64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Round64F x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -6780,14 +6980,16 @@ func rewriteValueMIPS_OpRound64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh16Ux16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16Ux16 <t> x y)
// result: (CMOVZ (SRL <t> (ZeroExt16to32 x) (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
@@ -6810,14 +7012,16 @@ func rewriteValueMIPS_OpRsh16Ux16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh16Ux32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16Ux32 <t> x y)
// result: (CMOVZ (SRL <t> (ZeroExt16to32 x) y) (MOVWconst [0]) (SGTUconst [32] y))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
@@ -6836,15 +7040,15 @@ func rewriteValueMIPS_OpRsh16Ux32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh16Ux64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16Ux64 x (Const64 [c]))
// cond: uint32(c) < 16
// result: (SRLconst (SLLconst <typ.UInt32> x [16]) [c+16])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -6864,8 +7068,6 @@ func rewriteValueMIPS_OpRsh16Ux64_0(v *Value) bool {
// cond: uint32(c) >= 16
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpConst64 {
break
}
@@ -6880,14 +7082,16 @@ func rewriteValueMIPS_OpRsh16Ux64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRsh16Ux8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16Ux8 <t> x y)
// result: (CMOVZ (SRL <t> (ZeroExt16to32 x) (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
@@ -6910,13 +7114,15 @@ func rewriteValueMIPS_OpRsh16Ux8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh16x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16x16 x y)
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt16to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt16to32 y))))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -6939,13 +7145,15 @@ func rewriteValueMIPS_OpRsh16x16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh16x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16x32 x y)
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> y (MOVWconst [-1]) (SGTUconst [32] y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -6964,15 +7172,15 @@ func rewriteValueMIPS_OpRsh16x32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh16x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16x64 x (Const64 [c]))
// cond: uint32(c) < 16
// result: (SRAconst (SLLconst <typ.UInt32> x [16]) [c+16])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -6992,9 +7200,7 @@ func rewriteValueMIPS_OpRsh16x64_0(v *Value) bool {
// cond: uint32(c) >= 16
// result: (SRAconst (SLLconst <typ.UInt32> x [16]) [31])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7013,13 +7219,15 @@ func rewriteValueMIPS_OpRsh16x64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRsh16x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh16x8 x y)
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt8to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt8to32 y))))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -7042,14 +7250,16 @@ func rewriteValueMIPS_OpRsh16x8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh32Ux16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32Ux16 <t> x y)
// result: (CMOVZ (SRL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v0.AddArg(x)
@@ -7070,14 +7280,16 @@ func rewriteValueMIPS_OpRsh32Ux16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh32Ux32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32Ux32 <t> x y)
// result: (CMOVZ (SRL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v0.AddArg(x)
@@ -7094,13 +7306,13 @@ func rewriteValueMIPS_OpRsh32Ux32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh32Ux64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Rsh32Ux64 x (Const64 [c]))
// cond: uint32(c) < 32
// result: (SRLconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7117,8 +7329,6 @@ func rewriteValueMIPS_OpRsh32Ux64_0(v *Value) bool {
// cond: uint32(c) >= 32
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpConst64 {
break
}
@@ -7133,14 +7343,16 @@ func rewriteValueMIPS_OpRsh32Ux64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRsh32Ux8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32Ux8 <t> x y)
// result: (CMOVZ (SRL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v0.AddArg(x)
@@ -7161,13 +7373,15 @@ func rewriteValueMIPS_OpRsh32Ux8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh32x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32x16 x y)
// result: (SRA x ( CMOVZ <typ.UInt32> (ZeroExt16to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt16to32 y))))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v.AddArg(x)
v0 := b.NewValue0(v.Pos, OpMIPSCMOVZ, typ.UInt32)
@@ -7188,13 +7402,15 @@ func rewriteValueMIPS_OpRsh32x16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh32x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32x32 x y)
// result: (SRA x ( CMOVZ <typ.UInt32> y (MOVWconst [-1]) (SGTUconst [32] y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v.AddArg(x)
v0 := b.NewValue0(v.Pos, OpMIPSCMOVZ, typ.UInt32)
@@ -7211,13 +7427,13 @@ func rewriteValueMIPS_OpRsh32x32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh32x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Rsh32x64 x (Const64 [c]))
// cond: uint32(c) < 32
// result: (SRAconst x [c])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7234,9 +7450,7 @@ func rewriteValueMIPS_OpRsh32x64_0(v *Value) bool {
// cond: uint32(c) >= 32
// result: (SRAconst x [31])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7252,13 +7466,15 @@ func rewriteValueMIPS_OpRsh32x64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRsh32x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32x8 x y)
// result: (SRA x ( CMOVZ <typ.UInt32> (ZeroExt8to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt8to32 y))))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v.AddArg(x)
v0 := b.NewValue0(v.Pos, OpMIPSCMOVZ, typ.UInt32)
@@ -7279,14 +7495,16 @@ func rewriteValueMIPS_OpRsh32x8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh8Ux16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8Ux16 <t> x y)
// result: (CMOVZ (SRL <t> (ZeroExt8to32 x) (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
@@ -7309,14 +7527,16 @@ func rewriteValueMIPS_OpRsh8Ux16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh8Ux32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8Ux32 <t> x y)
// result: (CMOVZ (SRL <t> (ZeroExt8to32 x) y) (MOVWconst [0]) (SGTUconst [32] y))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
@@ -7335,15 +7555,15 @@ func rewriteValueMIPS_OpRsh8Ux32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh8Ux64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8Ux64 x (Const64 [c]))
// cond: uint32(c) < 8
// result: (SRLconst (SLLconst <typ.UInt32> x [24]) [c+24])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7363,8 +7583,6 @@ func rewriteValueMIPS_OpRsh8Ux64_0(v *Value) bool {
// cond: uint32(c) >= 8
// result: (MOVWconst [0])
for {
- _ = v.Args[1]
- v_1 := v.Args[1]
if v_1.Op != OpConst64 {
break
}
@@ -7379,14 +7597,16 @@ func rewriteValueMIPS_OpRsh8Ux64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRsh8Ux8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8Ux8 <t> x y)
// result: (CMOVZ (SRL <t> (ZeroExt8to32 x) (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSSRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
@@ -7409,13 +7629,15 @@ func rewriteValueMIPS_OpRsh8Ux8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh8x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8x16 x y)
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt16to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt16to32 y))))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -7438,13 +7660,15 @@ func rewriteValueMIPS_OpRsh8x16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh8x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8x32 x y)
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> y (MOVWconst [-1]) (SGTUconst [32] y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -7463,15 +7687,15 @@ func rewriteValueMIPS_OpRsh8x32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpRsh8x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8x64 x (Const64 [c]))
// cond: uint32(c) < 8
// result: (SRAconst (SLLconst <typ.UInt32> x [24]) [c+24])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7491,9 +7715,7 @@ func rewriteValueMIPS_OpRsh8x64_0(v *Value) bool {
// cond: uint32(c) >= 8
// result: (SRAconst (SLLconst <typ.UInt32> x [24]) [31])
for {
- _ = v.Args[1]
- x := v.Args[0]
- v_1 := v.Args[1]
+ x := v_0
if v_1.Op != OpConst64 {
break
}
@@ -7512,13 +7734,15 @@ func rewriteValueMIPS_OpRsh8x64_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpRsh8x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh8x8 x y)
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt8to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt8to32 y))))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSRA)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -7541,12 +7765,12 @@ func rewriteValueMIPS_OpRsh8x8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Select0 (Add32carry <t> x y))
// result: (ADD <t.FieldType(0)> x y)
for {
- v_0 := v.Args[0]
if v_0.Op != OpAdd32carry {
break
}
@@ -7562,7 +7786,6 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (Sub32carry <t> x y))
// result: (SUB <t.FieldType(0)> x y)
for {
- v_0 := v.Args[0]
if v_0.Op != OpSub32carry {
break
}
@@ -7578,13 +7801,13 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (MULTU (MOVWconst [0]) _ ))
// result: (MOVWconst [0])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst || v_0_0.AuxInt != 0 {
continue
}
@@ -7597,13 +7820,13 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (MULTU (MOVWconst [1]) _ ))
// result: (MOVWconst [0])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst || v_0_0.AuxInt != 1 {
continue
}
@@ -7616,17 +7839,17 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (MULTU (MOVWconst [-1]) x ))
// result: (CMOVZ (ADDconst <x.Type> [-1] x) (MOVWconst [0]) x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst || v_0_0.AuxInt != -1 {
continue
}
- x := v_0.Args[1^_i0]
+ x := v_0_1
v.reset(OpMIPSCMOVZ)
v0 := b.NewValue0(v.Pos, OpMIPSADDconst, x.Type)
v0.AuxInt = -1
@@ -7644,18 +7867,18 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// cond: isPowerOfTwo(int64(uint32(c)))
// result: (SRLconst [32-log2(int64(uint32(c)))] x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst {
continue
}
c := v_0_0.AuxInt
- x := v_0.Args[1^_i0]
+ x := v_0_1
if !(isPowerOfTwo(int64(uint32(c)))) {
continue
}
@@ -7669,18 +7892,17 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (MULTU (MOVWconst [c]) (MOVWconst [d])))
// result: (MOVWconst [(c*d)>>32])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst {
continue
}
c := v_0_0.AuxInt
- v_0_1 := v_0.Args[1^_i0]
if v_0_1.Op != OpMIPSMOVWconst {
continue
}
@@ -7694,7 +7916,6 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (DIV (MOVWconst [c]) (MOVWconst [d])))
// result: (MOVWconst [int64(int32(c)%int32(d))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSDIV {
break
}
@@ -7716,7 +7937,6 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
// match: (Select0 (DIVU (MOVWconst [c]) (MOVWconst [d])))
// result: (MOVWconst [int64(int32(uint32(c)%uint32(d)))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSDIVU {
break
}
@@ -7738,12 +7958,12 @@ func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Select1 (Add32carry <t> x y))
// result: (SGTU <typ.Bool> x (ADD <t.FieldType(0)> x y))
for {
- v_0 := v.Args[0]
if v_0.Op != OpAdd32carry {
break
}
@@ -7762,7 +7982,6 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (Sub32carry <t> x y))
// result: (SGTU <typ.Bool> (SUB <t.FieldType(0)> x y) x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpSub32carry {
break
}
@@ -7781,13 +8000,13 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (MULTU (MOVWconst [0]) _ ))
// result: (MOVWconst [0])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst || v_0_0.AuxInt != 0 {
continue
}
@@ -7800,17 +8019,17 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (MULTU (MOVWconst [1]) x ))
// result: x
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst || v_0_0.AuxInt != 1 {
continue
}
- x := v_0.Args[1^_i0]
+ x := v_0_1
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -7821,17 +8040,17 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (MULTU (MOVWconst [-1]) x ))
// result: (NEG <x.Type> x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst || v_0_0.AuxInt != -1 {
continue
}
- x := v_0.Args[1^_i0]
+ x := v_0_1
v.reset(OpMIPSNEG)
v.Type = x.Type
v.AddArg(x)
@@ -7843,18 +8062,18 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// cond: isPowerOfTwo(int64(uint32(c)))
// result: (SLLconst [log2(int64(uint32(c)))] x)
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst {
continue
}
c := v_0_0.AuxInt
- x := v_0.Args[1^_i0]
+ x := v_0_1
if !(isPowerOfTwo(int64(uint32(c)))) {
continue
}
@@ -7868,18 +8087,17 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (MULTU (MOVWconst [c]) (MOVWconst [d])))
// result: (MOVWconst [int64(int32(uint32(c)*uint32(d)))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSMULTU {
break
}
_ = v_0.Args[1]
- for _i0 := 0; _i0 <= 1; _i0++ {
- v_0_0 := v_0.Args[_i0]
+ v_0_0 := v_0.Args[0]
+ v_0_1 := v_0.Args[1]
+ for _i0 := 0; _i0 <= 1; _i0, v_0_0, v_0_1 = _i0+1, v_0_1, v_0_0 {
if v_0_0.Op != OpMIPSMOVWconst {
continue
}
c := v_0_0.AuxInt
- v_0_1 := v_0.Args[1^_i0]
if v_0_1.Op != OpMIPSMOVWconst {
continue
}
@@ -7893,7 +8111,6 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (DIV (MOVWconst [c]) (MOVWconst [d])))
// result: (MOVWconst [int64(int32(c)/int32(d))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSDIV {
break
}
@@ -7915,7 +8132,6 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
// match: (Select1 (DIVU (MOVWconst [c]) (MOVWconst [d])))
// result: (MOVWconst [int64(int32(uint32(c)/uint32(d)))])
for {
- v_0 := v.Args[0]
if v_0.Op != OpMIPSDIVU {
break
}
@@ -7937,40 +8153,44 @@ func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpSignExt16to32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SignExt16to32 x)
// result: (MOVHreg x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVHreg)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpSignExt8to16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SignExt8to16 x)
// result: (MOVBreg x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVBreg)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpSignExt8to32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (SignExt8to32 x)
// result: (MOVBreg x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVBreg)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpSignmask_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Signmask x)
// result: (SRAconst x [31])
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSSRAconst)
v.AuxInt = 31
v.AddArg(x)
@@ -7978,12 +8198,13 @@ func rewriteValueMIPS_OpSignmask_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSlicemask_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (Slicemask <t> x)
// result: (SRAconst (NEG <t> x) [31])
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSSRAconst)
v.AuxInt = 31
v0 := b.NewValue0(v.Pos, OpMIPSNEG, t)
@@ -7993,22 +8214,24 @@ func rewriteValueMIPS_OpSlicemask_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSqrt_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Sqrt x)
// result: (SQRTD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSSQRTD)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpStaticCall_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (StaticCall [argwid] {target} mem)
// result: (CALLstatic [argwid] {target} mem)
for {
argwid := v.AuxInt
target := v.Aux
- mem := v.Args[0]
+ mem := v_0
v.reset(OpMIPSCALLstatic)
v.AuxInt = argwid
v.Aux = target
@@ -8017,14 +8240,17 @@ func rewriteValueMIPS_OpStaticCall_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpStore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Store {t} ptr val mem)
// cond: t.(*types.Type).Size() == 1
// result: (MOVBstore ptr val mem)
for {
t := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(t.(*types.Type).Size() == 1) {
break
}
@@ -8039,9 +8265,9 @@ func rewriteValueMIPS_OpStore_0(v *Value) bool {
// result: (MOVHstore ptr val mem)
for {
t := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(t.(*types.Type).Size() == 2) {
break
}
@@ -8056,9 +8282,9 @@ func rewriteValueMIPS_OpStore_0(v *Value) bool {
// result: (MOVWstore ptr val mem)
for {
t := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(t.(*types.Type).Size() == 4 && !is32BitFloat(val.Type)) {
break
}
@@ -8073,9 +8299,9 @@ func rewriteValueMIPS_OpStore_0(v *Value) bool {
// result: (MOVFstore ptr val mem)
for {
t := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(t.(*types.Type).Size() == 4 && is32BitFloat(val.Type)) {
break
}
@@ -8090,9 +8316,9 @@ func rewriteValueMIPS_OpStore_0(v *Value) bool {
// result: (MOVDstore ptr val mem)
for {
t := v.Aux
- mem := v.Args[2]
- ptr := v.Args[0]
- val := v.Args[1]
+ ptr := v_0
+ val := v_1
+ mem := v_2
if !(t.(*types.Type).Size() == 8 && is64BitFloat(val.Type)) {
break
}
@@ -8105,11 +8331,13 @@ func rewriteValueMIPS_OpStore_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpSub16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub16 x y)
// result: (SUB x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSUB)
v.AddArg(x)
v.AddArg(y)
@@ -8117,11 +8345,13 @@ func rewriteValueMIPS_OpSub16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSub32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub32 x y)
// result: (SUB x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSUB)
v.AddArg(x)
v.AddArg(y)
@@ -8129,11 +8359,13 @@ func rewriteValueMIPS_OpSub32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSub32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub32F x y)
// result: (SUBF x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSUBF)
v.AddArg(x)
v.AddArg(y)
@@ -8141,14 +8373,17 @@ func rewriteValueMIPS_OpSub32F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSub32withcarry_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Sub32withcarry <t> x y c)
// result: (SUB (SUB <t> x y) c)
for {
t := v.Type
- c := v.Args[2]
- x := v.Args[0]
- y := v.Args[1]
+ x := v_0
+ y := v_1
+ c := v_2
v.reset(OpMIPSSUB)
v0 := b.NewValue0(v.Pos, OpMIPSSUB, t)
v0.AddArg(x)
@@ -8159,11 +8394,13 @@ func rewriteValueMIPS_OpSub32withcarry_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSub64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub64F x y)
// result: (SUBD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSUBD)
v.AddArg(x)
v.AddArg(y)
@@ -8171,11 +8408,13 @@ func rewriteValueMIPS_OpSub64F_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSub8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub8 x y)
// result: (SUB x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSUB)
v.AddArg(x)
v.AddArg(y)
@@ -8183,11 +8422,13 @@ func rewriteValueMIPS_OpSub8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpSubPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (SubPtr x y)
// result: (SUB x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSSUB)
v.AddArg(x)
v.AddArg(y)
@@ -8195,10 +8436,11 @@ func rewriteValueMIPS_OpSubPtr_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpTrunc16to8_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Trunc16to8 x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -8206,10 +8448,11 @@ func rewriteValueMIPS_OpTrunc16to8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpTrunc32to16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Trunc32to16 x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -8217,10 +8460,11 @@ func rewriteValueMIPS_OpTrunc32to16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpTrunc32to8_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Trunc32to8 x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -8228,13 +8472,16 @@ func rewriteValueMIPS_OpTrunc32to8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpWB_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (WB {fn} destptr srcptr mem)
// result: (LoweredWB {fn} destptr srcptr mem)
for {
fn := v.Aux
- mem := v.Args[2]
- destptr := v.Args[0]
- srcptr := v.Args[1]
+ destptr := v_0
+ srcptr := v_1
+ mem := v_2
v.reset(OpMIPSLoweredWB)
v.Aux = fn
v.AddArg(destptr)
@@ -8244,11 +8491,13 @@ func rewriteValueMIPS_OpWB_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpXor16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Xor16 x y)
// result: (XOR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXOR)
v.AddArg(x)
v.AddArg(y)
@@ -8256,11 +8505,13 @@ func rewriteValueMIPS_OpXor16_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpXor32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Xor32 x y)
// result: (XOR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXOR)
v.AddArg(x)
v.AddArg(y)
@@ -8268,11 +8519,13 @@ func rewriteValueMIPS_OpXor32_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpXor8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Xor8 x y)
// result: (XOR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpMIPSXOR)
v.AddArg(x)
v.AddArg(y)
@@ -8280,6 +8533,8 @@ func rewriteValueMIPS_OpXor8_0(v *Value) bool {
}
}
func rewriteValueMIPS_OpZero_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Zero [0] _ mem)
@@ -8288,7 +8543,7 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
if v.AuxInt != 0 {
break
}
- mem := v.Args[1]
+ mem := v_1
v.reset(OpCopy)
v.Type = mem.Type
v.AddArg(mem)
@@ -8300,8 +8555,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
if v.AuxInt != 1 {
break
}
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSMOVBstore)
v.AddArg(ptr)
v0 := b.NewValue0(v.Pos, OpMIPSMOVWconst, typ.UInt32)
@@ -8318,8 +8573,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -8337,8 +8592,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
if v.AuxInt != 2 {
break
}
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSMOVBstore)
v.AuxInt = 1
v.AddArg(ptr)
@@ -8363,8 +8618,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -8384,8 +8639,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -8411,8 +8666,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
if v.AuxInt != 4 {
break
}
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSMOVBstore)
v.AuxInt = 3
v.AddArg(ptr)
@@ -8449,8 +8704,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
if v.AuxInt != 3 {
break
}
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpMIPSMOVBstore)
v.AuxInt = 2
v.AddArg(ptr)
@@ -8482,8 +8737,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%2 == 0) {
break
}
@@ -8518,8 +8773,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -8542,6 +8797,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpZero_10(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
config := b.Func.Config
typ := &b.Func.Config.Types
@@ -8553,8 +8810,8 @@ func rewriteValueMIPS_OpZero_10(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -8589,8 +8846,8 @@ func rewriteValueMIPS_OpZero_10(v *Value) bool {
break
}
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(t.(*types.Type).Alignment()%4 == 0) {
break
}
@@ -8630,8 +8887,8 @@ func rewriteValueMIPS_OpZero_10(v *Value) bool {
for {
s := v.AuxInt
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(s > 16 || t.(*types.Type).Alignment()%4 != 0) {
break
}
@@ -8648,42 +8905,46 @@ func rewriteValueMIPS_OpZero_10(v *Value) bool {
return false
}
func rewriteValueMIPS_OpZeroExt16to32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ZeroExt16to32 x)
// result: (MOVHUreg x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVHUreg)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpZeroExt8to16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ZeroExt8to16 x)
// result: (MOVBUreg x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVBUreg)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpZeroExt8to32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ZeroExt8to32 x)
// result: (MOVBUreg x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSMOVBUreg)
v.AddArg(x)
return true
}
}
func rewriteValueMIPS_OpZeromask_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Zeromask x)
// result: (NEG (SGTU x (MOVWconst [0])))
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpMIPSNEG)
v0 := b.NewValue0(v.Pos, OpMIPSSGTU, typ.Bool)
v0.AddArg(x)