xref: /llvm-project/clang/test/SemaOpenCL/builtins-amdgcn-error-gfx10-param.cl (revision e56865d40c1691fdd215179c827be66f0cd5bae0)
1// RUN: %clang_cc1 -triple amdgcn-- -target-cpu gfx1010 -verify -S -o - %s
2
3typedef unsigned int uint;
4
5
6void test_permlane16(global uint* out, uint a, uint b, uint c, uint d, uint e) {
7  *out = __builtin_amdgcn_permlane16(a, b, c, d, e, 1); // expected-error{{argument to '__builtin_amdgcn_permlane16' must be a constant integer}}
8  *out = __builtin_amdgcn_permlane16(a, b, c, d, 1, e); // expected-error{{argument to '__builtin_amdgcn_permlane16' must be a constant integer}}
9}
10
11void test_permlanex16(global uint* out, uint a, uint b, uint c, uint d, uint e) {
12  *out = __builtin_amdgcn_permlanex16(a, b, c, d, e, 1); // expected-error{{argument to '__builtin_amdgcn_permlanex16' must be a constant integer}}
13  *out = __builtin_amdgcn_permlanex16(a, b, c, d, 1, e); // expected-error{{argument to '__builtin_amdgcn_permlanex16' must be a constant integer}}
14}
15
16void test_mov_dpp8(global uint* out, uint a, uint b) {
17  *out = __builtin_amdgcn_mov_dpp8(a, b); // expected-error{{argument to '__builtin_amdgcn_mov_dpp8' must be a constant integer}}
18}
19