[llvm-branch-commits] [llvm] [DA] Add tests for the Weak Zero SIV tests miss dependency (NFC) (PR #184998)

Ryotaro Kasuga via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 9 04:27:49 PDT 2026


================
@@ -0,0 +1,111 @@
+; 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-SRC-SIV
+
----------------
kasuga-fj wrote:

> If I am not mistaken, there are no CHECK lines, this is redundant?

This is an idiomatic way to reduce the CHECK lines. As you can see, this file runs two tests. If their results are the same, UTC generates `CHECK` lines for both tests. If their results are different, UTC generates `CHECK-ALL` lines and `CHECK-WEAK-SRC-SIV` lines for each test. See https://github.com/llvm/llvm-project/blob/9f3d9f488450de561176f3adfab5bb9ee1bf5f08/llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll for an example. `CHECK-ALL` and `CHECK-STRONG-SIV` are generated for `@strong11`, but only `CHECK` is generated for other functions.

>  I was a bit surprised to see the test with `-da-enable-dependence-test=weak-zero-siv`. Does this mean it is not enabled by default?

No. `-da-enable-dependence-test` is an option primary for testing a single dependence test. In this case, we specify `-da-enable-dependence-test=weak-zero-siv`, so only the Weak Zero SIV tests are enabled and the other tests are disabled. This allows us to check the results of a specific dependence test without interference from other tests. The default value for this option is `all`, which means all tests are enabled by default.

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


More information about the llvm-branch-commits mailing list