Skip to content

Commit 1ead239

Browse files
author
Michael Zolotukhin
committed
[LoopUnroll] Check that DT is available before trying to verify it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272221 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c923d84 commit 1ead239

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Transforms/Utils/LoopUnroll.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool Force,
602602
// updating domtree after partial loop unrolling should also be easy.
603603
if (DT && !CompletelyUnroll)
604604
DT->recalculate(*L->getHeader()->getParent());
605-
else
605+
else if (DT)
606606
DEBUG(DT->verifyDomTree());
607607

608608
// Simplify any new induction variables in the partially unrolled loop.

0 commit comments

Comments
 (0)