aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/check.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2016-04-20 17:29:50 -0700
committerKeith Randall <khr@golang.org>2016-04-21 02:53:53 +0000
commit4938d7b5fc06bbd137619eddd494a8cca288eb25 (patch)
tree5e8fed6b9cd0101f971478a67fb5e514ae828dbd /src/cmd/compile/internal/ssa/check.go
parent9568d54fb8d89267304d23cac23190f55ec95683 (diff)
downloadgo-4938d7b5fc06bbd137619eddd494a8cca288eb25.tar.gz
go-4938d7b5fc06bbd137619eddd494a8cca288eb25.zip
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>
Diffstat (limited to 'src/cmd/compile/internal/ssa/check.go')
-rw-r--r--src/cmd/compile/internal/ssa/check.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/check.go b/src/cmd/compile/internal/ssa/check.go
index e4b8cb05f4..f1d3857f88 100644
--- a/src/cmd/compile/internal/ssa/check.go
+++ b/src/cmd/compile/internal/ssa/check.go
@@ -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
}