]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix memcombine pass for big endian, > 1 byte elements
authorKeith Randall <khr@golang.org>
Thu, 30 Nov 2023 18:04:16 +0000 (10:04 -0800)
committerKeith Randall <khr@google.com>
Thu, 30 Nov 2023 18:35:50 +0000 (18:35 +0000)
commitbda1ef13f8f9954d20b712ece649776c272f8526
tree0eccf5a34882c8b8263439f063f8383b949e58de
parent76d90a34dd39b3e218e4c201d4497dca09c1cd6f
cmd/compile: fix memcombine pass for big endian, > 1 byte elements

The shift amounts were wrong in this case, leading to miscompilation
of load combining.

Also the store combining was not triggering when it should.

Fixes #64468

Change-Id: Iaeb08972c5fc1d6f628800334789c6af7216e87b
Reviewed-on: https://go-review.googlesource.com/c/go/+/546355
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.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/memcombine.go
src/cmd/compile/internal/test/memcombine_test.go
test/codegen/memcombine.go