machine-outliner-no-lr-save.mir
4.27 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=arm-- -run-pass=machine-outliner -verify-machineinstrs \
# RUN: %s -o - | FileCheck %s
--- |
define void @outline_no_save_ok_arm() #0 { ret void }
define void @outline_no_save_ko_arm() #0 { ret void }
define void @outline_no_save_ok_thumb() #1 { ret void }
define void @outline_no_save_ko_thumb() #1 { ret void }
declare void @foo()
attributes #0 = { minsize optsize }
attributes #1 = { minsize optsize "target-features"="+armv7-a,+thumb-mode" }
...
---
name: outline_no_save_ok_arm
tracksRegLiveness: true
body: |
; CHECK-LABEL: name: outline_no_save_ok_arm
; CHECK: bb.0:
; CHECK: BL @OUTLINED_FUNCTION_1
; CHECK: bb.1:
; CHECK: BL @OUTLINED_FUNCTION_1
; CHECK: bb.2:
; CHECK: BX_RET 14 /* CC::al */, $noreg
bb.0:
$r2 = MOVi 1, 14, $noreg, $noreg
$r2 = MOVi 1, 14, $noreg, $noreg
$r2 = MOVi 1, 14, $noreg, $noreg
$r2 = MOVi 1, 14, $noreg, $noreg
$r3 = LDRi12 $sp, 8, 14, $noreg
bb.1:
$r2 = MOVi 1, 14, $noreg, $noreg
$r2 = MOVi 1, 14, $noreg, $noreg
$r2 = MOVi 1, 14, $noreg, $noreg
$r2 = MOVi 1, 14, $noreg, $noreg
$r3 = LDRi12 $sp, 8, 14, $noreg
bb.2:
BX_RET 14, $noreg
...
---
name: outline_no_save_ko_arm
tracksRegLiveness: true
body: |
; CHECK-LABEL: name: outline_no_save_ko_arm
; CHECK-NOT: OUTLINED_FUNCTION
bb.0:
liveins: $lr
$r2 = MOVi 2, 14, $noreg, $noreg
$r2 = MOVi 2, 14, $noreg, $noreg
$r2 = MOVi 2, 14, $noreg, $noreg
$r2 = MOVi 2, 14, $noreg, $noreg
$r3 = LDRi12 $sp, 8, 14, $noreg
$r2 = MOVr $lr, 14, $noreg, $noreg
bb.1:
$r2 = MOVi 2, 14, $noreg, $noreg
$r2 = MOVi 2, 14, $noreg, $noreg
$r2 = MOVi 2, 14, $noreg, $noreg
$r2 = MOVi 2, 14, $noreg, $noreg
$r3 = LDRi12 $sp, 8, 14, $noreg
$r4 = MOVi 4, 14, $noreg, $noreg
BL @foo
bb.2:
liveins: $lr
BX_RET 14, $noreg
...
---
name: outline_no_save_ok_thumb
tracksRegLiveness: true
body: |
; CHECK-LABEL: name: outline_no_save_ok_thumb
; CHECK: bb.0:
; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
; CHECK: bb.1:
; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
; CHECK: bb.2:
; CHECK: tBX_RET 14 /* CC::al */, $noreg
bb.0:
$r2 = t2MOVi 1, 14, $noreg, $noreg
$r2 = t2MOVi 1, 14, $noreg, $noreg
$r2 = t2MOVi 1, 14, $noreg, $noreg
$r2 = t2MOVi 1, 14, $noreg, $noreg
t2STRi12 $r2, $sp, 0, 14, $noreg
bb.1:
$r2 = t2MOVi 1, 14, $noreg, $noreg
$r2 = t2MOVi 1, 14, $noreg, $noreg
$r2 = t2MOVi 1, 14, $noreg, $noreg
$r2 = t2MOVi 1, 14, $noreg, $noreg
t2STRi12 $r2, $sp, 0, 14, $noreg
bb.2:
tBX_RET 14, $noreg
...
---
name: outline_no_save_ko_thumb
tracksRegLiveness: true
body: |
; CHECK-LABEL: name: outline_no_save_ko_thumb
; CHECK-NOT: OUTLINED_FUNCTION
bb.0:
liveins: $lr
$r2 = t2MOVi 2, 14, $noreg, $noreg
$r2 = t2MOVi 2, 14, $noreg, $noreg
$r2 = t2MOVi 2, 14, $noreg, $noreg
$r2 = t2MOVi 2, 14, $noreg, $noreg
t2STRi12 $r2, $sp, 0, 14, $noreg
$r2 = tMOVr $lr, 14, $noreg
bb.1:
$r2 = t2MOVi 2, 14, $noreg, $noreg
$r2 = t2MOVi 2, 14, $noreg, $noreg
$r2 = t2MOVi 2, 14, $noreg, $noreg
$r2 = t2MOVi 2, 14, $noreg, $noreg
t2STRi12 $r2, $sp, 0, 14, $noreg
$r4 = t2MOVi 3, 14, $noreg, $noreg
tBL 14, $noreg, @foo
bb.2:
liveins: $lr, $r0, $r6, $r7, $r8, $r9, $r10, $r11
tBX_RET 14, $noreg
; CHECK-LABEL: name: OUTLINED_FUNCTION_0
; CHECK: bb.0:
; CHECK: $r2 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r2 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r2 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r2 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: t2STRi12 $r2, $sp, 0, 14 /* CC::al */, $noreg
; CHECK: tBX_RET 14 /* CC::al */, $noreg
; CHECK-LABEL: name: OUTLINED_FUNCTION_1
; CHECK: bb.0:
; CHECK: $r2 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r2 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r2 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r2 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
; CHECK: $r3 = LDRi12 $sp, 8, 14 /* CC::al */, $noreg
; CHECK: MOVPCLR 14 /* CC::al */, $noreg