1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-- -mattr=avx512f,avx512vl,avx512dq | FileCheck %s --check-prefixes=CHECK
4 ; PR37751 - https://bugs.llvm.org/show_bug.cgi?id=37751
5 ; We can't combine into 'round' instructions because the behavior is different for out-of-range values.
7 declare <16 x i32> @llvm.x86.avx512.mask.cvttps2dq.512(<16 x float>, <16 x i32>, i16, i32)
8 declare <4 x i32> @llvm.x86.avx512.mask.cvttps2udq.128(<4 x float>, <4 x i32>, i8)
9 declare <8 x i32> @llvm.x86.avx512.mask.cvttps2udq.256(<8 x float>, <8 x i32>, i8)
10 declare <16 x i32> @llvm.x86.avx512.mask.cvttps2udq.512(<16 x float>, <16 x i32>, i16, i32)
11 declare <4 x i32> @llvm.x86.avx512.mask.cvttpd2udq.256(<4 x double>, <4 x i32>, i8)
12 declare <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double>, <8 x i32>, i8, i32)
13 declare <8 x i32> @llvm.x86.avx512.mask.cvttpd2udq.512(<8 x double>, <8 x i32>, i8, i32)
14 declare <4 x i64> @llvm.x86.avx512.mask.cvttps2qq.256(<4 x float>, <4 x i64>, i8)
15 declare <8 x i64> @llvm.x86.avx512.mask.cvttps2qq.512(<8 x float>, <8 x i64>, i8, i32)
16 declare <4 x i64> @llvm.x86.avx512.mask.cvttps2uqq.256(<4 x float>, <4 x i64>, i8)
17 declare <8 x i64> @llvm.x86.avx512.mask.cvttps2uqq.512(<8 x float>, <8 x i64>, i8, i32)
18 declare <2 x i64> @llvm.x86.avx512.mask.cvttpd2qq.128(<2 x double>, <2 x i64>, i8)
19 declare <4 x i64> @llvm.x86.avx512.mask.cvttpd2qq.256(<4 x double>, <4 x i64>, i8)
20 declare <8 x i64> @llvm.x86.avx512.mask.cvttpd2qq.512(<8 x double>, <8 x i64>, i8, i32)
21 declare <2 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.128(<2 x double>, <2 x i64>, i8)
22 declare <4 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.256(<4 x double>, <4 x i64>, i8)
23 declare <8 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.512(<8 x double>, <8 x i64>, i8, i32)
25 define <16 x float> @float_to_sint_to_float_mem_v16f32(ptr %p) {
26 ; CHECK-LABEL: float_to_sint_to_float_mem_v16f32:
28 ; CHECK-NEXT: vcvttps2dq (%rdi), %zmm0
29 ; CHECK-NEXT: vcvtdq2ps %zmm0, %zmm0
31 %x = load <16 x float>, ptr %p
32 %fptosi = tail call <16 x i32> @llvm.x86.avx512.mask.cvttps2dq.512(<16 x float> %x, <16 x i32> undef, i16 -1, i32 4)
33 %sitofp = sitofp <16 x i32> %fptosi to <16 x float>
34 ret <16 x float> %sitofp
37 define <16 x float> @float_to_sint_to_float_reg_v16f32(<16 x float> %x) {
38 ; CHECK-LABEL: float_to_sint_to_float_reg_v16f32:
40 ; CHECK-NEXT: vcvttps2dq %zmm0, %zmm0
41 ; CHECK-NEXT: vcvtdq2ps %zmm0, %zmm0
43 %fptosi = tail call <16 x i32> @llvm.x86.avx512.mask.cvttps2dq.512(<16 x float> %x, <16 x i32> undef, i16 -1, i32 4)
44 %sitofp = sitofp <16 x i32> %fptosi to <16 x float>
45 ret <16 x float> %sitofp
48 define <16 x float> @float_to_uint_to_float_mem_v16f32(ptr %p) {
49 ; CHECK-LABEL: float_to_uint_to_float_mem_v16f32:
51 ; CHECK-NEXT: vcvttps2udq (%rdi), %zmm0
52 ; CHECK-NEXT: vcvtudq2ps %zmm0, %zmm0
54 %x = load <16 x float>, ptr %p
55 %fptoui = tail call <16 x i32> @llvm.x86.avx512.mask.cvttps2udq.512(<16 x float> %x, <16 x i32> undef, i16 -1, i32 4)
56 %uitofp = uitofp <16 x i32> %fptoui to <16 x float>
57 ret <16 x float> %uitofp
60 define <16 x float> @float_to_uint_to_float_reg_v16f32(<16 x float> %x) {
61 ; CHECK-LABEL: float_to_uint_to_float_reg_v16f32:
63 ; CHECK-NEXT: vcvttps2udq %zmm0, %zmm0
64 ; CHECK-NEXT: vcvtudq2ps %zmm0, %zmm0
66 %fptoui = tail call <16 x i32> @llvm.x86.avx512.mask.cvttps2udq.512(<16 x float> %x, <16 x i32> undef, i16 -1, i32 4)
67 %uitofp = uitofp <16 x i32> %fptoui to <16 x float>
68 ret <16 x float> %uitofp
71 define <4 x float> @float_to_uint_to_float_mem_v4f32(ptr %p) {
72 ; CHECK-LABEL: float_to_uint_to_float_mem_v4f32:
74 ; CHECK-NEXT: vcvttps2udq (%rdi), %xmm0
75 ; CHECK-NEXT: vcvtudq2ps %xmm0, %xmm0
77 %x = load <4 x float>, ptr %p
78 %fptoui = tail call <4 x i32> @llvm.x86.avx512.mask.cvttps2udq.128(<4 x float> %x, <4 x i32> undef, i8 -1)
79 %uitofp = uitofp <4 x i32> %fptoui to <4 x float>
80 ret <4 x float> %uitofp
83 define <4 x float> @float_to_uint_to_float_reg_v4f32(<4 x float> %x) {
84 ; CHECK-LABEL: float_to_uint_to_float_reg_v4f32:
86 ; CHECK-NEXT: vcvttps2udq %xmm0, %xmm0
87 ; CHECK-NEXT: vcvtudq2ps %xmm0, %xmm0
89 %fptoui = tail call <4 x i32> @llvm.x86.avx512.mask.cvttps2udq.128(<4 x float> %x, <4 x i32> undef, i8 -1)
90 %uitofp = uitofp <4 x i32> %fptoui to <4 x float>
91 ret <4 x float> %uitofp
94 define <8 x float> @float_to_uint_to_float_mem_v8f32(ptr %p) {
95 ; CHECK-LABEL: float_to_uint_to_float_mem_v8f32:
97 ; CHECK-NEXT: vcvttps2udq (%rdi), %ymm0
98 ; CHECK-NEXT: vcvtudq2ps %ymm0, %ymm0
100 %x = load <8 x float>, ptr %p
101 %fptoui = tail call <8 x i32> @llvm.x86.avx512.mask.cvttps2udq.256(<8 x float> %x, <8 x i32> undef, i8 -1)
102 %uitofp = uitofp <8 x i32> %fptoui to <8 x float>
103 ret <8 x float> %uitofp
106 define <8 x float> @float_to_uint_to_float_reg_v8f32(<8 x float> %x) {
107 ; CHECK-LABEL: float_to_uint_to_float_reg_v8f32:
109 ; CHECK-NEXT: vcvttps2udq %ymm0, %ymm0
110 ; CHECK-NEXT: vcvtudq2ps %ymm0, %ymm0
112 %fptoui = tail call <8 x i32> @llvm.x86.avx512.mask.cvttps2udq.256(<8 x float> %x, <8 x i32> undef, i8 -1)
113 %uitofp = uitofp <8 x i32> %fptoui to <8 x float>
114 ret <8 x float> %uitofp
117 define <4 x double> @double_to_uint_to_double_mem_v4f64(ptr %p) {
118 ; CHECK-LABEL: double_to_uint_to_double_mem_v4f64:
120 ; CHECK-NEXT: vcvttpd2udqy (%rdi), %xmm0
121 ; CHECK-NEXT: vcvtudq2pd %xmm0, %ymm0
123 %x = load <4 x double>, ptr %p
124 %fptoui = tail call <4 x i32> @llvm.x86.avx512.mask.cvttpd2udq.256(<4 x double> %x, <4 x i32> undef, i8 -1)
125 %uitofp = uitofp <4 x i32> %fptoui to <4 x double>
126 ret <4 x double> %uitofp
129 define <4 x double> @double_to_uint_to_double_reg_v4f64(<4 x double> %x) {
130 ; CHECK-LABEL: double_to_uint_to_double_reg_v4f64:
132 ; CHECK-NEXT: vcvttpd2udq %ymm0, %xmm0
133 ; CHECK-NEXT: vcvtudq2pd %xmm0, %ymm0
135 %fptoui = tail call <4 x i32> @llvm.x86.avx512.mask.cvttpd2udq.256(<4 x double> %x, <4 x i32> undef, i8 -1)
136 %uitofp = uitofp <4 x i32> %fptoui to <4 x double>
137 ret <4 x double> %uitofp
140 define <8 x double> @double_to_sint_to_double_mem_v8f64(ptr %p) {
141 ; CHECK-LABEL: double_to_sint_to_double_mem_v8f64:
143 ; CHECK-NEXT: vcvttpd2dq (%rdi), %ymm0
144 ; CHECK-NEXT: vcvtdq2pd %ymm0, %zmm0
146 %x = load <8 x double>, ptr %p
147 %fptosi = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
148 %sitofp = sitofp <8 x i32> %fptosi to <8 x double>
149 ret <8 x double> %sitofp
152 define <8 x double> @double_to_sint_to_double_reg_v8f64(<8 x double> %x) {
153 ; CHECK-LABEL: double_to_sint_to_double_reg_v8f64:
155 ; CHECK-NEXT: vcvttpd2dq %zmm0, %ymm0
156 ; CHECK-NEXT: vcvtdq2pd %ymm0, %zmm0
158 %fptosi = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2dq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
159 %sitofp = sitofp <8 x i32> %fptosi to <8 x double>
160 ret <8 x double> %sitofp
163 define <8 x double> @double_to_uint_to_double_mem_v8f64(ptr %p) {
164 ; CHECK-LABEL: double_to_uint_to_double_mem_v8f64:
166 ; CHECK-NEXT: vcvttpd2udq (%rdi), %ymm0
167 ; CHECK-NEXT: vcvtudq2pd %ymm0, %zmm0
169 %x = load <8 x double>, ptr %p
170 %fptoui = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2udq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
171 %uitofp = uitofp <8 x i32> %fptoui to <8 x double>
172 ret <8 x double> %uitofp
175 define <8 x double> @double_to_uint_to_double_reg_v8f64(<8 x double> %x) {
176 ; CHECK-LABEL: double_to_uint_to_double_reg_v8f64:
178 ; CHECK-NEXT: vcvttpd2udq %zmm0, %ymm0
179 ; CHECK-NEXT: vcvtudq2pd %ymm0, %zmm0
181 %fptoui = tail call <8 x i32> @llvm.x86.avx512.mask.cvttpd2udq.512(<8 x double> %x, <8 x i32> undef, i8 -1, i32 4)
182 %uitofp = uitofp <8 x i32> %fptoui to <8 x double>
183 ret <8 x double> %uitofp
186 define <4 x float> @float_to_sint64_to_float_mem_v4f32(ptr %p) {
187 ; CHECK-LABEL: float_to_sint64_to_float_mem_v4f32:
189 ; CHECK-NEXT: vcvttps2qq (%rdi), %ymm0
190 ; CHECK-NEXT: vcvtqq2ps %ymm0, %xmm0
191 ; CHECK-NEXT: vzeroupper
193 %x = load <4 x float>, ptr %p
194 %fptosi = tail call <4 x i64> @llvm.x86.avx512.mask.cvttps2qq.256(<4 x float> %x, <4 x i64> undef, i8 -1)
195 %sitofp = sitofp <4 x i64> %fptosi to <4 x float>
196 ret <4 x float> %sitofp
199 define <4 x float> @float_to_sint64_to_float_reg_v4f32(<4 x float> %x) {
200 ; CHECK-LABEL: float_to_sint64_to_float_reg_v4f32:
202 ; CHECK-NEXT: vcvttps2qq %xmm0, %ymm0
203 ; CHECK-NEXT: vcvtqq2ps %ymm0, %xmm0
204 ; CHECK-NEXT: vzeroupper
206 %fptosi = tail call <4 x i64> @llvm.x86.avx512.mask.cvttps2qq.256(<4 x float> %x, <4 x i64> undef, i8 -1)
207 %sitofp = sitofp <4 x i64> %fptosi to <4 x float>
208 ret <4 x float> %sitofp
211 define <4 x float> @float_to_uint64_to_float_mem_v4f32(ptr %p) {
212 ; CHECK-LABEL: float_to_uint64_to_float_mem_v4f32:
214 ; CHECK-NEXT: vcvttps2uqq (%rdi), %ymm0
215 ; CHECK-NEXT: vcvtuqq2ps %ymm0, %xmm0
216 ; CHECK-NEXT: vzeroupper
218 %x = load <4 x float>, ptr %p
219 %fptoui = tail call <4 x i64> @llvm.x86.avx512.mask.cvttps2uqq.256(<4 x float> %x, <4 x i64> undef, i8 -1)
220 %uitofp = uitofp <4 x i64> %fptoui to <4 x float>
221 ret <4 x float> %uitofp
224 define <4 x float> @float_to_uint64_to_float_reg_v4f32(<4 x float> %x) {
225 ; CHECK-LABEL: float_to_uint64_to_float_reg_v4f32:
227 ; CHECK-NEXT: vcvttps2uqq %xmm0, %ymm0
228 ; CHECK-NEXT: vcvtuqq2ps %ymm0, %xmm0
229 ; CHECK-NEXT: vzeroupper
231 %fptoui = tail call <4 x i64> @llvm.x86.avx512.mask.cvttps2uqq.256(<4 x float> %x, <4 x i64> undef, i8 -1)
232 %uitofp = uitofp <4 x i64> %fptoui to <4 x float>
233 ret <4 x float> %uitofp
236 define <8 x float> @float_to_sint64_to_float_mem_v8f32(ptr %p) {
237 ; CHECK-LABEL: float_to_sint64_to_float_mem_v8f32:
239 ; CHECK-NEXT: vcvttps2qq (%rdi), %zmm0
240 ; CHECK-NEXT: vcvtqq2ps %zmm0, %ymm0
242 %x = load <8 x float>, ptr %p
243 %fptosi = tail call <8 x i64> @llvm.x86.avx512.mask.cvttps2qq.512(<8 x float> %x, <8 x i64> undef, i8 -1, i32 4)
244 %sitofp = sitofp <8 x i64> %fptosi to <8 x float>
245 ret <8 x float> %sitofp
248 define <8 x float> @float_to_sint64_to_float_reg_v8f32(<8 x float> %x) {
249 ; CHECK-LABEL: float_to_sint64_to_float_reg_v8f32:
251 ; CHECK-NEXT: vcvttps2qq %ymm0, %zmm0
252 ; CHECK-NEXT: vcvtqq2ps %zmm0, %ymm0
254 %fptosi = tail call <8 x i64> @llvm.x86.avx512.mask.cvttps2qq.512(<8 x float> %x, <8 x i64> undef, i8 -1, i32 4)
255 %sitofp = sitofp <8 x i64> %fptosi to <8 x float>
256 ret <8 x float> %sitofp
259 define <8 x float> @float_to_uint64_to_float_mem_v8f32(ptr %p) {
260 ; CHECK-LABEL: float_to_uint64_to_float_mem_v8f32:
262 ; CHECK-NEXT: vcvttps2uqq (%rdi), %zmm0
263 ; CHECK-NEXT: vcvtuqq2ps %zmm0, %ymm0
265 %x = load <8 x float>, ptr %p
266 %fptoui = tail call <8 x i64> @llvm.x86.avx512.mask.cvttps2uqq.512(<8 x float> %x, <8 x i64> undef, i8 -1, i32 4)
267 %uitofp = uitofp <8 x i64> %fptoui to <8 x float>
268 ret <8 x float> %uitofp
271 define <8 x float> @float_to_uint64_to_float_reg_v8f32(<8 x float> %x) {
272 ; CHECK-LABEL: float_to_uint64_to_float_reg_v8f32:
274 ; CHECK-NEXT: vcvttps2uqq %ymm0, %zmm0
275 ; CHECK-NEXT: vcvtuqq2ps %zmm0, %ymm0
277 %fptoui = tail call <8 x i64> @llvm.x86.avx512.mask.cvttps2uqq.512(<8 x float> %x, <8 x i64> undef, i8 -1, i32 4)
278 %uitofp = uitofp <8 x i64> %fptoui to <8 x float>
279 ret <8 x float> %uitofp
282 define <2 x double> @double_to_sint64_to_double_mem_v2f64(ptr %p) {
283 ; CHECK-LABEL: double_to_sint64_to_double_mem_v2f64:
285 ; CHECK-NEXT: vcvttpd2qq (%rdi), %xmm0
286 ; CHECK-NEXT: vcvtqq2pd %xmm0, %xmm0
288 %x = load <2 x double>, ptr %p
289 %fptosi = tail call <2 x i64> @llvm.x86.avx512.mask.cvttpd2qq.128(<2 x double> %x, <2 x i64> undef, i8 -1)
290 %sitofp = sitofp <2 x i64> %fptosi to <2 x double>
291 ret <2 x double> %sitofp
294 define <2 x double> @double_to_sint64_to_double_reg_v2f64(<2 x double> %x) {
295 ; CHECK-LABEL: double_to_sint64_to_double_reg_v2f64:
297 ; CHECK-NEXT: vcvttpd2qq %xmm0, %xmm0
298 ; CHECK-NEXT: vcvtqq2pd %xmm0, %xmm0
300 %fptosi = tail call <2 x i64> @llvm.x86.avx512.mask.cvttpd2qq.128(<2 x double> %x, <2 x i64> undef, i8 -1)
301 %sitofp = sitofp <2 x i64> %fptosi to <2 x double>
302 ret <2 x double> %sitofp
305 define <2 x double> @double_to_uint64_to_double_mem_v2f64(ptr %p) {
306 ; CHECK-LABEL: double_to_uint64_to_double_mem_v2f64:
308 ; CHECK-NEXT: vcvttpd2uqq (%rdi), %xmm0
309 ; CHECK-NEXT: vcvtuqq2pd %xmm0, %xmm0
311 %x = load <2 x double>, ptr %p
312 %fptoui = tail call <2 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.128(<2 x double> %x, <2 x i64> undef, i8 -1)
313 %uitofp = uitofp <2 x i64> %fptoui to <2 x double>
314 ret <2 x double> %uitofp
317 define <2 x double> @double_to_uint64_to_double_reg_v2f64(<2 x double> %x) {
318 ; CHECK-LABEL: double_to_uint64_to_double_reg_v2f64:
320 ; CHECK-NEXT: vcvttpd2uqq %xmm0, %xmm0
321 ; CHECK-NEXT: vcvtuqq2pd %xmm0, %xmm0
323 %fptoui = tail call <2 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.128(<2 x double> %x, <2 x i64> undef, i8 -1)
324 %uitofp = uitofp <2 x i64> %fptoui to <2 x double>
325 ret <2 x double> %uitofp
328 define <4 x double> @double_to_sint64_to_double_mem_v4f64(ptr %p) {
329 ; CHECK-LABEL: double_to_sint64_to_double_mem_v4f64:
331 ; CHECK-NEXT: vcvttpd2qq (%rdi), %ymm0
332 ; CHECK-NEXT: vcvtqq2pd %ymm0, %ymm0
334 %x = load <4 x double>, ptr %p
335 %fptosi = tail call <4 x i64> @llvm.x86.avx512.mask.cvttpd2qq.256(<4 x double> %x, <4 x i64> undef, i8 -1)
336 %sitofp = sitofp <4 x i64> %fptosi to <4 x double>
337 ret <4 x double> %sitofp
340 define <4 x double> @double_to_sint64_to_double_reg_v4f64(<4 x double> %x) {
341 ; CHECK-LABEL: double_to_sint64_to_double_reg_v4f64:
343 ; CHECK-NEXT: vcvttpd2qq %ymm0, %ymm0
344 ; CHECK-NEXT: vcvtqq2pd %ymm0, %ymm0
346 %fptosi = tail call <4 x i64> @llvm.x86.avx512.mask.cvttpd2qq.256(<4 x double> %x, <4 x i64> undef, i8 -1)
347 %sitofp = sitofp <4 x i64> %fptosi to <4 x double>
348 ret <4 x double> %sitofp
351 define <4 x double> @double_to_uint64_to_double_mem_v4f64(ptr %p) {
352 ; CHECK-LABEL: double_to_uint64_to_double_mem_v4f64:
354 ; CHECK-NEXT: vcvttpd2uqq (%rdi), %ymm0
355 ; CHECK-NEXT: vcvtuqq2pd %ymm0, %ymm0
357 %x = load <4 x double>, ptr %p
358 %fptoui = tail call <4 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.256(<4 x double> %x, <4 x i64> undef, i8 -1)
359 %uitofp = uitofp <4 x i64> %fptoui to <4 x double>
360 ret <4 x double> %uitofp
363 define <4 x double> @double_to_uint64_to_double_reg_v4f64(<4 x double> %x) {
364 ; CHECK-LABEL: double_to_uint64_to_double_reg_v4f64:
366 ; CHECK-NEXT: vcvttpd2uqq %ymm0, %ymm0
367 ; CHECK-NEXT: vcvtuqq2pd %ymm0, %ymm0
369 %fptoui = tail call <4 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.256(<4 x double> %x, <4 x i64> undef, i8 -1)
370 %uitofp = uitofp <4 x i64> %fptoui to <4 x double>
371 ret <4 x double> %uitofp
374 define <8 x double> @double_to_sint64_to_double_mem_v8f64(ptr %p) {
375 ; CHECK-LABEL: double_to_sint64_to_double_mem_v8f64:
377 ; CHECK-NEXT: vcvttpd2qq (%rdi), %zmm0
378 ; CHECK-NEXT: vcvtqq2pd %zmm0, %zmm0
380 %x = load <8 x double>, ptr %p
381 %fptosi = tail call <8 x i64> @llvm.x86.avx512.mask.cvttpd2qq.512(<8 x double> %x, <8 x i64> undef, i8 -1, i32 4)
382 %sitofp = sitofp <8 x i64> %fptosi to <8 x double>
383 ret <8 x double> %sitofp
386 define <8 x double> @double_to_sint64_to_double_reg_v8f64(<8 x double> %x) {
387 ; CHECK-LABEL: double_to_sint64_to_double_reg_v8f64:
389 ; CHECK-NEXT: vcvttpd2qq %zmm0, %zmm0
390 ; CHECK-NEXT: vcvtqq2pd %zmm0, %zmm0
392 %fptosi = tail call <8 x i64> @llvm.x86.avx512.mask.cvttpd2qq.512(<8 x double> %x, <8 x i64> undef, i8 -1, i32 4)
393 %sitofp = sitofp <8 x i64> %fptosi to <8 x double>
394 ret <8 x double> %sitofp
397 define <8 x double> @double_to_uint64_to_double_mem_v8f64(ptr %p) {
398 ; CHECK-LABEL: double_to_uint64_to_double_mem_v8f64:
400 ; CHECK-NEXT: vcvttpd2uqq (%rdi), %zmm0
401 ; CHECK-NEXT: vcvtuqq2pd %zmm0, %zmm0
403 %x = load <8 x double>, ptr %p
404 %fptoui = tail call <8 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.512(<8 x double> %x, <8 x i64> undef, i8 -1, i32 4)
405 %uitofp = uitofp <8 x i64> %fptoui to <8 x double>
406 ret <8 x double> %uitofp
409 define <8 x double> @double_to_uint64_to_double_reg_v8f64(<8 x double> %x) {
410 ; CHECK-LABEL: double_to_uint64_to_double_reg_v8f64:
412 ; CHECK-NEXT: vcvttpd2uqq %zmm0, %zmm0
413 ; CHECK-NEXT: vcvtuqq2pd %zmm0, %zmm0
415 %fptoui = tail call <8 x i64> @llvm.x86.avx512.mask.cvttpd2uqq.512(<8 x double> %x, <8 x i64> undef, i8 -1, i32 4)
416 %uitofp = uitofp <8 x i64> %fptoui to <8 x double>
417 ret <8 x double> %uitofp