aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorPaul E. Murphy <murp@ibm.com>2024-05-02 15:05:27 -0500
committerPaul Murphy <murp@ibm.com>2024-05-17 15:28:00 +0000
commitd11e41728515aea6f7def4a279a3a2591fb18650 (patch)
treec8e18a09ecf0fb0d298ee15b51b177756600ef29 /test/codegen
parent2f6426834c150c37cdb1330b48e9903963d4329c (diff)
downloadgo-d11e41728515aea6f7def4a279a3a2591fb18650.tar.xz
cmd/compile/internal/ssa: cleanup ANDCCconst rewrite rules on PPC64
Avoid creating duplicate usages of ANDCCconst. This is preparation for a patch to reintroduce ANDconst to simplify the lower pass while treating ANDCCconst like other *CC* ssa opcodes. Also, move many of the similar rules wich retarget ANDCCconst users to the flag result to a common rule for all compares against zero. Change-Id: Ida86efe17ff413cb82c349d8ef69d2899361f4c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/585400 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/arithmetic.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go
index dc3bab7be9..e474a10ba2 100644
--- a/test/codegen/arithmetic.go
+++ b/test/codegen/arithmetic.go
@@ -320,14 +320,14 @@ func Pow2DivisibleSigned(n1, n2 int) (bool, bool) {
// amd64:"TESTQ\t[$]63",-"DIVQ",-"SHRQ"
// arm:"AND\t[$]63",-".*udiv",-"SRA"
// arm64:"TST\t[$]63",-"UDIV",-"ASR",-"AND"
- // ppc64x:"RLDICL",-"SRAD"
+ // ppc64x:"ANDCC",-"RLDICL",-"SRAD",-"CMP"
a := n1%64 == 0 // signed divisible
// 386:"TESTL\t[$]63",-"DIVL",-"SHRL"
// amd64:"TESTQ\t[$]63",-"DIVQ",-"SHRQ"
// arm:"AND\t[$]63",-".*udiv",-"SRA"
// arm64:"TST\t[$]63",-"UDIV",-"ASR",-"AND"
- // ppc64x:"RLDICL",-"SRAD"
+ // ppc64x:"ANDCC",-"RLDICL",-"SRAD",-"CMP"
b := n2%64 != 0 // signed indivisible
return a, b