[qt/clang/llvm]: 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
Pushed by mirror-service into branch 'upstream/users/vchuravy/hlfir-pipeline-extension-points'.
Changed from 47fffa41d619850f2770c56037e0ae2af235375c to caa4ccb5f768d3c970a51cad1fae543aeee210f7
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 c301b9901ae93fa91c9861ce13d508d53191a378 by GitHub (on behalf of Matthew Devereau) on 03/08/2026 at 11:13..
[AArch64][SVE] Fold nested boolean UMIN trees (#209234)

Fold redundant UMIN clamps in logical boolean reduction trees when all
operations use the same predicate.
https://invent.kde.org/qt/clang/llvm/-/commit/c301b9901ae93fa91c9861ce13d508d53191a378

Git commit 5ce177f6cd3672aae1791ba155b5438c9198a8ce by GitHub (on behalf of Harald-R) on 03/08/2026 at 11:16..
Fix llvm-mlir-use-after-erase findings (#210733)

Fix the following warnings identified by the `llvm-mlir-use-after-erase`
check from https://github.com/llvm/llvm-project/pull/210727:

```cpp
mlir/lib/Transforms/Utils/DialectConversion.cpp:2700:33: warning: operation 'op' is used after it was erased [llvm-mlir-use-after-erase]
 2700 |           curState, std::string(op->getName().getStringRef()) + " folder");
      |                                 ^
mlir/lib/Transforms/Utils/DialectConversion.cpp:2685:12: note: operation erased here
 2685 |   rewriter.replaceOp(op, replacementValues);
      |            ^
mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp:440:29: warning: operation 'newOp' is used after it was erased [llvm-mlir-use-after-erase]
  440 |           Value newMemRef = newOp->getResult(resIndex);
      |                             ^
mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp:459:20: note: operation erased here 
  459 |             newOp->erase();
      |                    ^
mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp:440:29: note: the use happens in a later loop iteration than the erase
  440 |           Value newMemRef = newOp->getResult(resIndex);
      |                             ^
```

The warning at `NormalizeMemRefs.cpp:440` is resolved by breaking the
loop iteration after erasing the operation, similar to what is done at
line 306.
https://invent.kde.org/qt/clang/llvm/-/commit/5ce177f6cd3672aae1791ba155b5438c9198a8ce

Git commit 2ef2ab65e8622a81b060b96a2ed579816d01f03f by GitHub (on behalf of Kamlesh Kumar) on 03/08/2026 at 11:26..
[AArch64] Update tests with interleave intrinsics (#212312)
https://invent.kde.org/qt/clang/llvm/-/commit/2ef2ab65e8622a81b060b96a2ed579816d01f03f

Git commit d2b28a818981d9703f2ebf0eeeb5e1d9d77dec51 by GitHub (on behalf of Ramkumar Ramachandra) on 03/08/2026 at 11:37..
[ConstFold] Fold fixed-vectors in constantFoldIntrinsic (#213625)

This exposes an underlying bug in wasm.dot-folding, which we fix. The
motivation for this patch is to enable folding of get.active.lane.mask
in VPlan in a follow-up.
https://invent.kde.org/qt/clang/llvm/-/commit/d2b28a818981d9703f2ebf0eeeb5e1d9d77dec51

Git commit 3db0dd71c8579fb825bdd2c6148b53496e485375 by GitHub (on behalf of Manuel Carrasco) on 03/08/2026 at 11:44..
Implement support for NSDI DebugFunctionDefinition. (#211853)

This PR depends on the DebugFunction PR:
https://github.com/llvm/llvm-project/pull/211760. This PR implements
support for
[DebugFunctionDefinition](https://github.khronos.org/SPIRV-Registry/nonsemantic/NonSemantic.Shader.DebugInfo.html#DebugFunctionDefinition).

DebugFunctionDefinition must be emitted within the instruction sequence
of its corresponding OpFunction. The current implementation inserts
DebugFunctionDefinition immediately after the last OpVariable, if one
exists, or otherwise immediately after the first OpLabel. The goal is to
satisfy the following
[requirement](https://github.khronos.org/SPIRV-Registry/nonsemantic/NonSemantic.Shader.DebugInfo.html#_binary_form):

> DebugScope, DebugNoScope, DebugDeclare, DebugValue, DebugLine,
DebugNoLine, and DebugFunctionDefinition instructions may interleave
with instructions inside a function, but they must appear at valid
locations within a block as required by SPV_KHR_non_semantic_info. In
particular, they cannot appear before any OpPhi or function-level
variable declarations in a block, and they cannot appear after a merge
instruction.

To support this, I updated SPIRVAsmPrinter to notify the debug handler
whenever an instruction is emitted. The debug handler maintains a small
amount of state so it can detect when the last OpVariable or the first
OpLabel has been emitted and insert DebugFunctionDefinition at the
appropriate location.
https://invent.kde.org/qt/clang/llvm/-/commit/3db0dd71c8579fb825bdd2c6148b53496e485375

Git commit 6a7f6a02bb95a75c615cde3194ad77d776b869c5 by GitHub (on behalf of Benedek Kaibas) on 03/08/2026 at 11:50..
[analyzer] Implement BugReporterVisitor for UseAfterLifetimeEnd to trace lifetime source binding (#207052)

Currently the `UseAfterLifetimeEnd` checker can emit warnings, but those
warnings cannot clearly describe to which annotated parameter the return
value is actually bound. When multiple parameters are annotated, it is
unclear which one the return value is bound to. Using
`BugReporterVisitor` to trace back the nodes and emit a note that
explains where the lifetime of the annotated parameter (the source)
ended can be helpful for users.

***NOTE***: This PR is built on #205951. It should only be merged after
#205951 is merged.

Consider the following case: 

```cpp
#include <stddef.h>

class Arena {
  char buf[128];
  char *buffer = buf;
  size_t offset = 0;

public:
  void *allocate(size_t size) [[clang::lifetimebound]] {
    void *p = buffer + offset;
    offset += size;
    return p;
  }
  void reset() {offset = 0;}
};

void *arena_dangling() {
  Arena arena;
  void *p = arena.allocate(128);
  arena.reset();
  return p; // arena goes out of scope therefore p dangles
}
```

The `UseAfterLifetimeEnd` checker correctly detects this error and emits
path notes that trace where the value was bound and where its lifetime
ends:

```text
temp.cpp:21:3: warning: Returning value bound to 'arena' that will go out of scope [alpha.cplusplus.UseAfterLifetimeEnd]
   21 |   return p;
      |   ^~~~~~~~
temp.cpp:19:13: note: Value bound to 'arena' here
   19 |   void *p = arena.allocate(128);
      |             ^~~~~~~~~~~~~~~~~~~
temp.cpp:21:3: note: Lifetime of 'arena' ended here
   21 |   return p;
      |   ^~~~~~~~
1 warning generated.
```

The motivating example comes from here:
https://discourse.llvm.org/t/clang-static-analyzer-gsoc-2025-teach-the-clang-static-analyzer-to-understand-lifetime-annotations/84487/41?u=bkaibas01
https://invent.kde.org/qt/clang/llvm/-/commit/6a7f6a02bb95a75c615cde3194ad77d776b869c5

Git commit 68449895e267174801d3b11afd957548f5796a41 by GitHub (on behalf of Kacper Doga) on 03/08/2026 at 12:16..
[GlobalISel] emit G_BITCAST in widenScalarMergeValues when DstTy does not match WideTy (#203014)

**Problem:**
`LegalizerHelper::widenScalarMergeValues` does not handle the case where
the destination register type is a floating-point type but the widen
operation produces an integer type of the same size.

For example, given:
```
%0:_(i8) = G_CONSTANT i8 0
%1:_(i8) = G_CONSTANT i8 1
%2:_(f16) = G_MERGE_VALUES %0:_(i8), %1_:(i8)
```
With a `minScalarOrElt` rule widening the source type to I16,
`widenScalarMergeValues` enters the `WideSize >= DstSize` path and
assigns the result to a new virtual register. The condition used to
assign directly to DstReg uses type equality (WideTy == DstTy), which
fails when DstTy = f16. As a result, DstReg is left without a
definition.

**Fix:**
After the OR-reduction loop, add a check for the case where DstTy and
WideTy have equal sizes but different types, and emit a G_BITCAST.

**Testing:**
No currently upstream target exercises `G_MERGE_VALUES` with a
floating-point destination type through this widen path, as most targets
promote f16 to s16 before legalization. The fix is therefore covered by
a unit test in `LegalizerHelperTest.cpp`, modeled after the existing
`WidenScalarMergeValuesPointer` test, which directly invokes widenScalar
on a manually constructed `f16 = G_MERGE_VALUES i8, i8` instruction and
verifies that a `G_BITCAST` is emitted as the final instruction.
https://invent.kde.org/qt/clang/llvm/-/commit/68449895e267174801d3b11afd957548f5796a41

Git commit 7bf1ded0e061cc388a31f4293afd527f76810ffb by GitHub (on behalf of William Tran-Viet) on 03/08/2026 at 12:23..
[libc++] Clean up headers that relied on `<optional>`'s transitive includes (#213158)

Clear out the headers in <optional> that were left in to not break
other headers, and fix them also. Also fix tests.
https://invent.kde.org/qt/clang/llvm/-/commit/7bf1ded0e061cc388a31f4293afd527f76810ffb

Git commit 97fd08dbaf82b35ef860bca11bb047fd60f723d5 by GitHub (on behalf of Kacper Doga) on 03/08/2026 at 12:24..
[GlobalISel] avoid G_TRUNC with floating-point G_MERGE_VALUES source (#206733)

With extended LLT, scalar LLT carry an integer/float kind information.
The `G_TRUNC(G_MERGE_VALUES)` fold in
`LegalizationArtifactCombiner::tryCombineTrunc` truncated, copied or
rebuilt a merge directly from the merge's source register.

**Problem**
When those sources are floating-point this produces artifacts with float
source operand - e.g. `i1 = G_TRUNC f32` or a rebuilt `iN =
G_MERGE_VALUES f32, ...` which are bit level integer operations and must
not take a float operand.

**Fix**
Reinterpret a floating-point merge source to an integer of the same size
via `G_BITCAST` before truncating, copying or rebuilding the merge. So
the emitted artifacts stay on integer operands. Non-float sources and
non-extended-LLT builds are unaffected.
https://invent.kde.org/qt/clang/llvm/-/commit/97fd08dbaf82b35ef860bca11bb047fd60f723d5

Git commit f84bacf82a153a75dbf549d8c25d6e73673ea043 by GitHub (on behalf of David Spickett) on 03/08/2026 at 12:31..
[lldb] Introduce RegisterType base class for all register type classes (#196960)

This is refactoring to prepare for
https://github.com/llvm/llvm-project/issues/87471. Where we will be
adding support for describing registers as unions and vectors. See:
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Target-Description-Format.html

A union is like a C union and references other types defined in the XML.
Just like a set of register flags might reference an enum for one of
those flags.

By introducing this base class I'm making the treatment of all these
different types generic. So that when encoding them as XML we can emit
the type's dependencies recursively, and then emit the type itself.

This strategy will also be used later in RegisterTypeBuilderClang to
generate AST to represent these types.

As GDB decided to include size in enums, whenever we emit something it
will get a "user" pointer. This allows an enum type to read the size of
the register it's being attached to. No other type class requires this.

I would call this "parent" but it is not usually the parent. The
heirarchy is:
* A RegisterFlags type contains many flags.
* One of those flags has an enum as its type.
* That enum needs to query two levels up to get the RegisterFlag's size.

LLDB does not care about this enum size attribute, but GDB does so we
emit it for compatibility.

I don't expect anything other than a RegisterFlags to reference an enum
at this time. In theory, a vector's element could be an enum but I do
not know of anything available today that does this.

I'd like to support arbitrary nesting of these types, but only later
once known use cases work well.

For the time being, the generic RegisterType pointer is cast into a
RegisterFlags before use. In future this will become a switch over the
possible register types we support.
https://invent.kde.org/qt/clang/llvm/-/commit/f84bacf82a153a75dbf549d8c25d6e73673ea043

Git commit fccabca20c732cc93b018effa7381e2e2a6f9506 by GitHub (on behalf of Timm Baeder) on 03/08/2026 at 12:46..
[clang][bytecode] Protect against invalid C++26 string repr (#213639)

We can't call `getNumElems()` for unknown-size arrays.
https://invent.kde.org/qt/clang/llvm/-/commit/fccabca20c732cc93b018effa7381e2e2a6f9506

Git commit ea2933f9aae9dc0bf4bb120bb732c0758d1026fd by GitHub (on behalf of Tom Eccles) on 03/08/2026 at 12:48..
[flang][Lower] Flatten signed real sum terms (#211829)

Second part of generalisations requested in #207377.

Extend real sum reassociation to flatten unparenthesized addition and
subtraction into signed terms. Rebuild split groups with addition and
subtraction while preserving parenthesized subtrees as opaque values.

I did not observe any benchmark result changes as a result of this
patch.

Assisted-by: Codex
https://invent.kde.org/qt/clang/llvm/-/commit/ea2933f9aae9dc0bf4bb120bb732c0758d1026fd

Git commit d2e2626045e2380e60f51e75c39acf245572c918 by GitHub (on behalf of Louis Dionne) on 03/08/2026 at 12:53..
[libc++] Don't rely on a transitively included BYTE_ORDER in ctype_base (#213032)

Use libc++'s own _LIBCPP_BIG_ENDIAN macro instead of BYTE_ORDER, which
was relied upon from a transitive <endian.h> include on Glibc.
https://invent.kde.org/qt/clang/llvm/-/commit/d2e2626045e2380e60f51e75c39acf245572c918

Git commit 3ea717b891a05dd00006b51e506b30198d57f763 by GitHub (on behalf of Louis Dionne) on 03/08/2026 at 12:54..
[libc++] Add missing includes in the locale headers (#213035)

Several headers use entities from `<__locale>` but rely on picking them
up transitively, in most cases through `<ios>`. Fix this in preparation
for splitting up `<__locale>`.
https://invent.kde.org/qt/clang/llvm/-/commit/3ea717b891a05dd00006b51e506b30198d57f763

Git commit dbd0c2d86f02528de4940ee87137259d9b7f0b85 by GitHub (on behalf of Nikolas Klauser) on 03/08/2026 at 12:55..
[libc++] Remove opt-out of the LLVM 23 transitive includes removal (#213245)

We've removed transitive includes by default in LLVM 23, but added an
opt-in to keep the transitive includes for the release. Now that we've
branched we can remove the transitive includes unconditionally.

RFC: https://discourse.llvm.org/t/rfc-remove-unused-transitive-includes-from-the-libc-headers
https://invent.kde.org/qt/clang/llvm/-/commit/dbd0c2d86f02528de4940ee87137259d9b7f0b85

Git commit 3d60487f83797a10a6379669647a139e6823d3d2 by GitHub (on behalf of Yair Ben Avraham) on 03/08/2026 at 12:58..
[CIR][AArch64] Lower remaining FP16 vfma and vfms builtins (#210359)

Complete CIR lowering coverage for the remaining AArch64 NEON FP16 fused
multiply-accumulate and fused multiply-subtract builtins.

This covers ACLE wrappers from section 2.6.1.9.3:
  - vfma_n_f16, vfmaq_n_f16
  - vfms_f16, vfmsq_f16
  - vfms_lane_f16, vfmsq_lane_f16
  - vfms_laneq_f16, vfmsq_laneq_f16
  - vfms_n_f16, vfmsq_n_f16
  - vfmsh_lane_f16, vfmsh_laneq_f16

The existing CIR lowering paths already handle these wrappers. Move
their tests from AArch64/v8.2a-neon-intrinsics.c into
AArch64/neon/fused-multiple-fullfp16.c, add direct LLVM, CIR-to-LLVM,
and CIR coverage, and remove the superseded tests.

Strengthen the LLVM checks by tracking operands from their defining
operations and using LLVM-DAG for order-independent setup operations.

Part of #185382
https://invent.kde.org/qt/clang/llvm/-/commit/3d60487f83797a10a6379669647a139e6823d3d2

Git commit 2a9aa12745874b5cff513f0d60a63845e6b783af by GitHub (on behalf of Walter Lee) on 03/08/2026 at 13:13..
Bazel 8d292a7c4b952eb5e9c55ed54a17a25c85bd553c (#213661)

This fixes
https://github.com/llvm/llvm-project/commit/8d292a7c4b952eb5e9c55ed54a17a25c85bd553c
(https://github.com/llvm/llvm-project/pull/213265).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=8d292a7c4b952eb5e9c55ed54a17a25c85bd553c

Co-authored-by: Google Bazel Bot <[email protected]>
https://invent.kde.org/qt/clang/llvm/-/commit/2a9aa12745874b5cff513f0d60a63845e6b783af

Git commit 53ee7b167d8aee0a75c1332ca4a6aa037e0869a0 by GitHub (on behalf of Gábor Tóthvári) on 03/08/2026 at 13:13..
[NFC][analyzer] Eliminate NodeBuilder from ExprEngine visit methods and from their utility methods (#212186)

This patch eliminates the remaining uses of the class `NodeBuilder` from
the `ExprEngine::Visit*` methods and from their utility methods such as
`evalLocation`, `evalLoad`, `CreateCXXTemporaryObject` and
`handleConstructor`.
https://invent.kde.org/qt/clang/llvm/-/commit/53ee7b167d8aee0a75c1332ca4a6aa037e0869a0

Git commit 981286a235471cfffbf2b18201aea926a0803b9c by GitHub (on behalf of Nicole Aschenbrenner) on 03/08/2026 at 13:21..
[OpenMP] target-fast implies teams/threads oversubscription (#205775)

Enable -fopenmp-assume-teams-oversubscription and
-fopenmp-assume-threads-oversubscription by default under
-fopenmp-target-fast. Adds driver test coverage for both.

Split out of #205325 as a standalone change.
https://invent.kde.org/qt/clang/llvm/-/commit/981286a235471cfffbf2b18201aea926a0803b9c

Git commit 23f0aa2f2ea35a8e9b106f97d561482cbf6f17b5 by GitHub (on behalf of Simon Pilgrim) on 03/08/2026 at 13:26..
[X86] movmsk-cmp.ll - update PR39665_c_ray test to match middle-end output (#213659)

These now lower to vXi1 reduction (as bitcast) patterns

The PR39665_c_ray_opt test folds to the same IR, so I've merged the
tests
https://invent.kde.org/qt/clang/llvm/-/commit/23f0aa2f2ea35a8e9b106f97d561482cbf6f17b5

Git commit 587ddb34f741ffb8fbcbc258fcfea373463f392f by GitHub (on behalf of Arseniy Obolenskiy) on 03/08/2026 at 13:26..
[SPIR-V] Parse parameterized Memory Access operands with a shared helper (#209262)

Copy printing only special cased Aligned, so alias list and scope IDs
were then misread as additional masks
https://invent.kde.org/qt/clang/llvm/-/commit/587ddb34f741ffb8fbcbc258fcfea373463f392f

Git commit 49ace5ab8f1846b47fdad85ac698982e9cb8cda9 by GitHub (on behalf of Ashutosh Nema) on 03/08/2026 at 13:29..
[Transforms][Utils] Test for branch weight preservation in LoopSplitUtils (#213647)

Added a lit test test for branch weight
https://invent.kde.org/qt/clang/llvm/-/commit/49ace5ab8f1846b47fdad85ac698982e9cb8cda9

Git commit e78503c4f017a807c23e583f8a6e3ab94d712632 by GitHub (on behalf of Arseniy Obolenskiy) on 03/08/2026 at 13:29..
[SPIR-V] Fix validation errors for function pointers with CodeSectionINTEL storage class (#192973)

CodeSectionINTEL pointers are not valid operands for
PtrCastToGeneric/GenericCastToPtr (including inside OpSpecConstantOp)
https://invent.kde.org/qt/clang/llvm/-/commit/e78503c4f017a807c23e583f8a6e3ab94d712632

Git commit fc381d5bf9de78cb6b477f58cf58b8b52bad55de by GitHub (on behalf of Kyungtak Woo) on 03/08/2026 at 13:37..
[bazel] Export TripleName.def and get_triple_system_name.py in LLVM overlay (#213602)

The TargetParser lit regression test
(`llvm/test/tools/TargetParser/get-triple-system-name.test`) runs
`get_triple_system_name_test.py`, which imports
`get_triple_system_name.py` from `llvm/utils/` and reads
`TripleName.def` from `llvm/include/llvm/TargetParser/`.

When executing lit regression tests in downstream sandboxed build
systems, the test fails with `ModuleNotFoundError: No module named
'get_triple_system_name'` because these standalone files are located
outside the test directory and are not staged into the test runfiles
sandbox.

Add `TripleName.def` and `get_triple_system_name.py` to `exports_files`
in the overlay so downstream builds can reference them as test runfile
dependencies.

Assited by: Gemini
https://invent.kde.org/qt/clang/llvm/-/commit/fc381d5bf9de78cb6b477f58cf58b8b52bad55de

Git commit d2fcb0c9e11f8d8bedc45db0aeba9e0a53141fe5 by GitHub (on behalf of Timm Baeder) on 03/08/2026 at 13:47..
[clang][bytecode] Handle multiple base paths in dynamic_cast (#213592)

This can happen via virtual bases.

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

Git commit caa4ccb5f768d3c970a51cad1fae543aeee210f7 by Valentin Churavy on 03/08/2026 at 13:59..
[flang] Add HLFIR-to-FIR pass pipeline extension points

The FIR optimizer extension points (FIROptEarly, FIRInliner, FIROptLast) all
run after HLFIR has been lowered to FIR, so the HLFIR intrinsic operations
(hlfir.sum, hlfir.matmul, ...) are gone by the time they run. Transformations
that need to see those operations have nowhere to attach.

Add two extension points to createHLFIRToFIRPassPipeline:

  * HLFIROptEarly, at the start of the pipeline, before any HLFIR
    simplification or inlining.
  * HLFIROptLast, just before createLowerHLFIRIntrinsics.

Drivers register passes through registerHLFIROptEarlyEPCallbacks and
registerHLFIROptLastEPCallbacks on MLIRToLLVMPassPipelineConfig. The invoke
methods are const so they can be called on the const config the HLFIR pipeline
receives. With no callbacks registered the pipeline is unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
https://invent.kde.org/qt/clang/llvm/-/commit/caa4ccb5f768d3c970a51cad1fae543aeee210f7
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.