[qt/clang/llvm-project]: Summary of bulk changes made

KDE Git Services - Bulk Change <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git repository change summary for qt/clang/llvm-project
Pushed by mirror-service into branch 'upstream/users/cabbaken/rewriteBanerjeeTest'.
Changed from 04de370ca7b4543f94da88f4dd1c5e5e20299563 to 73eb817a9a950c8be53ca2fde16b5772d02d278b
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.

This change contains the following new commits:

Git commit 73eb817a9a950c8be53ca2fde16b5772d02d278b by Ruoyu Qiu on 17/07/2026 at 02:47..
[DA] Rewrite BanerjeeMIV test with safe APInt interval arithmetic

The old banerjeeMIVtest computed inequality bounds using SCEV
arithmetic on 64-bit integers. Intermediate operations like
$(A^{-} - B^{+}) \times Iterations$ could overflow i64 even when all individual
coefficients and loop bounds fit, producing unsound results.

Replace the symbolic bound machinery with a self-contained APInt
interval arithmetic implementation. Key design decisions:

- BanerjeeInterval holds [Lower, Upper] signed-inclusive bounds.
  Operations use APInt arithmetic at WideBits, chosen to guarantee no
  intermediate overflow:
  $$
    WideBits = max(8, 2 \times BaseBits + MaxLevels + 8)
  $$
  This is provably sufficient, each term product needs at most `2 \times BaseBits + 1`
  bits, and summing across MaxLevels terms needs at most ceil($\log_2 (MaxLevels)$)
  extra bits.

- Only constant affine expressions are handled. `CollectConstantAffine`
  requires nsw on every SCEVAddRecExpr and a SCEVConstant for both the
  step recurrence and the backedge-taken count.
  Symbolic cases bail out conservatively.

Fixes the FIXME in gcdmiv_delta_ovfl2.ll: the old code could not
detect the dependence because intermediate SCEV subtraction of
coefficients near INT64_MIN and INT64_MAX overflowed i64. The new code
computes correct bounds at WideBits >= 138.

Adds a test in banerjee-overflow.ll for single-iteration loops and
updates PR51512.ll for the more precise direction refinement.

Signed-off-by: Ruoyu Qiu <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/73eb817a9a950c8be53ca2fde16b5772d02d278b
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.