Skip to content

Commit 86ea8c3

Browse files
committed
!fixup retrieve trip count SCEV from Count value directly.
1 parent a2e66a5 commit 86ea8c3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,8 +2444,7 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
24442444
Value *Step = CreateStep();
24452445
ScalarEvolution &SE = *PSE.getSE();
24462446
// Check if we can prove that the trip count is >= the step.
2447-
const SCEV *TripCountSCEV = SE.getTripCountFromExitCount(
2448-
PSE.getBackedgeTakenCount(), CountTy, OrigLoop);
2447+
const SCEV *TripCountSCEV = SE.getSCEV(Count);
24492448
if (SE.isKnownPredicate(CmpInst::getInversePredicate(P),
24502449
SE.applyLoopGuards(TripCountSCEV, OrigLoop),
24512450
SE.getSCEV(Step)))

0 commit comments

Comments
 (0)