[llvm] aa4c055 - [AMDGPU] Document the intended semantics of llvm.amdgcn.s.buffer.load

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 01:13:39 PDT 2022


Author: Jay Foad
Date: 2022-03-31T09:13:30+01:00
New Revision: aa4c055e2563fa5d2b897e982b0e4bdb550bc49c

URL: https://github.com/llvm/llvm-project/commit/aa4c055e2563fa5d2b897e982b0e4bdb550bc49c
DIFF: https://github.com/llvm/llvm-project/commit/aa4c055e2563fa5d2b897e982b0e4bdb550bc49c.diff

LOG: [AMDGPU] Document the intended semantics of llvm.amdgcn.s.buffer.load

Differential Revision: https://reviews.llvm.org/D122653

Added: 
    

Modified: 
    llvm/include/llvm/IR/IntrinsicsAMDGPU.td

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td
index c2cf523216c0c..f148fda5b37f5 100644
--- a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td
+++ b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td
@@ -949,10 +949,12 @@ class AMDGPUBufferLoad<LLVMType data_ty = llvm_any_ty> : Intrinsic <
 def int_amdgcn_buffer_load_format : AMDGPUBufferLoad<llvm_anyfloat_ty>;
 def int_amdgcn_buffer_load : AMDGPUBufferLoad;
 
+// Generate a buffer_load instruction that may be optimized to s_buffer_load if
+// the offset argument is uniform.
 def int_amdgcn_s_buffer_load : Intrinsic <
   [llvm_any_ty],
   [llvm_v4i32_ty,     // rsrc(SGPR)
-   llvm_i32_ty,       // byte offset(SGPR/imm)
+   llvm_i32_ty,       // byte offset
    llvm_i32_ty],      // cachepolicy(imm; bit 0 = glc, bit 2 = dlc)
   [IntrNoMem, IntrWillReturn, ImmArg<ArgIndex<2>>]>,
   AMDGPURsrcIntrinsic<0>;


        


More information about the llvm-commits mailing list