1 // RUN
: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu verde -S -verify -o - %s
2 // REQUIRES
: amdgpu-registered-target
4 #pragma OPENCL EXTENSION cl_khr_fp16
: enable
6 typedef unsigned char u8
;
7 typedef unsigned short u16
;
8 typedef unsigned int u32
;
9 typedef unsigned int v2u32 __attribute__
((ext_vector_type(2)));
10 typedef unsigned int v3u32 __attribute__
((ext_vector_type(3)));
11 typedef unsigned int v4u32 __attribute__
((ext_vector_type(4)));
13 void test_amdgcn_raw_ptr_buffer_store_b8
(u8 vdata
, __amdgpu_buffer_rsrc_t rsrc
, int offset
, int soffset
, int aux
) {
14 __builtin_amdgcn_raw_buffer_store_b8
(vdata, rsrc
, /*offset
=*/0, /*soffset
=*/0, aux
); //expected-error{{argument to '__builtin_amdgcn_raw_buffer_store_b8' must be a constant integer}}
17 void test_amdgcn_raw_ptr_buffer_store_b16
(u16 vdata
, __amdgpu_buffer_rsrc_t rsrc
, int offset
, int soffset
, int aux
) {
18 __builtin_amdgcn_raw_buffer_store_b16
(vdata, rsrc
, /*offset
=*/0, /*soffset
=*/0, aux
); //expected-error{{argument to '__builtin_amdgcn_raw_buffer_store_b16' must be a constant integer}}
21 void test_amdgcn_raw_ptr_buffer_store_b32
(u32 vdata
, __amdgpu_buffer_rsrc_t rsrc
, int offset
, int soffset
, int aux
) {
22 __builtin_amdgcn_raw_buffer_store_b32
(vdata, rsrc
, /*offset
=*/0, /*soffset
=*/0, aux
); //expected-error{{argument to '__builtin_amdgcn_raw_buffer_store_b32' must be a constant integer}}
25 void test_amdgcn_raw_ptr_buffer_store_b64
(v2u32 vdata
, __amdgpu_buffer_rsrc_t rsrc
, int offset
, int soffset
, int aux
) {
26 __builtin_amdgcn_raw_buffer_store_b64
(vdata, rsrc
, /*offset
=*/0, /*soffset
=*/0, aux
); //expected-error{{argument to '__builtin_amdgcn_raw_buffer_store_b64' must be a constant integer}}
29 void test_amdgcn_raw_ptr_buffer_store_b96
(v3u32 vdata
, __amdgpu_buffer_rsrc_t rsrc
, int offset
, int soffset
, int aux
) {
30 __builtin_amdgcn_raw_buffer_store_b96
(vdata, rsrc
, /*offset
=*/0, /*soffset
=*/0, aux
); //expected-error{{argument to '__builtin_amdgcn_raw_buffer_store_b96' must be a constant integer}}
33 void test_amdgcn_raw_ptr_buffer_store_b128
(v4u32 vdata
, __amdgpu_buffer_rsrc_t rsrc
, int offset
, int soffset
, int aux
) {
34 __builtin_amdgcn_raw_buffer_store_b128
(vdata, rsrc
, /*offset
=*/0, /*soffset
=*/0, aux
); //expected-error{{argument to '__builtin_amdgcn_raw_buffer_store_b128' must be a constant integer}}