We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fb74e0 commit 9fbcba6Copy full SHA for 9fbcba6
src/cmd/compile/internal/liveness/plive.go
@@ -995,9 +995,11 @@ func (lv *liveness) clobber(b *ssa.Block) {
995
// of b.Values.
996
func clobber(lv *liveness, b *ssa.Block, live bitvec.BitVec) {
997
for i, n := range lv.vars {
998
- if !live.Get(int32(i)) && !n.Addrtaken() {
+ if !live.Get(int32(i)) && !n.Addrtaken() && !n.OpenDeferSlot() && !n.IsOutputParamHeapAddr() {
999
// Don't clobber stack objects (address-taken). They are
1000
// tracked dynamically.
1001
+ // Also don't clobber slots that are live for defers (see
1002
+ // the code setting livedefer in epilogue).
1003
clobberVar(b, n)
1004
}
1005
0 commit comments