[llvm] [LAA] Compute pointer bounds for pattern with urem operation (PR #106574)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 06:00:50 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) &&
----------------
david-arm wrote:
This changes to `findForkedPointer` look like a useful NFC patch by itself I think, and would help to reduce the size of this patch.
https://github.com/llvm/llvm-project/pull/106574
More information about the llvm-commits
mailing list