LLVM/project a9a144e — llvm/test/CodeGen/AArch64 bf16-imm.ll

[AArch64] Remove unused CHECK lines. NFC (#230058)
DeltaFile
+0-12llvm/test/CodeGen/AArch64/bf16-imm.ll
+0-121 files

LLVM/project 9aecc2e — lldb/source/Core CMakeLists.txt ModuleList.cpp, lldb/source/Plugins/TypeSystem/Clang CMakeLists.txt TypeSystemClang.cpp

[lldb] Set the default clang module cache path in TypeSystemClang
DeltaFile
+7-0lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+0-6lldb/source/Core/ModuleList.cpp
+0-3lldb/source/Core/CMakeLists.txt
+1-0lldb/source/Plugins/TypeSystem/Clang/CMakeLists.txt
+8-94 files

LLVM/project 1301afd — llvm/test/CodeGen/AArch64 sve-streaming-mode-fixed-length-concat.ll vector-ldst-offset.ll

[LLVM][CodeGen][SVE] Improve lowering for v1f32/f64 when NEON is not available. (#229724)

When NEON is not available it is better to scalarise single element
floating-point vectors than widening them to use Streaming-SVE.

Explicitly make v1f64 scalar_to_vector operations always legal, because
we can use scalar instructions and add a combine to avoid "nop" casts.
DeltaFile
+21-30llvm/test/CodeGen/AArch64/vector-ldst-align-float.ll
+0-24llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-rounding.ll
+0-18llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-minmax.ll
+4-10llvm/test/CodeGen/AArch64/vector-ldst-offset.ll
+4-10llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-fp-to-int.ll
+5-8llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-concat.ll
+34-10012 files not shown
+55-13518 files

LLVM/project 37c1424 — clang/include/clang/CodeGenUtils CodeGenUtils.h, clang/lib/CodeGenUtils TargetUtils.cpp ModuleUtils.cpp

[CIR][CodeGen][NFC] Retire the CodeGenUtils.h catch-all header

Moves the last helpers out of `CodeGenUtils.h` into `ClassUtils.h`,
`ModuleUtils.h`, `TargetUtils.h` and `FunctionUtils.h` (`checkTargetFeatures`,
since it came from CodeGenFunction.cpp) and deletes the header. Only moves code
already on main, so it can be dropped on its own.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+0-269clang/lib/CodeGenUtils/CodeGenUtils.cpp
+120-0clang/lib/CodeGenUtils/FunctionUtils.cpp
+0-78clang/include/clang/CodeGenUtils/CodeGenUtils.h
+78-0clang/lib/CodeGenUtils/ClassUtils.cpp
+37-0clang/lib/CodeGenUtils/ModuleUtils.cpp
+27-0clang/lib/CodeGenUtils/TargetUtils.cpp
+262-34718 files not shown
+345-36324 files

LLVM/project 55a33c3 — clang/include/clang/CodeGenUtils TargetUtils.h, clang/lib/CIR/CodeGen TargetInfo.h TargetInfo.cpp

[CIR][CodeGen][NFC] Share requiresAMDGPUProtectedVisibility

Deduplicates `requiresAMDGPUProtectedVisibility` between CIR and classic CodeGen
into `TargetUtils.h`. The shared version takes a bool for "currently hidden" in
place of the `llvm::GlobalValue` and `cir::VisibilityKind` the two callers
passed.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+3-15clang/lib/CodeGen/Targets/AMDGPU.cpp
+18-0clang/lib/CodeGenUtils/TargetUtils.cpp
+0-14clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp
+10-0clang/include/clang/CodeGenUtils/TargetUtils.h
+6-2clang/lib/CIR/CodeGen/TargetInfo.cpp
+0-4clang/lib/CIR/CodeGen/TargetInfo.h
+37-356 files

LLVM/project 6c272ba — clang/include/clang/CodeGenUtils EHPersonality.h, clang/lib/CIR/CodeGen CIRGenException.cpp

[CIR][CodeGen] Share the EH personality selection logic

Deduplicates the EH personality selection (`getEHPersonality`,
`getCXXEHPersonality`) between CIR and classic CodeGen, taking the classic
implementation. CIR's copy lacked the z/OS, Wasm and GNUstep-on-CygMing cases;
none are reachable in CIR today, so no test changes.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+4-127clang/lib/CodeGen/CGException.cpp
+131-0clang/lib/CodeGenUtils/EHPersonality.cpp
+2-116clang/lib/CIR/CodeGen/CIRGenException.cpp
+19-0clang/include/clang/CodeGenUtils/EHPersonality.h
+156-2434 files

LLVM/project 69e4387 — clang/include/clang/CodeGenUtils ItaniumCXXABIUtils.h, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp

[CIR][CodeGen] Share isStandardLibraryRTTIDescriptor

Deduplicates `isStandardLibraryRTTIDescriptor` between CIR and classic CodeGen
into `ItaniumCXXABIUtils.h`, taking the classic implementation. The two copies
have been equivalent since #227781 filled in the builtin types CIR was missing.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+3-155clang/lib/CodeGen/ItaniumCXXABI.cpp
+1-154clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+148-0clang/lib/CodeGenUtils/ItaniumCXXABIUtils.cpp
+4-0clang/include/clang/CodeGenUtils/ItaniumCXXABIUtils.h
+156-3094 files

LLVM/project 423d5de — clang/include/clang/CodeGenUtils TargetUtils.h, clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp

[CIR][CodeGen][NFC] Share hasExtraNeonArgument (#227260)

Deduplicates `hasExtraNeonArgument` between CIR and classic CodeGen into
`TargetUtils.h`.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+2-38clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+3-34clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+25-0clang/lib/CodeGenUtils/TargetUtils.cpp
+6-0clang/include/clang/CodeGenUtils/TargetUtils.h
+36-724 files

LLVM/project 76610f4 — llvm/lib/Transforms/Utils LowerInvoke.cpp

Transforms: Use changeToCall in LowerInvoke

The pass predates changeToCall, which does the same rewrite and is what other
contexts already use. The only difference is the new branch takes the invoke's
DebugLoc.
DeltaFile
+1-14llvm/lib/Transforms/Utils/LowerInvoke.cpp
+1-141 files

LLVM/project ff423b9 — llvm/lib/Transforms/Vectorize/SLPVectorizer SLPCostAnalysis.cpp SLPUtils.cpp, llvm/test/Transforms/SLPVectorizer/X86 once-used-gep-index-seeds.ll gather-gep-addressing-cost.ll

[SLP]Fix masked gather GEPs cost, skip GEP index seeds (#228918)

Pass the loaded type and the real base sharing to the chain cost of the
masked gather GEPs. Do not use the single-use GEP index chains as seeds:
they were vectorized with all lanes extracted for the scalar addresses.

Part of #227393.

Assisted-by: Cursor
DeltaFile
+37-8llvm/test/Transforms/SLPVectorizer/X86/gather-gep-addressing-cost.ll
+22-12llvm/test/Transforms/SLPVectorizer/X86/once-used-gep-index-seeds.ll
+4-15llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPUtils.cpp
+13-1llvm/lib/Transforms/Vectorize/SLPVectorizer/SLPCostAnalysis.cpp
+76-364 files

LLVM/project 0ad1fe5 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/X86 alias_mask.ll

[DAG] Explicitly truncate splat operand in get_active_lane_mask expansion

x86 can't handle the implicit truncation of build_vector operands so the whilewr_8 test case crashes after expanding get_active_lane_mask (stemming from llvm.loop.dependence.war.mask). Fix it by explicitly truncating it.
DeltaFile
+26-0llvm/test/CodeGen/X86/alias_mask.ll
+1-0llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+27-02 files

LLVM/project 43f9b1a — lldb/source/Plugins/Process/Windows/Common NativeProcessWindows.cpp, lldb/test/API/tools/lldb-server TestGdbRemoteInterrupt.py

[lldb][Windows] Report the DebugBreakProcess halt as SIGSTOP (#229770)

`NativeProcessWindows` reports signal 19 `SIGSTOP` on Linux but
`SIGCONT` for Windows targets, so each interrupt lldb sent to issue a
packet prints:

```
      Process 26748 stopped and restarted: thread 2 received signal: SIGCONT
```

This makes typing stdin to a debuggee tedious when debugging.

This patch uses
`UnixSignals::CreateForHost()->GetSignalNumberFromName("SIGSTOP")` to
use the proper signal and adds a regression test.
DeltaFile
+39-0lldb/test/API/tools/lldb-server/TestGdbRemoteInterrupt.py
+3-1lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+42-12 files

LLVM/project 715e7f5 — lldb/source/Plugins/Process/Windows/Common ProcessDebugger.h NativeProcessWindows.cpp

[lldb][Windows] End the debug session before destroying an lldb-server process (#229433)

When the debuggee exits, lldb-server sends the exit to the client and
then destroys its process object, while the thread that reported the
exit is still running code that uses that object. lldb-server then
sometimes crashes on its way out.

The destructor now ends the debug session first: it stops the debugger
thread and waits until that thread is done with the object.
A process that exits before its first stop never started, so its exit is
no longer reported to the server, which never had that process. Launch
failures are already reported as an error, and the extra exit would
otherwise arrive as the reply to the launch request (This occurs in the
TestMissingDll.py test).

In a stress run on Windows, 194 of 320 debug sessions crashed before
this change and none after it.
DeltaFile
+12-0lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+7-3lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
+4-0lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.h
+23-33 files

LLVM/project e2a6fc5 — clang/test/CodeGenObjC exceptions.m synchronized.m, llvm/include/llvm/Analysis AliasAnalysis.h

[BasicAA] Fix miscompilation with setjmp/longjmp due to missing longjmp re-entry paths in alias analysis (#212297)

Fixes [#198967](https://github.com/llvm/llvm-project/issues/198967).

`EarliestEscapeAnalysis::getCapturesBefore` (used by GVN, DSE,
MemCpyOpt) determines whether an object is captured before a given
instruction using `isPotentiallyReachable()/isNotInCycle()`, both of
which only see the forward CFG. In a function containing a
`returns_twice` call (e.g. `setjmp`), a `longjmp` can re-enter at that
call site — a back-edge invisible to both checks.
This causes `BasicAA` to incorrectly return `NoAlias` for a local alloca
whose address was captured on a branch that only runs before the
`longjmp` re-entry. Downstream passes (GVN, DSE) then miscompile the
function by eliminating stores that are still live on the re-entry path.

Fix: `EarliestEscapeAnalysis` now caches whether its function contains a
call that may return twice (`callsReturnsTwiceFn()`, backed by the
existing `Function::callsFunctionThatReturnsTwice()` scan, memoized per
instance). If so, `getCapturesBefore` conservatively treats the object

    [23 lines not shown]
DeltaFile
+133-0llvm/test/Analysis/BasicAA/setjmp-longjmp.ll
+11-6clang/test/CodeGenObjC/synchronized.m
+10-4clang/test/CodeGenObjC/exceptions.m
+11-0llvm/lib/Analysis/BasicAliasAnalysis.cpp
+7-0llvm/include/llvm/Analysis/AliasAnalysis.h
+172-105 files

LLVM/project d2bf1d6 — llvm/lib/Target/SPIRV/MCTargetDesc SPIRVMCTargetDesc.cpp, llvm/test/CodeGen/SPIRV null-target-streamer.ll

SPIRV: Register null target streamer

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+5-0llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVMCTargetDesc.cpp
+5-0llvm/test/CodeGen/SPIRV/null-target-streamer.ll
+10-02 files

LLVM/project 86a93ee — llvm/lib/Target/MSP430/MCTargetDesc MSP430MCTargetDesc.cpp, llvm/test/CodeGen/MSP430 null-target-streamer.ll

MSP430: Register null target streamer

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+6-0llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp
+5-0llvm/test/CodeGen/MSP430/null-target-streamer.ll
+11-02 files

LLVM/project 5e868e5 — llvm/lib/Target/AVR/MCTargetDesc AVRMCTargetDesc.cpp, llvm/test/CodeGen/AVR null-target-streamer.ll

AVR: Register null target streamer

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+7-0llvm/lib/Target/AVR/MCTargetDesc/AVRMCTargetDesc.cpp
+5-0llvm/test/CodeGen/AVR/null-target-streamer.ll
+12-02 files

LLVM/project 0d54e3f — llvm/lib/Target/AMDGPU/MCTargetDesc AMDGPUMCTargetDesc.cpp, llvm/test/CodeGen/AMDGPU r600-null-target-streamer.ll

AMDGPU: Register null target streamer for R600

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+5-0llvm/test/CodeGen/AMDGPU/r600-null-target-streamer.ll
+2-0llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp
+7-02 files

LLVM/project 93c9c6b — llvm/test/CodeGen/NVPTX spdecompress-sp1to8.ll spdecompress-sp2to8.ll

[NVVM][NVPTX] Support spcompress and spdecompress intrinsics (#221751)

This change supports `spcompress` and `spdecompress` intrinsics and
their lowering to the NVPTX backend.
DeltaFile
+860-0llvm/test/CodeGen/NVPTX/spcompress-sp2to4.ll
+758-0llvm/test/CodeGen/NVPTX/spdecompress-sp2to4.ll
+682-0llvm/test/CodeGen/NVPTX/spdecompress-sp1to4.ll
+552-0llvm/test/CodeGen/NVPTX/spdecompress-sp1to2.ll
+379-0llvm/test/CodeGen/NVPTX/spdecompress-sp2to8.ll
+350-0llvm/test/CodeGen/NVPTX/spdecompress-sp1to8.ll
+3,581-016 files not shown
+5,559-022 files

LLVM/project 2ff0265 — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/lib/SandboxIR Constant.cpp

[SandboxVec][LoadStoreVec] Support constant vectors of mixed types
DeltaFile
+469-4llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec_mixed_types.ll
+128-29llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+24-24llvm/unittests/Transforms/Vectorize/SandboxVectorizer/VecUtilsTest.cpp
+6-28llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+22-0llvm/lib/Transforms/Vectorize/SandboxVectorizer/VecUtils.cpp
+18-0llvm/lib/SandboxIR/Constant.cpp
+667-855 files not shown
+691-8611 files

LLVM/project c85b25d — llvm/lib/Analysis ConstantFolding.cpp, llvm/test/Transforms/InstCombine/AArch64 crc32-const-fold.ll

[AArch64] Implement CRC32 const folding (#228985)

This implements constant folding for `__crc32` intrinsics when both the
arguments are compile time known constants.

This is a follow up of https://github.com/llvm/llvm-project/pull/219452
which does the same for X86.
DeltaFile
+371-0llvm/test/Transforms/InstCombine/AArch64/crc32-const-fold.ll
+36-0llvm/lib/Analysis/ConstantFolding.cpp
+407-02 files

LLVM/project 5f890fc — llvm/lib/Passes PassBuilderPipelines.cpp

[PassManager] Factor out some common code to a utility function (NFC) (#229432)

There are two places containing common code where module inlining is
added to the ModulePassManager, with a third one coming up.

This commit factors out the common code into a utility function to
reduce duplication.
DeltaFile
+19-25llvm/lib/Passes/PassBuilderPipelines.cpp
+19-251 files

LLVM/project 9cce4da — llvm/test/Transforms/InstCombine lshr-trunc-sext-to-ashr-sext.ll, llvm/test/Transforms/InstCombine/AArch64 lshr-trunc-sext-to-ashr-sext.ll

[InstCombine] Remove target specific sext(trunc(...)) combine tests. NFC

Follow up to https://github.com/llvm/llvm-project/pull/227321#issuecomment-6055905388

t0 already exists in the generic test file, t1 was moved over as "ashr_signbits". A new RUN line has been added for a datalayout with a native i32 type to exercise the change in #227321
DeltaFile
+30-7llvm/test/Transforms/InstCombine/lshr-trunc-sext-to-ashr-sext.ll
+0-31llvm/test/Transforms/InstCombine/X86/lshr-trunc-sext-to-ashr-sext.ll
+0-31llvm/test/Transforms/InstCombine/RISCV/lshr-trunc-sext-to-ashr-sext.ll
+0-31llvm/test/Transforms/InstCombine/AArch64/lshr-trunc-sext-to-ashr-sext.ll
+30-1004 files

LLVM/project 44b0a66 — llvm/lib/CodeGen PHIElimination.cpp

PHIElimination: Remove LiveVariables/LiveIntervals abstraction helpers

Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+15-26llvm/lib/CodeGen/PHIElimination.cpp
+15-261 files

LLVM/project ab1a09f — llvm/test/CodeGen/AArch64 div-i256.ll phi.ll, llvm/test/CodeGen/RISCV abdu.ll idiv_large.ll

CodeGen: Run LiveIntervals before PHIElimination and drop LiveVariables from it

Move LiveIntervals to run before PHIElimination in the optimized register
allocation pipeline, and make PHIElimination maintain LiveIntervals only.

This removes the last explicit use of LiveVariables. The actual analysis is no
longer used. There are implicit dependencies on the side effects of running the
analysis due to adjustments of dead flags, so further work is still needed to
complete the removal.

This perturbs register allocation in a number of tests. The same codegen result
can be achieved by not preserving the analysis and recomputing fresh. Greedy is
just sensitive to the exact slot index and value numbering with identical MIR.

Measured across every affected test the emitted instruction count goes from
145124 to 145196, +0.050%, with changes in both directions. The largest
regression is AArch64/phi.ll, where the GlobalISel output gains about 30
instructions and no longer matches the SelectionDAG output; the largest
improvements are ARM/fpclamptosat.ll and PowerPC/common-chain.ll.

    [2 lines not shown]
DeltaFile
+1,648-1,642llvm/test/CodeGen/RISCV/GlobalISel/wide-scalar-shift-by-byte-multiple-legalization.ll
+1,026-1,017llvm/test/CodeGen/X86/i128-udiv.ll
+396-396llvm/test/CodeGen/RISCV/idiv_large.ll
+452-210llvm/test/CodeGen/AArch64/phi.ll
+290-290llvm/test/CodeGen/RISCV/abdu.ll
+242-242llvm/test/CodeGen/AArch64/div-i256.ll
+4,054-3,797126 files not shown
+8,122-8,041132 files

LLVM/project bb16397 — llvm/include/llvm/MC TargetRegistry.h

MC: Error if target did not register null streamer

Without this the AsmPrinter would see a null pointer
for the target streamer. More than likely this is just
going to crash. Only 5 of the in tree targets properly
registered a null streamer before I started looking into this.
The rest had randomly, inconsistent null checks for the streamer.

There are still a few targets not registering this, which should
update (some of which seem to not make use of the TargetStreamer).
There's no reason to leave this as a silently hazardous edge case.
DeltaFile
+1-1llvm/include/llvm/MC/TargetRegistry.h
+1-11 files

LLVM/project dcb4cd7 — llvm/test/Transforms/LoopVectorize predicated-load-access-safety.ll

[LV] Add baseline tests for predicated load access safety (#229468)

Baseline tests for #229379.
DeltaFile
+228-0llvm/test/Transforms/LoopVectorize/predicated-load-access-safety.ll
+228-01 files

LLVM/project a891455 — llvm/test/CodeGen/AArch64 extract-lowbits.ll, llvm/test/CodeGen/RISCV andn-zext-lowmask.ll

[DAGCombiner] Add tests for zero-extended low-bits masks (NFC) (#229981)

A low-bits mask built in a narrow type and zero-extended into a wider
and, (and X, (zext (not (shl -1, Y)))), with and without other uses of
the mask, on AArch64, X86 and RISC-V (with and without Zbb).

Assisted-by: Claude Code
DeltaFile
+567-0llvm/test/CodeGen/X86/extract-lowbits.ll
+234-0llvm/test/CodeGen/RISCV/andn-zext-lowmask.ll
+212-0llvm/test/CodeGen/X86/andnot-patterns.ll
+156-0llvm/test/CodeGen/AArch64/extract-lowbits.ll
+1,169-04 files

LLVM/project eb2fade — clang-tools-extra/clangd/benchmarks CMakeLists.txt, clang-tools-extra/clangd/benchmarks/CompletionModel CMakeLists.txt

[cmake] Properly link against LLVM components (#224624)

The proper way to reference LLVM components is to pass them via the
LLVM_LINK_COMPONENTS variable. This is needed when building LLVM as a
dylib, so the proper dependency (the LLVM library) is passed.

This does not apply to plain add_executable() targets, which should
manually select to link against LLVM or individual LLVM components.

The effort to build LLVM as a dylib is tracked in #109483.
DeltaFile
+7-1cross-project-tests/debuginfo-tests/llvm-prettyprinters/lldb/CMakeLists.txt
+4-1cross-project-tests/CMakeLists.txt
+4-1clang-tools-extra/clangd/benchmarks/CompletionModel/CMakeLists.txt
+4-1clang-tools-extra/clangd/benchmarks/CMakeLists.txt
+19-44 files

LLVM/project b8c6f41 — flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP unroll-partial01.f90 unroll-heuristic02.f90

[flang][OpenMP] Do not set nuw on canonical loop trip count span (#229776)

lb <= ub is a signed comparison and does not imply that ub - lb does not
wrap as unsigned (e.g. when lb is negative and ub is not), so the nuw
flag on the span computation could produce poison.

Fixes https://github.com/llvm/llvm-project/issues/229739
DeltaFile
+6-3flang/lib/Lower/OpenMP/OpenMP.cpp
+3-3flang/test/Lower/OpenMP/fuse02.f90
+2-2flang/test/Lower/OpenMP/unroll-heuristic02.f90
+2-2flang/test/Lower/OpenMP/tile02.f90
+2-2flang/test/Lower/OpenMP/fuse01.f90
+1-1flang/test/Lower/OpenMP/unroll-partial01.f90
+16-134 files not shown
+20-1710 files