1 // REQUIRES: systemz-registered-target
2 // RUN: %clang_cc1 -target-cpu z13 -triple s390x-linux-gnu \
3 // RUN: -fzvector -flax-vector-conversions=none \
4 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
5
6 #include <vecintrin.h>
7
8 volatile vector signed char vsc;
9 volatile vector signed short vss;
10 volatile vector signed int vsi;
11 volatile vector signed long long vsl;
12 volatile vector unsigned char vuc;
13 volatile vector unsigned short vus;
14 volatile vector unsigned int vui;
15 volatile vector unsigned long long vul;
16 volatile vector bool char vbc;
17 volatile vector bool short vbs;
18 volatile vector bool int vbi;
19 volatile vector bool long long vbl;
20 volatile vector double vd;
21
22 volatile signed char sc;
23 volatile signed short ss;
24 volatile signed int si;
25 volatile signed long long sl;
26 volatile unsigned char uc;
27 volatile unsigned short us;
28 volatile unsigned int ui;
29 volatile unsigned long long ul;
30 volatile double d;
31
32 const void * volatile cptr;
33 const signed char * volatile cptrsc;
34 const signed short * volatile cptrss;
35 const signed int * volatile cptrsi;
36 const signed long long * volatile cptrsl;
37 const unsigned char * volatile cptruc;
38 const unsigned short * volatile cptrus;
39 const unsigned int * volatile cptrui;
40 const unsigned long long * volatile cptrul;
41 const float * volatile cptrf;
42 const double * volatile cptrd;
43
44 void * volatile ptr;
45 signed char * volatile ptrsc;
46 signed short * volatile ptrss;
47 signed int * volatile ptrsi;
48 signed long long * volatile ptrsl;
49 unsigned char * volatile ptruc;
50 unsigned short * volatile ptrus;
51 unsigned int * volatile ptrui;
52 unsigned long long * volatile ptrul;
53 float * volatile ptrf;
54 double * volatile ptrd;
55
56 volatile unsigned int len;
57 volatile int idx;
58 int cc;
59
test_core(void)60 void test_core(void) {
61 len = __lcbb(cptr, idx); // expected-error {{no matching function}}
62 // expected-note@vecintrin.h:* {{must be a constant power of 2 from 64 to 4096}}
63 len = __lcbb(cptr, 200); // expected-error {{no matching function}}
64 // expected-note@vecintrin.h:* {{must be a constant power of 2 from 64 to 4096}}
65 len = __lcbb(cptr, 32); // expected-error {{no matching function}}
66 // expected-note@vecintrin.h:* {{must be a constant power of 2 from 64 to 4096}}
67 len = __lcbb(cptr, 8192); // expected-error {{no matching function}}
68 // expected-note@vecintrin.h:* {{must be a constant power of 2 from 64 to 4096}}
69
70 vsl = vec_permi(vsl, vsl, idx); // expected-error {{no matching function}}
71 // expected-note@vecintrin.h:* 3 {{candidate function not viable}}
72 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
73 vsl = vec_permi(vsl, vsl, -1); // expected-error {{no matching function}}
74 // expected-note@vecintrin.h:* 3 {{candidate function not viable}}
75 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
76 vsl = vec_permi(vsl, vsl, 4); // expected-error {{no matching function}}
77 // expected-note@vecintrin.h:* 3 {{candidate function not viable}}
78 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
79 vul = vec_permi(vul, vul, idx); // expected-error {{no matching function}}
80 // expected-note@vecintrin.h:* 2 {{candidate function not viable}}
81 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
82 vul = vec_permi(vul, vul, -1); // expected-error {{no matching function}}
83 // expected-note@vecintrin.h:* 2 {{candidate function not viable}}
84 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
85 vul = vec_permi(vul, vul, 4); // expected-error {{no matching function}}
86 // expected-note@vecintrin.h:* 2 {{candidate function not viable}}
87 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
88 vbl = vec_permi(vbl, vbl, idx); // expected-error {{no matching function}}
89 // expected-note@vecintrin.h:* 2 {{candidate function not viable}}
90 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
91 vbl = vec_permi(vbl, vbl, -1); // expected-error {{no matching function}}
92 // expected-note@vecintrin.h:* 2 {{candidate function not viable}}
93 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
94 vbl = vec_permi(vbl, vbl, 4); // expected-error {{no matching function}}
95 // expected-note@vecintrin.h:* 2 {{candidate function not viable}}
96 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
97 vd = vec_permi(vd, vd, idx); // expected-error {{no matching function}}
98 // expected-note@vecintrin.h:* 3 {{candidate function not viable}}
99 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
100 vd = vec_permi(vd, vd, -1); // expected-error {{no matching function}}
101 // expected-note@vecintrin.h:* 3 {{candidate function not viable}}
102 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
103 vd = vec_permi(vd, vd, 4); // expected-error {{no matching function}}
104 // expected-note@vecintrin.h:* 3 {{candidate function not viable}}
105 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
106
107 vsi = vec_gather_element(vsi, vui, cptrsi, idx); // expected-error {{no matching function}}
108 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
109 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
110 vsi = vec_gather_element(vsi, vui, cptrsi, -1); // expected-error {{no matching function}}
111 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
112 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
113 vsi = vec_gather_element(vsi, vui, cptrsi, 4); // expected-error {{no matching function}}
114 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
115 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
116 vui = vec_gather_element(vui, vui, cptrui, idx); // expected-error {{no matching function}}
117 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
118 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
119 vui = vec_gather_element(vui, vui, cptrui, -1); // expected-error {{no matching function}}
120 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
121 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
122 vui = vec_gather_element(vui, vui, cptrui, 4); // expected-error {{no matching function}}
123 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
124 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
125 vbi = vec_gather_element(vbi, vui, cptrui, idx); // expected-error {{no matching function}}
126 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
127 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
128 vbi = vec_gather_element(vbi, vui, cptrui, -1); // expected-error {{no matching function}}
129 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
130 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
131 vbi = vec_gather_element(vbi, vui, cptrui, 4); // expected-error {{no matching function}}
132 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
133 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
134 vsl = vec_gather_element(vsl, vul, cptrsl, idx); // expected-error {{no matching function}}
135 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
136 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
137 vsl = vec_gather_element(vsl, vul, cptrsl, -1); // expected-error {{no matching function}}
138 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
139 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
140 vsl = vec_gather_element(vsl, vul, cptrsl, 2); // expected-error {{no matching function}}
141 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
142 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
143 vul = vec_gather_element(vul, vul, cptrul, idx); // expected-error {{no matching function}}
144 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
145 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
146 vul = vec_gather_element(vul, vul, cptrul, -1); // expected-error {{no matching function}}
147 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
148 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
149 vul = vec_gather_element(vul, vul, cptrul, 2); // expected-error {{no matching function}}
150 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
151 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
152 vbl = vec_gather_element(vbl, vul, cptrul, idx); // expected-error {{no matching function}}
153 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
154 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
155 vbl = vec_gather_element(vbl, vul, cptrul, -1); // expected-error {{no matching function}}
156 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
157 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
158 vbl = vec_gather_element(vbl, vul, cptrul, 2); // expected-error {{no matching function}}
159 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
160 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
161 vd = vec_gather_element(vd, vul, cptrd, idx); // expected-error {{no matching function}}
162 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
163 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
164 vd = vec_gather_element(vd, vul, cptrd, -1); // expected-error {{no matching function}}
165 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
166 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
167 vd = vec_gather_element(vd, vul, cptrd, 2); // expected-error {{no matching function}}
168 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
169 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
170
171 vec_scatter_element(vsi, vui, ptrsi, idx); // expected-error {{no matching function}}
172 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
173 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
174 vec_scatter_element(vsi, vui, ptrsi, -1); // expected-error {{no matching function}}
175 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
176 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
177 vec_scatter_element(vsi, vui, ptrsi, 4); // expected-error {{no matching function}}
178 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
179 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
180 vec_scatter_element(vui, vui, ptrui, idx); // expected-error {{no matching function}}
181 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
182 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
183 vec_scatter_element(vui, vui, ptrui, -1); // expected-error {{no matching function}}
184 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
185 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
186 vec_scatter_element(vui, vui, ptrui, 4); // expected-error {{no matching function}}
187 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
188 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
189 vec_scatter_element(vbi, vui, ptrui, idx); // expected-error {{no matching function}}
190 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
191 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
192 vec_scatter_element(vbi, vui, ptrui, -1); // expected-error {{no matching function}}
193 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
194 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
195 vec_scatter_element(vbi, vui, ptrui, 4); // expected-error {{no matching function}}
196 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
197 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
198 vec_scatter_element(vsl, vul, ptrsl, idx); // expected-error {{no matching function}}
199 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
200 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
201 vec_scatter_element(vsl, vul, ptrsl, -1); // expected-error {{no matching function}}
202 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
203 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
204 vec_scatter_element(vsl, vul, ptrsl, 2); // expected-error {{no matching function}}
205 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
206 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
207 vec_scatter_element(vul, vul, ptrul, idx); // expected-error {{no matching function}}
208 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
209 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
210 vec_scatter_element(vul, vul, ptrul, -1); // expected-error {{no matching function}}
211 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
212 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
213 vec_scatter_element(vul, vul, ptrul, 2); // expected-error {{no matching function}}
214 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
215 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
216 vec_scatter_element(vbl, vul, ptrul, idx); // expected-error {{no matching function}}
217 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
218 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
219 vec_scatter_element(vbl, vul, ptrul, -1); // expected-error {{no matching function}}
220 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
221 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
222 vec_scatter_element(vbl, vul, ptrul, 2); // expected-error {{no matching function}}
223 // expected-note@vecintrin.h:* 5 {{candidate function not viable}}
224 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
225 vec_scatter_element(vd, vul, ptrd, idx); // expected-error {{no matching function}}
226 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
227 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
228 vec_scatter_element(vd, vul, ptrd, -1); // expected-error {{no matching function}}
229 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
230 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
231 vec_scatter_element(vd, vul, ptrd, 2); // expected-error {{no matching function}}
232 // expected-note@vecintrin.h:* 6 {{candidate function not viable}}
233 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
234
235 vsc = vec_load_bndry(cptrsc, idx); // expected-error {{no matching function}}
236 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
237 vsc = vec_load_bndry(cptrsc, 200); // expected-error {{no matching function}}
238 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
239 vsc = vec_load_bndry(cptrsc, 32); // expected-error {{no matching function}}
240 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
241 vsc = vec_load_bndry(cptrsc, 8192); // expected-error {{no matching function}}
242 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
243 vuc = vec_load_bndry(cptruc, idx); // expected-error {{no matching function}}
244 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
245 vss = vec_load_bndry(cptrss, idx); // expected-error {{no matching function}}
246 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
247 vus = vec_load_bndry(cptrus, idx); // expected-error {{no matching function}}
248 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
249 vsi = vec_load_bndry(cptrsi, idx); // expected-error {{no matching function}}
250 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
251 vui = vec_load_bndry(cptrui, idx); // expected-error {{no matching function}}
252 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
253 vsl = vec_load_bndry(cptrsl, idx); // expected-error {{no matching function}}
254 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
255 vul = vec_load_bndry(cptrul, idx); // expected-error {{no matching function}}
256 // expected-note@vecintrin.h:* 9 {{must be a constant power of 2 from 64 to 4096}}
257
258 vuc = vec_genmask(idx); // expected-error {{no matching function}}
259 // expected-note@vecintrin.h:* {{must be a constant integer}}
260
261 vuc = vec_genmasks_8(0, idx); // expected-error {{no matching function}}
262 // expected-note@vecintrin.h:* {{must be a constant integer}}
263 vuc = vec_genmasks_8(idx, 0); // expected-error {{no matching function}}
264 // expected-note@vecintrin.h:* {{must be a constant integer}}
265 vuc = vec_genmasks_8(idx, idx); // expected-error {{no matching function}}
266 // expected-note@vecintrin.h:* {{must be a constant integer}}
267 vus = vec_genmasks_16(0, idx); // expected-error {{no matching function}}
268 // expected-note@vecintrin.h:* {{must be a constant integer}}
269 vus = vec_genmasks_16(idx, 0); // expected-error {{no matching function}}
270 // expected-note@vecintrin.h:* {{must be a constant integer}}
271 vus = vec_genmasks_16(idx, idx); // expected-error {{no matching function}}
272 // expected-note@vecintrin.h:* {{must be a constant integer}}
273 vui = vec_genmasks_32(0, idx); // expected-error {{no matching function}}
274 // expected-note@vecintrin.h:* {{must be a constant integer}}
275 vui = vec_genmasks_32(idx, 0); // expected-error {{no matching function}}
276 // expected-note@vecintrin.h:* {{must be a constant integer}}
277 vui = vec_genmasks_32(idx, idx); // expected-error {{no matching function}}
278 // expected-note@vecintrin.h:* {{must be a constant integer}}
279 vul = vec_genmasks_64(0, idx); // expected-error {{no matching function}}
280 // expected-note@vecintrin.h:* {{must be a constant integer}}
281 vul = vec_genmasks_64(idx, 0); // expected-error {{no matching function}}
282 // expected-note@vecintrin.h:* {{must be a constant integer}}
283 vul = vec_genmasks_64(idx, idx); // expected-error {{no matching function}}
284 // expected-note@vecintrin.h:* {{must be a constant integer}}
285
286 vsc = vec_splat(vsc, idx); // expected-error {{no matching function}}
287 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
288 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
289 vsc = vec_splat(vsc, -1); // expected-error {{no matching function}}
290 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
291 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
292 vsc = vec_splat(vsc, 16); // expected-error {{no matching function}}
293 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
294 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
295 vuc = vec_splat(vuc, idx); // expected-error {{no matching function}}
296 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
297 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
298 vuc = vec_splat(vuc, -1); // expected-error {{no matching function}}
299 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
300 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
301 vuc = vec_splat(vuc, 16); // expected-error {{no matching function}}
302 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
303 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
304 vbc = vec_splat(vbc, idx); // expected-error {{no matching function}}
305 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
306 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
307 vbc = vec_splat(vbc, -1); // expected-error {{no matching function}}
308 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
309 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
310 vbc = vec_splat(vbc, 16); // expected-error {{no matching function}}
311 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
312 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
313 vss = vec_splat(vss, idx); // expected-error {{no matching function}}
314 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
315 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
316 vss = vec_splat(vss, -1); // expected-error {{no matching function}}
317 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
318 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
319 vss = vec_splat(vss, 8); // expected-error {{no matching function}}
320 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
321 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 7}}
322 vus = vec_splat(vus, idx); // expected-error {{no matching function}}
323 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
324 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 7}}
325 vus = vec_splat(vus, -1); // expected-error {{no matching function}}
326 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
327 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 7}}
328 vus = vec_splat(vus, 8); // expected-error {{no matching function}}
329 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
330 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 7}}
331 vbs = vec_splat(vbs, idx); // expected-error {{no matching function}}
332 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
333 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 7}}
334 vbs = vec_splat(vbs, -1); // expected-error {{no matching function}}
335 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
336 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 7}}
337 vbs = vec_splat(vbs, 8); // expected-error {{no matching function}}
338 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
339 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 7}}
340 vsi = vec_splat(vsi, idx); // expected-error {{no matching function}}
341 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
342 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
343 vsi = vec_splat(vsi, -1); // expected-error {{no matching function}}
344 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
345 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
346 vsi = vec_splat(vsi, 4); // expected-error {{no matching function}}
347 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
348 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
349 vui = vec_splat(vui, idx); // expected-error {{no matching function}}
350 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
351 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
352 vui = vec_splat(vui, -1); // expected-error {{no matching function}}
353 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
354 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
355 vui = vec_splat(vui, 4); // expected-error {{no matching function}}
356 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
357 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
358 vbi = vec_splat(vbi, idx); // expected-error {{no matching function}}
359 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
360 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
361 vbi = vec_splat(vbi, -1); // expected-error {{no matching function}}
362 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
363 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
364 vbi = vec_splat(vbi, 4); // expected-error {{no matching function}}
365 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
366 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 3}}
367 vsl = vec_splat(vsl, idx); // expected-error {{no matching function}}
368 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
369 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
370 vsl = vec_splat(vsl, -1); // expected-error {{no matching function}}
371 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
372 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
373 vsl = vec_splat(vsl, 2); // expected-error {{no matching function}}
374 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
375 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
376 vul = vec_splat(vul, idx); // expected-error {{no matching function}}
377 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
378 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
379 vul = vec_splat(vul, -1); // expected-error {{no matching function}}
380 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
381 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
382 vul = vec_splat(vul, 2); // expected-error {{no matching function}}
383 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
384 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
385 vbl = vec_splat(vbl, idx); // expected-error {{no matching function}}
386 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
387 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
388 vbl = vec_splat(vbl, -1); // expected-error {{no matching function}}
389 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
390 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
391 vbl = vec_splat(vbl, 2); // expected-error {{no matching function}}
392 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
393 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 1}}
394 vd = vec_splat(vd, idx); // expected-error {{no matching function}}
395 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
396 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
397 vd = vec_splat(vd, -1); // expected-error {{no matching function}}
398 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
399 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
400 vd = vec_splat(vd, 2); // expected-error {{no matching function}}
401 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
402 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 1}}
403
404 vsc = vec_splat_s8(idx); // expected-error {{no matching function}}
405 // expected-note@vecintrin.h:* {{must be a constant integer}}
406 vuc = vec_splat_u8(idx); // expected-error {{no matching function}}
407 // expected-note@vecintrin.h:* {{must be a constant integer}}
408 vss = vec_splat_s16(idx); // expected-error {{no matching function}}
409 // expected-note@vecintrin.h:* {{must be a constant integer}}
410 vus = vec_splat_u16(idx); // expected-error {{no matching function}}
411 // expected-note@vecintrin.h:* {{must be a constant integer}}
412 vsi = vec_splat_s32(idx); // expected-error {{no matching function}}
413 // expected-note@vecintrin.h:* {{must be a constant integer}}
414 vui = vec_splat_u32(idx); // expected-error {{no matching function}}
415 // expected-note@vecintrin.h:* {{must be a constant integer}}
416 vsl = vec_splat_s64(idx); // expected-error {{no matching function}}
417 // expected-note@vecintrin.h:* {{must be a constant integer}}
418 vul = vec_splat_u64(idx); // expected-error {{no matching function}}
419 // expected-note@vecintrin.h:* {{must be a constant integer}}
420 }
421
test_integer(void)422 void test_integer(void) {
423 vsc = vec_rl_mask(vsc, vuc, idx); // expected-error {{no matching function}}
424 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
425 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
426 vuc = vec_rl_mask(vuc, vuc, idx); // expected-error {{no matching function}}
427 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
428 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
429 vss = vec_rl_mask(vss, vus, idx); // expected-error {{no matching function}}
430 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
431 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
432 vus = vec_rl_mask(vus, vus, idx); // expected-error {{no matching function}}
433 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
434 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
435 vsi = vec_rl_mask(vsi, vui, idx); // expected-error {{no matching function}}
436 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
437 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
438 vui = vec_rl_mask(vui, vui, idx); // expected-error {{no matching function}}
439 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
440 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
441 vsl = vec_rl_mask(vsl, vul, idx); // expected-error {{no matching function}}
442 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
443 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
444 vul = vec_rl_mask(vul, vul, idx); // expected-error {{no matching function}}
445 // expected-note@vecintrin.h:* 7 {{candidate function not viable}}
446 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
447
448 vsc = vec_sld(vsc, vsc, idx); // expected-error {{no matching function}}
449 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
450 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
451 vsc = vec_sld(vsc, vsc, -1); // expected-error {{no matching function}}
452 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
453 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
454 vsc = vec_sld(vsc, vsc, 16); // expected-error {{no matching function}}
455 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
456 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
457 vuc = vec_sld(vuc, vuc, idx); // expected-error {{no matching function}}
458 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
459 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
460 vuc = vec_sld(vuc, vuc, -1); // expected-error {{no matching function}}
461 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
462 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
463 vuc = vec_sld(vuc, vuc, 16); // expected-error {{no matching function}}
464 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
465 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
466 vss = vec_sld(vss, vss, idx); // expected-error {{no matching function}}
467 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
468 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
469 vus = vec_sld(vus, vus, idx); // expected-error {{no matching function}}
470 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
471 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
472 vsi = vec_sld(vsi, vsi, idx); // expected-error {{no matching function}}
473 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
474 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
475 vui = vec_sld(vui, vui, idx); // expected-error {{no matching function}}
476 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
477 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
478 vsl = vec_sld(vsl, vsl, idx); // expected-error {{no matching function}}
479 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
480 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
481 vul = vec_sld(vul, vul, idx); // expected-error {{no matching function}}
482 // expected-note@vecintrin.h:* 11 {{candidate function not viable}}
483 // expected-note@vecintrin.h:* 2 {{must be a constant integer from 0 to 15}}
484 vd = vec_sld(vd, vd, idx); // expected-error {{no matching function}}
485 // expected-note@vecintrin.h:* 12 {{candidate function not viable}}
486 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 15}}
487
488 vsc = vec_sldw(vsc, vsc, idx); // expected-error {{no matching function}}
489 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
490 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
491 vsc = vec_sldw(vsc, vsc, -1); // expected-error {{no matching function}}
492 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
493 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
494 vsc = vec_sldw(vsc, vsc, 4); // expected-error {{no matching function}}
495 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
496 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
497 vuc = vec_sldw(vuc, vuc, idx); // expected-error {{no matching function}}
498 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
499 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
500 vuc = vec_sldw(vuc, vuc, -1); // expected-error {{no matching function}}
501 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
502 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
503 vuc = vec_sldw(vuc, vuc, 4); // expected-error {{no matching function}}
504 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
505 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
506 vss = vec_sldw(vss, vss, idx); // expected-error {{no matching function}}
507 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
508 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
509 vus = vec_sldw(vus, vus, idx); // expected-error {{no matching function}}
510 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
511 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
512 vsi = vec_sldw(vsi, vsi, idx); // expected-error {{no matching function}}
513 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
514 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
515 vui = vec_sldw(vui, vui, idx); // expected-error {{no matching function}}
516 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
517 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
518 vsl = vec_sldw(vsl, vsl, idx); // expected-error {{no matching function}}
519 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
520 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
521 vul = vec_sldw(vul, vul, idx); // expected-error {{no matching function}}
522 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
523 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
524 vd = vec_sldw(vd, vd, idx); // expected-error {{no matching function}}
525 // expected-note@vecintrin.h:* 8 {{candidate function not viable}}
526 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 3}}
527 }
528
test_float(void)529 void test_float(void) {
530 vd = vec_ctd(vsl, idx); // expected-error {{no matching function}}
531 // expected-note@vecintrin.h:* 1 {{candidate function not viable}}
532 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
533 vd = vec_ctd(vsl, -1); // expected-error {{no matching function}}
534 // expected-note@vecintrin.h:* 1 {{candidate function not viable}}
535 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
536 vd = vec_ctd(vsl, 32); // expected-error {{no matching function}}
537 // expected-note@vecintrin.h:* 1 {{candidate function not viable}}
538 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
539 vd = vec_ctd(vul, idx); // expected-error {{no matching function}}
540 // expected-note@vecintrin.h:* 1 {{candidate function not viable}}
541 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
542 vd = vec_ctd(vul, -1); // expected-error {{no matching function}}
543 // expected-note@vecintrin.h:* 1 {{candidate function not viable}}
544 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
545 vd = vec_ctd(vul, 32); // expected-error {{no matching function}}
546 // expected-note@vecintrin.h:* 1 {{candidate function not viable}}
547 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
548
549 vsl = vec_ctsl(vd, idx); // expected-error {{no matching function}}
550 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
551 vsl = vec_ctsl(vd, -1); // expected-error {{no matching function}}
552 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
553 vsl = vec_ctsl(vd, 32); // expected-error {{no matching function}}
554 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
555 vul = vec_ctul(vd, idx); // expected-error {{no matching function}}
556 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
557 vul = vec_ctul(vd, -1); // expected-error {{no matching function}}
558 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
559 vul = vec_ctul(vd, 32); // expected-error {{no matching function}}
560 // expected-note@vecintrin.h:* 1 {{must be a constant integer from 0 to 31}}
561
562 vbl = vec_fp_test_data_class(vd, idx, &cc); // expected-error {{must be a constant integer}}
563 vbl = vec_fp_test_data_class(vd, -1, &cc); // expected-error-re {{argument value {{.*}} is outside the valid range}}
564 vbl = vec_fp_test_data_class(vd, 4096, &cc); // expected-error-re {{argument value {{.*}} is outside the valid range}}
565 }
566