mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Fix PR13967.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165187 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1262,7 +1262,10 @@ static bool needsLFTR(Loop *L, DominatorTree *DT) {
|
||||
return true;
|
||||
|
||||
// Do LFTR if the exit condition's IV is *not* a simple counter.
|
||||
Value *IncV = Phi->getIncomingValueForBlock(L->getLoopLatch());
|
||||
int Idx = Phi->getBasicBlockIndex(L->getLoopLatch());
|
||||
if (Idx < 0)
|
||||
return true;
|
||||
Value *IncV = Phi->getIncomingValue(Idx);
|
||||
return Phi != getLoopPhiForCounter(IncV, L, DT);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user