LLVM/project 38a1b57llvm/include/llvm/IR RuntimeLibcalls.td

comment
DeltaFile
+2-0llvm/include/llvm/IR/RuntimeLibcalls.td
+2-01 files

LLVM/project a98c033llvm/utils/TableGen/Basic RuntimeLibcalls.h

More comments
DeltaFile
+1-3llvm/utils/TableGen/Basic/RuntimeLibcalls.h
+1-31 files

LLVM/project 74ad8fbmlir/include/mlir/Analysis FlatLinearValueConstraints.h, mlir/lib/Analysis FlatLinearValueConstraints.cpp

[MLIR] Allow recovering from semi-affine sets in FlatLinearValueConstraints

The IntegerSet constructor of FlatLinearValueConstraints asserts when
flattening fails, which happens for semi-affine integer sets. Since the
failure is signalled from inside a constructor, callers have no way to
detect the unsupported case ahead of time and no way to work around it;
they simply crash.

Add an optional `bool *error` parameter to the constructor. When it is
non-null, hitting the unimplemented case sets `*error` to true and
returns instead of asserting, letting callers bail out gracefully.
`*error` is set to false on success. When the pointer is null the
previous assert behavior is retained, so existing callers are unaffected.
DeltaFile
+10-2mlir/lib/Analysis/FlatLinearValueConstraints.cpp
+7-1mlir/include/mlir/Analysis/FlatLinearValueConstraints.h
+17-32 files

LLVM/project afd4d7bflang/test/Driver openacc-nyi.f90, flang/test/Transforms/OpenACC acc-emit-nyi-flang.fir

Merge branch 'main' into users/rampitec/use-scalars-in-pk-u64
DeltaFile
+272-0mlir/test/Dialect/Linalg/block-pack-matmul-scalable.mlir
+199-0flang/test/Driver/openacc-nyi.f90
+94-45llvm/utils/TableGen/SubtargetEmitter.cpp
+128-0flang/test/Transforms/OpenACC/acc-emit-nyi-flang.fir
+120-1llvm/tools/llubi/lib/Value.cpp
+112-6llvm/tools/llubi/lib/Context.cpp
+925-52105 files not shown
+2,958-386111 files

LLVM/project 30bff76flang/lib/Optimizer/Transforms/CUDA CUFAddConstructor.cpp, flang/test/Fir/CUDA cuda-constructor-2.f90

