aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2023-09-12 16:15:59 -0700
committerThan McIntosh <thanm@google.com>2023-09-25 13:05:39 +0000
commit41d71a5afa409d007b82b9764afa1026abbb7099 (patch)
treef4aceb524bf51126602b8f1ccac36d78586d54a6
parent0b6b0a275af2c60b922bf592833c47633bd8b6e5 (diff)
downloadgo-41d71a5afa409d007b82b9764afa1026abbb7099.tar.gz
go-41d71a5afa409d007b82b9764afa1026abbb7099.zip
[release-branch.go1.21] cmd/compile: reset memcombine correctly between basic blocks
Not sure why this bug didn't cause a complete failure, but it certainly makes for doing a lot more work than is necessary. Fixes #62668 Change-Id: If0be4acb6eafc3d7eeb42d2f4263c21b4e6e1c7d Reviewed-on: https://go-review.googlesource.com/c/go/+/527699 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Heschi Kreinick <heschi@google.com> (cherry picked from commit 08cdfd06ed1ca21f3b8c95361506ab94c429b622) Reviewed-on: https://go-review.googlesource.com/c/go/+/528795 Reviewed-by: Keith Randall <khr@google.com>
-rw-r--r--src/cmd/compile/internal/ssa/memcombine.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/memcombine.go b/src/cmd/compile/internal/ssa/memcombine.go
index b2c5fe3abf..c1346434c9 100644
--- a/src/cmd/compile/internal/ssa/memcombine.go
+++ b/src/cmd/compile/internal/ssa/memcombine.go
@@ -41,6 +41,7 @@ func memcombineLoads(f *Func) {
}
}
for _, b := range f.Blocks {
+ order = order[:0]
for _, v := range b.Values {
if v.Op != OpOr16 && v.Op != OpOr32 && v.Op != OpOr64 {
continue