]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/aarch64-neon-copy.c
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / CodeGen / aarch64-neon-copy.c
1 // REQUIRES: aarch64-registered-target
2 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
3 // RUN:   -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
4
5 // Test new aarch64 intrinsics and types
6
7 #include <arm_neon.h>
8
9 uint8x8_t test_vset_lane_u8(uint8_t v1, uint8x8_t v2) {
10    // CHECK: test_vset_lane_u8
11   return vset_lane_u8(v1, v2, 6);
12   // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
13 }
14
15 uint16x4_t test_vset_lane_u16(uint16_t v1, uint16x4_t v2) {
16    // CHECK: test_vset_lane_u16
17   return vset_lane_u16(v1, v2, 2);
18   // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
19 }
20
21 uint32x2_t test_vset_lane_u32(uint32_t v1, uint32x2_t v2) {
22    // CHECK: test_vset_lane_u32
23   return vset_lane_u32(v1, v2, 1);
24   // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
25 }
26 uint64x1_t test_vset_lane_u64(uint64_t v1, uint64x1_t v2) {
27    // CHECK: test_vset_lane_u64
28   return vset_lane_u64(v1, v2, 0);
29   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
30 }
31
32 int8x8_t test_vset_lane_s8(int8_t v1, int8x8_t v2) {
33    // CHECK: test_vset_lane_s8
34   return vset_lane_s8(v1, v2, 6);
35   // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
36 }
37
38 int16x4_t test_vset_lane_s16(int16_t v1, int16x4_t v2) {
39    // CHECK: test_vset_lane_s16
40   return vset_lane_s16(v1, v2, 2);
41   // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
42 }
43
44 int32x2_t test_vset_lane_s32(int32_t v1, int32x2_t v2) {
45    // CHECK: test_vset_lane_s32
46   return vset_lane_s32(v1, v2, 1);
47   // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
48 }
49
50   int64x1_t test_vset_lane_s64(int64_t v1, int64x1_t v2) {
51    // CHECK: test_vset_lane_s64
52   return vset_lane_s64(v1, v2, 0);
53   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
54 }
55
56 uint8x16_t test_vsetq_lane_u8(uint8_t v1, uint8x16_t v2) {
57    // CHECK: test_vsetq_lane_u8
58   return vsetq_lane_u8(v1, v2, 6);
59   // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
60 }
61
62 uint16x8_t test_vsetq_lane_u16(uint16_t v1, uint16x8_t v2) {
63    // CHECK: test_vsetq_lane_u16
64   return vsetq_lane_u16(v1, v2, 2);
65   // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
66 }
67
68 uint32x4_t test_vsetq_lane_u32(uint32_t v1, uint32x4_t v2) {
69    // CHECK: test_vsetq_lane_u32
70   return vsetq_lane_u32(v1, v2, 1);
71   // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
72 }
73
74   uint64x2_t test_vsetq_lane_u64(uint64_t v1, uint64x2_t v2) {
75    // CHECK: test_vsetq_lane_u64
76   return vsetq_lane_u64(v1, v2, 1);
77   // CHECK: ins {{v[0-9]+}}.d[1], {{x[0-9]+}}
78 }
79
80 int8x16_t test_vsetq_lane_s8(int8_t v1, int8x16_t v2) {
81    // CHECK: test_vsetq_lane_s8
82   return vsetq_lane_s8(v1, v2, 6);
83   // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
84 }
85
86 int16x8_t test_vsetq_lane_s16(int16_t v1, int16x8_t v2) {
87    // CHECK: test_vsetq_lane_s16
88   return vsetq_lane_s16(v1, v2, 2);
89   // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
90 }
91
92 int32x4_t test_vsetq_lane_s32(int32_t v1, int32x4_t v2) {
93    // CHECK: test_vsetq_lane_s32
94   return vsetq_lane_s32(v1, v2, 1);
95   // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
96 }
97
98 int64x2_t test_vsetq_lane_s64(int64_t v1, int64x2_t v2) {
99    // CHECK: test_vsetq_lane_s64
100   return vsetq_lane_s64(v1, v2, 0);
101   // CHECK: ins {{v[0-9]+}}.d[0], {{x[0-9]+}}
102 }
103
104 poly8x8_t test_vset_lane_p8(poly8_t v1, poly8x8_t v2) {
105    // CHECK: test_vset_lane_p8
106   return vset_lane_p8(v1, v2, 6);
107   // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
108 }
109
110 poly16x4_t test_vset_lane_p16(poly16_t v1, poly16x4_t v2) {
111    // CHECK: test_vset_lane_p16
112   return vset_lane_p16(v1, v2, 2);
113   // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
114 }
115
116 poly8x16_t test_vsetq_lane_p8(poly8_t v1, poly8x16_t v2) {
117    // CHECK: test_vsetq_lane_p8
118   return vsetq_lane_p8(v1, v2, 6);
119   // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
120 }
121
122 poly16x8_t test_vsetq_lane_p16(poly16_t v1, poly16x8_t v2) {
123    // CHECK: test_vsetq_lane_p16
124   return vsetq_lane_p16(v1, v2, 2);
125   // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
126 }
127
128 float32x2_t test_vset_lane_f32(float32_t v1, float32x2_t v2) {
129    // CHECK: test_vset_lane_f32
130   return vset_lane_f32(v1, v2, 1);
131   // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
132 }
133
134 float32x4_t test_vsetq_lane_f32(float32_t v1, float32x4_t v2) {
135    // CHECK: test_vsetq_lane_f32
136   return vsetq_lane_f32(v1, v2, 1);
137   // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
138 }
139
140 float64x1_t test_vset_lane_f64(float64_t v1, float64x1_t v2) {
141    // CHECK: test_vset_lane_f64
142   return vset_lane_f64(v1, v2, 0);
143   // CHECK: ret
144 }
145
146 float64x2_t test_vsetq_lane_f64(float64_t v1, float64x2_t v2) {
147    // CHECK: test_vsetq_lane_f64
148   return vsetq_lane_f64(v1, v2, 0);
149   // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[0]
150 }
151
152 uint8_t test_vget_lane_u8(uint8x8_t v1) {
153   // CHECK: test_vget_lane_u8
154   return vget_lane_u8(v1, 7);
155   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
156 }
157
158 uint16_t test_vget_lane_u16(uint16x4_t v1) {
159   // CHECK: test_vget_lane_u16
160   return vget_lane_u16(v1, 3);
161   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
162 }
163
164 uint32_t test_vget_lane_u32(uint32x2_t v1) {
165   // CHECK: test_vget_lane_u32
166   return vget_lane_u32(v1, 1);
167   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[1]
168 }
169
170 uint64_t test_vget_lane_u64(uint64x1_t v1) {
171   // CHECK: test_vget_lane_u64
172   return vget_lane_u64(v1, 0);
173   // CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
174 }
175
176 uint8_t test_vgetq_lane_u8(uint8x16_t v1) {
177   // CHECK: test_vgetq_lane_u8
178   return vgetq_lane_u8(v1, 15);
179   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
180 }
181
182 uint16_t test_vgetq_lane_u16(uint16x8_t v1) {
183   // CHECK: test_vgetq_lane_u16
184   return vgetq_lane_u16(v1, 6);
185   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[6]
186 }
187
188 uint32_t test_vgetq_lane_u32(uint32x4_t v1) {
189   // CHECK: test_vgetq_lane_u32
190   return vgetq_lane_u32(v1, 2);
191   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[2]
192 }
193
194 uint64_t test_vgetq_lane_u64(uint64x2_t v1) {
195   // CHECK: test_vgetq_lane_u64
196   return vgetq_lane_u64(v1, 1);
197   // CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
198 }
199
200 poly8_t test_vget_lane_p8(poly8x8_t v1) {
201   // CHECK: test_vget_lane_p8
202   return vget_lane_p8(v1, 7);
203   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
204 }
205
206 poly16_t test_vget_lane_p16(poly16x4_t v1) {
207   // CHECK: test_vget_lane_p16
208   return vget_lane_p16(v1, 3);
209   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
210 }
211
212 poly8_t test_vgetq_lane_p8(poly8x16_t v1) {
213   // CHECK: test_vgetq_lane_p8
214   return vgetq_lane_p8(v1, 14);
215   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[14]
216 }
217
218 poly16_t test_vgetq_lane_p16(poly16x8_t v1) {
219   // CHECK: test_vgetq_lane_p16
220   return vgetq_lane_p16(v1, 6);
221   // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[6]
222 }
223
224 int32_t test_vget_lane_s8(int8x8_t v1) {
225   // CHECK: test_vget_lane_s8
226   return vget_lane_s8(v1, 7)+1;
227   // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
228 }
229
230 int32_t test_vget_lane_s16(int16x4_t v1) {
231   // CHECK: test_vget_lane_s16
232   return vget_lane_s16(v1, 3)+1;
233   // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
234 }
235
236 int64_t test_vget_lane_s32(int32x2_t v1) {
237   // CHECK: test_vget_lane_s32
238   return vget_lane_s32(v1, 1);
239   // CHECK: smov {{x[0-9]+}}, {{v[0-9]+}}.s[1]
240 }
241
242 int64_t test_vget_lane_s64(int64x1_t v1) {
243   // CHECK: test_vget_lane_s64
244   return vget_lane_s64(v1, 0);
245   // CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
246 }
247
248 int32_t test_vgetq_lane_s8(int8x16_t v1) {
249   // CHECK: test_vgetq_lane_s8
250   return vgetq_lane_s8(v1, 15)+1;
251   // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
252 }
253
254 int32_t test_vgetq_lane_s16(int16x8_t v1) {
255   // CHECK: test_vgetq_lane_s16
256   return vgetq_lane_s16(v1, 6)+1;
257   // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.h[6]
258 }
259
260 int64_t test_vgetq_lane_s32(int32x4_t v1) {
261   // CHECK: test_vgetq_lane_s32
262   return vgetq_lane_s32(v1, 2);
263   // CHECK: smov {{x[0-9]+}}, {{v[0-9]+}}.s[2]
264 }
265
266 int64_t test_vgetq_lane_s64(int64x2_t v1) {
267   // CHECK: test_vgetq_lane_s64
268   return vgetq_lane_s64(v1, 1);
269   // CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
270 }
271
272 int8x8_t test_vcopy_lane_s8(int8x8_t v1, int8x8_t v2) {
273   // CHECK: test_vcopy_lane_s8
274   return vcopy_lane_s8(v1, 5, v2, 3);
275   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
276 }
277
278 int16x4_t test_vcopy_lane_s16(int16x4_t v1, int16x4_t v2) {
279   // CHECK: test_vcopy_lane_s16
280   return vcopy_lane_s16(v1, 2, v2, 3);
281   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
282 }
283
284 poly8x8_t test_vcopy_lane_p8(poly8x8_t v1, poly8x8_t v2) {
285   // CHECK: test_vcopy_lane_p8
286   return vcopy_lane_p8(v1, 5, v2, 3);
287   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
288 }
289
290 poly16x4_t test_vcopy_lane_p16(poly16x4_t v1, poly16x4_t v2) {
291   // CHECK: test_vcopy_lane_p16
292   return vcopy_lane_p16(v1, 2, v2, 3);
293   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
294 }
295
296 int32x2_t test_vcopy_lane_s32(int32x2_t v1, int32x2_t v2) {
297   // CHECK: test_vcopy_lane_s32
298   return vcopy_lane_s32(v1, 0, v2, 1);
299   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
300 }
301
302 float32x2_t test_vcopy_lane_f32(float32x2_t v1, float32x2_t v2) {
303   // CHECK: test_vcopy_lane_f32
304   return vcopy_lane_f32(v1, 0, v2, 1);
305   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
306 }
307
308 uint8x8_t test_vcopy_lane_u8(uint8x8_t v1, uint8x8_t v2) {
309   // CHECK: test_vcopy_lane_u8
310   return vcopy_lane_u8(v1, 5, v2, 3);
311   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
312 }
313
314 uint16x4_t test_vcopy_lane_u16(uint16x4_t v1, uint16x4_t v2) {
315   // CHECK: test_vcopy_lane_u16
316   return vcopy_lane_u16(v1, 2, v2, 3);
317   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
318 }
319
320 uint32x2_t test_vcopy_lane_u32(uint32x2_t v1, uint32x2_t v2) {
321   // CHECK: test_vcopy_lane_u32
322   return vcopy_lane_u32(v1, 0, v2, 1);
323   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
324 }
325
326 int8x8_t test_vcopy_laneq_s8(int8x8_t v1, int8x16_t v2) {
327   // CHECK: test_vcopy_laneq_s8
328   return vcopy_laneq_s8(v1, 5, v2, 3);
329   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
330 }
331
332 int16x4_t test_vcopy_laneq_s16(int16x4_t v1, int16x8_t v2) {
333   // CHECK: test_vcopy_laneq_s16
334   return vcopy_laneq_s16(v1, 2, v2, 3);
335   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
336 }
337
338 poly8x8_t test_vcopy_laneq_p8(poly8x8_t v1, poly8x16_t v2) {
339   // CHECK: test_vcopy_laneq_p8
340   return vcopy_laneq_p8(v1, 5, v2, 3);
341   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
342 }
343
344 poly16x4_t test_vcopy_laneq_p16(poly16x4_t v1, poly16x8_t v2) {
345   // CHECK: test_vcopy_laneq_p16
346   return vcopy_laneq_p16(v1, 2, v2, 3);
347   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
348 }
349
350 int32x2_t test_vcopy_laneq_s32(int32x2_t v1, int32x4_t v2) {
351   // CHECK: test_vcopy_laneq_s32
352   return vcopy_laneq_s32(v1, 0, v2, 1);
353   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
354 }
355
356 float32x2_t test_vcopy_laneq_f32(float32x2_t v1, float32x4_t v2) {
357   // CHECK: test_vcopy_laneq_f32
358   return vcopy_laneq_f32(v1, 0, v2, 1);
359   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
360 }
361
362 uint8x8_t test_vcopy_laneq_u8(uint8x8_t v1, uint8x16_t v2) {
363   // CHECK: test_vcopy_laneq_u8
364   return vcopy_laneq_u8(v1, 5, v2, 3);
365   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
366 }
367
368 uint16x4_t test_vcopy_laneq_u16(uint16x4_t v1, uint16x8_t v2) {
369   // CHECK: test_vcopy_laneq_u16
370   return vcopy_laneq_u16(v1, 2, v2, 3);
371   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
372 }
373
374 uint32x2_t test_vcopy_laneq_u32(uint32x2_t v1, uint32x4_t v2) {
375   // CHECK: test_vcopy_laneq_u32
376   return vcopy_laneq_u32(v1, 0, v2, 1);
377   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
378 }
379
380 int8x16_t test_vcopyq_lane_s8(int8x16_t v1, int8x8_t v2) {
381   // CHECK: test_vcopyq_lane_s8
382   return vcopyq_lane_s8(v1, 5, v2, 3);
383   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
384 }
385
386 int16x8_t test_vcopyq_lane_s16(int16x8_t v1, int16x4_t v2) {
387   // CHECK: test_vcopyq_lane_s16
388   return vcopyq_lane_s16(v1, 2, v2, 3);
389   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
390 }
391
392 poly8x16_t test_vcopyq_lane_p8(poly8x16_t v1, poly8x8_t v2) {
393   // CHECK: test_vcopyq_lane_p8
394   return vcopyq_lane_p8(v1, 5, v2, 3);
395   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
396 }
397
398 poly16x8_t test_vcopyq_lane_p16(poly16x8_t v1, poly16x4_t v2) {
399   // CHECK: test_vcopyq_lane_p16
400   return vcopyq_lane_p16(v1, 2, v2, 3);
401   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
402 }
403
404 int32x4_t test_vcopyq_lane_s32(int32x4_t v1, int32x2_t v2) {
405   // CHECK: test_vcopyq_lane_s32
406   return vcopyq_lane_s32(v1, 0, v2, 1);
407   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
408 }
409
410 int64x2_t test_vcopyq_lane_s64(int64x2_t v1, int64x1_t v2) {
411   // CHECK: test_vcopyq_lane_s64
412   return vcopyq_lane_s64(v1, 1, v2, 0);
413   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
414 }
415
416 float32x4_t test_vcopyq_lane_f32(float32x4_t v1, float32x2_t v2) {
417   // CHECK: test_vcopyq_lane_f32
418   return vcopyq_lane_f32(v1, 0, v2, 1);
419   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
420 }
421
422 float64x2_t test_vcopyq_lane_f64(float64x2_t v1, float64x1_t v2) {
423   // CHECK: test_vcopyq_lane_f64
424   return vcopyq_lane_f64(v1, 1, v2, 0);
425   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
426 }
427
428 uint8x16_t test_vcopyq_lane_u8(uint8x16_t v1, uint8x8_t v2) {
429   // CHECK: test_vcopyq_lane_u8
430   return vcopyq_lane_u8(v1, 5, v2, 3);
431   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
432 }
433
434 uint16x8_t test_vcopyq_lane_u16(uint16x8_t v1, uint16x4_t v2) {
435   // CHECK: test_vcopyq_lane_u16
436   return vcopyq_lane_u16(v1, 2, v2, 3);
437   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
438 }
439
440 uint32x4_t test_vcopyq_lane_u32(uint32x4_t v1, uint32x2_t v2) {
441   // CHECK: test_vcopyq_lane_u32
442   return vcopyq_lane_u32(v1, 0, v2, 1);
443   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
444 }
445
446 uint64x2_t test_vcopyq_lane_u64(uint64x2_t v1, uint64x1_t v2) {
447   // CHECK: test_vcopyq_lane_u64
448   return vcopyq_lane_u64(v1, 1, v2, 0);
449   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
450 }
451
452 int8x16_t test_vcopyq_laneq_s8(int8x16_t v1, int8x16_t v2) {
453   // CHECK: test_vcopyq_laneq_s8
454   return vcopyq_laneq_s8(v1, 5, v2, 3);
455   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
456 }
457
458 int16x8_t test_vcopyq_laneq_s16(int16x8_t v1, int16x8_t v2) {
459   // CHECK: test_vcopyq_laneq_s16
460   return vcopyq_laneq_s16(v1, 2, v2, 3);
461   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
462 }
463
464 poly8x16_t test_vcopyq_laneq_p8(poly8x16_t v1, poly8x16_t v2) {
465   // CHECK: test_vcopyq_laneq_p8
466   return vcopyq_laneq_p8(v1, 5, v2, 3);
467   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
468 }
469
470 poly16x8_t test_vcopyq_laneq_p16(poly16x8_t v1, poly16x8_t v2) {
471   // CHECK: test_vcopyq_laneq_p16
472   return vcopyq_laneq_p16(v1, 2, v2, 3);
473   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
474 }
475
476 int32x4_t test_vcopyq_laneq_s32(int32x4_t v1, int32x4_t v2) {
477   // CHECK: test_vcopyq_laneq_s32
478   return vcopyq_laneq_s32(v1, 0, v2, 1);
479   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
480 }
481
482 float32x4_t test_vcopyq_laneq_f32(float32x4_t v1, float32x4_t v2) {
483   // CHECK: test_vcopyq_laneq_f32
484   return vcopyq_laneq_f32(v1, 0, v2, 1);
485   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
486 }
487
488 int64x2_t test_vcopyq_laneq_s64(int64x2_t v1, int64x2_t v2) {
489   // CHECK: test_vcopyq_laneq_s64
490   return vcopyq_laneq_s64(v1, 1, v2, 1);
491   // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[1]
492 }
493
494 uint8x16_t test_vcopyq_laneq_u8(uint8x16_t v1, uint8x16_t v2) {
495   // CHECK: test_vcopyq_laneq_u8
496   return vcopyq_laneq_u8(v1, 5, v2, 3);
497   // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
498 }
499
500 uint16x8_t test_vcopyq_laneq_u16(uint16x8_t v1, uint16x8_t v2) {
501   // CHECK: test_vcopyq_laneq_u16
502   return vcopyq_laneq_u16(v1, 2, v2, 3);
503   // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
504 }
505
506 uint32x4_t test_vcopyq_laneq_u32(uint32x4_t v1, uint32x4_t v2) {
507   // CHECK: test_vcopyq_laneq_u32
508   return vcopyq_laneq_u32(v1, 0, v2, 1);
509   // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
510 }
511
512 uint64x2_t test_vcopyq_laneq_u64(uint64x2_t v1, uint64x2_t v2) {
513   // CHECK: test_vcopyq_laneq_u64
514   return vcopyq_laneq_u64(v1, 0, v2, 1);
515   // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
516 }
517
518 int8x8_t test_vcreate_s8(uint64_t v1) {
519   // CHECK: test_vcreate_s8
520   return vcreate_s8(v1);
521   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
522 }
523
524 int16x4_t test_vcreate_s16(uint64_t v1) {
525   // CHECK: test_vcreate_s16
526   return vcreate_s16(v1);
527   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
528 }
529
530 int32x2_t test_vcreate_s32(uint64_t v1) {
531   // CHECK: test_vcreate_s32
532   return vcreate_s32(v1);
533   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
534 }
535
536 int64x1_t test_vcreate_s64(uint64_t v1) {
537   // CHECK: test_vcreate_s64
538   return vcreate_s64(v1);
539   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
540 }
541
542 uint8x8_t test_vcreate_u8(uint64_t v1) {
543   // CHECK: test_vcreate_u8
544   return vcreate_u8(v1);
545   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
546 }
547
548 uint16x4_t test_vcreate_u16(uint64_t v1) {
549   // CHECK: test_vcreate_u16
550   return vcreate_u16(v1);
551   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
552 }
553
554 uint32x2_t test_vcreate_u32(uint64_t v1) {
555   // CHECK: test_vcreate_u32
556   return vcreate_u32(v1);
557   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
558 }
559
560 uint64x1_t test_vcreate_u64(uint64_t v1) {
561   // CHECK: test_vcreate_u64
562   return vcreate_u64(v1);
563   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
564 }
565
566 poly8x8_t test_vcreate_p8(uint64_t v1) {
567   // CHECK: test_vcreate_p8
568   return vcreate_p8(v1);
569   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
570 }
571
572 poly16x4_t test_vcreate_p16(uint64_t v1) {
573   // CHECK: test_vcreate_p16
574   return vcreate_p16(v1);
575   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
576 }
577
578 float16x4_t test_vcreate_f16(uint64_t v1) {
579   // CHECK: test_vcreate_f16
580   return vcreate_f16(v1);
581   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
582 }
583
584 float32x2_t test_vcreate_f32(uint64_t v1) {
585   // CHECK: test_vcreate_f32
586   return vcreate_f32(v1);
587   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
588 }
589
590 float64x1_t test_vcreate_f64(uint64_t v1) {
591   // CHECK: test_vcreate_f64
592   return vcreate_f64(v1);
593   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
594 }
595
596 uint8x8_t test_vdup_n_u8(uint8_t v1) {
597   // CHECK: test_vdup_n_u8
598   return vdup_n_u8(v1);
599   // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
600 }
601
602 uint16x4_t test_vdup_n_u16(uint16_t v1) {
603   // CHECK: test_vdup_n_u16
604   return vdup_n_u16(v1);
605   // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
606 }
607
608 uint32x2_t test_vdup_n_u32(uint32_t v1) {
609   // CHECK: test_vdup_n_u32
610   return vdup_n_u32(v1);
611   // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
612 }
613
614 uint64x1_t test_vdup_n_u64(uint64_t v1) {
615   // CHECK: test_vdup_n_u64
616   return vdup_n_u64(v1);
617   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
618 }
619
620 uint8x16_t test_vdupq_n_u8(uint8_t v1) {
621   // CHECK: test_vdupq_n_u8
622   return vdupq_n_u8(v1);
623   // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
624 }
625
626 uint16x8_t test_vdupq_n_u16(uint16_t v1) {
627   // CHECK: test_vdupq_n_u16
628   return vdupq_n_u16(v1);
629   // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
630 }
631
632 uint32x4_t test_vdupq_n_u32(uint32_t v1) {
633   // CHECK: test_vdupq_n_u32
634   return vdupq_n_u32(v1);
635   // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
636 }
637
638 uint64x2_t test_vdupq_n_u64(uint64_t v1) {
639   // CHECK: test_vdupq_n_u64
640   return vdupq_n_u64(v1);
641   // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
642 }
643
644 int8x8_t test_vdup_n_s8(int8_t v1) {
645   // CHECK: test_vdup_n_s8
646   return vdup_n_s8(v1);
647   // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
648 }
649
650 int16x4_t test_vdup_n_s16(int16_t v1) {
651   // CHECK: test_vdup_n_s16
652   return vdup_n_s16(v1);
653   // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
654 }
655
656 int32x2_t test_vdup_n_s32(int32_t v1) {
657   // CHECK: test_vdup_n_s32
658   return vdup_n_s32(v1);
659   // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
660 }
661
662 int64x1_t test_vdup_n_s64(int64_t v1) {
663   // CHECK: test_vdup_n_s64
664   return vdup_n_s64(v1);
665   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
666 }
667
668 int8x16_t test_vdupq_n_s8(int8_t v1) {
669   // CHECK: test_vdupq_n_s8
670   return vdupq_n_s8(v1);
671   // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
672 }
673
674 int16x8_t test_vdupq_n_s16(int16_t v1) {
675   // CHECK: test_vdupq_n_s16
676   return vdupq_n_s16(v1);
677   // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
678 }
679
680 int32x4_t test_vdupq_n_s32(int32_t v1) {
681   // CHECK: test_vdupq_n_s32
682   return vdupq_n_s32(v1);
683   // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
684 }
685
686 int64x2_t test_vdupq_n_s64(int64_t v1) {
687   // CHECK: test_vdupq_n_s64
688   return vdupq_n_s64(v1);
689   // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
690 }
691
692 poly8x8_t test_vdup_n_p8(poly8_t v1) {
693   // CHECK: test_vdup_n_p8
694   return vdup_n_p8(v1);
695   // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
696 }
697
698 poly16x4_t test_vdup_n_p16(poly16_t v1) {
699   // CHECK: test_vdup_n_p16
700   return vdup_n_p16(v1);
701   // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
702 }
703
704 poly8x16_t test_vdupq_n_p8(poly8_t v1) {
705   // CHECK: test_vdupq_n_p8
706   return vdupq_n_p8(v1);
707   // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
708 }
709
710 poly16x8_t test_vdupq_n_p16(poly16_t v1) {
711   // CHECK: test_vdupq_n_p16
712   return vdupq_n_p16(v1);
713   // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
714 }
715
716 float32x2_t test_vdup_n_f32(float32_t v1) {
717   // CHECK: test_vdup_n_f32
718   return vdup_n_f32(v1);
719   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
720 }
721
722 float64x1_t test_vdup_n_f64(float64_t v1) {
723   // CHECK: test_vdup_n_f64
724   return vdup_n_f64(v1);
725   // CHECK: ret
726 }
727
728 float32x4_t test_vdupq_n_f32(float32_t v1) {
729   // CHECK: test_vdupq_n_f32
730   return vdupq_n_f32(v1);
731   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
732 }
733
734 float64x2_t test_vdupq_n_f64(float64_t v1) {
735   // CHECK: test_vdupq_n_f64
736   return vdupq_n_f64(v1);
737   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
738 }
739
740 int8x8_t test_vdup_lane_s8(int8x8_t v1) {
741   // CHECK: test_vdup_lane_s8
742   return vdup_lane_s8(v1, 5);
743   // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
744 }
745
746 int16x4_t test_vdup_lane_s16(int16x4_t v1) {
747   // CHECK: test_vdup_lane_s16
748   return vdup_lane_s16(v1, 2);
749   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
750 }
751
752 int32x2_t test_vdup_lane_s32(int32x2_t v1) {
753   // CHECK: test_vdup_lane_s32
754   return vdup_lane_s32(v1, 1);
755   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
756 }
757
758 int64x1_t test_vdup_lane_s64(int64x1_t v1) {
759   // CHECK: test_vdup_lane_s64
760   return vdup_lane_s64(v1, 0);
761   // CHECK: ret
762 }
763
764 int8x16_t test_vdupq_lane_s8(int8x8_t v1) {
765   // CHECK: test_vdupq_lane_s8
766   return vdupq_lane_s8(v1, 5);
767   // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
768 }
769
770 int16x8_t test_vdupq_lane_s16(int16x4_t v1) {
771   // CHECK: test_vdupq_lane_s16
772   return vdupq_lane_s16(v1, 2);
773   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
774 }
775
776 int32x4_t test_vdupq_lane_s32(int32x2_t v1) {
777   // CHECK: test_vdupq_lane_s32
778   return vdupq_lane_s32(v1, 1);
779   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
780 }
781
782 int64x2_t test_vdupq_lane_s64(int64x1_t v1) {
783   // CHECK: test_vdupq_lane_s64
784   return vdupq_lane_s64(v1, 0);
785   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
786 }
787
788 uint8x8_t test_vdup_lane_u8(uint8x8_t v1) {
789   // CHECK: test_vdup_lane_u8
790   return vdup_lane_u8(v1, 5);
791   // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
792 }
793
794 uint16x4_t test_vdup_lane_u16(uint16x4_t v1) {
795   // CHECK: test_vdup_lane_u16
796   return vdup_lane_u16(v1, 2);
797   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
798 }
799
800 uint32x2_t test_vdup_lane_u32(uint32x2_t v1) {
801   // CHECK: test_vdup_lane_u32
802   return vdup_lane_u32(v1, 1);
803   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
804 }
805
806 uint64x1_t test_vdup_lane_u64(uint64x1_t v1) {
807   // CHECK: test_vdup_lane_u64
808   return vdup_lane_u64(v1, 0);
809   // CHECK: ret
810 }
811
812 uint8x16_t test_vdupq_lane_u8(uint8x8_t v1) {
813   // CHECK: test_vdupq_lane_u8
814   return vdupq_lane_u8(v1, 5);
815   // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
816 }
817
818 uint16x8_t test_vdupq_lane_u16(uint16x4_t v1) {
819   // CHECK: test_vdupq_lane_u16
820   return vdupq_lane_u16(v1, 2);
821   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
822 }
823
824 uint32x4_t test_vdupq_lane_u32(uint32x2_t v1) {
825   // CHECK: test_vdupq_lane_u32
826   return vdupq_lane_u32(v1, 1);
827   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
828 }
829
830 uint64x2_t test_vdupq_lane_u64(uint64x1_t v1) {
831   // CHECK: test_vdupq_lane_u64
832   return vdupq_lane_u64(v1, 0);
833   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
834 }
835
836 int8x8_t test_vdup_laneq_s8(int8x16_t v1) {
837   // CHECK: test_vdup_laneq_s8
838   return vdup_laneq_s8(v1, 5);
839   // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
840 }
841
842 int16x4_t test_vdup_laneq_s16(int16x8_t v1) {
843   // CHECK: test_vdup_laneq_s16
844   return vdup_laneq_s16(v1, 2);
845   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
846 }
847
848 int32x2_t test_vdup_laneq_s32(int32x4_t v1) {
849   // CHECK: test_vdup_laneq_s32
850   return vdup_laneq_s32(v1, 1);
851   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
852 }
853
854 int64x1_t test_vdup_laneq_s64(int64x2_t v1) {
855   // CHECK: test_vdup_laneq_s64
856   return vdup_laneq_s64(v1, 0);
857   // CHECK: ret
858 }
859
860 int8x16_t test_vdupq_laneq_s8(int8x16_t v1) {
861   // CHECK: test_vdupq_laneq_s8
862   return vdupq_laneq_s8(v1, 5);
863   // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
864 }
865
866 int16x8_t test_vdupq_laneq_s16(int16x8_t v1) {
867   // CHECK: test_vdupq_laneq_s16
868   return vdupq_laneq_s16(v1, 2);
869   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
870 }
871
872 int32x4_t test_vdupq_laneq_s32(int32x4_t v1) {
873   // CHECK: test_vdupq_laneq_s32
874   return vdupq_laneq_s32(v1, 1);
875   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
876 }
877
878 int64x2_t test_vdupq_laneq_s64(int64x2_t v1) {
879   // CHECK: test_vdupq_laneq_s64
880   return vdupq_laneq_s64(v1, 0);
881   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
882 }
883
884 uint8x8_t test_vdup_laneq_u8(uint8x16_t v1) {
885   // CHECK: test_vdup_laneq_u8
886   return vdup_laneq_u8(v1, 5);
887   // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
888 }
889
890 uint16x4_t test_vdup_laneq_u16(uint16x8_t v1) {
891   // CHECK: test_vdup_laneq_u16
892   return vdup_laneq_u16(v1, 2);
893   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
894 }
895
896 uint32x2_t test_vdup_laneq_u32(uint32x4_t v1) {
897   // CHECK: test_vdup_laneq_u32
898   return vdup_laneq_u32(v1, 1);
899   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
900 }
901
902 uint64x1_t test_vdup_laneq_u64(uint64x2_t v1) {
903   // CHECK: test_vdup_laneq_u64
904   return vdup_laneq_u64(v1, 0);
905   // CHECK: ret
906 }
907
908 uint8x16_t test_vdupq_laneq_u8(uint8x16_t v1) {
909   // CHECK: test_vdupq_laneq_u8
910   return vdupq_laneq_u8(v1, 5);
911   // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
912 }
913
914 uint16x8_t test_vdupq_laneq_u16(uint16x8_t v1) {
915   // CHECK: test_vdupq_laneq_u16
916   return vdupq_laneq_u16(v1, 2);
917   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
918 }
919
920 uint32x4_t test_vdupq_laneq_u32(uint32x4_t v1) {
921   // CHECK: test_vdupq_laneq_u32
922   return vdupq_laneq_u32(v1, 1);
923   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
924 }
925
926 uint64x2_t test_vdupq_laneq_u64(uint64x2_t v1) {
927   // CHECK: test_vdupq_laneq_u64
928   return vdupq_laneq_u64(v1, 0);
929   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
930 }
931
932 poly8x8_t test_vdup_lane_p8(poly8x8_t v1) {
933   // CHECK: test_vdup_lane_p8
934   return vdup_lane_p8(v1, 5);
935   // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
936 }
937
938 poly16x4_t test_vdup_lane_p16(poly16x4_t v1) {
939   // CHECK: test_vdup_lane_p16
940   return vdup_lane_p16(v1, 2);
941   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
942 }
943
944 poly8x16_t test_vdupq_lane_p8(poly8x8_t v1) {
945   // CHECK: test_vdupq_lane_p8
946   return vdupq_lane_p8(v1, 5);
947   // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
948 }
949
950 poly16x8_t test_vdupq_lane_p16(poly16x4_t v1) {
951   // CHECK: test_vdupq_lane_p16
952   return vdupq_lane_p16(v1, 2);
953   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
954 }
955
956 poly8x8_t test_vdup_laneq_p8(poly8x16_t v1) {
957   // CHECK: test_vdup_laneq_p8
958   return vdup_laneq_p8(v1, 5);
959   // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
960 }
961
962 poly16x4_t test_vdup_laneq_p16(poly16x8_t v1) {
963   // CHECK: test_vdup_laneq_p16
964   return vdup_laneq_p16(v1, 2);
965   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
966 }
967
968 poly8x16_t test_vdupq_laneq_p8(poly8x16_t v1) {
969   // CHECK: test_vdupq_laneq_p8
970   return vdupq_laneq_p8(v1, 5);
971   // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
972 }
973
974 poly16x8_t test_vdupq_laneq_p16(poly16x8_t v1) {
975   // CHECK: test_vdupq_laneq_p16
976   return vdupq_laneq_p16(v1, 2);
977   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
978 }
979
980 float16x4_t test_vdup_lane_f16(float16x4_t v1) {
981   // CHECK: test_vdup_lane_f16
982   return vdup_lane_f16(v1, 2);
983   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
984 }
985
986 float32x2_t test_vdup_lane_f32(float32x2_t v1) {
987   // CHECK: test_vdup_lane_f32
988   return vdup_lane_f32(v1, 1);
989   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
990 }
991
992 float64x1_t test_vdup_lane_f64(float64x1_t v1) {
993   // CHECK: test_vdup_lane_f64
994   return vdup_lane_f64(v1, 0);
995   // CHECK: ret
996 }
997
998 float16x4_t test_vdup_laneq_f16(float16x8_t v1) {
999   // CHECK: test_vdup_laneq_f16
1000   return vdup_laneq_f16(v1, 2);
1001   // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
1002 }
1003
1004 float32x2_t test_vdup_laneq_f32(float32x4_t v1) {
1005   // CHECK: test_vdup_laneq_f32
1006   return vdup_laneq_f32(v1, 1);
1007   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
1008 }
1009
1010 float64x1_t test_vdup_laneq_f64(float64x2_t v1) {
1011   // CHECK: test_vdup_laneq_f64
1012   return vdup_laneq_f64(v1, 0);
1013   // CHECK: ret
1014 }
1015
1016 float16x8_t test_vdupq_lane_f16(float16x4_t v1) {
1017   // CHECK: test_vdupq_lane_f16
1018   return vdupq_lane_f16(v1, 2);
1019   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
1020 }
1021
1022 float32x4_t test_vdupq_lane_f32(float32x2_t v1) {
1023   // CHECK: test_vdupq_lane_f32
1024   return vdupq_lane_f32(v1, 1);
1025   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
1026 }
1027
1028 float64x2_t test_vdupq_lane_f64(float64x1_t v1) {
1029   // CHECK: test_vdupq_lane_f64
1030   return vdupq_lane_f64(v1, 0);
1031   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
1032 }
1033
1034 float16x8_t test_vdupq_laneq_f16(float16x8_t v1) {
1035   // CHECK: test_vdupq_laneq_f16
1036   return vdupq_laneq_f16(v1, 2);
1037   // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
1038 }
1039
1040 float32x4_t test_vdupq_laneq_f32(float32x4_t v1) {
1041   // CHECK: test_vdupq_laneq_f32
1042   return vdupq_laneq_f32(v1, 1);
1043   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
1044 }
1045
1046 float64x2_t test_vdupq_laneq_f64(float64x2_t v1) {
1047   // CHECK: test_vdupq_laneq_f64
1048   return vdupq_laneq_f64(v1, 0);
1049   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
1050 }
1051
1052 int8x8_t test_vmov_n_s8(int8_t v1) {
1053   // CHECK: test_vmov_n_s8
1054   return vmov_n_s8(v1);
1055   // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
1056 }
1057
1058 int16x4_t test_vmov_n_s16(int16_t v1) {
1059   // CHECK: test_vmov_n_s16
1060   return vmov_n_s16(v1);
1061   // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
1062 }
1063
1064 int32x2_t test_vmov_n_s32(int32_t v1) {
1065   // CHECK: test_vmov_n_s32
1066   return vmov_n_s32(v1);
1067   // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
1068 }
1069
1070 int64x1_t test_vmov_n_s64(int64_t v1) {
1071   // CHECK: test_vmov_n_s64
1072   return vmov_n_s64(v1);
1073   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
1074 }
1075
1076 int8x16_t test_vmovq_n_s8(int8_t v1) {
1077   // CHECK: test_vmovq_n_s8
1078   return vmovq_n_s8(v1);
1079   // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
1080 }
1081
1082 int16x8_t test_vmovq_n_s16(int16_t v1) {
1083   // CHECK: test_vmovq_n_s16
1084   return vmovq_n_s16(v1);
1085   // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
1086 }
1087
1088 int32x4_t test_vmovq_n_s32(int32_t v1) {
1089   // CHECK: test_vmovq_n_s32
1090   return vmovq_n_s32(v1);
1091   // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
1092 }
1093
1094 int64x2_t test_vmovq_n_s64(int64_t v1) {
1095   // CHECK: test_vmovq_n_s64
1096   return vmovq_n_s64(v1);
1097   // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
1098 }
1099
1100 uint8x8_t test_vmov_n_u8(uint8_t v1) {
1101   // CHECK: test_vmov_n_u8
1102   return vmov_n_u8(v1);
1103   // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
1104 }
1105
1106 uint16x4_t test_vmov_n_u16(uint16_t v1) {
1107   // CHECK: test_vmov_n_u16
1108   return vmov_n_u16(v1);
1109   // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
1110 }
1111
1112 uint32x2_t test_vmov_n_u32(uint32_t v1) {
1113   // CHECK: test_vmov_n_u32
1114   return vmov_n_u32(v1);
1115   // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
1116 }
1117
1118 uint64x1_t test_vmov_n_u64(uint64_t v1) {
1119   // CHECK: test_vmov_n_u64
1120   return vmov_n_u64(v1);
1121   // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
1122 }
1123
1124 uint8x16_t test_vmovq_n_u8(uint8_t v1) {
1125   // CHECK: test_vmovq_n_u8
1126   return vmovq_n_u8(v1);
1127   // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
1128 }
1129
1130 uint16x8_t test_vmovq_n_u16(uint16_t v1) {
1131   // CHECK: test_vmovq_n_u16
1132   return vmovq_n_u16(v1);
1133   // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
1134 }
1135
1136 uint32x4_t test_vmovq_n_u32(uint32_t v1) {
1137   // CHECK: test_vmovq_n_u32
1138   return vmovq_n_u32(v1);
1139   // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
1140 }
1141
1142 uint64x2_t test_vmovq_n_u64(uint64_t v1) {
1143   // CHECK: test_vmovq_n_u64
1144   return vmovq_n_u64(v1);
1145   // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
1146 }
1147
1148 poly8x8_t test_vmov_n_p8(poly8_t v1) {
1149   // CHECK: test_vmov_n_p8
1150   return vmov_n_p8(v1);
1151   // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
1152 }
1153
1154 poly16x4_t test_vmov_n_p16(poly16_t v1) {
1155   // CHECK: test_vmov_n_p16
1156   return vmov_n_p16(v1);
1157   // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
1158 }
1159
1160 poly8x16_t test_vmovq_n_p8(poly8_t v1) {
1161   // CHECK: test_vmovq_n_p8
1162   return vmovq_n_p8(v1);
1163   // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
1164 }
1165
1166 poly16x8_t test_vmovq_n_p16(poly16_t v1) {
1167   // CHECK: test_vmovq_n_p16
1168   return vmovq_n_p16(v1);
1169   // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
1170 }
1171
1172 float32x2_t test_vmov_n_f32(float32_t v1) {
1173   // CHECK: test_vmov_n_f32
1174   return vmov_n_f32(v1);
1175   // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
1176 }
1177
1178 float64x1_t test_vmov_n_f64(float64_t v1) {
1179   // CHECK: test_vmov_n_f64
1180   return vmov_n_f64(v1);
1181   // CHECK: ret
1182 }
1183
1184 float32x4_t test_vmovq_n_f32(float32_t v1) {
1185   // CHECK: test_vmovq_n_f32
1186   return vmovq_n_f32(v1);
1187   // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
1188 }
1189
1190 float64x2_t test_vmovq_n_f64(float64_t v1) {
1191   // CHECK: test_vmovq_n_f64
1192   return vmovq_n_f64(v1);
1193   // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
1194 }
1195
1196 // CHECK: test_vcopy_lane_s64
1197 int64x1_t test_vcopy_lane_s64(int64x1_t a, int64x1_t c) {
1198   return vcopy_lane_s64(a, 0, c, 0);
1199 // CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
1200 // CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
1201 }
1202
1203 // CHECK: test_vcopy_lane_u64
1204 uint64x1_t test_vcopy_lane_u64(uint64x1_t a, uint64x1_t c) {
1205   return vcopy_lane_u64(a, 0, c, 0);
1206 // CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
1207 // CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
1208 }
1209
1210 // CHECK: test_vcopy_lane_f64
1211 float64x1_t test_vcopy_lane_f64(float64x1_t a, float64x1_t c) {
1212   return vcopy_lane_f64(a, 0, c, 0);
1213 // CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
1214 // CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
1215 }
1216
1217 // CHECK: test_vcopy_laneq_s64
1218 int64x1_t test_vcopy_laneq_s64(int64x1_t a, int64x2_t c) {
1219   return vcopy_laneq_s64(a, 0, c, 1);
1220 // CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
1221 }
1222
1223 // CHECK: test_vcopy_laneq_u64
1224 uint64x1_t test_vcopy_laneq_u64(uint64x1_t a, uint64x2_t c) {
1225   return vcopy_laneq_u64(a, 0, c, 1);
1226 // CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
1227 }
1228
1229 // CHECK: test_vcopy_laneq_f64
1230 float64x1_t test_vcopy_laneq_f64(float64x1_t a, float64x2_t c) {
1231   return vcopy_laneq_f64(a, 0, c, 1);
1232 // CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
1233 }
1234
1235 // CHECK: test_vcopy_laneq_p64
1236 poly64x1_t test_vcopy_laneq_p64(poly64x1_t a, poly64x2_t c) {
1237   return vcopy_laneq_p64(a, 0, c, 1);
1238 // CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
1239 }
1240
1241 // CHECK: test_vcopyq_laneq_f64
1242 float64x2_t test_vcopyq_laneq_f64(float64x2_t a, float64x2_t c) {
1243 // CHECK: ins  {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[1]
1244   return vcopyq_laneq_f64(a, 1, c, 1);
1245 }
1246
1247 // CHECK: test_vget_lane_f16
1248 int test_vget_lane_f16(float16x4_t v1) {
1249   float16_t a = vget_lane_f16(v1, 3);
1250   return (int)a;
1251 // CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
1252 }
1253
1254 // CHECK: test_vgetq_lane_f16
1255 int test_vgetq_lane_f16(float16x8_t v1) {
1256   float16_t a = vgetq_lane_f16(v1, 7);
1257   return (int)a;
1258 // CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
1259 }
1260
1261 // CHECK: test_vget_lane_f16_2
1262 float test_vget_lane_f16_2(float16x4_t v1) {
1263   float16_t a = vget_lane_f16(v1, 3);
1264   return (float)a;
1265 // CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
1266 }
1267
1268 // CHECK: test_vgetq_lane_f16_2
1269 float test_vgetq_lane_f16_2(float16x8_t v1) {
1270   float16_t a = vgetq_lane_f16(v1, 7);
1271   return (float)a;
1272 // CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
1273 }
1274
1275 // CHECK: test_vset_lane_f16
1276 float16x4_t test_vset_lane_f16(float16x4_t v1) {
1277   float16_t a;
1278   return vset_lane_f16(a, v1, 3);
1279 // CHECK: fmov  {{s[0-9]+}}, wzr
1280 // CHECK-NEXT: ins {{v[0-9]+}}.h[3],  {{v[0-9]+}}.h[0]
1281 }
1282
1283 // CHECK: test_vsetq_lane_f16
1284 float16x8_t test_vsetq_lane_f16(float16x8_t v1) {
1285   float16_t a;
1286   return vsetq_lane_f16(a, v1, 7);
1287 // CHECK: fmov  {{s[0-9]+}}, wzr
1288 // CHECK-NEXT: ins {{v[0-9]+}}.h[7],  {{v[0-9]+}}.h[0]
1289 }
1290
1291 // CHECK: test_vset_lane_f16_2
1292 float16x4_t test_vset_lane_f16_2(float16x4_t v1) {
1293   float16_t a = vget_lane_f16(v1, 0);
1294   return vset_lane_f16(a, v1, 3);
1295 // CHECK: ins {{v[0-9]+}}.h[3],  {{v[0-9]+}}.h[0]
1296 }
1297
1298 // CHECK: test_vsetq_lane_f16_2
1299 float16x8_t test_vsetq_lane_f16_2(float16x8_t v1) {
1300   float16_t a = vgetq_lane_f16(v1, 0);
1301   return vsetq_lane_f16(a, v1, 7);
1302 // CHECK: ins {{v[0-9]+}}.h[7],  {{v[0-9]+}}.h[0]
1303 }
1304
1305
1306 // CHECK: test_vsetq_lane_f16_3
1307 float16x8_t test_vsetq_lane_f16_3(float16x8_t v1, float b, float c) {
1308   float16_t a = (float16_t)b;
1309   return vsetq_lane_f16(a, v1, 7);
1310 // CHECK: ins {{v[0-9]+}}.h[7],  {{w[0-9]+}}
1311 }
1312
1313 // CHECK: test_vsetq_lane_f16_4
1314 float16x8_t test_vsetq_lane_f16_4(float16x8_t v1, float b, float c) {
1315   float16_t a = (float16_t)b + 1.0;
1316   return vsetq_lane_f16(a, v1, 7);
1317 // CHECK: ins {{v[0-9]+}}.h[7],  {{w[0-9]+}}
1318 }
1319