[llvm] [ScalarEvolution] howManyLessThans infer stride isPositive from guard (PR #214014)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 03:54:29 PDT 2026
================
@@ -13424,12 +13424,23 @@ ScalarEvolution::howManyLessThans(const SCEV *LHS, const SCEV *RHS,
ICmpInst::Predicate Cond = IsSigned ? ICmpInst::ICMP_SLT : ICmpInst::ICMP_ULT;
const SCEV *Stride = IV->getStepRecurrence(*this);
-
- bool PositiveStride = isKnownPositive(Stride);
+ const SCEV *StrideWithGuards = Stride;
----------------
fhahn wrote:
I think that's what we use in other places
```suggestion
const SCEV *GuardedStride = Stride;
```
https://github.com/llvm/llvm-project/pull/214014
More information about the llvm-commits
mailing list