1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -timeline -timeline-max-iterations=1 -register-file-stats < %s | FileCheck %s
4 # These are dependency-breaking one-idioms.
5 # Much like zero-idioms, but they produce ones, and do consume resources.
7 # perf stats reports a throughput of 2.00 IPC.
18 vpcmpeqb
%xmm3
, %xmm3
, %xmm3
19 vpcmpeqd
%xmm3
, %xmm3
, %xmm3
20 vpcmpeqq
%xmm3
, %xmm3
, %xmm3
21 vpcmpeqw
%xmm3
, %xmm3
, %xmm3
23 vpcmpeqb
%xmm3
, %xmm3
, %xmm5
24 vpcmpeqd
%xmm3
, %xmm3
, %xmm5
25 vpcmpeqq
%xmm3
, %xmm3
, %xmm5
26 vpcmpeqw
%xmm3
, %xmm3
, %xmm5
28 # FIXME: their handling is broken in llvm-mca.
30 # CHECK: Iterations: 100
31 # CHECK-NEXT: Instructions: 1500
32 # CHECK-NEXT: Total Cycles: 753
33 # CHECK-NEXT: Total uOps: 1500
35 # CHECK: Dispatch Width: 2
36 # CHECK-NEXT: uOps Per Cycle: 1.99
37 # CHECK-NEXT: IPC: 1.99
38 # CHECK-NEXT: Block RThroughput: 7.5
40 # CHECK: Instruction Info:
41 # CHECK-NEXT: [1]: #uOps
42 # CHECK-NEXT: [2]: Latency
43 # CHECK-NEXT: [3]: RThroughput
44 # CHECK-NEXT: [4]: MayLoad
45 # CHECK-NEXT: [5]: MayStore
46 # CHECK-NEXT: [6]: HasSideEffects (U)
48 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
49 # CHECK-NEXT: 1 1 0.50 pcmpeqb %mm2, %mm2
50 # CHECK-NEXT: 1 1 0.50 pcmpeqd %mm2, %mm2
51 # CHECK-NEXT: 1 1 0.50 pcmpeqw %mm2, %mm2
52 # CHECK-NEXT: 1 1 0.50 pcmpeqb %xmm2, %xmm2
53 # CHECK-NEXT: 1 1 0.50 pcmpeqd %xmm2, %xmm2
54 # CHECK-NEXT: 1 1 0.50 pcmpeqq %xmm2, %xmm2
55 # CHECK-NEXT: 1 1 0.50 pcmpeqw %xmm2, %xmm2
56 # CHECK-NEXT: 1 1 0.50 vpcmpeqb %xmm3, %xmm3, %xmm3
57 # CHECK-NEXT: 1 1 0.50 vpcmpeqd %xmm3, %xmm3, %xmm3
58 # CHECK-NEXT: 1 1 0.50 vpcmpeqq %xmm3, %xmm3, %xmm3
59 # CHECK-NEXT: 1 1 0.50 vpcmpeqw %xmm3, %xmm3, %xmm3
60 # CHECK-NEXT: 1 1 0.50 vpcmpeqb %xmm3, %xmm3, %xmm5
61 # CHECK-NEXT: 1 1 0.50 vpcmpeqd %xmm3, %xmm3, %xmm5
62 # CHECK-NEXT: 1 1 0.50 vpcmpeqq %xmm3, %xmm3, %xmm5
63 # CHECK-NEXT: 1 1 0.50 vpcmpeqw %xmm3, %xmm3, %xmm5
65 # CHECK: Register File statistics:
66 # CHECK-NEXT: Total number of mappings created: 1500
67 # CHECK-NEXT: Max number of mappings used: 6
69 # CHECK: * Register File #1 -- JFpuPRF:
70 # CHECK-NEXT: Number of physical registers: 72
71 # CHECK-NEXT: Total number of mappings created: 1500
72 # CHECK-NEXT: Max number of mappings used: 6
74 # CHECK: * Register File #2 -- JIntegerPRF:
75 # CHECK-NEXT: Number of physical registers: 64
76 # CHECK-NEXT: Total number of mappings created: 0
77 # CHECK-NEXT: Max number of mappings used: 0
80 # CHECK-NEXT: [0] - JALU0
81 # CHECK-NEXT: [1] - JALU1
82 # CHECK-NEXT: [2] - JDiv
83 # CHECK-NEXT: [3] - JFPA
84 # CHECK-NEXT: [4] - JFPM
85 # CHECK-NEXT: [5] - JFPU0
86 # CHECK-NEXT: [6] - JFPU1
87 # CHECK-NEXT: [7] - JLAGU
88 # CHECK-NEXT: [8] - JMul
89 # CHECK-NEXT: [9] - JSAGU
90 # CHECK-NEXT: [10] - JSTC
91 # CHECK-NEXT: [11] - JVALU0
92 # CHECK-NEXT: [12] - JVALU1
93 # CHECK-NEXT: [13] - JVIMUL
95 # CHECK: Resource pressure per iteration:
96 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
97 # CHECK-NEXT: - - - - - 7.50 7.50 - - - - 7.50 7.50 -
99 # CHECK: Resource pressure by instruction:
100 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
101 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqb %mm2, %mm2
102 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqd %mm2, %mm2
103 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqw %mm2, %mm2
104 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqb %xmm2, %xmm2
105 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqd %xmm2, %xmm2
106 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqq %xmm2, %xmm2
107 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - pcmpeqw %xmm2, %xmm2
108 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqb %xmm3, %xmm3, %xmm3
109 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqd %xmm3, %xmm3, %xmm3
110 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqq %xmm3, %xmm3, %xmm3
111 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqw %xmm3, %xmm3, %xmm3
112 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqb %xmm3, %xmm3, %xmm5
113 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqd %xmm3, %xmm3, %xmm5
114 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqq %xmm3, %xmm3, %xmm5
115 # CHECK-NEXT: - - - - - 0.50 0.50 - - - - 0.50 0.50 - vpcmpeqw %xmm3, %xmm3, %xmm5
117 # CHECK: Timeline view:
119 # CHECK-NEXT: Index 0123456789
121 # CHECK: [0,0] DeER . . pcmpeqb %mm2, %mm2
122 # CHECK-NEXT: [0,1] DeER . . pcmpeqd %mm2, %mm2
123 # CHECK-NEXT: [0,2] .DeER. . pcmpeqw %mm2, %mm2
124 # CHECK-NEXT: [0,3] .DeER. . pcmpeqb %xmm2, %xmm2
125 # CHECK-NEXT: [0,4] . DeER . pcmpeqd %xmm2, %xmm2
126 # CHECK-NEXT: [0,5] . DeER . pcmpeqq %xmm2, %xmm2
127 # CHECK-NEXT: [0,6] . DeER . pcmpeqw %xmm2, %xmm2
128 # CHECK-NEXT: [0,7] . DeER . vpcmpeqb %xmm3, %xmm3, %xmm3
129 # CHECK-NEXT: [0,8] . DeER . vpcmpeqd %xmm3, %xmm3, %xmm3
130 # CHECK-NEXT: [0,9] . DeER . vpcmpeqq %xmm3, %xmm3, %xmm3
131 # CHECK-NEXT: [0,10] . DeER . vpcmpeqw %xmm3, %xmm3, %xmm3
132 # CHECK-NEXT: [0,11] . DeER . vpcmpeqb %xmm3, %xmm3, %xmm5
133 # CHECK-NEXT: [0,12] . .DeER. vpcmpeqd %xmm3, %xmm3, %xmm5
134 # CHECK-NEXT: [0,13] . .DeER. vpcmpeqq %xmm3, %xmm3, %xmm5
135 # CHECK-NEXT: [0,14] . . DeER vpcmpeqw %xmm3, %xmm3, %xmm5
137 # CHECK: Average Wait times (based on the timeline view):
138 # CHECK-NEXT: [0]: Executions
139 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
140 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
141 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
143 # CHECK: [0] [1] [2] [3]
144 # CHECK-NEXT: 0. 1 1.0 1.0 0.0 pcmpeqb %mm2, %mm2
145 # CHECK-NEXT: 1. 1 1.0 1.0 0.0 pcmpeqd %mm2, %mm2
146 # CHECK-NEXT: 2. 1 1.0 1.0 0.0 pcmpeqw %mm2, %mm2
147 # CHECK-NEXT: 3. 1 1.0 1.0 0.0 pcmpeqb %xmm2, %xmm2
148 # CHECK-NEXT: 4. 1 1.0 1.0 0.0 pcmpeqd %xmm2, %xmm2
149 # CHECK-NEXT: 5. 1 1.0 1.0 0.0 pcmpeqq %xmm2, %xmm2
150 # CHECK-NEXT: 6. 1 1.0 1.0 0.0 pcmpeqw %xmm2, %xmm2
151 # CHECK-NEXT: 7. 1 1.0 1.0 0.0 vpcmpeqb %xmm3, %xmm3, %xmm3
152 # CHECK-NEXT: 8. 1 1.0 1.0 0.0 vpcmpeqd %xmm3, %xmm3, %xmm3
153 # CHECK-NEXT: 9. 1 1.0 1.0 0.0 vpcmpeqq %xmm3, %xmm3, %xmm3
154 # CHECK-NEXT: 10. 1 1.0 1.0 0.0 vpcmpeqw %xmm3, %xmm3, %xmm3
155 # CHECK-NEXT: 11. 1 1.0 1.0 0.0 vpcmpeqb %xmm3, %xmm3, %xmm5
156 # CHECK-NEXT: 12. 1 1.0 1.0 0.0 vpcmpeqd %xmm3, %xmm3, %xmm5
157 # CHECK-NEXT: 13. 1 1.0 1.0 0.0 vpcmpeqq %xmm3, %xmm3, %xmm5
158 # CHECK-NEXT: 14. 1 1.0 1.0 0.0 vpcmpeqw %xmm3, %xmm3, %xmm5