LLVM/project fa0b01a — mlir/test/Dialect/SCF canonicalize.mlir

[mlir][scf] Test forall promotion with multiple inserts (#232920)

Cover #231826 by checking that disjoint insertions into one shared
output are chained into a single result.

Assisted-by: Codex / GPT-6
DeltaFile
+18-0mlir/test/Dialect/SCF/canonicalize.mlir
+18-01 files

LLVM/project 29d4cfe — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/X86 pr232598.ll

[DAG] SimplifyDemandedVectorElts - only assume KnownZero if the shift/rotate amount is not undef/poison (#233115)

Fixes #232598
DeltaFile
+17-29llvm/test/CodeGen/X86/pr232598.ll
+1-1llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+18-302 files

LLVM/project fcb763b — clang/test/CIR/CodeGen sve-vector-arith-ops.c, clang/test/OpenMP single_codegen.cpp threadprivate_codegen.cpp

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+1,275-1,275clang/test/OpenMP/threadprivate_codegen.cpp
+626-626clang/test/OpenMP/single_codegen.cpp
+983-0clang/test/CIR/CodeGen/sve-vector-arith-ops.c
+0-681lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
+681-0lldb/source/Plugins/Process/Utility/RegisterInfo_arm64.cpp
+272-264flang/lib/Semantics/canonicalize-omp.cpp
+3,837-2,846485 files not shown
+15,652-7,114491 files

LLVM/project aa86865 — clang/lib/CodeGen CGExprCXX.cpp, clang/test/CodeGenCXX new-array-cookie-overflow.cpp

[clang][CodeGen] Fix assertion failure for new T[SIZE_MAX] with array cookie (#232570)

Fixes #232250.

`EmitCXXNewExpr` asserts that `allocSize == allocSizeWithoutCookie` if
and only if no array cookie is needed. The "only if" direction does not
always hold.

`EmitCXXNewAllocSize` replaces the allocation size with an all-ones
value when the size computation overflows, so that `operator new` fails.
If the count times the element size is already all-ones and adding the
cookie then overflows, both values are the same uniqued constant even
though a cookie is present. For example, on i386:

  struct S { ~S(); };
  void f() { new S[0xFFFFFFFFu]; }

Here `sizeof(S) == 1`, the cookie is 4 bytes, and `0xFFFFFFFF + 4`
overflows, so the assertion fired. This can't happen on 64-bit targets

    [6 lines not shown]
DeltaFile
+15-0clang/test/CodeGenCXX/new-array-cookie-overflow.cpp
+6-2clang/lib/CodeGen/CGExprCXX.cpp
+21-22 files

LLVM/project 35f840b — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/lib/Transforms/Vectorize/SLPVectorizer SLPUtils.cpp SLPCompatibilityAnalysis.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+74-28llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCompatibilityAnalysis.cpp
+57-13llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+21-43llvm/test/Transforms/SLPVectorizer/X86/interchangeable-cmp-predicates.ll
+20-11llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCompatibilityAnalysis.h
+12-8llvm/test/Transforms/SLPVectorizer/revec.ll
+2-1llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.cpp
+186-1046 files

LLVM/project 27e262a — llvm/test/Transforms/SLPVectorizer revec.ll, llvm/test/Transforms/SLPVectorizer/X86 interchangeable-cmp-predicates.ll

[SLP][NFC]Add a test for trunc i1 to icmp, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233122
DeltaFile
+254-0llvm/test/Transforms/SLPVectorizer/X86/interchangeable-cmp-predicates.ll
+69-0llvm/test/Transforms/SLPVectorizer/revec.ll
+323-02 files

LLVM/project c4fe77e — llvm/lib/DWARFLinker/Classic DWARFLinker.cpp, llvm/lib/DWARFLinker/Parallel DWARFLinkerCompileUnit.cpp DIEAttributeCloner.cpp

[DWARFLinker] Emit DW_AT_addr_base for units that had none (#219357)

Fix DWARFv5 units that reach the linker without DW_AT_addr_base, as GCC
emits them at -O2. Both linkers rewrite range and location lists into
base_addressx entries, which resolve through DW_AT_addr_base, but they
only ever patch an attribute copied from the input. With nothing to
patch, the classic linker hits the llvm_unreachable in patchAddrBase(),
and the parallel linker writes indices with no base, so the unit's
ranges resolve from address 0.

Add DW_AT_addr_base to every DWARFv5 unit root that lacks one, whatever
its tag, and emit the unit's .debug_addr contribution even when no
address was pooled, so the attribute always points at a table. Update
mode does not rewrite ranges, so nothing is added there.

The tests link a compile unit root and a partial unit root with both
linkers and check the attribute, the address table, the range list and
--verify. The compile unit test also checks that update mode adds no
attribute, and a third test links a unit that pools no address.

    [3 lines not shown]
DeltaFile
+116-0llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-no-addr-base.test
+105-0llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-no-addr-base-partial-unit.test
+74-0llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-no-addr-base-empty.test
+20-0llvm/lib/DWARFLinker/Parallel/DIEAttributeCloner.cpp
+14-2llvm/lib/DWARFLinker/Classic/DWARFLinker.cpp
+2-3llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp
+331-51 files not shown
+334-57 files

LLVM/project e90fde1 — llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp, llvm/test/CodeGen/AArch64 fpclamptosat.ll

[DAGCombiner] Fold umin(fp_to_uint(x), 0) to 0 (#232231)

`PerformUMinFpToSatCombine` turns `umin(fp_to_uint(x), (2^n)-1)` into
`fp_to_uint_sat`.

When the clamp width is 0 (2^0-1), `n` is also 0, and `getIntegerVT(0)`
then asserts in `IntegerType::get`, which requires a width of at least
1.

Since an unsigned value is never below 0, the `umin`'s result will
always be 0 as well.
DeltaFile
+16-1llvm/test/CodeGen/ARM/fpclamptosat.ll
+17-0llvm/test/CodeGen/RISCV/fpclamptosat.ll
+13-0llvm/test/CodeGen/WebAssembly/fpclamptosat.ll
+12-0llvm/test/CodeGen/X86/fpclamptosat.ll
+12-0llvm/test/CodeGen/AArch64/fpclamptosat.ll
+5-0llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+75-16 files

LLVM/project edd70e7 — cross-project-tests/intrinsic-header-tests riscv_packed_simd.c

fixup! update cross-project test
DeltaFile
+6-6cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+6-61 files

LLVM/project 0b50885 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-32.ll

[RISCV][P-ext] Use concat_vectors with 0 in widenPackedVectorWithZeros.

This will be legalized and combined to a vector_shuffle. That
shuffle can then be matched to a pack with x0 after #232892.

This changes the zext.w to a pack, but that's not obviously worse.
If we need to canonicalize we can add a DAG combine later.
DeltaFile
+8-8llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+4-5llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+12-132 files

LLVM/project 557fb42 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-insert-subvector.ll

[RISCV][P-ext] Remove custom lowering of insert_subvector for v2i16/v4i8 on RV64.

This was for handling inserting into a zero vector. After #232892
we let the insert_subvector legalize to a shuffle_vector which we
can then lower as pack.

This changes the codegen from zext.w to pack, but that's not
necessarily worse. If it turns out to be a problem we can
canonicalize pack with zero with a DAGCombine or isel patterns in
the future.
DeltaFile
+3-11llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-2llvm/test/CodeGen/RISCV/rvp-insert-subvector.ll
+5-132 files

LLVM/project 26e8f25 — llvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV][P-ext] Create zero vector rather than bitcasting from i32 0 in lowerINSERT_SUBVECTOR. (#232852)

Teach LowerBUILD_VECTOR to create SPLAT_VECTOR when all operands are the
same to prevent regression.
DeltaFile
+5-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+5-11 files

LLVM/project 05d5e1f — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-32.ll rvp-simd-64.ll

[RISCV][P-ext] Call tryWidenMaskForShuffle at the end of P extension shuffle lowering. (#232892)

If the shuffle mask has contiguous elements we can try shuffling them
using a large element type.
DeltaFile
+24-48llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+0-8llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+4-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+28-573 files

LLVM/project dc057e3 — flang/unittests/Frontend CompilerInstanceTest.cpp FrontendActionTest.cpp, flang/unittests/Semantics OpenMPUtils.cpp

[flang,unittest] Initialize targets before creating a CompilerInstance. NFC (#233117)

Initialize targets first to register library options before creating a
CompilerInstance.
DeltaFile
+9-4flang/unittests/Semantics/OpenMPUtils.cpp
+9-4flang/unittests/Frontend/FrontendActionTest.cpp
+3-3flang/unittests/Frontend/CompilerInstanceTest.cpp
+21-113 files

LLVM/project ce640be — flang/lib/Semantics canonicalize-omp.cpp

[flang][OpenMP] Simplify some code with parser::Unwrap, NFC (#233113)
DeltaFile
+8-30flang/lib/Semantics/canonicalize-omp.cpp
+8-301 files

LLVM/project 50d1557 — llvm/test/CodeGen/X86 pr232598.ll

[X86] Add test case for #232598 (#233109)
DeltaFile
+57-0llvm/test/CodeGen/X86/pr232598.ll
+57-01 files

LLVM/project 545ee64 — libc/src/__support frac64.h big_int.h, libc/src/__support/math CMakeLists.txt exp2f_integer_utils.h

[libc][math] Optimize integer-only expf and factor out shared utilities.

- Optimize `expf_integer_eval` for both code size and performance.
- Factor out the shared range reduction and `2^u` fixed point evaluation to
be used by `exp2f` and `exp10f` integer-only versions.

Assisted-by: Gemini for analysis and refactoring.
DeltaFile
+60-236libc/src/__support/math/expf_integer_eval.h
+182-0libc/src/__support/math/exp2f_integer_utils.h
+48-10libc/src/__support/big_int.h
+36-0libc/test/shared/shared_math_test.cpp
+16-12libc/src/__support/frac64.h
+19-2libc/src/__support/math/CMakeLists.txt
+361-2608 files not shown
+389-26414 files

LLVM/project c5b339f — clang/test/CIR/CodeGen sve-vector-arith-ops.c, clang/test/OpenMP threadprivate_codegen.cpp task_codegen.cpp

Merge branch 'main' into users/tmahatej/amdgpu/dag-combine-sat-combine
DeltaFile
+7,716-7,532llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+2,795-3,867llvm/test/CodeGen/AMDGPU/clmul.ll
+1,897-1,897clang/test/OpenMP/task_codegen.cpp
+1,275-1,275clang/test/OpenMP/threadprivate_codegen.cpp
+2,444-0clang/test/CIR/CodeGen/sve-vector-arith-ops.c
+725-1,475llvm/test/CodeGen/NVPTX/i8x4-instructions.ll
+16,852-16,0462,701 files not shown
+125,545-79,2152,707 files

LLVM/project d09cc8a — flang/lib/Semantics canonicalize-omp.cpp

[flang][OpenMP] Simplify some code with parser::Unwrap, NFC
DeltaFile
+8-30flang/lib/Semantics/canonicalize-omp.cpp
+8-301 files

LLVM/project bd7f97d — llvm/test/CodeGen/X86 vselect-constants.ll

[X86] vselect-constants.ll - regenerate missing add asm comments (#233105)
DeltaFile
+6-6llvm/test/CodeGen/X86/vselect-constants.ll
+6-61 files

LLVM/project 72f3849 — llvm/lib/IR AutoUpgrade.cpp, llvm/test/Assembler auto_upgrade_nvvm_intrinsics.ll

[NVPTX] Attach !atomic.ignore.denormal.mode when upgrading legacy NVVM atomic add intrinsics (#232725)

Legacy NVVM floating-point atomic add intrinsics
(`@llvm.nvvm.atomic.load.add.f32.p*`,
`@llvm.nvvm.atomic.load.add.f64.p*`, and
`@llvm.nvvm.atomic.add.gen.f.*`) specifically targeted the PTX
`atom.add` instruction, which flushes f32 denormals to zero on global
memory.

Attach `!atomic.ignore.denormal.mode` metadata when auto-upgrading these
intrinsics to `atomicrmw fadd` so that they continue to lower to native
`atom.add` instructions when `-nvptx-allow-ftz-atomics` defaults to
`false` (#231429), matching the Clang lowering of
`__nvvm_atom_add_gen_f` (#217587).
DeltaFile
+25-64llvm/test/CodeGen/NVPTX/atomics.ll
+6-6llvm/test/Assembler/auto_upgrade_nvvm_intrinsics.ll
+8-0llvm/lib/IR/AutoUpgrade.cpp
+39-703 files

LLVM/project 9c20e83 — llvm/lib/Target/X86 X86InstrAVX512.td, llvm/test/CodeGen/X86 pr231640.ll

[X86] Add v8f16 X86selects fallback patterns to masked VMOVSH (#231724)

Masked scalar patterns rely on `X86selects_mask`, which rejects fusing
the underlying operation into a masked instruction when that operation
has multiple users (checked via `isProfitableToFormMaskedOp`). In that
case, the bare `X86ISD::SELECTS` node must be selected separately as a
masked register move.

These fallback patterns already exist for `v4f32` (VMOVSS) and `v2f64`
(VMOVSD), but were never added for `v8f16` when AVX-512 FP16 was
introduced. In the reproducer, CSE merges identical conversions into a
single `VFPROUNDS` node with two users; pattern fusion is rejected, no
`v8f16` fallback matches, and ISel fails.

Add the missing `v8f16` fallback patterns lowering to `VMOVSHZrrk` and
`VMOVSHZrrkz`, mirroring the existing float/double logic.

Fixes #231640
Assisted-by: Claude Code for initial root-cause analysis and pattern
investigation.
DeltaFile
+17-0llvm/test/CodeGen/X86/pr231640.ll
+5-0llvm/lib/Target/X86/X86InstrAVX512.td
+22-02 files

LLVM/project 88212b7 — llvm/lib/CodeGen MachineVerifier.cpp, llvm/test/MachineVerifier dead-def-aliasing.mir

MachineVerifier: Reject dead and live defs of the same register

Previously an instruction could have a dead and a live def of the same
physical register, which has no consistent interpretation.

Some passes, namely register pressure tracking, implicitly rely on the
dead flag adjustments performed by running LiveVariables. In cases of
repeated defs, LiveVariables strips dead flags. When a super-register
is only partially used, it marks the super-register def dead and adds
a live implicit-def of the used sub-register.

Prior to #222627, pressure tracking treated live defs as winning. That
PR fixed some asserts by switching to a dead wins system where any
dead flag taints those regunits for the whole instruction. #225079
reverts the remainder of #222627, back closer to the interpretation of
this verifier check.

Only a dead def with a live def of the same register is
rejected. Mixed dead flags on overlapping defs of different registers

    [7 lines not shown]
DeltaFile
+76-0llvm/test/MachineVerifier/dead-def-aliasing.mir
+33-0llvm/lib/CodeGen/MachineVerifier.cpp
+109-02 files

LLVM/project 2bc84c1 —

[mlir][LLVMIR] Precompile NVVM and ROCDL operation declarations (NFC) (#233106)

The eight source shards in each dialect repeatedly parse their operation
headers after loading the shared LLVM PCH. Give each dialect a local PCH
containing LLVMIR/pch.h followed by its operation header. Disable
downstream reuse so other libraries retain their existing PCH selection.

Reduces CPU from 103.12 to 87.48 s (-15.17%) for the affected objects. 

Assisted-by: Codex
DeltaFile
+0-00 files

LLVM/project 7bf04e4 — libcxx/utils/ci run-buildbot

[libc++] Disable automatic module scanning on ARM CI builders

The ARM Buildkite toolchains do not expose clang-scan-deps to CMake.
When CMP0155 enables automatic scanning for libc++abi C++23 sources,
these standalone runtimes builds fail with the scanner set to NOTFOUND.

Pass CMAKE_CXX_SCAN_FOR_MODULES=OFF in the eight ARM job invocations,
including the no-exceptions variants, until their toolchains provide a
matching scanner. Keep the other CI configurations on their defaults.

Validated bash syntax, git diff --check, and argument dispatch for all
eight ARM jobs with generic C++20, C++23, and modules jobs as controls.

Assisted-by: Codex
DeltaFile
+16-6libcxx/utils/ci/run-buildbot
+16-61 files

LLVM/project dc18eb8 — libcxx/utils/ci run-buildbot ensure-cmake.sh

[libc++] Provision a suitable CMake for CI builds

The previous commit raised cmake_minimum_required to 3.31. The GitHub
jobs already satisfy it (the Linux image pins 3.31.0, macOS uses brew,
Windows uses the hosted image), but some self-hosted Buildkite agents
ship an older CMake and their images cannot be updated by us.

Teach run-buildbot to check the CMake version up front. When the cmake
on PATH is new enough, this costs a single `cmake --version` and nothing
else changes. Otherwise, download a pinned, SHA-256 verified CMake
3.31.12 release binary into ${XDG_CACHE_HOME:-~/.cache}/libcxx (outside
the build directory that run-buildbot wipes) and, when no binary exists
for the host or it cannot run there, bootstrap it from source with the
host compilers rather than the runtime's CC/CXX. The install is
published with an atomic rename so concurrent builders on one agent
never see a partial cache entry.

An explicit CMAKE override is still honored but now validated; in the
provisioned or overridden cases its directory is prepended to PATH so

    [5 lines not shown]
DeltaFile
+180-0libcxx/utils/ci/ensure-cmake.sh
+25-11libcxx/utils/ci/run-buildbot
+205-112 files

LLVM/project d8457e5 — libcxxabi CMakeLists.txt

[libc++abi] Retain the old CMP0155 behavior for GCC compatibility

Raising the minimum CMake version to 3.31 enables automatic module dependency
scanning for the C++23 libc++abi object libraries. GCC 16 and 17 then probe
the libstdc++ bits/stdc++.h header when processing libc++ headers and fail
if it is absent.

Set CMP0155 to OLD within libc++abi only when using GCC until its optional
header lookup is fixed. Preserve automatic scanning with Clang and guard
the policy setting for older CMake versions.

GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127940

Validated the policy workaround on the CMake 3.31 minimum-version branch
with GCC 16.2.0 and CMake 3.31.12: the focused cxa_handlers.cpp reproducer
compiles. Clang 22.1.0 still generates and successfully executes the
clang-scan-deps rule for that source. git diff --check passes.

Assisted-by: Codex
DeltaFile
+8-0libcxxabi/CMakeLists.txt
+8-01 files

LLVM/project c7409dc — lldb CMakeLists.txt, llvm-libgcc CMakeLists.txt

[CMake] Bump the minimum required version to 3.31

This is a follow up to e192ec42b426f6ffbc25419238a90f3c59088587 which
changes the warning to an error when using CMake older than 3.31.

See
https://discourse.llvm.org/t/91086

Assisted-by: Codex
DeltaFile
+1-9polly/CMakeLists.txt
+1-9openmp/CMakeLists.txt
+1-9offload/CMakeLists.txt
+1-9mlir/CMakeLists.txt
+1-9llvm-libgcc/CMakeLists.txt
+1-9lldb/CMakeLists.txt
+6-5414 files not shown
+20-17420 files

LLVM/project f782788 — llvm/lib/Target/NVPTX NVPTXISelLowering.cpp, llvm/test/CodeGen/NVPTX atomicrmw.py atomicrmw-sm90.ll

[NVPTX] Set default value of nvptx-allow-ftz-atomics to false

This restores the strict FTZ default originally introduced in #200732
and temporarily relaxed in #206154.

Frontends can now explicitly opt in to native FTZ-mismatched atomics on a
per-instruction basis using !atomic.ignore.denormal.mode metadata (#217585,
#217586), which is supported in Clang, MLIR, and XLA. Users who need the
previous behavior globally can still pass -nvptx-allow-ftz-atomics=true.

Update test cases to verify the new default disallow behavior.
DeltaFile
+36-37llvm/test/CodeGen/NVPTX/atomicrmw-ignore-denormal-mode.ll
+6-5llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+4-4llvm/test/CodeGen/NVPTX/atomicrmw-allow-ftz-atomics.ll
+2-2llvm/test/CodeGen/NVPTX/atomicrmw.py
+2-2llvm/test/CodeGen/NVPTX/atomicrmw-sm90.ll
+2-2llvm/test/CodeGen/NVPTX/atomicrmw-sm70.ll
+52-524 files not shown
+60-6010 files

LLVM/project 69eddc6 — flang/lib/Optimizer/Builder CUDAIntrinsicCall.cpp, flang/test/Lower/CUDA cuda-device-proc.cuf cuda-atomicadd.cuf

[flang][CUDA] Emit ignore_denormal_mode for CUDA Fortran atomicadd
DeltaFile
+27-3flang/test/Lower/CUDA/cuda-atomicadd.cuf
+5-2flang/lib/Optimizer/Builder/CUDAIntrinsicCall.cpp
+3-3flang/test/Lower/CUDA/cuda-device-proc.cuf
+35-83 files