mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 06:06:32 +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 {
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user