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

Igor Kirillov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 06:59:11 PDT 2025


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

LGTM, but I realised one discrepancy.

If `isa<SCEVCouldNotCompute>(Dist)` is true, then this check is also true, and we may set FoundNonConstantDistanceDependence (which you rename to ShouldRetryWithRuntimeChecks). However, if there’s no dependence, which is determined later, we shouldn’t be doing this. That's out of the scope of the patch, so it may be worth fixing separately.

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


More information about the llvm-commits mailing list