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

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 01:12:27 PDT 2025


================
@@ -3308,6 +3308,322 @@ void DependenceInfo::updateDirection(Dependence::DVEntry &Level,
     llvm_unreachable("constraint has unexpected kind");
 }
 
+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.
----------------
kasuga-fj wrote:

Yes, "invariant" seems more reasonable here.

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


More information about the llvm-commits mailing list