1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=-lzcnt,+sse2 | FileCheck %s -check-prefixes=CHECK,NOLZCNT
3 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+sse2 | FileCheck %s -check-prefixes=CHECK,LZCNT,SSE2
4 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+sse4.2 | FileCheck %s -check-prefixes=CHECK,LZCNT,SSE42
5 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+avx | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX,AVX1
6 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+avx2 | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX,AVX2
7 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+avx512f | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX512,AVX512F
8 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+avx512vl,+avx512bw,+avx512dq | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX512,AVX512BW
9 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=code-size -mattr=+lzcnt,+avx512vl,+avx512bw,+avx512dq,+avx512cd | FileCheck %s -check-prefixes=CHECK,LZCNT,AVX512CD
11 ; Verify the cost of scalar leading zero count instructions.
13 declare i64 @llvm.ctlz.i64(i64, i1)
14 declare i32 @llvm.ctlz.i32(i32, i1)
15 declare i16 @llvm.ctlz.i16(i16, i1)
16 declare i8 @llvm.ctlz.i8(i8, i1)
18 define i64 @var_ctlz_i64(i64 %a) {
19 ; NOLZCNT-LABEL: 'var_ctlz_i64'
20 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 false)
21 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz
23 ; LZCNT-LABEL: 'var_ctlz_i64'
24 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 false)
25 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz
27 %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 0)
31 define i64 @var_ctlz_i64u(i64 %a) {
32 ; NOLZCNT-LABEL: 'var_ctlz_i64u'
33 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 true)
34 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz
36 ; LZCNT-LABEL: 'var_ctlz_i64u'
37 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 true)
38 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz
40 %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 1)
44 define i32 @var_ctlz_i32(i32 %a) {
45 ; NOLZCNT-LABEL: 'var_ctlz_i32'
46 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 false)
47 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
49 ; LZCNT-LABEL: 'var_ctlz_i32'
50 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 false)
51 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
53 %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 0)
57 define i32 @var_ctlz_i32u(i32 %a) {
58 ; NOLZCNT-LABEL: 'var_ctlz_i32u'
59 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
60 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
62 ; LZCNT-LABEL: 'var_ctlz_i32u'
63 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
64 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
66 %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 1)
70 define i16 @var_ctlz_i16(i16 %a) {
71 ; NOLZCNT-LABEL: 'var_ctlz_i16'
72 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 false)
73 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
75 ; LZCNT-LABEL: 'var_ctlz_i16'
76 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 false)
77 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
79 %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 0)
83 define i16 @var_ctlz_i16u(i16 %a) {
84 ; NOLZCNT-LABEL: 'var_ctlz_i16u'
85 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 true)
86 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
88 ; LZCNT-LABEL: 'var_ctlz_i16u'
89 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 true)
90 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
92 %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 1)
96 define i8 @var_ctlz_i8(i8 %a) {
97 ; NOLZCNT-LABEL: 'var_ctlz_i8'
98 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 false)
99 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
101 ; LZCNT-LABEL: 'var_ctlz_i8'
102 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 false)
103 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
105 %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 0)
109 define i8 @var_ctlz_i8u(i8 %a) {
110 ; NOLZCNT-LABEL: 'var_ctlz_i8u'
111 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 true)
112 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
114 ; LZCNT-LABEL: 'var_ctlz_i8u'
115 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 true)
116 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
118 %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 1)
122 ; Verify the cost of vector leading zero count instructions.
124 declare <2 x i64> @llvm.ctlz.v2i64(<2 x i64>, i1)
125 declare <4 x i32> @llvm.ctlz.v4i32(<4 x i32>, i1)
126 declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1)
127 declare <16 x i8> @llvm.ctlz.v16i8(<16 x i8>, i1)
129 declare <4 x i64> @llvm.ctlz.v4i64(<4 x i64>, i1)
130 declare <8 x i32> @llvm.ctlz.v8i32(<8 x i32>, i1)
131 declare <16 x i16> @llvm.ctlz.v16i16(<16 x i16>, i1)
132 declare <32 x i8> @llvm.ctlz.v32i8(<32 x i8>, i1)
134 declare <8 x i64> @llvm.ctlz.v8i64(<8 x i64>, i1)
135 declare <16 x i32> @llvm.ctlz.v16i32(<16 x i32>, i1)
136 declare <32 x i16> @llvm.ctlz.v32i16(<32 x i16>, i1)
137 declare <64 x i8> @llvm.ctlz.v64i8(<64 x i8>, i1)
139 define <2 x i64> @var_ctlz_v2i64(<2 x i64> %a) {
140 ; NOLZCNT-LABEL: 'var_ctlz_v2i64'
141 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false)
142 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
144 ; SSE2-LABEL: 'var_ctlz_v2i64'
145 ; SSE2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false)
146 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
148 ; SSE42-LABEL: 'var_ctlz_v2i64'
149 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false)
150 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
152 ; AVX-LABEL: 'var_ctlz_v2i64'
153 ; AVX-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false)
154 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
156 ; AVX512-LABEL: 'var_ctlz_v2i64'
157 ; AVX512-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false)
158 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
160 ; AVX512CD-LABEL: 'var_ctlz_v2i64'
161 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 false)
162 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
164 %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 0)
168 define <2 x i64> @var_ctlz_v2i64u(<2 x i64> %a) {
169 ; NOLZCNT-LABEL: 'var_ctlz_v2i64u'
170 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true)
171 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
173 ; SSE2-LABEL: 'var_ctlz_v2i64u'
174 ; SSE2-NEXT: Cost Model: Found an estimated cost of 36 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true)
175 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
177 ; SSE42-LABEL: 'var_ctlz_v2i64u'
178 ; SSE42-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true)
179 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
181 ; AVX-LABEL: 'var_ctlz_v2i64u'
182 ; AVX-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true)
183 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
185 ; AVX512-LABEL: 'var_ctlz_v2i64u'
186 ; AVX512-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true)
187 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
189 ; AVX512CD-LABEL: 'var_ctlz_v2i64u'
190 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 true)
191 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
193 %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 1)
197 define <4 x i64> @var_ctlz_v4i64(<4 x i64> %a) {
198 ; NOLZCNT-LABEL: 'var_ctlz_v4i64'
199 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
200 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
202 ; SSE2-LABEL: 'var_ctlz_v4i64'
203 ; SSE2-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
204 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
206 ; SSE42-LABEL: 'var_ctlz_v4i64'
207 ; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
208 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
210 ; AVX1-LABEL: 'var_ctlz_v4i64'
211 ; AVX1-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
212 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
214 ; AVX2-LABEL: 'var_ctlz_v4i64'
215 ; AVX2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
216 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
218 ; AVX512-LABEL: 'var_ctlz_v4i64'
219 ; AVX512-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
220 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
222 ; AVX512CD-LABEL: 'var_ctlz_v4i64'
223 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 false)
224 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
226 %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 0)
230 define <4 x i64> @var_ctlz_v4i64u(<4 x i64> %a) {
231 ; NOLZCNT-LABEL: 'var_ctlz_v4i64u'
232 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
233 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
235 ; SSE2-LABEL: 'var_ctlz_v4i64u'
236 ; SSE2-NEXT: Cost Model: Found an estimated cost of 72 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
237 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
239 ; SSE42-LABEL: 'var_ctlz_v4i64u'
240 ; SSE42-NEXT: Cost Model: Found an estimated cost of 56 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
241 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
243 ; AVX1-LABEL: 'var_ctlz_v4i64u'
244 ; AVX1-NEXT: Cost Model: Found an estimated cost of 49 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
245 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
247 ; AVX2-LABEL: 'var_ctlz_v4i64u'
248 ; AVX2-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
249 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
251 ; AVX512-LABEL: 'var_ctlz_v4i64u'
252 ; AVX512-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
253 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
255 ; AVX512CD-LABEL: 'var_ctlz_v4i64u'
256 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 true)
257 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
259 %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 1)
263 define <8 x i64> @var_ctlz_v8i64(<8 x i64> %a) {
264 ; NOLZCNT-LABEL: 'var_ctlz_v8i64'
265 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
266 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
268 ; SSE2-LABEL: 'var_ctlz_v8i64'
269 ; SSE2-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
270 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
272 ; SSE42-LABEL: 'var_ctlz_v8i64'
273 ; SSE42-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
274 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
276 ; AVX1-LABEL: 'var_ctlz_v8i64'
277 ; AVX1-NEXT: Cost Model: Found an estimated cost of 98 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
278 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
280 ; AVX2-LABEL: 'var_ctlz_v8i64'
281 ; AVX2-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
282 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
284 ; AVX512F-LABEL: 'var_ctlz_v8i64'
285 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
286 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
288 ; AVX512BW-LABEL: 'var_ctlz_v8i64'
289 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
290 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
292 ; AVX512CD-LABEL: 'var_ctlz_v8i64'
293 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 false)
294 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
296 %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 0)
300 define <8 x i64> @var_ctlz_v8i64u(<8 x i64> %a) {
301 ; NOLZCNT-LABEL: 'var_ctlz_v8i64u'
302 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
303 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
305 ; SSE2-LABEL: 'var_ctlz_v8i64u'
306 ; SSE2-NEXT: Cost Model: Found an estimated cost of 144 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
307 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
309 ; SSE42-LABEL: 'var_ctlz_v8i64u'
310 ; SSE42-NEXT: Cost Model: Found an estimated cost of 112 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
311 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
313 ; AVX1-LABEL: 'var_ctlz_v8i64u'
314 ; AVX1-NEXT: Cost Model: Found an estimated cost of 98 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
315 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
317 ; AVX2-LABEL: 'var_ctlz_v8i64u'
318 ; AVX2-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
319 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
321 ; AVX512F-LABEL: 'var_ctlz_v8i64u'
322 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
323 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
325 ; AVX512BW-LABEL: 'var_ctlz_v8i64u'
326 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
327 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
329 ; AVX512CD-LABEL: 'var_ctlz_v8i64u'
330 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 true)
331 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
333 %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 1)
337 define <4 x i32> @var_ctlz_v4i32(<4 x i32> %a) {
338 ; NOLZCNT-LABEL: 'var_ctlz_v4i32'
339 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
340 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
342 ; SSE2-LABEL: 'var_ctlz_v4i32'
343 ; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
344 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
346 ; SSE42-LABEL: 'var_ctlz_v4i32'
347 ; SSE42-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
348 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
350 ; AVX-LABEL: 'var_ctlz_v4i32'
351 ; AVX-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
352 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
354 ; AVX512-LABEL: 'var_ctlz_v4i32'
355 ; AVX512-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
356 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
358 ; AVX512CD-LABEL: 'var_ctlz_v4i32'
359 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
360 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
362 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 0)
366 define <4 x i32> @var_ctlz_v4i32u(<4 x i32> %a) {
367 ; NOLZCNT-LABEL: 'var_ctlz_v4i32u'
368 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true)
369 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
371 ; SSE2-LABEL: 'var_ctlz_v4i32u'
372 ; SSE2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true)
373 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
375 ; SSE42-LABEL: 'var_ctlz_v4i32u'
376 ; SSE42-NEXT: Cost Model: Found an estimated cost of 22 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true)
377 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
379 ; AVX-LABEL: 'var_ctlz_v4i32u'
380 ; AVX-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true)
381 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
383 ; AVX512-LABEL: 'var_ctlz_v4i32u'
384 ; AVX512-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true)
385 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
387 ; AVX512CD-LABEL: 'var_ctlz_v4i32u'
388 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 true)
389 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
391 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 1)
395 define <8 x i32> @var_ctlz_v8i32(<8 x i32> %a) {
396 ; NOLZCNT-LABEL: 'var_ctlz_v8i32'
397 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
398 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
400 ; SSE2-LABEL: 'var_ctlz_v8i32'
401 ; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
402 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
404 ; SSE42-LABEL: 'var_ctlz_v8i32'
405 ; SSE42-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
406 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
408 ; AVX1-LABEL: 'var_ctlz_v8i32'
409 ; AVX1-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
410 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
412 ; AVX2-LABEL: 'var_ctlz_v8i32'
413 ; AVX2-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
414 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
416 ; AVX512-LABEL: 'var_ctlz_v8i32'
417 ; AVX512-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
418 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
420 ; AVX512CD-LABEL: 'var_ctlz_v8i32'
421 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 false)
422 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
424 %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 0)
428 define <8 x i32> @var_ctlz_v8i32u(<8 x i32> %a) {
429 ; NOLZCNT-LABEL: 'var_ctlz_v8i32u'
430 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
431 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
433 ; SSE2-LABEL: 'var_ctlz_v8i32u'
434 ; SSE2-NEXT: Cost Model: Found an estimated cost of 76 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
435 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
437 ; SSE42-LABEL: 'var_ctlz_v8i32u'
438 ; SSE42-NEXT: Cost Model: Found an estimated cost of 44 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
439 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
441 ; AVX1-LABEL: 'var_ctlz_v8i32u'
442 ; AVX1-NEXT: Cost Model: Found an estimated cost of 39 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
443 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
445 ; AVX2-LABEL: 'var_ctlz_v8i32u'
446 ; AVX2-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
447 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
449 ; AVX512-LABEL: 'var_ctlz_v8i32u'
450 ; AVX512-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
451 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
453 ; AVX512CD-LABEL: 'var_ctlz_v8i32u'
454 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 true)
455 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
457 %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 1)
461 define <16 x i32> @var_ctlz_v16i32(<16 x i32> %a) {
462 ; NOLZCNT-LABEL: 'var_ctlz_v16i32'
463 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
464 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
466 ; SSE2-LABEL: 'var_ctlz_v16i32'
467 ; SSE2-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
468 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
470 ; SSE42-LABEL: 'var_ctlz_v16i32'
471 ; SSE42-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
472 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
474 ; AVX1-LABEL: 'var_ctlz_v16i32'
475 ; AVX1-NEXT: Cost Model: Found an estimated cost of 78 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
476 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
478 ; AVX2-LABEL: 'var_ctlz_v16i32'
479 ; AVX2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
480 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
482 ; AVX512F-LABEL: 'var_ctlz_v16i32'
483 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
484 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
486 ; AVX512BW-LABEL: 'var_ctlz_v16i32'
487 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
488 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
490 ; AVX512CD-LABEL: 'var_ctlz_v16i32'
491 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 false)
492 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
494 %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 0)
498 define <16 x i32> @var_ctlz_v16i32u(<16 x i32> %a) {
499 ; NOLZCNT-LABEL: 'var_ctlz_v16i32u'
500 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
501 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
503 ; SSE2-LABEL: 'var_ctlz_v16i32u'
504 ; SSE2-NEXT: Cost Model: Found an estimated cost of 152 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
505 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
507 ; SSE42-LABEL: 'var_ctlz_v16i32u'
508 ; SSE42-NEXT: Cost Model: Found an estimated cost of 88 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
509 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
511 ; AVX1-LABEL: 'var_ctlz_v16i32u'
512 ; AVX1-NEXT: Cost Model: Found an estimated cost of 78 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
513 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
515 ; AVX2-LABEL: 'var_ctlz_v16i32u'
516 ; AVX2-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
517 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
519 ; AVX512F-LABEL: 'var_ctlz_v16i32u'
520 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
521 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
523 ; AVX512BW-LABEL: 'var_ctlz_v16i32u'
524 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 25 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
525 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
527 ; AVX512CD-LABEL: 'var_ctlz_v16i32u'
528 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 true)
529 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
531 %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 1)
535 define <8 x i16> @var_ctlz_v8i16(<8 x i16> %a) {
536 ; NOLZCNT-LABEL: 'var_ctlz_v8i16'
537 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
538 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
540 ; SSE2-LABEL: 'var_ctlz_v8i16'
541 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
542 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
544 ; SSE42-LABEL: 'var_ctlz_v8i16'
545 ; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
546 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
548 ; AVX-LABEL: 'var_ctlz_v8i16'
549 ; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
550 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
552 ; AVX512-LABEL: 'var_ctlz_v8i16'
553 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
554 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
556 ; AVX512CD-LABEL: 'var_ctlz_v8i16'
557 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
558 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
560 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 0)
564 define <8 x i16> @var_ctlz_v8i16u(<8 x i16> %a) {
565 ; NOLZCNT-LABEL: 'var_ctlz_v8i16u'
566 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true)
567 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
569 ; SSE2-LABEL: 'var_ctlz_v8i16u'
570 ; SSE2-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true)
571 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
573 ; SSE42-LABEL: 'var_ctlz_v8i16u'
574 ; SSE42-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true)
575 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
577 ; AVX-LABEL: 'var_ctlz_v8i16u'
578 ; AVX-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true)
579 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
581 ; AVX512-LABEL: 'var_ctlz_v8i16u'
582 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true)
583 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
585 ; AVX512CD-LABEL: 'var_ctlz_v8i16u'
586 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 true)
587 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
589 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 1)
593 define <16 x i16> @var_ctlz_v16i16(<16 x i16> %a) {
594 ; NOLZCNT-LABEL: 'var_ctlz_v16i16'
595 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
596 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
598 ; SSE2-LABEL: 'var_ctlz_v16i16'
599 ; SSE2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
600 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
602 ; SSE42-LABEL: 'var_ctlz_v16i16'
603 ; SSE42-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
604 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
606 ; AVX1-LABEL: 'var_ctlz_v16i16'
607 ; AVX1-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
608 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
610 ; AVX2-LABEL: 'var_ctlz_v16i16'
611 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
612 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
614 ; AVX512-LABEL: 'var_ctlz_v16i16'
615 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
616 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
618 ; AVX512CD-LABEL: 'var_ctlz_v16i16'
619 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 false)
620 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
622 %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 0)
626 define <16 x i16> @var_ctlz_v16i16u(<16 x i16> %a) {
627 ; NOLZCNT-LABEL: 'var_ctlz_v16i16u'
628 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
629 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
631 ; SSE2-LABEL: 'var_ctlz_v16i16u'
632 ; SSE2-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
633 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
635 ; SSE42-LABEL: 'var_ctlz_v16i16u'
636 ; SSE42-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
637 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
639 ; AVX1-LABEL: 'var_ctlz_v16i16u'
640 ; AVX1-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
641 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
643 ; AVX2-LABEL: 'var_ctlz_v16i16u'
644 ; AVX2-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
645 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
647 ; AVX512-LABEL: 'var_ctlz_v16i16u'
648 ; AVX512-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
649 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
651 ; AVX512CD-LABEL: 'var_ctlz_v16i16u'
652 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 true)
653 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
655 %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 1)
659 define <32 x i16> @var_ctlz_v32i16(<32 x i16> %a) {
660 ; NOLZCNT-LABEL: 'var_ctlz_v32i16'
661 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
662 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
664 ; SSE2-LABEL: 'var_ctlz_v32i16'
665 ; SSE2-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
666 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
668 ; SSE42-LABEL: 'var_ctlz_v32i16'
669 ; SSE42-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
670 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
672 ; AVX1-LABEL: 'var_ctlz_v32i16'
673 ; AVX1-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
674 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
676 ; AVX2-LABEL: 'var_ctlz_v32i16'
677 ; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
678 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
680 ; AVX512F-LABEL: 'var_ctlz_v32i16'
681 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
682 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
684 ; AVX512BW-LABEL: 'var_ctlz_v32i16'
685 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
686 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
688 ; AVX512CD-LABEL: 'var_ctlz_v32i16'
689 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 false)
690 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
692 %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 0)
696 define <32 x i16> @var_ctlz_v32i16u(<32 x i16> %a) {
697 ; NOLZCNT-LABEL: 'var_ctlz_v32i16u'
698 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
699 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
701 ; SSE2-LABEL: 'var_ctlz_v32i16u'
702 ; SSE2-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
703 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
705 ; SSE42-LABEL: 'var_ctlz_v32i16u'
706 ; SSE42-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
707 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
709 ; AVX1-LABEL: 'var_ctlz_v32i16u'
710 ; AVX1-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
711 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
713 ; AVX2-LABEL: 'var_ctlz_v32i16u'
714 ; AVX2-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
715 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
717 ; AVX512F-LABEL: 'var_ctlz_v32i16u'
718 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
719 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
721 ; AVX512BW-LABEL: 'var_ctlz_v32i16u'
722 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
723 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
725 ; AVX512CD-LABEL: 'var_ctlz_v32i16u'
726 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 true)
727 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
729 %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 1)
733 define <16 x i8> @var_ctlz_v16i8(<16 x i8> %a) {
734 ; NOLZCNT-LABEL: 'var_ctlz_v16i8'
735 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
736 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
738 ; SSE2-LABEL: 'var_ctlz_v16i8'
739 ; SSE2-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
740 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
742 ; SSE42-LABEL: 'var_ctlz_v16i8'
743 ; SSE42-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
744 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
746 ; AVX-LABEL: 'var_ctlz_v16i8'
747 ; AVX-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
748 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
750 ; AVX512-LABEL: 'var_ctlz_v16i8'
751 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
752 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
754 ; AVX512CD-LABEL: 'var_ctlz_v16i8'
755 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 false)
756 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
758 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 0)
762 define <16 x i8> @var_ctlz_v16i8u(<16 x i8> %a) {
763 ; NOLZCNT-LABEL: 'var_ctlz_v16i8u'
764 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true)
765 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
767 ; SSE2-LABEL: 'var_ctlz_v16i8u'
768 ; SSE2-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true)
769 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
771 ; SSE42-LABEL: 'var_ctlz_v16i8u'
772 ; SSE42-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true)
773 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
775 ; AVX-LABEL: 'var_ctlz_v16i8u'
776 ; AVX-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true)
777 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
779 ; AVX512-LABEL: 'var_ctlz_v16i8u'
780 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true)
781 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
783 ; AVX512CD-LABEL: 'var_ctlz_v16i8u'
784 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 true)
785 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
787 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 1)
791 define <32 x i8> @var_ctlz_v32i8(<32 x i8> %a) {
792 ; NOLZCNT-LABEL: 'var_ctlz_v32i8'
793 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
794 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
796 ; SSE2-LABEL: 'var_ctlz_v32i8'
797 ; SSE2-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
798 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
800 ; SSE42-LABEL: 'var_ctlz_v32i8'
801 ; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
802 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
804 ; AVX1-LABEL: 'var_ctlz_v32i8'
805 ; AVX1-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
806 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
808 ; AVX2-LABEL: 'var_ctlz_v32i8'
809 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
810 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
812 ; AVX512-LABEL: 'var_ctlz_v32i8'
813 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
814 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
816 ; AVX512CD-LABEL: 'var_ctlz_v32i8'
817 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 false)
818 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
820 %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 0)
824 define <32 x i8> @var_ctlz_v32i8u(<32 x i8> %a) {
825 ; NOLZCNT-LABEL: 'var_ctlz_v32i8u'
826 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
827 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
829 ; SSE2-LABEL: 'var_ctlz_v32i8u'
830 ; SSE2-NEXT: Cost Model: Found an estimated cost of 58 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
831 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
833 ; SSE42-LABEL: 'var_ctlz_v32i8u'
834 ; SSE42-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
835 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
837 ; AVX1-LABEL: 'var_ctlz_v32i8u'
838 ; AVX1-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
839 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
841 ; AVX2-LABEL: 'var_ctlz_v32i8u'
842 ; AVX2-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
843 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
845 ; AVX512-LABEL: 'var_ctlz_v32i8u'
846 ; AVX512-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
847 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
849 ; AVX512CD-LABEL: 'var_ctlz_v32i8u'
850 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 true)
851 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
853 %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 1)
857 define <64 x i8> @var_ctlz_v64i8(<64 x i8> %a) {
858 ; NOLZCNT-LABEL: 'var_ctlz_v64i8'
859 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
860 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
862 ; SSE2-LABEL: 'var_ctlz_v64i8'
863 ; SSE2-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
864 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
866 ; SSE42-LABEL: 'var_ctlz_v64i8'
867 ; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
868 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
870 ; AVX1-LABEL: 'var_ctlz_v64i8'
871 ; AVX1-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
872 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
874 ; AVX2-LABEL: 'var_ctlz_v64i8'
875 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
876 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
878 ; AVX512F-LABEL: 'var_ctlz_v64i8'
879 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
880 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
882 ; AVX512BW-LABEL: 'var_ctlz_v64i8'
883 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
884 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
886 ; AVX512CD-LABEL: 'var_ctlz_v64i8'
887 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 false)
888 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
890 %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 0)
894 define <64 x i8> @var_ctlz_v64i8u(<64 x i8> %a) {
895 ; NOLZCNT-LABEL: 'var_ctlz_v64i8u'
896 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
897 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
899 ; SSE2-LABEL: 'var_ctlz_v64i8u'
900 ; SSE2-NEXT: Cost Model: Found an estimated cost of 116 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
901 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
903 ; SSE42-LABEL: 'var_ctlz_v64i8u'
904 ; SSE42-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
905 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
907 ; AVX1-LABEL: 'var_ctlz_v64i8u'
908 ; AVX1-NEXT: Cost Model: Found an estimated cost of 38 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
909 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
911 ; AVX2-LABEL: 'var_ctlz_v64i8u'
912 ; AVX2-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
913 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
915 ; AVX512F-LABEL: 'var_ctlz_v64i8u'
916 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
917 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
919 ; AVX512BW-LABEL: 'var_ctlz_v64i8u'
920 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
921 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
923 ; AVX512CD-LABEL: 'var_ctlz_v64i8u'
924 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 true)
925 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
927 %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 1)
930 ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: