[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaOpenCL / builtins-amdgcn-error-wave32.cl
blob543d64403fd2e8cf32a0751ef9194ea055ba8a4b
1 // RUN: %clang_cc1 -triple amdgcn-- -verify -S -o - %s
2 // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx900 -verify -S -o - %s
3 // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx900 -target-feature +wavefrontsize64 -verify -S -o - %s
4 // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -target-feature +wavefrontsize64 -verify -S -o - %s
5 // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -target-feature -wavefrontsize32 -verify -S -o - %s
7 typedef unsigned int uint;
9 void test_ballot_wave32(global uint* out, int a, int b) {
10 *out = __builtin_amdgcn_ballot_w32(a == b); // expected-error {{'__builtin_amdgcn_ballot_w32' needs target feature wavefrontsize32}}
13 // FIXME: Should error for subtargets that don't support wave32
14 __attribute__((target("wavefrontsize32")))
15 void test_ballot_wave32_target_attr(global uint* out, int a, int b) {
16 *out = __builtin_amdgcn_ballot_w32(a == b);