LLVM/project c632208llvm/lib/Target/SystemZ SystemZELFAsmPrinter.h SystemZAsmPrinter.h

[SystemZ] Split SystemZAsmPrinter into 2 classes - ELF and XPLink (#214343)

This PR splits the ELF and XPLink implementations in the
SystemZAsmPrinter into 2 new classes. Each new class is derived from the
SystemZAsmPrinter class. This is to avoid adding `isOSzOS()` checks in
multiple places in SystemZAsmPrinter.

---------

Co-authored-by: Yusra Syeda <yusra.syeda at ibm.com>
DeltaFile
+17-1,275llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+859-0llvm/lib/Target/SystemZ/SystemZXPLINKAsmPrinter.cpp
+452-0llvm/lib/Target/SystemZ/SystemZELFAsmPrinter.cpp
+127-0llvm/lib/Target/SystemZ/SystemZXPLINKAsmPrinter.h
+4-99llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
+54-0llvm/lib/Target/SystemZ/SystemZELFAsmPrinter.h
+1,513-1,3741 files not shown
+1,515-1,3747 files

LLVM/project 4d98435llvm/lib/Target/SPIRV SPIRVLegalizePointerCast.cpp, llvm/test/CodeGen/SPIRV/passes SPIRVLegalizePointerCast.ll

 [SPIRV] Legalize byte-buffer reinterpretation ptrcasts (#192523) (#212999)

Fixes #192523 by extending SPIRVLegalizePointerCast to legalize
reinterpretation spv.ptrcasts on byte-addressable buffers ([0 x i8] /
RWByteAddressBuffer). When Clang emits a typed load or store through
such a pointer (e.g. i32, <4 x i32>), the pass now lowers it to valid
logical SPIR-V instead of hitting an unreachable or producing invalid
OpAccessChain into uchar storage.

For HLSL/Vulkan byte-address buffers, codegen produced IR like:

1.     spv.resource.getpointer → pointer tagged as i8 byte storage
2. spv.ptrcast → pointer tagged as the access type (i32, vector, etc.)
3. Typed load/store through the cast

The existing legalizer only handled aggregate layout mismatches (GEP
drilling, partial vector loads). When getPointerToFirstCompatibleType()
found no compatible nested type—as with flat byte buffers—it hit
llvm_unreachable.

    [15 lines not shown]
DeltaFile
+276-0llvm/test/CodeGen/SPIRV/passes/SPIRVLegalizePointerCast.ll
+231-20llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp
+23-0llvm/test/CodeGen/SPIRV/pointers/byte-address-buffer-store.ll
+23-0llvm/test/CodeGen/SPIRV/pointers/byte-address-buffer-load-float.ll
+22-0llvm/test/CodeGen/SPIRV/pointers/byte-address-buffer-load4.ll
+575-205 files

LLVM/project 7a5b505clang/test/CodeGen/LoongArch/lasx builtin.c builtin-alias.c, llvm/docs/GlobalISel GenericOpcode.md GenericOpcode.rst

Merge branch 'main' into users/shiltian/amdgpu-test-case-cleanup
DeltaFile
+376-1,106llvm/test/CodeGen/AArch64/fcvt-fixed.ll
+733-733clang/test/CodeGen/LoongArch/lasx/builtin.c
+733-733clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+0-1,275llvm/docs/GlobalISel/GenericOpcode.rst
+1,130-0llvm/test/CodeGen/AMDGPU/frexp-inf-nan-combine.ll
+1,116-0llvm/docs/GlobalISel/GenericOpcode.md
+4,088-3,847735 files not shown
+29,593-17,967741 files

LLVM/project a7bd549llvm/lib/Target/AMDGPU AMDGPUPrivateObjectVGPRs.cpp, llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR as-vgpr-private-object-vgprs.mir

Propagate object liveness to every changed successor, not only back edges
DeltaFile
+56-0llvm/test/CodeGen/AMDGPU/AddressSpaceVGPR/as-vgpr-private-object-vgprs.mir
+14-4llvm/lib/Target/AMDGPU/AMDGPUPrivateObjectVGPRs.cpp
+70-42 files

LLVM/project 9ca6ed7lldb/include/lldb/Host/linux Ptrace.h, lldb/source/Plugins/Process/Linux NativeRegisterContextLinux_loongarch64.cpp NativeRegisterContextLinux_arm64dbreg.cpp

lldb: Linux: empty Ptrace.h pollyfill (#218038)

As the comment in sources alludes to:

> System includes - They have to be included after framework includes
because
> they define some macros which collide with variable names in other
modules.
  
Mixing includes of sys/ptrace.h with other headers can lead to conflicts
that cause i386 lldb-server builds to fail when build against bionic.

Prepare to remove this header outright.

Link: https://github.com/llvm/llvm-project/pull/217435
Link: https://github.com/llvm/llvm-project/issues/217413
Link:
https://lore.kernel.org/llvm/20260821-ptrace_uapi-v1-1-3de8638a29f2@google.com/
DeltaFile
+0-49lldb/include/lldb/Host/linux/Ptrace.h
+25-0lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
+18-1lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+12-0lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+8-0lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_loongarch64.cpp
+8-0lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64dbreg.cpp
+71-503 files not shown
+85-509 files

LLVM/project 4a8c926llvm/lib/CodeGen MachinePipeliner.cpp, llvm/test/CodeGen/AMDGPU swp-amdgpu-pipeline-max-mii.ll

[MachinePipeliner] Increase the default maximum MII to 256

The pipeliner rejects a loop whose minimum initiation interval exceeds
-pipeliner-max-mii. Its default of 27 suits targets with short instruction
latencies, but is too small for others: on AMDGPU a couple of MFMA
instructions already push the MII past it, so the loop never pipelines.

Increase the default limit from 27 to 256. An explicit -pipeliner-max-mii
still overrides the default.
DeltaFile
+5-5llvm/test/CodeGen/AMDGPU/swp-amdgpu-pipeline-max-mii.ll
+2-2llvm/lib/CodeGen/MachinePipeliner.cpp
+7-72 files

LLVM/project 7f717a0llvm/lib/Target/AMDGPU GCNSubtarget.h GCNSubtarget.cpp, llvm/test/CodeGen/AMDGPU swp-amdgpu-pipeline-regpressure-retry.mir

[AMDGPU] Configure the software pipeliner policy

Set the pipeliner policy in overridePipelinerPolicy() to opt into the generic
register-pressure detector.

Schedules exceeding the target-provided pressure-set limits are rejected and
retried at a higher II.
DeltaFile
+181-0llvm/test/CodeGen/AMDGPU/swp-amdgpu-pipeline-regpressure-retry.mir
+6-0llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
+2-0llvm/lib/Target/AMDGPU/GCNSubtarget.h
+189-03 files

LLVM/project 1364316llvm/lib/Target/SPIRV SPIRVLegalizerInfo.cpp, llvm/test/CodeGen/SPIRV/legalization matrix-wide-vector-shader.ll

[SPIRV][Matrix] Legalize ICmp and Fcmp (#218467)

fixes https://github.com/llvm/llvm-project/issues/218444

Simple fix we just need to apply the same fewerElementsIf change we have
done for other Global opcodes. This is going to feel like wack-a-mole
for a bit but the fix will be generally the same everytime.
DeltaFile
+100-0llvm/test/CodeGen/SPIRV/legalization/matrix-wide-vector-shader.ll
+9-3llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
+109-32 files

LLVM/project 9a4fbbclibcxx/utils requirements.txt benchmark-historical

[libc++] Remove the historical benchmarking utilities (#217978)

benchmark-historical, visualize-historical and find-rerun-candidates
were built around storing historical benchmark data int a local
directory. We now store it in LNT instead.
DeltaFile
+0-267libcxx/utils/visualize-historical
+0-242libcxx/utils/find-rerun-candidates
+0-116libcxx/utils/benchmark-historical
+1-3libcxx/utils/requirements.txt
+1-6284 files

LLVM/project f243fbfllvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 build-vector-dup-simd.ll

[AArch64ISel] Lower dup(bitcast) to duplane(insert_elt(bitcast)) (#217931)

`performDUPCombine` in AArch64 ISel has been updated to lower
`dup(bitcast)` to `duplane(insert_vector_elt(poison, bitcast, 0), 0)` to
eliminate roundtrip to GPRs.
DeltaFile
+40-0llvm/test/CodeGen/AArch64/build-vector-dup-simd.ll
+3-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+43-12 files

LLVM/project 1acd7c8lldb/include/lldb/Utility RegisterType.h, lldb/source/Plugins/Process/gdb-remote GDBRemoteCommunicationServerLLGS.cpp

[lldb] Harden register type XML serialization (#218503)

This is patch 1/5 preparing LLDB's register-type infrastructure for GDB
XML vector types.

- Deduplicate emitted type definitions by XML ID instead of object
address.
- Centralize XML attribute escaping in `RegisterType`.
- Escape enum, flags, field-reference, and register type IDs.
- Add missing `&` escaping to LLGS XML attributes.

XML references identify types by their textual ID, so separate objects
with the same ID must not produce duplicate definitions.

Co-authored-by: Bar Soloveychik <barsolo at fb.com>
DeltaFile
+37-7lldb/unittests/Utility/RegisterTypeTest.cpp
+16-5lldb/source/Utility/RegisterType.cpp
+11-4lldb/source/Utility/RegisterTypeFlags.cpp
+12-0lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationServerLLGSTest.cpp
+7-3lldb/include/lldb/Utility/RegisterType.h
+7-2lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+90-216 files

LLVM/project e817bd8clang/lib/ExtractAPI ExtractAPIConsumer.cpp, clang/test/ExtractAPI macros.c

[ExtractAPI] Deterministically emit macros (#215381)

Macros are processed by iterating over the preprocessor's stored
`DenseMap`, which is pointer-keyed with `IdentifierInfo`. This map is
not ordered, leading to the contents of the symbol graph changing across
runs with identical inputs. Sort macros lexicographically by name to
ensure consistent output.

rdar://184545768
DeltaFile
+9-2clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
+8-0clang/test/ExtractAPI/macros.c
+17-22 files

LLVM/project 84b5b4allvm/test/CodeGen/AMDGPU frexp-inf-nan-combine.ll

[AMDGPU] Precommit Tests for 'Fold redundant inf/nan checks into frexp instructions' (#214964)

Precommit tests for https://github.com/llvm/llvm-project/pull/214936.
DeltaFile
+1,130-0llvm/test/CodeGen/AMDGPU/frexp-inf-nan-combine.ll
+1,130-01 files

LLVM/project 19d2f48llvm/include/llvm/Transforms/Utils Local.h, llvm/lib/Transforms/Utils Local.cpp

[Transforms] Remove unused wouldInstructionBeTriviallyDeadOnUnusedPaths (#218609)

This function was added on Dec 1, 2021 in commit
72750f00121eb10f27ccd62270e5695d9e3322a5 without any callers and has
remained unused since.
DeltaFile
+0-12llvm/lib/Transforms/Utils/Local.cpp
+0-8llvm/include/llvm/Transforms/Utils/Local.h
+0-202 files

LLVM/project e30e5f4clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/CodeGen call-conv-lowering-x86_64-vptr.cpp

[CIR] Lower records carrying a vptr for x86_64 (#218457)

A record carrying a vtable pointer could not be passed or returned by
value. `isSupportedType` had no case for `!cir.vptr`, so the whole
signature was reported NYI. That covers any class with a virtual
function or a virtual base.

Accept the type and map it to an `llvm::abi::PointerType`.

A record CIRGen also marks packed stays NYI, which is where a
polymorphic class with tail padding lands.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+254-0clang/test/CIR/Transforms/abi-lowering/x86_64-vptr.cir
+98-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-vptr.cpp
+29-15clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+0-10clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
+381-254 files

LLVM/project 175afd9flang-rt/lib/runtime CMakeLists.txt

[flang-rt][OpenMP] fix buildbot failures after commit 01079d2605aabd0beccecb270f51d40119422f04 (#218611)

The commit that introduced integer kind wrappers in libomp-mod caused a
regression in CUDA Flang runtime builds. This change resolves the issue
by skipping the build of libomp-mod for experimental CUDA offload
configurations, ensuring that host-side Fortran objects are not included
in the CUDA/PTX compilation path.

Fixes: https://lab.llvm.org/buildbot/#/builders/152
DeltaFile
+2-1flang-rt/lib/runtime/CMakeLists.txt
+2-11 files

LLVM/project d5d6301clang/unittests/AST/ByteCode Pointer.cpp

[clang][test] Use sizeof(wchar_t) instead of __WCHAR_WIDTH__ (#218707)

`__WCHAR_WIDTH__` does not exist everywhere and this broke a builder:
https://lab.llvm.org/buildbot/#/builders/2/builds/60118
DeltaFile
+4-3clang/unittests/AST/ByteCode/Pointer.cpp
+4-31 files

LLVM/project eaa52f7libcxx/docs/Status Cxx26Issues.csv, libcxx/test/support test_text_encoding.h

[libc++] Add test for LWG4043 ASCII in text_encoding (#218175)

It turns out the ASCII entry was not an extension as I had initially
thought, and was added as part of the resolution of LWG 4043. Update
the test and correct the status page.

Resolves #209899
DeltaFile
+1-1libcxx/docs/Status/Cxx26Issues.csv
+1-0libcxx/test/support/test_text_encoding.h
+2-12 files

LLVM/project 3400e0fclang/test/CodeGenOpenCL builtins-amdgcn-make-buffer-rsrc.cl, llvm/lib/Target/AMDGPU AMDGPUInstCombineIntrinsic.cpp

[AMDGPU] Canonicalize num_records to its actual width in InstCombine

llvm.amdgcn.make.buffer.rsrc is overloaded on the type of its
num_records argument, but the hardware field it ends up in has a fixed
width (32 bits, or 45 bits on gfx1250 and up). Rewrite the intrinsic to
use that width, zero-extending or truncating num_records as needed, so
that IR-level optimizations can see that the extra bits of, for example,
the i64 that Clang emits are not demanded.

Targets that aren't concrete enough for the buffer resource layout to be
known are left alone.

AI disclosure: This was my idea but Claude wrote the code (and I've
tried to tighten up the comments)
DeltaFile
+36-44clang/test/CodeGenOpenCL/builtins-amdgcn-make-buffer-rsrc.cl
+27-27llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
+22-12llvm/test/Transforms/InstCombine/AMDGPU/make-buffer-rsrc-num-records.ll
+21-1llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+106-844 files

LLVM/project 49259ecllvm/test/Transforms/InstCombine/AMDGPU make-buffer-rsrc-num-records.ll

Clean up triples
DeltaFile
+3-3llvm/test/Transforms/InstCombine/AMDGPU/make-buffer-rsrc-num-records.ll
+3-31 files

LLVM/project aead856mlir/lib/Conversion/AMDGPUToROCDL AMDGPUToROCDL.cpp, mlir/test/Conversion/AMDGPUToROCDL amdgpu-to-rocdl.mlir

[mlir][AMDGPU] Emit num_records at the buffer resource's actual width

makeBufferRsrc() zero-extended num_records to i64 on targets whose
buffer resource has a 45-bit num_records field, leaving 19 bits that the
hardware will never look at. Emit an i45 instead, which is what
rocdl.make.buffer.rsrc will end up putting in the descriptor anyway, so
that downstream consumers can see that those bits aren't demanded.

While here, factor the i32 and i64 conversion helpers into a shared
convertUnsignedToInt() that takes the target width.

AI disclosure: Claude made this, I looked at and poked the design into
shape.
DeltaFile
+50-25mlir/test/Conversion/AMDGPUToROCDL/amdgpu-to-rocdl.mlir
+18-19mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+68-442 files

LLVM/project 743cfbellvm/test/Transforms/InstCombine/AMDGPU make-buffer-rsrc-num-records.ll

[AMDGPU] Pre-commit tests for num_records canonicalization

Add tests for having InstCombine canonicalize the num_records argument
of llvm.amdgcn.make.buffer.rsrc to the width it will ultimately have,
which lets later passes see that, for example, the high bits of the i64
that Clang emits aren't used.

AI disclosure: Claude generated these and I've looked at them
DeltaFile
+153-0llvm/test/Transforms/InstCombine/AMDGPU/make-buffer-rsrc-num-records.ll
+153-01 files

LLVM/project 17d93b4llvm/lib/Target/AMDGPU AMDGPULowerBufferFatPointers.cpp, llvm/test/CodeGen/AMDGPU lower-buffer-fat-pointers-num-records-width.ll

[AMDGPU] Use real num_records width in LowerBufferFatPointers

Fix the following edge cases in reasoning about whether a value can be
The out-of-bounds analysis in LowerBufferFatPointers took the
num_records operand of llvm.amdgcn.make.buffer.rsrc at face value, which
went wrong in three ways.

1. The pass would crash if num_records was narrower than the
underlying hardware width.
2. A 45-bit num_records with its high bit set made all offsets look
negative, which, among other things, broke the `(1 << 45) - 1` "no
bounds checking" value.
3. The test for all-1 num_records wasn't accounting for hardware
width, leading to false positives if the num_records field was
narrower tan the underlying field.
4. Don't try to do reasoning about num_records when its width isn't
known.

AI disclosure: Claude found and took a try at fixing these, I've
reviewed
DeltaFile
+199-59llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-num-records-width.ll
+19-13llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+218-722 files

LLVM/project bd0876cllvm/test/CodeGen/AMDGPU lower-buffer-fat-pointers-num-records-width.ll

Update test explanations
DeltaFile
+5-7llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-num-records-width.ll
+5-71 files

LLVM/project 5889922llvm/test/CodeGen/AMDGPU lower-buffer-fat-pointers-num-records-width.ll

[AMDGPU] Pre-commit num_records of arbitrary width tests for LowerBufferFatPointers

Add tests to ensure that the reasoning for whether an access can be
partially out of bounds and needs to be scalarized work correctly when
num_records has a width different from the hardware width.

AI disclosure: Claude generated these and I've looked at them
DeltaFile
+236-0llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-num-records-width.ll
+236-01 files

LLVM/project 42d16a9llvm/test/CodeGen/AMDGPU lower-buffer-fat-pointers-num-records-width.ll

Update generic target to something better
DeltaFile
+1-1llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-num-records-width.ll
+1-11 files

LLVM/project bf4e08dllvm/lib/Target/AMDGPU SIISelLowering.cpp AMDGPULowerBufferFatPointers.cpp

[AMDGPU] Track buffer resource num_records width in a subtarget field (#217136)

Replace the boolean 45-bit-num-records-buffer-resource subtarget
feature's `Has45BitNumRecordsBufferResource` flag with a numeric
`BufferResourceNumRecordsWidth` field.

AI disclosure: Code by Claude, comments and wordings by me

---------

Co-authored-by: Lukas Sommer <lukas.sommer at amd.com>
DeltaFile
+24-12llvm/lib/Target/AMDGPU/AMDGPU.td
+13-0llvm/lib/Target/AMDGPU/GCNSubtarget.h
+1-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+40-155 files

LLVM/project be99215flang/lib/Semantics resolve-directives.cpp, flang/test/Lower/OpenACC acc-copy-reduction.f90

[flang][OpenACC] Allow data action and data-sharing clause overlap (#218588)

The changes I made in https://github.com/llvm/llvm-project/pull/211606
disallowed multiple different data actions clauses to occur on the same
variable in the same construct. This PR fixes that mistake reducing the
only restriction to multiple different data sharing clauses (and the
reduction clause) can not be placed on the same object in the same
construct.
DeltaFile
+94-0flang/test/Semantics/OpenACC/acc-data-action-overlap.f90
+62-0flang/test/Semantics/OpenACC/acc-copy-reduction.f90
+4-49flang/lib/Semantics/resolve-directives.cpp
+24-0flang/test/Semantics/OpenACC/acc-dataclause-dedup.f90
+12-6flang/test/Lower/OpenACC/acc-copy-reduction.f90
+4-8flang/test/Semantics/OpenACC/acc-default-none-arrays.f90
+200-636 files

LLVM/project 652b55dllvm/lib/Target/AArch64 AArch64PointerAuth.cpp

[llvm][AArch64] Simplify reverse iteration fix in #217752. NFC (#217979)

This is a follow-up to ab0b549b6b9855e176f6f7ea3f9e5ffe930061c6 where
vhscampos noticed that we were skipping MBBI in the backward search for
SP adjustment FrameDestroy instructions. Since MBB always points at the
PAUTH_EPILOGUE pseudo, there is no functional difference in this change,
but it's worth simplifying that because the intent does not look obvious
from construction, and we don't lose much from iterating over one extra
instruction.
DeltaFile
+1-1llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
+1-11 files

LLVM/project 2da5cc7clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/CodeGen call-conv-lowering-x86_64-empty.cpp

[CIR] Accept a union with an ABI-empty member

isSupportedType rejected any union containing an ABI-empty member outright.
Dropping the reject alone is not enough.  A union mixing a data-free member
that spans the record with a bit-field access unit can still mis-lower.  The
new accept rule requires that a data-supplying member span the record
whenever a bit-field access unit is present.

mapCIRType's union loop now only maps members that hold data for the ABI,
so an unnamed bit-field's storage is not mapped as a field either.

Assisted-by: Cursor / claude-opus-5
DeltaFile
+226-0clang/test/CIR/Transforms/abi-lowering/x86_64-union.cir
+92-0clang/test/CIR/CodeGen/call-conv-lowering-x86_64-empty.cpp
+14-18clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
+19-10clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+351-284 files