]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile: respect phi values in tighten
authorJosh Bleecher Snyder <josharian@gmail.com>
Wed, 5 Aug 2015 22:51:05 +0000 (15:51 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 6 Aug 2015 17:07:14 +0000 (17:07 +0000)
commite5fe33e546589d57616cf9603781299a3c5751dc
treeba616a913ebda5d3a75a166123d405abac70c26d
parentf91ff1a509c41ba0d14c3018f486fb64b3b54425
[dev.ssa] cmd/compile: respect phi values in tighten

Given (say)

b1: <- b2 b3
  v1 = Phi <t> v2 v3
b2:
  v2 = ...
b3:
  ...

tighten will move v2 to b1, since it is only used in b1.

This is wrong; v2 needs to be evaluated before entering b1.
Fix it.

Change-Id: I2cc3b30e3ffd221cf594e36cec534dfd9cf3c6a7
Reviewed-on: https://go-review.googlesource.com/13264
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/tighten.go