[llvm] [DA] Add tests for nsw doesn't hold on entier iteration (PR #162281)
Ehsan Amiri via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 12:46:34 PST 2025
amehsan wrote:
> and I believe the test case `@nsw_under_loop_guard0` illustrates why. What I'm trying to say is:
This is not different from the examples that we have discussed before. I really don't understand why you keep going back to this issue.
All dependence testing, motonicity proof, etc. are only relevant when the loop is executed. If the guard is not correct the loop is not executed. for those values of `i` and `j` even if your results is incorrect it doesn't matter.
Your concern about correctness of DA when loop guard exists is 100% unjustified. If this could result in a bug, it is basically impossible to write a correct DA. I gave you an example in the previous discussion. Your nsw flags may be correct under assumptions that you have practically no way to discover.
https://github.com/llvm/llvm-project/pull/162281
More information about the llvm-commits
mailing list