LLVM/project b732656 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[AMDGPU] Price misaligned flat and LDS accesses with the LDS misaligned bug

In WGP mode on subtargets with the LDS misaligned bug, a flat access is
split into pieces no wider than its alignment and no narrower than 4
bytes, and an LDS access aligned below 4 bytes uses 8-byte pieces as one
aligned to 4 does.
DeltaFile
+121-60llvm/test/Analysis/CostModel/AMDGPU/store.ll
+121-60llvm/test/Analysis/CostModel/AMDGPU/load.ll
+4-1llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+246-1213 files

LLVM/project bbbc670 — llvm/lib/Target/AMDGPU AMDGPU.h AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[AMDGPU] Price buffer fat pointer memory operations

Price buffer fat pointer accesses as global accesses, except that an
aligned load is not widened and a vector of odd width elements is not
split element by element. Without relaxed buffer bounds checking, a
vector of elements that are a multiple of 32 bits wide is accessed in
pieces no wider than its alignment and no narrower than 4 bytes, and a
vector of other byte-sized or power of 2 wide elements in pieces of the
largest power of 2 bytes that divides the element size. The width comes
from buffer fat pointer lowering, which now exposes it. When the pointer
is a buffer resource plus a constant offset, the offset and a constant
number of records give the same bounds facts lowering uses to access it
in wider pieces.
DeltaFile
+38-35llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+51-20llvm/test/Analysis/CostModel/AMDGPU/store.ll
+51-20llvm/test/Analysis/CostModel/AMDGPU/load.ll
+56-14llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+9-0llvm/lib/Target/AMDGPU/AMDGPU.h
+205-895 files

LLVM/project a5dc7d5 — llvm/lib/Target/AMDGPU AMDGPULowerBufferFatPointers.cpp AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

apply comments
DeltaFile
+354-0llvm/test/Analysis/CostModel/AMDGPU/buffer-fat-pointer-oob-mode.ll
+21-1llvm/test/Analysis/CostModel/AMDGPU/store.ll
+21-1llvm/test/Analysis/CostModel/AMDGPU/load.ll
+8-4llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+3-3llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+407-95 files

LLVM/project a7895d1 — llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[NFC][AMDGPU] Precommit buffer fat pointer and gfx1010 memory cost tests
DeltaFile
+294-0llvm/test/Analysis/CostModel/AMDGPU/load.ll
+235-0llvm/test/Analysis/CostModel/AMDGPU/store.ll
+529-02 files

LLVM/project 4e3f237 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU load.ll

[AMDGPU] Price constant address space memory operations

Price constant address space accesses as global accesses, except for
loads selected to scalar loads of up to 64 bytes. These are loads from
the 32-bit constant address space, and loads from the constant address
space whose pointer is an argument passed in SGPRs or a constant, plus
constant offsets, both aligned to 4 bytes or to their size. A scalar
load is widened as its lowering does. An integer whose size is not a
multiple of 4 bytes is loaded as whole dwords, plus a byte load when its
size is 7 modulo 8, since the last byte of such a remainder is left out
of the scalar load. A type with no legal dword vector equivalent is
split into the largest power of 2 pieces that fit, and once the
remainder fits in the alignment it is widened to a power of 2 piece of
up to the alignment, at most 8 bytes for byte vectors. A 3-dword
remainder of a legal dword vector takes a fourth dword when aligned to 8
on a subtarget without scalar dwordx3 loads.
DeltaFile
+162-37llvm/test/Analysis/CostModel/AMDGPU/load.ll
+121-71llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-fma-fusion.ll
+56-4llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+339-1123 files

LLVM/project be9ab7c — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.h AMDGPUTargetTransformInfo.cpp

Use isSourceOfDivergence in hasUniformPointerOperand
DeltaFile
+3-6llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+2-0llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
+5-62 files

LLVM/project d7f7016 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU load.ll

