LLVM/project c3ad14b — mlir/docs ReleaseNotes.md, mlir/include/mlir/Conversion Passes.td

[mlir][ArmSVE] Implement `ConvertToLLVMPatternInterface`

ArmSVE could only be lowered to LLVM through
`convert-vector-to-llvm{enable-arm-sve}`. This PR implements the
`ConvertToLLVMPatternInterface` for the ArmSVE dialect so that `convert-to-llvm` lowers ArmSVE operations as well.

Since there are `arm_sve` dialect lowering patterns (`vector.create_mask`) that lower from vector dialect, an `add-lowering` pass option was also added to `convert-to-llvm` that allows loading a dialect and its conversion patterns, even if the dialect is not part of the input.

Part of a greater work in trying to make the VectorToLLVM pass not require linking every target dialect it can lower to.
DeltaFile
+62-27mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
+46-21mlir/lib/Conversion/ConvertToLLVM/ConvertToLLVMPass.cpp
+15-0mlir/test/Conversion/ConvertToLLVM/add-lowering.mlir
+12-0mlir/docs/ReleaseNotes.md
+5-3mlir/include/mlir/Dialect/ArmSVE/Transforms/Transforms.h
+7-0mlir/include/mlir/Conversion/Passes.td
+147-513 files not shown
+151-529 files

LLVM/project 5d92abc — libsycl/src/detail device_impl.hpp, offload/liboffload/API Device.td

