[all-commits] [llvm/llvm-project] 7ad8ff: [DA] Fix Strong SIV test for symbolic coefficients...

Sebastian Pop via All-commits all-commits at lists.llvm.org
Wed Sep 10 16:21:56 PDT 2025


  Branch: refs/heads/users/sebpop/pr149977
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ad8fffa551a9d56a69dc18045afe8ede1cbcfb7
      https://github.com/llvm/llvm-project/commit/7ad8fffa551a9d56a69dc18045afe8ede1cbcfb7
  Author: Sebastian Pop <spop at nvidia.com>
  Date:   2025-09-09 (Tue, 09 Sep 2025)

  Changed paths:
    M llvm/lib/Analysis/DependenceAnalysis.cpp
    M llvm/test/Analysis/DependenceAnalysis/BasePtrBug.ll
    M llvm/test/Analysis/DependenceAnalysis/DADelin.ll
    A llvm/test/Analysis/DependenceAnalysis/PR149977.ll
    M llvm/test/Analysis/DependenceAnalysis/StrongSIV.ll
    M llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll

  Log Message:
  -----------
  [DA] Fix Strong SIV test for symbolic coefficients and deltas (#149977)

Fixes GitHub issue #149977 where Strong SIV test incorrectly rejected
dependencies with symbolic coefficients and deltas due to overly conservative
bound checking.

Root cause: The bound constraint check |Delta| > UpperBound * |Coeff| would
prematurely reject dependencies when SCEV couldn't prove the relationship
definitively for symbolic expressions, preventing the analysis from reaching
the division logic.

Solution:
1. Make bound check less conservative for symbolic expressions by adding
   runtime assumptions when SCEV cannot determine the relationship.
2. Enable symbolic division using SE->getUDivExactExpr for Delta/Coeff.
3. Add runtime assumptions where symbolic division cannot be computed.

This enables precise dependence analysis for cases like:
- Coefficient: -k (symbolic)
- Delta: -(2*k + 1) (symbolic)
- Distance: (2*k + 1)/k (computed symbolically)

Test case validates:
- When k = -1: distance = 1, clear flow dependence detected.
- Runtime assumptions ensure bounds are satisfied.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list