small changes
DeltaFile
+22-12llvm/test/Analysis/CostModel/AMDGPU/load.ll
+16-10llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+38-222 files

LLVM/project e2d5515 — llvm/test/Analysis/CostModel/AMDGPU load.ll

[NFC][AMDGPU] Precommit uniform constant load cost tests
DeltaFile
+93-0llvm/test/Analysis/CostModel/AMDGPU/load.ll
+93-01 files

LLVM/project c362a97 — clang/lib/CodeGen CGStmt.cpp, clang/test/CodeGen/X86 inline-asm-complex-output.c

Widen a tied input for a _Complex output, and pass 128-bit "rm" inputs by address
DeltaFile
+50-0clang/test/CodeGen/X86/inline-asm-complex-output.c
+11-1clang/lib/CodeGen/CGStmt.cpp
+61-12 files

LLVM/project 4fb8315 — offload/libomptarget/OpenMP InteropAPI.cpp, offload/plugins-nextgen/common/include PluginInterface.h

[Offload][Omp] Reimplement interop on top of liboffload (#234165)

Reimplement OpenMP interop support using liboffload interfaces:

* Added a new property liboffload devices to get the native platform of
a device that was missing (could be moved to a sepparate PR).
* Reimplemented the queue creation and logic assuming liboffload inorder
queues.
* Some of the backend decision logic was moved into libomptarget (if
#235844 is merged it should be moved there)
* Renamed some "tgt" interop related stuff to use "omp" prefix.

I also found a bug in which properties were allowed for
`interop(target`) which I fixed here but could do it sepparately.

Assisted by Claude.
DeltaFile
+140-88offload/libomptarget/OpenMP/InteropAPI.cpp
+0-74offload/plugins-nextgen/level_zero/src/L0Device.cpp
+0-68offload/plugins-nextgen/common/src/PluginInterface.cpp
+7-57offload/plugins-nextgen/common/include/PluginInterface.h
+0-47offload/plugins-nextgen/level_zero/src/L0Plugin.cpp
+0-44offload/plugins-nextgen/cuda/src/rtl.cpp
+147-37812 files not shown
+195-47518 files

LLVM/project 6b2b66d — llvm/lib/Target/LoongArch/MCTargetDesc LoongArchInstPrinter.cpp, llvm/test/MC/LoongArch/Misc annotate-dbar.s

[LoongArch][MC] Add an option to print human-readable annotations for dbar (#237384)

This implements the human-readable annotation support for LoongArch's
dbar memory-barrier instruction, for more detailed information about
this, see LoongArch Documents Volume 1 in
[LoongArch-Documentation](https://loongson.github.io/LoongArch-Documentation/README-CN.html).
Unfortunately, the explaination table is in Chinese only.

Here are the final results.
```
bin/llvm-objdump -M annotate --debug-file-directory=. -d /usr/lib/libc.so.6 | grep dbar | head -n10
   1ddf8: 12 00 72 38   dbar    18                      # CRW| W
   1fcb4: 00 07 72 38   dbar    1792                    # SA-RAR
   1ffd4: 00 07 72 38   dbar    1792                    # SA-RAR
   2f6b0: 00 07 72 38   dbar    1792                    # SA-RAR
   2f988: 00 07 72 38   dbar    1792                    # SA-RAR
   309c8: 00 07 72 38   dbar    1792                    # SA-RAR
   325e0: 00 07 72 38   dbar    1792                    # SA-RAR
   36784: 00 07 72 38   dbar    1792                    # SA-RAR

    [9 lines not shown]
DeltaFile
+158-0llvm/test/MC/LoongArch/Misc/annotate-dbar.s
+43-0llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchInstPrinter.cpp
+201-02 files

LLVM/project 1bf830d — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/lib/Target/PowerPC PPCISelLowering.cpp

Merge branch 'users/void/ppc-asm-wide-gpr' into users/void/asm-goto-_Complext-types
DeltaFile
+54-0llvm/test/CodeGen/PowerPC/inline-asm-wide-gpr.ll
+41-0llvm/test/CodeGen/AArch64/inline-asm-wide-gpr.ll
+8-2llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+7-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-5llvm/test/CodeGen/AArch64/build-pair-isel.ll
+112-85 files

LLVM/project a8ce570 — llvm/lib/Target/PowerPC PPCISelLowering.cpp, llvm/test/CodeGen/PowerPC inline-asm-wide-gpr.ll

[PowerPC] Use 64-bit registers for wide "r" inline asm operands

On PPC64, an integer wider than 64 bits, such as an i128, in an "r" or
"b" operand was given a 32-bit register for each 64 bits of it, so half
of its bits were lost. Give it 64-bit registers instead. AArch64 had the
same problem (#238926).

Assisted-by: Claude Opus 5.5
DeltaFile
+54-0llvm/test/CodeGen/PowerPC/inline-asm-wide-gpr.ll
+8-2llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+62-22 files

LLVM/project 01297f9 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 build-pair-isel.ll inline-asm-wide-gpr.ll

[AArch64] Use 64-bit registers for wide "r" inline asm operands

An integer wider than 64 bits, such as an i128, in an "r" operand was
given a 32-bit register for each 64 bits of it, so half of its bits were
lost. Give it 64-bit registers instead.

Fixes #238926.

Assisted-by: Claude Opus 5.5
DeltaFile
+41-0llvm/test/CodeGen/AArch64/inline-asm-wide-gpr.ll
+7-1llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+2-5llvm/test/CodeGen/AArch64/build-pair-isel.ll
+50-63 files

LLVM/project a175e99 — clang/include/clang/AST TypeBase.h, clang/lib/AST ASTContext.cpp ItaniumMangle.cpp

[Clang][RISCV] Record the LMUL and mask ratio in RVV fixed-length vector kinds (#237845)

A riscv_rvv_vector_bits typedef keeps only the element type and count,
and later stages re-derive the LMUL of a data type, or the ratio R of a
vbool<R>_t mask type, from VLEN. That breaks once typedefs may be
shorter than VLEN * LMUL, or VLEN / R for masks.

Split VectorKind::RVVFixedLengthData into RVVFixedLengthData_MF8 to _M8,
and RVVFixedLengthMask{,_1,_2,_4} into RVVFixedLengthMaskRatio<R> and
RVVFixedLengthMaskRatio<R>_{1,2,4}, and read the LMUL or the ratio from
the kind. VecKind grows to 6 bits.

This patch prepares to let riscv_rvv_vector_bits typedefs be shorter. It
does not change any behavior, except that the AST dump prints the LMUL
or the ratio.

Assisted-by: Claude
DeltaFile
+140-8clang/include/clang/AST/TypeBase.h
+72-48clang/lib/CodeGen/Targets/RISCV.cpp
+13-44clang/lib/AST/ItaniumMangle.cpp
+16-41clang/lib/AST/TypePrinter.cpp
+56-0clang/test/AST/ast-dump-riscv-rvv-fixed-length-vector-kinds.c
+13-36clang/lib/AST/ASTContext.cpp
+310-1775 files not shown
+348-22111 files

LLVM/project 0afe009 — libc CMakeLists.txt, libc/docs full_host_build.md

[libc] Find linux kernel headers in Debian multiarch directories (#224314)

On Debian/Ubuntu systems without gcc-multilib, architecture-specific
kernel headers are installed in /usr/include/<triple>/asm, while generic
headers are in /usr/include/linux. Because the symlink /usr/include/asm
does not exist, full host builds failed to find <asm/errno.h> and other
asm headers.

Instead of requiring root access to create a symlink in /usr, check if
/usr/include/<triple>/asm exists (using LIBC_TARGET_TRIPLE or
CMAKE_LIBRARY_ARCHITECTURE) and prepend it to LIBC_KERNEL_HEADERS.

Also update consumers of LIBC_KERNEL_HEADERS in runtimes and libc++ test
configs so they handle semicolon-separated lists properly.

Assisted-by: Gemini
DeltaFile
+6-11libc/docs/full_host_build.md
+8-0libc/CMakeLists.txt
+3-1runtimes/cmake/Modules/HandleLibC.cmake
+3-1libcxxabi/test/configs/llvm-libc++abi-llvm-libc.cfg.in
+2-1libcxx/test/configs/llvm-libc++-llvm-libc.cfg.in
+22-145 files

LLVM/project 952b6f0 — offload/include/OpenMP BackendConfig.h, offload/include/OpenMP/BackendConfig LevelZeroConfig.h HostConfig.h

[Offload][Omp] Add Backend specific OpenMP-only options (#235844)

There's a number growing of cases (as we decouple from liboffload) of
places where libomptarget needs to behave or use a different number
depending on the backend. Instead of start adding a bunuch of ` if
(Backend == XX) YY` this PR introduces
a simple ` BackendConfig` class to hide such behavior. It's a simple
class as I don't think we need a really complicated thing (for now at
least).

Ongoing PR's like #234165 or #234191 could make use of it. For now, I
just used to remove the ` isHostDevice` specific condition.

Assisted by Claude.
DeltaFile
+42-0offload/libompaccsupport/BackendConfig.cpp
+39-0offload/include/OpenMP/BackendConfig.h
+15-11offload/libompaccsupport/device.cpp
+23-0offload/include/OpenMP/BackendConfig/HostConfig.h
+23-0offload/include/OpenMP/BackendConfig/AMDGPUConfig.h
+21-0offload/include/OpenMP/BackendConfig/LevelZeroConfig.h
+163-113 files not shown
+191-179 files

LLVM/project df5be51 — clang/test/CodeGen/X86 inline-asm-complex-output.c, llvm/lib/CodeGen/GlobalISel InlineAsmLowering.cpp

Fix two comments that overstate what's handled
DeltaFile
+2-2llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+1-1clang/test/CodeGen/X86/inline-asm-complex-output.c
+3-32 files

LLVM/project aa3fd5a — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp, llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Merge branch 'users/void/callbr-asm-error' into users/void/asm-goto-_Complext-types
DeltaFile
+10-6llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+8-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+18-72 files

LLVM/project b215107 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Keep the comments on the indirect-target marking together
DeltaFile
+2-1llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+2-11 files

LLVM/project b3bdc8a — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp, llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Merge branch 'users/void/callbr-flag-outputs' into users/void/callbr-asm-error
DeltaFile
+10-6llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+6-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+16-62 files

LLVM/project c2c15d3 — llvm/include/llvm/Transforms/Utils LowerMemIntrinsics.h, llvm/lib/CodeGen PreISelIntrinsicLowering.cpp

[LowerMemIntrinsics] Expand small variable-length memsets inline (#228420)

[LowerMemIntrinsics] Expand small variable-length memsets inline

Previously, a memset whose length is not a constant was always lowered to a call
to memset, even when the length is known to be small. Expand such a memset
inline instead when the upper bound of its length is at most a target-provided
threshold.

Motivating C code snippets:

    void bar(void *dst, unsigned n) {
      if (!(n <= 12)) __builtin_unreachable(); // __builtin_assume
      memset(dst, 0xff, n);
    }

    void foo(int *dst, int n) {
      for (unsigned i = n; i < 4; ++i)
        dst[i] = -1;

    [20 lines not shown]
DeltaFile
+320-0llvm/test/Transforms/PreISelIntrinsicLowering/AArch64/bounded-memset.ll
+117-0llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp
+74-4llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp
+76-0llvm/test/Transforms/PreISelIntrinsicLowering/X86/bounded-memset.ll
+7-0llvm/include/llvm/Transforms/Utils/LowerMemIntrinsics.h
+6-0llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
+600-410 files not shown
+622-1016 files

LLVM/project a0bbf18 — llvm/lib/CodeGen/SelectionDAG SelectionDAGBuilder.cpp

Add blank lines after control-flow blocks and before comments
DeltaFile
+6-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+6-01 files

LLVM/project 7f7f416 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Merge branch 'users/void/x86-flags-copy-inlineasm-br' into users/void/callbr-flag-outputs
DeltaFile
+10-6llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+10-61 files

LLVM/project d73e5a2 — llvm/lib/Target/X86 X86FlagsCopyLowering.cpp

Use braces for the nested loops over the copy's block
DeltaFile
+10-6llvm/lib/Target/X86/X86FlagsCopyLowering.cpp
+10-61 files

LLVM/project 455bc9c — lld/test/ELF mips-npic-call-pic.s, llvm/lib/Target/Mips Mips32r6InstrInfo.td

Revert "[Mips] Fix MipsJmpLink and MipsTailCall to use compact branch instructions on MIPS32/64 R6" (#239049)

Reverts llvm/llvm-project#232578
I will resubmit again for a kernel compile error.
DeltaFile
+59-118llvm/test/CodeGen/Mips/fp-intrinsics.ll
+24-48lld/test/ELF/mips-npic-call-pic.s
+0-38llvm/lib/Target/Mips/Mips32r6InstrInfo.td
+8-8llvm/test/CodeGen/Mips/rint-r6-features.ll
+6-6llvm/test/CodeGen/Mips/word-normalization.ll
+8-4llvm/test/CodeGen/Mips/rint-r6.ll
+105-22212 files not shown
+142-25618 files

LLVM/project 65b5ded — llvm/lib/Target/RISCV/MCTargetDesc RISCVELFStreamer.cpp

fixup! fix for rebase on earlier PR.
DeltaFile
+1-1llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
+1-11 files

LLVM/project 8608467 — llvm/docs NVPTXUsage.md, llvm/include/llvm/IR IntrinsicsNVVM.td

[NVPTX] Add default value to is_exclusive ImmArg in tcgen05.{de}alloc intrinsics (#236356)

This patch adds default value for the `is_exclusive` `ImmArg` in 
`tcgen05.{de}alloc` intrinsics.
This helps to eliminate the AU code for enabling this manually.

---------

Signed-off-by: DharuniRAcharya <dharunira at nvidia.com>
DeltaFile
+9-31llvm/lib/IR/AutoUpgrade.cpp
+6-6llvm/docs/NVPTXUsage.md
+2-2llvm/include/llvm/IR/IntrinsicsNVVM.td
+17-393 files

LLVM/project 26e37e9 — llvm/lib/Target/RISCV/MCTargetDesc RISCVTargetStreamer.cpp RISCVBaseInfo.h

[RISCV] Use a fully covered switch in RISCVABI::getStackAlignment.

This makes it more obvious the alignment has been chosen explicitly
for every ABI.

Not quite NFC because we no longer emit the stack align attribute for
an unknown ABI.
DeltaFile
+22-4llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+1-1llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
+23-52 files

LLVM/project 6daac7d — llvm/lib/Target/RISCV RISCVRegisterInfo.cpp RISCVCallingConv.cpp, llvm/lib/Target/RISCV/MCTargetDesc RISCVTargetStreamer.h RISCVBaseInfo.cpp

[RISCV] Make the RISCVABI enum an enum class. NFC

Assisted-by: Claude
DeltaFile
+48-48llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
+26-26llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+15-15llvm/unittests/Target/RISCV/RISCVBaseInfoTest.cpp
+2-2llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
+2-2llvm/lib/Target/RISCV/RISCVCallingConv.cpp
+2-2llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
+95-954 files not shown
+99-9910 files