Skip to content

Commit 9f66949

Browse files
committed
Fix VariableScopeInstruction.endOperands for extend_lifetime.
Consider end_lifetime to be part of the endOperands set, which is used for linear liveness, even though it does not end the lifetime.
1 parent 3e75e77 commit 9f66949

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public enum VariableScopeInstruction {
441441
}
442442

443443
public var endOperands: LazyFilterSequence<UseList> {
444-
return scopeBegin.uses.endingLifetime
444+
scopeBegin.uses.lazy.filter { $0.endsLifetime || $0.instruction is ExtendLifetimeInst }
445445
}
446446

447447
// TODO: with SIL verification, we might be able to make varDecl non-Optional.

0 commit comments

Comments
 (0)