diff options
Diffstat (limited to 'lib/Transforms')
-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(); |