1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE2
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=VEX --check-prefix=AVX1
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=VEX --check-prefix=AVX2
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=AVX512 --check-prefix=AVX512F
6 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=AVX512 --check-prefix=AVX512VL
7 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512dq | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=AVX512 --check-prefix=AVX512DQ
8 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512dq,+avx512vl | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=AVX512 --check-prefix=AVX512VLDQ
10 ; 32-bit tests to make sure we're not doing anything stupid.
11 ; RUN: llc < %s -mtriple=i686-unknown-unknown
12 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse
13 ; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2
16 ; Double to Signed Integer
19 define <2 x i64> @fptosi_2f64_to_2i64(<2 x double> %a) {
20 ; SSE-LABEL: fptosi_2f64_to_2i64:
22 ; SSE-NEXT: cvttsd2si %xmm0, %rax
23 ; SSE-NEXT: movq %rax, %xmm1
24 ; SSE-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
25 ; SSE-NEXT: cvttsd2si %xmm0, %rax
26 ; SSE-NEXT: movq %rax, %xmm0
27 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
28 ; SSE-NEXT: movdqa %xmm1, %xmm0
31 ; VEX-LABEL: fptosi_2f64_to_2i64:
33 ; VEX-NEXT: vcvttsd2si %xmm0, %rax
34 ; VEX-NEXT: vmovq %rax, %xmm1
35 ; VEX-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
36 ; VEX-NEXT: vcvttsd2si %xmm0, %rax
37 ; VEX-NEXT: vmovq %rax, %xmm0
38 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
41 ; AVX512F-LABEL: fptosi_2f64_to_2i64:
43 ; AVX512F-NEXT: vcvttsd2si %xmm0, %rax
44 ; AVX512F-NEXT: vmovq %rax, %xmm1
45 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
46 ; AVX512F-NEXT: vcvttsd2si %xmm0, %rax
47 ; AVX512F-NEXT: vmovq %rax, %xmm0
48 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
51 ; AVX512VL-LABEL: fptosi_2f64_to_2i64:
53 ; AVX512VL-NEXT: vcvttsd2si %xmm0, %rax
54 ; AVX512VL-NEXT: vmovq %rax, %xmm1
55 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
56 ; AVX512VL-NEXT: vcvttsd2si %xmm0, %rax
57 ; AVX512VL-NEXT: vmovq %rax, %xmm0
58 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
61 ; AVX512DQ-LABEL: fptosi_2f64_to_2i64:
63 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
64 ; AVX512DQ-NEXT: vcvttpd2qq %zmm0, %zmm0
65 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
66 ; AVX512DQ-NEXT: vzeroupper
69 ; AVX512VLDQ-LABEL: fptosi_2f64_to_2i64:
70 ; AVX512VLDQ: # %bb.0:
71 ; AVX512VLDQ-NEXT: vcvttpd2qq %xmm0, %xmm0
72 ; AVX512VLDQ-NEXT: retq
73 %cvt = fptosi <2 x double> %a to <2 x i64>
77 define <4 x i32> @fptosi_2f64_to_4i32(<2 x double> %a) {
78 ; SSE-LABEL: fptosi_2f64_to_4i32:
80 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
83 ; AVX-LABEL: fptosi_2f64_to_4i32:
85 ; AVX-NEXT: vcvttpd2dq %xmm0, %xmm0
87 %cvt = fptosi <2 x double> %a to <2 x i32>
88 %ext = shufflevector <2 x i32> %cvt, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
92 define <2 x i32> @fptosi_2f64_to_2i32(<2 x double> %a) {
93 ; SSE-LABEL: fptosi_2f64_to_2i32:
95 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
96 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,1,1,3]
99 ; AVX-LABEL: fptosi_2f64_to_2i32:
101 ; AVX-NEXT: vcvttpd2dq %xmm0, %xmm0
102 ; AVX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
104 %cvt = fptosi <2 x double> %a to <2 x i32>
108 define <4 x i32> @fptosi_4f64_to_2i32(<2 x double> %a) {
109 ; SSE-LABEL: fptosi_4f64_to_2i32:
111 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
114 ; AVX-LABEL: fptosi_4f64_to_2i32:
116 ; AVX-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
117 ; AVX-NEXT: vcvttpd2dq %ymm0, %xmm0
118 ; AVX-NEXT: vzeroupper
120 %ext = shufflevector <2 x double> %a, <2 x double> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
121 %cvt = fptosi <4 x double> %ext to <4 x i32>
125 define <4 x i64> @fptosi_4f64_to_4i64(<4 x double> %a) {
126 ; SSE-LABEL: fptosi_4f64_to_4i64:
128 ; SSE-NEXT: cvttsd2si %xmm0, %rax
129 ; SSE-NEXT: movq %rax, %xmm2
130 ; SSE-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
131 ; SSE-NEXT: cvttsd2si %xmm0, %rax
132 ; SSE-NEXT: movq %rax, %xmm0
133 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm0[0]
134 ; SSE-NEXT: cvttsd2si %xmm1, %rax
135 ; SSE-NEXT: movq %rax, %xmm3
136 ; SSE-NEXT: movhlps {{.*#+}} xmm1 = xmm1[1,1]
137 ; SSE-NEXT: cvttsd2si %xmm1, %rax
138 ; SSE-NEXT: movq %rax, %xmm0
139 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm3 = xmm3[0],xmm0[0]
140 ; SSE-NEXT: movdqa %xmm2, %xmm0
141 ; SSE-NEXT: movdqa %xmm3, %xmm1
144 ; AVX1-LABEL: fptosi_4f64_to_4i64:
146 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm1
147 ; AVX1-NEXT: vcvttsd2si %xmm1, %rax
148 ; AVX1-NEXT: vmovq %rax, %xmm2
149 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm1 = xmm1[1,0]
150 ; AVX1-NEXT: vcvttsd2si %xmm1, %rax
151 ; AVX1-NEXT: vmovq %rax, %xmm1
152 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
153 ; AVX1-NEXT: vcvttsd2si %xmm0, %rax
154 ; AVX1-NEXT: vmovq %rax, %xmm2
155 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
156 ; AVX1-NEXT: vcvttsd2si %xmm0, %rax
157 ; AVX1-NEXT: vmovq %rax, %xmm0
158 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
159 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
162 ; AVX2-LABEL: fptosi_4f64_to_4i64:
164 ; AVX2-NEXT: vextractf128 $1, %ymm0, %xmm1
165 ; AVX2-NEXT: vcvttsd2si %xmm1, %rax
166 ; AVX2-NEXT: vmovq %rax, %xmm2
167 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm1 = xmm1[1,0]
168 ; AVX2-NEXT: vcvttsd2si %xmm1, %rax
169 ; AVX2-NEXT: vmovq %rax, %xmm1
170 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
171 ; AVX2-NEXT: vcvttsd2si %xmm0, %rax
172 ; AVX2-NEXT: vmovq %rax, %xmm2
173 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
174 ; AVX2-NEXT: vcvttsd2si %xmm0, %rax
175 ; AVX2-NEXT: vmovq %rax, %xmm0
176 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
177 ; AVX2-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
180 ; AVX512F-LABEL: fptosi_4f64_to_4i64:
182 ; AVX512F-NEXT: vextractf128 $1, %ymm0, %xmm1
183 ; AVX512F-NEXT: vcvttsd2si %xmm1, %rax
184 ; AVX512F-NEXT: vmovq %rax, %xmm2
185 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm1 = xmm1[1,0]
186 ; AVX512F-NEXT: vcvttsd2si %xmm1, %rax
187 ; AVX512F-NEXT: vmovq %rax, %xmm1
188 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
189 ; AVX512F-NEXT: vcvttsd2si %xmm0, %rax
190 ; AVX512F-NEXT: vmovq %rax, %xmm2
191 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
192 ; AVX512F-NEXT: vcvttsd2si %xmm0, %rax
193 ; AVX512F-NEXT: vmovq %rax, %xmm0
194 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
195 ; AVX512F-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
198 ; AVX512VL-LABEL: fptosi_4f64_to_4i64:
200 ; AVX512VL-NEXT: vextractf128 $1, %ymm0, %xmm1
201 ; AVX512VL-NEXT: vcvttsd2si %xmm1, %rax
202 ; AVX512VL-NEXT: vmovq %rax, %xmm2
203 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm1 = xmm1[1,0]
204 ; AVX512VL-NEXT: vcvttsd2si %xmm1, %rax
205 ; AVX512VL-NEXT: vmovq %rax, %xmm1
206 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
207 ; AVX512VL-NEXT: vcvttsd2si %xmm0, %rax
208 ; AVX512VL-NEXT: vmovq %rax, %xmm2
209 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
210 ; AVX512VL-NEXT: vcvttsd2si %xmm0, %rax
211 ; AVX512VL-NEXT: vmovq %rax, %xmm0
212 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
213 ; AVX512VL-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
214 ; AVX512VL-NEXT: retq
216 ; AVX512DQ-LABEL: fptosi_4f64_to_4i64:
218 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
219 ; AVX512DQ-NEXT: vcvttpd2qq %zmm0, %zmm0
220 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
221 ; AVX512DQ-NEXT: retq
223 ; AVX512VLDQ-LABEL: fptosi_4f64_to_4i64:
224 ; AVX512VLDQ: # %bb.0:
225 ; AVX512VLDQ-NEXT: vcvttpd2qq %ymm0, %ymm0
226 ; AVX512VLDQ-NEXT: retq
227 %cvt = fptosi <4 x double> %a to <4 x i64>
231 define <4 x i32> @fptosi_4f64_to_4i32(<4 x double> %a) {
232 ; SSE-LABEL: fptosi_4f64_to_4i32:
234 ; SSE-NEXT: cvttpd2dq %xmm1, %xmm1
235 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
236 ; SSE-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
239 ; AVX-LABEL: fptosi_4f64_to_4i32:
241 ; AVX-NEXT: vcvttpd2dq %ymm0, %xmm0
242 ; AVX-NEXT: vzeroupper
244 %cvt = fptosi <4 x double> %a to <4 x i32>
249 ; Double to Unsigned Integer
252 define <2 x i64> @fptoui_2f64_to_2i64(<2 x double> %a) {
253 ; SSE-LABEL: fptoui_2f64_to_2i64:
255 ; SSE-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
256 ; SSE-NEXT: movapd %xmm0, %xmm1
257 ; SSE-NEXT: subsd %xmm2, %xmm1
258 ; SSE-NEXT: cvttsd2si %xmm1, %rax
259 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
260 ; SSE-NEXT: xorq %rcx, %rax
261 ; SSE-NEXT: cvttsd2si %xmm0, %rdx
262 ; SSE-NEXT: ucomisd %xmm2, %xmm0
263 ; SSE-NEXT: cmovaeq %rax, %rdx
264 ; SSE-NEXT: movq %rdx, %xmm1
265 ; SSE-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1,1]
266 ; SSE-NEXT: movapd %xmm0, %xmm3
267 ; SSE-NEXT: subsd %xmm2, %xmm3
268 ; SSE-NEXT: cvttsd2si %xmm3, %rax
269 ; SSE-NEXT: xorq %rcx, %rax
270 ; SSE-NEXT: cvttsd2si %xmm0, %rcx
271 ; SSE-NEXT: ucomisd %xmm2, %xmm0
272 ; SSE-NEXT: cmovaeq %rax, %rcx
273 ; SSE-NEXT: movq %rcx, %xmm0
274 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
275 ; SSE-NEXT: movdqa %xmm1, %xmm0
278 ; VEX-LABEL: fptoui_2f64_to_2i64:
280 ; VEX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
281 ; VEX-NEXT: vsubsd %xmm1, %xmm0, %xmm2
282 ; VEX-NEXT: vcvttsd2si %xmm2, %rax
283 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
284 ; VEX-NEXT: xorq %rcx, %rax
285 ; VEX-NEXT: vcvttsd2si %xmm0, %rdx
286 ; VEX-NEXT: vucomisd %xmm1, %xmm0
287 ; VEX-NEXT: cmovaeq %rax, %rdx
288 ; VEX-NEXT: vmovq %rdx, %xmm2
289 ; VEX-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
290 ; VEX-NEXT: vsubsd %xmm1, %xmm0, %xmm3
291 ; VEX-NEXT: vcvttsd2si %xmm3, %rax
292 ; VEX-NEXT: xorq %rcx, %rax
293 ; VEX-NEXT: vcvttsd2si %xmm0, %rcx
294 ; VEX-NEXT: vucomisd %xmm1, %xmm0
295 ; VEX-NEXT: cmovaeq %rax, %rcx
296 ; VEX-NEXT: vmovq %rcx, %xmm0
297 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
300 ; AVX512F-LABEL: fptoui_2f64_to_2i64:
302 ; AVX512F-NEXT: vcvttsd2usi %xmm0, %rax
303 ; AVX512F-NEXT: vmovq %rax, %xmm1
304 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
305 ; AVX512F-NEXT: vcvttsd2usi %xmm0, %rax
306 ; AVX512F-NEXT: vmovq %rax, %xmm0
307 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
310 ; AVX512VL-LABEL: fptoui_2f64_to_2i64:
312 ; AVX512VL-NEXT: vcvttsd2usi %xmm0, %rax
313 ; AVX512VL-NEXT: vmovq %rax, %xmm1
314 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
315 ; AVX512VL-NEXT: vcvttsd2usi %xmm0, %rax
316 ; AVX512VL-NEXT: vmovq %rax, %xmm0
317 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
318 ; AVX512VL-NEXT: retq
320 ; AVX512DQ-LABEL: fptoui_2f64_to_2i64:
322 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
323 ; AVX512DQ-NEXT: vcvttpd2uqq %zmm0, %zmm0
324 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
325 ; AVX512DQ-NEXT: vzeroupper
326 ; AVX512DQ-NEXT: retq
328 ; AVX512VLDQ-LABEL: fptoui_2f64_to_2i64:
329 ; AVX512VLDQ: # %bb.0:
330 ; AVX512VLDQ-NEXT: vcvttpd2uqq %xmm0, %xmm0
331 ; AVX512VLDQ-NEXT: retq
332 %cvt = fptoui <2 x double> %a to <2 x i64>
336 define <4 x i32> @fptoui_2f64_to_4i32(<2 x double> %a) {
337 ; SSE-LABEL: fptoui_2f64_to_4i32:
339 ; SSE-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
340 ; SSE-NEXT: movapd %xmm0, %xmm1
341 ; SSE-NEXT: subsd %xmm2, %xmm1
342 ; SSE-NEXT: cvttsd2si %xmm1, %rax
343 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
344 ; SSE-NEXT: xorq %rcx, %rax
345 ; SSE-NEXT: cvttsd2si %xmm0, %rdx
346 ; SSE-NEXT: ucomisd %xmm2, %xmm0
347 ; SSE-NEXT: cmovaeq %rax, %rdx
348 ; SSE-NEXT: movq %rdx, %xmm1
349 ; SSE-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1,1]
350 ; SSE-NEXT: movapd %xmm0, %xmm3
351 ; SSE-NEXT: subsd %xmm2, %xmm3
352 ; SSE-NEXT: cvttsd2si %xmm3, %rax
353 ; SSE-NEXT: xorq %rcx, %rax
354 ; SSE-NEXT: cvttsd2si %xmm0, %rcx
355 ; SSE-NEXT: ucomisd %xmm2, %xmm0
356 ; SSE-NEXT: cmovaeq %rax, %rcx
357 ; SSE-NEXT: movq %rcx, %xmm0
358 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
359 ; SSE-NEXT: pxor %xmm0, %xmm0
360 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,2],xmm0[2,3]
361 ; SSE-NEXT: movaps %xmm1, %xmm0
364 ; VEX-LABEL: fptoui_2f64_to_4i32:
366 ; VEX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
367 ; VEX-NEXT: vsubsd %xmm1, %xmm0, %xmm2
368 ; VEX-NEXT: vcvttsd2si %xmm2, %rax
369 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
370 ; VEX-NEXT: xorq %rcx, %rax
371 ; VEX-NEXT: vcvttsd2si %xmm0, %rdx
372 ; VEX-NEXT: vucomisd %xmm1, %xmm0
373 ; VEX-NEXT: cmovaeq %rax, %rdx
374 ; VEX-NEXT: vmovq %rdx, %xmm2
375 ; VEX-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
376 ; VEX-NEXT: vsubsd %xmm1, %xmm0, %xmm3
377 ; VEX-NEXT: vcvttsd2si %xmm3, %rax
378 ; VEX-NEXT: xorq %rcx, %rax
379 ; VEX-NEXT: vcvttsd2si %xmm0, %rcx
380 ; VEX-NEXT: vucomisd %xmm1, %xmm0
381 ; VEX-NEXT: cmovaeq %rax, %rcx
382 ; VEX-NEXT: vmovq %rcx, %xmm0
383 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
384 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero
387 ; AVX512F-LABEL: fptoui_2f64_to_4i32:
389 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
390 ; AVX512F-NEXT: vcvttpd2udq %zmm0, %ymm0
391 ; AVX512F-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
392 ; AVX512F-NEXT: vzeroupper
395 ; AVX512VL-LABEL: fptoui_2f64_to_4i32:
397 ; AVX512VL-NEXT: vcvttpd2udq %xmm0, %xmm0
398 ; AVX512VL-NEXT: retq
400 ; AVX512DQ-LABEL: fptoui_2f64_to_4i32:
402 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
403 ; AVX512DQ-NEXT: vcvttpd2udq %zmm0, %ymm0
404 ; AVX512DQ-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
405 ; AVX512DQ-NEXT: vzeroupper
406 ; AVX512DQ-NEXT: retq
408 ; AVX512VLDQ-LABEL: fptoui_2f64_to_4i32:
409 ; AVX512VLDQ: # %bb.0:
410 ; AVX512VLDQ-NEXT: vcvttpd2udq %xmm0, %xmm0
411 ; AVX512VLDQ-NEXT: retq
412 %cvt = fptoui <2 x double> %a to <2 x i32>
413 %ext = shufflevector <2 x i32> %cvt, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
417 define <4 x i32> @fptoui_2f64_to_2i32(<2 x double> %a) {
418 ; SSE-LABEL: fptoui_2f64_to_2i32:
420 ; SSE-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
421 ; SSE-NEXT: movapd %xmm0, %xmm2
422 ; SSE-NEXT: subsd %xmm1, %xmm2
423 ; SSE-NEXT: cvttsd2si %xmm2, %rax
424 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
425 ; SSE-NEXT: xorq %rcx, %rax
426 ; SSE-NEXT: cvttsd2si %xmm0, %rdx
427 ; SSE-NEXT: ucomisd %xmm1, %xmm0
428 ; SSE-NEXT: cmovaeq %rax, %rdx
429 ; SSE-NEXT: movq %rdx, %xmm2
430 ; SSE-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1,1]
431 ; SSE-NEXT: movapd %xmm0, %xmm3
432 ; SSE-NEXT: subsd %xmm1, %xmm3
433 ; SSE-NEXT: cvttsd2si %xmm3, %rax
434 ; SSE-NEXT: xorq %rcx, %rax
435 ; SSE-NEXT: cvttsd2si %xmm0, %rcx
436 ; SSE-NEXT: ucomisd %xmm1, %xmm0
437 ; SSE-NEXT: cmovaeq %rax, %rcx
438 ; SSE-NEXT: movq %rcx, %xmm0
439 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm0[0]
440 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm2[0,2,2,3]
443 ; VEX-LABEL: fptoui_2f64_to_2i32:
445 ; VEX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
446 ; VEX-NEXT: vsubsd %xmm1, %xmm0, %xmm2
447 ; VEX-NEXT: vcvttsd2si %xmm2, %rax
448 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
449 ; VEX-NEXT: xorq %rcx, %rax
450 ; VEX-NEXT: vcvttsd2si %xmm0, %rdx
451 ; VEX-NEXT: vucomisd %xmm1, %xmm0
452 ; VEX-NEXT: cmovaeq %rax, %rdx
453 ; VEX-NEXT: vmovq %rdx, %xmm2
454 ; VEX-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
455 ; VEX-NEXT: vsubsd %xmm1, %xmm0, %xmm3
456 ; VEX-NEXT: vcvttsd2si %xmm3, %rax
457 ; VEX-NEXT: xorq %rcx, %rax
458 ; VEX-NEXT: vcvttsd2si %xmm0, %rcx
459 ; VEX-NEXT: vucomisd %xmm1, %xmm0
460 ; VEX-NEXT: cmovaeq %rax, %rcx
461 ; VEX-NEXT: vmovq %rcx, %xmm0
462 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
463 ; VEX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
466 ; AVX512F-LABEL: fptoui_2f64_to_2i32:
468 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
469 ; AVX512F-NEXT: vcvttpd2udq %zmm0, %ymm0
470 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
471 ; AVX512F-NEXT: vzeroupper
474 ; AVX512VL-LABEL: fptoui_2f64_to_2i32:
476 ; AVX512VL-NEXT: vcvttpd2udq %xmm0, %xmm0
477 ; AVX512VL-NEXT: retq
479 ; AVX512DQ-LABEL: fptoui_2f64_to_2i32:
481 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
482 ; AVX512DQ-NEXT: vcvttpd2udq %zmm0, %ymm0
483 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
484 ; AVX512DQ-NEXT: vzeroupper
485 ; AVX512DQ-NEXT: retq
487 ; AVX512VLDQ-LABEL: fptoui_2f64_to_2i32:
488 ; AVX512VLDQ: # %bb.0:
489 ; AVX512VLDQ-NEXT: vcvttpd2udq %xmm0, %xmm0
490 ; AVX512VLDQ-NEXT: retq
491 %cvt = fptoui <2 x double> %a to <2 x i32>
492 %ext = shufflevector <2 x i32> %cvt, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
496 define <4 x i32> @fptoui_4f64_to_2i32(<2 x double> %a) {
497 ; SSE-LABEL: fptoui_4f64_to_2i32:
499 ; SSE-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
500 ; SSE-NEXT: movapd %xmm0, %xmm1
501 ; SSE-NEXT: subsd %xmm2, %xmm1
502 ; SSE-NEXT: cvttsd2si %xmm1, %rax
503 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
504 ; SSE-NEXT: xorq %rcx, %rax
505 ; SSE-NEXT: cvttsd2si %xmm0, %rdx
506 ; SSE-NEXT: ucomisd %xmm2, %xmm0
507 ; SSE-NEXT: cmovaeq %rax, %rdx
508 ; SSE-NEXT: movq %rdx, %xmm1
509 ; SSE-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1,1]
510 ; SSE-NEXT: movapd %xmm0, %xmm3
511 ; SSE-NEXT: subsd %xmm2, %xmm3
512 ; SSE-NEXT: cvttsd2si %xmm3, %rax
513 ; SSE-NEXT: xorq %rcx, %rax
514 ; SSE-NEXT: cvttsd2si %xmm0, %rcx
515 ; SSE-NEXT: ucomisd %xmm2, %xmm0
516 ; SSE-NEXT: cmovaeq %rax, %rcx
517 ; SSE-NEXT: movq %rcx, %xmm0
518 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
519 ; SSE-NEXT: pxor %xmm0, %xmm0
520 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,2],xmm0[2,3]
521 ; SSE-NEXT: movaps %xmm1, %xmm0
524 ; AVX1-LABEL: fptoui_4f64_to_2i32:
526 ; AVX1-NEXT: vmovapd %xmm0, %xmm0
527 ; AVX1-NEXT: vmovapd {{.*#+}} ymm1 = [2.147483648E+9,2.147483648E+9,2.147483648E+9,2.147483648E+9]
528 ; AVX1-NEXT: vcmpltpd %ymm1, %ymm0, %ymm2
529 ; AVX1-NEXT: vextractf128 $1, %ymm2, %xmm3
530 ; AVX1-NEXT: vpackssdw %xmm3, %xmm2, %xmm2
531 ; AVX1-NEXT: vsubpd %ymm1, %ymm0, %ymm1
532 ; AVX1-NEXT: vcvttpd2dq %ymm1, %xmm1
533 ; AVX1-NEXT: vxorpd {{.*}}(%rip), %xmm1, %xmm1
534 ; AVX1-NEXT: vcvttpd2dq %ymm0, %xmm0
535 ; AVX1-NEXT: vblendvps %xmm2, %xmm0, %xmm1, %xmm0
536 ; AVX1-NEXT: vzeroupper
539 ; AVX2-LABEL: fptoui_4f64_to_2i32:
541 ; AVX2-NEXT: vmovapd %xmm0, %xmm0
542 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm1 = [2.147483648E+9,2.147483648E+9,2.147483648E+9,2.147483648E+9]
543 ; AVX2-NEXT: vcmpltpd %ymm1, %ymm0, %ymm2
544 ; AVX2-NEXT: vextractf128 $1, %ymm2, %xmm3
545 ; AVX2-NEXT: vpackssdw %xmm3, %xmm2, %xmm2
546 ; AVX2-NEXT: vsubpd %ymm1, %ymm0, %ymm1
547 ; AVX2-NEXT: vcvttpd2dq %ymm1, %xmm1
548 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm3 = [2147483648,2147483648,2147483648,2147483648]
549 ; AVX2-NEXT: vxorpd %xmm3, %xmm1, %xmm1
550 ; AVX2-NEXT: vcvttpd2dq %ymm0, %xmm0
551 ; AVX2-NEXT: vblendvps %xmm2, %xmm0, %xmm1, %xmm0
552 ; AVX2-NEXT: vzeroupper
555 ; AVX512F-LABEL: fptoui_4f64_to_2i32:
557 ; AVX512F-NEXT: vmovaps %xmm0, %xmm0
558 ; AVX512F-NEXT: vcvttpd2udq %zmm0, %ymm0
559 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
560 ; AVX512F-NEXT: vzeroupper
563 ; AVX512VL-LABEL: fptoui_4f64_to_2i32:
565 ; AVX512VL-NEXT: vmovaps %xmm0, %xmm0
566 ; AVX512VL-NEXT: vcvttpd2udq %ymm0, %xmm0
567 ; AVX512VL-NEXT: vzeroupper
568 ; AVX512VL-NEXT: retq
570 ; AVX512DQ-LABEL: fptoui_4f64_to_2i32:
572 ; AVX512DQ-NEXT: vmovaps %xmm0, %xmm0
573 ; AVX512DQ-NEXT: vcvttpd2udq %zmm0, %ymm0
574 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
575 ; AVX512DQ-NEXT: vzeroupper
576 ; AVX512DQ-NEXT: retq
578 ; AVX512VLDQ-LABEL: fptoui_4f64_to_2i32:
579 ; AVX512VLDQ: # %bb.0:
580 ; AVX512VLDQ-NEXT: vmovaps %xmm0, %xmm0
581 ; AVX512VLDQ-NEXT: vcvttpd2udq %ymm0, %xmm0
582 ; AVX512VLDQ-NEXT: vzeroupper
583 ; AVX512VLDQ-NEXT: retq
584 %ext = shufflevector <2 x double> %a, <2 x double> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
585 %cvt = fptoui <4 x double> %ext to <4 x i32>
589 define <4 x i64> @fptoui_4f64_to_4i64(<4 x double> %a) {
590 ; SSE-LABEL: fptoui_4f64_to_4i64:
592 ; SSE-NEXT: movapd %xmm0, %xmm2
593 ; SSE-NEXT: movsd {{.*#+}} xmm3 = mem[0],zero
594 ; SSE-NEXT: subsd %xmm3, %xmm0
595 ; SSE-NEXT: cvttsd2si %xmm0, %rcx
596 ; SSE-NEXT: movabsq $-9223372036854775808, %rax # imm = 0x8000000000000000
597 ; SSE-NEXT: xorq %rax, %rcx
598 ; SSE-NEXT: cvttsd2si %xmm2, %rdx
599 ; SSE-NEXT: ucomisd %xmm3, %xmm2
600 ; SSE-NEXT: cmovaeq %rcx, %rdx
601 ; SSE-NEXT: movq %rdx, %xmm0
602 ; SSE-NEXT: unpckhpd {{.*#+}} xmm2 = xmm2[1,1]
603 ; SSE-NEXT: movapd %xmm2, %xmm4
604 ; SSE-NEXT: subsd %xmm3, %xmm4
605 ; SSE-NEXT: cvttsd2si %xmm4, %rcx
606 ; SSE-NEXT: xorq %rax, %rcx
607 ; SSE-NEXT: cvttsd2si %xmm2, %rdx
608 ; SSE-NEXT: ucomisd %xmm3, %xmm2
609 ; SSE-NEXT: cmovaeq %rcx, %rdx
610 ; SSE-NEXT: movq %rdx, %xmm2
611 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm2[0]
612 ; SSE-NEXT: movapd %xmm1, %xmm2
613 ; SSE-NEXT: subsd %xmm3, %xmm2
614 ; SSE-NEXT: cvttsd2si %xmm2, %rcx
615 ; SSE-NEXT: xorq %rax, %rcx
616 ; SSE-NEXT: cvttsd2si %xmm1, %rdx
617 ; SSE-NEXT: ucomisd %xmm3, %xmm1
618 ; SSE-NEXT: cmovaeq %rcx, %rdx
619 ; SSE-NEXT: movq %rdx, %xmm2
620 ; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1,1]
621 ; SSE-NEXT: movapd %xmm1, %xmm4
622 ; SSE-NEXT: subsd %xmm3, %xmm4
623 ; SSE-NEXT: cvttsd2si %xmm4, %rcx
624 ; SSE-NEXT: xorq %rax, %rcx
625 ; SSE-NEXT: cvttsd2si %xmm1, %rax
626 ; SSE-NEXT: ucomisd %xmm3, %xmm1
627 ; SSE-NEXT: cmovaeq %rcx, %rax
628 ; SSE-NEXT: movq %rax, %xmm1
629 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm1[0]
630 ; SSE-NEXT: movdqa %xmm2, %xmm1
633 ; AVX1-LABEL: fptoui_4f64_to_4i64:
635 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
636 ; AVX1-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
637 ; AVX1-NEXT: vsubsd %xmm1, %xmm2, %xmm3
638 ; AVX1-NEXT: vcvttsd2si %xmm3, %rax
639 ; AVX1-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
640 ; AVX1-NEXT: xorq %rcx, %rax
641 ; AVX1-NEXT: vcvttsd2si %xmm2, %rdx
642 ; AVX1-NEXT: vucomisd %xmm1, %xmm2
643 ; AVX1-NEXT: cmovaeq %rax, %rdx
644 ; AVX1-NEXT: vmovq %rdx, %xmm3
645 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm2 = xmm2[1,0]
646 ; AVX1-NEXT: vsubsd %xmm1, %xmm2, %xmm4
647 ; AVX1-NEXT: vcvttsd2si %xmm4, %rax
648 ; AVX1-NEXT: xorq %rcx, %rax
649 ; AVX1-NEXT: vcvttsd2si %xmm2, %rdx
650 ; AVX1-NEXT: vucomisd %xmm1, %xmm2
651 ; AVX1-NEXT: cmovaeq %rax, %rdx
652 ; AVX1-NEXT: vmovq %rdx, %xmm2
653 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
654 ; AVX1-NEXT: vsubsd %xmm1, %xmm0, %xmm3
655 ; AVX1-NEXT: vcvttsd2si %xmm3, %rax
656 ; AVX1-NEXT: xorq %rcx, %rax
657 ; AVX1-NEXT: vcvttsd2si %xmm0, %rdx
658 ; AVX1-NEXT: vucomisd %xmm1, %xmm0
659 ; AVX1-NEXT: cmovaeq %rax, %rdx
660 ; AVX1-NEXT: vmovq %rdx, %xmm3
661 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
662 ; AVX1-NEXT: vsubsd %xmm1, %xmm0, %xmm4
663 ; AVX1-NEXT: vcvttsd2si %xmm4, %rax
664 ; AVX1-NEXT: xorq %rcx, %rax
665 ; AVX1-NEXT: vcvttsd2si %xmm0, %rcx
666 ; AVX1-NEXT: vucomisd %xmm1, %xmm0
667 ; AVX1-NEXT: cmovaeq %rax, %rcx
668 ; AVX1-NEXT: vmovq %rcx, %xmm0
669 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0]
670 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
673 ; AVX2-LABEL: fptoui_4f64_to_4i64:
675 ; AVX2-NEXT: vextractf128 $1, %ymm0, %xmm2
676 ; AVX2-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
677 ; AVX2-NEXT: vsubsd %xmm1, %xmm2, %xmm3
678 ; AVX2-NEXT: vcvttsd2si %xmm3, %rax
679 ; AVX2-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
680 ; AVX2-NEXT: xorq %rcx, %rax
681 ; AVX2-NEXT: vcvttsd2si %xmm2, %rdx
682 ; AVX2-NEXT: vucomisd %xmm1, %xmm2
683 ; AVX2-NEXT: cmovaeq %rax, %rdx
684 ; AVX2-NEXT: vmovq %rdx, %xmm3
685 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm2 = xmm2[1,0]
686 ; AVX2-NEXT: vsubsd %xmm1, %xmm2, %xmm4
687 ; AVX2-NEXT: vcvttsd2si %xmm4, %rax
688 ; AVX2-NEXT: xorq %rcx, %rax
689 ; AVX2-NEXT: vcvttsd2si %xmm2, %rdx
690 ; AVX2-NEXT: vucomisd %xmm1, %xmm2
691 ; AVX2-NEXT: cmovaeq %rax, %rdx
692 ; AVX2-NEXT: vmovq %rdx, %xmm2
693 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
694 ; AVX2-NEXT: vsubsd %xmm1, %xmm0, %xmm3
695 ; AVX2-NEXT: vcvttsd2si %xmm3, %rax
696 ; AVX2-NEXT: xorq %rcx, %rax
697 ; AVX2-NEXT: vcvttsd2si %xmm0, %rdx
698 ; AVX2-NEXT: vucomisd %xmm1, %xmm0
699 ; AVX2-NEXT: cmovaeq %rax, %rdx
700 ; AVX2-NEXT: vmovq %rdx, %xmm3
701 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
702 ; AVX2-NEXT: vsubsd %xmm1, %xmm0, %xmm4
703 ; AVX2-NEXT: vcvttsd2si %xmm4, %rax
704 ; AVX2-NEXT: xorq %rcx, %rax
705 ; AVX2-NEXT: vcvttsd2si %xmm0, %rcx
706 ; AVX2-NEXT: vucomisd %xmm1, %xmm0
707 ; AVX2-NEXT: cmovaeq %rax, %rcx
708 ; AVX2-NEXT: vmovq %rcx, %xmm0
709 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0]
710 ; AVX2-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm0
713 ; AVX512F-LABEL: fptoui_4f64_to_4i64:
715 ; AVX512F-NEXT: vextractf128 $1, %ymm0, %xmm1
716 ; AVX512F-NEXT: vcvttsd2usi %xmm1, %rax
717 ; AVX512F-NEXT: vmovq %rax, %xmm2
718 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm1 = xmm1[1,0]
719 ; AVX512F-NEXT: vcvttsd2usi %xmm1, %rax
720 ; AVX512F-NEXT: vmovq %rax, %xmm1
721 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
722 ; AVX512F-NEXT: vcvttsd2usi %xmm0, %rax
723 ; AVX512F-NEXT: vmovq %rax, %xmm2
724 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
725 ; AVX512F-NEXT: vcvttsd2usi %xmm0, %rax
726 ; AVX512F-NEXT: vmovq %rax, %xmm0
727 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
728 ; AVX512F-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
731 ; AVX512VL-LABEL: fptoui_4f64_to_4i64:
733 ; AVX512VL-NEXT: vextractf128 $1, %ymm0, %xmm1
734 ; AVX512VL-NEXT: vcvttsd2usi %xmm1, %rax
735 ; AVX512VL-NEXT: vmovq %rax, %xmm2
736 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm1 = xmm1[1,0]
737 ; AVX512VL-NEXT: vcvttsd2usi %xmm1, %rax
738 ; AVX512VL-NEXT: vmovq %rax, %xmm1
739 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
740 ; AVX512VL-NEXT: vcvttsd2usi %xmm0, %rax
741 ; AVX512VL-NEXT: vmovq %rax, %xmm2
742 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm0 = xmm0[1,0]
743 ; AVX512VL-NEXT: vcvttsd2usi %xmm0, %rax
744 ; AVX512VL-NEXT: vmovq %rax, %xmm0
745 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
746 ; AVX512VL-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
747 ; AVX512VL-NEXT: retq
749 ; AVX512DQ-LABEL: fptoui_4f64_to_4i64:
751 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
752 ; AVX512DQ-NEXT: vcvttpd2uqq %zmm0, %zmm0
753 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
754 ; AVX512DQ-NEXT: retq
756 ; AVX512VLDQ-LABEL: fptoui_4f64_to_4i64:
757 ; AVX512VLDQ: # %bb.0:
758 ; AVX512VLDQ-NEXT: vcvttpd2uqq %ymm0, %ymm0
759 ; AVX512VLDQ-NEXT: retq
760 %cvt = fptoui <4 x double> %a to <4 x i64>
764 define <4 x i32> @fptoui_4f64_to_4i32(<4 x double> %a) {
765 ; SSE-LABEL: fptoui_4f64_to_4i32:
767 ; SSE-NEXT: movsd {{.*#+}} xmm2 = mem[0],zero
768 ; SSE-NEXT: movapd %xmm1, %xmm3
769 ; SSE-NEXT: subsd %xmm2, %xmm3
770 ; SSE-NEXT: cvttsd2si %xmm3, %rcx
771 ; SSE-NEXT: movabsq $-9223372036854775808, %rax # imm = 0x8000000000000000
772 ; SSE-NEXT: xorq %rax, %rcx
773 ; SSE-NEXT: cvttsd2si %xmm1, %rdx
774 ; SSE-NEXT: ucomisd %xmm2, %xmm1
775 ; SSE-NEXT: cmovaeq %rcx, %rdx
776 ; SSE-NEXT: movq %rdx, %xmm3
777 ; SSE-NEXT: unpckhpd {{.*#+}} xmm1 = xmm1[1,1]
778 ; SSE-NEXT: movapd %xmm1, %xmm4
779 ; SSE-NEXT: subsd %xmm2, %xmm4
780 ; SSE-NEXT: cvttsd2si %xmm4, %rcx
781 ; SSE-NEXT: xorq %rax, %rcx
782 ; SSE-NEXT: cvttsd2si %xmm1, %rdx
783 ; SSE-NEXT: ucomisd %xmm2, %xmm1
784 ; SSE-NEXT: cmovaeq %rcx, %rdx
785 ; SSE-NEXT: movq %rdx, %xmm1
786 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm3 = xmm3[0],xmm1[0]
787 ; SSE-NEXT: movapd %xmm0, %xmm1
788 ; SSE-NEXT: subsd %xmm2, %xmm1
789 ; SSE-NEXT: cvttsd2si %xmm1, %rcx
790 ; SSE-NEXT: xorq %rax, %rcx
791 ; SSE-NEXT: cvttsd2si %xmm0, %rdx
792 ; SSE-NEXT: ucomisd %xmm2, %xmm0
793 ; SSE-NEXT: cmovaeq %rcx, %rdx
794 ; SSE-NEXT: movq %rdx, %xmm1
795 ; SSE-NEXT: unpckhpd {{.*#+}} xmm0 = xmm0[1,1]
796 ; SSE-NEXT: movapd %xmm0, %xmm4
797 ; SSE-NEXT: subsd %xmm2, %xmm4
798 ; SSE-NEXT: cvttsd2si %xmm4, %rcx
799 ; SSE-NEXT: xorq %rax, %rcx
800 ; SSE-NEXT: cvttsd2si %xmm0, %rax
801 ; SSE-NEXT: ucomisd %xmm2, %xmm0
802 ; SSE-NEXT: cmovaeq %rcx, %rax
803 ; SSE-NEXT: movq %rax, %xmm0
804 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
805 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[0,2],xmm3[0,2]
806 ; SSE-NEXT: movaps %xmm1, %xmm0
809 ; AVX1-LABEL: fptoui_4f64_to_4i32:
811 ; AVX1-NEXT: vmovapd {{.*#+}} ymm1 = [2.147483648E+9,2.147483648E+9,2.147483648E+9,2.147483648E+9]
812 ; AVX1-NEXT: vcmpltpd %ymm1, %ymm0, %ymm2
813 ; AVX1-NEXT: vextractf128 $1, %ymm2, %xmm3
814 ; AVX1-NEXT: vpackssdw %xmm3, %xmm2, %xmm2
815 ; AVX1-NEXT: vsubpd %ymm1, %ymm0, %ymm1
816 ; AVX1-NEXT: vcvttpd2dq %ymm1, %xmm1
817 ; AVX1-NEXT: vxorpd {{.*}}(%rip), %xmm1, %xmm1
818 ; AVX1-NEXT: vcvttpd2dq %ymm0, %xmm0
819 ; AVX1-NEXT: vblendvps %xmm2, %xmm0, %xmm1, %xmm0
820 ; AVX1-NEXT: vzeroupper
823 ; AVX2-LABEL: fptoui_4f64_to_4i32:
825 ; AVX2-NEXT: vbroadcastsd {{.*#+}} ymm1 = [2.147483648E+9,2.147483648E+9,2.147483648E+9,2.147483648E+9]
826 ; AVX2-NEXT: vcmpltpd %ymm1, %ymm0, %ymm2
827 ; AVX2-NEXT: vextractf128 $1, %ymm2, %xmm3
828 ; AVX2-NEXT: vpackssdw %xmm3, %xmm2, %xmm2
829 ; AVX2-NEXT: vsubpd %ymm1, %ymm0, %ymm1
830 ; AVX2-NEXT: vcvttpd2dq %ymm1, %xmm1
831 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm3 = [2147483648,2147483648,2147483648,2147483648]
832 ; AVX2-NEXT: vxorpd %xmm3, %xmm1, %xmm1
833 ; AVX2-NEXT: vcvttpd2dq %ymm0, %xmm0
834 ; AVX2-NEXT: vblendvps %xmm2, %xmm0, %xmm1, %xmm0
835 ; AVX2-NEXT: vzeroupper
838 ; AVX512F-LABEL: fptoui_4f64_to_4i32:
840 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
841 ; AVX512F-NEXT: vcvttpd2udq %zmm0, %ymm0
842 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
843 ; AVX512F-NEXT: vzeroupper
846 ; AVX512VL-LABEL: fptoui_4f64_to_4i32:
848 ; AVX512VL-NEXT: vcvttpd2udq %ymm0, %xmm0
849 ; AVX512VL-NEXT: vzeroupper
850 ; AVX512VL-NEXT: retq
852 ; AVX512DQ-LABEL: fptoui_4f64_to_4i32:
854 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
855 ; AVX512DQ-NEXT: vcvttpd2udq %zmm0, %ymm0
856 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
857 ; AVX512DQ-NEXT: vzeroupper
858 ; AVX512DQ-NEXT: retq
860 ; AVX512VLDQ-LABEL: fptoui_4f64_to_4i32:
861 ; AVX512VLDQ: # %bb.0:
862 ; AVX512VLDQ-NEXT: vcvttpd2udq %ymm0, %xmm0
863 ; AVX512VLDQ-NEXT: vzeroupper
864 ; AVX512VLDQ-NEXT: retq
865 %cvt = fptoui <4 x double> %a to <4 x i32>
870 ; Float to Signed Integer
873 define <2 x i32> @fptosi_2f32_to_2i32(<2 x float> %a) {
874 ; SSE-LABEL: fptosi_2f32_to_2i32:
876 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
877 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,1,1,3]
880 ; AVX-LABEL: fptosi_2f32_to_2i32:
882 ; AVX-NEXT: vcvttps2dq %xmm0, %xmm0
883 ; AVX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
885 %cvt = fptosi <2 x float> %a to <2 x i32>
889 define <4 x i32> @fptosi_4f32_to_4i32(<4 x float> %a) {
890 ; SSE-LABEL: fptosi_4f32_to_4i32:
892 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
895 ; AVX-LABEL: fptosi_4f32_to_4i32:
897 ; AVX-NEXT: vcvttps2dq %xmm0, %xmm0
899 %cvt = fptosi <4 x float> %a to <4 x i32>
903 define <2 x i64> @fptosi_2f32_to_2i64(<4 x float> %a) {
904 ; SSE-LABEL: fptosi_2f32_to_2i64:
906 ; SSE-NEXT: cvttss2si %xmm0, %rax
907 ; SSE-NEXT: movq %rax, %xmm1
908 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,2,3]
909 ; SSE-NEXT: cvttss2si %xmm0, %rax
910 ; SSE-NEXT: movq %rax, %xmm0
911 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
912 ; SSE-NEXT: movdqa %xmm1, %xmm0
915 ; VEX-LABEL: fptosi_2f32_to_2i64:
917 ; VEX-NEXT: vcvttss2si %xmm0, %rax
918 ; VEX-NEXT: vmovq %rax, %xmm1
919 ; VEX-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
920 ; VEX-NEXT: vcvttss2si %xmm0, %rax
921 ; VEX-NEXT: vmovq %rax, %xmm0
922 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
925 ; AVX512F-LABEL: fptosi_2f32_to_2i64:
927 ; AVX512F-NEXT: vcvttss2si %xmm0, %rax
928 ; AVX512F-NEXT: vmovq %rax, %xmm1
929 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
930 ; AVX512F-NEXT: vcvttss2si %xmm0, %rax
931 ; AVX512F-NEXT: vmovq %rax, %xmm0
932 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
935 ; AVX512VL-LABEL: fptosi_2f32_to_2i64:
937 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rax
938 ; AVX512VL-NEXT: vmovq %rax, %xmm1
939 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
940 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rax
941 ; AVX512VL-NEXT: vmovq %rax, %xmm0
942 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
943 ; AVX512VL-NEXT: retq
945 ; AVX512DQ-LABEL: fptosi_2f32_to_2i64:
947 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
948 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
949 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
950 ; AVX512DQ-NEXT: vzeroupper
951 ; AVX512DQ-NEXT: retq
953 ; AVX512VLDQ-LABEL: fptosi_2f32_to_2i64:
954 ; AVX512VLDQ: # %bb.0:
955 ; AVX512VLDQ-NEXT: vcvttps2qq %xmm0, %xmm0
956 ; AVX512VLDQ-NEXT: retq
957 %shuf = shufflevector <4 x float> %a, <4 x float> undef, <2 x i32> <i32 0, i32 1>
958 %cvt = fptosi <2 x float> %shuf to <2 x i64>
962 define <2 x i64> @fptosi_4f32_to_2i64(<4 x float> %a) {
963 ; SSE-LABEL: fptosi_4f32_to_2i64:
965 ; SSE-NEXT: cvttss2si %xmm0, %rax
966 ; SSE-NEXT: movq %rax, %xmm1
967 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,2,3]
968 ; SSE-NEXT: cvttss2si %xmm0, %rax
969 ; SSE-NEXT: movq %rax, %xmm0
970 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
971 ; SSE-NEXT: movdqa %xmm1, %xmm0
974 ; VEX-LABEL: fptosi_4f32_to_2i64:
976 ; VEX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
977 ; VEX-NEXT: vcvttss2si %xmm1, %rax
978 ; VEX-NEXT: vcvttss2si %xmm0, %rcx
979 ; VEX-NEXT: vmovq %rcx, %xmm0
980 ; VEX-NEXT: vmovq %rax, %xmm1
981 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
984 ; AVX512F-LABEL: fptosi_4f32_to_2i64:
986 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
987 ; AVX512F-NEXT: vcvttss2si %xmm1, %rax
988 ; AVX512F-NEXT: vcvttss2si %xmm0, %rcx
989 ; AVX512F-NEXT: vmovq %rcx, %xmm0
990 ; AVX512F-NEXT: vmovq %rax, %xmm1
991 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
994 ; AVX512VL-LABEL: fptosi_4f32_to_2i64:
996 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
997 ; AVX512VL-NEXT: vcvttss2si %xmm1, %rax
998 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rcx
999 ; AVX512VL-NEXT: vmovq %rcx, %xmm0
1000 ; AVX512VL-NEXT: vmovq %rax, %xmm1
1001 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
1002 ; AVX512VL-NEXT: retq
1004 ; AVX512DQ-LABEL: fptosi_4f32_to_2i64:
1005 ; AVX512DQ: # %bb.0:
1006 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1007 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
1008 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1009 ; AVX512DQ-NEXT: vzeroupper
1010 ; AVX512DQ-NEXT: retq
1012 ; AVX512VLDQ-LABEL: fptosi_4f32_to_2i64:
1013 ; AVX512VLDQ: # %bb.0:
1014 ; AVX512VLDQ-NEXT: vcvttps2qq %xmm0, %ymm0
1015 ; AVX512VLDQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1016 ; AVX512VLDQ-NEXT: vzeroupper
1017 ; AVX512VLDQ-NEXT: retq
1018 %cvt = fptosi <4 x float> %a to <4 x i64>
1019 %shuf = shufflevector <4 x i64> %cvt, <4 x i64> undef, <2 x i32> <i32 0, i32 1>
1023 define <8 x i32> @fptosi_8f32_to_8i32(<8 x float> %a) {
1024 ; SSE-LABEL: fptosi_8f32_to_8i32:
1026 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
1027 ; SSE-NEXT: cvttps2dq %xmm1, %xmm1
1030 ; AVX-LABEL: fptosi_8f32_to_8i32:
1032 ; AVX-NEXT: vcvttps2dq %ymm0, %ymm0
1034 %cvt = fptosi <8 x float> %a to <8 x i32>
1038 define <4 x i64> @fptosi_4f32_to_4i64(<8 x float> %a) {
1039 ; SSE-LABEL: fptosi_4f32_to_4i64:
1041 ; SSE-NEXT: cvttss2si %xmm0, %rax
1042 ; SSE-NEXT: movq %rax, %xmm2
1043 ; SSE-NEXT: movaps %xmm0, %xmm1
1044 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[2,3]
1045 ; SSE-NEXT: cvttss2si %xmm1, %rax
1046 ; SSE-NEXT: movq %rax, %xmm1
1047 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm1[0]
1048 ; SSE-NEXT: movaps %xmm0, %xmm1
1049 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm0[2,3]
1050 ; SSE-NEXT: cvttss2si %xmm1, %rax
1051 ; SSE-NEXT: movq %rax, %xmm3
1052 ; SSE-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
1053 ; SSE-NEXT: cvttss2si %xmm0, %rax
1054 ; SSE-NEXT: movq %rax, %xmm1
1055 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm3[0]
1056 ; SSE-NEXT: movdqa %xmm2, %xmm0
1059 ; AVX1-LABEL: fptosi_4f32_to_4i64:
1061 ; AVX1-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1062 ; AVX1-NEXT: vcvttss2si %xmm1, %rax
1063 ; AVX1-NEXT: vmovq %rax, %xmm1
1064 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1065 ; AVX1-NEXT: vcvttss2si %xmm2, %rax
1066 ; AVX1-NEXT: vmovq %rax, %xmm2
1067 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1068 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
1069 ; AVX1-NEXT: vmovq %rax, %xmm2
1070 ; AVX1-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1071 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
1072 ; AVX1-NEXT: vmovq %rax, %xmm0
1073 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1074 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1077 ; AVX2-LABEL: fptosi_4f32_to_4i64:
1079 ; AVX2-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1080 ; AVX2-NEXT: vcvttss2si %xmm1, %rax
1081 ; AVX2-NEXT: vmovq %rax, %xmm1
1082 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1083 ; AVX2-NEXT: vcvttss2si %xmm2, %rax
1084 ; AVX2-NEXT: vmovq %rax, %xmm2
1085 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1086 ; AVX2-NEXT: vcvttss2si %xmm0, %rax
1087 ; AVX2-NEXT: vmovq %rax, %xmm2
1088 ; AVX2-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1089 ; AVX2-NEXT: vcvttss2si %xmm0, %rax
1090 ; AVX2-NEXT: vmovq %rax, %xmm0
1091 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1092 ; AVX2-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
1095 ; AVX512F-LABEL: fptosi_4f32_to_4i64:
1097 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1098 ; AVX512F-NEXT: vcvttss2si %xmm1, %rax
1099 ; AVX512F-NEXT: vmovq %rax, %xmm1
1100 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1101 ; AVX512F-NEXT: vcvttss2si %xmm2, %rax
1102 ; AVX512F-NEXT: vmovq %rax, %xmm2
1103 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1104 ; AVX512F-NEXT: vcvttss2si %xmm0, %rax
1105 ; AVX512F-NEXT: vmovq %rax, %xmm2
1106 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1107 ; AVX512F-NEXT: vcvttss2si %xmm0, %rax
1108 ; AVX512F-NEXT: vmovq %rax, %xmm0
1109 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1110 ; AVX512F-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
1111 ; AVX512F-NEXT: retq
1113 ; AVX512VL-LABEL: fptosi_4f32_to_4i64:
1114 ; AVX512VL: # %bb.0:
1115 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1116 ; AVX512VL-NEXT: vcvttss2si %xmm1, %rax
1117 ; AVX512VL-NEXT: vmovq %rax, %xmm1
1118 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1119 ; AVX512VL-NEXT: vcvttss2si %xmm2, %rax
1120 ; AVX512VL-NEXT: vmovq %rax, %xmm2
1121 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1122 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rax
1123 ; AVX512VL-NEXT: vmovq %rax, %xmm2
1124 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1125 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rax
1126 ; AVX512VL-NEXT: vmovq %rax, %xmm0
1127 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1128 ; AVX512VL-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
1129 ; AVX512VL-NEXT: retq
1131 ; AVX512DQ-LABEL: fptosi_4f32_to_4i64:
1132 ; AVX512DQ: # %bb.0:
1133 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
1134 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1135 ; AVX512DQ-NEXT: retq
1137 ; AVX512VLDQ-LABEL: fptosi_4f32_to_4i64:
1138 ; AVX512VLDQ: # %bb.0:
1139 ; AVX512VLDQ-NEXT: vcvttps2qq %xmm0, %ymm0
1140 ; AVX512VLDQ-NEXT: retq
1141 %shuf = shufflevector <8 x float> %a, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1142 %cvt = fptosi <4 x float> %shuf to <4 x i64>
1146 define <4 x i64> @fptosi_8f32_to_4i64(<8 x float> %a) {
1147 ; SSE-LABEL: fptosi_8f32_to_4i64:
1149 ; SSE-NEXT: cvttss2si %xmm0, %rax
1150 ; SSE-NEXT: movq %rax, %xmm2
1151 ; SSE-NEXT: movaps %xmm0, %xmm1
1152 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1],xmm0[2,3]
1153 ; SSE-NEXT: cvttss2si %xmm1, %rax
1154 ; SSE-NEXT: movq %rax, %xmm1
1155 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm1[0]
1156 ; SSE-NEXT: movaps %xmm0, %xmm1
1157 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[3,1],xmm0[2,3]
1158 ; SSE-NEXT: cvttss2si %xmm1, %rax
1159 ; SSE-NEXT: movq %rax, %xmm3
1160 ; SSE-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
1161 ; SSE-NEXT: cvttss2si %xmm0, %rax
1162 ; SSE-NEXT: movq %rax, %xmm1
1163 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm3[0]
1164 ; SSE-NEXT: movdqa %xmm2, %xmm0
1167 ; AVX1-LABEL: fptosi_8f32_to_4i64:
1169 ; AVX1-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1170 ; AVX1-NEXT: vcvttss2si %xmm1, %rax
1171 ; AVX1-NEXT: vmovq %rax, %xmm1
1172 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1173 ; AVX1-NEXT: vcvttss2si %xmm2, %rax
1174 ; AVX1-NEXT: vmovq %rax, %xmm2
1175 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1176 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
1177 ; AVX1-NEXT: vmovq %rax, %xmm2
1178 ; AVX1-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1179 ; AVX1-NEXT: vcvttss2si %xmm0, %rax
1180 ; AVX1-NEXT: vmovq %rax, %xmm0
1181 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1182 ; AVX1-NEXT: vinsertf128 $1, %xmm1, %ymm0, %ymm0
1185 ; AVX2-LABEL: fptosi_8f32_to_4i64:
1187 ; AVX2-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1188 ; AVX2-NEXT: vcvttss2si %xmm1, %rax
1189 ; AVX2-NEXT: vmovq %rax, %xmm1
1190 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1191 ; AVX2-NEXT: vcvttss2si %xmm2, %rax
1192 ; AVX2-NEXT: vmovq %rax, %xmm2
1193 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1194 ; AVX2-NEXT: vcvttss2si %xmm0, %rax
1195 ; AVX2-NEXT: vmovq %rax, %xmm2
1196 ; AVX2-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1197 ; AVX2-NEXT: vcvttss2si %xmm0, %rax
1198 ; AVX2-NEXT: vmovq %rax, %xmm0
1199 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1200 ; AVX2-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
1203 ; AVX512F-LABEL: fptosi_8f32_to_4i64:
1205 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1206 ; AVX512F-NEXT: vcvttss2si %xmm1, %rax
1207 ; AVX512F-NEXT: vcvttss2si %xmm0, %rcx
1208 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
1209 ; AVX512F-NEXT: vcvttss2si %xmm1, %rdx
1210 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
1211 ; AVX512F-NEXT: vcvttss2si %xmm0, %rsi
1212 ; AVX512F-NEXT: vmovq %rsi, %xmm0
1213 ; AVX512F-NEXT: vmovq %rdx, %xmm1
1214 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
1215 ; AVX512F-NEXT: vmovq %rcx, %xmm1
1216 ; AVX512F-NEXT: vmovq %rax, %xmm2
1217 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0]
1218 ; AVX512F-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
1219 ; AVX512F-NEXT: retq
1221 ; AVX512VL-LABEL: fptosi_8f32_to_4i64:
1222 ; AVX512VL: # %bb.0:
1223 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1224 ; AVX512VL-NEXT: vcvttss2si %xmm1, %rax
1225 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rcx
1226 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
1227 ; AVX512VL-NEXT: vcvttss2si %xmm1, %rdx
1228 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
1229 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rsi
1230 ; AVX512VL-NEXT: vmovq %rsi, %xmm0
1231 ; AVX512VL-NEXT: vmovq %rdx, %xmm1
1232 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
1233 ; AVX512VL-NEXT: vmovq %rcx, %xmm1
1234 ; AVX512VL-NEXT: vmovq %rax, %xmm2
1235 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0]
1236 ; AVX512VL-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
1237 ; AVX512VL-NEXT: retq
1239 ; AVX512DQ-LABEL: fptosi_8f32_to_4i64:
1240 ; AVX512DQ: # %bb.0:
1241 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
1242 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1243 ; AVX512DQ-NEXT: retq
1245 ; AVX512VLDQ-LABEL: fptosi_8f32_to_4i64:
1246 ; AVX512VLDQ: # %bb.0:
1247 ; AVX512VLDQ-NEXT: vcvttps2qq %ymm0, %zmm0
1248 ; AVX512VLDQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1249 ; AVX512VLDQ-NEXT: retq
1250 %cvt = fptosi <8 x float> %a to <8 x i64>
1251 %shuf = shufflevector <8 x i64> %cvt, <8 x i64> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1256 ; Float to Unsigned Integer
1259 define <2 x i32> @fptoui_2f32_to_2i32(<2 x float> %a) {
1260 ; SSE-LABEL: fptoui_2f32_to_2i32:
1262 ; SSE-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
1263 ; SSE-NEXT: movaps %xmm0, %xmm1
1264 ; SSE-NEXT: subss %xmm2, %xmm1
1265 ; SSE-NEXT: cvttss2si %xmm1, %rax
1266 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1267 ; SSE-NEXT: xorq %rcx, %rax
1268 ; SSE-NEXT: cvttss2si %xmm0, %rdx
1269 ; SSE-NEXT: ucomiss %xmm2, %xmm0
1270 ; SSE-NEXT: cmovaeq %rax, %rdx
1271 ; SSE-NEXT: movq %rdx, %xmm1
1272 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,2,3]
1273 ; SSE-NEXT: movaps %xmm0, %xmm3
1274 ; SSE-NEXT: subss %xmm2, %xmm3
1275 ; SSE-NEXT: cvttss2si %xmm3, %rax
1276 ; SSE-NEXT: xorq %rcx, %rax
1277 ; SSE-NEXT: cvttss2si %xmm0, %rcx
1278 ; SSE-NEXT: ucomiss %xmm2, %xmm0
1279 ; SSE-NEXT: cmovaeq %rax, %rcx
1280 ; SSE-NEXT: movq %rcx, %xmm0
1281 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
1282 ; SSE-NEXT: movdqa %xmm1, %xmm0
1285 ; VEX-LABEL: fptoui_2f32_to_2i32:
1287 ; VEX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1288 ; VEX-NEXT: vsubss %xmm1, %xmm0, %xmm2
1289 ; VEX-NEXT: vcvttss2si %xmm2, %rax
1290 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1291 ; VEX-NEXT: xorq %rcx, %rax
1292 ; VEX-NEXT: vcvttss2si %xmm0, %rdx
1293 ; VEX-NEXT: vucomiss %xmm1, %xmm0
1294 ; VEX-NEXT: cmovaeq %rax, %rdx
1295 ; VEX-NEXT: vmovq %rdx, %xmm2
1296 ; VEX-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1297 ; VEX-NEXT: vsubss %xmm1, %xmm0, %xmm3
1298 ; VEX-NEXT: vcvttss2si %xmm3, %rax
1299 ; VEX-NEXT: xorq %rcx, %rax
1300 ; VEX-NEXT: vcvttss2si %xmm0, %rcx
1301 ; VEX-NEXT: vucomiss %xmm1, %xmm0
1302 ; VEX-NEXT: cmovaeq %rax, %rcx
1303 ; VEX-NEXT: vmovq %rcx, %xmm0
1304 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1307 ; AVX512F-LABEL: fptoui_2f32_to_2i32:
1309 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1310 ; AVX512F-NEXT: vcvttps2udq %zmm0, %zmm0
1311 ; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
1312 ; AVX512F-NEXT: vzeroupper
1313 ; AVX512F-NEXT: retq
1315 ; AVX512VL-LABEL: fptoui_2f32_to_2i32:
1316 ; AVX512VL: # %bb.0:
1317 ; AVX512VL-NEXT: vcvttps2udq %xmm0, %xmm0
1318 ; AVX512VL-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
1319 ; AVX512VL-NEXT: retq
1321 ; AVX512DQ-LABEL: fptoui_2f32_to_2i32:
1322 ; AVX512DQ: # %bb.0:
1323 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1324 ; AVX512DQ-NEXT: vcvttps2udq %zmm0, %zmm0
1325 ; AVX512DQ-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
1326 ; AVX512DQ-NEXT: vzeroupper
1327 ; AVX512DQ-NEXT: retq
1329 ; AVX512VLDQ-LABEL: fptoui_2f32_to_2i32:
1330 ; AVX512VLDQ: # %bb.0:
1331 ; AVX512VLDQ-NEXT: vcvttps2udq %xmm0, %xmm0
1332 ; AVX512VLDQ-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
1333 ; AVX512VLDQ-NEXT: retq
1334 %cvt = fptoui <2 x float> %a to <2 x i32>
1338 define <4 x i32> @fptoui_4f32_to_4i32(<4 x float> %a) {
1339 ; SSE-LABEL: fptoui_4f32_to_4i32:
1341 ; SSE-NEXT: movaps {{.*#+}} xmm2 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
1342 ; SSE-NEXT: movaps %xmm0, %xmm1
1343 ; SSE-NEXT: cmpltps %xmm2, %xmm1
1344 ; SSE-NEXT: cvttps2dq %xmm0, %xmm3
1345 ; SSE-NEXT: subps %xmm2, %xmm0
1346 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
1347 ; SSE-NEXT: xorps {{.*}}(%rip), %xmm0
1348 ; SSE-NEXT: andps %xmm1, %xmm3
1349 ; SSE-NEXT: andnps %xmm0, %xmm1
1350 ; SSE-NEXT: orps %xmm3, %xmm1
1351 ; SSE-NEXT: movaps %xmm1, %xmm0
1354 ; AVX1-LABEL: fptoui_4f32_to_4i32:
1356 ; AVX1-NEXT: vmovaps {{.*#+}} xmm1 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
1357 ; AVX1-NEXT: vcmpltps %xmm1, %xmm0, %xmm2
1358 ; AVX1-NEXT: vsubps %xmm1, %xmm0, %xmm1
1359 ; AVX1-NEXT: vcvttps2dq %xmm1, %xmm1
1360 ; AVX1-NEXT: vxorps {{.*}}(%rip), %xmm1, %xmm1
1361 ; AVX1-NEXT: vcvttps2dq %xmm0, %xmm0
1362 ; AVX1-NEXT: vblendvps %xmm2, %xmm0, %xmm1, %xmm0
1365 ; AVX2-LABEL: fptoui_4f32_to_4i32:
1367 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm1 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
1368 ; AVX2-NEXT: vcmpltps %xmm1, %xmm0, %xmm2
1369 ; AVX2-NEXT: vsubps %xmm1, %xmm0, %xmm1
1370 ; AVX2-NEXT: vcvttps2dq %xmm1, %xmm1
1371 ; AVX2-NEXT: vbroadcastss {{.*#+}} xmm3 = [2147483648,2147483648,2147483648,2147483648]
1372 ; AVX2-NEXT: vxorps %xmm3, %xmm1, %xmm1
1373 ; AVX2-NEXT: vcvttps2dq %xmm0, %xmm0
1374 ; AVX2-NEXT: vblendvps %xmm2, %xmm0, %xmm1, %xmm0
1377 ; AVX512F-LABEL: fptoui_4f32_to_4i32:
1379 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1380 ; AVX512F-NEXT: vcvttps2udq %zmm0, %zmm0
1381 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1382 ; AVX512F-NEXT: vzeroupper
1383 ; AVX512F-NEXT: retq
1385 ; AVX512VL-LABEL: fptoui_4f32_to_4i32:
1386 ; AVX512VL: # %bb.0:
1387 ; AVX512VL-NEXT: vcvttps2udq %xmm0, %xmm0
1388 ; AVX512VL-NEXT: retq
1390 ; AVX512DQ-LABEL: fptoui_4f32_to_4i32:
1391 ; AVX512DQ: # %bb.0:
1392 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
1393 ; AVX512DQ-NEXT: vcvttps2udq %zmm0, %zmm0
1394 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1395 ; AVX512DQ-NEXT: vzeroupper
1396 ; AVX512DQ-NEXT: retq
1398 ; AVX512VLDQ-LABEL: fptoui_4f32_to_4i32:
1399 ; AVX512VLDQ: # %bb.0:
1400 ; AVX512VLDQ-NEXT: vcvttps2udq %xmm0, %xmm0
1401 ; AVX512VLDQ-NEXT: retq
1402 %cvt = fptoui <4 x float> %a to <4 x i32>
1406 define <2 x i64> @fptoui_2f32_to_2i64(<4 x float> %a) {
1407 ; SSE-LABEL: fptoui_2f32_to_2i64:
1409 ; SSE-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
1410 ; SSE-NEXT: movaps %xmm0, %xmm1
1411 ; SSE-NEXT: subss %xmm2, %xmm1
1412 ; SSE-NEXT: cvttss2si %xmm1, %rax
1413 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1414 ; SSE-NEXT: xorq %rcx, %rax
1415 ; SSE-NEXT: cvttss2si %xmm0, %rdx
1416 ; SSE-NEXT: ucomiss %xmm2, %xmm0
1417 ; SSE-NEXT: cmovaeq %rax, %rdx
1418 ; SSE-NEXT: movq %rdx, %xmm1
1419 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,2,3]
1420 ; SSE-NEXT: movaps %xmm0, %xmm3
1421 ; SSE-NEXT: subss %xmm2, %xmm3
1422 ; SSE-NEXT: cvttss2si %xmm3, %rax
1423 ; SSE-NEXT: xorq %rcx, %rax
1424 ; SSE-NEXT: cvttss2si %xmm0, %rcx
1425 ; SSE-NEXT: ucomiss %xmm2, %xmm0
1426 ; SSE-NEXT: cmovaeq %rax, %rcx
1427 ; SSE-NEXT: movq %rcx, %xmm0
1428 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
1429 ; SSE-NEXT: movdqa %xmm1, %xmm0
1432 ; VEX-LABEL: fptoui_2f32_to_2i64:
1434 ; VEX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1435 ; VEX-NEXT: vsubss %xmm1, %xmm0, %xmm2
1436 ; VEX-NEXT: vcvttss2si %xmm2, %rax
1437 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1438 ; VEX-NEXT: xorq %rcx, %rax
1439 ; VEX-NEXT: vcvttss2si %xmm0, %rdx
1440 ; VEX-NEXT: vucomiss %xmm1, %xmm0
1441 ; VEX-NEXT: cmovaeq %rax, %rdx
1442 ; VEX-NEXT: vmovq %rdx, %xmm2
1443 ; VEX-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1444 ; VEX-NEXT: vsubss %xmm1, %xmm0, %xmm3
1445 ; VEX-NEXT: vcvttss2si %xmm3, %rax
1446 ; VEX-NEXT: xorq %rcx, %rax
1447 ; VEX-NEXT: vcvttss2si %xmm0, %rcx
1448 ; VEX-NEXT: vucomiss %xmm1, %xmm0
1449 ; VEX-NEXT: cmovaeq %rax, %rcx
1450 ; VEX-NEXT: vmovq %rcx, %xmm0
1451 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1454 ; AVX512F-LABEL: fptoui_2f32_to_2i64:
1456 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rax
1457 ; AVX512F-NEXT: vmovq %rax, %xmm1
1458 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1459 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rax
1460 ; AVX512F-NEXT: vmovq %rax, %xmm0
1461 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
1462 ; AVX512F-NEXT: retq
1464 ; AVX512VL-LABEL: fptoui_2f32_to_2i64:
1465 ; AVX512VL: # %bb.0:
1466 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rax
1467 ; AVX512VL-NEXT: vmovq %rax, %xmm1
1468 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1469 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rax
1470 ; AVX512VL-NEXT: vmovq %rax, %xmm0
1471 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
1472 ; AVX512VL-NEXT: retq
1474 ; AVX512DQ-LABEL: fptoui_2f32_to_2i64:
1475 ; AVX512DQ: # %bb.0:
1476 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1477 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
1478 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1479 ; AVX512DQ-NEXT: vzeroupper
1480 ; AVX512DQ-NEXT: retq
1482 ; AVX512VLDQ-LABEL: fptoui_2f32_to_2i64:
1483 ; AVX512VLDQ: # %bb.0:
1484 ; AVX512VLDQ-NEXT: vcvttps2uqq %xmm0, %xmm0
1485 ; AVX512VLDQ-NEXT: retq
1486 %shuf = shufflevector <4 x float> %a, <4 x float> undef, <2 x i32> <i32 0, i32 1>
1487 %cvt = fptoui <2 x float> %shuf to <2 x i64>
1491 define <2 x i64> @fptoui_4f32_to_2i64(<4 x float> %a) {
1492 ; SSE-LABEL: fptoui_4f32_to_2i64:
1494 ; SSE-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
1495 ; SSE-NEXT: movaps %xmm0, %xmm1
1496 ; SSE-NEXT: subss %xmm2, %xmm1
1497 ; SSE-NEXT: cvttss2si %xmm1, %rax
1498 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1499 ; SSE-NEXT: xorq %rcx, %rax
1500 ; SSE-NEXT: cvttss2si %xmm0, %rdx
1501 ; SSE-NEXT: ucomiss %xmm2, %xmm0
1502 ; SSE-NEXT: cmovaeq %rax, %rdx
1503 ; SSE-NEXT: movq %rdx, %xmm1
1504 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1,2,3]
1505 ; SSE-NEXT: movaps %xmm0, %xmm3
1506 ; SSE-NEXT: subss %xmm2, %xmm3
1507 ; SSE-NEXT: cvttss2si %xmm3, %rax
1508 ; SSE-NEXT: xorq %rcx, %rax
1509 ; SSE-NEXT: cvttss2si %xmm0, %rcx
1510 ; SSE-NEXT: ucomiss %xmm2, %xmm0
1511 ; SSE-NEXT: cmovaeq %rax, %rcx
1512 ; SSE-NEXT: movq %rcx, %xmm0
1513 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm0[0]
1514 ; SSE-NEXT: movdqa %xmm1, %xmm0
1517 ; VEX-LABEL: fptoui_4f32_to_2i64:
1519 ; VEX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1520 ; VEX-NEXT: vmovss {{.*#+}} xmm2 = mem[0],zero,zero,zero
1521 ; VEX-NEXT: vsubss %xmm2, %xmm1, %xmm3
1522 ; VEX-NEXT: vcvttss2si %xmm3, %rax
1523 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1524 ; VEX-NEXT: xorq %rcx, %rax
1525 ; VEX-NEXT: vcvttss2si %xmm1, %rdx
1526 ; VEX-NEXT: vucomiss %xmm2, %xmm1
1527 ; VEX-NEXT: cmovaeq %rax, %rdx
1528 ; VEX-NEXT: vsubss %xmm2, %xmm0, %xmm1
1529 ; VEX-NEXT: vcvttss2si %xmm1, %rax
1530 ; VEX-NEXT: xorq %rcx, %rax
1531 ; VEX-NEXT: vcvttss2si %xmm0, %rcx
1532 ; VEX-NEXT: vucomiss %xmm2, %xmm0
1533 ; VEX-NEXT: cmovaeq %rax, %rcx
1534 ; VEX-NEXT: vmovq %rcx, %xmm0
1535 ; VEX-NEXT: vmovq %rdx, %xmm1
1536 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
1539 ; AVX512F-LABEL: fptoui_4f32_to_2i64:
1541 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1542 ; AVX512F-NEXT: vcvttss2usi %xmm1, %rax
1543 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rcx
1544 ; AVX512F-NEXT: vmovq %rcx, %xmm0
1545 ; AVX512F-NEXT: vmovq %rax, %xmm1
1546 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
1547 ; AVX512F-NEXT: retq
1549 ; AVX512VL-LABEL: fptoui_4f32_to_2i64:
1550 ; AVX512VL: # %bb.0:
1551 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1552 ; AVX512VL-NEXT: vcvttss2usi %xmm1, %rax
1553 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rcx
1554 ; AVX512VL-NEXT: vmovq %rcx, %xmm0
1555 ; AVX512VL-NEXT: vmovq %rax, %xmm1
1556 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
1557 ; AVX512VL-NEXT: retq
1559 ; AVX512DQ-LABEL: fptoui_4f32_to_2i64:
1560 ; AVX512DQ: # %bb.0:
1561 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
1562 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
1563 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
1564 ; AVX512DQ-NEXT: vzeroupper
1565 ; AVX512DQ-NEXT: retq
1567 ; AVX512VLDQ-LABEL: fptoui_4f32_to_2i64:
1568 ; AVX512VLDQ: # %bb.0:
1569 ; AVX512VLDQ-NEXT: vcvttps2uqq %xmm0, %ymm0
1570 ; AVX512VLDQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
1571 ; AVX512VLDQ-NEXT: vzeroupper
1572 ; AVX512VLDQ-NEXT: retq
1573 %cvt = fptoui <4 x float> %a to <4 x i64>
1574 %shuf = shufflevector <4 x i64> %cvt, <4 x i64> undef, <2 x i32> <i32 0, i32 1>
1578 define <8 x i32> @fptoui_8f32_to_8i32(<8 x float> %a) {
1579 ; SSE-LABEL: fptoui_8f32_to_8i32:
1581 ; SSE-NEXT: movaps {{.*#+}} xmm4 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
1582 ; SSE-NEXT: movaps %xmm0, %xmm2
1583 ; SSE-NEXT: cmpltps %xmm4, %xmm2
1584 ; SSE-NEXT: cvttps2dq %xmm0, %xmm3
1585 ; SSE-NEXT: subps %xmm4, %xmm0
1586 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
1587 ; SSE-NEXT: movaps {{.*#+}} xmm5 = [2147483648,2147483648,2147483648,2147483648]
1588 ; SSE-NEXT: xorps %xmm5, %xmm0
1589 ; SSE-NEXT: andps %xmm2, %xmm3
1590 ; SSE-NEXT: andnps %xmm0, %xmm2
1591 ; SSE-NEXT: orps %xmm3, %xmm2
1592 ; SSE-NEXT: movaps %xmm1, %xmm3
1593 ; SSE-NEXT: cmpltps %xmm4, %xmm3
1594 ; SSE-NEXT: cvttps2dq %xmm1, %xmm0
1595 ; SSE-NEXT: subps %xmm4, %xmm1
1596 ; SSE-NEXT: cvttps2dq %xmm1, %xmm1
1597 ; SSE-NEXT: xorps %xmm5, %xmm1
1598 ; SSE-NEXT: andps %xmm3, %xmm0
1599 ; SSE-NEXT: andnps %xmm1, %xmm3
1600 ; SSE-NEXT: orps %xmm0, %xmm3
1601 ; SSE-NEXT: movaps %xmm2, %xmm0
1602 ; SSE-NEXT: movaps %xmm3, %xmm1
1605 ; AVX1-LABEL: fptoui_8f32_to_8i32:
1607 ; AVX1-NEXT: vmovaps {{.*#+}} ymm1 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
1608 ; AVX1-NEXT: vcmpltps %ymm1, %ymm0, %ymm2
1609 ; AVX1-NEXT: vsubps %ymm1, %ymm0, %ymm1
1610 ; AVX1-NEXT: vcvttps2dq %ymm1, %ymm1
1611 ; AVX1-NEXT: vxorps {{.*}}(%rip), %ymm1, %ymm1
1612 ; AVX1-NEXT: vcvttps2dq %ymm0, %ymm0
1613 ; AVX1-NEXT: vblendvps %ymm2, %ymm0, %ymm1, %ymm0
1616 ; AVX2-LABEL: fptoui_8f32_to_8i32:
1618 ; AVX2-NEXT: vbroadcastss {{.*#+}} ymm1 = [2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9,2.14748365E+9]
1619 ; AVX2-NEXT: vcmpltps %ymm1, %ymm0, %ymm2
1620 ; AVX2-NEXT: vsubps %ymm1, %ymm0, %ymm1
1621 ; AVX2-NEXT: vcvttps2dq %ymm1, %ymm1
1622 ; AVX2-NEXT: vbroadcastss {{.*#+}} ymm3 = [2147483648,2147483648,2147483648,2147483648,2147483648,2147483648,2147483648,2147483648]
1623 ; AVX2-NEXT: vxorps %ymm3, %ymm1, %ymm1
1624 ; AVX2-NEXT: vcvttps2dq %ymm0, %ymm0
1625 ; AVX2-NEXT: vblendvps %ymm2, %ymm0, %ymm1, %ymm0
1628 ; AVX512F-LABEL: fptoui_8f32_to_8i32:
1630 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1631 ; AVX512F-NEXT: vcvttps2udq %zmm0, %zmm0
1632 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1633 ; AVX512F-NEXT: retq
1635 ; AVX512VL-LABEL: fptoui_8f32_to_8i32:
1636 ; AVX512VL: # %bb.0:
1637 ; AVX512VL-NEXT: vcvttps2udq %ymm0, %ymm0
1638 ; AVX512VL-NEXT: retq
1640 ; AVX512DQ-LABEL: fptoui_8f32_to_8i32:
1641 ; AVX512DQ: # %bb.0:
1642 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 def $zmm0
1643 ; AVX512DQ-NEXT: vcvttps2udq %zmm0, %zmm0
1644 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1645 ; AVX512DQ-NEXT: retq
1647 ; AVX512VLDQ-LABEL: fptoui_8f32_to_8i32:
1648 ; AVX512VLDQ: # %bb.0:
1649 ; AVX512VLDQ-NEXT: vcvttps2udq %ymm0, %ymm0
1650 ; AVX512VLDQ-NEXT: retq
1651 %cvt = fptoui <8 x float> %a to <8 x i32>
1655 define <4 x i64> @fptoui_4f32_to_4i64(<8 x float> %a) {
1656 ; SSE-LABEL: fptoui_4f32_to_4i64:
1658 ; SSE-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1659 ; SSE-NEXT: movaps %xmm0, %xmm2
1660 ; SSE-NEXT: subss %xmm1, %xmm2
1661 ; SSE-NEXT: cvttss2si %xmm2, %rcx
1662 ; SSE-NEXT: movabsq $-9223372036854775808, %rax # imm = 0x8000000000000000
1663 ; SSE-NEXT: xorq %rax, %rcx
1664 ; SSE-NEXT: cvttss2si %xmm0, %rdx
1665 ; SSE-NEXT: ucomiss %xmm1, %xmm0
1666 ; SSE-NEXT: cmovaeq %rcx, %rdx
1667 ; SSE-NEXT: movq %rdx, %xmm2
1668 ; SSE-NEXT: movaps %xmm0, %xmm3
1669 ; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[1,1],xmm0[2,3]
1670 ; SSE-NEXT: movaps %xmm3, %xmm4
1671 ; SSE-NEXT: subss %xmm1, %xmm4
1672 ; SSE-NEXT: cvttss2si %xmm4, %rcx
1673 ; SSE-NEXT: xorq %rax, %rcx
1674 ; SSE-NEXT: cvttss2si %xmm3, %rdx
1675 ; SSE-NEXT: ucomiss %xmm1, %xmm3
1676 ; SSE-NEXT: cmovaeq %rcx, %rdx
1677 ; SSE-NEXT: movq %rdx, %xmm3
1678 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm3[0]
1679 ; SSE-NEXT: movaps %xmm0, %xmm3
1680 ; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[3,1],xmm0[2,3]
1681 ; SSE-NEXT: movaps %xmm3, %xmm4
1682 ; SSE-NEXT: subss %xmm1, %xmm4
1683 ; SSE-NEXT: cvttss2si %xmm4, %rcx
1684 ; SSE-NEXT: xorq %rax, %rcx
1685 ; SSE-NEXT: cvttss2si %xmm3, %rdx
1686 ; SSE-NEXT: ucomiss %xmm1, %xmm3
1687 ; SSE-NEXT: cmovaeq %rcx, %rdx
1688 ; SSE-NEXT: movq %rdx, %xmm3
1689 ; SSE-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
1690 ; SSE-NEXT: movaps %xmm0, %xmm4
1691 ; SSE-NEXT: subss %xmm1, %xmm4
1692 ; SSE-NEXT: cvttss2si %xmm4, %rcx
1693 ; SSE-NEXT: xorq %rax, %rcx
1694 ; SSE-NEXT: cvttss2si %xmm0, %rax
1695 ; SSE-NEXT: ucomiss %xmm1, %xmm0
1696 ; SSE-NEXT: cmovaeq %rcx, %rax
1697 ; SSE-NEXT: movq %rax, %xmm1
1698 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm3[0]
1699 ; SSE-NEXT: movdqa %xmm2, %xmm0
1702 ; AVX1-LABEL: fptoui_4f32_to_4i64:
1704 ; AVX1-NEXT: vpermilps {{.*#+}} xmm2 = xmm0[3,1,2,3]
1705 ; AVX1-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1706 ; AVX1-NEXT: vsubss %xmm1, %xmm2, %xmm3
1707 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
1708 ; AVX1-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1709 ; AVX1-NEXT: xorq %rcx, %rax
1710 ; AVX1-NEXT: vcvttss2si %xmm2, %rdx
1711 ; AVX1-NEXT: vucomiss %xmm1, %xmm2
1712 ; AVX1-NEXT: cmovaeq %rax, %rdx
1713 ; AVX1-NEXT: vmovq %rdx, %xmm2
1714 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm3 = xmm0[1,0]
1715 ; AVX1-NEXT: vsubss %xmm1, %xmm3, %xmm4
1716 ; AVX1-NEXT: vcvttss2si %xmm4, %rax
1717 ; AVX1-NEXT: xorq %rcx, %rax
1718 ; AVX1-NEXT: vcvttss2si %xmm3, %rdx
1719 ; AVX1-NEXT: vucomiss %xmm1, %xmm3
1720 ; AVX1-NEXT: cmovaeq %rax, %rdx
1721 ; AVX1-NEXT: vmovq %rdx, %xmm3
1722 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
1723 ; AVX1-NEXT: vsubss %xmm1, %xmm0, %xmm3
1724 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
1725 ; AVX1-NEXT: xorq %rcx, %rax
1726 ; AVX1-NEXT: vcvttss2si %xmm0, %rdx
1727 ; AVX1-NEXT: vucomiss %xmm1, %xmm0
1728 ; AVX1-NEXT: cmovaeq %rax, %rdx
1729 ; AVX1-NEXT: vmovq %rdx, %xmm3
1730 ; AVX1-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1731 ; AVX1-NEXT: vsubss %xmm1, %xmm0, %xmm4
1732 ; AVX1-NEXT: vcvttss2si %xmm4, %rax
1733 ; AVX1-NEXT: xorq %rcx, %rax
1734 ; AVX1-NEXT: vcvttss2si %xmm0, %rcx
1735 ; AVX1-NEXT: vucomiss %xmm1, %xmm0
1736 ; AVX1-NEXT: cmovaeq %rax, %rcx
1737 ; AVX1-NEXT: vmovq %rcx, %xmm0
1738 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0]
1739 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
1742 ; AVX2-LABEL: fptoui_4f32_to_4i64:
1744 ; AVX2-NEXT: vpermilps {{.*#+}} xmm2 = xmm0[3,1,2,3]
1745 ; AVX2-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1746 ; AVX2-NEXT: vsubss %xmm1, %xmm2, %xmm3
1747 ; AVX2-NEXT: vcvttss2si %xmm3, %rax
1748 ; AVX2-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1749 ; AVX2-NEXT: xorq %rcx, %rax
1750 ; AVX2-NEXT: vcvttss2si %xmm2, %rdx
1751 ; AVX2-NEXT: vucomiss %xmm1, %xmm2
1752 ; AVX2-NEXT: cmovaeq %rax, %rdx
1753 ; AVX2-NEXT: vmovq %rdx, %xmm2
1754 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm3 = xmm0[1,0]
1755 ; AVX2-NEXT: vsubss %xmm1, %xmm3, %xmm4
1756 ; AVX2-NEXT: vcvttss2si %xmm4, %rax
1757 ; AVX2-NEXT: xorq %rcx, %rax
1758 ; AVX2-NEXT: vcvttss2si %xmm3, %rdx
1759 ; AVX2-NEXT: vucomiss %xmm1, %xmm3
1760 ; AVX2-NEXT: cmovaeq %rax, %rdx
1761 ; AVX2-NEXT: vmovq %rdx, %xmm3
1762 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
1763 ; AVX2-NEXT: vsubss %xmm1, %xmm0, %xmm3
1764 ; AVX2-NEXT: vcvttss2si %xmm3, %rax
1765 ; AVX2-NEXT: xorq %rcx, %rax
1766 ; AVX2-NEXT: vcvttss2si %xmm0, %rdx
1767 ; AVX2-NEXT: vucomiss %xmm1, %xmm0
1768 ; AVX2-NEXT: cmovaeq %rax, %rdx
1769 ; AVX2-NEXT: vmovq %rdx, %xmm3
1770 ; AVX2-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1771 ; AVX2-NEXT: vsubss %xmm1, %xmm0, %xmm4
1772 ; AVX2-NEXT: vcvttss2si %xmm4, %rax
1773 ; AVX2-NEXT: xorq %rcx, %rax
1774 ; AVX2-NEXT: vcvttss2si %xmm0, %rcx
1775 ; AVX2-NEXT: vucomiss %xmm1, %xmm0
1776 ; AVX2-NEXT: cmovaeq %rax, %rcx
1777 ; AVX2-NEXT: vmovq %rcx, %xmm0
1778 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0]
1779 ; AVX2-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm0
1782 ; AVX512F-LABEL: fptoui_4f32_to_4i64:
1784 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1785 ; AVX512F-NEXT: vcvttss2usi %xmm1, %rax
1786 ; AVX512F-NEXT: vmovq %rax, %xmm1
1787 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1788 ; AVX512F-NEXT: vcvttss2usi %xmm2, %rax
1789 ; AVX512F-NEXT: vmovq %rax, %xmm2
1790 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1791 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rax
1792 ; AVX512F-NEXT: vmovq %rax, %xmm2
1793 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1794 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rax
1795 ; AVX512F-NEXT: vmovq %rax, %xmm0
1796 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1797 ; AVX512F-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
1798 ; AVX512F-NEXT: retq
1800 ; AVX512VL-LABEL: fptoui_4f32_to_4i64:
1801 ; AVX512VL: # %bb.0:
1802 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm1 = xmm0[3,1,2,3]
1803 ; AVX512VL-NEXT: vcvttss2usi %xmm1, %rax
1804 ; AVX512VL-NEXT: vmovq %rax, %xmm1
1805 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm2 = xmm0[1,0]
1806 ; AVX512VL-NEXT: vcvttss2usi %xmm2, %rax
1807 ; AVX512VL-NEXT: vmovq %rax, %xmm2
1808 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm2[0],xmm1[0]
1809 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rax
1810 ; AVX512VL-NEXT: vmovq %rax, %xmm2
1811 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1812 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rax
1813 ; AVX512VL-NEXT: vmovq %rax, %xmm0
1814 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
1815 ; AVX512VL-NEXT: vinserti128 $1, %xmm1, %ymm0, %ymm0
1816 ; AVX512VL-NEXT: retq
1818 ; AVX512DQ-LABEL: fptoui_4f32_to_4i64:
1819 ; AVX512DQ: # %bb.0:
1820 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
1821 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
1822 ; AVX512DQ-NEXT: retq
1824 ; AVX512VLDQ-LABEL: fptoui_4f32_to_4i64:
1825 ; AVX512VLDQ: # %bb.0:
1826 ; AVX512VLDQ-NEXT: vcvttps2uqq %xmm0, %ymm0
1827 ; AVX512VLDQ-NEXT: retq
1828 %shuf = shufflevector <8 x float> %a, <8 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
1829 %cvt = fptoui <4 x float> %shuf to <4 x i64>
1833 define <4 x i64> @fptoui_8f32_to_4i64(<8 x float> %a) {
1834 ; SSE-LABEL: fptoui_8f32_to_4i64:
1836 ; SSE-NEXT: movss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1837 ; SSE-NEXT: movaps %xmm0, %xmm2
1838 ; SSE-NEXT: subss %xmm1, %xmm2
1839 ; SSE-NEXT: cvttss2si %xmm2, %rcx
1840 ; SSE-NEXT: movabsq $-9223372036854775808, %rax # imm = 0x8000000000000000
1841 ; SSE-NEXT: xorq %rax, %rcx
1842 ; SSE-NEXT: cvttss2si %xmm0, %rdx
1843 ; SSE-NEXT: ucomiss %xmm1, %xmm0
1844 ; SSE-NEXT: cmovaeq %rcx, %rdx
1845 ; SSE-NEXT: movq %rdx, %xmm2
1846 ; SSE-NEXT: movaps %xmm0, %xmm3
1847 ; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[1,1],xmm0[2,3]
1848 ; SSE-NEXT: movaps %xmm3, %xmm4
1849 ; SSE-NEXT: subss %xmm1, %xmm4
1850 ; SSE-NEXT: cvttss2si %xmm4, %rcx
1851 ; SSE-NEXT: xorq %rax, %rcx
1852 ; SSE-NEXT: cvttss2si %xmm3, %rdx
1853 ; SSE-NEXT: ucomiss %xmm1, %xmm3
1854 ; SSE-NEXT: cmovaeq %rcx, %rdx
1855 ; SSE-NEXT: movq %rdx, %xmm3
1856 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm2 = xmm2[0],xmm3[0]
1857 ; SSE-NEXT: movaps %xmm0, %xmm3
1858 ; SSE-NEXT: shufps {{.*#+}} xmm3 = xmm3[3,1],xmm0[2,3]
1859 ; SSE-NEXT: movaps %xmm3, %xmm4
1860 ; SSE-NEXT: subss %xmm1, %xmm4
1861 ; SSE-NEXT: cvttss2si %xmm4, %rcx
1862 ; SSE-NEXT: xorq %rax, %rcx
1863 ; SSE-NEXT: cvttss2si %xmm3, %rdx
1864 ; SSE-NEXT: ucomiss %xmm1, %xmm3
1865 ; SSE-NEXT: cmovaeq %rcx, %rdx
1866 ; SSE-NEXT: movq %rdx, %xmm3
1867 ; SSE-NEXT: movhlps {{.*#+}} xmm0 = xmm0[1,1]
1868 ; SSE-NEXT: movaps %xmm0, %xmm4
1869 ; SSE-NEXT: subss %xmm1, %xmm4
1870 ; SSE-NEXT: cvttss2si %xmm4, %rcx
1871 ; SSE-NEXT: xorq %rax, %rcx
1872 ; SSE-NEXT: cvttss2si %xmm0, %rax
1873 ; SSE-NEXT: ucomiss %xmm1, %xmm0
1874 ; SSE-NEXT: cmovaeq %rcx, %rax
1875 ; SSE-NEXT: movq %rax, %xmm1
1876 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm3[0]
1877 ; SSE-NEXT: movdqa %xmm2, %xmm0
1880 ; AVX1-LABEL: fptoui_8f32_to_4i64:
1882 ; AVX1-NEXT: vpermilps {{.*#+}} xmm2 = xmm0[3,1,2,3]
1883 ; AVX1-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1884 ; AVX1-NEXT: vsubss %xmm1, %xmm2, %xmm3
1885 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
1886 ; AVX1-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1887 ; AVX1-NEXT: xorq %rcx, %rax
1888 ; AVX1-NEXT: vcvttss2si %xmm2, %rdx
1889 ; AVX1-NEXT: vucomiss %xmm1, %xmm2
1890 ; AVX1-NEXT: cmovaeq %rax, %rdx
1891 ; AVX1-NEXT: vmovq %rdx, %xmm2
1892 ; AVX1-NEXT: vpermilpd {{.*#+}} xmm3 = xmm0[1,0]
1893 ; AVX1-NEXT: vsubss %xmm1, %xmm3, %xmm4
1894 ; AVX1-NEXT: vcvttss2si %xmm4, %rax
1895 ; AVX1-NEXT: xorq %rcx, %rax
1896 ; AVX1-NEXT: vcvttss2si %xmm3, %rdx
1897 ; AVX1-NEXT: vucomiss %xmm1, %xmm3
1898 ; AVX1-NEXT: cmovaeq %rax, %rdx
1899 ; AVX1-NEXT: vmovq %rdx, %xmm3
1900 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
1901 ; AVX1-NEXT: vsubss %xmm1, %xmm0, %xmm3
1902 ; AVX1-NEXT: vcvttss2si %xmm3, %rax
1903 ; AVX1-NEXT: xorq %rcx, %rax
1904 ; AVX1-NEXT: vcvttss2si %xmm0, %rdx
1905 ; AVX1-NEXT: vucomiss %xmm1, %xmm0
1906 ; AVX1-NEXT: cmovaeq %rax, %rdx
1907 ; AVX1-NEXT: vmovq %rdx, %xmm3
1908 ; AVX1-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1909 ; AVX1-NEXT: vsubss %xmm1, %xmm0, %xmm4
1910 ; AVX1-NEXT: vcvttss2si %xmm4, %rax
1911 ; AVX1-NEXT: xorq %rcx, %rax
1912 ; AVX1-NEXT: vcvttss2si %xmm0, %rcx
1913 ; AVX1-NEXT: vucomiss %xmm1, %xmm0
1914 ; AVX1-NEXT: cmovaeq %rax, %rcx
1915 ; AVX1-NEXT: vmovq %rcx, %xmm0
1916 ; AVX1-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0]
1917 ; AVX1-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
1920 ; AVX2-LABEL: fptoui_8f32_to_4i64:
1922 ; AVX2-NEXT: vpermilps {{.*#+}} xmm2 = xmm0[3,1,2,3]
1923 ; AVX2-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
1924 ; AVX2-NEXT: vsubss %xmm1, %xmm2, %xmm3
1925 ; AVX2-NEXT: vcvttss2si %xmm3, %rax
1926 ; AVX2-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
1927 ; AVX2-NEXT: xorq %rcx, %rax
1928 ; AVX2-NEXT: vcvttss2si %xmm2, %rdx
1929 ; AVX2-NEXT: vucomiss %xmm1, %xmm2
1930 ; AVX2-NEXT: cmovaeq %rax, %rdx
1931 ; AVX2-NEXT: vmovq %rdx, %xmm2
1932 ; AVX2-NEXT: vpermilpd {{.*#+}} xmm3 = xmm0[1,0]
1933 ; AVX2-NEXT: vsubss %xmm1, %xmm3, %xmm4
1934 ; AVX2-NEXT: vcvttss2si %xmm4, %rax
1935 ; AVX2-NEXT: xorq %rcx, %rax
1936 ; AVX2-NEXT: vcvttss2si %xmm3, %rdx
1937 ; AVX2-NEXT: vucomiss %xmm1, %xmm3
1938 ; AVX2-NEXT: cmovaeq %rax, %rdx
1939 ; AVX2-NEXT: vmovq %rdx, %xmm3
1940 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm2 = xmm3[0],xmm2[0]
1941 ; AVX2-NEXT: vsubss %xmm1, %xmm0, %xmm3
1942 ; AVX2-NEXT: vcvttss2si %xmm3, %rax
1943 ; AVX2-NEXT: xorq %rcx, %rax
1944 ; AVX2-NEXT: vcvttss2si %xmm0, %rdx
1945 ; AVX2-NEXT: vucomiss %xmm1, %xmm0
1946 ; AVX2-NEXT: cmovaeq %rax, %rdx
1947 ; AVX2-NEXT: vmovq %rdx, %xmm3
1948 ; AVX2-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
1949 ; AVX2-NEXT: vsubss %xmm1, %xmm0, %xmm4
1950 ; AVX2-NEXT: vcvttss2si %xmm4, %rax
1951 ; AVX2-NEXT: xorq %rcx, %rax
1952 ; AVX2-NEXT: vcvttss2si %xmm0, %rcx
1953 ; AVX2-NEXT: vucomiss %xmm1, %xmm0
1954 ; AVX2-NEXT: cmovaeq %rax, %rcx
1955 ; AVX2-NEXT: vmovq %rcx, %xmm0
1956 ; AVX2-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm3[0],xmm0[0]
1957 ; AVX2-NEXT: vinserti128 $1, %xmm2, %ymm0, %ymm0
1960 ; AVX512F-LABEL: fptoui_8f32_to_4i64:
1962 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1963 ; AVX512F-NEXT: vcvttss2usi %xmm1, %rax
1964 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rcx
1965 ; AVX512F-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
1966 ; AVX512F-NEXT: vcvttss2usi %xmm1, %rdx
1967 ; AVX512F-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
1968 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rsi
1969 ; AVX512F-NEXT: vmovq %rsi, %xmm0
1970 ; AVX512F-NEXT: vmovq %rdx, %xmm1
1971 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
1972 ; AVX512F-NEXT: vmovq %rcx, %xmm1
1973 ; AVX512F-NEXT: vmovq %rax, %xmm2
1974 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0]
1975 ; AVX512F-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
1976 ; AVX512F-NEXT: retq
1978 ; AVX512VL-LABEL: fptoui_8f32_to_4i64:
1979 ; AVX512VL: # %bb.0:
1980 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm1 = xmm0[1,1,3,3]
1981 ; AVX512VL-NEXT: vcvttss2usi %xmm1, %rax
1982 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rcx
1983 ; AVX512VL-NEXT: vpermilpd {{.*#+}} xmm1 = xmm0[1,0]
1984 ; AVX512VL-NEXT: vcvttss2usi %xmm1, %rdx
1985 ; AVX512VL-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,1,2,3]
1986 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rsi
1987 ; AVX512VL-NEXT: vmovq %rsi, %xmm0
1988 ; AVX512VL-NEXT: vmovq %rdx, %xmm1
1989 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
1990 ; AVX512VL-NEXT: vmovq %rcx, %xmm1
1991 ; AVX512VL-NEXT: vmovq %rax, %xmm2
1992 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm1 = xmm1[0],xmm2[0]
1993 ; AVX512VL-NEXT: vinserti128 $1, %xmm0, %ymm1, %ymm0
1994 ; AVX512VL-NEXT: retq
1996 ; AVX512DQ-LABEL: fptoui_8f32_to_4i64:
1997 ; AVX512DQ: # %bb.0:
1998 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
1999 ; AVX512DQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2000 ; AVX512DQ-NEXT: retq
2002 ; AVX512VLDQ-LABEL: fptoui_8f32_to_4i64:
2003 ; AVX512VLDQ: # %bb.0:
2004 ; AVX512VLDQ-NEXT: vcvttps2uqq %ymm0, %zmm0
2005 ; AVX512VLDQ-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2006 ; AVX512VLDQ-NEXT: retq
2007 %cvt = fptoui <8 x float> %a to <8 x i64>
2008 %shuf = shufflevector <8 x i64> %cvt, <8 x i64> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2016 define <2 x i64> @fptosi_2f64_to_2i64_const() {
2017 ; SSE-LABEL: fptosi_2f64_to_2i64_const:
2019 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,18446744073709551615]
2022 ; AVX-LABEL: fptosi_2f64_to_2i64_const:
2024 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [1,18446744073709551615]
2026 %cvt = fptosi <2 x double> <double 1.0, double -1.0> to <2 x i64>
2030 define <4 x i32> @fptosi_2f64_to_2i32_const() {
2031 ; SSE-LABEL: fptosi_2f64_to_2i32_const:
2033 ; SSE-NEXT: movaps {{.*#+}} xmm0 = <4294967295,1,u,u>
2036 ; AVX-LABEL: fptosi_2f64_to_2i32_const:
2038 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = <4294967295,1,u,u>
2040 %cvt = fptosi <2 x double> <double -1.0, double 1.0> to <2 x i32>
2041 %ext = shufflevector <2 x i32> %cvt, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
2045 define <4 x i64> @fptosi_4f64_to_4i64_const() {
2046 ; SSE-LABEL: fptosi_4f64_to_4i64_const:
2048 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,18446744073709551615]
2049 ; SSE-NEXT: movaps {{.*#+}} xmm1 = [2,18446744073709551613]
2052 ; AVX-LABEL: fptosi_4f64_to_4i64_const:
2054 ; AVX-NEXT: vmovaps {{.*#+}} ymm0 = [1,18446744073709551615,2,18446744073709551613]
2056 %cvt = fptosi <4 x double> <double 1.0, double -1.0, double 2.0, double -3.0> to <4 x i64>
2060 define <4 x i32> @fptosi_4f64_to_4i32_const() {
2061 ; SSE-LABEL: fptosi_4f64_to_4i32_const:
2063 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [4294967295,1,4294967294,3]
2066 ; AVX-LABEL: fptosi_4f64_to_4i32_const:
2068 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [4294967295,1,4294967294,3]
2070 %cvt = fptosi <4 x double> <double -1.0, double 1.0, double -2.0, double 3.0> to <4 x i32>
2074 define <2 x i64> @fptoui_2f64_to_2i64_const() {
2075 ; SSE-LABEL: fptoui_2f64_to_2i64_const:
2077 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [2,4]
2080 ; AVX-LABEL: fptoui_2f64_to_2i64_const:
2082 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [2,4]
2084 %cvt = fptoui <2 x double> <double 2.0, double 4.0> to <2 x i64>
2088 define <4 x i32> @fptoui_2f64_to_2i32_const(<2 x double> %a) {
2089 ; SSE-LABEL: fptoui_2f64_to_2i32_const:
2091 ; SSE-NEXT: movaps {{.*#+}} xmm0 = <2,4,u,u>
2094 ; AVX-LABEL: fptoui_2f64_to_2i32_const:
2096 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = <2,4,u,u>
2098 %cvt = fptoui <2 x double> <double 2.0, double 4.0> to <2 x i32>
2099 %ext = shufflevector <2 x i32> %cvt, <2 x i32> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
2103 define <4 x i64> @fptoui_4f64_to_4i64_const(<4 x double> %a) {
2104 ; SSE-LABEL: fptoui_4f64_to_4i64_const:
2106 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [2,4]
2107 ; SSE-NEXT: movaps {{.*#+}} xmm1 = [6,8]
2110 ; AVX-LABEL: fptoui_4f64_to_4i64_const:
2112 ; AVX-NEXT: vmovaps {{.*#+}} ymm0 = [2,4,6,8]
2114 %cvt = fptoui <4 x double> <double 2.0, double 4.0, double 6.0, double 8.0> to <4 x i64>
2118 define <4 x i32> @fptoui_4f64_to_4i32_const(<4 x double> %a) {
2119 ; SSE-LABEL: fptoui_4f64_to_4i32_const:
2121 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [2,4,6,8]
2124 ; AVX-LABEL: fptoui_4f64_to_4i32_const:
2126 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [2,4,6,8]
2128 %cvt = fptoui <4 x double> <double 2.0, double 4.0, double 6.0, double 8.0> to <4 x i32>
2132 define <4 x i32> @fptosi_4f32_to_4i32_const() {
2133 ; SSE-LABEL: fptosi_4f32_to_4i32_const:
2135 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,4294967295,2,3]
2138 ; AVX-LABEL: fptosi_4f32_to_4i32_const:
2140 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [1,4294967295,2,3]
2142 %cvt = fptosi <4 x float> <float 1.0, float -1.0, float 2.0, float 3.0> to <4 x i32>
2146 define <4 x i64> @fptosi_4f32_to_4i64_const() {
2147 ; SSE-LABEL: fptosi_4f32_to_4i64_const:
2149 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,18446744073709551615]
2150 ; SSE-NEXT: movaps {{.*#+}} xmm1 = [2,3]
2153 ; AVX-LABEL: fptosi_4f32_to_4i64_const:
2155 ; AVX-NEXT: vmovaps {{.*#+}} ymm0 = [1,18446744073709551615,2,3]
2157 %cvt = fptosi <4 x float> <float 1.0, float -1.0, float 2.0, float 3.0> to <4 x i64>
2161 define <8 x i32> @fptosi_8f32_to_8i32_const(<8 x float> %a) {
2162 ; SSE-LABEL: fptosi_8f32_to_8i32_const:
2164 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,4294967295,2,3]
2165 ; SSE-NEXT: movaps {{.*#+}} xmm1 = [6,4294967288,2,4294967295]
2168 ; AVX-LABEL: fptosi_8f32_to_8i32_const:
2170 ; AVX-NEXT: vmovaps {{.*#+}} ymm0 = [1,4294967295,2,3,6,4294967288,2,4294967295]
2172 %cvt = fptosi <8 x float> <float 1.0, float -1.0, float 2.0, float 3.0, float 6.0, float -8.0, float 2.0, float -1.0> to <8 x i32>
2176 define <4 x i32> @fptoui_4f32_to_4i32_const(<4 x float> %a) {
2177 ; SSE-LABEL: fptoui_4f32_to_4i32_const:
2179 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,2,4,6]
2182 ; AVX-LABEL: fptoui_4f32_to_4i32_const:
2184 ; AVX-NEXT: vmovaps {{.*#+}} xmm0 = [1,2,4,6]
2186 %cvt = fptoui <4 x float> <float 1.0, float 2.0, float 4.0, float 6.0> to <4 x i32>
2190 define <4 x i64> @fptoui_4f32_to_4i64_const() {
2191 ; SSE-LABEL: fptoui_4f32_to_4i64_const:
2193 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,2]
2194 ; SSE-NEXT: movaps {{.*#+}} xmm1 = [4,8]
2197 ; AVX-LABEL: fptoui_4f32_to_4i64_const:
2199 ; AVX-NEXT: vmovaps {{.*#+}} ymm0 = [1,2,4,8]
2201 %cvt = fptoui <4 x float> <float 1.0, float 2.0, float 4.0, float 8.0> to <4 x i64>
2205 define <8 x i32> @fptoui_8f32_to_8i32_const(<8 x float> %a) {
2206 ; SSE-LABEL: fptoui_8f32_to_8i32_const:
2208 ; SSE-NEXT: movaps {{.*#+}} xmm0 = [1,2,4,6]
2209 ; SSE-NEXT: movaps {{.*#+}} xmm1 = [8,6,4,1]
2212 ; AVX-LABEL: fptoui_8f32_to_8i32_const:
2214 ; AVX-NEXT: vmovaps {{.*#+}} ymm0 = [1,2,4,6,8,6,4,1]
2216 %cvt = fptoui <8 x float> <float 1.0, float 2.0, float 4.0, float 6.0, float 8.0, float 6.0, float 4.0, float 1.0> to <8 x i32>
2224 define <4 x i32> @fptosi_2f16_to_4i32(<2 x half> %a) nounwind {
2225 ; SSE-LABEL: fptosi_2f16_to_4i32:
2227 ; SSE-NEXT: pushq %rax
2228 ; SSE-NEXT: movss %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill
2229 ; SSE-NEXT: callq __gnu_f2h_ieee
2230 ; SSE-NEXT: movzwl %ax, %edi
2231 ; SSE-NEXT: callq __gnu_h2f_ieee
2232 ; SSE-NEXT: movss %xmm0, (%rsp) # 4-byte Spill
2233 ; SSE-NEXT: movss {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 4-byte Reload
2234 ; SSE-NEXT: # xmm0 = mem[0],zero,zero,zero
2235 ; SSE-NEXT: callq __gnu_f2h_ieee
2236 ; SSE-NEXT: movzwl %ax, %edi
2237 ; SSE-NEXT: callq __gnu_h2f_ieee
2238 ; SSE-NEXT: cvttss2si %xmm0, %rax
2239 ; SSE-NEXT: movq %rax, %xmm1
2240 ; SSE-NEXT: cvttss2si (%rsp), %rax # 4-byte Folded Reload
2241 ; SSE-NEXT: movq %rax, %xmm0
2242 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2243 ; SSE-NEXT: pxor %xmm1, %xmm1
2244 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm1[2,3]
2245 ; SSE-NEXT: popq %rax
2248 ; VEX-LABEL: fptosi_2f16_to_4i32:
2250 ; VEX-NEXT: pushq %rax
2251 ; VEX-NEXT: vmovss %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill
2252 ; VEX-NEXT: callq __gnu_f2h_ieee
2253 ; VEX-NEXT: movzwl %ax, %edi
2254 ; VEX-NEXT: callq __gnu_h2f_ieee
2255 ; VEX-NEXT: vmovss %xmm0, (%rsp) # 4-byte Spill
2256 ; VEX-NEXT: vmovss {{[-0-9]+}}(%r{{[sb]}}p), %xmm0 # 4-byte Reload
2257 ; VEX-NEXT: # xmm0 = mem[0],zero,zero,zero
2258 ; VEX-NEXT: callq __gnu_f2h_ieee
2259 ; VEX-NEXT: movzwl %ax, %edi
2260 ; VEX-NEXT: callq __gnu_h2f_ieee
2261 ; VEX-NEXT: vcvttss2si %xmm0, %rax
2262 ; VEX-NEXT: vmovq %rax, %xmm0
2263 ; VEX-NEXT: vcvttss2si (%rsp), %rax # 4-byte Folded Reload
2264 ; VEX-NEXT: vmovq %rax, %xmm1
2265 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
2266 ; VEX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero
2267 ; VEX-NEXT: popq %rax
2270 ; AVX512-LABEL: fptosi_2f16_to_4i32:
2272 ; AVX512-NEXT: vcvtps2ph $4, %xmm0, %xmm0
2273 ; AVX512-NEXT: vcvtph2ps %xmm0, %xmm0
2274 ; AVX512-NEXT: vcvtps2ph $4, %xmm1, %xmm1
2275 ; AVX512-NEXT: vcvtph2ps %xmm1, %xmm1
2276 ; AVX512-NEXT: vcvttss2si %xmm1, %rax
2277 ; AVX512-NEXT: vmovq %rax, %xmm1
2278 ; AVX512-NEXT: vcvttss2si %xmm0, %rax
2279 ; AVX512-NEXT: vmovq %rax, %xmm0
2280 ; AVX512-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2281 ; AVX512-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero
2283 %cvt = fptosi <2 x half> %a to <2 x i32>
2284 %ext = shufflevector <2 x i32> %cvt, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2288 define <4 x i32> @fptosi_2f80_to_4i32(<2 x x86_fp80> %a) nounwind {
2289 ; SSE-LABEL: fptosi_2f80_to_4i32:
2291 ; SSE-NEXT: fldt {{[0-9]+}}(%rsp)
2292 ; SSE-NEXT: fldt {{[0-9]+}}(%rsp)
2293 ; SSE-NEXT: fnstcw -{{[0-9]+}}(%rsp)
2294 ; SSE-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
2295 ; SSE-NEXT: orl $3072, %eax # imm = 0xC00
2296 ; SSE-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
2297 ; SSE-NEXT: fldcw -{{[0-9]+}}(%rsp)
2298 ; SSE-NEXT: fistpll -{{[0-9]+}}(%rsp)
2299 ; SSE-NEXT: fldcw -{{[0-9]+}}(%rsp)
2300 ; SSE-NEXT: fnstcw -{{[0-9]+}}(%rsp)
2301 ; SSE-NEXT: movzwl -{{[0-9]+}}(%rsp), %eax
2302 ; SSE-NEXT: orl $3072, %eax # imm = 0xC00
2303 ; SSE-NEXT: movw %ax, -{{[0-9]+}}(%rsp)
2304 ; SSE-NEXT: fldcw -{{[0-9]+}}(%rsp)
2305 ; SSE-NEXT: fistpll -{{[0-9]+}}(%rsp)
2306 ; SSE-NEXT: fldcw -{{[0-9]+}}(%rsp)
2307 ; SSE-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2308 ; SSE-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
2309 ; SSE-NEXT: movlhps {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2310 ; SSE-NEXT: xorps %xmm1, %xmm1
2311 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm1[2,3]
2314 ; AVX-LABEL: fptosi_2f80_to_4i32:
2316 ; AVX-NEXT: fldt {{[0-9]+}}(%rsp)
2317 ; AVX-NEXT: fldt {{[0-9]+}}(%rsp)
2318 ; AVX-NEXT: fisttpll -{{[0-9]+}}(%rsp)
2319 ; AVX-NEXT: fisttpll -{{[0-9]+}}(%rsp)
2320 ; AVX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2321 ; AVX-NEXT: vmovsd {{.*#+}} xmm1 = mem[0],zero
2322 ; AVX-NEXT: vmovlhps {{.*#+}} xmm0 = xmm1[0],xmm0[0]
2323 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero
2325 %cvt = fptosi <2 x x86_fp80> %a to <2 x i32>
2326 %ext = shufflevector <2 x i32> %cvt, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2330 define <4 x i32> @fptosi_2f128_to_4i32(<2 x fp128> %a) nounwind {
2331 ; SSE-LABEL: fptosi_2f128_to_4i32:
2333 ; SSE-NEXT: pushq %r14
2334 ; SSE-NEXT: pushq %rbx
2335 ; SSE-NEXT: subq $24, %rsp
2336 ; SSE-NEXT: movq %rsi, %r14
2337 ; SSE-NEXT: movq %rdi, %rbx
2338 ; SSE-NEXT: movq %rdx, %rdi
2339 ; SSE-NEXT: movq %rcx, %rsi
2340 ; SSE-NEXT: callq __fixtfdi
2341 ; SSE-NEXT: movq %rax, %xmm0
2342 ; SSE-NEXT: movdqa %xmm0, (%rsp) # 16-byte Spill
2343 ; SSE-NEXT: movq %rbx, %rdi
2344 ; SSE-NEXT: movq %r14, %rsi
2345 ; SSE-NEXT: callq __fixtfdi
2346 ; SSE-NEXT: movq %rax, %xmm0
2347 ; SSE-NEXT: punpcklqdq (%rsp), %xmm0 # 16-byte Folded Reload
2348 ; SSE-NEXT: # xmm0 = xmm0[0],mem[0]
2349 ; SSE-NEXT: xorps %xmm1, %xmm1
2350 ; SSE-NEXT: shufps {{.*#+}} xmm0 = xmm0[0,2],xmm1[2,3]
2351 ; SSE-NEXT: addq $24, %rsp
2352 ; SSE-NEXT: popq %rbx
2353 ; SSE-NEXT: popq %r14
2356 ; AVX-LABEL: fptosi_2f128_to_4i32:
2358 ; AVX-NEXT: pushq %r14
2359 ; AVX-NEXT: pushq %rbx
2360 ; AVX-NEXT: subq $24, %rsp
2361 ; AVX-NEXT: movq %rsi, %r14
2362 ; AVX-NEXT: movq %rdi, %rbx
2363 ; AVX-NEXT: movq %rdx, %rdi
2364 ; AVX-NEXT: movq %rcx, %rsi
2365 ; AVX-NEXT: callq __fixtfdi
2366 ; AVX-NEXT: vmovq %rax, %xmm0
2367 ; AVX-NEXT: vmovdqa %xmm0, (%rsp) # 16-byte Spill
2368 ; AVX-NEXT: movq %rbx, %rdi
2369 ; AVX-NEXT: movq %r14, %rsi
2370 ; AVX-NEXT: callq __fixtfdi
2371 ; AVX-NEXT: vmovq %rax, %xmm0
2372 ; AVX-NEXT: vpunpcklqdq (%rsp), %xmm0, %xmm0 # 16-byte Folded Reload
2373 ; AVX-NEXT: # xmm0 = xmm0[0],mem[0]
2374 ; AVX-NEXT: vinsertps {{.*#+}} xmm0 = xmm0[0,2],zero,zero
2375 ; AVX-NEXT: addq $24, %rsp
2376 ; AVX-NEXT: popq %rbx
2377 ; AVX-NEXT: popq %r14
2379 %cvt = fptosi <2 x fp128> %a to <2 x i32>
2380 %ext = shufflevector <2 x i32> %cvt, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
2384 define <2 x i8> @fptosi_2f32_to_2i8(<2 x float> %a) {
2385 ; SSE-LABEL: fptosi_2f32_to_2i8:
2387 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
2388 ; SSE-NEXT: pxor %xmm1, %xmm1
2389 ; SSE-NEXT: pcmpgtd %xmm0, %xmm1
2390 ; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2393 ; VEX-LABEL: fptosi_2f32_to_2i8:
2395 ; VEX-NEXT: vcvttps2dq %xmm0, %xmm0
2396 ; VEX-NEXT: vpmovsxdq %xmm0, %xmm0
2399 ; AVX512F-LABEL: fptosi_2f32_to_2i8:
2401 ; AVX512F-NEXT: vcvttps2dq %xmm0, %xmm0
2402 ; AVX512F-NEXT: vpmovsxdq %xmm0, %xmm0
2403 ; AVX512F-NEXT: retq
2405 ; AVX512VL-LABEL: fptosi_2f32_to_2i8:
2406 ; AVX512VL: # %bb.0:
2407 ; AVX512VL-NEXT: vcvttps2dq %xmm0, %xmm0
2408 ; AVX512VL-NEXT: vpmovsxdq %xmm0, %xmm0
2409 ; AVX512VL-NEXT: retq
2411 ; AVX512DQ-LABEL: fptosi_2f32_to_2i8:
2412 ; AVX512DQ: # %bb.0:
2413 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2414 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
2415 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2416 ; AVX512DQ-NEXT: vzeroupper
2417 ; AVX512DQ-NEXT: retq
2419 ; AVX512VLDQ-LABEL: fptosi_2f32_to_2i8:
2420 ; AVX512VLDQ: # %bb.0:
2421 ; AVX512VLDQ-NEXT: vcvttps2qq %xmm0, %xmm0
2422 ; AVX512VLDQ-NEXT: retq
2423 %cvt = fptosi <2 x float> %a to <2 x i8>
2427 define <2 x i16> @fptosi_2f32_to_2i16(<2 x float> %a) {
2428 ; SSE-LABEL: fptosi_2f32_to_2i16:
2430 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
2431 ; SSE-NEXT: pxor %xmm1, %xmm1
2432 ; SSE-NEXT: pcmpgtd %xmm0, %xmm1
2433 ; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2436 ; VEX-LABEL: fptosi_2f32_to_2i16:
2438 ; VEX-NEXT: vcvttps2dq %xmm0, %xmm0
2439 ; VEX-NEXT: vpmovsxdq %xmm0, %xmm0
2442 ; AVX512F-LABEL: fptosi_2f32_to_2i16:
2444 ; AVX512F-NEXT: vcvttps2dq %xmm0, %xmm0
2445 ; AVX512F-NEXT: vpmovsxdq %xmm0, %xmm0
2446 ; AVX512F-NEXT: retq
2448 ; AVX512VL-LABEL: fptosi_2f32_to_2i16:
2449 ; AVX512VL: # %bb.0:
2450 ; AVX512VL-NEXT: vcvttps2dq %xmm0, %xmm0
2451 ; AVX512VL-NEXT: vpmovsxdq %xmm0, %xmm0
2452 ; AVX512VL-NEXT: retq
2454 ; AVX512DQ-LABEL: fptosi_2f32_to_2i16:
2455 ; AVX512DQ: # %bb.0:
2456 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2457 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
2458 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2459 ; AVX512DQ-NEXT: vzeroupper
2460 ; AVX512DQ-NEXT: retq
2462 ; AVX512VLDQ-LABEL: fptosi_2f32_to_2i16:
2463 ; AVX512VLDQ: # %bb.0:
2464 ; AVX512VLDQ-NEXT: vcvttps2qq %xmm0, %xmm0
2465 ; AVX512VLDQ-NEXT: retq
2466 %cvt = fptosi <2 x float> %a to <2 x i16>
2470 define <2 x i8> @fptoui_2f32_to_2i8(<2 x float> %a) {
2471 ; SSE-LABEL: fptoui_2f32_to_2i8:
2473 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
2474 ; SSE-NEXT: xorps %xmm1, %xmm1
2475 ; SSE-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2478 ; VEX-LABEL: fptoui_2f32_to_2i8:
2480 ; VEX-NEXT: vcvttps2dq %xmm0, %xmm0
2481 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2484 ; AVX512F-LABEL: fptoui_2f32_to_2i8:
2486 ; AVX512F-NEXT: vcvttps2dq %xmm0, %xmm0
2487 ; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2488 ; AVX512F-NEXT: retq
2490 ; AVX512VL-LABEL: fptoui_2f32_to_2i8:
2491 ; AVX512VL: # %bb.0:
2492 ; AVX512VL-NEXT: vcvttps2dq %xmm0, %xmm0
2493 ; AVX512VL-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2494 ; AVX512VL-NEXT: retq
2496 ; AVX512DQ-LABEL: fptoui_2f32_to_2i8:
2497 ; AVX512DQ: # %bb.0:
2498 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2499 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
2500 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2501 ; AVX512DQ-NEXT: vzeroupper
2502 ; AVX512DQ-NEXT: retq
2504 ; AVX512VLDQ-LABEL: fptoui_2f32_to_2i8:
2505 ; AVX512VLDQ: # %bb.0:
2506 ; AVX512VLDQ-NEXT: vcvttps2uqq %xmm0, %xmm0
2507 ; AVX512VLDQ-NEXT: retq
2508 %cvt = fptoui <2 x float> %a to <2 x i8>
2512 define <2 x i16> @fptoui_2f32_to_2i16(<2 x float> %a) {
2513 ; SSE-LABEL: fptoui_2f32_to_2i16:
2515 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
2516 ; SSE-NEXT: xorps %xmm1, %xmm1
2517 ; SSE-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2520 ; VEX-LABEL: fptoui_2f32_to_2i16:
2522 ; VEX-NEXT: vcvttps2dq %xmm0, %xmm0
2523 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2526 ; AVX512F-LABEL: fptoui_2f32_to_2i16:
2528 ; AVX512F-NEXT: vcvttps2dq %xmm0, %xmm0
2529 ; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2530 ; AVX512F-NEXT: retq
2532 ; AVX512VL-LABEL: fptoui_2f32_to_2i16:
2533 ; AVX512VL: # %bb.0:
2534 ; AVX512VL-NEXT: vcvttps2dq %xmm0, %xmm0
2535 ; AVX512VL-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2536 ; AVX512VL-NEXT: retq
2538 ; AVX512DQ-LABEL: fptoui_2f32_to_2i16:
2539 ; AVX512DQ: # %bb.0:
2540 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2541 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
2542 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2543 ; AVX512DQ-NEXT: vzeroupper
2544 ; AVX512DQ-NEXT: retq
2546 ; AVX512VLDQ-LABEL: fptoui_2f32_to_2i16:
2547 ; AVX512VLDQ: # %bb.0:
2548 ; AVX512VLDQ-NEXT: vcvttps2uqq %xmm0, %xmm0
2549 ; AVX512VLDQ-NEXT: retq
2550 %cvt = fptoui <2 x float> %a to <2 x i16>
2554 define <2 x i8> @fptosi_2f64_to_2i8(<2 x double> %a) {
2555 ; SSE-LABEL: fptosi_2f64_to_2i8:
2557 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
2558 ; SSE-NEXT: pxor %xmm1, %xmm1
2559 ; SSE-NEXT: pcmpgtd %xmm0, %xmm1
2560 ; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2563 ; VEX-LABEL: fptosi_2f64_to_2i8:
2565 ; VEX-NEXT: vcvttpd2dq %xmm0, %xmm0
2566 ; VEX-NEXT: vpmovsxdq %xmm0, %xmm0
2569 ; AVX512F-LABEL: fptosi_2f64_to_2i8:
2571 ; AVX512F-NEXT: vcvttpd2dq %xmm0, %xmm0
2572 ; AVX512F-NEXT: vpmovsxdq %xmm0, %xmm0
2573 ; AVX512F-NEXT: retq
2575 ; AVX512VL-LABEL: fptosi_2f64_to_2i8:
2576 ; AVX512VL: # %bb.0:
2577 ; AVX512VL-NEXT: vcvttpd2dq %xmm0, %xmm0
2578 ; AVX512VL-NEXT: vpmovsxdq %xmm0, %xmm0
2579 ; AVX512VL-NEXT: retq
2581 ; AVX512DQ-LABEL: fptosi_2f64_to_2i8:
2582 ; AVX512DQ: # %bb.0:
2583 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2584 ; AVX512DQ-NEXT: vcvttpd2qq %zmm0, %zmm0
2585 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2586 ; AVX512DQ-NEXT: vzeroupper
2587 ; AVX512DQ-NEXT: retq
2589 ; AVX512VLDQ-LABEL: fptosi_2f64_to_2i8:
2590 ; AVX512VLDQ: # %bb.0:
2591 ; AVX512VLDQ-NEXT: vcvttpd2qq %xmm0, %xmm0
2592 ; AVX512VLDQ-NEXT: retq
2593 %cvt = fptosi <2 x double> %a to <2 x i8>
2597 define <2 x i16> @fptosi_2f64_to_2i16(<2 x double> %a) {
2598 ; SSE-LABEL: fptosi_2f64_to_2i16:
2600 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
2601 ; SSE-NEXT: pxor %xmm1, %xmm1
2602 ; SSE-NEXT: pcmpgtd %xmm0, %xmm1
2603 ; SSE-NEXT: punpckldq {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2606 ; VEX-LABEL: fptosi_2f64_to_2i16:
2608 ; VEX-NEXT: vcvttpd2dq %xmm0, %xmm0
2609 ; VEX-NEXT: vpmovsxdq %xmm0, %xmm0
2612 ; AVX512F-LABEL: fptosi_2f64_to_2i16:
2614 ; AVX512F-NEXT: vcvttpd2dq %xmm0, %xmm0
2615 ; AVX512F-NEXT: vpmovsxdq %xmm0, %xmm0
2616 ; AVX512F-NEXT: retq
2618 ; AVX512VL-LABEL: fptosi_2f64_to_2i16:
2619 ; AVX512VL: # %bb.0:
2620 ; AVX512VL-NEXT: vcvttpd2dq %xmm0, %xmm0
2621 ; AVX512VL-NEXT: vpmovsxdq %xmm0, %xmm0
2622 ; AVX512VL-NEXT: retq
2624 ; AVX512DQ-LABEL: fptosi_2f64_to_2i16:
2625 ; AVX512DQ: # %bb.0:
2626 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2627 ; AVX512DQ-NEXT: vcvttpd2qq %zmm0, %zmm0
2628 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2629 ; AVX512DQ-NEXT: vzeroupper
2630 ; AVX512DQ-NEXT: retq
2632 ; AVX512VLDQ-LABEL: fptosi_2f64_to_2i16:
2633 ; AVX512VLDQ: # %bb.0:
2634 ; AVX512VLDQ-NEXT: vcvttpd2qq %xmm0, %xmm0
2635 ; AVX512VLDQ-NEXT: retq
2636 %cvt = fptosi <2 x double> %a to <2 x i16>
2640 define <2 x i8> @fptoui_2f64_to_2i8(<2 x double> %a) {
2641 ; SSE-LABEL: fptoui_2f64_to_2i8:
2643 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
2644 ; SSE-NEXT: xorpd %xmm1, %xmm1
2645 ; SSE-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2648 ; VEX-LABEL: fptoui_2f64_to_2i8:
2650 ; VEX-NEXT: vcvttpd2dq %xmm0, %xmm0
2651 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2654 ; AVX512F-LABEL: fptoui_2f64_to_2i8:
2656 ; AVX512F-NEXT: vcvttpd2dq %xmm0, %xmm0
2657 ; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2658 ; AVX512F-NEXT: retq
2660 ; AVX512VL-LABEL: fptoui_2f64_to_2i8:
2661 ; AVX512VL: # %bb.0:
2662 ; AVX512VL-NEXT: vcvttpd2dq %xmm0, %xmm0
2663 ; AVX512VL-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2664 ; AVX512VL-NEXT: retq
2666 ; AVX512DQ-LABEL: fptoui_2f64_to_2i8:
2667 ; AVX512DQ: # %bb.0:
2668 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2669 ; AVX512DQ-NEXT: vcvttpd2uqq %zmm0, %zmm0
2670 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2671 ; AVX512DQ-NEXT: vzeroupper
2672 ; AVX512DQ-NEXT: retq
2674 ; AVX512VLDQ-LABEL: fptoui_2f64_to_2i8:
2675 ; AVX512VLDQ: # %bb.0:
2676 ; AVX512VLDQ-NEXT: vcvttpd2uqq %xmm0, %xmm0
2677 ; AVX512VLDQ-NEXT: retq
2678 %cvt = fptoui <2 x double> %a to <2 x i8>
2682 define <2 x i16> @fptoui_2f64_to_2i16(<2 x double> %a) {
2683 ; SSE-LABEL: fptoui_2f64_to_2i16:
2685 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
2686 ; SSE-NEXT: xorpd %xmm1, %xmm1
2687 ; SSE-NEXT: unpcklps {{.*#+}} xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
2690 ; VEX-LABEL: fptoui_2f64_to_2i16:
2692 ; VEX-NEXT: vcvttpd2dq %xmm0, %xmm0
2693 ; VEX-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2696 ; AVX512F-LABEL: fptoui_2f64_to_2i16:
2698 ; AVX512F-NEXT: vcvttpd2dq %xmm0, %xmm0
2699 ; AVX512F-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2700 ; AVX512F-NEXT: retq
2702 ; AVX512VL-LABEL: fptoui_2f64_to_2i16:
2703 ; AVX512VL: # %bb.0:
2704 ; AVX512VL-NEXT: vcvttpd2dq %xmm0, %xmm0
2705 ; AVX512VL-NEXT: vpmovzxdq {{.*#+}} xmm0 = xmm0[0],zero,xmm0[1],zero
2706 ; AVX512VL-NEXT: retq
2708 ; AVX512DQ-LABEL: fptoui_2f64_to_2i16:
2709 ; AVX512DQ: # %bb.0:
2710 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2711 ; AVX512DQ-NEXT: vcvttpd2uqq %zmm0, %zmm0
2712 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2713 ; AVX512DQ-NEXT: vzeroupper
2714 ; AVX512DQ-NEXT: retq
2716 ; AVX512VLDQ-LABEL: fptoui_2f64_to_2i16:
2717 ; AVX512VLDQ: # %bb.0:
2718 ; AVX512VLDQ-NEXT: vcvttpd2uqq %xmm0, %xmm0
2719 ; AVX512VLDQ-NEXT: retq
2720 %cvt = fptoui <2 x double> %a to <2 x i16>
2724 define <8 x i16> @fptosi_8f64_to_8i16(<8 x double> %a) {
2725 ; SSE-LABEL: fptosi_8f64_to_8i16:
2727 ; SSE-NEXT: cvttpd2dq %xmm3, %xmm3
2728 ; SSE-NEXT: cvttpd2dq %xmm2, %xmm2
2729 ; SSE-NEXT: unpcklpd {{.*#+}} xmm2 = xmm2[0],xmm3[0]
2730 ; SSE-NEXT: cvttpd2dq %xmm1, %xmm1
2731 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
2732 ; SSE-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2733 ; SSE-NEXT: packssdw %xmm2, %xmm0
2736 ; VEX-LABEL: fptosi_8f64_to_8i16:
2738 ; VEX-NEXT: vcvttpd2dq %ymm1, %xmm1
2739 ; VEX-NEXT: vcvttpd2dq %ymm0, %xmm0
2740 ; VEX-NEXT: vpackssdw %xmm1, %xmm0, %xmm0
2741 ; VEX-NEXT: vzeroupper
2744 ; AVX512F-LABEL: fptosi_8f64_to_8i16:
2746 ; AVX512F-NEXT: vcvttpd2dq %zmm0, %ymm0
2747 ; AVX512F-NEXT: vpmovdw %zmm0, %ymm0
2748 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2749 ; AVX512F-NEXT: vzeroupper
2750 ; AVX512F-NEXT: retq
2752 ; AVX512VL-LABEL: fptosi_8f64_to_8i16:
2753 ; AVX512VL: # %bb.0:
2754 ; AVX512VL-NEXT: vcvttpd2dq %zmm0, %ymm0
2755 ; AVX512VL-NEXT: vpmovdw %ymm0, %xmm0
2756 ; AVX512VL-NEXT: vzeroupper
2757 ; AVX512VL-NEXT: retq
2759 ; AVX512DQ-LABEL: fptosi_8f64_to_8i16:
2760 ; AVX512DQ: # %bb.0:
2761 ; AVX512DQ-NEXT: vcvttpd2dq %zmm0, %ymm0
2762 ; AVX512DQ-NEXT: vpmovdw %zmm0, %ymm0
2763 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2764 ; AVX512DQ-NEXT: vzeroupper
2765 ; AVX512DQ-NEXT: retq
2767 ; AVX512VLDQ-LABEL: fptosi_8f64_to_8i16:
2768 ; AVX512VLDQ: # %bb.0:
2769 ; AVX512VLDQ-NEXT: vcvttpd2dq %zmm0, %ymm0
2770 ; AVX512VLDQ-NEXT: vpmovdw %ymm0, %xmm0
2771 ; AVX512VLDQ-NEXT: vzeroupper
2772 ; AVX512VLDQ-NEXT: retq
2773 %cvt = fptosi <8 x double> %a to <8 x i16>
2777 define <8 x i16> @fptoui_8f64_to_8i16(<8 x double> %a) {
2778 ; SSE-LABEL: fptoui_8f64_to_8i16:
2780 ; SSE-NEXT: cvttpd2dq %xmm3, %xmm3
2781 ; SSE-NEXT: cvttpd2dq %xmm2, %xmm2
2782 ; SSE-NEXT: unpcklpd {{.*#+}} xmm2 = xmm2[0],xmm3[0]
2783 ; SSE-NEXT: pshuflw {{.*#+}} xmm2 = xmm2[0,2,2,3,4,5,6,7]
2784 ; SSE-NEXT: pshufhw {{.*#+}} xmm2 = xmm2[0,1,2,3,4,6,6,7]
2785 ; SSE-NEXT: pshufd {{.*#+}} xmm2 = xmm2[0,2,2,3]
2786 ; SSE-NEXT: cvttpd2dq %xmm1, %xmm1
2787 ; SSE-NEXT: cvttpd2dq %xmm0, %xmm0
2788 ; SSE-NEXT: unpcklpd {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2789 ; SSE-NEXT: pshuflw {{.*#+}} xmm0 = xmm0[0,2,2,3,4,5,6,7]
2790 ; SSE-NEXT: pshufhw {{.*#+}} xmm0 = xmm0[0,1,2,3,4,6,6,7]
2791 ; SSE-NEXT: pshufd {{.*#+}} xmm0 = xmm0[0,2,2,3]
2792 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm2[0]
2795 ; VEX-LABEL: fptoui_8f64_to_8i16:
2797 ; VEX-NEXT: vcvttpd2dq %ymm1, %xmm1
2798 ; VEX-NEXT: vcvttpd2dq %ymm0, %xmm0
2799 ; VEX-NEXT: vpackusdw %xmm1, %xmm0, %xmm0
2800 ; VEX-NEXT: vzeroupper
2803 ; AVX512F-LABEL: fptoui_8f64_to_8i16:
2805 ; AVX512F-NEXT: vcvttpd2dq %zmm0, %ymm0
2806 ; AVX512F-NEXT: vpmovdw %zmm0, %ymm0
2807 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2808 ; AVX512F-NEXT: vzeroupper
2809 ; AVX512F-NEXT: retq
2811 ; AVX512VL-LABEL: fptoui_8f64_to_8i16:
2812 ; AVX512VL: # %bb.0:
2813 ; AVX512VL-NEXT: vcvttpd2dq %zmm0, %ymm0
2814 ; AVX512VL-NEXT: vpmovdw %ymm0, %xmm0
2815 ; AVX512VL-NEXT: vzeroupper
2816 ; AVX512VL-NEXT: retq
2818 ; AVX512DQ-LABEL: fptoui_8f64_to_8i16:
2819 ; AVX512DQ: # %bb.0:
2820 ; AVX512DQ-NEXT: vcvttpd2dq %zmm0, %ymm0
2821 ; AVX512DQ-NEXT: vpmovdw %zmm0, %ymm0
2822 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
2823 ; AVX512DQ-NEXT: vzeroupper
2824 ; AVX512DQ-NEXT: retq
2826 ; AVX512VLDQ-LABEL: fptoui_8f64_to_8i16:
2827 ; AVX512VLDQ: # %bb.0:
2828 ; AVX512VLDQ-NEXT: vcvttpd2dq %zmm0, %ymm0
2829 ; AVX512VLDQ-NEXT: vpmovdw %ymm0, %xmm0
2830 ; AVX512VLDQ-NEXT: vzeroupper
2831 ; AVX512VLDQ-NEXT: retq
2832 %cvt = fptoui <8 x double> %a to <8 x i16>
2836 define <16 x i8> @fptosi_16f32_to_16i8(<16 x float> %a) {
2837 ; SSE-LABEL: fptosi_16f32_to_16i8:
2839 ; SSE-NEXT: cvttps2dq %xmm3, %xmm3
2840 ; SSE-NEXT: cvttps2dq %xmm2, %xmm2
2841 ; SSE-NEXT: packssdw %xmm3, %xmm2
2842 ; SSE-NEXT: cvttps2dq %xmm1, %xmm1
2843 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
2844 ; SSE-NEXT: packssdw %xmm1, %xmm0
2845 ; SSE-NEXT: packsswb %xmm2, %xmm0
2848 ; AVX1-LABEL: fptosi_16f32_to_16i8:
2850 ; AVX1-NEXT: vcvttps2dq %ymm1, %ymm1
2851 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm2
2852 ; AVX1-NEXT: vpackssdw %xmm2, %xmm1, %xmm1
2853 ; AVX1-NEXT: vcvttps2dq %ymm0, %ymm0
2854 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
2855 ; AVX1-NEXT: vpackssdw %xmm2, %xmm0, %xmm0
2856 ; AVX1-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
2857 ; AVX1-NEXT: vzeroupper
2860 ; AVX2-LABEL: fptosi_16f32_to_16i8:
2862 ; AVX2-NEXT: vcvttps2dq %ymm1, %ymm1
2863 ; AVX2-NEXT: vextracti128 $1, %ymm1, %xmm2
2864 ; AVX2-NEXT: vpackssdw %xmm2, %xmm1, %xmm1
2865 ; AVX2-NEXT: vcvttps2dq %ymm0, %ymm0
2866 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm2
2867 ; AVX2-NEXT: vpackssdw %xmm2, %xmm0, %xmm0
2868 ; AVX2-NEXT: vpacksswb %xmm1, %xmm0, %xmm0
2869 ; AVX2-NEXT: vzeroupper
2872 ; AVX512-LABEL: fptosi_16f32_to_16i8:
2874 ; AVX512-NEXT: vcvttps2dq %zmm0, %zmm0
2875 ; AVX512-NEXT: vpmovdb %zmm0, %xmm0
2876 ; AVX512-NEXT: vzeroupper
2878 %cvt = fptosi <16 x float> %a to <16 x i8>
2882 define <16 x i8> @fptoui_16f32_to_16i8(<16 x float> %a) {
2883 ; SSE-LABEL: fptoui_16f32_to_16i8:
2885 ; SSE-NEXT: cvttps2dq %xmm3, %xmm3
2886 ; SSE-NEXT: cvttps2dq %xmm2, %xmm2
2887 ; SSE-NEXT: packssdw %xmm3, %xmm2
2888 ; SSE-NEXT: cvttps2dq %xmm1, %xmm1
2889 ; SSE-NEXT: cvttps2dq %xmm0, %xmm0
2890 ; SSE-NEXT: packssdw %xmm1, %xmm0
2891 ; SSE-NEXT: packuswb %xmm2, %xmm0
2894 ; AVX1-LABEL: fptoui_16f32_to_16i8:
2896 ; AVX1-NEXT: vcvttps2dq %ymm1, %ymm1
2897 ; AVX1-NEXT: vextractf128 $1, %ymm1, %xmm2
2898 ; AVX1-NEXT: vpackusdw %xmm2, %xmm1, %xmm1
2899 ; AVX1-NEXT: vcvttps2dq %ymm0, %ymm0
2900 ; AVX1-NEXT: vextractf128 $1, %ymm0, %xmm2
2901 ; AVX1-NEXT: vpackusdw %xmm2, %xmm0, %xmm0
2902 ; AVX1-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
2903 ; AVX1-NEXT: vzeroupper
2906 ; AVX2-LABEL: fptoui_16f32_to_16i8:
2908 ; AVX2-NEXT: vcvttps2dq %ymm1, %ymm1
2909 ; AVX2-NEXT: vextracti128 $1, %ymm1, %xmm2
2910 ; AVX2-NEXT: vpackusdw %xmm2, %xmm1, %xmm1
2911 ; AVX2-NEXT: vcvttps2dq %ymm0, %ymm0
2912 ; AVX2-NEXT: vextracti128 $1, %ymm0, %xmm2
2913 ; AVX2-NEXT: vpackusdw %xmm2, %xmm0, %xmm0
2914 ; AVX2-NEXT: vpackuswb %xmm1, %xmm0, %xmm0
2915 ; AVX2-NEXT: vzeroupper
2918 ; AVX512-LABEL: fptoui_16f32_to_16i8:
2920 ; AVX512-NEXT: vcvttps2dq %zmm0, %zmm0
2921 ; AVX512-NEXT: vpmovdb %zmm0, %xmm0
2922 ; AVX512-NEXT: vzeroupper
2924 %cvt = fptoui <16 x float> %a to <16 x i8>
2928 define <2 x i64> @fptosi_2f32_to_2i64_load(<2 x float>* %x) {
2929 ; SSE-LABEL: fptosi_2f32_to_2i64_load:
2931 ; SSE-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2932 ; SSE-NEXT: cvttss2si %xmm1, %rax
2933 ; SSE-NEXT: movq %rax, %xmm0
2934 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1,2,3]
2935 ; SSE-NEXT: cvttss2si %xmm1, %rax
2936 ; SSE-NEXT: movq %rax, %xmm1
2937 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
2940 ; VEX-LABEL: fptosi_2f32_to_2i64_load:
2942 ; VEX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2943 ; VEX-NEXT: vcvttss2si %xmm0, %rax
2944 ; VEX-NEXT: vmovq %rax, %xmm1
2945 ; VEX-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
2946 ; VEX-NEXT: vcvttss2si %xmm0, %rax
2947 ; VEX-NEXT: vmovq %rax, %xmm0
2948 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
2951 ; AVX512F-LABEL: fptosi_2f32_to_2i64_load:
2953 ; AVX512F-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2954 ; AVX512F-NEXT: vcvttss2si %xmm0, %rax
2955 ; AVX512F-NEXT: vmovq %rax, %xmm1
2956 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
2957 ; AVX512F-NEXT: vcvttss2si %xmm0, %rax
2958 ; AVX512F-NEXT: vmovq %rax, %xmm0
2959 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
2960 ; AVX512F-NEXT: retq
2962 ; AVX512VL-LABEL: fptosi_2f32_to_2i64_load:
2963 ; AVX512VL: # %bb.0:
2964 ; AVX512VL-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2965 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rax
2966 ; AVX512VL-NEXT: vmovq %rax, %xmm1
2967 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
2968 ; AVX512VL-NEXT: vcvttss2si %xmm0, %rax
2969 ; AVX512VL-NEXT: vmovq %rax, %xmm0
2970 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
2971 ; AVX512VL-NEXT: retq
2973 ; AVX512DQ-LABEL: fptosi_2f32_to_2i64_load:
2974 ; AVX512DQ: # %bb.0:
2975 ; AVX512DQ-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
2976 ; AVX512DQ-NEXT: vcvttps2qq %ymm0, %zmm0
2977 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2978 ; AVX512DQ-NEXT: vzeroupper
2979 ; AVX512DQ-NEXT: retq
2981 ; AVX512VLDQ-LABEL: fptosi_2f32_to_2i64_load:
2982 ; AVX512VLDQ: # %bb.0:
2983 ; AVX512VLDQ-NEXT: vcvttps2qq (%rdi), %xmm0
2984 ; AVX512VLDQ-NEXT: retq
2985 %a = load <2 x float>, <2 x float>* %x
2986 %b = fptosi <2 x float> %a to <2 x i64>
2990 define <2 x i64> @fptoui_2f32_to_2i64_load(<2 x float>* %x) {
2991 ; SSE-LABEL: fptoui_2f32_to_2i64_load:
2993 ; SSE-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
2994 ; SSE-NEXT: movss {{.*#+}} xmm2 = mem[0],zero,zero,zero
2995 ; SSE-NEXT: movaps %xmm1, %xmm0
2996 ; SSE-NEXT: subss %xmm2, %xmm0
2997 ; SSE-NEXT: cvttss2si %xmm0, %rax
2998 ; SSE-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
2999 ; SSE-NEXT: xorq %rcx, %rax
3000 ; SSE-NEXT: cvttss2si %xmm1, %rdx
3001 ; SSE-NEXT: ucomiss %xmm2, %xmm1
3002 ; SSE-NEXT: cmovaeq %rax, %rdx
3003 ; SSE-NEXT: movq %rdx, %xmm0
3004 ; SSE-NEXT: shufps {{.*#+}} xmm1 = xmm1[1,1,2,3]
3005 ; SSE-NEXT: movaps %xmm1, %xmm3
3006 ; SSE-NEXT: subss %xmm2, %xmm3
3007 ; SSE-NEXT: cvttss2si %xmm3, %rax
3008 ; SSE-NEXT: xorq %rcx, %rax
3009 ; SSE-NEXT: cvttss2si %xmm1, %rcx
3010 ; SSE-NEXT: ucomiss %xmm2, %xmm1
3011 ; SSE-NEXT: cmovaeq %rax, %rcx
3012 ; SSE-NEXT: movq %rcx, %xmm1
3013 ; SSE-NEXT: punpcklqdq {{.*#+}} xmm0 = xmm0[0],xmm1[0]
3016 ; VEX-LABEL: fptoui_2f32_to_2i64_load:
3018 ; VEX-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3019 ; VEX-NEXT: vmovss {{.*#+}} xmm1 = mem[0],zero,zero,zero
3020 ; VEX-NEXT: vsubss %xmm1, %xmm0, %xmm2
3021 ; VEX-NEXT: vcvttss2si %xmm2, %rax
3022 ; VEX-NEXT: movabsq $-9223372036854775808, %rcx # imm = 0x8000000000000000
3023 ; VEX-NEXT: xorq %rcx, %rax
3024 ; VEX-NEXT: vcvttss2si %xmm0, %rdx
3025 ; VEX-NEXT: vucomiss %xmm1, %xmm0
3026 ; VEX-NEXT: cmovaeq %rax, %rdx
3027 ; VEX-NEXT: vmovq %rdx, %xmm2
3028 ; VEX-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
3029 ; VEX-NEXT: vsubss %xmm1, %xmm0, %xmm3
3030 ; VEX-NEXT: vcvttss2si %xmm3, %rax
3031 ; VEX-NEXT: xorq %rcx, %rax
3032 ; VEX-NEXT: vcvttss2si %xmm0, %rcx
3033 ; VEX-NEXT: vucomiss %xmm1, %xmm0
3034 ; VEX-NEXT: cmovaeq %rax, %rcx
3035 ; VEX-NEXT: vmovq %rcx, %xmm0
3036 ; VEX-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm2[0],xmm0[0]
3039 ; AVX512F-LABEL: fptoui_2f32_to_2i64_load:
3041 ; AVX512F-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3042 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rax
3043 ; AVX512F-NEXT: vmovq %rax, %xmm1
3044 ; AVX512F-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
3045 ; AVX512F-NEXT: vcvttss2usi %xmm0, %rax
3046 ; AVX512F-NEXT: vmovq %rax, %xmm0
3047 ; AVX512F-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
3048 ; AVX512F-NEXT: retq
3050 ; AVX512VL-LABEL: fptoui_2f32_to_2i64_load:
3051 ; AVX512VL: # %bb.0:
3052 ; AVX512VL-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3053 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rax
3054 ; AVX512VL-NEXT: vmovq %rax, %xmm1
3055 ; AVX512VL-NEXT: vmovshdup {{.*#+}} xmm0 = xmm0[1,1,3,3]
3056 ; AVX512VL-NEXT: vcvttss2usi %xmm0, %rax
3057 ; AVX512VL-NEXT: vmovq %rax, %xmm0
3058 ; AVX512VL-NEXT: vpunpcklqdq {{.*#+}} xmm0 = xmm1[0],xmm0[0]
3059 ; AVX512VL-NEXT: retq
3061 ; AVX512DQ-LABEL: fptoui_2f32_to_2i64_load:
3062 ; AVX512DQ: # %bb.0:
3063 ; AVX512DQ-NEXT: vmovsd {{.*#+}} xmm0 = mem[0],zero
3064 ; AVX512DQ-NEXT: vcvttps2uqq %ymm0, %zmm0
3065 ; AVX512DQ-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
3066 ; AVX512DQ-NEXT: vzeroupper
3067 ; AVX512DQ-NEXT: retq
3069 ; AVX512VLDQ-LABEL: fptoui_2f32_to_2i64_load:
3070 ; AVX512VLDQ: # %bb.0:
3071 ; AVX512VLDQ-NEXT: vcvttps2uqq (%rdi), %xmm0
3072 ; AVX512VLDQ-NEXT: retq
3073 %a = load <2 x float>, <2 x float>* %x
3074 %b = fptoui <2 x float> %a to <2 x i64>