]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] 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:15:56 +0000 (14:15 +0000)
commite738f1303ff1fd2839122bd8f4d2a8f17875cc37
tree578256e84808da75f4c105bcebb7058308409283
parent484330d038d060c6e4db3dc8e6ea2b811b2a44d8
[release-branch.go1.19] 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 #59974

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>
Reviewed-on: https://go-review.googlesource.com/c/go/+/492697
TryBot-Bypass: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go