diff options
| author | Junyang Shao <shaojunyang@google.com> | 2025-05-21 18:50:39 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-05-21 12:17:08 -0700 |
| commit | d6c29c71562df407cc18846efd2e9d8fe0b28960 (patch) | |
| tree | 0d61eabe865c914698d1ae43cc5afa1a6a94f239 /src/cmd/compile | |
| parent | a21b71daf57a54a12c2aedff0fba0860fa977590 (diff) | |
| download | go-d6c29c71562df407cc18846efd2e9d8fe0b28960.tar.xz | |
cmd/compile: fix offset calculation error in memcombine
Fixes #73812
Change-Id: If7a6e103ae9e1442a2cf4a3c6b1270b6a1887196
Reviewed-on: https://go-review.googlesource.com/c/go/+/675175
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/compile')
| -rw-r--r-- | src/cmd/compile/internal/ssa/memcombine.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/memcombine.go b/src/cmd/compile/internal/ssa/memcombine.go index 416f5540a7..b8fcd39495 100644 --- a/src/cmd/compile/internal/ssa/memcombine.go +++ b/src/cmd/compile/internal/ssa/memcombine.go @@ -581,7 +581,7 @@ func combineStores(root *Value) { mask := int64(1)<<(8*a[i].size) - 1 s := 8 * (a[i].offset - a[0].offset) if root.Block.Func.Config.BigEndian { - s = aTotalSize*8 - a[i].size - s + s = (aTotalSize-a[i].size)*8 - s } c |= (a[i].store.Args[1].AuxInt & mask) << s } |
