[clang] [llvm] AMDGPU: Implement tensor load and store instructions for gfx1250 (PR #146636)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 2 11:30:46 PDT 2025
================
@@ -3580,6 +3580,37 @@ def int_amdgcn_fdiv_fast : DefaultAttrsIntrinsic<
[IntrNoMem, IntrSpeculatable]
>;
+class AMDGPUTensorLoadStore:
+ Intrinsic<
+ [],
+ [llvm_v4i32_ty, // D# group 0
+ llvm_v8i32_ty, // D# group 1
+ llvm_v4i32_ty, // D# group 2
+ llvm_v4i32_ty, // D# group 3
+ llvm_i32_ty], // cachepolicy:
+ // bits [0-2] = th
+ // bits [3-4] = scope
+ [IntrInaccessibleMemOrArgMemOnly, ImmArg<ArgIndex<4>>, IntrWillReturn, IntrConvergent, IntrNoCallback, IntrNoFree],
+ "", [SDNPMemOperand]
+ >;
+
+class AMDGPUTensorLoadStoreD2:
+ Intrinsic<
+ [],
+ [llvm_v4i32_ty, // D# group 0
+ llvm_v8i32_ty, // D# group 1
+ llvm_i32_ty], // cachepolicy:
+ // bits [0-2] = th
+ // bits [3-4] = scope
+ [IntrInaccessibleMemOrArgMemOnly, ImmArg<ArgIndex<2>>, IntrWillReturn, IntrConvergent, IntrNoCallback, IntrNoFree],
+ "", [SDNPMemOperand]
+ >;
+
+def int_amdgcn_tensor_load_to_lds : AMDGPUTensorLoadStore;
----------------
changpeng wrote:
This is great. Thanks for the suggestion and explanation
https://github.com/llvm/llvm-project/pull/146636
More information about the llvm-commits
mailing list