diff --git a/src/cmd/compile/internal/ssa/shortcircuit.go b/src/cmd/compile/internal/ssa/shortcircuit.go index 0faaa5a309..9f18117066 100644 --- a/src/cmd/compile/internal/ssa/shortcircuit.go +++ b/src/cmd/compile/internal/ssa/shortcircuit.go @@ -237,7 +237,11 @@ func shortcircuitBlock(b *Block) bool { } } } - phielimValue(phi) + if phi.Uses != 0 { + phielimValue(phi) + } else { + phi.reset(OpInvalid) + } i-- // v.moveTo put a new value at index i; reprocess }