]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add rules to emit SETBC/R instructions on power10
authorArchana R <aravind5@in.ibm.com>
Fri, 11 Nov 2022 12:10:59 +0000 (06:10 -0600)
committerLynn Boger <laboger@linux.vnet.ibm.com>
Mon, 6 Feb 2023 12:49:53 +0000 (12:49 +0000)
commita432d89137ae09c76717695064d8b1b13344b32b
tree3ed444efe65aab9376641c7e6fc0390de75b74f5
parentdef0be5e34d6657c84407c8afe4ace05d10d1848
cmd/compile: add rules to emit SETBC/R instructions on power10

This CL adds rules that replaces instances of ISEL that produce
a boolean result based on a condition register by SETBC/SETBCR
operations. On Power10 these are convereted to SETBC/SETBCR
instructions that use one register instead of 3 registers
conventionally used by ISEL and hence reduces register pressure.
On loops written specifically to exercise such instances of ISEL
extensively, a performance improvement of 2.5% is seen on Power10.
Also added verification tests to verify correct generation of
SETBC/SETBCR instructions on Power10.

Change-Id: Ib719897f09d893de40324440a43052dca026e8fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/449795
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Archana Ravindar <aravind5@in.ibm.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gopher Robot <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/_gen/PPC64latelower.rules
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewritePPC64.go
src/cmd/compile/internal/ssa/rewritePPC64latelower.go
test/codegen/bool.go