cmd/compile: make rulegen magic variable prediction more precise

The sheer length of the generated rules files makes my
editor and git client unhappy.
This change is a small step towards shortening them.

We recognize a few magic variables during rulegen: b, config, fe, typ.
Of these, only b appears prone to false positives.
By tightening the heuristic and fixing one case in MIPS.rules,
we can make the heuristic enough that it has no failures.
That allows us to remove the hedge assignments to _,
removing 3000 pointless lines of code.

Change-Id: I080cde5db28c8277cb3fd9ddcd829306c9a27785
Reviewed-on: https://go-review.googlesource.com/c/go/+/166979
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Josh Bleecher Snyder 2018-12-17 17:12:00 -08:00
parent f54b8909ac
commit 53948127d3
15 changed files with 11 additions and 3081 deletions

View File

@ -688,7 +688,7 @@
(GEZ (MOVWconst [c]) yes no) && int32(c) < 0 -> (First nil no yes)
// conditional move
(CMOVZ _ b (MOVWconst [0])) -> b
(CMOVZ _ f (MOVWconst [0])) -> f
(CMOVZ a _ (MOVWconst [c])) && c!=0 -> a
(CMOVZzero _ (MOVWconst [0])) -> (MOVWconst [0])
(CMOVZzero a (MOVWconst [c])) && c!=0 -> a

View File

