]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: zero extend when replacing load-hit-store on s390x
authorMichael Munday <munday@ca.ibm.com>
Fri, 17 Feb 2017 00:53:08 +0000 (19:53 -0500)
committerMichael Munday <munday@ca.ibm.com>
Wed, 22 Feb 2017 16:22:49 +0000 (16:22 +0000)
commit094992e22aaa1d7091659b63b5cadfe947372277
tree71266ff20b1ecbf43e45927f578a295baa059951
parent11b283092a29a9d402ce05706fd3a85683576218
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