Lines Matching full:cost
1 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -mattr=+sse2,-sse4.1 -cost-model -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=SSE2
2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7 -cost-model -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=SSE41
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=corei7-avx -cost-model -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=AVX
4 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=core-avx2 -cost-model -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=AVX2
5 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=bdver2 -cost-model -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=XOP -check-prefix=XOPAVX
6 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=bdver4 -cost-model -analyze | FileCheck %s -check-prefix=CHECK -check-prefix=XOP -check-prefix=XOPAVX2
8 ; Verify the cost of vector arithmetic shift right instructions.
15 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v2i64':
16 ; SSE2: Found an estimated cost of 12 for instruction: %shift
17 ; SSE41: Found an estimated cost of 12 for instruction: %shift
18 ; AVX: Found an estimated cost of 12 for instruction: %shift
19 ; AVX2: Found an estimated cost of 4 for instruction: %shift
20 ; XOP: Found an estimated cost of 2 for instruction: %shift
26 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v4i64':
27 ; SSE2: Found an estimated cost of 24 for instruction: %shift
28 ; SSE41: Found an estimated cost of 24 for instruction: %shift
29 ; AVX: Found an estimated cost of 24 for instruction: %shift
30 ; AVX2: Found an estimated cost of 4 for instruction: %shift
31 ; XOP: Found an estimated cost of 4 for instruction: %shift
37 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v4i32':
38 ; SSE2: Found an estimated cost of 16 for instruction: %shift
39 ; SSE41: Found an estimated cost of 16 for instruction: %shift
40 ; AVX: Found an estimated cost of 16 for instruction: %shift
41 ; AVX2: Found an estimated cost of 1 for instruction: %shift
42 ; XOPAVX: Found an estimated cost of 2 for instruction: %shift
43 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
49 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v8i32':
50 ; SSE2: Found an estimated cost of 32 for instruction: %shift
51 ; SSE41: Found an estimated cost of 32 for instruction: %shift
52 ; AVX: Found an estimated cost of 32 for instruction: %shift
53 ; AVX2: Found an estimated cost of 1 for instruction: %shift
54 ; XOPAVX: Found an estimated cost of 4 for instruction: %shift
55 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
61 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v8i16':
62 ; SSE2: Found an estimated cost of 32 for instruction: %shift
63 ; SSE41: Found an estimated cost of 32 for instruction: %shift
64 ; AVX: Found an estimated cost of 32 for instruction: %shift
65 ; AVX2: Found an estimated cost of 32 for instruction: %shift
66 ; XOP: Found an estimated cost of 2 for instruction: %shift
72 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v16i16':
73 ; SSE2: Found an estimated cost of 64 for instruction: %shift
74 ; SSE41: Found an estimated cost of 64 for instruction: %shift
75 ; AVX: Found an estimated cost of 64 for instruction: %shift
76 ; AVX2: Found an estimated cost of 10 for instruction: %shift
77 ; XOP: Found an estimated cost of 4 for instruction: %shift
83 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v16i8':
84 ; SSE2: Found an estimated cost of 54 for instruction: %shift
85 ; SSE41: Found an estimated cost of 54 for instruction: %shift
86 ; AVX: Found an estimated cost of 54 for instruction: %shift
87 ; AVX2: Found an estimated cost of 54 for instruction: %shift
88 ; XOP: Found an estimated cost of 2 for instruction: %shift
94 ; CHECK: 'Cost Model Analysis' for function 'var_shift_v32i8':
95 ; SSE2: Found an estimated cost of 108 for instruction: %shift
96 ; SSE41: Found an estimated cost of 108 for instruction: %shift
97 ; AVX: Found an estimated cost of 108 for instruction: %shift
98 ; AVX2: Found an estimated cost of 24 for instruction: %shift
99 ; XOP: Found an estimated cost of 4 for instruction: %shift
109 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v2i64':
110 ; SSE2: Found an estimated cost of 12 for instruction: %shift
111 ; SSE41: Found an estimated cost of 12 for instruction: %shift
112 ; AVX: Found an estimated cost of 12 for instruction: %shift
113 ; AVX2: Found an estimated cost of 4 for instruction: %shift
114 ; XOP: Found an estimated cost of 2 for instruction: %shift
121 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v4i64':
122 ; SSE2: Found an estimated cost of 24 for instruction: %shift
123 ; SSE41: Found an estimated cost of 24 for instruction: %shift
124 ; AVX: Found an estimated cost of 24 for instruction: %shift
125 ; AVX2: Found an estimated cost of 4 for instruction: %shift
126 ; XOP: Found an estimated cost of 4 for instruction: %shift
133 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v4i32':
134 ; SSE2: Found an estimated cost of 16 for instruction: %shift
135 ; SSE41: Found an estimated cost of 16 for instruction: %shift
136 ; AVX: Found an estimated cost of 16 for instruction: %shift
137 ; AVX2: Found an estimated cost of 1 for instruction: %shift
138 ; XOPAVX: Found an estimated cost of 2 for instruction: %shift
139 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
146 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v8i32':
147 ; SSE2: Found an estimated cost of 32 for instruction: %shift
148 ; SSE41: Found an estimated cost of 32 for instruction: %shift
149 ; AVX: Found an estimated cost of 32 for instruction: %shift
150 ; AVX2: Found an estimated cost of 1 for instruction: %shift
151 ; XOPAVX: Found an estimated cost of 4 for instruction: %shift
152 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
159 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v8i16':
160 ; SSE2: Found an estimated cost of 32 for instruction: %shift
161 ; SSE41: Found an estimated cost of 32 for instruction: %shift
162 ; AVX: Found an estimated cost of 32 for instruction: %shift
163 ; AVX2: Found an estimated cost of 32 for instruction: %shift
164 ; XOP: Found an estimated cost of 2 for instruction: %shift
171 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v16i16':
172 ; SSE2: Found an estimated cost of 64 for instruction: %shift
173 ; SSE41: Found an estimated cost of 64 for instruction: %shift
174 ; AVX: Found an estimated cost of 64 for instruction: %shift
175 ; AVX2: Found an estimated cost of 10 for instruction: %shift
176 ; XOP: Found an estimated cost of 4 for instruction: %shift
183 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v16i8':
184 ; SSE2: Found an estimated cost of 54 for instruction: %shift
185 ; SSE41: Found an estimated cost of 54 for instruction: %shift
186 ; AVX: Found an estimated cost of 54 for instruction: %shift
187 ; AVX2: Found an estimated cost of 54 for instruction: %shift
188 ; XOP: Found an estimated cost of 2 for instruction: %shift
195 ; CHECK: 'Cost Model Analysis' for function 'splatvar_shift_v32i8':
196 ; SSE2: Found an estimated cost of 108 for instruction: %shift
197 ; SSE41: Found an estimated cost of 108 for instruction: %shift
198 ; AVX: Found an estimated cost of 108 for instruction: %shift
199 ; AVX2: Found an estimated cost of 24 for instruction: %shift
200 ; XOP: Found an estimated cost of 4 for instruction: %shift
211 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v2i64':
212 ; SSE2: Found an estimated cost of 12 for instruction: %shift
213 ; SSE41: Found an estimated cost of 12 for instruction: %shift
214 ; AVX: Found an estimated cost of 12 for instruction: %shift
215 ; AVX2: Found an estimated cost of 4 for instruction: %shift
216 ; XOP: Found an estimated cost of 2 for instruction: %shift
222 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v4i64':
223 ; SSE2: Found an estimated cost of 24 for instruction: %shift
224 ; SSE41: Found an estimated cost of 24 for instruction: %shift
225 ; AVX: Found an estimated cost of 24 for instruction: %shift
226 ; AVX2: Found an estimated cost of 4 for instruction: %shift
227 ; XOP: Found an estimated cost of 4 for instruction: %shift
233 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v4i32':
234 ; SSE2: Found an estimated cost of 16 for instruction: %shift
235 ; SSE41: Found an estimated cost of 16 for instruction: %shift
236 ; AVX: Found an estimated cost of 16 for instruction: %shift
237 ; AVX2: Found an estimated cost of 1 for instruction: %shift
238 ; XOPAVX: Found an estimated cost of 2 for instruction: %shift
239 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
245 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v8i32':
246 ; SSE2: Found an estimated cost of 32 for instruction: %shift
247 ; SSE41: Found an estimated cost of 32 for instruction: %shift
248 ; AVX: Found an estimated cost of 32 for instruction: %shift
249 ; AVX2: Found an estimated cost of 1 for instruction: %shift
250 ; XOPAVX: Found an estimated cost of 4 for instruction: %shift
251 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
257 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v8i16':
258 ; SSE2: Found an estimated cost of 32 for instruction: %shift
259 ; SSE41: Found an estimated cost of 32 for instruction: %shift
260 ; AVX: Found an estimated cost of 32 for instruction: %shift
261 ; AVX2: Found an estimated cost of 32 for instruction: %shift
262 ; XOP: Found an estimated cost of 2 for instruction: %shift
268 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v16i16':
269 ; SSE2: Found an estimated cost of 64 for instruction: %shift
270 ; SSE41: Found an estimated cost of 64 for instruction: %shift
271 ; AVX: Found an estimated cost of 64 for instruction: %shift
272 ; AVX2: Found an estimated cost of 10 for instruction: %shift
273 ; XOP: Found an estimated cost of 4 for instruction: %shift
279 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v16i8':
280 ; SSE2: Found an estimated cost of 54 for instruction: %shift
281 ; SSE41: Found an estimated cost of 54 for instruction: %shift
282 ; AVX: Found an estimated cost of 54 for instruction: %shift
283 ; AVX2: Found an estimated cost of 54 for instruction: %shift
284 ; XOP: Found an estimated cost of 2 for instruction: %shift
290 ; CHECK: 'Cost Model Analysis' for function 'constant_shift_v32i8':
291 ; SSE2: Found an estimated cost of 108 for instruction: %shift
292 ; SSE41: Found an estimated cost of 108 for instruction: %shift
293 ; AVX: Found an estimated cost of 108 for instruction: %shift
294 ; AVX2: Found an estimated cost of 24 for instruction: %shift
295 ; XOP: Found an estimated cost of 4 for instruction: %shift
305 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v2i64':
306 ; SSE2: Found an estimated cost of 4 for instruction: %shift
307 ; SSE41: Found an estimated cost of 4 for instruction: %shift
308 ; AVX: Found an estimated cost of 4 for instruction: %shift
309 ; AVX2: Found an estimated cost of 4 for instruction: %shift
310 ; XOP: Found an estimated cost of 2 for instruction: %shift
316 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v4i64':
317 ; SSE2: Found an estimated cost of 8 for instruction: %shift
318 ; SSE41: Found an estimated cost of 8 for instruction: %shift
319 ; AVX: Found an estimated cost of 8 for instruction: %shift
320 ; AVX2: Found an estimated cost of 4 for instruction: %shift
321 ; XOP: Found an estimated cost of 4 for instruction: %shift
327 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v4i32':
328 ; SSE2: Found an estimated cost of 1 for instruction: %shift
329 ; SSE41: Found an estimated cost of 1 for instruction: %shift
330 ; AVX: Found an estimated cost of 1 for instruction: %shift
331 ; AVX2: Found an estimated cost of 1 for instruction: %shift
332 ; XOPAVX: Found an estimated cost
333 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
339 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v8i32':
340 ; SSE2: Found an estimated cost of 2 for instruction: %shift
341 ; SSE41: Found an estimated cost of 2 for instruction: %shift
342 ; AVX: Found an estimated cost of 2 for instruction: %shift
343 ; AVX2: Found an estimated cost of 1 for instruction: %shift
344 ; XOPAVX: Found an estimated cost of 4 for instruction: %shift
345 ; XOPAVX2: Found an estimated cost of 1 for instruction: %shift
351 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v8i16':
352 ; SSE2: Found an estimated cost of 1 for instruction: %shift
353 ; SSE41: Found an estimated cost of 1 for instruction: %shift
354 ; AVX: Found an estimated cost of 1 for instruction: %shift
355 ; AVX2: Found an estimated cost of 1 for instruction: %shift
356 ; XOP: Found an estimated cost of 2 for instruction: %shift
362 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v16i16':
363 ; SSE2: Found an estimated cost of 2 for instruction: %shift
364 ; SSE41: Found an estimated cost of 2 for instruction: %shift
365 ; AVX: Found an estimated cost of 2 for instruction: %shift
366 ; AVX2: Found an estimated cost of 10 for instruction: %shift
367 ; XOP: Found an estimated cost of 4 for instruction: %shift
373 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v16i8':
374 ; SSE2: Found an estimated cost of 4 for instruction: %shift
375 ; SSE41: Found an estimated cost of 4 for instruction: %shift
376 ; AVX: Found an estimated cost of 4 for instruction: %shift
377 ; AVX2: Found an estimated cost of 4 for instruction: %shift
378 ; XOP: Found an estimated cost of 2 for instruction: %shift
384 ; CHECK: 'Cost Model Analysis' for function 'splatconstant_shift_v32i8':
385 ; SSE2: Found an estimated cost of 8 for instruction: %shift
386 ; SSE41: Found an estimated cost of 8 for instruction: %shift
387 ; AVX: Found an estimated cost of 8 for instruction: %shift
388 ; AVX2: Found an estimated cost of 24 for instruction: %shift
389 ; XOP: Found an estimated cost of 4 for instruction: %shift