canFail = false
fmt.Fprintf(buf, "for {\n")
- pos, matchCanFail := genMatch(buf, arch, match, rule.loc)
+ pos, _, matchCanFail := genMatch(buf, arch, match, rule.loc)
if pos == "" {
pos = "v.Pos"
}
// 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.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")
+ fmt.Fprintln(w, "v := b.Control")
+ fmt.Fprintln(w, "_ = v")
fmt.Fprintf(w, "switch b.Kind {\n")
ops = nil
for op := range blockrules {
fmt.Fprintf(w, "// cond: %s\n", cond)
fmt.Fprintf(w, "// result: %s\n", result)
- fmt.Fprintf(w, "for {\n")
-
_, _, _, aux, s := extract(match) // remove parens, then split
+ loopw := new(bytes.Buffer)
+
// check match of control value
pos := ""
+ checkOp := ""
if s[0] != "nil" {
- fmt.Fprintf(w, "v := b.Control\n")
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 {
- fmt.Fprintf(w, "_ = v\n") // in case we don't use v
- fmt.Fprintf(w, "%s := b.Control\n", s[0])
+ fmt.Fprintf(loopw, "%s := b.Control\n", s[0])
}
}
if aux != "" {
- fmt.Fprintf(w, "%s := b.Aux\n", aux)
+ fmt.Fprintf(loopw, "%s := b.Aux\n", aux)
}
if cond != "" {
- fmt.Fprintf(w, "if !(%s) {\nbreak\n}\n", cond)
+ fmt.Fprintf(loopw, "if !(%s) {\nbreak\n}\n", cond)
}
// Rule matches. Generate result.
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" {
- fmt.Fprintf(w, "b.SetControl(nil)\n")
+ fmt.Fprintf(loopw, "b.SetControl(nil)\n")
} else {
if 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 != "" {
- fmt.Fprintf(w, "b.Aux = %s\n", aux)
+ fmt.Fprintf(loopw, "b.Aux = %s\n", aux)
} else {
- fmt.Fprintln(w, "b.Aux = nil")
+ fmt.Fprintln(loopw, "b.Aux = nil")
}
succChanged := false
if succs[0] != newsuccs[1] || succs[1] != newsuccs[0] {
log.Fatalf("can only handle swapped successors in %s", rule)
}
- fmt.Fprintln(w, "b.swapSuccessors()")
+ fmt.Fprintln(loopw, "b.swapSuccessors()")
}
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")
}
// 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.
-func genMatch(w io.Writer, arch arch, match string, loc string) (string, bool) {
- return genMatch0(w, arch, match, "v", map[string]struct{}{}, true, loc)
+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{}{}, 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] != ')' {
panic("non-compound expr in genMatch0: " + match)
}
- pos := ""
- canFail := false
-
op, oparch, typ, auxint, aux, args := parseValue(match, arch, loc)
- // check op
- if !top {
- fmt.Fprintf(w, "if %s.Op != Op%s%s {\nbreak\n}\n", v, oparch, op.name)
- canFail = true
- }
+ checkOp = fmt.Sprintf("Op%s%s", oparch, op.name)
+
if op.faultOnNilArg0 || op.faultOnNilArg1 {
// Prefer the position of an instruction which could fault.
pos = v + ".Pos"
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)
+ 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 != "" {
// Keep the argument in preference to the parent, as the
// argument is normally earlier in program flow.
// in the program flow.
pos = argPos
}
- if argCanFail {
- canFail = true
- }
+ canFail = true
}
if op.argLength == -1 {
fmt.Fprintf(w, "if len(%s.Args) != %d {\nbreak\n}\n", v, len(args))
canFail = true
}
- return pos, canFail
+ return pos, checkOp, canFail
}
func genResult(w io.Writer, arch arch, result string, loc string, pos string) {
}
func rewriteBlock386(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case Block386EQ:
// match: (EQ (InvertFlags cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386EQ
b.SetControl(cmp)
// match: (EQ (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (InvertFlags cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386LE
b.SetControl(cmp)
// match: (GE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (InvertFlags cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386LT
b.SetControl(cmp)
// match: (GT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (If (SETL cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETL {
- break
- }
+ for v.Op == Op386SETL {
cmp := v.Args[0]
b.Kind = Block386LT
b.SetControl(cmp)
// match: (If (SETLE cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETLE {
- break
- }
+ for v.Op == Op386SETLE {
cmp := v.Args[0]
b.Kind = Block386LE
b.SetControl(cmp)
// match: (If (SETG cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETG {
- break
- }
+ for v.Op == Op386SETG {
cmp := v.Args[0]
b.Kind = Block386GT
b.SetControl(cmp)
// match: (If (SETGE cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETGE {
- break
- }
+ for v.Op == Op386SETGE {
cmp := v.Args[0]
b.Kind = Block386GE
b.SetControl(cmp)
// match: (If (SETEQ cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETEQ {
- break
- }
+ for v.Op == Op386SETEQ {
cmp := v.Args[0]
b.Kind = Block386EQ
b.SetControl(cmp)
// match: (If (SETNE cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETNE {
- break
- }
+ for v.Op == Op386SETNE {
cmp := v.Args[0]
b.Kind = Block386NE
b.SetControl(cmp)
// match: (If (SETB cmp) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETB {
- break
- }
+ for v.Op == Op386SETB {
cmp := v.Args[0]
b.Kind = Block386ULT
b.SetControl(cmp)
// match: (If (SETBE cmp) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETBE {
- break
- }
+ for v.Op == Op386SETBE {
cmp := v.Args[0]
b.Kind = Block386ULE
b.SetControl(cmp)
// match: (If (SETA cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETA {
- break
- }
+ for v.Op == Op386SETA {
cmp := v.Args[0]
b.Kind = Block386UGT
b.SetControl(cmp)
// match: (If (SETAE cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETAE {
- break
- }
+ for v.Op == Op386SETAE {
cmp := v.Args[0]
b.Kind = Block386UGE
b.SetControl(cmp)
// match: (If (SETO cmp) yes no)
// cond:
// result: (OS cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETO {
- break
- }
+ for v.Op == Op386SETO {
cmp := v.Args[0]
b.Kind = Block386OS
b.SetControl(cmp)
// match: (If (SETGF cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETGF {
- break
- }
+ for v.Op == Op386SETGF {
cmp := v.Args[0]
b.Kind = Block386UGT
b.SetControl(cmp)
// match: (If (SETGEF cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETGEF {
- break
- }
+ for v.Op == Op386SETGEF {
cmp := v.Args[0]
b.Kind = Block386UGE
b.SetControl(cmp)
// match: (If (SETEQF cmp) yes no)
// cond:
// result: (EQF cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETEQF {
- break
- }
+ for v.Op == Op386SETEQF {
cmp := v.Args[0]
b.Kind = Block386EQF
b.SetControl(cmp)
// match: (If (SETNEF cmp) yes no)
// cond:
// result: (NEF cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386SETNEF {
- break
- }
+ for v.Op == Op386SETNEF {
cmp := v.Args[0]
b.Kind = Block386NEF
b.SetControl(cmp)
// cond:
// result: (NE (TESTB cond cond) yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = Block386NE
v0 := b.NewValue0(v.Pos, Op386TESTB, types.TypeFlags)
// match: (LE (InvertFlags cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386GE
b.SetControl(cmp)
// match: (LE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (InvertFlags cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386GT
b.SetControl(cmp)
// match: (LT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETL {
// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETL {
// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETLE {
// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETLE {
// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETG {
// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETG {
// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETGE {
// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETGE {
// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETEQ {
// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETEQ {
// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETNE {
// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETNE {
// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETB {
// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETB {
// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETBE {
// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETBE {
// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETA {
// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETA {
// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETAE {
// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETAE {
// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
// cond:
// result: (OS cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETO {
// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
// cond:
// result: (OS cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETO {
// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETGF {
// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETGF {
// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETGEF {
// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETGEF {
// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
// cond:
// result: (EQF cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETEQF {
// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
// cond:
// result: (EQF cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETEQF {
// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
// cond:
// result: (NEF cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETNEF {
// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
// cond:
// result: (NEF cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386TESTB {
- break
- }
+ for v.Op == Op386TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != Op386SETNEF {
// match: (NE (InvertFlags cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386NE
b.SetControl(cmp)
// match: (NE (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (InvertFlags cmp) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386ULE
b.SetControl(cmp)
// match: (UGE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (InvertFlags cmp) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386ULT
b.SetControl(cmp)
// match: (UGT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (InvertFlags cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386UGE
b.SetControl(cmp)
// match: (ULE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (InvertFlags cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != Op386InvertFlags {
- break
- }
+ for v.Op == Op386InvertFlags {
cmp := v.Args[0]
b.Kind = Block386UGT
b.SetControl(cmp)
// match: (ULT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagEQ {
- break
- }
+ for v.Op == Op386FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_ULT {
- break
- }
+ for v.Op == Op386FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagLT_UGT {
- break
- }
+ for v.Op == Op386FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_ULT {
- break
- }
+ for v.Op == Op386FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != Op386FlagGT_UGT {
- break
- }
+ for v.Op == Op386FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
}
func rewriteBlock386splitload(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
}
return false
}
func rewriteBlockAMD64(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockAMD64EQ:
// match: (EQ (TESTL (SHLL (MOVLconst [1]) x) y))
// cond: !config.nacl
// result: (UGE (BTL x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
y := v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SHLL {
// match: (EQ (TESTL y (SHLL (MOVLconst [1]) x)))
// cond: !config.nacl
// result: (UGE (BTL x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
y := v.Args[0]
v_1 := v.Args[1]
// match: (EQ (TESTQ (SHLQ (MOVQconst [1]) x) y))
// cond: !config.nacl
// result: (UGE (BTQ x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
y := v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SHLQ {
// match: (EQ (TESTQ y (SHLQ (MOVQconst [1]) x)))
// cond: !config.nacl
// result: (UGE (BTQ x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
y := v.Args[0]
v_1 := v.Args[1]
// match: (EQ (TESTLconst [c] x))
// cond: isUint32PowerOfTwo(c) && !config.nacl
// result: (UGE (BTLconst [log2uint32(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTLconst {
- break
- }
+ for v.Op == OpAMD64TESTLconst {
c := v.AuxInt
x := v.Args[0]
if !(isUint32PowerOfTwo(c) && !config.nacl) {
// match: (EQ (TESTQconst [c] x))
// cond: isUint64PowerOfTwo(c) && !config.nacl
// result: (UGE (BTQconst [log2(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQconst {
- break
- }
+ for v.Op == OpAMD64TESTQconst {
c := v.AuxInt
x := v.Args[0]
if !(isUint64PowerOfTwo(c) && !config.nacl) {
// match: (EQ (TESTQ (MOVQconst [c]) x))
// cond: isUint64PowerOfTwo(c) && !config.nacl
// result: (UGE (BTQconst [log2(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
x := v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64MOVQconst {
// match: (EQ (TESTQ x (MOVQconst [c])))
// cond: isUint64PowerOfTwo(c) && !config.nacl
// result: (UGE (BTQconst [log2(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
x := v.Args[0]
v_1 := v.Args[1]
// match: (EQ (TESTQ z1:(SHLQconst [63] (SHRQconst [63] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHLQconst {
// match: (EQ (TESTQ z2 z1:(SHLQconst [63] (SHRQconst [63] x))))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (EQ (TESTL z1:(SHLLconst [31] (SHRQconst [31] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHLLconst {
// match: (EQ (TESTL z2 z1:(SHLLconst [31] (SHRQconst [31] x))))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (EQ (TESTQ z1:(SHRQconst [63] (SHLQconst [63] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRQconst {
// match: (EQ (TESTQ z2 z1:(SHRQconst [63] (SHLQconst [63] x))))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (EQ (TESTL z1:(SHRLconst [31] (SHLLconst [31] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTLconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRLconst {
// match: (EQ (TESTL z2 z1:(SHRLconst [31] (SHLLconst [31] x))))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTLconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (EQ (TESTQ z1:(SHRQconst [63] x) z2))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRQconst {
// match: (EQ (TESTQ z2 z1:(SHRQconst [63] x)))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (EQ (TESTL z1:(SHRLconst [31] x) z2))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTLconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRLconst {
// match: (EQ (TESTL z2 z1:(SHRLconst [31] x)))
// cond: z1==z2 && !config.nacl
// result: (UGE (BTLconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (EQ (InvertFlags cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64EQ
b.SetControl(cmp)
// match: (EQ (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (InvertFlags cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64LE
b.SetControl(cmp)
// match: (GE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (InvertFlags cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64LT
b.SetControl(cmp)
// match: (GT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (If (SETL cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETL {
- break
- }
+ for v.Op == OpAMD64SETL {
cmp := v.Args[0]
b.Kind = BlockAMD64LT
b.SetControl(cmp)
// match: (If (SETLE cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETLE {
- break
- }
+ for v.Op == OpAMD64SETLE {
cmp := v.Args[0]
b.Kind = BlockAMD64LE
b.SetControl(cmp)
// match: (If (SETG cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETG {
- break
- }
+ for v.Op == OpAMD64SETG {
cmp := v.Args[0]
b.Kind = BlockAMD64GT
b.SetControl(cmp)
// match: (If (SETGE cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETGE {
- break
- }
+ for v.Op == OpAMD64SETGE {
cmp := v.Args[0]
b.Kind = BlockAMD64GE
b.SetControl(cmp)
// match: (If (SETEQ cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETEQ {
- break
- }
+ for v.Op == OpAMD64SETEQ {
cmp := v.Args[0]
b.Kind = BlockAMD64EQ
b.SetControl(cmp)
// match: (If (SETNE cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETNE {
- break
- }
+ for v.Op == OpAMD64SETNE {
cmp := v.Args[0]
b.Kind = BlockAMD64NE
b.SetControl(cmp)
// match: (If (SETB cmp) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETB {
- break
- }
+ for v.Op == OpAMD64SETB {
cmp := v.Args[0]
b.Kind = BlockAMD64ULT
b.SetControl(cmp)
// match: (If (SETBE cmp) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETBE {
- break
- }
+ for v.Op == OpAMD64SETBE {
cmp := v.Args[0]
b.Kind = BlockAMD64ULE
b.SetControl(cmp)
// match: (If (SETA cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETA {
- break
- }
+ for v.Op == OpAMD64SETA {
cmp := v.Args[0]
b.Kind = BlockAMD64UGT
b.SetControl(cmp)
// match: (If (SETAE cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETAE {
- break
- }
+ for v.Op == OpAMD64SETAE {
cmp := v.Args[0]
b.Kind = BlockAMD64UGE
b.SetControl(cmp)
// match: (If (SETO cmp) yes no)
// cond:
// result: (OS cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETO {
- break
- }
+ for v.Op == OpAMD64SETO {
cmp := v.Args[0]
b.Kind = BlockAMD64OS
b.SetControl(cmp)
// match: (If (SETGF cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETGF {
- break
- }
+ for v.Op == OpAMD64SETGF {
cmp := v.Args[0]
b.Kind = BlockAMD64UGT
b.SetControl(cmp)
// match: (If (SETGEF cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETGEF {
- break
- }
+ for v.Op == OpAMD64SETGEF {
cmp := v.Args[0]
b.Kind = BlockAMD64UGE
b.SetControl(cmp)
// match: (If (SETEQF cmp) yes no)
// cond:
// result: (EQF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETEQF {
- break
- }
+ for v.Op == OpAMD64SETEQF {
cmp := v.Args[0]
b.Kind = BlockAMD64EQF
b.SetControl(cmp)
// match: (If (SETNEF cmp) yes no)
// cond:
// result: (NEF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64SETNEF {
- break
- }
+ for v.Op == OpAMD64SETNEF {
cmp := v.Args[0]
b.Kind = BlockAMD64NEF
b.SetControl(cmp)
// cond:
// result: (NE (TESTB cond cond) yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockAMD64NE
v0 := b.NewValue0(v.Pos, OpAMD64TESTB, types.TypeFlags)
// match: (LE (InvertFlags cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64GE
b.SetControl(cmp)
// match: (LE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (InvertFlags cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64GT
b.SetControl(cmp)
// match: (LT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETL {
// match: (NE (TESTB (SETL cmp) (SETL cmp)) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETL {
// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETLE {
// match: (NE (TESTB (SETLE cmp) (SETLE cmp)) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETLE {
// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETG {
// match: (NE (TESTB (SETG cmp) (SETG cmp)) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETG {
// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETGE {
// match: (NE (TESTB (SETGE cmp) (SETGE cmp)) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETGE {
// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETEQ {
// match: (NE (TESTB (SETEQ cmp) (SETEQ cmp)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETEQ {
// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETNE {
// match: (NE (TESTB (SETNE cmp) (SETNE cmp)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETNE {
// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETB {
// match: (NE (TESTB (SETB cmp) (SETB cmp)) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETB {
// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETBE {
// match: (NE (TESTB (SETBE cmp) (SETBE cmp)) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETBE {
// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETA {
// match: (NE (TESTB (SETA cmp) (SETA cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETA {
// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETAE {
// match: (NE (TESTB (SETAE cmp) (SETAE cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETAE {
// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
// cond:
// result: (OS cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETO {
// match: (NE (TESTB (SETO cmp) (SETO cmp)) yes no)
// cond:
// result: (OS cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETO {
// match: (NE (TESTL (SHLL (MOVLconst [1]) x) y))
// cond: !config.nacl
// result: (ULT (BTL x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
y := v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SHLL {
// match: (NE (TESTL y (SHLL (MOVLconst [1]) x)))
// cond: !config.nacl
// result: (ULT (BTL x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
y := v.Args[0]
v_1 := v.Args[1]
// match: (NE (TESTQ (SHLQ (MOVQconst [1]) x) y))
// cond: !config.nacl
// result: (ULT (BTQ x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
y := v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SHLQ {
// match: (NE (TESTQ y (SHLQ (MOVQconst [1]) x)))
// cond: !config.nacl
// result: (ULT (BTQ x y))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
y := v.Args[0]
v_1 := v.Args[1]
// match: (NE (TESTLconst [c] x))
// cond: isUint32PowerOfTwo(c) && !config.nacl
// result: (ULT (BTLconst [log2uint32(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTLconst {
- break
- }
+ for v.Op == OpAMD64TESTLconst {
c := v.AuxInt
x := v.Args[0]
if !(isUint32PowerOfTwo(c) && !config.nacl) {
// match: (NE (TESTQconst [c] x))
// cond: isUint64PowerOfTwo(c) && !config.nacl
// result: (ULT (BTQconst [log2(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQconst {
- break
- }
+ for v.Op == OpAMD64TESTQconst {
c := v.AuxInt
x := v.Args[0]
if !(isUint64PowerOfTwo(c) && !config.nacl) {
// match: (NE (TESTQ (MOVQconst [c]) x))
// cond: isUint64PowerOfTwo(c) && !config.nacl
// result: (ULT (BTQconst [log2(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
x := v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64MOVQconst {
// match: (NE (TESTQ x (MOVQconst [c])))
// cond: isUint64PowerOfTwo(c) && !config.nacl
// result: (ULT (BTQconst [log2(c)] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
x := v.Args[0]
v_1 := v.Args[1]
// match: (NE (TESTQ z1:(SHLQconst [63] (SHRQconst [63] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHLQconst {
// match: (NE (TESTQ z2 z1:(SHLQconst [63] (SHRQconst [63] x))))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (NE (TESTL z1:(SHLLconst [31] (SHRQconst [31] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHLLconst {
// match: (NE (TESTL z2 z1:(SHLLconst [31] (SHRQconst [31] x))))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (NE (TESTQ z1:(SHRQconst [63] (SHLQconst [63] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRQconst {
// match: (NE (TESTQ z2 z1:(SHRQconst [63] (SHLQconst [63] x))))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (NE (TESTL z1:(SHRLconst [31] (SHLLconst [31] x)) z2))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTLconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRLconst {
// match: (NE (TESTL z2 z1:(SHRLconst [31] (SHLLconst [31] x))))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTLconst [0] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (NE (TESTQ z1:(SHRQconst [63] x) z2))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRQconst {
// match: (NE (TESTQ z2 z1:(SHRQconst [63] x)))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTQconst [63] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTQ {
- break
- }
+ for v.Op == OpAMD64TESTQ {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (NE (TESTL z1:(SHRLconst [31] x) z2))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTLconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
z2 := v.Args[1]
z1 := v.Args[0]
if z1.Op != OpAMD64SHRLconst {
// match: (NE (TESTL z2 z1:(SHRLconst [31] x)))
// cond: z1==z2 && !config.nacl
// result: (ULT (BTLconst [31] x))
- for {
- v := b.Control
- if v.Op != OpAMD64TESTL {
- break
- }
+ for v.Op == OpAMD64TESTL {
_ = v.Args[1]
z2 := v.Args[0]
z1 := v.Args[1]
// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETGF {
// match: (NE (TESTB (SETGF cmp) (SETGF cmp)) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETGF {
// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETGEF {
// match: (NE (TESTB (SETGEF cmp) (SETGEF cmp)) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETGEF {
// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
// cond:
// result: (EQF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETEQF {
// match: (NE (TESTB (SETEQF cmp) (SETEQF cmp)) yes no)
// cond:
// result: (EQF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETEQF {
// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
// cond:
// result: (NEF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETNEF {
// match: (NE (TESTB (SETNEF cmp) (SETNEF cmp)) yes no)
// cond:
// result: (NEF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64TESTB {
- break
- }
+ for v.Op == OpAMD64TESTB {
_ = v.Args[1]
v_0 := v.Args[0]
if v_0.Op != OpAMD64SETNEF {
// match: (NE (InvertFlags cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64NE
b.SetControl(cmp)
// match: (NE (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (InvertFlags cmp) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64ULE
b.SetControl(cmp)
// match: (UGE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (InvertFlags cmp) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64ULT
b.SetControl(cmp)
// match: (UGT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (InvertFlags cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64UGE
b.SetControl(cmp)
// match: (ULE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (InvertFlags cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64InvertFlags {
- break
- }
+ for v.Op == OpAMD64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockAMD64UGT
b.SetControl(cmp)
// match: (ULT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagEQ {
- break
- }
+ for v.Op == OpAMD64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagLT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_ULT {
- break
- }
+ for v.Op == OpAMD64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpAMD64FlagGT_UGT {
- break
- }
+ for v.Op == OpAMD64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
}
func rewriteBlockAMD64splitload(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
}
return false
}
func rewriteBlockARM(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockARMEQ:
// match: (EQ (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (InvertFlags cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMEQ
b.SetControl(cmp)
// match: (EQ (CMPconst [0] l:(SUB x y)) yes no)
// cond: l.Uses==1
// result: (EQ (CMP x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(MULS x y a)) yes no)
// cond: l.Uses==1
// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBconst [c] x)) yes no)
// cond: l.Uses==1
// result: (EQ (CMPconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (CMPshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (CMPshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (CMPshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (CMPshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (CMPshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (CMPshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADD x y)) yes no)
// cond: l.Uses==1
// result: (EQ (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(MULA x y a)) yes no)
// cond: l.Uses==1
// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (EQ (CMNconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (CMNshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (CMNshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (CMNshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (CMNshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (CMNshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (CMNshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(AND x y)) yes no)
// cond: l.Uses==1
// result: (EQ (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (EQ (TSTconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (TSTshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (TSTshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (TSTshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (TSTshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (TSTshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (TSTshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XOR x y)) yes no)
// cond: l.Uses==1
// result: (EQ (TEQ x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORconst [c] x)) yes no)
// cond: l.Uses==1
// result: (EQ (TEQconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (TEQshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (TEQshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (EQ (TEQshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (TEQshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (TEQshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (EQ (TEQshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (InvertFlags cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMLE
b.SetControl(cmp)
// match: (GE (CMPconst [0] l:(SUB x y)) yes no)
// cond: l.Uses==1
// result: (GE (CMP x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(MULS x y a)) yes no)
// cond: l.Uses==1
// result: (GE (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GE (CMPconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (CMPshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (CMPshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (CMPshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (CMPshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (CMPshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (CMPshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADD x y)) yes no)
// cond: l.Uses==1
// result: (GE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(MULA x y a)) yes no)
// cond: l.Uses==1
// result: (GE (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GE (CMNconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (CMNshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (CMNshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (CMNshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (CMNshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (CMNshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (CMNshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(AND x y)) yes no)
// cond: l.Uses==1
// result: (GE (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GE (TSTconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (TSTshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (TSTshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (TSTshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (TSTshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (TSTshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (TSTshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XOR x y)) yes no)
// cond: l.Uses==1
// result: (GE (TEQ x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GE (TEQconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (TEQshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (TEQshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GE (TEQshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (TEQshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (TEQshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GE (TEQshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (InvertFlags cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMLT
b.SetControl(cmp)
// match: (GT (CMPconst [0] l:(SUB x y)) yes no)
// cond: l.Uses==1
// result: (GT (CMP x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(MULS x y a)) yes no)
// cond: l.Uses==1
// result: (GT (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GT (CMPconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (CMPshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (CMPshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (CMPshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (CMPshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (CMPshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (CMPshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADD x y)) yes no)
// cond: l.Uses==1
// result: (GT (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GT (CMNconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (CMNshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (CMNshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (CMNshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (CMNshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (CMNshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (CMNshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(AND x y)) yes no)
// cond: l.Uses==1
// result: (GT (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(MULA x y a)) yes no)
// cond: l.Uses==1
// result: (GT (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GT (TSTconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (TSTshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (TSTshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (TSTshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (TSTshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (TSTshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (TSTshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XOR x y)) yes no)
// cond: l.Uses==1
// result: (GT (TEQ x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORconst [c] x)) yes no)
// cond: l.Uses==1
// result: (GT (TEQconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (TEQshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (TEQshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (GT (TEQshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (TEQshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (TEQshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (GT (TEQshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (If (Equal cc) yes no)
// cond:
// result: (EQ cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMEqual {
- break
- }
+ for v.Op == OpARMEqual {
cc := v.Args[0]
b.Kind = BlockARMEQ
b.SetControl(cc)
// match: (If (NotEqual cc) yes no)
// cond:
// result: (NE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMNotEqual {
- break
- }
+ for v.Op == OpARMNotEqual {
cc := v.Args[0]
b.Kind = BlockARMNE
b.SetControl(cc)
// match: (If (LessThan cc) yes no)
// cond:
// result: (LT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMLessThan {
- break
- }
+ for v.Op == OpARMLessThan {
cc := v.Args[0]
b.Kind = BlockARMLT
b.SetControl(cc)
// match: (If (LessThanU cc) yes no)
// cond:
// result: (ULT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMLessThanU {
- break
- }
+ for v.Op == OpARMLessThanU {
cc := v.Args[0]
b.Kind = BlockARMULT
b.SetControl(cc)
// match: (If (LessEqual cc) yes no)
// cond:
// result: (LE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMLessEqual {
- break
- }
+ for v.Op == OpARMLessEqual {
cc := v.Args[0]
b.Kind = BlockARMLE
b.SetControl(cc)
// match: (If (LessEqualU cc) yes no)
// cond:
// result: (ULE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMLessEqualU {
- break
- }
+ for v.Op == OpARMLessEqualU {
cc := v.Args[0]
b.Kind = BlockARMULE
b.SetControl(cc)
// match: (If (GreaterThan cc) yes no)
// cond:
// result: (GT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMGreaterThan {
- break
- }
+ for v.Op == OpARMGreaterThan {
cc := v.Args[0]
b.Kind = BlockARMGT
b.SetControl(cc)
// match: (If (GreaterThanU cc) yes no)
// cond:
// result: (UGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMGreaterThanU {
- break
- }
+ for v.Op == OpARMGreaterThanU {
cc := v.Args[0]
b.Kind = BlockARMUGT
b.SetControl(cc)
// match: (If (GreaterEqual cc) yes no)
// cond:
// result: (GE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMGreaterEqual {
- break
- }
+ for v.Op == OpARMGreaterEqual {
cc := v.Args[0]
b.Kind = BlockARMGE
b.SetControl(cc)
// match: (If (GreaterEqualU cc) yes no)
// cond:
// result: (UGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMGreaterEqualU {
- break
- }
+ for v.Op == OpARMGreaterEqualU {
cc := v.Args[0]
b.Kind = BlockARMUGE
b.SetControl(cc)
// cond:
// result: (NE (CMPconst [0] cond) yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockARMNE
v0 := b.NewValue0(v.Pos, OpARMCMPconst, types.TypeFlags)
// match: (LE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (InvertFlags cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMGE
b.SetControl(cmp)
// match: (LE (CMPconst [0] l:(SUB x y)) yes no)
// cond: l.Uses==1
// result: (LE (CMP x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(MULS x y a)) yes no)
// cond: l.Uses==1
// result: (LE (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LE (CMPconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (CMPshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (CMPshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (CMPshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (CMPshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (CMPshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (CMPshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADD x y)) yes no)
// cond: l.Uses==1
// result: (LE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(MULA x y a)) yes no)
// cond: l.Uses==1
// result: (LE (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LE (CMNconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (CMNshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (CMNshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (CMNshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (CMNshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (CMNshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (CMNshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(AND x y)) yes no)
// cond: l.Uses==1
// result: (LE (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LE (TSTconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (TSTshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (TSTshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (TSTshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (TSTshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (TSTshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (TSTshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XOR x y)) yes no)
// cond: l.Uses==1
// result: (LE (TEQ x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LE (TEQconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (TEQshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (TEQshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LE (TEQshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (TEQshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (TEQshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LE (TEQshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (InvertFlags cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMGT
b.SetControl(cmp)
// match: (LT (CMPconst [0] l:(SUB x y)) yes no)
// cond: l.Uses==1
// result: (LT (CMP x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(MULS x y a)) yes no)
// cond: l.Uses==1
// result: (LT (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LT (CMPconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (CMPshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (CMPshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (CMPshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (CMPshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (CMPshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (CMPshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADD x y)) yes no)
// cond: l.Uses==1
// result: (LT (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(MULA x y a)) yes no)
// cond: l.Uses==1
// result: (LT (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LT (CMNconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (CMNshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (CMNshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (CMNshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (CMNshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (CMNshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (CMNshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(AND x y)) yes no)
// cond: l.Uses==1
// result: (LT (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LT (TSTconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (TSTshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (TSTshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (TSTshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (TSTshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (TSTshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (TSTshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XOR x y)) yes no)
// cond: l.Uses==1
// result: (LT (TEQ x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORconst [c] x)) yes no)
// cond: l.Uses==1
// result: (LT (TEQconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (TEQshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (TEQshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (LT (TEQshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (TEQshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (TEQshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (LT (TEQshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (Equal cc)) yes no)
// cond:
// result: (EQ cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (NotEqual cc)) yes no)
// cond:
// result: (NE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (LessThan cc)) yes no)
// cond:
// result: (LT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (LessThanU cc)) yes no)
// cond:
// result: (ULT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (LessEqual cc)) yes no)
// cond:
// result: (LE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (LessEqualU cc)) yes no)
// cond:
// result: (ULE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (GreaterThan cc)) yes no)
// cond:
// result: (GT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (GreaterThanU cc)) yes no)
// cond:
// result: (UGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (GreaterEqual cc)) yes no)
// cond:
// result: (GE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (GreaterEqualU cc)) yes no)
// cond:
// result: (UGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (InvertFlags cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMNE
b.SetControl(cmp)
// match: (NE (CMPconst [0] l:(SUB x y)) yes no)
// cond: l.Uses==1
// result: (NE (CMP x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(MULS x y a)) yes no)
// cond: l.Uses==1
// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBconst [c] x)) yes no)
// cond: l.Uses==1
// result: (NE (CMPconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (CMPshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (CMPshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (CMPshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (CMPshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (CMPshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(SUBshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (CMPshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADD x y)) yes no)
// cond: l.Uses==1
// result: (NE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(MULA x y a)) yes no)
// cond: l.Uses==1
// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (NE (CMNconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (CMNshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (CMNshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (CMNshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (CMNshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (CMNshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ADDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (CMNshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(AND x y)) yes no)
// cond: l.Uses==1
// result: (NE (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDconst [c] x)) yes no)
// cond: l.Uses==1
// result: (NE (TSTconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (TSTshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (TSTshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (TSTshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (TSTshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (TSTshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(ANDshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (TSTshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XOR x y)) yes no)
// cond: l.Uses==1
// result: (NE (TEQ x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORconst [c] x)) yes no)
// cond: l.Uses==1
// result: (NE (TEQconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORshiftLL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (TEQshiftLL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORshiftRL x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (TEQshiftRL x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORshiftRA x y [c])) yes no)
// cond: l.Uses==1
// result: (NE (TEQshiftRA x y [c]) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORshiftLLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (TEQshiftLLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORshiftRLreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (TEQshiftRLreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] l:(XORshiftRAreg x y z)) yes no)
// cond: l.Uses==1
// result: (NE (TEQshiftRAreg x y z) yes no)
- for {
- v := b.Control
- if v.Op != OpARMCMPconst {
- break
- }
+ for v.Op == OpARMCMPconst {
if v.AuxInt != 0 {
break
}
// match: (UGE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (InvertFlags cmp) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMULE
b.SetControl(cmp)
// match: (UGT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (InvertFlags cmp) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMULT
b.SetControl(cmp)
// match: (ULE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (InvertFlags cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMUGE
b.SetControl(cmp)
// match: (ULT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagEQ {
- break
- }
+ for v.Op == OpARMFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_ULT {
- break
- }
+ for v.Op == OpARMFlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagLT_UGT {
- break
- }
+ for v.Op == OpARMFlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_ULT {
- break
- }
+ for v.Op == OpARMFlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARMFlagGT_UGT {
- break
- }
+ for v.Op == OpARMFlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (InvertFlags cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARMInvertFlags {
- break
- }
+ for v.Op == OpARMInvertFlags {
cmp := v.Args[0]
b.Kind = BlockARMUGT
b.SetControl(cmp)
}
func rewriteBlockARM64(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockARM64EQ:
// match: (EQ (CMPWconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (EQ (TSTWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (TSTW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (EQ (TSTconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (EQ (CMNconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (EQ (CMNWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMP x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (EQ (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMP {
- break
- }
+ for v.Op == OpARM64CMP {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (EQ (CMPW x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (EQ (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPW {
- break
- }
+ for v.Op == OpARM64CMPW {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (EQ (CMPconst [0] x) yes no)
// cond:
// result: (Z x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] x) yes no)
// cond:
// result: (ZW x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(MADD a x y)) yes no)
// cond: z.Uses==1
// result: (EQ (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(MSUB a x y)) yes no)
// cond: z.Uses==1
// result: (EQ (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] z:(MADDW a x y)) yes no)
// cond: z.Uses==1
// result: (EQ (CMNW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] z:(MSUBW a x y)) yes no)
// cond: z.Uses==1
// result: (EQ (CMPW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (TSTconst [c] x) yes no)
// cond: oneBit(c)
// result: (TBZ {ntz(c)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64TSTconst {
- break
- }
+ for v.Op == OpARM64TSTconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(c)) {
// match: (EQ (TSTWconst [c] x) yes no)
// cond: oneBit(int64(uint32(c)))
// result: (TBZ {ntz(int64(uint32(c)))} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64TSTWconst {
- break
- }
+ for v.Op == OpARM64TSTWconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(int64(uint32(c)))) {
// match: (EQ (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (InvertFlags cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64EQ
b.SetControl(cmp)
// match: (FGE (InvertFlags cmp) yes no)
// cond:
// result: (FLE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64FLE
b.SetControl(cmp)
// match: (FGT (InvertFlags cmp) yes no)
// cond:
// result: (FLT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64FLT
b.SetControl(cmp)
// match: (FLE (InvertFlags cmp) yes no)
// cond:
// result: (FGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64FGE
b.SetControl(cmp)
// match: (FLT (InvertFlags cmp) yes no)
// cond:
// result: (FGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64FGT
b.SetControl(cmp)
// match: (GE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GE (TSTWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (GE (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (GE (TSTW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GE (TSTconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GE (CMNconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GE (CMNWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (GE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (GE (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMP x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (GE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMP {
- break
- }
+ for v.Op == OpARM64CMP {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (GE (CMPW x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (GE (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPW {
- break
- }
+ for v.Op == OpARM64CMPW {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (GE (CMPconst [0] z:(MADD a x y)) yes no)
// cond: z.Uses==1
// result: (GE (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] z:(MSUB a x y)) yes no)
// cond: z.Uses==1
// result: (GE (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] z:(MADDW a x y)) yes no)
// cond: z.Uses==1
// result: (GE (CMNW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] z:(MSUBW a x y)) yes no)
// cond: z.Uses==1
// result: (GE (CMPW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] x) yes no)
// cond:
// result: (TBZ {int64(31)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] x) yes no)
// cond:
// result: (TBZ {int64(63)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (InvertFlags cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64LE
b.SetControl(cmp)
// match: (GT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GT (TSTWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (GT (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPWconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (GT (TSTW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GT (TSTconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GT (CMNconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (GT (CMNWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (GT (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPWconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (GT (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMP x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (GT (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMP {
- break
- }
+ for v.Op == OpARM64CMP {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (GT (CMPW x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (GT (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPW {
- break
- }
+ for v.Op == OpARM64CMPW {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (GT (CMPconst [0] z:(MADD a x y)) yes no)
// cond: z.Uses==1
// result: (GT (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] z:(MSUB a x y)) yes no)
// cond: z.Uses==1
// result: (GT (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPWconst [0] z:(MADDW a x y)) yes no)
// cond: z.Uses==1
// result: (GT (CMNW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPWconst [0] z:(MSUBW a x y)) yes no)
// cond: z.Uses==1
// result: (GT (CMPW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (InvertFlags cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64LT
b.SetControl(cmp)
// match: (If (Equal cc) yes no)
// cond:
// result: (EQ cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64Equal {
- break
- }
+ for v.Op == OpARM64Equal {
cc := v.Args[0]
b.Kind = BlockARM64EQ
b.SetControl(cc)
// match: (If (NotEqual cc) yes no)
// cond:
// result: (NE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64NotEqual {
- break
- }
+ for v.Op == OpARM64NotEqual {
cc := v.Args[0]
b.Kind = BlockARM64NE
b.SetControl(cc)
// match: (If (LessThan cc) yes no)
// cond:
// result: (LT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessThan {
- break
- }
+ for v.Op == OpARM64LessThan {
cc := v.Args[0]
b.Kind = BlockARM64LT
b.SetControl(cc)
// match: (If (LessThanU cc) yes no)
// cond:
// result: (ULT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessThanU {
- break
- }
+ for v.Op == OpARM64LessThanU {
cc := v.Args[0]
b.Kind = BlockARM64ULT
b.SetControl(cc)
// match: (If (LessEqual cc) yes no)
// cond:
// result: (LE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessEqual {
- break
- }
+ for v.Op == OpARM64LessEqual {
cc := v.Args[0]
b.Kind = BlockARM64LE
b.SetControl(cc)
// match: (If (LessEqualU cc) yes no)
// cond:
// result: (ULE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessEqualU {
- break
- }
+ for v.Op == OpARM64LessEqualU {
cc := v.Args[0]
b.Kind = BlockARM64ULE
b.SetControl(cc)
// match: (If (GreaterThan cc) yes no)
// cond:
// result: (GT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterThan {
- break
- }
+ for v.Op == OpARM64GreaterThan {
cc := v.Args[0]
b.Kind = BlockARM64GT
b.SetControl(cc)
// match: (If (GreaterThanU cc) yes no)
// cond:
// result: (UGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterThanU {
- break
- }
+ for v.Op == OpARM64GreaterThanU {
cc := v.Args[0]
b.Kind = BlockARM64UGT
b.SetControl(cc)
// match: (If (GreaterEqual cc) yes no)
// cond:
// result: (GE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterEqual {
- break
- }
+ for v.Op == OpARM64GreaterEqual {
cc := v.Args[0]
b.Kind = BlockARM64GE
b.SetControl(cc)
// match: (If (GreaterEqualU cc) yes no)
// cond:
// result: (UGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterEqualU {
- break
- }
+ for v.Op == OpARM64GreaterEqualU {
cc := v.Args[0]
b.Kind = BlockARM64UGE
b.SetControl(cc)
// match: (If (LessThanF cc) yes no)
// cond:
// result: (FLT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessThanF {
- break
- }
+ for v.Op == OpARM64LessThanF {
cc := v.Args[0]
b.Kind = BlockARM64FLT
b.SetControl(cc)
// match: (If (LessEqualF cc) yes no)
// cond:
// result: (FLE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessEqualF {
- break
- }
+ for v.Op == OpARM64LessEqualF {
cc := v.Args[0]
b.Kind = BlockARM64FLE
b.SetControl(cc)
// match: (If (GreaterThanF cc) yes no)
// cond:
// result: (FGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterThanF {
- break
- }
+ for v.Op == OpARM64GreaterThanF {
cc := v.Args[0]
b.Kind = BlockARM64FGT
b.SetControl(cc)
// match: (If (GreaterEqualF cc) yes no)
// cond:
// result: (FGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterEqualF {
- break
- }
+ for v.Op == OpARM64GreaterEqualF {
cc := v.Args[0]
b.Kind = BlockARM64FGE
b.SetControl(cc)
// cond:
// result: (NZ cond yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockARM64NZ
b.SetControl(cond)
// match: (LE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LE (TSTWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (LE (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPWconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (LE (TSTW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LE (TSTconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LE (CMNconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LE (CMNWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (LE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPWconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (LE (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMP x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (LE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMP {
- break
- }
+ for v.Op == OpARM64CMP {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (LE (CMPW x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (LE (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPW {
- break
- }
+ for v.Op == OpARM64CMPW {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (LE (CMPconst [0] z:(MADD a x y)) yes no)
// cond: z.Uses==1
// result: (LE (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] z:(MSUB a x y)) yes no)
// cond: z.Uses==1
// result: (LE (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPWconst [0] z:(MADDW a x y)) yes no)
// cond: z.Uses==1
// result: (LE (CMNW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPWconst [0] z:(MSUBW a x y)) yes no)
// cond: z.Uses==1
// result: (LE (CMPW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (InvertFlags cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64GE
b.SetControl(cmp)
// match: (LT (CMPWconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LT (TSTWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (LT (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (LT (TSTW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LT (TSTconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LT (CMNconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (LT (CMNWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (LT (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (LT (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMP x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (LT (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMP {
- break
- }
+ for v.Op == OpARM64CMP {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (LT (CMPW x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (LT (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPW {
- break
- }
+ for v.Op == OpARM64CMPW {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (LT (CMPconst [0] z:(MADD a x y)) yes no)
// cond: z.Uses==1
// result: (LT (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] z:(MSUB a x y)) yes no)
// cond: z.Uses==1
// result: (LT (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] z:(MADDW a x y)) yes no)
// cond: z.Uses==1
// result: (LT (CMNW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] z:(MSUBW a x y)) yes no)
// cond: z.Uses==1
// result: (LT (CMPW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] x) yes no)
// cond:
// result: (TBNZ {int64(31)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] x) yes no)
// cond:
// result: (TBNZ {int64(63)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (InvertFlags cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64GT
b.SetControl(cmp)
// match: (NE (CMPWconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (NE (TSTWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (NE (TST x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (NE (TSTW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] x:(ANDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (NE (TSTconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (NE (CMNconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] x:(ADDconst [c] y)) yes no)
// cond: x.Uses == 1
// result: (NE (CMNWconst [c] y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (NE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] z:(ADD x y)) yes no)
// cond: z.Uses == 1
// result: (NE (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMP x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (NE (CMN x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMP {
- break
- }
+ for v.Op == OpARM64CMP {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (NE (CMPW x z:(NEG y)) yes no)
// cond: z.Uses == 1
// result: (NE (CMNW x y) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPW {
- break
- }
+ for v.Op == OpARM64CMPW {
_ = v.Args[1]
x := v.Args[0]
z := v.Args[1]
// match: (NE (CMPconst [0] x) yes no)
// cond:
// result: (NZ x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] x) yes no)
// cond:
// result: (NZW x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(MADD a x y)) yes no)
// cond: z.Uses==1
// result: (NE (CMN a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(MSUB a x y)) yes no)
// cond: z.Uses==1
// result: (NE (CMP a (MUL <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPconst {
- break
- }
+ for v.Op == OpARM64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] z:(MADDW a x y)) yes no)
// cond: z.Uses==1
// result: (NE (CMNW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] z:(MSUBW a x y)) yes no)
// cond: z.Uses==1
// result: (NE (CMPW a (MULW <x.Type> x y)) yes no)
- for {
- v := b.Control
- if v.Op != OpARM64CMPWconst {
- break
- }
+ for v.Op == OpARM64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (TSTconst [c] x) yes no)
// cond: oneBit(c)
// result: (TBNZ {ntz(c)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64TSTconst {
- break
- }
+ for v.Op == OpARM64TSTconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(c)) {
// match: (NE (TSTWconst [c] x) yes no)
// cond: oneBit(int64(uint32(c)))
// result: (TBNZ {ntz(int64(uint32(c)))} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64TSTWconst {
- break
- }
+ for v.Op == OpARM64TSTWconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(int64(uint32(c)))) {
// match: (NE (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (InvertFlags cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64NE
b.SetControl(cmp)
// match: (NZ (Equal cc) yes no)
// cond:
// result: (EQ cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64Equal {
- break
- }
+ for v.Op == OpARM64Equal {
cc := v.Args[0]
b.Kind = BlockARM64EQ
b.SetControl(cc)
// match: (NZ (NotEqual cc) yes no)
// cond:
// result: (NE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64NotEqual {
- break
- }
+ for v.Op == OpARM64NotEqual {
cc := v.Args[0]
b.Kind = BlockARM64NE
b.SetControl(cc)
// match: (NZ (LessThan cc) yes no)
// cond:
// result: (LT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessThan {
- break
- }
+ for v.Op == OpARM64LessThan {
cc := v.Args[0]
b.Kind = BlockARM64LT
b.SetControl(cc)
// match: (NZ (LessThanU cc) yes no)
// cond:
// result: (ULT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessThanU {
- break
- }
+ for v.Op == OpARM64LessThanU {
cc := v.Args[0]
b.Kind = BlockARM64ULT
b.SetControl(cc)
// match: (NZ (LessEqual cc) yes no)
// cond:
// result: (LE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessEqual {
- break
- }
+ for v.Op == OpARM64LessEqual {
cc := v.Args[0]
b.Kind = BlockARM64LE
b.SetControl(cc)
// match: (NZ (LessEqualU cc) yes no)
// cond:
// result: (ULE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessEqualU {
- break
- }
+ for v.Op == OpARM64LessEqualU {
cc := v.Args[0]
b.Kind = BlockARM64ULE
b.SetControl(cc)
// match: (NZ (GreaterThan cc) yes no)
// cond:
// result: (GT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterThan {
- break
- }
+ for v.Op == OpARM64GreaterThan {
cc := v.Args[0]
b.Kind = BlockARM64GT
b.SetControl(cc)
// match: (NZ (GreaterThanU cc) yes no)
// cond:
// result: (UGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterThanU {
- break
- }
+ for v.Op == OpARM64GreaterThanU {
cc := v.Args[0]
b.Kind = BlockARM64UGT
b.SetControl(cc)
// match: (NZ (GreaterEqual cc) yes no)
// cond:
// result: (GE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterEqual {
- break
- }
+ for v.Op == OpARM64GreaterEqual {
cc := v.Args[0]
b.Kind = BlockARM64GE
b.SetControl(cc)
// match: (NZ (GreaterEqualU cc) yes no)
// cond:
// result: (UGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterEqualU {
- break
- }
+ for v.Op == OpARM64GreaterEqualU {
cc := v.Args[0]
b.Kind = BlockARM64UGE
b.SetControl(cc)
// match: (NZ (LessThanF cc) yes no)
// cond:
// result: (FLT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessThanF {
- break
- }
+ for v.Op == OpARM64LessThanF {
cc := v.Args[0]
b.Kind = BlockARM64FLT
b.SetControl(cc)
// match: (NZ (LessEqualF cc) yes no)
// cond:
// result: (FLE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64LessEqualF {
- break
- }
+ for v.Op == OpARM64LessEqualF {
cc := v.Args[0]
b.Kind = BlockARM64FLE
b.SetControl(cc)
// match: (NZ (GreaterThan cc) yes no)
// cond:
// result: (FGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterThan {
- break
- }
+ for v.Op == OpARM64GreaterThan {
cc := v.Args[0]
b.Kind = BlockARM64FGT
b.SetControl(cc)
// match: (NZ (GreaterEqual cc) yes no)
// cond:
// result: (FGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpARM64GreaterEqual {
- break
- }
+ for v.Op == OpARM64GreaterEqual {
cc := v.Args[0]
b.Kind = BlockARM64FGE
b.SetControl(cc)
// match: (NZ (ANDconst [c] x) yes no)
// cond: oneBit(c)
// result: (TBNZ {ntz(c)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64ANDconst {
- break
- }
+ for v.Op == OpARM64ANDconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(c)) {
// match: (NZ (MOVDconst [0]) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
if v.AuxInt != 0 {
break
}
// match: (NZ (MOVDconst [c]) yes no)
// cond: c != 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
c := v.AuxInt
if !(c != 0) {
break
// match: (NZW (ANDconst [c] x) yes no)
// cond: oneBit(int64(uint32(c)))
// result: (TBNZ {ntz(int64(uint32(c)))} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64ANDconst {
- break
- }
+ for v.Op == OpARM64ANDconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(int64(uint32(c)))) {
// match: (NZW (MOVDconst [c]) yes no)
// cond: int32(c) == 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
c := v.AuxInt
if !(int32(c) == 0) {
break
// match: (NZW (MOVDconst [c]) yes no)
// cond: int32(c) != 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
c := v.AuxInt
if !(int32(c) != 0) {
break
// match: (UGE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGE (InvertFlags cmp) yes no)
// cond:
// result: (ULE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64ULE
b.SetControl(cmp)
// match: (UGT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagLT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_ULT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (FlagGT_UGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (UGT (InvertFlags cmp) yes no)
// cond:
// result: (ULT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64ULT
b.SetControl(cmp)
// match: (ULE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULE (InvertFlags cmp) yes no)
// cond:
// result: (UGE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64UGE
b.SetControl(cmp)
// match: (ULT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagEQ {
- break
- }
+ for v.Op == OpARM64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_ULT {
- break
- }
+ for v.Op == OpARM64FlagLT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagLT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagLT_UGT {
- break
- }
+ for v.Op == OpARM64FlagLT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_ULT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_ULT {
- break
- }
+ for v.Op == OpARM64FlagGT_ULT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (FlagGT_UGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64FlagGT_UGT {
- break
- }
+ for v.Op == OpARM64FlagGT_UGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (ULT (InvertFlags cmp) yes no)
// cond:
// result: (UGT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpARM64InvertFlags {
- break
- }
+ for v.Op == OpARM64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockARM64UGT
b.SetControl(cmp)
// match: (Z (ANDconst [c] x) yes no)
// cond: oneBit(c)
// result: (TBZ {ntz(c)} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64ANDconst {
- break
- }
+ for v.Op == OpARM64ANDconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(c)) {
// match: (Z (MOVDconst [0]) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
if v.AuxInt != 0 {
break
}
// match: (Z (MOVDconst [c]) yes no)
// cond: c != 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
c := v.AuxInt
if !(c != 0) {
break
// match: (ZW (ANDconst [c] x) yes no)
// cond: oneBit(int64(uint32(c)))
// result: (TBZ {ntz(int64(uint32(c)))} x yes no)
- for {
- v := b.Control
- if v.Op != OpARM64ANDconst {
- break
- }
+ for v.Op == OpARM64ANDconst {
c := v.AuxInt
x := v.Args[0]
if !(oneBit(int64(uint32(c)))) {
// match: (ZW (MOVDconst [c]) yes no)
// cond: int32(c) == 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
c := v.AuxInt
if !(int32(c) == 0) {
break
// match: (ZW (MOVDconst [c]) yes no)
// cond: int32(c) != 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpARM64MOVDconst {
- break
- }
+ for v.Op == OpARM64MOVDconst {
c := v.AuxInt
if !(int32(c) != 0) {
break
}
func rewriteBlockMIPS(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockMIPSEQ:
// match: (EQ (FPFlagTrue cmp) yes no)
// cond:
// result: (FPF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSFPFlagTrue {
- break
- }
+ for v.Op == OpMIPSFPFlagTrue {
cmp := v.Args[0]
b.Kind = BlockMIPSFPF
b.SetControl(cmp)
// match: (EQ (FPFlagFalse cmp) yes no)
// cond:
// result: (FPT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSFPFlagFalse {
- break
- }
+ for v.Op == OpMIPSFPFlagFalse {
cmp := v.Args[0]
b.Kind = BlockMIPSFPT
b.SetControl(cmp)
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (SGTUconst [1] x) yes no)
// cond:
// result: (NE x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTUconst {
- break
- }
+ for v.Op == OpMIPSSGTUconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (SGTUzero x) yes no)
// cond:
// result: (EQ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTUzero {
- break
- }
+ for v.Op == OpMIPSSGTUzero {
x := v.Args[0]
b.Kind = BlockMIPSEQ
b.SetControl(x)
// match: (EQ (SGTconst [0] x) yes no)
// cond:
// result: (GEZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTconst {
- break
- }
+ for v.Op == OpMIPSSGTconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (SGTzero x) yes no)
// cond:
// result: (LEZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTzero {
- break
- }
+ for v.Op == OpMIPSSGTzero {
x := v.Args[0]
b.Kind = BlockMIPSLEZ
b.SetControl(x)
// match: (EQ (MOVWconst [0]) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (MOVWconst [c]) yes no)
// cond: c != 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(c != 0) {
break
// match: (GEZ (MOVWconst [c]) yes no)
// cond: int32(c) >= 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) >= 0) {
break
// match: (GEZ (MOVWconst [c]) yes no)
// cond: int32(c) < 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) < 0) {
break
// match: (GTZ (MOVWconst [c]) yes no)
// cond: int32(c) > 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) > 0) {
break
// match: (GTZ (MOVWconst [c]) yes no)
// cond: int32(c) <= 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) <= 0) {
break
// cond:
// result: (NE cond yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockMIPSNE
b.SetControl(cond)
// match: (LEZ (MOVWconst [c]) yes no)
// cond: int32(c) <= 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) <= 0) {
break
// match: (LEZ (MOVWconst [c]) yes no)
// cond: int32(c) > 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) > 0) {
break
// match: (LTZ (MOVWconst [c]) yes no)
// cond: int32(c) < 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) < 0) {
break
// match: (LTZ (MOVWconst [c]) yes no)
// cond: int32(c) >= 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(int32(c) >= 0) {
break
// match: (NE (FPFlagTrue cmp) yes no)
// cond:
// result: (FPT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSFPFlagTrue {
- break
- }
+ for v.Op == OpMIPSFPFlagTrue {
cmp := v.Args[0]
b.Kind = BlockMIPSFPT
b.SetControl(cmp)
// match: (NE (FPFlagFalse cmp) yes no)
// cond:
// result: (FPF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSFPFlagFalse {
- break
- }
+ for v.Op == OpMIPSFPFlagFalse {
cmp := v.Args[0]
b.Kind = BlockMIPSFPF
b.SetControl(cmp)
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTzero _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSXORconst {
- break
- }
+ for v.Op == OpMIPSXORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (SGTUconst [1] x) yes no)
// cond:
// result: (EQ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTUconst {
- break
- }
+ for v.Op == OpMIPSSGTUconst {
if v.AuxInt != 1 {
break
}
// match: (NE (SGTUzero x) yes no)
// cond:
// result: (NE x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTUzero {
- break
- }
+ for v.Op == OpMIPSSGTUzero {
x := v.Args[0]
b.Kind = BlockMIPSNE
b.SetControl(x)
// match: (NE (SGTconst [0] x) yes no)
// cond:
// result: (LTZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTconst {
- break
- }
+ for v.Op == OpMIPSSGTconst {
if v.AuxInt != 0 {
break
}
// match: (NE (SGTzero x) yes no)
// cond:
// result: (GTZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSSGTzero {
- break
- }
+ for v.Op == OpMIPSSGTzero {
x := v.Args[0]
b.Kind = BlockMIPSGTZ
b.SetControl(x)
// match: (NE (MOVWconst [0]) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (MOVWconst [c]) yes no)
// cond: c != 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPSMOVWconst {
- break
- }
+ for v.Op == OpMIPSMOVWconst {
c := v.AuxInt
if !(c != 0) {
break
}
func rewriteBlockMIPS64(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockMIPS64EQ:
// match: (EQ (FPFlagTrue cmp) yes no)
// cond:
// result: (FPF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64FPFlagTrue {
- break
- }
+ for v.Op == OpMIPS64FPFlagTrue {
cmp := v.Args[0]
b.Kind = BlockMIPS64FPF
b.SetControl(cmp)
// match: (EQ (FPFlagFalse cmp) yes no)
// cond:
// result: (FPT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64FPFlagFalse {
- break
- }
+ for v.Op == OpMIPS64FPFlagFalse {
cmp := v.Args[0]
b.Kind = BlockMIPS64FPT
b.SetControl(cmp)
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (SGTUconst [1] x) yes no)
// cond:
// result: (NE x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGTUconst {
- break
- }
+ for v.Op == OpMIPS64SGTUconst {
if v.AuxInt != 1 {
break
}
// match: (EQ (SGTU x (MOVVconst [0])) yes no)
// cond:
// result: (EQ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGTU {
- break
- }
+ for v.Op == OpMIPS64SGTU {
_ = v.Args[1]
x := v.Args[0]
v_1 := v.Args[1]
// match: (EQ (SGTconst [0] x) yes no)
// cond:
// result: (GEZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGTconst {
- break
- }
+ for v.Op == OpMIPS64SGTconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (SGT x (MOVVconst [0])) yes no)
// cond:
// result: (LEZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGT {
- break
- }
+ for v.Op == OpMIPS64SGT {
_ = v.Args[1]
x := v.Args[0]
v_1 := v.Args[1]
// match: (EQ (MOVVconst [0]) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (MOVVconst [c]) yes no)
// cond: c != 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c != 0) {
break
// match: (GEZ (MOVVconst [c]) yes no)
// cond: c >= 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c >= 0) {
break
// match: (GEZ (MOVVconst [c]) yes no)
// cond: c < 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c < 0) {
break
// match: (GTZ (MOVVconst [c]) yes no)
// cond: c > 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c > 0) {
break
// match: (GTZ (MOVVconst [c]) yes no)
// cond: c <= 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c <= 0) {
break
// cond:
// result: (NE cond yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockMIPS64NE
b.SetControl(cond)
// match: (LEZ (MOVVconst [c]) yes no)
// cond: c <= 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c <= 0) {
break
// match: (LEZ (MOVVconst [c]) yes no)
// cond: c > 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c > 0) {
break
// match: (LTZ (MOVVconst [c]) yes no)
// cond: c < 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c < 0) {
break
// match: (LTZ (MOVVconst [c]) yes no)
// cond: c >= 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c >= 0) {
break
// match: (NE (FPFlagTrue cmp) yes no)
// cond:
// result: (FPT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64FPFlagTrue {
- break
- }
+ for v.Op == OpMIPS64FPFlagTrue {
cmp := v.Args[0]
b.Kind = BlockMIPS64FPT
b.SetControl(cmp)
// match: (NE (FPFlagFalse cmp) yes no)
// cond:
// result: (FPF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64FPFlagFalse {
- break
- }
+ for v.Op == OpMIPS64FPFlagFalse {
cmp := v.Args[0]
b.Kind = BlockMIPS64FPF
b.SetControl(cmp)
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64XORconst {
- break
- }
+ for v.Op == OpMIPS64XORconst {
if v.AuxInt != 1 {
break
}
// match: (NE (SGTUconst [1] x) yes no)
// cond:
// result: (EQ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGTUconst {
- break
- }
+ for v.Op == OpMIPS64SGTUconst {
if v.AuxInt != 1 {
break
}
// match: (NE (SGTU x (MOVVconst [0])) yes no)
// cond:
// result: (NE x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGTU {
- break
- }
+ for v.Op == OpMIPS64SGTU {
_ = v.Args[1]
x := v.Args[0]
v_1 := v.Args[1]
// match: (NE (SGTconst [0] x) yes no)
// cond:
// result: (LTZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGTconst {
- break
- }
+ for v.Op == OpMIPS64SGTconst {
if v.AuxInt != 0 {
break
}
// match: (NE (SGT x (MOVVconst [0])) yes no)
// cond:
// result: (GTZ x yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64SGT {
- break
- }
+ for v.Op == OpMIPS64SGT {
_ = v.Args[1]
x := v.Args[0]
v_1 := v.Args[1]
// match: (NE (MOVVconst [0]) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
if v.AuxInt != 0 {
break
}
// match: (NE (MOVVconst [c]) yes no)
// cond: c != 0
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpMIPS64MOVVconst {
- break
- }
+ for v.Op == OpMIPS64MOVVconst {
c := v.AuxInt
if !(c != 0) {
break
}
func rewriteBlockPPC64(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockPPC64EQ:
// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (EQ (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (EQ (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagEQ {
- break
- }
+ for v.Op == OpPPC64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagLT {
- break
- }
+ for v.Op == OpPPC64FlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagGT {
- break
- }
+ for v.Op == OpPPC64FlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (InvertFlags cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64InvertFlags {
- break
- }
+ for v.Op == OpPPC64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockPPC64EQ
b.SetControl(cmp)
// match: (EQ (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (EQ (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (EQ (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (ANDCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (ORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (EQ (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1
// result: (EQ (XORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagEQ {
- break
- }
+ for v.Op == OpPPC64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagLT {
- break
- }
+ for v.Op == OpPPC64FlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagGT {
- break
- }
+ for v.Op == OpPPC64FlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (InvertFlags cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64InvertFlags {
- break
- }
+ for v.Op == OpPPC64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockPPC64LE
b.SetControl(cmp)
// match: (GE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (GE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (GE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (GE (ANDCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1
// result: (GE (ORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GE (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1
// result: (GE (XORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagEQ {
- break
- }
+ for v.Op == OpPPC64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagLT {
- break
- }
+ for v.Op == OpPPC64FlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagGT {
- break
- }
+ for v.Op == OpPPC64FlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (InvertFlags cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64InvertFlags {
- break
- }
+ for v.Op == OpPPC64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockPPC64LT
b.SetControl(cmp)
// match: (GT (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (GT (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (GT (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (GT (ANDCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1
// result: (GT (ORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (GT (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1
// result: (GT (XORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (If (Equal cc) yes no)
// cond:
// result: (EQ cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64Equal {
- break
- }
+ for v.Op == OpPPC64Equal {
cc := v.Args[0]
b.Kind = BlockPPC64EQ
b.SetControl(cc)
// match: (If (NotEqual cc) yes no)
// cond:
// result: (NE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64NotEqual {
- break
- }
+ for v.Op == OpPPC64NotEqual {
cc := v.Args[0]
b.Kind = BlockPPC64NE
b.SetControl(cc)
// match: (If (LessThan cc) yes no)
// cond:
// result: (LT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64LessThan {
- break
- }
+ for v.Op == OpPPC64LessThan {
cc := v.Args[0]
b.Kind = BlockPPC64LT
b.SetControl(cc)
// match: (If (LessEqual cc) yes no)
// cond:
// result: (LE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64LessEqual {
- break
- }
+ for v.Op == OpPPC64LessEqual {
cc := v.Args[0]
b.Kind = BlockPPC64LE
b.SetControl(cc)
// match: (If (GreaterThan cc) yes no)
// cond:
// result: (GT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64GreaterThan {
- break
- }
+ for v.Op == OpPPC64GreaterThan {
cc := v.Args[0]
b.Kind = BlockPPC64GT
b.SetControl(cc)
// match: (If (GreaterEqual cc) yes no)
// cond:
// result: (GE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64GreaterEqual {
- break
- }
+ for v.Op == OpPPC64GreaterEqual {
cc := v.Args[0]
b.Kind = BlockPPC64GE
b.SetControl(cc)
// match: (If (FLessThan cc) yes no)
// cond:
// result: (FLT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FLessThan {
- break
- }
+ for v.Op == OpPPC64FLessThan {
cc := v.Args[0]
b.Kind = BlockPPC64FLT
b.SetControl(cc)
// match: (If (FLessEqual cc) yes no)
// cond:
// result: (FLE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FLessEqual {
- break
- }
+ for v.Op == OpPPC64FLessEqual {
cc := v.Args[0]
b.Kind = BlockPPC64FLE
b.SetControl(cc)
// match: (If (FGreaterThan cc) yes no)
// cond:
// result: (FGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FGreaterThan {
- break
- }
+ for v.Op == OpPPC64FGreaterThan {
cc := v.Args[0]
b.Kind = BlockPPC64FGT
b.SetControl(cc)
// match: (If (FGreaterEqual cc) yes no)
// cond:
// result: (FGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FGreaterEqual {
- break
- }
+ for v.Op == OpPPC64FGreaterEqual {
cc := v.Args[0]
b.Kind = BlockPPC64FGE
b.SetControl(cc)
// cond:
// result: (NE (CMPWconst [0] cond) yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockPPC64NE
v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, types.TypeFlags)
// match: (LE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagEQ {
- break
- }
+ for v.Op == OpPPC64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagLT {
- break
- }
+ for v.Op == OpPPC64FlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagGT {
- break
- }
+ for v.Op == OpPPC64FlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (InvertFlags cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64InvertFlags {
- break
- }
+ for v.Op == OpPPC64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockPPC64GE
b.SetControl(cmp)
// match: (LE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (LE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (LE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (LE (ANDCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1
// result: (LE (ORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LE (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1
// result: (LE (XORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagEQ {
- break
- }
+ for v.Op == OpPPC64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagLT {
- break
- }
+ for v.Op == OpPPC64FlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagGT {
- break
- }
+ for v.Op == OpPPC64FlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (InvertFlags cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64InvertFlags {
- break
- }
+ for v.Op == OpPPC64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockPPC64GT
b.SetControl(cmp)
// match: (LT (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (LT (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (LT (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (LT (ANDCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1
// result: (LT (ORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (LT (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1
// result: (LT (XORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (Equal cc)) yes no)
// cond:
// result: (EQ cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (NotEqual cc)) yes no)
// cond:
// result: (NE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (LessThan cc)) yes no)
// cond:
// result: (LT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (LessEqual cc)) yes no)
// cond:
// result: (LE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (GreaterThan cc)) yes no)
// cond:
// result: (GT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no)
// cond:
// result: (GE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (FLessThan cc)) yes no)
// cond:
// result: (FLT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (FLessEqual cc)) yes no)
// cond:
// result: (FLE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no)
// cond:
// result: (FGT cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no)
// cond:
// result: (FGE cc yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (NE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (NE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagEQ {
- break
- }
+ for v.Op == OpPPC64FlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagLT {
- break
- }
+ for v.Op == OpPPC64FlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64FlagGT {
- break
- }
+ for v.Op == OpPPC64FlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (InvertFlags cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64InvertFlags {
- break
- }
+ for v.Op == OpPPC64InvertFlags {
cmp := v.Args[0]
b.Kind = BlockPPC64NE
b.SetControl(cmp)
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (NE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
// cond:
// result: (NE (ANDCCconst [c] x) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPWconst {
- break
- }
+ for v.Op == OpPPC64CMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(AND x y)) yes no)
// cond: z.Uses == 1
// result: (NE (ANDCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(OR x y)) yes no)
// cond: z.Uses == 1
// result: (NE (ORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPconst [0] z:(XOR x y)) yes no)
// cond: z.Uses == 1
// result: (NE (XORCC x y) yes no)
- for {
- v := b.Control
- if v.Op != OpPPC64CMPconst {
- break
- }
+ for v.Op == OpPPC64CMPconst {
if v.AuxInt != 0 {
break
}
}
func rewriteBlockS390X(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockS390XEQ:
// match: (EQ (InvertFlags cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XInvertFlags {
- break
- }
+ for v.Op == OpS390XInvertFlags {
cmp := v.Args[0]
b.Kind = BlockS390XEQ
b.SetControl(cmp)
// match: (EQ (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagEQ {
- break
- }
+ for v.Op == OpS390XFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagLT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagLT {
- break
- }
+ for v.Op == OpS390XFlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (EQ (FlagGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagGT {
- break
- }
+ for v.Op == OpS390XFlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (InvertFlags cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XInvertFlags {
- break
- }
+ for v.Op == OpS390XInvertFlags {
cmp := v.Args[0]
b.Kind = BlockS390XLE
b.SetControl(cmp)
// match: (GE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagEQ {
- break
- }
+ for v.Op == OpS390XFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagLT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagLT {
- break
- }
+ for v.Op == OpS390XFlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GE (FlagGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagGT {
- break
- }
+ for v.Op == OpS390XFlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (InvertFlags cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XInvertFlags {
- break
- }
+ for v.Op == OpS390XInvertFlags {
cmp := v.Args[0]
b.Kind = BlockS390XLT
b.SetControl(cmp)
// match: (GT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagEQ {
- break
- }
+ for v.Op == OpS390XFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagLT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagLT {
- break
- }
+ for v.Op == OpS390XFlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (GT (FlagGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagGT {
- break
- }
+ for v.Op == OpS390XFlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (If (MOVDLT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDLT {
- break
- }
+ for v.Op == OpS390XMOVDLT {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDLE {
- break
- }
+ for v.Op == OpS390XMOVDLE {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDGT {
- break
- }
+ for v.Op == OpS390XMOVDGT {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDGE {
- break
- }
+ for v.Op == OpS390XMOVDGE {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDEQ {
- break
- }
+ for v.Op == OpS390XMOVDEQ {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDNE {
- break
- }
+ for v.Op == OpS390XMOVDNE {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (GTF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDGTnoinv {
- break
- }
+ for v.Op == OpS390XMOVDGTnoinv {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// match: (If (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
// cond:
// result: (GEF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XMOVDGEnoinv {
- break
- }
+ for v.Op == OpS390XMOVDGEnoinv {
cmp := v.Args[2]
v_0 := v.Args[0]
if v_0.Op != OpS390XMOVDconst {
// cond:
// result: (NE (CMPWconst [0] (MOVBZreg <typ.Bool> cond)) yes no)
for {
- v := b.Control
- _ = v
cond := b.Control
b.Kind = BlockS390XNE
v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, types.TypeFlags)
// match: (LE (InvertFlags cmp) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XInvertFlags {
- break
- }
+ for v.Op == OpS390XInvertFlags {
cmp := v.Args[0]
b.Kind = BlockS390XGE
b.SetControl(cmp)
// match: (LE (FlagEQ) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagEQ {
- break
- }
+ for v.Op == OpS390XFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagLT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagLT {
- break
- }
+ for v.Op == OpS390XFlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LE (FlagGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagGT {
- break
- }
+ for v.Op == OpS390XFlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (InvertFlags cmp) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XInvertFlags {
- break
- }
+ for v.Op == OpS390XInvertFlags {
cmp := v.Args[0]
b.Kind = BlockS390XGT
b.SetControl(cmp)
// match: (LT (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagEQ {
- break
- }
+ for v.Op == OpS390XFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagLT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagLT {
- break
- }
+ for v.Op == OpS390XFlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (LT (FlagGT) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagGT {
- break
- }
+ for v.Op == OpS390XFlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (CMPWconst [0] (MOVDLT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (LT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (LE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (GT cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (GE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (EQ cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (GTF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (CMPWconst [0] (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
// cond:
// result: (GEF cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XCMPWconst {
- break
- }
+ for v.Op == OpS390XCMPWconst {
if v.AuxInt != 0 {
break
}
// match: (NE (InvertFlags cmp) yes no)
// cond:
// result: (NE cmp yes no)
- for {
- v := b.Control
- if v.Op != OpS390XInvertFlags {
- break
- }
+ for v.Op == OpS390XInvertFlags {
cmp := v.Args[0]
b.Kind = BlockS390XNE
b.SetControl(cmp)
// match: (NE (FlagEQ) yes no)
// cond:
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpS390XFlagEQ {
- break
- }
+ for v.Op == OpS390XFlagEQ {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagLT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagLT {
- break
- }
+ for v.Op == OpS390XFlagLT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
// match: (NE (FlagGT) yes no)
// cond:
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpS390XFlagGT {
- break
- }
+ for v.Op == OpS390XFlagGT {
b.Kind = BlockFirst
b.SetControl(nil)
b.Aux = nil
}
func rewriteBlockWasm(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
}
return false
}
func rewriteBlockdec(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
}
return false
}
func rewriteBlockdec64(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
}
return false
}
func rewriteBlockdecArgs(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
}
return false
}
func rewriteBlockgeneric(b *Block) bool {
config := b.Func.Config
- _ = config
- fe := b.Func.fe
- _ = fe
typ := &config.Types
_ = typ
+ v := b.Control
+ _ = v
switch b.Kind {
case BlockIf:
// match: (If (Not cond) yes no)
// cond:
// result: (If cond no yes)
- for {
- v := b.Control
- if v.Op != OpNot {
- break
- }
+ for v.Op == OpNot {
cond := v.Args[0]
b.Kind = BlockIf
b.SetControl(cond)
// match: (If (ConstBool [c]) yes no)
// cond: c == 1
// result: (First nil yes no)
- for {
- v := b.Control
- if v.Op != OpConstBool {
- break
- }
+ for v.Op == OpConstBool {
c := v.AuxInt
if !(c == 1) {
break
// match: (If (ConstBool [c]) yes no)
// cond: c == 0
// result: (First nil no yes)
- for {
- v := b.Control
- if v.Op != OpConstBool {
- break
- }
+ for v.Op == OpConstBool {
c := v.AuxInt
if !(c == 0) {
break