1
0
mirror of https://github.com/golang/go synced 2024-09-25 09:10:14 -06:00

cmd/compile: reduce rulegen's for loop verbosity

A lot of the naked for loops begin like:

	for {
		v := b.Control
		if v.Op != OpConstBool {
			break
		}
		...
		return true
	}

Instead, write them out in a more compact and readable way:

	for v.Op == OpConstBool {
		...
		return true
	}

This requires the addition of two bytes.Buffer writers, as this helps us
make a decision based on future pieces of generated code. This probably
makes rulegen slightly slower, but that's not noticeable; the code
generation still takes ~3.5s on my laptop, excluding build time.

The "v := b.Control" declaration can be moved to the top of each
function. Even though the rules can modify b.Control when firing, they
also make the function return, so v can't be used again.

While at it, remove three unnecessary lines from the top of each
rewriteBlock func.

In total, this results in ~4k lines removed from the generated code, and
a slight improvement in readability.

Change-Id: I317e4c6a4842c64df506f4513375475fad2aeec5
Reviewed-on: https://go-review.googlesource.com/c/go/+/167399
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Daniel Martí 2019-03-13 11:57:29 +00:00
parent b06d2122ee
commit 0fbf681840
16 changed files with 991 additions and 4712 deletions

View File

@ -217,7 +217,7 @@ func genRulesSuffix(arch arch, suff string) {
canFail = false canFail = false
fmt.Fprintf(buf, "for {\n") fmt.Fprintf(buf, "for {\n")
pos, matchCanFail := genMatch(buf, arch, match, rule.loc) pos, _, matchCanFail := genMatch(buf, arch, match, rule.loc)
if pos == "" { if pos == "" {
pos = "v.Pos" pos = "v.Pos"
} }
@ -273,11 +273,10 @@ func genRulesSuffix(arch arch, suff string) {
// so we can make this one function with a switch. // so we can make this one function with a switch.
fmt.Fprintf(w, "func rewriteBlock%s%s(b *Block) bool {\n", arch.name, suff) fmt.Fprintf(w, "func rewriteBlock%s%s(b *Block) bool {\n", arch.name, suff)
fmt.Fprintln(w, "config := b.Func.Config") fmt.Fprintln(w, "config := b.Func.Config")
fmt.Fprintln(w, "_ = config")
fmt.Fprintln(w, "fe := b.Func.fe")
fmt.Fprintln(w, "_ = fe")
fmt.Fprintln(w, "typ := &config.Types") fmt.Fprintln(w, "typ := &config.Types")
fmt.Fprintln(w, "_ = typ") fmt.Fprintln(w, "_ = typ")
fmt.Fprintln(w, "v := b.Control")
fmt.Fprintln(w, "_ = v")
fmt.Fprintf(w, "switch b.Kind {\n") fmt.Fprintf(w, "switch b.Kind {\n")
ops = nil ops = nil
for op := range blockrules { for op := range blockrules {
@ -292,27 +291,26 @@ func genRulesSuffix(arch arch, suff string) {
fmt.Fprintf(w, "// cond: %s\n", cond) fmt.Fprintf(w, "// cond: %s\n", cond)
fmt.Fprintf(w, "// result: %s\n", result) fmt.Fprintf(w, "// result: %s\n", result)
fmt.Fprintf(w, "for {\n")
_, _, _, aux, s := extract(match) // remove parens, then split _, _, _, aux, s := extract(match) // remove parens, then split
loopw := new(bytes.Buffer)
// check match of control value // check match of control value
pos := "" pos := ""
checkOp := ""
if s[0] != "nil" { if s[0] != "nil" {
fmt.Fprintf(w, "v := b.Control\n")
if strings.Contains(s[0], "(") { if strings.Contains(s[0], "(") {
pos, _ = genMatch0(w, arch, s[0], "v", map[string]struct{}{}, false, rule.loc) pos, checkOp, _ = genMatch0(loopw, arch, s[0], "v", map[string]struct{}{}, rule.loc)
} else { } else {
fmt.Fprintf(w, "_ = v\n") // in case we don't use v fmt.Fprintf(loopw, "%s := b.Control\n", s[0])
fmt.Fprintf(w, "%s := b.Control\n", s[0])
} }
} }
if aux != "" { if aux != "" {
fmt.Fprintf(w, "%s := b.Aux\n", aux) fmt.Fprintf(loopw, "%s := b.Aux\n", aux)
} }
if cond != "" { if cond != "" {
fmt.Fprintf(w, "if !(%s) {\nbreak\n}\n", cond) fmt.Fprintf(loopw, "if !(%s) {\nbreak\n}\n", cond)
} }
// Rule matches. Generate result. // Rule matches. Generate result.
@ -338,19 +336,19 @@ func genRulesSuffix(arch arch, suff string) {
log.Fatalf("unmatched successors %v in %s", m, rule) log.Fatalf("unmatched successors %v in %s", m, rule)
} }
fmt.Fprintf(w, "b.Kind = %s\n", blockName(outop, arch)) fmt.Fprintf(loopw, "b.Kind = %s\n", blockName(outop, arch))
if t[0] == "nil" { if t[0] == "nil" {
fmt.Fprintf(w, "b.SetControl(nil)\n") fmt.Fprintf(loopw, "b.SetControl(nil)\n")
} else { } else {
if pos == "" { if pos == "" {
pos = "v.Pos" pos = "v.Pos"
} }
fmt.Fprintf(w, "b.SetControl(%s)\n", genResult0(w, arch, t[0], new(int), false, false, rule.loc, pos)) fmt.Fprintf(loopw, "b.SetControl(%s)\n", genResult0(loopw, arch, t[0], new(int), false, false, rule.loc, pos))
} }
if aux != "" { if aux != "" {
fmt.Fprintf(w, "b.Aux = %s\n", aux) fmt.Fprintf(loopw, "b.Aux = %s\n", aux)
} else { } else {
fmt.Fprintln(w, "b.Aux = nil") fmt.Fprintln(loopw, "b.Aux = nil")
} }
succChanged := false succChanged := false
@ -366,13 +364,20 @@ func genRulesSuffix(arch arch, suff string) {
if succs[0] != newsuccs[1] || succs[1] != newsuccs[0] { if succs[0] != newsuccs[1] || succs[1] != newsuccs[0] {
log.Fatalf("can only handle swapped successors in %s", rule) log.Fatalf("can only handle swapped successors in %s", rule)
} }
fmt.Fprintln(w, "b.swapSuccessors()") fmt.Fprintln(loopw, "b.swapSuccessors()")
} }
if *genLog { if *genLog {
fmt.Fprintf(w, "logRule(\"%s\")\n", rule.loc) fmt.Fprintf(loopw, "logRule(\"%s\")\n", rule.loc)
} }
fmt.Fprintf(w, "return true\n") fmt.Fprintf(loopw, "return true\n")
if checkOp != "" {
fmt.Fprintf(w, "for v.Op == %s {\n", checkOp)
} else {
fmt.Fprintf(w, "for {\n")
}
io.Copy(w, loopw)
fmt.Fprintf(w, "}\n") fmt.Fprintf(w, "}\n")
} }
@ -398,24 +403,18 @@ func genRulesSuffix(arch arch, suff string) {
// genMatch returns the variable whose source position should be used for the // genMatch returns the variable whose source position should be used for the
// result (or "" if no opinion), and a boolean that reports whether the match can fail. // result (or "" if no opinion), and a boolean that reports whether the match can fail.
func genMatch(w io.Writer, arch arch, match string, loc string) (string, bool) { func genMatch(w io.Writer, arch arch, match string, loc string) (pos, checkOp string, canFail bool) {
return genMatch0(w, arch, match, "v", map[string]struct{}{}, true, loc) return genMatch0(w, arch, match, "v", map[string]struct{}{}, loc)
} }
func genMatch0(w io.Writer, arch arch, match, v string, m map[string]struct{}, top bool, loc string) (string, bool) { func genMatch0(w io.Writer, arch arch, match, v string, m map[string]struct{}, loc string) (pos, checkOp string, canFail bool) {
if match[0] != '(' || match[len(match)-1] != ')' { if match[0] != '(' || match[len(match)-1] != ')' {
panic("non-compound expr in genMatch0: " + match) panic("non-compound expr in genMatch0: " + match)
} }
pos := ""
canFail := false
op, oparch, typ, auxint, aux, args := parseValue(match, arch, loc) op, oparch, typ, auxint, aux, args := parseValue(match, arch, loc)
// check op checkOp = fmt.Sprintf("Op%s%s", oparch, op.name)
if !top {
fmt.Fprintf(w, "if %s.Op != Op%s%s {\nbreak\n}\n", v, oparch, op.name)
canFail = true
}
if op.faultOnNilArg0 || op.faultOnNilArg1 { if op.faultOnNilArg0 || op.faultOnNilArg1 {
// Prefer the position of an instruction which could fault. // Prefer the position of an instruction which could fault.
pos = v + ".Pos" pos = v + ".Pos"
@ -521,8 +520,13 @@ func genMatch0(w io.Writer, arch arch, match, v string, m map[string]struct{}, t
if argname == "b" { if argname == "b" {
log.Fatalf("don't name args 'b', it is ambiguous with blocks") log.Fatalf("don't name args 'b', it is ambiguous with blocks")
} }
fmt.Fprintf(w, "%s := %s.Args[%d]\n", argname, v, i) fmt.Fprintf(w, "%s := %s.Args[%d]\n", argname, v, i)
argPos, argCanFail := genMatch0(w, arch, arg, argname, m, false, loc) w2 := new(bytes.Buffer)
argPos, argCheckOp, _ := genMatch0(w2, arch, arg, argname, m, loc)
fmt.Fprintf(w, "if %s.Op != %s {\nbreak\n}\n", argname, argCheckOp)
io.Copy(w, w2)
if argPos != "" { if argPos != "" {
// Keep the argument in preference to the parent, as the // Keep the argument in preference to the parent, as the
// argument is normally earlier in program flow. // argument is normally earlier in program flow.
@ -531,16 +535,14 @@ func genMatch0(w io.Writer, arch arch, match, v string, m map[string]struct{}, t
// in the program flow. // in the program flow.
pos = argPos pos = argPos
} }
if argCanFail { canFail = true
canFail = true
}
} }
if op.argLength == -1 { if op.argLength == -1 {
fmt.Fprintf(w, "if len(%s.Args) != %d {\nbreak\n}\n", v, len(args)) fmt.Fprintf(w, "if len(%s.Args) != %d {\nbreak\n}\n", v, len(args))
canFail = true canFail = true
} }
return pos, canFail return pos, checkOp, canFail
} }
func genResult(w io.Writer, arch arch, result string, loc string, pos string) { func genResult(w io.Writer, arch arch, result string, loc string, pos string) {

File diff suppressed because it is too large Load Diff

View File

@ -169,11 +169,10 @@ func rewriteValue386splitload_Op386CMPWload_0(v *Value) bool {
} }
func rewriteBlock386splitload(b *Block) bool { func rewriteBlock386splitload(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
} }
return false return false

File diff suppressed because it is too large Load Diff

View File

@ -218,11 +218,10 @@ func rewriteValueAMD64splitload_OpAMD64CMPWload_0(v *Value) bool {
} }
func rewriteBlockAMD64splitload(b *Block) bool { func rewriteBlockAMD64splitload(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
} }
return false return false

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9317,21 +9317,16 @@ func rewriteValueMIPS_OpZeromask_0(v *Value) bool {
} }
func rewriteBlockMIPS(b *Block) bool { func rewriteBlockMIPS(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
case BlockMIPSEQ: case BlockMIPSEQ:
// match: (EQ (FPFlagTrue cmp) yes no) // match: (EQ (FPFlagTrue cmp) yes no)
// cond: // cond:
// result: (FPF cmp yes no) // result: (FPF cmp yes no)
for { for v.Op == OpMIPSFPFlagTrue {
v := b.Control
if v.Op != OpMIPSFPFlagTrue {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPSFPF b.Kind = BlockMIPSFPF
b.SetControl(cmp) b.SetControl(cmp)
@ -9341,11 +9336,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (FPFlagFalse cmp) yes no) // match: (EQ (FPFlagFalse cmp) yes no)
// cond: // cond:
// result: (FPT cmp yes no) // result: (FPT cmp yes no)
for { for v.Op == OpMIPSFPFlagFalse {
v := b.Control
if v.Op != OpMIPSFPFlagFalse {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPSFPT b.Kind = BlockMIPSFPT
b.SetControl(cmp) b.SetControl(cmp)
@ -9355,11 +9346,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no) // match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9376,11 +9363,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9397,11 +9380,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9417,11 +9396,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9437,11 +9412,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9457,11 +9428,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9477,11 +9444,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (SGTUconst [1] x) yes no) // match: (EQ (SGTUconst [1] x) yes no)
// cond: // cond:
// result: (NE x yes no) // result: (NE x yes no)
for { for v.Op == OpMIPSSGTUconst {
v := b.Control
if v.Op != OpMIPSSGTUconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9494,11 +9457,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (SGTUzero x) yes no) // match: (EQ (SGTUzero x) yes no)
// cond: // cond:
// result: (EQ x yes no) // result: (EQ x yes no)
for { for v.Op == OpMIPSSGTUzero {
v := b.Control
if v.Op != OpMIPSSGTUzero {
break
}
x := v.Args[0] x := v.Args[0]
b.Kind = BlockMIPSEQ b.Kind = BlockMIPSEQ
b.SetControl(x) b.SetControl(x)
@ -9508,11 +9467,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (SGTconst [0] x) yes no) // match: (EQ (SGTconst [0] x) yes no)
// cond: // cond:
// result: (GEZ x yes no) // result: (GEZ x yes no)
for { for v.Op == OpMIPSSGTconst {
v := b.Control
if v.Op != OpMIPSSGTconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -9525,11 +9480,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (SGTzero x) yes no) // match: (EQ (SGTzero x) yes no)
// cond: // cond:
// result: (LEZ x yes no) // result: (LEZ x yes no)
for { for v.Op == OpMIPSSGTzero {
v := b.Control
if v.Op != OpMIPSSGTzero {
break
}
x := v.Args[0] x := v.Args[0]
b.Kind = BlockMIPSLEZ b.Kind = BlockMIPSLEZ
b.SetControl(x) b.SetControl(x)
@ -9539,11 +9490,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (MOVWconst [0]) yes no) // match: (EQ (MOVWconst [0]) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -9555,11 +9502,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (EQ (MOVWconst [c]) yes no) // match: (EQ (MOVWconst [c]) yes no)
// cond: c != 0 // cond: c != 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c != 0) { if !(c != 0) {
break break
@ -9574,11 +9517,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (GEZ (MOVWconst [c]) yes no) // match: (GEZ (MOVWconst [c]) yes no)
// cond: int32(c) >= 0 // cond: int32(c) >= 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) >= 0) { if !(int32(c) >= 0) {
break break
@ -9591,11 +9530,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (GEZ (MOVWconst [c]) yes no) // match: (GEZ (MOVWconst [c]) yes no)
// cond: int32(c) < 0 // cond: int32(c) < 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) < 0) { if !(int32(c) < 0) {
break break
@ -9610,11 +9545,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (GTZ (MOVWconst [c]) yes no) // match: (GTZ (MOVWconst [c]) yes no)
// cond: int32(c) > 0 // cond: int32(c) > 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) > 0) { if !(int32(c) > 0) {
break break
@ -9627,11 +9558,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (GTZ (MOVWconst [c]) yes no) // match: (GTZ (MOVWconst [c]) yes no)
// cond: int32(c) <= 0 // cond: int32(c) <= 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) <= 0) { if !(int32(c) <= 0) {
break break
@ -9647,8 +9574,6 @@ func rewriteBlockMIPS(b *Block) bool {
// cond: // cond:
// result: (NE cond yes no) // result: (NE cond yes no)
for { for {
v := b.Control
_ = v
cond := b.Control cond := b.Control
b.Kind = BlockMIPSNE b.Kind = BlockMIPSNE
b.SetControl(cond) b.SetControl(cond)
@ -9659,11 +9584,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (LEZ (MOVWconst [c]) yes no) // match: (LEZ (MOVWconst [c]) yes no)
// cond: int32(c) <= 0 // cond: int32(c) <= 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) <= 0) { if !(int32(c) <= 0) {
break break
@ -9676,11 +9597,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (LEZ (MOVWconst [c]) yes no) // match: (LEZ (MOVWconst [c]) yes no)
// cond: int32(c) > 0 // cond: int32(c) > 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) > 0) { if !(int32(c) > 0) {
break break
@ -9695,11 +9612,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (LTZ (MOVWconst [c]) yes no) // match: (LTZ (MOVWconst [c]) yes no)
// cond: int32(c) < 0 // cond: int32(c) < 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) < 0) { if !(int32(c) < 0) {
break break
@ -9712,11 +9625,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (LTZ (MOVWconst [c]) yes no) // match: (LTZ (MOVWconst [c]) yes no)
// cond: int32(c) >= 0 // cond: int32(c) >= 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(int32(c) >= 0) { if !(int32(c) >= 0) {
break break
@ -9731,11 +9640,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (FPFlagTrue cmp) yes no) // match: (NE (FPFlagTrue cmp) yes no)
// cond: // cond:
// result: (FPT cmp yes no) // result: (FPT cmp yes no)
for { for v.Op == OpMIPSFPFlagTrue {
v := b.Control
if v.Op != OpMIPSFPFlagTrue {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPSFPT b.Kind = BlockMIPSFPT
b.SetControl(cmp) b.SetControl(cmp)
@ -9745,11 +9650,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (FPFlagFalse cmp) yes no) // match: (NE (FPFlagFalse cmp) yes no)
// cond: // cond:
// result: (FPF cmp yes no) // result: (FPF cmp yes no)
for { for v.Op == OpMIPSFPFlagFalse {
v := b.Control
if v.Op != OpMIPSFPFlagFalse {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPSFPF b.Kind = BlockMIPSFPF
b.SetControl(cmp) b.SetControl(cmp)
@ -9759,11 +9660,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no) // match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9780,11 +9677,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no) // match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9801,11 +9694,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no) // match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9821,11 +9710,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no) // match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9841,11 +9726,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTzero _)) yes no) // match: (NE (XORconst [1] cmp:(SGTzero _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9861,11 +9742,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no) // match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPSXORconst {
v := b.Control
if v.Op != OpMIPSXORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9881,11 +9758,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (SGTUconst [1] x) yes no) // match: (NE (SGTUconst [1] x) yes no)
// cond: // cond:
// result: (EQ x yes no) // result: (EQ x yes no)
for { for v.Op == OpMIPSSGTUconst {
v := b.Control
if v.Op != OpMIPSSGTUconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -9898,11 +9771,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (SGTUzero x) yes no) // match: (NE (SGTUzero x) yes no)
// cond: // cond:
// result: (NE x yes no) // result: (NE x yes no)
for { for v.Op == OpMIPSSGTUzero {
v := b.Control
if v.Op != OpMIPSSGTUzero {
break
}
x := v.Args[0] x := v.Args[0]
b.Kind = BlockMIPSNE b.Kind = BlockMIPSNE
b.SetControl(x) b.SetControl(x)
@ -9912,11 +9781,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (SGTconst [0] x) yes no) // match: (NE (SGTconst [0] x) yes no)
// cond: // cond:
// result: (LTZ x yes no) // result: (LTZ x yes no)
for { for v.Op == OpMIPSSGTconst {
v := b.Control
if v.Op != OpMIPSSGTconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -9929,11 +9794,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (SGTzero x) yes no) // match: (NE (SGTzero x) yes no)
// cond: // cond:
// result: (GTZ x yes no) // result: (GTZ x yes no)
for { for v.Op == OpMIPSSGTzero {
v := b.Control
if v.Op != OpMIPSSGTzero {
break
}
x := v.Args[0] x := v.Args[0]
b.Kind = BlockMIPSGTZ b.Kind = BlockMIPSGTZ
b.SetControl(x) b.SetControl(x)
@ -9943,11 +9804,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (MOVWconst [0]) yes no) // match: (NE (MOVWconst [0]) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -9960,11 +9817,7 @@ func rewriteBlockMIPS(b *Block) bool {
// match: (NE (MOVWconst [c]) yes no) // match: (NE (MOVWconst [c]) yes no)
// cond: c != 0 // cond: c != 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPSMOVWconst {
v := b.Control
if v.Op != OpMIPSMOVWconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c != 0) { if !(c != 0) {
break break

View File

@ -10036,21 +10036,16 @@ func rewriteValueMIPS64_OpZeroExt8to64_0(v *Value) bool {
} }
func rewriteBlockMIPS64(b *Block) bool { func rewriteBlockMIPS64(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
case BlockMIPS64EQ: case BlockMIPS64EQ:
// match: (EQ (FPFlagTrue cmp) yes no) // match: (EQ (FPFlagTrue cmp) yes no)
// cond: // cond:
// result: (FPF cmp yes no) // result: (FPF cmp yes no)
for { for v.Op == OpMIPS64FPFlagTrue {
v := b.Control
if v.Op != OpMIPS64FPFlagTrue {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPS64FPF b.Kind = BlockMIPS64FPF
b.SetControl(cmp) b.SetControl(cmp)
@ -10060,11 +10055,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (FPFlagFalse cmp) yes no) // match: (EQ (FPFlagFalse cmp) yes no)
// cond: // cond:
// result: (FPT cmp yes no) // result: (FPT cmp yes no)
for { for v.Op == OpMIPS64FPFlagFalse {
v := b.Control
if v.Op != OpMIPS64FPFlagFalse {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPS64FPT b.Kind = BlockMIPS64FPT
b.SetControl(cmp) b.SetControl(cmp)
@ -10074,11 +10065,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no) // match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10095,11 +10082,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10116,11 +10099,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10136,11 +10115,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no) // match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10156,11 +10131,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (SGTUconst [1] x) yes no) // match: (EQ (SGTUconst [1] x) yes no)
// cond: // cond:
// result: (NE x yes no) // result: (NE x yes no)
for { for v.Op == OpMIPS64SGTUconst {
v := b.Control
if v.Op != OpMIPS64SGTUconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10173,11 +10144,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (SGTU x (MOVVconst [0])) yes no) // match: (EQ (SGTU x (MOVVconst [0])) yes no)
// cond: // cond:
// result: (EQ x yes no) // result: (EQ x yes no)
for { for v.Op == OpMIPS64SGTU {
v := b.Control
if v.Op != OpMIPS64SGTU {
break
}
_ = v.Args[1] _ = v.Args[1]
x := v.Args[0] x := v.Args[0]
v_1 := v.Args[1] v_1 := v.Args[1]
@ -10195,11 +10162,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (SGTconst [0] x) yes no) // match: (EQ (SGTconst [0] x) yes no)
// cond: // cond:
// result: (GEZ x yes no) // result: (GEZ x yes no)
for { for v.Op == OpMIPS64SGTconst {
v := b.Control
if v.Op != OpMIPS64SGTconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -10212,11 +10175,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (SGT x (MOVVconst [0])) yes no) // match: (EQ (SGT x (MOVVconst [0])) yes no)
// cond: // cond:
// result: (LEZ x yes no) // result: (LEZ x yes no)
for { for v.Op == OpMIPS64SGT {
v := b.Control
if v.Op != OpMIPS64SGT {
break
}
_ = v.Args[1] _ = v.Args[1]
x := v.Args[0] x := v.Args[0]
v_1 := v.Args[1] v_1 := v.Args[1]
@ -10234,11 +10193,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (MOVVconst [0]) yes no) // match: (EQ (MOVVconst [0]) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -10250,11 +10205,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (EQ (MOVVconst [c]) yes no) // match: (EQ (MOVVconst [c]) yes no)
// cond: c != 0 // cond: c != 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c != 0) { if !(c != 0) {
break break
@ -10269,11 +10220,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (GEZ (MOVVconst [c]) yes no) // match: (GEZ (MOVVconst [c]) yes no)
// cond: c >= 0 // cond: c >= 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c >= 0) { if !(c >= 0) {
break break
@ -10286,11 +10233,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (GEZ (MOVVconst [c]) yes no) // match: (GEZ (MOVVconst [c]) yes no)
// cond: c < 0 // cond: c < 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c < 0) { if !(c < 0) {
break break
@ -10305,11 +10248,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (GTZ (MOVVconst [c]) yes no) // match: (GTZ (MOVVconst [c]) yes no)
// cond: c > 0 // cond: c > 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c > 0) { if !(c > 0) {
break break
@ -10322,11 +10261,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (GTZ (MOVVconst [c]) yes no) // match: (GTZ (MOVVconst [c]) yes no)
// cond: c <= 0 // cond: c <= 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c <= 0) { if !(c <= 0) {
break break
@ -10342,8 +10277,6 @@ func rewriteBlockMIPS64(b *Block) bool {
// cond: // cond:
// result: (NE cond yes no) // result: (NE cond yes no)
for { for {
v := b.Control
_ = v
cond := b.Control cond := b.Control
b.Kind = BlockMIPS64NE b.Kind = BlockMIPS64NE
b.SetControl(cond) b.SetControl(cond)
@ -10354,11 +10287,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (LEZ (MOVVconst [c]) yes no) // match: (LEZ (MOVVconst [c]) yes no)
// cond: c <= 0 // cond: c <= 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c <= 0) { if !(c <= 0) {
break break
@ -10371,11 +10300,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (LEZ (MOVVconst [c]) yes no) // match: (LEZ (MOVVconst [c]) yes no)
// cond: c > 0 // cond: c > 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c > 0) { if !(c > 0) {
break break
@ -10390,11 +10315,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (LTZ (MOVVconst [c]) yes no) // match: (LTZ (MOVVconst [c]) yes no)
// cond: c < 0 // cond: c < 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c < 0) { if !(c < 0) {
break break
@ -10407,11 +10328,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (LTZ (MOVVconst [c]) yes no) // match: (LTZ (MOVVconst [c]) yes no)
// cond: c >= 0 // cond: c >= 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c >= 0) { if !(c >= 0) {
break break
@ -10426,11 +10343,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (FPFlagTrue cmp) yes no) // match: (NE (FPFlagTrue cmp) yes no)
// cond: // cond:
// result: (FPT cmp yes no) // result: (FPT cmp yes no)
for { for v.Op == OpMIPS64FPFlagTrue {
v := b.Control
if v.Op != OpMIPS64FPFlagTrue {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPS64FPT b.Kind = BlockMIPS64FPT
b.SetControl(cmp) b.SetControl(cmp)
@ -10440,11 +10353,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (FPFlagFalse cmp) yes no) // match: (NE (FPFlagFalse cmp) yes no)
// cond: // cond:
// result: (FPF cmp yes no) // result: (FPF cmp yes no)
for { for v.Op == OpMIPS64FPFlagFalse {
v := b.Control
if v.Op != OpMIPS64FPFlagFalse {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockMIPS64FPF b.Kind = BlockMIPS64FPF
b.SetControl(cmp) b.SetControl(cmp)
@ -10454,11 +10363,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no) // match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10475,11 +10380,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no) // match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10496,11 +10397,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no) // match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10516,11 +10413,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no) // match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpMIPS64XORconst {
v := b.Control
if v.Op != OpMIPS64XORconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10536,11 +10429,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (SGTUconst [1] x) yes no) // match: (NE (SGTUconst [1] x) yes no)
// cond: // cond:
// result: (EQ x yes no) // result: (EQ x yes no)
for { for v.Op == OpMIPS64SGTUconst {
v := b.Control
if v.Op != OpMIPS64SGTUconst {
break
}
if v.AuxInt != 1 { if v.AuxInt != 1 {
break break
} }
@ -10553,11 +10442,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (SGTU x (MOVVconst [0])) yes no) // match: (NE (SGTU x (MOVVconst [0])) yes no)
// cond: // cond:
// result: (NE x yes no) // result: (NE x yes no)
for { for v.Op == OpMIPS64SGTU {
v := b.Control
if v.Op != OpMIPS64SGTU {
break
}
_ = v.Args[1] _ = v.Args[1]
x := v.Args[0] x := v.Args[0]
v_1 := v.Args[1] v_1 := v.Args[1]
@ -10575,11 +10460,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (SGTconst [0] x) yes no) // match: (NE (SGTconst [0] x) yes no)
// cond: // cond:
// result: (LTZ x yes no) // result: (LTZ x yes no)
for { for v.Op == OpMIPS64SGTconst {
v := b.Control
if v.Op != OpMIPS64SGTconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -10592,11 +10473,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (SGT x (MOVVconst [0])) yes no) // match: (NE (SGT x (MOVVconst [0])) yes no)
// cond: // cond:
// result: (GTZ x yes no) // result: (GTZ x yes no)
for { for v.Op == OpMIPS64SGT {
v := b.Control
if v.Op != OpMIPS64SGT {
break
}
_ = v.Args[1] _ = v.Args[1]
x := v.Args[0] x := v.Args[0]
v_1 := v.Args[1] v_1 := v.Args[1]
@ -10614,11 +10491,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (MOVVconst [0]) yes no) // match: (NE (MOVVconst [0]) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -10631,11 +10504,7 @@ func rewriteBlockMIPS64(b *Block) bool {
// match: (NE (MOVVconst [c]) yes no) // match: (NE (MOVVconst [c]) yes no)
// cond: c != 0 // cond: c != 0
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpMIPS64MOVVconst {
v := b.Control
if v.Op != OpMIPS64MOVVconst {
break
}
c := v.AuxInt c := v.AuxInt
if !(c != 0) { if !(c != 0) {
break break

View File

@ -30173,21 +30173,16 @@ func rewriteValuePPC64_OpZeroExt8to64_0(v *Value) bool {
} }
func rewriteBlockPPC64(b *Block) bool { func rewriteBlockPPC64(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
case BlockPPC64EQ: case BlockPPC64EQ:
// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no) // match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (EQ (ANDCCconst [c] x) yes no) // result: (EQ (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30208,11 +30203,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (EQ (ANDCCconst [c] x) yes no) // result: (EQ (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30233,11 +30224,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (FlagEQ) yes no) // match: (EQ (FlagEQ) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagEQ {
v := b.Control
if v.Op != OpPPC64FlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30246,11 +30233,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (FlagLT) yes no) // match: (EQ (FlagLT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagLT {
v := b.Control
if v.Op != OpPPC64FlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30260,11 +30243,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (FlagGT) yes no) // match: (EQ (FlagGT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagGT {
v := b.Control
if v.Op != OpPPC64FlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30274,11 +30253,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (InvertFlags cmp) yes no) // match: (EQ (InvertFlags cmp) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpPPC64InvertFlags {
v := b.Control
if v.Op != OpPPC64InvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockPPC64EQ b.Kind = BlockPPC64EQ
b.SetControl(cmp) b.SetControl(cmp)
@ -30288,11 +30263,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no) // match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (EQ (ANDCCconst [c] x) yes no) // result: (EQ (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30313,11 +30284,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (EQ (ANDCCconst [c] x) yes no) // result: (EQ (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30338,11 +30305,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (CMPconst [0] z:(AND x y)) yes no) // match: (EQ (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (EQ (ANDCC x y) yes no) // result: (EQ (ANDCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30366,11 +30329,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (CMPconst [0] z:(OR x y)) yes no) // match: (EQ (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (EQ (ORCC x y) yes no) // result: (EQ (ORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30394,11 +30353,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (EQ (CMPconst [0] z:(XOR x y)) yes no) // match: (EQ (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (EQ (XORCC x y) yes no) // result: (EQ (XORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30423,11 +30378,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (FlagEQ) yes no) // match: (GE (FlagEQ) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagEQ {
v := b.Control
if v.Op != OpPPC64FlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30436,11 +30387,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (FlagLT) yes no) // match: (GE (FlagLT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagLT {
v := b.Control
if v.Op != OpPPC64FlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30450,11 +30397,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (FlagGT) yes no) // match: (GE (FlagGT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagGT {
v := b.Control
if v.Op != OpPPC64FlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30463,11 +30406,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (InvertFlags cmp) yes no) // match: (GE (InvertFlags cmp) yes no)
// cond: // cond:
// result: (LE cmp yes no) // result: (LE cmp yes no)
for { for v.Op == OpPPC64InvertFlags {
v := b.Control
if v.Op != OpPPC64InvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockPPC64LE b.Kind = BlockPPC64LE
b.SetControl(cmp) b.SetControl(cmp)
@ -30477,11 +30416,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (CMPconst [0] (ANDconst [c] x)) yes no) // match: (GE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (GE (ANDCCconst [c] x) yes no) // result: (GE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30502,11 +30437,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (GE (ANDCCconst [c] x) yes no) // result: (GE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30527,11 +30458,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (CMPconst [0] z:(AND x y)) yes no) // match: (GE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (GE (ANDCC x y) yes no) // result: (GE (ANDCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30555,11 +30482,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (CMPconst [0] z:(OR x y)) yes no) // match: (GE (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (GE (ORCC x y) yes no) // result: (GE (ORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30583,11 +30506,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GE (CMPconst [0] z:(XOR x y)) yes no) // match: (GE (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (GE (XORCC x y) yes no) // result: (GE (XORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30612,11 +30531,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (FlagEQ) yes no) // match: (GT (FlagEQ) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagEQ {
v := b.Control
if v.Op != OpPPC64FlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30626,11 +30541,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (FlagLT) yes no) // match: (GT (FlagLT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagLT {
v := b.Control
if v.Op != OpPPC64FlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30640,11 +30551,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (FlagGT) yes no) // match: (GT (FlagGT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagGT {
v := b.Control
if v.Op != OpPPC64FlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30653,11 +30560,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (InvertFlags cmp) yes no) // match: (GT (InvertFlags cmp) yes no)
// cond: // cond:
// result: (LT cmp yes no) // result: (LT cmp yes no)
for { for v.Op == OpPPC64InvertFlags {
v := b.Control
if v.Op != OpPPC64InvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockPPC64LT b.Kind = BlockPPC64LT
b.SetControl(cmp) b.SetControl(cmp)
@ -30667,11 +30570,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (CMPconst [0] (ANDconst [c] x)) yes no) // match: (GT (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (GT (ANDCCconst [c] x) yes no) // result: (GT (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30692,11 +30591,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (GT (ANDCCconst [c] x) yes no) // result: (GT (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30717,11 +30612,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (CMPconst [0] z:(AND x y)) yes no) // match: (GT (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (GT (ANDCC x y) yes no) // result: (GT (ANDCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30745,11 +30636,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (CMPconst [0] z:(OR x y)) yes no) // match: (GT (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (GT (ORCC x y) yes no) // result: (GT (ORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30773,11 +30660,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (GT (CMPconst [0] z:(XOR x y)) yes no) // match: (GT (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (GT (XORCC x y) yes no) // result: (GT (XORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -30802,11 +30685,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (Equal cc) yes no) // match: (If (Equal cc) yes no)
// cond: // cond:
// result: (EQ cc yes no) // result: (EQ cc yes no)
for { for v.Op == OpPPC64Equal {
v := b.Control
if v.Op != OpPPC64Equal {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64EQ b.Kind = BlockPPC64EQ
b.SetControl(cc) b.SetControl(cc)
@ -30816,11 +30695,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (NotEqual cc) yes no) // match: (If (NotEqual cc) yes no)
// cond: // cond:
// result: (NE cc yes no) // result: (NE cc yes no)
for { for v.Op == OpPPC64NotEqual {
v := b.Control
if v.Op != OpPPC64NotEqual {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64NE b.Kind = BlockPPC64NE
b.SetControl(cc) b.SetControl(cc)
@ -30830,11 +30705,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (LessThan cc) yes no) // match: (If (LessThan cc) yes no)
// cond: // cond:
// result: (LT cc yes no) // result: (LT cc yes no)
for { for v.Op == OpPPC64LessThan {
v := b.Control
if v.Op != OpPPC64LessThan {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64LT b.Kind = BlockPPC64LT
b.SetControl(cc) b.SetControl(cc)
@ -30844,11 +30715,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (LessEqual cc) yes no) // match: (If (LessEqual cc) yes no)
// cond: // cond:
// result: (LE cc yes no) // result: (LE cc yes no)
for { for v.Op == OpPPC64LessEqual {
v := b.Control
if v.Op != OpPPC64LessEqual {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64LE b.Kind = BlockPPC64LE
b.SetControl(cc) b.SetControl(cc)
@ -30858,11 +30725,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (GreaterThan cc) yes no) // match: (If (GreaterThan cc) yes no)
// cond: // cond:
// result: (GT cc yes no) // result: (GT cc yes no)
for { for v.Op == OpPPC64GreaterThan {
v := b.Control
if v.Op != OpPPC64GreaterThan {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64GT b.Kind = BlockPPC64GT
b.SetControl(cc) b.SetControl(cc)
@ -30872,11 +30735,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (GreaterEqual cc) yes no) // match: (If (GreaterEqual cc) yes no)
// cond: // cond:
// result: (GE cc yes no) // result: (GE cc yes no)
for { for v.Op == OpPPC64GreaterEqual {
v := b.Control
if v.Op != OpPPC64GreaterEqual {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64GE b.Kind = BlockPPC64GE
b.SetControl(cc) b.SetControl(cc)
@ -30886,11 +30745,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (FLessThan cc) yes no) // match: (If (FLessThan cc) yes no)
// cond: // cond:
// result: (FLT cc yes no) // result: (FLT cc yes no)
for { for v.Op == OpPPC64FLessThan {
v := b.Control
if v.Op != OpPPC64FLessThan {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64FLT b.Kind = BlockPPC64FLT
b.SetControl(cc) b.SetControl(cc)
@ -30900,11 +30755,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (FLessEqual cc) yes no) // match: (If (FLessEqual cc) yes no)
// cond: // cond:
// result: (FLE cc yes no) // result: (FLE cc yes no)
for { for v.Op == OpPPC64FLessEqual {
v := b.Control
if v.Op != OpPPC64FLessEqual {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64FLE b.Kind = BlockPPC64FLE
b.SetControl(cc) b.SetControl(cc)
@ -30914,11 +30765,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (FGreaterThan cc) yes no) // match: (If (FGreaterThan cc) yes no)
// cond: // cond:
// result: (FGT cc yes no) // result: (FGT cc yes no)
for { for v.Op == OpPPC64FGreaterThan {
v := b.Control
if v.Op != OpPPC64FGreaterThan {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64FGT b.Kind = BlockPPC64FGT
b.SetControl(cc) b.SetControl(cc)
@ -30928,11 +30775,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (If (FGreaterEqual cc) yes no) // match: (If (FGreaterEqual cc) yes no)
// cond: // cond:
// result: (FGE cc yes no) // result: (FGE cc yes no)
for { for v.Op == OpPPC64FGreaterEqual {
v := b.Control
if v.Op != OpPPC64FGreaterEqual {
break
}
cc := v.Args[0] cc := v.Args[0]
b.Kind = BlockPPC64FGE b.Kind = BlockPPC64FGE
b.SetControl(cc) b.SetControl(cc)
@ -30943,8 +30786,6 @@ func rewriteBlockPPC64(b *Block) bool {
// cond: // cond:
// result: (NE (CMPWconst [0] cond) yes no) // result: (NE (CMPWconst [0] cond) yes no)
for { for {
v := b.Control
_ = v
cond := b.Control cond := b.Control
b.Kind = BlockPPC64NE b.Kind = BlockPPC64NE
v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags) v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
@ -30958,11 +30799,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (FlagEQ) yes no) // match: (LE (FlagEQ) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagEQ {
v := b.Control
if v.Op != OpPPC64FlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30971,11 +30808,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (FlagLT) yes no) // match: (LE (FlagLT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagLT {
v := b.Control
if v.Op != OpPPC64FlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30984,11 +30817,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (FlagGT) yes no) // match: (LE (FlagGT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagGT {
v := b.Control
if v.Op != OpPPC64FlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -30998,11 +30827,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (InvertFlags cmp) yes no) // match: (LE (InvertFlags cmp) yes no)
// cond: // cond:
// result: (GE cmp yes no) // result: (GE cmp yes no)
for { for v.Op == OpPPC64InvertFlags {
v := b.Control
if v.Op != OpPPC64InvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockPPC64GE b.Kind = BlockPPC64GE
b.SetControl(cmp) b.SetControl(cmp)
@ -31012,11 +30837,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (CMPconst [0] (ANDconst [c] x)) yes no) // match: (LE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (LE (ANDCCconst [c] x) yes no) // result: (LE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31037,11 +30858,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (LE (ANDCCconst [c] x) yes no) // result: (LE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31062,11 +30879,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (CMPconst [0] z:(AND x y)) yes no) // match: (LE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (LE (ANDCC x y) yes no) // result: (LE (ANDCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31090,11 +30903,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (CMPconst [0] z:(OR x y)) yes no) // match: (LE (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (LE (ORCC x y) yes no) // result: (LE (ORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31118,11 +30927,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LE (CMPconst [0] z:(XOR x y)) yes no) // match: (LE (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (LE (XORCC x y) yes no) // result: (LE (XORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31147,11 +30952,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (FlagEQ) yes no) // match: (LT (FlagEQ) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagEQ {
v := b.Control
if v.Op != OpPPC64FlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -31161,11 +30962,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (FlagLT) yes no) // match: (LT (FlagLT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagLT {
v := b.Control
if v.Op != OpPPC64FlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -31174,11 +30971,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (FlagGT) yes no) // match: (LT (FlagGT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagGT {
v := b.Control
if v.Op != OpPPC64FlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -31188,11 +30981,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (InvertFlags cmp) yes no) // match: (LT (InvertFlags cmp) yes no)
// cond: // cond:
// result: (GT cmp yes no) // result: (GT cmp yes no)
for { for v.Op == OpPPC64InvertFlags {
v := b.Control
if v.Op != OpPPC64InvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockPPC64GT b.Kind = BlockPPC64GT
b.SetControl(cmp) b.SetControl(cmp)
@ -31202,11 +30991,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (CMPconst [0] (ANDconst [c] x)) yes no) // match: (LT (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (LT (ANDCCconst [c] x) yes no) // result: (LT (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31227,11 +31012,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (LT (ANDCCconst [c] x) yes no) // result: (LT (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31252,11 +31033,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (CMPconst [0] z:(AND x y)) yes no) // match: (LT (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (LT (ANDCC x y) yes no) // result: (LT (ANDCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31280,11 +31057,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (CMPconst [0] z:(OR x y)) yes no) // match: (LT (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (LT (ORCC x y) yes no) // result: (LT (ORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31308,11 +31081,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (LT (CMPconst [0] z:(XOR x y)) yes no) // match: (LT (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (LT (XORCC x y) yes no) // result: (LT (XORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31337,11 +31106,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (Equal cc)) yes no) // match: (NE (CMPWconst [0] (Equal cc)) yes no)
// cond: // cond:
// result: (EQ cc yes no) // result: (EQ cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31358,11 +31123,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (NotEqual cc)) yes no) // match: (NE (CMPWconst [0] (NotEqual cc)) yes no)
// cond: // cond:
// result: (NE cc yes no) // result: (NE cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31379,11 +31140,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (LessThan cc)) yes no) // match: (NE (CMPWconst [0] (LessThan cc)) yes no)
// cond: // cond:
// result: (LT cc yes no) // result: (LT cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31400,11 +31157,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (LessEqual cc)) yes no) // match: (NE (CMPWconst [0] (LessEqual cc)) yes no)
// cond: // cond:
// result: (LE cc yes no) // result: (LE cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31421,11 +31174,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (GreaterThan cc)) yes no) // match: (NE (CMPWconst [0] (GreaterThan cc)) yes no)
// cond: // cond:
// result: (GT cc yes no) // result: (GT cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31442,11 +31191,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no) // match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no)
// cond: // cond:
// result: (GE cc yes no) // result: (GE cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31463,11 +31208,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (FLessThan cc)) yes no) // match: (NE (CMPWconst [0] (FLessThan cc)) yes no)
// cond: // cond:
// result: (FLT cc yes no) // result: (FLT cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31484,11 +31225,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (FLessEqual cc)) yes no) // match: (NE (CMPWconst [0] (FLessEqual cc)) yes no)
// cond: // cond:
// result: (FLE cc yes no) // result: (FLE cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31505,11 +31242,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no) // match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no)
// cond: // cond:
// result: (FGT cc yes no) // result: (FGT cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31526,11 +31259,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no) // match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no)
// cond: // cond:
// result: (FGE cc yes no) // result: (FGE cc yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31547,11 +31276,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no) // match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (NE (ANDCCconst [c] x) yes no) // result: (NE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31572,11 +31297,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (NE (ANDCCconst [c] x) yes no) // result: (NE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31597,11 +31318,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (FlagEQ) yes no) // match: (NE (FlagEQ) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpPPC64FlagEQ {
v := b.Control
if v.Op != OpPPC64FlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -31611,11 +31328,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (FlagLT) yes no) // match: (NE (FlagLT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagLT {
v := b.Control
if v.Op != OpPPC64FlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -31624,11 +31337,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (FlagGT) yes no) // match: (NE (FlagGT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpPPC64FlagGT {
v := b.Control
if v.Op != OpPPC64FlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -31637,11 +31346,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (InvertFlags cmp) yes no) // match: (NE (InvertFlags cmp) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpPPC64InvertFlags {
v := b.Control
if v.Op != OpPPC64InvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockPPC64NE b.Kind = BlockPPC64NE
b.SetControl(cmp) b.SetControl(cmp)
@ -31651,11 +31356,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no) // match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (NE (ANDCCconst [c] x) yes no) // result: (NE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31676,11 +31377,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no) // match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond: // cond:
// result: (NE (ANDCCconst [c] x) yes no) // result: (NE (ANDCCconst [c] x) yes no)
for { for v.Op == OpPPC64CMPWconst {
v := b.Control
if v.Op != OpPPC64CMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31701,11 +31398,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPconst [0] z:(AND x y)) yes no) // match: (NE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (NE (ANDCC x y) yes no) // result: (NE (ANDCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31729,11 +31422,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPconst [0] z:(OR x y)) yes no) // match: (NE (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (NE (ORCC x y) yes no) // result: (NE (ORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -31757,11 +31446,7 @@ func rewriteBlockPPC64(b *Block) bool {
// match: (NE (CMPconst [0] z:(XOR x y)) yes no) // match: (NE (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1 // cond: z.Uses == 1
// result: (NE (XORCC x y) yes no) // result: (NE (XORCC x y) yes no)
for { for v.Op == OpPPC64CMPconst {
v := b.Control
if v.Op != OpPPC64CMPconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }

View File

@ -40897,21 +40897,16 @@ func rewriteValueS390X_OpZeroExt8to64_0(v *Value) bool {
} }
func rewriteBlockS390X(b *Block) bool { func rewriteBlockS390X(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
case BlockS390XEQ: case BlockS390XEQ:
// match: (EQ (InvertFlags cmp) yes no) // match: (EQ (InvertFlags cmp) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpS390XInvertFlags {
v := b.Control
if v.Op != OpS390XInvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockS390XEQ b.Kind = BlockS390XEQ
b.SetControl(cmp) b.SetControl(cmp)
@ -40921,11 +40916,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (EQ (FlagEQ) yes no) // match: (EQ (FlagEQ) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagEQ {
v := b.Control
if v.Op != OpS390XFlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -40934,11 +40925,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (EQ (FlagLT) yes no) // match: (EQ (FlagLT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagLT {
v := b.Control
if v.Op != OpS390XFlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -40948,11 +40935,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (EQ (FlagGT) yes no) // match: (EQ (FlagGT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagGT {
v := b.Control
if v.Op != OpS390XFlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -40963,11 +40946,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GE (InvertFlags cmp) yes no) // match: (GE (InvertFlags cmp) yes no)
// cond: // cond:
// result: (LE cmp yes no) // result: (LE cmp yes no)
for { for v.Op == OpS390XInvertFlags {
v := b.Control
if v.Op != OpS390XInvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockS390XLE b.Kind = BlockS390XLE
b.SetControl(cmp) b.SetControl(cmp)
@ -40977,11 +40956,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GE (FlagEQ) yes no) // match: (GE (FlagEQ) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagEQ {
v := b.Control
if v.Op != OpS390XFlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -40990,11 +40965,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GE (FlagLT) yes no) // match: (GE (FlagLT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagLT {
v := b.Control
if v.Op != OpS390XFlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41004,11 +40975,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GE (FlagGT) yes no) // match: (GE (FlagGT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagGT {
v := b.Control
if v.Op != OpS390XFlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41018,11 +40985,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GT (InvertFlags cmp) yes no) // match: (GT (InvertFlags cmp) yes no)
// cond: // cond:
// result: (LT cmp yes no) // result: (LT cmp yes no)
for { for v.Op == OpS390XInvertFlags {
v := b.Control
if v.Op != OpS390XInvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockS390XLT b.Kind = BlockS390XLT
b.SetControl(cmp) b.SetControl(cmp)
@ -41032,11 +40995,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GT (FlagEQ) yes no) // match: (GT (FlagEQ) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagEQ {
v := b.Control
if v.Op != OpS390XFlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41046,11 +41005,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GT (FlagLT) yes no) // match: (GT (FlagLT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagLT {
v := b.Control
if v.Op != OpS390XFlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41060,11 +41015,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (GT (FlagGT) yes no) // match: (GT (FlagGT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagGT {
v := b.Control
if v.Op != OpS390XFlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41074,11 +41025,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDLT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDLT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (LT cmp yes no) // result: (LT cmp yes no)
for { for v.Op == OpS390XMOVDLT {
v := b.Control
if v.Op != OpS390XMOVDLT {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41102,11 +41049,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (LE cmp yes no) // result: (LE cmp yes no)
for { for v.Op == OpS390XMOVDLE {
v := b.Control
if v.Op != OpS390XMOVDLE {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41130,11 +41073,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (GT cmp yes no) // result: (GT cmp yes no)
for { for v.Op == OpS390XMOVDGT {
v := b.Control
if v.Op != OpS390XMOVDGT {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41158,11 +41097,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (GE cmp yes no) // result: (GE cmp yes no)
for { for v.Op == OpS390XMOVDGE {
v := b.Control
if v.Op != OpS390XMOVDGE {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41186,11 +41121,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpS390XMOVDEQ {
v := b.Control
if v.Op != OpS390XMOVDEQ {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41214,11 +41145,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpS390XMOVDNE {
v := b.Control
if v.Op != OpS390XMOVDNE {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41242,11 +41169,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (GTF cmp yes no) // result: (GTF cmp yes no)
for { for v.Op == OpS390XMOVDGTnoinv {
v := b.Control
if v.Op != OpS390XMOVDGTnoinv {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41270,11 +41193,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (If (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) // match: (If (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond: // cond:
// result: (GEF cmp yes no) // result: (GEF cmp yes no)
for { for v.Op == OpS390XMOVDGEnoinv {
v := b.Control
if v.Op != OpS390XMOVDGEnoinv {
break
}
cmp := v.Args[2] cmp := v.Args[2]
v_0 := v.Args[0] v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst { if v_0.Op != OpS390XMOVDconst {
@ -41299,8 +41218,6 @@ func rewriteBlockS390X(b *Block) bool {
// cond: // cond:
// result: (NE (CMPWconst [0] (MOVBZreg <typ.Bool> cond)) yes no) // result: (NE (CMPWconst [0] (MOVBZreg <typ.Bool> cond)) yes no)
for { for {
v := b.Control
_ = v
cond := b.Control cond := b.Control
b.Kind = BlockS390XNE b.Kind = BlockS390XNE
v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags) v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags)
@ -41316,11 +41233,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LE (InvertFlags cmp) yes no) // match: (LE (InvertFlags cmp) yes no)
// cond: // cond:
// result: (GE cmp yes no) // result: (GE cmp yes no)
for { for v.Op == OpS390XInvertFlags {
v := b.Control
if v.Op != OpS390XInvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockS390XGE b.Kind = BlockS390XGE
b.SetControl(cmp) b.SetControl(cmp)
@ -41330,11 +41243,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LE (FlagEQ) yes no) // match: (LE (FlagEQ) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagEQ {
v := b.Control
if v.Op != OpS390XFlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41343,11 +41252,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LE (FlagLT) yes no) // match: (LE (FlagLT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagLT {
v := b.Control
if v.Op != OpS390XFlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41356,11 +41261,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LE (FlagGT) yes no) // match: (LE (FlagGT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagGT {
v := b.Control
if v.Op != OpS390XFlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41371,11 +41272,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LT (InvertFlags cmp) yes no) // match: (LT (InvertFlags cmp) yes no)
// cond: // cond:
// result: (GT cmp yes no) // result: (GT cmp yes no)
for { for v.Op == OpS390XInvertFlags {
v := b.Control
if v.Op != OpS390XInvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockS390XGT b.Kind = BlockS390XGT
b.SetControl(cmp) b.SetControl(cmp)
@ -41385,11 +41282,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LT (FlagEQ) yes no) // match: (LT (FlagEQ) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagEQ {
v := b.Control
if v.Op != OpS390XFlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41399,11 +41292,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LT (FlagLT) yes no) // match: (LT (FlagLT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagLT {
v := b.Control
if v.Op != OpS390XFlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41412,11 +41301,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (LT (FlagGT) yes no) // match: (LT (FlagGT) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagGT {
v := b.Control
if v.Op != OpS390XFlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41427,11 +41312,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDLT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDLT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (LT cmp yes no) // result: (LT cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41462,11 +41343,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (LE cmp yes no) // result: (LE cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41497,11 +41374,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (GT cmp yes no) // result: (GT cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41532,11 +41405,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (GE cmp yes no) // result: (GE cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41567,11 +41436,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (EQ cmp yes no) // result: (EQ cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41602,11 +41467,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41637,11 +41498,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (GTF cmp yes no) // result: (GTF cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41672,11 +41529,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (CMPWconst [0] (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no) // match: (NE (CMPWconst [0] (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond: // cond:
// result: (GEF cmp yes no) // result: (GEF cmp yes no)
for { for v.Op == OpS390XCMPWconst {
v := b.Control
if v.Op != OpS390XCMPWconst {
break
}
if v.AuxInt != 0 { if v.AuxInt != 0 {
break break
} }
@ -41707,11 +41560,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (InvertFlags cmp) yes no) // match: (NE (InvertFlags cmp) yes no)
// cond: // cond:
// result: (NE cmp yes no) // result: (NE cmp yes no)
for { for v.Op == OpS390XInvertFlags {
v := b.Control
if v.Op != OpS390XInvertFlags {
break
}
cmp := v.Args[0] cmp := v.Args[0]
b.Kind = BlockS390XNE b.Kind = BlockS390XNE
b.SetControl(cmp) b.SetControl(cmp)
@ -41721,11 +41570,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (FlagEQ) yes no) // match: (NE (FlagEQ) yes no)
// cond: // cond:
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpS390XFlagEQ {
v := b.Control
if v.Op != OpS390XFlagEQ {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41735,11 +41580,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (FlagLT) yes no) // match: (NE (FlagLT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagLT {
v := b.Control
if v.Op != OpS390XFlagLT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil
@ -41748,11 +41589,7 @@ func rewriteBlockS390X(b *Block) bool {
// match: (NE (FlagGT) yes no) // match: (NE (FlagGT) yes no)
// cond: // cond:
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpS390XFlagGT {
v := b.Control
if v.Op != OpS390XFlagGT {
break
}
b.Kind = BlockFirst b.Kind = BlockFirst
b.SetControl(nil) b.SetControl(nil)
b.Aux = nil b.Aux = nil

View File

@ -6382,11 +6382,10 @@ func rewriteValueWasm_OpZeroExt8to64_0(v *Value) bool {
} }
func rewriteBlockWasm(b *Block) bool { func rewriteBlockWasm(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
} }
return false return false

View File

@ -493,11 +493,10 @@ func rewriteValuedec_OpStringPtr_0(v *Value) bool {
} }
func rewriteBlockdec(b *Block) bool { func rewriteBlockdec(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
} }
return false return false

View File

@ -2727,11 +2727,10 @@ func rewriteValuedec64_OpZeroExt8to64_0(v *Value) bool {
} }
func rewriteBlockdec64(b *Block) bool { func rewriteBlockdec64(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
} }
return false return false

View File

@ -271,11 +271,10 @@ func rewriteValuedecArgs_OpArg_10(v *Value) bool {
} }
func rewriteBlockdecArgs(b *Block) bool { func rewriteBlockdecArgs(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
} }
return false return false

View File

@ -32620,21 +32620,16 @@ func rewriteValuegeneric_OpZeroExt8to64_0(v *Value) bool {
} }
func rewriteBlockgeneric(b *Block) bool { func rewriteBlockgeneric(b *Block) bool {
config := b.Func.Config config := b.Func.Config
_ = config
fe := b.Func.fe
_ = fe
typ := &config.Types typ := &config.Types
_ = typ _ = typ
v := b.Control
_ = v
switch b.Kind { switch b.Kind {
case BlockIf: case BlockIf:
// match: (If (Not cond) yes no) // match: (If (Not cond) yes no)
// cond: // cond:
// result: (If cond no yes) // result: (If cond no yes)
for { for v.Op == OpNot {
v := b.Control
if v.Op != OpNot {
break
}
cond := v.Args[0] cond := v.Args[0]
b.Kind = BlockIf b.Kind = BlockIf
b.SetControl(cond) b.SetControl(cond)
@ -32645,11 +32640,7 @@ func rewriteBlockgeneric(b *Block) bool {
// match: (If (ConstBool [c]) yes no) // match: (If (ConstBool [c]) yes no)
// cond: c == 1 // cond: c == 1
// result: (First nil yes no) // result: (First nil yes no)
for { for v.Op == OpConstBool {
v := b.Control
if v.Op != OpConstBool {
break
}
c := v.AuxInt c := v.AuxInt
if !(c == 1) { if !(c == 1) {
break break
@ -32662,11 +32653,7 @@ func rewriteBlockgeneric(b *Block) bool {
// match: (If (ConstBool [c]) yes no) // match: (If (ConstBool [c]) yes no)
// cond: c == 0 // cond: c == 0
// result: (First nil no yes) // result: (First nil no yes)
for { for v.Op == OpConstBool {
v := b.Control
if v.Op != OpConstBool {
break
}
c := v.AuxInt c := v.AuxInt
if !(c == 0) { if !(c == 0) {
break break