1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv6m-none-eabi %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-T1
3 ; RUN: llc -mtriple=thumbv7m-none-eabi %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-T2
4 ; RUN: llc -mtriple=armv7a-none-eabi %s -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-ARM
6 define ptr @i32_0(ptr %p, i32 %v) {
9 ; CHECK-NEXT: str r1, [r0]
11 store i32 %v, ptr %p, align 4
15 define ptr @i32_3(ptr %p, i32 %v) {
16 ; CHECK-T1-LABEL: i32_3:
18 ; CHECK-T1-NEXT: movs r2, #3
19 ; CHECK-T1-NEXT: str r1, [r0, r2]
20 ; CHECK-T1-NEXT: adds r0, r0, #3
21 ; CHECK-T1-NEXT: bx lr
23 ; CHECK-T2-LABEL: i32_3:
25 ; CHECK-T2-NEXT: str r1, [r0, #3]!
26 ; CHECK-T2-NEXT: bx lr
28 ; CHECK-ARM-LABEL: i32_3:
30 ; CHECK-ARM-NEXT: str r1, [r0, #3]!
31 ; CHECK-ARM-NEXT: bx lr
32 %o = getelementptr inbounds i8, ptr %p, i32 3
33 store i32 %v, ptr %o, align 4
37 define ptr @i32_4(ptr %p, i32 %v) {
38 ; CHECK-T1-LABEL: i32_4:
40 ; CHECK-T1-NEXT: str r1, [r0, #4]
41 ; CHECK-T1-NEXT: adds r0, r0, #4
42 ; CHECK-T1-NEXT: bx lr
44 ; CHECK-T2-LABEL: i32_4:
46 ; CHECK-T2-NEXT: str r1, [r0, #4]!
47 ; CHECK-T2-NEXT: bx lr
49 ; CHECK-ARM-LABEL: i32_4:
51 ; CHECK-ARM-NEXT: str r1, [r0, #4]!
52 ; CHECK-ARM-NEXT: bx lr
53 %o = getelementptr inbounds i8, ptr %p, i32 4
54 store i32 %v, ptr %o, align 4
58 define ptr @i32_8(ptr %p, i32 %v) {
59 ; CHECK-T1-LABEL: i32_8:
61 ; CHECK-T1-NEXT: str r1, [r0, #8]
62 ; CHECK-T1-NEXT: adds r0, #8
63 ; CHECK-T1-NEXT: bx lr
65 ; CHECK-T2-LABEL: i32_8:
67 ; CHECK-T2-NEXT: str r1, [r0, #8]!
68 ; CHECK-T2-NEXT: bx lr
70 ; CHECK-ARM-LABEL: i32_8:
72 ; CHECK-ARM-NEXT: str r1, [r0, #8]!
73 ; CHECK-ARM-NEXT: bx lr
74 %o = getelementptr inbounds i8, ptr %p, i32 8
75 store i32 %v, ptr %o, align 4
79 define ptr @i32_m1(ptr %p, i32 %v) {
80 ; CHECK-T1-LABEL: i32_m1:
82 ; CHECK-T1-NEXT: subs r0, r0, #1
83 ; CHECK-T1-NEXT: str r1, [r0]
84 ; CHECK-T1-NEXT: bx lr
86 ; CHECK-T2-LABEL: i32_m1:
88 ; CHECK-T2-NEXT: str r1, [r0, #-1]!
89 ; CHECK-T2-NEXT: bx lr
91 ; CHECK-ARM-LABEL: i32_m1:
93 ; CHECK-ARM-NEXT: str r1, [r0, #-1]!
94 ; CHECK-ARM-NEXT: bx lr
95 %o = getelementptr inbounds i8, ptr %p, i32 -1
96 store i32 %v, ptr %o, align 4
100 define ptr @i32_m4(ptr %p, i32 %v) {
101 ; CHECK-T1-LABEL: i32_m4:
103 ; CHECK-T1-NEXT: subs r0, r0, #4
104 ; CHECK-T1-NEXT: str r1, [r0]
105 ; CHECK-T1-NEXT: bx lr
107 ; CHECK-T2-LABEL: i32_m4:
109 ; CHECK-T2-NEXT: str r1, [r0, #-4]!
110 ; CHECK-T2-NEXT: bx lr
112 ; CHECK-ARM-LABEL: i32_m4:
113 ; CHECK-ARM: @ %bb.0:
114 ; CHECK-ARM-NEXT: str r1, [r0, #-4]!
115 ; CHECK-ARM-NEXT: bx lr
116 %o = getelementptr inbounds i8, ptr %p, i32 -4
117 store i32 %v, ptr %o, align 4
121 define ptr @i32_252(ptr %p, i32 %v) {
122 ; CHECK-T1-LABEL: i32_252:
124 ; CHECK-T1-NEXT: movs r2, #252
125 ; CHECK-T1-NEXT: str r1, [r0, r2]
126 ; CHECK-T1-NEXT: adds r0, #252
127 ; CHECK-T1-NEXT: bx lr
129 ; CHECK-T2-LABEL: i32_252:
131 ; CHECK-T2-NEXT: str r1, [r0, #252]!
132 ; CHECK-T2-NEXT: bx lr
134 ; CHECK-ARM-LABEL: i32_252:
135 ; CHECK-ARM: @ %bb.0:
136 ; CHECK-ARM-NEXT: str r1, [r0, #252]!
137 ; CHECK-ARM-NEXT: bx lr
138 %o = getelementptr inbounds i8, ptr %p, i32 252
139 store i32 %v, ptr %o, align 4
143 define ptr @i32_255(ptr %p, i32 %v) {
144 ; CHECK-T1-LABEL: i32_255:
146 ; CHECK-T1-NEXT: movs r2, #255
147 ; CHECK-T1-NEXT: str r1, [r0, r2]
148 ; CHECK-T1-NEXT: adds r0, #255
149 ; CHECK-T1-NEXT: bx lr
151 ; CHECK-T2-LABEL: i32_255:
153 ; CHECK-T2-NEXT: str r1, [r0, #255]!
154 ; CHECK-T2-NEXT: bx lr
156 ; CHECK-ARM-LABEL: i32_255:
157 ; CHECK-ARM: @ %bb.0:
158 ; CHECK-ARM-NEXT: str r1, [r0, #255]!
159 ; CHECK-ARM-NEXT: bx lr
160 %o = getelementptr inbounds i8, ptr %p, i32 255
161 store i32 %v, ptr %o, align 4
165 define ptr @i32_256(ptr %p, i32 %v) {
166 ; CHECK-T1-LABEL: i32_256:
168 ; CHECK-T1-NEXT: movs r2, #1
169 ; CHECK-T1-NEXT: lsls r2, r2, #8
170 ; CHECK-T1-NEXT: str r1, [r0, r2]
171 ; CHECK-T1-NEXT: adds r0, r0, r2
172 ; CHECK-T1-NEXT: bx lr
174 ; CHECK-T2-LABEL: i32_256:
176 ; CHECK-T2-NEXT: str.w r1, [r0, #256]
177 ; CHECK-T2-NEXT: add.w r0, r0, #256
178 ; CHECK-T2-NEXT: bx lr
180 ; CHECK-ARM-LABEL: i32_256:
181 ; CHECK-ARM: @ %bb.0:
182 ; CHECK-ARM-NEXT: str r1, [r0, #256]!
183 ; CHECK-ARM-NEXT: bx lr
184 %o = getelementptr inbounds i8, ptr %p, i32 256
185 store i32 %v, ptr %o, align 4
189 define ptr @i32_m252(ptr %p, i32 %v) {
190 ; CHECK-T1-LABEL: i32_m252:
192 ; CHECK-T1-NEXT: subs r0, #252
193 ; CHECK-T1-NEXT: str r1, [r0]
194 ; CHECK-T1-NEXT: bx lr
196 ; CHECK-T2-LABEL: i32_m252:
198 ; CHECK-T2-NEXT: str r1, [r0, #-252]!
199 ; CHECK-T2-NEXT: bx lr
201 ; CHECK-ARM-LABEL: i32_m252:
202 ; CHECK-ARM: @ %bb.0:
203 ; CHECK-ARM-NEXT: str r1, [r0, #-252]!
204 ; CHECK-ARM-NEXT: bx lr
205 %o = getelementptr inbounds i8, ptr %p, i32 -252
206 store i32 %v, ptr %o, align 4
210 define ptr @i32_m255(ptr %p, i32 %v) {
211 ; CHECK-T1-LABEL: i32_m255:
213 ; CHECK-T1-NEXT: subs r0, #255
214 ; CHECK-T1-NEXT: str r1, [r0]
215 ; CHECK-T1-NEXT: bx lr
217 ; CHECK-T2-LABEL: i32_m255:
219 ; CHECK-T2-NEXT: str r1, [r0, #-255]!
220 ; CHECK-T2-NEXT: bx lr
222 ; CHECK-ARM-LABEL: i32_m255:
223 ; CHECK-ARM: @ %bb.0:
224 ; CHECK-ARM-NEXT: str r1, [r0, #-255]!
225 ; CHECK-ARM-NEXT: bx lr
226 %o = getelementptr inbounds i8, ptr %p, i32 -255
227 store i32 %v, ptr %o, align 4
231 define ptr @i32_m256(ptr %p, i32 %v) {
232 ; CHECK-T1-LABEL: i32_m256:
234 ; CHECK-T1-NEXT: movs r2, #255
235 ; CHECK-T1-NEXT: mvns r2, r2
236 ; CHECK-T1-NEXT: str r1, [r0, r2]
237 ; CHECK-T1-NEXT: adds r0, r0, r2
238 ; CHECK-T1-NEXT: bx lr
240 ; CHECK-T2-LABEL: i32_m256:
242 ; CHECK-T2-NEXT: mvn r2, #255
243 ; CHECK-T2-NEXT: str r1, [r0, r2]
244 ; CHECK-T2-NEXT: sub.w r0, r0, #256
245 ; CHECK-T2-NEXT: bx lr
247 ; CHECK-ARM-LABEL: i32_m256:
248 ; CHECK-ARM: @ %bb.0:
249 ; CHECK-ARM-NEXT: str r1, [r0, #-256]!
250 ; CHECK-ARM-NEXT: bx lr
251 %o = getelementptr inbounds i8, ptr %p, i32 -256
252 store i32 %v, ptr %o, align 4
256 define ptr @i32_4095(ptr %p, i32 %v) {
257 ; CHECK-T1-LABEL: i32_4095:
259 ; CHECK-T1-NEXT: ldr r2, .LCPI12_0
260 ; CHECK-T1-NEXT: str r1, [r0, r2]
261 ; CHECK-T1-NEXT: adds r0, r0, r2
262 ; CHECK-T1-NEXT: bx lr
263 ; CHECK-T1-NEXT: .p2align 2
264 ; CHECK-T1-NEXT: @ %bb.1:
265 ; CHECK-T1-NEXT: .LCPI12_0:
266 ; CHECK-T1-NEXT: .long 4095 @ 0xfff
268 ; CHECK-T2-LABEL: i32_4095:
270 ; CHECK-T2-NEXT: str.w r1, [r0, #4095]
271 ; CHECK-T2-NEXT: addw r0, r0, #4095
272 ; CHECK-T2-NEXT: bx lr
274 ; CHECK-ARM-LABEL: i32_4095:
275 ; CHECK-ARM: @ %bb.0:
276 ; CHECK-ARM-NEXT: str r1, [r0, #4095]!
277 ; CHECK-ARM-NEXT: bx lr
278 %o = getelementptr inbounds i8, ptr %p, i32 4095
279 store i32 %v, ptr %o, align 4
283 define ptr @i32_4096(ptr %p, i32 %v) {
284 ; CHECK-T1-LABEL: i32_4096:
286 ; CHECK-T1-NEXT: movs r2, #1
287 ; CHECK-T1-NEXT: lsls r2, r2, #12
288 ; CHECK-T1-NEXT: str r1, [r0, r2]
289 ; CHECK-T1-NEXT: adds r0, r0, r2
290 ; CHECK-T1-NEXT: bx lr
292 ; CHECK-T2-LABEL: i32_4096:
294 ; CHECK-T2-NEXT: mov.w r2, #4096
295 ; CHECK-T2-NEXT: str r1, [r0, r2]
296 ; CHECK-T2-NEXT: add.w r0, r0, #4096
297 ; CHECK-T2-NEXT: bx lr
299 ; CHECK-ARM-LABEL: i32_4096:
300 ; CHECK-ARM: @ %bb.0:
301 ; CHECK-ARM-NEXT: mov r2, #4096
302 ; CHECK-ARM-NEXT: str r1, [r0, r2]!
303 ; CHECK-ARM-NEXT: bx lr
304 %o = getelementptr inbounds i8, ptr %p, i32 4096
305 store i32 %v, ptr %o, align 4
309 define ptr @i32_m4095(ptr %p, i32 %v) {
310 ; CHECK-T1-LABEL: i32_m4095:
312 ; CHECK-T1-NEXT: ldr r2, .LCPI14_0
313 ; CHECK-T1-NEXT: str r1, [r0, r2]
314 ; CHECK-T1-NEXT: adds r0, r0, r2
315 ; CHECK-T1-NEXT: bx lr
316 ; CHECK-T1-NEXT: .p2align 2
317 ; CHECK-T1-NEXT: @ %bb.1:
318 ; CHECK-T1-NEXT: .LCPI14_0:
319 ; CHECK-T1-NEXT: .long 4294963201 @ 0xfffff001
321 ; CHECK-T2-LABEL: i32_m4095:
323 ; CHECK-T2-NEXT: movw r2, #61441
324 ; CHECK-T2-NEXT: movt r2, #65535
325 ; CHECK-T2-NEXT: str r1, [r0, r2]
326 ; CHECK-T2-NEXT: subw r0, r0, #4095
327 ; CHECK-T2-NEXT: bx lr
329 ; CHECK-ARM-LABEL: i32_m4095:
330 ; CHECK-ARM: @ %bb.0:
331 ; CHECK-ARM-NEXT: str r1, [r0, #-4095]!
332 ; CHECK-ARM-NEXT: bx lr
333 %o = getelementptr inbounds i8, ptr %p, i32 -4095
334 store i32 %v, ptr %o, align 4
338 define ptr @i32_m4096(ptr %p, i32 %v) {
339 ; CHECK-T1-LABEL: i32_m4096:
341 ; CHECK-T1-NEXT: ldr r2, .LCPI15_0
342 ; CHECK-T1-NEXT: str r1, [r0, r2]
343 ; CHECK-T1-NEXT: adds r0, r0, r2
344 ; CHECK-T1-NEXT: bx lr
345 ; CHECK-T1-NEXT: .p2align 2
346 ; CHECK-T1-NEXT: @ %bb.1:
347 ; CHECK-T1-NEXT: .LCPI15_0:
348 ; CHECK-T1-NEXT: .long 4294963200 @ 0xfffff000
350 ; CHECK-T2-LABEL: i32_m4096:
352 ; CHECK-T2-NEXT: movw r2, #61440
353 ; CHECK-T2-NEXT: movt r2, #65535
354 ; CHECK-T2-NEXT: str r1, [r0, r2]
355 ; CHECK-T2-NEXT: sub.w r0, r0, #4096
356 ; CHECK-T2-NEXT: bx lr
358 ; CHECK-ARM-LABEL: i32_m4096:
359 ; CHECK-ARM: @ %bb.0:
360 ; CHECK-ARM-NEXT: movw r2, #61440
361 ; CHECK-ARM-NEXT: movt r2, #65535
362 ; CHECK-ARM-NEXT: str r1, [r0, r2]!
363 ; CHECK-ARM-NEXT: bx lr
364 %o = getelementptr inbounds i8, ptr %p, i32 -4096
365 store i32 %v, ptr %o, align 4
369 define ptr @i64_0(ptr %p, i64 %v) {
370 ; CHECK-T1-LABEL: i64_0:
372 ; CHECK-T1-NEXT: stm r0!, {r2, r3}
373 ; CHECK-T1-NEXT: subs r0, #8
374 ; CHECK-T1-NEXT: bx lr
376 ; CHECK-T2-LABEL: i64_0:
378 ; CHECK-T2-NEXT: strd r2, r3, [r0]
379 ; CHECK-T2-NEXT: bx lr
381 ; CHECK-ARM-LABEL: i64_0:
382 ; CHECK-ARM: @ %bb.0:
383 ; CHECK-ARM-NEXT: mov r1, r3
384 ; CHECK-ARM-NEXT: str r2, [r0]
385 ; CHECK-ARM-NEXT: str r1, [r0, #4]
386 ; CHECK-ARM-NEXT: bx lr
387 store i64 %v, ptr %p, align 8
391 define ptr @i64_3(ptr %p, i64 %v) {
392 ; CHECK-T1-LABEL: i64_3:
394 ; CHECK-T1-NEXT: movs r1, #3
395 ; CHECK-T1-NEXT: str r2, [r0, r1]
396 ; CHECK-T1-NEXT: adds r0, r0, #3
397 ; CHECK-T1-NEXT: str r3, [r0, #4]
398 ; CHECK-T1-NEXT: bx lr
400 ; CHECK-T2-LABEL: i64_3:
402 ; CHECK-T2-NEXT: str r2, [r0, #3]!
403 ; CHECK-T2-NEXT: str r3, [r0, #4]
404 ; CHECK-T2-NEXT: bx lr
406 ; CHECK-ARM-LABEL: i64_3:
407 ; CHECK-ARM: @ %bb.0:
408 ; CHECK-ARM-NEXT: str r2, [r0, #3]!
409 ; CHECK-ARM-NEXT: str r3, [r0, #4]
410 ; CHECK-ARM-NEXT: bx lr
411 %o = getelementptr inbounds i8, ptr %p, i32 3
412 store i64 %v, ptr %o, align 8
416 define ptr @i64_4(ptr %p, i64 %v) {
417 ; CHECK-T1-LABEL: i64_4:
419 ; CHECK-T1-NEXT: str r2, [r0, #4]
420 ; CHECK-T1-NEXT: str r3, [r0, #8]
421 ; CHECK-T1-NEXT: adds r0, r0, #4
422 ; CHECK-T1-NEXT: bx lr
424 ; CHECK-T2-LABEL: i64_4:
426 ; CHECK-T2-NEXT: str r2, [r0, #4]!
427 ; CHECK-T2-NEXT: str r3, [r0, #4]
428 ; CHECK-T2-NEXT: bx lr
430 ; CHECK-ARM-LABEL: i64_4:
431 ; CHECK-ARM: @ %bb.0:
432 ; CHECK-ARM-NEXT: str r2, [r0, #4]!
433 ; CHECK-ARM-NEXT: str r3, [r0, #4]
434 ; CHECK-ARM-NEXT: bx lr
435 %o = getelementptr inbounds i8, ptr %p, i32 4
436 store i64 %v, ptr %o, align 8
440 define ptr @i64_8(ptr %p, i64 %v) {
441 ; CHECK-T1-LABEL: i64_8:
443 ; CHECK-T1-NEXT: str r2, [r0, #8]
444 ; CHECK-T1-NEXT: str r3, [r0, #12]
445 ; CHECK-T1-NEXT: adds r0, #8
446 ; CHECK-T1-NEXT: bx lr
448 ; CHECK-T2-LABEL: i64_8:
450 ; CHECK-T2-NEXT: str r2, [r0, #8]!
451 ; CHECK-T2-NEXT: str r3, [r0, #4]
452 ; CHECK-T2-NEXT: bx lr
454 ; CHECK-ARM-LABEL: i64_8:
455 ; CHECK-ARM: @ %bb.0:
456 ; CHECK-ARM-NEXT: str r2, [r0, #8]!
457 ; CHECK-ARM-NEXT: str r3, [r0, #4]
458 ; CHECK-ARM-NEXT: bx lr
459 %o = getelementptr inbounds i8, ptr %p, i32 8
460 store i64 %v, ptr %o, align 8
464 define ptr @i64_m1(ptr %p, i64 %v) {
465 ; CHECK-T1-LABEL: i64_m1:
467 ; CHECK-T1-NEXT: subs r0, r0, #1
468 ; CHECK-T1-NEXT: stm r0!, {r2, r3}
469 ; CHECK-T1-NEXT: subs r0, #8
470 ; CHECK-T1-NEXT: bx lr
472 ; CHECK-T2-LABEL: i64_m1:
474 ; CHECK-T2-NEXT: str r2, [r0, #-1]!
475 ; CHECK-T2-NEXT: str r3, [r0, #4]
476 ; CHECK-T2-NEXT: bx lr
478 ; CHECK-ARM-LABEL: i64_m1:
479 ; CHECK-ARM: @ %bb.0:
480 ; CHECK-ARM-NEXT: str r2, [r0, #-1]!
481 ; CHECK-ARM-NEXT: str r3, [r0, #4]
482 ; CHECK-ARM-NEXT: bx lr
483 %o = getelementptr inbounds i8, ptr %p, i32 -1
484 store i64 %v, ptr %o, align 8
488 define ptr @i64_m4(ptr %p, i64 %v) {
489 ; CHECK-T1-LABEL: i64_m4:
491 ; CHECK-T1-NEXT: str r3, [r0]
492 ; CHECK-T1-NEXT: subs r0, r0, #4
493 ; CHECK-T1-NEXT: str r2, [r0]
494 ; CHECK-T1-NEXT: bx lr
496 ; CHECK-T2-LABEL: i64_m4:
498 ; CHECK-T2-NEXT: str r3, [r0]
499 ; CHECK-T2-NEXT: str r2, [r0, #-4]!
500 ; CHECK-T2-NEXT: bx lr
502 ; CHECK-ARM-LABEL: i64_m4:
503 ; CHECK-ARM: @ %bb.0:
504 ; CHECK-ARM-NEXT: str r3, [r0]
505 ; CHECK-ARM-NEXT: str r2, [r0, #-4]!
506 ; CHECK-ARM-NEXT: bx lr
507 %o = getelementptr inbounds i8, ptr %p, i32 -4
508 store i64 %v, ptr %o, align 8
512 define ptr @i64_252(ptr %p, i64 %v) {
513 ; CHECK-T1-LABEL: i64_252:
515 ; CHECK-T1-NEXT: movs r1, #252
516 ; CHECK-T1-NEXT: str r2, [r0, r1]
517 ; CHECK-T1-NEXT: adds r0, #252
518 ; CHECK-T1-NEXT: str r3, [r0, #4]
519 ; CHECK-T1-NEXT: bx lr
521 ; CHECK-T2-LABEL: i64_252:
523 ; CHECK-T2-NEXT: str r2, [r0, #252]!
524 ; CHECK-T2-NEXT: str r3, [r0, #4]
525 ; CHECK-T2-NEXT: bx lr
527 ; CHECK-ARM-LABEL: i64_252:
528 ; CHECK-ARM: @ %bb.0:
529 ; CHECK-ARM-NEXT: str r2, [r0, #252]!
530 ; CHECK-ARM-NEXT: str r3, [r0, #4]
531 ; CHECK-ARM-NEXT: bx lr
532 %o = getelementptr inbounds i8, ptr %p, i32 252
533 store i64 %v, ptr %o, align 8
537 define ptr @i64_255(ptr %p, i64 %v) {
538 ; CHECK-T1-LABEL: i64_255:
540 ; CHECK-T1-NEXT: movs r1, #255
541 ; CHECK-T1-NEXT: str r2, [r0, r1]
542 ; CHECK-T1-NEXT: adds r0, #255
543 ; CHECK-T1-NEXT: str r3, [r0, #4]
544 ; CHECK-T1-NEXT: bx lr
546 ; CHECK-T2-LABEL: i64_255:
548 ; CHECK-T2-NEXT: str r2, [r0, #255]!
549 ; CHECK-T2-NEXT: str r3, [r0, #4]
550 ; CHECK-T2-NEXT: bx lr
552 ; CHECK-ARM-LABEL: i64_255:
553 ; CHECK-ARM: @ %bb.0:
554 ; CHECK-ARM-NEXT: str r2, [r0, #255]!
555 ; CHECK-ARM-NEXT: str r3, [r0, #4]
556 ; CHECK-ARM-NEXT: bx lr
557 %o = getelementptr inbounds i8, ptr %p, i32 255
558 store i64 %v, ptr %o, align 8
562 define ptr @i64_256(ptr %p, i64 %v) {
563 ; CHECK-T1-LABEL: i64_256:
565 ; CHECK-T1-NEXT: movs r1, #1
566 ; CHECK-T1-NEXT: lsls r1, r1, #8
567 ; CHECK-T1-NEXT: str r2, [r0, r1]
568 ; CHECK-T1-NEXT: adds r0, r0, r1
569 ; CHECK-T1-NEXT: str r3, [r0, #4]
570 ; CHECK-T1-NEXT: bx lr
572 ; CHECK-T2-LABEL: i64_256:
574 ; CHECK-T2-NEXT: strd r2, r3, [r0, #256]
575 ; CHECK-T2-NEXT: add.w r0, r0, #256
576 ; CHECK-T2-NEXT: bx lr
578 ; CHECK-ARM-LABEL: i64_256:
579 ; CHECK-ARM: @ %bb.0:
580 ; CHECK-ARM-NEXT: str r2, [r0, #256]!
581 ; CHECK-ARM-NEXT: str r3, [r0, #4]
582 ; CHECK-ARM-NEXT: bx lr
583 %o = getelementptr inbounds i8, ptr %p, i32 256
584 store i64 %v, ptr %o, align 8
588 define ptr @i64_m252(ptr %p, i64 %v) {
589 ; CHECK-T1-LABEL: i64_m252:
591 ; CHECK-T1-NEXT: subs r0, #252
592 ; CHECK-T1-NEXT: stm r0!, {r2, r3}
593 ; CHECK-T1-NEXT: subs r0, #8
594 ; CHECK-T1-NEXT: bx lr
596 ; CHECK-T2-LABEL: i64_m252:
598 ; CHECK-T2-NEXT: str r2, [r0, #-252]!
599 ; CHECK-T2-NEXT: str r3, [r0, #4]
600 ; CHECK-T2-NEXT: bx lr
602 ; CHECK-ARM-LABEL: i64_m252:
603 ; CHECK-ARM: @ %bb.0:
604 ; CHECK-ARM-NEXT: str r2, [r0, #-252]!
605 ; CHECK-ARM-NEXT: str r3, [r0, #4]
606 ; CHECK-ARM-NEXT: bx lr
607 %o = getelementptr inbounds i8, ptr %p, i32 -252
608 store i64 %v, ptr %o, align 8
612 define ptr @i64_m255(ptr %p, i64 %v) {
613 ; CHECK-T1-LABEL: i64_m255:
615 ; CHECK-T1-NEXT: subs r0, #255
616 ; CHECK-T1-NEXT: stm r0!, {r2, r3}
617 ; CHECK-T1-NEXT: subs r0, #8
618 ; CHECK-T1-NEXT: bx lr
620 ; CHECK-T2-LABEL: i64_m255:
622 ; CHECK-T2-NEXT: str r2, [r0, #-255]!
623 ; CHECK-T2-NEXT: str r3, [r0, #4]
624 ; CHECK-T2-NEXT: bx lr
626 ; CHECK-ARM-LABEL: i64_m255:
627 ; CHECK-ARM: @ %bb.0:
628 ; CHECK-ARM-NEXT: str r2, [r0, #-255]!
629 ; CHECK-ARM-NEXT: str r3, [r0, #4]
630 ; CHECK-ARM-NEXT: bx lr
631 %o = getelementptr inbounds i8, ptr %p, i32 -255
632 store i64 %v, ptr %o, align 8
636 define ptr @i64_m256(ptr %p, i64 %v) {
637 ; CHECK-T1-LABEL: i64_m256:
639 ; CHECK-T1-NEXT: movs r1, #255
640 ; CHECK-T1-NEXT: mvns r1, r1
641 ; CHECK-T1-NEXT: str r2, [r0, r1]
642 ; CHECK-T1-NEXT: adds r0, r0, r1
643 ; CHECK-T1-NEXT: str r3, [r0, #4]
644 ; CHECK-T1-NEXT: bx lr
646 ; CHECK-T2-LABEL: i64_m256:
648 ; CHECK-T2-NEXT: mvn r1, #255
649 ; CHECK-T2-NEXT: str r3, [r0, #-252]
650 ; CHECK-T2-NEXT: str r2, [r0, r1]
651 ; CHECK-T2-NEXT: sub.w r0, r0, #256
652 ; CHECK-T2-NEXT: bx lr
654 ; CHECK-ARM-LABEL: i64_m256:
655 ; CHECK-ARM: @ %bb.0:
656 ; CHECK-ARM-NEXT: str r2, [r0, #-256]!
657 ; CHECK-ARM-NEXT: str r3, [r0, #4]
658 ; CHECK-ARM-NEXT: bx lr
659 %o = getelementptr inbounds i8, ptr %p, i32 -256
660 store i64 %v, ptr %o, align 8
664 define ptr @i64_4095(ptr %p, i64 %v) {
665 ; CHECK-T1-LABEL: i64_4095:
667 ; CHECK-T1-NEXT: ldr r1, .LCPI28_0
668 ; CHECK-T1-NEXT: str r2, [r0, r1]
669 ; CHECK-T1-NEXT: adds r0, r0, r1
670 ; CHECK-T1-NEXT: str r3, [r0, #4]
671 ; CHECK-T1-NEXT: bx lr
672 ; CHECK-T1-NEXT: .p2align 2
673 ; CHECK-T1-NEXT: @ %bb.1:
674 ; CHECK-T1-NEXT: .LCPI28_0:
675 ; CHECK-T1-NEXT: .long 4095 @ 0xfff
677 ; CHECK-T2-LABEL: i64_4095:
679 ; CHECK-T2-NEXT: str.w r2, [r0, #4095]
680 ; CHECK-T2-NEXT: addw r0, r0, #4095
681 ; CHECK-T2-NEXT: str r3, [r0, #4]
682 ; CHECK-T2-NEXT: bx lr
684 ; CHECK-ARM-LABEL: i64_4095:
685 ; CHECK-ARM: @ %bb.0:
686 ; CHECK-ARM-NEXT: str r2, [r0, #4095]!
687 ; CHECK-ARM-NEXT: str r3, [r0, #4]
688 ; CHECK-ARM-NEXT: bx lr
689 %o = getelementptr inbounds i8, ptr %p, i32 4095
690 store i64 %v, ptr %o, align 8
694 define ptr @i64_4096(ptr %p, i64 %v) {
695 ; CHECK-T1-LABEL: i64_4096:
697 ; CHECK-T1-NEXT: movs r1, #1
698 ; CHECK-T1-NEXT: lsls r1, r1, #12
699 ; CHECK-T1-NEXT: str r2, [r0, r1]
700 ; CHECK-T1-NEXT: adds r0, r0, r1
701 ; CHECK-T1-NEXT: str r3, [r0, #4]
702 ; CHECK-T1-NEXT: bx lr
704 ; CHECK-T2-LABEL: i64_4096:
706 ; CHECK-T2-NEXT: mov.w r1, #4096
707 ; CHECK-T2-NEXT: str r2, [r0, r1]
708 ; CHECK-T2-NEXT: add.w r0, r0, #4096
709 ; CHECK-T2-NEXT: str r3, [r0, #4]
710 ; CHECK-T2-NEXT: bx lr
712 ; CHECK-ARM-LABEL: i64_4096:
713 ; CHECK-ARM: @ %bb.0:
714 ; CHECK-ARM-NEXT: mov r1, #4096
715 ; CHECK-ARM-NEXT: str r2, [r0, r1]!
716 ; CHECK-ARM-NEXT: str r3, [r0, #4]
717 ; CHECK-ARM-NEXT: bx lr
718 %o = getelementptr inbounds i8, ptr %p, i32 4096
719 store i64 %v, ptr %o, align 8
723 define ptr @i64_m4095(ptr %p, i64 %v) {
724 ; CHECK-T1-LABEL: i64_m4095:
726 ; CHECK-T1-NEXT: ldr r1, .LCPI30_0
727 ; CHECK-T1-NEXT: str r2, [r0, r1]
728 ; CHECK-T1-NEXT: adds r0, r0, r1
729 ; CHECK-T1-NEXT: str r3, [r0, #4]
730 ; CHECK-T1-NEXT: bx lr
731 ; CHECK-T1-NEXT: .p2align 2
732 ; CHECK-T1-NEXT: @ %bb.1:
733 ; CHECK-T1-NEXT: .LCPI30_0:
734 ; CHECK-T1-NEXT: .long 4294963201 @ 0xfffff001
736 ; CHECK-T2-LABEL: i64_m4095:
738 ; CHECK-T2-NEXT: movw r1, #61441
739 ; CHECK-T2-NEXT: movt r1, #65535
740 ; CHECK-T2-NEXT: str r2, [r0, r1]
741 ; CHECK-T2-NEXT: subw r0, r0, #4095
742 ; CHECK-T2-NEXT: str r3, [r0, #4]
743 ; CHECK-T2-NEXT: bx lr
745 ; CHECK-ARM-LABEL: i64_m4095:
746 ; CHECK-ARM: @ %bb.0:
747 ; CHECK-ARM-NEXT: str r2, [r0, #-4095]!
748 ; CHECK-ARM-NEXT: str r3, [r0, #4]
749 ; CHECK-ARM-NEXT: bx lr
750 %o = getelementptr inbounds i8, ptr %p, i32 -4095
751 store i64 %v, ptr %o, align 8
755 define ptr @i64_m4096(ptr %p, i64 %v) {
756 ; CHECK-T1-LABEL: i64_m4096:
758 ; CHECK-T1-NEXT: ldr r1, .LCPI31_0
759 ; CHECK-T1-NEXT: str r2, [r0, r1]
760 ; CHECK-T1-NEXT: adds r0, r0, r1
761 ; CHECK-T1-NEXT: str r3, [r0, #4]
762 ; CHECK-T1-NEXT: bx lr
763 ; CHECK-T1-NEXT: .p2align 2
764 ; CHECK-T1-NEXT: @ %bb.1:
765 ; CHECK-T1-NEXT: .LCPI31_0:
766 ; CHECK-T1-NEXT: .long 4294963200 @ 0xfffff000
768 ; CHECK-T2-LABEL: i64_m4096:
770 ; CHECK-T2-NEXT: movw r1, #61440
771 ; CHECK-T2-NEXT: movt r1, #65535
772 ; CHECK-T2-NEXT: str r2, [r0, r1]
773 ; CHECK-T2-NEXT: sub.w r0, r0, #4096
774 ; CHECK-T2-NEXT: str r3, [r0, #4]
775 ; CHECK-T2-NEXT: bx lr
777 ; CHECK-ARM-LABEL: i64_m4096:
778 ; CHECK-ARM: @ %bb.0:
779 ; CHECK-ARM-NEXT: movw r1, #61440
780 ; CHECK-ARM-NEXT: movt r1, #65535
781 ; CHECK-ARM-NEXT: str r2, [r0, r1]!
782 ; CHECK-ARM-NEXT: str r3, [r0, #4]
783 ; CHECK-ARM-NEXT: bx lr
784 %o = getelementptr inbounds i8, ptr %p, i32 -4096
785 store i64 %v, ptr %o, align 8
789 define ptr @i128_0(ptr %p, i128 %v) {
790 ; CHECK-T1-LABEL: i128_0:
792 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
793 ; CHECK-T1-NEXT: str r1, [r0, #12]
794 ; CHECK-T1-NEXT: ldr r1, [sp]
795 ; CHECK-T1-NEXT: str r1, [r0, #8]
796 ; CHECK-T1-NEXT: stm r0!, {r2, r3}
797 ; CHECK-T1-NEXT: subs r0, #8
798 ; CHECK-T1-NEXT: bx lr
800 ; CHECK-T2-LABEL: i128_0:
802 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
803 ; CHECK-T2-NEXT: str r1, [r0, #12]
804 ; CHECK-T2-NEXT: ldr r1, [sp]
805 ; CHECK-T2-NEXT: str r1, [r0, #8]
806 ; CHECK-T2-NEXT: strd r2, r3, [r0]
807 ; CHECK-T2-NEXT: bx lr
809 ; CHECK-ARM-LABEL: i128_0:
810 ; CHECK-ARM: @ %bb.0:
811 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
812 ; CHECK-ARM-NEXT: stm r0, {r2, r3}
813 ; CHECK-ARM-NEXT: str r1, [r0, #8]
814 ; CHECK-ARM-NEXT: str r12, [r0, #12]
815 ; CHECK-ARM-NEXT: bx lr
816 store i128 %v, ptr %p, align 16
820 define ptr @i128_3(ptr %p, i128 %v) {
821 ; CHECK-T1-LABEL: i128_3:
823 ; CHECK-T1-NEXT: movs r1, #3
824 ; CHECK-T1-NEXT: str r2, [r0, r1]
825 ; CHECK-T1-NEXT: adds r0, r0, #3
826 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
827 ; CHECK-T1-NEXT: str r1, [r0, #12]
828 ; CHECK-T1-NEXT: ldr r1, [sp]
829 ; CHECK-T1-NEXT: str r1, [r0, #8]
830 ; CHECK-T1-NEXT: str r3, [r0, #4]
831 ; CHECK-T1-NEXT: bx lr
833 ; CHECK-T2-LABEL: i128_3:
835 ; CHECK-T2-NEXT: str r2, [r0, #3]!
836 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
837 ; CHECK-T2-NEXT: str r1, [r0, #12]
838 ; CHECK-T2-NEXT: ldr r1, [sp]
839 ; CHECK-T2-NEXT: strd r3, r1, [r0, #4]
840 ; CHECK-T2-NEXT: bx lr
842 ; CHECK-ARM-LABEL: i128_3:
843 ; CHECK-ARM: @ %bb.0:
844 ; CHECK-ARM-NEXT: str r2, [r0, #3]!
845 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
846 ; CHECK-ARM-NEXT: str r3, [r0, #4]
847 ; CHECK-ARM-NEXT: str r1, [r0, #8]
848 ; CHECK-ARM-NEXT: str r12, [r0, #12]
849 ; CHECK-ARM-NEXT: bx lr
850 %o = getelementptr inbounds i8, ptr %p, i32 3
851 store i128 %v, ptr %o, align 16
855 define ptr @i128_4(ptr %p, i128 %v) {
856 ; CHECK-T1-LABEL: i128_4:
858 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
859 ; CHECK-T1-NEXT: str r1, [r0, #16]
860 ; CHECK-T1-NEXT: ldr r1, [sp]
861 ; CHECK-T1-NEXT: str r1, [r0, #12]
862 ; CHECK-T1-NEXT: str r3, [r0, #8]
863 ; CHECK-T1-NEXT: str r2, [r0, #4]
864 ; CHECK-T1-NEXT: adds r0, r0, #4
865 ; CHECK-T1-NEXT: bx lr
867 ; CHECK-T2-LABEL: i128_4:
869 ; CHECK-T2-NEXT: str r2, [r0, #4]!
870 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
871 ; CHECK-T2-NEXT: str r1, [r0, #12]
872 ; CHECK-T2-NEXT: ldr r1, [sp]
873 ; CHECK-T2-NEXT: strd r3, r1, [r0, #4]
874 ; CHECK-T2-NEXT: bx lr
876 ; CHECK-ARM-LABEL: i128_4:
877 ; CHECK-ARM: @ %bb.0:
878 ; CHECK-ARM-NEXT: str r2, [r0, #4]!
879 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
880 ; CHECK-ARM-NEXT: str r3, [r0, #4]
881 ; CHECK-ARM-NEXT: str r1, [r0, #8]
882 ; CHECK-ARM-NEXT: str r12, [r0, #12]
883 ; CHECK-ARM-NEXT: bx lr
884 %o = getelementptr inbounds i8, ptr %p, i32 4
885 store i128 %v, ptr %o, align 16
889 define ptr @i128_8(ptr %p, i128 %v) {
890 ; CHECK-T1-LABEL: i128_8:
892 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
893 ; CHECK-T1-NEXT: str r1, [r0, #20]
894 ; CHECK-T1-NEXT: ldr r1, [sp]
895 ; CHECK-T1-NEXT: str r1, [r0, #16]
896 ; CHECK-T1-NEXT: str r3, [r0, #12]
897 ; CHECK-T1-NEXT: str r2, [r0, #8]
898 ; CHECK-T1-NEXT: adds r0, #8
899 ; CHECK-T1-NEXT: bx lr
901 ; CHECK-T2-LABEL: i128_8:
903 ; CHECK-T2-NEXT: str r2, [r0, #8]!
904 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
905 ; CHECK-T2-NEXT: str r1, [r0, #12]
906 ; CHECK-T2-NEXT: ldr r1, [sp]
907 ; CHECK-T2-NEXT: strd r3, r1, [r0, #4]
908 ; CHECK-T2-NEXT: bx lr
910 ; CHECK-ARM-LABEL: i128_8:
911 ; CHECK-ARM: @ %bb.0:
912 ; CHECK-ARM-NEXT: str r2, [r0, #8]!
913 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
914 ; CHECK-ARM-NEXT: str r3, [r0, #4]
915 ; CHECK-ARM-NEXT: str r1, [r0, #8]
916 ; CHECK-ARM-NEXT: str r12, [r0, #12]
917 ; CHECK-ARM-NEXT: bx lr
918 %o = getelementptr inbounds i8, ptr %p, i32 8
919 store i128 %v, ptr %o, align 16
923 define ptr @i128_16(ptr %p, i128 %v) {
924 ; CHECK-T1-LABEL: i128_16:
926 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
927 ; CHECK-T1-NEXT: str r1, [r0, #28]
928 ; CHECK-T1-NEXT: ldr r1, [sp]
929 ; CHECK-T1-NEXT: str r1, [r0, #24]
930 ; CHECK-T1-NEXT: str r3, [r0, #20]
931 ; CHECK-T1-NEXT: str r2, [r0, #16]
932 ; CHECK-T1-NEXT: adds r0, #16
933 ; CHECK-T1-NEXT: bx lr
935 ; CHECK-T2-LABEL: i128_16:
937 ; CHECK-T2-NEXT: str r2, [r0, #16]!
938 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
939 ; CHECK-T2-NEXT: str r1, [r0, #12]
940 ; CHECK-T2-NEXT: ldr r1, [sp]
941 ; CHECK-T2-NEXT: strd r3, r1, [r0, #4]
942 ; CHECK-T2-NEXT: bx lr
944 ; CHECK-ARM-LABEL: i128_16:
945 ; CHECK-ARM: @ %bb.0:
946 ; CHECK-ARM-NEXT: str r2, [r0, #16]!
947 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
948 ; CHECK-ARM-NEXT: str r3, [r0, #4]
949 ; CHECK-ARM-NEXT: str r1, [r0, #8]
950 ; CHECK-ARM-NEXT: str r12, [r0, #12]
951 ; CHECK-ARM-NEXT: bx lr
952 %o = getelementptr inbounds i8, ptr %p, i32 16
953 store i128 %v, ptr %o, align 16
957 define ptr @i128_m1(ptr %p, i128 %v) {
958 ; CHECK-T1-LABEL: i128_m1:
960 ; CHECK-T1-NEXT: subs r0, r0, #1
961 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
962 ; CHECK-T1-NEXT: str r1, [r0, #12]
963 ; CHECK-T1-NEXT: ldr r1, [sp]
964 ; CHECK-T1-NEXT: str r1, [r0, #8]
965 ; CHECK-T1-NEXT: stm r0!, {r2, r3}
966 ; CHECK-T1-NEXT: subs r0, #8
967 ; CHECK-T1-NEXT: bx lr
969 ; CHECK-T2-LABEL: i128_m1:
971 ; CHECK-T2-NEXT: str r2, [r0, #-1]!
972 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
973 ; CHECK-T2-NEXT: str r1, [r0, #12]
974 ; CHECK-T2-NEXT: ldr r1, [sp]
975 ; CHECK-T2-NEXT: strd r3, r1, [r0, #4]
976 ; CHECK-T2-NEXT: bx lr
978 ; CHECK-ARM-LABEL: i128_m1:
979 ; CHECK-ARM: @ %bb.0:
980 ; CHECK-ARM-NEXT: str r2, [r0, #-1]!
981 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
982 ; CHECK-ARM-NEXT: str r3, [r0, #4]
983 ; CHECK-ARM-NEXT: str r1, [r0, #8]
984 ; CHECK-ARM-NEXT: str r12, [r0, #12]
985 ; CHECK-ARM-NEXT: bx lr
986 %o = getelementptr inbounds i8, ptr %p, i32 -1
987 store i128 %v, ptr %o, align 16
991 define ptr @i128_m4(ptr %p, i128 %v) {
992 ; CHECK-T1-LABEL: i128_m4:
994 ; CHECK-T1-NEXT: ldr r1, [sp, #4]
995 ; CHECK-T1-NEXT: str r1, [r0, #8]
996 ; CHECK-T1-NEXT: ldr r1, [sp]
997 ; CHECK-T1-NEXT: str r1, [r0, #4]
998 ; CHECK-T1-NEXT: str r3, [r0]
999 ; CHECK-T1-NEXT: subs r0, r0, #4
1000 ; CHECK-T1-NEXT: str r2, [r0]
1001 ; CHECK-T1-NEXT: bx lr
1003 ; CHECK-T2-LABEL: i128_m4:
1004 ; CHECK-T2: @ %bb.0:
1005 ; CHECK-T2-NEXT: ldr r1, [sp, #4]
1006 ; CHECK-T2-NEXT: str r1, [r0, #8]
1007 ; CHECK-T2-NEXT: ldr r1, [sp]
1008 ; CHECK-T2-NEXT: strd r3, r1, [r0]
1009 ; CHECK-T2-NEXT: str r2, [r0, #-4]!
1010 ; CHECK-T2-NEXT: bx lr
1012 ; CHECK-ARM-LABEL: i128_m4:
1013 ; CHECK-ARM: @ %bb.0:
1014 ; CHECK-ARM-NEXT: ldm sp, {r1, r12}
1015 ; CHECK-ARM-NEXT: str r3, [r0]
1016 ; CHECK-ARM-NEXT: stmib r0, {r1, r12}
1017 ; CHECK-ARM-NEXT: str r2, [r0, #-4]!
1018 ; CHECK-ARM-NEXT: bx lr
1019 %o = getelementptr inbounds i8, ptr %p, i32 -4
1020 store i128 %v, ptr %o, align 16
1024 define ptr @i16_0(ptr %p, i16 %v) {
1025 ; CHECK-LABEL: i16_0:
1027 ; CHECK-NEXT: strh r1, [r0]
1029 store i16 %v, ptr %p, align 2
1033 define ptr @i16_3(ptr %p, i16 %v) {
1034 ; CHECK-T1-LABEL: i16_3:
1035 ; CHECK-T1: @ %bb.0:
1036 ; CHECK-T1-NEXT: movs r2, #3
1037 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1038 ; CHECK-T1-NEXT: adds r0, r0, #3
1039 ; CHECK-T1-NEXT: bx lr
1041 ; CHECK-T2-LABEL: i16_3:
1042 ; CHECK-T2: @ %bb.0:
1043 ; CHECK-T2-NEXT: strh r1, [r0, #3]!
1044 ; CHECK-T2-NEXT: bx lr
1046 ; CHECK-ARM-LABEL: i16_3:
1047 ; CHECK-ARM: @ %bb.0:
1048 ; CHECK-ARM-NEXT: strh r1, [r0, #3]!
1049 ; CHECK-ARM-NEXT: bx lr
1050 %o = getelementptr inbounds i8, ptr %p, i32 3
1051 store i16 %v, ptr %o, align 2
1055 define ptr @i16_4(ptr %p, i16 %v) {
1056 ; CHECK-T1-LABEL: i16_4:
1057 ; CHECK-T1: @ %bb.0:
1058 ; CHECK-T1-NEXT: strh r1, [r0, #4]
1059 ; CHECK-T1-NEXT: adds r0, r0, #4
1060 ; CHECK-T1-NEXT: bx lr
1062 ; CHECK-T2-LABEL: i16_4:
1063 ; CHECK-T2: @ %bb.0:
1064 ; CHECK-T2-NEXT: strh r1, [r0, #4]!
1065 ; CHECK-T2-NEXT: bx lr
1067 ; CHECK-ARM-LABEL: i16_4:
1068 ; CHECK-ARM: @ %bb.0:
1069 ; CHECK-ARM-NEXT: strh r1, [r0, #4]!
1070 ; CHECK-ARM-NEXT: bx lr
1071 %o = getelementptr inbounds i8, ptr %p, i32 4
1072 store i16 %v, ptr %o, align 2
1076 define ptr @i16_8(ptr %p, i16 %v) {
1077 ; CHECK-T1-LABEL: i16_8:
1078 ; CHECK-T1: @ %bb.0:
1079 ; CHECK-T1-NEXT: strh r1, [r0, #8]
1080 ; CHECK-T1-NEXT: adds r0, #8
1081 ; CHECK-T1-NEXT: bx lr
1083 ; CHECK-T2-LABEL: i16_8:
1084 ; CHECK-T2: @ %bb.0:
1085 ; CHECK-T2-NEXT: strh r1, [r0, #8]!
1086 ; CHECK-T2-NEXT: bx lr
1088 ; CHECK-ARM-LABEL: i16_8:
1089 ; CHECK-ARM: @ %bb.0:
1090 ; CHECK-ARM-NEXT: strh r1, [r0, #8]!
1091 ; CHECK-ARM-NEXT: bx lr
1092 %o = getelementptr inbounds i8, ptr %p, i32 8
1093 store i16 %v, ptr %o, align 2
1097 define ptr @i16_m1(ptr %p, i16 %v) {
1098 ; CHECK-T1-LABEL: i16_m1:
1099 ; CHECK-T1: @ %bb.0:
1100 ; CHECK-T1-NEXT: subs r0, r0, #1
1101 ; CHECK-T1-NEXT: strh r1, [r0]
1102 ; CHECK-T1-NEXT: bx lr
1104 ; CHECK-T2-LABEL: i16_m1:
1105 ; CHECK-T2: @ %bb.0:
1106 ; CHECK-T2-NEXT: strh r1, [r0, #-1]!
1107 ; CHECK-T2-NEXT: bx lr
1109 ; CHECK-ARM-LABEL: i16_m1:
1110 ; CHECK-ARM: @ %bb.0:
1111 ; CHECK-ARM-NEXT: strh r1, [r0, #-1]!
1112 ; CHECK-ARM-NEXT: bx lr
1113 %o = getelementptr inbounds i8, ptr %p, i32 -1
1114 store i16 %v, ptr %o, align 2
1118 define ptr @i16_m4(ptr %p, i16 %v) {
1119 ; CHECK-T1-LABEL: i16_m4:
1120 ; CHECK-T1: @ %bb.0:
1121 ; CHECK-T1-NEXT: subs r0, r0, #4
1122 ; CHECK-T1-NEXT: strh r1, [r0]
1123 ; CHECK-T1-NEXT: bx lr
1125 ; CHECK-T2-LABEL: i16_m4:
1126 ; CHECK-T2: @ %bb.0:
1127 ; CHECK-T2-NEXT: strh r1, [r0, #-4]!
1128 ; CHECK-T2-NEXT: bx lr
1130 ; CHECK-ARM-LABEL: i16_m4:
1131 ; CHECK-ARM: @ %bb.0:
1132 ; CHECK-ARM-NEXT: strh r1, [r0, #-4]!
1133 ; CHECK-ARM-NEXT: bx lr
1134 %o = getelementptr inbounds i8, ptr %p, i32 -4
1135 store i16 %v, ptr %o, align 2
1139 define ptr @i16_252(ptr %p, i16 %v) {
1140 ; CHECK-T1-LABEL: i16_252:
1141 ; CHECK-T1: @ %bb.0:
1142 ; CHECK-T1-NEXT: movs r2, #252
1143 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1144 ; CHECK-T1-NEXT: adds r0, #252
1145 ; CHECK-T1-NEXT: bx lr
1147 ; CHECK-T2-LABEL: i16_252:
1148 ; CHECK-T2: @ %bb.0:
1149 ; CHECK-T2-NEXT: strh r1, [r0, #252]!
1150 ; CHECK-T2-NEXT: bx lr
1152 ; CHECK-ARM-LABEL: i16_252:
1153 ; CHECK-ARM: @ %bb.0:
1154 ; CHECK-ARM-NEXT: strh r1, [r0, #252]!
1155 ; CHECK-ARM-NEXT: bx lr
1156 %o = getelementptr inbounds i8, ptr %p, i32 252
1157 store i16 %v, ptr %o, align 2
1161 define ptr @i16_255(ptr %p, i16 %v) {
1162 ; CHECK-T1-LABEL: i16_255:
1163 ; CHECK-T1: @ %bb.0:
1164 ; CHECK-T1-NEXT: movs r2, #255
1165 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1166 ; CHECK-T1-NEXT: adds r0, #255
1167 ; CHECK-T1-NEXT: bx lr
1169 ; CHECK-T2-LABEL: i16_255:
1170 ; CHECK-T2: @ %bb.0:
1171 ; CHECK-T2-NEXT: strh r1, [r0, #255]!
1172 ; CHECK-T2-NEXT: bx lr
1174 ; CHECK-ARM-LABEL: i16_255:
1175 ; CHECK-ARM: @ %bb.0:
1176 ; CHECK-ARM-NEXT: strh r1, [r0, #255]!
1177 ; CHECK-ARM-NEXT: bx lr
1178 %o = getelementptr inbounds i8, ptr %p, i32 255
1179 store i16 %v, ptr %o, align 2
1183 define ptr @i16_256(ptr %p, i16 %v) {
1184 ; CHECK-T1-LABEL: i16_256:
1185 ; CHECK-T1: @ %bb.0:
1186 ; CHECK-T1-NEXT: movs r2, #1
1187 ; CHECK-T1-NEXT: lsls r2, r2, #8
1188 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1189 ; CHECK-T1-NEXT: adds r0, r0, r2
1190 ; CHECK-T1-NEXT: bx lr
1192 ; CHECK-T2-LABEL: i16_256:
1193 ; CHECK-T2: @ %bb.0:
1194 ; CHECK-T2-NEXT: strh.w r1, [r0, #256]
1195 ; CHECK-T2-NEXT: add.w r0, r0, #256
1196 ; CHECK-T2-NEXT: bx lr
1198 ; CHECK-ARM-LABEL: i16_256:
1199 ; CHECK-ARM: @ %bb.0:
1200 ; CHECK-ARM-NEXT: mov r2, #256
1201 ; CHECK-ARM-NEXT: strh r1, [r0, r2]!
1202 ; CHECK-ARM-NEXT: bx lr
1203 %o = getelementptr inbounds i8, ptr %p, i32 256
1204 store i16 %v, ptr %o, align 2
1208 define ptr @i16_m252(ptr %p, i16 %v) {
1209 ; CHECK-T1-LABEL: i16_m252:
1210 ; CHECK-T1: @ %bb.0:
1211 ; CHECK-T1-NEXT: subs r0, #252
1212 ; CHECK-T1-NEXT: strh r1, [r0]
1213 ; CHECK-T1-NEXT: bx lr
1215 ; CHECK-T2-LABEL: i16_m252:
1216 ; CHECK-T2: @ %bb.0:
1217 ; CHECK-T2-NEXT: strh r1, [r0, #-252]!
1218 ; CHECK-T2-NEXT: bx lr
1220 ; CHECK-ARM-LABEL: i16_m252:
1221 ; CHECK-ARM: @ %bb.0:
1222 ; CHECK-ARM-NEXT: strh r1, [r0, #-252]!
1223 ; CHECK-ARM-NEXT: bx lr
1224 %o = getelementptr inbounds i8, ptr %p, i32 -252
1225 store i16 %v, ptr %o, align 2
1229 define ptr @i16_m255(ptr %p, i16 %v) {
1230 ; CHECK-T1-LABEL: i16_m255:
1231 ; CHECK-T1: @ %bb.0:
1232 ; CHECK-T1-NEXT: subs r0, #255
1233 ; CHECK-T1-NEXT: strh r1, [r0]
1234 ; CHECK-T1-NEXT: bx lr
1236 ; CHECK-T2-LABEL: i16_m255:
1237 ; CHECK-T2: @ %bb.0:
1238 ; CHECK-T2-NEXT: strh r1, [r0, #-255]!
1239 ; CHECK-T2-NEXT: bx lr
1241 ; CHECK-ARM-LABEL: i16_m255:
1242 ; CHECK-ARM: @ %bb.0:
1243 ; CHECK-ARM-NEXT: strh r1, [r0, #-255]!
1244 ; CHECK-ARM-NEXT: bx lr
1245 %o = getelementptr inbounds i8, ptr %p, i32 -255
1246 store i16 %v, ptr %o, align 2
1250 define ptr @i16_m256(ptr %p, i16 %v) {
1251 ; CHECK-T1-LABEL: i16_m256:
1252 ; CHECK-T1: @ %bb.0:
1253 ; CHECK-T1-NEXT: movs r2, #255
1254 ; CHECK-T1-NEXT: mvns r2, r2
1255 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1256 ; CHECK-T1-NEXT: adds r0, r0, r2
1257 ; CHECK-T1-NEXT: bx lr
1259 ; CHECK-T2-LABEL: i16_m256:
1260 ; CHECK-T2: @ %bb.0:
1261 ; CHECK-T2-NEXT: mvn r2, #255
1262 ; CHECK-T2-NEXT: strh r1, [r0, r2]
1263 ; CHECK-T2-NEXT: sub.w r0, r0, #256
1264 ; CHECK-T2-NEXT: bx lr
1266 ; CHECK-ARM-LABEL: i16_m256:
1267 ; CHECK-ARM: @ %bb.0:
1268 ; CHECK-ARM-NEXT: mvn r2, #255
1269 ; CHECK-ARM-NEXT: strh r1, [r0, r2]!
1270 ; CHECK-ARM-NEXT: bx lr
1271 %o = getelementptr inbounds i8, ptr %p, i32 -256
1272 store i16 %v, ptr %o, align 2
1276 define ptr @i16_4095(ptr %p, i16 %v) {
1277 ; CHECK-T1-LABEL: i16_4095:
1278 ; CHECK-T1: @ %bb.0:
1279 ; CHECK-T1-NEXT: ldr r2, .LCPI51_0
1280 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1281 ; CHECK-T1-NEXT: adds r0, r0, r2
1282 ; CHECK-T1-NEXT: bx lr
1283 ; CHECK-T1-NEXT: .p2align 2
1284 ; CHECK-T1-NEXT: @ %bb.1:
1285 ; CHECK-T1-NEXT: .LCPI51_0:
1286 ; CHECK-T1-NEXT: .long 4095 @ 0xfff
1288 ; CHECK-T2-LABEL: i16_4095:
1289 ; CHECK-T2: @ %bb.0:
1290 ; CHECK-T2-NEXT: strh.w r1, [r0, #4095]
1291 ; CHECK-T2-NEXT: addw r0, r0, #4095
1292 ; CHECK-T2-NEXT: bx lr
1294 ; CHECK-ARM-LABEL: i16_4095:
1295 ; CHECK-ARM: @ %bb.0:
1296 ; CHECK-ARM-NEXT: movw r2, #4095
1297 ; CHECK-ARM-NEXT: strh r1, [r0, r2]!
1298 ; CHECK-ARM-NEXT: bx lr
1299 %o = getelementptr inbounds i8, ptr %p, i32 4095
1300 store i16 %v, ptr %o, align 2
1304 define ptr @i16_4096(ptr %p, i16 %v) {
1305 ; CHECK-T1-LABEL: i16_4096:
1306 ; CHECK-T1: @ %bb.0:
1307 ; CHECK-T1-NEXT: movs r2, #1
1308 ; CHECK-T1-NEXT: lsls r2, r2, #12
1309 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1310 ; CHECK-T1-NEXT: adds r0, r0, r2
1311 ; CHECK-T1-NEXT: bx lr
1313 ; CHECK-T2-LABEL: i16_4096:
1314 ; CHECK-T2: @ %bb.0:
1315 ; CHECK-T2-NEXT: mov.w r2, #4096
1316 ; CHECK-T2-NEXT: strh r1, [r0, r2]
1317 ; CHECK-T2-NEXT: add.w r0, r0, #4096
1318 ; CHECK-T2-NEXT: bx lr
1320 ; CHECK-ARM-LABEL: i16_4096:
1321 ; CHECK-ARM: @ %bb.0:
1322 ; CHECK-ARM-NEXT: mov r2, #4096
1323 ; CHECK-ARM-NEXT: strh r1, [r0, r2]!
1324 ; CHECK-ARM-NEXT: bx lr
1325 %o = getelementptr inbounds i8, ptr %p, i32 4096
1326 store i16 %v, ptr %o, align 2
1330 define ptr @i16_m4095(ptr %p, i16 %v) {
1331 ; CHECK-T1-LABEL: i16_m4095:
1332 ; CHECK-T1: @ %bb.0:
1333 ; CHECK-T1-NEXT: ldr r2, .LCPI53_0
1334 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1335 ; CHECK-T1-NEXT: adds r0, r0, r2
1336 ; CHECK-T1-NEXT: bx lr
1337 ; CHECK-T1-NEXT: .p2align 2
1338 ; CHECK-T1-NEXT: @ %bb.1:
1339 ; CHECK-T1-NEXT: .LCPI53_0:
1340 ; CHECK-T1-NEXT: .long 4294963201 @ 0xfffff001
1342 ; CHECK-T2-LABEL: i16_m4095:
1343 ; CHECK-T2: @ %bb.0:
1344 ; CHECK-T2-NEXT: movw r2, #61441
1345 ; CHECK-T2-NEXT: movt r2, #65535
1346 ; CHECK-T2-NEXT: strh r1, [r0, r2]
1347 ; CHECK-T2-NEXT: subw r0, r0, #4095
1348 ; CHECK-T2-NEXT: bx lr
1350 ; CHECK-ARM-LABEL: i16_m4095:
1351 ; CHECK-ARM: @ %bb.0:
1352 ; CHECK-ARM-NEXT: movw r2, #61441
1353 ; CHECK-ARM-NEXT: movt r2, #65535
1354 ; CHECK-ARM-NEXT: strh r1, [r0, r2]!
1355 ; CHECK-ARM-NEXT: bx lr
1356 %o = getelementptr inbounds i8, ptr %p, i32 -4095
1357 store i16 %v, ptr %o, align 2
1361 define ptr @i16_m4096(ptr %p, i16 %v) {
1362 ; CHECK-T1-LABEL: i16_m4096:
1363 ; CHECK-T1: @ %bb.0:
1364 ; CHECK-T1-NEXT: ldr r2, .LCPI54_0
1365 ; CHECK-T1-NEXT: strh r1, [r0, r2]
1366 ; CHECK-T1-NEXT: adds r0, r0, r2
1367 ; CHECK-T1-NEXT: bx lr
1368 ; CHECK-T1-NEXT: .p2align 2
1369 ; CHECK-T1-NEXT: @ %bb.1:
1370 ; CHECK-T1-NEXT: .LCPI54_0:
1371 ; CHECK-T1-NEXT: .long 4294963200 @ 0xfffff000
1373 ; CHECK-T2-LABEL: i16_m4096:
1374 ; CHECK-T2: @ %bb.0:
1375 ; CHECK-T2-NEXT: movw r2, #61440
1376 ; CHECK-T2-NEXT: movt r2, #65535
1377 ; CHECK-T2-NEXT: strh r1, [r0, r2]
1378 ; CHECK-T2-NEXT: sub.w r0, r0, #4096
1379 ; CHECK-T2-NEXT: bx lr
1381 ; CHECK-ARM-LABEL: i16_m4096:
1382 ; CHECK-ARM: @ %bb.0:
1383 ; CHECK-ARM-NEXT: movw r2, #61440
1384 ; CHECK-ARM-NEXT: movt r2, #65535
1385 ; CHECK-ARM-NEXT: strh r1, [r0, r2]!
1386 ; CHECK-ARM-NEXT: bx lr
1387 %o = getelementptr inbounds i8, ptr %p, i32 -4096
1388 store i16 %v, ptr %o, align 2
1392 define ptr @i8_0(ptr %p, i8 %v) {
1393 ; CHECK-LABEL: i8_0:
1395 ; CHECK-NEXT: strb r1, [r0]
1397 store i8 %v, ptr %p, align 1
1401 define ptr @i8_3(ptr %p, i8 %v) {
1402 ; CHECK-T1-LABEL: i8_3:
1403 ; CHECK-T1: @ %bb.0:
1404 ; CHECK-T1-NEXT: strb r1, [r0, #3]
1405 ; CHECK-T1-NEXT: adds r0, r0, #3
1406 ; CHECK-T1-NEXT: bx lr
1408 ; CHECK-T2-LABEL: i8_3:
1409 ; CHECK-T2: @ %bb.0:
1410 ; CHECK-T2-NEXT: strb r1, [r0, #3]!
1411 ; CHECK-T2-NEXT: bx lr
1413 ; CHECK-ARM-LABEL: i8_3:
1414 ; CHECK-ARM: @ %bb.0:
1415 ; CHECK-ARM-NEXT: strb r1, [r0, #3]!
1416 ; CHECK-ARM-NEXT: bx lr
1417 %o = getelementptr inbounds i8, ptr %p, i32 3
1418 store i8 %v, ptr %o, align 1
1422 define ptr @i8_4(ptr %p, i8 %v) {
1423 ; CHECK-T1-LABEL: i8_4:
1424 ; CHECK-T1: @ %bb.0:
1425 ; CHECK-T1-NEXT: strb r1, [r0, #4]
1426 ; CHECK-T1-NEXT: adds r0, r0, #4
1427 ; CHECK-T1-NEXT: bx lr
1429 ; CHECK-T2-LABEL: i8_4:
1430 ; CHECK-T2: @ %bb.0:
1431 ; CHECK-T2-NEXT: strb r1, [r0, #4]!
1432 ; CHECK-T2-NEXT: bx lr
1434 ; CHECK-ARM-LABEL: i8_4:
1435 ; CHECK-ARM: @ %bb.0:
1436 ; CHECK-ARM-NEXT: strb r1, [r0, #4]!
1437 ; CHECK-ARM-NEXT: bx lr
1438 %o = getelementptr inbounds i8, ptr %p, i32 4
1439 store i8 %v, ptr %o, align 1
1443 define ptr @i8_8(ptr %p, i8 %v) {
1444 ; CHECK-T1-LABEL: i8_8:
1445 ; CHECK-T1: @ %bb.0:
1446 ; CHECK-T1-NEXT: strb r1, [r0, #8]
1447 ; CHECK-T1-NEXT: adds r0, #8
1448 ; CHECK-T1-NEXT: bx lr
1450 ; CHECK-T2-LABEL: i8_8:
1451 ; CHECK-T2: @ %bb.0:
1452 ; CHECK-T2-NEXT: strb r1, [r0, #8]!
1453 ; CHECK-T2-NEXT: bx lr
1455 ; CHECK-ARM-LABEL: i8_8:
1456 ; CHECK-ARM: @ %bb.0:
1457 ; CHECK-ARM-NEXT: strb r1, [r0, #8]!
1458 ; CHECK-ARM-NEXT: bx lr
1459 %o = getelementptr inbounds i8, ptr %p, i32 8
1460 store i8 %v, ptr %o, align 1
1464 define ptr @i8_m1(ptr %p, i8 %v) {
1465 ; CHECK-T1-LABEL: i8_m1:
1466 ; CHECK-T1: @ %bb.0:
1467 ; CHECK-T1-NEXT: subs r0, r0, #1
1468 ; CHECK-T1-NEXT: strb r1, [r0]
1469 ; CHECK-T1-NEXT: bx lr
1471 ; CHECK-T2-LABEL: i8_m1:
1472 ; CHECK-T2: @ %bb.0:
1473 ; CHECK-T2-NEXT: strb r1, [r0, #-1]!
1474 ; CHECK-T2-NEXT: bx lr
1476 ; CHECK-ARM-LABEL: i8_m1:
1477 ; CHECK-ARM: @ %bb.0:
1478 ; CHECK-ARM-NEXT: strb r1, [r0, #-1]!
1479 ; CHECK-ARM-NEXT: bx lr
1480 %o = getelementptr inbounds i8, ptr %p, i32 -1
1481 store i8 %v, ptr %o, align 1
1485 define ptr @i8_m4(ptr %p, i8 %v) {
1486 ; CHECK-T1-LABEL: i8_m4:
1487 ; CHECK-T1: @ %bb.0:
1488 ; CHECK-T1-NEXT: subs r0, r0, #4
1489 ; CHECK-T1-NEXT: strb r1, [r0]
1490 ; CHECK-T1-NEXT: bx lr
1492 ; CHECK-T2-LABEL: i8_m4:
1493 ; CHECK-T2: @ %bb.0:
1494 ; CHECK-T2-NEXT: strb r1, [r0, #-4]!
1495 ; CHECK-T2-NEXT: bx lr
1497 ; CHECK-ARM-LABEL: i8_m4:
1498 ; CHECK-ARM: @ %bb.0:
1499 ; CHECK-ARM-NEXT: strb r1, [r0, #-4]!
1500 ; CHECK-ARM-NEXT: bx lr
1501 %o = getelementptr inbounds i8, ptr %p, i32 -4
1502 store i8 %v, ptr %o, align 1
1506 define ptr @i8_252(ptr %p, i8 %v) {
1507 ; CHECK-T1-LABEL: i8_252:
1508 ; CHECK-T1: @ %bb.0:
1509 ; CHECK-T1-NEXT: movs r2, #252
1510 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1511 ; CHECK-T1-NEXT: adds r0, #252
1512 ; CHECK-T1-NEXT: bx lr
1514 ; CHECK-T2-LABEL: i8_252:
1515 ; CHECK-T2: @ %bb.0:
1516 ; CHECK-T2-NEXT: strb r1, [r0, #252]!
1517 ; CHECK-T2-NEXT: bx lr
1519 ; CHECK-ARM-LABEL: i8_252:
1520 ; CHECK-ARM: @ %bb.0:
1521 ; CHECK-ARM-NEXT: strb r1, [r0, #252]!
1522 ; CHECK-ARM-NEXT: bx lr
1523 %o = getelementptr inbounds i8, ptr %p, i32 252
1524 store i8 %v, ptr %o, align 1
1528 define ptr @i8_255(ptr %p, i8 %v) {
1529 ; CHECK-T1-LABEL: i8_255:
1530 ; CHECK-T1: @ %bb.0:
1531 ; CHECK-T1-NEXT: movs r2, #255
1532 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1533 ; CHECK-T1-NEXT: adds r0, #255
1534 ; CHECK-T1-NEXT: bx lr
1536 ; CHECK-T2-LABEL: i8_255:
1537 ; CHECK-T2: @ %bb.0:
1538 ; CHECK-T2-NEXT: strb r1, [r0, #255]!
1539 ; CHECK-T2-NEXT: bx lr
1541 ; CHECK-ARM-LABEL: i8_255:
1542 ; CHECK-ARM: @ %bb.0:
1543 ; CHECK-ARM-NEXT: strb r1, [r0, #255]!
1544 ; CHECK-ARM-NEXT: bx lr
1545 %o = getelementptr inbounds i8, ptr %p, i32 255
1546 store i8 %v, ptr %o, align 1
1550 define ptr @i8_256(ptr %p, i8 %v) {
1551 ; CHECK-T1-LABEL: i8_256:
1552 ; CHECK-T1: @ %bb.0:
1553 ; CHECK-T1-NEXT: movs r2, #1
1554 ; CHECK-T1-NEXT: lsls r2, r2, #8
1555 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1556 ; CHECK-T1-NEXT: adds r0, r0, r2
1557 ; CHECK-T1-NEXT: bx lr
1559 ; CHECK-T2-LABEL: i8_256:
1560 ; CHECK-T2: @ %bb.0:
1561 ; CHECK-T2-NEXT: strb.w r1, [r0, #256]
1562 ; CHECK-T2-NEXT: add.w r0, r0, #256
1563 ; CHECK-T2-NEXT: bx lr
1565 ; CHECK-ARM-LABEL: i8_256:
1566 ; CHECK-ARM: @ %bb.0:
1567 ; CHECK-ARM-NEXT: strb r1, [r0, #256]!
1568 ; CHECK-ARM-NEXT: bx lr
1569 %o = getelementptr inbounds i8, ptr %p, i32 256
1570 store i8 %v, ptr %o, align 1
1574 define ptr @i8_m252(ptr %p, i8 %v) {
1575 ; CHECK-T1-LABEL: i8_m252:
1576 ; CHECK-T1: @ %bb.0:
1577 ; CHECK-T1-NEXT: subs r0, #252
1578 ; CHECK-T1-NEXT: strb r1, [r0]
1579 ; CHECK-T1-NEXT: bx lr
1581 ; CHECK-T2-LABEL: i8_m252:
1582 ; CHECK-T2: @ %bb.0:
1583 ; CHECK-T2-NEXT: strb r1, [r0, #-252]!
1584 ; CHECK-T2-NEXT: bx lr
1586 ; CHECK-ARM-LABEL: i8_m252:
1587 ; CHECK-ARM: @ %bb.0:
1588 ; CHECK-ARM-NEXT: strb r1, [r0, #-252]!
1589 ; CHECK-ARM-NEXT: bx lr
1590 %o = getelementptr inbounds i8, ptr %p, i32 -252
1591 store i8 %v, ptr %o, align 1
1595 define ptr @i8_m255(ptr %p, i8 %v) {
1596 ; CHECK-T1-LABEL: i8_m255:
1597 ; CHECK-T1: @ %bb.0:
1598 ; CHECK-T1-NEXT: subs r0, #255
1599 ; CHECK-T1-NEXT: strb r1, [r0]
1600 ; CHECK-T1-NEXT: bx lr
1602 ; CHECK-T2-LABEL: i8_m255:
1603 ; CHECK-T2: @ %bb.0:
1604 ; CHECK-T2-NEXT: strb r1, [r0, #-255]!
1605 ; CHECK-T2-NEXT: bx lr
1607 ; CHECK-ARM-LABEL: i8_m255:
1608 ; CHECK-ARM: @ %bb.0:
1609 ; CHECK-ARM-NEXT: strb r1, [r0, #-255]!
1610 ; CHECK-ARM-NEXT: bx lr
1611 %o = getelementptr inbounds i8, ptr %p, i32 -255
1612 store i8 %v, ptr %o, align 1
1616 define ptr @i8_m256(ptr %p, i8 %v) {
1617 ; CHECK-T1-LABEL: i8_m256:
1618 ; CHECK-T1: @ %bb.0:
1619 ; CHECK-T1-NEXT: movs r2, #255
1620 ; CHECK-T1-NEXT: mvns r2, r2
1621 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1622 ; CHECK-T1-NEXT: adds r0, r0, r2
1623 ; CHECK-T1-NEXT: bx lr
1625 ; CHECK-T2-LABEL: i8_m256:
1626 ; CHECK-T2: @ %bb.0:
1627 ; CHECK-T2-NEXT: mvn r2, #255
1628 ; CHECK-T2-NEXT: strb r1, [r0, r2]
1629 ; CHECK-T2-NEXT: sub.w r0, r0, #256
1630 ; CHECK-T2-NEXT: bx lr
1632 ; CHECK-ARM-LABEL: i8_m256:
1633 ; CHECK-ARM: @ %bb.0:
1634 ; CHECK-ARM-NEXT: strb r1, [r0, #-256]!
1635 ; CHECK-ARM-NEXT: bx lr
1636 %o = getelementptr inbounds i8, ptr %p, i32 -256
1637 store i8 %v, ptr %o, align 1
1641 define ptr @i8_4095(ptr %p, i8 %v) {
1642 ; CHECK-T1-LABEL: i8_4095:
1643 ; CHECK-T1: @ %bb.0:
1644 ; CHECK-T1-NEXT: ldr r2, .LCPI67_0
1645 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1646 ; CHECK-T1-NEXT: adds r0, r0, r2
1647 ; CHECK-T1-NEXT: bx lr
1648 ; CHECK-T1-NEXT: .p2align 2
1649 ; CHECK-T1-NEXT: @ %bb.1:
1650 ; CHECK-T1-NEXT: .LCPI67_0:
1651 ; CHECK-T1-NEXT: .long 4095 @ 0xfff
1653 ; CHECK-T2-LABEL: i8_4095:
1654 ; CHECK-T2: @ %bb.0:
1655 ; CHECK-T2-NEXT: strb.w r1, [r0, #4095]
1656 ; CHECK-T2-NEXT: addw r0, r0, #4095
1657 ; CHECK-T2-NEXT: bx lr
1659 ; CHECK-ARM-LABEL: i8_4095:
1660 ; CHECK-ARM: @ %bb.0:
1661 ; CHECK-ARM-NEXT: strb r1, [r0, #4095]!
1662 ; CHECK-ARM-NEXT: bx lr
1663 %o = getelementptr inbounds i8, ptr %p, i32 4095
1664 store i8 %v, ptr %o, align 1
1668 define ptr @i8_4096(ptr %p, i8 %v) {
1669 ; CHECK-T1-LABEL: i8_4096:
1670 ; CHECK-T1: @ %bb.0:
1671 ; CHECK-T1-NEXT: movs r2, #1
1672 ; CHECK-T1-NEXT: lsls r2, r2, #12
1673 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1674 ; CHECK-T1-NEXT: adds r0, r0, r2
1675 ; CHECK-T1-NEXT: bx lr
1677 ; CHECK-T2-LABEL: i8_4096:
1678 ; CHECK-T2: @ %bb.0:
1679 ; CHECK-T2-NEXT: mov.w r2, #4096
1680 ; CHECK-T2-NEXT: strb r1, [r0, r2]
1681 ; CHECK-T2-NEXT: add.w r0, r0, #4096
1682 ; CHECK-T2-NEXT: bx lr
1684 ; CHECK-ARM-LABEL: i8_4096:
1685 ; CHECK-ARM: @ %bb.0:
1686 ; CHECK-ARM-NEXT: mov r2, #4096
1687 ; CHECK-ARM-NEXT: strb r1, [r0, r2]!
1688 ; CHECK-ARM-NEXT: bx lr
1689 %o = getelementptr inbounds i8, ptr %p, i32 4096
1690 store i8 %v, ptr %o, align 1
1694 define ptr @i8_m4095(ptr %p, i8 %v) {
1695 ; CHECK-T1-LABEL: i8_m4095:
1696 ; CHECK-T1: @ %bb.0:
1697 ; CHECK-T1-NEXT: ldr r2, .LCPI69_0
1698 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1699 ; CHECK-T1-NEXT: adds r0, r0, r2
1700 ; CHECK-T1-NEXT: bx lr
1701 ; CHECK-T1-NEXT: .p2align 2
1702 ; CHECK-T1-NEXT: @ %bb.1:
1703 ; CHECK-T1-NEXT: .LCPI69_0:
1704 ; CHECK-T1-NEXT: .long 4294963201 @ 0xfffff001
1706 ; CHECK-T2-LABEL: i8_m4095:
1707 ; CHECK-T2: @ %bb.0:
1708 ; CHECK-T2-NEXT: movw r2, #61441
1709 ; CHECK-T2-NEXT: movt r2, #65535
1710 ; CHECK-T2-NEXT: strb r1, [r0, r2]
1711 ; CHECK-T2-NEXT: subw r0, r0, #4095
1712 ; CHECK-T2-NEXT: bx lr
1714 ; CHECK-ARM-LABEL: i8_m4095:
1715 ; CHECK-ARM: @ %bb.0:
1716 ; CHECK-ARM-NEXT: strb r1, [r0, #-4095]!
1717 ; CHECK-ARM-NEXT: bx lr
1718 %o = getelementptr inbounds i8, ptr %p, i32 -4095
1719 store i8 %v, ptr %o, align 1
1723 define ptr @i8_m4096(ptr %p, i8 %v) {
1724 ; CHECK-T1-LABEL: i8_m4096:
1725 ; CHECK-T1: @ %bb.0:
1726 ; CHECK-T1-NEXT: ldr r2, .LCPI70_0
1727 ; CHECK-T1-NEXT: strb r1, [r0, r2]
1728 ; CHECK-T1-NEXT: adds r0, r0, r2
1729 ; CHECK-T1-NEXT: bx lr
1730 ; CHECK-T1-NEXT: .p2align 2
1731 ; CHECK-T1-NEXT: @ %bb.1:
1732 ; CHECK-T1-NEXT: .LCPI70_0:
1733 ; CHECK-T1-NEXT: .long 4294963200 @ 0xfffff000
1735 ; CHECK-T2-LABEL: i8_m4096:
1736 ; CHECK-T2: @ %bb.0:
1737 ; CHECK-T2-NEXT: movw r2, #61440
1738 ; CHECK-T2-NEXT: movt r2, #65535
1739 ; CHECK-T2-NEXT: strb r1, [r0, r2]
1740 ; CHECK-T2-NEXT: sub.w r0, r0, #4096
1741 ; CHECK-T2-NEXT: bx lr
1743 ; CHECK-ARM-LABEL: i8_m4096:
1744 ; CHECK-ARM: @ %bb.0:
1745 ; CHECK-ARM-NEXT: movw r2, #61440
1746 ; CHECK-ARM-NEXT: movt r2, #65535
1747 ; CHECK-ARM-NEXT: strb r1, [r0, r2]!
1748 ; CHECK-ARM-NEXT: bx lr
1749 %o = getelementptr inbounds i8, ptr %p, i32 -4096
1750 store i8 %v, ptr %o, align 1