1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,BARCELONA
3 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,BDVER2
4 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,BTVER2
5 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,ZNVER1
6 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,ZNVER2
7 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,HASWELL
8 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,BROADWELL
9 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,SKYLAKE
10 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=icelake-server -iterations=1 -all-views=false -timeline < %s | FileCheck %s -check-prefixes=ALL,SKYLAKE
12 #LLVM-MCA-BEGIN test_sqrtss
13 leaq
8(%rsp
, %rdi
, 2), %rax
17 #LLVM-MCA-BEGIN test_sqrtsd
18 leaq
8(%rsp
, %rdi
, 2), %rax
22 #LLVM-MCA-BEGIN test_rsqrtss
23 leaq
8(%rsp
, %rdi
, 2), %rax
27 #LLVM-MCA-BEGIN test_rcp
28 leaq
8(%rsp
, %rdi
, 2), %rax
32 # ALL: [0] Code Region - test_sqrtss
36 # BARCELONA-NEXT: 0123456789
37 # BARCELONA-NEXT: Index 0123456789 0123
39 # BDVER2-NEXT: 012345678
40 # BDVER2-NEXT: Index 0123456789
42 # BROADWELL-NEXT: 0123456789
43 # BROADWELL-NEXT: Index 0123456789
45 # BTVER2-NEXT: 0123456789 0
46 # BTVER2-NEXT: Index 0123456789 0123456789
48 # HASWELL-NEXT: 0123456789
49 # HASWELL-NEXT: Index 0123456789
51 # SKYLAKE-NEXT: 0123456789
52 # SKYLAKE-NEXT: Index 0123456789 0
54 # ZNVER1-NEXT: 0123456789
55 # ZNVER1-NEXT: Index 0123456789 01234
57 # ZNVER2-NEXT: 0123456789
58 # ZNVER2-NEXT: Index 0123456789 01234
60 # BARCELONA: [0,0] DeER . . . . . leaq 8(%rsp,%rdi,2), %rax
61 # BARCELONA-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
63 # BDVER2: [0,0] DeeER. . . . leaq 8(%rsp,%rdi,2), %rax
64 # BDVER2-NEXT: [0,1] D==eeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
66 # BROADWELL: [0,0] DeER . . . . leaq 8(%rsp,%rdi,2), %rax
67 # BROADWELL-NEXT: [0,1] D=eeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
69 # BTVER2: [0,0] DeeER. . . . . . leaq 8(%rsp,%rdi,2), %rax
70 # BTVER2-NEXT: [0,1] D==eeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
72 # HASWELL: [0,0] DeER . . . . leaq 8(%rsp,%rdi,2), %rax
73 # HASWELL-NEXT: [0,1] D=eeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
75 # SKYLAKE: [0,0] DeER . . . . leaq 8(%rsp,%rdi,2), %rax
76 # SKYLAKE-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
78 # ZNVER1: [0,0] DeER . . . . . leaq 8(%rsp,%rdi,2), %rax
79 # ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
81 # ZNVER2: [0,0] DeER . . . . . leaq 8(%rsp,%rdi,2), %rax
82 # ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeER sqrtss (%rax), %xmm1
84 # ALL: Average Wait times (based on the timeline view):
85 # ALL-NEXT: [0]: Executions
86 # ALL-NEXT: [1]: Average time spent waiting in a scheduler's queue
87 # ALL-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
88 # ALL-NEXT: [3]: Average time elapsed from WB until retire stage
90 # ALL: [0] [1] [2] [3]
91 # ALL-NEXT: 0. 1 1.0 1.0 0.0 leaq 8(%rsp,%rdi,2), %rax
93 # BARCELONA-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
94 # BARCELONA-NEXT: 1 1.5 0.5 0.0 <total>
96 # BDVER2-NEXT: 1. 1 3.0 0.0 0.0 sqrtss (%rax), %xmm1
97 # BDVER2-NEXT: 1 2.0 0.5 0.0 <total>
99 # BROADWELL-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
100 # BROADWELL-NEXT: 1 1.5 0.5 0.0 <total>
102 # BTVER2-NEXT: 1. 1 3.0 0.0 0.0 sqrtss (%rax), %xmm1
103 # BTVER2-NEXT: 1 2.0 0.5 0.0 <total>
105 # HASWELL-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
106 # HASWELL-NEXT: 1 1.5 0.5 0.0 <total>
108 # SKYLAKE-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
109 # SKYLAKE-NEXT: 1 1.5 0.5 0.0 <total>
111 # ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
112 # ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>
114 # ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 sqrtss (%rax), %xmm1
115 # ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>
117 # ALL: [1] Code Region - test_sqrtsd
119 # ALL: Timeline view:
121 # BARCELONA-NEXT: 0123456789 0
122 # BARCELONA-NEXT: Index 0123456789 0123456789
124 # BDVER2-NEXT: 012345678
125 # BDVER2-NEXT: Index 0123456789
127 # BROADWELL-NEXT: 0123456789
128 # BROADWELL-NEXT: Index 0123456789 01234
130 # BTVER2-NEXT: 0123456789 0123456
131 # BTVER2-NEXT: Index 0123456789 0123456789
133 # HASWELL-NEXT: 0123456789
134 # HASWELL-NEXT: Index 0123456789 01234
136 # SKYLAKE-NEXT: 0123456789
137 # SKYLAKE-NEXT: Index 0123456789 0123456
139 # ZNVER1-NEXT: 0123456789 0
140 # ZNVER1-NEXT: Index 0123456789 0123456789
142 # ZNVER2-NEXT: 0123456789 0
143 # ZNVER2-NEXT: Index 0123456789 0123456789
145 # BARCELONA: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
146 # BARCELONA-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
148 # BDVER2: [0,0] DeeER. . . . leaq 8(%rsp,%rdi,2), %rax
149 # BDVER2-NEXT: [0,1] D==eeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
151 # BROADWELL: [0,0] DeER . . . . . leaq 8(%rsp,%rdi,2), %rax
152 # BROADWELL-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
154 # BTVER2: [0,0] DeeER. . . . . . .. leaq 8(%rsp,%rdi,2), %rax
155 # BTVER2-NEXT: [0,1] D==eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
157 # HASWELL: [0,0] DeER . . . . . leaq 8(%rsp,%rdi,2), %rax
158 # HASWELL-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
160 # SKYLAKE: [0,0] DeER . . . . .. leaq 8(%rsp,%rdi,2), %rax
161 # SKYLAKE-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
163 # ZNVER1: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
164 # ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
166 # ZNVER2: [0,0] DeER . . . . . . leaq 8(%rsp,%rdi,2), %rax
167 # ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeeeeeeeeeeeeeeeeER sqrtsd (%rax), %xmm1
169 # ALL: Average Wait times (based on the timeline view):
170 # ALL-NEXT: [0]: Executions
171 # ALL-NEXT: [1]: Average time spent waiting in a scheduler's queue
172 # ALL-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
173 # ALL-NEXT: [3]: Average time elapsed from WB until retire stage
175 # ALL: [0] [1] [2] [3]
176 # ALL-NEXT: 0. 1 1.0 1.0 0.0 leaq 8(%rsp,%rdi,2), %rax
178 # BARCELONA-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
179 # BARCELONA-NEXT: 1 1.5 0.5 0.0 <total>
181 # BDVER2-NEXT: 1. 1 3.0 0.0 0.0 sqrtsd (%rax), %xmm1
182 # BDVER2-NEXT: 1 2.0 0.5 0.0 <total>
184 # BROADWELL-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
185 # BROADWELL-NEXT: 1 1.5 0.5 0.0 <total>
187 # BTVER2-NEXT: 1. 1 3.0 0.0 0.0 sqrtsd (%rax), %xmm1
188 # BTVER2-NEXT: 1 2.0 0.5 0.0 <total>
190 # HASWELL-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
191 # HASWELL-NEXT: 1 1.5 0.5 0.0 <total>
193 # SKYLAKE-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
194 # SKYLAKE-NEXT: 1 1.5 0.5 0.0 <total>
196 # ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
197 # ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>
199 # ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 sqrtsd (%rax), %xmm1
200 # ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>
202 # ALL: [2] Code Region - test_rsqrtss
204 # ALL: Timeline view:
206 # BARCELONA-NEXT: 01234
208 # BROADWELL-NEXT: 0123
212 # ZNVER1-NEXT: 012345
213 # ZNVER2-NEXT: 012345
215 # ALL-NEXT: Index 0123456789
217 # BARCELONA: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
218 # BARCELONA-NEXT: [0,1] D=eeeeeeeeeeeER rsqrtss (%rax), %xmm1
220 # BDVER2: [0,0] DeeER. . . leaq 8(%rsp,%rdi,2), %rax
221 # BDVER2-NEXT: [0,1] D==eeeeeeeeeeER rsqrtss (%rax), %xmm1
223 # BROADWELL: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
224 # BROADWELL-NEXT: [0,1] D=eeeeeeeeeeER rsqrtss (%rax), %xmm1
226 # BTVER2: [0,0] DeeER. .. leaq 8(%rsp,%rdi,2), %rax
227 # BTVER2-NEXT: [0,1] D==eeeeeeeER rsqrtss (%rax), %xmm1
229 # HASWELL: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
230 # HASWELL-NEXT: [0,1] D=eeeeeeeeeeER rsqrtss (%rax), %xmm1
232 # SKYLAKE: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
233 # SKYLAKE-NEXT: [0,1] D=eeeeeeeeeER rsqrtss (%rax), %xmm1
235 # ZNVER1: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
236 # ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeER rsqrtss (%rax), %xmm1
238 # ZNVER2: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
239 # ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeER rsqrtss (%rax), %xmm1
241 # ALL: Average Wait times (based on the timeline view):
242 # ALL-NEXT: [0]: Executions
243 # ALL-NEXT: [1]: Average time spent waiting in a scheduler's queue
244 # ALL-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
245 # ALL-NEXT: [3]: Average time elapsed from WB until retire stage
247 # ALL: [0] [1] [2] [3]
248 # ALL-NEXT: 0. 1 1.0 1.0 0.0 leaq 8(%rsp,%rdi,2), %rax
250 # BARCELONA-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
251 # BARCELONA-NEXT: 1 1.5 0.5 0.0 <total>
253 # BDVER2-NEXT: 1. 1 3.0 0.0 0.0 rsqrtss (%rax), %xmm1
254 # BDVER2-NEXT: 1 2.0 0.5 0.0 <total>
256 # BROADWELL-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
257 # BROADWELL-NEXT: 1 1.5 0.5 0.0 <total>
259 # BTVER2-NEXT: 1. 1 3.0 0.0 0.0 rsqrtss (%rax), %xmm1
260 # BTVER2-NEXT: 1 2.0 0.5 0.0 <total>
262 # HASWELL-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
263 # HASWELL-NEXT: 1 1.5 0.5 0.0 <total>
265 # SKYLAKE-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
266 # SKYLAKE-NEXT: 1 1.5 0.5 0.0 <total>
268 # ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
269 # ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>
271 # ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 rsqrtss (%rax), %xmm1
272 # ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>
274 # ALL: [3] Code Region - test_rcp
276 # ALL: Timeline view:
278 # BARCELONA-NEXT: 01234
280 # BROADWELL-NEXT: 0123
284 # ZNVER1-NEXT: 012345
285 # ZNVER2-NEXT: 012345
287 # ALL-NEXT: Index 0123456789
289 # BARCELONA: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
290 # BARCELONA-NEXT: [0,1] D=eeeeeeeeeeeER rcpss (%rax), %xmm1
292 # BDVER2: [0,0] DeeER. . . leaq 8(%rsp,%rdi,2), %rax
293 # BDVER2-NEXT: [0,1] D==eeeeeeeeeeER rcpss (%rax), %xmm1
295 # BROADWELL: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
296 # BROADWELL-NEXT: [0,1] D=eeeeeeeeeeER rcpss (%rax), %xmm1
298 # BTVER2: [0,0] DeeER. .. leaq 8(%rsp,%rdi,2), %rax
299 # BTVER2-NEXT: [0,1] D==eeeeeeeER rcpss (%rax), %xmm1
301 # HASWELL: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
302 # HASWELL-NEXT: [0,1] D=eeeeeeeeeeER rcpss (%rax), %xmm1
304 # SKYLAKE: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
305 # SKYLAKE-NEXT: [0,1] D=eeeeeeeeeER rcpss (%rax), %xmm1
307 # ZNVER1: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
308 # ZNVER1-NEXT: [0,1] D=eeeeeeeeeeeeER rcpss (%rax), %xmm1
310 # ZNVER2: [0,0] DeER . . . leaq 8(%rsp,%rdi,2), %rax
311 # ZNVER2-NEXT: [0,1] D=eeeeeeeeeeeeER rcpss (%rax), %xmm1
313 # ALL: Average Wait times (based on the timeline view):
314 # ALL-NEXT: [0]: Executions
315 # ALL-NEXT: [1]: Average time spent waiting in a scheduler's queue
316 # ALL-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
317 # ALL-NEXT: [3]: Average time elapsed from WB until retire stage
319 # ALL: [0] [1] [2] [3]
320 # ALL-NEXT: 0. 1 1.0 1.0 0.0 leaq 8(%rsp,%rdi,2), %rax
322 # BARCELONA-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
323 # BARCELONA-NEXT: 1 1.5 0.5 0.0 <total>
325 # BDVER2-NEXT: 1. 1 3.0 0.0 0.0 rcpss (%rax), %xmm1
326 # BDVER2-NEXT: 1 2.0 0.5 0.0 <total>
328 # BROADWELL-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
329 # BROADWELL-NEXT: 1 1.5 0.5 0.0 <total>
331 # BTVER2-NEXT: 1. 1 3.0 0.0 0.0 rcpss (%rax), %xmm1
332 # BTVER2-NEXT: 1 2.0 0.5 0.0 <total>
334 # HASWELL-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
335 # HASWELL-NEXT: 1 1.5 0.5 0.0 <total>
337 # SKYLAKE-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
338 # SKYLAKE-NEXT: 1 1.5 0.5 0.0 <total>
340 # ZNVER1-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
341 # ZNVER1-NEXT: 1 1.5 0.5 0.0 <total>
343 # ZNVER2-NEXT: 1. 1 2.0 0.0 0.0 rcpss (%rax), %xmm1
344 # ZNVER2-NEXT: 1 1.5 0.5 0.0 <total>