1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-none-eabi -mattr=+mve.fp,+fp64 -verify-machineinstrs %s -o - | FileCheck %s
6 define <8 x i32> *@vst2_v4i32(<4 x i32> *%src, <8 x i32> *%dst) {
7 ; CHECK-LABEL: vst2_v4i32:
8 ; CHECK: @ %bb.0: @ %entry
9 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
10 ; CHECK-NEXT: vldrw.u32 q0, [r0]
11 ; CHECK-NEXT: vst20.32 {q0, q1}, [r1]
12 ; CHECK-NEXT: vst21.32 {q0, q1}, [r1]!
13 ; CHECK-NEXT: mov r0, r1
16 %s1 = getelementptr <4 x i32>, <4 x i32>* %src, i32 0
17 %l1 = load <4 x i32>, <4 x i32>* %s1, align 4
18 %s2 = getelementptr <4 x i32>, <4 x i32>* %src, i32 1
19 %l2 = load <4 x i32>, <4 x i32>* %s2, align 4
20 %s = shufflevector <4 x i32> %l1, <4 x i32> %l2, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
21 store <8 x i32> %s, <8 x i32> *%dst
22 %ret = getelementptr inbounds <8 x i32>, <8 x i32>* %dst, i32 1
28 define <16 x i16> *@vst2_v8i16(<8 x i16> *%src, <16 x i16> *%dst) {
29 ; CHECK-LABEL: vst2_v8i16:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
32 ; CHECK-NEXT: vldrw.u32 q0, [r0]
33 ; CHECK-NEXT: vst20.16 {q0, q1}, [r1]
34 ; CHECK-NEXT: vst21.16 {q0, q1}, [r1]!
35 ; CHECK-NEXT: mov r0, r1
38 %s1 = getelementptr <8 x i16>, <8 x i16>* %src, i32 0
39 %l1 = load <8 x i16>, <8 x i16>* %s1, align 4
40 %s2 = getelementptr <8 x i16>, <8 x i16>* %src, i32 1
41 %l2 = load <8 x i16>, <8 x i16>* %s2, align 4
42 %s = shufflevector <8 x i16> %l1, <8 x i16> %l2, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
43 store <16 x i16> %s, <16 x i16> *%dst
44 %ret = getelementptr inbounds <16 x i16>, <16 x i16>* %dst, i32 1
50 define <32 x i8> *@vst2_v16i8(<16 x i8> *%src, <32 x i8> *%dst) {
51 ; CHECK-LABEL: vst2_v16i8:
52 ; CHECK: @ %bb.0: @ %entry
53 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
54 ; CHECK-NEXT: vldrw.u32 q0, [r0]
55 ; CHECK-NEXT: vst20.8 {q0, q1}, [r1]
56 ; CHECK-NEXT: vst21.8 {q0, q1}, [r1]!
57 ; CHECK-NEXT: mov r0, r1
60 %s1 = getelementptr <16 x i8>, <16 x i8>* %src, i32 0
61 %l1 = load <16 x i8>, <16 x i8>* %s1, align 4
62 %s2 = getelementptr <16 x i8>, <16 x i8>* %src, i32 1
63 %l2 = load <16 x i8>, <16 x i8>* %s2, align 4
64 %s = shufflevector <16 x i8> %l1, <16 x i8> %l2, <32 x i32> <i32 0, i32 16, i32 1, i32 17, i32 2, i32 18, i32 3, i32 19, i32 4, i32 20, i32 5, i32 21, i32 6, i32 22, i32 7, i32 23, i32 8, i32 24, i32 9, i32 25, i32 10, i32 26, i32 11, i32 27, i32 12, i32 28, i32 13, i32 29, i32 14, i32 30, i32 15, i32 31>
65 store <32 x i8> %s, <32 x i8> *%dst
66 %ret = getelementptr inbounds <32 x i8>, <32 x i8>* %dst, i32 1
72 define <4 x i64> *@vst2_v2i64(<2 x i64> *%src, <4 x i64> *%dst) {
73 ; CHECK-LABEL: vst2_v2i64:
74 ; CHECK: @ %bb.0: @ %entry
75 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
76 ; CHECK-NEXT: vldrw.u32 q0, [r0]
77 ; CHECK-NEXT: add.w r0, r1, #32
78 ; CHECK-NEXT: vmov.f32 s8, s2
79 ; CHECK-NEXT: vmov.f32 s9, s3
80 ; CHECK-NEXT: vmov.f32 s2, s4
81 ; CHECK-NEXT: vmov.f32 s3, s5
82 ; CHECK-NEXT: vmov.f32 s10, s6
83 ; CHECK-NEXT: vstrb.8 q0, [r1], #16
84 ; CHECK-NEXT: vmov.f32 s11, s7
85 ; CHECK-NEXT: vstrw.32 q2, [r1]
88 %s1 = getelementptr <2 x i64>, <2 x i64>* %src, i32 0
89 %l1 = load <2 x i64>, <2 x i64>* %s1, align 4
90 %s2 = getelementptr <2 x i64>, <2 x i64>* %src, i32 1
91 %l2 = load <2 x i64>, <2 x i64>* %s2, align 4
92 %s = shufflevector <2 x i64> %l1, <2 x i64> %l2, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
93 store <4 x i64> %s, <4 x i64> *%dst
94 %ret = getelementptr inbounds <4 x i64>, <4 x i64>* %dst, i32 1
100 define <8 x float> *@vst2_v4f32(<4 x float> *%src, <8 x float> *%dst) {
101 ; CHECK-LABEL: vst2_v4f32:
102 ; CHECK: @ %bb.0: @ %entry
103 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
104 ; CHECK-NEXT: vldrw.u32 q0, [r0]
105 ; CHECK-NEXT: vst20.32 {q0, q1}, [r1]
106 ; CHECK-NEXT: vst21.32 {q0, q1}, [r1]!
107 ; CHECK-NEXT: mov r0, r1
110 %s1 = getelementptr <4 x float>, <4 x float>* %src, i32 0
111 %l1 = load <4 x float>, <4 x float>* %s1, align 4
112 %s2 = getelementptr <4 x float>, <4 x float>* %src, i32 1
113 %l2 = load <4 x float>, <4 x float>* %s2, align 4
114 %s = shufflevector <4 x float> %l1, <4 x float> %l2, <8 x i32> <i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3, i32 7>
115 store <8 x float> %s, <8 x float> *%dst
116 %ret = getelementptr inbounds <8 x float>, <8 x float>* %dst, i32 1
117 ret <8 x float> *%ret
122 define <16 x half> *@vst2_v8f16(<8 x half> *%src, <16 x half> *%dst) {
123 ; CHECK-LABEL: vst2_v8f16:
124 ; CHECK: @ %bb.0: @ %entry
125 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
126 ; CHECK-NEXT: vldrw.u32 q0, [r0]
127 ; CHECK-NEXT: vst20.16 {q0, q1}, [r1]
128 ; CHECK-NEXT: vst21.16 {q0, q1}, [r1]!
129 ; CHECK-NEXT: mov r0, r1
132 %s1 = getelementptr <8 x half>, <8 x half>* %src, i32 0
133 %l1 = load <8 x half>, <8 x half>* %s1, align 4
134 %s2 = getelementptr <8 x half>, <8 x half>* %src, i32 1
135 %l2 = load <8 x half>, <8 x half>* %s2, align 4
136 %s = shufflevector <8 x half> %l1, <8 x half> %l2, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
137 store <16 x half> %s, <16 x half> *%dst
138 %ret = getelementptr inbounds <16 x half>, <16 x half>* %dst, i32 1
139 ret <16 x half> *%ret
144 define <4 x double> *@vst2_v2f64(<2 x double> *%src, <4 x double> *%dst) {
145 ; CHECK-LABEL: vst2_v2f64:
146 ; CHECK: @ %bb.0: @ %entry
147 ; CHECK-NEXT: vldrw.u32 q0, [r0, #16]
148 ; CHECK-NEXT: vldrw.u32 q1, [r0]
149 ; CHECK-NEXT: vmov.f64 d5, d0
150 ; CHECK-NEXT: vmov.f64 d0, d3
151 ; CHECK-NEXT: vmov.f64 d4, d2
152 ; CHECK-NEXT: vstrw.32 q0, [r1, #16]
153 ; CHECK-NEXT: vstrw.32 q2, [r1], #32
154 ; CHECK-NEXT: mov r0, r1
157 %s1 = getelementptr <2 x double>, <2 x double>* %src, i32 0
158 %l1 = load <2 x double>, <2 x double>* %s1, align 4
159 %s2 = getelementptr <2 x double>, <2 x double>* %src, i32 1
160 %l2 = load <2 x double>, <2 x double>* %s2, align 4
161 %s = shufflevector <2 x double> %l1, <2 x double> %l2, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
162 store <4 x double> %s, <4 x double> *%dst
163 %ret = getelementptr inbounds <4 x double>, <4 x double>* %dst, i32 1
164 ret <4 x double> *%ret