mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
Fix a case where we incorrectly returned hasComputableLoopEvolution for
a ternary commutative expr. Remove FIXME that does not need to be fixed (can't happen). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
be54dcc8a9
commit
803513b364
@ -197,10 +197,18 @@ namespace llvm {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// hasComputableLoopEvolution - Commutative expressions have computable loop
|
||||||
|
// evolutions iff they have at least one operand that varies with the loop,
|
||||||
|
// but that all varying operands are computable.
|
||||||
virtual bool hasComputableLoopEvolution(const Loop *L) const {
|
virtual bool hasComputableLoopEvolution(const Loop *L) const {
|
||||||
|
bool HasVarying = false;
|
||||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
|
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
|
||||||
if (getOperand(i)->hasComputableLoopEvolution(L)) return true;
|
if (!getOperand(i)->isLoopInvariant(L))
|
||||||
|
if (getOperand(i)->hasComputableLoopEvolution(L))
|
||||||
|
HasVarying = true;
|
||||||
|
else
|
||||||
return false;
|
return false;
|
||||||
|
return HasVarying;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
|
SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
|
||||||
@ -382,8 +390,6 @@ namespace llvm {
|
|||||||
|
|
||||||
virtual bool hasComputableLoopEvolution(const Loop *QL) const {
|
virtual bool hasComputableLoopEvolution(const Loop *QL) const {
|
||||||
if (L == QL) return true;
|
if (L == QL) return true;
|
||||||
/// FIXME: What if the start or step value a recurrence for the specified
|
|
||||||
/// loop?
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user