[InstCombine] Signed saturation patterns
[llvm-core.git] / test / tools / llvm-mca / X86 / BdVer2 / dependency-breaking-sbb-2.s
blob0b48eb597fc14fcba3f3783f811910a88bf04edc
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 a throughput of 1.51 IPC for this block of code.
6 # The SBB does not depend on the value of register EAX. That means, it doesn't
7 # have to wait for the IMUL to write-back on EAX. However, it still depends on
8 # the ADD for EFLAGS.
10 imul %edx, %eax
11 add %edx, %edx
12 sbb %eax, %eax
14 # CHECK: Iterations: 1500
15 # CHECK-NEXT: Instructions: 4500
16 # CHECK-NEXT: Total Cycles: 4014
17 # CHECK-NEXT: Total uOps: 4500
19 # CHECK: Dispatch Width: 4
20 # CHECK-NEXT: uOps Per Cycle: 1.12
21 # CHECK-NEXT: IPC: 1.12
22 # CHECK-NEXT: Block RThroughput: 2.0
24 # CHECK: Instruction Info:
25 # CHECK-NEXT: [1]: #uOps
26 # CHECK-NEXT: [2]: Latency
27 # CHECK-NEXT: [3]: RThroughput
28 # CHECK-NEXT: [4]: MayLoad
29 # CHECK-NEXT: [5]: MayStore
30 # CHECK-NEXT: [6]: HasSideEffects (U)
32 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
33 # CHECK-NEXT: 1 4 2.00 imull %edx, %eax
34 # CHECK-NEXT: 1 1 1.00 addl %edx, %edx
35 # CHECK-NEXT: 1 1 1.00 sbbl %eax, %eax
37 # CHECK: Resources:
38 # CHECK-NEXT: [0.0] - PdAGLU01
39 # CHECK-NEXT: [0.1] - PdAGLU01
40 # CHECK-NEXT: [1] - PdBranch
41 # CHECK-NEXT: [2] - PdCount
42 # CHECK-NEXT: [3] - PdDiv
43 # CHECK-NEXT: [4] - PdEX0
44 # CHECK-NEXT: [5] - PdEX1
45 # CHECK-NEXT: [6] - PdFPCVT
46 # CHECK-NEXT: [7.0] - PdFPFMA
47 # CHECK-NEXT: [7.1] - PdFPFMA
48 # CHECK-NEXT: [8.0] - PdFPMAL
49 # CHECK-NEXT: [8.1] - PdFPMAL
50 # CHECK-NEXT: [9] - PdFPMMA
51 # CHECK-NEXT: [10] - PdFPSTO
52 # CHECK-NEXT: [11] - PdFPU0
53 # CHECK-NEXT: [12] - PdFPU1
54 # CHECK-NEXT: [13] - PdFPU2
55 # CHECK-NEXT: [14] - PdFPU3
56 # CHECK-NEXT: [15] - PdFPXBR
57 # CHECK-NEXT: [16.0] - PdLoad
58 # CHECK-NEXT: [16.1] - PdLoad
59 # CHECK-NEXT: [17] - PdMul
60 # CHECK-NEXT: [18] - PdStore
62 # CHECK: Resource pressure per iteration:
63 # 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]
64 # CHECK-NEXT: - - - - - 2.66 2.34 - - - - - - - - - - - - - - 2.00 -
66 # CHECK: Resource pressure by instruction:
67 # 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:
68 # CHECK-NEXT: - - - - - - 1.00 - - - - - - - - - - - - - - 2.00 - imull %edx, %eax
69 # CHECK-NEXT: - - - - - 1.33 0.67 - - - - - - - - - - - - - - - - addl %edx, %edx
70 # CHECK-NEXT: - - - - - 1.33 0.67 - - - - - - - - - - - - - - - - sbbl %eax, %eax
72 # CHECK: Timeline view:
73 # CHECK-NEXT: 01234
74 # CHECK-NEXT: Index 0123456789
76 # CHECK: [0,0] D==eeeeER . . imull %edx, %eax
77 # CHECK-NEXT: [0,1] DeE-----R . . addl %edx, %edx
78 # CHECK-NEXT: [0,2] D===eE--R . . sbbl %eax, %eax
79 # CHECK-NEXT: [1,0] D=====eeeeER . imull %edx, %eax
80 # CHECK-NEXT: [1,1] .DeE-------R . addl %edx, %edx
81 # CHECK-NEXT: [1,2] .D====eE---R . sbbl %eax, %eax
82 # CHECK-NEXT: [2,0] .D=======eeeeER imull %edx, %eax
83 # CHECK-NEXT: [2,1] .D==eE--------R addl %edx, %edx
84 # CHECK-NEXT: [2,2] . D=====eE----R sbbl %eax, %eax
86 # CHECK: Average Wait times (based on the timeline view):
87 # CHECK-NEXT: [0]: Executions
88 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
89 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
90 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
92 # CHECK: [0] [1] [2] [3]
93 # CHECK-NEXT: 0. 3 5.7 2.0 0.0 imull %edx, %eax
94 # CHECK-NEXT: 1. 3 1.7 0.7 6.7 addl %edx, %edx
95 # CHECK-NEXT: 2. 3 5.0 2.7 3.0 sbbl %eax, %eax
96 # CHECK-NEXT: 3 4.1 1.8 3.2 <total>