]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/ssa: fix (MOVWZreg (RLWINM)) folding on PPC64
authorPaul E. Murphy <murp@ibm.com>
Wed, 5 Jun 2024 21:12:49 +0000 (16:12 -0500)
committerPaul Murphy <murp@ibm.com>
Fri, 7 Jun 2024 19:02:52 +0000 (19:02 +0000)
commitd5e5b143057921721061c3f39f14061370e4a732
tree92d80a72e33948ae14aa0f758f60bb887f4aaf49
parente709992afda6a96f0a5691aaf0883e3cfbd46946
cmd/compile/ssa: fix (MOVWZreg (RLWINM)) folding on PPC64

RLIWNM does not clear the upper 32 bits of the target register if
the mask wraps around (e.g 0xF000000F). Don't elide MOVWZreg for
such masks. All other usage clears the upper 32 bits.

Fixes #67844.

Change-Id: I11b89f1da9ae077624369bfe2bf25e9b7c9b79bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/590896
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssa/_gen/PPC64.rules
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewritePPC64.go
test/codegen/bits.go