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 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LE
3 ; RUN: llc -mtriple=thumbebv8.1m.main-none-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-BE
5 define ptr @ldrwu32_4(ptr %x, ptr %y) {
6 ; CHECK-LABEL: ldrwu32_4:
7 ; CHECK: @ %bb.0: @ %entry
8 ; CHECK-NEXT: vldrw.u32 q0, [r0], #4
9 ; CHECK-NEXT: vstrw.32 q0, [r1]
12 %z = getelementptr inbounds i8, ptr %x, i32 4
13 %0 = load <4 x i32>, ptr %x, align 4
14 store <4 x i32> %0, ptr %y, align 4
18 define ptr @ldrwu32_3(ptr %x, ptr %y) {
19 ; CHECK-LE-LABEL: ldrwu32_3:
20 ; CHECK-LE: @ %bb.0: @ %entry
21 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0], #3
22 ; CHECK-LE-NEXT: vstrw.32 q0, [r1]
23 ; CHECK-LE-NEXT: bx lr
25 ; CHECK-BE-LABEL: ldrwu32_3:
26 ; CHECK-BE: @ %bb.0: @ %entry
27 ; CHECK-BE-NEXT: vldrw.u32 q0, [r0]
28 ; CHECK-BE-NEXT: adds r0, #3
29 ; CHECK-BE-NEXT: vstrw.32 q0, [r1]
30 ; CHECK-BE-NEXT: bx lr
32 %z = getelementptr inbounds i8, ptr %x, i32 3
33 %0 = load <4 x i32>, ptr %x, align 4
34 store <4 x i32> %0, ptr %y, align 4
38 define ptr @ldrwu32_m4(ptr %x, ptr %y) {
39 ; CHECK-LABEL: ldrwu32_m4:
40 ; CHECK: @ %bb.0: @ %entry
41 ; CHECK-NEXT: vldrw.u32 q0, [r0], #-4
42 ; CHECK-NEXT: vstrw.32 q0, [r1]
45 %z = getelementptr inbounds i8, ptr %x, i32 -4
46 %0 = load <4 x i32>, ptr %x, align 4
47 store <4 x i32> %0, ptr %y, align 4
51 define ptr @ldrwu32_508(ptr %x, ptr %y) {
52 ; CHECK-LABEL: ldrwu32_508:
53 ; CHECK: @ %bb.0: @ %entry
54 ; CHECK-NEXT: vldrw.u32 q0, [r0], #508
55 ; CHECK-NEXT: vstrw.32 q0, [r1]
58 %z = getelementptr inbounds i8, ptr %x, i32 508
59 %0 = load <4 x i32>, ptr %x, align 4
60 store <4 x i32> %0, ptr %y, align 4
64 define ptr @ldrwu32_512(ptr %x, ptr %y) {
65 ; CHECK-LABEL: ldrwu32_512:
66 ; CHECK: @ %bb.0: @ %entry
67 ; CHECK-NEXT: vldrw.u32 q0, [r0]
68 ; CHECK-NEXT: add.w r0, r0, #512
69 ; CHECK-NEXT: vstrw.32 q0, [r1]
72 %z = getelementptr inbounds i8, ptr %x, i32 512
73 %0 = load <4 x i32>, ptr %x, align 4
74 store <4 x i32> %0, ptr %y, align 4
78 define ptr @ldrwu32_m508(ptr %x, ptr %y) {
79 ; CHECK-LABEL: ldrwu32_m508:
80 ; CHECK: @ %bb.0: @ %entry
81 ; CHECK-NEXT: vldrw.u32 q0, [r0], #-508
82 ; CHECK-NEXT: vstrw.32 q0, [r1]
85 %z = getelementptr inbounds i8, ptr %x, i32 -508
86 %0 = load <4 x i32>, ptr %x, align 4
87 store <4 x i32> %0, ptr %y, align 4
91 define ptr @ldrwu32_m512(ptr %x, ptr %y) {
92 ; CHECK-LABEL: ldrwu32_m512:
93 ; CHECK: @ %bb.0: @ %entry
94 ; CHECK-NEXT: vldrw.u32 q0, [r0]
95 ; CHECK-NEXT: sub.w r0, r0, #512
96 ; CHECK-NEXT: vstrw.32 q0, [r1]
99 %z = getelementptr inbounds i8, ptr %x, i32 -512
100 %0 = load <4 x i32>, ptr %x, align 4
101 store <4 x i32> %0, ptr %y, align 4
106 define ptr @ldrhu32_4(ptr %x, ptr %y) {
107 ; CHECK-LABEL: ldrhu32_4:
108 ; CHECK: @ %bb.0: @ %entry
109 ; CHECK-NEXT: vldrh.u32 q0, [r0], #4
110 ; CHECK-NEXT: vstrw.32 q0, [r1]
113 %z = getelementptr inbounds i8, ptr %x, i32 4
114 %0 = load <4 x i16>, ptr %x, align 2
115 %1 = zext <4 x i16> %0 to <4 x i32>
116 store <4 x i32> %1, ptr %y, align 4
120 define ptr @ldrhu32_3(ptr %x, ptr %y) {
121 ; CHECK-LABEL: ldrhu32_3:
122 ; CHECK: @ %bb.0: @ %entry
123 ; CHECK-NEXT: vldrh.u32 q0, [r0]
124 ; CHECK-NEXT: adds r0, #3
125 ; CHECK-NEXT: vstrw.32 q0, [r1]
128 %z = getelementptr inbounds i8, ptr %x, i32 3
129 %0 = load <4 x i16>, ptr %x, align 2
130 %1 = zext <4 x i16> %0 to <4 x i32>
131 store <4 x i32> %1, ptr %y, align 4
135 define ptr @ldrhu32_2(ptr %x, ptr %y) {
136 ; CHECK-LABEL: ldrhu32_2:
137 ; CHECK: @ %bb.0: @ %entry
138 ; CHECK-NEXT: vldrh.u32 q0, [r0], #2
139 ; CHECK-NEXT: vstrw.32 q0, [r1]
142 %z = getelementptr inbounds i8, ptr %x, i32 2
143 %0 = load <4 x i16>, ptr %x, align 2
144 %1 = zext <4 x i16> %0 to <4 x i32>
145 store <4 x i32> %1, ptr %y, align 4
149 define ptr @ldrhu32_254(ptr %x, ptr %y) {
150 ; CHECK-LABEL: ldrhu32_254:
151 ; CHECK: @ %bb.0: @ %entry
152 ; CHECK-NEXT: vldrh.u32 q0, [r0], #254
153 ; CHECK-NEXT: vstrw.32 q0, [r1]
156 %z = getelementptr inbounds i8, ptr %x, i32 254
157 %0 = load <4 x i16>, ptr %x, align 2
158 %1 = zext <4 x i16> %0 to <4 x i32>
159 store <4 x i32> %1, ptr %y, align 4
163 define ptr @ldrhu32_256(ptr %x, ptr %y) {
164 ; CHECK-LABEL: ldrhu32_256:
165 ; CHECK: @ %bb.0: @ %entry
166 ; CHECK-NEXT: vldrh.u32 q0, [r0]
167 ; CHECK-NEXT: add.w r0, r0, #256
168 ; CHECK-NEXT: vstrw.32 q0, [r1]
171 %z = getelementptr inbounds i8, ptr %x, i32 256
172 %0 = load <4 x i16>, ptr %x, align 2
173 %1 = zext <4 x i16> %0 to <4 x i32>
174 store <4 x i32> %1, ptr %y, align 4
178 define ptr @ldrhu32_m254(ptr %x, ptr %y) {
179 ; CHECK-LABEL: ldrhu32_m254:
180 ; CHECK: @ %bb.0: @ %entry
181 ; CHECK-NEXT: vldrh.u32 q0, [r0], #-254
182 ; CHECK-NEXT: vstrw.32 q0, [r1]
185 %z = getelementptr inbounds i8, ptr %x, i32 -254
186 %0 = load <4 x i16>, ptr %x, align 2
187 %1 = zext <4 x i16> %0 to <4 x i32>
188 store <4 x i32> %1, ptr %y, align 4
192 define ptr @ldrhu32_m256(ptr %x, ptr %y) {
193 ; CHECK-LABEL: ldrhu32_m256:
194 ; CHECK: @ %bb.0: @ %entry
195 ; CHECK-NEXT: vldrh.u32 q0, [r0]
196 ; CHECK-NEXT: sub.w r0, r0, #256
197 ; CHECK-NEXT: vstrw.32 q0, [r1]
200 %z = getelementptr inbounds i8, ptr %x, i32 -256
201 %0 = load <4 x i16>, ptr %x, align 2
202 %1 = zext <4 x i16> %0 to <4 x i32>
203 store <4 x i32> %1, ptr %y, align 4
208 define ptr @ldrhs32_4(ptr %x, ptr %y) {
209 ; CHECK-LABEL: ldrhs32_4:
210 ; CHECK: @ %bb.0: @ %entry
211 ; CHECK-NEXT: vldrh.s32 q0, [r0], #4
212 ; CHECK-NEXT: vstrw.32 q0, [r1]
215 %z = getelementptr inbounds i8, ptr %x, i32 4
216 %0 = load <4 x i16>, ptr %x, align 2
217 %1 = sext <4 x i16> %0 to <4 x i32>
218 store <4 x i32> %1, ptr %y, align 4
222 define ptr @ldrhs32_3(ptr %x, ptr %y) {
223 ; CHECK-LABEL: ldrhs32_3:
224 ; CHECK: @ %bb.0: @ %entry
225 ; CHECK-NEXT: vldrh.s32 q0, [r0]
226 ; CHECK-NEXT: adds r0, #3
227 ; CHECK-NEXT: vstrw.32 q0, [r1]
230 %z = getelementptr inbounds i8, ptr %x, i32 3
231 %0 = load <4 x i16>, ptr %x, align 2
232 %1 = sext <4 x i16> %0 to <4 x i32>
233 store <4 x i32> %1, ptr %y, align 4
237 define ptr @ldrhs32_2(ptr %x, ptr %y) {
238 ; CHECK-LABEL: ldrhs32_2:
239 ; CHECK: @ %bb.0: @ %entry
240 ; CHECK-NEXT: vldrh.s32 q0, [r0], #2
241 ; CHECK-NEXT: vstrw.32 q0, [r1]
244 %z = getelementptr inbounds i8, ptr %x, i32 2
245 %0 = load <4 x i16>, ptr %x, align 2
246 %1 = sext <4 x i16> %0 to <4 x i32>
247 store <4 x i32> %1, ptr %y, align 4
251 define ptr @ldrhs32_254(ptr %x, ptr %y) {
252 ; CHECK-LABEL: ldrhs32_254:
253 ; CHECK: @ %bb.0: @ %entry
254 ; CHECK-NEXT: vldrh.s32 q0, [r0], #254
255 ; CHECK-NEXT: vstrw.32 q0, [r1]
258 %z = getelementptr inbounds i8, ptr %x, i32 254
259 %0 = load <4 x i16>, ptr %x, align 2
260 %1 = sext <4 x i16> %0 to <4 x i32>
261 store <4 x i32> %1, ptr %y, align 4
265 define ptr @ldrhs32_256(ptr %x, ptr %y) {
266 ; CHECK-LABEL: ldrhs32_256:
267 ; CHECK: @ %bb.0: @ %entry
268 ; CHECK-NEXT: vldrh.s32 q0, [r0]
269 ; CHECK-NEXT: add.w r0, r0, #256
270 ; CHECK-NEXT: vstrw.32 q0, [r1]
273 %z = getelementptr inbounds i8, ptr %x, i32 256
274 %0 = load <4 x i16>, ptr %x, align 2
275 %1 = sext <4 x i16> %0 to <4 x i32>
276 store <4 x i32> %1, ptr %y, align 4
280 define ptr @ldrhs32_m254(ptr %x, ptr %y) {
281 ; CHECK-LABEL: ldrhs32_m254:
282 ; CHECK: @ %bb.0: @ %entry
283 ; CHECK-NEXT: vldrh.s32 q0, [r0], #-254
284 ; CHECK-NEXT: vstrw.32 q0, [r1]
287 %z = getelementptr inbounds i8, ptr %x, i32 -254
288 %0 = load <4 x i16>, ptr %x, align 2
289 %1 = sext <4 x i16> %0 to <4 x i32>
290 store <4 x i32> %1, ptr %y, align 4
294 define ptr @ldrhs32_m256(ptr %x, ptr %y) {
295 ; CHECK-LABEL: ldrhs32_m256:
296 ; CHECK: @ %bb.0: @ %entry
297 ; CHECK-NEXT: vldrh.s32 q0, [r0]
298 ; CHECK-NEXT: sub.w r0, r0, #256
299 ; CHECK-NEXT: vstrw.32 q0, [r1]
302 %z = getelementptr inbounds i8, ptr %x, i32 -256
303 %0 = load <4 x i16>, ptr %x, align 2
304 %1 = sext <4 x i16> %0 to <4 x i32>
305 store <4 x i32> %1, ptr %y, align 4
310 define ptr @ldrhu16_4(ptr %x, ptr %y) {
311 ; CHECK-LABEL: ldrhu16_4:
312 ; CHECK: @ %bb.0: @ %entry
313 ; CHECK-NEXT: vldrh.u16 q0, [r0], #4
314 ; CHECK-NEXT: vstrh.16 q0, [r1]
317 %z = getelementptr inbounds i8, ptr %x, i32 4
318 %0 = load <8 x i16>, ptr %x, align 2
319 store <8 x i16> %0, ptr %y, align 2
323 define ptr @ldrhu16_3(ptr %x, ptr %y) {
324 ; CHECK-LE-LABEL: ldrhu16_3:
325 ; CHECK-LE: @ %bb.0: @ %entry
326 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0], #3
327 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
328 ; CHECK-LE-NEXT: bx lr
330 ; CHECK-BE-LABEL: ldrhu16_3:
331 ; CHECK-BE: @ %bb.0: @ %entry
332 ; CHECK-BE-NEXT: vldrh.u16 q0, [r0]
333 ; CHECK-BE-NEXT: adds r0, #3
334 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
335 ; CHECK-BE-NEXT: bx lr
337 %z = getelementptr inbounds i8, ptr %x, i32 3
338 %0 = load <8 x i16>, ptr %x, align 2
339 store <8 x i16> %0, ptr %y, align 2
343 define ptr @ldrhu16_2(ptr %x, ptr %y) {
344 ; CHECK-LABEL: ldrhu16_2:
345 ; CHECK: @ %bb.0: @ %entry
346 ; CHECK-NEXT: vldrh.u16 q0, [r0], #2
347 ; CHECK-NEXT: vstrh.16 q0, [r1]
350 %z = getelementptr inbounds i8, ptr %x, i32 2
351 %0 = load <8 x i16>, ptr %x, align 2
352 store <8 x i16> %0, ptr %y, align 2
356 define ptr @ldrhu16_254(ptr %x, ptr %y) {
357 ; CHECK-LABEL: ldrhu16_254:
358 ; CHECK: @ %bb.0: @ %entry
359 ; CHECK-NEXT: vldrh.u16 q0, [r0], #254
360 ; CHECK-NEXT: vstrh.16 q0, [r1]
363 %z = getelementptr inbounds i8, ptr %x, i32 254
364 %0 = load <8 x i16>, ptr %x, align 2
365 store <8 x i16> %0, ptr %y, align 2
369 define ptr @ldrhu16_256(ptr %x, ptr %y) {
370 ; CHECK-LABEL: ldrhu16_256:
371 ; CHECK: @ %bb.0: @ %entry
372 ; CHECK-NEXT: vldrh.u16 q0, [r0]
373 ; CHECK-NEXT: add.w r0, r0, #256
374 ; CHECK-NEXT: vstrh.16 q0, [r1]
377 %z = getelementptr inbounds i8, ptr %x, i32 256
378 %0 = load <8 x i16>, ptr %x, align 2
379 store <8 x i16> %0, ptr %y, align 2
383 define ptr @ldrhu16_m254(ptr %x, ptr %y) {
384 ; CHECK-LABEL: ldrhu16_m254:
385 ; CHECK: @ %bb.0: @ %entry
386 ; CHECK-NEXT: vldrh.u16 q0, [r0], #-254
387 ; CHECK-NEXT: vstrh.16 q0, [r1]
390 %z = getelementptr inbounds i8, ptr %x, i32 -254
391 %0 = load <8 x i16>, ptr %x, align 2
392 store <8 x i16> %0, ptr %y, align 2
396 define ptr @ldrhu16_m256(ptr %x, ptr %y) {
397 ; CHECK-LABEL: ldrhu16_m256:
398 ; CHECK: @ %bb.0: @ %entry
399 ; CHECK-NEXT: vldrh.u16 q0, [r0]
400 ; CHECK-NEXT: sub.w r0, r0, #256
401 ; CHECK-NEXT: vstrh.16 q0, [r1]
404 %z = getelementptr inbounds i8, ptr %x, i32 -256
405 %0 = load <8 x i16>, ptr %x, align 2
406 store <8 x i16> %0, ptr %y, align 2
411 define ptr @ldrbu32_4(ptr %x, ptr %y) {
412 ; CHECK-LABEL: ldrbu32_4:
413 ; CHECK: @ %bb.0: @ %entry
414 ; CHECK-NEXT: vldrb.u32 q0, [r0], #4
415 ; CHECK-NEXT: vstrw.32 q0, [r1]
418 %z = getelementptr inbounds i8, ptr %x, i32 4
419 %0 = load <4 x i8>, ptr %x, align 1
420 %1 = zext <4 x i8> %0 to <4 x i32>
421 store <4 x i32> %1, ptr %y, align 4
425 define ptr @ldrbu32_3(ptr %x, ptr %y) {
426 ; CHECK-LABEL: ldrbu32_3:
427 ; CHECK: @ %bb.0: @ %entry
428 ; CHECK-NEXT: vldrb.u32 q0, [r0], #3
429 ; CHECK-NEXT: vstrw.32 q0, [r1]
432 %z = getelementptr inbounds i8, ptr %x, i32 3
433 %0 = load <4 x i8>, ptr %x, align 1
434 %1 = zext <4 x i8> %0 to <4 x i32>
435 store <4 x i32> %1, ptr %y, align 4
439 define ptr @ldrbu32_127(ptr %x, ptr %y) {
440 ; CHECK-LABEL: ldrbu32_127:
441 ; CHECK: @ %bb.0: @ %entry
442 ; CHECK-NEXT: vldrb.u32 q0, [r0], #127
443 ; CHECK-NEXT: vstrw.32 q0, [r1]
446 %z = getelementptr inbounds i8, ptr %x, i32 127
447 %0 = load <4 x i8>, ptr %x, align 1
448 %1 = zext <4 x i8> %0 to <4 x i32>
449 store <4 x i32> %1, ptr %y, align 4
453 define ptr @ldrbu32_128(ptr %x, ptr %y) {
454 ; CHECK-LABEL: ldrbu32_128:
455 ; CHECK: @ %bb.0: @ %entry
456 ; CHECK-NEXT: vldrb.u32 q0, [r0]
457 ; CHECK-NEXT: adds r0, #128
458 ; CHECK-NEXT: vstrw.32 q0, [r1]
461 %z = getelementptr inbounds i8, ptr %x, i32 128
462 %0 = load <4 x i8>, ptr %x, align 1
463 %1 = zext <4 x i8> %0 to <4 x i32>
464 store <4 x i32> %1, ptr %y, align 4
468 define ptr @ldrbu32_m127(ptr %x, ptr %y) {
469 ; CHECK-LABEL: ldrbu32_m127:
470 ; CHECK: @ %bb.0: @ %entry
471 ; CHECK-NEXT: vldrb.u32 q0, [r0], #-127
472 ; CHECK-NEXT: vstrw.32 q0, [r1]
475 %z = getelementptr inbounds i8, ptr %x, i32 -127
476 %0 = load <4 x i8>, ptr %x, align 1
477 %1 = zext <4 x i8> %0 to <4 x i32>
478 store <4 x i32> %1, ptr %y, align 4
482 define ptr @ldrbu32_m128(ptr %x, ptr %y) {
483 ; CHECK-LABEL: ldrbu32_m128:
484 ; CHECK: @ %bb.0: @ %entry
485 ; CHECK-NEXT: vldrb.u32 q0, [r0]
486 ; CHECK-NEXT: subs r0, #128
487 ; CHECK-NEXT: vstrw.32 q0, [r1]
490 %z = getelementptr inbounds i8, ptr %x, i32 -128
491 %0 = load <4 x i8>, ptr %x, align 1
492 %1 = zext <4 x i8> %0 to <4 x i32>
493 store <4 x i32> %1, ptr %y, align 4
498 define ptr @ldrbs32_4(ptr %x, ptr %y) {
499 ; CHECK-LABEL: ldrbs32_4:
500 ; CHECK: @ %bb.0: @ %entry
501 ; CHECK-NEXT: vldrb.s32 q0, [r0], #4
502 ; CHECK-NEXT: vstrw.32 q0, [r1]
505 %z = getelementptr inbounds i8, ptr %x, i32 4
506 %0 = load <4 x i8>, ptr %x, align 1
507 %1 = sext <4 x i8> %0 to <4 x i32>
508 store <4 x i32> %1, ptr %y, align 4
512 define ptr @ldrbs32_3(ptr %x, ptr %y) {
513 ; CHECK-LABEL: ldrbs32_3:
514 ; CHECK: @ %bb.0: @ %entry
515 ; CHECK-NEXT: vldrb.s32 q0, [r0], #3
516 ; CHECK-NEXT: vstrw.32 q0, [r1]
519 %z = getelementptr inbounds i8, ptr %x, i32 3
520 %0 = load <4 x i8>, ptr %x, align 1
521 %1 = sext <4 x i8> %0 to <4 x i32>
522 store <4 x i32> %1, ptr %y, align 4
526 define ptr @ldrbs32_127(ptr %x, ptr %y) {
527 ; CHECK-LABEL: ldrbs32_127:
528 ; CHECK: @ %bb.0: @ %entry
529 ; CHECK-NEXT: vldrb.s32 q0, [r0], #127
530 ; CHECK-NEXT: vstrw.32 q0, [r1]
533 %z = getelementptr inbounds i8, ptr %x, i32 127
534 %0 = load <4 x i8>, ptr %x, align 1
535 %1 = sext <4 x i8> %0 to <4 x i32>
536 store <4 x i32> %1, ptr %y, align 4
540 define ptr @ldrbs32_128(ptr %x, ptr %y) {
541 ; CHECK-LABEL: ldrbs32_128:
542 ; CHECK: @ %bb.0: @ %entry
543 ; CHECK-NEXT: vldrb.s32 q0, [r0]
544 ; CHECK-NEXT: adds r0, #128
545 ; CHECK-NEXT: vstrw.32 q0, [r1]
548 %z = getelementptr inbounds i8, ptr %x, i32 128
549 %0 = load <4 x i8>, ptr %x, align 1
550 %1 = sext <4 x i8> %0 to <4 x i32>
551 store <4 x i32> %1, ptr %y, align 4
555 define ptr @ldrbs32_m127(ptr %x, ptr %y) {
556 ; CHECK-LABEL: ldrbs32_m127:
557 ; CHECK: @ %bb.0: @ %entry
558 ; CHECK-NEXT: vldrb.s32 q0, [r0], #-127
559 ; CHECK-NEXT: vstrw.32 q0, [r1]
562 %z = getelementptr inbounds i8, ptr %x, i32 -127
563 %0 = load <4 x i8>, ptr %x, align 1
564 %1 = sext <4 x i8> %0 to <4 x i32>
565 store <4 x i32> %1, ptr %y, align 4
569 define ptr @ldrbs32_m128(ptr %x, ptr %y) {
570 ; CHECK-LABEL: ldrbs32_m128:
571 ; CHECK: @ %bb.0: @ %entry
572 ; CHECK-NEXT: vldrb.s32 q0, [r0]
573 ; CHECK-NEXT: subs r0, #128
574 ; CHECK-NEXT: vstrw.32 q0, [r1]
577 %z = getelementptr inbounds i8, ptr %x, i32 -128
578 %0 = load <4 x i8>, ptr %x, align 1
579 %1 = sext <4 x i8> %0 to <4 x i32>
580 store <4 x i32> %1, ptr %y, align 4
585 define ptr @ldrbu16_4(ptr %x, ptr %y) {
586 ; CHECK-LABEL: ldrbu16_4:
587 ; CHECK: @ %bb.0: @ %entry
588 ; CHECK-NEXT: vldrb.u16 q0, [r0], #4
589 ; CHECK-NEXT: vstrh.16 q0, [r1]
592 %z = getelementptr inbounds i8, ptr %x, i32 4
593 %0 = load <8 x i8>, ptr %x, align 1
594 %1 = zext <8 x i8> %0 to <8 x i16>
595 store <8 x i16> %1, ptr %y, align 2
599 define ptr @ldrbu16_3(ptr %x, ptr %y) {
600 ; CHECK-LABEL: ldrbu16_3:
601 ; CHECK: @ %bb.0: @ %entry
602 ; CHECK-NEXT: vldrb.u16 q0, [r0], #3
603 ; CHECK-NEXT: vstrh.16 q0, [r1]
606 %z = getelementptr inbounds i8, ptr %x, i32 3
607 %0 = load <8 x i8>, ptr %x, align 1
608 %1 = zext <8 x i8> %0 to <8 x i16>
609 store <8 x i16> %1, ptr %y, align 2
613 define ptr @ldrbu16_127(ptr %x, ptr %y) {
614 ; CHECK-LABEL: ldrbu16_127:
615 ; CHECK: @ %bb.0: @ %entry
616 ; CHECK-NEXT: vldrb.u16 q0, [r0], #127
617 ; CHECK-NEXT: vstrh.16 q0, [r1]
620 %z = getelementptr inbounds i8, ptr %x, i32 127
621 %0 = load <8 x i8>, ptr %x, align 1
622 %1 = zext <8 x i8> %0 to <8 x i16>
623 store <8 x i16> %1, ptr %y, align 2
627 define ptr @ldrbu16_128(ptr %x, ptr %y) {
628 ; CHECK-LABEL: ldrbu16_128:
629 ; CHECK: @ %bb.0: @ %entry
630 ; CHECK-NEXT: vldrb.u16 q0, [r0]
631 ; CHECK-NEXT: adds r0, #128
632 ; CHECK-NEXT: vstrh.16 q0, [r1]
635 %z = getelementptr inbounds i8, ptr %x, i32 128
636 %0 = load <8 x i8>, ptr %x, align 1
637 %1 = zext <8 x i8> %0 to <8 x i16>
638 store <8 x i16> %1, ptr %y, align 2
642 define ptr @ldrbu16_m127(ptr %x, ptr %y) {
643 ; CHECK-LABEL: ldrbu16_m127:
644 ; CHECK: @ %bb.0: @ %entry
645 ; CHECK-NEXT: vldrb.u16 q0, [r0], #-127
646 ; CHECK-NEXT: vstrh.16 q0, [r1]
649 %z = getelementptr inbounds i8, ptr %x, i32 -127
650 %0 = load <8 x i8>, ptr %x, align 1
651 %1 = zext <8 x i8> %0 to <8 x i16>
652 store <8 x i16> %1, ptr %y, align 2
656 define ptr @ldrbu16_m128(ptr %x, ptr %y) {
657 ; CHECK-LABEL: ldrbu16_m128:
658 ; CHECK: @ %bb.0: @ %entry
659 ; CHECK-NEXT: vldrb.u16 q0, [r0]
660 ; CHECK-NEXT: subs r0, #128
661 ; CHECK-NEXT: vstrh.16 q0, [r1]
664 %z = getelementptr inbounds i8, ptr %x, i32 -128
665 %0 = load <8 x i8>, ptr %x, align 1
666 %1 = zext <8 x i8> %0 to <8 x i16>
667 store <8 x i16> %1, ptr %y, align 2
672 define ptr @ldrbs16_4(ptr %x, ptr %y) {
673 ; CHECK-LABEL: ldrbs16_4:
674 ; CHECK: @ %bb.0: @ %entry
675 ; CHECK-NEXT: vldrb.s16 q0, [r0], #4
676 ; CHECK-NEXT: vstrh.16 q0, [r1]
679 %z = getelementptr inbounds i8, ptr %x, i32 4
680 %0 = load <8 x i8>, ptr %x, align 1
681 %1 = sext <8 x i8> %0 to <8 x i16>
682 store <8 x i16> %1, ptr %y, align 2
686 define ptr @ldrbs16_3(ptr %x, ptr %y) {
687 ; CHECK-LABEL: ldrbs16_3:
688 ; CHECK: @ %bb.0: @ %entry
689 ; CHECK-NEXT: vldrb.s16 q0, [r0], #3
690 ; CHECK-NEXT: vstrh.16 q0, [r1]
693 %z = getelementptr inbounds i8, ptr %x, i32 3
694 %0 = load <8 x i8>, ptr %x, align 1
695 %1 = sext <8 x i8> %0 to <8 x i16>
696 store <8 x i16> %1, ptr %y, align 2
700 define ptr @ldrbs16_127(ptr %x, ptr %y) {
701 ; CHECK-LABEL: ldrbs16_127:
702 ; CHECK: @ %bb.0: @ %entry
703 ; CHECK-NEXT: vldrb.s16 q0, [r0], #127
704 ; CHECK-NEXT: vstrh.16 q0, [r1]
707 %z = getelementptr inbounds i8, ptr %x, i32 127
708 %0 = load <8 x i8>, ptr %x, align 1
709 %1 = sext <8 x i8> %0 to <8 x i16>
710 store <8 x i16> %1, ptr %y, align 2
714 define ptr @ldrbs16_128(ptr %x, ptr %y) {
715 ; CHECK-LABEL: ldrbs16_128:
716 ; CHECK: @ %bb.0: @ %entry
717 ; CHECK-NEXT: vldrb.s16 q0, [r0]
718 ; CHECK-NEXT: adds r0, #128
719 ; CHECK-NEXT: vstrh.16 q0, [r1]
722 %z = getelementptr inbounds i8, ptr %x, i32 128
723 %0 = load <8 x i8>, ptr %x, align 1
724 %1 = sext <8 x i8> %0 to <8 x i16>
725 store <8 x i16> %1, ptr %y, align 2
729 define ptr @ldrbs16_m127(ptr %x, ptr %y) {
730 ; CHECK-LABEL: ldrbs16_m127:
731 ; CHECK: @ %bb.0: @ %entry
732 ; CHECK-NEXT: vldrb.s16 q0, [r0], #-127
733 ; CHECK-NEXT: vstrh.16 q0, [r1]
736 %z = getelementptr inbounds i8, ptr %x, i32 -127
737 %0 = load <8 x i8>, ptr %x, align 1
738 %1 = sext <8 x i8> %0 to <8 x i16>
739 store <8 x i16> %1, ptr %y, align 2
743 define ptr @ldrbs16_m128(ptr %x, ptr %y) {
744 ; CHECK-LABEL: ldrbs16_m128:
745 ; CHECK: @ %bb.0: @ %entry
746 ; CHECK-NEXT: vldrb.s16 q0, [r0]
747 ; CHECK-NEXT: subs r0, #128
748 ; CHECK-NEXT: vstrh.16 q0, [r1]
751 %z = getelementptr inbounds i8, ptr %x, i32 -128
752 %0 = load <8 x i8>, ptr %x, align 1
753 %1 = sext <8 x i8> %0 to <8 x i16>
754 store <8 x i16> %1, ptr %y, align 2
759 define ptr @ldrbu8_4(ptr %x, ptr %y) {
760 ; CHECK-LABEL: ldrbu8_4:
761 ; CHECK: @ %bb.0: @ %entry
762 ; CHECK-NEXT: vldrb.u8 q0, [r0], #4
763 ; CHECK-NEXT: vstrb.8 q0, [r1]
766 %z = getelementptr inbounds i8, ptr %x, i32 4
767 %0 = load <16 x i8>, ptr %x, align 1
768 store <16 x i8> %0, ptr %y, align 1
772 define ptr @ldrbu8_3(ptr %x, ptr %y) {
773 ; CHECK-LABEL: ldrbu8_3:
774 ; CHECK: @ %bb.0: @ %entry
775 ; CHECK-NEXT: vldrb.u8 q0, [r0], #3
776 ; CHECK-NEXT: vstrb.8 q0, [r1]
779 %z = getelementptr inbounds i8, ptr %x, i32 3
780 %0 = load <16 x i8>, ptr %x, align 1
781 store <16 x i8> %0, ptr %y, align 1
785 define ptr @ldrbu8_127(ptr %x, ptr %y) {
786 ; CHECK-LABEL: ldrbu8_127:
787 ; CHECK: @ %bb.0: @ %entry
788 ; CHECK-NEXT: vldrb.u8 q0, [r0], #127
789 ; CHECK-NEXT: vstrb.8 q0, [r1]
792 %z = getelementptr inbounds i8, ptr %x, i32 127
793 %0 = load <16 x i8>, ptr %x, align 1
794 store <16 x i8> %0, ptr %y, align 1
798 define ptr @ldrbu8_128(ptr %x, ptr %y) {
799 ; CHECK-LABEL: ldrbu8_128:
800 ; CHECK: @ %bb.0: @ %entry
801 ; CHECK-NEXT: vldrb.u8 q0, [r0]
802 ; CHECK-NEXT: adds r0, #128
803 ; CHECK-NEXT: vstrb.8 q0, [r1]
806 %z = getelementptr inbounds i8, ptr %x, i32 128
807 %0 = load <16 x i8>, ptr %x, align 1
808 store <16 x i8> %0, ptr %y, align 1
812 define ptr @ldrbu8_m127(ptr %x, ptr %y) {
813 ; CHECK-LABEL: ldrbu8_m127:
814 ; CHECK: @ %bb.0: @ %entry
815 ; CHECK-NEXT: vldrb.u8 q0, [r0], #-127
816 ; CHECK-NEXT: vstrb.8 q0, [r1]
819 %z = getelementptr inbounds i8, ptr %x, i32 -127
820 %0 = load <16 x i8>, ptr %x, align 1
821 store <16 x i8> %0, ptr %y, align 1
825 define ptr @ldrbu8_m128(ptr %x, ptr %y) {
826 ; CHECK-LABEL: ldrbu8_m128:
827 ; CHECK: @ %bb.0: @ %entry
828 ; CHECK-NEXT: vldrb.u8 q0, [r0]
829 ; CHECK-NEXT: subs r0, #128
830 ; CHECK-NEXT: vstrb.8 q0, [r1]
833 %z = getelementptr inbounds i8, ptr %x, i32 -128
834 %0 = load <16 x i8>, ptr %x, align 1
835 store <16 x i8> %0, ptr %y, align 1
840 define ptr @ldrwf32_4(ptr %x, ptr %y) {
841 ; CHECK-LABEL: ldrwf32_4:
842 ; CHECK: @ %bb.0: @ %entry
843 ; CHECK-NEXT: vldrw.u32 q0, [r0], #4
844 ; CHECK-NEXT: vstrw.32 q0, [r1]
847 %z = getelementptr inbounds i8, ptr %x, i32 4
848 %0 = load <4 x float>, ptr %x, align 4
849 store <4 x float> %0, ptr %y, align 4
853 define ptr @ldrwf16_4(ptr %x, ptr %y) {
854 ; CHECK-LABEL: ldrwf16_4:
855 ; CHECK: @ %bb.0: @ %entry
856 ; CHECK-NEXT: vldrh.u16 q0, [r0], #4
857 ; CHECK-NEXT: vstrh.16 q0, [r1]
860 %z = getelementptr inbounds i8, ptr %x, i32 4
861 %0 = load <8 x half>, ptr %x, align 2
862 store <8 x half> %0, ptr %y, align 2
866 define ptr @ldrwi32_align1(ptr %x, ptr %y) {
867 ; CHECK-LE-LABEL: ldrwi32_align1:
868 ; CHECK-LE: @ %bb.0: @ %entry
869 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0], #3
870 ; CHECK-LE-NEXT: vstrw.32 q0, [r1]
871 ; CHECK-LE-NEXT: bx lr
873 ; CHECK-BE-LABEL: ldrwi32_align1:
874 ; CHECK-BE: @ %bb.0: @ %entry
875 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0], #3
876 ; CHECK-BE-NEXT: vrev32.8 q0, q0
877 ; CHECK-BE-NEXT: vstrw.32 q0, [r1]
878 ; CHECK-BE-NEXT: bx lr
880 %z = getelementptr inbounds i8, ptr %x, i32 3
881 %0 = load <4 x i32>, ptr %x, align 1
882 store <4 x i32> %0, ptr %y, align 4
886 define ptr @ldrhi16_align1(ptr %x, ptr %y) {
887 ; CHECK-LE-LABEL: ldrhi16_align1:
888 ; CHECK-LE: @ %bb.0: @ %entry
889 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0], #3
890 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
891 ; CHECK-LE-NEXT: bx lr
893 ; CHECK-BE-LABEL: ldrhi16_align1:
894 ; CHECK-BE: @ %bb.0: @ %entry
895 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0], #3
896 ; CHECK-BE-NEXT: vrev16.8 q0, q0
897 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
898 ; CHECK-BE-NEXT: bx lr
900 %z = getelementptr inbounds i8, ptr %x, i32 3
901 %0 = load <8 x i16>, ptr %x, align 1
902 store <8 x i16> %0, ptr %y, align 2
906 define ptr @ldrhi32_align1(ptr %x, ptr %y) {
907 ; CHECK-LABEL: ldrhi32_align1:
908 ; CHECK: @ %bb.0: @ %entry
909 ; CHECK-NEXT: .pad #8
910 ; CHECK-NEXT: sub sp, #8
911 ; CHECK-NEXT: ldr r3, [r0, #4]
912 ; CHECK-NEXT: ldr r2, [r0]
913 ; CHECK-NEXT: adds r0, #3
914 ; CHECK-NEXT: strd r2, r3, [sp]
915 ; CHECK-NEXT: mov r2, sp
916 ; CHECK-NEXT: vldrh.s32 q0, [r2]
917 ; CHECK-NEXT: vstrw.32 q0, [r1]
918 ; CHECK-NEXT: add sp, #8
921 %z = getelementptr inbounds i8, ptr %x, i32 3
922 %0 = load <4 x i16>, ptr %x, align 1
923 %1 = sext <4 x i16> %0 to <4 x i32>
924 store <4 x i32> %1, ptr %y, align 4
928 define ptr @ldrf32_align1(ptr %x, ptr %y) {
929 ; CHECK-LE-LABEL: ldrf32_align1:
930 ; CHECK-LE: @ %bb.0: @ %entry
931 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0], #3
932 ; CHECK-LE-NEXT: vstrw.32 q0, [r1]
933 ; CHECK-LE-NEXT: bx lr
935 ; CHECK-BE-LABEL: ldrf32_align1:
936 ; CHECK-BE: @ %bb.0: @ %entry
937 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0], #3
938 ; CHECK-BE-NEXT: vrev32.8 q0, q0
939 ; CHECK-BE-NEXT: vstrw.32 q0, [r1]
940 ; CHECK-BE-NEXT: bx lr
942 %z = getelementptr inbounds i8, ptr %x, i32 3
943 %0 = load <4 x float>, ptr %x, align 1
944 store <4 x float> %0, ptr %y, align 4
948 define ptr @ldrf16_align1(ptr %x, ptr %y) {
949 ; CHECK-LE-LABEL: ldrf16_align1:
950 ; CHECK-LE: @ %bb.0: @ %entry
951 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0], #3
952 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
953 ; CHECK-LE-NEXT: bx lr
955 ; CHECK-BE-LABEL: ldrf16_align1:
956 ; CHECK-BE: @ %bb.0: @ %entry
957 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0], #3
958 ; CHECK-BE-NEXT: vrev16.8 q0, q0
959 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
960 ; CHECK-BE-NEXT: bx lr
962 %z = getelementptr inbounds i8, ptr %x, i32 3
963 %0 = load <8 x half>, ptr %x, align 1
964 store <8 x half> %0, ptr %y, align 2
968 define ptr @ldrh16_align8(ptr %x, ptr %y) {
969 ; CHECK-LE-LABEL: ldrh16_align8:
970 ; CHECK-LE: @ %bb.0: @ %entry
971 ; CHECK-LE-NEXT: vldrw.u32 q0, [r0], #4
972 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
973 ; CHECK-LE-NEXT: bx lr
975 ; CHECK-BE-LABEL: ldrh16_align8:
976 ; CHECK-BE: @ %bb.0: @ %entry
977 ; CHECK-BE-NEXT: vldrh.u16 q0, [r0], #4
978 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
979 ; CHECK-BE-NEXT: bx lr
981 %z = getelementptr inbounds i8, ptr %x, i32 4
982 %0 = load <8 x i16>, ptr %x, align 8
983 store <8 x i16> %0, ptr %y, align 2
991 define ptr @strw32_4(ptr %y, ptr %x) {
992 ; CHECK-LE-LABEL: strw32_4:
993 ; CHECK-LE: @ %bb.0: @ %entry
994 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
995 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #4
996 ; CHECK-LE-NEXT: bx lr
998 ; CHECK-BE-LABEL: strw32_4:
999 ; CHECK-BE: @ %bb.0: @ %entry
1000 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1001 ; CHECK-BE-NEXT: vstrw.32 q0, [r0], #4
1002 ; CHECK-BE-NEXT: bx lr
1004 %z = getelementptr inbounds i8, ptr %y, i32 4
1005 %0 = load <4 x i32>, ptr %x, align 4
1006 store <4 x i32> %0, ptr %y, align 4
1010 define ptr @strw32_3(ptr %y, ptr %x) {
1011 ; CHECK-LE-LABEL: strw32_3:
1012 ; CHECK-LE: @ %bb.0: @ %entry
1013 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
1014 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #3
1015 ; CHECK-LE-NEXT: bx lr
1017 ; CHECK-BE-LABEL: strw32_3:
1018 ; CHECK-BE: @ %bb.0: @ %entry
1019 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1020 ; CHECK-BE-NEXT: vstrw.32 q0, [r0]
1021 ; CHECK-BE-NEXT: adds r0, #3
1022 ; CHECK-BE-NEXT: bx lr
1024 %z = getelementptr inbounds i8, ptr %y, i32 3
1025 %0 = load <4 x i32>, ptr %x, align 4
1026 store <4 x i32> %0, ptr %y, align 4
1030 define ptr @strw32_m4(ptr %y, ptr %x) {
1031 ; CHECK-LE-LABEL: strw32_m4:
1032 ; CHECK-LE: @ %bb.0: @ %entry
1033 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
1034 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #-4
1035 ; CHECK-LE-NEXT: bx lr
1037 ; CHECK-BE-LABEL: strw32_m4:
1038 ; CHECK-BE: @ %bb.0: @ %entry
1039 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1040 ; CHECK-BE-NEXT: vstrw.32 q0, [r0], #-4
1041 ; CHECK-BE-NEXT: bx lr
1043 %z = getelementptr inbounds i8, ptr %y, i32 -4
1044 %0 = load <4 x i32>, ptr %x, align 4
1045 store <4 x i32> %0, ptr %y, align 4
1049 define ptr @strw32_508(ptr %y, ptr %x) {
1050 ; CHECK-LABEL: strw32_508:
1051 ; CHECK: @ %bb.0: @ %entry
1052 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1053 ; CHECK-NEXT: vstrw.32 q0, [r0], #508
1056 %z = getelementptr inbounds i8, ptr %y, i32 508
1057 %0 = load <4 x i32>, ptr %x, align 4
1058 store <4 x i32> %0, ptr %y, align 4
1062 define ptr @strw32_512(ptr %y, ptr %x) {
1063 ; CHECK-LABEL: strw32_512:
1064 ; CHECK: @ %bb.0: @ %entry
1065 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1066 ; CHECK-NEXT: vstrw.32 q0, [r0]
1067 ; CHECK-NEXT: add.w r0, r0, #512
1070 %z = getelementptr inbounds i8, ptr %y, i32 512
1071 %0 = load <4 x i32>, ptr %x, align 4
1072 store <4 x i32> %0, ptr %y, align 4
1076 define ptr @strw32_m508(ptr %y, ptr %x) {
1077 ; CHECK-LABEL: strw32_m508:
1078 ; CHECK: @ %bb.0: @ %entry
1079 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1080 ; CHECK-NEXT: vstrw.32 q0, [r0], #-508
1083 %z = getelementptr inbounds i8, ptr %y, i32 -508
1084 %0 = load <4 x i32>, ptr %x, align 4
1085 store <4 x i32> %0, ptr %y, align 4
1089 define ptr @strw32_m512(ptr %y, ptr %x) {
1090 ; CHECK-LABEL: strw32_m512:
1091 ; CHECK: @ %bb.0: @ %entry
1092 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1093 ; CHECK-NEXT: vstrw.32 q0, [r0]
1094 ; CHECK-NEXT: sub.w r0, r0, #512
1097 %z = getelementptr inbounds i8, ptr %y, i32 -512
1098 %0 = load <4 x i32>, ptr %x, align 4
1099 store <4 x i32> %0, ptr %y, align 4
1104 define ptr @strh32_4(ptr %y, ptr %x) {
1105 ; CHECK-LABEL: strh32_4:
1106 ; CHECK: @ %bb.0: @ %entry
1107 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1108 ; CHECK-NEXT: vstrh.32 q0, [r0], #4
1111 %z = getelementptr inbounds i8, ptr %y, i32 4
1112 %0 = load <4 x i16>, ptr %x, align 2
1113 store <4 x i16> %0, ptr %y, align 2
1117 define ptr @strh32_3(ptr %y, ptr %x) {
1118 ; CHECK-LABEL: strh32_3:
1119 ; CHECK: @ %bb.0: @ %entry
1120 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1121 ; CHECK-NEXT: vstrh.32 q0, [r0]
1122 ; CHECK-NEXT: adds r0, #3
1125 %z = getelementptr inbounds i8, ptr %y, i32 3
1126 %0 = load <4 x i16>, ptr %x, align 2
1127 store <4 x i16> %0, ptr %y, align 2
1131 define ptr @strh32_2(ptr %y, ptr %x) {
1132 ; CHECK-LABEL: strh32_2:
1133 ; CHECK: @ %bb.0: @ %entry
1134 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1135 ; CHECK-NEXT: vstrh.32 q0, [r0], #2
1138 %z = getelementptr inbounds i8, ptr %y, i32 2
1139 %0 = load <4 x i16>, ptr %x, align 2
1140 store <4 x i16> %0, ptr %y, align 2
1144 define ptr @strh32_254(ptr %y, ptr %x) {
1145 ; CHECK-LABEL: strh32_254:
1146 ; CHECK: @ %bb.0: @ %entry
1147 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1148 ; CHECK-NEXT: vstrh.32 q0, [r0], #254
1151 %z = getelementptr inbounds i8, ptr %y, i32 254
1152 %0 = load <4 x i16>, ptr %x, align 2
1153 store <4 x i16> %0, ptr %y, align 2
1157 define ptr @strh32_256(ptr %y, ptr %x) {
1158 ; CHECK-LABEL: strh32_256:
1159 ; CHECK: @ %bb.0: @ %entry
1160 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1161 ; CHECK-NEXT: vstrh.32 q0, [r0]
1162 ; CHECK-NEXT: add.w r0, r0, #256
1165 %z = getelementptr inbounds i8, ptr %y, i32 256
1166 %0 = load <4 x i16>, ptr %x, align 2
1167 store <4 x i16> %0, ptr %y, align 2
1171 define ptr @strh32_m254(ptr %y, ptr %x) {
1172 ; CHECK-LABEL: strh32_m254:
1173 ; CHECK: @ %bb.0: @ %entry
1174 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1175 ; CHECK-NEXT: vstrh.32 q0, [r0], #-254
1178 %z = getelementptr inbounds i8, ptr %y, i32 -254
1179 %0 = load <4 x i16>, ptr %x, align 2
1180 store <4 x i16> %0, ptr %y, align 2
1184 define ptr @strh32_m256(ptr %y, ptr %x) {
1185 ; CHECK-LABEL: strh32_m256:
1186 ; CHECK: @ %bb.0: @ %entry
1187 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1188 ; CHECK-NEXT: vstrh.32 q0, [r0]
1189 ; CHECK-NEXT: sub.w r0, r0, #256
1192 %z = getelementptr inbounds i8, ptr %y, i32 -256
1193 %0 = load <4 x i16>, ptr %x, align 2
1194 store <4 x i16> %0, ptr %y, align 2
1199 define ptr @strh16_4(ptr %y, ptr %x) {
1200 ; CHECK-LE-LABEL: strh16_4:
1201 ; CHECK-LE: @ %bb.0: @ %entry
1202 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1203 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #4
1204 ; CHECK-LE-NEXT: bx lr
1206 ; CHECK-BE-LABEL: strh16_4:
1207 ; CHECK-BE: @ %bb.0: @ %entry
1208 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1209 ; CHECK-BE-NEXT: vstrh.16 q0, [r0], #4
1210 ; CHECK-BE-NEXT: bx lr
1212 %z = getelementptr inbounds i8, ptr %y, i32 4
1213 %0 = load <8 x i16>, ptr %x, align 2
1214 store <8 x i16> %0, ptr %y, align 2
1218 define ptr @strh16_3(ptr %y, ptr %x) {
1219 ; CHECK-LE-LABEL: strh16_3:
1220 ; CHECK-LE: @ %bb.0: @ %entry
1221 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1222 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #3
1223 ; CHECK-LE-NEXT: bx lr
1225 ; CHECK-BE-LABEL: strh16_3:
1226 ; CHECK-BE: @ %bb.0: @ %entry
1227 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1228 ; CHECK-BE-NEXT: vstrh.16 q0, [r0]
1229 ; CHECK-BE-NEXT: adds r0, #3
1230 ; CHECK-BE-NEXT: bx lr
1232 %z = getelementptr inbounds i8, ptr %y, i32 3
1233 %0 = load <8 x i16>, ptr %x, align 2
1234 store <8 x i16> %0, ptr %y, align 2
1238 define ptr @strh16_2(ptr %y, ptr %x) {
1239 ; CHECK-LE-LABEL: strh16_2:
1240 ; CHECK-LE: @ %bb.0: @ %entry
1241 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1242 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #2
1243 ; CHECK-LE-NEXT: bx lr
1245 ; CHECK-BE-LABEL: strh16_2:
1246 ; CHECK-BE: @ %bb.0: @ %entry
1247 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1248 ; CHECK-BE-NEXT: vstrh.16 q0, [r0], #2
1249 ; CHECK-BE-NEXT: bx lr
1251 %z = getelementptr inbounds i8, ptr %y, i32 2
1252 %0 = load <8 x i16>, ptr %x, align 2
1253 store <8 x i16> %0, ptr %y, align 2
1257 define ptr @strh16_254(ptr %y, ptr %x) {
1258 ; CHECK-LABEL: strh16_254:
1259 ; CHECK: @ %bb.0: @ %entry
1260 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1261 ; CHECK-NEXT: vstrh.16 q0, [r0], #254
1264 %z = getelementptr inbounds i8, ptr %y, i32 254
1265 %0 = load <8 x i16>, ptr %x, align 2
1266 store <8 x i16> %0, ptr %y, align 2
1270 define ptr @strh16_256(ptr %y, ptr %x) {
1271 ; CHECK-LABEL: strh16_256:
1272 ; CHECK: @ %bb.0: @ %entry
1273 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1274 ; CHECK-NEXT: vstrh.16 q0, [r0]
1275 ; CHECK-NEXT: add.w r0, r0, #256
1278 %z = getelementptr inbounds i8, ptr %y, i32 256
1279 %0 = load <8 x i16>, ptr %x, align 2
1280 store <8 x i16> %0, ptr %y, align 2
1284 define ptr @strh16_m254(ptr %y, ptr %x) {
1285 ; CHECK-LABEL: strh16_m254:
1286 ; CHECK: @ %bb.0: @ %entry
1287 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1288 ; CHECK-NEXT: vstrh.16 q0, [r0], #-254
1291 %z = getelementptr inbounds i8, ptr %y, i32 -254
1292 %0 = load <8 x i16>, ptr %x, align 2
1293 store <8 x i16> %0, ptr %y, align 2
1297 define ptr @strh16_m256(ptr %y, ptr %x) {
1298 ; CHECK-LABEL: strh16_m256:
1299 ; CHECK: @ %bb.0: @ %entry
1300 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1301 ; CHECK-NEXT: vstrh.16 q0, [r0]
1302 ; CHECK-NEXT: sub.w r0, r0, #256
1305 %z = getelementptr inbounds i8, ptr %y, i32 -256
1306 %0 = load <8 x i16>, ptr %x, align 2
1307 store <8 x i16> %0, ptr %y, align 2
1312 define ptr @strb32_4(ptr %y, ptr %x) {
1313 ; CHECK-LABEL: strb32_4:
1314 ; CHECK: @ %bb.0: @ %entry
1315 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1316 ; CHECK-NEXT: vstrb.32 q0, [r0], #4
1319 %z = getelementptr inbounds i8, ptr %y, i32 4
1320 %0 = load <4 x i8>, ptr %x, align 1
1321 store <4 x i8> %0, ptr %y, align 1
1325 define ptr @strb32_3(ptr %y, ptr %x) {
1326 ; CHECK-LABEL: strb32_3:
1327 ; CHECK: @ %bb.0: @ %entry
1328 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1329 ; CHECK-NEXT: vstrb.32 q0, [r0], #3
1332 %z = getelementptr inbounds i8, ptr %y, i32 3
1333 %0 = load <4 x i8>, ptr %x, align 1
1334 store <4 x i8> %0, ptr %y, align 1
1338 define ptr @strb32_127(ptr %y, ptr %x) {
1339 ; CHECK-LABEL: strb32_127:
1340 ; CHECK: @ %bb.0: @ %entry
1341 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1342 ; CHECK-NEXT: vstrb.32 q0, [r0], #127
1345 %z = getelementptr inbounds i8, ptr %y, i32 127
1346 %0 = load <4 x i8>, ptr %x, align 1
1347 store <4 x i8> %0, ptr %y, align 1
1351 define ptr @strb32_128(ptr %y, ptr %x) {
1352 ; CHECK-LABEL: strb32_128:
1353 ; CHECK: @ %bb.0: @ %entry
1354 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1355 ; CHECK-NEXT: vstrb.32 q0, [r0]
1356 ; CHECK-NEXT: adds r0, #128
1359 %z = getelementptr inbounds i8, ptr %y, i32 128
1360 %0 = load <4 x i8>, ptr %x, align 1
1361 store <4 x i8> %0, ptr %y, align 1
1365 define ptr @strb32_m127(ptr %y, ptr %x) {
1366 ; CHECK-LABEL: strb32_m127:
1367 ; CHECK: @ %bb.0: @ %entry
1368 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1369 ; CHECK-NEXT: vstrb.32 q0, [r0], #-127
1372 %z = getelementptr inbounds i8, ptr %y, i32 -127
1373 %0 = load <4 x i8>, ptr %x, align 1
1374 store <4 x i8> %0, ptr %y, align 1
1378 define ptr @strb32_m128(ptr %y, ptr %x) {
1379 ; CHECK-LABEL: strb32_m128:
1380 ; CHECK: @ %bb.0: @ %entry
1381 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1382 ; CHECK-NEXT: vstrb.32 q0, [r0]
1383 ; CHECK-NEXT: subs r0, #128
1386 %z = getelementptr inbounds i8, ptr %y, i32 -128
1387 %0 = load <4 x i8>, ptr %x, align 1
1388 store <4 x i8> %0, ptr %y, align 1
1393 define ptr @strb16_4(ptr %y, ptr %x) {
1394 ; CHECK-LABEL: strb16_4:
1395 ; CHECK: @ %bb.0: @ %entry
1396 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1397 ; CHECK-NEXT: vstrb.16 q0, [r0], #4
1400 %z = getelementptr inbounds i8, ptr %y, i32 4
1401 %0 = load <8 x i8>, ptr %x, align 1
1402 store <8 x i8> %0, ptr %y, align 1
1406 define ptr @strb16_3(ptr %y, ptr %x) {
1407 ; CHECK-LABEL: strb16_3:
1408 ; CHECK: @ %bb.0: @ %entry
1409 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1410 ; CHECK-NEXT: vstrb.16 q0, [r0], #3
1413 %z = getelementptr inbounds i8, ptr %y, i32 3
1414 %0 = load <8 x i8>, ptr %x, align 1
1415 store <8 x i8> %0, ptr %y, align 1
1419 define ptr @strb16_127(ptr %y, ptr %x) {
1420 ; CHECK-LABEL: strb16_127:
1421 ; CHECK: @ %bb.0: @ %entry
1422 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1423 ; CHECK-NEXT: vstrb.16 q0, [r0], #127
1426 %z = getelementptr inbounds i8, ptr %y, i32 127
1427 %0 = load <8 x i8>, ptr %x, align 1
1428 store <8 x i8> %0, ptr %y, align 1
1432 define ptr @strb16_128(ptr %y, ptr %x) {
1433 ; CHECK-LABEL: strb16_128:
1434 ; CHECK: @ %bb.0: @ %entry
1435 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1436 ; CHECK-NEXT: vstrb.16 q0, [r0]
1437 ; CHECK-NEXT: adds r0, #128
1440 %z = getelementptr inbounds i8, ptr %y, i32 128
1441 %0 = load <8 x i8>, ptr %x, align 1
1442 store <8 x i8> %0, ptr %y, align 1
1446 define ptr @strb16_m127(ptr %y, ptr %x) {
1447 ; CHECK-LABEL: strb16_m127:
1448 ; CHECK: @ %bb.0: @ %entry
1449 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1450 ; CHECK-NEXT: vstrb.16 q0, [r0], #-127
1453 %z = getelementptr inbounds i8, ptr %y, i32 -127
1454 %0 = load <8 x i8>, ptr %x, align 1
1455 store <8 x i8> %0, ptr %y, align 1
1459 define ptr @strb16_m128(ptr %y, ptr %x) {
1460 ; CHECK-LABEL: strb16_m128:
1461 ; CHECK: @ %bb.0: @ %entry
1462 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1463 ; CHECK-NEXT: vstrb.16 q0, [r0]
1464 ; CHECK-NEXT: subs r0, #128
1467 %z = getelementptr inbounds i8, ptr %y, i32 -128
1468 %0 = load <8 x i8>, ptr %x, align 1
1469 store <8 x i8> %0, ptr %y, align 1
1474 define ptr @strb8_4(ptr %y, ptr %x) {
1475 ; CHECK-LABEL: strb8_4:
1476 ; CHECK: @ %bb.0: @ %entry
1477 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1478 ; CHECK-NEXT: vstrb.8 q0, [r0], #4
1481 %z = getelementptr inbounds i8, ptr %y, i32 4
1482 %0 = load <16 x i8>, ptr %x, align 1
1483 store <16 x i8> %0, ptr %y, align 1
1487 define ptr @strb8_3(ptr %y, ptr %x) {
1488 ; CHECK-LABEL: strb8_3:
1489 ; CHECK: @ %bb.0: @ %entry
1490 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1491 ; CHECK-NEXT: vstrb.8 q0, [r0], #3
1494 %z = getelementptr inbounds i8, ptr %y, i32 3
1495 %0 = load <16 x i8>, ptr %x, align 1
1496 store <16 x i8> %0, ptr %y, align 1
1500 define ptr @strb8_127(ptr %y, ptr %x) {
1501 ; CHECK-LABEL: strb8_127:
1502 ; CHECK: @ %bb.0: @ %entry
1503 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1504 ; CHECK-NEXT: vstrb.8 q0, [r0], #127
1507 %z = getelementptr inbounds i8, ptr %y, i32 127
1508 %0 = load <16 x i8>, ptr %x, align 1
1509 store <16 x i8> %0, ptr %y, align 1
1513 define ptr @strb8_128(ptr %y, ptr %x) {
1514 ; CHECK-LABEL: strb8_128:
1515 ; CHECK: @ %bb.0: @ %entry
1516 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1517 ; CHECK-NEXT: vstrb.8 q0, [r0]
1518 ; CHECK-NEXT: adds r0, #128
1521 %z = getelementptr inbounds i8, ptr %y, i32 128
1522 %0 = load <16 x i8>, ptr %x, align 1
1523 store <16 x i8> %0, ptr %y, align 1
1527 define ptr @strb8_m127(ptr %y, ptr %x) {
1528 ; CHECK-LABEL: strb8_m127:
1529 ; CHECK: @ %bb.0: @ %entry
1530 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1531 ; CHECK-NEXT: vstrb.8 q0, [r0], #-127
1534 %z = getelementptr inbounds i8, ptr %y, i32 -127
1535 %0 = load <16 x i8>, ptr %x, align 1
1536 store <16 x i8> %0, ptr %y, align 1
1540 define ptr @strb8_m128(ptr %y, ptr %x) {
1541 ; CHECK-LABEL: strb8_m128:
1542 ; CHECK: @ %bb.0: @ %entry
1543 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1544 ; CHECK-NEXT: vstrb.8 q0, [r0]
1545 ; CHECK-NEXT: subs r0, #128
1548 %z = getelementptr inbounds i8, ptr %y, i32 -128
1549 %0 = load <16 x i8>, ptr %x, align 1
1550 store <16 x i8> %0, ptr %y, align 1
1555 define ptr @strf32_4(ptr %y, ptr %x) {
1556 ; CHECK-LE-LABEL: strf32_4:
1557 ; CHECK-LE: @ %bb.0: @ %entry
1558 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
1559 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #4
1560 ; CHECK-LE-NEXT: bx lr
1562 ; CHECK-BE-LABEL: strf32_4:
1563 ; CHECK-BE: @ %bb.0: @ %entry
1564 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1565 ; CHECK-BE-NEXT: vstrw.32 q0, [r0], #4
1566 ; CHECK-BE-NEXT: bx lr
1568 %z = getelementptr inbounds i8, ptr %y, i32 4
1569 %0 = load <4 x float>, ptr %x, align 4
1570 store <4 x float> %0, ptr %y, align 4
1574 define ptr @strf16_4(ptr %y, ptr %x) {
1575 ; CHECK-LE-LABEL: strf16_4:
1576 ; CHECK-LE: @ %bb.0: @ %entry
1577 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1578 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #4
1579 ; CHECK-LE-NEXT: bx lr
1581 ; CHECK-BE-LABEL: strf16_4:
1582 ; CHECK-BE: @ %bb.0: @ %entry
1583 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1584 ; CHECK-BE-NEXT: vstrh.16 q0, [r0], #4
1585 ; CHECK-BE-NEXT: bx lr
1587 %z = getelementptr inbounds i8, ptr %y, i32 4
1588 %0 = load <8 x half>, ptr %x, align 2
1589 store <8 x half> %0, ptr %y, align 2
1593 define ptr @strwi32_align1(ptr %y, ptr %x) {
1594 ; CHECK-LE-LABEL: strwi32_align1:
1595 ; CHECK-LE: @ %bb.0: @ %entry
1596 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
1597 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #3
1598 ; CHECK-LE-NEXT: bx lr
1600 ; CHECK-BE-LABEL: strwi32_align1:
1601 ; CHECK-BE: @ %bb.0: @ %entry
1602 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1603 ; CHECK-BE-NEXT: vrev32.8 q0, q0
1604 ; CHECK-BE-NEXT: vstrb.8 q0, [r0], #3
1605 ; CHECK-BE-NEXT: bx lr
1607 %z = getelementptr inbounds i8, ptr %y, i32 3
1608 %0 = load <4 x i32>, ptr %x, align 4
1609 store <4 x i32> %0, ptr %y, align 1
1613 define ptr @strhi16_align1(ptr %y, ptr %x) {
1614 ; CHECK-LE-LABEL: strhi16_align1:
1615 ; CHECK-LE: @ %bb.0: @ %entry
1616 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1617 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #3
1618 ; CHECK-LE-NEXT: bx lr
1620 ; CHECK-BE-LABEL: strhi16_align1:
1621 ; CHECK-BE: @ %bb.0: @ %entry
1622 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1623 ; CHECK-BE-NEXT: vrev16.8 q0, q0
1624 ; CHECK-BE-NEXT: vstrb.8 q0, [r0], #3
1625 ; CHECK-BE-NEXT: bx lr
1627 %z = getelementptr inbounds i8, ptr %y, i32 3
1628 %0 = load <8 x i16>, ptr %x, align 2
1629 store <8 x i16> %0, ptr %y, align 1
1633 define ptr @strhi32_align1(ptr %y, ptr %x) {
1634 ; CHECK-LABEL: strhi32_align1:
1635 ; CHECK: @ %bb.0: @ %entry
1636 ; CHECK-NEXT: .pad #8
1637 ; CHECK-NEXT: sub sp, #8
1638 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1639 ; CHECK-NEXT: mov r1, sp
1640 ; CHECK-NEXT: vstrh.32 q0, [r1]
1641 ; CHECK-NEXT: ldrd r1, r2, [sp]
1642 ; CHECK-NEXT: str r1, [r0]
1643 ; CHECK-NEXT: str r2, [r0, #4]
1644 ; CHECK-NEXT: adds r0, #3
1645 ; CHECK-NEXT: add sp, #8
1648 %z = getelementptr inbounds i8, ptr %y, i32 3
1649 %0 = load <4 x i32>, ptr %x, align 4
1650 %1 = trunc <4 x i32> %0 to <4 x i16>
1651 store <4 x i16> %1, ptr %y, align 1
1655 define ptr @strf32_align1(ptr %y, ptr %x) {
1656 ; CHECK-LE-LABEL: strf32_align1:
1657 ; CHECK-LE: @ %bb.0: @ %entry
1658 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
1659 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #3
1660 ; CHECK-LE-NEXT: bx lr
1662 ; CHECK-BE-LABEL: strf32_align1:
1663 ; CHECK-BE: @ %bb.0: @ %entry
1664 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1665 ; CHECK-BE-NEXT: vrev32.8 q0, q0
1666 ; CHECK-BE-NEXT: vstrb.8 q0, [r0], #3
1667 ; CHECK-BE-NEXT: bx lr
1669 %z = getelementptr inbounds i8, ptr %y, i32 3
1670 %0 = load <4 x float>, ptr %x, align 4
1671 store <4 x float> %0, ptr %y, align 1
1675 define ptr @strf16_align1(ptr %y, ptr %x) {
1676 ; CHECK-LE-LABEL: strf16_align1:
1677 ; CHECK-LE: @ %bb.0: @ %entry
1678 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1679 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #3
1680 ; CHECK-LE-NEXT: bx lr
1682 ; CHECK-BE-LABEL: strf16_align1:
1683 ; CHECK-BE: @ %bb.0: @ %entry
1684 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1685 ; CHECK-BE-NEXT: vrev16.8 q0, q0
1686 ; CHECK-BE-NEXT: vstrb.8 q0, [r0], #3
1687 ; CHECK-BE-NEXT: bx lr
1689 %z = getelementptr inbounds i8, ptr %y, i32 3
1690 %0 = load <8 x half>, ptr %x, align 2
1691 store <8 x half> %0, ptr %y, align 1
1695 define ptr @strf16_align8(ptr %y, ptr %x) {
1696 ; CHECK-LE-LABEL: strf16_align8:
1697 ; CHECK-LE: @ %bb.0: @ %entry
1698 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1699 ; CHECK-LE-NEXT: vstrb.8 q0, [r0], #16
1700 ; CHECK-LE-NEXT: bx lr
1702 ; CHECK-BE-LABEL: strf16_align8:
1703 ; CHECK-BE: @ %bb.0: @ %entry
1704 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1705 ; CHECK-BE-NEXT: vstrh.16 q0, [r0], #16
1706 ; CHECK-BE-NEXT: bx lr
1708 %z = getelementptr inbounds i8, ptr %y, i32 16
1709 %0 = load <8 x i16>, ptr %x, align 2
1710 store <8 x i16> %0, ptr %y, align 8