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