[clang] [Clang][AMDGPU] Add a new builtin type for buffer rsrc (PR #94830)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 14:01:26 PDT 2024


================
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -x hip -aux-triple amdgcn-amd-amdhsa %s -fsyntax-only -verify
+
+#define __device__ __attribute__((device))
+
+__device__ __amdgcn_buffer_rsrc_t test_buffer_rsrc_t_device() {} // expected-warning {{non-void function does not return a value}}
+__amdgcn_buffer_rsrc_t test_buffer_rsrc_t_host() {} // expected-error {{'__amdgcn_buffer_rsrc_t' can only be used in device-side function}}
----------------
shiltian wrote:

Okay, that makes sense. Then I'll remove this test.

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


More information about the cfe-commits mailing list