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 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

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

[OpenMP][Clang] Enable ATTACH-style maps for mappers.

Track per-entry attach-ptr info (HasAttachPtr) through mapper codegen so that
emitUserDefinedMapper does not add a new outer MEMBER_OF to pointee/combined
entries (which occupy different storage than the struct) or to ATTACH entries.
Clang and the MLIR translator populate the per-entry array in parallel with the
other MapInfosTy arrays.

Address review:
  - Rename MapSkipMemberOfArrayTy to MapHasAttachPtrArrayTy to match the
    HasAttachPtr field it backs.
  - Restructure the emitUserDefinedMapper comment into a bulleted (*)/(**)/(***)
    list keyed to the example entries.
  - Reword the Clang comments: HasAttachPtr marks pointee entries that have a
    base attach-ptr; a combined entry has a base attach-ptr if its constituents
    do; cross-reference emitUserDefinedMapper for the MEMBER_OF rationale.
  - Update the moved present-check tests to their now-correct behavior (the
    attach-style maps make the inbounds present checks pass and remove the
    "explicit extension" errors).

    [2 lines not shown]
DeltaFile
+196-160clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+68-60clang/test/OpenMP/declare_mapper_codegen.cpp
+56-15llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+65-5clang/lib/CodeGen/CGOpenMPRuntime.cpp
+18-24offload/test/mapping/mapper_enter_data_always_present_ptee.c
+18-22offload/test/mapping/mapper_map_mbr_then_present_mbr_ptee.c
+421-28611 files not shown
+493-36117 files

LLVM/project acafa3cclang/test/OpenMP declare_mapper_codegen.cpp target_map_array_section_of_structs_with_nested_mapper_codegen.cpp, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OpenMP] Propagate ALWAYS/DELETE/CLOSE map-type modifiers to mapper entries

When a map clause uses a user-defined mapper, the map-type-modifying bits
(ALWAYS, DELETE, CLOSE) on the outer clause must apply to each map the mapper
inserts (OpenMP 6.0:281:34). Propagate them in emitUserDefinedMapper by OR-ing
the imported modifier bits into each pushed component, except ATTACH entries
(ATTACH|ALWAYS is reserved for attach(always) and the other bits are
meaningless for ATTACH).

PRESENT is intentionally not propagated here yet (a TODO notes it is handled in
a follow-on, since it requires distinguishing pointee entries from the struct's
own storage).

Update offload mapper_map_always_from.c to its now-correct behavior: ALWAYS
forces a member copy-back that the ref count would otherwise suppress, so s.y
reads back as 111 (it was 0 before this change).

Co-Authored-By: Claude Opus 4.8 <noreply at anthropic.com>
DeltaFile
+152-136clang/test/OpenMP/target_map_nested_ptr_member_mapper_codegen.cpp
+87-77clang/test/OpenMP/target_map_array_section_of_structs_with_nested_mapper_codegen.cpp
+87-77clang/test/OpenMP/target_map_array_of_structs_with_nested_mapper_codegen.cpp
+38-2llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+27-9clang/test/OpenMP/declare_mapper_codegen.cpp
+8-15offload/test/mapping/mapper_map_always_from.c
+399-3165 files not shown
+422-33711 files

LLVM/project 289a2d9mlir/include/mlir/Dialect/Linalg Passes.td, mlir/include/mlir/Dialect/Linalg/Transforms Transforms.h

