1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,SANDY
3
4# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=ivybridge -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,IVY
5
6# RUN: llvm-mca -mtriple=x86_64-unknown-unknown  -mcpu=haswell -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,HASWELL
7
8# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,BDWELL
9
10# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,SKYLAKE
11
12# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,BDVER2
13
14# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,BTVER2
15
16# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,ZNVER1
17
18# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -iterations=1 -timeline -instruction-info=false -resource-pressure=false < %s | FileCheck %s -check-prefixes=ALL,ZNVER2
19
20vaddps %xmm0, %xmm0, %xmm1
21vblendvps %xmm1, (%rdi), %xmm2, %xmm3
22
23# ALL:          Iterations:        1
24# ALL-NEXT:     Instructions:      2
25
26# BDVER2-NEXT:  Total Cycles:      10
27# BDVER2-NEXT:  Total uOps:        2
28
29# BDWELL-NEXT:  Total Cycles:      10
30# BDWELL-NEXT:  Total uOps:        4
31
32# BTVER2-NEXT:  Total Cycles:      11
33# BTVER2-NEXT:  Total uOps:        4
34
35# HASWELL-NEXT: Total Cycles:      11
36# HASWELL-NEXT: Total uOps:        4
37
38# IVY-NEXT:     Total Cycles:      11
39# IVY-NEXT:     Total uOps:        4
40
41# SANDY-NEXT:   Total Cycles:      11
42# SANDY-NEXT:   Total uOps:        4
43
44# SKYLAKE-NEXT: Total Cycles:      11
45# SKYLAKE-NEXT: Total uOps:        4
46
47# ZNVER1-NEXT:  Total Cycles:      11
48# ZNVER1-NEXT:  Total uOps:        2
49
50# ZNVER2-NEXT:  Total Cycles:      11
51# ZNVER2-NEXT:  Total uOps:        2
52
53# BDVER2:       Dispatch Width:    4
54# BDVER2-NEXT:  uOps Per Cycle:    0.20
55# BDVER2-NEXT:  IPC:               0.20
56# BDVER2-NEXT:  Block RThroughput: 2.0
57
58# BDWELL:       Dispatch Width:    4
59# BDWELL-NEXT:  uOps Per Cycle:    0.40
60# BDWELL-NEXT:  IPC:               0.20
61# BDWELL-NEXT:  Block RThroughput: 2.0
62
63# BTVER2:       Dispatch Width:    2
64# BTVER2-NEXT:  uOps Per Cycle:    0.36
65# BTVER2-NEXT:  IPC:               0.18
66# BTVER2-NEXT:  Block RThroughput: 2.0
67
68# HASWELL:      Dispatch Width:    4
69# HASWELL-NEXT: uOps Per Cycle:    0.36
70# HASWELL-NEXT: IPC:               0.18
71# HASWELL-NEXT: Block RThroughput: 2.0
72
73# IVY:          Dispatch Width:    4
74# IVY-NEXT:     uOps Per Cycle:    0.36
75# IVY-NEXT:     IPC:               0.18
76# IVY-NEXT:     Block RThroughput: 1.0
77
78# SANDY:        Dispatch Width:    4
79# SANDY-NEXT:   uOps Per Cycle:    0.36
80# SANDY-NEXT:   IPC:               0.18
81# SANDY-NEXT:   Block RThroughput: 1.0
82
83# SKYLAKE:      Dispatch Width:    6
84# SKYLAKE-NEXT: uOps Per Cycle:    0.36
85# SKYLAKE-NEXT: IPC:               0.18
86# SKYLAKE-NEXT: Block RThroughput: 0.7
87
88# ZNVER1:       Dispatch Width:    4
89# ZNVER1-NEXT:  uOps Per Cycle:    0.18
90# ZNVER1-NEXT:  IPC:               0.18
91# ZNVER1-NEXT:  Block RThroughput: 1.0
92
93# ZNVER2:       Dispatch Width:    4
94# ZNVER2-NEXT:  uOps Per Cycle:    0.18
95# ZNVER2-NEXT:  IPC:               0.18
96# ZNVER2-NEXT:  Block RThroughput: 1.0
97
98# BDVER2:       Timeline view:
99# BDVER2-NEXT:  Index     0123456789
100
101# BDWELL:       Timeline view:
102# BDWELL-NEXT:  Index     0123456789
103
104# BTVER2:       Timeline view:
105# BTVER2-NEXT:                      0
106# BTVER2-NEXT:  Index     0123456789
107
108# HASWELL:      Timeline view:
109# HASWELL-NEXT:                     0
110# HASWELL-NEXT: Index     0123456789
111
112# IVY:          Timeline view:
113# IVY-NEXT:                         0
114# IVY-NEXT:     Index     0123456789
115
116# SANDY:        Timeline view:
117# SANDY-NEXT:                       0
118# SANDY-NEXT:   Index     0123456789
119
120# SKYLAKE:      Timeline view:
121# SKYLAKE-NEXT:                     0
122# SKYLAKE-NEXT: Index     0123456789
123
124# ZNVER1:       Timeline view:
125# ZNVER1-NEXT:                      0
126# ZNVER1-NEXT:  Index     0123456789
127
128# ZNVER2:       Timeline view:
129# ZNVER2-NEXT:                      0
130# ZNVER2-NEXT:  Index     0123456789
131
132# BDVER2:       [0,0]     DeeeeeER .   vaddps	%xmm0, %xmm0, %xmm1
133# BDVER2-NEXT:  [0,1]     DeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
134
135# BDWELL:       [0,0]     DeeeER   .   vaddps	%xmm0, %xmm0, %xmm1
136# BDWELL-NEXT:  [0,1]     DeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
137
138# BTVER2:       [0,0]     DeeeER    .   vaddps	%xmm0, %xmm0, %xmm1
139# BTVER2-NEXT:  [0,1]     .DeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
140
141# HASWELL:      [0,0]     DeeeER    .   vaddps	%xmm0, %xmm0, %xmm1
142# HASWELL-NEXT: [0,1]     DeeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
143
144# IVY:          [0,0]     DeeeER    .   vaddps	%xmm0, %xmm0, %xmm1
145# IVY-NEXT:     [0,1]     DeeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
146
147# SANDY:        [0,0]     DeeeER    .   vaddps	%xmm0, %xmm0, %xmm1
148# SANDY-NEXT:   [0,1]     DeeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
149
150# SKYLAKE:      [0,0]     DeeeeER   .   vaddps	%xmm0, %xmm0, %xmm1
151# SKYLAKE-NEXT: [0,1]     DeeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
152
153# ZNVER1:       [0,0]     DeeeER    .   vaddps	%xmm0, %xmm0, %xmm1
154# ZNVER1-NEXT:  [0,1]     DeeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
155
156# ZNVER2:       [0,0]     DeeeER    .   vaddps	%xmm0, %xmm0, %xmm1
157# ZNVER2-NEXT:  [0,1]     DeeeeeeeeER   vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
158
159# ALL:          Average Wait times (based on the timeline view):
160# ALL-NEXT:     [0]: Executions
161# ALL-NEXT:     [1]: Average time spent waiting in a scheduler's queue
162# ALL-NEXT:     [2]: Average time spent waiting in a scheduler's queue while ready
163# ALL-NEXT:     [3]: Average time elapsed from WB until retire stage
164
165# ALL:                [0]    [1]    [2]    [3]
166# ALL-NEXT:     0.     1     1.0    1.0    0.0       vaddps	%xmm0, %xmm0, %xmm1
167
168# BDVER2-NEXT:  1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
169# BDVER2-NEXT:         1     1.0    0.5    0.0       <total>
170
171# BDWELL-NEXT:  1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
172# BDWELL-NEXT:         1     1.0    0.5    0.0       <total>
173
174# BTVER2-NEXT:  1.     1     1.0    1.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
175# BTVER2-NEXT:         1     1.0    1.0    0.0       <total>
176
177# HASWELL-NEXT: 1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
178# HASWELL-NEXT:        1     1.0    0.5    0.0       <total>
179
180# IVY-NEXT:     1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
181# IVY-NEXT:            1     1.0    0.5    0.0       <total>
182
183# SANDY-NEXT:   1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
184# SANDY-NEXT:          1     1.0    0.5    0.0       <total>
185
186# SKYLAKE-NEXT: 1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
187# SKYLAKE-NEXT:        1     1.0    0.5    0.0       <total>
188
189# ZNVER1-NEXT:  1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
190# ZNVER1-NEXT:         1     1.0    0.5    0.0       <total>
191
192# ZNVER2-NEXT:  1.     1     1.0    0.0    0.0       vblendvps	%xmm1, (%rdi), %xmm2, %xmm3
193# ZNVER2-NEXT:         1     1.0    0.5    0.0       <total>
194