[llvm] [DA] do not handle array accesses of different offsets (PR #123436)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 08:11:23 PDT 2025


================
@@ -1834,6 +1838,12 @@ PreservedAnalyses LoopInterchangePass::run(LoopNest &LN,
   std::unique_ptr<CacheCost> CC =
       CacheCost::getCacheCost(LN.getOutermostLoop(), AR, DI);
 
+  SCEVUnionPredicate Assumptions = DI.getRuntimeAssumptions();
+  // Early fail when the dependence analysis has runtime assumptions.
+  // FIXME: this could be handled by versioning the loop.
+  if (!Assumptions.isAlwaysTrue())
+    return PreservedAnalyses::all();
----------------
kasuga-fj wrote:

Is this necessary? DependenceInfo doesn't seem to compute anything until `depends` is called.

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


More information about the llvm-commits mailing list