1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+sse2 | FileCheck %s -check-prefixes=CHECK,SSE,SSE2
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+sse4.2 | FileCheck %s -check-prefixes=CHECK,SSE,SSE42
4 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+avx | FileCheck %s -check-prefixes=CHECK,AVX,AVX1
5 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+avx2 | FileCheck %s -check-prefixes=CHECK,AVX,AVX2
6 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+avx512f | FileCheck %s -check-prefixes=CHECK,AVX512,AVX512F
7 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -cost-model -analyze -mattr=+avx512vl,+avx512bw,+avx512dq | FileCheck %s -check-prefixes=CHECK,AVX512,AVX512BW
9 ; Verify the cost of scalar trailing zero count instructions.
11 declare i64 @llvm.cttz.i64(i64, i1)
12 declare i32 @llvm.cttz.i32(i32, i1)
13 declare i16 @llvm.cttz.i16(i16, i1)
14 declare i8 @llvm.cttz.i8(i8, i1)
16 define i64 @var_cttz_i64(i64 %a) {
17 ; CHECK-LABEL: 'var_cttz_i64'
18 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 false)
19 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %cttz
21 %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 0)
25 define i64 @var_cttz_i64u(i64 %a) {
26 ; CHECK-LABEL: 'var_cttz_i64u'
27 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 true)
28 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %cttz
30 %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 1)
34 define i32 @var_cttz_i32(i32 %a) {
35 ; CHECK-LABEL: 'var_cttz_i32'
36 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 false)
37 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %cttz
39 %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 0)
43 define i32 @var_cttz_i32u(i32 %a) {
44 ; CHECK-LABEL: 'var_cttz_i32u'
45 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 true)
46 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %cttz
48 %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 1)
52 define i16 @var_cttz_i16(i16 %a) {
53 ; CHECK-LABEL: 'var_cttz_i16'
54 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 false)
55 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %cttz
57 %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 0)
61 define i16 @var_cttz_i16u(i16 %a) {
62 ; CHECK-LABEL: 'var_cttz_i16u'
63 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 true)
64 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %cttz
66 %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 1)
70 define i8 @var_cttz_i8(i8 %a) {
71 ; CHECK-LABEL: 'var_cttz_i8'
72 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 false)
73 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %cttz
75 %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 0)
79 define i8 @var_cttz_i8u(i8 %a) {
80 ; CHECK-LABEL: 'var_cttz_i8u'
81 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 true)
82 ; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %cttz
84 %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 1)
88 ; Verify the cost of vector trailing zero count instructions.
90 declare <2 x i64> @llvm.cttz.v2i64(<2 x i64>, i1)
91 declare <4 x i32> @llvm.cttz.v4i32(<4 x i32>, i1)
92 declare <8 x i16> @llvm.cttz.v8i16(<8 x i16>, i1)
93 declare <16 x i8> @llvm.cttz.v16i8(<16 x i8>, i1)
95 declare <4 x i64> @llvm.cttz.v4i64(<4 x i64>, i1)
96 declare <8 x i32> @llvm.cttz.v8i32(<8 x i32>, i1)
97 declare <16 x i16> @llvm.cttz.v16i16(<16 x i16>, i1)
98 declare <32 x i8> @llvm.cttz.v32i8(<32 x i8>, i1)
100 declare <8 x i64> @llvm.cttz.v8i64(<8 x i64>, i1)
101 declare <16 x i32> @llvm.cttz.v16i32(<16 x i32>, i1)
102 declare <32 x i16> @llvm.cttz.v32i16(<32 x i16>, i1)
103 declare <64 x i8> @llvm.cttz.v64i8(<64 x i8>, i1)
105 define <2 x i64> @var_cttz_v2i64(<2 x i64> %a) {
106 ; SSE2-LABEL: 'var_cttz_v2i64'
107 ; SSE2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
108 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
110 ; SSE42-LABEL: 'var_cttz_v2i64'
111 ; SSE42-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
112 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
114 ; AVX-LABEL: 'var_cttz_v2i64'
115 ; AVX-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
116 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
118 ; AVX512-LABEL: 'var_cttz_v2i64'
119 ; AVX512-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
120 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
122 %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 0)
126 define <2 x i64> @var_cttz_v2i64u(<2 x i64> %a) {
127 ; SSE2-LABEL: 'var_cttz_v2i64u'
128 ; SSE2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
129 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
131 ; SSE42-LABEL: 'var_cttz_v2i64u'
132 ; SSE42-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
133 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
135 ; AVX-LABEL: 'var_cttz_v2i64u'
136 ; AVX-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
137 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
139 ; AVX512-LABEL: 'var_cttz_v2i64u'
140 ; AVX512-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
141 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
143 %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 1)
147 define <4 x i64> @var_cttz_v4i64(<4 x i64> %a) {
148 ; SSE2-LABEL: 'var_cttz_v4i64'
149 ; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
150 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
152 ; SSE42-LABEL: 'var_cttz_v4i64'
153 ; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
154 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
156 ; AVX1-LABEL: 'var_cttz_v4i64'
157 ; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
158 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
160 ; AVX2-LABEL: 'var_cttz_v4i64'
161 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
162 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
164 ; AVX512-LABEL: 'var_cttz_v4i64'
165 ; AVX512-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
166 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
168 %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 0)
172 define <4 x i64> @var_cttz_v4i64u(<4 x i64> %a) {
173 ; SSE2-LABEL: 'var_cttz_v4i64u'
174 ; SSE2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
175 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
177 ; SSE42-LABEL: 'var_cttz_v4i64u'
178 ; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
179 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
181 ; AVX1-LABEL: 'var_cttz_v4i64u'
182 ; AVX1-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
183 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
185 ; AVX2-LABEL: 'var_cttz_v4i64u'
186 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
187 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
189 ; AVX512-LABEL: 'var_cttz_v4i64u'
190 ; AVX512-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
191 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
193 %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 1)
197 define <8 x i64> @var_cttz_v8i64(<8 x i64> %a) {
198 ; SSE2-LABEL: 'var_cttz_v8i64'
199 ; SSE2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
200 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
202 ; SSE42-LABEL: 'var_cttz_v8i64'
203 ; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
204 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
206 ; AVX1-LABEL: 'var_cttz_v8i64'
207 ; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
208 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
210 ; AVX2-LABEL: 'var_cttz_v8i64'
211 ; AVX2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
212 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
214 ; AVX512F-LABEL: 'var_cttz_v8i64'
215 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
216 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
218 ; AVX512BW-LABEL: 'var_cttz_v8i64'
219 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
220 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
222 %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 0)
226 define <8 x i64> @var_cttz_v8i64u(<8 x i64> %a) {
227 ; SSE2-LABEL: 'var_cttz_v8i64u'
228 ; SSE2-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
229 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
231 ; SSE42-LABEL: 'var_cttz_v8i64u'
232 ; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
233 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
235 ; AVX1-LABEL: 'var_cttz_v8i64u'
236 ; AVX1-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
237 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
239 ; AVX2-LABEL: 'var_cttz_v8i64u'
240 ; AVX2-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
241 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
243 ; AVX512F-LABEL: 'var_cttz_v8i64u'
244 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
245 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
247 ; AVX512BW-LABEL: 'var_cttz_v8i64u'
248 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
249 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
251 %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 1)
255 define <4 x i32> @var_cttz_v4i32(<4 x i32> %a) {
256 ; SSE2-LABEL: 'var_cttz_v4i32'
257 ; SSE2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
258 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
260 ; SSE42-LABEL: 'var_cttz_v4i32'
261 ; SSE42-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
262 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
264 ; AVX-LABEL: 'var_cttz_v4i32'
265 ; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
266 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
268 ; AVX512-LABEL: 'var_cttz_v4i32'
269 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
270 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
272 %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 0)
276 define <4 x i32> @var_cttz_v4i32u(<4 x i32> %a) {
277 ; SSE2-LABEL: 'var_cttz_v4i32u'
278 ; SSE2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
279 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
281 ; SSE42-LABEL: 'var_cttz_v4i32u'
282 ; SSE42-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
283 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
285 ; AVX-LABEL: 'var_cttz_v4i32u'
286 ; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
287 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
289 ; AVX512-LABEL: 'var_cttz_v4i32u'
290 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
291 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
293 %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 1)
297 define <8 x i32> @var_cttz_v8i32(<8 x i32> %a) {
298 ; SSE2-LABEL: 'var_cttz_v8i32'
299 ; SSE2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
300 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
302 ; SSE42-LABEL: 'var_cttz_v8i32'
303 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
304 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
306 ; AVX1-LABEL: 'var_cttz_v8i32'
307 ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
308 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
310 ; AVX2-LABEL: 'var_cttz_v8i32'
311 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
312 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
314 ; AVX512-LABEL: 'var_cttz_v8i32'
315 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
316 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
318 %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 0)
322 define <8 x i32> @var_cttz_v8i32u(<8 x i32> %a) {
323 ; SSE2-LABEL: 'var_cttz_v8i32u'
324 ; SSE2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
325 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
327 ; SSE42-LABEL: 'var_cttz_v8i32u'
328 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
329 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
331 ; AVX1-LABEL: 'var_cttz_v8i32u'
332 ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
333 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
335 ; AVX2-LABEL: 'var_cttz_v8i32u'
336 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
337 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
339 ; AVX512-LABEL: 'var_cttz_v8i32u'
340 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
341 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
343 %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 1)
347 define <16 x i32> @var_cttz_v16i32(<16 x i32> %a) {
348 ; SSE2-LABEL: 'var_cttz_v16i32'
349 ; SSE2-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
350 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
352 ; SSE42-LABEL: 'var_cttz_v16i32'
353 ; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
354 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
356 ; AVX1-LABEL: 'var_cttz_v16i32'
357 ; AVX1-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
358 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
360 ; AVX2-LABEL: 'var_cttz_v16i32'
361 ; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
362 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
364 ; AVX512F-LABEL: 'var_cttz_v16i32'
365 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
366 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
368 ; AVX512BW-LABEL: 'var_cttz_v16i32'
369 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
370 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
372 %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 0)
376 define <16 x i32> @var_cttz_v16i32u(<16 x i32> %a) {
377 ; SSE2-LABEL: 'var_cttz_v16i32u'
378 ; SSE2-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
379 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
381 ; SSE42-LABEL: 'var_cttz_v16i32u'
382 ; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
383 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
385 ; AVX1-LABEL: 'var_cttz_v16i32u'
386 ; AVX1-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
387 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
389 ; AVX2-LABEL: 'var_cttz_v16i32u'
390 ; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
391 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
393 ; AVX512F-LABEL: 'var_cttz_v16i32u'
394 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
395 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
397 ; AVX512BW-LABEL: 'var_cttz_v16i32u'
398 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
399 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
401 %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 1)
405 define <8 x i16> @var_cttz_v8i16(<8 x i16> %a) {
406 ; SSE2-LABEL: 'var_cttz_v8i16'
407 ; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
408 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
410 ; SSE42-LABEL: 'var_cttz_v8i16'
411 ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
412 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
414 ; AVX-LABEL: 'var_cttz_v8i16'
415 ; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
416 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
418 ; AVX512-LABEL: 'var_cttz_v8i16'
419 ; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
420 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
422 %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 0)
426 define <8 x i16> @var_cttz_v8i16u(<8 x i16> %a) {
427 ; SSE2-LABEL: 'var_cttz_v8i16u'
428 ; SSE2-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
429 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
431 ; SSE42-LABEL: 'var_cttz_v8i16u'
432 ; SSE42-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
433 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
435 ; AVX-LABEL: 'var_cttz_v8i16u'
436 ; AVX-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
437 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
439 ; AVX512-LABEL: 'var_cttz_v8i16u'
440 ; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
441 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
443 %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 1)
447 define <16 x i16> @var_cttz_v16i16(<16 x i16> %a) {
448 ; SSE2-LABEL: 'var_cttz_v16i16'
449 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
450 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
452 ; SSE42-LABEL: 'var_cttz_v16i16'
453 ; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
454 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
456 ; AVX1-LABEL: 'var_cttz_v16i16'
457 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
458 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
460 ; AVX2-LABEL: 'var_cttz_v16i16'
461 ; AVX2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
462 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
464 ; AVX512-LABEL: 'var_cttz_v16i16'
465 ; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
466 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
468 %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 0)
472 define <16 x i16> @var_cttz_v16i16u(<16 x i16> %a) {
473 ; SSE2-LABEL: 'var_cttz_v16i16u'
474 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
475 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
477 ; SSE42-LABEL: 'var_cttz_v16i16u'
478 ; SSE42-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
479 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
481 ; AVX1-LABEL: 'var_cttz_v16i16u'
482 ; AVX1-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
483 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
485 ; AVX2-LABEL: 'var_cttz_v16i16u'
486 ; AVX2-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
487 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
489 ; AVX512-LABEL: 'var_cttz_v16i16u'
490 ; AVX512-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
491 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
493 %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 1)
497 define <32 x i16> @var_cttz_v32i16(<32 x i16> %a) {
498 ; SSE2-LABEL: 'var_cttz_v32i16'
499 ; SSE2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
500 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
502 ; SSE42-LABEL: 'var_cttz_v32i16'
503 ; SSE42-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
504 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
506 ; AVX1-LABEL: 'var_cttz_v32i16'
507 ; AVX1-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
508 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
510 ; AVX2-LABEL: 'var_cttz_v32i16'
511 ; AVX2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
512 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
514 ; AVX512F-LABEL: 'var_cttz_v32i16'
515 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
516 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
518 ; AVX512BW-LABEL: 'var_cttz_v32i16'
519 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
520 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
522 %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 0)
526 define <32 x i16> @var_cttz_v32i16u(<32 x i16> %a) {
527 ; SSE2-LABEL: 'var_cttz_v32i16u'
528 ; SSE2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
529 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
531 ; SSE42-LABEL: 'var_cttz_v32i16u'
532 ; SSE42-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
533 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
535 ; AVX1-LABEL: 'var_cttz_v32i16u'
536 ; AVX1-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
537 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
539 ; AVX2-LABEL: 'var_cttz_v32i16u'
540 ; AVX2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
541 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
543 ; AVX512F-LABEL: 'var_cttz_v32i16u'
544 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
545 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
547 ; AVX512BW-LABEL: 'var_cttz_v32i16u'
548 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
549 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
551 %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 1)
555 define <16 x i8> @var_cttz_v16i8(<16 x i8> %a) {
556 ; SSE2-LABEL: 'var_cttz_v16i8'
557 ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
558 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
560 ; SSE42-LABEL: 'var_cttz_v16i8'
561 ; SSE42-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
562 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
564 ; AVX-LABEL: 'var_cttz_v16i8'
565 ; AVX-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
566 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
568 ; AVX512-LABEL: 'var_cttz_v16i8'
569 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
570 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
572 %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 0)
576 define <16 x i8> @var_cttz_v16i8u(<16 x i8> %a) {
577 ; SSE2-LABEL: 'var_cttz_v16i8u'
578 ; SSE2-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
579 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
581 ; SSE42-LABEL: 'var_cttz_v16i8u'
582 ; SSE42-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
583 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
585 ; AVX-LABEL: 'var_cttz_v16i8u'
586 ; AVX-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
587 ; AVX-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
589 ; AVX512-LABEL: 'var_cttz_v16i8u'
590 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
591 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
593 %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 1)
597 define <32 x i8> @var_cttz_v32i8(<32 x i8> %a) {
598 ; SSE2-LABEL: 'var_cttz_v32i8'
599 ; SSE2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
600 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
602 ; SSE42-LABEL: 'var_cttz_v32i8'
603 ; SSE42-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
604 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
606 ; AVX1-LABEL: 'var_cttz_v32i8'
607 ; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
608 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
610 ; AVX2-LABEL: 'var_cttz_v32i8'
611 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
612 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
614 ; AVX512-LABEL: 'var_cttz_v32i8'
615 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
616 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
618 %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 0)
622 define <32 x i8> @var_cttz_v32i8u(<32 x i8> %a) {
623 ; SSE2-LABEL: 'var_cttz_v32i8u'
624 ; SSE2-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
625 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
627 ; SSE42-LABEL: 'var_cttz_v32i8u'
628 ; SSE42-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
629 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
631 ; AVX1-LABEL: 'var_cttz_v32i8u'
632 ; AVX1-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
633 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
635 ; AVX2-LABEL: 'var_cttz_v32i8u'
636 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
637 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
639 ; AVX512-LABEL: 'var_cttz_v32i8u'
640 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
641 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
643 %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 1)
647 define <64 x i8> @var_cttz_v64i8(<64 x i8> %a) {
648 ; SSE2-LABEL: 'var_cttz_v64i8'
649 ; SSE2-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
650 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
652 ; SSE42-LABEL: 'var_cttz_v64i8'
653 ; SSE42-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
654 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
656 ; AVX1-LABEL: 'var_cttz_v64i8'
657 ; AVX1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
658 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
660 ; AVX2-LABEL: 'var_cttz_v64i8'
661 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
662 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
664 ; AVX512F-LABEL: 'var_cttz_v64i8'
665 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
666 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
668 ; AVX512BW-LABEL: 'var_cttz_v64i8'
669 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
670 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
672 %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 0)
676 define <64 x i8> @var_cttz_v64i8u(<64 x i8> %a) {
677 ; SSE2-LABEL: 'var_cttz_v64i8u'
678 ; SSE2-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
679 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
681 ; SSE42-LABEL: 'var_cttz_v64i8u'
682 ; SSE42-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
683 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
685 ; AVX1-LABEL: 'var_cttz_v64i8u'
686 ; AVX1-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
687 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
689 ; AVX2-LABEL: 'var_cttz_v64i8u'
690 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
691 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
693 ; AVX512F-LABEL: 'var_cttz_v64i8u'
694 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
695 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
697 ; AVX512BW-LABEL: 'var_cttz_v64i8u'
698 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
699 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
701 %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 1)