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

LLVM/project 23e50b1llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 early-ifcvt-same-value.mir

AArch64: Fix csel-fold crash on an undef register

removeCopies and canFoldIntoCSel dereference getVRegDef() while checking
whether a select operand can be folded into a csel during early
if-conversion.

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+40-0llvm/test/CodeGen/AArch64/early-ifcvt-same-value.mir
+3-1llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+43-12 files

LLVM/project 55e2755clang/lib/CIR/CodeGen CIRGenFunction.cpp CIRGenModule.h, clang/test/CIR/CodeGenOpenCL kernel-arg-metadata.cl kernel-arg-info-single-as.cl

[CIR][OpenCL] Attach kernel argument metadata to CIR functions (#200581)

Emit the CIR OpenCL kernel argument metadata attribute for kernel
functions. Preserve CIR language address-space kinds until lowering and
include argument names only when `-cl-kernel-arg-info` is enabled.
DeltaFile
+152-0clang/test/CIR/CodeGenOpenCL/kernel-arg-info.cl
+113-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+28-0clang/test/CIR/CodeGenOpenCL/kernel-arg-info-single-as.cl
+12-0clang/test/CIR/CodeGenOpenCL/kernel-arg-metadata.cl
+4-0clang/lib/CIR/CodeGen/CIRGenModule.h
+3-0clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+312-06 files

LLVM/project 7baba22llvm/docs LangRef.md, llvm/lib/AsmParser LLParser.cpp

[IR] Add elementwise modifier to atomic stores (#210672)

Add an elementwise modifier to atomic stores to represent
per-element atomic semantics for fixed-vector stores.

Without the modifier, a vector atomic store remains a whole-value
atomic operation. With elementwise, the store behaves as if it were
expanded into one scalar atomic load per fixed-vector element, without
providing atomicity for the vector value as a whole.

Discussion:
https://discourse.llvm.org/t/rfc-add-elementwise-modifier-to-atomic-loads-and-stores/91100
DeltaFile
+111-0llvm/unittests/IR/VerifierTest.cpp
+56-0llvm/test/Assembler/invalid-load-store-atomic-elementwise.ll
+25-16llvm/docs/LangRef.md
+26-4llvm/lib/AsmParser/LLParser.cpp
+12-8llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+20-0llvm/test/Transforms/MergeFunc/atomic-elementwise.ll
+250-2814 files not shown
+349-3920 files

LLVM/project 3f93f77llvm/include/llvm/CodeGen/GlobalISel MIPatternMatch.h, llvm/lib/CodeGen/GlobalISel CombinerHelper.cpp

GlobalISel: Match loads by pointer operand in CombinerHelper (#216672)

Add a load matcher that binds the pointer operand (like IR's m_Load),
with optional outputs for the load instruction and its MachineMemOperand 
via m_MMO. Use it to replace the getVRegDef + dyn_cast idiom in the load 
combines.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+59-0llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
+18-20llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
+77-202 files

LLVM/project 0bfa753llvm/lib/Target/PowerPC PPCVSXSwapRemoval.cpp, llvm/test/CodeGen/PowerPC vsx-swap-removal-undef.mir

PowerPC: Fix VSX swap removal crash on an undef register

formWebs walks each vector-register use and unions its equivalence class
with that of its defining instruction, which it requires to be present in
the swap map. A use of an undef register has no defining instruction, so the
web formation crashed. Treat it like a physical-register mention so the web
is conservatively rejected.

Found by AI while working on something else.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+21-0llvm/test/CodeGen/PowerPC/vsx-swap-removal-undef.mir
+6-1llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp
+27-12 files

LLVM/project 797a057lldb/include/lldb/Target Memory.h, lldb/packages/Python/lldbsuite/test gdbclientutils.py

[lldb] Serve MemoryCache::ReadRanges from the L2 cache as well as L1 (#216318)

`MemoryCache::Read` fetches a whole L2 cache line for any read that fits
in one,
so reading a few bytes caches the line around them. `ReadRanges` probed
only L1,
and re-fetched ranges that line already held. Callers hit this whenever
they
read an array's header and then batch the elements that follow it in the
same
line, as `AppleObjCRuntimeV2::SharedCacheImageHeaders` and
`ClassDescriptorV2::method_list_t` both do.  #201166 uses MemoryCache in
`Process::ReadRangesFromMemory`, but I didn't see why is L1 used only.

Add `FindL2CacheEntry`, a lookup that never reads from the inferior, and
consult
it after L1. When it serves every range in a batch, `ReadRanges` returns
without
calling `Process::DoReadMemoryRanges`, so no packet is sent. As in the

    [15 lines not shown]
DeltaFile
+111-0lldb/unittests/Target/MemoryTest.cpp
+31-2lldb/test/API/lang/objc/foundation/TestObjCMethodsNSError.py
+25-3lldb/source/Target/Memory.cpp
+27-0lldb/packages/Python/lldbsuite/test/gdbclientutils.py
+14-3lldb/include/lldb/Target/Memory.h
+208-85 files

LLVM/project e8802eflibc/test/UnitTest LibcTest.h CMakeLists.txt

[libc][test] Condition out tests that can't work on bare metal (#215830)

In bare-metal builds of libc, the `EXPECT_DEATH` macro may not be
defined. Also, `signal-macros.h` may not define the values needed for
the rest of `<signal.h>` to work. So tests that rely on either of those
things will fail to compile.

I've conditioned out the `EXPECT_DEATH` tests completely if
`EXPECT_DEATH` isn't defined. There's inherently no reliable way to
define it: you can't rely on finding out about segmentation faults by a
signal, because accessing memory outside valid C objects might silently
succeed (valid unused memory), or generate a CPU fault that no kernel
traps for you, or overwrite something important outside your program.

The check for signals in `FPExceptMatcher.cpp` can be more lenient, and
just condition out the signal-handling code, leaving the test of
cumulative FP exception flags in place, so that the checker simply
returns "no signal was caught" unconditionally.
DeltaFile
+13-4libc/test/UnitTest/FPExceptMatcher.cpp
+16-0libc/test/UnitTest/CMakeLists.txt
+8-0libc/test/UnitTest/LibcTest.h
+37-43 files

LLVM/project e98256cclang/lib/Format UnwrappedLineFormatter.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Fix short functions with nested braced-init (#213550)

Fixes #213286.

Keep short functions on one line when their return statement contains
nested braced initializers.

The closing brace now checks the kind of its matching opening brace, so
braced-init lists are allowed while structural
  braces still prevent merging.

  Tests:
  - `FormatTest.CustomShortFunctionOptions`
  - `FormatTest.AllowShortRecordOnASingleLine`
  - full `FormatTests` suite (1275 passed)

Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004 at gmail.com>
DeltaFile
+8-4clang/lib/Format/UnwrappedLineFormatter.cpp
+1-0clang/unittests/Format/FormatTest.cpp
+9-42 files

LLVM/project 87d8872flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP sections.f90

[flang][OpenMP] Do not emit barrier after SECTIONS with LASTPRIVATE and NOWAIT (#216018)

Fixes #192907

Flang inserted an explicit omp.barrier after SECTIONS when both
lastprivate and nowait were present, which serialized all threads at the
end of the construct and prevented nowait from taking effect.

Limit the barrier to lastprivate(conditional:) cases, where reduction
results must be finalized before the post-sections copy-back. Regular
lastprivate + nowait now matches wsloop lowering behavior.
DeltaFile
+3-14flang/lib/Lower/OpenMP/OpenMP.cpp
+1-1flang/test/Lower/OpenMP/sections.f90
+4-152 files