]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] cmd/compile: fix type propagation through s390x SSA rules
authorMichael Munday <munday@ca.ibm.com>
Fri, 3 Feb 2017 21:47:32 +0000 (16:47 -0500)
committerMichael Munday <munday@ca.ibm.com>
Mon, 6 Feb 2017 16:41:29 +0000 (16:41 +0000)
commit758a7281abb539018d6458ccb429615206fcc002
tree5c7c6460fdcd569c605467f7021f202f0a7161c3
parent470704531d93d1bcc24493abea882f99593bcac6
[release-branch.go1.8] cmd/compile: fix type propagation through s390x SSA rules

This CL fixes two issues:

1. Load ops were initially always lowered to unsigned loads, even
   for signed types. This was fine by itself however LoadReg ops
   (used to re-load spilled values) were lowered to signed loads
   for signed types. This meant that spills could invalidate
   optimizations that assumed the original unsigned load.

2. Types were not always being maintained correctly through rules
   designed to eliminate unnecessary zero and sign extensions.

Updates #18906 and fixes #18958 (backport of CL 36256 to 1.8).

Change-Id: Id44953b0f644cad047e8474edbd24e8a344ca9a7
Reviewed-on: https://go-review.googlesource.com/36350
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/s390x/ssa.go
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/gen/S390XOps.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteS390X.go
test/fixedbugs/issue18906.go [new file with mode: 0644]