Commit 4938d7b5 authored by Keith Randall's avatar Keith Randall

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: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 9568d54f
......@@ -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
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment