1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=arm-ldst-opt %s -o - | FileCheck %s
5 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
6 target triple = "thumbv7a-none-unknown-eabi"
8 define ptr @STR_pre4(ptr %p, i32 %v) { unreachable }
9 define ptr @STR_pre8(ptr %p, i32 %v) { unreachable }
10 define ptr @STR_pre255(ptr %p, i32 %v) { unreachable }
11 define ptr @STR_pre256(ptr %p, i32 %v) { unreachable }
12 define ptr @STR_pre1024(ptr %p, i32 %v) { unreachable }
13 define ptr @STR_pre4095(ptr %p, i32 %v) { unreachable }
14 define ptr @STR_pre4096(ptr %p, i32 %v) { unreachable }
15 define ptr @STR_prem1024(ptr %p, i32 %v) { unreachable }
16 define ptr @STR_prem4095(ptr %p, i32 %v) { unreachable }
17 define ptr @STR_prem4096(ptr %p, i32 %v) { unreachable }
19 define ptr @STR_post4(ptr %p, i32 %v) { unreachable }
20 define ptr @STR_post8(ptr %p, i32 %v) { unreachable }
21 define ptr @STR_post255(ptr %p, i32 %v) { unreachable }
22 define ptr @STR_post256(ptr %p, i32 %v) { unreachable }
23 define ptr @STR_post1024(ptr %p, i32 %v) { unreachable }
24 define ptr @STR_post4095(ptr %p, i32 %v) { unreachable }
25 define ptr @STR_post4096(ptr %p, i32 %v) { unreachable }
26 define ptr @STR_postm1024(ptr %p, i32 %v) { unreachable }
27 define ptr @STR_postm4095(ptr %p, i32 %v) { unreachable }
28 define ptr @STR_postm4096(ptr %p, i32 %v) { unreachable }
34 tracksRegLiveness: true
36 - { reg: '$r0', virtual-reg: '' }
37 - { reg: '$r1', virtual-reg: '' }
42 ; CHECK-LABEL: name: STR_pre4
43 ; CHECK: liveins: $r0, $r1
44 ; CHECK: early-clobber $r0 = STR_PRE_IMM killed $r1, $r0, 4, 14 /* CC::al */, $noreg :: (store (s32))
45 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
46 renamable $r0 = nuw ADDri killed renamable $r0, 4, 14 /* CC::al */, $noreg, $noreg
47 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
48 BX_RET 14 /* CC::al */, $noreg, implicit $r0
54 tracksRegLiveness: true
56 - { reg: '$r0', virtual-reg: '' }
57 - { reg: '$r1', virtual-reg: '' }
62 ; CHECK-LABEL: name: STR_pre8
63 ; CHECK: liveins: $r0, $r1
64 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 8, 14 /* CC::al */, $noreg, $noreg
65 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
66 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
67 renamable $r0 = nuw ADDri killed renamable $r0, 8, 14 /* CC::al */, $noreg, $noreg
68 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
69 BX_RET 14 /* CC::al */, $noreg, implicit $r0
75 tracksRegLiveness: true
77 - { reg: '$r0', virtual-reg: '' }
78 - { reg: '$r1', virtual-reg: '' }
83 ; CHECK-LABEL: name: STR_pre255
84 ; CHECK: liveins: $r0, $r1
85 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 255, 14 /* CC::al */, $noreg, $noreg
86 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
87 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
88 renamable $r0 = nuw ADDri killed renamable $r0, 255, 14 /* CC::al */, $noreg, $noreg
89 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
90 BX_RET 14 /* CC::al */, $noreg, implicit $r0
96 tracksRegLiveness: true
98 - { reg: '$r0', virtual-reg: '' }
99 - { reg: '$r1', virtual-reg: '' }
104 ; CHECK-LABEL: name: STR_pre256
105 ; CHECK: liveins: $r0, $r1
106 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg
107 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
108 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
109 renamable $r0 = nuw ADDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg
110 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
111 BX_RET 14 /* CC::al */, $noreg, implicit $r0
117 tracksRegLiveness: true
119 - { reg: '$r0', virtual-reg: '' }
120 - { reg: '$r1', virtual-reg: '' }
125 ; CHECK-LABEL: name: STR_pre1024
126 ; CHECK: liveins: $r0, $r1
127 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 1024, 14 /* CC::al */, $noreg, $noreg
128 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
129 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
130 renamable $r0 = nuw ADDri killed renamable $r0, 1024, 14 /* CC::al */, $noreg, $noreg
131 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
132 BX_RET 14 /* CC::al */, $noreg, implicit $r0
138 tracksRegLiveness: true
140 - { reg: '$r0', virtual-reg: '' }
141 - { reg: '$r1', virtual-reg: '' }
146 ; CHECK-LABEL: name: STR_pre4095
147 ; CHECK: liveins: $r0, $r1
148 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 4095, 14 /* CC::al */, $noreg, $noreg
149 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
150 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
151 renamable $r0 = nuw ADDri killed renamable $r0, 4095, 14 /* CC::al */, $noreg, $noreg
152 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
153 BX_RET 14 /* CC::al */, $noreg, implicit $r0
159 tracksRegLiveness: true
161 - { reg: '$r0', virtual-reg: '' }
162 - { reg: '$r1', virtual-reg: '' }
167 ; CHECK-LABEL: name: STR_pre4096
168 ; CHECK: liveins: $r0, $r1
169 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
170 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
171 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
172 renamable $r0 = nuw ADDri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
173 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
174 BX_RET 14 /* CC::al */, $noreg, implicit $r0
180 tracksRegLiveness: true
182 - { reg: '$r0', virtual-reg: '' }
183 - { reg: '$r1', virtual-reg: '' }
188 ; CHECK-LABEL: name: STR_prem1024
189 ; CHECK: liveins: $r0, $r1
190 ; CHECK: renamable $r0 = nuw SUBri killed renamable $r0, 1024, 14 /* CC::al */, $noreg, $noreg
191 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
192 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
193 renamable $r0 = nuw SUBri killed renamable $r0, 1024, 14 /* CC::al */, $noreg, $noreg
194 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
195 BX_RET 14 /* CC::al */, $noreg, implicit $r0
201 tracksRegLiveness: true
203 - { reg: '$r0', virtual-reg: '' }
204 - { reg: '$r1', virtual-reg: '' }
209 ; CHECK-LABEL: name: STR_prem4095
210 ; CHECK: liveins: $r0, $r1
211 ; CHECK: renamable $r0 = nuw SUBri killed renamable $r0, 4095, 14 /* CC::al */, $noreg, $noreg
212 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
213 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
214 renamable $r0 = nuw SUBri killed renamable $r0, 4095, 14 /* CC::al */, $noreg, $noreg
215 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
216 BX_RET 14 /* CC::al */, $noreg, implicit $r0
222 tracksRegLiveness: true
224 - { reg: '$r0', virtual-reg: '' }
225 - { reg: '$r1', virtual-reg: '' }
230 ; CHECK-LABEL: name: STR_prem4096
231 ; CHECK: liveins: $r0, $r1
232 ; CHECK: renamable $r0 = nuw SUBri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
233 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
234 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
235 renamable $r0 = nuw SUBri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
236 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
237 BX_RET 14 /* CC::al */, $noreg, implicit $r0
244 tracksRegLiveness: true
246 - { reg: '$r0', virtual-reg: '' }
247 - { reg: '$r1', virtual-reg: '' }
252 ; CHECK-LABEL: name: STR_post4
253 ; CHECK: liveins: $r0, $r1
254 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 4, 14 /* CC::al */, $noreg :: (store (s32))
255 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
256 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
257 renamable $r0 = nuw ADDri killed renamable $r0, 4, 14 /* CC::al */, $noreg, $noreg
258 BX_RET 14 /* CC::al */, $noreg, implicit $r0
264 tracksRegLiveness: true
266 - { reg: '$r0', virtual-reg: '' }
267 - { reg: '$r1', virtual-reg: '' }
272 ; CHECK-LABEL: name: STR_post8
273 ; CHECK: liveins: $r0, $r1
274 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 8, 14 /* CC::al */, $noreg :: (store (s32))
275 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
276 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
277 renamable $r0 = nuw ADDri killed renamable $r0, 8, 14 /* CC::al */, $noreg, $noreg
278 BX_RET 14 /* CC::al */, $noreg, implicit $r0
284 tracksRegLiveness: true
286 - { reg: '$r0', virtual-reg: '' }
287 - { reg: '$r1', virtual-reg: '' }
292 ; CHECK-LABEL: name: STR_post255
293 ; CHECK: liveins: $r0, $r1
294 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 255, 14 /* CC::al */, $noreg :: (store (s32))
295 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
296 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
297 renamable $r0 = nuw ADDri killed renamable $r0, 255, 14 /* CC::al */, $noreg, $noreg
298 BX_RET 14 /* CC::al */, $noreg, implicit $r0
304 tracksRegLiveness: true
306 - { reg: '$r0', virtual-reg: '' }
307 - { reg: '$r1', virtual-reg: '' }
312 ; CHECK-LABEL: name: STR_post256
313 ; CHECK: liveins: $r0, $r1
314 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 256, 14 /* CC::al */, $noreg :: (store (s32))
315 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
316 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
317 renamable $r0 = nuw ADDri killed renamable $r0, 256, 14 /* CC::al */, $noreg, $noreg
318 BX_RET 14 /* CC::al */, $noreg, implicit $r0
324 tracksRegLiveness: true
326 - { reg: '$r0', virtual-reg: '' }
327 - { reg: '$r1', virtual-reg: '' }
332 ; CHECK-LABEL: name: STR_post1024
333 ; CHECK: liveins: $r0, $r1
334 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 1024, 14 /* CC::al */, $noreg :: (store (s32))
335 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
336 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
337 renamable $r0 = nuw ADDri killed renamable $r0, 1024, 14 /* CC::al */, $noreg, $noreg
338 BX_RET 14 /* CC::al */, $noreg, implicit $r0
344 tracksRegLiveness: true
346 - { reg: '$r0', virtual-reg: '' }
347 - { reg: '$r1', virtual-reg: '' }
352 ; CHECK-LABEL: name: STR_post4095
353 ; CHECK: liveins: $r0, $r1
354 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 2095, 14 /* CC::al */, $noreg :: (store (s32))
355 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
356 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
357 renamable $r0 = nuw ADDri killed renamable $r0, 2095, 14 /* CC::al */, $noreg, $noreg
358 BX_RET 14 /* CC::al */, $noreg, implicit $r0
364 tracksRegLiveness: true
366 - { reg: '$r0', virtual-reg: '' }
367 - { reg: '$r1', virtual-reg: '' }
372 ; CHECK-LABEL: name: STR_post4096
373 ; CHECK: liveins: $r0, $r1
374 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
375 ; CHECK: renamable $r0 = nuw ADDri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
376 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
377 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
378 renamable $r0 = nuw ADDri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
379 BX_RET 14 /* CC::al */, $noreg, implicit $r0
385 tracksRegLiveness: true
387 - { reg: '$r0', virtual-reg: '' }
388 - { reg: '$r1', virtual-reg: '' }
393 ; CHECK-LABEL: name: STR_postm1024
394 ; CHECK: liveins: $r0, $r1
395 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 5120, 14 /* CC::al */, $noreg :: (store (s32))
396 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
397 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
398 renamable $r0 = nuw SUBri killed renamable $r0, 1024, 14 /* CC::al */, $noreg, $noreg
399 BX_RET 14 /* CC::al */, $noreg, implicit $r0
405 tracksRegLiveness: true
407 - { reg: '$r0', virtual-reg: '' }
408 - { reg: '$r1', virtual-reg: '' }
413 ; CHECK-LABEL: name: STR_postm4095
414 ; CHECK: liveins: $r0, $r1
415 ; CHECK: early-clobber $r0 = STR_POST_IMM killed $r1, $r0, $noreg, 6191, 14 /* CC::al */, $noreg :: (store (s32))
416 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
417 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
418 renamable $r0 = nuw SUBri killed renamable $r0, 2095, 14 /* CC::al */, $noreg, $noreg
419 BX_RET 14 /* CC::al */, $noreg, implicit $r0
425 tracksRegLiveness: true
427 - { reg: '$r0', virtual-reg: '' }
428 - { reg: '$r1', virtual-reg: '' }
433 ; CHECK-LABEL: name: STR_postm4096
434 ; CHECK: liveins: $r0, $r1
435 ; CHECK: STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
436 ; CHECK: renamable $r0 = nuw SUBri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
437 ; CHECK: BX_RET 14 /* CC::al */, $noreg, implicit $r0
438 STRi12 killed renamable $r1, renamable $r0, 0, 14 /* CC::al */, $noreg :: (store (s32))
439 renamable $r0 = nuw SUBri killed renamable $r0, 4096, 14 /* CC::al */, $noreg, $noreg
440 BX_RET 14 /* CC::al */, $noreg, implicit $r0