[llvm-commits] [llvm] r55682 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Devang Patel
dpatel at apple.com
Tue Sep 2 17:29:13 PDT 2008
Author: dpatel
Date: Tue Sep 2 19:29:13 2008
New Revision: 55682
URL: http://llvm.org/viewvc/llvm-project?rev=55682&view=rev
Log:
Add additional check to ensure that iv is canonicalized.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=55682&r1=55681&r2=55682&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue Sep 2 19:29:13 2008
@@ -1935,6 +1935,7 @@
ConstantInt *CInit = dyn_cast<ConstantInt>(PHI->getIncomingValue(Entry));
if (!CInit) return;
+ if (!CInit->isZero()) return;
bool signedInit = CInit->getValue().isNegative();
More information about the llvm-commits
mailing list