]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: fix PPC64 merging of (AND (S[RL]Dconst ...)
authorPaul Murphy <paumurph@redhat.com>
Wed, 4 Jun 2025 13:51:11 +0000 (08:51 -0500)
committerGopher Robot <gobot@golang.org>
Tue, 10 Jun 2025 03:33:27 +0000 (20:33 -0700)
commitee7bfbdbcc75c17c9f6f357f7950cfae0d63811c
treef72750fc6f1168397c7e836f393f920771d72496
parent985d600f3aa8654b854f8b2c822552c052ed3d30
cmd/compile/internal/ssa: fix PPC64 merging of (AND (S[RL]Dconst ...)

CL 622236 forgot to check the mask was also a 32 bit rotate mask. Add
a modified version of isPPC64WordRotateMask which valids the mask is
contiguous and fits inside a uint32.

I don't this is possible when merging SRDconst, the first check should
always reject such combines. But, be extra careful and do it there
too.

Fixes #73153

Change-Id: Ie95f74ec5e7d89dc761511126db814f886a7a435
Reviewed-on: https://go-review.googlesource.com/c/go/+/679775
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Jayanth Krishnamurthy <jayanth.krishnamurthy@ibm.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/rewrite.go
test/codegen/shift.go