[all-commits] [llvm/llvm-project] bcb72e: [AMDGPU] Add a new amdgcn.load.to.lds intrinsic

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Thu May 1 12:59:49 PDT 2025


  Branch: refs/heads/users/krzysz00/load-lds-everywhere
  Home:   https://github.com/llvm/llvm-project
  Commit: bcb72e3d8cb2dcdb97199d32797306c5807c8442
      https://github.com/llvm/llvm-project/commit/bcb72e3d8cb2dcdb97199d32797306c5807c8442
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsAMDGPU.def
    M clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
    M clang/lib/Sema/SemaAMDGPU.cpp
    M clang/test/CodeGenOpenCL/builtins-amdgcn-gfx950.cl
    A clang/test/CodeGenOpenCL/builtins-amdgcn-load-to-lds.cl
    M llvm/docs/ReleaseNotes.md
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    A llvm/test/CodeGen/AMDGPU/llvm.amdgcn.load.to.lds.gfx950.ll
    A llvm/test/CodeGen/AMDGPU/llvm.amdgcn.load.to.lds.ll
    M llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-mem-transfer.ll
    M mlir/include/mlir/Dialect/AMDGPU/IR/AMDGPU.td
    M mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
    M mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
    M mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
    M mlir/test/Conversion/AMDGPUToROCDL/load_lds.mlir
    M mlir/test/Dialect/LLVMIR/rocdl.mlir
    M mlir/test/Target/LLVMIR/rocdl.mlir

  Log Message:
  -----------
  [AMDGPU] Add a new amdgcn.load.to.lds intrinsic

This PR adds a amdgns_load_to_lds intrinsic that abstracts over loads
to LDS from global (address space 1) pointers and buffer fat
pointers (address space 7), since they use the saem API and "gather
from a pointer to LDS" is something of an abstract operation.

This commet adds the intrinsic and its lowerings for addrspaces 1 and
7, and updates the MLIR wrappers to use it (loosening up the
restrictions on loads to LDS along the way to match the ground truth
from target features).

It also plumbs the intrinsic through to clang.


  Commit: da53e5e64a3f7a7283db3b20c3cdc36454df3af8
      https://github.com/llvm/llvm-project/commit/da53e5e64a3f7a7283db3b20c3cdc36454df3af8
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    M clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
    M clang/test/CodeGenOpenCL/builtins-amdgcn-gfx950.cl
    A clang/test/SemaOpenCL/builtins-amdgcn-load-to-lds-err.cl
    M llvm/docs/AMDGPUUsage.rst
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.load.to.lds.gfx950.ll

  Log Message:
  -----------
  Fix clang build, document the operation, add error-handling tests


  Commit: 5afd162d25ca7a56ccb9f30b7aa99e61c9847acf
      https://github.com/llvm/llvm-project/commit/5afd162d25ca7a56ccb9f30b7aa99e61c9847acf
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    A clang/test/CodeGenHIP/amdgpu-load-to-lds.hip
    M llvm/include/llvm/IR/IntrinsicsAMDGPU.td
    M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
    M llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll

  Log Message:
  -----------
  Add HIP tests, plumb the intrinsic through infer-address-spaces


Compare: https://github.com/llvm/llvm-project/compare/99dc86e4de86...5afd162d25ca

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list