[InstCombine] Signed saturation patterns
[llvm-core.git] / test / tools / llvm-mca / X86 / BdVer2 / dependency-breaking-cmp.s
blobfbf47e4d83ef877923030018aa73fb5d5a0100e6
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -timeline -timeline-max-iterations=3 -iterations=1500 < %s | FileCheck %s
4 # Perf stat reports an IPC of 1.97 for this block of code.
6 # The CMP instruction doesn't depend on the value of EAX. It can set the flags
7 # without having to read the inputs.
9 cmp %eax, %eax
10 cmovae %ebx, %eax
12 # CHECK: Iterations: 1500
13 # CHECK-NEXT: Instructions: 3000
14 # CHECK-NEXT: Total Cycles: 2253
15 # CHECK-NEXT: Total uOps: 3000
17 # CHECK: Dispatch Width: 4
18 # CHECK-NEXT: uOps Per Cycle: 1.33
19 # CHECK-NEXT: IPC: 1.33
20 # CHECK-NEXT: Block RThroughput: 1.5
22 # CHECK: Instruction Info:
23 # CHECK-NEXT: [1]: #uOps
24 # CHECK-NEXT: [2]: Latency
25 # CHECK-NEXT: [3]: RThroughput
26 # CHECK-NEXT: [4]: MayLoad
27 # CHECK-NEXT: [5]: MayStore
28 # CHECK-NEXT: [6]: HasSideEffects (U)
30 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
31 # CHECK-NEXT: 1 1 1.00 cmpl %eax, %eax
32 # CHECK-NEXT: 1 1 0.50 cmovael %ebx, %eax
34 # CHECK: Resources:
35 # CHECK-NEXT: [0.0] - PdAGLU01
36 # CHECK-NEXT: [0.1] - PdAGLU01
37 # CHECK-NEXT: [1] - PdBranch
38 # CHECK-NEXT: [2] - PdCount
39 # CHECK-NEXT: [3] - PdDiv
40 # CHECK-NEXT: [4] - PdEX0
41 # CHECK-NEXT: [5] - PdEX1
42 # CHECK-NEXT: [6] - PdFPCVT
43 # CHECK-NEXT: [7.0] - PdFPFMA
44 # CHECK-NEXT: [7.1] - PdFPFMA
45 # CHECK-NEXT: [8.0] - PdFPMAL
46 # CHECK-NEXT: [8.1] - PdFPMAL
47 # CHECK-NEXT: [9] - PdFPMMA
48 # CHECK-NEXT: [10] - PdFPSTO
49 # CHECK-NEXT: [11] - PdFPU0
50 # CHECK-NEXT: [12] - PdFPU1
51 # CHECK-NEXT: [13] - PdFPU2
52 # CHECK-NEXT: [14] - PdFPU3
53 # CHECK-NEXT: [15] - PdFPXBR
54 # CHECK-NEXT: [16.0] - PdLoad
55 # CHECK-NEXT: [16.1] - PdLoad
56 # CHECK-NEXT: [17] - PdMul
57 # CHECK-NEXT: [18] - PdStore
59 # CHECK: Resource pressure per iteration:
60 # CHECK-NEXT: [0.0] [0.1] [1] [2] [3] [4] [5] [6] [7.0] [7.1] [8.0] [8.1] [9] [10] [11] [12] [13] [14] [15] [16.0] [16.1] [17] [18]
61 # CHECK-NEXT: - - - - - 1.50 1.50 - - - - - - - - - - - - - - - -
63 # CHECK: Resource pressure by instruction:
64 # CHECK-NEXT: [0.0] [0.1] [1] [2] [3] [4] [5] [6] [7.0] [7.1] [8.0] [8.1] [9] [10] [11] [12] [13] [14] [15] [16.0] [16.1] [17] [18] Instructions:
65 # CHECK-NEXT: - - - - - 1.00 1.00 - - - - - - - - - - - - - - - - cmpl %eax, %eax
66 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - - - - - - - - - - - - - cmovael %ebx, %eax
68 # CHECK: Timeline view:
69 # CHECK-NEXT: Index 01234567
71 # CHECK: [0,0] DeER . . cmpl %eax, %eax
72 # CHECK-NEXT: [0,1] D==eER . cmovael %ebx, %eax
73 # CHECK-NEXT: [1,0] DeE--R . cmpl %eax, %eax
74 # CHECK-NEXT: [1,1] D===eER. cmovael %ebx, %eax
75 # CHECK-NEXT: [2,0] .D=eE-R. cmpl %eax, %eax
76 # CHECK-NEXT: [2,1] .D===eER cmovael %ebx, %eax
78 # CHECK: Average Wait times (based on the timeline view):
79 # CHECK-NEXT: [0]: Executions
80 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
81 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
82 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
84 # CHECK: [0] [1] [2] [3]
85 # CHECK-NEXT: 0. 3 1.3 1.3 1.0 cmpl %eax, %eax
86 # CHECK-NEXT: 1. 3 3.7 0.3 0.0 cmovael %ebx, %eax
87 # CHECK-NEXT: 3 2.5 0.8 0.5 <total>