1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=HASWELL
3# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=BDWELL
4# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=SKYLAKE
5# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=ZNVER1
6
7add     %edi, %esi
8bzhil	%esi, (%rdi), %eax
9
10# ALL:          Iterations:        1
11# ALL-NEXT:     Instructions:      2
12
13# BDWELL-NEXT:  Total Cycles:      9
14# BDWELL-NEXT:  Dispatch Width:    4
15# BDWELL-NEXT:  IPC:               0.22
16# BDWELL-NEXT:  Block RThroughput: 0.8
17
18# HASWELL-NEXT: Total Cycles:      9
19# HASWELL-NEXT: Dispatch Width:    4
20# HASWELL-NEXT: IPC:               0.22
21# HASWELL-NEXT: Block RThroughput: 0.8
22
23# SKYLAKE-NEXT: Total Cycles:      9
24# SKYLAKE-NEXT: Dispatch Width:    6
25# SKYLAKE-NEXT: IPC:               0.22
26# SKYLAKE-NEXT: Block RThroughput: 0.5
27
28# ZNVER1-NEXT:  Total Cycles:      8
29# ZNVER1-NEXT:  Dispatch Width:    4
30# ZNVER1-NEXT:  IPC:               0.25
31# ZNVER1-NEXT:  Block RThroughput: 0.8
32
33# ALL:          Instruction Info:
34# ALL-NEXT:     [1]: #uOps
35# ALL-NEXT:     [2]: Latency
36# ALL-NEXT:     [3]: RThroughput
37# ALL-NEXT:     [4]: MayLoad
38# ALL-NEXT:     [5]: MayStore
39# ALL-NEXT:     [6]: HasSideEffects (U)
40
41# ALL:          [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
42# ALL-NEXT:      1      1     0.25                        addl	%edi, %esi
43
44# BDWELL-NEXT:   2      6     0.50    *                   bzhil	%esi, (%rdi), %eax
45# HASWELL-NEXT:  2      6     0.50    *                   bzhil	%esi, (%rdi), %eax
46# SKYLAKE-NEXT:  2      6     0.50    *                   bzhil	%esi, (%rdi), %eax
47# ZNVER1-NEXT:   2      5     0.50    *                   bzhil	%esi, (%rdi), %eax
48
49# ALL:          Timeline view:
50
51# BDWELL-NEXT:  Index     012345678
52# HASWELL-NEXT: Index     012345678
53# SKYLAKE-NEXT: Index     012345678
54# ZNVER1-NEXT:  Index     01234567
55
56# BDWELL:       [0,0]     DeER .  .   addl	%edi, %esi
57# BDWELL-NEXT:  [0,1]     DeeeeeeER   bzhil	%esi, (%rdi), %eax
58
59# HASWELL:      [0,0]     DeER .  .   addl	%edi, %esi
60# HASWELL-NEXT: [0,1]     DeeeeeeER   bzhil	%esi, (%rdi), %eax
61
62# SKYLAKE:      [0,0]     DeER .  .   addl	%edi, %esi
63# SKYLAKE-NEXT: [0,1]     DeeeeeeER   bzhil	%esi, (%rdi), %eax
64
65# ZNVER1:       [0,0]     DeER . .   addl	%edi, %esi
66# ZNVER1-NEXT:  [0,1]     DeeeeeER   bzhil	%esi, (%rdi), %eax
67
68# ALL:          Average Wait times (based on the timeline view):
69# ALL-NEXT:     [0]: Executions
70# ALL-NEXT:     [1]: Average time spent waiting in a scheduler's queue
71# ALL-NEXT:     [2]: Average time spent waiting in a scheduler's queue while ready
72# ALL-NEXT:     [3]: Average time elapsed from WB until retire stage
73
74# ALL:                [0]    [1]    [2]    [3]
75# ALL-NEXT:     0.     1     1.0    1.0    0.0       addl	%edi, %esi
76# ALL-NEXT:     1.     1     1.0    0.0    0.0       bzhil	%esi, (%rdi), %eax
77