diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-25 03:57:32 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-25 03:57:32 +0000 |
commit | 01d6257e818f71025bc8da9dcbba6925047868dc (patch) | |
tree | cd364227ed9e6d34f1bce2066bf8b77346d206ac /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 40dca46ddbcd20847c5dc7adc079e85717d5895d (diff) | |
download | bcm5719-llvm-01d6257e818f71025bc8da9dcbba6925047868dc.tar.gz bcm5719-llvm-01d6257e818f71025bc8da9dcbba6925047868dc.zip |
Temporarily reverting 46959.
llvm-svn: 47542
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 876ebd474b3..0db02d98c20 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1919,8 +1919,8 @@ SCEVHandle ScalarEvolutionsImpl::ComputeIterationCount(const Loop *L) { // At this point, we would like to compute how many iterations of the // loop the predicate will return true for these inputs. - if (LHS->isLoopInvariant(L) && !RHS->isLoopInvariant(L)) { - // If there is a loop-invariant, force it into the RHS. + if (isa<SCEVConstant>(LHS) && !isa<SCEVConstant>(RHS)) { + // If there is a constant, force it into the RHS. std::swap(LHS, RHS); Cond = ICmpInst::getSwappedPredicate(Cond); } |