1 ; RUN: llc -mtriple aarch64_be < %s -aarch64-enable-ldst-opt=false -o - | FileCheck %s
2 ; RUN: llc -mtriple aarch64_be < %s -fast-isel=true -aarch64-enable-ldst-opt=false -o - | FileCheck %s
4 ; CHECK-LABEL: test_i64_f64:
5 define i64 @test_i64_f64(double %p) {
7 %1 = fadd double %p, %p
8 %2 = bitcast double %1 to i64
13 ; CHECK-LABEL: test_i64_v1i64:
14 define i64 @test_i64_v1i64(<1 x i64> %p) {
16 %1 = add <1 x i64> %p, %p
17 %2 = bitcast <1 x i64> %1 to i64
22 ; CHECK-LABEL: test_i64_v2f32:
23 define i64 @test_i64_v2f32(<2 x float> %p) {
24 ; CHECK: rev64 v{{[0-9]+}}.2s
25 %1 = fadd <2 x float> %p, %p
26 %2 = bitcast <2 x float> %1 to i64
31 ; CHECK-LABEL: test_i64_v2i32:
32 define i64 @test_i64_v2i32(<2 x i32> %p) {
33 ; CHECK: rev64 v{{[0-9]+}}.2s
34 %1 = add <2 x i32> %p, %p
35 %2 = bitcast <2 x i32> %1 to i64
40 ; CHECK-LABEL: test_i64_v4i16:
41 define i64 @test_i64_v4i16(<4 x i16> %p) {
42 ; CHECK: rev64 v{{[0-9]+}}.4h
43 %1 = add <4 x i16> %p, %p
44 %2 = bitcast <4 x i16> %1 to i64
49 ; CHECK-LABEL: test_i64_v8i8:
50 define i64 @test_i64_v8i8(<8 x i8> %p) {
51 ; CHECK: rev64 v{{[0-9]+}}.8b
52 %1 = add <8 x i8> %p, %p
53 %2 = bitcast <8 x i8> %1 to i64
58 ; CHECK-LABEL: test_f64_i64:
59 define double @test_f64_i64(i64 %p) {
62 %2 = bitcast i64 %1 to double
63 %3 = fadd double %2, %2
67 ; CHECK-LABEL: test_f64_v1i64:
68 define double @test_f64_v1i64(<1 x i64> %p) {
70 %1 = add <1 x i64> %p, %p
71 %2 = bitcast <1 x i64> %1 to double
72 %3 = fadd double %2, %2
76 ; CHECK-LABEL: test_f64_v2f32:
77 define double @test_f64_v2f32(<2 x float> %p) {
78 ; CHECK: rev64 v{{[0-9]+}}.2s
79 %1 = fadd <2 x float> %p, %p
80 %2 = bitcast <2 x float> %1 to double
81 %3 = fadd double %2, %2
85 ; CHECK-LABEL: test_f64_v2i32:
86 define double @test_f64_v2i32(<2 x i32> %p) {
87 ; CHECK: rev64 v{{[0-9]+}}.2s
88 %1 = add <2 x i32> %p, %p
89 %2 = bitcast <2 x i32> %1 to double
90 %3 = fadd double %2, %2
94 ; CHECK-LABEL: test_f64_v4i16:
95 define double @test_f64_v4i16(<4 x i16> %p) {
96 ; CHECK: rev64 v{{[0-9]+}}.4h
97 %1 = add <4 x i16> %p, %p
98 %2 = bitcast <4 x i16> %1 to double
99 %3 = fadd double %2, %2
103 ; CHECK-LABEL: test_f64_v8i8:
104 define double @test_f64_v8i8(<8 x i8> %p) {
105 ; CHECK: rev64 v{{[0-9]+}}.8b
106 %1 = add <8 x i8> %p, %p
107 %2 = bitcast <8 x i8> %1 to double
108 %3 = fadd double %2, %2
112 ; CHECK-LABEL: test_v1i64_i64:
113 define <1 x i64> @test_v1i64_i64(i64 %p) {
116 %2 = bitcast i64 %1 to <1 x i64>
117 %3 = add <1 x i64> %2, %2
121 ; CHECK-LABEL: test_v1i64_f64:
122 define <1 x i64> @test_v1i64_f64(double %p) {
124 %1 = fadd double %p, %p
125 %2 = bitcast double %1 to <1 x i64>
126 %3 = add <1 x i64> %2, %2
130 ; CHECK-LABEL: test_v1i64_v2f32:
131 define <1 x i64> @test_v1i64_v2f32(<2 x float> %p) {
132 ; CHECK: rev64 v{{[0-9]+}}.2s
133 %1 = fadd <2 x float> %p, %p
134 %2 = bitcast <2 x float> %1 to <1 x i64>
135 %3 = add <1 x i64> %2, %2
139 ; CHECK-LABEL: test_v1i64_v2i32:
140 define <1 x i64> @test_v1i64_v2i32(<2 x i32> %p) {
141 ; CHECK: rev64 v{{[0-9]+}}.2s
142 %1 = add <2 x i32> %p, %p
143 %2 = bitcast <2 x i32> %1 to <1 x i64>
144 %3 = add <1 x i64> %2, %2
148 ; CHECK-LABEL: test_v1i64_v4i16:
149 define <1 x i64> @test_v1i64_v4i16(<4 x i16> %p) {
150 ; CHECK: rev64 v{{[0-9]+}}.4h
151 %1 = add <4 x i16> %p, %p
152 %2 = bitcast <4 x i16> %1 to <1 x i64>
153 %3 = add <1 x i64> %2, %2
157 ; CHECK-LABEL: test_v1i64_v8i8:
158 define <1 x i64> @test_v1i64_v8i8(<8 x i8> %p) {
159 ; CHECK: rev64 v{{[0-9]+}}.8b
160 %1 = add <8 x i8> %p, %p
161 %2 = bitcast <8 x i8> %1 to <1 x i64>
162 %3 = add <1 x i64> %2, %2
166 ; CHECK-LABEL: test_v2f32_i64:
167 define <2 x float> @test_v2f32_i64(i64 %p) {
168 ; CHECK: rev64 v{{[0-9]+}}.2s
170 %2 = bitcast i64 %1 to <2 x float>
171 %3 = fadd <2 x float> %2, %2
175 ; CHECK-LABEL: test_v2f32_f64:
176 define <2 x float> @test_v2f32_f64(double %p) {
177 ; CHECK: rev64 v{{[0-9]+}}.2s
178 %1 = fadd double %p, %p
179 %2 = bitcast double %1 to <2 x float>
180 %3 = fadd <2 x float> %2, %2
184 ; CHECK-LABEL: test_v2f32_v1i64:
185 define <2 x float> @test_v2f32_v1i64(<1 x i64> %p) {
186 ; CHECK: rev64 v{{[0-9]+}}.2s
187 %1 = add <1 x i64> %p, %p
188 %2 = bitcast <1 x i64> %1 to <2 x float>
189 %3 = fadd <2 x float> %2, %2
193 ; CHECK-LABEL: test_v2f32_v2i32:
194 define <2 x float> @test_v2f32_v2i32(<2 x i32> %p) {
195 ; CHECK: rev64 v{{[0-9]+}}.2s
196 ; CHECK: rev64 v{{[0-9]+}}.2s
197 %1 = add <2 x i32> %p, %p
198 %2 = bitcast <2 x i32> %1 to <2 x float>
199 %3 = fadd <2 x float> %2, %2
203 ; CHECK-LABEL: test_v2f32_v4i16:
204 define <2 x float> @test_v2f32_v4i16(<4 x i16> %p) {
205 ; CHECK: rev64 v{{[0-9]+}}.4h
206 ; CHECK: rev64 v{{[0-9]+}}.2s
207 %1 = add <4 x i16> %p, %p
208 %2 = bitcast <4 x i16> %1 to <2 x float>
209 %3 = fadd <2 x float> %2, %2
213 ; CHECK-LABEL: test_v2f32_v8i8:
214 define <2 x float> @test_v2f32_v8i8(<8 x i8> %p) {
215 ; CHECK: rev64 v{{[0-9]+}}.8b
216 ; CHECK: rev64 v{{[0-9]+}}.2s
217 %1 = add <8 x i8> %p, %p
218 %2 = bitcast <8 x i8> %1 to <2 x float>
219 %3 = fadd <2 x float> %2, %2
223 ; CHECK-LABEL: test_v2i32_i64:
224 define <2 x i32> @test_v2i32_i64(i64 %p) {
225 ; CHECK: rev64 v{{[0-9]+}}.2s
227 %2 = bitcast i64 %1 to <2 x i32>
228 %3 = add <2 x i32> %2, %2
232 ; CHECK-LABEL: test_v2i32_f64:
233 define <2 x i32> @test_v2i32_f64(double %p) {
234 ; CHECK: rev64 v{{[0-9]+}}.2s
235 %1 = fadd double %p, %p
236 %2 = bitcast double %1 to <2 x i32>
237 %3 = add <2 x i32> %2, %2
241 ; CHECK-LABEL: test_v2i32_v1i64:
242 define <2 x i32> @test_v2i32_v1i64(<1 x i64> %p) {
243 ; CHECK: rev64 v{{[0-9]+}}.2s
244 %1 = add <1 x i64> %p, %p
245 %2 = bitcast <1 x i64> %1 to <2 x i32>
246 %3 = add <2 x i32> %2, %2
250 ; CHECK-LABEL: test_v2i32_v2f32:
251 define <2 x i32> @test_v2i32_v2f32(<2 x float> %p) {
252 ; CHECK: rev64 v{{[0-9]+}}.2s
253 ; CHECK: rev64 v{{[0-9]+}}.2s
254 %1 = fadd <2 x float> %p, %p
255 %2 = bitcast <2 x float> %1 to <2 x i32>
256 %3 = add <2 x i32> %2, %2
260 ; CHECK-LABEL: test_v2i32_v4i16:
261 define <2 x i32> @test_v2i32_v4i16(<4 x i16> %p) {
262 ; CHECK: rev64 v{{[0-9]+}}.4h
263 ; CHECK: rev64 v{{[0-9]+}}.2s
264 %1 = add <4 x i16> %p, %p
265 %2 = bitcast <4 x i16> %1 to <2 x i32>
266 %3 = add <2 x i32> %2, %2
270 ; CHECK-LABEL: test_v2i32_v8i8:
271 define <2 x i32> @test_v2i32_v8i8(<8 x i8> %p) {
272 ; CHECK: rev64 v{{[0-9]+}}.8b
273 ; CHECK: rev64 v{{[0-9]+}}.2s
274 %1 = add <8 x i8> %p, %p
275 %2 = bitcast <8 x i8> %1 to <2 x i32>
276 %3 = add <2 x i32> %2, %2
280 ; CHECK-LABEL: test_v4i16_i64:
281 define <4 x i16> @test_v4i16_i64(i64 %p) {
282 ; CHECK: rev64 v{{[0-9]+}}.4h
284 %2 = bitcast i64 %1 to <4 x i16>
285 %3 = add <4 x i16> %2, %2
289 ; CHECK-LABEL: test_v4i16_f64:
290 define <4 x i16> @test_v4i16_f64(double %p) {
291 ; CHECK: rev64 v{{[0-9]+}}.4h
292 %1 = fadd double %p, %p
293 %2 = bitcast double %1 to <4 x i16>
294 %3 = add <4 x i16> %2, %2
298 ; CHECK-LABEL: test_v4i16_v1i64:
299 define <4 x i16> @test_v4i16_v1i64(<1 x i64> %p) {
300 ; CHECK: rev64 v{{[0-9]+}}.4h
301 %1 = add <1 x i64> %p, %p
302 %2 = bitcast <1 x i64> %1 to <4 x i16>
303 %3 = add <4 x i16> %2, %2
307 ; CHECK-LABEL: test_v4i16_v2f32:
308 define <4 x i16> @test_v4i16_v2f32(<2 x float> %p) {
309 ; CHECK: rev64 v{{[0-9]+}}.2s
310 ; CHECK: rev64 v{{[0-9]+}}.4h
311 %1 = fadd <2 x float> %p, %p
312 %2 = bitcast <2 x float> %1 to <4 x i16>
313 %3 = add <4 x i16> %2, %2
317 ; CHECK-LABEL: test_v4i16_v2i32:
318 define <4 x i16> @test_v4i16_v2i32(<2 x i32> %p) {
319 ; CHECK: rev64 v{{[0-9]+}}.2s
320 ; CHECK: rev64 v{{[0-9]+}}.4h
321 %1 = add <2 x i32> %p, %p
322 %2 = bitcast <2 x i32> %1 to <4 x i16>
323 %3 = add <4 x i16> %2, %2
327 ; CHECK-LABEL: test_v4i16_v8i8:
328 define <4 x i16> @test_v4i16_v8i8(<8 x i8> %p) {
329 ; CHECK: rev64 v{{[0-9]+}}.8b
330 ; CHECK: rev64 v{{[0-9]+}}.4h
331 %1 = add <8 x i8> %p, %p
332 %2 = bitcast <8 x i8> %1 to <4 x i16>
333 %3 = add <4 x i16> %2, %2
337 ; CHECK-LABEL: test_v8i8_i64:
338 define <8 x i8> @test_v8i8_i64(i64 %p) {
339 ; CHECK: rev64 v{{[0-9]+}}.8b
341 %2 = bitcast i64 %1 to <8 x i8>
342 %3 = add <8 x i8> %2, %2
346 ; CHECK-LABEL: test_v8i8_f64:
347 define <8 x i8> @test_v8i8_f64(double %p) {
348 ; CHECK: rev64 v{{[0-9]+}}.8b
349 %1 = fadd double %p, %p
350 %2 = bitcast double %1 to <8 x i8>
351 %3 = add <8 x i8> %2, %2
355 ; CHECK-LABEL: test_v8i8_v1i64:
356 define <8 x i8> @test_v8i8_v1i64(<1 x i64> %p) {
357 ; CHECK: rev64 v{{[0-9]+}}.8b
358 %1 = add <1 x i64> %p, %p
359 %2 = bitcast <1 x i64> %1 to <8 x i8>
360 %3 = add <8 x i8> %2, %2
364 ; CHECK-LABEL: test_v8i8_v2f32:
365 define <8 x i8> @test_v8i8_v2f32(<2 x float> %p) {
366 ; CHECK: rev64 v{{[0-9]+}}.2s
367 ; CHECK: rev64 v{{[0-9]+}}.8b
368 %1 = fadd <2 x float> %p, %p
369 %2 = bitcast <2 x float> %1 to <8 x i8>
370 %3 = add <8 x i8> %2, %2
374 ; CHECK-LABEL: test_v8i8_v2i32:
375 define <8 x i8> @test_v8i8_v2i32(<2 x i32> %p) {
376 ; CHECK: rev64 v{{[0-9]+}}.2s
377 ; CHECK: rev64 v{{[0-9]+}}.8b
378 %1 = add <2 x i32> %p, %p
379 %2 = bitcast <2 x i32> %1 to <8 x i8>
380 %3 = add <8 x i8> %2, %2
384 ; CHECK-LABEL: test_v8i8_v4i16:
385 define <8 x i8> @test_v8i8_v4i16(<4 x i16> %p) {
386 ; CHECK: rev64 v{{[0-9]+}}.4h
387 ; CHECK: rev64 v{{[0-9]+}}.8b
388 %1 = add <4 x i16> %p, %p
389 %2 = bitcast <4 x i16> %1 to <8 x i8>
390 %3 = add <8 x i8> %2, %2
394 ; CHECK-LABEL: test_f128_v2f64:
395 define fp128 @test_f128_v2f64(<2 x double> %p) {
397 %1 = fadd <2 x double> %p, %p
398 %2 = bitcast <2 x double> %1 to fp128
399 %3 = fadd fp128 %2, %2
403 ; CHECK-LABEL: test_f128_v2i64:
404 define fp128 @test_f128_v2i64(<2 x i64> %p) {
406 %1 = add <2 x i64> %p, %p
407 %2 = bitcast <2 x i64> %1 to fp128
408 %3 = fadd fp128 %2, %2
412 ; CHECK-LABEL: test_f128_v4f32:
413 define fp128 @test_f128_v4f32(<4 x float> %p) {
414 ; CHECK: rev64 v{{[0-9]+}}.4s
416 %1 = fadd <4 x float> %p, %p
417 %2 = bitcast <4 x float> %1 to fp128
418 %3 = fadd fp128 %2, %2
422 ; CHECK-LABEL: test_f128_v4i32:
423 define fp128 @test_f128_v4i32(<4 x i32> %p) {
424 ; CHECK: rev64 v{{[0-9]+}}.4s
426 %1 = add <4 x i32> %p, %p
427 %2 = bitcast <4 x i32> %1 to fp128
428 %3 = fadd fp128 %2, %2
432 ; CHECK-LABEL: test_f128_v8i16:
433 define fp128 @test_f128_v8i16(<8 x i16> %p) {
434 ; CHECK: rev64 v{{[0-9]+}}.8h
436 %1 = add <8 x i16> %p, %p
437 %2 = bitcast <8 x i16> %1 to fp128
438 %3 = fadd fp128 %2, %2
442 ; CHECK-LABEL: test_f128_v16i8:
443 define fp128 @test_f128_v16i8(<16 x i8> %p) {
444 ; CHECK: rev64 v{{[0-9]+}}.16b
446 %1 = add <16 x i8> %p, %p
447 %2 = bitcast <16 x i8> %1 to fp128
448 %3 = fadd fp128 %2, %2
452 ; CHECK-LABEL: test_v2f64_f128:
453 define <2 x double> @test_v2f64_f128(fp128 %p) {
455 %1 = fadd fp128 %p, %p
456 %2 = bitcast fp128 %1 to <2 x double>
457 %3 = fadd <2 x double> %2, %2
461 ; CHECK-LABEL: test_v2f64_v2i64:
462 define <2 x double> @test_v2f64_v2i64(<2 x i64> %p) {
465 %1 = add <2 x i64> %p, %p
466 %2 = bitcast <2 x i64> %1 to <2 x double>
467 %3 = fadd <2 x double> %2, %2
471 ; CHECK-LABEL: test_v2f64_v4f32:
472 define <2 x double> @test_v2f64_v4f32(<4 x float> %p) {
473 ; CHECK: rev64 v{{[0-9]+}}.4s
476 %1 = fadd <4 x float> %p, %p
477 %2 = bitcast <4 x float> %1 to <2 x double>
478 %3 = fadd <2 x double> %2, %2
482 ; CHECK-LABEL: test_v2f64_v4i32:
483 define <2 x double> @test_v2f64_v4i32(<4 x i32> %p) {
484 ; CHECK: rev64 v{{[0-9]+}}.4s
487 %1 = add <4 x i32> %p, %p
488 %2 = bitcast <4 x i32> %1 to <2 x double>
489 %3 = fadd <2 x double> %2, %2
493 ; CHECK-LABEL: test_v2f64_v8i16:
494 define <2 x double> @test_v2f64_v8i16(<8 x i16> %p) {
495 ; CHECK: rev64 v{{[0-9]+}}.8h
498 %1 = add <8 x i16> %p, %p
499 %2 = bitcast <8 x i16> %1 to <2 x double>
500 %3 = fadd <2 x double> %2, %2
504 ; CHECK-LABEL: test_v2f64_v16i8:
505 define <2 x double> @test_v2f64_v16i8(<16 x i8> %p) {
506 ; CHECK: rev64 v{{[0-9]+}}.16b
509 %1 = add <16 x i8> %p, %p
510 %2 = bitcast <16 x i8> %1 to <2 x double>
511 %3 = fadd <2 x double> %2, %2
515 ; CHECK-LABEL: test_v2i64_f128:
516 define <2 x i64> @test_v2i64_f128(fp128 %p) {
518 %1 = fadd fp128 %p, %p
519 %2 = bitcast fp128 %1 to <2 x i64>
520 %3 = add <2 x i64> %2, %2
524 ; CHECK-LABEL: test_v2i64_v2f64:
525 define <2 x i64> @test_v2i64_v2f64(<2 x double> %p) {
528 %1 = fadd <2 x double> %p, %p
529 %2 = bitcast <2 x double> %1 to <2 x i64>
530 %3 = add <2 x i64> %2, %2
534 ; CHECK-LABEL: test_v2i64_v4f32:
535 define <2 x i64> @test_v2i64_v4f32(<4 x float> %p) {
536 ; CHECK: rev64 v{{[0-9]+}}.4s
539 %1 = fadd <4 x float> %p, %p
540 %2 = bitcast <4 x float> %1 to <2 x i64>
541 %3 = add <2 x i64> %2, %2
545 ; CHECK-LABEL: test_v2i64_v4i32:
546 define <2 x i64> @test_v2i64_v4i32(<4 x i32> %p) {
547 ; CHECK: rev64 v{{[0-9]+}}.4s
550 %1 = add <4 x i32> %p, %p
551 %2 = bitcast <4 x i32> %1 to <2 x i64>
552 %3 = add <2 x i64> %2, %2
556 ; CHECK-LABEL: test_v2i64_v8i16:
557 define <2 x i64> @test_v2i64_v8i16(<8 x i16> %p) {
558 ; CHECK: rev64 v{{[0-9]+}}.8h
561 %1 = add <8 x i16> %p, %p
562 %2 = bitcast <8 x i16> %1 to <2 x i64>
563 %3 = add <2 x i64> %2, %2
567 ; CHECK-LABEL: test_v2i64_v16i8:
568 define <2 x i64> @test_v2i64_v16i8(<16 x i8> %p) {
569 ; CHECK: rev64 v{{[0-9]+}}.16b
572 %1 = add <16 x i8> %p, %p
573 %2 = bitcast <16 x i8> %1 to <2 x i64>
574 %3 = add <2 x i64> %2, %2
578 ; CHECK-LABEL: test_v4f32_f128:
579 define <4 x float> @test_v4f32_f128(fp128 %p) {
580 ; CHECK: rev64 v{{[0-9]+}}.4s
582 %1 = fadd fp128 %p, %p
583 %2 = bitcast fp128 %1 to <4 x float>
584 %3 = fadd <4 x float> %2, %2
588 ; CHECK-LABEL: test_v4f32_v2f64:
589 define <4 x float> @test_v4f32_v2f64(<2 x double> %p) {
591 ; CHECK: rev64 v{{[0-9]+}}.4s
593 %1 = fadd <2 x double> %p, %p
594 %2 = bitcast <2 x double> %1 to <4 x float>
595 %3 = fadd <4 x float> %2, %2
599 ; CHECK-LABEL: test_v4f32_v2i64:
600 define <4 x float> @test_v4f32_v2i64(<2 x i64> %p) {
602 ; CHECK: rev64 v{{[0-9]+}}.4s
604 %1 = add <2 x i64> %p, %p
605 %2 = bitcast <2 x i64> %1 to <4 x float>
606 %3 = fadd <4 x float> %2, %2
610 ; CHECK-LABEL: test_v4f32_v4i32:
611 define <4 x float> @test_v4f32_v4i32(<4 x i32> %p) {
612 ; CHECK: rev64 v{{[0-9]+}}.4s
614 ; CHECK: rev64 v{{[0-9]+}}.4s
616 %1 = add <4 x i32> %p, %p
617 %2 = bitcast <4 x i32> %1 to <4 x float>
618 %3 = fadd <4 x float> %2, %2
622 ; CHECK-LABEL: test_v4f32_v8i16:
623 define <4 x float> @test_v4f32_v8i16(<8 x i16> %p) {
624 ; CHECK: rev64 v{{[0-9]+}}.8h
626 ; CHECK: rev64 v{{[0-9]+}}.4s
628 %1 = add <8 x i16> %p, %p
629 %2 = bitcast <8 x i16> %1 to <4 x float>
630 %3 = fadd <4 x float> %2, %2
634 ; CHECK-LABEL: test_v4f32_v16i8:
635 define <4 x float> @test_v4f32_v16i8(<16 x i8> %p) {
636 ; CHECK: rev64 v{{[0-9]+}}.16b
638 ; CHECK: rev64 v{{[0-9]+}}.4s
640 %1 = add <16 x i8> %p, %p
641 %2 = bitcast <16 x i8> %1 to <4 x float>
642 %3 = fadd <4 x float> %2, %2
646 ; CHECK-LABEL: test_v4i32_f128:
647 define <4 x i32> @test_v4i32_f128(fp128 %p) {
648 ; CHECK: rev64 v{{[0-9]+}}.4s
650 %1 = fadd fp128 %p, %p
651 %2 = bitcast fp128 %1 to <4 x i32>
652 %3 = add <4 x i32> %2, %2
656 ; CHECK-LABEL: test_v4i32_v2f64:
657 define <4 x i32> @test_v4i32_v2f64(<2 x double> %p) {
659 ; CHECK: rev64 v{{[0-9]+}}.4s
661 %1 = fadd <2 x double> %p, %p
662 %2 = bitcast <2 x double> %1 to <4 x i32>
663 %3 = add <4 x i32> %2, %2
667 ; CHECK-LABEL: test_v4i32_v2i64:
668 define <4 x i32> @test_v4i32_v2i64(<2 x i64> %p) {
670 ; CHECK: rev64 v{{[0-9]+}}.4s
672 %1 = add <2 x i64> %p, %p
673 %2 = bitcast <2 x i64> %1 to <4 x i32>
674 %3 = add <4 x i32> %2, %2
678 ; CHECK-LABEL: test_v4i32_v4f32:
679 define <4 x i32> @test_v4i32_v4f32(<4 x float> %p) {
680 ; CHECK: rev64 v{{[0-9]+}}.4s
682 ; CHECK: rev64 v{{[0-9]+}}.4s
684 %1 = fadd <4 x float> %p, %p
685 %2 = bitcast <4 x float> %1 to <4 x i32>
686 %3 = add <4 x i32> %2, %2
690 ; CHECK-LABEL: test_v4i32_v8i16:
691 define <4 x i32> @test_v4i32_v8i16(<8 x i16> %p) {
692 ; CHECK: rev64 v{{[0-9]+}}.8h
694 ; CHECK: rev64 v{{[0-9]+}}.4s
696 %1 = add <8 x i16> %p, %p
697 %2 = bitcast <8 x i16> %1 to <4 x i32>
698 %3 = add <4 x i32> %2, %2
702 ; CHECK-LABEL: test_v4i32_v16i8:
703 define <4 x i32> @test_v4i32_v16i8(<16 x i8> %p) {
704 ; CHECK: rev64 v{{[0-9]+}}.16b
706 ; CHECK: rev64 v{{[0-9]+}}.4s
708 %1 = add <16 x i8> %p, %p
709 %2 = bitcast <16 x i8> %1 to <4 x i32>
710 %3 = add <4 x i32> %2, %2
714 ; CHECK-LABEL: test_v8i16_f128:
715 define <8 x i16> @test_v8i16_f128(fp128 %p) {
716 ; CHECK: rev64 v{{[0-9]+}}.8h
718 %1 = fadd fp128 %p, %p
719 %2 = bitcast fp128 %1 to <8 x i16>
720 %3 = add <8 x i16> %2, %2
724 ; CHECK-LABEL: test_v8i16_v2f64:
725 define <8 x i16> @test_v8i16_v2f64(<2 x double> %p) {
727 ; CHECK: rev64 v{{[0-9]+}}.8h
729 %1 = fadd <2 x double> %p, %p
730 %2 = bitcast <2 x double> %1 to <8 x i16>
731 %3 = add <8 x i16> %2, %2
735 ; CHECK-LABEL: test_v8i16_v2i64:
736 define <8 x i16> @test_v8i16_v2i64(<2 x i64> %p) {
738 ; CHECK: rev64 v{{[0-9]+}}.8h
740 %1 = add <2 x i64> %p, %p
741 %2 = bitcast <2 x i64> %1 to <8 x i16>
742 %3 = add <8 x i16> %2, %2
746 ; CHECK-LABEL: test_v8i16_v4f32:
747 define <8 x i16> @test_v8i16_v4f32(<4 x float> %p) {
748 ; CHECK: rev64 v{{[0-9]+}}.4s
750 ; CHECK: rev64 v{{[0-9]+}}.8h
752 %1 = fadd <4 x float> %p, %p
753 %2 = bitcast <4 x float> %1 to <8 x i16>
754 %3 = add <8 x i16> %2, %2
758 ; CHECK-LABEL: test_v8i16_v4i32:
759 define <8 x i16> @test_v8i16_v4i32(<4 x i32> %p) {
760 ; CHECK: rev64 v{{[0-9]+}}.4s
762 ; CHECK: rev64 v{{[0-9]+}}.8h
764 %1 = add <4 x i32> %p, %p
765 %2 = bitcast <4 x i32> %1 to <8 x i16>
766 %3 = add <8 x i16> %2, %2
770 ; CHECK-LABEL: test_v8i16_v16i8:
771 define <8 x i16> @test_v8i16_v16i8(<16 x i8> %p) {
772 ; CHECK: rev64 v{{[0-9]+}}.16b
774 ; CHECK: rev64 v{{[0-9]+}}.8h
776 %1 = add <16 x i8> %p, %p
777 %2 = bitcast <16 x i8> %1 to <8 x i16>
778 %3 = add <8 x i16> %2, %2
782 ; CHECK-LABEL: test_v16i8_f128:
783 define <16 x i8> @test_v16i8_f128(fp128 %p) {
784 ; CHECK: rev64 v{{[0-9]+}}.16b
786 %1 = fadd fp128 %p, %p
787 %2 = bitcast fp128 %1 to <16 x i8>
788 %3 = add <16 x i8> %2, %2
792 ; CHECK-LABEL: test_v16i8_v2f64:
793 define <16 x i8> @test_v16i8_v2f64(<2 x double> %p) {
795 ; CHECK: rev64 v{{[0-9]+}}.16b
797 %1 = fadd <2 x double> %p, %p
798 %2 = bitcast <2 x double> %1 to <16 x i8>
799 %3 = add <16 x i8> %2, %2
803 ; CHECK-LABEL: test_v16i8_v2i64:
804 define <16 x i8> @test_v16i8_v2i64(<2 x i64> %p) {
806 ; CHECK: rev64 v{{[0-9]+}}.16b
808 %1 = add <2 x i64> %p, %p
809 %2 = bitcast <2 x i64> %1 to <16 x i8>
810 %3 = add <16 x i8> %2, %2
814 ; CHECK-LABEL: test_v16i8_v4f32:
815 define <16 x i8> @test_v16i8_v4f32(<4 x float> %p) {
816 ; CHECK: rev64 v{{[0-9]+}}.4s
818 ; CHECK: rev64 v{{[0-9]+}}.16b
820 %1 = fadd <4 x float> %p, %p
821 %2 = bitcast <4 x float> %1 to <16 x i8>
822 %3 = add <16 x i8> %2, %2
826 ; CHECK-LABEL: test_v16i8_v4i32:
827 define <16 x i8> @test_v16i8_v4i32(<4 x i32> %p) {
828 ; CHECK: rev64 v{{[0-9]+}}.4s
830 ; CHECK: rev64 v{{[0-9]+}}.16b
832 %1 = add <4 x i32> %p, %p
833 %2 = bitcast <4 x i32> %1 to <16 x i8>
834 %3 = add <16 x i8> %2, %2
838 ; CHECK-LABEL: test_v16i8_v8i16:
839 define <16 x i8> @test_v16i8_v8i16(<8 x i16> %p) {
840 ; CHECK: rev64 v{{[0-9]+}}.8h
842 ; CHECK: rev64 v{{[0-9]+}}.16b
844 %1 = add <8 x i16> %p, %p
845 %2 = bitcast <8 x i16> %1 to <16 x i8>
846 %3 = add <16 x i8> %2, %2