Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGenOpenCL / builtins-amdgcn-gfx12-param-err.cl
blob1a5043328895ac8bf15a36935765badcbefcc71e
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);
9 *out = *in;
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}}
16 *out = *in;
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);
23 *out = *in;
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}}
30 *out = *in;
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}}