LLVM/project 588304bllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 and-neg-pow2-copyable.ll

[SLP]Model copyable lanes of idempotent binops as op(V, V) when the operand column has a constant lane

The op(V, identity) form lets the reorder move the lane out of the
joined column, breaking the opcode-peer node; the symmetric form is
reorder-proof.

Reviewers: RKSimon, bababuck

Pull Request: https://github.com/llvm/llvm-project/pull/220252
DeltaFile
+94-28llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-21llvm/test/Transforms/SLPVectorizer/X86/and-neg-pow2-copyable.ll
+106-492 files

LLVM/project 860fb77llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/lib/Transforms/Vectorize/SLPVectorizer SLPCostAnalysis.h SLPReductionUtils.h

[SLP]Reduce logical and/or reductions in the wide leaf type

Logical and/or reductions on i1 with booleanized wide leaves (truncs
of same-op chains, zero-tests of values from [0, 1]) are performed in
the wide type, exposing the underlying consecutive values to the tree;
bit 0 of the result is the final value. Fixes the fragmented reduction
and the gather-of-scalars regression for compile-time-expanded Boolean
reductions.

Fixes #221167

Reviewers: RKSimon, bababuck

Pull Request: https://github.com/llvm/llvm-project/pull/221321
DeltaFile
+18-127llvm/test/Transforms/SLPVectorizer/X86/logical-reduction-booleanized-leaves.ll
+122-4llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+65-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCostAnalysis.cpp
+59-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPReductionUtils.cpp
+23-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPReductionUtils.h
+21-0llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCostAnalysis.h
+308-1316 files

LLVM/project 859cf4fllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 logical-binops-booleanized-leaves.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+161-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+24-22llvm/test/Transforms/SLPVectorizer/X86/logical-binops-booleanized-leaves.ll
+185-242 files

LLVM/project 240670dllvm/include/llvm/Transforms/Utils SplitModuleCommon.h, llvm/lib/Target/AMDGPU AMDGPUSplitModule.cpp

