[llvm] [DA] Check monotonicity for subscripts (PR #154527)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 24 23:48:32 PDT 2025
================
@@ -3500,19 +3816,44 @@ bool DependenceInfo::tryDelinearizeParametricSize(
// to the dependency checks.
if (!DisableDelinearizationChecks)
for (size_t I = 1; I < Size; ++I) {
- if (!isKnownNonNegative(SrcSubscripts[I], SrcPtr))
+ const Loop *OutermostLoop =
+ LI->getLoopFor(Src->getParent())->getOutermostLoop();
+
+ MonotonicityType SrcMonotonicity =
+ SCEVSignedMonotonicityChecker(SE, OutermostLoop, SrcPtr)
+ .visit(SrcSubscripts[I]);
----------------
sushgokh wrote:
Same comment. Why evaluate only in the scope of Outermost loop? Shouldnt this be in context of current loop?
https://github.com/llvm/llvm-project/pull/154527
More information about the llvm-commits
mailing list