]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve s390x SSA rules for logical ops
authorMichael Munday <munday@ca.ibm.com>
Fri, 21 Oct 2016 12:39:39 +0000 (08:39 -0400)
committerMichael Munday <munday@ca.ibm.com>
Wed, 26 Oct 2016 12:30:28 +0000 (12:30 +0000)
commit3202aa7800aeb523a7af2015241f96e9ae46bfbc
treee2932e506e8cb31cdd14441d62ee801039b5f17b
parent2481481ff798636907376bfdf7e8c7558b8b930e
cmd/compile: improve s390x SSA rules for logical ops

This CL introduces some minor changes to match rules more closely
to the instructions they are targeting. s390x logical operation
with immediate instructions typically leave some bits in the
target register unchanged. This means for example that an XOR
with -1 requires 2 instructions. It is better in cases such as
this to create a constant and leave it visible to the compiler
so that it can be reused rather than hiding it in the assembler.

This CL also tweaks the rules a bit to ensure that constants are
folded when possible.

Change-Id: I1c6dee31ece00fc3c5fdf6a24f1abbc91dd2db2a
Reviewed-on: https://go-review.googlesource.com/31754
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/S390X.rules
src/cmd/compile/internal/ssa/rewriteS390X.go