mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Check iteration count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55680 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1908,6 +1908,10 @@ BinaryOperator *getNewPHIIncrement(BinaryOperator *Incr, PHINode *PHI,
|
||||
/// change the type of IV, if possible.
|
||||
void LoopStrengthReduce::OptimizeIVType(Loop *L) {
|
||||
|
||||
SCEVHandle IterationCount = SE->getIterationCount(L);
|
||||
if (isa<SCEVCouldNotCompute>(IterationCount))
|
||||
return;
|
||||
|
||||
BasicBlock *LPH = L->getLoopPreheader();
|
||||
BasicBlock *LatchBB = L->getLoopLatch();
|
||||
SmallVector<PHINode *, 4> PHIs;
|
||||
|
||||
Reference in New Issue
Block a user