]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: ignore all unreachable values during simple phi insertion
authorJosh Bleecher Snyder <josharian@gmail.com>
Fri, 24 Mar 2017 17:36:13 +0000 (10:36 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Fri, 24 Mar 2017 18:00:15 +0000 (18:00 +0000)
commite00e57d67cea33d4faef8506ced6f3c2416cfd15
treee84f3ef7ea308ec55e7953f409edba1ab8011cf6
parentad8c17b70328b8771ed5bbfe9161cb98f1995b84
cmd/compile: ignore all unreachable values during simple phi insertion

Simple phi insertion already had a heuristic to check
for dead blocks, namely having no predecessors.
When we stopped generating code for dead blocks,
we eliminated some values contained in more subtle
dead blocks, which confused phi insertion.
Compensate by beefing up the reachability check.

Fixes #19678

Change-Id: I0081e4a46f7ce2f69b131a34a0553874a0cb373e
Reviewed-on: https://go-review.googlesource.com/38602
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/phi.go
src/cmd/compile/internal/ssa/deadcode.go
test/fixedbugs/issue19678.go [new file with mode: 0644]