LLVM/project 2618135clang/lib/Driver/ToolChains HIPAMD.cpp, clang/test/Driver hip-profile-rocm-runtime.hip

[HIP] Link profile runtime in device-only lld path (#211675)

HIP device-only code object links can use the direct lld path in
HIPAMD.cpp. That path did not add the profile runtime, so device-only
builds with profile generation missed `libclang_rt.profile.a`.

This patch adds the normal profile runtime handling to that linker path
and covers it with a driver test.
DeltaFile
+10-3clang/test/Driver/hip-profile-rocm-runtime.hip
+1-0clang/lib/Driver/ToolChains/HIPAMD.cpp
+11-32 files

LLVM/project ecbd52cllvm/lib/Target/RISCV RISCVVectorPeephole.cpp

RISCV: Fix using getVRegDef on a physical register

This was looking through a VL operand to find a materialized
ADDI $x0, imm. The VL register can be physical, so avoid calling
getVRegDef.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+2-0llvm/lib/Target/RISCV/RISCVVectorPeephole.cpp
+2-01 files

LLVM/project 9da823clibsycl/unittests CMakeLists.txt, libsycl/unittests/mock CMakeLists.txt

[libsycl][unit][CMake] Fix unittests gtest CMake target (#216344)

This was exposed by my recent change moving the `gtest` unit tests to be
called by `lit` (but still using `gtest`) but it seems the problem was
technically there before.

We need to use a special gtest target for the runtime build. Luckily
LLVM infra provides a cmake target we can depend on that will just make
it work. More info
[here](https://github.com/llvm/llvm-project/blob/ec26997e2e4606d97918a4a082c4f93ca38a6f46/third-party/unittest/CMakeLists.txt#L25)
if interested.

Other runtimes do the same thing, see
[here](https://github.com/llvm/llvm-project/blob/828d2d7fb65a9cd5946b347ad5173e3bdb21387d/openmp/tools/omptest/CMakeLists.txt#L88)
for example.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply at anthropic.com>
DeltaFile
+3-3libsycl/unittests/mock/CMakeLists.txt
+3-0libsycl/unittests/CMakeLists.txt
+6-32 files

LLVM/project 975eae3llvm/lib/TargetParser AMDGPUTargetParser.cpp

Hackily filter out features from the reported string map
DeltaFile
+11-2llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+11-21 files

LLVM/project 63820d6clang/lib/CodeGen CodeGenModule.cpp, clang/test/CodeGen amdgpu-builtin-processor-is.c amdgpu-builtin-is-invocable.c

clang/AMDGPU: Don't emit target-features on AMDGCN-flavored SPIR-V

The spirv64-amd-amdhsa target unions every GPU's features in its feature
map so it can report builtins as available. The CodeGen doesn't have
any use of the target-features. Putting it into the IR just results
in an annoying to update test every time a new feature is added. The
ultimate SPIRV codegen doesn't do anything with it, and if it did
survive to AMDGPU codegen, it would be actively harmful.

This isn't an ideal solution. The target-features spam is also
noisy and useless in the AMDGPU case, but solving that is more
intricate because we do currently rely on this for some features,
most notably the wavesize.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+5-0clang/lib/CodeGen/CodeGenModule.cpp
+2-2clang/test/CodeGenCXX/dynamic-cast-address-space.cpp
+1-1clang/test/CodeGen/amdgpu-builtin-processor-is.c
+1-1clang/test/CodeGen/amdgpu-builtin-is-invocable.c
+9-44 files

LLVM/project 4eade09llvm/lib/CodeGen MachineSink.cpp, llvm/test/CodeGen/X86 machinesink-coalesce-undef.mir

CodeGen: Fix machine sink critical edge crash on an undef register

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+59-0llvm/test/CodeGen/X86/machinesink-coalesce-undef.mir
+1-2llvm/lib/CodeGen/MachineSink.cpp
+60-22 files

LLVM/project 6475dabllvm/lib/CodeGen MachineSink.cpp, llvm/test/CodeGen/X86 machinesink-coalesce-undef.mir

CodeGen: Fix MachineSink trivial coalescing crash on an undef register

PerformTrivialForwardCoalescing dereferences getVRegDef() for a copy's
source register without a null check. A source register defined only by an
undef use has no defining instruction, so coalescing a copy from it crashes.
Bail out when there is no defining instruction.

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+39-0llvm/test/CodeGen/X86/machinesink-coalesce-undef.mir
+1-1llvm/lib/CodeGen/MachineSink.cpp
+40-12 files

LLVM/project 0db9ccaclang/lib/Basic/Targets AMDGPU.h AMDGPU.cpp, clang/lib/Driver/ToolChains CommonArgs.cpp AMDGPU.cpp

clang/AMDGPU: Use feature bitset instead of ArchAttr

Convert from the legacy getArchAttrAMDGCN manual bitmask checks to using
the new generated bitset. These are the easy cases. sramecc and xnack
require more supporting work so will be done later.

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+11-9clang/lib/Driver/ToolChains/AMDGPU.cpp
+6-2clang/lib/Basic/Targets/AMDGPU.cpp
+4-2clang/lib/Basic/Targets/AMDGPU.h
+2-2clang/lib/Driver/ToolChains/CommonArgs.cpp
+2-1llvm/lib/Target/AMDGPU/AMDGPU.td
+25-165 files

LLVM/project 382a136clang/docs/analyzer checkers.rst, clang/include/clang/StaticAnalyzer/Checkers Checkers.td

[analyzer] Move the LifetimeModeling and DanglingPtrDeref checkers to alpha.core
DeltaFile
+56-56clang/docs/analyzer/checkers.rst
+10-10clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+1-1clang/test/Analysis/dangling-ptr-deref.cpp
+67-673 files

LLVM/project 4f1066bllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 cancelled-copyable-element-deps.ll

[SLP]Recalculate cleared deps for all cancelled copyable elements

Deps of a cancelled copyable element were recalculated only for
control-dependency nodes; a speculatable one stayed unschedulable and
deadlocked the final scheduling. Recalculate unconditionally.

Fixes #216544

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/216734
DeltaFile
+111-0llvm/test/Transforms/SLPVectorizer/X86/cancelled-copyable-element-deps.ll
+1-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+112-32 files

LLVM/project f790162llvm/lib/Target/NVPTX NVPTXPeephole.cpp

NVPTX: Fix using getVRegDef on a physical register

This was calling getVRegDef on the frame register; change to
getOneDef instead. This still seems like a dubious way to deal
with any kind of frame setup optimization though.

Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
DeltaFile
+2-2llvm/lib/Target/NVPTX/NVPTXPeephole.cpp
+2-21 files

LLVM/project 8a36589mlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/lib/Dialect/LLVMIR/IR NVVMDialect.cpp

[MLIR][NVVM] Spell strict assembly properties directly

Bind every NVVM inherent property in its operation assembly format and
re-enable strict property parsing for the dialect. Use direct named clauses
for declarative formats and custom MMA parsers while retaining dictionaries
for discardable attributes.

Assisted-by: Codex
DeltaFile
+619-5mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+355-158mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+144-144mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-tensor.mlir
+144-144mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-sp-tensor.mlir
+128-128mlir/test/Target/LLVMIR/nvvm/tma_store_reduce.mlir
+29-203mlir/test/Target/LLVMIR/nvvm/mma-sparse-blockscale.mlir
+1,419-782112 files not shown
+3,741-4,049118 files

LLVM/project 4e34ee9mlir/include/mlir/Dialect/LLVMIR NVVMOps.td, mlir/test/Target/LLVMIR/nvvm tcgen05-mma-sp-shared.mlir tma_load_cluster_im2col.mlir

[MLIR][NVVM] Enable strict property assembly format

Enable strict property assembly format mode for the NVVM dialect and update
custom assembly formats to expose property dictionaries explicitly.

Refresh NVVM tests so inherent operation properties are printed and parsed
through the property dictionary while non-property attributes remain in the
attribute dictionary.

Assisted-by: Codex
DeltaFile
+144-144mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-tensor.mlir
+144-144mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-sp-tensor.mlir
+128-128mlir/test/Target/LLVMIR/nvvm/tma_store_reduce.mlir
+108-108mlir/test/Target/LLVMIR/nvvm/tma_load_cluster_im2col.mlir
+107-107mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+96-96mlir/test/Target/LLVMIR/nvvm/tcgen05-mma-sp-shared.mlir
+727-72773 files not shown
+2,262-2,26279 files

LLVM/project acf9ee4utils/bazel/llvm-project-overlay/mlir/test BUILD.bazel

[bazel:mlir] Fix build after c8a0460. (#216719)

Signed-off-by: Ingo Müller <ingomueller at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+1-01 files

LLVM/project 00a37ebllvm/lib/Transforms/Vectorize VPlanHelpers.h LoopVectorize.cpp

Remove helper
DeltaFile
+0-5llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+0-4llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+0-92 files

LLVM/project 21ea0e6clang/test/Analysis dangling-ptr-deref.cpp

Correct RUN lines for the DanglingPtrDeref test suite.
DeltaFile
+1-1clang/test/Analysis/dangling-ptr-deref.cpp
+1-11 files

LLVM/project ca599aallvm/test/CodeGen/AArch64 hoist-and-by-const-from-lshr-in-eqcmp-zero.ll cmtst-select-pow2-mask.ll

[AArch64] Fold vector select with power-of-2 bit-test to CMTST+BSP (#209100)

Fixes: #107088

* A vector select whose condition is (X & Mask) == Mask, where Mask is a
power-of-2 constant splat, was generating suboptimal code: AND + CMEQ +
BIF instead of CMTST + BIF.
 
* This happens because the condition is canonicalized to (X & Mask) ==
0, and AArch64 was not folding the resulting SETCC(AND(X, Mask), 0,
SETEQ) into a CMTST based mask.
 
* This patch adds a SelectionDAG fold in AArch64ISelLowering.cpp to
lower vector SETCC(AND(X, Mask), 0, SETEQ) to an inverted
AArch64ISD::CMTST. The existing bitselect lowering can then absorb the
inversion and emit CMTST.
 
Note: Test cases were derived from those reported by the original
author.
DeltaFile
+424-481llvm/test/CodeGen/AArch64/select-bitcast.ll
+127-127llvm/test/CodeGen/AArch64/vector-popcnt-128-ult-ugt.ll
+70-28llvm/test/CodeGen/AArch64/neon-compare-instructions.ll
+57-29llvm/test/CodeGen/AArch64/hoist-and-by-const-from-shl-in-eqcmp-zero.ll
+55-0llvm/test/CodeGen/AArch64/cmtst-select-pow2-mask.ll
+29-18llvm/test/CodeGen/AArch64/hoist-and-by-const-from-lshr-in-eqcmp-zero.ll
+762-6836 files not shown
+810-70512 files

LLVM/project 1158032clang/docs/analyzer checkers.rst

Add cleaner explanation on cfg lifetime ends.
DeltaFile
+4-3clang/docs/analyzer/checkers.rst
+4-31 files

LLVM/project d2bd020.github/workflows release-binaries.yml, clang/cmake/caches Release.cmake

Revert "workflows/release-binaries: Disable flang on Darwin (#164667)" (#216667)

This reverts commit 6d54a5e5b83ce3502b7a3488fea5afe1c8bf9c5c.

Flang Darwin builds were reverted due to #160546. That issue has not
been reproducible (at least on my machine) for several months. There was
a request for MacOS builds on the most recent flang community call.

Flang is not enabled in the MacOS pre-commit CI.

Closes #160546
DeltaFile
+2-8clang/cmake/caches/Release.cmake
+7-0.github/workflows/release-binaries.yml
+9-82 files

LLVM/project 1d887d2clang/docs/analyzer checkers.rst

Move the DanglingPtrDeref checker to alpha.cplusplus.
DeltaFile
+55-55clang/docs/analyzer/checkers.rst
+55-551 files

LLVM/project 89ad6f5lldb/test/API/functionalities/breakpoint/hardware_breakpoints/write_memory_with_hw_breakpoint TestWriteMemoryWithHWBreakpoint.py

[lldb][test] Fix skip in TestWriteMemoryWithHWBreakpoint.py (#216723)

In a87b27fd5161ec43527fc3356852046a321ea82c, the opposite
skip was put in. It should skip if hardware breakpoints are 
*not* supported.

Also that commit added a stray "skip". I have removed that and
fixed the incorrect variable name.
DeltaFile
+2-3lldb/test/API/functionalities/breakpoint/hardware_breakpoints/write_memory_with_hw_breakpoint/TestWriteMemoryWithHWBreakpoint.py
+2-31 files

LLVM/project 25a2d75llvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/lib/Target/AMDGPU AMDGPUInstructionSelector.cpp

AMDGPU: Use mi_match for more manual selector patterns

Use mi_match G_SHUFFLE_VECTOR/G_FRAME_INDEX/G_SUB checks. Add new
matchers to check the shufflevector and frame index cases, avoiding
raw getVRegDef uses.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+44-0llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+14-21llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
+58-212 files

LLVM/project d41f833llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 scalar-minmax-simd.ll

[X86] Fold scalar ABS_MIN_POISON store of a load to PABS (#216697)

Extend the scalar load→abs→store SIMD fold from #210654 to `ISD::ABS_MIN_POISON` (`llvm.abs(..., i1 true)`).

That form was left on `neg`+`cmov` while `llvm.abs(..., i1 false)` already
used `PABS`. Vector `PABS` is `ISD::ABS`; `PABS(INT_MIN)` is `INT_MIN`,
which is a valid refinement of poison.
DeltaFile
+205-0llvm/test/CodeGen/X86/scalar-minmax-simd.ll
+5-2llvm/lib/Target/X86/X86ISelLowering.cpp
+210-22 files

LLVM/project 0ad17fcclang/include/clang/StaticAnalyzer/Checkers Checkers.td

Revert move to alpha.core.
DeltaFile
+10-10clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+10-101 files

LLVM/project 9724b4fllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 wide-store.ll recalc-copyable-node.ll

[SLP] Check the fmul's own flags in canConvertToFMA (#216599)

CheckForContractable ran the operand bundle through the fadd's
InstructionsState, so every fmul in it failed the main/alt op test and
was skipped. The flags stayed set and allowContract was trivially true,
which priced a plain fmul feeding a contract fadd as if it would fuse.
The backend will not do that. Give the lambda the state to assess
against and pass the fmul's own.

Assisted-by: Claude Code Opus 5
DeltaFile
+265-0llvm/test/Transforms/SLPVectorizer/AMDGPU/fma-operand-contract-selection.ll
+56-68llvm/test/Transforms/SLPVectorizer/AArch64/recalc-copyable-deps-on-reorder.ll
+28-33llvm/test/Transforms/SLPVectorizer/AArch64/recalc-copyable-node.ll
+10-16llvm/test/Transforms/SLPVectorizer/X86/dot-product.ll
+9-7llvm/test/Transforms/SLPVectorizer/AArch64/wide-store.ll
+4-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+372-1276 files

LLVM/project 4afd874llvm/lib/CodeGen/GlobalISel GISelValueTracking.cpp, llvm/test/CodeGen/AArch64 extract-subvec-combine.ll

[GlobalISel] Add G_EXTRACT_SUBVECTOR to computeKnownBits (#214533)

Port the SDAG EXTRACT_SUBVECTOR computeKnownBits handling to GlobalISel.
Offsets the demanded elements by the subvector index to propagate known
bits from the source vector to the extracted subvector.

Part of #150515.
DeltaFile
+90-0llvm/test/CodeGen/AArch64/GlobalISel/knownbits-extract-subvector.mir
+10-25llvm/test/CodeGen/AArch64/extract-subvec-combine.ll
+14-0llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+114-253 files

LLVM/project b3915e5llvm/lib/Target/AMDGPU SIInstrInfo.cpp, llvm/test/CodeGen/AMDGPU machine-sink-temporal-divergence-swdev407790.mir

AMDGPU: Fix machine sink crash on an undef SGPR operand

isSafeToSink dereferenced the defining instruction of an
SGPR use without checking for a null def, which crashes on
an undef operand that has no defining instruction.

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+61-0llvm/test/CodeGen/AMDGPU/machine-sink-temporal-divergence-swdev407790.mir
+2-0llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+63-02 files

LLVM/project 799f4c7mlir/lib/Conversion/ComplexToSPIRV ComplexToSPIRV.cpp, mlir/test/Conversion/ComplexToSPIRV complex-to-spirv.mlir

[mlir][SPIR-V] Add ComplexToSPIRV lowering for complex.angle (#214172)

Lower complex.angle to spirv.GL.Atan2/spirv.CL.Atan2 on the real and
imaginary components, following the existing complex.abs pattern
DeltaFile
+39-12mlir/lib/Conversion/ComplexToSPIRV/ComplexToSPIRV.cpp
+31-0mlir/test/Conversion/ComplexToSPIRV/complex-to-spirv.mlir
+70-122 files

LLVM/project aa31927llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-line-loop.ll debug-line-loop-merge.ll

[reviews] Fix emission for OpPhi, OpSelectionMerge, OpLoopMerge, OpLoopControlINTEL.
DeltaFile
+96-0llvm/test/CodeGen/SPIRV/debug-info/debug-line-selection-merge.ll
+73-0llvm/test/CodeGen/SPIRV/debug-info/debug-line-if-phi.ll
+67-0llvm/test/CodeGen/SPIRV/debug-info/debug-line-loop-control-intel.ll
+66-0llvm/test/CodeGen/SPIRV/debug-info/debug-line-loop-merge.ll
+58-0llvm/test/CodeGen/SPIRV/debug-info/debug-line-loop.ll
+33-0llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+393-06 files

LLVM/project c14ba73libcxx/include/__functional function.h, libcxx/test/extensions/libcxx/utilities/function.objects/func.wrap/func.wrap.func rtti_mixing.assert.sh.cpp

[libc++] Define behaviour for calling target() and target_type() on -fno-rtti std::functions (#209471)

The main aim of this change is to have the same vtable between
`-fno-rtti` and `-frtti`. Since it's very cheap to do, this also asserts
if the `function` object was created in `-fno-rtti` mode.

The vtable can be extended, since the members are either never accessed
in `-fno-rtti` mode, or are already expected to exist in `-frtti` mode.
This means that we either define behaviour that wasn't before, or we add
some extra bytes that are never accessed.
DeltaFile
+40-0libcxx/test/extensions/libcxx/utilities/function.objects/func.wrap/func.wrap.func/rtti_mixing.assert.sh.cpp
+19-6libcxx/include/__functional/function.h
+59-62 files