1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell --json -all-views < %s | FileCheck %s
3 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell --json -all-views -o %t.json < %s
5 # RUN: | %python -c 'import json, sys; json.dump(json.loads(sys.stdin.read()), sys.stdout, sort_keys=True, indent=2)' \
20 # CHECK-NEXT: "CodeRegions": [
22 # CHECK-NEXT: "DispatchStatistics": {
23 # CHECK-NEXT: "GROUP": 0,
24 # CHECK-NEXT: "LQ": 0,
25 # CHECK-NEXT: "RAT": 0,
26 # CHECK-NEXT: "RCU": 0,
27 # CHECK-NEXT: "SCHEDQ": 21,
28 # CHECK-NEXT: "SQ": 0,
29 # CHECK-NEXT: "USH": 0
31 # CHECK-NEXT: "InstructionInfoView": {
32 # CHECK-NEXT: "InstructionList": [
34 # CHECK-NEXT: "Instruction": 0,
35 # CHECK-NEXT: "Latency": 1,
36 # CHECK-NEXT: "NumMicroOpcodes": 1,
37 # CHECK-NEXT: "RThroughput": 0.25,
38 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
39 # CHECK-NEXT: "mayLoad": false,
40 # CHECK-NEXT: "mayStore": false
44 # CHECK-NEXT: "Instructions": [
45 # CHECK-NEXT: "addl\t%eax, %eax"
47 # CHECK-NEXT: "Name": "",
48 # CHECK-NEXT: "ResourcePressureView": {
49 # CHECK-NEXT: "ResourcePressureInfo": [
51 # CHECK-NEXT: "InstructionIndex": 0,
52 # CHECK-NEXT: "ResourceIndex": 2,
53 # CHECK-NEXT: "ResourceUsage": 0.25
56 # CHECK-NEXT: "InstructionIndex": 0,
57 # CHECK-NEXT: "ResourceIndex": 3,
58 # CHECK-NEXT: "ResourceUsage": 0.25
61 # CHECK-NEXT: "InstructionIndex": 0,
62 # CHECK-NEXT: "ResourceIndex": 7,
63 # CHECK-NEXT: "ResourceUsage": 0.25
66 # CHECK-NEXT: "InstructionIndex": 0,
67 # CHECK-NEXT: "ResourceIndex": 8,
68 # CHECK-NEXT: "ResourceUsage": 0.25
71 # CHECK-NEXT: "InstructionIndex": 1,
72 # CHECK-NEXT: "ResourceIndex": 2,
73 # CHECK-NEXT: "ResourceUsage": 0.25
76 # CHECK-NEXT: "InstructionIndex": 1,
77 # CHECK-NEXT: "ResourceIndex": 3,
78 # CHECK-NEXT: "ResourceUsage": 0.25
81 # CHECK-NEXT: "InstructionIndex": 1,
82 # CHECK-NEXT: "ResourceIndex": 7,
83 # CHECK-NEXT: "ResourceUsage": 0.25
86 # CHECK-NEXT: "InstructionIndex": 1,
87 # CHECK-NEXT: "ResourceIndex": 8,
88 # CHECK-NEXT: "ResourceUsage": 0.25
92 # CHECK-NEXT: "SummaryView": {
93 # CHECK-NEXT: "BlockRThroughput": 0.25,
94 # CHECK-NEXT: "DispatchWidth": 4,
95 # CHECK-NEXT: "IPC": 0.970873786407767,
96 # CHECK-NEXT: "Instructions": 100,
97 # CHECK-NEXT: "Iterations": 100,
98 # CHECK-NEXT: "TotalCycles": 103,
99 # CHECK-NEXT: "TotaluOps": 100,
100 # CHECK-NEXT: "uOpsPerCycle": 0.970873786407767
102 # CHECK-NEXT: "TimelineView": {
103 # CHECK-NEXT: "TimelineInfo": [
105 # CHECK-NEXT: "CycleDispatched": 0,
106 # CHECK-NEXT: "CycleExecuted": 2,
107 # CHECK-NEXT: "CycleIssued": 1,
108 # CHECK-NEXT: "CycleReady": 0,
109 # CHECK-NEXT: "CycleRetired": 3
112 # CHECK-NEXT: "CycleDispatched": 0,
113 # CHECK-NEXT: "CycleExecuted": 3,
114 # CHECK-NEXT: "CycleIssued": 2,
115 # CHECK-NEXT: "CycleReady": 2,
116 # CHECK-NEXT: "CycleRetired": 4
119 # CHECK-NEXT: "CycleDispatched": 0,
120 # CHECK-NEXT: "CycleExecuted": 4,
121 # CHECK-NEXT: "CycleIssued": 3,
122 # CHECK-NEXT: "CycleReady": 3,
123 # CHECK-NEXT: "CycleRetired": 5
126 # CHECK-NEXT: "CycleDispatched": 0,
127 # CHECK-NEXT: "CycleExecuted": 5,
128 # CHECK-NEXT: "CycleIssued": 4,
129 # CHECK-NEXT: "CycleReady": 4,
130 # CHECK-NEXT: "CycleRetired": 6
133 # CHECK-NEXT: "CycleDispatched": 1,
134 # CHECK-NEXT: "CycleExecuted": 6,
135 # CHECK-NEXT: "CycleIssued": 5,
136 # CHECK-NEXT: "CycleReady": 5,
137 # CHECK-NEXT: "CycleRetired": 7
140 # CHECK-NEXT: "CycleDispatched": 1,
141 # CHECK-NEXT: "CycleExecuted": 7,
142 # CHECK-NEXT: "CycleIssued": 6,
143 # CHECK-NEXT: "CycleReady": 6,
144 # CHECK-NEXT: "CycleRetired": 8
147 # CHECK-NEXT: "CycleDispatched": 1,
148 # CHECK-NEXT: "CycleExecuted": 8,
149 # CHECK-NEXT: "CycleIssued": 7,
150 # CHECK-NEXT: "CycleReady": 7,
151 # CHECK-NEXT: "CycleRetired": 9
154 # CHECK-NEXT: "CycleDispatched": 1,
155 # CHECK-NEXT: "CycleExecuted": 9,
156 # CHECK-NEXT: "CycleIssued": 8,
157 # CHECK-NEXT: "CycleReady": 8,
158 # CHECK-NEXT: "CycleRetired": 10
161 # CHECK-NEXT: "CycleDispatched": 2,
162 # CHECK-NEXT: "CycleExecuted": 10,
163 # CHECK-NEXT: "CycleIssued": 9,
164 # CHECK-NEXT: "CycleReady": 9,
165 # CHECK-NEXT: "CycleRetired": 11
168 # CHECK-NEXT: "CycleDispatched": 2,
169 # CHECK-NEXT: "CycleExecuted": 11,
170 # CHECK-NEXT: "CycleIssued": 10,
171 # CHECK-NEXT: "CycleReady": 10,
172 # CHECK-NEXT: "CycleRetired": 12
178 # CHECK-NEXT: "DispatchStatistics": {
179 # CHECK-NEXT: "GROUP": 0,
180 # CHECK-NEXT: "LQ": 0,
181 # CHECK-NEXT: "RAT": 0,
182 # CHECK-NEXT: "RCU": 0,
183 # CHECK-NEXT: "SCHEDQ": 41,
184 # CHECK-NEXT: "SQ": 0,
185 # CHECK-NEXT: "USH": 0
187 # CHECK-NEXT: "InstructionInfoView": {
188 # CHECK-NEXT: "InstructionList": [
190 # CHECK-NEXT: "Instruction": 0,
191 # CHECK-NEXT: "Latency": 1,
192 # CHECK-NEXT: "NumMicroOpcodes": 1,
193 # CHECK-NEXT: "RThroughput": 0.25,
194 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
195 # CHECK-NEXT: "mayLoad": false,
196 # CHECK-NEXT: "mayStore": false
199 # CHECK-NEXT: "Instruction": 1,
200 # CHECK-NEXT: "Latency": 1,
201 # CHECK-NEXT: "NumMicroOpcodes": 1,
202 # CHECK-NEXT: "RThroughput": 0.25,
203 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
204 # CHECK-NEXT: "mayLoad": false,
205 # CHECK-NEXT: "mayStore": false
209 # CHECK-NEXT: "Instructions": [
210 # CHECK-NEXT: "addl\t%ebx, %ebx",
211 # CHECK-NEXT: "addl\t%ecx, %ecx"
213 # CHECK-NEXT: "Name": "",
214 # CHECK-NEXT: "ResourcePressureView": {
215 # CHECK-NEXT: "ResourcePressureInfo": [
217 # CHECK-NEXT: "InstructionIndex": 0,
218 # CHECK-NEXT: "ResourceIndex": 3,
219 # CHECK-NEXT: "ResourceUsage": 0.5
222 # CHECK-NEXT: "InstructionIndex": 0,
223 # CHECK-NEXT: "ResourceIndex": 8,
224 # CHECK-NEXT: "ResourceUsage": 0.5
227 # CHECK-NEXT: "InstructionIndex": 1,
228 # CHECK-NEXT: "ResourceIndex": 2,
229 # CHECK-NEXT: "ResourceUsage": 0.5
232 # CHECK-NEXT: "InstructionIndex": 1,
233 # CHECK-NEXT: "ResourceIndex": 7,
234 # CHECK-NEXT: "ResourceUsage": 0.5
237 # CHECK-NEXT: "InstructionIndex": 2,
238 # CHECK-NEXT: "ResourceIndex": 2,
239 # CHECK-NEXT: "ResourceUsage": 0.5
242 # CHECK-NEXT: "InstructionIndex": 2,
243 # CHECK-NEXT: "ResourceIndex": 3,
244 # CHECK-NEXT: "ResourceUsage": 0.5
247 # CHECK-NEXT: "InstructionIndex": 2,
248 # CHECK-NEXT: "ResourceIndex": 7,
249 # CHECK-NEXT: "ResourceUsage": 0.5
252 # CHECK-NEXT: "InstructionIndex": 2,
253 # CHECK-NEXT: "ResourceIndex": 8,
254 # CHECK-NEXT: "ResourceUsage": 0.5
258 # CHECK-NEXT: "SummaryView": {
259 # CHECK-NEXT: "BlockRThroughput": 0.5,
260 # CHECK-NEXT: "DispatchWidth": 4,
261 # CHECK-NEXT: "IPC": 1.941747572815534,
262 # CHECK-NEXT: "Instructions": 200,
263 # CHECK-NEXT: "Iterations": 100,
264 # CHECK-NEXT: "TotalCycles": 103,
265 # CHECK-NEXT: "TotaluOps": 200,
266 # CHECK-NEXT: "uOpsPerCycle": 1.941747572815534
268 # CHECK-NEXT: "TimelineView": {
269 # CHECK-NEXT: "TimelineInfo": [
271 # CHECK-NEXT: "CycleDispatched": 0,
272 # CHECK-NEXT: "CycleExecuted": 2,
273 # CHECK-NEXT: "CycleIssued": 1,
274 # CHECK-NEXT: "CycleReady": 0,
275 # CHECK-NEXT: "CycleRetired": 3
278 # CHECK-NEXT: "CycleDispatched": 0,
279 # CHECK-NEXT: "CycleExecuted": 2,
280 # CHECK-NEXT: "CycleIssued": 1,
281 # CHECK-NEXT: "CycleReady": 0,
282 # CHECK-NEXT: "CycleRetired": 3
285 # CHECK-NEXT: "CycleDispatched": 0,
286 # CHECK-NEXT: "CycleExecuted": 3,
287 # CHECK-NEXT: "CycleIssued": 2,
288 # CHECK-NEXT: "CycleReady": 2,
289 # CHECK-NEXT: "CycleRetired": 4
292 # CHECK-NEXT: "CycleDispatched": 0,
293 # CHECK-NEXT: "CycleExecuted": 3,
294 # CHECK-NEXT: "CycleIssued": 2,
295 # CHECK-NEXT: "CycleReady": 2,
296 # CHECK-NEXT: "CycleRetired": 4
299 # CHECK-NEXT: "CycleDispatched": 1,
300 # CHECK-NEXT: "CycleExecuted": 4,
301 # CHECK-NEXT: "CycleIssued": 3,
302 # CHECK-NEXT: "CycleReady": 3,
303 # CHECK-NEXT: "CycleRetired": 5
306 # CHECK-NEXT: "CycleDispatched": 1,
307 # CHECK-NEXT: "CycleExecuted": 4,
308 # CHECK-NEXT: "CycleIssued": 3,
309 # CHECK-NEXT: "CycleReady": 3,
310 # CHECK-NEXT: "CycleRetired": 5
313 # CHECK-NEXT: "CycleDispatched": 1,
314 # CHECK-NEXT: "CycleExecuted": 5,
315 # CHECK-NEXT: "CycleIssued": 4,
316 # CHECK-NEXT: "CycleReady": 4,
317 # CHECK-NEXT: "CycleRetired": 6
320 # CHECK-NEXT: "CycleDispatched": 1,
321 # CHECK-NEXT: "CycleExecuted": 5,
322 # CHECK-NEXT: "CycleIssued": 4,
323 # CHECK-NEXT: "CycleReady": 4,
324 # CHECK-NEXT: "CycleRetired": 6
327 # CHECK-NEXT: "CycleDispatched": 2,
328 # CHECK-NEXT: "CycleExecuted": 6,
329 # CHECK-NEXT: "CycleIssued": 5,
330 # CHECK-NEXT: "CycleReady": 5,
331 # CHECK-NEXT: "CycleRetired": 7
334 # CHECK-NEXT: "CycleDispatched": 2,
335 # CHECK-NEXT: "CycleExecuted": 6,
336 # CHECK-NEXT: "CycleIssued": 5,
337 # CHECK-NEXT: "CycleReady": 5,
338 # CHECK-NEXT: "CycleRetired": 7
341 # CHECK-NEXT: "CycleDispatched": 2,
342 # CHECK-NEXT: "CycleExecuted": 7,
343 # CHECK-NEXT: "CycleIssued": 6,
344 # CHECK-NEXT: "CycleReady": 6,
345 # CHECK-NEXT: "CycleRetired": 8
348 # CHECK-NEXT: "CycleDispatched": 2,
349 # CHECK-NEXT: "CycleExecuted": 7,
350 # CHECK-NEXT: "CycleIssued": 6,
351 # CHECK-NEXT: "CycleReady": 6,
352 # CHECK-NEXT: "CycleRetired": 8
355 # CHECK-NEXT: "CycleDispatched": 3,
356 # CHECK-NEXT: "CycleExecuted": 8,
357 # CHECK-NEXT: "CycleIssued": 7,
358 # CHECK-NEXT: "CycleReady": 7,
359 # CHECK-NEXT: "CycleRetired": 9
362 # CHECK-NEXT: "CycleDispatched": 3,
363 # CHECK-NEXT: "CycleExecuted": 8,
364 # CHECK-NEXT: "CycleIssued": 7,
365 # CHECK-NEXT: "CycleReady": 7,
366 # CHECK-NEXT: "CycleRetired": 9
369 # CHECK-NEXT: "CycleDispatched": 3,
370 # CHECK-NEXT: "CycleExecuted": 9,
371 # CHECK-NEXT: "CycleIssued": 8,
372 # CHECK-NEXT: "CycleReady": 8,
373 # CHECK-NEXT: "CycleRetired": 10
376 # CHECK-NEXT: "CycleDispatched": 3,
377 # CHECK-NEXT: "CycleExecuted": 9,
378 # CHECK-NEXT: "CycleIssued": 8,
379 # CHECK-NEXT: "CycleReady": 8,
380 # CHECK-NEXT: "CycleRetired": 10
383 # CHECK-NEXT: "CycleDispatched": 4,
384 # CHECK-NEXT: "CycleExecuted": 10,
385 # CHECK-NEXT: "CycleIssued": 9,
386 # CHECK-NEXT: "CycleReady": 9,
387 # CHECK-NEXT: "CycleRetired": 11
390 # CHECK-NEXT: "CycleDispatched": 4,
391 # CHECK-NEXT: "CycleExecuted": 10,
392 # CHECK-NEXT: "CycleIssued": 9,
393 # CHECK-NEXT: "CycleReady": 9,
394 # CHECK-NEXT: "CycleRetired": 11
397 # CHECK-NEXT: "CycleDispatched": 4,
398 # CHECK-NEXT: "CycleExecuted": 11,
399 # CHECK-NEXT: "CycleIssued": 10,
400 # CHECK-NEXT: "CycleReady": 10,
401 # CHECK-NEXT: "CycleRetired": 12
404 # CHECK-NEXT: "CycleDispatched": 4,
405 # CHECK-NEXT: "CycleExecuted": 11,
406 # CHECK-NEXT: "CycleIssued": 10,
407 # CHECK-NEXT: "CycleReady": 10,
408 # CHECK-NEXT: "CycleRetired": 12
414 # CHECK-NEXT: "DispatchStatistics": {
415 # CHECK-NEXT: "GROUP": 0,
416 # CHECK-NEXT: "LQ": 0,
417 # CHECK-NEXT: "RAT": 0,
418 # CHECK-NEXT: "RCU": 0,
419 # CHECK-NEXT: "SCHEDQ": 21,
420 # CHECK-NEXT: "SQ": 0,
421 # CHECK-NEXT: "USH": 0
423 # CHECK-NEXT: "InstructionInfoView": {
424 # CHECK-NEXT: "InstructionList": [
426 # CHECK-NEXT: "Instruction": 0,
427 # CHECK-NEXT: "Latency": 1,
428 # CHECK-NEXT: "NumMicroOpcodes": 1,
429 # CHECK-NEXT: "RThroughput": 0.25,
430 # CHECK-NEXT: "hasUnmodeledSideEffects": false,
431 # CHECK-NEXT: "mayLoad": false,
432 # CHECK-NEXT: "mayStore": false
436 # CHECK-NEXT: "Instructions": [
437 # CHECK-NEXT: "addl\t%edx, %edx"
439 # CHECK-NEXT: "Name": "",
440 # CHECK-NEXT: "ResourcePressureView": {
441 # CHECK-NEXT: "ResourcePressureInfo": [
443 # CHECK-NEXT: "InstructionIndex": 0,
444 # CHECK-NEXT: "ResourceIndex": 2,
445 # CHECK-NEXT: "ResourceUsage": 0.25
448 # CHECK-NEXT: "InstructionIndex": 0,
449 # CHECK-NEXT: "ResourceIndex": 3,
450 # CHECK-NEXT: "ResourceUsage": 0.25
453 # CHECK-NEXT: "InstructionIndex": 0,
454 # CHECK-NEXT: "ResourceIndex": 7,
455 # CHECK-NEXT: "ResourceUsage": 0.25
458 # CHECK-NEXT: "InstructionIndex": 0,
459 # CHECK-NEXT: "ResourceIndex": 8,
460 # CHECK-NEXT: "ResourceUsage": 0.25
463 # CHECK-NEXT: "InstructionIndex": 1,
464 # CHECK-NEXT: "ResourceIndex": 2,
465 # CHECK-NEXT: "ResourceUsage": 0.25
468 # CHECK-NEXT: "InstructionIndex": 1,
469 # CHECK-NEXT: "ResourceIndex": 3,
470 # CHECK-NEXT: "ResourceUsage": 0.25
473 # CHECK-NEXT: "InstructionIndex": 1,
474 # CHECK-NEXT: "ResourceIndex": 7,
475 # CHECK-NEXT: "ResourceUsage": 0.25
478 # CHECK-NEXT: "InstructionIndex": 1,
479 # CHECK-NEXT: "ResourceIndex": 8,
480 # CHECK-NEXT: "ResourceUsage": 0.25
484 # CHECK-NEXT: "SummaryView": {
485 # CHECK-NEXT: "BlockRThroughput": 0.25,
486 # CHECK-NEXT: "DispatchWidth": 4,
487 # CHECK-NEXT: "IPC": 0.970873786407767,
488 # CHECK-NEXT: "Instructions": 100,
489 # CHECK-NEXT: "Iterations": 100,
490 # CHECK-NEXT: "TotalCycles": 103,
491 # CHECK-NEXT: "TotaluOps": 100,
492 # CHECK-NEXT: "uOpsPerCycle": 0.970873786407767
494 # CHECK-NEXT: "TimelineView": {
495 # CHECK-NEXT: "TimelineInfo": [
497 # CHECK-NEXT: "CycleDispatched": 0,
498 # CHECK-NEXT: "CycleExecuted": 2,
499 # CHECK-NEXT: "CycleIssued": 1,
500 # CHECK-NEXT: "CycleReady": 0,
501 # CHECK-NEXT: "CycleRetired": 3
504 # CHECK-NEXT: "CycleDispatched": 0,
505 # CHECK-NEXT: "CycleExecuted": 3,
506 # CHECK-NEXT: "CycleIssued": 2,
507 # CHECK-NEXT: "CycleReady": 2,
508 # CHECK-NEXT: "CycleRetired": 4
511 # CHECK-NEXT: "CycleDispatched": 0,
512 # CHECK-NEXT: "CycleExecuted": 4,
513 # CHECK-NEXT: "CycleIssued": 3,
514 # CHECK-NEXT: "CycleReady": 3,
515 # CHECK-NEXT: "CycleRetired": 5
518 # CHECK-NEXT: "CycleDispatched": 0,
519 # CHECK-NEXT: "CycleExecuted": 5,
520 # CHECK-NEXT: "CycleIssued": 4,
521 # CHECK-NEXT: "CycleReady": 4,
522 # CHECK-NEXT: "CycleRetired": 6
525 # CHECK-NEXT: "CycleDispatched": 1,
526 # CHECK-NEXT: "CycleExecuted": 6,
527 # CHECK-NEXT: "CycleIssued": 5,
528 # CHECK-NEXT: "CycleReady": 5,
529 # CHECK-NEXT: "CycleRetired": 7
532 # CHECK-NEXT: "CycleDispatched": 1,
533 # CHECK-NEXT: "CycleExecuted": 7,
534 # CHECK-NEXT: "CycleIssued": 6,
535 # CHECK-NEXT: "CycleReady": 6,
536 # CHECK-NEXT: "CycleRetired": 8
539 # CHECK-NEXT: "CycleDispatched": 1,
540 # CHECK-NEXT: "CycleExecuted": 8,
541 # CHECK-NEXT: "CycleIssued": 7,
542 # CHECK-NEXT: "CycleReady": 7,
543 # CHECK-NEXT: "CycleRetired": 9
546 # CHECK-NEXT: "CycleDispatched": 1,
547 # CHECK-NEXT: "CycleExecuted": 9,
548 # CHECK-NEXT: "CycleIssued": 8,
549 # CHECK-NEXT: "CycleReady": 8,
550 # CHECK-NEXT: "CycleRetired": 10
553 # CHECK-NEXT: "CycleDispatched": 2,
554 # CHECK-NEXT: "CycleExecuted": 10,
555 # CHECK-NEXT: "CycleIssued": 9,
556 # CHECK-NEXT: "CycleReady": 9,
557 # CHECK-NEXT: "CycleRetired": 11
560 # CHECK-NEXT: "CycleDispatched": 2,
561 # CHECK-NEXT: "CycleExecuted": 11,
562 # CHECK-NEXT: "CycleIssued": 10,
563 # CHECK-NEXT: "CycleReady": 10,
564 # CHECK-NEXT: "CycleRetired": 12
570 # CHECK-NEXT: "SimulationParameters": {
571 # CHECK-NEXT: "-march": "x86_64",
572 # CHECK-NEXT: "-mcpu": "haswell",
573 # CHECK-NEXT: "-mtriple": "x86_64-unknown-unknown"
575 # CHECK-NEXT: "TargetInfo": {
576 # CHECK-NEXT: "CPUName": "haswell",
577 # CHECK-NEXT: "Resources": [
578 # CHECK-NEXT: "HWDivider",
579 # CHECK-NEXT: "HWFPDivider",
580 # CHECK-NEXT: "HWPort0",
581 # CHECK-NEXT: "HWPort1",
582 # CHECK-NEXT: "HWPort2",
583 # CHECK-NEXT: "HWPort3",
584 # CHECK-NEXT: "HWPort4",
585 # CHECK-NEXT: "HWPort5",
586 # CHECK-NEXT: "HWPort6",
587 # CHECK-NEXT: "HWPort7"