diff options
author | Devang Patel <dpatel@apple.com> | 2008-09-03 00:29:13 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-09-03 00:29:13 +0000 |
commit | e925ccc553e95cf348455b4ba1dca1fd5981f5bb (patch) | |
tree | 0613990b6cd7bac2a0b9bc363c9962203a354b32 /lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | a9348dc7acc6f292425721c178311d7b0b5144b6 (diff) |
Add additional check to ensure that iv is canonicalized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopStrengthReduce.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 16b8dbb451..96fa0e9eb1 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1935,6 +1935,7 @@ void LoopStrengthReduce::OptimizeIVType(Loop *L) { ConstantInt *CInit = dyn_cast<ConstantInt>(PHI->getIncomingValue(Entry)); if (!CInit) return; + if (!CInit->isZero()) return; bool signedInit = CInit->getValue().isNegative(); |