[llvm] [DependenceAnalysis] Fix SIV test crash when no AddRec after propagation (PR #154980)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 09:49:17 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Analysis/DependenceAnalysis.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp
index b0baeb226..c6c2bc9b4 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -2362,7 +2362,8 @@ bool DependenceInfo::testRDIV(const SCEV *Src, const SCEV *Dst,
     // If neither expression is an AddRec, this means propagation has simplified
     // them to non-AddRec forms. Fall back to ZIV analysis since the expressions
     // are effectively loop-invariant.
-    LLVM_DEBUG(dbgs() << "    RDIV falling back to ZIV test due to no AddRec\n");
+    LLVM_DEBUG(
+        dbgs() << "    RDIV falling back to ZIV test due to no AddRec\n");
     return testZIV(Src, Dst, Result);
   }
   return exactRDIVtest(SrcCoeff, DstCoeff, SrcConst, DstConst, SrcLoop, DstLoop,

``````````

</details>


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


More information about the llvm-commits mailing list