[mlir][LinalgBlockPackMatmul] Add support for scalable block factors (#211354)

Assisted by: Claude Sonnet 4.6

---------

Co-authored-by: Adam Siemieniuk <adam.siemieniuk at intel.com>
DeltaFile
+272-0mlir/test/Dialect/Linalg/block-pack-matmul-scalable.mlir
+51-3mlir/lib/Dialect/Linalg/Transforms/BlockPackMatmul.cpp
+5-3mlir/include/mlir/Dialect/Linalg/Passes.td
+5-0mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
+333-64 files

LLVM/project a41a335flang/include/flang/Evaluate characteristics.h, flang/lib/Evaluate characteristics.cpp

[flang][cuda] Do not check dummy in stmt function in device code (#212037)
DeltaFile
+11-0flang/test/Semantics/CUDA/cuf02.cuf
+3-2flang/lib/Semantics/check-call.cpp
+3-0flang/include/flang/Evaluate/characteristics.h
+1-0flang/lib/Evaluate/characteristics.cpp
+18-24 files

LLVM/project 79ea87cllvm/test/tools/llubi bytes_undef.ll loadstore_le.ll, llvm/tools/llubi/lib Value.h Context.cpp

[llubi] Add support for byte types (#200672)

This patch implements the support for byte types. The byte order depends
on the endianness for better performance in the fast path. For
non-byte-sized byte types, high bits are zeroed out.
DeltaFile
+120-1llvm/tools/llubi/lib/Value.cpp
+112-6llvm/tools/llubi/lib/Context.cpp
+88-0llvm/test/tools/llubi/loadstore_le.ll
+88-0llvm/test/tools/llubi/loadstore_be.ll
+85-1llvm/tools/llubi/lib/Value.h
+21-0llvm/test/tools/llubi/bytes_undef.ll
+514-810 files not shown
+606-1716 files

LLVM/project f83fcfbllvm/lib/CodeGen MachineVerifier.cpp, llvm/test/CodeGen/MIR/X86 machine-verifier-nophi.mir

[MachineVerifier] do not use !NoPHI to check if a MF has phi nodes (#211941)

We were violating the property expressed in MachineFunction.h:

```
The properties are stated in "positive" form; i.e. a pass could require
that the property hold, but not that it does not hold.
```

Resolves a false positive "MBB has allocatable live-in, [...]" error in
our downstream target.
DeltaFile
+21-0llvm/test/CodeGen/MIR/X86/machine-verifier-nophi.mir
+9-2llvm/lib/CodeGen/MachineVerifier.cpp
+30-22 files

LLVM/project fb8afd2llvm/test/tools/llvm-objcopy/ELF cross-arch-headers.test

[llvm-objcopy] Fix AMDGPU arch string in test: amdgpu not amdgcn

llvm-readobj reports 'Arch: amdgpu' for EM_AMDGPU ELF files
(the generic AMDGPU ELF format used by elf64-amdgpu). The test
was incorrectly expecting 'amdgcn', which is the AMDGCN-specific
arch string used by ROCm HSA code objects.
DeltaFile
+1-1llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
+1-11 files

LLVM/project 68e94c9clang/lib/StaticAnalyzer/Checkers LifetimeModeling.h LifetimeModeling.cpp, clang/test/Analysis dangling-ptr-deref.cpp

[analyzer] Improve dangling value tracking in DanglingPtrDeref (#211818)

Improve dangling value tracking in the `DanglingPtrDeref` checker by
adding `trackExpressionValue`. The report with this change now tracks
the dangling value and shows where the value originated from. Currently
the checker only points at the destruction and use sites which isn't
always useful for the user.
DeltaFile
+25-24clang/test/Analysis/dangling-ptr-deref.cpp
+13-15clang/lib/StaticAnalyzer/Checkers/DanglingPtrDeref.cpp
+8-0clang/lib/StaticAnalyzer/Checkers/LifetimeModeling.cpp
+4-0clang/lib/StaticAnalyzer/Checkers/LifetimeModeling.h
+50-394 files

LLVM/project 7336a38clang/lib/AST TypeLoc.cpp, clang/test/SemaCXX atomic-auto.cpp

[clang] Add missing VisitAtomicTypeLoc to TypeLoc.cpp GetContainedAutoTypeLocVisitor (#211752)

Adds the missing `VisitAtomicTypeLoc` method to TypeLoc.cpp `GetContainedAutoTypeLocVisitor`.

Fixes: https://github.com/llvm/llvm-project/issues/211556 ICE.

Assisted-by: Codex
DeltaFile
+7-0clang/test/SemaCXX/atomic-auto.cpp
+4-0clang/lib/AST/TypeLoc.cpp
+11-02 files

LLVM/project b2f9129llvm/test/CodeGen/AMDGPU maximumnum.ll amdgcn.bitcast.1024bit.ll, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-load-private.mir legalize-load-local.mir

Merge remote-tracking branch 'origin/main' into vplan-based-stride-mv-rt-guard
DeltaFile
+9,398-9,218llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
+6,993-6,921llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
+13,068-0llvm/test/CodeGen/RISCV/GlobalISel/atomicrmw-max-min-umax-umin.ll
+6,560-6,119llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+5,803-5,808llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
+5,575-5,393llvm/test/CodeGen/AMDGPU/maximumnum.ll
+47,397-33,4598,628 files not shown
+471,777-349,8588,634 files

LLVM/project f918c28clang/lib/Sema SemaStmt.cpp, clang/test/SemaCXX cxx2c-expansion-stmts.cpp

[Clang] [Sema] Use getCurFunctionDecl() to get the current function (#211938)

In `BuildReturnStmt()`, use `getCurFunctionDecl()` to get the current
function rather than attempting to cast `CurContext` to a
`FunctionDecl`, which breaks inside an expansion statement because the
current `DeclContext` will be that of the expansion statement, not the
function. `getCurFunctionDecl()` knows how to handle this case and we
already call it earlier in that function, so just reuse the result of
that call.

Fixes #211917.

(cherry picked from commit a891a5c40c7d2ed62d97fc6563cf256e7bab3ffb)
DeltaFile
+17-0clang/test/SemaCXX/cxx2c-expansion-stmts.cpp
+3-4clang/lib/Sema/SemaStmt.cpp
+20-42 files

LLVM/project 6781c9cllvm/lib/IR Constants.cpp

[IR] Slightly optimize getElementAsInteger() (#211550)

This regressed with the introduction of the byte type, because
getElementPointer() calls getElementByteSize() calls
getPrimitiveSizeInBits(), but the switch used getScalarTypeInBits(),
which means we need to do two separate calls for the element size. Use
getElementByteSize() in both places so these can be CSEd.

(cherry picked from commit bb22aa8127450930eb27215eb9f2c70acdee69fc)
DeltaFile
+10-10llvm/lib/IR/Constants.cpp
+10-101 files

LLVM/project a0177f7clang/lib/Analysis ThreadSafety.cpp, clang/test/Sema warn-thread-safety-analysis.c

Thread Safety Analysis: Don't warn at joins that re-branch on a try-lock result (#209796)

Previously, when the result of a try-lock call is branched on more than
once, the paths between the branches would disagree on whether the
capability is held while remaining consistent at each branch. The analysis
then gave a false positive warning at the intermediate join:

    mutex 'lock' is not held on every path through here

Create getTerminatorTrylockCall() helper from getEdgeLockset(); if the terminator
of a block branches on the result of a call to a try_acquire_capability-function
(perhaps negated or stored in a local variable), this helper returns that call and
its callee.

Use this new helper in getTerminatorTrylockCaps(), which will return the
capabilities acquired by a trylock; feed these capabilites to intersectAndWarn()
during a branch join, in order to avoid false positives.

Soundness is preserved because intersectAndWarn() still removes the

    [7 lines not shown]
DeltaFile
+102-31clang/lib/Analysis/ThreadSafety.cpp
+54-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+15-0clang/test/Sema/warn-thread-safety-analysis.c
+171-313 files

LLVM/project b229b35clang/lib/Analysis ThreadSafety.cpp, clang/test/SemaCXX warn-thread-safety-analysis.cpp

Thread Safety Analysis: Handle statement expressions in try-lock conditions (#209330)

Previously, statement expressions (`({ bool b = mu.TryLock(); b; })`)
used as try-lock conditions were not supported. Handle StmtExpr in
getTrylockCallExpr() by recursively analyzing the last statement of the
statement expression.
DeltaFile
+14-0clang/test/SemaCXX/warn-thread-safety-analysis.cpp
+5-0clang/lib/Analysis/ThreadSafety.cpp
+19-02 files

LLVM/project 82db1fellvm/include/llvm/TargetParser CMakeLists.txt, llvm/lib/Target/AMDGPU AMDGPUTargetParser.td R600Processors.td

AMDGPU: Add -gen-amdgpu-target-def TableGen backend

Currently subtarget information is duplicated between a def file and
the backend. There are also increasingly unwieldy mapping tables
for subarches. Work towards unifying these, starting with r600. This
mirrors aarch64 and riscv's existing custom targetparser backends (i.e.,
the prompt was copy what riscv does).

Co-authored-by: Claude (Claude-Opus-4.8)
DeltaFile
+135-0llvm/utils/TableGen/Basic/AMDGPUTargetDefEmitter.cpp
+24-21llvm/lib/Target/AMDGPU/R600Processors.td
+42-0llvm/test/TableGen/AMDGPUTargetDefErrors.td
+31-0llvm/lib/Target/AMDGPU/AMDGPUTargetParser.td
+4-4llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+3-0llvm/include/llvm/TargetParser/CMakeLists.txt
+239-252 files not shown
+242-258 files

LLVM/project c86b1c1llvm/docs ReleaseNotes.md

Add David's suggestion
DeltaFile
+1-1llvm/docs/ReleaseNotes.md
+1-11 files

LLVM/project 56a1c9dllvm/docs ReleaseNotes.md

Add release note for LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS
DeltaFile
+2-0llvm/docs/ReleaseNotes.md
+2-01 files

LLVM/project 0600aeallvm/lib/CodeGen/GlobalISel InlineAsmLowering.cpp, llvm/test/CodeGen/AArch64/GlobalISel irtranslator-inline-asm.ll

[AArch64][GlobalISel] Use integer types for inline assembly lowering (#212214)

If we need to generate a trunc then we can use an integer type for the
lowering.
DeltaFile
+14-14llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-inline-asm.ll
+3-5llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+17-192 files

LLVM/project 852577bllvm/test/tools/llvm-objcopy/ELF cross-arch-headers.test, llvm/tools/llvm-objcopy ObjcopyOptions.cpp

[AMDGPU] Add AMDGPU support for llvm-objcopy
DeltaFile
+11-2llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
+2-0llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+13-22 files

LLVM/project 8f02027llvm/lib/Transforms/Utils LoopUnroll.cpp, llvm/test/Transforms/LoopUnroll partial-unroll-reductions.ll

[LoopUnroll] Make the list of supported recurrence kinds inclusive. (#210957)

This excludes Sub, AddChainWithSubs, FSub and FAddChainWithSubs
recurrence kinds by making the list of supported types opt-in as opposed
to opt-out. This will hopefully mean that as more recurrence kinds are
added in the future, the list supported by the unrolling remains valid.

Fixes #201065

(cherry picked from commit cc1dd6bb25d00b3aa5420f43884bea3f4584cabf)
DeltaFile
+47-0llvm/test/Transforms/LoopUnroll/partial-unroll-reductions.ll
+11-4llvm/lib/Transforms/Utils/LoopUnroll.cpp
+58-42 files

LLVM/project b9a7aad.github/workflows release-tasks.yml

workflows/release-tasks: Fix permissions for release-documentation (#212310)
DeltaFile
+4-0.github/workflows/release-tasks.yml
+4-01 files

LLVM/project 02da012llvm/include/llvm/MC MCSubtargetInfo.h, llvm/lib/CodeGen TargetSubtargetInfo.cpp

TableGen: Use a compact table for CPU aliases (#211952)
DeltaFile
+94-45llvm/utils/TableGen/SubtargetEmitter.cpp
+29-6llvm/include/llvm/MC/MCSubtargetInfo.h
+19-11llvm/test/TableGen/ProcessorAlias.td
+21-9llvm/lib/MC/MCSubtargetInfo.cpp
+6-6llvm/lib/CodeGen/TargetSubtargetInfo.cpp
+3-3llvm/unittests/CodeGen/MFCommon.inc
+172-804 files not shown
+179-8610 files

LLVM/project 751eb22llvm/test/CodeGen/AArch64/GlobalISel ret-vec-promote.ll irtranslator-switch-bittest.ll, llvm/test/CodeGen/AMDGPU/GlobalISel irtranslator-function-args.ll irtranslator-call-return-values.ll

[AArch64][GlobalISel] Use integer type for truncating merged call args. (#212208)
DeltaFile
+16-16llvm/test/CodeGen/AArch64/GlobalISel/ret-vec-promote.ll
+14-14llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-function-args.ll
+6-6llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-call-return-values.ll
+5-5llvm/test/CodeGen/AMDGPU/GlobalISel/store-weird-size.ll
+2-2llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-switch-bittest.ll
+2-2llvm/test/CodeGen/AArch64/GlobalISel/vec-param.ll
+45-451 files not shown
+46-467 files

LLVM/project ad791f2compiler-rt/lib/scudo/standalone/tests combined_test.cpp

[scudo] Test to verify fork and allocate does not deadlock. (#211975)
DeltaFile
+79-0compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+79-01 files

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

AMDGPU: Use uint8_t for IsaVersion fields

Makes processor info tables slightly smaller
DeltaFile
+3-3llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
+3-31 files

LLVM/project 5565740lld/ELF SyntheticSections.h Relocations.cpp, lld/test/ELF x86-64-gotpc-relax-too-far-relr.s

[lld] Don't drop RELR relocations for late-added GOT entries (#211911)

In #208959 we started dropping RELR relocations for late-added GOT
entries when reverting x86-64 GOTPCRELX relaxations in
X86_64::relaxOnce.

There is a separate unrelaxation bug where if the object files didn't
have any relocations of a certain type, we'd prune .relr.dyn (or even
.rela.dyn). Will be addressed separately.

Assisted-by: Gemini
DeltaFile
+26-0lld/test/ELF/x86-64-gotpc-relax-too-far-relr.s
+6-2lld/ELF/SyntheticSections.h
+2-2lld/ELF/Relocations.cpp
+34-43 files

LLVM/project dfce6ddllvm/test/tools/llvm-objcopy/ELF cross-arch-headers.test, llvm/tools/llvm-objcopy ObjcopyOptions.cpp

[AMDGPU] Add AMDGPU support for llvm-objcopy
DeltaFile
+11-2llvm/test/tools/llvm-objcopy/ELF/cross-arch-headers.test
+2-0llvm/tools/llvm-objcopy/ObjcopyOptions.cpp
+13-22 files