]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] cmd/compile: zero extend when replacing load-hit-store on...
authorMichael Munday <munday@ca.ibm.com>
Fri, 17 Feb 2017 00:53:08 +0000 (19:53 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 19 Oct 2017 20:37:32 +0000 (16:37 -0400)
commit235fe5d0724da3e8465d7c712de93ac26e786397
tree1abe35896d1512b1d91aed341b9c77e4559a6bc1
parent2ef4a8565be563f41703527ce1cbd965fb57aa98
[release-branch.go1.8] cmd/compile: zero extend when replacing load-hit-store on s390x

Keith pointed out that these rules should zero extend during the review
of CL 36845. In practice the generic rules are responsible for eliminating
most load-hit-stores and they do not have this problem. When the s390x
rules are triggered any cast following the elided load-hit-store is
kept because of the sequence the rules are applied in (i.e. the load is
removed before the zero extension gets a chance to be merged into the load).
It is therefore not clear that this issue results in any functional bugs.

This CL includes a test, but it only tests the generic rules currently.

Change-Id: Idbc43c782097a3fb159be293ec3138c5b36858ad
Reviewed-on: https://go-review.googlesource.com/37154
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/testdata/loadstore.go
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/rewriteS390X.go