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 2 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 ; CHECK-LABEL: 'var_ctlz_i64u'
33 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 true)
34 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %ctlz
36 %ctlz = call i64 @llvm.ctlz.i64(i64 %a, i1 1)
40 define i32 @var_ctlz_i32(i32 %a) {
41 ; NOLZCNT-LABEL: 'var_ctlz_i32'
42 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 false)
43 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
45 ; LZCNT-LABEL: 'var_ctlz_i32'
46 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 false)
47 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
49 %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 0)
53 define i32 @var_ctlz_i32u(i32 %a) {
54 ; CHECK-LABEL: 'var_ctlz_i32u'
55 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 true)
56 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %ctlz
58 %ctlz = call i32 @llvm.ctlz.i32(i32 %a, i1 1)
62 define i16 @var_ctlz_i16(i16 %a) {
63 ; NOLZCNT-LABEL: 'var_ctlz_i16'
64 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 false)
65 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
67 ; LZCNT-LABEL: 'var_ctlz_i16'
68 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 false)
69 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
71 %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 0)
75 define i16 @var_ctlz_i16u(i16 %a) {
76 ; NOLZCNT-LABEL: 'var_ctlz_i16u'
77 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 true)
78 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
80 ; LZCNT-LABEL: 'var_ctlz_i16u'
81 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 true)
82 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i16 %ctlz
84 %ctlz = call i16 @llvm.ctlz.i16(i16 %a, i1 1)
88 define i8 @var_ctlz_i8(i8 %a) {
89 ; NOLZCNT-LABEL: 'var_ctlz_i8'
90 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 false)
91 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
93 ; LZCNT-LABEL: 'var_ctlz_i8'
94 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 false)
95 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
97 %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 0)
101 define i8 @var_ctlz_i8u(i8 %a) {
102 ; NOLZCNT-LABEL: 'var_ctlz_i8u'
103 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 true)
104 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
106 ; LZCNT-LABEL: 'var_ctlz_i8u'
107 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 true)
108 ; LZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i8 %ctlz
110 %ctlz = call i8 @llvm.ctlz.i8(i8 %a, i1 1)
114 ; Verify the cost of vector leading zero count instructions.
116 declare <2 x i64> @llvm.ctlz.v2i64(<2 x i64>, i1)
117 declare <4 x i32> @llvm.ctlz.v4i32(<4 x i32>, i1)
118 declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1)
119 declare <16 x i8> @llvm.ctlz.v16i8(<16 x i8>, i1)
121 declare <4 x i64> @llvm.ctlz.v4i64(<4 x i64>, i1)
122 declare <8 x i32> @llvm.ctlz.v8i32(<8 x i32>, i1)
123 declare <16 x i16> @llvm.ctlz.v16i16(<16 x i16>, i1)
124 declare <32 x i8> @llvm.ctlz.v32i8(<32 x i8>, i1)
126 declare <8 x i64> @llvm.ctlz.v8i64(<8 x i64>, i1)
127 declare <16 x i32> @llvm.ctlz.v16i32(<16 x i32>, i1)
128 declare <32 x i16> @llvm.ctlz.v32i16(<32 x i16>, i1)
129 declare <64 x i8> @llvm.ctlz.v64i8(<64 x i8>, i1)
131 define <2 x i64> @var_ctlz_v2i64(<2 x i64> %a) {
132 ; NOLZCNT-LABEL: 'var_ctlz_v2i64'
133 ; 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)
134 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
136 ; SSE2-LABEL: 'var_ctlz_v2i64'
137 ; 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)
138 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
140 ; SSE42-LABEL: 'var_ctlz_v2i64'
141 ; 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)
142 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
144 ; AVX-LABEL: 'var_ctlz_v2i64'
145 ; 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)
146 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
148 ; AVX512-LABEL: 'var_ctlz_v2i64'
149 ; 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)
150 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
152 ; AVX512CD-LABEL: 'var_ctlz_v2i64'
153 ; 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)
154 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
156 %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 0)
160 define <2 x i64> @var_ctlz_v2i64u(<2 x i64> %a) {
161 ; NOLZCNT-LABEL: 'var_ctlz_v2i64u'
162 ; 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)
163 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
165 ; SSE2-LABEL: 'var_ctlz_v2i64u'
166 ; 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)
167 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
169 ; SSE42-LABEL: 'var_ctlz_v2i64u'
170 ; 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)
171 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
173 ; AVX-LABEL: 'var_ctlz_v2i64u'
174 ; 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)
175 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
177 ; AVX512-LABEL: 'var_ctlz_v2i64u'
178 ; 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)
179 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
181 ; AVX512CD-LABEL: 'var_ctlz_v2i64u'
182 ; 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)
183 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <2 x i64> %ctlz
185 %ctlz = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %a, i1 1)
189 define <4 x i64> @var_ctlz_v4i64(<4 x i64> %a) {
190 ; NOLZCNT-LABEL: 'var_ctlz_v4i64'
191 ; 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)
192 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
194 ; SSE2-LABEL: 'var_ctlz_v4i64'
195 ; 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)
196 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
198 ; SSE42-LABEL: 'var_ctlz_v4i64'
199 ; 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)
200 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
202 ; AVX1-LABEL: 'var_ctlz_v4i64'
203 ; 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)
204 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
206 ; AVX2-LABEL: 'var_ctlz_v4i64'
207 ; 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)
208 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
210 ; AVX512-LABEL: 'var_ctlz_v4i64'
211 ; 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)
212 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
214 ; AVX512CD-LABEL: 'var_ctlz_v4i64'
215 ; 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)
216 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
218 %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 0)
222 define <4 x i64> @var_ctlz_v4i64u(<4 x i64> %a) {
223 ; NOLZCNT-LABEL: 'var_ctlz_v4i64u'
224 ; 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)
225 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
227 ; SSE2-LABEL: 'var_ctlz_v4i64u'
228 ; 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)
229 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
231 ; SSE42-LABEL: 'var_ctlz_v4i64u'
232 ; 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)
233 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
235 ; AVX1-LABEL: 'var_ctlz_v4i64u'
236 ; 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)
237 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
239 ; AVX2-LABEL: 'var_ctlz_v4i64u'
240 ; 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)
241 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
243 ; AVX512-LABEL: 'var_ctlz_v4i64u'
244 ; 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)
245 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
247 ; AVX512CD-LABEL: 'var_ctlz_v4i64u'
248 ; 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)
249 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i64> %ctlz
251 %ctlz = call <4 x i64> @llvm.ctlz.v4i64(<4 x i64> %a, i1 1)
255 define <8 x i64> @var_ctlz_v8i64(<8 x i64> %a) {
256 ; NOLZCNT-LABEL: 'var_ctlz_v8i64'
257 ; 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)
258 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
260 ; SSE2-LABEL: 'var_ctlz_v8i64'
261 ; 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)
262 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
264 ; SSE42-LABEL: 'var_ctlz_v8i64'
265 ; 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)
266 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
268 ; AVX1-LABEL: 'var_ctlz_v8i64'
269 ; 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)
270 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
272 ; AVX2-LABEL: 'var_ctlz_v8i64'
273 ; 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)
274 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
276 ; AVX512F-LABEL: 'var_ctlz_v8i64'
277 ; 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)
278 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
280 ; AVX512BW-LABEL: 'var_ctlz_v8i64'
281 ; 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)
282 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
284 ; AVX512CD-LABEL: 'var_ctlz_v8i64'
285 ; 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)
286 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
288 %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 0)
292 define <8 x i64> @var_ctlz_v8i64u(<8 x i64> %a) {
293 ; NOLZCNT-LABEL: 'var_ctlz_v8i64u'
294 ; 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)
295 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
297 ; SSE2-LABEL: 'var_ctlz_v8i64u'
298 ; 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)
299 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
301 ; SSE42-LABEL: 'var_ctlz_v8i64u'
302 ; 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)
303 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
305 ; AVX1-LABEL: 'var_ctlz_v8i64u'
306 ; 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)
307 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
309 ; AVX2-LABEL: 'var_ctlz_v8i64u'
310 ; 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)
311 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
313 ; AVX512F-LABEL: 'var_ctlz_v8i64u'
314 ; 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)
315 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
317 ; AVX512BW-LABEL: 'var_ctlz_v8i64u'
318 ; 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)
319 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
321 ; AVX512CD-LABEL: 'var_ctlz_v8i64u'
322 ; 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)
323 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i64> %ctlz
325 %ctlz = call <8 x i64> @llvm.ctlz.v8i64(<8 x i64> %a, i1 1)
329 define <4 x i32> @var_ctlz_v4i32(<4 x i32> %a) {
330 ; NOLZCNT-LABEL: 'var_ctlz_v4i32'
331 ; 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)
332 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
334 ; SSE2-LABEL: 'var_ctlz_v4i32'
335 ; 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)
336 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
338 ; SSE42-LABEL: 'var_ctlz_v4i32'
339 ; 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)
340 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
342 ; AVX-LABEL: 'var_ctlz_v4i32'
343 ; 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)
344 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
346 ; AVX512-LABEL: 'var_ctlz_v4i32'
347 ; 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)
348 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
350 ; AVX512CD-LABEL: 'var_ctlz_v4i32'
351 ; 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)
352 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
354 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 0)
358 define <4 x i32> @var_ctlz_v4i32u(<4 x i32> %a) {
359 ; NOLZCNT-LABEL: 'var_ctlz_v4i32u'
360 ; 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)
361 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
363 ; SSE2-LABEL: 'var_ctlz_v4i32u'
364 ; 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)
365 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
367 ; SSE42-LABEL: 'var_ctlz_v4i32u'
368 ; 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)
369 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
371 ; AVX-LABEL: 'var_ctlz_v4i32u'
372 ; 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)
373 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
375 ; AVX512-LABEL: 'var_ctlz_v4i32u'
376 ; 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)
377 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
379 ; AVX512CD-LABEL: 'var_ctlz_v4i32u'
380 ; 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)
381 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <4 x i32> %ctlz
383 %ctlz = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 1)
387 define <8 x i32> @var_ctlz_v8i32(<8 x i32> %a) {
388 ; NOLZCNT-LABEL: 'var_ctlz_v8i32'
389 ; 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)
390 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
392 ; SSE2-LABEL: 'var_ctlz_v8i32'
393 ; 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)
394 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
396 ; SSE42-LABEL: 'var_ctlz_v8i32'
397 ; 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)
398 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
400 ; AVX1-LABEL: 'var_ctlz_v8i32'
401 ; 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)
402 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
404 ; AVX2-LABEL: 'var_ctlz_v8i32'
405 ; 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)
406 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
408 ; AVX512-LABEL: 'var_ctlz_v8i32'
409 ; 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)
410 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
412 ; AVX512CD-LABEL: 'var_ctlz_v8i32'
413 ; 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)
414 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
416 %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 0)
420 define <8 x i32> @var_ctlz_v8i32u(<8 x i32> %a) {
421 ; NOLZCNT-LABEL: 'var_ctlz_v8i32u'
422 ; 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)
423 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
425 ; SSE2-LABEL: 'var_ctlz_v8i32u'
426 ; 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)
427 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
429 ; SSE42-LABEL: 'var_ctlz_v8i32u'
430 ; 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)
431 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
433 ; AVX1-LABEL: 'var_ctlz_v8i32u'
434 ; 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)
435 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
437 ; AVX2-LABEL: 'var_ctlz_v8i32u'
438 ; 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)
439 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
441 ; AVX512-LABEL: 'var_ctlz_v8i32u'
442 ; 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)
443 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
445 ; AVX512CD-LABEL: 'var_ctlz_v8i32u'
446 ; 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)
447 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i32> %ctlz
449 %ctlz = call <8 x i32> @llvm.ctlz.v8i32(<8 x i32> %a, i1 1)
453 define <16 x i32> @var_ctlz_v16i32(<16 x i32> %a) {
454 ; NOLZCNT-LABEL: 'var_ctlz_v16i32'
455 ; 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)
456 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
458 ; SSE2-LABEL: 'var_ctlz_v16i32'
459 ; 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)
460 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
462 ; SSE42-LABEL: 'var_ctlz_v16i32'
463 ; 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)
464 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
466 ; AVX1-LABEL: 'var_ctlz_v16i32'
467 ; 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)
468 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
470 ; AVX2-LABEL: 'var_ctlz_v16i32'
471 ; 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)
472 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
474 ; AVX512F-LABEL: 'var_ctlz_v16i32'
475 ; 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)
476 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
478 ; AVX512BW-LABEL: 'var_ctlz_v16i32'
479 ; 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)
480 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
482 ; AVX512CD-LABEL: 'var_ctlz_v16i32'
483 ; 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)
484 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
486 %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 0)
490 define <16 x i32> @var_ctlz_v16i32u(<16 x i32> %a) {
491 ; NOLZCNT-LABEL: 'var_ctlz_v16i32u'
492 ; 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)
493 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
495 ; SSE2-LABEL: 'var_ctlz_v16i32u'
496 ; 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)
497 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
499 ; SSE42-LABEL: 'var_ctlz_v16i32u'
500 ; 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)
501 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
503 ; AVX1-LABEL: 'var_ctlz_v16i32u'
504 ; 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)
505 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
507 ; AVX2-LABEL: 'var_ctlz_v16i32u'
508 ; 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)
509 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
511 ; AVX512F-LABEL: 'var_ctlz_v16i32u'
512 ; 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)
513 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
515 ; AVX512BW-LABEL: 'var_ctlz_v16i32u'
516 ; 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)
517 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
519 ; AVX512CD-LABEL: 'var_ctlz_v16i32u'
520 ; 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)
521 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i32> %ctlz
523 %ctlz = call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %a, i1 1)
527 define <8 x i16> @var_ctlz_v8i16(<8 x i16> %a) {
528 ; NOLZCNT-LABEL: 'var_ctlz_v8i16'
529 ; 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)
530 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
532 ; SSE2-LABEL: 'var_ctlz_v8i16'
533 ; 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)
534 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
536 ; SSE42-LABEL: 'var_ctlz_v8i16'
537 ; 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)
538 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
540 ; AVX-LABEL: 'var_ctlz_v8i16'
541 ; 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)
542 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
544 ; AVX512-LABEL: 'var_ctlz_v8i16'
545 ; 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)
546 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
548 ; AVX512CD-LABEL: 'var_ctlz_v8i16'
549 ; 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)
550 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
552 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 0)
556 define <8 x i16> @var_ctlz_v8i16u(<8 x i16> %a) {
557 ; NOLZCNT-LABEL: 'var_ctlz_v8i16u'
558 ; 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)
559 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
561 ; SSE2-LABEL: 'var_ctlz_v8i16u'
562 ; 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)
563 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
565 ; SSE42-LABEL: 'var_ctlz_v8i16u'
566 ; 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)
567 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
569 ; AVX-LABEL: 'var_ctlz_v8i16u'
570 ; 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)
571 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
573 ; AVX512-LABEL: 'var_ctlz_v8i16u'
574 ; 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)
575 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
577 ; AVX512CD-LABEL: 'var_ctlz_v8i16u'
578 ; 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)
579 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <8 x i16> %ctlz
581 %ctlz = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 1)
585 define <16 x i16> @var_ctlz_v16i16(<16 x i16> %a) {
586 ; NOLZCNT-LABEL: 'var_ctlz_v16i16'
587 ; 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)
588 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
590 ; SSE2-LABEL: 'var_ctlz_v16i16'
591 ; 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)
592 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
594 ; SSE42-LABEL: 'var_ctlz_v16i16'
595 ; 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)
596 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
598 ; AVX1-LABEL: 'var_ctlz_v16i16'
599 ; 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)
600 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
602 ; AVX2-LABEL: 'var_ctlz_v16i16'
603 ; 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)
604 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
606 ; AVX512-LABEL: 'var_ctlz_v16i16'
607 ; 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)
608 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
610 ; AVX512CD-LABEL: 'var_ctlz_v16i16'
611 ; 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)
612 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
614 %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 0)
618 define <16 x i16> @var_ctlz_v16i16u(<16 x i16> %a) {
619 ; NOLZCNT-LABEL: 'var_ctlz_v16i16u'
620 ; 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)
621 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
623 ; SSE2-LABEL: 'var_ctlz_v16i16u'
624 ; 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)
625 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
627 ; SSE42-LABEL: 'var_ctlz_v16i16u'
628 ; 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)
629 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
631 ; AVX1-LABEL: 'var_ctlz_v16i16u'
632 ; 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)
633 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
635 ; AVX2-LABEL: 'var_ctlz_v16i16u'
636 ; 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)
637 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
639 ; AVX512-LABEL: 'var_ctlz_v16i16u'
640 ; 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)
641 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
643 ; AVX512CD-LABEL: 'var_ctlz_v16i16u'
644 ; 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)
645 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i16> %ctlz
647 %ctlz = call <16 x i16> @llvm.ctlz.v16i16(<16 x i16> %a, i1 1)
651 define <32 x i16> @var_ctlz_v32i16(<32 x i16> %a) {
652 ; NOLZCNT-LABEL: 'var_ctlz_v32i16'
653 ; 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)
654 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
656 ; SSE2-LABEL: 'var_ctlz_v32i16'
657 ; 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)
658 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
660 ; SSE42-LABEL: 'var_ctlz_v32i16'
661 ; 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)
662 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
664 ; AVX1-LABEL: 'var_ctlz_v32i16'
665 ; 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)
666 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
668 ; AVX2-LABEL: 'var_ctlz_v32i16'
669 ; 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)
670 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
672 ; AVX512F-LABEL: 'var_ctlz_v32i16'
673 ; 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)
674 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
676 ; AVX512BW-LABEL: 'var_ctlz_v32i16'
677 ; 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)
678 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
680 ; AVX512CD-LABEL: 'var_ctlz_v32i16'
681 ; 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)
682 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
684 %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 0)
688 define <32 x i16> @var_ctlz_v32i16u(<32 x i16> %a) {
689 ; NOLZCNT-LABEL: 'var_ctlz_v32i16u'
690 ; 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)
691 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
693 ; SSE2-LABEL: 'var_ctlz_v32i16u'
694 ; 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)
695 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
697 ; SSE42-LABEL: 'var_ctlz_v32i16u'
698 ; 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)
699 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
701 ; AVX1-LABEL: 'var_ctlz_v32i16u'
702 ; 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)
703 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
705 ; AVX2-LABEL: 'var_ctlz_v32i16u'
706 ; 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)
707 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
709 ; AVX512F-LABEL: 'var_ctlz_v32i16u'
710 ; 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)
711 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
713 ; AVX512BW-LABEL: 'var_ctlz_v32i16u'
714 ; 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)
715 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
717 ; AVX512CD-LABEL: 'var_ctlz_v32i16u'
718 ; 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)
719 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i16> %ctlz
721 %ctlz = call <32 x i16> @llvm.ctlz.v32i16(<32 x i16> %a, i1 1)
725 define <16 x i8> @var_ctlz_v16i8(<16 x i8> %a) {
726 ; NOLZCNT-LABEL: 'var_ctlz_v16i8'
727 ; 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)
728 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
730 ; SSE2-LABEL: 'var_ctlz_v16i8'
731 ; 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)
732 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
734 ; SSE42-LABEL: 'var_ctlz_v16i8'
735 ; 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)
736 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
738 ; AVX-LABEL: 'var_ctlz_v16i8'
739 ; 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)
740 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
742 ; AVX512-LABEL: 'var_ctlz_v16i8'
743 ; 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)
744 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
746 ; AVX512CD-LABEL: 'var_ctlz_v16i8'
747 ; 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)
748 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
750 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 0)
754 define <16 x i8> @var_ctlz_v16i8u(<16 x i8> %a) {
755 ; NOLZCNT-LABEL: 'var_ctlz_v16i8u'
756 ; 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)
757 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
759 ; SSE2-LABEL: 'var_ctlz_v16i8u'
760 ; 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)
761 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
763 ; SSE42-LABEL: 'var_ctlz_v16i8u'
764 ; 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)
765 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
767 ; AVX-LABEL: 'var_ctlz_v16i8u'
768 ; 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)
769 ; AVX-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
771 ; AVX512-LABEL: 'var_ctlz_v16i8u'
772 ; 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)
773 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
775 ; AVX512CD-LABEL: 'var_ctlz_v16i8u'
776 ; 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)
777 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <16 x i8> %ctlz
779 %ctlz = call <16 x i8> @llvm.ctlz.v16i8(<16 x i8> %a, i1 1)
783 define <32 x i8> @var_ctlz_v32i8(<32 x i8> %a) {
784 ; NOLZCNT-LABEL: 'var_ctlz_v32i8'
785 ; 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)
786 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
788 ; SSE2-LABEL: 'var_ctlz_v32i8'
789 ; 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)
790 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
792 ; SSE42-LABEL: 'var_ctlz_v32i8'
793 ; 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)
794 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
796 ; AVX1-LABEL: 'var_ctlz_v32i8'
797 ; 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)
798 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
800 ; AVX2-LABEL: 'var_ctlz_v32i8'
801 ; 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)
802 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
804 ; AVX512-LABEL: 'var_ctlz_v32i8'
805 ; 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)
806 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
808 ; AVX512CD-LABEL: 'var_ctlz_v32i8'
809 ; 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)
810 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
812 %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 0)
816 define <32 x i8> @var_ctlz_v32i8u(<32 x i8> %a) {
817 ; NOLZCNT-LABEL: 'var_ctlz_v32i8u'
818 ; 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)
819 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
821 ; SSE2-LABEL: 'var_ctlz_v32i8u'
822 ; 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)
823 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
825 ; SSE42-LABEL: 'var_ctlz_v32i8u'
826 ; 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)
827 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
829 ; AVX1-LABEL: 'var_ctlz_v32i8u'
830 ; 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)
831 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
833 ; AVX2-LABEL: 'var_ctlz_v32i8u'
834 ; 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)
835 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
837 ; AVX512-LABEL: 'var_ctlz_v32i8u'
838 ; 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)
839 ; AVX512-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
841 ; AVX512CD-LABEL: 'var_ctlz_v32i8u'
842 ; 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)
843 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <32 x i8> %ctlz
845 %ctlz = call <32 x i8> @llvm.ctlz.v32i8(<32 x i8> %a, i1 1)
849 define <64 x i8> @var_ctlz_v64i8(<64 x i8> %a) {
850 ; NOLZCNT-LABEL: 'var_ctlz_v64i8'
851 ; 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)
852 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
854 ; SSE2-LABEL: 'var_ctlz_v64i8'
855 ; 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)
856 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
858 ; SSE42-LABEL: 'var_ctlz_v64i8'
859 ; 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)
860 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
862 ; AVX1-LABEL: 'var_ctlz_v64i8'
863 ; 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)
864 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
866 ; AVX2-LABEL: 'var_ctlz_v64i8'
867 ; 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)
868 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
870 ; AVX512F-LABEL: 'var_ctlz_v64i8'
871 ; 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)
872 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
874 ; AVX512BW-LABEL: 'var_ctlz_v64i8'
875 ; 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)
876 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
878 ; AVX512CD-LABEL: 'var_ctlz_v64i8'
879 ; 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)
880 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
882 %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 0)
886 define <64 x i8> @var_ctlz_v64i8u(<64 x i8> %a) {
887 ; NOLZCNT-LABEL: 'var_ctlz_v64i8u'
888 ; 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)
889 ; NOLZCNT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
891 ; SSE2-LABEL: 'var_ctlz_v64i8u'
892 ; 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)
893 ; SSE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
895 ; SSE42-LABEL: 'var_ctlz_v64i8u'
896 ; 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)
897 ; SSE42-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
899 ; AVX1-LABEL: 'var_ctlz_v64i8u'
900 ; 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)
901 ; AVX1-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
903 ; AVX2-LABEL: 'var_ctlz_v64i8u'
904 ; 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)
905 ; AVX2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
907 ; AVX512F-LABEL: 'var_ctlz_v64i8u'
908 ; 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)
909 ; AVX512F-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
911 ; AVX512BW-LABEL: 'var_ctlz_v64i8u'
912 ; 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)
913 ; AVX512BW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
915 ; AVX512CD-LABEL: 'var_ctlz_v64i8u'
916 ; 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)
917 ; AVX512CD-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <64 x i8> %ctlz
919 %ctlz = call <64 x i8> @llvm.ctlz.v64i8(<64 x i8> %a, i1 1)