[llvm] [LAA] Hoist check for SCEV-uncomputable dist (NFC) (PR #148841)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 07:26:28 PDT 2025


================
@@ -2085,6 +2085,12 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
   if (!isa<SCEVConstant>(Dist))
----------------
artagnon wrote:

> If isa<SCEVCouldNotCompute>(Dist) is true, then this check is also true, and we may set FoundNonConstantDistanceDependence (which you rename to ShouldRetryWithRuntimeChecks).

This is the correct behavior, and a change in this behavior would cause regressions.

> However, if there’s no dependence, which is determined later, we shouldn’t be doing this.

There is no harm in doing this, as ShouldRetryWithRuntimeChecks has no effect in case of NoDep.

https://github.com/llvm/llvm-project/pull/148841


More information about the llvm-commits mailing list