aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <rampitec@users.noreply.github.com>2024-07-09 14:25:58 -0700
committerGitHub <noreply@github.com>2024-07-09 14:25:58 -0700
commitf363e30f15ef274f94dba53a13d73998066a0148 (patch)
tree8900c32b2b4b5caae51f827f8ae3fe81f6838b0d /clang/test
parentaf21bc19172410f29606cac82a96c33d6710fe38 (diff)
downloadllvm-f363e30f15ef274f94dba53a13d73998066a0148.zip
llvm-f363e30f15ef274f94dba53a13d73998066a0148.tar.gz
llvm-f363e30f15ef274f94dba53a13d73998066a0148.tar.bz2
[AMDGPU] Report error in clang if wave32 is requested where unsupported (#97633)
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl2
-rw-r--r--clang/test/SemaOpenCL/builtins-amdgcn-error-wave32.cl3
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl b/clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl
index 7dbf5c3..4e2f7f8 100644
--- a/clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl
+++ b/clang/test/CodeGenOpenCL/amdgpu-features-illegal.cl
@@ -1,6 +1,8 @@
// RUN: not %clang_cc1 -triple amdgcn -target-feature +wavefrontsize32 -target-feature +wavefrontsize64 -o /dev/null %s 2>&1 | FileCheck %s
// RUN: not %clang_cc1 -triple amdgcn -target-cpu gfx1103 -target-feature +wavefrontsize32 -target-feature +wavefrontsize64 -o /dev/null %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -triple amdgcn -target-cpu gfx900 -target-feature +wavefrontsize32 -o /dev/null %s 2>&1 | FileCheck %s --check-prefix=GFX9
// CHECK: error: invalid feature combination: 'wavefrontsize32' and 'wavefrontsize64' are mutually exclusive
+// GFX9: error: option 'wavefrontsize32' cannot be specified on this target
kernel void test() {}
diff --git a/clang/test/SemaOpenCL/builtins-amdgcn-error-wave32.cl b/clang/test/SemaOpenCL/builtins-amdgcn-error-wave32.cl
index 52f31c1..e0e3872 100644
--- a/clang/test/SemaOpenCL/builtins-amdgcn-error-wave32.cl
+++ b/clang/test/SemaOpenCL/builtins-amdgcn-error-wave32.cl
@@ -12,8 +12,7 @@ void test_ballot_wave32(global uint* out, int a, int b) {
*out = __builtin_amdgcn_ballot_w32(a == b); // expected-error {{'__builtin_amdgcn_ballot_w32' needs target feature wavefrontsize32}}
}
-// FIXME: Should error for subtargets that don't support wave32
-__attribute__((target("wavefrontsize32")))
+__attribute__((target("wavefrontsize32"))) // gfx9-error@*:* {{option 'wavefrontsize32' cannot be specified on this target}}
void test_ballot_wave32_target_attr(global uint* out, int a, int b) {
*out = __builtin_amdgcn_ballot_w32(a == b);
}