]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix use of original spill name after sinking
authorDavid Chase <drchase@google.com>
Wed, 13 Apr 2016 17:30:03 +0000 (13:30 -0400)
committerDavid Chase <drchase@google.com>
Thu, 14 Apr 2016 18:24:54 +0000 (18:24 +0000)
commit6b0b3f86d6b3c2cf01c7ed6080e038bda2c12997
tree30eff410f8633133ae75f923d08db032f60815f1
parent170c1b479bcd089eb8f76c8de6e5d44c6c4dbaa8
cmd/compile: fix use of original spill name after sinking

This is a fix for the ssacheck builder
http://build.golang.org/log/baa00f70c34e41186051cfe90568de3d91f115d7
after CL 21307 for sinking spills down loop exits
https://go-review.googlesource.com/#/c/21037/

The fix is to reuse (move) the original spill, thus preserving
the definition of the variable and its use count. Original and
copy both use the same stack slot, but ssacheck needs to see
a definition for the variable itself.

Fixes #15279.

Change-Id: I286285490193dc211b312d64dbc5a54867730bd6
Reviewed-on: https://go-review.googlesource.com/21995
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/regalloc.go