1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=AVX512F
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bw | FileCheck %s --check-prefix=AVX512BW
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vpopcntdq | FileCheck %s --check-prefixes=AVX512VPOPCNTDQ,AVX512VPOPCNTDQ-NOBW
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512vpopcntdq,+avx512bw | FileCheck %s --check-prefixes=AVX512VPOPCNTDQ,AVX512VPOPCNTDQ-BW
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512bitalg | FileCheck %s --check-prefix=BITALG
9 define <64 x i8> @ugt_1_v64i8(<64 x i8> %0) {
10 ; AVX512F-LABEL: ugt_1_v64i8:
12 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
14 ; AVX512F-NEXT: vpaddb %ymm2, %ymm1, %ymm3
15 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
16 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
17 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
18 ; AVX512F-NEXT: vpaddb %ymm2, %ymm0, %ymm2
19 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
20 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
21 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
22 ; AVX512F-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
25 ; AVX512BW-LABEL: ugt_1_v64i8:
27 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
28 ; AVX512BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
29 ; AVX512BW-NEXT: vptestmb %zmm1, %zmm0, %k0
30 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
33 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_1_v64i8:
34 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
35 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
36 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
37 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm1, %ymm3
38 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
39 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
40 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
41 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm0, %ymm2
42 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
43 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
44 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
45 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
46 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
48 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_1_v64i8:
49 ; AVX512VPOPCNTDQ-BW: # %bb.0:
50 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
51 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
52 ; AVX512VPOPCNTDQ-BW-NEXT: vptestmb %zmm1, %zmm0, %k0
53 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
54 ; AVX512VPOPCNTDQ-BW-NEXT: retq
56 ; BITALG-LABEL: ugt_1_v64i8:
58 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
59 ; BITALG-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
60 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
62 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
63 %3 = icmp ugt <64 x i8> %2, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
64 %4 = sext <64 x i1> %3 to <64 x i8>
68 define <64 x i8> @ult_2_v64i8(<64 x i8> %0) {
69 ; AVX512F-LABEL: ult_2_v64i8:
71 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
72 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
73 ; AVX512F-NEXT: vpaddb %ymm2, %ymm1, %ymm3
74 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
75 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
76 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
77 ; AVX512F-NEXT: vpaddb %ymm2, %ymm0, %ymm2
78 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
79 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
80 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
83 ; AVX512BW-LABEL: ult_2_v64i8:
85 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
86 ; AVX512BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
87 ; AVX512BW-NEXT: vptestnmb %zmm1, %zmm0, %k0
88 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
91 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_2_v64i8:
92 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
93 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
94 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
95 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm1, %ymm3
96 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
97 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
98 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm1, %ymm1
99 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm0, %ymm2
100 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
101 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
102 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
103 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
105 ; AVX512VPOPCNTDQ-BW-LABEL: ult_2_v64i8:
106 ; AVX512VPOPCNTDQ-BW: # %bb.0:
107 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
108 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm1, %zmm0, %zmm1
109 ; AVX512VPOPCNTDQ-BW-NEXT: vptestnmb %zmm1, %zmm0, %k0
110 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
111 ; AVX512VPOPCNTDQ-BW-NEXT: retq
113 ; BITALG-LABEL: ult_2_v64i8:
115 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
116 ; BITALG-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
117 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
119 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
120 %3 = icmp ult <64 x i8> %2, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
121 %4 = sext <64 x i1> %3 to <64 x i8>
125 define <64 x i8> @ugt_2_v64i8(<64 x i8> %0) {
126 ; AVX512F-LABEL: ugt_2_v64i8:
128 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
129 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
130 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
131 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
132 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
133 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
134 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
135 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
136 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
137 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
138 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
139 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
140 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
141 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
142 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
143 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
144 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
145 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
146 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
147 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
148 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
151 ; AVX512BW-LABEL: ugt_2_v64i8:
153 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
154 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
155 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
156 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
157 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
158 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
159 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
160 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
161 ; AVX512BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
162 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
163 ; AVX512BW-NEXT: retq
165 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_2_v64i8:
166 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
167 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
168 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
169 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
170 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
171 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
172 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
173 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
174 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
175 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
176 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
177 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
178 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
179 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
180 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
181 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
182 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
183 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
184 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
185 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
186 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
187 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
188 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
190 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_2_v64i8:
191 ; AVX512VPOPCNTDQ-BW: # %bb.0:
192 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
193 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
194 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
195 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
196 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
197 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
198 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
199 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
200 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
201 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
202 ; AVX512VPOPCNTDQ-BW-NEXT: retq
204 ; BITALG-LABEL: ugt_2_v64i8:
206 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
207 ; BITALG-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
208 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
210 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
211 %3 = icmp ugt <64 x i8> %2, <i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2, i8 2>
212 %4 = sext <64 x i1> %3 to <64 x i8>
216 define <64 x i8> @ult_3_v64i8(<64 x i8> %0) {
217 ; AVX512F-LABEL: ult_3_v64i8:
219 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
220 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
221 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
222 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
223 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
224 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
225 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
226 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
227 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
228 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
229 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
230 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
231 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
232 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
233 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
234 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
235 ; AVX512F-NEXT: vpminub %ymm1, %ymm0, %ymm3
236 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
237 ; AVX512F-NEXT: vpminub %ymm1, %ymm2, %ymm1
238 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
239 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
242 ; AVX512BW-LABEL: ult_3_v64i8:
244 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
245 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
246 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
247 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
248 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
249 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
250 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
251 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
252 ; AVX512BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
253 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
254 ; AVX512BW-NEXT: retq
256 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_3_v64i8:
257 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
258 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
259 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
260 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
261 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
262 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
263 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
264 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
265 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
266 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
267 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
268 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
269 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
270 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
271 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
272 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
273 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
274 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm0, %ymm3
275 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
276 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm2, %ymm1
277 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
278 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
279 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
281 ; AVX512VPOPCNTDQ-BW-LABEL: ult_3_v64i8:
282 ; AVX512VPOPCNTDQ-BW: # %bb.0:
283 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
284 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
285 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
286 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
287 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
288 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
289 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
290 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
291 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
292 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
293 ; AVX512VPOPCNTDQ-BW-NEXT: retq
295 ; BITALG-LABEL: ult_3_v64i8:
297 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
298 ; BITALG-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
299 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
301 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
302 %3 = icmp ult <64 x i8> %2, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
303 %4 = sext <64 x i1> %3 to <64 x i8>
307 define <64 x i8> @ugt_3_v64i8(<64 x i8> %0) {
308 ; AVX512F-LABEL: ugt_3_v64i8:
310 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
311 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
312 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
313 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
314 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
315 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
316 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
317 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
318 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
319 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
320 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
321 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
322 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
323 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
324 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
325 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
326 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
327 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
328 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
329 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
330 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
333 ; AVX512BW-LABEL: ugt_3_v64i8:
335 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
336 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
337 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
338 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
339 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
340 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
341 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
342 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
343 ; AVX512BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
344 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
345 ; AVX512BW-NEXT: retq
347 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_3_v64i8:
348 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
349 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
350 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
351 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
352 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
353 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
354 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
355 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
356 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
357 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
358 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
359 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
360 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
361 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
362 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
363 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
364 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
365 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
366 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
367 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
368 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
369 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
370 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
372 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_3_v64i8:
373 ; AVX512VPOPCNTDQ-BW: # %bb.0:
374 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
375 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
376 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
377 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
378 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
379 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
380 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
381 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
382 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
383 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
384 ; AVX512VPOPCNTDQ-BW-NEXT: retq
386 ; BITALG-LABEL: ugt_3_v64i8:
388 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
389 ; BITALG-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
390 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
392 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
393 %3 = icmp ugt <64 x i8> %2, <i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3, i8 3>
394 %4 = sext <64 x i1> %3 to <64 x i8>
398 define <64 x i8> @ult_4_v64i8(<64 x i8> %0) {
399 ; AVX512F-LABEL: ult_4_v64i8:
401 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
402 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
403 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
404 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
405 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
406 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
407 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
408 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
409 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
410 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
411 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
412 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
413 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
414 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
415 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
416 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
417 ; AVX512F-NEXT: vpminub %ymm1, %ymm0, %ymm3
418 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
419 ; AVX512F-NEXT: vpminub %ymm1, %ymm2, %ymm1
420 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
421 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
424 ; AVX512BW-LABEL: ult_4_v64i8:
426 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
427 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
428 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
429 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
430 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
431 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
432 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
433 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
434 ; AVX512BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
435 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
436 ; AVX512BW-NEXT: retq
438 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_4_v64i8:
439 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
440 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
441 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
442 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
443 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
444 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
445 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
446 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
447 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
448 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
449 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
450 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
451 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
452 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
453 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
454 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
455 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
456 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm0, %ymm3
457 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
458 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm2, %ymm1
459 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
460 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
461 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
463 ; AVX512VPOPCNTDQ-BW-LABEL: ult_4_v64i8:
464 ; AVX512VPOPCNTDQ-BW: # %bb.0:
465 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
466 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
467 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
468 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
469 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
470 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
471 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
472 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
473 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
474 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
475 ; AVX512VPOPCNTDQ-BW-NEXT: retq
477 ; BITALG-LABEL: ult_4_v64i8:
479 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
480 ; BITALG-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
481 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
483 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
484 %3 = icmp ult <64 x i8> %2, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
485 %4 = sext <64 x i1> %3 to <64 x i8>
489 define <64 x i8> @ugt_4_v64i8(<64 x i8> %0) {
490 ; AVX512F-LABEL: ugt_4_v64i8:
492 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
493 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
494 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
495 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
496 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
497 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
498 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
499 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
500 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
501 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
502 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
503 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
504 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
505 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
506 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
507 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
508 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
509 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
510 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
511 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
512 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
515 ; AVX512BW-LABEL: ugt_4_v64i8:
517 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
518 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
519 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
520 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
521 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
522 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
523 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
524 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
525 ; AVX512BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
526 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
527 ; AVX512BW-NEXT: retq
529 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_4_v64i8:
530 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
531 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
532 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
533 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
534 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
535 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
536 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
537 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
538 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
539 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
540 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
541 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
542 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
543 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
544 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
545 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
546 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
547 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
548 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
549 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
550 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
551 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
552 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
554 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_4_v64i8:
555 ; AVX512VPOPCNTDQ-BW: # %bb.0:
556 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
557 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
558 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
559 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
560 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
561 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
562 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
563 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
564 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
565 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
566 ; AVX512VPOPCNTDQ-BW-NEXT: retq
568 ; BITALG-LABEL: ugt_4_v64i8:
570 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
571 ; BITALG-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
572 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
574 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
575 %3 = icmp ugt <64 x i8> %2, <i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4, i8 4>
576 %4 = sext <64 x i1> %3 to <64 x i8>
580 define <64 x i8> @ult_5_v64i8(<64 x i8> %0) {
581 ; AVX512F-LABEL: ult_5_v64i8:
583 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
584 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
585 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
586 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
587 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
588 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
589 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
590 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
591 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
592 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
593 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
594 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
595 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
596 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
597 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
598 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
599 ; AVX512F-NEXT: vpminub %ymm1, %ymm0, %ymm3
600 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
601 ; AVX512F-NEXT: vpminub %ymm1, %ymm2, %ymm1
602 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
603 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
606 ; AVX512BW-LABEL: ult_5_v64i8:
608 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
609 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
610 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
611 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
612 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
613 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
614 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
615 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
616 ; AVX512BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
617 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
618 ; AVX512BW-NEXT: retq
620 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_5_v64i8:
621 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
622 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
623 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
624 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
625 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
626 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
627 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
628 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
629 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
630 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
631 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
632 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
633 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
634 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
635 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
636 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
637 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
638 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm0, %ymm3
639 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
640 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm2, %ymm1
641 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
642 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
643 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
645 ; AVX512VPOPCNTDQ-BW-LABEL: ult_5_v64i8:
646 ; AVX512VPOPCNTDQ-BW: # %bb.0:
647 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
648 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
649 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
650 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
651 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
652 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
653 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
654 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
655 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
656 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
657 ; AVX512VPOPCNTDQ-BW-NEXT: retq
659 ; BITALG-LABEL: ult_5_v64i8:
661 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
662 ; BITALG-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
663 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
665 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
666 %3 = icmp ult <64 x i8> %2, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
667 %4 = sext <64 x i1> %3 to <64 x i8>
671 define <64 x i8> @ugt_5_v64i8(<64 x i8> %0) {
672 ; AVX512F-LABEL: ugt_5_v64i8:
674 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
675 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
676 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
677 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
678 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
679 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
680 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
681 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
682 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
683 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
684 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
685 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
686 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
687 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
688 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
689 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
690 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
691 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
692 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
693 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
694 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
697 ; AVX512BW-LABEL: ugt_5_v64i8:
699 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
700 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
701 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
702 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
703 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
704 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
705 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
706 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
707 ; AVX512BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
708 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
709 ; AVX512BW-NEXT: retq
711 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_5_v64i8:
712 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
713 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
714 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
715 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
716 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
717 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
718 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
719 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
720 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
721 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
722 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
723 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
724 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
725 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
726 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
727 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
728 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
729 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
730 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
731 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
732 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
733 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
734 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
736 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_5_v64i8:
737 ; AVX512VPOPCNTDQ-BW: # %bb.0:
738 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
739 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
740 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
741 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
742 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
743 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
744 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
745 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
746 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
747 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
748 ; AVX512VPOPCNTDQ-BW-NEXT: retq
750 ; BITALG-LABEL: ugt_5_v64i8:
752 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
753 ; BITALG-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
754 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
756 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
757 %3 = icmp ugt <64 x i8> %2, <i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5, i8 5>
758 %4 = sext <64 x i1> %3 to <64 x i8>
762 define <64 x i8> @ult_6_v64i8(<64 x i8> %0) {
763 ; AVX512F-LABEL: ult_6_v64i8:
765 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
766 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
767 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
768 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
769 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
770 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
771 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
772 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
773 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
774 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
775 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
776 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
777 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
778 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
779 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
780 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
781 ; AVX512F-NEXT: vpminub %ymm1, %ymm0, %ymm3
782 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
783 ; AVX512F-NEXT: vpminub %ymm1, %ymm2, %ymm1
784 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
785 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
788 ; AVX512BW-LABEL: ult_6_v64i8:
790 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
791 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
792 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
793 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
794 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
795 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
796 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
797 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
798 ; AVX512BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
799 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
800 ; AVX512BW-NEXT: retq
802 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_6_v64i8:
803 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
804 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
805 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
806 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
807 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
808 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
809 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
810 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
811 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
812 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
813 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
814 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
815 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
816 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
817 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
818 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
819 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
820 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm0, %ymm3
821 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
822 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm2, %ymm1
823 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
824 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
825 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
827 ; AVX512VPOPCNTDQ-BW-LABEL: ult_6_v64i8:
828 ; AVX512VPOPCNTDQ-BW: # %bb.0:
829 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
830 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
831 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
832 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
833 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
834 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
835 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
836 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
837 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
838 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
839 ; AVX512VPOPCNTDQ-BW-NEXT: retq
841 ; BITALG-LABEL: ult_6_v64i8:
843 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
844 ; BITALG-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
845 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
847 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
848 %3 = icmp ult <64 x i8> %2, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
849 %4 = sext <64 x i1> %3 to <64 x i8>
853 define <64 x i8> @ugt_6_v64i8(<64 x i8> %0) {
854 ; AVX512F-LABEL: ugt_6_v64i8:
856 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
857 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
858 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
859 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
860 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
861 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
862 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
863 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
864 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
865 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
866 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
867 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
868 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
869 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
870 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
871 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
872 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
873 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
874 ; AVX512F-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
875 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
876 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
879 ; AVX512BW-LABEL: ugt_6_v64i8:
881 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
882 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
883 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
884 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
885 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
886 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
887 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
888 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
889 ; AVX512BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
890 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
891 ; AVX512BW-NEXT: retq
893 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_6_v64i8:
894 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
895 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
896 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
897 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
898 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
899 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
900 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
901 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
902 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
903 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
904 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
905 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
906 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
907 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
908 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
909 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
910 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
911 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm0, %ymm3
912 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
913 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmaxub %ymm1, %ymm2, %ymm1
914 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
915 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
916 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
918 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_6_v64i8:
919 ; AVX512VPOPCNTDQ-BW: # %bb.0:
920 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
921 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
922 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
923 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
924 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
925 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
926 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
927 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
928 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
929 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
930 ; AVX512VPOPCNTDQ-BW-NEXT: retq
932 ; BITALG-LABEL: ugt_6_v64i8:
934 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
935 ; BITALG-NEXT: vpcmpnleub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
936 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
938 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
939 %3 = icmp ugt <64 x i8> %2, <i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6, i8 6>
940 %4 = sext <64 x i1> %3 to <64 x i8>
944 define <64 x i8> @ult_7_v64i8(<64 x i8> %0) {
945 ; AVX512F-LABEL: ult_7_v64i8:
947 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
948 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
949 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
950 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
951 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
952 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
953 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
954 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
955 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
956 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
957 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
958 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
959 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
960 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
961 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
962 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
963 ; AVX512F-NEXT: vpminub %ymm1, %ymm0, %ymm3
964 ; AVX512F-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
965 ; AVX512F-NEXT: vpminub %ymm1, %ymm2, %ymm1
966 ; AVX512F-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
967 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
970 ; AVX512BW-LABEL: ult_7_v64i8:
972 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
973 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
974 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
975 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
976 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
977 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
978 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
979 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
980 ; AVX512BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
981 ; AVX512BW-NEXT: vpmovm2b %k0, %zmm0
982 ; AVX512BW-NEXT: retq
984 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_7_v64i8:
985 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
986 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
987 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm2
988 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
989 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm2, %ymm3, %ymm2
990 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm4
991 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm4, %ymm4
992 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
993 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm2, %ymm4, %ymm2
994 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
995 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm4
996 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm4, %ymm3, %ymm4
997 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpsrlw $4, %ymm0, %ymm0
998 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm1, %ymm0, %ymm0
999 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1000 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1001 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1002 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm0, %ymm3
1003 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm3, %ymm0, %ymm0
1004 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpminub %ymm1, %ymm2, %ymm1
1005 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqb %ymm1, %ymm2, %ymm1
1006 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1007 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1009 ; AVX512VPOPCNTDQ-BW-LABEL: ult_7_v64i8:
1010 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1011 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1012 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1013 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1014 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1015 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1016 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1017 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1018 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1019 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1020 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2b %k0, %zmm0
1021 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1023 ; BITALG-LABEL: ult_7_v64i8:
1025 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
1026 ; BITALG-NEXT: vpcmpltub {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1027 ; BITALG-NEXT: vpmovm2b %k0, %zmm0
1029 %2 = tail call <64 x i8> @llvm.ctpop.v64i8(<64 x i8> %0)
1030 %3 = icmp ult <64 x i8> %2, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
1031 %4 = sext <64 x i1> %3 to <64 x i8>
1035 define <32 x i16> @ugt_1_v32i16(<32 x i16> %0) {
1036 ; AVX512F-LABEL: ugt_1_v32i16:
1038 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1039 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1040 ; AVX512F-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1041 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
1042 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
1043 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1044 ; AVX512F-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1045 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
1046 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1047 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1048 ; AVX512F-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
1049 ; AVX512F-NEXT: retq
1051 ; AVX512BW-LABEL: ugt_1_v32i16:
1052 ; AVX512BW: # %bb.0:
1053 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1054 ; AVX512BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1055 ; AVX512BW-NEXT: vptestmw %zmm1, %zmm0, %k0
1056 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1057 ; AVX512BW-NEXT: retq
1059 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_1_v32i16:
1060 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1061 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1062 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1063 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1064 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
1065 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
1066 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1067 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1068 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
1069 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1070 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1071 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpternlogq $15, %zmm0, %zmm0, %zmm0
1072 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1074 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_1_v32i16:
1075 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1076 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1077 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1078 ; AVX512VPOPCNTDQ-BW-NEXT: vptestmw %zmm1, %zmm0, %k0
1079 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1080 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1082 ; BITALG-LABEL: ugt_1_v32i16:
1084 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1085 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1086 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1088 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1089 %3 = icmp ugt <32 x i16> %2, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>
1090 %4 = sext <32 x i1> %3 to <32 x i16>
1094 define <32 x i16> @ult_2_v32i16(<32 x i16> %0) {
1095 ; AVX512F-LABEL: ult_2_v32i16:
1097 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1098 ; AVX512F-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1099 ; AVX512F-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1100 ; AVX512F-NEXT: vpand %ymm3, %ymm1, %ymm1
1101 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
1102 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1103 ; AVX512F-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1104 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
1105 ; AVX512F-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1106 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1107 ; AVX512F-NEXT: retq
1109 ; AVX512BW-LABEL: ult_2_v32i16:
1110 ; AVX512BW: # %bb.0:
1111 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1112 ; AVX512BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1113 ; AVX512BW-NEXT: vptestnmw %zmm1, %zmm0, %k0
1114 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1115 ; AVX512BW-NEXT: retq
1117 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_2_v32i16:
1118 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1119 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm1
1120 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqd %ymm2, %ymm2, %ymm2
1121 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm1, %ymm3
1122 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm3, %ymm1, %ymm1
1123 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpxor %xmm3, %xmm3, %xmm3
1124 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm1, %ymm1
1125 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpaddw %ymm2, %ymm0, %ymm2
1126 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpand %ymm2, %ymm0, %ymm0
1127 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpeqw %ymm3, %ymm0, %ymm0
1128 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1129 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1131 ; AVX512VPOPCNTDQ-BW-LABEL: ult_2_v32i16:
1132 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1133 ; AVX512VPOPCNTDQ-BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
1134 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddw %zmm1, %zmm0, %zmm1
1135 ; AVX512VPOPCNTDQ-BW-NEXT: vptestnmw %zmm1, %zmm0, %k0
1136 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1137 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1139 ; BITALG-LABEL: ult_2_v32i16:
1141 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1142 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1143 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1145 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1146 %3 = icmp ult <32 x i16> %2, <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
1147 %4 = sext <32 x i1> %3 to <32 x i16>
1151 define <32 x i16> @ugt_2_v32i16(<32 x i16> %0) {
1152 ; AVX512F-LABEL: ugt_2_v32i16:
1154 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1155 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1156 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1157 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1158 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1159 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1160 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1161 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1162 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1163 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1164 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1165 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1166 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1167 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1168 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1169 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1170 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1171 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1172 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1173 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1174 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1175 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
1176 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1177 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1178 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1179 ; AVX512F-NEXT: retq
1181 ; AVX512BW-LABEL: ugt_2_v32i16:
1182 ; AVX512BW: # %bb.0:
1183 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1184 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1185 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1186 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1187 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1188 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1189 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1190 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1191 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1192 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1193 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1194 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1195 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1196 ; AVX512BW-NEXT: retq
1198 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_2_v32i16:
1199 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1200 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1201 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1202 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1203 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1204 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1205 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1206 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1207 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
1208 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1209 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1210 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1211 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1213 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_2_v32i16:
1214 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1215 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1216 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1217 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1218 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1219 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1220 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1221 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1222 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1223 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1224 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1225 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1226 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1227 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1228 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1230 ; BITALG-LABEL: ugt_2_v32i16:
1232 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1233 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1234 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1236 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1237 %3 = icmp ugt <32 x i16> %2, <i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2, i16 2>
1238 %4 = sext <32 x i1> %3 to <32 x i16>
1242 define <32 x i16> @ult_3_v32i16(<32 x i16> %0) {
1243 ; AVX512F-LABEL: ult_3_v32i16:
1245 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1246 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1247 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1248 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1249 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1250 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1251 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1252 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1253 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1254 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1255 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1256 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1257 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1258 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1259 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1260 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1261 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1262 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1263 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1264 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1265 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1266 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1267 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1268 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1269 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1270 ; AVX512F-NEXT: retq
1272 ; AVX512BW-LABEL: ult_3_v32i16:
1273 ; AVX512BW: # %bb.0:
1274 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1275 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1276 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1277 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1278 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1279 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1280 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1281 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1282 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1283 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1284 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1285 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1286 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1287 ; AVX512BW-NEXT: retq
1289 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_3_v32i16:
1290 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1291 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1292 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1293 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1294 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1295 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1296 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1297 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1298 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1299 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1300 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1301 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1302 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1304 ; AVX512VPOPCNTDQ-BW-LABEL: ult_3_v32i16:
1305 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1306 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1307 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1308 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1309 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1310 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1311 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1312 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1313 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1314 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1315 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1316 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1317 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1318 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1319 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1321 ; BITALG-LABEL: ult_3_v32i16:
1323 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1324 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1325 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1327 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1328 %3 = icmp ult <32 x i16> %2, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1329 %4 = sext <32 x i1> %3 to <32 x i16>
1333 define <32 x i16> @ugt_3_v32i16(<32 x i16> %0) {
1334 ; AVX512F-LABEL: ugt_3_v32i16:
1336 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1337 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1338 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1339 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1340 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1341 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1342 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1343 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1344 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1345 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1346 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1347 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1348 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1349 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1350 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1351 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1352 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1353 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1354 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1355 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1356 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1357 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1358 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1359 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1360 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1361 ; AVX512F-NEXT: retq
1363 ; AVX512BW-LABEL: ugt_3_v32i16:
1364 ; AVX512BW: # %bb.0:
1365 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1366 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1367 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1368 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1369 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1370 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1371 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1372 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1373 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1374 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1375 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1376 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1377 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1378 ; AVX512BW-NEXT: retq
1380 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_3_v32i16:
1381 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1382 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1383 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1384 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1385 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1386 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1387 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1388 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1389 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
1390 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1391 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1392 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1393 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1395 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_3_v32i16:
1396 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1397 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1398 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1399 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1400 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1401 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1402 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1403 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1404 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1405 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1406 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1407 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1408 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1409 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1410 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1412 ; BITALG-LABEL: ugt_3_v32i16:
1414 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1415 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1416 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1418 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1419 %3 = icmp ugt <32 x i16> %2, <i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3, i16 3>
1420 %4 = sext <32 x i1> %3 to <32 x i16>
1424 define <32 x i16> @ult_4_v32i16(<32 x i16> %0) {
1425 ; AVX512F-LABEL: ult_4_v32i16:
1427 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1428 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1429 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1430 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1431 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1432 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1433 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1434 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1435 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1436 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1437 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1438 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1439 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1440 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1441 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1442 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1443 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1444 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1445 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1446 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1447 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1448 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1449 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1450 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1451 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1452 ; AVX512F-NEXT: retq
1454 ; AVX512BW-LABEL: ult_4_v32i16:
1455 ; AVX512BW: # %bb.0:
1456 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1457 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1458 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1459 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1460 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1461 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1462 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1463 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1464 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1465 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1466 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1467 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1468 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1469 ; AVX512BW-NEXT: retq
1471 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_4_v32i16:
1472 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1473 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1474 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1475 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1476 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1477 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1478 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1479 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1480 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1481 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1482 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1483 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1484 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1486 ; AVX512VPOPCNTDQ-BW-LABEL: ult_4_v32i16:
1487 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1488 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1489 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1490 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1491 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1492 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1493 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1494 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1495 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1496 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1497 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1498 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1499 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1500 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1501 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1503 ; BITALG-LABEL: ult_4_v32i16:
1505 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1506 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1507 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1509 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1510 %3 = icmp ult <32 x i16> %2, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
1511 %4 = sext <32 x i1> %3 to <32 x i16>
1515 define <32 x i16> @ugt_4_v32i16(<32 x i16> %0) {
1516 ; AVX512F-LABEL: ugt_4_v32i16:
1518 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1519 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1520 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1521 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1522 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1523 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1524 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1525 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1526 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1527 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1528 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1529 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1530 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1531 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1532 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1533 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1534 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1535 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1536 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1537 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1538 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1539 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1540 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1541 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1542 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1543 ; AVX512F-NEXT: retq
1545 ; AVX512BW-LABEL: ugt_4_v32i16:
1546 ; AVX512BW: # %bb.0:
1547 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1548 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1549 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1550 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1551 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1552 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1553 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1554 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1555 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1556 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1557 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1558 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1559 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1560 ; AVX512BW-NEXT: retq
1562 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_4_v32i16:
1563 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1564 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1565 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1566 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1567 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1568 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1569 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1570 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1571 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
1572 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1573 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1574 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1575 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1577 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_4_v32i16:
1578 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1579 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1580 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1581 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1582 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1583 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1584 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1585 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1586 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1587 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1588 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1589 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1590 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1591 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1592 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1594 ; BITALG-LABEL: ugt_4_v32i16:
1596 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1597 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1598 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1600 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1601 %3 = icmp ugt <32 x i16> %2, <i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4, i16 4>
1602 %4 = sext <32 x i1> %3 to <32 x i16>
1606 define <32 x i16> @ult_5_v32i16(<32 x i16> %0) {
1607 ; AVX512F-LABEL: ult_5_v32i16:
1609 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1610 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1611 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1612 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1613 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1614 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1615 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1616 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1617 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1618 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1619 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1620 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1621 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1622 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1623 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1624 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1625 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1626 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1627 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1628 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1629 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1630 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1631 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1632 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1633 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1634 ; AVX512F-NEXT: retq
1636 ; AVX512BW-LABEL: ult_5_v32i16:
1637 ; AVX512BW: # %bb.0:
1638 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1639 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1640 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1641 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1642 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1643 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1644 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1645 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1646 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1647 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1648 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1649 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1650 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1651 ; AVX512BW-NEXT: retq
1653 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_5_v32i16:
1654 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1655 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1656 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1657 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1658 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1659 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1660 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1661 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1662 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1663 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1664 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1665 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1666 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1668 ; AVX512VPOPCNTDQ-BW-LABEL: ult_5_v32i16:
1669 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1670 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1671 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1672 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1673 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1674 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1675 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1676 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1677 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1678 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1679 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1680 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1681 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1682 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1683 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1685 ; BITALG-LABEL: ult_5_v32i16:
1687 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1688 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1689 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1691 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1692 %3 = icmp ult <32 x i16> %2, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
1693 %4 = sext <32 x i1> %3 to <32 x i16>
1697 define <32 x i16> @ugt_5_v32i16(<32 x i16> %0) {
1698 ; AVX512F-LABEL: ugt_5_v32i16:
1700 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1701 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1702 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1703 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1704 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1705 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1706 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1707 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1708 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1709 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1710 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1711 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1712 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1713 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1714 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1715 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1716 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1717 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1718 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1719 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1720 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1721 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1722 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1723 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1724 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1725 ; AVX512F-NEXT: retq
1727 ; AVX512BW-LABEL: ugt_5_v32i16:
1728 ; AVX512BW: # %bb.0:
1729 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1730 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1731 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1732 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1733 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1734 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1735 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1736 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1737 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1738 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1739 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1740 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1741 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1742 ; AVX512BW-NEXT: retq
1744 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_5_v32i16:
1745 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1746 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1747 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1748 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1749 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1750 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1751 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1752 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1753 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5]
1754 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1755 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1756 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1757 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1759 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_5_v32i16:
1760 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1761 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1762 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1763 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1764 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1765 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1766 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1767 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1768 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1769 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1770 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1771 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1772 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1773 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1774 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1776 ; BITALG-LABEL: ugt_5_v32i16:
1778 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1779 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1780 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1782 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1783 %3 = icmp ugt <32 x i16> %2, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
1784 %4 = sext <32 x i1> %3 to <32 x i16>
1788 define <32 x i16> @ult_6_v32i16(<32 x i16> %0) {
1789 ; AVX512F-LABEL: ult_6_v32i16:
1791 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1792 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1793 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1794 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1795 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1796 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1797 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1798 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1799 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1800 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1801 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1802 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1803 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1804 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1805 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1806 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1807 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1808 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1809 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1810 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1811 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1812 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1813 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1814 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1815 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1816 ; AVX512F-NEXT: retq
1818 ; AVX512BW-LABEL: ult_6_v32i16:
1819 ; AVX512BW: # %bb.0:
1820 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1821 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1822 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1823 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1824 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1825 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1826 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1827 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1828 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1829 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1830 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1831 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1832 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1833 ; AVX512BW-NEXT: retq
1835 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_6_v32i16:
1836 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1837 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1838 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1839 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1840 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1841 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1842 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1843 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1844 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1845 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
1846 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1847 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1848 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1850 ; AVX512VPOPCNTDQ-BW-LABEL: ult_6_v32i16:
1851 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1852 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1853 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1854 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1855 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1856 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1857 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1858 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1859 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1860 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1861 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1862 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1863 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1864 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1865 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1867 ; BITALG-LABEL: ult_6_v32i16:
1869 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1870 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1871 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1873 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1874 %3 = icmp ult <32 x i16> %2, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
1875 %4 = sext <32 x i1> %3 to <32 x i16>
1879 define <32 x i16> @ugt_6_v32i16(<32 x i16> %0) {
1880 ; AVX512F-LABEL: ugt_6_v32i16:
1882 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1883 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1884 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1885 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1886 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1887 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1888 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1889 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1890 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1891 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1892 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1893 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1894 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1895 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1896 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1897 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1898 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1899 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1900 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1901 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1902 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1903 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1904 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
1905 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
1906 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1907 ; AVX512F-NEXT: retq
1909 ; AVX512BW-LABEL: ugt_6_v32i16:
1910 ; AVX512BW: # %bb.0:
1911 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1912 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1913 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1914 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1915 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1916 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1917 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1918 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1919 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
1920 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1921 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1922 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1923 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
1924 ; AVX512BW-NEXT: retq
1926 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_6_v32i16:
1927 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
1928 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1929 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
1930 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
1931 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1932 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
1933 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
1934 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
1935 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6]
1936 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
1937 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1938 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1939 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
1941 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_6_v32i16:
1942 ; AVX512VPOPCNTDQ-BW: # %bb.0:
1943 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1944 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
1945 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1946 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
1947 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
1948 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
1949 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
1950 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
1951 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
1952 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
1953 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
1954 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1955 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
1956 ; AVX512VPOPCNTDQ-BW-NEXT: retq
1958 ; BITALG-LABEL: ugt_6_v32i16:
1960 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
1961 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
1962 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
1964 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
1965 %3 = icmp ugt <32 x i16> %2, <i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6, i16 6>
1966 %4 = sext <32 x i1> %3 to <32 x i16>
1970 define <32 x i16> @ult_7_v32i16(<32 x i16> %0) {
1971 ; AVX512F-LABEL: ult_7_v32i16:
1973 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
1974 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
1975 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
1976 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
1977 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
1978 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
1979 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1980 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1981 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
1982 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
1983 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
1984 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
1985 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
1986 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
1987 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
1988 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
1989 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
1990 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
1991 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
1992 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
1993 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
1994 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
1995 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
1996 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
1997 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1998 ; AVX512F-NEXT: retq
2000 ; AVX512BW-LABEL: ult_7_v32i16:
2001 ; AVX512BW: # %bb.0:
2002 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2003 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2004 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2005 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2006 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2007 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2008 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2009 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2010 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2011 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2012 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2013 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2014 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2015 ; AVX512BW-NEXT: retq
2017 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_7_v32i16:
2018 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2019 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2020 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2021 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2022 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2023 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2024 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2025 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2026 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2027 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2028 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2029 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2030 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2032 ; AVX512VPOPCNTDQ-BW-LABEL: ult_7_v32i16:
2033 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2034 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2035 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2036 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2037 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2038 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2039 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2040 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2041 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2042 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2043 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2044 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2045 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2046 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2047 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2049 ; BITALG-LABEL: ult_7_v32i16:
2051 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2052 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2053 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2055 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2056 %3 = icmp ult <32 x i16> %2, <i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7>
2057 %4 = sext <32 x i1> %3 to <32 x i16>
2061 define <32 x i16> @ugt_7_v32i16(<32 x i16> %0) {
2062 ; AVX512F-LABEL: ugt_7_v32i16:
2064 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2065 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2066 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2067 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2068 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2069 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2070 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2071 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2072 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2073 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2074 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2075 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2076 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2077 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2078 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2079 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2080 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2081 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2082 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2083 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2084 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2085 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2086 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2087 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2088 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2089 ; AVX512F-NEXT: retq
2091 ; AVX512BW-LABEL: ugt_7_v32i16:
2092 ; AVX512BW: # %bb.0:
2093 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2094 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2095 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2096 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2097 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2098 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2099 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2100 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2101 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2102 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2103 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2104 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2105 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2106 ; AVX512BW-NEXT: retq
2108 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_7_v32i16:
2109 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2110 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2111 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2112 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2113 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2114 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2115 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2116 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2117 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7]
2118 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2119 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2120 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2121 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2123 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_7_v32i16:
2124 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2125 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2126 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2127 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2128 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2129 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2130 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2131 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2132 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2133 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2134 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2135 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2136 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2137 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2138 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2140 ; BITALG-LABEL: ugt_7_v32i16:
2142 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2143 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2144 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2146 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2147 %3 = icmp ugt <32 x i16> %2, <i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7, i16 7>
2148 %4 = sext <32 x i1> %3 to <32 x i16>
2152 define <32 x i16> @ult_8_v32i16(<32 x i16> %0) {
2153 ; AVX512F-LABEL: ult_8_v32i16:
2155 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2156 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2157 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2158 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2159 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2160 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2161 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2162 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2163 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2164 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2165 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2166 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2167 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2168 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2169 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2170 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2171 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2172 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2173 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2174 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2175 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2176 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2177 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2178 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2179 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2180 ; AVX512F-NEXT: retq
2182 ; AVX512BW-LABEL: ult_8_v32i16:
2183 ; AVX512BW: # %bb.0:
2184 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2185 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2186 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2187 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2188 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2189 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2190 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2191 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2192 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2193 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2194 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2195 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2196 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2197 ; AVX512BW-NEXT: retq
2199 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_8_v32i16:
2200 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2201 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2202 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2203 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2204 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2205 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2206 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2207 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2208 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2209 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2210 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2211 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2212 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2214 ; AVX512VPOPCNTDQ-BW-LABEL: ult_8_v32i16:
2215 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2216 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2217 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2218 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2219 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2220 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2221 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2222 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2223 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2224 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2225 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2226 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2227 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2228 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2229 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2231 ; BITALG-LABEL: ult_8_v32i16:
2233 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2234 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2235 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2237 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2238 %3 = icmp ult <32 x i16> %2, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2239 %4 = sext <32 x i1> %3 to <32 x i16>
2243 define <32 x i16> @ugt_8_v32i16(<32 x i16> %0) {
2244 ; AVX512F-LABEL: ugt_8_v32i16:
2246 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2247 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2248 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2249 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2250 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2251 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2252 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2253 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2254 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2255 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2256 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2257 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2258 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2259 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2260 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2261 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2262 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2263 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2264 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2265 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2266 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2267 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2268 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2269 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2270 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2271 ; AVX512F-NEXT: retq
2273 ; AVX512BW-LABEL: ugt_8_v32i16:
2274 ; AVX512BW: # %bb.0:
2275 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2276 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2277 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2278 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2279 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2280 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2281 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2282 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2283 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2284 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2285 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2286 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2287 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2288 ; AVX512BW-NEXT: retq
2290 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_8_v32i16:
2291 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2292 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2293 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2294 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2295 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2296 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2297 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2298 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2299 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8]
2300 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2301 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2302 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2303 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2305 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_8_v32i16:
2306 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2307 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2308 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2309 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2310 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2311 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2312 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2313 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2314 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2315 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2316 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2317 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2318 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2319 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2320 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2322 ; BITALG-LABEL: ugt_8_v32i16:
2324 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2325 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2326 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2328 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2329 %3 = icmp ugt <32 x i16> %2, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
2330 %4 = sext <32 x i1> %3 to <32 x i16>
2334 define <32 x i16> @ult_9_v32i16(<32 x i16> %0) {
2335 ; AVX512F-LABEL: ult_9_v32i16:
2337 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2338 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2339 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2340 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2341 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2342 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2343 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2344 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2345 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2346 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2347 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2348 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2349 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2350 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2351 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2352 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2353 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2354 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2355 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2356 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2357 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2358 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2359 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2360 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2361 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2362 ; AVX512F-NEXT: retq
2364 ; AVX512BW-LABEL: ult_9_v32i16:
2365 ; AVX512BW: # %bb.0:
2366 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2367 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2368 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2369 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2370 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2371 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2372 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2373 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2374 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2375 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2376 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2377 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2378 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2379 ; AVX512BW-NEXT: retq
2381 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_9_v32i16:
2382 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2383 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2384 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2385 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2386 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2387 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2388 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2389 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2390 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2391 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2392 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2393 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2394 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2396 ; AVX512VPOPCNTDQ-BW-LABEL: ult_9_v32i16:
2397 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2398 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2399 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2400 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2401 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2402 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2403 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2404 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2405 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2406 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2407 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2408 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2409 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2410 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2411 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2413 ; BITALG-LABEL: ult_9_v32i16:
2415 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2416 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2417 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2419 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2420 %3 = icmp ult <32 x i16> %2, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
2421 %4 = sext <32 x i1> %3 to <32 x i16>
2425 define <32 x i16> @ugt_9_v32i16(<32 x i16> %0) {
2426 ; AVX512F-LABEL: ugt_9_v32i16:
2428 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2429 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2430 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2431 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2432 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2433 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2434 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2435 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2436 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2437 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2438 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2439 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2440 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2441 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2442 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2443 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2444 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2445 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2446 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2447 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2448 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2449 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2450 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2451 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2452 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2453 ; AVX512F-NEXT: retq
2455 ; AVX512BW-LABEL: ugt_9_v32i16:
2456 ; AVX512BW: # %bb.0:
2457 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2458 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2459 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2460 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2461 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2462 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2463 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2464 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2465 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2466 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2467 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2468 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2469 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2470 ; AVX512BW-NEXT: retq
2472 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_9_v32i16:
2473 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2474 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2475 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2476 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2477 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2478 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2479 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2480 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2481 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9]
2482 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2483 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2484 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2485 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2487 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_9_v32i16:
2488 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2489 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2490 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2491 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2492 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2493 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2494 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2495 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2496 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2497 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2498 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2499 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2500 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2501 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2502 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2504 ; BITALG-LABEL: ugt_9_v32i16:
2506 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2507 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2508 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2510 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2511 %3 = icmp ugt <32 x i16> %2, <i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9, i16 9>
2512 %4 = sext <32 x i1> %3 to <32 x i16>
2516 define <32 x i16> @ult_10_v32i16(<32 x i16> %0) {
2517 ; AVX512F-LABEL: ult_10_v32i16:
2519 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2520 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2521 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2522 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2523 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2524 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2525 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2526 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2527 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2528 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2529 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2530 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2531 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2532 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2533 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2534 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2535 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2536 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2537 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2538 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2539 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2540 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2541 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2542 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2543 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2544 ; AVX512F-NEXT: retq
2546 ; AVX512BW-LABEL: ult_10_v32i16:
2547 ; AVX512BW: # %bb.0:
2548 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2549 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2550 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2551 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2552 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2553 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2554 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2555 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2556 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2557 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2558 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2559 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2560 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2561 ; AVX512BW-NEXT: retq
2563 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_10_v32i16:
2564 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2565 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2566 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2567 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2568 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2569 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2570 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2571 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2572 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2573 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2574 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2575 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2576 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2578 ; AVX512VPOPCNTDQ-BW-LABEL: ult_10_v32i16:
2579 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2580 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2581 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2582 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2583 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2584 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2585 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2586 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2587 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2588 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2589 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2590 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2591 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2592 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2593 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2595 ; BITALG-LABEL: ult_10_v32i16:
2597 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2598 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2599 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2601 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2602 %3 = icmp ult <32 x i16> %2, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
2603 %4 = sext <32 x i1> %3 to <32 x i16>
2607 define <32 x i16> @ugt_10_v32i16(<32 x i16> %0) {
2608 ; AVX512F-LABEL: ugt_10_v32i16:
2610 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2611 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2612 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2613 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2614 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2615 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2616 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2617 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2618 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2619 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2620 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2621 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2622 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2623 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2624 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2625 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2626 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2627 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2628 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2629 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2630 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2631 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2632 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2633 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2634 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2635 ; AVX512F-NEXT: retq
2637 ; AVX512BW-LABEL: ugt_10_v32i16:
2638 ; AVX512BW: # %bb.0:
2639 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2640 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2641 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2642 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2643 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2644 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2645 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2646 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2647 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2648 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2649 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2650 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2651 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2652 ; AVX512BW-NEXT: retq
2654 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_10_v32i16:
2655 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2656 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2657 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2658 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2659 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2660 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2661 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2662 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2663 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10]
2664 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2665 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2666 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2667 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2669 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_10_v32i16:
2670 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2671 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2672 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2673 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2674 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2675 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2676 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2677 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2678 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2679 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2680 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2681 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2682 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2683 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2684 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2686 ; BITALG-LABEL: ugt_10_v32i16:
2688 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2689 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2690 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2692 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2693 %3 = icmp ugt <32 x i16> %2, <i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10, i16 10>
2694 %4 = sext <32 x i1> %3 to <32 x i16>
2698 define <32 x i16> @ult_11_v32i16(<32 x i16> %0) {
2699 ; AVX512F-LABEL: ult_11_v32i16:
2701 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2702 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2703 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2704 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2705 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2706 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2707 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2708 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2709 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2710 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2711 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2712 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2713 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2714 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2715 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2716 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2717 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2718 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2719 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2720 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2721 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2722 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2723 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2724 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2725 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2726 ; AVX512F-NEXT: retq
2728 ; AVX512BW-LABEL: ult_11_v32i16:
2729 ; AVX512BW: # %bb.0:
2730 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2731 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2732 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2733 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2734 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2735 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2736 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2737 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2738 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2739 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2740 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2741 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2742 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2743 ; AVX512BW-NEXT: retq
2745 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_11_v32i16:
2746 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2747 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2748 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2749 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2750 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2751 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2752 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2753 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2754 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2755 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2756 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2757 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2758 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2760 ; AVX512VPOPCNTDQ-BW-LABEL: ult_11_v32i16:
2761 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2762 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2763 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2764 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2765 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2766 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2767 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2768 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2769 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2770 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2771 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2772 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2773 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2774 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2775 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2777 ; BITALG-LABEL: ult_11_v32i16:
2779 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2780 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2781 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2783 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2784 %3 = icmp ult <32 x i16> %2, <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
2785 %4 = sext <32 x i1> %3 to <32 x i16>
2789 define <32 x i16> @ugt_11_v32i16(<32 x i16> %0) {
2790 ; AVX512F-LABEL: ugt_11_v32i16:
2792 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2793 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2794 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2795 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2796 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2797 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2798 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2799 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2800 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2801 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2802 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2803 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2804 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2805 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2806 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2807 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2808 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2809 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2810 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2811 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2812 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2813 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2814 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2815 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2816 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2817 ; AVX512F-NEXT: retq
2819 ; AVX512BW-LABEL: ugt_11_v32i16:
2820 ; AVX512BW: # %bb.0:
2821 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2822 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2823 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2824 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2825 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2826 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2827 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2828 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2829 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2830 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2831 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2832 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2833 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2834 ; AVX512BW-NEXT: retq
2836 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_11_v32i16:
2837 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2838 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2839 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2840 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2841 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2842 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2843 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2844 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2845 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11]
2846 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
2847 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2848 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2849 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2851 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_11_v32i16:
2852 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2853 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2854 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2855 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2856 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2857 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2858 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2859 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2860 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2861 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2862 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2863 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2864 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2865 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2866 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2868 ; BITALG-LABEL: ugt_11_v32i16:
2870 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2871 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2872 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2874 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2875 %3 = icmp ugt <32 x i16> %2, <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
2876 %4 = sext <32 x i1> %3 to <32 x i16>
2880 define <32 x i16> @ult_12_v32i16(<32 x i16> %0) {
2881 ; AVX512F-LABEL: ult_12_v32i16:
2883 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2884 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2885 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2886 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2887 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2888 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2889 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2890 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2891 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2892 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2893 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2894 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2895 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2896 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2897 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2898 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2899 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2900 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2901 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2902 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2903 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2904 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2905 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
2906 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
2907 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2908 ; AVX512F-NEXT: retq
2910 ; AVX512BW-LABEL: ult_12_v32i16:
2911 ; AVX512BW: # %bb.0:
2912 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2913 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2914 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2915 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2916 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2917 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2918 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2919 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2920 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
2921 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2922 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2923 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2924 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
2925 ; AVX512BW-NEXT: retq
2927 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_12_v32i16:
2928 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
2929 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2930 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
2931 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
2932 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2933 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
2934 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
2935 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
2936 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2937 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
2938 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2939 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2940 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
2942 ; AVX512VPOPCNTDQ-BW-LABEL: ult_12_v32i16:
2943 ; AVX512VPOPCNTDQ-BW: # %bb.0:
2944 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2945 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
2946 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2947 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
2948 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
2949 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
2950 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
2951 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
2952 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
2953 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
2954 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
2955 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2956 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
2957 ; AVX512VPOPCNTDQ-BW-NEXT: retq
2959 ; BITALG-LABEL: ult_12_v32i16:
2961 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
2962 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
2963 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
2965 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
2966 %3 = icmp ult <32 x i16> %2, <i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12>
2967 %4 = sext <32 x i1> %3 to <32 x i16>
2971 define <32 x i16> @ugt_12_v32i16(<32 x i16> %0) {
2972 ; AVX512F-LABEL: ugt_12_v32i16:
2974 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
2975 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
2976 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
2977 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
2978 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
2979 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
2980 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2981 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2982 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
2983 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
2984 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
2985 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
2986 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
2987 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
2988 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
2989 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
2990 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
2991 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
2992 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
2993 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
2994 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
2995 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
2996 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
2997 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
2998 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
2999 ; AVX512F-NEXT: retq
3001 ; AVX512BW-LABEL: ugt_12_v32i16:
3002 ; AVX512BW: # %bb.0:
3003 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3004 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3005 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3006 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3007 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3008 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3009 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3010 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3011 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3012 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3013 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3014 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3015 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3016 ; AVX512BW-NEXT: retq
3018 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_12_v32i16:
3019 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3020 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3021 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3022 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3023 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3024 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3025 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3026 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3027 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12]
3028 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
3029 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3030 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3031 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3033 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_12_v32i16:
3034 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3035 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3036 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3037 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3038 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3039 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3040 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3041 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3042 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3043 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3044 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3045 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3046 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3047 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3048 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3050 ; BITALG-LABEL: ugt_12_v32i16:
3052 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3053 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3054 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3056 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3057 %3 = icmp ugt <32 x i16> %2, <i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12, i16 12>
3058 %4 = sext <32 x i1> %3 to <32 x i16>
3062 define <32 x i16> @ult_13_v32i16(<32 x i16> %0) {
3063 ; AVX512F-LABEL: ult_13_v32i16:
3065 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3066 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3067 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3068 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3069 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3070 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3071 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3072 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3073 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3074 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3075 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3076 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3077 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3078 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3079 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3080 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3081 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3082 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3083 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3084 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3085 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3086 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3087 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3088 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3089 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3090 ; AVX512F-NEXT: retq
3092 ; AVX512BW-LABEL: ult_13_v32i16:
3093 ; AVX512BW: # %bb.0:
3094 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3095 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3096 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3097 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3098 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3099 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3100 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3101 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3102 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3103 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3104 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3105 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3106 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3107 ; AVX512BW-NEXT: retq
3109 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_13_v32i16:
3110 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3111 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3112 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3113 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3114 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3115 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3116 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3117 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3118 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3119 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
3120 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3121 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3122 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3124 ; AVX512VPOPCNTDQ-BW-LABEL: ult_13_v32i16:
3125 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3126 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3127 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3128 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3129 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3130 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3131 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3132 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3133 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3134 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3135 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3136 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3137 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3138 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3139 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3141 ; BITALG-LABEL: ult_13_v32i16:
3143 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3144 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3145 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3147 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3148 %3 = icmp ult <32 x i16> %2, <i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13>
3149 %4 = sext <32 x i1> %3 to <32 x i16>
3153 define <32 x i16> @ugt_13_v32i16(<32 x i16> %0) {
3154 ; AVX512F-LABEL: ugt_13_v32i16:
3156 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3157 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3158 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3159 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3160 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3161 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3162 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3163 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3164 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3165 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3166 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3167 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3168 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3169 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3170 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3171 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3172 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3173 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3174 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3175 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3176 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3177 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3178 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
3179 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3180 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3181 ; AVX512F-NEXT: retq
3183 ; AVX512BW-LABEL: ugt_13_v32i16:
3184 ; AVX512BW: # %bb.0:
3185 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3186 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3187 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3188 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3189 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3190 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3191 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3192 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3193 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3194 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3195 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3196 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3197 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3198 ; AVX512BW-NEXT: retq
3200 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_13_v32i16:
3201 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3202 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3203 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3204 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3205 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3206 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3207 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3208 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3209 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13]
3210 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
3211 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3212 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3213 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3215 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_13_v32i16:
3216 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3217 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3218 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3219 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3220 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3221 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3222 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3223 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3224 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3225 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3226 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3227 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3228 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3229 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3230 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3232 ; BITALG-LABEL: ugt_13_v32i16:
3234 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3235 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3236 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3238 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3239 %3 = icmp ugt <32 x i16> %2, <i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13, i16 13>
3240 %4 = sext <32 x i1> %3 to <32 x i16>
3244 define <32 x i16> @ult_14_v32i16(<32 x i16> %0) {
3245 ; AVX512F-LABEL: ult_14_v32i16:
3247 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3248 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3249 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3250 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3251 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3252 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3253 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3254 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3255 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3256 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3257 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3258 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3259 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3260 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3261 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3262 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3263 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3264 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3265 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3266 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3267 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3268 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3269 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3270 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3271 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3272 ; AVX512F-NEXT: retq
3274 ; AVX512BW-LABEL: ult_14_v32i16:
3275 ; AVX512BW: # %bb.0:
3276 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3277 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3278 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3279 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3280 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3281 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3282 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3283 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3284 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3285 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3286 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3287 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3288 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3289 ; AVX512BW-NEXT: retq
3291 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_14_v32i16:
3292 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3293 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3294 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3295 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3296 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3297 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3298 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3299 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3300 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3301 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
3302 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3303 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3304 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3306 ; AVX512VPOPCNTDQ-BW-LABEL: ult_14_v32i16:
3307 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3308 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3309 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3310 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3311 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3312 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3313 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3314 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3315 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3316 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3317 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3318 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3319 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3320 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3321 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3323 ; BITALG-LABEL: ult_14_v32i16:
3325 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3326 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3327 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3329 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3330 %3 = icmp ult <32 x i16> %2, <i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14>
3331 %4 = sext <32 x i1> %3 to <32 x i16>
3335 define <32 x i16> @ugt_14_v32i16(<32 x i16> %0) {
3336 ; AVX512F-LABEL: ugt_14_v32i16:
3338 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3339 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3340 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3341 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3342 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3343 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3344 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3345 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3346 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3347 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3348 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3349 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3350 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3351 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3352 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3353 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3354 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3355 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3356 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3357 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3358 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3359 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3360 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm0, %ymm0
3361 ; AVX512F-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3362 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3363 ; AVX512F-NEXT: retq
3365 ; AVX512BW-LABEL: ugt_14_v32i16:
3366 ; AVX512BW: # %bb.0:
3367 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3368 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3369 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3370 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3371 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3372 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3373 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3374 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3375 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3376 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3377 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3378 ; AVX512BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3379 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3380 ; AVX512BW-NEXT: retq
3382 ; AVX512VPOPCNTDQ-NOBW-LABEL: ugt_14_v32i16:
3383 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3384 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3385 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3386 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3387 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3388 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3389 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3390 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3391 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14]
3392 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm0, %ymm0
3393 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3394 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3395 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3397 ; AVX512VPOPCNTDQ-BW-LABEL: ugt_14_v32i16:
3398 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3399 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3400 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3401 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3402 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3403 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3404 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3405 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3406 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3407 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3408 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3409 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3410 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3411 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3412 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3414 ; BITALG-LABEL: ugt_14_v32i16:
3416 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3417 ; BITALG-NEXT: vpcmpnleuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3418 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3420 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3421 %3 = icmp ugt <32 x i16> %2, <i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14, i16 14>
3422 %4 = sext <32 x i1> %3 to <32 x i16>
3426 define <32 x i16> @ult_15_v32i16(<32 x i16> %0) {
3427 ; AVX512F-LABEL: ult_15_v32i16:
3429 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3430 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm2
3431 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3432 ; AVX512F-NEXT: vpshufb %ymm2, %ymm3, %ymm2
3433 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm4
3434 ; AVX512F-NEXT: vpand %ymm1, %ymm4, %ymm4
3435 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3436 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3437 ; AVX512F-NEXT: vpsllw $8, %ymm2, %ymm4
3438 ; AVX512F-NEXT: vpaddb %ymm2, %ymm4, %ymm2
3439 ; AVX512F-NEXT: vpsrlw $8, %ymm2, %ymm2
3440 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3441 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm4
3442 ; AVX512F-NEXT: vpshufb %ymm4, %ymm3, %ymm4
3443 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3444 ; AVX512F-NEXT: vpand %ymm1, %ymm0, %ymm0
3445 ; AVX512F-NEXT: vpshufb %ymm0, %ymm3, %ymm0
3446 ; AVX512F-NEXT: vpaddb %ymm4, %ymm0, %ymm0
3447 ; AVX512F-NEXT: vpsllw $8, %ymm0, %ymm1
3448 ; AVX512F-NEXT: vpaddb %ymm0, %ymm1, %ymm0
3449 ; AVX512F-NEXT: vpsrlw $8, %ymm0, %ymm0
3450 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3451 ; AVX512F-NEXT: vpcmpgtw %ymm0, %ymm1, %ymm0
3452 ; AVX512F-NEXT: vpcmpgtw %ymm2, %ymm1, %ymm1
3453 ; AVX512F-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3454 ; AVX512F-NEXT: retq
3456 ; AVX512BW-LABEL: ult_15_v32i16:
3457 ; AVX512BW: # %bb.0:
3458 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3459 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3460 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3461 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3462 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3463 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3464 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3465 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3466 ; AVX512BW-NEXT: vpsllw $8, %zmm0, %zmm1
3467 ; AVX512BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3468 ; AVX512BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3469 ; AVX512BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3470 ; AVX512BW-NEXT: vpmovm2w %k0, %zmm0
3471 ; AVX512BW-NEXT: retq
3473 ; AVX512VPOPCNTDQ-NOBW-LABEL: ult_15_v32i16:
3474 ; AVX512VPOPCNTDQ-NOBW: # %bb.0:
3475 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm1 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3476 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm1, %zmm1
3477 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm1, %ymm1
3478 ; AVX512VPOPCNTDQ-NOBW-NEXT: vextracti64x4 $1, %zmm0, %ymm0
3479 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovzxwd {{.*#+}} zmm0 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero
3480 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpopcntd %zmm0, %zmm0
3481 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpmovdw %zmm0, %ymm0
3482 ; AVX512VPOPCNTDQ-NOBW-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3483 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm0, %ymm2, %ymm0
3484 ; AVX512VPOPCNTDQ-NOBW-NEXT: vpcmpgtw %ymm1, %ymm2, %ymm1
3485 ; AVX512VPOPCNTDQ-NOBW-NEXT: vinserti64x4 $1, %ymm0, %zmm1, %zmm0
3486 ; AVX512VPOPCNTDQ-NOBW-NEXT: retq
3488 ; AVX512VPOPCNTDQ-BW-LABEL: ult_15_v32i16:
3489 ; AVX512VPOPCNTDQ-BW: # %bb.0:
3490 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3491 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3492 ; AVX512VPOPCNTDQ-BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3493 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3494 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3495 ; AVX512VPOPCNTDQ-BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3496 ; AVX512VPOPCNTDQ-BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3497 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3498 ; AVX512VPOPCNTDQ-BW-NEXT: vpsllw $8, %zmm0, %zmm1
3499 ; AVX512VPOPCNTDQ-BW-NEXT: vpaddb %zmm0, %zmm1, %zmm0
3500 ; AVX512VPOPCNTDQ-BW-NEXT: vpsrlw $8, %zmm0, %zmm0
3501 ; AVX512VPOPCNTDQ-BW-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3502 ; AVX512VPOPCNTDQ-BW-NEXT: vpmovm2w %k0, %zmm0
3503 ; AVX512VPOPCNTDQ-BW-NEXT: retq
3505 ; BITALG-LABEL: ult_15_v32i16:
3507 ; BITALG-NEXT: vpopcntw %zmm0, %zmm0
3508 ; BITALG-NEXT: vpcmpltuw {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %zmm0, %k0
3509 ; BITALG-NEXT: vpmovm2w %k0, %zmm0
3511 %2 = tail call <32 x i16> @llvm.ctpop.v32i16(<32 x i16> %0)
3512 %3 = icmp ult <32 x i16> %2, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
3513 %4 = sext <32 x i1> %3 to <32 x i16>
3517 define <16 x i32> @ugt_1_v16i32(<16 x i32> %0) {
3518 ; AVX512F-LABEL: ugt_1_v16i32:
3520 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3521 ; AVX512F-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3522 ; AVX512F-NEXT: vptestmd %zmm1, %zmm0, %k1
3523 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3524 ; AVX512F-NEXT: retq
3526 ; AVX512BW-LABEL: ugt_1_v16i32:
3527 ; AVX512BW: # %bb.0:
3528 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3529 ; AVX512BW-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3530 ; AVX512BW-NEXT: vptestmd %zmm1, %zmm0, %k1
3531 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3532 ; AVX512BW-NEXT: retq
3534 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v16i32:
3535 ; AVX512VPOPCNTDQ: # %bb.0:
3536 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3537 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3538 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3539 ; AVX512VPOPCNTDQ-NEXT: retq
3541 ; BITALG-LABEL: ugt_1_v16i32:
3543 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3544 ; BITALG-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3545 ; BITALG-NEXT: vptestmd %zmm1, %zmm0, %k1
3546 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3548 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3549 %3 = icmp ugt <16 x i32> %2, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
3550 %4 = sext <16 x i1> %3 to <16 x i32>
3554 define <16 x i32> @ult_2_v16i32(<16 x i32> %0) {
3555 ; AVX512F-LABEL: ult_2_v16i32:
3557 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3558 ; AVX512F-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3559 ; AVX512F-NEXT: vptestnmd %zmm1, %zmm0, %k1
3560 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3561 ; AVX512F-NEXT: retq
3563 ; AVX512BW-LABEL: ult_2_v16i32:
3564 ; AVX512BW: # %bb.0:
3565 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3566 ; AVX512BW-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3567 ; AVX512BW-NEXT: vptestnmd %zmm1, %zmm0, %k1
3568 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3569 ; AVX512BW-NEXT: retq
3571 ; AVX512VPOPCNTDQ-LABEL: ult_2_v16i32:
3572 ; AVX512VPOPCNTDQ: # %bb.0:
3573 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3574 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3575 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3576 ; AVX512VPOPCNTDQ-NEXT: retq
3578 ; BITALG-LABEL: ult_2_v16i32:
3580 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
3581 ; BITALG-NEXT: vpaddd %zmm1, %zmm0, %zmm1
3582 ; BITALG-NEXT: vptestnmd %zmm1, %zmm0, %k1
3583 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3585 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3586 %3 = icmp ult <16 x i32> %2, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
3587 %4 = sext <16 x i1> %3 to <16 x i32>
3591 define <16 x i32> @ugt_2_v16i32(<16 x i32> %0) {
3592 ; AVX512F-LABEL: ugt_2_v16i32:
3594 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3595 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3596 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3597 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3598 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3599 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3600 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3601 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3602 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3603 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3604 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3605 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3606 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3607 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3608 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3609 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3610 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3611 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3612 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3613 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3614 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3615 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3616 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3617 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3618 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3619 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3620 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3621 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3622 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3623 ; AVX512F-NEXT: retq
3625 ; AVX512BW-LABEL: ugt_2_v16i32:
3626 ; AVX512BW: # %bb.0:
3627 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3628 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3629 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3630 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3631 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3632 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3633 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3634 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3635 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3636 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3637 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3638 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3639 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3640 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3641 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3642 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3643 ; AVX512BW-NEXT: retq
3645 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v16i32:
3646 ; AVX512VPOPCNTDQ: # %bb.0:
3647 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3648 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3649 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3650 ; AVX512VPOPCNTDQ-NEXT: retq
3652 ; BITALG-LABEL: ugt_2_v16i32:
3654 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3655 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3656 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3657 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3658 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3659 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3660 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3661 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3662 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3664 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3665 %3 = icmp ugt <16 x i32> %2, <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
3666 %4 = sext <16 x i1> %3 to <16 x i32>
3670 define <16 x i32> @ult_3_v16i32(<16 x i32> %0) {
3671 ; AVX512F-LABEL: ult_3_v16i32:
3673 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3674 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3675 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3676 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3677 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3678 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3679 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3680 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3681 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3682 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3683 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3684 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3685 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3686 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3687 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3688 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3689 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3690 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3691 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3692 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3693 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3694 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3695 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3696 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3697 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3698 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3699 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3700 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3701 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3702 ; AVX512F-NEXT: retq
3704 ; AVX512BW-LABEL: ult_3_v16i32:
3705 ; AVX512BW: # %bb.0:
3706 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3707 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3708 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3709 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3710 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3711 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3712 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3713 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3714 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3715 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3716 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3717 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3718 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3719 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3720 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3721 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3722 ; AVX512BW-NEXT: retq
3724 ; AVX512VPOPCNTDQ-LABEL: ult_3_v16i32:
3725 ; AVX512VPOPCNTDQ: # %bb.0:
3726 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3727 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3728 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3729 ; AVX512VPOPCNTDQ-NEXT: retq
3731 ; BITALG-LABEL: ult_3_v16i32:
3733 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3734 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3735 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3736 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3737 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3738 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3739 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3740 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3741 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3743 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3744 %3 = icmp ult <16 x i32> %2, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
3745 %4 = sext <16 x i1> %3 to <16 x i32>
3749 define <16 x i32> @ugt_3_v16i32(<16 x i32> %0) {
3750 ; AVX512F-LABEL: ugt_3_v16i32:
3752 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3753 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3754 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3755 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3756 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3757 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3758 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3759 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3760 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3761 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3762 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3763 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3764 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3765 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3766 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3767 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3768 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3769 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3770 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3771 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3772 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3773 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3774 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3775 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3776 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3777 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3778 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3779 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3780 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3781 ; AVX512F-NEXT: retq
3783 ; AVX512BW-LABEL: ugt_3_v16i32:
3784 ; AVX512BW: # %bb.0:
3785 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3786 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3787 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3788 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3789 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3790 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3791 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3792 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3793 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3794 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3795 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3796 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3797 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3798 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3799 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3800 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3801 ; AVX512BW-NEXT: retq
3803 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v16i32:
3804 ; AVX512VPOPCNTDQ: # %bb.0:
3805 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3806 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3807 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3808 ; AVX512VPOPCNTDQ-NEXT: retq
3810 ; BITALG-LABEL: ugt_3_v16i32:
3812 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3813 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3814 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3815 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3816 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3817 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3818 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3819 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3820 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3822 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3823 %3 = icmp ugt <16 x i32> %2, <i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3, i32 3>
3824 %4 = sext <16 x i1> %3 to <16 x i32>
3828 define <16 x i32> @ult_4_v16i32(<16 x i32> %0) {
3829 ; AVX512F-LABEL: ult_4_v16i32:
3831 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3832 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3833 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3834 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3835 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3836 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3837 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3838 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3839 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3840 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3841 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3842 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3843 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3844 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3845 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3846 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3847 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3848 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3849 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3850 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3851 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3852 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3853 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3854 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3855 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3856 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3857 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3858 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3859 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3860 ; AVX512F-NEXT: retq
3862 ; AVX512BW-LABEL: ult_4_v16i32:
3863 ; AVX512BW: # %bb.0:
3864 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3865 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3866 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3867 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3868 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3869 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3870 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3871 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3872 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3873 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3874 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3875 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3876 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3877 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3878 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3879 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3880 ; AVX512BW-NEXT: retq
3882 ; AVX512VPOPCNTDQ-LABEL: ult_4_v16i32:
3883 ; AVX512VPOPCNTDQ: # %bb.0:
3884 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3885 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3886 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3887 ; AVX512VPOPCNTDQ-NEXT: retq
3889 ; BITALG-LABEL: ult_4_v16i32:
3891 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3892 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3893 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3894 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3895 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3896 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3897 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3898 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3899 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3901 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3902 %3 = icmp ult <16 x i32> %2, <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
3903 %4 = sext <16 x i1> %3 to <16 x i32>
3907 define <16 x i32> @ugt_4_v16i32(<16 x i32> %0) {
3908 ; AVX512F-LABEL: ugt_4_v16i32:
3910 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3911 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3912 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3913 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3914 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3915 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3916 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3917 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3918 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3919 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3920 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
3921 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
3922 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
3923 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
3924 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
3925 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
3926 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
3927 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
3928 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
3929 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
3930 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
3931 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
3932 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
3933 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
3934 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
3935 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
3936 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
3937 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3938 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3939 ; AVX512F-NEXT: retq
3941 ; AVX512BW-LABEL: ugt_4_v16i32:
3942 ; AVX512BW: # %bb.0:
3943 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3944 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
3945 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3946 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
3947 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
3948 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
3949 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
3950 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
3951 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
3952 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3953 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3954 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3955 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3956 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3957 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3958 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3959 ; AVX512BW-NEXT: retq
3961 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v16i32:
3962 ; AVX512VPOPCNTDQ: # %bb.0:
3963 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
3964 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3965 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3966 ; AVX512VPOPCNTDQ-NEXT: retq
3968 ; BITALG-LABEL: ugt_4_v16i32:
3970 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
3971 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
3972 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
3973 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
3974 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
3975 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
3976 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
3977 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
3978 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
3980 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
3981 %3 = icmp ugt <16 x i32> %2, <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
3982 %4 = sext <16 x i1> %3 to <16 x i32>
3986 define <16 x i32> @ult_5_v16i32(<16 x i32> %0) {
3987 ; AVX512F-LABEL: ult_5_v16i32:
3989 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
3990 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
3991 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
3992 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
3993 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
3994 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
3995 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
3996 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
3997 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
3998 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
3999 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4000 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4001 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4002 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4003 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4004 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4005 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4006 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4007 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4008 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4009 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4010 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4011 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4012 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4013 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4014 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4015 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4016 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4017 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4018 ; AVX512F-NEXT: retq
4020 ; AVX512BW-LABEL: ult_5_v16i32:
4021 ; AVX512BW: # %bb.0:
4022 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4023 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4024 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4025 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4026 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4027 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4028 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4029 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4030 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4031 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4032 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4033 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4034 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4035 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4036 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4037 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4038 ; AVX512BW-NEXT: retq
4040 ; AVX512VPOPCNTDQ-LABEL: ult_5_v16i32:
4041 ; AVX512VPOPCNTDQ: # %bb.0:
4042 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4043 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4044 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4045 ; AVX512VPOPCNTDQ-NEXT: retq
4047 ; BITALG-LABEL: ult_5_v16i32:
4049 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4050 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4051 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4052 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4053 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4054 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4055 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4056 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4057 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4059 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4060 %3 = icmp ult <16 x i32> %2, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
4061 %4 = sext <16 x i1> %3 to <16 x i32>
4065 define <16 x i32> @ugt_5_v16i32(<16 x i32> %0) {
4066 ; AVX512F-LABEL: ugt_5_v16i32:
4068 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4069 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4070 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4071 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4072 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4073 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4074 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4075 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4076 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4077 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4078 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4079 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4080 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4081 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4082 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4083 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4084 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4085 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4086 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4087 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4088 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4089 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4090 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4091 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4092 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4093 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4094 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4095 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4096 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4097 ; AVX512F-NEXT: retq
4099 ; AVX512BW-LABEL: ugt_5_v16i32:
4100 ; AVX512BW: # %bb.0:
4101 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4102 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4103 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4104 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4105 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4106 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4107 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4108 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4109 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4110 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4111 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4112 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4113 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4114 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4115 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4116 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4117 ; AVX512BW-NEXT: retq
4119 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v16i32:
4120 ; AVX512VPOPCNTDQ: # %bb.0:
4121 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4122 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4123 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4124 ; AVX512VPOPCNTDQ-NEXT: retq
4126 ; BITALG-LABEL: ugt_5_v16i32:
4128 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4129 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4130 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4131 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4132 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4133 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4134 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4135 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4136 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4138 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4139 %3 = icmp ugt <16 x i32> %2, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
4140 %4 = sext <16 x i1> %3 to <16 x i32>
4144 define <16 x i32> @ult_6_v16i32(<16 x i32> %0) {
4145 ; AVX512F-LABEL: ult_6_v16i32:
4147 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4148 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4149 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4150 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4151 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4152 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4153 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4154 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4155 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4156 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4157 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4158 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4159 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4160 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4161 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4162 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4163 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4164 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4165 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4166 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4167 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4168 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4169 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4170 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4171 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4172 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4173 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4174 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4175 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4176 ; AVX512F-NEXT: retq
4178 ; AVX512BW-LABEL: ult_6_v16i32:
4179 ; AVX512BW: # %bb.0:
4180 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4181 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4182 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4183 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4184 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4185 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4186 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4187 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4188 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4189 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4190 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4191 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4192 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4193 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4194 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4195 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4196 ; AVX512BW-NEXT: retq
4198 ; AVX512VPOPCNTDQ-LABEL: ult_6_v16i32:
4199 ; AVX512VPOPCNTDQ: # %bb.0:
4200 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4201 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4202 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4203 ; AVX512VPOPCNTDQ-NEXT: retq
4205 ; BITALG-LABEL: ult_6_v16i32:
4207 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4208 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4209 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4210 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4211 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4212 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4213 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4214 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4215 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4217 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4218 %3 = icmp ult <16 x i32> %2, <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
4219 %4 = sext <16 x i1> %3 to <16 x i32>
4223 define <16 x i32> @ugt_6_v16i32(<16 x i32> %0) {
4224 ; AVX512F-LABEL: ugt_6_v16i32:
4226 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4227 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4228 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4229 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4230 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4231 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4232 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4233 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4234 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4235 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4236 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4237 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4238 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4239 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4240 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4241 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4242 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4243 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4244 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4245 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4246 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4247 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4248 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4249 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4250 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4251 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4252 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4253 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4254 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4255 ; AVX512F-NEXT: retq
4257 ; AVX512BW-LABEL: ugt_6_v16i32:
4258 ; AVX512BW: # %bb.0:
4259 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4260 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4261 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4262 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4263 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4264 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4265 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4266 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4267 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4268 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4269 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4270 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4271 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4272 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4273 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4274 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4275 ; AVX512BW-NEXT: retq
4277 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v16i32:
4278 ; AVX512VPOPCNTDQ: # %bb.0:
4279 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4280 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4281 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4282 ; AVX512VPOPCNTDQ-NEXT: retq
4284 ; BITALG-LABEL: ugt_6_v16i32:
4286 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4287 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4288 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4289 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4290 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4291 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4292 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4293 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4294 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4296 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4297 %3 = icmp ugt <16 x i32> %2, <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
4298 %4 = sext <16 x i1> %3 to <16 x i32>
4302 define <16 x i32> @ult_7_v16i32(<16 x i32> %0) {
4303 ; AVX512F-LABEL: ult_7_v16i32:
4305 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4306 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4307 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4308 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4309 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4310 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4311 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4312 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4313 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4314 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4315 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4316 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4317 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4318 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4319 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4320 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4321 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4322 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4323 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4324 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4325 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4326 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4327 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4328 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4329 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4330 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4331 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4332 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4333 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4334 ; AVX512F-NEXT: retq
4336 ; AVX512BW-LABEL: ult_7_v16i32:
4337 ; AVX512BW: # %bb.0:
4338 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4339 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4340 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4341 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4342 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4343 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4344 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4345 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4346 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4347 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4348 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4349 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4350 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4351 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4352 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4353 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4354 ; AVX512BW-NEXT: retq
4356 ; AVX512VPOPCNTDQ-LABEL: ult_7_v16i32:
4357 ; AVX512VPOPCNTDQ: # %bb.0:
4358 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4359 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4360 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4361 ; AVX512VPOPCNTDQ-NEXT: retq
4363 ; BITALG-LABEL: ult_7_v16i32:
4365 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4366 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4367 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4368 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4369 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4370 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4371 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4372 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4373 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4375 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4376 %3 = icmp ult <16 x i32> %2, <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
4377 %4 = sext <16 x i1> %3 to <16 x i32>
4381 define <16 x i32> @ugt_7_v16i32(<16 x i32> %0) {
4382 ; AVX512F-LABEL: ugt_7_v16i32:
4384 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4385 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4386 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4387 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4388 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4389 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4390 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4391 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4392 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4393 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4394 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4395 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4396 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4397 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4398 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4399 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4400 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4401 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4402 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4403 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4404 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4405 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4406 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4407 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4408 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4409 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4410 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4411 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4412 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4413 ; AVX512F-NEXT: retq
4415 ; AVX512BW-LABEL: ugt_7_v16i32:
4416 ; AVX512BW: # %bb.0:
4417 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4418 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4419 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4420 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4421 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4422 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4423 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4424 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4425 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4426 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4427 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4428 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4429 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4430 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4431 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4432 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4433 ; AVX512BW-NEXT: retq
4435 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v16i32:
4436 ; AVX512VPOPCNTDQ: # %bb.0:
4437 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4438 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4439 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4440 ; AVX512VPOPCNTDQ-NEXT: retq
4442 ; BITALG-LABEL: ugt_7_v16i32:
4444 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4445 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4446 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4447 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4448 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4449 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4450 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4451 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4452 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4454 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4455 %3 = icmp ugt <16 x i32> %2, <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>
4456 %4 = sext <16 x i1> %3 to <16 x i32>
4460 define <16 x i32> @ult_8_v16i32(<16 x i32> %0) {
4461 ; AVX512F-LABEL: ult_8_v16i32:
4463 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4464 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4465 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4466 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4467 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4468 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4469 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4470 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4471 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4472 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4473 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4474 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4475 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4476 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4477 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4478 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4479 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4480 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4481 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4482 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4483 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4484 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4485 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4486 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4487 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4488 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4489 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4490 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4491 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4492 ; AVX512F-NEXT: retq
4494 ; AVX512BW-LABEL: ult_8_v16i32:
4495 ; AVX512BW: # %bb.0:
4496 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4497 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4498 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4499 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4500 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4501 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4502 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4503 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4504 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4505 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4506 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4507 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4508 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4509 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4510 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4511 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4512 ; AVX512BW-NEXT: retq
4514 ; AVX512VPOPCNTDQ-LABEL: ult_8_v16i32:
4515 ; AVX512VPOPCNTDQ: # %bb.0:
4516 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4517 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4518 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4519 ; AVX512VPOPCNTDQ-NEXT: retq
4521 ; BITALG-LABEL: ult_8_v16i32:
4523 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4524 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4525 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4526 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4527 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4528 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4529 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4530 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4531 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4533 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4534 %3 = icmp ult <16 x i32> %2, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
4535 %4 = sext <16 x i1> %3 to <16 x i32>
4539 define <16 x i32> @ugt_8_v16i32(<16 x i32> %0) {
4540 ; AVX512F-LABEL: ugt_8_v16i32:
4542 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4543 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4544 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4545 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4546 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4547 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4548 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4549 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4550 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4551 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4552 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4553 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4554 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4555 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4556 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4557 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4558 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4559 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4560 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4561 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4562 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4563 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4564 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4565 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4566 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4567 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4568 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4569 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4570 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4571 ; AVX512F-NEXT: retq
4573 ; AVX512BW-LABEL: ugt_8_v16i32:
4574 ; AVX512BW: # %bb.0:
4575 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4576 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4577 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4578 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4579 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4580 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4581 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4582 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4583 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4584 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4585 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4586 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4587 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4588 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4589 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4590 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4591 ; AVX512BW-NEXT: retq
4593 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v16i32:
4594 ; AVX512VPOPCNTDQ: # %bb.0:
4595 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4596 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4597 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4598 ; AVX512VPOPCNTDQ-NEXT: retq
4600 ; BITALG-LABEL: ugt_8_v16i32:
4602 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4603 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4604 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4605 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4606 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4607 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4608 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4609 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4610 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4612 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4613 %3 = icmp ugt <16 x i32> %2, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
4614 %4 = sext <16 x i1> %3 to <16 x i32>
4618 define <16 x i32> @ult_9_v16i32(<16 x i32> %0) {
4619 ; AVX512F-LABEL: ult_9_v16i32:
4621 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4622 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4623 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4624 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4625 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4626 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4627 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4628 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4629 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4630 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4631 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4632 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4633 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4634 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4635 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4636 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4637 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4638 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4639 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4640 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4641 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4642 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4643 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4644 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4645 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4646 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4647 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4648 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4649 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4650 ; AVX512F-NEXT: retq
4652 ; AVX512BW-LABEL: ult_9_v16i32:
4653 ; AVX512BW: # %bb.0:
4654 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4655 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4656 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4657 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4658 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4659 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4660 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4661 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4662 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4663 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4664 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4665 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4666 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4667 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4668 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4669 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4670 ; AVX512BW-NEXT: retq
4672 ; AVX512VPOPCNTDQ-LABEL: ult_9_v16i32:
4673 ; AVX512VPOPCNTDQ: # %bb.0:
4674 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4675 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4676 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4677 ; AVX512VPOPCNTDQ-NEXT: retq
4679 ; BITALG-LABEL: ult_9_v16i32:
4681 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4682 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4683 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4684 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4685 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4686 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4687 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4688 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4689 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4691 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4692 %3 = icmp ult <16 x i32> %2, <i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9>
4693 %4 = sext <16 x i1> %3 to <16 x i32>
4697 define <16 x i32> @ugt_9_v16i32(<16 x i32> %0) {
4698 ; AVX512F-LABEL: ugt_9_v16i32:
4700 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4701 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4702 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4703 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4704 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4705 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4706 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4707 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4708 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4709 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4710 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4711 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4712 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4713 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4714 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4715 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4716 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4717 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4718 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4719 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4720 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4721 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4722 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4723 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4724 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4725 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4726 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4727 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4728 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4729 ; AVX512F-NEXT: retq
4731 ; AVX512BW-LABEL: ugt_9_v16i32:
4732 ; AVX512BW: # %bb.0:
4733 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4734 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4735 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4736 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4737 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4738 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4739 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4740 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4741 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4742 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4743 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4744 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4745 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4746 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4747 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4748 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4749 ; AVX512BW-NEXT: retq
4751 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v16i32:
4752 ; AVX512VPOPCNTDQ: # %bb.0:
4753 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4754 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4755 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4756 ; AVX512VPOPCNTDQ-NEXT: retq
4758 ; BITALG-LABEL: ugt_9_v16i32:
4760 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4761 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4762 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4763 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4764 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4765 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4766 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4767 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4768 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4770 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4771 %3 = icmp ugt <16 x i32> %2, <i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9, i32 9>
4772 %4 = sext <16 x i1> %3 to <16 x i32>
4776 define <16 x i32> @ult_10_v16i32(<16 x i32> %0) {
4777 ; AVX512F-LABEL: ult_10_v16i32:
4779 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4780 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4781 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4782 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4783 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4784 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4785 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4786 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4787 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4788 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4789 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4790 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4791 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4792 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4793 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4794 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4795 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4796 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4797 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4798 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4799 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4800 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4801 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4802 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4803 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4804 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4805 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4806 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4807 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4808 ; AVX512F-NEXT: retq
4810 ; AVX512BW-LABEL: ult_10_v16i32:
4811 ; AVX512BW: # %bb.0:
4812 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4813 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4814 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4815 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4816 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4817 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4818 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4819 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4820 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4821 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4822 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4823 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4824 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4825 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4826 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4827 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4828 ; AVX512BW-NEXT: retq
4830 ; AVX512VPOPCNTDQ-LABEL: ult_10_v16i32:
4831 ; AVX512VPOPCNTDQ: # %bb.0:
4832 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4833 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4834 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4835 ; AVX512VPOPCNTDQ-NEXT: retq
4837 ; BITALG-LABEL: ult_10_v16i32:
4839 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4840 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4841 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4842 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4843 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4844 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4845 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4846 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4847 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4849 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4850 %3 = icmp ult <16 x i32> %2, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
4851 %4 = sext <16 x i1> %3 to <16 x i32>
4855 define <16 x i32> @ugt_10_v16i32(<16 x i32> %0) {
4856 ; AVX512F-LABEL: ugt_10_v16i32:
4858 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4859 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4860 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4861 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4862 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4863 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4864 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4865 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4866 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4867 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4868 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4869 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4870 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4871 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4872 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4873 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4874 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4875 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4876 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4877 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4878 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4879 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4880 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4881 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4882 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4883 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4884 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4885 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4886 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4887 ; AVX512F-NEXT: retq
4889 ; AVX512BW-LABEL: ugt_10_v16i32:
4890 ; AVX512BW: # %bb.0:
4891 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4892 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4893 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4894 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4895 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4896 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4897 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4898 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4899 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4900 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4901 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4902 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4903 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4904 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4905 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4906 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4907 ; AVX512BW-NEXT: retq
4909 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v16i32:
4910 ; AVX512VPOPCNTDQ: # %bb.0:
4911 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4912 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4913 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4914 ; AVX512VPOPCNTDQ-NEXT: retq
4916 ; BITALG-LABEL: ugt_10_v16i32:
4918 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4919 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4920 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4921 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4922 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4923 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4924 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4925 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4926 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4928 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
4929 %3 = icmp ugt <16 x i32> %2, <i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10, i32 10>
4930 %4 = sext <16 x i1> %3 to <16 x i32>
4934 define <16 x i32> @ult_11_v16i32(<16 x i32> %0) {
4935 ; AVX512F-LABEL: ult_11_v16i32:
4937 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
4938 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4939 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
4940 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4941 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
4942 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
4943 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
4944 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
4945 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
4946 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
4947 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
4948 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
4949 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
4950 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
4951 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
4952 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
4953 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
4954 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
4955 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
4956 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
4957 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
4958 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
4959 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
4960 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
4961 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
4962 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
4963 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
4964 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4965 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4966 ; AVX512F-NEXT: retq
4968 ; AVX512BW-LABEL: ult_11_v16i32:
4969 ; AVX512BW: # %bb.0:
4970 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
4971 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
4972 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
4973 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
4974 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
4975 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
4976 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
4977 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
4978 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
4979 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
4980 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
4981 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
4982 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
4983 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
4984 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4985 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4986 ; AVX512BW-NEXT: retq
4988 ; AVX512VPOPCNTDQ-LABEL: ult_11_v16i32:
4989 ; AVX512VPOPCNTDQ: # %bb.0:
4990 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
4991 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
4992 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
4993 ; AVX512VPOPCNTDQ-NEXT: retq
4995 ; BITALG-LABEL: ult_11_v16i32:
4997 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
4998 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
4999 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5000 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5001 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5002 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5003 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5004 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5005 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5007 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5008 %3 = icmp ult <16 x i32> %2, <i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11>
5009 %4 = sext <16 x i1> %3 to <16 x i32>
5013 define <16 x i32> @ugt_11_v16i32(<16 x i32> %0) {
5014 ; AVX512F-LABEL: ugt_11_v16i32:
5016 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5017 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5018 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5019 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5020 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5021 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5022 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5023 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5024 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5025 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5026 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5027 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5028 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5029 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5030 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5031 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5032 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5033 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5034 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5035 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5036 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5037 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5038 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5039 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5040 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5041 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5042 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5043 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5044 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5045 ; AVX512F-NEXT: retq
5047 ; AVX512BW-LABEL: ugt_11_v16i32:
5048 ; AVX512BW: # %bb.0:
5049 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5050 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5051 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5052 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5053 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5054 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5055 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5056 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5057 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5058 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5059 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5060 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5061 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5062 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5063 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5064 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5065 ; AVX512BW-NEXT: retq
5067 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v16i32:
5068 ; AVX512VPOPCNTDQ: # %bb.0:
5069 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5070 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5071 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5072 ; AVX512VPOPCNTDQ-NEXT: retq
5074 ; BITALG-LABEL: ugt_11_v16i32:
5076 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5077 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5078 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5079 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5080 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5081 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5082 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5083 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5084 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5086 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5087 %3 = icmp ugt <16 x i32> %2, <i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11, i32 11>
5088 %4 = sext <16 x i1> %3 to <16 x i32>
5092 define <16 x i32> @ult_12_v16i32(<16 x i32> %0) {
5093 ; AVX512F-LABEL: ult_12_v16i32:
5095 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5096 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5097 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5098 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5099 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5100 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5101 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5102 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5103 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5104 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5105 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5106 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5107 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5108 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5109 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5110 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5111 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5112 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5113 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5114 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5115 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5116 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5117 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5118 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5119 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5120 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5121 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5122 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5123 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5124 ; AVX512F-NEXT: retq
5126 ; AVX512BW-LABEL: ult_12_v16i32:
5127 ; AVX512BW: # %bb.0:
5128 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5129 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5130 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5131 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5132 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5133 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5134 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5135 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5136 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5137 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5138 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5139 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5140 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5141 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5142 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5143 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5144 ; AVX512BW-NEXT: retq
5146 ; AVX512VPOPCNTDQ-LABEL: ult_12_v16i32:
5147 ; AVX512VPOPCNTDQ: # %bb.0:
5148 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5149 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5150 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5151 ; AVX512VPOPCNTDQ-NEXT: retq
5153 ; BITALG-LABEL: ult_12_v16i32:
5155 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5156 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5157 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5158 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5159 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5160 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5161 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5162 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5163 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5165 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5166 %3 = icmp ult <16 x i32> %2, <i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12>
5167 %4 = sext <16 x i1> %3 to <16 x i32>
5171 define <16 x i32> @ugt_12_v16i32(<16 x i32> %0) {
5172 ; AVX512F-LABEL: ugt_12_v16i32:
5174 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5175 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5176 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5177 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5178 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5179 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5180 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5181 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5182 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5183 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5184 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5185 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5186 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5187 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5188 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5189 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5190 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5191 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5192 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5193 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5194 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5195 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5196 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5197 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5198 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5199 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5200 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5201 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5202 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5203 ; AVX512F-NEXT: retq
5205 ; AVX512BW-LABEL: ugt_12_v16i32:
5206 ; AVX512BW: # %bb.0:
5207 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5208 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5209 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5210 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5211 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5212 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5213 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5214 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5215 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5216 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5217 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5218 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5219 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5220 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5221 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5222 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5223 ; AVX512BW-NEXT: retq
5225 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v16i32:
5226 ; AVX512VPOPCNTDQ: # %bb.0:
5227 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5228 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5229 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5230 ; AVX512VPOPCNTDQ-NEXT: retq
5232 ; BITALG-LABEL: ugt_12_v16i32:
5234 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5235 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5236 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5237 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5238 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5239 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5240 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5241 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5242 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5244 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5245 %3 = icmp ugt <16 x i32> %2, <i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12, i32 12>
5246 %4 = sext <16 x i1> %3 to <16 x i32>
5250 define <16 x i32> @ult_13_v16i32(<16 x i32> %0) {
5251 ; AVX512F-LABEL: ult_13_v16i32:
5253 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5254 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5255 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5256 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5257 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5258 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5259 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5260 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5261 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5262 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5263 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5264 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5265 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5266 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5267 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5268 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5269 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5270 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5271 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5272 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5273 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5274 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5275 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5276 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5277 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5278 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5279 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5280 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5281 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5282 ; AVX512F-NEXT: retq
5284 ; AVX512BW-LABEL: ult_13_v16i32:
5285 ; AVX512BW: # %bb.0:
5286 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5287 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5288 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5289 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5290 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5291 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5292 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5293 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5294 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5295 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5296 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5297 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5298 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5299 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5300 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5301 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5302 ; AVX512BW-NEXT: retq
5304 ; AVX512VPOPCNTDQ-LABEL: ult_13_v16i32:
5305 ; AVX512VPOPCNTDQ: # %bb.0:
5306 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5307 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5308 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5309 ; AVX512VPOPCNTDQ-NEXT: retq
5311 ; BITALG-LABEL: ult_13_v16i32:
5313 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5314 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5315 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5316 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5317 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5318 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5319 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5320 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5321 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5323 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5324 %3 = icmp ult <16 x i32> %2, <i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13>
5325 %4 = sext <16 x i1> %3 to <16 x i32>
5329 define <16 x i32> @ugt_13_v16i32(<16 x i32> %0) {
5330 ; AVX512F-LABEL: ugt_13_v16i32:
5332 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5333 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5334 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5335 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5336 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5337 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5338 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5339 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5340 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5341 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5342 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5343 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5344 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5345 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5346 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5347 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5348 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5349 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5350 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5351 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5352 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5353 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5354 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5355 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5356 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5357 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5358 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5359 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5360 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5361 ; AVX512F-NEXT: retq
5363 ; AVX512BW-LABEL: ugt_13_v16i32:
5364 ; AVX512BW: # %bb.0:
5365 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5366 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5367 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5368 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5369 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5370 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5371 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5372 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5373 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5374 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5375 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5376 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5377 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5378 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5379 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5380 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5381 ; AVX512BW-NEXT: retq
5383 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v16i32:
5384 ; AVX512VPOPCNTDQ: # %bb.0:
5385 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5386 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5387 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5388 ; AVX512VPOPCNTDQ-NEXT: retq
5390 ; BITALG-LABEL: ugt_13_v16i32:
5392 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5393 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5394 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5395 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5396 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5397 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5398 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5399 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5400 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5402 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5403 %3 = icmp ugt <16 x i32> %2, <i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13, i32 13>
5404 %4 = sext <16 x i1> %3 to <16 x i32>
5408 define <16 x i32> @ult_14_v16i32(<16 x i32> %0) {
5409 ; AVX512F-LABEL: ult_14_v16i32:
5411 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5412 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5413 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5414 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5415 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5416 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5417 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5418 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5419 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5420 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5421 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5422 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5423 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5424 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5425 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5426 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5427 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5428 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5429 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5430 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5431 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5432 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5433 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5434 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5435 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5436 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5437 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5438 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5439 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5440 ; AVX512F-NEXT: retq
5442 ; AVX512BW-LABEL: ult_14_v16i32:
5443 ; AVX512BW: # %bb.0:
5444 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5445 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5446 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5447 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5448 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5449 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5450 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5451 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5452 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5453 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5454 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5455 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5456 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5457 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5458 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5459 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5460 ; AVX512BW-NEXT: retq
5462 ; AVX512VPOPCNTDQ-LABEL: ult_14_v16i32:
5463 ; AVX512VPOPCNTDQ: # %bb.0:
5464 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5465 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5466 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5467 ; AVX512VPOPCNTDQ-NEXT: retq
5469 ; BITALG-LABEL: ult_14_v16i32:
5471 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5472 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5473 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5474 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5475 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5476 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5477 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5478 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5479 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5481 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5482 %3 = icmp ult <16 x i32> %2, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
5483 %4 = sext <16 x i1> %3 to <16 x i32>
5487 define <16 x i32> @ugt_14_v16i32(<16 x i32> %0) {
5488 ; AVX512F-LABEL: ugt_14_v16i32:
5490 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5491 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5492 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5493 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5494 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5495 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5496 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5497 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5498 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5499 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5500 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5501 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5502 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5503 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5504 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5505 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5506 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5507 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5508 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5509 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5510 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5511 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5512 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5513 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5514 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5515 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5516 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5517 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5518 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5519 ; AVX512F-NEXT: retq
5521 ; AVX512BW-LABEL: ugt_14_v16i32:
5522 ; AVX512BW: # %bb.0:
5523 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5524 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5525 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5526 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5527 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5528 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5529 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5530 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5531 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5532 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5533 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5534 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5535 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5536 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5537 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5538 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5539 ; AVX512BW-NEXT: retq
5541 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v16i32:
5542 ; AVX512VPOPCNTDQ: # %bb.0:
5543 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5544 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5545 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5546 ; AVX512VPOPCNTDQ-NEXT: retq
5548 ; BITALG-LABEL: ugt_14_v16i32:
5550 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5551 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5552 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5553 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5554 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5555 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5556 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5557 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5558 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5560 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5561 %3 = icmp ugt <16 x i32> %2, <i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14, i32 14>
5562 %4 = sext <16 x i1> %3 to <16 x i32>
5566 define <16 x i32> @ult_15_v16i32(<16 x i32> %0) {
5567 ; AVX512F-LABEL: ult_15_v16i32:
5569 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5570 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5571 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5572 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5573 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5574 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5575 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5576 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5577 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5578 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5579 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5580 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5581 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5582 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5583 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5584 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5585 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5586 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5587 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5588 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5589 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5590 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5591 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5592 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5593 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5594 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5595 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5596 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5597 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5598 ; AVX512F-NEXT: retq
5600 ; AVX512BW-LABEL: ult_15_v16i32:
5601 ; AVX512BW: # %bb.0:
5602 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5603 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5604 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5605 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5606 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5607 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5608 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5609 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5610 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5611 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5612 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5613 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5614 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5615 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5616 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5617 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5618 ; AVX512BW-NEXT: retq
5620 ; AVX512VPOPCNTDQ-LABEL: ult_15_v16i32:
5621 ; AVX512VPOPCNTDQ: # %bb.0:
5622 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5623 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5624 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5625 ; AVX512VPOPCNTDQ-NEXT: retq
5627 ; BITALG-LABEL: ult_15_v16i32:
5629 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5630 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5631 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5632 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5633 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5634 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5635 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5636 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5637 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5639 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5640 %3 = icmp ult <16 x i32> %2, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
5641 %4 = sext <16 x i1> %3 to <16 x i32>
5645 define <16 x i32> @ugt_15_v16i32(<16 x i32> %0) {
5646 ; AVX512F-LABEL: ugt_15_v16i32:
5648 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5649 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5650 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5651 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5652 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5653 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5654 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5655 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5656 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5657 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5658 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5659 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5660 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5661 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5662 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5663 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5664 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5665 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5666 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5667 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5668 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5669 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5670 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5671 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5672 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5673 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5674 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5675 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5676 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5677 ; AVX512F-NEXT: retq
5679 ; AVX512BW-LABEL: ugt_15_v16i32:
5680 ; AVX512BW: # %bb.0:
5681 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5682 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5683 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5684 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5685 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5686 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5687 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5688 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5689 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5690 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5691 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5692 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5693 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5694 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5695 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5696 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5697 ; AVX512BW-NEXT: retq
5699 ; AVX512VPOPCNTDQ-LABEL: ugt_15_v16i32:
5700 ; AVX512VPOPCNTDQ: # %bb.0:
5701 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5702 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5703 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5704 ; AVX512VPOPCNTDQ-NEXT: retq
5706 ; BITALG-LABEL: ugt_15_v16i32:
5708 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5709 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5710 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5711 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5712 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5713 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5714 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5715 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5716 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5718 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5719 %3 = icmp ugt <16 x i32> %2, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
5720 %4 = sext <16 x i1> %3 to <16 x i32>
5724 define <16 x i32> @ult_16_v16i32(<16 x i32> %0) {
5725 ; AVX512F-LABEL: ult_16_v16i32:
5727 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5728 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5729 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5730 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5731 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5732 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5733 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5734 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5735 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5736 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5737 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5738 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5739 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5740 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5741 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5742 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5743 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5744 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5745 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5746 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5747 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5748 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5749 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5750 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5751 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5752 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5753 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5754 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5755 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5756 ; AVX512F-NEXT: retq
5758 ; AVX512BW-LABEL: ult_16_v16i32:
5759 ; AVX512BW: # %bb.0:
5760 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5761 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5762 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5763 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5764 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5765 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5766 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5767 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5768 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5769 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5770 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5771 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5772 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5773 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5774 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5775 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5776 ; AVX512BW-NEXT: retq
5778 ; AVX512VPOPCNTDQ-LABEL: ult_16_v16i32:
5779 ; AVX512VPOPCNTDQ: # %bb.0:
5780 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5781 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5782 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5783 ; AVX512VPOPCNTDQ-NEXT: retq
5785 ; BITALG-LABEL: ult_16_v16i32:
5787 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5788 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5789 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5790 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5791 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5792 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5793 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5794 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5795 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5797 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5798 %3 = icmp ult <16 x i32> %2, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
5799 %4 = sext <16 x i1> %3 to <16 x i32>
5803 define <16 x i32> @ugt_16_v16i32(<16 x i32> %0) {
5804 ; AVX512F-LABEL: ugt_16_v16i32:
5806 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5807 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5808 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5809 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5810 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5811 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5812 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5813 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5814 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5815 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5816 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5817 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5818 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5819 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5820 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5821 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5822 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5823 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5824 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5825 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5826 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5827 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5828 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5829 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5830 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5831 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5832 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5833 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5834 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5835 ; AVX512F-NEXT: retq
5837 ; AVX512BW-LABEL: ugt_16_v16i32:
5838 ; AVX512BW: # %bb.0:
5839 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5840 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5841 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5842 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5843 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5844 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5845 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5846 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5847 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5848 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5849 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5850 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5851 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5852 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5853 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5854 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5855 ; AVX512BW-NEXT: retq
5857 ; AVX512VPOPCNTDQ-LABEL: ugt_16_v16i32:
5858 ; AVX512VPOPCNTDQ: # %bb.0:
5859 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5860 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5861 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5862 ; AVX512VPOPCNTDQ-NEXT: retq
5864 ; BITALG-LABEL: ugt_16_v16i32:
5866 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5867 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5868 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5869 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5870 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5871 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5872 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5873 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5874 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5876 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5877 %3 = icmp ugt <16 x i32> %2, <i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16, i32 16>
5878 %4 = sext <16 x i1> %3 to <16 x i32>
5882 define <16 x i32> @ult_17_v16i32(<16 x i32> %0) {
5883 ; AVX512F-LABEL: ult_17_v16i32:
5885 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5886 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5887 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5888 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5889 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5890 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5891 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5892 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5893 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5894 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5895 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5896 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5897 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5898 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5899 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5900 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5901 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5902 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5903 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5904 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5905 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5906 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5907 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5908 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5909 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5910 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5911 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5912 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5913 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5914 ; AVX512F-NEXT: retq
5916 ; AVX512BW-LABEL: ult_17_v16i32:
5917 ; AVX512BW: # %bb.0:
5918 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5919 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5920 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5921 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
5922 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
5923 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
5924 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
5925 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
5926 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
5927 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5928 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5929 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5930 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5931 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5932 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5933 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5934 ; AVX512BW-NEXT: retq
5936 ; AVX512VPOPCNTDQ-LABEL: ult_17_v16i32:
5937 ; AVX512VPOPCNTDQ: # %bb.0:
5938 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
5939 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5940 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5941 ; AVX512VPOPCNTDQ-NEXT: retq
5943 ; BITALG-LABEL: ult_17_v16i32:
5945 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
5946 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
5947 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
5948 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
5949 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
5950 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
5951 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
5952 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5953 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5955 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
5956 %3 = icmp ult <16 x i32> %2, <i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17>
5957 %4 = sext <16 x i1> %3 to <16 x i32>
5961 define <16 x i32> @ugt_17_v16i32(<16 x i32> %0) {
5962 ; AVX512F-LABEL: ugt_17_v16i32:
5964 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
5965 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5966 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
5967 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
5968 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
5969 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
5970 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
5971 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
5972 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
5973 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
5974 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
5975 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
5976 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
5977 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
5978 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
5979 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
5980 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
5981 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
5982 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
5983 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
5984 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
5985 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
5986 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
5987 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
5988 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
5989 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
5990 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
5991 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
5992 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
5993 ; AVX512F-NEXT: retq
5995 ; AVX512BW-LABEL: ugt_17_v16i32:
5996 ; AVX512BW: # %bb.0:
5997 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
5998 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
5999 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6000 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6001 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6002 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6003 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6004 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6005 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6006 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6007 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6008 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6009 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6010 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6011 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6012 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6013 ; AVX512BW-NEXT: retq
6015 ; AVX512VPOPCNTDQ-LABEL: ugt_17_v16i32:
6016 ; AVX512VPOPCNTDQ: # %bb.0:
6017 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6018 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6019 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6020 ; AVX512VPOPCNTDQ-NEXT: retq
6022 ; BITALG-LABEL: ugt_17_v16i32:
6024 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6025 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6026 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6027 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6028 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6029 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6030 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6031 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6032 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6034 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6035 %3 = icmp ugt <16 x i32> %2, <i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17, i32 17>
6036 %4 = sext <16 x i1> %3 to <16 x i32>
6040 define <16 x i32> @ult_18_v16i32(<16 x i32> %0) {
6041 ; AVX512F-LABEL: ult_18_v16i32:
6043 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6044 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6045 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6046 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6047 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6048 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6049 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6050 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6051 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6052 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6053 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6054 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6055 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6056 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6057 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6058 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6059 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6060 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6061 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6062 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6063 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6064 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6065 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6066 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6067 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6068 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6069 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6070 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6071 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6072 ; AVX512F-NEXT: retq
6074 ; AVX512BW-LABEL: ult_18_v16i32:
6075 ; AVX512BW: # %bb.0:
6076 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6077 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6078 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6079 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6080 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6081 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6082 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6083 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6084 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6085 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6086 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6087 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6088 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6089 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6090 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6091 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6092 ; AVX512BW-NEXT: retq
6094 ; AVX512VPOPCNTDQ-LABEL: ult_18_v16i32:
6095 ; AVX512VPOPCNTDQ: # %bb.0:
6096 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6097 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6098 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6099 ; AVX512VPOPCNTDQ-NEXT: retq
6101 ; BITALG-LABEL: ult_18_v16i32:
6103 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6104 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6105 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6106 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6107 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6108 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6109 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6110 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6111 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6113 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6114 %3 = icmp ult <16 x i32> %2, <i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18>
6115 %4 = sext <16 x i1> %3 to <16 x i32>
6119 define <16 x i32> @ugt_18_v16i32(<16 x i32> %0) {
6120 ; AVX512F-LABEL: ugt_18_v16i32:
6122 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6123 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6124 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6125 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6126 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6127 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6128 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6129 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6130 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6131 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6132 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6133 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6134 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6135 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6136 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6137 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6138 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6139 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6140 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6141 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6142 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6143 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6144 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6145 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6146 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6147 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6148 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6149 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6150 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6151 ; AVX512F-NEXT: retq
6153 ; AVX512BW-LABEL: ugt_18_v16i32:
6154 ; AVX512BW: # %bb.0:
6155 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6156 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6157 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6158 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6159 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6160 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6161 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6162 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6163 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6164 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6165 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6166 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6167 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6168 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6169 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6170 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6171 ; AVX512BW-NEXT: retq
6173 ; AVX512VPOPCNTDQ-LABEL: ugt_18_v16i32:
6174 ; AVX512VPOPCNTDQ: # %bb.0:
6175 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6176 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6177 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6178 ; AVX512VPOPCNTDQ-NEXT: retq
6180 ; BITALG-LABEL: ugt_18_v16i32:
6182 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6183 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6184 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6185 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6186 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6187 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6188 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6189 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6190 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6192 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6193 %3 = icmp ugt <16 x i32> %2, <i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18, i32 18>
6194 %4 = sext <16 x i1> %3 to <16 x i32>
6198 define <16 x i32> @ult_19_v16i32(<16 x i32> %0) {
6199 ; AVX512F-LABEL: ult_19_v16i32:
6201 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6202 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6203 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6204 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6205 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6206 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6207 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6208 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6209 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6210 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6211 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6212 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6213 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6214 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6215 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6216 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6217 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6218 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6219 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6220 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6221 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6222 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6223 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6224 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6225 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6226 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6227 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6228 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6229 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6230 ; AVX512F-NEXT: retq
6232 ; AVX512BW-LABEL: ult_19_v16i32:
6233 ; AVX512BW: # %bb.0:
6234 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6235 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6236 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6237 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6238 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6239 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6240 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6241 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6242 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6243 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6244 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6245 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6246 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6247 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6248 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6249 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6250 ; AVX512BW-NEXT: retq
6252 ; AVX512VPOPCNTDQ-LABEL: ult_19_v16i32:
6253 ; AVX512VPOPCNTDQ: # %bb.0:
6254 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6255 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6256 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6257 ; AVX512VPOPCNTDQ-NEXT: retq
6259 ; BITALG-LABEL: ult_19_v16i32:
6261 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6262 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6263 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6264 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6265 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6266 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6267 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6268 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6269 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6271 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6272 %3 = icmp ult <16 x i32> %2, <i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19>
6273 %4 = sext <16 x i1> %3 to <16 x i32>
6277 define <16 x i32> @ugt_19_v16i32(<16 x i32> %0) {
6278 ; AVX512F-LABEL: ugt_19_v16i32:
6280 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6281 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6282 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6283 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6284 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6285 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6286 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6287 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6288 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6289 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6290 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6291 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6292 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6293 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6294 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6295 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6296 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6297 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6298 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6299 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6300 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6301 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6302 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6303 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6304 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6305 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6306 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6307 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6308 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6309 ; AVX512F-NEXT: retq
6311 ; AVX512BW-LABEL: ugt_19_v16i32:
6312 ; AVX512BW: # %bb.0:
6313 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6314 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6315 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6316 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6317 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6318 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6319 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6320 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6321 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6322 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6323 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6324 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6325 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6326 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6327 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6328 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6329 ; AVX512BW-NEXT: retq
6331 ; AVX512VPOPCNTDQ-LABEL: ugt_19_v16i32:
6332 ; AVX512VPOPCNTDQ: # %bb.0:
6333 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6334 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6335 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6336 ; AVX512VPOPCNTDQ-NEXT: retq
6338 ; BITALG-LABEL: ugt_19_v16i32:
6340 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6341 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6342 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6343 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6344 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6345 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6346 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6347 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6348 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6350 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6351 %3 = icmp ugt <16 x i32> %2, <i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19, i32 19>
6352 %4 = sext <16 x i1> %3 to <16 x i32>
6356 define <16 x i32> @ult_20_v16i32(<16 x i32> %0) {
6357 ; AVX512F-LABEL: ult_20_v16i32:
6359 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6360 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6361 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6362 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6363 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6364 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6365 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6366 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6367 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6368 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6369 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6370 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6371 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6372 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6373 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6374 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6375 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6376 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6377 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6378 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6379 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6380 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6381 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6382 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6383 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6384 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6385 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6386 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6387 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6388 ; AVX512F-NEXT: retq
6390 ; AVX512BW-LABEL: ult_20_v16i32:
6391 ; AVX512BW: # %bb.0:
6392 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6393 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6394 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6395 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6396 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6397 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6398 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6399 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6400 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6401 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6402 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6403 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6404 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6405 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6406 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6407 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6408 ; AVX512BW-NEXT: retq
6410 ; AVX512VPOPCNTDQ-LABEL: ult_20_v16i32:
6411 ; AVX512VPOPCNTDQ: # %bb.0:
6412 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6413 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6414 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6415 ; AVX512VPOPCNTDQ-NEXT: retq
6417 ; BITALG-LABEL: ult_20_v16i32:
6419 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6420 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6421 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6422 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6423 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6424 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6425 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6426 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6427 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6429 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6430 %3 = icmp ult <16 x i32> %2, <i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20>
6431 %4 = sext <16 x i1> %3 to <16 x i32>
6435 define <16 x i32> @ugt_20_v16i32(<16 x i32> %0) {
6436 ; AVX512F-LABEL: ugt_20_v16i32:
6438 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6439 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6440 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6441 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6442 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6443 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6444 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6445 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6446 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6447 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6448 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6449 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6450 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6451 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6452 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6453 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6454 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6455 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6456 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6457 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6458 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6459 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6460 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6461 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6462 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6463 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6464 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6465 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6466 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6467 ; AVX512F-NEXT: retq
6469 ; AVX512BW-LABEL: ugt_20_v16i32:
6470 ; AVX512BW: # %bb.0:
6471 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6472 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6473 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6474 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6475 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6476 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6477 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6478 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6479 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6480 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6481 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6482 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6483 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6484 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6485 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6486 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6487 ; AVX512BW-NEXT: retq
6489 ; AVX512VPOPCNTDQ-LABEL: ugt_20_v16i32:
6490 ; AVX512VPOPCNTDQ: # %bb.0:
6491 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6492 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6493 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6494 ; AVX512VPOPCNTDQ-NEXT: retq
6496 ; BITALG-LABEL: ugt_20_v16i32:
6498 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6499 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6500 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6501 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6502 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6503 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6504 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6505 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6506 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6508 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6509 %3 = icmp ugt <16 x i32> %2, <i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20, i32 20>
6510 %4 = sext <16 x i1> %3 to <16 x i32>
6514 define <16 x i32> @ult_21_v16i32(<16 x i32> %0) {
6515 ; AVX512F-LABEL: ult_21_v16i32:
6517 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6518 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6519 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6520 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6521 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6522 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6523 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6524 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6525 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6526 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6527 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6528 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6529 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6530 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6531 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6532 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6533 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6534 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6535 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6536 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6537 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6538 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6539 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6540 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6541 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6542 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6543 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6544 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6545 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6546 ; AVX512F-NEXT: retq
6548 ; AVX512BW-LABEL: ult_21_v16i32:
6549 ; AVX512BW: # %bb.0:
6550 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6551 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6552 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6553 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6554 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6555 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6556 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6557 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6558 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6559 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6560 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6561 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6562 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6563 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6564 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6565 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6566 ; AVX512BW-NEXT: retq
6568 ; AVX512VPOPCNTDQ-LABEL: ult_21_v16i32:
6569 ; AVX512VPOPCNTDQ: # %bb.0:
6570 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6571 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6572 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6573 ; AVX512VPOPCNTDQ-NEXT: retq
6575 ; BITALG-LABEL: ult_21_v16i32:
6577 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6578 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6579 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6580 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6581 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6582 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6583 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6584 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6585 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6587 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6588 %3 = icmp ult <16 x i32> %2, <i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21>
6589 %4 = sext <16 x i1> %3 to <16 x i32>
6593 define <16 x i32> @ugt_21_v16i32(<16 x i32> %0) {
6594 ; AVX512F-LABEL: ugt_21_v16i32:
6596 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6597 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6598 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6599 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6600 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6601 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6602 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6603 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6604 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6605 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6606 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6607 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6608 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6609 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6610 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6611 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6612 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6613 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6614 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6615 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6616 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6617 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6618 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6619 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6620 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6621 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6622 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6623 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6624 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6625 ; AVX512F-NEXT: retq
6627 ; AVX512BW-LABEL: ugt_21_v16i32:
6628 ; AVX512BW: # %bb.0:
6629 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6630 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6631 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6632 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6633 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6634 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6635 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6636 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6637 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6638 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6639 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6640 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6641 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6642 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6643 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6644 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6645 ; AVX512BW-NEXT: retq
6647 ; AVX512VPOPCNTDQ-LABEL: ugt_21_v16i32:
6648 ; AVX512VPOPCNTDQ: # %bb.0:
6649 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6650 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6651 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6652 ; AVX512VPOPCNTDQ-NEXT: retq
6654 ; BITALG-LABEL: ugt_21_v16i32:
6656 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6657 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6658 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6659 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6660 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6661 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6662 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6663 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6664 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6666 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6667 %3 = icmp ugt <16 x i32> %2, <i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21, i32 21>
6668 %4 = sext <16 x i1> %3 to <16 x i32>
6672 define <16 x i32> @ult_22_v16i32(<16 x i32> %0) {
6673 ; AVX512F-LABEL: ult_22_v16i32:
6675 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6676 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6677 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6678 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6679 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6680 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6681 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6682 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6683 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6684 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6685 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6686 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6687 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6688 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6689 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6690 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6691 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6692 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6693 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6694 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6695 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6696 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6697 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6698 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6699 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6700 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6701 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6702 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6703 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6704 ; AVX512F-NEXT: retq
6706 ; AVX512BW-LABEL: ult_22_v16i32:
6707 ; AVX512BW: # %bb.0:
6708 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6709 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6710 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6711 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6712 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6713 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6714 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6715 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6716 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6717 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6718 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6719 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6720 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6721 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6722 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6723 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6724 ; AVX512BW-NEXT: retq
6726 ; AVX512VPOPCNTDQ-LABEL: ult_22_v16i32:
6727 ; AVX512VPOPCNTDQ: # %bb.0:
6728 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6729 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6730 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6731 ; AVX512VPOPCNTDQ-NEXT: retq
6733 ; BITALG-LABEL: ult_22_v16i32:
6735 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6736 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6737 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6738 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6739 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6740 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6741 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6742 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6743 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6745 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6746 %3 = icmp ult <16 x i32> %2, <i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22>
6747 %4 = sext <16 x i1> %3 to <16 x i32>
6751 define <16 x i32> @ugt_22_v16i32(<16 x i32> %0) {
6752 ; AVX512F-LABEL: ugt_22_v16i32:
6754 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6755 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6756 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6757 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6758 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6759 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6760 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6761 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6762 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6763 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6764 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6765 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6766 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6767 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6768 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6769 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6770 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6771 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6772 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6773 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6774 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6775 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6776 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6777 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6778 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6779 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6780 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6781 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6782 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6783 ; AVX512F-NEXT: retq
6785 ; AVX512BW-LABEL: ugt_22_v16i32:
6786 ; AVX512BW: # %bb.0:
6787 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6788 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6789 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6790 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6791 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6792 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6793 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6794 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6795 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6796 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6797 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6798 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6799 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6800 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6801 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6802 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6803 ; AVX512BW-NEXT: retq
6805 ; AVX512VPOPCNTDQ-LABEL: ugt_22_v16i32:
6806 ; AVX512VPOPCNTDQ: # %bb.0:
6807 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6808 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6809 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6810 ; AVX512VPOPCNTDQ-NEXT: retq
6812 ; BITALG-LABEL: ugt_22_v16i32:
6814 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6815 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6816 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6817 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6818 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6819 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6820 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6821 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6822 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6824 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6825 %3 = icmp ugt <16 x i32> %2, <i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22, i32 22>
6826 %4 = sext <16 x i1> %3 to <16 x i32>
6830 define <16 x i32> @ult_23_v16i32(<16 x i32> %0) {
6831 ; AVX512F-LABEL: ult_23_v16i32:
6833 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6834 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6835 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6836 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6837 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6838 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6839 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6840 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6841 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6842 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6843 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6844 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6845 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6846 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6847 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6848 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6849 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6850 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6851 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6852 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6853 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6854 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6855 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6856 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6857 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6858 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6859 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6860 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6861 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6862 ; AVX512F-NEXT: retq
6864 ; AVX512BW-LABEL: ult_23_v16i32:
6865 ; AVX512BW: # %bb.0:
6866 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6867 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6868 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6869 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6870 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6871 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6872 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6873 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6874 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6875 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6876 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6877 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6878 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6879 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6880 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6881 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6882 ; AVX512BW-NEXT: retq
6884 ; AVX512VPOPCNTDQ-LABEL: ult_23_v16i32:
6885 ; AVX512VPOPCNTDQ: # %bb.0:
6886 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6887 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6888 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6889 ; AVX512VPOPCNTDQ-NEXT: retq
6891 ; BITALG-LABEL: ult_23_v16i32:
6893 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6894 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6895 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6896 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6897 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6898 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6899 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6900 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6901 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6903 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6904 %3 = icmp ult <16 x i32> %2, <i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23>
6905 %4 = sext <16 x i1> %3 to <16 x i32>
6909 define <16 x i32> @ugt_23_v16i32(<16 x i32> %0) {
6910 ; AVX512F-LABEL: ugt_23_v16i32:
6912 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6913 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6914 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6915 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6916 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6917 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6918 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6919 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6920 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
6921 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
6922 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
6923 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
6924 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
6925 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
6926 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
6927 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
6928 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
6929 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
6930 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
6931 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
6932 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
6933 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
6934 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
6935 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
6936 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
6937 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
6938 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
6939 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6940 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6941 ; AVX512F-NEXT: retq
6943 ; AVX512BW-LABEL: ugt_23_v16i32:
6944 ; AVX512BW: # %bb.0:
6945 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6946 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
6947 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6948 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
6949 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
6950 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
6951 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
6952 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
6953 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
6954 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6955 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6956 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6957 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6958 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6959 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6960 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6961 ; AVX512BW-NEXT: retq
6963 ; AVX512VPOPCNTDQ-LABEL: ugt_23_v16i32:
6964 ; AVX512VPOPCNTDQ: # %bb.0:
6965 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
6966 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6967 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6968 ; AVX512VPOPCNTDQ-NEXT: retq
6970 ; BITALG-LABEL: ugt_23_v16i32:
6972 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
6973 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
6974 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
6975 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
6976 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
6977 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
6978 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
6979 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
6980 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
6982 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
6983 %3 = icmp ugt <16 x i32> %2, <i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23, i32 23>
6984 %4 = sext <16 x i1> %3 to <16 x i32>
6988 define <16 x i32> @ult_24_v16i32(<16 x i32> %0) {
6989 ; AVX512F-LABEL: ult_24_v16i32:
6991 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
6992 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
6993 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
6994 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
6995 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
6996 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
6997 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
6998 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
6999 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7000 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7001 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7002 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7003 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7004 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7005 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7006 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7007 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7008 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7009 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7010 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7011 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7012 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7013 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7014 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7015 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7016 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7017 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7018 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7019 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7020 ; AVX512F-NEXT: retq
7022 ; AVX512BW-LABEL: ult_24_v16i32:
7023 ; AVX512BW: # %bb.0:
7024 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7025 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7026 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7027 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7028 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7029 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7030 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7031 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7032 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7033 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7034 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7035 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7036 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7037 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7038 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7039 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7040 ; AVX512BW-NEXT: retq
7042 ; AVX512VPOPCNTDQ-LABEL: ult_24_v16i32:
7043 ; AVX512VPOPCNTDQ: # %bb.0:
7044 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7045 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7046 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7047 ; AVX512VPOPCNTDQ-NEXT: retq
7049 ; BITALG-LABEL: ult_24_v16i32:
7051 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7052 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7053 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7054 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7055 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7056 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7057 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7058 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7059 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7061 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7062 %3 = icmp ult <16 x i32> %2, <i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24>
7063 %4 = sext <16 x i1> %3 to <16 x i32>
7067 define <16 x i32> @ugt_24_v16i32(<16 x i32> %0) {
7068 ; AVX512F-LABEL: ugt_24_v16i32:
7070 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7071 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7072 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7073 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7074 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7075 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7076 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7077 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7078 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7079 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7080 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7081 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7082 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7083 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7084 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7085 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7086 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7087 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7088 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7089 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7090 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7091 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7092 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7093 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7094 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7095 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7096 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7097 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7098 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7099 ; AVX512F-NEXT: retq
7101 ; AVX512BW-LABEL: ugt_24_v16i32:
7102 ; AVX512BW: # %bb.0:
7103 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7104 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7105 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7106 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7107 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7108 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7109 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7110 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7111 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7112 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7113 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7114 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7115 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7116 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7117 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7118 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7119 ; AVX512BW-NEXT: retq
7121 ; AVX512VPOPCNTDQ-LABEL: ugt_24_v16i32:
7122 ; AVX512VPOPCNTDQ: # %bb.0:
7123 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7124 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7125 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7126 ; AVX512VPOPCNTDQ-NEXT: retq
7128 ; BITALG-LABEL: ugt_24_v16i32:
7130 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7131 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7132 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7133 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7134 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7135 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7136 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7137 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7138 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7140 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7141 %3 = icmp ugt <16 x i32> %2, <i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24, i32 24>
7142 %4 = sext <16 x i1> %3 to <16 x i32>
7146 define <16 x i32> @ult_25_v16i32(<16 x i32> %0) {
7147 ; AVX512F-LABEL: ult_25_v16i32:
7149 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7150 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7151 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7152 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7153 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7154 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7155 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7156 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7157 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7158 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7159 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7160 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7161 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7162 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7163 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7164 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7165 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7166 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7167 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7168 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7169 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7170 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7171 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7172 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7173 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7174 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7175 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7176 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7177 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7178 ; AVX512F-NEXT: retq
7180 ; AVX512BW-LABEL: ult_25_v16i32:
7181 ; AVX512BW: # %bb.0:
7182 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7183 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7184 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7185 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7186 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7187 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7188 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7189 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7190 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7191 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7192 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7193 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7194 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7195 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7196 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7197 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7198 ; AVX512BW-NEXT: retq
7200 ; AVX512VPOPCNTDQ-LABEL: ult_25_v16i32:
7201 ; AVX512VPOPCNTDQ: # %bb.0:
7202 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7203 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7204 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7205 ; AVX512VPOPCNTDQ-NEXT: retq
7207 ; BITALG-LABEL: ult_25_v16i32:
7209 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7210 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7211 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7212 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7213 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7214 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7215 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7216 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7217 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7219 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7220 %3 = icmp ult <16 x i32> %2, <i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25>
7221 %4 = sext <16 x i1> %3 to <16 x i32>
7225 define <16 x i32> @ugt_25_v16i32(<16 x i32> %0) {
7226 ; AVX512F-LABEL: ugt_25_v16i32:
7228 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7229 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7230 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7231 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7232 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7233 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7234 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7235 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7236 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7237 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7238 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7239 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7240 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7241 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7242 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7243 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7244 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7245 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7246 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7247 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7248 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7249 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7250 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7251 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7252 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7253 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7254 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7255 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7256 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7257 ; AVX512F-NEXT: retq
7259 ; AVX512BW-LABEL: ugt_25_v16i32:
7260 ; AVX512BW: # %bb.0:
7261 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7262 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7263 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7264 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7265 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7266 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7267 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7268 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7269 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7270 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7271 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7272 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7273 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7274 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7275 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7276 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7277 ; AVX512BW-NEXT: retq
7279 ; AVX512VPOPCNTDQ-LABEL: ugt_25_v16i32:
7280 ; AVX512VPOPCNTDQ: # %bb.0:
7281 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7282 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7283 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7284 ; AVX512VPOPCNTDQ-NEXT: retq
7286 ; BITALG-LABEL: ugt_25_v16i32:
7288 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7289 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7290 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7291 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7292 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7293 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7294 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7295 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7296 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7298 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7299 %3 = icmp ugt <16 x i32> %2, <i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25, i32 25>
7300 %4 = sext <16 x i1> %3 to <16 x i32>
7304 define <16 x i32> @ult_26_v16i32(<16 x i32> %0) {
7305 ; AVX512F-LABEL: ult_26_v16i32:
7307 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7308 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7309 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7310 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7311 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7312 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7313 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7314 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7315 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7316 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7317 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7318 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7319 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7320 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7321 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7322 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7323 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7324 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7325 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7326 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7327 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7328 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7329 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7330 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7331 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7332 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7333 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7334 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7335 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7336 ; AVX512F-NEXT: retq
7338 ; AVX512BW-LABEL: ult_26_v16i32:
7339 ; AVX512BW: # %bb.0:
7340 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7341 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7342 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7343 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7344 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7345 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7346 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7347 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7348 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7349 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7350 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7351 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7352 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7353 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7354 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7355 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7356 ; AVX512BW-NEXT: retq
7358 ; AVX512VPOPCNTDQ-LABEL: ult_26_v16i32:
7359 ; AVX512VPOPCNTDQ: # %bb.0:
7360 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7361 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7362 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7363 ; AVX512VPOPCNTDQ-NEXT: retq
7365 ; BITALG-LABEL: ult_26_v16i32:
7367 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7368 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7369 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7370 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7371 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7372 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7373 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7374 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7375 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7377 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7378 %3 = icmp ult <16 x i32> %2, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
7379 %4 = sext <16 x i1> %3 to <16 x i32>
7383 define <16 x i32> @ugt_26_v16i32(<16 x i32> %0) {
7384 ; AVX512F-LABEL: ugt_26_v16i32:
7386 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7387 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7388 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7389 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7390 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7391 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7392 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7393 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7394 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7395 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7396 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7397 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7398 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7399 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7400 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7401 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7402 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7403 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7404 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7405 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7406 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7407 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7408 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7409 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7410 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7411 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7412 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7413 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7414 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7415 ; AVX512F-NEXT: retq
7417 ; AVX512BW-LABEL: ugt_26_v16i32:
7418 ; AVX512BW: # %bb.0:
7419 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7420 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7421 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7422 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7423 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7424 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7425 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7426 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7427 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7428 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7429 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7430 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7431 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7432 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7433 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7434 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7435 ; AVX512BW-NEXT: retq
7437 ; AVX512VPOPCNTDQ-LABEL: ugt_26_v16i32:
7438 ; AVX512VPOPCNTDQ: # %bb.0:
7439 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7440 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7441 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7442 ; AVX512VPOPCNTDQ-NEXT: retq
7444 ; BITALG-LABEL: ugt_26_v16i32:
7446 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7447 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7448 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7449 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7450 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7451 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7452 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7453 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7454 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7456 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7457 %3 = icmp ugt <16 x i32> %2, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26>
7458 %4 = sext <16 x i1> %3 to <16 x i32>
7462 define <16 x i32> @ult_27_v16i32(<16 x i32> %0) {
7463 ; AVX512F-LABEL: ult_27_v16i32:
7465 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7466 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7467 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7468 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7469 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7470 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7471 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7472 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7473 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7474 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7475 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7476 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7477 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7478 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7479 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7480 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7481 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7482 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7483 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7484 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7485 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7486 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7487 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7488 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7489 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7490 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7491 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7492 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7493 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7494 ; AVX512F-NEXT: retq
7496 ; AVX512BW-LABEL: ult_27_v16i32:
7497 ; AVX512BW: # %bb.0:
7498 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7499 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7500 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7501 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7502 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7503 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7504 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7505 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7506 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7507 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7508 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7509 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7510 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7511 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7512 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7513 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7514 ; AVX512BW-NEXT: retq
7516 ; AVX512VPOPCNTDQ-LABEL: ult_27_v16i32:
7517 ; AVX512VPOPCNTDQ: # %bb.0:
7518 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7519 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7520 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7521 ; AVX512VPOPCNTDQ-NEXT: retq
7523 ; BITALG-LABEL: ult_27_v16i32:
7525 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7526 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7527 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7528 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7529 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7530 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7531 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7532 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7533 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7535 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7536 %3 = icmp ult <16 x i32> %2, <i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27>
7537 %4 = sext <16 x i1> %3 to <16 x i32>
7541 define <16 x i32> @ugt_27_v16i32(<16 x i32> %0) {
7542 ; AVX512F-LABEL: ugt_27_v16i32:
7544 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7545 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7546 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7547 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7548 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7549 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7550 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7551 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7552 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7553 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7554 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7555 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7556 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7557 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7558 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7559 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7560 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7561 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7562 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7563 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7564 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7565 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7566 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7567 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7568 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7569 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7570 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7571 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7572 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7573 ; AVX512F-NEXT: retq
7575 ; AVX512BW-LABEL: ugt_27_v16i32:
7576 ; AVX512BW: # %bb.0:
7577 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7578 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7579 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7580 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7581 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7582 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7583 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7584 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7585 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7586 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7587 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7588 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7589 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7590 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7591 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7592 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7593 ; AVX512BW-NEXT: retq
7595 ; AVX512VPOPCNTDQ-LABEL: ugt_27_v16i32:
7596 ; AVX512VPOPCNTDQ: # %bb.0:
7597 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7598 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7599 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7600 ; AVX512VPOPCNTDQ-NEXT: retq
7602 ; BITALG-LABEL: ugt_27_v16i32:
7604 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7605 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7606 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7607 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7608 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7609 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7610 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7611 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7612 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7614 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7615 %3 = icmp ugt <16 x i32> %2, <i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27, i32 27>
7616 %4 = sext <16 x i1> %3 to <16 x i32>
7620 define <16 x i32> @ult_28_v16i32(<16 x i32> %0) {
7621 ; AVX512F-LABEL: ult_28_v16i32:
7623 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7624 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7625 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7626 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7627 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7628 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7629 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7630 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7631 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7632 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7633 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7634 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7635 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7636 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7637 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7638 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7639 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7640 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7641 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7642 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7643 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7644 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7645 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7646 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7647 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7648 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7649 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7650 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7651 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7652 ; AVX512F-NEXT: retq
7654 ; AVX512BW-LABEL: ult_28_v16i32:
7655 ; AVX512BW: # %bb.0:
7656 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7657 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7658 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7659 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7660 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7661 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7662 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7663 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7664 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7665 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7666 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7667 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7668 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7669 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7670 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7671 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7672 ; AVX512BW-NEXT: retq
7674 ; AVX512VPOPCNTDQ-LABEL: ult_28_v16i32:
7675 ; AVX512VPOPCNTDQ: # %bb.0:
7676 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7677 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7678 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7679 ; AVX512VPOPCNTDQ-NEXT: retq
7681 ; BITALG-LABEL: ult_28_v16i32:
7683 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7684 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7685 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7686 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7687 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7688 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7689 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7690 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7691 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7693 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7694 %3 = icmp ult <16 x i32> %2, <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>
7695 %4 = sext <16 x i1> %3 to <16 x i32>
7699 define <16 x i32> @ugt_28_v16i32(<16 x i32> %0) {
7700 ; AVX512F-LABEL: ugt_28_v16i32:
7702 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7703 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7704 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7705 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7706 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7707 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7708 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7709 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7710 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7711 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7712 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7713 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7714 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7715 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7716 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7717 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7718 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7719 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7720 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7721 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7722 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7723 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7724 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7725 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7726 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7727 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7728 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7729 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7730 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7731 ; AVX512F-NEXT: retq
7733 ; AVX512BW-LABEL: ugt_28_v16i32:
7734 ; AVX512BW: # %bb.0:
7735 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7736 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7737 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7738 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7739 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7740 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7741 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7742 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7743 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7744 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7745 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7746 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7747 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7748 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7749 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7750 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7751 ; AVX512BW-NEXT: retq
7753 ; AVX512VPOPCNTDQ-LABEL: ugt_28_v16i32:
7754 ; AVX512VPOPCNTDQ: # %bb.0:
7755 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7756 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7757 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7758 ; AVX512VPOPCNTDQ-NEXT: retq
7760 ; BITALG-LABEL: ugt_28_v16i32:
7762 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7763 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7764 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7765 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7766 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7767 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7768 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7769 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7770 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7772 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7773 %3 = icmp ugt <16 x i32> %2, <i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28, i32 28>
7774 %4 = sext <16 x i1> %3 to <16 x i32>
7778 define <16 x i32> @ult_29_v16i32(<16 x i32> %0) {
7779 ; AVX512F-LABEL: ult_29_v16i32:
7781 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7782 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7783 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7784 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7785 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7786 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7787 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7788 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7789 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7790 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7791 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7792 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7793 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7794 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7795 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7796 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7797 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7798 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7799 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7800 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7801 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7802 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7803 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7804 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7805 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7806 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7807 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7808 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7809 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7810 ; AVX512F-NEXT: retq
7812 ; AVX512BW-LABEL: ult_29_v16i32:
7813 ; AVX512BW: # %bb.0:
7814 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7815 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7816 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7817 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7818 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7819 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7820 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7821 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7822 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7823 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7824 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7825 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7826 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7827 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7828 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7829 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7830 ; AVX512BW-NEXT: retq
7832 ; AVX512VPOPCNTDQ-LABEL: ult_29_v16i32:
7833 ; AVX512VPOPCNTDQ: # %bb.0:
7834 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7835 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7836 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7837 ; AVX512VPOPCNTDQ-NEXT: retq
7839 ; BITALG-LABEL: ult_29_v16i32:
7841 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7842 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7843 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7844 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7845 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7846 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7847 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7848 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7849 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7851 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7852 %3 = icmp ult <16 x i32> %2, <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>
7853 %4 = sext <16 x i1> %3 to <16 x i32>
7857 define <16 x i32> @ugt_29_v16i32(<16 x i32> %0) {
7858 ; AVX512F-LABEL: ugt_29_v16i32:
7860 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7861 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7862 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7863 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7864 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7865 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7866 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7867 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7868 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7869 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7870 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7871 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7872 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7873 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7874 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7875 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7876 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7877 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7878 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7879 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7880 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7881 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7882 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7883 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7884 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7885 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7886 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7887 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7888 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7889 ; AVX512F-NEXT: retq
7891 ; AVX512BW-LABEL: ugt_29_v16i32:
7892 ; AVX512BW: # %bb.0:
7893 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7894 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7895 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7896 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7897 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7898 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7899 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7900 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7901 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7902 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7903 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7904 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7905 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7906 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7907 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7908 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7909 ; AVX512BW-NEXT: retq
7911 ; AVX512VPOPCNTDQ-LABEL: ugt_29_v16i32:
7912 ; AVX512VPOPCNTDQ: # %bb.0:
7913 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7914 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7915 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7916 ; AVX512VPOPCNTDQ-NEXT: retq
7918 ; BITALG-LABEL: ugt_29_v16i32:
7920 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
7921 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
7922 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7923 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7924 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7925 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7926 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7927 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7928 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7930 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
7931 %3 = icmp ugt <16 x i32> %2, <i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29, i32 29>
7932 %4 = sext <16 x i1> %3 to <16 x i32>
7936 define <16 x i32> @ult_30_v16i32(<16 x i32> %0) {
7937 ; AVX512F-LABEL: ult_30_v16i32:
7939 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
7940 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7941 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
7942 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7943 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
7944 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
7945 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
7946 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
7947 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
7948 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
7949 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
7950 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
7951 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
7952 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
7953 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
7954 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
7955 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
7956 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
7957 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
7958 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
7959 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
7960 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
7961 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
7962 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
7963 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
7964 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
7965 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
7966 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7967 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7968 ; AVX512F-NEXT: retq
7970 ; AVX512BW-LABEL: ult_30_v16i32:
7971 ; AVX512BW: # %bb.0:
7972 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
7973 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
7974 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
7975 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
7976 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
7977 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
7978 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
7979 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
7980 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
7981 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
7982 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
7983 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
7984 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
7985 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
7986 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7987 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7988 ; AVX512BW-NEXT: retq
7990 ; AVX512VPOPCNTDQ-LABEL: ult_30_v16i32:
7991 ; AVX512VPOPCNTDQ: # %bb.0:
7992 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
7993 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
7994 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
7995 ; AVX512VPOPCNTDQ-NEXT: retq
7997 ; BITALG-LABEL: ult_30_v16i32:
7999 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8000 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8001 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8002 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8003 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8004 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8005 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8006 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8007 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8009 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8010 %3 = icmp ult <16 x i32> %2, <i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30>
8011 %4 = sext <16 x i1> %3 to <16 x i32>
8015 define <16 x i32> @ugt_30_v16i32(<16 x i32> %0) {
8016 ; AVX512F-LABEL: ugt_30_v16i32:
8018 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8019 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8020 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8021 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8022 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8023 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8024 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8025 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8026 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8027 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8028 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
8029 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
8030 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
8031 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8032 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
8033 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8034 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8035 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8036 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8037 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8038 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8039 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
8040 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
8041 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
8042 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8043 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8044 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8045 ; AVX512F-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8046 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8047 ; AVX512F-NEXT: retq
8049 ; AVX512BW-LABEL: ugt_30_v16i32:
8050 ; AVX512BW: # %bb.0:
8051 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8052 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8053 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8054 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8055 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8056 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8057 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8058 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8059 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8060 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8061 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8062 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8063 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8064 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8065 ; AVX512BW-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8066 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8067 ; AVX512BW-NEXT: retq
8069 ; AVX512VPOPCNTDQ-LABEL: ugt_30_v16i32:
8070 ; AVX512VPOPCNTDQ: # %bb.0:
8071 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8072 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8073 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8074 ; AVX512VPOPCNTDQ-NEXT: retq
8076 ; BITALG-LABEL: ugt_30_v16i32:
8078 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8079 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8080 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8081 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8082 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8083 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8084 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8085 ; BITALG-NEXT: vpcmpnleud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8086 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8088 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8089 %3 = icmp ugt <16 x i32> %2, <i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30, i32 30>
8090 %4 = sext <16 x i1> %3 to <16 x i32>
8094 define <16 x i32> @ult_31_v16i32(<16 x i32> %0) {
8095 ; AVX512F-LABEL: ult_31_v16i32:
8097 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8098 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8099 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8100 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8101 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8102 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8103 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8104 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8105 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8106 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8107 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm5 = ymm1[2],ymm3[2],ymm1[3],ymm3[3],ymm1[6],ymm3[6],ymm1[7],ymm3[7]
8108 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm5, %ymm5
8109 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm1 = ymm1[0],ymm3[0],ymm1[1],ymm3[1],ymm1[4],ymm3[4],ymm1[5],ymm3[5]
8110 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8111 ; AVX512F-NEXT: vpackuswb %ymm5, %ymm1, %ymm1
8112 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8113 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8114 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8115 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8116 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8117 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8118 ; AVX512F-NEXT: vpunpckhdq {{.*#+}} ymm2 = ymm0[2],ymm3[2],ymm0[3],ymm3[3],ymm0[6],ymm3[6],ymm0[7],ymm3[7]
8119 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm2, %ymm2
8120 ; AVX512F-NEXT: vpunpckldq {{.*#+}} ymm0 = ymm0[0],ymm3[0],ymm0[1],ymm3[1],ymm0[4],ymm3[4],ymm0[5],ymm3[5]
8121 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8122 ; AVX512F-NEXT: vpackuswb %ymm2, %ymm0, %ymm0
8123 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8124 ; AVX512F-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8125 ; AVX512F-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8126 ; AVX512F-NEXT: retq
8128 ; AVX512BW-LABEL: ult_31_v16i32:
8129 ; AVX512BW: # %bb.0:
8130 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8131 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8132 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8133 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8134 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8135 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8136 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8137 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8138 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8139 ; AVX512BW-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8140 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8141 ; AVX512BW-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8142 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8143 ; AVX512BW-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8144 ; AVX512BW-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8145 ; AVX512BW-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8146 ; AVX512BW-NEXT: retq
8148 ; AVX512VPOPCNTDQ-LABEL: ult_31_v16i32:
8149 ; AVX512VPOPCNTDQ: # %bb.0:
8150 ; AVX512VPOPCNTDQ-NEXT: vpopcntd %zmm0, %zmm0
8151 ; AVX512VPOPCNTDQ-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8152 ; AVX512VPOPCNTDQ-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8153 ; AVX512VPOPCNTDQ-NEXT: retq
8155 ; BITALG-LABEL: ult_31_v16i32:
8157 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8158 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8159 ; BITALG-NEXT: vpunpckhdq {{.*#+}} zmm2 = zmm0[2],zmm1[2],zmm0[3],zmm1[3],zmm0[6],zmm1[6],zmm0[7],zmm1[7],zmm0[10],zmm1[10],zmm0[11],zmm1[11],zmm0[14],zmm1[14],zmm0[15],zmm1[15]
8160 ; BITALG-NEXT: vpsadbw %zmm1, %zmm2, %zmm2
8161 ; BITALG-NEXT: vpunpckldq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[1],zmm1[1],zmm0[4],zmm1[4],zmm0[5],zmm1[5],zmm0[8],zmm1[8],zmm0[9],zmm1[9],zmm0[12],zmm1[12],zmm0[13],zmm1[13]
8162 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8163 ; BITALG-NEXT: vpackuswb %zmm2, %zmm0, %zmm0
8164 ; BITALG-NEXT: vpcmpltud {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to16}, %zmm0, %k1
8165 ; BITALG-NEXT: vpternlogd $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8167 %2 = tail call <16 x i32> @llvm.ctpop.v16i32(<16 x i32> %0)
8168 %3 = icmp ult <16 x i32> %2, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
8169 %4 = sext <16 x i1> %3 to <16 x i32>
8173 define <8 x i64> @ugt_1_v8i64(<8 x i64> %0) {
8174 ; AVX512F-LABEL: ugt_1_v8i64:
8176 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8177 ; AVX512F-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8178 ; AVX512F-NEXT: vptestmq %zmm1, %zmm0, %k1
8179 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8180 ; AVX512F-NEXT: retq
8182 ; AVX512BW-LABEL: ugt_1_v8i64:
8183 ; AVX512BW: # %bb.0:
8184 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8185 ; AVX512BW-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8186 ; AVX512BW-NEXT: vptestmq %zmm1, %zmm0, %k1
8187 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8188 ; AVX512BW-NEXT: retq
8190 ; AVX512VPOPCNTDQ-LABEL: ugt_1_v8i64:
8191 ; AVX512VPOPCNTDQ: # %bb.0:
8192 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8193 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8194 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8195 ; AVX512VPOPCNTDQ-NEXT: retq
8197 ; BITALG-LABEL: ugt_1_v8i64:
8199 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8200 ; BITALG-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8201 ; BITALG-NEXT: vptestmq %zmm1, %zmm0, %k1
8202 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8204 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8205 %3 = icmp ugt <8 x i64> %2, <i64 1, i64 1, i64 1, i64 1, i64 1, i64 1, i64 1, i64 1>
8206 %4 = sext <8 x i1> %3 to <8 x i64>
8210 define <8 x i64> @ult_2_v8i64(<8 x i64> %0) {
8211 ; AVX512F-LABEL: ult_2_v8i64:
8213 ; AVX512F-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8214 ; AVX512F-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8215 ; AVX512F-NEXT: vptestnmq %zmm1, %zmm0, %k1
8216 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8217 ; AVX512F-NEXT: retq
8219 ; AVX512BW-LABEL: ult_2_v8i64:
8220 ; AVX512BW: # %bb.0:
8221 ; AVX512BW-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8222 ; AVX512BW-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8223 ; AVX512BW-NEXT: vptestnmq %zmm1, %zmm0, %k1
8224 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8225 ; AVX512BW-NEXT: retq
8227 ; AVX512VPOPCNTDQ-LABEL: ult_2_v8i64:
8228 ; AVX512VPOPCNTDQ: # %bb.0:
8229 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8230 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8231 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8232 ; AVX512VPOPCNTDQ-NEXT: retq
8234 ; BITALG-LABEL: ult_2_v8i64:
8236 ; BITALG-NEXT: vpternlogd $255, %zmm1, %zmm1, %zmm1
8237 ; BITALG-NEXT: vpaddq %zmm1, %zmm0, %zmm1
8238 ; BITALG-NEXT: vptestnmq %zmm1, %zmm0, %k1
8239 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8241 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8242 %3 = icmp ult <8 x i64> %2, <i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2>
8243 %4 = sext <8 x i1> %3 to <8 x i64>
8247 define <8 x i64> @ugt_2_v8i64(<8 x i64> %0) {
8248 ; AVX512F-LABEL: ugt_2_v8i64:
8250 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8251 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8252 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8253 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8254 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8255 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8256 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8257 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8258 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8259 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8260 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8261 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8262 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8263 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8264 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8265 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8266 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8267 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8268 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8269 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8270 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8271 ; AVX512F-NEXT: retq
8273 ; AVX512BW-LABEL: ugt_2_v8i64:
8274 ; AVX512BW: # %bb.0:
8275 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8276 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8277 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8278 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8279 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8280 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8281 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8282 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8283 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8284 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8285 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8286 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8287 ; AVX512BW-NEXT: retq
8289 ; AVX512VPOPCNTDQ-LABEL: ugt_2_v8i64:
8290 ; AVX512VPOPCNTDQ: # %bb.0:
8291 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8292 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8293 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8294 ; AVX512VPOPCNTDQ-NEXT: retq
8296 ; BITALG-LABEL: ugt_2_v8i64:
8298 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8299 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8300 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8301 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8302 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8304 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8305 %3 = icmp ugt <8 x i64> %2, <i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2, i64 2>
8306 %4 = sext <8 x i1> %3 to <8 x i64>
8310 define <8 x i64> @ult_3_v8i64(<8 x i64> %0) {
8311 ; AVX512F-LABEL: ult_3_v8i64:
8313 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8314 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8315 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8316 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8317 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8318 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8319 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8320 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8321 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8322 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8323 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8324 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8325 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8326 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8327 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8328 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8329 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8330 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8331 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8332 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8333 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8334 ; AVX512F-NEXT: retq
8336 ; AVX512BW-LABEL: ult_3_v8i64:
8337 ; AVX512BW: # %bb.0:
8338 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8339 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8340 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8341 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8342 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8343 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8344 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8345 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8346 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8347 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8348 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8349 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8350 ; AVX512BW-NEXT: retq
8352 ; AVX512VPOPCNTDQ-LABEL: ult_3_v8i64:
8353 ; AVX512VPOPCNTDQ: # %bb.0:
8354 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8355 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8356 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8357 ; AVX512VPOPCNTDQ-NEXT: retq
8359 ; BITALG-LABEL: ult_3_v8i64:
8361 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8362 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8363 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8364 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8365 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8367 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8368 %3 = icmp ult <8 x i64> %2, <i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3>
8369 %4 = sext <8 x i1> %3 to <8 x i64>
8373 define <8 x i64> @ugt_3_v8i64(<8 x i64> %0) {
8374 ; AVX512F-LABEL: ugt_3_v8i64:
8376 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8377 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8378 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8379 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8380 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8381 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8382 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8383 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8384 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8385 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8386 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8387 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8388 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8389 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8390 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8391 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8392 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8393 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8394 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8395 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8396 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8397 ; AVX512F-NEXT: retq
8399 ; AVX512BW-LABEL: ugt_3_v8i64:
8400 ; AVX512BW: # %bb.0:
8401 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8402 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8403 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8404 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8405 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8406 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8407 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8408 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8409 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8410 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8411 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8412 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8413 ; AVX512BW-NEXT: retq
8415 ; AVX512VPOPCNTDQ-LABEL: ugt_3_v8i64:
8416 ; AVX512VPOPCNTDQ: # %bb.0:
8417 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8418 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8419 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8420 ; AVX512VPOPCNTDQ-NEXT: retq
8422 ; BITALG-LABEL: ugt_3_v8i64:
8424 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8425 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8426 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8427 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8428 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8430 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8431 %3 = icmp ugt <8 x i64> %2, <i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3, i64 3>
8432 %4 = sext <8 x i1> %3 to <8 x i64>
8436 define <8 x i64> @ult_4_v8i64(<8 x i64> %0) {
8437 ; AVX512F-LABEL: ult_4_v8i64:
8439 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8440 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8441 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8442 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8443 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8444 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8445 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8446 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8447 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8448 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8449 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8450 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8451 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8452 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8453 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8454 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8455 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8456 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8457 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8458 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8459 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8460 ; AVX512F-NEXT: retq
8462 ; AVX512BW-LABEL: ult_4_v8i64:
8463 ; AVX512BW: # %bb.0:
8464 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8465 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8466 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8467 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8468 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8469 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8470 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8471 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8472 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8473 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8474 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8475 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8476 ; AVX512BW-NEXT: retq
8478 ; AVX512VPOPCNTDQ-LABEL: ult_4_v8i64:
8479 ; AVX512VPOPCNTDQ: # %bb.0:
8480 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8481 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8482 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8483 ; AVX512VPOPCNTDQ-NEXT: retq
8485 ; BITALG-LABEL: ult_4_v8i64:
8487 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8488 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8489 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8490 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8491 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8493 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8494 %3 = icmp ult <8 x i64> %2, <i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4>
8495 %4 = sext <8 x i1> %3 to <8 x i64>
8499 define <8 x i64> @ugt_4_v8i64(<8 x i64> %0) {
8500 ; AVX512F-LABEL: ugt_4_v8i64:
8502 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8503 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8504 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8505 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8506 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8507 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8508 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8509 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8510 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8511 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8512 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8513 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8514 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8515 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8516 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8517 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8518 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8519 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8520 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8521 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8522 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8523 ; AVX512F-NEXT: retq
8525 ; AVX512BW-LABEL: ugt_4_v8i64:
8526 ; AVX512BW: # %bb.0:
8527 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8528 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8529 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8530 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8531 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8532 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8533 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8534 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8535 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8536 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8537 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8538 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8539 ; AVX512BW-NEXT: retq
8541 ; AVX512VPOPCNTDQ-LABEL: ugt_4_v8i64:
8542 ; AVX512VPOPCNTDQ: # %bb.0:
8543 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8544 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8545 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8546 ; AVX512VPOPCNTDQ-NEXT: retq
8548 ; BITALG-LABEL: ugt_4_v8i64:
8550 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8551 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8552 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8553 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8554 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8556 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8557 %3 = icmp ugt <8 x i64> %2, <i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4, i64 4>
8558 %4 = sext <8 x i1> %3 to <8 x i64>
8562 define <8 x i64> @ult_5_v8i64(<8 x i64> %0) {
8563 ; AVX512F-LABEL: ult_5_v8i64:
8565 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8566 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8567 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8568 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8569 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8570 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8571 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8572 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8573 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8574 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8575 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8576 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8577 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8578 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8579 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8580 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8581 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8582 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8583 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8584 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8585 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8586 ; AVX512F-NEXT: retq
8588 ; AVX512BW-LABEL: ult_5_v8i64:
8589 ; AVX512BW: # %bb.0:
8590 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8591 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8592 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8593 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8594 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8595 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8596 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8597 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8598 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8599 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8600 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8601 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8602 ; AVX512BW-NEXT: retq
8604 ; AVX512VPOPCNTDQ-LABEL: ult_5_v8i64:
8605 ; AVX512VPOPCNTDQ: # %bb.0:
8606 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8607 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8608 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8609 ; AVX512VPOPCNTDQ-NEXT: retq
8611 ; BITALG-LABEL: ult_5_v8i64:
8613 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8614 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8615 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8616 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8617 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8619 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8620 %3 = icmp ult <8 x i64> %2, <i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5>
8621 %4 = sext <8 x i1> %3 to <8 x i64>
8625 define <8 x i64> @ugt_5_v8i64(<8 x i64> %0) {
8626 ; AVX512F-LABEL: ugt_5_v8i64:
8628 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8629 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8630 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8631 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8632 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8633 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8634 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8635 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8636 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8637 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8638 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8639 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8640 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8641 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8642 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8643 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8644 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8645 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8646 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8647 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8648 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8649 ; AVX512F-NEXT: retq
8651 ; AVX512BW-LABEL: ugt_5_v8i64:
8652 ; AVX512BW: # %bb.0:
8653 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8654 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8655 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8656 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8657 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8658 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8659 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8660 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8661 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8662 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8663 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8664 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8665 ; AVX512BW-NEXT: retq
8667 ; AVX512VPOPCNTDQ-LABEL: ugt_5_v8i64:
8668 ; AVX512VPOPCNTDQ: # %bb.0:
8669 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8670 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8671 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8672 ; AVX512VPOPCNTDQ-NEXT: retq
8674 ; BITALG-LABEL: ugt_5_v8i64:
8676 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8677 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8678 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8679 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8680 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8682 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8683 %3 = icmp ugt <8 x i64> %2, <i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5, i64 5>
8684 %4 = sext <8 x i1> %3 to <8 x i64>
8688 define <8 x i64> @ult_6_v8i64(<8 x i64> %0) {
8689 ; AVX512F-LABEL: ult_6_v8i64:
8691 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8692 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8693 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8694 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8695 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8696 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8697 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8698 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8699 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8700 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8701 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8702 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8703 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8704 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8705 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8706 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8707 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8708 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8709 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8710 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8711 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8712 ; AVX512F-NEXT: retq
8714 ; AVX512BW-LABEL: ult_6_v8i64:
8715 ; AVX512BW: # %bb.0:
8716 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8717 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8718 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8719 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8720 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8721 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8722 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8723 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8724 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8725 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8726 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8727 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8728 ; AVX512BW-NEXT: retq
8730 ; AVX512VPOPCNTDQ-LABEL: ult_6_v8i64:
8731 ; AVX512VPOPCNTDQ: # %bb.0:
8732 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8733 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8734 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8735 ; AVX512VPOPCNTDQ-NEXT: retq
8737 ; BITALG-LABEL: ult_6_v8i64:
8739 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8740 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8741 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8742 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8743 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8745 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8746 %3 = icmp ult <8 x i64> %2, <i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6>
8747 %4 = sext <8 x i1> %3 to <8 x i64>
8751 define <8 x i64> @ugt_6_v8i64(<8 x i64> %0) {
8752 ; AVX512F-LABEL: ugt_6_v8i64:
8754 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8755 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8756 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8757 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8758 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8759 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8760 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8761 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8762 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8763 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8764 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8765 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8766 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8767 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8768 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8769 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8770 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8771 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8772 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8773 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8774 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8775 ; AVX512F-NEXT: retq
8777 ; AVX512BW-LABEL: ugt_6_v8i64:
8778 ; AVX512BW: # %bb.0:
8779 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8780 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8781 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8782 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8783 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8784 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8785 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8786 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8787 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8788 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8789 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8790 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8791 ; AVX512BW-NEXT: retq
8793 ; AVX512VPOPCNTDQ-LABEL: ugt_6_v8i64:
8794 ; AVX512VPOPCNTDQ: # %bb.0:
8795 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8796 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8797 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8798 ; AVX512VPOPCNTDQ-NEXT: retq
8800 ; BITALG-LABEL: ugt_6_v8i64:
8802 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8803 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8804 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8805 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8806 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8808 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8809 %3 = icmp ugt <8 x i64> %2, <i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6, i64 6>
8810 %4 = sext <8 x i1> %3 to <8 x i64>
8814 define <8 x i64> @ult_7_v8i64(<8 x i64> %0) {
8815 ; AVX512F-LABEL: ult_7_v8i64:
8817 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8818 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8819 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8820 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8821 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8822 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8823 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8824 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8825 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8826 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8827 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8828 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8829 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8830 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8831 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8832 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8833 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8834 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8835 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8836 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8837 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8838 ; AVX512F-NEXT: retq
8840 ; AVX512BW-LABEL: ult_7_v8i64:
8841 ; AVX512BW: # %bb.0:
8842 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8843 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8844 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8845 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8846 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8847 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8848 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8849 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8850 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8851 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8852 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8853 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8854 ; AVX512BW-NEXT: retq
8856 ; AVX512VPOPCNTDQ-LABEL: ult_7_v8i64:
8857 ; AVX512VPOPCNTDQ: # %bb.0:
8858 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8859 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8860 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8861 ; AVX512VPOPCNTDQ-NEXT: retq
8863 ; BITALG-LABEL: ult_7_v8i64:
8865 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8866 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8867 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8868 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8869 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8871 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8872 %3 = icmp ult <8 x i64> %2, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
8873 %4 = sext <8 x i1> %3 to <8 x i64>
8877 define <8 x i64> @ugt_7_v8i64(<8 x i64> %0) {
8878 ; AVX512F-LABEL: ugt_7_v8i64:
8880 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8881 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8882 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8883 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8884 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8885 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8886 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8887 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8888 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8889 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8890 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8891 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8892 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8893 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8894 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8895 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8896 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8897 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8898 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8899 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8900 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8901 ; AVX512F-NEXT: retq
8903 ; AVX512BW-LABEL: ugt_7_v8i64:
8904 ; AVX512BW: # %bb.0:
8905 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8906 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8907 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8908 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8909 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8910 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8911 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8912 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8913 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8914 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8915 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8916 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8917 ; AVX512BW-NEXT: retq
8919 ; AVX512VPOPCNTDQ-LABEL: ugt_7_v8i64:
8920 ; AVX512VPOPCNTDQ: # %bb.0:
8921 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8922 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8923 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8924 ; AVX512VPOPCNTDQ-NEXT: retq
8926 ; BITALG-LABEL: ugt_7_v8i64:
8928 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8929 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8930 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8931 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8932 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8934 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8935 %3 = icmp ugt <8 x i64> %2, <i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7, i64 7>
8936 %4 = sext <8 x i1> %3 to <8 x i64>
8940 define <8 x i64> @ult_8_v8i64(<8 x i64> %0) {
8941 ; AVX512F-LABEL: ult_8_v8i64:
8943 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
8944 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8945 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
8946 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8947 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
8948 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
8949 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
8950 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
8951 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
8952 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
8953 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
8954 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
8955 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
8956 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
8957 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
8958 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
8959 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
8960 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
8961 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
8962 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8963 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8964 ; AVX512F-NEXT: retq
8966 ; AVX512BW-LABEL: ult_8_v8i64:
8967 ; AVX512BW: # %bb.0:
8968 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
8969 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
8970 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
8971 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
8972 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
8973 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
8974 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
8975 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
8976 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
8977 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8978 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8979 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8980 ; AVX512BW-NEXT: retq
8982 ; AVX512VPOPCNTDQ-LABEL: ult_8_v8i64:
8983 ; AVX512VPOPCNTDQ: # %bb.0:
8984 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
8985 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8986 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8987 ; AVX512VPOPCNTDQ-NEXT: retq
8989 ; BITALG-LABEL: ult_8_v8i64:
8991 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
8992 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
8993 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
8994 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
8995 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
8997 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
8998 %3 = icmp ult <8 x i64> %2, <i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8>
8999 %4 = sext <8 x i1> %3 to <8 x i64>
9003 define <8 x i64> @ugt_8_v8i64(<8 x i64> %0) {
9004 ; AVX512F-LABEL: ugt_8_v8i64:
9006 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9007 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9008 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9009 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9010 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9011 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9012 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9013 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9014 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9015 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9016 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9017 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9018 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9019 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9020 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9021 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9022 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9023 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9024 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9025 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9026 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9027 ; AVX512F-NEXT: retq
9029 ; AVX512BW-LABEL: ugt_8_v8i64:
9030 ; AVX512BW: # %bb.0:
9031 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9032 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9033 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9034 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9035 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9036 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9037 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9038 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9039 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9040 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9041 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9042 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9043 ; AVX512BW-NEXT: retq
9045 ; AVX512VPOPCNTDQ-LABEL: ugt_8_v8i64:
9046 ; AVX512VPOPCNTDQ: # %bb.0:
9047 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9048 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9049 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9050 ; AVX512VPOPCNTDQ-NEXT: retq
9052 ; BITALG-LABEL: ugt_8_v8i64:
9054 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9055 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9056 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9057 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9058 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9060 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9061 %3 = icmp ugt <8 x i64> %2, <i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8, i64 8>
9062 %4 = sext <8 x i1> %3 to <8 x i64>
9066 define <8 x i64> @ult_9_v8i64(<8 x i64> %0) {
9067 ; AVX512F-LABEL: ult_9_v8i64:
9069 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9070 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9071 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9072 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9073 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9074 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9075 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9076 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9077 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9078 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9079 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9080 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9081 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9082 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9083 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9084 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9085 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9086 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9087 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9088 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9089 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9090 ; AVX512F-NEXT: retq
9092 ; AVX512BW-LABEL: ult_9_v8i64:
9093 ; AVX512BW: # %bb.0:
9094 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9095 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9096 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9097 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9098 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9099 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9100 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9101 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9102 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9103 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9104 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9105 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9106 ; AVX512BW-NEXT: retq
9108 ; AVX512VPOPCNTDQ-LABEL: ult_9_v8i64:
9109 ; AVX512VPOPCNTDQ: # %bb.0:
9110 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9111 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9112 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9113 ; AVX512VPOPCNTDQ-NEXT: retq
9115 ; BITALG-LABEL: ult_9_v8i64:
9117 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9118 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9119 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9120 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9121 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9123 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9124 %3 = icmp ult <8 x i64> %2, <i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9>
9125 %4 = sext <8 x i1> %3 to <8 x i64>
9129 define <8 x i64> @ugt_9_v8i64(<8 x i64> %0) {
9130 ; AVX512F-LABEL: ugt_9_v8i64:
9132 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9133 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9134 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9135 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9136 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9137 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9138 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9139 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9140 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9141 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9142 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9143 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9144 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9145 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9146 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9147 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9148 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9149 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9150 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9151 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9152 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9153 ; AVX512F-NEXT: retq
9155 ; AVX512BW-LABEL: ugt_9_v8i64:
9156 ; AVX512BW: # %bb.0:
9157 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9158 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9159 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9160 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9161 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9162 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9163 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9164 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9165 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9166 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9167 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9168 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9169 ; AVX512BW-NEXT: retq
9171 ; AVX512VPOPCNTDQ-LABEL: ugt_9_v8i64:
9172 ; AVX512VPOPCNTDQ: # %bb.0:
9173 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9174 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9175 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9176 ; AVX512VPOPCNTDQ-NEXT: retq
9178 ; BITALG-LABEL: ugt_9_v8i64:
9180 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9181 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9182 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9183 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9184 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9186 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9187 %3 = icmp ugt <8 x i64> %2, <i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9, i64 9>
9188 %4 = sext <8 x i1> %3 to <8 x i64>
9192 define <8 x i64> @ult_10_v8i64(<8 x i64> %0) {
9193 ; AVX512F-LABEL: ult_10_v8i64:
9195 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9196 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9197 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9198 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9199 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9200 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9201 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9202 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9203 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9204 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9205 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9206 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9207 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9208 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9209 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9210 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9211 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9212 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9213 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9214 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9215 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9216 ; AVX512F-NEXT: retq
9218 ; AVX512BW-LABEL: ult_10_v8i64:
9219 ; AVX512BW: # %bb.0:
9220 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9221 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9222 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9223 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9224 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9225 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9226 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9227 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9228 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9229 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9230 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9231 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9232 ; AVX512BW-NEXT: retq
9234 ; AVX512VPOPCNTDQ-LABEL: ult_10_v8i64:
9235 ; AVX512VPOPCNTDQ: # %bb.0:
9236 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9237 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9238 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9239 ; AVX512VPOPCNTDQ-NEXT: retq
9241 ; BITALG-LABEL: ult_10_v8i64:
9243 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9244 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9245 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9246 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9247 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9249 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9250 %3 = icmp ult <8 x i64> %2, <i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10>
9251 %4 = sext <8 x i1> %3 to <8 x i64>
9255 define <8 x i64> @ugt_10_v8i64(<8 x i64> %0) {
9256 ; AVX512F-LABEL: ugt_10_v8i64:
9258 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9259 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9260 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9261 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9262 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9263 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9264 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9265 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9266 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9267 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9268 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9269 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9270 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9271 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9272 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9273 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9274 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9275 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9276 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9277 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9278 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9279 ; AVX512F-NEXT: retq
9281 ; AVX512BW-LABEL: ugt_10_v8i64:
9282 ; AVX512BW: # %bb.0:
9283 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9284 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9285 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9286 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9287 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9288 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9289 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9290 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9291 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9292 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9293 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9294 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9295 ; AVX512BW-NEXT: retq
9297 ; AVX512VPOPCNTDQ-LABEL: ugt_10_v8i64:
9298 ; AVX512VPOPCNTDQ: # %bb.0:
9299 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9300 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9301 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9302 ; AVX512VPOPCNTDQ-NEXT: retq
9304 ; BITALG-LABEL: ugt_10_v8i64:
9306 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9307 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9308 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9309 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9310 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9312 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9313 %3 = icmp ugt <8 x i64> %2, <i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10, i64 10>
9314 %4 = sext <8 x i1> %3 to <8 x i64>
9318 define <8 x i64> @ult_11_v8i64(<8 x i64> %0) {
9319 ; AVX512F-LABEL: ult_11_v8i64:
9321 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9322 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9323 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9324 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9325 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9326 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9327 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9328 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9329 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9330 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9331 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9332 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9333 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9334 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9335 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9336 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9337 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9338 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9339 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9340 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9341 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9342 ; AVX512F-NEXT: retq
9344 ; AVX512BW-LABEL: ult_11_v8i64:
9345 ; AVX512BW: # %bb.0:
9346 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9347 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9348 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9349 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9350 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9351 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9352 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9353 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9354 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9355 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9356 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9357 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9358 ; AVX512BW-NEXT: retq
9360 ; AVX512VPOPCNTDQ-LABEL: ult_11_v8i64:
9361 ; AVX512VPOPCNTDQ: # %bb.0:
9362 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9363 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9364 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9365 ; AVX512VPOPCNTDQ-NEXT: retq
9367 ; BITALG-LABEL: ult_11_v8i64:
9369 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9370 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9371 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9372 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9373 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9375 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9376 %3 = icmp ult <8 x i64> %2, <i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11>
9377 %4 = sext <8 x i1> %3 to <8 x i64>
9381 define <8 x i64> @ugt_11_v8i64(<8 x i64> %0) {
9382 ; AVX512F-LABEL: ugt_11_v8i64:
9384 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9385 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9386 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9387 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9388 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9389 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9390 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9391 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9392 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9393 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9394 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9395 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9396 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9397 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9398 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9399 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9400 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9401 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9402 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9403 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9404 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9405 ; AVX512F-NEXT: retq
9407 ; AVX512BW-LABEL: ugt_11_v8i64:
9408 ; AVX512BW: # %bb.0:
9409 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9410 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9411 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9412 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9413 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9414 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9415 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9416 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9417 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9418 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9419 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9420 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9421 ; AVX512BW-NEXT: retq
9423 ; AVX512VPOPCNTDQ-LABEL: ugt_11_v8i64:
9424 ; AVX512VPOPCNTDQ: # %bb.0:
9425 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9426 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9427 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9428 ; AVX512VPOPCNTDQ-NEXT: retq
9430 ; BITALG-LABEL: ugt_11_v8i64:
9432 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9433 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9434 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9435 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9436 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9438 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9439 %3 = icmp ugt <8 x i64> %2, <i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11, i64 11>
9440 %4 = sext <8 x i1> %3 to <8 x i64>
9444 define <8 x i64> @ult_12_v8i64(<8 x i64> %0) {
9445 ; AVX512F-LABEL: ult_12_v8i64:
9447 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9448 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9449 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9450 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9451 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9452 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9453 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9454 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9455 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9456 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9457 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9458 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9459 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9460 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9461 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9462 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9463 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9464 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9465 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9466 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9467 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9468 ; AVX512F-NEXT: retq
9470 ; AVX512BW-LABEL: ult_12_v8i64:
9471 ; AVX512BW: # %bb.0:
9472 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9473 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9474 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9475 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9476 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9477 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9478 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9479 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9480 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9481 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9482 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9483 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9484 ; AVX512BW-NEXT: retq
9486 ; AVX512VPOPCNTDQ-LABEL: ult_12_v8i64:
9487 ; AVX512VPOPCNTDQ: # %bb.0:
9488 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9489 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9490 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9491 ; AVX512VPOPCNTDQ-NEXT: retq
9493 ; BITALG-LABEL: ult_12_v8i64:
9495 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9496 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9497 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9498 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9499 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9501 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9502 %3 = icmp ult <8 x i64> %2, <i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12>
9503 %4 = sext <8 x i1> %3 to <8 x i64>
9507 define <8 x i64> @ugt_12_v8i64(<8 x i64> %0) {
9508 ; AVX512F-LABEL: ugt_12_v8i64:
9510 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9511 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9512 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9513 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9514 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9515 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9516 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9517 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9518 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9519 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9520 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9521 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9522 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9523 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9524 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9525 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9526 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9527 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9528 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9529 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9530 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9531 ; AVX512F-NEXT: retq
9533 ; AVX512BW-LABEL: ugt_12_v8i64:
9534 ; AVX512BW: # %bb.0:
9535 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9536 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9537 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9538 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9539 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9540 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9541 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9542 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9543 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9544 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9545 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9546 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9547 ; AVX512BW-NEXT: retq
9549 ; AVX512VPOPCNTDQ-LABEL: ugt_12_v8i64:
9550 ; AVX512VPOPCNTDQ: # %bb.0:
9551 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9552 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9553 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9554 ; AVX512VPOPCNTDQ-NEXT: retq
9556 ; BITALG-LABEL: ugt_12_v8i64:
9558 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9559 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9560 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9561 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9562 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9564 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9565 %3 = icmp ugt <8 x i64> %2, <i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12, i64 12>
9566 %4 = sext <8 x i1> %3 to <8 x i64>
9570 define <8 x i64> @ult_13_v8i64(<8 x i64> %0) {
9571 ; AVX512F-LABEL: ult_13_v8i64:
9573 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9574 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9575 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9576 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9577 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9578 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9579 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9580 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9581 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9582 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9583 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9584 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9585 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9586 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9587 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9588 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9589 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9590 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9591 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9592 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9593 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9594 ; AVX512F-NEXT: retq
9596 ; AVX512BW-LABEL: ult_13_v8i64:
9597 ; AVX512BW: # %bb.0:
9598 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9599 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9600 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9601 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9602 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9603 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9604 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9605 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9606 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9607 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9608 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9609 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9610 ; AVX512BW-NEXT: retq
9612 ; AVX512VPOPCNTDQ-LABEL: ult_13_v8i64:
9613 ; AVX512VPOPCNTDQ: # %bb.0:
9614 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9615 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9616 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9617 ; AVX512VPOPCNTDQ-NEXT: retq
9619 ; BITALG-LABEL: ult_13_v8i64:
9621 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9622 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9623 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9624 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9625 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9627 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9628 %3 = icmp ult <8 x i64> %2, <i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13>
9629 %4 = sext <8 x i1> %3 to <8 x i64>
9633 define <8 x i64> @ugt_13_v8i64(<8 x i64> %0) {
9634 ; AVX512F-LABEL: ugt_13_v8i64:
9636 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9637 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9638 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9639 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9640 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9641 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9642 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9643 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9644 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9645 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9646 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9647 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9648 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9649 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9650 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9651 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9652 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9653 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9654 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9655 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9656 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9657 ; AVX512F-NEXT: retq
9659 ; AVX512BW-LABEL: ugt_13_v8i64:
9660 ; AVX512BW: # %bb.0:
9661 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9662 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9663 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9664 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9665 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9666 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9667 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9668 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9669 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9670 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9671 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9672 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9673 ; AVX512BW-NEXT: retq
9675 ; AVX512VPOPCNTDQ-LABEL: ugt_13_v8i64:
9676 ; AVX512VPOPCNTDQ: # %bb.0:
9677 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9678 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9679 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9680 ; AVX512VPOPCNTDQ-NEXT: retq
9682 ; BITALG-LABEL: ugt_13_v8i64:
9684 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9685 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9686 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9687 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9688 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9690 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9691 %3 = icmp ugt <8 x i64> %2, <i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13, i64 13>
9692 %4 = sext <8 x i1> %3 to <8 x i64>
9696 define <8 x i64> @ult_14_v8i64(<8 x i64> %0) {
9697 ; AVX512F-LABEL: ult_14_v8i64:
9699 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9700 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9701 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9702 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9703 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9704 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9705 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9706 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9707 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9708 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9709 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9710 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9711 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9712 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9713 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9714 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9715 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9716 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9717 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9718 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9719 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9720 ; AVX512F-NEXT: retq
9722 ; AVX512BW-LABEL: ult_14_v8i64:
9723 ; AVX512BW: # %bb.0:
9724 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9725 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9726 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9727 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9728 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9729 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9730 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9731 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9732 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9733 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9734 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9735 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9736 ; AVX512BW-NEXT: retq
9738 ; AVX512VPOPCNTDQ-LABEL: ult_14_v8i64:
9739 ; AVX512VPOPCNTDQ: # %bb.0:
9740 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9741 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9742 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9743 ; AVX512VPOPCNTDQ-NEXT: retq
9745 ; BITALG-LABEL: ult_14_v8i64:
9747 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9748 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9749 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9750 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9751 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9753 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9754 %3 = icmp ult <8 x i64> %2, <i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14>
9755 %4 = sext <8 x i1> %3 to <8 x i64>
9759 define <8 x i64> @ugt_14_v8i64(<8 x i64> %0) {
9760 ; AVX512F-LABEL: ugt_14_v8i64:
9762 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9763 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9764 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9765 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9766 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9767 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9768 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9769 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9770 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9771 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9772 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9773 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9774 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9775 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9776 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9777 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9778 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9779 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9780 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9781 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9782 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9783 ; AVX512F-NEXT: retq
9785 ; AVX512BW-LABEL: ugt_14_v8i64:
9786 ; AVX512BW: # %bb.0:
9787 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9788 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9789 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9790 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9791 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9792 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9793 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9794 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9795 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9796 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9797 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9798 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9799 ; AVX512BW-NEXT: retq
9801 ; AVX512VPOPCNTDQ-LABEL: ugt_14_v8i64:
9802 ; AVX512VPOPCNTDQ: # %bb.0:
9803 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9804 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9805 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9806 ; AVX512VPOPCNTDQ-NEXT: retq
9808 ; BITALG-LABEL: ugt_14_v8i64:
9810 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9811 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9812 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9813 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9814 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9816 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9817 %3 = icmp ugt <8 x i64> %2, <i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14, i64 14>
9818 %4 = sext <8 x i1> %3 to <8 x i64>
9822 define <8 x i64> @ult_15_v8i64(<8 x i64> %0) {
9823 ; AVX512F-LABEL: ult_15_v8i64:
9825 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9826 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9827 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9828 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9829 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9830 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9831 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9832 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9833 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9834 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9835 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9836 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9837 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9838 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9839 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9840 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9841 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9842 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9843 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9844 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9845 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9846 ; AVX512F-NEXT: retq
9848 ; AVX512BW-LABEL: ult_15_v8i64:
9849 ; AVX512BW: # %bb.0:
9850 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9851 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9852 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9853 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9854 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9855 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9856 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9857 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9858 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9859 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9860 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9861 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9862 ; AVX512BW-NEXT: retq
9864 ; AVX512VPOPCNTDQ-LABEL: ult_15_v8i64:
9865 ; AVX512VPOPCNTDQ: # %bb.0:
9866 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9867 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9868 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9869 ; AVX512VPOPCNTDQ-NEXT: retq
9871 ; BITALG-LABEL: ult_15_v8i64:
9873 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9874 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9875 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9876 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9877 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9879 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9880 %3 = icmp ult <8 x i64> %2, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
9881 %4 = sext <8 x i1> %3 to <8 x i64>
9885 define <8 x i64> @ugt_15_v8i64(<8 x i64> %0) {
9886 ; AVX512F-LABEL: ugt_15_v8i64:
9888 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9889 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9890 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9891 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9892 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9893 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9894 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9895 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9896 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9897 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9898 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9899 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9900 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9901 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9902 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9903 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9904 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9905 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9906 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9907 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9908 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9909 ; AVX512F-NEXT: retq
9911 ; AVX512BW-LABEL: ugt_15_v8i64:
9912 ; AVX512BW: # %bb.0:
9913 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9914 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9915 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9916 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9917 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9918 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9919 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9920 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9921 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9922 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9923 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9924 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9925 ; AVX512BW-NEXT: retq
9927 ; AVX512VPOPCNTDQ-LABEL: ugt_15_v8i64:
9928 ; AVX512VPOPCNTDQ: # %bb.0:
9929 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9930 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9931 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9932 ; AVX512VPOPCNTDQ-NEXT: retq
9934 ; BITALG-LABEL: ugt_15_v8i64:
9936 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
9937 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
9938 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9939 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9940 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9942 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
9943 %3 = icmp ugt <8 x i64> %2, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
9944 %4 = sext <8 x i1> %3 to <8 x i64>
9948 define <8 x i64> @ult_16_v8i64(<8 x i64> %0) {
9949 ; AVX512F-LABEL: ult_16_v8i64:
9951 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
9952 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9953 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
9954 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9955 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
9956 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
9957 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
9958 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
9959 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
9960 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
9961 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
9962 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
9963 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
9964 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
9965 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
9966 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
9967 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
9968 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
9969 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
9970 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9971 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9972 ; AVX512F-NEXT: retq
9974 ; AVX512BW-LABEL: ult_16_v8i64:
9975 ; AVX512BW: # %bb.0:
9976 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
9977 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
9978 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
9979 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
9980 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
9981 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
9982 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
9983 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
9984 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
9985 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
9986 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9987 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9988 ; AVX512BW-NEXT: retq
9990 ; AVX512VPOPCNTDQ-LABEL: ult_16_v8i64:
9991 ; AVX512VPOPCNTDQ: # %bb.0:
9992 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
9993 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
9994 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
9995 ; AVX512VPOPCNTDQ-NEXT: retq
9997 ; BITALG-LABEL: ult_16_v8i64:
9999 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10000 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10001 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10002 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10003 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10004 ; BITALG-NEXT: retq
10005 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10006 %3 = icmp ult <8 x i64> %2, <i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16>
10007 %4 = sext <8 x i1> %3 to <8 x i64>
10011 define <8 x i64> @ugt_16_v8i64(<8 x i64> %0) {
10012 ; AVX512F-LABEL: ugt_16_v8i64:
10013 ; AVX512F: # %bb.0:
10014 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10015 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10016 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10017 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10018 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10019 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10020 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10021 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10022 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10023 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10024 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10025 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10026 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10027 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10028 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10029 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10030 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10031 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10032 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10033 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10034 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10035 ; AVX512F-NEXT: retq
10037 ; AVX512BW-LABEL: ugt_16_v8i64:
10038 ; AVX512BW: # %bb.0:
10039 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10040 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10041 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10042 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10043 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10044 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10045 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10046 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10047 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10048 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10049 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10050 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10051 ; AVX512BW-NEXT: retq
10053 ; AVX512VPOPCNTDQ-LABEL: ugt_16_v8i64:
10054 ; AVX512VPOPCNTDQ: # %bb.0:
10055 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10056 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10057 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10058 ; AVX512VPOPCNTDQ-NEXT: retq
10060 ; BITALG-LABEL: ugt_16_v8i64:
10062 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10063 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10064 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10065 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10066 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10067 ; BITALG-NEXT: retq
10068 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10069 %3 = icmp ugt <8 x i64> %2, <i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16, i64 16>
10070 %4 = sext <8 x i1> %3 to <8 x i64>
10074 define <8 x i64> @ult_17_v8i64(<8 x i64> %0) {
10075 ; AVX512F-LABEL: ult_17_v8i64:
10076 ; AVX512F: # %bb.0:
10077 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10078 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10079 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10080 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10081 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10082 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10083 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10084 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10085 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10086 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10087 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10088 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10089 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10090 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10091 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10092 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10093 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10094 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10095 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10096 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10097 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10098 ; AVX512F-NEXT: retq
10100 ; AVX512BW-LABEL: ult_17_v8i64:
10101 ; AVX512BW: # %bb.0:
10102 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10103 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10104 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10105 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10106 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10107 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10108 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10109 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10110 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10111 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10112 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10113 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10114 ; AVX512BW-NEXT: retq
10116 ; AVX512VPOPCNTDQ-LABEL: ult_17_v8i64:
10117 ; AVX512VPOPCNTDQ: # %bb.0:
10118 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10119 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10120 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10121 ; AVX512VPOPCNTDQ-NEXT: retq
10123 ; BITALG-LABEL: ult_17_v8i64:
10125 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10126 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10127 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10128 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10129 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10130 ; BITALG-NEXT: retq
10131 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10132 %3 = icmp ult <8 x i64> %2, <i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17>
10133 %4 = sext <8 x i1> %3 to <8 x i64>
10137 define <8 x i64> @ugt_17_v8i64(<8 x i64> %0) {
10138 ; AVX512F-LABEL: ugt_17_v8i64:
10139 ; AVX512F: # %bb.0:
10140 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10141 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10142 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10143 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10144 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10145 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10146 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10147 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10148 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10149 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10150 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10151 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10152 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10153 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10154 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10155 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10156 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10157 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10158 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10159 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10160 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10161 ; AVX512F-NEXT: retq
10163 ; AVX512BW-LABEL: ugt_17_v8i64:
10164 ; AVX512BW: # %bb.0:
10165 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10166 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10167 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10168 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10169 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10170 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10171 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10172 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10173 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10174 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10175 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10176 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10177 ; AVX512BW-NEXT: retq
10179 ; AVX512VPOPCNTDQ-LABEL: ugt_17_v8i64:
10180 ; AVX512VPOPCNTDQ: # %bb.0:
10181 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10182 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10183 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10184 ; AVX512VPOPCNTDQ-NEXT: retq
10186 ; BITALG-LABEL: ugt_17_v8i64:
10188 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10189 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10190 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10191 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10192 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10193 ; BITALG-NEXT: retq
10194 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10195 %3 = icmp ugt <8 x i64> %2, <i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17, i64 17>
10196 %4 = sext <8 x i1> %3 to <8 x i64>
10200 define <8 x i64> @ult_18_v8i64(<8 x i64> %0) {
10201 ; AVX512F-LABEL: ult_18_v8i64:
10202 ; AVX512F: # %bb.0:
10203 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10204 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10205 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10206 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10207 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10208 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10209 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10210 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10211 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10212 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10213 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10214 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10215 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10216 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10217 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10218 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10219 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10220 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10221 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10222 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10223 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10224 ; AVX512F-NEXT: retq
10226 ; AVX512BW-LABEL: ult_18_v8i64:
10227 ; AVX512BW: # %bb.0:
10228 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10229 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10230 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10231 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10232 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10233 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10234 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10235 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10236 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10237 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10238 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10239 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10240 ; AVX512BW-NEXT: retq
10242 ; AVX512VPOPCNTDQ-LABEL: ult_18_v8i64:
10243 ; AVX512VPOPCNTDQ: # %bb.0:
10244 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10245 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10246 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10247 ; AVX512VPOPCNTDQ-NEXT: retq
10249 ; BITALG-LABEL: ult_18_v8i64:
10251 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10252 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10253 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10254 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10255 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10256 ; BITALG-NEXT: retq
10257 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10258 %3 = icmp ult <8 x i64> %2, <i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18>
10259 %4 = sext <8 x i1> %3 to <8 x i64>
10263 define <8 x i64> @ugt_18_v8i64(<8 x i64> %0) {
10264 ; AVX512F-LABEL: ugt_18_v8i64:
10265 ; AVX512F: # %bb.0:
10266 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10267 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10268 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10269 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10270 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10271 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10272 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10273 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10274 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10275 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10276 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10277 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10278 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10279 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10280 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10281 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10282 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10283 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10284 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10285 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10286 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10287 ; AVX512F-NEXT: retq
10289 ; AVX512BW-LABEL: ugt_18_v8i64:
10290 ; AVX512BW: # %bb.0:
10291 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10292 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10293 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10294 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10295 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10296 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10297 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10298 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10299 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10300 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10301 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10302 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10303 ; AVX512BW-NEXT: retq
10305 ; AVX512VPOPCNTDQ-LABEL: ugt_18_v8i64:
10306 ; AVX512VPOPCNTDQ: # %bb.0:
10307 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10308 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10309 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10310 ; AVX512VPOPCNTDQ-NEXT: retq
10312 ; BITALG-LABEL: ugt_18_v8i64:
10314 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10315 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10316 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10317 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10318 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10319 ; BITALG-NEXT: retq
10320 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10321 %3 = icmp ugt <8 x i64> %2, <i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18, i64 18>
10322 %4 = sext <8 x i1> %3 to <8 x i64>
10326 define <8 x i64> @ult_19_v8i64(<8 x i64> %0) {
10327 ; AVX512F-LABEL: ult_19_v8i64:
10328 ; AVX512F: # %bb.0:
10329 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10330 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10331 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10332 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10333 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10334 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10335 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10336 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10337 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10338 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10339 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10340 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10341 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10342 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10343 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10344 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10345 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10346 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10347 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10348 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10349 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10350 ; AVX512F-NEXT: retq
10352 ; AVX512BW-LABEL: ult_19_v8i64:
10353 ; AVX512BW: # %bb.0:
10354 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10355 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10356 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10357 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10358 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10359 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10360 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10361 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10362 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10363 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10364 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10365 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10366 ; AVX512BW-NEXT: retq
10368 ; AVX512VPOPCNTDQ-LABEL: ult_19_v8i64:
10369 ; AVX512VPOPCNTDQ: # %bb.0:
10370 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10371 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10372 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10373 ; AVX512VPOPCNTDQ-NEXT: retq
10375 ; BITALG-LABEL: ult_19_v8i64:
10377 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10378 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10379 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10380 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10381 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10382 ; BITALG-NEXT: retq
10383 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10384 %3 = icmp ult <8 x i64> %2, <i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19>
10385 %4 = sext <8 x i1> %3 to <8 x i64>
10389 define <8 x i64> @ugt_19_v8i64(<8 x i64> %0) {
10390 ; AVX512F-LABEL: ugt_19_v8i64:
10391 ; AVX512F: # %bb.0:
10392 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10393 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10394 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10395 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10396 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10397 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10398 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10399 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10400 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10401 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10402 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10403 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10404 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10405 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10406 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10407 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10408 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10409 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10410 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10411 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10412 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10413 ; AVX512F-NEXT: retq
10415 ; AVX512BW-LABEL: ugt_19_v8i64:
10416 ; AVX512BW: # %bb.0:
10417 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10418 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10419 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10420 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10421 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10422 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10423 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10424 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10425 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10426 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10427 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10428 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10429 ; AVX512BW-NEXT: retq
10431 ; AVX512VPOPCNTDQ-LABEL: ugt_19_v8i64:
10432 ; AVX512VPOPCNTDQ: # %bb.0:
10433 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10434 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10435 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10436 ; AVX512VPOPCNTDQ-NEXT: retq
10438 ; BITALG-LABEL: ugt_19_v8i64:
10440 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10441 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10442 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10443 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10444 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10445 ; BITALG-NEXT: retq
10446 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10447 %3 = icmp ugt <8 x i64> %2, <i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19, i64 19>
10448 %4 = sext <8 x i1> %3 to <8 x i64>
10452 define <8 x i64> @ult_20_v8i64(<8 x i64> %0) {
10453 ; AVX512F-LABEL: ult_20_v8i64:
10454 ; AVX512F: # %bb.0:
10455 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10456 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10457 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10458 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10459 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10460 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10461 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10462 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10463 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10464 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10465 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10466 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10467 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10468 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10469 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10470 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10471 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10472 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10473 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10474 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10475 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10476 ; AVX512F-NEXT: retq
10478 ; AVX512BW-LABEL: ult_20_v8i64:
10479 ; AVX512BW: # %bb.0:
10480 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10481 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10482 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10483 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10484 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10485 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10486 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10487 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10488 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10489 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10490 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10491 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10492 ; AVX512BW-NEXT: retq
10494 ; AVX512VPOPCNTDQ-LABEL: ult_20_v8i64:
10495 ; AVX512VPOPCNTDQ: # %bb.0:
10496 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10497 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10498 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10499 ; AVX512VPOPCNTDQ-NEXT: retq
10501 ; BITALG-LABEL: ult_20_v8i64:
10503 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10504 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10505 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10506 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10507 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10508 ; BITALG-NEXT: retq
10509 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10510 %3 = icmp ult <8 x i64> %2, <i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20>
10511 %4 = sext <8 x i1> %3 to <8 x i64>
10515 define <8 x i64> @ugt_20_v8i64(<8 x i64> %0) {
10516 ; AVX512F-LABEL: ugt_20_v8i64:
10517 ; AVX512F: # %bb.0:
10518 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10519 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10520 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10521 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10522 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10523 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10524 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10525 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10526 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10527 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10528 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10529 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10530 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10531 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10532 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10533 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10534 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10535 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10536 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10537 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10538 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10539 ; AVX512F-NEXT: retq
10541 ; AVX512BW-LABEL: ugt_20_v8i64:
10542 ; AVX512BW: # %bb.0:
10543 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10544 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10545 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10546 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10547 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10548 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10549 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10550 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10551 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10552 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10553 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10554 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10555 ; AVX512BW-NEXT: retq
10557 ; AVX512VPOPCNTDQ-LABEL: ugt_20_v8i64:
10558 ; AVX512VPOPCNTDQ: # %bb.0:
10559 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10560 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10561 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10562 ; AVX512VPOPCNTDQ-NEXT: retq
10564 ; BITALG-LABEL: ugt_20_v8i64:
10566 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10567 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10568 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10569 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10570 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10571 ; BITALG-NEXT: retq
10572 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10573 %3 = icmp ugt <8 x i64> %2, <i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20, i64 20>
10574 %4 = sext <8 x i1> %3 to <8 x i64>
10578 define <8 x i64> @ult_21_v8i64(<8 x i64> %0) {
10579 ; AVX512F-LABEL: ult_21_v8i64:
10580 ; AVX512F: # %bb.0:
10581 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10582 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10583 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10584 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10585 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10586 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10587 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10588 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10589 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10590 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10591 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10592 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10593 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10594 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10595 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10596 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10597 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10598 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10599 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10600 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10601 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10602 ; AVX512F-NEXT: retq
10604 ; AVX512BW-LABEL: ult_21_v8i64:
10605 ; AVX512BW: # %bb.0:
10606 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10607 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10608 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10609 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10610 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10611 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10612 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10613 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10614 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10615 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10616 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10617 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10618 ; AVX512BW-NEXT: retq
10620 ; AVX512VPOPCNTDQ-LABEL: ult_21_v8i64:
10621 ; AVX512VPOPCNTDQ: # %bb.0:
10622 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10623 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10624 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10625 ; AVX512VPOPCNTDQ-NEXT: retq
10627 ; BITALG-LABEL: ult_21_v8i64:
10629 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10630 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10631 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10632 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10633 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10634 ; BITALG-NEXT: retq
10635 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10636 %3 = icmp ult <8 x i64> %2, <i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21>
10637 %4 = sext <8 x i1> %3 to <8 x i64>
10641 define <8 x i64> @ugt_21_v8i64(<8 x i64> %0) {
10642 ; AVX512F-LABEL: ugt_21_v8i64:
10643 ; AVX512F: # %bb.0:
10644 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10645 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10646 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10647 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10648 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10649 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10650 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10651 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10652 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10653 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10654 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10655 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10656 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10657 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10658 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10659 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10660 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10661 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10662 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10663 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10664 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10665 ; AVX512F-NEXT: retq
10667 ; AVX512BW-LABEL: ugt_21_v8i64:
10668 ; AVX512BW: # %bb.0:
10669 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10670 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10671 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10672 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10673 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10674 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10675 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10676 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10677 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10678 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10679 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10680 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10681 ; AVX512BW-NEXT: retq
10683 ; AVX512VPOPCNTDQ-LABEL: ugt_21_v8i64:
10684 ; AVX512VPOPCNTDQ: # %bb.0:
10685 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10686 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10687 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10688 ; AVX512VPOPCNTDQ-NEXT: retq
10690 ; BITALG-LABEL: ugt_21_v8i64:
10692 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10693 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10694 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10695 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10696 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10697 ; BITALG-NEXT: retq
10698 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10699 %3 = icmp ugt <8 x i64> %2, <i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21, i64 21>
10700 %4 = sext <8 x i1> %3 to <8 x i64>
10704 define <8 x i64> @ult_22_v8i64(<8 x i64> %0) {
10705 ; AVX512F-LABEL: ult_22_v8i64:
10706 ; AVX512F: # %bb.0:
10707 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10708 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10709 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10710 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10711 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10712 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10713 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10714 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10715 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10716 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10717 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10718 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10719 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10720 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10721 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10722 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10723 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10724 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10725 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10726 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10727 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10728 ; AVX512F-NEXT: retq
10730 ; AVX512BW-LABEL: ult_22_v8i64:
10731 ; AVX512BW: # %bb.0:
10732 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10733 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10734 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10735 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10736 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10737 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10738 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10739 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10740 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10741 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10742 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10743 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10744 ; AVX512BW-NEXT: retq
10746 ; AVX512VPOPCNTDQ-LABEL: ult_22_v8i64:
10747 ; AVX512VPOPCNTDQ: # %bb.0:
10748 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10749 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10750 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10751 ; AVX512VPOPCNTDQ-NEXT: retq
10753 ; BITALG-LABEL: ult_22_v8i64:
10755 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10756 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10757 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10758 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10759 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10760 ; BITALG-NEXT: retq
10761 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10762 %3 = icmp ult <8 x i64> %2, <i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22>
10763 %4 = sext <8 x i1> %3 to <8 x i64>
10767 define <8 x i64> @ugt_22_v8i64(<8 x i64> %0) {
10768 ; AVX512F-LABEL: ugt_22_v8i64:
10769 ; AVX512F: # %bb.0:
10770 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10771 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10772 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10773 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10774 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10775 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10776 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10777 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10778 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10779 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10780 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10781 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10782 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10783 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10784 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10785 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10786 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10787 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10788 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10789 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10790 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10791 ; AVX512F-NEXT: retq
10793 ; AVX512BW-LABEL: ugt_22_v8i64:
10794 ; AVX512BW: # %bb.0:
10795 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10796 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10797 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10798 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10799 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10800 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10801 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10802 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10803 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10804 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10805 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10806 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10807 ; AVX512BW-NEXT: retq
10809 ; AVX512VPOPCNTDQ-LABEL: ugt_22_v8i64:
10810 ; AVX512VPOPCNTDQ: # %bb.0:
10811 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10812 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10813 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10814 ; AVX512VPOPCNTDQ-NEXT: retq
10816 ; BITALG-LABEL: ugt_22_v8i64:
10818 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10819 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10820 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10821 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10822 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10823 ; BITALG-NEXT: retq
10824 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10825 %3 = icmp ugt <8 x i64> %2, <i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22, i64 22>
10826 %4 = sext <8 x i1> %3 to <8 x i64>
10830 define <8 x i64> @ult_23_v8i64(<8 x i64> %0) {
10831 ; AVX512F-LABEL: ult_23_v8i64:
10832 ; AVX512F: # %bb.0:
10833 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10834 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10835 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10836 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10837 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10838 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10839 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10840 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10841 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10842 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10843 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10844 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10845 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10846 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10847 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10848 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10849 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10850 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10851 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10852 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10853 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10854 ; AVX512F-NEXT: retq
10856 ; AVX512BW-LABEL: ult_23_v8i64:
10857 ; AVX512BW: # %bb.0:
10858 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10859 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10860 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10861 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10862 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10863 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10864 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10865 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10866 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10867 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10868 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10869 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10870 ; AVX512BW-NEXT: retq
10872 ; AVX512VPOPCNTDQ-LABEL: ult_23_v8i64:
10873 ; AVX512VPOPCNTDQ: # %bb.0:
10874 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10875 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10876 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10877 ; AVX512VPOPCNTDQ-NEXT: retq
10879 ; BITALG-LABEL: ult_23_v8i64:
10881 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10882 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10883 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10884 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10885 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10886 ; BITALG-NEXT: retq
10887 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10888 %3 = icmp ult <8 x i64> %2, <i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23>
10889 %4 = sext <8 x i1> %3 to <8 x i64>
10893 define <8 x i64> @ugt_23_v8i64(<8 x i64> %0) {
10894 ; AVX512F-LABEL: ugt_23_v8i64:
10895 ; AVX512F: # %bb.0:
10896 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10897 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10898 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10899 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10900 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10901 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10902 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10903 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10904 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10905 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10906 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10907 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10908 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10909 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10910 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10911 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10912 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10913 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10914 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10915 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10916 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10917 ; AVX512F-NEXT: retq
10919 ; AVX512BW-LABEL: ugt_23_v8i64:
10920 ; AVX512BW: # %bb.0:
10921 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10922 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10923 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10924 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10925 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10926 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10927 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10928 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10929 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10930 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10931 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10932 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10933 ; AVX512BW-NEXT: retq
10935 ; AVX512VPOPCNTDQ-LABEL: ugt_23_v8i64:
10936 ; AVX512VPOPCNTDQ: # %bb.0:
10937 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
10938 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10939 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10940 ; AVX512VPOPCNTDQ-NEXT: retq
10942 ; BITALG-LABEL: ugt_23_v8i64:
10944 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
10945 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
10946 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10947 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10948 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10949 ; BITALG-NEXT: retq
10950 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
10951 %3 = icmp ugt <8 x i64> %2, <i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23, i64 23>
10952 %4 = sext <8 x i1> %3 to <8 x i64>
10956 define <8 x i64> @ult_24_v8i64(<8 x i64> %0) {
10957 ; AVX512F-LABEL: ult_24_v8i64:
10958 ; AVX512F: # %bb.0:
10959 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
10960 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10961 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
10962 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10963 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
10964 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
10965 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
10966 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
10967 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
10968 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
10969 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
10970 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
10971 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
10972 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
10973 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
10974 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
10975 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
10976 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
10977 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
10978 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10979 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10980 ; AVX512F-NEXT: retq
10982 ; AVX512BW-LABEL: ult_24_v8i64:
10983 ; AVX512BW: # %bb.0:
10984 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
10985 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
10986 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
10987 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
10988 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
10989 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
10990 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
10991 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
10992 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
10993 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
10994 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
10995 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
10996 ; AVX512BW-NEXT: retq
10998 ; AVX512VPOPCNTDQ-LABEL: ult_24_v8i64:
10999 ; AVX512VPOPCNTDQ: # %bb.0:
11000 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11001 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11002 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11003 ; AVX512VPOPCNTDQ-NEXT: retq
11005 ; BITALG-LABEL: ult_24_v8i64:
11007 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11008 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11009 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11010 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11011 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11012 ; BITALG-NEXT: retq
11013 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11014 %3 = icmp ult <8 x i64> %2, <i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24>
11015 %4 = sext <8 x i1> %3 to <8 x i64>
11019 define <8 x i64> @ugt_24_v8i64(<8 x i64> %0) {
11020 ; AVX512F-LABEL: ugt_24_v8i64:
11021 ; AVX512F: # %bb.0:
11022 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11023 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11024 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11025 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11026 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11027 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11028 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11029 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11030 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11031 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11032 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11033 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11034 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11035 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11036 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11037 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11038 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11039 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11040 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11041 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11042 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11043 ; AVX512F-NEXT: retq
11045 ; AVX512BW-LABEL: ugt_24_v8i64:
11046 ; AVX512BW: # %bb.0:
11047 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11048 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11049 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11050 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11051 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11052 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11053 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11054 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11055 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11056 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11057 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11058 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11059 ; AVX512BW-NEXT: retq
11061 ; AVX512VPOPCNTDQ-LABEL: ugt_24_v8i64:
11062 ; AVX512VPOPCNTDQ: # %bb.0:
11063 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11064 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11065 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11066 ; AVX512VPOPCNTDQ-NEXT: retq
11068 ; BITALG-LABEL: ugt_24_v8i64:
11070 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11071 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11072 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11073 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11074 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11075 ; BITALG-NEXT: retq
11076 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11077 %3 = icmp ugt <8 x i64> %2, <i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24, i64 24>
11078 %4 = sext <8 x i1> %3 to <8 x i64>
11082 define <8 x i64> @ult_25_v8i64(<8 x i64> %0) {
11083 ; AVX512F-LABEL: ult_25_v8i64:
11084 ; AVX512F: # %bb.0:
11085 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11086 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11087 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11088 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11089 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11090 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11091 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11092 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11093 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11094 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11095 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11096 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11097 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11098 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11099 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11100 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11101 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11102 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11103 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11104 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11105 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11106 ; AVX512F-NEXT: retq
11108 ; AVX512BW-LABEL: ult_25_v8i64:
11109 ; AVX512BW: # %bb.0:
11110 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11111 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11112 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11113 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11114 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11115 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11116 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11117 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11118 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11119 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11120 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11121 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11122 ; AVX512BW-NEXT: retq
11124 ; AVX512VPOPCNTDQ-LABEL: ult_25_v8i64:
11125 ; AVX512VPOPCNTDQ: # %bb.0:
11126 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11127 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11128 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11129 ; AVX512VPOPCNTDQ-NEXT: retq
11131 ; BITALG-LABEL: ult_25_v8i64:
11133 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11134 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11135 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11136 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11137 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11138 ; BITALG-NEXT: retq
11139 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11140 %3 = icmp ult <8 x i64> %2, <i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25>
11141 %4 = sext <8 x i1> %3 to <8 x i64>
11145 define <8 x i64> @ugt_25_v8i64(<8 x i64> %0) {
11146 ; AVX512F-LABEL: ugt_25_v8i64:
11147 ; AVX512F: # %bb.0:
11148 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11149 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11150 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11151 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11152 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11153 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11154 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11155 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11156 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11157 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11158 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11159 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11160 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11161 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11162 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11163 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11164 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11165 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11166 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11167 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11168 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11169 ; AVX512F-NEXT: retq
11171 ; AVX512BW-LABEL: ugt_25_v8i64:
11172 ; AVX512BW: # %bb.0:
11173 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11174 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11175 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11176 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11177 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11178 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11179 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11180 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11181 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11182 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11183 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11184 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11185 ; AVX512BW-NEXT: retq
11187 ; AVX512VPOPCNTDQ-LABEL: ugt_25_v8i64:
11188 ; AVX512VPOPCNTDQ: # %bb.0:
11189 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11190 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11191 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11192 ; AVX512VPOPCNTDQ-NEXT: retq
11194 ; BITALG-LABEL: ugt_25_v8i64:
11196 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11197 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11198 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11199 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11200 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11201 ; BITALG-NEXT: retq
11202 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11203 %3 = icmp ugt <8 x i64> %2, <i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25, i64 25>
11204 %4 = sext <8 x i1> %3 to <8 x i64>
11208 define <8 x i64> @ult_26_v8i64(<8 x i64> %0) {
11209 ; AVX512F-LABEL: ult_26_v8i64:
11210 ; AVX512F: # %bb.0:
11211 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11212 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11213 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11214 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11215 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11216 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11217 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11218 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11219 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11220 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11221 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11222 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11223 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11224 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11225 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11226 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11227 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11228 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11229 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11230 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11231 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11232 ; AVX512F-NEXT: retq
11234 ; AVX512BW-LABEL: ult_26_v8i64:
11235 ; AVX512BW: # %bb.0:
11236 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11237 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11238 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11239 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11240 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11241 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11242 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11243 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11244 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11245 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11246 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11247 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11248 ; AVX512BW-NEXT: retq
11250 ; AVX512VPOPCNTDQ-LABEL: ult_26_v8i64:
11251 ; AVX512VPOPCNTDQ: # %bb.0:
11252 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11253 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11254 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11255 ; AVX512VPOPCNTDQ-NEXT: retq
11257 ; BITALG-LABEL: ult_26_v8i64:
11259 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11260 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11261 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11262 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11263 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11264 ; BITALG-NEXT: retq
11265 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11266 %3 = icmp ult <8 x i64> %2, <i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26>
11267 %4 = sext <8 x i1> %3 to <8 x i64>
11271 define <8 x i64> @ugt_26_v8i64(<8 x i64> %0) {
11272 ; AVX512F-LABEL: ugt_26_v8i64:
11273 ; AVX512F: # %bb.0:
11274 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11275 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11276 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11277 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11278 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11279 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11280 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11281 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11282 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11283 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11284 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11285 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11286 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11287 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11288 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11289 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11290 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11291 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11292 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11293 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11294 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11295 ; AVX512F-NEXT: retq
11297 ; AVX512BW-LABEL: ugt_26_v8i64:
11298 ; AVX512BW: # %bb.0:
11299 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11300 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11301 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11302 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11303 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11304 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11305 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11306 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11307 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11308 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11309 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11310 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11311 ; AVX512BW-NEXT: retq
11313 ; AVX512VPOPCNTDQ-LABEL: ugt_26_v8i64:
11314 ; AVX512VPOPCNTDQ: # %bb.0:
11315 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11316 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11317 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11318 ; AVX512VPOPCNTDQ-NEXT: retq
11320 ; BITALG-LABEL: ugt_26_v8i64:
11322 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11323 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11324 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11325 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11326 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11327 ; BITALG-NEXT: retq
11328 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11329 %3 = icmp ugt <8 x i64> %2, <i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26, i64 26>
11330 %4 = sext <8 x i1> %3 to <8 x i64>
11334 define <8 x i64> @ult_27_v8i64(<8 x i64> %0) {
11335 ; AVX512F-LABEL: ult_27_v8i64:
11336 ; AVX512F: # %bb.0:
11337 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11338 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11339 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11340 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11341 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11342 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11343 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11344 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11345 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11346 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11347 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11348 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11349 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11350 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11351 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11352 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11353 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11354 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11355 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11356 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11357 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11358 ; AVX512F-NEXT: retq
11360 ; AVX512BW-LABEL: ult_27_v8i64:
11361 ; AVX512BW: # %bb.0:
11362 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11363 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11364 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11365 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11366 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11367 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11368 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11369 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11370 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11371 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11372 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11373 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11374 ; AVX512BW-NEXT: retq
11376 ; AVX512VPOPCNTDQ-LABEL: ult_27_v8i64:
11377 ; AVX512VPOPCNTDQ: # %bb.0:
11378 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11379 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11380 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11381 ; AVX512VPOPCNTDQ-NEXT: retq
11383 ; BITALG-LABEL: ult_27_v8i64:
11385 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11386 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11387 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11388 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11389 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11390 ; BITALG-NEXT: retq
11391 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11392 %3 = icmp ult <8 x i64> %2, <i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27>
11393 %4 = sext <8 x i1> %3 to <8 x i64>
11397 define <8 x i64> @ugt_27_v8i64(<8 x i64> %0) {
11398 ; AVX512F-LABEL: ugt_27_v8i64:
11399 ; AVX512F: # %bb.0:
11400 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11401 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11402 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11403 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11404 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11405 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11406 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11407 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11408 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11409 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11410 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11411 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11412 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11413 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11414 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11415 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11416 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11417 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11418 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11419 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11420 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11421 ; AVX512F-NEXT: retq
11423 ; AVX512BW-LABEL: ugt_27_v8i64:
11424 ; AVX512BW: # %bb.0:
11425 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11426 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11427 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11428 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11429 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11430 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11431 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11432 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11433 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11434 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11435 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11436 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11437 ; AVX512BW-NEXT: retq
11439 ; AVX512VPOPCNTDQ-LABEL: ugt_27_v8i64:
11440 ; AVX512VPOPCNTDQ: # %bb.0:
11441 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11442 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11443 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11444 ; AVX512VPOPCNTDQ-NEXT: retq
11446 ; BITALG-LABEL: ugt_27_v8i64:
11448 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11449 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11450 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11451 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11452 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11453 ; BITALG-NEXT: retq
11454 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11455 %3 = icmp ugt <8 x i64> %2, <i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27, i64 27>
11456 %4 = sext <8 x i1> %3 to <8 x i64>
11460 define <8 x i64> @ult_28_v8i64(<8 x i64> %0) {
11461 ; AVX512F-LABEL: ult_28_v8i64:
11462 ; AVX512F: # %bb.0:
11463 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11464 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11465 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11466 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11467 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11468 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11469 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11470 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11471 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11472 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11473 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11474 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11475 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11476 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11477 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11478 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11479 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11480 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11481 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11482 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11483 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11484 ; AVX512F-NEXT: retq
11486 ; AVX512BW-LABEL: ult_28_v8i64:
11487 ; AVX512BW: # %bb.0:
11488 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11489 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11490 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11491 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11492 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11493 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11494 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11495 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11496 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11497 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11498 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11499 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11500 ; AVX512BW-NEXT: retq
11502 ; AVX512VPOPCNTDQ-LABEL: ult_28_v8i64:
11503 ; AVX512VPOPCNTDQ: # %bb.0:
11504 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11505 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11506 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11507 ; AVX512VPOPCNTDQ-NEXT: retq
11509 ; BITALG-LABEL: ult_28_v8i64:
11511 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11512 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11513 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11514 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11515 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11516 ; BITALG-NEXT: retq
11517 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11518 %3 = icmp ult <8 x i64> %2, <i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28>
11519 %4 = sext <8 x i1> %3 to <8 x i64>
11523 define <8 x i64> @ugt_28_v8i64(<8 x i64> %0) {
11524 ; AVX512F-LABEL: ugt_28_v8i64:
11525 ; AVX512F: # %bb.0:
11526 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11527 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11528 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11529 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11530 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11531 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11532 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11533 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11534 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11535 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11536 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11537 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11538 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11539 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11540 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11541 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11542 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11543 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11544 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11545 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11546 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11547 ; AVX512F-NEXT: retq
11549 ; AVX512BW-LABEL: ugt_28_v8i64:
11550 ; AVX512BW: # %bb.0:
11551 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11552 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11553 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11554 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11555 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11556 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11557 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11558 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11559 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11560 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11561 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11562 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11563 ; AVX512BW-NEXT: retq
11565 ; AVX512VPOPCNTDQ-LABEL: ugt_28_v8i64:
11566 ; AVX512VPOPCNTDQ: # %bb.0:
11567 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11568 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11569 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11570 ; AVX512VPOPCNTDQ-NEXT: retq
11572 ; BITALG-LABEL: ugt_28_v8i64:
11574 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11575 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11576 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11577 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11578 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11579 ; BITALG-NEXT: retq
11580 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11581 %3 = icmp ugt <8 x i64> %2, <i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28, i64 28>
11582 %4 = sext <8 x i1> %3 to <8 x i64>
11586 define <8 x i64> @ult_29_v8i64(<8 x i64> %0) {
11587 ; AVX512F-LABEL: ult_29_v8i64:
11588 ; AVX512F: # %bb.0:
11589 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11590 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11591 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11592 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11593 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11594 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11595 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11596 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11597 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11598 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11599 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11600 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11601 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11602 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11603 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11604 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11605 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11606 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11607 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11608 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11609 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11610 ; AVX512F-NEXT: retq
11612 ; AVX512BW-LABEL: ult_29_v8i64:
11613 ; AVX512BW: # %bb.0:
11614 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11615 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11616 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11617 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11618 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11619 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11620 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11621 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11622 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11623 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11624 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11625 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11626 ; AVX512BW-NEXT: retq
11628 ; AVX512VPOPCNTDQ-LABEL: ult_29_v8i64:
11629 ; AVX512VPOPCNTDQ: # %bb.0:
11630 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11631 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11632 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11633 ; AVX512VPOPCNTDQ-NEXT: retq
11635 ; BITALG-LABEL: ult_29_v8i64:
11637 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11638 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11639 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11640 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11641 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11642 ; BITALG-NEXT: retq
11643 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11644 %3 = icmp ult <8 x i64> %2, <i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29>
11645 %4 = sext <8 x i1> %3 to <8 x i64>
11649 define <8 x i64> @ugt_29_v8i64(<8 x i64> %0) {
11650 ; AVX512F-LABEL: ugt_29_v8i64:
11651 ; AVX512F: # %bb.0:
11652 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11653 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11654 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11655 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11656 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11657 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11658 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11659 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11660 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11661 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11662 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11663 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11664 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11665 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11666 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11667 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11668 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11669 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11670 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11671 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11672 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11673 ; AVX512F-NEXT: retq
11675 ; AVX512BW-LABEL: ugt_29_v8i64:
11676 ; AVX512BW: # %bb.0:
11677 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11678 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11679 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11680 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11681 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11682 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11683 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11684 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11685 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11686 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11687 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11688 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11689 ; AVX512BW-NEXT: retq
11691 ; AVX512VPOPCNTDQ-LABEL: ugt_29_v8i64:
11692 ; AVX512VPOPCNTDQ: # %bb.0:
11693 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11694 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11695 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11696 ; AVX512VPOPCNTDQ-NEXT: retq
11698 ; BITALG-LABEL: ugt_29_v8i64:
11700 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11701 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11702 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11703 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11704 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11705 ; BITALG-NEXT: retq
11706 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11707 %3 = icmp ugt <8 x i64> %2, <i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29, i64 29>
11708 %4 = sext <8 x i1> %3 to <8 x i64>
11712 define <8 x i64> @ult_30_v8i64(<8 x i64> %0) {
11713 ; AVX512F-LABEL: ult_30_v8i64:
11714 ; AVX512F: # %bb.0:
11715 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11716 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11717 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11718 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11719 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11720 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11721 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11722 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11723 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11724 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11725 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11726 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11727 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11728 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11729 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11730 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11731 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11732 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11733 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11734 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11735 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11736 ; AVX512F-NEXT: retq
11738 ; AVX512BW-LABEL: ult_30_v8i64:
11739 ; AVX512BW: # %bb.0:
11740 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11741 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11742 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11743 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11744 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11745 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11746 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11747 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11748 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11749 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11750 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11751 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11752 ; AVX512BW-NEXT: retq
11754 ; AVX512VPOPCNTDQ-LABEL: ult_30_v8i64:
11755 ; AVX512VPOPCNTDQ: # %bb.0:
11756 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11757 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11758 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11759 ; AVX512VPOPCNTDQ-NEXT: retq
11761 ; BITALG-LABEL: ult_30_v8i64:
11763 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11764 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11765 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11766 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11767 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11768 ; BITALG-NEXT: retq
11769 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11770 %3 = icmp ult <8 x i64> %2, <i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30>
11771 %4 = sext <8 x i1> %3 to <8 x i64>
11775 define <8 x i64> @ugt_30_v8i64(<8 x i64> %0) {
11776 ; AVX512F-LABEL: ugt_30_v8i64:
11777 ; AVX512F: # %bb.0:
11778 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11779 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11780 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11781 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11782 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11783 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11784 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11785 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11786 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11787 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11788 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11789 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11790 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11791 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11792 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11793 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11794 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11795 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11796 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11797 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11798 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11799 ; AVX512F-NEXT: retq
11801 ; AVX512BW-LABEL: ugt_30_v8i64:
11802 ; AVX512BW: # %bb.0:
11803 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11804 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11805 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11806 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11807 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11808 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11809 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11810 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11811 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11812 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11813 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11814 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11815 ; AVX512BW-NEXT: retq
11817 ; AVX512VPOPCNTDQ-LABEL: ugt_30_v8i64:
11818 ; AVX512VPOPCNTDQ: # %bb.0:
11819 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11820 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11821 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11822 ; AVX512VPOPCNTDQ-NEXT: retq
11824 ; BITALG-LABEL: ugt_30_v8i64:
11826 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11827 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11828 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11829 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11830 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11831 ; BITALG-NEXT: retq
11832 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11833 %3 = icmp ugt <8 x i64> %2, <i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30, i64 30>
11834 %4 = sext <8 x i1> %3 to <8 x i64>
11838 define <8 x i64> @ult_31_v8i64(<8 x i64> %0) {
11839 ; AVX512F-LABEL: ult_31_v8i64:
11840 ; AVX512F: # %bb.0:
11841 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11842 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11843 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11844 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11845 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11846 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11847 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11848 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11849 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11850 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11851 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11852 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11853 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11854 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11855 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11856 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11857 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11858 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11859 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11860 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11861 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11862 ; AVX512F-NEXT: retq
11864 ; AVX512BW-LABEL: ult_31_v8i64:
11865 ; AVX512BW: # %bb.0:
11866 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11867 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11868 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11869 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11870 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11871 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11872 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11873 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11874 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11875 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11876 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11877 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11878 ; AVX512BW-NEXT: retq
11880 ; AVX512VPOPCNTDQ-LABEL: ult_31_v8i64:
11881 ; AVX512VPOPCNTDQ: # %bb.0:
11882 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11883 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11884 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11885 ; AVX512VPOPCNTDQ-NEXT: retq
11887 ; BITALG-LABEL: ult_31_v8i64:
11889 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11890 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11891 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11892 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11893 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11894 ; BITALG-NEXT: retq
11895 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11896 %3 = icmp ult <8 x i64> %2, <i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31>
11897 %4 = sext <8 x i1> %3 to <8 x i64>
11901 define <8 x i64> @ugt_31_v8i64(<8 x i64> %0) {
11902 ; AVX512F-LABEL: ugt_31_v8i64:
11903 ; AVX512F: # %bb.0:
11904 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11905 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11906 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11907 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11908 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11909 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11910 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11911 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11912 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11913 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11914 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11915 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11916 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11917 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11918 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11919 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11920 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11921 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11922 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11923 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11924 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11925 ; AVX512F-NEXT: retq
11927 ; AVX512BW-LABEL: ugt_31_v8i64:
11928 ; AVX512BW: # %bb.0:
11929 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11930 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11931 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11932 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11933 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11934 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11935 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11936 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
11937 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
11938 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11939 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11940 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11941 ; AVX512BW-NEXT: retq
11943 ; AVX512VPOPCNTDQ-LABEL: ugt_31_v8i64:
11944 ; AVX512VPOPCNTDQ: # %bb.0:
11945 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
11946 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11947 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11948 ; AVX512VPOPCNTDQ-NEXT: retq
11950 ; BITALG-LABEL: ugt_31_v8i64:
11952 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
11953 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
11954 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
11955 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11956 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11957 ; BITALG-NEXT: retq
11958 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
11959 %3 = icmp ugt <8 x i64> %2, <i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31, i64 31>
11960 %4 = sext <8 x i1> %3 to <8 x i64>
11964 define <8 x i64> @ult_32_v8i64(<8 x i64> %0) {
11965 ; AVX512F-LABEL: ult_32_v8i64:
11966 ; AVX512F: # %bb.0:
11967 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
11968 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11969 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
11970 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11971 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
11972 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
11973 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
11974 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
11975 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
11976 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
11977 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
11978 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
11979 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
11980 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
11981 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
11982 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
11983 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
11984 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
11985 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
11986 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
11987 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
11988 ; AVX512F-NEXT: retq
11990 ; AVX512BW-LABEL: ult_32_v8i64:
11991 ; AVX512BW: # %bb.0:
11992 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
11993 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
11994 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
11995 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
11996 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
11997 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
11998 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
11999 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12000 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12001 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12002 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12003 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12004 ; AVX512BW-NEXT: retq
12006 ; AVX512VPOPCNTDQ-LABEL: ult_32_v8i64:
12007 ; AVX512VPOPCNTDQ: # %bb.0:
12008 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12009 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12010 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12011 ; AVX512VPOPCNTDQ-NEXT: retq
12013 ; BITALG-LABEL: ult_32_v8i64:
12015 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12016 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12017 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12018 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12019 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12020 ; BITALG-NEXT: retq
12021 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12022 %3 = icmp ult <8 x i64> %2, <i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32>
12023 %4 = sext <8 x i1> %3 to <8 x i64>
12027 define <8 x i64> @ugt_32_v8i64(<8 x i64> %0) {
12028 ; AVX512F-LABEL: ugt_32_v8i64:
12029 ; AVX512F: # %bb.0:
12030 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12031 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12032 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12033 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12034 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12035 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12036 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12037 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12038 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12039 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12040 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12041 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12042 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12043 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12044 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12045 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12046 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12047 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12048 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12049 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12050 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12051 ; AVX512F-NEXT: retq
12053 ; AVX512BW-LABEL: ugt_32_v8i64:
12054 ; AVX512BW: # %bb.0:
12055 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12056 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12057 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12058 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12059 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12060 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12061 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12062 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12063 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12064 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12065 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12066 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12067 ; AVX512BW-NEXT: retq
12069 ; AVX512VPOPCNTDQ-LABEL: ugt_32_v8i64:
12070 ; AVX512VPOPCNTDQ: # %bb.0:
12071 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12072 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12073 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12074 ; AVX512VPOPCNTDQ-NEXT: retq
12076 ; BITALG-LABEL: ugt_32_v8i64:
12078 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12079 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12080 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12081 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12082 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12083 ; BITALG-NEXT: retq
12084 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12085 %3 = icmp ugt <8 x i64> %2, <i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32, i64 32>
12086 %4 = sext <8 x i1> %3 to <8 x i64>
12090 define <8 x i64> @ult_33_v8i64(<8 x i64> %0) {
12091 ; AVX512F-LABEL: ult_33_v8i64:
12092 ; AVX512F: # %bb.0:
12093 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12094 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12095 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12096 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12097 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12098 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12099 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12100 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12101 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12102 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12103 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12104 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12105 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12106 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12107 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12108 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12109 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12110 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12111 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12112 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12113 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12114 ; AVX512F-NEXT: retq
12116 ; AVX512BW-LABEL: ult_33_v8i64:
12117 ; AVX512BW: # %bb.0:
12118 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12119 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12120 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12121 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12122 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12123 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12124 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12125 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12126 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12127 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12128 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12129 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12130 ; AVX512BW-NEXT: retq
12132 ; AVX512VPOPCNTDQ-LABEL: ult_33_v8i64:
12133 ; AVX512VPOPCNTDQ: # %bb.0:
12134 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12135 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12136 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12137 ; AVX512VPOPCNTDQ-NEXT: retq
12139 ; BITALG-LABEL: ult_33_v8i64:
12141 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12142 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12143 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12144 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12145 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12146 ; BITALG-NEXT: retq
12147 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12148 %3 = icmp ult <8 x i64> %2, <i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33>
12149 %4 = sext <8 x i1> %3 to <8 x i64>
12153 define <8 x i64> @ugt_33_v8i64(<8 x i64> %0) {
12154 ; AVX512F-LABEL: ugt_33_v8i64:
12155 ; AVX512F: # %bb.0:
12156 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12157 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12158 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12159 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12160 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12161 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12162 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12163 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12164 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12165 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12166 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12167 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12168 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12169 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12170 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12171 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12172 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12173 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12174 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12175 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12176 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12177 ; AVX512F-NEXT: retq
12179 ; AVX512BW-LABEL: ugt_33_v8i64:
12180 ; AVX512BW: # %bb.0:
12181 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12182 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12183 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12184 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12185 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12186 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12187 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12188 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12189 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12190 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12191 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12192 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12193 ; AVX512BW-NEXT: retq
12195 ; AVX512VPOPCNTDQ-LABEL: ugt_33_v8i64:
12196 ; AVX512VPOPCNTDQ: # %bb.0:
12197 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12198 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12199 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12200 ; AVX512VPOPCNTDQ-NEXT: retq
12202 ; BITALG-LABEL: ugt_33_v8i64:
12204 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12205 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12206 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12207 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12208 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12209 ; BITALG-NEXT: retq
12210 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12211 %3 = icmp ugt <8 x i64> %2, <i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33, i64 33>
12212 %4 = sext <8 x i1> %3 to <8 x i64>
12216 define <8 x i64> @ult_34_v8i64(<8 x i64> %0) {
12217 ; AVX512F-LABEL: ult_34_v8i64:
12218 ; AVX512F: # %bb.0:
12219 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12220 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12221 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12222 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12223 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12224 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12225 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12226 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12227 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12228 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12229 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12230 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12231 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12232 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12233 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12234 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12235 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12236 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12237 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12238 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12239 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12240 ; AVX512F-NEXT: retq
12242 ; AVX512BW-LABEL: ult_34_v8i64:
12243 ; AVX512BW: # %bb.0:
12244 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12245 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12246 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12247 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12248 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12249 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12250 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12251 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12252 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12253 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12254 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12255 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12256 ; AVX512BW-NEXT: retq
12258 ; AVX512VPOPCNTDQ-LABEL: ult_34_v8i64:
12259 ; AVX512VPOPCNTDQ: # %bb.0:
12260 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12261 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12262 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12263 ; AVX512VPOPCNTDQ-NEXT: retq
12265 ; BITALG-LABEL: ult_34_v8i64:
12267 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12268 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12269 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12270 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12271 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12272 ; BITALG-NEXT: retq
12273 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12274 %3 = icmp ult <8 x i64> %2, <i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34>
12275 %4 = sext <8 x i1> %3 to <8 x i64>
12279 define <8 x i64> @ugt_34_v8i64(<8 x i64> %0) {
12280 ; AVX512F-LABEL: ugt_34_v8i64:
12281 ; AVX512F: # %bb.0:
12282 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12283 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12284 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12285 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12286 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12287 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12288 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12289 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12290 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12291 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12292 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12293 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12294 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12295 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12296 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12297 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12298 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12299 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12300 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12301 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12302 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12303 ; AVX512F-NEXT: retq
12305 ; AVX512BW-LABEL: ugt_34_v8i64:
12306 ; AVX512BW: # %bb.0:
12307 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12308 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12309 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12310 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12311 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12312 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12313 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12314 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12315 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12316 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12317 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12318 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12319 ; AVX512BW-NEXT: retq
12321 ; AVX512VPOPCNTDQ-LABEL: ugt_34_v8i64:
12322 ; AVX512VPOPCNTDQ: # %bb.0:
12323 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12324 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12325 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12326 ; AVX512VPOPCNTDQ-NEXT: retq
12328 ; BITALG-LABEL: ugt_34_v8i64:
12330 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12331 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12332 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12333 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12334 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12335 ; BITALG-NEXT: retq
12336 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12337 %3 = icmp ugt <8 x i64> %2, <i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34, i64 34>
12338 %4 = sext <8 x i1> %3 to <8 x i64>
12342 define <8 x i64> @ult_35_v8i64(<8 x i64> %0) {
12343 ; AVX512F-LABEL: ult_35_v8i64:
12344 ; AVX512F: # %bb.0:
12345 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12346 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12347 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12348 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12349 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12350 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12351 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12352 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12353 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12354 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12355 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12356 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12357 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12358 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12359 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12360 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12361 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12362 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12363 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12364 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12365 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12366 ; AVX512F-NEXT: retq
12368 ; AVX512BW-LABEL: ult_35_v8i64:
12369 ; AVX512BW: # %bb.0:
12370 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12371 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12372 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12373 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12374 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12375 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12376 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12377 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12378 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12379 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12380 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12381 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12382 ; AVX512BW-NEXT: retq
12384 ; AVX512VPOPCNTDQ-LABEL: ult_35_v8i64:
12385 ; AVX512VPOPCNTDQ: # %bb.0:
12386 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12387 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12388 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12389 ; AVX512VPOPCNTDQ-NEXT: retq
12391 ; BITALG-LABEL: ult_35_v8i64:
12393 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12394 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12395 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12396 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12397 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12398 ; BITALG-NEXT: retq
12399 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12400 %3 = icmp ult <8 x i64> %2, <i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35>
12401 %4 = sext <8 x i1> %3 to <8 x i64>
12405 define <8 x i64> @ugt_35_v8i64(<8 x i64> %0) {
12406 ; AVX512F-LABEL: ugt_35_v8i64:
12407 ; AVX512F: # %bb.0:
12408 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12409 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12410 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12411 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12412 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12413 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12414 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12415 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12416 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12417 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12418 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12419 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12420 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12421 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12422 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12423 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12424 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12425 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12426 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12427 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12428 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12429 ; AVX512F-NEXT: retq
12431 ; AVX512BW-LABEL: ugt_35_v8i64:
12432 ; AVX512BW: # %bb.0:
12433 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12434 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12435 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12436 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12437 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12438 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12439 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12440 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12441 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12442 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12443 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12444 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12445 ; AVX512BW-NEXT: retq
12447 ; AVX512VPOPCNTDQ-LABEL: ugt_35_v8i64:
12448 ; AVX512VPOPCNTDQ: # %bb.0:
12449 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12450 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12451 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12452 ; AVX512VPOPCNTDQ-NEXT: retq
12454 ; BITALG-LABEL: ugt_35_v8i64:
12456 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12457 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12458 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12459 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12460 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12461 ; BITALG-NEXT: retq
12462 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12463 %3 = icmp ugt <8 x i64> %2, <i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35, i64 35>
12464 %4 = sext <8 x i1> %3 to <8 x i64>
12468 define <8 x i64> @ult_36_v8i64(<8 x i64> %0) {
12469 ; AVX512F-LABEL: ult_36_v8i64:
12470 ; AVX512F: # %bb.0:
12471 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12472 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12473 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12474 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12475 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12476 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12477 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12478 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12479 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12480 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12481 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12482 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12483 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12484 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12485 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12486 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12487 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12488 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12489 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12490 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12491 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12492 ; AVX512F-NEXT: retq
12494 ; AVX512BW-LABEL: ult_36_v8i64:
12495 ; AVX512BW: # %bb.0:
12496 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12497 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12498 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12499 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12500 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12501 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12502 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12503 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12504 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12505 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12506 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12507 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12508 ; AVX512BW-NEXT: retq
12510 ; AVX512VPOPCNTDQ-LABEL: ult_36_v8i64:
12511 ; AVX512VPOPCNTDQ: # %bb.0:
12512 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12513 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12514 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12515 ; AVX512VPOPCNTDQ-NEXT: retq
12517 ; BITALG-LABEL: ult_36_v8i64:
12519 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12520 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12521 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12522 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12523 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12524 ; BITALG-NEXT: retq
12525 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12526 %3 = icmp ult <8 x i64> %2, <i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36>
12527 %4 = sext <8 x i1> %3 to <8 x i64>
12531 define <8 x i64> @ugt_36_v8i64(<8 x i64> %0) {
12532 ; AVX512F-LABEL: ugt_36_v8i64:
12533 ; AVX512F: # %bb.0:
12534 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12535 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12536 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12537 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12538 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12539 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12540 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12541 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12542 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12543 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12544 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12545 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12546 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12547 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12548 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12549 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12550 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12551 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12552 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12553 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12554 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12555 ; AVX512F-NEXT: retq
12557 ; AVX512BW-LABEL: ugt_36_v8i64:
12558 ; AVX512BW: # %bb.0:
12559 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12560 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12561 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12562 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12563 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12564 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12565 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12566 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12567 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12568 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12569 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12570 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12571 ; AVX512BW-NEXT: retq
12573 ; AVX512VPOPCNTDQ-LABEL: ugt_36_v8i64:
12574 ; AVX512VPOPCNTDQ: # %bb.0:
12575 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12576 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12577 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12578 ; AVX512VPOPCNTDQ-NEXT: retq
12580 ; BITALG-LABEL: ugt_36_v8i64:
12582 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12583 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12584 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12585 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12586 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12587 ; BITALG-NEXT: retq
12588 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12589 %3 = icmp ugt <8 x i64> %2, <i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36, i64 36>
12590 %4 = sext <8 x i1> %3 to <8 x i64>
12594 define <8 x i64> @ult_37_v8i64(<8 x i64> %0) {
12595 ; AVX512F-LABEL: ult_37_v8i64:
12596 ; AVX512F: # %bb.0:
12597 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12598 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12599 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12600 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12601 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12602 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12603 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12604 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12605 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12606 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12607 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12608 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12609 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12610 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12611 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12612 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12613 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12614 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12615 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12616 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12617 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12618 ; AVX512F-NEXT: retq
12620 ; AVX512BW-LABEL: ult_37_v8i64:
12621 ; AVX512BW: # %bb.0:
12622 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12623 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12624 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12625 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12626 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12627 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12628 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12629 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12630 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12631 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12632 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12633 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12634 ; AVX512BW-NEXT: retq
12636 ; AVX512VPOPCNTDQ-LABEL: ult_37_v8i64:
12637 ; AVX512VPOPCNTDQ: # %bb.0:
12638 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12639 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12640 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12641 ; AVX512VPOPCNTDQ-NEXT: retq
12643 ; BITALG-LABEL: ult_37_v8i64:
12645 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12646 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12647 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12648 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12649 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12650 ; BITALG-NEXT: retq
12651 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12652 %3 = icmp ult <8 x i64> %2, <i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37>
12653 %4 = sext <8 x i1> %3 to <8 x i64>
12657 define <8 x i64> @ugt_37_v8i64(<8 x i64> %0) {
12658 ; AVX512F-LABEL: ugt_37_v8i64:
12659 ; AVX512F: # %bb.0:
12660 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12661 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12662 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12663 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12664 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12665 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12666 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12667 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12668 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12669 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12670 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12671 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12672 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12673 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12674 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12675 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12676 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12677 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12678 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12679 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12680 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12681 ; AVX512F-NEXT: retq
12683 ; AVX512BW-LABEL: ugt_37_v8i64:
12684 ; AVX512BW: # %bb.0:
12685 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12686 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12687 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12688 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12689 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12690 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12691 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12692 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12693 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12694 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12695 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12696 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12697 ; AVX512BW-NEXT: retq
12699 ; AVX512VPOPCNTDQ-LABEL: ugt_37_v8i64:
12700 ; AVX512VPOPCNTDQ: # %bb.0:
12701 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12702 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12703 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12704 ; AVX512VPOPCNTDQ-NEXT: retq
12706 ; BITALG-LABEL: ugt_37_v8i64:
12708 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12709 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12710 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12711 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12712 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12713 ; BITALG-NEXT: retq
12714 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12715 %3 = icmp ugt <8 x i64> %2, <i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37, i64 37>
12716 %4 = sext <8 x i1> %3 to <8 x i64>
12720 define <8 x i64> @ult_38_v8i64(<8 x i64> %0) {
12721 ; AVX512F-LABEL: ult_38_v8i64:
12722 ; AVX512F: # %bb.0:
12723 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12724 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12725 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12726 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12727 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12728 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12729 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12730 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12731 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12732 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12733 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12734 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12735 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12736 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12737 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12738 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12739 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12740 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12741 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12742 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12743 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12744 ; AVX512F-NEXT: retq
12746 ; AVX512BW-LABEL: ult_38_v8i64:
12747 ; AVX512BW: # %bb.0:
12748 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12749 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12750 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12751 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12752 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12753 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12754 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12755 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12756 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12757 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12758 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12759 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12760 ; AVX512BW-NEXT: retq
12762 ; AVX512VPOPCNTDQ-LABEL: ult_38_v8i64:
12763 ; AVX512VPOPCNTDQ: # %bb.0:
12764 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12765 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12766 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12767 ; AVX512VPOPCNTDQ-NEXT: retq
12769 ; BITALG-LABEL: ult_38_v8i64:
12771 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12772 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12773 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12774 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12775 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12776 ; BITALG-NEXT: retq
12777 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12778 %3 = icmp ult <8 x i64> %2, <i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38>
12779 %4 = sext <8 x i1> %3 to <8 x i64>
12783 define <8 x i64> @ugt_38_v8i64(<8 x i64> %0) {
12784 ; AVX512F-LABEL: ugt_38_v8i64:
12785 ; AVX512F: # %bb.0:
12786 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12787 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12788 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12789 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12790 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12791 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12792 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12793 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12794 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12795 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12796 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12797 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12798 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12799 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12800 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12801 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12802 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12803 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12804 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12805 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12806 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12807 ; AVX512F-NEXT: retq
12809 ; AVX512BW-LABEL: ugt_38_v8i64:
12810 ; AVX512BW: # %bb.0:
12811 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12812 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12813 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12814 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12815 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12816 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12817 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12818 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12819 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12820 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12821 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12822 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12823 ; AVX512BW-NEXT: retq
12825 ; AVX512VPOPCNTDQ-LABEL: ugt_38_v8i64:
12826 ; AVX512VPOPCNTDQ: # %bb.0:
12827 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12828 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12829 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12830 ; AVX512VPOPCNTDQ-NEXT: retq
12832 ; BITALG-LABEL: ugt_38_v8i64:
12834 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12835 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12836 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12837 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12838 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12839 ; BITALG-NEXT: retq
12840 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12841 %3 = icmp ugt <8 x i64> %2, <i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38, i64 38>
12842 %4 = sext <8 x i1> %3 to <8 x i64>
12846 define <8 x i64> @ult_39_v8i64(<8 x i64> %0) {
12847 ; AVX512F-LABEL: ult_39_v8i64:
12848 ; AVX512F: # %bb.0:
12849 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12850 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12851 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12852 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12853 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12854 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12855 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12856 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12857 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12858 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12859 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12860 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12861 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12862 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12863 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12864 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12865 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12866 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12867 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12868 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12869 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12870 ; AVX512F-NEXT: retq
12872 ; AVX512BW-LABEL: ult_39_v8i64:
12873 ; AVX512BW: # %bb.0:
12874 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12875 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12876 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12877 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12878 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12879 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12880 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12881 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12882 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12883 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12884 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12885 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12886 ; AVX512BW-NEXT: retq
12888 ; AVX512VPOPCNTDQ-LABEL: ult_39_v8i64:
12889 ; AVX512VPOPCNTDQ: # %bb.0:
12890 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12891 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12892 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12893 ; AVX512VPOPCNTDQ-NEXT: retq
12895 ; BITALG-LABEL: ult_39_v8i64:
12897 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12898 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12899 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12900 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12901 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12902 ; BITALG-NEXT: retq
12903 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12904 %3 = icmp ult <8 x i64> %2, <i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39>
12905 %4 = sext <8 x i1> %3 to <8 x i64>
12909 define <8 x i64> @ugt_39_v8i64(<8 x i64> %0) {
12910 ; AVX512F-LABEL: ugt_39_v8i64:
12911 ; AVX512F: # %bb.0:
12912 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12913 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12914 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12915 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12916 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12917 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12918 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12919 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12920 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12921 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12922 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12923 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12924 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12925 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12926 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12927 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12928 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12929 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12930 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12931 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12932 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12933 ; AVX512F-NEXT: retq
12935 ; AVX512BW-LABEL: ugt_39_v8i64:
12936 ; AVX512BW: # %bb.0:
12937 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12938 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
12939 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12940 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
12941 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
12942 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
12943 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
12944 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
12945 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
12946 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12947 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12948 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12949 ; AVX512BW-NEXT: retq
12951 ; AVX512VPOPCNTDQ-LABEL: ugt_39_v8i64:
12952 ; AVX512VPOPCNTDQ: # %bb.0:
12953 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
12954 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12955 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12956 ; AVX512VPOPCNTDQ-NEXT: retq
12958 ; BITALG-LABEL: ugt_39_v8i64:
12960 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
12961 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
12962 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
12963 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12964 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12965 ; BITALG-NEXT: retq
12966 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
12967 %3 = icmp ugt <8 x i64> %2, <i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39, i64 39>
12968 %4 = sext <8 x i1> %3 to <8 x i64>
12972 define <8 x i64> @ult_40_v8i64(<8 x i64> %0) {
12973 ; AVX512F-LABEL: ult_40_v8i64:
12974 ; AVX512F: # %bb.0:
12975 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
12976 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
12977 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
12978 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
12979 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
12980 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
12981 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
12982 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
12983 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
12984 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
12985 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
12986 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
12987 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
12988 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
12989 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
12990 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
12991 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
12992 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
12993 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
12994 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
12995 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
12996 ; AVX512F-NEXT: retq
12998 ; AVX512BW-LABEL: ult_40_v8i64:
12999 ; AVX512BW: # %bb.0:
13000 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13001 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13002 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13003 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13004 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13005 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13006 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13007 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13008 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13009 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13010 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13011 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13012 ; AVX512BW-NEXT: retq
13014 ; AVX512VPOPCNTDQ-LABEL: ult_40_v8i64:
13015 ; AVX512VPOPCNTDQ: # %bb.0:
13016 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13017 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13018 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13019 ; AVX512VPOPCNTDQ-NEXT: retq
13021 ; BITALG-LABEL: ult_40_v8i64:
13023 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13024 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13025 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13026 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13027 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13028 ; BITALG-NEXT: retq
13029 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13030 %3 = icmp ult <8 x i64> %2, <i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40>
13031 %4 = sext <8 x i1> %3 to <8 x i64>
13035 define <8 x i64> @ugt_40_v8i64(<8 x i64> %0) {
13036 ; AVX512F-LABEL: ugt_40_v8i64:
13037 ; AVX512F: # %bb.0:
13038 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13039 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13040 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13041 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13042 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13043 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13044 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13045 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13046 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13047 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13048 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13049 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13050 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13051 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13052 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13053 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13054 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13055 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13056 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13057 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13058 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13059 ; AVX512F-NEXT: retq
13061 ; AVX512BW-LABEL: ugt_40_v8i64:
13062 ; AVX512BW: # %bb.0:
13063 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13064 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13065 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13066 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13067 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13068 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13069 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13070 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13071 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13072 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13073 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13074 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13075 ; AVX512BW-NEXT: retq
13077 ; AVX512VPOPCNTDQ-LABEL: ugt_40_v8i64:
13078 ; AVX512VPOPCNTDQ: # %bb.0:
13079 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13080 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13081 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13082 ; AVX512VPOPCNTDQ-NEXT: retq
13084 ; BITALG-LABEL: ugt_40_v8i64:
13086 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13087 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13088 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13089 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13090 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13091 ; BITALG-NEXT: retq
13092 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13093 %3 = icmp ugt <8 x i64> %2, <i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40, i64 40>
13094 %4 = sext <8 x i1> %3 to <8 x i64>
13098 define <8 x i64> @ult_41_v8i64(<8 x i64> %0) {
13099 ; AVX512F-LABEL: ult_41_v8i64:
13100 ; AVX512F: # %bb.0:
13101 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13102 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13103 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13104 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13105 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13106 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13107 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13108 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13109 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13110 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13111 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13112 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13113 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13114 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13115 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13116 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13117 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13118 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13119 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13120 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13121 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13122 ; AVX512F-NEXT: retq
13124 ; AVX512BW-LABEL: ult_41_v8i64:
13125 ; AVX512BW: # %bb.0:
13126 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13127 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13128 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13129 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13130 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13131 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13132 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13133 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13134 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13135 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13136 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13137 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13138 ; AVX512BW-NEXT: retq
13140 ; AVX512VPOPCNTDQ-LABEL: ult_41_v8i64:
13141 ; AVX512VPOPCNTDQ: # %bb.0:
13142 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13143 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13144 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13145 ; AVX512VPOPCNTDQ-NEXT: retq
13147 ; BITALG-LABEL: ult_41_v8i64:
13149 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13150 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13151 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13152 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13153 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13154 ; BITALG-NEXT: retq
13155 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13156 %3 = icmp ult <8 x i64> %2, <i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41>
13157 %4 = sext <8 x i1> %3 to <8 x i64>
13161 define <8 x i64> @ugt_41_v8i64(<8 x i64> %0) {
13162 ; AVX512F-LABEL: ugt_41_v8i64:
13163 ; AVX512F: # %bb.0:
13164 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13165 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13166 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13167 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13168 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13169 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13170 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13171 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13172 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13173 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13174 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13175 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13176 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13177 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13178 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13179 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13180 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13181 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13182 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13183 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13184 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13185 ; AVX512F-NEXT: retq
13187 ; AVX512BW-LABEL: ugt_41_v8i64:
13188 ; AVX512BW: # %bb.0:
13189 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13190 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13191 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13192 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13193 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13194 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13195 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13196 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13197 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13198 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13199 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13200 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13201 ; AVX512BW-NEXT: retq
13203 ; AVX512VPOPCNTDQ-LABEL: ugt_41_v8i64:
13204 ; AVX512VPOPCNTDQ: # %bb.0:
13205 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13206 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13207 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13208 ; AVX512VPOPCNTDQ-NEXT: retq
13210 ; BITALG-LABEL: ugt_41_v8i64:
13212 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13213 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13214 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13215 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13216 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13217 ; BITALG-NEXT: retq
13218 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13219 %3 = icmp ugt <8 x i64> %2, <i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41, i64 41>
13220 %4 = sext <8 x i1> %3 to <8 x i64>
13224 define <8 x i64> @ult_42_v8i64(<8 x i64> %0) {
13225 ; AVX512F-LABEL: ult_42_v8i64:
13226 ; AVX512F: # %bb.0:
13227 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13228 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13229 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13230 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13231 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13232 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13233 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13234 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13235 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13236 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13237 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13238 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13239 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13240 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13241 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13242 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13243 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13244 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13245 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13246 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13247 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13248 ; AVX512F-NEXT: retq
13250 ; AVX512BW-LABEL: ult_42_v8i64:
13251 ; AVX512BW: # %bb.0:
13252 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13253 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13254 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13255 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13256 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13257 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13258 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13259 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13260 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13261 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13262 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13263 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13264 ; AVX512BW-NEXT: retq
13266 ; AVX512VPOPCNTDQ-LABEL: ult_42_v8i64:
13267 ; AVX512VPOPCNTDQ: # %bb.0:
13268 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13269 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13270 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13271 ; AVX512VPOPCNTDQ-NEXT: retq
13273 ; BITALG-LABEL: ult_42_v8i64:
13275 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13276 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13277 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13278 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13279 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13280 ; BITALG-NEXT: retq
13281 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13282 %3 = icmp ult <8 x i64> %2, <i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42>
13283 %4 = sext <8 x i1> %3 to <8 x i64>
13287 define <8 x i64> @ugt_42_v8i64(<8 x i64> %0) {
13288 ; AVX512F-LABEL: ugt_42_v8i64:
13289 ; AVX512F: # %bb.0:
13290 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13291 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13292 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13293 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13294 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13295 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13296 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13297 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13298 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13299 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13300 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13301 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13302 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13303 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13304 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13305 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13306 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13307 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13308 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13309 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13310 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13311 ; AVX512F-NEXT: retq
13313 ; AVX512BW-LABEL: ugt_42_v8i64:
13314 ; AVX512BW: # %bb.0:
13315 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13316 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13317 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13318 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13319 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13320 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13321 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13322 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13323 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13324 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13325 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13326 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13327 ; AVX512BW-NEXT: retq
13329 ; AVX512VPOPCNTDQ-LABEL: ugt_42_v8i64:
13330 ; AVX512VPOPCNTDQ: # %bb.0:
13331 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13332 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13333 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13334 ; AVX512VPOPCNTDQ-NEXT: retq
13336 ; BITALG-LABEL: ugt_42_v8i64:
13338 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13339 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13340 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13341 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13342 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13343 ; BITALG-NEXT: retq
13344 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13345 %3 = icmp ugt <8 x i64> %2, <i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42, i64 42>
13346 %4 = sext <8 x i1> %3 to <8 x i64>
13350 define <8 x i64> @ult_43_v8i64(<8 x i64> %0) {
13351 ; AVX512F-LABEL: ult_43_v8i64:
13352 ; AVX512F: # %bb.0:
13353 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13354 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13355 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13356 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13357 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13358 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13359 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13360 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13361 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13362 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13363 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13364 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13365 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13366 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13367 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13368 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13369 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13370 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13371 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13372 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13373 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13374 ; AVX512F-NEXT: retq
13376 ; AVX512BW-LABEL: ult_43_v8i64:
13377 ; AVX512BW: # %bb.0:
13378 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13379 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13380 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13381 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13382 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13383 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13384 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13385 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13386 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13387 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13388 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13389 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13390 ; AVX512BW-NEXT: retq
13392 ; AVX512VPOPCNTDQ-LABEL: ult_43_v8i64:
13393 ; AVX512VPOPCNTDQ: # %bb.0:
13394 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13395 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13396 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13397 ; AVX512VPOPCNTDQ-NEXT: retq
13399 ; BITALG-LABEL: ult_43_v8i64:
13401 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13402 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13403 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13404 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13405 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13406 ; BITALG-NEXT: retq
13407 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13408 %3 = icmp ult <8 x i64> %2, <i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43>
13409 %4 = sext <8 x i1> %3 to <8 x i64>
13413 define <8 x i64> @ugt_43_v8i64(<8 x i64> %0) {
13414 ; AVX512F-LABEL: ugt_43_v8i64:
13415 ; AVX512F: # %bb.0:
13416 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13417 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13418 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13419 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13420 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13421 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13422 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13423 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13424 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13425 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13426 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13427 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13428 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13429 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13430 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13431 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13432 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13433 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13434 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13435 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13436 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13437 ; AVX512F-NEXT: retq
13439 ; AVX512BW-LABEL: ugt_43_v8i64:
13440 ; AVX512BW: # %bb.0:
13441 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13442 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13443 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13444 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13445 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13446 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13447 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13448 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13449 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13450 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13451 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13452 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13453 ; AVX512BW-NEXT: retq
13455 ; AVX512VPOPCNTDQ-LABEL: ugt_43_v8i64:
13456 ; AVX512VPOPCNTDQ: # %bb.0:
13457 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13458 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13459 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13460 ; AVX512VPOPCNTDQ-NEXT: retq
13462 ; BITALG-LABEL: ugt_43_v8i64:
13464 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13465 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13466 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13467 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13468 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13469 ; BITALG-NEXT: retq
13470 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13471 %3 = icmp ugt <8 x i64> %2, <i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43, i64 43>
13472 %4 = sext <8 x i1> %3 to <8 x i64>
13476 define <8 x i64> @ult_44_v8i64(<8 x i64> %0) {
13477 ; AVX512F-LABEL: ult_44_v8i64:
13478 ; AVX512F: # %bb.0:
13479 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13480 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13481 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13482 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13483 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13484 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13485 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13486 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13487 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13488 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13489 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13490 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13491 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13492 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13493 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13494 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13495 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13496 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13497 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13498 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13499 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13500 ; AVX512F-NEXT: retq
13502 ; AVX512BW-LABEL: ult_44_v8i64:
13503 ; AVX512BW: # %bb.0:
13504 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13505 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13506 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13507 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13508 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13509 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13510 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13511 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13512 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13513 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13514 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13515 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13516 ; AVX512BW-NEXT: retq
13518 ; AVX512VPOPCNTDQ-LABEL: ult_44_v8i64:
13519 ; AVX512VPOPCNTDQ: # %bb.0:
13520 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13521 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13522 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13523 ; AVX512VPOPCNTDQ-NEXT: retq
13525 ; BITALG-LABEL: ult_44_v8i64:
13527 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13528 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13529 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13530 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13531 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13532 ; BITALG-NEXT: retq
13533 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13534 %3 = icmp ult <8 x i64> %2, <i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44>
13535 %4 = sext <8 x i1> %3 to <8 x i64>
13539 define <8 x i64> @ugt_44_v8i64(<8 x i64> %0) {
13540 ; AVX512F-LABEL: ugt_44_v8i64:
13541 ; AVX512F: # %bb.0:
13542 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13543 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13544 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13545 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13546 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13547 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13548 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13549 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13550 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13551 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13552 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13553 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13554 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13555 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13556 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13557 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13558 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13559 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13560 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13561 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13562 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13563 ; AVX512F-NEXT: retq
13565 ; AVX512BW-LABEL: ugt_44_v8i64:
13566 ; AVX512BW: # %bb.0:
13567 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13568 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13569 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13570 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13571 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13572 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13573 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13574 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13575 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13576 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13577 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13578 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13579 ; AVX512BW-NEXT: retq
13581 ; AVX512VPOPCNTDQ-LABEL: ugt_44_v8i64:
13582 ; AVX512VPOPCNTDQ: # %bb.0:
13583 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13584 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13585 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13586 ; AVX512VPOPCNTDQ-NEXT: retq
13588 ; BITALG-LABEL: ugt_44_v8i64:
13590 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13591 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13592 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13593 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13594 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13595 ; BITALG-NEXT: retq
13596 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13597 %3 = icmp ugt <8 x i64> %2, <i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44, i64 44>
13598 %4 = sext <8 x i1> %3 to <8 x i64>
13602 define <8 x i64> @ult_45_v8i64(<8 x i64> %0) {
13603 ; AVX512F-LABEL: ult_45_v8i64:
13604 ; AVX512F: # %bb.0:
13605 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13606 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13607 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13608 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13609 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13610 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13611 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13612 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13613 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13614 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13615 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13616 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13617 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13618 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13619 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13620 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13621 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13622 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13623 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13624 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13625 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13626 ; AVX512F-NEXT: retq
13628 ; AVX512BW-LABEL: ult_45_v8i64:
13629 ; AVX512BW: # %bb.0:
13630 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13631 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13632 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13633 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13634 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13635 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13636 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13637 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13638 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13639 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13640 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13641 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13642 ; AVX512BW-NEXT: retq
13644 ; AVX512VPOPCNTDQ-LABEL: ult_45_v8i64:
13645 ; AVX512VPOPCNTDQ: # %bb.0:
13646 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13647 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13648 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13649 ; AVX512VPOPCNTDQ-NEXT: retq
13651 ; BITALG-LABEL: ult_45_v8i64:
13653 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13654 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13655 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13656 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13657 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13658 ; BITALG-NEXT: retq
13659 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13660 %3 = icmp ult <8 x i64> %2, <i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45>
13661 %4 = sext <8 x i1> %3 to <8 x i64>
13665 define <8 x i64> @ugt_45_v8i64(<8 x i64> %0) {
13666 ; AVX512F-LABEL: ugt_45_v8i64:
13667 ; AVX512F: # %bb.0:
13668 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13669 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13670 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13671 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13672 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13673 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13674 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13675 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13676 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13677 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13678 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13679 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13680 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13681 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13682 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13683 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13684 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13685 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13686 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13687 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13688 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13689 ; AVX512F-NEXT: retq
13691 ; AVX512BW-LABEL: ugt_45_v8i64:
13692 ; AVX512BW: # %bb.0:
13693 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13694 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13695 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13696 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13697 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13698 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13699 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13700 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13701 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13702 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13703 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13704 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13705 ; AVX512BW-NEXT: retq
13707 ; AVX512VPOPCNTDQ-LABEL: ugt_45_v8i64:
13708 ; AVX512VPOPCNTDQ: # %bb.0:
13709 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13710 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13711 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13712 ; AVX512VPOPCNTDQ-NEXT: retq
13714 ; BITALG-LABEL: ugt_45_v8i64:
13716 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13717 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13718 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13719 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13720 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13721 ; BITALG-NEXT: retq
13722 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13723 %3 = icmp ugt <8 x i64> %2, <i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45, i64 45>
13724 %4 = sext <8 x i1> %3 to <8 x i64>
13728 define <8 x i64> @ult_46_v8i64(<8 x i64> %0) {
13729 ; AVX512F-LABEL: ult_46_v8i64:
13730 ; AVX512F: # %bb.0:
13731 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13732 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13733 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13734 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13735 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13736 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13737 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13738 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13739 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13740 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13741 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13742 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13743 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13744 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13745 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13746 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13747 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13748 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13749 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13750 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13751 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13752 ; AVX512F-NEXT: retq
13754 ; AVX512BW-LABEL: ult_46_v8i64:
13755 ; AVX512BW: # %bb.0:
13756 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13757 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13758 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13759 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13760 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13761 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13762 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13763 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13764 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13765 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13766 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13767 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13768 ; AVX512BW-NEXT: retq
13770 ; AVX512VPOPCNTDQ-LABEL: ult_46_v8i64:
13771 ; AVX512VPOPCNTDQ: # %bb.0:
13772 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13773 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13774 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13775 ; AVX512VPOPCNTDQ-NEXT: retq
13777 ; BITALG-LABEL: ult_46_v8i64:
13779 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13780 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13781 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13782 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13783 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13784 ; BITALG-NEXT: retq
13785 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13786 %3 = icmp ult <8 x i64> %2, <i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46>
13787 %4 = sext <8 x i1> %3 to <8 x i64>
13791 define <8 x i64> @ugt_46_v8i64(<8 x i64> %0) {
13792 ; AVX512F-LABEL: ugt_46_v8i64:
13793 ; AVX512F: # %bb.0:
13794 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13795 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13796 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13797 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13798 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13799 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13800 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13801 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13802 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13803 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13804 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13805 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13806 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13807 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13808 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13809 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13810 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13811 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13812 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13813 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13814 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13815 ; AVX512F-NEXT: retq
13817 ; AVX512BW-LABEL: ugt_46_v8i64:
13818 ; AVX512BW: # %bb.0:
13819 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13820 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13821 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13822 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13823 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13824 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13825 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13826 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13827 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13828 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13829 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13830 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13831 ; AVX512BW-NEXT: retq
13833 ; AVX512VPOPCNTDQ-LABEL: ugt_46_v8i64:
13834 ; AVX512VPOPCNTDQ: # %bb.0:
13835 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13836 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13837 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13838 ; AVX512VPOPCNTDQ-NEXT: retq
13840 ; BITALG-LABEL: ugt_46_v8i64:
13842 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13843 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13844 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13845 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13846 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13847 ; BITALG-NEXT: retq
13848 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13849 %3 = icmp ugt <8 x i64> %2, <i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46, i64 46>
13850 %4 = sext <8 x i1> %3 to <8 x i64>
13854 define <8 x i64> @ult_47_v8i64(<8 x i64> %0) {
13855 ; AVX512F-LABEL: ult_47_v8i64:
13856 ; AVX512F: # %bb.0:
13857 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13858 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13859 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13860 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13861 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13862 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13863 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13864 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13865 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13866 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13867 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13868 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13869 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13870 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13871 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13872 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13873 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13874 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13875 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13876 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13877 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13878 ; AVX512F-NEXT: retq
13880 ; AVX512BW-LABEL: ult_47_v8i64:
13881 ; AVX512BW: # %bb.0:
13882 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13883 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13884 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13885 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13886 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13887 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13888 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13889 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13890 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13891 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13892 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13893 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13894 ; AVX512BW-NEXT: retq
13896 ; AVX512VPOPCNTDQ-LABEL: ult_47_v8i64:
13897 ; AVX512VPOPCNTDQ: # %bb.0:
13898 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13899 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13900 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13901 ; AVX512VPOPCNTDQ-NEXT: retq
13903 ; BITALG-LABEL: ult_47_v8i64:
13905 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13906 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13907 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13908 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13909 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13910 ; BITALG-NEXT: retq
13911 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13912 %3 = icmp ult <8 x i64> %2, <i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47>
13913 %4 = sext <8 x i1> %3 to <8 x i64>
13917 define <8 x i64> @ugt_47_v8i64(<8 x i64> %0) {
13918 ; AVX512F-LABEL: ugt_47_v8i64:
13919 ; AVX512F: # %bb.0:
13920 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13921 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13922 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13923 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13924 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13925 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13926 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13927 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13928 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13929 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13930 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13931 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13932 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13933 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13934 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13935 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13936 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
13937 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
13938 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
13939 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13940 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13941 ; AVX512F-NEXT: retq
13943 ; AVX512BW-LABEL: ugt_47_v8i64:
13944 ; AVX512BW: # %bb.0:
13945 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13946 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
13947 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13948 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
13949 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
13950 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
13951 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
13952 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
13953 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
13954 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13955 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13956 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13957 ; AVX512BW-NEXT: retq
13959 ; AVX512VPOPCNTDQ-LABEL: ugt_47_v8i64:
13960 ; AVX512VPOPCNTDQ: # %bb.0:
13961 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
13962 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13963 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13964 ; AVX512VPOPCNTDQ-NEXT: retq
13966 ; BITALG-LABEL: ugt_47_v8i64:
13968 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
13969 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
13970 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
13971 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
13972 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
13973 ; BITALG-NEXT: retq
13974 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
13975 %3 = icmp ugt <8 x i64> %2, <i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47, i64 47>
13976 %4 = sext <8 x i1> %3 to <8 x i64>
13980 define <8 x i64> @ult_48_v8i64(<8 x i64> %0) {
13981 ; AVX512F-LABEL: ult_48_v8i64:
13982 ; AVX512F: # %bb.0:
13983 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
13984 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
13985 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
13986 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
13987 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
13988 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
13989 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
13990 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
13991 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
13992 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
13993 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
13994 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
13995 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
13996 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
13997 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
13998 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
13999 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14000 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14001 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14002 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14003 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14004 ; AVX512F-NEXT: retq
14006 ; AVX512BW-LABEL: ult_48_v8i64:
14007 ; AVX512BW: # %bb.0:
14008 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14009 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14010 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14011 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14012 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14013 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14014 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14015 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14016 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14017 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14018 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14019 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14020 ; AVX512BW-NEXT: retq
14022 ; AVX512VPOPCNTDQ-LABEL: ult_48_v8i64:
14023 ; AVX512VPOPCNTDQ: # %bb.0:
14024 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14025 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14026 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14027 ; AVX512VPOPCNTDQ-NEXT: retq
14029 ; BITALG-LABEL: ult_48_v8i64:
14031 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14032 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14033 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14034 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14035 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14036 ; BITALG-NEXT: retq
14037 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14038 %3 = icmp ult <8 x i64> %2, <i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48>
14039 %4 = sext <8 x i1> %3 to <8 x i64>
14043 define <8 x i64> @ugt_48_v8i64(<8 x i64> %0) {
14044 ; AVX512F-LABEL: ugt_48_v8i64:
14045 ; AVX512F: # %bb.0:
14046 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14047 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14048 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14049 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14050 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14051 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14052 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14053 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14054 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14055 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14056 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14057 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14058 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14059 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14060 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14061 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14062 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14063 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14064 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14065 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14066 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14067 ; AVX512F-NEXT: retq
14069 ; AVX512BW-LABEL: ugt_48_v8i64:
14070 ; AVX512BW: # %bb.0:
14071 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14072 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14073 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14074 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14075 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14076 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14077 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14078 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14079 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14080 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14081 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14082 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14083 ; AVX512BW-NEXT: retq
14085 ; AVX512VPOPCNTDQ-LABEL: ugt_48_v8i64:
14086 ; AVX512VPOPCNTDQ: # %bb.0:
14087 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14088 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14089 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14090 ; AVX512VPOPCNTDQ-NEXT: retq
14092 ; BITALG-LABEL: ugt_48_v8i64:
14094 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14095 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14096 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14097 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14098 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14099 ; BITALG-NEXT: retq
14100 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14101 %3 = icmp ugt <8 x i64> %2, <i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48, i64 48>
14102 %4 = sext <8 x i1> %3 to <8 x i64>
14106 define <8 x i64> @ult_49_v8i64(<8 x i64> %0) {
14107 ; AVX512F-LABEL: ult_49_v8i64:
14108 ; AVX512F: # %bb.0:
14109 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14110 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14111 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14112 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14113 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14114 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14115 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14116 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14117 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14118 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14119 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14120 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14121 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14122 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14123 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14124 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14125 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14126 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14127 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14128 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14129 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14130 ; AVX512F-NEXT: retq
14132 ; AVX512BW-LABEL: ult_49_v8i64:
14133 ; AVX512BW: # %bb.0:
14134 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14135 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14136 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14137 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14138 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14139 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14140 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14141 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14142 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14143 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14144 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14145 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14146 ; AVX512BW-NEXT: retq
14148 ; AVX512VPOPCNTDQ-LABEL: ult_49_v8i64:
14149 ; AVX512VPOPCNTDQ: # %bb.0:
14150 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14151 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14152 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14153 ; AVX512VPOPCNTDQ-NEXT: retq
14155 ; BITALG-LABEL: ult_49_v8i64:
14157 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14158 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14159 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14160 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14161 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14162 ; BITALG-NEXT: retq
14163 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14164 %3 = icmp ult <8 x i64> %2, <i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49>
14165 %4 = sext <8 x i1> %3 to <8 x i64>
14169 define <8 x i64> @ugt_49_v8i64(<8 x i64> %0) {
14170 ; AVX512F-LABEL: ugt_49_v8i64:
14171 ; AVX512F: # %bb.0:
14172 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14173 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14174 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14175 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14176 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14177 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14178 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14179 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14180 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14181 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14182 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14183 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14184 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14185 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14186 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14187 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14188 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14189 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14190 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14191 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14192 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14193 ; AVX512F-NEXT: retq
14195 ; AVX512BW-LABEL: ugt_49_v8i64:
14196 ; AVX512BW: # %bb.0:
14197 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14198 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14199 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14200 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14201 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14202 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14203 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14204 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14205 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14206 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14207 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14208 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14209 ; AVX512BW-NEXT: retq
14211 ; AVX512VPOPCNTDQ-LABEL: ugt_49_v8i64:
14212 ; AVX512VPOPCNTDQ: # %bb.0:
14213 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14214 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14215 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14216 ; AVX512VPOPCNTDQ-NEXT: retq
14218 ; BITALG-LABEL: ugt_49_v8i64:
14220 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14221 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14222 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14223 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14224 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14225 ; BITALG-NEXT: retq
14226 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14227 %3 = icmp ugt <8 x i64> %2, <i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49, i64 49>
14228 %4 = sext <8 x i1> %3 to <8 x i64>
14232 define <8 x i64> @ult_50_v8i64(<8 x i64> %0) {
14233 ; AVX512F-LABEL: ult_50_v8i64:
14234 ; AVX512F: # %bb.0:
14235 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14236 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14237 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14238 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14239 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14240 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14241 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14242 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14243 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14244 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14245 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14246 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14247 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14248 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14249 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14250 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14251 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14252 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14253 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14254 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14255 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14256 ; AVX512F-NEXT: retq
14258 ; AVX512BW-LABEL: ult_50_v8i64:
14259 ; AVX512BW: # %bb.0:
14260 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14261 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14262 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14263 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14264 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14265 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14266 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14267 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14268 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14269 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14270 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14271 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14272 ; AVX512BW-NEXT: retq
14274 ; AVX512VPOPCNTDQ-LABEL: ult_50_v8i64:
14275 ; AVX512VPOPCNTDQ: # %bb.0:
14276 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14277 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14278 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14279 ; AVX512VPOPCNTDQ-NEXT: retq
14281 ; BITALG-LABEL: ult_50_v8i64:
14283 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14284 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14285 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14286 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14287 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14288 ; BITALG-NEXT: retq
14289 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14290 %3 = icmp ult <8 x i64> %2, <i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50>
14291 %4 = sext <8 x i1> %3 to <8 x i64>
14295 define <8 x i64> @ugt_50_v8i64(<8 x i64> %0) {
14296 ; AVX512F-LABEL: ugt_50_v8i64:
14297 ; AVX512F: # %bb.0:
14298 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14299 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14300 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14301 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14302 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14303 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14304 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14305 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14306 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14307 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14308 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14309 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14310 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14311 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14312 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14313 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14314 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14315 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14316 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14317 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14318 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14319 ; AVX512F-NEXT: retq
14321 ; AVX512BW-LABEL: ugt_50_v8i64:
14322 ; AVX512BW: # %bb.0:
14323 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14324 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14325 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14326 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14327 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14328 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14329 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14330 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14331 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14332 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14333 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14334 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14335 ; AVX512BW-NEXT: retq
14337 ; AVX512VPOPCNTDQ-LABEL: ugt_50_v8i64:
14338 ; AVX512VPOPCNTDQ: # %bb.0:
14339 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14340 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14341 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14342 ; AVX512VPOPCNTDQ-NEXT: retq
14344 ; BITALG-LABEL: ugt_50_v8i64:
14346 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14347 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14348 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14349 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14350 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14351 ; BITALG-NEXT: retq
14352 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14353 %3 = icmp ugt <8 x i64> %2, <i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50, i64 50>
14354 %4 = sext <8 x i1> %3 to <8 x i64>
14358 define <8 x i64> @ult_51_v8i64(<8 x i64> %0) {
14359 ; AVX512F-LABEL: ult_51_v8i64:
14360 ; AVX512F: # %bb.0:
14361 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14362 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14363 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14364 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14365 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14366 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14367 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14368 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14369 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14370 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14371 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14372 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14373 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14374 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14375 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14376 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14377 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14378 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14379 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14380 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14381 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14382 ; AVX512F-NEXT: retq
14384 ; AVX512BW-LABEL: ult_51_v8i64:
14385 ; AVX512BW: # %bb.0:
14386 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14387 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14388 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14389 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14390 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14391 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14392 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14393 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14394 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14395 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14396 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14397 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14398 ; AVX512BW-NEXT: retq
14400 ; AVX512VPOPCNTDQ-LABEL: ult_51_v8i64:
14401 ; AVX512VPOPCNTDQ: # %bb.0:
14402 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14403 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14404 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14405 ; AVX512VPOPCNTDQ-NEXT: retq
14407 ; BITALG-LABEL: ult_51_v8i64:
14409 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14410 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14411 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14412 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14413 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14414 ; BITALG-NEXT: retq
14415 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14416 %3 = icmp ult <8 x i64> %2, <i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51>
14417 %4 = sext <8 x i1> %3 to <8 x i64>
14421 define <8 x i64> @ugt_51_v8i64(<8 x i64> %0) {
14422 ; AVX512F-LABEL: ugt_51_v8i64:
14423 ; AVX512F: # %bb.0:
14424 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14425 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14426 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14427 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14428 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14429 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14430 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14431 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14432 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14433 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14434 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14435 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14436 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14437 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14438 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14439 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14440 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14441 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14442 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14443 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14444 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14445 ; AVX512F-NEXT: retq
14447 ; AVX512BW-LABEL: ugt_51_v8i64:
14448 ; AVX512BW: # %bb.0:
14449 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14450 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14451 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14452 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14453 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14454 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14455 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14456 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14457 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14458 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14459 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14460 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14461 ; AVX512BW-NEXT: retq
14463 ; AVX512VPOPCNTDQ-LABEL: ugt_51_v8i64:
14464 ; AVX512VPOPCNTDQ: # %bb.0:
14465 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14466 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14467 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14468 ; AVX512VPOPCNTDQ-NEXT: retq
14470 ; BITALG-LABEL: ugt_51_v8i64:
14472 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14473 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14474 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14475 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14476 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14477 ; BITALG-NEXT: retq
14478 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14479 %3 = icmp ugt <8 x i64> %2, <i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51, i64 51>
14480 %4 = sext <8 x i1> %3 to <8 x i64>
14484 define <8 x i64> @ult_52_v8i64(<8 x i64> %0) {
14485 ; AVX512F-LABEL: ult_52_v8i64:
14486 ; AVX512F: # %bb.0:
14487 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14488 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14489 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14490 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14491 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14492 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14493 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14494 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14495 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14496 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14497 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14498 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14499 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14500 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14501 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14502 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14503 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14504 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14505 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14506 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14507 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14508 ; AVX512F-NEXT: retq
14510 ; AVX512BW-LABEL: ult_52_v8i64:
14511 ; AVX512BW: # %bb.0:
14512 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14513 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14514 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14515 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14516 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14517 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14518 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14519 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14520 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14521 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14522 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14523 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14524 ; AVX512BW-NEXT: retq
14526 ; AVX512VPOPCNTDQ-LABEL: ult_52_v8i64:
14527 ; AVX512VPOPCNTDQ: # %bb.0:
14528 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14529 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14530 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14531 ; AVX512VPOPCNTDQ-NEXT: retq
14533 ; BITALG-LABEL: ult_52_v8i64:
14535 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14536 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14537 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14538 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14539 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14540 ; BITALG-NEXT: retq
14541 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14542 %3 = icmp ult <8 x i64> %2, <i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52>
14543 %4 = sext <8 x i1> %3 to <8 x i64>
14547 define <8 x i64> @ugt_52_v8i64(<8 x i64> %0) {
14548 ; AVX512F-LABEL: ugt_52_v8i64:
14549 ; AVX512F: # %bb.0:
14550 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14551 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14552 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14553 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14554 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14555 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14556 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14557 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14558 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14559 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14560 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14561 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14562 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14563 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14564 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14565 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14566 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14567 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14568 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14569 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14570 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14571 ; AVX512F-NEXT: retq
14573 ; AVX512BW-LABEL: ugt_52_v8i64:
14574 ; AVX512BW: # %bb.0:
14575 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14576 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14577 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14578 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14579 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14580 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14581 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14582 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14583 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14584 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14585 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14586 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14587 ; AVX512BW-NEXT: retq
14589 ; AVX512VPOPCNTDQ-LABEL: ugt_52_v8i64:
14590 ; AVX512VPOPCNTDQ: # %bb.0:
14591 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14592 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14593 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14594 ; AVX512VPOPCNTDQ-NEXT: retq
14596 ; BITALG-LABEL: ugt_52_v8i64:
14598 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14599 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14600 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14601 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14602 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14603 ; BITALG-NEXT: retq
14604 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14605 %3 = icmp ugt <8 x i64> %2, <i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52, i64 52>
14606 %4 = sext <8 x i1> %3 to <8 x i64>
14610 define <8 x i64> @ult_53_v8i64(<8 x i64> %0) {
14611 ; AVX512F-LABEL: ult_53_v8i64:
14612 ; AVX512F: # %bb.0:
14613 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14614 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14615 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14616 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14617 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14618 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14619 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14620 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14621 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14622 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14623 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14624 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14625 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14626 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14627 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14628 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14629 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14630 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14631 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14632 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14633 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14634 ; AVX512F-NEXT: retq
14636 ; AVX512BW-LABEL: ult_53_v8i64:
14637 ; AVX512BW: # %bb.0:
14638 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14639 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14640 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14641 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14642 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14643 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14644 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14645 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14646 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14647 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14648 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14649 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14650 ; AVX512BW-NEXT: retq
14652 ; AVX512VPOPCNTDQ-LABEL: ult_53_v8i64:
14653 ; AVX512VPOPCNTDQ: # %bb.0:
14654 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14655 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14656 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14657 ; AVX512VPOPCNTDQ-NEXT: retq
14659 ; BITALG-LABEL: ult_53_v8i64:
14661 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14662 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14663 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14664 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14665 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14666 ; BITALG-NEXT: retq
14667 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14668 %3 = icmp ult <8 x i64> %2, <i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53>
14669 %4 = sext <8 x i1> %3 to <8 x i64>
14673 define <8 x i64> @ugt_53_v8i64(<8 x i64> %0) {
14674 ; AVX512F-LABEL: ugt_53_v8i64:
14675 ; AVX512F: # %bb.0:
14676 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14677 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14678 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14679 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14680 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14681 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14682 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14683 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14684 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14685 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14686 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14687 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14688 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14689 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14690 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14691 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14692 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14693 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14694 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14695 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14696 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14697 ; AVX512F-NEXT: retq
14699 ; AVX512BW-LABEL: ugt_53_v8i64:
14700 ; AVX512BW: # %bb.0:
14701 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14702 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14703 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14704 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14705 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14706 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14707 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14708 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14709 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14710 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14711 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14712 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14713 ; AVX512BW-NEXT: retq
14715 ; AVX512VPOPCNTDQ-LABEL: ugt_53_v8i64:
14716 ; AVX512VPOPCNTDQ: # %bb.0:
14717 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14718 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14719 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14720 ; AVX512VPOPCNTDQ-NEXT: retq
14722 ; BITALG-LABEL: ugt_53_v8i64:
14724 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14725 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14726 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14727 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14728 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14729 ; BITALG-NEXT: retq
14730 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14731 %3 = icmp ugt <8 x i64> %2, <i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53, i64 53>
14732 %4 = sext <8 x i1> %3 to <8 x i64>
14736 define <8 x i64> @ult_54_v8i64(<8 x i64> %0) {
14737 ; AVX512F-LABEL: ult_54_v8i64:
14738 ; AVX512F: # %bb.0:
14739 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14740 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14741 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14742 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14743 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14744 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14745 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14746 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14747 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14748 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14749 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14750 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14751 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14752 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14753 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14754 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14755 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14756 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14757 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14758 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14759 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14760 ; AVX512F-NEXT: retq
14762 ; AVX512BW-LABEL: ult_54_v8i64:
14763 ; AVX512BW: # %bb.0:
14764 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14765 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14766 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14767 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14768 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14769 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14770 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14771 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14772 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14773 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14774 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14775 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14776 ; AVX512BW-NEXT: retq
14778 ; AVX512VPOPCNTDQ-LABEL: ult_54_v8i64:
14779 ; AVX512VPOPCNTDQ: # %bb.0:
14780 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14781 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14782 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14783 ; AVX512VPOPCNTDQ-NEXT: retq
14785 ; BITALG-LABEL: ult_54_v8i64:
14787 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14788 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14789 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14790 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14791 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14792 ; BITALG-NEXT: retq
14793 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14794 %3 = icmp ult <8 x i64> %2, <i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54>
14795 %4 = sext <8 x i1> %3 to <8 x i64>
14799 define <8 x i64> @ugt_54_v8i64(<8 x i64> %0) {
14800 ; AVX512F-LABEL: ugt_54_v8i64:
14801 ; AVX512F: # %bb.0:
14802 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14803 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14804 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14805 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14806 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14807 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14808 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14809 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14810 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14811 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14812 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14813 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14814 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14815 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14816 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14817 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14818 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14819 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14820 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14821 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14822 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14823 ; AVX512F-NEXT: retq
14825 ; AVX512BW-LABEL: ugt_54_v8i64:
14826 ; AVX512BW: # %bb.0:
14827 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14828 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14829 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14830 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14831 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14832 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14833 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14834 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14835 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14836 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14837 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14838 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14839 ; AVX512BW-NEXT: retq
14841 ; AVX512VPOPCNTDQ-LABEL: ugt_54_v8i64:
14842 ; AVX512VPOPCNTDQ: # %bb.0:
14843 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14844 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14845 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14846 ; AVX512VPOPCNTDQ-NEXT: retq
14848 ; BITALG-LABEL: ugt_54_v8i64:
14850 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14851 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14852 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14853 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14854 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14855 ; BITALG-NEXT: retq
14856 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14857 %3 = icmp ugt <8 x i64> %2, <i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54, i64 54>
14858 %4 = sext <8 x i1> %3 to <8 x i64>
14862 define <8 x i64> @ult_55_v8i64(<8 x i64> %0) {
14863 ; AVX512F-LABEL: ult_55_v8i64:
14864 ; AVX512F: # %bb.0:
14865 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14866 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14867 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14868 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14869 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14870 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14871 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14872 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14873 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14874 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14875 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14876 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14877 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14878 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14879 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14880 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14881 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14882 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14883 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14884 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14885 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14886 ; AVX512F-NEXT: retq
14888 ; AVX512BW-LABEL: ult_55_v8i64:
14889 ; AVX512BW: # %bb.0:
14890 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14891 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14892 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14893 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14894 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14895 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14896 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14897 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14898 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14899 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14900 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14901 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14902 ; AVX512BW-NEXT: retq
14904 ; AVX512VPOPCNTDQ-LABEL: ult_55_v8i64:
14905 ; AVX512VPOPCNTDQ: # %bb.0:
14906 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14907 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14908 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14909 ; AVX512VPOPCNTDQ-NEXT: retq
14911 ; BITALG-LABEL: ult_55_v8i64:
14913 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14914 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14915 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14916 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14917 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14918 ; BITALG-NEXT: retq
14919 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14920 %3 = icmp ult <8 x i64> %2, <i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55>
14921 %4 = sext <8 x i1> %3 to <8 x i64>
14925 define <8 x i64> @ugt_55_v8i64(<8 x i64> %0) {
14926 ; AVX512F-LABEL: ugt_55_v8i64:
14927 ; AVX512F: # %bb.0:
14928 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14929 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14930 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14931 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14932 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14933 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14934 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14935 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14936 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
14937 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
14938 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
14939 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
14940 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
14941 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
14942 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
14943 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
14944 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
14945 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
14946 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
14947 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14948 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14949 ; AVX512F-NEXT: retq
14951 ; AVX512BW-LABEL: ugt_55_v8i64:
14952 ; AVX512BW: # %bb.0:
14953 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14954 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
14955 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14956 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
14957 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
14958 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
14959 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
14960 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
14961 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
14962 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14963 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14964 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14965 ; AVX512BW-NEXT: retq
14967 ; AVX512VPOPCNTDQ-LABEL: ugt_55_v8i64:
14968 ; AVX512VPOPCNTDQ: # %bb.0:
14969 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
14970 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14971 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14972 ; AVX512VPOPCNTDQ-NEXT: retq
14974 ; BITALG-LABEL: ugt_55_v8i64:
14976 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
14977 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
14978 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
14979 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
14980 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
14981 ; BITALG-NEXT: retq
14982 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
14983 %3 = icmp ugt <8 x i64> %2, <i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55, i64 55>
14984 %4 = sext <8 x i1> %3 to <8 x i64>
14988 define <8 x i64> @ult_56_v8i64(<8 x i64> %0) {
14989 ; AVX512F-LABEL: ult_56_v8i64:
14990 ; AVX512F: # %bb.0:
14991 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
14992 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
14993 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
14994 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
14995 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
14996 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
14997 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
14998 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
14999 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15000 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15001 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15002 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15003 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15004 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15005 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15006 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15007 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15008 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15009 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15010 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15011 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15012 ; AVX512F-NEXT: retq
15014 ; AVX512BW-LABEL: ult_56_v8i64:
15015 ; AVX512BW: # %bb.0:
15016 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15017 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15018 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15019 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15020 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15021 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15022 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15023 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15024 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15025 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15026 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15027 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15028 ; AVX512BW-NEXT: retq
15030 ; AVX512VPOPCNTDQ-LABEL: ult_56_v8i64:
15031 ; AVX512VPOPCNTDQ: # %bb.0:
15032 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15033 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15034 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15035 ; AVX512VPOPCNTDQ-NEXT: retq
15037 ; BITALG-LABEL: ult_56_v8i64:
15039 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15040 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15041 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15042 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15043 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15044 ; BITALG-NEXT: retq
15045 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15046 %3 = icmp ult <8 x i64> %2, <i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56>
15047 %4 = sext <8 x i1> %3 to <8 x i64>
15051 define <8 x i64> @ugt_56_v8i64(<8 x i64> %0) {
15052 ; AVX512F-LABEL: ugt_56_v8i64:
15053 ; AVX512F: # %bb.0:
15054 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15055 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15056 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15057 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15058 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15059 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15060 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15061 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15062 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15063 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15064 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15065 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15066 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15067 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15068 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15069 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15070 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15071 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15072 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15073 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15074 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15075 ; AVX512F-NEXT: retq
15077 ; AVX512BW-LABEL: ugt_56_v8i64:
15078 ; AVX512BW: # %bb.0:
15079 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15080 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15081 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15082 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15083 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15084 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15085 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15086 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15087 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15088 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15089 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15090 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15091 ; AVX512BW-NEXT: retq
15093 ; AVX512VPOPCNTDQ-LABEL: ugt_56_v8i64:
15094 ; AVX512VPOPCNTDQ: # %bb.0:
15095 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15096 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15097 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15098 ; AVX512VPOPCNTDQ-NEXT: retq
15100 ; BITALG-LABEL: ugt_56_v8i64:
15102 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15103 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15104 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15105 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15106 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15107 ; BITALG-NEXT: retq
15108 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15109 %3 = icmp ugt <8 x i64> %2, <i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56, i64 56>
15110 %4 = sext <8 x i1> %3 to <8 x i64>
15114 define <8 x i64> @ult_57_v8i64(<8 x i64> %0) {
15115 ; AVX512F-LABEL: ult_57_v8i64:
15116 ; AVX512F: # %bb.0:
15117 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15118 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15119 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15120 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15121 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15122 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15123 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15124 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15125 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15126 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15127 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15128 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15129 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15130 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15131 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15132 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15133 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15134 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15135 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15136 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15137 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15138 ; AVX512F-NEXT: retq
15140 ; AVX512BW-LABEL: ult_57_v8i64:
15141 ; AVX512BW: # %bb.0:
15142 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15143 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15144 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15145 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15146 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15147 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15148 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15149 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15150 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15151 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15152 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15153 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15154 ; AVX512BW-NEXT: retq
15156 ; AVX512VPOPCNTDQ-LABEL: ult_57_v8i64:
15157 ; AVX512VPOPCNTDQ: # %bb.0:
15158 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15159 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15160 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15161 ; AVX512VPOPCNTDQ-NEXT: retq
15163 ; BITALG-LABEL: ult_57_v8i64:
15165 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15166 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15167 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15168 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15169 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15170 ; BITALG-NEXT: retq
15171 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15172 %3 = icmp ult <8 x i64> %2, <i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57>
15173 %4 = sext <8 x i1> %3 to <8 x i64>
15177 define <8 x i64> @ugt_57_v8i64(<8 x i64> %0) {
15178 ; AVX512F-LABEL: ugt_57_v8i64:
15179 ; AVX512F: # %bb.0:
15180 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15181 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15182 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15183 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15184 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15185 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15186 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15187 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15188 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15189 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15190 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15191 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15192 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15193 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15194 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15195 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15196 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15197 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15198 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15199 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15200 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15201 ; AVX512F-NEXT: retq
15203 ; AVX512BW-LABEL: ugt_57_v8i64:
15204 ; AVX512BW: # %bb.0:
15205 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15206 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15207 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15208 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15209 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15210 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15211 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15212 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15213 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15214 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15215 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15216 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15217 ; AVX512BW-NEXT: retq
15219 ; AVX512VPOPCNTDQ-LABEL: ugt_57_v8i64:
15220 ; AVX512VPOPCNTDQ: # %bb.0:
15221 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15222 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15223 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15224 ; AVX512VPOPCNTDQ-NEXT: retq
15226 ; BITALG-LABEL: ugt_57_v8i64:
15228 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15229 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15230 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15231 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15232 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15233 ; BITALG-NEXT: retq
15234 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15235 %3 = icmp ugt <8 x i64> %2, <i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57, i64 57>
15236 %4 = sext <8 x i1> %3 to <8 x i64>
15240 define <8 x i64> @ult_58_v8i64(<8 x i64> %0) {
15241 ; AVX512F-LABEL: ult_58_v8i64:
15242 ; AVX512F: # %bb.0:
15243 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15244 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15245 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15246 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15247 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15248 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15249 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15250 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15251 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15252 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15253 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15254 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15255 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15256 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15257 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15258 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15259 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15260 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15261 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15262 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15263 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15264 ; AVX512F-NEXT: retq
15266 ; AVX512BW-LABEL: ult_58_v8i64:
15267 ; AVX512BW: # %bb.0:
15268 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15269 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15270 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15271 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15272 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15273 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15274 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15275 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15276 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15277 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15278 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15279 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15280 ; AVX512BW-NEXT: retq
15282 ; AVX512VPOPCNTDQ-LABEL: ult_58_v8i64:
15283 ; AVX512VPOPCNTDQ: # %bb.0:
15284 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15285 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15286 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15287 ; AVX512VPOPCNTDQ-NEXT: retq
15289 ; BITALG-LABEL: ult_58_v8i64:
15291 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15292 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15293 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15294 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15295 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15296 ; BITALG-NEXT: retq
15297 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15298 %3 = icmp ult <8 x i64> %2, <i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58>
15299 %4 = sext <8 x i1> %3 to <8 x i64>
15303 define <8 x i64> @ugt_58_v8i64(<8 x i64> %0) {
15304 ; AVX512F-LABEL: ugt_58_v8i64:
15305 ; AVX512F: # %bb.0:
15306 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15307 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15308 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15309 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15310 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15311 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15312 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15313 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15314 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15315 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15316 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15317 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15318 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15319 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15320 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15321 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15322 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15323 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15324 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15325 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15326 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15327 ; AVX512F-NEXT: retq
15329 ; AVX512BW-LABEL: ugt_58_v8i64:
15330 ; AVX512BW: # %bb.0:
15331 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15332 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15333 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15334 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15335 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15336 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15337 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15338 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15339 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15340 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15341 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15342 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15343 ; AVX512BW-NEXT: retq
15345 ; AVX512VPOPCNTDQ-LABEL: ugt_58_v8i64:
15346 ; AVX512VPOPCNTDQ: # %bb.0:
15347 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15348 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15349 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15350 ; AVX512VPOPCNTDQ-NEXT: retq
15352 ; BITALG-LABEL: ugt_58_v8i64:
15354 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15355 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15356 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15357 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15358 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15359 ; BITALG-NEXT: retq
15360 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15361 %3 = icmp ugt <8 x i64> %2, <i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58, i64 58>
15362 %4 = sext <8 x i1> %3 to <8 x i64>
15366 define <8 x i64> @ult_59_v8i64(<8 x i64> %0) {
15367 ; AVX512F-LABEL: ult_59_v8i64:
15368 ; AVX512F: # %bb.0:
15369 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15370 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15371 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15372 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15373 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15374 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15375 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15376 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15377 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15378 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15379 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15380 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15381 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15382 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15383 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15384 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15385 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15386 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15387 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15388 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15389 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15390 ; AVX512F-NEXT: retq
15392 ; AVX512BW-LABEL: ult_59_v8i64:
15393 ; AVX512BW: # %bb.0:
15394 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15395 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15396 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15397 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15398 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15399 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15400 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15401 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15402 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15403 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15404 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15405 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15406 ; AVX512BW-NEXT: retq
15408 ; AVX512VPOPCNTDQ-LABEL: ult_59_v8i64:
15409 ; AVX512VPOPCNTDQ: # %bb.0:
15410 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15411 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15412 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15413 ; AVX512VPOPCNTDQ-NEXT: retq
15415 ; BITALG-LABEL: ult_59_v8i64:
15417 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15418 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15419 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15420 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15421 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15422 ; BITALG-NEXT: retq
15423 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15424 %3 = icmp ult <8 x i64> %2, <i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59>
15425 %4 = sext <8 x i1> %3 to <8 x i64>
15429 define <8 x i64> @ugt_59_v8i64(<8 x i64> %0) {
15430 ; AVX512F-LABEL: ugt_59_v8i64:
15431 ; AVX512F: # %bb.0:
15432 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15433 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15434 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15435 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15436 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15437 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15438 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15439 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15440 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15441 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15442 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15443 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15444 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15445 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15446 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15447 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15448 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15449 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15450 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15451 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15452 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15453 ; AVX512F-NEXT: retq
15455 ; AVX512BW-LABEL: ugt_59_v8i64:
15456 ; AVX512BW: # %bb.0:
15457 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15458 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15459 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15460 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15461 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15462 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15463 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15464 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15465 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15466 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15467 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15468 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15469 ; AVX512BW-NEXT: retq
15471 ; AVX512VPOPCNTDQ-LABEL: ugt_59_v8i64:
15472 ; AVX512VPOPCNTDQ: # %bb.0:
15473 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15474 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15475 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15476 ; AVX512VPOPCNTDQ-NEXT: retq
15478 ; BITALG-LABEL: ugt_59_v8i64:
15480 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15481 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15482 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15483 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15484 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15485 ; BITALG-NEXT: retq
15486 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15487 %3 = icmp ugt <8 x i64> %2, <i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59, i64 59>
15488 %4 = sext <8 x i1> %3 to <8 x i64>
15492 define <8 x i64> @ult_60_v8i64(<8 x i64> %0) {
15493 ; AVX512F-LABEL: ult_60_v8i64:
15494 ; AVX512F: # %bb.0:
15495 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15496 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15497 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15498 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15499 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15500 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15501 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15502 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15503 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15504 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15505 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15506 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15507 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15508 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15509 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15510 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15511 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15512 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15513 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15514 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15515 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15516 ; AVX512F-NEXT: retq
15518 ; AVX512BW-LABEL: ult_60_v8i64:
15519 ; AVX512BW: # %bb.0:
15520 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15521 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15522 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15523 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15524 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15525 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15526 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15527 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15528 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15529 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15530 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15531 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15532 ; AVX512BW-NEXT: retq
15534 ; AVX512VPOPCNTDQ-LABEL: ult_60_v8i64:
15535 ; AVX512VPOPCNTDQ: # %bb.0:
15536 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15537 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15538 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15539 ; AVX512VPOPCNTDQ-NEXT: retq
15541 ; BITALG-LABEL: ult_60_v8i64:
15543 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15544 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15545 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15546 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15547 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15548 ; BITALG-NEXT: retq
15549 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15550 %3 = icmp ult <8 x i64> %2, <i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60>
15551 %4 = sext <8 x i1> %3 to <8 x i64>
15555 define <8 x i64> @ugt_60_v8i64(<8 x i64> %0) {
15556 ; AVX512F-LABEL: ugt_60_v8i64:
15557 ; AVX512F: # %bb.0:
15558 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15559 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15560 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15561 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15562 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15563 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15564 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15565 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15566 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15567 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15568 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15569 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15570 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15571 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15572 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15573 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15574 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15575 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15576 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15577 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15578 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15579 ; AVX512F-NEXT: retq
15581 ; AVX512BW-LABEL: ugt_60_v8i64:
15582 ; AVX512BW: # %bb.0:
15583 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15584 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15585 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15586 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15587 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15588 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15589 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15590 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15591 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15592 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15593 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15594 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15595 ; AVX512BW-NEXT: retq
15597 ; AVX512VPOPCNTDQ-LABEL: ugt_60_v8i64:
15598 ; AVX512VPOPCNTDQ: # %bb.0:
15599 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15600 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15601 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15602 ; AVX512VPOPCNTDQ-NEXT: retq
15604 ; BITALG-LABEL: ugt_60_v8i64:
15606 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15607 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15608 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15609 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15610 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15611 ; BITALG-NEXT: retq
15612 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15613 %3 = icmp ugt <8 x i64> %2, <i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60, i64 60>
15614 %4 = sext <8 x i1> %3 to <8 x i64>
15618 define <8 x i64> @ult_61_v8i64(<8 x i64> %0) {
15619 ; AVX512F-LABEL: ult_61_v8i64:
15620 ; AVX512F: # %bb.0:
15621 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15622 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15623 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15624 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15625 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15626 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15627 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15628 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15629 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15630 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15631 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15632 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15633 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15634 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15635 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15636 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15637 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15638 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15639 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15640 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15641 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15642 ; AVX512F-NEXT: retq
15644 ; AVX512BW-LABEL: ult_61_v8i64:
15645 ; AVX512BW: # %bb.0:
15646 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15647 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15648 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15649 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15650 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15651 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15652 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15653 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15654 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15655 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15656 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15657 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15658 ; AVX512BW-NEXT: retq
15660 ; AVX512VPOPCNTDQ-LABEL: ult_61_v8i64:
15661 ; AVX512VPOPCNTDQ: # %bb.0:
15662 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15663 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15664 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15665 ; AVX512VPOPCNTDQ-NEXT: retq
15667 ; BITALG-LABEL: ult_61_v8i64:
15669 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15670 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15671 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15672 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15673 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15674 ; BITALG-NEXT: retq
15675 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15676 %3 = icmp ult <8 x i64> %2, <i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61>
15677 %4 = sext <8 x i1> %3 to <8 x i64>
15681 define <8 x i64> @ugt_61_v8i64(<8 x i64> %0) {
15682 ; AVX512F-LABEL: ugt_61_v8i64:
15683 ; AVX512F: # %bb.0:
15684 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15685 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15686 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15687 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15688 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15689 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15690 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15691 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15692 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15693 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15694 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15695 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15696 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15697 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15698 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15699 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15700 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15701 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15702 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15703 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15704 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15705 ; AVX512F-NEXT: retq
15707 ; AVX512BW-LABEL: ugt_61_v8i64:
15708 ; AVX512BW: # %bb.0:
15709 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15710 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15711 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15712 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15713 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15714 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15715 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15716 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15717 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15718 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15719 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15720 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15721 ; AVX512BW-NEXT: retq
15723 ; AVX512VPOPCNTDQ-LABEL: ugt_61_v8i64:
15724 ; AVX512VPOPCNTDQ: # %bb.0:
15725 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15726 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15727 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15728 ; AVX512VPOPCNTDQ-NEXT: retq
15730 ; BITALG-LABEL: ugt_61_v8i64:
15732 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15733 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15734 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15735 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15736 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15737 ; BITALG-NEXT: retq
15738 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15739 %3 = icmp ugt <8 x i64> %2, <i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61, i64 61>
15740 %4 = sext <8 x i1> %3 to <8 x i64>
15744 define <8 x i64> @ult_62_v8i64(<8 x i64> %0) {
15745 ; AVX512F-LABEL: ult_62_v8i64:
15746 ; AVX512F: # %bb.0:
15747 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15748 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15749 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15750 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15751 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15752 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15753 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15754 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15755 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15756 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15757 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15758 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15759 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15760 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15761 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15762 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15763 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15764 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15765 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15766 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15767 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15768 ; AVX512F-NEXT: retq
15770 ; AVX512BW-LABEL: ult_62_v8i64:
15771 ; AVX512BW: # %bb.0:
15772 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15773 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15774 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15775 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15776 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15777 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15778 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15779 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15780 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15781 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15782 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15783 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15784 ; AVX512BW-NEXT: retq
15786 ; AVX512VPOPCNTDQ-LABEL: ult_62_v8i64:
15787 ; AVX512VPOPCNTDQ: # %bb.0:
15788 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15789 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15790 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15791 ; AVX512VPOPCNTDQ-NEXT: retq
15793 ; BITALG-LABEL: ult_62_v8i64:
15795 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15796 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15797 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15798 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15799 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15800 ; BITALG-NEXT: retq
15801 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15802 %3 = icmp ult <8 x i64> %2, <i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62>
15803 %4 = sext <8 x i1> %3 to <8 x i64>
15807 define <8 x i64> @ugt_62_v8i64(<8 x i64> %0) {
15808 ; AVX512F-LABEL: ugt_62_v8i64:
15809 ; AVX512F: # %bb.0:
15810 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15811 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15812 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15813 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15814 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15815 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15816 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15817 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15818 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15819 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15820 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15821 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15822 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15823 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15824 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15825 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15826 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15827 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15828 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15829 ; AVX512F-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15830 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15831 ; AVX512F-NEXT: retq
15833 ; AVX512BW-LABEL: ugt_62_v8i64:
15834 ; AVX512BW: # %bb.0:
15835 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15836 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15837 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15838 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15839 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15840 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15841 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15842 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15843 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15844 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15845 ; AVX512BW-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15846 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15847 ; AVX512BW-NEXT: retq
15849 ; AVX512VPOPCNTDQ-LABEL: ugt_62_v8i64:
15850 ; AVX512VPOPCNTDQ: # %bb.0:
15851 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15852 ; AVX512VPOPCNTDQ-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15853 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15854 ; AVX512VPOPCNTDQ-NEXT: retq
15856 ; BITALG-LABEL: ugt_62_v8i64:
15858 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15859 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15860 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15861 ; BITALG-NEXT: vpcmpnleuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15862 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15863 ; BITALG-NEXT: retq
15864 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15865 %3 = icmp ugt <8 x i64> %2, <i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62, i64 62>
15866 %4 = sext <8 x i1> %3 to <8 x i64>
15870 define <8 x i64> @ult_63_v8i64(<8 x i64> %0) {
15871 ; AVX512F-LABEL: ult_63_v8i64:
15872 ; AVX512F: # %bb.0:
15873 ; AVX512F-NEXT: vextracti64x4 $1, %zmm0, %ymm1
15874 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm2 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15875 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm3
15876 ; AVX512F-NEXT: vmovdqa {{.*#+}} ymm4 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15877 ; AVX512F-NEXT: vpshufb %ymm3, %ymm4, %ymm3
15878 ; AVX512F-NEXT: vpsrlw $4, %ymm1, %ymm1
15879 ; AVX512F-NEXT: vpand %ymm2, %ymm1, %ymm1
15880 ; AVX512F-NEXT: vpshufb %ymm1, %ymm4, %ymm1
15881 ; AVX512F-NEXT: vpaddb %ymm3, %ymm1, %ymm1
15882 ; AVX512F-NEXT: vpxor %xmm3, %xmm3, %xmm3
15883 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm1, %ymm1
15884 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm5
15885 ; AVX512F-NEXT: vpshufb %ymm5, %ymm4, %ymm5
15886 ; AVX512F-NEXT: vpsrlw $4, %ymm0, %ymm0
15887 ; AVX512F-NEXT: vpand %ymm2, %ymm0, %ymm0
15888 ; AVX512F-NEXT: vpshufb %ymm0, %ymm4, %ymm0
15889 ; AVX512F-NEXT: vpaddb %ymm5, %ymm0, %ymm0
15890 ; AVX512F-NEXT: vpsadbw %ymm3, %ymm0, %ymm0
15891 ; AVX512F-NEXT: vinserti64x4 $1, %ymm1, %zmm0, %zmm0
15892 ; AVX512F-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15893 ; AVX512F-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15894 ; AVX512F-NEXT: retq
15896 ; AVX512BW-LABEL: ult_63_v8i64:
15897 ; AVX512BW: # %bb.0:
15898 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm1 = [15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15]
15899 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm2
15900 ; AVX512BW-NEXT: vmovdqa64 {{.*#+}} zmm3 = [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4]
15901 ; AVX512BW-NEXT: vpshufb %zmm2, %zmm3, %zmm2
15902 ; AVX512BW-NEXT: vpsrlw $4, %zmm0, %zmm0
15903 ; AVX512BW-NEXT: vpandq %zmm1, %zmm0, %zmm0
15904 ; AVX512BW-NEXT: vpshufb %zmm0, %zmm3, %zmm0
15905 ; AVX512BW-NEXT: vpaddb %zmm2, %zmm0, %zmm0
15906 ; AVX512BW-NEXT: vpxor %xmm1, %xmm1, %xmm1
15907 ; AVX512BW-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15908 ; AVX512BW-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15909 ; AVX512BW-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15910 ; AVX512BW-NEXT: retq
15912 ; AVX512VPOPCNTDQ-LABEL: ult_63_v8i64:
15913 ; AVX512VPOPCNTDQ: # %bb.0:
15914 ; AVX512VPOPCNTDQ-NEXT: vpopcntq %zmm0, %zmm0
15915 ; AVX512VPOPCNTDQ-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15916 ; AVX512VPOPCNTDQ-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15917 ; AVX512VPOPCNTDQ-NEXT: retq
15919 ; BITALG-LABEL: ult_63_v8i64:
15921 ; BITALG-NEXT: vpopcntb %zmm0, %zmm0
15922 ; BITALG-NEXT: vpxor %xmm1, %xmm1, %xmm1
15923 ; BITALG-NEXT: vpsadbw %zmm1, %zmm0, %zmm0
15924 ; BITALG-NEXT: vpcmpltuq {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm0, %k1
15925 ; BITALG-NEXT: vpternlogq $255, %zmm0, %zmm0, %zmm0 {%k1} {z}
15926 ; BITALG-NEXT: retq
15927 %2 = tail call <8 x i64> @llvm.ctpop.v8i64(<8 x i64> %0)
15928 %3 = icmp ult <8 x i64> %2, <i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63>
15929 %4 = sext <8 x i1> %3 to <8 x i64>
15933 declare <64 x i8> @llvm.ctpop.v64i8(<64 x i8>)
15934 declare <32 x i16> @llvm.ctpop.v32i16(<32 x i16>)
15935 declare <16 x i32> @llvm.ctpop.v16i32(<16 x i32>)
15936 declare <8 x i64> @llvm.ctpop.v8i64(<8 x i64>)