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 -mattr=-bmi,+sse2 | FileCheck %s -check-prefixes=NOBMI
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+sse2 | FileCheck %s -check-prefixes=BMI,SSE,SSE2
4 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+sse4.2 | FileCheck %s -check-prefixes=BMI,SSE,SSE42
5 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+avx | FileCheck %s -check-prefixes=BMI,AVX1
6 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+avx2 | FileCheck %s -check-prefixes=BMI,AVX2
7 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+avx512f | FileCheck %s -check-prefixes=BMI,AVX512,AVX512F
8 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+avx512vl,+avx512bw,+avx512dq | FileCheck %s -check-prefixes=BMI,AVX512,AVX512BW
9 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+avx512vl,+avx512vpopcntdq | FileCheck %s -check-prefixes=BMI,AVX512,AVX512VPOPCNT
10 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -mattr=+bmi,+avx512vl,+avx512bitalg | FileCheck %s -check-prefixes=BMI,AVX512,AVX512BITALG
12 ; Verify the cost of scalar trailing zero count instructions.
14 declare i64 @llvm.cttz.i64(i64, i1)
15 declare i32 @llvm.cttz.i32(i32, i1)
16 declare i16 @llvm.cttz.i16(i16, i1)
17 declare i8 @llvm.cttz.i8(i8, i1)
19 define i64 @var_cttz_i64(i64 %a) {
20 ; NOBMI-LABEL: 'var_cttz_i64'
21 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 false)
22 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %cttz
24 ; BMI-LABEL: 'var_cttz_i64'
25 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 false)
26 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %cttz
28 %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 0)
32 define i64 @var_cttz_i64u(i64 %a) {
33 ; NOBMI-LABEL: 'var_cttz_i64u'
34 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 true)
35 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %cttz
37 ; BMI-LABEL: 'var_cttz_i64u'
38 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 true)
39 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i64 %cttz
41 %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 1)
45 define i32 @var_cttz_i32(i32 %a) {
46 ; NOBMI-LABEL: 'var_cttz_i32'
47 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 false)
48 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %cttz
50 ; BMI-LABEL: 'var_cttz_i32'
51 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 false)
52 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %cttz
54 %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 0)
58 define i32 @var_cttz_i32u(i32 %a) {
59 ; NOBMI-LABEL: 'var_cttz_i32u'
60 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 true)
61 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %cttz
63 ; BMI-LABEL: 'var_cttz_i32u'
64 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 true)
65 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 %cttz
67 %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 1)
71 define i16 @var_cttz_i16(i16 %a) {
72 ; NOBMI-LABEL: 'var_cttz_i16'
73 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 false)
74 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %cttz
76 ; BMI-LABEL: 'var_cttz_i16'
77 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 false)
78 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %cttz
80 %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 0)
84 define i16 @var_cttz_i16u(i16 %a) {
85 ; NOBMI-LABEL: 'var_cttz_i16u'
86 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 true)
87 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %cttz
89 ; BMI-LABEL: 'var_cttz_i16u'
90 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 true)
91 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i16 %cttz
93 %cttz = call i16 @llvm.cttz.i16(i16 %a, i1 1)
97 define i8 @var_cttz_i8(i8 %a) {
98 ; NOBMI-LABEL: 'var_cttz_i8'
99 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 false)
100 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %cttz
102 ; BMI-LABEL: 'var_cttz_i8'
103 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 false)
104 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %cttz
106 %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 0)
110 define i8 @var_cttz_i8u(i8 %a) {
111 ; NOBMI-LABEL: 'var_cttz_i8u'
112 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 true)
113 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %cttz
115 ; BMI-LABEL: 'var_cttz_i8u'
116 ; BMI-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 true)
117 ; BMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i8 %cttz
119 %cttz = call i8 @llvm.cttz.i8(i8 %a, i1 1)
123 ; Verify the cost of vector trailing zero count instructions.
125 declare <2 x i64> @llvm.cttz.v2i64(<2 x i64>, i1)
126 declare <4 x i32> @llvm.cttz.v4i32(<4 x i32>, i1)
127 declare <8 x i16> @llvm.cttz.v8i16(<8 x i16>, i1)
128 declare <16 x i8> @llvm.cttz.v16i8(<16 x i8>, i1)
130 declare <4 x i64> @llvm.cttz.v4i64(<4 x i64>, i1)
131 declare <8 x i32> @llvm.cttz.v8i32(<8 x i32>, i1)
132 declare <16 x i16> @llvm.cttz.v16i16(<16 x i16>, i1)
133 declare <32 x i8> @llvm.cttz.v32i8(<32 x i8>, i1)
135 declare <8 x i64> @llvm.cttz.v8i64(<8 x i64>, i1)
136 declare <16 x i32> @llvm.cttz.v16i32(<16 x i32>, i1)
137 declare <32 x i16> @llvm.cttz.v32i16(<32 x i16>, i1)
138 declare <64 x i8> @llvm.cttz.v64i8(<64 x i8>, i1)
140 define <2 x i64> @var_cttz_v2i64(<2 x i64> %a) {
141 ; NOBMI-LABEL: 'var_cttz_v2i64'
142 ; NOBMI-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)
143 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
145 ; SSE2-LABEL: 'var_cttz_v2i64'
146 ; 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)
147 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
149 ; SSE42-LABEL: 'var_cttz_v2i64'
150 ; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
151 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
153 ; AVX1-LABEL: 'var_cttz_v2i64'
154 ; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
155 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
157 ; AVX2-LABEL: 'var_cttz_v2i64'
158 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
159 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
161 ; AVX512-LABEL: 'var_cttz_v2i64'
162 ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false)
163 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
165 %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 0)
169 define <2 x i64> @var_cttz_v2i64u(<2 x i64> %a) {
170 ; NOBMI-LABEL: 'var_cttz_v2i64u'
171 ; NOBMI-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)
172 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
174 ; SSE2-LABEL: 'var_cttz_v2i64u'
175 ; 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)
176 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
178 ; SSE42-LABEL: 'var_cttz_v2i64u'
179 ; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
180 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
182 ; AVX1-LABEL: 'var_cttz_v2i64u'
183 ; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
184 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
186 ; AVX2-LABEL: 'var_cttz_v2i64u'
187 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
188 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
190 ; AVX512-LABEL: 'var_cttz_v2i64u'
191 ; AVX512-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true)
192 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <2 x i64> %cttz
194 %cttz = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 1)
198 define <4 x i64> @var_cttz_v4i64(<4 x i64> %a) {
199 ; NOBMI-LABEL: 'var_cttz_v4i64'
200 ; NOBMI-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)
201 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
203 ; SSE2-LABEL: 'var_cttz_v4i64'
204 ; 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)
205 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
207 ; SSE42-LABEL: 'var_cttz_v4i64'
208 ; SSE42-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
209 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
211 ; AVX1-LABEL: 'var_cttz_v4i64'
212 ; AVX1-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
213 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
215 ; AVX2-LABEL: 'var_cttz_v4i64'
216 ; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
217 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
219 ; AVX512-LABEL: 'var_cttz_v4i64'
220 ; AVX512-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
221 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
223 %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 0)
227 define <4 x i64> @var_cttz_v4i64u(<4 x i64> %a) {
228 ; NOBMI-LABEL: 'var_cttz_v4i64u'
229 ; NOBMI-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)
230 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
232 ; SSE2-LABEL: 'var_cttz_v4i64u'
233 ; 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)
234 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
236 ; SSE42-LABEL: 'var_cttz_v4i64u'
237 ; SSE42-NEXT: Cost Model: Found an estimated cost of 26 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
238 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
240 ; AVX1-LABEL: 'var_cttz_v4i64u'
241 ; AVX1-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
242 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
244 ; AVX2-LABEL: 'var_cttz_v4i64u'
245 ; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
246 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
248 ; AVX512-LABEL: 'var_cttz_v4i64u'
249 ; AVX512-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 true)
250 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i64> %cttz
252 %cttz = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 1)
256 define <8 x i64> @var_cttz_v8i64(<8 x i64> %a) {
257 ; NOBMI-LABEL: 'var_cttz_v8i64'
258 ; NOBMI-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)
259 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
261 ; SSE2-LABEL: 'var_cttz_v8i64'
262 ; 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)
263 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
265 ; SSE42-LABEL: 'var_cttz_v8i64'
266 ; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
267 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
269 ; AVX1-LABEL: 'var_cttz_v8i64'
270 ; AVX1-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
271 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
273 ; AVX2-LABEL: 'var_cttz_v8i64'
274 ; AVX2-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)
275 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
277 ; AVX512-LABEL: 'var_cttz_v8i64'
278 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 false)
279 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
281 %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 0)
285 define <8 x i64> @var_cttz_v8i64u(<8 x i64> %a) {
286 ; NOBMI-LABEL: 'var_cttz_v8i64u'
287 ; NOBMI-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)
288 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
290 ; SSE2-LABEL: 'var_cttz_v8i64u'
291 ; 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)
292 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
294 ; SSE42-LABEL: 'var_cttz_v8i64u'
295 ; SSE42-NEXT: Cost Model: Found an estimated cost of 52 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
296 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
298 ; AVX1-LABEL: 'var_cttz_v8i64u'
299 ; AVX1-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
300 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
302 ; AVX2-LABEL: 'var_cttz_v8i64u'
303 ; AVX2-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)
304 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
306 ; AVX512-LABEL: 'var_cttz_v8i64u'
307 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 true)
308 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i64> %cttz
310 %cttz = call <8 x i64> @llvm.cttz.v8i64(<8 x i64> %a, i1 1)
314 define <4 x i32> @var_cttz_v4i32(<4 x i32> %a) {
315 ; NOBMI-LABEL: 'var_cttz_v4i32'
316 ; NOBMI-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)
317 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
319 ; SSE-LABEL: 'var_cttz_v4i32'
320 ; SSE-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)
321 ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
323 ; AVX1-LABEL: 'var_cttz_v4i32'
324 ; AVX1-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
325 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
327 ; AVX2-LABEL: 'var_cttz_v4i32'
328 ; AVX2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
329 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
331 ; AVX512-LABEL: 'var_cttz_v4i32'
332 ; AVX512-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
333 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
335 %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 0)
339 define <4 x i32> @var_cttz_v4i32u(<4 x i32> %a) {
340 ; NOBMI-LABEL: 'var_cttz_v4i32u'
341 ; NOBMI-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)
342 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
344 ; SSE-LABEL: 'var_cttz_v4i32u'
345 ; SSE-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)
346 ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
348 ; AVX1-LABEL: 'var_cttz_v4i32u'
349 ; AVX1-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
350 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
352 ; AVX2-LABEL: 'var_cttz_v4i32u'
353 ; AVX2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
354 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
356 ; AVX512-LABEL: 'var_cttz_v4i32u'
357 ; AVX512-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true)
358 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <4 x i32> %cttz
360 %cttz = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 1)
364 define <8 x i32> @var_cttz_v8i32(<8 x i32> %a) {
365 ; NOBMI-LABEL: 'var_cttz_v8i32'
366 ; NOBMI-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)
367 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
369 ; SSE-LABEL: 'var_cttz_v8i32'
370 ; SSE-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)
371 ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
373 ; AVX1-LABEL: 'var_cttz_v8i32'
374 ; AVX1-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
375 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
377 ; AVX2-LABEL: 'var_cttz_v8i32'
378 ; AVX2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
379 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
381 ; AVX512-LABEL: 'var_cttz_v8i32'
382 ; AVX512-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 false)
383 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
385 %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 0)
389 define <8 x i32> @var_cttz_v8i32u(<8 x i32> %a) {
390 ; NOBMI-LABEL: 'var_cttz_v8i32u'
391 ; NOBMI-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)
392 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
394 ; SSE-LABEL: 'var_cttz_v8i32u'
395 ; SSE-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)
396 ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
398 ; AVX1-LABEL: 'var_cttz_v8i32u'
399 ; AVX1-NEXT: Cost Model: Found an estimated cost of 21 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
400 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
402 ; AVX2-LABEL: 'var_cttz_v8i32u'
403 ; AVX2-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
404 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
406 ; AVX512-LABEL: 'var_cttz_v8i32u'
407 ; AVX512-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 true)
408 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %cttz
410 %cttz = call <8 x i32> @llvm.cttz.v8i32(<8 x i32> %a, i1 1)
414 define <16 x i32> @var_cttz_v16i32(<16 x i32> %a) {
415 ; NOBMI-LABEL: 'var_cttz_v16i32'
416 ; NOBMI-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)
417 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
419 ; SSE-LABEL: 'var_cttz_v16i32'
420 ; SSE-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)
421 ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
423 ; AVX1-LABEL: 'var_cttz_v16i32'
424 ; AVX1-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
425 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
427 ; AVX2-LABEL: 'var_cttz_v16i32'
428 ; AVX2-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)
429 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
431 ; AVX512-LABEL: 'var_cttz_v16i32'
432 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 false)
433 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
435 %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 0)
439 define <16 x i32> @var_cttz_v16i32u(<16 x i32> %a) {
440 ; NOBMI-LABEL: 'var_cttz_v16i32u'
441 ; NOBMI-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)
442 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
444 ; SSE-LABEL: 'var_cttz_v16i32u'
445 ; SSE-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)
446 ; SSE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
448 ; AVX1-LABEL: 'var_cttz_v16i32u'
449 ; AVX1-NEXT: Cost Model: Found an estimated cost of 42 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
450 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
452 ; AVX2-LABEL: 'var_cttz_v16i32u'
453 ; AVX2-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)
454 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
456 ; AVX512-LABEL: 'var_cttz_v16i32u'
457 ; AVX512-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 true)
458 ; AVX512-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i32> %cttz
460 %cttz = call <16 x i32> @llvm.cttz.v16i32(<16 x i32> %a, i1 1)
464 define <8 x i16> @var_cttz_v8i16(<8 x i16> %a) {
465 ; NOBMI-LABEL: 'var_cttz_v8i16'
466 ; NOBMI-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)
467 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
469 ; SSE2-LABEL: 'var_cttz_v8i16'
470 ; 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)
471 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
473 ; SSE42-LABEL: 'var_cttz_v8i16'
474 ; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
475 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
477 ; AVX1-LABEL: 'var_cttz_v8i16'
478 ; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
479 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
481 ; AVX2-LABEL: 'var_cttz_v8i16'
482 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
483 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
485 ; AVX512F-LABEL: 'var_cttz_v8i16'
486 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
487 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
489 ; AVX512BW-LABEL: 'var_cttz_v8i16'
490 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
491 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
493 ; AVX512VPOPCNT-LABEL: 'var_cttz_v8i16'
494 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
495 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
497 ; AVX512BITALG-LABEL: 'var_cttz_v8i16'
498 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false)
499 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
501 %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 0)
505 define <8 x i16> @var_cttz_v8i16u(<8 x i16> %a) {
506 ; NOBMI-LABEL: 'var_cttz_v8i16u'
507 ; NOBMI-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)
508 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
510 ; SSE2-LABEL: 'var_cttz_v8i16u'
511 ; 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)
512 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
514 ; SSE42-LABEL: 'var_cttz_v8i16u'
515 ; SSE42-NEXT: Cost Model: Found an estimated cost of 13 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
516 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
518 ; AVX1-LABEL: 'var_cttz_v8i16u'
519 ; AVX1-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
520 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
522 ; AVX2-LABEL: 'var_cttz_v8i16u'
523 ; AVX2-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
524 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
526 ; AVX512F-LABEL: 'var_cttz_v8i16u'
527 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
528 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
530 ; AVX512BW-LABEL: 'var_cttz_v8i16u'
531 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
532 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
534 ; AVX512VPOPCNT-LABEL: 'var_cttz_v8i16u'
535 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
536 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
538 ; AVX512BITALG-LABEL: 'var_cttz_v8i16u'
539 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true)
540 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i16> %cttz
542 %cttz = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 1)
546 define <16 x i16> @var_cttz_v16i16(<16 x i16> %a) {
547 ; NOBMI-LABEL: 'var_cttz_v16i16'
548 ; NOBMI-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)
549 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
551 ; SSE2-LABEL: 'var_cttz_v16i16'
552 ; 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)
553 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
555 ; SSE42-LABEL: 'var_cttz_v16i16'
556 ; SSE42-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)
557 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
559 ; AVX1-LABEL: 'var_cttz_v16i16'
560 ; AVX1-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
561 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
563 ; AVX2-LABEL: 'var_cttz_v16i16'
564 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
565 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
567 ; AVX512F-LABEL: 'var_cttz_v16i16'
568 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
569 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
571 ; AVX512BW-LABEL: 'var_cttz_v16i16'
572 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
573 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
575 ; AVX512VPOPCNT-LABEL: 'var_cttz_v16i16'
576 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
577 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
579 ; AVX512BITALG-LABEL: 'var_cttz_v16i16'
580 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 false)
581 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
583 %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 0)
587 define <16 x i16> @var_cttz_v16i16u(<16 x i16> %a) {
588 ; NOBMI-LABEL: 'var_cttz_v16i16u'
589 ; NOBMI-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)
590 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
592 ; SSE2-LABEL: 'var_cttz_v16i16u'
593 ; 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)
594 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
596 ; SSE42-LABEL: 'var_cttz_v16i16u'
597 ; SSE42-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)
598 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
600 ; AVX1-LABEL: 'var_cttz_v16i16u'
601 ; AVX1-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
602 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
604 ; AVX2-LABEL: 'var_cttz_v16i16u'
605 ; AVX2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
606 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
608 ; AVX512F-LABEL: 'var_cttz_v16i16u'
609 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
610 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
612 ; AVX512BW-LABEL: 'var_cttz_v16i16u'
613 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
614 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
616 ; AVX512VPOPCNT-LABEL: 'var_cttz_v16i16u'
617 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
618 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
620 ; AVX512BITALG-LABEL: 'var_cttz_v16i16u'
621 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 true)
622 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i16> %cttz
624 %cttz = call <16 x i16> @llvm.cttz.v16i16(<16 x i16> %a, i1 1)
628 define <32 x i16> @var_cttz_v32i16(<32 x i16> %a) {
629 ; NOBMI-LABEL: 'var_cttz_v32i16'
630 ; NOBMI-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)
631 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
633 ; SSE2-LABEL: 'var_cttz_v32i16'
634 ; 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)
635 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
637 ; SSE42-LABEL: 'var_cttz_v32i16'
638 ; SSE42-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)
639 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
641 ; AVX1-LABEL: 'var_cttz_v32i16'
642 ; AVX1-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
643 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
645 ; AVX2-LABEL: 'var_cttz_v32i16'
646 ; AVX2-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)
647 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
649 ; AVX512F-LABEL: 'var_cttz_v32i16'
650 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
651 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
653 ; AVX512BW-LABEL: 'var_cttz_v32i16'
654 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
655 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
657 ; AVX512VPOPCNT-LABEL: 'var_cttz_v32i16'
658 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
659 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
661 ; AVX512BITALG-LABEL: 'var_cttz_v32i16'
662 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 false)
663 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
665 %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 0)
669 define <32 x i16> @var_cttz_v32i16u(<32 x i16> %a) {
670 ; NOBMI-LABEL: 'var_cttz_v32i16u'
671 ; NOBMI-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)
672 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
674 ; SSE2-LABEL: 'var_cttz_v32i16u'
675 ; 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)
676 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
678 ; SSE42-LABEL: 'var_cttz_v32i16u'
679 ; SSE42-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)
680 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
682 ; AVX1-LABEL: 'var_cttz_v32i16u'
683 ; AVX1-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
684 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
686 ; AVX2-LABEL: 'var_cttz_v32i16u'
687 ; AVX2-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)
688 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
690 ; AVX512F-LABEL: 'var_cttz_v32i16u'
691 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
692 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
694 ; AVX512BW-LABEL: 'var_cttz_v32i16u'
695 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
696 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
698 ; AVX512VPOPCNT-LABEL: 'var_cttz_v32i16u'
699 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
700 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
702 ; AVX512BITALG-LABEL: 'var_cttz_v32i16u'
703 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 true)
704 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i16> %cttz
706 %cttz = call <32 x i16> @llvm.cttz.v32i16(<32 x i16> %a, i1 1)
710 define <16 x i8> @var_cttz_v16i8(<16 x i8> %a) {
711 ; NOBMI-LABEL: 'var_cttz_v16i8'
712 ; NOBMI-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)
713 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
715 ; SSE2-LABEL: 'var_cttz_v16i8'
716 ; 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)
717 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
719 ; SSE42-LABEL: 'var_cttz_v16i8'
720 ; SSE42-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
721 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
723 ; AVX1-LABEL: 'var_cttz_v16i8'
724 ; AVX1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
725 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
727 ; AVX2-LABEL: 'var_cttz_v16i8'
728 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
729 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
731 ; AVX512F-LABEL: 'var_cttz_v16i8'
732 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
733 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
735 ; AVX512BW-LABEL: 'var_cttz_v16i8'
736 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
737 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
739 ; AVX512VPOPCNT-LABEL: 'var_cttz_v16i8'
740 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
741 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
743 ; AVX512BITALG-LABEL: 'var_cttz_v16i8'
744 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false)
745 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
747 %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 0)
751 define <16 x i8> @var_cttz_v16i8u(<16 x i8> %a) {
752 ; NOBMI-LABEL: 'var_cttz_v16i8u'
753 ; NOBMI-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)
754 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
756 ; SSE2-LABEL: 'var_cttz_v16i8u'
757 ; 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)
758 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
760 ; SSE42-LABEL: 'var_cttz_v16i8u'
761 ; SSE42-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
762 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
764 ; AVX1-LABEL: 'var_cttz_v16i8u'
765 ; AVX1-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
766 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
768 ; AVX2-LABEL: 'var_cttz_v16i8u'
769 ; AVX2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
770 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
772 ; AVX512F-LABEL: 'var_cttz_v16i8u'
773 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
774 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
776 ; AVX512BW-LABEL: 'var_cttz_v16i8u'
777 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
778 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
780 ; AVX512VPOPCNT-LABEL: 'var_cttz_v16i8u'
781 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
782 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
784 ; AVX512BITALG-LABEL: 'var_cttz_v16i8u'
785 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true)
786 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <16 x i8> %cttz
788 %cttz = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 1)
792 define <32 x i8> @var_cttz_v32i8(<32 x i8> %a) {
793 ; NOBMI-LABEL: 'var_cttz_v32i8'
794 ; NOBMI-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)
795 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
797 ; SSE2-LABEL: 'var_cttz_v32i8'
798 ; 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)
799 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
801 ; SSE42-LABEL: 'var_cttz_v32i8'
802 ; SSE42-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
803 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
805 ; AVX1-LABEL: 'var_cttz_v32i8'
806 ; AVX1-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
807 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
809 ; AVX2-LABEL: 'var_cttz_v32i8'
810 ; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
811 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
813 ; AVX512F-LABEL: 'var_cttz_v32i8'
814 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
815 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
817 ; AVX512BW-LABEL: 'var_cttz_v32i8'
818 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
819 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
821 ; AVX512VPOPCNT-LABEL: 'var_cttz_v32i8'
822 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
823 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
825 ; AVX512BITALG-LABEL: 'var_cttz_v32i8'
826 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 false)
827 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
829 %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 0)
833 define <32 x i8> @var_cttz_v32i8u(<32 x i8> %a) {
834 ; NOBMI-LABEL: 'var_cttz_v32i8u'
835 ; NOBMI-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)
836 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
838 ; SSE2-LABEL: 'var_cttz_v32i8u'
839 ; 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)
840 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
842 ; SSE42-LABEL: 'var_cttz_v32i8u'
843 ; SSE42-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
844 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
846 ; AVX1-LABEL: 'var_cttz_v32i8u'
847 ; AVX1-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
848 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
850 ; AVX2-LABEL: 'var_cttz_v32i8u'
851 ; AVX2-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
852 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
854 ; AVX512F-LABEL: 'var_cttz_v32i8u'
855 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
856 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
858 ; AVX512BW-LABEL: 'var_cttz_v32i8u'
859 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
860 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
862 ; AVX512VPOPCNT-LABEL: 'var_cttz_v32i8u'
863 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
864 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
866 ; AVX512BITALG-LABEL: 'var_cttz_v32i8u'
867 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 true)
868 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <32 x i8> %cttz
870 %cttz = call <32 x i8> @llvm.cttz.v32i8(<32 x i8> %a, i1 1)
874 define <64 x i8> @var_cttz_v64i8(<64 x i8> %a) {
875 ; NOBMI-LABEL: 'var_cttz_v64i8'
876 ; NOBMI-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)
877 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
879 ; SSE2-LABEL: 'var_cttz_v64i8'
880 ; 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)
881 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
883 ; SSE42-LABEL: 'var_cttz_v64i8'
884 ; SSE42-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
885 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
887 ; AVX1-LABEL: 'var_cttz_v64i8'
888 ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
889 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
891 ; AVX2-LABEL: 'var_cttz_v64i8'
892 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
893 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
895 ; AVX512F-LABEL: 'var_cttz_v64i8'
896 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
897 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
899 ; AVX512BW-LABEL: 'var_cttz_v64i8'
900 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
901 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
903 ; AVX512VPOPCNT-LABEL: 'var_cttz_v64i8'
904 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
905 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
907 ; AVX512BITALG-LABEL: 'var_cttz_v64i8'
908 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 false)
909 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
911 %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 0)
915 define <64 x i8> @var_cttz_v64i8u(<64 x i8> %a) {
916 ; NOBMI-LABEL: 'var_cttz_v64i8u'
917 ; NOBMI-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)
918 ; NOBMI-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
920 ; SSE2-LABEL: 'var_cttz_v64i8u'
921 ; 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)
922 ; SSE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
924 ; SSE42-LABEL: 'var_cttz_v64i8u'
925 ; SSE42-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
926 ; SSE42-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
928 ; AVX1-LABEL: 'var_cttz_v64i8u'
929 ; AVX1-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
930 ; AVX1-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
932 ; AVX2-LABEL: 'var_cttz_v64i8u'
933 ; AVX2-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
934 ; AVX2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
936 ; AVX512F-LABEL: 'var_cttz_v64i8u'
937 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
938 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
940 ; AVX512BW-LABEL: 'var_cttz_v64i8u'
941 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
942 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
944 ; AVX512VPOPCNT-LABEL: 'var_cttz_v64i8u'
945 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
946 ; AVX512VPOPCNT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
948 ; AVX512BITALG-LABEL: 'var_cttz_v64i8u'
949 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 true)
950 ; AVX512BITALG-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <64 x i8> %cttz
952 %cttz = call <64 x i8> @llvm.cttz.v64i8(<64 x i8> %a, i1 1)