LLVM/project b9253b9 — llvm/lib/Target/AArch64 AArch64InstrFormats.td AArch64ISelDAGToDAG.cpp, llvm/test/CodeGen/AArch64 shift-amount-mod.ll

[AArch64] Remove tryShiftAmountMod in favor of SelectShiftMask (#228753)

The earlier patches moved the shift-amount optimizations (AND mask,
ADD/SUB mod, NEG, MVN, ROTR) into the `SelectShiftMask` ComplexPattern,
so the variable shift/rotate instructions inherit them through the
`Shift` multiclass for both SelectionDAG and GlobalISel. With that in
place, `tryShiftAmountMod` is now redundant and this patch removes it
along with its two call sites.

Completing the removal needed a few additions so the ComplexPattern path
covers every case the old DAG routine did:

- `allUsesAreShiftAmounts` gates the `NEG`/`MVN` rewrite, so a multi-use
`C - x` amount (e.g. one that is also stored) is shared instead of being
recomputed as a separate `neg`/`mvn`.
- The matcher accepts the amount in an i32 or i64 register, with the
NEG/NOT opcode taken from the node's own type and the threshold/modulus
from the `ShiftWidth` template parameter.
- Peek-through patterns cover widened amounts: an i32 shift with an i64

    [6 lines not shown]
DeltaFile
+42-141llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
+72-84llvm/test/CodeGen/AArch64/shift-amount-mod.ll
+34-0llvm/lib/Target/AArch64/AArch64InstrFormats.td
+148-2253 files

LLVM/project 8fadf6b — clang-tools-extra/clangd/refactor/tweaks ExtractFunction.cpp, clang-tools-extra/clangd/unittests/tweaks ExtractFunctionTests.cpp

[clangd] Extract to function: Fix parameter declarator printing

A parameter's type and name were rendered by printing the type as a
standalone string and appending the name after it. That's wrong for
any declarator syntax that doesn't simply put the name after the type:
a function pointer parameter rendered as the uncompilable
`void (*)(int) F` instead of `void (*F)(int)`, and a parameter that's a
reference to an array rendered as the equally invalid `int[5] &arr`
instead of `int (&arr)[5]`.

Fixed by passing the name as printType()'s existing declarator
placeholder argument instead, letting clang's own type printer place it
correctly. For the reference case, this requires building the actual
reference QualType rather than just prepending "&" to the placeholder
string, since only the real type lets the printer parenthesize the
array case correctly.

Assisted-by: Claude Code
DeltaFile
+130-9clang-tools-extra/clangd/unittests/tweaks/ExtractFunctionTests.cpp
+63-11clang-tools-extra/clangd/refactor/tweaks/ExtractFunction.cpp
+193-202 files

LLVM/project f160fc0 — llvm/lib/Target/X86 X86TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/X86 div-rem-strictfp.ll div-rem-pair.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+21-20llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+25-2llvm/test/Analysis/CostModel/X86/div-rem-pair.ll
+10-10llvm/test/Analysis/CostModel/X86/div-rem-strictfp.ll
+56-323 files

LLVM/project 8719e19 — mlir/lib/Dialect/LLVMIR/IR LLVMTypes.cpp, mlir/lib/Dialect/OpenMP/Transforms OpenMPOffloadPrivatizationPrepare.cpp

[mlir][DataLayout] Add getTypeAllocSize (#231262)

Add DataLayout::getTypeAllocSize, the type's size rounded up to its ABI
alignment, as in llvm::DataLayout. Use it for the three places that
computed this by hand: LLVM dialect arrays and structs, and the OpenMP
offload privatization pass. ClangIR's type layout hooks also need it.

Assisted-by: Cursor / Claude Opus 5.5
DeltaFile
+31-0mlir/test/Interfaces/DataLayoutInterfaces/query.mlir
+29-0mlir/unittests/Interfaces/DataLayoutInterfacesTest.cpp
+27-0mlir/test/Dialect/LLVMIR/layout.mlir
+2-5mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
+1-3mlir/lib/Dialect/OpenMP/Transforms/OpenMPOffloadPrivatizationPrepare.cpp
+4-0mlir/lib/Interfaces/DataLayoutInterfaces.cpp
+94-83 files not shown
+101-89 files

LLVM/project 3e93f25 — clang/tools/clang-ssaf-orchestrator-make CMakeLists.txt

[clang][ssaf] Put clang-ssaf-orchestrator-make in LLVM_BINARY_DIR (#231930)

`clang-ssaf-orchestrator-make/CMakeLists.txt` puts the output binary in
`CMAKE_BINARY_DIR` rather than `LLVM_BINARY_DIR`, which means that when
LLVM is used as part of a larger cmake-based project via
`add_subdirectory` (such as Arm Toolchain), this tool ends up in the
project's top-level `bin` directory instead of the LLVM `bin` directory.
Tests will attempt to find it in the latter, so all of these tests fail.
DeltaFile
+4-4clang/tools/clang-ssaf-orchestrator-make/CMakeLists.txt
+4-41 files

LLVM/project a4bef5c — llvm/lib/Target/AArch64 AArch64InstrInfo.td AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 sqabs.ll sve2-sqabs.ll

[AArch64] lower umin(abs(X), signed_max) to SQABS
DeltaFile
+21-138llvm/test/CodeGen/AArch64/sve2-sqabs.ll
+44-44llvm/test/CodeGen/AArch64/sqabs.ll
+34-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+11-2llvm/lib/Target/AArch64/AArch64InstrInfo.td
+110-1844 files

LLVM/project f32ac72 — clang/test/Analysis/Scalable/ssaf-merge-conflict-report merge.test cli-errors.test, clang/test/Analysis/Scalable/ssaf-merge-conflict-report/Inputs conflicts-c.sarif conflicts-b.sarif

[clang][ssaf] Add clang-ssaf-merge-conflict-report (#231731)

clang-ssaf-src-edit-merge reports the edits it drops because they
overlap, but only those of the one merge it ran. Add a tool that merges
such reports, so that the conflicts found while merging the edits of an
archive can be carried into the report of the program it is linked into.
DeltaFile
+249-0clang/tools/clang-ssaf-merge-conflict-report/MergeConflictReport.cpp
+118-0clang/test/Analysis/Scalable/ssaf-merge-conflict-report/Inputs/conflicts-b.sarif
+118-0clang/test/Analysis/Scalable/ssaf-merge-conflict-report/Inputs/conflicts-a.sarif
+69-0clang/test/Analysis/Scalable/ssaf-merge-conflict-report/cli-errors.test
+67-0clang/test/Analysis/Scalable/ssaf-merge-conflict-report/Inputs/conflicts-c.sarif
+28-0clang/test/Analysis/Scalable/ssaf-merge-conflict-report/merge.test
+649-013 files not shown
+818-019 files

LLVM/project 6811fc5 — llvm/test/CodeGen/AArch64 sqabs.ll sve2-sqabs.ll

[AArch64] Pre-commit tests for vector SQABS

Cover saturating absolute value expressed as UMIN of ABS and the signed
maximum for Neon and scalable vectors. Include commuted operands, poison,
multiple uses and negative cases.

Record the existing code generation so the SQABS combine can show its
effect as updates to these checks.
DeltaFile
+329-0llvm/test/CodeGen/AArch64/sve2-sqabs.ll
+227-0llvm/test/CodeGen/AArch64/sqabs.ll
+556-02 files

LLVM/project 5e05dda — 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
+73-0offload/test/offloading/kernel_launch_environment.c
+13-0offload/libompaccsupport/PluginManager.cpp
+9-3offload/libompaccsupport/device.cpp
+6-0offload/include/PluginManager.h
+101-34 files

LLVM/project c5e8f9f — 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 e05dbee — flang/lib/Lower/OpenMP ClauseProcessor.cpp, flang/test/Lower/OpenMP iterator-source-occurrences.f90 depend-iterator.f90

[mlir][flang][OpenMP] Select iterators per locator and allow multi-block regions (#227454)

Flang expands each iterator-dependent depend or affinity locator over
every
range in the clause, even iterators the locator doesn't use. For
example:

```
  depend(iterator(i=1:2, j=3:m), in: a(i))
```

When m < 3, the unused j range is empty, so both dependences on a
disappear
and task ordering can be lost. When j isn't empty, the entries are just
repeated. Affinity has the same problem.

This patch picks the ranges for each locator from the iterator names
that
appear in its source, keeping declaration order. Doing that safely needs

    [42 lines not shown]
DeltaFile
+362-0flang/test/Lower/OpenMP/iterator-empty-range.f90
+243-0flang/test/Lower/OpenMP/iterator-locators.f90
+141-94flang/test/Lower/OpenMP/depend-iterator.f90
+206-0mlir/test/Target/LLVMIR/openmp-iterator-multi-block.mlir
+87-117flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+201-0flang/test/Lower/OpenMP/iterator-source-occurrences.f90
+1,240-21133 files not shown
+2,869-56739 files

LLVM/project def13af — llvm/lib/Target/VE VEISelLowering.cpp, llvm/test/CodeGen/VE exception-model.ll

VE: Use i32 registers for 32-bit loads in the SjLj dispatch block (#231656)

Fix verifier errors in exception test. The call site index and the
PIC jump table offset were loaded with ldl.zx, which defines an i32
register, into vregs with the i64 register class.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+13-4llvm/lib/Target/VE/VEISelLowering.cpp
+1-2llvm/test/CodeGen/VE/exception-model.ll
+14-62 files

LLVM/project b0738b3 — llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Transforms/IPO Attributor.cpp

Attributor: Rewrite function signatures in a deterministic order (#231802)

ArgumentReplacementMap was a DenseMap keyed by Function pointer, so
the order of the signature rewrites depended on pointer values, which
showed up as different value names in the output.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-2llvm/lib/Transforms/IPO/Attributor.cpp
+3-1llvm/include/llvm/Transforms/IPO/Attributor.h
+5-32 files

LLVM/project f196002 — llvm/lib/Target/AMDGPU AMDGPUAttributor.cpp

AMDGPU: Don't check liveness in AMDGPUAttributor (#231915)

AAIsDead is not in the set of AMDGPUAttributor enabled AAs, so the
liveness checks of the Attributor never find anything dead. They still
looked up AAIsDead for each visited instruction and use, for every
update.

The output IR is unchanged on the modules below. Instructions spent in
amdgpu-attributor (opt, parse cost subtracted, median of 3 runs):
  rocPRIM test_device_scan, gfx942:          1963M -> 1442M (-26.5%)
  Blender Cycles HIP kernel, gfx1100:        636M -> 497M (-21.9%)
  rocPRIM 16 tests, full LTO, closed world:  7415M -> 5152M (-30.5%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+2-0llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
+2-01 files

LLVM/project f69c8a0 — llvm/lib/Target/AMDGPU VOP2Instructions.td

[AMDGPU] Remove SI2_VI3Alias. NFC. (#231934)

This allowed v_ldexp_f32 and friends to be written without modifiers on
GFX8/GFX9 where they are VOP3-only. But the real VOP3 instructions
already accept these forms since modifiers, clamp and omod are optional.
DeltaFile
+0-18llvm/lib/Target/AMDGPU/VOP2Instructions.td
+0-181 files

LLVM/project 7723ced — llvm/lib/Target/AArch64 AArch64PredicateAsCounterLoopRewrites.cpp, llvm/test/CodeGen/AArch64 pn-loop-rewrites-metadata.ll predicate-as-counter-loop-rewrites.ll

[AArch64] Use multi-vector intrinsics for masked load/store users of predicate-as-counter (#220962)

If the user of the original wide mask is a masked load or store
intrinsic (matching the element size of the predicate-as-counter),
rewrite it directly to a masked multi-vector load/store.

This avoids materializing the vector mask and is easier to handle here
than later (e.g. in SelectionDAG), since we do not need to match the
concatenation of all `pext` segments of the predicate-as-counter.

Assisted-by: Codex
DeltaFile
+128-137llvm/test/CodeGen/AArch64/predicate-as-counter-loop-rewrites.ll
+177-0llvm/test/CodeGen/AArch64/pn-loop-rewrites-metadata.ll
+97-2llvm/lib/Target/AArch64/AArch64PredicateAsCounterLoopRewrites.cpp
+402-1393 files

LLVM/project 131e291 — bolt/lib/Core Relocation.cpp, llvm/test/CodeGen/AArch64 minmax-of-minmax.ll

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+5,611-5,555llvm/test/CodeGen/RISCV/clmul.ll
+1,314-1,312llvm/test/CodeGen/RISCV/clmulr.ll
+1,274-1,292llvm/test/CodeGen/RISCV/clmulh.ll
+0-2,441llvm/test/CodeGen/AArch64/minmax-of-minmax.ll
+2,313-0llvm/test/Transforms/InstCombine/minmax-of-minmax-2.ll
+18-1,034bolt/lib/Core/Relocation.cpp
+10,530-11,634630 files not shown
+32,926-18,689636 files

LLVM/project 3309a94 — flang/test/Driver optimization-remark.f90, flang/test/Fir embox.fir

[flang][SystemZ] Fix test failures on s390x for target alignment, endianness and vectorizer remarks (#230565)

Fix Flang test failures on SystemZ.
i) SystemZ data layout specifies 2-byte aggregate alignment and 8-byte
fp128 alignment, handled via FileCheck variable substitutions
(-DAGG_ALIGN, -DF128_ALIGN).
ii) The default SystemZ CPU (z10) has no vector facility, so -march=z13
is passed on s390x in optimization-remark.f90 to enable vector remarks.
iii) s390x is big-endian, so s390x.* is added to select big-endian
checks in default-initialization-globals.f90 and data08.f90.
DeltaFile
+11-11flang/test/Driver/optimization-remark.f90
+9-8flang/test/Integration/OpenMP/map-types-and-sizes.f90
+5-4flang/test/Integration/complex-div-to-llvm-kind16.f90
+3-3flang/test/Fir/embox.fir
+1-1flang/test/Semantics/data08.f90
+1-1flang/test/Lower/default-initialization-globals.f90
+30-286 files

LLVM/project 6d38cc9 — offload/liboffload/API Memory.td

Update offload/liboffload/API/Memory.td

Co-authored-by: Kevin Sala Penades <salapenades1 at llnl.gov>
DeltaFile
+1-1offload/liboffload/API/Memory.td
+1-11 files

LLVM/project 9557331 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.h AArch64TargetTransformInfo.cpp

[AArch64][SME] NFC: Inline getCompatibilityForChangeToStreamingMode.

This removes the need for the `StreamingIncompatibility` enum and
makes the code a little simpler.

This PR also moves hasPossibleIncompatibleOps to AArch64TTIimpl,
so that we can query the costmodel in a follow-up PR.
DeltaFile
+39-62llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+3-0llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+42-622 files

LLVM/project 4a95557 — llvm/lib/Target/AMDGPU AMDGPUSplitModule.cpp, llvm/test/tools/llvm-split/AMDGPU non-kernels-unreachable-cycles.ll

[AMDGPU][SplitModule] Add entry points for unreachable call cycles (#230984)

A function in a call cycle always has an incoming direct call, so
`SplitGraph` never makes it an entry point. If no kernel and no other
entry point reaches the cycle, the cycle is assigned to no partition.
This can hit an assertion in `verifyGraph`.

In this PR, we visit the unreached nodes in reverse post-order of the
direct call edges, and make each node that is still unreached an entry
point. Only the outermost unreached cycles get one, so their callees are
not copied into other partitions.
DeltaFile
+40-1llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
+15-6llvm/test/tools/llvm-split/AMDGPU/non-kernels-unreachable-cycles.ll
+55-72 files

LLVM/project 3e18e02 — llvm/lib/Target/LoongArch CMakeLists.txt LoongArch.h, llvm/test/CodeGen/LoongArch opt-pipeline.ll avoid-sfb.ll

[LoongArch] Avoid store forwarding blocks in small copies

Store-to-load forwarding fails when a load is wider than the store that
wrote its bytes, for GPR, FPR, LSX and LASX accesses alike. On LA664 such
a load takes 14-17 cycles instead of 7-10.

Small memcpy/memmove are lowered to ld.d/st.d, fld.d/fst.d, vld/vst or
xvld/xvst copies. Add a pass that breaks such a copy into smaller copies
when its load is likely to read data from in-flight narrower stores:

- A narrower store shortly before the load writes inside the copied bytes
  through the same base register or frame index: break the copy around
  the store.
- In a loop, a store of the previous iteration of at least 8 bytes may
  write the same buffer, as in LZ77 back-reference copies: break the copy
  into 8-byte pieces.

The pass runs at -O1 and above and can be disabled with
-loongarch-disable-avoid-sfb.

    [6 lines not shown]
DeltaFile
+555-0llvm/lib/Target/LoongArch/LoongArchAvoidStoreForwardingBlocks.cpp
+313-48llvm/test/CodeGen/LoongArch/avoid-sfb.ll
+3-0llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
+2-0llvm/lib/Target/LoongArch/LoongArch.h
+1-0llvm/test/CodeGen/LoongArch/opt-pipeline.ll
+1-0llvm/lib/Target/LoongArch/CMakeLists.txt
+875-481 files not shown
+876-487 files

LLVM/project 2f1af4f — llvm/test/CodeGen/LoongArch avoid-sfb.ll

[LoongArch][NFC] Pre-commit tests for store forwarding blocks in copies

Small copies whose load reads data from in-flight narrower stores,
including LZ77-style overlapping copy loops reduced from the rustc-perf
bufreader benchmark.
DeltaFile
+692-0llvm/test/CodeGen/LoongArch/avoid-sfb.ll
+692-01 files

LLVM/project 398dae5 — libc/include/llvm-libc-macros generic-error-number-macros.h

[libc] Add definition of EOVERFLOW to generic-error-number-macros.h (#231891)
DeltaFile
+1-0libc/include/llvm-libc-macros/generic-error-number-macros.h
+1-01 files

LLVM/project cdef12c — offload/libompaccsupport PluginManager.cpp, offload/libomptarget OffloadRTL.cpp

[offload][nfc] Decouple OpenMP offload policy from PluginManager (#220761)

PluginManager will be reused across OpenMP and OpenACC, This patch
removes PluginManager's dependency on the OpenMP offload policy.
DeltaFile
+5-1offload/libomptarget/OffloadRTL.cpp
+0-5offload/libompaccsupport/PluginManager.cpp
+5-62 files

LLVM/project 72e9bd4 — llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp SIISelLowering.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.h AMDGPUBaseInfo.cpp

[NFC][AMDGPU] Create tables for async-related intrinsics
DeltaFile
+101-0llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td
+37-31llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+4-17llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+2-15llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+3-0llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+147-635 files

LLVM/project 56f571c — llvm/include/llvm/IR IntrinsicsAMDGPU.td, llvm/lib/Target/AMDGPU AMDGPUSearchableTables.td

Identify async intrinsics with marker class
DeltaFile
+8-91llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td
+56-21llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+4-26llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+68-1383 files

LLVM/project a16c088 — llvm/include/llvm/IR IntrinsicsAMDGPU.td, llvm/lib/Target/AMDGPU AMDGPUSearchableTables.td AMDGPUInstructionSelector.cpp

Narrow marker class to LDSDMA intrinsics
DeltaFile
+29-59llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+17-4llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+5-13llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+4-13llvm/lib/Target/AMDGPU/AMDGPUSearchableTables.td
+15-2llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+0-3llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+70-946 files

LLVM/project af3663a — llvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU SIMemoryLegalizer.cpp

Update attributor name
DeltaFile
+4-4llvm/docs/AMDGPUUsage.rst
+1-1llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+5-52 files

LLVM/project 8b3e623 — llvm/docs AMDGPUUsage.rst, llvm/lib/Target/AMDGPU AMDGPUSubtarget.cpp AMDGPULowerIntrinsics.cpp

Re-apply demotion logic

This reverts commit 992e6130ed441b82490f9a6cf01f5bba38293e4e.
DeltaFile
+1,321-821llvm/test/CodeGen/AMDGPU/memory-legalizer-single-wave-workgroup-memops.ll
+29-24llvm/test/CodeGen/AMDGPU/memory-legalizer-single-wave-workgroup-lds-dma.ll
+20-7llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+10-0llvm/docs/AMDGPUUsage.rst
+2-4llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
+4-0llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+1,386-8562 files not shown
+1,390-8588 files