[go] cmd/compile: improve stp merging for non-sequent cases

8 views
Skip to first unread message

Denis Melnikov (Gerrit)

unread,
Mar 27, 2026, 6:17:44 AM (13 days ago) Mar 27
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Denis Melnikov has uploaded the change for review

Commit message

cmd/compile: improve stp merging for non-sequent cases

Original algorithm merges stores with the first
mergeable store in the chain, but it misses some
cases. Additionally, creating list of STs, which
store data to adjacent memory cells allows merging them
according to the direction of increase of their addresses.

I have already tried another algorithm in CL 698097,
but it was reverted. This algorithm works differently
and fixes bug, generated by variant from another CL.

Fixes #71987, #75365

There are the results of sweet benchmarks
│ base.stat │ opt.stat │
│ sec/op │ sec/op vs base │
ESBuildThreeJS-4 1.088 ± 2% 1.086 ± 1% ~ (p=1.000 n=10)
ESBuildRomeTS-4 263.0m ± 2% 260.8m ± 1% ~ (p=0.105 n=10)
EtcdPut-4 73.08m ± 1% 73.16m ± 1% ~ (p=0.971 n=10)
EtcdSTM-4 414.9m ± 1% 415.4m ± 1% ~ (p=0.393 n=10)
GoBuildKubelet-4 203.3 ± 0% 203.5 ± 0% ~ (p=0.393 n=10)
GoBuildKubeletLink-4 19.06 ± 1% 19.05 ± 0% ~ (p=0.280 n=10)
GoBuildIstioctl-4 156.6 ± 0% 156.6 ± 0% ~ (p=0.796 n=10)
GoBuildIstioctlLink-4 14.16 ± 1% 14.18 ± 1% ~ (p=0.853 n=10)
GoBuildFrontend-4 56.45 ± 1% 56.57 ± 0% ~ (p=0.579 n=10)
GoBuildFrontendLink-4 3.635 ± 1% 3.646 ± 0% ~ (p=0.436 n=10)
GoBuildTsgo-4 103.0 ± 1% 103.4 ± 1% ~ (p=0.529 n=10)
GoBuildTsgoLink-4 1.865 ± 1% 1.860 ± 1% ~ (p=0.684 n=10)
GopherLuaKNucleotide-4 33.55 ± 0% 33.58 ± 0% ~ (p=0.075 n=10)
MarkdownRenderXHTML-4 281.0m ± 0% 280.3m ± 0% -0.23% (p=0.019 n=10)
Tile38QueryLoad-4 970.0µ ± 1% 969.3µ ± 0% ~ (p=0.436 n=10)
geomean 3.128 3.128 -0.01%
Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040

Change diff

diff --git a/src/cmd/compile/internal/ssa/pair.go b/src/cmd/compile/internal/ssa/pair.go
index 7595fdb..6c1e074 100644
--- a/src/cmd/compile/internal/ssa/pair.go
+++ b/src/cmd/compile/internal/ssa/pair.go
@@ -320,10 +320,28 @@
return false
}

