mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-12 19:18:48 +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:
parent
8fa142729b
commit
ff2006aa74
@ -347,8 +347,9 @@ replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
|
|||||||
|
|
||||||
bool SCEVAddRecExpr::isLoopInvariant(const Loop *QueryLoop) const {
|
bool SCEVAddRecExpr::isLoopInvariant(const Loop *QueryLoop) const {
|
||||||
// This recurrence is invariant w.r.t to QueryLoop iff QueryLoop doesn't
|
// This recurrence is invariant w.r.t to QueryLoop iff QueryLoop doesn't
|
||||||
// contain L.
|
// contain L and if the start is invariant.
|
||||||
return !QueryLoop->contains(L->getHeader());
|
return !QueryLoop->contains(L->getHeader()) &&
|
||||||
|
getOperand(0)->isLoopInvariant(QueryLoop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user