]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[release-branch.go1.21] cmd/compile: reset memcombine correctly between basic blocks
authorKeith Randall <khr@golang.org>
Tue, 12 Sep 2023 23:15:59 +0000 (16:15 -0700)
committerThan McIntosh <thanm@google.com>
Mon, 25 Sep 2023 13:05:39 +0000 (13:05 +0000)
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>
src/cmd/compile/internal/ssa/memcombine.go

index b2c5fe3abf8728ee8ed021387789f088a51dd87e..c1346434c9daa10898735081f803194610857edc 100644 (file)
@@ -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