]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] cmd/compile: fix store chain in schedule pass
authorKeith Randall <khr@golang.org>
Thu, 11 May 2017 21:46:49 +0000 (14:46 -0700)
committerChris Broadfoot <cbro@golang.org>
Tue, 23 May 2017 19:42:16 +0000 (19:42 +0000)
commit1054085dcf88ce802e6aa45078f9d7f3abf5b85d
tree25f1f72d2b74dbe0205ccef1503ca1cae1e11bdb
parent18a13d373a0554a28835c58d1ddfb69b387f41bf
[release-branch.go1.8] cmd/compile: fix store chain in schedule pass

Cherry-pick of CL 43294.

Tuple ops are weird. They are essentially a pair of ops,
one which consumes a mem and one which generates a mem (the Select1).
The schedule pass didn't handle these quite right.

Fix the scheduler to include both parts of the paired op in
the store chain. That makes sure that loads are correctly ordered
with respect to the first of the pair.

Add a check for the ssacheck builder, that there is only one
live store at a time. I thought we already had such a check, but
apparently not...

Fixes #20335

Change-Id: I59eb3446a329100af38d22820b1ca2190ca46a78
Reviewed-on: https://go-review.googlesource.com/43411
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/schedule.go
test/fixedbugs/issue20335.go [new file with mode: 0644]