Clang Project

clang_source_code/test/CodeGen/aarch64-neon-misc.c
1// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
2// RUN:  -disable-O0-optnone -fallow-half-arguments-and-returns -emit-llvm -o - %s \
3// RUN: | opt -S -mem2reg | FileCheck %s
4
5// Test new aarch64 intrinsics and types
6
7#include <arm_neon.h>
8
9// CHECK-LABEL: @test_vceqz_s8(
10// CHECK:   [[TMP0:%.*]] = icmp eq <8 x i8> %a, zeroinitializer
11// CHECK:   [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
12// CHECK:   ret <8 x i8> [[VCEQZ_I]]
13uint8x8_t test_vceqz_s8(int8x8_t a) {
14  return vceqz_s8(a);
15}
16
17// CHECK-LABEL: @test_vceqz_s16(
18// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
19// CHECK:   [[TMP1:%.*]] = icmp eq <4 x i16> %a, zeroinitializer
20// CHECK:   [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
21// CHECK:   ret <4 x i16> [[VCEQZ_I]]
22uint16x4_t test_vceqz_s16(int16x4_t a) {
23  return vceqz_s16(a);
24}
25
26// CHECK-LABEL: @test_vceqz_s32(
27// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
28// CHECK:   [[TMP1:%.*]] = icmp eq <2 x i32> %a, zeroinitializer
29// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
30// CHECK:   ret <2 x i32> [[VCEQZ_I]]
31uint32x2_t test_vceqz_s32(int32x2_t a) {
32  return vceqz_s32(a);
33}
34
35// CHECK-LABEL: @test_vceqz_s64(
36// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
37// CHECK:   [[TMP1:%.*]] = icmp eq <1 x i64> %a, zeroinitializer
38// CHECK:   [[VCEQZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
39// CHECK:   ret <1 x i64> [[VCEQZ_I]]
40uint64x1_t test_vceqz_s64(int64x1_t a) {
41  return vceqz_s64(a);
42}
43
44// CHECK-LABEL: @test_vceqz_u64(
45// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
46// CHECK:   [[TMP1:%.*]] = icmp eq <1 x i64> %a, zeroinitializer
47// CHECK:   [[VCEQZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
48// CHECK:   ret <1 x i64> [[VCEQZ_I]]
49uint64x1_t test_vceqz_u64(uint64x1_t a) {
50  return vceqz_u64(a);
51}
52
53// CHECK-LABEL: @test_vceqz_p64(
54// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
55// CHECK:   [[TMP1:%.*]] = icmp eq <1 x i64> %a, zeroinitializer
56// CHECK:   [[VCEQZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
57// CHECK:   ret <1 x i64> [[VCEQZ_I]]
58uint64x1_t test_vceqz_p64(poly64x1_t a) {
59  return vceqz_p64(a);
60}
61
62// CHECK-LABEL: @test_vceqzq_s8(
63// CHECK:   [[TMP0:%.*]] = icmp eq <16 x i8> %a, zeroinitializer
64// CHECK:   [[VCEQZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
65// CHECK:   ret <16 x i8> [[VCEQZ_I]]
66uint8x16_t test_vceqzq_s8(int8x16_t a) {
67  return vceqzq_s8(a);
68}
69
70// CHECK-LABEL: @test_vceqzq_s16(
71// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
72// CHECK:   [[TMP1:%.*]] = icmp eq <8 x i16> %a, zeroinitializer
73// CHECK:   [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
74// CHECK:   ret <8 x i16> [[VCEQZ_I]]
75uint16x8_t test_vceqzq_s16(int16x8_t a) {
76  return vceqzq_s16(a);
77}
78
79// CHECK-LABEL: @test_vceqzq_s32(
80// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
81// CHECK:   [[TMP1:%.*]] = icmp eq <4 x i32> %a, zeroinitializer
82// CHECK:   [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
83// CHECK:   ret <4 x i32> [[VCEQZ_I]]
84uint32x4_t test_vceqzq_s32(int32x4_t a) {
85  return vceqzq_s32(a);
86}
87
88// CHECK-LABEL: @test_vceqzq_s64(
89// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
90// CHECK:   [[TMP1:%.*]] = icmp eq <2 x i64> %a, zeroinitializer
91// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
92// CHECK:   ret <2 x i64> [[VCEQZ_I]]
93uint64x2_t test_vceqzq_s64(int64x2_t a) {
94  return vceqzq_s64(a);
95}
96
97// CHECK-LABEL: @test_vceqz_u8(
98// CHECK:   [[TMP0:%.*]] = icmp eq <8 x i8> %a, zeroinitializer
99// CHECK:   [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
100// CHECK:   ret <8 x i8> [[VCEQZ_I]]
101uint8x8_t test_vceqz_u8(uint8x8_t a) {
102  return vceqz_u8(a);
103}
104
105// CHECK-LABEL: @test_vceqz_u16(
106// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
107// CHECK:   [[TMP1:%.*]] = icmp eq <4 x i16> %a, zeroinitializer
108// CHECK:   [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
109// CHECK:   ret <4 x i16> [[VCEQZ_I]]
110uint16x4_t test_vceqz_u16(uint16x4_t a) {
111  return vceqz_u16(a);
112}
113
114// CHECK-LABEL: @test_vceqz_u32(
115// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
116// CHECK:   [[TMP1:%.*]] = icmp eq <2 x i32> %a, zeroinitializer
117// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
118// CHECK:   ret <2 x i32> [[VCEQZ_I]]
119uint32x2_t test_vceqz_u32(uint32x2_t a) {
120  return vceqz_u32(a);
121}
122
123// CHECK-LABEL: @test_vceqzq_u8(
124// CHECK:   [[TMP0:%.*]] = icmp eq <16 x i8> %a, zeroinitializer
125// CHECK:   [[VCEQZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
126// CHECK:   ret <16 x i8> [[VCEQZ_I]]
127uint8x16_t test_vceqzq_u8(uint8x16_t a) {
128  return vceqzq_u8(a);
129}
130
131// CHECK-LABEL: @test_vceqzq_u16(
132// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
133// CHECK:   [[TMP1:%.*]] = icmp eq <8 x i16> %a, zeroinitializer
134// CHECK:   [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
135// CHECK:   ret <8 x i16> [[VCEQZ_I]]
136uint16x8_t test_vceqzq_u16(uint16x8_t a) {
137  return vceqzq_u16(a);
138}
139
140// CHECK-LABEL: @test_vceqzq_u32(
141// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
142// CHECK:   [[TMP1:%.*]] = icmp eq <4 x i32> %a, zeroinitializer
143// CHECK:   [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
144// CHECK:   ret <4 x i32> [[VCEQZ_I]]
145uint32x4_t test_vceqzq_u32(uint32x4_t a) {
146  return vceqzq_u32(a);
147}
148
149// CHECK-LABEL: @test_vceqzq_u64(
150// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
151// CHECK:   [[TMP1:%.*]] = icmp eq <2 x i64> %a, zeroinitializer
152// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
153// CHECK:   ret <2 x i64> [[VCEQZ_I]]
154uint64x2_t test_vceqzq_u64(uint64x2_t a) {
155  return vceqzq_u64(a);
156}
157
158// CHECK-LABEL: @test_vceqz_f32(
159// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
160// CHECK:   [[TMP1:%.*]] = fcmp oeq <2 x float> %a, zeroinitializer
161// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
162// CHECK:   ret <2 x i32> [[VCEQZ_I]]
163uint32x2_t test_vceqz_f32(float32x2_t a) {
164  return vceqz_f32(a);
165}
166
167// CHECK-LABEL: @test_vceqz_f64(
168// CHECK:   [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8>
169// CHECK:   [[TMP1:%.*]] = fcmp oeq <1 x double> %a, zeroinitializer
170// CHECK:   [[VCEQZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
171// CHECK:   ret <1 x i64> [[VCEQZ_I]]
172uint64x1_t test_vceqz_f64(float64x1_t a) {
173  return vceqz_f64(a);
174}
175
176// CHECK-LABEL: @test_vceqzq_f32(
177// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
178// CHECK:   [[TMP1:%.*]] = fcmp oeq <4 x float> %a, zeroinitializer
179// CHECK:   [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
180// CHECK:   ret <4 x i32> [[VCEQZ_I]]
181uint32x4_t test_vceqzq_f32(float32x4_t a) {
182  return vceqzq_f32(a);
183}
184
185// CHECK-LABEL: @test_vceqz_p8(
186// CHECK:   [[TMP0:%.*]] = icmp eq <8 x i8> %a, zeroinitializer
187// CHECK:   [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
188// CHECK:   ret <8 x i8> [[VCEQZ_I]]
189uint8x8_t test_vceqz_p8(poly8x8_t a) {
190  return vceqz_p8(a);
191}
192
193// CHECK-LABEL: @test_vceqzq_p8(
194// CHECK:   [[TMP0:%.*]] = icmp eq <16 x i8> %a, zeroinitializer
195// CHECK:   [[VCEQZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
196// CHECK:   ret <16 x i8> [[VCEQZ_I]]
197uint8x16_t test_vceqzq_p8(poly8x16_t a) {
198  return vceqzq_p8(a);
199}
200
201// CHECK-LABEL: @test_vceqz_p16(
202// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
203// CHECK:   [[TMP1:%.*]] = icmp eq <4 x i16> %a, zeroinitializer
204// CHECK:   [[VCEQZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
205// CHECK:   ret <4 x i16> [[VCEQZ_I]]
206uint16x4_t test_vceqz_p16(poly16x4_t a) {
207  return vceqz_p16(a);
208}
209
210// CHECK-LABEL: @test_vceqzq_p16(
211// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
212// CHECK:   [[TMP1:%.*]] = icmp eq <8 x i16> %a, zeroinitializer
213// CHECK:   [[VCEQZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
214// CHECK:   ret <8 x i16> [[VCEQZ_I]]
215uint16x8_t test_vceqzq_p16(poly16x8_t a) {
216  return vceqzq_p16(a);
217}
218
219// CHECK-LABEL: @test_vceqzq_f64(
220// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
221// CHECK:   [[TMP1:%.*]] = fcmp oeq <2 x double> %a, zeroinitializer
222// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
223// CHECK:   ret <2 x i64> [[VCEQZ_I]]
224uint64x2_t test_vceqzq_f64(float64x2_t a) {
225  return vceqzq_f64(a);
226}
227
228// CHECK-LABEL: @test_vceqzq_p64(
229// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
230// CHECK:   [[TMP1:%.*]] = icmp eq <2 x i64> %a, zeroinitializer
231// CHECK:   [[VCEQZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
232// CHECK:   ret <2 x i64> [[VCEQZ_I]]
233uint64x2_t test_vceqzq_p64(poly64x2_t a) {
234  return vceqzq_p64(a);
235}
236
237// CHECK-LABEL: @test_vcgez_s8(
238// CHECK:   [[TMP0:%.*]] = icmp sge <8 x i8> %a, zeroinitializer
239// CHECK:   [[VCGEZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
240// CHECK:   ret <8 x i8> [[VCGEZ_I]]
241uint8x8_t test_vcgez_s8(int8x8_t a) {
242  return vcgez_s8(a);
243}
244
245// CHECK-LABEL: @test_vcgez_s16(
246// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
247// CHECK:   [[TMP1:%.*]] = icmp sge <4 x i16> %a, zeroinitializer
248// CHECK:   [[VCGEZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
249// CHECK:   ret <4 x i16> [[VCGEZ_I]]
250uint16x4_t test_vcgez_s16(int16x4_t a) {
251  return vcgez_s16(a);
252}
253
254// CHECK-LABEL: @test_vcgez_s32(
255// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
256// CHECK:   [[TMP1:%.*]] = icmp sge <2 x i32> %a, zeroinitializer
257// CHECK:   [[VCGEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
258// CHECK:   ret <2 x i32> [[VCGEZ_I]]
259uint32x2_t test_vcgez_s32(int32x2_t a) {
260  return vcgez_s32(a);
261}
262
263// CHECK-LABEL: @test_vcgez_s64(
264// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
265// CHECK:   [[TMP1:%.*]] = icmp sge <1 x i64> %a, zeroinitializer
266// CHECK:   [[VCGEZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
267// CHECK:   ret <1 x i64> [[VCGEZ_I]]
268uint64x1_t test_vcgez_s64(int64x1_t a) {
269  return vcgez_s64(a);
270}
271
272// CHECK-LABEL: @test_vcgezq_s8(
273// CHECK:   [[TMP0:%.*]] = icmp sge <16 x i8> %a, zeroinitializer
274// CHECK:   [[VCGEZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
275// CHECK:   ret <16 x i8> [[VCGEZ_I]]
276uint8x16_t test_vcgezq_s8(int8x16_t a) {
277  return vcgezq_s8(a);
278}
279
280// CHECK-LABEL: @test_vcgezq_s16(
281// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
282// CHECK:   [[TMP1:%.*]] = icmp sge <8 x i16> %a, zeroinitializer
283// CHECK:   [[VCGEZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
284// CHECK:   ret <8 x i16> [[VCGEZ_I]]
285uint16x8_t test_vcgezq_s16(int16x8_t a) {
286  return vcgezq_s16(a);
287}
288
289// CHECK-LABEL: @test_vcgezq_s32(
290// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
291// CHECK:   [[TMP1:%.*]] = icmp sge <4 x i32> %a, zeroinitializer
292// CHECK:   [[VCGEZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
293// CHECK:   ret <4 x i32> [[VCGEZ_I]]
294uint32x4_t test_vcgezq_s32(int32x4_t a) {
295  return vcgezq_s32(a);
296}
297
298// CHECK-LABEL: @test_vcgezq_s64(
299// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
300// CHECK:   [[TMP1:%.*]] = icmp sge <2 x i64> %a, zeroinitializer
301// CHECK:   [[VCGEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
302// CHECK:   ret <2 x i64> [[VCGEZ_I]]
303uint64x2_t test_vcgezq_s64(int64x2_t a) {
304  return vcgezq_s64(a);
305}
306
307// CHECK-LABEL: @test_vcgez_f32(
308// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
309// CHECK:   [[TMP1:%.*]] = fcmp oge <2 x float> %a, zeroinitializer
310// CHECK:   [[VCGEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
311// CHECK:   ret <2 x i32> [[VCGEZ_I]]
312uint32x2_t test_vcgez_f32(float32x2_t a) {
313  return vcgez_f32(a);
314}
315
316// CHECK-LABEL: @test_vcgez_f64(
317// CHECK:   [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8>
318// CHECK:   [[TMP1:%.*]] = fcmp oge <1 x double> %a, zeroinitializer
319// CHECK:   [[VCGEZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
320// CHECK:   ret <1 x i64> [[VCGEZ_I]]
321uint64x1_t test_vcgez_f64(float64x1_t a) {
322  return vcgez_f64(a);
323}
324
325// CHECK-LABEL: @test_vcgezq_f32(
326// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
327// CHECK:   [[TMP1:%.*]] = fcmp oge <4 x float> %a, zeroinitializer
328// CHECK:   [[VCGEZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
329// CHECK:   ret <4 x i32> [[VCGEZ_I]]
330uint32x4_t test_vcgezq_f32(float32x4_t a) {
331  return vcgezq_f32(a);
332}
333
334// CHECK-LABEL: @test_vcgezq_f64(
335// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
336// CHECK:   [[TMP1:%.*]] = fcmp oge <2 x double> %a, zeroinitializer
337// CHECK:   [[VCGEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
338// CHECK:   ret <2 x i64> [[VCGEZ_I]]
339uint64x2_t test_vcgezq_f64(float64x2_t a) {
340  return vcgezq_f64(a);
341}
342
343// CHECK-LABEL: @test_vclez_s8(
344// CHECK:   [[TMP0:%.*]] = icmp sle <8 x i8> %a, zeroinitializer
345// CHECK:   [[VCLEZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
346// CHECK:   ret <8 x i8> [[VCLEZ_I]]
347uint8x8_t test_vclez_s8(int8x8_t a) {
348  return vclez_s8(a);
349}
350
351// CHECK-LABEL: @test_vclez_s16(
352// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
353// CHECK:   [[TMP1:%.*]] = icmp sle <4 x i16> %a, zeroinitializer
354// CHECK:   [[VCLEZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
355// CHECK:   ret <4 x i16> [[VCLEZ_I]]
356uint16x4_t test_vclez_s16(int16x4_t a) {
357  return vclez_s16(a);
358}
359
360// CHECK-LABEL: @test_vclez_s32(
361// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
362// CHECK:   [[TMP1:%.*]] = icmp sle <2 x i32> %a, zeroinitializer
363// CHECK:   [[VCLEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
364// CHECK:   ret <2 x i32> [[VCLEZ_I]]
365uint32x2_t test_vclez_s32(int32x2_t a) {
366  return vclez_s32(a);
367}
368
369// CHECK-LABEL: @test_vclez_s64(
370// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
371// CHECK:   [[TMP1:%.*]] = icmp sle <1 x i64> %a, zeroinitializer
372// CHECK:   [[VCLEZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
373// CHECK:   ret <1 x i64> [[VCLEZ_I]]
374uint64x1_t test_vclez_s64(int64x1_t a) {
375  return vclez_s64(a);
376}
377
378// CHECK-LABEL: @test_vclezq_s8(
379// CHECK:   [[TMP0:%.*]] = icmp sle <16 x i8> %a, zeroinitializer
380// CHECK:   [[VCLEZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
381// CHECK:   ret <16 x i8> [[VCLEZ_I]]
382uint8x16_t test_vclezq_s8(int8x16_t a) {
383  return vclezq_s8(a);
384}
385
386// CHECK-LABEL: @test_vclezq_s16(
387// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
388// CHECK:   [[TMP1:%.*]] = icmp sle <8 x i16> %a, zeroinitializer
389// CHECK:   [[VCLEZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
390// CHECK:   ret <8 x i16> [[VCLEZ_I]]
391uint16x8_t test_vclezq_s16(int16x8_t a) {
392  return vclezq_s16(a);
393}
394
395// CHECK-LABEL: @test_vclezq_s32(
396// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
397// CHECK:   [[TMP1:%.*]] = icmp sle <4 x i32> %a, zeroinitializer
398// CHECK:   [[VCLEZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
399// CHECK:   ret <4 x i32> [[VCLEZ_I]]
400uint32x4_t test_vclezq_s32(int32x4_t a) {
401  return vclezq_s32(a);
402}
403
404// CHECK-LABEL: @test_vclezq_s64(
405// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
406// CHECK:   [[TMP1:%.*]] = icmp sle <2 x i64> %a, zeroinitializer
407// CHECK:   [[VCLEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
408// CHECK:   ret <2 x i64> [[VCLEZ_I]]
409uint64x2_t test_vclezq_s64(int64x2_t a) {
410  return vclezq_s64(a);
411}
412
413// CHECK-LABEL: @test_vclez_f32(
414// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
415// CHECK:   [[TMP1:%.*]] = fcmp ole <2 x float> %a, zeroinitializer
416// CHECK:   [[VCLEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
417// CHECK:   ret <2 x i32> [[VCLEZ_I]]
418uint32x2_t test_vclez_f32(float32x2_t a) {
419  return vclez_f32(a);
420}
421
422// CHECK-LABEL: @test_vclez_f64(
423// CHECK:   [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8>
424// CHECK:   [[TMP1:%.*]] = fcmp ole <1 x double> %a, zeroinitializer
425// CHECK:   [[VCLEZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
426// CHECK:   ret <1 x i64> [[VCLEZ_I]]
427uint64x1_t test_vclez_f64(float64x1_t a) {
428  return vclez_f64(a);
429}
430
431// CHECK-LABEL: @test_vclezq_f32(
432// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
433// CHECK:   [[TMP1:%.*]] = fcmp ole <4 x float> %a, zeroinitializer
434// CHECK:   [[VCLEZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
435// CHECK:   ret <4 x i32> [[VCLEZ_I]]
436uint32x4_t test_vclezq_f32(float32x4_t a) {
437  return vclezq_f32(a);
438}
439
440// CHECK-LABEL: @test_vclezq_f64(
441// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
442// CHECK:   [[TMP1:%.*]] = fcmp ole <2 x double> %a, zeroinitializer
443// CHECK:   [[VCLEZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
444// CHECK:   ret <2 x i64> [[VCLEZ_I]]
445uint64x2_t test_vclezq_f64(float64x2_t a) {
446  return vclezq_f64(a);
447}
448
449// CHECK-LABEL: @test_vcgtz_s8(
450// CHECK:   [[TMP0:%.*]] = icmp sgt <8 x i8> %a, zeroinitializer
451// CHECK:   [[VCGTZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
452// CHECK:   ret <8 x i8> [[VCGTZ_I]]
453uint8x8_t test_vcgtz_s8(int8x8_t a) {
454  return vcgtz_s8(a);
455}
456
457// CHECK-LABEL: @test_vcgtz_s16(
458// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
459// CHECK:   [[TMP1:%.*]] = icmp sgt <4 x i16> %a, zeroinitializer
460// CHECK:   [[VCGTZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
461// CHECK:   ret <4 x i16> [[VCGTZ_I]]
462uint16x4_t test_vcgtz_s16(int16x4_t a) {
463  return vcgtz_s16(a);
464}
465
466// CHECK-LABEL: @test_vcgtz_s32(
467// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
468// CHECK:   [[TMP1:%.*]] = icmp sgt <2 x i32> %a, zeroinitializer
469// CHECK:   [[VCGTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
470// CHECK:   ret <2 x i32> [[VCGTZ_I]]
471uint32x2_t test_vcgtz_s32(int32x2_t a) {
472  return vcgtz_s32(a);
473}
474
475// CHECK-LABEL: @test_vcgtz_s64(
476// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
477// CHECK:   [[TMP1:%.*]] = icmp sgt <1 x i64> %a, zeroinitializer
478// CHECK:   [[VCGTZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
479// CHECK:   ret <1 x i64> [[VCGTZ_I]]
480uint64x1_t test_vcgtz_s64(int64x1_t a) {
481  return vcgtz_s64(a);
482}
483
484// CHECK-LABEL: @test_vcgtzq_s8(
485// CHECK:   [[TMP0:%.*]] = icmp sgt <16 x i8> %a, zeroinitializer
486// CHECK:   [[VCGTZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
487// CHECK:   ret <16 x i8> [[VCGTZ_I]]
488uint8x16_t test_vcgtzq_s8(int8x16_t a) {
489  return vcgtzq_s8(a);
490}
491
492// CHECK-LABEL: @test_vcgtzq_s16(
493// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
494// CHECK:   [[TMP1:%.*]] = icmp sgt <8 x i16> %a, zeroinitializer
495// CHECK:   [[VCGTZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
496// CHECK:   ret <8 x i16> [[VCGTZ_I]]
497uint16x8_t test_vcgtzq_s16(int16x8_t a) {
498  return vcgtzq_s16(a);
499}
500
501// CHECK-LABEL: @test_vcgtzq_s32(
502// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
503// CHECK:   [[TMP1:%.*]] = icmp sgt <4 x i32> %a, zeroinitializer
504// CHECK:   [[VCGTZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
505// CHECK:   ret <4 x i32> [[VCGTZ_I]]
506uint32x4_t test_vcgtzq_s32(int32x4_t a) {
507  return vcgtzq_s32(a);
508}
509
510// CHECK-LABEL: @test_vcgtzq_s64(
511// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
512// CHECK:   [[TMP1:%.*]] = icmp sgt <2 x i64> %a, zeroinitializer
513// CHECK:   [[VCGTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
514// CHECK:   ret <2 x i64> [[VCGTZ_I]]
515uint64x2_t test_vcgtzq_s64(int64x2_t a) {
516  return vcgtzq_s64(a);
517}
518
519// CHECK-LABEL: @test_vcgtz_f32(
520// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
521// CHECK:   [[TMP1:%.*]] = fcmp ogt <2 x float> %a, zeroinitializer
522// CHECK:   [[VCGTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
523// CHECK:   ret <2 x i32> [[VCGTZ_I]]
524uint32x2_t test_vcgtz_f32(float32x2_t a) {
525  return vcgtz_f32(a);
526}
527
528// CHECK-LABEL: @test_vcgtz_f64(
529// CHECK:   [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8>
530// CHECK:   [[TMP1:%.*]] = fcmp ogt <1 x double> %a, zeroinitializer
531// CHECK:   [[VCGTZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
532// CHECK:   ret <1 x i64> [[VCGTZ_I]]
533uint64x1_t test_vcgtz_f64(float64x1_t a) {
534  return vcgtz_f64(a);
535}
536
537// CHECK-LABEL: @test_vcgtzq_f32(
538// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
539// CHECK:   [[TMP1:%.*]] = fcmp ogt <4 x float> %a, zeroinitializer
540// CHECK:   [[VCGTZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
541// CHECK:   ret <4 x i32> [[VCGTZ_I]]
542uint32x4_t test_vcgtzq_f32(float32x4_t a) {
543  return vcgtzq_f32(a);
544}
545
546// CHECK-LABEL: @test_vcgtzq_f64(
547// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
548// CHECK:   [[TMP1:%.*]] = fcmp ogt <2 x double> %a, zeroinitializer
549// CHECK:   [[VCGTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
550// CHECK:   ret <2 x i64> [[VCGTZ_I]]
551uint64x2_t test_vcgtzq_f64(float64x2_t a) {
552  return vcgtzq_f64(a);
553}
554
555// CHECK-LABEL: @test_vcltz_s8(
556// CHECK:   [[TMP0:%.*]] = icmp slt <8 x i8> %a, zeroinitializer
557// CHECK:   [[VCLTZ_I:%.*]] = sext <8 x i1> [[TMP0]] to <8 x i8>
558// CHECK:   ret <8 x i8> [[VCLTZ_I]]
559uint8x8_t test_vcltz_s8(int8x8_t a) {
560  return vcltz_s8(a);
561}
562
563// CHECK-LABEL: @test_vcltz_s16(
564// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
565// CHECK:   [[TMP1:%.*]] = icmp slt <4 x i16> %a, zeroinitializer
566// CHECK:   [[VCLTZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i16>
567// CHECK:   ret <4 x i16> [[VCLTZ_I]]
568uint16x4_t test_vcltz_s16(int16x4_t a) {
569  return vcltz_s16(a);
570}
571
572// CHECK-LABEL: @test_vcltz_s32(
573// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
574// CHECK:   [[TMP1:%.*]] = icmp slt <2 x i32> %a, zeroinitializer
575// CHECK:   [[VCLTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
576// CHECK:   ret <2 x i32> [[VCLTZ_I]]
577uint32x2_t test_vcltz_s32(int32x2_t a) {
578  return vcltz_s32(a);
579}
580
581// CHECK-LABEL: @test_vcltz_s64(
582// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
583// CHECK:   [[TMP1:%.*]] = icmp slt <1 x i64> %a, zeroinitializer
584// CHECK:   [[VCLTZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
585// CHECK:   ret <1 x i64> [[VCLTZ_I]]
586uint64x1_t test_vcltz_s64(int64x1_t a) {
587  return vcltz_s64(a);
588}
589
590// CHECK-LABEL: @test_vcltzq_s8(
591// CHECK:   [[TMP0:%.*]] = icmp slt <16 x i8> %a, zeroinitializer
592// CHECK:   [[VCLTZ_I:%.*]] = sext <16 x i1> [[TMP0]] to <16 x i8>
593// CHECK:   ret <16 x i8> [[VCLTZ_I]]
594uint8x16_t test_vcltzq_s8(int8x16_t a) {
595  return vcltzq_s8(a);
596}
597
598// CHECK-LABEL: @test_vcltzq_s16(
599// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
600// CHECK:   [[TMP1:%.*]] = icmp slt <8 x i16> %a, zeroinitializer
601// CHECK:   [[VCLTZ_I:%.*]] = sext <8 x i1> [[TMP1]] to <8 x i16>
602// CHECK:   ret <8 x i16> [[VCLTZ_I]]
603uint16x8_t test_vcltzq_s16(int16x8_t a) {
604  return vcltzq_s16(a);
605}
606
607// CHECK-LABEL: @test_vcltzq_s32(
608// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
609// CHECK:   [[TMP1:%.*]] = icmp slt <4 x i32> %a, zeroinitializer
610// CHECK:   [[VCLTZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
611// CHECK:   ret <4 x i32> [[VCLTZ_I]]
612uint32x4_t test_vcltzq_s32(int32x4_t a) {
613  return vcltzq_s32(a);
614}
615
616// CHECK-LABEL: @test_vcltzq_s64(
617// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
618// CHECK:   [[TMP1:%.*]] = icmp slt <2 x i64> %a, zeroinitializer
619// CHECK:   [[VCLTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
620// CHECK:   ret <2 x i64> [[VCLTZ_I]]
621uint64x2_t test_vcltzq_s64(int64x2_t a) {
622  return vcltzq_s64(a);
623}
624
625// CHECK-LABEL: @test_vcltz_f32(
626// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
627// CHECK:   [[TMP1:%.*]] = fcmp olt <2 x float> %a, zeroinitializer
628// CHECK:   [[VCLTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i32>
629// CHECK:   ret <2 x i32> [[VCLTZ_I]]
630uint32x2_t test_vcltz_f32(float32x2_t a) {
631  return vcltz_f32(a);
632}
633
634// CHECK-LABEL: @test_vcltz_f64(
635// CHECK:   [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8>
636// CHECK:   [[TMP1:%.*]] = fcmp olt <1 x double> %a, zeroinitializer
637// CHECK:   [[VCLTZ_I:%.*]] = sext <1 x i1> [[TMP1]] to <1 x i64>
638// CHECK:   ret <1 x i64> [[VCLTZ_I]]
639uint64x1_t test_vcltz_f64(float64x1_t a) {
640  return vcltz_f64(a);
641}
642
643// CHECK-LABEL: @test_vcltzq_f32(
644// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
645// CHECK:   [[TMP1:%.*]] = fcmp olt <4 x float> %a, zeroinitializer
646// CHECK:   [[VCLTZ_I:%.*]] = sext <4 x i1> [[TMP1]] to <4 x i32>
647// CHECK:   ret <4 x i32> [[VCLTZ_I]]
648uint32x4_t test_vcltzq_f32(float32x4_t a) {
649  return vcltzq_f32(a);
650}
651
652// CHECK-LABEL: @test_vcltzq_f64(
653// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
654// CHECK:   [[TMP1:%.*]] = fcmp olt <2 x double> %a, zeroinitializer
655// CHECK:   [[VCLTZ_I:%.*]] = sext <2 x i1> [[TMP1]] to <2 x i64>
656// CHECK:   ret <2 x i64> [[VCLTZ_I]]
657uint64x2_t test_vcltzq_f64(float64x2_t a) {
658  return vcltzq_f64(a);
659}
660
661// CHECK-LABEL: @test_vrev16_s8(
662// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
663// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
664int8x8_t test_vrev16_s8(int8x8_t a) {
665  return vrev16_s8(a);
666}
667
668// CHECK-LABEL: @test_vrev16_u8(
669// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
670// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
671uint8x8_t test_vrev16_u8(uint8x8_t a) {
672  return vrev16_u8(a);
673}
674
675// CHECK-LABEL: @test_vrev16_p8(
676// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
677// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
678poly8x8_t test_vrev16_p8(poly8x8_t a) {
679  return vrev16_p8(a);
680}
681
682// CHECK-LABEL: @test_vrev16q_s8(
683// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
684// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
685int8x16_t test_vrev16q_s8(int8x16_t a) {
686  return vrev16q_s8(a);
687}
688
689// CHECK-LABEL: @test_vrev16q_u8(
690// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
691// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
692uint8x16_t test_vrev16q_u8(uint8x16_t a) {
693  return vrev16q_u8(a);
694}
695
696// CHECK-LABEL: @test_vrev16q_p8(
697// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
698// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
699poly8x16_t test_vrev16q_p8(poly8x16_t a) {
700  return vrev16q_p8(a);
701}
702
703// CHECK-LABEL: @test_vrev32_s8(
704// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
705// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
706int8x8_t test_vrev32_s8(int8x8_t a) {
707  return vrev32_s8(a);
708}
709
710// CHECK-LABEL: @test_vrev32_s16(
711// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> %a, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
712// CHECK:   ret <4 x i16> [[SHUFFLE_I]]
713int16x4_t test_vrev32_s16(int16x4_t a) {
714  return vrev32_s16(a);
715}
716
717// CHECK-LABEL: @test_vrev32_u8(
718// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
719// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
720uint8x8_t test_vrev32_u8(uint8x8_t a) {
721  return vrev32_u8(a);
722}
723
724// CHECK-LABEL: @test_vrev32_u16(
725// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> %a, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
726// CHECK:   ret <4 x i16> [[SHUFFLE_I]]
727uint16x4_t test_vrev32_u16(uint16x4_t a) {
728  return vrev32_u16(a);
729}
730
731// CHECK-LABEL: @test_vrev32_p8(
732// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
733// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
734poly8x8_t test_vrev32_p8(poly8x8_t a) {
735  return vrev32_p8(a);
736}
737
738// CHECK-LABEL: @test_vrev32_p16(
739// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> %a, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
740// CHECK:   ret <4 x i16> [[SHUFFLE_I]]
741poly16x4_t test_vrev32_p16(poly16x4_t a) {
742  return vrev32_p16(a);
743}
744
745// CHECK-LABEL: @test_vrev32q_s8(
746// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
747// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
748int8x16_t test_vrev32q_s8(int8x16_t a) {
749  return vrev32q_s8(a);
750}
751
752// CHECK-LABEL: @test_vrev32q_s16(
753// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
754// CHECK:   ret <8 x i16> [[SHUFFLE_I]]
755int16x8_t test_vrev32q_s16(int16x8_t a) {
756  return vrev32q_s16(a);
757}
758
759// CHECK-LABEL: @test_vrev32q_u8(
760// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
761// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
762uint8x16_t test_vrev32q_u8(uint8x16_t a) {
763  return vrev32q_u8(a);
764}
765
766// CHECK-LABEL: @test_vrev32q_u16(
767// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
768// CHECK:   ret <8 x i16> [[SHUFFLE_I]]
769uint16x8_t test_vrev32q_u16(uint16x8_t a) {
770  return vrev32q_u16(a);
771}
772
773// CHECK-LABEL: @test_vrev32q_p8(
774// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4, i32 11, i32 10, i32 9, i32 8, i32 15, i32 14, i32 13, i32 12>
775// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
776poly8x16_t test_vrev32q_p8(poly8x16_t a) {
777  return vrev32q_p8(a);
778}
779
780// CHECK-LABEL: @test_vrev32q_p16(
781// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
782// CHECK:   ret <8 x i16> [[SHUFFLE_I]]
783poly16x8_t test_vrev32q_p16(poly16x8_t a) {
784  return vrev32q_p16(a);
785}
786
787// CHECK-LABEL: @test_vrev64_s8(
788// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
789// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
790int8x8_t test_vrev64_s8(int8x8_t a) {
791  return vrev64_s8(a);
792}
793
794// CHECK-LABEL: @test_vrev64_s16(
795// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> %a, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
796// CHECK:   ret <4 x i16> [[SHUFFLE_I]]
797int16x4_t test_vrev64_s16(int16x4_t a) {
798  return vrev64_s16(a);
799}
800
801// CHECK-LABEL: @test_vrev64_s32(
802// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> %a, <2 x i32> <i32 1, i32 0>
803// CHECK:   ret <2 x i32> [[SHUFFLE_I]]
804int32x2_t test_vrev64_s32(int32x2_t a) {
805  return vrev64_s32(a);
806}
807
808// CHECK-LABEL: @test_vrev64_u8(
809// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
810// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
811uint8x8_t test_vrev64_u8(uint8x8_t a) {
812  return vrev64_u8(a);
813}
814
815// CHECK-LABEL: @test_vrev64_u16(
816// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> %a, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
817// CHECK:   ret <4 x i16> [[SHUFFLE_I]]
818uint16x4_t test_vrev64_u16(uint16x4_t a) {
819  return vrev64_u16(a);
820}
821
822// CHECK-LABEL: @test_vrev64_u32(
823// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> %a, <2 x i32> <i32 1, i32 0>
824// CHECK:   ret <2 x i32> [[SHUFFLE_I]]
825uint32x2_t test_vrev64_u32(uint32x2_t a) {
826  return vrev64_u32(a);
827}
828
829// CHECK-LABEL: @test_vrev64_p8(
830// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> %a, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
831// CHECK:   ret <8 x i8> [[SHUFFLE_I]]
832poly8x8_t test_vrev64_p8(poly8x8_t a) {
833  return vrev64_p8(a);
834}
835
836// CHECK-LABEL: @test_vrev64_p16(
837// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> %a, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
838// CHECK:   ret <4 x i16> [[SHUFFLE_I]]
839poly16x4_t test_vrev64_p16(poly16x4_t a) {
840  return vrev64_p16(a);
841}
842
843// CHECK-LABEL: @test_vrev64_f32(
844// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <2 x float> %a, <2 x float> %a, <2 x i32> <i32 1, i32 0>
845// CHECK:   ret <2 x float> [[SHUFFLE_I]]
846float32x2_t test_vrev64_f32(float32x2_t a) {
847  return vrev64_f32(a);
848}
849
850// CHECK-LABEL: @test_vrev64q_s8(
851// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8>
852// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
853int8x16_t test_vrev64q_s8(int8x16_t a) {
854  return vrev64q_s8(a);
855}
856
857// CHECK-LABEL: @test_vrev64q_s16(
858// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
859// CHECK:   ret <8 x i16> [[SHUFFLE_I]]
860int16x8_t test_vrev64q_s16(int16x8_t a) {
861  return vrev64q_s16(a);
862}
863
864// CHECK-LABEL: @test_vrev64q_s32(
865// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
866// CHECK:   ret <4 x i32> [[SHUFFLE_I]]
867int32x4_t test_vrev64q_s32(int32x4_t a) {
868  return vrev64q_s32(a);
869}
870
871// CHECK-LABEL: @test_vrev64q_u8(
872// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8>
873// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
874uint8x16_t test_vrev64q_u8(uint8x16_t a) {
875  return vrev64q_u8(a);
876}
877
878// CHECK-LABEL: @test_vrev64q_u16(
879// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
880// CHECK:   ret <8 x i16> [[SHUFFLE_I]]
881uint16x8_t test_vrev64q_u16(uint16x8_t a) {
882  return vrev64q_u16(a);
883}
884
885// CHECK-LABEL: @test_vrev64q_u32(
886// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
887// CHECK:   ret <4 x i32> [[SHUFFLE_I]]
888uint32x4_t test_vrev64q_u32(uint32x4_t a) {
889  return vrev64q_u32(a);
890}
891
892// CHECK-LABEL: @test_vrev64q_p8(
893// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <16 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0, i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8>
894// CHECK:   ret <16 x i8> [[SHUFFLE_I]]
895poly8x16_t test_vrev64q_p8(poly8x16_t a) {
896  return vrev64q_p8(a);
897}
898
899// CHECK-LABEL: @test_vrev64q_p16(
900// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
901// CHECK:   ret <8 x i16> [[SHUFFLE_I]]
902poly16x8_t test_vrev64q_p16(poly16x8_t a) {
903  return vrev64q_p16(a);
904}
905
906// CHECK-LABEL: @test_vrev64q_f32(
907// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x float> %a, <4 x float> %a, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
908// CHECK:   ret <4 x float> [[SHUFFLE_I]]
909float32x4_t test_vrev64q_f32(float32x4_t a) {
910  return vrev64q_f32(a);
911}
912
913// CHECK-LABEL: @test_vpaddl_s8(
914// CHECK:   [[VPADDL_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.saddlp.v4i16.v8i8(<8 x i8> %a)
915// CHECK:   ret <4 x i16> [[VPADDL_I]]
916int16x4_t test_vpaddl_s8(int8x8_t a) {
917  return vpaddl_s8(a);
918}
919
920// CHECK-LABEL: @test_vpaddl_s16(
921// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
922// CHECK:   [[VPADDL1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.saddlp.v2i32.v4i16(<4 x i16> %a)
923// CHECK:   ret <2 x i32> [[VPADDL1_I]]
924int32x2_t test_vpaddl_s16(int16x4_t a) {
925  return vpaddl_s16(a);
926}
927
928// CHECK-LABEL: @test_vpaddl_s32(
929// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
930// CHECK:   [[VPADDL1_I:%.*]] = call <1 x i64> @llvm.aarch64.neon.saddlp.v1i64.v2i32(<2 x i32> %a)
931// CHECK:   ret <1 x i64> [[VPADDL1_I]]
932int64x1_t test_vpaddl_s32(int32x2_t a) {
933  return vpaddl_s32(a);
934}
935
936// CHECK-LABEL: @test_vpaddl_u8(
937// CHECK:   [[VPADDL_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.uaddlp.v4i16.v8i8(<8 x i8> %a)
938// CHECK:   ret <4 x i16> [[VPADDL_I]]
939uint16x4_t test_vpaddl_u8(uint8x8_t a) {
940  return vpaddl_u8(a);
941}
942
943// CHECK-LABEL: @test_vpaddl_u16(
944// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
945// CHECK:   [[VPADDL1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.uaddlp.v2i32.v4i16(<4 x i16> %a)
946// CHECK:   ret <2 x i32> [[VPADDL1_I]]
947uint32x2_t test_vpaddl_u16(uint16x4_t a) {
948  return vpaddl_u16(a);
949}
950
951// CHECK-LABEL: @test_vpaddl_u32(
952// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
953// CHECK:   [[VPADDL1_I:%.*]] = call <1 x i64> @llvm.aarch64.neon.uaddlp.v1i64.v2i32(<2 x i32> %a)
954// CHECK:   ret <1 x i64> [[VPADDL1_I]]
955uint64x1_t test_vpaddl_u32(uint32x2_t a) {
956  return vpaddl_u32(a);
957}
958
959// CHECK-LABEL: @test_vpaddlq_s8(
960// CHECK:   [[VPADDL_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.saddlp.v8i16.v16i8(<16 x i8> %a)
961// CHECK:   ret <8 x i16> [[VPADDL_I]]
962int16x8_t test_vpaddlq_s8(int8x16_t a) {
963  return vpaddlq_s8(a);
964}
965
966// CHECK-LABEL: @test_vpaddlq_s16(
967// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
968// CHECK:   [[VPADDL1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.saddlp.v4i32.v8i16(<8 x i16> %a)
969// CHECK:   ret <4 x i32> [[VPADDL1_I]]
970int32x4_t test_vpaddlq_s16(int16x8_t a) {
971  return vpaddlq_s16(a);
972}
973
974// CHECK-LABEL: @test_vpaddlq_s32(
975// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
976// CHECK:   [[VPADDL1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.saddlp.v2i64.v4i32(<4 x i32> %a)
977// CHECK:   ret <2 x i64> [[VPADDL1_I]]
978int64x2_t test_vpaddlq_s32(int32x4_t a) {
979  return vpaddlq_s32(a);
980}
981
982// CHECK-LABEL: @test_vpaddlq_u8(
983// CHECK:   [[VPADDL_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.uaddlp.v8i16.v16i8(<16 x i8> %a)
984// CHECK:   ret <8 x i16> [[VPADDL_I]]
985uint16x8_t test_vpaddlq_u8(uint8x16_t a) {
986  return vpaddlq_u8(a);
987}
988
989// CHECK-LABEL: @test_vpaddlq_u16(
990// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
991// CHECK:   [[VPADDL1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.uaddlp.v4i32.v8i16(<8 x i16> %a)
992// CHECK:   ret <4 x i32> [[VPADDL1_I]]
993uint32x4_t test_vpaddlq_u16(uint16x8_t a) {
994  return vpaddlq_u16(a);
995}
996
997// CHECK-LABEL: @test_vpaddlq_u32(
998// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
999// CHECK:   [[VPADDL1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.uaddlp.v2i64.v4i32(<4 x i32> %a)
1000// CHECK:   ret <2 x i64> [[VPADDL1_I]]
1001uint64x2_t test_vpaddlq_u32(uint32x4_t a) {
1002  return vpaddlq_u32(a);
1003}
1004
1005// CHECK-LABEL: @test_vpadal_s8(
1006// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1007// CHECK:   [[VPADAL_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.saddlp.v4i16.v8i8(<8 x i8> %b)
1008// CHECK:   [[TMP1:%.*]] = add <4 x i16> [[VPADAL_I]], %a
1009// CHECK:   ret <4 x i16> [[TMP1]]
1010int16x4_t test_vpadal_s8(int16x4_t a, int8x8_t b) {
1011  return vpadal_s8(a, b);
1012}
1013
1014// CHECK-LABEL: @test_vpadal_s16(
1015// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1016// CHECK:   [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8>
1017// CHECK:   [[VPADAL1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.saddlp.v2i32.v4i16(<4 x i16> %b)
1018// CHECK:   [[TMP2:%.*]] = add <2 x i32> [[VPADAL1_I]], %a
1019// CHECK:   ret <2 x i32> [[TMP2]]
1020int32x2_t test_vpadal_s16(int32x2_t a, int16x4_t b) {
1021  return vpadal_s16(a, b);
1022}
1023
1024// CHECK-LABEL: @test_vpadal_s32(
1025// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
1026// CHECK:   [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8>
1027// CHECK:   [[VPADAL1_I:%.*]] = call <1 x i64> @llvm.aarch64.neon.saddlp.v1i64.v2i32(<2 x i32> %b)
1028// CHECK:   [[TMP2:%.*]] = add <1 x i64> [[VPADAL1_I]], %a
1029// CHECK:   ret <1 x i64> [[TMP2]]
1030int64x1_t test_vpadal_s32(int64x1_t a, int32x2_t b) {
1031  return vpadal_s32(a, b);
1032}
1033
1034// CHECK-LABEL: @test_vpadal_u8(
1035// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1036// CHECK:   [[VPADAL_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.uaddlp.v4i16.v8i8(<8 x i8> %b)
1037// CHECK:   [[TMP1:%.*]] = add <4 x i16> [[VPADAL_I]], %a
1038// CHECK:   ret <4 x i16> [[TMP1]]
1039uint16x4_t test_vpadal_u8(uint16x4_t a, uint8x8_t b) {
1040  return vpadal_u8(a, b);
1041}
1042
1043// CHECK-LABEL: @test_vpadal_u16(
1044// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1045// CHECK:   [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8>
1046// CHECK:   [[VPADAL1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.uaddlp.v2i32.v4i16(<4 x i16> %b)
1047// CHECK:   [[TMP2:%.*]] = add <2 x i32> [[VPADAL1_I]], %a
1048// CHECK:   ret <2 x i32> [[TMP2]]
1049uint32x2_t test_vpadal_u16(uint32x2_t a, uint16x4_t b) {
1050  return vpadal_u16(a, b);
1051}
1052
1053// CHECK-LABEL: @test_vpadal_u32(
1054// CHECK:   [[TMP0:%.*]] = bitcast <1 x i64> %a to <8 x i8>
1055// CHECK:   [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8>
1056// CHECK:   [[VPADAL1_I:%.*]] = call <1 x i64> @llvm.aarch64.neon.uaddlp.v1i64.v2i32(<2 x i32> %b)
1057// CHECK:   [[TMP2:%.*]] = add <1 x i64> [[VPADAL1_I]], %a
1058// CHECK:   ret <1 x i64> [[TMP2]]
1059uint64x1_t test_vpadal_u32(uint64x1_t a, uint32x2_t b) {
1060  return vpadal_u32(a, b);
1061}
1062
1063// CHECK-LABEL: @test_vpadalq_s8(
1064// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1065// CHECK:   [[VPADAL_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.saddlp.v8i16.v16i8(<16 x i8> %b)
1066// CHECK:   [[TMP1:%.*]] = add <8 x i16> [[VPADAL_I]], %a
1067// CHECK:   ret <8 x i16> [[TMP1]]
1068int16x8_t test_vpadalq_s8(int16x8_t a, int8x16_t b) {
1069  return vpadalq_s8(a, b);
1070}
1071
1072// CHECK-LABEL: @test_vpadalq_s16(
1073// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1074// CHECK:   [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1075// CHECK:   [[VPADAL1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.saddlp.v4i32.v8i16(<8 x i16> %b)
1076// CHECK:   [[TMP2:%.*]] = add <4 x i32> [[VPADAL1_I]], %a
1077// CHECK:   ret <4 x i32> [[TMP2]]
1078int32x4_t test_vpadalq_s16(int32x4_t a, int16x8_t b) {
1079  return vpadalq_s16(a, b);
1080}
1081
1082// CHECK-LABEL: @test_vpadalq_s32(
1083// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1084// CHECK:   [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1085// CHECK:   [[VPADAL1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.saddlp.v2i64.v4i32(<4 x i32> %b)
1086// CHECK:   [[TMP2:%.*]] = add <2 x i64> [[VPADAL1_I]], %a
1087// CHECK:   ret <2 x i64> [[TMP2]]
1088int64x2_t test_vpadalq_s32(int64x2_t a, int32x4_t b) {
1089  return vpadalq_s32(a, b);
1090}
1091
1092// CHECK-LABEL: @test_vpadalq_u8(
1093// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1094// CHECK:   [[VPADAL_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.uaddlp.v8i16.v16i8(<16 x i8> %b)
1095// CHECK:   [[TMP1:%.*]] = add <8 x i16> [[VPADAL_I]], %a
1096// CHECK:   ret <8 x i16> [[TMP1]]
1097uint16x8_t test_vpadalq_u8(uint16x8_t a, uint8x16_t b) {
1098  return vpadalq_u8(a, b);
1099}
1100
1101// CHECK-LABEL: @test_vpadalq_u16(
1102// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1103// CHECK:   [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1104// CHECK:   [[VPADAL1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.uaddlp.v4i32.v8i16(<8 x i16> %b)
1105// CHECK:   [[TMP2:%.*]] = add <4 x i32> [[VPADAL1_I]], %a
1106// CHECK:   ret <4 x i32> [[TMP2]]
1107uint32x4_t test_vpadalq_u16(uint32x4_t a, uint16x8_t b) {
1108  return vpadalq_u16(a, b);
1109}
1110
1111// CHECK-LABEL: @test_vpadalq_u32(
1112// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1113// CHECK:   [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1114// CHECK:   [[VPADAL1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.uaddlp.v2i64.v4i32(<4 x i32> %b)
1115// CHECK:   [[TMP2:%.*]] = add <2 x i64> [[VPADAL1_I]], %a
1116// CHECK:   ret <2 x i64> [[TMP2]]
1117uint64x2_t test_vpadalq_u32(uint64x2_t a, uint32x4_t b) {
1118  return vpadalq_u32(a, b);
1119}
1120
1121// CHECK-LABEL: @test_vqabs_s8(
1122// CHECK:   [[VQABS_V_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqabs.v8i8(<8 x i8> %a)
1123// CHECK:   ret <8 x i8> [[VQABS_V_I]]
1124int8x8_t test_vqabs_s8(int8x8_t a) {
1125  return vqabs_s8(a);
1126}
1127
1128// CHECK-LABEL: @test_vqabsq_s8(
1129// CHECK:   [[VQABSQ_V_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.sqabs.v16i8(<16 x i8> %a)
1130// CHECK:   ret <16 x i8> [[VQABSQ_V_I]]
1131int8x16_t test_vqabsq_s8(int8x16_t a) {
1132  return vqabsq_s8(a);
1133}
1134
1135// CHECK-LABEL: @test_vqabs_s16(
1136// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1137// CHECK:   [[VQABS_V1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqabs.v4i16(<4 x i16> %a)
1138// CHECK:   [[VQABS_V2_I:%.*]] = bitcast <4 x i16> [[VQABS_V1_I]] to <8 x i8>
1139// CHECK:   ret <4 x i16> [[VQABS_V1_I]]
1140int16x4_t test_vqabs_s16(int16x4_t a) {
1141  return vqabs_s16(a);
1142}
1143
1144// CHECK-LABEL: @test_vqabsq_s16(
1145// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1146// CHECK:   [[VQABSQ_V1_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.sqabs.v8i16(<8 x i16> %a)
1147// CHECK:   [[VQABSQ_V2_I:%.*]] = bitcast <8 x i16> [[VQABSQ_V1_I]] to <16 x i8>
1148// CHECK:   ret <8 x i16> [[VQABSQ_V1_I]]
1149int16x8_t test_vqabsq_s16(int16x8_t a) {
1150  return vqabsq_s16(a);
1151}
1152
1153// CHECK-LABEL: @test_vqabs_s32(
1154// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1155// CHECK:   [[VQABS_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqabs.v2i32(<2 x i32> %a)
1156// CHECK:   [[VQABS_V2_I:%.*]] = bitcast <2 x i32> [[VQABS_V1_I]] to <8 x i8>
1157// CHECK:   ret <2 x i32> [[VQABS_V1_I]]
1158int32x2_t test_vqabs_s32(int32x2_t a) {
1159  return vqabs_s32(a);
1160}
1161
1162// CHECK-LABEL: @test_vqabsq_s32(
1163// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1164// CHECK:   [[VQABSQ_V1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.sqabs.v4i32(<4 x i32> %a)
1165// CHECK:   [[VQABSQ_V2_I:%.*]] = bitcast <4 x i32> [[VQABSQ_V1_I]] to <16 x i8>
1166// CHECK:   ret <4 x i32> [[VQABSQ_V1_I]]
1167int32x4_t test_vqabsq_s32(int32x4_t a) {
1168  return vqabsq_s32(a);
1169}
1170
1171// CHECK-LABEL: @test_vqabsq_s64(
1172// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1173// CHECK:   [[VQABSQ_V1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.sqabs.v2i64(<2 x i64> %a)
1174// CHECK:   [[VQABSQ_V2_I:%.*]] = bitcast <2 x i64> [[VQABSQ_V1_I]] to <16 x i8>
1175// CHECK:   ret <2 x i64> [[VQABSQ_V1_I]]
1176int64x2_t test_vqabsq_s64(int64x2_t a) {
1177  return vqabsq_s64(a);
1178}
1179
1180// CHECK-LABEL: @test_vqneg_s8(
1181// CHECK:   [[VQNEG_V_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqneg.v8i8(<8 x i8> %a)
1182// CHECK:   ret <8 x i8> [[VQNEG_V_I]]
1183int8x8_t test_vqneg_s8(int8x8_t a) {
1184  return vqneg_s8(a);
1185}
1186
1187// CHECK-LABEL: @test_vqnegq_s8(
1188// CHECK:   [[VQNEGQ_V_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.sqneg.v16i8(<16 x i8> %a)
1189// CHECK:   ret <16 x i8> [[VQNEGQ_V_I]]
1190int8x16_t test_vqnegq_s8(int8x16_t a) {
1191  return vqnegq_s8(a);
1192}
1193
1194// CHECK-LABEL: @test_vqneg_s16(
1195// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1196// CHECK:   [[VQNEG_V1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqneg.v4i16(<4 x i16> %a)
1197// CHECK:   [[VQNEG_V2_I:%.*]] = bitcast <4 x i16> [[VQNEG_V1_I]] to <8 x i8>
1198// CHECK:   ret <4 x i16> [[VQNEG_V1_I]]
1199int16x4_t test_vqneg_s16(int16x4_t a) {
1200  return vqneg_s16(a);
1201}
1202
1203// CHECK-LABEL: @test_vqnegq_s16(
1204// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1205// CHECK:   [[VQNEGQ_V1_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.sqneg.v8i16(<8 x i16> %a)
1206// CHECK:   [[VQNEGQ_V2_I:%.*]] = bitcast <8 x i16> [[VQNEGQ_V1_I]] to <16 x i8>
1207// CHECK:   ret <8 x i16> [[VQNEGQ_V1_I]]
1208int16x8_t test_vqnegq_s16(int16x8_t a) {
1209  return vqnegq_s16(a);
1210}
1211
1212// CHECK-LABEL: @test_vqneg_s32(
1213// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1214// CHECK:   [[VQNEG_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqneg.v2i32(<2 x i32> %a)
1215// CHECK:   [[VQNEG_V2_I:%.*]] = bitcast <2 x i32> [[VQNEG_V1_I]] to <8 x i8>
1216// CHECK:   ret <2 x i32> [[VQNEG_V1_I]]
1217int32x2_t test_vqneg_s32(int32x2_t a) {
1218  return vqneg_s32(a);
1219}
1220
1221// CHECK-LABEL: @test_vqnegq_s32(
1222// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1223// CHECK:   [[VQNEGQ_V1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.sqneg.v4i32(<4 x i32> %a)
1224// CHECK:   [[VQNEGQ_V2_I:%.*]] = bitcast <4 x i32> [[VQNEGQ_V1_I]] to <16 x i8>
1225// CHECK:   ret <4 x i32> [[VQNEGQ_V1_I]]
1226int32x4_t test_vqnegq_s32(int32x4_t a) {
1227  return vqnegq_s32(a);
1228}
1229
1230// CHECK-LABEL: @test_vqnegq_s64(
1231// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1232// CHECK:   [[VQNEGQ_V1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.sqneg.v2i64(<2 x i64> %a)
1233// CHECK:   [[VQNEGQ_V2_I:%.*]] = bitcast <2 x i64> [[VQNEGQ_V1_I]] to <16 x i8>
1234// CHECK:   ret <2 x i64> [[VQNEGQ_V1_I]]
1235int64x2_t test_vqnegq_s64(int64x2_t a) {
1236  return vqnegq_s64(a);
1237}
1238
1239// CHECK-LABEL: @test_vneg_s8(
1240// CHECK:   [[SUB_I:%.*]] = sub <8 x i8> zeroinitializer, %a
1241// CHECK:   ret <8 x i8> [[SUB_I]]
1242int8x8_t test_vneg_s8(int8x8_t a) {
1243  return vneg_s8(a);
1244}
1245
1246// CHECK-LABEL: @test_vnegq_s8(
1247// CHECK:   [[SUB_I:%.*]] = sub <16 x i8> zeroinitializer, %a
1248// CHECK:   ret <16 x i8> [[SUB_I]]
1249int8x16_t test_vnegq_s8(int8x16_t a) {
1250  return vnegq_s8(a);
1251}
1252
1253// CHECK-LABEL: @test_vneg_s16(
1254// CHECK:   [[SUB_I:%.*]] = sub <4 x i16> zeroinitializer, %a
1255// CHECK:   ret <4 x i16> [[SUB_I]]
1256int16x4_t test_vneg_s16(int16x4_t a) {
1257  return vneg_s16(a);
1258}
1259
1260// CHECK-LABEL: @test_vnegq_s16(
1261// CHECK:   [[SUB_I:%.*]] = sub <8 x i16> zeroinitializer, %a
1262// CHECK:   ret <8 x i16> [[SUB_I]]
1263int16x8_t test_vnegq_s16(int16x8_t a) {
1264  return vnegq_s16(a);
1265}
1266
1267// CHECK-LABEL: @test_vneg_s32(
1268// CHECK:   [[SUB_I:%.*]] = sub <2 x i32> zeroinitializer, %a
1269// CHECK:   ret <2 x i32> [[SUB_I]]
1270int32x2_t test_vneg_s32(int32x2_t a) {
1271  return vneg_s32(a);
1272}
1273
1274// CHECK-LABEL: @test_vnegq_s32(
1275// CHECK:   [[SUB_I:%.*]] = sub <4 x i32> zeroinitializer, %a
1276// CHECK:   ret <4 x i32> [[SUB_I]]
1277int32x4_t test_vnegq_s32(int32x4_t a) {
1278  return vnegq_s32(a);
1279}
1280
1281// CHECK-LABEL: @test_vnegq_s64(
1282// CHECK:   [[SUB_I:%.*]] = sub <2 x i64> zeroinitializer, %a
1283// CHECK:   ret <2 x i64> [[SUB_I]]
1284int64x2_t test_vnegq_s64(int64x2_t a) {
1285  return vnegq_s64(a);
1286}
1287
1288// CHECK-LABEL: @test_vneg_f32(
1289// CHECK:   [[SUB_I:%.*]] = fsub <2 x float> <float -0.000000e+00, float -0.000000e+00>, %a
1290// CHECK:   ret <2 x float> [[SUB_I]]
1291float32x2_t test_vneg_f32(float32x2_t a) {
1292  return vneg_f32(a);
1293}
1294
1295// CHECK-LABEL: @test_vnegq_f32(
1296// CHECK:   [[SUB_I:%.*]] = fsub <4 x float> <float -0.000000e+00, float -0.000000e+00, float -0.000000e+00, float -0.000000e+00>, %a
1297// CHECK:   ret <4 x float> [[SUB_I]]
1298float32x4_t test_vnegq_f32(float32x4_t a) {
1299  return vnegq_f32(a);
1300}
1301
1302// CHECK-LABEL: @test_vnegq_f64(
1303// CHECK:   [[SUB_I:%.*]] = fsub <2 x double> <double -0.000000e+00, double -0.000000e+00>, %a
1304// CHECK:   ret <2 x double> [[SUB_I]]
1305float64x2_t test_vnegq_f64(float64x2_t a) {
1306  return vnegq_f64(a);
1307}
1308
1309// CHECK-LABEL: @test_vabs_s8(
1310// CHECK:   [[VABS_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.abs.v8i8(<8 x i8> %a)
1311// CHECK:   ret <8 x i8> [[VABS_I]]
1312int8x8_t test_vabs_s8(int8x8_t a) {
1313  return vabs_s8(a);
1314}
1315
1316// CHECK-LABEL: @test_vabsq_s8(
1317// CHECK:   [[VABS_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.abs.v16i8(<16 x i8> %a)
1318// CHECK:   ret <16 x i8> [[VABS_I]]
1319int8x16_t test_vabsq_s8(int8x16_t a) {
1320  return vabsq_s8(a);
1321}
1322
1323// CHECK-LABEL: @test_vabs_s16(
1324// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1325// CHECK:   [[VABS1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.abs.v4i16(<4 x i16> %a)
1326// CHECK:   ret <4 x i16> [[VABS1_I]]
1327int16x4_t test_vabs_s16(int16x4_t a) {
1328  return vabs_s16(a);
1329}
1330
1331// CHECK-LABEL: @test_vabsq_s16(
1332// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1333// CHECK:   [[VABS1_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.abs.v8i16(<8 x i16> %a)
1334// CHECK:   ret <8 x i16> [[VABS1_I]]
1335int16x8_t test_vabsq_s16(int16x8_t a) {
1336  return vabsq_s16(a);
1337}
1338
1339// CHECK-LABEL: @test_vabs_s32(
1340// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1341// CHECK:   [[VABS1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.abs.v2i32(<2 x i32> %a)
1342// CHECK:   ret <2 x i32> [[VABS1_I]]
1343int32x2_t test_vabs_s32(int32x2_t a) {
1344  return vabs_s32(a);
1345}
1346
1347// CHECK-LABEL: @test_vabsq_s32(
1348// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1349// CHECK:   [[VABS1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.abs.v4i32(<4 x i32> %a)
1350// CHECK:   ret <4 x i32> [[VABS1_I]]
1351int32x4_t test_vabsq_s32(int32x4_t a) {
1352  return vabsq_s32(a);
1353}
1354
1355// CHECK-LABEL: @test_vabsq_s64(
1356// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1357// CHECK:   [[VABS1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.abs.v2i64(<2 x i64> %a)
1358// CHECK:   ret <2 x i64> [[VABS1_I]]
1359int64x2_t test_vabsq_s64(int64x2_t a) {
1360  return vabsq_s64(a);
1361}
1362
1363// CHECK-LABEL: @test_vabs_f32(
1364// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
1365// CHECK:   [[VABS1_I:%.*]] = call <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
1366// CHECK:   ret <2 x float> [[VABS1_I]]
1367float32x2_t test_vabs_f32(float32x2_t a) {
1368  return vabs_f32(a);
1369}
1370
1371// CHECK-LABEL: @test_vabsq_f32(
1372// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
1373// CHECK:   [[VABS1_I:%.*]] = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
1374// CHECK:   ret <4 x float> [[VABS1_I]]
1375float32x4_t test_vabsq_f32(float32x4_t a) {
1376  return vabsq_f32(a);
1377}
1378
1379// CHECK-LABEL: @test_vabsq_f64(
1380// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
1381// CHECK:   [[VABS1_I:%.*]] = call <2 x double> @llvm.fabs.v2f64(<2 x double> %a)
1382// CHECK:   ret <2 x double> [[VABS1_I]]
1383float64x2_t test_vabsq_f64(float64x2_t a) {
1384  return vabsq_f64(a);
1385}
1386
1387// CHECK-LABEL: @test_vuqadd_s8(
1388// CHECK:   [[VUQADD_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.suqadd.v8i8(<8 x i8> %a, <8 x i8> %b)
1389// CHECK:   ret <8 x i8> [[VUQADD_I]]
1390int8x8_t test_vuqadd_s8(int8x8_t a, int8x8_t b) {
1391  return vuqadd_s8(a, b);
1392}
1393
1394// CHECK-LABEL: @test_vuqaddq_s8(
1395// CHECK:   [[VUQADD_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.suqadd.v16i8(<16 x i8> %a, <16 x i8> %b)
1396// CHECK:   ret <16 x i8> [[VUQADD_I]]
1397int8x16_t test_vuqaddq_s8(int8x16_t a, int8x16_t b) {
1398  return vuqaddq_s8(a, b);
1399}
1400
1401// CHECK-LABEL: @test_vuqadd_s16(
1402// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1403// CHECK:   [[TMP1:%.*]] = bitcast <4 x i16> %b to <8 x i8>
1404// CHECK:   [[VUQADD2_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.suqadd.v4i16(<4 x i16> %a, <4 x i16> %b)
1405// CHECK:   ret <4 x i16> [[VUQADD2_I]]
1406int16x4_t test_vuqadd_s16(int16x4_t a, int16x4_t b) {
1407  return vuqadd_s16(a, b);
1408}
1409
1410// CHECK-LABEL: @test_vuqaddq_s16(
1411// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1412// CHECK:   [[TMP1:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1413// CHECK:   [[VUQADD2_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.suqadd.v8i16(<8 x i16> %a, <8 x i16> %b)
1414// CHECK:   ret <8 x i16> [[VUQADD2_I]]
1415int16x8_t test_vuqaddq_s16(int16x8_t a, int16x8_t b) {
1416  return vuqaddq_s16(a, b);
1417}
1418
1419// CHECK-LABEL: @test_vuqadd_s32(
1420// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1421// CHECK:   [[TMP1:%.*]] = bitcast <2 x i32> %b to <8 x i8>
1422// CHECK:   [[VUQADD2_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.suqadd.v2i32(<2 x i32> %a, <2 x i32> %b)
1423// CHECK:   ret <2 x i32> [[VUQADD2_I]]
1424int32x2_t test_vuqadd_s32(int32x2_t a, int32x2_t b) {
1425  return vuqadd_s32(a, b);
1426}
1427
1428// CHECK-LABEL: @test_vuqaddq_s32(
1429// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1430// CHECK:   [[TMP1:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1431// CHECK:   [[VUQADD2_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.suqadd.v4i32(<4 x i32> %a, <4 x i32> %b)
1432// CHECK:   ret <4 x i32> [[VUQADD2_I]]
1433int32x4_t test_vuqaddq_s32(int32x4_t a, int32x4_t b) {
1434  return vuqaddq_s32(a, b);
1435}
1436
1437// CHECK-LABEL: @test_vuqaddq_s64(
1438// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1439// CHECK:   [[TMP1:%.*]] = bitcast <2 x i64> %b to <16 x i8>
1440// CHECK:   [[VUQADD2_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.suqadd.v2i64(<2 x i64> %a, <2 x i64> %b)
1441// CHECK:   ret <2 x i64> [[VUQADD2_I]]
1442int64x2_t test_vuqaddq_s64(int64x2_t a, int64x2_t b) {
1443  return vuqaddq_s64(a, b);
1444}
1445
1446// CHECK-LABEL: @test_vcls_s8(
1447// CHECK:   [[VCLS_V_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.cls.v8i8(<8 x i8> %a)
1448// CHECK:   ret <8 x i8> [[VCLS_V_I]]
1449int8x8_t test_vcls_s8(int8x8_t a) {
1450  return vcls_s8(a);
1451}
1452
1453// CHECK-LABEL: @test_vclsq_s8(
1454// CHECK:   [[VCLSQ_V_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.cls.v16i8(<16 x i8> %a)
1455// CHECK:   ret <16 x i8> [[VCLSQ_V_I]]
1456int8x16_t test_vclsq_s8(int8x16_t a) {
1457  return vclsq_s8(a);
1458}
1459
1460// CHECK-LABEL: @test_vcls_s16(
1461// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1462// CHECK:   [[VCLS_V1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.cls.v4i16(<4 x i16> %a)
1463// CHECK:   [[VCLS_V2_I:%.*]] = bitcast <4 x i16> [[VCLS_V1_I]] to <8 x i8>
1464// CHECK:   ret <4 x i16> [[VCLS_V1_I]]
1465int16x4_t test_vcls_s16(int16x4_t a) {
1466  return vcls_s16(a);
1467}
1468
1469// CHECK-LABEL: @test_vclsq_s16(
1470// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1471// CHECK:   [[VCLSQ_V1_I:%.*]] = call <8 x i16> @llvm.aarch64.neon.cls.v8i16(<8 x i16> %a)
1472// CHECK:   [[VCLSQ_V2_I:%.*]] = bitcast <8 x i16> [[VCLSQ_V1_I]] to <16 x i8>
1473// CHECK:   ret <8 x i16> [[VCLSQ_V1_I]]
1474int16x8_t test_vclsq_s16(int16x8_t a) {
1475  return vclsq_s16(a);
1476}
1477
1478// CHECK-LABEL: @test_vcls_s32(
1479// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1480// CHECK:   [[VCLS_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.cls.v2i32(<2 x i32> %a)
1481// CHECK:   [[VCLS_V2_I:%.*]] = bitcast <2 x i32> [[VCLS_V1_I]] to <8 x i8>
1482// CHECK:   ret <2 x i32> [[VCLS_V1_I]]
1483int32x2_t test_vcls_s32(int32x2_t a) {
1484  return vcls_s32(a);
1485}
1486
1487// CHECK-LABEL: @test_vclsq_s32(
1488// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1489// CHECK:   [[VCLSQ_V1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.cls.v4i32(<4 x i32> %a)
1490// CHECK:   [[VCLSQ_V2_I:%.*]] = bitcast <4 x i32> [[VCLSQ_V1_I]] to <16 x i8>
1491// CHECK:   ret <4 x i32> [[VCLSQ_V1_I]]
1492int32x4_t test_vclsq_s32(int32x4_t a) {
1493  return vclsq_s32(a);
1494}
1495
1496// CHECK-LABEL: @test_vclz_s8(
1497// CHECK:   [[VCLZ_V_I:%.*]] = call <8 x i8> @llvm.ctlz.v8i8(<8 x i8> %a, i1 false)
1498// CHECK:   ret <8 x i8> [[VCLZ_V_I]]
1499int8x8_t test_vclz_s8(int8x8_t a) {
1500  return vclz_s8(a);
1501}
1502
1503// CHECK-LABEL: @test_vclzq_s8(
1504// CHECK:   [[VCLZQ_V_I:%.*]] = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
1505// CHECK:   ret <16 x i8> [[VCLZQ_V_I]]
1506int8x16_t test_vclzq_s8(int8x16_t a) {
1507  return vclzq_s8(a);
1508}
1509
1510// CHECK-LABEL: @test_vclz_s16(
1511// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1512// CHECK:   [[VCLZ_V1_I:%.*]] = call <4 x i16> @llvm.ctlz.v4i16(<4 x i16> %a, i1 false)
1513// CHECK:   [[VCLZ_V2_I:%.*]] = bitcast <4 x i16> [[VCLZ_V1_I]] to <8 x i8>
1514// CHECK:   ret <4 x i16> [[VCLZ_V1_I]]
1515int16x4_t test_vclz_s16(int16x4_t a) {
1516  return vclz_s16(a);
1517}
1518
1519// CHECK-LABEL: @test_vclzq_s16(
1520// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1521// CHECK:   [[VCLZQ_V1_I:%.*]] = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
1522// CHECK:   [[VCLZQ_V2_I:%.*]] = bitcast <8 x i16> [[VCLZQ_V1_I]] to <16 x i8>
1523// CHECK:   ret <8 x i16> [[VCLZQ_V1_I]]
1524int16x8_t test_vclzq_s16(int16x8_t a) {
1525  return vclzq_s16(a);
1526}
1527
1528// CHECK-LABEL: @test_vclz_s32(
1529// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1530// CHECK:   [[VCLZ_V1_I:%.*]] = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> %a, i1 false)
1531// CHECK:   [[VCLZ_V2_I:%.*]] = bitcast <2 x i32> [[VCLZ_V1_I]] to <8 x i8>
1532// CHECK:   ret <2 x i32> [[VCLZ_V1_I]]
1533int32x2_t test_vclz_s32(int32x2_t a) {
1534  return vclz_s32(a);
1535}
1536
1537// CHECK-LABEL: @test_vclzq_s32(
1538// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1539// CHECK:   [[VCLZQ_V1_I:%.*]] = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
1540// CHECK:   [[VCLZQ_V2_I:%.*]] = bitcast <4 x i32> [[VCLZQ_V1_I]] to <16 x i8>
1541// CHECK:   ret <4 x i32> [[VCLZQ_V1_I]]
1542int32x4_t test_vclzq_s32(int32x4_t a) {
1543  return vclzq_s32(a);
1544}
1545
1546// CHECK-LABEL: @test_vclz_u8(
1547// CHECK:   [[VCLZ_V_I:%.*]] = call <8 x i8> @llvm.ctlz.v8i8(<8 x i8> %a, i1 false)
1548// CHECK:   ret <8 x i8> [[VCLZ_V_I]]
1549uint8x8_t test_vclz_u8(uint8x8_t a) {
1550  return vclz_u8(a);
1551}
1552
1553// CHECK-LABEL: @test_vclzq_u8(
1554// CHECK:   [[VCLZQ_V_I:%.*]] = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
1555// CHECK:   ret <16 x i8> [[VCLZQ_V_I]]
1556uint8x16_t test_vclzq_u8(uint8x16_t a) {
1557  return vclzq_u8(a);
1558}
1559
1560// CHECK-LABEL: @test_vclz_u16(
1561// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
1562// CHECK:   [[VCLZ_V1_I:%.*]] = call <4 x i16> @llvm.ctlz.v4i16(<4 x i16> %a, i1 false)
1563// CHECK:   [[VCLZ_V2_I:%.*]] = bitcast <4 x i16> [[VCLZ_V1_I]] to <8 x i8>
1564// CHECK:   ret <4 x i16> [[VCLZ_V1_I]]
1565uint16x4_t test_vclz_u16(uint16x4_t a) {
1566  return vclz_u16(a);
1567}
1568
1569// CHECK-LABEL: @test_vclzq_u16(
1570// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1571// CHECK:   [[VCLZQ_V1_I:%.*]] = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
1572// CHECK:   [[VCLZQ_V2_I:%.*]] = bitcast <8 x i16> [[VCLZQ_V1_I]] to <16 x i8>
1573// CHECK:   ret <8 x i16> [[VCLZQ_V1_I]]
1574uint16x8_t test_vclzq_u16(uint16x8_t a) {
1575  return vclzq_u16(a);
1576}
1577
1578// CHECK-LABEL: @test_vclz_u32(
1579// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
1580// CHECK:   [[VCLZ_V1_I:%.*]] = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> %a, i1 false)
1581// CHECK:   [[VCLZ_V2_I:%.*]] = bitcast <2 x i32> [[VCLZ_V1_I]] to <8 x i8>
1582// CHECK:   ret <2 x i32> [[VCLZ_V1_I]]
1583uint32x2_t test_vclz_u32(uint32x2_t a) {
1584  return vclz_u32(a);
1585}
1586
1587// CHECK-LABEL: @test_vclzq_u32(
1588// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1589// CHECK:   [[VCLZQ_V1_I:%.*]] = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
1590// CHECK:   [[VCLZQ_V2_I:%.*]] = bitcast <4 x i32> [[VCLZQ_V1_I]] to <16 x i8>
1591// CHECK:   ret <4 x i32> [[VCLZQ_V1_I]]
1592uint32x4_t test_vclzq_u32(uint32x4_t a) {
1593  return vclzq_u32(a);
1594}
1595
1596// CHECK-LABEL: @test_vcnt_s8(
1597// CHECK:   [[VCNT_V_I:%.*]] = call <8 x i8> @llvm.ctpop.v8i8(<8 x i8> %a)
1598// CHECK:   ret <8 x i8> [[VCNT_V_I]]
1599int8x8_t test_vcnt_s8(int8x8_t a) {
1600  return vcnt_s8(a);
1601}
1602
1603// CHECK-LABEL: @test_vcntq_s8(
1604// CHECK:   [[VCNTQ_V_I:%.*]] = call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> %a)
1605// CHECK:   ret <16 x i8> [[VCNTQ_V_I]]
1606int8x16_t test_vcntq_s8(int8x16_t a) {
1607  return vcntq_s8(a);
1608}
1609
1610// CHECK-LABEL: @test_vcnt_u8(
1611// CHECK:   [[VCNT_V_I:%.*]] = call <8 x i8> @llvm.ctpop.v8i8(<8 x i8> %a)
1612// CHECK:   ret <8 x i8> [[VCNT_V_I]]
1613uint8x8_t test_vcnt_u8(uint8x8_t a) {
1614  return vcnt_u8(a);
1615}
1616
1617// CHECK-LABEL: @test_vcntq_u8(
1618// CHECK:   [[VCNTQ_V_I:%.*]] = call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> %a)
1619// CHECK:   ret <16 x i8> [[VCNTQ_V_I]]
1620uint8x16_t test_vcntq_u8(uint8x16_t a) {
1621  return vcntq_u8(a);
1622}
1623
1624// CHECK-LABEL: @test_vcnt_p8(
1625// CHECK:   [[VCNT_V_I:%.*]] = call <8 x i8> @llvm.ctpop.v8i8(<8 x i8> %a)
1626// CHECK:   ret <8 x i8> [[VCNT_V_I]]
1627poly8x8_t test_vcnt_p8(poly8x8_t a) {
1628  return vcnt_p8(a);
1629}
1630
1631// CHECK-LABEL: @test_vcntq_p8(
1632// CHECK:   [[VCNTQ_V_I:%.*]] = call <16 x i8> @llvm.ctpop.v16i8(<16 x i8> %a)
1633// CHECK:   ret <16 x i8> [[VCNTQ_V_I]]
1634poly8x16_t test_vcntq_p8(poly8x16_t a) {
1635  return vcntq_p8(a);
1636}
1637
1638// CHECK-LABEL: @test_vmvn_s8(
1639// CHECK:   [[NEG_I:%.*]] = xor <8 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1640// CHECK:   ret <8 x i8> [[NEG_I]]
1641int8x8_t test_vmvn_s8(int8x8_t a) {
1642  return vmvn_s8(a);
1643}
1644
1645// CHECK-LABEL: @test_vmvnq_s8(
1646// CHECK:   [[NEG_I:%.*]] = xor <16 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1647// CHECK:   ret <16 x i8> [[NEG_I]]
1648int8x16_t test_vmvnq_s8(int8x16_t a) {
1649  return vmvnq_s8(a);
1650}
1651
1652// CHECK-LABEL: @test_vmvn_s16(
1653// CHECK:   [[NEG_I:%.*]] = xor <4 x i16> %a, <i16 -1, i16 -1, i16 -1, i16 -1>
1654// CHECK:   ret <4 x i16> [[NEG_I]]
1655int16x4_t test_vmvn_s16(int16x4_t a) {
1656  return vmvn_s16(a);
1657}
1658
1659// CHECK-LABEL: @test_vmvnq_s16(
1660// CHECK:   [[NEG_I:%.*]] = xor <8 x i16> %a, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
1661// CHECK:   ret <8 x i16> [[NEG_I]]
1662int16x8_t test_vmvnq_s16(int16x8_t a) {
1663  return vmvnq_s16(a);
1664}
1665
1666// CHECK-LABEL: @test_vmvn_s32(
1667// CHECK:   [[NEG_I:%.*]] = xor <2 x i32> %a, <i32 -1, i32 -1>
1668// CHECK:   ret <2 x i32> [[NEG_I]]
1669int32x2_t test_vmvn_s32(int32x2_t a) {
1670  return vmvn_s32(a);
1671}
1672
1673// CHECK-LABEL: @test_vmvnq_s32(
1674// CHECK:   [[NEG_I:%.*]] = xor <4 x i32> %a, <i32 -1, i32 -1, i32 -1, i32 -1>
1675// CHECK:   ret <4 x i32> [[NEG_I]]
1676int32x4_t test_vmvnq_s32(int32x4_t a) {
1677  return vmvnq_s32(a);
1678}
1679
1680// CHECK-LABEL: @test_vmvn_u8(
1681// CHECK:   [[NEG_I:%.*]] = xor <8 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1682// CHECK:   ret <8 x i8> [[NEG_I]]
1683uint8x8_t test_vmvn_u8(uint8x8_t a) {
1684  return vmvn_u8(a);
1685}
1686
1687// CHECK-LABEL: @test_vmvnq_u8(
1688// CHECK:   [[NEG_I:%.*]] = xor <16 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1689// CHECK:   ret <16 x i8> [[NEG_I]]
1690uint8x16_t test_vmvnq_u8(uint8x16_t a) {
1691  return vmvnq_u8(a);
1692}
1693
1694// CHECK-LABEL: @test_vmvn_u16(
1695// CHECK:   [[NEG_I:%.*]] = xor <4 x i16> %a, <i16 -1, i16 -1, i16 -1, i16 -1>
1696// CHECK:   ret <4 x i16> [[NEG_I]]
1697uint16x4_t test_vmvn_u16(uint16x4_t a) {
1698  return vmvn_u16(a);
1699}
1700
1701// CHECK-LABEL: @test_vmvnq_u16(
1702// CHECK:   [[NEG_I:%.*]] = xor <8 x i16> %a, <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>
1703// CHECK:   ret <8 x i16> [[NEG_I]]
1704uint16x8_t test_vmvnq_u16(uint16x8_t a) {
1705  return vmvnq_u16(a);
1706}
1707
1708// CHECK-LABEL: @test_vmvn_u32(
1709// CHECK:   [[NEG_I:%.*]] = xor <2 x i32> %a, <i32 -1, i32 -1>
1710// CHECK:   ret <2 x i32> [[NEG_I]]
1711uint32x2_t test_vmvn_u32(uint32x2_t a) {
1712  return vmvn_u32(a);
1713}
1714
1715// CHECK-LABEL: @test_vmvnq_u32(
1716// CHECK:   [[NEG_I:%.*]] = xor <4 x i32> %a, <i32 -1, i32 -1, i32 -1, i32 -1>
1717// CHECK:   ret <4 x i32> [[NEG_I]]
1718uint32x4_t test_vmvnq_u32(uint32x4_t a) {
1719  return vmvnq_u32(a);
1720}
1721
1722// CHECK-LABEL: @test_vmvn_p8(
1723// CHECK:   [[NEG_I:%.*]] = xor <8 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1724// CHECK:   ret <8 x i8> [[NEG_I]]
1725poly8x8_t test_vmvn_p8(poly8x8_t a) {
1726  return vmvn_p8(a);
1727}
1728
1729// CHECK-LABEL: @test_vmvnq_p8(
1730// CHECK:   [[NEG_I:%.*]] = xor <16 x i8> %a, <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>
1731// CHECK:   ret <16 x i8> [[NEG_I]]
1732poly8x16_t test_vmvnq_p8(poly8x16_t a) {
1733  return vmvnq_p8(a);
1734}
1735
1736// CHECK-LABEL: @test_vrbit_s8(
1737// CHECK:   [[VRBIT_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.rbit.v8i8(<8 x i8> %a)
1738// CHECK:   ret <8 x i8> [[VRBIT_I]]
1739int8x8_t test_vrbit_s8(int8x8_t a) {
1740  return vrbit_s8(a);
1741}
1742
1743// CHECK-LABEL: @test_vrbitq_s8(
1744// CHECK:   [[VRBIT_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.rbit.v16i8(<16 x i8> %a)
1745// CHECK:   ret <16 x i8> [[VRBIT_I]]
1746int8x16_t test_vrbitq_s8(int8x16_t a) {
1747  return vrbitq_s8(a);
1748}
1749
1750// CHECK-LABEL: @test_vrbit_u8(
1751// CHECK:   [[VRBIT_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.rbit.v8i8(<8 x i8> %a)
1752// CHECK:   ret <8 x i8> [[VRBIT_I]]
1753uint8x8_t test_vrbit_u8(uint8x8_t a) {
1754  return vrbit_u8(a);
1755}
1756
1757// CHECK-LABEL: @test_vrbitq_u8(
1758// CHECK:   [[VRBIT_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.rbit.v16i8(<16 x i8> %a)
1759// CHECK:   ret <16 x i8> [[VRBIT_I]]
1760uint8x16_t test_vrbitq_u8(uint8x16_t a) {
1761  return vrbitq_u8(a);
1762}
1763
1764// CHECK-LABEL: @test_vrbit_p8(
1765// CHECK:   [[VRBIT_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.rbit.v8i8(<8 x i8> %a)
1766// CHECK:   ret <8 x i8> [[VRBIT_I]]
1767poly8x8_t test_vrbit_p8(poly8x8_t a) {
1768  return vrbit_p8(a);
1769}
1770
1771// CHECK-LABEL: @test_vrbitq_p8(
1772// CHECK:   [[VRBIT_I:%.*]] = call <16 x i8> @llvm.aarch64.neon.rbit.v16i8(<16 x i8> %a)
1773// CHECK:   ret <16 x i8> [[VRBIT_I]]
1774poly8x16_t test_vrbitq_p8(poly8x16_t a) {
1775  return vrbitq_p8(a);
1776}
1777
1778// CHECK-LABEL: @test_vmovn_s16(
1779// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1780// CHECK:   [[VMOVN_I:%.*]] = trunc <8 x i16> %a to <8 x i8>
1781// CHECK:   ret <8 x i8> [[VMOVN_I]]
1782int8x8_t test_vmovn_s16(int16x8_t a) {
1783  return vmovn_s16(a);
1784}
1785
1786// CHECK-LABEL: @test_vmovn_s32(
1787// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1788// CHECK:   [[VMOVN_I:%.*]] = trunc <4 x i32> %a to <4 x i16>
1789// CHECK:   ret <4 x i16> [[VMOVN_I]]
1790int16x4_t test_vmovn_s32(int32x4_t a) {
1791  return vmovn_s32(a);
1792}
1793
1794// CHECK-LABEL: @test_vmovn_s64(
1795// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1796// CHECK:   [[VMOVN_I:%.*]] = trunc <2 x i64> %a to <2 x i32>
1797// CHECK:   ret <2 x i32> [[VMOVN_I]]
1798int32x2_t test_vmovn_s64(int64x2_t a) {
1799  return vmovn_s64(a);
1800}
1801
1802// CHECK-LABEL: @test_vmovn_u16(
1803// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1804// CHECK:   [[VMOVN_I:%.*]] = trunc <8 x i16> %a to <8 x i8>
1805// CHECK:   ret <8 x i8> [[VMOVN_I]]
1806uint8x8_t test_vmovn_u16(uint16x8_t a) {
1807  return vmovn_u16(a);
1808}
1809
1810// CHECK-LABEL: @test_vmovn_u32(
1811// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1812// CHECK:   [[VMOVN_I:%.*]] = trunc <4 x i32> %a to <4 x i16>
1813// CHECK:   ret <4 x i16> [[VMOVN_I]]
1814uint16x4_t test_vmovn_u32(uint32x4_t a) {
1815  return vmovn_u32(a);
1816}
1817
1818// CHECK-LABEL: @test_vmovn_u64(
1819// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1820// CHECK:   [[VMOVN_I:%.*]] = trunc <2 x i64> %a to <2 x i32>
1821// CHECK:   ret <2 x i32> [[VMOVN_I]]
1822uint32x2_t test_vmovn_u64(uint64x2_t a) {
1823  return vmovn_u64(a);
1824}
1825
1826// CHECK-LABEL: @test_vmovn_high_s16(
1827// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1828// CHECK:   [[VMOVN_I_I:%.*]] = trunc <8 x i16> %b to <8 x i8>
1829// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> [[VMOVN_I_I]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
1830// CHECK:   ret <16 x i8> [[SHUFFLE_I_I]]
1831int8x16_t test_vmovn_high_s16(int8x8_t a, int16x8_t b) {
1832  return vmovn_high_s16(a, b);
1833}
1834
1835// CHECK-LABEL: @test_vmovn_high_s32(
1836// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1837// CHECK:   [[VMOVN_I_I:%.*]] = trunc <4 x i32> %b to <4 x i16>
1838// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> [[VMOVN_I_I]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1839// CHECK:   ret <8 x i16> [[SHUFFLE_I_I]]
1840int16x8_t test_vmovn_high_s32(int16x4_t a, int32x4_t b) {
1841  return vmovn_high_s32(a, b);
1842}
1843
1844// CHECK-LABEL: @test_vmovn_high_s64(
1845// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %b to <16 x i8>
1846// CHECK:   [[VMOVN_I_I:%.*]] = trunc <2 x i64> %b to <2 x i32>
1847// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> [[VMOVN_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1848// CHECK:   ret <4 x i32> [[SHUFFLE_I_I]]
1849int32x4_t test_vmovn_high_s64(int32x2_t a, int64x2_t b) {
1850  return vmovn_high_s64(a, b);
1851}
1852
1853// CHECK-LABEL: @test_vmovn_high_u16(
1854// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1855// CHECK:   [[VMOVN_I_I:%.*]] = trunc <8 x i16> %b to <8 x i8>
1856// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> [[VMOVN_I_I]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
1857// CHECK:   ret <16 x i8> [[SHUFFLE_I_I]]
1858int8x16_t test_vmovn_high_u16(int8x8_t a, int16x8_t b) {
1859  return vmovn_high_u16(a, b);
1860}
1861
1862// CHECK-LABEL: @test_vmovn_high_u32(
1863// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1864// CHECK:   [[VMOVN_I_I:%.*]] = trunc <4 x i32> %b to <4 x i16>
1865// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> [[VMOVN_I_I]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1866// CHECK:   ret <8 x i16> [[SHUFFLE_I_I]]
1867int16x8_t test_vmovn_high_u32(int16x4_t a, int32x4_t b) {
1868  return vmovn_high_u32(a, b);
1869}
1870
1871// CHECK-LABEL: @test_vmovn_high_u64(
1872// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %b to <16 x i8>
1873// CHECK:   [[VMOVN_I_I:%.*]] = trunc <2 x i64> %b to <2 x i32>
1874// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> [[VMOVN_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1875// CHECK:   ret <4 x i32> [[SHUFFLE_I_I]]
1876int32x4_t test_vmovn_high_u64(int32x2_t a, int64x2_t b) {
1877  return vmovn_high_u64(a, b);
1878}
1879
1880// CHECK-LABEL: @test_vqmovun_s16(
1881// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1882// CHECK:   [[VQMOVUN_V1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqxtun.v8i8(<8 x i16> %a)
1883// CHECK:   ret <8 x i8> [[VQMOVUN_V1_I]]
1884int8x8_t test_vqmovun_s16(int16x8_t a) {
1885  return vqmovun_s16(a);
1886}
1887
1888// CHECK-LABEL: @test_vqmovun_s32(
1889// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1890// CHECK:   [[VQMOVUN_V1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqxtun.v4i16(<4 x i32> %a)
1891// CHECK:   [[VQMOVUN_V2_I:%.*]] = bitcast <4 x i16> [[VQMOVUN_V1_I]] to <8 x i8>
1892// CHECK:   ret <4 x i16> [[VQMOVUN_V1_I]]
1893int16x4_t test_vqmovun_s32(int32x4_t a) {
1894  return vqmovun_s32(a);
1895}
1896
1897// CHECK-LABEL: @test_vqmovun_s64(
1898// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1899// CHECK:   [[VQMOVUN_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqxtun.v2i32(<2 x i64> %a)
1900// CHECK:   [[VQMOVUN_V2_I:%.*]] = bitcast <2 x i32> [[VQMOVUN_V1_I]] to <8 x i8>
1901// CHECK:   ret <2 x i32> [[VQMOVUN_V1_I]]
1902int32x2_t test_vqmovun_s64(int64x2_t a) {
1903  return vqmovun_s64(a);
1904}
1905
1906// CHECK-LABEL: @test_vqmovun_high_s16(
1907// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1908// CHECK:   [[VQMOVUN_V1_I_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqxtun.v8i8(<8 x i16> %b)
1909// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> [[VQMOVUN_V1_I_I]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
1910// CHECK:   ret <16 x i8> [[SHUFFLE_I_I]]
1911int8x16_t test_vqmovun_high_s16(int8x8_t a, int16x8_t b) {
1912  return vqmovun_high_s16(a, b);
1913}
1914
1915// CHECK-LABEL: @test_vqmovun_high_s32(
1916// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1917// CHECK:   [[VQMOVUN_V1_I_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqxtun.v4i16(<4 x i32> %b)
1918// CHECK:   [[VQMOVUN_V2_I_I:%.*]] = bitcast <4 x i16> [[VQMOVUN_V1_I_I]] to <8 x i8>
1919// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> [[VQMOVUN_V1_I_I]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1920// CHECK:   ret <8 x i16> [[SHUFFLE_I_I]]
1921int16x8_t test_vqmovun_high_s32(int16x4_t a, int32x4_t b) {
1922  return vqmovun_high_s32(a, b);
1923}
1924
1925// CHECK-LABEL: @test_vqmovun_high_s64(
1926// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %b to <16 x i8>
1927// CHECK:   [[VQMOVUN_V1_I_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqxtun.v2i32(<2 x i64> %b)
1928// CHECK:   [[VQMOVUN_V2_I_I:%.*]] = bitcast <2 x i32> [[VQMOVUN_V1_I_I]] to <8 x i8>
1929// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> [[VQMOVUN_V1_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1930// CHECK:   ret <4 x i32> [[SHUFFLE_I_I]]
1931int32x4_t test_vqmovun_high_s64(int32x2_t a, int64x2_t b) {
1932  return vqmovun_high_s64(a, b);
1933}
1934
1935// CHECK-LABEL: @test_vqmovn_s16(
1936// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1937// CHECK:   [[VQMOVN_V1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqxtn.v8i8(<8 x i16> %a)
1938// CHECK:   ret <8 x i8> [[VQMOVN_V1_I]]
1939int8x8_t test_vqmovn_s16(int16x8_t a) {
1940  return vqmovn_s16(a);
1941}
1942
1943// CHECK-LABEL: @test_vqmovn_s32(
1944// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
1945// CHECK:   [[VQMOVN_V1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqxtn.v4i16(<4 x i32> %a)
1946// CHECK:   [[VQMOVN_V2_I:%.*]] = bitcast <4 x i16> [[VQMOVN_V1_I]] to <8 x i8>
1947// CHECK:   ret <4 x i16> [[VQMOVN_V1_I]]
1948int16x4_t test_vqmovn_s32(int32x4_t a) {
1949  return vqmovn_s32(a);
1950}
1951
1952// CHECK-LABEL: @test_vqmovn_s64(
1953// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
1954// CHECK:   [[VQMOVN_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqxtn.v2i32(<2 x i64> %a)
1955// CHECK:   [[VQMOVN_V2_I:%.*]] = bitcast <2 x i32> [[VQMOVN_V1_I]] to <8 x i8>
1956// CHECK:   ret <2 x i32> [[VQMOVN_V1_I]]
1957int32x2_t test_vqmovn_s64(int64x2_t a) {
1958  return vqmovn_s64(a);
1959}
1960
1961// CHECK-LABEL: @test_vqmovn_high_s16(
1962// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %b to <16 x i8>
1963// CHECK:   [[VQMOVN_V1_I_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.sqxtn.v8i8(<8 x i16> %b)
1964// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> [[VQMOVN_V1_I_I]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
1965// CHECK:   ret <16 x i8> [[SHUFFLE_I_I]]
1966int8x16_t test_vqmovn_high_s16(int8x8_t a, int16x8_t b) {
1967  return vqmovn_high_s16(a, b);
1968}
1969
1970// CHECK-LABEL: @test_vqmovn_high_s32(
1971// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %b to <16 x i8>
1972// CHECK:   [[VQMOVN_V1_I_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.sqxtn.v4i16(<4 x i32> %b)
1973// CHECK:   [[VQMOVN_V2_I_I:%.*]] = bitcast <4 x i16> [[VQMOVN_V1_I_I]] to <8 x i8>
1974// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> [[VQMOVN_V1_I_I]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
1975// CHECK:   ret <8 x i16> [[SHUFFLE_I_I]]
1976int16x8_t test_vqmovn_high_s32(int16x4_t a, int32x4_t b) {
1977  return vqmovn_high_s32(a, b);
1978}
1979
1980// CHECK-LABEL: @test_vqmovn_high_s64(
1981// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %b to <16 x i8>
1982// CHECK:   [[VQMOVN_V1_I_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.sqxtn.v2i32(<2 x i64> %b)
1983// CHECK:   [[VQMOVN_V2_I_I:%.*]] = bitcast <2 x i32> [[VQMOVN_V1_I_I]] to <8 x i8>
1984// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> [[VQMOVN_V1_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1985// CHECK:   ret <4 x i32> [[SHUFFLE_I_I]]
1986int32x4_t test_vqmovn_high_s64(int32x2_t a, int64x2_t b) {
1987  return vqmovn_high_s64(a, b);
1988}
1989
1990// CHECK-LABEL: @test_vqmovn_u16(
1991// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %a to <16 x i8>
1992// CHECK:   [[VQMOVN_V1_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.uqxtn.v8i8(<8 x i16> %a)
1993// CHECK:   ret <8 x i8> [[VQMOVN_V1_I]]
1994uint8x8_t test_vqmovn_u16(uint16x8_t a) {
1995  return vqmovn_u16(a);
1996}
1997
1998// CHECK-LABEL: @test_vqmovn_u32(
1999// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
2000// CHECK:   [[VQMOVN_V1_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.uqxtn.v4i16(<4 x i32> %a)
2001// CHECK:   [[VQMOVN_V2_I:%.*]] = bitcast <4 x i16> [[VQMOVN_V1_I]] to <8 x i8>
2002// CHECK:   ret <4 x i16> [[VQMOVN_V1_I]]
2003uint16x4_t test_vqmovn_u32(uint32x4_t a) {
2004  return vqmovn_u32(a);
2005}
2006
2007// CHECK-LABEL: @test_vqmovn_u64(
2008// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
2009// CHECK:   [[VQMOVN_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.uqxtn.v2i32(<2 x i64> %a)
2010// CHECK:   [[VQMOVN_V2_I:%.*]] = bitcast <2 x i32> [[VQMOVN_V1_I]] to <8 x i8>
2011// CHECK:   ret <2 x i32> [[VQMOVN_V1_I]]
2012uint32x2_t test_vqmovn_u64(uint64x2_t a) {
2013  return vqmovn_u64(a);
2014}
2015
2016// CHECK-LABEL: @test_vqmovn_high_u16(
2017// CHECK:   [[TMP0:%.*]] = bitcast <8 x i16> %b to <16 x i8>
2018// CHECK:   [[VQMOVN_V1_I_I:%.*]] = call <8 x i8> @llvm.aarch64.neon.uqxtn.v8i8(<8 x i16> %b)
2019// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <8 x i8> %a, <8 x i8> [[VQMOVN_V1_I_I]], <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
2020// CHECK:   ret <16 x i8> [[SHUFFLE_I_I]]
2021uint8x16_t test_vqmovn_high_u16(uint8x8_t a, uint16x8_t b) {
2022  return vqmovn_high_u16(a, b);
2023}
2024
2025// CHECK-LABEL: @test_vqmovn_high_u32(
2026// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %b to <16 x i8>
2027// CHECK:   [[VQMOVN_V1_I_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.uqxtn.v4i16(<4 x i32> %b)
2028// CHECK:   [[VQMOVN_V2_I_I:%.*]] = bitcast <4 x i16> [[VQMOVN_V1_I_I]] to <8 x i8>
2029// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x i16> %a, <4 x i16> [[VQMOVN_V1_I_I]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2030// CHECK:   ret <8 x i16> [[SHUFFLE_I_I]]
2031uint16x8_t test_vqmovn_high_u32(uint16x4_t a, uint32x4_t b) {
2032  return vqmovn_high_u32(a, b);
2033}
2034
2035// CHECK-LABEL: @test_vqmovn_high_u64(
2036// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %b to <16 x i8>
2037// CHECK:   [[VQMOVN_V1_I_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.uqxtn.v2i32(<2 x i64> %b)
2038// CHECK:   [[VQMOVN_V2_I_I:%.*]] = bitcast <2 x i32> [[VQMOVN_V1_I_I]] to <8 x i8>
2039// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x i32> %a, <2 x i32> [[VQMOVN_V1_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2040// CHECK:   ret <4 x i32> [[SHUFFLE_I_I]]
2041uint32x4_t test_vqmovn_high_u64(uint32x2_t a, uint64x2_t b) {
2042  return vqmovn_high_u64(a, b);
2043}
2044
2045// CHECK-LABEL: @test_vshll_n_s8(
2046// CHECK:   [[TMP0:%.*]] = sext <8 x i8> %a to <8 x i16>
2047// CHECK:   [[VSHLL_N:%.*]] = shl <8 x i16> [[TMP0]], <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2048// CHECK:   ret <8 x i16> [[VSHLL_N]]
2049int16x8_t test_vshll_n_s8(int8x8_t a) {
2050  return vshll_n_s8(a, 8);
2051}
2052
2053// CHECK-LABEL: @test_vshll_n_s16(
2054// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
2055// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>
2056// CHECK:   [[TMP2:%.*]] = sext <4 x i16> [[TMP1]] to <4 x i32>
2057// CHECK:   [[VSHLL_N:%.*]] = shl <4 x i32> [[TMP2]], <i32 16, i32 16, i32 16, i32 16>
2058// CHECK:   ret <4 x i32> [[VSHLL_N]]
2059int32x4_t test_vshll_n_s16(int16x4_t a) {
2060  return vshll_n_s16(a, 16);
2061}
2062
2063// CHECK-LABEL: @test_vshll_n_s32(
2064// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
2065// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32>
2066// CHECK:   [[TMP2:%.*]] = sext <2 x i32> [[TMP1]] to <2 x i64>
2067// CHECK:   [[VSHLL_N:%.*]] = shl <2 x i64> [[TMP2]], <i64 32, i64 32>
2068// CHECK:   ret <2 x i64> [[VSHLL_N]]
2069int64x2_t test_vshll_n_s32(int32x2_t a) {
2070  return vshll_n_s32(a, 32);
2071}
2072
2073// CHECK-LABEL: @test_vshll_n_u8(
2074// CHECK:   [[TMP0:%.*]] = zext <8 x i8> %a to <8 x i16>
2075// CHECK:   [[VSHLL_N:%.*]] = shl <8 x i16> [[TMP0]], <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2076// CHECK:   ret <8 x i16> [[VSHLL_N]]
2077uint16x8_t test_vshll_n_u8(uint8x8_t a) {
2078  return vshll_n_u8(a, 8);
2079}
2080
2081// CHECK-LABEL: @test_vshll_n_u16(
2082// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> %a to <8 x i8>
2083// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>
2084// CHECK:   [[TMP2:%.*]] = zext <4 x i16> [[TMP1]] to <4 x i32>
2085// CHECK:   [[VSHLL_N:%.*]] = shl <4 x i32> [[TMP2]], <i32 16, i32 16, i32 16, i32 16>
2086// CHECK:   ret <4 x i32> [[VSHLL_N]]
2087uint32x4_t test_vshll_n_u16(uint16x4_t a) {
2088  return vshll_n_u16(a, 16);
2089}
2090
2091// CHECK-LABEL: @test_vshll_n_u32(
2092// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
2093// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32>
2094// CHECK:   [[TMP2:%.*]] = zext <2 x i32> [[TMP1]] to <2 x i64>
2095// CHECK:   [[VSHLL_N:%.*]] = shl <2 x i64> [[TMP2]], <i64 32, i64 32>
2096// CHECK:   ret <2 x i64> [[VSHLL_N]]
2097uint64x2_t test_vshll_n_u32(uint32x2_t a) {
2098  return vshll_n_u32(a, 32);
2099}
2100
2101// CHECK-LABEL: @test_vshll_high_n_s8(
2102// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
2103// CHECK:   [[TMP0:%.*]] = sext <8 x i8> [[SHUFFLE_I]] to <8 x i16>
2104// CHECK:   [[VSHLL_N:%.*]] = shl <8 x i16> [[TMP0]], <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2105// CHECK:   ret <8 x i16> [[VSHLL_N]]
2106int16x8_t test_vshll_high_n_s8(int8x16_t a) {
2107  return vshll_high_n_s8(a, 8);
2108}
2109
2110// CHECK-LABEL: @test_vshll_high_n_s16(
2111// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
2112// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> [[SHUFFLE_I]] to <8 x i8>
2113// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>
2114// CHECK:   [[TMP2:%.*]] = sext <4 x i16> [[TMP1]] to <4 x i32>
2115// CHECK:   [[VSHLL_N:%.*]] = shl <4 x i32> [[TMP2]], <i32 16, i32 16, i32 16, i32 16>
2116// CHECK:   ret <4 x i32> [[VSHLL_N]]
2117int32x4_t test_vshll_high_n_s16(int16x8_t a) {
2118  return vshll_high_n_s16(a, 16);
2119}
2120
2121// CHECK-LABEL: @test_vshll_high_n_s32(
2122// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 2, i32 3>
2123// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> [[SHUFFLE_I]] to <8 x i8>
2124// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32>
2125// CHECK:   [[TMP2:%.*]] = sext <2 x i32> [[TMP1]] to <2 x i64>
2126// CHECK:   [[VSHLL_N:%.*]] = shl <2 x i64> [[TMP2]], <i64 32, i64 32>
2127// CHECK:   ret <2 x i64> [[VSHLL_N]]
2128int64x2_t test_vshll_high_n_s32(int32x4_t a) {
2129  return vshll_high_n_s32(a, 32);
2130}
2131
2132// CHECK-LABEL: @test_vshll_high_n_u8(
2133// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <16 x i8> %a, <16 x i8> %a, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
2134// CHECK:   [[TMP0:%.*]] = zext <8 x i8> [[SHUFFLE_I]] to <8 x i16>
2135// CHECK:   [[VSHLL_N:%.*]] = shl <8 x i16> [[TMP0]], <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2136// CHECK:   ret <8 x i16> [[VSHLL_N]]
2137uint16x8_t test_vshll_high_n_u8(uint8x16_t a) {
2138  return vshll_high_n_u8(a, 8);
2139}
2140
2141// CHECK-LABEL: @test_vshll_high_n_u16(
2142// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <8 x i16> %a, <8 x i16> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
2143// CHECK:   [[TMP0:%.*]] = bitcast <4 x i16> [[SHUFFLE_I]] to <8 x i8>
2144// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>
2145// CHECK:   [[TMP2:%.*]] = zext <4 x i16> [[TMP1]] to <4 x i32>
2146// CHECK:   [[VSHLL_N:%.*]] = shl <4 x i32> [[TMP2]], <i32 16, i32 16, i32 16, i32 16>
2147// CHECK:   ret <4 x i32> [[VSHLL_N]]
2148uint32x4_t test_vshll_high_n_u16(uint16x8_t a) {
2149  return vshll_high_n_u16(a, 16);
2150}
2151
2152// CHECK-LABEL: @test_vshll_high_n_u32(
2153// CHECK:   [[SHUFFLE_I:%.*]] = shufflevector <4 x i32> %a, <4 x i32> %a, <2 x i32> <i32 2, i32 3>
2154// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> [[SHUFFLE_I]] to <8 x i8>
2155// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <2 x i32>
2156// CHECK:   [[TMP2:%.*]] = zext <2 x i32> [[TMP1]] to <2 x i64>
2157// CHECK:   [[VSHLL_N:%.*]] = shl <2 x i64> [[TMP2]], <i64 32, i64 32>
2158// CHECK:   ret <2 x i64> [[VSHLL_N]]
2159uint64x2_t test_vshll_high_n_u32(uint32x4_t a) {
2160  return vshll_high_n_u32(a, 32);
2161}
2162
2163// CHECK-LABEL: @test_vcvt_f16_f32(
2164// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2165// CHECK:   [[VCVT_F16_F321_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.vcvtfp2hf(<4 x float> %a)
2166// CHECK:   [[VCVT_F16_F322_I:%.*]] = bitcast <4 x i16> [[VCVT_F16_F321_I]] to <8 x i8>
2167// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[VCVT_F16_F322_I]] to <4 x half>
2168// CHECK:   ret <4 x half> [[TMP1]]
2169float16x4_t test_vcvt_f16_f32(float32x4_t a) {
2170  return vcvt_f16_f32(a);
2171}
2172
2173// CHECK-LABEL: @test_vcvt_high_f16_f32(
2174// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %b to <16 x i8>
2175// CHECK:   [[VCVT_F16_F321_I_I:%.*]] = call <4 x i16> @llvm.aarch64.neon.vcvtfp2hf(<4 x float> %b)
2176// CHECK:   [[VCVT_F16_F322_I_I:%.*]] = bitcast <4 x i16> [[VCVT_F16_F321_I_I]] to <8 x i8>
2177// CHECK:   [[TMP1:%.*]] = bitcast <8 x i8> [[VCVT_F16_F322_I_I]] to <4 x half>
2178// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x half> %a, <4 x half> [[TMP1]], <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2179// CHECK:   ret <8 x half> [[SHUFFLE_I_I]]
2180float16x8_t test_vcvt_high_f16_f32(float16x4_t a, float32x4_t b) {
2181  return vcvt_high_f16_f32(a, b);
2182}
2183
2184// CHECK-LABEL: @test_vcvt_f32_f64(
2185// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2186// CHECK:   [[VCVT_I:%.*]] = fptrunc <2 x double> %a to <2 x float>
2187// CHECK:   ret <2 x float> [[VCVT_I]]
2188float32x2_t test_vcvt_f32_f64(float64x2_t a) {
2189  return vcvt_f32_f64(a);
2190}
2191
2192// CHECK-LABEL: @test_vcvt_high_f32_f64(
2193// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %b to <16 x i8>
2194// CHECK:   [[VCVT_I_I:%.*]] = fptrunc <2 x double> %b to <2 x float>
2195// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x float> %a, <2 x float> [[VCVT_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2196// CHECK:   ret <4 x float> [[SHUFFLE_I_I]]
2197float32x4_t test_vcvt_high_f32_f64(float32x2_t a, float64x2_t b) {
2198  return vcvt_high_f32_f64(a, b);
2199}
2200
2201// CHECK-LABEL: @test_vcvtx_f32_f64(
2202// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2203// CHECK:   [[VCVTX_F32_V1_I:%.*]] = call <2 x float> @llvm.aarch64.neon.fcvtxn.v2f32.v2f64(<2 x double> %a)
2204// CHECK:   ret <2 x float> [[VCVTX_F32_V1_I]]
2205float32x2_t test_vcvtx_f32_f64(float64x2_t a) {
2206  return vcvtx_f32_f64(a);
2207}
2208
2209// CHECK-LABEL: @test_vcvtx_high_f32_f64(
2210// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %b to <16 x i8>
2211// CHECK:   [[VCVTX_F32_V1_I_I:%.*]] = call <2 x float> @llvm.aarch64.neon.fcvtxn.v2f32.v2f64(<2 x double> %b)
2212// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <2 x float> %a, <2 x float> [[VCVTX_F32_V1_I_I]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2213// CHECK:   ret <4 x float> [[SHUFFLE_I_I]]
2214float32x4_t test_vcvtx_high_f32_f64(float32x2_t a, float64x2_t b) {
2215  return vcvtx_high_f32_f64(a, b);
2216}
2217
2218// CHECK-LABEL: @test_vcvt_f32_f16(
2219// CHECK:   [[TMP0:%.*]] = bitcast <4 x half> %a to <8 x i8>
2220// CHECK:   [[VCVT_F32_F16_I:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>
2221// CHECK:   [[VCVT_F32_F161_I:%.*]] = call <4 x float> @llvm.aarch64.neon.vcvthf2fp(<4 x i16> [[VCVT_F32_F16_I]])
2222// CHECK:   [[VCVT_F32_F162_I:%.*]] = bitcast <4 x float> [[VCVT_F32_F161_I]] to <16 x i8>
2223// CHECK:   ret <4 x float> [[VCVT_F32_F161_I]]
2224float32x4_t test_vcvt_f32_f16(float16x4_t a) {
2225  return vcvt_f32_f16(a);
2226}
2227
2228// CHECK-LABEL: @test_vcvt_high_f32_f16(
2229// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <8 x half> %a, <8 x half> %a, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
2230// CHECK:   [[TMP0:%.*]] = bitcast <4 x half> [[SHUFFLE_I_I]] to <8 x i8>
2231// CHECK:   [[VCVT_F32_F16_I_I:%.*]] = bitcast <8 x i8> [[TMP0]] to <4 x i16>
2232// CHECK:   [[VCVT_F32_F161_I_I:%.*]] = call <4 x float> @llvm.aarch64.neon.vcvthf2fp(<4 x i16> [[VCVT_F32_F16_I_I]])
2233// CHECK:   [[VCVT_F32_F162_I_I:%.*]] = bitcast <4 x float> [[VCVT_F32_F161_I_I]] to <16 x i8>
2234// CHECK:   ret <4 x float> [[VCVT_F32_F161_I_I]]
2235float32x4_t test_vcvt_high_f32_f16(float16x8_t a) {
2236  return vcvt_high_f32_f16(a);
2237}
2238
2239// CHECK-LABEL: @test_vcvt_f64_f32(
2240// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2241// CHECK:   [[VCVT_I:%.*]] = fpext <2 x float> %a to <2 x double>
2242// CHECK:   ret <2 x double> [[VCVT_I]]
2243float64x2_t test_vcvt_f64_f32(float32x2_t a) {
2244  return vcvt_f64_f32(a);
2245}
2246
2247// CHECK-LABEL: @test_vcvt_high_f64_f32(
2248// CHECK:   [[SHUFFLE_I_I:%.*]] = shufflevector <4 x float> %a, <4 x float> %a, <2 x i32> <i32 2, i32 3>
2249// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> [[SHUFFLE_I_I]] to <8 x i8>
2250// CHECK:   [[VCVT_I_I:%.*]] = fpext <2 x float> [[SHUFFLE_I_I]] to <2 x double>
2251// CHECK:   ret <2 x double> [[VCVT_I_I]]
2252float64x2_t test_vcvt_high_f64_f32(float32x4_t a) {
2253  return vcvt_high_f64_f32(a);
2254}
2255
2256// CHECK-LABEL: @test_vrndnq_f64(
2257// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2258// CHECK:   [[VRNDN1_I:%.*]] = call <2 x double> @llvm.aarch64.neon.frintn.v2f64(<2 x double> %a)
2259// CHECK:   ret <2 x double> [[VRNDN1_I]]
2260float64x2_t test_vrndnq_f64(float64x2_t a) {
2261  return vrndnq_f64(a);
2262}
2263
2264// CHECK-LABEL: @test_vrndaq_f64(
2265// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2266// CHECK:   [[VRNDA1_I:%.*]] = call <2 x double> @llvm.round.v2f64(<2 x double> %a)
2267// CHECK:   ret <2 x double> [[VRNDA1_I]]
2268float64x2_t test_vrndaq_f64(float64x2_t a) {
2269  return vrndaq_f64(a);
2270}
2271
2272// CHECK-LABEL: @test_vrndpq_f64(
2273// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2274// CHECK:   [[VRNDP1_I:%.*]] = call <2 x double> @llvm.ceil.v2f64(<2 x double> %a)
2275// CHECK:   ret <2 x double> [[VRNDP1_I]]
2276float64x2_t test_vrndpq_f64(float64x2_t a) {
2277  return vrndpq_f64(a);
2278}
2279
2280// CHECK-LABEL: @test_vrndmq_f64(
2281// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2282// CHECK:   [[VRNDM1_I:%.*]] = call <2 x double> @llvm.floor.v2f64(<2 x double> %a)
2283// CHECK:   ret <2 x double> [[VRNDM1_I]]
2284float64x2_t test_vrndmq_f64(float64x2_t a) {
2285  return vrndmq_f64(a);
2286}
2287
2288// CHECK-LABEL: @test_vrndxq_f64(
2289// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2290// CHECK:   [[VRNDX1_I:%.*]] = call <2 x double> @llvm.rint.v2f64(<2 x double> %a)
2291// CHECK:   ret <2 x double> [[VRNDX1_I]]
2292float64x2_t test_vrndxq_f64(float64x2_t a) {
2293  return vrndxq_f64(a);
2294}
2295
2296// CHECK-LABEL: @test_vrndq_f64(
2297// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2298// CHECK:   [[VRNDZ1_I:%.*]] = call <2 x double> @llvm.trunc.v2f64(<2 x double> %a)
2299// CHECK:   ret <2 x double> [[VRNDZ1_I]]
2300float64x2_t test_vrndq_f64(float64x2_t a) {
2301  return vrndq_f64(a);
2302}
2303
2304// CHECK-LABEL: @test_vrndiq_f64(
2305// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2306// CHECK:   [[VRNDI1_I:%.*]] = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %a)
2307// CHECK:   ret <2 x double> [[VRNDI1_I]]
2308float64x2_t test_vrndiq_f64(float64x2_t a) {
2309  return vrndiq_f64(a);
2310}
2311
2312// CHECK-LABEL: @test_vcvt_s32_f32(
2313// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2314// CHECK:   [[TMP1:%.*]] = fptosi <2 x float> %a to <2 x i32>
2315// CHECK:   ret <2 x i32> [[TMP1]]
2316int32x2_t test_vcvt_s32_f32(float32x2_t a) {
2317  return vcvt_s32_f32(a);
2318}
2319
2320// CHECK-LABEL: @test_vcvtq_s32_f32(
2321// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2322// CHECK:   [[TMP1:%.*]] = fptosi <4 x float> %a to <4 x i32>
2323// CHECK:   ret <4 x i32> [[TMP1]]
2324int32x4_t test_vcvtq_s32_f32(float32x4_t a) {
2325  return vcvtq_s32_f32(a);
2326}
2327
2328// CHECK-LABEL: @test_vcvtq_s64_f64(
2329// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2330// CHECK:   [[TMP1:%.*]] = fptosi <2 x double> %a to <2 x i64>
2331// CHECK:   ret <2 x i64> [[TMP1]]
2332int64x2_t test_vcvtq_s64_f64(float64x2_t a) {
2333  return vcvtq_s64_f64(a);
2334}
2335
2336// CHECK-LABEL: @test_vcvt_u32_f32(
2337// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2338// CHECK:   [[TMP1:%.*]] = fptoui <2 x float> %a to <2 x i32>
2339// CHECK:   ret <2 x i32> [[TMP1]]
2340uint32x2_t test_vcvt_u32_f32(float32x2_t a) {
2341  return vcvt_u32_f32(a);
2342}
2343
2344// CHECK-LABEL: @test_vcvtq_u32_f32(
2345// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2346// CHECK:   [[TMP1:%.*]] = fptoui <4 x float> %a to <4 x i32>
2347// CHECK:   ret <4 x i32> [[TMP1]]
2348uint32x4_t test_vcvtq_u32_f32(float32x4_t a) {
2349  return vcvtq_u32_f32(a);
2350}
2351
2352// CHECK-LABEL: @test_vcvtq_u64_f64(
2353// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2354// CHECK:   [[TMP1:%.*]] = fptoui <2 x double> %a to <2 x i64>
2355// CHECK:   ret <2 x i64> [[TMP1]]
2356uint64x2_t test_vcvtq_u64_f64(float64x2_t a) {
2357  return vcvtq_u64_f64(a);
2358}
2359
2360// CHECK-LABEL: @test_vcvtn_s32_f32(
2361// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2362// CHECK:   [[VCVTN1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtns.v2i32.v2f32(<2 x float> %a)
2363// CHECK:   ret <2 x i32> [[VCVTN1_I]]
2364int32x2_t test_vcvtn_s32_f32(float32x2_t a) {
2365  return vcvtn_s32_f32(a);
2366}
2367
2368// CHECK-LABEL: @test_vcvtnq_s32_f32(
2369// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2370// CHECK:   [[VCVTN1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtns.v4i32.v4f32(<4 x float> %a)
2371// CHECK:   ret <4 x i32> [[VCVTN1_I]]
2372int32x4_t test_vcvtnq_s32_f32(float32x4_t a) {
2373  return vcvtnq_s32_f32(a);
2374}
2375
2376// CHECK-LABEL: @test_vcvtnq_s64_f64(
2377// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2378// CHECK:   [[VCVTN1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtns.v2i64.v2f64(<2 x double> %a)
2379// CHECK:   ret <2 x i64> [[VCVTN1_I]]
2380int64x2_t test_vcvtnq_s64_f64(float64x2_t a) {
2381  return vcvtnq_s64_f64(a);
2382}
2383
2384// CHECK-LABEL: @test_vcvtn_u32_f32(
2385// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2386// CHECK:   [[VCVTN1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtnu.v2i32.v2f32(<2 x float> %a)
2387// CHECK:   ret <2 x i32> [[VCVTN1_I]]
2388uint32x2_t test_vcvtn_u32_f32(float32x2_t a) {
2389  return vcvtn_u32_f32(a);
2390}
2391
2392// CHECK-LABEL: @test_vcvtnq_u32_f32(
2393// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2394// CHECK:   [[VCVTN1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtnu.v4i32.v4f32(<4 x float> %a)
2395// CHECK:   ret <4 x i32> [[VCVTN1_I]]
2396uint32x4_t test_vcvtnq_u32_f32(float32x4_t a) {
2397  return vcvtnq_u32_f32(a);
2398}
2399
2400// CHECK-LABEL: @test_vcvtnq_u64_f64(
2401// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2402// CHECK:   [[VCVTN1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtnu.v2i64.v2f64(<2 x double> %a)
2403// CHECK:   ret <2 x i64> [[VCVTN1_I]]
2404uint64x2_t test_vcvtnq_u64_f64(float64x2_t a) {
2405  return vcvtnq_u64_f64(a);
2406}
2407
2408// CHECK-LABEL: @test_vcvtp_s32_f32(
2409// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2410// CHECK:   [[VCVTP1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtps.v2i32.v2f32(<2 x float> %a)
2411// CHECK:   ret <2 x i32> [[VCVTP1_I]]
2412int32x2_t test_vcvtp_s32_f32(float32x2_t a) {
2413  return vcvtp_s32_f32(a);
2414}
2415
2416// CHECK-LABEL: @test_vcvtpq_s32_f32(
2417// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2418// CHECK:   [[VCVTP1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtps.v4i32.v4f32(<4 x float> %a)
2419// CHECK:   ret <4 x i32> [[VCVTP1_I]]
2420int32x4_t test_vcvtpq_s32_f32(float32x4_t a) {
2421  return vcvtpq_s32_f32(a);
2422}
2423
2424// CHECK-LABEL: @test_vcvtpq_s64_f64(
2425// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2426// CHECK:   [[VCVTP1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtps.v2i64.v2f64(<2 x double> %a)
2427// CHECK:   ret <2 x i64> [[VCVTP1_I]]
2428int64x2_t test_vcvtpq_s64_f64(float64x2_t a) {
2429  return vcvtpq_s64_f64(a);
2430}
2431
2432// CHECK-LABEL: @test_vcvtp_u32_f32(
2433// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2434// CHECK:   [[VCVTP1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtpu.v2i32.v2f32(<2 x float> %a)
2435// CHECK:   ret <2 x i32> [[VCVTP1_I]]
2436uint32x2_t test_vcvtp_u32_f32(float32x2_t a) {
2437  return vcvtp_u32_f32(a);
2438}
2439
2440// CHECK-LABEL: @test_vcvtpq_u32_f32(
2441// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2442// CHECK:   [[VCVTP1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtpu.v4i32.v4f32(<4 x float> %a)
2443// CHECK:   ret <4 x i32> [[VCVTP1_I]]
2444uint32x4_t test_vcvtpq_u32_f32(float32x4_t a) {
2445  return vcvtpq_u32_f32(a);
2446}
2447
2448// CHECK-LABEL: @test_vcvtpq_u64_f64(
2449// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2450// CHECK:   [[VCVTP1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtpu.v2i64.v2f64(<2 x double> %a)
2451// CHECK:   ret <2 x i64> [[VCVTP1_I]]
2452uint64x2_t test_vcvtpq_u64_f64(float64x2_t a) {
2453  return vcvtpq_u64_f64(a);
2454}
2455
2456// CHECK-LABEL: @test_vcvtm_s32_f32(
2457// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2458// CHECK:   [[VCVTM1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtms.v2i32.v2f32(<2 x float> %a)
2459// CHECK:   ret <2 x i32> [[VCVTM1_I]]
2460int32x2_t test_vcvtm_s32_f32(float32x2_t a) {
2461  return vcvtm_s32_f32(a);
2462}
2463
2464// CHECK-LABEL: @test_vcvtmq_s32_f32(
2465// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2466// CHECK:   [[VCVTM1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtms.v4i32.v4f32(<4 x float> %a)
2467// CHECK:   ret <4 x i32> [[VCVTM1_I]]
2468int32x4_t test_vcvtmq_s32_f32(float32x4_t a) {
2469  return vcvtmq_s32_f32(a);
2470}
2471
2472// CHECK-LABEL: @test_vcvtmq_s64_f64(
2473// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2474// CHECK:   [[VCVTM1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtms.v2i64.v2f64(<2 x double> %a)
2475// CHECK:   ret <2 x i64> [[VCVTM1_I]]
2476int64x2_t test_vcvtmq_s64_f64(float64x2_t a) {
2477  return vcvtmq_s64_f64(a);
2478}
2479
2480// CHECK-LABEL: @test_vcvtm_u32_f32(
2481// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2482// CHECK:   [[VCVTM1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtmu.v2i32.v2f32(<2 x float> %a)
2483// CHECK:   ret <2 x i32> [[VCVTM1_I]]
2484uint32x2_t test_vcvtm_u32_f32(float32x2_t a) {
2485  return vcvtm_u32_f32(a);
2486}
2487
2488// CHECK-LABEL: @test_vcvtmq_u32_f32(
2489// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2490// CHECK:   [[VCVTM1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtmu.v4i32.v4f32(<4 x float> %a)
2491// CHECK:   ret <4 x i32> [[VCVTM1_I]]
2492uint32x4_t test_vcvtmq_u32_f32(float32x4_t a) {
2493  return vcvtmq_u32_f32(a);
2494}
2495
2496// CHECK-LABEL: @test_vcvtmq_u64_f64(
2497// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2498// CHECK:   [[VCVTM1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtmu.v2i64.v2f64(<2 x double> %a)
2499// CHECK:   ret <2 x i64> [[VCVTM1_I]]
2500uint64x2_t test_vcvtmq_u64_f64(float64x2_t a) {
2501  return vcvtmq_u64_f64(a);
2502}
2503
2504// CHECK-LABEL: @test_vcvta_s32_f32(
2505// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2506// CHECK:   [[VCVTA1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtas.v2i32.v2f32(<2 x float> %a)
2507// CHECK:   ret <2 x i32> [[VCVTA1_I]]
2508int32x2_t test_vcvta_s32_f32(float32x2_t a) {
2509  return vcvta_s32_f32(a);
2510}
2511
2512// CHECK-LABEL: @test_vcvtaq_s32_f32(
2513// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2514// CHECK:   [[VCVTA1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtas.v4i32.v4f32(<4 x float> %a)
2515// CHECK:   ret <4 x i32> [[VCVTA1_I]]
2516int32x4_t test_vcvtaq_s32_f32(float32x4_t a) {
2517  return vcvtaq_s32_f32(a);
2518}
2519
2520// CHECK-LABEL: @test_vcvtaq_s64_f64(
2521// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2522// CHECK:   [[VCVTA1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtas.v2i64.v2f64(<2 x double> %a)
2523// CHECK:   ret <2 x i64> [[VCVTA1_I]]
2524int64x2_t test_vcvtaq_s64_f64(float64x2_t a) {
2525  return vcvtaq_s64_f64(a);
2526}
2527
2528// CHECK-LABEL: @test_vcvta_u32_f32(
2529// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2530// CHECK:   [[VCVTA1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.fcvtau.v2i32.v2f32(<2 x float> %a)
2531// CHECK:   ret <2 x i32> [[VCVTA1_I]]
2532uint32x2_t test_vcvta_u32_f32(float32x2_t a) {
2533  return vcvta_u32_f32(a);
2534}
2535
2536// CHECK-LABEL: @test_vcvtaq_u32_f32(
2537// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2538// CHECK:   [[VCVTA1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.fcvtau.v4i32.v4f32(<4 x float> %a)
2539// CHECK:   ret <4 x i32> [[VCVTA1_I]]
2540uint32x4_t test_vcvtaq_u32_f32(float32x4_t a) {
2541  return vcvtaq_u32_f32(a);
2542}
2543
2544// CHECK-LABEL: @test_vcvtaq_u64_f64(
2545// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2546// CHECK:   [[VCVTA1_I:%.*]] = call <2 x i64> @llvm.aarch64.neon.fcvtau.v2i64.v2f64(<2 x double> %a)
2547// CHECK:   ret <2 x i64> [[VCVTA1_I]]
2548uint64x2_t test_vcvtaq_u64_f64(float64x2_t a) {
2549  return vcvtaq_u64_f64(a);
2550}
2551
2552// CHECK-LABEL: @test_vrsqrte_f32(
2553// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2554// CHECK:   [[VRSQRTE_V1_I:%.*]] = call <2 x float> @llvm.aarch64.neon.frsqrte.v2f32(<2 x float> %a)
2555// CHECK:   ret <2 x float> [[VRSQRTE_V1_I]]
2556float32x2_t test_vrsqrte_f32(float32x2_t a) {
2557  return vrsqrte_f32(a);
2558}
2559
2560// CHECK-LABEL: @test_vrsqrteq_f32(
2561// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2562// CHECK:   [[VRSQRTEQ_V1_I:%.*]] = call <4 x float> @llvm.aarch64.neon.frsqrte.v4f32(<4 x float> %a)
2563// CHECK:   ret <4 x float> [[VRSQRTEQ_V1_I]]
2564float32x4_t test_vrsqrteq_f32(float32x4_t a) {
2565  return vrsqrteq_f32(a);
2566}
2567
2568// CHECK-LABEL: @test_vrsqrteq_f64(
2569// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2570// CHECK:   [[VRSQRTEQ_V1_I:%.*]] = call <2 x double> @llvm.aarch64.neon.frsqrte.v2f64(<2 x double> %a)
2571// CHECK:   ret <2 x double> [[VRSQRTEQ_V1_I]]
2572float64x2_t test_vrsqrteq_f64(float64x2_t a) {
2573  return vrsqrteq_f64(a);
2574}
2575
2576// CHECK-LABEL: @test_vrecpe_f32(
2577// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2578// CHECK:   [[VRECPE_V1_I:%.*]] = call <2 x float> @llvm.aarch64.neon.frecpe.v2f32(<2 x float> %a)
2579// CHECK:   ret <2 x float> [[VRECPE_V1_I]]
2580float32x2_t test_vrecpe_f32(float32x2_t a) {
2581  return vrecpe_f32(a);
2582}
2583
2584// CHECK-LABEL: @test_vrecpeq_f32(
2585// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2586// CHECK:   [[VRECPEQ_V1_I:%.*]] = call <4 x float> @llvm.aarch64.neon.frecpe.v4f32(<4 x float> %a)
2587// CHECK:   ret <4 x float> [[VRECPEQ_V1_I]]
2588float32x4_t test_vrecpeq_f32(float32x4_t a) {
2589  return vrecpeq_f32(a);
2590}
2591
2592// CHECK-LABEL: @test_vrecpeq_f64(
2593// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2594// CHECK:   [[VRECPEQ_V1_I:%.*]] = call <2 x double> @llvm.aarch64.neon.frecpe.v2f64(<2 x double> %a)
2595// CHECK:   ret <2 x double> [[VRECPEQ_V1_I]]
2596float64x2_t test_vrecpeq_f64(float64x2_t a) {
2597  return vrecpeq_f64(a);
2598}
2599
2600// CHECK-LABEL: @test_vrecpe_u32(
2601// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
2602// CHECK:   [[VRECPE_V1_I:%.*]] = call <2 x i32> @llvm.aarch64.neon.urecpe.v2i32(<2 x i32> %a)
2603// CHECK:   ret <2 x i32> [[VRECPE_V1_I]]
2604uint32x2_t test_vrecpe_u32(uint32x2_t a) {
2605  return vrecpe_u32(a);
2606}
2607
2608// CHECK-LABEL: @test_vrecpeq_u32(
2609// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
2610// CHECK:   [[VRECPEQ_V1_I:%.*]] = call <4 x i32> @llvm.aarch64.neon.urecpe.v4i32(<4 x i32> %a)
2611// CHECK:   ret <4 x i32> [[VRECPEQ_V1_I]]
2612uint32x4_t test_vrecpeq_u32(uint32x4_t a) {
2613  return vrecpeq_u32(a);
2614}
2615
2616// CHECK-LABEL: @test_vsqrt_f32(
2617// CHECK:   [[TMP0:%.*]] = bitcast <2 x float> %a to <8 x i8>
2618// CHECK:   [[VSQRT_I:%.*]] = call <2 x float> @llvm.sqrt.v2f32(<2 x float> %a)
2619// CHECK:   ret <2 x float> [[VSQRT_I]]
2620float32x2_t test_vsqrt_f32(float32x2_t a) {
2621  return vsqrt_f32(a);
2622}
2623
2624// CHECK-LABEL: @test_vsqrtq_f32(
2625// CHECK:   [[TMP0:%.*]] = bitcast <4 x float> %a to <16 x i8>
2626// CHECK:   [[VSQRT_I:%.*]] = call <4 x float> @llvm.sqrt.v4f32(<4 x float> %a)
2627// CHECK:   ret <4 x float> [[VSQRT_I]]
2628float32x4_t test_vsqrtq_f32(float32x4_t a) {
2629  return vsqrtq_f32(a);
2630}
2631
2632// CHECK-LABEL: @test_vsqrtq_f64(
2633// CHECK:   [[TMP0:%.*]] = bitcast <2 x double> %a to <16 x i8>
2634// CHECK:   [[VSQRT_I:%.*]] = call <2 x double> @llvm.sqrt.v2f64(<2 x double> %a)
2635// CHECK:   ret <2 x double> [[VSQRT_I]]
2636float64x2_t test_vsqrtq_f64(float64x2_t a) {
2637  return vsqrtq_f64(a);
2638}
2639
2640// CHECK-LABEL: @test_vcvt_f32_s32(
2641// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
2642// CHECK:   [[VCVT_I:%.*]] = sitofp <2 x i32> %a to <2 x float>
2643// CHECK:   ret <2 x float> [[VCVT_I]]
2644float32x2_t test_vcvt_f32_s32(int32x2_t a) {
2645  return vcvt_f32_s32(a);
2646}
2647
2648// CHECK-LABEL: @test_vcvt_f32_u32(
2649// CHECK:   [[TMP0:%.*]] = bitcast <2 x i32> %a to <8 x i8>
2650// CHECK:   [[VCVT_I:%.*]] = uitofp <2 x i32> %a to <2 x float>
2651// CHECK:   ret <2 x float> [[VCVT_I]]
2652float32x2_t test_vcvt_f32_u32(uint32x2_t a) {
2653  return vcvt_f32_u32(a);
2654}
2655
2656// CHECK-LABEL: @test_vcvtq_f32_s32(
2657// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
2658// CHECK:   [[VCVT_I:%.*]] = sitofp <4 x i32> %a to <4 x float>
2659// CHECK:   ret <4 x float> [[VCVT_I]]
2660float32x4_t test_vcvtq_f32_s32(int32x4_t a) {
2661  return vcvtq_f32_s32(a);
2662}
2663
2664// CHECK-LABEL: @test_vcvtq_f32_u32(
2665// CHECK:   [[TMP0:%.*]] = bitcast <4 x i32> %a to <16 x i8>
2666// CHECK:   [[VCVT_I:%.*]] = uitofp <4 x i32> %a to <4 x float>
2667// CHECK:   ret <4 x float> [[VCVT_I]]
2668float32x4_t test_vcvtq_f32_u32(uint32x4_t a) {
2669  return vcvtq_f32_u32(a);
2670}
2671
2672// CHECK-LABEL: @test_vcvtq_f64_s64(
2673// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
2674// CHECK:   [[VCVT_I:%.*]] = sitofp <2 x i64> %a to <2 x double>
2675// CHECK:   ret <2 x double> [[VCVT_I]]
2676float64x2_t test_vcvtq_f64_s64(int64x2_t a) {
2677  return vcvtq_f64_s64(a);
2678}
2679
2680// CHECK-LABEL: @test_vcvtq_f64_u64(
2681// CHECK:   [[TMP0:%.*]] = bitcast <2 x i64> %a to <16 x i8>
2682// CHECK:   [[VCVT_I:%.*]] = uitofp <2 x i64> %a to <2 x double>
2683// CHECK:   ret <2 x double> [[VCVT_I]]
2684float64x2_t test_vcvtq_f64_u64(uint64x2_t a) {
2685  return vcvtq_f64_u64(a);
2686}
2687