1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mcpu=pwr9 -mtriple=powerpc64le-unknown-unknown -run-pass ppc-pre-emit-peephole %s -o - | FileCheck %s
7 tracksRegLiveness: true
8 machineFunctionInfo: {}
13 ; CHECK-LABEL: name: t1
15 ; CHECK: renamable $x3 = LI8 0
16 ; CHECK: STD renamable $x3, 16, $x1
17 ; CHECK: STD killed renamable $x3, 8, $x1
18 ; CHECK: BLR8 implicit $lr8, implicit $rm
20 STD killed renamable $x3, 16, $x1
22 STD killed renamable $x3, 8, $x1
23 BLR8 implicit $lr8, implicit $rm
29 tracksRegLiveness: true
30 machineFunctionInfo: {}
35 ; CHECK-LABEL: name: t2
37 ; CHECK: renamable $x3 = LI8 0
38 ; CHECK: STD renamable $x3, 32, $x1
39 ; CHECK: STD renamable $x3, 24, $x1
40 ; CHECK: STD renamable $x3, 16, $x1
41 ; CHECK: STD killed renamable $x3, 8, $x1
42 ; CHECK: BLR8 implicit $lr8, implicit $rm
44 STD killed renamable $x3, 32, $x1
46 STD killed renamable $x3, 24, $x1
48 STD killed renamable $x3, 16, $x1
50 STD killed renamable $x3, 8, $x1
51 BLR8 implicit $lr8, implicit $rm
57 tracksRegLiveness: true
58 machineFunctionInfo: {}
63 ; CHECK-LABEL: name: t3
65 ; CHECK: renamable $x3 = LI8 0
66 ; CHECK: STD renamable $x3, 32, $x1
67 ; CHECK: STD renamable $x3, 24, $x1
68 ; CHECK: BLR8 implicit $lr8, implicit $rm
70 STD killed renamable $x3, 32, $x1
72 STD renamable $x3, 24, $x1
73 BLR8 implicit $lr8, implicit $rm
79 tracksRegLiveness: true
80 machineFunctionInfo: {}
85 ; CHECK-LABEL: name: t4
87 ; CHECK: renamable $x3 = LI8 0
88 ; CHECK: STD renamable $x3, 16, $x1
89 ; CHECK: renamable $x4 = ADDI8 renamable $x3, 8
90 ; CHECK: STD killed renamable $x3, 8, $x1
91 ; CHECK: BLR8 implicit $lr8, implicit $rm
93 STD killed renamable $x3, 16, $x1
95 renamable $x4 = ADDI8 killed renamable $x3, 8
97 STD killed renamable $x3, 8, $x1
98 BLR8 implicit $lr8, implicit $rm
104 tracksRegLiveness: true
105 machineFunctionInfo: {}
110 ; CHECK-LABEL: name: t5
111 ; CHECK: liveins: $x1
112 ; CHECK: renamable $r3 = LI 0
113 ; CHECK: STW renamable $r3, 16, $x1
114 ; CHECK: STW killed renamable $r3, 12, $x1
115 ; CHECK: renamable $r3 = LI 1
116 ; CHECK: BLR8 implicit $lr8, implicit $rm
118 STW killed renamable $r3, 16, $x1
120 STW killed renamable $r3, 12, $x1
122 BLR8 implicit $lr8, implicit $rm
128 tracksRegLiveness: true
129 machineFunctionInfo: {}
134 ; CHECK-LABEL: name: t6
135 ; CHECK: liveins: $x1
136 ; CHECK: renamable $x3 = LI8 0
137 ; CHECK: renamable $x4 = LI8 1
138 ; CHECK: STD renamable $x3, 32, $x1
139 ; CHECK: STD renamable $x4, 24, $x1
140 ; CHECK: STD killed renamable $x3, 16, $x1
141 ; CHECK: STD killed renamable $x4, 8, $x1
142 ; CHECK: BLR8 implicit $lr8, implicit $rm
143 renamable $x3 = LI8 0
144 renamable $x4 = LI8 1
145 STD killed renamable $x3, 32, $x1
146 STD killed renamable $x4, 24, $x1
147 renamable $x3 = LI8 0
148 renamable $x4 = LI8 1
149 STD killed renamable $x3, 16, $x1
150 STD killed renamable $x4, 8, $x1
151 BLR8 implicit $lr8, implicit $rm
157 tracksRegLiveness: true
158 machineFunctionInfo: {}
163 ; CHECK-LABEL: name: t7
164 ; CHECK: liveins: $x1, $x4
165 ; CHECK: renamable $x3 = LI8 0
166 ; CHECK: STD killed renamable $x3, 32, $x1
167 ; CHECK: renamable $x3 = ADDI8 $x4, 6
168 ; CHECK: BLR8 implicit $lr8, implicit $rm
169 renamable $x3 = LI8 0
170 STD killed renamable $x3, 32, $x1
171 renamable $x3 = ADDI8 $x4, 6
172 BLR8 implicit $lr8, implicit $rm
178 tracksRegLiveness: true
179 machineFunctionInfo: {}
184 ; CHECK-LABEL: name: t8
185 ; CHECK: liveins: $x1
186 ; CHECK: renamable $x3 = LI8 0
187 ; CHECK: STD renamable $x3, 32, $x1
188 ; CHECK: BLR8 implicit $lr8, implicit $rm
189 renamable $x3 = LI8 0
190 STD killed renamable $x3, 32, $x1
191 renamable $x3 = LI8 0
192 BLR8 implicit $lr8, implicit $rm
198 tracksRegLiveness: true
199 machineFunctionInfo: {}
201 ; CHECK-LABEL: name: t9
203 ; CHECK: successors: %bb.2(0x40000000), %bb.1(0x40000000)
204 ; CHECK: liveins: $x3
205 ; CHECK: renamable $r4 = LI 0, implicit-def $x4
206 ; CHECK: renamable $x24 = RLDICL renamable $x4, 0, 32
207 ; CHECK: renamable $cr0 = CMPLDI renamable $x3, 0
208 ; CHECK: BCC 68, killed renamable $cr0, %bb.1
211 ; CHECK: liveins: $r4, $x1
212 ; CHECK: STW killed renamable $r4, 16, $x1
213 ; CHECK: BLR8 implicit $lr8, implicit $rm
215 ; CHECK: liveins: $r4, $x1
216 ; CHECK: STW killed renamable $r4, 32, $x1
217 ; CHECK: BLR8 implicit $lr8, implicit $rm
220 successors: %bb.8, %bb.7
222 renamable $r4 = LI 0, implicit-def $x4
223 renamable $x24 = RLDICL killed renamable $x4, 0 , 32
224 renamable $cr0 = CMPLDI renamable $x3, 0
226 BCC 68, killed renamable $cr0, %bb.7
231 STW killed renamable $r4, 16, $x1
232 BLR8 implicit $lr8, implicit $rm
236 STW killed renamable $r4, 32, $x1
237 BLR8 implicit $lr8, implicit $rm
243 tracksRegLiveness: true
244 machineFunctionInfo: {}
249 ; CHECK-LABEL: name: t10
250 ; CHECK: liveins: $x1
251 ; CHECK: renamable $x3 = LI8 24
252 ; CHECK: STD killed renamable $x3, 16, $x1
253 ; CHECK: renamable $r3 = LI 0
254 ; CHECK: STW killed renamable $r3, 26, $x1
255 ; CHECK: BLR8 implicit $lr8, implicit $rm
256 renamable $x3 = LI8 24
257 STD killed renamable $x3, 16, $x1
259 STW killed renamable $r3, 26, $x1
260 BLR8 implicit $lr8, implicit $rm
266 tracksRegLiveness: true
267 machineFunctionInfo: {}
272 ; CHECK-LABEL: name: LIS8
273 ; CHECK: liveins: $x1
274 ; CHECK: renamable $x3 = LIS8 0
275 ; CHECK: STD renamable $x3, 16, $x1
276 ; CHECK: STD killed renamable $x3, 8, $x1
277 ; CHECK: BLR8 implicit $lr8, implicit $rm
278 renamable $x3 = LIS8 0
279 STD killed renamable $x3, 16, $x1
280 renamable $x3 = LIS8 0
281 STD killed renamable $x3, 8, $x1
282 BLR8 implicit $lr8, implicit $rm
288 tracksRegLiveness: true
289 machineFunctionInfo: {}
294 ; CHECK-LABEL: name: LIS
295 ; CHECK: liveins: $x1
296 ; CHECK: renamable $r3 = LIS 0
297 ; CHECK: STW renamable $r3, 16, $x1
298 ; CHECK: STW killed renamable $r3, 12, $x1
299 ; CHECK: BLR8 implicit $lr8, implicit $rm
300 renamable $r3 = LIS 0
301 STW killed renamable $r3, 16, $x1
302 renamable $r3 = LIS 0
303 STW killed renamable $r3, 12, $x1
304 BLR8 implicit $lr8, implicit $rm
308 name: modify_and_kill_the_reg_in_the_same_inst
310 tracksRegLiveness: true
311 machineFunctionInfo: {}
315 ; CHECK-LABEL: name: modify_and_kill_the_reg_in_the_same_inst
316 ; CHECK: renamable $x6 = LI8 1
317 ; CHECK: renamable $x6 = RLDICR killed renamable $x6, 44, 19
318 ; CHECK: BLR8 implicit $lr8, implicit $rm
319 renamable $x6 = LI8 1
320 renamable $x6 = RLDICR killed renamable $x6, 44, 19
321 BLR8 implicit $lr8, implicit $rm
325 name: dead_load_immediate_followed_by_a_redundancy
327 tracksRegLiveness: true
328 machineFunctionInfo: {}
333 ; CHECK-LABEL: name: dead_load_immediate_followed_by_a_redundancy
334 ; CHECK: liveins: $x1
335 ; CHECK: renamable $r3 = LI 128
336 ; CHECK: renamable $x4 = ADDI8 $x1, -128
337 ; CHECK: renamable $x5 = ADDI8 $x1, -128
338 ; CHECK: STW killed renamable $r3, 16, $x4
339 ; CHECK: BLR8 implicit $lr8, implicit $rm
340 dead renamable $r3 = LI 128
341 renamable $x4 = ADDI8 $x1, -128
342 dead renamable $r3 = LI 128
343 renamable $x5 = ADDI8 $x1, -128
344 renamable $r3 = LI 128
345 STW killed renamable $r3, 16, $x4
346 BLR8 implicit $lr8, implicit $rm
350 name: overwrite_reg_before_killed
352 tracksRegLiveness: true
353 machineFunctionInfo: {}
358 ; CHECK-LABEL: name: overwrite_reg_before_killed
359 ; CHECK: liveins: $x1
360 ; CHECK: renamable $x3 = LI8 0
361 ; CHECK: STD renamable $x3, 16, $x1
362 ; CHECK: STD killed renamable $x3, 8, $x1
363 ; CHECK: BLR8 implicit $lr8, implicit $rm
364 renamable $x3 = LI8 0
365 STD renamable $x3, 16, $x1
366 renamable $x3 = LI8 0
367 STD killed renamable $x3, 8, $x1
368 BLR8 implicit $lr8, implicit $rm