[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaOpenCL / builtins-amdgcn-error-wave64.cl
blob99e93acd9a21381ecafe1487bce6f8fffcb65e8f
1 // RUN: %clang_cc1 -triple amdgcn-- -verify -S -o - %s
2 // RUN: %clang_cc1 -triple amdgcn-- -target-feature +wavefrontsize32 -verify -S -o - %s
3 // RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -target-feature +wavefrontsize32 -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 -verify -S -o - %s
7 typedef unsigned long ulong;
9 void test_ballot_wave64(global ulong* out, int a, int b) {
10 *out = __builtin_amdgcn_ballot_w64(a == b); // expected-error {{'__builtin_amdgcn_ballot_w64' needs target feature wavefrontsize64}}
13 __attribute__((target("wavefrontsize64")))
14 void test_ballot_wave64_target_attr(global ulong* out, int a, int b) {
15 *out = __builtin_amdgcn_ballot_w64(a == b);