• Michael Munday's avatar
    cmd/compile: zero extend when replacing load-hit-store on s390x · 094992e2
    Michael Munday authored
    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: 's avatarKeith Randall <khr@golang.org>
    094992e2
loadstore.go 4.93 KB