1 // REQUIRES
: amdgpu-registered-target
2 // RUN
: %clang_cc1 -triple amdgcn-- -target-cpu gfx950 -verify -S -o - %s
4 typedef float float4 __attribute__
((ext_vector_type(4)));
5 typedef float float16 __attribute__
((ext_vector_type(16)));
6 typedef half half8 __attribute__
((ext_vector_type(8)));
7 typedef half half16 __attribute__
((ext_vector_type(16)));
8 typedef __bf16 bfloat8 __attribute__
((ext_vector_type(8)));
9 typedef __bf16 bfloat16 __attribute__
((ext_vector_type(16)));
10 typedef int int4 __attribute__
((ext_vector_type(4)));
11 typedef int int8 __attribute__
((ext_vector_type(8)));
12 typedef int int16 __attribute__
((ext_vector_type(16)));
13 typedef unsigned int uint
;
14 typedef half half2 __attribute__
((ext_vector_type(2)));
15 typedef short short2 __attribute__
((ext_vector_type(2)));
16 typedef float float2 __attribute__
((ext_vector_type(2)));
17 typedef __bf16 bfloat2 __attribute__
((ext_vector_type(2)));
18 typedef unsigned short ushort
;
20 void test_mfma_f32_16x16x32_f16
(__global float4
* out
, half8 a
, half8 b
, float4 c
, int X
) {
22 *out
= __builtin_amdgcn_mfma_f32_16x16x32_f16
(a, b
, c
, X
, 0, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_16x16x32_f16' must be a constant integer}}
23 *out
= __builtin_amdgcn_mfma_f32_16x16x32_f16
(a, b
, c
, 0, X
, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_16x16x32_f16' must be a constant integer}}
24 *out
= __builtin_amdgcn_mfma_f32_16x16x32_f16
(a, b
, c
, 0, 0, X
); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_16x16x32_f16' must be a constant integer}}
28 void test_mfma_f32_32x32x16_f16
(__global float16
* out
, half8 a
, half8 b
, float16 c
, int X
) {
29 *out
= __builtin_amdgcn_mfma_f32_32x32x16_f16
(a, b
, c
, X
, 0, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_32x32x16_f16' must be a constant integer}}
30 *out
= __builtin_amdgcn_mfma_f32_32x32x16_f16
(a, b
, c
, 0, X
, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_32x32x16_f16' must be a constant integer}}
31 *out
= __builtin_amdgcn_mfma_f32_32x32x16_f16
(a, b
, c
, 0, 0, X
); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_32x32x16_f16' must be a constant integer}}
34 void test_mfma_f32_32x32x16_bf16
(__global float16
* out
, bfloat8 a
, bfloat8 b
, float16 c
, int X
) {
35 *out
= __builtin_amdgcn_mfma_f32_32x32x16_bf16
(a, b
, c
, X
, 0, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_32x32x16_bf16' must be a constant integer}}
36 *out
= __builtin_amdgcn_mfma_f32_32x32x16_bf16
(a, b
, c
, 0, X
, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_32x32x16_bf16' must be a constant integer}}
37 *out
= __builtin_amdgcn_mfma_f32_32x32x16_bf16
(a, b
, c
, 0, 0, X
); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_32x32x16_bf16' must be a constant integer}}
40 void test_mfma_scale_f32_16x16x128_f8f6f4
(__global float4
* out
, int8 a
, int8 b
, float4 c
, int X
, int Y
) {
41 *out
= __builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4
(a, b
, c
, X
, 0, 1, Y
, 2, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4' must be a constant integer}}
42 *out
= __builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4
(a, b
, c
, 0, X
, 1, Y
, 2, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4' must be a constant integer}}
43 *out
= __builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4
(a, b
, c
, 0, 0, X
, Y
, 2, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4' must be a constant integer}}
44 *out
= __builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4
(a, b
, c
, 0, 0, 0, Y
, X
, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_16x16x128_f8f6f4' must be a constant integer}}
47 void test_mfma_scale_f32_32x32x64_f8f6f4
(__global float16
* out
, int8 a
, int8 b
, float16 c
, int X
, int Y
) {
48 *out
= __builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4
(a, b
, c
, X
, 0, 1, Y
, 2, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4' must be a constant integer}}
49 *out
= __builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4
(a, b
, c
, 0, X
, 1, Y
, 2, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4' must be a constant integer}}
50 *out
= __builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4
(a, b
, c
, 0, 0, X
, Y
, 2, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4' must be a constant integer}}
51 *out
= __builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4
(a, b
, c
, 0, 0, 0, Y
, X
, Y
); // expected-error{{argument to '__builtin_amdgcn_mfma_scale_f32_32x32x64_f8f6f4' must be a constant integer}}
54 void test_mfma_i32_16x16x64_i8
(__global int4
* out
, int4 a
, int4 b
, int4 c
, int X
) {
55 *out
= __builtin_amdgcn_mfma_i32_16x16x64_i8
(a, b
, c
, X
, 0, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_i32_16x16x64_i8' must be a constant integer}}
56 *out
= __builtin_amdgcn_mfma_i32_16x16x64_i8
(a, b
, c
, 0, X
, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_i32_16x16x64_i8' must be a constant integer}}
57 *out
= __builtin_amdgcn_mfma_i32_16x16x64_i8
(a, b
, c
, 0, 0, X
); // expected-error{{argument to '__builtin_amdgcn_mfma_i32_16x16x64_i8' must be a constant integer}}
60 void test_mfma_i32_32x32x32_i8
(__global int16
* out
, int4 a
, int4 b
, int16 c
, int X
) {
61 *out
= __builtin_amdgcn_mfma_i32_32x32x32_i8
(a, b
, c
, X
, 0, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_i32_32x32x32_i8' must be a constant integer}}
62 *out
= __builtin_amdgcn_mfma_i32_32x32x32_i8
(a, b
, c
, 0, X
, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_i32_32x32x32_i8' must be a constant integer}}
63 *out
= __builtin_amdgcn_mfma_i32_32x32x32_i8
(a, b
, c
, 0, 0, X
); // expected-error{{argument to '__builtin_amdgcn_mfma_i32_32x32x32_i8' must be a constant integer}}
66 void test_mfma_f32_16x16x32_bf16
(__global float4
* out
, bfloat8 a
, bfloat8 b
, float4 c
, int X
) {
68 *out
= __builtin_amdgcn_mfma_f32_16x16x32_bf16
(a, b
, c
, X
, 0, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_16x16x32_bf16' must be a constant integer}}
69 *out
= __builtin_amdgcn_mfma_f32_16x16x32_bf16
(a, b
, c
, 0, X
, 0); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_16x16x32_bf16' must be a constant integer}}
70 *out
= __builtin_amdgcn_mfma_f32_16x16x32_bf16
(a, b
, c
, 0, 0, X
); // expected-error{{argument to '__builtin_amdgcn_mfma_f32_16x16x32_bf16' must be a constant integer}}
73 void test_smfmac_f32_16x16x64_f16
(global float4
* out
, half8 a
, half16 b
, float4 c
, int idx
, int d
)
75 *out
= __builtin_amdgcn_smfmac_f32_16x16x64_f16
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x64_f16' must be a constant integer}}
76 *out
= __builtin_amdgcn_smfmac_f32_16x16x64_f16
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x64_f16' must be a constant integer}}
79 void test_smfmac_f32_32x32x32_f16
(global float16
* out
, half8 a
, half16 b
, float16 c
, int idx
, int d
)
81 *out
= __builtin_amdgcn_smfmac_f32_32x32x32_f16
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x32_f16' must be a constant integer}}
82 *out
= __builtin_amdgcn_smfmac_f32_32x32x32_f16
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x32_f16' must be a constant integer}}
85 void test_smfmac_f32_16x16x64_bf16
(global float4
* out
, bfloat8 a
, bfloat16 b
, float4 c
, int idx
, int d
)
87 *out
= __builtin_amdgcn_smfmac_f32_16x16x64_bf16
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x64_bf16' must be a constant integer}}
88 *out
= __builtin_amdgcn_smfmac_f32_16x16x64_bf16
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x64_bf16' must be a constant integer}}
91 void test_smfmac_f32_32x32x32_bf16
(global float16
* out
, bfloat8 a
, bfloat16 b
, float16 c
, int idx
, int d
)
93 *out
= __builtin_amdgcn_smfmac_f32_32x32x32_bf16
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x32_bf16' must be a constant integer}}
94 *out
= __builtin_amdgcn_smfmac_f32_32x32x32_bf16
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x32_bf16' must be a constant integer}}
97 void test_smfmac_i32_16x16x128_i8
(global int4
* out
, int4 a
, int8 b
, int4 c
, int idx
, int d
)
99 *out
= __builtin_amdgcn_smfmac_i32_16x16x128_i8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_i32_16x16x128_i8' must be a constant integer}}
100 *out
= __builtin_amdgcn_smfmac_i32_16x16x128_i8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_i32_16x16x128_i8' must be a constant integer}}
103 void test_smfmac_i32_32x32x64_i8
(global int16
* out
, int4 a
, int8 b
, int16 c
, int idx
, int d
)
105 *out
= __builtin_amdgcn_smfmac_i32_32x32x64_i8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_i32_32x32x64_i8' must be a constant integer}}
106 *out
= __builtin_amdgcn_smfmac_i32_32x32x64_i8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_i32_32x32x64_i8' must be a constant integer}}
109 void test_smfmac_f32_16x16x128_bf8_bf8
(global float4
* out
, int4 a
, int8 b
, float4 c
, int idx
, int d
)
111 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_bf8_bf8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_bf8_bf8' must be a constant integer}}
112 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_bf8_bf8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_bf8_bf8' must be a constant integer}}
115 void test_smfmac_f32_16x16x128_bf8_fp8
(global float4
* out
, int4 a
, int8 b
, float4 c
, int idx
, int d
)
117 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_bf8_fp8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_bf8_fp8' must be a constant integer}}
118 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_bf8_fp8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_bf8_fp8' must be a constant integer}}
121 void test_smfmac_f32_16x16x128_fp8_bf8
(global float4
* out
, int4 a
, int8 b
, float4 c
, int idx
, int d
)
123 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_fp8_bf8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_fp8_bf8' must be a constant integer}}
124 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_fp8_bf8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_fp8_bf8' must be a constant integer}}
127 void test_smfmac_f32_16x16x128_fp8_fp8
(global float4
* out
, int4 a
, int8 b
, float4 c
, int idx
, int d
)
129 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_fp8_fp8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_fp8_fp8' must be a constant integer}}
130 *out
= __builtin_amdgcn_smfmac_f32_16x16x128_fp8_fp8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_16x16x128_fp8_fp8' must be a constant integer}}
133 void test_smfmac_f32_32x32x64_bf8_bf8
(global float16
* out
, int4 a
, int8 b
, float16 c
, int idx
, int d
)
135 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_bf8_bf8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_bf8_bf8' must be a constant integer}}
136 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_bf8_bf8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_bf8_bf8' must be a constant integer}}
139 void test_smfmac_f32_32x32x64_bf8_fp8
(global float16
* out
, int4 a
, int8 b
, float16 c
, int idx
, int d
)
141 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_bf8_fp8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_bf8_fp8' must be a constant integer}}
142 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_bf8_fp8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_bf8_fp8' must be a constant integer}}
145 void test_smfmac_f32_32x32x64_fp8_bf8
(global float16
* out
, int4 a
, int8 b
, float16 c
, int idx
, int d
)
147 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_fp8_bf8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_fp8_bf8' must be a constant integer}}
148 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_fp8_bf8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_fp8_bf8' must be a constant integer}}
151 void test_smfmac_f32_32x32x64_fp8_fp8
(global float16
* out
, int4 a
, int8 b
, float16 c
, int idx
, int d
)
153 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_fp8_fp8
(a, b
, c
, idx
, d
, 0); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_fp8_fp8' must be a constant integer}}
154 *out
= __builtin_amdgcn_smfmac_f32_32x32x64_fp8_fp8
(a, b
, c
, idx
, 0, d
); // expected-error{{argument to '__builtin_amdgcn_smfmac_f32_32x32x64_fp8_fp8' must be a constant integer}}
157 void test_permlane16_swap
(__global int
* out
, int old
, int src
, bool X
) {
158 *out
= __builtin_amdgcn_permlane16_swap
(old, src
, X
, false
); // expected-error{{argument to '__builtin_amdgcn_permlane16_swap' must be a constant integer}}
159 *out
= __builtin_amdgcn_permlane16_swap
(old, src
, false
, X
); // expected-error{{argument to '__builtin_amdgcn_permlane16_swap' must be a constant integer}}
162 void test_permlane32_swap
(__global int
* out
, int old
, int src
, bool X
) {
163 *out
= __builtin_amdgcn_permlane32_swap
(old, src
, X
, false
); // expected-error{{argument to '__builtin_amdgcn_permlane32_swap' must be a constant integer}}
164 *out
= __builtin_amdgcn_permlane32_swap
(old, src
, false
, X
); // expected-error{{argument to '__builtin_amdgcn_permlane32_swap' must be a constant integer}}
167 void test_cvt_scalef32
(global half2
* out_v2f16
, global float
* out_f32
, uint src
, float scale
, int index
, bool X
,
168 global short2
* out_v2i16
, float src0
, float src1
, global float2
* out_v2f32
,
169 half2 src0_v2f16
, bfloat2 src0_v2bf16
, float2 src0_v2f32
, global uint
* out
, global bfloat2
* out_v2bf16
) {
170 *out_v2f16
= __builtin_amdgcn_cvt_scalef32_f16_fp8
(*out_v2f16
, src
, scale
, index
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_f16_fp8' must be a constant integer}}
171 *out_f32
= __builtin_amdgcn_cvt_scalef32_f32_fp8
(src, scale
, index
); // // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_f32_fp8' must be a constant integer}}
172 *out_v2f16
= __builtin_amdgcn_cvt_scalef32_f16_bf8
(*out_v2f16
, src
, scale
, index
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_f16_bf8' must be a constant integer}}
173 *out_f32
= __builtin_amdgcn_cvt_scalef32_f32_bf8
(src, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_f32_bf8' must be a constant integer}}
174 *out_v2i16
= __builtin_amdgcn_cvt_scalef32_pk_fp8_f32
(*out_v2i16
, src0
, src1
, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_fp8_f32' must be a constant integer}}
175 *out_v2i16
= __builtin_amdgcn_cvt_scalef32_pk_bf8_f32
(*out_v2i16
, src0
, src1
, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_bf8_f32' must be a constant integer}}
176 *out_v2f32
= __builtin_amdgcn_cvt_scalef32_pk_f32_fp8
(src, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_f32_fp8' must be a constant integer}}
177 *out_v2f32
= __builtin_amdgcn_cvt_scalef32_pk_f32_bf8
(src, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_f32_bf8' must be a constant integer}}
178 *out_v2i16
= __builtin_amdgcn_cvt_scalef32_pk_fp8_f16
(*out_v2i16
, src0_v2f16
, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_fp8_f16' must be a constant integer}}
179 *out_v2i16
= __builtin_amdgcn_cvt_scalef32_pk_fp8_bf16
(*out_v2i16
, src0_v2bf16
, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_fp8_bf16' must be a constant integer}}
180 *out_v2i16
= __builtin_amdgcn_cvt_scalef32_pk_bf8_f16
(*out_v2i16
, src0_v2f16
, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_bf8_f16' must be a constant integer}}
181 *out_v2i16
= __builtin_amdgcn_cvt_scalef32_pk_bf8_bf16
(*out_v2i16
, src0_v2bf16
, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_bf8_bf16' must be a constant integer}}
182 *out_v2f32
= __builtin_amdgcn_cvt_scalef32_pk_f32_fp4
(src, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_f32_fp4' must be a constant integer}}
183 *out
= __builtin_amdgcn_cvt_scalef32_pk_fp4_f32
(*out
, src0
, src1
, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_fp4_f32' must be a constant integer}}
184 *out_v2f16
= __builtin_amdgcn_cvt_scalef32_pk_f16_fp4
(src, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_f16_fp4' must be a constant integer}}
185 *out_v2bf16
= __builtin_amdgcn_cvt_scalef32_pk_bf16_fp4
(src, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_bf16_fp4' must be a constant integer}}
186 *out_v2f16
= __builtin_amdgcn_cvt_scalef32_pk_f16_fp8
(src, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_f16_fp8' must be a constant integer}}
187 *out_v2f16
= __builtin_amdgcn_cvt_scalef32_pk_f16_bf8
(src, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_f16_bf8' must be a constant integer}}
188 *out_v2bf16
= __builtin_amdgcn_cvt_scalef32_pk_bf16_fp8
(src, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_bf16_fp8' must be a constant integer}}
189 *out_v2bf16
= __builtin_amdgcn_cvt_scalef32_pk_bf16_bf8
(src, scale
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_bf16_bf8' must be a constant integer}}
190 *out
= __builtin_amdgcn_cvt_scalef32_pk_fp4_f16
(*out
, src0_v2f16
, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_fp4_f16' must be a constant integer}}
191 *out
= __builtin_amdgcn_cvt_scalef32_pk_fp4_bf16
(*out
, src0_v2bf16
, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_pk_fp4_bf16' must be a constant integer}}
192 *out
= __builtin_amdgcn_cvt_scalef32_sr_pk_fp4_f16
(*out
, src0_v2f16
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_pk_fp4_f16' must be a constant integer}}
193 *out
= __builtin_amdgcn_cvt_scalef32_sr_pk_fp4_bf16
(*out
, src0_v2bf16
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_pk_fp4_bf16' must be a constant integer}}
194 *out
= __builtin_amdgcn_cvt_scalef32_sr_pk_fp4_f32
(*out
, src0_v2f32
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_pk_fp4_f32' must be a constant integer}}
195 *out
= __builtin_amdgcn_cvt_scalef32_sr_bf8_bf16
(*out
, src0
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_bf8_bf16' must be a constant integer}}
196 *out
= __builtin_amdgcn_cvt_scalef32_sr_bf8_f16
(*out
, src0
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_bf8_f16' must be a constant integer}}
197 *out
= __builtin_amdgcn_cvt_scalef32_sr_bf8_f32
(*out
, src0
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_bf8_f32' must be a constant integer}}
198 *out
= __builtin_amdgcn_cvt_scalef32_sr_fp8_bf16
(*out
, src0
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_fp8_bf16' must be a constant integer}}
199 *out
= __builtin_amdgcn_cvt_scalef32_sr_fp8_f16
(*out
, src0
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_fp8_f16' must be a constant integer}}
200 *out
= __builtin_amdgcn_cvt_scalef32_sr_fp8_f32
(*out
, src0
, 0, scale
, index
); // expected-error{{argument to '__builtin_amdgcn_cvt_scalef32_sr_fp8_f32' must be a constant integer}}
201 *out_v2bf16
= __builtin_amdgcn_cvt_sr_bf16_f32
(*out_v2bf16
, src0
, src
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_sr_bf16_f32' must be a constant integer}}
202 *out_v2f16
= __builtin_amdgcn_cvt_sr_f16_f32
(*out_v2f16
, src0
, src
, X
); // expected-error{{argument to '__builtin_amdgcn_cvt_sr_f16_f32' must be a constant integer}}
205 void test_bitop3_args
(global uint
* out
, uint a
, uint b
, uint c
) {
206 *out
= __builtin_amdgcn_bitop3_b32
(a, b
, c
, a
); // expected-error {{argument to '__builtin_amdgcn_bitop3_b32' must be a constant integer}}
207 *out
= __builtin_amdgcn_bitop3_b16
((ushort)a
, (ushort)b
, (ushort)c
, a
); // expected-error {{argument to '__builtin_amdgcn_bitop3_b16' must be a constant integer}}