1 # RUN: llc -mtriple=aarch64-none-linux-gnu -mcpu=cortex-a55 \
2 # RUN: -run-pass=machine-scheduler -debug-only=machine-scheduler -o - %s \
3 # RUN: -misched-topdown=true -sched-print-cycles=true \
4 # RUN: -misched-dump-schedule-trace=true -misched-dump-schedule-trace-col-header-width=21 \
5 # RUN: 2>&1 | FileCheck %s --check-prefix=TOP --strict-whitespace
7 # RUN: llc -mtriple=aarch64-none-linux-gnu -mcpu=cortex-a55 \
8 # RUN: -run-pass=machine-scheduler -debug-only=machine-scheduler -o - %s \
9 # RUN: -misched-bottomup=true -sched-print-cycles=true \
10 # RUN: -misched-dump-schedule-trace=true -misched-dump-schedule-trace-col-width=4 \
11 # RUN: 2>&1 | FileCheck %s --check-prefix=BOTTOM --strict-whitespace
13 # RUN: llc -mtriple=aarch64-none-linux-gnu -mcpu=cortex-a55 \
14 # RUN: -run-pass=machine-scheduler -debug-only=machine-scheduler -o - %s \
15 # RUN: -sched-print-cycles=true -misched-dump-schedule-trace=true \
16 # RUN: 2>&1 | FileCheck %s --check-prefix=BIDIRECTIONAL
18 # REQUIRES: asserts, aarch64-registered-target
21 tracksRegLiveness: true
24 liveins: $x0, $x1, $x2, $x6, $q0
25 %14:fpr128 = EXTv16i8 $q0, $q0, 8
31 # TOP-LABEL: *** Final schedule for %bb.0 ***
32 # TOP-NEXT: * Schedule table (TopDown):
34 # TOP-NEXT: x: resource booked
35 # TOP-NEXT: Cycle | 0 | 1 | 2 |
36 # TOP-NEXT: SU(0) | i | | |
37 # TOP-NEXT: CortexA55UnitFPALU | x | x | |
38 # TOP-NEXT: SU(1) | i | | |
39 # TOP-NEXT: CortexA55UnitALU | x | | |
40 # TOP-NEXT: SU(2) | | i | |
41 # TOP-NEXT: CortexA55UnitALU | | x | |
42 # TOP-NEXT: SU(3) | | i | |
43 # TOP-NEXT: CortexA55UnitALU | | x | |
44 # TOP-NEXT: SU(4) | | | i |
45 # TOP-NEXT: CortexA55UnitALU | | | x |
46 # TOP-NEXT: SU(0) [TopReadyCycle = 0, BottomReadyCycle = 3]: dead %0:fpr128 = EXTv16i8 $q0, $q0, 8
47 # TOP-NEXT: SU(1) [TopReadyCycle = 0, BottomReadyCycle = 0]: $x3 = ADDXrr $x0, $x0
48 # TOP-NEXT: SU(2) [TopReadyCycle = 1, BottomReadyCycle = 0]: $x4 = ADDXrr $x1, $x1
49 # TOP-NEXT: SU(3) [TopReadyCycle = 1, BottomReadyCycle = 0]: $x5 = ADDXrr $x2, $x2
50 # TOP-NEXT: SU(4) [TopReadyCycle = 2, BottomReadyCycle = 0]: $x7 = ADDXrr $x6, $x6
52 # BOTTOM-LABEL: *** Final schedule for %bb.0 ***
53 # BOTTOM-NEXT: * Schedule table (BottomUp):
54 # BOTTOM-NEXT: i: issue
55 # BOTTOM-NEXT: x: resource booked
56 # BOTTOM-NEXT: Cycle | 3 | 2 | 1 | 0 |
57 # BOTTOM-NEXT: SU(0) | i | | | |
58 # BOTTOM-NEXT: CortexA55UnitFPALU | x | x | | |
59 # BOTTOM-NEXT: SU(1) | | | i | |
60 # BOTTOM-NEXT: CortexA55UnitALU | | | x | |
61 # BOTTOM-NEXT: SU(2) | | | i | |
62 # BOTTOM-NEXT: CortexA55UnitALU | | | x | |
63 # BOTTOM-NEXT: SU(3) | | | | i |
64 # BOTTOM-NEXT: CortexA55UnitALU | | | | x |
65 # BOTTOM-NEXT: SU(4) | | | | i |
66 # BOTTOM-NEXT: CortexA55UnitALU | | | | x |
67 # BOTTOM-NEXT: SU(0) [TopReadyCycle = 0, BottomReadyCycle = 3]: dead %0:fpr128 = EXTv16i8 $q0, $q0, 8
68 # BOTTOM-NEXT: SU(1) [TopReadyCycle = 0, BottomReadyCycle = 1]: $x3 = ADDXrr $x0, $x0
69 # BOTTOM-NEXT: SU(2) [TopReadyCycle = 0, BottomReadyCycle = 1]: $x4 = ADDXrr $x1, $x1
70 # BOTTOM-NEXT: SU(3) [TopReadyCycle = 0, BottomReadyCycle = 0]: $x5 = ADDXrr $x2, $x2
71 # BOTTOM-NEXT: SU(4) [TopReadyCycle = 0, BottomReadyCycle = 0]: $x7 = ADDXrr $x6, $x6
73 # This test shows that at the moment we cannot generate the trace of
74 # bidirectional scheduling as the values of TopReadyCycle and
75 # BottomReadyCycle are inconsistent.
77 # BIDIRECTIONAL-LABEL: *** Final schedule for %bb.0 ***
78 # BIDIRECTIONAL-NEXT: * Schedule table (Bidirectional): not implemented
79 # BIDIRECTIONAL-NEXT: SU(0) [TopReadyCycle = 0, BottomReadyCycle = 3]: dead %0:fpr128 = EXTv16i8 $q0, $q0, 8
80 # BIDIRECTIONAL-NEXT: SU(1) [TopReadyCycle = 0, BottomReadyCycle = 1]: $x3 = ADDXrr $x0, $x0
81 # BIDIRECTIONAL-NEXT: SU(2) [TopReadyCycle = 0, BottomReadyCycle = 1]: $x4 = ADDXrr $x1, $x1
82 # BIDIRECTIONAL-NEXT: SU(3) [TopReadyCycle = 0, BottomReadyCycle = 0]: $x5 = ADDXrr $x2, $x2
83 # BIDIRECTIONAL-NEXT: SU(4) [TopReadyCycle = 0, BottomReadyCycle = 0]: $x7 = ADDXrr $x6, $x6