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 void @vld2_v2i32(<4 x i32> *%src, <2 x i32> *%dst) {
7 ; CHECK-LABEL: vld2_v2i32:
8 ; CHECK: @ %bb.0: @ %entry
9 ; CHECK-NEXT: vldrw.u32 q0, [r0]
10 ; CHECK-NEXT: vrev64.32 q1, q0
11 ; CHECK-NEXT: vmov r2, s2
12 ; CHECK-NEXT: vmov r0, s6
13 ; CHECK-NEXT: vmov r3, s0
14 ; CHECK-NEXT: add r0, r2
15 ; CHECK-NEXT: vmov r2, s4
16 ; CHECK-NEXT: add r2, r3
17 ; CHECK-NEXT: strd r2, r0, [r1]
20 %l1 = load <4 x i32>, <4 x i32>* %src, align 4
21 %s1 = shufflevector <4 x i32> %l1, <4 x i32> undef, <2 x i32> <i32 0, i32 2>
22 %s2 = shufflevector <4 x i32> %l1, <4 x i32> undef, <2 x i32> <i32 1, i32 3>
23 %a = add <2 x i32> %s1, %s2
24 store <2 x i32> %a, <2 x i32> *%dst
28 define void @vld2_v4i32(<8 x i32> *%src, <4 x i32> *%dst) {
29 ; CHECK-LABEL: vld2_v4i32:
30 ; CHECK: @ %bb.0: @ %entry
31 ; CHECK-NEXT: vld20.32 {q0, q1}, [r0]
32 ; CHECK-NEXT: vld21.32 {q0, q1}, [r0]
33 ; CHECK-NEXT: vadd.i32 q0, q0, q1
34 ; CHECK-NEXT: vstrw.32 q0, [r1]
37 %l1 = load <8 x i32>, <8 x i32>* %src, align 4
38 %s1 = shufflevector <8 x i32> %l1, <8 x i32> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
39 %s2 = shufflevector <8 x i32> %l1, <8 x i32> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
40 %a = add <4 x i32> %s1, %s2
41 store <4 x i32> %a, <4 x i32> *%dst
45 define void @vld2_v8i32(<16 x i32> *%src, <8 x i32> *%dst) {
46 ; CHECK-LABEL: vld2_v8i32:
47 ; CHECK: @ %bb.0: @ %entry
48 ; CHECK-NEXT: vld20.32 {q0, q1}, [r0]
49 ; CHECK-NEXT: vld21.32 {q0, q1}, [r0]!
50 ; CHECK-NEXT: vld20.32 {q2, q3}, [r0]
51 ; CHECK-NEXT: vadd.i32 q0, q0, q1
52 ; CHECK-NEXT: vld21.32 {q2, q3}, [r0]
53 ; CHECK-NEXT: vstrw.32 q0, [r1]
54 ; CHECK-NEXT: vadd.i32 q1, q2, q3
55 ; CHECK-NEXT: vstrw.32 q1, [r1, #16]
58 %l1 = load <16 x i32>, <16 x i32>* %src, align 4
59 %s1 = shufflevector <16 x i32> %l1, <16 x i32> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
60 %s2 = shufflevector <16 x i32> %l1, <16 x i32> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
61 %a = add <8 x i32> %s1, %s2
62 store <8 x i32> %a, <8 x i32> *%dst
66 define void @vld2_v16i32(<32 x i32> *%src, <16 x i32> *%dst) {
67 ; CHECK-LABEL: vld2_v16i32:
68 ; CHECK: @ %bb.0: @ %entry
69 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
70 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13}
71 ; CHECK-NEXT: vld20.32 {q0, q1}, [r0]
72 ; CHECK-NEXT: add.w r2, r0, #96
73 ; CHECK-NEXT: add.w r3, r0, #64
74 ; CHECK-NEXT: vld20.32 {q3, q4}, [r2]
75 ; CHECK-NEXT: vld21.32 {q0, q1}, [r0]!
76 ; CHECK-NEXT: vld21.32 {q3, q4}, [r2]
77 ; CHECK-NEXT: vld20.32 {q5, q6}, [r0]
78 ; CHECK-NEXT: vadd.i32 q0, q0, q1
79 ; CHECK-NEXT: vld20.32 {q1, q2}, [r3]
80 ; CHECK-NEXT: vadd.i32 q3, q3, q4
81 ; CHECK-NEXT: vld21.32 {q5, q6}, [r0]
82 ; CHECK-NEXT: vld21.32 {q1, q2}, [r3]
83 ; CHECK-NEXT: vstrw.32 q3, [r1, #48]
84 ; CHECK-NEXT: vadd.i32 q5, q5, q6
85 ; CHECK-NEXT: vstrw.32 q0, [r1]
86 ; CHECK-NEXT: vadd.i32 q1, q1, q2
87 ; CHECK-NEXT: vstrw.32 q5, [r1, #16]
88 ; CHECK-NEXT: vstrw.32 q1, [r1, #32]
89 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13}
92 %l1 = load <32 x i32>, <32 x i32>* %src, align 4
93 %s1 = shufflevector <32 x i32> %l1, <32 x i32> undef, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
94 %s2 = shufflevector <32 x i32> %l1, <32 x i32> undef, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
95 %a = add <16 x i32> %s1, %s2
96 store <16 x i32> %a, <16 x i32> *%dst
100 define void @vld2_v4i32_align1(<8 x i32> *%src, <4 x i32> *%dst) {
101 ; CHECK-LABEL: vld2_v4i32_align1:
102 ; CHECK: @ %bb.0: @ %entry
103 ; CHECK-NEXT: vldrb.u8 q0, [r0, #16]
104 ; CHECK-NEXT: vldrb.u8 q1, [r0]
105 ; CHECK-NEXT: vmov.f32 s8, s5
106 ; CHECK-NEXT: vmov.f32 s9, s7
107 ; CHECK-NEXT: vmov.f32 s5, s6
108 ; CHECK-NEXT: vmov.f32 s10, s1
109 ; CHECK-NEXT: vmov.f32 s11, s3
110 ; CHECK-NEXT: vmov.f32 s6, s0
111 ; CHECK-NEXT: vmov.f32 s7, s2
112 ; CHECK-NEXT: vadd.i32 q0, q1, q2
113 ; CHECK-NEXT: vstrw.32 q0, [r1]
116 %l1 = load <8 x i32>, <8 x i32>* %src, align 1
117 %s1 = shufflevector <8 x i32> %l1, <8 x i32> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
118 %s2 = shufflevector <8 x i32> %l1, <8 x i32> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
119 %a = add <4 x i32> %s1, %s2
120 store <4 x i32> %a, <4 x i32> *%dst
126 define void @vld2_v2i16(<4 x i16> *%src, <2 x i16> *%dst) {
127 ; CHECK-LABEL: vld2_v2i16:
128 ; CHECK: @ %bb.0: @ %entry
129 ; CHECK-NEXT: vldrh.u32 q0, [r0]
130 ; CHECK-NEXT: vrev64.32 q1, q0
131 ; CHECK-NEXT: vmov r2, s2
132 ; CHECK-NEXT: vmov r0, s6
133 ; CHECK-NEXT: add r0, r2
134 ; CHECK-NEXT: strh r0, [r1, #2]
135 ; CHECK-NEXT: vmov r0, s4
136 ; CHECK-NEXT: vmov r2, s0
137 ; CHECK-NEXT: add r0, r2
138 ; CHECK-NEXT: strh r0, [r1]
141 %l1 = load <4 x i16>, <4 x i16>* %src, align 2
142 %s1 = shufflevector <4 x i16> %l1, <4 x i16> undef, <2 x i32> <i32 0, i32 2>
143 %s2 = shufflevector <4 x i16> %l1, <4 x i16> undef, <2 x i32> <i32 1, i32 3>
144 %a = add <2 x i16> %s1, %s2
145 store <2 x i16> %a, <2 x i16> *%dst
149 define void @vld2_v4i16(<8 x i16> *%src, <4 x i16> *%dst) {
150 ; CHECK-LABEL: vld2_v4i16:
151 ; CHECK: @ %bb.0: @ %entry
152 ; CHECK-NEXT: vldrh.u16 q0, [r0]
153 ; CHECK-NEXT: vrev32.16 q1, q0
154 ; CHECK-NEXT: vadd.i32 q0, q0, q1
155 ; CHECK-NEXT: vstrh.32 q0, [r1]
158 %l1 = load <8 x i16>, <8 x i16>* %src, align 2
159 %s1 = shufflevector <8 x i16> %l1, <8 x i16> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
160 %s2 = shufflevector <8 x i16> %l1, <8 x i16> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
161 %a = add <4 x i16> %s1, %s2
162 store <4 x i16> %a, <4 x i16> *%dst
166 define void @vld2_v8i16(<16 x i16> *%src, <8 x i16> *%dst) {
167 ; CHECK-LABEL: vld2_v8i16:
168 ; CHECK: @ %bb.0: @ %entry
169 ; CHECK-NEXT: vld20.16 {q0, q1}, [r0]
170 ; CHECK-NEXT: vld21.16 {q0, q1}, [r0]
171 ; CHECK-NEXT: vadd.i16 q0, q0, q1
172 ; CHECK-NEXT: vstrw.32 q0, [r1]
175 %l1 = load <16 x i16>, <16 x i16>* %src, align 2
176 %s1 = shufflevector <16 x i16> %l1, <16 x i16> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
177 %s2 = shufflevector <16 x i16> %l1, <16 x i16> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
178 %a = add <8 x i16> %s1, %s2
179 store <8 x i16> %a, <8 x i16> *%dst
183 define void @vld2_v16i16(<32 x i16> *%src, <16 x i16> *%dst) {
184 ; CHECK-LABEL: vld2_v16i16:
185 ; CHECK: @ %bb.0: @ %entry
186 ; CHECK-NEXT: vld20.16 {q0, q1}, [r0]
187 ; CHECK-NEXT: vld21.16 {q0, q1}, [r0]!
188 ; CHECK-NEXT: vld20.16 {q2, q3}, [r0]
189 ; CHECK-NEXT: vadd.i16 q0, q0, q1
190 ; CHECK-NEXT: vld21.16 {q2, q3}, [r0]
191 ; CHECK-NEXT: vstrw.32 q0, [r1]
192 ; CHECK-NEXT: vadd.i16 q1, q2, q3
193 ; CHECK-NEXT: vstrw.32 q1, [r1, #16]
196 %l1 = load <32 x i16>, <32 x i16>* %src, align 2
197 %s1 = shufflevector <32 x i16> %l1, <32 x i16> undef, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
198 %s2 = shufflevector <32 x i16> %l1, <32 x i16> undef, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
199 %a = add <16 x i16> %s1, %s2
200 store <16 x i16> %a, <16 x i16> *%dst
204 define void @vld2_v8i16_align1(<16 x i16> *%src, <8 x i16> *%dst) {
205 ; CHECK-LABEL: vld2_v8i16_align1:
206 ; CHECK: @ %bb.0: @ %entry
207 ; CHECK-NEXT: vldrb.u8 q0, [r0]
208 ; CHECK-NEXT: vldrb.u8 q2, [r0, #16]
209 ; CHECK-NEXT: vmovx.f16 s4, s0
210 ; CHECK-NEXT: vmovx.f16 s6, s1
211 ; CHECK-NEXT: vins.f16 s4, s6
212 ; CHECK-NEXT: vmovx.f16 s5, s2
213 ; CHECK-NEXT: vmovx.f16 s6, s3
214 ; CHECK-NEXT: vmovx.f16 s12, s9
215 ; CHECK-NEXT: vins.f16 s5, s6
216 ; CHECK-NEXT: vmovx.f16 s6, s8
217 ; CHECK-NEXT: vins.f16 s6, s12
218 ; CHECK-NEXT: vmovx.f16 s7, s10
219 ; CHECK-NEXT: vmovx.f16 s12, s11
220 ; CHECK-NEXT: vins.f16 s2, s3
221 ; CHECK-NEXT: vins.f16 s10, s11
222 ; CHECK-NEXT: vins.f16 s8, s9
223 ; CHECK-NEXT: vins.f16 s0, s1
224 ; CHECK-NEXT: vmov.f32 s1, s2
225 ; CHECK-NEXT: vins.f16 s7, s12
226 ; CHECK-NEXT: vmov.f32 s2, s8
227 ; CHECK-NEXT: vmov.f32 s3, s10
228 ; CHECK-NEXT: vadd.i16 q0, q0, q1
229 ; CHECK-NEXT: vstrw.32 q0, [r1]
232 %l1 = load <16 x i16>, <16 x i16>* %src, align 1
233 %s1 = shufflevector <16 x i16> %l1, <16 x i16> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
234 %s2 = shufflevector <16 x i16> %l1, <16 x i16> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
235 %a = add <8 x i16> %s1, %s2
236 store <8 x i16> %a, <8 x i16> *%dst
242 define void @vld2_v2i8(<4 x i8> *%src, <2 x i8> *%dst) {
243 ; CHECK-LABEL: vld2_v2i8:
244 ; CHECK: @ %bb.0: @ %entry
245 ; CHECK-NEXT: vldrb.u32 q0, [r0]
246 ; CHECK-NEXT: vrev64.32 q1, q0
247 ; CHECK-NEXT: vmov r2, s2
248 ; CHECK-NEXT: vmov r0, s6
249 ; CHECK-NEXT: add r0, r2
250 ; CHECK-NEXT: strb r0, [r1, #1]
251 ; CHECK-NEXT: vmov r0, s4
252 ; CHECK-NEXT: vmov r2, s0
253 ; CHECK-NEXT: add r0, r2
254 ; CHECK-NEXT: strb r0, [r1]
257 %l1 = load <4 x i8>, <4 x i8>* %src, align 1
258 %s1 = shufflevector <4 x i8> %l1, <4 x i8> undef, <2 x i32> <i32 0, i32 2>
259 %s2 = shufflevector <4 x i8> %l1, <4 x i8> undef, <2 x i32> <i32 1, i32 3>
260 %a = add <2 x i8> %s1, %s2
261 store <2 x i8> %a, <2 x i8> *%dst
265 define void @vld2_v4i8(<8 x i8> *%src, <4 x i8> *%dst) {
266 ; CHECK-LABEL: vld2_v4i8:
267 ; CHECK: @ %bb.0: @ %entry
268 ; CHECK-NEXT: vldrb.u16 q0, [r0]
269 ; CHECK-NEXT: vrev32.16 q1, q0
270 ; CHECK-NEXT: vadd.i32 q0, q0, q1
271 ; CHECK-NEXT: vstrb.32 q0, [r1]
274 %l1 = load <8 x i8>, <8 x i8>* %src, align 1
275 %s1 = shufflevector <8 x i8> %l1, <8 x i8> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
276 %s2 = shufflevector <8 x i8> %l1, <8 x i8> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
277 %a = add <4 x i8> %s1, %s2
278 store <4 x i8> %a, <4 x i8> *%dst
282 define void @vld2_v8i8(<16 x i8> *%src, <8 x i8> *%dst) {
283 ; CHECK-LABEL: vld2_v8i8:
284 ; CHECK: @ %bb.0: @ %entry
285 ; CHECK-NEXT: vldrb.u8 q0, [r0]
286 ; CHECK-NEXT: vrev16.8 q1, q0
287 ; CHECK-NEXT: vadd.i16 q0, q0, q1
288 ; CHECK-NEXT: vstrb.16 q0, [r1]
291 %l1 = load <16 x i8>, <16 x i8>* %src, align 1
292 %s1 = shufflevector <16 x i8> %l1, <16 x i8> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
293 %s2 = shufflevector <16 x i8> %l1, <16 x i8> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
294 %a = add <8 x i8> %s1, %s2
295 store <8 x i8> %a, <8 x i8> *%dst
299 define void @vld2_v16i8(<32 x i8> *%src, <16 x i8> *%dst) {
300 ; CHECK-LABEL: vld2_v16i8:
301 ; CHECK: @ %bb.0: @ %entry
302 ; CHECK-NEXT: vld20.8 {q0, q1}, [r0]
303 ; CHECK-NEXT: vld21.8 {q0, q1}, [r0]
304 ; CHECK-NEXT: vadd.i8 q0, q0, q1
305 ; CHECK-NEXT: vstrw.32 q0, [r1]
308 %l1 = load <32 x i8>, <32 x i8>* %src, align 1
309 %s1 = shufflevector <32 x i8> %l1, <32 x i8> undef, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
310 %s2 = shufflevector <32 x i8> %l1, <32 x i8> undef, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
311 %a = add <16 x i8> %s1, %s2
312 store <16 x i8> %a, <16 x i8> *%dst
318 define void @vld2_v2i64(<4 x i64> *%src, <2 x i64> *%dst) {
319 ; CHECK-LABEL: vld2_v2i64:
320 ; CHECK: @ %bb.0: @ %entry
321 ; CHECK-NEXT: .save {r4, r5, r6, lr}
322 ; CHECK-NEXT: push {r4, r5, r6, lr}
323 ; CHECK-NEXT: vldrw.u32 q0, [r0]
324 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
325 ; CHECK-NEXT: vmov.f32 s8, s2
326 ; CHECK-NEXT: vmov.f32 s9, s3
327 ; CHECK-NEXT: vmov.f32 s2, s4
328 ; CHECK-NEXT: vmov.f32 s3, s5
329 ; CHECK-NEXT: vmov lr, r12, d3
330 ; CHECK-NEXT: vmov r5, r6, d0
331 ; CHECK-NEXT: vmov r0, r4, d4
332 ; CHECK-NEXT: vmov r3, r2, d1
333 ; CHECK-NEXT: adds.w r3, r3, lr
334 ; CHECK-NEXT: adc.w r2, r2, r12
335 ; CHECK-NEXT: adds r0, r0, r5
336 ; CHECK-NEXT: adcs r6, r4
337 ; CHECK-NEXT: vmov q0[2], q0[0], r0, r3
338 ; CHECK-NEXT: vmov q0[3], q0[1], r6, r2
339 ; CHECK-NEXT: vstrw.32 q0, [r1]
340 ; CHECK-NEXT: pop {r4, r5, r6, pc}
342 %l1 = load <4 x i64>, <4 x i64>* %src, align 8
343 %s1 = shufflevector <4 x i64> %l1, <4 x i64> undef, <2 x i32> <i32 0, i32 2>
344 %s2 = shufflevector <4 x i64> %l1, <4 x i64> undef, <2 x i32> <i32 1, i32 3>
345 %a = add <2 x i64> %s1, %s2
346 store <2 x i64> %a, <2 x i64> *%dst
350 define void @vld2_v4i64(<8 x i64> *%src, <4 x i64> *%dst) {
351 ; CHECK-LABEL: vld2_v4i64:
352 ; CHECK: @ %bb.0: @ %entry
353 ; CHECK-NEXT: .save {r4, r5, r6, r7, r8, lr}
354 ; CHECK-NEXT: push.w {r4, r5, r6, r7, r8, lr}
355 ; CHECK-NEXT: .vsave {d8}
356 ; CHECK-NEXT: vpush {d8}
357 ; CHECK-NEXT: vldrw.u32 q0, [r0]
358 ; CHECK-NEXT: vldrw.u32 q2, [r0, #16]
359 ; CHECK-NEXT: vldrw.u32 q3, [r0, #48]
360 ; CHECK-NEXT: vmov.f32 s4, s2
361 ; CHECK-NEXT: vmov.f32 s5, s3
362 ; CHECK-NEXT: vmov lr, r12, d5
363 ; CHECK-NEXT: vmov.f32 s2, s8
364 ; CHECK-NEXT: vmov.f32 s3, s9
365 ; CHECK-NEXT: vldrw.u32 q2, [r0, #32]
366 ; CHECK-NEXT: vmov.f32 s16, s10
367 ; CHECK-NEXT: vmov.f32 s17, s11
368 ; CHECK-NEXT: vmov r5, r6, d4
369 ; CHECK-NEXT: vmov r2, r3, d1
370 ; CHECK-NEXT: vmov.f32 s2, s12
371 ; CHECK-NEXT: vmov.f32 s3, s13
372 ; CHECK-NEXT: vmov r0, r7, d8
373 ; CHECK-NEXT: adds.w lr, lr, r2
374 ; CHECK-NEXT: adc.w r12, r12, r3
375 ; CHECK-NEXT: vmov r3, r4, d7
376 ; CHECK-NEXT: adds r0, r0, r5
377 ; CHECK-NEXT: adc.w r8, r6, r7
378 ; CHECK-NEXT: vmov r6, r5, d1
379 ; CHECK-NEXT: vmov r2, r7, d0
380 ; CHECK-NEXT: adds r3, r3, r6
381 ; CHECK-NEXT: adc.w r6, r5, r4
382 ; CHECK-NEXT: vmov r5, r4, d2
383 ; CHECK-NEXT: vmov q1[2], q1[0], r0, r3
384 ; CHECK-NEXT: vmov q1[3], q1[1], r8, r6
385 ; CHECK-NEXT: vstrw.32 q1, [r1, #16]
386 ; CHECK-NEXT: adds r2, r2, r5
387 ; CHECK-NEXT: vmov q0[2], q0[0], r2, lr
388 ; CHECK-NEXT: adc.w r0, r7, r4
389 ; CHECK-NEXT: vmov q0[3], q0[1], r0, r12
390 ; CHECK-NEXT: vstrw.32 q0, [r1]
391 ; CHECK-NEXT: vpop {d8}
392 ; CHECK-NEXT: pop.w {r4, r5, r6, r7, r8, pc}
394 %l1 = load <8 x i64>, <8 x i64>* %src, align 8
395 %s1 = shufflevector <8 x i64> %l1, <8 x i64> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
396 %s2 = shufflevector <8 x i64> %l1, <8 x i64> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
397 %a = add <4 x i64> %s1, %s2
398 store <4 x i64> %a, <4 x i64> *%dst
404 define void @vld2_v2f32(<4 x float> *%src, <2 x float> *%dst) {
405 ; CHECK-LABEL: vld2_v2f32:
406 ; CHECK: @ %bb.0: @ %entry
407 ; CHECK-NEXT: vldrw.u32 q0, [r0]
408 ; CHECK-NEXT: vmov.f32 s4, s1
409 ; CHECK-NEXT: vmov.f32 s5, s3
410 ; CHECK-NEXT: vmov.f32 s1, s2
411 ; CHECK-NEXT: vadd.f32 q0, q0, q1
412 ; CHECK-NEXT: vstmia r1, {s0, s1}
415 %l1 = load <4 x float>, <4 x float>* %src, align 4
416 %s1 = shufflevector <4 x float> %l1, <4 x float> undef, <2 x i32> <i32 0, i32 2>
417 %s2 = shufflevector <4 x float> %l1, <4 x float> undef, <2 x i32> <i32 1, i32 3>
418 %a = fadd <2 x float> %s1, %s2
419 store <2 x float> %a, <2 x float> *%dst
423 define void @vld2_v4f32(<8 x float> *%src, <4 x float> *%dst) {
424 ; CHECK-LABEL: vld2_v4f32:
425 ; CHECK: @ %bb.0: @ %entry
426 ; CHECK-NEXT: vld20.32 {q0, q1}, [r0]
427 ; CHECK-NEXT: vld21.32 {q0, q1}, [r0]
428 ; CHECK-NEXT: vadd.f32 q0, q0, q1
429 ; CHECK-NEXT: vstrw.32 q0, [r1]
432 %l1 = load <8 x float>, <8 x float>* %src, align 4
433 %s1 = shufflevector <8 x float> %l1, <8 x float> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
434 %s2 = shufflevector <8 x float> %l1, <8 x float> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
435 %a = fadd <4 x float> %s1, %s2
436 store <4 x float> %a, <4 x float> *%dst
440 define void @vld2_v8f32(<16 x float> *%src, <8 x float> *%dst) {
441 ; CHECK-LABEL: vld2_v8f32:
442 ; CHECK: @ %bb.0: @ %entry
443 ; CHECK-NEXT: vld20.32 {q0, q1}, [r0]
444 ; CHECK-NEXT: vld21.32 {q0, q1}, [r0]!
445 ; CHECK-NEXT: vld20.32 {q2, q3}, [r0]
446 ; CHECK-NEXT: vadd.f32 q0, q0, q1
447 ; CHECK-NEXT: vld21.32 {q2, q3}, [r0]
448 ; CHECK-NEXT: vstrw.32 q0, [r1]
449 ; CHECK-NEXT: vadd.f32 q1, q2, q3
450 ; CHECK-NEXT: vstrw.32 q1, [r1, #16]
453 %l1 = load <16 x float>, <16 x float>* %src, align 4
454 %s1 = shufflevector <16 x float> %l1, <16 x float> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
455 %s2 = shufflevector <16 x float> %l1, <16 x float> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
456 %a = fadd <8 x float> %s1, %s2
457 store <8 x float> %a, <8 x float> *%dst
461 define void @vld2_v16f32(<32 x float> *%src, <16 x float> *%dst) {
462 ; CHECK-LABEL: vld2_v16f32:
463 ; CHECK: @ %bb.0: @ %entry
464 ; CHECK-NEXT: .vsave {d8, d9, d10, d11, d12, d13}
465 ; CHECK-NEXT: vpush {d8, d9, d10, d11, d12, d13}
466 ; CHECK-NEXT: vld20.32 {q0, q1}, [r0]
467 ; CHECK-NEXT: add.w r2, r0, #96
468 ; CHECK-NEXT: add.w r3, r0, #64
469 ; CHECK-NEXT: vld20.32 {q3, q4}, [r2]
470 ; CHECK-NEXT: vld21.32 {q0, q1}, [r0]!
471 ; CHECK-NEXT: vld21.32 {q3, q4}, [r2]
472 ; CHECK-NEXT: vld20.32 {q5, q6}, [r0]
473 ; CHECK-NEXT: vadd.f32 q0, q0, q1
474 ; CHECK-NEXT: vld20.32 {q1, q2}, [r3]
475 ; CHECK-NEXT: vadd.f32 q3, q3, q4
476 ; CHECK-NEXT: vld21.32 {q5, q6}, [r0]
477 ; CHECK-NEXT: vld21.32 {q1, q2}, [r3]
478 ; CHECK-NEXT: vstrw.32 q3, [r1, #48]
479 ; CHECK-NEXT: vadd.f32 q5, q5, q6
480 ; CHECK-NEXT: vstrw.32 q0, [r1]
481 ; CHECK-NEXT: vadd.f32 q1, q1, q2
482 ; CHECK-NEXT: vstrw.32 q5, [r1, #16]
483 ; CHECK-NEXT: vstrw.32 q1, [r1, #32]
484 ; CHECK-NEXT: vpop {d8, d9, d10, d11, d12, d13}
487 %l1 = load <32 x float>, <32 x float>* %src, align 4
488 %s1 = shufflevector <32 x float> %l1, <32 x float> undef, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
489 %s2 = shufflevector <32 x float> %l1, <32 x float> undef, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
490 %a = fadd <16 x float> %s1, %s2
491 store <16 x float> %a, <16 x float> *%dst
495 define void @vld2_v4f32_align1(<8 x float> *%src, <4 x float> *%dst) {
496 ; CHECK-LABEL: vld2_v4f32_align1:
497 ; CHECK: @ %bb.0: @ %entry
498 ; CHECK-NEXT: vldrb.u8 q0, [r0, #16]
499 ; CHECK-NEXT: vldrb.u8 q1, [r0]
500 ; CHECK-NEXT: vmov.f32 s8, s5
501 ; CHECK-NEXT: vmov.f32 s9, s7
502 ; CHECK-NEXT: vmov.f32 s5, s6
503 ; CHECK-NEXT: vmov.f32 s10, s1
504 ; CHECK-NEXT: vmov.f32 s11, s3
505 ; CHECK-NEXT: vmov.f32 s6, s0
506 ; CHECK-NEXT: vmov.f32 s7, s2
507 ; CHECK-NEXT: vadd.f32 q0, q1, q2
508 ; CHECK-NEXT: vstrw.32 q0, [r1]
511 %l1 = load <8 x float>, <8 x float>* %src, align 1
512 %s1 = shufflevector <8 x float> %l1, <8 x float> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
513 %s2 = shufflevector <8 x float> %l1, <8 x float> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
514 %a = fadd <4 x float> %s1, %s2
515 store <4 x float> %a, <4 x float> *%dst
521 define void @vld2_v2f16(<4 x half> *%src, <2 x half> *%dst) {
522 ; CHECK-LABEL: vld2_v2f16:
523 ; CHECK: @ %bb.0: @ %entry
524 ; CHECK-NEXT: ldr r2, [r0]
525 ; CHECK-NEXT: ldr r0, [r0, #4]
526 ; CHECK-NEXT: vmov.32 q0[0], r2
527 ; CHECK-NEXT: vmov.32 q0[1], r0
528 ; CHECK-NEXT: vmovx.f16 s4, s0
529 ; CHECK-NEXT: vmovx.f16 s2, s1
530 ; CHECK-NEXT: vins.f16 s4, s2
531 ; CHECK-NEXT: vins.f16 s0, s1
532 ; CHECK-NEXT: vadd.f16 q0, q0, q1
533 ; CHECK-NEXT: vmov r0, s0
534 ; CHECK-NEXT: str r0, [r1]
537 %l1 = load <4 x half>, <4 x half>* %src, align 2
538 %s1 = shufflevector <4 x half> %l1, <4 x half> undef, <2 x i32> <i32 0, i32 2>
539 %s2 = shufflevector <4 x half> %l1, <4 x half> undef, <2 x i32> <i32 1, i32 3>
540 %a = fadd <2 x half> %s1, %s2
541 store <2 x half> %a, <2 x half> *%dst
545 define void @vld2_v4f16(<8 x half> *%src, <4 x half> *%dst) {
546 ; CHECK-LABEL: vld2_v4f16:
547 ; CHECK: @ %bb.0: @ %entry
548 ; CHECK-NEXT: vldrh.u16 q0, [r0]
549 ; CHECK-NEXT: vmovx.f16 s4, s0
550 ; CHECK-NEXT: vmovx.f16 s6, s1
551 ; CHECK-NEXT: vins.f16 s4, s6
552 ; CHECK-NEXT: vmovx.f16 s5, s2
553 ; CHECK-NEXT: vmovx.f16 s6, s3
554 ; CHECK-NEXT: vins.f16 s2, s3
555 ; CHECK-NEXT: vins.f16 s0, s1
556 ; CHECK-NEXT: vins.f16 s5, s6
557 ; CHECK-NEXT: vmov.f32 s1, s2
558 ; CHECK-NEXT: vadd.f16 q0, q0, q1
559 ; CHECK-NEXT: vmov r0, r2, d0
560 ; CHECK-NEXT: strd r0, r2, [r1]
563 %l1 = load <8 x half>, <8 x half>* %src, align 2
564 %s1 = shufflevector <8 x half> %l1, <8 x half> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
565 %s2 = shufflevector <8 x half> %l1, <8 x half> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
566 %a = fadd <4 x half> %s1, %s2
567 store <4 x half> %a, <4 x half> *%dst
571 define void @vld2_v8f16(<16 x half> *%src, <8 x half> *%dst) {
572 ; CHECK-LABEL: vld2_v8f16:
573 ; CHECK: @ %bb.0: @ %entry
574 ; CHECK-NEXT: vld20.16 {q0, q1}, [r0]
575 ; CHECK-NEXT: vld21.16 {q0, q1}, [r0]
576 ; CHECK-NEXT: vadd.f16 q0, q0, q1
577 ; CHECK-NEXT: vstrw.32 q0, [r1]
580 %l1 = load <16 x half>, <16 x half>* %src, align 2
581 %s1 = shufflevector <16 x half> %l1, <16 x half> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
582 %s2 = shufflevector <16 x half> %l1, <16 x half> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
583 %a = fadd <8 x half> %s1, %s2
584 store <8 x half> %a, <8 x half> *%dst
588 define void @vld2_v16f16(<32 x half> *%src, <16 x half> *%dst) {
589 ; CHECK-LABEL: vld2_v16f16:
590 ; CHECK: @ %bb.0: @ %entry
591 ; CHECK-NEXT: vld20.16 {q0, q1}, [r0]
592 ; CHECK-NEXT: vld21.16 {q0, q1}, [r0]!
593 ; CHECK-NEXT: vld20.16 {q2, q3}, [r0]
594 ; CHECK-NEXT: vadd.f16 q0, q0, q1
595 ; CHECK-NEXT: vld21.16 {q2, q3}, [r0]
596 ; CHECK-NEXT: vstrw.32 q0, [r1]
597 ; CHECK-NEXT: vadd.f16 q2, q2, q3
598 ; CHECK-NEXT: vstrw.32 q2, [r1, #16]
601 %l1 = load <32 x half>, <32 x half>* %src, align 2
602 %s1 = shufflevector <32 x half> %l1, <32 x half> undef, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
603 %s2 = shufflevector <32 x half> %l1, <32 x half> undef, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
604 %a = fadd <16 x half> %s1, %s2
605 store <16 x half> %a, <16 x half> *%dst
609 define void @vld2_v8f16_align1(<16 x half> *%src, <8 x half> *%dst) {
610 ; CHECK-LABEL: vld2_v8f16_align1:
611 ; CHECK: @ %bb.0: @ %entry
612 ; CHECK-NEXT: vldrb.u8 q0, [r0]
613 ; CHECK-NEXT: vldrb.u8 q2, [r0, #16]
614 ; CHECK-NEXT: vmovx.f16 s4, s0
615 ; CHECK-NEXT: vmovx.f16 s6, s1
616 ; CHECK-NEXT: vins.f16 s4, s6
617 ; CHECK-NEXT: vmovx.f16 s5, s2
618 ; CHECK-NEXT: vmovx.f16 s6, s3
619 ; CHECK-NEXT: vmovx.f16 s12, s9
620 ; CHECK-NEXT: vins.f16 s5, s6
621 ; CHECK-NEXT: vmovx.f16 s6, s8
622 ; CHECK-NEXT: vins.f16 s6, s12
623 ; CHECK-NEXT: vmovx.f16 s7, s10
624 ; CHECK-NEXT: vmovx.f16 s12, s11
625 ; CHECK-NEXT: vins.f16 s2, s3
626 ; CHECK-NEXT: vins.f16 s10, s11
627 ; CHECK-NEXT: vins.f16 s8, s9
628 ; CHECK-NEXT: vins.f16 s0, s1
629 ; CHECK-NEXT: vmov.f32 s1, s2
630 ; CHECK-NEXT: vins.f16 s7, s12
631 ; CHECK-NEXT: vmov.f32 s2, s8
632 ; CHECK-NEXT: vmov.f32 s3, s10
633 ; CHECK-NEXT: vadd.f16 q0, q0, q1
634 ; CHECK-NEXT: vstrw.32 q0, [r1]
637 %l1 = load <16 x half>, <16 x half>* %src, align 1
638 %s1 = shufflevector <16 x half> %l1, <16 x half> undef, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
639 %s2 = shufflevector <16 x half> %l1, <16 x half> undef, <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
640 %a = fadd <8 x half> %s1, %s2
641 store <8 x half> %a, <8 x half> *%dst
647 define void @vld2_v2f64(<4 x double> *%src, <2 x double> *%dst) {
648 ; CHECK-LABEL: vld2_v2f64:
649 ; CHECK: @ %bb.0: @ %entry
650 ; CHECK-NEXT: vldrw.u32 q0, [r0, #16]
651 ; CHECK-NEXT: vldrw.u32 q1, [r0]
652 ; CHECK-NEXT: vadd.f64 d1, d0, d1
653 ; CHECK-NEXT: vadd.f64 d0, d2, d3
654 ; CHECK-NEXT: vstrw.32 q0, [r1]
657 %l1 = load <4 x double>, <4 x double>* %src, align 8
658 %s1 = shufflevector <4 x double> %l1, <4 x double> undef, <2 x i32> <i32 0, i32 2>
659 %s2 = shufflevector <4 x double> %l1, <4 x double> undef, <2 x i32> <i32 1, i32 3>
660 %a = fadd <2 x double> %s1, %s2
661 store <2 x double> %a, <2 x double> *%dst
665 define void @vld2_v4f64(<8 x double> *%src, <4 x double> *%dst) {
666 ; CHECK-LABEL: vld2_v4f64:
667 ; CHECK: @ %bb.0: @ %entry
668 ; CHECK-NEXT: vldrw.u32 q0, [r0, #48]
669 ; CHECK-NEXT: vldrw.u32 q1, [r0, #32]
670 ; CHECK-NEXT: vldrw.u32 q2, [r0]
671 ; CHECK-NEXT: vadd.f64 d1, d0, d1
672 ; CHECK-NEXT: vadd.f64 d0, d2, d3
673 ; CHECK-NEXT: vldrw.u32 q1, [r0, #16]
674 ; CHECK-NEXT: vadd.f64 d3, d2, d3
675 ; CHECK-NEXT: vstrw.32 q0, [r1, #16]
676 ; CHECK-NEXT: vadd.f64 d2, d4, d5
677 ; CHECK-NEXT: vstrw.32 q1, [r1]
680 %l1 = load <8 x double>, <8 x double>* %src, align 8
681 %s1 = shufflevector <8 x double> %l1, <8 x double> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
682 %s2 = shufflevector <8 x double> %l1, <8 x double> undef, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
683 %a = fadd <4 x double> %s1, %s2
684 store <4 x double> %a, <4 x double> *%dst