1; RUN: llc -mtriple aarch64_be < %s -aarch64-load-store-opt=false -o - | FileCheck %s
2; RUN: llc -mtriple aarch64_be < %s -aarch64-load-store-opt=false -fast-isel=true -O0 -o - | FileCheck %s
3
4; CHECK-LABEL: test_i64_f64:
5declare i64 @test_i64_f64_helper(double %p)
6define void @test_i64_f64(double* %p, i64* %q) {
7; CHECK-NOT: rev
8    %1 = load double* %p
9    %2 = fadd double %1, %1
10    %3 = call i64 @test_i64_f64_helper(double %2)
11    %4 = add i64 %3, %3
12    store i64 %4, i64* %q
13    ret void
14}
15
16; CHECK-LABEL: test_i64_v1i64:
17declare i64 @test_i64_v1i64_helper(<1 x i64> %p)
18define void @test_i64_v1i64(<1 x i64>* %p, i64* %q) {
19; CHECK-NOT: rev
20    %1 = load <1 x i64>* %p
21    %2 = add <1 x i64> %1, %1
22    %3 = call i64 @test_i64_v1i64_helper(<1 x i64> %2)
23    %4 = add i64 %3, %3
24    store i64 %4, i64* %q
25    ret void
26}
27
28; CHECK-LABEL: test_i64_v2f32:
29declare i64 @test_i64_v2f32_helper(<2 x float> %p)
30define void @test_i64_v2f32(<2 x float>* %p, i64* %q) {
31; CHECK: rev64 v{{[0-9]+}}.2s
32    %1 = load <2 x float>* %p
33    %2 = fadd <2 x float> %1, %1
34    %3 = call i64 @test_i64_v2f32_helper(<2 x float> %2)
35    %4 = add i64 %3, %3
36    store i64 %4, i64* %q
37    ret void
38}
39
40; CHECK-LABEL: test_i64_v2i32:
41declare i64 @test_i64_v2i32_helper(<2 x i32> %p)
42define void @test_i64_v2i32(<2 x i32>* %p, i64* %q) {
43; CHECK: rev64 v{{[0-9]+}}.2s
44    %1 = load <2 x i32>* %p
45    %2 = add <2 x i32> %1, %1
46    %3 = call i64 @test_i64_v2i32_helper(<2 x i32> %2)
47    %4 = add i64 %3, %3
48    store i64 %4, i64* %q
49    ret void
50}
51
52; CHECK-LABEL: test_i64_v4i16:
53declare i64 @test_i64_v4i16_helper(<4 x i16> %p)
54define void @test_i64_v4i16(<4 x i16>* %p, i64* %q) {
55; CHECK: rev64 v{{[0-9]+}}.4h
56    %1 = load <4 x i16>* %p
57    %2 = add <4 x i16> %1, %1
58    %3 = call i64 @test_i64_v4i16_helper(<4 x i16> %2)
59    %4 = add i64 %3, %3
60    store i64 %4, i64* %q
61    ret void
62}
63
64; CHECK-LABEL: test_i64_v8i8:
65declare i64 @test_i64_v8i8_helper(<8 x i8> %p)
66define void @test_i64_v8i8(<8 x i8>* %p, i64* %q) {
67; CHECK: rev64 v{{[0-9]+}}.8b
68    %1 = load <8 x i8>* %p
69    %2 = add <8 x i8> %1, %1
70    %3 = call i64 @test_i64_v8i8_helper(<8 x i8> %2)
71    %4 = add i64 %3, %3
72    store i64 %4, i64* %q
73    ret void
74}
75
76; CHECK-LABEL: test_f64_i64:
77declare double @test_f64_i64_helper(i64 %p)
78define void @test_f64_i64(i64* %p, double* %q) {
79; CHECK-NOT: rev
80    %1 = load i64* %p
81    %2 = add i64 %1, %1
82    %3 = call double @test_f64_i64_helper(i64 %2)
83    %4 = fadd double %3, %3
84    store double %4, double* %q
85    ret void
86}
87
88; CHECK-LABEL: test_f64_v1i64:
89declare double @test_f64_v1i64_helper(<1 x i64> %p)
90define void @test_f64_v1i64(<1 x i64>* %p, double* %q) {
91; CHECK-NOT: rev
92    %1 = load <1 x i64>* %p
93    %2 = add <1 x i64> %1, %1
94    %3 = call double @test_f64_v1i64_helper(<1 x i64> %2)
95    %4 = fadd double %3, %3
96    store double %4, double* %q
97    ret void
98}
99
100; CHECK-LABEL: test_f64_v2f32:
101declare double @test_f64_v2f32_helper(<2 x float> %p)
102define void @test_f64_v2f32(<2 x float>* %p, double* %q) {
103; CHECK: rev64 v{{[0-9]+}}.2s
104    %1 = load <2 x float>* %p
105    %2 = fadd <2 x float> %1, %1
106    %3 = call double @test_f64_v2f32_helper(<2 x float> %2)
107    %4 = fadd double %3, %3
108    store double %4, double* %q
109    ret void
110}
111
112; CHECK-LABEL: test_f64_v2i32:
113declare double @test_f64_v2i32_helper(<2 x i32> %p)
114define void @test_f64_v2i32(<2 x i32>* %p, double* %q) {
115; CHECK: rev64 v{{[0-9]+}}.2s
116    %1 = load <2 x i32>* %p
117    %2 = add <2 x i32> %1, %1
118    %3 = call double @test_f64_v2i32_helper(<2 x i32> %2)
119    %4 = fadd double %3, %3
120    store double %4, double* %q
121    ret void
122}
123
124; CHECK-LABEL: test_f64_v4i16:
125declare double @test_f64_v4i16_helper(<4 x i16> %p)
126define void @test_f64_v4i16(<4 x i16>* %p, double* %q) {
127; CHECK: rev64 v{{[0-9]+}}.4h
128    %1 = load <4 x i16>* %p
129    %2 = add <4 x i16> %1, %1
130    %3 = call double @test_f64_v4i16_helper(<4 x i16> %2)
131    %4 = fadd double %3, %3
132    store double %4, double* %q
133    ret void
134}
135
136; CHECK-LABEL: test_f64_v8i8:
137declare double @test_f64_v8i8_helper(<8 x i8> %p)
138define void @test_f64_v8i8(<8 x i8>* %p, double* %q) {
139; CHECK: rev64 v{{[0-9]+}}.8b
140    %1 = load <8 x i8>* %p
141    %2 = add <8 x i8> %1, %1
142    %3 = call double @test_f64_v8i8_helper(<8 x i8> %2)
143    %4 = fadd double %3, %3
144    store double %4, double* %q
145    ret void
146}
147
148; CHECK-LABEL: test_v1i64_i64:
149declare <1 x i64> @test_v1i64_i64_helper(i64 %p)
150define void @test_v1i64_i64(i64* %p, <1 x i64>* %q) {
151; CHECK-NOT: rev
152    %1 = load i64* %p
153    %2 = add i64 %1, %1
154    %3 = call <1 x i64> @test_v1i64_i64_helper(i64 %2)
155    %4 = add <1 x i64> %3, %3
156    store <1 x i64> %4, <1 x i64>* %q
157    ret void
158}
159
160; CHECK-LABEL: test_v1i64_f64:
161declare <1 x i64> @test_v1i64_f64_helper(double %p)
162define void @test_v1i64_f64(double* %p, <1 x i64>* %q) {
163; CHECK-NOT: rev
164    %1 = load double* %p
165    %2 = fadd double %1, %1
166    %3 = call <1 x i64> @test_v1i64_f64_helper(double %2)
167    %4 = add <1 x i64> %3, %3
168    store <1 x i64> %4, <1 x i64>* %q
169    ret void
170}
171
172; CHECK-LABEL: test_v1i64_v2f32:
173declare <1 x i64> @test_v1i64_v2f32_helper(<2 x float> %p)
174define void @test_v1i64_v2f32(<2 x float>* %p, <1 x i64>* %q) {
175; CHECK: rev64 v{{[0-9]+}}.2s
176    %1 = load <2 x float>* %p
177    %2 = fadd <2 x float> %1, %1
178    %3 = call <1 x i64> @test_v1i64_v2f32_helper(<2 x float> %2)
179    %4 = add <1 x i64> %3, %3
180    store <1 x i64> %4, <1 x i64>* %q
181    ret void
182}
183
184; CHECK-LABEL: test_v1i64_v2i32:
185declare <1 x i64> @test_v1i64_v2i32_helper(<2 x i32> %p)
186define void @test_v1i64_v2i32(<2 x i32>* %p, <1 x i64>* %q) {
187; CHECK: rev64 v{{[0-9]+}}.2s
188    %1 = load <2 x i32>* %p
189    %2 = add <2 x i32> %1, %1
190    %3 = call <1 x i64> @test_v1i64_v2i32_helper(<2 x i32> %2)
191    %4 = add <1 x i64> %3, %3
192    store <1 x i64> %4, <1 x i64>* %q
193    ret void
194}
195
196; CHECK-LABEL: test_v1i64_v4i16:
197declare <1 x i64> @test_v1i64_v4i16_helper(<4 x i16> %p)
198define void @test_v1i64_v4i16(<4 x i16>* %p, <1 x i64>* %q) {
199; CHECK: rev64 v{{[0-9]+}}.4h
200    %1 = load <4 x i16>* %p
201    %2 = add <4 x i16> %1, %1
202    %3 = call <1 x i64> @test_v1i64_v4i16_helper(<4 x i16> %2)
203    %4 = add <1 x i64> %3, %3
204    store <1 x i64> %4, <1 x i64>* %q
205    ret void
206}
207
208; CHECK-LABEL: test_v1i64_v8i8:
209declare <1 x i64> @test_v1i64_v8i8_helper(<8 x i8> %p)
210define void @test_v1i64_v8i8(<8 x i8>* %p, <1 x i64>* %q) {
211; CHECK: rev64 v{{[0-9]+}}.8b
212    %1 = load <8 x i8>* %p
213    %2 = add <8 x i8> %1, %1
214    %3 = call <1 x i64> @test_v1i64_v8i8_helper(<8 x i8> %2)
215    %4 = add <1 x i64> %3, %3
216    store <1 x i64> %4, <1 x i64>* %q
217    ret void
218}
219
220; CHECK-LABEL: test_v2f32_i64:
221declare <2 x float> @test_v2f32_i64_helper(i64 %p)
222define void @test_v2f32_i64(i64* %p, <2 x float>* %q) {
223; CHECK: rev64 v{{[0-9]+}}.2s
224    %1 = load i64* %p
225    %2 = add i64 %1, %1
226    %3 = call <2 x float> @test_v2f32_i64_helper(i64 %2)
227    %4 = fadd <2 x float> %3, %3
228    store <2 x float> %4, <2 x float>* %q
229    ret void
230}
231
232; CHECK-LABEL: test_v2f32_f64:
233declare <2 x float> @test_v2f32_f64_helper(double %p)
234define void @test_v2f32_f64(double* %p, <2 x float>* %q) {
235; CHECK: rev64 v{{[0-9]+}}.2s
236    %1 = load double* %p
237    %2 = fadd double %1, %1
238    %3 = call <2 x float> @test_v2f32_f64_helper(double %2)
239    %4 = fadd <2 x float> %3, %3
240    store <2 x float> %4, <2 x float>* %q
241    ret void
242}
243
244; CHECK-LABEL: test_v2f32_v1i64:
245declare <2 x float> @test_v2f32_v1i64_helper(<1 x i64> %p)
246define void @test_v2f32_v1i64(<1 x i64>* %p, <2 x float>* %q) {
247; CHECK: rev64 v{{[0-9]+}}.2s
248    %1 = load <1 x i64>* %p
249    %2 = add <1 x i64> %1, %1
250    %3 = call <2 x float> @test_v2f32_v1i64_helper(<1 x i64> %2)
251    %4 = fadd <2 x float> %3, %3
252    store <2 x float> %4, <2 x float>* %q
253    ret void
254}
255
256; CHECK-LABEL: test_v2f32_v2i32:
257declare <2 x float> @test_v2f32_v2i32_helper(<2 x i32> %p)
258define void @test_v2f32_v2i32(<2 x i32>* %p, <2 x float>* %q) {
259; CHECK: rev64 v{{[0-9]+}}.2s
260; CHECK: rev64 v{{[0-9]+}}.2s
261    %1 = load <2 x i32>* %p
262    %2 = add <2 x i32> %1, %1
263    %3 = call <2 x float> @test_v2f32_v2i32_helper(<2 x i32> %2)
264    %4 = fadd <2 x float> %3, %3
265    store <2 x float> %4, <2 x float>* %q
266    ret void
267}
268
269; CHECK-LABEL: test_v2f32_v4i16:
270declare <2 x float> @test_v2f32_v4i16_helper(<4 x i16> %p)
271define void @test_v2f32_v4i16(<4 x i16>* %p, <2 x float>* %q) {
272; CHECK: rev64 v{{[0-9]+}}.4h
273; CHECK: rev64 v{{[0-9]+}}.2s
274    %1 = load <4 x i16>* %p
275    %2 = add <4 x i16> %1, %1
276    %3 = call <2 x float> @test_v2f32_v4i16_helper(<4 x i16> %2)
277    %4 = fadd <2 x float> %3, %3
278    store <2 x float> %4, <2 x float>* %q
279    ret void
280}
281
282; CHECK-LABEL: test_v2f32_v8i8:
283declare <2 x float> @test_v2f32_v8i8_helper(<8 x i8> %p)
284define void @test_v2f32_v8i8(<8 x i8>* %p, <2 x float>* %q) {
285; CHECK: rev64 v{{[0-9]+}}.8b
286; CHECK: rev64 v{{[0-9]+}}.2s
287    %1 = load <8 x i8>* %p
288    %2 = add <8 x i8> %1, %1
289    %3 = call <2 x float> @test_v2f32_v8i8_helper(<8 x i8> %2)
290    %4 = fadd <2 x float> %3, %3
291    store <2 x float> %4, <2 x float>* %q
292    ret void
293}
294
295; CHECK-LABEL: test_v2i32_i64:
296declare <2 x i32> @test_v2i32_i64_helper(i64 %p)
297define void @test_v2i32_i64(i64* %p, <2 x i32>* %q) {
298; CHECK: rev64 v{{[0-9]+}}.2s
299    %1 = load i64* %p
300    %2 = add i64 %1, %1
301    %3 = call <2 x i32> @test_v2i32_i64_helper(i64 %2)
302    %4 = add <2 x i32> %3, %3
303    store <2 x i32> %4, <2 x i32>* %q
304    ret void
305}
306
307; CHECK-LABEL: test_v2i32_f64:
308declare <2 x i32> @test_v2i32_f64_helper(double %p)
309define void @test_v2i32_f64(double* %p, <2 x i32>* %q) {
310; CHECK: rev64 v{{[0-9]+}}.2s
311    %1 = load double* %p
312    %2 = fadd double %1, %1
313    %3 = call <2 x i32> @test_v2i32_f64_helper(double %2)
314    %4 = add <2 x i32> %3, %3
315    store <2 x i32> %4, <2 x i32>* %q
316    ret void
317}
318
319; CHECK-LABEL: test_v2i32_v1i64:
320declare <2 x i32> @test_v2i32_v1i64_helper(<1 x i64> %p)
321define void @test_v2i32_v1i64(<1 x i64>* %p, <2 x i32>* %q) {
322; CHECK: rev64 v{{[0-9]+}}.2s
323    %1 = load <1 x i64>* %p
324    %2 = add <1 x i64> %1, %1
325    %3 = call <2 x i32> @test_v2i32_v1i64_helper(<1 x i64> %2)
326    %4 = add <2 x i32> %3, %3
327    store <2 x i32> %4, <2 x i32>* %q
328    ret void
329}
330
331; CHECK-LABEL: test_v2i32_v2f32:
332declare <2 x i32> @test_v2i32_v2f32_helper(<2 x float> %p)
333define void @test_v2i32_v2f32(<2 x float>* %p, <2 x i32>* %q) {
334; CHECK: rev64 v{{[0-9]+}}.2s
335; CHECK: rev64 v{{[0-9]+}}.2s
336    %1 = load <2 x float>* %p
337    %2 = fadd <2 x float> %1, %1
338    %3 = call <2 x i32> @test_v2i32_v2f32_helper(<2 x float> %2)
339    %4 = add <2 x i32> %3, %3
340    store <2 x i32> %4, <2 x i32>* %q
341    ret void
342}
343
344; CHECK-LABEL: test_v2i32_v4i16:
345declare <2 x i32> @test_v2i32_v4i16_helper(<4 x i16> %p)
346define void @test_v2i32_v4i16(<4 x i16>* %p, <2 x i32>* %q) {
347; CHECK: rev64 v{{[0-9]+}}.4h
348; CHECK: rev64 v{{[0-9]+}}.2s
349    %1 = load <4 x i16>* %p
350    %2 = add <4 x i16> %1, %1
351    %3 = call <2 x i32> @test_v2i32_v4i16_helper(<4 x i16> %2)
352    %4 = add <2 x i32> %3, %3
353    store <2 x i32> %4, <2 x i32>* %q
354    ret void
355}
356
357; CHECK-LABEL: test_v2i32_v8i8:
358declare <2 x i32> @test_v2i32_v8i8_helper(<8 x i8> %p)
359define void @test_v2i32_v8i8(<8 x i8>* %p, <2 x i32>* %q) {
360; CHECK: rev64 v{{[0-9]+}}.8b
361; CHECK: rev64 v{{[0-9]+}}.2s
362    %1 = load <8 x i8>* %p
363    %2 = add <8 x i8> %1, %1
364    %3 = call <2 x i32> @test_v2i32_v8i8_helper(<8 x i8> %2)
365    %4 = add <2 x i32> %3, %3
366    store <2 x i32> %4, <2 x i32>* %q
367    ret void
368}
369
370; CHECK-LABEL: test_v4i16_i64:
371declare <4 x i16> @test_v4i16_i64_helper(i64 %p)
372define void @test_v4i16_i64(i64* %p, <4 x i16>* %q) {
373; CHECK: rev64 v{{[0-9]+}}.4h
374    %1 = load i64* %p
375    %2 = add i64 %1, %1
376    %3 = call <4 x i16> @test_v4i16_i64_helper(i64 %2)
377    %4 = add <4 x i16> %3, %3
378    store <4 x i16> %4, <4 x i16>* %q
379    ret void
380}
381
382; CHECK-LABEL: test_v4i16_f64:
383declare <4 x i16> @test_v4i16_f64_helper(double %p)
384define void @test_v4i16_f64(double* %p, <4 x i16>* %q) {
385; CHECK: rev64 v{{[0-9]+}}.4h
386    %1 = load double* %p
387    %2 = fadd double %1, %1
388    %3 = call <4 x i16> @test_v4i16_f64_helper(double %2)
389    %4 = add <4 x i16> %3, %3
390    store <4 x i16> %4, <4 x i16>* %q
391    ret void
392}
393
394; CHECK-LABEL: test_v4i16_v1i64:
395declare <4 x i16> @test_v4i16_v1i64_helper(<1 x i64> %p)
396define void @test_v4i16_v1i64(<1 x i64>* %p, <4 x i16>* %q) {
397; CHECK: rev64 v{{[0-9]+}}.4h
398    %1 = load <1 x i64>* %p
399    %2 = add <1 x i64> %1, %1
400    %3 = call <4 x i16> @test_v4i16_v1i64_helper(<1 x i64> %2)
401    %4 = add <4 x i16> %3, %3
402    store <4 x i16> %4, <4 x i16>* %q
403    ret void
404}
405
406; CHECK-LABEL: test_v4i16_v2f32:
407declare <4 x i16> @test_v4i16_v2f32_helper(<2 x float> %p)
408define void @test_v4i16_v2f32(<2 x float>* %p, <4 x i16>* %q) {
409; CHECK: rev64 v{{[0-9]+}}.2s
410; CHECK: rev64 v{{[0-9]+}}.4h
411    %1 = load <2 x float>* %p
412    %2 = fadd <2 x float> %1, %1
413    %3 = call <4 x i16> @test_v4i16_v2f32_helper(<2 x float> %2)
414    %4 = add <4 x i16> %3, %3
415    store <4 x i16> %4, <4 x i16>* %q
416    ret void
417}
418
419; CHECK-LABEL: test_v4i16_v2i32:
420declare <4 x i16> @test_v4i16_v2i32_helper(<2 x i32> %p)
421define void @test_v4i16_v2i32(<2 x i32>* %p, <4 x i16>* %q) {
422; CHECK: rev64 v{{[0-9]+}}.2s
423; CHECK: rev64 v{{[0-9]+}}.4h
424    %1 = load <2 x i32>* %p
425    %2 = add <2 x i32> %1, %1
426    %3 = call <4 x i16> @test_v4i16_v2i32_helper(<2 x i32> %2)
427    %4 = add <4 x i16> %3, %3
428    store <4 x i16> %4, <4 x i16>* %q
429    ret void
430}
431
432; CHECK-LABEL: test_v4i16_v8i8:
433declare <4 x i16> @test_v4i16_v8i8_helper(<8 x i8> %p)
434define void @test_v4i16_v8i8(<8 x i8>* %p, <4 x i16>* %q) {
435; CHECK: rev64 v{{[0-9]+}}.8b
436; CHECK: rev64 v{{[0-9]+}}.4h
437    %1 = load <8 x i8>* %p
438    %2 = add <8 x i8> %1, %1
439    %3 = call <4 x i16> @test_v4i16_v8i8_helper(<8 x i8> %2)
440    %4 = add <4 x i16> %3, %3
441    store <4 x i16> %4, <4 x i16>* %q
442    ret void
443}
444
445; CHECK-LABEL: test_v8i8_i64:
446declare <8 x i8> @test_v8i8_i64_helper(i64 %p)
447define void @test_v8i8_i64(i64* %p, <8 x i8>* %q) {
448; CHECK: rev64 v{{[0-9]+}}.8b
449    %1 = load i64* %p
450    %2 = add i64 %1, %1
451    %3 = call <8 x i8> @test_v8i8_i64_helper(i64 %2)
452    %4 = add <8 x i8> %3, %3
453    store <8 x i8> %4, <8 x i8>* %q
454    ret void
455}
456
457; CHECK-LABEL: test_v8i8_f64:
458declare <8 x i8> @test_v8i8_f64_helper(double %p)
459define void @test_v8i8_f64(double* %p, <8 x i8>* %q) {
460; CHECK: rev64 v{{[0-9]+}}.8b
461    %1 = load double* %p
462    %2 = fadd double %1, %1
463    %3 = call <8 x i8> @test_v8i8_f64_helper(double %2)
464    %4 = add <8 x i8> %3, %3
465    store <8 x i8> %4, <8 x i8>* %q
466    ret void
467}
468
469; CHECK-LABEL: test_v8i8_v1i64:
470declare <8 x i8> @test_v8i8_v1i64_helper(<1 x i64> %p)
471define void @test_v8i8_v1i64(<1 x i64>* %p, <8 x i8>* %q) {
472; CHECK: rev64 v{{[0-9]+}}.8b
473    %1 = load <1 x i64>* %p
474    %2 = add <1 x i64> %1, %1
475    %3 = call <8 x i8> @test_v8i8_v1i64_helper(<1 x i64> %2)
476    %4 = add <8 x i8> %3, %3
477    store <8 x i8> %4, <8 x i8>* %q
478    ret void
479}
480
481; CHECK-LABEL: test_v8i8_v2f32:
482declare <8 x i8> @test_v8i8_v2f32_helper(<2 x float> %p)
483define void @test_v8i8_v2f32(<2 x float>* %p, <8 x i8>* %q) {
484; CHECK: rev64 v{{[0-9]+}}.2s
485; CHECK: rev64 v{{[0-9]+}}.8b
486    %1 = load <2 x float>* %p
487    %2 = fadd <2 x float> %1, %1
488    %3 = call <8 x i8> @test_v8i8_v2f32_helper(<2 x float> %2)
489    %4 = add <8 x i8> %3, %3
490    store <8 x i8> %4, <8 x i8>* %q
491    ret void
492}
493
494; CHECK-LABEL: test_v8i8_v2i32:
495declare <8 x i8> @test_v8i8_v2i32_helper(<2 x i32> %p)
496define void @test_v8i8_v2i32(<2 x i32>* %p, <8 x i8>* %q) {
497; CHECK: rev64 v{{[0-9]+}}.2s
498; CHECK: rev64 v{{[0-9]+}}.8b
499    %1 = load <2 x i32>* %p
500    %2 = add <2 x i32> %1, %1
501    %3 = call <8 x i8> @test_v8i8_v2i32_helper(<2 x i32> %2)
502    %4 = add <8 x i8> %3, %3
503    store <8 x i8> %4, <8 x i8>* %q
504    ret void
505}
506
507; CHECK-LABEL: test_v8i8_v4i16:
508declare <8 x i8> @test_v8i8_v4i16_helper(<4 x i16> %p)
509define void @test_v8i8_v4i16(<4 x i16>* %p, <8 x i8>* %q) {
510; CHECK: rev64 v{{[0-9]+}}.4h
511; CHECK: rev64 v{{[0-9]+}}.8b
512    %1 = load <4 x i16>* %p
513    %2 = add <4 x i16> %1, %1
514    %3 = call <8 x i8> @test_v8i8_v4i16_helper(<4 x i16> %2)
515    %4 = add <8 x i8> %3, %3
516    store <8 x i8> %4, <8 x i8>* %q
517    ret void
518}
519
520; CHECK-LABEL: test_f128_v2f64:
521declare fp128 @test_f128_v2f64_helper(<2 x double> %p)
522define void @test_f128_v2f64(<2 x double>* %p, fp128* %q) {
523; CHECK: ext
524    %1 = load <2 x double>* %p
525    %2 = fadd <2 x double> %1, %1
526    %3 = call fp128 @test_f128_v2f64_helper(<2 x double> %2)
527    %4 = fadd fp128 %3, %3
528    store fp128 %4, fp128* %q
529    ret void
530}
531
532; CHECK-LABEL: test_f128_v2i64:
533declare fp128 @test_f128_v2i64_helper(<2 x i64> %p)
534define void @test_f128_v2i64(<2 x i64>* %p, fp128* %q) {
535; CHECK: ext
536    %1 = load <2 x i64>* %p
537    %2 = add <2 x i64> %1, %1
538    %3 = call fp128 @test_f128_v2i64_helper(<2 x i64> %2)
539    %4 = fadd fp128 %3, %3
540    store fp128 %4, fp128* %q
541    ret void
542}
543
544; CHECK-LABEL: test_f128_v4f32:
545declare fp128 @test_f128_v4f32_helper(<4 x float> %p)
546define void @test_f128_v4f32(<4 x float>* %p, fp128* %q) {
547; CHECK: rev64 v{{[0-9]+}}.4s
548; CHECK: ext
549    %1 = load <4 x float>* %p
550    %2 = fadd <4 x float> %1, %1
551    %3 = call fp128 @test_f128_v4f32_helper(<4 x float> %2)
552    %4 = fadd fp128 %3, %3
553    store fp128 %4, fp128* %q
554    ret void
555}
556
557; CHECK-LABEL: test_f128_v4i32:
558declare fp128 @test_f128_v4i32_helper(<4 x i32> %p)
559define void @test_f128_v4i32(<4 x i32>* %p, fp128* %q) {
560; CHECK: rev64 v{{[0-9]+}}.4s
561; CHECK: ext
562    %1 = load <4 x i32>* %p
563    %2 = add <4 x i32> %1, %1
564    %3 = call fp128 @test_f128_v4i32_helper(<4 x i32> %2)
565    %4 = fadd fp128 %3, %3
566    store fp128 %4, fp128* %q
567    ret void
568}
569
570; CHECK-LABEL: test_f128_v8i16:
571declare fp128 @test_f128_v8i16_helper(<8 x i16> %p)
572define void @test_f128_v8i16(<8 x i16>* %p, fp128* %q) {
573; CHECK: rev64 v{{[0-9]+}}.8h
574; CHECK: ext
575    %1 = load <8 x i16>* %p
576    %2 = add <8 x i16> %1, %1
577    %3 = call fp128 @test_f128_v8i16_helper(<8 x i16> %2)
578    %4 = fadd fp128 %3, %3
579    store fp128 %4, fp128* %q
580    ret void
581}
582
583; CHECK-LABEL: test_f128_v16i8:
584declare fp128 @test_f128_v16i8_helper(<16 x i8> %p)
585define void @test_f128_v16i8(<16 x i8>* %p, fp128* %q) {
586; CHECK: rev64 v{{[0-9]+}}.16b
587; CHECK: ext
588    %1 = load <16 x i8>* %p
589    %2 = add <16 x i8> %1, %1
590    %3 = call fp128 @test_f128_v16i8_helper(<16 x i8> %2)
591    %4 = fadd fp128 %3, %3
592    store fp128 %4, fp128* %q
593    ret void
594}
595
596; CHECK-LABEL: test_v2f64_f128:
597declare <2 x double> @test_v2f64_f128_helper(fp128 %p)
598define void @test_v2f64_f128(fp128* %p, <2 x double>* %q) {
599; CHECK: ext
600    %1 = load fp128* %p
601    %2 = fadd fp128 %1, %1
602    %3 = call <2 x double> @test_v2f64_f128_helper(fp128 %2)
603    %4 = fadd <2 x double> %3, %3
604    store <2 x double> %4, <2 x double>* %q
605    ret void
606}
607
608; CHECK-LABEL: test_v2f64_v2i64:
609declare <2 x double> @test_v2f64_v2i64_helper(<2 x i64> %p)
610define void @test_v2f64_v2i64(<2 x i64>* %p, <2 x double>* %q) {
611; CHECK: ext
612; CHECK: ext
613    %1 = load <2 x i64>* %p
614    %2 = add <2 x i64> %1, %1
615    %3 = call <2 x double> @test_v2f64_v2i64_helper(<2 x i64> %2)
616    %4 = fadd <2 x double> %3, %3
617    store <2 x double> %4, <2 x double>* %q
618    ret void
619}
620
621; CHECK-LABEL: test_v2f64_v4f32:
622declare <2 x double> @test_v2f64_v4f32_helper(<4 x float> %p)
623define void @test_v2f64_v4f32(<4 x float>* %p, <2 x double>* %q) {
624; CHECK: rev64 v{{[0-9]+}}.4s
625; CHECK: ext
626; CHECK: ext
627    %1 = load <4 x float>* %p
628    %2 = fadd <4 x float> %1, %1
629    %3 = call <2 x double> @test_v2f64_v4f32_helper(<4 x float> %2)
630    %4 = fadd <2 x double> %3, %3
631    store <2 x double> %4, <2 x double>* %q
632    ret void
633}
634
635; CHECK-LABEL: test_v2f64_v4i32:
636declare <2 x double> @test_v2f64_v4i32_helper(<4 x i32> %p)
637define void @test_v2f64_v4i32(<4 x i32>* %p, <2 x double>* %q) {
638; CHECK: rev64 v{{[0-9]+}}.4s
639; CHECK: ext
640; CHECK: ext
641    %1 = load <4 x i32>* %p
642    %2 = add <4 x i32> %1, %1
643    %3 = call <2 x double> @test_v2f64_v4i32_helper(<4 x i32> %2)
644    %4 = fadd <2 x double> %3, %3
645    store <2 x double> %4, <2 x double>* %q
646    ret void
647}
648
649; CHECK-LABEL: test_v2f64_v8i16:
650declare <2 x double> @test_v2f64_v8i16_helper(<8 x i16> %p)
651define void @test_v2f64_v8i16(<8 x i16>* %p, <2 x double>* %q) {
652; CHECK: rev64 v{{[0-9]+}}.8h
653; CHECK: ext
654; CHECK: ext
655    %1 = load <8 x i16>* %p
656    %2 = add <8 x i16> %1, %1
657    %3 = call <2 x double> @test_v2f64_v8i16_helper(<8 x i16> %2)
658    %4 = fadd <2 x double> %3, %3
659    store <2 x double> %4, <2 x double>* %q
660    ret void
661}
662
663; CHECK-LABEL: test_v2f64_v16i8:
664declare <2 x double> @test_v2f64_v16i8_helper(<16 x i8> %p)
665define void @test_v2f64_v16i8(<16 x i8>* %p, <2 x double>* %q) {
666; CHECK: rev64 v{{[0-9]+}}.16b
667; CHECK: ext
668; CHECK: ext
669    %1 = load <16 x i8>* %p
670    %2 = add <16 x i8> %1, %1
671    %3 = call <2 x double> @test_v2f64_v16i8_helper(<16 x i8> %2)
672    %4 = fadd <2 x double> %3, %3
673    store <2 x double> %4, <2 x double>* %q
674    ret void
675}
676
677; CHECK-LABEL: test_v2i64_f128:
678declare <2 x i64> @test_v2i64_f128_helper(fp128 %p)
679define void @test_v2i64_f128(fp128* %p, <2 x i64>* %q) {
680; CHECK: ext
681    %1 = load fp128* %p
682    %2 = fadd fp128 %1, %1
683    %3 = call <2 x i64> @test_v2i64_f128_helper(fp128 %2)
684    %4 = add <2 x i64> %3, %3
685    store <2 x i64> %4, <2 x i64>* %q
686    ret void
687}
688
689; CHECK-LABEL: test_v2i64_v2f64:
690declare <2 x i64> @test_v2i64_v2f64_helper(<2 x double> %p)
691define void @test_v2i64_v2f64(<2 x double>* %p, <2 x i64>* %q) {
692; CHECK: ext
693; CHECK: ext
694    %1 = load <2 x double>* %p
695    %2 = fadd <2 x double> %1, %1
696    %3 = call <2 x i64> @test_v2i64_v2f64_helper(<2 x double> %2)
697    %4 = add <2 x i64> %3, %3
698    store <2 x i64> %4, <2 x i64>* %q
699    ret void
700}
701
702; CHECK-LABEL: test_v2i64_v4f32:
703declare <2 x i64> @test_v2i64_v4f32_helper(<4 x float> %p)
704define void @test_v2i64_v4f32(<4 x float>* %p, <2 x i64>* %q) {
705; CHECK: rev64 v{{[0-9]+}}.4s
706; CHECK: ext
707; CHECK: ext
708    %1 = load <4 x float>* %p
709    %2 = fadd <4 x float> %1, %1
710    %3 = call <2 x i64> @test_v2i64_v4f32_helper(<4 x float> %2)
711    %4 = add <2 x i64> %3, %3
712    store <2 x i64> %4, <2 x i64>* %q
713    ret void
714}
715
716; CHECK-LABEL: test_v2i64_v4i32:
717declare <2 x i64> @test_v2i64_v4i32_helper(<4 x i32> %p)
718define void @test_v2i64_v4i32(<4 x i32>* %p, <2 x i64>* %q) {
719; CHECK: rev64 v{{[0-9]+}}.4s
720; CHECK: ext
721; CHECK: ext
722    %1 = load <4 x i32>* %p
723    %2 = add <4 x i32> %1, %1
724    %3 = call <2 x i64> @test_v2i64_v4i32_helper(<4 x i32> %2)
725    %4 = add <2 x i64> %3, %3
726    store <2 x i64> %4, <2 x i64>* %q
727    ret void
728}
729
730; CHECK-LABEL: test_v2i64_v8i16:
731declare <2 x i64> @test_v2i64_v8i16_helper(<8 x i16> %p)
732define void @test_v2i64_v8i16(<8 x i16>* %p, <2 x i64>* %q) {
733; CHECK: rev64 v{{[0-9]+}}.8h
734; CHECK: ext
735; CHECK: ext
736    %1 = load <8 x i16>* %p
737    %2 = add <8 x i16> %1, %1
738    %3 = call <2 x i64> @test_v2i64_v8i16_helper(<8 x i16> %2)
739    %4 = add <2 x i64> %3, %3
740    store <2 x i64> %4, <2 x i64>* %q
741    ret void
742}
743
744; CHECK-LABEL: test_v2i64_v16i8:
745declare <2 x i64> @test_v2i64_v16i8_helper(<16 x i8> %p)
746define void @test_v2i64_v16i8(<16 x i8>* %p, <2 x i64>* %q) {
747; CHECK: rev64 v{{[0-9]+}}.16b
748; CHECK: ext
749; CHECK: ext
750    %1 = load <16 x i8>* %p
751    %2 = add <16 x i8> %1, %1
752    %3 = call <2 x i64> @test_v2i64_v16i8_helper(<16 x i8> %2)
753    %4 = add <2 x i64> %3, %3
754    store <2 x i64> %4, <2 x i64>* %q
755    ret void
756}
757
758; CHECK-LABEL: test_v4f32_f128:
759declare <4 x float> @test_v4f32_f128_helper(fp128 %p)
760define void @test_v4f32_f128(fp128* %p, <4 x float>* %q) {
761; CHECK: rev64 v{{[0-9]+}}.4s
762; CHECK: ext
763    %1 = load fp128* %p
764    %2 = fadd fp128 %1, %1
765    %3 = call <4 x float> @test_v4f32_f128_helper(fp128 %2)
766    %4 = fadd <4 x float> %3, %3
767    store <4 x float> %4, <4 x float>* %q
768    ret void
769}
770
771; CHECK-LABEL: test_v4f32_v2f64:
772declare <4 x float> @test_v4f32_v2f64_helper(<2 x double> %p)
773define void @test_v4f32_v2f64(<2 x double>* %p, <4 x float>* %q) {
774; CHECK: ext
775; CHECK: rev64 v{{[0-9]+}}.4s
776; CHECK: ext
777    %1 = load <2 x double>* %p
778    %2 = fadd <2 x double> %1, %1
779    %3 = call <4 x float> @test_v4f32_v2f64_helper(<2 x double> %2)
780    %4 = fadd <4 x float> %3, %3
781    store <4 x float> %4, <4 x float>* %q
782    ret void
783}
784
785; CHECK-LABEL: test_v4f32_v2i64:
786declare <4 x float> @test_v4f32_v2i64_helper(<2 x i64> %p)
787define void @test_v4f32_v2i64(<2 x i64>* %p, <4 x float>* %q) {
788; CHECK: ext
789; CHECK: rev64 v{{[0-9]+}}.4s
790; CHECK: ext
791    %1 = load <2 x i64>* %p
792    %2 = add <2 x i64> %1, %1
793    %3 = call <4 x float> @test_v4f32_v2i64_helper(<2 x i64> %2)
794    %4 = fadd <4 x float> %3, %3
795    store <4 x float> %4, <4 x float>* %q
796    ret void
797}
798
799; CHECK-LABEL: test_v4f32_v4i32:
800declare <4 x float> @test_v4f32_v4i32_helper(<4 x i32> %p)
801define void @test_v4f32_v4i32(<4 x i32>* %p, <4 x float>* %q) {
802; CHECK: rev64 v{{[0-9]+}}.4s
803; CHECK: ext
804; CHECK: rev64 v{{[0-9]+}}.4s
805; CHECK: ext
806    %1 = load <4 x i32>* %p
807    %2 = add <4 x i32> %1, %1
808    %3 = call <4 x float> @test_v4f32_v4i32_helper(<4 x i32> %2)
809    %4 = fadd <4 x float> %3, %3
810    store <4 x float> %4, <4 x float>* %q
811    ret void
812}
813
814; CHECK-LABEL: test_v4f32_v8i16:
815declare <4 x float> @test_v4f32_v8i16_helper(<8 x i16> %p)
816define void @test_v4f32_v8i16(<8 x i16>* %p, <4 x float>* %q) {
817; CHECK: rev64 v{{[0-9]+}}.8h
818; CHECK: ext
819; CHECK: rev64 v{{[0-9]+}}.4s
820; CHECK: ext
821    %1 = load <8 x i16>* %p
822    %2 = add <8 x i16> %1, %1
823    %3 = call <4 x float> @test_v4f32_v8i16_helper(<8 x i16> %2)
824    %4 = fadd <4 x float> %3, %3
825    store <4 x float> %4, <4 x float>* %q
826    ret void
827}
828
829; CHECK-LABEL: test_v4f32_v16i8:
830declare <4 x float> @test_v4f32_v16i8_helper(<16 x i8> %p)
831define void @test_v4f32_v16i8(<16 x i8>* %p, <4 x float>* %q) {
832; CHECK: rev64 v{{[0-9]+}}.16b
833; CHECK: ext
834; CHECK: rev64 v{{[0-9]+}}.4s
835; CHECK: ext
836    %1 = load <16 x i8>* %p
837    %2 = add <16 x i8> %1, %1
838    %3 = call <4 x float> @test_v4f32_v16i8_helper(<16 x i8> %2)
839    %4 = fadd <4 x float> %3, %3
840    store <4 x float> %4, <4 x float>* %q
841    ret void
842}
843
844; CHECK-LABEL: test_v4i32_f128:
845declare <4 x i32> @test_v4i32_f128_helper(fp128 %p)
846define void @test_v4i32_f128(fp128* %p, <4 x i32>* %q) {
847; CHECK: rev64 v{{[0-9]+}}.4s
848; CHECK: ext
849    %1 = load fp128* %p
850    %2 = fadd fp128 %1, %1
851    %3 = call <4 x i32> @test_v4i32_f128_helper(fp128 %2)
852    %4 = add <4 x i32> %3, %3
853    store <4 x i32> %4, <4 x i32>* %q
854    ret void
855}
856
857; CHECK-LABEL: test_v4i32_v2f64:
858declare <4 x i32> @test_v4i32_v2f64_helper(<2 x double> %p)
859define void @test_v4i32_v2f64(<2 x double>* %p, <4 x i32>* %q) {
860; CHECK: ext
861; CHECK: rev64 v{{[0-9]+}}.4s
862; CHECK: ext
863    %1 = load <2 x double>* %p
864    %2 = fadd <2 x double> %1, %1
865    %3 = call <4 x i32> @test_v4i32_v2f64_helper(<2 x double> %2)
866    %4 = add <4 x i32> %3, %3
867    store <4 x i32> %4, <4 x i32>* %q
868    ret void
869}
870
871; CHECK-LABEL: test_v4i32_v2i64:
872declare <4 x i32> @test_v4i32_v2i64_helper(<2 x i64> %p)
873define void @test_v4i32_v2i64(<2 x i64>* %p, <4 x i32>* %q) {
874; CHECK: ext
875; CHECK: rev64 v{{[0-9]+}}.4s
876; CHECK: ext
877    %1 = load <2 x i64>* %p
878    %2 = add <2 x i64> %1, %1
879    %3 = call <4 x i32> @test_v4i32_v2i64_helper(<2 x i64> %2)
880    %4 = add <4 x i32> %3, %3
881    store <4 x i32> %4, <4 x i32>* %q
882    ret void
883}
884
885; CHECK-LABEL: test_v4i32_v4f32:
886declare <4 x i32> @test_v4i32_v4f32_helper(<4 x float> %p)
887define void @test_v4i32_v4f32(<4 x float>* %p, <4 x i32>* %q) {
888; CHECK: rev64 v{{[0-9]+}}.4s
889; CHECK: ext
890; CHECK: rev64 v{{[0-9]+}}.4s
891; CHECK: ext
892    %1 = load <4 x float>* %p
893    %2 = fadd <4 x float> %1, %1
894    %3 = call <4 x i32> @test_v4i32_v4f32_helper(<4 x float> %2)
895    %4 = add <4 x i32> %3, %3
896    store <4 x i32> %4, <4 x i32>* %q
897    ret void
898}
899
900; CHECK-LABEL: test_v4i32_v8i16:
901declare <4 x i32> @test_v4i32_v8i16_helper(<8 x i16> %p)
902define void @test_v4i32_v8i16(<8 x i16>* %p, <4 x i32>* %q) {
903; CHECK: rev64 v{{[0-9]+}}.8h
904; CHECK: ext
905; CHECK: rev64 v{{[0-9]+}}.4s
906; CHECK: ext
907    %1 = load <8 x i16>* %p
908    %2 = add <8 x i16> %1, %1
909    %3 = call <4 x i32> @test_v4i32_v8i16_helper(<8 x i16> %2)
910    %4 = add <4 x i32> %3, %3
911    store <4 x i32> %4, <4 x i32>* %q
912    ret void
913}
914
915; CHECK-LABEL: test_v4i32_v16i8:
916declare <4 x i32> @test_v4i32_v16i8_helper(<16 x i8> %p)
917define void @test_v4i32_v16i8(<16 x i8>* %p, <4 x i32>* %q) {
918; CHECK: rev64 v{{[0-9]+}}.16b
919; CHECK: ext
920; CHECK: rev64 v{{[0-9]+}}.4s
921; CHECK: ext
922    %1 = load <16 x i8>* %p
923    %2 = add <16 x i8> %1, %1
924    %3 = call <4 x i32> @test_v4i32_v16i8_helper(<16 x i8> %2)
925    %4 = add <4 x i32> %3, %3
926    store <4 x i32> %4, <4 x i32>* %q
927    ret void
928}
929
930; CHECK-LABEL: test_v8i16_f128:
931declare <8 x i16> @test_v8i16_f128_helper(fp128 %p)
932define void @test_v8i16_f128(fp128* %p, <8 x i16>* %q) {
933; CHECK: rev64 v{{[0-9]+}}.8h
934; CHECK: ext
935    %1 = load fp128* %p
936    %2 = fadd fp128 %1, %1
937    %3 = call <8 x i16> @test_v8i16_f128_helper(fp128 %2)
938    %4 = add <8 x i16> %3, %3
939    store <8 x i16> %4, <8 x i16>* %q
940    ret void
941}
942
943; CHECK-LABEL: test_v8i16_v2f64:
944declare <8 x i16> @test_v8i16_v2f64_helper(<2 x double> %p)
945define void @test_v8i16_v2f64(<2 x double>* %p, <8 x i16>* %q) {
946; CHECK: ext
947; CHECK: rev64 v{{[0-9]+}}.8h
948; CHECK: ext
949    %1 = load <2 x double>* %p
950    %2 = fadd <2 x double> %1, %1
951    %3 = call <8 x i16> @test_v8i16_v2f64_helper(<2 x double> %2)
952    %4 = add <8 x i16> %3, %3
953    store <8 x i16> %4, <8 x i16>* %q
954    ret void
955}
956
957; CHECK-LABEL: test_v8i16_v2i64:
958declare <8 x i16> @test_v8i16_v2i64_helper(<2 x i64> %p)
959define void @test_v8i16_v2i64(<2 x i64>* %p, <8 x i16>* %q) {
960; CHECK: ext
961; CHECK: rev64 v{{[0-9]+}}.8h
962; CHECK: ext
963    %1 = load <2 x i64>* %p
964    %2 = add <2 x i64> %1, %1
965    %3 = call <8 x i16> @test_v8i16_v2i64_helper(<2 x i64> %2)
966    %4 = add <8 x i16> %3, %3
967    store <8 x i16> %4, <8 x i16>* %q
968    ret void
969}
970
971; CHECK-LABEL: test_v8i16_v4f32:
972declare <8 x i16> @test_v8i16_v4f32_helper(<4 x float> %p)
973define void @test_v8i16_v4f32(<4 x float>* %p, <8 x i16>* %q) {
974; CHECK: rev64 v{{[0-9]+}}.4s
975; CHECK: ext
976; CHECK: rev64 v{{[0-9]+}}.8h
977; CHECK: ext
978    %1 = load <4 x float>* %p
979    %2 = fadd <4 x float> %1, %1
980    %3 = call <8 x i16> @test_v8i16_v4f32_helper(<4 x float> %2)
981    %4 = add <8 x i16> %3, %3
982    store <8 x i16> %4, <8 x i16>* %q
983    ret void
984}
985
986; CHECK-LABEL: test_v8i16_v4i32:
987declare <8 x i16> @test_v8i16_v4i32_helper(<4 x i32> %p)
988define void @test_v8i16_v4i32(<4 x i32>* %p, <8 x i16>* %q) {
989; CHECK: rev64 v{{[0-9]+}}.4s
990; CHECK: ext
991; CHECK: rev64 v{{[0-9]+}}.8h
992; CHECK: ext
993    %1 = load <4 x i32>* %p
994    %2 = add <4 x i32> %1, %1
995    %3 = call <8 x i16> @test_v8i16_v4i32_helper(<4 x i32> %2)
996    %4 = add <8 x i16> %3, %3
997    store <8 x i16> %4, <8 x i16>* %q
998    ret void
999}
1000
1001; CHECK-LABEL: test_v8i16_v16i8:
1002declare <8 x i16> @test_v8i16_v16i8_helper(<16 x i8> %p)
1003define void @test_v8i16_v16i8(<16 x i8>* %p, <8 x i16>* %q) {
1004; CHECK: rev64 v{{[0-9]+}}.16b
1005; CHECK: ext
1006; CHECK: rev64 v{{[0-9]+}}.8h
1007; CHECK: ext
1008    %1 = load <16 x i8>* %p
1009    %2 = add <16 x i8> %1, %1
1010    %3 = call <8 x i16> @test_v8i16_v16i8_helper(<16 x i8> %2)
1011    %4 = add <8 x i16> %3, %3
1012    store <8 x i16> %4, <8 x i16>* %q
1013    ret void
1014}
1015
1016; CHECK-LABEL: test_v16i8_f128:
1017declare <16 x i8> @test_v16i8_f128_helper(fp128 %p)
1018define void @test_v16i8_f128(fp128* %p, <16 x i8>* %q) {
1019; CHECK: rev64 v{{[0-9]+}}.16b
1020; CHECK: ext
1021    %1 = load fp128* %p
1022    %2 = fadd fp128 %1, %1
1023    %3 = call <16 x i8> @test_v16i8_f128_helper(fp128 %2)
1024    %4 = add <16 x i8> %3, %3
1025    store <16 x i8> %4, <16 x i8>* %q
1026    ret void
1027}
1028
1029; CHECK-LABEL: test_v16i8_v2f64:
1030declare <16 x i8> @test_v16i8_v2f64_helper(<2 x double> %p)
1031define void @test_v16i8_v2f64(<2 x double>* %p, <16 x i8>* %q) {
1032; CHECK: ext
1033; CHECK: rev64 v{{[0-9]+}}.16b
1034; CHECK: ext
1035    %1 = load <2 x double>* %p
1036    %2 = fadd <2 x double> %1, %1
1037    %3 = call <16 x i8> @test_v16i8_v2f64_helper(<2 x double> %2)
1038    %4 = add <16 x i8> %3, %3
1039    store <16 x i8> %4, <16 x i8>* %q
1040    ret void
1041}
1042
1043; CHECK-LABEL: test_v16i8_v2i64:
1044declare <16 x i8> @test_v16i8_v2i64_helper(<2 x i64> %p)
1045define void @test_v16i8_v2i64(<2 x i64>* %p, <16 x i8>* %q) {
1046; CHECK: ext
1047; CHECK: rev64 v{{[0-9]+}}.16b
1048; CHECK: ext
1049    %1 = load <2 x i64>* %p
1050    %2 = add <2 x i64> %1, %1
1051    %3 = call <16 x i8> @test_v16i8_v2i64_helper(<2 x i64> %2)
1052    %4 = add <16 x i8> %3, %3
1053    store <16 x i8> %4, <16 x i8>* %q
1054    ret void
1055}
1056
1057; CHECK-LABEL: test_v16i8_v4f32:
1058declare <16 x i8> @test_v16i8_v4f32_helper(<4 x float> %p)
1059define void @test_v16i8_v4f32(<4 x float>* %p, <16 x i8>* %q) {
1060; CHECK: rev64 v{{[0-9]+}}.4s
1061; CHECK: ext
1062; CHECK: rev64 v{{[0-9]+}}.16b
1063; CHECK: ext
1064    %1 = load <4 x float>* %p
1065    %2 = fadd <4 x float> %1, %1
1066    %3 = call <16 x i8> @test_v16i8_v4f32_helper(<4 x float> %2)
1067    %4 = add <16 x i8> %3, %3
1068    store <16 x i8> %4, <16 x i8>* %q
1069    ret void
1070}
1071
1072; CHECK-LABEL: test_v16i8_v4i32:
1073declare <16 x i8> @test_v16i8_v4i32_helper(<4 x i32> %p)
1074define void @test_v16i8_v4i32(<4 x i32>* %p, <16 x i8>* %q) {
1075; CHECK: rev64 v{{[0-9]+}}.4s
1076; CHECK: ext
1077; CHECK: rev64 v{{[0-9]+}}.16b
1078; CHECK: ext
1079    %1 = load <4 x i32>* %p
1080    %2 = add <4 x i32> %1, %1
1081    %3 = call <16 x i8> @test_v16i8_v4i32_helper(<4 x i32> %2)
1082    %4 = add <16 x i8> %3, %3
1083    store <16 x i8> %4, <16 x i8>* %q
1084    ret void
1085}
1086
1087; CHECK-LABEL: test_v16i8_v8i16:
1088declare <16 x i8> @test_v16i8_v8i16_helper(<8 x i16> %p)
1089define void @test_v16i8_v8i16(<8 x i16>* %p, <16 x i8>* %q) {
1090; CHECK: rev64 v{{[0-9]+}}.8h
1091; CHECK: ext
1092; CHECK: rev64 v{{[0-9]+}}.16b
1093; CHECK: ext
1094    %1 = load <8 x i16>* %p
1095    %2 = add <8 x i16> %1, %1
1096    %3 = call <16 x i8> @test_v16i8_v8i16_helper(<8 x i16> %2)
1097    %4 = add <16 x i8> %3, %3
1098    store <16 x i8> %4, <16 x i8>* %q
1099    ret void
1100}
1101