Skip to content

Commit 4938d7b

Browse files
committed
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 <[email protected]> Reviewed-by: Josh Bleecher Snyder <[email protected]>
1 parent 9568d54 commit 4938d7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/compile/internal/ssa/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func checkFunc(f *Func) {
338338

339339
// domCheck reports whether x dominates y (including x==y).
340340
func domCheck(f *Func, sdom sparseTree, x, y *Block) bool {
341-
if !sdom.isAncestorEq(y, f.Entry) {
341+
if !sdom.isAncestorEq(f.Entry, y) {
342342
// unreachable - ignore
343343
return true
344344
}

0 commit comments

Comments
 (0)