[llvm] [LV] Remove assertions in IV overflow check (PR #115705)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 11:19:26 PST 2024
================
@@ -2491,15 +2491,6 @@ void InnerLoopVectorizer::emitIterationCountCheck(BasicBlock *Bypass) {
Value *LHS = Builder.CreateSub(MaxUIntTripCount, Count);
Value *Step = CreateStep();
-#ifndef NDEBUG
- ScalarEvolution &SE = *PSE.getSE();
- const SCEV *TC2OverflowSCEV = SE.applyLoopGuards(SE.getSCEV(LHS), OrigLoop);
- assert(
- !isIndvarOverflowCheckKnownFalse(Cost, VF * UF) &&
- !SE.isKnownPredicate(CmpInst::getInversePredicate(ICmpInst::ICMP_ULT),
- TC2OverflowSCEV, SE.getSCEV(Step)) &&
- "unexpectedly proved overflow check to be known");
-#endif
// Don't execute the vector loop if (UMax - n) < (VF * UF).
CheckMinIters = Builder.CreateICmp(ICmpInst::ICMP_ULT, LHS, Step);
----------------
fhahn wrote:
```suggestion
CheckMinIters = Builder.CreateICmp(ICmpInst::ICMP_ULT, LHS, CreateStep());
```
https://github.com/llvm/llvm-project/pull/115705
More information about the llvm-commits
mailing list