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
4 ; CHECK-LABEL: test_i64_f64:
5 declare i64 @test_i64_f64_helper(double %p)
6 define void @test_i64_f64(double* %p, i64* %q) {
9 %2 = fadd double %1, %1
10 %3 = call i64 @test_i64_f64_helper(double %2)
16 ; CHECK-LABEL: test_i64_v1i64:
17 declare i64 @test_i64_v1i64_helper(<1 x i64> %p)
18 define void @test_i64_v1i64(<1 x i64>* %p, i64* %q) {
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)
28 ; CHECK-LABEL: test_i64_v2f32:
29 declare i64 @test_i64_v2f32_helper(<2 x float> %p)
30 define 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)
40 ; CHECK-LABEL: test_i64_v2i32:
41 declare i64 @test_i64_v2i32_helper(<2 x i32> %p)
42 define 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)
52 ; CHECK-LABEL: test_i64_v4i16:
53 declare i64 @test_i64_v4i16_helper(<4 x i16> %p)
54 define 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)
64 ; CHECK-LABEL: test_i64_v8i8:
65 declare i64 @test_i64_v8i8_helper(<8 x i8> %p)
66 define 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)
76 ; CHECK-LABEL: test_f64_i64:
77 declare double @test_f64_i64_helper(i64 %p)
78 define void @test_f64_i64(i64* %p, double* %q) {
82 %3 = call double @test_f64_i64_helper(i64 %2)
83 %4 = fadd double %3, %3
84 store double %4, double* %q
88 ; CHECK-LABEL: test_f64_v1i64:
89 declare double @test_f64_v1i64_helper(<1 x i64> %p)
90 define void @test_f64_v1i64(<1 x i64>* %p, double* %q) {
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
100 ; CHECK-LABEL: test_f64_v2f32:
101 declare double @test_f64_v2f32_helper(<2 x float> %p)
102 define 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
112 ; CHECK-LABEL: test_f64_v2i32:
113 declare double @test_f64_v2i32_helper(<2 x i32> %p)
114 define 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
124 ; CHECK-LABEL: test_f64_v4i16:
125 declare double @test_f64_v4i16_helper(<4 x i16> %p)
126 define 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
136 ; CHECK-LABEL: test_f64_v8i8:
137 declare double @test_f64_v8i8_helper(<8 x i8> %p)
138 define 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
148 ; CHECK-LABEL: test_v1i64_i64:
149 declare <1 x i64> @test_v1i64_i64_helper(i64 %p)
150 define void @test_v1i64_i64(i64* %p, <1 x i64>* %q) {
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
160 ; CHECK-LABEL: test_v1i64_f64:
161 declare <1 x i64> @test_v1i64_f64_helper(double %p)
162 define void @test_v1i64_f64(double* %p, <1 x i64>* %q) {
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
172 ; CHECK-LABEL: test_v1i64_v2f32:
173 declare <1 x i64> @test_v1i64_v2f32_helper(<2 x float> %p)
174 define 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
184 ; CHECK-LABEL: test_v1i64_v2i32:
185 declare <1 x i64> @test_v1i64_v2i32_helper(<2 x i32> %p)
186 define 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
196 ; CHECK-LABEL: test_v1i64_v4i16:
197 declare <1 x i64> @test_v1i64_v4i16_helper(<4 x i16> %p)
198 define 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
208 ; CHECK-LABEL: test_v1i64_v8i8:
209 declare <1 x i64> @test_v1i64_v8i8_helper(<8 x i8> %p)
210 define 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
220 ; CHECK-LABEL: test_v2f32_i64:
221 declare <2 x float> @test_v2f32_i64_helper(i64 %p)
222 define void @test_v2f32_i64(i64* %p, <2 x float>* %q) {
223 ; CHECK: rev64 v{{[0-9]+}}.2s
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
232 ; CHECK-LABEL: test_v2f32_f64:
233 declare <2 x float> @test_v2f32_f64_helper(double %p)
234 define void @test_v2f32_f64(double* %p, <2 x float>* %q) {
235 ; CHECK: rev64 v{{[0-9]+}}.2s
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
244 ; CHECK-LABEL: test_v2f32_v1i64:
245 declare <2 x float> @test_v2f32_v1i64_helper(<1 x i64> %p)
246 define 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
256 ; CHECK-LABEL: test_v2f32_v2i32:
257 declare <2 x float> @test_v2f32_v2i32_helper(<2 x i32> %p)
258 define 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
269 ; CHECK-LABEL: test_v2f32_v4i16:
270 declare <2 x float> @test_v2f32_v4i16_helper(<4 x i16> %p)
271 define 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
282 ; CHECK-LABEL: test_v2f32_v8i8:
283 declare <2 x float> @test_v2f32_v8i8_helper(<8 x i8> %p)
284 define 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
295 ; CHECK-LABEL: test_v2i32_i64:
296 declare <2 x i32> @test_v2i32_i64_helper(i64 %p)
297 define void @test_v2i32_i64(i64* %p, <2 x i32>* %q) {
298 ; CHECK: rev64 v{{[0-9]+}}.2s
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
307 ; CHECK-LABEL: test_v2i32_f64:
308 declare <2 x i32> @test_v2i32_f64_helper(double %p)
309 define void @test_v2i32_f64(double* %p, <2 x i32>* %q) {
310 ; CHECK: rev64 v{{[0-9]+}}.2s
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
319 ; CHECK-LABEL: test_v2i32_v1i64:
320 declare <2 x i32> @test_v2i32_v1i64_helper(<1 x i64> %p)
321 define 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
331 ; CHECK-LABEL: test_v2i32_v2f32:
332 declare <2 x i32> @test_v2i32_v2f32_helper(<2 x float> %p)
333 define 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
344 ; CHECK-LABEL: test_v2i32_v4i16:
345 declare <2 x i32> @test_v2i32_v4i16_helper(<4 x i16> %p)
346 define 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
357 ; CHECK-LABEL: test_v2i32_v8i8:
358 declare <2 x i32> @test_v2i32_v8i8_helper(<8 x i8> %p)
359 define 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
370 ; CHECK-LABEL: test_v4i16_i64:
371 declare <4 x i16> @test_v4i16_i64_helper(i64 %p)
372 define void @test_v4i16_i64(i64* %p, <4 x i16>* %q) {
373 ; CHECK: rev64 v{{[0-9]+}}.4h
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
382 ; CHECK-LABEL: test_v4i16_f64:
383 declare <4 x i16> @test_v4i16_f64_helper(double %p)
384 define void @test_v4i16_f64(double* %p, <4 x i16>* %q) {
385 ; CHECK: rev64 v{{[0-9]+}}.4h
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
394 ; CHECK-LABEL: test_v4i16_v1i64:
395 declare <4 x i16> @test_v4i16_v1i64_helper(<1 x i64> %p)
396 define 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
406 ; CHECK-LABEL: test_v4i16_v2f32:
407 declare <4 x i16> @test_v4i16_v2f32_helper(<2 x float> %p)
408 define 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
419 ; CHECK-LABEL: test_v4i16_v2i32:
420 declare <4 x i16> @test_v4i16_v2i32_helper(<2 x i32> %p)
421 define 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
432 ; CHECK-LABEL: test_v4i16_v8i8:
433 declare <4 x i16> @test_v4i16_v8i8_helper(<8 x i8> %p)
434 define 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
445 ; CHECK-LABEL: test_v8i8_i64:
446 declare <8 x i8> @test_v8i8_i64_helper(i64 %p)
447 define void @test_v8i8_i64(i64* %p, <8 x i8>* %q) {
448 ; CHECK: rev64 v{{[0-9]+}}.8b
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
457 ; CHECK-LABEL: test_v8i8_f64:
458 declare <8 x i8> @test_v8i8_f64_helper(double %p)
459 define void @test_v8i8_f64(double* %p, <8 x i8>* %q) {
460 ; CHECK: rev64 v{{[0-9]+}}.8b
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
469 ; CHECK-LABEL: test_v8i8_v1i64:
470 declare <8 x i8> @test_v8i8_v1i64_helper(<1 x i64> %p)
471 define 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
481 ; CHECK-LABEL: test_v8i8_v2f32:
482 declare <8 x i8> @test_v8i8_v2f32_helper(<2 x float> %p)
483 define 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
494 ; CHECK-LABEL: test_v8i8_v2i32:
495 declare <8 x i8> @test_v8i8_v2i32_helper(<2 x i32> %p)
496 define 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
507 ; CHECK-LABEL: test_v8i8_v4i16:
508 declare <8 x i8> @test_v8i8_v4i16_helper(<4 x i16> %p)
509 define 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
520 ; CHECK-LABEL: test_f128_v2f64:
521 declare fp128 @test_f128_v2f64_helper(<2 x double> %p)
522 define void @test_f128_v2f64(<2 x double>* %p, fp128* %q) {
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
532 ; CHECK-LABEL: test_f128_v2i64:
533 declare fp128 @test_f128_v2i64_helper(<2 x i64> %p)
534 define void @test_f128_v2i64(<2 x i64>* %p, fp128* %q) {
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
544 ; CHECK-LABEL: test_f128_v4f32:
545 declare fp128 @test_f128_v4f32_helper(<4 x float> %p)
546 define void @test_f128_v4f32(<4 x float>* %p, fp128* %q) {
547 ; CHECK: rev64 v{{[0-9]+}}.4s
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
557 ; CHECK-LABEL: test_f128_v4i32:
558 declare fp128 @test_f128_v4i32_helper(<4 x i32> %p)
559 define void @test_f128_v4i32(<4 x i32>* %p, fp128* %q) {
560 ; CHECK: rev64 v{{[0-9]+}}.4s
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
570 ; CHECK-LABEL: test_f128_v8i16:
571 declare fp128 @test_f128_v8i16_helper(<8 x i16> %p)
572 define void @test_f128_v8i16(<8 x i16>* %p, fp128* %q) {
573 ; CHECK: rev64 v{{[0-9]+}}.8h
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
583 ; CHECK-LABEL: test_f128_v16i8:
584 declare fp128 @test_f128_v16i8_helper(<16 x i8> %p)
585 define void @test_f128_v16i8(<16 x i8>* %p, fp128* %q) {
586 ; CHECK: rev64 v{{[0-9]+}}.16b
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
596 ; CHECK-LABEL: test_v2f64_f128:
597 declare <2 x double> @test_v2f64_f128_helper(fp128 %p)
598 define void @test_v2f64_f128(fp128* %p, <2 x double>* %q) {
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
608 ; CHECK-LABEL: test_v2f64_v2i64:
609 declare <2 x double> @test_v2f64_v2i64_helper(<2 x i64> %p)
610 define void @test_v2f64_v2i64(<2 x i64>* %p, <2 x double>* %q) {
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
621 ; CHECK-LABEL: test_v2f64_v4f32:
622 declare <2 x double> @test_v2f64_v4f32_helper(<4 x float> %p)
623 define void @test_v2f64_v4f32(<4 x float>* %p, <2 x double>* %q) {
624 ; CHECK: rev64 v{{[0-9]+}}.4s
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
635 ; CHECK-LABEL: test_v2f64_v4i32:
636 declare <2 x double> @test_v2f64_v4i32_helper(<4 x i32> %p)
637 define void @test_v2f64_v4i32(<4 x i32>* %p, <2 x double>* %q) {
638 ; CHECK: rev64 v{{[0-9]+}}.4s
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
649 ; CHECK-LABEL: test_v2f64_v8i16:
650 declare <2 x double> @test_v2f64_v8i16_helper(<8 x i16> %p)
651 define void @test_v2f64_v8i16(<8 x i16>* %p, <2 x double>* %q) {
652 ; CHECK: rev64 v{{[0-9]+}}.8h
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
663 ; CHECK-LABEL: test_v2f64_v16i8:
664 declare <2 x double> @test_v2f64_v16i8_helper(<16 x i8> %p)
665 define void @test_v2f64_v16i8(<16 x i8>* %p, <2 x double>* %q) {
666 ; CHECK: rev64 v{{[0-9]+}}.16b
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
677 ; CHECK-LABEL: test_v2i64_f128:
678 declare <2 x i64> @test_v2i64_f128_helper(fp128 %p)
679 define void @test_v2i64_f128(fp128* %p, <2 x i64>* %q) {
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
689 ; CHECK-LABEL: test_v2i64_v2f64:
690 declare <2 x i64> @test_v2i64_v2f64_helper(<2 x double> %p)
691 define void @test_v2i64_v2f64(<2 x double>* %p, <2 x i64>* %q) {
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
702 ; CHECK-LABEL: test_v2i64_v4f32:
703 declare <2 x i64> @test_v2i64_v4f32_helper(<4 x float> %p)
704 define void @test_v2i64_v4f32(<4 x float>* %p, <2 x i64>* %q) {
705 ; CHECK: rev64 v{{[0-9]+}}.4s
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
716 ; CHECK-LABEL: test_v2i64_v4i32:
717 declare <2 x i64> @test_v2i64_v4i32_helper(<4 x i32> %p)
718 define void @test_v2i64_v4i32(<4 x i32>* %p, <2 x i64>* %q) {
719 ; CHECK: rev64 v{{[0-9]+}}.4s
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
730 ; CHECK-LABEL: test_v2i64_v8i16:
731 declare <2 x i64> @test_v2i64_v8i16_helper(<8 x i16> %p)
732 define void @test_v2i64_v8i16(<8 x i16>* %p, <2 x i64>* %q) {
733 ; CHECK: rev64 v{{[0-9]+}}.8h
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
744 ; CHECK-LABEL: test_v2i64_v16i8:
745 declare <2 x i64> @test_v2i64_v16i8_helper(<16 x i8> %p)
746 define void @test_v2i64_v16i8(<16 x i8>* %p, <2 x i64>* %q) {
747 ; CHECK: rev64 v{{[0-9]+}}.16b
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
758 ; CHECK-LABEL: test_v4f32_f128:
759 declare <4 x float> @test_v4f32_f128_helper(fp128 %p)
760 define void @test_v4f32_f128(fp128* %p, <4 x float>* %q) {
761 ; CHECK: rev64 v{{[0-9]+}}.4s
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
771 ; CHECK-LABEL: test_v4f32_v2f64:
772 declare <4 x float> @test_v4f32_v2f64_helper(<2 x double> %p)
773 define void @test_v4f32_v2f64(<2 x double>* %p, <4 x float>* %q) {
775 ; CHECK: rev64 v{{[0-9]+}}.4s
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
785 ; CHECK-LABEL: test_v4f32_v2i64:
786 declare <4 x float> @test_v4f32_v2i64_helper(<2 x i64> %p)
787 define void @test_v4f32_v2i64(<2 x i64>* %p, <4 x float>* %q) {
789 ; CHECK: rev64 v{{[0-9]+}}.4s
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
799 ; CHECK-LABEL: test_v4f32_v4i32:
800 declare <4 x float> @test_v4f32_v4i32_helper(<4 x i32> %p)
801 define void @test_v4f32_v4i32(<4 x i32>* %p, <4 x float>* %q) {
802 ; CHECK: rev64 v{{[0-9]+}}.4s
804 ; CHECK: rev64 v{{[0-9]+}}.4s
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
814 ; CHECK-LABEL: test_v4f32_v8i16:
815 declare <4 x float> @test_v4f32_v8i16_helper(<8 x i16> %p)
816 define void @test_v4f32_v8i16(<8 x i16>* %p, <4 x float>* %q) {
817 ; CHECK: rev64 v{{[0-9]+}}.8h
819 ; CHECK: rev64 v{{[0-9]+}}.4s
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
829 ; CHECK-LABEL: test_v4f32_v16i8:
830 declare <4 x float> @test_v4f32_v16i8_helper(<16 x i8> %p)
831 define void @test_v4f32_v16i8(<16 x i8>* %p, <4 x float>* %q) {
832 ; CHECK: rev64 v{{[0-9]+}}.16b
834 ; CHECK: rev64 v{{[0-9]+}}.4s
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
844 ; CHECK-LABEL: test_v4i32_f128:
845 declare <4 x i32> @test_v4i32_f128_helper(fp128 %p)
846 define void @test_v4i32_f128(fp128* %p, <4 x i32>* %q) {
847 ; CHECK: rev64 v{{[0-9]+}}.4s
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
857 ; CHECK-LABEL: test_v4i32_v2f64:
858 declare <4 x i32> @test_v4i32_v2f64_helper(<2 x double> %p)
859 define void @test_v4i32_v2f64(<2 x double>* %p, <4 x i32>* %q) {
861 ; CHECK: rev64 v{{[0-9]+}}.4s
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
871 ; CHECK-LABEL: test_v4i32_v2i64:
872 declare <4 x i32> @test_v4i32_v2i64_helper(<2 x i64> %p)
873 define void @test_v4i32_v2i64(<2 x i64>* %p, <4 x i32>* %q) {
875 ; CHECK: rev64 v{{[0-9]+}}.4s
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
885 ; CHECK-LABEL: test_v4i32_v4f32:
886 declare <4 x i32> @test_v4i32_v4f32_helper(<4 x float> %p)
887 define void @test_v4i32_v4f32(<4 x float>* %p, <4 x i32>* %q) {
888 ; CHECK: rev64 v{{[0-9]+}}.4s
890 ; CHECK: rev64 v{{[0-9]+}}.4s
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
900 ; CHECK-LABEL: test_v4i32_v8i16:
901 declare <4 x i32> @test_v4i32_v8i16_helper(<8 x i16> %p)
902 define void @test_v4i32_v8i16(<8 x i16>* %p, <4 x i32>* %q) {
903 ; CHECK: rev64 v{{[0-9]+}}.8h
905 ; CHECK: rev64 v{{[0-9]+}}.4s
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
915 ; CHECK-LABEL: test_v4i32_v16i8:
916 declare <4 x i32> @test_v4i32_v16i8_helper(<16 x i8> %p)
917 define void @test_v4i32_v16i8(<16 x i8>* %p, <4 x i32>* %q) {
918 ; CHECK: rev64 v{{[0-9]+}}.16b
920 ; CHECK: rev64 v{{[0-9]+}}.4s
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
930 ; CHECK-LABEL: test_v8i16_f128:
931 declare <8 x i16> @test_v8i16_f128_helper(fp128 %p)
932 define void @test_v8i16_f128(fp128* %p, <8 x i16>* %q) {
933 ; CHECK: rev64 v{{[0-9]+}}.8h
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
943 ; CHECK-LABEL: test_v8i16_v2f64:
944 declare <8 x i16> @test_v8i16_v2f64_helper(<2 x double> %p)
945 define void @test_v8i16_v2f64(<2 x double>* %p, <8 x i16>* %q) {
947 ; CHECK: rev64 v{{[0-9]+}}.8h
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
957 ; CHECK-LABEL: test_v8i16_v2i64:
958 declare <8 x i16> @test_v8i16_v2i64_helper(<2 x i64> %p)
959 define void @test_v8i16_v2i64(<2 x i64>* %p, <8 x i16>* %q) {
961 ; CHECK: rev64 v{{[0-9]+}}.8h
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
971 ; CHECK-LABEL: test_v8i16_v4f32:
972 declare <8 x i16> @test_v8i16_v4f32_helper(<4 x float> %p)
973 define void @test_v8i16_v4f32(<4 x float>* %p, <8 x i16>* %q) {
974 ; CHECK: rev64 v{{[0-9]+}}.4s
976 ; CHECK: rev64 v{{[0-9]+}}.8h
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
986 ; CHECK-LABEL: test_v8i16_v4i32:
987 declare <8 x i16> @test_v8i16_v4i32_helper(<4 x i32> %p)
988 define void @test_v8i16_v4i32(<4 x i32>* %p, <8 x i16>* %q) {
989 ; CHECK: rev64 v{{[0-9]+}}.4s
991 ; CHECK: rev64 v{{[0-9]+}}.8h
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
1001 ; CHECK-LABEL: test_v8i16_v16i8:
1002 declare <8 x i16> @test_v8i16_v16i8_helper(<16 x i8> %p)
1003 define void @test_v8i16_v16i8(<16 x i8>* %p, <8 x i16>* %q) {
1004 ; CHECK: rev64 v{{[0-9]+}}.16b
1006 ; CHECK: rev64 v{{[0-9]+}}.8h
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
1016 ; CHECK-LABEL: test_v16i8_f128:
1017 declare <16 x i8> @test_v16i8_f128_helper(fp128 %p)
1018 define void @test_v16i8_f128(fp128* %p, <16 x i8>* %q) {
1019 ; CHECK: rev64 v{{[0-9]+}}.16b
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
1029 ; CHECK-LABEL: test_v16i8_v2f64:
1030 declare <16 x i8> @test_v16i8_v2f64_helper(<2 x double> %p)
1031 define void @test_v16i8_v2f64(<2 x double>* %p, <16 x i8>* %q) {
1033 ; CHECK: rev64 v{{[0-9]+}}.16b
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
1043 ; CHECK-LABEL: test_v16i8_v2i64:
1044 declare <16 x i8> @test_v16i8_v2i64_helper(<2 x i64> %p)
1045 define void @test_v16i8_v2i64(<2 x i64>* %p, <16 x i8>* %q) {
1047 ; CHECK: rev64 v{{[0-9]+}}.16b
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
1057 ; CHECK-LABEL: test_v16i8_v4f32:
1058 declare <16 x i8> @test_v16i8_v4f32_helper(<4 x float> %p)
1059 define void @test_v16i8_v4f32(<4 x float>* %p, <16 x i8>* %q) {
1060 ; CHECK: rev64 v{{[0-9]+}}.4s
1062 ; CHECK: rev64 v{{[0-9]+}}.16b
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
1072 ; CHECK-LABEL: test_v16i8_v4i32:
1073 declare <16 x i8> @test_v16i8_v4i32_helper(<4 x i32> %p)
1074 define void @test_v16i8_v4i32(<4 x i32>* %p, <16 x i8>* %q) {
1075 ; CHECK: rev64 v{{[0-9]+}}.4s
1077 ; CHECK: rev64 v{{[0-9]+}}.16b
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
1087 ; CHECK-LABEL: test_v16i8_v8i16:
1088 declare <16 x i8> @test_v16i8_v8i16_helper(<8 x i16> %p)
1089 define void @test_v16i8_v8i16(<8 x i16>* %p, <16 x i8>* %q) {
1090 ; CHECK: rev64 v{{[0-9]+}}.8h
1092 ; CHECK: rev64 v{{[0-9]+}}.16b
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