aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/rewriteRISCV64.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/rewriteRISCV64.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/rewriteRISCV64.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewriteRISCV64.go1468
1 files changed, 935 insertions, 533 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteRISCV64.go b/src/cmd/compile/internal/ssa/rewriteRISCV64.go
index 2c23609d488..5e5c472aabe 100644
--- a/src/cmd/compile/internal/ssa/rewriteRISCV64.go
+++ b/src/cmd/compile/internal/ssa/rewriteRISCV64.go
@@ -512,11 +512,13 @@ func rewriteValueRISCV64(v *Value) bool {
return false
}
func rewriteValueRISCV64_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(OpRISCV64ADD)
v.AddArg(x)
v.AddArg(y)
@@ -524,11 +526,13 @@ func rewriteValueRISCV64_OpAdd16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64ADD)
v.AddArg(x)
v.AddArg(y)
@@ -536,11 +540,13 @@ func rewriteValueRISCV64_OpAdd32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpAdd32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add32F x y)
// result: (FADDS x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FADDS)
v.AddArg(x)
v.AddArg(y)
@@ -548,11 +554,13 @@ func rewriteValueRISCV64_OpAdd32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpAdd64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add64 x y)
// result: (ADD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64ADD)
v.AddArg(x)
v.AddArg(y)
@@ -560,11 +568,13 @@ func rewriteValueRISCV64_OpAdd64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpAdd64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Add64F x y)
// result: (FADDD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FADDD)
v.AddArg(x)
v.AddArg(y)
@@ -572,11 +582,13 @@ func rewriteValueRISCV64_OpAdd64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64ADD)
v.AddArg(x)
v.AddArg(y)
@@ -584,11 +596,13 @@ func rewriteValueRISCV64_OpAdd8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64ADD)
v.AddArg(x)
v.AddArg(y)
@@ -596,11 +610,12 @@ func rewriteValueRISCV64_OpAddPtr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpAddr_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Addr {sym} base)
// result: (MOVaddr {sym} base)
for {
sym := v.Aux
- base := v.Args[0]
+ base := v_0
v.reset(OpRISCV64MOVaddr)
v.Aux = sym
v.AddArg(base)
@@ -608,11 +623,13 @@ func rewriteValueRISCV64_OpAddr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64AND)
v.AddArg(x)
v.AddArg(y)
@@ -620,11 +637,13 @@ func rewriteValueRISCV64_OpAnd16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64AND)
v.AddArg(x)
v.AddArg(y)
@@ -632,11 +651,13 @@ func rewriteValueRISCV64_OpAnd32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpAnd64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (And64 x y)
// result: (AND x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v.AddArg(x)
v.AddArg(y)
@@ -644,11 +665,13 @@ func rewriteValueRISCV64_OpAnd64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64AND)
v.AddArg(x)
v.AddArg(y)
@@ -656,11 +679,13 @@ func rewriteValueRISCV64_OpAnd8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64AND)
v.AddArg(x)
v.AddArg(y)
@@ -668,13 +693,15 @@ func rewriteValueRISCV64_OpAndB_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpAvg64u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Avg64u <t> x y)
// result: (ADD (ADD <t> (SRLI <t> [1] x) (SRLI <t> [1] y)) (ANDI <t> [1] (AND <t> x y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64ADD)
v0 := b.NewValue0(v.Pos, OpRISCV64ADD, t)
v1 := b.NewValue0(v.Pos, OpRISCV64SRLI, t)
@@ -697,13 +724,16 @@ func rewriteValueRISCV64_OpAvg64u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64CALLclosure)
v.AuxInt = argwid
v.AddArg(entry)
@@ -713,10 +743,11 @@ func rewriteValueRISCV64_OpClosureCall_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpCom16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com16 x)
// result: (XORI [int64(-1)] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64XORI)
v.AuxInt = int64(-1)
v.AddArg(x)
@@ -724,10 +755,11 @@ func rewriteValueRISCV64_OpCom16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpCom32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com32 x)
// result: (XORI [int64(-1)] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64XORI)
v.AuxInt = int64(-1)
v.AddArg(x)
@@ -735,10 +767,11 @@ func rewriteValueRISCV64_OpCom32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpCom64_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com64 x)
// result: (XORI [int64(-1)] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64XORI)
v.AuxInt = int64(-1)
v.AddArg(x)
@@ -746,10 +779,11 @@ func rewriteValueRISCV64_OpCom64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpCom8_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Com8 x)
// result: (XORI [int64(-1)] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64XORI)
v.AuxInt = int64(-1)
v.AddArg(x)
@@ -844,11 +878,13 @@ func rewriteValueRISCV64_OpConstNil_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpConvert_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Convert x mem)
// result: (MOVconvert x mem)
for {
- mem := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ mem := v_1
v.reset(OpRISCV64MOVconvert)
v.AddArg(x)
v.AddArg(mem)
@@ -856,113 +892,125 @@ func rewriteValueRISCV64_OpConvert_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpCvt32Fto32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32Fto32 x)
// result: (FCVTWS x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTWS)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt32Fto64_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32Fto64 x)
// result: (FCVTLS x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTLS)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt32Fto64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32Fto64F x)
// result: (FCVTDS x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTDS)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt32to32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32to32F x)
// result: (FCVTSW x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTSW)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt32to64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt32to64F x)
// result: (FCVTDW x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTDW)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt64Fto32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64Fto32 x)
// result: (FCVTWD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTWD)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt64Fto32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64Fto32F x)
// result: (FCVTSD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTSD)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt64Fto64_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64Fto64 x)
// result: (FCVTLD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTLD)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt64to32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64to32F x)
// result: (FCVTSL x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTSL)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpCvt64to64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Cvt64to64F x)
// result: (FCVTDL x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FCVTDL)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_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: (DIVW (SignExt16to32 x) (SignExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVW)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -974,13 +1022,15 @@ func rewriteValueRISCV64_OpDiv16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (DIVUW (ZeroExt16to32 x) (ZeroExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVUW)
v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
v0.AddArg(x)
@@ -992,11 +1042,13 @@ func rewriteValueRISCV64_OpDiv16u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpDiv32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div32 x y)
// result: (DIVW x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVW)
v.AddArg(x)
v.AddArg(y)
@@ -1004,11 +1056,13 @@ func rewriteValueRISCV64_OpDiv32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpDiv32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div32F x y)
// result: (FDIVS x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FDIVS)
v.AddArg(x)
v.AddArg(y)
@@ -1016,11 +1070,13 @@ func rewriteValueRISCV64_OpDiv32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpDiv32u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div32u x y)
// result: (DIVUW x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVUW)
v.AddArg(x)
v.AddArg(y)
@@ -1028,11 +1084,13 @@ func rewriteValueRISCV64_OpDiv32u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpDiv64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div64 x y)
// result: (DIV x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIV)
v.AddArg(x)
v.AddArg(y)
@@ -1040,11 +1098,13 @@ func rewriteValueRISCV64_OpDiv64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpDiv64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div64F x y)
// result: (FDIVD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FDIVD)
v.AddArg(x)
v.AddArg(y)
@@ -1052,11 +1112,13 @@ func rewriteValueRISCV64_OpDiv64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpDiv64u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Div64u x y)
// result: (DIVU x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVU)
v.AddArg(x)
v.AddArg(y)
@@ -1064,13 +1126,15 @@ func rewriteValueRISCV64_OpDiv64u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (DIVW (SignExt8to32 x) (SignExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVW)
v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
v0.AddArg(x)
@@ -1082,13 +1146,15 @@ func rewriteValueRISCV64_OpDiv8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (DIVUW (ZeroExt8to32 x) (ZeroExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64DIVUW)
v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
v0.AddArg(x)
@@ -1100,13 +1166,15 @@ func rewriteValueRISCV64_OpDiv8u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SEQZ (ZeroExt16to64 (SUB <x.Type> x y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SEQZ)
v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
v1 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
@@ -1118,13 +1186,15 @@ func rewriteValueRISCV64_OpEq16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SEQZ (ZeroExt32to64 (SUB <x.Type> x y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SEQZ)
v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
v1 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
@@ -1136,11 +1206,13 @@ func rewriteValueRISCV64_OpEq32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpEq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Eq32F x y)
// result: (FEQS x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FEQS)
v.AddArg(x)
v.AddArg(y)
@@ -1148,12 +1220,14 @@ func rewriteValueRISCV64_OpEq32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpEq64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Eq64 x y)
// result: (SEQZ (SUB <x.Type> x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SEQZ)
v0 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
v0.AddArg(x)
@@ -1163,11 +1237,13 @@ func rewriteValueRISCV64_OpEq64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpEq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Eq64F x y)
// result: (FEQD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FEQD)
v.AddArg(x)
v.AddArg(y)
@@ -1175,13 +1251,15 @@ func rewriteValueRISCV64_OpEq64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SEQZ (ZeroExt8to64 (SUB <x.Type> x y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SEQZ)
v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
v1 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
@@ -1193,13 +1271,15 @@ func rewriteValueRISCV64_OpEq8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (XORI [1] (XOR <typ.Bool> x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64XORI)
v.AuxInt = 1
v0 := b.NewValue0(v.Pos, OpRISCV64XOR, typ.Bool)
@@ -1210,12 +1290,14 @@ func rewriteValueRISCV64_OpEqB_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpEqPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (EqPtr x y)
// result: (SEQZ (SUB <x.Type> x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SEQZ)
v0 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
v0.AddArg(x)
@@ -1225,13 +1307,15 @@ func rewriteValueRISCV64_OpEqPtr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less16 x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess16, typ.Bool)
v0.AddArg(x)
@@ -1241,13 +1325,15 @@ func rewriteValueRISCV64_OpGeq16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less16U x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess16U, typ.Bool)
v0.AddArg(x)
@@ -1257,13 +1343,15 @@ func rewriteValueRISCV64_OpGeq16U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less32 x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess32, typ.Bool)
v0.AddArg(x)
@@ -1273,11 +1361,13 @@ func rewriteValueRISCV64_OpGeq32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGeq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Geq32F x y)
// result: (FLES y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLES)
v.AddArg(y)
v.AddArg(x)
@@ -1285,13 +1375,15 @@ func rewriteValueRISCV64_OpGeq32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less32U x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess32U, typ.Bool)
v0.AddArg(x)
@@ -1301,13 +1393,15 @@ func rewriteValueRISCV64_OpGeq32U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGeq64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq64 x y)
// result: (Not (Less64 x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess64, typ.Bool)
v0.AddArg(x)
@@ -1317,11 +1411,13 @@ func rewriteValueRISCV64_OpGeq64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGeq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Geq64F x y)
// result: (FLED y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLED)
v.AddArg(y)
v.AddArg(x)
@@ -1329,13 +1425,15 @@ func rewriteValueRISCV64_OpGeq64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGeq64U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Geq64U x y)
// result: (Not (Less64U x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess64U, typ.Bool)
v0.AddArg(x)
@@ -1345,13 +1443,15 @@ func rewriteValueRISCV64_OpGeq64U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less8 x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess8, typ.Bool)
v0.AddArg(x)
@@ -1361,13 +1461,15 @@ func rewriteValueRISCV64_OpGeq8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less8U x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess8U, typ.Bool)
v0.AddArg(x)
@@ -1401,11 +1503,13 @@ func rewriteValueRISCV64_OpGetClosurePtr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater16 x y)
// result: (Less16 y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess16)
v.AddArg(y)
v.AddArg(x)
@@ -1413,11 +1517,13 @@ func rewriteValueRISCV64_OpGreater16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater16U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater16U x y)
// result: (Less16U y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess16U)
v.AddArg(y)
v.AddArg(x)
@@ -1425,11 +1531,13 @@ func rewriteValueRISCV64_OpGreater16U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater32 x y)
// result: (Less32 y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess32)
v.AddArg(y)
v.AddArg(x)
@@ -1437,11 +1545,13 @@ func rewriteValueRISCV64_OpGreater32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater32F x y)
// result: (FLTS y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLTS)
v.AddArg(y)
v.AddArg(x)
@@ -1449,11 +1559,13 @@ func rewriteValueRISCV64_OpGreater32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater32U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater32U x y)
// result: (Less32U y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess32U)
v.AddArg(y)
v.AddArg(x)
@@ -1461,11 +1573,13 @@ func rewriteValueRISCV64_OpGreater32U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater64 x y)
// result: (Less64 y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess64)
v.AddArg(y)
v.AddArg(x)
@@ -1473,11 +1587,13 @@ func rewriteValueRISCV64_OpGreater64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater64F x y)
// result: (FLTD y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLTD)
v.AddArg(y)
v.AddArg(x)
@@ -1485,11 +1601,13 @@ func rewriteValueRISCV64_OpGreater64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater64U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater64U x y)
// result: (Less64U y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess64U)
v.AddArg(y)
v.AddArg(x)
@@ -1497,11 +1615,13 @@ func rewriteValueRISCV64_OpGreater64U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater8 x y)
// result: (Less8 y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess8)
v.AddArg(y)
v.AddArg(x)
@@ -1509,11 +1629,13 @@ func rewriteValueRISCV64_OpGreater8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpGreater8U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Greater8U x y)
// result: (Less8U y x)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpLess8U)
v.AddArg(y)
v.AddArg(x)
@@ -1521,13 +1643,15 @@ func rewriteValueRISCV64_OpGreater8U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SRAI [32] (MUL (SignExt32to64 x) (SignExt32to64 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRAI)
v.AuxInt = 32
v0 := b.NewValue0(v.Pos, OpRISCV64MUL, typ.Int64)
@@ -1542,13 +1666,15 @@ func rewriteValueRISCV64_OpHmul32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SRLI [32] (MUL (ZeroExt32to64 x) (ZeroExt32to64 y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRLI)
v.AuxInt = 32
v0 := b.NewValue0(v.Pos, OpRISCV64MUL, typ.Int64)
@@ -1563,11 +1689,13 @@ func rewriteValueRISCV64_OpHmul32u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpHmul64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Hmul64 x y)
// result: (MULH x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64MULH)
v.AddArg(x)
v.AddArg(y)
@@ -1575,11 +1703,13 @@ func rewriteValueRISCV64_OpHmul64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpHmul64u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Hmul64u x y)
// result: (MULHU x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64MULHU)
v.AddArg(x)
v.AddArg(y)
@@ -1587,12 +1717,14 @@ func rewriteValueRISCV64_OpHmul64u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64CALLinter)
v.AuxInt = argwid
v.AddArg(entry)
@@ -1601,11 +1733,13 @@ func rewriteValueRISCV64_OpInterCall_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpIsInBounds_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (IsInBounds idx len)
// result: (Less64U idx len)
for {
- len := v.Args[1]
- idx := v.Args[0]
+ idx := v_0
+ len := v_1
v.reset(OpLess64U)
v.AddArg(idx)
v.AddArg(len)
@@ -1613,12 +1747,13 @@ func rewriteValueRISCV64_OpIsInBounds_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpIsNonNil_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (IsNonNil p)
// result: (NeqPtr (MOVDconst) p)
for {
- p := v.Args[0]
+ p := v_0
v.reset(OpNeqPtr)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVDconst, typ.UInt64)
v.AddArg(v0)
@@ -1627,11 +1762,13 @@ func rewriteValueRISCV64_OpIsNonNil_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpIsSliceInBounds_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (IsSliceInBounds idx len)
// result: (Leq64U idx len)
for {
- len := v.Args[1]
- idx := v.Args[0]
+ idx := v_0
+ len := v_1
v.reset(OpLeq64U)
v.AddArg(idx)
v.AddArg(len)
@@ -1639,13 +1776,15 @@ func rewriteValueRISCV64_OpIsSliceInBounds_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less16 y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess16, typ.Bool)
v0.AddArg(y)
@@ -1655,13 +1794,15 @@ func rewriteValueRISCV64_OpLeq16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less16U y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess16U, typ.Bool)
v0.AddArg(y)
@@ -1671,13 +1812,15 @@ func rewriteValueRISCV64_OpLeq16U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less32 y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess32, typ.Bool)
v0.AddArg(y)
@@ -1687,11 +1830,13 @@ func rewriteValueRISCV64_OpLeq32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLeq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Leq32F x y)
// result: (FLES x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLES)
v.AddArg(x)
v.AddArg(y)
@@ -1699,13 +1844,15 @@ func rewriteValueRISCV64_OpLeq32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less32U y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess32U, typ.Bool)
v0.AddArg(y)
@@ -1715,13 +1862,15 @@ func rewriteValueRISCV64_OpLeq32U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLeq64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq64 x y)
// result: (Not (Less64 y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess64, typ.Bool)
v0.AddArg(y)
@@ -1731,11 +1880,13 @@ func rewriteValueRISCV64_OpLeq64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLeq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Leq64F x y)
// result: (FLED x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLED)
v.AddArg(x)
v.AddArg(y)
@@ -1743,13 +1894,15 @@ func rewriteValueRISCV64_OpLeq64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLeq64U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Leq64U x y)
// result: (Not (Less64U y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess64U, typ.Bool)
v0.AddArg(y)
@@ -1759,13 +1912,15 @@ func rewriteValueRISCV64_OpLeq64U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less8 y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess8, typ.Bool)
v0.AddArg(y)
@@ -1775,13 +1930,15 @@ func rewriteValueRISCV64_OpLeq8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (Not (Less8U y x))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpNot)
v0 := b.NewValue0(v.Pos, OpLess8U, typ.Bool)
v0.AddArg(y)
@@ -1791,13 +1948,15 @@ func rewriteValueRISCV64_OpLeq8U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SLT (SignExt16to64 x) (SignExt16to64 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLT)
v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
v0.AddArg(x)
@@ -1809,13 +1968,15 @@ func rewriteValueRISCV64_OpLess16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SLTU (ZeroExt16to64 x) (ZeroExt16to64 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLTU)
v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
v0.AddArg(x)
@@ -1827,13 +1988,15 @@ func rewriteValueRISCV64_OpLess16U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLess32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Less32 x y)
// result: (SLT (SignExt32to64 x) (SignExt32to64 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLT)
v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
v0.AddArg(x)
@@ -1845,11 +2008,13 @@ func rewriteValueRISCV64_OpLess32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLess32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Less32F x y)
// result: (FLTS x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLTS)
v.AddArg(x)
v.AddArg(y)
@@ -1857,13 +2022,15 @@ func rewriteValueRISCV64_OpLess32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLess32U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Less32U x y)
// result: (SLTU (ZeroExt32to64 x) (ZeroExt32to64 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLTU)
v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
v0.AddArg(x)
@@ -1875,11 +2042,13 @@ func rewriteValueRISCV64_OpLess32U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLess64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Less64 x y)
// result: (SLT x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLT)
v.AddArg(x)
v.AddArg(y)
@@ -1887,11 +2056,13 @@ func rewriteValueRISCV64_OpLess64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLess64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Less64F x y)
// result: (FLTD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FLTD)
v.AddArg(x)
v.AddArg(y)
@@ -1899,11 +2070,13 @@ func rewriteValueRISCV64_OpLess64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLess64U_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Less64U x y)
// result: (SLTU x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLTU)
v.AddArg(x)
v.AddArg(y)
@@ -1911,13 +2084,15 @@ func rewriteValueRISCV64_OpLess64U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SLT (SignExt8to64 x) (SignExt8to64 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLT)
v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
v0.AddArg(x)
@@ -1929,13 +2104,15 @@ func rewriteValueRISCV64_OpLess8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SLTU (ZeroExt8to64 x) (ZeroExt8to64 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SLTU)
v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
v0.AddArg(x)
@@ -1947,13 +2124,15 @@ func rewriteValueRISCV64_OpLess8U_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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
}
@@ -1967,8 +2146,8 @@ func rewriteValueRISCV64_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
}
@@ -1982,8 +2161,8 @@ func rewriteValueRISCV64_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
}
@@ -1997,8 +2176,8 @@ func rewriteValueRISCV64_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
}
@@ -2012,8 +2191,8 @@ func rewriteValueRISCV64_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
}
@@ -2027,8 +2206,8 @@ func rewriteValueRISCV64_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) && isSigned(t)) {
break
}
@@ -2042,8 +2221,8 @@ func rewriteValueRISCV64_OpLoad_0(v *Value) bool {
// result: (MOVWUload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is32BitInt(t) && !isSigned(t)) {
break
}
@@ -2057,8 +2236,8 @@ func rewriteValueRISCV64_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 !(is64BitInt(t) || isPtr(t)) {
break
}
@@ -2072,8 +2251,8 @@ func rewriteValueRISCV64_OpLoad_0(v *Value) bool {
// result: (FMOVWload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is32BitFloat(t)) {
break
}
@@ -2087,8 +2266,8 @@ func rewriteValueRISCV64_OpLoad_0(v *Value) bool {
// result: (FMOVDload ptr mem)
for {
t := v.Type
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
if !(is64BitFloat(t)) {
break
}
@@ -2100,12 +2279,12 @@ func rewriteValueRISCV64_OpLoad_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpLocalAddr_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (LocalAddr {sym} base _)
// result: (MOVaddr {sym} base)
for {
sym := v.Aux
- _ = v.Args[1]
- base := v.Args[0]
+ base := v_0
v.reset(OpRISCV64MOVaddr)
v.Aux = sym
v.AddArg(base)
@@ -2113,14 +2292,16 @@ func rewriteValueRISCV64_OpLocalAddr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg16 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2138,14 +2319,16 @@ func rewriteValueRISCV64_OpLsh16x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg16 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2163,13 +2346,15 @@ func rewriteValueRISCV64_OpLsh16x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh16x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Lsh16x64 <t> x y)
// result: (AND (SLL <t> x y) (Neg16 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2185,14 +2370,16 @@ func rewriteValueRISCV64_OpLsh16x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg16 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2210,14 +2397,16 @@ func rewriteValueRISCV64_OpLsh16x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg32 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2235,14 +2424,16 @@ func rewriteValueRISCV64_OpLsh32x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg32 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2260,13 +2451,15 @@ func rewriteValueRISCV64_OpLsh32x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh32x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Lsh32x64 <t> x y)
// result: (AND (SLL <t> x y) (Neg32 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2282,14 +2475,16 @@ func rewriteValueRISCV64_OpLsh32x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg32 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2307,14 +2502,16 @@ func rewriteValueRISCV64_OpLsh32x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh64x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh64x16 <t> x y)
// result: (AND (SLL <t> x y) (Neg64 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2332,14 +2529,16 @@ func rewriteValueRISCV64_OpLsh64x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh64x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh64x32 <t> x y)
// result: (AND (SLL <t> x y) (Neg64 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2357,13 +2556,15 @@ func rewriteValueRISCV64_OpLsh64x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh64x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Lsh64x64 <t> x y)
// result: (AND (SLL <t> x y) (Neg64 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2379,14 +2580,16 @@ func rewriteValueRISCV64_OpLsh64x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh64x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Lsh64x8 <t> x y)
// result: (AND (SLL <t> x y) (Neg64 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2404,14 +2607,16 @@ func rewriteValueRISCV64_OpLsh64x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg8 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2429,14 +2634,16 @@ func rewriteValueRISCV64_OpLsh8x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg8 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2454,13 +2661,15 @@ func rewriteValueRISCV64_OpLsh8x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpLsh8x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Lsh8x64 <t> x y)
// result: (AND (SLL <t> x y) (Neg8 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2476,14 +2685,16 @@ func rewriteValueRISCV64_OpLsh8x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SLL <t> x y) (Neg8 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SLL, t)
v0.AddArg(x)
@@ -2501,13 +2712,15 @@ func rewriteValueRISCV64_OpLsh8x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (REMW (SignExt16to32 x) (SignExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMW)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -2519,13 +2732,15 @@ func rewriteValueRISCV64_OpMod16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (REMUW (ZeroExt16to32 x) (ZeroExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMUW)
v0 := b.NewValue0(v.Pos, OpZeroExt16to32, typ.UInt32)
v0.AddArg(x)
@@ -2537,11 +2752,13 @@ func rewriteValueRISCV64_OpMod16u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMod32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mod32 x y)
// result: (REMW x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMW)
v.AddArg(x)
v.AddArg(y)
@@ -2549,11 +2766,13 @@ func rewriteValueRISCV64_OpMod32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMod32u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mod32u x y)
// result: (REMUW x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMUW)
v.AddArg(x)
v.AddArg(y)
@@ -2561,11 +2780,13 @@ func rewriteValueRISCV64_OpMod32u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMod64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mod64 x y)
// result: (REM x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REM)
v.AddArg(x)
v.AddArg(y)
@@ -2573,11 +2794,13 @@ func rewriteValueRISCV64_OpMod64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMod64u_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mod64u x y)
// result: (REMU x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMU)
v.AddArg(x)
v.AddArg(y)
@@ -2585,13 +2808,15 @@ func rewriteValueRISCV64_OpMod64u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (REMW (SignExt8to32 x) (SignExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMW)
v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
v0.AddArg(x)
@@ -2603,13 +2828,15 @@ func rewriteValueRISCV64_OpMod8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (REMUW (ZeroExt8to32 x) (ZeroExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64REMUW)
v0 := b.NewValue0(v.Pos, OpZeroExt8to32, typ.UInt32)
v0.AddArg(x)
@@ -2621,6 +2848,9 @@ func rewriteValueRISCV64_OpMod8u_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMove_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
@@ -2630,7 +2860,7 @@ func rewriteValueRISCV64_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)
@@ -2642,9 +2872,9 @@ func rewriteValueRISCV64_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(OpRISCV64MOVBstore)
v.AddArg(dst)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVBload, typ.Int8)
@@ -2660,9 +2890,9 @@ func rewriteValueRISCV64_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(OpRISCV64MOVHstore)
v.AddArg(dst)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVHload, typ.Int16)
@@ -2678,9 +2908,9 @@ func rewriteValueRISCV64_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(OpRISCV64MOVWstore)
v.AddArg(dst)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVWload, typ.Int32)
@@ -2696,9 +2926,9 @@ func rewriteValueRISCV64_OpMove_0(v *Value) bool {
if v.AuxInt != 8 {
break
}
- mem := v.Args[2]
- dst := v.Args[0]
- src := v.Args[1]
+ dst := v_0
+ src := v_1
+ mem := v_2
v.reset(OpRISCV64MOVDstore)
v.AddArg(dst)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVDload, typ.Int64)
@@ -2713,9 +2943,9 @@ func rewriteValueRISCV64_OpMove_0(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
v.reset(OpRISCV64LoweredMove)
v.AuxInt = t.(*types.Type).Alignment()
v.AddArg(dst)
@@ -2729,13 +2959,15 @@ func rewriteValueRISCV64_OpMove_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMul16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mul16 x y)
// result: (MULW (SignExt16to32 x) (SignExt16to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64MULW)
v0 := b.NewValue0(v.Pos, OpSignExt16to32, typ.Int32)
v0.AddArg(x)
@@ -2747,11 +2979,13 @@ func rewriteValueRISCV64_OpMul16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMul32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul32 x y)
// result: (MULW x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64MULW)
v.AddArg(x)
v.AddArg(y)
@@ -2759,11 +2993,13 @@ func rewriteValueRISCV64_OpMul32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMul32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul32F x y)
// result: (FMULS x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FMULS)
v.AddArg(x)
v.AddArg(y)
@@ -2771,11 +3007,13 @@ func rewriteValueRISCV64_OpMul32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMul64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul64 x y)
// result: (MUL x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64MUL)
v.AddArg(x)
v.AddArg(y)
@@ -2783,11 +3021,13 @@ func rewriteValueRISCV64_OpMul64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMul64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Mul64F x y)
// result: (FMULD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FMULD)
v.AddArg(x)
v.AddArg(y)
@@ -2795,13 +3035,15 @@ func rewriteValueRISCV64_OpMul64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpMul8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Mul8 x y)
// result: (MULW (SignExt8to32 x) (SignExt8to32 y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64MULW)
v0 := b.NewValue0(v.Pos, OpSignExt8to32, typ.Int32)
v0.AddArg(x)
@@ -2813,12 +3055,13 @@ func rewriteValueRISCV64_OpMul8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeg16_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neg16 x)
// result: (SUB (MOVHconst) x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SUB)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVHconst, typ.UInt16)
v.AddArg(v0)
@@ -2827,12 +3070,13 @@ func rewriteValueRISCV64_OpNeg16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeg32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neg32 x)
// result: (SUB (MOVWconst) x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SUB)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVWconst, typ.UInt32)
v.AddArg(v0)
@@ -2841,22 +3085,24 @@ func rewriteValueRISCV64_OpNeg32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeg32F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg32F x)
// result: (FNEGS x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FNEGS)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpNeg64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neg64 x)
// result: (SUB (MOVDconst) x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SUB)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVDconst, typ.UInt64)
v.AddArg(v0)
@@ -2865,22 +3111,24 @@ func rewriteValueRISCV64_OpNeg64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeg64F_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Neg64F x)
// result: (FNEGD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FNEGD)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_OpNeg8_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Neg8 x)
// result: (SUB (MOVBconst) x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SUB)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVBconst, typ.UInt8)
v.AddArg(v0)
@@ -2889,13 +3137,15 @@ func rewriteValueRISCV64_OpNeg8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SNEZ (ZeroExt16to64 (SUB <x.Type> x y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SNEZ)
v0 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
v1 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
@@ -2907,13 +3157,15 @@ func rewriteValueRISCV64_OpNeq16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SNEZ (ZeroExt32to64 (SUB <x.Type> x y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SNEZ)
v0 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
v1 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
@@ -2925,11 +3177,13 @@ func rewriteValueRISCV64_OpNeq32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeq32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Neq32F x y)
// result: (FNES x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FNES)
v.AddArg(x)
v.AddArg(y)
@@ -2937,12 +3191,14 @@ func rewriteValueRISCV64_OpNeq32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeq64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Neq64 x y)
// result: (SNEZ (SUB <x.Type> x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SNEZ)
v0 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
v0.AddArg(x)
@@ -2952,11 +3208,13 @@ func rewriteValueRISCV64_OpNeq64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeq64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Neq64F x y)
// result: (FNED x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FNED)
v.AddArg(x)
v.AddArg(y)
@@ -2964,13 +3222,15 @@ func rewriteValueRISCV64_OpNeq64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (SNEZ (ZeroExt8to64 (SUB <x.Type> x y)))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SNEZ)
v0 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
v1 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
@@ -2982,11 +3242,13 @@ func rewriteValueRISCV64_OpNeq8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64XOR)
v.AddArg(x)
v.AddArg(y)
@@ -2994,12 +3256,14 @@ func rewriteValueRISCV64_OpNeqB_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNeqPtr_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (NeqPtr x y)
// result: (SNEZ (SUB <x.Type> x y))
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SNEZ)
v0 := b.NewValue0(v.Pos, OpRISCV64SUB, x.Type)
v0.AddArg(x)
@@ -3009,11 +3273,13 @@ func rewriteValueRISCV64_OpNeqPtr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64LoweredNilCheck)
v.AddArg(ptr)
v.AddArg(mem)
@@ -3021,10 +3287,11 @@ func rewriteValueRISCV64_OpNilCheck_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpNot_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Not x)
// result: (XORI [1] x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64XORI)
v.AuxInt = 1
v.AddArg(x)
@@ -3032,13 +3299,14 @@ func rewriteValueRISCV64_OpNot_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpOffPtr_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (OffPtr [off] ptr:(SP))
// result: (MOVaddr [off] ptr)
for {
off := v.AuxInt
- ptr := v.Args[0]
+ ptr := v_0
if ptr.Op != OpSP {
break
}
@@ -3052,7 +3320,7 @@ func rewriteValueRISCV64_OpOffPtr_0(v *Value) bool {
// result: (ADDI [off] ptr)
for {
off := v.AuxInt
- ptr := v.Args[0]
+ ptr := v_0
if !(is32Bit(off)) {
break
}
@@ -3065,7 +3333,7 @@ func rewriteValueRISCV64_OpOffPtr_0(v *Value) bool {
// result: (ADD (MOVDconst [off]) ptr)
for {
off := v.AuxInt
- ptr := v.Args[0]
+ ptr := v_0
v.reset(OpRISCV64ADD)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVDconst, typ.UInt64)
v0.AuxInt = off
@@ -3075,11 +3343,13 @@ func rewriteValueRISCV64_OpOffPtr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64OR)
v.AddArg(x)
v.AddArg(y)
@@ -3087,11 +3357,13 @@ func rewriteValueRISCV64_OpOr16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64OR)
v.AddArg(x)
v.AddArg(y)
@@ -3099,11 +3371,13 @@ func rewriteValueRISCV64_OpOr32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpOr64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Or64 x y)
// result: (OR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64OR)
v.AddArg(x)
v.AddArg(y)
@@ -3111,11 +3385,13 @@ func rewriteValueRISCV64_OpOr64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64OR)
v.AddArg(x)
v.AddArg(y)
@@ -3123,11 +3399,13 @@ func rewriteValueRISCV64_OpOr8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64OR)
v.AddArg(x)
v.AddArg(y)
@@ -3135,14 +3413,17 @@ func rewriteValueRISCV64_OpOrB_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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
}
@@ -3158,9 +3439,9 @@ func rewriteValueRISCV64_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
}
@@ -3176,9 +3457,9 @@ func rewriteValueRISCV64_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
}
@@ -3192,18 +3473,18 @@ func rewriteValueRISCV64_OpPanicBounds_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64ADD_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (ADD (MOVDconst [off]) ptr)
// cond: is32Bit(off)
// result: (ADDI [off] ptr)
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 != OpRISCV64MOVDconst {
continue
}
off := v_0.AuxInt
- ptr := v.Args[1^_i0]
+ ptr := v_1
if !(is32Bit(off)) {
continue
}
@@ -3217,12 +3498,12 @@ func rewriteValueRISCV64_OpRISCV64ADD_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64ADDI_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (ADDI [c] (MOVaddr [d] {s} x))
// cond: is32Bit(c+d)
// result: (MOVaddr [c+d] {s} x)
for {
c := v.AuxInt
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
@@ -3244,7 +3525,7 @@ func rewriteValueRISCV64_OpRISCV64ADDI_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)
@@ -3253,20 +3534,21 @@ func rewriteValueRISCV64_OpRISCV64ADDI_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVBUload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBUload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVBUload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3283,13 +3565,12 @@ func rewriteValueRISCV64_OpRISCV64MOVBUload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3303,20 +3584,21 @@ func rewriteValueRISCV64_OpRISCV64MOVBUload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVBload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVBload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3333,13 +3615,12 @@ func rewriteValueRISCV64_OpRISCV64MOVBload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3353,21 +3634,23 @@ func rewriteValueRISCV64_OpRISCV64MOVBload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVBstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVBstore [off1] {sym1} (MOVaddr [off2] {sym2} base) val mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVBstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3385,14 +3668,13 @@ func rewriteValueRISCV64_OpRISCV64MOVBstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1 + off2)) {
break
}
@@ -3454,20 +3736,21 @@ func rewriteValueRISCV64_OpRISCV64MOVDconst_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVDload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVDload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVDload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3484,13 +3767,12 @@ func rewriteValueRISCV64_OpRISCV64MOVDload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3504,21 +3786,23 @@ func rewriteValueRISCV64_OpRISCV64MOVDload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVDstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVDstore [off1] {sym1} (MOVaddr [off2] {sym2} base) val mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVDstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3536,14 +3820,13 @@ func rewriteValueRISCV64_OpRISCV64MOVDstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1 + off2)) {
break
}
@@ -3558,20 +3841,21 @@ func rewriteValueRISCV64_OpRISCV64MOVDstore_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVHUload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHUload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVHUload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3588,13 +3872,12 @@ func rewriteValueRISCV64_OpRISCV64MOVHUload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3608,20 +3891,21 @@ func rewriteValueRISCV64_OpRISCV64MOVHUload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVHload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVHload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3638,13 +3922,12 @@ func rewriteValueRISCV64_OpRISCV64MOVHload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3658,21 +3941,23 @@ func rewriteValueRISCV64_OpRISCV64MOVHload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVHstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVHstore [off1] {sym1} (MOVaddr [off2] {sym2} base) val mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVHstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3690,14 +3975,13 @@ func rewriteValueRISCV64_OpRISCV64MOVHstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1 + off2)) {
break
}
@@ -3712,20 +3996,21 @@ func rewriteValueRISCV64_OpRISCV64MOVHstore_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVWUload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVWUload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVWUload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3742,13 +4027,12 @@ func rewriteValueRISCV64_OpRISCV64MOVWUload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3762,20 +4046,21 @@ func rewriteValueRISCV64_OpRISCV64MOVWUload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVWload_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVWload [off1] {sym1} (MOVaddr [off2] {sym2} base) mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVWload [off1+off2] {mergeSym(sym1,sym2)} base mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3792,13 +4077,12 @@ func rewriteValueRISCV64_OpRISCV64MOVWload_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[1]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
+ mem := v_1
if !(is32Bit(off1 + off2)) {
break
}
@@ -3812,21 +4096,23 @@ func rewriteValueRISCV64_OpRISCV64MOVWload_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_OpRISCV64MOVWstore_0(v *Value) bool {
+ v_2 := v.Args[2]
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (MOVWstore [off1] {sym1} (MOVaddr [off2] {sym2} base) val mem)
// cond: is32Bit(off1+off2) && canMergeSym(sym1, sym2)
// result: (MOVWstore [off1+off2] {mergeSym(sym1,sym2)} base val mem)
for {
off1 := v.AuxInt
sym1 := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64MOVaddr {
break
}
off2 := v_0.AuxInt
sym2 := v_0.Aux
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1+off2) && canMergeSym(sym1, sym2)) {
break
}
@@ -3844,14 +4130,13 @@ func rewriteValueRISCV64_OpRISCV64MOVWstore_0(v *Value) bool {
for {
off1 := v.AuxInt
sym := v.Aux
- mem := v.Args[2]
- v_0 := v.Args[0]
if v_0.Op != OpRISCV64ADDI {
break
}
off2 := v_0.AuxInt
base := v_0.Args[0]
- val := v.Args[1]
+ val := v_1
+ mem := v_2
if !(is32Bit(off1 + off2)) {
break
}
@@ -3866,15 +4151,15 @@ func rewriteValueRISCV64_OpRISCV64MOVWstore_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_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 (MOVHconst [c]))
// result: (Or16 (Lsh16x64 <t> x (MOVHconst [c&15])) (Rsh16Ux64 <t> x (MOVHconst [-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 != OpRISCV64MOVHconst {
break
}
@@ -3897,15 +4182,15 @@ func rewriteValueRISCV64_OpRotateLeft16_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_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 (Lsh32x64 <t> x (MOVWconst [c&31])) (Rsh32Ux64 <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 != OpRISCV64MOVWconst {
break
}
@@ -3928,15 +4213,15 @@ func rewriteValueRISCV64_OpRotateLeft32_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_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 (MOVDconst [c]))
// result: (Or64 (Lsh64x64 <t> x (MOVDconst [c&63])) (Rsh64Ux64 <t> x (MOVDconst [-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 != OpRISCV64MOVDconst {
break
}
@@ -3959,15 +4244,15 @@ func rewriteValueRISCV64_OpRotateLeft64_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_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 (MOVBconst [c]))
// result: (Or8 (Lsh8x64 <t> x (MOVBconst [c&7])) (Rsh8Ux64 <t> x (MOVBconst [-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 != OpRISCV64MOVBconst {
break
}
@@ -3990,10 +4275,11 @@ func rewriteValueRISCV64_OpRotateLeft8_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_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)
@@ -4001,10 +4287,11 @@ func rewriteValueRISCV64_OpRound32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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)
@@ -4012,14 +4299,16 @@ func rewriteValueRISCV64_OpRound64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt16to64 x) y) (Neg16 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
@@ -4039,14 +4328,16 @@ func rewriteValueRISCV64_OpRsh16Ux16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt16to64 x) y) (Neg16 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
@@ -4066,14 +4357,16 @@ func rewriteValueRISCV64_OpRsh16Ux32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (AND (SRL <t> (ZeroExt16to64 x) y) (Neg16 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
@@ -4091,14 +4384,16 @@ func rewriteValueRISCV64_OpRsh16Ux64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt16to64 x) y) (Neg16 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt16to64, typ.UInt64)
@@ -4118,14 +4413,16 @@ func rewriteValueRISCV64_OpRsh16Ux8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt16to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt16to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
@@ -4147,14 +4444,16 @@ func rewriteValueRISCV64_OpRsh16x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt16to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt32to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
@@ -4176,14 +4475,16 @@ func rewriteValueRISCV64_OpRsh16x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt16to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
@@ -4203,14 +4504,16 @@ func rewriteValueRISCV64_OpRsh16x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt16to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt8to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt16to64, typ.Int64)
@@ -4232,14 +4535,16 @@ func rewriteValueRISCV64_OpRsh16x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt32to64 x) y) (Neg32 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
@@ -4259,14 +4564,16 @@ func rewriteValueRISCV64_OpRsh32Ux16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt32to64 x) y) (Neg32 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
@@ -4286,14 +4593,16 @@ func rewriteValueRISCV64_OpRsh32Ux32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh32Ux64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32Ux64 <t> x y)
// result: (AND (SRL <t> (ZeroExt32to64 x) y) (Neg32 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
@@ -4311,14 +4620,16 @@ func rewriteValueRISCV64_OpRsh32Ux64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt32to64 x) y) (Neg32 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt32to64, typ.UInt64)
@@ -4338,14 +4649,16 @@ func rewriteValueRISCV64_OpRsh32Ux8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt32to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt16to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
@@ -4367,14 +4680,16 @@ func rewriteValueRISCV64_OpRsh32x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt32to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt32to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
@@ -4396,14 +4711,16 @@ func rewriteValueRISCV64_OpRsh32x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh32x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh32x64 <t> x y)
// result: (SRA <t> (SignExt32to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
@@ -4423,14 +4740,16 @@ func rewriteValueRISCV64_OpRsh32x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt32to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt8to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt32to64, typ.Int64)
@@ -4452,14 +4771,16 @@ func rewriteValueRISCV64_OpRsh32x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64Ux16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh64Ux16 <t> x y)
// result: (AND (SRL <t> x y) (Neg64 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v0.AddArg(x)
@@ -4477,14 +4798,16 @@ func rewriteValueRISCV64_OpRsh64Ux16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64Ux32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh64Ux32 <t> x y)
// result: (AND (SRL <t> x y) (Neg64 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v0.AddArg(x)
@@ -4502,13 +4825,15 @@ func rewriteValueRISCV64_OpRsh64Ux32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64Ux64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Rsh64Ux64 <t> x y)
// result: (AND (SRL <t> x y) (Neg64 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v0.AddArg(x)
@@ -4524,14 +4849,16 @@ func rewriteValueRISCV64_OpRsh64Ux64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64Ux8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh64Ux8 <t> x y)
// result: (AND (SRL <t> x y) (Neg64 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v0.AddArg(x)
@@ -4549,14 +4876,16 @@ func rewriteValueRISCV64_OpRsh64Ux8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64x16_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh64x16 <t> x y)
// result: (SRA <t> x (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt16to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v.AddArg(x)
@@ -4576,14 +4905,16 @@ func rewriteValueRISCV64_OpRsh64x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64x32_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh64x32 <t> x y)
// result: (SRA <t> x (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt32to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v.AddArg(x)
@@ -4603,13 +4934,15 @@ func rewriteValueRISCV64_OpRsh64x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64x64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
// match: (Rsh64x64 <t> x y)
// result: (SRA <t> x (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v.AddArg(x)
@@ -4627,14 +4960,16 @@ func rewriteValueRISCV64_OpRsh64x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpRsh64x8_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Rsh64x8 <t> x y)
// result: (SRA <t> x (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt8to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v.AddArg(x)
@@ -4654,14 +4989,16 @@ func rewriteValueRISCV64_OpRsh64x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt8to64 x) y) (Neg8 <t> (SLTIU <t> [64] (ZeroExt16to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
@@ -4681,14 +5018,16 @@ func rewriteValueRISCV64_OpRsh8Ux16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt8to64 x) y) (Neg8 <t> (SLTIU <t> [64] (ZeroExt32to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
@@ -4708,14 +5047,16 @@ func rewriteValueRISCV64_OpRsh8Ux32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (AND (SRL <t> (ZeroExt8to64 x) y) (Neg8 <t> (SLTIU <t> [64] y)))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
@@ -4733,14 +5074,16 @@ func rewriteValueRISCV64_OpRsh8Ux64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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: (AND (SRL <t> (ZeroExt8to64 x) y) (Neg8 <t> (SLTIU <t> [64] (ZeroExt8to64 y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64AND)
v0 := b.NewValue0(v.Pos, OpRISCV64SRL, t)
v1 := b.NewValue0(v.Pos, OpZeroExt8to64, typ.UInt64)
@@ -4760,14 +5103,16 @@ func rewriteValueRISCV64_OpRsh8Ux8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt8to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt16to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
@@ -4789,14 +5134,16 @@ func rewriteValueRISCV64_OpRsh8x16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt8to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt32to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
@@ -4818,14 +5165,16 @@ func rewriteValueRISCV64_OpRsh8x32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt8to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] y))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
@@ -4845,14 +5194,16 @@ func rewriteValueRISCV64_OpRsh8x64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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 <t> x y)
// result: (SRA <t> (SignExt8to64 x) (OR <y.Type> y (ADDI <y.Type> [-1] (SLTIU <y.Type> [64] (ZeroExt8to64 y)))))
for {
t := v.Type
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SRA)
v.Type = t
v0 := b.NewValue0(v.Pos, OpSignExt8to64, typ.Int64)
@@ -4874,12 +5225,13 @@ func rewriteValueRISCV64_OpRsh8x8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSignExt16to32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (SignExt16to32 <t> x)
// result: (SRAI [48] (SLLI <t> [48] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRAI)
v.AuxInt = 48
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -4890,12 +5242,13 @@ func rewriteValueRISCV64_OpSignExt16to32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSignExt16to64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (SignExt16to64 <t> x)
// result: (SRAI [48] (SLLI <t> [48] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRAI)
v.AuxInt = 48
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -4906,12 +5259,13 @@ func rewriteValueRISCV64_OpSignExt16to64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSignExt32to64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (SignExt32to64 <t> x)
// result: (SRAI [32] (SLLI <t> [32] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRAI)
v.AuxInt = 32
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -4922,12 +5276,13 @@ func rewriteValueRISCV64_OpSignExt32to64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSignExt8to16_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (SignExt8to16 <t> x)
// result: (SRAI [56] (SLLI <t> [56] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRAI)
v.AuxInt = 56
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -4938,12 +5293,13 @@ func rewriteValueRISCV64_OpSignExt8to16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSignExt8to32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (SignExt8to32 <t> x)
// result: (SRAI [56] (SLLI <t> [56] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRAI)
v.AuxInt = 56
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -4954,12 +5310,13 @@ func rewriteValueRISCV64_OpSignExt8to32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSignExt8to64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (SignExt8to64 <t> x)
// result: (SRAI [56] (SLLI <t> [56] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRAI)
v.AuxInt = 56
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -4970,13 +5327,14 @@ func rewriteValueRISCV64_OpSignExt8to64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSlicemask_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
typ := &b.Func.Config.Types
// match: (Slicemask <t> x)
// result: (XOR (MOVDconst [-1]) (SRA <t> (SUB <t> x (MOVDconst [1])) (MOVDconst [63])))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64XOR)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVDconst, typ.UInt64)
v0.AuxInt = -1
@@ -4996,22 +5354,24 @@ func rewriteValueRISCV64_OpSlicemask_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSqrt_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Sqrt x)
// result: (FSQRTD x)
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64FSQRTD)
v.AddArg(x)
return true
}
}
func rewriteValueRISCV64_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(OpRISCV64CALLstatic)
v.AuxInt = argwid
v.Aux = target
@@ -5020,14 +5380,17 @@ func rewriteValueRISCV64_OpStaticCall_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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
}
@@ -5042,9 +5405,9 @@ func rewriteValueRISCV64_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
}
@@ -5059,9 +5422,9 @@ func rewriteValueRISCV64_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
}
@@ -5076,9 +5439,9 @@ func rewriteValueRISCV64_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
}
@@ -5093,9 +5456,9 @@ func rewriteValueRISCV64_OpStore_0(v *Value) bool {
// result: (FMOVWstore 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
}
@@ -5110,9 +5473,9 @@ func rewriteValueRISCV64_OpStore_0(v *Value) bool {
// result: (FMOVDstore 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
}
@@ -5125,11 +5488,13 @@ func rewriteValueRISCV64_OpStore_0(v *Value) bool {
return false
}
func rewriteValueRISCV64_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(OpRISCV64SUB)
v.AddArg(x)
v.AddArg(y)
@@ -5137,11 +5502,13 @@ func rewriteValueRISCV64_OpSub16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64SUB)
v.AddArg(x)
v.AddArg(y)
@@ -5149,11 +5516,13 @@ func rewriteValueRISCV64_OpSub32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSub32F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub32F x y)
// result: (FSUBS x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FSUBS)
v.AddArg(x)
v.AddArg(y)
@@ -5161,11 +5530,13 @@ func rewriteValueRISCV64_OpSub32F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSub64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub64 x y)
// result: (SUB x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64SUB)
v.AddArg(x)
v.AddArg(y)
@@ -5173,11 +5544,13 @@ func rewriteValueRISCV64_OpSub64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpSub64F_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Sub64F x y)
// result: (FSUBD x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64FSUBD)
v.AddArg(x)
v.AddArg(y)
@@ -5185,11 +5558,13 @@ func rewriteValueRISCV64_OpSub64F_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64SUB)
v.AddArg(x)
v.AddArg(y)
@@ -5197,11 +5572,13 @@ func rewriteValueRISCV64_OpSub8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64SUB)
v.AddArg(x)
v.AddArg(y)
@@ -5209,10 +5586,11 @@ func rewriteValueRISCV64_OpSubPtr_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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)
@@ -5220,10 +5598,11 @@ func rewriteValueRISCV64_OpTrunc16to8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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)
@@ -5231,10 +5610,11 @@ func rewriteValueRISCV64_OpTrunc32to16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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)
@@ -5242,10 +5622,11 @@ func rewriteValueRISCV64_OpTrunc32to8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpTrunc64to16_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Trunc64to16 x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -5253,10 +5634,11 @@ func rewriteValueRISCV64_OpTrunc64to16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpTrunc64to32_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Trunc64to32 x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -5264,10 +5646,11 @@ func rewriteValueRISCV64_OpTrunc64to32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpTrunc64to8_0(v *Value) bool {
+ v_0 := v.Args[0]
// match: (Trunc64to8 x)
// result: x
for {
- x := v.Args[0]
+ x := v_0
v.reset(OpCopy)
v.Type = x.Type
v.AddArg(x)
@@ -5275,13 +5658,16 @@ func rewriteValueRISCV64_OpTrunc64to8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64LoweredWB)
v.Aux = fn
v.AddArg(destptr)
@@ -5291,11 +5677,13 @@ func rewriteValueRISCV64_OpWB_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64XOR)
v.AddArg(x)
v.AddArg(y)
@@ -5303,11 +5691,13 @@ func rewriteValueRISCV64_OpXor16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64XOR)
v.AddArg(x)
v.AddArg(y)
@@ -5315,11 +5705,13 @@ func rewriteValueRISCV64_OpXor32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpXor64_0(v *Value) bool {
+ v_1 := v.Args[1]
+ v_0 := v.Args[0]
// match: (Xor64 x y)
// result: (XOR x y)
for {
- y := v.Args[1]
- x := v.Args[0]
+ x := v_0
+ y := v_1
v.reset(OpRISCV64XOR)
v.AddArg(x)
v.AddArg(y)
@@ -5327,11 +5719,13 @@ func rewriteValueRISCV64_OpXor64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_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(OpRISCV64XOR)
v.AddArg(x)
v.AddArg(y)
@@ -5339,6 +5733,8 @@ func rewriteValueRISCV64_OpXor8_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZero_0(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
@@ -5348,7 +5744,7 @@ func rewriteValueRISCV64_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)
@@ -5360,8 +5756,8 @@ func rewriteValueRISCV64_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(OpRISCV64MOVBstore)
v.AddArg(ptr)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVBconst, typ.UInt8)
@@ -5375,8 +5771,8 @@ func rewriteValueRISCV64_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(OpRISCV64MOVHstore)
v.AddArg(ptr)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVHconst, typ.UInt16)
@@ -5390,8 +5786,8 @@ func rewriteValueRISCV64_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(OpRISCV64MOVWstore)
v.AddArg(ptr)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVWconst, typ.UInt32)
@@ -5405,8 +5801,8 @@ func rewriteValueRISCV64_OpZero_0(v *Value) bool {
if v.AuxInt != 8 {
break
}
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpRISCV64MOVDstore)
v.AddArg(ptr)
v0 := b.NewValue0(v.Pos, OpRISCV64MOVDconst, typ.UInt64)
@@ -5419,8 +5815,8 @@ func rewriteValueRISCV64_OpZero_0(v *Value) bool {
for {
s := v.AuxInt
t := v.Aux
- mem := v.Args[1]
- ptr := v.Args[0]
+ ptr := v_0
+ mem := v_1
v.reset(OpRISCV64LoweredZero)
v.AuxInt = t.(*types.Type).Alignment()
v.AddArg(ptr)
@@ -5435,12 +5831,13 @@ func rewriteValueRISCV64_OpZero_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZeroExt16to32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (ZeroExt16to32 <t> x)
// result: (SRLI [48] (SLLI <t> [48] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRLI)
v.AuxInt = 48
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -5451,12 +5848,13 @@ func rewriteValueRISCV64_OpZeroExt16to32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZeroExt16to64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (ZeroExt16to64 <t> x)
// result: (SRLI [48] (SLLI <t> [48] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRLI)
v.AuxInt = 48
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -5467,12 +5865,13 @@ func rewriteValueRISCV64_OpZeroExt16to64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZeroExt32to64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (ZeroExt32to64 <t> x)
// result: (SRLI [32] (SLLI <t> [32] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRLI)
v.AuxInt = 32
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -5483,12 +5882,13 @@ func rewriteValueRISCV64_OpZeroExt32to64_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZeroExt8to16_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (ZeroExt8to16 <t> x)
// result: (SRLI [56] (SLLI <t> [56] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRLI)
v.AuxInt = 56
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -5499,12 +5899,13 @@ func rewriteValueRISCV64_OpZeroExt8to16_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZeroExt8to32_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (ZeroExt8to32 <t> x)
// result: (SRLI [56] (SLLI <t> [56] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRLI)
v.AuxInt = 56
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)
@@ -5515,12 +5916,13 @@ func rewriteValueRISCV64_OpZeroExt8to32_0(v *Value) bool {
}
}
func rewriteValueRISCV64_OpZeroExt8to64_0(v *Value) bool {
+ v_0 := v.Args[0]
b := v.Block
// match: (ZeroExt8to64 <t> x)
// result: (SRLI [56] (SLLI <t> [56] x))
for {
t := v.Type
- x := v.Args[0]
+ x := v_0
v.reset(OpRISCV64SRLI)
v.AuxInt = 56
v0 := b.NewValue0(v.Pos, OpRISCV64SLLI, t)