[llvm] [DA] Add tests where dependencies are missed due to overflow (NFC) (PR #164246)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 03:53:16 PDT 2025


================
@@ -0,0 +1,125 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6
+; RUN: opt < %s -disable-output "-passes=print<da>" 2>&1 \
+; RUN:     | FileCheck %s --check-prefixes=CHECK,CHECK-ALL
+; RUN: opt < %s -disable-output "-passes=print<da>" -da-enable-dependence-test=weak-crossing-siv 2>&1 \
+; RUN:     | FileCheck %s --check-prefixes=CHECK,CHECK-WEAK-CROSSING-SIV
+
+; max_i = INT64_MAX/3  // 3074457345618258602
+; for (long long i = 0; i <= max_i; i++) {
+;   A[-3*i + INT64_MAX] = 0;
+;   if (i)
+;     A[3*i - 2] = 1;
+; }
+;
+; FIXME: DependencyAnalsysis currently detects no dependency between
+; `A[-3*i + INT64_MAX]` and `A[3*i - 2]`, but it does exist. For example,
+;
+;  memory location  | -3*i + INT64_MAX | 3*i - 2
+; ------------------|------------------|-----------
+;  A[1]             | i = max_i        | i = 1
+;  A[INT64_MAX - 3] | i = 1            | i = max_i
----------------
kasuga-fj wrote:

Thanks, replace the table. Also added similar one to other non-trivial cases.

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


More information about the llvm-commits mailing list