Changeset View
Changeset View
Standalone View
Standalone View
clang/test/SemaOpenCL/builtins-amdgcn-error.cl
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | void test_s_setprio(int x) | ||||
__builtin_amdgcn_s_setprio(65536); // expected-warning {{implicit conversion from 'int' to 'short' changes value from 65536 to 0}} | __builtin_amdgcn_s_setprio(65536); // expected-warning {{implicit conversion from 'int' to 'short' changes value from 65536 to 0}} | ||||
} | } | ||||
void test_sched_barrier(int x) | void test_sched_barrier(int x) | ||||
{ | { | ||||
__builtin_amdgcn_sched_barrier(x); // expected-error {{argument to '__builtin_amdgcn_sched_barrier' must be a constant integer}} | __builtin_amdgcn_sched_barrier(x); // expected-error {{argument to '__builtin_amdgcn_sched_barrier' must be a constant integer}} | ||||
} | } | ||||
void test_sched_group_barrier(int x) | |||||
{ | |||||
__builtin_amdgcn_sched_group_barrier(x, 0, 1); // expected-error {{argument to '__builtin_amdgcn_sched_group_barrier' must be a constant integer}} | |||||
arsenm: Test error for each argument? | |||||
__builtin_amdgcn_sched_group_barrier(0, x, 1); // expected-error {{argument to '__builtin_amdgcn_sched_group_barrier' must be a constant integer}} | |||||
__builtin_amdgcn_sched_group_barrier(0, 1, x); // expected-error {{argument to '__builtin_amdgcn_sched_group_barrier' must be a constant integer}} | |||||
} | |||||
void test_sicmp_i32(global ulong* out, int a, int b, uint c) | void test_sicmp_i32(global ulong* out, int a, int b, uint c) | ||||
{ | { | ||||
*out = __builtin_amdgcn_sicmp(a, b, c); // expected-error {{argument to '__builtin_amdgcn_sicmp' must be a constant integer}} | *out = __builtin_amdgcn_sicmp(a, b, c); // expected-error {{argument to '__builtin_amdgcn_sicmp' must be a constant integer}} | ||||
} | } | ||||
void test_uicmp_i32(global ulong* out, uint a, uint b, uint c) | void test_uicmp_i32(global ulong* out, uint a, uint b, uint c) | ||||
{ | { | ||||
*out = __builtin_amdgcn_uicmp(a, b, c); // expected-error {{argument to '__builtin_amdgcn_uicmp' must be a constant integer}} | *out = __builtin_amdgcn_uicmp(a, b, c); // expected-error {{argument to '__builtin_amdgcn_uicmp' must be a constant integer}} | ||||
▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines |
Test error for each argument?