1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=arm-- -run-pass=machine-outliner -verify-machineinstrs \
3 # RUN: %s -o - | FileCheck %s
6 define void @outline_save_reg_arm() #0 { ret void }
7 define void @outline_save_reg_thumb() #1 { ret void }
10 attributes #0 = { minsize optsize }
11 attributes #1 = { minsize optsize "target-features"="+armv7-a,+thumb-mode" }
15 name: outline_save_reg_arm
16 tracksRegLiveness: true
18 ; CHECK-LABEL: name: outline_save_reg_arm
21 ; CHECK: $r6 = MOVr killed $lr, 14 /* CC::al */, $noreg, $noreg
22 ; CHECK: BL @OUTLINED_FUNCTION_1
23 ; CHECK: $lr = MOVr killed $r6, 14 /* CC::al */, $noreg, $noreg
26 ; CHECK: $r6 = MOVr killed $lr, 14 /* CC::al */, $noreg, $noreg
27 ; CHECK: BL @OUTLINED_FUNCTION_1
28 ; CHECK: $lr = MOVr killed $r6, 14 /* CC::al */, $noreg, $noreg
31 ; CHECK: early-clobber $sp = frame-setup STR_PRE_IMM killed $lr, $sp, -8, 14 /* CC::al */, $noreg
32 ; CHECK: BL @OUTLINED_FUNCTION_1
33 ; CHECK: $lr, $sp = frame-destroy LDR_POST_IMM $sp, $noreg, 8, 14 /* CC::al */, $noreg
35 ; CHECK: liveins: $lr, $r0, $r6, $r7, $r8, $r9, $r10, $r11
36 ; CHECK: $r6 = MOVr killed $lr, 14 /* CC::al */, $noreg, $noreg
37 ; CHECK: BL @OUTLINED_FUNCTION_1
38 ; CHECK: $lr = MOVr killed $r6, 14 /* CC::al */, $noreg, $noreg
41 ; CHECK: $r2 = MOVr $lr, 14 /* CC::al */, $noreg, $noreg
42 ; CHECK: BX_RET 14 /* CC::al */, $noreg
45 $r0 = MOVi 1, 14, $noreg, $noreg
46 $r1 = MOVi 1, 14, $noreg, $noreg
47 $r2 = MOVi 1, 14, $noreg, $noreg
48 $r3 = MOVi 1, 14, $noreg, $noreg
49 $r4 = MOVi 1, 14, $noreg, $noreg
50 $r5 = MOVi 1, 14, $noreg, $noreg
53 $r0 = MOVi 1, 14, $noreg, $noreg
54 $r1 = MOVi 1, 14, $noreg, $noreg
55 $r2 = MOVi 1, 14, $noreg, $noreg
56 $r3 = MOVi 1, 14, $noreg, $noreg
57 $r4 = MOVi 1, 14, $noreg, $noreg
58 $r5 = MOVi 1, 14, $noreg, $noreg
61 $r0 = MOVi 1, 14, $noreg, $noreg
62 $r1 = MOVi 1, 14, $noreg, $noreg
63 $r2 = MOVi 1, 14, $noreg, $noreg
64 $r3 = MOVi 1, 14, $noreg, $noreg
65 $r4 = MOVi 1, 14, $noreg, $noreg
66 $r5 = MOVi 1, 14, $noreg, $noreg
68 liveins: $lr, $r0, $r6, $r7, $r8, $r9, $r10, $r11
69 $r0 = MOVi 1, 14, $noreg, $noreg
70 $r1 = MOVi 1, 14, $noreg, $noreg
71 $r2 = MOVi 1, 14, $noreg, $noreg
72 $r3 = MOVi 1, 14, $noreg, $noreg
73 $r4 = MOVi 1, 14, $noreg, $noreg
74 $r5 = MOVi 1, 14, $noreg, $noreg
77 $r2 = MOVr $lr, 14, $noreg, $noreg
82 name: outline_save_reg_thumb
83 tracksRegLiveness: true
85 ; CHECK-LABEL: name: outline_save_reg_thumb
88 ; CHECK: $r6 = tMOVr killed $lr, 14 /* CC::al */, $noreg
89 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
90 ; CHECK: $lr = tMOVr killed $r6, 14 /* CC::al */, $noreg
93 ; CHECK: $r6 = tMOVr killed $lr, 14 /* CC::al */, $noreg
94 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
95 ; CHECK: $lr = tMOVr killed $r6, 14 /* CC::al */, $noreg
98 ; CHECK: early-clobber $sp = frame-setup t2STR_PRE killed $lr, $sp, -8, 14 /* CC::al */, $noreg
99 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
100 ; CHECK: $lr, $sp = frame-destroy t2LDR_POST $sp, 8, 14 /* CC::al */, $noreg
102 ; CHECK: liveins: $lr, $r0, $r6, $r7
103 ; CHECK: $r6 = tMOVr killed $lr, 14 /* CC::al */, $noreg
104 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
105 ; CHECK: $lr = tMOVr killed $r6, 14 /* CC::al */, $noreg
107 ; CHECK: liveins: $lr
108 ; CHECK: $r2 = tMOVr $lr, 14 /* CC::al */, $noreg
109 ; CHECK: tBX_RET 14 /* CC::al */, $noreg
112 $r0 = t2MOVi 1, 14, $noreg, $noreg
113 $r1 = t2MOVi 1, 14, $noreg, $noreg
114 $r2 = t2MOVi 1, 14, $noreg, $noreg
115 $r3 = t2MOVi 1, 14, $noreg, $noreg
116 $r4 = t2MOVi 1, 14, $noreg, $noreg
117 $r5 = t2MOVi 1, 14, $noreg, $noreg
120 $r0 = t2MOVi 1, 14, $noreg, $noreg
121 $r1 = t2MOVi 1, 14, $noreg, $noreg
122 $r2 = t2MOVi 1, 14, $noreg, $noreg
123 $r3 = t2MOVi 1, 14, $noreg, $noreg
124 $r4 = t2MOVi 1, 14, $noreg, $noreg
125 $r5 = t2MOVi 1, 14, $noreg, $noreg
128 $r0 = t2MOVi 1, 14, $noreg, $noreg
129 $r1 = t2MOVi 1, 14, $noreg, $noreg
130 $r2 = t2MOVi 1, 14, $noreg, $noreg
131 $r3 = t2MOVi 1, 14, $noreg, $noreg
132 $r4 = t2MOVi 1, 14, $noreg, $noreg
133 $r5 = t2MOVi 1, 14, $noreg, $noreg
135 liveins: $lr, $r0, $r6, $r7, $r8, $r9, $r10, $r11
136 $r0 = t2MOVi 1, 14, $noreg, $noreg
137 $r1 = t2MOVi 1, 14, $noreg, $noreg
138 $r2 = t2MOVi 1, 14, $noreg, $noreg
139 $r3 = t2MOVi 1, 14, $noreg, $noreg
140 $r4 = t2MOVi 1, 14, $noreg, $noreg
141 $r5 = t2MOVi 1, 14, $noreg, $noreg
144 $r2 = tMOVr $lr, 14, $noreg
147 ; CHECK-LABEL: name: OUTLINED_FUNCTION_0
149 ; CHECK: liveins: $lr
150 ; CHECK: $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
151 ; CHECK: $r1 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
152 ; CHECK: $r2 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
153 ; CHECK: $r3 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
154 ; CHECK: $r4 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
155 ; CHECK: $r5 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
156 ; CHECK: tBX_RET 14 /* CC::al */, $noreg
158 ; CHECK-LABEL: name: OUTLINED_FUNCTION_1
160 ; CHECK: liveins: $lr
161 ; CHECK: $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
162 ; CHECK: $r1 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
163 ; CHECK: $r2 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
164 ; CHECK: $r3 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
165 ; CHECK: $r4 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
166 ; CHECK: $r5 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
167 ; CHECK: MOVPCLR 14 /* CC::al */, $noreg