diff options
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index b2c5977..16b8dbb 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -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; |