1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=thumbv7-- -run-pass=machine-outliner -verify-machineinstrs \
3 # RUN: %s -o - | FileCheck %s
6 define void @dont_outline_asm() #0 { ret void }
7 define void @dont_outline_lr() #0 { ret void }
8 define void @dont_outline_lr2() #0 { ret void }
9 define void @dont_outline_it() #0 { ret void }
10 define void @dont_outline_pic() #0 { ret void }
11 define void @dont_outline_mve() #0 { ret void }
12 declare void @z(i32, i32, i32, i32)
14 attributes #0 = { minsize optsize }
18 name: dont_outline_asm
19 tracksRegLiveness: true
21 ; CHECK-LABEL: name: dont_outline_asm
23 ; CHECK: INLINEASM &"movs r0, #42", 1
24 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
26 ; CHECK: INLINEASM &"movs r0, #42", 1
27 ; CHECK: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION_0
29 INLINEASM &"movs r0, #42", 1
30 $r0, dead $cpsr = tMOVi8 1, 14, $noreg
31 $r1, dead $cpsr = tMOVi8 1, 14, $noreg
32 $r2, dead $cpsr = tMOVi8 1, 14, $noreg
33 $r3, dead $cpsr = tMOVi8 1, 14, $noreg
36 INLINEASM &"movs r0, #42", 1
37 $r0, dead $cpsr = tMOVi8 1, 14, $noreg
38 $r1, dead $cpsr = tMOVi8 1, 14, $noreg
39 $r2, dead $cpsr = tMOVi8 1, 14, $noreg
40 $r3, dead $cpsr = tMOVi8 1, 14, $noreg
48 tracksRegLiveness: true
50 ; CHECK-LABEL: name: dont_outline_lr
51 ; CHECK-NOT: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION
54 $r0 = tMOVr $lr, 14, $noreg
55 $r1 = tMOVr $lr, 14, $noreg
56 $r2 = tMOVr $lr, 14, $noreg
57 $r3 = tMOVr $lr, 14, $noreg
61 $r0 = tMOVr $lr, 14, $noreg
62 $r1 = tMOVr $lr, 14, $noreg
63 $r2 = tMOVr $lr, 14, $noreg
64 $r3 = tMOVr $lr, 14, $noreg
71 name: dont_outline_lr2
72 tracksRegLiveness: true
74 ; CHECK-LABEL: name: dont_outline_lr2
75 ; CHECK-NOT: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION
78 $lr = tMOVr $r0, 14, $noreg
79 $r1 = tMOVr $r0, 14, $noreg
80 $r2 = tMOVr $r0, 14, $noreg
81 $r3 = tMOVr $r0, 14, $noreg
82 $r4 = tMOVr $r0, 14, $noreg
86 $lr = tMOVr $r0, 14, $noreg
87 $r1 = tMOVr $r0, 14, $noreg
88 $r2 = tMOVr $r0, 14, $noreg
89 $r3 = tMOVr $r0, 14, $noreg
90 $r4 = tMOVr $r0, 14, $noreg
98 tracksRegLiveness: true
100 ; CHECK-LABEL: name: dont_outline_it
101 ; CHECK-NOT: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION
103 t2IT 0, 1, implicit-def $itstate
104 $r0, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
105 $r1, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
106 $r2, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
107 $r3, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
110 t2IT 0, 1, implicit-def $itstate
111 $r0, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
112 $r1, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
113 $r2, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
114 $r3, dead $cpsr = tMOVi8 1, 0, $noreg, implicit $itstate
121 name: dont_outline_pic
122 tracksRegLiveness: true
124 ; CHECK-LABEL: name: dont_outline_pic
125 ; CHECK-NOT: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION
127 $r0 = t2MOVi16_ga_pcrel target-flags(arm-lo16, arm-nonlazy) @z, 0
128 $r0 = t2MOVTi16_ga_pcrel $r0, target-flags(arm-lo16, arm-nonlazy) @z, 0
129 $r0 = PICADD $r0, 1, 14, $noreg
130 $r1 = PICLDR $r0, 2, 14, $noreg
131 PICSTR $r0, $r1, 3, 14, $noreg
134 $r0 = t2MOVi16_ga_pcrel target-flags(arm-lo16, arm-nonlazy) @z, 0
135 $r0 = t2MOVTi16_ga_pcrel $r0, target-flags(arm-lo16, arm-nonlazy) @z, 0
136 $r0 = PICADD $r0, 1, 14, $noreg
137 $r1 = PICLDR $r0, 2, 14, $noreg
138 PICSTR $r0, $r1, 3, 14, $noreg
145 name: dont_outline_mve
146 tracksRegLiveness: true
148 ; CHECK-LABEL: name: dont_outline_mve
149 ; CHECK-NOT: tBL 14 /* CC::al */, $noreg, @OUTLINED_FUNCTION
151 liveins: $r3, $r4, $q0, $q3, $q4, $q5
152 $q5 = MVE_VDUP32 $r3, 0, $noreg, $noreg, $q5
153 $q4 = MVE_VDUP32 $r4, 0, $noreg, $noreg, $q4
154 $q0 = MVE_VADDf32 $q4, $q5, 0, $noreg, $noreg, $q0
155 $lr = t2DoLoopStart $r4
156 $r0 = MVE_VMOV_from_lane_32 renamable $q0, 1, 14, $noreg
159 liveins: $r3, $r4, $q0, $q3, $q4, $q5
160 $q5 = MVE_VDUP32 $r3, 0, $noreg, $noreg, $q5
161 $q4 = MVE_VDUP32 $r4, 0, $noreg, $noreg, $q4
162 $q0 = MVE_VADDf32 $q4, $q5, 0, $noreg, $noreg, $q0
163 $lr = t2DoLoopStart $r4
164 $r0 = MVE_VMOV_from_lane_32 renamable $q0, 1, 14, $noreg