mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-21 19:32:16 +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:
parent
c3f44b0d63
commit
a9348dc7ac
@ -1908,6 +1908,10 @@ BinaryOperator *getNewPHIIncrement(BinaryOperator *Incr, PHINode *PHI,
|
|||||||
/// change the type of IV, if possible.
|
/// change the type of IV, if possible.
|
||||||
void LoopStrengthReduce::OptimizeIVType(Loop *L) {
|
void LoopStrengthReduce::OptimizeIVType(Loop *L) {
|
||||||
|
|
||||||
|
SCEVHandle IterationCount = SE->getIterationCount(L);
|
||||||
|
if (isa<SCEVCouldNotCompute>(IterationCount))
|
||||||
|
return;
|
||||||
|
|
||||||
BasicBlock *LPH = L->getLoopPreheader();
|
BasicBlock *LPH = L->getLoopPreheader();
|
||||||
BasicBlock *LatchBB = L->getLoopLatch();
|
BasicBlock *LatchBB = L->getLoopLatch();
|
||||||
SmallVector<PHINode *, 4> PHIs;
|
SmallVector<PHINode *, 4> PHIs;
|
||||||
|
@ -49,7 +49,7 @@ bb28: ; preds = %bb8, %bb
|
|||||||
store i16* %theDCTBufferIter.0.lcssa, i16** %tmp6, align 4
|
store i16* %theDCTBufferIter.0.lcssa, i16** %tmp6, align 4
|
||||||
%tmp37 = add i16 %component.09, 1 ; <i16> [#uses=2]
|
%tmp37 = add i16 %component.09, 1 ; <i16> [#uses=2]
|
||||||
%phitmp15 = sext i16 %tmp37 to i32 ; <i32> [#uses=1]
|
%phitmp15 = sext i16 %tmp37 to i32 ; <i32> [#uses=1]
|
||||||
%tmp46 = icmp slt i32 %phitmp15, %tmp4412 ; <i1> [#uses=1]
|
%tmp46 = icmp slt i32 %phitmp15, 42 ; <i1> [#uses=1]
|
||||||
br i1 %tmp46, label %bb, label %bb49
|
br i1 %tmp46, label %bb, label %bb49
|
||||||
|
|
||||||
bb49: ; preds = %bb28, %entry
|
bb49: ; preds = %bb28, %entry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user