[llvm] [DA] Check for overflow in strong SIV test (PR #166223)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 01:16:38 PST 2025
================
@@ -512,3 +528,45 @@ for.body: ; preds = %entry, %for.body
for.end: ; preds = %for.body
ret void
}
+
+
+;; for (long unsigned i = 0; i < 9223372036854775806; i++)
+;; for (long unsigned j = 0; j < 2147483640; j++)
+;; if (i < 3000000000)
+;; A[i] = 0;
+;
+; FIXME: DependenceAnalysis fails to detect the dependency between A[i] and
+; itself, while Strong SIV has been able to prove it.
----------------
kasuga-fj wrote:
> In general you are correct. If a test returns false it just mean that it couldn't prove anything. But in this case it is different. Sometime when StrongSIV is providing a distance or direction, it actually means that StrongSIV has been able to prove a dependency by providing their difference or direction. More specifically, whenever we have `StrongSIVsuccesses++` in the StrongSIV test, it means that the test could successfully prove (returning false) or disprove a dependency (returning true).
>
> This is something I had mentioned before on another discussion. When StrongSIV is successful to prove a dependency, DA does not need to check other tests anymore.
Hmm, I've reconsidered things a bit and now this looks reasonable to me. But...
> FIXME: DependenceAnalysis fails to detect the dependency between A[i] and itself, and Strong SIV is not the reason of this failure.
I'd prefer this one.
https://github.com/llvm/llvm-project/pull/166223
More information about the llvm-commits
mailing list