================
@@ -2861,6 +2861,69 @@ def int_experimental_convergence_anchor
 def int_experimental_convergence_loop
   : DefaultAttrsIntrinsic<[llvm_token_ty], [], [IntrNoMem, IntrConvergent]>;
 
+//===------- GPU Intrinsics 
-----------------------------------------------===//
+
+class GPUIntrinsic<LLVMType ret_type, string name>
+  : DefaultAttrsIntrinsic<[ret_type],
+                          [],
+                          [NoUndef<RetIndex>, IntrNoMem, IntrSpeculatable]>,
+                          ClangBuiltin<name>;
----------------
arsenm wrote:

As I mentioned on the thread I do not think this should be the first solution 
to reach for.

For example as-is this immediately breaks running AMDGPUAttributor, which will 
now incorrectly not detect uses of the underlying intrinsics hidden behind 
these wrappers. These wrappers need to have the same semantics as an unknown 
external call (as in, this should not use DefaultAddrsIntrinsic)

And need a test showing that AMDGPUAttributor infers none of the implicit 
argument attributes if there is a call to any of these 

https://github.com/llvm/llvm-project/pull/131190
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to