]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: fix bswap/load rewrite rules
authorKeith Randall <khr@golang.org>
Thu, 4 May 2023 16:30:24 +0000 (09:30 -0700)
committerKeith Randall <khr@golang.org>
Thu, 4 May 2023 18:01:29 +0000 (18:01 +0000)
commit10141676d15665ed8a0255cfc5585ad50444f4ee
tree6f422a8293cd8aea703ad33aafa4d9e81ef76b03
parentfc106b016cc4ba5dc5a1a44eda7524fdce4463bb
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 #59973

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>
src/cmd/compile/internal/ssa/_gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go