diff --git a/src/cmd/compile/internal/ssa/regalloc.go b/src/cmd/compile/internal/ssa/regalloc.go index 9f0d13b29a..eba90fd051 100644 --- a/src/cmd/compile/internal/ssa/regalloc.go +++ b/src/cmd/compile/internal/ssa/regalloc.go @@ -1818,6 +1818,9 @@ func (e *edgeState) processDest(loc Location, vid ID, splice **Value) bool { (*splice).Uses-- *splice = occupant.c occupant.c.Uses++ + if occupant.c.Op == OpStoreReg { + e.s.lateSpillUse(vid) + } } // Note: if splice==nil then c will appear dead. This is // non-SSA formed code, so be careful after this pass not to run