================
@@ -4204,25 +4204,24 @@ def int_amdgcn_cluster_load_b32 :
AMDGPUClusterLoad<global_ptr_ty>;
def int_amdgcn_cluster_load_b64 : AMDGPUClusterLoad<global_ptr_ty>;
def int_amdgcn_cluster_load_b128 : AMDGPUClusterLoad<global_ptr_ty>;
-class AMDGPULoadMonitor<LLVMType ptr_ty>:
+class AMDGPUAtomicLoadMonitor<LLVMType ptr_ty>:
Intrinsic<
[llvm_any_ty],
[ptr_ty,
- llvm_i32_ty], // gfx12+ cachepolicy:
- // bits [0-2] = th
- // bits [3-4] = scope
+ llvm_i32_ty, // C ABI Atomic Ordering ID
+ llvm_metadata_ty], // syncscope
[IntrArgMemOnly, IntrReadMem, ReadOnly<ArgIndex<0>>,
NoCapture<ArgIndex<0>>, ImmArg<ArgIndex<1>>,
IntrWillReturn, IntrConvergent, IntrNoCallback, IntrNoFree],
"",
- [SDNPMemOperand]
+ [SDNPMemOperand, SDNPMayLoad]
>;
-def int_amdgcn_flat_load_monitor_b32 : AMDGPULoadMonitor<flat_ptr_ty>;
-def int_amdgcn_flat_load_monitor_b64 : AMDGPULoadMonitor<flat_ptr_ty>;
-def int_amdgcn_flat_load_monitor_b128 : AMDGPULoadMonitor<flat_ptr_ty>;
-def int_amdgcn_global_load_monitor_b32 : AMDGPULoadMonitor<global_ptr_ty>;
-def int_amdgcn_global_load_monitor_b64 : AMDGPULoadMonitor<global_ptr_ty>;
-def int_amdgcn_global_load_monitor_b128 : AMDGPULoadMonitor<global_ptr_ty>;
+def int_amdgcn_flat_atomic_load_monitor_b32 :
AMDGPUAtomicLoadMonitor<flat_ptr_ty>;
----------------
Pierre-vh wrote:
I see your point, but I'd like to keep atomic to stay consistent with
`__atomic` built-ins. It's for semantics, not to match the instruction. My
intention is to make the built-in more high level than just a inline asm
cosplaying as a built-in kind of thing.
I'd like this built-in to the be the primary way to emit the monitor load
instructions, but if you prefer I can leave the old built-in in as the "raw"
version. I'd prefer getting rid of it as it's a footgun, though.
https://github.com/llvm/llvm-project/pull/177343
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits