]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.24] cmd/compile/internal/ssa: fix PPC64 merging of (AND (S[RL...
authorPaul Murphy <paumurph@redhat.com>
Wed, 4 Jun 2025 13:51:11 +0000 (08:51 -0500)
committerCherry Mui <cherryyz@google.com>
Thu, 12 Jun 2025 03:49:41 +0000 (20:49 -0700)
commit7d08a16fbac95b891ce8e87e1605be0fc789818b
tree35eb410789896fc0203b6652256e29c329b8251b
parent5f2cbe1f643f0ce3a314d41d2eca05d2510f3078
[release-branch.go1.24] 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 #74098

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>
Reviewed-on: https://go-review.googlesource.com/c/go/+/680835
src/cmd/compile/internal/ssa/rewrite.go
test/codegen/shift.go