1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu | FileCheck %s
4 define <2 x i32> @shuffle(ptr %P) {
5 ; CHECK-LABEL: shuffle:
7 ; CHECK-NEXT: ld1r { v0.2s }, [x0]
9 %lv2i32 = load <2 x i32>, ptr %P
10 %B = shufflevector <2 x i32> %lv2i32, <2 x i32> undef, <2 x i32> zeroinitializer
14 define <4 x i32> @shuffle2(ptr %P) {
15 ; CHECK-LABEL: shuffle2:
17 ; CHECK-NEXT: ld1r { v0.4s }, [x0]
19 %lv2i32 = load <4 x i32>, ptr %P
20 %B = shufflevector <4 x i32> %lv2i32, <4 x i32> undef, <4 x i32> zeroinitializer
24 define <4 x i32> @shuffle2_multiuse(ptr %P) {
25 ; CHECK-LABEL: shuffle2_multiuse:
27 ; CHECK-NEXT: ldr q0, [x0]
28 ; CHECK-NEXT: dup v1.4s, v0.s[0]
29 ; CHECK-NEXT: dup v0.4s, v0.s[1]
30 ; CHECK-NEXT: add v0.4s, v1.4s, v0.4s
32 %lv2i32 = load <4 x i32>, ptr %P
33 %B = shufflevector <4 x i32> %lv2i32, <4 x i32> undef, <4 x i32> zeroinitializer
34 %C = shufflevector <4 x i32> %lv2i32, <4 x i32> undef, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
35 %D = add <4 x i32> %B, %C
39 define <4 x i16> @shuffle3(ptr %P) {
40 ; CHECK-LABEL: shuffle3:
42 ; CHECK-NEXT: ld1r { v0.4h }, [x0]
44 %lv4i16 = load <4 x i16>, ptr %P
45 %sv4i16 = shufflevector <4 x i16> %lv4i16, <4 x i16> undef, <4 x i32> zeroinitializer
49 define <8 x i16> @shuffle4(ptr %P) {
50 ; CHECK-LABEL: shuffle4:
52 ; CHECK-NEXT: ld1r { v0.8h }, [x0]
54 %lv8i16 = load <8 x i16>, ptr %P
55 %sv8i16 = shufflevector <8 x i16> %lv8i16, <8 x i16> undef, <8 x i32> zeroinitializer
59 define <8 x i8> @shuffle5(ptr %P) {
60 ; CHECK-LABEL: shuffle5:
62 ; CHECK-NEXT: ld1r { v0.8b }, [x0]
64 %lv8i8 = load <8 x i8>, ptr %P
65 %sv8i8 = shufflevector <8 x i8> %lv8i8, <8 x i8> undef, <8 x i32> zeroinitializer
69 define <16 x i8> @shuffle6(ptr %P) {
70 ; CHECK-LABEL: shuffle6:
72 ; CHECK-NEXT: ld1r { v0.16b }, [x0]
74 %lv16i8 = load <16 x i8>, ptr %P
75 %sv16i8 = shufflevector <16 x i8> %lv16i8, <16 x i8> undef, <16 x i32> zeroinitializer
79 define <2 x i64> @shuffle7(ptr %P) {
80 ; CHECK-LABEL: shuffle7:
82 ; CHECK-NEXT: ld1r { v0.2d }, [x0]
84 %lv2i64 = load <2 x i64>, ptr %P
85 %sv2i64 = shufflevector <2 x i64> %lv2i64, <2 x i64> undef, <2 x i32> zeroinitializer