Check iteration count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2008-09-03 00:10:56 +00:00
parent c3f44b0d63
commit a9348dc7ac
2 changed files with 5 additions and 1 deletions

View File

@@ -1908,6 +1908,10 @@ BinaryOperator *getNewPHIIncrement(BinaryOperator *Incr, PHINode *PHI,
/// change the type of IV, if possible.
void LoopStrengthReduce::OptimizeIVType(Loop *L) {
SCEVHandle IterationCount = SE->getIterationCount(L);
if (isa<SCEVCouldNotCompute>(IterationCount))
return;
BasicBlock *LPH = L->getLoopPreheader();
BasicBlock *LatchBB = L->getLoopLatch();
SmallVector<PHINode *, 4> PHIs;