]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.20] cmd/compile: fix bswap/load rewrite rules
authorKeith Randall <khr@golang.org>
Thu, 4 May 2023 16:30:24 +0000 (09:30 -0700)
committerCherry Mui <cherryyz@google.com>
Thu, 11 May 2023 14:16:07 +0000 (14:16 +0000)
commitafbe101950164289997a804ed992d86b3c5688d8
tree8fa33b8e3ba30fc94cd3189f77a03c538d8dfdf6
parent324c3ace2d2e4e30949baa23b4c9aac8a4123317
[release-branch.go1.20] cmd/compile: fix bswap/load rewrite rules

When combining a byteswap and a load, the resulting combined op
must go in the load's block, not the byteswap's block, as the load
has a memory argument that might only be valid in its original block.

Fixes #59975

Change-Id: Icd84863ef3a9ca1fc22f2bb794a003f2808c746f
Reviewed-on: https://go-review.googlesource.com/c/go/+/492616
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Keith Randall <khr@google.com>
(cherry picked from commit 10141676d15665ed8a0255cfc5585ad50444f4ee)
Reviewed-on: https://go-review.googlesource.com/c/go/+/492696
src/cmd/compile/internal/ssa/_gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go