1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views       < %s | FileCheck %s -check-prefixes=DEFAULTREPORT,FULLREPORT
3# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=true  < %s | FileCheck %s -check-prefixes=DEFAULTREPORT,FULLREPORT
4# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=false < %s | FileCheck %s -check-prefix=NOREPORT -allow-empty
5# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2                  < %s | FileCheck %s -check-prefix=DEFAULTREPORT
6
7add %eax, %eax
8
9# NOREPORT-NOT: {{.}}
10
11# DEFAULTREPORT:      Iterations:        100
12# DEFAULTREPORT-NEXT: Instructions:      100
13# DEFAULTREPORT-NEXT: Total Cycles:      103
14# DEFAULTREPORT-NEXT: Total uOps:        100
15
16# DEFAULTREPORT:      Dispatch Width:    2
17# DEFAULTREPORT-NEXT: uOps Per Cycle:    0.97
18# DEFAULTREPORT-NEXT: IPC:               0.97
19# DEFAULTREPORT-NEXT: Block RThroughput: 0.5
20
21# FULLREPORT:         Cycles with backend pressure increase [ 76.70% ]
22# FULLREPORT-NEXT:    Throughput Bottlenecks:
23# FULLREPORT-NEXT:      Resource Pressure       [ 0.00% ]
24# FULLREPORT-NEXT:      Data Dependencies:      [ 76.70% ]
25# FULLREPORT-NEXT:      - Register Dependencies [ 76.70% ]
26# FULLREPORT-NEXT:      - Memory Dependencies   [ 0.00% ]
27
28# FULLREPORT:         Critical sequence based on the simulation:
29
30# FULLREPORT:                       Instruction                                 Dependency Information
31# FULLREPORT-NEXT:     +----< 0.    addl	%eax, %eax
32# FULLREPORT-NEXT:     |
33# FULLREPORT-NEXT:     |    < loop carried >
34# FULLREPORT-NEXT:     |
35# FULLREPORT-NEXT:     +----> 0.    addl	%eax, %eax                        ## REGISTER dependency:  %eax
36# FULLREPORT-NEXT:     |
37# FULLREPORT-NEXT:     |    < loop carried >
38# FULLREPORT-NEXT:     |
39# FULLREPORT-NEXT:     +----> 0.    addl	%eax, %eax                        ## REGISTER dependency:  %eax
40
41# DEFAULTREPORT:      Instruction Info:
42# DEFAULTREPORT-NEXT: [1]: #uOps
43# DEFAULTREPORT-NEXT: [2]: Latency
44# DEFAULTREPORT-NEXT: [3]: RThroughput
45# DEFAULTREPORT-NEXT: [4]: MayLoad
46# DEFAULTREPORT-NEXT: [5]: MayStore
47# DEFAULTREPORT-NEXT: [6]: HasSideEffects (U)
48
49# DEFAULTREPORT:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
50# DEFAULTREPORT-NEXT:  1      1     0.50                        addl	%eax, %eax
51
52# FULLREPORT:         Dynamic Dispatch Stall Cycles:
53# FULLREPORT-NEXT:    RAT     - Register unavailable:                      0
54# FULLREPORT-NEXT:    RCU     - Retire tokens unavailable:                 0
55# FULLREPORT-NEXT:    SCHEDQ  - Scheduler full:                            61  (59.2%)
56# FULLREPORT-NEXT:    LQ      - Load queue full:                           0
57# FULLREPORT-NEXT:    SQ      - Store queue full:                          0
58# FULLREPORT-NEXT:    GROUP   - Static restrictions on the dispatch group: 0
59
60# FULLREPORT:         Dispatch Logic - number of cycles where we saw N micro opcodes dispatched:
61# FULLREPORT-NEXT:    [# dispatched], [# cycles]
62# FULLREPORT-NEXT:     0,              22  (21.4%)
63# FULLREPORT-NEXT:     1,              62  (60.2%)
64# FULLREPORT-NEXT:     2,              19  (18.4%)
65
66# FULLREPORT:         Schedulers - number of cycles where we saw N micro opcodes issued:
67# FULLREPORT-NEXT:    [# issued], [# cycles]
68# FULLREPORT-NEXT:     0,          3  (2.9%)
69# FULLREPORT-NEXT:     1,          100  (97.1%)
70
71# FULLREPORT:         Scheduler's queue usage:
72# FULLREPORT-NEXT:    [1] Resource name.
73# FULLREPORT-NEXT:    [2] Average number of used buffer entries.
74# FULLREPORT-NEXT:    [3] Maximum number of used buffer entries.
75# FULLREPORT-NEXT:    [4] Total number of buffer entries.
76
77# FULLREPORT:          [1]            [2]        [3]        [4]
78# FULLREPORT-NEXT:    JALU01           15         20         20
79# FULLREPORT-NEXT:    JFPU01           0          0          18
80# FULLREPORT-NEXT:    JLSAGU           0          0          12
81
82# FULLREPORT:         Retire Control Unit - number of cycles where we saw N instructions retired:
83# FULLREPORT-NEXT:    [# retired], [# cycles]
84# FULLREPORT-NEXT:     0,           3  (2.9%)
85# FULLREPORT-NEXT:     1,           100  (97.1%)
86
87# FULLREPORT:         Total ROB Entries:                64
88# FULLREPORT-NEXT:    Max Used ROB Entries:             22  ( 34.4% )
89# FULLREPORT-NEXT:    Average Used ROB Entries per cy:  17  ( 26.6% )
90
91# FULLREPORT:         Register File statistics:
92# FULLREPORT-NEXT:    Total number of mappings created:    200
93# FULLREPORT-NEXT:    Max number of mappings used:         44
94
95# FULLREPORT:         *  Register File #1 -- JFpuPRF:
96# FULLREPORT-NEXT:       Number of physical registers:     72
97# FULLREPORT-NEXT:       Total number of mappings created: 0
98# FULLREPORT-NEXT:       Max number of mappings used:      0
99
100# FULLREPORT:         *  Register File #2 -- JIntegerPRF:
101# FULLREPORT-NEXT:       Number of physical registers:     64
102# FULLREPORT-NEXT:       Total number of mappings created: 200
103# FULLREPORT-NEXT:       Max number of mappings used:      44
104
105# DEFAULTREPORT:      Resources:
106# DEFAULTREPORT-NEXT: [0]   - JALU0
107# DEFAULTREPORT-NEXT: [1]   - JALU1
108# DEFAULTREPORT-NEXT: [2]   - JDiv
109# DEFAULTREPORT-NEXT: [3]   - JFPA
110# DEFAULTREPORT-NEXT: [4]   - JFPM
111# DEFAULTREPORT-NEXT: [5]   - JFPU0
112# DEFAULTREPORT-NEXT: [6]   - JFPU1
113# DEFAULTREPORT-NEXT: [7]   - JLAGU
114# DEFAULTREPORT-NEXT: [8]   - JMul
115# DEFAULTREPORT-NEXT: [9]   - JSAGU
116# DEFAULTREPORT-NEXT: [10]  - JSTC
117# DEFAULTREPORT-NEXT: [11]  - JVALU0
118# DEFAULTREPORT-NEXT: [12]  - JVALU1
119# DEFAULTREPORT-NEXT: [13]  - JVIMUL
120
121# DEFAULTREPORT:      Resource pressure per iteration:
122# DEFAULTREPORT-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]   [13]
123# DEFAULTREPORT-NEXT: 0.50   0.50    -      -      -      -      -      -      -      -      -      -      -      -
124
125# DEFAULTREPORT:      Resource pressure by instruction:
126# DEFAULTREPORT-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]   [13]   Instructions:
127# DEFAULTREPORT-NEXT: 0.50   0.50    -      -      -      -      -      -      -      -      -      -      -      -     addl	%eax, %eax
128
129# FULLREPORT:         Timeline view:
130# FULLREPORT-NEXT:                        012
131# FULLREPORT-NEXT:    Index     0123456789
132
133# FULLREPORT:         [0,0]     DeER .    . .   addl	%eax, %eax
134# FULLREPORT-NEXT:    [1,0]     D=eER.    . .   addl	%eax, %eax
135# FULLREPORT-NEXT:    [2,0]     .D=eER    . .   addl	%eax, %eax
136# FULLREPORT-NEXT:    [3,0]     .D==eER   . .   addl	%eax, %eax
137# FULLREPORT-NEXT:    [4,0]     . D==eER  . .   addl	%eax, %eax
138# FULLREPORT-NEXT:    [5,0]     . D===eER . .   addl	%eax, %eax
139# FULLREPORT-NEXT:    [6,0]     .  D===eER. .   addl	%eax, %eax
140# FULLREPORT-NEXT:    [7,0]     .  D====eER .   addl	%eax, %eax
141# FULLREPORT-NEXT:    [8,0]     .   D====eER.   addl	%eax, %eax
142# FULLREPORT-NEXT:    [9,0]     .   D=====eER   addl	%eax, %eax
143
144# FULLREPORT:         Average Wait times (based on the timeline view):
145# FULLREPORT-NEXT:    [0]: Executions
146# FULLREPORT-NEXT:    [1]: Average time spent waiting in a scheduler's queue
147# FULLREPORT-NEXT:    [2]: Average time spent waiting in a scheduler's queue while ready
148# FULLREPORT-NEXT:    [3]: Average time elapsed from WB until retire stage
149
150# FULLREPORT:               [0]    [1]    [2]    [3]
151# FULLREPORT-NEXT:    0.     10    3.5    0.1    0.0       addl	%eax, %eax
152