1 // REQUIRES
: amdgpu-registered-target
3 // RUN
: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1200 -verify -emit-llvm -o - %s
5 kernel void builtins_amdgcn_s_barrier_signal_err
(global int
* in
, global int
* out
, int barrier
) {
7 __builtin_amdgcn_s_barrier_signal
(barrier); // expected-error {{'__builtin_amdgcn_s_barrier_signal' must be a constant integer}}
8 __builtin_amdgcn_s_barrier_wait
(-1);
12 kernel void builtins_amdgcn_s_barrier_wait_err
(global int
* in
, global int
* out
, int barrier
) {
14 __builtin_amdgcn_s_barrier_signal
(-1);
15 __builtin_amdgcn_s_barrier_wait
(barrier); // expected-error {{'__builtin_amdgcn_s_barrier_wait' must be a constant integer}}
19 kernel void builtins_amdgcn_s_barrier_signal_isfirst_err
(global int
* in
, global int
* out
, int barrier
) {
21 __builtin_amdgcn_s_barrier_signal_isfirst
(barrier); // expected-error {{'__builtin_amdgcn_s_barrier_signal_isfirst' must be a constant integer}}
22 __builtin_amdgcn_s_barrier_wait
(-1);
26 kernel void builtins_amdgcn_s_barrier_leave_err
(global int
* in
, global int
* out
, int barrier
) {
28 __builtin_amdgcn_s_barrier_signal
(-1);
29 __builtin_amdgcn_s_barrier_leave
(barrier); // expected-error {{'__builtin_amdgcn_s_barrier_leave' must be a constant integer}}
33 void test_s_buffer_prefetch_data
(__amdgpu_buffer_rsrc_t rsrc
, unsigned int off
)
35 __builtin_amdgcn_s_buffer_prefetch_data
(rsrc, off
, 31); // expected-error {{'__builtin_amdgcn_s_buffer_prefetch_data' must be a constant integer}}