[Offload][L0] Swap Level Zero NAME/PRODUCT_NAME (#235817)

The Level Zero plugin reports `OL_DEVICE_INFO_NAME` and
`OL_DEVICE_INFO_PRODUCT_NAME` backwards from how other plugins report
these values, e.g.:

|Backend|NAME|PRODUCT_NAME|
|-|-|-|
|Level Zero|Intel(R) Arc(TM) B580 Graphics|Intel GPU Xe HP|
|AMDGPU|gfx1201|AMD Radeon RX 9070 XT|
|CUDA|NVIDIA GeForce RTX 3060|NVIDIA GeForce RTX 3060|

Change the Level Zero plugin to report the product name through
PRODUCT_NAME and the architecture string through NAME (mirroring
AMDGPU), clarify the `NAME` description in Device.td, and change libsycl
to use `PRODUCT_NAME` for `sycl::info::device::name` so it still reports
the product name.
DeltaFile
+2-2offload/plugins-nextgen/level_zero/src/L0Device.cpp
+1-1offload/liboffload/API/Device.td
+1-1libsycl/src/detail/device_impl.hpp
+4-43 files

LLVM/project 9ebe0f6 — llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp TargetLowering.cpp, llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[LLVM][CodeGen][SVE] Add lowering for bfloat strict-fp arithmetic operations. (#230470)

This extends coverage to match the half, float and double support.
DeltaFile
+1,455-18llvm/test/CodeGen/AArch64/sve-bf-constrained-intrinsics.ll
+50-14llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+41-10llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+15-3llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+4-1llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+1,565-465 files

LLVM/project b7f4c6b — utils/bazel/llvm-project-overlay/clang BUILD.bazel

[bazel] Add Clang SSAF Analyzer binary
DeltaFile
+14-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+14-01 files

LLVM/project 7757581 — llvm/lib/Target/RISCV RISCVInstrInfoP.td, llvm/test/CodeGen/RISCV rvp-simd-32.ll rvp-simd-64.ll

[RISCV][P-ext] Combine more pmadd to pmadda (#235306)

This patch combines more `pm*add*` into `pm*adda*`.
DeltaFile
+345-0llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+153-0llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+27-0llvm/lib/Target/RISCV/RISCVInstrInfoP.td
+525-03 files

LLVM/project ea111d2 — utils/bazel/llvm-project-overlay/llvm/unittests BUILD.bazel

[Bazel] Fixes 9172b70 (#236745)

This fixes 9172b703da1e682827d904c569e0a4f62a7439b2 (#236090).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=9172b703da1e682827d904c569e0a4f62a7439b2

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/llvm/unittests/BUILD.bazel
+1-01 files

LLVM/project 8fcc23d — flang/lib/Optimizer/Transforms LoopInvariantCodeMotion.cpp, flang/test/Transforms licm-modref-cache.fir

[flang] Cache in flang-licm which locations a loop may modify

Hoisting a load asks the alias analysis whether the loop may modify each
location the load reads, and the answer depends only on the loop and the
location. The loads of a loop read the same few locations over and over, so
flang-licm asked the same question many times: on a large OpenACC region 97%
of the queries of a run repeated an earlier one, and with alias analysis
implementations that are expensive to query the pass took minutes.

Cache the answers of a run, keyed by the loop and the location, in a small
LoopModifiesLocationCache that the pass owns. It is valid for the whole run
because the pass only hoists operations that have no effects or only read: it
never moves a write, so a location that is not modified in a loop does not
become modified in it. Only whether the location may be modified is used, as
before.

-debug-only=flang-licm-cache prints, for each run, how many queries were
answered from the cache and how many asked the alias analysis.
DeltaFile
+105-0flang/test/Transforms/licm-modref-cache.fir
+67-3flang/lib/Optimizer/Transforms/LoopInvariantCodeMotion.cpp
+172-32 files

LLVM/project 93c4633 — clang/docs ReleaseNotes.md, clang/lib/Sema SemaTemplateInstantiate.cpp

[Clang] Don't skip lambda constraints when substituting type constraints (#236425)

This follows up to https://github.com/llvm/llvm-project/pull/207966 in order to transforms type
constraints with a ForConstraintSubstitution flag.

Assisted-by: Codex
DeltaFile
+16-0clang/test/SemaTemplate/concepts-lambda.cpp
+7-2clang/lib/Sema/SemaTemplateInstantiate.cpp
+3-0clang/docs/ReleaseNotes.md
+26-23 files

LLVM/project 88bc9de — clang/test/Analysis/exploded-graph-rewriter escapes.c

Anchor on PostStore instead of matching the first Store.
DeltaFile
+3-2clang/test/Analysis/exploded-graph-rewriter/escapes.c
+3-21 files

LLVM/project 2f7a16a — mlir/lib/Dialect/X86/Transforms VectorContractToAMXDotProduct.cpp, mlir/test/Dialect/X86/AMX vector-contract-to-tiled-dp.mlir

[mlir][x86] Make AMX nanokernel independent of result write (#236699)

The pattern relied on the presence of a
`vector.store`/`vector.transfer_write` of the accumulation result back
to memory. This patch reworks the handling in the following way:
- Enable direct tile-stores to the output memref for the VNNI-packed,
_zero-initialized_ case as well.
- All remaining paths require that the tile register contents are moved
through a temporary buffer. However, the shape of that buffer only
matters if we still need to accumulate the results onto the initial
value in memory – we can derive it from the source buffer's shape, as
before. Otherwise, we can just pick a shape to hold all output tiles. On
the online-packing path, we ensure that we have two neighboring tiles in
the N-dimension to allow shuffling.

Assisted-by: Copilot
DeltaFile
+62-59mlir/lib/Dialect/X86/Transforms/VectorContractToAMXDotProduct.cpp
+103-8mlir/test/Dialect/X86/AMX/vector-contract-to-tiled-dp.mlir
+165-672 files

LLVM/project 4958c49 — llvm/lib/Analysis BasicAliasAnalysis.cpp, llvm/test/Analysis/BasicAA q.bad.ll gep-constant-offset-heuristic.ll

[BasicAA] Account for wrapping scaled indices in `computeConstantOffsetHeuristic` (#236719)

Similarly to what already being done in `computeMinAbsVarOffset` since
1b7ef6a, the constant offset heuristic previously assumed `MinDiff *
Scale` to be a byte distance that cannot wrap. That does not hold if
`Scale*ext(V0)` or `Scale*ext(V1)` may wrap in the index width, thus
ensure this is checked explicitly.

Fixes: https://github.com/llvm/llvm-project/issues/236396.
DeltaFile
+241-0llvm/test/Analysis/BasicAA/gep-constant-offset-heuristic.ll
+0-214llvm/test/Analysis/BasicAA/q.bad.ll
+28-20llvm/lib/Analysis/BasicAliasAnalysis.cpp
+269-2343 files

LLVM/project 9172b70 — llvm/include/llvm/Frontend/Directive Version.h, llvm/include/llvm/Frontend/OpenMP OMPVersion.h

[OpenMP] Unify Version with directive::VersionRange (#236090)

The limits of VersionRange will now be represented as Versions,
not int values.
DeltaFile
+76-0llvm/include/llvm/Frontend/Directive/Version.h
+25-23llvm/unittests/Frontend/OpenACCTest.cpp
+3-44llvm/include/llvm/Frontend/OpenMP/OMPVersion.h
+18-21llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+14-12llvm/test/TableGen/directive1.td
+13-11llvm/test/TableGen/directive2.td
+149-1118 files not shown
+173-15014 files

LLVM/project b29cf77 — flang/include/flang/Parser openmp-utils.h, flang/lib/Parser openmp-utils.cpp

[OpenMP] Switch the underlying type of VersionRange to unsigned (#236089)

It was int before. The goal is to unify Version and VersionRange,
and Version stores the value as unsigned.
DeltaFile
+6-4llvm/include/llvm/TableGen/DirectiveEmitter.h
+2-4llvm/lib/Frontend/Directive/Spelling.cpp
+3-3llvm/include/llvm/Frontend/Directive/Spelling.h
+1-2flang/lib/Semantics/check-omp-syntax.cpp
+1-2flang/lib/Parser/openmp-utils.cpp
+1-2flang/include/flang/Parser/openmp-utils.h
+14-171 files not shown
+15-187 files

LLVM/project d4ca1e6 — llvm/lib/Transforms/Vectorize VPRecipeBuilder.h VPlanTransforms.h

Fixups
DeltaFile
+18-22llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+7-7llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+4-4llvm/lib/Transforms/Vectorize/VPlan.cpp
+6-0llvm/lib/Transforms/Vectorize/VPlanUtils.h
+3-2llvm/lib/Transforms/Vectorize/VPlanTransforms.h
+1-2llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
+39-376 files

LLVM/project 7a00721 — clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Drop a leftover blank line in CIR_FPBinaryOp

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+0-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+0-11 files

LLVM/project da29c6b — clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Append the fenv interface to complex FP op traits

Use let append traits instead of extending the base trait list.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+3-2clang/include/clang/CIR/Dialect/IR/CIROps.td
+3-21 files

LLVM/project c23239d — llvm/include/llvm/TableGen Record.h, llvm/test/TableGen dump.td

[TableGen] Keep dumps when instantiating defs from a multiclass (#236438)

The Record copy constructor copied assertions but not dumps, so a dump
in the body of a def inside a multiclass, or inherited by it from a
superclass, was silently dropped from the defs instantiated by defm.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+22-1llvm/test/TableGen/dump.td
+2-1llvm/include/llvm/TableGen/Record.h
+24-22 files

LLVM/project f980213 — clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[CIR] Store nsw/nuw as an OverflowFlags bit enum and split out saturated add/sub

cir.add, cir.sub and cir.mul carried nsw and nuw as two separate unit
properties, and lowering mapped them to LLVM with an early return that
picked nuw over nsw, so an op with both flags lowered to `overflow<nuw>`
and lost nsw. cir.add and cir.sub also carried a `sat` flag that changed
the operation's result rather than adding a poison condition.

Store the flags as one OverflowFlags bit-enum property whose layout
matches mlir::LLVM::IntegerOverflowFlags, so lowering casts it directly
and keeps both flags. The property uses the default EnumProp syntax,
printed as `nuw`, `nsw` or `nuw|nsw`, so no custom parser or printer is
needed. cir.mul now shares the add/sub base class and so becomes Pure.

Saturating arithmetic moves to new cir.add.sat and cir.sub.sat ops, which
lower to the signed or unsigned saturation intrinsics by element type.
That leaves cir::OverflowBehavior only describing nsw/nuw, so the builder
takes cir::OverflowFlags instead.


    [6 lines not shown]
DeltaFile
+71-44clang/include/clang/CIR/Dialect/IR/CIROps.td
+75-0clang/test/CIR/Lowering/overflow-flags.cir
+35-35clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+12-57clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+62-0clang/test/CIR/IR/overflow-flags.cir
+31-23clang/lib/CIR/CodeGen/CIRGenFixedPointBuilder.h
+286-15913 files not shown
+419-23419 files

LLVM/project 8ac7378 — llvm/lib/Target/AMDGPU SIInstructions.td, llvm/test/CodeGen/AMDGPU fptrunc-round-f64-src-align.mir

[AMDGPU] Align FPTRUNC_ROUND_F32_F64_PSEUDO VGPR source operand (#236195)

The 64-bit VGPR source of FPTRUNC_ROUND_F32_F64_PSEUDO used the plain
VReg_64 class, while SIModeRegister lowers the pseudo to V_CVT_F32_F64_e32,
whose source must be even-aligned on subtargets that require aligned VGPRs.
Use VReg_64_AlignTarget so the pseudo already carries the alignment of the
instruction it becomes.

Co-Authored-By: Claude <noreply at anthropic.com>

---------

Co-authored-by: Claude <noreply at anthropic.com>
Co-authored-by: Jay Foad <jay.foad at gmail.com>
DeltaFile
+20-0llvm/test/CodeGen/AMDGPU/fptrunc-round-f64-src-align.mir
+1-1llvm/lib/Target/AMDGPU/SIInstructions.td
+21-12 files

LLVM/project aa68114 — llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll amdgcn.bitcast.832bit.ll

[AMDGPU] Enable SlotIndexes compaction by default

Add TargetRegisterInfo::shouldCompactSlotIndexes() so targets can opt
in to dropping dead SlotIndexes entries before greedy allocation, one
target at a time. An explicit -greedy-compact-slot-indexes still
overrides the target. Enable it for AMDGPU, where the leftover entries
skew live range priorities enough to cause heavy spilling.
DeltaFile
+82,724-82,770llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+22,718-22,674llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+9,311-9,381llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+8,998-9,209llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+8,016-8,194llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.832bit.ll
+7,335-7,432llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+139,102-139,660279 files not shown
+232,294-232,827285 files

LLVM/project 46c44da — clang/test/CodeGen/X86 inline-asm-mask-output.c

Test a _Complex output in a mask register

Assisted-by: Claude Opus 5.5
DeltaFile
+17-2clang/test/CodeGen/X86/inline-asm-mask-output.c
+17-21 files

LLVM/project 4435dc1 — clang/lib/CodeGen CGStmt.cpp, clang/test/CodeGen/X86 inline-asm-mask-output.c

Merge branch 'users/void/asm-mask-reg-output' into users/void/asm-goto-_Complext-types
DeltaFile
+63-0clang/test/CodeGen/X86/inline-asm-mask-output.c
+16-7clang/lib/CodeGen/CGStmt.cpp
+79-72 files

LLVM/project 7ee12d9 — clang/lib/CodeGen CGStmt.cpp, clang/test/CodeGen/X86 inline-asm-mask-output.c

[Clang][CodeGen] Don't crash on a struct inline asm output in a mask register

A struct register output with "=k" crashes when x86's
'adjustInlineAsmType' returned '<N x i1>' for "k". The conversion chain
then bitcast that vector to the struct type, which is invalid IR.

Fix this by casting the vector to an integer that's the same size as the
vector, then truncate it to the destination's size.

Fixes: 8d6e82d501cd ("[X86] Use vXi1 for `k` constraint in inline asm (#77733)")
Assisted-by: Claude Opus 5.5
DeltaFile
+63-0clang/test/CodeGen/X86/inline-asm-mask-output.c
+16-7clang/lib/CodeGen/CGStmt.cpp
+79-72 files

LLVM/project 26ba6b7 — lldb/test/Shell/ScriptInterpreter/Python fail_watchpoint_command.test

[lldb][test] Force lldb-server use in fail_watchpoint_command.test (#236711)

Turns out that our Windows on Arm bot hasn't been testing lldb-server
this entire time. We set LLDB_USE_LLDB_SERVER, but to test it you have
to set LLDB_TEST_USE_LLDB_SERVER.

And I don't fancy setting that and waiting a week to find out what
breaks.

So we will update in the future bot but for now, make this test always
use lldb-server.

With in-process debug, you cannot set any watchpoints on Windows on Arm.
With lldb-server, you can set 1, at least you can on the bot's hardware.

Fixes #235985. Relates to #232235.
DeltaFile
+1-1lldb/test/Shell/ScriptInterpreter/Python/fail_watchpoint_command.test
+1-11 files

LLVM/project 6069337 — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt semop.h, libc/src/sys/sem/linux CMakeLists.txt semop.cpp

[libc] Use a syscall wrapper for semop

This PR move semop behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+50-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+36-0libc/src/__support/OSUtil/linux/syscall_wrappers/semop.h
+14-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+6-6libc/src/sys/sem/linux/semop.cpp
+3-2libc/src/sys/sem/linux/CMakeLists.txt
+109-85 files

LLVM/project dd4507d — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt semget.h, libc/src/sys/sem/linux CMakeLists.txt semget.cpp

[libc] Use a syscall wrapper for semget

This PR move semget behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+43-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+35-0libc/src/__support/OSUtil/linux/syscall_wrappers/semget.h
+13-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+6-6libc/src/sys/sem/linux/semget.cpp
+3-2libc/src/sys/sem/linux/CMakeLists.txt
+100-85 files

LLVM/project 5c5ca53 — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt semctl.h, libc/src/sys/sem/linux semctl.cpp CMakeLists.txt

[libc] Use a syscall wrapper for semctl

This PR move semctl behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+121-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+35-0libc/src/__support/OSUtil/linux/syscall_wrappers/semctl.h
+15-14libc/src/sys/sem/linux/CMakeLists.txt
+6-7libc/src/sys/sem/linux/semctl.cpp
+12-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+189-215 files

LLVM/project 48c933f — offload/libompaccsupport device.cpp, offload/test/offloading/fortran target-no-loop.f90

[OpenMP][offload] Apply the low-trip rule to no-loop kernels

A no-loop kernel gets one thread per iteration. Like an SPMD kernel, it
now gets fewer threads per block, down to
LIBOMPTARGET_MIN_THREADS_FOR_LOW_TRIP_COUNT, and more blocks if its loop
is too short to fill the default number of blocks. A thread_limit is
never changed. For example, a no-loop kernel of 512 iterations gets
16x32 instead of 2x256 on MI210. For BLAS level-3 kernels of that shape,
each iteration a long serial loop, that is 3-6x faster.

This is an upstream port of the corresponding downstream.

Claude assisted with this patch.
DeltaFile
+68-45offload/libompaccsupport/device.cpp
+7-0offload/test/offloading/fortran/target-no-loop.f90
+75-452 files

LLVM/project 61e52a3 — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt semop.h, libc/src/sys/sem/linux CMakeLists.txt semop.cpp

[libc] Use a syscall wrapper for semop

This PR move semop behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+50-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+36-0libc/src/__support/OSUtil/linux/syscall_wrappers/semop.h
+14-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+6-6libc/src/sys/sem/linux/semop.cpp
+3-2libc/src/sys/sem/linux/CMakeLists.txt
+109-85 files

LLVM/project 1c8c59c — libc/src/__support/OSUtil/linux/syscall_wrappers CMakeLists.txt semget.h, libc/src/sys/sem/linux CMakeLists.txt semget.cpp

[libc] Use a syscall wrapper for semget

This PR move semget behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
DeltaFile
+43-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+35-0libc/src/__support/OSUtil/linux/syscall_wrappers/semget.h
+13-0libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt
+6-6libc/src/sys/sem/linux/semget.cpp
+3-2libc/src/sys/sem/linux/CMakeLists.txt
+100-85 files