[flang][cuda] Do not emit cuf.register_variable_static for device/constant under unified mode (#212344)
DeltaFile
+36-4flang/test/Fir/CUDA/cuda-constructor-2.f90
+3-1flang/lib/Optimizer/Transforms/CUDA/CUFAddConstructor.cpp
+39-52 files

LLVM/project bca744cllvm/lib/Target/AMDGPU AMDGPUISelLowering.cpp SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU uaddsat.ll

[AMDGPU] Lower uniform uaddsat.i16 to SALU instructions

Promote uniform i16 uadd.sat to i32 in promoteUniformOpToI32 so it
lowers to SALU (s_add_i32 + s_min_u32) instead of VALU + readfirstlane.
The saturating add on zero-extended operands reduces to
umin(add(lhs, rhs), 0xffff).

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+64-60llvm/test/CodeGen/AMDGPU/uaddsat.ll
+10-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-0llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+75-623 files

LLVM/project d123734llvm/test/CodeGen/AMDGPU uaddsat.ll

[AMDGPU] Add tests for uniform uaddsat.i16 (NFC)

Precommit tests covering uniform (SALU) uadd.sat for i16 and vector
i16 (v2i16, v3i16, v4i16) using the amdgpu_ps calling convention so
results are returned in SGPRs. These currently lower to VALU
(v_add_u16 clamp / v_pk_add_u16 clamp + v_readfirstlane).

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+239-0llvm/test/CodeGen/AMDGPU/uaddsat.ll
+239-01 files

LLVM/project aa8942dllvm/docs AMDGPUDMAOperations.md

[Docs][AMDGPU] Eliminate incorrect use of double backticks [NFC] (#212343)
DeltaFile
+15-15llvm/docs/AMDGPUDMAOperations.md
+15-151 files

LLVM/project cef8432llvm/lib/Transforms/Vectorize VPlanUtils.h, llvm/test/Transforms/LoopVectorize scalarize-masked-call.ll

[VPlan] Account for masked VPInstructions in getIntrinsicID. (#212234)

getIntrinsicID may be called with masked VPInstructions. Update to skip
the mask, which is always the last operand.

Fixes https://github.com/llvm/llvm-project/issues/212165.

PR: https://github.com/llvm/llvm-project/pull/212234
DeltaFile
+62-0llvm/test/Transforms/LoopVectorize/scalarize-masked-call.ll
+3-1llvm/lib/Transforms/Vectorize/VPlanUtils.h
+65-12 files

LLVM/project 34c7c5cllvm/lib/Target/AMDGPU SIInstrInfo.h SIInstrInfo.cpp, llvm/lib/Target/AMDGPU/Utils AMDGPUBaseInfo.cpp AMDGPUBaseInfo.h

[AMDGPU][NFC] Rename packed instruction helper functions for clarity (#211933)

Renames packed instruction helper functions to better reflect their
purpose:
  - isPackedFP32or64BitInst → isSingleSGPRReadInst
- isLegalGFX12PlusPackedMathFP32or64BitOperand → isLegalSingleSGPRReadInstOperand
DeltaFile
+17-21llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+13-11llvm/lib/Target/AMDGPU/SIInstrInfo.h
+3-1llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
+1-1llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+34-344 files

LLVM/project 864f9a0clang/lib/Format FormatTokenLexer.h FormatTokenLexer.cpp, clang/unittests/Format TokenAnnotatorTest.cpp

[clang-format] Correctly annotate C# UTF 8 string literals (#211919)

Fixes #210506
DeltaFile
+28-0clang/lib/Format/FormatTokenLexer.cpp
+19-0clang/unittests/Format/TokenAnnotatorTest.cpp
+1-0clang/lib/Format/FormatTokenLexer.h
+48-03 files

LLVM/project 097d19dllvm/include/llvm/IR RuntimeLibcallsImpl.td

Reword comment
DeltaFile
+4-3llvm/include/llvm/IR/RuntimeLibcallsImpl.td
+4-31 files

LLVM/project 6534ceeclang/include/clang/Basic OptionalUnsigned.h

[Clang] [NFC] Update OptionalUnsigned ctor to only reject signed integers (#212321)

Currently, the `OptionalUnsigned(int) = delete;` constructor means that
constructing e.g. an `OptionalOrUnsigned<uint64_t>` from an `unsigned`
fails because overload resolution is ambiguous (because `unsigned` ->
`int` and `unsigned` -> `uint64_t` are both valid conversions). This
patch adds a constraint to make sure the deleted constructor only
catches signed integer types.

This is needed for #212319.
DeltaFile
+3-1clang/include/clang/Basic/OptionalUnsigned.h
+3-11 files

LLVM/project 7677166offload/plugins-nextgen/level_zero/include L0Kernel.h, offload/plugins-nextgen/level_zero/src L0Queue.cpp

[OFFLOAD][L0] Fix zero argurment kernel launch (#212296)

PR #205224 changed the path for kernels with no arguments to not use
appendLaunchKernelWithArgs, while at the same time it removed
zeKernelSetGroupSize which resulted in incorrect sizing of the kernel.

This PR removes the alternate path and makes sure all launches go
through appendLaunchKernelWithArgs.

Alternatively we can restore zeKernelSetGroupSize on the alternate path.
DeltaFile
+3-8offload/plugins-nextgen/level_zero/src/L0Queue.cpp
+1-3offload/plugins-nextgen/level_zero/include/L0Kernel.h
+4-112 files

LLVM/project f552374llvm/lib/Target/AMDGPU VOP3PInstructions.td, llvm/test/CodeGen/AMDGPU pk-lshl-add-u64.ll

[AMDGPU] Allow scalar operands in V_PK_LSHL_ADD_U64

Patch creates dummy source modifiers for this instruction to use
with OPSEL. Even though these do not support modifiers we can reuse
the same mechanics as with packed fp64 and other u64 to allow scalar
operands.
DeltaFile
+115-0llvm/test/CodeGen/AMDGPU/pk-lshl-add-u64.ll
+16-13llvm/lib/Target/AMDGPU/VOP3PInstructions.td
+131-132 files

LLVM/project 63e60a2bolt/lib/Passes BinaryPasses.cpp, bolt/test/X86 jump-table-empty-block-strict.s

[BOLT] Fix strict mode bug in removal of block referenced by JT (#211940)

Summary:
BOLT can create a jump table object from a PC-relative operand reference
(e.g. leaq JT(%rip)) whenever the referenced memory looks like a PIC
jump table -- see
BinaryContext::handleAddressRef. This is independent of whether BOLT
recognizes the indirect jump dispatch itself. The jump table annotation
is only attached to the jmp instruction later, in
BinaryFunction::analyzeIndirectBranch, and only when the target-specific
analyzeIndirectBranch matcher recognizes the dispatch pattern.

If the matcher does not recognize the pattern, the annotation is never
attached to the jmp, even though the jump table object and its entries
exist and reference basic blocks in the function.

In strict mode BOLT still fully processes such a function: it stays
simple, the block is marked as having unknown control flow, and the jump
table object is kept intact. Because the terminator carries no jump

    [11 lines not shown]
DeltaFile
+99-0bolt/test/X86/jump-table-empty-block-strict.s
+9-1bolt/lib/Passes/BinaryPasses.cpp
+108-12 files

LLVM/project c881d81bolt/include/bolt/Core BinaryContext.h, bolt/lib/Rewrite SDTRewriter.cpp PseudoProbeRewriter.cpp

[BOLT] Release pseudo-probe decoder after emit (#211935)

PseudoProbeRewriter builds sizable data structures and then hold onto
them after they are needed.
PseudoProbeRewriter::postEmitFinalizer() parses the input .pseudo_probe
sections into an MCPseudoProbeDecoder whose address-to-probe and
GUID-to-function-desc maps can be very large (tens of GiB on big
binaries with many probes). This is not used again once probes have been
updated, yet they survive into the memory-heavy DWARF rewrite
(updateDebugInfo), directly inflating BOLT's peak RSS at the worst
possible time.

This frees them at the end of the postEmitFinalizer() calls, before
updateDebugInfo runs.

Stacked on top of the .dwo DIE diff, in large binaries you should
observe ~17% peak RSS wins if your
build uses pseudo probe maps.
DeltaFile
+7-0bolt/lib/Rewrite/PseudoProbeRewriter.cpp
+5-0bolt/include/bolt/Core/BinaryContext.h
+2-0bolt/lib/Rewrite/SDTRewriter.cpp
+14-03 files

LLVM/project ae535cellvm/test lit.cfg.py

python format

Created using spr 1.3.7
DeltaFile
+3-1llvm/test/lit.cfg.py
+3-11 files

LLVM/project 377b32fclang/test/OpenMP update_clause_ast_dump.cpp

Add AST dump test
DeltaFile
+29-0clang/test/OpenMP/update_clause_ast_dump.cpp
+29-01 files

LLVM/project 4d14e96mlir/lib/Conversion/MathToSPIRV MathToSPIRV.cpp, mlir/test/Conversion/MathToSPIRV math-to-gl-spirv.mlir

[mlir][MathToSPIRV] Allow math.cttz lowering for non-i32 integer widths (#206400)

Co-authored-by: Igor Wodiany <dev at wodiany.com>
DeltaFile
+22-0mlir/test/Conversion/MathToSPIRV/math-to-gl-spirv.mlir
+20-1mlir/test/Target/SPIRV/gl-ops.mlir
+10-5mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
+52-63 files

LLVM/project 88d986cllvm/cmake config-ix.cmake, llvm/test lit.site.cfg.py.in lit.cfg.py

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+3-14llvm/cmake/config-ix.cmake
+3-7llvm/test/lit.cfg.py
+1-0llvm/test/lit.site.cfg.py.in
+7-213 files

LLVM/project bd7bb26clang/docs ReleaseNotes.md, clang/include/clang/AST RecordLayout.h

[clang] Match MSVC ABI for over-aligned base tail padding on Arm64 (#210461)

When targeting aarch64-pc-windows-msvc, clang laid out a base following
an over-aligned, non-standard-layout base at the wrong offset. MSVC on
Arm64 reuses the over-aligned base's tail padding for the subsequent
base, but clang rounded the base up to a full slot, so the two disagreed
on member offsets, breaking interop between clang- and MSVC-built
binaries.

Fix: store each record's natural non-virtual alignment (excluding
`alignas`/`__declspec(align)` over-alignment) as
`getNonRequiredNVAlignment()`, and on Arm64 fold in a base's natural
alignment rather than its full alignment. This is gated to Arm64 only;
Arm64EC and x64 follow the x64 rule (no reuse) and are unchanged.

Validated against MSVC (Hostx64\arm64\cl.exe
/d1reportSingleClassLayout): clang now matches MSVC Arm64 exactly for
the reduced repro, the original polymorphic case (vftable + empty base +
template), and a range of probe cases covering natural vs.

    [3 lines not shown]
DeltaFile
+107-0clang/test/Layout/ms-arm64-aligned-base-tail-padding.cpp
+68-19clang/lib/AST/RecordLayoutBuilder.cpp
+16-0clang/include/clang/AST/RecordLayout.h
+6-5clang/lib/AST/RecordLayout.cpp
+6-0clang/docs/ReleaseNotes.md
+203-245 files

LLVM/project c2b2264llvm/lib/Target/AArch64 AArch64MacroFusion.cpp

[AArch64][MacroFusion] Add per cluster kind statistic (#212103)

So we can easily differentiate between different cluster kinds on
AArch64 backend.
DeltaFile
+61-14llvm/lib/Target/AArch64/AArch64MacroFusion.cpp
+61-141 files

LLVM/project b8a1592clang/docs LanguageExtensions.md, clang/include/clang/Basic Builtins.td

[clang] Add __builtin_convert_to_arbitrary_fp

Expose the llvm.convert.to.arbitrary.fp intrinsic as a target-independent
builtin, the inverse of __builtin_convert_from_arbitrary_fp:

  unsigned _BitInt(8) b =
      __builtin_convert_to_arbitrary_fp(f, "Float8E4M3FN", "round.tonearest", 1);

The result type is derived from the format, so unlike the "from" direction this
is an ordinary CustomTypeChecking builtin with no parser or AST support needed.
It is unsigned _BitInt(N) for a scalar operand and an ext_vector_type of that
for a vector operand.

The rounding mode is a string literal validated with convertStrToRoundingMode,
matching what the IR verifier accepts, and the saturation flag must be an
integer constant expression equal to 0 or 1 since the intrinsic marks it ImmArg.

Clang only permits _BitInt vector elements of power-of-two width, so vector
operands are rejected for the 6-bit formats.

    [3 lines not shown]
DeltaFile
+76-0clang/test/Sema/builtins-convert-to-arbitrary-fp.c
+76-0clang/test/CodeGen/builtins-convert-to-arbitrary-fp.c
+70-0clang/lib/Sema/SemaChecking.cpp
+53-0clang/docs/LanguageExtensions.md
+20-0clang/lib/CodeGen/CGBuiltin.cpp
+6-0clang/include/clang/Basic/Builtins.td
+301-03 files not shown
+310-19 files

LLVM/project 460dbfcllvm/lib/Analysis HashRecognize.cpp, llvm/test/Analysis/HashRecognize cyclic-redundancy-check.ll

[HashRecognize] Use loop latch to determine step/start for conditional recurrence (#211916)

The function `matchConditionalRecurrence` iterates over both PHI inputs
and attempts to match each one to determine which is `Start` and which
is `Step`. However, some of the failure conditions in the loop `return
false`, which has the potential to classify some valid CRC loops as not
having a conditional recurrence. The loop here is not really needed at
all-- instead, use `L.getLoopLatch()` to determine `Start`/`Step`, since
the incoming value from the latch block will always be the `Step`. This
also avoids the aforementioned false negative classifications.

Assisted-by: Claude Opus 5
DeltaFile
+25-24llvm/lib/Analysis/HashRecognize.cpp
+48-0llvm/test/Analysis/HashRecognize/cyclic-redundancy-check.ll
+73-242 files

LLVM/project a950d4allvm/include/llvm/TargetParser AMDGPUTargetParser.h

AMDGPU: Use uint8_t for IsaVersion fields (#212311)
DeltaFile
+3-3llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+3-31 files

LLVM/project 894392dllvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-based-stride-mv.ll

Outline widenUnitStridedLoadStore helper

Reuses it for both normal and speculative unit-strided memaccesses widening.

Apparently, I misread `createVectorPointer` interface (or maybe it changed
throughout the life of this PR), so this also fixes a bug in the new code.
DeltaFile
+44-55llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+26-26llvm/test/Transforms/LoopVectorize/VPlan/vplan-based-stride-mv.ll
+70-812 files

LLVM/project f0562e5llvm/test/CodeGen/AMDGPU/GlobalISel lshr.ll shl.ll

[AMDGPU][GISel] Remove redundant AND on scalar shift amounts

A scalar shift only consumes the low log2(bitwidth) bits of its amount,
so an explicit (and amt, mask) feeding the amount is redundant whenever
mask has all of those low bits set. SelectionDAG already achieves this
via SimplifyDemandedBits on the shift-amount operand; this adds the
equivalent to the postlegalizer combiner for G_SHL/G_LSHR/G_ASHR.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+2,745-3,283llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
+2,524-2,997llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
+303-0llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizer-combiner-redundant-shift-amount-mask.mir
+7-40llvm/test/CodeGen/AMDGPU/GlobalISel/ashr.ll
+7-38llvm/test/CodeGen/AMDGPU/GlobalISel/shl.ll
+3-24llvm/test/CodeGen/AMDGPU/GlobalISel/lshr.ll
+5,589-6,3823 files not shown
+5,641-6,3959 files

LLVM/project b824a69clang/docs LanguageExtensions.md, clang/include/clang/AST Expr.h

[clang] Add __builtin_convert_from_arbitrary_fp

Expose the llvm.convert.from.arbitrary.fp intrinsic as a target-independent
builtin. It reinterprets an integer as the bits of a narrow floating-point
format that has no corresponding C type, and widens it to a native
floating-point type:

  _Float16 h = __builtin_convert_from_arbitrary_fp(b, "Float8E4M3FN", _Float16);

Since the destination type cannot be derived from the arguments, it is passed
as a type argument and the builtin is parsed as a keyword, following the
__builtin_convertvector precedent.

The format is a string literal validated with
APFloatBase::isValidArbitraryFPFormat, so every format the IR verifier accepts
is accepted here; formats that no target lowers yet keep being reported by the
backend. The integer operand may be any integer type whose width matches the
format, which covers char/unsigned char for the 8-bit formats and _BitInt for
the narrower ones. Vector operands are supported with matching element counts.

    [5 lines not shown]
DeltaFile
+203-0clang/test/CodeGen/builtins-convert-from-arbitrary-fp.c
+69-0clang/lib/Sema/SemaChecking.cpp
+66-0clang/include/clang/AST/Expr.h
+60-0clang/test/Sema/builtins-convert-from-arbitrary-fp.c
+59-0clang/docs/LanguageExtensions.md
+42-0clang/lib/Parse/ParseExpr.cpp
+499-030 files not shown
+744-036 files

LLVM/project b705dabclang/lib/CodeGen CGOpenMPRuntime.cpp, clang/test/OpenMP target_map_nested_ptr_member_mapper_codegen.cpp

[OpenMP] Propagate PRESENT to pointee entries in mapper codegen

Extend map-type-modifier propagation in emitUserDefinedMapper to the PRESENT
modifier, but only for entries that have an attach ptr (the pointee data, whose
storage differs from the struct's own). A present modifier on the outer clause
must require that pointee to be present on the device.

This is gated on a new PropagatePresentToPointee argument, which Clang sets from
CGM.getLangOpts().OpenMP >= 60. Before 6.0 the present modifier is treated as
not applying to the pointee: the spec committee confirmed the divergence
between the present motion modifier (to/from) and the present map-type modifier
(map) was unintentional, to be fixed as an OpenMP 6.0 erratum. Only propagation
is gated; present written directly in a mapper's own clause applies at all
versions.

A TODO notes PRESENT should also propagate to the struct's own members, which
is blocked while pointer members use PTR_AND_OBJ.

Update the present-check tests to their final 6.0-gated behavior.

    [2 lines not shown]
DeltaFile
+36-11llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+10-17offload/test/mapping/mapper_target_update_present_ptee.c
+14-13offload/test/mapping/mapper_map_mbr_then_present_mbr_ptee.c
+13-4llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+6-9clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+12-3clang/lib/CodeGen/CGOpenMPRuntime.cpp
+91-576 files