+type storeList struct {
+ st *Value
+ n int
+ // Index of ST, which store data to
+ // the adjacent memory cell with higher address
+ start bool
+ // Flag if it is start store in chain of STs
+ early bool
+ // Flag if this store is placed earlier
+ // in basic block than next ST (stores[elem.n].st)
+}
+
+const invalidVal = -1
+
func pairStores(f *Func) {
last := f.Cache.allocBoolSlice(f.NumValues())
defer f.Cache.freeBoolSlice(last)

+ var stores []storeList
+ // Index of st in stores
+ var ids = map[ID]int{}
+
// prevStore returns the previous store in the
// same block, or nil if there are none.
prevStore := func(v *Value) *Value {
@@ -338,6 +356,8 @@
}

for _, b := range f.Blocks {
+ stores = stores[:0]
+ clear(ids)
// Find last store in block, so we can
// walk the stores last to first.
// Last to first helps ensure that the rewrites we
@@ -373,14 +393,20 @@
continue // Not advisable to pair.
}
ptr := v.Args[0]
- val := v.Args[1]
- mem := v.Args[2]
off := v.AuxInt
aux := v.Aux

+ var ok bool
+ var vIdx int
+ if vIdx, ok = ids[v.ID]; !ok {
+ vIdx = len(stores)
+ ids[v.ID] = vIdx
+ stores = append(stores, storeList{v, invalidVal, true, true})
+ }
+
// Look for earlier store we can combine with.
- lowerOk := true
- higherOk := true
+ lowerOk := stores[vIdx].start
+ higherOk := stores[vIdx].n == invalidVal
count := 10 // max lookback distance
for w := prevStore(v); w != nil; w = prevStore(w) {
if w.Uses != 1 {
@@ -391,32 +417,7 @@
// all those other uses.)
continue memCheck
}
- if w.Op == v.Op &&
- w.Args[0] == ptr &&
- w.Aux == aux &&
- (lowerOk && w.AuxInt == off-info.width || higherOk && w.AuxInt == off+info.width) {
- // This op is mergeable with v.

- // Commit point.
-
- // ptr val1 val2 mem
- args := []*Value{ptr, val, w.Args[1], mem}
- if w.AuxInt == off-info.width {
- args[1], args[2] = args[2], args[1]
- off -= info.width
- }
- v.reset(info.pair)
- v.AddArgs(args...)
- v.Aux = aux
- v.AuxInt = off
- v.Pos = w.Pos // take position of earlier of the two stores (TODO: not really working?)
-
- // Make w just a memory copy.
- wmem := w.MemoryArg()
- w.reset(OpCopy)
- w.SetArgs1(wmem)
- continue memCheck
- }
if count--; count == 0 {
// Only look back so far.
// This keeps us in O(n) territory, and it
@@ -425,6 +426,38 @@
// needing to spill them).
continue memCheck
}
+
+ var wIdx int
+ if wIdx, ok = ids[w.ID]; !ok {
+ wIdx = len(stores)
+ ids[w.ID] = wIdx
+ stores = append(stores, storeList{w, invalidVal, true, true})
+ }
+
+ if w.Op == v.Op &&
+ w.Args[0] == ptr &&
+ w.Aux == aux &&
+ (lowerOk && w.AuxInt == off-info.width &&
+ stores[wIdx].n == invalidVal ||
+ higherOk && w.AuxInt == off+info.width &&
+ stores[wIdx].start) {
+ // This op is mergeable with v.
+
+ if lowerOk && w.AuxInt == off-info.width &&
+ stores[wIdx].n == invalidVal {
+ stores[vIdx].start = false
+ stores[wIdx].n = vIdx
+ stores[wIdx].early = true
+ lowerOk = false
+ } else {
+ stores[wIdx].start = false
+ stores[vIdx].n = wIdx
+ stores[vIdx].early = false
+ higherOk = false
+ }
+
+ continue
+ }
// We're now looking at a store w which is currently
// between the store v that we're intending to merge into,
// and the store we'll eventually find to merge with it.
@@ -467,5 +500,62 @@
}
}
}
+
+ for i := range stores {
+ elem := &stores[i]
+ // Start pairing from the end of chain of stores
+ if elem.n != invalidVal && elem.start {
+ pairCompatibleStores(elem, stores[:])
+ }
+ }
+ }
+}
+
+func pairCompatibleStores(elem *storeList, stores []storeList) {
+ for {
+ // Mark elem prev as invalid and get w
+ if elem.n == invalidVal {
+ break
+ }
+ v := elem.st
+ w := stores[elem.n].st
+
+ mem := v.MemoryArg()
+ off := v.AuxInt
+ aux := v.Aux
+ wmem := w.MemoryArg()
+
+ // ptr val1 val2 mem
+ args := []*Value{v.Args[0], v.Args[1], w.Args[1], mem}
+
+ // Pair stores to the latest of them
+ if elem.early {
+ v, w = w, v
+ args[3] = wmem
+ mem, wmem = wmem, mem
+ }
+
+ v.reset(pairableStores[v.Op].pair)
+ v.AddArgs(args...)
+ v.Aux = aux
+ v.AuxInt = off
+ v.Pos = w.Pos
+
+ // Make w just a memory copy.
+ w.reset(OpCopy)
+ w.SetArgs1(wmem)
+
+ // Mark this stores as invalid
+ // and get pointer to the next store
+ nextSt := stores[elem.n].n
+ stores[elem.n].n = invalidVal
+ elem.n = invalidVal
+
+ if nextSt == invalidVal {
+ // There is end of chain of stores
+ break
+ }
+ // Get pointer to the next store
+ elem = &stores[nextSt]
}
}
diff --git a/test/codegen/memcombine.go b/test/codegen/memcombine.go
index 6feef26..1bb3133 100644
--- a/test/codegen/memcombine.go
+++ b/test/codegen/memcombine.go
@@ -1062,17 +1062,44 @@
}

func dwstoreBig(p *struct{ a, b, c, d, e, f int64 }, a, b, c, d, e, f int64) {
- // This is not perfect. We merge b+a, then d+e, then c and f have no pair.
+ // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 16\(R[0-9]+\)`
p.c = c
+ // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 32\(R[0-9]+\)`
p.f = f
// arm64:`STP\s\(R[0-9]+, R[0-9]+\), \(R[0-9]+\)`
p.a = a
- // arm64:`STP\s\(R[0-9]+, R[0-9]+\), 24\(R[0-9]+\)`
p.e = e
p.d = d
p.b = b
}

