1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=machine-sink -sink-insts-to-avoid-spills %s -o - 2>&1 | FileCheck %s
4 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
5 target triple = "aarch64"
7 %struct.A = type { i32, i32, i32, i32, i32, i32 }
9 @A = external dso_local global [100 x i32], align 4
11 define void @cant_sink_adds_call_in_block(ptr nocapture readonly %input, ptr %a) {
13 %i = getelementptr inbounds %struct.A, ptr %a, i64 0, i32 1
14 %i1 = getelementptr inbounds %struct.A, ptr %a, i64 0, i32 2
15 %i2 = getelementptr inbounds %struct.A, ptr %a, i64 0, i32 3
16 %i3 = getelementptr inbounds %struct.A, ptr %a, i64 0, i32 4
17 %i4 = getelementptr inbounds %struct.A, ptr %a, i64 0, i32 5
18 %scevgep = getelementptr i8, ptr %input, i64 1
21 .backedge: ; preds = %.backedge.backedge, %bb
22 %lsr.iv = phi ptr [ %scevgep1, %.backedge.backedge ], [ %scevgep, %bb ]
23 %i5 = load i8, ptr %lsr.iv, align 1
24 %i6 = zext i8 %i5 to i32
25 switch i32 %i6, label %.backedge.backedge [
34 bb7: ; preds = %.backedge
35 tail call void @_Z6assignPj(ptr %a)
36 br label %.backedge.backedge
38 bb9: ; preds = %.backedge
39 tail call void @_Z6assignPj(ptr %i)
40 br label %.backedge.backedge
42 bb10: ; preds = %.backedge
43 tail call void @_Z6assignPj(ptr %i1)
44 br label %.backedge.backedge
46 bb11: ; preds = %.backedge
47 tail call void @_Z6assignPj(ptr %i2)
48 br label %.backedge.backedge
50 bb12: ; preds = %.backedge
51 tail call void @_Z6assignPj(ptr %i3)
52 br label %.backedge.backedge
54 bb13: ; preds = %.backedge
55 tail call void @_Z6assignPj(ptr %i4)
56 br label %.backedge.backedge
58 .backedge.backedge: ; preds = %bb13, %bb12, %bb11, %bb10, %bb9, %bb7, %.backedge
59 %scevgep1 = getelementptr i8, ptr %lsr.iv, i64 1
63 define i32 @load_not_safe_to_move_consecutive_call(i32 %n) {
65 %cmp63 = icmp sgt i32 %n, 0
66 br i1 %cmp63, label %for.body.preheader, label %for.cond.cleanup
68 for.body.preheader: ; preds = %entry
69 %i = load i32, ptr @A, align 4
70 %call0 = tail call i32 @use(i32 %n)
73 for.cond.cleanup: ; preds = %for.body, %entry
74 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
77 for.body: ; preds = %for.body, %for.body.preheader
78 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
79 %sum.065 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
80 %div = sdiv i32 %sum.065, %i
81 %lsr.iv.next = add i32 %lsr.iv, -1
82 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
83 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
86 define i32 @load_not_safe_to_move_consecutive_call_use(i32 %n) {
88 %cmp63 = icmp sgt i32 %n, 0
89 br i1 %cmp63, label %for.body.preheader, label %for.cond.cleanup
91 for.body.preheader: ; preds = %entry
92 %i = load i32, ptr @A, align 4
93 %call0 = tail call i32 @use(i32 %i)
96 for.cond.cleanup: ; preds = %for.body, %entry
97 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
100 for.body: ; preds = %for.body, %for.body.preheader
101 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
102 %sum.065 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
103 %div = sdiv i32 %sum.065, %i
104 %lsr.iv.next = add i32 %lsr.iv, -1
105 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
106 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
109 define i32 @cant_sink_use_outside_loop(i32 %n) {
111 %cmp63 = icmp sgt i32 %n, 0
112 br i1 %cmp63, label %for.body.preheader, label %for.cond.cleanup
114 for.body.preheader: ; preds = %entry
115 %i = load i32, ptr @A, align 4
118 for.cond.cleanup: ; preds = %for.body, %entry
119 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
120 %use.outside.loop = phi i32 [ 0, %entry ], [ %i, %for.body ]
121 %call = tail call i32 @use(i32 %use.outside.loop)
124 for.body: ; preds = %for.body, %for.body.preheader
125 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
126 %sum.065 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
127 %div = sdiv i32 %sum.065, %sum.065
128 %lsr.iv.next = add i32 %lsr.iv, -1
129 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
130 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
133 define i32 @use_is_not_a_copy(i32 %n) {
135 %cmp63 = icmp sgt i32 %n, 0
136 br i1 %cmp63, label %for.body.preheader, label %for.cond.cleanup
138 for.body.preheader: ; preds = %entry
139 %i = load i32, ptr @A, align 4
142 for.cond.cleanup: ; preds = %for.body, %entry
143 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
146 for.body: ; preds = %for.body, %for.body.preheader
147 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
148 %sum.065 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
149 %div = sdiv i32 %sum.065, %i
150 %lsr.iv.next = add i32 %lsr.iv, -1
151 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
152 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
155 define dso_local void @sink_add(ptr noalias nocapture readonly %read, ptr noalias nocapture %write, i32 %n) local_unnamed_addr {
157 %i = load i32, ptr %read, align 4, !tbaa !0
158 %cmp10 = icmp sgt i32 %n, 0
159 br i1 %cmp10, label %for.body.preheader, label %for.cond.cleanup
161 for.body.preheader: ; preds = %entry
165 for.cond.cleanup: ; preds = %for.body, %entry
166 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
167 store i32 %sum.0.lcssa, ptr %write, align 4, !tbaa !0
170 for.body: ; preds = %for.body, %for.body.preheader
171 %lsr.iv1 = phi i32 [ %i1, %for.body.preheader ], [ %lsr.iv.next2, %for.body ]
172 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
173 %sum.011 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
174 %div = sdiv i32 %sum.011, %lsr.iv1
175 %lsr.iv.next = add i32 %lsr.iv, -1
176 %lsr.iv.next2 = add i32 %lsr.iv1, 1
177 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
178 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body
181 define dso_local void @store_after_add(ptr noalias nocapture readonly %read, ptr noalias nocapture %write, ptr nocapture %store, i32 %n) local_unnamed_addr {
183 %i = load i32, ptr %read, align 4, !tbaa !0
184 %cmp10 = icmp sgt i32 %n, 0
185 br i1 %cmp10, label %for.body.preheader, label %for.cond.cleanup
187 for.body.preheader: ; preds = %entry
189 store i32 43, ptr %store, align 4, !tbaa !0
192 for.cond.cleanup: ; preds = %for.body, %entry
193 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
194 store i32 %sum.0.lcssa, ptr %write, align 4, !tbaa !0
197 for.body: ; preds = %for.body, %for.body.preheader
198 %lsr.iv1 = phi i32 [ %i1, %for.body.preheader ], [ %lsr.iv.next2, %for.body ]
199 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
200 %sum.011 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
201 %div = sdiv i32 %sum.011, %lsr.iv1
202 %lsr.iv.next = add i32 %lsr.iv, -1
203 %lsr.iv.next2 = add i32 %lsr.iv1, 1
204 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
205 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !4
208 define dso_local void @aliased_store_after_add(ptr noalias nocapture readonly %read, ptr noalias nocapture %write, ptr nocapture %store, i32 %n) local_unnamed_addr {
210 %i = load i32, ptr %read, align 4, !tbaa !0
211 %cmp10 = icmp sgt i32 %n, 0
212 br i1 %cmp10, label %for.body.preheader, label %for.cond.cleanup
214 for.body.preheader: ; preds = %entry
216 store i32 43, ptr %read, align 4, !tbaa !0
219 for.cond.cleanup: ; preds = %for.body, %entry
220 %sum.0.lcssa = phi i32 [ %n, %entry ], [ %div, %for.body ]
221 store i32 %sum.0.lcssa, ptr %write, align 4, !tbaa !0
224 for.body: ; preds = %for.body, %for.body.preheader
225 %lsr.iv1 = phi i32 [ %i1, %for.body.preheader ], [ %lsr.iv.next2, %for.body ]
226 %lsr.iv = phi i32 [ %n, %for.body.preheader ], [ %lsr.iv.next, %for.body ]
227 %sum.011 = phi i32 [ %div, %for.body ], [ %n, %for.body.preheader ]
228 %div = sdiv i32 %sum.011, %lsr.iv1
229 %lsr.iv.next = add i32 %lsr.iv, -1
230 %lsr.iv.next2 = add i32 %lsr.iv1, 1
231 %exitcond.not = icmp eq i32 %lsr.iv.next, 0
232 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !4
235 declare i32 @use(i32)
237 declare void @_Z6assignPj(ptr)
239 !0 = !{!1, !1, i64 0}
240 !1 = !{!"int", !2, i64 0}
241 !2 = !{!"omnipotent char", !3, i64 0}
242 !3 = !{!"Simple C/C++ TBAA"}
243 !4 = distinct !{!4, !5}
244 !5 = !{!"llvm.loop.mustprogress"}
248 name: cant_sink_adds_call_in_block
250 exposesReturnsTwice: false
252 regBankSelected: false
255 tracksRegLiveness: true
258 - { id: 0, class: gpr64all, preferred-register: '' }
259 - { id: 1, class: gpr64all, preferred-register: '' }
260 - { id: 2, class: gpr64all, preferred-register: '' }
261 - { id: 3, class: gpr64all, preferred-register: '' }
262 - { id: 4, class: gpr64all, preferred-register: '' }
263 - { id: 5, class: gpr64all, preferred-register: '' }
264 - { id: 6, class: gpr64sp, preferred-register: '' }
265 - { id: 7, class: gpr64all, preferred-register: '' }
266 - { id: 8, class: gpr64common, preferred-register: '' }
267 - { id: 9, class: gpr64common, preferred-register: '' }
268 - { id: 10, class: gpr64sp, preferred-register: '' }
269 - { id: 11, class: gpr64sp, preferred-register: '' }
270 - { id: 12, class: gpr64sp, preferred-register: '' }
271 - { id: 13, class: gpr64sp, preferred-register: '' }
272 - { id: 14, class: gpr64sp, preferred-register: '' }
273 - { id: 15, class: gpr64sp, preferred-register: '' }
274 - { id: 16, class: gpr64, preferred-register: '' }
275 - { id: 17, class: gpr32, preferred-register: '' }
276 - { id: 18, class: gpr32sp, preferred-register: '' }
277 - { id: 19, class: gpr32, preferred-register: '' }
278 - { id: 20, class: gpr64common, preferred-register: '' }
279 - { id: 21, class: gpr64, preferred-register: '' }
280 - { id: 22, class: gpr64sp, preferred-register: '' }
281 - { id: 23, class: gpr64sp, preferred-register: '' }
283 - { reg: '$x0', virtual-reg: '%8' }
284 - { reg: '$x1', virtual-reg: '%9' }
286 isFrameAddressTaken: false
287 isReturnAddressTaken: false
297 cvBytesOfCalleeSavedRegisters: 0
298 hasOpaqueSPAdjustment: false
300 hasMustTailInVarArgFunc: false
307 debugValueSubstitutions: []
309 machineFunctionInfo: {}
314 blocks: [ '%bb.2', '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8',
315 '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.3', '%bb.8',
316 '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8',
317 '%bb.8', '%bb.8', '%bb.4', '%bb.8', '%bb.8', '%bb.8',
318 '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8',
319 '%bb.5', '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8',
320 '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.6', '%bb.8',
321 '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8', '%bb.8',
322 '%bb.8', '%bb.8', '%bb.7' ]
324 ; CHECK-LABEL: name: cant_sink_adds_call_in_block
326 ; CHECK-NEXT: successors: %bb.1(0x80000000)
327 ; CHECK-NEXT: liveins: $x0, $x1
329 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
330 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
331 ; CHECK-NEXT: [[ADDXri:%[0-9]+]]:gpr64sp = nuw ADDXri [[COPY]], 4, 0
332 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64all = COPY [[ADDXri]]
333 ; CHECK-NEXT: [[ADDXri1:%[0-9]+]]:gpr64sp = nuw ADDXri [[COPY]], 8, 0
334 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64all = COPY [[ADDXri1]]
335 ; CHECK-NEXT: [[ADDXri2:%[0-9]+]]:gpr64sp = nuw ADDXri [[COPY]], 12, 0
336 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr64all = COPY [[ADDXri2]]
337 ; CHECK-NEXT: [[ADDXri3:%[0-9]+]]:gpr64sp = nuw ADDXri [[COPY]], 16, 0
338 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr64all = COPY [[ADDXri3]]
339 ; CHECK-NEXT: [[ADDXri4:%[0-9]+]]:gpr64sp = nuw ADDXri [[COPY]], 20, 0
340 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr64all = COPY [[ADDXri4]]
341 ; CHECK-NEXT: [[ADDXri5:%[0-9]+]]:gpr64sp = ADDXri [[COPY1]], 1, 0
342 ; CHECK-NEXT: [[COPY7:%[0-9]+]]:gpr64all = COPY [[ADDXri5]]
343 ; CHECK-NEXT: [[MOVaddrJT:%[0-9]+]]:gpr64common = MOVaddrJT target-flags(aarch64-page) %jump-table.0, target-flags(aarch64-pageoff, aarch64-nc) %jump-table.0
345 ; CHECK-NEXT: bb.1..backedge:
346 ; CHECK-NEXT: successors: %bb.9(0x09249249), %bb.2(0x76db6db7)
348 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr64sp = PHI [[COPY7]], %bb.0, %7, %bb.9
349 ; CHECK-NEXT: [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[PHI]], 0 :: (load (s8) from %ir.lsr.iv)
350 ; CHECK-NEXT: [[SUBREG_TO_REG:%[0-9]+]]:gpr64 = SUBREG_TO_REG 0, killed [[LDRBBui]], %subreg.sub_32
351 ; CHECK-NEXT: [[COPY8:%[0-9]+]]:gpr32sp = COPY [[SUBREG_TO_REG]].sub_32
352 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri killed [[COPY8]], 50, 0, implicit-def $nzcv
353 ; CHECK-NEXT: Bcc 8, %bb.9, implicit $nzcv
355 ; CHECK-NEXT: bb.2..backedge:
356 ; CHECK-NEXT: successors: %bb.3(0x13b13b14), %bb.9(0x09d89d8a), %bb.4(0x13b13b14), %bb.5(0x13b13b14), %bb.6(0x13b13b14), %bb.7(0x13b13b14), %bb.8(0x13b13b14)
358 ; CHECK-NEXT: early-clobber %21:gpr64, early-clobber %22:gpr64sp = JumpTableDest32 [[MOVaddrJT]], [[SUBREG_TO_REG]], %jump-table.0
359 ; CHECK-NEXT: BR killed %21
361 ; CHECK-NEXT: bb.3.bb7:
362 ; CHECK-NEXT: successors: %bb.9(0x80000000)
364 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
365 ; CHECK-NEXT: $x0 = COPY [[COPY]]
366 ; CHECK-NEXT: BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
367 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
368 ; CHECK-NEXT: B %bb.9
370 ; CHECK-NEXT: bb.4.bb9:
371 ; CHECK-NEXT: successors: %bb.9(0x80000000)
373 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
374 ; CHECK-NEXT: $x0 = COPY [[COPY2]]
375 ; CHECK-NEXT: BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
376 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
377 ; CHECK-NEXT: B %bb.9
379 ; CHECK-NEXT: bb.5.bb10:
380 ; CHECK-NEXT: successors: %bb.9(0x80000000)
382 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
383 ; CHECK-NEXT: $x0 = COPY [[COPY3]]
384 ; CHECK-NEXT: BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
385 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
386 ; CHECK-NEXT: B %bb.9
388 ; CHECK-NEXT: bb.6.bb11:
389 ; CHECK-NEXT: successors: %bb.9(0x80000000)
391 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
392 ; CHECK-NEXT: $x0 = COPY [[COPY4]]
393 ; CHECK-NEXT: BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
394 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
395 ; CHECK-NEXT: B %bb.9
397 ; CHECK-NEXT: bb.7.bb12:
398 ; CHECK-NEXT: successors: %bb.9(0x80000000)
400 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
401 ; CHECK-NEXT: $x0 = COPY [[COPY5]]
402 ; CHECK-NEXT: BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
403 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
404 ; CHECK-NEXT: B %bb.9
406 ; CHECK-NEXT: bb.8.bb13:
407 ; CHECK-NEXT: successors: %bb.9(0x80000000)
409 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
410 ; CHECK-NEXT: $x0 = COPY [[COPY6]]
411 ; CHECK-NEXT: BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
412 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
414 ; CHECK-NEXT: bb.9..backedge.backedge:
415 ; CHECK-NEXT: successors: %bb.1(0x80000000)
417 ; CHECK-NEXT: [[ADDXri6:%[0-9]+]]:gpr64sp = ADDXri [[PHI]], 1, 0
418 ; CHECK-NEXT: [[COPY9:%[0-9]+]]:gpr64all = COPY [[ADDXri6]]
419 ; CHECK-NEXT: B %bb.1
421 successors: %bb.1(0x80000000)
424 %9:gpr64common = COPY $x1
425 %8:gpr64common = COPY $x0
426 %10:gpr64sp = nuw ADDXri %9, 4, 0
427 %0:gpr64all = COPY %10
428 %11:gpr64sp = nuw ADDXri %9, 8, 0
429 %1:gpr64all = COPY %11
430 %12:gpr64sp = nuw ADDXri %9, 12, 0
431 %2:gpr64all = COPY %12
432 %13:gpr64sp = nuw ADDXri %9, 16, 0
433 %3:gpr64all = COPY %13
434 %14:gpr64sp = nuw ADDXri %9, 20, 0
435 %4:gpr64all = COPY %14
436 %15:gpr64sp = ADDXri %8, 1, 0
437 %5:gpr64all = COPY %15
438 %20:gpr64common = MOVaddrJT target-flags(aarch64-page) %jump-table.0, target-flags(aarch64-pageoff, aarch64-nc) %jump-table.0
441 successors: %bb.8(0x09249249), %bb.9(0x76db6db7)
443 %6:gpr64sp = PHI %5, %bb.0, %7, %bb.8
444 %17:gpr32 = LDRBBui %6, 0 :: (load (s8) from %ir.lsr.iv)
445 %16:gpr64 = SUBREG_TO_REG 0, killed %17, %subreg.sub_32
446 %18:gpr32sp = COPY %16.sub_32
447 %19:gpr32 = SUBSWri killed %18, 50, 0, implicit-def $nzcv
448 Bcc 8, %bb.8, implicit $nzcv
451 successors: %bb.2(0x13b13b14), %bb.8(0x09d89d8a), %bb.3(0x13b13b14), %bb.4(0x13b13b14), %bb.5(0x13b13b14), %bb.6(0x13b13b14), %bb.7(0x13b13b14)
453 early-clobber %21:gpr64, early-clobber %22:gpr64sp = JumpTableDest32 %20, %16, %jump-table.0
456 bb.2 (%ir-block.bb7):
457 successors: %bb.8(0x80000000)
459 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
461 BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
462 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
465 bb.3 (%ir-block.bb9):
466 successors: %bb.8(0x80000000)
468 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
470 BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
471 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
474 bb.4 (%ir-block.bb10):
475 successors: %bb.8(0x80000000)
477 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
479 BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
480 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
483 bb.5 (%ir-block.bb11):
484 successors: %bb.8(0x80000000)
486 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
488 BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
489 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
492 bb.6 (%ir-block.bb12):
493 successors: %bb.8(0x80000000)
495 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
497 BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
498 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
501 bb.7 (%ir-block.bb13):
502 successors: %bb.8(0x80000000)
504 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
506 BL @_Z6assignPj, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $x0, implicit-def $sp
507 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
509 bb.8..backedge.backedge:
510 successors: %bb.1(0x80000000)
512 %23:gpr64sp = ADDXri %6, 1, 0
513 %7:gpr64all = COPY %23
518 name: load_not_safe_to_move_consecutive_call
520 exposesReturnsTwice: false
522 regBankSelected: false
525 tracksRegLiveness: true
528 - { id: 0, class: gpr32, preferred-register: '' }
529 - { id: 1, class: gpr32all, preferred-register: '' }
530 - { id: 2, class: gpr32sp, preferred-register: '' }
531 - { id: 3, class: gpr32, preferred-register: '' }
532 - { id: 4, class: gpr32all, preferred-register: '' }
533 - { id: 5, class: gpr32all, preferred-register: '' }
534 - { id: 6, class: gpr32common, preferred-register: '' }
535 - { id: 7, class: gpr32, preferred-register: '' }
536 - { id: 8, class: gpr64common, preferred-register: '' }
537 - { id: 9, class: gpr32, preferred-register: '' }
538 - { id: 10, class: gpr32all, preferred-register: '' }
539 - { id: 11, class: gpr32, preferred-register: '' }
540 - { id: 12, class: gpr32, preferred-register: '' }
542 - { reg: '$w0', virtual-reg: '%6' }
544 isFrameAddressTaken: false
545 isReturnAddressTaken: false
555 cvBytesOfCalleeSavedRegisters: 0
556 hasOpaqueSPAdjustment: false
558 hasMustTailInVarArgFunc: false
565 debugValueSubstitutions: []
567 machineFunctionInfo: {}
569 ; CHECK-LABEL: name: load_not_safe_to_move_consecutive_call
571 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
572 ; CHECK-NEXT: liveins: $w0
574 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w0
575 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
576 ; CHECK-NEXT: Bcc 11, %bb.2, implicit $nzcv
577 ; CHECK-NEXT: B %bb.1
579 ; CHECK-NEXT: bb.1.for.body.preheader:
580 ; CHECK-NEXT: successors: %bb.3(0x80000000)
582 ; CHECK-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @A
583 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
584 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
585 ; CHECK-NEXT: $w0 = COPY [[COPY]]
586 ; CHECK-NEXT: BL @use, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $w0, implicit-def $sp, implicit-def $w0
587 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
588 ; CHECK-NEXT: B %bb.3
590 ; CHECK-NEXT: bb.2.for.cond.cleanup:
591 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, %4, %bb.3
592 ; CHECK-NEXT: $w0 = COPY [[PHI]]
593 ; CHECK-NEXT: RET_ReallyLR implicit $w0
595 ; CHECK-NEXT: bb.3.for.body:
596 ; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.3(0x7c000000)
598 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %5, %bb.3
599 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.1, %4, %bb.3
600 ; CHECK-NEXT: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[PHI2]], [[LDRWui]]
601 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY [[SDIVWr]]
602 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI1]], 1, 0, implicit-def $nzcv
603 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
604 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
605 ; CHECK-NEXT: B %bb.3
607 successors: %bb.1(0x50000000), %bb.2(0x30000000)
610 %6:gpr32common = COPY $w0
611 %7:gpr32 = SUBSWri %6, 1, 0, implicit-def $nzcv
612 Bcc 11, %bb.2, implicit $nzcv
615 bb.1.for.body.preheader:
616 successors: %bb.3(0x80000000)
618 %8:gpr64common = ADRP target-flags(aarch64-page) @A
619 %9:gpr32 = LDRWui killed %8, target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
620 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
622 BL @use, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $w0, implicit-def $sp, implicit-def $w0
623 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
626 bb.2.for.cond.cleanup:
627 %1:gpr32all = PHI %6, %bb.0, %4, %bb.3
629 RET_ReallyLR implicit $w0
632 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
634 %2:gpr32sp = PHI %6, %bb.1, %5, %bb.3
635 %3:gpr32 = PHI %6, %bb.1, %4, %bb.3
636 %11:gpr32 = SDIVWr %3, %9
637 %4:gpr32all = COPY %11
638 %12:gpr32 = SUBSWri %2, 1, 0, implicit-def $nzcv
639 %5:gpr32all = COPY %12
640 Bcc 0, %bb.2, implicit $nzcv
645 name: load_not_safe_to_move_consecutive_call_use
647 exposesReturnsTwice: false
649 regBankSelected: false
652 tracksRegLiveness: true
655 - { id: 0, class: gpr32, preferred-register: '' }
656 - { id: 1, class: gpr32all, preferred-register: '' }
657 - { id: 2, class: gpr32sp, preferred-register: '' }
658 - { id: 3, class: gpr32, preferred-register: '' }
659 - { id: 4, class: gpr32all, preferred-register: '' }
660 - { id: 5, class: gpr32all, preferred-register: '' }
661 - { id: 6, class: gpr32common, preferred-register: '' }
662 - { id: 7, class: gpr32, preferred-register: '' }
663 - { id: 8, class: gpr64common, preferred-register: '' }
664 - { id: 9, class: gpr32, preferred-register: '' }
665 - { id: 10, class: gpr32all, preferred-register: '' }
666 - { id: 11, class: gpr32, preferred-register: '' }
667 - { id: 12, class: gpr32, preferred-register: '' }
669 - { reg: '$w0', virtual-reg: '%6' }
671 isFrameAddressTaken: false
672 isReturnAddressTaken: false
682 cvBytesOfCalleeSavedRegisters: 0
683 hasOpaqueSPAdjustment: false
685 hasMustTailInVarArgFunc: false
692 debugValueSubstitutions: []
694 machineFunctionInfo: {}
696 ; CHECK-LABEL: name: load_not_safe_to_move_consecutive_call_use
698 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
699 ; CHECK-NEXT: liveins: $w0
701 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w0
702 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
703 ; CHECK-NEXT: Bcc 11, %bb.2, implicit $nzcv
704 ; CHECK-NEXT: B %bb.1
706 ; CHECK-NEXT: bb.1.for.body.preheader:
707 ; CHECK-NEXT: successors: %bb.3(0x80000000)
709 ; CHECK-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @A
710 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
711 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
712 ; CHECK-NEXT: $w0 = COPY [[LDRWui]]
713 ; CHECK-NEXT: BL @use, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $w0, implicit-def $sp, implicit-def $w0
714 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
715 ; CHECK-NEXT: B %bb.3
717 ; CHECK-NEXT: bb.2.for.cond.cleanup:
718 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, %4, %bb.3
719 ; CHECK-NEXT: $w0 = COPY [[PHI]]
720 ; CHECK-NEXT: RET_ReallyLR implicit $w0
722 ; CHECK-NEXT: bb.3.for.body:
723 ; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.3(0x7c000000)
725 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %5, %bb.3
726 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.1, %4, %bb.3
727 ; CHECK-NEXT: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[PHI2]], [[LDRWui]]
728 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY [[SDIVWr]]
729 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI1]], 1, 0, implicit-def $nzcv
730 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
731 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
732 ; CHECK-NEXT: B %bb.3
734 successors: %bb.1(0x50000000), %bb.2(0x30000000)
737 %6:gpr32common = COPY $w0
738 %7:gpr32 = SUBSWri %6, 1, 0, implicit-def $nzcv
739 Bcc 11, %bb.2, implicit $nzcv
742 bb.1.for.body.preheader:
743 successors: %bb.3(0x80000000)
745 %8:gpr64common = ADRP target-flags(aarch64-page) @A
746 %9:gpr32 = LDRWui killed %8, target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
747 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
749 BL @use, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $w0, implicit-def $sp, implicit-def $w0
750 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
753 bb.2.for.cond.cleanup:
754 %1:gpr32all = PHI %6, %bb.0, %4, %bb.3
756 RET_ReallyLR implicit $w0
759 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
761 %2:gpr32sp = PHI %6, %bb.1, %5, %bb.3
762 %3:gpr32 = PHI %6, %bb.1, %4, %bb.3
763 %11:gpr32 = SDIVWr %3, %9
764 %4:gpr32all = COPY %11
765 %12:gpr32 = SUBSWri %2, 1, 0, implicit-def $nzcv
766 %5:gpr32all = COPY %12
767 Bcc 0, %bb.2, implicit $nzcv
772 name: cant_sink_use_outside_loop
774 exposesReturnsTwice: false
776 regBankSelected: false
779 tracksRegLiveness: true
782 - { id: 0, class: gpr32all, preferred-register: '' }
783 - { id: 1, class: gpr32all, preferred-register: '' }
784 - { id: 2, class: gpr32all, preferred-register: '' }
785 - { id: 3, class: gpr32sp, preferred-register: '' }
786 - { id: 4, class: gpr32all, preferred-register: '' }
787 - { id: 5, class: gpr32all, preferred-register: '' }
788 - { id: 6, class: gpr32all, preferred-register: '' }
789 - { id: 7, class: gpr32common, preferred-register: '' }
790 - { id: 8, class: gpr32all, preferred-register: '' }
791 - { id: 9, class: gpr32all, preferred-register: '' }
792 - { id: 10, class: gpr32, preferred-register: '' }
793 - { id: 11, class: gpr64common, preferred-register: '' }
794 - { id: 12, class: gpr32, preferred-register: '' }
795 - { id: 13, class: gpr32, preferred-register: '' }
796 - { id: 14, class: gpr32, preferred-register: '' }
797 - { id: 15, class: gpr32all, preferred-register: '' }
799 - { reg: '$w0', virtual-reg: '%7' }
801 isFrameAddressTaken: false
802 isReturnAddressTaken: false
812 cvBytesOfCalleeSavedRegisters: 0
813 hasOpaqueSPAdjustment: false
815 hasMustTailInVarArgFunc: false
822 debugValueSubstitutions: []
824 machineFunctionInfo: {}
826 ; CHECK-LABEL: name: cant_sink_use_outside_loop
828 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.4(0x30000000)
829 ; CHECK-NEXT: liveins: $w0
831 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w0
832 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
833 ; CHECK-NEXT: Bcc 10, %bb.1, implicit $nzcv
836 ; CHECK-NEXT: successors: %bb.2(0x80000000)
838 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY $wzr
839 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[COPY1]]
840 ; CHECK-NEXT: B %bb.2
842 ; CHECK-NEXT: bb.1.for.body.preheader:
843 ; CHECK-NEXT: successors: %bb.3(0x80000000)
845 ; CHECK-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @A
846 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
847 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY [[LDRWui]]
848 ; CHECK-NEXT: B %bb.3
850 ; CHECK-NEXT: bb.2.for.cond.cleanup:
851 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.4, %5, %bb.5
852 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32all = PHI [[COPY2]], %bb.4, [[COPY3]], %bb.5
853 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
854 ; CHECK-NEXT: $w0 = COPY [[PHI1]]
855 ; CHECK-NEXT: BL @use, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $w0, implicit-def $sp, implicit-def $w0
856 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
857 ; CHECK-NEXT: $w0 = COPY [[PHI]]
858 ; CHECK-NEXT: RET_ReallyLR implicit $w0
860 ; CHECK-NEXT: bb.3.for.body:
861 ; CHECK-NEXT: successors: %bb.5(0x04000000), %bb.3(0x7c000000)
863 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %6, %bb.3
864 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI2]], 1, 0, implicit-def $nzcv
865 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
866 ; CHECK-NEXT: Bcc 1, %bb.3, implicit $nzcv
869 ; CHECK-NEXT: successors: %bb.2(0x80000000)
871 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 1
872 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr32all = COPY [[MOVi32imm]]
873 ; CHECK-NEXT: B %bb.2
875 successors: %bb.1(0x50000000), %bb.2(0x30000000)
878 %7:gpr32common = COPY $w0
879 %9:gpr32all = COPY $wzr
880 %8:gpr32all = COPY %9
881 %10:gpr32 = SUBSWri %7, 1, 0, implicit-def $nzcv
882 Bcc 11, %bb.2, implicit $nzcv
885 bb.1.for.body.preheader:
886 successors: %bb.3(0x80000000)
888 %11:gpr64common = ADRP target-flags(aarch64-page) @A
889 %12:gpr32 = LDRWui killed %11, target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
890 %0:gpr32all = COPY %12
893 bb.2.for.cond.cleanup:
894 %1:gpr32all = PHI %7, %bb.0, %5, %bb.3
895 %2:gpr32all = PHI %8, %bb.0, %0, %bb.3
896 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
898 BL @use, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit $w0, implicit-def $sp, implicit-def $w0
899 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
901 RET_ReallyLR implicit $w0
904 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
906 %3:gpr32sp = PHI %7, %bb.1, %6, %bb.3
907 %13:gpr32 = MOVi32imm 1
908 %5:gpr32all = COPY %13
909 %14:gpr32 = SUBSWri %3, 1, 0, implicit-def $nzcv
910 %6:gpr32all = COPY %14
911 Bcc 0, %bb.2, implicit $nzcv
916 name: use_is_not_a_copy
918 exposesReturnsTwice: false
920 regBankSelected: false
923 tracksRegLiveness: true
926 - { id: 0, class: gpr32, preferred-register: '' }
927 - { id: 1, class: gpr32all, preferred-register: '' }
928 - { id: 2, class: gpr32sp, preferred-register: '' }
929 - { id: 3, class: gpr32, preferred-register: '' }
930 - { id: 4, class: gpr32all, preferred-register: '' }
931 - { id: 5, class: gpr32all, preferred-register: '' }
932 - { id: 6, class: gpr32common, preferred-register: '' }
933 - { id: 7, class: gpr32, preferred-register: '' }
934 - { id: 8, class: gpr64common, preferred-register: '' }
935 - { id: 9, class: gpr32, preferred-register: '' }
936 - { id: 10, class: gpr32, preferred-register: '' }
937 - { id: 11, class: gpr32, preferred-register: '' }
939 - { reg: '$w0', virtual-reg: '%6' }
941 isFrameAddressTaken: false
942 isReturnAddressTaken: false
952 cvBytesOfCalleeSavedRegisters: 0
953 hasOpaqueSPAdjustment: false
955 hasMustTailInVarArgFunc: false
962 debugValueSubstitutions: []
964 machineFunctionInfo: {}
966 ; CHECK-LABEL: name: use_is_not_a_copy
968 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
969 ; CHECK-NEXT: liveins: $w0
971 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w0
972 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
973 ; CHECK-NEXT: Bcc 11, %bb.2, implicit $nzcv
974 ; CHECK-NEXT: B %bb.1
976 ; CHECK-NEXT: bb.1.for.body.preheader:
977 ; CHECK-NEXT: successors: %bb.3(0x80000000)
979 ; CHECK-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @A
980 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
981 ; CHECK-NEXT: B %bb.3
983 ; CHECK-NEXT: bb.2.for.cond.cleanup:
984 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32all = PHI [[COPY]], %bb.0, %4, %bb.3
985 ; CHECK-NEXT: $w0 = COPY [[PHI]]
986 ; CHECK-NEXT: RET_ReallyLR implicit $w0
988 ; CHECK-NEXT: bb.3.for.body:
989 ; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.3(0x7c000000)
991 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %5, %bb.3
992 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.1, %4, %bb.3
993 ; CHECK-NEXT: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[PHI2]], [[LDRWui]]
994 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32all = COPY [[SDIVWr]]
995 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI1]], 1, 0, implicit-def $nzcv
996 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
997 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
998 ; CHECK-NEXT: B %bb.3
1000 successors: %bb.1(0x50000000), %bb.2(0x30000000)
1003 %6:gpr32common = COPY $w0
1004 %7:gpr32 = SUBSWri %6, 1, 0, implicit-def $nzcv
1005 Bcc 11, %bb.2, implicit $nzcv
1008 bb.1.for.body.preheader:
1009 successors: %bb.3(0x80000000)
1011 %8:gpr64common = ADRP target-flags(aarch64-page) @A
1012 %9:gpr32 = LDRWui killed %8, target-flags(aarch64-pageoff, aarch64-nc) @A :: (dereferenceable load (s32) from @A)
1015 bb.2.for.cond.cleanup:
1016 %1:gpr32all = PHI %6, %bb.0, %4, %bb.3
1018 RET_ReallyLR implicit $w0
1021 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1023 %2:gpr32sp = PHI %6, %bb.1, %5, %bb.3
1024 %3:gpr32 = PHI %6, %bb.1, %4, %bb.3
1025 %10:gpr32 = SDIVWr %3, %9
1026 %4:gpr32all = COPY %10
1027 %11:gpr32 = SUBSWri %2, 1, 0, implicit-def $nzcv
1028 %5:gpr32all = COPY %11
1029 Bcc 0, %bb.2, implicit $nzcv
1036 exposesReturnsTwice: false
1038 regBankSelected: false
1041 tracksRegLiveness: true
1044 - { id: 0, class: gpr32sp, preferred-register: '' }
1045 - { id: 1, class: gpr32all, preferred-register: '' }
1046 - { id: 2, class: gpr32, preferred-register: '' }
1047 - { id: 3, class: gpr32common, preferred-register: '' }
1048 - { id: 4, class: gpr32sp, preferred-register: '' }
1049 - { id: 5, class: gpr32, preferred-register: '' }
1050 - { id: 6, class: gpr32all, preferred-register: '' }
1051 - { id: 7, class: gpr32all, preferred-register: '' }
1052 - { id: 8, class: gpr32all, preferred-register: '' }
1053 - { id: 9, class: gpr64common, preferred-register: '' }
1054 - { id: 10, class: gpr64common, preferred-register: '' }
1055 - { id: 11, class: gpr32common, preferred-register: '' }
1056 - { id: 12, class: gpr32common, preferred-register: '' }
1057 - { id: 13, class: gpr32, preferred-register: '' }
1058 - { id: 14, class: gpr32sp, preferred-register: '' }
1059 - { id: 15, class: gpr32, preferred-register: '' }
1060 - { id: 16, class: gpr32, preferred-register: '' }
1061 - { id: 17, class: gpr32sp, preferred-register: '' }
1063 - { reg: '$x0', virtual-reg: '%9' }
1064 - { reg: '$x1', virtual-reg: '%10' }
1065 - { reg: '$w2', virtual-reg: '%11' }
1067 isFrameAddressTaken: false
1068 isReturnAddressTaken: false
1070 hasPatchPoint: false
1078 cvBytesOfCalleeSavedRegisters: 0
1079 hasOpaqueSPAdjustment: false
1081 hasMustTailInVarArgFunc: false
1088 debugValueSubstitutions: []
1090 machineFunctionInfo: {}
1092 ; CHECK-LABEL: name: sink_add
1093 ; CHECK: bb.0.entry:
1094 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
1095 ; CHECK-NEXT: liveins: $x0, $x1, $w2
1096 ; CHECK-NEXT: {{ $}}
1097 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w2
1098 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x1
1099 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY $x0
1100 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
1101 ; CHECK-NEXT: Bcc 11, %bb.2, implicit $nzcv
1102 ; CHECK-NEXT: B %bb.1
1103 ; CHECK-NEXT: {{ $}}
1104 ; CHECK-NEXT: bb.1.for.body.preheader:
1105 ; CHECK-NEXT: successors: %bb.3(0x80000000)
1106 ; CHECK-NEXT: {{ $}}
1107 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32common = LDRWui [[COPY2]], 0 :: (load (s32) from %ir.read, !tbaa !0)
1108 ; CHECK-NEXT: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[LDRWui]], 42, 0
1109 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr32all = COPY [[ADDWri]]
1110 ; CHECK-NEXT: B %bb.3
1111 ; CHECK-NEXT: {{ $}}
1112 ; CHECK-NEXT: bb.2.for.cond.cleanup:
1113 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.0, %6, %bb.3
1114 ; CHECK-NEXT: STRWui [[PHI]], [[COPY1]], 0 :: (store (s32) into %ir.write, !tbaa !0)
1115 ; CHECK-NEXT: RET_ReallyLR
1116 ; CHECK-NEXT: {{ $}}
1117 ; CHECK-NEXT: bb.3.for.body:
1118 ; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1119 ; CHECK-NEXT: {{ $}}
1120 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32common = PHI [[COPY3]], %bb.1, %8, %bb.3
1121 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %7, %bb.3
1122 ; CHECK-NEXT: [[PHI3:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.1, %6, %bb.3
1123 ; CHECK-NEXT: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[PHI3]], [[PHI1]]
1124 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY [[SDIVWr]]
1125 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI2]], 1, 0, implicit-def $nzcv
1126 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
1127 ; CHECK-NEXT: [[ADDWri1:%[0-9]+]]:gpr32sp = ADDWri [[PHI1]], 1, 0
1128 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr32all = COPY [[ADDWri1]]
1129 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
1130 ; CHECK-NEXT: B %bb.3
1132 successors: %bb.1(0x50000000), %bb.2(0x30000000)
1133 liveins: $x0, $x1, $w2
1135 %11:gpr32common = COPY $w2
1136 %10:gpr64common = COPY $x1
1137 %9:gpr64common = COPY $x0
1138 %12:gpr32common = LDRWui %9, 0 :: (load (s32) from %ir.read, !tbaa !0)
1139 %13:gpr32 = SUBSWri %11, 1, 0, implicit-def $nzcv
1140 Bcc 11, %bb.2, implicit $nzcv
1143 bb.1.for.body.preheader:
1144 successors: %bb.3(0x80000000)
1146 %14:gpr32sp = ADDWri %12, 42, 0
1147 %1:gpr32all = COPY %14
1150 bb.2.for.cond.cleanup:
1151 %2:gpr32 = PHI %11, %bb.0, %6, %bb.3
1152 STRWui %2, %10, 0 :: (store (s32) into %ir.write, !tbaa !0)
1156 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1158 %3:gpr32common = PHI %1, %bb.1, %8, %bb.3
1159 %4:gpr32sp = PHI %11, %bb.1, %7, %bb.3
1160 %5:gpr32 = PHI %11, %bb.1, %6, %bb.3
1161 %15:gpr32 = SDIVWr %5, %3
1162 %6:gpr32all = COPY %15
1163 %16:gpr32 = SUBSWri %4, 1, 0, implicit-def $nzcv
1164 %7:gpr32all = COPY %16
1165 %17:gpr32sp = ADDWri %3, 1, 0
1166 %8:gpr32all = COPY %17
1167 Bcc 0, %bb.2, implicit $nzcv
1172 name: store_after_add
1174 exposesReturnsTwice: false
1176 regBankSelected: false
1179 tracksRegLiveness: true
1182 - { id: 0, class: gpr32sp, preferred-register: '' }
1183 - { id: 1, class: gpr32all, preferred-register: '' }
1184 - { id: 2, class: gpr32, preferred-register: '' }
1185 - { id: 3, class: gpr32common, preferred-register: '' }
1186 - { id: 4, class: gpr32sp, preferred-register: '' }
1187 - { id: 5, class: gpr32, preferred-register: '' }
1188 - { id: 6, class: gpr32all, preferred-register: '' }
1189 - { id: 7, class: gpr32all, preferred-register: '' }
1190 - { id: 8, class: gpr32all, preferred-register: '' }
1191 - { id: 9, class: gpr64common, preferred-register: '' }
1192 - { id: 10, class: gpr64common, preferred-register: '' }
1193 - { id: 11, class: gpr64common, preferred-register: '' }
1194 - { id: 12, class: gpr32common, preferred-register: '' }
1195 - { id: 13, class: gpr32common, preferred-register: '' }
1196 - { id: 14, class: gpr32, preferred-register: '' }
1197 - { id: 15, class: gpr32, preferred-register: '' }
1198 - { id: 16, class: gpr32sp, preferred-register: '' }
1199 - { id: 17, class: gpr32, preferred-register: '' }
1200 - { id: 18, class: gpr32, preferred-register: '' }
1201 - { id: 19, class: gpr32sp, preferred-register: '' }
1203 - { reg: '$x0', virtual-reg: '%9' }
1204 - { reg: '$x1', virtual-reg: '%10' }
1205 - { reg: '$x2', virtual-reg: '%11' }
1206 - { reg: '$w3', virtual-reg: '%12' }
1208 isFrameAddressTaken: false
1209 isReturnAddressTaken: false
1211 hasPatchPoint: false
1219 cvBytesOfCalleeSavedRegisters: 0
1220 hasOpaqueSPAdjustment: false
1222 hasMustTailInVarArgFunc: false
1229 debugValueSubstitutions: []
1231 machineFunctionInfo: {}
1233 ; CHECK-LABEL: name: store_after_add
1234 ; CHECK: bb.0.entry:
1235 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
1236 ; CHECK-NEXT: liveins: $x0, $x1, $x2, $w3
1237 ; CHECK-NEXT: {{ $}}
1238 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w3
1239 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x2
1240 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY $x1
1241 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY $x0
1242 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
1243 ; CHECK-NEXT: Bcc 11, %bb.2, implicit $nzcv
1244 ; CHECK-NEXT: B %bb.1
1245 ; CHECK-NEXT: {{ $}}
1246 ; CHECK-NEXT: bb.1.for.body.preheader:
1247 ; CHECK-NEXT: successors: %bb.3(0x80000000)
1248 ; CHECK-NEXT: {{ $}}
1249 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32common = LDRWui [[COPY3]], 0 :: (load (s32) from %ir.read, !tbaa !0)
1250 ; CHECK-NEXT: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[LDRWui]], 42, 0
1251 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY [[ADDWri]]
1252 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 43
1253 ; CHECK-NEXT: STRWui killed [[MOVi32imm]], [[COPY1]], 0 :: (store (s32) into %ir.store, !tbaa !0)
1254 ; CHECK-NEXT: B %bb.3
1255 ; CHECK-NEXT: {{ $}}
1256 ; CHECK-NEXT: bb.2.for.cond.cleanup:
1257 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.0, %6, %bb.3
1258 ; CHECK-NEXT: STRWui [[PHI]], [[COPY2]], 0 :: (store (s32) into %ir.write, !tbaa !0)
1259 ; CHECK-NEXT: RET_ReallyLR
1260 ; CHECK-NEXT: {{ $}}
1261 ; CHECK-NEXT: bb.3.for.body:
1262 ; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1263 ; CHECK-NEXT: {{ $}}
1264 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32common = PHI [[COPY4]], %bb.1, %8, %bb.3
1265 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %7, %bb.3
1266 ; CHECK-NEXT: [[PHI3:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.1, %6, %bb.3
1267 ; CHECK-NEXT: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[PHI3]], [[PHI1]]
1268 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr32all = COPY [[SDIVWr]]
1269 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI2]], 1, 0, implicit-def $nzcv
1270 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
1271 ; CHECK-NEXT: [[ADDWri1:%[0-9]+]]:gpr32sp = ADDWri [[PHI1]], 1, 0
1272 ; CHECK-NEXT: [[COPY7:%[0-9]+]]:gpr32all = COPY [[ADDWri1]]
1273 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
1274 ; CHECK-NEXT: B %bb.3
1276 successors: %bb.1(0x50000000), %bb.2(0x30000000)
1277 liveins: $x0, $x1, $x2, $w3
1279 %12:gpr32common = COPY $w3
1280 %11:gpr64common = COPY $x2
1281 %10:gpr64common = COPY $x1
1282 %9:gpr64common = COPY $x0
1283 %13:gpr32common = LDRWui %9, 0 :: (load (s32) from %ir.read, !tbaa !0)
1284 %15:gpr32 = SUBSWri %12, 1, 0, implicit-def $nzcv
1285 Bcc 11, %bb.2, implicit $nzcv
1288 bb.1.for.body.preheader:
1289 successors: %bb.3(0x80000000)
1291 %16:gpr32sp = ADDWri %13, 42, 0
1292 %1:gpr32all = COPY %16
1293 %14:gpr32 = MOVi32imm 43
1294 STRWui killed %14, %11, 0 :: (store (s32) into %ir.store, !tbaa !0)
1297 bb.2.for.cond.cleanup:
1298 %2:gpr32 = PHI %12, %bb.0, %6, %bb.3
1299 STRWui %2, %10, 0 :: (store (s32) into %ir.write, !tbaa !0)
1303 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1305 %3:gpr32common = PHI %1, %bb.1, %8, %bb.3
1306 %4:gpr32sp = PHI %12, %bb.1, %7, %bb.3
1307 %5:gpr32 = PHI %12, %bb.1, %6, %bb.3
1308 %17:gpr32 = SDIVWr %5, %3
1309 %6:gpr32all = COPY %17
1310 %18:gpr32 = SUBSWri %4, 1, 0, implicit-def $nzcv
1311 %7:gpr32all = COPY %18
1312 %19:gpr32sp = ADDWri %3, 1, 0
1313 %8:gpr32all = COPY %19
1314 Bcc 0, %bb.2, implicit $nzcv
1319 name: aliased_store_after_add
1321 exposesReturnsTwice: false
1323 regBankSelected: false
1326 tracksRegLiveness: true
1329 - { id: 0, class: gpr32sp, preferred-register: '' }
1330 - { id: 1, class: gpr32all, preferred-register: '' }
1331 - { id: 2, class: gpr32, preferred-register: '' }
1332 - { id: 3, class: gpr32common, preferred-register: '' }
1333 - { id: 4, class: gpr32sp, preferred-register: '' }
1334 - { id: 5, class: gpr32, preferred-register: '' }
1335 - { id: 6, class: gpr32all, preferred-register: '' }
1336 - { id: 7, class: gpr32all, preferred-register: '' }
1337 - { id: 8, class: gpr32all, preferred-register: '' }
1338 - { id: 9, class: gpr64common, preferred-register: '' }
1339 - { id: 10, class: gpr64common, preferred-register: '' }
1340 - { id: 11, class: gpr64common, preferred-register: '' }
1341 - { id: 12, class: gpr32common, preferred-register: '' }
1342 - { id: 13, class: gpr32common, preferred-register: '' }
1343 - { id: 14, class: gpr32, preferred-register: '' }
1344 - { id: 15, class: gpr32, preferred-register: '' }
1345 - { id: 16, class: gpr32sp, preferred-register: '' }
1346 - { id: 17, class: gpr32, preferred-register: '' }
1347 - { id: 18, class: gpr32, preferred-register: '' }
1348 - { id: 19, class: gpr32sp, preferred-register: '' }
1350 - { reg: '$x0', virtual-reg: '%9' }
1351 - { reg: '$x1', virtual-reg: '%10' }
1352 - { reg: '$x2', virtual-reg: '%11' }
1353 - { reg: '$w3', virtual-reg: '%12' }
1355 isFrameAddressTaken: false
1356 isReturnAddressTaken: false
1358 hasPatchPoint: false
1366 cvBytesOfCalleeSavedRegisters: 0
1367 hasOpaqueSPAdjustment: false
1369 hasMustTailInVarArgFunc: false
1376 debugValueSubstitutions: []
1378 machineFunctionInfo: {}
1380 ; CHECK-LABEL: name: aliased_store_after_add
1381 ; CHECK: bb.0.entry:
1382 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
1383 ; CHECK-NEXT: liveins: $x0, $x1, $x2, $w3
1384 ; CHECK-NEXT: {{ $}}
1385 ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32common = COPY $w3
1386 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x2
1387 ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY $x1
1388 ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY $x0
1389 ; CHECK-NEXT: [[SUBSWri:%[0-9]+]]:gpr32 = SUBSWri [[COPY]], 1, 0, implicit-def $nzcv
1390 ; CHECK-NEXT: Bcc 11, %bb.2, implicit $nzcv
1391 ; CHECK-NEXT: B %bb.1
1392 ; CHECK-NEXT: {{ $}}
1393 ; CHECK-NEXT: bb.1.for.body.preheader:
1394 ; CHECK-NEXT: successors: %bb.3(0x80000000)
1395 ; CHECK-NEXT: {{ $}}
1396 ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32common = LDRWui [[COPY3]], 0 :: (load (s32) from %ir.read, !tbaa !0)
1397 ; CHECK-NEXT: [[ADDWri:%[0-9]+]]:gpr32sp = ADDWri [[LDRWui]], 42, 0
1398 ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gpr32all = COPY [[ADDWri]]
1399 ; CHECK-NEXT: [[MOVi32imm:%[0-9]+]]:gpr32 = MOVi32imm 43
1400 ; CHECK-NEXT: STRWui killed [[MOVi32imm]], [[COPY3]], 0 :: (store (s32) into %ir.read, !tbaa !0)
1401 ; CHECK-NEXT: B %bb.3
1402 ; CHECK-NEXT: {{ $}}
1403 ; CHECK-NEXT: bb.2.for.cond.cleanup:
1404 ; CHECK-NEXT: [[PHI:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.0, %6, %bb.3
1405 ; CHECK-NEXT: STRWui [[PHI]], [[COPY2]], 0 :: (store (s32) into %ir.write, !tbaa !0)
1406 ; CHECK-NEXT: RET_ReallyLR
1407 ; CHECK-NEXT: {{ $}}
1408 ; CHECK-NEXT: bb.3.for.body:
1409 ; CHECK-NEXT: successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1410 ; CHECK-NEXT: {{ $}}
1411 ; CHECK-NEXT: [[PHI1:%[0-9]+]]:gpr32common = PHI [[COPY4]], %bb.1, %8, %bb.3
1412 ; CHECK-NEXT: [[PHI2:%[0-9]+]]:gpr32sp = PHI [[COPY]], %bb.1, %7, %bb.3
1413 ; CHECK-NEXT: [[PHI3:%[0-9]+]]:gpr32 = PHI [[COPY]], %bb.1, %6, %bb.3
1414 ; CHECK-NEXT: [[SDIVWr:%[0-9]+]]:gpr32 = SDIVWr [[PHI3]], [[PHI1]]
1415 ; CHECK-NEXT: [[COPY5:%[0-9]+]]:gpr32all = COPY [[SDIVWr]]
1416 ; CHECK-NEXT: [[SUBSWri1:%[0-9]+]]:gpr32 = SUBSWri [[PHI2]], 1, 0, implicit-def $nzcv
1417 ; CHECK-NEXT: [[COPY6:%[0-9]+]]:gpr32all = COPY [[SUBSWri1]]
1418 ; CHECK-NEXT: [[ADDWri1:%[0-9]+]]:gpr32sp = ADDWri [[PHI1]], 1, 0
1419 ; CHECK-NEXT: [[COPY7:%[0-9]+]]:gpr32all = COPY [[ADDWri1]]
1420 ; CHECK-NEXT: Bcc 0, %bb.2, implicit $nzcv
1421 ; CHECK-NEXT: B %bb.3
1423 successors: %bb.1(0x50000000), %bb.2(0x30000000)
1424 liveins: $x0, $x1, $x2, $w3
1426 %12:gpr32common = COPY $w3
1427 %11:gpr64common = COPY $x2
1428 %10:gpr64common = COPY $x1
1429 %9:gpr64common = COPY $x0
1430 %13:gpr32common = LDRWui %9, 0 :: (load (s32) from %ir.read, !tbaa !0)
1431 %15:gpr32 = SUBSWri %12, 1, 0, implicit-def $nzcv
1432 Bcc 11, %bb.2, implicit $nzcv
1435 bb.1.for.body.preheader:
1436 successors: %bb.3(0x80000000)
1438 %16:gpr32sp = ADDWri %13, 42, 0
1439 %1:gpr32all = COPY %16
1440 %14:gpr32 = MOVi32imm 43
1441 STRWui killed %14, %9, 0 :: (store (s32) into %ir.read, !tbaa !0)
1444 bb.2.for.cond.cleanup:
1445 %2:gpr32 = PHI %12, %bb.0, %6, %bb.3
1446 STRWui %2, %10, 0 :: (store (s32) into %ir.write, !tbaa !0)
1450 successors: %bb.2(0x04000000), %bb.3(0x7c000000)
1452 %3:gpr32common = PHI %1, %bb.1, %8, %bb.3
1453 %4:gpr32sp = PHI %12, %bb.1, %7, %bb.3
1454 %5:gpr32 = PHI %12, %bb.1, %6, %bb.3
1455 %17:gpr32 = SDIVWr %5, %3
1456 %6:gpr32all = COPY %17
1457 %18:gpr32 = SUBSWri %4, 1, 0, implicit-def $nzcv
1458 %7:gpr32all = COPY %18
1459 %19:gpr32sp = ADDWri %3, 1, 0
1460 %8:gpr32all = COPY %19
1461 Bcc 0, %bb.2, implicit $nzcv