]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: force folding of MOVDaddr into storezero
authorKeith Randall <khr@golang.org>
Fri, 30 Sep 2016 16:03:38 +0000 (09:03 -0700)
committerKeith Randall <khr@golang.org>
Tue, 4 Oct 2016 16:10:27 +0000 (16:10 +0000)
commit6300161d40e50902e16b3144c36aaf9279ab6208
tree30e5251d8c4eeb903a96f0ff23a79e2181103fe7
parent7d0642d9d6a7a9c06d422904632ab61668e24a9e
cmd/compile: force folding of MOVDaddr into storezero

Fold MOVDaddr ops into MOVXstorezero ops.
Also fold ADDconst into MOVDaddr so we're sure there isn't
(MOVDstorezero (ADDconst (MOVDaddr ..)))

Without this CL, we get:

v1 = MOVDaddr {s}
v2 = VARDEF {s}
v3 = MOVDstorezero v1 v2

The liveness pass thinks the MOVDaddr is a read of s, so s is
incorrectly thought to be live at the start of the function.

Fixes #17194

Change-Id: I2b4a2f13b12aa5b072941ee1c7b89f3793650cdc
Reviewed-on: https://go-review.googlesource.com/30086
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Michael Munday <munday@ca.ibm.com>
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/rewritePPC64.go
test/fixedbugs/issue17194.go [new file with mode: 0644]