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

LLVM/project 0c314a6 — 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
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 d7c76a1 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.h AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 aarch64-histcnt-dag-combine-hang.ll zext-to-tbl.ll

[AArch64][LSR] Prefer pointer IVs for extending loads that need splitting (#231125)
DeltaFile
+44-1llvm/test/Transforms/LoopStrengthReduce/AArch64/vscale-fixups.ll
+20-22llvm/test/CodeGen/AArch64/zext-to-tbl.ll
+13-16llvm/test/CodeGen/AArch64/aarch64-histcnt-dag-combine-hang.ll
+8-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-0llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+87-395 files

LLVM/project cda2998 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer revec.ll

[SLP]Do not seed on vectorizer-created compares

With revec, alternate compares are emitted as pairs of compares on
the same operands, which were re-seeded and hanged the compiler.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233101
DeltaFile
+34-4llvm/test/Transforms/SLPVectorizer/revec.ll
+14-7llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+48-112 files

LLVM/project 3b96ffa — llvm/lib/Target/Mips MipsSEISelLowering.cpp, llvm/test/CodeGen/Mips rint-r6-strict-order.ll rint-r6-features.ll

[Mips] Select RINT instructions for scalar rint on R6 (#233042)

Legalize FRINT and STRICT_FRINT for supported scalar floating-point
types on standard-encoding MIPS R6 targets, and match both operations to
the existing RINT_S and RINT_D instructions instead of libcalls.
Preserve strict FP exception semantics using the existing instruction
properties.
DeltaFile
+315-0llvm/test/CodeGen/Mips/rint-r6.ll
+135-87llvm/test/CodeGen/Mips/msa/f16-llvm-ir.ll
+59-0llvm/test/CodeGen/Mips/rint-r6-isel.ll
+50-0llvm/test/CodeGen/Mips/rint-r6-features.ll
+36-0llvm/test/CodeGen/Mips/rint-r6-strict-order.ll
+10-0llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+605-872 files not shown
+615-918 files

LLVM/project 018b722 — llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Don't create a zero SCEV in isKnownPredicateViaNoOverflow (NFC) (#232965)

Avoid creating SCEVs for zero in isKnownPredicateViaNoOverflow, by using
nullptr as placeholder for zero.

This avoids unnecessary APInt & SCEV object construction, and improves
compile-time a bit:

stage1-O3: -0.06%
stage1-ReleaseThinLTO: -0.04%
stage1-ReleaseLTO-g: -0.06%
stage1-aarch64-O3: -0.05%
stage2-O3: -0.04%
stage2-clang: -0.02%


https://llvm-compile-time-tracker.com/compare.php?from=ce0e0f047deca346096925a02eefe87e938ed586&to=1db91f2e52eeacf0430f80b334e50299412e8323&stat=instructions:u

Aided by Opus 5.5

PR: https://github.com/llvm/llvm-project/pull/232965
DeltaFile
+9-6llvm/lib/Analysis/ScalarEvolution.cpp
+9-61 files

LLVM/project 5b782e9 — openmp/device/src Reduction.cpp

[OpenMP][offload] Fix wave32 handling of xteam reductions
DeltaFile
+5-2openmp/device/src/Reduction.cpp
+5-21 files

LLVM/project 1614ccf — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-fshr-256.ll

[X86] splitVectorOp - add BUILD_VECTOR handling (#233077)

In case a call to splitVectorOp has already constant folded into a BUILD_VECTOR

Fixes #233063
DeltaFile
+21-11llvm/test/CodeGen/X86/vector-fshr-256.ll
+4-0llvm/lib/Target/X86/X86ISelLowering.cpp
+25-112 files

LLVM/project a138ea0 — offload/include PluginManager.h, offload/libompaccsupport device.cpp PluginManager.cpp

[offload] Copy the kernel launch environment with a direct-write memcpy

Claude assisted with this patch.
DeltaFile
+76-0offload/test/offloading/kernel_launch_environment.c
+13-0offload/libompaccsupport/PluginManager.cpp
+9-3offload/libompaccsupport/device.cpp
+6-0offload/include/PluginManager.h
+104-34 files

LLVM/project 6c6be3d — offload/plugins-nextgen/amdgpu/src rtl.cpp

implement feedback
DeltaFile
+76-68offload/plugins-nextgen/amdgpu/src/rtl.cpp
+76-681 files

LLVM/project 678770c — offload/liboffload/API Memory.td, offload/liboffload/src OffloadImpl.cpp

wording; bitfield
DeltaFile
+2-2offload/liboffload/src/OffloadImpl.cpp
+2-1offload/plugins-nextgen/common/include/PluginInterface.h
+1-1offload/liboffload/API/Memory.td
+5-43 files

LLVM/project 1b19f4c — offload/liboffload/src OffloadImpl.cpp, offload/plugins-nextgen/amdgpu/src rtl.cpp

[offload] Pass host-to-device transfer flags to plugins as a struct
DeltaFile
+12-6offload/plugins-nextgen/common/include/PluginInterface.h
+7-8offload/liboffload/src/OffloadImpl.cpp
+2-3offload/plugins-nextgen/common/src/PluginInterface.cpp
+2-2offload/plugins-nextgen/amdgpu/src/rtl.cpp
+1-1offload/plugins-nextgen/level_zero/src/L0Device.cpp
+1-1offload/plugins-nextgen/level_zero/include/L0Device.h
+25-212 files not shown
+27-238 files

LLVM/project 9387add — offload/liboffload/API Memory.td, offload/liboffload/src OffloadImpl.cpp

[offload] Add direct-write memcpys to liboffload and implement them on AMDGPU

olMemcpy gets a variant with a flag parameter. The flags are an enum and
DIRECT_WRITE is the first member of it. Specifying DIRECT_WRITE means
that the olMemcpy may issue the copy as a direct H2D write, which means
that it will be unordered with respect to the currently enqueued
operations. It will, however, be completed upon completion of olMemcpy,
so it will not be unordered with respect to operations that get enqueued
afterwards.

The AMDGPU implementation queries is a transfer of the ROCr/HIP
implementation. It more or less boils down to a std::memcpy with fences
around it.

Claude assisted with this patch.
DeltaFile
+135-2offload/plugins-nextgen/amdgpu/src/rtl.cpp
+104-0offload/unittests/OffloadAPI/memory/olMemcpyWithFlags.cpp
+36-0offload/liboffload/API/Memory.td
+24-5offload/liboffload/src/OffloadImpl.cpp
+22-0offload/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h
+7-3offload/plugins-nextgen/common/include/PluginInterface.h
+328-106 files not shown
+341-1612 files

LLVM/project c1ebc25 — clang/lib/CodeGen CGException.cpp, clang/test/DebugInfo/CXX try-catch.cpp

[clang][DebugInfo] Attribute beginning of catch to opening brace (#177032)

It was previously attributed to the end of the last catch or the end of
the try block. Attributing it to the beginning of the right catch block
is especially interesting when e.g. using `catch catch` in GDB.

Fixes #164414.
DeltaFile
+42-0clang/test/DebugInfo/CXX/try-catch.cpp
+3-0clang/lib/CodeGen/CGException.cpp
+45-02 files

LLVM/project e02686b — cross-project-tests/dtlto remote-options.test, lld/COFF LTO.cpp

[LTO,lld] Initialize lto::Config::PTO with LibraryOptions (#233069)

Commit 27e2fc2de79d (#233026) switched `llvm-lto2` and `lld` from
`cl::ParseCommandLineOptions` to
`cl::parseCommandLineOptions(LibraryOptions, ...)`
and set `lto::Config::LibraryOptions`, but left `lto::Config::PTO`
default-constructed with a null `LibraryOptionsContext`. As a result,
`PipelineTuningOptions` read `PassesOptions::Global` instead of the
parsed
`LibraryOptions`, causing flags like `-enable-loopinterchange=false` to
be
ignored (`cross-project-tests :: dtlto/remote-options.test`).

Initialize `PTO` with `PipelineTuningOptions(LibraryOptions)` in
`llvm-lto2`
and `lld` (`COFF`, `ELF`, `MachO`, `wasm`), matching `clang`s
`BackendUtil.cpp`.

Note: This root-cause analysis and patch were generated by an AI coding
assistant (LLM-aided).
DeltaFile
+2-0cross-project-tests/dtlto/remote-options.test
+1-0llvm/tools/llvm-lto2/llvm-lto2.cpp
+1-0lld/wasm/LTO.cpp
+1-0lld/MachO/LTO.cpp
+1-0lld/ELF/LTO.cpp
+1-0lld/COFF/LTO.cpp
+7-06 files

LLVM/project ce28553 — clang/test/CodeGen ms-intrinsics-other.c ms-intrinsics.c

Fix clang lit test
DeltaFile
+12-12clang/test/CodeGen/ms-intrinsics.c
+4-4clang/test/CodeGen/ms-intrinsics-other.c
+16-162 files

LLVM/project 7bcfa2a — llvm/lib/Transforms/InstCombine InstCombineAtomicRMW.cpp, llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

[InstCombine] Canonicalize atomicrmw sub of a constant to add

Rewrite `atomicrmw sub ptr, C` as `atomicrmw add ptr, -C`. This
matches the canonical form InstCombine already uses for plain `sub`.
In wrapping arithmetic $old - C = old + (-C)$, so both the stored
value and the returned old value stay the same, including when C is
`INT_MIN`. Ordering, syncscope and metadata are kept.

```llvm
; before
%old = atomicrmw sub ptr %p, i32 1 syncscope("agent") monotonic
; after
%old = atomicrmw add ptr %p, i32 -1 syncscope("agent") monotonic
```
This benefits AMDGPU, for example: https://godbolt.org/z/39xsYro3o
DeltaFile
+7-0llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
+2-2llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+9-22 files

LLVM/project 844b1f4 — llvm/lib/Transforms/InstCombine InstCombineAtomicRMW.cpp, llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

Support vector
DeltaFile
+4-3llvm/lib/Transforms/InstCombine/InstCombineAtomicRMW.cpp
+3-3llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+7-62 files

LLVM/project df32ff8 — llvm/test/Transforms/InstCombine atomicrmw-add-neg.ll

[InstCombine] Add tests for atomicrmw sub of a constant. NFC (#232625)

atomicrmw sub C can be canonicalized to atomicrmw add -C because both
produce the same stored and returned values under wrapping arithmetic.
Cover syncscope, INT_MIN, and negative cases.
DeltaFile
+74-0llvm/test/Transforms/InstCombine/atomicrmw-add-neg.ll
+74-01 files

LLVM/project 2b6e0cb — cross-project-tests/dtlto remote-options.test, lld/COFF LTO.cpp

[LTO,lld] Initialize lto::Config::PTO with LibraryOptions

Commit 27e2fc2de79d (#233026) switched `llvm-lto2` and `lld` from
`cl::ParseCommandLineOptions` to `cl::parseCommandLineOptions(LibraryOptions, ...)`
and set `lto::Config::LibraryOptions`, but left `lto::Config::PTO`
default-constructed with a null `LibraryOptionsContext`. As a result,
`PipelineTuningOptions` read `PassesOptions::Global` instead of the parsed
`LibraryOptions`, causing flags like `-enable-loopinterchange=false` to be
ignored (`cross-project-tests :: dtlto/remote-options.test`).

Initialize `PTO` with `PipelineTuningOptions(LibraryOptions)` in `llvm-lto2`
and `lld` (`COFF`, `ELF`, `MachO`, `wasm`), matching `clang`s
`BackendUtil.cpp`.

Note: This root-cause analysis and patch were generated by an AI coding
assistant (LLM-aided).
DeltaFile
+2-0cross-project-tests/dtlto/remote-options.test
+1-0llvm/tools/llvm-lto2/llvm-lto2.cpp
+1-0lld/wasm/LTO.cpp
+1-0lld/MachO/LTO.cpp
+1-0lld/ELF/LTO.cpp
+1-0lld/COFF/LTO.cpp
+7-06 files

LLVM/project 2d04110 — clang/test/OpenMP single_codegen.cpp threadprivate_codegen.cpp

[clang][OpenMP] Regenerate stale checks in two codegen tests (NFC) (#232041)

The generated checks in these two tests no longer match what
`update_cc_test_checks.py` produces, mostly attribute and metadata
numbers. They still pass because those positions match any number.
Regenerating them separately keeps the real changes in #220316
reviewable.

No functional change. Regenerated with `update_cc_test_checks.py`, and
the tests pass before and after.

The contents of this PR is created with help from Claude Code.
DeltaFile
+1,275-1,275clang/test/OpenMP/threadprivate_codegen.cpp
+626-626clang/test/OpenMP/single_codegen.cpp
+1,901-1,9012 files

LLVM/project 5f47fee — libc/src/__support/math log1p.h

[NFC][libc] Clean up unsequenced access warning (#232043)

Close #217998.

---------

Co-authored-by: root <root at Best-Komp.localdomain>
DeltaFile
+8-4libc/src/__support/math/log1p.h
+8-41 files

LLVM/project 0e87f59 — llvm/include/llvm/CodeGen AsmPrinter.h, llvm/include/llvm/MC MCAsmInfo.h

MC: Remove MCAsmInfo::ExceptionsType

The exception model now comes from the module, and the MCAsmInfo
predicates that depend on it take the model as a parameter. The
target's default model is still available from
Triple::getDefaultExceptionHandling.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+0-17llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
+0-11llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
+0-6llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp
+0-4llvm/lib/CodeGen/CodeGenTargetMachineImpl.cpp
+0-4llvm/include/llvm/MC/MCAsmInfo.h
+2-2llvm/include/llvm/CodeGen/AsmPrinter.h
+2-4418 files not shown
+2-7424 files

LLVM/project cf9313c — llvm/lib/Target/WebAssembly WebAssemblyTargetMachine.cpp WebAssemblyLowerEmscriptenEHSjLj.cpp, llvm/test/CodeGen/WebAssembly eh-option-errors.ll

WebAssembly: Use reportFatalUsageError for eh option errors

Avoid using the deprecated report_fatal_error, and add missing
error test coverage.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+21-4llvm/test/CodeGen/WebAssembly/eh-option-errors.ll
+2-2llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+1-1llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+24-73 files