[clang] [llvm] [AMDGPU] Add target intrinsic for s_prefetch_data (PR #107133)

Stanislav Mekhanoshin via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 10:24:16 PDT 2024


================
@@ -2689,6 +2689,12 @@ def int_amdgcn_global_load_tr_b128 : AMDGPULoadIntrinsic<global_ptr_ty>;
 def int_amdgcn_wave_id :
   DefaultAttrsIntrinsic<[llvm_i32_ty], [], [NoUndef<RetIndex>, IntrNoMem, IntrSpeculatable]>;
 
+def int_amdgcn_s_prefetch_data :
+  Intrinsic<[], [llvm_anyptr_ty, llvm_i32_ty],
----------------
rampitec wrote:

Added comments. I will have to guard the regular llvm.prefetch, the instruction turns to be unsafe with invalid address. Besides target intrinsic can take length operand.

https://github.com/llvm/llvm-project/pull/107133


More information about the cfe-commits mailing list