We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2e66a5 commit 86ea8c3Copy full SHA for 86ea8c3
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2444,8 +2444,7 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
2444
Value *Step = CreateStep();
2445
ScalarEvolution &SE = *PSE.getSE();
2446
// Check if we can prove that the trip count is >= the step.
2447
- const SCEV *TripCountSCEV = SE.getTripCountFromExitCount(
2448
- PSE.getBackedgeTakenCount(), CountTy, OrigLoop);
+ const SCEV *TripCountSCEV = SE.getSCEV(Count);
2449
if (SE.isKnownPredicate(CmpInst::getInversePredicate(P),
2450
SE.applyLoopGuards(TripCountSCEV, OrigLoop),
2451
SE.getSCEV(Step)))
0 commit comments