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>
// 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
}