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=btver2 -iterations=1 -timeline -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=BTVER2
6# 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
7
8add     %edi, %esi
9bextrl	%esi, (%rdi), %eax
10
11# ALL:          Iterations:        1
12# ALL-NEXT:     Instructions:      2
13
14# BDWELL-NEXT:  Total Cycles:      10
15# BDWELL-NEXT:  Dispatch Width:    4
16# BDWELL-NEXT:  IPC:               0.20
17# BDWELL-NEXT:  Block RThroughput: 1.0
18
19# BTVER2-NEXT:  Total Cycles:      7
20# BTVER2-NEXT:  Dispatch Width:    2
21# BTVER2-NEXT:  IPC:               0.29
22# BTVER2-NEXT:  Block RThroughput: 1.0
23
24# HASWELL-NEXT: Total Cycles:      10
25# HASWELL-NEXT: Dispatch Width:    4
26# HASWELL-NEXT: IPC:               0.20
27# HASWELL-NEXT: Block RThroughput: 1.0
28
29# SKYLAKE-NEXT: Total Cycles:      10
30# SKYLAKE-NEXT: Dispatch Width:    6
31# SKYLAKE-NEXT: IPC:               0.20
32# SKYLAKE-NEXT: Block RThroughput: 0.7
33
34# ZNVER1-NEXT:  Total Cycles:      8
35# ZNVER1-NEXT:  Dispatch Width:    4
36# ZNVER1-NEXT:  IPC:               0.25
37# ZNVER1-NEXT:  Block RThroughput: 0.8
38
39# ALL:          Instruction Info:
40# ALL-NEXT:     [1]: #uOps
41# ALL-NEXT:     [2]: Latency
42# ALL-NEXT:     [3]: RThroughput
43# ALL-NEXT:     [4]: MayLoad
44# ALL-NEXT:     [5]: MayStore
45# ALL-NEXT:     [6]: HasSideEffects (U)
46
47# ALL:          [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
48
49# BDWELL-NEXT:   1      1     0.25                        addl	%edi, %esi
50# BDWELL-NEXT:   3      7     0.50    *                   bextrl	%esi, (%rdi), %eax
51
52# BTVER2-NEXT:   1      1     0.50                        addl	%edi, %esi
53# BTVER2-NEXT:   1      4     1.00    *                   bextrl	%esi, (%rdi), %eax
54
55# HASWELL-NEXT:  1      1     0.25                        addl	%edi, %esi
56# HASWELL-NEXT:  3      7     0.50    *                   bextrl	%esi, (%rdi), %eax
57
58# SKYLAKE-NEXT:  1      1     0.25                        addl	%edi, %esi
59# SKYLAKE-NEXT:  3      7     0.50    *                   bextrl	%esi, (%rdi), %eax
60
61# ZNVER1-NEXT:   1      1     0.25                        addl	%edi, %esi
62# ZNVER1-NEXT:   2      5     0.50    *                   bextrl	%esi, (%rdi), %eax
63
64# ALL:          Timeline view:
65
66# BDWELL-NEXT:  Index     0123456789
67# BTVER2-NEXT:  Index     0123456
68# HASWELL-NEXT: Index     0123456789
69# SKYLAKE-NEXT: Index     0123456789
70# ZNVER1-NEXT:  Index     01234567
71
72# BDWELL:       [0,0]     DeER .   .   addl	%edi, %esi
73# BDWELL-NEXT:  [0,1]     DeeeeeeeER   bextrl	%esi, (%rdi), %eax
74
75# HASWELL:      [0,0]     DeER .   .   addl	%edi, %esi
76# HASWELL-NEXT: [0,1]     DeeeeeeeER   bextrl	%esi, (%rdi), %eax
77
78# SKYLAKE:      [0,0]     DeER .   .   addl	%edi, %esi
79# SKYLAKE-NEXT: [0,1]     DeeeeeeeER   bextrl	%esi, (%rdi), %eax
80
81# ZNVER1:       [0,0]     DeER . .   addl	%edi, %esi
82# ZNVER1-NEXT:  [0,1]     DeeeeeER   bextrl	%esi, (%rdi), %eax
83
84# BTVER2:       [0,0]     DeER ..   addl	%edi, %esi
85# BTVER2-NEXT:  [0,1]     DeeeeER   bextrl	%esi, (%rdi), %eax
86
87# ALL:          Average Wait times (based on the timeline view):
88# ALL-NEXT:     [0]: Executions
89# ALL-NEXT:     [1]: Average time spent waiting in a scheduler's queue
90# ALL-NEXT:     [2]: Average time spent waiting in a scheduler's queue while ready
91# ALL-NEXT:     [3]: Average time elapsed from WB until retire stage
92
93# ALL:                [0]    [1]    [2]    [3]
94# ALL-NEXT:     0.     1     1.0    1.0    0.0       addl	%edi, %esi
95# ALL-NEXT:     1.     1     1.0    0.0    0.0       bextrl	%esi, (%rdi), %eax
96