[NFC][ModuleUtils] Move externalize() from module splitting utilities (#221181)

`SplitModule.cpp` and `AMDGPUSplitModule.cpp` each carry an identical
static `externalize()` helper that promotes local-linkage globals to
external + hidden visibility and assigns a stable name to unnamed
entities, so they are named consistently across module partitions.

This patch removes the duplication by moving the helper into
`ModuleUtils` as `llvm::externalize`, and updates both users to call the
shared implementation. No functional changes are intended.

This also prepares for upcoming module splitting utilities to reuse a
single, canonical implementation.

Development of this patch was assisted by AI and reviewed by me.
DeltaFile
+33-0llvm/include/llvm/Transforms/Utils/SplitModuleCommon.h
+33-0llvm/lib/Transforms/Utils/SplitModuleCommon.cpp
+6-18llvm/lib/Transforms/Utils/SplitModule.cpp
+4-16llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
+9-9llvm/test/tools/llvm-split/unnamed.ll
+1-0llvm/lib/Transforms/Utils/CMakeLists.txt
+86-436 files

LLVM/project 483af6cflang/include/flang/Lower/OpenMP Clauses.h, flang/lib/Lower/OpenMP Clauses.cpp

[OpenMP] Add definitions for REDUCTION_KIND and SHIFT clauses (#222745)

This is a barebones change to introduce the enum identifiers for these
clauses.
DeltaFile
+15-2llvm/include/llvm/Frontend/OpenMP/ClauseT.h
+4-0llvm/include/llvm/Frontend/OpenMP/OMP.td
+2-0flang/lib/Lower/OpenMP/Clauses.cpp
+2-0flang/include/flang/Lower/OpenMP/Clauses.h
+23-24 files

LLVM/project c67808cllvm/include/llvm/Frontend/Directive DirectiveBase.td, llvm/include/llvm/Frontend/OpenMP OMP.td

[OpenMP] Change association of some directives from "none" to "explicit" (#222703)

Certain declarative directives are associated with base language
declarations by having the declared entities explicitly listed as
arguments.

Previously these had "none" in OMP.td. Change them to "explicit" to be
consistent with the spec. The existing code does not require any
changes, since the only potentially affected code would be that which
checked the assocation for "none", and the only such cases were applied
to executable directives.
DeltaFile
+4-4llvm/include/llvm/Frontend/OpenMP/OMP.td
+2-1llvm/test/TableGen/directive2.td
+2-1llvm/test/TableGen/directive1.td
+2-0llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+1-0llvm/include/llvm/Frontend/Directive/DirectiveBase.td
+11-65 files

LLVM/project 23f2e44llvm/lib/CodeGen/SelectionDAG LegalizeTypes.h LegalizeTypes.cpp

[SelectionDAG] Remove unused float promotion in DAGTypeLegalizer (NFC) (#223219)

This patch removes PromotedFloats along with GetPromotedFloat and
SetPromotedFloat.  The Mapped bitmask in PerformExpensiveChecks is
adjusted accordingly, shifting the bit for SoftPromotedHalfs.

The last uses of DAGTypeLegalizer::GetPromotedFloat and
DAGTypeLegalizer::SetPromotedFloat were removed on January 26, 2026 in
commit a7d48bd305ef3aa4bd543da6f4cd8682a3d35c32 when TypePromoteFloat
and its associated DAG machinery were removed.

With these accessors gone, DAGTypeLegalizer::PromotedFloats is no longer
populated.

Assisted-by: Antigravity
DeltaFile
+0-17llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
+1-16llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+1-332 files

LLVM/project 0c324f1llvm/include/llvm/Support MathExtras.h

[Support] Fix the return type of AddOverflow, SubOverflow, and MulOverflow (#223217)

This patch fixes the return type of the 3-argument overloads of
AddOverflow, SubOverflow, and MulOverflow to bool.

Without this patch, these functions are declared with a return type
of T:

  template <typename T>
std::enable_if_t<std::is_signed_v<T>, T> AddOverflow(T X, T Y, T
&Result);

even though they return a boolean indicating whether an overflow
occurred, as stated in the comment:

/// Add two signed integers, computing the two's complement truncated
result,
  /// returning true if overflow occurred.

Assisted-by: Antigravity
DeltaFile
+3-3llvm/include/llvm/Support/MathExtras.h
+3-31 files

LLVM/project ca24243llvm/lib/Target/AMDGPU AMDGPUCallLowering.cpp, llvm/test/CodeGen/AMDGPU unsupported-calls.ll

[AMDGPU][GlobalISel] Reject guaranteed tail calls in call lowering (#216260)

The FPDiff immediate was being written to the wrong operand, corrupting
the callee GlobalAddress

Reject required tail calls like SelectionDAG does, and fix the stale
index for the one path that still needs it (cs.chain lowering)
DeltaFile
+16-0llvm/test/CodeGen/AMDGPU/unsupported-calls.ll
+12-1llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
+28-12 files

LLVM/project 3409d07llvm/test/Transforms/SLPVectorizer/X86 logical-binops-booleanized-leaves.ll

[SLP][NFC]Add a test with missed widened boolean optimization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/223245
DeltaFile
+589-0llvm/test/Transforms/SLPVectorizer/X86/logical-binops-booleanized-leaves.ll
+589-01 files

LLVM/project d283a55clang/lib/Driver/ToolChains Cuda.cpp, clang/test/OffloadTools/clang-nvlink-wrapper nvlink-wrapper.c

[clang-nvlink-wrapper] Fix response file handling for the nvlink wrapper (#220249)

Summary:
Response files were not handled correctly because the copied support
used the `nvlink` argument which is not supported by the argument
parser. Pass to the nvlink wrapper using the canonical format and then
reconstruct it when we execute the sub jobs

Fixes: https://github.com/llvm/llvm-project/issues/219914
DeltaFile
+43-15clang/tools/clang-nvlink-wrapper/ClangNVLinkWrapper.cpp
+11-0clang/test/OffloadTools/clang-nvlink-wrapper/nvlink-wrapper.c
+3-5clang/lib/Driver/ToolChains/Cuda.cpp
+57-203 files

LLVM/project db65aceclang/docs ReleaseNotes.md, clang/include/clang/Sema Sema.h

Revert "[Clang] Refactor instantiation of declarations within concepts" (#223235)

This reverts llvm/llvm-project#221707

This broke std::map as reported in
https://github.com/llvm/llvm-project/issues/223220
DeltaFile
+144-32clang/lib/Sema/SemaConcept.cpp
+35-79clang/lib/Sema/SemaTemplateInstantiate.cpp
+0-26clang/test/SemaCXX/cxx2c-fold-exprs.cpp
+19-7clang/include/clang/Sema/Sema.h
+0-16clang/test/SemaTemplate/concepts-lambda.cpp
+0-3clang/docs/ReleaseNotes.md
+198-1631 files not shown
+198-1657 files

LLVM/project baec9c3llvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp, llvm/test/CodeGen/AMDGPU fneg-combines.new.ll

[AMDGPU] Fix fneg fold with multi use fadd/fma (#217573)
DeltaFile
+43-0llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
+6-2llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+49-22 files

LLVM/project 3c77eb3llvm/include/llvm/CodeGen TargetLowering.h, llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

[DAGCombiner] Only fold shift+mask compare to rotate if the shift amount divides the bit width (#220743)

DAGCombiner::visitSETCC can turn `(X << S) == (X & -(1 << S))` (or the
srl variant) into `rotl(X, S) == X`, and the other way around, when the
target prefers one form over the other. The two forms are only equivalent when
S divides the bit width. The check used `isPowerOf2(S)`, which is the same
thing for i8/i16/i32/i64 but not for odd widths like i3, where S = 2 is a
power of two that does not divide 3. On x86, which prefers the rotate,
the reporter's i3 function returned the wrong value for two of its eight
inputs.

This changes the `MayTransformRotate` flag passed to
`preferedOpcodeForCmpEqPiecesOfOperand` to check `NumBits % S == 0`
(with S != 0) and fixes the two comments that described the old rule. For legal
scalar types nothing changes. On illegal non power of two widths this
also lets a non power of two amount that divides the width use the rotate
(like i6 with S = 3); that is correct for the same reason and legalizes
through the usual rotate promotion, same as i6 with S = 2 did before. The x86
hook already honors the flag in both directions, so the fix lives in the

    [6 lines not shown]
DeltaFile
+72-0llvm/test/CodeGen/X86/cmp-shiftX-maskX.ll
+7-3llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+3-3llvm/include/llvm/CodeGen/TargetLowering.h
+3-2llvm/lib/Target/X86/X86ISelLowering.cpp
+85-84 files

LLVM/project f8a9603lldb/source/Plugins/ObjectFile/Mach-O ObjectFileMachO.cpp, lldb/unittests/ObjectFile/MachO TestObjectFileMachO.cpp

[lldb] Bound Mach-O symtab allocation to the file size (#222955)

Opening a Mach-O file whose LC_SYMTAB claims far more symbols than the
file could possibly hold makes lldb ask for hundreds of gigabytes.  A
128-byte file with LC_SYMTAB.nsyms = 0x80000000 (the new unit test's
input, built with yaml2obj) reproduces it through `lldb-target-fuzzer`,
the harness that found this bug:

```
==45515== ERROR: libFuzzer: out-of-memory (malloc(171798691840))
    #8  std::__1::__split_buffer<lldb_private::Symbol,...>::__split_buffer(...)
    #9  std::__1::vector<lldb_private::Symbol,...>::resize(unsigned long)
    #10 lldb_private::Symtab::Resize(unsigned long)
    #11 ObjectFileMachO::ParseSymtab(lldb_private::Symtab&)
```

`ParseSymtab()` sizes the destination `Symtab`'s `vector<Symbol>`
directly
from `nsyms` and `nindirectsyms`, two counts read from the file's

    [14 lines not shown]
DeltaFile
+45-0lldb/unittests/ObjectFile/MachO/TestObjectFileMachO.cpp
+10-3lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+55-32 files

LLVM/project 3deeb01llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 cancelled-copyable-self-use-deps-2.ll

[SLP]Fix dep accounting when cancelling a bundle with repeated copyable users

Skip duplicate users instead of stopping at the first one when walking
the operand lanes; an early stop misses a trailing self-use lane, the
displaced parent-edge copyable data is never restored, and scheduling
asserts.

Fixes #223225

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/223236
DeltaFile
+180-0llvm/test/Transforms/SLPVectorizer/X86/cancelled-copyable-self-use-deps-2.ll
+1-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+181-12 files

LLVM/project 956cab2llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 cancelled-copyable-self-use-deps-2.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+180-0llvm/test/Transforms/SLPVectorizer/X86/cancelled-copyable-self-use-deps-2.ll
+1-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+181-12 files

LLVM/project 46047e5clang/docs ReleaseNotes.md, clang/include/clang/Sema Sema.h

Revert "[Clang] Refactor instantiation of declarations within concepts (#221707)"

This reverts commit 445028c28190b9c883c08cb2ef69e002b65e5af9.
DeltaFile
+144-32clang/lib/Sema/SemaConcept.cpp
+35-79clang/lib/Sema/SemaTemplateInstantiate.cpp
+0-26clang/test/SemaCXX/cxx2c-fold-exprs.cpp
+19-7clang/include/clang/Sema/Sema.h
+0-16clang/test/SemaTemplate/concepts-lambda.cpp
+0-3clang/docs/ReleaseNotes.md
+198-1631 files not shown
+198-1657 files

LLVM/project eae1ec7llvm/lib/CodeGen/SelectionDAG SelectionDAG.cpp, llvm/test/CodeGen/AArch64 sve-insert-vector.ll

[SelectionDAG] Handle scalable INSERT_SUBVECTOR in ComputeNumSignBits (#221631)

Handle scalable INSERT_SUBVECTOR in SelectionDAG as a pre-fix for
#220976.

Add coverage for scalable subvectors and fixed subvectors inserted into
scalable vectors.
DeltaFile
+75-0llvm/test/CodeGen/AArch64/sve-insert-vector.ll
+7-4llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+82-42 files

LLVM/project 31a1c03llvm/lib/Support CMakeLists.txt, llvm/lib/Support/Unix Path.inc

[Support] Implement getMainExecutable for OpenBSD with getexecpath() (#220141)

OpenBSD now has a proper function to retrieve the executable and path.
DeltaFile
+12-2llvm/lib/Support/Unix/Path.inc
+7-0llvm/lib/Support/CMakeLists.txt
+19-22 files

LLVM/project d88df11llvm/test/CodeGen/AArch64 overflow-vec.ll, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.832bit.ll amdgcn.bitcast.896bit.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+57,327-55,762llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+6,634-6,608llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,576-5,657llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+4,486-4,550llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+6,589-0llvm/test/CodeGen/AArch64/overflow-vec.ll
+2,884-2,534llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+83,496-75,1114,239 files not shown
+270,938-168,1944,245 files

LLVM/project 709ef4bllvm/lib/Target/ARM ARMConstantIslandPass.cpp, llvm/test/CodeGen/ARM cbz-no-kill-flag.mir

ARM: Avoid relying on kill flags for determining CPSR liveness (#222873)

When forming CBZ/CBNZ in ARMConstantIslands, check if CPSR is live-out
of the block instead of relying on the kill flag. Kill flags have been
soft deprecated for over a decade.

Co-authored-by: Claude claude-opus-4.8 <noreply at anthropic.com>
DeltaFile
+132-0llvm/test/CodeGen/ARM/cbz-no-kill-flag.mir
+7-4llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+139-42 files

LLVM/project 4dd595bllvm/lib/Target/WebAssembly WebAssemblyLowerEmscriptenEHSjLj.cpp

Wasm: Remove incorrect assumption that intrinsics cannot throw (#221180)

A few intrinsics are marked as Throws
DeltaFile
+0-3llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+0-31 files

LLVM/project e681bf8llvm/lib/Target/ARM ARMConstantIslandPass.cpp

remove todo
DeltaFile
+0-1llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+0-11 files

LLVM/project 8fef8fcllvm/test/CodeGen/AArch64 overflow-vec.ll, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.832bit.ll amdgcn.bitcast.896bit.ll

Merge branch 'main' into users/arsenm/clang/emscripten-eh-model
DeltaFile
+57,327-55,762llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+6,634-6,608llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+5,576-5,657llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+4,486-4,550llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+6,589-0llvm/test/CodeGen/AArch64/overflow-vec.ll
+2,884-2,534llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+83,496-75,1114,959 files not shown
+306,030-192,1944,965 files

LLVM/project c4628f0llvm/cmake/modules HandleLLVMOptions.cmake

[CMake] Disable linker version scripts for Emscripten (#221647)

Emscripten reports itself as a Unix-like CMake platform, causing LLVM to
set `LLVM_HAVE_LINK_VERSION_SCRIPT` and pass GNU/ELF `--version-script`
options when linking shared libraries.

Emscripten uses `wasm-ld`, which does not support GNU version scripts
and currently reports:
```
    em++: warning: ignoring unsupported linker flag: `--version-script`
```
Treat Emscripten like the other platforms without version-script
support. This prevents LLVM and Clang shared-library targets from
passing an unsupported linker option.

This was encountered while building LLVM 23.1.0 for both wasm32 and
wasm64 with Emscripten 6.x in emscripten-forge.
```
[ 45%] Building CXX object tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/SemaExceptionSpec.cpp.o

    [7 lines not shown]
DeltaFile
+1-1llvm/cmake/modules/HandleLLVMOptions.cmake
+1-11 files

LLVM/project 8ea78dbclang/include/clang/Options Options.td, clang/lib/Driver/ToolChains WebAssembly.cpp

clang/WebAssembly: Add -femscripten-exceptions driver flag (#221431)
DeltaFile
+20-1clang/test/Driver/wasm-toolchain.c
+15-3clang/lib/Driver/ToolChains/WebAssembly.cpp
+3-0clang/include/clang/Options/Options.td
+38-43 files

LLVM/project 0d55d0blld/ELF ICF.cpp

[ELF] Parallelize ICF's section sort. NFC (#223216)

All candidate sections are sorted by a serial stable_sort, which is a
scalability bottleneck. Switch to parallel sort using Schwartzian
transform. Linking Chromium with --icf=all (--threads=8) drops from
4.47s to 3.18s.
DeltaFile
+9-2lld/ELF/ICF.cpp
+9-21 files

LLVM/project 051c492clang/test/SemaCXX ms-ctor-closure.cpp

[clang][test] Remove an uninitialized read in a test case (#223120)

This test case was added in
https://github.com/llvm/llvm-project/pull/222212. Its purpose is to
check that explicit constructor calls work at compile time.

However, the test case left var.a uninitialized and the copy constructor
reads an unitialized value. MSVC diagnoses this, but clang currently
fails to do so.

Change the test case to remove the unrelated problem of an uninitialized
read.
DeltaFile
+4-3clang/test/SemaCXX/ms-ctor-closure.cpp
+4-31 files

LLVM/project 7a7cea9lld/ELF SymbolTable.h SymbolTable.cpp

[ELF] Version script: simplify wildcard matching. NFC (#223202)

Replace a loop over non-"*" wildcard patterns and another loop over "*"
with a single loop that calls the inlined
`SymbolTable::assignWildcardVersion`.
DeltaFile
+52-50lld/ELF/SymbolTable.cpp
+0-1lld/ELF/SymbolTable.h
+52-512 files