Skip to content

Commit 5e455de

Browse files
committed
!fixup wrap code only used in assertion in NDEBUG
1 parent aac81c6 commit 5e455de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2471,13 +2471,14 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
24712471
Value *LHS = Builder.CreateSub(MaxUIntTripCount, Count);
24722472

24732473
Value *Step = CreateStep();
2474+
#ifndef NDEBUG
24742475
ScalarEvolution &SE = *PSE.getSE();
2475-
// Check if we can prove that the trip count is >= the step.
24762476
const SCEV *TripCountSCEV = SE.applyLoopGuards(SE.getSCEV(LHS), OrigLoop);
24772477
assert(
24782478
!SE.isKnownPredicate(CmpInst::getInversePredicate(ICmpInst::ICMP_ULT),
24792479
TripCountSCEV, SE.getSCEV(Step)) &&
24802480
"SCEV unexpectedly proved overflow check to be known");
2481+
#endif
24812482
// Don't execute the vector loop if (UMax - n) < (VF * UF).
24822483
CheckMinIters = Builder.CreateICmp(ICmpInst::ICMP_ULT, LHS, Step);
24832484
}

0 commit comments

Comments
 (0)