[llvm] [SCEV] Use computeMaxBECountForLT for howManyGreaterThans. (PR #224863)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 20 05:21:10 PDT 2026
================
@@ -13910,6 +13891,11 @@ ScalarEvolution::ExitLimit ScalarEvolution::howManyGreaterThans(
if (isa<SCEVCouldNotCompute>(End))
return End;
}
+ if (RHS->getType()->isPointerTy()) {
+ RHS = getPtrToAddrExpr(RHS);
+ if (isa<SCEVCouldNotCompute>(RHS))
+ return RHS;
+ }
----------------
fhahn wrote:
`computeMaxBECountForLT` below computes `Start` - `RHS`, and the types need to match for that (we convert start to an integer above).
I updated the conversion to share a single guard, if one is a pointer, the others must be pointers as well.
https://github.com/llvm/llvm-project/pull/224863
More information about the llvm-commits
mailing list