mirror of
https://github.com/golang/go
synced 2024-10-04 21:21:22 -06:00
cmd/compile: fix dominator check in check()
Ancestor comparison was the wrong way around, effectively disabling the def-must-dominate-use check. Update #15084 Change-Id: Ic56d674c5000569d2cc855bbb000a60eae517c7c Reviewed-on: https://go-review.googlesource.com/22330 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
9568d54fb8
commit
4938d7b5fc
@ -338,7 +338,7 @@ func checkFunc(f *Func) {
|
||||
|
||||
// domCheck reports whether x dominates y (including x==y).
|
||||
func domCheck(f *Func, sdom sparseTree, x, y *Block) bool {
|
||||
if !sdom.isAncestorEq(y, f.Entry) {
|
||||
if !sdom.isAncestorEq(f.Entry, y) {
|
||||
// unreachable - ignore
|
||||
return true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user