diff --git a/src/cmd/compile/internal/ssa/deadstore.go b/src/cmd/compile/internal/ssa/deadstore.go index 982bd7fa70..89f7504341 100644 --- a/src/cmd/compile/internal/ssa/deadstore.go +++ b/src/cmd/compile/internal/ssa/deadstore.go @@ -30,7 +30,7 @@ func dse(f *Func) { for _, a := range v.Args { if a.Block == b && a.Type.IsMemory() { storeUse.add(a.ID) - if v.Op != OpStore && v.Op != OpZero { + if v.Op != OpStore && v.Op != OpZero && v.Op != OpVarDef && v.Op != OpVarKill { // CALL, DUFFCOPY, etc. are both // reads and writes. loadUse.add(a.ID)