1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-21 03:32:29 +00:00

Fix Transforms/LoopStrengthReduce/2005-08-15-AddRecIV.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22797 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-08-16 00:37:01 +00:00
parent 8fa142729b
commit ff2006aa74

@ -347,8 +347,9 @@ replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
bool SCEVAddRecExpr::isLoopInvariant(const Loop *QueryLoop) const {
// This recurrence is invariant w.r.t to QueryLoop iff QueryLoop doesn't
// contain L.
return !QueryLoop->contains(L->getHeader());
// contain L and if the start is invariant.
return !QueryLoop->contains(L->getHeader()) &&
getOperand(0)->isLoopInvariant(QueryLoop);
}