commit | cbae6186bd4a54818e9f7395ad3f374abc5f46ef | [log] [tgz] |
---|---|---|
author | Devang Patel <dpatel@apple.com> | Wed Sep 03 00:10:56 2008 +0000 |
committer | Devang Patel <dpatel@apple.com> | Wed Sep 03 00:10:56 2008 +0000 |
tree | 37f6a290428ef0860c18a24cddbc61f79a350767 | |
parent | 5a0f5919c83576342b6365d731e4dfc746f004e8 [diff] [blame] |
Check iteration count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55680 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@ /// 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;