Skip to content

Commit 147a561

Browse files
committed
[VPlan] Clean up preheader block after b85a402.
Fix a leak introduced in b85a402 and flagged by LSan https://lab.llvm.org/buildbot#builders/5/builds/33452
1 parent 62a2a07 commit 147a561

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,9 @@ VPlan::~VPlan() {
591591
Block->dropAllReferences(&DummyValue);
592592

593593
VPBlockBase::deleteCFG(Entry);
594+
595+
Preheader->dropAllReferences(&DummyValue);
596+
delete Preheader;
594597
}
595598
for (VPValue *VPV : VPLiveInsToFree)
596599
delete VPV;

0 commit comments

Comments
 (0)