[llvm] [DA] Check monotonicity for subscripts (PR #154527)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 22 09:34: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,h -- llvm/include/llvm/Analysis/DependenceAnalysis.h 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 a32324ba4..ddced5acf 100644
--- a/llvm/lib/Analysis/DependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/DependenceAnalysis.cpp
@@ -3311,9 +3311,15 @@ void DependenceInfo::updateDirection(Dependence::DVEntry &Level,
 namespace {
 
 enum class MonotonicityType {
-  MaySignedWrap, ///< The expression contains arithmetic operations that may cause signed wrap.
-  Constant, ///< The expression is constant. If a SCEV is classified as Constant, it also implies that it doesn't contain any arithmetic operations that may cause signed wrap.
-  Monotonic, ///< The expression is monotonically increasing or decreasing. This is exclusive of Constant. That is, we say an SCEV is Monotonic iff it contains at least one AddRec where its step reccurence value is non-zero.
+  MaySignedWrap, ///< The expression contains arithmetic operations that may
+                 ///< cause signed wrap.
+  Constant,      ///< The expression is constant. If a SCEV is classified as
+                 ///< Constant, it also implies that it doesn't contain any
+                 ///< arithmetic operations that may cause signed wrap.
+  Monotonic, ///< The expression is monotonically increasing or decreasing. This
+             ///< is exclusive of Constant. That is, we say an SCEV is Monotonic
+             ///< iff it contains at least one AddRec where its step reccurence
+             ///< value is non-zero.
 };
 
 /// A visitor that checks the signed monotonicity of SCEVs.

``````````

</details>


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


More information about the llvm-commits mailing list