[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 05:47:46 PDT 2025


================
@@ -2085,6 +2085,12 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
   if (!isa<SCEVConstant>(Dist))
     FoundNonConstantDistanceDependence |= StrideAPtrInt == StrideBPtrInt;
 
+  // If distance is a SCEVCouldNotCompute, return Unknown immediately.
+  if (isa<SCEVCouldNotCompute>(Dist)) {
----------------
igogo-x86 wrote:

Ah, yes indeed. The only functional difference is that we'll always get this debug message now:

```
LLVM_DEBUG(dbgs() << "LAA: Dependence because of uncomputable distance.\n");
```

Even if the result is `NoDep`. I guess it doesn't matter?

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


More information about the llvm-commits mailing list