1 // RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -Os -S -o - %s | FileCheck %s
2 // REQUIRES: aarch64-registered-target
3 
4 #include <arm_neon.h>
5 
test_vaddw_high_s8(int16x8_t lhs,int8x16_t rhs)6 int16x8_t test_vaddw_high_s8(int16x8_t lhs, int8x16_t rhs) {
7   // CHECK: saddw2.8h
8   return vaddw_high_s8(lhs, rhs);
9 }
10 
test_vaddw_high_s16(int32x4_t lhs,int16x8_t rhs)11 int32x4_t test_vaddw_high_s16(int32x4_t lhs, int16x8_t rhs) {
12   // CHECK: saddw2.4s
13   return vaddw_high_s16(lhs, rhs);
14 }
15 
test_vaddw_high_s32(int64x2_t lhs,int32x4_t rhs)16 int64x2_t test_vaddw_high_s32(int64x2_t lhs, int32x4_t rhs) {
17   // CHECK: saddw2.2d
18   return vaddw_high_s32(lhs, rhs);
19 }
20 
test_vaddw_high_u8(uint16x8_t lhs,uint8x16_t rhs)21 uint16x8_t test_vaddw_high_u8(uint16x8_t lhs, uint8x16_t rhs) {
22   // CHECK: uaddw2.8h
23   return vaddw_high_u8(lhs, rhs);
24 }
25 
test_vaddw_high_u16(uint32x4_t lhs,uint16x8_t rhs)26 uint32x4_t test_vaddw_high_u16(uint32x4_t lhs, uint16x8_t rhs) {
27   // CHECK: uaddw2.4s
28   return vaddw_high_u16(lhs, rhs);
29 }
30 
test_vaddw_high_u32(uint64x2_t lhs,uint32x4_t rhs)31 uint64x2_t test_vaddw_high_u32(uint64x2_t lhs, uint32x4_t rhs) {
32   // CHECK: uaddw2.2d
33   return vaddw_high_u32(lhs, rhs);
34 }
35 
test_vsubw_high_s8(int16x8_t lhs,int8x16_t rhs)36 int16x8_t test_vsubw_high_s8(int16x8_t lhs, int8x16_t rhs) {
37   // CHECK: ssubw2.8h
38   return vsubw_high_s8(lhs, rhs);
39 }
40 
test_vsubw_high_s16(int32x4_t lhs,int16x8_t rhs)41 int32x4_t test_vsubw_high_s16(int32x4_t lhs, int16x8_t rhs) {
42   // CHECK: ssubw2.4s
43   return vsubw_high_s16(lhs, rhs);
44 }
45 
test_vsubw_high_s32(int64x2_t lhs,int32x4_t rhs)46 int64x2_t test_vsubw_high_s32(int64x2_t lhs, int32x4_t rhs) {
47   // CHECK: ssubw2.2d
48   return vsubw_high_s32(lhs, rhs);
49 }
50 
test_vsubw_high_u8(uint16x8_t lhs,uint8x16_t rhs)51 uint16x8_t test_vsubw_high_u8(uint16x8_t lhs, uint8x16_t rhs) {
52   // CHECK: usubw2.8h
53   return vsubw_high_u8(lhs, rhs);
54 }
55 
test_vsubw_high_u16(uint32x4_t lhs,uint16x8_t rhs)56 uint32x4_t test_vsubw_high_u16(uint32x4_t lhs, uint16x8_t rhs) {
57   // CHECK: usubw2.4s
58   return vsubw_high_u16(lhs, rhs);
59 }
60 
test_vsubw_high_u32(uint64x2_t lhs,uint32x4_t rhs)61 uint64x2_t test_vsubw_high_u32(uint64x2_t lhs, uint32x4_t rhs) {
62   // CHECK: usubw2.2d
63   return vsubw_high_u32(lhs, rhs);
64 }
65 
test_vabdl_high_s8(int8x16_t lhs,int8x16_t rhs)66 int16x8_t test_vabdl_high_s8(int8x16_t lhs, int8x16_t rhs) {
67   // CHECK: sabdl2.8h
68   return vabdl_high_s8(lhs, rhs);
69 }
70 
test_vabdl_high_s16(int16x8_t lhs,int16x8_t rhs)71 int32x4_t test_vabdl_high_s16(int16x8_t lhs, int16x8_t rhs) {
72   // CHECK: sabdl2.4s
73   return vabdl_high_s16(lhs, rhs);
74 }
75 
test_vabdl_high_s32(int32x4_t lhs,int32x4_t rhs)76 int64x2_t test_vabdl_high_s32(int32x4_t lhs, int32x4_t rhs) {
77   // CHECK: sabdl2.2d
78   return vabdl_high_s32(lhs, rhs);
79 }
80 
test_vabdl_high_u8(uint8x16_t lhs,uint8x16_t rhs)81 uint16x8_t test_vabdl_high_u8(uint8x16_t lhs, uint8x16_t rhs) {
82   // CHECK: uabdl2.8h
83   return vabdl_high_u8(lhs, rhs);
84 }
85 
test_vabdl_high_u16(uint16x8_t lhs,uint16x8_t rhs)86 uint32x4_t test_vabdl_high_u16(uint16x8_t lhs, uint16x8_t rhs) {
87   // CHECK: uabdl2.4s
88   return vabdl_high_u16(lhs, rhs);
89 }
90 
test_vabdl_high_u32(uint32x4_t lhs,uint32x4_t rhs)91 uint64x2_t test_vabdl_high_u32(uint32x4_t lhs, uint32x4_t rhs) {
92   // CHECK: uabdl2.2d
93   return vabdl_high_u32(lhs, rhs);
94 }
95 
test_vabal_high_s8(int16x8_t accum,int8x16_t lhs,int8x16_t rhs)96 int16x8_t test_vabal_high_s8(int16x8_t accum, int8x16_t lhs, int8x16_t rhs) {
97   // CHECK: sabal2.8h
98   return vabal_high_s8(accum, lhs, rhs);
99 }
100 
test_vabal_high_s16(int32x4_t accum,int16x8_t lhs,int16x8_t rhs)101 int32x4_t test_vabal_high_s16(int32x4_t accum, int16x8_t lhs, int16x8_t rhs) {
102   // CHECK: sabal2.4s
103   return vabal_high_s16(accum, lhs, rhs);
104 }
105 
test_vabal_high_s32(int64x2_t accum,int32x4_t lhs,int32x4_t rhs)106 int64x2_t test_vabal_high_s32(int64x2_t accum, int32x4_t lhs, int32x4_t rhs) {
107   // CHECK: sabal2.2d
108   return vabal_high_s32(accum, lhs, rhs);
109 }
110 
test_vabal_high_u8(uint16x8_t accum,uint8x16_t lhs,uint8x16_t rhs)111 uint16x8_t test_vabal_high_u8(uint16x8_t accum, uint8x16_t lhs, uint8x16_t rhs) {
112   // CHECK: uabal2.8h
113   return vabal_high_u8(accum, lhs, rhs);
114 }
115 
test_vabal_high_u16(uint32x4_t accum,uint16x8_t lhs,uint16x8_t rhs)116 uint32x4_t test_vabal_high_u16(uint32x4_t accum, uint16x8_t lhs, uint16x8_t rhs) {
117   // CHECK: uabal2.4s
118   return vabal_high_u16(accum, lhs, rhs);
119 }
120 
test_vabal_high_u32(uint64x2_t accum,uint32x4_t lhs,uint32x4_t rhs)121 uint64x2_t test_vabal_high_u32(uint64x2_t accum, uint32x4_t lhs, uint32x4_t rhs) {
122   // CHECK: uabal2.2d
123   return vabal_high_u32(accum, lhs, rhs);
124 }
125 
test_vqdmlal_high_s16(int32x4_t accum,int16x8_t lhs,int16x8_t rhs)126 int32x4_t test_vqdmlal_high_s16(int32x4_t accum, int16x8_t lhs, int16x8_t rhs) {
127   // CHECK: sqdmlal2.4s
128   return vqdmlal_high_s16(accum, lhs, rhs);
129 }
130 
test_vqdmlal_high_s32(int64x2_t accum,int32x4_t lhs,int32x4_t rhs)131 int64x2_t test_vqdmlal_high_s32(int64x2_t accum, int32x4_t lhs, int32x4_t rhs) {
132   // CHECK: sqdmlal2.2d
133   return vqdmlal_high_s32(accum, lhs, rhs);
134 }
135 
test_vqdmlsl_high_s16(int32x4_t accum,int16x8_t lhs,int16x8_t rhs)136 int32x4_t test_vqdmlsl_high_s16(int32x4_t accum, int16x8_t lhs, int16x8_t rhs) {
137   // CHECK: sqdmlsl2.4s
138   return vqdmlsl_high_s16(accum, lhs, rhs);
139 }
140 
test_vqdmlsl_high_s32(int64x2_t accum,int32x4_t lhs,int32x4_t rhs)141 int64x2_t test_vqdmlsl_high_s32(int64x2_t accum, int32x4_t lhs, int32x4_t rhs) {
142   // CHECK: sqdmlsl2.2d
143   return vqdmlsl_high_s32(accum, lhs, rhs);
144 }
145 
test_vqdmull_high_s16(int16x8_t lhs,int16x8_t rhs)146 int32x4_t test_vqdmull_high_s16(int16x8_t lhs, int16x8_t rhs) {
147   // CHECK: sqdmull2.4s
148   return vqdmull_high_s16(lhs, rhs);
149 }
150 
test_vqdmull_high_s32(int32x4_t lhs,int32x4_t rhs)151 int64x2_t test_vqdmull_high_s32(int32x4_t lhs, int32x4_t rhs) {
152   // CHECK: sqdmull2.2d
153   return vqdmull_high_s32(lhs, rhs);
154 }
155 
test_vshll_high_n_s8(int8x16_t in)156 int16x8_t test_vshll_high_n_s8(int8x16_t in) {
157   // CHECK: sshll2.8h
158   return vshll_high_n_s8(in, 7);
159 }
160 
test_vshll_high_n_s16(int16x8_t in)161 int32x4_t test_vshll_high_n_s16(int16x8_t in) {
162   // CHECK: sshll2.4s
163   return vshll_high_n_s16(in, 15);
164 }
165 
test_vshll_high_n_s32(int32x4_t in)166 int64x2_t test_vshll_high_n_s32(int32x4_t in) {
167   // CHECK: sshll2.2d
168   return vshll_high_n_s32(in, 31);
169 }
170 
test_vshll_high_n_u8(int8x16_t in)171 int16x8_t test_vshll_high_n_u8(int8x16_t in) {
172   // CHECK: ushll2.8h
173   return vshll_high_n_u8(in, 7);
174 }
175 
test_vshll_high_n_u16(int16x8_t in)176 int32x4_t test_vshll_high_n_u16(int16x8_t in) {
177   // CHECK: ushll2.4s
178   return vshll_high_n_u16(in, 15);
179 }
180 
test_vshll_high_n_u32(int32x4_t in)181 int64x2_t test_vshll_high_n_u32(int32x4_t in) {
182   // CHECK: ushll2.2d
183   return vshll_high_n_u32(in, 31);
184 }
185 
test_vshll_high_n_s8_max(int8x16_t in)186 int16x8_t test_vshll_high_n_s8_max(int8x16_t in) {
187   // CHECK: shll2.8h
188   return vshll_high_n_s8(in, 8);
189 }
190 
test_vshll_high_n_s16_max(int16x8_t in)191 int32x4_t test_vshll_high_n_s16_max(int16x8_t in) {
192   // CHECK: shll2.4s
193   return vshll_high_n_s16(in, 16);
194 }
195 
test_vshll_high_n_s32_max(int32x4_t in)196 int64x2_t test_vshll_high_n_s32_max(int32x4_t in) {
197   // CHECK: shll2.2d
198   return vshll_high_n_s32(in, 32);
199 }
200 
test_vshll_high_n_u8_max(int8x16_t in)201 int16x8_t test_vshll_high_n_u8_max(int8x16_t in) {
202   // CHECK: shll2.8h
203   return vshll_high_n_u8(in, 8);
204 }
205 
test_vshll_high_n_u16_max(int16x8_t in)206 int32x4_t test_vshll_high_n_u16_max(int16x8_t in) {
207   // CHECK: shll2.4s
208   return vshll_high_n_u16(in, 16);
209 }
210 
test_vshll_high_n_u32_max(int32x4_t in)211 int64x2_t test_vshll_high_n_u32_max(int32x4_t in) {
212   // CHECK: shll2.2d
213   return vshll_high_n_u32(in, 32);
214 }
215 
test_vsubl_high_s8(int8x16_t lhs,int8x16_t rhs)216 int16x8_t test_vsubl_high_s8(int8x16_t lhs, int8x16_t rhs) {
217   // CHECK: ssubl2.8h
218   return vsubl_high_s8(lhs, rhs);
219 }
220 
test_vsubl_high_s16(int16x8_t lhs,int16x8_t rhs)221 int32x4_t test_vsubl_high_s16(int16x8_t lhs, int16x8_t rhs) {
222   // CHECK: ssubl2.4s
223   return vsubl_high_s16(lhs, rhs);
224 }
225 
test_vsubl_high_s32(int32x4_t lhs,int32x4_t rhs)226 int64x2_t test_vsubl_high_s32(int32x4_t lhs, int32x4_t rhs) {
227   // CHECK: ssubl2.2d
228   return vsubl_high_s32(lhs, rhs);
229 }
230 
test_vsubl_high_u8(uint8x16_t lhs,uint8x16_t rhs)231 uint16x8_t test_vsubl_high_u8(uint8x16_t lhs, uint8x16_t rhs) {
232   // CHECK: usubl2.8h
233   return vsubl_high_u8(lhs, rhs);
234 }
235 
test_vsubl_high_u16(uint16x8_t lhs,uint16x8_t rhs)236 uint32x4_t test_vsubl_high_u16(uint16x8_t lhs, uint16x8_t rhs) {
237   // CHECK: usubl2.4s
238   return vsubl_high_u16(lhs, rhs);
239 }
240 
test_vsubl_high_u32(uint32x4_t lhs,uint32x4_t rhs)241 uint64x2_t test_vsubl_high_u32(uint32x4_t lhs, uint32x4_t rhs) {
242   // CHECK: usubl2.2d
243   return vsubl_high_u32(lhs, rhs);
244 }
245 
test_vrshrn_high_n_s16(int8x8_t lowpart,int16x8_t input)246 int8x16_t test_vrshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
247   // CHECK: rshrn2.16b
248   return vrshrn_high_n_s16(lowpart, input, 2);
249 }
250 
test_vrshrn_high_n_s32(int16x4_t lowpart,int32x4_t input)251 int16x8_t test_vrshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
252   // CHECK: rshrn2.8h
253   return vrshrn_high_n_s32(lowpart, input, 2);
254 }
255 
test_vrshrn_high_n_s64(int32x2_t lowpart,int64x2_t input)256 int32x4_t test_vrshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
257   // CHECK: shrn2.4s
258   return vrshrn_high_n_s64(lowpart, input, 2);
259 }
260 
test_vrshrn_high_n_u16(uint8x8_t lowpart,uint16x8_t input)261 uint8x16_t test_vrshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
262   // CHECK: rshrn2.16b
263   return vrshrn_high_n_u16(lowpart, input, 2);
264 }
265 
test_vrshrn_high_n_u32(uint16x4_t lowpart,uint32x4_t input)266 uint16x8_t test_vrshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
267   // CHECK: rshrn2.8h
268   return vrshrn_high_n_u32(lowpart, input, 2);
269 }
270 
test_vrshrn_high_n_u64(uint32x2_t lowpart,uint64x2_t input)271 uint32x4_t test_vrshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
272   // CHECK: rshrn2.4s
273   return vrshrn_high_n_u64(lowpart, input, 2);
274 }
275 
test_vshrn_high_n_s16(int8x8_t lowpart,int16x8_t input)276 int8x16_t test_vshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
277   // CHECK: shrn2.16b
278   return vshrn_high_n_s16(lowpart, input, 2);
279 }
280 
test_vshrn_high_n_s32(int16x4_t lowpart,int32x4_t input)281 int16x8_t test_vshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
282   // CHECK: shrn2.8h
283   return vshrn_high_n_s32(lowpart, input, 2);
284 }
285 
test_vshrn_high_n_s64(int32x2_t lowpart,int64x2_t input)286 int32x4_t test_vshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
287   // CHECK: shrn2.4s
288   return vshrn_high_n_s64(lowpart, input, 2);
289 }
290 
test_vshrn_high_n_u16(uint8x8_t lowpart,uint16x8_t input)291 uint8x16_t test_vshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
292   // CHECK: shrn2.16b
293   return vshrn_high_n_u16(lowpart, input, 2);
294 }
295 
test_vshrn_high_n_u32(uint16x4_t lowpart,uint32x4_t input)296 uint16x8_t test_vshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
297   // CHECK: shrn2.8h
298   return vshrn_high_n_u32(lowpart, input, 2);
299 }
300 
test_vshrn_high_n_u64(uint32x2_t lowpart,uint64x2_t input)301 uint32x4_t test_vshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
302   // CHECK: shrn2.4s
303   return vshrn_high_n_u64(lowpart, input, 2);
304 }
305 
test_vqshrun_high_n_s16(uint8x8_t lowpart,int16x8_t input)306 uint8x16_t test_vqshrun_high_n_s16(uint8x8_t lowpart, int16x8_t input) {
307   // CHECK: sqshrun2.16b
308   return vqshrun_high_n_s16(lowpart, input, 2);
309 }
310 
test_vqshrun_high_n_s32(uint16x4_t lowpart,int32x4_t input)311 uint16x8_t test_vqshrun_high_n_s32(uint16x4_t lowpart, int32x4_t input) {
312   // CHECK: sqshrun2.8h
313   return vqshrun_high_n_s32(lowpart, input, 2);
314 }
315 
test_vqshrun_high_n_s64(uint32x2_t lowpart,int64x2_t input)316 uint32x4_t test_vqshrun_high_n_s64(uint32x2_t lowpart, int64x2_t input) {
317   // CHECK: sqshrun2.4s
318   return vqshrun_high_n_s64(lowpart, input, 2);
319 }
320 
test_vqrshrun_high_n_s16(uint8x8_t lowpart,int16x8_t input)321 uint8x16_t test_vqrshrun_high_n_s16(uint8x8_t lowpart, int16x8_t input) {
322   // CHECK: sqrshrun2.16b
323   return vqrshrun_high_n_s16(lowpart, input, 2);
324 }
325 
test_vqrshrun_high_n_s32(uint16x4_t lowpart,int32x4_t input)326 uint16x8_t test_vqrshrun_high_n_s32(uint16x4_t lowpart, int32x4_t input) {
327   // CHECK: sqrshrun2.8h
328   return vqrshrun_high_n_s32(lowpart, input, 2);
329 }
330 
test_vqrshrun_high_n_s64(uint32x2_t lowpart,int64x2_t input)331 uint32x4_t test_vqrshrun_high_n_s64(uint32x2_t lowpart, int64x2_t input) {
332   // CHECK: sqrshrun2.4s
333   return vqrshrun_high_n_s64(lowpart, input, 2);
334 }
335 
test_vqshrn_high_n_s16(int8x8_t lowpart,int16x8_t input)336 int8x16_t test_vqshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
337   // CHECK: sqshrn2.16b
338   return vqshrn_high_n_s16(lowpart, input, 2);
339 }
340 
test_vqshrn_high_n_s32(int16x4_t lowpart,int32x4_t input)341 int16x8_t test_vqshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
342   // CHECK: sqshrn2.8h
343   return vqshrn_high_n_s32(lowpart, input, 2);
344 }
345 
test_vqshrn_high_n_s64(int32x2_t lowpart,int64x2_t input)346 int32x4_t test_vqshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
347   // CHECK: sqshrn2.4s
348   return vqshrn_high_n_s64(lowpart, input, 2);
349 }
350 
test_vqshrn_high_n_u16(uint8x8_t lowpart,uint16x8_t input)351 uint8x16_t test_vqshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
352   // CHECK: uqshrn2.16b
353   return vqshrn_high_n_u16(lowpart, input, 2);
354 }
355 
test_vqshrn_high_n_u32(uint16x4_t lowpart,uint32x4_t input)356 uint16x8_t test_vqshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
357   // CHECK: uqshrn2.8h
358   return vqshrn_high_n_u32(lowpart, input, 2);
359 }
360 
test_vqshrn_high_n_u64(uint32x2_t lowpart,uint64x2_t input)361 uint32x4_t test_vqshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
362   // CHECK: uqshrn2.4s
363   return vqshrn_high_n_u64(lowpart, input, 2);
364 }
365 
test_vqrshrn_high_n_s16(int8x8_t lowpart,int16x8_t input)366 int8x16_t test_vqrshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
367   // CHECK: sqrshrn2.16b
368   return vqrshrn_high_n_s16(lowpart, input, 2);
369 }
370 
test_vqrshrn_high_n_s32(int16x4_t lowpart,int32x4_t input)371 int16x8_t test_vqrshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
372   // CHECK: sqrshrn2.8h
373   return vqrshrn_high_n_s32(lowpart, input, 2);
374 }
375 
test_vqrshrn_high_n_s64(int32x2_t lowpart,int64x2_t input)376 int32x4_t test_vqrshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
377   // CHECK: sqrshrn2.4s
378   return vqrshrn_high_n_s64(lowpart, input, 2);
379 }
380 
test_vqrshrn_high_n_u16(uint8x8_t lowpart,uint16x8_t input)381 uint8x16_t test_vqrshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
382   // CHECK: uqrshrn2.16b
383   return vqrshrn_high_n_u16(lowpart, input, 2);
384 }
385 
test_vqrshrn_high_n_u32(uint16x4_t lowpart,uint32x4_t input)386 uint16x8_t test_vqrshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
387   // CHECK: uqrshrn2.8h
388   return vqrshrn_high_n_u32(lowpart, input, 2);
389 }
390 
test_vqrshrn_high_n_u64(uint32x2_t lowpart,uint64x2_t input)391 uint32x4_t test_vqrshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
392   // CHECK: uqrshrn2.4s
393   return vqrshrn_high_n_u64(lowpart, input, 2);
394 }
395 
test_vaddhn_high_s16(int8x8_t lowpart,int16x8_t lhs,int16x8_t rhs)396 int8x16_t test_vaddhn_high_s16(int8x8_t lowpart, int16x8_t lhs, int16x8_t rhs) {
397   // CHECK: addhn2.16b v0, {{v1, v2|v2, v1}}
398   return vaddhn_high_s16(lowpart, lhs, rhs);
399 }
400 
test_vaddhn_high_s32(int16x4_t lowpart,int32x4_t lhs,int32x4_t rhs)401 int16x8_t test_vaddhn_high_s32(int16x4_t lowpart, int32x4_t lhs, int32x4_t rhs) {
402   // CHECK: addhn2.8h v0, {{v1, v2|v2, v1}}
403   return vaddhn_high_s32(lowpart, lhs, rhs);
404 }
405 
test_vaddhn_high_s64(int32x2_t lowpart,int64x2_t lhs,int64x2_t rhs)406 int32x4_t test_vaddhn_high_s64(int32x2_t lowpart, int64x2_t lhs, int64x2_t rhs) {
407   // CHECK: addhn2.4s v0, {{v1, v2|v2, v1}}
408   return vaddhn_high_s64(lowpart, lhs, rhs);
409 }
410 
test_vaddhn_high_u16(uint8x8_t lowpart,uint16x8_t lhs,uint16x8_t rhs)411 uint8x16_t test_vaddhn_high_u16(uint8x8_t lowpart, uint16x8_t lhs, uint16x8_t rhs) {
412   // CHECK: addhn2.16b v0, {{v1, v2|v2, v1}}
413   return vaddhn_high_s16(lowpart, lhs, rhs);
414 }
415 
test_vaddhn_high_u32(uint16x4_t lowpart,uint32x4_t lhs,uint32x4_t rhs)416 uint16x8_t test_vaddhn_high_u32(uint16x4_t lowpart, uint32x4_t lhs, uint32x4_t rhs) {
417   // CHECK: addhn2.8h v0, {{v1, v2|v2, v1}}
418   return vaddhn_high_s32(lowpart, lhs, rhs);
419 }
420 
test_vaddhn_high_u64(uint32x2_t lowpart,uint64x2_t lhs,uint64x2_t rhs)421 uint32x4_t test_vaddhn_high_u64(uint32x2_t lowpart, uint64x2_t lhs, uint64x2_t rhs) {
422   // CHECK: addhn2.4s v0, {{v1, v2|v2, v1}}
423   return vaddhn_high_s64(lowpart, lhs, rhs);
424 }
425 
test_vraddhn_high_s16(int8x8_t lowpart,int16x8_t lhs,int16x8_t rhs)426 int8x16_t test_vraddhn_high_s16(int8x8_t lowpart, int16x8_t lhs, int16x8_t rhs) {
427   // CHECK: raddhn2.16b v0, v1, v2
428   return vraddhn_high_s16(lowpart, lhs, rhs);
429 }
430 
test_vraddhn_high_s32(int16x4_t lowpart,int32x4_t lhs,int32x4_t rhs)431 int16x8_t test_vraddhn_high_s32(int16x4_t lowpart, int32x4_t lhs, int32x4_t rhs) {
432   // CHECK: raddhn2.8h v0, v1, v2
433   return vraddhn_high_s32(lowpart, lhs, rhs);
434 }
435 
test_vraddhn_high_s64(int32x2_t lowpart,int64x2_t lhs,int64x2_t rhs)436 int32x4_t test_vraddhn_high_s64(int32x2_t lowpart, int64x2_t lhs, int64x2_t rhs) {
437   // CHECK: raddhn2.4s v0, v1, v2
438   return vraddhn_high_s64(lowpart, lhs, rhs);
439 }
440 
test_vraddhn_high_u16(uint8x8_t lowpart,uint16x8_t lhs,uint16x8_t rhs)441 uint8x16_t test_vraddhn_high_u16(uint8x8_t lowpart, uint16x8_t lhs, uint16x8_t rhs) {
442   // CHECK: raddhn2.16b v0, v1, v2
443   return vraddhn_high_s16(lowpart, lhs, rhs);
444 }
445 
test_vraddhn_high_u32(uint16x4_t lowpart,uint32x4_t lhs,uint32x4_t rhs)446 uint16x8_t test_vraddhn_high_u32(uint16x4_t lowpart, uint32x4_t lhs, uint32x4_t rhs) {
447   // CHECK: raddhn2.8h v0, v1, v2
448   return vraddhn_high_s32(lowpart, lhs, rhs);
449 }
450 
test_vraddhn_high_u64(uint32x2_t lowpart,uint64x2_t lhs,uint64x2_t rhs)451 uint32x4_t test_vraddhn_high_u64(uint32x2_t lowpart, uint64x2_t lhs, uint64x2_t rhs) {
452   // CHECK: raddhn2.4s v0, v1, v2
453   return vraddhn_high_s64(lowpart, lhs, rhs);
454 }
455 
test_vmovn_high_s16(int8x8_t lowpart,int16x8_t wide)456 int8x16_t test_vmovn_high_s16(int8x8_t lowpart, int16x8_t wide) {
457   // CHECK: xtn2.16b v0, v1
458   return vmovn_high_s16(lowpart, wide);
459 }
460 
test_vmovn_high_s32(int16x4_t lowpart,int32x4_t wide)461 int16x8_t test_vmovn_high_s32(int16x4_t lowpart, int32x4_t wide) {
462   // CHECK: xtn2.8h v0, v1
463   return vmovn_high_s32(lowpart, wide);
464 }
465 
test_vmovn_high_s64(int32x2_t lowpart,int64x2_t wide)466 int32x4_t test_vmovn_high_s64(int32x2_t lowpart, int64x2_t wide) {
467   // CHECK: xtn2.4s v0, v1
468   return vmovn_high_s64(lowpart, wide);
469 }
470 
test_vmovn_high_u16(uint8x8_t lowpart,uint16x8_t wide)471 uint8x16_t test_vmovn_high_u16(uint8x8_t lowpart, uint16x8_t wide) {
472   // CHECK: xtn2.16b v0, v1
473   return vmovn_high_u16(lowpart, wide);
474 }
475 
test_vmovn_high_u32(uint16x4_t lowpart,uint32x4_t wide)476 uint16x8_t test_vmovn_high_u32(uint16x4_t lowpart, uint32x4_t wide) {
477   // CHECK: xtn2.8h v0, v1
478   return vmovn_high_u32(lowpart, wide);
479 }
480 
test_vmovn_high_u64(uint32x2_t lowpart,uint64x2_t wide)481 uint32x4_t test_vmovn_high_u64(uint32x2_t lowpart, uint64x2_t wide) {
482   // CHECK: xtn2.4s v0, v1
483   return vmovn_high_u64(lowpart, wide);
484 }
485 
test_vqmovn_high_s16(int8x8_t lowpart,int16x8_t wide)486 int8x16_t test_vqmovn_high_s16(int8x8_t lowpart, int16x8_t wide) {
487   // CHECK: sqxtn2.16b v0, v1
488   return vqmovn_high_s16(lowpart, wide);
489 }
490 
test_vqmovn_high_s32(int16x4_t lowpart,int32x4_t wide)491 int16x8_t test_vqmovn_high_s32(int16x4_t lowpart, int32x4_t wide) {
492   // CHECK: sqxtn2.8h v0, v1
493   return vqmovn_high_s32(lowpart, wide);
494 }
495 
test_vqmovn_high_s64(int32x2_t lowpart,int64x2_t wide)496 int32x4_t test_vqmovn_high_s64(int32x2_t lowpart, int64x2_t wide) {
497   // CHECK: sqxtn2.4s v0, v1
498   return vqmovn_high_s64(lowpart, wide);
499 }
500 
test_vqmovn_high_u16(uint8x8_t lowpart,int16x8_t wide)501 uint8x16_t test_vqmovn_high_u16(uint8x8_t lowpart, int16x8_t wide) {
502   // CHECK: uqxtn2.16b v0, v1
503   return vqmovn_high_u16(lowpart, wide);
504 }
505 
test_vqmovn_high_u32(uint16x4_t lowpart,int32x4_t wide)506 uint16x8_t test_vqmovn_high_u32(uint16x4_t lowpart, int32x4_t wide) {
507   // CHECK: uqxtn2.8h v0, v1
508   return vqmovn_high_u32(lowpart, wide);
509 }
510 
test_vqmovn_high_u64(uint32x2_t lowpart,int64x2_t wide)511 uint32x4_t test_vqmovn_high_u64(uint32x2_t lowpart, int64x2_t wide) {
512   // CHECK: uqxtn2.4s v0, v1
513   return vqmovn_high_u64(lowpart, wide);
514 }
515 
test_vqmovun_high_s16(uint8x8_t lowpart,int16x8_t wide)516 uint8x16_t test_vqmovun_high_s16(uint8x8_t lowpart, int16x8_t wide) {
517   // CHECK: sqxtun2.16b v0, v1
518   return vqmovun_high_s16(lowpart, wide);
519 }
520 
test_vqmovun_high_s32(uint16x4_t lowpart,int32x4_t wide)521 uint16x8_t test_vqmovun_high_s32(uint16x4_t lowpart, int32x4_t wide) {
522   // CHECK: sqxtun2.8h v0, v1
523   return vqmovun_high_s32(lowpart, wide);
524 }
525 
test_vqmovun_high_s64(uint32x2_t lowpart,int64x2_t wide)526 uint32x4_t test_vqmovun_high_s64(uint32x2_t lowpart, int64x2_t wide) {
527   // CHECK: sqxtun2.4s v0, v1
528   return vqmovun_high_s64(lowpart, wide);
529 }
530 
test_vcvtx_high_f32_f64(float32x2_t lowpart,float64x2_t wide)531 float32x4_t test_vcvtx_high_f32_f64(float32x2_t lowpart, float64x2_t wide) {
532   // CHECK: fcvtxn2 v0.4s, v1.2d
533   return vcvtx_high_f32_f64(lowpart, wide);
534 }
535 
test_vcvt_f64_f32(float32x2_t x)536 float64x2_t test_vcvt_f64_f32(float32x2_t x) {
537   // CHECK: fcvtl v0.2d, v0.2s
538   return vcvt_f64_f32(x);
539 }
540 
test_vcvt_high_f64_f32(float32x4_t x)541 float64x2_t test_vcvt_high_f64_f32(float32x4_t x) {
542   // CHECK: fcvtl2 v0.2d, v0.4s
543   return vcvt_high_f64_f32(x);
544 }
545 
test_vcvt_f32_f64(float64x2_t v)546 float32x2_t test_vcvt_f32_f64(float64x2_t v) {
547   // CHECK: fcvtn v0.2s, v0.2d
548   return vcvt_f32_f64(v);
549 }
550 
test_vcvt_high_f32_f64(float32x2_t x,float64x2_t v)551 float32x4_t test_vcvt_high_f32_f64(float32x2_t x, float64x2_t v) {
552   // CHECK: fcvtn2 v0.4s, v1.2d
553   return vcvt_high_f32_f64(x, v);
554 }
555 
test_vcvtx_f32_f64(float64x2_t v)556 float32x2_t test_vcvtx_f32_f64(float64x2_t v) {
557   // CHECK: fcvtxn v0.2s, v0.2d
558   return vcvtx_f32_f64(v);
559 }
560