cfi-same-value.mir
2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# RUN: llc -mtriple=arm-linux-unknown-gnueabi -run-pass none -o - %s | FileCheck %s
--- |
declare void @dummy_use(i32*, i32)
define void @test_basic() #0 {
entry:
%mem = alloca i32, i32 10
call void @dummy_use(i32* %mem, i32 10)
ret void
}
attributes #0 = { "split-stack" }
...
---
name: test_basic
tracksRegLiveness: true
frameInfo:
stackSize: 48
maxAlignment: 4
adjustsStack: true
hasCalls: true
stack:
- { id: 0, name: mem, offset: -48, size: 40, alignment: 4 }
- { id: 1, type: spill-slot, offset: -4, size: 4, alignment: 4,
callee-saved-register: '$lr' }
- { id: 2, type: spill-slot, offset: -8, size: 4, alignment: 4,
callee-saved-register: '$r11' }
body: |
bb.0:
successors: %bb.2, %bb.1
liveins: $r11, $lr
$sp = STMDB_UPD $sp, 14, _, $r4, $r5
CFI_INSTRUCTION def_cfa_offset 8
CFI_INSTRUCTION offset $r5, -4
CFI_INSTRUCTION offset $r4, -8
$r5 = MOVr $sp, 14, _, _
$r4 = MRC 15, 0, 13, 0, 3, 14, _
$r4 = LDRi12 $r4, 4, 14, _
CMPrr $r4, $r5, 14, _, implicit-def $cpsr
Bcc %bb.2, 3, $cpsr
bb.1:
successors: %bb.2
liveins: $r11, $lr
$r4 = MOVi 48, 14, _, _
$r5 = MOVi 0, 14, _, _
$sp = STMDB_UPD $sp, 14, _, $lr
CFI_INSTRUCTION def_cfa_offset 12
CFI_INSTRUCTION offset $lr, -12
BL &__morestack, implicit-def $lr, implicit $sp
$sp = LDMIA_UPD $sp, 14, _, $lr
$sp = LDMIA_UPD $sp, 14, _, $r4, $r5
CFI_INSTRUCTION def_cfa_offset 0
BX_RET 14, _
bb.2:
liveins: $r11, $lr
$sp = LDMIA_UPD $sp, 14, _, $r4, $r5
CFI_INSTRUCTION def_cfa_offset 0
; CHECK: CFI_INSTRUCTION same_value $r4
; CHECK-NEXT: CFI_INSTRUCTION same_value $r5
CFI_INSTRUCTION same_value $r4
CFI_INSTRUCTION same_value $r5
$sp = frame-setup STMDB_UPD $sp, 14, _, killed $r11, killed $lr
frame-setup CFI_INSTRUCTION def_cfa_offset 8
frame-setup CFI_INSTRUCTION offset $lr, -4
frame-setup CFI_INSTRUCTION offset $r11, -8
$sp = frame-setup SUBri killed $sp, 40, 14, _, _
frame-setup CFI_INSTRUCTION def_cfa_offset 48
$r0 = MOVr $sp, 14, _, _
$r1 = MOVi 10, 14, _, _
BL @dummy_use, csr_aapcs, implicit-def dead $lr, implicit $sp, implicit $r0, implicit killed $r1, implicit-def $sp
$sp = ADDri killed $sp, 40, 14, _, _
$sp = LDMIA_UPD $sp, 14, _, $r4, $r5
MOVPCLR 14, _
...