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 2.00 for this block of code.
6 # All of the vector packed compares from this test are dependency breaking
7 # instructions. That means, there is no RAW dependency between any of the
8 # instructions, and the code can be fully parallelized in hardware.
10 vpcmpeqb
%xmm0
, %xmm0
, %xmm1
11 vpcmpeqw
%xmm1
, %xmm1
, %xmm2
12 vpcmpeqd
%xmm2
, %xmm2
, %xmm3
13 vpcmpeqq
%xmm3
, %xmm3
, %xmm0
15 # CHECK: Iterations: 1500
16 # CHECK-NEXT: Instructions: 6000
17 # CHECK-NEXT: Total Cycles: 6003
18 # CHECK-NEXT: Total uOps: 6000
20 # CHECK: Dispatch Width: 4
21 # CHECK-NEXT: uOps Per Cycle: 1.00
22 # CHECK-NEXT: IPC: 1.00
23 # CHECK-NEXT: Block RThroughput: 4.0
25 # CHECK: Instruction Info:
26 # CHECK-NEXT: [1]: #uOps
27 # CHECK-NEXT: [2]: Latency
28 # CHECK-NEXT: [3]: RThroughput
29 # CHECK-NEXT: [4]: MayLoad
30 # CHECK-NEXT: [5]: MayStore
31 # CHECK-NEXT: [6]: HasSideEffects (U)
33 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
34 # CHECK-NEXT: 1 2 1.00 vpcmpeqb %xmm0, %xmm0, %xmm1
35 # CHECK-NEXT: 1 2 1.00 vpcmpeqw %xmm1, %xmm1, %xmm2
36 # CHECK-NEXT: 1 2 1.00 vpcmpeqd %xmm2, %xmm2, %xmm3
37 # CHECK-NEXT: 1 2 1.00 vpcmpeqq %xmm3, %xmm3, %xmm0
40 # CHECK-NEXT: [0.0] - PdAGLU01
41 # CHECK-NEXT: [0.1] - PdAGLU01
42 # CHECK-NEXT: [1] - PdBranch
43 # CHECK-NEXT: [2] - PdCount
44 # CHECK-NEXT: [3] - PdDiv
45 # CHECK-NEXT: [4] - PdEX0
46 # CHECK-NEXT: [5] - PdEX1
47 # CHECK-NEXT: [6] - PdFPCVT
48 # CHECK-NEXT: [7.0] - PdFPFMA
49 # CHECK-NEXT: [7.1] - PdFPFMA
50 # CHECK-NEXT: [8.0] - PdFPMAL
51 # CHECK-NEXT: [8.1] - PdFPMAL
52 # CHECK-NEXT: [9] - PdFPMMA
53 # CHECK-NEXT: [10] - PdFPSTO
54 # CHECK-NEXT: [11] - PdFPU0
55 # CHECK-NEXT: [12] - PdFPU1
56 # CHECK-NEXT: [13] - PdFPU2
57 # CHECK-NEXT: [14] - PdFPU3
58 # CHECK-NEXT: [15] - PdFPXBR
59 # CHECK-NEXT: [16.0] - PdLoad
60 # CHECK-NEXT: [16.1] - PdLoad
61 # CHECK-NEXT: [17] - PdMul
62 # CHECK-NEXT: [18] - PdStore
64 # CHECK: Resource pressure per iteration:
65 # 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]
66 # CHECK-NEXT: - - - - - - - - - - 4.00 4.00 - - 2.00 2.00 - - - - - - -
68 # CHECK: Resource pressure by instruction:
69 # 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:
70 # CHECK-NEXT: - - - - - - - - - - - 2.00 - - - 1.00 - - - - - - - vpcmpeqb %xmm0, %xmm0, %xmm1
71 # CHECK-NEXT: - - - - - - - - - - - 2.00 - - - 1.00 - - - - - - - vpcmpeqw %xmm1, %xmm1, %xmm2
72 # CHECK-NEXT: - - - - - - - - - - 2.00 - - - 1.00 - - - - - - - - vpcmpeqd %xmm2, %xmm2, %xmm3
73 # CHECK-NEXT: - - - - - - - - - - 2.00 - - - 1.00 - - - - - - - - vpcmpeqq %xmm3, %xmm3, %xmm0
75 # CHECK: Timeline view:
77 # CHECK-NEXT: Index 0123456789
79 # CHECK: [0,0] DeeER. . . vpcmpeqb %xmm0, %xmm0, %xmm1
80 # CHECK-NEXT: [0,1] D==eeER . . vpcmpeqw %xmm1, %xmm1, %xmm2
81 # CHECK-NEXT: [0,2] DeeE--R . . vpcmpeqd %xmm2, %xmm2, %xmm3
82 # CHECK-NEXT: [0,3] D==eeER . . vpcmpeqq %xmm3, %xmm3, %xmm0
83 # CHECK-NEXT: [1,0] .D===eeER . . vpcmpeqb %xmm0, %xmm0, %xmm1
84 # CHECK-NEXT: [1,1] .D=====eeER . vpcmpeqw %xmm1, %xmm1, %xmm2
85 # CHECK-NEXT: [1,2] .D===eeE--R . vpcmpeqd %xmm2, %xmm2, %xmm3
86 # CHECK-NEXT: [1,3] .D=====eeER . vpcmpeqq %xmm3, %xmm3, %xmm0
87 # CHECK-NEXT: [2,0] . D======eeER . vpcmpeqb %xmm0, %xmm0, %xmm1
88 # CHECK-NEXT: [2,1] . D========eeER vpcmpeqw %xmm1, %xmm1, %xmm2
89 # CHECK-NEXT: [2,2] . D======eeE--R vpcmpeqd %xmm2, %xmm2, %xmm3
90 # CHECK-NEXT: [2,3] . D========eeER vpcmpeqq %xmm3, %xmm3, %xmm0
92 # CHECK: Average Wait times (based on the timeline view):
93 # CHECK-NEXT: [0]: Executions
94 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
95 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
96 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
98 # CHECK: [0] [1] [2] [3]
99 # CHECK-NEXT: 0. 3 4.0 4.0 0.0 vpcmpeqb %xmm0, %xmm0, %xmm1
100 # CHECK-NEXT: 1. 3 6.0 6.0 0.0 vpcmpeqw %xmm1, %xmm1, %xmm2
101 # CHECK-NEXT: 2. 3 4.0 4.0 2.0 vpcmpeqd %xmm2, %xmm2, %xmm3
102 # CHECK-NEXT: 3. 3 6.0 0.0 0.0 vpcmpeqq %xmm3, %xmm3, %xmm0
103 # CHECK-NEXT: 3 5.0 3.5 0.5 <total>