LLVM/project 0a4504b — llvm/lib/Support APFloat.cpp, llvm/test/Assembler float-literals.ll

[APFloat] Ignore non-finite low-order value of ppc_fp128 (#232031)

As per
https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#PREC,
the low-order value is not significant when it is non-finite. See also
https://github.com/llvm/llvm-project/commit/cd9e1a020cf0902e79ae1178cc4b93f5c5ce9381.

This patch respects the spec to avoid assertions and yield correct
toString results.

The test is generated by DeepSeek-V4.1-Flash while fuzzing llubi.

---------

Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
DeltaFile
+8-4llvm/lib/Support/APFloat.cpp
+11-0llvm/unittests/ADT/APFloatTest.cpp
+3-0llvm/test/Assembler/float-literals.ll
+22-43 files

LLVM/project 667be02 — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 gathered-slice-fmuladd.ll

[SLP]Combine fmuladd for the nodes of the gathered slices

The fadd/fsub nodes from the vectorized gathers were never combined with
their fmul operands, while their scalars were costed as fused.
It overestimated the vector cost of such trees.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/232361
DeltaFile
+45-36llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+40-26llvm/test/Transforms/SLPVectorizer/AArch64/gathered-slice-fmuladd.ll
+85-622 files

LLVM/project 481f2e9 — clang/lib/CIR/Dialect/Transforms CMakeLists.txt, clang/tools/cir-opt CMakeLists.txt

[CIR] Extract DynLib build/link fixes from #221291 (#232330)

The review from #221291 finally got me to see that we failed a few
things with Dynlib. This extracts the changes from that review so that
they are separate from the main one, so we can merge that patch with
this on main eventually.
DeltaFile
+3-1clang/lib/CIR/Dialect/Transforms/CMakeLists.txt
+1-1clang/tools/cir-opt/CMakeLists.txt
+4-22 files

LLVM/project 509679c — libc/src/__support/printf_core float_hex_converter.h converter.h, libc/test/src/__support/printf_core converter_test.cpp

[libc] Add support for writing to wchar_t in printf_core/ converter functions. (#230246)

This is part of the ongoing work toward implementing wide-character
printf functions.

* A `CharT` template type parameter is added where appropriate to the
converter functions.
* The converter_test cases are extended to `TYPED_TEST`s covering both
`char` and `wchar_t`.
* Some new test cases are added for character and string conversion.
* As a part of this change `BasicFormatSection<T>` is renamed back to
simply `FormatSection<T>`. (It was renamed in #222988 with
`FormatSection` becoming an alias mainly to keep from changing a lot of
lines in converter_test twice.)

Assisted-by: Automated tooling, human reviewed.
DeltaFile
+379-101libc/test/src/__support/printf_core/converter_test.cpp
+104-96libc/src/__support/printf_core/float_dec_converter.h
+117-18libc/src/__support/printf_core/string_converter.h
+65-56libc/src/__support/printf_core/float_dec_converter_limited.h
+62-50libc/src/__support/printf_core/converter.h
+70-41libc/src/__support/printf_core/float_hex_converter.h
+797-36216 files not shown
+1,101-57122 files

LLVM/project c606e22 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP target-parallel-llvm-device.c target-parallel-llvm-host.c

[CIR][OpenMP] Add support for the OpenMP 'for' directive

This patch adds support for wsloop in ClangIR: the `for` directive and its
combined forms `parallel for` and `target parallel for`. This is lowered to an
omp.wsloop + omp.loop_nest, nested utilizing the existing queue-based
decomposition.

Assisted-by: Cursor / Claude Sonnet 5 High
DeltaFile
+315-68clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+228-0clang/test/CIR/CodeGenOpenMP/for-loop-forms.c
+207-0clang/test/CIR/CodeGenOpenMP/pragma-omp-for.c
+127-0clang/test/CIR/CodeGenOpenMP/target-parallel-for.c
+94-0clang/test/CIR/CodeGenOpenMP/target-parallel-llvm-host.c
+85-0clang/test/CIR/CodeGenOpenMP/target-parallel-llvm-device.c
+1,056-684 files not shown
+1,284-6810 files

LLVM/project ac6a554 — llvm/lib/Target/AArch64 AArch64TargetMachine.cpp AArch64AsmPrinter.cpp, llvm/test/CodeGen/AArch64 windows-trap-unreachable.ll

AArch64: Move the Windows trap after noreturn calls into the AsmPrinter

With Windows unwind info, the unwinder finds the function or funclet
for a frame from its return address, so a call must not be the last
instruction of one.

This was hackily handled by overwriting TrapUnreachable in the
TargetMachine constructor which inserts traps after every
unreachable. X86 handles the same problem by padding calls in the
AsmPrinter, so do the same here: emit a trap only after a noreturn
call that would end a function or funclet. This addresses the FIXME
about eliding the trap when the next instruction is in the same
region, so noreturn calls in the middle of a function no longer get a
trap.

This removes one of the last obstacles to removing ExceptionModel from
TargetOptions.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+86-13llvm/test/CodeGen/AArch64/windows-trap-unreachable.ll
+24-0llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+0-11llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+110-243 files

LLVM/project 25af4bc — llvm/lib/Target/LoongArch LoongArchTargetTransformInfo.cpp, llvm/lib/Target/X86 X86TargetTransformInfo.cpp

[X86][LoongArch]Fix ODR violation in CostKindCosts

Both targets defined a global CostKindCosts with different field
orders. Without inlining, the linker merged the inline operator[],
swapping X86 throughput and latency costs.

Assisted-by: Cursor

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/232356
DeltaFile
+2-0llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+2-0llvm/lib/Target/LoongArch/LoongArchTargetTransformInfo.cpp
+4-02 files

LLVM/project 9a95dd1 — lldb/source/Host/common FileCache.cpp, lldb/unittests/Host CMakeLists.txt FileCacheTest.cpp

[lldb] Let the host platform write to pipes

`Platform::WriteFile` on the host platform could not write to a pipe: it
goes to `FileCache::WriteFile`, which seeks to the offset before
writing, and a pipe refuses the seek with ESPIPE. The offset means
nothing for a pipe, so `FileCache::WriteFile` now writes at the pipe's
end when the seek fails that way.

This is the host-side counterpart of #232045, which does the same for
lldb-server's `vFile:pwrite`. With both, writing to a pipe through a
platform works the same whether the platform is the host or a remote
one. Downstream, NVIDIA's GPU support writes a byte to a pipe in the
debugged process through the target's platform, to ask the CUDA driver
to attach.

The new FileCacheTest opens a named pipe through `FileCache`, writes to
it at a nonzero offset, and reads back exactly the bytes sent. Without
the fix, the write fails with ESPIPE. The test is POSIX-only, since
named pipes are files only there.
DeltaFile
+51-0lldb/unittests/Host/FileCacheTest.cpp
+9-2lldb/source/Host/common/FileCache.cpp
+1-0lldb/unittests/Host/CMakeLists.txt
+61-23 files

LLVM/project d426dcf — lldb/include/lldb/Core Debugger.h, lldb/source/Core Debugger.cpp

[lldb] Fix a statusline deadlock when flushing the process (#231719)

Since #188377, Process::Flush calls Debugger::FlushStatusLine, which
takes the statusline mutex. Process::Flush may run under the target API
mutex, while a statusline redraw holds the statusline mutex and then
waits on the API mutex, resulting in a deadlock.

For example, this happens when a scripted command runs "target modules
load" through SBDebugger::HandleCommand while a progress event redraws
the statusline.

Make FlushStatusLine set an atomic flag instead, and have the next
redraw clear the cached frame under the statusline mutex. This keeps the
stale frame protection without the risk of lock inversion.

rdar://189958732
DeltaFile
+26-0lldb/test/API/functionalities/statusline/statusline_flush.py
+17-0lldb/test/API/functionalities/statusline/TestStatusline.py
+4-8lldb/source/Core/Debugger.cpp
+6-1lldb/include/lldb/Core/Debugger.h
+53-94 files

LLVM/project c18c5d3 — llvm/lib/CAS MappedFileRegionArena.cpp, llvm/lib/Support/Windows Path.inc

[Windows] FlushViewOfFile() for sparse files before unmap (#231823)

The issue has been described here
https://github.com/swiftlang/llvm-project/issues/12605 We have
reproduced this issue on x86_64 too running 2000 processes
simultaneously. It is hard to create a stable test for this patch. The
problem is specific to sparse files on NTFS. There is no problem on
ReFS.

I think using sparse files increases fragmentation and reduces
performance. It might be worth considering moving away from sparse
files.
DeltaFile
+8-0llvm/lib/CAS/MappedFileRegionArena.cpp
+5-0llvm/lib/Support/Windows/Path.inc
+13-02 files

LLVM/project 06ff6b6 — clang/test/CodeGen/AArch64/sve recpe.c

[clang][CIR] Drop tailcallelim from SVE RECPE test (#232076)

Part of https://github.com/llvm/llvm-project/issues/223963.
DeltaFile
+4-4clang/test/CodeGen/AArch64/sve/recpe.c
+4-41 files

LLVM/project 45ab865 — clang/test/CodeGen/AArch64/sve recps.c

[clang][CIR] Add SME RUN line and drop tailcallelim in SVE RECPS test (#232075)

Part of https://github.com/llvm/llvm-project/issues/223963.
DeltaFile
+6-4clang/test/CodeGen/AArch64/sve/recps.c
+6-41 files

LLVM/project bb11efb — flang/lib/Semantics resolve-names.cpp tools.cpp, flang/test/Semantics/OpenMP reduction14.f90 reduction-subtract.f90

[flang][OpenMP] Improve diagnosing invalid operators in DECLARE_REDUCTION

Move the check out of the common MakeNameFromOperator function and
into OmpStructureChecker. Remove the no longer needed SemanticsContext
parameter in MakeNameFromOperator.

This will allow reusing at least some parts of the the name-mangling
code in DECLARE_INDUCTION.
DeltaFile
+44-19flang/lib/Semantics/check-omp-structure.cpp
+3-5flang/lib/Semantics/tools.cpp
+2-2flang/test/Semantics/OpenMP/declare-reduction-bad-operator.f90
+1-2flang/lib/Semantics/resolve-names.cpp
+2-1flang/test/Semantics/OpenMP/reduction14.f90
+2-1flang/test/Semantics/OpenMP/reduction-subtract.f90
+54-307 files not shown
+62-3813 files

LLVM/project 086e612 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp SelectionDAGBuilder.cpp, llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[AArch64] Combine non-extending partial.reduce.fadd into fma (#230120)

Using partial reductions as the default (#228481) results in some
regressions, in particular for imagick from spec2017. The cause in that
case is a lack of combining fmul and fadd into fmla, since the fadd was
still part of the intrinsic at that point.

This PR makes sure that the partial_reduce_fmla ISD node is constructed
with the same flags that the intrinsic had, copies flags to the nodes
generating when expanding during vector op legalization, then performs a
target DAG combine for the FADD_P and FMUL_P AArch64ISD nodes.
DeltaFile
+213-0llvm/test/CodeGen/AArch64/default-partial-reduce.ll
+33-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+7-3llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+5-3llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+258-64 files

LLVM/project 599fb35 — offload/unittests/OffloadAPI/common Properties.hpp

[Offload] Allow 0 to be returned for `MEMORY_CLOCK_RATE` (#232265)

For integrated Intel GPUs, level zero APIs will return 0. It's not easy
to fetch dram's clock rate, so we just accept 0 as valid result of the
test.
DeltaFile
+2-1offload/unittests/OffloadAPI/common/Properties.hpp
+2-11 files

LLVM/project 35f041e — llvm/lib/Target/AMDGPU AMDGPUAttributor.cpp

AMDGPU: Don't look up ConstantData in the constant access cache (#232283)

AAAMDAttributes checks the constant operands of all instructions for
address space casts and LDS globals that need the queue pointer or
flat scratch initialization, looking each of them up in a cache. Skip
the lookup for trivial constants which have no operands.

Instructions spent in amdgpu-attributor:
  rocPRIM test_device_scan, gfx942:          1429M -> 1419M (-0.7%)
  Blender Cycles HIP kernel, gfx1100:        507M -> 506M (-0.2%)
  rocPRIM 16 tests, full LTO, closed world:  5283M -> 5263M (-0.4%)

The effect is magnified with other pending compile time improvements.

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

LLVM/project 04535b8 — flang/include/flang/Semantics openmp-utils.h tools.h, flang/lib/Semantics resolve-names-utils.h resolve-names-utils.cpp

[flang] Move reduction name mangling code to Semantics/tools

Gather all the mangling/demangling code in one place.

Also remove MangledIntrinsicOperatorReductionName that was only there
to expose MakeNameFromOperator, whose declaration was not in include/.

One remaining issue is emitting a diagnostic specific to DECLARE
REDUCTION in MakeNameFromOperator.
DeltaFile
+75-0flang/lib/Semantics/tools.cpp
+0-42flang/lib/Semantics/resolve-names.cpp
+0-34flang/lib/Semantics/resolve-names-utils.cpp
+0-12flang/lib/Semantics/resolve-names-utils.h
+12-0flang/include/flang/Semantics/tools.h
+0-7flang/include/flang/Semantics/openmp-utils.h
+87-954 files not shown
+94-10910 files

LLVM/project 72e960e — llvm/lib/Transforms/Scalar StructurizeCFG.cpp

[StructurizeCFG] Clean up pass dependencies. NFCI. (#232328)
DeltaFile
+1-1llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+1-11 files

LLVM/project b1fa48e — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize fmax-without-fast-math-flags.ll

[VPlan] Don't fold fcmp uno of different types. (#232324)

The combine (fcmp uno X, X) | (fcmp uno Y, Y) -> fcmp uno X, Y did not
check that X and Y have the same type, e.g. when checking for NaNs in
both a float and a double min/max reduction, creating an invalid fcmp
and crashing. Only apply it if the types match.
DeltaFile
+88-0llvm/test/Transforms/LoopVectorize/fmax-without-fast-math-flags.ll
+5-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+93-42 files

LLVM/project 692e999 — llvm/lib/Transforms/Scalar StructurizeCFG.cpp

[StructurizeCFG] rebuildSSA is really necessary. NFC. (#232325)

Several tests in test/Transforms/StructurizeCFG/ will fail without it.
DeltaFile
+1-1llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
+1-11 files

LLVM/project cd2fa49 — llvm/test/DebugInfo/MIR/Hexagon live-debug-values-bundled-entry-values.mir, llvm/test/DebugInfo/MIR/InstrRef out-of-scope-blocks.mir

DebugInfo: Fix contradictory dead flags in MIR tests (#232326)

Remove the duplicate implicit-def dead $pc from Hexagon L4_return, and
drop the dead flag from sub-register defs that also have a live
super-register implicit-def. These will fail a future verifier rule.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+4-4llvm/test/DebugInfo/MIR/InstrRef/out-of-scope-blocks.mir
+1-1llvm/test/DebugInfo/X86/dwarf-gnu-call-target-clobbered.mir
+1-1llvm/test/DebugInfo/MIR/X86/live-debug-values.mir
+1-1llvm/test/DebugInfo/MIR/X86/kill-after-spill.mir
+1-1llvm/test/DebugInfo/MIR/X86/debug-loc-0.mir
+1-1llvm/test/DebugInfo/MIR/Hexagon/live-debug-values-bundled-entry-values.mir
+9-92 files not shown
+11-118 files

LLVM/project 066d4c2 — llvm/test/Transforms/SLPVectorizer/AArch64 gathered-slice-fmuladd.ll

[SLP][NFC]Add a test with missing fma pattern recognition, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/232346
DeltaFile
+93-0llvm/test/Transforms/SLPVectorizer/AArch64/gathered-slice-fmuladd.ll
+93-01 files

LLVM/project 604f30e — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp

Remove bitmask enum header
DeltaFile
+0-1llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+0-11 files

LLVM/project e063be7 — llvm/lib/TableGen Error.cpp, llvm/test/TableGen prep-diag11.td

[TableGen] Count errors reported via PrintError(const char *, ...) (#232271)

This overload called SrcMgr.PrintMessage directly instead of going
through PrintMessage, so it did not increment ErrorsPrinted. The lexer
uses it for several diagnostics, so e.g. an unterminated #ifdef printed
two errors followed by "1 errors.".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
DeltaFile
+1-1llvm/lib/TableGen/Error.cpp
+1-0llvm/test/TableGen/prep-diag11.td
+2-12 files

LLVM/project 6605f11 — offload/include device.h, offload/libompaccsupport device.cpp

[Offload][Omp] Remove OmpABIVersion from PluginInterface (#232337)

Move the ABI version check for host kernels from the host plugin to
libomptarget. This allows to remove the field from the KernelLaunchArgs
in the PluginInterface.

Assisted by Claude.
DeltaFile
+30-16offload/libompaccsupport/device.cpp
+6-0offload/include/device.h
+0-3offload/plugins-nextgen/host/src/rtl.cpp
+0-3offload/plugins-nextgen/common/include/PluginInterface.h
+36-224 files

LLVM/project 2c33a52 — flang/include/flang/Optimizer/OpenACC Passes.td, flang/lib/Optimizer/OpenACC/Transforms ACCOptimizeFirstprivateMap.cpp

[flang][OpenACC] Hoist firstprivate loads of guarded optional variables (#231996)

`ACCOptimizeFirstprivateMap` did not optimize optional variables,
because loading an absent optional on the host is unsafe. When the
`acc.firstprivate_map` is in the then region of a `fir.if` on the
presence of the same variable, the variable is known to be present:
hoist its loads and fold the presence checks of the mapped value to
true.
DeltaFile
+339-0flang/test/Transforms/OpenACC/acc-optimize-firstprivate-map.fir
+49-13flang/lib/Optimizer/OpenACC/Transforms/ACCOptimizeFirstprivateMap.cpp
+2-1flang/include/flang/Optimizer/OpenACC/Passes.td
+390-143 files

LLVM/project efdbad9 — llvm/lib/Target/AMDGPU AMDGPUEventTracking.h AMDGPUEventTracking.cpp, llvm/unittests/Target/AMDGPU AMDGPUEventTrackingTest.cpp

[AMDGPU][NewInsertWaitcnt] Event Tracker (2/2)

See #226970 for context and history regarding this patch.
This is intended to begin review as a 1-1 equivalent of #226970 with only one change: a "Drain"
test that Claude added and I found useful, so I left it in.

Builds upon the previous patch to include the functionality needed to import
events from predecessor basic blocks into a basic block, so a MBB can be aware of
previous state.

This adds the "height" system, which is necessary to preserve chronology across control-flow edges,
especially in asymmetrical diamonds, alongside a way to import predecessor state via a `enterBlock`
function.

Assisted-by: AI Coding Assistants for basic boilerplate/research/etc. - no logic was written by LLMs except some unit tests.
DeltaFile
+458-0llvm/unittests/Target/AMDGPU/AMDGPUEventTrackingTest.cpp
+180-14llvm/lib/Target/AMDGPU/AMDGPUEventTracking.cpp
+106-14llvm/lib/Target/AMDGPU/AMDGPUEventTracking.h
+744-283 files

LLVM/project 7950bd9 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Transforms/Inline/AArch64 sme-pstatesm-attrs.ll

Fixups
DeltaFile
+58-1llvm/test/Transforms/Inline/AArch64/sme-pstatesm-attrs.ll
+13-8llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+71-92 files

LLVM/project 61aea71 — llvm/include/llvm/Support AMDGPUAddrSpace.h

[AMDGPU] Reserve addrspace 19 for downstream use (#232092)

Add RESERVED_ADDRESS_SPACE_19 to AMDGPUAS, following the existing
reservations for address spaces 10, 11, 14, and 16-18. Address spaces
above MAX_AMDGPU_ADDRESS are already treated conservatively (global-like
in isFlatGlobalAddrSpace, may-alias in addrspacesMayAlias), so no
behavior changes; this only documents the number as taken so upstream
does not later assign it.

Codegen for addrspace(19) is already covered by
llvm/test/CodeGen/AMDGPU/nullptr.ll.

NFC

Assisted-by: Claude Code:claude-opus-5[1m]
DeltaFile
+2-0llvm/include/llvm/Support/AMDGPUAddrSpace.h
+2-01 files

LLVM/project 9c9aad3 — llvm/lib/Target/AMDGPU CMakeLists.txt AMDGPUHWEvents.h, llvm/unittests/Target/AMDGPU CMakeLists.txt AMDGPUEventTrackingTest.cpp

[AMDGPU][NewInsertWaitcnt] Event Tracker (1/2)

See #226970 for context and history regarding this patch.

Adds the basic infrastructure needed to track in-flight records for each InstCounterType.
This is not a full functional replacement of SIInsertWaitcnts::WaitcntBrackets and it does not
aim to be one, as we'd like to break up its functionality into multiple different pieces.

This patch only contains the functionality needed for tracking events in one block, without importing events from previous blocks.

Assisted-by: Claude Opus 5.5
After requests to split the patch, I used Claude to help me create this patch which is a subset of #226970 with all functionality pertaining to importing incoming events removed.
DeltaFile
+207-0llvm/unittests/Target/AMDGPU/AMDGPUEventTrackingTest.cpp
+206-0llvm/lib/Target/AMDGPU/AMDGPUEventTracking.cpp
+194-0llvm/lib/Target/AMDGPU/AMDGPUEventTracking.h
+27-0llvm/lib/Target/AMDGPU/AMDGPUHWEvents.h
+1-0llvm/unittests/Target/AMDGPU/CMakeLists.txt
+1-0llvm/lib/Target/AMDGPU/CMakeLists.txt
+636-06 files