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_default_arm() #0 { ret void }
7 define void @outline_default_thumb() #1 { ret void }
10 attributes #0 = { minsize optsize }
11 attributes #1 = { minsize optsize "target-features"="+armv7-a,+thumb-mode" }
15 name: outline_default_arm
16 tracksRegLiveness: true
18 ; CHECK-LABEL: name: outline_default_arm
21 ; CHECK: early-clobber $sp = frame-setup STR_PRE_IMM killed $lr, $sp, -8, 14 /* CC::al */, $noreg
22 ; CHECK: BL @OUTLINED_FUNCTION_1
23 ; CHECK: $lr, $sp = frame-destroy LDR_POST_IMM $sp, $noreg, 8, 14 /* CC::al */, $noreg
25 ; CHECK: liveins: $lr, $r6, $r7, $r8, $r9, $r10, $r11
26 ; CHECK: early-clobber $sp = frame-setup STR_PRE_IMM killed $lr, $sp, -8, 14 /* CC::al */, $noreg
27 ; CHECK: BL @OUTLINED_FUNCTION_1
28 ; CHECK: $lr, $sp = frame-destroy LDR_POST_IMM $sp, $noreg, 8, 14 /* CC::al */, $noreg
30 ; CHECK: liveins: $lr, $r6, $r7, $r8, $r9, $r10, $r11
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, $r6, $r7, $r8, $r9, $r10, $r11
36 ; CHECK: $r2 = MOVr $lr, 14 /* CC::al */, $noreg, $noreg
37 ; CHECK: BX_RET 14 /* CC::al */, $noreg
40 $r0 = MOVi 1, 14, $noreg, $noreg
41 $r1 = MOVi 1, 14, $noreg, $noreg
42 $r2 = MOVi 1, 14, $noreg, $noreg
43 $r3 = MOVi 1, 14, $noreg, $noreg
44 $r4 = MOVi 1, 14, $noreg, $noreg
45 $r5 = MOVi 1, 14, $noreg, $noreg
47 liveins: $lr, $r6, $r7, $r8, $r9, $r10, $r11
48 $r0 = MOVi 1, 14, $noreg, $noreg
49 $r1 = MOVi 1, 14, $noreg, $noreg
50 $r2 = MOVi 1, 14, $noreg, $noreg
51 $r3 = MOVi 1, 14, $noreg, $noreg
52 $r4 = MOVi 1, 14, $noreg, $noreg
53 $r5 = MOVi 1, 14, $noreg, $noreg
55 liveins: $lr, $r6, $r7, $r8, $r9, $r10, $r11
56 $r0 = MOVi 1, 14, $noreg, $noreg
57 $r1 = MOVi 1, 14, $noreg, $noreg
58 $r2 = MOVi 1, 14, $noreg, $noreg
59 $r3 = MOVi 1, 14, $noreg, $noreg
60 $r4 = MOVi 1, 14, $noreg, $noreg
61 $r5 = MOVi 1, 14, $noreg, $noreg
63 liveins: $lr, $r6, $r7, $r8, $r9, $r10, $r11
64 $r2 = MOVr $lr, 14, $noreg, $noreg
69 name: outline_default_thumb
70 tracksRegLiveness: true
72 ; CHECK-LABEL: name: outline_default_thumb
75 ; CHECK: early-clobber $sp = frame-setup t2STR_PRE killed $lr, $sp, -8, 14 /* CC::al */, $noreg
76 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
77 ; CHECK: $lr, $sp = frame-destroy t2LDR_POST $sp, 8, 14 /* CC::al */, $noreg
79 ; CHECK: liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
80 ; CHECK: early-clobber $sp = frame-setup t2STR_PRE killed $lr, $sp, -8, 14 /* CC::al */, $noreg
81 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
82 ; CHECK: $lr, $sp = frame-destroy t2LDR_POST $sp, 8, 14 /* CC::al */, $noreg
84 ; CHECK: liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
85 ; CHECK: early-clobber $sp = frame-setup t2STR_PRE killed $lr, $sp, -8, 14 /* CC::al */, $noreg
86 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
87 ; CHECK: $lr, $sp = frame-destroy t2LDR_POST $sp, 8, 14 /* CC::al */, $noreg
89 ; CHECK: liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
90 ; CHECK: $r2 = tMOVr $lr, 14 /* CC::al */, $noreg
91 ; CHECK: tBX_RET 14 /* CC::al */, $noreg
94 $r0 = t2MOVi 1, 14, $noreg, $noreg
95 $r1 = t2MOVi 1, 14, $noreg, $noreg
96 $r2 = t2MOVi 1, 14, $noreg, $noreg
97 $r3 = t2MOVi 1, 14, $noreg, $noreg
99 liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
100 $r0 = t2MOVi 1, 14, $noreg, $noreg
101 $r1 = t2MOVi 1, 14, $noreg, $noreg
102 $r2 = t2MOVi 1, 14, $noreg, $noreg
103 $r3 = t2MOVi 1, 14, $noreg, $noreg
105 liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
106 $r0 = t2MOVi 1, 14, $noreg, $noreg
107 $r1 = t2MOVi 1, 14, $noreg, $noreg
108 $r2 = t2MOVi 1, 14, $noreg, $noreg
109 $r3 = t2MOVi 1, 14, $noreg, $noreg
111 liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
112 $r2 = tMOVr $lr, 14, $noreg
115 ; CHECK-LABEL: name: OUTLINED_FUNCTION_0
117 ; CHECK: liveins: $lr, $r4, $r5, $r6, $r7, $r8, $r9, $r10, $r11
118 ; CHECK: $r0 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
119 ; CHECK: $r1 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
120 ; CHECK: $r2 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
121 ; CHECK: $r3 = t2MOVi 1, 14 /* CC::al */, $noreg, $noreg
122 ; CHECK: tBX_RET 14 /* CC::al */, $noreg
124 ; CHECK-LABEL: name: OUTLINED_FUNCTION_1
126 ; CHECK: liveins: $lr, $r6, $r7, $r8, $r9, $r10, $r11
127 ; CHECK: $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
128 ; CHECK: $r1 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
129 ; CHECK: $r2 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
130 ; CHECK: $r3 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
131 ; CHECK: $r4 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
132 ; CHECK: $r5 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
133 ; CHECK: MOVPCLR 14 /* CC::al */, $noreg