LLVM/project d4d5b72 — clang/docs ReleaseNotes.md, clang/lib/CodeGen CGExpr.cpp CodeGenFunction.h

[clang][BPF] Do not emit preserve_static_offset markers for field info (#234280)

__builtin_preserve_field_info on a field of a preserve_static_offset
record crashes clang in BPFAbstractMemberAccess, for example
bpf_core_field_exists(skb->mark) with a marked struct __sk_buff.

Every release since 18 is affected.

BPFAbstractMemberAccess computes the field relocation from the
preserve.*.access.index calls that CodeGen emits for the builtin's
argument. CodeGen also wraps each access to a marked record in
llvm.preserve.static.offset, and BPFPreserveStaticOffset replaces the
access-index calls under such markers with plain GEPs, so that loads and
stores keep static offsets. The field-info call is left without type
metadata, and BPFAbstractMemberAccess dereferences a nullptr.

Field info never dereferences the field, so the markers serve no purpose
there. Do not emit them while emitting the builtin's argument.


    [9 lines not shown]
DeltaFile
+55-0clang/test/CodeGen/bpf-preserve-static-offset-field-info.c
+6-1clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+4-0clang/lib/CodeGen/CodeGenFunction.h
+1-1clang/lib/CodeGen/CGExpr.cpp
+2-0clang/docs/ReleaseNotes.md
+68-25 files

LLVM/project f17b2d7 — llvm/include/llvm/Transforms/IPO Attributor.h, llvm/lib/Transforms/IPO Attributor.cpp

Attributor: Add only new attributes when manifesting

manifestAttrs collected the attributes to add in an AttrBuilder, then
copied the position's attribute set into another AttrBuilder to merge
them in. Collect them in an array and merge them into the set in one
pass. This requires the attributes passed to manifestAttrs to be sorted
like an attribute set, which all callers already do. The only one
passing more than one attribute is AMDGPUAttributor, whose implicit
argument attributes are sorted.

Instructions spent in amdgpu-attributor:
  rocPRIM test_device_scan, gfx942:          770.2M -> 710.8M (-7.7%)
  Blender Cycles HIP kernel, gfx1100:        380.0M -> 379.5M (-0.1%)
  rocPRIM 16 tests, full LTO, closed world:  3019.8M -> 2855.9M (-5.4%)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+58-43llvm/lib/Transforms/IPO/Attributor.cpp
+3-1llvm/include/llvm/Transforms/IPO/Attributor.h
+61-442 files

LLVM/project eb65610 — llvm/unittests/IR AttributesTest.cpp

Fix unused-result warning in death test
DeltaFile
+1-1llvm/unittests/IR/AttributesTest.cpp
+1-11 files

LLVM/project 1461f65 — openmp/runtime/test/tasking issue-94260-2.c

[OMP] Disable issue-94260-2.c on AIX (#234478)

The test fails on AIX.

Ref: https://github.com/llvm/llvm-project/issues/176451
DeltaFile
+1-1openmp/runtime/test/tasking/issue-94260-2.c
+1-11 files

LLVM/project b64d92b — clang/test/Sema c23-thread-local-definition.c

[SystemZ] XFAIL for z/OS until TLS support is available (#233887)

The support for TLS isn't available on z/OS yet. Mark the test as XFAIL
for now.
DeltaFile
+1-0clang/test/Sema/c23-thread-local-definition.c
+1-01 files

LLVM/project 09520d1 — clang-tools-extra/clang-tidy/performance NoexceptFunctionBaseCheck.cpp, clang-tools-extra/clang-tidy/utils ExceptionSpecAnalyzer.cpp

[clang-tidy] Fix `performance-noexcept-move-constructor` for implicit `noexcept(false)` (#226488)

The `performance-noexcept-move-constructor` check incorrectly handles
move constructors and move assignment operators whose exception
specification is implicitly `noexcept(false)`.

To avoid this, I added a check for a valid source range corresponding to
the `noexcept specifier`.

Closes https://github.com/llvm/llvm-project/issues/195637

---------

Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
DeltaFile
+30-0clang-tools-extra/test/clang-tidy/checkers/performance/noexcept-move-constructor.cpp
+17-10clang-tools-extra/clang-tidy/utils/ExceptionSpecAnalyzer.cpp
+10-7clang-tools-extra/clang-tidy/performance/NoexceptFunctionBaseCheck.cpp
+4-0clang-tools-extra/docs/ReleaseNotes.md
+61-174 files

LLVM/project 9dfd357 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AArch64 histograms.ll

Fixups

* Handle target intrinsics conservatively
* Added RUN line to CostModel/AArch64/histograms.ll
DeltaFile
+21-3llvm/test/Transforms/Inline/AArch64/sme-pstatesm-attrs.ll
+9-2llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+3-0llvm/test/Analysis/CostModel/AArch64/histograms.ll
+33-53 files

LLVM/project b4e76ad — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 sext-vsetcc.ll masked_store.ll

[X86] Fold (sext_in_reg (logic x, y)) -> (logic x, (sext_in_reg y)) (#234611)

If either vector operand is already sign-extended, then try to push the
sext_in_reg further up the DAG.

I've also renamed the ExtVT to match DAGCombiner::visitSIGN_EXTEND_INREG
(and because ExtraVT made no sense....).

Fixes #233272
DeltaFile
+11-17llvm/test/CodeGen/X86/vector-pcmp.ll
+10-14llvm/test/CodeGen/X86/vector-compress.ll
+20-4llvm/lib/Target/X86/X86ISelLowering.cpp
+10-10llvm/test/CodeGen/X86/masked_store.ll
+2-5llvm/test/CodeGen/X86/sext-vsetcc.ll
+53-505 files

LLVM/project d9348e3 — llvm/test/CodeGen/SPIRV/debug-info debug-composite-parent-debuginfonone.ll

Fix test that required a specific emission order.
DeltaFile
+22-20llvm/test/CodeGen/SPIRV/debug-info/debug-composite-parent-debuginfonone.ll
+22-201 files

LLVM/project 7d05aa6 — llvm/test/CodeGen/SPIRV/debug-info debug-lexical-block-discriminator.ll debug-scope-lexical-block-file.ll

[SPIRV] Drop --verify-machineinstrs from new lexical-block RUN lines.

The machine verifier already runs on the buildbots.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+2-2llvm/test/CodeGen/SPIRV/debug-info/debug-scope-lexical-block-file.ll
+1-1llvm/test/CodeGen/SPIRV/debug-info/debug-lexical-block-discriminator.ll
+3-32 files

LLVM/project f8a0e4d — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-scope-lexical-block-file.ll debug-lexical-block-discriminator.ll

[SPIRV] Emit DebugLexicalBlockDiscriminator for a DILexicalBlockFile.

A location scoped at a DILexicalBlockFile was emitted as a DebugScope of the compilation unit, so the discriminator did not round-trip.
Use the discriminator as the DebugScope operand, matching SPIRV-LLVM-Translator.
DeltaFile
+40-27llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+67-0llvm/test/CodeGen/SPIRV/debug-info/debug-lexical-block-discriminator.ll
+17-6llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+7-5llvm/test/CodeGen/SPIRV/debug-info/debug-scope-lexical-block-file.ll
+131-384 files

LLVM/project 76a4cac — llvm/test/CodeGen/SPIRV/debug-info debug-type-composite-self-pointer-forward-refs.ll

[SPIRV] Expect no unlisted DebugTypeMember in the self-pointer forward-refs test.

Without forward references, member next is no longer emitted after S and
its pointer, since S cannot list it.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+3-7llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-self-pointer-forward-refs.ll
+3-71 files

LLVM/project 6078b05 — llvm/test/CodeGen/SPIRV/debug-info debug-typedef-cycle-unsupported-forward-ref.ll debug-typedef-base-debuginfonone.ll

[SPIRV] Drop --verify-machineinstrs from new forward-ref tests.

The machine verifier already runs on the buildbots.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+6-6llvm/test/CodeGen/SPIRV/debug-info/debug-composite-parent-debuginfonone.ll
+4-4llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-cycle-unsupported-forward-ref.ll
+4-4llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-base-debuginfonone.ll
+4-4llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-self-pointer-forward-refs.ll
+18-184 files

LLVM/project 38950c6 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-typedef-cycle-unsupported-forward-ref.ll debug-type-composite-self-pointer-forward-refs.ll

[SPIRV] Gate debug-scope forward references behind a flag.

-spirv-debug-scope-forward-refs defaults to off.
DeltaFile
+15-7llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+4-10llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-base-debuginfonone.ll
+6-4llvm/test/CodeGen/SPIRV/debug-info/debug-composite-parent-debuginfonone.ll
+4-3llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-cycle-unsupported-forward-ref.ll
+4-3llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-self-pointer-forward-refs.ll
+2-1llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+35-286 files

LLVM/project 4ba5bea — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-typedef-cycle-unsupported-forward-ref.ll debug-typedef-base-debuginfonone.ll

[SPIRV] Forward-reference debug scopes with a reserved result id.

Visiting a scope reserves its result id. With SPV_KHR_relaxed_extended_instruction a back edge uses that id through OpExtInstWithForwardRefsKHR, and a later failure defines it as DebugInfoNone when an emitted instruction already named it.
Without the extension the edge is dropped and a later walk can retry the scope.
DeltaFile
+93-13llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+55-0llvm/test/CodeGen/SPIRV/debug-info/debug-composite-parent-debuginfonone.ll
+55-0llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-self-pointer-forward-refs.ll
+52-0llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-base-debuginfonone.ll
+42-0llvm/test/CodeGen/SPIRV/debug-info/debug-typedef-cycle-unsupported-forward-ref.ll
+26-6llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+323-191 files not shown
+326-207 files

LLVM/project 46a8aed — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp

[SPIRV] Emit each debug scope from getOrCreateDebugScope.

Handlers return the opcode and the operands. getOrCreateDebugScope writes that instruction with a fresh id.
DeltaFile
+167-173llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+123-93llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+290-2662 files

LLVM/project 449827f — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-type-composite-self-pointer.ll debug-global-variable-skip-static-member.ll

[SPIRV] Emit DebugTypeMember only from its DebugTypeComposite.

DebugTypeMember has no Parent operand, so the composite is the only
instruction that lists it. Emitting a member from the type walk, or
from a static member declaration, after its composite left a
DebugTypeMember that the composite did not list.

Drop members from the type walk and only look up the static member
declaration of a global variable.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+26-0llvm/test/CodeGen/SPIRV/debug-info/debug-type-member-static-self-pointer.ll
+26-0llvm/test/CodeGen/SPIRV/debug-info/debug-type-member-static-int.ll
+7-4llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+4-5llvm/test/CodeGen/SPIRV/debug-info/debug-global-variable-skip-static-member.ll
+3-3llvm/test/CodeGen/SPIRV/debug-info/debug-type-composite-self-pointer.ll
+66-125 files

LLVM/project 300e2a6 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp

[SPIRV] Simplify the module-scope debug scope walk.

getOrCreateDebugScope emits each scope after its dependencies, so the
walk does not need a fixed order between scope kinds. Walk lexical
blocks, types and subprograms in a single loop, and keep subprogram
declarations and definitions in one container.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+4-19llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+2-7llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+6-262 files

LLVM/project 7e064c3 — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.h SPIRVNonSemanticDebugHandler.cpp, llvm/test/CodeGen/SPIRV/debug-info debug-global-variable-skip-static-member.ll

[SPIRV] Emit DebugTypeMember through getOrCreateDebugScope.
DeltaFile
+19-6llvm/test/CodeGen/SPIRV/debug-info/debug-global-variable-skip-static-member.ll
+11-8llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+6-7llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+36-213 files

LLVM/project 918696f — llvm/lib/Target/SPIRV SPIRVNonSemanticDebugHandler.cpp

[SPIRV] Resolve a static member declaration through getOrCreateDebugScope.
DeltaFile
+3-2llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+3-21 files

LLVM/project 9c97c5e — llvm/lib/Target/AArch64 AArch64InstrInfo.h AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 reassocmls.ll madd-combine.ll

[AArch64] Fold MUL + shifted-register ADD into MADD (#231356)

Add MachineCombiner patterns that fold a MUL and a following
shifted-register ADD into a MADD. The shift becomes a separate
bitfield-move instruction.

For example, with
```
int f(int a, int b, int c) {
  return a*b + (c>>2);
}
```
LLVM currently generates:
```
f:
  mul     w8, w1, w0
  add     w0, w8, w2, asr #2
  ret
```

    [10 lines not shown]
DeltaFile
+240-0llvm/test/CodeGen/AArch64/madd-combine.mir
+109-0llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+90-0llvm/test/CodeGen/AArch64/madd-combine.ll
+3-3llvm/test/CodeGen/AArch64/reassocmls.ll
+2-0llvm/lib/Target/AArch64/AArch64InstrInfo.h
+444-35 files

LLVM/project 8b4d9d3 — clang/docs ReleaseNotes.md, clang/lib/AST ExprConstant.cpp

[clang] Fix constexpr __builtin_convertvector float-to-bool conversion (#230690)

This fixes the conversion from float to bool in
`__builtin_convertvector`.
The fix is simply adding the missing case to `HandleFloatToIntCast`,
that mirrors the behavior of `HandleIntToIntCast`.

Fixes #228649
DeltaFile
+23-0clang/test/Sema/constant-builtins-vector.cpp
+6-1clang/lib/AST/ExprConstant.cpp
+1-0clang/docs/ReleaseNotes.md
+30-13 files

LLVM/project 4032c0f — flang/lib/Semantics check-omp-loop.cpp, flang/test/Lower/OpenMP declare-simd.f90

[flang][OpenMP] Fix verification of REF modifier on LINEAR clause (#232367)

The OpenMP spec has a bug: the restriction should read
> If linear-modifier is ref, list items must not be polymorphic variables,
> assumed-shape arrays, or variables with the ALLOCATABLE attribute.

---------

Co-authored-by: Markus Mützel <markus.muetzel at gmx.de>
(cherry picked from commit 53d096bbf31d12fddbbe2508b7f80bab9628430d)
DeltaFile
+21-1flang/test/Semantics/OpenMP/linear-clause01.f90
+4-4flang/test/Lower/OpenMP/declare-simd.f90
+3-3flang/lib/Semantics/check-omp-loop.cpp
+2-2flang/test/Semantics/OpenMP/simd-linear-array.f90
+1-1flang/test/Semantics/OpenMP/linear-clause03.f90
+31-115 files

LLVM/project c01d0cd — libcxx/utils/ci/lnt select-anchor-commits plan-benchmarks

[libc++] Share the benchmark paths and the LNT runs listing between the LNT tools (#234616)

This is a NFC commit that will simplify the introduction of refinement
tooling in upcoming PRs.

Assisted by Claude
DeltaFile
+57-0libcxx/utils/ci/lnt/common.py
+2-53libcxx/utils/ci/lnt/plan-benchmarks
+2-5libcxx/utils/ci/lnt/select-anchor-commits
+61-583 files

LLVM/project a406552 — mlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp, mlir/lib/Target/LLVMIR LoopAnnotationImporter.cpp

[MLIR][LLVMIR] Add 'align' to loop-annotations (#234263)

This is necessary for the llvm.loop.align flag, which clang needs to
generate. Its a touch weird in that LLVM's verifier (not the MLIR
    dialect!) enforces this as a 32 bit value, so we did have to do a
little work to make sure we enforce that too/sooner in the dialect.
DeltaFile
+23-0mlir/test/Target/LLVMIR/Import/metadata-loop.ll
+16-3mlir/lib/Target/LLVMIR/LoopAnnotationImporter.cpp
+14-0mlir/test/Target/LLVMIR/loop-metadata.mlir
+13-0mlir/test/Dialect/LLVMIR/loop-metadata.mlir
+12-0mlir/test/Dialect/LLVMIR/invalid.mlir
+2-1mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+80-45 files not shown
+86-611 files

LLVM/project a5d857a — libcxx/utils/ci/lnt README.md

[libc++][NFC] Update the LNT README to use GET /series (#234619)

I introduced a GET /series endpoint that is not paginated to simplify
tools that perform regression detection. Use that in the README example.
DeltaFile
+5-16libcxx/utils/ci/lnt/README.md
+5-161 files

LLVM/project 4158a91 — libcxx/include print, libcxx/include/__ostream print.h

[libc++] Clean up leftover std::print availability workarounds (#234379)

The availability markup for std::print was removed in 4a87db6b10a0 and
the corresponding macros were deleted entirely in 1616fbaccf82. However,
several functions in <print> were left templates to work around
https://llvm.org/PR61563, which is not necessary anymore.

Remove a few workarounds that are now unnecessary, and reword others
that are required due to format now, not print.
DeltaFile
+6-9libcxx/include/print
+5-5libcxx/include/__ostream/print.h
+0-8libcxx/utils/libcxx/test/features/availability.py
+11-223 files

LLVM/project a701a6e — clang/include/clang/CIR/Dialect/IR CIRTypes.td, clang/lib/CIR/Dialect/IR CIRTypes.cpp

[CIR] Restrict union tail padding to !u8i

CIRGen pads a union's tail with !u8i or !cir.array<!u8i x N>, but the
verifier accepted any padding type. Other types broke consumers that
size the union: incomplete-record padding asserted in
computeStructSize, and scalable-vector padding made CallConvLowering
emit a byval of meaningless size.

The verifier now accepts only what CIRGen emits. This also covers the
earlier void-padding check.

Assisted-by: Claude Code (Claude Opus 5.5)
DeltaFile
+32-0clang/test/CIR/IR/invalid-union-padding.cir
+11-2clang/lib/CIR/Dialect/IR/CIRTypes.cpp
+4-3clang/include/clang/CIR/Dialect/IR/CIRTypes.td
+2-2clang/unittests/CIR/UnionTypeSizeTest.cpp
+1-1clang/test/CIR/IR/invalid-void-member.cir
+50-85 files

LLVM/project 1b003ae — llvm/lib/Object Archive.cpp, llvm/test/Object bigarchive-malformed-next-offset.test

[Object] Bounds-check the big archive next member offset (#230781)

NextOffset comes from a 20-character decimal field in the member header,
so it can hold any 64-bit value. `getNextChildLoc()` adds it to the
start of the buffer before anything checks it, which wraps, and the
`NextLoc > getBufferEnd()` test in `getNext()` then passes because the
wrapped pointer is below the buffer rather than above it. The next
member header is read from there: with an offset of 2^64-1 the pointer
lands one byte before the archive, and llvm-ar prints that byte back in
its own diagnostic.

Check the offset against the archive's size while it is still an
integer.

The generic member header path has the same shape but its size field is
only 10 characters wide, so it cannot reach a wrap and is left alone.

Assisted-by: Claude (Anthropic)
DeltaFile
+55-0llvm/test/Object/bigarchive-malformed-next-offset.test
+38-12llvm/lib/Object/Archive.cpp
+1-1llvm/test/tools/llvm-objdump/malformed-archives.test
+94-133 files

LLVM/project 8a5d84c — llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU frem.ll

Merge branch 'main' into users/huntergr-arm/vector-lsr-data
DeltaFile
+32,088-15,710llvm/test/CodeGen/AMDGPU/frem.ll
+23,347-23,371llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+31,848-0llvm/test/CodeGen/NVPTX/atomicrmw-elementwise-sm60.ll
+31,310-0llvm/test/CodeGen/NVPTX/atomicrmw-elementwise-sm70.ll
+22,584-0llvm/test/CodeGen/NVPTX/load-sm90.ll
+22,541-0llvm/test/CodeGen/NVPTX/atomicrmw-elementwise-sm90.ll
+163,718-39,08112,200 files not shown
+1,078,707-418,05012,206 files