diff options
| author | Paul E. Murphy <murp@ibm.com> | 2024-03-27 16:03:11 -0500 |
|---|---|---|
| committer | Paul Murphy <murp@ibm.com> | 2024-08-26 17:02:43 +0000 |
| commit | 2b0a157d68365dc9515bd643ab0f5d0cd537cd8f (patch) | |
| tree | 1a1be07baee109fbd9784ffbf81f7636d0933439 /test/codegen | |
| parent | 7c7d6d31f3a88d79d66ae2224e1a8ef61da4cd67 (diff) | |
| download | go-2b0a157d68365dc9515bd643ab0f5d0cd537cd8f.tar.xz | |
cmd/compile: intrinsify math.MulUintptr on PPC64
This can be done efficiently with few instructions.
This also adds MULHDUCC for further codegen improvement.
Change-Id: I06320ba4383a679341b911a237a360ef07b19168
Reviewed-on: https://go-review.googlesource.com/c/go/+/605975
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Archana Ravindar <aravinda@redhat.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'test/codegen')
| -rw-r--r-- | test/codegen/bool.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/codegen/bool.go b/test/codegen/bool.go index 0daeb88b9b..164ca1b224 100644 --- a/test/codegen/bool.go +++ b/test/codegen/bool.go @@ -273,6 +273,12 @@ func TestLogicalCompareZero(x *[64]uint64) { x[12] = uint64(c) } + // ppc64x:"MULHDUCC",^"MULHDU" + hi, _ := bits.Mul64(x[13], x[14]) + if hi != 0 { + x[14] = hi + } + } func constantWrite(b bool, p *bool) { |
