LLVM/project cc95b1ellvm/lib/Target/AMDGPU SIInstructions.td SIISelLowering.cpp

[Review] Move the unroll of trunc v2i64 to v2i32 out of performShlCombine
DeltaFile
+14-0llvm/lib/Target/AMDGPU/SIInstructions.td
+3-2llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+0-5llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
+17-73 files

LLVM/project d4dd90amlir/include/mlir/Dialect/Tosa/IR TosaTypesBase.td TosaComplianceData.h.inc, mlir/lib/Dialect/Tosa/IR TosaOps.cpp

[mlir][tosa] Add constant block scaled support (#205506)

This commit adds support for block scaled tensors.

In particular, the block scaled type has been extended with the
`DenseElementTypeInterface` to allow block scaled data values to be
specified in dense element attributes.

The block scaled type has also been extended to allow optional scale
values to be specified by the type. For now, scale values are not
expected to be propagated beyond their use in the attribute input of a
constant operation. In the future, we may want to propagate these values
to allow certain optimizations.

The `tosa.const` operation has also been updated in the validation pass.
DeltaFile
+128-12mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+72-0mlir/test/Dialect/Tosa/ops.mlir
+68-0mlir/test/Dialect/Tosa/verifier.mlir
+18-5mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td
+19-1mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc
+18-0mlir/test/Dialect/Tosa/tosa-validation-version-1p0-invalid.mlir
+323-184 files not shown
+348-2410 files

LLVM/project 161dc1dcmake/Modules GetTripleCMakeSystemName.cmake

cmake: Try to derive CMAKE_SYSTEM_NAME from unnormalized triples

get_triple_cmake_system_name() assumed a fully-normalized triple of the form
arch-vendor-os[-env] and read the OS and environment from fixed positions.

Unnormalized triples often omit the vendor and/or environment
(e.g. "aarch64-linux-android21", "aarch64-linux-gnu", "wasm32-wasi"),
so those fixed positions are wrong, and the function returned
bogus results, e.g.. "aarch64-linux-android21" -> Generic.

This was expecting to get a normalized triple by running clang -print-target-triple,
but that may not always work.

Scan all triple components for the known OS and environment tokens instead of
reading fixed positions. Ideally we would have a full triple normalization
function in cmake that mirrors the normalization in Triple.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
DeltaFile
+97-62cmake/Modules/GetTripleCMakeSystemName.cmake
+97-621 files

LLVM/project dd82416offload/liboffload/API Memory.td, offload/liboffload/src OffloadImpl.cpp

[offload] Add olMemPrefetch to liboffload (#206752)

Adds olMemPrefetch and the OL_MEM_MIGRATION_FLAG_* enum, wired through a
new dataPrefetchImpl on the plugin interface with Level Zero and CUDA
implementations. Backends without prefetch support inherit the default
no-op.

Prefetch is a hint that migrates a USM allocation between the host and a
device so subsequent accesses on the target side are faster.

Assisted-by: Claude
DeltaFile
+149-0offload/unittests/OffloadAPI/memory/olMemPrefetch.cpp
+47-0offload/plugins-nextgen/cuda/src/rtl.cpp
+41-0offload/liboffload/API/Memory.td
+21-0offload/plugins-nextgen/level_zero/src/L0Device.cpp
+11-0offload/liboffload/src/OffloadImpl.cpp
+11-0offload/plugins-nextgen/common/include/PluginInterface.h
+280-07 files not shown
+320-013 files

LLVM/project 361a3e6llvm/lib/Transforms/Vectorize VectorCombine.cpp, llvm/test/Transforms/VectorCombine load-insert-store.ll

[VectorCombine] Fix bailing out of the foldSingleElementStore with a freeze-pending index (#207702)

`foldSingleElementStore` calls `canScalarizeAccess` to decide whether a
single-element store can be scalarized. When the insert index is not a
constant, is provably in-bounds and may be poison, `canScalarizeAccess`
returns `SafeWithFreeze` and stashes a `ToFreeze` value that must later
be consumed by `freeze()` or cleared by `discard()`.

The bail-out for memory being modified between the load and store was
folded into same condition as the scalarizability check:

```cpp
auto ScalarizableIdx = canScalarizeAccess(...);
if (ScalarizableIdx.isUnsafe() || isMemModifiedBetween(...))
  return false;
```

When the index took the `SafeWithFreeze` path and memory was modified
between the load and the store, `isMemModifiedBetween` returns true and

    [8 lines not shown]
DeltaFile
+20-0llvm/test/Transforms/VectorCombine/load-insert-store.ll
+4-3llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+24-32 files

LLVM/project b45d681libcxx/utils/ci buildkite-pipeline.yml

[libc++] Update the label for FreeBSD in CI to version 15.1 (#205417)

The FreeBSD libc++ CI has been bumped to the new FreeBSD release. The
remaining task to do is to bump the description in CI yaml file.
DeltaFile
+1-1libcxx/utils/ci/buildkite-pipeline.yml
+1-11 files

LLVM/project 1df703allvm/lib/Target/BPF BPFMIPeephole.cpp

BPF: Remove unnecessary isReg check for copy source (#208486)
DeltaFile
+0-3llvm/lib/Target/BPF/BPFMIPeephole.cpp
+0-31 files

LLVM/project ac25775llvm/include/llvm/IR ModuleSummaryIndex.h, llvm/lib/CodeGen/LiveDebugValues InstrRefBasedImpl.h InstrRefBasedImpl.cpp

Revert "[LLVM][NFC] Remove some global constructors (#208407)"

This reverts commit d68ad9ab736ec65a8addc67655a6b290a7f98307.
DeltaFile
+13-11llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
+9-9llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
+9-7llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
+11-4llvm/include/llvm/IR/ModuleSummaryIndex.h
+7-7llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
+10-3llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp
+59-4127 files not shown
+123-8233 files

LLVM/project d82a0d2libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members get_long.pass.cpp

[libc++] Add missing <string> include (#208281)

Fixes #182390
DeltaFile
+2-1libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long.pass.cpp
+2-11 files

LLVM/project ebe2afbclang/include/clang/AST OpenMPClause.h, clang/lib/AST OpenMPClause.cpp

[Clang][OpenMP] Add parsing/sema for dims modifier in num_threads
DeltaFile
+150-41clang/include/clang/AST/OpenMPClause.h
+78-34clang/lib/Parse/ParseOpenMP.cpp
+61-36clang/lib/Sema/SemaOpenMP.cpp
+62-0clang/test/OpenMP/dims_modifier_ast_print.cpp
+52-7clang/lib/AST/OpenMPClause.cpp
+53-1clang/test/OpenMP/dims_modifier_messages.cpp
+456-11927 files not shown
+588-20733 files

LLVM/project 0a69f16openmp/runtime/src kmp_traits.cpp kmp_traits.h, openmp/runtime/src/i18n en_US.txt

add lexer; improve structure
DeltaFile
+350-0openmp/runtime/unittests/Traits/TestOMPTraitLexer.cpp
+239-110openmp/runtime/src/kmp_traits.cpp
+96-5openmp/runtime/unittests/Traits/TestOMPTraitParser.cpp
+67-0openmp/runtime/src/kmp_traits.h
+2-1openmp/runtime/src/i18n/en_US.txt
+1-0openmp/runtime/unittests/Traits/CMakeLists.txt
+755-1166 files

LLVM/project 34bb48eclang/include/clang/Basic AttrDocs.td

[clang][docs] Fix coro_await_elidable bullet list rendering (NFC) (#208333)

Add the blank line required before the reStructuredText bullet list and
indent the continuation line for the second item. Without this, the
generated AttributeReference page does not render the
coro_await_elidable safe-elide-context bullets correctly.
DeltaFile
+2-1clang/include/clang/Basic/AttrDocs.td
+2-11 files

LLVM/project 3b2fe66flang/test/Parser/OpenMP apply01.f90 apply02.f90, llvm/include/llvm/Frontend/OpenMP OMP.td

[Flang][OpenMP] add Apply clause for OpenMP Flang (#204225)

This patch adds a parser and basic checks for the Apply clause from
OpenMP 6.0 in Flang.
It is missing semantic checks for nesting loop transformations that are
being worked on.
DeltaFile
+137-0flang/test/Parser/OpenMP/apply01.f90
+114-0flang/test/Parser/OpenMP/apply02.f90
+68-8llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+70-0llvm/test/TableGen/directive1.td
+59-0llvm/test/TableGen/directive2.td
+55-0llvm/include/llvm/Frontend/OpenMP/OMP.td
+503-814 files not shown
+748-1520 files

LLVM/project a6982e5llvm/test/CodeGen/X86 vector-shuffle-256-v16.ll

[X86] Add v16i16 shuffle tests for "shift + blend" pack patterns (#208481)

Shuffles that could be expanded by shifting one input and blending with
the second inplace input
DeltaFile
+100-0llvm/test/CodeGen/X86/vector-shuffle-256-v16.ll
+100-01 files

LLVM/project 7a48c2cclang/lib/CIR/CodeGen CIRGenRecordLayoutBuilder.cpp CIRGenModule.cpp, clang/test/CIR/CodeGen pointer-to-empty-data-member.cpp cross-reference-globals.c

[CIR] Represent 'empty' fields in structs/unions (#207033)

Since we do field based GEPs, it isn't really possible to do a
get-address-of a field without representing all the fields in a CIR
struct. This patch makes sure we do that, so we can do the proper GEPs.

This patch also as a drive-by fixes the case where we were searching for
the 'path' inside of an empty base, which we don't represent (and
probably should not need to?).

This patch ALSO adds some NYI diagnostics for cases where we try to get
the address of a `no-unique-address` field, which we are not currently
representing. In the future, we are going to have to start representing
no-unique-address fields inside of a struct as well (plus figure out how
to lower it properly in a way that gets the offsets right), but it isn't
clear this is immediately necessary (as you'd have to take an address of
one to notice?).
DeltaFile
+240-0clang/test/CIR/CodeGen/pointer-to-empty-data-member.cpp
+12-9clang/test/CIR/CodeGen/cross-reference-globals.c
+13-3clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+9-6clang/test/CIR/CodeGen/paren-list-agg-init.cpp
+15-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+5-0clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
+294-181 files not shown
+295-197 files

LLVM/project b684f1fllvm/test/CodeGen/ARM estimate-size-copy.mir

Fix expected function size in one test

I forgot to re-test llvm/test/CodeGen/ARM as well as /Thumb, oops.
DeltaFile
+1-1llvm/test/CodeGen/ARM/estimate-size-copy.mir
+1-11 files

LLVM/project d776ee4offload/plugins-nextgen/amdgpu CMakeLists.txt

offload: Use amdgpu triple name in plugin build (#208455)

The PGO tests expect the produced filename to match the triple.
The tool pulls the triple name from the binary's triple name, and the
RUN lines expect it to match the triple the build was configured with.
DeltaFile
+1-1offload/plugins-nextgen/amdgpu/CMakeLists.txt
+1-11 files

LLVM/project ee5f1f8llvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV][P-ext] Rewrite intrinsic widening code to be more agnostic to number of operands. NFC (#208335)

Copy the operands to a vector and use a loop to widen them.
DeltaFile
+9-21llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+9-211 files

LLVM/project d12356dllvm/include/llvm/CodeGen TargetLowering.h, llvm/lib/AsmParser LLParser.cpp

[IR] Allow integer vector atomicrmw (#190716)

Previously, we allowed floating-point vector atomicrmw, but not
integer-vector atomicrmw. Relax this restriction. By default, integer
vector atomicrmw will cmpxchg expand.

Assisted by AI
DeltaFile
+46-0llvm/test/Assembler/atomic.ll
+27-0llvm/unittests/IR/VerifierTest.cpp
+25-0llvm/test/Transforms/AtomicExpand/Mips/atomicrmw-vector.ll
+7-5llvm/lib/AsmParser/LLParser.cpp
+5-2llvm/include/llvm/CodeGen/TargetLowering.h
+2-2llvm/lib/IR/Verifier.cpp
+112-97 files not shown
+120-1613 files

LLVM/project da5119cllvm/lib/Target/BPF BPFMIPeephole.cpp, llvm/test/CodeGen/BPF mov32-64-subreg-source.mir

BPF: Fix misfolding subregisters

This would end up introducing a copy between registers
with mismatched sizes previously. Defends against verifier
failures in a future change.

The actual transform here should be deleted. Optimizations should
not be trying to introduce SUBREG_TO_REG.
DeltaFile
+43-0llvm/test/CodeGen/BPF/mov32-64-subreg-source.mir
+9-5llvm/lib/Target/BPF/BPFMIPeephole.cpp
+52-52 files

LLVM/project 9722a2cmlir/include/mlir/IR StorageUniquerSupport.h

[mlir][IR] Avoid Clang 21 crash during SFINAE overload resolution (#208359)

Clang 21.1.8 segfaults during SFINAE overload resolution for
T::getChecked
when matching non-pointer arguments against an unconstrained
MLIRContext*
parameter.

This patch avoids the crash by adding an explicit SFINAE constraint to
the second overload of StorageUserBase::getChecked, ensuring that it is
only considered when the second argument is convertible to MLIRContext*.

Assisted-by: Antigravity
DeltaFile
+9-2mlir/include/mlir/IR/StorageUniquerSupport.h
+9-21 files

LLVM/project ac41056llvm/lib/Target/BPF BPFMIPeephole.cpp

BPF: Remove unnecessary isReg check for copy source
DeltaFile
+0-3llvm/lib/Target/BPF/BPFMIPeephole.cpp
+0-31 files

LLVM/project 5ffb104clang/lib/Frontend InitPreprocessor.cpp, clang/lib/Headers stdint.h

[Clang] Define `__WCHAR_MIN__` and related macros (#208135)

Define `__WCHAR_MIN__`, `__WINT_MIN__`, and `__SIG_ATOMIC_MIN__` for
compatibility with GCC.

This also fixes targets such as `riscv*-netbsd` that define `WCHAR_MIN`
from `__WCHAR_MIN__`.

Reference:
https://gcc.gnu.org/onlinedocs/gcc-16.1.0/cpp/Common-Predefined-Macros.html
Closes #199678
DeltaFile
+44-44clang/test/Preprocessor/stdint.c
+5-14clang/lib/Headers/stdint.h
+11-0clang/lib/Frontend/InitPreprocessor.cpp
+8-0clang/test/Preprocessor/init-riscv.c
+4-0clang/test/Preprocessor/init.c
+3-0clang/test/Preprocessor/init-aarch64.c
+75-581 files not shown
+76-587 files

LLVM/project 6cdade4llvm/lib/Target/BPF BPFMIPeephole.cpp, llvm/test/CodeGen/BPF mov32-64-subreg-source.mir

BPF: Fix misfolding subregisters

This would end up introducing a copy between registers
with mismatched sizes previously. Defends against verifier
failures in a future change.

The actual transform here should be deleted. Optimizations should
not be trying to introduce SUBREG_TO_REG.
DeltaFile
+43-0llvm/test/CodeGen/BPF/mov32-64-subreg-source.mir
+7-3llvm/lib/Target/BPF/BPFMIPeephole.cpp
+50-32 files

LLVM/project aaad8b0clang/docs UsersManual.md StandardCPlusPlusModules.md

[clang][docs] Rewrite 20 selected Clang docs from reST to Markdown (#208310)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840
This change was produced with rst2myst plus LLM cleanups.

I manually paged through all of the linked HTML documents looking for
visual artifacts, and I fixed everything I found.

To reviewers: Please spot check the generated HTML below, and spot check
the diff to look for artifacts. This change is too large to review
everything line-by-line, but if you check 10 pages of documentation, and
only find one migration bug, I hope you think that this is good enough
to land. We have existing reST bugs that this fixes (mostly italic
blocks that should be code font spans).


    [89 lines not shown]
DeltaFile
+2,683-2,491clang/docs/UsersManual.md
+1,466-1,538clang/docs/StandardCPlusPlusModules.md
+579-713clang/docs/PointerAuthentication.md
+551-620clang/docs/HIPSupport.md
+465-613clang/docs/OpenMPSupport.md
+547-444clang/docs/Modules.md
+6,291-6,41914 files not shown
+7,927-8,27920 files

LLVM/project a335c13llvm/test/CodeGen/AMDGPU packed_shl64_combine.ll

[Review] Reduced the test and renames
DeltaFile
+111-172llvm/test/CodeGen/AMDGPU/packed_shl64_combine.ll
+111-1721 files

LLVM/project 2e81babmlir/include/mlir/Dialect/LLVMIR NVVMOps.td

[NVVM][MLIR] Fixed valgrind leak in MMAOp (#208063)

MmaOp::getIntrinsicID triggers an uninitialized-read warning under
Valgrind. `intOverflowBehavior` is optional; in the generated selector
its `has_value()` guarded access can be speculatively loaded before the
guard, reading the empty std::optional's uninitialized payload.

The read is benign: the payload is correctly stack-allocated but
uninitialized while empty, and the loaded value is discarded by the
guard, so this is not incorrect / undefined behavior.

This MR keeps the attribute as optional, but the lowering now resolves
it to a concrete value (wrapped when omitted) before calling
getIntrinsicID, so the selector always reads an initialized value.
`wrapped` matches the PTX spec and the existing lowering, where an
omitted attribute already selected the non-satfinite intrinsic;
intrinsic selection and printed IR are unchanged. Documentation updated
to correct the stale default.
DeltaFile
+11-4mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
+11-41 files

LLVM/project f98afd6clang/docs UsersManual.rst UsersManual.md

[clang][docs] Rename selected Clang docs {.rst,.md} (#208307)

Tracking issue: https://github.com/llvm/llvm-project/issues/201242
Migration guide docs:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
RFC:
https://discourse.llvm.org/t/rfc-make-myst-markdown-the-llvm-docs-format-rip-rest/90840

This is a rename-only commit that will temporarily break the docs build,
but it will fix after the follow-up PR lands.
DeltaFile
+0-6,268clang/docs/UsersManual.rst
+6,268-0clang/docs/UsersManual.md
+2,512-0clang/docs/StandardCPlusPlusModules.md
+0-2,512clang/docs/StandardCPlusPlusModules.rst
+1,749-0clang/docs/PointerAuthentication.md
+0-1,749clang/docs/PointerAuthentication.rst
+10,529-10,52938 files not shown
+17,214-17,21544 files

LLVM/project 2f79efallvm/lib/Target/SPIRV SPIRVModuleAnalysis.cpp SPIRVSymbolicOperands.td, llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_image_int64 image_int64.ll

[SPIR-V] Tie Int64ImageEXT to R64i/R64ui image format, not sampled type (#203005)

The capability is required by the R64i/R64ui Image Format per
SPV_EXT_shader_image_int64 spec, not by a 64-bit integer sampled type

Related SPIRV-LLVM-Translator PR that fixes this issue there:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/3773
DeltaFile
+20-0llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_image_int64/image_int64.ll
+0-10llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+3-5llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_bindless_images/bindless_images_generic.ll
+2-0llvm/lib/Target/SPIRV/SPIRVSymbolicOperands.td
+25-154 files

LLVM/project 7f99babclang/docs/HLSL HLSLDocs.md

Apply suggestion from @llvm-beanz

Co-authored-by: Chris B <chris.bieneman at me.com>
DeltaFile
+1-2clang/docs/HLSL/HLSLDocs.md
+1-21 files