From: Keith Randall Date: Tue, 12 Sep 2023 23:15:59 +0000 (-0700) Subject: cmd/compile: reset memcombine correctly between basic blocks X-Git-Tag: go1.22rc1~814 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=08cdfd06ed1ca21f3b8c95361506ab94c429b622;p=gostls13.git 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 #62604 Change-Id: If0be4acb6eafc3d7eeb42d2f4263c21b4e6e1c7d Reviewed-on: https://go-review.googlesource.com/c/go/+/527699 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI Reviewed-by: Heschi Kreinick --- diff --git a/src/cmd/compile/internal/ssa/memcombine.go b/src/cmd/compile/internal/ssa/memcombine.go index 5c26fec7fe..8e3db5a378 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