LLVM/project 315bbbcllvm/utils/gn/secondary/llvm/lib/Target/AMDGPU BUILD.gn, llvm/utils/gn/secondary/llvm/test BUILD.gn

[gn] port b11722f1d3bd5de (llvm-calc-occupancy) (#213266)
DeltaFile
+21-0llvm/utils/gn/secondary/llvm/tools/llvm-calc-occupancy/BUILD.gn
+5-0llvm/utils/gn/secondary/llvm/test/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn
+27-03 files

LLVM/project 95ee221flang/docs FIRArrayOperations.md, flang/include/flang/Optimizer/Dialect FIROps.td

[flang] Delete the legacy array-value operations from FIR (#213159)

Nothing in flang has produced fir.array_load, fir.array_fetch,
fir.array_update, fir.array_modify, fir.array_access, fir.array_amend,
or fir.array_merge_store since the legacy (non-HLFIR) expression
lowering was deleted (#210385, #210621, #210639, #210873), and the
array-value-copy pass that legalized them is gone (#211816, #212643).
Delete the operations and the surface that existed only for them:

- FIROps.td: the "Array value operations" section including the
copy-in/copy-out design comment; FIROps.cpp: the ops verifiers, effects
and getExtents. fir.array_coor is unrelated and stays, as does the
validTypeParams helper shared with fir.pack_array.
- Tests: the ops roundtrip/verifier blocks in fir-ops.fir and
invalid.fir; scaffolding rewrites in inline-elemental.fir (store via
hlfir.designate; hlfir.apply-in-do_loop coverage preserved),
loop-versioning.fir @test4 (the versioned loops are untouched), and
simplifyintrinsics.fir (inert copy-back loops dropped; no CHECK lines
affected).

    [5 lines not shown]
DeltaFile
+0-396flang/include/flang/Optimizer/Dialect/FIROps.td
+0-343flang/docs/FIRArrayOperations.md
+0-212flang/lib/Optimizer/Dialect/FIROps.cpp
+0-209flang/test/Fir/invalid.fir
+0-103flang/test/Transforms/simplifyintrinsics.fir
+1-43flang/test/Fir/fir-ops.fir
+1-1,3066 files not shown
+28-1,34312 files

LLVM/project 4dc60bbllvm/tools/llvm-calc-occupancy CMakeLists.txt

[Build] Fix llvm-calc-occupancy link errors when using LLVM_LINK_LLVM_DYLIB. (#213262)
DeltaFile
+1-0llvm/tools/llvm-calc-occupancy/CMakeLists.txt
+1-01 files

LLVM/project 2f30bd1libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find pstl.adjacent_find_pred.pass.cpp pstl.adjacent_find.pass.cpp, libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of pstl.find_first_of_pred.pass.cpp pstl.find_first_of.pass.cpp

[libc++][NFC] Make size_t -> int conversions explicit in a few PSTL tests (#213145)

The implicit truncating conversions that were introduced in some PSTL
tests are causing warnings on MSVC. This PR fixes that.

See
https://github.com/llvm/llvm-project/pull/212366#discussion_r3679252259
for more details.
DeltaFile
+1-1libcxx/test/std/algorithms/alg.nonmodifying/mismatch/pstl.mismatch_pred.pass.cpp
+1-1libcxx/test/std/algorithms/alg.nonmodifying/mismatch/pstl.mismatch.pass.cpp
+1-1libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/pstl.find_first_of_pred.pass.cpp
+1-1libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/pstl.find_first_of.pass.cpp
+1-1libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/pstl.adjacent_find_pred.pass.cpp
+1-1libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/pstl.adjacent_find.pass.cpp
+6-66 files

LLVM/project 3f9b969mlir/lib/Dialect/Linalg/Transforms ConvertConv2DToImg2Col.cpp, mlir/test/Dialect/Linalg convert-conv2d-to-img2col.mlir

[mlir][linalg] Support non-unit dilations in im2col decomposition (#208424)

The im2col patterns for conv_2d_nhwc_hwcf, conv_2d_nchw_fchw and
conv_2d_nhwc_fhwc avoided non-unit dilations, but the restriction
doesn't seem to be fundamental: dilation only affects the gather step,
which can fold it into its indexing map. Generalize the convolved index
expression from `oh * stride + fh` to `oh * stride + fh * dilation` and
drop the match failures.

Verified by comparing the results of a dilated convolution lowered
directly to loops against the im2col decomposition with mlir-runner.

Assisted-By: Claude Code (for generating tests).
DeltaFile
+116-0mlir/test/Dialect/Linalg/convert-conv2d-to-img2col.mlir
+14-27mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
+130-272 files

LLVM/project b4efecbclang/test/CodeGenOpenCL builtins-amdgcn-gfx13.cl, llvm/lib/TargetParser AMDGPUTargetParser.cpp

AMDGPU: Add missing msad-insts to gfx13 frontend feature map (#213122)

fillAMDGCNFeatureMap omitted msad-insts for gfx1310/gfx13-generic, so
clang wrongly rejected __builtin_amdgcn_msad_u8 on those targets even
though the backend enables the feature (FeatureGFX9 generation,
inherited through FeatureGFX13). Add it to the gfx13 case.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+23-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx13.cl
+9-4llvm/test/CodeGen/AMDGPU/llvm.amdgcn.msad.u8.ll
+1-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+33-43 files

LLVM/project e84daa6lldb/packages/Python/lldbsuite/test/tools/lldb_dap session_helpers.py, lldb/test/API/tools/lldb-dap/console TestDAP_redirection_to_console.py TestDAP_console.py

[lldb-dap] Migrate console and restart tests (#213019)

Migrated Tests
- TestDAP_console.py
- TestDAP_redirection_to_console.py
- TestDAP_restart.py
- TestDAP_restart_console.py
DeltaFile
+98-91lldb/test/API/tools/lldb-dap/console/TestDAP_console.py
+46-49lldb/test/API/tools/lldb-dap/restart/TestDAP_restart.py
+42-38lldb/test/API/tools/lldb-dap/restart/TestDAP_restart_console.py
+23-17lldb/test/API/tools/lldb-dap/console/TestDAP_redirection_to_console.py
+1-1lldb/packages/Python/lldbsuite/test/tools/lldb_dap/session_helpers.py
+210-1965 files

LLVM/project c29bcd4lldb/source/Plugins/Platform/Windows PlatformWindows.cpp

[lldb][Windows] Don't cut the loader helper off after 250ms (#213010)

`LoadLibraryW` runs on the debuggee with a timeout of 250ms (the
default). On a loaded machine (in CI), this timeout is reached quite
often, causing tests failures.

This patch gives both loader helpers an explicit timeout of 5s (clamped
to half the overall timeout so the two stay consistent).
DeltaFile
+5-0lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
+5-01 files

LLVM/project b3825e9llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/PhaseOrdering fast-basictest.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+3-30llvm/test/Transforms/SLPVectorizer/X86/reduction-fadd-reassoc.ll
+10-5llvm/test/Transforms/PhaseOrdering/fast-basictest.ll
+2-4llvm/test/Transforms/SLPVectorizer/X86/ordered-reduction-replaced.ll
+2-2llvm/test/Transforms/SLPVectorizer/X86/reduction-ordered-fadd.ll
+3-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+20-425 files

LLVM/project a6a1cb0libsycl/src/detail global_objects.hpp

[libsycl] Add missing header include to global_objects.hpp (#213020)

Fixes a build error observed on Windows.
DeltaFile
+1-0libsycl/src/detail/global_objects.hpp
+1-01 files

LLVM/project e44068clld/MachO ObjC.cpp, lld/test/MachO objc-category-merging-swift.s objc-category-merging-minimal.s

[lld][MachO] Preserve class-address addends in ObjC category merging (#211431)

Mach-O category merging can encounter Swift class references as an
enclosing
metadata symbol plus a non-zero addend after LTO removes the exact
class-address alias. For example, a category can refer to a `CMf` symbol
plus
the offset of the class object within that metadata record.

`tryGetSymbolAtIsecOffset()` previously resolved such a relocation to
the
enclosing symbol and discarded the residual addend. `getClassRo()` then
read
the class layout at the wrong address. For valid Swift metadata this can
return
null; before the defensive check in the first commit the linker
dereferenced
that result and crashed, while the check alone safely skipped a category
that

    [30 lines not shown]
DeltaFile
+96-50lld/MachO/ObjC.cpp
+13-0lld/test/MachO/objc-category-merging-minimal.s
+2-6lld/test/MachO/objc-category-merging-swift.s
+111-563 files

LLVM/project 0a1f0aaclang/include/clang/Analysis AnyCall.h, clang/unittests/Analysis CMakeLists.txt AnyCallTest.cpp

[clang][Analysis] Add argument accessors to clang::AnyCall (#212934)

Add APIs to `clang::AnyCall` for accessing expression-backed call
arguments.

`AnyCall` already exposes formal parameters through `parameters()`,
`param_begin()`, `param_end()`, `param_size()`, and `param_empty()`.
This adds the corresponding argument-side helpers:

- `arguments()`
- `arg_begin()`
- `arg_end()`
- `arg_size()`
- `arg_empty()`
- `getArg()`

This lets clients reuse `AnyCall` for callee/argument inspection instead
of
open-coding argument extraction.

Prequel PR to #206337
DeltaFile
+256-0clang/unittests/Analysis/AnyCallTest.cpp
+37-0clang/include/clang/Analysis/AnyCall.h
+1-0clang/unittests/Analysis/CMakeLists.txt
+294-03 files

LLVM/project bcddf2allvm/test/Transforms/SLPVectorizer/X86 reduction-fadd-reassoc.ll

[SLP][NFC]Add some extra tests for reductions, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/213257
DeltaFile
+142-0llvm/test/Transforms/SLPVectorizer/X86/reduction-fadd-reassoc.ll
+142-01 files

LLVM/project 39f7ff3llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp SelectionDAG.cpp, llvm/lib/Target/ARM ARMISelLowering.cpp

DAG: Use poison for some load/store offsets in legalizer

Unindexed load/store offsets are a don't-care operand that must be poison
rather than undef now that poison is legal. Convert the remaining producers
that build the offset with getUNDEF (in SelectionDAGBuilder and the ARM,
Hexagon, RISCV, and X86 lowerings) to getPOISON, and strengthen the offset
asserts in the SelectionDAG memory-node builders to require POISON exactly
instead of accepting any undef-or-poison value.

Co-Authored-By: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+25-14llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+6-7llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+4-4llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+3-3llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
+2-2llvm/lib/Target/ARM/ARMISelLowering.cpp
+1-1llvm/lib/Target/X86/X86ISelLowering.cpp
+41-316 files

LLVM/project d27d924llvm/lib/Target/AMDGPU AMDGPUSwLowerLDS.cpp

[AMDGPU] Lower LDS flat round trips without provenance analysis
DeltaFile
+42-151llvm/lib/Target/AMDGPU/AMDGPUSwLowerLDS.cpp
+42-1511 files

LLVM/project 3a809f6libcxx/test/libcxx clang_tidy.sh.py, libcxxabi .clang-tidy

[libc++abi] Add a clang-tidy config and test (#207324)

This essentially copies the `.clang-tidy` file from libc++ into
libc++abi, except that the naming conventions are updated to not add
underscores and some checks are disabled that don't pass currently. They
will be fixed in follow-ups.
DeltaFile
+55-0libcxxabi/.clang-tidy
+3-2libcxx/test/libcxx/clang_tidy.sh.py
+58-22 files

LLVM/project e147e5blibcxx/include/__atomic clear_padding.h

[libc++] Simplify clear_padding.h a bit (#212426)
DeltaFile
+10-23libcxx/include/__atomic/clear_padding.h
+10-231 files

LLVM/project 090b656libcxx/include/__memory array_cookie.h unique_ptr.h, libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers assert.subscript.pass.cpp

[libc++] Make __has_array_cookie a variable template (#212767)

Using variable templates is slightly faster to compile and more
readable, so we might as well use them.
DeltaFile
+3-5libcxx/include/__memory/array_cookie.h
+4-4libcxx/include/__memory/unique_ptr.h
+2-2libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.observers/assert.subscript.pass.cpp
+9-113 files

LLVM/project 5aec353llvm/test/CodeGen/PowerPC copysignl.ll

[NFC][PowerPC] add more `copysign` tests (#213236)
DeltaFile
+433-110llvm/test/CodeGen/PowerPC/copysignl.ll
+433-1101 files

LLVM/project 69fb339clang/test/SemaOpenCL builtins-amdgcn-image-bvh-intersect-ray-err.cl, llvm/lib/Target/AMDGPU AMDGPU.td

AMDGPU: Do not give gfx12.5 bvh-ray-tracing-insts

bvh-ray-tracing-insts was listed in the FeatureGFX12 generation, so
gfx1250/gfx1251/gfx12-5-generic inherited it even though they have no BVH.
Move the feature out of the common base and into FeatureISAVersion12, which
This stops clang from wrongly accepting __builtin_amdgcn_image_bvh_intersect_ray*
on gfx1250.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+15-0clang/test/SemaOpenCL/builtins-amdgcn-image-bvh-intersect-ray-err.cl
+2-1llvm/lib/Target/AMDGPU/AMDGPU.td
+2-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.intersect_ray.ll
+1-0llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.intersect_ray.ll
+20-14 files

LLVM/project 6ebd9e1llvm/include/llvm/ExecutionEngine/Orc/RTBridge Calls.h, llvm/include/llvm/ExecutionEngine/Orc/RTBridge/SPS Calls.h

[ORC] Add VoidVoid and IntVoid Callers, with tests. (#213211)

Add rt::VoidVoidCaller (void()) and rt::IntVoidCaller (int64_t())
runtime-agnostic interfaces and their rt::sps implementations, targeting
the orc_rt_ci_sps_call_void_void and orc_rt_ci_sps_call_int_void
controller-interface wrappers. Both are experimental and may be removed.

Extend SPSCallersTest to cover the new callers. VoidVoidCaller is the
first caller instantiated with a void result type, which exposed a
latent bug in sps::Caller::callAsync: its result handler declared a
CalleeRetT parameter, ill-formed when CalleeRetT is void. It now
special-cases void via `if constexpr`.
DeltaFile
+114-0llvm/unittests/ExecutionEngine/Orc/SPSCallersTest.cpp
+44-10llvm/include/llvm/ExecutionEngine/Orc/RTBridge/SPS/Calls.h
+23-0llvm/include/llvm/ExecutionEngine/Orc/RTBridge/Calls.h
+181-103 files

LLVM/project b7f90a0clang/test/CodeGen/AArch64 ptrauth-function-attributes-synthetic.c, llvm/test/Instrumentation/AddressSanitizer ptrauth-module-flags-aarch64.ll

Address review comments
DeltaFile
+54-4llvm/test/Instrumentation/AddressSanitizer/ptrauth-module-flags-aarch64.ll
+32-20clang/test/CodeGen/AArch64/ptrauth-function-attributes-synthetic.c
+37-0llvm/test/Transforms/GCOVProfiling/ptrauth-module-flags-aarch64.ll
+123-243 files

LLVM/project 8db13dellvm/lib/Transforms/Vectorize VPlanPatternMatch.h VPlanTransforms.cpp

[VPlan] Remove redundant x && (y && x) -> x && y combine (#213219)

It can be subsumed by making the combine above commutative. In theory
this isn't NFC as it changes the order, in practice it doesn't make a
difference.
DeltaFile
+4-10llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+5-0llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+9-102 files

LLVM/project 136347bllvm/utils/TableGen/Common CodeGenDAGPatterns.cpp CodeGenDAGPatterns.h

[TableGen] Speed up intrinsic lookups with DenseMap (NFC) (#213198)

Store in DenseMap, avoids linear lookups.
Speeds up NVPTX -gen-dag-isel and -gen-instr-info by 10%.
RISCV shows similar gains.
Neutral or marginally beneficial for other targets.
DeltaFile
+6-8llvm/utils/TableGen/Common/CodeGenDAGPatterns.h
+4-0llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp
+10-82 files

LLVM/project 09d8e6dclang/test/CodeGenOpenCL builtins-amdgcn-gfx13.cl, llvm/lib/TargetParser AMDGPUTargetParser.cpp

AMDGPU: Add missing msad-insts to gfx13 frontend feature map

fillAMDGCNFeatureMap omitted msad-insts for gfx1310/gfx13-generic, so
clang wrongly rejected __builtin_amdgcn_msad_u8 on those targets even
though the backend enables the feature (FeatureGFX9 generation, inherited
through FeatureGFX13). Add it to the gfx13 case.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+23-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx13.cl
+9-4llvm/test/CodeGen/AMDGPU/llvm.amdgcn.msad.u8.ll
+1-0llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+33-43 files

LLVM/project 81f89bbllvm/lib/Target/AArch64 AArch64SVEInstrInfo.td, llvm/test/CodeGen/AArch64 vector-absolute-difference.ll sve-partial-reduce-dot-product.ll

[LLVM][CodeGen][SVE] Use pairwise instruction for partial_reduce_[s/u]mla. (#212772)
DeltaFile
+22-24llvm/test/CodeGen/AArch64/sve-partial-reduce-wide-add.ll
+14-13llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
+5-8llvm/test/CodeGen/AArch64/sve-partial-reduce-dot-product.ll
+4-4llvm/test/CodeGen/AArch64/vector-absolute-difference.ll
+45-494 files

LLVM/project ea56c33llvm/test/CodeGen/AMDGPU buffer-fat-pointer-atomicrmw-fmax.ll buffer-fat-pointer-atomicrmw-fadd.ll

[MachineLICM] Use `RegisterClassInfo::getRegPressureSetLimit` (#211715)

This recommits #119826, which taught `MachineLICM` to use
`RegisterClassInfo` when computing register pressure limits so
reserved registers are accounted for (#118787).

The original change was reverted by eeac0ff because it increased
compile time by causing repeated `RegisterClassInfo` computations.

This PR is based on #210826, in which `MachineRegisterClassInfo`
analysis pass was added. `MachineRegisterClassInfo` is required
by `MachineLICM` now, but the intervening machine passes that do
not affect `RegisterClassInfo` now preserve it, so the analysis
is reused instead of recomputed.

Assisted-by: TRAE CLI (GPT-5.5)
DeltaFile
+3,809-3,814llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmin.ll
+3,809-3,814llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmax.ll
+3,465-3,511llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmin.ll
+3,465-3,511llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmax.ll
+3,299-3,240llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fadd.ll
+2,594-2,524llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmax.ll
+20,441-20,41468 files not shown
+47,110-46,02774 files

LLVM/project 81a8451llvm/lib/Target/Mips MipsCallingConv.td MipsRegisterInfo.cpp, llvm/test/CodeGen/Mips write_register_gp.ll

[Mips] Fix $gp was restored when used as global register variable (#201778)

The function `eliminateDeadMI` would check `if (MRI.isReserved(Reg))`,
now we only set GP to reserved when `!Subtarget.isABICalls()`. So
`eliminateDeadMI` delete the `move $gp, $4`. And we would restore $gp
after instr selection through `$gp_64 = LD $sp_64, 8`.

Check the module metadata `llvm.named.register.$28` to detect if $28 is
used as global register. Then append new conditon when set $gp to
reserverd status and return CalleeSavedRegs without $gp.

Fix #176546.
DeltaFile
+31-0llvm/test/CodeGen/Mips/write_register_gp.ll
+17-5llvm/lib/Target/Mips/MipsRegisterInfo.cpp
+13-0llvm/lib/Target/Mips/MipsCallingConv.td
+61-53 files

LLVM/project 275365fllvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-merge-values.mir fp-int-conversions.ll

GlobalISel: Fix lowerMergeValues when dst type is float (#212795)

Lowering is done in the integer domain. Similar to the type
mismatch when dst is a pointer, make a bitcast when dst is float.
DeltaFile
+37-0llvm/test/CodeGen/AMDGPU/GlobalISel/fp-int-conversions.ll
+28-0llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-merge-values.mir
+2-0llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+67-03 files

LLVM/project dcce9declang/test/CodeGenCXX dynamic-cast-address-space.cpp, clang/test/CodeGenOpenCL builtins-amdgcn-gfx13.cl

AMDGPU: Give v_cvt_sr_pk_bf16_f32 its own subtarget feature (#213150)

v_cvt_sr_pk_bf16_f32 was gated on bf16-cvt-insts, but that feature is
also present on gfx950 where the (non-sr) v_cvt_pk_bf16_f32 was first
added. The stochastic-rounding v_cvt_sr_pk_bf16_f32 was only added
for gfx1250 and has no gfx950 encoding, so it would mis-select and
later hit the "Invalid opcode" assert. Introduce
cvt-sr-pk-bf16-f32-inst, currently added to gfx13 and 125*

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+25-0clang/test/CodeGenOpenCL/builtins-amdgcn-gfx13.cl
+12-0clang/test/SemaOpenCL/builtins-amdgcn-cvt-sr-pk-bf16-f32-err.cl
+8-0llvm/test/MC/AMDGPU/gfx950-unsupported.s
+6-0llvm/lib/Target/AMDGPU/AMDGPU.td
+4-1llvm/lib/Target/AMDGPU/VOP3Instructions.td
+2-2clang/test/CodeGenCXX/dynamic-cast-address-space.cpp
+57-35 files not shown
+65-611 files