1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -timeline -timeline-max-iterations=3 -iterations=1500 < %s | FileCheck %s
3
4# The CMP instruction doesn't depend on the value of EAX.  It can set the flags
5# without having to read the inputs.
6
7cmp %eax, %eax
8cmovae %ebx, %eax
9
10# CHECK:      Iterations:        1500
11# CHECK-NEXT: Instructions:      3000
12# CHECK-NEXT: Total Cycles:      4503
13# CHECK-NEXT: Total uOps:        4500
14
15# CHECK:      Dispatch Width:    4
16# CHECK-NEXT: uOps Per Cycle:    1.00
17# CHECK-NEXT: IPC:               0.67
18# CHECK-NEXT: Block RThroughput: 0.8
19
20# CHECK:      Instruction Info:
21# CHECK-NEXT: [1]: #uOps
22# CHECK-NEXT: [2]: Latency
23# CHECK-NEXT: [3]: RThroughput
24# CHECK-NEXT: [4]: MayLoad
25# CHECK-NEXT: [5]: MayStore
26# CHECK-NEXT: [6]: HasSideEffects (U)
27
28# CHECK:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
29# CHECK-NEXT:  1      1     0.33                        cmpl	%eax, %eax
30# CHECK-NEXT:  2      2     0.67                        cmovael	%ebx, %eax
31
32# CHECK:      Resources:
33# CHECK-NEXT: [0]   - SBDivider
34# CHECK-NEXT: [1]   - SBFPDivider
35# CHECK-NEXT: [2]   - SBPort0
36# CHECK-NEXT: [3]   - SBPort1
37# CHECK-NEXT: [4]   - SBPort4
38# CHECK-NEXT: [5]   - SBPort5
39# CHECK-NEXT: [6.0] - SBPort23
40# CHECK-NEXT: [6.1] - SBPort23
41
42# CHECK:      Resource pressure per iteration:
43# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]
44# CHECK-NEXT:  -      -     1.00   1.00    -     1.00    -      -
45
46# CHECK:      Resource pressure by instruction:
47# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]  Instructions:
48# CHECK-NEXT:  -      -      -      -      -     1.00    -      -     cmpl	%eax, %eax
49# CHECK-NEXT:  -      -     1.00   1.00    -      -      -      -     cmovael	%ebx, %eax
50
51# CHECK:      Timeline view:
52# CHECK-NEXT:                     01
53# CHECK-NEXT: Index     0123456789
54
55# CHECK:      [0,0]     DeER .    ..   cmpl	%eax, %eax
56# CHECK-NEXT: [0,1]     D=eeER    ..   cmovael	%ebx, %eax
57# CHECK-NEXT: [1,0]     D===eER   ..   cmpl	%eax, %eax
58# CHECK-NEXT: [1,1]     .D===eeER ..   cmovael	%ebx, %eax
59# CHECK-NEXT: [2,0]     .D=====eER..   cmpl	%eax, %eax
60# CHECK-NEXT: [2,1]     . D=====eeER   cmovael	%ebx, %eax
61
62# CHECK:      Average Wait times (based on the timeline view):
63# CHECK-NEXT: [0]: Executions
64# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
65# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
66# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
67
68# CHECK:            [0]    [1]    [2]    [3]
69# CHECK-NEXT: 0.     3     3.7    0.3    0.0       cmpl	%eax, %eax
70# CHECK-NEXT: 1.     3     4.0    0.0    0.0       cmovael	%ebx, %eax
71# CHECK-NEXT:        3     3.8    0.2    0.0       <total>
72