commit | 41d71a5afa409d007b82b9764afa1026abbb7099 | [log] [tgz] |
---|---|---|
author | Keith Randall <khr@golang.org> | Tue Sep 12 16:15:59 2023 -0700 |
committer | Than McIntosh <thanm@google.com> | Mon Sep 25 13:05:39 2023 +0000 |
tree | f4aceb524bf51126602b8f1ccac36d78586d54a6 | |
parent | 0b6b0a275af2c60b922bf592833c47633bd8b6e5 [diff] |
[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>
diff --git a/src/cmd/compile/internal/ssa/memcombine.go b/src/cmd/compile/internal/ssa/memcombine.go index b2c5fe3..c134643 100644 --- a/src/cmd/compile/internal/ssa/memcombine.go +++ b/src/cmd/compile/internal/ssa/memcombine.go
@@ -41,6 +41,7 @@ } } for _, b := range f.Blocks { + order = order[:0] for _, v := range b.Values { if v.Op != OpOr16 && v.Op != OpOr32 && v.Op != OpOr64 { continue