[llvm] [LAA] Prepare to handle diff type sizes v2 (PR #161238)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 06:29:50 PDT 2025
================
@@ -2108,19 +2106,41 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
if (StrideAScaled == StrideBScaled)
CommonStride = StrideAScaled;
- // TODO: Historically, we didn't retry with runtime checks when (unscaled)
- // strides were different but there is no inherent reason to.
- if (!isa<SCEVConstant>(Dist))
- ShouldRetryWithRuntimeChecks |= StrideAPtrInt == StrideBPtrInt;
-
// If distance is a SCEVCouldNotCompute, return Unknown immediately.
if (isa<SCEVCouldNotCompute>(Dist)) {
LLVM_DEBUG(dbgs() << "LAA: Uncomputable distance.\n");
return Dependence::Unknown;
}
+ if (!isa<SCEVConstant>(Dist)) {
+ if (!LoopGuards)
+ LoopGuards.emplace(
+ ScalarEvolution::LoopGuards::collect(InnermostLoop, SE));
+ Dist = SE.applyLoopGuards(Dist, *LoopGuards);
----------------
artagnon wrote:
Waiting for compile-time results, but is the overall change correct, and were we missing some RT-checks previously?
https://github.com/llvm/llvm-project/pull/161238
More information about the llvm-commits
mailing list