[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
This commit is contained in:
Michael Zolotukhin 2016-06-08 22:49:59 +00:00
parent c923d84c1f
commit 1ead23957a

View File

@ -602,7 +602,7 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount, bool Force,
// updating domtree after partial loop unrolling should also be easy.
if (DT && !CompletelyUnroll)
DT->recalculate(*L->getHeader()->getParent());
else
else if (DT)
DEBUG(DT->verifyDomTree());
// Simplify any new induction variables in the partially unrolled loop.