mirror of
https://github.com/golang/go
synced 2024-11-19 01:04:40 -07:00
cmd/compile: ignore dead phis in fuse
Happens occasionally for boolean phis was used as a control. Change-Id: Ie0f2483e9004c1706751d8dfb25ee2e5106d917e Reviewed-on: https://go-review.googlesource.com/21310 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
152a08c531
commit
d7f7ea6ea8
@ -65,7 +65,7 @@ func fuseBlockIf(b *Block) bool {
|
||||
b.Fatalf("invalid predecessors")
|
||||
}
|
||||
for _, v := range ss.Values {
|
||||
if v.Op == OpPhi && v.Args[i0] != v.Args[i1] {
|
||||
if v.Op == OpPhi && v.Uses > 0 && v.Args[i0] != v.Args[i1] {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user