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 %z, align 4
14 store <4 x i32> %0, ptr %y, align 4
18 define ptr @ldrwu32_3(ptr %x, ptr %y) {
19 ; CHECK-LABEL: ldrwu32_3:
20 ; CHECK: @ %bb.0: @ %entry
21 ; CHECK-NEXT: adds r2, r0, #3
22 ; CHECK-NEXT: vldrw.u32 q0, [r2]
23 ; CHECK-NEXT: vstrw.32 q0, [r1]
26 %z = getelementptr inbounds i8, ptr %x, i32 3
27 %0 = load <4 x i32>, ptr %z, align 4
28 store <4 x i32> %0, ptr %y, align 4
32 define ptr @ldrwu32_m4(ptr %x, ptr %y) {
33 ; CHECK-LABEL: ldrwu32_m4:
34 ; CHECK: @ %bb.0: @ %entry
35 ; CHECK-NEXT: vldrw.u32 q0, [r0, #-4]
36 ; CHECK-NEXT: vstrw.32 q0, [r1]
39 %z = getelementptr inbounds i8, ptr %x, i32 -4
40 %0 = load <4 x i32>, ptr %z, align 4
41 store <4 x i32> %0, ptr %y, align 4
45 define ptr @ldrwu32_508(ptr %x, ptr %y) {
46 ; CHECK-LABEL: ldrwu32_508:
47 ; CHECK: @ %bb.0: @ %entry
48 ; CHECK-NEXT: vldrw.u32 q0, [r0, #508]
49 ; CHECK-NEXT: vstrw.32 q0, [r1]
52 %z = getelementptr inbounds i8, ptr %x, i32 508
53 %0 = load <4 x i32>, ptr %z, align 4
54 store <4 x i32> %0, ptr %y, align 4
58 define ptr @ldrwu32_512(ptr %x, ptr %y) {
59 ; CHECK-LABEL: ldrwu32_512:
60 ; CHECK: @ %bb.0: @ %entry
61 ; CHECK-NEXT: add.w r2, r0, #512
62 ; CHECK-NEXT: vldrw.u32 q0, [r2]
63 ; CHECK-NEXT: vstrw.32 q0, [r1]
66 %z = getelementptr inbounds i8, ptr %x, i32 512
67 %0 = load <4 x i32>, ptr %z, align 4
68 store <4 x i32> %0, ptr %y, align 4
72 define ptr @ldrwu32_m508(ptr %x, ptr %y) {
73 ; CHECK-LABEL: ldrwu32_m508:
74 ; CHECK: @ %bb.0: @ %entry
75 ; CHECK-NEXT: vldrw.u32 q0, [r0, #-508]
76 ; CHECK-NEXT: vstrw.32 q0, [r1]
79 %z = getelementptr inbounds i8, ptr %x, i32 -508
80 %0 = load <4 x i32>, ptr %z, align 4
81 store <4 x i32> %0, ptr %y, align 4
85 define ptr @ldrwu32_m512(ptr %x, ptr %y) {
86 ; CHECK-LABEL: ldrwu32_m512:
87 ; CHECK: @ %bb.0: @ %entry
88 ; CHECK-NEXT: sub.w r2, r0, #512
89 ; CHECK-NEXT: vldrw.u32 q0, [r2]
90 ; CHECK-NEXT: vstrw.32 q0, [r1]
93 %z = getelementptr inbounds i8, ptr %x, i32 -512
94 %0 = load <4 x i32>, ptr %z, align 4
95 store <4 x i32> %0, ptr %y, align 4
100 define ptr @ldrhu32_4(ptr %x, ptr %y) {
101 ; CHECK-LABEL: ldrhu32_4:
102 ; CHECK: @ %bb.0: @ %entry
103 ; CHECK-NEXT: vldrh.u32 q0, [r0, #4]
104 ; CHECK-NEXT: vstrw.32 q0, [r1]
107 %z = getelementptr inbounds i8, ptr %x, i32 4
108 %0 = load <4 x i16>, ptr %z, align 2
109 %1 = zext <4 x i16> %0 to <4 x i32>
110 store <4 x i32> %1, ptr %y, align 4
114 define ptr @ldrhu32_3(ptr %x, ptr %y) {
115 ; CHECK-LABEL: ldrhu32_3:
116 ; CHECK: @ %bb.0: @ %entry
117 ; CHECK-NEXT: adds r2, r0, #3
118 ; CHECK-NEXT: vldrh.u32 q0, [r2]
119 ; CHECK-NEXT: vstrw.32 q0, [r1]
122 %z = getelementptr inbounds i8, ptr %x, i32 3
123 %0 = load <4 x i16>, ptr %z, align 2
124 %1 = zext <4 x i16> %0 to <4 x i32>
125 store <4 x i32> %1, ptr %y, align 4
129 define ptr @ldrhu32_2(ptr %x, ptr %y) {
130 ; CHECK-LABEL: ldrhu32_2:
131 ; CHECK: @ %bb.0: @ %entry
132 ; CHECK-NEXT: vldrh.u32 q0, [r0, #2]
133 ; CHECK-NEXT: vstrw.32 q0, [r1]
136 %z = getelementptr inbounds i8, ptr %x, i32 2
137 %0 = load <4 x i16>, ptr %z, align 2
138 %1 = zext <4 x i16> %0 to <4 x i32>
139 store <4 x i32> %1, ptr %y, align 4
143 define ptr @ldrhu32_254(ptr %x, ptr %y) {
144 ; CHECK-LABEL: ldrhu32_254:
145 ; CHECK: @ %bb.0: @ %entry
146 ; CHECK-NEXT: vldrh.u32 q0, [r0, #254]
147 ; CHECK-NEXT: vstrw.32 q0, [r1]
150 %z = getelementptr inbounds i8, ptr %x, i32 254
151 %0 = load <4 x i16>, ptr %z, align 2
152 %1 = zext <4 x i16> %0 to <4 x i32>
153 store <4 x i32> %1, ptr %y, align 4
157 define ptr @ldrhu32_256(ptr %x, ptr %y) {
158 ; CHECK-LABEL: ldrhu32_256:
159 ; CHECK: @ %bb.0: @ %entry
160 ; CHECK-NEXT: add.w r2, r0, #256
161 ; CHECK-NEXT: vldrh.u32 q0, [r2]
162 ; CHECK-NEXT: vstrw.32 q0, [r1]
165 %z = getelementptr inbounds i8, ptr %x, i32 256
166 %0 = load <4 x i16>, ptr %z, align 2
167 %1 = zext <4 x i16> %0 to <4 x i32>
168 store <4 x i32> %1, ptr %y, align 4
172 define ptr @ldrhu32_m254(ptr %x, ptr %y) {
173 ; CHECK-LABEL: ldrhu32_m254:
174 ; CHECK: @ %bb.0: @ %entry
175 ; CHECK-NEXT: vldrh.u32 q0, [r0, #-254]
176 ; CHECK-NEXT: vstrw.32 q0, [r1]
179 %z = getelementptr inbounds i8, ptr %x, i32 -254
180 %0 = load <4 x i16>, ptr %z, align 2
181 %1 = zext <4 x i16> %0 to <4 x i32>
182 store <4 x i32> %1, ptr %y, align 4
186 define ptr @ldrhu32_m256(ptr %x, ptr %y) {
187 ; CHECK-LABEL: ldrhu32_m256:
188 ; CHECK: @ %bb.0: @ %entry
189 ; CHECK-NEXT: sub.w r2, r0, #256
190 ; CHECK-NEXT: vldrh.u32 q0, [r2]
191 ; CHECK-NEXT: vstrw.32 q0, [r1]
194 %z = getelementptr inbounds i8, ptr %x, i32 -256
195 %0 = load <4 x i16>, ptr %z, align 2
196 %1 = zext <4 x i16> %0 to <4 x i32>
197 store <4 x i32> %1, ptr %y, align 4
202 define ptr @ldrhs32_4(ptr %x, ptr %y) {
203 ; CHECK-LABEL: ldrhs32_4:
204 ; CHECK: @ %bb.0: @ %entry
205 ; CHECK-NEXT: vldrh.s32 q0, [r0, #4]
206 ; CHECK-NEXT: vstrw.32 q0, [r1]
209 %z = getelementptr inbounds i8, ptr %x, i32 4
210 %0 = load <4 x i16>, ptr %z, align 2
211 %1 = sext <4 x i16> %0 to <4 x i32>
212 store <4 x i32> %1, ptr %y, align 4
216 define ptr @ldrhs32_3(ptr %x, ptr %y) {
217 ; CHECK-LABEL: ldrhs32_3:
218 ; CHECK: @ %bb.0: @ %entry
219 ; CHECK-NEXT: adds r2, r0, #3
220 ; CHECK-NEXT: vldrh.s32 q0, [r2]
221 ; CHECK-NEXT: vstrw.32 q0, [r1]
224 %z = getelementptr inbounds i8, ptr %x, i32 3
225 %0 = load <4 x i16>, ptr %z, align 2
226 %1 = sext <4 x i16> %0 to <4 x i32>
227 store <4 x i32> %1, ptr %y, align 4
231 define ptr @ldrhs32_2(ptr %x, ptr %y) {
232 ; CHECK-LABEL: ldrhs32_2:
233 ; CHECK: @ %bb.0: @ %entry
234 ; CHECK-NEXT: vldrh.s32 q0, [r0, #2]
235 ; CHECK-NEXT: vstrw.32 q0, [r1]
238 %z = getelementptr inbounds i8, ptr %x, i32 2
239 %0 = load <4 x i16>, ptr %z, align 2
240 %1 = sext <4 x i16> %0 to <4 x i32>
241 store <4 x i32> %1, ptr %y, align 4
245 define ptr @ldrhs32_254(ptr %x, ptr %y) {
246 ; CHECK-LABEL: ldrhs32_254:
247 ; CHECK: @ %bb.0: @ %entry
248 ; CHECK-NEXT: vldrh.s32 q0, [r0, #254]
249 ; CHECK-NEXT: vstrw.32 q0, [r1]
252 %z = getelementptr inbounds i8, ptr %x, i32 254
253 %0 = load <4 x i16>, ptr %z, align 2
254 %1 = sext <4 x i16> %0 to <4 x i32>
255 store <4 x i32> %1, ptr %y, align 4
259 define ptr @ldrhs32_256(ptr %x, ptr %y) {
260 ; CHECK-LABEL: ldrhs32_256:
261 ; CHECK: @ %bb.0: @ %entry
262 ; CHECK-NEXT: add.w r2, r0, #256
263 ; CHECK-NEXT: vldrh.s32 q0, [r2]
264 ; CHECK-NEXT: vstrw.32 q0, [r1]
267 %z = getelementptr inbounds i8, ptr %x, i32 256
268 %0 = load <4 x i16>, ptr %z, align 2
269 %1 = sext <4 x i16> %0 to <4 x i32>
270 store <4 x i32> %1, ptr %y, align 4
274 define ptr @ldrhs32_m254(ptr %x, ptr %y) {
275 ; CHECK-LABEL: ldrhs32_m254:
276 ; CHECK: @ %bb.0: @ %entry
277 ; CHECK-NEXT: vldrh.s32 q0, [r0, #-254]
278 ; CHECK-NEXT: vstrw.32 q0, [r1]
281 %z = getelementptr inbounds i8, ptr %x, i32 -254
282 %0 = load <4 x i16>, ptr %z, align 2
283 %1 = sext <4 x i16> %0 to <4 x i32>
284 store <4 x i32> %1, ptr %y, align 4
288 define ptr @ldrhs32_m256(ptr %x, ptr %y) {
289 ; CHECK-LABEL: ldrhs32_m256:
290 ; CHECK: @ %bb.0: @ %entry
291 ; CHECK-NEXT: sub.w r2, r0, #256
292 ; CHECK-NEXT: vldrh.s32 q0, [r2]
293 ; CHECK-NEXT: vstrw.32 q0, [r1]
296 %z = getelementptr inbounds i8, ptr %x, i32 -256
297 %0 = load <4 x i16>, ptr %z, align 2
298 %1 = sext <4 x i16> %0 to <4 x i32>
299 store <4 x i32> %1, ptr %y, align 4
304 define ptr @ldrhu16_4(ptr %x, ptr %y) {
305 ; CHECK-LABEL: ldrhu16_4:
306 ; CHECK: @ %bb.0: @ %entry
307 ; CHECK-NEXT: vldrh.u16 q0, [r0, #4]
308 ; CHECK-NEXT: vstrh.16 q0, [r1]
311 %z = getelementptr inbounds i8, ptr %x, i32 4
312 %0 = load <8 x i16>, ptr %z, align 2
313 store <8 x i16> %0, ptr %y, align 2
317 define ptr @ldrhu16_3(ptr %x, ptr %y) {
318 ; CHECK-LABEL: ldrhu16_3:
319 ; CHECK: @ %bb.0: @ %entry
320 ; CHECK-NEXT: adds r2, r0, #3
321 ; CHECK-NEXT: vldrh.u16 q0, [r2]
322 ; CHECK-NEXT: vstrh.16 q0, [r1]
325 %z = getelementptr inbounds i8, ptr %x, i32 3
326 %0 = load <8 x i16>, ptr %z, align 2
327 store <8 x i16> %0, ptr %y, align 2
331 define ptr @ldrhu16_2(ptr %x, ptr %y) {
332 ; CHECK-LABEL: ldrhu16_2:
333 ; CHECK: @ %bb.0: @ %entry
334 ; CHECK-NEXT: vldrh.u16 q0, [r0, #2]
335 ; CHECK-NEXT: vstrh.16 q0, [r1]
338 %z = getelementptr inbounds i8, ptr %x, i32 2
339 %0 = load <8 x i16>, ptr %z, align 2
340 store <8 x i16> %0, ptr %y, align 2
344 define ptr @ldrhu16_254(ptr %x, ptr %y) {
345 ; CHECK-LABEL: ldrhu16_254:
346 ; CHECK: @ %bb.0: @ %entry
347 ; CHECK-NEXT: vldrh.u16 q0, [r0, #254]
348 ; CHECK-NEXT: vstrh.16 q0, [r1]
351 %z = getelementptr inbounds i8, ptr %x, i32 254
352 %0 = load <8 x i16>, ptr %z, align 2
353 store <8 x i16> %0, ptr %y, align 2
357 define ptr @ldrhu16_256(ptr %x, ptr %y) {
358 ; CHECK-LABEL: ldrhu16_256:
359 ; CHECK: @ %bb.0: @ %entry
360 ; CHECK-NEXT: add.w r2, r0, #256
361 ; CHECK-NEXT: vldrh.u16 q0, [r2]
362 ; CHECK-NEXT: vstrh.16 q0, [r1]
365 %z = getelementptr inbounds i8, ptr %x, i32 256
366 %0 = load <8 x i16>, ptr %z, align 2
367 store <8 x i16> %0, ptr %y, align 2
371 define ptr @ldrhu16_m254(ptr %x, ptr %y) {
372 ; CHECK-LABEL: ldrhu16_m254:
373 ; CHECK: @ %bb.0: @ %entry
374 ; CHECK-NEXT: vldrh.u16 q0, [r0, #-254]
375 ; CHECK-NEXT: vstrh.16 q0, [r1]
378 %z = getelementptr inbounds i8, ptr %x, i32 -254
379 %0 = load <8 x i16>, ptr %z, align 2
380 store <8 x i16> %0, ptr %y, align 2
384 define ptr @ldrhu16_m256(ptr %x, ptr %y) {
385 ; CHECK-LABEL: ldrhu16_m256:
386 ; CHECK: @ %bb.0: @ %entry
387 ; CHECK-NEXT: sub.w r2, r0, #256
388 ; CHECK-NEXT: vldrh.u16 q0, [r2]
389 ; CHECK-NEXT: vstrh.16 q0, [r1]
392 %z = getelementptr inbounds i8, ptr %x, i32 -256
393 %0 = load <8 x i16>, ptr %z, align 2
394 store <8 x i16> %0, ptr %y, align 2
399 define ptr @ldrbu32_4(ptr %x, ptr %y) {
400 ; CHECK-LABEL: ldrbu32_4:
401 ; CHECK: @ %bb.0: @ %entry
402 ; CHECK-NEXT: vldrb.u32 q0, [r0, #4]
403 ; CHECK-NEXT: vstrw.32 q0, [r1]
406 %z = getelementptr inbounds i8, ptr %x, i32 4
407 %0 = load <4 x i8>, ptr %z, align 1
408 %1 = zext <4 x i8> %0 to <4 x i32>
409 store <4 x i32> %1, ptr %y, align 4
413 define ptr @ldrbu32_3(ptr %x, ptr %y) {
414 ; CHECK-LABEL: ldrbu32_3:
415 ; CHECK: @ %bb.0: @ %entry
416 ; CHECK-NEXT: vldrb.u32 q0, [r0, #3]
417 ; CHECK-NEXT: vstrw.32 q0, [r1]
420 %z = getelementptr inbounds i8, ptr %x, i32 3
421 %0 = load <4 x i8>, ptr %z, align 1
422 %1 = zext <4 x i8> %0 to <4 x i32>
423 store <4 x i32> %1, ptr %y, align 4
427 define ptr @ldrbu32_127(ptr %x, ptr %y) {
428 ; CHECK-LABEL: ldrbu32_127:
429 ; CHECK: @ %bb.0: @ %entry
430 ; CHECK-NEXT: vldrb.u32 q0, [r0, #127]
431 ; CHECK-NEXT: vstrw.32 q0, [r1]
434 %z = getelementptr inbounds i8, ptr %x, i32 127
435 %0 = load <4 x i8>, ptr %z, align 1
436 %1 = zext <4 x i8> %0 to <4 x i32>
437 store <4 x i32> %1, ptr %y, align 4
441 define ptr @ldrbu32_128(ptr %x, ptr %y) {
442 ; CHECK-LABEL: ldrbu32_128:
443 ; CHECK: @ %bb.0: @ %entry
444 ; CHECK-NEXT: add.w r2, r0, #128
445 ; CHECK-NEXT: vldrb.u32 q0, [r2]
446 ; CHECK-NEXT: vstrw.32 q0, [r1]
449 %z = getelementptr inbounds i8, ptr %x, i32 128
450 %0 = load <4 x i8>, ptr %z, align 1
451 %1 = zext <4 x i8> %0 to <4 x i32>
452 store <4 x i32> %1, ptr %y, align 4
456 define ptr @ldrbu32_m127(ptr %x, ptr %y) {
457 ; CHECK-LABEL: ldrbu32_m127:
458 ; CHECK: @ %bb.0: @ %entry
459 ; CHECK-NEXT: vldrb.u32 q0, [r0, #-127]
460 ; CHECK-NEXT: vstrw.32 q0, [r1]
463 %z = getelementptr inbounds i8, ptr %x, i32 -127
464 %0 = load <4 x i8>, ptr %z, align 1
465 %1 = zext <4 x i8> %0 to <4 x i32>
466 store <4 x i32> %1, ptr %y, align 4
470 define ptr @ldrbu32_m128(ptr %x, ptr %y) {
471 ; CHECK-LABEL: ldrbu32_m128:
472 ; CHECK: @ %bb.0: @ %entry
473 ; CHECK-NEXT: sub.w r2, r0, #128
474 ; CHECK-NEXT: vldrb.u32 q0, [r2]
475 ; CHECK-NEXT: vstrw.32 q0, [r1]
478 %z = getelementptr inbounds i8, ptr %x, i32 -128
479 %0 = load <4 x i8>, ptr %z, align 1
480 %1 = zext <4 x i8> %0 to <4 x i32>
481 store <4 x i32> %1, ptr %y, align 4
486 define ptr @ldrbs32_4(ptr %x, ptr %y) {
487 ; CHECK-LABEL: ldrbs32_4:
488 ; CHECK: @ %bb.0: @ %entry
489 ; CHECK-NEXT: vldrb.s32 q0, [r0, #4]
490 ; CHECK-NEXT: vstrw.32 q0, [r1]
493 %z = getelementptr inbounds i8, ptr %x, i32 4
494 %0 = load <4 x i8>, ptr %z, align 1
495 %1 = sext <4 x i8> %0 to <4 x i32>
496 store <4 x i32> %1, ptr %y, align 4
500 define ptr @ldrbs32_3(ptr %x, ptr %y) {
501 ; CHECK-LABEL: ldrbs32_3:
502 ; CHECK: @ %bb.0: @ %entry
503 ; CHECK-NEXT: vldrb.s32 q0, [r0, #3]
504 ; CHECK-NEXT: vstrw.32 q0, [r1]
507 %z = getelementptr inbounds i8, ptr %x, i32 3
508 %0 = load <4 x i8>, ptr %z, align 1
509 %1 = sext <4 x i8> %0 to <4 x i32>
510 store <4 x i32> %1, ptr %y, align 4
514 define ptr @ldrbs32_127(ptr %x, ptr %y) {
515 ; CHECK-LABEL: ldrbs32_127:
516 ; CHECK: @ %bb.0: @ %entry
517 ; CHECK-NEXT: vldrb.s32 q0, [r0, #127]
518 ; CHECK-NEXT: vstrw.32 q0, [r1]
521 %z = getelementptr inbounds i8, ptr %x, i32 127
522 %0 = load <4 x i8>, ptr %z, align 1
523 %1 = sext <4 x i8> %0 to <4 x i32>
524 store <4 x i32> %1, ptr %y, align 4
528 define ptr @ldrbs32_128(ptr %x, ptr %y) {
529 ; CHECK-LABEL: ldrbs32_128:
530 ; CHECK: @ %bb.0: @ %entry
531 ; CHECK-NEXT: add.w r2, r0, #128
532 ; CHECK-NEXT: vldrb.s32 q0, [r2]
533 ; CHECK-NEXT: vstrw.32 q0, [r1]
536 %z = getelementptr inbounds i8, ptr %x, i32 128
537 %0 = load <4 x i8>, ptr %z, align 1
538 %1 = sext <4 x i8> %0 to <4 x i32>
539 store <4 x i32> %1, ptr %y, align 4
543 define ptr @ldrbs32_m127(ptr %x, ptr %y) {
544 ; CHECK-LABEL: ldrbs32_m127:
545 ; CHECK: @ %bb.0: @ %entry
546 ; CHECK-NEXT: vldrb.s32 q0, [r0, #-127]
547 ; CHECK-NEXT: vstrw.32 q0, [r1]
550 %z = getelementptr inbounds i8, ptr %x, i32 -127
551 %0 = load <4 x i8>, ptr %z, align 1
552 %1 = sext <4 x i8> %0 to <4 x i32>
553 store <4 x i32> %1, ptr %y, align 4
557 define ptr @ldrbs32_m128(ptr %x, ptr %y) {
558 ; CHECK-LABEL: ldrbs32_m128:
559 ; CHECK: @ %bb.0: @ %entry
560 ; CHECK-NEXT: sub.w r2, r0, #128
561 ; CHECK-NEXT: vldrb.s32 q0, [r2]
562 ; CHECK-NEXT: vstrw.32 q0, [r1]
565 %z = getelementptr inbounds i8, ptr %x, i32 -128
566 %0 = load <4 x i8>, ptr %z, align 1
567 %1 = sext <4 x i8> %0 to <4 x i32>
568 store <4 x i32> %1, ptr %y, align 4
573 define ptr @ldrbu16_4(ptr %x, ptr %y) {
574 ; CHECK-LABEL: ldrbu16_4:
575 ; CHECK: @ %bb.0: @ %entry
576 ; CHECK-NEXT: vldrb.u16 q0, [r0, #4]
577 ; CHECK-NEXT: vstrh.16 q0, [r1]
580 %z = getelementptr inbounds i8, ptr %x, i32 4
581 %0 = load <8 x i8>, ptr %z, align 1
582 %1 = zext <8 x i8> %0 to <8 x i16>
583 store <8 x i16> %1, ptr %y, align 2
587 define ptr @ldrbu16_3(ptr %x, ptr %y) {
588 ; CHECK-LABEL: ldrbu16_3:
589 ; CHECK: @ %bb.0: @ %entry
590 ; CHECK-NEXT: vldrb.u16 q0, [r0, #3]
591 ; CHECK-NEXT: vstrh.16 q0, [r1]
594 %z = getelementptr inbounds i8, ptr %x, i32 3
595 %0 = load <8 x i8>, ptr %z, align 1
596 %1 = zext <8 x i8> %0 to <8 x i16>
597 store <8 x i16> %1, ptr %y, align 2
601 define ptr @ldrbu16_127(ptr %x, ptr %y) {
602 ; CHECK-LABEL: ldrbu16_127:
603 ; CHECK: @ %bb.0: @ %entry
604 ; CHECK-NEXT: vldrb.u16 q0, [r0, #127]
605 ; CHECK-NEXT: vstrh.16 q0, [r1]
608 %z = getelementptr inbounds i8, ptr %x, i32 127
609 %0 = load <8 x i8>, ptr %z, align 1
610 %1 = zext <8 x i8> %0 to <8 x i16>
611 store <8 x i16> %1, ptr %y, align 2
615 define ptr @ldrbu16_128(ptr %x, ptr %y) {
616 ; CHECK-LABEL: ldrbu16_128:
617 ; CHECK: @ %bb.0: @ %entry
618 ; CHECK-NEXT: add.w r2, r0, #128
619 ; CHECK-NEXT: vldrb.u16 q0, [r2]
620 ; CHECK-NEXT: vstrh.16 q0, [r1]
623 %z = getelementptr inbounds i8, ptr %x, i32 128
624 %0 = load <8 x i8>, ptr %z, align 1
625 %1 = zext <8 x i8> %0 to <8 x i16>
626 store <8 x i16> %1, ptr %y, align 2
630 define ptr @ldrbu16_m127(ptr %x, ptr %y) {
631 ; CHECK-LABEL: ldrbu16_m127:
632 ; CHECK: @ %bb.0: @ %entry
633 ; CHECK-NEXT: vldrb.u16 q0, [r0, #-127]
634 ; CHECK-NEXT: vstrh.16 q0, [r1]
637 %z = getelementptr inbounds i8, ptr %x, i32 -127
638 %0 = load <8 x i8>, ptr %z, align 1
639 %1 = zext <8 x i8> %0 to <8 x i16>
640 store <8 x i16> %1, ptr %y, align 2
644 define ptr @ldrbu16_m128(ptr %x, ptr %y) {
645 ; CHECK-LABEL: ldrbu16_m128:
646 ; CHECK: @ %bb.0: @ %entry
647 ; CHECK-NEXT: sub.w r2, r0, #128
648 ; CHECK-NEXT: vldrb.u16 q0, [r2]
649 ; CHECK-NEXT: vstrh.16 q0, [r1]
652 %z = getelementptr inbounds i8, ptr %x, i32 -128
653 %0 = load <8 x i8>, ptr %z, align 1
654 %1 = zext <8 x i8> %0 to <8 x i16>
655 store <8 x i16> %1, ptr %y, align 2
660 define ptr @ldrbs16_4(ptr %x, ptr %y) {
661 ; CHECK-LABEL: ldrbs16_4:
662 ; CHECK: @ %bb.0: @ %entry
663 ; CHECK-NEXT: vldrb.s16 q0, [r0, #4]
664 ; CHECK-NEXT: vstrh.16 q0, [r1]
667 %z = getelementptr inbounds i8, ptr %x, i32 4
668 %0 = load <8 x i8>, ptr %z, align 1
669 %1 = sext <8 x i8> %0 to <8 x i16>
670 store <8 x i16> %1, ptr %y, align 2
674 define ptr @ldrbs16_3(ptr %x, ptr %y) {
675 ; CHECK-LABEL: ldrbs16_3:
676 ; CHECK: @ %bb.0: @ %entry
677 ; CHECK-NEXT: vldrb.s16 q0, [r0, #3]
678 ; CHECK-NEXT: vstrh.16 q0, [r1]
681 %z = getelementptr inbounds i8, ptr %x, i32 3
682 %0 = load <8 x i8>, ptr %z, align 1
683 %1 = sext <8 x i8> %0 to <8 x i16>
684 store <8 x i16> %1, ptr %y, align 2
688 define ptr @ldrbs16_127(ptr %x, ptr %y) {
689 ; CHECK-LABEL: ldrbs16_127:
690 ; CHECK: @ %bb.0: @ %entry
691 ; CHECK-NEXT: vldrb.s16 q0, [r0, #127]
692 ; CHECK-NEXT: vstrh.16 q0, [r1]
695 %z = getelementptr inbounds i8, ptr %x, i32 127
696 %0 = load <8 x i8>, ptr %z, align 1
697 %1 = sext <8 x i8> %0 to <8 x i16>
698 store <8 x i16> %1, ptr %y, align 2
702 define ptr @ldrbs16_128(ptr %x, ptr %y) {
703 ; CHECK-LABEL: ldrbs16_128:
704 ; CHECK: @ %bb.0: @ %entry
705 ; CHECK-NEXT: add.w r2, r0, #128
706 ; CHECK-NEXT: vldrb.s16 q0, [r2]
707 ; CHECK-NEXT: vstrh.16 q0, [r1]
710 %z = getelementptr inbounds i8, ptr %x, i32 128
711 %0 = load <8 x i8>, ptr %z, align 1
712 %1 = sext <8 x i8> %0 to <8 x i16>
713 store <8 x i16> %1, ptr %y, align 2
717 define ptr @ldrbs16_m127(ptr %x, ptr %y) {
718 ; CHECK-LABEL: ldrbs16_m127:
719 ; CHECK: @ %bb.0: @ %entry
720 ; CHECK-NEXT: vldrb.s16 q0, [r0, #-127]
721 ; CHECK-NEXT: vstrh.16 q0, [r1]
724 %z = getelementptr inbounds i8, ptr %x, i32 -127
725 %0 = load <8 x i8>, ptr %z, align 1
726 %1 = sext <8 x i8> %0 to <8 x i16>
727 store <8 x i16> %1, ptr %y, align 2
731 define ptr @ldrbs16_m128(ptr %x, ptr %y) {
732 ; CHECK-LABEL: ldrbs16_m128:
733 ; CHECK: @ %bb.0: @ %entry
734 ; CHECK-NEXT: sub.w r2, r0, #128
735 ; CHECK-NEXT: vldrb.s16 q0, [r2]
736 ; CHECK-NEXT: vstrh.16 q0, [r1]
739 %z = getelementptr inbounds i8, ptr %x, i32 -128
740 %0 = load <8 x i8>, ptr %z, align 1
741 %1 = sext <8 x i8> %0 to <8 x i16>
742 store <8 x i16> %1, ptr %y, align 2
747 define ptr @ldrbu8_4(ptr %x, ptr %y) {
748 ; CHECK-LABEL: ldrbu8_4:
749 ; CHECK: @ %bb.0: @ %entry
750 ; CHECK-NEXT: vldrb.u8 q0, [r0, #4]
751 ; CHECK-NEXT: vstrb.8 q0, [r1]
754 %z = getelementptr inbounds i8, ptr %x, i32 4
755 %0 = load <16 x i8>, ptr %z, align 1
756 store <16 x i8> %0, ptr %y, align 1
760 define ptr @ldrbu8_3(ptr %x, ptr %y) {
761 ; CHECK-LABEL: ldrbu8_3:
762 ; CHECK: @ %bb.0: @ %entry
763 ; CHECK-NEXT: vldrb.u8 q0, [r0, #3]
764 ; CHECK-NEXT: vstrb.8 q0, [r1]
767 %z = getelementptr inbounds i8, ptr %x, i32 3
768 %0 = load <16 x i8>, ptr %z, align 1
769 store <16 x i8> %0, ptr %y, align 1
773 define ptr @ldrbu8_127(ptr %x, ptr %y) {
774 ; CHECK-LABEL: ldrbu8_127:
775 ; CHECK: @ %bb.0: @ %entry
776 ; CHECK-NEXT: vldrb.u8 q0, [r0, #127]
777 ; CHECK-NEXT: vstrb.8 q0, [r1]
780 %z = getelementptr inbounds i8, ptr %x, i32 127
781 %0 = load <16 x i8>, ptr %z, align 1
782 store <16 x i8> %0, ptr %y, align 1
786 define ptr @ldrbu8_128(ptr %x, ptr %y) {
787 ; CHECK-LABEL: ldrbu8_128:
788 ; CHECK: @ %bb.0: @ %entry
789 ; CHECK-NEXT: add.w r2, r0, #128
790 ; CHECK-NEXT: vldrb.u8 q0, [r2]
791 ; CHECK-NEXT: vstrb.8 q0, [r1]
794 %z = getelementptr inbounds i8, ptr %x, i32 128
795 %0 = load <16 x i8>, ptr %z, align 1
796 store <16 x i8> %0, ptr %y, align 1
800 define ptr @ldrbu8_m127(ptr %x, ptr %y) {
801 ; CHECK-LABEL: ldrbu8_m127:
802 ; CHECK: @ %bb.0: @ %entry
803 ; CHECK-NEXT: vldrb.u8 q0, [r0, #-127]
804 ; CHECK-NEXT: vstrb.8 q0, [r1]
807 %z = getelementptr inbounds i8, ptr %x, i32 -127
808 %0 = load <16 x i8>, ptr %z, align 1
809 store <16 x i8> %0, ptr %y, align 1
813 define ptr @ldrbu8_m128(ptr %x, ptr %y) {
814 ; CHECK-LABEL: ldrbu8_m128:
815 ; CHECK: @ %bb.0: @ %entry
816 ; CHECK-NEXT: sub.w r2, r0, #128
817 ; CHECK-NEXT: vldrb.u8 q0, [r2]
818 ; CHECK-NEXT: vstrb.8 q0, [r1]
821 %z = getelementptr inbounds i8, ptr %x, i32 -128
822 %0 = load <16 x i8>, ptr %z, align 1
823 store <16 x i8> %0, ptr %y, align 1
828 define ptr @ldrwf32_4(ptr %x, ptr %y) {
829 ; CHECK-LABEL: ldrwf32_4:
830 ; CHECK: @ %bb.0: @ %entry
831 ; CHECK-NEXT: vldrw.u32 q0, [r0, #4]
832 ; CHECK-NEXT: vstrw.32 q0, [r1]
835 %z = getelementptr inbounds i8, ptr %x, i32 4
836 %0 = load <4 x float>, ptr %z, align 4
837 store <4 x float> %0, ptr %y, align 4
841 define ptr @ldrwf16_4(ptr %x, ptr %y) {
842 ; CHECK-LABEL: ldrwf16_4:
843 ; CHECK: @ %bb.0: @ %entry
844 ; CHECK-NEXT: vldrh.u16 q0, [r0, #4]
845 ; CHECK-NEXT: vstrh.16 q0, [r1]
848 %z = getelementptr inbounds i8, ptr %x, i32 4
849 %0 = load <8 x half>, ptr %z, align 2
850 store <8 x half> %0, ptr %y, align 2
854 define ptr @ldrwi32_align1(ptr %x, ptr %y) {
855 ; CHECK-LE-LABEL: ldrwi32_align1:
856 ; CHECK-LE: @ %bb.0: @ %entry
857 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0, #3]
858 ; CHECK-LE-NEXT: vstrw.32 q0, [r1]
859 ; CHECK-LE-NEXT: bx lr
861 ; CHECK-BE-LABEL: ldrwi32_align1:
862 ; CHECK-BE: @ %bb.0: @ %entry
863 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0, #3]
864 ; CHECK-BE-NEXT: vrev32.8 q0, q0
865 ; CHECK-BE-NEXT: vstrw.32 q0, [r1]
866 ; CHECK-BE-NEXT: bx lr
868 %z = getelementptr inbounds i8, ptr %x, i32 3
869 %0 = load <4 x i32>, ptr %z, align 1
870 store <4 x i32> %0, ptr %y, align 4
874 define ptr @ldrhi16_align1(ptr %x, ptr %y) {
875 ; CHECK-LE-LABEL: ldrhi16_align1:
876 ; CHECK-LE: @ %bb.0: @ %entry
877 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0, #3]
878 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
879 ; CHECK-LE-NEXT: bx lr
881 ; CHECK-BE-LABEL: ldrhi16_align1:
882 ; CHECK-BE: @ %bb.0: @ %entry
883 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0, #3]
884 ; CHECK-BE-NEXT: vrev16.8 q0, q0
885 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
886 ; CHECK-BE-NEXT: bx lr
888 %z = getelementptr inbounds i8, ptr %x, i32 3
889 %0 = load <8 x i16>, ptr %z, align 1
890 store <8 x i16> %0, ptr %y, align 2
894 define ptr @ldrhi32_align1(ptr %x, ptr %y) {
895 ; CHECK-LABEL: ldrhi32_align1:
896 ; CHECK: @ %bb.0: @ %entry
897 ; CHECK-NEXT: .pad #8
898 ; CHECK-NEXT: sub sp, #8
899 ; CHECK-NEXT: ldr.w r3, [r0, #7]
900 ; CHECK-NEXT: ldr.w r2, [r0, #3]
901 ; CHECK-NEXT: strd r2, r3, [sp]
902 ; CHECK-NEXT: mov r2, sp
903 ; CHECK-NEXT: vldrh.s32 q0, [r2]
904 ; CHECK-NEXT: vstrw.32 q0, [r1]
905 ; CHECK-NEXT: add sp, #8
908 %z = getelementptr inbounds i8, ptr %x, i32 3
909 %0 = load <4 x i16>, ptr %z, align 1
910 %1 = sext <4 x i16> %0 to <4 x i32>
911 store <4 x i32> %1, ptr %y, align 4
915 define ptr @ldrf32_align1(ptr %x, ptr %y) {
916 ; CHECK-LE-LABEL: ldrf32_align1:
917 ; CHECK-LE: @ %bb.0: @ %entry
918 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0, #3]
919 ; CHECK-LE-NEXT: vstrw.32 q0, [r1]
920 ; CHECK-LE-NEXT: bx lr
922 ; CHECK-BE-LABEL: ldrf32_align1:
923 ; CHECK-BE: @ %bb.0: @ %entry
924 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0, #3]
925 ; CHECK-BE-NEXT: vrev32.8 q0, q0
926 ; CHECK-BE-NEXT: vstrw.32 q0, [r1]
927 ; CHECK-BE-NEXT: bx lr
929 %z = getelementptr inbounds i8, ptr %x, i32 3
930 %0 = load <4 x float>, ptr %z, align 1
931 store <4 x float> %0, ptr %y, align 4
935 define ptr @ldrf16_align1(ptr %x, ptr %y) {
936 ; CHECK-LE-LABEL: ldrf16_align1:
937 ; CHECK-LE: @ %bb.0: @ %entry
938 ; CHECK-LE-NEXT: vldrb.u8 q0, [r0, #3]
939 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
940 ; CHECK-LE-NEXT: bx lr
942 ; CHECK-BE-LABEL: ldrf16_align1:
943 ; CHECK-BE: @ %bb.0: @ %entry
944 ; CHECK-BE-NEXT: vldrb.u8 q0, [r0, #3]
945 ; CHECK-BE-NEXT: vrev16.8 q0, q0
946 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
947 ; CHECK-BE-NEXT: bx lr
949 %z = getelementptr inbounds i8, ptr %x, i32 3
950 %0 = load <8 x half>, ptr %z, align 1
951 store <8 x half> %0, ptr %y, align 2
955 define ptr @ldrh16_align8(ptr %x, ptr %y) {
956 ; CHECK-LE-LABEL: ldrh16_align8:
957 ; CHECK-LE: @ %bb.0: @ %entry
958 ; CHECK-LE-NEXT: vldrw.u32 q0, [r0, #4]
959 ; CHECK-LE-NEXT: vstrh.16 q0, [r1]
960 ; CHECK-LE-NEXT: bx lr
962 ; CHECK-BE-LABEL: ldrh16_align8:
963 ; CHECK-BE: @ %bb.0: @ %entry
964 ; CHECK-BE-NEXT: vldrh.u16 q0, [r0, #4]
965 ; CHECK-BE-NEXT: vstrh.16 q0, [r1]
966 ; CHECK-BE-NEXT: bx lr
968 %z = getelementptr inbounds i8, ptr %x, i32 4
969 %0 = load <8 x i16>, ptr %z, align 8
970 store <8 x i16> %0, ptr %y, align 2
978 define ptr @strw32_4(ptr %y, ptr %x) {
979 ; CHECK-LABEL: strw32_4:
980 ; CHECK: @ %bb.0: @ %entry
981 ; CHECK-NEXT: vldrw.u32 q0, [r1]
982 ; CHECK-NEXT: vstrw.32 q0, [r0, #4]
985 %z = getelementptr inbounds i8, ptr %y, i32 4
986 %0 = load <4 x i32>, ptr %x, align 4
987 store <4 x i32> %0, ptr %z, align 4
991 define ptr @strw32_3(ptr %y, ptr %x) {
992 ; CHECK-LABEL: strw32_3:
993 ; CHECK: @ %bb.0: @ %entry
994 ; CHECK-NEXT: vldrw.u32 q0, [r1]
995 ; CHECK-NEXT: adds r1, r0, #3
996 ; CHECK-NEXT: vstrw.32 q0, [r1]
999 %z = getelementptr inbounds i8, ptr %y, i32 3
1000 %0 = load <4 x i32>, ptr %x, align 4
1001 store <4 x i32> %0, ptr %z, align 4
1005 define ptr @strw32_m4(ptr %y, ptr %x) {
1006 ; CHECK-LABEL: strw32_m4:
1007 ; CHECK: @ %bb.0: @ %entry
1008 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1009 ; CHECK-NEXT: vstrw.32 q0, [r0, #-4]
1012 %z = getelementptr inbounds i8, ptr %y, i32 -4
1013 %0 = load <4 x i32>, ptr %x, align 4
1014 store <4 x i32> %0, ptr %z, align 4
1018 define ptr @strw32_508(ptr %y, ptr %x) {
1019 ; CHECK-LABEL: strw32_508:
1020 ; CHECK: @ %bb.0: @ %entry
1021 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1022 ; CHECK-NEXT: vstrw.32 q0, [r0, #508]
1025 %z = getelementptr inbounds i8, ptr %y, i32 508
1026 %0 = load <4 x i32>, ptr %x, align 4
1027 store <4 x i32> %0, ptr %z, align 4
1031 define ptr @strw32_512(ptr %y, ptr %x) {
1032 ; CHECK-LABEL: strw32_512:
1033 ; CHECK: @ %bb.0: @ %entry
1034 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1035 ; CHECK-NEXT: add.w r1, r0, #512
1036 ; CHECK-NEXT: vstrw.32 q0, [r1]
1039 %z = getelementptr inbounds i8, ptr %y, i32 512
1040 %0 = load <4 x i32>, ptr %x, align 4
1041 store <4 x i32> %0, ptr %z, align 4
1045 define ptr @strw32_m508(ptr %y, ptr %x) {
1046 ; CHECK-LABEL: strw32_m508:
1047 ; CHECK: @ %bb.0: @ %entry
1048 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1049 ; CHECK-NEXT: vstrw.32 q0, [r0, #-508]
1052 %z = getelementptr inbounds i8, ptr %y, i32 -508
1053 %0 = load <4 x i32>, ptr %x, align 4
1054 store <4 x i32> %0, ptr %z, align 4
1058 define ptr @strw32_m512(ptr %y, ptr %x) {
1059 ; CHECK-LABEL: strw32_m512:
1060 ; CHECK: @ %bb.0: @ %entry
1061 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1062 ; CHECK-NEXT: sub.w r1, r0, #512
1063 ; CHECK-NEXT: vstrw.32 q0, [r1]
1066 %z = getelementptr inbounds i8, ptr %y, i32 -512
1067 %0 = load <4 x i32>, ptr %x, align 4
1068 store <4 x i32> %0, ptr %z, align 4
1073 define ptr @strh32_4(ptr %y, ptr %x) {
1074 ; CHECK-LABEL: strh32_4:
1075 ; CHECK: @ %bb.0: @ %entry
1076 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1077 ; CHECK-NEXT: vstrh.32 q0, [r0, #4]
1080 %z = getelementptr inbounds i8, ptr %y, i32 4
1081 %0 = load <4 x i16>, ptr %x, align 2
1082 store <4 x i16> %0, ptr %z, align 2
1086 define ptr @strh32_3(ptr %y, ptr %x) {
1087 ; CHECK-LABEL: strh32_3:
1088 ; CHECK: @ %bb.0: @ %entry
1089 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1090 ; CHECK-NEXT: adds r1, r0, #3
1091 ; CHECK-NEXT: vstrh.32 q0, [r1]
1094 %z = getelementptr inbounds i8, ptr %y, i32 3
1095 %0 = load <4 x i16>, ptr %x, align 2
1096 store <4 x i16> %0, ptr %z, align 2
1100 define ptr @strh32_2(ptr %y, ptr %x) {
1101 ; CHECK-LABEL: strh32_2:
1102 ; CHECK: @ %bb.0: @ %entry
1103 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1104 ; CHECK-NEXT: vstrh.32 q0, [r0, #2]
1107 %z = getelementptr inbounds i8, ptr %y, i32 2
1108 %0 = load <4 x i16>, ptr %x, align 2
1109 store <4 x i16> %0, ptr %z, align 2
1113 define ptr @strh32_254(ptr %y, ptr %x) {
1114 ; CHECK-LABEL: strh32_254:
1115 ; CHECK: @ %bb.0: @ %entry
1116 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1117 ; CHECK-NEXT: vstrh.32 q0, [r0, #254]
1120 %z = getelementptr inbounds i8, ptr %y, i32 254
1121 %0 = load <4 x i16>, ptr %x, align 2
1122 store <4 x i16> %0, ptr %z, align 2
1126 define ptr @strh32_256(ptr %y, ptr %x) {
1127 ; CHECK-LABEL: strh32_256:
1128 ; CHECK: @ %bb.0: @ %entry
1129 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1130 ; CHECK-NEXT: add.w r1, r0, #256
1131 ; CHECK-NEXT: vstrh.32 q0, [r1]
1134 %z = getelementptr inbounds i8, ptr %y, i32 256
1135 %0 = load <4 x i16>, ptr %x, align 2
1136 store <4 x i16> %0, ptr %z, align 2
1140 define ptr @strh32_m254(ptr %y, ptr %x) {
1141 ; CHECK-LABEL: strh32_m254:
1142 ; CHECK: @ %bb.0: @ %entry
1143 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1144 ; CHECK-NEXT: vstrh.32 q0, [r0, #-254]
1147 %z = getelementptr inbounds i8, ptr %y, i32 -254
1148 %0 = load <4 x i16>, ptr %x, align 2
1149 store <4 x i16> %0, ptr %z, align 2
1153 define ptr @strh32_m256(ptr %y, ptr %x) {
1154 ; CHECK-LABEL: strh32_m256:
1155 ; CHECK: @ %bb.0: @ %entry
1156 ; CHECK-NEXT: vldrh.u32 q0, [r1]
1157 ; CHECK-NEXT: sub.w r1, r0, #256
1158 ; CHECK-NEXT: vstrh.32 q0, [r1]
1161 %z = getelementptr inbounds i8, ptr %y, i32 -256
1162 %0 = load <4 x i16>, ptr %x, align 2
1163 store <4 x i16> %0, ptr %z, align 2
1168 define ptr @strh16_4(ptr %y, ptr %x) {
1169 ; CHECK-LABEL: strh16_4:
1170 ; CHECK: @ %bb.0: @ %entry
1171 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1172 ; CHECK-NEXT: vstrh.16 q0, [r0, #4]
1175 %z = getelementptr inbounds i8, ptr %y, i32 4
1176 %0 = load <8 x i16>, ptr %x, align 2
1177 store <8 x i16> %0, ptr %z, align 2
1181 define ptr @strh16_3(ptr %y, ptr %x) {
1182 ; CHECK-LABEL: strh16_3:
1183 ; CHECK: @ %bb.0: @ %entry
1184 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1185 ; CHECK-NEXT: adds r1, r0, #3
1186 ; CHECK-NEXT: vstrh.16 q0, [r1]
1189 %z = getelementptr inbounds i8, ptr %y, i32 3
1190 %0 = load <8 x i16>, ptr %x, align 2
1191 store <8 x i16> %0, ptr %z, align 2
1195 define ptr @strh16_2(ptr %y, ptr %x) {
1196 ; CHECK-LABEL: strh16_2:
1197 ; CHECK: @ %bb.0: @ %entry
1198 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1199 ; CHECK-NEXT: vstrh.16 q0, [r0, #2]
1202 %z = getelementptr inbounds i8, ptr %y, i32 2
1203 %0 = load <8 x i16>, ptr %x, align 2
1204 store <8 x i16> %0, ptr %z, align 2
1208 define ptr @strh16_254(ptr %y, ptr %x) {
1209 ; CHECK-LABEL: strh16_254:
1210 ; CHECK: @ %bb.0: @ %entry
1211 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1212 ; CHECK-NEXT: vstrh.16 q0, [r0, #254]
1215 %z = getelementptr inbounds i8, ptr %y, i32 254
1216 %0 = load <8 x i16>, ptr %x, align 2
1217 store <8 x i16> %0, ptr %z, align 2
1221 define ptr @strh16_256(ptr %y, ptr %x) {
1222 ; CHECK-LABEL: strh16_256:
1223 ; CHECK: @ %bb.0: @ %entry
1224 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1225 ; CHECK-NEXT: add.w r1, r0, #256
1226 ; CHECK-NEXT: vstrh.16 q0, [r1]
1229 %z = getelementptr inbounds i8, ptr %y, i32 256
1230 %0 = load <8 x i16>, ptr %x, align 2
1231 store <8 x i16> %0, ptr %z, align 2
1235 define ptr @strh16_m254(ptr %y, ptr %x) {
1236 ; CHECK-LABEL: strh16_m254:
1237 ; CHECK: @ %bb.0: @ %entry
1238 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1239 ; CHECK-NEXT: vstrh.16 q0, [r0, #-254]
1242 %z = getelementptr inbounds i8, ptr %y, i32 -254
1243 %0 = load <8 x i16>, ptr %x, align 2
1244 store <8 x i16> %0, ptr %z, align 2
1248 define ptr @strh16_m256(ptr %y, ptr %x) {
1249 ; CHECK-LABEL: strh16_m256:
1250 ; CHECK: @ %bb.0: @ %entry
1251 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1252 ; CHECK-NEXT: sub.w r1, r0, #256
1253 ; CHECK-NEXT: vstrh.16 q0, [r1]
1256 %z = getelementptr inbounds i8, ptr %y, i32 -256
1257 %0 = load <8 x i16>, ptr %x, align 2
1258 store <8 x i16> %0, ptr %z, align 2
1263 define ptr @strb32_4(ptr %y, ptr %x) {
1264 ; CHECK-LABEL: strb32_4:
1265 ; CHECK: @ %bb.0: @ %entry
1266 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1267 ; CHECK-NEXT: vstrb.32 q0, [r0, #4]
1270 %z = getelementptr inbounds i8, ptr %y, i32 4
1271 %0 = load <4 x i8>, ptr %x, align 1
1272 store <4 x i8> %0, ptr %z, align 1
1276 define ptr @strb32_3(ptr %y, ptr %x) {
1277 ; CHECK-LABEL: strb32_3:
1278 ; CHECK: @ %bb.0: @ %entry
1279 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1280 ; CHECK-NEXT: vstrb.32 q0, [r0, #3]
1283 %z = getelementptr inbounds i8, ptr %y, i32 3
1284 %0 = load <4 x i8>, ptr %x, align 1
1285 store <4 x i8> %0, ptr %z, align 1
1289 define ptr @strb32_127(ptr %y, ptr %x) {
1290 ; CHECK-LABEL: strb32_127:
1291 ; CHECK: @ %bb.0: @ %entry
1292 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1293 ; CHECK-NEXT: vstrb.32 q0, [r0, #127]
1296 %z = getelementptr inbounds i8, ptr %y, i32 127
1297 %0 = load <4 x i8>, ptr %x, align 1
1298 store <4 x i8> %0, ptr %z, align 1
1302 define ptr @strb32_128(ptr %y, ptr %x) {
1303 ; CHECK-LABEL: strb32_128:
1304 ; CHECK: @ %bb.0: @ %entry
1305 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1306 ; CHECK-NEXT: add.w r1, r0, #128
1307 ; CHECK-NEXT: vstrb.32 q0, [r1]
1310 %z = getelementptr inbounds i8, ptr %y, i32 128
1311 %0 = load <4 x i8>, ptr %x, align 1
1312 store <4 x i8> %0, ptr %z, align 1
1316 define ptr @strb32_m127(ptr %y, ptr %x) {
1317 ; CHECK-LABEL: strb32_m127:
1318 ; CHECK: @ %bb.0: @ %entry
1319 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1320 ; CHECK-NEXT: vstrb.32 q0, [r0, #-127]
1323 %z = getelementptr inbounds i8, ptr %y, i32 -127
1324 %0 = load <4 x i8>, ptr %x, align 1
1325 store <4 x i8> %0, ptr %z, align 1
1329 define ptr @strb32_m128(ptr %y, ptr %x) {
1330 ; CHECK-LABEL: strb32_m128:
1331 ; CHECK: @ %bb.0: @ %entry
1332 ; CHECK-NEXT: vldrb.u32 q0, [r1]
1333 ; CHECK-NEXT: sub.w r1, r0, #128
1334 ; CHECK-NEXT: vstrb.32 q0, [r1]
1337 %z = getelementptr inbounds i8, ptr %y, i32 -128
1338 %0 = load <4 x i8>, ptr %x, align 1
1339 store <4 x i8> %0, ptr %z, align 1
1344 define ptr @strb16_4(ptr %y, ptr %x) {
1345 ; CHECK-LABEL: strb16_4:
1346 ; CHECK: @ %bb.0: @ %entry
1347 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1348 ; CHECK-NEXT: vstrb.16 q0, [r0, #4]
1351 %z = getelementptr inbounds i8, ptr %y, i32 4
1352 %0 = load <8 x i8>, ptr %x, align 1
1353 store <8 x i8> %0, ptr %z, align 1
1357 define ptr @strb16_3(ptr %y, ptr %x) {
1358 ; CHECK-LABEL: strb16_3:
1359 ; CHECK: @ %bb.0: @ %entry
1360 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1361 ; CHECK-NEXT: vstrb.16 q0, [r0, #3]
1364 %z = getelementptr inbounds i8, ptr %y, i32 3
1365 %0 = load <8 x i8>, ptr %x, align 1
1366 store <8 x i8> %0, ptr %z, align 1
1370 define ptr @strb16_127(ptr %y, ptr %x) {
1371 ; CHECK-LABEL: strb16_127:
1372 ; CHECK: @ %bb.0: @ %entry
1373 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1374 ; CHECK-NEXT: vstrb.16 q0, [r0, #127]
1377 %z = getelementptr inbounds i8, ptr %y, i32 127
1378 %0 = load <8 x i8>, ptr %x, align 1
1379 store <8 x i8> %0, ptr %z, align 1
1383 define ptr @strb16_128(ptr %y, ptr %x) {
1384 ; CHECK-LABEL: strb16_128:
1385 ; CHECK: @ %bb.0: @ %entry
1386 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1387 ; CHECK-NEXT: add.w r1, r0, #128
1388 ; CHECK-NEXT: vstrb.16 q0, [r1]
1391 %z = getelementptr inbounds i8, ptr %y, i32 128
1392 %0 = load <8 x i8>, ptr %x, align 1
1393 store <8 x i8> %0, ptr %z, align 1
1397 define ptr @strb16_m127(ptr %y, ptr %x) {
1398 ; CHECK-LABEL: strb16_m127:
1399 ; CHECK: @ %bb.0: @ %entry
1400 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1401 ; CHECK-NEXT: vstrb.16 q0, [r0, #-127]
1404 %z = getelementptr inbounds i8, ptr %y, i32 -127
1405 %0 = load <8 x i8>, ptr %x, align 1
1406 store <8 x i8> %0, ptr %z, align 1
1410 define ptr @strb16_m128(ptr %y, ptr %x) {
1411 ; CHECK-LABEL: strb16_m128:
1412 ; CHECK: @ %bb.0: @ %entry
1413 ; CHECK-NEXT: vldrb.u16 q0, [r1]
1414 ; CHECK-NEXT: sub.w r1, r0, #128
1415 ; CHECK-NEXT: vstrb.16 q0, [r1]
1418 %z = getelementptr inbounds i8, ptr %y, i32 -128
1419 %0 = load <8 x i8>, ptr %x, align 1
1420 store <8 x i8> %0, ptr %z, align 1
1425 define ptr @strb8_4(ptr %y, ptr %x) {
1426 ; CHECK-LABEL: strb8_4:
1427 ; CHECK: @ %bb.0: @ %entry
1428 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1429 ; CHECK-NEXT: vstrb.8 q0, [r0, #4]
1432 %z = getelementptr inbounds i8, ptr %y, i32 4
1433 %0 = load <16 x i8>, ptr %x, align 1
1434 store <16 x i8> %0, ptr %z, align 1
1438 define ptr @strb8_3(ptr %y, ptr %x) {
1439 ; CHECK-LABEL: strb8_3:
1440 ; CHECK: @ %bb.0: @ %entry
1441 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1442 ; CHECK-NEXT: vstrb.8 q0, [r0, #3]
1445 %z = getelementptr inbounds i8, ptr %y, i32 3
1446 %0 = load <16 x i8>, ptr %x, align 1
1447 store <16 x i8> %0, ptr %z, align 1
1451 define ptr @strb8_127(ptr %y, ptr %x) {
1452 ; CHECK-LABEL: strb8_127:
1453 ; CHECK: @ %bb.0: @ %entry
1454 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1455 ; CHECK-NEXT: vstrb.8 q0, [r0, #127]
1458 %z = getelementptr inbounds i8, ptr %y, i32 127
1459 %0 = load <16 x i8>, ptr %x, align 1
1460 store <16 x i8> %0, ptr %z, align 1
1464 define ptr @strb8_128(ptr %y, ptr %x) {
1465 ; CHECK-LABEL: strb8_128:
1466 ; CHECK: @ %bb.0: @ %entry
1467 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1468 ; CHECK-NEXT: add.w r1, r0, #128
1469 ; CHECK-NEXT: vstrb.8 q0, [r1]
1472 %z = getelementptr inbounds i8, ptr %y, i32 128
1473 %0 = load <16 x i8>, ptr %x, align 1
1474 store <16 x i8> %0, ptr %z, align 1
1478 define ptr @strb8_m127(ptr %y, ptr %x) {
1479 ; CHECK-LABEL: strb8_m127:
1480 ; CHECK: @ %bb.0: @ %entry
1481 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1482 ; CHECK-NEXT: vstrb.8 q0, [r0, #-127]
1485 %z = getelementptr inbounds i8, ptr %y, i32 -127
1486 %0 = load <16 x i8>, ptr %x, align 1
1487 store <16 x i8> %0, ptr %z, align 1
1491 define ptr @strb8_m128(ptr %y, ptr %x) {
1492 ; CHECK-LABEL: strb8_m128:
1493 ; CHECK: @ %bb.0: @ %entry
1494 ; CHECK-NEXT: vldrb.u8 q0, [r1]
1495 ; CHECK-NEXT: sub.w r1, r0, #128
1496 ; CHECK-NEXT: vstrb.8 q0, [r1]
1499 %z = getelementptr inbounds i8, ptr %y, i32 -128
1500 %0 = load <16 x i8>, ptr %x, align 1
1501 store <16 x i8> %0, ptr %z, align 1
1506 define ptr @strf32_4(ptr %y, ptr %x) {
1507 ; CHECK-LABEL: strf32_4:
1508 ; CHECK: @ %bb.0: @ %entry
1509 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1510 ; CHECK-NEXT: vstrw.32 q0, [r0, #4]
1513 %z = getelementptr inbounds i8, ptr %y, i32 4
1514 %0 = load <4 x float>, ptr %x, align 4
1515 store <4 x float> %0, ptr %z, align 4
1519 define ptr @strf16_4(ptr %y, ptr %x) {
1520 ; CHECK-LABEL: strf16_4:
1521 ; CHECK: @ %bb.0: @ %entry
1522 ; CHECK-NEXT: vldrh.u16 q0, [r1]
1523 ; CHECK-NEXT: vstrh.16 q0, [r0, #4]
1526 %z = getelementptr inbounds i8, ptr %y, i32 4
1527 %0 = load <8 x half>, ptr %x, align 2
1528 store <8 x half> %0, ptr %z, align 2
1532 define ptr @strwi32_align1(ptr %y, ptr %x) {
1533 ; CHECK-LE-LABEL: strwi32_align1:
1534 ; CHECK-LE: @ %bb.0: @ %entry
1535 ; CHECK-LE-NEXT: vldrw.u32 q0, [r1]
1536 ; CHECK-LE-NEXT: vstrb.8 q0, [r0, #3]
1537 ; CHECK-LE-NEXT: bx lr
1539 ; CHECK-BE-LABEL: strwi32_align1:
1540 ; CHECK-BE: @ %bb.0: @ %entry
1541 ; CHECK-BE-NEXT: vldrw.u32 q0, [r1]
1542 ; CHECK-BE-NEXT: vrev32.8 q0, q0
1543 ; CHECK-BE-NEXT: vstrb.8 q0, [r0, #3]
1544 ; CHECK-BE-NEXT: bx lr
1546 %z = getelementptr inbounds i8, ptr %y, i32 3
1547 %0 = load <4 x i32>, ptr %x, align 4
1548 store <4 x i32> %0, ptr %z, align 1
1552 define ptr @strhi16_align1(ptr %y, ptr %x) {
1553 ; CHECK-LE-LABEL: strhi16_align1:
1554 ; CHECK-LE: @ %bb.0: @ %entry
1555 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1556 ; CHECK-LE-NEXT: vstrb.8 q0, [r0, #3]
1557 ; CHECK-LE-NEXT: bx lr
1559 ; CHECK-BE-LABEL: strhi16_align1:
1560 ; CHECK-BE: @ %bb.0: @ %entry
1561 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1562 ; CHECK-BE-NEXT: vrev16.8 q0, q0
1563 ; CHECK-BE-NEXT: vstrb.8 q0, [r0, #3]
1564 ; CHECK-BE-NEXT: bx lr
1566 %z = getelementptr inbounds i8, ptr %y, i32 3
1567 %0 = load <8 x i16>, ptr %x, align 2
1568 store <8 x i16> %0, ptr %z, align 1
1572 define ptr @strhi32_align1(ptr %y, ptr %x) {
1573 ; CHECK-LABEL: strhi32_align1:
1574 ; CHECK: @ %bb.0: @ %entry
1575 ; CHECK-NEXT: .pad #8
1576 ; CHECK-NEXT: sub sp, #8
1577 ; CHECK-NEXT: vldrw.u32 q0, [r1]
1578 ; CHECK-NEXT: mov r1, sp
1579 ; CHECK-NEXT: vstrh.32 q0, [r1]
1580 ; CHECK-NEXT: ldrd r1, r2, [sp]
1581 ; CHECK-NEXT: str.w r1, [r0, #3]
1582 ; CHECK-NEXT: str.w r2, [r0, #7]
1583 ; CHECK-NEXT: add sp, #8
1586 %z = getelementptr inbounds i8, ptr %y, i32 3
1587 %0 = load <4 x i32>, ptr %x, align 4
1588 %1 = trunc <4 x i32> %0 to <4 x i16>
1589 store <4 x i16> %1, ptr %z, align 1
1593 define ptr @strf32_align1(ptr %y, ptr %x) {
1594 ; CHECK-LE-LABEL: strf32_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: strf32_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 float>, ptr %x, align 4
1609 store <4 x float> %0, ptr %z, align 1
1613 define ptr @strf16_align1(ptr %y, ptr %x) {
1614 ; CHECK-LE-LABEL: strf16_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: strf16_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 half>, ptr %x, align 2
1629 store <8 x half> %0, ptr %z, align 1
1633 define ptr @strf16_align8(ptr %y, ptr %x) {
1634 ; CHECK-LE-LABEL: strf16_align8:
1635 ; CHECK-LE: @ %bb.0: @ %entry
1636 ; CHECK-LE-NEXT: vldrh.u16 q0, [r1]
1637 ; CHECK-LE-NEXT: vstrw.32 q0, [r0, #16]
1638 ; CHECK-LE-NEXT: bx lr
1640 ; CHECK-BE-LABEL: strf16_align8:
1641 ; CHECK-BE: @ %bb.0: @ %entry
1642 ; CHECK-BE-NEXT: vldrh.u16 q0, [r1]
1643 ; CHECK-BE-NEXT: vstrh.16 q0, [r0, #16]
1644 ; CHECK-BE-NEXT: bx lr
1646 %z = getelementptr inbounds i8, ptr %y, i32 16
1647 %0 = load <8 x i16>, ptr %x, align 2
1648 store <8 x i16> %0, ptr %z, align 8