[llvm-readelf] - Report a warning when .hash section contains a chain with a cycle.
[llvm-complete.git] / test / tools / llvm-mca / X86 / BtVer2 / zero-idioms-avx-256.s
blobb1669f33405969c1b1668c314013b118a0dfee09
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=3 < %s | FileCheck %s
4 # TODO: Fix the processor resource usage for zero-idiom YMM XOR instructions.
5 # Those vector XOR instructions should only consume 1cy of JFPU1 (instead
6 # of 2cy).
8 # LLVM-MCA-BEGIN ZERO-IDIOM-1
10 vaddps %ymm0, %ymm0, %ymm1
11 vxorps %ymm1, %ymm1, %ymm1
12 vblendps $2, %ymm1, %ymm2, %ymm3
14 # LLVM-MCA-END
16 # LLVM-MCA-BEGIN ZERO-IDIOM-2
18 vaddpd %ymm0, %ymm0, %ymm1
19 vxorpd %ymm1, %ymm1, %ymm1
20 vblendpd $2, %ymm1, %ymm2, %ymm3
22 # LLVM-MCA-END
24 # LLVM-MCA-BEGIN ZERO-IDIOM-3
25 vaddps %ymm0, %ymm1, %ymm2
26 vandnps %ymm2, %ymm2, %ymm3
27 # LLVM-MCA-END
29 # LLVM-MCA-BEGIN ZERO-IDIOM-4
30 vaddps %ymm0, %ymm1, %ymm2
31 vandnps %ymm2, %ymm2, %ymm3
32 # LLVM-MCA-END
34 # LLVM-MCA-BEGIN ZERO-IDIOM-5
35 vperm2f128 $136, %ymm0, %ymm0, %ymm1
36 vaddps %ymm1, %ymm1, %ymm0
37 # LLVM-MCA-END
39 # CHECK: [0] Code Region - ZERO-IDIOM-1
41 # CHECK: Iterations: 100
42 # CHECK-NEXT: Instructions: 300
43 # CHECK-NEXT: Total Cycles: 304
44 # CHECK-NEXT: Total uOps: 600
46 # CHECK: Dispatch Width: 2
47 # CHECK-NEXT: uOps Per Cycle: 1.97
48 # CHECK-NEXT: IPC: 0.99
49 # CHECK-NEXT: Block RThroughput: 3.0
51 # CHECK: Instruction Info:
52 # CHECK-NEXT: [1]: #uOps
53 # CHECK-NEXT: [2]: Latency
54 # CHECK-NEXT: [3]: RThroughput
55 # CHECK-NEXT: [4]: MayLoad
56 # CHECK-NEXT: [5]: MayStore
57 # CHECK-NEXT: [6]: HasSideEffects (U)
59 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
60 # CHECK-NEXT: 2 3 2.00 vaddps %ymm0, %ymm0, %ymm1
61 # CHECK-NEXT: 2 1 0.50 vxorps %ymm1, %ymm1, %ymm1
62 # CHECK-NEXT: 2 1 1.00 vblendps $2, %ymm1, %ymm2, %ymm3
64 # CHECK: Resources:
65 # CHECK-NEXT: [0] - JALU0
66 # CHECK-NEXT: [1] - JALU1
67 # CHECK-NEXT: [2] - JDiv
68 # CHECK-NEXT: [3] - JFPA
69 # CHECK-NEXT: [4] - JFPM
70 # CHECK-NEXT: [5] - JFPU0
71 # CHECK-NEXT: [6] - JFPU1
72 # CHECK-NEXT: [7] - JLAGU
73 # CHECK-NEXT: [8] - JMul
74 # CHECK-NEXT: [9] - JSAGU
75 # CHECK-NEXT: [10] - JSTC
76 # CHECK-NEXT: [11] - JVALU0
77 # CHECK-NEXT: [12] - JVALU1
78 # CHECK-NEXT: [13] - JVIMUL
80 # CHECK: Resource pressure per iteration:
81 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
82 # CHECK-NEXT: - - - 3.00 2.00 3.00 2.00 - - - - - - -
84 # CHECK: Resource pressure by instruction:
85 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
86 # CHECK-NEXT: - - - 2.00 - 2.00 - - - - - - - - vaddps %ymm0, %ymm0, %ymm1
87 # CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vxorps %ymm1, %ymm1, %ymm1
88 # CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vblendps $2, %ymm1, %ymm2, %ymm3
90 # CHECK: Timeline view:
91 # CHECK-NEXT: 0123
92 # CHECK-NEXT: Index 0123456789
94 # CHECK: [0,0] DeeeER . . vaddps %ymm0, %ymm0, %ymm1
95 # CHECK-NEXT: [0,1] .DeE-R . . vxorps %ymm1, %ymm1, %ymm1
96 # CHECK-NEXT: [0,2] . DeE-R . . vblendps $2, %ymm1, %ymm2, %ymm3
97 # CHECK-NEXT: [1,0] . DeeeER . . vaddps %ymm0, %ymm0, %ymm1
98 # CHECK-NEXT: [1,1] . DeE-R . . vxorps %ymm1, %ymm1, %ymm1
99 # CHECK-NEXT: [1,2] . DeE-R. . vblendps $2, %ymm1, %ymm2, %ymm3
100 # CHECK-NEXT: [2,0] . .D=eeeER. vaddps %ymm0, %ymm0, %ymm1
101 # CHECK-NEXT: [2,1] . . DeE--R. vxorps %ymm1, %ymm1, %ymm1
102 # CHECK-NEXT: [2,2] . . DeE--R vblendps $2, %ymm1, %ymm2, %ymm3
104 # CHECK: Average Wait times (based on the timeline view):
105 # CHECK-NEXT: [0]: Executions
106 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
107 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
108 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
110 # CHECK: [0] [1] [2] [3]
111 # CHECK-NEXT: 0. 3 1.3 1.3 0.0 vaddps %ymm0, %ymm0, %ymm1
112 # CHECK-NEXT: 1. 3 1.0 1.0 1.3 vxorps %ymm1, %ymm1, %ymm1
113 # CHECK-NEXT: 2. 3 1.0 0.0 1.3 vblendps $2, %ymm1, %ymm2, %ymm3
115 # CHECK: [1] Code Region - ZERO-IDIOM-2
117 # CHECK: Iterations: 100
118 # CHECK-NEXT: Instructions: 300
119 # CHECK-NEXT: Total Cycles: 304
120 # CHECK-NEXT: Total uOps: 600
122 # CHECK: Dispatch Width: 2
123 # CHECK-NEXT: uOps Per Cycle: 1.97
124 # CHECK-NEXT: IPC: 0.99
125 # CHECK-NEXT: Block RThroughput: 3.0
127 # CHECK: Instruction Info:
128 # CHECK-NEXT: [1]: #uOps
129 # CHECK-NEXT: [2]: Latency
130 # CHECK-NEXT: [3]: RThroughput
131 # CHECK-NEXT: [4]: MayLoad
132 # CHECK-NEXT: [5]: MayStore
133 # CHECK-NEXT: [6]: HasSideEffects (U)
135 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
136 # CHECK-NEXT: 2 3 2.00 vaddpd %ymm0, %ymm0, %ymm1
137 # CHECK-NEXT: 2 1 0.50 vxorpd %ymm1, %ymm1, %ymm1
138 # CHECK-NEXT: 2 1 1.00 vblendpd $2, %ymm1, %ymm2, %ymm3
140 # CHECK: Resources:
141 # CHECK-NEXT: [0] - JALU0
142 # CHECK-NEXT: [1] - JALU1
143 # CHECK-NEXT: [2] - JDiv
144 # CHECK-NEXT: [3] - JFPA
145 # CHECK-NEXT: [4] - JFPM
146 # CHECK-NEXT: [5] - JFPU0
147 # CHECK-NEXT: [6] - JFPU1
148 # CHECK-NEXT: [7] - JLAGU
149 # CHECK-NEXT: [8] - JMul
150 # CHECK-NEXT: [9] - JSAGU
151 # CHECK-NEXT: [10] - JSTC
152 # CHECK-NEXT: [11] - JVALU0
153 # CHECK-NEXT: [12] - JVALU1
154 # CHECK-NEXT: [13] - JVIMUL
156 # CHECK: Resource pressure per iteration:
157 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
158 # CHECK-NEXT: - - - 3.00 2.00 3.00 2.00 - - - - - - -
160 # CHECK: Resource pressure by instruction:
161 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
162 # CHECK-NEXT: - - - 2.00 - 2.00 - - - - - - - - vaddpd %ymm0, %ymm0, %ymm1
163 # CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vxorpd %ymm1, %ymm1, %ymm1
164 # CHECK-NEXT: - - - 1.00 1.00 1.00 1.00 - - - - - - - vblendpd $2, %ymm1, %ymm2, %ymm3
166 # CHECK: Timeline view:
167 # CHECK-NEXT: 0123
168 # CHECK-NEXT: Index 0123456789
170 # CHECK: [0,0] DeeeER . . vaddpd %ymm0, %ymm0, %ymm1
171 # CHECK-NEXT: [0,1] .DeE-R . . vxorpd %ymm1, %ymm1, %ymm1
172 # CHECK-NEXT: [0,2] . DeE-R . . vblendpd $2, %ymm1, %ymm2, %ymm3
173 # CHECK-NEXT: [1,0] . DeeeER . . vaddpd %ymm0, %ymm0, %ymm1
174 # CHECK-NEXT: [1,1] . DeE-R . . vxorpd %ymm1, %ymm1, %ymm1
175 # CHECK-NEXT: [1,2] . DeE-R. . vblendpd $2, %ymm1, %ymm2, %ymm3
176 # CHECK-NEXT: [2,0] . .D=eeeER. vaddpd %ymm0, %ymm0, %ymm1
177 # CHECK-NEXT: [2,1] . . DeE--R. vxorpd %ymm1, %ymm1, %ymm1
178 # CHECK-NEXT: [2,2] . . DeE--R vblendpd $2, %ymm1, %ymm2, %ymm3
180 # CHECK: Average Wait times (based on the timeline view):
181 # CHECK-NEXT: [0]: Executions
182 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
183 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
184 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
186 # CHECK: [0] [1] [2] [3]
187 # CHECK-NEXT: 0. 3 1.3 1.3 0.0 vaddpd %ymm0, %ymm0, %ymm1
188 # CHECK-NEXT: 1. 3 1.0 1.0 1.3 vxorpd %ymm1, %ymm1, %ymm1
189 # CHECK-NEXT: 2. 3 1.0 0.0 1.3 vblendpd $2, %ymm1, %ymm2, %ymm3
191 # CHECK: [2] Code Region - ZERO-IDIOM-3
193 # CHECK: Iterations: 100
194 # CHECK-NEXT: Instructions: 200
195 # CHECK-NEXT: Total Cycles: 204
196 # CHECK-NEXT: Total uOps: 400
198 # CHECK: Dispatch Width: 2
199 # CHECK-NEXT: uOps Per Cycle: 1.96
200 # CHECK-NEXT: IPC: 0.98
201 # CHECK-NEXT: Block RThroughput: 2.0
203 # CHECK: Instruction Info:
204 # CHECK-NEXT: [1]: #uOps
205 # CHECK-NEXT: [2]: Latency
206 # CHECK-NEXT: [3]: RThroughput
207 # CHECK-NEXT: [4]: MayLoad
208 # CHECK-NEXT: [5]: MayStore
209 # CHECK-NEXT: [6]: HasSideEffects (U)
211 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
212 # CHECK-NEXT: 2 3 2.00 vaddps %ymm0, %ymm1, %ymm2
213 # CHECK-NEXT: 2 1 0.50 vandnps %ymm2, %ymm2, %ymm3
215 # CHECK: Resources:
216 # CHECK-NEXT: [0] - JALU0
217 # CHECK-NEXT: [1] - JALU1
218 # CHECK-NEXT: [2] - JDiv
219 # CHECK-NEXT: [3] - JFPA
220 # CHECK-NEXT: [4] - JFPM
221 # CHECK-NEXT: [5] - JFPU0
222 # CHECK-NEXT: [6] - JFPU1
223 # CHECK-NEXT: [7] - JLAGU
224 # CHECK-NEXT: [8] - JMul
225 # CHECK-NEXT: [9] - JSAGU
226 # CHECK-NEXT: [10] - JSTC
227 # CHECK-NEXT: [11] - JVALU0
228 # CHECK-NEXT: [12] - JVALU1
229 # CHECK-NEXT: [13] - JVIMUL
231 # CHECK: Resource pressure per iteration:
232 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
233 # CHECK-NEXT: - - - 2.00 1.00 2.00 1.00 - - - - - - -
235 # CHECK: Resource pressure by instruction:
236 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
237 # CHECK-NEXT: - - - 2.00 - 2.00 - - - - - - - - vaddps %ymm0, %ymm1, %ymm2
238 # CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vandnps %ymm2, %ymm2, %ymm3
240 # CHECK: Timeline view:
241 # CHECK-NEXT: Index 0123456789
243 # CHECK: [0,0] DeeeER . vaddps %ymm0, %ymm1, %ymm2
244 # CHECK-NEXT: [0,1] .DeE-R . vandnps %ymm2, %ymm2, %ymm3
245 # CHECK-NEXT: [1,0] . DeeeER . vaddps %ymm0, %ymm1, %ymm2
246 # CHECK-NEXT: [1,1] . DeE-R . vandnps %ymm2, %ymm2, %ymm3
247 # CHECK-NEXT: [2,0] . DeeeER vaddps %ymm0, %ymm1, %ymm2
248 # CHECK-NEXT: [2,1] . DeE-R vandnps %ymm2, %ymm2, %ymm3
250 # CHECK: Average Wait times (based on the timeline view):
251 # CHECK-NEXT: [0]: Executions
252 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
253 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
254 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
256 # CHECK: [0] [1] [2] [3]
257 # CHECK-NEXT: 0. 3 1.0 1.0 0.0 vaddps %ymm0, %ymm1, %ymm2
258 # CHECK-NEXT: 1. 3 1.0 1.0 1.0 vandnps %ymm2, %ymm2, %ymm3
260 # CHECK: [3] Code Region - ZERO-IDIOM-4
262 # CHECK: Iterations: 100
263 # CHECK-NEXT: Instructions: 200
264 # CHECK-NEXT: Total Cycles: 204
265 # CHECK-NEXT: Total uOps: 400
267 # CHECK: Dispatch Width: 2
268 # CHECK-NEXT: uOps Per Cycle: 1.96
269 # CHECK-NEXT: IPC: 0.98
270 # CHECK-NEXT: Block RThroughput: 2.0
272 # CHECK: Instruction Info:
273 # CHECK-NEXT: [1]: #uOps
274 # CHECK-NEXT: [2]: Latency
275 # CHECK-NEXT: [3]: RThroughput
276 # CHECK-NEXT: [4]: MayLoad
277 # CHECK-NEXT: [5]: MayStore
278 # CHECK-NEXT: [6]: HasSideEffects (U)
280 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
281 # CHECK-NEXT: 2 3 2.00 vaddps %ymm0, %ymm1, %ymm2
282 # CHECK-NEXT: 2 1 0.50 vandnps %ymm2, %ymm2, %ymm3
284 # CHECK: Resources:
285 # CHECK-NEXT: [0] - JALU0
286 # CHECK-NEXT: [1] - JALU1
287 # CHECK-NEXT: [2] - JDiv
288 # CHECK-NEXT: [3] - JFPA
289 # CHECK-NEXT: [4] - JFPM
290 # CHECK-NEXT: [5] - JFPU0
291 # CHECK-NEXT: [6] - JFPU1
292 # CHECK-NEXT: [7] - JLAGU
293 # CHECK-NEXT: [8] - JMul
294 # CHECK-NEXT: [9] - JSAGU
295 # CHECK-NEXT: [10] - JSTC
296 # CHECK-NEXT: [11] - JVALU0
297 # CHECK-NEXT: [12] - JVALU1
298 # CHECK-NEXT: [13] - JVIMUL
300 # CHECK: Resource pressure per iteration:
301 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
302 # CHECK-NEXT: - - - 2.00 1.00 2.00 1.00 - - - - - - -
304 # CHECK: Resource pressure by instruction:
305 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
306 # CHECK-NEXT: - - - 2.00 - 2.00 - - - - - - - - vaddps %ymm0, %ymm1, %ymm2
307 # CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vandnps %ymm2, %ymm2, %ymm3
309 # CHECK: Timeline view:
310 # CHECK-NEXT: Index 0123456789
312 # CHECK: [0,0] DeeeER . vaddps %ymm0, %ymm1, %ymm2
313 # CHECK-NEXT: [0,1] .DeE-R . vandnps %ymm2, %ymm2, %ymm3
314 # CHECK-NEXT: [1,0] . DeeeER . vaddps %ymm0, %ymm1, %ymm2
315 # CHECK-NEXT: [1,1] . DeE-R . vandnps %ymm2, %ymm2, %ymm3
316 # CHECK-NEXT: [2,0] . DeeeER vaddps %ymm0, %ymm1, %ymm2
317 # CHECK-NEXT: [2,1] . DeE-R vandnps %ymm2, %ymm2, %ymm3
319 # CHECK: Average Wait times (based on the timeline view):
320 # CHECK-NEXT: [0]: Executions
321 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
322 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
323 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
325 # CHECK: [0] [1] [2] [3]
326 # CHECK-NEXT: 0. 3 1.0 1.0 0.0 vaddps %ymm0, %ymm1, %ymm2
327 # CHECK-NEXT: 1. 3 1.0 1.0 1.0 vandnps %ymm2, %ymm2, %ymm3
329 # CHECK: [4] Code Region - ZERO-IDIOM-5
331 # CHECK: Iterations: 100
332 # CHECK-NEXT: Instructions: 200
333 # CHECK-NEXT: Total Cycles: 205
334 # CHECK-NEXT: Total uOps: 400
336 # CHECK: Dispatch Width: 2
337 # CHECK-NEXT: uOps Per Cycle: 1.95
338 # CHECK-NEXT: IPC: 0.98
339 # CHECK-NEXT: Block RThroughput: 2.0
341 # CHECK: Instruction Info:
342 # CHECK-NEXT: [1]: #uOps
343 # CHECK-NEXT: [2]: Latency
344 # CHECK-NEXT: [3]: RThroughput
345 # CHECK-NEXT: [4]: MayLoad
346 # CHECK-NEXT: [5]: MayStore
347 # CHECK-NEXT: [6]: HasSideEffects (U)
349 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
350 # CHECK-NEXT: 2 1 0.50 vperm2f128 $136, %ymm0, %ymm0, %ymm1
351 # CHECK-NEXT: 2 3 2.00 vaddps %ymm1, %ymm1, %ymm0
353 # CHECK: Resources:
354 # CHECK-NEXT: [0] - JALU0
355 # CHECK-NEXT: [1] - JALU1
356 # CHECK-NEXT: [2] - JDiv
357 # CHECK-NEXT: [3] - JFPA
358 # CHECK-NEXT: [4] - JFPM
359 # CHECK-NEXT: [5] - JFPU0
360 # CHECK-NEXT: [6] - JFPU1
361 # CHECK-NEXT: [7] - JLAGU
362 # CHECK-NEXT: [8] - JMul
363 # CHECK-NEXT: [9] - JSAGU
364 # CHECK-NEXT: [10] - JSTC
365 # CHECK-NEXT: [11] - JVALU0
366 # CHECK-NEXT: [12] - JVALU1
367 # CHECK-NEXT: [13] - JVIMUL
369 # CHECK: Resource pressure per iteration:
370 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
371 # CHECK-NEXT: - - - 2.00 1.00 2.00 1.00 - - - - - - -
373 # CHECK: Resource pressure by instruction:
374 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
375 # CHECK-NEXT: - - - - 1.00 - 1.00 - - - - - - - vperm2f128 $136, %ymm0, %ymm0, %ymm1
376 # CHECK-NEXT: - - - 2.00 - 2.00 - - - - - - - - vaddps %ymm1, %ymm1, %ymm0
378 # CHECK: Timeline view:
379 # CHECK-NEXT: 0
380 # CHECK-NEXT: Index 0123456789
382 # CHECK: [0,0] DeER . . vperm2f128 $136, %ymm0, %ymm0, %ymm1
383 # CHECK-NEXT: [0,1] .DeeeER . vaddps %ymm1, %ymm1, %ymm0
384 # CHECK-NEXT: [1,0] . DeE-R . vperm2f128 $136, %ymm0, %ymm0, %ymm1
385 # CHECK-NEXT: [1,1] . DeeeER . vaddps %ymm1, %ymm1, %ymm0
386 # CHECK-NEXT: [2,0] . DeE-R . vperm2f128 $136, %ymm0, %ymm0, %ymm1
387 # CHECK-NEXT: [2,1] . DeeeER vaddps %ymm1, %ymm1, %ymm0
389 # CHECK: Average Wait times (based on the timeline view):
390 # CHECK-NEXT: [0]: Executions
391 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
392 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
393 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
395 # CHECK: [0] [1] [2] [3]
396 # CHECK-NEXT: 0. 3 1.0 1.0 0.7 vperm2f128 $136, %ymm0, %ymm0, %ymm1
397 # CHECK-NEXT: 1. 3 1.0 0.0 0.0 vaddps %ymm1, %ymm1, %ymm0