LLVM/project 01f11fellvm/lib/Target/RISCV RISCVISelLowering.cpp RISCVTargetTransformInfo.cpp

[RISCV] Remove redundant check for Subtarget.hasStdExtZbc(). NFC (#225152)

Zbc implies Zbkc so we only need to check Zbkc.
DeltaFile
+1-2llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+1-1llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-32 files

LLVM/project f4b56fcclang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaExprMember.cpp

[HLSL][Sema] Reject unsupported vector swizzles (#225286)

fixes #216199

This started out as rejecting swizzles for long vectors. But it turns
out we did not remove opencl accessors so this change also does that.

HLSL vector swizzles are limited to the xyzw and rgba component sets and
vectors of up to four elements.
DeltaFile
+14-0clang/lib/Sema/SemaExprMember.cpp
+11-0clang/test/SemaHLSL/Types/invalid-longvec-swizzle.hlsl
+8-0clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzleErrors.hlsl
+2-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+35-04 files

LLVM/project 743e1b5llvm/lib/Target/AMDGPU AMDGPU.td, llvm/lib/TargetParser AMDGPUTargetParser.cpp

[AMDGPU] Add `getLDSEncodingGranule` to TargetParser (#224852)

Model LDS encoding granularity with dedicated features and expose the
byte-valued `getLDSEncodingGranule` query for GPUKind and subarch.

Migrate program resource register and PAL metadata encoding to the new
query and remove `getLdsDwGranularity` from `AMDGPUBaseInfo`

---

This PR is inspired by https://github.com/llvm/llvm-project/pull/219495.

> The AMDGPU backend uses the wrong LDS allocation granularity when
computing occupancy for RDNA 2 targets starting from GFX10.3. The
current value is correct for the PAL metadata, but leads to wrong
occupancy calculations as observed by users.. The values correspond to
the Mesa implementation, see
https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/common/ac_shader_util.h#L355.
DeltaFile
+57-31llvm/unittests/TargetParser/TargetParserTest.cpp
+37-5llvm/test/TableGen/AMDGPUTargetDefLDSAllocGranularity.td
+34-0llvm/test/CodeGen/AMDGPU/lds-size-gfx9-4-generic.ll
+26-1llvm/lib/TargetParser/AMDGPUTargetParser.cpp
+26-0llvm/test/CodeGen/AMDGPU/lds-size-gfx1030.ll
+20-0llvm/lib/Target/AMDGPU/AMDGPU.td
+200-377 files not shown
+234-5913 files

LLVM/project f4b5a0boffload/languages/kernel/src State.cpp

[Offload] Use LLVM likely/unlikely macros (#224716)

This is an additional patch to #224047, which makes the offload
components buildable with relatively old c++17-supporting compilers.
DeltaFile
+3-2offload/languages/kernel/src/State.cpp
+3-21 files

LLVM/project b9da7a3mlir/test/Dialect/Tosa constant_folding.mlir tosa-infer-shapes.mlir

[MLIR][TOSA] Enable strict property assembly format (#217291)

Enable strict properties-in-assembly-format mode for TOSA. Bind TOSA
operation properties directly in declarative assembly formats so strict
parsing does not rely on property dictionaries.

Update the TOSA tests to use the direct property spelling.

Assisted-by: Codex
DeltaFile
+394-394mlir/test/Dialect/Tosa/canonicalize.mlir
+348-320mlir/test/Dialect/Tosa/invalid.mlir
+316-316mlir/test/Dialect/Tosa/verifier.mlir
+319-305mlir/test/Dialect/Tosa/ops.mlir
+308-308mlir/test/Dialect/Tosa/tosa-infer-shapes.mlir
+275-275mlir/test/Dialect/Tosa/constant_folding.mlir
+1,960-1,91858 files not shown
+3,756-3,87264 files

LLVM/project 7a3a1a9clang/lib/CIR/Dialect/IR CIRDialect.cpp, clang/lib/CIR/Dialect/Transforms TargetLowering.cpp CIRTransformUtils.cpp

[clang][CIR] Stop using Operation::getAttrs (NFC) (#223048)

Migrate CIR printing, attribute copying, and lowering to the explicit
inherent and discardable attribute APIs.

This is part of a general migration to use the "new" properties-based
APIs and stop mixing discardable/inherent attributes, see #155475

Assisted-by: Codex
DeltaFile
+67-60clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+25-31clang/lib/CIR/Dialect/Transforms/CXXABILowering.cpp
+18-24clang/lib/CIR/Dialect/Transforms/CIRTransformUtils.cpp
+23-10clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+18-6clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
+11-12clang/lib/CIR/Dialect/Transforms/TargetLowering.cpp
+162-1434 files not shown
+211-16010 files

LLVM/project e53da57llvm/docs AMDGPUUsage.rst

Remove unnecessary paragraph
DeltaFile
+0-5llvm/docs/AMDGPUUsage.rst
+0-51 files

LLVM/project 660bffbllvm/test/Transforms/SLPVectorizer/AArch64 splat-gather-subtree-reuse.ll

[SLP][NFC]Add a test with a missed vectorization, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/225448
DeltaFile
+101-0llvm/test/Transforms/SLPVectorizer/AArch64/splat-gather-subtree-reuse.ll
+101-01 files

LLVM/project ae82b85llvm/include/llvm/Support MemoryBuffer.h FileSystem.h, llvm/lib/Support/Unix Path.inc

[llvm][Support] Make sys::fs::file_t into a seperate type (#224859)
DeltaFile
+57-0llvm/include/llvm/Support/File.h
+29-26llvm/lib/Support/Windows/Path.inc
+17-14llvm/lib/Support/Unix/Path.inc
+6-16llvm/include/llvm/Support/FileSystem.h
+10-3llvm/unittests/Support/MemoryBufferTest.cpp
+1-11llvm/include/llvm/Support/MemoryBuffer.h
+120-704 files not shown
+129-7910 files

LLVM/project 9d856cfclang/test/CodeGen veclib-darwin-libsystem-m.c, llvm/include/llvm/Analysis VecFuncs.def

[TLI][Darwin] Add mappings for 16 more libsystem_m vector functions (#224792)

The Darwin_libsystem_m veclib table mapped 17 of the 38 stems exported
by libsystem_m.dylib. This adds 16 more, in both VecFuncs.def and the
DARWIN_LIBSYSTEM_M_VECFUNCS defset, bringing it to 33.

The remaining 5 are round, fma, fmod, sincos and sincospi; see #223283
for why each is skipped or deferred.

Fixes #223283
DeltaFile
+768-0llvm/test/Transforms/LoopVectorize/AArch64/veclib-calls-libsystem-darwin.ll
+96-0llvm/test/CodeGen/Generic/replace-intrinsics-with-veclib-darwin-libsystem-m.ll
+43-0llvm/include/llvm/Analysis/VecFuncs.def
+34-0llvm/include/llvm/IR/RuntimeLibcalls.td
+13-0clang/test/CodeGen/veclib-darwin-libsystem-m.c
+954-05 files

LLVM/project 06b71c9clang/include/clang/CIR/Dialect/IR CIROps.td CIRTypeConstraints.td, clang/test/CIR/CodeGen vector-bool.cpp

[CIR] Support vector of boolean in cir.minus op (#217089)

Support the Vector of bool type in the minus operation
DeltaFile
+19-0clang/test/CIR/CodeGen/vector-bool.cpp
+6-0clang/include/clang/CIR/Dialect/IR/CIRTypeConstraints.td
+1-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+26-13 files

LLVM/project 26f8b17llvm/docs AMDGPUUsage.rst

Link to `amdgpu-async-operations`
DeltaFile
+2-2llvm/docs/AMDGPUUsage.rst
+2-21 files

LLVM/project efec798llvm/lib/CodeGen/SelectionDAG DAGCombiner.cpp

DAG: Preserve poison in some cast folds (#225403)
DeltaFile
+24-14llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+24-141 files

LLVM/project ef9ac4bllvm/lib/IR PassManager.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+2-1llvm/lib/IR/PassManager.cpp
+2-11 files

LLVM/project f83f2fcllvm/lib/CodeGen StackColoring.cpp, llvm/lib/CodeGen/SelectionDAG SelectionDAGISel.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+6-5llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+5-1llvm/lib/Target/WebAssembly/GISel/WebAssemblyPostLegalizerCombiner.cpp
+4-1llvm/lib/Target/WebAssembly/GISel/WebAssemblyPreLegalizerCombiner.cpp
+2-2llvm/lib/Target/AMDGPU/AMDGPURegBankCombiner.cpp
+3-1llvm/lib/Target/SPIRV/SPIRVPreLegalizerCombiner.cpp
+3-1llvm/lib/CodeGen/StackColoring.cpp
+23-119 files not shown
+39-1815 files

LLVM/project bfd6645llvm/lib/IR PassManager.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-1llvm/lib/IR/PassManager.cpp
+2-11 files

LLVM/project 51066c5llvm/include/llvm/CodeGen LiveDebugVariables.h, llvm/lib/CodeGen RegAllocGreedy.cpp LiveDebugVariables.cpp

[LiveDebugVariables] Repair stale SlotIndexes

The analysis keeps its indexes from before the first register allocator
until DBG_VALUEs are emitted, by which point passes in between have
erased some of the instructions they point at. Resolve them at the
start of each allocator run and before emitting.

SlotIndexes can then reclaim the entries of erased instructions without
sparing the ones held here, which would have made generated code depend
on -g. Emitted locations are unchanged, except that intervals resolving
to one position now emit a single DBG_VALUE rather than identical
consecutive ones.
DeltaFile
+135-0llvm/lib/CodeGen/LiveDebugVariables.cpp
+57-0llvm/test/DebugInfo/AMDGPU/live-debug-vars-stale-slot-indexes.ll
+8-4llvm/test/DebugInfo/MIR/X86/live-debug-vars-unused-arg-debugonly.mir
+8-0llvm/include/llvm/CodeGen/LiveDebugVariables.h
+7-0llvm/lib/CodeGen/RegAllocGreedy.cpp
+4-2llvm/test/CodeGen/X86/debug-spilled-snippet.mir
+219-61 files not shown
+223-87 files

LLVM/project 2c242cfllvm/include/llvm/CodeGen SlotIndexes.h, llvm/lib/CodeGen SlotIndexes.cpp

[SlotIndexes] Add queries for stale indexes

An erased instruction leaves its index list entry in place, making the
index indistinguishable from a block boundary entry. Add
isBlockBoundaryIndex() and isStaleIndex() to tell the two apart, and
canonicalizeIndex() to resolve a stale index to the closest preceding
instruction's register slot, or the block start if none survives.

NFC. No caller yet. LiveDebugVariables is next.
DeltaFile
+207-0llvm/unittests/CodeGen/SlotIndexesTest.cpp
+29-0llvm/lib/CodeGen/SlotIndexes.cpp
+14-0llvm/include/llvm/CodeGen/SlotIndexes.h
+1-0llvm/unittests/CodeGen/CMakeLists.txt
+251-04 files

LLVM/project d92d561flang/lib/Optimizer/OpenMP LowerWorkdistribute.cpp, flang/test/Transforms/OpenMP lower-workdistribute-target-map-members.mlir

[flang][OpenMP] Fix dangling map.info members in workdistribute target split
DeltaFile
+49-24flang/lib/Optimizer/OpenMP/LowerWorkdistribute.cpp
+43-0flang/test/Transforms/OpenMP/lower-workdistribute-target-map-members.mlir
+92-242 files

LLVM/project 4790b21llvm/lib/Transforms/Vectorize VPlanHelpers.h VPlanRecipes.cpp

[VPlan] Add more generic VPCostContext::getCostDivisor (NFC). (#225413)

Replace getReplicateRegionCostDivisor with more general getCostDivisor,
which takes a frequency directly.

The frequency lookup is now done at the 3 call sites, which all have the
region at hand.

Will also be used in https://github.com/llvm/llvm-project/pull/196845.

PR: https://github.com/llvm/llvm-project/pull/225413
DeltaFile
+3-7llvm/lib/Transforms/Vectorize/VPlan.cpp
+6-3llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+3-3llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+12-133 files

LLVM/project bc6fd46llvm/test/CodeGen/X86 sse2-intrinsics-x86-upgrade.ll

[X86] sse2-intrinsics-x86-upgrade.ll - cleanup bitrotted check prefixes (#225426)

Removed leftover SKX and AVX2 check prefixes - the update script only
removes unused check lines mentioned in the RUNs
DeltaFile
+0-32llvm/test/CodeGen/X86/sse2-intrinsics-x86-upgrade.ll
+0-321 files

LLVM/project c027243llvm/lib/CodeGen/SelectionDAG LegalizeVectorTypes.cpp, llvm/test/CodeGen/SystemZ mixed-ptr-sizes.ll

SelectionDAG: Don't pad the source of ADDRSPACECAST if it's legal. (#225390)

With this use case `%out = addrspacecast <2 x ptr> %in to <2 x ptr
addrspace(1)>` on z/OS, the res type is `v2i32` (illegal) and the source
type is `v2i64` (legal).
Padding the source up to `v4i64` makes it illegal on z/OS and breaks the
type legalization.
DeltaFile
+33-0llvm/test/CodeGen/SystemZ/mixed-ptr-sizes.ll
+5-3llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+38-32 files

LLVM/project 6dcf590.github/workflows bazel-checks.yml

[GitHub] Avoid downloading outputs during Bazel tests when possible (#224725)

PR adds
[`--remote_download_outputs=minimal`](https://bazel.build/reference/command-line-reference#param-remote-download-outputs-1)
to bazel tests in CI. I noticed recently that `Bazel Build/Test` takes
~2m to run even when everything is cached. It looks like it's
downloading ~1GiB of artifacts from the remote cache. For example, in [a
recent
run](https://github.com/llvm/llvm-project/actions/runs/35147456695/job/104967035656):

```
[82,641 / 90,341] 1094 / 7245 tests; Linking external/+_repo_rules+llvm-project/flang/lib/Semantics/libFortranSemantics.a; Downloading external/+_repo_rules+llvm-project/flang/lib/Semantics/libFortranSemantics.a, 260.4 MiB / 288.7 MiB; 1s remote-cache ... (62 actions, 10 running)
[88,426 / 91,191] 1238 / 7245 tests; Linking external/+_repo_rules+llvm-project/mlir/mlir-reduce; Downloading external/+_repo_rules+llvm-project/mlir/mlir-reduce, 337.0 MiB / 344.6 MiB; 13s remote-cache ... (58 actions, 0 running)
[88,870 / 92,185] 1315 / 7245 tests; Linking external/+_repo_rules+llvm-project/mlir/mlir-query; Downloading external/+_repo_rules+llvm-project/mlir/mlir-query, 241.9 MiB / 264.2 MiB; 11s remote-cache ... (55 actions, 0 running)
...
Executed 0 out of 7245 tests: 7245 tests pass.
```

Using this flag saves ~20-30s on my machine. After this PR, the majority

    [3 lines not shown]
DeltaFile
+1-0.github/workflows/bazel-checks.yml
+1-01 files

LLVM/project 0a7c62allvm/lib/CAS OnDiskGraphDB.cpp, llvm/lib/DWARFLinker/Parallel SyntheticTypeNameBuilder.h DWARFEmitterImpl.h

[llvm] Remove declarations without definitions (NFC) (#225320)

DataRecordHandle::create and DataRecordHandle::construct in
llvm/lib/CAS/OnDiskGraphDB.cpp: The unused definitions were removed on
November 24, 2025 in commit f21857313dfab543e66ef43b1aed43b685794a7c.

dwarf_linker::parallel::DwarfEmitterImpl::emitStringsImpl in
llvm/lib/DWARFLinker/Parallel/DWARFEmitterImpl.h: Added on May 20, 2023
in commit 5f2a7fa67e9b6081a1a750ecea1216d53287eaa0 without a definition
or any callers (only DWARFLinkerImpl::emitStringsImpl was defined).

dwarf_linker::parallel::SyntheticTypeNameBuilder::addOrderedName
(2-argument overload) in
llvm/lib/DWARFLinker/Parallel/SyntheticTypeNameBuilder.h: Added on
November 23, 2023 in commit b61ac4a88f934ab5c02ee2a4957fb1b9943e7a5d
without a definition or any callers.

pdb::GSIHashStreamBuilder::finalizePublicBuckets and
pdb::GSIHashStreamBuilder::finalizeGlobalBuckets in

    [42 lines not shown]
DeltaFile
+0-10llvm/lib/DWARFLinker/Parallel/DWARFEmitterImpl.h
+0-5llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h
+0-3llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
+0-3llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
+0-3llvm/lib/DWARFLinker/Parallel/SyntheticTypeNameBuilder.h
+0-3llvm/lib/CAS/OnDiskGraphDB.cpp
+0-275 files not shown
+0-3411 files

LLVM/project 74ae45dclang/test/CodeGen/AArch64 neon-intrinsics.c neon-ldst-one.c, clang/test/CodeGen/AArch64/neon load.c

Merge after updating precommit tests

Merge branch 'users/zGoldthorpe/wg2wf-nodma/precommit' into users/zGoldthorpe/wg2wf-nodma/simple-demote
DeltaFile
+4,372-0clang/test/OpenMP/structured-bindings-codegen.cpp
+2,456-1,876llvm/test/CodeGen/AMDGPU/memory-legalizer-single-wave-workgroup-memops.ll
+0-2,567clang/test/CodeGen/AArch64/neon-ldst-one.c
+2,310-0clang/test/CodeGen/AArch64/neon/load.c
+0-1,344clang/test/CodeGen/AArch64/neon-intrinsics.c
+1,309-14llvm/unittests/Frontend/HLSLSemanticSignaturePackingTest.cpp
+10,447-5,8011,037 files not shown
+45,363-14,2901,043 files

LLVM/project 8306f77mlir/include/mlir/Dialect/Arith/IR ArithOps.td, mlir/lib/Conversion/VectorToLLVM ConvertVectorToLLVM.cpp

[mlir][arith] Add minimumnumf and maximumnumf operations (#221658)

Add `arith.minimumnumf` and `arith.maximumnumf`, following
`minimumNumber` and `maximumNumber` from IEEE 754-2019 and the
`llvm.minimumnum`/`llvm.maximumnum` intrinsics. They differ from the
existing `arith.minnumf`/`arith.maxnumf` only in their treatment of
signaling NaNs: the new ops deterministically return the non-NaN
operand, whereas minnumf/maxnumf may return either NaN or the other
operand.
DeltaFile
+166-0mlir/test/Integration/Dialect/Vector/CPU/reductions-masked-minmaxnum-f32.mlir
+130-0mlir/test/Conversion/VectorToLLVM/vector-reduction-to-llvm.mlir
+82-0mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
+76-0mlir/test/Dialect/XeGPU/xegpu-wg-to-sg.mlir
+52-0mlir/include/mlir/Dialect/Arith/IR/ArithOps.td
+48-0mlir/test/Conversion/VectorToLLVM/vector-to-llvm-interface.mlir
+554-014 files not shown
+741-1020 files

LLVM/project fd016b7clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP flatten_depth_ast_print.cpp flatten_codegen.cpp

[Clang][OpenMP] Add `#pragma omp flatten` loop directive + `depth` clause (#206977)

Adds the OpenMP 6.1:  `Flatten Construct` + `depth Clause`.
Referred in Section 17.4 and Section 6.4.7 respectively in [Technical
Report 15](https://www.openmp.org/wp-content/uploads/openmp-TR15.pdf)
DeltaFile
+393-0clang/lib/Sema/SemaOpenMP.cpp
+158-0clang/test/OpenMP/flatten_depth_codegen.cpp
+154-0clang/test/OpenMP/flatten_ast_print.cpp
+142-0clang/test/OpenMP/flatten_messages.cpp
+103-0clang/test/OpenMP/flatten_codegen.cpp
+97-0clang/test/OpenMP/flatten_depth_ast_print.cpp
+1,047-050 files not shown
+2,069-556 files

LLVM/project 8927b90llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h LoopVectorizationPlanner.cpp

Always pass a vector type to TTI.isLegalMaskedCompressStore/ExpandLoad
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+4-3llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.cpp
+1-1llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+9-83 files

LLVM/project f209e82clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/Lowering ptr-stride-index-width.cpp ptr-stride-index-width.cir

[CIR] Don't delete 'sub' op during 'convertToIndexTy' (#225231)

This showed up in a SPEC benchmark: IF that sub operation is still being
used, deleting it causes us to orphan its other uses, causing a
conversion failure. We can't actually delete it, as we have no way of
knowing whether it has other uses (since we're in the process of
    removing at least one of its uses?). SO this patch is going to just
count on dead-code elemination to remove this sub after we stop using
its value, if at all possible.
DeltaFile
+26-0clang/test/CIR/Lowering/ptr-stride-index-width.cir
+14-0clang/test/CIR/Lowering/ptr-stride-index-width.cpp
+0-2clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+40-23 files

LLVM/project 6c98a37lldb/include/lldb/Target Platform.h, lldb/include/lldb/Utility XcodeSDK.h

[lldb][NFC] Move XcodeSDK's sysroot into a separate XcodeSDKAndSysroot class (#224361)

`XcodeSDK` carried two unrelated things: the SDK identity parsed out of
an SDK directory name (`"MacOSX14.0.sdk"`), and the sysroot the compiler
recorded in `DW_AT_LLVM_sysroot`. The second is an absolute path on the
build machine and is only there when the SDK was read out of debug info.

Callers have no way to tell the two states apart.

This patch splits out `XcodeSDKAndSysroot`, which groups an `XcodeSDK`
with its sysroot. `XcodeSDK` keeps only the parsed SDK name, so
`XcodeSDK::Merge` no longer touches a sysroot.
`XcodeSDKAndSysroot::Merge` does that instead.

It follows the rules below:

- When the other SDK wins the merge, its sysroot comes with it.
- When merging only adds the `Internal` suffix to our own SDK name, the
sysroot is renamed alongside it, unless it does not name an SDK

    [2 lines not shown]
DeltaFile
+44-14lldb/unittests/Utility/XcodeSDKTest.cpp
+29-12lldb/source/Utility/XcodeSDK.cpp
+29-8lldb/include/lldb/Utility/XcodeSDK.h
+18-9lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+9-3lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
+4-4lldb/include/lldb/Target/Platform.h
+133-508 files not shown
+147-6114 files