[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/main'.
Changed from e6566492c03c164f4cc4a0775a864c8d59d3f941 to ddd7b231806c8c515a6c033e7f799e413cfb982a
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 34323ab08e6eed2caff556ecdeae20053cbaaae7 by GitHub (on behalf of Jonas Devlieghere) on 07/08/2026 at 05:21..
[lldb] Fix the lazy initialization of Module's global collections (NFC) (#214630)

Both collections were initialized with a check-then-set on a null
pointer, which is race-y. We can achieve the same thing by initializing
the pointer with the allocation, while retaining the leak.
https://invent.kde.org/qt/clang/llvm-project/-/commit/34323ab08e6eed2caff556ecdeae20053cbaaae7

Git commit fab90faf86a5846f7ed73c1caf322dcc79a6af5e by GitHub (on behalf of Kane Wang) on 07/08/2026 at 05:36..
[RISCV][GlobalISel] Legalize G_LROUND/G_LLROUND (#213889)

Add legalizer rules so `llvm.lround/llround` lower to`
fcvt.{w,l}.{h,s,d}` with FRM_RMM.
https://invent.kde.org/qt/clang/llvm-project/-/commit/fab90faf86a5846f7ed73c1caf322dcc79a6af5e

Git commit 424588ce0a14c9a310687424d8f0318553ef3fa7 by GitHub (on behalf of Sam Elliott) on 07/08/2026 at 05:41..
[AsmPrinter] Emit type and size for Constant Pool Entries (#214387)
https://invent.kde.org/qt/clang/llvm-project/-/commit/424588ce0a14c9a310687424d8f0318553ef3fa7

Git commit 0b5cc577664bbd6e031f93f162d23820e5e90d15 by GitHub (on behalf of Aiden Grossman) on 07/08/2026 at 05:43..
[Target] Add shouldDefaultToNewPM flag

This will allow for tools like clang/flang/llc to default to the NewPM
for targets that request it.

Future patches will update clang/llc and flip it for targets that have
been fully ported but shouldn't have a large blast radius (like Lanai
and MSP430).

Pursuant to
https://discourse.llvm.org/t/rfc-incrementally-enabling-the-newpm-for-codegen/91410/11.

Reviewers: arsenm, vikramRH, aengelke

Pull Request: https://github.com/llvm/llvm-project/pull/214570
https://invent.kde.org/qt/clang/llvm-project/-/commit/0b5cc577664bbd6e031f93f162d23820e5e90d15

Git commit 9adc2537177d0813301b3eab1bae906735c984a4 by GitHub (on behalf of Jean-Didier PAILLEUX) on 07/08/2026 at 06:06..
[Flang] Coarray allocation, update error for pointer component #193829 (#194651)

The TODO message in `verify()` was not completly displayed, so it has
been replaced by `emitErrorOp`.
In addition, the test in `ConvertVariable` has been updated by adding
pointer direct component case.
Fix #193829
https://invent.kde.org/qt/clang/llvm-project/-/commit/9adc2537177d0813301b3eab1bae906735c984a4

Git commit 200993f938df80a215a39dea148c239b3be21d0b by GitHub (on behalf of Luke Lau) on 07/08/2026 at 06:06..
[RISCV] Increase cost of vmv.x.s and vfmv.f.s (#214481)

A change landed that enabled SLP vectorization in more places, but it
caused a 16% regression in 508.namd_r on the spacemit-k3:
https://github.com/llvm/llvm-project/issues/214417

The root cause is that we're emitting two vfmv.f.s now which are
generally slow due to the vector->scalar domain crossing:
https://godbolt.org/z/dMo55zPMa

Reciprocal throughput of vmv.x.s/vfmv.f.s is 6 times higher than
vmv.s.x/vfmv.s.f on the spacemit-k3 and 2.5 higher on the P870 according
to https://camel-cdr.github.io/rvv-bench-results/

This PR increases the cost of a vmv.x.s/vfmv.f.s from 1->2, which is
just enough to prevent unprofitable SLP vectorization and fixes the
regression on 508.namd_r.

It also has the bonus side effect of preventing loop vectorization where
we end up scalarizing libcalls, see
llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-call-intrinsics.ll

Fixes #214417
https://invent.kde.org/qt/clang/llvm-project/-/commit/200993f938df80a215a39dea148c239b3be21d0b

Git commit 5b94e6fbc02604d4407bb1377ab65d0382ef813a by GitHub (on behalf of Kaitlin Peng) on 07/08/2026 at 06:23..
Update `atan2` matrix tests (#214550)

This PR updates the `atan2` matrix sema error test to cover the full set
of argument/type error cases (mirroring `pow_mat-errors.hlsl`). It also
renames two tests to match the `<intrinsic>_mat-<suffix>` convention
that other intrinsics follow.
https://invent.kde.org/qt/clang/llvm-project/-/commit/5b94e6fbc02604d4407bb1377ab65d0382ef813a

Git commit 44cbd66a3b8aaf3ecd0c8ea06076b4a7cbf774d5 by GitHub (on behalf of David Green) on 07/08/2026 at 06:27..
[AArch64] Add load/store cost model test. NFC (#214648)

These are copied from the X86 tests with some adjustments.
https://invent.kde.org/qt/clang/llvm-project/-/commit/44cbd66a3b8aaf3ecd0c8ea06076b4a7cbf774d5

Git commit 0b65d8b57c69c4bf5f859d80cc647fdb3f4f9bff by GitHub (on behalf of Kyungtak Woo) on 07/08/2026 at 06:30..
[NFC] Add missing <cmath> continuation (#214641)

I missed a missing import from
https://github.com/llvm/llvm-project/pull/214410, found this failing
downstream
https://invent.kde.org/qt/clang/llvm-project/-/commit/0b65d8b57c69c4bf5f859d80cc647fdb3f4f9bff

Git commit a26bbdd947da7d820f072252cae8944b897fc7eb by GitHub (on behalf of Aiden Grossman) on 07/08/2026 at 06:31..
[GVNSink] Do not sink @llvm.threadlocal.address (#214582)

Sinking this intrinsic with different arguments requires the use of a
phi node which violates verifier assumptions about the intrinsic. So we
mark it as unable to have operands replaced with variables.

Fixes #214565
https://invent.kde.org/qt/clang/llvm-project/-/commit/a26bbdd947da7d820f072252cae8944b897fc7eb

Git commit e0c0675a1250117bbe1b4b0fa7f35a1969a74f16 by GitHub (on behalf of Aiden Grossman) on 07/08/2026 at 06:49..
[NFC][DWARF] Prefer addSectionLabel (#214239)

This is a follow-up to a comment on #213128.

addSectionDelta was only called in sites within if statements that would
branch on whether or not split DWARF is enabled and then branching to
either addSectionDelta or addSectionLabel. Instead we can just make
addSectionLabel call addSectionDelta internally if we're in a DwoUnit to
make things simpler.

This is obviously NFC for most cases. For macro info, we were previously
branching on useSplitDWARF which can differ, but only in the case we are
emitting into the skeleton compile unit, which we should not be doing
for macro info.
https://invent.kde.org/qt/clang/llvm-project/-/commit/e0c0675a1250117bbe1b4b0fa7f35a1969a74f16

Git commit 2a0c57c535edc30f4f3d469542eef10d497db122 by GitHub (on behalf of Cullen Rhodes) on 07/08/2026 at 07:21..
[AArch64][GlobalISel] Fix invalid subregister copies for truncating stores (#213935)

The custom truncating store selector always created a subregister copy
matching the memory type. When storing an i16 value to i8 both types
used GPR32, producing an invalid copy:
```
  *** Bad machine code: Invalid subregister index for virtual register ***
  - function:    truncstores
  - basic block: %bb.0  (0xb1a58e8738c0)
  - instruction: %2:gpr32 = COPY %val16.sub_32:gpr32
  - operand 1:   %val16.sub_32:gpr32
  Register class GPR32 does not support subreg index sub_32
  LLVM ERROR: Found 1 machine code errors.
```
This code path should only be used for FPRs. The existing RegBankSelect
avoids this by inserting a G_ANYEXT from i16 to i32, allowing the
imported pattern to match. It was exposed by the type-based
RegBankSelect prototype in #199040.

Assisted-by: codex
https://invent.kde.org/qt/clang/llvm-project/-/commit/2a0c57c535edc30f4f3d469542eef10d497db122

Git commit 1211be2753d3459bbe75be985f8c8248e7b62731 by GitHub (on behalf of aokblast) on 07/08/2026 at 07:25..
[lldb][X86] Fix *BSD build on GCC workaround change (#214514)

Reflect the class change on FreeBSD code.

Fixes: de4f929700f8 ("[lldb][x86] Remove GCC 6 workaround")
https://invent.kde.org/qt/clang/llvm-project/-/commit/1211be2753d3459bbe75be985f8c8248e7b62731

Git commit e9446de6df36e37f3dc2d5a07302faaf252fe262 by GitHub (on behalf of Luke Lau) on 07/08/2026 at 07:27..
[RISCV] Scale i64 insert/extract element cost on RV32 with LMUL (#214609)

Currently each vector instruction just has a cost of 1 but at higher
LMULs this isn't accurate.

Also it looks like the lowering might have changed since the cost was
added, but for inserts we now use vslide1down instead of vslide1up, see
the codegen in insertelt-int-rv32.ll.

---------

Co-authored-by: Ryan Buchner <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/e9446de6df36e37f3dc2d5a07302faaf252fe262

Git commit 860c36ee0f0ea01bb20c8dfc253877ba013adacb by GitHub (on behalf of Timm Baeder) on 07/08/2026 at 07:37..
[clang][ExprConst][NFC] Remove outdated comments (#213587)

Those parameters don't exist anymore.
https://invent.kde.org/qt/clang/llvm-project/-/commit/860c36ee0f0ea01bb20c8dfc253877ba013adacb

Git commit 3cc4656425ae7227e01e8a646de27123dc9ae7c3 by GitHub (on behalf of Alexandros Lamprineas) on 07/08/2026 at 07:38..
[BOLT][AArch64] Expand cmpbr when reversing would overflow (#202998)

AArch64 compare-and-branch instructions can usually be reversed by
changing the condition and adjusting the immediate. At boundary values,
that adjustment can underflow or overflow, leaving the branch
non-reversible.

When condition flags are dead at such a branch, split the compare branch
into an explicit compare followed by a conditional branch. The new
sequence lets branch fixup reverse the condition without relying on an
out-of-range adjusted immediate.

Teach the branch-fixing paths to use cached branch liveness information
when deciding whether this expansion is legal. The liveness snapshot is
built before branch relaxation/fixup and is safe for the current users:
they only insert trampolines/stubs between existing CFG edges or invert
branches without changing program semantics.

Since expansion can grow the source basic block, update the local
address accounting used by branch relaxation.

Assisted-by: Codex
https://invent.kde.org/qt/clang/llvm-project/-/commit/3cc4656425ae7227e01e8a646de27123dc9ae7c3

Git commit 9d3a3fa57c47fd06efea20f100ec747f5e5fbfdd by GitHub (on behalf of Timm Baeder) on 07/08/2026 at 07:47..
[clang][AST] Print OnePastTheEnd bit in `APValue::dump()` (#214450)

For lvalue APValues.
https://invent.kde.org/qt/clang/llvm-project/-/commit/9d3a3fa57c47fd06efea20f100ec747f5e5fbfdd

Git commit f3bd40ce6ba5a971b12fb5a268c5719ecbceff7d by GitHub (on behalf of Antonio Frighetto) on 07/08/2026 at 08:03..
[ValueLattice][SCCP] Consider provenance for predicate-derived pointer constants (#160083)

Similarly to what it is being already done in GVN
(fb632ed2377d280b581b8d4653b855e60d611f77), make sure pointers
equalities derived via PredicatedInfo may be propagated so long as
pointer constants' provenance is taken into account, which may be
non-existent. This is achieved by tracking provenance in
ValueLatticeElement and restrain replacement to uses allowed by
`canReplacePointersInUseIfEqual`.

Fixes: https://github.com/llvm/llvm-project/issues/159565.
https://invent.kde.org/qt/clang/llvm-project/-/commit/f3bd40ce6ba5a971b12fb5a268c5719ecbceff7d

Git commit 9b843a5ef6da6947d2cc5bcafe3efe0897844ab6 by GitHub (on behalf of T-Tie) on 07/08/2026 at 08:28..
[RISCV] Remove isBarrier from PseudoCALLReg/PseudoTLSDESCCall (#214155)

`PseudoCALLReg` models a returning call with an explicit link register.
The machine outliner uses it for normal outlined calls that return
through `x5`.

Marking this pseudo as a barrier is inconsistent with call sites at the
end of a block that falls through to a successor after the outlined
function returns. MachineVerifier correctly diagnoses those blocks as
malformed.

Remove the barrier flag and add a MIR regression test that outlines a
sequence at the end of a fall-through block. The test runs for RV32 and
RV64 with `-verify-machineinstrs`.

The attribute isBarrier from PseudoTLSDESCCall is removed as well for
the similar reason and a MachineVerifier regression test is added for
the TLSDESC call at the end of a fall-through block.
https://invent.kde.org/qt/clang/llvm-project/-/commit/9b843a5ef6da6947d2cc5bcafe3efe0897844ab6

Git commit d923e4674491a92320335c7a124546493f8e0b65 by GitHub (on behalf of Charles Zablit) on 07/08/2026 at 08:37..
[lldb][Windows] Document thread timeout variable (#213655)

This is a follow up to https://github.com/llvm/llvm-project/pull/213010.
https://invent.kde.org/qt/clang/llvm-project/-/commit/d923e4674491a92320335c7a124546493f8e0b65

Git commit fe1bfb32edc80cbe287342d6b350d6d6622493cc by GitHub (on behalf of Tim Besard) on 07/08/2026 at 08:41..
[SPIR-V] Lower nested aggregate insertvalue operands (#204239)

Fix a crash in the SPIR-V backend when an aggregate `extractvalue`
result is used as the base of a later `insertvalue`.

The failing pattern is:

```llvm
%e = extractvalue [1 x [1 x i64]] %a, 0
%i = insertvalue [1 x i64] %e, i64 %x, 0
%r = insertvalue [1 x [1 x i64]] %a, [1 x i64] %i, 0
```

`SPIRVPrepareFunctions` rewrites aggregate function arguments and
returns to `i32` SPIR-V value IDs. The `llvm.spv.insertv` intrinsic also
models its composite operand as an `i32` value ID. However, an
intermediate aggregate `extractvalue` could still be rewritten to
`llvm.spv.extractv` with an LLVM aggregate result type. Passing that
aggregate-typed value to `llvm.spv.insertv` made
`IRBuilder::CreateIntrinsic` create a call with a mismatched signature
and assert.

This patch mutates aggregate-result `llvm.spv.extractv` values that feed
`insertvalue` to `i32`, while preserving the original aggregate type in
the existing aggregate type metadata path. Selection then emits the
expected SPIR-V:

```spirv
%inner = OpCompositeExtract %Inner %outer 0
%new_inner = OpCompositeInsert %Inner %x %inner 0
%new_outer = OpCompositeInsert %Outer %new_inner %outer 0
```

Co-authored-by: Codex <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/fe1bfb32edc80cbe287342d6b350d6d6622493cc

Git commit 39cf655fdaafcff6e2fc145bd9a286f1d748dc3b by GitHub (on behalf of Dhairyashil R G) on 07/08/2026 at 08:41..
[mlir][affine] Implement ValueBoundsOpInterface for affine.for (#214614)

`scf.for` has provided induction variable bounds through
`ValueBoundsOpInterface` for a long time, but `affine.for` has no model
at all. `ValueBoundsConstraintSet` therefore cannot derive any bound for
an affine induction variable, not even `iv >= lowerBound`. Queries just
return "unknown", which is easy to miss because it looks the same as a
bound that genuinely cannot be proven.

Add a model for the induction variable. The lower bound of an
`affine.for` is the maximum over the results of its lower bound map and
the upper bound is the minimum over the results of its upper bound map,
so the induction variable is constrained by every individual result.
This follows how `AffineMinOpInterface` and `AffineMaxOpInterface` in
the same file align their maps with the constraint set; the shared logic
is factored into `alignBoundExpr`.

When both maps have exactly one result the step is taken into account as
well, following `scf::ForOpInterface`: the induction variable is always
a multiple of `step` away from the lower bound, so it never exceeds `lb
+ (tripCount - 1) * step`. That is tighter than `ub - 1` whenever the
trip count is not a multiple of the step, for `affine.for %i = 0 to 300
step 128` the induction variable only ever takes {0, 128, 256}, so the
bound is 256 rather than 299. As in `scf::ForOpInterface` this does not
replace the `iv < ub` constraint, since constraints multiplying two
constraint set dimensions aren't supported. The step is not applied when
either map has multiple results (`max`/`min` bounds), since no single
result can drive the arithmetic.

No bounds are inferred for `iter_args`.

Beyond the lit tests, the bound arithmetic was checked against an oracle
sweep: 6268 loops over an exhaustive `(lb, ub, step)` grid plus 4000
random cases, with the true induction variable range computed by
simulating each loop in Python rather than by asking the compiler.
Across 12536 queries there were 0 unsound bounds and 0 loose ones —
every bound is exactly `max(iv)` and `min(iv)`, so the model captures
every provable case rather than a conservative subset. Two controls:
reverting the change makes all 12536 queries unprovable, and mutating
the step arithmetic to be one step too tight makes the sweep report 5643
unsound bounds with counterexamples. The harness discriminates in both
directions.

No existing test needed updating: on its own this causes no `in_bounds`
folding in the vector dialect, because `isInBounds` still bails on any
non-constant index. Using these bounds there is a follow-up I'd like to
send once this lands.

Assisted-by: Claude
https://invent.kde.org/qt/clang/llvm-project/-/commit/39cf655fdaafcff6e2fc145bd9a286f1d748dc3b

Git commit c7259fcd5f8713aa96e50fec24b95abec3478d81 by GitHub (on behalf of Nikolas Klauser) on 07/08/2026 at 08:46..
[libc++][libc++abi] Merge the operator new implementations into a shared file (#213427)

Instead of copying the code around we can simply share a file that
actually implements operator new/delete and include that file in the two
places that need the definitions.
https://invent.kde.org/qt/clang/llvm-project/-/commit/c7259fcd5f8713aa96e50fec24b95abec3478d81

Git commit 95b1b6d95b0b7152572ba2436e62ad54ea7de691 by GitHub (on behalf of Simon Pilgrim) on 07/08/2026 at 08:59..
[InstCombine] Remove binop(concat(x,y),concat(a,b)) -> concat(binop(x,a),binop(y,b)) fold (#214285)

A similar fold is cost-driven in VectorCombine, but this InstCombine
fold was then undoing the decision

Seems to an old fold added by @rotateright (#32373) before we created
VectorCombine to do this properly

Fixes #205707
https://invent.kde.org/qt/clang/llvm-project/-/commit/95b1b6d95b0b7152572ba2436e62ad54ea7de691

Git commit 8969ae16e06587601fb80642a4036592e57c2473 by GitHub (on behalf of Jeff Bailey) on 07/08/2026 at 09:07..
[libc][NFC] Format all CMake files under libc/ (#213132)

Use cmake_format.py from #213102 on all CMakeLists.txt files in libc/

Assisted-by: Automated tooling, human reviewed.
https://invent.kde.org/qt/clang/llvm-project/-/commit/8969ae16e06587601fb80642a4036592e57c2473

Git commit 096481ddc5aa696f26ae4fd704adb28ce31babc6 by GitHub (on behalf of Jeff Bailey) on 07/08/2026 at 09:09..
[libc] Add getpwent, setpwent, and endpwent entrypoints (#213076)

Added getpwent, setpwent, and endpwent functions using the internal
pwd_utils line parser.

* Implemented getpwent.cpp, setpwent.cpp, and endpwent.cpp entrypoints
* Added database iteration state and helpers (open, close, read_next)
under namespace passwd in pwd_utils
* Registered entrypoints in config/linux/*/entrypoints.txt
* Added CMake target guards for File and platform_file to support
overlay builds and cross-platform targets
* Added unit tests in libc/test/src/pwd/getpwent_test.cpp

Assisted-by: Automated tooling, human reviewed.
https://invent.kde.org/qt/clang/llvm-project/-/commit/096481ddc5aa696f26ae4fd704adb28ce31babc6

Git commit 990a3e3303bb459349da70f9bcc10279dcfc7cfb by GitHub (on behalf of Rajat Bajpai) on 07/08/2026 at 09:13..
[NVVM][NVPTX] Add im2col_w support for S2G and reduction intrinsics (#214436)

PTX ISA 9.4 adds the im2col_no_offs::w mode to shared-to-global tensor
copy and reduction instructions for Rubin family targets.

This change adds the corresponding NVVM intrinsics and NVPTX lowering.
https://invent.kde.org/qt/clang/llvm-project/-/commit/990a3e3303bb459349da70f9bcc10279dcfc7cfb

Git commit d0fe5db35cd7a620bcfec4fedfd45374449ecdaa by GitHub (on behalf of Lukacma) on 07/08/2026 at 09:22..
[AArch64] Enable FEAT_LSFE CodeGen only when exception can be ignored (#212799)

This patch restricts the generation of new atomic instructions added
under FEAT_LSFE to functions where no-trapping-math flag is set and
strictfp attribute is not set. This is done to preserve the exception
behaviour of the original codegen.
https://invent.kde.org/qt/clang/llvm-project/-/commit/d0fe5db35cd7a620bcfec4fedfd45374449ecdaa

Git commit 658b3a9aa098fa8a03561ed9a5c56db1962b9b23 by GitHub (on behalf of Luke Hutton) on 07/08/2026 at 09:27..
[mlir][tosa] Add more informative error messages to block scaled types (#211569)

This commit improves block scaled tensor type verification to provide a
specific reason about why type verification failed. Previously the error
message was a very generic "must be tosa-conformant tensor of number
values".

This commit restores previous functionality that was reverted by
https://github.com/llvm/llvm-project/pull/207995, but uses the ODS
string interpolation mechanism instead to prevent incompatibility with
PDLL.
https://invent.kde.org/qt/clang/llvm-project/-/commit/658b3a9aa098fa8a03561ed9a5c56db1962b9b23

Git commit 2dc53f7926f8bb151f17b98d4092332d2046fd98 by GitHub (on behalf of Igor Kirillov) on 07/08/2026 at 09:36..
[AArch64] Cap upper-bound unrolling of loops with uncomputable trip counts (#205102)

SCEV can compute a small maximum trip count for a loop even when it
cannot compute the exact backedge-taken count. This is typical of
data-dependent exits, such as the varint-length loops in sqlite3:

  for (i = 1; (v >>= 7) != 0; i++)
    ;

Unrolling to the maximum trip count turns the loop into a chain of
copies containing an exit test for every possible iteration. This
increases code size and the number of static branches without knowing
whether enough iterations usually execute to make unrolling profitable.

These loops were not unrolled before #197292. That change improved
SCEV's maximum backedge-taken count for shift recurrences, reducing the
maximum trip count of these loops to 6. This made them eligible for
AArch64 upper-bound unrolling and caused an approximately 3% regression
in sqlite3 from SPEC CPU 2026.

For AArch64 loops with a single exiting block that are not MaxOrZero
and whose exact backedge-taken count SCEV cannot compute, lower
MaxUpperBound to 5 and disable runtime unrolling. The lower bound still
allows smaller loops to be unrolled. Runtime unrolling is also disabled
because it would clamp its unroll count to the known maximum and produce
the same complete unroll.
https://invent.kde.org/qt/clang/llvm-project/-/commit/2dc53f7926f8bb151f17b98d4092332d2046fd98

Git commit 09ac4bbd886e8fe5c90bd2ec18b6b9d8635e5eab by GitHub (on behalf of Paul Walker) on 07/08/2026 at 09:43..
[LLVM][SelectionDAG] Explicitly split SETCC generated operand of masked_div. (#213903)

This follows the same idiom used by other masked operations to prevent
poor type legalisation of boolean vectors.
https://invent.kde.org/qt/clang/llvm-project/-/commit/09ac4bbd886e8fe5c90bd2ec18b6b9d8635e5eab

Git commit b3a4504bd99bbfb9d6d3b0b87af835ccef8bef42 by GitHub (on behalf of David Spickett) on 07/08/2026 at 09:47..
[lldb] Make RegisterFlagsDetector into RegisterTypesDetector (#213892)

In future it may be generating things other than flags. Functionality
is the same, but the interface changes to use RegisterType.
https://invent.kde.org/qt/clang/llvm-project/-/commit/b3a4504bd99bbfb9d6d3b0b87af835ccef8bef42

Git commit cfabc8e1dc710c11736b7007545d39dddb09b2fc by GitHub (on behalf of Juan Manuel Martinez Caamaño) on 07/08/2026 at 09:50..
[HIP][Driver] Use alternative `/lib64` or `/lib` depending on `amdhip64` library location (#211587)

On non-standard ROCm installations, `libamdhip64.so` may be under
`/lib64` instead of `/lib`. To acomodate for these, if
`/lib/libamdhip64.so` does not exists and `/lib64` does, use the later.
On windows we check for `amdhip64.lib`.

If both exist `/lib` is preferred.

By default we conservatively use `/lib`.

Related to LCOMPILER-2495.
https://invent.kde.org/qt/clang/llvm-project/-/commit/cfabc8e1dc710c11736b7007545d39dddb09b2fc

Git commit 3cce637322a762daef7b50e4997c86af94d2d3c6 by GitHub (on behalf of Madhur Amilkanthwar) on 07/08/2026 at 09:56..
Enforce single-operand form for llvm.loop.vectorize.predicate metadata (#213902)

Replace the two-operand boolean form
!{!"llvm.loop.vectorize.predicate.enable", i1 0/1} with a single-operand
enable/disable pair:

  !{!"llvm.loop.vectorize.predicate.enable"}
  !{!"llvm.loop.vectorize.predicate.disable"}

The Verifier rejects the two-operand form, AutoUpgrade rewrites old
bitcode, and the readers and producers in LLVM, Clang and MLIR are
updated.

Please refer to RFC:

https://discourse.llvm.org/t/rfc-enforce-single-operand-format-for-all-enable-metadata-nodes/90571/

Assisted by AI
https://invent.kde.org/qt/clang/llvm-project/-/commit/3cce637322a762daef7b50e4997c86af94d2d3c6

Git commit d77a7569bc52e8b94b0a9d5a134106b0146f52db by GitHub (on behalf of David Sherwood) on 07/08/2026 at 09:58..
[LV] Apply urem folds to preheader (#213928)

Following on from PR #212198, this patch also applies the same urem
vplan folds to the vector preheader, which leads to a lot of test
changes that are mostly mechanical.

As a by-product it also fixes a compile-time regression introduced by
#212198 due to the expensive `getVectorPreheader` function.

In future we can do further folds similar to instcombine, since `(X - (X
& Y)) --> (X & ~Y)` and we know that `urem(X, PowerOf2Y) -> X &
log2(PowerOf2Y)`. However, the root matching pattern in this case needs
to be a subtract.
https://invent.kde.org/qt/clang/llvm-project/-/commit/d77a7569bc52e8b94b0a9d5a134106b0146f52db

Git commit 0740cedd9af7b94f295aca3aee9222c4d942284f by GitHub (on behalf of firmiana) on 07/08/2026 at 10:06..
[DebugInfo] Clear subregister mask state after use (#206428)

## Summary

This patch fixes a DWARF debug-info emission bug where the pending
subregister mask state used for one `DW_OP_LLVM_arg` could leak into a
following full-register `DW_OP_LLVM_arg` in the same `DIArgList`
expression.

For example, when an `i32` value is described through the x86-64
super-register `RDI`, LLVM correctly emits:

```text
DW_OP_breg5 RDI+0
DW_OP_constu 0xffffffff
DW_OP_and
```

However, before this patch, the subregister state remained live after
emitting that mask. If the next `DW_OP_LLVM_arg` used a full 64-bit
register such as `RSI`, LLVM could incorrectly emit the same 32-bit mask
for it too:

```text
DW_OP_breg4 RSI+0
DW_OP_constu 0xffffffff
DW_OP_and
```

## Reproducer
Source code:
```c
#include <stdint.h>

volatile int sinki;
volatile uint64_t sinku64;

__attribute__((noinline))
int test(int32_t a, uint64_t b) {
  int x = a == b;
  sinki += a;
  sinku64 += b;
  return 0;
}

int main(void) {
  return test(-1, UINT64_MAX);
}
```
Compile with: `clang -O2 -g -gdwarf-5 repro.c -o repro`

DebugInfo in IR for variable `x` (still correct at this point):
```
#dbg_value(!DIArgList(i32 %a, i64 %b), !x,
  !DIExpression(DW_OP_LLVM_arg, 0,
                DW_OP_LLVM_convert, 32, DW_ATE_signed,
                DW_OP_LLVM_convert, 64, DW_ATE_signed,
                DW_OP_LLVM_arg, 1,
                DW_OP_eq,
                DW_OP_LLVM_convert, 1, DW_ATE_unsigned,
                DW_OP_LLVM_convert, 32, DW_ATE_unsigned,
                DW_OP_stack_value), !loc)
```

Emitted DWARF Expression in binary:
```text
# get value of a
DW_OP_breg5 RDI+0
DW_OP_constu 0xffffffff
DW_OP_and
DW_OP_convert <signed_32>
DW_OP_convert <signed_64>
# get value of b (wrong)
DW_OP_breg4 RSI+0
DW_OP_constu 0xffffffff
DW_OP_and
# comparison
DW_OP_eq
DW_OP_stack_value
```

With the buggy DWARF expression, LLDB can evaluate `x` as `0`, even
though the source-level value is `1`.

## Fix
`DwarfExpression::maskSubRegister()` consumes the pending subregister
description when it emits the mask. This patch clears that state inside
`maskSubRegister()` after emitting the shift/mask operations, preventing
it from affecting later operands in the same expression.

A regression test (`test/DebugInfo/X86/diarglist-subregister-mask.ll`)
was added to check that the first subregister operand is masked, while
the following full-register operand is not.

## Validation

Locally verified with:
```
llvm-lit -sv llvm/test/DebugInfo/X86/diarglist-subregister-mask.ll
ninja -C build check-llvm
ninja -C build check-lldb
```
Both `check-llvm` and `check-lldb` completed with no unexpected
failures.
https://invent.kde.org/qt/clang/llvm-project/-/commit/0740cedd9af7b94f295aca3aee9222c4d942284f

Git commit 0953d8cf3a98b8e6b5d61ae0f38abf36e794df45 by GitHub (on behalf of Donát Nagy) on 07/08/2026 at 10:12..
[NFC][analyzer] Capitalize variable names in BoundsChecking.cpp (#214530)

My recent commit 91dfa266cee8cb49a052531492ba4b670525278a moved this
code here from a different file. Now that it has no menaningful git
history (and it is blamed to me) let's get rid of the lowercase names.
https://invent.kde.org/qt/clang/llvm-project/-/commit/0953d8cf3a98b8e6b5d61ae0f38abf36e794df45

Git commit 480b2c9eb47f1c105432a99b1623abda97e88259 by GitHub (on behalf of Matthew Devereau) on 07/08/2026 at 10:13..
[InstCombine][AArch64] Combine ANDs with two constant CMPHS (#213995)

InstCombine

and(cmphs(pg, ConstA, A), cmphs(pg, A, ConstB))
 ->
cmphs(pg, ConstA - ConstB, sub(pg, A, ConstB))

Also emit zero when ConstB > ConstA
https://invent.kde.org/qt/clang/llvm-project/-/commit/480b2c9eb47f1c105432a99b1623abda97e88259

Git commit a5641e23331a9bfae03a97fba5e4dff1f7c69f63 by GitHub (on behalf of Antonio Frighetto) on 07/08/2026 at 10:16..
[SCCP] Store provenance flag separately before `ValueState` DenseMap invalidation (NFC) (#214694)

A use-after-free issue has been addressed by avoiding a dangling
`ValueState` reference in `visitGetElementPtrInst`, that could arise
from `try_emplace` DenseMap reallocations in `getValueState`.

ASan buildbots were previously failing.
https://invent.kde.org/qt/clang/llvm-project/-/commit/a5641e23331a9bfae03a97fba5e4dff1f7c69f63

Git commit c783125adce180e3eed4732118b216c66b5f0093 by GitHub (on behalf of Nerixyz) on 07/08/2026 at 10:18..
[lldb][Python] Enable type annotations for most types (#213463)

Swig 4.5.0 released today and adds support for customizable automatic
type annotations.

We have to configure the `pytyping` typemap for all cases where we
change the default Swig behavior (i.e. for all `in`/`out`/`argout`
typemaps). This is what I did in this PR. In two cases, we can't
properly annotate:

- For all `argout` typemaps, Swig includes the return type of the
function. So if we'd return a `typing.List[int]`, Swig assumes we're
using `Swig_AppendOutput`, so it annotates the return type with
`typing.List[typing.Union[ReturnType, typing.List[int]]]`.
- Related to that, the annotations for `INPUT`/`OUTPUT`/`INOUT` are
wrong, because the `pytyping` typemap doesn't know about them.

There, I disabled the annotations. Furthermore, overloads are not shown.
The issues are known, and I have fixes for them, but they will only land
in Swig 4.6.

It's a bit unfortunate that this happens after 23.x, but better late
than never.

In the future, we could use
https://github.com/tox-dev/sphinx-autodoc-typehints to show the type
hints in the documentation. One downside is that without support for
overloads, some methods only show `*args`.

You can see the current `__init__.py` in
https://gist.github.com/Nerixyz/2bf230147f933e3943a87457bf036bb0.

Towards #79043.
https://invent.kde.org/qt/clang/llvm-project/-/commit/c783125adce180e3eed4732118b216c66b5f0093

Git commit 56b14c53303f28d887de0e308355c81eef8df6bd by GitHub (on behalf of Kareem Ergawy) on 07/08/2026 at 10:19..
[flang][CodeGen] Add `fir::ShiftType` to LLVM type conversion (#213675)

Mirrors the existing ShapeType / ShapeShiftType converters: a
`!fir.shift<N>` becomes `!llvm.struct<(i64 x N)>`.

Co-Authored-By: Claude
https://invent.kde.org/qt/clang/llvm-project/-/commit/56b14c53303f28d887de0e308355c81eef8df6bd

Git commit 46feebb0af322f28533b3ab20027ccb9300cfd55 by GitHub (on behalf of Spencer Bryngelson) on 07/08/2026 at 10:30..
[flang][OpenMP] Gate the allocate clause at OpenMP 5.0 (#213980)

`allocate` is an OpenMP 5.0 clause, but 58 of the 62 directives that
allow it declare it as
bare `VersionedClause<OMPC_Allocate>`. The default in `DirectiveBase.td`
is `min = 1`:

```
class VersionedClause<Clause c, int min = 1, int max = 0x7FFFFFFF> : Versioned<min, max>
```

so those 58 accept the clause at every version. Only four are gated
today: `do`, `taskgroup`
and `parallel do` at 50, and `scope` at 52.

This is reachable in practice because flang defaults to OpenMP 3.1
(`newestFullySupported = 31`, `CompilerInvocation.cpp`). An invocation
with no
`-fopenmp-version=` lands in the ungated range, semantics accepts the
clause, and
`ConstructDecomposition` then correctly refuses to decompose it.
Lowering consumes the empty
result and crashes:

```
$ flang -fc1 -emit-hlfir -fopenmp repro.f90
Segmentation fault
```

In an assertions build it is caught at `Decomposer.cpp:85`:

```
Assertion `!decompose.output.empty() && "Construct decomposition failed"' failed.
```

With the gate, that becomes a diagnostic:

```
error: ALLOCATE clause is not allowed on TARGET TEAMS DISTRIBUTE PARALLEL DO directive
       in OpenMP v3.1, try -fopenmp-version=50
```

Reported as #211430.

### Scope

This fixes reachability, not the underlying memory error, and should not
be read as a complete
fix for #211430. Consuming a failed decomposition reads uninitialized
memory, which is why the
crash is intermittent — measured on a release build at a pinned
`-fopenmp-version=31`, 40 trials
each:

| | segfaults |
|---|---|
| ASLR on | 25/40 |
| ASLR off (`setarch -R`) | 0/40 |

Any other clause/directive combination that makes decomposition return
empty will hit the same
path. Making that path diagnose and bail rather than fall through is a
separate change.

I also left the gate uniform at 50 rather than tightening per directive.
`allocators` is a 5.2
construct, so by the precedent `scope` sets its clause could be 52; that
argument applies to
several directives here and depends on each one's introduction version,
so it seemed better kept
out of a mechanical change.

### Tests

Nine tests exercised `allocate` through bare `%openmp_flags` (i.e.
`-fopenmp` with no version) and
so depended on the missing gate. Seven get `-fopenmp-version=50`. The
two `allocators` tests get
52, which is what their own `! OpenMP Version 5.2` header comments
already claim they are testing.

### Verification

| suite | tests | failed |
|---|---|---|
| `check-flang` | 4808 | 0 |
| `mlir/test/Dialect/OpenMP`, `mlir/test/Target/LLVMIR`,
`llvm/test/Frontend` | 425 | 0 |
| `clang/test/OpenMP` | 1594 | 0 |

clang version-checks `allocate` in its own semantic analysis rather than
through this table, but
it shares `OMP.td`, so I ran it to confirm.


---

Parts of this change were written or audited with Claude Code. I have
reviewed all of it and take
full responsibility for the contribution. See
`llvm/docs/AIToolPolicy.md`.
https://invent.kde.org/qt/clang/llvm-project/-/commit/46feebb0af322f28533b3ab20027ccb9300cfd55

Git commit 09375e336d7cdbe96018300ef69d2be7d3c441a2 by GitHub (on behalf of Jan André Reuter) on 07/08/2026 at 10:41..
[OpenMP][OMPT] Error when registering EMI and non-EMI callbacks (#213697)

The OpenMP specification includes a restriction for registering both EMI
and non-EMI callbacks (e.g. `ompt_callback_target`, OpenMP v5.2, p. 503,
l. 18-20):

  These callbacks must not be registered at the same time.

However, this was not respected in the runtime. A tool was able to
register both, receiving `ompt_set_always` for each `ompt_set_callback`
call. When an event associated with the EMI or non-EMI callbacks was
dispatched and both callbacks were registered, only the EMI version was
dispatched.

To align the runtime behavior with the OpenMP specification, return
`ompt_set_error` when a tool tries to register both the EMI and non-EMI
variant for a callback. With this, only the tool's first registration is
used.

Update the offload `veccopy_disallow_both.c` test, which already tested
the prior, non-compliant, behavior.

Closes #212959

Signed-off-by: Jan André Reuter <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/09375e336d7cdbe96018300ef69d2be7d3c441a2

Git commit ddd7b231806c8c515a6c033e7f799e413cfb982a by GitHub (on behalf of Ricardo Jesus) on 07/08/2026 at 10:47..
[AArch64] Use [SU]ADALP for partial (nx)v4i32 -> (nx)v2i64 add reduce. (#213915)

The previously used AArch64ISD::[SU]ADDW[BT] became unused after this
change, so I've removed them.
https://invent.kde.org/qt/clang/llvm-project/-/commit/ddd7b231806c8c515a6c033e7f799e413cfb982a
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.