1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx | FileCheck %s --check-prefix=X64
4 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx2 | FileCheck %s --check-prefix=X86-AVX2
5 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx2 | FileCheck %s --check-prefix=X64-AVX2
6 ; RUN: llc < %s -mtriple=i686-apple-darwin -mattr=+avx512vl | FileCheck %s --check-prefix=X86-AVX512
7 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512vl | FileCheck %s --check-prefix=X64-AVX512
9 define void @and_masks(ptr %a, ptr %b, ptr %c) nounwind uwtable noinline ssp {
10 ; X86-LABEL: and_masks:
12 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
13 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
14 ; X86-NEXT: movl {{[0-9]+}}(%esp), %edx
15 ; X86-NEXT: vmovups (%edx), %ymm0
16 ; X86-NEXT: vmovups (%ecx), %ymm1
17 ; X86-NEXT: vcmpltps %ymm0, %ymm1, %ymm1
18 ; X86-NEXT: vmovups (%eax), %ymm2
19 ; X86-NEXT: vcmpltps %ymm0, %ymm2, %ymm0
20 ; X86-NEXT: vandps %ymm1, %ymm0, %ymm0
21 ; X86-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
22 ; X86-NEXT: vmovaps %ymm0, (%eax)
23 ; X86-NEXT: vzeroupper
26 ; X64-LABEL: and_masks:
28 ; X64-NEXT: vmovups (%rdi), %ymm0
29 ; X64-NEXT: vmovups (%rsi), %ymm1
30 ; X64-NEXT: vcmpltps %ymm0, %ymm1, %ymm1
31 ; X64-NEXT: vmovups (%rdx), %ymm2
32 ; X64-NEXT: vcmpltps %ymm0, %ymm2, %ymm0
33 ; X64-NEXT: vandps %ymm1, %ymm0, %ymm0
34 ; X64-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
35 ; X64-NEXT: vmovaps %ymm0, (%rax)
36 ; X64-NEXT: vzeroupper
39 ; X86-AVX2-LABEL: and_masks:
41 ; X86-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
42 ; X86-AVX2-NEXT: movl {{[0-9]+}}(%esp), %ecx
43 ; X86-AVX2-NEXT: movl {{[0-9]+}}(%esp), %edx
44 ; X86-AVX2-NEXT: vmovups (%edx), %ymm0
45 ; X86-AVX2-NEXT: vmovups (%ecx), %ymm1
46 ; X86-AVX2-NEXT: vcmpltps %ymm0, %ymm1, %ymm1
47 ; X86-AVX2-NEXT: vmovups (%eax), %ymm2
48 ; X86-AVX2-NEXT: vcmpltps %ymm0, %ymm2, %ymm0
49 ; X86-AVX2-NEXT: vandps %ymm1, %ymm0, %ymm0
50 ; X86-AVX2-NEXT: vpsrld $31, %ymm0, %ymm0
51 ; X86-AVX2-NEXT: vmovdqa %ymm0, (%eax)
52 ; X86-AVX2-NEXT: vzeroupper
55 ; X64-AVX2-LABEL: and_masks:
57 ; X64-AVX2-NEXT: vmovups (%rdi), %ymm0
58 ; X64-AVX2-NEXT: vmovups (%rsi), %ymm1
59 ; X64-AVX2-NEXT: vcmpltps %ymm0, %ymm1, %ymm1
60 ; X64-AVX2-NEXT: vmovups (%rdx), %ymm2
61 ; X64-AVX2-NEXT: vcmpltps %ymm0, %ymm2, %ymm0
62 ; X64-AVX2-NEXT: vandps %ymm1, %ymm0, %ymm0
63 ; X64-AVX2-NEXT: vpsrld $31, %ymm0, %ymm0
64 ; X64-AVX2-NEXT: vmovdqa %ymm0, (%rax)
65 ; X64-AVX2-NEXT: vzeroupper
68 ; X86-AVX512-LABEL: and_masks:
69 ; X86-AVX512: ## %bb.0:
70 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %eax
71 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %ecx
72 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %edx
73 ; X86-AVX512-NEXT: vmovups (%edx), %ymm0
74 ; X86-AVX512-NEXT: vcmpgtps (%ecx), %ymm0, %k1
75 ; X86-AVX512-NEXT: vcmpgtps (%eax), %ymm0, %k1 {%k1}
76 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
77 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
78 ; X86-AVX512-NEXT: vpsrld $31, %ymm0, %ymm0
79 ; X86-AVX512-NEXT: vmovdqa %ymm0, (%eax)
80 ; X86-AVX512-NEXT: vzeroupper
81 ; X86-AVX512-NEXT: retl
83 ; X64-AVX512-LABEL: and_masks:
84 ; X64-AVX512: ## %bb.0:
85 ; X64-AVX512-NEXT: vmovups (%rdi), %ymm0
86 ; X64-AVX512-NEXT: vcmpgtps (%rdx), %ymm0, %k1
87 ; X64-AVX512-NEXT: vcmpgtps (%rsi), %ymm0, %k1 {%k1}
88 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
89 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
90 ; X64-AVX512-NEXT: vpsrld $31, %ymm0, %ymm0
91 ; X64-AVX512-NEXT: vmovdqa %ymm0, (%rax)
92 ; X64-AVX512-NEXT: vzeroupper
93 ; X64-AVX512-NEXT: retq
94 %v0 = load <8 x float>, ptr %a, align 16
95 %v1 = load <8 x float>, ptr %b, align 16
96 %m0 = fcmp olt <8 x float> %v1, %v0
97 %v2 = load <8 x float>, ptr %c, align 16
98 %m1 = fcmp olt <8 x float> %v2, %v0
99 %mand = and <8 x i1> %m1, %m0
100 %r = zext <8 x i1> %mand to <8 x i32>
101 store <8 x i32> %r, ptr undef, align 32
105 define void @neg_masks(ptr %a, ptr %b, ptr %c) nounwind uwtable noinline ssp {
106 ; X86-LABEL: neg_masks:
108 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
109 ; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
110 ; X86-NEXT: vmovups (%ecx), %ymm0
111 ; X86-NEXT: vcmpnltps (%eax), %ymm0, %ymm0
112 ; X86-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
113 ; X86-NEXT: vmovaps %ymm0, (%eax)
114 ; X86-NEXT: vzeroupper
117 ; X64-LABEL: neg_masks:
119 ; X64-NEXT: vmovups (%rsi), %ymm0
120 ; X64-NEXT: vcmpnltps (%rdi), %ymm0, %ymm0
121 ; X64-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
122 ; X64-NEXT: vmovaps %ymm0, (%rax)
123 ; X64-NEXT: vzeroupper
126 ; X86-AVX2-LABEL: neg_masks:
127 ; X86-AVX2: ## %bb.0:
128 ; X86-AVX2-NEXT: movl {{[0-9]+}}(%esp), %eax
129 ; X86-AVX2-NEXT: movl {{[0-9]+}}(%esp), %ecx
130 ; X86-AVX2-NEXT: vmovups (%ecx), %ymm0
131 ; X86-AVX2-NEXT: vcmpnltps (%eax), %ymm0, %ymm0
132 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [1,1,1,1,1,1,1,1]
133 ; X86-AVX2-NEXT: vandps %ymm1, %ymm0, %ymm0
134 ; X86-AVX2-NEXT: vmovaps %ymm0, (%eax)
135 ; X86-AVX2-NEXT: vzeroupper
136 ; X86-AVX2-NEXT: retl
138 ; X64-AVX2-LABEL: neg_masks:
139 ; X64-AVX2: ## %bb.0:
140 ; X64-AVX2-NEXT: vmovups (%rsi), %ymm0
141 ; X64-AVX2-NEXT: vcmpnltps (%rdi), %ymm0, %ymm0
142 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [1,1,1,1,1,1,1,1]
143 ; X64-AVX2-NEXT: vandps %ymm1, %ymm0, %ymm0
144 ; X64-AVX2-NEXT: vmovaps %ymm0, (%rax)
145 ; X64-AVX2-NEXT: vzeroupper
146 ; X64-AVX2-NEXT: retq
148 ; X86-AVX512-LABEL: neg_masks:
149 ; X86-AVX512: ## %bb.0:
150 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %eax
151 ; X86-AVX512-NEXT: movl {{[0-9]+}}(%esp), %ecx
152 ; X86-AVX512-NEXT: vmovups (%ecx), %ymm0
153 ; X86-AVX512-NEXT: vcmpnltps (%eax), %ymm0, %k1
154 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
155 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
156 ; X86-AVX512-NEXT: vpsrld $31, %ymm0, %ymm0
157 ; X86-AVX512-NEXT: vmovdqa %ymm0, (%eax)
158 ; X86-AVX512-NEXT: vzeroupper
159 ; X86-AVX512-NEXT: retl
161 ; X64-AVX512-LABEL: neg_masks:
162 ; X64-AVX512: ## %bb.0:
163 ; X64-AVX512-NEXT: vmovups (%rsi), %ymm0
164 ; X64-AVX512-NEXT: vcmpnltps (%rdi), %ymm0, %k1
165 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
166 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
167 ; X64-AVX512-NEXT: vpsrld $31, %ymm0, %ymm0
168 ; X64-AVX512-NEXT: vmovdqa %ymm0, (%rax)
169 ; X64-AVX512-NEXT: vzeroupper
170 ; X64-AVX512-NEXT: retq
171 %v0 = load <8 x float>, ptr %a, align 16
172 %v1 = load <8 x float>, ptr %b, align 16
173 %m0 = fcmp olt <8 x float> %v1, %v0
174 %mand = xor <8 x i1> %m0, <i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1, i1 1>
175 %r = zext <8 x i1> %mand to <8 x i32>
176 store <8 x i32> %r, ptr undef, align 32
180 define <8 x i32> @and_mask_constant(<8 x i32> %v0, <8 x i32> %v1) {
181 ; X86-LABEL: and_mask_constant:
183 ; X86-NEXT: vextractf128 $1, %ymm0, %xmm1
184 ; X86-NEXT: vpxor %xmm2, %xmm2, %xmm2
185 ; X86-NEXT: vpcmpeqd %xmm2, %xmm1, %xmm1
186 ; X86-NEXT: vpcmpeqd %xmm2, %xmm0, %xmm0
187 ; X86-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
188 ; X86-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
191 ; X64-LABEL: and_mask_constant:
193 ; X64-NEXT: vextractf128 $1, %ymm0, %xmm1
194 ; X64-NEXT: vpxor %xmm2, %xmm2, %xmm2
195 ; X64-NEXT: vpcmpeqd %xmm2, %xmm1, %xmm1
196 ; X64-NEXT: vpcmpeqd %xmm2, %xmm0, %xmm0
197 ; X64-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
198 ; X64-NEXT: vandps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
201 ; X86-AVX2-LABEL: and_mask_constant:
202 ; X86-AVX2: ## %bb.0:
203 ; X86-AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
204 ; X86-AVX2-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
205 ; X86-AVX2-NEXT: vpand {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
206 ; X86-AVX2-NEXT: retl
208 ; X64-AVX2-LABEL: and_mask_constant:
209 ; X64-AVX2: ## %bb.0:
210 ; X64-AVX2-NEXT: vpxor %xmm1, %xmm1, %xmm1
211 ; X64-AVX2-NEXT: vpcmpeqd %ymm1, %ymm0, %ymm0
212 ; X64-AVX2-NEXT: vpand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
213 ; X64-AVX2-NEXT: retq
215 ; X86-AVX512-LABEL: and_mask_constant:
216 ; X86-AVX512: ## %bb.0:
217 ; X86-AVX512-NEXT: movb $105, %al
218 ; X86-AVX512-NEXT: kmovw %eax, %k1
219 ; X86-AVX512-NEXT: vptestnmd %ymm0, %ymm0, %k1 {%k1}
220 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
221 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
222 ; X86-AVX512-NEXT: vpsrld $31, %ymm0, %ymm0
223 ; X86-AVX512-NEXT: retl
225 ; X64-AVX512-LABEL: and_mask_constant:
226 ; X64-AVX512: ## %bb.0:
227 ; X64-AVX512-NEXT: movb $105, %al
228 ; X64-AVX512-NEXT: kmovw %eax, %k1
229 ; X64-AVX512-NEXT: vptestnmd %ymm0, %ymm0, %k1 {%k1}
230 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
231 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
232 ; X64-AVX512-NEXT: vpsrld $31, %ymm0, %ymm0
233 ; X64-AVX512-NEXT: retq
234 %m = icmp eq <8 x i32> %v0, zeroinitializer
235 %mand = and <8 x i1> %m, <i1 true, i1 false, i1 false, i1 true, i1 false, i1 true, i1 true, i1 false>
236 %r = zext <8 x i1> %mand to <8 x i32>
240 define <8 x i32> @two_ands(<8 x float> %x) local_unnamed_addr #0 {
241 ; X86-LABEL: two_ands:
242 ; X86: ## %bb.0: ## %entry
243 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
244 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
245 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
246 ; X86-NEXT: vandps %ymm0, %ymm1, %ymm0
249 ; X64-LABEL: two_ands:
250 ; X64: ## %bb.0: ## %entry
251 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
252 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
253 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
254 ; X64-NEXT: vandps %ymm0, %ymm1, %ymm0
257 ; X86-AVX2-LABEL: two_ands:
258 ; X86-AVX2: ## %bb.0: ## %entry
259 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
260 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
261 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
262 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm0
263 ; X86-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
264 ; X86-AVX2-NEXT: retl
266 ; X64-AVX2-LABEL: two_ands:
267 ; X64-AVX2: ## %bb.0: ## %entry
268 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
269 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
270 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
271 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm0
272 ; X64-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
273 ; X64-AVX2-NEXT: retq
275 ; X86-AVX512-LABEL: two_ands:
276 ; X86-AVX512: ## %bb.0: ## %entry
277 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
278 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
279 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
280 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
281 ; X86-AVX512-NEXT: retl
283 ; X64-AVX512-LABEL: two_ands:
284 ; X64-AVX512: ## %bb.0: ## %entry
285 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
286 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
287 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
288 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
289 ; X64-AVX512-NEXT: retq
291 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
292 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
293 %and4 = and <8 x i1> %cmp, %cmp1
294 %and = sext <8 x i1> %and4 to <8 x i32>
298 define <8 x i32> @three_ands(<8 x float> %x) {
299 ; X86-LABEL: three_ands:
300 ; X86: ## %bb.0: ## %entry
301 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
302 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
303 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
304 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
305 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
306 ; X86-NEXT: vandps %ymm0, %ymm2, %ymm0
307 ; X86-NEXT: vandps %ymm0, %ymm1, %ymm0
310 ; X64-LABEL: three_ands:
311 ; X64: ## %bb.0: ## %entry
312 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
313 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
314 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
315 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
316 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
317 ; X64-NEXT: vandps %ymm0, %ymm2, %ymm0
318 ; X64-NEXT: vandps %ymm0, %ymm1, %ymm0
321 ; X86-AVX2-LABEL: three_ands:
322 ; X86-AVX2: ## %bb.0: ## %entry
323 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
324 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
325 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
326 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
327 ; X86-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
328 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
329 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
330 ; X86-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
331 ; X86-AVX2-NEXT: retl
333 ; X64-AVX2-LABEL: three_ands:
334 ; X64-AVX2: ## %bb.0: ## %entry
335 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
336 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
337 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
338 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
339 ; X64-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
340 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
341 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
342 ; X64-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
343 ; X64-AVX2-NEXT: retq
345 ; X86-AVX512-LABEL: three_ands:
346 ; X86-AVX512: ## %bb.0: ## %entry
347 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
348 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
349 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
350 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1 {%k1}
351 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
352 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
353 ; X86-AVX512-NEXT: retl
355 ; X64-AVX512-LABEL: three_ands:
356 ; X64-AVX512: ## %bb.0: ## %entry
357 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
358 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
359 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
360 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1 {%k1}
361 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
362 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
363 ; X64-AVX512-NEXT: retq
365 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
366 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
367 %and8 = and <8 x i1> %cmp, %cmp1
368 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
369 %and59 = and <8 x i1> %and8, %cmp3
370 %and5 = sext <8 x i1> %and59 to <8 x i32>
374 define <8 x i32> @four_ands(<8 x float> %x) {
375 ; X86-LABEL: four_ands:
376 ; X86: ## %bb.0: ## %entry
377 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
378 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
379 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
380 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
381 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
382 ; X86-NEXT: vandps %ymm3, %ymm2, %ymm2
383 ; X86-NEXT: vandps %ymm2, %ymm1, %ymm1
384 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
385 ; X86-NEXT: vandps %ymm0, %ymm1, %ymm0
388 ; X64-LABEL: four_ands:
389 ; X64: ## %bb.0: ## %entry
390 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
391 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
392 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
393 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
394 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
395 ; X64-NEXT: vandps %ymm3, %ymm2, %ymm2
396 ; X64-NEXT: vandps %ymm2, %ymm1, %ymm1
397 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
398 ; X64-NEXT: vandps %ymm0, %ymm1, %ymm0
401 ; X86-AVX2-LABEL: four_ands:
402 ; X86-AVX2: ## %bb.0: ## %entry
403 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
404 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
405 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
406 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
407 ; X86-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
408 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
409 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
410 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
411 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
412 ; X86-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
413 ; X86-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
414 ; X86-AVX2-NEXT: retl
416 ; X64-AVX2-LABEL: four_ands:
417 ; X64-AVX2: ## %bb.0: ## %entry
418 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
419 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
420 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
421 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
422 ; X64-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
423 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
424 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
425 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
426 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
427 ; X64-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
428 ; X64-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
429 ; X64-AVX2-NEXT: retq
431 ; X86-AVX512-LABEL: four_ands:
432 ; X86-AVX512: ## %bb.0: ## %entry
433 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
434 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
435 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
436 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1 {%k1}
437 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
438 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
439 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
440 ; X86-AVX512-NEXT: retl
442 ; X64-AVX512-LABEL: four_ands:
443 ; X64-AVX512: ## %bb.0: ## %entry
444 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
445 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
446 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
447 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1 {%k1}
448 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
449 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
450 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
451 ; X64-AVX512-NEXT: retq
453 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
454 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
455 %and12 = and <8 x i1> %cmp, %cmp1
456 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
457 %and513 = and <8 x i1> %and12, %cmp3
458 %cmp6 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
459 %and814 = and <8 x i1> %and513, %cmp6
460 %and8 = sext <8 x i1> %and814 to <8 x i32>
464 define <8 x i32> @five_ands(<8 x float> %x) {
465 ; X86-LABEL: five_ands:
466 ; X86: ## %bb.0: ## %entry
467 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
468 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
469 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
470 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
471 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
472 ; X86-NEXT: vandps %ymm3, %ymm2, %ymm2
473 ; X86-NEXT: vandps %ymm2, %ymm1, %ymm1
474 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
475 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
476 ; X86-NEXT: vandps %ymm0, %ymm2, %ymm0
477 ; X86-NEXT: vandps %ymm0, %ymm1, %ymm0
480 ; X64-LABEL: five_ands:
481 ; X64: ## %bb.0: ## %entry
482 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
483 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
484 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
485 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
486 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
487 ; X64-NEXT: vandps %ymm3, %ymm2, %ymm2
488 ; X64-NEXT: vandps %ymm2, %ymm1, %ymm1
489 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
490 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
491 ; X64-NEXT: vandps %ymm0, %ymm2, %ymm0
492 ; X64-NEXT: vandps %ymm0, %ymm1, %ymm0
495 ; X86-AVX2-LABEL: five_ands:
496 ; X86-AVX2: ## %bb.0: ## %entry
497 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
498 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
499 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
500 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
501 ; X86-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
502 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
503 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
504 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
505 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
506 ; X86-AVX2-NEXT: vandps %ymm3, %ymm2, %ymm2
507 ; X86-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
508 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
509 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
510 ; X86-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
511 ; X86-AVX2-NEXT: retl
513 ; X64-AVX2-LABEL: five_ands:
514 ; X64-AVX2: ## %bb.0: ## %entry
515 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
516 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
517 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
518 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
519 ; X64-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
520 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
521 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
522 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
523 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
524 ; X64-AVX2-NEXT: vandps %ymm3, %ymm2, %ymm2
525 ; X64-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
526 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
527 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
528 ; X64-AVX2-NEXT: vandps %ymm0, %ymm1, %ymm0
529 ; X64-AVX2-NEXT: retq
531 ; X86-AVX512-LABEL: five_ands:
532 ; X86-AVX512: ## %bb.0: ## %entry
533 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
534 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
535 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
536 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1 {%k1}
537 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
538 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
539 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
540 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
541 ; X86-AVX512-NEXT: retl
543 ; X64-AVX512-LABEL: five_ands:
544 ; X64-AVX512: ## %bb.0: ## %entry
545 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
546 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
547 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
548 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1 {%k1}
549 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
550 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
551 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
552 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
553 ; X64-AVX512-NEXT: retq
555 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
556 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
557 %and16 = and <8 x i1> %cmp, %cmp1
558 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
559 %and517 = and <8 x i1> %and16, %cmp3
560 %cmp6 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
561 %and818 = and <8 x i1> %and517, %cmp6
562 %cmp9 = fcmp une <8 x float> %x, <float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000>
563 %and1119 = and <8 x i1> %and818, %cmp9
564 %and11 = sext <8 x i1> %and1119 to <8 x i32>
568 define <8 x i32> @two_or(<8 x float> %x) {
570 ; X86: ## %bb.0: ## %entry
571 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
572 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
573 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
574 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
578 ; X64: ## %bb.0: ## %entry
579 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
580 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
581 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
582 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
585 ; X86-AVX2-LABEL: two_or:
586 ; X86-AVX2: ## %bb.0: ## %entry
587 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
588 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
589 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
590 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm0
591 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
592 ; X86-AVX2-NEXT: retl
594 ; X64-AVX2-LABEL: two_or:
595 ; X64-AVX2: ## %bb.0: ## %entry
596 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
597 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
598 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
599 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm0
600 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
601 ; X64-AVX2-NEXT: retq
603 ; X86-AVX512-LABEL: two_or:
604 ; X86-AVX512: ## %bb.0: ## %entry
605 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
606 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
607 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
608 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
609 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
610 ; X86-AVX512-NEXT: retl
612 ; X64-AVX512-LABEL: two_or:
613 ; X64-AVX512: ## %bb.0: ## %entry
614 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
615 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
616 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
617 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
618 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
619 ; X64-AVX512-NEXT: retq
621 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
622 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
623 %or4 = or <8 x i1> %cmp, %cmp1
624 %or = sext <8 x i1> %or4 to <8 x i32>
628 define <8 x i32> @three_or(<8 x float> %x) {
629 ; X86-LABEL: three_or:
630 ; X86: ## %bb.0: ## %entry
631 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
632 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
633 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
634 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
635 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
636 ; X86-NEXT: vorps %ymm0, %ymm2, %ymm0
637 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
640 ; X64-LABEL: three_or:
641 ; X64: ## %bb.0: ## %entry
642 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
643 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
644 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
645 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
646 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
647 ; X64-NEXT: vorps %ymm0, %ymm2, %ymm0
648 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
651 ; X86-AVX2-LABEL: three_or:
652 ; X86-AVX2: ## %bb.0: ## %entry
653 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
654 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
655 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
656 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
657 ; X86-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
658 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
659 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
660 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
661 ; X86-AVX2-NEXT: retl
663 ; X64-AVX2-LABEL: three_or:
664 ; X64-AVX2: ## %bb.0: ## %entry
665 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
666 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
667 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
668 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
669 ; X64-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
670 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
671 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
672 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
673 ; X64-AVX2-NEXT: retq
675 ; X86-AVX512-LABEL: three_or:
676 ; X86-AVX512: ## %bb.0: ## %entry
677 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
678 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
679 ; X86-AVX512-NEXT: korw %k1, %k0, %k0
680 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
681 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
682 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
683 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
684 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
685 ; X86-AVX512-NEXT: retl
687 ; X64-AVX512-LABEL: three_or:
688 ; X64-AVX512: ## %bb.0: ## %entry
689 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
690 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
691 ; X64-AVX512-NEXT: korw %k1, %k0, %k0
692 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
693 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
694 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
695 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
696 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
697 ; X64-AVX512-NEXT: retq
699 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
700 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
701 %or8 = or <8 x i1> %cmp, %cmp1
702 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
703 %or59 = or <8 x i1> %or8, %cmp3
704 %or5 = sext <8 x i1> %or59 to <8 x i32>
707 ; Function Attrs: norecurse nounwind readnone ssp uwtable
708 define <8 x i32> @four_or(<8 x float> %x) {
709 ; X86-LABEL: four_or:
710 ; X86: ## %bb.0: ## %entry
711 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
712 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
713 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
714 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
715 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
716 ; X86-NEXT: vorps %ymm3, %ymm2, %ymm2
717 ; X86-NEXT: vorps %ymm2, %ymm1, %ymm1
718 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
719 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
722 ; X64-LABEL: four_or:
723 ; X64: ## %bb.0: ## %entry
724 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
725 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
726 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
727 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
728 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
729 ; X64-NEXT: vorps %ymm3, %ymm2, %ymm2
730 ; X64-NEXT: vorps %ymm2, %ymm1, %ymm1
731 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
732 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
735 ; X86-AVX2-LABEL: four_or:
736 ; X86-AVX2: ## %bb.0: ## %entry
737 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
738 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
739 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
740 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
741 ; X86-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
742 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
743 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
744 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
745 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
746 ; X86-AVX2-NEXT: vorps %ymm0, %ymm2, %ymm0
747 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
748 ; X86-AVX2-NEXT: retl
750 ; X64-AVX2-LABEL: four_or:
751 ; X64-AVX2: ## %bb.0: ## %entry
752 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
753 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
754 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
755 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
756 ; X64-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
757 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
758 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
759 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
760 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
761 ; X64-AVX2-NEXT: vorps %ymm0, %ymm2, %ymm0
762 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
763 ; X64-AVX2-NEXT: retq
765 ; X86-AVX512-LABEL: four_or:
766 ; X86-AVX512: ## %bb.0: ## %entry
767 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
768 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
769 ; X86-AVX512-NEXT: korw %k1, %k0, %k0
770 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
771 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
772 ; X86-AVX512-NEXT: korw %k1, %k0, %k0
773 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
774 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
775 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
776 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
777 ; X86-AVX512-NEXT: retl
779 ; X64-AVX512-LABEL: four_or:
780 ; X64-AVX512: ## %bb.0: ## %entry
781 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
782 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
783 ; X64-AVX512-NEXT: korw %k1, %k0, %k0
784 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
785 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
786 ; X64-AVX512-NEXT: korw %k1, %k0, %k0
787 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
788 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
789 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
790 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
791 ; X64-AVX512-NEXT: retq
793 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
794 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
795 %or12 = or <8 x i1> %cmp, %cmp1
796 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
797 %or513 = or <8 x i1> %or12, %cmp3
798 %cmp6 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
799 %or814 = or <8 x i1> %or513, %cmp6
800 %or8 = sext <8 x i1> %or814 to <8 x i32>
803 ; Function Attrs: norecurse nounwind readnone ssp uwtable
804 define <8 x i32> @five_or(<8 x float> %x) {
805 ; X86-LABEL: five_or:
806 ; X86: ## %bb.0: ## %entry
807 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
808 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
809 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
810 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
811 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
812 ; X86-NEXT: vorps %ymm3, %ymm2, %ymm2
813 ; X86-NEXT: vorps %ymm2, %ymm1, %ymm1
814 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
815 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
816 ; X86-NEXT: vorps %ymm0, %ymm2, %ymm0
817 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
820 ; X64-LABEL: five_or:
821 ; X64: ## %bb.0: ## %entry
822 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
823 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
824 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
825 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
826 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
827 ; X64-NEXT: vorps %ymm3, %ymm2, %ymm2
828 ; X64-NEXT: vorps %ymm2, %ymm1, %ymm1
829 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
830 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
831 ; X64-NEXT: vorps %ymm0, %ymm2, %ymm0
832 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
835 ; X86-AVX2-LABEL: five_or:
836 ; X86-AVX2: ## %bb.0: ## %entry
837 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
838 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
839 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
840 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
841 ; X86-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
842 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
843 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
844 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
845 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
846 ; X86-AVX2-NEXT: vorps %ymm3, %ymm2, %ymm2
847 ; X86-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
848 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
849 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
850 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
851 ; X86-AVX2-NEXT: retl
853 ; X64-AVX2-LABEL: five_or:
854 ; X64-AVX2: ## %bb.0: ## %entry
855 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
856 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
857 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
858 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
859 ; X64-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
860 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
861 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
862 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
863 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
864 ; X64-AVX2-NEXT: vorps %ymm3, %ymm2, %ymm2
865 ; X64-AVX2-NEXT: vorps %ymm2, %ymm1, %ymm1
866 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
867 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
868 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
869 ; X64-AVX2-NEXT: retq
871 ; X86-AVX512-LABEL: five_or:
872 ; X86-AVX512: ## %bb.0: ## %entry
873 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
874 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
875 ; X86-AVX512-NEXT: korw %k1, %k0, %k0
876 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
877 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
878 ; X86-AVX512-NEXT: korw %k1, %k0, %k0
879 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
880 ; X86-AVX512-NEXT: korw %k1, %k0, %k0
881 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
882 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
883 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
884 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
885 ; X86-AVX512-NEXT: retl
887 ; X64-AVX512-LABEL: five_or:
888 ; X64-AVX512: ## %bb.0: ## %entry
889 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
890 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
891 ; X64-AVX512-NEXT: korw %k1, %k0, %k0
892 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
893 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
894 ; X64-AVX512-NEXT: korw %k1, %k0, %k0
895 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
896 ; X64-AVX512-NEXT: korw %k1, %k0, %k0
897 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
898 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
899 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
900 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
901 ; X64-AVX512-NEXT: retq
903 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
904 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
905 %or16 = or <8 x i1> %cmp, %cmp1
906 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
907 %or517 = or <8 x i1> %or16, %cmp3
908 %cmp6 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
909 %or818 = or <8 x i1> %or517, %cmp6
910 %cmp9 = fcmp une <8 x float> %x, <float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000>
911 %or1119 = or <8 x i1> %or818, %cmp9
912 %or11 = sext <8 x i1> %or1119 to <8 x i32>
916 define <8 x i32> @three_or_and(<8 x float> %x) {
917 ; X86-LABEL: three_or_and:
918 ; X86: ## %bb.0: ## %entry
919 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
920 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
921 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
922 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
923 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
924 ; X86-NEXT: vandps %ymm0, %ymm2, %ymm0
925 ; X86-NEXT: vorps %ymm1, %ymm0, %ymm0
928 ; X64-LABEL: three_or_and:
929 ; X64: ## %bb.0: ## %entry
930 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
931 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
932 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
933 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
934 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
935 ; X64-NEXT: vandps %ymm0, %ymm2, %ymm0
936 ; X64-NEXT: vorps %ymm1, %ymm0, %ymm0
939 ; X86-AVX2-LABEL: three_or_and:
940 ; X86-AVX2: ## %bb.0: ## %entry
941 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
942 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
943 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
944 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
945 ; X86-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
946 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
947 ; X86-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
948 ; X86-AVX2-NEXT: vorps %ymm1, %ymm0, %ymm0
949 ; X86-AVX2-NEXT: retl
951 ; X64-AVX2-LABEL: three_or_and:
952 ; X64-AVX2: ## %bb.0: ## %entry
953 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
954 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
955 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
956 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
957 ; X64-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
958 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
959 ; X64-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
960 ; X64-AVX2-NEXT: vorps %ymm1, %ymm0, %ymm0
961 ; X64-AVX2-NEXT: retq
963 ; X86-AVX512-LABEL: three_or_and:
964 ; X86-AVX512: ## %bb.0: ## %entry
965 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
966 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
967 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
968 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
969 ; X86-AVX512-NEXT: korw %k0, %k1, %k1
970 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
971 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
972 ; X86-AVX512-NEXT: retl
974 ; X64-AVX512-LABEL: three_or_and:
975 ; X64-AVX512: ## %bb.0: ## %entry
976 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
977 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
978 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
979 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
980 ; X64-AVX512-NEXT: korw %k0, %k1, %k1
981 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
982 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
983 ; X64-AVX512-NEXT: retq
985 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
986 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
987 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
988 %and7 = and <8 x i1> %cmp1, %cmp3
989 %or8 = or <8 x i1> %and7, %cmp
990 %or = sext <8 x i1> %or8 to <8 x i32>
994 define <8 x i32> @four_or_and(<8 x float> %x) {
995 ; X86-LABEL: four_or_and:
996 ; X86: ## %bb.0: ## %entry
997 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
998 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
999 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
1000 ; X86-NEXT: vandps %ymm2, %ymm1, %ymm1
1001 ; X86-NEXT: vxorps %xmm2, %xmm2, %xmm2
1002 ; X86-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1003 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
1004 ; X86-NEXT: vandps %ymm0, %ymm2, %ymm0
1005 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
1008 ; X64-LABEL: four_or_and:
1009 ; X64: ## %bb.0: ## %entry
1010 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1011 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1012 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
1013 ; X64-NEXT: vandps %ymm2, %ymm1, %ymm1
1014 ; X64-NEXT: vxorps %xmm2, %xmm2, %xmm2
1015 ; X64-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1016 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1017 ; X64-NEXT: vandps %ymm0, %ymm2, %ymm0
1018 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
1021 ; X86-AVX2-LABEL: four_or_and:
1022 ; X86-AVX2: ## %bb.0: ## %entry
1023 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1024 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1025 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1026 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1027 ; X86-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
1028 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
1029 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1030 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1031 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
1032 ; X86-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
1033 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1034 ; X86-AVX2-NEXT: retl
1036 ; X64-AVX2-LABEL: four_or_and:
1037 ; X64-AVX2: ## %bb.0: ## %entry
1038 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1039 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1040 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1041 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1042 ; X64-AVX2-NEXT: vandps %ymm2, %ymm1, %ymm1
1043 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
1044 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1045 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1046 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
1047 ; X64-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
1048 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1049 ; X64-AVX2-NEXT: retq
1051 ; X86-AVX512-LABEL: four_or_and:
1052 ; X86-AVX512: ## %bb.0: ## %entry
1053 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
1054 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0 {%k1}
1055 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1056 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1057 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
1058 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
1059 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1060 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1061 ; X86-AVX512-NEXT: retl
1063 ; X64-AVX512-LABEL: four_or_and:
1064 ; X64-AVX512: ## %bb.0: ## %entry
1065 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
1066 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0 {%k1}
1067 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1068 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1069 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
1070 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
1071 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1072 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1073 ; X64-AVX512-NEXT: retq
1075 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
1076 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
1077 %and11 = and <8 x i1> %cmp, %cmp1
1078 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
1079 %cmp5 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
1080 %and712 = and <8 x i1> %cmp3, %cmp5
1081 %or13 = or <8 x i1> %and11, %and712
1082 %or = sext <8 x i1> %or13 to <8 x i32>
1086 define <8 x i32> @five_or_and(<8 x float> %x) {
1087 ; X86-LABEL: five_or_and:
1088 ; X86: ## %bb.0: ## %entry
1089 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1090 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1091 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
1092 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
1093 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1094 ; X86-NEXT: vandps %ymm3, %ymm2, %ymm2
1095 ; X86-NEXT: vorps %ymm1, %ymm2, %ymm1
1096 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
1097 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
1098 ; X86-NEXT: vandps %ymm0, %ymm2, %ymm0
1099 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
1102 ; X64-LABEL: five_or_and:
1103 ; X64: ## %bb.0: ## %entry
1104 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1105 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1106 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
1107 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
1108 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1109 ; X64-NEXT: vandps %ymm3, %ymm2, %ymm2
1110 ; X64-NEXT: vorps %ymm1, %ymm2, %ymm1
1111 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
1112 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1113 ; X64-NEXT: vandps %ymm0, %ymm2, %ymm0
1114 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
1117 ; X86-AVX2-LABEL: five_or_and:
1118 ; X86-AVX2: ## %bb.0: ## %entry
1119 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1120 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1121 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1122 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1123 ; X86-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
1124 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1125 ; X86-AVX2-NEXT: vandps %ymm3, %ymm2, %ymm2
1126 ; X86-AVX2-NEXT: vorps %ymm1, %ymm2, %ymm1
1127 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1128 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1129 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
1130 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
1131 ; X86-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
1132 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1133 ; X86-AVX2-NEXT: retl
1135 ; X64-AVX2-LABEL: five_or_and:
1136 ; X64-AVX2: ## %bb.0: ## %entry
1137 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1138 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1139 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1140 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1141 ; X64-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
1142 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1143 ; X64-AVX2-NEXT: vandps %ymm3, %ymm2, %ymm2
1144 ; X64-AVX2-NEXT: vorps %ymm1, %ymm2, %ymm1
1145 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1146 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1147 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
1148 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
1149 ; X64-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
1150 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1151 ; X64-AVX2-NEXT: retq
1153 ; X86-AVX512-LABEL: five_or_and:
1154 ; X86-AVX512: ## %bb.0: ## %entry
1155 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
1156 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1157 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1158 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
1159 ; X86-AVX512-NEXT: korw %k0, %k1, %k0
1160 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
1161 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
1162 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
1163 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1164 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1165 ; X86-AVX512-NEXT: retl
1167 ; X64-AVX512-LABEL: five_or_and:
1168 ; X64-AVX512: ## %bb.0: ## %entry
1169 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
1170 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1171 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1172 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
1173 ; X64-AVX512-NEXT: korw %k0, %k1, %k0
1174 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
1175 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
1176 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
1177 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1178 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1179 ; X64-AVX512-NEXT: retq
1181 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
1182 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
1183 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
1184 %and15 = and <8 x i1> %cmp1, %cmp3
1185 %or16 = or <8 x i1> %and15, %cmp
1186 %cmp5 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
1187 %cmp7 = fcmp une <8 x float> %x, <float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000>
1188 %and917 = and <8 x i1> %cmp5, %cmp7
1189 %or1018 = or <8 x i1> %or16, %and917
1190 %or10 = sext <8 x i1> %or1018 to <8 x i32>
1194 define <8 x i32> @four_or_and_xor(<8 x float> %x) {
1195 ; X86-LABEL: four_or_and_xor:
1196 ; X86: ## %bb.0: ## %entry
1197 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1198 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1199 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
1200 ; X86-NEXT: vxorps %ymm2, %ymm1, %ymm1
1201 ; X86-NEXT: vxorps %xmm2, %xmm2, %xmm2
1202 ; X86-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1203 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
1204 ; X86-NEXT: vandps %ymm0, %ymm2, %ymm0
1205 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
1208 ; X64-LABEL: four_or_and_xor:
1209 ; X64: ## %bb.0: ## %entry
1210 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1211 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1212 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
1213 ; X64-NEXT: vxorps %ymm2, %ymm1, %ymm1
1214 ; X64-NEXT: vxorps %xmm2, %xmm2, %xmm2
1215 ; X64-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1216 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1217 ; X64-NEXT: vandps %ymm0, %ymm2, %ymm0
1218 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
1221 ; X86-AVX2-LABEL: four_or_and_xor:
1222 ; X86-AVX2: ## %bb.0: ## %entry
1223 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1224 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1225 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1226 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1227 ; X86-AVX2-NEXT: vxorps %ymm2, %ymm1, %ymm1
1228 ; X86-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
1229 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1230 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1231 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
1232 ; X86-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
1233 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1234 ; X86-AVX2-NEXT: retl
1236 ; X64-AVX2-LABEL: four_or_and_xor:
1237 ; X64-AVX2: ## %bb.0: ## %entry
1238 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1239 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1240 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1241 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1242 ; X64-AVX2-NEXT: vxorps %ymm2, %ymm1, %ymm1
1243 ; X64-AVX2-NEXT: vxorps %xmm2, %xmm2, %xmm2
1244 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm2
1245 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1246 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm0
1247 ; X64-AVX2-NEXT: vandps %ymm0, %ymm2, %ymm0
1248 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1249 ; X64-AVX2-NEXT: retq
1251 ; X86-AVX512-LABEL: four_or_and_xor:
1252 ; X86-AVX512: ## %bb.0: ## %entry
1253 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
1254 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
1255 ; X86-AVX512-NEXT: kxorw %k1, %k0, %k0
1256 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1257 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1258 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
1259 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
1260 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1261 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1262 ; X86-AVX512-NEXT: retl
1264 ; X64-AVX512-LABEL: four_or_and_xor:
1265 ; X64-AVX512: ## %bb.0: ## %entry
1266 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
1267 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
1268 ; X64-AVX512-NEXT: kxorw %k1, %k0, %k0
1269 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1270 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1271 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
1272 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
1273 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1274 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1275 ; X64-AVX512-NEXT: retq
1277 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
1278 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
1279 %xor10 = xor <8 x i1> %cmp, %cmp1
1280 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
1281 %cmp5 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
1282 %and11 = and <8 x i1> %cmp3, %cmp5
1283 %or12 = or <8 x i1> %xor10, %and11
1284 %or = sext <8 x i1> %or12 to <8 x i32>
1287 ; Function Attrs: norecurse nounwind readnone ssp uwtable
1288 define <8 x i32> @five_or_and_xor(<8 x float> %x) {
1289 ; X86-LABEL: five_or_and_xor:
1290 ; X86: ## %bb.0: ## %entry
1291 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1292 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1293 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
1294 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
1295 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1296 ; X86-NEXT: vxorps %ymm3, %ymm2, %ymm2
1297 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm3
1298 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
1299 ; X86-NEXT: vandps %ymm0, %ymm3, %ymm0
1300 ; X86-NEXT: vxorps %ymm0, %ymm2, %ymm0
1301 ; X86-NEXT: vorps %ymm1, %ymm0, %ymm0
1304 ; X64-LABEL: five_or_and_xor:
1305 ; X64: ## %bb.0: ## %entry
1306 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1307 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1308 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
1309 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
1310 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1311 ; X64-NEXT: vxorps %ymm3, %ymm2, %ymm2
1312 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm3
1313 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1314 ; X64-NEXT: vandps %ymm0, %ymm3, %ymm0
1315 ; X64-NEXT: vxorps %ymm0, %ymm2, %ymm0
1316 ; X64-NEXT: vorps %ymm1, %ymm0, %ymm0
1319 ; X86-AVX2-LABEL: five_or_and_xor:
1320 ; X86-AVX2: ## %bb.0: ## %entry
1321 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1322 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1323 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1324 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1325 ; X86-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
1326 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1327 ; X86-AVX2-NEXT: vxorps %ymm3, %ymm2, %ymm2
1328 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1329 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1330 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm4 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
1331 ; X86-AVX2-NEXT: vcmpneqps %ymm4, %ymm0, %ymm0
1332 ; X86-AVX2-NEXT: vandps %ymm0, %ymm3, %ymm0
1333 ; X86-AVX2-NEXT: vxorps %ymm0, %ymm2, %ymm0
1334 ; X86-AVX2-NEXT: vorps %ymm1, %ymm0, %ymm0
1335 ; X86-AVX2-NEXT: retl
1337 ; X64-AVX2-LABEL: five_or_and_xor:
1338 ; X64-AVX2: ## %bb.0: ## %entry
1339 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1340 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1341 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1342 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1343 ; X64-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
1344 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1345 ; X64-AVX2-NEXT: vxorps %ymm3, %ymm2, %ymm2
1346 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1347 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1348 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm4 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
1349 ; X64-AVX2-NEXT: vcmpneqps %ymm4, %ymm0, %ymm0
1350 ; X64-AVX2-NEXT: vandps %ymm0, %ymm3, %ymm0
1351 ; X64-AVX2-NEXT: vxorps %ymm0, %ymm2, %ymm0
1352 ; X64-AVX2-NEXT: vorps %ymm1, %ymm0, %ymm0
1353 ; X64-AVX2-NEXT: retq
1355 ; X86-AVX512-LABEL: five_or_and_xor:
1356 ; X86-AVX512: ## %bb.0: ## %entry
1357 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
1358 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
1359 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1360 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k2
1361 ; X86-AVX512-NEXT: kxorw %k2, %k1, %k1
1362 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k2
1363 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k2 {%k2}
1364 ; X86-AVX512-NEXT: kxorw %k2, %k1, %k1
1365 ; X86-AVX512-NEXT: korw %k0, %k1, %k1
1366 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1367 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1368 ; X86-AVX512-NEXT: retl
1370 ; X64-AVX512-LABEL: five_or_and_xor:
1371 ; X64-AVX512: ## %bb.0: ## %entry
1372 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
1373 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
1374 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1375 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k2
1376 ; X64-AVX512-NEXT: kxorw %k2, %k1, %k1
1377 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k2
1378 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k2 {%k2}
1379 ; X64-AVX512-NEXT: kxorw %k2, %k1, %k1
1380 ; X64-AVX512-NEXT: korw %k0, %k1, %k1
1381 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1382 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1383 ; X64-AVX512-NEXT: retq
1385 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
1386 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
1387 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
1388 %xor14 = xor <8 x i1> %cmp1, %cmp3
1389 %cmp5 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
1390 %cmp7 = fcmp une <8 x float> %x, <float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000>
1391 %and15 = and <8 x i1> %cmp5, %cmp7
1392 %xor916 = xor <8 x i1> %xor14, %and15
1393 %or17 = or <8 x i1> %xor916, %cmp
1394 %or = sext <8 x i1> %or17 to <8 x i32>
1397 define <8 x i32> @six_or_and_xor(<8 x float> %x) {
1398 ; X86-LABEL: six_or_and_xor:
1399 ; X86: ## %bb.0: ## %entry
1400 ; X86-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1401 ; X86-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1402 ; X86-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm2
1403 ; X86-NEXT: vxorps %xmm3, %xmm3, %xmm3
1404 ; X86-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1405 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm4
1406 ; X86-NEXT: vandps %ymm4, %ymm3, %ymm3
1407 ; X86-NEXT: vandps %ymm2, %ymm3, %ymm2
1408 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm3
1409 ; X86-NEXT: vxorps %ymm1, %ymm3, %ymm1
1410 ; X86-NEXT: vxorps %ymm2, %ymm1, %ymm1
1411 ; X86-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}, %ymm0, %ymm0
1412 ; X86-NEXT: vorps %ymm0, %ymm1, %ymm0
1415 ; X64-LABEL: six_or_and_xor:
1416 ; X64: ## %bb.0: ## %entry
1417 ; X64-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1418 ; X64-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1419 ; X64-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm2
1420 ; X64-NEXT: vxorps %xmm3, %xmm3, %xmm3
1421 ; X64-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1422 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm4
1423 ; X64-NEXT: vandps %ymm4, %ymm3, %ymm3
1424 ; X64-NEXT: vandps %ymm2, %ymm3, %ymm2
1425 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm3
1426 ; X64-NEXT: vxorps %ymm1, %ymm3, %ymm1
1427 ; X64-NEXT: vxorps %ymm2, %ymm1, %ymm1
1428 ; X64-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %ymm0, %ymm0
1429 ; X64-NEXT: vorps %ymm0, %ymm1, %ymm0
1432 ; X86-AVX2-LABEL: six_or_and_xor:
1433 ; X86-AVX2: ## %bb.0: ## %entry
1434 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1435 ; X86-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1436 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1437 ; X86-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1438 ; X86-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
1439 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1440 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm4 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1441 ; X86-AVX2-NEXT: vcmpneqps %ymm4, %ymm0, %ymm4
1442 ; X86-AVX2-NEXT: vandps %ymm4, %ymm3, %ymm3
1443 ; X86-AVX2-NEXT: vandps %ymm2, %ymm3, %ymm2
1444 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
1445 ; X86-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1446 ; X86-AVX2-NEXT: vxorps %ymm1, %ymm3, %ymm1
1447 ; X86-AVX2-NEXT: vxorps %ymm2, %ymm1, %ymm1
1448 ; X86-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1]
1449 ; X86-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
1450 ; X86-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1451 ; X86-AVX2-NEXT: retl
1453 ; X64-AVX2-LABEL: six_or_and_xor:
1454 ; X64-AVX2: ## %bb.0: ## %entry
1455 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1,-5.0E-1]
1456 ; X64-AVX2-NEXT: vcmpleps %ymm0, %ymm1, %ymm1
1457 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0,1.0E+0]
1458 ; X64-AVX2-NEXT: vcmpltps %ymm2, %ymm0, %ymm2
1459 ; X64-AVX2-NEXT: vxorps %xmm3, %xmm3, %xmm3
1460 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1461 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm4 = [1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1,1.00000001E-1]
1462 ; X64-AVX2-NEXT: vcmpneqps %ymm4, %ymm0, %ymm4
1463 ; X64-AVX2-NEXT: vandps %ymm4, %ymm3, %ymm3
1464 ; X64-AVX2-NEXT: vandps %ymm2, %ymm3, %ymm2
1465 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1,2.00000003E-1]
1466 ; X64-AVX2-NEXT: vcmpneqps %ymm3, %ymm0, %ymm3
1467 ; X64-AVX2-NEXT: vxorps %ymm1, %ymm3, %ymm1
1468 ; X64-AVX2-NEXT: vxorps %ymm2, %ymm1, %ymm1
1469 ; X64-AVX2-NEXT: vbroadcastss {{.*#+}} ymm2 = [4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1,4.00000006E-1]
1470 ; X64-AVX2-NEXT: vcmpneqps %ymm2, %ymm0, %ymm0
1471 ; X64-AVX2-NEXT: vorps %ymm0, %ymm1, %ymm0
1472 ; X64-AVX2-NEXT: retq
1474 ; X86-AVX512-LABEL: six_or_and_xor:
1475 ; X86-AVX512: ## %bb.0: ## %entry
1476 ; X86-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k0
1477 ; X86-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1478 ; X86-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1479 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
1480 ; X86-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1 {%k1}
1481 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k2
1482 ; X86-AVX512-NEXT: kxorw %k0, %k2, %k0
1483 ; X86-AVX512-NEXT: kxorw %k1, %k0, %k0
1484 ; X86-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}{1to8}, %ymm0, %k1
1485 ; X86-AVX512-NEXT: korw %k1, %k0, %k1
1486 ; X86-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1487 ; X86-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1488 ; X86-AVX512-NEXT: retl
1490 ; X64-AVX512-LABEL: six_or_and_xor:
1491 ; X64-AVX512: ## %bb.0: ## %entry
1492 ; X64-AVX512-NEXT: vcmpgeps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k0
1493 ; X64-AVX512-NEXT: vxorps %xmm1, %xmm1, %xmm1
1494 ; X64-AVX512-NEXT: vcmpneqps %ymm1, %ymm0, %k1
1495 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
1496 ; X64-AVX512-NEXT: vcmpltps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1 {%k1}
1497 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k2
1498 ; X64-AVX512-NEXT: kxorw %k0, %k2, %k0
1499 ; X64-AVX512-NEXT: kxorw %k1, %k0, %k0
1500 ; X64-AVX512-NEXT: vcmpneqps {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %ymm0, %k1
1501 ; X64-AVX512-NEXT: korw %k1, %k0, %k1
1502 ; X64-AVX512-NEXT: vpcmpeqd %ymm0, %ymm0, %ymm0
1503 ; X64-AVX512-NEXT: vmovdqa32 %ymm0, %ymm0 {%k1} {z}
1504 ; X64-AVX512-NEXT: retq
1506 %cmp = fcmp oge <8 x float> %x, <float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01, float -5.000000e-01>
1507 %cmp1 = fcmp olt <8 x float> %x, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
1508 %cmp3 = fcmp une <8 x float> %x, zeroinitializer
1509 %and18 = and <8 x i1> %cmp1, %cmp3
1510 %cmp5 = fcmp une <8 x float> %x, <float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000>
1511 %and719 = and <8 x i1> %and18, %cmp5
1512 %cmp8 = fcmp une <8 x float> %x, <float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000>
1513 %xor20 = xor <8 x i1> %cmp8, %cmp
1514 %xor1021 = xor <8 x i1> %xor20, %and719
1515 %cmp11 = fcmp une <8 x float> %x, <float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000, float 0x3FD99999A0000000>
1516 %or22 = or <8 x i1> %xor1021, %cmp11
1517 %or = sext <8 x i1> %or22 to <8 x i32>