1 # RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=print-machine-cycles -o - %s 2>&1 | FileCheck %s
5 # CHECK-LABEL: MachineCycleInfo for function: empty
8 tracksRegLiveness: true
11 machineFunctionInfo: {}
18 # CHECK-LABEL: MachineCycleInfo for function: simple
19 # CHECK: depth=1: entries(bb.1)
22 tracksRegLiveness: true
24 - { id: 0, class: gr8 }
27 machineFunctionInfo: {}
34 TEST8ri %0, 1, implicit-def $eflags
35 JCC_1 %bb.1, 5, implicit $eflags
43 # CHECK-LABEL: MachineCycleInfo for function: two_latches
44 # CHECK: depth=1: entries(bb.1) bb.2
47 tracksRegLiveness: true
49 - { id: 0, class: gr8 }
50 - { id: 1, class: gr8 }
53 machineFunctionInfo: {}
60 TEST8ri %0, 1, implicit-def $eflags
61 JCC_1 %bb.1, 5, implicit $eflags
66 TEST8ri %1, 1, implicit-def $eflags
67 JCC_1 %bb.3, 5, implicit $eflags
75 # CHECK-LABEL: MachineCycleInfo for function: nested_simple
76 # CHECK: depth=1: entries(bb.1) bb.3 bb.2
77 # CHECK: depth=2: entries(bb.2)
80 tracksRegLiveness: true
82 - { id: 0, class: gr8 }
83 - { id: 1, class: gr8 }
86 machineFunctionInfo: {}
96 TEST8ri %0, 1, implicit-def $eflags
97 JCC_1 %bb.2, 5, implicit $eflags
101 %1:gr8 = IMPLICIT_DEF
102 TEST8ri %1, 1, implicit-def $eflags
103 JCC_1 %bb.1, 5, implicit $eflags
111 # CHECK-LABEL: MachineCycleInfo for function: nested_outer_latch_in_inner_loop
112 # CHECK: depth=1: entries(bb.1) bb.2 bb.3
113 # CHECK: depth=2: entries(bb.2) bb.3
114 name: nested_outer_latch_in_inner_loop
116 tracksRegLiveness: true
118 - { id: 0, class: gr8 }
119 - { id: 1, class: gr8 }
122 machineFunctionInfo: {}
131 %0:gr8 = IMPLICIT_DEF
132 TEST8ri %0, 1, implicit-def $eflags
133 JCC_1 %bb.3, 5, implicit $eflags
137 %1:gr8 = IMPLICIT_DEF
138 TEST8ri %1, 1, implicit-def $eflags
139 JCC_1 %bb.4, 5, implicit $eflags
147 # CHECK-LABEL: MachineCycleInfo for function: sibling_loops
148 # CHECK: depth=1: entries(bb.1)
149 # CHECK: depth=1: entries(bb.2)
152 tracksRegLiveness: true
154 - { id: 0, class: gr8 }
155 - { id: 1, class: gr8 }
156 - { id: 2, class: gr8 }
159 machineFunctionInfo: {}
162 %0:gr8 = IMPLICIT_DEF
163 TEST8ri %0, 1, implicit-def $eflags
164 JCC_1 %bb.1, 5, implicit $eflags
168 %2:gr8 = IMPLICIT_DEF
169 TEST8ri %2, 1, implicit-def $eflags
170 JCC_1 %bb.1, 5, implicit $eflags
174 %1:gr8 = IMPLICIT_DEF
175 TEST8ri %1, 1, implicit-def $eflags
176 JCC_1 %bb.2, 5, implicit $eflags
184 # CHECK-LABEL: MachineCycleInfo for function: serial_loops
185 # CHECK: depth=1: entries(bb.2)
186 # CHECK: depth=1: entries(bb.1)
189 tracksRegLiveness: true
191 - { id: 0, class: gr8 }
192 - { id: 1, class: gr8 }
195 machineFunctionInfo: {}
201 %0:gr8 = IMPLICIT_DEF
202 TEST8ri %0, 1, implicit-def $eflags
203 JCC_1 %bb.1, 5, implicit $eflags
207 %1:gr8 = IMPLICIT_DEF
208 TEST8ri %1, 1, implicit-def $eflags
209 JCC_1 %bb.2, 5, implicit $eflags
217 # CHECK-LABEL: MachineCycleInfo for function: nested_sibling_loops
218 # CHECK: depth=1: entries(bb.1) bb.4 bb.5 bb.3 bb.2
219 # CHECK: depth=2: entries(bb.4) bb.5
220 # CHECK: depth=2: entries(bb.2)
221 name: nested_sibling_loops
223 tracksRegLiveness: true
225 - { id: 0, class: gr8 }
226 - { id: 1, class: gr32 }
227 - { id: 2, class: gr8 }
228 - { id: 3, class: gr32 }
229 - { id: 4, class: gr8 }
230 - { id: 5, class: gr32 }
231 - { id: 6, class: gr8 }
232 - { id: 7, class: gr32 }
233 - { id: 8, class: gr8 }
236 machineFunctionInfo: {}
242 %0:gr8 = IMPLICIT_DEF
243 TEST8ri %0, 1, implicit-def $eflags
244 JCC_1 %bb.2, 5, implicit $eflags
248 %5:gr32 = MOV32r0 implicit-def dead $eflags
249 %6:gr8 = COPY %5.sub_8bit
250 TEST8rr %6, %6, implicit-def $eflags
251 JCC_1 %bb.2, 5, implicit $eflags
255 %7:gr32 = MOV32r0 implicit-def dead $eflags
256 %8:gr8 = COPY %7.sub_8bit
257 TEST8rr %8, %8, implicit-def $eflags
258 JCC_1 %bb.1, 5, implicit $eflags
262 %1:gr32 = MOV32r0 implicit-def dead $eflags
263 %2:gr8 = COPY %1.sub_8bit
264 TEST8rr %2, %2, implicit-def $eflags
265 JCC_1 %bb.4, 5, implicit $eflags
269 %3:gr32 = MOV32r0 implicit-def dead $eflags
270 %4:gr8 = COPY %3.sub_8bit
271 TEST8rr %4, %4, implicit-def $eflags
272 JCC_1 %bb.3, 5, implicit $eflags
280 # CHECK-LABEL: MachineCycleInfo for function: deeper_nest
281 # CHECK: depth=1: entries(bb.1) bb.5 bb.2 bb.3 bb.4
282 # CHECK: depth=2: entries(bb.2) bb.3 bb.4
283 # CHECK: depth=3: entries(bb.3) bb.4
286 tracksRegLiveness: true
288 - { id: 0, class: gr8 }
289 - { id: 1, class: gr8 }
290 - { id: 2, class: gr8 }
293 machineFunctionInfo: {}
305 %0:gr8 = IMPLICIT_DEF
306 TEST8ri %0, 1, implicit-def $eflags
307 JCC_1 %bb.2, 5, implicit $eflags
311 %1:gr8 = IMPLICIT_DEF
312 TEST8ri %1, 1, implicit-def $eflags
313 JCC_1 %bb.3, 5, implicit $eflags
317 %2:gr8 = IMPLICIT_DEF
318 TEST8ri %2, 1, implicit-def $eflags
319 JCC_1 %bb.1, 5, implicit $eflags
327 # CHECK-LABEL: MachineCycleInfo for function: irreducible_basic
328 # CHECK: depth=1: entries(bb.2 bb.1)
329 name: irreducible_basic
331 tracksRegLiveness: true
333 - { id: 0, class: gr8 }
334 - { id: 1, class: gr8 }
335 - { id: 2, class: gr8 }
338 machineFunctionInfo: {}
341 %0:gr8 = IMPLICIT_DEF
342 TEST8ri %0, 1, implicit-def $eflags
343 JCC_1 %bb.1, 5, implicit $eflags
347 %1:gr8 = IMPLICIT_DEF
348 TEST8ri %1, 1, implicit-def $eflags
349 JCC_1 %bb.2, 5, implicit $eflags
353 %2:gr8 = IMPLICIT_DEF
354 TEST8ri %2, 1, implicit-def $eflags
355 JCC_1 %bb.1, 5, implicit $eflags
363 # CHECK-LABEL: MachineCycleInfo for function: irreducible_mess
364 # CHECK: depth=1: entries(bb.2 bb.1) bb.6 bb.5 bb.3 bb.4
365 # CHECK: depth=2: entries(bb.5 bb.3 bb.1) bb.4
366 # CHECK: depth=3: entries(bb.3 bb.1) bb.4
367 name: irreducible_mess
369 tracksRegLiveness: true
371 - { id: 0, class: gr8 }
372 - { id: 1, class: gr8 }
373 - { id: 2, class: gr32 }
374 - { id: 3, class: gr8 }
375 - { id: 4, class: gr32 }
376 - { id: 5, class: gr8 }
377 - { id: 6, class: gr32 }
378 - { id: 7, class: gr8 }
379 - { id: 8, class: gr32 }
380 - { id: 9, class: gr8 }
381 - { id: 10, class: gr8 }
384 machineFunctionInfo: {}
387 %0:gr8 = IMPLICIT_DEF
388 TEST8ri %0, 1, implicit-def $eflags
389 JCC_1 %bb.1, 5, implicit $eflags
393 %1:gr8 = IMPLICIT_DEF
394 TEST8ri %1, 1, implicit-def $eflags
395 JCC_1 %bb.3, 5, implicit $eflags
399 %10:gr8 = IMPLICIT_DEF
400 TEST8ri %10, 1, implicit-def $eflags
401 JCC_1 %bb.3, 5, implicit $eflags
405 %2:gr32 = MOV32r0 implicit-def dead $eflags
406 %3:gr8 = COPY %2.sub_8bit
407 TEST8rr %3, %3, implicit-def $eflags
408 JCC_1 %bb.4, 5, implicit $eflags
412 %4:gr32 = MOV32r0 implicit-def dead $eflags
413 %5:gr8 = COPY %4.sub_8bit
414 TEST8rr %5, %5, implicit-def $eflags
415 JCC_1 %bb.5, 5, implicit $eflags
419 %6:gr32 = MOV32r0 implicit-def dead $eflags
420 %7:gr8 = COPY %6.sub_8bit
421 TEST8rr %7, %7, implicit-def $eflags
422 JCC_1 %bb.3, 5, implicit $eflags
426 successors: %bb.5, %bb.2
428 %8:gr32 = MOV32r0 implicit-def dead $eflags
429 %9:gr8 = COPY %8.sub_8bit
430 TEST8rr %9, %9, implicit-def $eflags
431 JCC_1 %bb.2, 5, implicit $eflags
439 # CHECK-LABEL: MachineCycleInfo for function: irreducible_into_simple_cycle
440 # CHECK: depth=1: entries(bb.2 bb.7 bb.4) bb.6 bb.5 bb.3
441 name: irreducible_into_simple_cycle
443 tracksRegLiveness: true
445 - { id: 0, class: gr32 }
446 - { id: 1, class: gr8 }
447 - { id: 2, class: gr32 }
448 - { id: 3, class: gr8 }
449 - { id: 4, class: gr8 }
450 - { id: 5, class: gr8 }
453 machineFunctionInfo: {}
456 %0:gr32 = MOV32r0 implicit-def dead $eflags
457 %1:gr8 = COPY %0.sub_8bit
458 TEST8rr %1, %1, implicit-def $eflags
459 JCC_1 %bb.3, 5, implicit $eflags
463 %2:gr32 = MOV32r0 implicit-def dead $eflags
464 %3:gr8 = COPY %2.sub_8bit
465 TEST8rr %3, %3, implicit-def $eflags
466 JCC_1 %bb.6, 5, implicit $eflags
479 %4:gr8 = IMPLICIT_DEF
480 TEST8ri %4, 1, implicit-def $eflags
481 JCC_1 %bb.5, 5, implicit $eflags
488 %5:gr8 = IMPLICIT_DEF
489 TEST8ri %5, 1, implicit-def $eflags
490 JCC_1 %bb.1, 5, implicit $eflags
498 # CHECK-LABEL: MachineCycleInfo for function: irreducible_mountain_bug
499 # CHECK: depth=1: entries(bb.6) bb.11 bb.10 bb.8 bb.7 bb.9 bb.12
500 # CHECK: depth=2: entries(bb.10 bb.7) bb.8 bb.9
501 # CHECK: depth=3: entries(bb.8 bb.7) bb.9
502 name: irreducible_mountain_bug
504 tracksRegLiveness: true
506 - { id: 0, class: gr8 }
507 - { id: 1, class: gr8 }
508 - { id: 2, class: gr8 }
509 - { id: 3, class: gr8 }
510 - { id: 4, class: gr8 }
511 - { id: 5, class: gr8 }
512 - { id: 6, class: gr8 }
513 - { id: 7, class: gr8 }
514 - { id: 8, class: gr8 }
515 - { id: 9, class: gr8 }
516 - { id: 10, class: gr8 }
517 - { id: 11, class: gr8 }
518 - { id: 12, class: gr8 }
519 - { id: 13, class: gr8 }
522 machineFunctionInfo: {}
525 %0:gr8 = IMPLICIT_DEF
526 TEST8ri %0, 1, implicit-def $eflags
527 JCC_1 %bb.1, 5, implicit $eflags
531 %3:gr8 = IMPLICIT_DEF
532 TEST8ri %3, 1, implicit-def $eflags
533 JCC_1 %bb.2, 5, implicit $eflags
543 %4:gr8 = IMPLICIT_DEF
544 TEST8ri %4, 1, implicit-def $eflags
545 JCC_1 %bb.5, 5, implicit $eflags
552 %7:gr8 = IMPLICIT_DEF
553 TEST8ri %7, 1, implicit-def $eflags
554 JCC_1 %bb.7, 5, implicit $eflags
558 %9:gr8 = IMPLICIT_DEF
559 TEST8ri %9, 1, implicit-def $eflags
560 JCC_1 %bb.11, 5, implicit $eflags
564 %10:gr8 = IMPLICIT_DEF
565 TEST8ri %10, 1, implicit-def $eflags
566 JCC_1 %bb.20, 5, implicit $eflags
570 %11:gr8 = IMPLICIT_DEF
571 TEST8ri %11, 1, implicit-def $eflags
572 JCC_1 %bb.7, 5, implicit $eflags
576 %12:gr8 = IMPLICIT_DEF
577 TEST8ri %12, 1, implicit-def $eflags
578 JCC_1 %bb.8, 5, implicit $eflags
582 %13:gr8 = IMPLICIT_DEF
583 TEST8ri %13, 1, implicit-def $eflags
584 JCC_1 %bb.20, 5, implicit $eflags
588 %8:gr8 = IMPLICIT_DEF
589 TEST8ri %8, 1, implicit-def $eflags
590 JCC_1 %bb.10, 5, implicit $eflags
597 %5:gr8 = IMPLICIT_DEF
598 TEST8ri %5, 1, implicit-def $eflags
599 JCC_1 %bb.20, 5, implicit $eflags
603 %6:gr8 = IMPLICIT_DEF
604 TEST8ri %6, 1, implicit-def $eflags
605 JCC_1 %bb.20, 5, implicit $eflags
612 %1:gr8 = IMPLICIT_DEF
613 TEST8ri %1, 1, implicit-def $eflags
614 JCC_1 %bb.20, 5, implicit $eflags
618 %2:gr8 = IMPLICIT_DEF
619 TEST8ri %2, 1, implicit-def $eflags
620 JCC_1 %bb.20, 5, implicit $eflags