1 # RUN: llc -mtriple=arm-linux-unknown-gnueabi -run-pass none -o - %s | FileCheck %s
4 declare void @dummy_use(i32*, i32)
6 define void @test_basic() #0 {
8 %mem = alloca i32, i32 10
9 call void @dummy_use(i32* %mem, i32 10)
13 attributes #0 = { "split-stack" }
17 tracksRegLiveness: true
24 - { id: 0, name: mem, offset: -48, size: 40, alignment: 4 }
25 - { id: 1, type: spill-slot, offset: -4, size: 4, alignment: 4,
26 callee-saved-register: '$lr' }
27 - { id: 2, type: spill-slot, offset: -8, size: 4, alignment: 4,
28 callee-saved-register: '$r11' }
31 successors: %bb.2, %bb.1
34 $sp = STMDB_UPD $sp, 14, _, $r4, $r5
35 CFI_INSTRUCTION def_cfa_offset 8
36 CFI_INSTRUCTION offset $r5, -4
37 CFI_INSTRUCTION offset $r4, -8
38 $r5 = MOVr $sp, 14, _, _
39 $r4 = MRC 15, 0, 13, 0, 3, 14, _
40 $r4 = LDRi12 $r4, 4, 14, _
41 CMPrr $r4, $r5, 14, _, implicit-def $cpsr
48 $r4 = MOVi 48, 14, _, _
49 $r5 = MOVi 0, 14, _, _
50 $sp = STMDB_UPD $sp, 14, _, $lr
51 CFI_INSTRUCTION def_cfa_offset 12
52 CFI_INSTRUCTION offset $lr, -12
53 BL &__morestack, implicit-def $lr, implicit $sp
54 $sp = LDMIA_UPD $sp, 14, _, $lr
55 $sp = LDMIA_UPD $sp, 14, _, $r4, $r5
56 CFI_INSTRUCTION def_cfa_offset 0
62 $sp = LDMIA_UPD $sp, 14, _, $r4, $r5
63 CFI_INSTRUCTION def_cfa_offset 0
64 ; CHECK: CFI_INSTRUCTION same_value $r4
65 ; CHECK-NEXT: CFI_INSTRUCTION same_value $r5
66 CFI_INSTRUCTION same_value $r4
67 CFI_INSTRUCTION same_value $r5
68 $sp = frame-setup STMDB_UPD $sp, 14, _, killed $r11, killed $lr
69 frame-setup CFI_INSTRUCTION def_cfa_offset 8
70 frame-setup CFI_INSTRUCTION offset $lr, -4
71 frame-setup CFI_INSTRUCTION offset $r11, -8
72 $sp = frame-setup SUBri killed $sp, 40, 14, _, _
73 frame-setup CFI_INSTRUCTION def_cfa_offset 48
74 $r0 = MOVr $sp, 14, _, _
75 $r1 = MOVi 10, 14, _, _
76 BL @dummy_use, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0, implicit killed $r1, implicit-def $sp
77 $sp = ADDri killed $sp, 40, 14, _, _
78 $sp = LDMIA_UPD $sp, 14, _, $r4, $r5