1
0
mirror of https://github.com/golang/go synced 2024-11-05 16:06:10 -07:00

cmd/compile: stop generating block successor vars in rewrite rules

They are left over from the days before
we had BlockKindFirst and swapSuccessors.

Change-Id: I9259d53ac2821ca4d5de5dd520ca4b78f52ecad4
Reviewed-on: https://go-review.googlesource.com/41206
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-20 15:26:05 -07:00
parent db8437eb58
commit eaa198f3d1
10 changed files with 1 additions and 2183 deletions

View File

@ -277,14 +277,6 @@ func genRules(arch arch) {
}
}
// assign successor names
succs := s[2:]
for i, a := range succs {
if a != "_" {
fmt.Fprintf(w, "%s := b.Succs[%d]\n", a, i)
}
}
if cond != "" {
fmt.Fprintf(w, "if !(%s) {\nbreak\n}\n", cond)
}
@ -294,6 +286,7 @@ func genRules(arch arch) {
newsuccs := t[2:]
// Check if newsuccs is the same set as succs.
succs := s[2:]
m := map[string]bool{}
for _, succ := range succs {
if m[succ] {
@ -333,9 +326,6 @@ func genRules(arch arch) {
}
fmt.Fprintln(w, "b.swapSuccessors()")
}
for i := 0; i < len(succs); i++ {
fmt.Fprintf(w, "_ = %s\n", newsuccs[i])
}
if *genLog {
fmt.Fprintf(w, "logRule(\"%s\")\n", rule.loc)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9245,12 +9245,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSFPF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (FPFlagFalse cmp) yes no)
@ -9262,12 +9258,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSFPT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
@ -9285,12 +9277,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
@ -9308,12 +9296,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTU {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
@ -9331,12 +9315,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
@ -9354,12 +9334,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTUconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTzero _)) yes no)
@ -9377,12 +9353,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTzero {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTUzero _)) yes no)
@ -9400,12 +9372,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTUzero {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (SGTUconst [1] x) yes no)
@ -9420,12 +9388,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (SGTUzero x) yes no)
@ -9437,12 +9401,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (SGTconst [0] x) yes no)
@ -9457,12 +9417,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSGEZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (SGTzero x) yes no)
@ -9474,12 +9430,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSLEZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (MOVWconst [0]) yes no)
@ -9493,12 +9445,8 @@ func rewriteBlockMIPS(b *Block) bool {
if v.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (EQ (MOVWconst [c]) yes no)
@ -9510,16 +9458,12 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c != 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPSGEZ:
@ -9532,15 +9476,11 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) >= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GEZ (MOVWconst [c]) yes no)
@ -9552,16 +9492,12 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) < 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPSGTZ:
@ -9574,15 +9510,11 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) > 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GTZ (MOVWconst [c]) yes no)
@ -9594,16 +9526,12 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) <= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockIf:
@ -9614,12 +9542,8 @@ func rewriteBlockMIPS(b *Block) bool {
v := b.Control
_ = v
cond := b.Control
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(cond)
_ = yes
_ = no
return true
}
case BlockMIPSLEZ:
@ -9632,15 +9556,11 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) <= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LEZ (MOVWconst [c]) yes no)
@ -9652,16 +9572,12 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) > 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPSLTZ:
@ -9674,15 +9590,11 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) < 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LTZ (MOVWconst [c]) yes no)
@ -9694,16 +9606,12 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(int32(c) >= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPSNE:
@ -9716,12 +9624,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSFPT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (FPFlagFalse cmp) yes no)
@ -9733,12 +9637,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSFPF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
@ -9756,12 +9656,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
@ -9779,12 +9675,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTU {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
@ -9802,12 +9694,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
@ -9825,12 +9713,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTUconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTzero _)) yes no)
@ -9848,12 +9732,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTzero {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTUzero _)) yes no)
@ -9871,12 +9751,8 @@ func rewriteBlockMIPS(b *Block) bool {
if cmp.Op != OpMIPSSGTUzero {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (SGTUconst [1] x) yes no)
@ -9891,12 +9767,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSEQ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (SGTUzero x) yes no)
@ -9908,12 +9780,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSNE
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (SGTconst [0] x) yes no)
@ -9928,12 +9796,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSLTZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (SGTzero x) yes no)
@ -9945,12 +9809,8 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPSGTZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (MOVWconst [0]) yes no)
@ -9964,13 +9824,9 @@ func rewriteBlockMIPS(b *Block) bool {
if v.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (NE (MOVWconst [c]) yes no)
@ -9982,15 +9838,11 @@ func rewriteBlockMIPS(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c != 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
}

View File

@ -9820,12 +9820,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64FPF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (FPFlagFalse cmp) yes no)
@ -9837,12 +9833,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64FPT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGT _ _)) yes no)
@ -9860,12 +9852,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTU _ _)) yes no)
@ -9883,12 +9871,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGTU {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTconst _)) yes no)
@ -9906,12 +9890,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGTconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (XORconst [1] cmp:(SGTUconst _)) yes no)
@ -9929,12 +9909,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGTUconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (SGTUconst [1] x) yes no)
@ -9949,12 +9925,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (SGTU x (MOVVconst [0])) yes no)
@ -9973,12 +9945,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if v_1.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64EQ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (SGTconst [0] x) yes no)
@ -9993,12 +9961,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64GEZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (SGT x (MOVVconst [0])) yes no)
@ -10017,12 +9981,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if v_1.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64LEZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (EQ (MOVVconst [0]) yes no)
@ -10036,12 +9996,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if v.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (EQ (MOVVconst [c]) yes no)
@ -10053,16 +10009,12 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c != 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPS64GEZ:
@ -10075,15 +10027,11 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c >= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GEZ (MOVVconst [c]) yes no)
@ -10095,16 +10043,12 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c < 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPS64GTZ:
@ -10117,15 +10061,11 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c > 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GTZ (MOVVconst [c]) yes no)
@ -10137,16 +10077,12 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c <= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockIf:
@ -10157,12 +10093,8 @@ func rewriteBlockMIPS64(b *Block) bool {
v := b.Control
_ = v
cond := b.Control
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(cond)
_ = yes
_ = no
return true
}
case BlockMIPS64LEZ:
@ -10175,15 +10107,11 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c <= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LEZ (MOVVconst [c]) yes no)
@ -10195,16 +10123,12 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c > 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPS64LTZ:
@ -10217,15 +10141,11 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c < 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LTZ (MOVVconst [c]) yes no)
@ -10237,16 +10157,12 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c >= 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockMIPS64NE:
@ -10259,12 +10175,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64FPT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (FPFlagFalse cmp) yes no)
@ -10276,12 +10188,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64FPF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGT _ _)) yes no)
@ -10299,12 +10207,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64EQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTU _ _)) yes no)
@ -10322,12 +10226,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGTU {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64EQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTconst _)) yes no)
@ -10345,12 +10245,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGTconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64EQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (XORconst [1] cmp:(SGTUconst _)) yes no)
@ -10368,12 +10264,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if cmp.Op != OpMIPS64SGTUconst {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64EQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (SGTUconst [1] x) yes no)
@ -10388,12 +10280,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64EQ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (SGTU x (MOVVconst [0])) yes no)
@ -10412,12 +10300,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if v_1.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64NE
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (SGTconst [0] x) yes no)
@ -10432,12 +10316,8 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
x := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64LTZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (SGT x (MOVVconst [0])) yes no)
@ -10456,12 +10336,8 @@ func rewriteBlockMIPS64(b *Block) bool {
if v_1.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockMIPS64GTZ
b.SetControl(x)
_ = yes
_ = no
return true
}
// match: (NE (MOVVconst [0]) yes no)
@ -10475,13 +10351,9 @@ func rewriteBlockMIPS64(b *Block) bool {
if v.AuxInt != 0 {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (NE (MOVVconst [c]) yes no)
@ -10493,15 +10365,11 @@ func rewriteBlockMIPS64(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c != 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
}

View File

@ -10476,15 +10476,11 @@ func rewriteBlockPPC64(b *Block) bool {
}
c := v_0.AuxInt
x := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
_ = yes
_ = no
return true
}
// match: (EQ (CMPWconst [0] (ANDconst [c] x)) yes no)
@ -10504,15 +10500,11 @@ func rewriteBlockPPC64(b *Block) bool {
}
c := v_0.AuxInt
x := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
_ = yes
_ = no
return true
}
// match: (EQ (FlagEQ) yes no)
@ -10523,12 +10515,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (EQ (FlagLT) yes no)
@ -10539,13 +10527,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (EQ (FlagGT) yes no)
@ -10556,13 +10540,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (EQ (InvertFlags cmp) yes no)
@ -10574,12 +10554,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
case BlockPPC64GE:
@ -10591,12 +10567,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GE (FlagLT) yes no)
@ -10607,13 +10579,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (GE (FlagGT) yes no)
@ -10624,12 +10592,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GE (InvertFlags cmp) yes no)
@ -10641,12 +10605,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64LE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
case BlockPPC64GT:
@ -10658,13 +10618,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (GT (FlagLT) yes no)
@ -10675,13 +10631,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (GT (FlagGT) yes no)
@ -10692,12 +10644,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GT (InvertFlags cmp) yes no)
@ -10709,12 +10657,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64LT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
case BlockIf:
@ -10727,12 +10671,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (NotEqual cc) yes no)
@ -10744,12 +10684,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (LessThan cc) yes no)
@ -10761,12 +10697,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64LT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (LessEqual cc) yes no)
@ -10778,12 +10710,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64LE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (GreaterThan cc) yes no)
@ -10795,12 +10723,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64GT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (GreaterEqual cc) yes no)
@ -10812,12 +10736,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64GE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (FLessThan cc) yes no)
@ -10829,12 +10749,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FLT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (FLessEqual cc) yes no)
@ -10846,12 +10762,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FLE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (FGreaterThan cc) yes no)
@ -10863,12 +10775,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FGT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If (FGreaterEqual cc) yes no)
@ -10880,12 +10788,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FGE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (If cond yes no)
@ -10895,15 +10799,11 @@ func rewriteBlockPPC64(b *Block) bool {
v := b.Control
_ = v
cond := b.Control
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
v0 := b.NewValue0(v.Pos, OpPPC64CMPWconst, TypeFlags)
v0.AuxInt = 0
v0.AddArg(cond)
b.SetControl(v0)
_ = yes
_ = no
return true
}
case BlockPPC64LE:
@ -10915,12 +10815,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LE (FlagLT) yes no)
@ -10931,12 +10827,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LE (FlagGT) yes no)
@ -10947,13 +10839,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (LE (InvertFlags cmp) yes no)
@ -10965,12 +10853,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64GE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
case BlockPPC64LT:
@ -10982,13 +10866,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (LT (FlagLT) yes no)
@ -10999,12 +10879,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LT (FlagGT) yes no)
@ -11015,13 +10891,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (LT (InvertFlags cmp) yes no)
@ -11033,12 +10905,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64GT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
case BlockPPC64NE:
@ -11058,12 +10926,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64EQ
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (NotEqual cc)) yes no)
@ -11082,12 +10946,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (LessThan cc)) yes no)
@ -11106,12 +10966,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64LT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (LessEqual cc)) yes no)
@ -11130,12 +10986,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64LE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (GreaterThan cc)) yes no)
@ -11154,12 +11006,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64GT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (GreaterEqual cc)) yes no)
@ -11178,12 +11026,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64GE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (FLessThan cc)) yes no)
@ -11202,12 +11046,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FLT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (FLessEqual cc)) yes no)
@ -11226,12 +11066,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FLE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (FGreaterThan cc)) yes no)
@ -11250,12 +11086,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FGT
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (FGreaterEqual cc)) yes no)
@ -11274,12 +11106,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cc := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64FGE
b.SetControl(cc)
_ = yes
_ = no
return true
}
// match: (NE (CMPconst [0] (ANDconst [c] x)) yes no)
@ -11299,15 +11127,11 @@ func rewriteBlockPPC64(b *Block) bool {
}
c := v_0.AuxInt
x := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (ANDconst [c] x)) yes no)
@ -11327,15 +11151,11 @@ func rewriteBlockPPC64(b *Block) bool {
}
c := v_0.AuxInt
x := v_0.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
v0 := b.NewValue0(v.Pos, OpPPC64ANDCCconst, TypeFlags)
v0.AuxInt = c
v0.AddArg(x)
b.SetControl(v0)
_ = yes
_ = no
return true
}
// match: (NE (FlagEQ) yes no)
@ -11346,13 +11166,9 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (NE (FlagLT) yes no)
@ -11363,12 +11179,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (NE (FlagGT) yes no)
@ -11379,12 +11191,8 @@ func rewriteBlockPPC64(b *Block) bool {
if v.Op != OpPPC64FlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (NE (InvertFlags cmp) yes no)
@ -11396,12 +11204,8 @@ func rewriteBlockPPC64(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockPPC64NE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
}

View File

@ -34692,12 +34692,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (EQ (FlagEQ) yes no)
@ -34708,12 +34704,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (EQ (FlagLT) yes no)
@ -34724,13 +34716,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (EQ (FlagGT) yes no)
@ -34741,13 +34729,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockS390XGE:
@ -34760,12 +34744,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XLE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (GE (FlagEQ) yes no)
@ -34776,12 +34756,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (GE (FlagLT) yes no)
@ -34792,13 +34768,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (GE (FlagGT) yes no)
@ -34809,12 +34781,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
case BlockS390XGT:
@ -34827,12 +34795,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XLT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (GT (FlagEQ) yes no)
@ -34843,13 +34807,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (GT (FlagLT) yes no)
@ -34860,13 +34820,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (GT (FlagGT) yes no)
@ -34877,12 +34833,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
case BlockIf:
@ -34909,12 +34861,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XLT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -34940,12 +34888,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XLE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -34971,12 +34915,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -35002,12 +34942,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -35033,12 +34969,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -35064,12 +34996,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -35095,12 +35023,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGTF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no)
@ -35126,12 +35050,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGEF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (If cond yes no)
@ -35141,8 +35061,6 @@ func rewriteBlockS390X(b *Block) bool {
v := b.Control
_ = v
cond := b.Control
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XNE
v0 := b.NewValue0(v.Pos, OpS390XCMPWconst, TypeFlags)
v0.AuxInt = 0
@ -35150,8 +35068,6 @@ func rewriteBlockS390X(b *Block) bool {
v1.AddArg(cond)
v0.AddArg(v1)
b.SetControl(v0)
_ = yes
_ = no
return true
}
case BlockS390XLE:
@ -35164,12 +35080,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (LE (FlagEQ) yes no)
@ -35180,12 +35092,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LE (FlagLT) yes no)
@ -35196,12 +35104,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LE (FlagGT) yes no)
@ -35212,13 +35116,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockS390XLT:
@ -35231,12 +35131,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (LT (FlagEQ) yes no)
@ -35247,13 +35143,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (LT (FlagLT) yes no)
@ -35264,12 +35156,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (LT (FlagGT) yes no)
@ -35280,13 +35168,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
case BlockS390XNE:
@ -35320,12 +35204,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XLT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDLE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35358,12 +35238,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XLE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDGT (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35396,12 +35272,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGT
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDGE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35434,12 +35306,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDEQ (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35472,12 +35340,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XEQ
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDNE (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35510,12 +35374,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35548,12 +35408,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGTF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (CMPWconst [0] (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp)) yes no)
@ -35586,12 +35442,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v_0.Args[2]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XGEF
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (InvertFlags cmp) yes no)
@ -35603,12 +35455,8 @@ func rewriteBlockS390X(b *Block) bool {
break
}
cmp := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockS390XNE
b.SetControl(cmp)
_ = yes
_ = no
return true
}
// match: (NE (FlagEQ) yes no)
@ -35619,13 +35467,9 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagEQ {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (NE (FlagLT) yes no)
@ -35636,12 +35480,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagLT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (NE (FlagGT) yes no)
@ -35652,12 +35492,8 @@ func rewriteBlockS390X(b *Block) bool {
if v.Op != OpS390XFlagGT {
break
}
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
}

View File

@ -23705,13 +23705,9 @@ func rewriteBlockgeneric(b *Block) bool {
break
}
cond := v.Args[0]
yes := b.Succs[0]
no := b.Succs[1]
b.Kind = BlockIf
b.SetControl(cond)
b.swapSuccessors()
_ = no
_ = yes
return true
}
// match: (If (ConstBool [c]) yes no)
@ -23723,15 +23719,11 @@ func rewriteBlockgeneric(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c == 1) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
_ = yes
_ = no
return true
}
// match: (If (ConstBool [c]) yes no)
@ -23743,16 +23735,12 @@ func rewriteBlockgeneric(b *Block) bool {
break
}
c := v.AuxInt
yes := b.Succs[0]
no := b.Succs[1]
if !(c == 0) {
break
}
b.Kind = BlockFirst
b.SetControl(nil)
b.swapSuccessors()
_ = no
_ = yes
return true
}
}