Skip to content

Commit

Permalink
cmd/compile: fix dominator check in check()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Josh Bleecher Snyder <[email protected]>
  • Loading branch information
randall77 committed Apr 21, 2016
1 parent 9568d54 commit 4938d7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/ssa/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 4938d7b

Please sign in to comment.