[llvm] [LAA] Compute pointer bounds for pattern with urem operation (PR #106574)
Sergey Kachkov via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 16 09:03:27 PDT 2024
================
@@ -1041,13 +1074,10 @@ findForkedPointer(PredicatedScalarEvolution &PSE,
SmallVector<PointerIntPair<const SCEV *, 1, bool>> Scevs;
findForkedSCEVs(SE, L, Ptr, Scevs, MaxForkedSCEVDepth);
- // For now, we will only accept a forked pointer with two possible SCEVs
- // that are either SCEVAddRecExprs or loop invariant.
+ // For now, we will only accept a forked pointer with two possible SCEVs.
if (Scevs.size() == 2 &&
- (isa<SCEVAddRecExpr>(get<0>(Scevs[0])) ||
- SE->isLoopInvariant(get<0>(Scevs[0]), L)) &&
- (isa<SCEVAddRecExpr>(get<0>(Scevs[1])) ||
- SE->isLoopInvariant(get<0>(Scevs[1]), L))) {
+ hasComputableBounds(PSE, Ptr, get<0>(Scevs[0]), L, /*Assume*/ false) &&
----------------
skachkov-sc wrote:
Created separate PR: https://github.com/llvm/llvm-project/pull/112571
https://github.com/llvm/llvm-project/pull/106574
More information about the llvm-commits
mailing list