]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use ANDCC, ORCC, XORCC to avoid CMP on ppc64x
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 10 Oct 2018 17:47:18 +0000 (13:47 -0400)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Fri, 9 Nov 2018 19:40:52 +0000 (19:40 +0000)
commit4ae49b592110055d2461c708bc2b85b049deb535
tree8951ec0faaadce8cea89e72580ac80ab79bdb92a
parent410d63dbe9316c54c897619d36e1b0c5a424e24e
cmd/compile: use ANDCC, ORCC, XORCC to avoid CMP on ppc64x

This change makes use of the cc versions of the AND, OR, XOR
instructions, omitting the need for a CMP instruction.

In many test programs and in the go binary, this reduces the
size of 20-30 functions by at least 1 instruction, many in
runtime.

Testcase added to test/codegen/comparisons.go

Change-Id: I6cc1ca8b80b065d7390749c625bc9784b0039adb
Reviewed-on: https://go-review.googlesource.com/c/143059
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Reviewed-by: Michael Munday <mike.munday@ibm.com>
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/ppc64/ssa.go
src/cmd/compile/internal/ssa/gen/PPC64.rules
src/cmd/compile/internal/ssa/gen/PPC64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewritePPC64.go
test/codegen/comparisons.go