[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:17 PDT 2025
================
@@ -0,0 +1,124 @@
+; 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-zero-siv 2>&1 \
+; RUN: | FileCheck %s --check-prefixes=CHECK,CHECK-WEAK-ZERO-SIV
+
+; offset = -2;
+; for (i = 0; i < (1LL << 62); i++, offset += 2) {
+; if (0 <= offset)
+; A[offset] = 1;
+; A[2] = 2;
+; }
+;
+; FIXME: DependenceAnalysis currently detects no dependency between the two
+; stores, but it does exist. The root cause is that the product of the BTC and
+; the coefficient triggers an overflow.
----------------
kasuga-fj wrote:
Yes. Added comment to clarify that.
https://github.com/llvm/llvm-project/pull/164246
More information about the llvm-commits
mailing list