1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+sse2 | FileCheck %s --check-prefixes=CHECK,SSE2
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+sse4.2 | FileCheck %s --check-prefixes=CHECK,SSE42
4 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx | FileCheck %s --check-prefixes=CHECK,AVX,AVX1
5 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX2
6 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+xop,+avx | FileCheck %s --check-prefixes=CHECK,XOP,XOPAVX1
7 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+xop,+avx2 | FileCheck %s --check-prefixes=CHECK,XOP,XOPAVX2
8 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
9 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f,+avx512dq | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
10 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f,+avx512bw | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512BW
11 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
12 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f,+avx512dq,+avx512vl | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512F
13 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=+avx512f,+avx512bw,+avx512vl | FileCheck %s --check-prefixes=CHECK,AVX512,AVX512BW
15 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mcpu=slm | FileCheck %s --check-prefixes=CHECK,SSE42
16 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mcpu=goldmont | FileCheck %s --check-prefixes=CHECK,SSE42
17 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mcpu=btver2 | FileCheck %s --check-prefixes=CHECK,AVX,AVX1
19 ; Verify the cost of vector logical shift right instructions.
25 define <2 x i64> @var_shift_v2i64(<2 x i64> %a, <2 x i64> %b) {
26 ; SSE2-LABEL: 'var_shift_v2i64'
27 ; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <2 x i64> %a, %b
28 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
30 ; SSE42-LABEL: 'var_shift_v2i64'
31 ; SSE42-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <2 x i64> %a, %b
32 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
34 ; AVX1-LABEL: 'var_shift_v2i64'
35 ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <2 x i64> %a, %b
36 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
38 ; AVX2-LABEL: 'var_shift_v2i64'
39 ; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, %b
40 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
42 ; XOP-LABEL: 'var_shift_v2i64'
43 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %b
44 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
46 ; AVX512-LABEL: 'var_shift_v2i64'
47 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, %b
48 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
50 %shift = ashr <2 x i64> %a, %b
54 define <4 x i64> @var_shift_v4i64(<4 x i64> %a, <4 x i64> %b) {
55 ; SSE2-LABEL: 'var_shift_v4i64'
56 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %shift = ashr <4 x i64> %a, %b
57 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
59 ; SSE42-LABEL: 'var_shift_v4i64'
60 ; SSE42-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <4 x i64> %a, %b
61 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
63 ; AVX1-LABEL: 'var_shift_v4i64'
64 ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <4 x i64> %a, %b
65 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
67 ; AVX2-LABEL: 'var_shift_v4i64'
68 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, %b
69 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
71 ; XOP-LABEL: 'var_shift_v4i64'
72 ; XOP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i64> %a, %b
73 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
75 ; AVX512-LABEL: 'var_shift_v4i64'
76 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, %b
77 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
79 %shift = ashr <4 x i64> %a, %b
83 define <8 x i64> @var_shift_v8i64(<8 x i64> %a, <8 x i64> %b) {
84 ; SSE2-LABEL: 'var_shift_v8i64'
85 ; SSE2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %shift = ashr <8 x i64> %a, %b
86 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
88 ; SSE42-LABEL: 'var_shift_v8i64'
89 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <8 x i64> %a, %b
90 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
92 ; AVX1-LABEL: 'var_shift_v8i64'
93 ; AVX1-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %shift = ashr <8 x i64> %a, %b
94 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
96 ; AVX2-LABEL: 'var_shift_v8i64'
97 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, %b
98 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
100 ; XOP-LABEL: 'var_shift_v8i64'
101 ; XOP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <8 x i64> %a, %b
102 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
104 ; AVX512-LABEL: 'var_shift_v8i64'
105 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, %b
106 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
108 %shift = ashr <8 x i64> %a, %b
112 define <4 x i32> @var_shift_v4i32(<4 x i32> %a, <4 x i32> %b) {
113 ; SSE2-LABEL: 'var_shift_v4i32'
114 ; SSE2-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %shift = ashr <4 x i32> %a, %b
115 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
117 ; SSE42-LABEL: 'var_shift_v4i32'
118 ; SSE42-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %shift = ashr <4 x i32> %a, %b
119 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
121 ; AVX1-LABEL: 'var_shift_v4i32'
122 ; AVX1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <4 x i32> %a, %b
123 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
125 ; AVX2-LABEL: 'var_shift_v4i32'
126 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <4 x i32> %a, %b
127 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
129 ; XOP-LABEL: 'var_shift_v4i32'
130 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b
131 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
133 ; AVX512-LABEL: 'var_shift_v4i32'
134 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, %b
135 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
137 %shift = ashr <4 x i32> %a, %b
141 define <8 x i32> @var_shift_v8i32(<8 x i32> %a, <8 x i32> %b) {
142 ; SSE2-LABEL: 'var_shift_v8i32'
143 ; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %shift = ashr <8 x i32> %a, %b
144 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
146 ; SSE42-LABEL: 'var_shift_v8i32'
147 ; SSE42-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %shift = ashr <8 x i32> %a, %b
148 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
150 ; AVX1-LABEL: 'var_shift_v8i32'
151 ; AVX1-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %shift = ashr <8 x i32> %a, %b
152 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
154 ; AVX2-LABEL: 'var_shift_v8i32'
155 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %b
156 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
158 ; XOPAVX1-LABEL: 'var_shift_v8i32'
159 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <8 x i32> %a, %b
160 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
162 ; XOPAVX2-LABEL: 'var_shift_v8i32'
163 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %b
164 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
166 ; AVX512-LABEL: 'var_shift_v8i32'
167 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, %b
168 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
170 %shift = ashr <8 x i32> %a, %b
174 define <16 x i32> @var_shift_v16i32(<16 x i32> %a, <16 x i32> %b) {
175 ; SSE2-LABEL: 'var_shift_v16i32'
176 ; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %shift = ashr <16 x i32> %a, %b
177 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
179 ; SSE42-LABEL: 'var_shift_v16i32'
180 ; SSE42-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %shift = ashr <16 x i32> %a, %b
181 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
183 ; AVX1-LABEL: 'var_shift_v16i32'
184 ; AVX1-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %shift = ashr <16 x i32> %a, %b
185 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
187 ; AVX2-LABEL: 'var_shift_v16i32'
188 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, %b
189 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
191 ; XOPAVX1-LABEL: 'var_shift_v16i32'
192 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <16 x i32> %a, %b
193 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
195 ; XOPAVX2-LABEL: 'var_shift_v16i32'
196 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, %b
197 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
199 ; AVX512-LABEL: 'var_shift_v16i32'
200 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, %b
201 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
203 %shift = ashr <16 x i32> %a, %b
204 ret <16 x i32> %shift
207 define <8 x i16> @var_shift_v8i16(<8 x i16> %a, <8 x i16> %b) {
208 ; SSE2-LABEL: 'var_shift_v8i16'
209 ; SSE2-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %shift = ashr <8 x i16> %a, %b
210 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
212 ; SSE42-LABEL: 'var_shift_v8i16'
213 ; SSE42-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %shift = ashr <8 x i16> %a, %b
214 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
216 ; AVX1-LABEL: 'var_shift_v8i16'
217 ; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = ashr <8 x i16> %a, %b
218 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
220 ; AVX2-LABEL: 'var_shift_v8i16'
221 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i16> %a, %b
222 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
224 ; XOP-LABEL: 'var_shift_v8i16'
225 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b
226 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
228 ; AVX512F-LABEL: 'var_shift_v8i16'
229 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i16> %a, %b
230 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
232 ; AVX512BW-LABEL: 'var_shift_v8i16'
233 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, %b
234 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
236 %shift = ashr <8 x i16> %a, %b
240 define <16 x i16> @var_shift_v16i16(<16 x i16> %a, <16 x i16> %b) {
241 ; SSE2-LABEL: 'var_shift_v16i16'
242 ; SSE2-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %shift = ashr <16 x i16> %a, %b
243 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
245 ; SSE42-LABEL: 'var_shift_v16i16'
246 ; SSE42-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %shift = ashr <16 x i16> %a, %b
247 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
249 ; AVX1-LABEL: 'var_shift_v16i16'
250 ; AVX1-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %shift = ashr <16 x i16> %a, %b
251 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
253 ; AVX2-LABEL: 'var_shift_v16i16'
254 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i16> %a, %b
255 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
257 ; XOP-LABEL: 'var_shift_v16i16'
258 ; XOP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i16> %a, %b
259 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
261 ; AVX512F-LABEL: 'var_shift_v16i16'
262 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i16> %a, %b
263 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
265 ; AVX512BW-LABEL: 'var_shift_v16i16'
266 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, %b
267 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
269 %shift = ashr <16 x i16> %a, %b
270 ret <16 x i16> %shift
273 define <32 x i16> @var_shift_v32i16(<32 x i16> %a, <32 x i16> %b) {
274 ; SSE2-LABEL: 'var_shift_v32i16'
275 ; SSE2-NEXT: Cost Model: Found an estimated cost of 124 for instruction: %shift = ashr <32 x i16> %a, %b
276 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
278 ; SSE42-LABEL: 'var_shift_v32i16'
279 ; SSE42-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %shift = ashr <32 x i16> %a, %b
280 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
282 ; AVX1-LABEL: 'var_shift_v32i16'
283 ; AVX1-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %shift = ashr <32 x i16> %a, %b
284 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
286 ; AVX2-LABEL: 'var_shift_v32i16'
287 ; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <32 x i16> %a, %b
288 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
290 ; XOP-LABEL: 'var_shift_v32i16'
291 ; XOP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <32 x i16> %a, %b
292 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
294 ; AVX512F-LABEL: 'var_shift_v32i16'
295 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <32 x i16> %a, %b
296 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
298 ; AVX512BW-LABEL: 'var_shift_v32i16'
299 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, %b
300 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
302 %shift = ashr <32 x i16> %a, %b
303 ret <32 x i16> %shift
306 define <16 x i8> @var_shift_v16i8(<16 x i8> %a, <16 x i8> %b) {
307 ; SSE2-LABEL: 'var_shift_v16i8'
308 ; SSE2-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %shift = ashr <16 x i8> %a, %b
309 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
311 ; SSE42-LABEL: 'var_shift_v16i8'
312 ; SSE42-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = ashr <16 x i8> %a, %b
313 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
315 ; AVX1-LABEL: 'var_shift_v16i8'
316 ; AVX1-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = ashr <16 x i8> %a, %b
317 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
319 ; AVX2-LABEL: 'var_shift_v16i8'
320 ; AVX2-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <16 x i8> %a, %b
321 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
323 ; XOP-LABEL: 'var_shift_v16i8'
324 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, %b
325 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
327 ; AVX512F-LABEL: 'var_shift_v16i8'
328 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <16 x i8> %a, %b
329 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
331 ; AVX512BW-LABEL: 'var_shift_v16i8'
332 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i8> %a, %b
333 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
335 %shift = ashr <16 x i8> %a, %b
339 define <32 x i8> @var_shift_v32i8(<32 x i8> %a, <32 x i8> %b) {
340 ; SSE2-LABEL: 'var_shift_v32i8'
341 ; SSE2-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %shift = ashr <32 x i8> %a, %b
342 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
344 ; SSE42-LABEL: 'var_shift_v32i8'
345 ; SSE42-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %shift = ashr <32 x i8> %a, %b
346 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
348 ; AVX1-LABEL: 'var_shift_v32i8'
349 ; AVX1-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %shift = ashr <32 x i8> %a, %b
350 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
352 ; AVX2-LABEL: 'var_shift_v32i8'
353 ; AVX2-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %shift = ashr <32 x i8> %a, %b
354 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
356 ; XOP-LABEL: 'var_shift_v32i8'
357 ; XOP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, %b
358 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
360 ; AVX512F-LABEL: 'var_shift_v32i8'
361 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %shift = ashr <32 x i8> %a, %b
362 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
364 ; AVX512BW-LABEL: 'var_shift_v32i8'
365 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <32 x i8> %a, %b
366 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
368 %shift = ashr <32 x i8> %a, %b
372 define <64 x i8> @var_shift_v64i8(<64 x i8> %a, <64 x i8> %b) {
373 ; SSE2-LABEL: 'var_shift_v64i8'
374 ; SSE2-NEXT: Cost Model: Found an estimated cost of 216 for instruction: %shift = ashr <64 x i8> %a, %b
375 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
377 ; SSE42-LABEL: 'var_shift_v64i8'
378 ; SSE42-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %shift = ashr <64 x i8> %a, %b
379 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
381 ; AVX1-LABEL: 'var_shift_v64i8'
382 ; AVX1-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %shift = ashr <64 x i8> %a, %b
383 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
385 ; AVX2-LABEL: 'var_shift_v64i8'
386 ; AVX2-NEXT: Cost Model: Found an estimated cost of 86 for instruction: %shift = ashr <64 x i8> %a, %b
387 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
389 ; XOP-LABEL: 'var_shift_v64i8'
390 ; XOP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <64 x i8> %a, %b
391 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
393 ; AVX512F-LABEL: 'var_shift_v64i8'
394 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 63 for instruction: %shift = ashr <64 x i8> %a, %b
395 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
397 ; AVX512BW-LABEL: 'var_shift_v64i8'
398 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <64 x i8> %a, %b
399 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
401 %shift = ashr <64 x i8> %a, %b
406 ; Uniform Variable Shifts
409 define <2 x i64> @splatvar_shift_v2i64(<2 x i64> %a, i64 %b) {
410 ; SSE2-LABEL: 'splatvar_shift_v2i64'
411 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> undef, i64 %b, i32 0
412 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer
413 ; SSE2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <2 x i64> %a, %splat
414 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
416 ; SSE42-LABEL: 'splatvar_shift_v2i64'
417 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> undef, i64 %b, i32 0
418 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer
419 ; SSE42-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <2 x i64> %a, %splat
420 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
422 ; AVX-LABEL: 'splatvar_shift_v2i64'
423 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> undef, i64 %b, i32 0
424 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer
425 ; AVX-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <2 x i64> %a, %splat
426 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
428 ; XOP-LABEL: 'splatvar_shift_v2i64'
429 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> undef, i64 %b, i32 0
430 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer
431 ; XOP-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <2 x i64> %a, %splat
432 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
434 ; AVX512-LABEL: 'splatvar_shift_v2i64'
435 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <2 x i64> undef, i64 %b, i32 0
436 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer
437 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <2 x i64> %a, %splat
438 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
440 %insert = insertelement <2 x i64> undef, i64 %b, i32 0
441 %splat = shufflevector <2 x i64> %insert, <2 x i64> undef, <2 x i32> zeroinitializer
442 %shift = ashr <2 x i64> %a, %splat
446 define <4 x i64> @splatvar_shift_v4i64(<4 x i64> %a, i64 %b) {
447 ; SSE2-LABEL: 'splatvar_shift_v4i64'
448 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
449 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
450 ; SSE2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <4 x i64> %a, %splat
451 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
453 ; SSE42-LABEL: 'splatvar_shift_v4i64'
454 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
455 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
456 ; SSE42-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <4 x i64> %a, %splat
457 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
459 ; AVX1-LABEL: 'splatvar_shift_v4i64'
460 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
461 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
462 ; AVX1-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <4 x i64> %a, %splat
463 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
465 ; AVX2-LABEL: 'splatvar_shift_v4i64'
466 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
467 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
468 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, %splat
469 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
471 ; XOPAVX1-LABEL: 'splatvar_shift_v4i64'
472 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
473 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
474 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <4 x i64> %a, %splat
475 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
477 ; XOPAVX2-LABEL: 'splatvar_shift_v4i64'
478 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
479 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
480 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, %splat
481 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
483 ; AVX512-LABEL: 'splatvar_shift_v4i64'
484 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i64> undef, i64 %b, i32 0
485 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
486 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <4 x i64> %a, %splat
487 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
489 %insert = insertelement <4 x i64> undef, i64 %b, i32 0
490 %splat = shufflevector <4 x i64> %insert, <4 x i64> undef, <4 x i32> zeroinitializer
491 %shift = ashr <4 x i64> %a, %splat
495 define <8 x i64> @splatvar_shift_v8i64(<8 x i64> %a, i64 %b) {
496 ; SSE2-LABEL: 'splatvar_shift_v8i64'
497 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
498 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
499 ; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <8 x i64> %a, %splat
500 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
502 ; SSE42-LABEL: 'splatvar_shift_v8i64'
503 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
504 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
505 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <8 x i64> %a, %splat
506 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
508 ; AVX1-LABEL: 'splatvar_shift_v8i64'
509 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
510 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
511 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <8 x i64> %a, %splat
512 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
514 ; AVX2-LABEL: 'splatvar_shift_v8i64'
515 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
516 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
517 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, %splat
518 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
520 ; XOPAVX1-LABEL: 'splatvar_shift_v8i64'
521 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
522 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
523 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <8 x i64> %a, %splat
524 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
526 ; XOPAVX2-LABEL: 'splatvar_shift_v8i64'
527 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
528 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
529 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, %splat
530 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
532 ; AVX512-LABEL: 'splatvar_shift_v8i64'
533 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i64> undef, i64 %b, i32 0
534 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
535 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i64> %a, %splat
536 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
538 %insert = insertelement <8 x i64> undef, i64 %b, i32 0
539 %splat = shufflevector <8 x i64> %insert, <8 x i64> undef, <8 x i32> zeroinitializer
540 %shift = ashr <8 x i64> %a, %splat
544 define <4 x i32> @splatvar_shift_v4i32(<4 x i32> %a, i32 %b) {
545 ; CHECK-LABEL: 'splatvar_shift_v4i32'
546 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <4 x i32> undef, i32 %b, i32 0
547 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer
548 ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <4 x i32> %a, %splat
549 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
551 %insert = insertelement <4 x i32> undef, i32 %b, i32 0
552 %splat = shufflevector <4 x i32> %insert, <4 x i32> undef, <4 x i32> zeroinitializer
553 %shift = ashr <4 x i32> %a, %splat
557 define <8 x i32> @splatvar_shift_v8i32(<8 x i32> %a, i32 %b) {
558 ; SSE2-LABEL: 'splatvar_shift_v8i32'
559 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
560 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
561 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <8 x i32> %a, %splat
562 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
564 ; SSE42-LABEL: 'splatvar_shift_v8i32'
565 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
566 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
567 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <8 x i32> %a, %splat
568 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
570 ; AVX1-LABEL: 'splatvar_shift_v8i32'
571 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
572 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
573 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <8 x i32> %a, %splat
574 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
576 ; AVX2-LABEL: 'splatvar_shift_v8i32'
577 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
578 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
579 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %splat
580 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
582 ; XOPAVX1-LABEL: 'splatvar_shift_v8i32'
583 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
584 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
585 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <8 x i32> %a, %splat
586 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
588 ; XOPAVX2-LABEL: 'splatvar_shift_v8i32'
589 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
590 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
591 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %splat
592 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
594 ; AVX512-LABEL: 'splatvar_shift_v8i32'
595 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i32> undef, i32 %b, i32 0
596 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
597 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, %splat
598 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
600 %insert = insertelement <8 x i32> undef, i32 %b, i32 0
601 %splat = shufflevector <8 x i32> %insert, <8 x i32> undef, <8 x i32> zeroinitializer
602 %shift = ashr <8 x i32> %a, %splat
606 define <16 x i32> @splatvar_shift_v16i32(<16 x i32> %a, i32 %b) {
607 ; SSE2-LABEL: 'splatvar_shift_v16i32'
608 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
609 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
610 ; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <16 x i32> %a, %splat
611 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
613 ; SSE42-LABEL: 'splatvar_shift_v16i32'
614 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
615 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
616 ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <16 x i32> %a, %splat
617 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
619 ; AVX1-LABEL: 'splatvar_shift_v16i32'
620 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
621 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
622 ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i32> %a, %splat
623 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
625 ; AVX2-LABEL: 'splatvar_shift_v16i32'
626 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
627 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
628 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, %splat
629 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
631 ; XOPAVX1-LABEL: 'splatvar_shift_v16i32'
632 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
633 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
634 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i32> %a, %splat
635 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
637 ; XOPAVX2-LABEL: 'splatvar_shift_v16i32'
638 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
639 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
640 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, %splat
641 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
643 ; AVX512-LABEL: 'splatvar_shift_v16i32'
644 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i32> undef, i32 %b, i32 0
645 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
646 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i32> %a, %splat
647 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
649 %insert = insertelement <16 x i32> undef, i32 %b, i32 0
650 %splat = shufflevector <16 x i32> %insert, <16 x i32> undef, <16 x i32> zeroinitializer
651 %shift = ashr <16 x i32> %a, %splat
652 ret <16 x i32> %shift
655 define <8 x i16> @splatvar_shift_v8i16(<8 x i16> %a, i16 %b) {
656 ; SSE2-LABEL: 'splatvar_shift_v8i16'
657 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i16> undef, i16 %b, i32 0
658 ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer
659 ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, %splat
660 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
662 ; SSE42-LABEL: 'splatvar_shift_v8i16'
663 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i16> undef, i16 %b, i32 0
664 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer
665 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, %splat
666 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
668 ; AVX-LABEL: 'splatvar_shift_v8i16'
669 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i16> undef, i16 %b, i32 0
670 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer
671 ; AVX-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, %splat
672 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
674 ; XOP-LABEL: 'splatvar_shift_v8i16'
675 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i16> undef, i16 %b, i32 0
676 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer
677 ; XOP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, %splat
678 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
680 ; AVX512-LABEL: 'splatvar_shift_v8i16'
681 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <8 x i16> undef, i16 %b, i32 0
682 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer
683 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i16> %a, %splat
684 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
686 %insert = insertelement <8 x i16> undef, i16 %b, i32 0
687 %splat = shufflevector <8 x i16> %insert, <8 x i16> undef, <8 x i32> zeroinitializer
688 %shift = ashr <8 x i16> %a, %splat
692 define <16 x i16> @splatvar_shift_v16i16(<16 x i16> %a, i16 %b) {
693 ; SSE2-LABEL: 'splatvar_shift_v16i16'
694 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
695 ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
696 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i16> %a, %splat
697 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
699 ; SSE42-LABEL: 'splatvar_shift_v16i16'
700 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
701 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
702 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i16> %a, %splat
703 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
705 ; AVX1-LABEL: 'splatvar_shift_v16i16'
706 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
707 ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
708 ; AVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <16 x i16> %a, %splat
709 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
711 ; AVX2-LABEL: 'splatvar_shift_v16i16'
712 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
713 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
714 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, %splat
715 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
717 ; XOPAVX1-LABEL: 'splatvar_shift_v16i16'
718 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
719 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
720 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <16 x i16> %a, %splat
721 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
723 ; XOPAVX2-LABEL: 'splatvar_shift_v16i16'
724 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
725 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
726 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, %splat
727 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
729 ; AVX512-LABEL: 'splatvar_shift_v16i16'
730 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i16> undef, i16 %b, i32 0
731 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
732 ; AVX512-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <16 x i16> %a, %splat
733 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
735 %insert = insertelement <16 x i16> undef, i16 %b, i32 0
736 %splat = shufflevector <16 x i16> %insert, <16 x i16> undef, <16 x i32> zeroinitializer
737 %shift = ashr <16 x i16> %a, %splat
738 ret <16 x i16> %shift
741 define <32 x i16> @splatvar_shift_v32i16(<32 x i16> %a, i16 %b) {
742 ; SSE2-LABEL: 'splatvar_shift_v32i16'
743 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
744 ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
745 ; SSE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <32 x i16> %a, %splat
746 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
748 ; SSE42-LABEL: 'splatvar_shift_v32i16'
749 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
750 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
751 ; SSE42-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %shift = ashr <32 x i16> %a, %splat
752 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
754 ; AVX1-LABEL: 'splatvar_shift_v32i16'
755 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
756 ; AVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
757 ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <32 x i16> %a, %splat
758 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
760 ; AVX2-LABEL: 'splatvar_shift_v32i16'
761 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
762 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
763 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i16> %a, %splat
764 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
766 ; XOPAVX1-LABEL: 'splatvar_shift_v32i16'
767 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
768 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
769 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <32 x i16> %a, %splat
770 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
772 ; XOPAVX2-LABEL: 'splatvar_shift_v32i16'
773 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
774 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
775 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i16> %a, %splat
776 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
778 ; AVX512F-LABEL: 'splatvar_shift_v32i16'
779 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
780 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
781 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <32 x i16> %a, %splat
782 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
784 ; AVX512BW-LABEL: 'splatvar_shift_v32i16'
785 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i16> undef, i16 %b, i32 0
786 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
787 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <32 x i16> %a, %splat
788 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
790 %insert = insertelement <32 x i16> undef, i16 %b, i32 0
791 %splat = shufflevector <32 x i16> %insert, <32 x i16> undef, <32 x i32> zeroinitializer
792 %shift = ashr <32 x i16> %a, %splat
793 ret <32 x i16> %shift
796 define <16 x i8> @splatvar_shift_v16i8(<16 x i8> %a, i8 %b) {
797 ; SSE2-LABEL: 'splatvar_shift_v16i8'
798 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
799 ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
800 ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <16 x i8> %a, %splat
801 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
803 ; SSE42-LABEL: 'splatvar_shift_v16i8'
804 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
805 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
806 ; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <16 x i8> %a, %splat
807 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
809 ; AVX-LABEL: 'splatvar_shift_v16i8'
810 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
811 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
812 ; AVX-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <16 x i8> %a, %splat
813 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
815 ; XOPAVX1-LABEL: 'splatvar_shift_v16i8'
816 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
817 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
818 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, %splat
819 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
821 ; XOPAVX2-LABEL: 'splatvar_shift_v16i8'
822 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
823 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
824 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <16 x i8> %a, %splat
825 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
827 ; AVX512F-LABEL: 'splatvar_shift_v16i8'
828 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
829 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
830 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <16 x i8> %a, %splat
831 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
833 ; AVX512BW-LABEL: 'splatvar_shift_v16i8'
834 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <16 x i8> undef, i8 %b, i32 0
835 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
836 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <16 x i8> %a, %splat
837 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
839 %insert = insertelement <16 x i8> undef, i8 %b, i32 0
840 %splat = shufflevector <16 x i8> %insert, <16 x i8> undef, <16 x i32> zeroinitializer
841 %shift = ashr <16 x i8> %a, %splat
845 define <32 x i8> @splatvar_shift_v32i8(<32 x i8> %a, i8 %b) {
846 ; SSE2-LABEL: 'splatvar_shift_v32i8'
847 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
848 ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
849 ; SSE2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <32 x i8> %a, %splat
850 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
852 ; SSE42-LABEL: 'splatvar_shift_v32i8'
853 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
854 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
855 ; SSE42-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <32 x i8> %a, %splat
856 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
858 ; AVX1-LABEL: 'splatvar_shift_v32i8'
859 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
860 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
861 ; AVX1-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %shift = ashr <32 x i8> %a, %splat
862 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
864 ; AVX2-LABEL: 'splatvar_shift_v32i8'
865 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
866 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
867 ; AVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <32 x i8> %a, %splat
868 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
870 ; XOPAVX1-LABEL: 'splatvar_shift_v32i8'
871 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
872 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
873 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, %splat
874 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
876 ; XOPAVX2-LABEL: 'splatvar_shift_v32i8'
877 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
878 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
879 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <32 x i8> %a, %splat
880 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
882 ; AVX512F-LABEL: 'splatvar_shift_v32i8'
883 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
884 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
885 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <32 x i8> %a, %splat
886 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
888 ; AVX512BW-LABEL: 'splatvar_shift_v32i8'
889 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <32 x i8> undef, i8 %b, i32 0
890 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
891 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <32 x i8> %a, %splat
892 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
894 %insert = insertelement <32 x i8> undef, i8 %b, i32 0
895 %splat = shufflevector <32 x i8> %insert, <32 x i8> undef, <32 x i32> zeroinitializer
896 %shift = ashr <32 x i8> %a, %splat
900 define <64 x i8> @splatvar_shift_v64i8(<64 x i8> %a, i8 %b) {
901 ; SSE2-LABEL: 'splatvar_shift_v64i8'
902 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
903 ; SSE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
904 ; SSE2-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %shift = ashr <64 x i8> %a, %splat
905 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
907 ; SSE42-LABEL: 'splatvar_shift_v64i8'
908 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
909 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
910 ; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %shift = ashr <64 x i8> %a, %splat
911 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
913 ; AVX1-LABEL: 'splatvar_shift_v64i8'
914 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
915 ; AVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
916 ; AVX1-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %shift = ashr <64 x i8> %a, %splat
917 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
919 ; AVX2-LABEL: 'splatvar_shift_v64i8'
920 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
921 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
922 ; AVX2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %shift = ashr <64 x i8> %a, %splat
923 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
925 ; XOPAVX1-LABEL: 'splatvar_shift_v64i8'
926 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
927 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
928 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <64 x i8> %a, %splat
929 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
931 ; XOPAVX2-LABEL: 'splatvar_shift_v64i8'
932 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
933 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
934 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %shift = ashr <64 x i8> %a, %splat
935 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
937 ; AVX512F-LABEL: 'splatvar_shift_v64i8'
938 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
939 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
940 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 63 for instruction: %shift = ashr <64 x i8> %a, %splat
941 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
943 ; AVX512BW-LABEL: 'splatvar_shift_v64i8'
944 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %insert = insertelement <64 x i8> undef, i8 %b, i32 0
945 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
946 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <64 x i8> %a, %splat
947 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
949 %insert = insertelement <64 x i8> undef, i8 %b, i32 0
950 %splat = shufflevector <64 x i8> %insert, <64 x i8> undef, <64 x i32> zeroinitializer
951 %shift = ashr <64 x i8> %a, %splat
959 define <2 x i64> @constant_shift_v2i64(<2 x i64> %a) {
960 ; SSE2-LABEL: 'constant_shift_v2i64'
961 ; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <2 x i64> %a, <i64 1, i64 7>
962 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
964 ; SSE42-LABEL: 'constant_shift_v2i64'
965 ; SSE42-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <2 x i64> %a, <i64 1, i64 7>
966 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
968 ; AVX1-LABEL: 'constant_shift_v2i64'
969 ; AVX1-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <2 x i64> %a, <i64 1, i64 7>
970 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
972 ; AVX2-LABEL: 'constant_shift_v2i64'
973 ; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <2 x i64> %a, <i64 1, i64 7>
974 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
976 ; XOP-LABEL: 'constant_shift_v2i64'
977 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, <i64 1, i64 7>
978 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
980 ; AVX512-LABEL: 'constant_shift_v2i64'
981 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, <i64 1, i64 7>
982 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
984 %shift = ashr <2 x i64> %a, <i64 1, i64 7>
988 define <4 x i64> @constant_shift_v4i64(<4 x i64> %a) {
989 ; SSE2-LABEL: 'constant_shift_v4i64'
990 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
991 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
993 ; SSE42-LABEL: 'constant_shift_v4i64'
994 ; SSE42-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
995 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
997 ; AVX1-LABEL: 'constant_shift_v4i64'
998 ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
999 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1001 ; AVX2-LABEL: 'constant_shift_v4i64'
1002 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
1003 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1005 ; XOP-LABEL: 'constant_shift_v4i64'
1006 ; XOP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
1007 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1009 ; AVX512-LABEL: 'constant_shift_v4i64'
1010 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
1011 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1013 %shift = ashr <4 x i64> %a, <i64 1, i64 7, i64 15, i64 31>
1014 ret <4 x i64> %shift
1017 define <8 x i64> @constant_shift_v8i64(<8 x i64> %a) {
1018 ; SSE2-LABEL: 'constant_shift_v8i64'
1019 ; SSE2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1020 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1022 ; SSE42-LABEL: 'constant_shift_v8i64'
1023 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1024 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1026 ; AVX1-LABEL: 'constant_shift_v8i64'
1027 ; AVX1-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1028 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1030 ; AVX2-LABEL: 'constant_shift_v8i64'
1031 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1032 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1034 ; XOP-LABEL: 'constant_shift_v8i64'
1035 ; XOP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1036 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1038 ; AVX512-LABEL: 'constant_shift_v8i64'
1039 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1040 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1042 %shift = ashr <8 x i64> %a, <i64 1, i64 7, i64 15, i64 31, i64 1, i64 7, i64 15, i64 31>
1043 ret <8 x i64> %shift
1046 define <4 x i32> @constant_shift_v4i32(<4 x i32> %a) {
1047 ; SSE2-LABEL: 'constant_shift_v4i32'
1048 ; SSE2-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1049 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1051 ; SSE42-LABEL: 'constant_shift_v4i32'
1052 ; SSE42-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1053 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1055 ; AVX1-LABEL: 'constant_shift_v4i32'
1056 ; AVX1-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1057 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1059 ; AVX2-LABEL: 'constant_shift_v4i32'
1060 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1061 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1063 ; XOP-LABEL: 'constant_shift_v4i32'
1064 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1065 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1067 ; AVX512-LABEL: 'constant_shift_v4i32'
1068 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1069 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1071 %shift = ashr <4 x i32> %a, <i32 4, i32 5, i32 6, i32 7>
1072 ret <4 x i32> %shift
1075 define <8 x i32> @constant_shift_v8i32(<8 x i32> %a) {
1076 ; SSE2-LABEL: 'constant_shift_v8i32'
1077 ; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1078 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1080 ; SSE42-LABEL: 'constant_shift_v8i32'
1081 ; SSE42-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1082 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1084 ; AVX1-LABEL: 'constant_shift_v8i32'
1085 ; AVX1-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1086 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1088 ; AVX2-LABEL: 'constant_shift_v8i32'
1089 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1090 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1092 ; XOPAVX1-LABEL: 'constant_shift_v8i32'
1093 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1094 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1096 ; XOPAVX2-LABEL: 'constant_shift_v8i32'
1097 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1098 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1100 ; AVX512-LABEL: 'constant_shift_v8i32'
1101 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1102 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1104 %shift = ashr <8 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1105 ret <8 x i32> %shift
1108 define <16 x i32> @constant_shift_v16i32(<16 x i32> %a) {
1109 ; SSE2-LABEL: 'constant_shift_v16i32'
1110 ; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1111 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1113 ; SSE42-LABEL: 'constant_shift_v16i32'
1114 ; SSE42-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1115 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1117 ; AVX1-LABEL: 'constant_shift_v16i32'
1118 ; AVX1-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1119 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1121 ; AVX2-LABEL: 'constant_shift_v16i32'
1122 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1123 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1125 ; XOPAVX1-LABEL: 'constant_shift_v16i32'
1126 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1127 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1129 ; XOPAVX2-LABEL: 'constant_shift_v16i32'
1130 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1131 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1133 ; AVX512-LABEL: 'constant_shift_v16i32'
1134 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1135 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1137 %shift = ashr <16 x i32> %a, <i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3>
1138 ret <16 x i32> %shift
1141 define <8 x i16> @constant_shift_v8i16(<8 x i16> %a) {
1142 ; SSE2-LABEL: 'constant_shift_v8i16'
1143 ; SSE2-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1144 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1146 ; SSE42-LABEL: 'constant_shift_v8i16'
1147 ; SSE42-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1148 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1150 ; AVX1-LABEL: 'constant_shift_v8i16'
1151 ; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1152 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1154 ; AVX2-LABEL: 'constant_shift_v8i16'
1155 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1156 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1158 ; XOP-LABEL: 'constant_shift_v8i16'
1159 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1160 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1162 ; AVX512F-LABEL: 'constant_shift_v8i16'
1163 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1164 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1166 ; AVX512BW-LABEL: 'constant_shift_v8i16'
1167 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1168 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1170 %shift = ashr <8 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1171 ret <8 x i16> %shift
1174 define <16 x i16> @constant_shift_v16i16(<16 x i16> %a) {
1175 ; SSE2-LABEL: 'constant_shift_v16i16'
1176 ; SSE2-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1177 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1179 ; SSE42-LABEL: 'constant_shift_v16i16'
1180 ; SSE42-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1181 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1183 ; AVX1-LABEL: 'constant_shift_v16i16'
1184 ; AVX1-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1185 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1187 ; AVX2-LABEL: 'constant_shift_v16i16'
1188 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1189 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1191 ; XOP-LABEL: 'constant_shift_v16i16'
1192 ; XOP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1193 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1195 ; AVX512F-LABEL: 'constant_shift_v16i16'
1196 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1197 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1199 ; AVX512BW-LABEL: 'constant_shift_v16i16'
1200 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1201 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1203 %shift = ashr <16 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1204 ret <16 x i16> %shift
1207 define <32 x i16> @constant_shift_v32i16(<32 x i16> %a) {
1208 ; SSE2-LABEL: 'constant_shift_v32i16'
1209 ; SSE2-NEXT: Cost Model: Found an estimated cost of 124 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1210 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1212 ; SSE42-LABEL: 'constant_shift_v32i16'
1213 ; SSE42-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1214 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1216 ; AVX1-LABEL: 'constant_shift_v32i16'
1217 ; AVX1-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1218 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1220 ; AVX2-LABEL: 'constant_shift_v32i16'
1221 ; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1222 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1224 ; XOP-LABEL: 'constant_shift_v32i16'
1225 ; XOP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1226 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1228 ; AVX512F-LABEL: 'constant_shift_v32i16'
1229 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1230 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1232 ; AVX512BW-LABEL: 'constant_shift_v32i16'
1233 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1234 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1236 %shift = ashr <32 x i16> %a, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1237 ret <32 x i16> %shift
1240 define <16 x i8> @constant_shift_v16i8(<16 x i8> %a) {
1241 ; SSE2-LABEL: 'constant_shift_v16i8'
1242 ; SSE2-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1243 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1245 ; SSE42-LABEL: 'constant_shift_v16i8'
1246 ; SSE42-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1247 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1249 ; AVX1-LABEL: 'constant_shift_v16i8'
1250 ; AVX1-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1251 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1253 ; AVX2-LABEL: 'constant_shift_v16i8'
1254 ; AVX2-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1255 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1257 ; XOP-LABEL: 'constant_shift_v16i8'
1258 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1259 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1261 ; AVX512F-LABEL: 'constant_shift_v16i8'
1262 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1263 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1265 ; AVX512BW-LABEL: 'constant_shift_v16i8'
1266 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1267 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1269 %shift = ashr <16 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1270 ret <16 x i8> %shift
1273 define <32 x i8> @constant_shift_v32i8(<32 x i8> %a) {
1274 ; SSE2-LABEL: 'constant_shift_v32i8'
1275 ; SSE2-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1276 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1278 ; SSE42-LABEL: 'constant_shift_v32i8'
1279 ; SSE42-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1280 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1282 ; AVX1-LABEL: 'constant_shift_v32i8'
1283 ; AVX1-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1284 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1286 ; AVX2-LABEL: 'constant_shift_v32i8'
1287 ; AVX2-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1288 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1290 ; XOP-LABEL: 'constant_shift_v32i8'
1291 ; XOP-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1292 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1294 ; AVX512F-LABEL: 'constant_shift_v32i8'
1295 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1296 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1298 ; AVX512BW-LABEL: 'constant_shift_v32i8'
1299 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1300 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1302 %shift = ashr <32 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1303 ret <32 x i8> %shift
1306 define <64 x i8> @constant_shift_v64i8(<64 x i8> %a) {
1307 ; SSE2-LABEL: 'constant_shift_v64i8'
1308 ; SSE2-NEXT: Cost Model: Found an estimated cost of 216 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1309 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1311 ; SSE42-LABEL: 'constant_shift_v64i8'
1312 ; SSE42-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1313 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1315 ; AVX1-LABEL: 'constant_shift_v64i8'
1316 ; AVX1-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1317 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1319 ; AVX2-LABEL: 'constant_shift_v64i8'
1320 ; AVX2-NEXT: Cost Model: Found an estimated cost of 86 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1321 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1323 ; XOP-LABEL: 'constant_shift_v64i8'
1324 ; XOP-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1325 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1327 ; AVX512F-LABEL: 'constant_shift_v64i8'
1328 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 63 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1329 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1331 ; AVX512BW-LABEL: 'constant_shift_v64i8'
1332 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1333 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1335 %shift = ashr <64 x i8> %a, <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0, i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 7, i8 6, i8 5, i8 4, i8 3, i8 2, i8 1, i8 0>
1336 ret <64 x i8> %shift
1340 ; Uniform Constant Shifts
1343 define <2 x i64> @splatconstant_shift_v2i64(<2 x i64> %a) {
1344 ; SSE2-LABEL: 'splatconstant_shift_v2i64'
1345 ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <2 x i64> %a, <i64 7, i64 7>
1346 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
1348 ; SSE42-LABEL: 'splatconstant_shift_v2i64'
1349 ; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <2 x i64> %a, <i64 7, i64 7>
1350 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
1352 ; AVX-LABEL: 'splatconstant_shift_v2i64'
1353 ; AVX-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <2 x i64> %a, <i64 7, i64 7>
1354 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
1356 ; XOP-LABEL: 'splatconstant_shift_v2i64'
1357 ; XOP-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %shift = ashr <2 x i64> %a, <i64 7, i64 7>
1358 ; XOP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
1360 ; AVX512-LABEL: 'splatconstant_shift_v2i64'
1361 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <2 x i64> %a, <i64 7, i64 7>
1362 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %shift
1364 %shift = ashr <2 x i64> %a, <i64 7, i64 7>
1365 ret <2 x i64> %shift
1368 define <4 x i64> @splatconstant_shift_v4i64(<4 x i64> %a) {
1369 ; SSE2-LABEL: 'splatconstant_shift_v4i64'
1370 ; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1371 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1373 ; SSE42-LABEL: 'splatconstant_shift_v4i64'
1374 ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1375 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1377 ; AVX1-LABEL: 'splatconstant_shift_v4i64'
1378 ; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1379 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1381 ; AVX2-LABEL: 'splatconstant_shift_v4i64'
1382 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1383 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1385 ; XOPAVX1-LABEL: 'splatconstant_shift_v4i64'
1386 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1387 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1389 ; XOPAVX2-LABEL: 'splatconstant_shift_v4i64'
1390 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1391 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1393 ; AVX512-LABEL: 'splatconstant_shift_v4i64'
1394 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1395 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %shift
1397 %shift = ashr <4 x i64> %a, <i64 7, i64 7, i64 7, i64 7>
1398 ret <4 x i64> %shift
1401 define <8 x i64> @splatconstant_shift_v8i64(<8 x i64> %a) {
1402 ; SSE2-LABEL: 'splatconstant_shift_v8i64'
1403 ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1404 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1406 ; SSE42-LABEL: 'splatconstant_shift_v8i64'
1407 ; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1408 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1410 ; AVX1-LABEL: 'splatconstant_shift_v8i64'
1411 ; AVX1-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1412 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1414 ; AVX2-LABEL: 'splatconstant_shift_v8i64'
1415 ; AVX2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1416 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1418 ; XOPAVX1-LABEL: 'splatconstant_shift_v8i64'
1419 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1420 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1422 ; XOPAVX2-LABEL: 'splatconstant_shift_v8i64'
1423 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1424 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1426 ; AVX512-LABEL: 'splatconstant_shift_v8i64'
1427 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1428 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %shift
1430 %shift = ashr <8 x i64> %a, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
1431 ret <8 x i64> %shift
1434 define <4 x i32> @splatconstant_shift_v4i32(<4 x i32> %a) {
1435 ; CHECK-LABEL: 'splatconstant_shift_v4i32'
1436 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <4 x i32> %a, <i32 5, i32 5, i32 5, i32 5>
1437 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %shift
1439 %shift = ashr <4 x i32> %a, <i32 5, i32 5, i32 5, i32 5>
1440 ret <4 x i32> %shift
1443 define <8 x i32> @splatconstant_shift_v8i32(<8 x i32> %a) {
1444 ; SSE2-LABEL: 'splatconstant_shift_v8i32'
1445 ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1446 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1448 ; SSE42-LABEL: 'splatconstant_shift_v8i32'
1449 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1450 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1452 ; AVX1-LABEL: 'splatconstant_shift_v8i32'
1453 ; AVX1-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1454 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1456 ; AVX2-LABEL: 'splatconstant_shift_v8i32'
1457 ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1458 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1460 ; XOPAVX1-LABEL: 'splatconstant_shift_v8i32'
1461 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1462 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1464 ; XOPAVX2-LABEL: 'splatconstant_shift_v8i32'
1465 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1466 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1468 ; AVX512-LABEL: 'splatconstant_shift_v8i32'
1469 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1470 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %shift
1472 %shift = ashr <8 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1473 ret <8 x i32> %shift
1476 define <16 x i32> @splatconstant_shift_v16i32(<16 x i32> %a) {
1477 ; SSE2-LABEL: 'splatconstant_shift_v16i32'
1478 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1479 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1481 ; SSE42-LABEL: 'splatconstant_shift_v16i32'
1482 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1483 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1485 ; AVX1-LABEL: 'splatconstant_shift_v16i32'
1486 ; AVX1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1487 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1489 ; AVX2-LABEL: 'splatconstant_shift_v16i32'
1490 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1491 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1493 ; XOPAVX1-LABEL: 'splatconstant_shift_v16i32'
1494 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1495 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1497 ; XOPAVX2-LABEL: 'splatconstant_shift_v16i32'
1498 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1499 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1501 ; AVX512-LABEL: 'splatconstant_shift_v16i32'
1502 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1503 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %shift
1505 %shift = ashr <16 x i32> %a, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
1506 ret <16 x i32> %shift
1509 define <8 x i16> @splatconstant_shift_v8i16(<8 x i16> %a) {
1510 ; CHECK-LABEL: 'splatconstant_shift_v8i16'
1511 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <8 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1512 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %shift
1514 %shift = ashr <8 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1515 ret <8 x i16> %shift
1518 define <16 x i16> @splatconstant_shift_v16i16(<16 x i16> %a) {
1519 ; SSE2-LABEL: 'splatconstant_shift_v16i16'
1520 ; SSE2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1521 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1523 ; SSE42-LABEL: 'splatconstant_shift_v16i16'
1524 ; SSE42-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1525 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1527 ; AVX1-LABEL: 'splatconstant_shift_v16i16'
1528 ; AVX1-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1529 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1531 ; AVX2-LABEL: 'splatconstant_shift_v16i16'
1532 ; AVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1533 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1535 ; XOPAVX1-LABEL: 'splatconstant_shift_v16i16'
1536 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1537 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1539 ; XOPAVX2-LABEL: 'splatconstant_shift_v16i16'
1540 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1541 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1543 ; AVX512F-LABEL: 'splatconstant_shift_v16i16'
1544 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1545 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1547 ; AVX512BW-LABEL: 'splatconstant_shift_v16i16'
1548 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1549 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %shift
1551 %shift = ashr <16 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1552 ret <16 x i16> %shift
1555 define <32 x i16> @splatconstant_shift_v32i16(<32 x i16> %a) {
1556 ; SSE2-LABEL: 'splatconstant_shift_v32i16'
1557 ; SSE2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1558 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1560 ; SSE42-LABEL: 'splatconstant_shift_v32i16'
1561 ; SSE42-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1562 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1564 ; AVX1-LABEL: 'splatconstant_shift_v32i16'
1565 ; AVX1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1566 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1568 ; AVX2-LABEL: 'splatconstant_shift_v32i16'
1569 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1570 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1572 ; XOPAVX1-LABEL: 'splatconstant_shift_v32i16'
1573 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1574 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1576 ; XOPAVX2-LABEL: 'splatconstant_shift_v32i16'
1577 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1578 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1580 ; AVX512F-LABEL: 'splatconstant_shift_v32i16'
1581 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1582 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1584 ; AVX512BW-LABEL: 'splatconstant_shift_v32i16'
1585 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1586 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %shift
1588 %shift = ashr <32 x i16> %a, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1589 ret <32 x i16> %shift
1592 define <16 x i8> @splatconstant_shift_v16i8(<16 x i8> %a) {
1593 ; SSE2-LABEL: 'splatconstant_shift_v16i8'
1594 ; SSE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1595 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1597 ; SSE42-LABEL: 'splatconstant_shift_v16i8'
1598 ; SSE42-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1599 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1601 ; AVX-LABEL: 'splatconstant_shift_v16i8'
1602 ; AVX-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1603 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1605 ; XOPAVX1-LABEL: 'splatconstant_shift_v16i8'
1606 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1607 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1609 ; XOPAVX2-LABEL: 'splatconstant_shift_v16i8'
1610 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1611 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1613 ; AVX512F-LABEL: 'splatconstant_shift_v16i8'
1614 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1615 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1617 ; AVX512BW-LABEL: 'splatconstant_shift_v16i8'
1618 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1619 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %shift
1621 %shift = ashr <16 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1622 ret <16 x i8> %shift
1625 define <32 x i8> @splatconstant_shift_v32i8(<32 x i8> %a) {
1626 ; SSE2-LABEL: 'splatconstant_shift_v32i8'
1627 ; SSE2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1628 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1630 ; SSE42-LABEL: 'splatconstant_shift_v32i8'
1631 ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1632 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1634 ; AVX1-LABEL: 'splatconstant_shift_v32i8'
1635 ; AVX1-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1636 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1638 ; AVX2-LABEL: 'splatconstant_shift_v32i8'
1639 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1640 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1642 ; XOPAVX1-LABEL: 'splatconstant_shift_v32i8'
1643 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1644 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1646 ; XOPAVX2-LABEL: 'splatconstant_shift_v32i8'
1647 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1648 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1650 ; AVX512F-LABEL: 'splatconstant_shift_v32i8'
1651 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1652 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1654 ; AVX512BW-LABEL: 'splatconstant_shift_v32i8'
1655 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1656 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %shift
1658 %shift = ashr <32 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1659 ret <32 x i8> %shift
1662 define <64 x i8> @splatconstant_shift_v64i8(<64 x i8> %a) {
1663 ; SSE2-LABEL: 'splatconstant_shift_v64i8'
1664 ; SSE2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1665 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1667 ; SSE42-LABEL: 'splatconstant_shift_v64i8'
1668 ; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1669 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1671 ; AVX1-LABEL: 'splatconstant_shift_v64i8'
1672 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1673 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1675 ; AVX2-LABEL: 'splatconstant_shift_v64i8'
1676 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1677 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1679 ; XOPAVX1-LABEL: 'splatconstant_shift_v64i8'
1680 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1681 ; XOPAVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1683 ; XOPAVX2-LABEL: 'splatconstant_shift_v64i8'
1684 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1685 ; XOPAVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1687 ; AVX512F-LABEL: 'splatconstant_shift_v64i8'
1688 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1689 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1691 ; AVX512BW-LABEL: 'splatconstant_shift_v64i8'
1692 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1693 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %shift
1695 %shift = ashr <64 x i8> %a, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
1696 ret <64 x i8> %shift