+func dwstoreBigNil(p *struct{ i, j struct{ a, b, c int } }) {
+ // arm64:`STP\s\(ZR, ZR\), 32\(R[0-9]+\)`
+ // arm64:`STP\s\(ZR, ZR\), 16\(R[0-9]+\)`
+ p.j = struct{ a, b, c int }{}
+ // arm64:`STP\s\(ZR, ZR\), \(R[0-9]+\)`
+ p.i = struct{ a, b, c int }{}
+}
+
+func dwstoreString(s *struct {
+ p *byte
+ a string
+ b string
+ c int64
+ d int64
+}) {
+ s.p = nil
+ s.a = "foo"
+ s.b = "foo"
+ s.c = 0
+ s.d = 0
+ // arm64:"STP "
+ s.a = ""
+ // arm64:"STP "
+ s.b = "bar"
+ s.c = 33
+}
+
func dwstoreRet() [2]int {
// arm64:"STP "
return [2]int{5, 6}

Change information

Files:
  • M src/cmd/compile/internal/ssa/pair.go
  • M test/codegen/memcombine.go
Change size: M
Delta: 2 files changed, 148 insertions(+), 31 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
Gerrit-Change-Number: 760100
Gerrit-PatchSet: 1
Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Keith Randall (Gerrit)

unread,
Mar 31, 2026, 1:46:39 PM (8 days ago) Mar 31
to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Denis Melnikov and Martin Möhrmann

Keith Randall added 5 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Keith Randall . unresolved

I'm afraid I can't really follow what is going on in this CL. It needs an expanded comment somewhere describing how it works. What is the algorithm for finding pairs of stores to merge?

 What does it mean to "start" a run? What does "early" mean, and why does it matter?
File src/cmd/compile/internal/ssa/pair.go
Line 326, Patchset 1 (Latest): // Index of ST, which store data to
Keith Randall . unresolved

Generally we put the comment describing a field before the field, not after.

Line 514, Patchset 1 (Latest):func pairCompatibleStores(elem *storeList, stores []storeList) {
Keith Randall . unresolved

This function could use a doc.
What input is it expecting? What side effect does it do?

Line 516, Patchset 1 (Latest): // Mark elem prev as invalid and get w
Keith Randall . unresolved

I don't understand this comment.

File test/codegen/memcombine.go
Line 1084, Patchset 1 (Latest):func dwstoreString(s *struct {
Keith Randall . unresolved

This test is fine, but it's just a test that the optimization was applied. This isn't a correctness test (and isn't the place for such things).

We really need a test in test/fixedbugs/issue75365.go that makes sure that bug does not recur with this CL.

Open in Gerrit

Related details

Attention is currently required from:
  • Denis Melnikov
  • Martin Möhrmann
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
    Gerrit-Change-Number: 760100
    Gerrit-PatchSet: 1
    Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
    Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
    Gerrit-Comment-Date: Tue, 31 Mar 2026 17:46:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Denis Melnikov (Gerrit)

    unread,
    Apr 1, 2026, 11:47:35 AM (8 days ago) Apr 1
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Denis Melnikov and Martin Möhrmann

    Denis Melnikov uploaded new patchset

    Denis Melnikov uploaded patch set #2 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Denis Melnikov
    • Martin Möhrmann
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
    Gerrit-Change-Number: 760100
    Gerrit-PatchSet: 2
    unsatisfied_requirement
    open
    diffy

    Denis Melnikov (Gerrit)

    unread,
    Apr 1, 2026, 11:57:20 AM (8 days ago) Apr 1
    to goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Keith Randall and Martin Möhrmann

    Denis Melnikov added 8 comments

    Patchset-level comments
    Keith Randall . unresolved

    I'm afraid I can't really follow what is going on in this CL. It needs an expanded comment somewhere describing how it works. What is the algorithm for finding pairs of stores to merge?

     What does it mean to "start" a run? What does "early" mean, and why does it matter?
    Denis Melnikov

    I added more comments in code to clarify my algorithm, but if it is not enough, please, tell me.

    File-level comment, Patchset 2 (Latest):
    Denis Melnikov . resolved

    Please, check new comments. I made them expanded.

    File src/cmd/compile/internal/ssa/pair.go
    Line 326, Patchset 1: // Index of ST, which store data to
    Keith Randall . resolved

    Generally we put the comment describing a field before the field, not after.

    Denis Melnikov

    Done

    Line 326, Patchset 1: // Index of ST, which store data to
    Keith Randall . resolved

    Generally we put the comment describing a field before the field, not after.

    Denis Melnikov

    Done

    Line 514, Patchset 1:func pairCompatibleStores(elem *storeList, stores []storeList) {
    Keith Randall . resolved

    This function could use a doc.
    What input is it expecting? What side effect does it do?

    Denis Melnikov

    Done

    Line 516, Patchset 1: // Mark elem prev as invalid and get w
    Keith Randall . unresolved

    I don't understand this comment.

    Denis Melnikov

    I rewrote comments for this part in a better way.

    Line 516, Patchset 1: // Mark elem prev as invalid and get w
    Keith Randall . unresolved

    I don't understand this comment.

    Denis Melnikov

    I rewrote comments for this part in a better way.

    File test/codegen/memcombine.go
    Line 1084, Patchset 1:func dwstoreString(s *struct {
    Keith Randall . resolved

    This test is fine, but it's just a test that the optimization was applied. This isn't a correctness test (and isn't the place for such things).

    We really need a test in test/fixedbugs/issue75365.go that makes sure that bug does not recur with this CL.

    Denis Melnikov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Martin Möhrmann
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
    Gerrit-Change-Number: 760100
    Gerrit-PatchSet: 2
    Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Keith Randall <k...@golang.org>
    Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 15:57:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Keith Randall <k...@golang.org>
    unsatisfied_requirement
    open
    diffy

    Keith Randall (Gerrit)

    unread,
    Apr 1, 2026, 6:03:10 PM (7 days ago) Apr 1
    to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Denis Melnikov and Martin Möhrmann

    Keith Randall added 2 comments

    File src/cmd/compile/internal/ssa/pair.go
    Line 433, Patchset 2 (Latest): continue memCheck
    Keith Randall . unresolved

    This part here makes me really nervous. I think we need to throw everything away when we see such an operation? Or at least flush the possible pairings we have encountered so far and reset to a clean state. Otherwise we'll end up moving stores past loads, which is bad.

    I have a different suggestion that might be more correct, and just as importantly, be much clearer. How about

    ```

    // memChain contains a list of stores with the same ptr/aux pair and
    // nonoverlapping write ranges [AuxInt:AuxInt+writeSize]. All of the
    // elements of memChain can be reordered with each other.
    memChain := []*Value{}
    // writeRanges contains the union of write ranges of entries in memChain.
    writeRanges := shadowRanges{} // from deadstore.go.
    flushMemChain := func() {
    // 1. sort memChain by AuxInt
    // 2. walk through and pair up
    memChain = memChain[:0]

    }
    for _, b := range f.Blocks {
        clear(memChain)
    for v := lastMem; v != nil; v = prevStore(v) {
    if v.Uses != 1 {
    flushMemChain()
    continue
    }
    if len(memChain)>0 && (v.Args[0] != memChain[0].Args[0] || v.Aux != memChain[0].Aux) {
    flushMemChain()
    continue
    }
    if writeRanges.overlaps(v.AuxInt, v.AuxInt+writeSize) {
    flushMemChain()
    continue
    }
    memChain = append(memChain, v)
    writeRanges.add(v.AuxInt, v.AuxInt+writeSize)
    }
    flushMemChain()
    }
    ```

    Now I know exactly what the invariant we are maintaining is. Everything in memChain is reorderable with each other. Any time we encounter a problem, we flush and restart.

    File test/fixedbugs/issue75365.go
    Line 1, Patchset 2 (Latest):// run
    Keith Randall . unresolved

    This file needs a copyright header.
    (Just copy an existing one from this dir and set the year to 2026.)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Denis Melnikov
    • Martin Möhrmann
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
    Gerrit-Change-Number: 760100
    Gerrit-PatchSet: 2
    Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
    Gerrit-Reviewer: Keith Randall <k...@golang.org>
    Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
    Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 22:03:05 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Denis Melnikov (Gerrit)

    unread,
    Apr 4, 2026, 11:28:37 AM (5 days ago) Apr 4
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Denis Melnikov and Martin Möhrmann

    Denis Melnikov uploaded new patchset

    Denis Melnikov uploaded patch set #3 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Denis Melnikov
    • Martin Möhrmann
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
    Gerrit-Change-Number: 760100
    Gerrit-PatchSet: 3
    unsatisfied_requirement
    open
    diffy

    Denis Melnikov (Gerrit)

    unread,
    Apr 4, 2026, 11:31:01 AM (5 days ago) Apr 4
    to goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Keith Randall and Martin Möhrmann

    Denis Melnikov added 5 comments

    Patchset-level comments
    File-level comment, Patchset 1:
    Keith Randall . resolved

    I'm afraid I can't really follow what is going on in this CL. It needs an expanded comment somewhere describing how it works. What is the algorithm for finding pairs of stores to merge?

     What does it mean to "start" a run? What does "early" mean, and why does it matter?
    Denis Melnikov

    I added more comments in code to clarify my algorithm, but if it is not enough, please, tell me.

    Denis Melnikov

    Done

    File-level comment, Patchset 3 (Latest):
    Denis Melnikov . resolved

    Change algorithm according to comments

    File src/cmd/compile/internal/ssa/pair.go
    Line 433, Patchset 2: continue memCheck
    Keith Randall . resolved
    Denis Melnikov

    It is a good variant to solve it. Thank you. Added this algorithm

    Line 516, Patchset 1: // Mark elem prev as invalid and get w
    Keith Randall . resolved

    I don't understand this comment.

    Denis Melnikov

    I rewrote comments for this part in a better way.

    Denis Melnikov

    Done

    File test/fixedbugs/issue75365.go
    Line 1, Patchset 2:// run
    Keith Randall . resolved

    This file needs a copyright header.
    (Just copy an existing one from this dir and set the year to 2026.)

    Denis Melnikov

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Keith Randall
    • Martin Möhrmann
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
      Gerrit-Change-Number: 760100
      Gerrit-PatchSet: 3
      Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
      Gerrit-Reviewer: Keith Randall <k...@golang.org>
      Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
      Gerrit-CC: Gopher Robot <go...@golang.org>
      Gerrit-Attention: Keith Randall <k...@golang.org>
      Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
      Gerrit-Comment-Date: Sat, 04 Apr 2026 15:30:53 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Denis Melnikov <melnikov.denis...@gmail.com>
      Comment-In-Reply-To: Keith Randall <k...@golang.org>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Keith Randall (Gerrit)

      unread,
      Apr 6, 2026, 7:13:33 PM (2 days ago) Apr 6
      to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
      Attention needed from Denis Melnikov and Martin Möhrmann

      Keith Randall added 12 comments

      File src/cmd/compile/internal/ssa/deadstore.go
      Line 181, Patchset 3 (Latest):type shadowRange struct {
      Keith Randall . unresolved

      Maybe add a comment here that the range is inclusive on the bottom end and exclusive on the top end (like Go slices).

      Line 203, Patchset 3 (Latest): if lo <= int64(r.hi) && hi >= int64(r.lo) {
      Keith Randall . unresolved

      I think these tests should not include equality.

      By "overlapped", I presume you mean "has at least one byte in common". In which case, when these are equal, the ranges abut but do not overlap.

      Line 215, Patchset 3 (Latest): if lo < 0 || hi > 0xffff || len(sr.ranges) >= maxShadowRanges {
      return
      }
      Keith Randall . unresolved

      This worries me. `shadowRanges` as used by deadstore can always respond "not shadowed" (not overlapping). It approximates the exact set of ranges with a *smaller* set.
      I think in your use case we need the opposite. The safe return value is "always overlapping". If `shadowRanges` needs to approximate, it needs to use a *larger* approximation to be safe.

      File src/cmd/compile/internal/ssa/pair.go
      Line 323, Patchset 3 (Latest):// pairStores merges ST instructions.
      Keith Randall . unresolved

      store

      Line 344, Patchset 3 (Latest): writeRanges = shadowRanges{}
      Keith Randall . unresolved

      This might be more efficient as `writeRanges.ranges = writeRanges.ranges[:0]` to reuse the backing store.
      Or maybe add that as a `reset` method to `shadowRanges`.

      Line 348, Patchset 3 (Latest): // Sort to put pairable stores together.
      Keith Randall . unresolved

      in decreasing AuxInt

      Line 353, Patchset 3 (Latest): for i := len(memChain) - 1; i > 0; i-- {
      Keith Randall . unresolved

      Seems a bit weird to sort decreasing and then walk backwards. Can we just sort increasing and walk forwards?

      Line 384, Patchset 3 (Latest): writeRanges = shadowRanges{}
      Keith Randall . unresolved

      same here

      Line 401, Patchset 3 (Latest): // or 0 if it is not a store
      Keith Randall . unresolved

      not a store this pass understands.

      Line 420, Patchset 3 (Latest): clear(memChain)
      Keith Randall . unresolved

      Probably you mean `memChain = memChain[:0]`? `clear` doesn't reset the length to 0, it just zeros the elements.

      Line 452, Patchset 3 (Latest): // Cannot merge stores with multiple uses except the first store in the chain.
      Keith Randall . unresolved

      last

      Line 463, Patchset 3 (Latest): if writeRanges.overlaps(v.AuxInt, v.AuxInt+writeSize-1) {
      Keith Randall . unresolved

      Ah, you're using both-inclusive bounds here. I guess maybe that works with the current implementation of `shadowRanges`? But that's not how it is intended to be used. In particular, I don't think range merging will happen.

      Probably best to use it the same way as deadstore does, with inclusive min and exclusive max.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Denis Melnikov
      • Martin Möhrmann
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
        Gerrit-Change-Number: 760100
        Gerrit-PatchSet: 3
        Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
        Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
        Gerrit-Comment-Date: Mon, 06 Apr 2026 23:13:27 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Keith Randall (Gerrit)

        unread,
        Apr 6, 2026, 7:42:45 PM (2 days ago) Apr 6
        to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Denis Melnikov and Martin Möhrmann

        Keith Randall added 1 comment

        File src/cmd/compile/internal/ssa/pair.go
        Line 463, Patchset 3 (Latest): if writeRanges.overlaps(v.AuxInt, v.AuxInt+writeSize-1) {
        Keith Randall . unresolved

        Ah, you're using both-inclusive bounds here. I guess maybe that works with the current implementation of `shadowRanges`? But that's not how it is intended to be used. In particular, I don't think range merging will happen.

        Probably best to use it the same way as deadstore does, with inclusive min and exclusive max.

        Keith Randall

        Or, just don't use shadowStore and walk the set of stores in memChain every time. It shouldn't be that expensive, and we can bound the length of the chain to a reasonable constant (100?) to make it not O(n^2).

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Denis Melnikov
        • Martin Möhrmann
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
        Gerrit-Change-Number: 760100
        Gerrit-PatchSet: 3
        Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
        Gerrit-Reviewer: Keith Randall <k...@golang.org>
        Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
        Gerrit-CC: Gopher Robot <go...@golang.org>
        Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
        Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
        Gerrit-Comment-Date: Mon, 06 Apr 2026 23:42:40 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Keith Randall <k...@golang.org>
        unsatisfied_requirement
        open
        diffy

        Denis Melnikov (Gerrit)

        unread,
        Apr 8, 2026, 7:39:06 AM (17 hours ago) Apr 8
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
        Attention needed from Denis Melnikov and Martin Möhrmann

        Denis Melnikov uploaded new patchset

        Denis Melnikov uploaded patch set #4 to this change.
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Denis Melnikov
        • Martin Möhrmann
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
        Gerrit-Change-Number: 760100
        Gerrit-PatchSet: 4
        unsatisfied_requirement
        open
        diffy

        Denis Melnikov (Gerrit)

        unread,
        Apr 8, 2026, 7:48:03 AM (17 hours ago) Apr 8
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
        Attention needed from Denis Melnikov and Martin Möhrmann

        Denis Melnikov uploaded new patchset

        Denis Melnikov uploaded patch set #5 to this change.
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Denis Melnikov
        • Martin Möhrmann
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
        Gerrit-Change-Number: 760100
        Gerrit-PatchSet: 5
        unsatisfied_requirement
        open
        diffy

        Denis Melnikov (Gerrit)

        unread,
        Apr 8, 2026, 7:53:57 AM (17 hours ago) Apr 8
        to goph...@pubsubhelper.golang.org, Keith Randall, Martin Möhrmann, Gopher Robot, golang-co...@googlegroups.com
        Attention needed from Keith Randall and Martin Möhrmann

        Denis Melnikov added 14 comments

        Patchset-level comments
        File-level comment, Patchset 4:
        Denis Melnikov . resolved

        Leave shadowRanges. Walk through memChain to check overlapping of stores' locations nstead of it. Change walking forwards instead of backwards in flushMemChain.

        File src/cmd/compile/internal/ssa/deadstore.go
        Line 181, Patchset 3:type shadowRange struct {
        Keith Randall . resolved

        Maybe add a comment here that the range is inclusive on the bottom end and exclusive on the top end (like Go slices).

        Denis Melnikov

        Done

        Line 203, Patchset 3: if lo <= int64(r.hi) && hi >= int64(r.lo) {
        Keith Randall . resolved

        I think these tests should not include equality.

        By "overlapped", I presume you mean "has at least one byte in common". In which case, when these are equal, the ranges abut but do not overlap.

        Denis Melnikov

        Done

        Line 215, Patchset 3: if lo < 0 || hi > 0xffff || len(sr.ranges) >= maxShadowRanges {
        return
        }
        Keith Randall . resolved

        This worries me. `shadowRanges` as used by deadstore can always respond "not shadowed" (not overlapping). It approximates the exact set of ranges with a *smaller* set.
        I think in your use case we need the opposite. The safe return value is "always overlapping". If `shadowRanges` needs to approximate, it needs to use a *larger* approximation to be safe.

        Denis Melnikov

        Done

        File src/cmd/compile/internal/ssa/pair.go
        Line 323, Patchset 3:// pairStores merges ST instructions.
        Keith Randall . resolved

        store

        Denis Melnikov

        Done

        Line 344, Patchset 3: writeRanges = shadowRanges{}
        Keith Randall . resolved

        This might be more efficient as `writeRanges.ranges = writeRanges.ranges[:0]` to reuse the backing store.
        Or maybe add that as a `reset` method to `shadowRanges`.

        Denis Melnikov

        Done

        Line 348, Patchset 3: // Sort to put pairable stores together.
        Keith Randall . resolved

        in decreasing AuxInt

        Denis Melnikov

        Done

        Line 353, Patchset 3: for i := len(memChain) - 1; i > 0; i-- {
        Keith Randall . resolved

        Seems a bit weird to sort decreasing and then walk backwards. Can we just sort increasing and walk forwards?

        Denis Melnikov

        I did it to count len of memChain only one time.

        Line 353, Patchset 3: for i := len(memChain) - 1; i > 0; i-- {
        Keith Randall . resolved

        Seems a bit weird to sort decreasing and then walk backwards. Can we just sort increasing and walk forwards?

        Denis Melnikov

        I did it to count len of memChain only one time.

        Line 384, Patchset 3: writeRanges = shadowRanges{}
        Keith Randall . resolved

        same here

        Denis Melnikov

        Done

        Line 401, Patchset 3: // or 0 if it is not a store
        Keith Randall . resolved

        not a store this pass understands.

        Denis Melnikov

        Done

        Line 420, Patchset 3: clear(memChain)
        Keith Randall . resolved

        Probably you mean `memChain = memChain[:0]`? `clear` doesn't reset the length to 0, it just zeros the elements.

        Denis Melnikov

        Done

        Line 452, Patchset 3: // Cannot merge stores with multiple uses except the first store in the chain.
        Keith Randall . resolved

        last

        Denis Melnikov

        Done

        Line 463, Patchset 3: if writeRanges.overlaps(v.AuxInt, v.AuxInt+writeSize-1) {
        Keith Randall . resolved

        Ah, you're using both-inclusive bounds here. I guess maybe that works with the current implementation of `shadowRanges`? But that's not how it is intended to be used. In particular, I don't think range merging will happen.

        Probably best to use it the same way as deadstore does, with inclusive min and exclusive max.

        Keith Randall

        Or, just don't use shadowStore and walk the set of stores in memChain every time. It shouldn't be that expensive, and we can bound the length of the chain to a reasonable constant (100?) to make it not O(n^2).

        Denis Melnikov

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Keith Randall
        • Martin Möhrmann
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
          Gerrit-Change-Number: 760100
          Gerrit-PatchSet: 5
          Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-Reviewer: Martin Möhrmann <moeh...@google.com>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-Attention: Keith Randall <k...@golang.org>
          Gerrit-Attention: Martin Möhrmann <moeh...@google.com>
          Gerrit-Comment-Date: Wed, 08 Apr 2026 11:53:50 +0000
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Keith Randall (Gerrit)

          unread,
          Apr 8, 2026, 10:59:23 AM (14 hours ago) Apr 8
          to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Denis Melnikov

          Keith Randall voted and added 2 comments

          Votes added by Keith Randall

          Code-Review+2
          Commit-Queue+1

          2 comments

          Patchset-level comments
          File-level comment, Patchset 5 (Latest):
          Keith Randall . resolved

          Looking pretty good now, thanks.

          File src/cmd/compile/internal/ssa/pair.go
          Line 451, Patchset 5 (Latest): if v.Uses != 1 && len(memChain) > 0 || writeSize == 0 {
          Keith Randall . unresolved

          I think in the `v.Uses != 1` case, we don't need to `continue`, we could start a new memchain. So maybe these two cases should be separated?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Denis Melnikov
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
          Gerrit-Change-Number: 760100
          Gerrit-PatchSet: 5
          Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
          Gerrit-Comment-Date: Wed, 08 Apr 2026 14:59:18 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Keith Randall (Gerrit)

          unread,
          Apr 8, 2026, 11:17:05 AM (13 hours ago) Apr 8
          to Denis Melnikov, goph...@pubsubhelper.golang.org, Go LUCI, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Denis Melnikov

          Keith Randall voted Commit-Queue+1

          Commit-Queue+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Denis Melnikov
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
          Gerrit-Change-Number: 760100
          Gerrit-PatchSet: 5
          Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
          Gerrit-Comment-Date: Wed, 08 Apr 2026 15:17:00 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Denis Melnikov (Gerrit)

          unread,
          Apr 8, 2026, 11:27:38 AM (13 hours ago) Apr 8
          to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Denis Melnikov and Keith Randall

          Denis Melnikov uploaded new patchset

          Denis Melnikov uploaded patch set #6 to this change.
          Following approvals got outdated and were removed:
          • Code-Review: +2 by Keith Randall
          • TryBots-Pass: LUCI-TryBot-Result-1 by Go LUCI
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Denis Melnikov
          • Keith Randall
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
          Gerrit-Change-Number: 760100
          Gerrit-PatchSet: 6
          Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
          Gerrit-Reviewer: Keith Randall <k...@golang.org>
          Gerrit-CC: Gopher Robot <go...@golang.org>
          Gerrit-Attention: Keith Randall <k...@golang.org>
          Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
          unsatisfied_requirement
          open
          diffy

          Denis Melnikov (Gerrit)

          unread,
          Apr 8, 2026, 11:32:17 AM (13 hours ago) Apr 8
          to goph...@pubsubhelper.golang.org, Go LUCI, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
          Attention needed from Keith Randall

          Denis Melnikov added 2 comments

          Patchset-level comments
          File-level comment, Patchset 6 (Latest):
          Denis Melnikov . resolved

          Change behavior when v.Uses != 1 && len(memChain) > 0. Merge 3 conditions to make it branchless.

          File src/cmd/compile/internal/ssa/pair.go
          Line 451, Patchset 5: if v.Uses != 1 && len(memChain) > 0 || writeSize == 0 {
          Keith Randall . resolved

          I think in the `v.Uses != 1` case, we don't need to `continue`, we could start a new memchain. So maybe these two cases should be separated?

          Denis Melnikov

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Keith Randall
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
            Gerrit-Change-Number: 760100
            Gerrit-PatchSet: 6
            Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
            Gerrit-Reviewer: Keith Randall <k...@golang.org>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Keith Randall <k...@golang.org>
            Gerrit-Comment-Date: Wed, 08 Apr 2026 15:32:10 +0000
            unsatisfied_requirement
            satisfied_requirement
            open
            diffy

            Keith Randall (Gerrit)

            unread,
            Apr 8, 2026, 3:27:21 PM (9 hours ago) Apr 8
            to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Go LUCI, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Denis Melnikov

            Keith Randall voted

            Auto-Submit+1
            Code-Review+2
            Commit-Queue+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Denis Melnikov
            Submit Requirements:
            • requirement satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
            Gerrit-Change-Number: 760100
            Gerrit-PatchSet: 6
            Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
            Gerrit-Reviewer: Keith Randall <k...@golang.org>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
            Gerrit-Comment-Date: Wed, 08 Apr 2026 19:27:14 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Keith Randall (Gerrit)

            unread,
            Apr 8, 2026, 3:27:28 PM (9 hours ago) Apr 8
            to Denis Melnikov, goph...@pubsubhelper.golang.org, Keith Randall, Go LUCI, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Denis Melnikov

            Keith Randall voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Denis Melnikov
            Submit Requirements:
            • requirement satisfiedCode-Review
            • requirement satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            • requirement is not satisfiedTryBots-Pass
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: go
            Gerrit-Branch: master
            Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
            Gerrit-Change-Number: 760100
            Gerrit-PatchSet: 6
            Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
            Gerrit-Reviewer: Keith Randall <k...@golang.org>
            Gerrit-Reviewer: Keith Randall <k...@google.com>
            Gerrit-CC: Gopher Robot <go...@golang.org>
            Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
            Gerrit-Comment-Date: Wed, 08 Apr 2026 19:27:24 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Denis Melnikov (Gerrit)

            unread,
            Apr 8, 2026, 4:18:11 PM (8 hours ago) Apr 8
            to goph...@pubsubhelper.golang.org, Mark Freeman, Go LUCI, Keith Randall, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
            Attention needed from Mark Freeman

            Denis Melnikov added 1 comment

            Patchset-level comments
            Denis Melnikov . resolved

            Add Mark Freeman for getting comments or +1 from one more maintainer. Mark put +1 on my previous patch of this pass.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Mark Freeman
            Submit Requirements:
              • requirement satisfiedCode-Review
              • requirement satisfiedNo-Unresolved-Comments
              • requirement is not satisfiedReview-Enforcement
              • requirement satisfiedTryBots-Pass
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: go
              Gerrit-Branch: master
              Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
              Gerrit-Change-Number: 760100
              Gerrit-PatchSet: 6
              Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
              Gerrit-Reviewer: Keith Randall <k...@golang.org>
              Gerrit-Reviewer: Keith Randall <k...@google.com>
              Gerrit-Reviewer: Mark Freeman <markf...@google.com>
              Gerrit-CC: Gopher Robot <go...@golang.org>
              Gerrit-Attention: Mark Freeman <markf...@google.com>
              Gerrit-Comment-Date: Wed, 08 Apr 2026 20:18:04 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Mark Freeman (Gerrit)

              unread,
              Apr 8, 2026, 5:20:11 PM (7 hours ago) Apr 8
              to Denis Melnikov, goph...@pubsubhelper.golang.org, Go LUCI, Keith Randall, Keith Randall, Gopher Robot, golang-co...@googlegroups.com
              Attention needed from Denis Melnikov

              Mark Freeman voted Code-Review+1

              Code-Review+1
              Open in Gerrit

              Related details

              Attention is currently required from:
              • Denis Melnikov
              Submit Requirements:
                • requirement satisfiedCode-Review
                • requirement satisfiedNo-Unresolved-Comments
                • requirement satisfiedReview-Enforcement
                • requirement satisfiedTryBots-Pass
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: comment
                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
                Gerrit-Change-Number: 760100
                Gerrit-PatchSet: 6
                Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
                Gerrit-Reviewer: Keith Randall <k...@golang.org>
                Gerrit-Reviewer: Keith Randall <k...@google.com>
                Gerrit-Reviewer: Mark Freeman <markf...@google.com>
                Gerrit-CC: Gopher Robot <go...@golang.org>
                Gerrit-Attention: Denis Melnikov <melnikov.denis...@gmail.com>
                Gerrit-Comment-Date: Wed, 08 Apr 2026 21:20:07 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                satisfied_requirement
                open
                diffy

                Gopher Robot (Gerrit)

                unread,
                Apr 8, 2026, 5:21:47 PM (7 hours ago) Apr 8
                to Denis Melnikov, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Mark Freeman, Go LUCI, Keith Randall, Keith Randall, golang-co...@googlegroups.com

                Gopher Robot submitted the change

                Change information

                Reviewed-by: Mark Freeman <markf...@google.com>
                Reviewed-by: Keith Randall <k...@golang.org>
                Reviewed-by: Keith Randall <k...@google.com>
                Auto-Submit: Keith Randall <k...@golang.org>
                Files:
                • M src/cmd/compile/internal/ssa/pair.go
                • M test/codegen/memcombine.go
                • A test/fixedbugs/issue75365.go
                • A test/fixedbugs/issue75365.out
                Change size: L
                Delta: 4 files changed, 156 insertions(+), 100 deletions(-)
                Branch: refs/heads/master
                Submit Requirements:
                • requirement satisfiedCode-Review: +1 by Keith Randall, +2 by Keith Randall, +1 by Mark Freeman
                • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
                Open in Gerrit
                Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
                Gerrit-MessageType: merged
                Gerrit-Project: go
                Gerrit-Branch: master
                Gerrit-Change-Id: Ia548b43601b1bdb1c1723d300a4b8b907ab0c040
                Gerrit-Change-Number: 760100
                Gerrit-PatchSet: 7
                Gerrit-Owner: Denis Melnikov <melnikov.denis...@gmail.com>
                Gerrit-Reviewer: Gopher Robot <go...@golang.org>
                open
                diffy
                satisfied_requirement
                Reply all
                Reply to author
                Forward
                0 new messages