@ -238,29 +238,23 @@ func genRules(arch arch) {
}
body := buf.String()
// Do a rough match to predict whether we need b, config, fe, and/or types.
// It's not precise--thus the blank assignments--but it's good enough
// to avoid generating needless code and doing pointless nil checks.
hasb := strings.Contains(body, "b.")
// Figure out whether we need b, config, fe, and/or types; provide them if so.
hasb := strings.Contains(body, " b.")
hasconfig := strings.Contains(body, "config.") || strings.Contains(body, "config)")
hasfe := strings.Contains(body, "fe.")
hastyps := strings.Contains(body, "typ.")
fmt.Fprintf(w, "func rewriteValue%s_%s_%d(v *Value) bool {\n", arch.name, op, chunk)
if hasb || hasconfig || hasfe || hastyps {
fmt.Fprintln(w, "b := v.Block")
fmt.Fprintln(w, "_ = b")
}
if hasconfig {
fmt.Fprintln(w, "config := b.Func.Config")
fmt.Fprintln(w, "_ = config")
}
if hasfe {
fmt.Fprintln(w, "fe := b.Func.fe")
fmt.Fprintln(w, "_ = fe")
}
if hastyps {
fmt.Fprintln(w, "typ := &b.Func.Config.Types")
fmt.Fprintln(w, "_ = typ")
}
fmt.Fprint(w, body)
fmt.Fprintf(w, "}\n")
@ -507,6 +501,9 @@ func genMatch0(w io.Writer, arch arch, match, v string, m map[string]struct{}, t
// autogenerated name
argname = fmt.Sprintf("%s_%d", v, i)
}
if argname == "b" {
log.Fatalf("don't name args 'b', it is ambiguous with blocks")
}
fmt.Fprintf(w, "%s := %s.Args[%d]\n", argname, v, i)
argPos, argCanFail := genMatch0(w, arch, arg, argname, m, false, loc)
if argPos != "" {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -562,7 +562,6 @@ func rewriteValueMIPS_OpAdd32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpAdd32withcarry_0(v *Value) bool {
b := v.Block
_ = b
// match: (Add32withcarry <t> x y c)
// cond:
// result: (ADD c (ADD <t> x y))
@ -710,11 +709,8 @@ func rewriteValueMIPS_OpAtomicAdd32_0(v *Value) bool {
}
func rewriteValueMIPS_OpAtomicAnd8_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (AtomicAnd8 ptr val mem)
// cond: !config.BigEndian
// result: (LoweredAtomicAnd (AND <typ.UInt32Ptr> (MOVWconst [^3]) ptr) (OR <typ.UInt32> (SLL <typ.UInt32> (ZeroExt8to32 val) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] ptr))) (NORconst [0] <typ.UInt32> (SLL <typ.UInt32> (MOVWconst [0xff]) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] ptr))))) mem)
@ -887,11 +883,8 @@ func rewriteValueMIPS_OpAtomicLoadPtr_0(v *Value) bool {
}
func rewriteValueMIPS_OpAtomicOr8_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (AtomicOr8 ptr val mem)
// cond: !config.BigEndian
// result: (LoweredAtomicOr (AND <typ.UInt32Ptr> (MOVWconst [^3]) ptr) (SLL <typ.UInt32> (ZeroExt8to32 val) (SLLconst <typ.UInt32> [3] (ANDconst <typ.UInt32> [3] ptr))) mem)
@ -997,7 +990,6 @@ func rewriteValueMIPS_OpAtomicStorePtrNoWB_0(v *Value) bool {
}
func rewriteValueMIPS_OpAvg32u_0(v *Value) bool {
b := v.Block
_ = b
// match: (Avg32u <t> x y)
// cond:
// result: (ADD (SRLconst <t> (SUB <t> x y) [1]) y)
@ -1020,9 +1012,7 @@ func rewriteValueMIPS_OpAvg32u_0(v *Value) bool {
}
func rewriteValueMIPS_OpBitLen32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (BitLen32 <t> x)
// cond:
// result: (SUB (MOVWconst [32]) (CLZ <t> x))
@ -1171,9 +1161,7 @@ func rewriteValueMIPS_OpConstNil_0(v *Value) bool {
}
func rewriteValueMIPS_OpCtz32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Ctz32 <t> x)
// cond:
// result: (SUB (MOVWconst [32]) (CLZ <t> (SUBconst <t> [1] (AND <t> x (NEG <t> x)))))
@ -1277,9 +1265,7 @@ func rewriteValueMIPS_OpCvt64Fto32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpDiv16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Div16 x y)
// cond:
// result: (Select1 (DIV (SignExt16to32 x) (SignExt16to32 y)))
@ -1301,9 +1287,7 @@ func rewriteValueMIPS_OpDiv16_0(v *Value) bool {
}
func rewriteValueMIPS_OpDiv16u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Div16u x y)
// cond:
// result: (Select1 (DIVU (ZeroExt16to32 x) (ZeroExt16to32 y)))
@ -1325,9 +1309,7 @@ func rewriteValueMIPS_OpDiv16u_0(v *Value) bool {
}
func rewriteValueMIPS_OpDiv32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Div32 x y)
// cond:
// result: (Select1 (DIV x y))
@ -1359,9 +1341,7 @@ func rewriteValueMIPS_OpDiv32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpDiv32u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Div32u x y)
// cond:
// result: (Select1 (DIVU x y))
@ -1393,9 +1373,7 @@ func rewriteValueMIPS_OpDiv64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpDiv8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Div8 x y)
// cond:
// result: (Select1 (DIV (SignExt8to32 x) (SignExt8to32 y)))
@ -1417,9 +1395,7 @@ func rewriteValueMIPS_OpDiv8_0(v *Value) bool {
}
func rewriteValueMIPS_OpDiv8u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Div8u x y)
// cond:
// result: (Select1 (DIVU (ZeroExt8to32 x) (ZeroExt8to32 y)))
@ -1441,9 +1417,7 @@ func rewriteValueMIPS_OpDiv8u_0(v *Value) bool {
}
func rewriteValueMIPS_OpEq16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Eq16 x y)
// cond:
// result: (SGTUconst [1] (XOR (ZeroExt16to32 x) (ZeroExt16to32 y)))
@ -1466,9 +1440,7 @@ func rewriteValueMIPS_OpEq16_0(v *Value) bool {
}
func rewriteValueMIPS_OpEq32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Eq32 x y)
// cond:
// result: (SGTUconst [1] (XOR x y))
@ -1487,7 +1459,6 @@ func rewriteValueMIPS_OpEq32_0(v *Value) bool {
}
func rewriteValueMIPS_OpEq32F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Eq32F x y)
// cond:
// result: (FPFlagTrue (CMPEQF x y))
@ -1505,7 +1476,6 @@ func rewriteValueMIPS_OpEq32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpEq64F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Eq64F x y)
// cond:
// result: (FPFlagTrue (CMPEQD x y))
@ -1523,9 +1493,7 @@ func rewriteValueMIPS_OpEq64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpEq8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Eq8 x y)
// cond:
// result: (SGTUconst [1] (XOR (ZeroExt8to32 x) (ZeroExt8to32 y)))
@ -1548,9 +1516,7 @@ func rewriteValueMIPS_OpEq8_0(v *Value) bool {
}
func rewriteValueMIPS_OpEqB_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (EqB x y)
// cond:
// result: (XORconst [1] (XOR <typ.Bool> x y))
@ -1569,9 +1535,7 @@ func rewriteValueMIPS_OpEqB_0(v *Value) bool {
}
func rewriteValueMIPS_OpEqPtr_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (EqPtr x y)
// cond:
// result: (SGTUconst [1] (XOR x y))
@ -1590,9 +1554,7 @@ func rewriteValueMIPS_OpEqPtr_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq16 x y)
// cond:
// result: (XORconst [1] (SGT (SignExt16to32 y) (SignExt16to32 x)))
@ -1615,9 +1577,7 @@ func rewriteValueMIPS_OpGeq16_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq16U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq16U x y)
// cond:
// result: (XORconst [1] (SGTU (ZeroExt16to32 y) (ZeroExt16to32 x)))
@ -1640,9 +1600,7 @@ func rewriteValueMIPS_OpGeq16U_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq32 x y)
// cond:
// result: (XORconst [1] (SGT y x))
@ -1661,7 +1619,6 @@ func rewriteValueMIPS_OpGeq32_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq32F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Geq32F x y)
// cond:
// result: (FPFlagTrue (CMPGEF x y))
@ -1679,9 +1636,7 @@ func rewriteValueMIPS_OpGeq32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq32U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq32U x y)
// cond:
// result: (XORconst [1] (SGTU y x))
@ -1700,7 +1655,6 @@ func rewriteValueMIPS_OpGeq32U_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq64F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Geq64F x y)
// cond:
// result: (FPFlagTrue (CMPGED x y))
@ -1718,9 +1672,7 @@ func rewriteValueMIPS_OpGeq64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq8 x y)
// cond:
// result: (XORconst [1] (SGT (SignExt8to32 y) (SignExt8to32 x)))
@ -1743,9 +1695,7 @@ func rewriteValueMIPS_OpGeq8_0(v *Value) bool {
}
func rewriteValueMIPS_OpGeq8U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq8U x y)
// cond:
// result: (XORconst [1] (SGTU (ZeroExt8to32 y) (ZeroExt8to32 x)))
@ -1795,9 +1745,7 @@ func rewriteValueMIPS_OpGetClosurePtr_0(v *Value) bool {
}
func rewriteValueMIPS_OpGreater16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Greater16 x y)
// cond:
// result: (SGT (SignExt16to32 x) (SignExt16to32 y))
@ -1817,9 +1765,7 @@ func rewriteValueMIPS_OpGreater16_0(v *Value) bool {
}
func rewriteValueMIPS_OpGreater16U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Greater16U x y)
// cond:
// result: (SGTU (ZeroExt16to32 x) (ZeroExt16to32 y))
@ -1853,7 +1799,6 @@ func rewriteValueMIPS_OpGreater32_0(v *Value) bool {
}
func rewriteValueMIPS_OpGreater32F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Greater32F x y)
// cond:
// result: (FPFlagTrue (CMPGTF x y))
@ -1885,7 +1830,6 @@ func rewriteValueMIPS_OpGreater32U_0(v *Value) bool {
}
func rewriteValueMIPS_OpGreater64F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Greater64F x y)
// cond:
// result: (FPFlagTrue (CMPGTD x y))
@ -1903,9 +1847,7 @@ func rewriteValueMIPS_OpGreater64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpGreater8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Greater8 x y)
// cond:
// result: (SGT (SignExt8to32 x) (SignExt8to32 y))
@ -1925,9 +1867,7 @@ func rewriteValueMIPS_OpGreater8_0(v *Value) bool {
}
func rewriteValueMIPS_OpGreater8U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Greater8U x y)
// cond:
// result: (SGTU (ZeroExt8to32 x) (ZeroExt8to32 y))
@ -1947,9 +1887,7 @@ func rewriteValueMIPS_OpGreater8U_0(v *Value) bool {
}
func rewriteValueMIPS_OpHmul32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Hmul32 x y)
// cond:
// result: (Select0 (MULT x y))
@ -1967,9 +1905,7 @@ func rewriteValueMIPS_OpHmul32_0(v *Value) bool {
}
func rewriteValueMIPS_OpHmul32u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Hmul32u x y)
// cond:
// result: (Select0 (MULTU x y))
@ -2017,9 +1953,7 @@ func rewriteValueMIPS_OpIsInBounds_0(v *Value) bool {
}
func rewriteValueMIPS_OpIsNonNil_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (IsNonNil ptr)
// cond:
// result: (SGTU ptr (MOVWconst [0]))
@ -2035,9 +1969,7 @@ func rewriteValueMIPS_OpIsNonNil_0(v *Value) bool {
}
func rewriteValueMIPS_OpIsSliceInBounds_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (IsSliceInBounds idx len)
// cond:
// result: (XORconst [1] (SGTU idx len))
@ -2056,9 +1988,7 @@ func rewriteValueMIPS_OpIsSliceInBounds_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq16 x y)
// cond:
// result: (XORconst [1] (SGT (SignExt16to32 x) (SignExt16to32 y)))
@ -2081,9 +2011,7 @@ func rewriteValueMIPS_OpLeq16_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq16U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq16U x y)
// cond:
// result: (XORconst [1] (SGTU (ZeroExt16to32 x) (ZeroExt16to32 y)))
@ -2106,9 +2034,7 @@ func rewriteValueMIPS_OpLeq16U_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq32 x y)
// cond:
// result: (XORconst [1] (SGT x y))
@ -2127,7 +2053,6 @@ func rewriteValueMIPS_OpLeq32_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq32F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Leq32F x y)
// cond:
// result: (FPFlagTrue (CMPGEF y x))
@ -2145,9 +2070,7 @@ func rewriteValueMIPS_OpLeq32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq32U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq32U x y)
// cond:
// result: (XORconst [1] (SGTU x y))
@ -2166,7 +2089,6 @@ func rewriteValueMIPS_OpLeq32U_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq64F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Leq64F x y)
// cond:
// result: (FPFlagTrue (CMPGED y x))
@ -2184,9 +2106,7 @@ func rewriteValueMIPS_OpLeq64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq8 x y)
// cond:
// result: (XORconst [1] (SGT (SignExt8to32 x) (SignExt8to32 y)))
@ -2209,9 +2129,7 @@ func rewriteValueMIPS_OpLeq8_0(v *Value) bool {
}
func rewriteValueMIPS_OpLeq8U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq8U x y)
// cond:
// result: (XORconst [1] (SGTU (ZeroExt8to32 x) (ZeroExt8to32 y)))
@ -2234,9 +2152,7 @@ func rewriteValueMIPS_OpLeq8U_0(v *Value) bool {
}
func rewriteValueMIPS_OpLess16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Less16 x y)
// cond:
// result: (SGT (SignExt16to32 y) (SignExt16to32 x))
@ -2256,9 +2172,7 @@ func rewriteValueMIPS_OpLess16_0(v *Value) bool {
}
func rewriteValueMIPS_OpLess16U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Less16U x y)
// cond:
// result: (SGTU (ZeroExt16to32 y) (ZeroExt16to32 x))
@ -2292,7 +2206,6 @@ func rewriteValueMIPS_OpLess32_0(v *Value) bool {
}
func rewriteValueMIPS_OpLess32F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Less32F x y)
// cond:
// result: (FPFlagTrue (CMPGTF y x))
@ -2324,7 +2237,6 @@ func rewriteValueMIPS_OpLess32U_0(v *Value) bool {
}
func rewriteValueMIPS_OpLess64F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Less64F x y)
// cond:
// result: (FPFlagTrue (CMPGTD y x))
@ -2342,9 +2254,7 @@ func rewriteValueMIPS_OpLess64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpLess8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Less8 x y)
// cond:
// result: (SGT (SignExt8to32 y) (SignExt8to32 x))
@ -2364,9 +2274,7 @@ func rewriteValueMIPS_OpLess8_0(v *Value) bool {
}
func rewriteValueMIPS_OpLess8U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Less8U x y)
// cond:
// result: (SGTU (ZeroExt8to32 y) (ZeroExt8to32 x))
@ -2531,9 +2439,7 @@ func rewriteValueMIPS_OpLocalAddr_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh16x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh16x16 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
@ -2563,9 +2469,7 @@ func rewriteValueMIPS_OpLsh16x16_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh16x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh16x32 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
@ -2630,9 +2534,7 @@ func rewriteValueMIPS_OpLsh16x64_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh16x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh16x8 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
@ -2662,9 +2564,7 @@ func rewriteValueMIPS_OpLsh16x8_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh32x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh32x16 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
@ -2694,9 +2594,7 @@ func rewriteValueMIPS_OpLsh32x16_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh32x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh32x32 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
@ -2761,9 +2659,7 @@ func rewriteValueMIPS_OpLsh32x64_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh32x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh32x8 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
@ -2793,9 +2689,7 @@ func rewriteValueMIPS_OpLsh32x8_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh8x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh8x16 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
@ -2825,9 +2719,7 @@ func rewriteValueMIPS_OpLsh8x16_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh8x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh8x32 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
@ -2892,9 +2784,7 @@ func rewriteValueMIPS_OpLsh8x64_0(v *Value) bool {
}
func rewriteValueMIPS_OpLsh8x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh8x8 <t> x y)
// cond:
// result: (CMOVZ (SLL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
@ -3071,7 +2961,6 @@ func rewriteValueMIPS_OpMIPSADDconst_0(v *Value) bool {
}
func rewriteValueMIPS_OpMIPSAND_0(v *Value) bool {
b := v.Block
_ = b
// match: (AND x (MOVWconst [c]))
// cond:
// result: (ANDconst [c] x)
@ -3236,14 +3125,12 @@ func rewriteValueMIPS_OpMIPSANDconst_0(v *Value) bool {
return false
}
func rewriteValueMIPS_OpMIPSCMOVZ_0(v *Value) bool {
b := v.Block
_ = b
// match: (CMOVZ _ b (MOVWconst [0]))
// match: (CMOVZ _ f (MOVWconst [0]))
// cond:
// result: b
// result: f
for {
_ = v.Args[2]
b := v.Args[1]
f := v.Args[1]
v_2 := v.Args[2]
if v_2.Op != OpMIPSMOVWconst {
break
@ -3252,8 +3139,8 @@ func rewriteValueMIPS_OpMIPSCMOVZ_0(v *Value) bool {
break
}
v.reset(OpCopy)
v.Type = b.Type
v.AddArg(b)
v.Type = f.Type
v.AddArg(f)
return true
}
// match: (CMOVZ a _ (MOVWconst [c]))
@ -3458,7 +3345,6 @@ func rewriteValueMIPS_OpMIPSMOVBUload_0(v *Value) bool {
}
func rewriteValueMIPS_OpMIPSMOVBUreg_0(v *Value) bool {
b := v.Block
_ = b
// match: (MOVBUreg x:(MOVBUload _ _))
// cond:
// result: (MOVWreg x)
@ -3619,7 +3505,6 @@ func rewriteValueMIPS_OpMIPSMOVBload_0(v *Value) bool {
}
func rewriteValueMIPS_OpMIPSMOVBreg_0(v *Value) bool {
b := v.Block
_ = b
// match: (MOVBreg x:(MOVBload _ _))
// cond:
// result: (MOVWreg x)
@ -4290,7 +4175,6 @@ func rewriteValueMIPS_OpMIPSMOVHUload_0(v *Value) bool {
}
func rewriteValueMIPS_OpMIPSMOVHUreg_0(v *Value) bool {
b := v.Block
_ = b
// match: (MOVHUreg x:(MOVBUload _ _))
// cond:
// result: (MOVWreg x)
@ -4476,7 +4360,6 @@ func rewriteValueMIPS_OpMIPSMOVHload_0(v *Value) bool {
}
func rewriteValueMIPS_OpMIPSMOVHreg_0(v *Value) bool {
b := v.Block
_ = b
// match: (MOVHreg x:(MOVBload _ _))
// cond:
// result: (MOVWreg x)
@ -5318,7 +5201,6 @@ func rewriteValueMIPS_OpMIPSNORconst_0(v *Value) bool {
}
func rewriteValueMIPS_OpMIPSOR_0(v *Value) bool {
b := v.Block
_ = b
// match: (OR x (MOVWconst [c]))
// cond:
// result: (ORconst [c] x)
@ -6296,9 +6178,7 @@ func rewriteValueMIPS_OpMIPSXORconst_0(v *Value) bool {
}
func rewriteValueMIPS_OpMod16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mod16 x y)
// cond:
// result: (Select0 (DIV (SignExt16to32 x) (SignExt16to32 y)))
@ -6320,9 +6200,7 @@ func rewriteValueMIPS_OpMod16_0(v *Value) bool {
}
func rewriteValueMIPS_OpMod16u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mod16u x y)
// cond:
// result: (Select0 (DIVU (ZeroExt16to32 x) (ZeroExt16to32 y)))
@ -6344,9 +6222,7 @@ func rewriteValueMIPS_OpMod16u_0(v *Value) bool {
}
func rewriteValueMIPS_OpMod32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mod32 x y)
// cond:
// result: (Select0 (DIV x y))
@ -6364,9 +6240,7 @@ func rewriteValueMIPS_OpMod32_0(v *Value) bool {
}
func rewriteValueMIPS_OpMod32u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mod32u x y)
// cond:
// result: (Select0 (DIVU x y))
@ -6384,9 +6258,7 @@ func rewriteValueMIPS_OpMod32u_0(v *Value) bool {
}
func rewriteValueMIPS_OpMod8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mod8 x y)
// cond:
// result: (Select0 (DIV (SignExt8to32 x) (SignExt8to32 y)))
@ -6408,9 +6280,7 @@ func rewriteValueMIPS_OpMod8_0(v *Value) bool {
}
func rewriteValueMIPS_OpMod8u_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mod8u x y)
// cond:
// result: (Select0 (DIVU (ZeroExt8to32 x) (ZeroExt8to32 y)))
@ -6432,9 +6302,7 @@ func rewriteValueMIPS_OpMod8u_0(v *Value) bool {
}
func rewriteValueMIPS_OpMove_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Move [0] _ _ mem)
// cond:
// result: mem
@ -6752,11 +6620,8 @@ func rewriteValueMIPS_OpMove_0(v *Value) bool {
}
func rewriteValueMIPS_OpMove_10(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (Move [6] {t} dst src mem)
// cond: t.(*types.Type).Alignment()%2 == 0
// result: (MOVHstore [4] dst (MOVHload [4] src mem) (MOVHstore [2] dst (MOVHload [2] src mem) (MOVHstore dst (MOVHload src mem) mem)))
@ -7059,9 +6924,7 @@ func rewriteValueMIPS_OpNeg8_0(v *Value) bool {
}
func rewriteValueMIPS_OpNeq16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Neq16 x y)
// cond:
// result: (SGTU (XOR (ZeroExt16to32 x) (ZeroExt16to32 y)) (MOVWconst [0]))
@ -7086,9 +6949,7 @@ func rewriteValueMIPS_OpNeq16_0(v *Value) bool {
}
func rewriteValueMIPS_OpNeq32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Neq32 x y)
// cond:
// result: (SGTU (XOR x y) (MOVWconst [0]))
@ -7109,7 +6970,6 @@ func rewriteValueMIPS_OpNeq32_0(v *Value) bool {
}
func rewriteValueMIPS_OpNeq32F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Neq32F x y)
// cond:
// result: (FPFlagFalse (CMPEQF x y))
@ -7127,7 +6987,6 @@ func rewriteValueMIPS_OpNeq32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpNeq64F_0(v *Value) bool {
b := v.Block
_ = b
// match: (Neq64F x y)
// cond:
// result: (FPFlagFalse (CMPEQD x y))
@ -7145,9 +7004,7 @@ func rewriteValueMIPS_OpNeq64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpNeq8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Neq8 x y)
// cond:
// result: (SGTU (XOR (ZeroExt8to32 x) (ZeroExt8to32 y)) (MOVWconst [0]))
@ -7186,9 +7043,7 @@ func rewriteValueMIPS_OpNeqB_0(v *Value) bool {
}
func rewriteValueMIPS_OpNeqPtr_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (NeqPtr x y)
// cond:
// result: (SGTU (XOR x y) (MOVWconst [0]))
@ -7342,9 +7197,7 @@ func rewriteValueMIPS_OpRound64F_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16Ux16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16Ux16 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> (ZeroExt16to32 x) (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
@ -7376,9 +7229,7 @@ func rewriteValueMIPS_OpRsh16Ux16_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16Ux32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16Ux32 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> (ZeroExt16to32 x) y) (MOVWconst [0]) (SGTUconst [32] y))
@ -7406,9 +7257,7 @@ func rewriteValueMIPS_OpRsh16Ux32_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16Ux64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16Ux64 x (Const64 [c]))
// cond: uint32(c) < 16
// result: (SRLconst (SLLconst <typ.UInt32> x [16]) [c+16])
@ -7452,9 +7301,7 @@ func rewriteValueMIPS_OpRsh16Ux64_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16Ux8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16Ux8 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> (ZeroExt16to32 x) (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
@ -7486,9 +7333,7 @@ func rewriteValueMIPS_OpRsh16Ux8_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16x16 x y)
// cond:
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt16to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt16to32 y))))
@ -7519,9 +7364,7 @@ func rewriteValueMIPS_OpRsh16x16_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16x32 x y)
// cond:
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> y (MOVWconst [-1]) (SGTUconst [32] y)))
@ -7548,9 +7391,7 @@ func rewriteValueMIPS_OpRsh16x32_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16x64 x (Const64 [c]))
// cond: uint32(c) < 16
// result: (SRAconst (SLLconst <typ.UInt32> x [16]) [c+16])
@ -7599,9 +7440,7 @@ func rewriteValueMIPS_OpRsh16x64_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh16x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16x8 x y)
// cond:
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt8to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt8to32 y))))
@ -7632,9 +7471,7 @@ func rewriteValueMIPS_OpRsh16x8_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh32Ux16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32Ux16 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> x (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
@ -7664,9 +7501,7 @@ func rewriteValueMIPS_OpRsh32Ux16_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh32Ux32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32Ux32 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> x y) (MOVWconst [0]) (SGTUconst [32] y))
@ -7731,9 +7566,7 @@ func rewriteValueMIPS_OpRsh32Ux64_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh32Ux8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32Ux8 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> x (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
@ -7763,9 +7596,7 @@ func rewriteValueMIPS_OpRsh32Ux8_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh32x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32x16 x y)
// cond:
// result: (SRA x ( CMOVZ <typ.UInt32> (ZeroExt16to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt16to32 y))))
@ -7794,9 +7625,7 @@ func rewriteValueMIPS_OpRsh32x16_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh32x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32x32 x y)
// cond:
// result: (SRA x ( CMOVZ <typ.UInt32> y (MOVWconst [-1]) (SGTUconst [32] y)))
@ -7862,9 +7691,7 @@ func rewriteValueMIPS_OpRsh32x64_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh32x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32x8 x y)
// cond:
// result: (SRA x ( CMOVZ <typ.UInt32> (ZeroExt8to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt8to32 y))))
@ -7893,9 +7720,7 @@ func rewriteValueMIPS_OpRsh32x8_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8Ux16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8Ux16 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> (ZeroExt8to32 x) (ZeroExt16to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt16to32 y)))
@ -7927,9 +7752,7 @@ func rewriteValueMIPS_OpRsh8Ux16_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8Ux32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8Ux32 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> (ZeroExt8to32 x) y) (MOVWconst [0]) (SGTUconst [32] y))
@ -7957,9 +7780,7 @@ func rewriteValueMIPS_OpRsh8Ux32_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8Ux64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8Ux64 x (Const64 [c]))
// cond: uint32(c) < 8
// result: (SRLconst (SLLconst <typ.UInt32> x [24]) [c+24])
@ -8003,9 +7824,7 @@ func rewriteValueMIPS_OpRsh8Ux64_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8Ux8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8Ux8 <t> x y)
// cond:
// result: (CMOVZ (SRL <t> (ZeroExt8to32 x) (ZeroExt8to32 y) ) (MOVWconst [0]) (SGTUconst [32] (ZeroExt8to32 y)))
@ -8037,9 +7856,7 @@ func rewriteValueMIPS_OpRsh8Ux8_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8x16 x y)
// cond:
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt16to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt16to32 y))))
@ -8070,9 +7887,7 @@ func rewriteValueMIPS_OpRsh8x16_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8x32 x y)
// cond:
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> y (MOVWconst [-1]) (SGTUconst [32] y)))
@ -8099,9 +7914,7 @@ func rewriteValueMIPS_OpRsh8x32_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8x64 x (Const64 [c]))
// cond: uint32(c) < 8
// result: (SRAconst (SLLconst <typ.UInt32> x [24]) [c+24])
@ -8150,9 +7963,7 @@ func rewriteValueMIPS_OpRsh8x64_0(v *Value) bool {
}
func rewriteValueMIPS_OpRsh8x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8x8 x y)
// cond:
// result: (SRA (SignExt16to32 x) ( CMOVZ <typ.UInt32> (ZeroExt8to32 y) (MOVWconst [-1]) (SGTUconst [32] (ZeroExt8to32 y))))
@ -8183,9 +7994,7 @@ func rewriteValueMIPS_OpRsh8x8_0(v *Value) bool {
}
func rewriteValueMIPS_OpSelect0_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Select0 (Add32carry <t> x y))
// cond:
// result: (ADD <t.FieldType(0)> x y)
@ -8503,9 +8312,7 @@ func rewriteValueMIPS_OpSelect0_10(v *Value) bool {
}
func rewriteValueMIPS_OpSelect1_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Select1 (Add32carry <t> x y))
// cond:
// result: (SGTU <typ.Bool> x (ADD <t.FieldType(0)> x y))
@ -8866,7 +8673,6 @@ func rewriteValueMIPS_OpSignmask_0(v *Value) bool {
}
func rewriteValueMIPS_OpSlicemask_0(v *Value) bool {
b := v.Block
_ = b
// match: (Slicemask <t> x)
// cond:
// result: (SRAconst (NEG <t> x) [31])
@ -9044,7 +8850,6 @@ func rewriteValueMIPS_OpSub32F_0(v *Value) bool {
}
func rewriteValueMIPS_OpSub32withcarry_0(v *Value) bool {
b := v.Block
_ = b
// match: (Sub32withcarry <t> x y c)
// cond:
// result: (SUB (SUB <t> x y) c)
@ -9203,9 +9008,7 @@ func rewriteValueMIPS_OpXor8_0(v *Value) bool {
}
func rewriteValueMIPS_OpZero_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Zero [0] _ mem)
// cond:
// result: mem
@ -9482,11 +9285,8 @@ func rewriteValueMIPS_OpZero_0(v *Value) bool {
}
func rewriteValueMIPS_OpZero_10(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (Zero [12] {t} ptr mem)
// cond: t.(*types.Type).Alignment()%4 == 0
// result: (MOVWstore [8] ptr (MOVWconst [0]) (MOVWstore [4] ptr (MOVWconst [0]) (MOVWstore [0] ptr (MOVWconst [0]) mem)))
@ -9627,9 +9427,7 @@ func rewriteValueMIPS_OpZeroExt8to32_0(v *Value) bool {
}
func rewriteValueMIPS_OpZeromask_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Zeromask x)
// cond:
// result: (NEG (SGTU x (MOVWconst [0])))

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -97,8 +97,6 @@ func rewriteValuedec_OpIData_0(v *Value) bool {
return false
}
func rewriteValuedec_OpITab_0(v *Value) bool {
b := v.Block
_ = b
// match: (ITab (IMake itab _))
// cond:
// result: itab
@ -118,11 +116,8 @@ func rewriteValuedec_OpITab_0(v *Value) bool {
}
func rewriteValuedec_OpLoad_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (Load <t> ptr mem)
// cond: t.IsComplex() && t.Size() == 8
// result: (ComplexMake (Load <typ.Float32> ptr mem) (Load <typ.Float32> (OffPtr <typ.Float32Ptr> [4] ptr) mem) )
@ -313,11 +308,8 @@ func rewriteValuedec_OpSlicePtr_0(v *Value) bool {
}
func rewriteValuedec_OpStore_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (Store {t} dst (ComplexMake real imag) mem)
// cond: t.(*types.Type).Size() == 8
// result: (Store {typ.Float32} (OffPtr <typ.Float32Ptr> [4] dst) imag (Store {typ.Float32} dst real mem))

View File

@ -138,9 +138,7 @@ func rewriteValuedec64(v *Value) bool {
}
func rewriteValuedec64_OpAdd64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Add64 x y)
// cond:
// result: (Int64Make (Add32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Add32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Add32carry (Int64Lo x) (Int64Lo y))))
@ -182,9 +180,7 @@ func rewriteValuedec64_OpAdd64_0(v *Value) bool {
}
func rewriteValuedec64_OpAnd64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (And64 x y)
// cond:
// result: (Int64Make (And32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (And32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
@ -214,11 +210,8 @@ func rewriteValuedec64_OpAnd64_0(v *Value) bool {
}
func rewriteValuedec64_OpArg_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (Arg {n} [off])
// cond: is64BitInt(v.Type) && !config.BigEndian && v.Type.IsSigned()
// result: (Int64Make (Arg <typ.Int32> {n} [off+4]) (Arg <typ.UInt32> {n} [off]))
@ -303,9 +296,7 @@ func rewriteValuedec64_OpArg_0(v *Value) bool {
}
func rewriteValuedec64_OpBitLen64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (BitLen64 x)
// cond:
// result: (Add32 <typ.Int> (BitLen32 <typ.Int> (Int64Hi x)) (BitLen32 <typ.Int> (Or32 <typ.UInt32> (Int64Lo x) (Zeromask (Int64Hi x)))))
@ -335,9 +326,7 @@ func rewriteValuedec64_OpBitLen64_0(v *Value) bool {
}
func rewriteValuedec64_OpBswap64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Bswap64 x)
// cond:
// result: (Int64Make (Bswap32 <typ.UInt32> (Int64Lo x)) (Bswap32 <typ.UInt32> (Int64Hi x)))
@ -359,9 +348,7 @@ func rewriteValuedec64_OpBswap64_0(v *Value) bool {
}
func rewriteValuedec64_OpCom64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Com64 x)
// cond:
// result: (Int64Make (Com32 <typ.UInt32> (Int64Hi x)) (Com32 <typ.UInt32> (Int64Lo x)))
@ -383,9 +370,7 @@ func rewriteValuedec64_OpCom64_0(v *Value) bool {
}
func rewriteValuedec64_OpConst64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Const64 <t> [c])
// cond: t.IsSigned()
// result: (Int64Make (Const32 <typ.Int32> [c>>32]) (Const32 <typ.UInt32> [int64(int32(c))]))
@ -426,9 +411,7 @@ func rewriteValuedec64_OpConst64_0(v *Value) bool {
}
func rewriteValuedec64_OpCtz64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Ctz64 x)
// cond:
// result: (Add32 <typ.UInt32> (Ctz32 <typ.UInt32> (Int64Lo x)) (And32 <typ.UInt32> (Com32 <typ.UInt32> (Zeromask (Int64Lo x))) (Ctz32 <typ.UInt32> (Int64Hi x))))
@ -471,9 +454,7 @@ func rewriteValuedec64_OpCtz64NonZero_0(v *Value) bool {
}
func rewriteValuedec64_OpEq64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Eq64 x y)
// cond:
// result: (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Eq32 (Int64Lo x) (Int64Lo y)))
@ -503,9 +484,7 @@ func rewriteValuedec64_OpEq64_0(v *Value) bool {
}
func rewriteValuedec64_OpGeq64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq64 x y)
// cond:
// result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y))))
@ -545,9 +524,7 @@ func rewriteValuedec64_OpGeq64_0(v *Value) bool {
}
func rewriteValuedec64_OpGeq64U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Geq64U x y)
// cond:
// result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Geq32U (Int64Lo x) (Int64Lo y))))
@ -587,9 +564,7 @@ func rewriteValuedec64_OpGeq64U_0(v *Value) bool {
}
func rewriteValuedec64_OpGreater64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Greater64 x y)
// cond:
// result: (OrB (Greater32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y))))
@ -629,9 +604,7 @@ func rewriteValuedec64_OpGreater64_0(v *Value) bool {
}
func rewriteValuedec64_OpGreater64U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Greater64U x y)
// cond:
// result: (OrB (Greater32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Greater32U (Int64Lo x) (Int64Lo y))))
@ -707,9 +680,7 @@ func rewriteValuedec64_OpInt64Lo_0(v *Value) bool {
}
func rewriteValuedec64_OpLeq64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq64 x y)
// cond:
// result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y))))
@ -749,9 +720,7 @@ func rewriteValuedec64_OpLeq64_0(v *Value) bool {
}
func rewriteValuedec64_OpLeq64U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Leq64U x y)
// cond:
// result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Leq32U (Int64Lo x) (Int64Lo y))))
@ -791,9 +760,7 @@ func rewriteValuedec64_OpLeq64U_0(v *Value) bool {
}
func rewriteValuedec64_OpLess64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Less64 x y)
// cond:
// result: (OrB (Less32 (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y))))
@ -833,9 +800,7 @@ func rewriteValuedec64_OpLess64_0(v *Value) bool {
}
func rewriteValuedec64_OpLess64U_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Less64U x y)
// cond:
// result: (OrB (Less32U (Int64Hi x) (Int64Hi y)) (AndB (Eq32 (Int64Hi x) (Int64Hi y)) (Less32U (Int64Lo x) (Int64Lo y))))
@ -875,11 +840,8 @@ func rewriteValuedec64_OpLess64U_0(v *Value) bool {
}
func rewriteValuedec64_OpLoad_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
typ := &b.Func.Config.Types
_ = typ
// match: (Load <t> ptr mem)
// cond: is64BitInt(t) && !config.BigEndian && t.IsSigned()
// result: (Int64Make (Load <typ.Int32> (OffPtr <typ.Int32Ptr> [4] ptr) mem) (Load <typ.UInt32> ptr mem))
@ -984,9 +946,7 @@ func rewriteValuedec64_OpLoad_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh16x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh16x64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const32 [0])
@ -1063,9 +1023,7 @@ func rewriteValuedec64_OpLsh16x64_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh32x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh32x64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const32 [0])
@ -1142,9 +1100,7 @@ func rewriteValuedec64_OpLsh32x64_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh64x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh64x16 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x16 <typ.UInt32> hi s) (Rsh32Ux16 <typ.UInt32> lo (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Lsh32x16 <typ.UInt32> lo (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))) (Lsh32x16 <typ.UInt32> lo s))
@ -1195,9 +1151,7 @@ func rewriteValuedec64_OpLsh64x16_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh64x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh64x32 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x32 <typ.UInt32> hi s) (Rsh32Ux32 <typ.UInt32> lo (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Lsh32x32 <typ.UInt32> lo (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))) (Lsh32x32 <typ.UInt32> lo s))
@ -1248,9 +1202,7 @@ func rewriteValuedec64_OpLsh64x32_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh64x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh64x64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const64 [0])
@ -1327,9 +1279,7 @@ func rewriteValuedec64_OpLsh64x64_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh64x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh64x8 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Lsh32x8 <typ.UInt32> hi s) (Rsh32Ux8 <typ.UInt32> lo (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Lsh32x8 <typ.UInt32> lo (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))) (Lsh32x8 <typ.UInt32> lo s))
@ -1380,9 +1330,7 @@ func rewriteValuedec64_OpLsh64x8_0(v *Value) bool {
}
func rewriteValuedec64_OpLsh8x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Lsh8x64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const32 [0])
@ -1459,9 +1407,7 @@ func rewriteValuedec64_OpLsh8x64_0(v *Value) bool {
}
func rewriteValuedec64_OpMul64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Mul64 x y)
// cond:
// result: (Int64Make (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Lo x) (Int64Hi y)) (Add32 <typ.UInt32> (Mul32 <typ.UInt32> (Int64Hi x) (Int64Lo y)) (Select0 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y))))) (Select1 <typ.UInt32> (Mul32uhilo (Int64Lo x) (Int64Lo y))))
@ -1515,7 +1461,6 @@ func rewriteValuedec64_OpMul64_0(v *Value) bool {
}
func rewriteValuedec64_OpNeg64_0(v *Value) bool {
b := v.Block
_ = b
// match: (Neg64 <t> x)
// cond:
// result: (Sub64 (Const64 <t> [0]) x)
@ -1532,9 +1477,7 @@ func rewriteValuedec64_OpNeg64_0(v *Value) bool {
}
func rewriteValuedec64_OpNeq64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Neq64 x y)
// cond:
// result: (OrB (Neq32 (Int64Hi x) (Int64Hi y)) (Neq32 (Int64Lo x) (Int64Lo y)))
@ -1564,9 +1507,7 @@ func rewriteValuedec64_OpNeq64_0(v *Value) bool {
}
func rewriteValuedec64_OpOr64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Or64 x y)
// cond:
// result: (Int64Make (Or32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Or32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
@ -1596,9 +1537,7 @@ func rewriteValuedec64_OpOr64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16Ux64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const32 [0])
@ -1675,9 +1614,7 @@ func rewriteValuedec64_OpRsh16Ux64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh16x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh16x64 x (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Signmask (SignExt16to32 x))
@ -1757,9 +1694,7 @@ func rewriteValuedec64_OpRsh16x64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32Ux64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const32 [0])
@ -1836,9 +1771,7 @@ func rewriteValuedec64_OpRsh32Ux64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh32x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh32x64 x (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Signmask x)
@ -1916,9 +1849,7 @@ func rewriteValuedec64_OpRsh32x64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64Ux16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64Ux16 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32Ux16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (Rsh32Ux16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32])))))
@ -1969,9 +1900,7 @@ func rewriteValuedec64_OpRsh64Ux16_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64Ux32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64Ux32 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32Ux32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (Rsh32Ux32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32])))))
@ -2022,9 +1951,7 @@ func rewriteValuedec64_OpRsh64Ux32_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64Ux64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const64 [0])
@ -2101,9 +2028,7 @@ func rewriteValuedec64_OpRsh64Ux64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64Ux8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64Ux8 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32Ux8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (Rsh32Ux8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32])))))
@ -2154,9 +2079,7 @@ func rewriteValuedec64_OpRsh64Ux8_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64x16_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64x16 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32x16 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux16 <typ.UInt32> lo s) (Lsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> (Const16 <typ.UInt16> [32]) s))) (And32 <typ.UInt32> (Rsh32x16 <typ.UInt32> hi (Sub16 <typ.UInt16> s (Const16 <typ.UInt16> [32]))) (Zeromask (ZeroExt16to32 (Rsh16Ux32 <typ.UInt16> s (Const32 <typ.UInt32> [5])))))))
@ -2219,9 +2142,7 @@ func rewriteValuedec64_OpRsh64x16_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64x32_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64x32 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32x32 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux32 <typ.UInt32> lo s) (Lsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> (Const32 <typ.UInt32> [32]) s))) (And32 <typ.UInt32> (Rsh32x32 <typ.UInt32> hi (Sub32 <typ.UInt32> s (Const32 <typ.UInt32> [32]))) (Zeromask (Rsh32Ux32 <typ.UInt32> s (Const32 <typ.UInt32> [5]))))))
@ -2282,9 +2203,7 @@ func rewriteValuedec64_OpRsh64x32_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64x64 x (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Int64Make (Signmask (Int64Hi x)) (Signmask (Int64Hi x)))
@ -2371,9 +2290,7 @@ func rewriteValuedec64_OpRsh64x64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh64x8_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh64x8 (Int64Make hi lo) s)
// cond:
// result: (Int64Make (Rsh32x8 <typ.UInt32> hi s) (Or32 <typ.UInt32> (Or32 <typ.UInt32> (Rsh32Ux8 <typ.UInt32> lo s) (Lsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> (Const8 <typ.UInt8> [32]) s))) (And32 <typ.UInt32> (Rsh32x8 <typ.UInt32> hi (Sub8 <typ.UInt8> s (Const8 <typ.UInt8> [32]))) (Zeromask (ZeroExt8to32 (Rsh8Ux32 <typ.UInt8> s (Const32 <typ.UInt32> [5])))))))
@ -2436,9 +2353,7 @@ func rewriteValuedec64_OpRsh64x8_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8Ux64 _ (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Const32 [0])
@ -2515,9 +2430,7 @@ func rewriteValuedec64_OpRsh8Ux64_0(v *Value) bool {
}
func rewriteValuedec64_OpRsh8x64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Rsh8x64 x (Int64Make (Const32 [c]) _))
// cond: c != 0
// result: (Signmask (SignExt8to32 x))
@ -2597,9 +2510,7 @@ func rewriteValuedec64_OpRsh8x64_0(v *Value) bool {
}
func rewriteValuedec64_OpSignExt16to64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (SignExt16to64 x)
// cond:
// result: (SignExt32to64 (SignExt16to32 x))
@ -2614,9 +2525,7 @@ func rewriteValuedec64_OpSignExt16to64_0(v *Value) bool {
}
func rewriteValuedec64_OpSignExt32to64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (SignExt32to64 x)
// cond:
// result: (Int64Make (Signmask x) x)
@ -2632,9 +2541,7 @@ func rewriteValuedec64_OpSignExt32to64_0(v *Value) bool {
}
func rewriteValuedec64_OpSignExt8to64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (SignExt8to64 x)
// cond:
// result: (SignExt32to64 (SignExt8to32 x))
@ -2649,9 +2556,7 @@ func rewriteValuedec64_OpSignExt8to64_0(v *Value) bool {
}
func rewriteValuedec64_OpStore_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
// match: (Store {t} dst (Int64Make hi lo) mem)
// cond: t.(*types.Type).Size() == 8 && !config.BigEndian
// result: (Store {hi.Type} (OffPtr <hi.Type.PtrTo()> [4] dst) hi (Store {lo.Type} dst lo mem))
@ -2722,9 +2627,7 @@ func rewriteValuedec64_OpStore_0(v *Value) bool {
}
func rewriteValuedec64_OpSub64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Sub64 x y)
// cond:
// result: (Int64Make (Sub32withcarry <typ.Int32> (Int64Hi x) (Int64Hi y) (Select1 <types.TypeFlags> (Sub32carry (Int64Lo x) (Int64Lo y)))) (Select0 <typ.UInt32> (Sub32carry (Int64Lo x) (Int64Lo y))))
@ -2818,9 +2721,7 @@ func rewriteValuedec64_OpTrunc64to8_0(v *Value) bool {
}
func rewriteValuedec64_OpXor64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (Xor64 x y)
// cond:
// result: (Int64Make (Xor32 <typ.UInt32> (Int64Hi x) (Int64Hi y)) (Xor32 <typ.UInt32> (Int64Lo x) (Int64Lo y)))
@ -2850,9 +2751,7 @@ func rewriteValuedec64_OpXor64_0(v *Value) bool {
}
func rewriteValuedec64_OpZeroExt16to64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (ZeroExt16to64 x)
// cond:
// result: (ZeroExt32to64 (ZeroExt16to32 x))
@ -2867,9 +2766,7 @@ func rewriteValuedec64_OpZeroExt16to64_0(v *Value) bool {
}
func rewriteValuedec64_OpZeroExt32to64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (ZeroExt32to64 x)
// cond:
// result: (Int64Make (Const32 <typ.UInt32> [0]) x)
@ -2885,9 +2782,7 @@ func rewriteValuedec64_OpZeroExt32to64_0(v *Value) bool {
}
func rewriteValuedec64_OpZeroExt8to64_0(v *Value) bool {
b := v.Block
_ = b
typ := &b.Func.Config.Types
_ = typ
// match: (ZeroExt8to64 x)
// cond:
// result: (ZeroExt32to64 (ZeroExt8to32 x))

View File

@ -24,13 +24,9 @@ func rewriteValuedecArgs(v *Value) bool {
}
func rewriteValuedecArgs_OpArg_0(v *Value) bool {
b := v.Block
_ = b
config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &b.Func.Config.Types
_ = typ
// match: (Arg {n} [off])
// cond: v.Type.IsString()
// result: (StringMake (Arg <typ.BytePtr> {n} [off]) (Arg <typ.Int> {n} [off+config.PtrSize]))
@ -242,9 +238,7 @@ func rewriteValuedecArgs_OpArg_0(v *Value) bool {
}
func rewriteValuedecArgs_OpArg_10(v *Value) bool {
b := v.Block
_ = b
fe := b.Func.fe
_ = fe
// match: (Arg <t>)
// cond: t.IsArray() && t.NumElem() == 0
// result: (ArrayMake0)

File diff suppressed because it is too large Load Diff