| 1 |
// RUN: %clang_cc1 -triple amdgcn-- -verify=default -S -o - %s |
| 2 |
// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx900 -verify=gfx9 -S -o - %s |
| 3 |
// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -verify=gfx10 -S -o - %s |
| 4 |
// RUN: not %clang_cc1 -triple amdgcn-- -target-cpu gfx900 -target-feature -wavefrontsize32 -S -o - %s 2>&1 | FileCheck --check-prefix=GFX9 %s |
| 5 |
// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -target-feature -wavefrontsize32 -verify=gfx10 -S -o - %s |
| 6 |
|
| 7 |
// REQUIRES: amdgpu-registered-target |
| 8 |
|
| 9 |
// default-no-diagnostics |
| 10 |
// gfx10-no-diagnostics |
| 11 |
|
| 12 |
typedef unsigned int uint; |
| 13 |
|
| 14 |
// GFX9: error: option 'wavefrontsize32' cannot be specified on this target |
| 15 |
__attribute__((target("wavefrontsize32"))) // gfx9-error@*:* {{option 'wavefrontsize32' cannot be specified on this target}} |
| 16 |
void test_ballot_wave32_target_attr(global uint* out, int a, int b) { |
| 17 |
*out = __builtin_amdgcn_ballot_w32(a == b); |
| 18 |
} |