diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-17 20:48:38 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-17 20:48:38 +0000 |
commit | 203a7239ae928568fe7a34c03ead4b1b3133870e (patch) | |
tree | 2ae3df69dd6d963323088df64582159300559b4e /lib/Analysis/ScalarEvolution.cpp | |
parent | 23465a06f4f4fa098f99cf91e81ed8f26f962f3f (diff) |
Verify SCEVAddRecExpr's invariant in ScalarEvolution::getAddRecExpr
instead of in SCEVAddRecExpr's constructor, in preparation for an
upcoming change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 8ff1f0fa6f..deea0004d5 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -2073,6 +2073,9 @@ ScalarEvolution::getAddRecExpr(SmallVectorImpl<const SCEV *> &Operands, for (unsigned i = 1, e = Operands.size(); i != e; ++i) assert(getEffectiveSCEVType(Operands[i]->getType()) == ETy && "SCEVAddRecExpr operand types don't match!"); + for (unsigned i = 0, e = Operands.size(); i != e; ++i) + assert(Operands[i]->isLoopInvariant(L) && + "SCEVAddRecExpr operand is not loop-invariant!"); #endif if (Operands.back()->isZero()) { |