[llvm-commits] [llvm] r66062 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Dan Gohman
gohman at apple.com
Wed Mar 4 12:49:01 PST 2009
Author: djg
Date: Wed Mar 4 14:49:01 2009
New Revision: 66062
URL: http://llvm.org/viewvc/llvm-project?rev=66062&view=rev
Log:
Add an assertion for a condition that's always true, and not
immediately obvious.
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=66062&r1=66061&r2=66062&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Mar 4 14:49:01 2009
@@ -2376,6 +2376,9 @@
AR->getStepRecurrence(*SE) != One)
return Cond;
+ assert(AR->getLoop() == L &&
+ "Loop condition operand is an addrec in a different loop!");
+
// Check the right operand of the select, and remember it, as it will
// be used in the new comparison instruction.
Value *NewRHS = 0;
More information about the llvm-commits
mailing list